@devalok/shilp-sutra 0.44.1 → 0.45.1

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 (142) hide show
  1. package/AGENTS.md +13 -11
  2. package/BREAKING.json +209 -27
  3. package/MIGRATION.md +34 -0
  4. package/README.md +12 -0
  5. package/dist/_chunks/badge-group.js +1 -0
  6. package/dist/_chunks/badge-group.js.map +1 -1
  7. package/dist/_chunks/block-shell.js +25 -0
  8. package/dist/_chunks/block-shell.js.map +1 -0
  9. package/dist/_chunks/chat.js +153 -150
  10. package/dist/_chunks/chat.js.map +1 -1
  11. package/dist/_chunks/document-preview.js +1 -1
  12. package/dist/_chunks/image-preview.js +4 -4
  13. package/dist/_chunks/mention.js +5 -0
  14. package/dist/_chunks/mention.js.map +1 -0
  15. package/dist/_chunks/shared.js +65 -78
  16. package/dist/_chunks/shared.js.map +1 -1
  17. package/dist/_chunks/success.js +108 -106
  18. package/dist/_chunks/success.js.map +1 -1
  19. package/dist/ai/blocks/block-shell.d.ts +19 -0
  20. package/dist/ai/blocks/block-shell.d.ts.map +1 -0
  21. package/dist/ai/blocks/block-table.d.ts.map +1 -1
  22. package/dist/ai/blocks/confirm.d.ts.map +1 -1
  23. package/dist/ai/blocks/error.d.ts.map +1 -1
  24. package/dist/ai/blocks/error.js +5 -5
  25. package/dist/ai/blocks/error.js.map +1 -1
  26. package/dist/ai/blocks/success.d.ts.map +1 -1
  27. package/dist/ai/blocks/text.d.ts.map +1 -1
  28. package/dist/ai/blocks/text.js +4 -3
  29. package/dist/ai/blocks/text.js.map +1 -1
  30. package/dist/composed/activity-feed.d.ts.map +1 -1
  31. package/dist/composed/activity-feed.js +14 -12
  32. package/dist/composed/activity-feed.js.map +1 -1
  33. package/dist/composed/file-preview/audio-preview.d.ts.map +1 -1
  34. package/dist/composed/file-preview/shared.d.ts +10 -0
  35. package/dist/composed/file-preview/shared.d.ts.map +1 -1
  36. package/dist/composed/file-preview/video-preview.d.ts.map +1 -1
  37. package/dist/composed/file-preview.js +151 -188
  38. package/dist/composed/file-preview.js.map +1 -1
  39. package/dist/composed/master-detail.d.ts.map +1 -1
  40. package/dist/composed/master-detail.js +13 -4
  41. package/dist/composed/master-detail.js.map +1 -1
  42. package/dist/composed/rich-chat-input.d.ts.map +1 -1
  43. package/dist/composed/rich-chat-input.js +514 -503
  44. package/dist/composed/rich-chat-input.js.map +1 -1
  45. package/dist/composed/rich-text-editor.d.ts.map +1 -1
  46. package/dist/composed/rich-text-editor.js +144 -143
  47. package/dist/composed/rich-text-editor.js.map +1 -1
  48. package/dist/composed/schedule-view.d.ts.map +1 -1
  49. package/dist/composed/schedule-view.js +52 -39
  50. package/dist/composed/schedule-view.js.map +1 -1
  51. package/dist/shell/notification-preferences.d.ts.map +1 -1
  52. package/dist/shell/notification-preferences.js +115 -114
  53. package/dist/shell/notification-preferences.js.map +1 -1
  54. package/dist/ui/badge-group.d.ts.map +1 -1
  55. package/dist/ui/card.d.ts +66 -16
  56. package/dist/ui/card.d.ts.map +1 -1
  57. package/dist/ui/card.js +85 -60
  58. package/dist/ui/card.js.map +1 -1
  59. package/dist/ui/chat/message.d.ts.map +1 -1
  60. package/dist/ui/color-input.d.ts.map +1 -1
  61. package/dist/ui/color-input.js +18 -18
  62. package/dist/ui/color-input.js.map +1 -1
  63. package/dist/ui/data-table-body.d.ts.map +1 -1
  64. package/dist/ui/data-table-body.js +94 -64
  65. package/dist/ui/data-table-body.js.map +1 -1
  66. package/dist/ui/data-table-card.d.ts.map +1 -1
  67. package/dist/ui/data-table-card.js +50 -43
  68. package/dist/ui/data-table-card.js.map +1 -1
  69. package/dist/ui/data-table-context.d.ts +0 -4
  70. package/dist/ui/data-table-context.d.ts.map +1 -1
  71. package/dist/ui/data-table-context.js +8 -12
  72. package/dist/ui/data-table-context.js.map +1 -1
  73. package/dist/ui/data-table-header.d.ts.map +1 -1
  74. package/dist/ui/data-table-header.js +2 -2
  75. package/dist/ui/data-table-header.js.map +1 -1
  76. package/dist/ui/data-table.d.ts.map +1 -1
  77. package/dist/ui/data-table.js +185 -182
  78. package/dist/ui/data-table.js.map +1 -1
  79. package/dist/ui/index.d.ts +3 -2
  80. package/dist/ui/index.d.ts.map +1 -1
  81. package/dist/ui/index.js +59 -58
  82. package/dist/ui/index.js.map +1 -1
  83. package/dist/ui/lib/mention.d.ts +11 -0
  84. package/dist/ui/lib/mention.d.ts.map +1 -0
  85. package/dist/ui/segmented-control.js +4 -4
  86. package/dist/ui/segmented-control.js.map +1 -1
  87. package/dist/ui/separator.d.ts +6 -5
  88. package/dist/ui/separator.d.ts.map +1 -1
  89. package/dist/ui/separator.js +7 -10
  90. package/dist/ui/separator.js.map +1 -1
  91. package/dist/ui/split-button.d.ts.map +1 -1
  92. package/dist/ui/split-button.js +62 -129
  93. package/dist/ui/split-button.js.map +1 -1
  94. package/dist/ui/stat-card.d.ts +7 -0
  95. package/dist/ui/stat-card.d.ts.map +1 -1
  96. package/dist/ui/stat-card.js +144 -126
  97. package/dist/ui/stat-card.js.map +1 -1
  98. package/dist/ui/table-row-link.d.ts +45 -0
  99. package/dist/ui/table-row-link.d.ts.map +1 -0
  100. package/dist/ui/table-row-link.js +16 -0
  101. package/dist/ui/table-row-link.js.map +1 -0
  102. package/dist/ui/table.d.ts +49 -5
  103. package/dist/ui/table.d.ts.map +1 -1
  104. package/dist/ui/table.js +39 -29
  105. package/dist/ui/table.js.map +1 -1
  106. package/dist/ui/toast-types.d.ts +10 -0
  107. package/dist/ui/toast-types.d.ts.map +1 -1
  108. package/dist/ui/toast.d.ts +6 -2
  109. package/dist/ui/toast.d.ts.map +1 -1
  110. package/dist/ui/toast.js +56 -54
  111. package/dist/ui/toast.js.map +1 -1
  112. package/docs/components/composed/content-card.md +2 -0
  113. package/docs/components/ui/button.md +3 -3
  114. package/docs/components/ui/card.md +27 -10
  115. package/docs/components/ui/chat.md +1 -1
  116. package/docs/components/ui/color-input.md +2 -2
  117. package/docs/components/ui/data-table.md +8 -1
  118. package/docs/components/ui/segmented-control.md +2 -2
  119. package/docs/components/ui/separator.md +3 -1
  120. package/docs/components/ui/split-button.md +3 -0
  121. package/docs/components/ui/stat-card.md +10 -2
  122. package/docs/components/ui/table-row-link.md +41 -0
  123. package/docs/components/ui/table.md +69 -0
  124. package/docs/components/ui/toast.md +10 -6
  125. package/docs/recipes/install-next-app-router.md +1 -1
  126. package/docs/recipes/troubleshoot.md +1 -1
  127. package/llms.txt +159 -781
  128. package/make-kit/components/card.md +54 -16
  129. package/make-kit/components/table.md +45 -7
  130. package/make-kit/foundations/spacing.md +3 -1
  131. package/make-kit/foundations/surfaces.md +1 -1
  132. package/mcp-manifest.json +12349 -0
  133. package/mcp-manifest.schema.json +232 -0
  134. package/package.json +8 -3
  135. package/skill/README.md +0 -1
  136. package/skill/SKILL.md +9 -8
  137. package/skill/references/components.md +159 -781
  138. package/skill/references/setup-next-app-router.md +1 -1
  139. package/skill/references/troubleshoot.md +1 -1
  140. package/llms-full.txt +0 -7198
  141. package/llms-quick.txt +0 -251
  142. package/skill/references/components-full.md +0 -7200
