@nivaro/react 0.3.113 → 0.3.115

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 (285) hide show
  1. package/dist/components/ScreenShareHost.js +24 -0
  2. package/dist/full.css +50 -2
  3. package/dist/hooks/useSessionRecorder.js +61 -60
  4. package/dist/index.d.ts +1727 -19
  5. package/dist/index.js +1091 -950
  6. package/dist/shared/components/ActivityEntry.js +209 -97
  7. package/dist/shared/components/AgentPresenceChip.js +51 -0
  8. package/dist/shared/components/AnnouncementBanner.js +56 -41
  9. package/dist/shared/components/AutolinkedText.js +98 -85
  10. package/dist/shared/components/BroadcastView.js +149 -141
  11. package/dist/shared/components/CacheStamp.js +78 -30
  12. package/dist/shared/components/CollectionBrowserView.js +4088 -3592
  13. package/dist/shared/components/ConfigChangeStrip.js +63 -0
  14. package/dist/shared/components/ConfigReachNote.js +107 -0
  15. package/dist/shared/components/ConformanceView.js +389 -319
  16. package/dist/shared/components/DataTable.js +544 -504
  17. package/dist/shared/components/DelegateCoverLine.js +164 -0
  18. package/dist/shared/components/EnvironmentNotice.js +56 -65
  19. package/dist/shared/components/FilePreviewLightbox.js +89 -43
  20. package/dist/shared/components/FindingFixedMark.js +23 -0
  21. package/dist/shared/components/GridPresenceLine.js +100 -0
  22. package/dist/shared/components/IdleReloadWatcher.js +82 -43
  23. package/dist/shared/components/InStep.js +46 -0
  24. package/dist/shared/components/ItemEditForm.js +5504 -4889
  25. package/dist/shared/components/LiveAnnouncer.js +62 -0
  26. package/dist/shared/components/LiveCount.js +54 -0
  27. package/dist/shared/components/LiveFigure.js +28 -0
  28. package/dist/shared/components/LiveListControls.js +114 -0
  29. package/dist/shared/components/LiveNewMatchesPill.js +25 -0
  30. package/dist/shared/components/LiveOffNote.js +44 -0
  31. package/dist/shared/components/LivePreferenceHost.js +42 -0
  32. package/dist/shared/components/LiveRowMark.js +25 -20
  33. package/dist/shared/components/LiveTraceView.js +257 -0
  34. package/dist/shared/components/MapView.js +30 -29
  35. package/dist/shared/components/MatrixEditor.js +497 -462
  36. package/dist/shared/components/MyWorkView.js +346 -272
  37. package/dist/shared/components/NotificationBell.js +215 -201
  38. package/dist/shared/components/PageRenderer.js +636 -599
  39. package/dist/shared/components/PresenceDot.js +21 -0
  40. package/dist/shared/components/ProfileView.js +656 -536
  41. package/dist/shared/components/RealtimeStatusBanner.js +25 -25
  42. package/dist/shared/components/RecentRecordsRail.js +51 -48
  43. package/dist/shared/components/RecordCompare.js +241 -150
  44. package/dist/shared/components/RecordDrilldownSheet.js +66 -64
  45. package/dist/shared/components/RecordGridEditor.js +350 -311
  46. package/dist/shared/components/RecordHoverCard.js +147 -0
  47. package/dist/shared/components/RecordPeekHost.js +111 -0
  48. package/dist/shared/components/RecordReadView.js +414 -412
  49. package/dist/shared/components/RelativeTime.js +16 -0
  50. package/dist/shared/components/ReportView.js +1396 -1304
  51. package/dist/shared/components/ScreenRefreshButton.js +77 -0
  52. package/dist/shared/components/TabCountHost.js +10 -0
  53. package/dist/shared/components/TickerNumber.js +19 -18
  54. package/dist/shared/components/TipLayer.js +70 -58
  55. package/dist/shared/components/WidgetImageMenu.js +59 -0
  56. package/dist/shared/components/WidgetSlot.js +571 -524
  57. package/dist/shared/components/activity/RecordActivityStream.js +317 -0
  58. package/dist/shared/components/bulk/BulkSelectionNotices.js +220 -0
  59. package/dist/shared/components/cbv/approval-changed.js +20 -0
  60. package/dist/shared/components/cbv/changed-by-others.js +251 -0
  61. package/dist/shared/components/cbv/column-totals.js +75 -67
  62. package/dist/shared/components/change-proposals/ChangeProposalsPanel.js +320 -0
  63. package/dist/shared/components/change-proposals/ProposalValue.js +28 -0
  64. package/dist/shared/components/change-proposals/ProposeChangeButton.js +44 -0
  65. package/dist/shared/components/change-proposals/ProposeChangeDialog.js +359 -0
  66. package/dist/shared/components/change-proposals/types.js +4 -0
  67. package/dist/shared/components/chat/ChatPanel.js +1571 -1528
  68. package/dist/shared/components/chat/Composer.js +276 -298
  69. package/dist/shared/components/chat/room-due.js +13 -0
  70. package/dist/shared/components/collections-directory/CollectionRow.js +76 -75
  71. package/dist/shared/components/collections-directory/CollectionsDirectory.js +415 -395
  72. package/dist/shared/components/collections-directory/directory-data.js +75 -63
  73. package/dist/shared/components/imports/ImportConsole.js +159 -155
  74. package/dist/shared/components/imports/ImportDuplicatesNotice.js +46 -31
  75. package/dist/shared/components/integrations/SendStatus.js +202 -0
  76. package/dist/shared/components/integrations/console/IntegrationsConsole.js +45 -36
  77. package/dist/shared/components/integrations/console/ReadyToSendView.js +453 -0
  78. package/dist/shared/components/integrations/console/api.js +161 -117
  79. package/dist/shared/components/integrations/console/tone.js +15 -12
  80. package/dist/shared/components/item-edit/CatalogPickerField.js +1353 -1245
  81. package/dist/shared/components/item-edit/ChangedAfterApprovalBadge.js +162 -0
  82. package/dist/shared/components/item-edit/CloneDialog.js +208 -206
  83. package/dist/shared/components/item-edit/DerivedCauseNote.js +57 -0
  84. package/dist/shared/components/item-edit/DraftRecoveryBanner.js +81 -70
  85. package/dist/shared/components/item-edit/DuplicateNotice.js +169 -101
  86. package/dist/shared/components/item-edit/FieldAffordances.js +294 -385
  87. package/dist/shared/components/item-edit/FieldComments.js +159 -116
  88. package/dist/shared/components/item-edit/FieldPointer.js +132 -0
  89. package/dist/shared/components/item-edit/FieldRenderer.js +277 -273
  90. package/dist/shared/components/item-edit/FieldRow.js +519 -439
  91. package/dist/shared/components/item-edit/FieldSourceBadge.js +88 -0
  92. package/dist/shared/components/item-edit/FilePickerField.js +454 -369
  93. package/dist/shared/components/item-edit/GroupSection.js +618 -567
  94. package/dist/shared/components/item-edit/HeldEditsChip.js +113 -0
  95. package/dist/shared/components/item-edit/InlineTableField.js +2891 -2723
  96. package/dist/shared/components/item-edit/ListNeighborNav.js +79 -0
  97. package/dist/shared/components/item-edit/LiveTraceSheet.js +26 -0
  98. package/dist/shared/components/item-edit/M2MCombobox.js +284 -273
  99. package/dist/shared/components/item-edit/OutboxReviewTray.js +313 -0
  100. package/dist/shared/components/item-edit/PickerBadges.js +52 -0
  101. package/dist/shared/components/item-edit/PlanGrid.js +434 -439
  102. package/dist/shared/components/item-edit/RecalcValue.js +55 -0
  103. package/dist/shared/components/item-edit/RecordChatActions.js +76 -64
  104. package/dist/shared/components/item-edit/RecordChatMentionsChip.js +103 -0
  105. package/dist/shared/components/item-edit/RecordGrantTools.js +87 -86
  106. package/dist/shared/components/item-edit/RecordHelpChip.js +70 -0
  107. package/dist/shared/components/item-edit/RecordLiveSync.js +230 -217
  108. package/dist/shared/components/item-edit/RecordOutbox.js +53 -52
  109. package/dist/shared/components/item-edit/RecordRecapStrip.js +109 -36
  110. package/dist/shared/components/item-edit/RelationCombobox.js +229 -217
  111. package/dist/shared/components/item-edit/RelationGroupedCombobox.js +105 -100
  112. package/dist/shared/components/item-edit/RemoteChangeUi.js +454 -0
  113. package/dist/shared/components/item-edit/RemoteUploads.js +55 -0
  114. package/dist/shared/components/item-edit/RemovedLineNote.js +92 -0
  115. package/dist/shared/components/item-edit/RichTextEditorImpl.js +298 -223
  116. package/dist/shared/components/item-edit/ScheduledChangeChip.js +244 -0
  117. package/dist/shared/components/item-edit/SectionPresence.js +78 -0
  118. package/dist/shared/components/item-edit/SplitLinesButton.js +166 -0
  119. package/dist/shared/components/item-edit/catalog-line-watch.js +94 -0
  120. package/dist/shared/components/item-edit/coedit/collab.js +84 -0
  121. package/dist/shared/components/item-edit/coedit/context.js +24 -0
  122. package/dist/shared/components/item-edit/coedit/cursors.js +103 -0
  123. package/dist/shared/components/item-edit/coedit/safe-link.js +15 -0
  124. package/dist/shared/components/item-edit/coedit/session.js +382 -0
  125. package/dist/shared/components/item-edit/coedit/useCoedit.js +49 -0
  126. package/dist/shared/components/item-edit/file-live.js +77 -0
  127. package/dist/shared/components/item-edit/file-processing.js +87 -0
  128. package/dist/shared/components/item-edit/layout-switch.js +148 -0
  129. package/dist/shared/components/item-edit/live-related.js +23 -0
  130. package/dist/shared/components/item-edit/live-title.js +66 -0
  131. package/dist/shared/components/item-edit/partner-needs.js +142 -0
  132. package/dist/shared/components/item-edit/removed-line.js +58 -0
  133. package/dist/shared/components/item-edit/render-stability.js +70 -59
  134. package/dist/shared/components/layout-editor/ChangeNote.js +36 -34
  135. package/dist/shared/components/layout-editor/CollabParts.js +72 -70
  136. package/dist/shared/components/layout-editor/LayoutEditor.js +306 -303
  137. package/dist/shared/components/list/InlineEdit.js +504 -208
  138. package/dist/shared/components/list/ListViewers.js +81 -0
  139. package/dist/shared/components/merge/MergeRecordsDialog.js +1227 -0
  140. package/dist/shared/components/merge/MergeWithFlow.js +290 -0
  141. package/dist/shared/components/merge/merge-values.js +110 -0
  142. package/dist/shared/components/monitoring/InactiveUserLinksView.js +285 -258
  143. package/dist/shared/components/notifications/NotificationCenterView.js +388 -321
  144. package/dist/shared/components/notifications/NotificationDetailBits.js +205 -130
  145. package/dist/shared/components/notifications/NotificationRulesEditor.js +72 -52
  146. package/dist/shared/components/notifications/bundles.js +21 -19
  147. package/dist/shared/components/notifications/resolved-line.js +25 -0
  148. package/dist/shared/components/ops/OpsTasksView.js +45 -44
  149. package/dist/shared/components/panels/AccessGrantedNote.js +85 -0
  150. package/dist/shared/components/panels/AlertBanners.js +132 -0
  151. package/dist/shared/components/panels/AsyncUserPicker.js +54 -45
  152. package/dist/shared/components/panels/BranchLanes.js +82 -54
  153. package/dist/shared/components/panels/CommentAwareness.js +332 -0
  154. package/dist/shared/components/panels/CommentImages.js +219 -0
  155. package/dist/shared/components/panels/CommentPanel.js +649 -530
  156. package/dist/shared/components/panels/ExternalRequestsChip.js +98 -80
  157. package/dist/shared/components/panels/NewSinceChip.js +16 -0
  158. package/dist/shared/components/panels/OwnerOpenedLine.js +85 -0
  159. package/dist/shared/components/panels/PipelinePanel.js +1644 -1494
  160. package/dist/shared/components/panels/ResubmissionDiff.js +293 -0
  161. package/dist/shared/components/panels/SlaBreachBanner.js +30 -29
  162. package/dist/shared/components/panels/SlaClock.js +130 -99
  163. package/dist/shared/components/panels/TaskPanel.js +308 -287
  164. package/dist/shared/components/panels/unseen-move-check.js +101 -0
  165. package/dist/shared/components/pipeline/OwnerMatrix.js +80 -71
  166. package/dist/shared/components/pipeline/OwnerMatrixSheet.js +495 -0
  167. package/dist/shared/components/pipeline/PipelineEditorView.js +1855 -1771
  168. package/dist/shared/components/profile/AgentNameField.js +141 -0
  169. package/dist/shared/components/profile/AgentsPanel.js +55 -46
  170. package/dist/shared/components/profile/PersonAccess.js +398 -330
  171. package/dist/shared/components/profile/PersonAdminTools.js +127 -113
  172. package/dist/shared/components/profile/PersonProfile.js +81 -73
  173. package/dist/shared/components/profile/SignInTroubleshooter.js +361 -0
  174. package/dist/shared/components/queue/QueueBulkBar.js +101 -84
  175. package/dist/shared/components/queue/QueueItemSheet.js +66 -66
  176. package/dist/shared/components/queue/QueueTeamStrip.js +279 -0
  177. package/dist/shared/components/queue/QueueWorklist.js +2076 -1686
  178. package/dist/shared/components/queue/queue-totals.js +92 -0
  179. package/dist/shared/components/queue/worklist-helpers.js +18 -14
  180. package/dist/shared/components/send-view/SendViewButton.js +136 -0
  181. package/dist/shared/components/send-view/SentViewCards.js +147 -0
  182. package/dist/shared/components/support/ReportProblem.js +1 -0
  183. package/dist/shared/components/support/ScreenShare.js +554 -0
  184. package/dist/shared/components/support/SupportView.js +160 -129
  185. package/dist/shared/components/support/TicketDetailSheet.js +101 -89
  186. package/dist/shared/components/watch-list/WatchDock.js +1044 -0
  187. package/dist/shared/components/watch-list/WatchExtras.js +723 -0
  188. package/dist/shared/components/watch-list/WatchListButton.js +46 -0
  189. package/dist/shared/components/watch-list/WatchPinButton.js +67 -0
  190. package/dist/shared/components/watch-list/WatchRows.js +348 -0
  191. package/dist/shared/lib/activity-sentence.js +87 -75
  192. package/dist/shared/lib/agent-presence.js +46 -0
  193. package/dist/shared/lib/approval-progress.js +49 -0
  194. package/dist/shared/lib/attention-prefs.js +27 -0
  195. package/dist/shared/lib/cell-locks.js +56 -0
  196. package/dist/shared/lib/co-edit.js +166 -0
  197. package/dist/shared/lib/coedit-registry.js +44 -0
  198. package/dist/shared/lib/comment-awareness.js +124 -0
  199. package/dist/shared/lib/comment-images.js +45 -0
  200. package/dist/shared/lib/config-watch.js +94 -0
  201. package/dist/shared/lib/copy-rules.js +65 -0
  202. package/dist/shared/lib/count-step.js +30 -0
  203. package/dist/shared/lib/deadline-ticker.js +68 -0
  204. package/dist/shared/lib/derived-causes.js +115 -0
  205. package/dist/shared/lib/draft-store.js +114 -85
  206. package/dist/shared/lib/error-hints.js +1 -0
  207. package/dist/shared/lib/field-merge.js +126 -0
  208. package/dist/shared/lib/filter-sentence.js +10 -10
  209. package/dist/shared/lib/focus-mode.js +16 -12
  210. package/dist/shared/lib/grid-cursors.js +77 -0
  211. package/dist/shared/lib/grid-presence.js +182 -0
  212. package/dist/shared/lib/idle-reload.js +100 -73
  213. package/dist/shared/lib/in-step.js +45 -0
  214. package/dist/shared/lib/integration-chip.js +19 -18
  215. package/dist/shared/lib/line-locks.js +141 -0
  216. package/dist/shared/lib/line-split.js +41 -0
  217. package/dist/shared/lib/linked-changes.js +150 -0
  218. package/dist/shared/lib/list-link.js +56 -50
  219. package/dist/shared/lib/list-return.js +231 -0
  220. package/dist/shared/lib/list-viewers.js +52 -0
  221. package/dist/shared/lib/live-announcer.js +86 -0
  222. package/dist/shared/lib/live-counts.js +85 -0
  223. package/dist/shared/lib/live-data-changed.js +108 -0
  224. package/dist/shared/lib/live-deltas.js +81 -0
  225. package/dist/shared/lib/live-findings.js +113 -0
  226. package/dist/shared/lib/live-groups.js +122 -0
  227. package/dist/shared/lib/live-link-labels.js +162 -0
  228. package/dist/shared/lib/live-list-flow.js +334 -0
  229. package/dist/shared/lib/live-list.js +143 -129
  230. package/dist/shared/lib/live-moves.js +51 -0
  231. package/dist/shared/lib/live-ops.js +26 -26
  232. package/dist/shared/lib/live-pickers.js +7 -0
  233. package/dist/shared/lib/live-preference.js +184 -0
  234. package/dist/shared/lib/live-queries.js +226 -181
  235. package/dist/shared/lib/live-screen.js +333 -0
  236. package/dist/shared/lib/live-search.js +108 -0
  237. package/dist/shared/lib/live-seen.js +35 -0
  238. package/dist/shared/lib/live-views.js +100 -0
  239. package/dist/shared/lib/live.js +159 -133
  240. package/dist/shared/lib/missed-updates.js +198 -0
  241. package/dist/shared/lib/newer-file.js +56 -0
  242. package/dist/shared/lib/notification-sound.js +42 -20
  243. package/dist/shared/lib/own-writes.js +59 -41
  244. package/dist/shared/lib/picker-badges.js +94 -0
  245. package/dist/shared/lib/presence-signals.js +131 -84
  246. package/dist/shared/lib/realtime.js +49 -24
  247. package/dist/shared/lib/record-gaps.js +85 -0
  248. package/dist/shared/lib/record-outbox.js +369 -222
  249. package/dist/shared/lib/record-peek.js +75 -0
  250. package/dist/shared/lib/record-tabs.js +92 -72
  251. package/dist/shared/lib/relative-ticker.js +42 -0
  252. package/dist/shared/lib/request-gate.js +119 -119
  253. package/dist/shared/lib/rollup-recalc.js +107 -0
  254. package/dist/shared/lib/room-gaps.js +40 -36
  255. package/dist/shared/lib/rum.js +137 -87
  256. package/dist/shared/lib/save-progress.js +20 -0
  257. package/dist/shared/lib/scheduled-countdown.js +67 -0
  258. package/dist/shared/lib/screen-refresh.js +160 -0
  259. package/dist/shared/lib/screen-share.js +234 -0
  260. package/dist/shared/lib/seen-since.js +74 -0
  261. package/dist/shared/lib/selection-watch.js +205 -0
  262. package/dist/shared/lib/send-status.js +132 -0
  263. package/dist/shared/lib/send-view.js +23 -0
  264. package/dist/shared/lib/socket-liveness.js +155 -0
  265. package/dist/shared/lib/socket-realtime.js +168 -140
  266. package/dist/shared/lib/state-census.js +53 -0
  267. package/dist/shared/lib/summary-mode.js +61 -39
  268. package/dist/shared/lib/tab-attention.js +143 -32
  269. package/dist/shared/lib/table-density.js +64 -0
  270. package/dist/shared/lib/track-travel.js +40 -0
  271. package/dist/shared/lib/unseen-changes.js +68 -0
  272. package/dist/shared/lib/upload-file.js +33 -0
  273. package/dist/shared/lib/upload-presence.js +127 -0
  274. package/dist/shared/lib/urgent-chime.js +65 -0
  275. package/dist/shared/lib/use-online-users.js +32 -11
  276. package/dist/shared/lib/user-sync.js +155 -39
  277. package/dist/shared/lib/waiting-count.js +44 -0
  278. package/dist/shared/lib/watch-desktop.js +83 -0
  279. package/dist/shared/lib/watch-list.js +447 -0
  280. package/dist/shared/lib/widget-image-render.js +64 -0
  281. package/dist/shared/lib/widget-image.js +111 -0
  282. package/dist/shared/lib/worker-socket.js +130 -104
  283. package/dist/shared/lib/write-to-screen.js +133 -0
  284. package/package.json +1 -1
  285. package/styles.css +49 -1
