@rpcbase/agents-sdk 0.15.0 → 0.16.0

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.
Files changed (47) hide show
  1. package/dist/agents-sdk.css +1 -1
  2. package/dist/api/chat/handler.d.ts.map +1 -1
  3. package/dist/api/chat/toolApproval.d.ts.map +1 -1
  4. package/dist/api/chatDb.d.ts +1 -0
  5. package/dist/api/chatDb.d.ts.map +1 -1
  6. package/dist/api/chatStore.d.ts +1 -0
  7. package/dist/api/chatStore.d.ts.map +1 -1
  8. package/dist/{chatDb-DwhaaOmO.js → chatDb-Cz7QrJEO.js} +20 -10
  9. package/dist/{chatDb-DTjvCb7r.js → chatDb-DN3gG0rE.js} +20 -10
  10. package/dist/client-routes.browser.js +1 -1
  11. package/dist/client-routes.js +1 -1
  12. package/dist/components/message-actions.d.ts.map +1 -1
  13. package/dist/components/message.d.ts.map +1 -1
  14. package/dist/components/sidebar-history-item.d.ts.map +1 -1
  15. package/dist/components/sidebar-history.d.ts +2 -1
  16. package/dist/components/sidebar-history.d.ts.map +1 -1
  17. package/dist/{data-stream-handler-CE4hrlns.js → data-stream-handler-BD1Vo7Ui.js} +622 -606
  18. package/dist/{data-stream-handler-C-APWWFX.js → data-stream-handler-B_klM9Lg.js} +622 -606
  19. package/dist/{handler-RTP9W4lT.js → handler-C6oMmAvW.js} +1 -1
  20. package/dist/{handler-Bj8-MkNf.js → handler-CQui0J86.js} +4 -3
  21. package/dist/{handler-DtSnDhW2.js → handler-Clz26ndM.js} +1 -1
  22. package/dist/{handler-hTPifowr.js → handler-D63zn0W5.js} +1 -1
  23. package/dist/{handler-C3GOpsFS.js → handler-DUaBZkpS.js} +1 -1
  24. package/dist/{handler-B-erVnQ6.js → handler-DXYE_QcX.js} +1 -1
  25. package/dist/{handler-CsNuMrRb.js → handler-DdjrldqF.js} +1 -1
  26. package/dist/{handler-BnDd10G3.js → handler-DhvGNj_T.js} +1 -1
  27. package/dist/{handler-0bIpqvbt.js → handler-DkRxnOUN.js} +1 -1
  28. package/dist/{handler-By4I5hjo.js → handler-Do5xRfzR.js} +1 -1
  29. package/dist/{handler-DAcB4fHJ.js → handler-DxEfTi-F.js} +1 -1
  30. package/dist/{handler-M3fJUpy0.js → handler-RBbHnbkh.js} +4 -3
  31. package/dist/{handler-Bsto5ImB.js → handler-jQOdtyET.js} +1 -1
  32. package/dist/{handler-BLKbyYqI.js → handler-moTb7fZ2.js} +1 -1
  33. package/dist/{handler-CNnPLVlT.js → handler-pmPm2R2f.js} +1 -1
  34. package/dist/{handler-DUljRc5z.js → handler-yu9qDThP.js} +1 -1
  35. package/dist/index.browser.js +1 -1
  36. package/dist/index.js +1 -1
  37. package/dist/lib/types.d.ts +1 -0
  38. package/dist/lib/types.d.ts.map +1 -1
  39. package/dist/models/RBAgentsChatThread.d.ts +1 -0
  40. package/dist/models/RBAgentsChatThread.d.ts.map +1 -1
  41. package/dist/models.browser.js +1 -0
  42. package/dist/models.js +8 -2
  43. package/dist/routes.browser.js +8 -8
  44. package/dist/routes.js +8 -8
  45. package/dist/runtime.js +1 -1
  46. package/dist/tailwind-source.js +1 -1
  47. package/package.json +1 -1