@@ -10,23 +10,24 @@ import { Dialog as u, DialogContent as d, DialogFooter as f, DialogHeader as p,
10
10
  import { SplitButton as h } from "../ui/split-button.js";
11
11
  import { ToggleGroup as g, ToggleGroupItem as _ } from "../ui/toggle-group.js";
12
12
  import { TruncatedText as v } from "../ui/truncated-text.js";
13
- import { emojiDataLoaders as y } from "./emoji-picker.js";
14
- import { a as b, c as x, d as ee, f as S, g as C, h as te, i as ne, l as w, m as re, n as ie, p as T, u as ae, y as oe } from "../_chunks/tiptap.js";
15
- import { useColorMode as E } from "../hooks/use-color-mode.js";
16
- import { n as se, r as ce } from "../_chunks/emoji-data.js";
17
- import { EmojiNode as le } from "./extensions/emoji-node.js";
18
- import { createEmojiSuggestion as ue } from "./extensions/emoji-suggestion.js";
19
- import { n as de, t as fe } from "../_chunks/mention-suggestion.js";
20
- import { n as pe, t as me } from "../_chunks/use-calendar.js";
13
+ import { t as y } from "../_chunks/mention.js";
14
+ import { emojiDataLoaders as b } from "./emoji-picker.js";
15
+ import { a as x, c as ee, d as S, f as C, g as te, h as ne, i as w, l as T, m as re, n as ie, p as ae, u as oe, y as E } from "../_chunks/tiptap.js";
16
+ import { useColorMode as se } from "../hooks/use-color-mode.js";
17
+ import { n as ce, r as le } from "../_chunks/emoji-data.js";
18
+ import { EmojiNode as ue } from "./extensions/emoji-node.js";
19
+ import { createEmojiSuggestion as de } from "./extensions/emoji-suggestion.js";
20
+ import { n as fe, t as pe } from "../_chunks/mention-suggestion.js";
21
+ import { n as me, t as he } from "../_chunks/use-calendar.js";
21
22
  import * as D from "react";
22
- import { useCallback as O, useEffect as he, useRef as k, useState as A } from "react";
23
- import { Fragment as j, jsx as M, jsxs as N } from "react/jsx-runtime";
24
- import * as ge from "react-dom";
25
- import { IconAt as _e, IconBlockquote as ve, IconBold as ye, IconCalendarEvent as be, IconChevronDown as xe, IconClock as Se, IconCode as Ce, IconFile as P, IconHighlight as we, IconItalic as F, IconLink as Te, IconList as Ee, IconListNumbers as De, IconMicrophone as Oe, IconMoodSmile as ke, IconPencil as I, IconPlayerPause as L, IconPlayerPlay as R, IconPlus as Ae, IconSend as je, IconSlash as Me, IconSquare as Ne, IconStrikethrough as z, IconTextSize as Pe, IconTrash as Fe, IconUnderline as Ie, IconX as B } from "@tabler/icons-react";
26
- import { AnimatePresence as Le, motion as V, useReducedMotion as Re } from "framer-motion";
27
- import { createRoot as ze } from "react-dom/client";
23
+ import { useCallback as O, useEffect as ge, useRef as k, useState as A } from "react";
24
+ import { Fragment as _e, jsx as j, jsxs as M } from "react/jsx-runtime";
25
+ import * as ve from "react-dom";
26
+ import { IconAt as ye, IconBlockquote as be, IconBold as xe, IconCalendarEvent as Se, IconChevronDown as Ce, IconClock as we, IconCode as N, IconFile as Te, IconHighlight as P, IconItalic as Ee, IconLink as De, IconList as Oe, IconListNumbers as F, IconMicrophone as ke, IconMoodSmile as Ae, IconPencil as I, IconPlayerPause as L, IconPlayerPlay as je, IconPlus as Me, IconSend as Ne, IconSlash as Pe, IconSquare as Fe, IconStrikethrough as Ie, IconTextSize as Le, IconTrash as Re, IconUnderline as R, IconX as z } from "@tabler/icons-react";
27
+ import { AnimatePresence as ze, motion as B, useReducedMotion as Be } from "framer-motion";
28
+ import { createRoot as Ve } from "react-dom/client";
28
29
  //#region src/composed/extensions/slash-command.tsx
29
- var H = D.forwardRef(({ groups: e, query: t, command: n }, r) => {
30
+ var He = D.forwardRef(({ groups: e, query: t, command: n }, r) => {
30
31
  let [i, o] = D.useState(0), s = D.useMemo(() => {
31
32
  let n = t.toLowerCase(), r = [];
32
33
  return e.forEach((e, t) => {
@@ -50,36 +51,36 @@ var H = D.forwardRef(({ groups: e, query: t, command: n }, r) => {
50
51
  flatIndex: l
51
52
  }), l++;
52
53
  }
53
- return /* @__PURE__ */ M("div", {
54
+ return /* @__PURE__ */ j("div", {
54
55
  role: "listbox",
55
56
  "aria-label": "Slash commands",
56
57
  className: "z-popover max-h-[320px] min-w-[220px] overflow-x-hidden overflow-y-auto rounded-surface bg-surface-overlay p-ds-02 shadow-floating",
57
- children: c.map((e, t) => /* @__PURE__ */ N("div", {
58
+ children: c.map((e, t) => /* @__PURE__ */ M("div", {
58
59
  role: "group",
59
60
  "aria-label": e.label,
60
61
  children: [
61
- t > 0 && /* @__PURE__ */ M("div", { className: "my-ds-01 border-t border-surface-border" }),
62
- /* @__PURE__ */ M("div", {
62
+ t > 0 && /* @__PURE__ */ j("div", { className: "my-ds-01 border-t border-surface-border" }),
63
+ /* @__PURE__ */ j("div", {
63
64
  className: "px-ds-03 py-ds-01 text-ds-xs font-medium text-surface-fg-subtle",
64
65
  children: e.label
65
66
  }),
66
67
  e.items.map(({ command: e, flatIndex: t }) => {
67
68
  let r = e.icon;
68
- return /* @__PURE__ */ N("button", {
69
+ return /* @__PURE__ */ M("button", {
69
70
  type: "button",
70
71
  role: "option",
71
72
  "aria-selected": t === i,
72
73
  onClick: () => n(e),
73
74
  className: a("flex w-full items-center gap-ds-03 rounded-control px-ds-03 py-ds-02 text-left cursor-pointer", t === i ? "bg-surface-raised-hover" : "hover:bg-surface-raised-hover"),
74
- children: [r && /* @__PURE__ */ M("span", {
75
+ children: [r && /* @__PURE__ */ j("span", {
75
76
  className: "flex h-4 w-4 shrink-0 items-center justify-center text-surface-fg-muted",
76
- children: /* @__PURE__ */ M(r, { className: "h-4 w-4" })
77
- }), /* @__PURE__ */ N("div", {
77
+ children: /* @__PURE__ */ j(r, { className: "h-4 w-4" })
78
+ }), /* @__PURE__ */ M("div", {
78
79
  className: "flex flex-col",
79
- children: [/* @__PURE__ */ M("span", {
80
+ children: [/* @__PURE__ */ j("span", {
80
81
  className: "text-ds-sm text-surface-fg",
81
82
  children: e.label
82
- }), e.description && /* @__PURE__ */ M("span", {
83
+ }), e.description && /* @__PURE__ */ j("span", {
83
84
  className: "text-ds-xs text-surface-fg-subtle",
84
85
  children: e.description
85
86
  })]
@@ -90,15 +91,15 @@ var H = D.forwardRef(({ groups: e, query: t, command: n }, r) => {
90
91
  }, e.label))
91
92
  });
92
93
  });
93
- H.displayName = "SlashCommandList";
94
- function Be(e) {
94
+ He.displayName = "SlashCommandList";
95
+ function Ue(e) {
95
96
  return () => {
96
97
  let t = null, n = null, r = null;
97
98
  return {
98
99
  onStart: (i) => {
99
100
  n = document.createElement("div"), n.style.position = "absolute", n.style.zIndex = "1400";
100
101
  let a = i.clientRect?.();
101
- a && (n.style.left = `${a.left}px`, n.style.top = `${a.bottom + 4}px`), document.body.appendChild(n), t = ze(n), t.render(/* @__PURE__ */ M(H, {
102
+ a && (n.style.left = `${a.left}px`, n.style.top = `${a.bottom + 4}px`), document.body.appendChild(n), t = Ve(n), t.render(/* @__PURE__ */ j(He, {
102
103
  ref: (e) => {
103
104
  r = e;
104
105
  },
@@ -110,7 +111,7 @@ function Be(e) {
110
111
  onUpdate: (i) => {
111
112
  if (!t || !n) return;
112
113
  let a = i.clientRect?.();
113
- a && (n.style.left = `${a.left}px`, n.style.top = `${a.bottom + 4}px`), t.render(/* @__PURE__ */ M(H, {
114
+ a && (n.style.left = `${a.left}px`, n.style.top = `${a.bottom + 4}px`), t.render(/* @__PURE__ */ j(He, {
114
115
  ref: (e) => {
115
116
  r = e;
116
117
  },
@@ -126,13 +127,13 @@ function Be(e) {
126
127
  };
127
128
  };
128
129
  }
129
- function Ve(e) {
130
+ function We(e) {
130
131
  let t = e.flatMap((e) => e.commands);
131
- return C.create({
132
+ return te.create({
132
133
  name: "slashCommand",
133
134
  addProseMirrorPlugins() {
134
- return [T({
135
- pluginKey: new oe("slashCommand"),
135
+ return [ae({
136
+ pluginKey: new E("slashCommand"),
136
137
  editor: this.editor,
137
138
  char: "/",
138
139
  startOfLine: !0,
@@ -145,18 +146,18 @@ function Ve(e) {
145
146
  command: ({ editor: e, range: t, props: n }) => {
146
147
  e.chain().focus().deleteRange(t).run(), n.action(e);
147
148
  },
148
- render: Be(e)
149
+ render: Ue(e)
149
150
  })];
150
151
  }
151
152
  });
152
153
  }
153
154
  //#endregion
154
155
  //#region src/composed/rich-chat-input/attachment-strip.tsx
155
- function He(e) {
156
+ function Ge(e) {
156
157
  return e < 1024 ? `${e} B` : e < 1024 * 1024 ? `${(e / 1024).toFixed(1)} KB` : `${(e / (1024 * 1024)).toFixed(1)} MB`;
157
158
  }
158
- function Ue({ attachments: e, onRemoveAttachment: t }) {
159
- return /* @__PURE__ */ M(V.div, {
159
+ function Ke({ attachments: e, onRemoveAttachment: t }) {
160
+ return /* @__PURE__ */ j(B.div, {
160
161
  initial: {
161
162
  height: 0,
162
163
  opacity: 0
@@ -179,13 +180,13 @@ function Ue({ attachments: e, onRemoveAttachment: t }) {
179
180
  ]
180
181
  },
181
182
  className: "overflow-hidden",
182
- children: /* @__PURE__ */ M("div", {
183
+ children: /* @__PURE__ */ j("div", {
183
184
  role: "list",
184
185
  "aria-label": "Attachments",
185
186
  className: "flex gap-ds-02 overflow-x-auto px-ds-04 py-ds-02b border-b border-surface-border",
186
- children: /* @__PURE__ */ M(Le, {
187
+ children: /* @__PURE__ */ j(ze, {
187
188
  initial: !1,
188
- children: e.map((e) => e.type === "image" ? /* @__PURE__ */ N(V.div, {
189
+ children: e.map((e) => e.type === "image" ? /* @__PURE__ */ M(B.div, {
189
190
  role: "listitem",
190
191
  "aria-label": `Image: ${e.name}`,
191
192
  layout: !0,
@@ -216,29 +217,29 @@ function Ue({ attachments: e, onRemoveAttachment: t }) {
216
217
  },
217
218
  className: "relative h-12 w-12 shrink-0 group",
218
219
  children: [
219
- /* @__PURE__ */ M("img", {
220
+ /* @__PURE__ */ j("img", {
220
221
  src: e.url,
221
222
  alt: e.name,
222
223
  className: "h-full w-full rounded-control object-cover"
223
224
  }),
224
- /* @__PURE__ */ M("button", {
225
+ /* @__PURE__ */ j("button", {
225
226
  onClick: () => t(e.id),
226
227
  className: "absolute -top-1 -right-1 h-ico-sm w-ico-sm rounded-pill bg-error-9 text-error-fg flex items-center justify-center opacity-0 group-hover:opacity-100 transition-opacity duration-fast-02",
227
228
  "aria-label": `Remove ${e.name}`,
228
229
  title: "Remove",
229
- children: /* @__PURE__ */ M(s, {
230
- icon: B,
230
+ children: /* @__PURE__ */ j(s, {
231
+ icon: z,
231
232
  size: "xs"
232
233
  })
233
234
  }),
234
- e.uploading && /* @__PURE__ */ M("div", {
235
+ e.uploading && /* @__PURE__ */ j("div", {
235
236
  className: "absolute inset-0 rounded-control bg-surface-overlay/50 flex items-center justify-center",
236
- children: /* @__PURE__ */ M(o, { size: "sm" })
237
+ children: /* @__PURE__ */ j(o, { size: "sm" })
237
238
  })
238
239
  ]
239
- }, e.id) : /* @__PURE__ */ N(V.div, {
240
+ }, e.id) : /* @__PURE__ */ M(B.div, {
240
241
  role: "listitem",
241
- "aria-label": `File: ${e.name}, ${He(e.size)}`,
242
+ "aria-label": `File: ${e.name}, ${Ge(e.size)}`,
242
243
  layout: !0,
243
244
  initial: {
244
245
  scale: 0,
@@ -267,27 +268,27 @@ function Ue({ attachments: e, onRemoveAttachment: t }) {
267
268
  },
268
269
  className: "flex items-center gap-ds-02 shrink-0 rounded-control bg-surface-raised px-ds-03 py-ds-01 group",
269
270
  children: [
270
- /* @__PURE__ */ M(s, {
271
- icon: P,
271
+ /* @__PURE__ */ j(s, {
272
+ icon: Te,
272
273
  size: "xs",
273
274
  className: "text-surface-fg-muted"
274
275
  }),
275
- /* @__PURE__ */ M(v, {
276
+ /* @__PURE__ */ j(v, {
276
277
  mode: "middle",
277
278
  className: "max-w-[120px] text-ds-xs text-surface-fg-muted",
278
279
  children: e.name
279
280
  }),
280
- /* @__PURE__ */ M("span", {
281
+ /* @__PURE__ */ j("span", {
281
282
  className: "text-ds-xs text-surface-fg-subtle",
282
- children: He(e.size)
283
+ children: Ge(e.size)
283
284
  }),
284
- /* @__PURE__ */ M("button", {
285
+ /* @__PURE__ */ j("button", {
285
286
  onClick: () => t(e.id),
286
287
  className: "text-surface-fg-subtle hover:text-error-11 opacity-0 group-hover:opacity-100 transition-opacity duration-fast-02",
287
288
  "aria-label": `Remove ${e.name}`,
288
289
  title: "Remove",
289
- children: /* @__PURE__ */ M(s, {
290
- icon: B,
290
+ children: /* @__PURE__ */ j(s, {
291
+ icon: z,
291
292
  size: "xs"
292
293
  })
293
294
  })
@@ -299,7 +300,7 @@ function Ue({ attachments: e, onRemoveAttachment: t }) {
299
300
  }
300
301
  //#endregion
301
302
  //#region src/composed/rich-chat-input/audio-waveform.tsx
302
- var U = D.forwardRef(function({ mode: e, analyserNode: t, data: n, progress: r = 0, barWidth: i = 3, barGap: o = 2, barCount: s = 40, height: c = 32, className: l, ...u }, d) {
303
+ var V = D.forwardRef(function({ mode: e, analyserNode: t, data: n, progress: r = 0, barWidth: i = 3, barGap: o = 2, barCount: s = 40, height: c = 32, className: l, ...u }, d) {
303
304
  let [f, p] = D.useState(() => Array(s).fill(.05)), m = D.useRef(0), h = D.useRef(f);
304
305
  D.useEffect(() => {
305
306
  if (e !== "live" || !t) return;
@@ -336,7 +337,7 @@ var U = D.forwardRef(function({ mode: e, analyserNode: t, data: n, progress: r =
336
337
  ]);
337
338
  let g = s * (i + o) - o, _ = D.useMemo(() => f.map((t, n) => {
338
339
  let a = Math.max(2, t * c), l = n * (i + o), u = (c - a) / 2, d = e === "static" && r > 0 && n / s <= r;
339
- return /* @__PURE__ */ M("rect", {
340
+ return /* @__PURE__ */ j("rect", {
340
341
  x: l,
341
342
  y: u,
342
343
  width: i,
@@ -353,7 +354,7 @@ var U = D.forwardRef(function({ mode: e, analyserNode: t, data: n, progress: r =
353
354
  s,
354
355
  c
355
356
  ]);
356
- return /* @__PURE__ */ M("svg", {
357
+ return /* @__PURE__ */ j("svg", {
357
358
  ref: d,
358
359
  height: c,
359
360
  viewBox: `0 0 ${g} ${c}`,
@@ -364,18 +365,18 @@ var U = D.forwardRef(function({ mode: e, analyserNode: t, data: n, progress: r =
364
365
  children: _
365
366
  });
366
367
  });
367
- U.displayName = "AudioWaveform";
368
+ V.displayName = "AudioWaveform";
368
369
  //#endregion
369
370
  //#region src/composed/rich-chat-input/audio-player.tsx
370
- var We = [
371
+ var H = [
371
372
  1,
372
373
  1.5,
373
374
  2
374
375
  ];
375
- function Ge(e) {
376
+ function qe(e) {
376
377
  return `${Math.floor(e / 60)}:${Math.floor(e % 60).toString().padStart(2, "0")}`;
377
378
  }
378
- var Ke = D.forwardRef(function({ src: e, duration: t, waveformData: n, className: r, ...i }, o) {
379
+ var Je = D.forwardRef(function({ src: e, duration: t, waveformData: n, className: r, ...i }, o) {
379
380
  let s = D.useRef(null), c = D.useRef(null), [u, d] = D.useState(!1), [f, p] = D.useState(0), [m, h] = D.useState(0), [g, _] = D.useState(null), v = D.useMemo(() => {
380
381
  if (typeof e == "string") return e;
381
382
  let t = URL.createObjectURL(e);
@@ -404,22 +405,22 @@ var Ke = D.forwardRef(function({ src: e, duration: t, waveformData: n, className
404
405
  let i = r.getBoundingClientRect(), a = e.clientX - i.left;
405
406
  n.currentTime = Math.max(0, Math.min(1, a / i.width)) * t, p(n.currentTime);
406
407
  }, [t]), ee = D.useCallback(() => {
407
- let e = (m + 1) % We.length;
408
- h(e), s.current && (s.current.playbackRate = We[e]);
409
- }, [m]), S = t > 0 ? f / t : 0, C = We[m];
410
- return /* @__PURE__ */ N("div", {
408
+ let e = (m + 1) % H.length;
409
+ h(e), s.current && (s.current.playbackRate = H[e]);
410
+ }, [m]), S = t > 0 ? f / t : 0, C = H[m];
411
+ return /* @__PURE__ */ M("div", {
411
412
  ref: o,
412
413
  role: "group",
413
414
  "aria-label": "Voice message player",
414
415
  className: a("flex items-center gap-ds-03", r),
415
416
  ...i,
416
417
  children: [
417
- /* @__PURE__ */ M("audio", {
418
+ /* @__PURE__ */ j("audio", {
418
419
  ref: s,
419
420
  src: v,
420
421
  preload: "metadata"
421
422
  }),
422
- /* @__PURE__ */ M(l, {
423
+ /* @__PURE__ */ j(l, {
423
424
  type: "button",
424
425
  variant: "solid",
425
426
  shape: "pill",
@@ -428,13 +429,13 @@ var Ke = D.forwardRef(function({ src: e, duration: t, waveformData: n, className
428
429
  onKeyDown: b,
429
430
  "aria-label": u ? "Pause voice message" : "Play voice message",
430
431
  className: "shrink-0 active:scale-95",
431
- children: M(u ? L : R, {
432
+ children: j(u ? L : je, {
432
433
  size: 16,
433
434
  stroke: 2,
434
435
  "aria-hidden": "true"
435
436
  })
436
437
  }),
437
- /* @__PURE__ */ M(U, {
438
+ /* @__PURE__ */ j(V, {
438
439
  ref: c,
439
440
  mode: "static",
440
441
  data: n,
@@ -442,15 +443,15 @@ var Ke = D.forwardRef(function({ src: e, duration: t, waveformData: n, className
442
443
  className: "cursor-pointer",
443
444
  onClick: x
444
445
  }),
445
- /* @__PURE__ */ N("span", {
446
+ /* @__PURE__ */ M("span", {
446
447
  className: "text-ds-xs tabular-nums text-surface-fg-subtle whitespace-nowrap",
447
448
  children: [
448
- Ge(f),
449
+ qe(f),
449
450
  " / ",
450
- Ge(t)
451
+ qe(t)
451
452
  ]
452
453
  }),
453
- /* @__PURE__ */ N("button", {
454
+ /* @__PURE__ */ M("button", {
454
455
  type: "button",
455
456
  onClick: ee,
456
457
  "aria-label": `Playback speed ${C}x`,
@@ -460,18 +461,18 @@ var Ke = D.forwardRef(function({ src: e, duration: t, waveformData: n, className
460
461
  ]
461
462
  });
462
463
  });
463
- Ke.displayName = "AudioPlayer";
464
+ Je.displayName = "AudioPlayer";
464
465
  //#endregion
465
466
  //#region src/composed/rich-chat-input/chat-toolbar.tsx
466
- var qe = D.createContext(null);
467
+ var U = D.createContext(null);
467
468
  function W() {
468
- let e = D.useContext(qe);
469
+ let e = D.useContext(U);
469
470
  if (!e) throw Error("Toolbar primitives must be used inside <ChatToolbar>");
470
471
  return e;
471
472
  }
472
473
  function G({ onClick: e, isActive: t, disabled: n, title: r, children: i, className: o }) {
473
474
  let { disabled: s } = W();
474
- return /* @__PURE__ */ M("button", {
475
+ return /* @__PURE__ */ j("button", {
475
476
  type: "button",
476
477
  onClick: e,
477
478
  disabled: n ?? s,
@@ -483,239 +484,239 @@ function G({ onClick: e, isActive: t, disabled: n, title: r, children: i, classN
483
484
  });
484
485
  }
485
486
  function K() {
486
- return /* @__PURE__ */ M("div", { className: "h-4 w-px bg-surface-border-subtle mx-ds-01" });
487
+ return /* @__PURE__ */ j("div", { className: "h-4 w-px bg-surface-border-subtle mx-ds-01" });
487
488
  }
488
489
  function q({ children: e, className: t }) {
489
- return /* @__PURE__ */ M("div", {
490
+ return /* @__PURE__ */ j("div", {
490
491
  className: a("flex items-center gap-ds-01", t),
491
492
  children: e
492
493
  });
493
494
  }
494
- function Je() {
495
- let { editor: e } = W(), { isActive: t } = w({
495
+ function Ye() {
496
+ let { editor: e } = W(), { isActive: t } = T({
496
497
  editor: e,
497
498
  selector: ({ editor: e }) => ({ isActive: e.isActive("bold") })
498
499
  });
499
- return /* @__PURE__ */ M(G, {
500
+ return /* @__PURE__ */ j(G, {
500
501
  onClick: () => e.chain().focus().toggleBold().run(),
501
502
  isActive: t,
502
503
  title: "Bold",
503
- children: /* @__PURE__ */ M(s, {
504
- icon: ye,
504
+ children: /* @__PURE__ */ j(s, {
505
+ icon: xe,
505
506
  size: "xs"
506
507
  })
507
508
  });
508
509
  }
509
- function Ye() {
510
- let { editor: e } = W(), { isActive: t } = w({
510
+ function Xe() {
511
+ let { editor: e } = W(), { isActive: t } = T({
511
512
  editor: e,
512
513
  selector: ({ editor: e }) => ({ isActive: e.isActive("italic") })
513
514
  });
514
- return /* @__PURE__ */ M(G, {
515
+ return /* @__PURE__ */ j(G, {
515
516
  onClick: () => e.chain().focus().toggleItalic().run(),
516
517
  isActive: t,
517
518
  title: "Italic",
518
- children: /* @__PURE__ */ M(s, {
519
- icon: F,
519
+ children: /* @__PURE__ */ j(s, {
520
+ icon: Ee,
520
521
  size: "xs"
521
522
  })
522
523
  });
523
524
  }
524
- function Xe() {
525
- let { editor: e } = W(), { isActive: t } = w({
525
+ function Ze() {
526
+ let { editor: e } = W(), { isActive: t } = T({
526
527
  editor: e,
527
528
  selector: ({ editor: e }) => ({ isActive: e.isActive("underline") })
528
529
  });
529
- return /* @__PURE__ */ M(G, {
530
+ return /* @__PURE__ */ j(G, {
530
531
  onClick: () => e.chain().focus().toggleUnderline().run(),
531
532
  isActive: t,
532
533
  title: "Underline",
533
- children: /* @__PURE__ */ M(s, {
534
- icon: Ie,
534
+ children: /* @__PURE__ */ j(s, {
535
+ icon: R,
535
536
  size: "xs"
536
537
  })
537
538
  });
538
539
  }
539
- function Ze() {
540
- let { editor: e } = W(), { isActive: t } = w({
540
+ function Qe() {
541
+ let { editor: e } = W(), { isActive: t } = T({
541
542
  editor: e,
542
543
  selector: ({ editor: e }) => ({ isActive: e.isActive("strike") })
543
544
  });
544
- return /* @__PURE__ */ M(G, {
545
+ return /* @__PURE__ */ j(G, {
545
546
  onClick: () => e.chain().focus().toggleStrike().run(),
546
547
  isActive: t,
547
548
  title: "Strikethrough",
548
- children: /* @__PURE__ */ M(s, {
549
- icon: z,
549
+ children: /* @__PURE__ */ j(s, {
550
+ icon: Ie,
550
551
  size: "xs"
551
552
  })
552
553
  });
553
554
  }
554
- function Qe() {
555
- let { editor: e } = W(), { isActive: t } = w({
555
+ function $e() {
556
+ let { editor: e } = W(), { isActive: t } = T({
556
557
  editor: e,
557
558
  selector: ({ editor: e }) => ({ isActive: e.isActive("highlight") })
558
559
  });
559
- return /* @__PURE__ */ M(G, {
560
+ return /* @__PURE__ */ j(G, {
560
561
  onClick: () => e.chain().focus().toggleHighlight().run(),
561
562
  isActive: t,
562
563
  title: "Highlight",
563
- children: /* @__PURE__ */ M(s, {
564
- icon: we,
564
+ children: /* @__PURE__ */ j(s, {
565
+ icon: P,
565
566
  size: "xs"
566
567
  })
567
568
  });
568
569
  }
569
- function $e() {
570
- let { editor: e } = W(), { isActive: t } = w({
570
+ function et() {
571
+ let { editor: e } = W(), { isActive: t } = T({
571
572
  editor: e,
572
573
  selector: ({ editor: e }) => ({ isActive: e.isActive("code") })
573
574
  });
574
- return /* @__PURE__ */ M(G, {
575
+ return /* @__PURE__ */ j(G, {
575
576
  onClick: () => e.chain().focus().toggleCode().run(),
576
577
  isActive: t,
577
578
  title: "Inline code",
578
- children: /* @__PURE__ */ M(s, {
579
- icon: Ce,
579
+ children: /* @__PURE__ */ j(s, {
580
+ icon: N,
580
581
  size: "xs"
581
582
  })
582
583
  });
583
584
  }
584
- function et() {
585
- let { editor: e } = W(), { isActive: t } = w({
585
+ function tt() {
586
+ let { editor: e } = W(), { isActive: t } = T({
586
587
  editor: e,
587
588
  selector: ({ editor: e }) => ({ isActive: e.isActive("bulletList") })
588
589
  });
589
- return /* @__PURE__ */ M(G, {
590
+ return /* @__PURE__ */ j(G, {
590
591
  onClick: () => e.chain().focus().toggleBulletList().run(),
591
592
  isActive: t,
592
593
  title: "Bullet list",
593
- children: /* @__PURE__ */ M(s, {
594
- icon: Ee,
594
+ children: /* @__PURE__ */ j(s, {
595
+ icon: Oe,
595
596
  size: "xs"
596
597
  })
597
598
  });
598
599
  }
599
- function tt() {
600
- let { editor: e } = W(), { isActive: t } = w({
600
+ function nt() {
601
+ let { editor: e } = W(), { isActive: t } = T({
601
602
  editor: e,
602
603
  selector: ({ editor: e }) => ({ isActive: e.isActive("orderedList") })
603
604
  });
604
- return /* @__PURE__ */ M(G, {
605
+ return /* @__PURE__ */ j(G, {
605
606
  onClick: () => e.chain().focus().toggleOrderedList().run(),
606
607
  isActive: t,
607
608
  title: "Ordered list",
608
- children: /* @__PURE__ */ M(s, {
609
- icon: De,
609
+ children: /* @__PURE__ */ j(s, {
610
+ icon: F,
610
611
  size: "xs"
611
612
  })
612
613
  });
613
614
  }
614
- function J() {
615
- let { editor: e } = W(), { isActive: t } = w({
615
+ function rt() {
616
+ let { editor: e } = W(), { isActive: t } = T({
616
617
  editor: e,
617
618
  selector: ({ editor: e }) => ({ isActive: e.isActive("blockquote") })
618
619
  });
619
- return /* @__PURE__ */ M(G, {
620
+ return /* @__PURE__ */ j(G, {
620
621
  onClick: () => e.chain().focus().toggleBlockquote().run(),
621
622
  isActive: t,
622
623
  title: "Quote",
623
- children: /* @__PURE__ */ M(s, {
624
- icon: ve,
624
+ children: /* @__PURE__ */ j(s, {
625
+ icon: be,
625
626
  size: "xs"
626
627
  })
627
628
  });
628
629
  }
629
- function nt() {
630
- let { editor: e } = W(), { isActive: t } = w({
630
+ function it() {
631
+ let { editor: e } = W(), { isActive: t } = T({
631
632
  editor: e,
632
633
  selector: ({ editor: e }) => ({ isActive: e.isActive("link") })
633
634
  });
634
- return /* @__PURE__ */ M(G, {
635
+ return /* @__PURE__ */ j(G, {
635
636
  onClick: () => {
636
637
  let t = window.prompt("URL");
637
638
  t && e.chain().focus().setLink({ href: t }).run();
638
639
  },
639
640
  isActive: t,
640
641
  title: "Link",
641
- children: /* @__PURE__ */ M(s, {
642
- icon: Te,
642
+ children: /* @__PURE__ */ j(s, {
643
+ icon: De,
643
644
  size: "xs"
644
645
  })
645
646
  });
646
647
  }
647
- function Y() {
648
+ function J() {
648
649
  let { editor: e } = W();
649
- return /* @__PURE__ */ M(G, {
650
+ return /* @__PURE__ */ j(G, {
650
651
  onClick: () => e.chain().focus().insertContent("@").run(),
651
652
  title: "Mention",
652
- children: /* @__PURE__ */ M(s, {
653
- icon: _e,
653
+ children: /* @__PURE__ */ j(s, {
654
+ icon: ye,
654
655
  size: "xs"
655
656
  })
656
657
  });
657
658
  }
658
- function rt() {
659
+ function at() {
659
660
  let { editor: e } = W();
660
- return /* @__PURE__ */ M(G, {
661
+ return /* @__PURE__ */ j(G, {
661
662
  onClick: () => e.chain().focus().insertContent(":").run(),
662
663
  title: "Emoji",
663
- children: /* @__PURE__ */ M(s, {
664
- icon: ke,
664
+ children: /* @__PURE__ */ j(s, {
665
+ icon: Ae,
665
666
  size: "xs"
666
667
  })
667
668
  });
668
669
  }
669
- function it() {
670
+ function Y() {
670
671
  let { editor: e } = W();
671
- return /* @__PURE__ */ M(G, {
672
+ return /* @__PURE__ */ j(G, {
672
673
  onClick: () => e.chain().focus().insertContent("/").run(),
673
674
  title: "Slash command",
674
- children: /* @__PURE__ */ M(s, {
675
- icon: Me,
675
+ children: /* @__PURE__ */ j(s, {
676
+ icon: Pe,
676
677
  size: "xs"
677
678
  })
678
679
  });
679
680
  }
680
- function at({ items: e, isMobile: t, hasMentions: n, hasSlashCommands: r }) {
681
+ function ot({ items: e, isMobile: t, hasMentions: n, hasSlashCommands: r }) {
681
682
  let i = (t) => !e || e.includes(t);
682
- return /* @__PURE__ */ N(j, { children: [
683
- !t && /* @__PURE__ */ N(q, { children: [
684
- i("bold") && /* @__PURE__ */ M(Je, {}),
685
- i("italic") && /* @__PURE__ */ M(Ye, {}),
686
- i("underline") && /* @__PURE__ */ M(Xe, {}),
687
- i("strike") && /* @__PURE__ */ M(Ze, {}),
688
- i("highlight") && /* @__PURE__ */ M(Qe, {})
683
+ return /* @__PURE__ */ M(_e, { children: [
684
+ !t && /* @__PURE__ */ M(q, { children: [
685
+ i("bold") && /* @__PURE__ */ j(Ye, {}),
686
+ i("italic") && /* @__PURE__ */ j(Xe, {}),
687
+ i("underline") && /* @__PURE__ */ j(Ze, {}),
688
+ i("strike") && /* @__PURE__ */ j(Qe, {}),
689
+ i("highlight") && /* @__PURE__ */ j($e, {})
689
690
  ] }),
690
- !t && /* @__PURE__ */ M(K, {}),
691
- !t && /* @__PURE__ */ N(q, { children: [i("bulletList") && /* @__PURE__ */ M(et, {}), i("orderedList") && /* @__PURE__ */ M(tt, {})] }),
692
- !t && (i("blockquote") || i("link") || i("code")) && /* @__PURE__ */ M(K, {}),
693
- !t && /* @__PURE__ */ N(q, { children: [
694
- i("blockquote") && /* @__PURE__ */ M(J, {}),
695
- i("link") && /* @__PURE__ */ M(nt, {}),
696
- i("code") && /* @__PURE__ */ M($e, {})
691
+ !t && /* @__PURE__ */ j(K, {}),
692
+ !t && /* @__PURE__ */ M(q, { children: [i("bulletList") && /* @__PURE__ */ j(tt, {}), i("orderedList") && /* @__PURE__ */ j(nt, {})] }),
693
+ !t && (i("blockquote") || i("link") || i("code")) && /* @__PURE__ */ j(K, {}),
694
+ !t && /* @__PURE__ */ M(q, { children: [
695
+ i("blockquote") && /* @__PURE__ */ j(rt, {}),
696
+ i("link") && /* @__PURE__ */ j(it, {}),
697
+ i("code") && /* @__PURE__ */ j(et, {})
697
698
  ] }),
698
- !t && (n || r) && /* @__PURE__ */ M(K, {}),
699
- /* @__PURE__ */ N(q, { children: [
700
- n && i("mention") && /* @__PURE__ */ M(Y, {}),
701
- i("emoji") && /* @__PURE__ */ M(rt, {}),
702
- r && i("slash") && /* @__PURE__ */ M(it, {})
699
+ !t && (n || r) && /* @__PURE__ */ j(K, {}),
700
+ /* @__PURE__ */ M(q, { children: [
701
+ n && i("mention") && /* @__PURE__ */ j(J, {}),
702
+ i("emoji") && /* @__PURE__ */ j(at, {}),
703
+ r && i("slash") && /* @__PURE__ */ j(Y, {})
703
704
  ] })
704
705
  ] });
705
706
  }
706
- function ot({ editor: e, toolbar: t, isMobile: n, hasMentions: r, hasSlashCommands: i, disabled: a }) {
707
+ function st({ editor: e, toolbar: t, isMobile: n, hasMentions: r, hasSlashCommands: i, disabled: a }) {
707
708
  if (t === !1) return null;
708
709
  let o = typeof t != "boolean" && !Array.isArray(t), s = Array.isArray(t) ? t : null;
709
- return /* @__PURE__ */ M(qe.Provider, {
710
+ return /* @__PURE__ */ j(U.Provider, {
710
711
  value: {
711
712
  editor: e,
712
713
  disabled: a
713
714
  },
714
- children: /* @__PURE__ */ M("div", {
715
+ children: /* @__PURE__ */ j("div", {
715
716
  role: "toolbar",
716
717
  "aria-label": "Text formatting",
717
718
  className: "flex flex-wrap items-center gap-ds-01 border-t border-surface-border px-ds-04 py-ds-02b",
718
- children: o ? t : /* @__PURE__ */ M(at, {
719
+ children: o ? t : /* @__PURE__ */ j(ot, {
719
720
  items: s,
720
721
  isMobile: n,
721
722
  hasMentions: r,
@@ -726,7 +727,7 @@ function ot({ editor: e, toolbar: t, isMobile: n, hasMentions: r, hasSlashComman
726
727
  }
727
728
  //#endregion
728
729
  //#region src/composed/rich-chat-input/recording-overlay.tsx
729
- function X(e) {
730
+ function ct(e) {
730
731
  let t = Math.floor(e / 60), n = Math.floor(e % 60);
731
732
  return {
732
733
  minutes: String(t),
@@ -734,31 +735,31 @@ function X(e) {
734
735
  secs: n.toString().padStart(2, "0")
735
736
  };
736
737
  }
737
- function st({ duration: e, analyserNode: t, maxDuration: n, onCancel: r }) {
738
- let i = Re();
738
+ function lt({ duration: e, analyserNode: t, maxDuration: n, onCancel: r }) {
739
+ let i = Be();
739
740
  D.useEffect(() => {
740
741
  let e = (e) => {
741
742
  e.key === "Escape" && r();
742
743
  };
743
744
  return document.addEventListener("keydown", e), () => document.removeEventListener("keydown", e);
744
745
  }, [r]);
745
- let o = n != null && n > 0 && e >= n - 10, s = n != null && n > 0 && e >= n - 5, c = s ? "animate-[pulse_500ms_ease-in-out_infinite]" : "animate-[pulse_1s_ease-in-out_infinite]", l = X(e), u = s ? "text-error-11" : o ? "text-warning-11" : "text-surface-fg";
746
- return /* @__PURE__ */ N("div", {
746
+ let o = n != null && n > 0 && e >= n - 10, s = n != null && n > 0 && e >= n - 5, c = s ? "animate-[pulse_500ms_ease-in-out_infinite]" : "animate-[pulse_1s_ease-in-out_infinite]", l = ct(e), u = s ? "text-error-11" : o ? "text-warning-11" : "text-surface-fg";
747
+ return /* @__PURE__ */ M("div", {
747
748
  role: "status",
748
749
  "aria-live": "polite",
749
750
  "aria-label": "Recording voice message",
750
751
  className: "absolute inset-0 flex items-center gap-ds-03 px-ds-04 py-ds-03 bg-surface-raised-hover rounded-surface z-10",
751
752
  children: [
752
- /* @__PURE__ */ M("span", {
753
+ /* @__PURE__ */ j("span", {
753
754
  className: a("w-ds-02b h-ds-02b shrink-0 rounded-pill bg-error-9", i ? "opacity-100" : c),
754
755
  "aria-hidden": "true"
755
756
  }),
756
- /* @__PURE__ */ N("span", {
757
+ /* @__PURE__ */ M("span", {
757
758
  className: a("text-ds-sm font-mono tabular-nums whitespace-nowrap", u),
758
759
  "aria-label": `${l.minutes} minutes ${l.secs} seconds`,
759
760
  children: [
760
761
  l.minutes,
761
- /* @__PURE__ */ M("span", {
762
+ /* @__PURE__ */ j("span", {
762
763
  className: i ? void 0 : "animate-[blink_1s_step-end_infinite]",
763
764
  "aria-hidden": "true",
764
765
  children: l.separator
@@ -766,9 +767,9 @@ function st({ duration: e, analyserNode: t, maxDuration: n, onCancel: r }) {
766
767
  l.secs
767
768
  ]
768
769
  }),
769
- /* @__PURE__ */ M("div", {
770
+ /* @__PURE__ */ j("div", {
770
771
  className: "flex-1 min-w-0 overflow-hidden",
771
- children: /* @__PURE__ */ M(U, {
772
+ children: /* @__PURE__ */ j(V, {
772
773
  mode: "live",
773
774
  analyserNode: t,
774
775
  height: 24,
@@ -779,11 +780,11 @@ function st({ duration: e, analyserNode: t, maxDuration: n, onCancel: r }) {
779
780
  ]
780
781
  });
781
782
  }
782
- st.displayName = "RecordingOverlay";
783
+ lt.displayName = "RecordingOverlay";
783
784
  //#endregion
784
785
  //#region src/composed/rich-chat-input/reply-banner.tsx
785
- function ct({ author: e, preview: t, onDismiss: n }) {
786
- return /* @__PURE__ */ M(V.div, {
786
+ function ut({ author: e, preview: t, onDismiss: n }) {
787
+ return /* @__PURE__ */ j(B.div, {
787
788
  initial: {
788
789
  height: 0,
789
790
  opacity: 0
@@ -806,34 +807,34 @@ function ct({ author: e, preview: t, onDismiss: n }) {
806
807
  ]
807
808
  },
808
809
  className: "overflow-hidden",
809
- children: /* @__PURE__ */ N("div", {
810
+ children: /* @__PURE__ */ M("div", {
810
811
  role: "status",
811
812
  "aria-label": `Replying to ${e}`,
812
813
  className: "flex items-center gap-ds-03 border-b border-surface-border px-ds-04 py-ds-02b",
813
- children: [/* @__PURE__ */ N("div", {
814
+ children: [/* @__PURE__ */ M("div", {
814
815
  className: "flex-1 min-w-0",
815
816
  children: [
816
- /* @__PURE__ */ N("span", {
817
+ /* @__PURE__ */ M("span", {
817
818
  className: "text-ds-sm font-semibold text-surface-fg",
818
819
  children: ["Replying to ", e]
819
820
  }),
820
- /* @__PURE__ */ M("span", {
821
+ /* @__PURE__ */ j("span", {
821
822
  className: "mx-ds-02 text-surface-fg-subtle",
822
823
  children: "·"
823
824
  }),
824
- /* @__PURE__ */ M("span", {
825
+ /* @__PURE__ */ j("span", {
825
826
  className: "text-ds-sm text-surface-fg-muted truncate",
826
827
  children: t
827
828
  })
828
829
  ]
829
- }), /* @__PURE__ */ M("button", {
830
+ }), /* @__PURE__ */ j("button", {
830
831
  type: "button",
831
832
  onClick: n,
832
833
  className: a("inline-flex h-ds-xs-plus w-ds-xs-plus items-center justify-center rounded-control touch-target", "text-surface-fg-subtle hover:text-surface-fg hover:bg-surface-raised-hover", "transition-colors duration-fast-01 ease-productive-standard", "active:scale-95"),
833
834
  "aria-label": "Cancel reply",
834
835
  title: "Cancel reply",
835
- children: /* @__PURE__ */ M(s, {
836
- icon: B,
836
+ children: /* @__PURE__ */ j(s, {
837
+ icon: z,
837
838
  size: "xs"
838
839
  })
839
840
  })]
@@ -842,7 +843,7 @@ function ct({ author: e, preview: t, onDismiss: n }) {
842
843
  }
843
844
  //#endregion
844
845
  //#region src/composed/rich-chat-input/schedule-send.tsx
845
- function lt() {
846
+ function dt() {
846
847
  let e = /* @__PURE__ */ new Date(), t = e.getHours(), n = [], r = (t, n = 0) => {
847
848
  let r = new Date(e);
848
849
  return r.setDate(r.getDate() + n), r.setHours(t, 0, 0, 0), r;
@@ -890,7 +891,7 @@ function lt() {
890
891
  date: a
891
892
  }), n;
892
893
  }
893
- function Z({ value: e, onChange: t }) {
894
+ function X({ value: e, onChange: t }) {
894
895
  let n = e.getHours() % 12 || 12, r = e.getMinutes(), i = e.getHours() >= 12, a = (n) => {
895
896
  let r = new Date(e);
896
897
  r.setHours(i ? n % 12 + 12 : n % 12), t(r);
@@ -901,44 +902,44 @@ function Z({ value: e, onChange: t }) {
901
902
  let r = new Date(e), i = r.getHours();
902
903
  n && i < 12 ? r.setHours(i + 12) : !n && i >= 12 && r.setHours(i - 12), t(r);
903
904
  };
904
- return /* @__PURE__ */ N("div", {
905
+ return /* @__PURE__ */ M("div", {
905
906
  className: "flex items-center gap-ds-02",
906
907
  children: [
907
- /* @__PURE__ */ M("select", {
908
+ /* @__PURE__ */ j("select", {
908
909
  value: n,
909
910
  onChange: (e) => a(Number(e.target.value)),
910
911
  className: "h-ds-sm rounded-control border border-surface-border-strong bg-surface-raised px-ds-02 text-ds-sm text-surface-fg focus:outline-hidden focus:ring-2 focus:ring-accent-9",
911
912
  "aria-label": "Hour",
912
- children: Array.from({ length: 12 }, (e, t) => t + 1).map((e) => /* @__PURE__ */ M("option", {
913
+ children: Array.from({ length: 12 }, (e, t) => t + 1).map((e) => /* @__PURE__ */ j("option", {
913
914
  value: e,
914
915
  children: e
915
916
  }, e))
916
917
  }),
917
- /* @__PURE__ */ M("span", {
918
+ /* @__PURE__ */ j("span", {
918
919
  className: "text-ds-sm text-surface-fg-subtle font-medium",
919
920
  children: ":"
920
921
  }),
921
- /* @__PURE__ */ M("select", {
922
+ /* @__PURE__ */ j("select", {
922
923
  value: r - r % 5,
923
924
  onChange: (e) => o(Number(e.target.value)),
924
925
  className: "h-ds-sm rounded-control border border-surface-border-strong bg-surface-raised px-ds-02 text-ds-sm text-surface-fg focus:outline-hidden focus:ring-2 focus:ring-accent-9",
925
926
  "aria-label": "Minute",
926
- children: Array.from({ length: 12 }, (e, t) => t * 5).map((e) => /* @__PURE__ */ M("option", {
927
+ children: Array.from({ length: 12 }, (e, t) => t * 5).map((e) => /* @__PURE__ */ j("option", {
927
928
  value: e,
928
929
  children: String(e).padStart(2, "0")
929
930
  }, e))
930
931
  }),
931
- /* @__PURE__ */ N(g, {
932
+ /* @__PURE__ */ M(g, {
932
933
  type: "single",
933
934
  value: i ? "PM" : "AM",
934
935
  onValueChange: (e) => {
935
936
  e === "AM" ? s(!1) : e === "PM" && s(!0);
936
937
  },
937
938
  size: "sm",
938
- children: [/* @__PURE__ */ M(_, {
939
+ children: [/* @__PURE__ */ j(_, {
939
940
  value: "AM",
940
941
  children: "AM"
941
- }), /* @__PURE__ */ M(_, {
942
+ }), /* @__PURE__ */ j(_, {
942
943
  value: "PM",
943
944
  children: "PM"
944
945
  })]
@@ -946,7 +947,7 @@ function Z({ value: e, onChange: t }) {
946
947
  ]
947
948
  });
948
949
  }
949
- function ut({ value: e, onChange: t, minDate: n }) {
950
+ function ft({ value: e, onChange: t, minDate: n }) {
950
951
  let r = /* @__PURE__ */ new Date(), i = e ?? (() => {
951
952
  let e = new Date(r);
952
953
  return e.setHours(e.getHours() + 1, 0, 0, 0), e;
@@ -956,40 +957,40 @@ function ut({ value: e, onChange: t, minDate: n }) {
956
957
  let r = new Date(i);
957
958
  r.setFullYear(Number(n[0]), Number(n[1]) - 1, Number(n[2])), t(r);
958
959
  }, s = n ? `${n.getFullYear()}-${String(n.getMonth() + 1).padStart(2, "0")}-${String(n.getDate()).padStart(2, "0")}` : void 0;
959
- return /* @__PURE__ */ N("div", {
960
+ return /* @__PURE__ */ M("div", {
960
961
  className: "space-y-ds-03",
961
- children: [/* @__PURE__ */ N("div", {
962
+ children: [/* @__PURE__ */ M("div", {
962
963
  className: "flex items-center justify-between",
963
- children: [/* @__PURE__ */ M("span", {
964
+ children: [/* @__PURE__ */ j("span", {
964
965
  className: "text-ds-xs font-medium text-surface-fg-subtle",
965
966
  children: "Date"
966
- }), /* @__PURE__ */ M("input", {
967
+ }), /* @__PURE__ */ j("input", {
967
968
  type: "date",
968
969
  value: a,
969
970
  min: s,
970
971
  onChange: o,
971
972
  className: "h-ds-sm rounded-control border border-surface-border-strong bg-surface-raised px-ds-03 text-ds-sm text-surface-fg focus:outline-hidden focus:ring-2 focus:ring-accent-9"
972
973
  })]
973
- }), /* @__PURE__ */ N("div", {
974
+ }), /* @__PURE__ */ M("div", {
974
975
  className: "flex items-center justify-between",
975
- children: [/* @__PURE__ */ M("span", {
976
+ children: [/* @__PURE__ */ j("span", {
976
977
  className: "text-ds-xs font-medium text-surface-fg-subtle",
977
978
  children: "Time"
978
- }), /* @__PURE__ */ M(Z, {
979
+ }), /* @__PURE__ */ j(X, {
979
980
  value: i,
980
981
  onChange: t
981
982
  })]
982
983
  })]
983
984
  });
984
985
  }
985
- function dt({ value: e, onChange: t, minDate: n }) {
986
+ function Z({ value: e, onChange: t, minDate: n }) {
986
987
  let r = /* @__PURE__ */ new Date(), i = e ?? (() => {
987
988
  let e = new Date(r);
988
989
  return e.setHours(e.getHours() + 1, 0, 0, 0), e;
989
- })(), { currentMonth: a, goToPreviousMonth: o, goToNextMonth: s } = me(i);
990
- return /* @__PURE__ */ N("div", {
990
+ })(), { currentMonth: a, goToPreviousMonth: o, goToNextMonth: s } = he(i);
991
+ return /* @__PURE__ */ M("div", {
991
992
  className: "space-y-ds-03",
992
- children: [/* @__PURE__ */ M(pe, {
993
+ children: [/* @__PURE__ */ j(me, {
993
994
  currentMonth: a,
994
995
  selected: i,
995
996
  onSelect: (e) => {
@@ -1001,50 +1002,50 @@ function dt({ value: e, onChange: t, minDate: n }) {
1001
1002
  },
1002
1003
  minDate: n,
1003
1004
  className: "w-full"
1004
- }), /* @__PURE__ */ N("div", {
1005
+ }), /* @__PURE__ */ M("div", {
1005
1006
  className: "flex items-center justify-between border-t border-surface-border pt-ds-03",
1006
- children: [/* @__PURE__ */ M("span", {
1007
+ children: [/* @__PURE__ */ j("span", {
1007
1008
  className: "text-ds-xs font-medium text-surface-fg-subtle",
1008
1009
  children: "Time"
1009
- }), /* @__PURE__ */ M(Z, {
1010
+ }), /* @__PURE__ */ j(X, {
1010
1011
  value: i,
1011
1012
  onChange: t
1012
1013
  })]
1013
1014
  })]
1014
1015
  });
1015
1016
  }
1016
- function ft({ onSchedule: e, onClose: t, onOpenDialog: n }) {
1017
- let [r, i] = D.useState(!1), [a, o] = D.useState(null), c = D.useMemo(() => lt(), []), u = (n) => {
1017
+ function pt({ onSchedule: e, onClose: t, onOpenDialog: n }) {
1018
+ let [r, i] = D.useState(!1), [a, o] = D.useState(null), c = D.useMemo(() => dt(), []), u = (n) => {
1018
1019
  e(n), t();
1019
1020
  };
1020
- return r ? /* @__PURE__ */ N("div", {
1021
+ return r ? /* @__PURE__ */ M("div", {
1021
1022
  className: "p-ds-04",
1022
1023
  style: { minWidth: 270 },
1023
1024
  children: [
1024
- /* @__PURE__ */ N("div", {
1025
+ /* @__PURE__ */ M("div", {
1025
1026
  className: "mb-ds-03 flex items-center justify-between",
1026
- children: [/* @__PURE__ */ M("p", {
1027
+ children: [/* @__PURE__ */ j("p", {
1027
1028
  className: "text-ds-sm font-medium text-surface-fg",
1028
1029
  children: "Pick date & time"
1029
- }), /* @__PURE__ */ M(l, {
1030
+ }), /* @__PURE__ */ j(l, {
1030
1031
  variant: "ghost",
1031
1032
  size: "icon-xs",
1032
1033
  onClick: () => i(!1),
1033
1034
  "aria-label": "Back to presets",
1034
- children: /* @__PURE__ */ M(s, {
1035
- icon: B,
1035
+ children: /* @__PURE__ */ j(s, {
1036
+ icon: z,
1036
1037
  size: "sm"
1037
1038
  })
1038
1039
  })]
1039
1040
  }),
1040
- /* @__PURE__ */ M(ut, {
1041
+ /* @__PURE__ */ j(ft, {
1041
1042
  value: a,
1042
1043
  onChange: o,
1043
1044
  minDate: /* @__PURE__ */ new Date()
1044
1045
  }),
1045
- /* @__PURE__ */ M("div", {
1046
+ /* @__PURE__ */ j("div", {
1046
1047
  className: "mt-ds-03 flex justify-end",
1047
- children: /* @__PURE__ */ M(l, {
1048
+ children: /* @__PURE__ */ j(l, {
1048
1049
  variant: "solid",
1049
1050
  size: "sm",
1050
1051
  onClick: () => {
@@ -1055,43 +1056,43 @@ function ft({ onSchedule: e, onClose: t, onOpenDialog: n }) {
1055
1056
  })
1056
1057
  })
1057
1058
  ]
1058
- }) : /* @__PURE__ */ N("div", {
1059
+ }) : /* @__PURE__ */ M("div", {
1059
1060
  className: "p-ds-02",
1060
1061
  style: { minWidth: 260 },
1061
1062
  children: [
1062
- /* @__PURE__ */ M("p", {
1063
+ /* @__PURE__ */ j("p", {
1063
1064
  className: "px-ds-03 py-ds-01 text-ds-xs font-medium text-surface-fg-subtle",
1064
1065
  children: "Schedule send"
1065
1066
  }),
1066
- c.map((e, t) => /* @__PURE__ */ N(l, {
1067
+ c.map((e, t) => /* @__PURE__ */ M(l, {
1067
1068
  variant: "ghost",
1068
1069
  fullWidth: !0,
1069
1070
  onClick: () => u(e.date),
1070
- children: [/* @__PURE__ */ M(s, {
1071
- icon: Se,
1071
+ children: [/* @__PURE__ */ j(s, {
1072
+ icon: we,
1072
1073
  size: "sm",
1073
1074
  className: "shrink-0 text-surface-fg-muted"
1074
1075
  }), e.label]
1075
1076
  }, t)),
1076
- /* @__PURE__ */ M("div", { className: "mx-ds-02 my-ds-02 h-px bg-surface-border" }),
1077
- /* @__PURE__ */ N(l, {
1077
+ /* @__PURE__ */ j("div", { className: "mx-ds-02 my-ds-02 h-px bg-surface-border" }),
1078
+ /* @__PURE__ */ M(l, {
1078
1079
  variant: "ghost",
1079
1080
  fullWidth: !0,
1080
1081
  onClick: () => i(!0),
1081
- children: [/* @__PURE__ */ M(s, {
1082
- icon: be,
1082
+ children: [/* @__PURE__ */ j(s, {
1083
+ icon: Se,
1083
1084
  size: "sm",
1084
1085
  className: "shrink-0 text-accent-11"
1085
1086
  }), "Pick date & time..."]
1086
1087
  }),
1087
- n && /* @__PURE__ */ N(l, {
1088
+ n && /* @__PURE__ */ M(l, {
1088
1089
  variant: "ghost",
1089
1090
  fullWidth: !0,
1090
1091
  onClick: () => {
1091
1092
  n(), t();
1092
1093
  },
1093
- children: [/* @__PURE__ */ M(s, {
1094
- icon: be,
1094
+ children: [/* @__PURE__ */ j(s, {
1095
+ icon: Se,
1095
1096
  size: "sm",
1096
1097
  className: "shrink-0 text-surface-fg-muted"
1097
1098
  }), "Open full picker..."]
@@ -1099,29 +1100,29 @@ function ft({ onSchedule: e, onClose: t, onOpenDialog: n }) {
1099
1100
  ]
1100
1101
  });
1101
1102
  }
1102
- function pt({ open: e, onOpenChange: t, onSchedule: n, initialDate: r }) {
1103
+ function mt({ open: e, onOpenChange: t, onSchedule: n, initialDate: r }) {
1103
1104
  let [i, a] = D.useState(r ?? null);
1104
1105
  return D.useEffect(() => {
1105
1106
  e && a(r ?? null);
1106
- }, [e, r]), /* @__PURE__ */ M(u, {
1107
+ }, [e, r]), /* @__PURE__ */ j(u, {
1107
1108
  open: e,
1108
1109
  onOpenChange: t,
1109
- children: /* @__PURE__ */ N(d, {
1110
+ children: /* @__PURE__ */ M(d, {
1110
1111
  className: "sm:max-w-[380px]",
1111
1112
  children: [
1112
- /* @__PURE__ */ M(p, { children: /* @__PURE__ */ M(m, { children: r ? "Reschedule message" : "Schedule send" }) }),
1113
- /* @__PURE__ */ M(dt, {
1113
+ /* @__PURE__ */ j(p, { children: /* @__PURE__ */ j(m, { children: r ? "Reschedule message" : "Schedule send" }) }),
1114
+ /* @__PURE__ */ j(Z, {
1114
1115
  value: i,
1115
1116
  onChange: a,
1116
1117
  minDate: /* @__PURE__ */ new Date()
1117
1118
  }),
1118
- /* @__PURE__ */ N(f, {
1119
+ /* @__PURE__ */ M(f, {
1119
1120
  className: "gap-ds-02",
1120
- children: [/* @__PURE__ */ M(l, {
1121
+ children: [/* @__PURE__ */ j(l, {
1121
1122
  variant: "soft",
1122
1123
  onClick: () => t(!1),
1123
1124
  children: "Cancel"
1124
- }), /* @__PURE__ */ M(l, {
1125
+ }), /* @__PURE__ */ j(l, {
1125
1126
  variant: "solid",
1126
1127
  onClick: () => {
1127
1128
  i && i > /* @__PURE__ */ new Date() && (n(i), t(!1));
@@ -1134,7 +1135,7 @@ function pt({ open: e, onOpenChange: t, onSchedule: n, initialDate: r }) {
1134
1135
  })
1135
1136
  });
1136
1137
  }
1137
- function mt(e) {
1138
+ function ht(e) {
1138
1139
  let t = /* @__PURE__ */ new Date(), n = new Date(t);
1139
1140
  n.setDate(n.getDate() + 1);
1140
1141
  let r = e.toDateString() === t.toDateString(), i = e.toDateString() === n.toDateString(), a = e.toLocaleTimeString(void 0, {
@@ -1147,8 +1148,8 @@ function mt(e) {
1147
1148
  day: "numeric"
1148
1149
  })} at ${a}`;
1149
1150
  }
1150
- function ht({ date: e, onClear: t, onEdit: n }) {
1151
- return /* @__PURE__ */ M(V.div, {
1151
+ function gt({ date: e, onClear: t, onEdit: n }) {
1152
+ return /* @__PURE__ */ j(B.div, {
1152
1153
  initial: {
1153
1154
  height: 0,
1154
1155
  opacity: 0
@@ -1163,37 +1164,37 @@ function ht({ date: e, onClear: t, onEdit: n }) {
1163
1164
  },
1164
1165
  transition: { duration: i.moderate01 },
1165
1166
  className: "overflow-hidden",
1166
- children: /* @__PURE__ */ N("div", {
1167
+ children: /* @__PURE__ */ M("div", {
1167
1168
  className: "flex items-center gap-ds-03 px-ds-04 py-ds-02b text-ds-xs text-accent-11 bg-accent-2 border-b border-accent-4",
1168
1169
  children: [
1169
- /* @__PURE__ */ M(s, {
1170
- icon: Se,
1170
+ /* @__PURE__ */ j(s, {
1171
+ icon: we,
1171
1172
  size: "xs",
1172
1173
  className: "shrink-0"
1173
1174
  }),
1174
- /* @__PURE__ */ N("span", {
1175
+ /* @__PURE__ */ M("span", {
1175
1176
  className: "min-w-0 flex-1 truncate",
1176
- children: ["Scheduled for ", mt(e)]
1177
+ children: ["Scheduled for ", ht(e)]
1177
1178
  }),
1178
- n && /* @__PURE__ */ M(l, {
1179
+ n && /* @__PURE__ */ j(l, {
1179
1180
  variant: "soft",
1180
1181
  size: "icon-xs",
1181
1182
  className: "shrink-0",
1182
1183
  onClick: n,
1183
1184
  "aria-label": "Edit schedule",
1184
- children: /* @__PURE__ */ M(s, {
1185
+ children: /* @__PURE__ */ j(s, {
1185
1186
  icon: I,
1186
1187
  size: "xs"
1187
1188
  })
1188
1189
  }),
1189
- /* @__PURE__ */ M(l, {
1190
+ /* @__PURE__ */ j(l, {
1190
1191
  variant: "soft",
1191
1192
  size: "icon-xs",
1192
1193
  className: "shrink-0",
1193
1194
  onClick: t,
1194
1195
  "aria-label": "Cancel schedule",
1195
- children: /* @__PURE__ */ M(s, {
1196
- icon: B,
1196
+ children: /* @__PURE__ */ j(s, {
1197
+ icon: z,
1197
1198
  size: "xs"
1198
1199
  })
1199
1200
  })
@@ -1203,10 +1204,10 @@ function ht({ date: e, onClear: t, onEdit: n }) {
1203
1204
  }
1204
1205
  //#endregion
1205
1206
  //#region src/composed/rich-chat-input/use-voice-recorder.ts
1206
- function gt() {
1207
+ function _t() {
1207
1208
  return typeof MediaRecorder < "u" && MediaRecorder.isTypeSupported("audio/webm;codecs=opus") ? "audio/webm;codecs=opus" : typeof MediaRecorder < "u" && MediaRecorder.isTypeSupported("audio/mp4") ? "audio/mp4" : "";
1208
1209
  }
1209
- function _t(e) {
1210
+ function vt(e) {
1210
1211
  let { maxDuration: t, onComplete: n } = e, [r, i] = A("idle"), [a, o] = A(0), [s, c] = A(null), [l, u] = A([]), d = k(null), f = k(null), p = k(null), m = k([]), h = k(null), g = k(null), _ = k(null), v = k(null), y = k(0), b = k([]), x = k(!1), ee = k(n);
1211
1212
  ee.current = n;
1212
1213
  let S = O(() => {
@@ -1215,7 +1216,7 @@ function _t(e) {
1215
1216
  if (typeof MediaRecorder > "u") throw Error("MediaRecorder is not supported in this browser. Voice recording requires a modern browser with MediaRecorder support.");
1216
1217
  let e = await navigator.mediaDevices.getUserMedia({ audio: !0 });
1217
1218
  p.current = e;
1218
- let n = gt(), r = n ? new MediaRecorder(e, { mimeType: n }) : new MediaRecorder(e);
1219
+ let n = _t(), r = n ? new MediaRecorder(e, { mimeType: n }) : new MediaRecorder(e);
1219
1220
  d.current = r, m.current = [], x.current = !1;
1220
1221
  let a = new AudioContext();
1221
1222
  f.current = a;
@@ -1249,7 +1250,7 @@ function _t(e) {
1249
1250
  d.current && d.current.state !== "inactive" ? (x.current = !0, d.current.stop()) : (S(), i("idle"), o(0), u([]));
1250
1251
  }, [S]), w = O(() => {
1251
1252
  d.current && d.current.state === "recording" && (d.current.pause(), h.current !== null && (clearInterval(h.current), h.current = null), g.current !== null && (clearInterval(g.current), g.current = null), i("paused"));
1252
- }, []), re = O(() => {
1253
+ }, []), T = O(() => {
1253
1254
  if (d.current && d.current.state === "paused") {
1254
1255
  d.current.resume(), h.current = setInterval(() => {
1255
1256
  y.current += 1, o((e) => e + 1);
@@ -1266,7 +1267,7 @@ function _t(e) {
1266
1267
  }, 100), i("recording");
1267
1268
  }
1268
1269
  }, []);
1269
- return he(() => () => {
1270
+ return ge(() => () => {
1270
1271
  h.current !== null && clearInterval(h.current), g.current !== null && clearInterval(g.current), _.current !== null && clearTimeout(_.current), d.current && d.current.state !== "inactive" && d.current.stop(), p.current && p.current.getTracks().forEach((e) => e.stop()), f.current && f.current.close().catch(() => {});
1271
1272
  }, []), {
1272
1273
  state: r,
@@ -1277,12 +1278,12 @@ function _t(e) {
1277
1278
  stop: te,
1278
1279
  cancel: ne,
1279
1280
  pause: w,
1280
- resume: re
1281
+ resume: T
1281
1282
  };
1282
1283
  }
1283
1284
  //#endregion
1284
1285
  //#region src/composed/rich-chat-input.tsx
1285
- var vt = {
1286
+ var yt = {
1286
1287
  compact: {
1287
1288
  minHeight: 44,
1288
1289
  maxHeight: 256,
@@ -1307,7 +1308,7 @@ var vt = {
1307
1308
  showToolbar: !1,
1308
1309
  toolbarPosition: "top"
1309
1310
  }
1310
- }, yt = [
1311
+ }, bt = [
1311
1312
  "prose prose-sm max-w-none focus:outline-hidden",
1312
1313
  "font-body text-ds-md leading-relaxed text-surface-fg",
1313
1314
  "[&_p.is-editor-empty:first-child]:relative",
@@ -1320,9 +1321,9 @@ var vt = {
1320
1321
  "[&_strong]:font-semibold [&_strong]:text-surface-fg",
1321
1322
  "[&_mark]:rounded-xs [&_mark]:bg-warning-3 [&_mark]:px-[2px]",
1322
1323
  "[&_a]:text-accent-11 [&_a]:underline",
1323
- "[&_.mention]:rounded-control-inner [&_.mention]:bg-accent-2 [&_.mention]:px-ds-02 [&_.mention]:py-[1px] [&_.mention]:font-medium [&_.mention]:text-accent-11"
1324
+ y
1324
1325
  ].join(" ");
1325
- function bt({ options: e }) {
1326
+ function xt({ options: e }) {
1326
1327
  let [t, n] = D.useState(!1), r = D.useRef(null);
1327
1328
  return D.useEffect(() => {
1328
1329
  if (!t) return;
@@ -1330,41 +1331,41 @@ function bt({ options: e }) {
1330
1331
  r.current && !r.current.contains(e.target) && n(!1);
1331
1332
  };
1332
1333
  return document.addEventListener("mousedown", e), () => document.removeEventListener("mousedown", e);
1333
- }, [t]), /* @__PURE__ */ N("div", {
1334
+ }, [t]), /* @__PURE__ */ M("div", {
1334
1335
  ref: r,
1335
1336
  className: "relative",
1336
- children: [/* @__PURE__ */ M("button", {
1337
+ children: [/* @__PURE__ */ j("button", {
1337
1338
  type: "button",
1338
1339
  onClick: () => n((e) => !e),
1339
1340
  title: "More send options",
1340
1341
  "aria-label": "More send options",
1341
1342
  "aria-expanded": t,
1342
1343
  className: a("inline-flex h-ds-xs-plus w-5 items-center justify-center rounded-control touch-target", "text-surface-fg-subtle hover:bg-surface-raised-hover hover:text-surface-fg", "transition-colors duration-fast-01 ease-productive-standard", t && "bg-surface-raised-hover text-surface-fg"),
1343
- children: /* @__PURE__ */ M(s, {
1344
- icon: xe,
1344
+ children: /* @__PURE__ */ j(s, {
1345
+ icon: Ce,
1345
1346
  size: "xs"
1346
1347
  })
1347
- }), t && /* @__PURE__ */ N("div", {
1348
+ }), t && /* @__PURE__ */ M("div", {
1348
1349
  className: "absolute bottom-full right-0 mb-ds-02 min-w-[200px] rounded-surface bg-surface-overlay p-ds-02 shadow-floating z-popover",
1349
- children: [/* @__PURE__ */ M("p", {
1350
+ children: [/* @__PURE__ */ j("p", {
1350
1351
  className: "px-ds-03 py-ds-01 text-ds-xs font-medium text-surface-fg-subtle",
1351
1352
  children: "Send options"
1352
- }), e.map((e, t) => /* @__PURE__ */ N("button", {
1353
+ }), e.map((e, t) => /* @__PURE__ */ M("button", {
1353
1354
  type: "button",
1354
1355
  onClick: () => {
1355
1356
  e.onSelect(), n(!1);
1356
1357
  },
1357
1358
  className: "flex w-full items-center gap-ds-03 rounded-control px-ds-03 py-ds-02 text-ds-sm text-surface-fg hover:bg-surface-raised-hover transition-colors duration-fast-01",
1358
- children: [e.icon && /* @__PURE__ */ M(e.icon, { className: "h-ico-sm w-ico-sm text-surface-fg-muted" }), e.label]
1359
+ children: [e.icon && /* @__PURE__ */ j(e.icon, { className: "h-ico-sm w-ico-sm text-surface-fg-muted" }), e.label]
1359
1360
  }, t))]
1360
1361
  })]
1361
1362
  });
1362
1363
  }
1363
- var xt = D.lazy(() => import("@emoji-mart/react"));
1364
- function St({ set: e = "native", onSelect: t, onClose: n }) {
1365
- let [r, i] = D.useState(null), { colorMode: a } = E(), o = D.useRef(null);
1364
+ var St = D.lazy(() => import("@emoji-mart/react"));
1365
+ function Ct({ set: e = "native", onSelect: t, onClose: n }) {
1366
+ let [r, i] = D.useState(null), { colorMode: a } = se(), o = D.useRef(null);
1366
1367
  D.useEffect(() => {
1367
- (y[e] ?? y.native)().then((e) => i(e.default));
1368
+ (b[e] ?? b.native)().then((e) => i(e.default));
1368
1369
  }, [e]), D.useEffect(() => {
1369
1370
  let e = (e) => {
1370
1371
  o.current && !o.current.contains(e.target) && n();
@@ -1376,19 +1377,19 @@ function St({ set: e = "native", onSelect: t, onClose: n }) {
1376
1377
  };
1377
1378
  return document.addEventListener("keydown", e), () => document.removeEventListener("keydown", e);
1378
1379
  }, [n]);
1379
- let s = /* @__PURE__ */ M("div", {
1380
+ let s = /* @__PURE__ */ j("div", {
1380
1381
  className: "flex h-[350px] w-[352px] items-center justify-center rounded-surface bg-surface-overlay shadow-floating",
1381
- children: /* @__PURE__ */ M("span", {
1382
+ children: /* @__PURE__ */ j("span", {
1382
1383
  className: "text-ds-sm text-surface-fg-subtle",
1383
1384
  children: "Loading..."
1384
1385
  })
1385
1386
  });
1386
- return /* @__PURE__ */ M("div", {
1387
+ return /* @__PURE__ */ j("div", {
1387
1388
  ref: o,
1388
1389
  className: "rounded-surface bg-surface-overlay shadow-floating overflow-hidden",
1389
- children: r ? /* @__PURE__ */ M(D.Suspense, {
1390
+ children: r ? /* @__PURE__ */ j(D.Suspense, {
1390
1391
  fallback: s,
1391
- children: /* @__PURE__ */ M(xt, {
1392
+ children: /* @__PURE__ */ j(St, {
1392
1393
  data: r,
1393
1394
  set: e,
1394
1395
  onEmojiSelect: (e) => t({
@@ -1403,7 +1404,7 @@ function St({ set: e = "native", onSelect: t, onClose: n }) {
1403
1404
  });
1404
1405
  }
1405
1406
  function Q({ onClick: e, isActive: t = !1, title: n, children: r }) {
1406
- return /* @__PURE__ */ M("button", {
1407
+ return /* @__PURE__ */ j("button", {
1407
1408
  type: "button",
1408
1409
  onClick: e,
1409
1410
  title: n,
@@ -1413,8 +1414,8 @@ function Q({ onClick: e, isActive: t = !1, title: n, children: r }) {
1413
1414
  children: r
1414
1415
  });
1415
1416
  }
1416
- function Ct({ editor: e }) {
1417
- let t = w({
1417
+ function wt({ editor: e }) {
1418
+ let t = T({
1418
1419
  editor: e,
1419
1420
  selector: ({ editor: e }) => ({
1420
1421
  isBold: e.isActive("bold"),
@@ -1425,72 +1426,72 @@ function Ct({ editor: e }) {
1425
1426
  isCode: e.isActive("code")
1426
1427
  })
1427
1428
  });
1428
- return /* @__PURE__ */ N(ne, {
1429
+ return /* @__PURE__ */ M(w, {
1429
1430
  editor: e,
1430
1431
  className: "flex gap-ds-01 rounded-surface bg-surface-overlay p-ds-02 shadow-floating",
1431
1432
  children: [
1432
- /* @__PURE__ */ M(Q, {
1433
+ /* @__PURE__ */ j(Q, {
1433
1434
  onClick: () => e.chain().focus().toggleBold().run(),
1434
1435
  isActive: t.isBold,
1435
1436
  title: "Bold",
1436
- children: /* @__PURE__ */ M(s, {
1437
- icon: ye,
1437
+ children: /* @__PURE__ */ j(s, {
1438
+ icon: xe,
1438
1439
  size: "xs"
1439
1440
  })
1440
1441
  }),
1441
- /* @__PURE__ */ M(Q, {
1442
+ /* @__PURE__ */ j(Q, {
1442
1443
  onClick: () => e.chain().focus().toggleItalic().run(),
1443
1444
  isActive: t.isItalic,
1444
1445
  title: "Italic",
1445
- children: /* @__PURE__ */ M(s, {
1446
- icon: F,
1446
+ children: /* @__PURE__ */ j(s, {
1447
+ icon: Ee,
1447
1448
  size: "xs"
1448
1449
  })
1449
1450
  }),
1450
- /* @__PURE__ */ M(Q, {
1451
+ /* @__PURE__ */ j(Q, {
1451
1452
  onClick: () => e.chain().focus().toggleUnderline().run(),
1452
1453
  isActive: t.isUnderline,
1453
1454
  title: "Underline",
1454
- children: /* @__PURE__ */ M(s, {
1455
- icon: Ie,
1455
+ children: /* @__PURE__ */ j(s, {
1456
+ icon: R,
1456
1457
  size: "xs"
1457
1458
  })
1458
1459
  }),
1459
- /* @__PURE__ */ M(Q, {
1460
+ /* @__PURE__ */ j(Q, {
1460
1461
  onClick: () => e.chain().focus().toggleStrike().run(),
1461
1462
  isActive: t.isStrike,
1462
1463
  title: "Strikethrough",
1463
- children: /* @__PURE__ */ M(s, {
1464
- icon: z,
1464
+ children: /* @__PURE__ */ j(s, {
1465
+ icon: Ie,
1465
1466
  size: "xs"
1466
1467
  })
1467
1468
  }),
1468
- /* @__PURE__ */ M(Q, {
1469
+ /* @__PURE__ */ j(Q, {
1469
1470
  onClick: () => e.chain().focus().toggleHighlight().run(),
1470
1471
  isActive: t.isHighlight,
1471
1472
  title: "Highlight",
1472
- children: /* @__PURE__ */ M(s, {
1473
- icon: we,
1473
+ children: /* @__PURE__ */ j(s, {
1474
+ icon: P,
1474
1475
  size: "xs"
1475
1476
  })
1476
1477
  }),
1477
- /* @__PURE__ */ M(Q, {
1478
+ /* @__PURE__ */ j(Q, {
1478
1479
  onClick: () => e.chain().focus().toggleCode().run(),
1479
1480
  isActive: t.isCode,
1480
1481
  title: "Code",
1481
- children: /* @__PURE__ */ M(s, {
1482
- icon: Ce,
1482
+ children: /* @__PURE__ */ j(s, {
1483
+ icon: N,
1483
1484
  size: "xs"
1484
1485
  })
1485
1486
  })
1486
1487
  ]
1487
1488
  });
1488
1489
  }
1489
- var wt = D.forwardRef(function({ onSubmit: o, placeholder: u = "Type a message...", disabled: d = !1, content: f = "", variant: p = "compact", enterBehavior: m = "send", maxLength: g, charCountDisplay: _ = "near-limit", mentions: v, onMentionSearch: y, onMentionSelect: ne, onFileUpload: T, onImageUpload: oe, slashCommands: E, onVoiceRecord: pe, onTranscribe: me, maxDuration: O, replyTo: he, onTyping: k, onEmpty: A, isStreaming: j = !1, onCancel: _e, leadingSlot: ve, trailingSlot: ye, disclaimer: be, toolbar: xe = !0, sendOptions: Ce, onSchedule: P, actionButton: we, emojiSet: F = "native", className: Te, ...Ee }, De) {
1490
- let [I, L] = D.useState("idle"), [R, Me] = D.useState(!1), [z, Ie] = D.useState(!1), [B, Re] = D.useState(null), [ze, H] = D.useState(!1), [Be, He] = D.useState(!1), [U, We] = D.useState(0), Ge = D.useRef(null), qe = D.useRef(null);
1490
+ var Tt = D.forwardRef(function({ onSubmit: o, placeholder: u = "Type a message...", disabled: d = !1, content: f = "", variant: p = "compact", enterBehavior: m = "send", maxLength: g, charCountDisplay: _ = "near-limit", mentions: v, onMentionSearch: y, onMentionSelect: b, onFileUpload: w, onImageUpload: ae, slashCommands: E, onVoiceRecord: se, onTranscribe: me, maxDuration: he, replyTo: O, onTyping: ge, onEmpty: k, isStreaming: A = !1, onCancel: _e, leadingSlot: ye, trailingSlot: be, disclaimer: xe, toolbar: Se = !0, sendOptions: Ce, onSchedule: N, actionButton: Te, emojiSet: P = "native", className: Ee, ...De }, Oe) {
1491
+ let [F, I] = D.useState("idle"), [L, je] = D.useState(!1), [Pe, Ie] = D.useState(!1), [R, z] = D.useState(null), [Be, Ve] = D.useState(!1), [He, Ue] = D.useState(!1), [Ge, V] = D.useState(0), H = D.useRef(null), qe = D.useRef(null);
1491
1492
  D.useEffect(() => {
1492
- if (!z || !Ge.current || !qe.current) return;
1493
- let i = Ge.current, a = qe.current, o = () => {
1493
+ if (!Pe || !H.current || !qe.current) return;
1494
+ let i = H.current, a = qe.current, o = () => {
1494
1495
  e(i, a, {
1495
1496
  placement: "top-end",
1496
1497
  middleware: [
@@ -1508,32 +1509,38 @@ var wt = D.forwardRef(function({ onSubmit: o, placeholder: u = "Type a message..
1508
1509
  return o(), window.addEventListener("scroll", o, !0), window.addEventListener("resize", o), () => {
1509
1510
  window.removeEventListener("scroll", o, !0), window.removeEventListener("resize", o);
1510
1511
  };
1511
- }, [z]);
1512
- let [W, G] = D.useState([]), [K, q] = D.useState(null), [Je, Ye] = D.useState(!1), Xe = D.useRef(null), Ze = D.useRef(null), Qe = D.useRef(void 0), $e = D.useRef(void 0), et = D.useRef(m);
1512
+ }, [Pe]);
1513
+ let [U, W] = D.useState([]), [G, K] = D.useState(null), [q, Ye] = D.useState(!1), Xe = D.useRef(null), Ze = D.useRef(null), Qe = D.useRef(void 0), $e = D.useRef(void 0), et = D.useRef(m);
1513
1514
  et.current = m;
1514
- let tt = c(), J = vt[p], nt = J.maxHeight, Y = _t({
1515
- maxDuration: O,
1515
+ let tt = D.useRef(b);
1516
+ tt.current = b;
1517
+ let nt = D.useRef(v);
1518
+ nt.current = v;
1519
+ let rt = D.useRef(y);
1520
+ rt.current = y;
1521
+ let it = c(), J = yt[p], at = J.maxHeight, Y = vt({
1522
+ maxDuration: he,
1516
1523
  onComplete: async (e, t, n) => {
1517
- if (pe?.(e, t), me) {
1524
+ if (se?.(e, t), me) {
1518
1525
  let n = await me(e, t);
1519
1526
  if (n != null) {
1520
- X?.chain().focus().insertContent(n).run(), L("idle");
1527
+ X?.chain().focus().insertContent(n).run(), I("idle");
1521
1528
  return;
1522
1529
  }
1523
1530
  }
1524
- q({
1531
+ K({
1525
1532
  blob: e,
1526
1533
  duration: t,
1527
1534
  waveformData: n
1528
- }), L("review");
1535
+ }), I("review");
1529
1536
  }
1530
- }), rt = D.useCallback(() => {
1531
- Y.start(), L("recording");
1532
- }, [Y]), it = D.useCallback(() => {
1537
+ }), ot = D.useCallback(() => {
1538
+ Y.start(), I("recording");
1539
+ }, [Y]), ct = D.useCallback(() => {
1533
1540
  Y.stop();
1534
- }, [Y]), at = D.useCallback(() => {
1535
- Y.cancel(), L("idle");
1536
- }, [Y]), X = x({
1541
+ }, [Y]), dt = D.useCallback(() => {
1542
+ Y.cancel(), I("idle");
1543
+ }, [Y]), X = ee({
1537
1544
  immediatelyRender: !1,
1538
1545
  extensions: D.useMemo(() => {
1539
1546
  let e = [
@@ -1547,14 +1554,14 @@ var wt = D.forwardRef(function({ onSubmit: o, placeholder: u = "Type a message..
1547
1554
  HTMLAttributes: { class: "text-accent-11 underline" }
1548
1555
  }
1549
1556
  }),
1550
- ee.configure({ placeholder: u }),
1551
- te.configure({ multicolor: !1 }),
1557
+ S.configure({ placeholder: u }),
1558
+ ne.configure({ multicolor: !1 }),
1552
1559
  re,
1553
- ae.configure({ limit: g || void 0 }),
1554
- de,
1555
- le,
1556
- ue(F),
1557
- C.create({
1560
+ oe.configure({ limit: g || void 0 }),
1561
+ fe,
1562
+ ue,
1563
+ de(P),
1564
+ te.create({
1558
1565
  name: "enterToSend",
1559
1566
  addKeyboardShortcuts() {
1560
1567
  return {
@@ -1565,17 +1572,21 @@ var wt = D.forwardRef(function({ onSubmit: o, placeholder: u = "Type a message..
1565
1572
  }
1566
1573
  })
1567
1574
  ];
1568
- return (v || y) && e.push(S.configure({
1575
+ return (v || y) && e.push(C.configure({
1569
1576
  HTMLAttributes: { class: "mention" },
1570
1577
  suggestion: {
1571
- items: async ({ query: e }) => y ? await y(e) : v ? v.filter((t) => t.label.toLowerCase().includes(e.toLowerCase())).slice(0, 8) : [],
1572
- render: fe(ne)
1578
+ items: async ({ query: e }) => {
1579
+ if (rt.current) return await rt.current(e);
1580
+ let t = nt.current;
1581
+ return t ? t.filter((t) => t.label.toLowerCase().includes(e.toLowerCase())).slice(0, 8) : [];
1582
+ },
1583
+ render: pe((e) => tt.current?.(e))
1573
1584
  }
1574
- })), E && e.push(Ve(E)), e;
1585
+ })), E && e.push(We(E)), e;
1575
1586
  }, [
1576
1587
  u,
1577
1588
  g,
1578
- F,
1589
+ P,
1579
1590
  !!v,
1580
1591
  !!y,
1581
1592
  !!E
@@ -1583,58 +1594,58 @@ var wt = D.forwardRef(function({ onSubmit: o, placeholder: u = "Type a message..
1583
1594
  content: f || void 0,
1584
1595
  editable: !d,
1585
1596
  editorProps: {
1586
- attributes: { class: yt },
1597
+ attributes: { class: bt },
1587
1598
  handlePaste: (e, t) => {
1588
1599
  let n = Array.from(t.clipboardData?.files ?? []);
1589
1600
  return n.length > 0 ? (n.forEach(Z), !0) : !1;
1590
1601
  }
1591
1602
  }
1592
- }), lt = D.useCallback(() => {
1603
+ }), ft = D.useCallback(() => {
1593
1604
  if (!X) return;
1594
- let e = !X.isEmpty, t = W.length > 0, n = !!K;
1595
- if (!e && !t && !n || j) return;
1605
+ let e = !X.isEmpty, t = U.length > 0, n = !!G;
1606
+ if (!e && !t && !n || A) return;
1596
1607
  let r = {
1597
1608
  html: e ? X.getHTML() : "",
1598
1609
  plainText: e ? X.getText() : ""
1599
1610
  };
1600
- t && (r.attachments = W.filter((e) => !e.uploading && e.url).map((e) => ({
1611
+ t && (r.attachments = U.filter((e) => !e.uploading && e.url).map((e) => ({
1601
1612
  url: e.url,
1602
1613
  name: e.name,
1603
1614
  size: e.size,
1604
1615
  type: e.type
1605
1616
  }))), n && (r.voiceNote = {
1606
- blob: K.blob,
1607
- duration: K.duration
1608
- }), B && P ? P(r, B) : o(r), X.commands.clearContent(), G([]), q(null), Re(null), L("idle");
1617
+ blob: G.blob,
1618
+ duration: G.duration
1619
+ }), R && N ? N(r, R) : o(r), X.commands.clearContent(), W([]), K(null), z(null), I("idle");
1609
1620
  }, [
1610
1621
  X,
1611
- W,
1612
- K,
1613
- j,
1622
+ U,
1623
+ G,
1624
+ A,
1614
1625
  o,
1615
- P,
1616
- B
1626
+ N,
1627
+ R
1617
1628
  ]);
1618
- $e.current = lt, D.useEffect(() => {
1619
- if (!X || !k) return;
1629
+ $e.current = ft, D.useEffect(() => {
1630
+ if (!X || !ge) return;
1620
1631
  let e = () => {
1621
- k(!0), clearTimeout(Qe.current), Qe.current = setTimeout(() => k(!1), 2e3);
1632
+ ge(!0), clearTimeout(Qe.current), Qe.current = setTimeout(() => ge(!1), 2e3);
1622
1633
  };
1623
1634
  return X.on("update", e), () => {
1624
1635
  X.off("update", e), clearTimeout(Qe.current);
1625
1636
  };
1626
- }, [X, k]), D.useEffect(() => {
1627
- if (!X || !A) return;
1637
+ }, [X, ge]), D.useEffect(() => {
1638
+ if (!X || !k) return;
1628
1639
  let e = () => {
1629
- A(X.isEmpty);
1640
+ k(X.isEmpty);
1630
1641
  };
1631
1642
  return X.on("update", e), e(), () => {
1632
1643
  X.off("update", e);
1633
1644
  };
1634
- }, [X, A]);
1645
+ }, [X, k]);
1635
1646
  let Z = D.useCallback(async (e) => {
1636
1647
  let t = Math.random().toString(36).slice(2), n = e.type.startsWith("image/");
1637
- G((r) => [...r, {
1648
+ W((r) => [...r, {
1638
1649
  id: t,
1639
1650
  name: e.name,
1640
1651
  size: e.size,
@@ -1642,16 +1653,16 @@ var wt = D.forwardRef(function({ onSubmit: o, placeholder: u = "Type a message..
1642
1653
  uploading: !0
1643
1654
  }]);
1644
1655
  try {
1645
- if (n && oe) {
1646
- let n = await oe(e);
1647
- G((e) => e.map((e) => e.id === t ? {
1656
+ if (n && ae) {
1657
+ let n = await ae(e);
1658
+ W((e) => e.map((e) => e.id === t ? {
1648
1659
  ...e,
1649
1660
  url: n,
1650
1661
  uploading: !1
1651
1662
  } : e));
1652
- } else if (T) {
1653
- let n = await T(e);
1654
- G((e) => e.map((e) => e.id === t ? {
1663
+ } else if (w) {
1664
+ let n = await w(e);
1665
+ W((e) => e.map((e) => e.id === t ? {
1655
1666
  ...e,
1656
1667
  url: n.url,
1657
1668
  name: n.name,
@@ -1660,90 +1671,90 @@ var wt = D.forwardRef(function({ onSubmit: o, placeholder: u = "Type a message..
1660
1671
  } : e));
1661
1672
  } else if (n) {
1662
1673
  let n = URL.createObjectURL(e);
1663
- G((e) => e.map((e) => e.id === t ? {
1674
+ W((e) => e.map((e) => e.id === t ? {
1664
1675
  ...e,
1665
1676
  url: n,
1666
1677
  uploading: !1
1667
1678
  } : e));
1668
- } else G((e) => e.filter((e) => e.id !== t));
1679
+ } else W((e) => e.filter((e) => e.id !== t));
1669
1680
  } catch {
1670
- G((e) => e.filter((e) => e.id !== t));
1681
+ W((e) => e.filter((e) => e.id !== t));
1671
1682
  }
1672
- }, [T, oe]), ut = D.useCallback((e) => {
1673
- G((t) => t.filter((t) => t.id !== e));
1674
- }, []), dt = D.useCallback((e) => {
1683
+ }, [w, ae]), ht = D.useCallback((e) => {
1684
+ W((t) => t.filter((t) => t.id !== e));
1685
+ }, []), _t = D.useCallback((e) => {
1675
1686
  e.preventDefault(), Ye(!1), Array.from(e.dataTransfer.files).forEach(Z);
1676
- }, [Z]), mt = D.useCallback((e) => {
1687
+ }, [Z]), St = D.useCallback((e) => {
1677
1688
  Array.from(e.target.files || []).forEach(Z), e.target.value = "";
1678
- }, [Z]), gt = D.useCallback(() => {
1679
- q(null), L("idle");
1680
- }, []), xt = w({
1689
+ }, [Z]), Q = D.useCallback(() => {
1690
+ K(null), I("idle");
1691
+ }, []), Tt = T({
1681
1692
  editor: X,
1682
1693
  selector: ({ editor: e }) => e ? { editorIsEmpty: e.isEmpty } : null
1683
1694
  })?.editorIsEmpty ?? !0;
1684
1695
  D.useEffect(() => {
1685
1696
  if (!X) return;
1686
1697
  let e = () => {
1687
- We(X.state.doc.textBetween(0, X.state.doc.content.size, void 0, " ").length);
1698
+ V(X.state.doc.textBetween(0, X.state.doc.content.size, void 0, " ").length);
1688
1699
  };
1689
1700
  return e(), X.on("update", e), () => {
1690
1701
  X.off("update", e);
1691
1702
  };
1692
1703
  }, [X]);
1693
- let Q = !xt || W.length > 0 || !!K, wt = R || I === "review" || p === "expanded", $ = "icon-md";
1694
- return /* @__PURE__ */ N("div", {
1695
- ref: De,
1696
- className: a("border-t border-surface-border-subtle px-ds-05 py-ds-04", "flex items-center gap-ds-03", Te),
1697
- ...Ee,
1704
+ let Et = !Tt || U.length > 0 || !!G, Dt = L || F === "review" || p === "expanded", $ = "icon-md";
1705
+ return /* @__PURE__ */ M("div", {
1706
+ ref: Oe,
1707
+ className: a("border-t border-surface-border-subtle px-ds-05 py-ds-04", "flex items-center gap-ds-03", Ee),
1708
+ ...De,
1698
1709
  children: [
1699
- we !== !1 && (we ?? (T || oe ? /* @__PURE__ */ M(l, {
1710
+ Te !== !1 && (Te ?? (w || ae ? /* @__PURE__ */ j(l, {
1700
1711
  variant: "solid",
1701
1712
  size: "icon-md",
1702
1713
  onClick: () => Xe.current?.click(),
1703
1714
  title: "Attach",
1704
1715
  "aria-label": "Attach file",
1705
1716
  className: "shrink-0",
1706
- children: /* @__PURE__ */ M(s, {
1707
- icon: Ae,
1717
+ children: /* @__PURE__ */ j(s, {
1718
+ icon: Me,
1708
1719
  size: "md"
1709
1720
  })
1710
1721
  }) : null)),
1711
- /* @__PURE__ */ N("div", {
1722
+ /* @__PURE__ */ M("div", {
1712
1723
  role: "region",
1713
1724
  "aria-label": "Message composer",
1714
- className: a("flex-1 min-w-0 overflow-hidden rounded-surface border border-surface-border-strong bg-surface-raised-hover", "transition-[color,background-color,border-color,box-shadow] duration-fast-02 ease-productive-standard", "hover:bg-surface-raised-active", "focus-within:ring-2 focus-within:ring-accent-9 focus-within:ring-offset-2 focus-within:border-accent-9", I === "recording" && "border-error-7/30", Je && "border-dashed border-accent-7 bg-accent-2", d && "opacity-action-disabled cursor-not-allowed"),
1715
- onFocus: () => He(!0),
1725
+ className: a("flex-1 min-w-0 overflow-hidden rounded-surface border border-surface-border-strong bg-surface-raised-hover", "transition-[color,background-color,border-color,box-shadow] duration-fast-02 ease-productive-standard", "hover:bg-surface-raised-active", "focus-within:ring-2 focus-within:ring-accent-9 focus-within:ring-offset-2 focus-within:border-accent-9", F === "recording" && "border-error-7/30", q && "border-dashed border-accent-7 bg-accent-2", d && "opacity-action-disabled cursor-not-allowed"),
1726
+ onFocus: () => Ue(!0),
1716
1727
  onBlur: (e) => {
1717
- e.currentTarget.contains(e.relatedTarget) || He(!1);
1728
+ e.currentTarget.contains(e.relatedTarget) || Ue(!1);
1718
1729
  },
1719
1730
  onDragOver: (e) => {
1720
1731
  e.preventDefault(), Ye(!0);
1721
1732
  },
1722
1733
  onDragLeave: () => Ye(!1),
1723
- onDrop: dt,
1734
+ onDrop: _t,
1724
1735
  children: [
1725
- ve,
1726
- /* @__PURE__ */ M(Le, { children: he && /* @__PURE__ */ M(ct, {
1727
- author: he.author,
1728
- preview: he.preview,
1729
- onDismiss: he.onDismiss
1736
+ ye,
1737
+ /* @__PURE__ */ j(ze, { children: O && /* @__PURE__ */ j(ut, {
1738
+ author: O.author,
1739
+ preview: O.preview,
1740
+ onDismiss: O.onDismiss
1730
1741
  }, "reply") }),
1731
- /* @__PURE__ */ M(Le, { children: B && /* @__PURE__ */ M(ht, {
1732
- date: B,
1733
- onEdit: () => H(!0),
1734
- onClear: () => Re(null)
1742
+ /* @__PURE__ */ j(ze, { children: R && /* @__PURE__ */ j(gt, {
1743
+ date: R,
1744
+ onEdit: () => Ve(!0),
1745
+ onClear: () => z(null)
1735
1746
  }, "schedule") }),
1736
- /* @__PURE__ */ M(Le, { children: W.length > 0 && /* @__PURE__ */ M(Ue, {
1737
- attachments: W,
1738
- onRemoveAttachment: ut
1747
+ /* @__PURE__ */ j(ze, { children: U.length > 0 && /* @__PURE__ */ j(Ke, {
1748
+ attachments: U,
1749
+ onRemoveAttachment: ht
1739
1750
  }, "attachments") }),
1740
- J.toolbarPosition === "top" && X && /* @__PURE__ */ M("div", {
1741
- className: a("grid transition-[grid-template-rows,opacity] duration-moderate-01 ease-productive-standard", R ? "grid-rows-[1fr] opacity-100" : "grid-rows-[0fr] opacity-0 pointer-events-none"),
1742
- children: /* @__PURE__ */ M("div", {
1751
+ J.toolbarPosition === "top" && X && /* @__PURE__ */ j("div", {
1752
+ className: a("grid transition-[grid-template-rows,opacity] duration-moderate-01 ease-productive-standard", L ? "grid-rows-[1fr] opacity-100" : "grid-rows-[0fr] opacity-0 pointer-events-none"),
1753
+ children: /* @__PURE__ */ j("div", {
1743
1754
  className: "overflow-hidden",
1744
- children: /* @__PURE__ */ M(ot, {
1755
+ children: /* @__PURE__ */ j(st, {
1745
1756
  editor: X,
1746
- toolbar: xe,
1757
+ toolbar: Se,
1747
1758
  isMobile: !1,
1748
1759
  hasMentions: !!(v || y),
1749
1760
  hasSlashCommands: !!E,
@@ -1751,68 +1762,68 @@ var wt = D.forwardRef(function({ onSubmit: o, placeholder: u = "Type a message..
1751
1762
  })
1752
1763
  })
1753
1764
  }),
1754
- /* @__PURE__ */ N("div", {
1765
+ /* @__PURE__ */ M("div", {
1755
1766
  className: "relative",
1756
- children: [I === "recording" && /* @__PURE__ */ M(st, {
1767
+ children: [F === "recording" && /* @__PURE__ */ j(lt, {
1757
1768
  duration: Y.duration,
1758
1769
  analyserNode: Y.analyserNode,
1759
- maxDuration: O,
1760
- onCancel: at
1761
- }), /* @__PURE__ */ N("div", {
1770
+ maxDuration: he,
1771
+ onCancel: dt
1772
+ }), /* @__PURE__ */ M("div", {
1762
1773
  ref: Ze,
1763
- className: a("flex items-center px-ds-04 py-ds-03 cursor-text [&_.tiptap]:w-full [&_.tiptap]:outline-hidden", I === "recording" && "invisible"),
1774
+ className: a("flex items-center px-ds-04 py-ds-03 cursor-text [&_.tiptap]:w-full [&_.tiptap]:outline-hidden", F === "recording" && "invisible"),
1764
1775
  style: {
1765
1776
  minHeight: J.minHeight,
1766
- maxHeight: nt,
1777
+ maxHeight: at,
1767
1778
  overflowY: "auto"
1768
1779
  },
1769
1780
  onClick: () => X?.commands.focus(),
1770
- children: [/* @__PURE__ */ M("div", {
1781
+ children: [/* @__PURE__ */ j("div", {
1771
1782
  className: "flex-1 min-w-0",
1772
- children: /* @__PURE__ */ M(b, { editor: X })
1773
- }), X && I !== "recording" && /* @__PURE__ */ N("div", {
1783
+ children: /* @__PURE__ */ j(x, { editor: X })
1784
+ }), X && F !== "recording" && /* @__PURE__ */ M("div", {
1774
1785
  className: "flex items-center gap-ds-01 shrink-0 ml-ds-03",
1775
- children: [/* @__PURE__ */ M("button", {
1786
+ children: [/* @__PURE__ */ j("button", {
1776
1787
  type: "button",
1777
- onClick: () => Me((e) => !e),
1778
- title: R ? "Hide formatting" : "Show formatting",
1779
- "aria-label": R ? "Hide formatting" : "Show formatting",
1780
- "aria-pressed": R,
1781
- className: a("inline-flex h-ds-xs-plus w-ds-xs-plus items-center justify-center rounded-control touch-target", "transition-colors duration-fast-01 ease-productive-standard", "hover:bg-surface-raised-hover", R ? "bg-surface-raised-hover text-accent-11" : "text-surface-fg-subtle"),
1782
- children: /* @__PURE__ */ M(s, {
1783
- icon: Pe,
1788
+ onClick: () => je((e) => !e),
1789
+ title: L ? "Hide formatting" : "Show formatting",
1790
+ "aria-label": L ? "Hide formatting" : "Show formatting",
1791
+ "aria-pressed": L,
1792
+ className: a("inline-flex h-ds-xs-plus w-ds-xs-plus items-center justify-center rounded-control touch-target", "transition-colors duration-fast-01 ease-productive-standard", "hover:bg-surface-raised-hover", L ? "bg-surface-raised-hover text-accent-11" : "text-surface-fg-subtle"),
1793
+ children: /* @__PURE__ */ j(s, {
1794
+ icon: Le,
1784
1795
  size: "xs"
1785
1796
  })
1786
- }), /* @__PURE__ */ N("div", {
1797
+ }), /* @__PURE__ */ M("div", {
1787
1798
  className: "relative",
1788
- children: [/* @__PURE__ */ M("button", {
1789
- ref: Ge,
1799
+ children: [/* @__PURE__ */ j("button", {
1800
+ ref: H,
1790
1801
  type: "button",
1791
1802
  onClick: () => Ie((e) => !e),
1792
1803
  title: "Emoji",
1793
1804
  "aria-label": "Emoji",
1794
- className: a("inline-flex h-ds-xs-plus w-ds-xs-plus items-center justify-center rounded-control touch-target transition-colors duration-fast-01", z ? "bg-surface-raised-hover text-accent-11" : "text-surface-fg-subtle hover:bg-surface-raised-hover hover:text-surface-fg"),
1795
- children: /* @__PURE__ */ M(s, {
1796
- icon: ke,
1805
+ className: a("inline-flex h-ds-xs-plus w-ds-xs-plus items-center justify-center rounded-control touch-target transition-colors duration-fast-01", Pe ? "bg-surface-raised-hover text-accent-11" : "text-surface-fg-subtle hover:bg-surface-raised-hover hover:text-surface-fg"),
1806
+ children: /* @__PURE__ */ j(s, {
1807
+ icon: Ae,
1797
1808
  size: "xs"
1798
1809
  })
1799
- }), z && ge.createPortal(/* @__PURE__ */ M("div", {
1810
+ }), Pe && ve.createPortal(/* @__PURE__ */ j("div", {
1800
1811
  ref: qe,
1801
1812
  className: "absolute z-popover",
1802
1813
  style: {
1803
1814
  top: 0,
1804
1815
  left: 0
1805
1816
  },
1806
- children: /* @__PURE__ */ M(St, {
1807
- set: F,
1817
+ children: /* @__PURE__ */ j(Ct, {
1818
+ set: P,
1808
1819
  onSelect: async ({ id: e, native: t }) => {
1809
- let n = ce(await se(F), e);
1820
+ let n = le(await ce(P), e);
1810
1821
  n ? X.chain().focus().insertContent({
1811
1822
  type: "emojiNode",
1812
1823
  attrs: {
1813
1824
  id: e,
1814
1825
  native: n.native,
1815
- set: F,
1826
+ set: P,
1816
1827
  x: n.x,
1817
1828
  y: n.y
1818
1829
  }
@@ -1825,35 +1836,35 @@ var wt = D.forwardRef(function({ onSubmit: o, placeholder: u = "Type a message..
1825
1836
  })]
1826
1837
  })]
1827
1838
  }),
1828
- I === "review" && K && /* @__PURE__ */ N("div", {
1839
+ F === "review" && G && /* @__PURE__ */ M("div", {
1829
1840
  className: "flex items-center gap-ds-03 px-ds-04 py-ds-02b border-b border-surface-border",
1830
- children: [/* @__PURE__ */ M(Ke, {
1831
- src: K.blob,
1832
- duration: K.duration,
1833
- waveformData: K.waveformData,
1841
+ children: [/* @__PURE__ */ j(Je, {
1842
+ src: G.blob,
1843
+ duration: G.duration,
1844
+ waveformData: G.waveformData,
1834
1845
  className: "flex-1"
1835
- }), /* @__PURE__ */ M(l, {
1846
+ }), /* @__PURE__ */ j(l, {
1836
1847
  variant: "ghost",
1837
1848
  size: "icon-sm",
1838
- onClick: gt,
1849
+ onClick: Q,
1839
1850
  "aria-label": "Discard voice note",
1840
1851
  title: "Discard voice note",
1841
1852
  className: "text-surface-fg-subtle hover:text-error-11",
1842
- children: /* @__PURE__ */ M(s, {
1843
- icon: Fe,
1853
+ children: /* @__PURE__ */ j(s, {
1854
+ icon: Re,
1844
1855
  size: "sm"
1845
1856
  })
1846
1857
  })]
1847
1858
  }),
1848
- tt && X && !xt && /* @__PURE__ */ M(Ct, { editor: X }),
1849
- J.toolbarPosition === "bottom" && X && /* @__PURE__ */ M("div", {
1850
- className: a("grid transition-[grid-template-rows,opacity] duration-moderate-01 ease-productive-standard", wt ? "grid-rows-[1fr] opacity-100" : "grid-rows-[0fr] opacity-0 pointer-events-none"),
1851
- children: /* @__PURE__ */ M("div", {
1859
+ it && X && !Tt && /* @__PURE__ */ j(wt, { editor: X }),
1860
+ J.toolbarPosition === "bottom" && X && /* @__PURE__ */ j("div", {
1861
+ className: a("grid transition-[grid-template-rows,opacity] duration-moderate-01 ease-productive-standard", Dt ? "grid-rows-[1fr] opacity-100" : "grid-rows-[0fr] opacity-0 pointer-events-none"),
1862
+ children: /* @__PURE__ */ j("div", {
1852
1863
  className: "overflow-hidden",
1853
- children: /* @__PURE__ */ M(ot, {
1864
+ children: /* @__PURE__ */ j(st, {
1854
1865
  editor: X,
1855
- toolbar: xe,
1856
- isMobile: tt,
1866
+ toolbar: Se,
1867
+ isMobile: it,
1857
1868
  hasMentions: !!(v || y),
1858
1869
  hasSlashCommands: !!E,
1859
1870
  disabled: d
@@ -1861,33 +1872,33 @@ var wt = D.forwardRef(function({ onSubmit: o, placeholder: u = "Type a message..
1861
1872
  })
1862
1873
  }),
1863
1874
  g && _ !== "hidden" && (() => {
1864
- let e = U / g;
1865
- return _ === "always" || _ === "focus" && Be || (_ === "near-limit" || !_) && e >= .8 || e >= 1 ? /* @__PURE__ */ N("div", {
1875
+ let e = Ge / g;
1876
+ return _ === "always" || _ === "focus" && He || (_ === "near-limit" || !_) && e >= .8 || e >= 1 ? /* @__PURE__ */ M("div", {
1866
1877
  className: a("flex justify-end px-ds-04 pb-ds-02 text-ds-xs tabular-nums transition-opacity duration-fast-01", e >= 1 ? "text-error-11 font-medium" : e >= .9 ? "text-warning-11" : "text-surface-fg-subtle"),
1867
1878
  children: [
1868
- U,
1879
+ Ge,
1869
1880
  "/",
1870
1881
  g
1871
1882
  ]
1872
1883
  }) : null;
1873
1884
  })(),
1874
- ye,
1875
- /* @__PURE__ */ M("input", {
1885
+ be,
1886
+ /* @__PURE__ */ j("input", {
1876
1887
  ref: Xe,
1877
1888
  type: "file",
1878
1889
  multiple: !0,
1879
1890
  className: "hidden",
1880
- onChange: mt
1891
+ onChange: St
1881
1892
  })
1882
1893
  ]
1883
1894
  }),
1884
- /* @__PURE__ */ N("div", {
1895
+ /* @__PURE__ */ M("div", {
1885
1896
  className: "flex items-center gap-ds-02 shrink-0",
1886
- children: [Ce && Ce.length > 0 && I !== "recording" && /* @__PURE__ */ M(bt, { options: Ce }), /* @__PURE__ */ N(Le, {
1897
+ children: [Ce && Ce.length > 0 && F !== "recording" && /* @__PURE__ */ j(xt, { options: Ce }), /* @__PURE__ */ M(ze, {
1887
1898
  mode: "popLayout",
1888
1899
  initial: !1,
1889
1900
  children: [
1890
- I === "recording" && /* @__PURE__ */ N(V.div, {
1901
+ F === "recording" && /* @__PURE__ */ M(B.div, {
1891
1902
  initial: {
1892
1903
  scale: .8,
1893
1904
  opacity: 0
@@ -1902,31 +1913,31 @@ var wt = D.forwardRef(function({ onSubmit: o, placeholder: u = "Type a message..
1902
1913
  },
1903
1914
  transition: { duration: i.moderate01 },
1904
1915
  className: "flex items-center gap-ds-02",
1905
- children: [/* @__PURE__ */ M(l, {
1916
+ children: [/* @__PURE__ */ j(l, {
1906
1917
  variant: "soft",
1907
1918
  size: $,
1908
- onClick: at,
1919
+ onClick: dt,
1909
1920
  "aria-label": "Cancel recording",
1910
1921
  title: "Cancel recording",
1911
1922
  className: "text-surface-fg-subtle hover:text-error-11",
1912
- children: /* @__PURE__ */ M(s, {
1913
- icon: Fe,
1923
+ children: /* @__PURE__ */ j(s, {
1924
+ icon: Re,
1914
1925
  size: "md"
1915
1926
  })
1916
- }), /* @__PURE__ */ M(l, {
1927
+ }), /* @__PURE__ */ j(l, {
1917
1928
  variant: "solid",
1918
1929
  size: $,
1919
1930
  color: "error",
1920
- onClick: it,
1931
+ onClick: ct,
1921
1932
  "aria-label": "Stop recording",
1922
1933
  title: "Stop recording",
1923
- children: /* @__PURE__ */ M(s, {
1924
- icon: Ne,
1934
+ children: /* @__PURE__ */ j(s, {
1935
+ icon: Fe,
1925
1936
  size: "md"
1926
1937
  })
1927
1938
  })]
1928
1939
  }, "recording"),
1929
- j && I !== "recording" && /* @__PURE__ */ M(V.div, {
1940
+ A && F !== "recording" && /* @__PURE__ */ j(B.div, {
1930
1941
  initial: {
1931
1942
  scale: .8,
1932
1943
  opacity: 0
@@ -1940,20 +1951,20 @@ var wt = D.forwardRef(function({ onSubmit: o, placeholder: u = "Type a message..
1940
1951
  opacity: 0
1941
1952
  },
1942
1953
  transition: { duration: i.moderate01 },
1943
- children: /* @__PURE__ */ M(l, {
1954
+ children: /* @__PURE__ */ j(l, {
1944
1955
  variant: "solid",
1945
1956
  size: $,
1946
1957
  color: "error",
1947
1958
  onClick: _e,
1948
1959
  "aria-label": "Stop",
1949
1960
  title: "Stop",
1950
- children: /* @__PURE__ */ M(s, {
1951
- icon: Ne,
1961
+ children: /* @__PURE__ */ j(s, {
1962
+ icon: Fe,
1952
1963
  size: "md"
1953
1964
  })
1954
1965
  })
1955
1966
  }, "streaming"),
1956
- !j && I !== "recording" && Q && P && /* @__PURE__ */ M(V.div, {
1967
+ !A && F !== "recording" && Et && N && /* @__PURE__ */ j(B.div, {
1957
1968
  initial: {
1958
1969
  scale: .8,
1959
1970
  opacity: 0
@@ -1967,23 +1978,23 @@ var wt = D.forwardRef(function({ onSubmit: o, placeholder: u = "Type a message..
1967
1978
  opacity: 0
1968
1979
  },
1969
1980
  transition: { duration: i.moderate01 },
1970
- children: /* @__PURE__ */ M(h, {
1971
- onClick: lt,
1981
+ children: /* @__PURE__ */ j(h, {
1982
+ onClick: ft,
1972
1983
  disabled: d,
1973
- "aria-label": B ? "Schedule send" : "Send",
1984
+ "aria-label": R ? "Schedule send" : "Send",
1974
1985
  size: $,
1975
- dropdownContent: /* @__PURE__ */ M(ft, {
1976
- onSchedule: (e) => Re(e),
1986
+ dropdownContent: /* @__PURE__ */ j(pt, {
1987
+ onSchedule: (e) => z(e),
1977
1988
  onClose: () => {},
1978
- onOpenDialog: () => H(!0)
1989
+ onOpenDialog: () => Ve(!0)
1979
1990
  }),
1980
- children: /* @__PURE__ */ M(s, {
1981
- icon: B ? Se : je,
1991
+ children: /* @__PURE__ */ j(s, {
1992
+ icon: R ? we : Ne,
1982
1993
  size: "md"
1983
1994
  })
1984
1995
  })
1985
1996
  }, "split-send"),
1986
- !j && I !== "recording" && Q && !P && /* @__PURE__ */ M(V.div, {
1997
+ !A && F !== "recording" && Et && !N && /* @__PURE__ */ j(B.div, {
1987
1998
  initial: {
1988
1999
  scale: .8,
1989
2000
  opacity: 0
@@ -1997,20 +2008,20 @@ var wt = D.forwardRef(function({ onSubmit: o, placeholder: u = "Type a message..
1997
2008
  opacity: 0
1998
2009
  },
1999
2010
  transition: { duration: i.moderate01 },
2000
- children: /* @__PURE__ */ M(l, {
2011
+ children: /* @__PURE__ */ j(l, {
2001
2012
  variant: "solid",
2002
2013
  size: $,
2003
- onClick: lt,
2014
+ onClick: ft,
2004
2015
  disabled: d,
2005
2016
  "aria-label": "Send",
2006
2017
  title: "Send",
2007
- children: /* @__PURE__ */ M(s, {
2008
- icon: je,
2018
+ children: /* @__PURE__ */ j(s, {
2019
+ icon: Ne,
2009
2020
  size: "md"
2010
2021
  })
2011
2022
  })
2012
2023
  }, "send"),
2013
- !j && I !== "recording" && !Q && pe && /* @__PURE__ */ M(V.div, {
2024
+ !A && F !== "recording" && !Et && se && /* @__PURE__ */ j(B.div, {
2014
2025
  initial: {
2015
2026
  scale: .8,
2016
2027
  opacity: 0
@@ -2024,19 +2035,19 @@ var wt = D.forwardRef(function({ onSubmit: o, placeholder: u = "Type a message..
2024
2035
  opacity: 0
2025
2036
  },
2026
2037
  transition: { duration: i.moderate01 },
2027
- children: /* @__PURE__ */ M(l, {
2038
+ children: /* @__PURE__ */ j(l, {
2028
2039
  variant: "soft",
2029
2040
  size: $,
2030
- onClick: rt,
2041
+ onClick: ot,
2031
2042
  "aria-label": "Record voice message",
2032
2043
  title: "Record voice message",
2033
- children: /* @__PURE__ */ M(s, {
2034
- icon: Oe,
2044
+ children: /* @__PURE__ */ j(s, {
2045
+ icon: ke,
2035
2046
  size: "md"
2036
2047
  })
2037
2048
  })
2038
2049
  }, "mic"),
2039
- !j && I !== "recording" && !Q && !pe && /* @__PURE__ */ M(V.div, {
2050
+ !A && F !== "recording" && !Et && !se && /* @__PURE__ */ j(B.div, {
2040
2051
  initial: {
2041
2052
  scale: .8,
2042
2053
  opacity: 0
@@ -2050,14 +2061,14 @@ var wt = D.forwardRef(function({ onSubmit: o, placeholder: u = "Type a message..
2050
2061
  opacity: 0
2051
2062
  },
2052
2063
  transition: { duration: i.moderate01 },
2053
- children: /* @__PURE__ */ M(l, {
2064
+ children: /* @__PURE__ */ j(l, {
2054
2065
  variant: "solid",
2055
2066
  size: $,
2056
2067
  disabled: !0,
2057
2068
  "aria-label": "Send",
2058
2069
  title: "Send",
2059
- children: /* @__PURE__ */ M(s, {
2060
- icon: je,
2070
+ children: /* @__PURE__ */ j(s, {
2071
+ icon: Ne,
2061
2072
  size: "md"
2062
2073
  })
2063
2074
  })
@@ -2065,19 +2076,19 @@ var wt = D.forwardRef(function({ onSubmit: o, placeholder: u = "Type a message..
2065
2076
  ]
2066
2077
  })]
2067
2078
  }),
2068
- be && /* @__PURE__ */ M("p", {
2079
+ xe && /* @__PURE__ */ j("p", {
2069
2080
  className: "mt-ds-02 text-center text-ds-xs text-surface-fg-subtle/50",
2070
- children: be
2081
+ children: xe
2071
2082
  }),
2072
- P && /* @__PURE__ */ M(pt, {
2073
- open: ze,
2074
- onOpenChange: H,
2075
- onSchedule: (e) => Re(e),
2076
- initialDate: B
2083
+ N && /* @__PURE__ */ j(mt, {
2084
+ open: Be,
2085
+ onOpenChange: Ve,
2086
+ onSchedule: (e) => z(e),
2087
+ initialDate: R
2077
2088
  })
2078
2089
  ]
2079
2090
  });
2080
2091
  });
2081
- wt.displayName = "RichChatInput";
2092
+ Tt.displayName = "RichChatInput";
2082
2093
  //#endregion
2083
- export { Ke as AudioPlayer, U as AudioWaveform, J as BlockquoteButton, Je as BoldButton, et as BulletListButton, $e as CodeButton, rt as EmojiButton, Qe as HighlightButton, Ye as ItalicButton, nt as LinkButton, Y as MentionButton, tt as OrderedListButton, wt as RichChatInput, it as SlashCommandButton, Ze as StrikeButton, G as ToolbarButton, K as ToolbarDivider, q as ToolbarGroup, Xe as UnderlineButton, _t as useVoiceRecorder };
2094
+ export { Je as AudioPlayer, V as AudioWaveform, rt as BlockquoteButton, Ye as BoldButton, tt as BulletListButton, et as CodeButton, at as EmojiButton, $e as HighlightButton, Xe as ItalicButton, it as LinkButton, J as MentionButton, nt as OrderedListButton, Tt as RichChatInput, Y as SlashCommandButton, Qe as StrikeButton, G as ToolbarButton, K as ToolbarDivider, q as ToolbarGroup, Ze as UnderlineButton, vt as useVoiceRecorder };