@@ -1,327 +1,304 @@
1
1
  import { jsx as r, jsxs as c } from "react/jsx-runtime";
2
- import { useQuery as Te } from "@tanstack/react-query";
3
- import { Quote as et, X as Ae, Paperclip as Fe, Hash as tt, AlertTriangle as st, AlarmClock as nt, Send as rt, Type as at } from "lucide-react";
4
- import { forwardRef as lt, useState as b, useMemo as X, useRef as ce, useImperativeHandle as ot, useEffect as Ee } from "react";
5
- import { toast as U } from "sonner";
6
- import { useNivaroClient as it, useApiFetchConfig as ct, useItemEditAuth as dt } from "../../context.js";
7
- import { get as ut, patch as Re, post as pt } from "../../lib/commands.js";
8
- import { cn as m } from "../../lib/utils.js";
9
- import { Popover as Pe, PopoverTrigger as We, PopoverContent as Oe } from "../ui/popover.js";
10
- import { useChatConfig as ht, useSendChatMessage as mt, useTypingIndicator as ft, useChatBotName as xt, useChatRooms as gt, dmPeer as bt, useUserSearch as kt, chatRoomTypesQuery as yt, getMentionQuery as wt } from "./chat-core.js";
11
- import { useDraftSync as vt } from "./chat-drafts.js";
2
+ import { useQuery as $e } from "@tanstack/react-query";
3
+ import { Quote as Ve, X as Me, Paperclip as Ae, Hash as et, AlertTriangle as tt, AlarmClock as nt, Send as st, Type as rt } from "lucide-react";
4
+ import { forwardRef as at, useState as x, useMemo as Y, useRef as oe, useImperativeHandle as lt, useEffect as Te } from "react";
5
+ import { toast as F } from "sonner";
6
+ import { useNivaroClient as ot, useApiFetchConfig as it, useItemEditAuth as ct } from "../../context.js";
7
+ import { get as dt, patch as Ee, post as ut } from "../../lib/commands.js";
8
+ import { startFileUpload as mt } from "../../lib/upload-file.js";
9
+ import { cn as h } from "../../lib/utils.js";
10
+ import { PresenceDot as ht } from "../PresenceDot.js";
11
+ import { Popover as Pe, PopoverTrigger as We, PopoverContent as Re } from "../ui/popover.js";
12
+ import { useChatConfig as pt, useSendChatMessage as ft, useTypingIndicator as xt, useChatBotName as gt, useChatRooms as bt, dmPeer as kt, useUserSearch as yt, chatRoomTypesQuery as wt, getMentionQuery as vt } from "./chat-core.js";
13
+ import { useDraftSync as _t } from "./chat-drafts.js";
12
14
  import { EmojiButton as Nt } from "./chat-emoji.js";