@@ -44043,7 +44043,13 @@ var uy = ({ chat: e, isActive: t, isStaleStreaming: n, isStreaming: r, onDelete:
44043
44043
  isStaleStreaming: n,
44044
44044
  isStreaming: r,
44045
44045
  title: s
44046
- }), { getChatPath: l } = Qe(), u = sy(e.id), [d, f] = z(!1), p = R(null), m = R(null), h = (e) => {
44046
+ }), { getChatPath: l } = Qe(), u = sy(e.id), [d, f] = z(!1), p = R(null), m = R(null), h = r ? /* @__PURE__ */ V("span", {
44047
+ className: "mr-0.5 shrink-0",
44048
+ children: /* @__PURE__ */ V(cy, { label: "Conversation is streaming" })
44049
+ }) : n ? /* @__PURE__ */ V("span", {
44050
+ className: "mr-0.5 shrink-0",
44051
+ children: /* @__PURE__ */ V(ly, {})
44052
+ }) : null, g = (e) => {
44047
44053
  let t = e.relatedTarget;
44048
44054
  if (!(t instanceof Node)) {
44049
44055
  f(!1);
@@ -44053,6 +44059,7 @@ var uy = ({ chat: e, isActive: t, isStaleStreaming: n, isStreaming: r, onDelete:
44053
44059
  };
44054
44060
  return /* @__PURE__ */ H(b_, { children: [/* @__PURE__ */ V(S_, {
44055
44061
  asChild: !0,
44062
+ className: c === void 0 ? void 0 : "h-auto min-h-12 py-2",
44056
44063
  isActive: t,
44057
44064
  children: /* @__PURE__ */ V(ne, {
44058
44065
  className: "flex min-w-0 items-center gap-2",
@@ -44061,13 +44068,7 @@ var uy = ({ chat: e, isActive: t, isStaleStreaming: n, isStreaming: r, onDelete:
44061
44068
  children: c === void 0 ? /* @__PURE__ */ H(ce, { children: [/* @__PURE__ */ V("span", {
44062
44069
  className: "min-w-0 flex-1 truncate",
44063
44070
  children: s
44064
- }), r ? /* @__PURE__ */ V("span", {
44065
- className: "mr-0.5 shrink-0",
44066
- children: /* @__PURE__ */ V(cy, { label: "Conversation is streaming" })
44067
- }) : n ? /* @__PURE__ */ V("span", {
44068
- className: "mr-0.5 shrink-0",
44069
- children: /* @__PURE__ */ V(ly, {})
44070
- }) : null] }) : c
44071
+ }), h] }) : /* @__PURE__ */ H(ce, { children: [c, h] })
44071
44072
  })
44072
44073
  }), /* @__PURE__ */ H(Yv, {
44073
44074
  modal: !0,
@@ -44078,9 +44079,9 @@ var uy = ({ chat: e, isActive: t, isStaleStreaming: n, isStreaming: r, onDelete:
44078
44079
  children: /* @__PURE__ */ H(C_, {
44079
44080
  className: "mr-0.5 data-open:bg-sidebar-accent data-open:text-sidebar-accent-foreground",
44080
44081
  id: u,
44081
- onMouseLeave: h,
44082
+ onMouseLeave: g,
44082
44083
  ref: p,
44083
- showOnHover: !t,
44084
+ showOnHover: r || n || !t,
44084
44085
  children: [/* @__PURE__ */ V(mt, {}), /* @__PURE__ */ V("span", {
44085
44086
  className: "sr-only",
44086
44087
  children: "More"
@@ -44088,7 +44089,7 @@ var uy = ({ chat: e, isActive: t, isStaleStreaming: n, isStreaming: r, onDelete:
44088
44089
  })
44089
44090
  }), /* @__PURE__ */ V(Qv, {
44090
44091
  align: "end",
44091
- onMouseLeave: h,
44092
+ onMouseLeave: g,
44092
44093
  ref: m,
44093
44094
  side: "bottom",
44094
44095
  children: /* @__PURE__ */ H(ty, {
@@ -44104,6 +44105,7 @@ var uy = ({ chat: e, isActive: t, isStaleStreaming: n, isStreaming: r, onDelete:
44104
44105
  _id: 1,
44105
44106
  id: 1,
44106
44107
  createdAt: 1,
44108
+ lastActivityAt: 1,
44107
44109
  title: 1,
44108
44110
  userId: 1,
44109
44111
  isStreaming: 1,
@@ -44111,19 +44113,26 @@ var uy = ({ chat: e, isActive: t, isStaleStreaming: n, isStreaming: r, onDelete:
44111
44113
  },
44112
44114
  pagination: {
44113
44115
  limit: dy,
44114
- sort: [{
44115
- field: "createdAt",
44116
- order: "desc"
44117
- }, {
44118
- field: "_id",
44119
- order: "desc"
44120
- }]
44116
+ sort: [
44117
+ {
44118
+ field: "lastActivityAt",
44119
+ order: "desc"
44120
+ },
44121
+ {
44122
+ field: "createdAt",
44123
+ order: "desc"
44124
+ },
44125
+ {
44126
+ field: "_id",
44127
+ order: "desc"
44128
+ }
44129
+ ]
44121
44130
  },
44122
44131
  ssr: "auto"
44123
44132
  }, my = (e) => {
44124
44133
  let t = /* @__PURE__ */ new Date(), n = mi(t, 1), r = pi(t, 1);
44125
44134
  return e.reduce((e, t) => {
44126
- let i = new Date(t.createdAt);
44135
+ let i = new Date(t.lastActivityAt);
44127
44136
  return li(i) ? e.today.push(t) : fi(i) ? e.yesterday.push(t) : i > n ? e.lastWeek.push(t) : i > r ? e.lastMonth.push(t) : e.older.push(t), e;
44128
44137
  }, {
44129
44138
  today: [],
@@ -54967,7 +54976,7 @@ function FR(e, t = !0) {
54967
54976
  //#endregion
54968
54977
  //#region src/components/artifact-actions.tsx
54969
54978
  function IR({ artifact: e, handleVersionChange: t, currentVersionIndex: n, isCurrentVersion: r, mode: i, metadata: a, setMetadata: o }) {
54970
- let [s, c] = z(!1), l = bW.find((t) => t.kind === e.kind);
54979
+ let [s, c] = z(!1), l = xW.find((t) => t.kind === e.kind);
54971
54980
  if (!l) throw Error("Artifact definition not found!");
54972
54981
  let u = {
54973
54982
  content: e.content,
@@ -56069,7 +56078,7 @@ function eB({ chatId: e, message: t, vote: n, isLoading: r, setMode: i }) {
56069
56078
  c(void 0);
56070
56079
  }, [t.id, n?.isUpvoted]);
56071
56080
  let l = s ?? n;
56072
- if (r) return null;
56081
+ if (r || t.role === "user" && t.parts.some((e) => e.type !== "text" && e.type !== "file")) return null;
56073
56082
  let u = t.parts?.filter((e) => e.type === "text").map((e) => e.text).join("\n").trim(), d = async () => {
56074
56083
  if (!u) {
56075
56084
  le.error("There's no text to copy!");
@@ -56758,7 +56767,14 @@ function CB(e) {
56758
56767
  }).format(t)
56759
56768
  };
56760
56769
  }
56761
- function wB({ addToolApprovalResponse: e, approvalId: t, denyReason: n }) {
56770
+ function wB({ approval: e, className: t }) {
56771
+ return e?.reason ? /* @__PURE__ */ V("div", {
56772
+ className: U(t, e.isAutomatic && "line-clamp-2"),
56773
+ title: e.isAutomatic ? e.reason : void 0,
56774
+ children: /* @__PURE__ */ V("span", { children: e.reason })
56775
+ }) : null;
56776
+ }
56777
+ function TB({ addToolApprovalResponse: e, approvalId: t, denyReason: n }) {
56762
56778
  return /* @__PURE__ */ H("div", {
56763
56779
  className: "flex items-center justify-end gap-2 px-4 py-3",
56764
56780
  children: [/* @__PURE__ */ V(Im, {
@@ -56786,18 +56802,18 @@ function wB({ addToolApprovalResponse: e, approvalId: t, denyReason: n }) {
56786
56802
  })]
56787
56803
  });
56788
56804
  }
56789
- var TB = new Set([
56805
+ var EB = new Set([
56790
56806
  "text",
56791
56807
  "code",
56792
56808
  "image",
56793
56809
  "sheet"
56794
- ]), EB = new Set([
56810
+ ]), DB = new Set([
56795
56811
  "tool-createDocument",
56796
56812
  "tool-updateDocument",
56797
56813
  "tool-editDocument",
56798
56814
  "tool-requestSuggestions"
56799
- ]), DB = (e) => EB.has(e), OB = (e) => !(!xB(e) || !("id" in e || "title" in e || "kind" in e || "content" in e) || "id" in e && typeof e.id != "string" || "title" in e && typeof e.title != "string" || "kind" in e && (typeof e.kind != "string" || !TB.has(e.kind)) || "content" in e && typeof e.content != "string");
56800
- function kB(e, t) {
56815
+ ]), OB = (e) => DB.has(e), kB = (e) => !(!xB(e) || !("id" in e || "title" in e || "kind" in e || "content" in e) || "id" in e && typeof e.id != "string" || "title" in e && typeof e.title != "string" || "kind" in e && (typeof e.kind != "string" || !EB.has(e.kind)) || "content" in e && typeof e.content != "string");
56816
+ function AB(e, t) {
56801
56817
  let n = [];
56802
56818
  for (let r = 0; r < t.length; r++) {
56803
56819
  let i = t[r];
@@ -56824,8 +56840,8 @@ function kB(e, t) {
56824
56840
  }
56825
56841
  return n;
56826
56842
  }
56827
- var AB = ({ addToolApprovalResponse: e, chatId: t, message: n, vote: r, isLoading: i, renderMessagePart: s, setMessages: c, regenerate: l, isReadonly: u, requiresScrollPadding: d }) => {
56828
- let [f, p] = z("view"), m = n.parts?.some((e) => e.type === "text" && e.text?.trim()), h = n.parts?.some((e) => a(e.type)), g = n.parts.filter((e) => e.type === "file"), _ = kB(n.id, WR(n.parts)), v = CB(n.metadata?.createdAt);
56843
+ var jB = ({ addToolApprovalResponse: e, chatId: t, message: n, vote: r, isLoading: i, renderMessagePart: s, setMessages: c, regenerate: l, isReadonly: u, requiresScrollPadding: d }) => {
56844
+ let [f, p] = z("view"), m = n.parts?.some((e) => e.type === "text" && e.text?.trim()), h = n.parts?.some((e) => a(e.type)), g = n.parts.filter((e) => e.type === "file"), _ = AB(n.id, WR(n.parts)), v = CB(n.metadata?.createdAt);
56829
56845
  return st(), /* @__PURE__ */ V("div", {
56830
56846
  className: "group/message fade-in w-full animate-in duration-200",
56831
56847
  "data-role": n.role,
@@ -56944,9 +56960,9 @@ var AB = ({ addToolApprovalResponse: e, chatId: t, message: n, vote: r, isLoadin
56944
56960
  approval: a,
56945
56961
  state: r,
56946
56962
  type: "tool-getWeather"
56947
- }), /* @__PURE__ */ H(Dz, { children: [/* @__PURE__ */ V(kz, { input: t.input }), a?.reason && /* @__PURE__ */ V("div", {
56948
- className: "text-muted-foreground text-sm",
56949
- children: a.reason
56963
+ }), /* @__PURE__ */ H(Dz, { children: [/* @__PURE__ */ V(kz, { input: t.input }), /* @__PURE__ */ V(wB, {
56964
+ approval: a,
56965
+ className: "text-muted-foreground text-sm"
56950
56966
  })] })]
56951
56967
  })
56952
56968
  }, n) : /* @__PURE__ */ V("div", {
@@ -56960,20 +56976,20 @@ var AB = ({ addToolApprovalResponse: e, chatId: t, message: n, vote: r, isLoadin
56960
56976
  type: "tool-getWeather"
56961
56977
  }), /* @__PURE__ */ H(Dz, { children: [
56962
56978
  (r === "input-available" || r === "approval-requested") && /* @__PURE__ */ V(kz, { input: t.input }),
56963
- r === "approval-requested" && i && !a?.isAutomatic && /* @__PURE__ */ V(wB, {
56979
+ r === "approval-requested" && i && !a?.isAutomatic && /* @__PURE__ */ V(TB, {
56964
56980
  addToolApprovalResponse: e,
56965
56981
  approvalId: i,
56966
56982
  denyReason: "User denied weather lookup"
56967
56983
  }),
56968
- a?.reason && /* @__PURE__ */ V("div", {
56969
- className: "border-t pt-3 text-muted-foreground text-sm",
56970
- children: a.reason
56984
+ /* @__PURE__ */ V(wB, {
56985
+ approval: a,
56986
+ className: "border-t pt-3 text-muted-foreground text-sm"
56971
56987
  })
56972
56988
  ] })]
56973
56989
  })
56974
56990
  }, n);
56975
56991
  }
56976
- if (DB(d)) {
56992
+ if (OB(d)) {
56977
56993
  let n = t, { approval: i } = n, a = n.state, o = a === "output-denied" || a === "approval-responded" && i?.approved === !1;
56978
56994
  if (a === "approval-requested" || a === "approval-responded" || a === "output-denied") {
56979
56995
  let t = n.toolCallId ?? r;
@@ -56988,14 +57004,14 @@ var AB = ({ addToolApprovalResponse: e, chatId: t, message: n, vote: r, isLoadin
56988
57004
  type: d
56989
57005
  }), /* @__PURE__ */ H(Dz, { children: [
56990
57006
  n.input !== void 0 && /* @__PURE__ */ V(kz, { input: bB(n.input) }),
56991
- a === "approval-requested" && i && !i.isAutomatic && /* @__PURE__ */ V(wB, {
57007
+ a === "approval-requested" && i && !i.isAutomatic && /* @__PURE__ */ V(TB, {
56992
57008
  addToolApprovalResponse: e,
56993
57009
  approvalId: i.id,
56994
57010
  denyReason: "User denied tool call"
56995
57011
  }),
56996
- i?.reason && /* @__PURE__ */ V("div", {
56997
- className: "text-muted-foreground text-sm",
56998
- children: i.reason
57012
+ /* @__PURE__ */ V(wB, {
57013
+ approval: i,
57014
+ className: "text-muted-foreground text-sm"
56999
57015
  }),
57000
57016
  o && /* @__PURE__ */ V("div", {
57001
57017
  className: "text-muted-foreground text-sm",
@@ -57007,7 +57023,7 @@ var AB = ({ addToolApprovalResponse: e, chatId: t, message: n, vote: r, isLoadin
57007
57023
  }
57008
57024
  }
57009
57025
  if (d === "tool-createDocument") {
57010
- let { toolCallId: e } = t, n = t.output, r = OB(n) ? n : void 0;
57026
+ let { toolCallId: e } = t, n = t.output, r = kB(n) ? n : void 0;
57011
57027
  return xB(n) && "error" in n ? /* @__PURE__ */ H("div", {
57012
57028
  className: "rounded-lg border border-destructive/25 bg-destructive/10 p-4 text-destructive",
57013
57029
  children: ["Error creating document: ", String(n.error)]
@@ -57017,7 +57033,7 @@ var AB = ({ addToolApprovalResponse: e, chatId: t, message: n, vote: r, isLoadin
57017
57033
  }, e);
57018
57034
  }
57019
57035
  if (d === "tool-updateDocument") {
57020
- let { toolCallId: e } = t, n = t.output, r = OB(n) ? n : void 0;
57036
+ let { toolCallId: e } = t, n = t.output, r = kB(n) ? n : void 0;
57021
57037
  return xB(n) && "error" in n ? /* @__PURE__ */ H("div", {
57022
57038
  className: "rounded-lg border border-destructive/25 bg-destructive/10 p-4 text-destructive",
57023
57039
  children: ["Error updating document: ", String(n.error)]
@@ -57034,7 +57050,7 @@ var AB = ({ addToolApprovalResponse: e, chatId: t, message: n, vote: r, isLoadin
57034
57050
  }, e);
57035
57051
  }
57036
57052
  if (d === "tool-editDocument") {
57037
- let { toolCallId: e } = t, n = t.output, r = OB(n) ? n : void 0;
57053
+ let { toolCallId: e } = t, n = t.output, r = kB(n) ? n : void 0;
57038
57054
  return xB(n) && "error" in n ? /* @__PURE__ */ H("div", {
57039
57055
  className: "rounded-lg border border-destructive/25 bg-destructive/10 p-4 text-destructive",
57040
57056
  children: ["Error editing document: ", String(n.error)]
@@ -57090,14 +57106,14 @@ var AB = ({ addToolApprovalResponse: e, chatId: t, message: n, vote: r, isLoadin
57090
57106
  type: d
57091
57107
  }), /* @__PURE__ */ H(Dz, { children: [
57092
57108
  n.input !== void 0 && (n.state === "input-available" || n.state === "approval-requested" || n.state === "approval-responded" || n.state === "output-available" || n.state === "output-error" || n.state === "output-denied") && /* @__PURE__ */ V(kz, { input: bB(n.input) }),
57093
- n.state === "approval-requested" && o && !n.approval?.isAutomatic && /* @__PURE__ */ V(wB, {
57109
+ n.state === "approval-requested" && o && !n.approval?.isAutomatic && /* @__PURE__ */ V(TB, {
57094
57110
  addToolApprovalResponse: e,
57095
57111
  approvalId: o,
57096
57112
  denyReason: "User denied tool call"
57097
57113
  }),
57098
- n.approval?.reason && /* @__PURE__ */ V("div", {
57099
- className: "border-t pt-3 text-muted-foreground text-sm",
57100
- children: n.approval.reason
57114
+ /* @__PURE__ */ V(wB, {
57115
+ approval: n.approval,
57116
+ className: "border-t pt-3 text-muted-foreground text-sm"
57101
57117
  }),
57102
57118
  l && /* @__PURE__ */ V("div", {
57103
57119
  className: "border-t px-4 py-3 text-muted-foreground text-sm",
@@ -57135,7 +57151,7 @@ var AB = ({ addToolApprovalResponse: e, chatId: t, message: n, vote: r, isLoadin
57135
57151
  })
57136
57152
  });
57137
57153
  };
57138
- function jB() {
57154
+ function MB() {
57139
57155
  let { waitingStatus: e } = st();
57140
57156
  return /* @__PURE__ */ V("div", {
57141
57157
  className: "flex min-w-0 items-center gap-1 p-0 text-muted-foreground text-sm",
@@ -57145,7 +57161,7 @@ function jB() {
57145
57161
  })
57146
57162
  });
57147
57163
  }
57148
- var MB = () => /* @__PURE__ */ V("div", {
57164
+ var NB = () => /* @__PURE__ */ V("div", {
57149
57165
  className: "group/message fade-in w-full animate-in duration-300",
57150
57166
  "data-role": "assistant",
57151
57167
  "data-testid": "message-assistant-loading",
@@ -57159,19 +57175,19 @@ var MB = () => /* @__PURE__ */ V("div", {
57159
57175
  })
57160
57176
  }), /* @__PURE__ */ V("div", {
57161
57177
  className: "min-w-0 flex-1",
57162
- children: /* @__PURE__ */ V(jB, {})
57178
+ children: /* @__PURE__ */ V(MB, {})
57163
57179
  })]
57164
57180
  })
57165
57181
  });
57166
57182
  //#endregion
57167
57183
  //#region src/components/artifact-messages.tsx
57168
- function NB({ addToolApprovalResponse: e, chatId: t, status: n, votes: r, messages: i, renderMessagePart: a, setMessages: o, regenerate: s, isReadonly: c }) {
57184
+ function PB({ addToolApprovalResponse: e, chatId: t, status: n, votes: r, messages: i, renderMessagePart: a, setMessages: o, regenerate: s, isReadonly: c }) {
57169
57185
  let { containerRef: l, endRef: u, onViewportEnter: d, onViewportLeave: f, hasSentMessage: p } = VR({ status: n });
57170
57186
  return /* @__PURE__ */ H("div", {
57171
57187
  className: "flex h-full flex-col items-center gap-4 overflow-y-scroll px-4 pt-20",
57172
57188
  ref: l,
57173
57189
  children: [
57174
- i.map((l, u) => /* @__PURE__ */ V(AB, {
57190
+ i.map((l, u) => /* @__PURE__ */ V(jB, {
57175
57191
  addToolApprovalResponse: e,
57176
57192
  chatId: t,
57177
57193
  isLoading: n === "streaming" && u === i.length - 1,
@@ -57185,7 +57201,7 @@ function NB({ addToolApprovalResponse: e, chatId: t, status: n, votes: r, messag
57185
57201
  }, l.id)),
57186
57202
  /* @__PURE__ */ V(_M, {
57187
57203
  mode: "wait",
57188
- children: n === "submitted" && !i.some((e) => e.parts?.some((e) => "state" in e && e.state === "approval-responded")) && /* @__PURE__ */ V(MB, {}, "thinking")
57204
+ children: n === "submitted" && !i.some((e) => e.parts?.some((e) => "state" in e && e.state === "approval-responded")) && /* @__PURE__ */ V(NB, {}, "thinking")
57189
57205
  }),
57190
57206
  /* @__PURE__ */ V(uP.div, {
57191
57207
  className: "min-h-[24px] min-w-[24px] shrink-0",
@@ -57196,10 +57212,10 @@ function NB({ addToolApprovalResponse: e, chatId: t, status: n, votes: r, messag
57196
57212
  ]
57197
57213
  });
57198
57214
  }
57199
- function PB(e, t) {
57215
+ function FB(e, t) {
57200
57216
  return e.artifactStatus === "streaming" && t.artifactStatus === "streaming" ? !0 : !(e.status !== t.status || e.status && t.status || e.messages.length !== t.messages.length || !ye(e.votes, t.votes) || e.renderMessagePart !== t.renderMessagePart);
57201
57217
  }
57202
- var FB = O(NB, PB), IB = jh, LB = Yp, RB = y.forwardRef(({ className: e, ...t }, n) => {
57218
+ var IB = O(PB, FB), LB = jh, RB = Yp, zB = y.forwardRef(({ className: e, ...t }, n) => {
57203
57219
  let { resolvedTheme: r, theme: i } = Hm();
57204
57220
  return /* @__PURE__ */ V(bp, {
57205
57221
  ref: n,
@@ -57209,24 +57225,24 @@ var FB = O(NB, PB), IB = jh, LB = Yp, RB = y.forwardRef(({ className: e, ...t },
57209
57225
  ...t
57210
57226
  });
57211
57227
  });
57212
- RB.displayName = "DialogOverlay";
57213
- var zB = y.forwardRef(({ asChild: e = !1, children: t, ...n }, r) => /* @__PURE__ */ V(tm, {
57228
+ zB.displayName = "DialogOverlay";
57229
+ var BB = y.forwardRef(({ asChild: e = !1, children: t, ...n }, r) => /* @__PURE__ */ V(tm, {
57214
57230
  ref: r,
57215
57231
  render: um(e, t),
57216
57232
  ...n,
57217
57233
  children: t
57218
57234
  }));
57219
- zB.displayName = "DialogTrigger";
57220
- var BB = y.forwardRef(({ asChild: e = !1, children: t, ...n }, r) => /* @__PURE__ */ V(kp, {
57235
+ BB.displayName = "DialogTrigger";
57236
+ var VB = y.forwardRef(({ asChild: e = !1, children: t, ...n }, r) => /* @__PURE__ */ V(kp, {
57221
57237
  ref: r,
57222
57238
  render: um(e, t),
57223
57239
  ...n,
57224
57240
  children: t
57225
57241
  }));
57226
- BB.displayName = "DialogClose";
57227
- var VB = y.forwardRef(({ className: e, children: t, ...n }, r) => {
57242
+ VB.displayName = "DialogClose";
57243
+ var HB = y.forwardRef(({ className: e, children: t, ...n }, r) => {
57228
57244
  let { resolvedTheme: i, theme: a } = Hm();
57229
- return /* @__PURE__ */ H(LB, { children: [/* @__PURE__ */ V(RB, {}), /* @__PURE__ */ H(Kp, {
57245
+ return /* @__PURE__ */ H(RB, { children: [/* @__PURE__ */ V(zB, {}), /* @__PURE__ */ H(Kp, {
57230
57246
  ref: r,
57231
57247
  className: U("agents-sdk fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 opacity-0 shadow-lg transition-opacity duration-200 data-open:opacity-100 data-closed:opacity-0 data-[ending-style]:opacity-0 data-[starting-style]:opacity-0 sm:rounded-lg", e),
57232
57248
  "data-agents-sdk-resolved-theme": i,
@@ -57241,48 +57257,48 @@ var VB = y.forwardRef(({ className: e, children: t, ...n }, r) => {
57241
57257
  })]
57242
57258
  })] });
57243
57259
  });
57244
- VB.displayName = "DialogContent";
57245
- var HB = ({ className: e, ...t }) => /* @__PURE__ */ V("div", {
57260
+ HB.displayName = "DialogContent";
57261
+ var UB = ({ className: e, ...t }) => /* @__PURE__ */ V("div", {
57246
57262
  className: U("flex flex-col space-y-1.5 text-center sm:text-left", e),
57247
57263
  ...t
57248
57264
  });
57249
- HB.displayName = "DialogHeader";
57250
- var UB = ({ className: e, ...t }) => /* @__PURE__ */ V("div", {
57265
+ UB.displayName = "DialogHeader";
57266
+ var WB = ({ className: e, ...t }) => /* @__PURE__ */ V("div", {
57251
57267
  className: U("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2", e),
57252
57268
  ...t
57253
57269
  });
57254
- UB.displayName = "DialogFooter";
57255
- var WB = y.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ V(Xp, {
57270
+ WB.displayName = "DialogFooter";
57271
+ var GB = y.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ V(Xp, {
57256
57272
  ref: n,
57257
57273
  className: U("text-lg font-semibold leading-none tracking-tight", e),
57258
57274
  ...t
57259
57275
  }));
57260
- WB.displayName = "DialogTitle";
57261
- var GB = y.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ V(jp, {
57276
+ GB.displayName = "DialogTitle";
57277
+ var KB = y.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ V(jp, {
57262
57278
  ref: n,
57263
57279
  className: U("text-sm text-muted-foreground", e),
57264
57280
  ...t
57265
57281
  }));
57266
- GB.displayName = "DialogDescription";
57282
+ KB.displayName = "DialogDescription";
57267
57283
  //#endregion
57268
57284
  //#region src/components/ui/command.tsx
57269
- var KB = y.createContext(null), qB = (e) => e.trim().toLocaleLowerCase(), JB = (e) => {
57285
+ var qB = y.createContext(null), JB = (e) => e.trim().toLocaleLowerCase(), YB = (e) => {
57270
57286
  if (typeof e == "string" || typeof e == "number") return String(e);
57271
- if (Array.isArray(e)) return e.map(JB).join(" ");
57287
+ if (Array.isArray(e)) return e.map(YB).join(" ");
57272
57288
  if (y.isValidElement(e)) {
57273
57289
  let t = e.props;
57274
- return `${typeof t.alt == "string" ? t.alt : ""} ${JB(t.children)}`.trim();
57290
+ return `${typeof t.alt == "string" ? t.alt : ""} ${YB(t.children)}`.trim();
57275
57291
  }
57276
57292
  return "";
57277
- }, YB = (e, t) => {
57278
- let n = qB(e);
57279
- return n ? qB(`${t.value} ${t.searchValue}`).includes(n) : !0;
57280
- }, XB = () => {
57281
- let e = y.useContext(KB);
57293
+ }, XB = (e, t) => {
57294
+ let n = JB(e);
57295
+ return n ? JB(`${t.value} ${t.searchValue}`).includes(n) : !0;
57296
+ }, ZB = () => {
57297
+ let e = y.useContext(qB);
57282
57298
  if (!e) throw Error("Command components must be rendered inside <Command>.");
57283
57299
  return e;
57284
- }, ZB = y.forwardRef(({ className: e, defaultValue: t, loop: n = !0, onKeyDown: r, onValueChange: i, value: a, ...o }, s) => {
57285
- let [c, l] = y.useState(""), [u, d] = y.useState(() => /* @__PURE__ */ new Map()), [f, p] = y.useState(null), m = y.useRef(!1), h = y.useMemo(() => Array.from(u.values()).filter((e) => YB(c, e)), [u, c]);
57300
+ }, QB = y.forwardRef(({ className: e, defaultValue: t, loop: n = !0, onKeyDown: r, onValueChange: i, value: a, ...o }, s) => {
57301
+ let [c, l] = y.useState(""), [u, d] = y.useState(() => /* @__PURE__ */ new Map()), [f, p] = y.useState(null), m = y.useRef(!1), h = y.useMemo(() => Array.from(u.values()).filter((e) => XB(c, e)), [u, c]);
57286
57302
  y.useEffect(() => {
57287
57303
  if (a) {
57288
57304
  let e = Array.from(u.values()).find((e) => e.value === a);
@@ -57293,7 +57309,7 @@ var KB = y.createContext(null), qB = (e) => e.trim().toLocaleLowerCase(), JB = (
57293
57309
  }
57294
57310
  if (!m.current && t) {
57295
57311
  let e = Array.from(u.values()).find((e) => e.value === t);
57296
- if (e && YB(c, e)) {
57312
+ if (e && XB(c, e)) {
57297
57313
  m.current = !0, e.id !== f && p(e.id);
57298
57314
  return;
57299
57315
  }
@@ -57326,7 +57342,7 @@ var KB = y.createContext(null), qB = (e) => e.trim().toLocaleLowerCase(), JB = (
57326
57342
  });
57327
57343
  }, []), v = y.useCallback((e) => {
57328
57344
  let t = u.get(e);
57329
- !t || t.disabled || !YB(c, t) || (i?.(t.value), t.select());
57345
+ !t || t.disabled || !XB(c, t) || (i?.(t.value), t.select());
57330
57346
  }, [
57331
57347
  u,
57332
57348
  i,
@@ -57371,7 +57387,7 @@ var KB = y.createContext(null), qB = (e) => e.trim().toLocaleLowerCase(), JB = (
57371
57387
  e.key === "Enter" && (e.preventDefault(), x());
57372
57388
  }
57373
57389
  };
57374
- return /* @__PURE__ */ V(KB.Provider, {
57390
+ return /* @__PURE__ */ V(qB.Provider, {
57375
57391
  value: {
57376
57392
  activeId: f,
57377
57393
  registerItem: g,
@@ -57393,9 +57409,9 @@ var KB = y.createContext(null), qB = (e) => e.trim().toLocaleLowerCase(), JB = (
57393
57409
  })
57394
57410
  });
57395
57411
  });
57396
- ZB.displayName = "Command";
57397
- var QB = y.forwardRef(({ className: e, onChange: t, value: n, ...r }, i) => {
57398
- let a = XB();
57412
+ QB.displayName = "Command";
57413
+ var $B = y.forwardRef(({ className: e, onChange: t, value: n, ...r }, i) => {
57414
+ let a = ZB();
57399
57415
  return /* @__PURE__ */ H("div", {
57400
57416
  className: "flex items-center border-b px-3",
57401
57417
  "data-slot": "command-input-wrapper",
@@ -57411,17 +57427,17 @@ var QB = y.forwardRef(({ className: e, onChange: t, value: n, ...r }, i) => {
57411
57427
  })]
57412
57428
  });
57413
57429
  });
57414
- QB.displayName = "CommandInput";
57415
- var $B = y.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ V("div", {
57430
+ $B.displayName = "CommandInput";
57431
+ var eV = y.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ V("div", {
57416
57432
  ref: n,
57417
57433
  className: U("max-h-[300px] overflow-y-auto overflow-x-hidden", e),
57418
57434
  "data-command-list": "",
57419
57435
  role: "listbox",
57420
57436
  ...t
57421
57437
  }));
57422
- $B.displayName = "CommandList";
57423
- var eV = y.forwardRef(({ className: e, ...t }, n) => {
57424
- let r = XB();
57438
+ eV.displayName = "CommandList";
57439
+ var tV = y.forwardRef(({ className: e, ...t }, n) => {
57440
+ let r = ZB();
57425
57441
  return !r.search.trim() || r.visibleCount > 0 ? null : /* @__PURE__ */ V("div", {
57426
57442
  ref: n,
57427
57443
  className: U("py-6 text-center text-sm", e),
@@ -57429,8 +57445,8 @@ var eV = y.forwardRef(({ className: e, ...t }, n) => {
57429
57445
  ...t
57430
57446
  });
57431
57447
  });
57432
- eV.displayName = "CommandEmpty";
57433
- var tV = y.forwardRef(({ className: e, heading: t, children: n, ...r }, i) => /* @__PURE__ */ H("div", {
57448
+ tV.displayName = "CommandEmpty";
57449
+ var nV = y.forwardRef(({ className: e, heading: t, children: n, ...r }, i) => /* @__PURE__ */ H("div", {
57434
57450
  ref: i,
57435
57451
  "aria-label": typeof t == "string" ? t : void 0,
57436
57452
  className: U("overflow-hidden p-1 text-foreground [&_[data-command-group-heading]]:px-2 [&_[data-command-group-heading]]:py-1.5 [&_[data-command-group-heading]]:text-xs [&_[data-command-group-heading]]:font-medium [&_[data-command-group-heading]]:text-muted-foreground", e),
@@ -57442,17 +57458,17 @@ var tV = y.forwardRef(({ className: e, heading: t, children: n, ...r }, i) => /*
57442
57458
  children: t
57443
57459
  }), n]
57444
57460
  }));
57445
- tV.displayName = "CommandGroup";
57446
- var nV = y.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ V("div", {
57461
+ nV.displayName = "CommandGroup";
57462
+ var rV = y.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ V("div", {
57447
57463
  ref: n,
57448
57464
  className: U("-mx-1 h-px bg-border", e),
57449
57465
  "data-command-separator": "",
57450
57466
  role: "separator",
57451
57467
  ...t
57452
57468
  }));
57453
- nV.displayName = "CommandSeparator";
57454
- var rV = y.forwardRef(({ children: e, className: t, disabled: n = !1, keywords: r = [], onClick: i, onMouseMove: a, onSelect: o, value: s, ...c }, l) => {
57455
- let { activeId: u, registerItem: d, search: f, selectItem: p, setActiveId: m, unregisterItem: h } = XB(), g = y.useId(), _ = JB(e), v = s ?? _, b = `${_} ${r.join(" ")}`.trim(), x = y.useRef(() => {});
57469
+ rV.displayName = "CommandSeparator";
57470
+ var iV = y.forwardRef(({ children: e, className: t, disabled: n = !1, keywords: r = [], onClick: i, onMouseMove: a, onSelect: o, value: s, ...c }, l) => {
57471
+ let { activeId: u, registerItem: d, search: f, selectItem: p, setActiveId: m, unregisterItem: h } = ZB(), g = y.useId(), _ = YB(e), v = s ?? _, b = `${_} ${r.join(" ")}`.trim(), x = y.useRef(() => {});
57456
57472
  x.current = () => o?.(v);
57457
57473
  let S = y.useCallback(() => {
57458
57474
  x.current();
@@ -57462,7 +57478,7 @@ var rV = y.forwardRef(({ children: e, className: t, disabled: n = !1, keywords:
57462
57478
  searchValue: b,
57463
57479
  select: S,
57464
57480
  value: v
57465
- }, w = YB(f, C), T = u === g;
57481
+ }, w = XB(f, C), T = u === g;
57466
57482
  return y.useEffect(() => (d(C), () => h(g)), [
57467
57483
  n,
57468
57484
  g,
@@ -57492,109 +57508,109 @@ var rV = y.forwardRef(({ children: e, className: t, disabled: n = !1, keywords:
57492
57508
  children: e
57493
57509
  });
57494
57510
  });
57495
- rV.displayName = "CommandItem";
57496
- var iV = ({ className: e, ...t }) => /* @__PURE__ */ V("span", {
57511
+ iV.displayName = "CommandItem";
57512
+ var aV = ({ className: e, ...t }) => /* @__PURE__ */ V("span", {
57497
57513
  className: U("ml-auto text-xs tracking-widest text-muted-foreground", e),
57498
57514
  ...t
57499
57515
  });
57500
- iV.displayName = "CommandShortcut";
57516
+ aV.displayName = "CommandShortcut";
57501
57517
  //#endregion
57502
57518
  //#region src/components/ai-elements/model-selector.tsx
57503
- var aV = (e) => /* @__PURE__ */ V(IB, { ...e }), oV = (e) => /* @__PURE__ */ V(zB, { ...e }), sV = ({ className: e, commandDefaultValue: t, children: n, title: r = "Model Selector", ...i }) => /* @__PURE__ */ H(VB, {
57519
+ var oV = (e) => /* @__PURE__ */ V(LB, { ...e }), sV = (e) => /* @__PURE__ */ V(BB, { ...e }), cV = ({ className: e, commandDefaultValue: t, children: n, title: r = "Model Selector", ...i }) => /* @__PURE__ */ H(HB, {
57504
57520
  className: U("p-0", e),
57505
57521
  ...i,
57506
- children: [/* @__PURE__ */ V(WB, {
57522
+ children: [/* @__PURE__ */ V(GB, {
57507
57523
  className: "sr-only",
57508
57524
  children: r
57509
- }), /* @__PURE__ */ V(ZB, {
57525
+ }), /* @__PURE__ */ V(QB, {
57510
57526
  className: "**:data-[slot=command-input-wrapper]:h-auto",
57511
57527
  defaultValue: t,
57512
57528
  children: n
57513
57529
  })]
57514
- }), cV = ({ className: e, ...t }) => /* @__PURE__ */ V(QB, {
57530
+ }), lV = ({ className: e, ...t }) => /* @__PURE__ */ V($B, {
57515
57531
  className: U("h-auto py-3.5", e),
57516
57532
  ...t
57517
- }), lV = (e) => /* @__PURE__ */ V($B, { ...e }), uV = (e) => /* @__PURE__ */ V(tV, { ...e }), dV = (e) => /* @__PURE__ */ V(rV, { ...e }), fV = ({ provider: e, className: t }) => /* @__PURE__ */ V("img", {
57533
+ }), uV = (e) => /* @__PURE__ */ V(eV, { ...e }), dV = (e) => /* @__PURE__ */ V(nV, { ...e }), fV = (e) => /* @__PURE__ */ V(iV, { ...e }), pV = ({ provider: e, className: t }) => /* @__PURE__ */ V("img", {
57518
57534
  alt: `${e} logo`,
57519
57535
  className: U("size-3 dark:invert", t),
57520
57536
  height: 12,
57521
57537
  src: `https://models.dev/logos/${e}.svg`,
57522
57538
  width: 12
57523
- }), pV = ({ className: e, ...t }) => /* @__PURE__ */ V("span", {
57539
+ }), mV = ({ className: e, ...t }) => /* @__PURE__ */ V("span", {
57524
57540
  className: U("flex-1 truncate text-left", e),
57525
57541
  ...t
57526
- }), mV = /* @__PURE__ */ y.createContext(void 0);
57527
- process.env.NODE_ENV !== "production" && (mV.displayName = "ScrollAreaRootContext");
57528
- function hV() {
57529
- let e = y.useContext(mV);
57542
+ }), hV = /* @__PURE__ */ y.createContext(void 0);
57543
+ process.env.NODE_ENV !== "production" && (hV.displayName = "ScrollAreaRootContext");
57544
+ function gV() {
57545
+ let e = y.useContext(hV);
57530
57546
  if (e === void 0) throw Error(process.env.NODE_ENV === "production" ? pc(53) : "Base UI: ScrollAreaRootContext is missing. ScrollArea parts must be placed within <ScrollArea.Root>.");
57531
57547
  return e;
57532
57548
  }
57533
57549
  //#endregion
57534
57550
  //#region ../../node_modules/@base-ui/react/scroll-area/root/ScrollAreaRootCssVars.mjs
57535
- var gV = /* @__PURE__ */ function(e) {
57551
+ var _V = /* @__PURE__ */ function(e) {
57536
57552
  return e.scrollAreaCornerHeight = "--scroll-area-corner-height", e.scrollAreaCornerWidth = "--scroll-area-corner-width", e;
57537
57553
  }({});
57538
57554
  //#endregion
57539
57555
  //#region ../../node_modules/@base-ui/react/scroll-area/utils/getOffset.mjs
57540
- function _V(e, t, n) {
57556
+ function vV(e, t, n) {
57541
57557
  if (!e) return 0;
57542
57558
  let r = getComputedStyle(e), i = n === "x" ? "Inline" : "Block";
57543
57559
  return n === "x" && t === "margin" ? parseFloat(r[`${t}InlineStart`]) * 2 : parseFloat(r[`${t}${i}Start`]) + parseFloat(r[`${t}${i}End`]);
57544
57560
  }
57545
57561
  //#endregion
57546
57562
  //#region ../../node_modules/@base-ui/react/scroll-area/scrollbar/ScrollAreaScrollbarDataAttributes.mjs
57547
- var vV = /* @__PURE__ */ function(e) {
57563
+ var yV = /* @__PURE__ */ function(e) {
57548
57564
  return e.orientation = "data-orientation", e.hovering = "data-hovering", e.scrolling = "data-scrolling", e.hasOverflowX = "data-has-overflow-x", e.hasOverflowY = "data-has-overflow-y", e.overflowXStart = "data-overflow-x-start", e.overflowXEnd = "data-overflow-x-end", e.overflowYStart = "data-overflow-y-start", e.overflowYEnd = "data-overflow-y-end", e;
57549
- }({}), yV = "base-ui-disable-scrollbar", bV = {
57550
- className: yV,
57565
+ }({}), bV = "base-ui-disable-scrollbar", xV = {
57566
+ className: bV,
57551
57567
  getElement(e) {
57552
57568
  return /* @__PURE__ */ V("style", {
57553
57569
  nonce: e,
57554
- href: yV,
57570
+ href: bV,
57555
57571
  precedence: "base-ui:low",
57556
- children: `.${yV}{scrollbar-width:none}.${yV}::-webkit-scrollbar{display:none}`
57572
+ children: `.${bV}{scrollbar-width:none}.${bV}::-webkit-scrollbar{display:none}`
57557
57573
  });
57558
57574
  }
57559
57575
  };
57560
- process.env.NODE_ENV !== "production" && (bV.getElement.displayName = "styleDisableScrollbar.getElement");
57576
+ process.env.NODE_ENV !== "production" && (xV.getElement.displayName = "styleDisableScrollbar.getElement");
57561
57577
  //#endregion
57562
57578
  //#region ../../node_modules/@base-ui/react/scroll-area/root/ScrollAreaRootDataAttributes.mjs
57563
- var xV = /* @__PURE__ */ function(e) {
57579
+ var SV = /* @__PURE__ */ function(e) {
57564
57580
  return e.scrolling = "data-scrolling", e.hasOverflowX = "data-has-overflow-x", e.hasOverflowY = "data-has-overflow-y", e.overflowXStart = "data-overflow-x-start", e.overflowXEnd = "data-overflow-x-end", e.overflowYStart = "data-overflow-y-start", e.overflowYEnd = "data-overflow-y-end", e;
57565
- }({}), SV = {
57566
- hasOverflowX: (e) => e ? { [xV.hasOverflowX]: "" } : null,
57567
- hasOverflowY: (e) => e ? { [xV.hasOverflowY]: "" } : null,
57568
- overflowXStart: (e) => e ? { [xV.overflowXStart]: "" } : null,
57569
- overflowXEnd: (e) => e ? { [xV.overflowXEnd]: "" } : null,
57570
- overflowYStart: (e) => e ? { [xV.overflowYStart]: "" } : null,
57571
- overflowYEnd: (e) => e ? { [xV.overflowYEnd]: "" } : null,
57581
+ }({}), CV = {
57582
+ hasOverflowX: (e) => e ? { [SV.hasOverflowX]: "" } : null,
57583
+ hasOverflowY: (e) => e ? { [SV.hasOverflowY]: "" } : null,
57584
+ overflowXStart: (e) => e ? { [SV.overflowXStart]: "" } : null,
57585
+ overflowXEnd: (e) => e ? { [SV.overflowXEnd]: "" } : null,
57586
+ overflowYStart: (e) => e ? { [SV.overflowYStart]: "" } : null,
57587
+ overflowYEnd: (e) => e ? { [SV.overflowYEnd]: "" } : null,
57572
57588
  cornerHidden: () => null
57573
- }, CV = /* @__PURE__ */ y.createContext(void 0);
57574
- process.env.NODE_ENV !== "production" && (CV.displayName = "CSPContext");
57575
- var wV = { disableStyleElements: !1 };
57576
- function TV() {
57577
- return y.useContext(CV) ?? wV;
57589
+ }, wV = /* @__PURE__ */ y.createContext(void 0);
57590
+ process.env.NODE_ENV !== "production" && (wV.displayName = "CSPContext");
57591
+ var TV = { disableStyleElements: !1 };
57592
+ function EV() {
57593
+ return y.useContext(wV) ?? TV;
57578
57594
  }
57579
57595
  //#endregion
57580
57596
  //#region ../../node_modules/@base-ui/react/scroll-area/root/ScrollAreaRoot.mjs
57581
- var EV = {
57597
+ var DV = {
57582
57598
  x: 0,
57583
57599
  y: 0
57584
- }, DV = {
57600
+ }, OV = {
57585
57601
  width: 0,
57586
57602
  height: 0
57587
- }, OV = {
57603
+ }, kV = {
57588
57604
  xStart: !1,
57589
57605
  xEnd: !1,
57590
57606
  yStart: !1,
57591
57607
  yEnd: !1
57592
- }, kV = {
57608
+ }, AV = {
57593
57609
  x: !0,
57594
57610
  y: !0,
57595
57611
  corner: !0
57596
- }, AV = /* @__PURE__ */ y.forwardRef(function(e, t) {
57597
- let { render: n, className: r, overflowEdgeThreshold: i, style: a, ...o } = e, { xStart: s, xEnd: c, yStart: l, yEnd: u } = jV(i), d = Ap(), f = la(), p = la(), { nonce: m, disableStyleElements: h } = TV(), [g, _] = y.useState(!1), [v, b] = y.useState(!1), [x, S] = y.useState(!1), [C, w] = y.useState(!1), [T, E] = y.useState(!1), [D, O] = y.useState(DV), [k, A] = y.useState(DV), [j, M] = y.useState(OV), [N, P] = y.useState(kV), F = y.useRef(null), I = y.useRef(null), L = y.useRef(null), R = y.useRef(null), z = y.useRef(null), ee = y.useRef(null), te = y.useRef(null), ne = y.useRef(!1), re = y.useRef(0), ie = y.useRef(0), B = y.useRef(0), ae = y.useRef(0), oe = y.useRef("vertical"), se = y.useRef(EV), ce = J((e) => {
57612
+ }, jV = /* @__PURE__ */ y.forwardRef(function(e, t) {
57613
+ let { render: n, className: r, overflowEdgeThreshold: i, style: a, ...o } = e, { xStart: s, xEnd: c, yStart: l, yEnd: u } = MV(i), d = Ap(), f = la(), p = la(), { nonce: m, disableStyleElements: h } = EV(), [g, _] = y.useState(!1), [v, b] = y.useState(!1), [x, S] = y.useState(!1), [C, w] = y.useState(!1), [T, E] = y.useState(!1), [D, O] = y.useState(OV), [k, A] = y.useState(OV), [j, M] = y.useState(kV), [N, P] = y.useState(AV), F = y.useRef(null), I = y.useRef(null), L = y.useRef(null), R = y.useRef(null), z = y.useRef(null), ee = y.useRef(null), te = y.useRef(null), ne = y.useRef(!1), re = y.useRef(0), ie = y.useRef(0), B = y.useRef(0), ae = y.useRef(0), oe = y.useRef("vertical"), se = y.useRef(DV), ce = J((e) => {
57598
57614
  let t = e.x - se.current.x, n = e.y - se.current.y;
57599
57615
  se.current = e, n !== 0 && (S(!0), f.start(500, () => {
57600
57616
  S(!1);
@@ -57602,20 +57618,20 @@ var EV = {
57602
57618
  b(!1);
57603
57619
  }));
57604
57620
  }), V = J((e) => {
57605
- e.button === 0 && (ne.current = !0, re.current = e.clientY, ie.current = e.clientX, oe.current = e.currentTarget.getAttribute(vV.orientation), I.current && (B.current = I.current.scrollTop, ae.current = I.current.scrollLeft), z.current && oe.current === "vertical" && z.current.setPointerCapture(e.pointerId), ee.current && oe.current === "horizontal" && ee.current.setPointerCapture(e.pointerId));
57621
+ e.button === 0 && (ne.current = !0, re.current = e.clientY, ie.current = e.clientX, oe.current = e.currentTarget.getAttribute(yV.orientation), I.current && (B.current = I.current.scrollTop, ae.current = I.current.scrollLeft), z.current && oe.current === "vertical" && z.current.setPointerCapture(e.pointerId), ee.current && oe.current === "horizontal" && ee.current.setPointerCapture(e.pointerId));
57606
57622
  }), le = J((e) => {
57607
57623
  if (!ne.current) return;
57608
57624
  let t = e.clientY - re.current, n = e.clientX - ie.current;
57609
57625
  if (I.current) {
57610
57626
  let r = I.current.scrollHeight, i = I.current.clientHeight, a = I.current.scrollWidth, o = I.current.clientWidth;
57611
57627
  if (z.current && L.current && oe.current === "vertical") {
57612
- let n = _V(L.current, "padding", "y"), a = _V(z.current, "margin", "y"), o = z.current.offsetHeight, s = t / (L.current.offsetHeight - o - n - a);
57628
+ let n = vV(L.current, "padding", "y"), a = vV(z.current, "margin", "y"), o = z.current.offsetHeight, s = t / (L.current.offsetHeight - o - n - a);
57613
57629
  I.current.scrollTop = B.current + s * (r - i), e.preventDefault(), S(!0), f.start(500, () => {
57614
57630
  S(!1);
57615
57631
  });
57616
57632
  }
57617
57633
  if (ee.current && R.current && oe.current === "horizontal") {
57618
- let t = _V(R.current, "padding", "x"), r = _V(ee.current, "margin", "x"), i = ee.current.offsetWidth, s = n / (R.current.offsetWidth - i - t - r);
57634
+ let t = vV(R.current, "padding", "x"), r = vV(ee.current, "margin", "x"), i = ee.current.offsetWidth, s = n / (R.current.offsetWidth - i - t - r);
57619
57635
  I.current.scrollLeft = ae.current + s * (a - o), e.preventDefault(), b(!0), p.start(500, () => {
57620
57636
  b(!1);
57621
57637
  });
@@ -57656,14 +57672,14 @@ var EV = {
57656
57672
  },
57657
57673
  style: {
57658
57674
  position: "relative",
57659
- [gV.scrollAreaCornerHeight]: `${D.height}px`,
57660
- [gV.scrollAreaCornerWidth]: `${D.width}px`
57675
+ [_V.scrollAreaCornerHeight]: `${D.height}px`,
57676
+ [_V.scrollAreaCornerWidth]: `${D.width}px`
57661
57677
  }
57662
57678
  }, me = Rc("div", e, {
57663
57679
  state: fe,
57664
57680
  ref: [t, F],
57665
57681
  props: [pe, o],
57666
- stateAttributesMapping: SV
57682
+ stateAttributesMapping: CV
57667
57683
  }), he = y.useMemo(() => ({
57668
57684
  handlePointerDown: V,
57669
57685
  handlePointerMove: le,
@@ -57725,13 +57741,13 @@ var EV = {
57725
57741
  l,
57726
57742
  u
57727
57743
  ]);
57728
- return /* @__PURE__ */ H(mV.Provider, {
57744
+ return /* @__PURE__ */ H(hV.Provider, {
57729
57745
  value: he,
57730
- children: [!h && bV.getElement(m), me]
57746
+ children: [!h && xV.getElement(m), me]
57731
57747
  });
57732
57748
  });
57733
- process.env.NODE_ENV !== "production" && (AV.displayName = "ScrollAreaRoot");
57734
- function jV(e) {
57749
+ process.env.NODE_ENV !== "production" && (jV.displayName = "ScrollAreaRoot");
57750
+ function MV(e) {
57735
57751
  if (typeof e == "number") {
57736
57752
  let t = Math.max(0, e);
57737
57753
  return {
@@ -57750,40 +57766,40 @@ function jV(e) {
57750
57766
  }
57751
57767
  //#endregion
57752
57768
  //#region ../../node_modules/@base-ui/react/scroll-area/viewport/ScrollAreaViewportContext.mjs
57753
- var MV = /* @__PURE__ */ y.createContext(void 0);
57754
- process.env.NODE_ENV !== "production" && (MV.displayName = "ScrollAreaViewportContext");
57755
- function NV() {
57756
- let e = y.useContext(MV);
57769
+ var NV = /* @__PURE__ */ y.createContext(void 0);
57770
+ process.env.NODE_ENV !== "production" && (NV.displayName = "ScrollAreaViewportContext");
57771
+ function PV() {
57772
+ let e = y.useContext(NV);
57757
57773
  if (e === void 0) throw Error(process.env.NODE_ENV === "production" ? pc(55) : "Base UI: ScrollAreaViewportContext missing. ScrollAreaViewport parts must be placed within <ScrollArea.Viewport>.");
57758
57774
  return e;
57759
57775
  }
57760
57776
  //#endregion
57761
57777
  //#region ../../node_modules/@base-ui/react/internals/clamp.mjs
57762
- function PV(e, t = -(2 ** 53 - 1), n = 2 ** 53 - 1) {
57778
+ function FV(e, t = -(2 ** 53 - 1), n = 2 ** 53 - 1) {
57763
57779
  return Math.max(t, Math.min(e, n));
57764
57780
  }
57765
57781
  //#endregion
57766
57782
  //#region ../../node_modules/@base-ui/react/scroll-area/viewport/ScrollAreaViewportCssVars.mjs
57767
- var FV = /* @__PURE__ */ function(e) {
57783
+ var IV = /* @__PURE__ */ function(e) {
57768
57784
  return e.scrollAreaOverflowXStart = "--scroll-area-overflow-x-start", e.scrollAreaOverflowXEnd = "--scroll-area-overflow-x-end", e.scrollAreaOverflowYStart = "--scroll-area-overflow-y-start", e.scrollAreaOverflowYEnd = "--scroll-area-overflow-y-end", e;
57769
57785
  }({});
57770
- function IV(e, t) {
57786
+ function LV(e, t) {
57771
57787
  return Math.max(0, e - t);
57772
57788
  }
57773
- function LV(e, t) {
57789
+ function RV(e, t) {
57774
57790
  if (t <= 0) return 0;
57775
- let n = PV(e, 0, t), r = n, i = t - n, a = r <= 1, o = i <= 1;
57791
+ let n = FV(e, 0, t), r = n, i = t - n, a = r <= 1, o = i <= 1;
57776
57792
  return a && o ? r <= i ? 0 : t : a ? 0 : o ? t : n;
57777
57793
  }
57778
57794
  //#endregion
57779
57795
  //#region ../../node_modules/@base-ui/react/scroll-area/viewport/ScrollAreaViewport.mjs
57780
- var RV = !1;
57781
- function zV() {
57782
- RV || $i || (typeof CSS < "u" && "registerProperty" in CSS && [
57783
- FV.scrollAreaOverflowXStart,
57784
- FV.scrollAreaOverflowXEnd,
57785
- FV.scrollAreaOverflowYStart,
57786
- FV.scrollAreaOverflowYEnd
57796
+ var zV = !1;
57797
+ function BV() {
57798
+ zV || $i || (typeof CSS < "u" && "registerProperty" in CSS && [
57799
+ IV.scrollAreaOverflowXStart,
57800
+ IV.scrollAreaOverflowXEnd,
57801
+ IV.scrollAreaOverflowYStart,
57802
+ IV.scrollAreaOverflowYEnd
57787
57803
  ].forEach((e) => {
57788
57804
  try {
57789
57805
  CSS.registerProperty({
@@ -57793,10 +57809,10 @@ function zV() {
57793
57809
  initialValue: "0px"
57794
57810
  });
57795
57811
  } catch {}
57796
- }), RV = !0);
57812
+ }), zV = !0);
57797
57813
  }
57798
- var BV = /* @__PURE__ */ y.forwardRef(function(e, t) {
57799
- let { render: n, className: r, style: i, ...a } = e, { viewportRef: o, scrollbarYRef: s, scrollbarXRef: c, thumbYRef: l, thumbXRef: u, cornerRef: d, cornerSize: f, setCornerSize: p, setThumbSize: m, rootId: h, setHiddenState: g, hiddenState: _, setHasMeasuredScrollbar: v, handleScroll: b, setHovering: x, setOverflowEdges: S, overflowEdges: C, overflowEdgeThreshold: w, scrollingX: T, scrollingY: E } = hV(), D = dg(), O = y.useRef(!0), k = y.useRef([
57814
+ var VV = /* @__PURE__ */ y.forwardRef(function(e, t) {
57815
+ let { render: n, className: r, style: i, ...a } = e, { viewportRef: o, scrollbarYRef: s, scrollbarXRef: c, thumbYRef: l, thumbXRef: u, cornerRef: d, cornerSize: f, setCornerSize: p, setThumbSize: m, rootId: h, setHiddenState: g, hiddenState: _, setHasMeasuredScrollbar: v, handleScroll: b, setHovering: x, setOverflowEdges: S, overflowEdges: C, overflowEdgeThreshold: w, scrollingX: T, scrollingY: E } = gV(), D = dg(), O = y.useRef(!0), k = y.useRef([
57800
57816
  NaN,
57801
57817
  NaN,
57802
57818
  NaN,
@@ -57806,14 +57822,14 @@ var BV = /* @__PURE__ */ y.forwardRef(function(e, t) {
57806
57822
  if (!e) return;
57807
57823
  let h = e.scrollHeight, _ = e.scrollWidth, y = e.clientHeight, b = e.clientWidth, x = e.scrollTop, C = e.scrollLeft, T = k.current, E = Number.isNaN(T[0]);
57808
57824
  if (T[0] = y, T[1] = h, T[2] = b, T[3] = _, E && v(!0), h === 0 || _ === 0) return;
57809
- let O = VV(e), A = O.y, j = O.x, M = b / _, N = y / h, P = Math.max(0, _ - b), F = Math.max(0, h - y), I = 0, L = 0;
57825
+ let O = HV(e), A = O.y, j = O.x, M = b / _, N = y / h, P = Math.max(0, _ - b), F = Math.max(0, h - y), I = 0, L = 0;
57810
57826
  if (!j) {
57811
57827
  let e = 0;
57812
- e = PV(D === "rtl" ? -C : C, 0, P), I = LV(e, P), L = P - I;
57828
+ e = FV(D === "rtl" ? -C : C, 0, P), I = RV(e, P), L = P - I;
57813
57829
  }
57814
- let R = A ? 0 : PV(x, 0, F), z = A ? 0 : LV(R, F), ee = A ? 0 : F - z, te = j ? 0 : b, ne = A ? 0 : y, re = 0, ie = 0;
57830
+ let R = A ? 0 : FV(x, 0, F), z = A ? 0 : RV(R, F), ee = A ? 0 : F - z, te = j ? 0 : b, ne = A ? 0 : y, re = 0, ie = 0;
57815
57831
  !j && !A && (re = t?.offsetWidth || 0, ie = n?.offsetHeight || 0);
57816
- let B = f.width === 0 && f.height === 0, ae = B ? re : 0, oe = B ? ie : 0, se = _V(n, "padding", "x"), ce = _V(t, "padding", "y"), V = _V(i, "margin", "x"), H = _V(r, "margin", "y"), le = te - se - V, ue = ne - ce - H, de = n ? Math.min(n.offsetWidth - ae, le) : le, U = t ? Math.min(t.offsetHeight - oe, ue) : ue, fe = Math.max(16, de * M), pe = Math.max(16, U * N);
57832
+ let B = f.width === 0 && f.height === 0, ae = B ? re : 0, oe = B ? ie : 0, se = vV(n, "padding", "x"), ce = vV(t, "padding", "y"), V = vV(i, "margin", "x"), H = vV(r, "margin", "y"), le = te - se - V, ue = ne - ce - H, de = n ? Math.min(n.offsetWidth - ae, le) : le, U = t ? Math.min(t.offsetHeight - oe, ue) : ue, fe = Math.max(16, de * M), pe = Math.max(16, U * N);
57817
57833
  if (m((e) => e.height === pe && e.width === fe ? e : {
57818
57834
  width: fe,
57819
57835
  height: pe
@@ -57822,14 +57838,14 @@ var BV = /* @__PURE__ */ y.forwardRef(function(e, t) {
57822
57838
  r.style.transform = `translate3d(0,${a}px,0)`;
57823
57839
  }
57824
57840
  if (n && i) {
57825
- let e = n.offsetWidth - fe - se - V, t = _ - b, r = t === 0 ? 0 : C / t, a = D === "rtl" ? PV(r * e, -e, 0) : PV(r * e, 0, e);
57841
+ let e = n.offsetWidth - fe - se - V, t = _ - b, r = t === 0 ? 0 : C / t, a = D === "rtl" ? FV(r * e, -e, 0) : FV(r * e, 0, e);
57826
57842
  i.style.transform = `translate3d(${a}px,0,0)`;
57827
57843
  }
57828
57844
  let me = [
57829
- [FV.scrollAreaOverflowXStart, I],
57830
- [FV.scrollAreaOverflowXEnd, L],
57831
- [FV.scrollAreaOverflowYStart, z],
57832
- [FV.scrollAreaOverflowYEnd, ee]
57845
+ [IV.scrollAreaOverflowXStart, I],
57846
+ [IV.scrollAreaOverflowXEnd, L],
57847
+ [IV.scrollAreaOverflowYStart, z],
57848
+ [IV.scrollAreaOverflowYEnd, ee]
57833
57849
  ];
57834
57850
  for (let [t, n] of me) e.style.setProperty(t, `${n}px`);
57835
57851
  a && (j || A ? p({
@@ -57838,7 +57854,7 @@ var BV = /* @__PURE__ */ y.forwardRef(function(e, t) {
57838
57854
  }) : !j && !A && p({
57839
57855
  width: re,
57840
57856
  height: ie
57841
- })), g((e) => HV(e, O));
57857
+ })), g((e) => UV(e, O));
57842
57858
  let he = {
57843
57859
  xStart: !j && I > w.xStart,
57844
57860
  xEnd: !j && L > w.xEnd,
@@ -57848,7 +57864,7 @@ var BV = /* @__PURE__ */ y.forwardRef(function(e, t) {
57848
57864
  S((e) => e.xStart === he.xStart && e.xEnd === he.xEnd && e.yStart === he.yStart && e.yEnd === he.yEnd ? e : he);
57849
57865
  });
57850
57866
  K(() => {
57851
- o.current && zV();
57867
+ o.current && BV();
57852
57868
  }, [o]), K(() => {
57853
57869
  queueMicrotask(M);
57854
57870
  }, [
@@ -57890,7 +57906,7 @@ var BV = /* @__PURE__ */ y.forwardRef(function(e, t) {
57890
57906
  role: "presentation",
57891
57907
  ...h && { "data-id": `${h}-viewport` },
57892
57908
  tabIndex: _.x && _.y ? -1 : 0,
57893
- className: bV.className,
57909
+ className: xV.className,
57894
57910
  style: { overflow: "scroll" },
57895
57911
  onScroll() {
57896
57912
  o.current && (M(), O.current || b({
@@ -57925,15 +57941,15 @@ var BV = /* @__PURE__ */ y.forwardRef(function(e, t) {
57925
57941
  ref: [t, o],
57926
57942
  state: F,
57927
57943
  props: [P, a],
57928
- stateAttributesMapping: SV
57944
+ stateAttributesMapping: CV
57929
57945
  }), L = y.useMemo(() => ({ computeThumbPosition: M }), [M]);
57930
- return /* @__PURE__ */ V(MV.Provider, {
57946
+ return /* @__PURE__ */ V(NV.Provider, {
57931
57947
  value: L,
57932
57948
  children: I
57933
57949
  });
57934
57950
  });
57935
- process.env.NODE_ENV !== "production" && (BV.displayName = "ScrollAreaViewport");
57936
- function VV(e) {
57951
+ process.env.NODE_ENV !== "production" && (VV.displayName = "ScrollAreaViewport");
57952
+ function HV(e) {
57937
57953
  let t = e.clientHeight >= e.scrollHeight, n = e.clientWidth >= e.scrollWidth;
57938
57954
  return {
57939
57955
  y: t,
@@ -57941,24 +57957,24 @@ function VV(e) {
57941
57957
  corner: t || n
57942
57958
  };
57943
57959
  }
57944
- function HV(e, t) {
57960
+ function UV(e, t) {
57945
57961
  return e.y === t.y && e.x === t.x && e.corner === t.corner ? e : t;
57946
57962
  }
57947
57963
  //#endregion
57948
57964
  //#region ../../node_modules/@base-ui/react/scroll-area/scrollbar/ScrollAreaScrollbarContext.mjs
57949
- var UV = /* @__PURE__ */ y.createContext(void 0);
57950
- process.env.NODE_ENV !== "production" && (UV.displayName = "ScrollAreaScrollbarContext");
57951
- function WV() {
57952
- let e = y.useContext(UV);
57965
+ var WV = /* @__PURE__ */ y.createContext(void 0);
57966
+ process.env.NODE_ENV !== "production" && (WV.displayName = "ScrollAreaScrollbarContext");
57967
+ function GV() {
57968
+ let e = y.useContext(WV);
57953
57969
  if (e === void 0) throw Error(process.env.NODE_ENV === "production" ? pc(54) : "Base UI: ScrollAreaScrollbarContext is missing. ScrollAreaScrollbar parts must be placed within <ScrollArea.Scrollbar>.");
57954
57970
  return e;
57955
57971
  }
57956
57972
  //#endregion
57957
57973
  //#region ../../node_modules/@base-ui/react/scroll-area/scrollbar/ScrollAreaScrollbarCssVars.mjs
57958
- var GV = /* @__PURE__ */ function(e) {
57974
+ var KV = /* @__PURE__ */ function(e) {
57959
57975
  return e.scrollAreaThumbHeight = "--scroll-area-thumb-height", e.scrollAreaThumbWidth = "--scroll-area-thumb-width", e;
57960
- }({}), KV = /* @__PURE__ */ y.forwardRef(function(e, t) {
57961
- let { render: n, className: r, orientation: i = "vertical", keepMounted: a = !1, style: o, ...s } = e, { hovering: c, scrollingX: l, scrollingY: u, hiddenState: d, overflowEdges: f, scrollbarYRef: p, scrollbarXRef: m, viewportRef: h, thumbYRef: g, thumbXRef: _, handlePointerDown: v, handlePointerUp: b, handleScroll: x, rootId: S, thumbSize: C, hasMeasuredScrollbar: w } = hV(), T = {
57976
+ }({}), qV = /* @__PURE__ */ y.forwardRef(function(e, t) {
57977
+ let { render: n, className: r, orientation: i = "vertical", keepMounted: a = !1, style: o, ...s } = e, { hovering: c, scrollingX: l, scrollingY: u, hiddenState: d, overflowEdges: f, scrollbarYRef: p, scrollbarXRef: m, viewportRef: h, thumbYRef: g, thumbXRef: _, handlePointerDown: v, handlePointerUp: b, handleScroll: x, rootId: S, thumbSize: C, hasMeasuredScrollbar: w } = gV(), T = {
57962
57978
  hovering: c,
57963
57979
  scrolling: {
57964
57980
  horizontal: l,
@@ -58004,11 +58020,11 @@ var GV = /* @__PURE__ */ function(e) {
58004
58020
  let t = Ba(e.nativeEvent), n = i === "vertical" ? g.current : _.current;
58005
58021
  if (!(n && q(n, t)) && h.current) {
58006
58022
  if (g.current && p.current && i === "vertical") {
58007
- let t = _V(g.current, "margin", "y"), n = _V(p.current, "padding", "y"), r = g.current.offsetHeight, i = p.current.getBoundingClientRect(), a = e.clientY - i.top - r / 2 - n + t / 2, o = h.current.scrollHeight, s = h.current.clientHeight, c = a / (p.current.offsetHeight - r - n - t) * (o - s);
58023
+ let t = vV(g.current, "margin", "y"), n = vV(p.current, "padding", "y"), r = g.current.offsetHeight, i = p.current.getBoundingClientRect(), a = e.clientY - i.top - r / 2 - n + t / 2, o = h.current.scrollHeight, s = h.current.clientHeight, c = a / (p.current.offsetHeight - r - n - t) * (o - s);
58008
58024
  h.current.scrollTop = c;
58009
58025
  }
58010
58026
  if (_.current && m.current && i === "horizontal") {
58011
- let t = _V(_.current, "margin", "x"), n = _V(m.current, "padding", "x"), r = _.current.offsetWidth, i = m.current.getBoundingClientRect(), a = e.clientX - i.left - r / 2 - n + t / 2, o = h.current.scrollWidth, s = h.current.clientWidth, c = a / (m.current.offsetWidth - r - n - t), l;
58027
+ let t = vV(_.current, "margin", "x"), n = vV(m.current, "padding", "x"), r = _.current.offsetWidth, i = m.current.getBoundingClientRect(), a = e.clientX - i.left - r / 2 - n + t / 2, o = h.current.scrollWidth, s = h.current.clientWidth, c = a / (m.current.offsetWidth - r - n - t), l;
58012
58028
  E === "rtl" ? (l = (1 - c) * (o - s), h.current.scrollLeft <= 0 && (l = -l)) : l = c * (o - s), h.current.scrollLeft = l;
58013
58029
  }
58014
58030
  x({
@@ -58027,33 +58043,33 @@ var GV = /* @__PURE__ */ function(e) {
58027
58043
  visibility: D ? "hidden" : void 0,
58028
58044
  ...i === "vertical" && {
58029
58045
  top: 0,
58030
- bottom: `var(${gV.scrollAreaCornerHeight})`,
58046
+ bottom: `var(${_V.scrollAreaCornerHeight})`,
58031
58047
  insetInlineEnd: 0,
58032
- [GV.scrollAreaThumbHeight]: `${C.height}px`
58048
+ [KV.scrollAreaThumbHeight]: `${C.height}px`
58033
58049
  },
58034
58050
  ...i === "horizontal" && {
58035
58051
  insetInlineStart: 0,
58036
- insetInlineEnd: `var(${gV.scrollAreaCornerWidth})`,
58052
+ insetInlineEnd: `var(${_V.scrollAreaCornerWidth})`,
58037
58053
  bottom: 0,
58038
- [GV.scrollAreaThumbWidth]: `${C.width}px`
58054
+ [KV.scrollAreaThumbWidth]: `${C.width}px`
58039
58055
  }
58040
58056
  }
58041
58057
  }, j = Rc("div", e, {
58042
58058
  ref: [t, i === "vertical" ? p : m],
58043
58059
  state: T,
58044
58060
  props: [A, s],
58045
- stateAttributesMapping: SV
58061
+ stateAttributesMapping: CV
58046
58062
  }), M = y.useMemo(() => ({ orientation: i }), [i]);
58047
- return k ? /* @__PURE__ */ V(UV.Provider, {
58063
+ return k ? /* @__PURE__ */ V(WV.Provider, {
58048
58064
  value: M,
58049
58065
  children: j
58050
58066
  }) : null;
58051
58067
  });
58052
- process.env.NODE_ENV !== "production" && (KV.displayName = "ScrollAreaScrollbar");
58068
+ process.env.NODE_ENV !== "production" && (qV.displayName = "ScrollAreaScrollbar");
58053
58069
  //#endregion
58054
58070
  //#region ../../node_modules/@base-ui/react/scroll-area/content/ScrollAreaContent.mjs
58055
- var qV = /* @__PURE__ */ y.forwardRef(function(e, t) {
58056
- let { render: n, className: r, style: i, ...a } = e, { computeThumbPosition: o } = NV(), { hasMeasuredScrollbar: s, viewportState: c } = hV(), l = y.useRef(null), u = y.useRef(s);
58071
+ var JV = /* @__PURE__ */ y.forwardRef(function(e, t) {
58072
+ let { render: n, className: r, style: i, ...a } = e, { computeThumbPosition: o } = PV(), { hasMeasuredScrollbar: s, viewportState: c } = gV(), l = y.useRef(null), u = y.useRef(s);
58057
58073
  return K(() => {
58058
58074
  if (typeof ResizeObserver > "u") return;
58059
58075
  let e = !1, t = new ResizeObserver(() => {
@@ -58065,18 +58081,18 @@ var qV = /* @__PURE__ */ y.forwardRef(function(e, t) {
58065
58081
  }, [o]), Rc("div", e, {
58066
58082
  ref: [t, l],
58067
58083
  state: c,
58068
- stateAttributesMapping: SV,
58084
+ stateAttributesMapping: CV,
58069
58085
  props: [{
58070
58086
  role: "presentation",
58071
58087
  style: { minWidth: "fit-content" }
58072
58088
  }, a]
58073
58089
  });
58074
58090
  });
58075
- process.env.NODE_ENV !== "production" && (qV.displayName = "ScrollAreaContent");
58091
+ process.env.NODE_ENV !== "production" && (JV.displayName = "ScrollAreaContent");
58076
58092
  //#endregion
58077
58093
  //#region ../../node_modules/@base-ui/react/scroll-area/thumb/ScrollAreaThumb.mjs
58078
- var JV = /* @__PURE__ */ y.forwardRef(function(e, t) {
58079
- let { render: n, className: r, style: i, ...a } = e, { thumbYRef: o, thumbXRef: s, handlePointerDown: c, handlePointerMove: l, handlePointerUp: u, setScrollingX: d, setScrollingY: f, scrollingX: p, scrollingY: m, hasMeasuredScrollbar: h } = hV(), { orientation: g } = WV(), _ = {
58094
+ var YV = /* @__PURE__ */ y.forwardRef(function(e, t) {
58095
+ let { render: n, className: r, style: i, ...a } = e, { thumbYRef: o, thumbXRef: s, handlePointerDown: c, handlePointerMove: l, handlePointerUp: u, setScrollingX: d, setScrollingY: f, scrollingX: p, scrollingY: m, hasMeasuredScrollbar: h } = gV(), { orientation: g } = GV(), _ = {
58080
58096
  scrolling: g === "horizontal" ? p : m,
58081
58097
  orientation: g
58082
58098
  };
@@ -58093,17 +58109,17 @@ var JV = /* @__PURE__ */ y.forwardRef(function(e, t) {
58093
58109
  onPointerCancel: v,
58094
58110
  style: {
58095
58111
  visibility: h ? void 0 : "hidden",
58096
- ...g === "vertical" && { height: `var(${GV.scrollAreaThumbHeight})` },
58097
- ...g === "horizontal" && { width: `var(${GV.scrollAreaThumbWidth})` }
58112
+ ...g === "vertical" && { height: `var(${KV.scrollAreaThumbHeight})` },
58113
+ ...g === "horizontal" && { width: `var(${KV.scrollAreaThumbWidth})` }
58098
58114
  }
58099
58115
  }, a]
58100
58116
  });
58101
58117
  });
58102
- process.env.NODE_ENV !== "production" && (JV.displayName = "ScrollAreaThumb");
58118
+ process.env.NODE_ENV !== "production" && (YV.displayName = "ScrollAreaThumb");
58103
58119
  //#endregion
58104
58120
  //#region ../../node_modules/@base-ui/react/scroll-area/corner/ScrollAreaCorner.mjs
58105
- var YV = /* @__PURE__ */ y.forwardRef(function(e, t) {
58106
- let { render: n, className: r, style: i, ...a } = e, { cornerRef: o, cornerSize: s, hiddenState: c } = hV(), l = Rc("div", e, {
58121
+ var XV = /* @__PURE__ */ y.forwardRef(function(e, t) {
58122
+ let { render: n, className: r, style: i, ...a } = e, { cornerRef: o, cornerSize: s, hiddenState: c } = gV(), l = Rc("div", e, {
58107
58123
  ref: [t, o],
58108
58124
  props: [{ style: {
58109
58125
  position: "absolute",
@@ -58115,52 +58131,52 @@ var YV = /* @__PURE__ */ y.forwardRef(function(e, t) {
58115
58131
  });
58116
58132
  return c.corner ? null : l;
58117
58133
  });
58118
- process.env.NODE_ENV !== "production" && (YV.displayName = "ScrollAreaCorner");
58134
+ process.env.NODE_ENV !== "production" && (XV.displayName = "ScrollAreaCorner");
58119
58135
  //#endregion
58120
58136
  //#region src/components/ui/scroll-area.tsx
58121
- var XV = y.forwardRef(({ className: e, children: t, ...n }, r) => /* @__PURE__ */ H(AV, {
58137
+ var ZV = y.forwardRef(({ className: e, children: t, ...n }, r) => /* @__PURE__ */ H(jV, {
58122
58138
  ref: r,
58123
58139
  className: U("relative overflow-hidden", e),
58124
58140
  ...n,
58125
58141
  children: [
58126
- /* @__PURE__ */ V(BV, {
58142
+ /* @__PURE__ */ V(VV, {
58127
58143
  className: "h-full w-full rounded-[inherit]",
58128
58144
  children: t
58129
58145
  }),
58130
- /* @__PURE__ */ V(ZV, {}),
58131
- /* @__PURE__ */ V(YV, {})
58146
+ /* @__PURE__ */ V(QV, {}),
58147
+ /* @__PURE__ */ V(XV, {})
58132
58148
  ]
58133
58149
  }));
58134
- XV.displayName = "ScrollArea";
58135
- var ZV = y.forwardRef(({ className: e, orientation: t = "vertical", ...n }, r) => /* @__PURE__ */ V(KV, {
58150
+ ZV.displayName = "ScrollArea";
58151
+ var QV = y.forwardRef(({ className: e, orientation: t = "vertical", ...n }, r) => /* @__PURE__ */ V(qV, {
58136
58152
  ref: r,
58137
58153
  orientation: t,
58138
58154
  className: U("flex touch-none select-none transition-colors", t === "vertical" && "h-full w-2.5 border-l border-l-transparent p-[1px]", t === "horizontal" && "h-2.5 flex-col border-t border-t-transparent p-[1px]", e),
58139
58155
  ...n,
58140
- children: /* @__PURE__ */ V(JV, { className: "relative flex-1 rounded-full bg-border" })
58156
+ children: /* @__PURE__ */ V(YV, { className: "relative flex-1 rounded-full bg-border" })
58141
58157
  }));
58142
- ZV.displayName = "ScrollBar";
58158
+ QV.displayName = "ScrollBar";
58143
58159
  //#endregion
58144
58160
  //#region ../../node_modules/@base-ui/react/select/root/SelectRootContext.mjs
58145
- var QV = /* @__PURE__ */ y.createContext(null);
58146
- process.env.NODE_ENV !== "production" && (QV.displayName = "SelectRootContext");
58147
58161
  var $V = /* @__PURE__ */ y.createContext(null);
58148
- process.env.NODE_ENV !== "production" && ($V.displayName = "SelectFloatingContext");
58149
- function eH() {
58150
- let e = y.useContext(QV);
58162
+ process.env.NODE_ENV !== "production" && ($V.displayName = "SelectRootContext");
58163
+ var eH = /* @__PURE__ */ y.createContext(null);
58164
+ process.env.NODE_ENV !== "production" && (eH.displayName = "SelectFloatingContext");
58165
+ function tH() {
58166
+ let e = y.useContext($V);
58151
58167
  if (e === null) throw Error(process.env.NODE_ENV === "production" ? pc(60) : "Base UI: SelectRootContext is missing. Select parts must be placed within <Select.Root>.");
58152
58168
  return e;
58153
58169
  }
58154
- function tH() {
58155
- let e = y.useContext($V);
58170
+ function nH() {
58171
+ let e = y.useContext(eH);
58156
58172
  if (e === null) throw Error(process.env.NODE_ENV === "production" ? pc(61) : "Base UI: SelectFloatingContext is missing. Select parts must be placed within <Select.Root>.");
58157
58173
  return e;
58158
58174
  }
58159
58175
  //#endregion
58160
58176
  //#region ../../node_modules/@base-ui/react/field/control/FieldControlDataAttributes.mjs
58161
- var nH = /* @__PURE__ */ function(e) {
58177
+ var rH = /* @__PURE__ */ function(e) {
58162
58178
  return e.disabled = "data-disabled", e.valid = "data-valid", e.invalid = "data-invalid", e.touched = "data-touched", e.dirty = "data-dirty", e.filled = "data-filled", e.focused = "data-focused", e;
58163
- }({}), rH = {
58179
+ }({}), iH = {
58164
58180
  badInput: !1,
58165
58181
  customError: !1,
58166
58182
  patternMismatch: !1,
@@ -58172,22 +58188,22 @@ var nH = /* @__PURE__ */ function(e) {
58172
58188
  typeMismatch: !1,
58173
58189
  valid: null,
58174
58190
  valueMissing: !1
58175
- }, iH = {
58191
+ }, aH = {
58176
58192
  valid: null,
58177
58193
  touched: !1,
58178
58194
  dirty: !1,
58179
58195
  filled: !1,
58180
58196
  focused: !1
58181
- }, aH = {
58197
+ }, oH = {
58182
58198
  disabled: !1,
58183
- ...iH
58184
- }, oH = { valid(e) {
58185
- return e === null ? null : e ? { [nH.valid]: "" } : { [nH.invalid]: "" };
58186
- } }, sH = {
58199
+ ...aH
58200
+ }, sH = { valid(e) {
58201
+ return e === null ? null : e ? { [rH.valid]: "" } : { [rH.invalid]: "" };
58202
+ } }, cH = {
58187
58203
  invalid: void 0,
58188
58204
  name: void 0,
58189
58205
  validityData: {
58190
- state: rH,
58206
+ state: iH,
58191
58207
  errors: [],
58192
58208
  error: "",
58193
58209
  value: "",
@@ -58195,19 +58211,19 @@ var nH = /* @__PURE__ */ function(e) {
58195
58211
  },
58196
58212
  setValidityData: ha,
58197
58213
  disabled: void 0,
58198
- touched: iH.touched,
58214
+ touched: aH.touched,
58199
58215
  setTouched: ha,
58200
- dirty: iH.dirty,
58216
+ dirty: aH.dirty,
58201
58217
  setDirty: ha,
58202
- filled: iH.filled,
58218
+ filled: aH.filled,
58203
58219
  setFilled: ha,
58204
- focused: iH.focused,
58220
+ focused: aH.focused,
58205
58221
  setFocused: ha,
58206
58222
  validate: () => null,
58207
58223
  validationMode: "onSubmit",
58208
58224
  validationDebounceTime: 0,
58209
58225
  shouldValidateOnChange: () => !1,
58210
- state: aH,
58226
+ state: oH,
58211
58227
  markedDirtyRef: { current: !1 },
58212
58228
  registerFieldControl: ha,
58213
58229
  validation: {
@@ -58217,17 +58233,17 @@ var nH = /* @__PURE__ */ function(e) {
58217
58233
  commit: async () => {},
58218
58234
  change: ha
58219
58235
  }
58220
- }, cH = /* @__PURE__ */ y.createContext(sH);
58221
- process.env.NODE_ENV !== "production" && (cH.displayName = "FieldRootContext");
58222
- function lH(e = !0) {
58223
- let t = y.useContext(cH);
58236
+ }, lH = /* @__PURE__ */ y.createContext(cH);
58237
+ process.env.NODE_ENV !== "production" && (lH.displayName = "FieldRootContext");
58238
+ function uH(e = !0) {
58239
+ let t = y.useContext(lH);
58224
58240
  if (t.setValidityData === ha && !e) throw Error(process.env.NODE_ENV === "production" ? pc(28) : "Base UI: FieldRootContext is missing. Field parts must be placed within <Field.Root>.");
58225
58241
  return t;
58226
58242
  }
58227
58243
  //#endregion
58228
58244
  //#region ../../node_modules/@base-ui/react/internals/field-register-control/useRegisterFieldControl.mjs
58229
- function uH(e, t, n, r, i = !0, a) {
58230
- let { registerFieldControl: o } = lH(), s = y.useRef(null);
58245
+ function dH(e, t, n, r, i = !0, a) {
58246
+ let { registerFieldControl: o } = uH(), s = y.useRef(null);
58231
58247
  s.current ||= Symbol(), K(() => {
58232
58248
  let c = s.current;
58233
58249
  return !c || !i ? void 0 : (o(c, {
@@ -58251,7 +58267,7 @@ function uH(e, t, n, r, i = !0, a) {
58251
58267
  }
58252
58268
  //#endregion
58253
58269
  //#region ../../node_modules/@base-ui/react/internals/labelable-provider/LabelableContext.mjs
58254
- var dH = /* @__PURE__ */ y.createContext({
58270
+ var fH = /* @__PURE__ */ y.createContext({
58255
58271
  controlId: void 0,
58256
58272
  registerControlId: ha,
58257
58273
  labelId: void 0,
@@ -58260,14 +58276,14 @@ var dH = /* @__PURE__ */ y.createContext({
58260
58276
  setMessageIds: ha,
58261
58277
  getDescriptionProps: (e) => e
58262
58278
  });
58263
- process.env.NODE_ENV !== "production" && (dH.displayName = "LabelableContext");
58264
- function fH() {
58265
- return y.useContext(dH);
58279
+ process.env.NODE_ENV !== "production" && (fH.displayName = "LabelableContext");
58280
+ function pH() {
58281
+ return y.useContext(fH);
58266
58282
  }
58267
58283
  //#endregion
58268
58284
  //#region ../../node_modules/@base-ui/react/internals/labelable-provider/useLabelableId.mjs
58269
- function pH(e = {}) {
58270
- let { id: t, implicit: n = !1, controlRef: r } = e, { controlId: i, registerControlId: a } = fH(), o = Ap(t), s = n ? i : void 0, c = ia(() => Symbol("labelable-control")), l = y.useRef(!1), u = y.useRef(t != null), d = J(() => {
58285
+ function mH(e = {}) {
58286
+ let { id: t, implicit: n = !1, controlRef: r } = e, { controlId: i, registerControlId: a } = pH(), o = Ap(t), s = n ? i : void 0, c = ia(() => Symbol("labelable-control")), l = y.useRef(!1), u = y.useRef(t != null), d = J(() => {
58271
58287
  !l.current || a === ha || (l.current = !1, a(c.current, void 0));
58272
58288
  });
58273
58289
  return K(() => {
@@ -58300,22 +58316,22 @@ function pH(e = {}) {
58300
58316
  }
58301
58317
  //#endregion
58302
58318
  //#region ../../node_modules/@base-ui/react/internals/itemEquality.mjs
58303
- var mH = (e, t) => Object.is(e, t);
58304
- function hH(e, t, n) {
58305
- return e == null || t == null ? Object.is(e, t) : n(e, t);
58306
- }
58319
+ var hH = (e, t) => Object.is(e, t);
58307
58320
  function gH(e, t, n) {
58308
- return !e || e.length === 0 ? !1 : e.some((e) => e === void 0 ? !1 : hH(t, e, n));
58321
+ return e == null || t == null ? Object.is(e, t) : n(e, t);
58309
58322
  }
58310
58323
  function _H(e, t, n) {
58311
- return !e || e.length === 0 ? -1 : e.findIndex((e) => e === void 0 ? !1 : hH(e, t, n));
58324
+ return !e || e.length === 0 ? !1 : e.some((e) => e === void 0 ? !1 : gH(t, e, n));
58312
58325
  }
58313
58326
  function vH(e, t, n) {
58314
- return e.filter((e) => !hH(t, e, n));
58327
+ return !e || e.length === 0 ? -1 : e.findIndex((e) => e === void 0 ? !1 : gH(e, t, n));
58328
+ }
58329
+ function yH(e, t, n) {
58330
+ return e.filter((e) => !gH(t, e, n));
58315
58331
  }
58316
58332
  //#endregion
58317
58333
  //#region ../../node_modules/@base-ui/react/internals/serializeValue.mjs
58318
- function yH(e) {
58334
+ function bH(e) {
58319
58335
  if (e == null) return "";
58320
58336
  if (typeof e == "string") return e;
58321
58337
  try {
@@ -58326,39 +58342,39 @@ function yH(e) {
58326
58342
  }
58327
58343
  //#endregion
58328
58344
  //#region ../../node_modules/@base-ui/react/internals/resolveValueLabel.mjs
58329
- function bH(e) {
58345
+ function xH(e) {
58330
58346
  return e != null && e.length > 0 && typeof e[0] == "object" && e[0] != null && "items" in e[0];
58331
58347
  }
58332
- function xH(e) {
58348
+ function SH(e) {
58333
58349
  if (!Array.isArray(e)) return e != null && "null" in e;
58334
58350
  let t = e;
58335
- if (bH(t)) {
58351
+ if (xH(t)) {
58336
58352
  for (let e of t) for (let t of e.items) if (t && t.value == null && t.label != null) return !0;
58337
58353
  return !1;
58338
58354
  }
58339
58355
  for (let e of t) if (e && e.value == null && e.label != null) return !0;
58340
58356
  return !1;
58341
58357
  }
58342
- function SH(e, t) {
58358
+ function CH(e, t) {
58343
58359
  if (t && e != null) return t(e) ?? "";
58344
58360
  if (e && typeof e == "object") {
58345
58361
  if ("label" in e && e.label != null) return String(e.label);
58346
58362
  if ("value" in e) return String(e.value);
58347
58363
  }
58348
- return yH(e);
58364
+ return bH(e);
58349
58365
  }
58350
- function CH(e, t) {
58351
- return t && e != null ? t(e) ?? "" : e && typeof e == "object" && "value" in e && "label" in e ? yH(e.value) : yH(e);
58366
+ function wH(e, t) {
58367
+ return t && e != null ? t(e) ?? "" : e && typeof e == "object" && "value" in e && "label" in e ? bH(e.value) : bH(e);
58352
58368
  }
58353
- function wH(e, t, n) {
58369
+ function TH(e, t, n) {
58354
58370
  function r() {
58355
- return SH(e, n);
58371
+ return CH(e, n);
58356
58372
  }
58357
58373
  if (n && e != null) return n(e);
58358
58374
  if (e && typeof e == "object" && "label" in e && e.label != null) return e.label;
58359
58375
  if (t && !Array.isArray(t)) return t[e] ?? r();
58360
58376
  if (Array.isArray(t)) {
58361
- let n = t, i = bH(n) ? n.flatMap((e) => e.items) : n;
58377
+ let n = t, i = xH(n) ? n.flatMap((e) => e.items) : n;
58362
58378
  if (typeof e != "object" || !e) {
58363
58379
  let t = i.find((t) => t.value === e);
58364
58380
  return t && t.label != null ? t.label : r();
@@ -58370,8 +58386,8 @@ function wH(e, t, n) {
58370
58386
  }
58371
58387
  return r();
58372
58388
  }
58373
- function TH(e, t, n) {
58374
- return e.reduce((e, r, i) => (i > 0 && e.push(", "), e.push(/* @__PURE__ */ V(y.Fragment, { children: wH(r, t, n) }, i)), e), []);
58389
+ function EH(e, t, n) {
58390
+ return e.reduce((e, r, i) => (i > 0 && e.push(", "), e.push(/* @__PURE__ */ V(y.Fragment, { children: TH(r, t, n) }, i)), e), []);
58375
58391
  }
58376
58392
  //#endregion
58377
58393
  //#region ../../node_modules/@base-ui/react/select/store.mjs
@@ -58387,9 +58403,9 @@ var $ = {
58387
58403
  value: Y((e) => e.value),
58388
58404
  hasSelectedValue: Y((e) => {
58389
58405
  let { value: t, multiple: n, itemToStringValue: r } = e;
58390
- return t == null ? !1 : n && Array.isArray(t) ? t.length > 0 : CH(t, r) !== "";
58406
+ return t == null ? !1 : n && Array.isArray(t) ? t.length > 0 : wH(t, r) !== "";
58391
58407
  }),
58392
- hasNullItemLabel: Y((e, t) => t ? xH(e.items) : !1),
58408
+ hasNullItemLabel: Y((e, t) => t ? SH(e.items) : !1),
58393
58409
  open: Y((e) => e.open),
58394
58410
  mounted: Y((e) => e.mounted),
58395
58411
  forceMount: Y((e) => e.forceMount),
@@ -58400,7 +58416,7 @@ var $ = {
58400
58416
  isActive: Y((e, t) => e.activeIndex === t),
58401
58417
  isSelected: Y((e, t) => {
58402
58418
  let n = e.isItemEqualToValue, r = e.value;
58403
- return e.multiple ? Array.isArray(r) && r.some((e) => hH(t, e, n)) : hH(t, r, n);
58419
+ return e.multiple ? Array.isArray(r) && r.some((e) => gH(t, e, n)) : gH(t, r, n);
58404
58420
  }),
58405
58421
  isSelectedByFocus: Y((e, t) => e.selectedIndex === t),
58406
58422
  popupProps: Y((e) => e.popupProps),
@@ -58412,26 +58428,26 @@ var $ = {
58412
58428
  scrollUpArrowVisible: Y((e) => e.scrollUpArrowVisible),
58413
58429
  scrollDownArrowVisible: Y((e) => e.scrollDownArrowVisible),
58414
58430
  hasScrollArrows: Y((e) => e.hasScrollArrows)
58415
- }, EH = /* @__PURE__ */ y.createContext({
58431
+ }, DH = /* @__PURE__ */ y.createContext({
58416
58432
  formRef: { current: { fields: /* @__PURE__ */ new Map() } },
58417
58433
  errors: {},
58418
58434
  clearErrors: ha,
58419
58435
  validationMode: "onSubmit",
58420
58436
  submitAttemptedRef: { current: !1 }
58421
58437
  });
58422
- process.env.NODE_ENV !== "production" && (EH.displayName = "FormContext");
58423
- function DH() {
58424
- return y.useContext(EH);
58438
+ process.env.NODE_ENV !== "production" && (DH.displayName = "FormContext");
58439
+ function OH() {
58440
+ return y.useContext(DH);
58425
58441
  }
58426
58442
  //#endregion
58427
58443
  //#region ../../node_modules/@base-ui/react/internals/areArraysEqual.mjs
58428
- function OH(e, t, n = (e, t) => e === t) {
58444
+ function kH(e, t, n = (e, t) => e === t) {
58429
58445
  return e.length === t.length && e.every((e, r) => n(e, t[r]));
58430
58446
  }
58431
58447
  //#endregion
58432
58448
  //#region ../../node_modules/@base-ui/react/select/root/SelectRoot.mjs
58433
- function kH(e) {
58434
- let { id: t, value: n, defaultValue: r = null, onValueChange: i, open: a, defaultOpen: o = !1, onOpenChange: s, name: c, form: l, autoComplete: u, disabled: d = !1, readOnly: f = !1, required: p = !1, modal: m = !0, actionsRef: h, inputRef: g, onOpenChangeComplete: _, items: v, multiple: b = !1, itemToStringLabel: x, itemToStringValue: S, isItemEqualToValue: C = mH, highlightItemOnHover: w = !0, children: T } = e, { clearErrors: E } = DH(), { setDirty: D, setTouched: O, setFocused: k, validityData: A, setFilled: j, name: M, disabled: N, validation: P, validationMode: F } = lH(), I = pH({ id: t }), L = N || d, R = M ?? c, [z, ee] = R_({
58449
+ function AH(e) {
58450
+ let { id: t, value: n, defaultValue: r = null, onValueChange: i, open: a, defaultOpen: o = !1, onOpenChange: s, name: c, form: l, autoComplete: u, disabled: d = !1, readOnly: f = !1, required: p = !1, modal: m = !0, actionsRef: h, inputRef: g, onOpenChangeComplete: _, items: v, multiple: b = !1, itemToStringLabel: x, itemToStringValue: S, isItemEqualToValue: C = hH, highlightItemOnHover: w = !0, children: T } = e, { clearErrors: E } = OH(), { setDirty: D, setTouched: O, setFocused: k, validityData: A, setFilled: j, name: M, disabled: N, validation: P, validationMode: F } = uH(), I = mH({ id: t }), L = N || d, R = M ?? c, [z, ee] = R_({
58435
58451
  controlled: n,
58436
58452
  default: b ? r ?? ga : r,
58437
58453
  name: "Select",
@@ -58471,17 +58487,17 @@ function kH(e) {
58471
58487
  scrollUpArrowVisible: !1,
58472
58488
  scrollDownArrowVisible: !1,
58473
58489
  hasScrollArrows: !1
58474
- })).current, ve = X(_e, $.activeIndex), ye = X(_e, $.selectedIndex), be = X(_e, $.triggerElement), xe = X(_e, $.positionerElement), Se = Ag(W), Ce = W ?? Se ?? null, we = y.useMemo(() => b ? "" : CH(z, S), [
58490
+ })).current, ve = X(_e, $.activeIndex), ye = X(_e, $.selectedIndex), be = X(_e, $.triggerElement), xe = X(_e, $.positionerElement), Se = Ag(W), Ce = W ?? Se ?? null, we = y.useMemo(() => b ? "" : wH(z, S), [
58475
58491
  b,
58476
58492
  z,
58477
58493
  S
58478
- ]), Te = y.useMemo(() => b && Array.isArray(z) ? z.map((e) => CH(e, S)) : CH(z, S), [
58494
+ ]), Te = y.useMemo(() => b && Array.isArray(z) ? z.map((e) => wH(e, S)) : wH(z, S), [
58479
58495
  b,
58480
58496
  z,
58481
58497
  S
58482
58498
  ]);
58483
- uH(Oo(_e.state.triggerElement), I, z, J(() => Te), !L, c);
58484
- let Ee = y.useRef(z), De = b ? Array.isArray(z) && z.length > 0 : z != null && CH(z, S) !== "";
58499
+ dH(Oo(_e.state.triggerElement), I, z, J(() => Te), !L, c);
58500
+ let Ee = y.useRef(z), De = b ? Array.isArray(z) && z.length > 0 : z != null && wH(z, S) !== "";
58485
58501
  K(() => {
58486
58502
  z !== Ee.current && _e.set("forceMount", !0);
58487
58503
  }, [_e, z]), K(() => {
@@ -58492,11 +58508,11 @@ function kH(e) {
58492
58508
  let n = Array.isArray(z) ? z : [];
58493
58509
  if (n.length === 0) t = null;
58494
58510
  else {
58495
- let r = n[n.length - 1], i = _H(e, r, C);
58511
+ let r = n[n.length - 1], i = vH(e, r, C);
58496
58512
  t = i === -1 ? null : i;
58497
58513
  }
58498
58514
  } else {
58499
- let n = _H(e, z, C);
58515
+ let n = vH(e, z, C);
58500
58516
  t = n === -1 ? null : n;
58501
58517
  }
58502
58518
  t === null && (de.current = null), !te && _e.set("selectedIndex", t);
@@ -58512,7 +58528,7 @@ function kH(e) {
58512
58528
  ]);
58513
58529
  function Oe(e) {
58514
58530
  let t = A.initialValue;
58515
- return Array.isArray(e) && Array.isArray(t) ? !OH(e, t, (e, t) => hH(e, t, C)) : e !== t;
58531
+ return Array.isArray(e) && Array.isArray(t) ? !kH(e, t, (e, t) => gH(e, t, C)) : e !== t;
58516
58532
  }
58517
58533
  Qp(z, () => {
58518
58534
  E(R), D(Oe(z)), P.change(z);
@@ -58538,7 +58554,7 @@ function kH(e) {
58538
58554
  }), Me = J(() => {
58539
58555
  let e = _e.state.listElement || B.current;
58540
58556
  if (!e) return;
58541
- let t = IV(e.scrollHeight, e.clientHeight), n = LV(e.scrollTop, t), r = n > 0, i = n < t;
58557
+ let t = LV(e.scrollHeight, e.clientHeight), n = RV(e.scrollTop, t), r = n > 0, i = n < t;
58542
58558
  _e.state.scrollUpArrowVisible !== r && _e.set("scrollUpArrowVisible", r), _e.state.scrollDownArrowVisible !== i && _e.set("scrollDownArrowVisible", i);
58543
58559
  }), Ne = Tf({
58544
58560
  open: te,
@@ -58668,7 +58684,7 @@ function kH(e) {
58668
58684
  _,
58669
58685
  Me
58670
58686
  ]), He = So(g, P.inputRef), Ue = b && Array.isArray(z) && z.length > 0, We = b ? void 0 : R, Ge = y.useMemo(() => !b || !Array.isArray(z) || !R ? null : z.map((e) => {
58671
- let t = CH(e, S);
58687
+ let t = wH(e, S);
58672
58688
  return /* @__PURE__ */ V("input", {
58673
58689
  type: "hidden",
58674
58690
  form: l,
@@ -58684,9 +58700,9 @@ function kH(e) {
58684
58700
  S,
58685
58701
  L
58686
58702
  ]);
58687
- return /* @__PURE__ */ V(QV.Provider, {
58703
+ return /* @__PURE__ */ V($V.Provider, {
58688
58704
  value: Ve,
58689
- children: /* @__PURE__ */ H($V.Provider, {
58705
+ children: /* @__PURE__ */ H(eH.Provider, {
58690
58706
  value: Ne,
58691
58707
  children: [
58692
58708
  T,
@@ -58700,7 +58716,7 @@ function kH(e) {
58700
58716
  let t = e.currentTarget.value, n = go(eo, e.nativeEvent);
58701
58717
  function r() {
58702
58718
  if (b) return;
58703
- let e = t.toLowerCase(), r = ce.current.findIndex((t) => CH(t, S).toLowerCase() === e || SH(t, x).toLowerCase() === e);
58719
+ let e = t.toLowerCase(), r = ce.current.findIndex((t) => wH(t, S).toLowerCase() === e || CH(t, x).toLowerCase() === e);
58704
58720
  r === -1 && (r = ce.current.findIndex((t, n) => {
58705
58721
  let r = ie.current[n];
58706
58722
  return r != null && r.toLowerCase() === e;
@@ -58732,7 +58748,7 @@ function kH(e) {
58732
58748
  }
58733
58749
  //#endregion
58734
58750
  //#region ../../node_modules/@base-ui/react/utils/useRegisteredLabelId.mjs
58735
- function AH(e, t) {
58751
+ function jH(e, t) {
58736
58752
  let n = Ap(e);
58737
58753
  return K(() => (t(n), () => {
58738
58754
  t(void 0);
@@ -58740,8 +58756,8 @@ function AH(e, t) {
58740
58756
  }
58741
58757
  //#endregion
58742
58758
  //#region ../../node_modules/@base-ui/react/internals/labelable-provider/useLabel.mjs
58743
- function jH(e = {}) {
58744
- let { id: t, fallbackControlId: n, native: r = !1, setLabelId: i, focusControl: a } = e, { controlId: o, setLabelId: s } = fH(), c = AH(t, J((e) => {
58759
+ function MH(e = {}) {
58760
+ let { id: t, fallbackControlId: n, native: r = !1, setLabelId: i, focusControl: a } = e, { controlId: o, setLabelId: s } = pH(), c = jH(t, J((e) => {
58745
58761
  s(e), i?.(e);
58746
58762
  })), l = o ?? n;
58747
58763
  function u(e) {
@@ -58751,7 +58767,7 @@ function jH(e = {}) {
58751
58767
  }
58752
58768
  if (!l) return;
58753
58769
  let t = na(e.currentTarget).getElementById(l);
58754
- Si(t) && MH(t);
58770
+ Si(t) && NH(t);
58755
58771
  }
58756
58772
  function d(e) {
58757
58773
  Ba(e.nativeEvent)?.closest("button,input,select,textarea") || (!e.defaultPrevented && e.detail > 1 && e.preventDefault(), !r && u(e));
@@ -58768,24 +58784,24 @@ function jH(e = {}) {
58768
58784
  }
58769
58785
  };
58770
58786
  }
58771
- function MH(e) {
58787
+ function NH(e) {
58772
58788
  e.focus({ focusVisible: !0 });
58773
58789
  }
58774
58790
  //#endregion
58775
58791
  //#region ../../node_modules/@base-ui/react/utils/resolveAriaLabelledBy.mjs
58776
- function NH(e) {
58792
+ function PH(e) {
58777
58793
  return e == null ? void 0 : `${e}-label`;
58778
58794
  }
58779
- function PH(e, t) {
58795
+ function FH(e, t) {
58780
58796
  return e ?? t;
58781
58797
  }
58782
58798
  //#endregion
58783
58799
  //#region ../../node_modules/@base-ui/react/select/label/SelectLabel.mjs
58784
- var FH = /* @__PURE__ */ y.forwardRef(function(e, t) {
58800
+ var IH = /* @__PURE__ */ y.forwardRef(function(e, t) {
58785
58801
  let { render: n, className: r, style: i, ...a } = e, o = a;
58786
58802
  delete o.id;
58787
- let s = lH(), { store: c } = eH(), l = X(c, $.triggerElement), u = X(c, $.id), d = jH({
58788
- id: NH(u),
58803
+ let s = uH(), { store: c } = tH(), l = X(c, $.triggerElement), u = X(c, $.id), d = MH({
58804
+ id: PH(u),
58789
58805
  fallbackControlId: l?.id ?? u,
58790
58806
  setLabelId(e) {
58791
58807
  c.set("labelId", e);
@@ -58795,20 +58811,20 @@ var FH = /* @__PURE__ */ y.forwardRef(function(e, t) {
58795
58811
  ref: t,
58796
58812
  state: s.state,
58797
58813
  props: [d, a],
58798
- stateAttributesMapping: oH
58814
+ stateAttributesMapping: sH
58799
58815
  });
58800
58816
  });
58801
- process.env.NODE_ENV !== "production" && (FH.displayName = "SelectLabel");
58817
+ process.env.NODE_ENV !== "production" && (IH.displayName = "SelectLabel");
58802
58818
  //#endregion
58803
58819
  //#region ../../node_modules/@base-ui/react/select/trigger/SelectTrigger.mjs
58804
- var IH = 2, LH = 400, RH = {
58820
+ var LH = 2, RH = 400, zH = {
58805
58821
  ..._p,
58806
- ...oH,
58822
+ ...sH,
58807
58823
  popupSide: (e) => e ? { "data-popup-side": e } : null,
58808
58824
  value: () => null
58809
- }, zH = /* @__PURE__ */ y.forwardRef(function(e, t) {
58810
- let { render: n, className: r, id: i, disabled: a = !1, nativeButton: o = !0, style: s, ...c } = e, { setTouched: l, setFocused: u, validationMode: d, state: f, disabled: p } = lH(), { labelId: m } = fH(), { store: h, setOpen: g, selectionRef: _, validation: v, readOnly: b, required: x, alignItemWithTriggerActiveRef: S, disabled: C } = eH(), w = p || C || a, T = X(h, $.open), E = X(h, $.mounted), D = X(h, $.value), O = X(h, $.triggerProps), k = X(h, $.positionerElement), A = X(h, $.listElement), j = X(h, $.popupSide), M = X(h, $.id), N = X(h, $.labelId), P = X(h, $.hasSelectedValue), F = E && k ? j : null, I = i ?? M, L = PH(m, N);
58811
- pH({ id: I });
58825
+ }, BH = /* @__PURE__ */ y.forwardRef(function(e, t) {
58826
+ let { render: n, className: r, id: i, disabled: a = !1, nativeButton: o = !0, style: s, ...c } = e, { setTouched: l, setFocused: u, validationMode: d, state: f, disabled: p } = uH(), { labelId: m } = pH(), { store: h, setOpen: g, selectionRef: _, validation: v, readOnly: b, required: x, alignItemWithTriggerActiveRef: S, disabled: C } = tH(), w = p || C || a, T = X(h, $.open), E = X(h, $.mounted), D = X(h, $.value), O = X(h, $.triggerProps), k = X(h, $.positionerElement), A = X(h, $.listElement), j = X(h, $.popupSide), M = X(h, $.id), N = X(h, $.labelId), P = X(h, $.hasSelectedValue), F = E && k ? j : null, I = i ?? M, L = FH(m, N);
58827
+ mH({ id: I });
58812
58828
  let R = Oo(k), z = y.useRef(null), { getButtonProps: ee, buttonRef: te } = Ep({
58813
58829
  disabled: w,
58814
58830
  native: o
@@ -58816,7 +58832,7 @@ var IH = 2, LH = 400, RH = {
58816
58832
  h.set("triggerElement", e);
58817
58833
  }), re = la(), ie = la(), B = la();
58818
58834
  y.useEffect(() => {
58819
- if (T) return B.start(LH, () => {
58835
+ if (T) return B.start(RH, () => {
58820
58836
  _.current.allowUnselectedMouseUp = !0, _.current.allowSelectedMouseUp = !0;
58821
58837
  }), () => {
58822
58838
  B.clear();
@@ -58858,7 +58874,7 @@ var IH = 2, LH = 400, RH = {
58858
58874
  let t = e.target;
58859
58875
  if (q(z.current, t) || q(R.current, t)) return;
58860
58876
  let n = Pv(z.current);
58861
- e.clientX >= n.left - IH && e.clientX <= n.right + IH && e.clientY >= n.top - IH && e.clientY <= n.bottom + IH || g(!1, go(uo, e));
58877
+ e.clientX >= n.left - LH && e.clientX <= n.right + LH && e.clientY >= n.top - LH && e.clientY <= n.bottom + LH || g(!1, go(uo, e));
58862
58878
  }
58863
58879
  ie.start(0, () => {
58864
58880
  t.addEventListener("mouseup", n, { once: !0 });
@@ -58883,30 +58899,30 @@ var IH = 2, LH = 400, RH = {
58883
58899
  ne
58884
58900
  ],
58885
58901
  state: se,
58886
- stateAttributesMapping: RH,
58902
+ stateAttributesMapping: zH,
58887
58903
  props: oe
58888
58904
  });
58889
58905
  });
58890
- process.env.NODE_ENV !== "production" && (zH.displayName = "SelectTrigger");
58906
+ process.env.NODE_ENV !== "production" && (BH.displayName = "SelectTrigger");
58891
58907
  //#endregion
58892
58908
  //#region ../../node_modules/@base-ui/react/select/value/SelectValue.mjs
58893
- var BH = { value: () => null }, VH = /* @__PURE__ */ y.forwardRef(function(e, t) {
58894
- let { className: n, render: r, children: i, placeholder: a, style: o, ...s } = e, { store: c, valueRef: l } = eH(), u = X(c, $.value), d = X(c, $.items), f = X(c, $.itemToStringLabel), p = X(c, $.hasSelectedValue), m = !p && a != null && i == null, h = X(c, $.hasNullItemLabel, m), g = {
58909
+ var VH = { value: () => null }, HH = /* @__PURE__ */ y.forwardRef(function(e, t) {
58910
+ let { className: n, render: r, children: i, placeholder: a, style: o, ...s } = e, { store: c, valueRef: l } = tH(), u = X(c, $.value), d = X(c, $.items), f = X(c, $.itemToStringLabel), p = X(c, $.hasSelectedValue), m = !p && a != null && i == null, h = X(c, $.hasNullItemLabel, m), g = {
58895
58911
  value: u,
58896
58912
  placeholder: !p
58897
58913
  }, _ = null;
58898
- return _ = typeof i == "function" ? i(u) : i ?? (!p && a != null && !h ? a : Array.isArray(u) ? TH(u, d, f) : wH(u, d, f)), Rc("span", e, {
58914
+ return _ = typeof i == "function" ? i(u) : i ?? (!p && a != null && !h ? a : Array.isArray(u) ? EH(u, d, f) : TH(u, d, f)), Rc("span", e, {
58899
58915
  state: g,
58900
58916
  ref: [t, l],
58901
58917
  props: [{ children: _ }, s],
58902
- stateAttributesMapping: BH
58918
+ stateAttributesMapping: VH
58903
58919
  });
58904
58920
  });
58905
- process.env.NODE_ENV !== "production" && (VH.displayName = "SelectValue");
58921
+ process.env.NODE_ENV !== "production" && (HH.displayName = "SelectValue");
58906
58922
  //#endregion
58907
58923
  //#region ../../node_modules/@base-ui/react/select/icon/SelectIcon.mjs
58908
- var HH = /* @__PURE__ */ y.forwardRef(function(e, t) {
58909
- let { render: n, className: r, style: i, ...a } = e, { store: o } = eH();
58924
+ var UH = /* @__PURE__ */ y.forwardRef(function(e, t) {
58925
+ let { render: n, className: r, style: i, ...a } = e, { store: o } = tH();
58910
58926
  return Rc("span", e, {
58911
58927
  state: { open: X(o, $.open) },
58912
58928
  ref: t,
@@ -58917,16 +58933,16 @@ var HH = /* @__PURE__ */ y.forwardRef(function(e, t) {
58917
58933
  stateAttributesMapping: gp
58918
58934
  });
58919
58935
  });
58920
- process.env.NODE_ENV !== "production" && (HH.displayName = "SelectIcon");
58936
+ process.env.NODE_ENV !== "production" && (UH.displayName = "SelectIcon");
58921
58937
  //#endregion
58922
58938
  //#region ../../node_modules/@base-ui/react/select/portal/SelectPortalContext.mjs
58923
- var UH = /* @__PURE__ */ y.createContext(void 0);
58924
- process.env.NODE_ENV !== "production" && (UH.displayName = "SelectPortalContext");
58939
+ var WH = /* @__PURE__ */ y.createContext(void 0);
58940
+ process.env.NODE_ENV !== "production" && (WH.displayName = "SelectPortalContext");
58925
58941
  //#endregion
58926
58942
  //#region ../../node_modules/@base-ui/react/select/portal/SelectPortal.mjs
58927
- var WH = /* @__PURE__ */ y.forwardRef(function(e, t) {
58928
- let { store: n } = eH(), r = X(n, $.mounted), i = X(n, $.forceMount);
58929
- return r || i ? /* @__PURE__ */ V(UH.Provider, {
58943
+ var GH = /* @__PURE__ */ y.forwardRef(function(e, t) {
58944
+ let { store: n } = tH(), r = X(n, $.mounted), i = X(n, $.forceMount);
58945
+ return r || i ? /* @__PURE__ */ V(WH.Provider, {
58930
58946
  value: !0,
58931
58947
  children: /* @__PURE__ */ V(nl, {
58932
58948
  ref: t,
@@ -58934,14 +58950,14 @@ var WH = /* @__PURE__ */ y.forwardRef(function(e, t) {
58934
58950
  })
58935
58951
  }) : null;
58936
58952
  });
58937
- process.env.NODE_ENV !== "production" && (WH.displayName = "SelectPortal");
58953
+ process.env.NODE_ENV !== "production" && (GH.displayName = "SelectPortal");
58938
58954
  //#endregion
58939
58955
  //#region ../../node_modules/@base-ui/react/select/backdrop/SelectBackdrop.mjs
58940
- var GH = {
58956
+ var KH = {
58941
58957
  ...vp,
58942
58958
  ...Qd
58943
- }, KH = /* @__PURE__ */ y.forwardRef(function(e, t) {
58944
- let { render: n, className: r, style: i, ...a } = e, { store: o } = eH(), s = X(o, $.open), c = X(o, $.mounted);
58959
+ }, qH = /* @__PURE__ */ y.forwardRef(function(e, t) {
58960
+ let { render: n, className: r, style: i, ...a } = e, { store: o } = tH(), s = X(o, $.open), c = X(o, $.mounted);
58945
58961
  return Rc("div", e, {
58946
58962
  state: {
58947
58963
  open: s,
@@ -58956,31 +58972,31 @@ var GH = {
58956
58972
  WebkitUserSelect: "none"
58957
58973
  }
58958
58974
  }, a],
58959
- stateAttributesMapping: GH
58975
+ stateAttributesMapping: KH
58960
58976
  });
58961
58977
  });
58962
- process.env.NODE_ENV !== "production" && (KH.displayName = "SelectBackdrop");
58978
+ process.env.NODE_ENV !== "production" && (qH.displayName = "SelectBackdrop");
58963
58979
  //#endregion
58964
58980
  //#region ../../node_modules/@base-ui/react/select/positioner/SelectPositionerContext.mjs
58965
- var qH = /* @__PURE__ */ y.createContext(void 0);
58966
- process.env.NODE_ENV !== "production" && (qH.displayName = "SelectPositionerContext");
58967
- function JH() {
58968
- let e = y.useContext(qH);
58981
+ var JH = /* @__PURE__ */ y.createContext(void 0);
58982
+ process.env.NODE_ENV !== "production" && (JH.displayName = "SelectPositionerContext");
58983
+ function YH() {
58984
+ let e = y.useContext(JH);
58969
58985
  if (!e) throw Error(process.env.NODE_ENV === "production" ? pc(59) : "Base UI: SelectPositionerContext is missing. SelectPositioner parts must be placed within <Select.Positioner>.");
58970
58986
  return e;
58971
58987
  }
58972
58988
  //#endregion
58973
58989
  //#region ../../node_modules/@base-ui/react/select/popup/utils.mjs
58974
- function YH(e, t) {
58990
+ function XH(e, t) {
58975
58991
  e && Object.assign(e.style, t);
58976
58992
  }
58977
- var XH = {
58993
+ var ZH = {
58978
58994
  position: "relative",
58979
58995
  maxHeight: "100%",
58980
58996
  overflowX: "hidden",
58981
58997
  overflowY: "auto"
58982
- }, ZH = { position: "fixed" }, QH = /* @__PURE__ */ y.forwardRef(function(e, t) {
58983
- let { anchor: n, positionMethod: r = "absolute", className: i, render: a, side: o = "bottom", align: s = "center", sideOffset: c = 0, alignOffset: l = 0, collisionBoundary: u = "clipping-ancestors", collisionPadding: d, arrowPadding: f = 5, sticky: p = !1, disableAnchorTracking: m, alignItemWithTrigger: h = !0, collisionAvoidance: g = Yc, style: _, ...v } = e, { store: b, listRef: x, labelsRef: S, alignItemWithTriggerActiveRef: C, selectedItemTextRef: w, valuesRef: T, initialValueRef: E, popupRef: D, setValue: O } = eH(), k = tH(), A = X(b, $.open), j = X(b, $.mounted), M = X(b, $.modal), N = X(b, $.value), P = X(b, $.openMethod), F = X(b, $.positionerElement), I = X(b, $.triggerElement), L = X(b, $.isItemEqualToValue), R = X(b, $.transitionStatus), z = y.useRef(null), ee = y.useRef(null), [te, ne] = y.useState(h), re = j && te && P !== "touch";
58998
+ }, QH = { position: "fixed" }, $H = /* @__PURE__ */ y.forwardRef(function(e, t) {
58999
+ let { anchor: n, positionMethod: r = "absolute", className: i, render: a, side: o = "bottom", align: s = "center", sideOffset: c = 0, alignOffset: l = 0, collisionBoundary: u = "clipping-ancestors", collisionPadding: d, arrowPadding: f = 5, sticky: p = !1, disableAnchorTracking: m, alignItemWithTrigger: h = !0, collisionAvoidance: g = Yc, style: _, ...v } = e, { store: b, listRef: x, labelsRef: S, alignItemWithTriggerActiveRef: C, selectedItemTextRef: w, valuesRef: T, initialValueRef: E, popupRef: D, setValue: O } = tH(), k = nH(), A = X(b, $.open), j = X(b, $.mounted), M = X(b, $.modal), N = X(b, $.value), P = X(b, $.openMethod), F = X(b, $.positionerElement), I = X(b, $.triggerElement), L = X(b, $.isItemEqualToValue), R = X(b, $.transitionStatus), z = y.useRef(null), ee = y.useRef(null), [te, ne] = y.useState(h), re = j && te && P !== "touch";
58984
59000
  !j && te !== h && ne(h), K(() => {
58985
59001
  j || ($.scrollUpArrowVisible(b.state) && b.set("scrollUpArrowVisible", !1), $.scrollDownArrowVisible(b.state) && b.set("scrollDownArrowVisible", !1));
58986
59002
  }, [b, j]), y.useImperativeHandle(C, () => re), _v((re || M) && A, P === "touch", F, I);
@@ -59000,7 +59016,7 @@ var XH = {
59000
59016
  disableAnchorTracking: m ?? re,
59001
59017
  collisionAvoidance: g,
59002
59018
  keepMounted: !0
59003
- }), B = re ? "none" : ie.side, ae = re ? ZH : ie.positionerStyles, oe = {
59019
+ }), B = re ? "none" : ie.side, ae = re ? QH : ie.positionerStyles, oe = {
59004
59020
  open: A,
59005
59021
  side: B,
59006
59022
  align: ie.align,
@@ -59023,13 +59039,13 @@ var XH = {
59023
59039
  let t = ce.current;
59024
59040
  if (ce.current = e.size, e.size === t) return;
59025
59041
  let n = go(eo);
59026
- if (t !== 0 && !b.state.multiple && N !== null && _H(T.current, N, L) === -1) {
59027
- let e = E.current, t = e != null && _H(T.current, e, L) !== -1 ? e : null;
59042
+ if (t !== 0 && !b.state.multiple && N !== null && vH(T.current, N, L) === -1) {
59043
+ let e = E.current, t = e != null && vH(T.current, e, L) !== -1 ? e : null;
59028
59044
  O(t, n), t === null && (b.set("selectedIndex", null), w.current = null);
59029
59045
  }
59030
59046
  if (t !== 0 && b.state.multiple && Array.isArray(N)) {
59031
- let e = (e) => _H(T.current, e, L) !== -1, t = N.filter((t) => e(t));
59032
- (t.length !== N.length || t.some((e) => !gH(N, e, L))) && (O(t, n), t.length === 0 && (b.set("selectedIndex", null), w.current = null));
59047
+ let e = (e) => vH(T.current, e, L) !== -1, t = N.filter((t) => e(t));
59048
+ (t.length !== N.length || t.some((e) => !_H(N, e, L))) && (O(t, n), t.length === 0 && (b.set("selectedIndex", null), w.current = null));
59033
59049
  }
59034
59050
  if (A && re) {
59035
59051
  b.update({
@@ -59037,7 +59053,7 @@ var XH = {
59037
59053
  scrollDownArrowVisible: !1
59038
59054
  });
59039
59055
  let e = { height: "" };
59040
- YH(F, e), YH(D.current, e);
59056
+ XH(F, e), XH(D.current, e);
59041
59057
  }
59042
59058
  }), ue = y.useMemo(() => ({
59043
59059
  ...ie,
@@ -59056,7 +59072,7 @@ var XH = {
59056
59072
  elementsRef: x,
59057
59073
  labelsRef: S,
59058
59074
  onMapChange: le,
59059
- children: /* @__PURE__ */ H(qH.Provider, {
59075
+ children: /* @__PURE__ */ H(JH.Provider, {
59060
59076
  value: ue,
59061
59077
  children: [j && M && /* @__PURE__ */ V(Jp, {
59062
59078
  inert: qp(!A),
@@ -59065,14 +59081,14 @@ var XH = {
59065
59081
  })
59066
59082
  });
59067
59083
  });
59068
- process.env.NODE_ENV !== "production" && (QH.displayName = "SelectPositioner");
59084
+ process.env.NODE_ENV !== "production" && ($H.displayName = "SelectPositioner");
59069
59085
  //#endregion
59070
59086
  //#region ../../node_modules/@base-ui/react/select/popup/SelectPopup.mjs
59071
- var $H = {
59087
+ var eU = {
59072
59088
  ...vp,
59073
59089
  ...Qd
59074
- }, eU = /* @__PURE__ */ y.forwardRef(function(e, t) {
59075
- let { render: n, className: r, style: i, finalFocus: a, ...o } = e, { store: s, popupRef: c, onOpenChangeComplete: l, setOpen: u, valueRef: d, firstItemTextRef: f, selectedItemTextRef: p, multiple: m, handleScrollArrowVisibility: h, scrollHandlerRef: g, listRef: _, highlightItemOnHover: v } = eH(), { side: b, align: x, alignItemWithTriggerActive: S, isPositioned: C, setControlledAlignItemWithTrigger: w } = JH(), T = ov(!0) != null, E = tH(), D = dg(), { nonce: O, disableStyleElements: k } = TV(), A = X(s, $.id), j = X(s, $.open), M = X(s, $.openMethod), N = X(s, $.mounted), P = X(s, $.popupProps), F = X(s, $.transitionStatus), I = X(s, $.triggerElement), L = X(s, $.positionerElement), R = X(s, $.listElement), z = y.useRef(!1), ee = y.useRef(!1), te = y.useRef({}), ne = ma(), re = J((e) => {
59090
+ }, tU = /* @__PURE__ */ y.forwardRef(function(e, t) {
59091
+ let { render: n, className: r, style: i, finalFocus: a, ...o } = e, { store: s, popupRef: c, onOpenChangeComplete: l, setOpen: u, valueRef: d, firstItemTextRef: f, selectedItemTextRef: p, multiple: m, handleScrollArrowVisibility: h, scrollHandlerRef: g, listRef: _, highlightItemOnHover: v } = tH(), { side: b, align: x, alignItemWithTriggerActive: S, isPositioned: C, setControlledAlignItemWithTrigger: w } = YH(), T = ov(!0) != null, E = nH(), D = dg(), { nonce: O, disableStyleElements: k } = EV(), A = X(s, $.id), j = X(s, $.open), M = X(s, $.openMethod), N = X(s, $.mounted), P = X(s, $.popupProps), F = X(s, $.transitionStatus), I = X(s, $.triggerElement), L = X(s, $.positionerElement), R = X(s, $.listElement), z = y.useRef(!1), ee = y.useRef(!1), te = y.useRef({}), ne = ma(), re = J((e) => {
59076
59092
  if (!L || !c.current || !ee.current) return;
59077
59093
  if (z.current || !S) {
59078
59094
  h();
@@ -59083,10 +59099,10 @@ var $H = {
59083
59099
  h();
59084
59100
  return;
59085
59101
  }
59086
- let r = rU(L), i = iU(L.getBoundingClientRect().height, "y", r), a = na(L), o = vi(L), s = o.getComputedStyle(L), l = parseFloat(s.marginTop), u = parseFloat(s.marginBottom), d = tU(o.getComputedStyle(c.current)), f = Math.min(a.documentElement.clientHeight - l - u, d), p = e.scrollTop, m = nU(e), g = 0, _ = null, v = !1, y = !1, b = (e) => {
59102
+ let r = iU(L), i = aU(L.getBoundingClientRect().height, "y", r), a = na(L), o = vi(L), s = o.getComputedStyle(L), l = parseFloat(s.marginTop), u = parseFloat(s.marginBottom), d = nU(o.getComputedStyle(c.current)), f = Math.min(a.documentElement.clientHeight - l - u, d), p = e.scrollTop, m = rU(e), g = 0, _ = null, v = !1, y = !1, b = (e) => {
59087
59103
  L.style.height = `${e}px`;
59088
59104
  }, x = (t, n) => {
59089
- let r = PV(t, 0, f - i);
59105
+ let r = FV(t, 0, f - i);
59090
59106
  r > 0 && b(i + r), e.scrollTop = n, f - (i + r) <= 1 && (z.current = !0), h();
59091
59107
  }, C = t ? m - p : p, w = Math.min(i + C, f);
59092
59108
  if (g = w, C <= 1) {
@@ -59094,7 +59110,7 @@ var $H = {
59094
59110
  return;
59095
59111
  }
59096
59112
  if (f - w > 1 ? t ? y = !0 : _ = 0 : (v = !0, n && p < m && (_ = p - (C - (i + C - f)))), g = Math.ceil(g), g !== 0 && b(g), y || _ != null) {
59097
- let t = nU(e), n = y ? t : PV(_, 0, t);
59113
+ let t = rU(e), n = y ? t : FV(_, 0, t);
59098
59114
  Math.abs(e.scrollTop - n) > 1 && (e.scrollTop = n);
59099
59115
  }
59100
59116
  (v || g >= f - 1) && (z.current = !0), h();
@@ -59125,7 +59141,7 @@ var $H = {
59125
59141
  marginBottom: L.style.marginBottom
59126
59142
  });
59127
59143
  }, [c, L]), K(() => {
59128
- j || S || (ee.current = !1, z.current = !1, YH(L, te.current));
59144
+ j || S || (ee.current = !1, z.current = !1, XH(L, te.current));
59129
59145
  }, [
59130
59146
  j,
59131
59147
  S,
@@ -59138,34 +59154,34 @@ var $H = {
59138
59154
  ee.current = !0, ne.request(h), e.style.removeProperty("--transform-origin");
59139
59155
  return;
59140
59156
  }
59141
- let t = sU(e);
59157
+ let t = cU(e);
59142
59158
  e.style.removeProperty("--transform-origin");
59143
59159
  try {
59144
59160
  let t = p.current;
59145
59161
  t?.isConnected || (t = !$.hasSelectedValue(s.state) && f.current?.isConnected ? f.current : null);
59146
- let n = d.current, r = vi(L), i = r.getComputedStyle(L), a = r.getComputedStyle(e), o = na(I), c = rU(I), l = aU(I.getBoundingClientRect(), c), u = aU(L.getBoundingClientRect(), c), m = l.height, g = R || e, y = g.scrollHeight, b = parseFloat(a.borderBottomWidth), x = parseFloat(i.marginTop) || 10, S = parseFloat(i.marginBottom) || 10, C = parseFloat(i.minHeight) || 100, T = tU(a), E = o.documentElement.clientHeight - x - S, O = o.documentElement.clientWidth, k = E - l.bottom + m, A, j = D === "rtl" ? l.right - u.width : l.left, M = 0;
59162
+ let n = d.current, r = vi(L), i = r.getComputedStyle(L), a = r.getComputedStyle(e), o = na(I), c = iU(I), l = oU(I.getBoundingClientRect(), c), u = oU(L.getBoundingClientRect(), c), m = l.height, g = R || e, y = g.scrollHeight, b = parseFloat(a.borderBottomWidth), x = parseFloat(i.marginTop) || 10, S = parseFloat(i.marginBottom) || 10, C = parseFloat(i.minHeight) || 100, T = nU(a), E = o.documentElement.clientHeight - x - S, O = o.documentElement.clientWidth, k = E - l.bottom + m, A, j = D === "rtl" ? l.right - u.width : l.left, M = 0;
59147
59163
  if (t && n) {
59148
- let e = aU(n.getBoundingClientRect(), c);
59149
- A = aU(t.getBoundingClientRect(), c), j = u.left + (D === "rtl" ? e.right - A.right : e.left - A.left);
59164
+ let e = oU(n.getBoundingClientRect(), c);
59165
+ A = oU(t.getBoundingClientRect(), c), j = u.left + (D === "rtl" ? e.right - A.right : e.left - A.left);
59150
59166
  let r = e.top - l.top + e.height / 2;
59151
59167
  M = A.top - u.top + A.height / 2 - r;
59152
59168
  }
59153
59169
  let N = k + M + S + b, P = Math.min(E, N), F = E - x - S, ne = N - P, re = O - 5;
59154
- L.style.left = `${PV(j, 5, re - u.width)}px`, L.style.height = `${P}px`, L.style.maxHeight = "none", L.style.marginTop = `${x}px`, L.style.marginBottom = `${S}px`, e.style.height = "100%";
59155
- let ie = nU(g), B = ne >= ie - 1;
59170
+ L.style.left = `${FV(j, 5, re - u.width)}px`, L.style.height = `${P}px`, L.style.maxHeight = "none", L.style.marginTop = `${x}px`, L.style.marginBottom = `${S}px`, e.style.height = "100%";
59171
+ let ie = rU(g), B = ne >= ie - 1;
59156
59172
  B && (P = Math.min(E, u.height) - (ne - ie));
59157
59173
  let ae = l.top < 20 || l.bottom > E - 20 || Math.ceil(P) + 1 < Math.min(y, C), oe = (r.visualViewport?.scale ?? 1) !== 1 && $i;
59158
59174
  if (ae || oe) {
59159
- ee.current = !0, YH(L, te.current), w(!1);
59175
+ ee.current = !0, XH(L, te.current), w(!1);
59160
59176
  return;
59161
59177
  }
59162
59178
  let se = Math.max(C, P);
59163
59179
  if (B) {
59164
59180
  let e = Math.max(0, E - N);
59165
- L.style.top = u.height >= F ? "0" : `${e}px`, L.style.height = `${P}px`, g.scrollTop = nU(g);
59181
+ L.style.top = u.height >= F ? "0" : `${e}px`, L.style.height = `${P}px`, g.scrollTop = rU(g);
59166
59182
  } else L.style.bottom = "0", g.scrollTop = ne;
59167
59183
  if (A) {
59168
- let t = u.top, n = u.height, r = A.top + A.height / 2, i = PV(n > 0 ? (r - t) / n * 100 : 50, 0, 100);
59184
+ let t = u.top, n = u.height, r = A.top + A.height / 2, i = FV(n > 0 ? (r - t) / n * 100 : 50, 0, 100);
59169
59185
  e.style.setProperty("--transform-origin", `50% ${i}%`);
59170
59186
  }
59171
59187
  (se === E || P >= T) && (z.current = !0), h(), v && s.state.selectedIndex === null && s.state.activeIndex === null && _.current[0] != null && s.set("activeIndex", 0), ee.current = !0;
@@ -59218,20 +59234,20 @@ var $H = {
59218
59234
  onScroll(e) {
59219
59235
  R || re(e.currentTarget);
59220
59236
  },
59221
- ...S && { style: R ? { height: "100%" } : XH }
59237
+ ...S && { style: R ? { height: "100%" } : ZH }
59222
59238
  }, ae = Rc("div", e, {
59223
59239
  ref: [t, c],
59224
59240
  state: ie,
59225
- stateAttributesMapping: $H,
59241
+ stateAttributesMapping: eU,
59226
59242
  props: [
59227
59243
  P,
59228
59244
  B,
59229
59245
  Sg(F),
59230
- { className: !R && S ? bV.className : void 0 },
59246
+ { className: !R && S ? xV.className : void 0 },
59231
59247
  o
59232
59248
  ]
59233
59249
  });
59234
- return /* @__PURE__ */ H(y.Fragment, { children: [!k && bV.getElement(O), /* @__PURE__ */ V(xl, {
59250
+ return /* @__PURE__ */ H(y.Fragment, { children: [!k && xV.getElement(O), /* @__PURE__ */ V(xl, {
59235
59251
  context: E,
59236
59252
  modal: !1,
59237
59253
  disabled: !N,
@@ -59241,38 +59257,38 @@ var $H = {
59241
59257
  children: ae
59242
59258
  })] });
59243
59259
  });
59244
- process.env.NODE_ENV !== "production" && (eU.displayName = "SelectPopup");
59245
- function tU(e) {
59260
+ process.env.NODE_ENV !== "production" && (tU.displayName = "SelectPopup");
59261
+ function nU(e) {
59246
59262
  let t = e.maxHeight || "";
59247
59263
  return t.endsWith("px") && parseFloat(t) || Infinity;
59248
59264
  }
59249
- function nU(e) {
59250
- return IV(e.scrollHeight, e.clientHeight);
59251
- }
59252
59265
  function rU(e) {
59266
+ return LV(e.scrollHeight, e.clientHeight);
59267
+ }
59268
+ function iU(e) {
59253
59269
  return hu.getScale(e);
59254
59270
  }
59255
- function iU(e, t, n) {
59271
+ function aU(e, t, n) {
59256
59272
  return e / n[t];
59257
59273
  }
59258
- function aU(e, t) {
59274
+ function oU(e, t) {
59259
59275
  return fs({
59260
- x: iU(e.x, "x", t),
59261
- y: iU(e.y, "y", t),
59262
- width: iU(e.width, "x", t),
59263
- height: iU(e.height, "y", t)
59276
+ x: aU(e.x, "x", t),
59277
+ y: aU(e.y, "y", t),
59278
+ width: aU(e.width, "x", t),
59279
+ height: aU(e.height, "y", t)
59264
59280
  });
59265
59281
  }
59266
- var oU = [
59282
+ var sU = [
59267
59283
  ["transform", "none"],
59268
59284
  ["scale", "1"],
59269
59285
  ["translate", "0 0"]
59270
59286
  ];
59271
- function sU(e) {
59287
+ function cU(e) {
59272
59288
  let { style: t } = e, n = {};
59273
- for (let [e, r] of oU) n[e] = t.getPropertyValue(e), t.setProperty(e, r, "important");
59289
+ for (let [e, r] of sU) n[e] = t.getPropertyValue(e), t.setProperty(e, r, "important");
59274
59290
  return () => {
59275
- for (let [e] of oU) {
59291
+ for (let [e] of sU) {
59276
59292
  let r = n[e];
59277
59293
  r ? t.setProperty(e, r) : t.removeProperty(e);
59278
59294
  }
@@ -59280,16 +59296,16 @@ function sU(e) {
59280
59296
  }
59281
59297
  //#endregion
59282
59298
  //#region ../../node_modules/@base-ui/react/select/list/SelectList.mjs
59283
- var cU = /* @__PURE__ */ y.forwardRef(function(e, t) {
59284
- let { render: n, className: r, style: i, ...a } = e, { store: o, scrollHandlerRef: s } = eH(), { alignItemWithTriggerActive: c } = JH(), l = X(o, $.hasScrollArrows), u = X(o, $.openMethod), d = X(o, $.multiple), f = {
59299
+ var lU = /* @__PURE__ */ y.forwardRef(function(e, t) {
59300
+ let { render: n, className: r, style: i, ...a } = e, { store: o, scrollHandlerRef: s } = tH(), { alignItemWithTriggerActive: c } = YH(), l = X(o, $.hasScrollArrows), u = X(o, $.openMethod), d = X(o, $.multiple), f = {
59285
59301
  id: `${X(o, $.id)}-list`,
59286
59302
  role: "listbox",
59287
59303
  "aria-multiselectable": d || void 0,
59288
59304
  onScroll(e) {
59289
59305
  s.current?.(e.currentTarget);
59290
59306
  },
59291
- ...c && { style: XH },
59292
- className: l && u !== "touch" ? bV.className : void 0
59307
+ ...c && { style: ZH },
59308
+ className: l && u !== "touch" ? xV.className : void 0
59293
59309
  };
59294
59310
  return Rc("div", e, {
59295
59311
  ref: [t, J((e) => {
@@ -59298,24 +59314,24 @@ var cU = /* @__PURE__ */ y.forwardRef(function(e, t) {
59298
59314
  props: [f, a]
59299
59315
  });
59300
59316
  });
59301
- process.env.NODE_ENV !== "production" && (cU.displayName = "SelectList");
59317
+ process.env.NODE_ENV !== "production" && (lU.displayName = "SelectList");
59302
59318
  //#endregion
59303
59319
  //#region ../../node_modules/@base-ui/react/select/item/SelectItemContext.mjs
59304
- var lU = /* @__PURE__ */ y.createContext(void 0);
59305
- process.env.NODE_ENV !== "production" && (lU.displayName = "SelectItemContext");
59306
- function uU() {
59307
- let e = y.useContext(lU);
59320
+ var uU = /* @__PURE__ */ y.createContext(void 0);
59321
+ process.env.NODE_ENV !== "production" && (uU.displayName = "SelectItemContext");
59322
+ function dU() {
59323
+ let e = y.useContext(uU);
59308
59324
  if (!e) throw Error(process.env.NODE_ENV === "production" ? pc(57) : "Base UI: SelectItemContext is missing. SelectItem parts must be placed within <Select.Item>.");
59309
59325
  return e;
59310
59326
  }
59311
59327
  //#endregion
59312
59328
  //#region ../../node_modules/@base-ui/react/select/item/SelectItem.mjs
59313
- var dU = /* @__PURE__ */ y.memo(/* @__PURE__ */ y.forwardRef(function(e, t) {
59329
+ var fU = /* @__PURE__ */ y.memo(/* @__PURE__ */ y.forwardRef(function(e, t) {
59314
59330
  let { render: n, className: r, style: i, value: a = null, label: o, disabled: s = !1, nativeButton: c = !1, ...l } = e, u = y.useRef(null), d = J_({
59315
59331
  label: o,
59316
59332
  textRef: u,
59317
59333
  indexGuessBehavior: q_.GuessFromOrder
59318
- }), { store: f, itemProps: p, setOpen: m, setValue: h, selectionRef: g, typingRef: _, valuesRef: v, multiple: b, selectedItemTextRef: x, disabled: S, readOnly: C } = eH(), w = X(f, $.isActive, d.index), T = X(f, $.open), E = X(f, $.isSelected, a), D = X(f, $.isSelectedByFocus, d.index), O = X(f, $.isItemEqualToValue), k = d.index, A = k !== -1, j = y.useRef(null);
59334
+ }), { store: f, itemProps: p, setOpen: m, setValue: h, selectionRef: g, typingRef: _, valuesRef: v, multiple: b, selectedItemTextRef: x, disabled: S, readOnly: C } = tH(), w = X(f, $.isActive, d.index), T = X(f, $.open), E = X(f, $.isSelected, a), D = X(f, $.isSelectedByFocus, d.index), O = X(f, $.isItemEqualToValue), k = d.index, A = k !== -1, j = y.useRef(null);
59319
59335
  K(() => {
59320
59336
  if (!A) return;
59321
59337
  let e = v.current;
@@ -59330,7 +59346,7 @@ var dU = /* @__PURE__ */ y.memo(/* @__PURE__ */ y.forwardRef(function(e, t) {
59330
59346
  ]), K(() => {
59331
59347
  if (!A) return;
59332
59348
  let e = f.state.value, t = e;
59333
- b && Array.isArray(e) && (t = e.length > 0 ? e[e.length - 1] : void 0), t !== void 0 && hH(a, t, O) && (f.set("selectedIndex", k), u.current && (x.current = u.current));
59349
+ b && Array.isArray(e) && (t = e.length > 0 ? e[e.length - 1] : void 0), t !== void 0 && gH(a, t, O) && (f.set("selectedIndex", k), u.current && (x.current = u.current));
59334
59350
  }, [
59335
59351
  A,
59336
59352
  k,
@@ -59355,7 +59371,7 @@ var dU = /* @__PURE__ */ y.memo(/* @__PURE__ */ y.forwardRef(function(e, t) {
59355
59371
  let t = f.state.value;
59356
59372
  if (b) {
59357
59373
  let n = Array.isArray(t) ? t : [];
59358
- h(E ? vH(n, a, O) : [...n, a], go(ao, e));
59374
+ h(E ? yH(n, a, O) : [...n, a], go(ao, e));
59359
59375
  } else h(a, go(ao, e)), m(!1, go(ao, e));
59360
59376
  }
59361
59377
  function z() {
@@ -59416,24 +59432,24 @@ var dU = /* @__PURE__ */ y.memo(/* @__PURE__ */ y.forwardRef(function(e, t) {
59416
59432
  D,
59417
59433
  A
59418
59434
  ]);
59419
- return /* @__PURE__ */ V(lU.Provider, {
59435
+ return /* @__PURE__ */ V(uU.Provider, {
59420
59436
  value: ne,
59421
59437
  children: te
59422
59438
  });
59423
59439
  }));
59424
- process.env.NODE_ENV !== "production" && (dU.displayName = "SelectItem");
59440
+ process.env.NODE_ENV !== "production" && (fU.displayName = "SelectItem");
59425
59441
  //#endregion
59426
59442
  //#region ../../node_modules/@base-ui/react/select/item-indicator/SelectItemIndicator.mjs
59427
- var fU = /* @__PURE__ */ y.forwardRef(function(e, t) {
59428
- let n = e.keepMounted ?? !1, { selected: r } = uU();
59429
- return n || r ? /* @__PURE__ */ V(pU, {
59443
+ var pU = /* @__PURE__ */ y.forwardRef(function(e, t) {
59444
+ let n = e.keepMounted ?? !1, { selected: r } = dU();
59445
+ return n || r ? /* @__PURE__ */ V(mU, {
59430
59446
  ...e,
59431
59447
  ref: t
59432
59448
  }) : null;
59433
59449
  });
59434
- process.env.NODE_ENV !== "production" && (fU.displayName = "SelectItemIndicator");
59435
- var pU = /* @__PURE__ */ y.memo(/* @__PURE__ */ y.forwardRef((e, t) => {
59436
- let { render: n, className: r, style: i, keepMounted: a, ...o } = e, { selected: s } = uU(), c = y.useRef(null), { transitionStatus: l, setMounted: u } = Jd(s), d = Rc("span", e, {
59450
+ process.env.NODE_ENV !== "production" && (pU.displayName = "SelectItemIndicator");
59451
+ var mU = /* @__PURE__ */ y.memo(/* @__PURE__ */ y.forwardRef((e, t) => {
59452
+ let { render: n, className: r, style: i, keepMounted: a, ...o } = e, { selected: s } = dU(), c = y.useRef(null), { transitionStatus: l, setMounted: u } = Jd(s), d = Rc("span", e, {
59437
59453
  ref: [t, c],
59438
59454
  state: {
59439
59455
  selected: s,
@@ -59453,11 +59469,11 @@ var pU = /* @__PURE__ */ y.memo(/* @__PURE__ */ y.forwardRef((e, t) => {
59453
59469
  }
59454
59470
  }), d;
59455
59471
  }));
59456
- process.env.NODE_ENV !== "production" && (pU.displayName = "Inner");
59472
+ process.env.NODE_ENV !== "production" && (mU.displayName = "Inner");
59457
59473
  //#endregion
59458
59474
  //#region ../../node_modules/@base-ui/react/select/item-text/SelectItemText.mjs
59459
- var mU = /* @__PURE__ */ y.memo(/* @__PURE__ */ y.forwardRef(function(e, t) {
59460
- let { index: n, textRef: r, selectedByFocus: i, hasRegistered: a } = uU(), { firstItemTextRef: o, selectedItemTextRef: s } = eH(), { render: c, className: l, style: u, ...d } = e;
59475
+ var hU = /* @__PURE__ */ y.memo(/* @__PURE__ */ y.forwardRef(function(e, t) {
59476
+ let { index: n, textRef: r, selectedByFocus: i, hasRegistered: a } = dU(), { firstItemTextRef: o, selectedItemTextRef: s } = tH(), { render: c, className: l, style: u, ...d } = e;
59461
59477
  return Rc("div", e, {
59462
59478
  ref: [
59463
59479
  y.useCallback((e) => {
@@ -59475,14 +59491,14 @@ var mU = /* @__PURE__ */ y.memo(/* @__PURE__ */ y.forwardRef(function(e, t) {
59475
59491
  props: d
59476
59492
  });
59477
59493
  }));
59478
- process.env.NODE_ENV !== "production" && (mU.displayName = "SelectItemText");
59494
+ process.env.NODE_ENV !== "production" && (hU.displayName = "SelectItemText");
59479
59495
  //#endregion
59480
59496
  //#region ../../node_modules/@base-ui/react/select/arrow/SelectArrow.mjs
59481
- var hU = {
59497
+ var gU = {
59482
59498
  ...vp,
59483
59499
  ...Qd
59484
- }, gU = /* @__PURE__ */ y.forwardRef(function(e, t) {
59485
- let { render: n, className: r, style: i, ...a } = e, { store: o } = eH(), { side: s, align: c, arrowRef: l, arrowStyles: u, arrowUncentered: d, alignItemWithTriggerActive: f } = JH(), p = Rc("div", e, {
59500
+ }, _U = /* @__PURE__ */ y.forwardRef(function(e, t) {
59501
+ let { render: n, className: r, style: i, ...a } = e, { store: o } = tH(), { side: s, align: c, arrowRef: l, arrowStyles: u, arrowUncentered: d, alignItemWithTriggerActive: f } = YH(), p = Rc("div", e, {
59486
59502
  state: {
59487
59503
  open: X(o, $.open),
59488
59504
  side: s,
@@ -59494,15 +59510,15 @@ var hU = {
59494
59510
  style: u,
59495
59511
  "aria-hidden": !0
59496
59512
  }, a],
59497
- stateAttributesMapping: hU
59513
+ stateAttributesMapping: gU
59498
59514
  });
59499
59515
  return f ? null : p;
59500
59516
  });
59501
- process.env.NODE_ENV !== "production" && (gU.displayName = "SelectArrow");
59517
+ process.env.NODE_ENV !== "production" && (_U.displayName = "SelectArrow");
59502
59518
  //#endregion
59503
59519
  //#region ../../node_modules/@base-ui/react/select/scroll-arrow/SelectScrollArrow.mjs
59504
- var _U = /* @__PURE__ */ y.forwardRef(function(e, t) {
59505
- let { render: n, className: r, style: i, direction: a, keepMounted: o = !1, ...s } = e, c = a === "up", { store: l, popupRef: u, listRef: d, handleScrollArrowVisibility: f, scrollArrowsMountedCountRef: p } = eH(), { side: m, scrollDownArrowRef: h, scrollUpArrowRef: g } = JH(), _ = X(l, c ? $.scrollUpArrowVisible : $.scrollDownArrowVisible), v = X(l, $.openMethod), y = _ && v !== "touch", b = la(), x = c ? g : h, { mounted: S, transitionStatus: C, setMounted: w } = Jd(y);
59520
+ var vU = /* @__PURE__ */ y.forwardRef(function(e, t) {
59521
+ let { render: n, className: r, style: i, direction: a, keepMounted: o = !1, ...s } = e, c = a === "up", { store: l, popupRef: u, listRef: d, handleScrollArrowVisibility: f, scrollArrowsMountedCountRef: p } = tH(), { side: m, scrollDownArrowRef: h, scrollUpArrowRef: g } = YH(), _ = X(l, c ? $.scrollUpArrowVisible : $.scrollDownArrowVisible), v = X(l, $.openMethod), y = _ && v !== "touch", b = la(), x = c ? g : h, { mounted: S, transitionStatus: C, setMounted: w } = Jd(y);
59506
59522
  K(() => (p.current += 1, l.state.hasScrollArrows || l.set("hasScrollArrows", !0), () => {
59507
59523
  p.current = Math.max(0, p.current - 1), p.current === 0 && l.state.hasScrollArrows && l.set("hasScrollArrows", !1);
59508
59524
  }), [l, p]), ef({
@@ -59531,14 +59547,14 @@ var _U = /* @__PURE__ */ y.forwardRef(function(e, t) {
59531
59547
  let e = l.state.listElement ?? u.current;
59532
59548
  if (!e) return;
59533
59549
  l.set("activeIndex", null), f();
59534
- let n = IV(e.scrollHeight, e.clientHeight), r = LV(e.scrollTop, n), i = r === (c ? 0 : n), a = d.current;
59550
+ let n = LV(e.scrollHeight, e.clientHeight), r = RV(e.scrollTop, n), i = r === (c ? 0 : n), a = d.current;
59535
59551
  if (r !== e.scrollTop && (e.scrollTop = r), a.length === 0 && l.set(c ? "scrollUpArrowVisible" : "scrollDownArrowVisible", !i), i) {
59536
59552
  b.clear();
59537
59553
  return;
59538
59554
  }
59539
59555
  if (a.length > 0) {
59540
59556
  let t = x.current?.offsetHeight || 0;
59541
- e.scrollTop = vU(a, c, r, e.clientHeight, t, n);
59557
+ e.scrollTop = yU(a, c, r, e.clientHeight, t, n);
59542
59558
  }
59543
59559
  b.start(40, t);
59544
59560
  }
@@ -59552,8 +59568,8 @@ var _U = /* @__PURE__ */ y.forwardRef(function(e, t) {
59552
59568
  });
59553
59569
  return S || o ? T : null;
59554
59570
  });
59555
- process.env.NODE_ENV !== "production" && (_U.displayName = "SelectScrollArrow");
59556
- function vU(e, t, n, r, i, a) {
59571
+ process.env.NODE_ENV !== "production" && (vU.displayName = "SelectScrollArrow");
59572
+ function yU(e, t, n, r, i, a) {
59557
59573
  if (t) {
59558
59574
  let t = 0, r = n + i - 1;
59559
59575
  for (let n = 0; n < e.length; n += 1) {
@@ -59564,7 +59580,7 @@ function vU(e, t, n, r, i, a) {
59564
59580
  }
59565
59581
  }
59566
59582
  let o = Math.max(0, t - 1), s = e[o];
59567
- return o < t && s ? LV(s.offsetTop - i, a) : 0;
59583
+ return o < t && s ? RV(s.offsetTop - i, a) : 0;
59568
59584
  }
59569
59585
  let o = e.length - 1, s = n + r - i + 1;
59570
59586
  for (let t = 0; t < e.length; t += 1) {
@@ -59575,40 +59591,40 @@ function vU(e, t, n, r, i, a) {
59575
59591
  }
59576
59592
  }
59577
59593
  let c = Math.min(e.length - 1, o + 1), l = e[c];
59578
- return c > o && l ? LV(l.offsetTop + l.offsetHeight - r + i, a) : a;
59594
+ return c > o && l ? RV(l.offsetTop + l.offsetHeight - r + i, a) : a;
59579
59595
  }
59580
59596
  //#endregion
59581
59597
  //#region ../../node_modules/@base-ui/react/select/scroll-down-arrow/SelectScrollDownArrow.mjs
59582
- var yU = /* @__PURE__ */ y.forwardRef(function(e, t) {
59583
- return /* @__PURE__ */ V(_U, {
59598
+ var bU = /* @__PURE__ */ y.forwardRef(function(e, t) {
59599
+ return /* @__PURE__ */ V(vU, {
59584
59600
  ...e,
59585
59601
  ref: t,
59586
59602
  direction: "down"
59587
59603
  });
59588
59604
  });
59589
- process.env.NODE_ENV !== "production" && (yU.displayName = "SelectScrollDownArrow");
59605
+ process.env.NODE_ENV !== "production" && (bU.displayName = "SelectScrollDownArrow");
59590
59606
  //#endregion
59591
59607
  //#region ../../node_modules/@base-ui/react/select/scroll-up-arrow/SelectScrollUpArrow.mjs
59592
- var bU = /* @__PURE__ */ y.forwardRef(function(e, t) {
59593
- return /* @__PURE__ */ V(_U, {
59608
+ var xU = /* @__PURE__ */ y.forwardRef(function(e, t) {
59609
+ return /* @__PURE__ */ V(vU, {
59594
59610
  ...e,
59595
59611
  ref: t,
59596
59612
  direction: "up"
59597
59613
  });
59598
59614
  });
59599
- process.env.NODE_ENV !== "production" && (bU.displayName = "SelectScrollUpArrow");
59615
+ process.env.NODE_ENV !== "production" && (xU.displayName = "SelectScrollUpArrow");
59600
59616
  //#endregion
59601
59617
  //#region ../../node_modules/@base-ui/react/select/group/SelectGroupContext.mjs
59602
- var xU = /* @__PURE__ */ y.createContext(void 0);
59603
- process.env.NODE_ENV !== "production" && (xU.displayName = "SelectGroupContext");
59604
- function SU() {
59605
- let e = y.useContext(xU);
59618
+ var SU = /* @__PURE__ */ y.createContext(void 0);
59619
+ process.env.NODE_ENV !== "production" && (SU.displayName = "SelectGroupContext");
59620
+ function CU() {
59621
+ let e = y.useContext(SU);
59606
59622
  if (e === void 0) throw Error(process.env.NODE_ENV === "production" ? pc(56) : "Base UI: SelectGroupContext is missing. SelectGroup parts must be placed within <Select.Group>.");
59607
59623
  return e;
59608
59624
  }
59609
59625
  //#endregion
59610
59626
  //#region ../../node_modules/@base-ui/react/select/group/SelectGroup.mjs
59611
- var CU = /* @__PURE__ */ y.forwardRef(function(e, t) {
59627
+ var wU = /* @__PURE__ */ y.forwardRef(function(e, t) {
59612
59628
  let { render: n, className: r, style: i, ...a } = e, [o, s] = y.useState(), c = y.useMemo(() => ({
59613
59629
  labelId: o,
59614
59630
  setLabelId: s
@@ -59619,16 +59635,16 @@ var CU = /* @__PURE__ */ y.forwardRef(function(e, t) {
59619
59635
  "aria-labelledby": o
59620
59636
  }, a]
59621
59637
  });
59622
- return /* @__PURE__ */ V(xU.Provider, {
59638
+ return /* @__PURE__ */ V(SU.Provider, {
59623
59639
  value: c,
59624
59640
  children: l
59625
59641
  });
59626
59642
  });
59627
- process.env.NODE_ENV !== "production" && (CU.displayName = "SelectGroup");
59643
+ process.env.NODE_ENV !== "production" && (wU.displayName = "SelectGroup");
59628
59644
  //#endregion
59629
59645
  //#region ../../node_modules/@base-ui/react/select/group-label/SelectGroupLabel.mjs
59630
- var wU = /* @__PURE__ */ y.forwardRef(function(e, t) {
59631
- let { render: n, className: r, style: i, id: a, ...o } = e, { setLabelId: s } = SU(), c = Ap(a);
59646
+ var TU = /* @__PURE__ */ y.forwardRef(function(e, t) {
59647
+ let { render: n, className: r, style: i, id: a, ...o } = e, { setLabelId: s } = CU(), c = Ap(a);
59632
59648
  return K(() => {
59633
59649
  s(c);
59634
59650
  }, [c, s]), Rc("div", e, {
@@ -59636,12 +59652,12 @@ var wU = /* @__PURE__ */ y.forwardRef(function(e, t) {
59636
59652
  props: [{ id: c }, o]
59637
59653
  });
59638
59654
  });
59639
- process.env.NODE_ENV !== "production" && (wU.displayName = "SelectGroupLabel");
59655
+ process.env.NODE_ENV !== "production" && (TU.displayName = "SelectGroupLabel");
59640
59656
  //#endregion
59641
59657
  //#region src/components/ui/select.tsx
59642
- function TU({ children: e, items: t, onValueChange: n, ...r }) {
59643
- return /* @__PURE__ */ V(kH, {
59644
- items: t ?? NU(e),
59658
+ function EU({ children: e, items: t, onValueChange: n, ...r }) {
59659
+ return /* @__PURE__ */ V(AH, {
59660
+ items: t ?? PU(e),
59645
59661
  onValueChange: (e) => {
59646
59662
  e !== null && n?.(e);
59647
59663
  },
@@ -59649,86 +59665,86 @@ function TU({ children: e, items: t, onValueChange: n, ...r }) {
59649
59665
  children: e
59650
59666
  });
59651
59667
  }
59652
- var EU = y.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ V(VH, {
59668
+ var DU = y.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ V(HH, {
59653
59669
  ref: n,
59654
59670
  className: U("flex flex-1 text-left", e),
59655
59671
  ...t
59656
59672
  }));
59657
- EU.displayName = "SelectValue";
59658
- var DU = y.forwardRef(({ className: e, children: t, asChild: n = !1, ...r }, i) => /* @__PURE__ */ H(zH, {
59673
+ DU.displayName = "SelectValue";
59674
+ var OU = y.forwardRef(({ className: e, children: t, asChild: n = !1, ...r }, i) => /* @__PURE__ */ H(BH, {
59659
59675
  ref: i,
59660
59676
  render: um(n, t),
59661
59677
  className: U("flex cursor-pointer h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background data-placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-disabled:cursor-not-allowed data-disabled:opacity-50 [&>span]:line-clamp-1", e),
59662
59678
  ...r,
59663
- children: [t, /* @__PURE__ */ V(HH, { render: /* @__PURE__ */ V(fh, { className: "h-4 w-4 text-muted-foreground" }) })]
59679
+ children: [t, /* @__PURE__ */ V(UH, { render: /* @__PURE__ */ V(fh, { className: "h-4 w-4 text-muted-foreground" }) })]
59664
59680
  }));
59665
- DU.displayName = "SelectTrigger";
59666
- var OU = y.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ V(bU, {
59681
+ OU.displayName = "SelectTrigger";
59682
+ var kU = y.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ V(xU, {
59667
59683
  ref: n,
59668
59684
  className: U("flex cursor-pointer items-center justify-center py-1", e),
59669
59685
  ...t,
59670
59686
  children: /* @__PURE__ */ V(mh, { className: "h-4 w-4" })
59671
59687
  }));
59672
- OU.displayName = "SelectScrollUpButton";
59673
- var kU = y.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ V(yU, {
59688
+ kU.displayName = "SelectScrollUpButton";
59689
+ var AU = y.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ V(bU, {
59674
59690
  ref: n,
59675
59691
  className: U("flex cursor-pointer items-center justify-center py-1", e),
59676
59692
  ...t,
59677
59693
  children: /* @__PURE__ */ V(fh, { className: "h-4 w-4" })
59678
59694
  }));
59679
- kU.displayName = "SelectScrollDownButton";
59680
- var AU = y.forwardRef(({ className: e, children: t, position: n = "popper", side: r = "bottom", sideOffset: i = 4, align: a = "center", alignOffset: o = 0, alignItemWithTrigger: s = n === "popper", ...c }, l) => {
59695
+ AU.displayName = "SelectScrollDownButton";
59696
+ var jU = y.forwardRef(({ className: e, children: t, position: n = "popper", side: r = "bottom", sideOffset: i = 4, align: a = "center", alignOffset: o = 0, alignItemWithTrigger: s = n === "popper", ...c }, l) => {
59681
59697
  let { resolvedTheme: u, theme: d } = Hm();
59682
- return /* @__PURE__ */ V(WH, { children: /* @__PURE__ */ V(QH, {
59698
+ return /* @__PURE__ */ V(GH, { children: /* @__PURE__ */ V($H, {
59683
59699
  align: a,
59684
59700
  alignOffset: o,
59685
59701
  alignItemWithTrigger: s,
59686
59702
  className: "z-50",
59687
59703
  side: r,
59688
59704
  sideOffset: i,
59689
- children: /* @__PURE__ */ H(eU, {
59705
+ children: /* @__PURE__ */ H(tU, {
59690
59706
  ref: l,
59691
59707
  className: U("agents-sdk relative z-50 max-h-[var(--available-height)] min-w-[8rem] overflow-y-auto overflow-x-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[var(--transform-origin)]", n === "popper" && "w-full min-w-[var(--anchor-width)] data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1", e),
59692
59708
  "data-agents-sdk-resolved-theme": u,
59693
59709
  "data-agents-sdk-theme": d,
59694
59710
  ...c,
59695
59711
  children: [
59696
- /* @__PURE__ */ V(OU, {}),
59697
- /* @__PURE__ */ V(cU, {
59712
+ /* @__PURE__ */ V(kU, {}),
59713
+ /* @__PURE__ */ V(lU, {
59698
59714
  className: "p-1",
59699
59715
  children: t
59700
59716
  }),
59701
- /* @__PURE__ */ V(kU, {})
59717
+ /* @__PURE__ */ V(AU, {})
59702
59718
  ]
59703
59719
  })
59704
59720
  }) });
59705
59721
  });
59706
- AU.displayName = "SelectContent";
59707
- var jU = y.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ V(wU, {
59722
+ jU.displayName = "SelectContent";
59723
+ var MU = y.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ V(TU, {
59708
59724
  ref: n,
59709
59725
  className: U("py-1.5 pl-8 pr-2 text-sm font-semibold", e),
59710
59726
  ...t
59711
59727
  }));
59712
- jU.displayName = "SelectLabel";
59713
- var MU = y.forwardRef(({ className: e, children: t, asChild: n = !1, ...r }, i) => /* @__PURE__ */ H(dU, {
59728
+ MU.displayName = "SelectLabel";
59729
+ var NU = y.forwardRef(({ className: e, children: t, asChild: n = !1, ...r }, i) => /* @__PURE__ */ H(fU, {
59714
59730
  ref: i,
59715
59731
  render: um(n, t),
59716
59732
  className: U("relative flex w-full cursor-pointer select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-highlighted:bg-accent data-highlighted:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50", e),
59717
59733
  ...r,
59718
59734
  children: [/* @__PURE__ */ V("span", {
59719
59735
  className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center",
59720
- children: /* @__PURE__ */ V(fU, { children: /* @__PURE__ */ V(dh, { className: "h-4 w-4" }) })
59721
- }), /* @__PURE__ */ V(mU, { children: t })]
59736
+ children: /* @__PURE__ */ V(pU, { children: /* @__PURE__ */ V(dh, { className: "h-4 w-4" }) })
59737
+ }), /* @__PURE__ */ V(hU, { children: t })]
59722
59738
  }));
59723
- MU.displayName = "SelectItem";
59724
- function NU(e) {
59739
+ NU.displayName = "SelectItem";
59740
+ function PU(e) {
59725
59741
  let t = [];
59726
- return PU(e, t), t.length > 0 ? t : void 0;
59742
+ return FU(e, t), t.length > 0 ? t : void 0;
59727
59743
  }
59728
- function PU(e, t) {
59744
+ function FU(e, t) {
59729
59745
  y.Children.forEach(e, (e) => {
59730
59746
  if (y.isValidElement(e)) {
59731
- if (e.type === MU) {
59747
+ if (e.type === NU) {
59732
59748
  let n = e.props.value;
59733
59749
  typeof n == "string" && t.push({
59734
59750
  value: n,
@@ -59736,34 +59752,34 @@ function PU(e, t) {
59736
59752
  });
59737
59753
  return;
59738
59754
  }
59739
- PU(e.props.children, t);
59755
+ FU(e.props.children, t);
59740
59756
  }
59741
59757
  });
59742
59758
  }
59743
- var FU = y.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ V(kh, {
59759
+ var IU = y.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ V(kh, {
59744
59760
  ref: n,
59745
59761
  className: U("-mx-1 my-1 h-px bg-muted", e),
59746
59762
  ...t
59747
59763
  }));
59748
- FU.displayName = "SelectSeparator";
59764
+ IU.displayName = "SelectSeparator";
59749
59765
  //#endregion
59750
59766
  //#region src/components/elements/prompt-input.tsx
59751
- var IU = 9;
59752
- function LU(e) {
59767
+ var LU = 9;
59768
+ function RU(e) {
59753
59769
  let t = e?.firstElementChild;
59754
59770
  return t instanceof HTMLElement ? t : null;
59755
59771
  }
59756
- function RU(e) {
59772
+ function zU(e) {
59757
59773
  let t = window.getComputedStyle(e), n = Number.parseFloat(t.lineHeight), r = Number.parseFloat(t.paddingTop), i = Number.parseFloat(t.paddingBottom), a = Number.isFinite(n) ? n : 24, o = Number.isFinite(r) ? r : 0, s = Number.isFinite(i) ? i : 0;
59758
59774
  return {
59759
59775
  minHeight: a + o + s,
59760
- maxHeight: a * IU + o + s
59776
+ maxHeight: a * LU + o + s
59761
59777
  };
59762
59778
  }
59763
- function zU(e, t, n) {
59779
+ function BU(e, t, n) {
59764
59780
  if (!e) return;
59765
59781
  e.style.height = "auto";
59766
- let { minHeight: r, maxHeight: i } = RU(e), a = Math.max(e.scrollHeight, r), o = Math.min(a, i), s = LU(t);
59782
+ let { minHeight: r, maxHeight: i } = zU(e), a = Math.max(e.scrollHeight, r), o = Math.min(a, i), s = RU(t);
59767
59783
  if (e.style.height = `${a}px`, e.style.overflowY = "hidden", n((e) => e === o ? e : o), s) {
59768
59784
  if (a <= i) {
59769
59785
  s.scrollTop = 0;
@@ -59774,20 +59790,20 @@ function zU(e, t, n) {
59774
59790
  });
59775
59791
  }
59776
59792
  }
59777
- function BU(e, t) {
59793
+ function VU(e, t) {
59778
59794
  if (typeof e == "function") {
59779
59795
  e(t);
59780
59796
  return;
59781
59797
  }
59782
59798
  e && (e.current = t);
59783
59799
  }
59784
- var VU = ({ className: e, ...t }) => /* @__PURE__ */ V("form", {
59800
+ var HU = ({ className: e, ...t }) => /* @__PURE__ */ V("form", {
59785
59801
  className: U("w-full overflow-hidden rounded-xl border bg-background shadow-xs", e),
59786
59802
  ...t
59787
- }), HU = ({ onChange: e, className: t, placeholder: n = "What would you like to know?", ref: r, disableAutoResize: i = !1, resizeOnNewLinesOnly: a = !1, ...o }) => {
59803
+ }), UU = ({ onChange: e, className: t, placeholder: n = "What would you like to know?", ref: r, disableAutoResize: i = !1, resizeOnNewLinesOnly: a = !1, ...o }) => {
59788
59804
  let s = R(null), c = R(null), [l, u] = z(), d = !i && !a;
59789
59805
  j(() => {
59790
- d && zU(s.current, c.current, u);
59806
+ d && BU(s.current, c.current, u);
59791
59807
  }, [
59792
59808
  o.value,
59793
59809
  o.defaultValue,
@@ -59797,7 +59813,7 @@ var VU = ({ className: e, ...t }) => /* @__PURE__ */ V("form", {
59797
59813
  className: U("w-full resize-none rounded-none border-none p-3 shadow-none outline-hidden ring-0", i || a ? "field-sizing-fixed" : "field-sizing-fixed min-h-[calc(1lh+1.5rem)] overflow-y-hidden", "bg-transparent dark:bg-transparent", "focus-visible:ring-0", t),
59798
59814
  name: "message",
59799
59815
  onChange: (t) => {
59800
- d && zU(t.currentTarget, c.current, u), e?.(t);
59816
+ d && BU(t.currentTarget, c.current, u), e?.(t);
59801
59817
  },
59802
59818
  onKeyDown: (e) => {
59803
59819
  if (e.key === "Enter") {
@@ -59809,23 +59825,23 @@ var VU = ({ className: e, ...t }) => /* @__PURE__ */ V("form", {
59809
59825
  },
59810
59826
  placeholder: n,
59811
59827
  ref: (e) => {
59812
- s.current = e, BU(r, e);
59828
+ s.current = e, VU(r, e);
59813
59829
  },
59814
59830
  ...o
59815
59831
  });
59816
- return d ? /* @__PURE__ */ V(XV, {
59832
+ return d ? /* @__PURE__ */ V(ZV, {
59817
59833
  className: "w-full",
59818
59834
  ref: c,
59819
59835
  style: { height: l },
59820
59836
  children: f
59821
59837
  }) : f;
59822
- }, UU = ({ className: e, ...t }) => /* @__PURE__ */ V("div", {
59838
+ }, WU = ({ className: e, ...t }) => /* @__PURE__ */ V("div", {
59823
59839
  className: U("flex items-center justify-between p-1", e),
59824
59840
  ...t
59825
- }), WU = ({ className: e, ...t }) => /* @__PURE__ */ V("div", {
59841
+ }), GU = ({ className: e, ...t }) => /* @__PURE__ */ V("div", {
59826
59842
  className: U("flex items-center gap-1", "[&_button:first-child]:rounded-bl-xl", e),
59827
59843
  ...t
59828
- }), GU = ({ className: e, variant: t = "default", size: n = "icon", status: r, children: i, ...a }) => {
59844
+ }), KU = ({ className: e, variant: t = "default", size: n = "icon", status: r, children: i, ...a }) => {
59829
59845
  let o = /* @__PURE__ */ V(wh, { className: "size-4" });
59830
59846
  return r === "submitted" ? o = /* @__PURE__ */ V(bh, { className: "size-4 animate-spin" }) : r === "streaming" ? o = /* @__PURE__ */ V(Th, { className: "size-4" }) : r === "error" && (o = /* @__PURE__ */ V(Dh, { className: "size-4" })), /* @__PURE__ */ V(Im, {
59831
59847
  className: U("gap-1.5 rounded-lg", e),
@@ -59835,7 +59851,7 @@ var VU = ({ className: e, ...t }) => /* @__PURE__ */ V("form", {
59835
59851
  ...a,
59836
59852
  children: i ?? o
59837
59853
  });
59838
- }, KU = ({ suggestion: e, onClick: t, className: n, variant: r = "outline", size: i = "sm", children: a, ...o }) => /* @__PURE__ */ V(Im, {
59854
+ }, qU = ({ suggestion: e, onClick: t, className: n, variant: r = "outline", size: i = "sm", children: a, ...o }) => /* @__PURE__ */ V(Im, {
59839
59855
  className: U("cursor-pointer rounded-full px-4", n),
59840
59856
  onClick: () => {
59841
59857
  t?.(e);
@@ -59848,7 +59864,7 @@ var VU = ({ className: e, ...t }) => /* @__PURE__ */ V("form", {
59848
59864
  });
59849
59865
  //#endregion
59850
59866
  //#region src/components/suggested-actions.tsx
59851
- function qU({ chatId: e, sendMessage: t, suggestedActions: n }) {
59867
+ function JU({ chatId: e, sendMessage: t, suggestedActions: n }) {
59852
59868
  let { getChatPath: r } = Qe(), i = n.map((e) => e.trim()).filter(Boolean);
59853
59869
  return i.length === 0 ? null : /* @__PURE__ */ V("div", {
59854
59870
  className: "grid w-full gap-2 sm:grid-cols-2",
@@ -59867,7 +59883,7 @@ function qU({ chatId: e, sendMessage: t, suggestedActions: n }) {
59867
59883
  y: 20
59868
59884
  },
59869
59885
  transition: { delay: .05 * i },
59870
- children: /* @__PURE__ */ V(KU, {
59886
+ children: /* @__PURE__ */ V(qU, {
59871
59887
  className: "h-auto w-full whitespace-normal p-3 text-left",
59872
59888
  onClick: (n) => {
59873
59889
  window.history.pushState({}, "", r(e)), t({
@@ -59884,28 +59900,28 @@ function qU({ chatId: e, sendMessage: t, suggestedActions: n }) {
59884
59900
  }, `${i}-${n}`))
59885
59901
  });
59886
59902
  }
59887
- var JU = O(qU, (e, t) => !(e.chatId !== t.chatId || !ye(e.suggestedActions, t.suggestedActions)));
59903
+ var YU = O(JU, (e, t) => !(e.chatId !== t.chatId || !ye(e.suggestedActions, t.suggestedActions)));
59888
59904
  //#endregion
59889
59905
  //#region src/components/multimodal-input.tsx
59890
- function YU(e, t) {
59906
+ function XU(e, t) {
59891
59907
  document.cookie = `${e}=${encodeURIComponent(t)}; path=/; max-age=31536000`;
59892
59908
  }
59893
- var XU = (e) => e.replace(/[^a-zA-Z0-9_-]/g, "_") || "default", ZU = 40, QU = 9;
59894
- function $U(e) {
59909
+ var ZU = (e) => e.replace(/[^a-zA-Z0-9_-]/g, "_") || "default", QU = 40, $U = 9;
59910
+ function eW(e) {
59895
59911
  let t = e?.firstElementChild;
59896
59912
  return t instanceof HTMLElement ? t : null;
59897
59913
  }
59898
- function eW(e) {
59914
+ function tW(e) {
59899
59915
  let t = window.getComputedStyle(e), n = Number.parseFloat(t.lineHeight), r = Number.parseFloat(t.paddingTop), i = Number.parseFloat(t.paddingBottom), a = Number.isFinite(n) ? n : 24, o = Number.isFinite(r) ? r : 0, s = Number.isFinite(i) ? i : 0;
59900
59916
  return {
59901
- minHeight: Math.max(a + o + s, ZU),
59902
- maxHeight: a * QU + o + s
59917
+ minHeight: Math.max(a + o + s, QU),
59918
+ maxHeight: a * $U + o + s
59903
59919
  };
59904
59920
  }
59905
- function tW(e, t) {
59921
+ function nW(e, t) {
59906
59922
  if (!e) return;
59907
59923
  e.style.height = "auto";
59908
- let { minHeight: n, maxHeight: r } = eW(e), i = e.scrollHeight, a = Math.max(i, n), o = Math.min(a, r), s = $U(t.scrollArea);
59924
+ let { minHeight: n, maxHeight: r } = tW(e), i = e.scrollHeight, a = Math.max(i, n), o = Math.min(a, r), s = eW(t.scrollArea);
59909
59925
  if (e.style.height = `${a}px`, e.style.overflowY = "hidden", t.setScrollAreaHeight((e) => e === o ? e : o), s) {
59910
59926
  if (a <= r) {
59911
59927
  s.scrollTop = 0;
@@ -59916,17 +59932,17 @@ function tW(e, t) {
59916
59932
  });
59917
59933
  }
59918
59934
  }
59919
- function nW(e, t) {
59935
+ function rW(e, t) {
59920
59936
  if (!e) return;
59921
- let { minHeight: n } = eW(e);
59937
+ let { minHeight: n } = tW(e);
59922
59938
  e.style.height = `${n}px`, e.style.overflowY = "hidden", t.setScrollAreaHeight(n);
59923
- let r = $U(t.scrollArea);
59939
+ let r = eW(t.scrollArea);
59924
59940
  r && (r.scrollTop = 0);
59925
59941
  }
59926
- function rW({ chatId: e, input: t, setInput: n, status: r, stop: i, attachments: a, setAttachments: o, messages: s, setMessages: c, sendMessage: l, className: u, chatModels: d, defaultChatModel: f, selectedModelId: p, onModelChange: m, openaiReasoningEffort: h = v, onOpenAIReasoningEffortChange: g, suggestedActions: _ }) {
59927
- let y = R(null), b = R(null), [x, S] = z(ZU), { width: C } = tF(), { getChatPath: w } = Qe(), T = r === "ready" || r === "error";
59942
+ function iW({ chatId: e, input: t, setInput: n, status: r, stop: i, attachments: a, setAttachments: o, messages: s, setMessages: c, sendMessage: l, className: u, chatModels: d, defaultChatModel: f, selectedModelId: p, onModelChange: m, openaiReasoningEffort: h = v, onOpenAIReasoningEffortChange: g, suggestedActions: _ }) {
59943
+ let y = R(null), b = R(null), [x, S] = z(QU), { width: C } = tF(), { getChatPath: w } = Qe(), T = r === "ready" || r === "error";
59928
59944
  j(() => {
59929
- tW(y.current, {
59945
+ nW(y.current, {
59930
59946
  scrollArea: b.current,
59931
59947
  setScrollAreaHeight: S
59932
59948
  });
@@ -59947,7 +59963,7 @@ function rW({ chatId: e, input: t, setInput: n, status: r, stop: i, attachments:
59947
59963
  O(t);
59948
59964
  }, [t, O]);
59949
59965
  let A = (e) => {
59950
- n(e.target.value), tW(e.currentTarget, {
59966
+ n(e.target.value), nW(e.currentTarget, {
59951
59967
  scrollArea: b.current,
59952
59968
  setScrollAreaHeight: S
59953
59969
  });
@@ -59964,7 +59980,7 @@ function rW({ chatId: e, input: t, setInput: n, status: r, stop: i, attachments:
59964
59980
  type: "text",
59965
59981
  text: t
59966
59982
  }]
59967
- }), o([]), O(""), n(""), nW(y.current, {
59983
+ }), o([]), O(""), n(""), rW(y.current, {
59968
59984
  scrollArea: b.current,
59969
59985
  setScrollAreaHeight: S
59970
59986
  }), C && C > 768 && y.current?.focus();
@@ -60072,7 +60088,7 @@ function rW({ chatId: e, input: t, setInput: n, status: r, stop: i, attachments:
60072
60088
  }, [ee]), /* @__PURE__ */ H("div", {
60073
60089
  className: U("relative flex w-full flex-col gap-4", u),
60074
60090
  children: [
60075
- s.length === 0 && a.length === 0 && N.length === 0 && _ && _.length > 0 && /* @__PURE__ */ V(JU, {
60091
+ s.length === 0 && a.length === 0 && N.length === 0 && _ && _.length > 0 && /* @__PURE__ */ V(YU, {
60076
60092
  chatId: e,
60077
60093
  sendMessage: l,
60078
60094
  suggestedActions: _
@@ -60085,7 +60101,7 @@ function rW({ chatId: e, input: t, setInput: n, status: r, stop: i, attachments:
60085
60101
  tabIndex: -1,
60086
60102
  type: "file"
60087
60103
  }),
60088
- /* @__PURE__ */ H(VU, {
60104
+ /* @__PURE__ */ H(HU, {
60089
60105
  className: "rounded-xl border border-border bg-background p-3 shadow-xs transition-all duration-200 focus-within:border-border hover:border-muted-foreground/50",
60090
60106
  onSubmit: (e) => {
60091
60107
  if (e.preventDefault(), !(!t.trim() && a.length === 0)) {
@@ -60116,11 +60132,11 @@ function rW({ chatId: e, input: t, setInput: n, status: r, stop: i, attachments:
60116
60132
  }),
60117
60133
  /* @__PURE__ */ V("div", {
60118
60134
  className: "flex flex-row items-start gap-1 sm:gap-2",
60119
- children: /* @__PURE__ */ V(XV, {
60135
+ children: /* @__PURE__ */ V(ZV, {
60120
60136
  className: "grow rounded-md",
60121
60137
  ref: b,
60122
60138
  style: { height: x },
60123
- children: /* @__PURE__ */ V(HU, {
60139
+ children: /* @__PURE__ */ V(UU, {
60124
60140
  className: "min-h-10 w-full resize-none overflow-y-hidden border-0! border-none! bg-transparent p-2 text-base outline-none ring-0 placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-0 focus-visible:ring-offset-0",
60125
60141
  "data-testid": "multimodal-input",
60126
60142
  disableAutoResize: !0,
@@ -60132,17 +60148,17 @@ function rW({ chatId: e, input: t, setInput: n, status: r, stop: i, attachments:
60132
60148
  })
60133
60149
  })
60134
60150
  }),
60135
- /* @__PURE__ */ H(UU, {
60151
+ /* @__PURE__ */ H(WU, {
60136
60152
  className: "border-top-0! border-t-0! p-0 shadow-none dark:border-0 dark:border-transparent!",
60137
- children: [/* @__PURE__ */ H(WU, {
60153
+ children: [/* @__PURE__ */ H(GU, {
60138
60154
  className: "gap-0 sm:gap-0.5",
60139
60155
  children: [
60140
- /* @__PURE__ */ V(oW, {
60156
+ /* @__PURE__ */ V(sW, {
60141
60157
  fileInputRef: M,
60142
60158
  selectedModelId: p,
60143
60159
  status: r
60144
60160
  }),
60145
- /* @__PURE__ */ V(cW, {
60161
+ /* @__PURE__ */ V(lW, {
60146
60162
  focusTargetRef: y,
60147
60163
  chatModels: d,
60148
60164
  defaultChatModel: f,
@@ -60150,7 +60166,7 @@ function rW({ chatId: e, input: t, setInput: n, status: r, stop: i, attachments:
60150
60166
  onModelChange: m,
60151
60167
  selectedModelId: p
60152
60168
  }),
60153
- /* @__PURE__ */ V(dW, {
60169
+ /* @__PURE__ */ V(fW, {
60154
60170
  disabled: r !== "ready",
60155
60171
  idScope: e,
60156
60172
  onChange: g,
@@ -60158,10 +60174,10 @@ function rW({ chatId: e, input: t, setInput: n, status: r, stop: i, attachments:
60158
60174
  value: h
60159
60175
  })
60160
60176
  ]
60161
- }), r === "submitted" || r === "streaming" ? /* @__PURE__ */ V(pW, {
60177
+ }), r === "submitted" || r === "streaming" ? /* @__PURE__ */ V(mW, {
60162
60178
  setMessages: c,
60163
60179
  stop: i
60164
- }) : /* @__PURE__ */ V(GU, {
60180
+ }) : /* @__PURE__ */ V(KU, {
60165
60181
  className: "size-8 rounded-full bg-primary text-primary-foreground transition-colors duration-200 hover:bg-primary/90 disabled:bg-muted disabled:text-muted-foreground",
60166
60182
  "data-testid": "send-button",
60167
60183
  disabled: !t.trim() || N.length > 0,
@@ -60174,8 +60190,8 @@ function rW({ chatId: e, input: t, setInput: n, status: r, stop: i, attachments:
60174
60190
  ]
60175
60191
  });
60176
60192
  }
60177
- var iW = O(rW, (e, t) => !(e.input !== t.input || e.status !== t.status || !ye(e.attachments, t.attachments) || e.selectedModelId !== t.selectedModelId || e.openaiReasoningEffort !== t.openaiReasoningEffort || !ye(e.suggestedActions, t.suggestedActions) || !ye(e.chatModels, t.chatModels) || e.defaultChatModel !== t.defaultChatModel));
60178
- function aW({ fileInputRef: e, status: t, selectedModelId: n }) {
60193
+ var aW = O(iW, (e, t) => !(e.input !== t.input || e.status !== t.status || !ye(e.attachments, t.attachments) || e.selectedModelId !== t.selectedModelId || e.openaiReasoningEffort !== t.openaiReasoningEffort || !ye(e.suggestedActions, t.suggestedActions) || !ye(e.chatModels, t.chatModels) || e.defaultChatModel !== t.defaultChatModel));
60194
+ function oW({ fileInputRef: e, status: t, selectedModelId: n }) {
60179
60195
  let r = n.includes("reasoning") || n.includes("think");
60180
60196
  return /* @__PURE__ */ V(Im, {
60181
60197
  className: "aspect-square h-8 rounded-lg p-1 transition-colors hover:bg-accent",
@@ -60194,44 +60210,44 @@ function aW({ fileInputRef: e, status: t, selectedModelId: n }) {
60194
60210
  })
60195
60211
  });
60196
60212
  }
60197
- var oW = O(aW);
60198
- function sW({ focusTargetRef: e, chatModels: t, defaultChatModel: n, idScope: r, selectedModelId: i, onModelChange: a }) {
60199
- let [o, s] = z(!1), c = R(!1), l = XU(r), d = t && t.length > 0 ? t : f, p = u(d), m = d.find((e) => e.id === i) ?? d.find((e) => e.id === n) ?? d[0] ?? f[0], [h] = m.id.split("/"), g = {
60213
+ var sW = O(oW);
60214
+ function cW({ focusTargetRef: e, chatModels: t, defaultChatModel: n, idScope: r, selectedModelId: i, onModelChange: a }) {
60215
+ let [o, s] = z(!1), c = R(!1), l = ZU(r), d = t && t.length > 0 ? t : f, p = u(d), m = d.find((e) => e.id === i) ?? d.find((e) => e.id === n) ?? d[0] ?? f[0], [h] = m.id.split("/"), g = {
60200
60216
  anthropic: "Anthropic",
60201
60217
  openai: "OpenAI",
60202
60218
  google: "Google",
60203
60219
  xai: "xAI",
60204
60220
  reasoning: "Reasoning"
60205
60221
  };
60206
- return /* @__PURE__ */ H(aV, {
60222
+ return /* @__PURE__ */ H(oV, {
60207
60223
  onOpenChange: s,
60208
60224
  open: o,
60209
- children: [/* @__PURE__ */ V(oV, {
60225
+ children: [/* @__PURE__ */ V(sV, {
60210
60226
  asChild: !0,
60211
60227
  children: /* @__PURE__ */ H(Im, {
60212
60228
  className: "agents-chat-model-selector-trigger h-8 w-auto max-w-[18rem] justify-start gap-2 px-2",
60213
60229
  id: `agents-sdk-model-selector-${l}`,
60214
60230
  variant: "ghost",
60215
- children: [h && /* @__PURE__ */ V(fV, { provider: h }), /* @__PURE__ */ V(pV, {
60231
+ children: [h && /* @__PURE__ */ V(pV, { provider: h }), /* @__PURE__ */ V(mV, {
60216
60232
  className: "min-w-0 max-w-[14rem] flex-initial",
60217
60233
  children: m.name
60218
60234
  })]
60219
60235
  })
60220
- }), /* @__PURE__ */ H(sV, {
60236
+ }), /* @__PURE__ */ H(cV, {
60221
60237
  commandDefaultValue: m.id,
60222
60238
  finalFocus: () => c.current ? (c.current = !1, e.current) : !0,
60223
- children: [/* @__PURE__ */ V(cV, { placeholder: "Search models..." }), /* @__PURE__ */ V(lV, { children: Object.entries(p).map(([e, t]) => /* @__PURE__ */ V(uV, {
60239
+ children: [/* @__PURE__ */ V(lV, { placeholder: "Search models..." }), /* @__PURE__ */ V(uV, { children: Object.entries(p).map(([e, t]) => /* @__PURE__ */ V(dV, {
60224
60240
  heading: g[e] ?? e,
60225
60241
  children: t.map((e) => {
60226
60242
  let t = e.id.split("/")[0];
60227
- return /* @__PURE__ */ H(dV, {
60243
+ return /* @__PURE__ */ H(fV, {
60228
60244
  onSelect: () => {
60229
- c.current = !0, a?.(e.id), YU("chat-model", e.id), s(!1);
60245
+ c.current = !0, a?.(e.id), XU("chat-model", e.id), s(!1);
60230
60246
  },
60231
60247
  value: e.id,
60232
60248
  children: [
60233
- /* @__PURE__ */ V(fV, { provider: t }),
60234
- /* @__PURE__ */ V(pV, { children: e.name }),
60249
+ /* @__PURE__ */ V(pV, { provider: t }),
60250
+ /* @__PURE__ */ V(mV, { children: e.name }),
60235
60251
  e.id === m.id && /* @__PURE__ */ V(dh, { className: "ml-auto size-4" })
60236
60252
  ]
60237
60253
  }, e.id);
@@ -60240,40 +60256,40 @@ function sW({ focusTargetRef: e, chatModels: t, defaultChatModel: n, idScope: r,
60240
60256
  })]
60241
60257
  });
60242
60258
  }
60243
- var cW = O(sW), lW = (e, t) => t.includes(e), uW = (e) => e.charAt(0).toUpperCase() + e.slice(1);
60244
- function dW({ idScope: e, selectedModelId: t, value: n, onChange: r, disabled: i }) {
60245
- let a = m(t), o = h(t), s = _(t), c = s && lW(s, o) ? s : o[0], l = lW(n, o) ? n : c ?? "default";
60259
+ var lW = O(cW), uW = (e, t) => t.includes(e), dW = (e) => e.charAt(0).toUpperCase() + e.slice(1);
60260
+ function fW({ idScope: e, selectedModelId: t, value: n, onChange: r, disabled: i }) {
60261
+ let a = m(t), o = h(t), s = _(t), c = s && uW(s, o) ? s : o[0], l = uW(n, o) ? n : c ?? "default";
60246
60262
  return j(() => {
60247
- !a || !r || lW(n, o) || r(c ?? "default");
60263
+ !a || !r || uW(n, o) || r(c ?? "default");
60248
60264
  }, [
60249
60265
  o,
60250
60266
  c,
60251
60267
  r,
60252
60268
  a,
60253
60269
  n
60254
- ]), !a || !r || l === "default" ? null : /* @__PURE__ */ H(TU, {
60270
+ ]), !a || !r || l === "default" ? null : /* @__PURE__ */ H(EU, {
60255
60271
  disabled: i,
60256
60272
  onValueChange: (e) => {
60257
- YU(g, e), r(e);
60273
+ XU(g, e), r(e);
60258
60274
  },
60259
60275
  value: l,
60260
- children: [/* @__PURE__ */ V(DU, {
60276
+ children: [/* @__PURE__ */ V(OU, {
60261
60277
  className: "h-8 w-[112px] gap-1 border-0 bg-transparent px-2 text-sm hover:bg-accent focus:ring-0 focus:ring-offset-0",
60262
- id: `agents-sdk-reasoning-effort-${XU(e)}`,
60278
+ id: `agents-sdk-reasoning-effort-${ZU(e)}`,
60263
60279
  children: /* @__PURE__ */ H("div", {
60264
60280
  className: "flex min-w-0 items-center gap-1.5",
60265
60281
  children: [/* @__PURE__ */ V(uh, { className: "size-3.5 shrink-0 text-muted-foreground" }), /* @__PURE__ */ V("span", {
60266
60282
  className: "min-w-0 truncate",
60267
- children: /* @__PURE__ */ V(EU, {})
60283
+ children: /* @__PURE__ */ V(DU, {})
60268
60284
  })]
60269
60285
  })
60270
- }), /* @__PURE__ */ V(AU, { children: o.map((e) => /* @__PURE__ */ V(MU, {
60286
+ }), /* @__PURE__ */ V(jU, { children: o.map((e) => /* @__PURE__ */ V(NU, {
60271
60287
  value: e,
60272
- children: /* @__PURE__ */ V("span", { children: uW(e) })
60288
+ children: /* @__PURE__ */ V("span", { children: dW(e) })
60273
60289
  }, e)) })]
60274
60290
  });
60275
60291
  }
60276
- function fW({ stop: e, setMessages: t }) {
60292
+ function pW({ stop: e, setMessages: t }) {
60277
60293
  return /* @__PURE__ */ V(Im, {
60278
60294
  className: "size-8 rounded-full bg-primary p-1 text-primary-foreground transition-colors duration-200 hover:bg-primary/90 disabled:bg-muted disabled:text-muted-foreground",
60279
60295
  "data-testid": "stop-button",
@@ -60283,7 +60299,7 @@ function fW({ stop: e, setMessages: t }) {
60283
60299
  children: /* @__PURE__ */ V(ft, { size: 14 })
60284
60300
  });
60285
60301
  }
60286
- var pW = O(fW), mW = ({ description: e, icon: t, selectedTool: n, setSelectedTool: r, isToolbarVisible: i, setIsToolbarVisible: a, isAnimating: o, sendMessage: s, onClick: c }) => {
60302
+ var mW = O(pW), hW = ({ description: e, icon: t, selectedTool: n, setSelectedTool: r, isToolbarVisible: i, setIsToolbarVisible: a, isAnimating: o, sendMessage: s, onClick: c }) => {
60287
60303
  let [l, u] = z(!1);
60288
60304
  j(() => {
60289
60305
  n !== e && u(!1);
@@ -60341,14 +60357,14 @@ var pW = O(fW), mW = ({ description: e, icon: t, selectedTool: n, setSelectedToo
60341
60357
  children: e
60342
60358
  })]
60343
60359
  });
60344
- }, hW = [...[
60360
+ }, gW = [...[
60345
60361
  ,
60346
60362
  ,
60347
60363
  ,
60348
60364
  ,
60349
60365
  ,
60350
60366
  ,
60351
- ]].map((e) => Ye(5)), gW = ({ setSelectedTool: e, sendMessage: t, isAnimating: n }) => {
60367
+ ]].map((e) => Ye(5)), _W = ({ setSelectedTool: e, sendMessage: t, isAnimating: n }) => {
60352
60368
  let r = [
60353
60369
  "Elementary",
60354
60370
  "Middle School",
@@ -60364,7 +60380,7 @@ var pW = O(fW), mW = ({ description: e, icon: t, selectedTool: n, setSelectedToo
60364
60380
  return () => e();
60365
60381
  }, [a]), /* @__PURE__ */ H("div", {
60366
60382
  className: "relative flex flex-col items-center justify-end",
60367
- children: [hW.map((e) => /* @__PURE__ */ V(uP.div, {
60383
+ children: [gW.map((e) => /* @__PURE__ */ V(uP.div, {
60368
60384
  animate: { opacity: 1 },
60369
60385
  className: "flex size-[40px] flex-row items-center justify-center",
60370
60386
  exit: { opacity: 0 },
@@ -60416,7 +60432,7 @@ var pW = O(fW), mW = ({ description: e, icon: t, selectedTool: n, setSelectedToo
60416
60432
  })]
60417
60433
  }) })]
60418
60434
  });
60419
- }, _W = ({ isToolbarVisible: e, selectedTool: t, setSelectedTool: n, sendMessage: r, isAnimating: i, setIsToolbarVisible: a, tools: o }) => {
60435
+ }, vW = ({ isToolbarVisible: e, selectedTool: t, setSelectedTool: n, sendMessage: r, isAnimating: i, setIsToolbarVisible: a, tools: o }) => {
60420
60436
  let [s, ...c] = o;
60421
60437
  return /* @__PURE__ */ H(uP.div, {
60422
60438
  animate: {
@@ -60432,7 +60448,7 @@ var pW = O(fW), mW = ({ description: e, icon: t, selectedTool: n, setSelectedToo
60432
60448
  opacity: 0,
60433
60449
  scale: .95
60434
60450
  },
60435
- children: [/* @__PURE__ */ V(_M, { children: e && c.map((e) => /* @__PURE__ */ V(mW, {
60451
+ children: [/* @__PURE__ */ V(_M, { children: e && c.map((e) => /* @__PURE__ */ V(hW, {
60436
60452
  description: e.description,
60437
60453
  icon: e.icon,
60438
60454
  isAnimating: i,
@@ -60440,7 +60456,7 @@ var pW = O(fW), mW = ({ description: e, icon: t, selectedTool: n, setSelectedToo
60440
60456
  selectedTool: t,
60441
60457
  sendMessage: r,
60442
60458
  setSelectedTool: n
60443
- }, e.description)) }), /* @__PURE__ */ V(mW, {
60459
+ }, e.description)) }), /* @__PURE__ */ V(hW, {
60444
60460
  description: s.description,
60445
60461
  icon: s.icon,
60446
60462
  isAnimating: i,
@@ -60452,7 +60468,7 @@ var pW = O(fW), mW = ({ description: e, icon: t, selectedTool: n, setSelectedToo
60452
60468
  setSelectedTool: n
60453
60469
  })]
60454
60470
  });
60455
- }, vW = O(({ isToolbarVisible: e, setIsToolbarVisible: t, sendMessage: n, status: r, stop: i, setMessages: a, artifactKind: o }) => {
60471
+ }, yW = O(({ isToolbarVisible: e, setIsToolbarVisible: t, sendMessage: n, status: r, stop: i, setMessages: a, artifactKind: o }) => {
60456
60472
  let s = R(null), c = R(null), [l, u] = z(null), [d, f] = z(!1);
60457
60473
  $P(s, () => {
60458
60474
  t(!1), u(null);
@@ -60469,7 +60485,7 @@ var pW = O(fW), mW = ({ description: e, icon: t, selectedTool: n, setSelectedToo
60469
60485
  }, []), j(() => {
60470
60486
  r === "streaming" && t(!1);
60471
60487
  }, [r, t]);
60472
- let h = bW.find((e) => e.kind === o);
60488
+ let h = xW.find((e) => e.kind === o);
60473
60489
  if (!h) throw Error("Artifact definition not found!");
60474
60490
  let g = h.toolbar;
60475
60491
  return g.length === 0 ? null : /* @__PURE__ */ V(Gg, {
@@ -60531,11 +60547,11 @@ var pW = O(fW), mW = ({ description: e, icon: t, selectedTool: n, setSelectedToo
60531
60547
  i(), a((e) => e);
60532
60548
  },
60533
60549
  children: /* @__PURE__ */ V(ft, {})
60534
- }, "stop-icon") : l === "adjust-reading-level" ? /* @__PURE__ */ V(gW, {
60550
+ }, "stop-icon") : l === "adjust-reading-level" ? /* @__PURE__ */ V(_W, {
60535
60551
  isAnimating: d,
60536
60552
  sendMessage: n,
60537
60553
  setSelectedTool: u
60538
- }, "reading-level-selector") : /* @__PURE__ */ V(_W, {
60554
+ }, "reading-level-selector") : /* @__PURE__ */ V(vW, {
60539
60555
  isAnimating: d,
60540
60556
  isToolbarVisible: e,
60541
60557
  selectedTool: l,
@@ -60546,7 +60562,7 @@ var pW = O(fW), mW = ({ description: e, icon: t, selectedTool: n, setSelectedToo
60546
60562
  }, "tools")
60547
60563
  })
60548
60564
  });
60549
- }, (e, t) => !(e.status !== t.status || e.isToolbarVisible !== t.isToolbarVisible || e.artifactKind !== t.artifactKind)), yW = ({ handleVersionChange: e, documents: t, currentVersionIndex: n }) => {
60565
+ }, (e, t) => !(e.status !== t.status || e.isToolbarVisible !== t.isToolbarVisible || e.artifactKind !== t.artifactKind)), bW = ({ handleVersionChange: e, documents: t, currentVersionIndex: n }) => {
60550
60566
  let { artifact: r } = DS(), { width: i } = tF(), a = i < 768, [o, s] = z(!1);
60551
60567
  if (t) return /* @__PURE__ */ H(uP.div, {
60552
60568
  animate: { y: 0 },
@@ -60586,13 +60602,13 @@ var pW = O(fW), mW = ({ description: e, icon: t, selectedTool: n, setSelectedToo
60586
60602
  })]
60587
60603
  })]
60588
60604
  });
60589
- }, bW = [
60605
+ }, xW = [
60590
60606
  OR,
60591
60607
  dF,
60592
60608
  pF,
60593
60609
  NL
60594
60610
  ];
60595
- function xW({ addToolApprovalResponse: e, chatId: t, input: n, setInput: r, status: i, stop: a, attachments: o, setAttachments: s, chatModels: c, defaultChatModel: l, sendMessage: u, messages: d, setMessages: f, regenerate: p, renderMessagePart: m, votes: h, isReadonly: g, selectedModelId: _, suggestedActions: v }) {
60611
+ function SW({ addToolApprovalResponse: e, chatId: t, input: n, setInput: r, status: i, stop: a, attachments: o, setAttachments: s, chatModels: c, defaultChatModel: l, sendMessage: u, messages: d, setMessages: f, regenerate: p, renderMessagePart: m, votes: h, isReadonly: g, selectedModelId: _, suggestedActions: v }) {
60596
60612
  let { artifact: y, setArtifact: b, metadata: x, setMetadata: S } = DS(), { data: C, isLoading: w } = FR(y.documentId, y.documentId !== "init" && y.status !== "streaming"), [T, E] = z([]), D = L(() => T.length > 0 ? PR(C, T) : C, [C, T]), [O, A] = z("edit"), [M, N] = z(null), [P, F] = z(-1);
60597
60613
  j(() => {
60598
60614
  E([]);
@@ -60650,7 +60666,7 @@ function xW({ addToolApprovalResponse: e, chatId: t, input: n, setInput: r, stat
60650
60666
  }
60651
60667
  let ie = (e) => {
60652
60668
  D && (e === "latest" && (F(D.length - 1), A("edit")), e === "toggle" && A((e) => e === "edit" ? "diff" : "edit"), e === "prev" ? P > 0 && F((e) => e - 1) : e === "next" && P < D.length - 1 && F((e) => e + 1));
60653
- }, [B, ae] = z(!1), oe = D && D.length > 0 ? P === D.length - 1 : !0, se = Xg(), ce = bW.find((e) => e.kind === y.kind);
60669
+ }, [B, ae] = z(!1), oe = D && D.length > 0 ? P === D.length - 1 : !0, se = Xg(), ce = xW.find((e) => e.kind === y.kind);
60654
60670
  if (!ce) throw Error("Artifact definition not found!");
60655
60671
  return j(() => {
60656
60672
  y.documentId !== "init" && ce.initialize && ce.initialize({
@@ -60701,7 +60717,7 @@ function xW({ addToolApprovalResponse: e, chatId: t, input: n, setInput: r, stat
60701
60717
  initial: { opacity: 0 }
60702
60718
  }) }), /* @__PURE__ */ H("div", {
60703
60719
  className: "flex h-full flex-col items-center justify-between",
60704
- children: [/* @__PURE__ */ V(FB, {
60720
+ children: [/* @__PURE__ */ V(IB, {
60705
60721
  addToolApprovalResponse: e,
60706
60722
  artifactStatus: y.status,
60707
60723
  chatId: t,
@@ -60714,7 +60730,7 @@ function xW({ addToolApprovalResponse: e, chatId: t, input: n, setInput: r, stat
60714
60730
  votes: h
60715
60731
  }), /* @__PURE__ */ V("div", {
60716
60732
  className: "relative flex w-full flex-row items-end gap-2 px-4 pb-4",
60717
- children: /* @__PURE__ */ V(iW, {
60733
+ children: /* @__PURE__ */ V(aW, {
60718
60734
  attachments: o,
60719
60735
  chatModels: c,
60720
60736
  defaultChatModel: l,
@@ -60813,7 +60829,7 @@ function xW({ addToolApprovalResponse: e, chatId: t, input: n, setInput: r, stat
60813
60829
  status: y.status,
60814
60830
  suggestions: [],
60815
60831
  title: y.title
60816
- }), /* @__PURE__ */ V(_M, { children: oe && /* @__PURE__ */ V(vW, {
60832
+ }), /* @__PURE__ */ V(_M, { children: oe && /* @__PURE__ */ V(yW, {
60817
60833
  artifactKind: y.kind,
60818
60834
  isToolbarVisible: B,
60819
60835
  sendMessage: u,
@@ -60823,7 +60839,7 @@ function xW({ addToolApprovalResponse: e, chatId: t, input: n, setInput: r, stat
60823
60839
  stop: a
60824
60840
  }) })]
60825
60841
  }),
60826
- /* @__PURE__ */ V(_M, { children: !oe && /* @__PURE__ */ V(yW, {
60842
+ /* @__PURE__ */ V(_M, { children: !oe && /* @__PURE__ */ V(bW, {
60827
60843
  currentVersionIndex: P,
60828
60844
  documents: D,
60829
60845
  handleVersionChange: ie
@@ -60832,7 +60848,7 @@ function xW({ addToolApprovalResponse: e, chatId: t, input: n, setInput: r, stat
60832
60848
  })]
60833
60849
  }) });
60834
60850
  }
60835
- var SW = O(xW, (e, t) => !(e.status !== t.status || !ye(e.votes, t.votes) || e.input !== t.input || !ye(e.messages, t.messages.length) || e.renderMessagePart !== t.renderMessagePart || !ye(e.suggestedActions, t.suggestedActions) || !ye(e.chatModels, t.chatModels) || e.defaultChatModel !== t.defaultChatModel)), CW = ({ title1: e, title2: t }) => {
60851
+ var CW = O(SW, (e, t) => !(e.status !== t.status || !ye(e.votes, t.votes) || e.input !== t.input || !ye(e.messages, t.messages.length) || e.renderMessagePart !== t.renderMessagePart || !ye(e.suggestedActions, t.suggestedActions) || !ye(e.chatModels, t.chatModels) || e.defaultChatModel !== t.defaultChatModel)), wW = ({ title1: e, title2: t }) => {
60836
60852
  let n = e?.trim(), r = t?.trim();
60837
60853
  return !n && !r ? null : /* @__PURE__ */ H("div", {
60838
60854
  className: "mx-auto mt-4 flex size-full max-w-3xl flex-col justify-center px-4 md:mt-16 md:px-8",
@@ -60870,9 +60886,9 @@ var SW = O(xW, (e, t) => !(e.status !== t.status || !ye(e.votes, t.votes) || e.i
60870
60886
  children: r
60871
60887
  })]
60872
60888
  }, "overview");
60873
- }, wW = (e) => e.trim().toLowerCase().replace(/\.+$/, "") === "an error occurred";
60874
- function TW({ disabled: e, error: t, onRetry: n }) {
60875
- let r = t.message.trim(), i = r !== "" && !wW(r);
60889
+ }, TW = (e) => e.trim().toLowerCase().replace(/\.+$/, "") === "an error occurred";
60890
+ function EW({ disabled: e, error: t, onRetry: n }) {
60891
+ let r = t.message.trim(), i = r !== "" && !TW(r);
60876
60892
  return /* @__PURE__ */ V("div", {
60877
60893
  className: "group/message fade-in w-full animate-in duration-200",
60878
60894
  "data-testid": "message-error",
@@ -60906,7 +60922,7 @@ function TW({ disabled: e, error: t, onRetry: n }) {
60906
60922
  })
60907
60923
  });
60908
60924
  }
60909
- function EW({ addToolApprovalResponse: e, chatId: t, conversationError: n, status: r, votes: i, messages: a, renderMessagePart: o, setMessages: c, regenerate: u, onRetryConversationError: d, isReadonly: f, selectedModelId: p, title1: m, title2: h }) {
60925
+ function DW({ addToolApprovalResponse: e, chatId: t, conversationError: n, status: r, votes: i, messages: a, renderMessagePart: o, setMessages: c, regenerate: u, onRetryConversationError: d, isReadonly: f, selectedModelId: p, title1: m, title2: h }) {
60910
60926
  let g = a.at(-1), _ = g ? l(g) : !1, v = r === "submitted" || r === "streaming" && g?.role === "assistant" && !_, { containerRef: y, endRef: b, isAtBottom: x, scrollToBottom: S, hasSentMessage: C } = VR({ status: r });
60911
60927
  return st(), /* @__PURE__ */ H("div", {
60912
60928
  className: "relative flex-1",
@@ -60916,11 +60932,11 @@ function EW({ addToolApprovalResponse: e, chatId: t, conversationError: n, statu
60916
60932
  children: /* @__PURE__ */ H("div", {
60917
60933
  className: "mx-auto flex min-w-0 max-w-4xl flex-col gap-4 px-2 pt-[60px] pb-4 md:gap-6 md:px-4",
60918
60934
  children: [
60919
- a.length === 0 && /* @__PURE__ */ V(CW, {
60935
+ a.length === 0 && /* @__PURE__ */ V(wW, {
60920
60936
  title1: m,
60921
60937
  title2: h
60922
60938
  }),
60923
- a.map((n, l) => s(n) ? null : /* @__PURE__ */ V(AB, {
60939
+ a.map((n, l) => s(n) ? null : /* @__PURE__ */ V(jB, {
60924
60940
  addToolApprovalResponse: e,
60925
60941
  chatId: t,
60926
60942
  isLoading: r === "streaming" && a.length - 1 === l,
@@ -60932,8 +60948,8 @@ function EW({ addToolApprovalResponse: e, chatId: t, conversationError: n, statu
60932
60948
  setMessages: c,
60933
60949
  vote: i ? i.find((e) => e.messageId === n.id) : void 0
60934
60950
  }, n.id)),
60935
- v && /* @__PURE__ */ V(MB, {}),
60936
- n && /* @__PURE__ */ V(TW, {
60951
+ v && /* @__PURE__ */ V(NB, {}),
60952
+ n && /* @__PURE__ */ V(EW, {
60937
60953
  disabled: r !== "ready" && r !== "error",
60938
60954
  error: n,
60939
60955
  onRetry: d
@@ -60953,10 +60969,10 @@ function EW({ addToolApprovalResponse: e, chatId: t, conversationError: n, statu
60953
60969
  })]
60954
60970
  });
60955
60971
  }
60956
- var DW = EW, OW = (e) => e?.parts?.some((e) => {
60972
+ var OW = DW, kW = (e) => e?.parts?.some((e) => {
60957
60973
  let t = e.state;
60958
60974
  return t === "approval-responded" || t === "output-denied";
60959
- }) ?? !1, kW = (e) => `agents-sdk:chat:${e}:stream`, AW = (e) => !!(e && typeof e == "object" && !Array.isArray(e)), jW = (e) => _(e) ?? "default", MW = (e) => {
60975
+ }) ?? !1, AW = (e) => `agents-sdk:chat:${e}:stream`, jW = (e) => !!(e && typeof e == "object" && !Array.isArray(e)), MW = (e) => _(e) ?? "default", NW = (e) => {
60960
60976
  if (typeof document > "u") return null;
60961
60977
  let t = document.cookie.split(";");
60962
60978
  for (let n of t) {
@@ -60971,10 +60987,10 @@ var DW = EW, OW = (e) => e?.parts?.some((e) => {
60971
60987
  }
60972
60988
  }
60973
60989
  return null;
60974
- }, NW = (e) => MW("chat-reasoning-effort") ?? e, PW = (e, t) => {
60990
+ }, PW = (e) => NW("chat-reasoning-effort") ?? e, FW = (e, t) => {
60975
60991
  let n = h(e);
60976
- return t && n.some((e) => e === t) ? t : jW(e);
60977
- }, FW = (e, t) => PW(e, NW(t)), IW = (e) => e instanceof mm || e instanceof Error && e.message ? e.message : "Something went wrong. Please try again.", LW = (e) => {
60992
+ return t && n.some((e) => e === t) ? t : MW(e);
60993
+ }, IW = (e, t) => FW(e, PW(t)), LW = (e) => e instanceof mm || e instanceof Error && e.message ? e.message : "Something went wrong. Please try again.", RW = (e) => {
60978
60994
  for (let t = e.length - 1; t >= 0; --t) {
60979
60995
  let n = e[t];
60980
60996
  if (!s(n)) {
@@ -60983,23 +60999,23 @@ var DW = EW, OW = (e) => e?.parts?.some((e) => {
60983
60999
  }
60984
61000
  }
60985
61001
  return null;
60986
- }, RW = (e) => {
61002
+ }, zW = (e) => {
60987
61003
  for (let t = e.length - 1; t >= 0; --t) {
60988
61004
  let n = e[t];
60989
61005
  if (n.role === "assistant" && l(n)) return n;
60990
61006
  }
60991
61007
  return null;
60992
- }, zW = (e) => {
61008
+ }, BW = (e) => {
60993
61009
  let t = e.length;
60994
61010
  for (; t > 0 && s(e[t - 1]);) --t;
60995
61011
  return t === e.length ? e : e.slice(0, t);
60996
- }, BW = (e) => {
61012
+ }, VW = (e) => {
60997
61013
  if (e?.role !== "assistant") return null;
60998
61014
  for (let t of e.parts) {
60999
- if (!AW(t)) continue;
61015
+ if (!jW(t)) continue;
61000
61016
  let e = t;
61001
61017
  if (e.state !== "approval-responded") continue;
61002
- let n = AW(e.approval) ? e.approval : null;
61018
+ let n = jW(e.approval) ? e.approval : null;
61003
61019
  if (!(n?.approved !== !0 || typeof n.id != "string")) return {
61004
61020
  id: n.id,
61005
61021
  reason: typeof n.reason == "string" ? n.reason : void 0
@@ -61007,15 +61023,15 @@ var DW = EW, OW = (e) => e?.parts?.some((e) => {
61007
61023
  }
61008
61024
  return null;
61009
61025
  };
61010
- function VW({ id: e, initialMessages: t, initialChatModel: n, initialOpenAIReasoningEffort: r, isReadonly: i, autoResume: a, chatModels: o, defaultChatModel: s, renderMessagePart: c, suggestedActions: l, title1: u, title2: h }) {
61026
+ function HW({ id: e, initialMessages: t, initialChatModel: n, initialOpenAIReasoningEffort: r, isReadonly: i, autoResume: a, chatModels: o, defaultChatModel: s, renderMessagePart: c, suggestedActions: l, title1: u, title2: h }) {
61011
61027
  let { setDataStream: g, setWaitingStatus: _ } = st(), { getChatPath: v } = Qe(), y = o && o.length > 0 ? o : f, b = p({
61012
61028
  defaultChatModel: s,
61013
61029
  models: y
61014
- }), x = d(y).has(n) ? n : b, S = FW(x, r), [C, w] = z(""), [T, E] = z(x), D = R(T), [O, k] = z(S), A = R(O), [M, N] = z(null);
61030
+ }), x = d(y).has(n) ? n : b, S = IW(x, r), [C, w] = z(""), [T, E] = z(x), D = R(T), [O, k] = z(S), A = R(O), [M, N] = z(null);
61015
61031
  j(() => {
61016
61032
  D.current = T;
61017
61033
  }, [T]), j(() => {
61018
- E(x), k(FW(x, r)), N(null), _(void 0);
61034
+ E(x), k(IW(x, r)), N(null), _(void 0);
61019
61035
  }, [
61020
61036
  e,
61021
61037
  x,
@@ -61034,7 +61050,7 @@ function VW({ id: e, initialMessages: t, initialChatModel: n, initialOpenAIReaso
61034
61050
  api: "/api/rb/agents/chat",
61035
61051
  fetch: km,
61036
61052
  prepareSendMessagesRequest(e) {
61037
- let t = D.current, n = A.current, r = e.messages.at(-1), i = e.messages.at(-2), a = wm(e.headers, Sm()), o = r?.role !== "user" || r?.role === "user" && OW(i);
61053
+ let t = D.current, n = A.current, r = e.messages.at(-1), i = e.messages.at(-2), a = wm(e.headers, Sm()), o = r?.role !== "user" || r?.role === "user" && kW(i);
61038
61054
  return {
61039
61055
  ...a ? { headers: a } : {},
61040
61056
  body: {
@@ -61062,7 +61078,7 @@ function VW({ id: e, initialMessages: t, initialChatModel: n, initialOpenAIReaso
61062
61078
  g((t) => t ? [...t, e] : []);
61063
61079
  },
61064
61080
  onError: (e) => {
61065
- let t = IW(e);
61081
+ let t = LW(e);
61066
61082
  N({ message: t }), le.error(t);
61067
61083
  }
61068
61084
  });
@@ -61070,7 +61086,7 @@ function VW({ id: e, initialMessages: t, initialChatModel: n, initialOpenAIReaso
61070
61086
  (L === "submitted" || L === "ready" || L === "error") && _(void 0);
61071
61087
  }, [L, _]);
61072
61088
  let B = (...e) => (N(null), re(), I(...e)), ae = (...e) => (N(null), re(), te(...e)), oe = () => {
61073
- let e = LW(P);
61089
+ let e = RW(P);
61074
61090
  if (e) {
61075
61091
  B({
61076
61092
  messageId: e.id,
@@ -61080,11 +61096,11 @@ function VW({ id: e, initialMessages: t, initialChatModel: n, initialOpenAIReaso
61080
61096
  });
61081
61097
  return;
61082
61098
  }
61083
- let t = RW(P);
61099
+ let t = zW(P);
61084
61100
  if (t) {
61085
- let e = BW(t);
61101
+ let e = VW(t);
61086
61102
  if (e) {
61087
- N(null), re(), F(zW), ie({
61103
+ N(null), re(), F(BW), ie({
61088
61104
  id: e.id,
61089
61105
  approved: !0,
61090
61106
  reason: e.reason
@@ -61097,7 +61113,7 @@ function VW({ id: e, initialMessages: t, initialChatModel: n, initialOpenAIReaso
61097
61113
  ae();
61098
61114
  };
61099
61115
  j(() => {
61100
- let t = kW(e), n = (e) => {
61116
+ let t = AW(e), n = (e) => {
61101
61117
  F((t) => {
61102
61118
  let n = t.findIndex((t) => t.id === e.id);
61103
61119
  return n === -1 ? [...t, e] : t.map((t, r) => r === n ? e : t);
@@ -61108,15 +61124,15 @@ function VW({ id: e, initialMessages: t, initialChatModel: n, initialOpenAIReaso
61108
61124
  },
61109
61125
  onMessage: n
61110
61126
  }), i = ue(t, (t) => {
61111
- if (!AW(t) || t.chatId !== e) return;
61127
+ if (!jW(t) || t.chatId !== e) return;
61112
61128
  let i = t.message;
61113
- if (AW(i)) {
61129
+ if (jW(i)) {
61114
61130
  let e = typeof i.id == "string" ? i.id : null, t = typeof i.role == "string" ? i.role : null, r = Array.isArray(i.parts) ? i.parts : null;
61115
61131
  e && t && r && n({
61116
61132
  id: e,
61117
61133
  role: t,
61118
61134
  parts: r,
61119
- metadata: AW(i.metadata) ? i.metadata : { createdAt: (/* @__PURE__ */ new Date()).toISOString() }
61135
+ metadata: jW(i.metadata) ? i.metadata : { createdAt: (/* @__PURE__ */ new Date()).toISOString() }
61120
61136
  });
61121
61137
  }
61122
61138
  if (t.done === !0) {
@@ -61124,7 +61140,7 @@ function VW({ id: e, initialMessages: t, initialChatModel: n, initialOpenAIReaso
61124
61140
  return;
61125
61141
  }
61126
61142
  let a = t.part;
61127
- AW(a) && (typeof a.type == "string" && a.type.startsWith("data-") && g((e) => e ? [...e, a] : []), r.push(a));
61143
+ jW(a) && (typeof a.type == "string" && a.type.startsWith("data-") && g((e) => e ? [...e, a] : []), r.push(a));
61128
61144
  });
61129
61145
  return () => {
61130
61146
  i(), r.dispose();
@@ -61166,7 +61182,7 @@ function VW({ id: e, initialMessages: t, initialChatModel: n, initialOpenAIReaso
61166
61182
  className: "relative flex h-full min-h-0 min-w-0 overflow-hidden bg-background",
61167
61183
  children: [/* @__PURE__ */ H("div", {
61168
61184
  className: "overscroll-behavior-contain flex h-full min-h-0 min-w-0 flex-1 touch-pan-y flex-col bg-background",
61169
- children: [/* @__PURE__ */ V(DW, {
61185
+ children: [/* @__PURE__ */ V(OW, {
61170
61186
  addToolApprovalResponse: ie,
61171
61187
  chatId: e,
61172
61188
  conversationError: M,
@@ -61184,7 +61200,7 @@ function VW({ id: e, initialMessages: t, initialChatModel: n, initialOpenAIReaso
61184
61200
  votes: pe
61185
61201
  }), /* @__PURE__ */ V("div", {
61186
61202
  className: "sticky bottom-0 z-1 mx-auto flex w-full max-w-4xl gap-2 border-t-0 bg-background px-2 pb-3 md:px-4 md:pb-4",
61187
- children: !i && /* @__PURE__ */ V(iW, {
61203
+ children: !i && /* @__PURE__ */ V(aW, {
61188
61204
  attachments: me,
61189
61205
  chatModels: y,
61190
61206
  defaultChatModel: b,
@@ -61192,7 +61208,7 @@ function VW({ id: e, initialMessages: t, initialChatModel: n, initialOpenAIReaso
61192
61208
  input: C,
61193
61209
  messages: P,
61194
61210
  onModelChange: (e) => {
61195
- E(e), k(FW(e, r));
61211
+ E(e), k(IW(e, r));
61196
61212
  },
61197
61213
  onOpenAIReasoningEffortChange: k,
61198
61214
  openaiReasoningEffort: O,
@@ -61206,7 +61222,7 @@ function VW({ id: e, initialMessages: t, initialChatModel: n, initialOpenAIReaso
61206
61222
  suggestedActions: l
61207
61223
  })
61208
61224
  })]
61209
- }), /* @__PURE__ */ V(SW, {
61225
+ }), /* @__PURE__ */ V(CW, {
61210
61226
  addToolApprovalResponse: ie,
61211
61227
  attachments: me,
61212
61228
  chatModels: y,
@@ -61231,7 +61247,7 @@ function VW({ id: e, initialMessages: t, initialChatModel: n, initialOpenAIReaso
61231
61247
  }
61232
61248
  //#endregion
61233
61249
  //#region src/components/data-stream-handler.tsx
61234
- function HW() {
61250
+ function UW() {
61235
61251
  let { dataStream: e, setDataStream: t } = st(), { artifact: n, setArtifact: r, setMetadata: i } = DS();
61236
61252
  return j(() => {
61237
61253
  if (!e?.length) return;
@@ -61239,7 +61255,7 @@ function HW() {
61239
61255
  t([]);
61240
61256
  for (let e of a) {
61241
61257
  if (e.type === "data-chat-title") continue;
61242
- let t = bW.find((e) => e.kind === n.kind);
61258
+ let t = xW.find((e) => e.kind === n.kind);
61243
61259
  t?.onStreamPart && t.onStreamPart({
61244
61260
  streamPart: e,
61245
61261
  setArtifact: r,
@@ -61287,4 +61303,4 @@ function HW() {
61287
61303
  ]), null;
61288
61304
  }
61289
61305
  //#endregion
61290
- export { _y as a, Cm as c, Ze as d, et as f, Qe as h, wy as i, xm as l, tt as m, VW as n, Nm as o, $e as p, xy as r, Sm as s, HW as t, ot as u };
61306
+ export { _y as a, Cm as c, Ze as d, et as f, Qe as h, wy as i, xm as l, tt as m, HW as n, Nm as o, $e as p, xy as r, Sm as s, UW as t, ot as u };