13
- import { useRoomInfo as _t, useScheduledMessages as St } from "./chat-hooks.js";
14
- import { tsvToTable as Ct } from "./MessageFormat.js";
15
- import { ScreenClipButton as $t, CLIP_POSTER_TAG as Dt, clipTags as Mt } from "./ScreenClip.js";
16
- import { useChatCommands as Tt, filterSlash as At, SlashForm as Ft, SlashMenu as Et, slashQuery as Rt, parseSlashLine as Ut } from "./SlashCommands.js";
17
- const Ue = {
15
+ import { useRoomInfo as St, useScheduledMessages as Ct } from "./chat-hooks.js";
16
+ import { tsvToTable as Dt } from "./MessageFormat.js";
17
+ import { ScreenClipButton as $t, CLIP_POSTER_TAG as Mt, clipTags as At } from "./ScreenClip.js";
18
+ import { useChatCommands as Tt, filterSlash as Et, SlashForm as Ft, SlashMenu as Pt, slashQuery as Wt, parseSlashLine as Rt } from "./SlashCommands.js";
19
+ const Fe = {
18
20
  b: ["**", "**"],
19
21
  i: ["_", "_"],
20
22
  e: ["`", "`"]
21
23
  };
22
- function Pt(D, d) {
23
- const f = D.slice(0, d).match(/(?:^|\s)#([A-Za-z0-9-]{1,30})$/);
24
- return f ? f[1] : null;
24
+ function Ut(C, d) {
25
+ const p = C.slice(0, d).match(/(?:^|\s)#([A-Za-z0-9-]{1,30})$/);
26
+ return p ? p[1] : null;
25
27
  }
26
- const es = lt(function({
28
+ const sn = at(function({
27
29
  room: d,
28
- label: _,
29
- parentId: f = null,
30
- quote: k,
31
- onClearQuote: v,
32
- onSent: Y,
30
+ label: v,
31
+ parentId: p = null,
32
+ quote: g,
33
+ onClearQuote: y,
34
+ onSent: Z,
33
35
  disabledReason: P,
34
- quietNote: de,
35
- compact: je,
36
- th: x,
37
- renderAvatar: He
38
- }, Be) {
39
- var Me;
40
- const W = ht(), M = it(), S = ct(), y = W.me, Le = mt(d), ue = ft(d), T = xt(), { rooms: Z } = gt(), O = _t(d), { create: Ie } = St(!1), [i, p] = b(""), [w, pe] = b(!1);
41
- vt(d, f == null, i, p);
42
- const [h, j] = b(null), [A, H] = b(null), [C, G] = b(0), [B, V] = b(null), [ee, te] = b(null), se = Tt(), L = X(
43
- () => B === null ? [] : At(se, B).slice(0, 8),
44
- [se, B]
45
- ), [F, I] = b([]), [q, ne] = b(null), [he, me] = b(!1), [re, qe] = b(""), ae = ce(/* @__PURE__ */ new Map()), N = ce(null), fe = ce(null), xe = d.startsWith("ch:") && !d.startsWith("ch:grp-"), { isAdmin: Ke } = dt(), $ = ((Me = Z.find((e) => e.room === d)) == null ? void 0 : Me.channel) ?? null, ge = ($ == null ? void 0 : $.mention_policy) ?? "owner", be = Ke || ge === "members" || ge === "owner" && !!y && String(($ == null ? void 0 : $.created_by) ?? "").toUpperCase() === y.id.toUpperCase();
46
- ot(Be, () => ({
36
+ quietNote: ie,
37
+ compact: Ue,
38
+ th: f,
39
+ renderAvatar: je
40
+ }, Oe) {
41
+ var De;
42
+ const W = pt(), D = ot(), R = it(), b = W.me, Be = ft(d), ce = xt(d), $ = gt(), { rooms: G } = bt(), U = St(d), { create: Ie } = Ct(!1), [i, u] = x(""), [k, de] = x(!1);
43
+ _t(d, p == null, i, u);
44
+ const [m, j] = x(null), [M, O] = x(null), [_, J] = x(0), [B, X] = x(null), [V, ee] = x(null), te = Tt(), I = Y(
45
+ () => B === null ? [] : Et(te, B).slice(0, 8),
46
+ [te, B]
47
+ ), [A, L] = x([]), [H, ne] = x(null), [ue, me] = x(!1), [se, Le] = x(""), re = oe(/* @__PURE__ */ new Map()), w = oe(null), he = oe(null), pe = d.startsWith("ch:") && !d.startsWith("ch:grp-"), { isAdmin: He } = ct(), N = ((De = G.find((e) => e.room === d)) == null ? void 0 : De.channel) ?? null, fe = (N == null ? void 0 : N.mention_policy) ?? "owner", xe = He || fe === "members" || fe === "owner" && !!b && String((N == null ? void 0 : N.created_by) ?? "").toUpperCase() === b.id.toUpperCase();
48
+ lt(Oe, () => ({
47
49
  addFiles: (e) => Q(e),
48
50
  focus: () => {
49
51
  var e;
50
- return (e = N.current) == null ? void 0 : e.focus();
52
+ return (e = w.current) == null ? void 0 : e.focus();
51
53
  }
52
- })), Ee(() => {
53
- const e = N.current;
54
+ })), Te(() => {
55
+ const e = w.current;
54
56
  e && (e.style.height = "auto", e.style.height = `${Math.min(e.scrollHeight, 168)}px`);
55
- }, [i]), Ee(() => {
57
+ }, [i]), Te(() => {
56
58
  var e;
57
- k && ((e = N.current) == null || e.focus());
58
- }, [k]);
59
- const ke = X(() => {
59
+ g && ((e = w.current) == null || e.focus());
60
+ }, [g]);
61
+ const ge = Y(() => {
60
62
  const e = [];
61
- if (!y) return e;
62
- for (const t of Z) {
63
+ if (!b) return e;
64
+ for (const t of G) {
63
65
  if (t.kind !== "dm") continue;
64
- const s = bt(t.room, y.id);
65
- s && e.push({ id: s, name: t.label });
66
+ const n = kt(t.room, b.id);
67
+ n && e.push({ id: n, name: t.label });
66
68
  }
67
69
  return e;
68
- }, [Z, y]), { users: ye } = kt(h ?? "", ((h == null ? void 0 : h.length) ?? 0) >= 2), K = X(() => {
69
- if (h === null) return [];
70
- const e = h.toLowerCase(), t = (l) => !!l && l.toLowerCase().split(/\s+/).some((o) => o.startsWith(e)), s = /* @__PURE__ */ new Set([String((y == null ? void 0 : y.id) ?? "").toUpperCase()]), n = [], a = (l) => {
70
+ }, [G, b]), { users: be } = yt(m ?? "", ((m == null ? void 0 : m.length) ?? 0) >= 2), q = Y(() => {
71
+ if (m === null) return [];
72
+ const e = m.toLowerCase(), t = (l) => !!l && l.toLowerCase().split(/\s+/).some((o) => o.startsWith(e)), n = /* @__PURE__ */ new Set([String((b == null ? void 0 : b.id) ?? "").toUpperCase()]), s = [], a = (l) => {
71
73
  const o = l.user_id.toUpperCase();
72
- s.has(o) || (s.add(o), n.push(l));
74
+ n.has(o) || (n.add(o), s.push(l));
73
75
  };
74
- xe && be && ("here".startsWith(e) && n.push({
76
+ pe && xe && ("here".startsWith(e) && s.push({
75
77
  user_id: "__here__",
76
78
  display_name: "here",
77
79
  sub: "Everyone online in this room",
78
80
  kind: "here"
79
- }), "channel".startsWith(e) && n.push({
81
+ }), "channel".startsWith(e) && s.push({
80
82
  user_id: "__channel__",
81
83
  display_name: "channel",
82
84
  sub: "Every member of this room",
83
85
  kind: "channel"
84
- })), T && T.toLowerCase().startsWith(e) && n.push({ user_id: "__bot__", display_name: T, sub: "AI assistant", kind: "bot" });
85
- for (const l of (O == null ? void 0 : O.members) ?? [])
86
+ })), $ && $.toLowerCase().startsWith(e) && s.push({ user_id: "__bot__", display_name: $, sub: "AI assistant", kind: "bot" });
87
+ for (const l of (U == null ? void 0 : U.members) ?? [])
86
88
  t(l.name) && a({ user_id: l.id, display_name: l.name, sub: "In this room", kind: "person" });
87
- for (const l of ke)
89
+ for (const l of ge)
88
90
  t(l.name) && a({ user_id: l.id, display_name: l.name, sub: "You message them", kind: "person" });
89
91
  for (const l of W.onlineUsers)
90
92
  t(l.display_name) && a({ user_id: l.user_id, display_name: l.display_name, sub: "Online", kind: "person" });
91
- for (const l of ye) {
93
+ for (const l of be) {
92
94
  const o = [l.first_name, l.last_name].filter(Boolean).join(" ") || l.email;
93
95
  (t(o) || (l.email ?? "").toLowerCase().startsWith(e)) && a({ user_id: l.id, display_name: o, sub: null, kind: "person" });
94
96
  }
95
- const u = (l) => {
96
- if (l.kind !== "person") return -1;
97
- const o = W.onlineUsers.find(
98
- (R) => String(R.user_id).toUpperCase() === l.user_id.toUpperCase()
99
- );
100
- return o ? o.is_idle ? 1 : 0 : 2;
101
- };
102
- return n.map((l, o) => ({ c: l, i: o, t: u(l) })).sort((l, o) => l.t - o.t || l.i - o.i).map((l) => l.c).slice(0, 8);
103
- }, [h, O, ke, W.onlineUsers, ye, T, xe, be, y]), { data: z } = Te(yt(M)), { data: J = [] } = Te({
104
- queryKey: ["nvr-chat-record-pick", A],
97
+ return s.slice(0, 8);
98
+ }, [m, U, ge, W.onlineUsers, be, $, pe, xe, b]), qe = (e) => {
99
+ const t = W.onlineUsers.find(
100
+ (n) => String(n.user_id).toUpperCase() === e.toUpperCase()
101
+ );
102
+ return t ? t.is_idle ? "idle" : "online" : void 0;
103
+ }, { data: K } = $e(wt(D)), { data: z = [] } = $e({
104
+ queryKey: ["nvr-chat-record-pick", M],
105
105
  queryFn: async () => {
106
106
  const e = [];
107
- for (const t of z ?? [])
107
+ for (const t of K ?? [])
108
108
  try {
109
- const s = await M.request(
110
- ut(`/items/${t.collection}`, {
109
+ const n = await D.request(
110
+ dt(`/items/${t.collection}`, {
111
111
  limit: 5,
112
112
  fields: `id,${t.match_field}`,
113
- filter: JSON.stringify({ [t.match_field]: { _contains: A } }),
113
+ filter: JSON.stringify({ [t.match_field]: { _contains: M } }),
114
114
  sort: "-id"
115
115
  })
116
116
  );
117
- for (const n of s.data ?? []) {
118
- const a = String(n[t.match_field] ?? n.id ?? "");
117
+ for (const s of n.data ?? []) {
118
+ const a = String(s[t.match_field] ?? s.id ?? "");
119
119
  a && e.push({ token: a, label: a, type: t.label ?? t.collection.replace(/_/g, " ") });
120
120
  }
121
121
  } catch {
122
122
  }
123
123
  return e.slice(0, 8);
124
124
  },
125
- enabled: !!A && A.length >= 2 && ((z == null ? void 0 : z.length) ?? 0) > 0,
125
+ enabled: !!M && M.length >= 2 && ((K == null ? void 0 : K.length) ?? 0) > 0,
126
126
  staleTime: 3e4
127
- }), E = B !== null && L.length > 0, we = E || h !== null && K.length > 0 || A !== null && J.length > 0, le = (e, t) => {
128
- const s = N.current, n = (s == null ? void 0 : s.selectionStart) ?? i.length, a = i.slice(0, n).replace(e, t), u = a + i.slice(n);
129
- p(u), requestAnimationFrame(() => {
130
- s == null || s.focus(), s == null || s.setSelectionRange(a.length, a.length);
127
+ }), T = B !== null && I.length > 0, ke = T || m !== null && q.length > 0 || M !== null && z.length > 0, ae = (e, t) => {
128
+ const n = w.current, s = (n == null ? void 0 : n.selectionStart) ?? i.length, a = i.slice(0, s).replace(e, t), l = a + i.slice(s);
129
+ u(l), requestAnimationFrame(() => {
130
+ n == null || n.focus(), n == null || n.setSelectionRange(a.length, a.length);
131
131
  });
132
- }, ve = (e) => {
132
+ }, ye = (e) => {
133
133
  if (e.kind === "here" || e.kind === "channel")
134
- le(/@([^@\n\r]*)$/, `@${e.display_name} `);
134
+ ae(/@([^@\n\r]*)$/, `@${e.display_name} `);
135
135
  else {
136
136
  const t = e.display_name ?? "Unknown";
137
- le(/@([^@\n\r]*)$/, `@[${t}] `), e.kind === "person" && ae.current.set(t, e.user_id);
137
+ ae(/@([^@\n\r]*)$/, `@[${t}] `), e.kind === "person" && re.current.set(t, e.user_id);
138
138
  }
139
139
  j(null);
140
- }, Ne = (e) => {
141
- le(/#([A-Za-z0-9-]{1,30})$/, `${e.token} `), H(null);
140
+ }, we = (e) => {
141
+ ae(/#([A-Za-z0-9-]{1,30})$/, `${e.token} `), O(null);
142
142
  }, Q = (e, t) => {
143
- for (const s of e.slice(0, 10)) {
144
- const n = `${Date.now()}-${Math.random().toString(36).slice(2)}`, a = new XMLHttpRequest(), u = {
145
- key: n,
146
- name: s.name,
147
- type: s.type || null,
148
- progress: 0,
149
- id: null,
150
- xhr: a,
151
- error: null
152
- };
153
- I((o) => [...o, u]);
154
- const g = (o) => I((R) => R.map((ie) => ie.key === n ? { ...ie, ...o } : ie));
155
- a.upload.onprogress = (o) => {
156
- o.lengthComputable && g({ progress: o.loaded / o.total });
157
- }, a.onload = () => {
158
- if (a.status >= 200 && a.status < 300)
159
- try {
160
- const o = JSON.parse(a.responseText).data.id;
161
- t ? t(o).catch(() => null).then(() => g({ id: o, progress: 1, xhr: null })) : g({ id: o, progress: 1, xhr: null });
162
- } catch {
163
- g({ error: "Upload failed", xhr: null });
164
- }
165
- else {
166
- let o = "Upload failed";
167
- try {
168
- o = JSON.parse(a.responseText).error ?? o;
169
- } catch {
170
- }
171
- g({ error: o, xhr: null });
172
- }
173
- }, a.onerror = () => g({ error: "Upload failed", xhr: null }), a.open("POST", `${S.apiBase}/files/upload`);
174
- for (const [o, R] of Object.entries(S.authHeaders)) a.setRequestHeader(o, R);
175
- a.withCredentials = S.credentials === "include";
176
- const l = new FormData();
177
- l.append("file", s), a.send(l);
143
+ for (const n of e.slice(0, 10)) {
144
+ const s = `${Date.now()}-${Math.random().toString(36).slice(2)}`, a = (o) => L((E) => E.map((S) => S.key === s ? { ...S, ...o } : S)), { xhr: l } = mt(R, n, {
145
+ onProgress: (o) => a({ progress: o }),
146
+ onDone: (o) => {
147
+ t ? t(o).catch(() => null).then(() => a({ id: o, progress: 1, xhr: null })) : a({ id: o, progress: 1, xhr: null });
148
+ },
149
+ onError: (o) => a({ error: o, xhr: null })
150
+ });
151
+ L((o) => [
152
+ ...o,
153
+ { key: s, name: n.name, type: n.type || null, progress: 0, id: null, xhr: l, error: null }
154
+ ]);
178
155
  }
179
- }, ze = async (e) => {
156
+ }, Ke = async (e) => {
180
157
  let t = null;
181
158
  if (e.poster)
182
159
  try {
183
- const s = new FormData();
184
- s.append(
160
+ const n = new FormData();
161
+ n.append(
185
162
  "file",
186
163
  new File([e.poster], e.file.name.replace(/\.webm$/, ".png"), { type: "image/png" })
187
164
  );
188
- const n = await fetch(`${S.apiBase}/files/upload`, {
165
+ const s = await fetch(`${R.apiBase}/files/upload`, {
189
166
  method: "POST",
190
- headers: S.authHeaders,
191
- credentials: S.credentials,
192
- body: s
167
+ headers: R.authHeaders,
168
+ credentials: R.credentials,
169
+ body: n
193
170
  });
194
- n.ok && (t = (await n.json()).data.id, M.request(Re(`/files/${t}`, { tags: [Dt], title: "Clip poster" })).catch(() => null));
171
+ s.ok && (t = (await s.json()).data.id, D.request(Ee(`/files/${t}`, { tags: [Mt], title: "Clip poster" })).catch(() => null));
195
172
  } catch {
196
173
  }
197
174
  Q(
198
175
  [e.file],
199
- (s) => M.request(Re(`/files/${s}`, { tags: Mt(t, e.durationMs) })).then(() => {
176
+ (n) => D.request(Ee(`/files/${n}`, { tags: At(t, e.durationMs) })).then(() => {
200
177
  })
201
178
  );
202
- }, Je = (e) => I((t) => {
203
- var s, n;
204
- return (n = (s = t.find((a) => a.key === e)) == null ? void 0 : s.xhr) == null || n.abort(), t.filter((a) => a.key !== e);
205
- }), oe = F.some((e) => !e.id && !e.error), _e = () => {
206
- const e = i.trim(), t = F.filter((n) => n.id).map((n) => n.id), s = [...ae.current.entries()].filter(([n]) => e.includes(`@[${n}]`)).map(([, n]) => n);
207
- return { text: e, attachments: t, mentions: s };
208
- }, Se = () => {
209
- p(""), I([]), pe(!1), j(null), H(null), ne(null), ae.current.clear(), v == null || v(), ue.clearTyping();
210
- }, Ce = (e) => {
211
- V(null), e.builtin ? (te({ kind: e.name, text: "" }), p("")) : (p(`/${e.name} `), requestAnimationFrame(() => {
179
+ }, ze = (e) => L((t) => {
180
+ var n, s;
181
+ return (s = (n = t.find((a) => a.key === e)) == null ? void 0 : n.xhr) == null || s.abort(), t.filter((a) => a.key !== e);
182
+ }), le = A.some((e) => !e.id && !e.error), ve = () => {
183
+ const e = i.trim(), t = A.filter((s) => s.id).map((s) => s.id), n = [...re.current.entries()].filter(([s]) => e.includes(`@[${s}]`)).map(([, s]) => s);
184
+ return { text: e, attachments: t, mentions: n };
185
+ }, _e = () => {
186
+ u(""), L([]), de(!1), j(null), O(null), ne(null), re.current.clear(), y == null || y(), ce.clearTyping();
187
+ }, Ne = (e) => {
188
+ X(null), e.builtin ? (ee({ kind: e.name, text: "" }), u("")) : (u(`/${e.name} `), requestAnimationFrame(() => {
212
189
  var t;
213
- return (t = N.current) == null ? void 0 : t.focus();
190
+ return (t = w.current) == null ? void 0 : t.focus();
214
191
  }));
215
192
  }, Qe = () => {
216
- const e = Ut(i.trim());
193
+ const e = Rt(i.trim());
217
194
  if (!e) return !1;
218
- const t = se.find((s) => s.name === e.name);
219
- return t ? t.builtin ? (te({ kind: e.name, text: e.args }), p(""), !0) : (M.request(
220
- pt(`/chat/commands/${e.name}/run`, { room: d, args: e.args })
221
- ).then((s) => {
222
- var n;
223
- (n = s.data) != null && n.reply && U.message(s.data.reply);
195
+ const t = te.find((n) => n.name === e.name);
196
+ return t ? t.builtin ? (ee({ kind: e.name, text: e.args }), u(""), !0) : (D.request(
197
+ ut(`/chat/commands/${e.name}/run`, { room: d, args: e.args })
198
+ ).then((n) => {
199
+ var s;
200
+ (s = n.data) != null && s.reply && F.message(n.data.reply);
224
201
  }).catch(
225
- (s) => {
226
- var n;
227
- return U.error(((n = s == null ? void 0 : s.response) == null ? void 0 : n.error) ?? "Command failed");
202
+ (n) => {
203
+ var s;
204
+ return F.error(((s = n == null ? void 0 : n.response) == null ? void 0 : s.error) ?? "Command failed");
228
205
  }
229
- ), p(""), !0) : !1;
230
- }, $e = () => {
231
- if (P || oe || Qe()) return;
232
- const { text: e, attachments: t, mentions: s } = _e();
233
- !e && t.length === 0 || (Le.mutate({ text: e, mentions: s, attachments: t, parentId: f, quoteId: (k == null ? void 0 : k.id) ?? null, urgent: w }), Se(), Y == null || Y(e));
234
- }, De = (e) => {
235
- const { text: t, attachments: s } = _e();
236
- if (!t && s.length === 0) {
237
- U.error("Write the message first");
206
+ ), u(""), !0) : !1;
207
+ }, Se = () => {
208
+ if (P || le || Qe()) return;
209
+ const { text: e, attachments: t, mentions: n } = ve();
210
+ !e && t.length === 0 || (Be.mutate({ text: e, mentions: n, attachments: t, parentId: p, quoteId: (g == null ? void 0 : g.id) ?? null, urgent: k }), _e(), Z == null || Z(e));
211
+ }, Ce = (e) => {
212
+ const { text: t, attachments: n } = ve();
213
+ if (!t && n.length === 0) {
214
+ F.error("Write the message first");
238
215
  return;
239
216
  }
240
217
  Ie.mutate(
241
- { room: d, message: t, attachments: s, parent_id: f, send_at: e.toISOString() },
218
+ { room: d, message: t, attachments: n, parent_id: p, send_at: e.toISOString() },
242
219
  {
243
220
  onSuccess: () => {
244
- U.success(
221
+ F.success(
245
222
  `Scheduled for ${e.toLocaleString(void 0, { weekday: "short", month: "short", day: "numeric", hour: "numeric", minute: "2-digit" })}`,
246
223
  { description: "Find it under Scheduled in the chat panel." }
247
- ), Se(), me(!1);
224
+ ), _e(), me(!1);
248
225
  },
249
- onError: (n) => {
226
+ onError: (s) => {
250
227
  var a;
251
- return U.error(
252
- ((a = n == null ? void 0 : n.response) == null ? void 0 : a.error) ?? "Could not schedule it"
228
+ return F.error(
229
+ ((a = s == null ? void 0 : s.response) == null ? void 0 : a.error) ?? "Could not schedule it"
253
230
  );
254
231
  }
255
232
  }
256
233
  );
257
- }, Xe = X(() => {
258
- const e = /* @__PURE__ */ new Date(), t = new Date(e.getTime() + 60 * 6e4), s = new Date(e);
259
- s.setDate(e.getDate() + 1), s.setHours(9, 0, 0, 0);
260
- const n = new Date(e);
261
- return n.setDate(e.getDate() + ((8 - e.getDay()) % 7 || 7)), n.setHours(9, 0, 0, 0), [
234
+ }, Ye = Y(() => {
235
+ const e = /* @__PURE__ */ new Date(), t = new Date(e.getTime() + 60 * 6e4), n = new Date(e);
236
+ n.setDate(e.getDate() + 1), n.setHours(9, 0, 0, 0);
237
+ const s = new Date(e);
238
+ return s.setDate(e.getDate() + ((8 - e.getDay()) % 7 || 7)), s.setHours(9, 0, 0, 0), [
262
239
  { label: "In 1 hour", at: t },
263
- { label: "Tomorrow 9:00 AM", at: s },
264
- { label: "Monday 9:00 AM", at: n }
240
+ { label: "Tomorrow 9:00 AM", at: n },
241
+ { label: "Monday 9:00 AM", at: s }
265
242
  ];
266
- }, [he]), Ye = (e, t) => {
267
- p(e), ue.onType();
268
- const s = wt(e, t);
269
- j(s);
270
- const n = s === null ? Pt(e, t) : null;
271
- H(n);
272
- const a = s === null && n === null ? Rt(e, t) : null;
273
- V(a), (s !== null || n !== null || a !== null) && G(0);
274
- }, Ze = (e) => {
275
- if (we) {
276
- const t = E ? L.length : h !== null ? K.length : J.length;
243
+ }, [ue]), Ze = (e, t) => {
244
+ u(e), ce.onType();
245
+ const n = vt(e, t);
246
+ j(n);
247
+ const s = n === null ? Ut(e, t) : null;
248
+ O(s);
249
+ const a = n === null && s === null ? Wt(e, t) : null;
250
+ X(a), (n !== null || s !== null || a !== null) && J(0);
251
+ }, Ge = (e) => {
252
+ if (ke) {
253
+ const t = T ? I.length : m !== null ? q.length : z.length;
277
254
  if (e.key === "ArrowDown") {
278
- e.preventDefault(), G((s) => (s + 1) % t);
255
+ e.preventDefault(), J((n) => (n + 1) % t);
279
256
  return;
280
257
  }
281
258
  if (e.key === "ArrowUp") {
282
- e.preventDefault(), G((s) => (s - 1 + t) % t);
259
+ e.preventDefault(), J((n) => (n - 1 + t) % t);
283
260
  return;
284
261
  }
285
262
  if (e.key === "Enter" || e.key === "Tab") {
286
- e.preventDefault(), E ? Ce(L[C]) : h !== null ? ve(K[C]) : Ne(J[C]);
263
+ e.preventDefault(), T ? Ne(I[_]) : m !== null ? ye(q[_]) : we(z[_]);
287
264
  return;
288
265
  }
289
266
  if (e.key === "Escape") {
290
- e.preventDefault(), j(null), H(null), V(null);
267
+ e.preventDefault(), j(null), O(null), X(null);
291
268
  return;
292
269
  }
293
270
  }
294
- if ((e.metaKey || e.ctrlKey) && Ue[e.key.toLowerCase()]) {
271
+ if ((e.metaKey || e.ctrlKey) && Fe[e.key.toLowerCase()]) {
295
272
  e.preventDefault();
296
- const [t, s] = Ue[e.key.toLowerCase()], n = e.currentTarget, a = n.selectionStart, u = n.selectionEnd, g = i.slice(0, a) + t + i.slice(a, u) + s + i.slice(u);
297
- p(g), requestAnimationFrame(() => n.setSelectionRange(a + t.length, u + t.length));
273
+ const [t, n] = Fe[e.key.toLowerCase()], s = e.currentTarget, a = s.selectionStart, l = s.selectionEnd, o = i.slice(0, a) + t + i.slice(a, l) + n + i.slice(l);
274
+ u(o), requestAnimationFrame(() => s.setSelectionRange(a + t.length, l + t.length));
298
275
  return;
299
276
  }
300
- e.key === "Enter" && !e.shiftKey && !e.nativeEvent.isComposing && (e.preventDefault(), $e()), e.key === "Escape" && k && (v == null || v());
301
- }, Ge = (e) => {
277
+ e.key === "Enter" && !e.shiftKey && !e.nativeEvent.isComposing && (e.preventDefault(), Se()), e.key === "Escape" && g && (y == null || y());
278
+ }, Je = (e) => {
302
279
  const t = [...e.clipboardData.files];
303
280
  if (t.length > 0) {
304
281
  e.preventDefault(), Q(t);
305
282
  return;
306
283
  }
307
- const s = e.clipboardData.getData("text/plain"), n = s ? Ct(s) : null;
308
- if (n) {
284
+ const n = e.clipboardData.getData("text/plain"), s = n ? Dt(n) : null;
285
+ if (s) {
309
286
  e.preventDefault();
310
- const a = e.currentTarget, u = a.selectionStart, g = a.selectionEnd, l = i.slice(0, u), o = `${l && !l.endsWith(`
287
+ const a = e.currentTarget, l = a.selectionStart, o = a.selectionEnd, E = i.slice(0, l), S = `${E && !E.endsWith(`
311
288
  `) ? `
312
- ` : ""}${n}
289
+ ` : ""}${s}
313
290
  `;
314
- p(l + o + i.slice(g)), ne({ raw: s, table: o });
291
+ u(E + S + i.slice(o)), ne({ raw: n, table: S });
315
292
  }
316
- }, Ve = () => {
317
- q && (p((e) => e.replace(q.table, q.raw)), ne(null));
293
+ }, Xe = () => {
294
+ H && (u((e) => e.replace(H.table, H.raw)), ne(null));
318
295
  };
319
296
  return P ? /* @__PURE__ */ r(
320
297
  "div",
321
298
  {
322
- className: m(
299
+ className: h(
323
300
  "shrink-0 border-t px-3 py-2.5 text-center text-[11.5px] text-slate-500 dark:text-slate-400",
324
- x.divider
301
+ f.divider
325
302
  ),
326
303
  "data-chat-composer-closed": !0,
327
304
  children: P
@@ -329,50 +306,50 @@ const es = lt(function({
329
306
  ) : (
330
307
  // `relative`: the slash-command form (absolute, bottom-full) sits just above the composer.
331
308
  // Unpositioned, it anchored to the room view and opened above the whole panel, off screen.
332
- /* @__PURE__ */ c("div", { className: m("relative shrink-0 border-t", x.divider), "data-chat-composer-wrap": !0, children: [
333
- de && i.trim() && /* @__PURE__ */ r(
309
+ /* @__PURE__ */ c("div", { className: h("relative shrink-0 border-t", f.divider), "data-chat-composer-wrap": !0, children: [
310
+ ie && i.trim() && /* @__PURE__ */ r(
334
311
  "p",
335
312
  {
336
313
  className: "px-3 pt-1.5 text-[11px] text-slate-500 dark:text-slate-400",
337
314
  "data-chat-off-hours-note": !0,
338
- children: de
315
+ children: ie
339
316
  }
340
317
  ),
341
- ee && /* @__PURE__ */ r(
318
+ V && /* @__PURE__ */ r(
342
319
  Ft,
343
320
  {
344
- kind: ee.kind,
321
+ kind: V.kind,
345
322
  room: d,
346
- initialText: ee.text,
347
- parentId: f,
348
- onClose: () => te(null),
349
- th: x
323
+ initialText: V.text,
324
+ parentId: p,
325
+ onClose: () => ee(null),
326
+ th: f
350
327
  }
351
328
  ),
352
- k && /* @__PURE__ */ c("div", { className: "flex items-start gap-2 px-3 pt-2", "data-chat-quote-draft": !0, children: [
353
- /* @__PURE__ */ r(et, { className: "mt-0.5 h-3.5 w-3.5 shrink-0 text-slate-400" }),
329
+ g && /* @__PURE__ */ c("div", { className: "flex items-start gap-2 px-3 pt-2", "data-chat-quote-draft": !0, children: [
330
+ /* @__PURE__ */ r(Ve, { className: "mt-0.5 h-3.5 w-3.5 shrink-0 text-slate-400" }),
354
331
  /* @__PURE__ */ c("div", { className: "min-w-0 flex-1 text-[11.5px]", children: [
355
332
  /* @__PURE__ */ c("span", { className: "font-semibold text-slate-600 dark:text-slate-300", children: [
356
333
  "Quoting ",
357
- k.sender_name ?? "a message"
334
+ g.sender_name ?? "a message"
358
335
  ] }),
359
- /* @__PURE__ */ r("p", { className: "truncate text-slate-500 dark:text-slate-400", children: k.deleted_at ? "Message removed" : k.message || "Attachment" })
336
+ /* @__PURE__ */ r("p", { className: "truncate text-slate-500 dark:text-slate-400", children: g.deleted_at ? "Message removed" : g.message || "Attachment" })
360
337
  ] }),
361
338
  /* @__PURE__ */ r(
362
339
  "button",
363
340
  {
364
341
  type: "button",
365
- onClick: v,
342
+ onClick: y,
366
343
  className: "rounded p-0.5 text-slate-400 hover:text-slate-700 dark:hover:text-slate-100",
367
344
  "aria-label": "Stop quoting",
368
- children: /* @__PURE__ */ r(Ae, { className: "h-3.5 w-3.5" })
345
+ children: /* @__PURE__ */ r(Me, { className: "h-3.5 w-3.5" })
369
346
  }
370
347
  )
371
348
  ] }),
372
- F.length > 0 && /* @__PURE__ */ r("div", { className: "flex flex-wrap items-center gap-1.5 px-3 pt-2", children: F.map((e) => /* @__PURE__ */ c(
349
+ A.length > 0 && /* @__PURE__ */ r("div", { className: "flex flex-wrap items-center gap-1.5 px-3 pt-2", children: A.map((e) => /* @__PURE__ */ c(
373
350
  "span",
374
351
  {
375
- className: m(
352
+ className: h(
376
353
  "relative inline-flex max-w-[200px] items-center gap-1 overflow-hidden rounded-full border px-2 py-0.5 text-[11px]",
377
354
  e.error ? "border-red-300 text-red-700 dark:border-red-500/50 dark:text-red-300" : "border-slate-200 bg-slate-50 text-slate-600 dark:border-border dark:bg-muted dark:text-slate-300"
378
355
  ),
@@ -387,7 +364,7 @@ const es = lt(function({
387
364
  "aria-hidden": !0
388
365
  }
389
366
  ),
390
- /* @__PURE__ */ r(Fe, { className: "relative h-3 w-3 shrink-0 opacity-60" }),
367
+ /* @__PURE__ */ r(Ae, { className: "relative h-3 w-3 shrink-0 opacity-60" }),
391
368
  /* @__PURE__ */ r("span", { className: "relative truncate", children: e.error ? `${e.name} — ${e.error}` : e.name }),
392
369
  !e.id && !e.error && /* @__PURE__ */ c("span", { className: "relative tabular-nums text-slate-500", children: [
393
370
  Math.round(e.progress * 100),
@@ -397,18 +374,18 @@ const es = lt(function({
397
374
  "button",
398
375
  {
399
376
  type: "button",
400
- onClick: () => Je(e.key),
377
+ onClick: () => ze(e.key),
401
378
  className: "relative text-slate-400 hover:text-red-500",
402
379
  "aria-label": e.id || e.error ? `Remove ${e.name}` : `Cancel ${e.name}`,
403
380
  title: e.id || e.error ? "Remove" : "Cancel upload",
404
- children: /* @__PURE__ */ r(Ae, { className: "h-3 w-3" })
381
+ children: /* @__PURE__ */ r(Me, { className: "h-3 w-3" })
405
382
  }
406
383
  )
407
384
  ]
408
385
  },
409
386
  e.key
410
387
  )) }),
411
- q && /* @__PURE__ */ c(
388
+ H && /* @__PURE__ */ c(
412
389
  "p",
413
390
  {
414
391
  className: "px-3 pt-1.5 text-[11px] text-slate-500 dark:text-slate-400",
@@ -420,7 +397,7 @@ const es = lt(function({
420
397
  "button",
421
398
  {
422
399
  type: "button",
423
- onClick: Ve,
400
+ onClick: Xe,
424
401
  className: "font-medium underline underline-offset-2",
425
402
  children: "Paste as plain text instead"
426
403
  }
@@ -431,42 +408,43 @@ const es = lt(function({
431
408
  /* @__PURE__ */ c(
432
409
  "form",
433
410
  {
434
- className: m("relative", je ? "p-2" : "p-2.5"),
411
+ className: h("relative", Ue ? "p-2" : "p-2.5"),
435
412
  onSubmit: (e) => {
436
- e.preventDefault(), $e();
413
+ e.preventDefault(), Se();
437
414
  },
438
415
  "data-chat-composer": !0,
439
416
  children: [
440
- we && /* @__PURE__ */ r(
417
+ ke && /* @__PURE__ */ r(
441
418
  "div",
442
419
  {
443
- className: m(
420
+ className: h(
444
421
  "absolute bottom-full left-2.5 z-20 mb-1 w-[300px] overflow-hidden rounded-xl border shadow-lg",
445
- x.surface,
422
+ f.surface,
446
423
  "border-slate-200 dark:border-border"
447
424
  ),
448
- "data-chat-picker": E ? "slash" : h !== null ? "mention" : "record",
449
- children: E ? /* @__PURE__ */ r(
450
- Et,
425
+ "data-chat-picker": T ? "slash" : m !== null ? "mention" : "record",
426
+ children: T ? /* @__PURE__ */ r(
427
+ Pt,
451
428
  {
452
- entries: L,
453
- index: C,
454
- onPick: Ce,
455
- accentSoft: x.accentSoft
429
+ entries: I,
430
+ index: _,
431
+ onPick: Ne,
432
+ accentSoft: f.accentSoft
456
433
  }
457
- ) : h !== null ? K.map((e, t) => /* @__PURE__ */ c(
434
+ ) : m !== null ? q.map((e, t) => /* @__PURE__ */ c(
458
435
  "button",
459
436
  {
460
437
  type: "button",
461
- onMouseDown: (s) => {
462
- s.preventDefault(), ve(e);
438
+ onMouseDown: (n) => {
439
+ n.preventDefault(), ye(e);
463
440
  },
464
- className: m(
441
+ className: h(
465
442
  "flex w-full items-center gap-2 px-3 py-1.5 text-left text-[12.5px]",
466
- t === C ? x.accentSoft : "text-slate-700 dark:text-slate-200"
443
+ t === _ ? f.accentSoft : "text-slate-700 dark:text-slate-200"
467
444
  ),
468
445
  children: [
469
- e.kind === "person" || e.kind === "bot" ? He(e.user_id, e.display_name) : /* @__PURE__ */ r("span", { className: "flex h-[22px] w-[22px] items-center justify-center rounded-full bg-slate-200 text-[11px] font-bold text-slate-600 dark:bg-muted dark:text-slate-300", children: "@" }),
446
+ e.kind === "person" || e.kind === "bot" ? je(e.user_id, e.display_name) : /* @__PURE__ */ r("span", { className: "flex h-[22px] w-[22px] items-center justify-center rounded-full bg-slate-200 text-[11px] font-bold text-slate-600 dark:bg-muted dark:text-slate-300", children: "@" }),
447
+ e.kind === "person" && /* @__PURE__ */ r(ht, { state: qe(e.user_id) }),
470
448
  /* @__PURE__ */ c("span", { className: "min-w-0 flex-1 truncate", children: [
471
449
  e.kind === "here" || e.kind === "channel" ? `@${e.display_name}` : e.display_name,
472
450
  e.sub && /* @__PURE__ */ r("span", { className: "ml-1.5 text-[11px] text-slate-500 dark:text-slate-400", children: e.sub })
@@ -474,19 +452,19 @@ const es = lt(function({
474
452
  ]
475
453
  },
476
454
  e.user_id
477
- )) : J.map((e, t) => /* @__PURE__ */ c(
455
+ )) : z.map((e, t) => /* @__PURE__ */ c(
478
456
  "button",
479
457
  {
480
458
  type: "button",
481
- onMouseDown: (s) => {
482
- s.preventDefault(), Ne(e);
459
+ onMouseDown: (n) => {
460
+ n.preventDefault(), we(e);
483
461
  },
484
- className: m(
462
+ className: h(
485
463
  "flex w-full items-center gap-2 px-3 py-1.5 text-left text-[12.5px]",
486
- t === C ? x.accentSoft : "text-slate-700 dark:text-slate-200"
464
+ t === _ ? f.accentSoft : "text-slate-700 dark:text-slate-200"
487
465
  ),
488
466
  children: [
489
- /* @__PURE__ */ r(tt, { className: "h-3.5 w-3.5 shrink-0 text-slate-400" }),
467
+ /* @__PURE__ */ r(et, { className: "h-3.5 w-3.5 shrink-0 text-slate-400" }),
490
468
  /* @__PURE__ */ r("span", { className: "min-w-0 flex-1 truncate font-medium", children: e.label }),
491
469
  /* @__PURE__ */ r("span", { className: "shrink-0 text-[10.5px] capitalize text-slate-500 dark:text-slate-400", children: e.type })
492
470
  ]
@@ -498,25 +476,25 @@ const es = lt(function({
498
476
  /* @__PURE__ */ c(
499
477
  "div",
500
478
  {
501
- className: m(
479
+ className: h(
502
480
  "rounded-lg border transition-colors focus-within:border-nvr-cyan",
503
- x.input,
504
- w && "border-red-400 focus-within:border-red-500 dark:border-red-500"
481
+ f.input,
482
+ k && "border-red-400 focus-within:border-red-500 dark:border-red-500"
505
483
  ),
506
484
  "data-chat-composer-box": !0,
507
485
  children: [
508
486
  /* @__PURE__ */ r(
509
487
  "textarea",
510
488
  {
511
- ref: N,
489
+ ref: w,
512
490
  rows: 1,
513
491
  value: i,
514
- onChange: (e) => Ye(e.target.value, e.target.selectionStart ?? e.target.value.length),
515
- onKeyDown: Ze,
516
- onPaste: Ge,
517
- placeholder: f ? "Reply in thread…" : `Message ${_}…`,
492
+ onChange: (e) => Ze(e.target.value, e.target.selectionStart ?? e.target.value.length),
493
+ onKeyDown: Ge,
494
+ onPaste: Je,
495
+ placeholder: p ? "Reply in thread…" : `Message ${v}…`,
518
496
  className: "block min-h-9 w-full resize-none bg-transparent px-3 pb-1 pt-2 text-[12.5px] leading-[19px] outline-none placeholder:text-slate-500 dark:placeholder:text-slate-400",
519
- "aria-label": f ? "Reply in thread" : `Message ${_}`,
497
+ "aria-label": p ? "Reply in thread" : `Message ${v}`,
520
498
  "data-chat-input": !0
521
499
  }
522
500
  ),
@@ -524,7 +502,7 @@ const es = lt(function({
524
502
  /* @__PURE__ */ r(
525
503
  "input",
526
504
  {
527
- ref: fe,
505
+ ref: he,
528
506
  type: "file",
529
507
  multiple: !0,
530
508
  className: "hidden",
@@ -533,18 +511,18 @@ const es = lt(function({
533
511
  }
534
512
  }
535
513
  ),
536
- /* @__PURE__ */ r(Wt, { botName: T }),
514
+ /* @__PURE__ */ r(jt, { botName: $ }),
537
515
  /* @__PURE__ */ r(
538
516
  Nt,
539
517
  {
540
518
  label: "Emoji",
541
519
  className: "flex h-7 w-7 shrink-0 items-center justify-center rounded-md p-0 text-slate-500 hover:bg-slate-200/70 hover:text-slate-700 dark:text-slate-400 dark:hover:bg-white/10 dark:hover:text-slate-100 [&>svg]:h-4 [&>svg]:w-4",
542
520
  onPick: (e) => {
543
- const t = N.current, s = (t == null ? void 0 : t.selectionStart) ?? i.length, n = (t == null ? void 0 : t.selectionEnd) ?? i.length, a = e.startsWith(":") && s > 0 && !/\s$/.test(i.slice(0, s)) ? " " : "";
544
- p(i.slice(0, s) + a + e + i.slice(n)), requestAnimationFrame(() => {
521
+ const t = w.current, n = (t == null ? void 0 : t.selectionStart) ?? i.length, s = (t == null ? void 0 : t.selectionEnd) ?? i.length, a = e.startsWith(":") && n > 0 && !/\s$/.test(i.slice(0, n)) ? " " : "";
522
+ u(i.slice(0, n) + a + e + i.slice(s)), requestAnimationFrame(() => {
545
523
  t == null || t.focus();
546
- const u = s + a.length + e.length;
547
- t == null || t.setSelectionRange(u, u);
524
+ const l = n + a.length + e.length;
525
+ t == null || t.setSelectionRange(l, l);
548
526
  });
549
527
  }
550
528
  }
@@ -555,32 +533,32 @@ const es = lt(function({
555
533
  type: "button",
556
534
  onClick: () => {
557
535
  var e;
558
- return (e = fe.current) == null ? void 0 : e.click();
536
+ return (e = he.current) == null ? void 0 : e.click();
559
537
  },
560
538
  className: "flex h-7 w-7 shrink-0 items-center justify-center rounded-md text-slate-500 transition-colors hover:bg-slate-200/70 hover:text-slate-700 dark:text-slate-400 dark:hover:bg-white/10 dark:hover:text-slate-100",
561
539
  "aria-label": "Attach a file",
562
540
  title: "Attach a file (or paste / drop one)",
563
- children: /* @__PURE__ */ r(Fe, { className: "h-4 w-4", strokeWidth: 2 })
541
+ children: /* @__PURE__ */ r(Ae, { className: "h-4 w-4", strokeWidth: 2 })
564
542
  }
565
543
  ),
566
- /* @__PURE__ */ r($t, { onClip: (e) => void ze(e), disabled: !!P }),
544
+ /* @__PURE__ */ r($t, { onClip: (e) => void Ke(e), disabled: !!P }),
567
545
  /* @__PURE__ */ r(
568
546
  "button",
569
547
  {
570
548
  type: "button",
571
- onClick: () => pe((e) => !e),
572
- className: m(
549
+ onClick: () => de((e) => !e),
550
+ className: h(
573
551
  "flex h-7 w-7 shrink-0 items-center justify-center rounded-md transition-colors",
574
- w ? "bg-red-50 text-red-600 dark:bg-red-500/15 dark:text-red-300" : "text-slate-500 hover:bg-slate-200/70 hover:text-slate-700 dark:text-slate-400 dark:hover:bg-white/10 dark:hover:text-slate-100"
552
+ k ? "bg-red-50 text-red-600 dark:bg-red-500/15 dark:text-red-300" : "text-slate-500 hover:bg-slate-200/70 hover:text-slate-700 dark:text-slate-400 dark:hover:bg-white/10 dark:hover:text-slate-100"
575
553
  ),
576
- "aria-pressed": w,
554
+ "aria-pressed": k,
577
555
  "aria-label": "Mark urgent",
578
- title: w ? "Urgent: reaches people even when they muted the room (5 per hour)" : "Mark urgent — breaks through mute for the people it is addressed to",
579
- "data-chat-urgent-toggle": w ? "on" : "off",
580
- children: /* @__PURE__ */ r(st, { className: "h-4 w-4", strokeWidth: 2 })
556
+ title: k ? "Urgent: reaches people even when they muted the room (5 per hour)" : "Mark urgent — breaks through mute for the people it is addressed to",
557
+ "data-chat-urgent-toggle": k ? "on" : "off",
558
+ children: /* @__PURE__ */ r(tt, { className: "h-4 w-4", strokeWidth: 2 })
581
559
  }
582
560
  ),
583
- /* @__PURE__ */ c(Pe, { open: he, onOpenChange: me, children: [
561
+ /* @__PURE__ */ c(Pe, { open: ue, onOpenChange: me, children: [
584
562
  /* @__PURE__ */ r(We, { asChild: !0, children: /* @__PURE__ */ r(
585
563
  "button",
586
564
  {
@@ -592,13 +570,13 @@ const es = lt(function({
592
570
  children: /* @__PURE__ */ r(nt, { className: "h-4 w-4", strokeWidth: 2 })
593
571
  }
594
572
  ) }),
595
- /* @__PURE__ */ c(Oe, { align: "end", side: "top", className: "w-[240px] p-2", children: [
573
+ /* @__PURE__ */ c(Re, { align: "end", side: "top", className: "w-[240px] p-2", children: [
596
574
  /* @__PURE__ */ r("p", { className: "px-1 pb-1.5 text-[12px] font-semibold text-slate-800 dark:text-slate-100", children: "Send this later" }),
597
- Xe.map((e) => /* @__PURE__ */ r(
575
+ Ye.map((e) => /* @__PURE__ */ r(
598
576
  "button",
599
577
  {
600
578
  type: "button",
601
- onClick: () => De(e.at),
579
+ onClick: () => Ce(e.at),
602
580
  className: "flex w-full items-center rounded-md px-2 py-1.5 text-left text-[12px] text-slate-700 hover:bg-muted dark:text-slate-200",
603
581
  children: e.label
604
582
  },
@@ -609,11 +587,11 @@ const es = lt(function({
609
587
  "input",
610
588
  {
611
589
  type: "datetime-local",
612
- value: re,
613
- onChange: (e) => qe(e.target.value),
614
- className: m(
590
+ value: se,
591
+ onChange: (e) => Le(e.target.value),
592
+ className: h(
615
593
  "h-8 min-w-0 flex-1 rounded-md border px-1.5 text-[11.5px] outline-none",
616
- x.input
594
+ f.input
617
595
  ),
618
596
  "aria-label": "Send at"
619
597
  }
@@ -622,11 +600,11 @@ const es = lt(function({
622
600
  "button",
623
601
  {
624
602
  type: "button",
625
- disabled: !re,
626
- onClick: () => De(new Date(re)),
627
- className: m(
603
+ disabled: !se,
604
+ onClick: () => Ce(new Date(se)),
605
+ className: h(
628
606
  "h-8 rounded-md px-2 text-[11.5px] font-medium disabled:opacity-40",
629
- x.action
607
+ f.action
630
608
  ),
631
609
  children: "Set"
632
610
  }
@@ -638,15 +616,15 @@ const es = lt(function({
638
616
  "button",
639
617
  {
640
618
  type: "submit",
641
- disabled: !i.trim() && !F.some((e) => e.id) || oe,
642
- className: m(
619
+ disabled: !i.trim() && !A.some((e) => e.id) || le,
620
+ className: h(
643
621
  "ml-auto flex h-8 w-8 shrink-0 items-center justify-center rounded-md transition-[filter] hover:brightness-110 disabled:opacity-40",
644
- w ? "bg-red-600 text-white" : x.action
622
+ k ? "bg-red-600 text-white" : f.action
645
623
  ),
646
- "aria-label": w ? "Send urgent" : "Send",
647
- title: oe ? "Waiting for the upload to finish" : void 0,
624
+ "aria-label": k ? "Send urgent" : "Send",
625
+ title: le ? "Waiting for the upload to finish" : void 0,
648
626
  "data-chat-send": !0,
649
- children: /* @__PURE__ */ r(rt, { className: "h-4 w-4", strokeWidth: 2 })
627
+ children: /* @__PURE__ */ r(st, { className: "h-4 w-4", strokeWidth: 2 })
650
628
  }
651
629
  )
652
630
  ] })
@@ -659,10 +637,10 @@ const es = lt(function({
659
637
  ] })
660
638
  );
661
639
  });
662
- function Wt({ botName: D }) {
640
+ function jt({ botName: C }) {
663
641
  const d = [
664
642
  ["@name", "Mention someone"],
665
- ...D ? [[`@${D}`, "Ask the assistant"]] : [],
643
+ ...C ? [[`@${C}`, "Ask the assistant"]] : [],
666
644
  ["**bold**", "Bold (Ctrl/⌘ B)"],
667
645
  ["_italic_", "Italic (Ctrl/⌘ I)"],
668
646
  ["`code`", "Code (Ctrl/⌘ E)"],
@@ -683,18 +661,18 @@ function Wt({ botName: D }) {
683
661
  "aria-label": "Formatting and shortcuts",
684
662
  title: "Formatting, @mentions and # records",
685
663
  "data-chat-format-hint": !0,
686
- children: /* @__PURE__ */ r(at, { className: "h-4 w-4", strokeWidth: 2 })
664
+ children: /* @__PURE__ */ r(rt, { className: "h-4 w-4", strokeWidth: 2 })
687
665
  }
688
666
  ) }),
689
- /* @__PURE__ */ c(Oe, { align: "end", side: "top", className: "w-[260px] p-3", children: [
667
+ /* @__PURE__ */ c(Re, { align: "end", side: "top", className: "w-[260px] p-3", children: [
690
668
  /* @__PURE__ */ r("p", { className: "pb-2 text-[12px] font-semibold text-slate-800 dark:text-slate-100", children: "Writing a message" }),
691
- /* @__PURE__ */ r("dl", { className: "grid grid-cols-[96px_1fr] gap-x-2 gap-y-1 text-[11.5px]", children: d.map(([_, f]) => /* @__PURE__ */ c("div", { className: "contents", children: [
692
- /* @__PURE__ */ r("dt", { children: /* @__PURE__ */ r("code", { className: "rounded bg-slate-100 px-1 text-[11px] dark:bg-muted", children: _ }) }),
693
- /* @__PURE__ */ r("dd", { className: "text-slate-600 dark:text-slate-300", children: f })
694
- ] }, _)) })
669
+ /* @__PURE__ */ r("dl", { className: "grid grid-cols-[96px_1fr] gap-x-2 gap-y-1 text-[11.5px]", children: d.map(([v, p]) => /* @__PURE__ */ c("div", { className: "contents", children: [
670
+ /* @__PURE__ */ r("dt", { children: /* @__PURE__ */ r("code", { className: "rounded bg-slate-100 px-1 text-[11px] dark:bg-muted", children: v }) }),
671
+ /* @__PURE__ */ r("dd", { className: "text-slate-600 dark:text-slate-300", children: p })
672
+ ] }, v)) })
695
673
  ] })
696
674
  ] });
697
675
  }
698
676
  export {
699
- es as ChatComposer
677
+ sn as ChatComposer
700
678
  };