@hanzo/dev 4.1.0 → 4.2.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 (122) hide show
  1. package/dist/{BinaryViewer-CmFUK4zZ.js → BinaryViewer-BCDMNW2g.js} +19 -19
  2. package/dist/{ChatMarkdown-nvEI7iCv.js → ChatMarkdown-BUidXqSs.js} +2460 -2460
  3. package/dist/{DevicePanel-v5e3sEIf.js → DevicePanel-D-pksK3r.js} +532 -532
  4. package/dist/{DeviceStreamView-CCIfmbxH.js → DeviceStreamView-DsCoOzDV.js} +377 -377
  5. package/dist/{DiffCommentAnnotation-BPTN_2a6.js → DiffCommentAnnotation-2HD5qiyt.js} +227 -227
  6. package/dist/{DiffFileTree-B_br90vY.js → DiffFileTree-CuWvI5hS.js} +13 -13
  7. package/dist/{DiffPanel-V5R5TPuK.js → DiffPanel-Z2QVmBzu.js} +328 -328
  8. package/dist/{DiffWorkerPoolProvider-BwFR-Fc9.js → DiffWorkerPoolProvider-CEfiCIGR.js} +3 -3
  9. package/dist/{DocumentPages-VSn83vty.js → DocumentPages-glImt2JO.js} +3 -3
  10. package/dist/{ExpandedImageDialog-CAorLacL.js → ExpandedImageDialog-iqO3LiIj.js} +404 -404
  11. package/dist/{FileExplorerPane-CeHulcPz.js → FileExplorerPane-GwnRmXEh.js} +4 -4
  12. package/dist/{FilePreviewPanel-BVNLvWOc.js → FilePreviewPanel-CXWpTlfI.js} +1089 -1089
  13. package/dist/{FontFilePreview-Dj8Blcay.js → FontFilePreview-CDydHOXg.js} +2 -2
  14. package/dist/{FontViewer-CLDdwhSr.js → FontViewer-DDt9C5Cb.js} +5 -5
  15. package/dist/{HanzoConnectAccountPages-BEzYfu2l.js → HanzoConnectAccountPages-_sfrtw9j.js} +357 -357
  16. package/dist/{HanzoConnectSidebarSignIn-BhD6-Up5.js → HanzoConnectSidebarSignIn-coFQvyRw.js} +3 -3
  17. package/dist/{Icons-CvSmt8vD.js → Icons-CdegMw5l.js} +1 -1
  18. package/dist/{LargeTextViewer-DfFnYGCw.js → LargeTextViewer-D3RklYQB.js} +8 -8
  19. package/dist/{MermaidDiagram-CTolIzQD.js → MermaidDiagram-sVLnox7j.js} +8 -8
  20. package/dist/{MermaidFilePreview-CP2zP4FU.js → MermaidFilePreview-BmPdNxW5.js} +2 -2
  21. package/dist/{MermaidViewer-BDfYkS9E.js → MermaidViewer-BlKTevTF.js} +3 -3
  22. package/dist/{NotebookPreview-Cybs5uM0.js → NotebookPreview-C0gSEyeO.js} +10 -10
  23. package/dist/{OfficeFilePreview-7JsmSoKU.js → OfficeFilePreview-Ago_DWEt.js} +2 -2
  24. package/dist/{OfficeViewer-CJoojlJK.js → OfficeViewer-DBRqtLet.js} +10 -10
  25. package/dist/{OpenInPicker-BIMWUxBP.js → OpenInPicker-DD_h7VLv.js} +287 -287
  26. package/dist/{OpenXmlOfficeViewer-C24Kj8DM.js → OpenXmlOfficeViewer-B4dxjpba.js} +4 -4
  27. package/dist/{PdfViewer-Cf1iD759.js → PdfViewer-BanXvPmz.js} +16 -16
  28. package/dist/{PreviewFaviconIcon-zFOuzIxe.js → PreviewFaviconIcon-BwYKB-3e.js} +892 -892
  29. package/dist/{PreviewImage-oY5YnuTr.js → PreviewImage-6UU-M6_B.js} +3 -3
  30. package/dist/{PreviewImageContent-n6eLzY99.js → PreviewImageContent-D-00K-A9.js} +3 -3
  31. package/dist/{PreviewPanel-Bo4Lt02m.js → PreviewPanel-CiuHdDv8.js} +489 -489
  32. package/dist/{PreviewPanelShell-DhXLeN5j.js → PreviewPanelShell-Dezxjg0T.js} +71 -71
  33. package/dist/{ProjectIconPickerDialog-D0kFzt8f.js → ProjectIconPickerDialog-LomrzROv.js} +29 -29
  34. package/dist/{ProjectMonogram-D35xrrXQ.js → ProjectMonogram-D21--FQY.js} +1 -1
  35. package/dist/{ProviderAuthTerminal-DfsXnu7A.js → ProviderAuthTerminal-pQXIfodT.js} +3 -3
  36. package/dist/{PullRequestCodeTab-Dv_0kVad.js → PullRequestCodeTab-Cqfh5eN2.js} +476 -476
  37. package/dist/{PullRequestReviewAnnotation-LeuwO-iH.js → PullRequestReviewAnnotation-B4Lp8Ktf.js} +334 -334
  38. package/dist/{ReadOnlySourcePreview-D__IA5g1.js → ReadOnlySourcePreview-7xXUUySV.js} +5 -5
  39. package/dist/{RelativeTime-BMRprQS8.js → RelativeTime-B_yprjav.js} +2 -2
  40. package/dist/{RightPanelResizeHandle-BLbSz-gk.js → RightPanelResizeHandle-PumvYb9P.js} +2 -2
  41. package/dist/{ThemeEditorPanel-CUDdsRsE.js → ThemeEditorPanel-BmXXpaCI.js} +196 -196
  42. package/dist/{ThreadTerminalDrawer-BF3Ix0q_.js → ThreadTerminalDrawer-DCgE3ojz.js} +461 -461
  43. package/dist/{VirtualTablePreview-dajviAfu.js → VirtualTablePreview-mA6DOFwb.js} +1 -1
  44. package/dist/{anchoredCopyToast-DnUtg1n_.js → anchoredCopyToast-BVa_dlBU.js} +2 -2
  45. package/dist/{assetUrls-DkY7vXfM.js → assetUrls-D8lRk7Xd.js} +45 -45
  46. package/dist/{browserLinkTarget-CA46wnQC.js → browserLinkTarget-BbVlDQYx.js} +18 -18
  47. package/dist/builder/api/git.d.ts +32 -4
  48. package/dist/builder/api/git.js +74 -4
  49. package/dist/builder/api/github.d.ts +54 -0
  50. package/dist/builder/api/github.js +103 -1
  51. package/dist/builder/api/models.d.ts +2 -0
  52. package/dist/builder/api/models.js +6 -1
  53. package/dist/builder/api/sandbox.d.ts +2 -0
  54. package/dist/builder/api/sandbox.js +3 -1
  55. package/dist/builder/desk.d.ts +6 -0
  56. package/dist/builder/desk.js +79 -14
  57. package/dist/builder/forge.js +79 -10
  58. package/dist/builder/github-sync.d.ts +70 -0
  59. package/dist/builder/github-sync.js +435 -0
  60. package/dist/builder/mind.d.ts +5 -5
  61. package/dist/builder/mind.js +35 -14
  62. package/dist/builder/pane.d.ts +1 -1
  63. package/dist/builder/pane.js +1 -1
  64. package/dist/builder/panel.js +5 -5
  65. package/dist/builder/preview-fallback.d.ts +47 -0
  66. package/dist/builder/preview-fallback.js +341 -0
  67. package/dist/builder/project.js +17 -4
  68. package/dist/builder/sync.js +27 -4
  69. package/dist/{changedFileKind-D6QYvIez.js → changedFileKind-DrjqPCpz.js} +5 -5
  70. package/dist/{collapsible-DFT41MdC.js → collapsible-CDT6JKbk.js} +1 -1
  71. package/dist/{color-picker-CshqBbpY.js → color-picker-kSVcH92L.js} +16 -16
  72. package/dist/core.js +1 -1
  73. package/dist/{decodeImagePreview-DnfFEjhw.js → decodeImagePreview-ZtWU3urU.js} +2 -2
  74. package/dist/{delimitedPreview-BiEpdYOj.js → delimitedPreview-DbbXcqOT.js} +1 -1
  75. package/dist/{dialog-DhQtWGRa.js → dialog-EmpqFZiK.js} +40 -40
  76. package/dist/{embed-c030vUqM.js → embed-CPWZKyIW.js} +36098 -35677
  77. package/dist/{empty-Bm5EzcG8.js → empty-ChM6gdzn.js} +1 -1
  78. package/dist/{errors-DrFQSJW3.js → errors-D8_Zn8KN.js} +2 -2
  79. package/dist/{fileContextMenu-BBo91omq.js → fileContextMenu-DW94DZj4.js} +54 -54
  80. package/dist/{fileExplorerLabel-AikEChiS.js → fileExplorerLabel-Cfz-3q1U.js} +507 -507
  81. package/dist/{fileSurfaceChrome-Cqkvn8RQ.js → fileSurfaceChrome-BDyKklTq.js} +26 -26
  82. package/dist/{hanzoWebAnalytics-CCxpTzcI.js → hanzoWebAnalytics-B1eETW-7.js} +1 -1
  83. package/dist/index.css +1 -1
  84. package/dist/{input-group-DEJEuwc9.js → input-group-BZ_QN-y7.js} +1 -1
  85. package/dist/{keybindings-C5tK_GAk.js → keybindings-D0pBlT1k.js} +7812 -7806
  86. package/dist/keymap.js +1 -1
  87. package/dist/{lucideIconByName-DUaXKH0V.js → lucideIconByName-CXY44V8P.js} +6835 -6848
  88. package/dist/{mediaReference-Bt_mh-ag.js → mediaReference-3wc4ZfY8.js} +95 -95
  89. package/dist/mediaSource-jW5c7b4r.js +70 -0
  90. package/dist/{modelPickerVisibility-Jue3CLfc.js → modelPickerVisibility-DBTc5r1G.js} +1 -1
  91. package/dist/{network-BbwqRm8c.js → network-wuXD7-is.js} +1 -1
  92. package/dist/{popover-anNQdce7.js → popover-BAyP2Tdr.js} +1 -1
  93. package/dist/{presentation-D9mVPBHm.js → presentation-68y8EAuH.js} +299 -299
  94. package/dist/{previewFailureMessages-BKpsSGX5.js → previewFailureMessages-CFguipaK.js} +3 -3
  95. package/dist/query-BPk2W3QN.js +63 -0
  96. package/dist/{readBinaryPreview-BAQ4fFjm.js → readBinaryPreview-CjZdBNVR.js} +2 -2
  97. package/dist/{refresh-icon-BYx64to1.js → refresh-icon-Vo5ImiQL.js} +1 -1
  98. package/dist/{scroll-area-ChvX8uOh.js → scroll-area-CEoyjC7h.js} +1 -1
  99. package/dist/{select-DumYjny_.js → select-DLFnkZsI.js} +2 -2
  100. package/dist/{session-_kmiSv2A.js → session-Decc4Fo5.js} +1063 -1063
  101. package/dist/{skeleton-CJqwfMSF.js → skeleton-BOKpAZv6.js} +1 -1
  102. package/dist/{switch-COwevwaq.js → switch-DjpPjtQN.js} +2 -2
  103. package/dist/{themePalette-Dl_7omVL.js → themePalette-C-GtwwqV.js} +977 -977
  104. package/dist/{threadSearch-BHyWwcV3.js → threadSearch-CrtCof6n.js} +162 -162
  105. package/dist/{toggle-CEO6qTxB.js → toggle-B4F0EEtI.js} +1 -1
  106. package/dist/{toggle-group-BHovdMDl.js → toggle-group-l8hRPswr.js} +2 -2
  107. package/dist/{use-atom-command-ByoYq_K6.js → use-atom-command-XemtT1Gv.js} +1 -1
  108. package/dist/{useAriaLabelledBy-DPSISlnL.js → useAriaLabelledBy-CibvSz-b.js} +1 -1
  109. package/dist/{useFileMetadata-e7zsixVX.js → useFileMetadata-PesehDX0.js} +33 -33
  110. package/dist/{useFloatingRootContext-CJ9stHca.js → useFloatingRootContext-ppoGvqar.js} +1 -1
  111. package/dist/{useLiveRefresh-BkKJKXhH.js → useLiveRefresh-aHkPuz6N.js} +172 -172
  112. package/dist/{useNextRenderData-CyUmSAgz.js → useNextRenderData-CNhjWfP0.js} +1 -1
  113. package/dist/{useSettings-DYG9Dmro.js → useSettings-B_MtcTyD.js} +139 -139
  114. package/dist/{useTextFieldSpeech-COa9XcRx.js → useTextFieldSpeech-B1wCgLPO.js} +1404 -1404
  115. package/dist/{useTheme-D2ZM1gvV.js → useTheme-WlXpQRKG.js} +4 -4
  116. package/dist/{utils-515nQ17G.js → utils-DtKQl-D3.js} +6184 -6172
  117. package/dist/{wizard-i86ViMRc.js → wizard-DjD4UNew.js} +3 -3
  118. package/dist/{workspaceFocus-BV1_9KiH.js → workspaceFocus-MR1plm6A.js} +144 -144
  119. package/dist/{zap-e0OsRjBR.js → zap-iwsUKtvA.js} +30 -17
  120. package/package.json +1 -1
  121. package/dist/mediaSource-zI7JWid4.js +0 -70
  122. package/dist/query-BxrrBAp6.js +0 -63
@@ -1,33 +1,33 @@
1
- import { a as e, t } from "./session-_kmiSv2A.js";
1
+ import { a as e, t } from "./session-Decc4Fo5.js";
2
2
  import { c as n, n as r } from "./messages-yqmY7G5x.js";
3
- import { Gc as i, Gh as a, Lc as o, Rc as s, S_ as c, Tf as l, Tr as u, Uc as d, Xh as f, Zh as p, bg as m, ci as h, gg as g, gr as _, hr as v, nc as y, sg as b, t as x, vg as S, wf as C, xr as w, y_ as T, yr as E } from "./utils-515nQ17G.js";
4
- import { Bo as D } from "./keybindings-C5tK_GAk.js";
5
- import { Kt as O, Y as k } from "./themePalette-Dl_7omVL.js";
6
- import { n as A } from "./mediaReference-Bt_mh-ag.js";
7
- import { u as j } from "./network-BbwqRm8c.js";
3
+ import { C_ as i, Ef as a, Gc as o, Kh as s, Lc as c, Qh as l, Rc as u, Tf as d, Tr as f, Uc as p, Zh as m, _g as h, b_ as g, cg as _, ci as v, gr as y, hr as b, nc as x, t as S, xg as C, xr as w, yg as T, yr as E } from "./utils-DtKQl-D3.js";
4
+ import { Bo as D } from "./keybindings-D0pBlT1k.js";
5
+ import { Kt as O, Y as k } from "./themePalette-C-GtwwqV.js";
6
+ import { n as A } from "./mediaReference-3wc4ZfY8.js";
7
+ import { u as j } from "./network-wuXD7-is.js";
8
8
  import { s as M } from "./imageCompression-BVPdiGdq.js";
9
9
  import { a as N, i as ee } from "./search-3oqTSaO6.js";
10
10
  import { n as te, t as P } from "./external-link-BJbZG79p.js";
11
11
  import { t as ne } from "./chevron-left-CVxU9FkT.js";
12
- import { r as F, t as re } from "./triangle-alert-CpJvcOXh.js";
13
- import { n as ie, r as I, t as ae } from "./text-align-start-DgfaKVRZ.js";
14
- import { t as L } from "./play-BBxMGK9-.js";
15
- import { t as R } from "./rotate-cw-KPG5A_wN.js";
16
- import { a as z, i as B, o as V, t as H } from "./popover-anNQdce7.js";
17
- import "./errors-DrFQSJW3.js";
18
- import { C as U, T as W, s as G } from "./presentation-D9mVPBHm.js";
19
- import { n as oe } from "./contextMenuFallback-BXyyYmm-.js";
20
- import { t as K } from "./toastHelpers-BzWu4Odu.js";
21
- import { f as q } from "./useTheme-D2ZM1gvV.js";
22
- import { i as J, n as se, t as Y } from "./assetUrls-DkY7vXfM.js";
23
- import { n as ce } from "./query-BxrrBAp6.js";
24
- import { t as le } from "./mediaSource-zI7JWid4.js";
12
+ import { r as F, t as I } from "./triangle-alert-CpJvcOXh.js";
13
+ import { n as re, r as L, t as ie } from "./text-align-start-DgfaKVRZ.js";
14
+ import { t as R } from "./play-BBxMGK9-.js";
15
+ import { t as z } from "./rotate-cw-KPG5A_wN.js";
16
+ import { a as B, i as V, o as H, t as U } from "./popover-BAyP2Tdr.js";
17
+ import "./errors-D8_Zn8KN.js";
18
+ import { C as W, T as G, s as K } from "./presentation-68y8EAuH.js";
19
+ import { n as ae } from "./contextMenuFallback-BXyyYmm-.js";
20
+ import { t as q } from "./toastHelpers-BzWu4Odu.js";
21
+ import { f as J } from "./useTheme-WlXpQRKG.js";
22
+ import { i as Y, n as oe, t as se } from "./assetUrls-D8lRk7Xd.js";
23
+ import { n as ce } from "./query-BPk2W3QN.js";
24
+ import { t as le } from "./mediaSource-jW5c7b4r.js";
25
25
  import { t as ue } from "./observeIntersection-C0N8P8-O.js";
26
- import { d as de, n as fe, u as pe } from "./dialog-DhQtWGRa.js";
26
+ import { d as de, n as fe, u as pe } from "./dialog-EmpqFZiK.js";
27
27
  import { t as me } from "./useMediaQuery-9k_QsMWI.js";
28
28
  import { c as he } from "./diffRendering-tvIuzFsP.js";
29
29
  import { n as ge } from "./syntaxHighlighting-CqVs1cUM.js";
30
- import { n as _e, r as ve, t as ye } from "./anchoredCopyToast-DnUtg1n_.js";
30
+ import { n as _e, r as ve, t as ye } from "./anchoredCopyToast-BVa_dlBU.js";
31
31
  import { n as be } from "./embeddedScripts-D2n11OVj.js";
32
32
  import { Component as xe, Suspense as Se, createContext as Ce, memo as we, use as Te, useEffect as Ee, useImperativeHandle as De, useRef as Oe, useState as X, useSyncExternalStore as ke } from "react";
33
33
  import { c as Z } from "react/compiler-runtime";
@@ -199,8 +199,8 @@ async function Qe(e) {
199
199
  resolvedFilePath: e.resolvedFilePath
200
200
  });
201
201
  if (t === null) return null;
202
- let { kind: i, name: a, reference: o } = t, s = o?.kind === "file" ? o.relativePath : void 0, c, u;
203
- if (t.access === "direct") c = Ge(t.uri);
202
+ let { kind: i, name: o, reference: s } = t, c = s?.kind === "file" ? s.relativePath : void 0, l, u;
203
+ if (t.access === "direct") l = Ge(t.uri);
204
204
  else {
205
205
  if (t.access === "unavailable" || !e.threadRef || !e.httpBaseUrl) throw Error(r(n("Reconnect to this environment and open the media again.")));
206
206
  u = {
@@ -211,15 +211,15 @@ async function Qe(e) {
211
211
  environmentId: u.environmentId,
212
212
  input: { resource: u.resource }
213
213
  });
214
- if (i._tag === "Failure") throw l(i);
215
- let a = O(e.httpBaseUrl, i.value.relativeUrl);
216
- if (a === null) throw Error(r(n("The environment returned an invalid media URL.")));
217
- c = a + t.srcFragment;
214
+ if (i._tag === "Failure") throw a(i);
215
+ let o = O(e.httpBaseUrl, i.value.relativeUrl);
216
+ if (o === null) throw Error(r(n("The environment returned an invalid media URL.")));
217
+ l = o + t.srcFragment;
218
218
  }
219
219
  return {
220
220
  images: [{
221
- src: c,
222
- name: a,
221
+ src: l,
222
+ name: o,
223
223
  ...i === "video" ? {
224
224
  type: "video",
225
225
  autoPlay: !1
@@ -228,11 +228,11 @@ async function Qe(e) {
228
228
  ...t.srcFragment ? { srcFragment: t.srcFragment } : {},
229
229
  actionsSource: {
230
230
  kind: i,
231
- name: a,
232
- src: c,
233
- ...o ? { reference: o } : {},
231
+ name: o,
232
+ src: l,
233
+ ...s ? { reference: s } : {},
234
234
  ...u ? { asset: u } : {},
235
- ...s && e.onOpenFile ? { onOpenFile: () => e.onOpenFile?.(s) } : {}
235
+ ...c && e.onOpenFile ? { onOpenFile: () => e.onOpenFile?.(c) } : {}
236
236
  }
237
237
  }],
238
238
  index: 0
@@ -245,12 +245,12 @@ function $e(e, t) {
245
245
  _tag: "attachment",
246
246
  attachmentId: t.id,
247
247
  fileName: t.name,
248
- mimeType: i(t) ?? t.mimeType
248
+ mimeType: o(t) ?? t.mimeType
249
249
  }
250
250
  };
251
251
  }
252
252
  function et(e, t) {
253
- if (!d(t)) return null;
253
+ if (!p(t)) return null;
254
254
  let n = t.previewUrl ?? null, r = t.downloadable === !1 ? void 0 : $e(e, t);
255
255
  return n === null && r === void 0 ? null : {
256
256
  images: [{
@@ -277,7 +277,7 @@ function nt(e, t) {
277
277
  }
278
278
  function rt(e, t, n) {
279
279
  let r = e.find((e) => e.id === t);
280
- if (r?.type === "file" && r.file && d(r)) return {
280
+ if (r?.type === "file" && r.file && p(r)) return {
281
281
  images: [{
282
282
  src: URL.createObjectURL(r.file),
283
283
  name: r.name,
@@ -309,7 +309,7 @@ function rt(e, t, n) {
309
309
  };
310
310
  }
311
311
  // src/components/media/AttachmentImage.tsx
312
- var it = () => import("./decodeImagePreview-DnfFEjhw.js");
312
+ var it = () => import("./decodeImagePreview-ZtWU3urU.js");
313
313
  function at(e) {
314
314
  let t = Z(12), n, r, i;
315
315
  t[0] === e ? (n = t[1], r = t[2], i = t[3]) : ({name: r, mimeType: n, ...i} = e, t[0] = e, t[1] = n, t[2] = r, t[3] = i);
@@ -398,41 +398,41 @@ function _t(e) {
398
398
  }
399
399
  // src/components/media/OpenMediaLink.tsx
400
400
  function vt(e) {
401
- let t = Z(19), n = c(), r = Ue(e.originalUrl) === null ? void 0 : e.originalUrl, i = r ?? e.src;
402
- if (!i) return null;
403
- let a, o, s;
404
- if (t[0] !== i) {
405
- o = Symbol.for("react.early_return_sentinel");
401
+ let t = Z(19), n = i(), r = Ue(e.originalUrl) === null ? void 0 : e.originalUrl, a = r ?? e.src;
402
+ if (!a) return null;
403
+ let o, s, c;
404
+ if (t[0] !== a) {
405
+ s = Symbol.for("react.early_return_sentinel");
406
406
  bb0: {
407
- s = Ge(i);
407
+ c = Ge(a);
408
408
  try {
409
- let e = new URL(s).protocol;
409
+ let e = new URL(c).protocol;
410
410
  if (e !== "http:" && e !== "https:" && e !== "blob:") {
411
- o = null;
411
+ s = null;
412
412
  break bb0;
413
413
  }
414
- a = e === "blob:";
414
+ o = e === "blob:";
415
415
  } catch {
416
- o = null;
416
+ s = null;
417
417
  break bb0;
418
418
  }
419
419
  }
420
- t[0] = i, t[1] = a, t[2] = o, t[3] = s;
421
- } else a = t[1], o = t[2], s = t[3];
422
- if (o !== Symbol.for("react.early_return_sentinel")) return o;
423
- let l = a ? void 0 : "_blank", u = a ? e.fileName || !0 : void 0, d;
424
- t[4] !== l || t[5] !== u || t[6] !== s ? (d = /* @__PURE__ */ Q("a", {
425
- href: s,
420
+ t[0] = a, t[1] = o, t[2] = s, t[3] = c;
421
+ } else o = t[1], s = t[2], c = t[3];
422
+ if (s !== Symbol.for("react.early_return_sentinel")) return s;
423
+ let l = o ? void 0 : "_blank", u = o ? e.fileName || !0 : void 0, d;
424
+ t[4] !== l || t[5] !== u || t[6] !== c ? (d = /* @__PURE__ */ Q("a", {
425
+ href: c,
426
426
  target: l,
427
427
  download: u,
428
428
  rel: "noopener noreferrer"
429
- }), t[4] = l, t[5] = u, t[6] = s, t[7] = d) : d = t[7];
429
+ }), t[4] = l, t[5] = u, t[6] = c, t[7] = d) : d = t[7];
430
430
  let f;
431
- t[8] === a ? f = t[9] : (f = Q(a ? I : P, {}), t[8] = a, t[9] = f);
431
+ t[8] === o ? f = t[9] : (f = Q(o ? L : P, {}), t[8] = o, t[9] = f);
432
432
  let p;
433
- t[10] !== n || t[11] !== a || t[12] !== r ? (p = n(r ? "Open original" : a ? "Download video" : "Open in browser"), t[10] = n, t[11] = a, t[12] = r, t[13] = p) : p = t[13];
433
+ t[10] !== n || t[11] !== o || t[12] !== r ? (p = n(r ? "Open original" : o ? "Download video" : "Open in browser"), t[10] = n, t[11] = o, t[12] = r, t[13] = p) : p = t[13];
434
434
  let m;
435
- return t[14] !== e.className || t[15] !== d || t[16] !== f || t[17] !== p ? (m = /* @__PURE__ */ $(h, {
435
+ return t[14] !== e.className || t[15] !== d || t[16] !== f || t[17] !== p ? (m = /* @__PURE__ */ $(v, {
436
436
  size: "sm",
437
437
  variant: "secondary",
438
438
  className: e.className,
@@ -449,95 +449,95 @@ function bt(e) {
449
449
  }
450
450
  function xt(e) {
451
451
  if (e === null) return !0;
452
- let n = y.get(t.sessionStateAtom(e));
453
- return n._tag !== "Failure" && bt(g(n, () => null));
452
+ let n = x.get(t.sessionStateAtom(e));
453
+ return n._tag !== "Failure" && bt(h(n, () => null));
454
454
  }
455
455
  function St(i) {
456
- let a = Z(24), o = i.asset && (i.asset.resource._tag === "workspace-file" || i.asset.resource._tag === "media-file") ? i.asset.environmentId : null, s;
457
- a[0] === o ? s = a[1] : (s = o === null ? null : t.sessionStateAtom(o), a[0] = o, a[1] = s);
458
- let c = ce(s), u;
459
- a[2] !== c || a[3] !== o ? (u = o === null || c.error === null && c.data !== null && bt(c.data), a[2] = c, a[3] = o, a[4] = u) : u = a[4];
456
+ let o = Z(24), s = i.asset && (i.asset.resource._tag === "workspace-file" || i.asset.resource._tag === "media-file") ? i.asset.environmentId : null, c;
457
+ o[0] === s ? c = o[1] : (c = s === null ? null : t.sessionStateAtom(s), o[0] = s, o[1] = c);
458
+ let l = ce(c), u;
459
+ o[2] !== l || o[3] !== s ? (u = s === null || l.error === null && l.data !== null && bt(l.data), o[2] = l, o[3] = s, o[4] = u) : u = o[4];
460
460
  let d = u, f;
461
- a[5] === o ? f = a[6] : (f = () => {
462
- if (!xt(o)) throw Error(r(n("This connection cannot read host files.")));
463
- }, a[5] = o, a[6] = f);
461
+ o[5] === s ? f = o[6] : (f = () => {
462
+ if (!xt(s)) throw Error(r(n("This connection cannot read host files.")));
463
+ }, o[5] = s, o[6] = f);
464
464
  let p = f, m;
465
- a[7] === Symbol.for("react.memo_cache_sentinel") ? (m = {
465
+ o[7] === Symbol.for("react.memo_cache_sentinel") ? (m = {
466
466
  reportFailure: !1,
467
467
  refresh: !0
468
- }, a[7] = m) : m = a[7];
469
- let h = J(k.createUrl, m), g;
470
- a[8] !== p || a[9] !== h || a[10] !== i.asset || a[11] !== i.src ? (g = async () => {
468
+ }, o[7] = m) : m = o[7];
469
+ let h = Y(k.createUrl, m), g;
470
+ o[8] !== p || o[9] !== h || o[10] !== i.asset || o[11] !== i.src ? (g = async () => {
471
471
  if (p(), !i.asset) {
472
472
  if (!i.src) throw Error(r(n("This media is unavailable. Try reopening the preview.")));
473
473
  return i.src;
474
474
  }
475
- let { environmentId: t, resource: a } = i.asset, o = e(t);
476
- if (!o) throw Error(r(n("Reconnect to this environment and try again.")));
477
- let s = await h({
475
+ let { environmentId: t, resource: o } = i.asset, s = e(t);
476
+ if (!s) throw Error(r(n("Reconnect to this environment and try again.")));
477
+ let c = await h({
478
478
  environmentId: t,
479
- input: { resource: a }
479
+ input: { resource: o }
480
480
  });
481
- if (s._tag === "Failure") throw l(s);
481
+ if (c._tag === "Failure") throw a(c);
482
482
  p();
483
- let c = O(o.httpBaseUrl, s.value.relativeUrl);
484
- if (!c) throw Error(r(n("The environment returned an invalid media URL.")));
485
- return c;
486
- }, a[8] = p, a[9] = h, a[10] = i.asset, a[11] = i.src, a[12] = g) : g = a[12];
483
+ let l = O(s.httpBaseUrl, c.value.relativeUrl);
484
+ if (!l) throw Error(r(n("The environment returned an invalid media URL.")));
485
+ return l;
486
+ }, o[8] = p, o[9] = h, o[10] = i.asset, o[11] = i.src, o[12] = g) : g = o[12];
487
487
  let _ = g, v;
488
- a[13] !== _ || a[14] !== i ? (v = async () => {
488
+ o[13] !== _ || o[14] !== i ? (v = async () => {
489
489
  await Xe(await _(), yt(i));
490
- }, a[13] = _, a[14] = i, a[15] = v) : v = a[15];
490
+ }, o[13] = _, o[14] = i, o[15] = v) : v = o[15];
491
491
  let y = v, b;
492
- a[16] !== _ || a[17] !== p ? (b = async () => {
492
+ o[16] !== _ || o[17] !== p ? (b = async () => {
493
493
  if (p(), !navigator.clipboard?.write || typeof ClipboardItem > "u") throw Error(r(n("Image copying is unavailable. Use a secure browser connection or save the image.")));
494
494
  await navigator.clipboard.write([new ClipboardItem({ "image/png": _().then(Ze) })]);
495
- }, a[16] = _, a[17] = p, a[18] = b) : b = a[18];
495
+ }, o[16] = _, o[17] = p, o[18] = b) : b = o[18];
496
496
  let x = b, S;
497
- return a[19] !== p || a[20] !== d || a[21] !== x || a[22] !== y ? (S = {
497
+ return o[19] !== p || o[20] !== d || o[21] !== x || o[22] !== y ? (S = {
498
498
  save: y,
499
499
  copyImage: x,
500
500
  canReadMedia: d,
501
501
  assertCanReadMedia: p
502
- }, a[19] = p, a[20] = d, a[21] = x, a[22] = y, a[23] = S) : S = a[23], S;
502
+ }, o[19] = p, o[20] = d, o[21] = x, o[22] = y, o[23] = S) : S = o[23], S;
503
503
  }
504
504
  function Ct(e) {
505
- let t = Z(21), { source: i, children: a, showTooltip: o } = e, s = o === void 0 || o, { save: c, copyImage: u, canReadMedia: d, assertCanReadMedia: f } = St(i), [p, m] = X(!1), h = Oe(!1), g = i.reference, y = g?.kind === "file" ? g.path : g?.url ?? i.name, b;
506
- t[0] !== f || t[1] !== d || t[2] !== u || t[3] !== g || t[4] !== c || t[5] !== i ? (b = async (e) => {
507
- let t = W();
508
- if (!t || h.current) return;
509
- h.current = !0, m(!1);
510
- let a = r(n("Could not open media menu")), o, s = await C(async () => {
511
- let s = i.kind === "image", l = !d || i.src === null && i.asset === void 0, p = typeof navigator < "u" && !!navigator.clipboard?.write && typeof ClipboardItem < "u", m = [];
512
- g?.kind === "file" ? (m.push({
505
+ let t = Z(21), { source: i, children: o, showTooltip: s } = e, c = s === void 0 || s, { save: l, copyImage: u, canReadMedia: f, assertCanReadMedia: p } = St(i), [m, h] = X(!1), g = Oe(!1), _ = i.reference, v = _?.kind === "file" ? _.path : _?.url ?? i.name, x;
506
+ t[0] !== p || t[1] !== f || t[2] !== u || t[3] !== _ || t[4] !== l || t[5] !== i ? (x = async (e) => {
507
+ let t = G();
508
+ if (!t || g.current) return;
509
+ g.current = !0, h(!1);
510
+ let o = r(n("Could not open media menu")), s, c = await d(async () => {
511
+ let a = i.kind === "image", c = !f || i.src === null && i.asset === void 0, d = typeof navigator < "u" && !!navigator.clipboard?.write && typeof ClipboardItem < "u", m = [];
512
+ _?.kind === "file" ? (m.push({
513
513
  id: "copy-full-path",
514
514
  label: r(n("Copy full path"))
515
- }), g.relativePath && m.push({
515
+ }), _.relativePath && m.push({
516
516
  id: "copy-relative-path",
517
517
  label: r(n("Copy relative path"))
518
- })) : g?.kind === "url" && m.push({
518
+ })) : _?.kind === "url" && m.push({
519
519
  id: "copy-url",
520
520
  label: r(n("Copy URL"))
521
521
  }), i.onOpenFile && m.push({
522
522
  id: "open-file",
523
523
  label: r(n("Open in file viewer")),
524
- disabled: !d
524
+ disabled: !f
525
525
  }), m.push({
526
526
  id: "save",
527
- label: r(n(s ? "Save image" : "Save video")),
528
- disabled: l
527
+ label: r(n(a ? "Save image" : "Save video")),
528
+ disabled: c
529
529
  }), i.kind === "image" && m.push({
530
530
  id: "copy-image",
531
531
  label: r(n("Copy image")),
532
- disabled: l || !p
532
+ disabled: c || !d
533
533
  });
534
534
  let h = await t.contextMenu.show(m, e);
535
535
  if (!h) return;
536
- a = r(n(h === "copy-full-path" ? "Could not copy full path" : h === "copy-relative-path" ? "Could not copy relative path" : h === "copy-url" ? "Could not copy url" : h === "open-file" ? "Could not open in file viewer" : h === "save" ? s ? "Could not save image" : "Could not save video" : h === "copy-image" ? "Could not copy image" : "Could not complete media action"));
537
- let _ = h === "copy-full-path" && g?.kind === "file" ? g.path : h === "copy-relative-path" && g?.kind === "file" ? g.relativePath : h === "copy-url" && g?.kind === "url" ? g.url : void 0;
538
- if (_ !== void 0) {
539
- let e = g?.kind === "file" ? ve(_, g.path) : _;
540
- await U(e, g?.kind === "file" ? {
536
+ o = r(n(h === "copy-full-path" ? "Could not copy full path" : h === "copy-relative-path" ? "Could not copy relative path" : h === "copy-url" ? "Could not copy url" : h === "open-file" ? "Could not open in file viewer" : h === "save" ? a ? "Could not save image" : "Could not save video" : h === "copy-image" ? "Could not copy image" : "Could not complete media action"));
537
+ let g = h === "copy-full-path" && _?.kind === "file" ? _.path : h === "copy-relative-path" && _?.kind === "file" ? _.relativePath : h === "copy-url" && _?.kind === "url" ? _.url : void 0;
538
+ if (g !== void 0) {
539
+ let e = _?.kind === "file" ? ve(g, _.path) : g;
540
+ await W(e, _?.kind === "file" ? {
541
541
  target: "file path",
542
542
  unavailableMessage: n("Clipboard API is unavailable while copying file path."),
543
543
  failureMessage: n("Failed to copy file path to the clipboard.")
@@ -546,27 +546,27 @@ function Ct(e) {
546
546
  unavailableMessage: n("Clipboard API is unavailable while copying URL."),
547
547
  failureMessage: n("Failed to copy URL to the clipboard.")
548
548
  });
549
- } else h === "open-file" ? (f(), i.onOpenFile?.()) : (h === "save" || h === "copy-image") && (o = G.add({
549
+ } else h === "open-file" ? (p(), i.onOpenFile?.()) : (h === "save" || h === "copy-image") && (s = K.add({
550
550
  type: "loading",
551
- title: r(n(h === "save" ? s ? "Preparing image download…" : "Preparing video download…" : "Copying image…"))
552
- }), await (h === "save" ? c() : u()), G.close(o));
551
+ title: r(n(h === "save" ? a ? "Preparing image download…" : "Preparing video download…" : "Copying image…"))
552
+ }), await (h === "save" ? l() : u()), K.close(s));
553
553
  });
554
- if (S(s)) {
555
- let e = l(s), t = K({
554
+ if (T(c)) {
555
+ let e = a(c), t = q({
556
556
  type: "error",
557
- title: a,
557
+ title: o,
558
558
  description: j(e, r) ?? r(n("The media action failed."))
559
559
  });
560
- o ? G.update(o, t) : G.add(t);
560
+ s ? K.update(s, t) : K.add(t);
561
561
  }
562
- h.current = !1;
563
- }, t[0] = f, t[1] = d, t[2] = u, t[3] = g, t[4] = c, t[5] = i, t[6] = b) : b = t[6];
564
- let x = b, w = !s, T, D;
565
- t[7] === x ? (T = t[8], D = t[9]) : (T = (e) => {
562
+ g.current = !1;
563
+ }, t[0] = p, t[1] = f, t[2] = u, t[3] = _, t[4] = l, t[5] = i, t[6] = x) : x = t[6];
564
+ let S = x, C = !c, w, D;
565
+ t[7] === S ? (w = t[8], D = t[9]) : (w = (e) => {
566
566
  if (e.defaultPrevented) return;
567
567
  e.preventDefault(), e.stopPropagation();
568
568
  let t = e.currentTarget.getBoundingClientRect();
569
- x(e.clientX === 0 && e.clientY === 0 ? {
569
+ S(e.clientX === 0 && e.clientY === 0 ? {
570
570
  x: t.left,
571
571
  y: t.bottom
572
572
  } : {
@@ -577,30 +577,30 @@ function Ct(e) {
577
577
  if (e.defaultPrevented || !(e.key === "ContextMenu" || e.shiftKey && e.key === "F10")) return;
578
578
  e.preventDefault(), e.stopPropagation();
579
579
  let t = e.currentTarget.getBoundingClientRect();
580
- x({
580
+ S({
581
581
  x: t.left,
582
582
  y: t.bottom
583
583
  });
584
- }, t[7] = x, t[8] = T, t[9] = D);
584
+ }, t[7] = S, t[8] = w, t[9] = D);
585
585
  let O;
586
- t[10] !== a || t[11] !== T || t[12] !== D ? (O = /* @__PURE__ */ Q(E, {
587
- render: a,
586
+ t[10] !== o || t[11] !== w || t[12] !== D ? (O = /* @__PURE__ */ Q(E, {
587
+ render: o,
588
588
  tabIndex: 0,
589
- onContextMenu: T,
589
+ onContextMenu: w,
590
590
  onKeyDown: D
591
- }), t[10] = a, t[11] = T, t[12] = D, t[13] = O) : O = t[13];
591
+ }), t[10] = o, t[11] = w, t[12] = D, t[13] = O) : O = t[13];
592
592
  let k;
593
- t[14] === y ? k = t[15] : (k = /* @__PURE__ */ Q(_, {
593
+ t[14] === v ? k = t[15] : (k = /* @__PURE__ */ Q(y, {
594
594
  variant: "code",
595
- children: y
596
- }), t[14] = y, t[15] = k);
595
+ children: v
596
+ }), t[14] = v, t[15] = k);
597
597
  let A;
598
- return t[16] !== w || t[17] !== O || t[18] !== k || t[19] !== p ? (A = /* @__PURE__ */ $(v, {
599
- disabled: w,
600
- open: p,
601
- onOpenChange: m,
598
+ return t[16] !== C || t[17] !== O || t[18] !== k || t[19] !== m ? (A = /* @__PURE__ */ $(b, {
599
+ disabled: C,
600
+ open: m,
601
+ onOpenChange: h,
602
602
  children: [O, k]
603
- }), t[16] = w, t[17] = O, t[18] = k, t[19] = p, t[20] = A) : A = t[20], A;
603
+ }), t[16] = C, t[17] = O, t[18] = k, t[19] = m, t[20] = A) : A = t[20], A;
604
604
  }
605
605
  // src/lib/videoFirstFrame.ts
606
606
  function wt(e) {
@@ -612,13 +612,13 @@ function wt(e) {
612
612
  }
613
613
  // src/components/media/MediaVideoPlayer.tsx
614
614
  function Tt(e) {
615
- let t = Z(46), { src: n, label: r, sourceFailed: i, unavailableDetail: a, originalUrl: o, revision: s, preload: l, autoPlay: u, onOpen: d, className: f, videoClassName: p, stateClassName: g, style: _, copyMarkdown: v, onRetry: y, actionsSource: b } = e, S = i !== void 0 && i, w = s === void 0 ? null : s, T = l === void 0 ? "visible" : l, E = u !== void 0 && u, D = c(), [O, k] = X(null), [A, j] = X(!1), [M, N] = X(null), [ee, te] = X(!1), [P, ne] = X(0), [F, ie] = X(null), I = O?.src ?? n, ae = O === null ? w : O.revision, z = I === null ? S : M === I, B = F === I || typeof IntersectionObserver > "u";
616
- O !== null && O.revision !== w && (n !== null || S) && !A && k(w !== null && n !== null ? {
615
+ let t = Z(46), { src: n, label: r, sourceFailed: a, unavailableDetail: o, originalUrl: s, revision: c, preload: l, autoPlay: u, onOpen: f, className: p, videoClassName: m, stateClassName: h, style: g, copyMarkdown: _, onRetry: y, actionsSource: b } = e, x = a !== void 0 && a, w = c === void 0 ? null : c, T = l === void 0 ? "visible" : l, E = u !== void 0 && u, D = i(), [O, k] = X(null), [A, j] = X(!1), [M, N] = X(null), [ee, te] = X(!1), [P, ne] = X(0), [F, re] = X(null), L = O?.src ?? n, ie = O === null ? w : O.revision, B = L === null ? x : M === L, V = F === L || typeof IntersectionObserver > "u";
616
+ O !== null && O.revision !== w && (n !== null || x) && !A && k(w !== null && n !== null ? {
617
617
  src: n,
618
618
  revision: w
619
619
  } : null);
620
- let V;
621
- t[0] === Symbol.for("react.memo_cache_sentinel") ? (V = (e) => {
620
+ let H;
621
+ t[0] === Symbol.for("react.memo_cache_sentinel") ? (H = (e) => {
622
622
  let t = () => {
623
623
  let t = document.fullscreenElement?.contains(e) || "webkitDisplayingFullscreen" in e && e.webkitDisplayingFullscreen === !0;
624
624
  document.hidden && !t && e.pause();
@@ -626,115 +626,115 @@ function Tt(e) {
626
626
  return document.addEventListener("visibilitychange", t), document.addEventListener("fullscreenchange", t), e.addEventListener("webkitendfullscreen", t), () => {
627
627
  document.removeEventListener("visibilitychange", t), document.removeEventListener("fullscreenchange", t), e.removeEventListener("webkitendfullscreen", t), e.pause(), j(!1);
628
628
  };
629
- }, t[0] = V) : V = t[0];
630
- let H = V, U;
631
- t[1] !== z || t[2] !== T || t[3] !== B || t[4] !== I ? (U = (e) => {
632
- if (!(I === null || z || T === "metadata" || B)) return ue(e, (e) => {
633
- e.isIntersecting && ie(I);
629
+ }, t[0] = H) : H = t[0];
630
+ let U = H, W;
631
+ t[1] !== B || t[2] !== T || t[3] !== V || t[4] !== L ? (W = (e) => {
632
+ if (!(L === null || B || T === "metadata" || V)) return ue(e, (e) => {
633
+ e.isIntersecting && re(L);
634
634
  }, { rootMargin: "200px" });
635
- }, t[1] = z, t[2] = T, t[3] = B, t[4] = I, t[5] = U) : U = t[5];
636
- let W = U, G;
637
- t[6] !== y || t[7] !== ee || t[8] !== I ? (G = async () => {
635
+ }, t[1] = B, t[2] = T, t[3] = V, t[4] = L, t[5] = W) : W = t[5];
636
+ let G = W, K;
637
+ t[6] !== y || t[7] !== ee || t[8] !== L ? (K = async () => {
638
638
  if (ee) return;
639
639
  te(!0);
640
- let e = await C(async () => {
640
+ let e = await d(async () => {
641
641
  await y?.();
642
642
  });
643
- m(e) ? (k(null), N(null), ne(Et)) : N(I), te(!1);
644
- }, t[6] = y, t[7] = ee, t[8] = I, t[9] = G) : G = t[9];
645
- let oe = G, K;
646
- t[10] === f ? K = t[11] : (K = x("relative inline-block align-middle", f), t[10] = f, t[11] = K);
647
- let q;
648
- t[12] !== E || t[13] !== z || t[14] !== D || t[15] !== r || t[16] !== n || t[17] !== P || t[18] !== d || t[19] !== y || t[20] !== o || t[21] !== T || t[22] !== B || t[23] !== oe || t[24] !== ee || t[25] !== ae || t[26] !== I || t[27] !== g || t[28] !== _ || t[29] !== a || t[30] !== p ? (q = z && !d ? /* @__PURE__ */ $("span", {
643
+ C(e) ? (k(null), N(null), ne(Et)) : N(L), te(!1);
644
+ }, t[6] = y, t[7] = ee, t[8] = L, t[9] = K) : K = t[9];
645
+ let ae = K, q;
646
+ t[10] === p ? q = t[11] : (q = S("relative inline-block align-middle", p), t[10] = p, t[11] = q);
647
+ let J;
648
+ t[12] !== E || t[13] !== B || t[14] !== D || t[15] !== r || t[16] !== n || t[17] !== P || t[18] !== f || t[19] !== y || t[20] !== s || t[21] !== T || t[22] !== V || t[23] !== ae || t[24] !== ee || t[25] !== ie || t[26] !== L || t[27] !== h || t[28] !== g || t[29] !== o || t[30] !== m ? (J = B && !f ? /* @__PURE__ */ $("span", {
649
649
  role: "alert",
650
- className: x("flex aspect-video max-h-full w-full flex-col items-center justify-center gap-3 rounded-lg border border-border/40 bg-muted/40 p-4 text-center text-sm text-muted-foreground", g),
650
+ className: S("flex aspect-video max-h-full w-full flex-col items-center justify-center gap-3 rounded-lg border border-border/40 bg-muted/40 p-4 text-center text-sm text-muted-foreground", h),
651
651
  children: [/* @__PURE__ */ $("span", {
652
652
  "data-thread-find-ignore": !0,
653
653
  className: "inline-flex items-center gap-1.5",
654
- children: [/* @__PURE__ */ Q(re, {
654
+ children: [/* @__PURE__ */ Q(I, {
655
655
  "aria-hidden": !0,
656
656
  className: "size-3.5 shrink-0"
657
657
  }), [
658
658
  D("Video unavailable"),
659
659
  r,
660
- a
660
+ o
661
661
  ].filter(Boolean).join(" · ")]
662
662
  }), /* @__PURE__ */ $("span", {
663
663
  className: "flex flex-wrap items-center justify-center gap-2",
664
- children: [n !== null || y ? /* @__PURE__ */ $(h, {
664
+ children: [n !== null || y ? /* @__PURE__ */ $(v, {
665
665
  size: "sm",
666
666
  variant: "secondary",
667
667
  disabled: ee,
668
- onClick: () => void oe(),
669
- children: [/* @__PURE__ */ Q(R, {}), D(ee ? "Retrying…" : "Retry video")]
668
+ onClick: () => void ae(),
669
+ children: [/* @__PURE__ */ Q(z, {}), D(ee ? "Retrying…" : "Retry video")]
670
670
  }) : null, /* @__PURE__ */ Q(vt, {
671
- originalUrl: o,
672
- src: n ?? I,
671
+ originalUrl: s,
672
+ src: n ?? L,
673
673
  fileName: r
674
674
  })]
675
675
  })]
676
- }) : I !== null && !z ? /* @__PURE__ */ Q("video", {
677
- ref: H,
678
- src: I,
676
+ }) : L !== null && !B ? /* @__PURE__ */ Q("video", {
677
+ ref: U,
678
+ src: L,
679
679
  "aria-label": r || D("Video preview"),
680
- "aria-hidden": d ? !0 : void 0,
681
- autoPlay: !d && E,
682
- controls: !d,
683
- muted: d ? !0 : void 0,
680
+ "aria-hidden": f ? !0 : void 0,
681
+ autoPlay: !f && E,
682
+ controls: !f,
683
+ muted: f ? !0 : void 0,
684
684
  playsInline: !0,
685
- preload: T === "metadata" || B ? "metadata" : "none",
686
- className: x("aspect-video max-h-full w-full bg-black object-contain", d && "pointer-events-none", p),
687
- style: _,
685
+ preload: T === "metadata" || V ? "metadata" : "none",
686
+ className: S("aspect-video max-h-full w-full bg-black object-contain", f && "pointer-events-none", m),
687
+ style: g,
688
688
  onLoadedMetadata: (e) => {
689
- wt(e.currentTarget), ae !== null && k({
690
- src: I,
691
- revision: ae
689
+ wt(e.currentTarget), ie !== null && k({
690
+ src: L,
691
+ revision: ie
692
692
  });
693
693
  },
694
694
  onPlay: () => {
695
695
  j(!0), k({
696
- src: I,
697
- revision: ae
696
+ src: L,
697
+ revision: ie
698
698
  });
699
699
  },
700
700
  onPause: () => j(!1),
701
701
  onEnded: () => j(!1),
702
702
  onError: () => {
703
- j(!1), k(null), (n === null || I === n) && N(I);
703
+ j(!1), k(null), (n === null || L === n) && N(L);
704
704
  }
705
705
  }, P) : /* @__PURE__ */ Q("span", {
706
706
  role: "status",
707
- "aria-label": D(z ? "Video preview unavailable" : "Loading video"),
708
- className: x("block aspect-video w-full rounded-lg bg-muted/60", g),
709
- style: _
710
- }), t[12] = E, t[13] = z, t[14] = D, t[15] = r, t[16] = n, t[17] = P, t[18] = d, t[19] = y, t[20] = o, t[21] = T, t[22] = B, t[23] = oe, t[24] = ee, t[25] = ae, t[26] = I, t[27] = g, t[28] = _, t[29] = a, t[30] = p, t[31] = q) : q = t[31];
711
- let J;
712
- t[32] !== D || t[33] !== r || t[34] !== d ? (J = d ? /* @__PURE__ */ Q("button", {
707
+ "aria-label": D(B ? "Video preview unavailable" : "Loading video"),
708
+ className: S("block aspect-video w-full rounded-lg bg-muted/60", h),
709
+ style: g
710
+ }), t[12] = E, t[13] = B, t[14] = D, t[15] = r, t[16] = n, t[17] = P, t[18] = f, t[19] = y, t[20] = s, t[21] = T, t[22] = V, t[23] = ae, t[24] = ee, t[25] = ie, t[26] = L, t[27] = h, t[28] = g, t[29] = o, t[30] = m, t[31] = J) : J = t[31];
711
+ let Y;
712
+ t[32] !== D || t[33] !== r || t[34] !== f ? (Y = f ? /* @__PURE__ */ Q("button", {
713
713
  type: "button",
714
714
  "aria-label": r ? D("Play {name}", { name: r }) : D("Play video"),
715
- onClick: d,
715
+ onClick: f,
716
716
  className: "absolute inset-0 flex cursor-pointer items-center justify-center rounded-lg focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-ring",
717
717
  children: /* @__PURE__ */ Q("span", {
718
718
  className: "flex size-8 items-center justify-center rounded-full bg-black/50 text-white",
719
- children: /* @__PURE__ */ Q(L, {
719
+ children: /* @__PURE__ */ Q(R, {
720
720
  "aria-hidden": !0,
721
721
  className: "size-4 fill-current"
722
722
  })
723
723
  })
724
- }) : null, t[32] = D, t[33] = r, t[34] = d, t[35] = J) : J = t[35];
725
- let se;
726
- t[36] !== v || t[37] !== W || t[38] !== _ || t[39] !== J || t[40] !== K || t[41] !== q ? (se = /* @__PURE__ */ $("span", {
727
- ref: W,
728
- className: K,
729
- style: _,
730
- "data-markdown-copy": v,
731
- children: [q, J]
732
- }), t[36] = v, t[37] = W, t[38] = _, t[39] = J, t[40] = K, t[41] = q, t[42] = se) : se = t[42];
733
- let Y = se, ce;
734
- return t[43] !== b || t[44] !== Y ? (ce = b ? /* @__PURE__ */ Q(Ct, {
724
+ }) : null, t[32] = D, t[33] = r, t[34] = f, t[35] = Y) : Y = t[35];
725
+ let oe;
726
+ t[36] !== _ || t[37] !== G || t[38] !== g || t[39] !== Y || t[40] !== q || t[41] !== J ? (oe = /* @__PURE__ */ $("span", {
727
+ ref: G,
728
+ className: q,
729
+ style: g,
730
+ "data-markdown-copy": _,
731
+ children: [J, Y]
732
+ }), t[36] = _, t[37] = G, t[38] = g, t[39] = Y, t[40] = q, t[41] = J, t[42] = oe) : oe = t[42];
733
+ let se = oe, ce;
734
+ return t[43] !== b || t[44] !== se ? (ce = b ? /* @__PURE__ */ Q(Ct, {
735
735
  source: b,
736
- children: Y
737
- }) : Y, t[43] = b, t[44] = Y, t[45] = ce) : ce = t[45], ce;
736
+ children: se
737
+ }) : se, t[43] = b, t[44] = se, t[45] = ce) : ce = t[45], ce;
738
738
  }
739
739
  function Et(e) {
740
740
  return e + 1;
@@ -813,7 +813,7 @@ function Nt(e) {
813
813
  // src/components/chat/SnapShotAttachmentDetails.tsx
814
814
  var Pt = "relative h-28 w-52 max-w-full overflow-hidden rounded-lg border border-border/80";
815
815
  function Ft(e) {
816
- let t = Z(9), { details: n, className: r } = e, i = q(), a;
816
+ let t = Z(9), { details: n, className: r } = e, i = J(), a;
817
817
  t[0] !== n.content || t[1] !== n.format || t[2] !== i ? (a = n.format === "json" ? /* @__PURE__ */ Q(Fe, {
818
818
  fallback: n.content,
819
819
  children: /* @__PURE__ */ Q(Se, {
@@ -826,7 +826,7 @@ function Ft(e) {
826
826
  })
827
827
  }) : n.content, t[0] = n.content, t[1] = n.format, t[2] = i, t[3] = a) : a = t[3];
828
828
  let o = a, s;
829
- t[4] === r ? s = t[5] : (s = x("overflow-auto whitespace-pre-wrap break-words font-mono focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring/70", r), t[4] = r, t[5] = s);
829
+ t[4] === r ? s = t[5] : (s = S("overflow-auto whitespace-pre-wrap break-words font-mono focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring/70", r), t[4] = r, t[5] = s);
830
830
  let c;
831
831
  return t[6] !== o || t[7] !== s ? (c = /* @__PURE__ */ Q("pre", {
832
832
  className: s,
@@ -849,90 +849,90 @@ function Lt(e) {
849
849
  return !!(e.accessibility || e.accessibleText?.trim());
850
850
  }
851
851
  function Rt(e) {
852
- let t = Z(19), { onCopy: n, side: r } = e, i = r === void 0 ? "top" : r, a = c(), o = Oe(null), [s, l] = X(!1), u;
853
- t[0] === a ? u = t[1] : (u = a("Copy snapshot"), t[0] = a, t[1] = u);
852
+ let t = Z(19), { onCopy: n, side: r } = e, a = r === void 0 ? "top" : r, o = i(), s = Oe(null), [c, l] = X(!1), u;
853
+ t[0] === o ? u = t[1] : (u = o("Copy snapshot"), t[0] = o, t[1] = u);
854
854
  let d;
855
855
  t[2] === n ? d = t[3] : (d = (e) => {
856
856
  e.stopPropagation(), n().then(() => {
857
857
  l(!0), setTimeout(() => l(!1), ye);
858
- }, (e) => _e(o, e instanceof Error ? e : Error(String(e))));
858
+ }, (e) => _e(s, e instanceof Error ? e : Error(String(e))));
859
859
  }, t[2] = n, t[3] = d);
860
860
  let f;
861
- t[4] !== s || t[5] !== u || t[6] !== d ? (f = /* @__PURE__ */ Q(h, {
862
- ref: o,
861
+ t[4] !== c || t[5] !== u || t[6] !== d ? (f = /* @__PURE__ */ Q(v, {
862
+ ref: s,
863
863
  "aria-label": u,
864
- disabled: s,
864
+ disabled: c,
865
865
  onClick: d,
866
866
  size: "xs",
867
867
  variant: "ghost-muted"
868
- }), t[4] = s, t[5] = u, t[6] = d, t[7] = f) : f = t[7];
868
+ }), t[4] = c, t[5] = u, t[6] = d, t[7] = f) : f = t[7];
869
869
  let p;
870
- t[8] === s ? p = t[9] : (p = s ? /* @__PURE__ */ Q(N, {
870
+ t[8] === c ? p = t[9] : (p = c ? /* @__PURE__ */ Q(N, {
871
871
  className: "size-3 text-primary",
872
872
  "aria-hidden": "true"
873
873
  }) : /* @__PURE__ */ Q(F, {
874
874
  className: "size-3",
875
875
  "aria-hidden": "true"
876
- }), t[8] = s, t[9] = p);
876
+ }), t[8] = c, t[9] = p);
877
877
  let m;
878
878
  t[10] !== f || t[11] !== p ? (m = /* @__PURE__ */ Q(E, {
879
879
  render: f,
880
880
  children: p
881
881
  }), t[10] = f, t[11] = p, t[12] = m) : m = t[12];
882
- let g;
883
- t[13] === Symbol.for("react.memo_cache_sentinel") ? (g = /* @__PURE__ */ Q(T, { children: "Copy snapshot" }), t[13] = g) : g = t[13];
884
- let y;
885
- t[14] === i ? y = t[15] : (y = /* @__PURE__ */ Q(_, {
886
- side: i,
887
- children: g
888
- }), t[14] = i, t[15] = y);
889
- let b;
890
- return t[16] !== m || t[17] !== y ? (b = /* @__PURE__ */ $(v, { children: [m, y] }), t[16] = m, t[17] = y, t[18] = b) : b = t[18], b;
882
+ let h;
883
+ t[13] === Symbol.for("react.memo_cache_sentinel") ? (h = /* @__PURE__ */ Q(g, { children: "Copy snapshot" }), t[13] = h) : h = t[13];
884
+ let _;
885
+ t[14] === a ? _ = t[15] : (_ = /* @__PURE__ */ Q(y, {
886
+ side: a,
887
+ children: h
888
+ }), t[14] = a, t[15] = _);
889
+ let x;
890
+ return t[16] !== m || t[17] !== _ ? (x = /* @__PURE__ */ $(b, { children: [m, _] }), t[16] = m, t[17] = _, t[18] = x) : x = t[18], x;
891
891
  }
892
892
  function zt(e) {
893
- let t = Z(42), { source: n, className: r, side: i, onCopySnapshot: a } = e, o = i === void 0 ? "top" : i, s = c(), l;
893
+ let t = Z(42), { source: n, className: r, side: a, onCopySnapshot: o } = e, s = a === void 0 ? "top" : a, c = i(), l;
894
894
  t[0] === n ? l = t[1] : (l = Lt(n), t[0] = n, t[1] = l);
895
- let u = l, d = u ? ae : ie, f;
895
+ let u = l, d = u ? ie : re, f;
896
896
  t[2] === n ? f = t[3] : (f = It(n), t[2] = n, t[3] = f);
897
897
  let p = f, m;
898
- t[4] !== s || t[5] !== u ? (m = s(u ? "Accessibility data" : "No accessibility data"), t[4] = s, t[5] = u, t[6] = m) : m = t[6];
899
- let g = m, y;
900
- t[7] !== s || t[8] !== u ? (y = s(u ? "View accessibility data" : "No accessibility data"), t[7] = s, t[8] = u, t[9] = y) : y = t[9];
901
- let b;
902
- t[10] !== r || t[11] !== y ? (b = /* @__PURE__ */ Q(V, { render: /* @__PURE__ */ Q(h, {
903
- "aria-label": y,
898
+ t[4] !== c || t[5] !== u ? (m = c(u ? "Accessibility data" : "No accessibility data"), t[4] = c, t[5] = u, t[6] = m) : m = t[6];
899
+ let h = m, _;
900
+ t[7] !== c || t[8] !== u ? (_ = c(u ? "View accessibility data" : "No accessibility data"), t[7] = c, t[8] = u, t[9] = _) : _ = t[9];
901
+ let x;
902
+ t[10] !== r || t[11] !== _ ? (x = /* @__PURE__ */ Q(H, { render: /* @__PURE__ */ Q(v, {
903
+ "aria-label": _,
904
904
  className: r,
905
905
  onClick: Bt,
906
906
  size: "icon-micro",
907
907
  variant: "overlay"
908
- }) }), t[10] = r, t[11] = y, t[12] = b) : b = t[12];
909
- let x;
910
- t[13] === d ? x = t[14] : (x = /* @__PURE__ */ Q(d, {
908
+ }) }), t[10] = r, t[11] = _, t[12] = x) : x = t[12];
909
+ let S;
910
+ t[13] === d ? S = t[14] : (S = /* @__PURE__ */ Q(d, {
911
911
  className: "size-3",
912
912
  "aria-hidden": "true"
913
- }), t[13] = d, t[14] = x);
914
- let S;
915
- t[15] !== b || t[16] !== x ? (S = /* @__PURE__ */ Q(E, {
916
- render: b,
917
- children: x
918
- }), t[15] = b, t[16] = x, t[17] = S) : S = t[17];
913
+ }), t[13] = d, t[14] = S);
919
914
  let C;
920
- t[18] !== o || t[19] !== g ? (C = /* @__PURE__ */ Q(_, {
921
- side: o,
922
- children: g
923
- }), t[18] = o, t[19] = g, t[20] = C) : C = t[20];
915
+ t[15] !== x || t[16] !== S ? (C = /* @__PURE__ */ Q(E, {
916
+ render: x,
917
+ children: S
918
+ }), t[15] = x, t[16] = S, t[17] = C) : C = t[17];
924
919
  let w;
925
- t[21] !== S || t[22] !== C ? (w = /* @__PURE__ */ $(v, { children: [S, C] }), t[21] = S, t[22] = C, t[23] = w) : w = t[23];
920
+ t[18] !== s || t[19] !== h ? (w = /* @__PURE__ */ Q(y, {
921
+ side: s,
922
+ children: h
923
+ }), t[18] = s, t[19] = h, t[20] = w) : w = t[20];
924
+ let T;
925
+ t[21] !== C || t[22] !== w ? (T = /* @__PURE__ */ $(b, { children: [C, w] }), t[21] = C, t[22] = w, t[23] = T) : T = t[23];
926
926
  let D;
927
- t[24] === Symbol.for("react.memo_cache_sentinel") ? (D = /* @__PURE__ */ Q(z, { children: /* @__PURE__ */ Q(T, { children: "Accessibility data" }) }), t[24] = D) : D = t[24];
927
+ t[24] === Symbol.for("react.memo_cache_sentinel") ? (D = /* @__PURE__ */ Q(B, { children: /* @__PURE__ */ Q(g, { children: "Accessibility data" }) }), t[24] = D) : D = t[24];
928
928
  let O;
929
- t[25] !== a || t[26] !== o ? (O = a && /* @__PURE__ */ Q("div", {
929
+ t[25] !== o || t[26] !== s ? (O = o && /* @__PURE__ */ Q("div", {
930
930
  className: "-my-1.5",
931
931
  children: /* @__PURE__ */ Q(Rt, {
932
- onCopy: a,
933
- side: o
932
+ onCopy: o,
933
+ side: s
934
934
  })
935
- }), t[25] = a, t[26] = o, t[27] = O) : O = t[27];
935
+ }), t[25] = o, t[26] = s, t[27] = O) : O = t[27];
936
936
  let k;
937
937
  t[28] === O ? k = t[29] : (k = /* @__PURE__ */ $("div", {
938
938
  className: "flex items-center justify-between gap-2",
@@ -944,10 +944,10 @@ function zt(e) {
944
944
  className: "max-h-64 rounded-md border border-border/70 bg-muted/45 p-2.5 text-2xs leading-4"
945
945
  }) : u ? /* @__PURE__ */ Q("div", {
946
946
  className: "rounded-md border border-border/70 bg-muted/45 p-2.5 text-muted-foreground text-xs leading-4",
947
- children: /* @__PURE__ */ Q(T, { children: "Structured accessibility elements were included, but they have no readable names or values." })
947
+ children: /* @__PURE__ */ Q(g, { children: "Structured accessibility elements were included, but they have no readable names or values." })
948
948
  }) : /* @__PURE__ */ Q("div", {
949
949
  className: "rounded-md border border-border/70 bg-muted/45 p-2.5 text-muted-foreground text-xs leading-4",
950
- children: /* @__PURE__ */ Q(T, { children: "The app or capture backend did not provide verified accessibility data." })
950
+ children: /* @__PURE__ */ Q(g, { children: "The app or capture backend did not provide verified accessibility data." })
951
951
  }), t[30] = p, t[31] = u, t[32] = A) : A = t[32];
952
952
  let j;
953
953
  t[33] !== k || t[34] !== A ? (j = /* @__PURE__ */ $("div", {
@@ -955,30 +955,30 @@ function zt(e) {
955
955
  children: [k, A]
956
956
  }), t[33] = k, t[34] = A, t[35] = j) : j = t[35];
957
957
  let M;
958
- t[36] !== o || t[37] !== j ? (M = /* @__PURE__ */ Q(B, {
959
- side: o,
958
+ t[36] !== s || t[37] !== j ? (M = /* @__PURE__ */ Q(V, {
959
+ side: s,
960
960
  align: "center",
961
961
  width: "md",
962
962
  children: j
963
- }), t[36] = o, t[37] = j, t[38] = M) : M = t[38];
963
+ }), t[36] = s, t[37] = j, t[38] = M) : M = t[38];
964
964
  let N;
965
- return t[39] !== w || t[40] !== M ? (N = /* @__PURE__ */ $(H, { children: [w, M] }), t[39] = w, t[40] = M, t[41] = N) : N = t[41], N;
965
+ return t[39] !== T || t[40] !== M ? (N = /* @__PURE__ */ $(U, { children: [T, M] }), t[39] = T, t[40] = M, t[41] = N) : N = t[41], N;
966
966
  }
967
967
  function Bt(e) {
968
968
  return e.stopPropagation();
969
969
  }
970
970
  function Vt(e) {
971
- let t = Z(25), { source: n, onCopySnapshot: r, className: i } = e, a = c(), o;
972
- t[0] === i ? o = t[1] : (o = x("pointer-events-none absolute inset-x-0 bottom-0 flex min-w-0 items-center gap-1.5 bg-linear-to-t from-black/85 via-black/55 to-transparent px-2.5 pb-2 pt-6", i), t[0] = i, t[1] = o);
973
- let s;
974
- t[2] !== n.appIconDataUrl || t[3] !== n.appName ? (s = n.appIconDataUrl ? /* @__PURE__ */ Q("img", {
971
+ let t = Z(25), { source: n, onCopySnapshot: r, className: a } = e, o = i(), s;
972
+ t[0] === a ? s = t[1] : (s = S("pointer-events-none absolute inset-x-0 bottom-0 flex min-w-0 items-center gap-1.5 bg-linear-to-t from-black/85 via-black/55 to-transparent px-2.5 pb-2 pt-6", a), t[0] = a, t[1] = s);
973
+ let c;
974
+ t[2] !== n.appIconDataUrl || t[3] !== n.appName ? (c = n.appIconDataUrl ? /* @__PURE__ */ Q("img", {
975
975
  src: n.appIconDataUrl,
976
976
  alt: "",
977
977
  className: "size-7 shrink-0 rounded-md"
978
978
  }) : /* @__PURE__ */ Q("div", {
979
979
  className: "flex size-7 shrink-0 items-center justify-center rounded-md bg-white/20 text-3xs font-medium text-white uppercase",
980
980
  children: n.appName.slice(0, 1)
981
- }), t[2] = n.appIconDataUrl, t[3] = n.appName, t[4] = s) : s = t[4];
981
+ }), t[2] = n.appIconDataUrl, t[3] = n.appName, t[4] = c) : c = t[4];
982
982
  let l;
983
983
  t[5] === n.appName ? l = t[6] : (l = /* @__PURE__ */ Q("span", {
984
984
  className: "truncate",
@@ -996,7 +996,7 @@ function Vt(e) {
996
996
  children: [l, u]
997
997
  }), t[10] = l, t[11] = u, t[12] = d) : d = t[12];
998
998
  let f;
999
- t[13] !== a || t[14] !== n.windowTitle ? (f = n.windowTitle || a("Captured window"), t[13] = a, t[14] = n.windowTitle, t[15] = f) : f = t[15];
999
+ t[13] !== o || t[14] !== n.windowTitle ? (f = n.windowTitle || o("Captured window"), t[13] = o, t[14] = n.windowTitle, t[15] = f) : f = t[15];
1000
1000
  let p;
1001
1001
  t[16] === f ? p = t[17] : (p = /* @__PURE__ */ Q("div", {
1002
1002
  className: "truncate text-3xs leading-3.5 text-white/70",
@@ -1008,17 +1008,17 @@ function Vt(e) {
1008
1008
  children: [d, p]
1009
1009
  }), t[18] = d, t[19] = p, t[20] = m) : m = t[20];
1010
1010
  let h;
1011
- return t[21] !== o || t[22] !== s || t[23] !== m ? (h = /* @__PURE__ */ $("div", {
1012
- className: o,
1013
- children: [s, m]
1014
- }), t[21] = o, t[22] = s, t[23] = m, t[24] = h) : h = t[24], h;
1011
+ return t[21] !== s || t[22] !== c || t[23] !== m ? (h = /* @__PURE__ */ $("div", {
1012
+ className: s,
1013
+ children: [c, m]
1014
+ }), t[21] = s, t[22] = c, t[23] = m, t[24] = h) : h = t[24], h;
1015
1015
  }
1016
1016
  // src/components/chat/ZoomableImage.tsx
1017
1017
  var Ht = 8;
1018
1018
  function Ut() {
1019
1019
  return {
1020
1020
  width: window.innerWidth,
1021
- height: window.innerHeight - u()
1021
+ height: window.innerHeight - f()
1022
1022
  };
1023
1023
  }
1024
1024
  var Wt = null;
@@ -1034,14 +1034,14 @@ function Kt(e) {
1034
1034
  };
1035
1035
  }
1036
1036
  function qt(e) {
1037
- let t = Z(57), { src: n, name: r, mimeType: i, onError: a, ref: o } = e, s = c(), l = Oe(null), u;
1037
+ let t = Z(57), { src: n, name: r, mimeType: a, onError: o, ref: s } = e, c = i(), l = Oe(null), u;
1038
1038
  t[0] === Symbol.for("react.memo_cache_sentinel") ? (u = {
1039
1039
  width: 0,
1040
1040
  height: 0
1041
1041
  }, t[0] = u) : u = t[0];
1042
1042
  let [d, f] = X(u), p = ke(Kt, Gt), [m, h] = X(1), [g, _] = X(p);
1043
1043
  g !== p && (_(p), h(1));
1044
- let v = Oe(null), y = Oe(!1), [b, x] = X(!1), S = Math.max(1, Math.min(p.height * .86, p.height - 160)), C = Math.min(i === "image/svg+xml" ? Infinity : 1, (p.width * .92 - (p.width >= 640 ? 96 : 0)) / (d.width || 1), S / (d.height || 1)), w = d.width * C * m, T = d.height * C * m, E, D;
1044
+ let v = Oe(null), y = Oe(!1), [b, x] = X(!1), S = Math.max(1, Math.min(p.height * .86, p.height - 160)), C = Math.min(a === "image/svg+xml" ? Infinity : 1, (p.width * .92 - (p.width >= 640 ? 96 : 0)) / (d.width || 1), S / (d.height || 1)), w = d.width * C * m, T = d.height * C * m, E, D;
1045
1045
  t[1] === m ? (E = t[2], D = t[3]) : (E = () => ({ pan(e) {
1046
1046
  let t = l.current;
1047
1047
  if (!t || m <= 1 || (e === "ArrowLeft" || e === "ArrowRight") && t.scrollWidth <= t.offsetWidth) return !1;
@@ -1061,7 +1061,7 @@ function qt(e) {
1061
1061
  default: return !1;
1062
1062
  }
1063
1063
  return !0;
1064
- } }), D = [m], t[1] = m, t[2] = E, t[3] = D), De(o, E, D);
1064
+ } }), D = [m], t[1] = m, t[2] = E, t[3] = D), De(s, E, D);
1065
1065
  let O;
1066
1066
  t[4] === m ? O = t[5] : (O = (e, t) => {
1067
1067
  let n = l.current, r = Math.min(Ht, Math.max(1, e));
@@ -1088,9 +1088,9 @@ function qt(e) {
1088
1088
  };
1089
1089
  }, t[6] = k, t[7] = m, t[8] = A) : A = t[8];
1090
1090
  let j = A, M;
1091
- t[9] !== s || t[10] !== r ? (M = s("{name}, zoomable image", { name: r }), t[9] = s, t[10] = r, t[11] = M) : M = t[11];
1091
+ t[9] !== c || t[10] !== r ? (M = c("{name}, zoomable image", { name: r }), t[9] = c, t[10] = r, t[11] = M) : M = t[11];
1092
1092
  let N;
1093
- t[12] === s ? N = t[13] : (N = s("Click to zoom in or return to fit. Pinch or Ctrl+scroll to zoom, scroll or drag to pan. Use Enter to toggle zoom, plus or minus to zoom, and 0 to fit."), t[12] = s, t[13] = N);
1093
+ t[12] === c ? N = t[13] : (N = c("Click to zoom in or return to fit. Pinch or Ctrl+scroll to zoom, scroll or drag to pan. Use Enter to toggle zoom, plus or minus to zoom, and 0 to fit."), t[12] = c, t[13] = N);
1094
1094
  let ee = w || void 0, te = T || void 0, P = m > 1 ? b ? "grabbing" : "grab" : "zoom-in", ne;
1095
1095
  t[14] !== S || t[15] !== P || t[16] !== ee || t[17] !== te ? (ne = {
1096
1096
  width: ee,
@@ -1098,17 +1098,17 @@ function qt(e) {
1098
1098
  maxHeight: S,
1099
1099
  cursor: P
1100
1100
  }, t[14] = S, t[15] = P, t[16] = ee, t[17] = te, t[18] = ne) : ne = t[18];
1101
- let F, re;
1101
+ let F, I;
1102
1102
  t[19] !== k || t[20] !== m ? (F = (e) => {
1103
1103
  y.current || e.detail > 1 || k(m > 1 ? 1 : 2, {
1104
1104
  x: e.clientX,
1105
1105
  y: e.clientY
1106
1106
  });
1107
- }, re = (e) => {
1107
+ }, I = (e) => {
1108
1108
  e.ctrlKey || e.metaKey || e.altKey || (e.key === "Enter" || e.key === " " ? (e.preventDefault(), e.repeat || k(m > 1 ? 1 : 2)) : e.key === "+" || e.key === "=" ? (e.preventDefault(), k(m * 1.5)) : e.key === "-" ? (e.preventDefault(), k(m / 1.5)) : e.key === "0" && (e.preventDefault(), k(1)));
1109
- }, t[19] = k, t[20] = m, t[21] = F, t[22] = re) : (F = t[21], re = t[22]);
1110
- let ie;
1111
- t[23] === m ? ie = t[24] : (ie = (e) => {
1109
+ }, t[19] = k, t[20] = m, t[21] = F, t[22] = I) : (F = t[21], I = t[22]);
1110
+ let re;
1111
+ t[23] === m ? re = t[24] : (re = (e) => {
1112
1112
  if (v.current || (y.current = !1, e.pointerType !== "mouse" || e.button !== 0 || m <= 1)) return;
1113
1113
  let t = e.currentTarget, n = t.getBoundingClientRect();
1114
1114
  e.clientX - n.left >= t.clientWidth || e.clientY - n.top >= t.clientHeight || (v.current = {
@@ -1118,45 +1118,45 @@ function qt(e) {
1118
1118
  left: t.scrollLeft,
1119
1119
  top: t.scrollTop
1120
1120
  }, t.setPointerCapture(e.pointerId), x(!0));
1121
- }, t[23] = m, t[24] = ie);
1122
- let I, ae, L;
1123
- t[25] === Symbol.for("react.memo_cache_sentinel") ? (I = (e) => {
1121
+ }, t[23] = m, t[24] = re);
1122
+ let L, ie, R;
1123
+ t[25] === Symbol.for("react.memo_cache_sentinel") ? (L = (e) => {
1124
1124
  let t = v.current;
1125
1125
  t && t.pointerId === e.pointerId && (Math.hypot(e.clientX - t.x, e.clientY - t.y) > 4 && (y.current = !0), e.currentTarget.scrollLeft = t.left - (e.clientX - t.x), e.currentTarget.scrollTop = t.top - (e.clientY - t.y));
1126
- }, ae = (e) => {
1126
+ }, ie = (e) => {
1127
1127
  v.current?.pointerId === e.pointerId && (e.currentTarget.hasPointerCapture(e.pointerId) && e.currentTarget.releasePointerCapture(e.pointerId), v.current = null, x(!1));
1128
- }, L = (e) => {
1128
+ }, R = (e) => {
1129
1129
  v.current?.pointerId === e.pointerId && (v.current = null, x(!1));
1130
- }, t[25] = I, t[26] = ae, t[27] = L) : (I = t[25], ae = t[26], L = t[27]);
1131
- let R;
1132
- t[28] !== T || t[29] !== S || t[30] !== d.width || t[31] !== w ? (R = d.width ? {
1130
+ }, t[25] = L, t[26] = ie, t[27] = R) : (L = t[25], ie = t[26], R = t[27]);
1131
+ let z;
1132
+ t[28] !== T || t[29] !== S || t[30] !== d.width || t[31] !== w ? (z = d.width ? {
1133
1133
  width: w,
1134
1134
  height: T
1135
1135
  } : {
1136
1136
  maxWidth: "var(--media-width)",
1137
1137
  maxHeight: S
1138
- }, t[28] = T, t[29] = S, t[30] = d.width, t[31] = w, t[32] = R) : R = t[32];
1139
- let z;
1140
- t[33] === Symbol.for("react.memo_cache_sentinel") ? (z = (e) => {
1138
+ }, t[28] = T, t[29] = S, t[30] = d.width, t[31] = w, t[32] = z) : z = t[32];
1139
+ let B;
1140
+ t[33] === Symbol.for("react.memo_cache_sentinel") ? (B = (e) => {
1141
1141
  f({
1142
1142
  width: e.currentTarget.naturalWidth,
1143
1143
  height: e.currentTarget.naturalHeight
1144
1144
  });
1145
- }, t[33] = z) : z = t[33];
1146
- let B;
1147
- t[34] !== i || t[35] !== r || t[36] !== a || t[37] !== n || t[38] !== R ? (B = /* @__PURE__ */ Q(at, {
1145
+ }, t[33] = B) : B = t[33];
1146
+ let V;
1147
+ t[34] !== a || t[35] !== r || t[36] !== o || t[37] !== n || t[38] !== z ? (V = /* @__PURE__ */ Q(at, {
1148
1148
  name: r,
1149
- mimeType: i,
1149
+ mimeType: a,
1150
1150
  src: n,
1151
1151
  alt: r,
1152
1152
  draggable: !1,
1153
1153
  className: "block max-w-none select-none",
1154
- style: R,
1155
- onLoad: z,
1156
- onError: a
1157
- }), t[34] = i, t[35] = r, t[36] = a, t[37] = n, t[38] = R, t[39] = B) : B = t[39];
1158
- let V;
1159
- t[40] !== j || t[41] !== ne || t[42] !== F || t[43] !== re || t[44] !== ie || t[45] !== B || t[46] !== M || t[47] !== N ? (V = /* @__PURE__ */ Q("div", {
1154
+ style: z,
1155
+ onLoad: B,
1156
+ onError: o
1157
+ }), t[34] = a, t[35] = r, t[36] = o, t[37] = n, t[38] = z, t[39] = V) : V = t[39];
1158
+ let H;
1159
+ t[40] !== j || t[41] !== ne || t[42] !== F || t[43] !== I || t[44] !== re || t[45] !== V || t[46] !== M || t[47] !== N ? (H = /* @__PURE__ */ Q("div", {
1160
1160
  ref: j,
1161
1161
  role: "region",
1162
1162
  "aria-label": M,
@@ -1165,26 +1165,26 @@ function qt(e) {
1165
1165
  className: "max-w-[var(--media-width)] overflow-auto overscroll-contain rounded-lg bg-background shadow-2xl ring-1 ring-border/70 outline-none focus-visible:outline-2 focus-visible:outline-solid focus-visible:-outline-offset-2 focus-visible:outline-ring",
1166
1166
  style: ne,
1167
1167
  onClick: F,
1168
- onKeyDown: re,
1169
- onPointerDown: ie,
1170
- onPointerMove: I,
1171
- onPointerUp: ae,
1172
- onLostPointerCapture: L,
1173
- children: B
1174
- }), t[40] = j, t[41] = ne, t[42] = F, t[43] = re, t[44] = ie, t[45] = B, t[46] = M, t[47] = N, t[48] = V) : V = t[48];
1175
- let H;
1176
- t[49] !== s || t[50] !== m ? (H = s("{percent}% zoom", { percent: Math.round(m * 100) }), t[49] = s, t[50] = m, t[51] = H) : H = t[51];
1168
+ onKeyDown: I,
1169
+ onPointerDown: re,
1170
+ onPointerMove: L,
1171
+ onPointerUp: ie,
1172
+ onLostPointerCapture: R,
1173
+ children: V
1174
+ }), t[40] = j, t[41] = ne, t[42] = F, t[43] = I, t[44] = re, t[45] = V, t[46] = M, t[47] = N, t[48] = H) : H = t[48];
1177
1175
  let U;
1178
- t[52] === H ? U = t[53] : (U = /* @__PURE__ */ Q("span", {
1176
+ t[49] !== c || t[50] !== m ? (U = c("{percent}% zoom", { percent: Math.round(m * 100) }), t[49] = c, t[50] = m, t[51] = U) : U = t[51];
1177
+ let W;
1178
+ t[52] === U ? W = t[53] : (W = /* @__PURE__ */ Q("span", {
1179
1179
  className: "sr-only",
1180
1180
  "aria-live": "polite",
1181
- children: H
1182
- }), t[52] = H, t[53] = U);
1183
- let W;
1184
- return t[54] !== V || t[55] !== U ? (W = /* @__PURE__ */ $("div", {
1181
+ children: U
1182
+ }), t[52] = U, t[53] = W);
1183
+ let G;
1184
+ return t[54] !== H || t[55] !== W ? (G = /* @__PURE__ */ $("div", {
1185
1185
  className: "min-w-0",
1186
- children: [V, U]
1187
- }), t[54] = V, t[55] = U, t[56] = W) : W = t[56], W;
1186
+ children: [H, W]
1187
+ }), t[54] = H, t[55] = W, t[56] = G) : G = t[56], G;
1188
1188
  }
1189
1189
  // src/components/chat/ExpandedImageDialog.tsx
1190
1190
  var Jt = "flex aspect-auto h-48 min-h-0 w-[min(var(--media-width),32rem)] flex-col items-center justify-center gap-3 rounded-lg border border-border/70 bg-black p-6 text-center text-sm text-white shadow-2xl";
@@ -1199,10 +1199,10 @@ function Yt(e) {
1199
1199
  function Xt(e) {
1200
1200
  if (e.mimeType) return e.mimeType;
1201
1201
  let t = e.actionsSource?.reference, n = t && A(t);
1202
- return n ? s(n.slice(n.lastIndexOf("."))) ?? void 0 : o(e.src ?? "") ?? void 0;
1202
+ return n ? u(n.slice(n.lastIndexOf("."))) ?? void 0 : c(e.src ?? "") ?? void 0;
1203
1203
  }
1204
1204
  function Zt(e) {
1205
- let t = Z(7), { item: n } = e, r = n.actionsSource?.asset, i = se(r?.environmentId ?? null, r?.resource ?? null), a = Y(r?.environmentId ?? null, r?.resource ?? null), o = r ? i._tag === "Success" ? i.url + (n.srcFragment ?? "") : null : n.src, s = i._tag === "Failure", c = n.autoPlay ?? !0, l = r ? a : void 0, u;
1205
+ let t = Z(7), { item: n } = e, r = n.actionsSource?.asset, i = oe(r?.environmentId ?? null, r?.resource ?? null), a = se(r?.environmentId ?? null, r?.resource ?? null), o = r ? i._tag === "Success" ? i.url + (n.srcFragment ?? "") : null : n.src, s = i._tag === "Failure", c = n.autoPlay ?? !0, l = r ? a : void 0, u;
1206
1206
  return t[0] !== n.name || t[1] !== n.originalUrl || t[2] !== o || t[3] !== s || t[4] !== c || t[5] !== l ? (u = /* @__PURE__ */ Q(Tt, {
1207
1207
  src: o,
1208
1208
  label: n.name,
@@ -1217,7 +1217,7 @@ function Zt(e) {
1217
1217
  }), t[0] = n.name, t[1] = n.originalUrl, t[2] = o, t[3] = s, t[4] = c, t[5] = l, t[6] = u) : u = t[6], u;
1218
1218
  }
1219
1219
  var Qt = we(function(e) {
1220
- let t = Z(90), { preview: n, onClose: r } = e, i = c(), [a, o] = X(0), [s, l] = X(null), [u, d] = X(null), f = Oe(null), [p] = X(on), m;
1220
+ let t = Z(90), { preview: n, onClose: r } = e, a = i(), [o, s] = X(0), [c, l] = X(null), [u, d] = X(null), f = Oe(null), [p] = X(on), m;
1221
1221
  t[0] !== r || t[1] !== p ? (m = () => {
1222
1222
  je(r);
1223
1223
  let { target: e, focusVisible: t } = p;
@@ -1226,120 +1226,120 @@ var Qt = we(function(e) {
1226
1226
  focusVisible: t
1227
1227
  });
1228
1228
  }, t[0] = r, t[1] = p, t[2] = m) : m = t[2];
1229
- let g = m, y = Oe(null), b = n.images.length, x = b > 0 ? ((n.index + a) % b + b) % b : 0, S = n.images[x], C;
1230
- t[3] !== i || t[4] !== S?.actionsSource || t[5] !== S?.name || t[6] !== S?.src || t[7] !== S?.type ? (C = S?.actionsSource ?? {
1231
- kind: S?.type === "video" ? "video" : "image",
1232
- name: S?.name ?? i("Media"),
1233
- src: S?.src ?? null
1234
- }, t[3] = i, t[4] = S?.actionsSource, t[5] = S?.name, t[6] = S?.src, t[7] = S?.type, t[8] = C) : C = t[8];
1235
- let w = C, D = w.onOpenFile, O;
1236
- t[9] !== g || t[10] !== D || t[11] !== w ? (O = D ? {
1237
- ...w,
1229
+ let h = m, _ = Oe(null), x = n.images.length, S = x > 0 ? ((n.index + o) % x + x) % x : 0, C = n.images[S], w;
1230
+ t[3] !== a || t[4] !== C?.actionsSource || t[5] !== C?.name || t[6] !== C?.src || t[7] !== C?.type ? (w = C?.actionsSource ?? {
1231
+ kind: C?.type === "video" ? "video" : "image",
1232
+ name: C?.name ?? a("Media"),
1233
+ src: C?.src ?? null
1234
+ }, t[3] = a, t[4] = C?.actionsSource, t[5] = C?.name, t[6] = C?.src, t[7] = C?.type, t[8] = w) : w = t[8];
1235
+ let T = w, D = T.onOpenFile, O;
1236
+ t[9] !== h || t[10] !== D || t[11] !== T ? (O = D ? {
1237
+ ...T,
1238
1238
  onOpenFile: () => {
1239
- D(), g();
1239
+ D(), h();
1240
1240
  }
1241
- } : w, t[9] = g, t[10] = D, t[11] = w, t[12] = O) : O = t[12];
1241
+ } : T, t[9] = h, t[10] = D, t[11] = T, t[12] = O) : O = t[12];
1242
1242
  let k = O, A;
1243
1243
  t[13] === Symbol.for("react.memo_cache_sentinel") ? (A = (e) => {
1244
- o((t) => t + e);
1244
+ s((t) => t + e);
1245
1245
  }, t[13] = A) : A = t[13];
1246
1246
  let j = A, M;
1247
1247
  t[14] === n.images.length ? M = t[15] : (M = (e) => {
1248
- e.defaultPrevented || oe() || e.target instanceof HTMLVideoElement || (f.current?.pan(e.key) ? (e.preventDefault(), e.stopPropagation()) : n.images.length <= 1 || (e.key === "ArrowLeft" ? (e.preventDefault(), e.stopPropagation(), j(-1)) : e.key === "ArrowRight" && (e.preventDefault(), e.stopPropagation(), j(1))));
1248
+ e.defaultPrevented || ae() || e.target instanceof HTMLVideoElement || (f.current?.pan(e.key) ? (e.preventDefault(), e.stopPropagation()) : n.images.length <= 1 || (e.key === "ArrowLeft" ? (e.preventDefault(), e.stopPropagation(), j(-1)) : e.key === "ArrowRight" && (e.preventDefault(), e.stopPropagation(), j(1))));
1249
1249
  }, t[14] = n.images.length, t[15] = M);
1250
1250
  let N = M;
1251
- if (!S) return null;
1252
- let P = S.type === "video", F;
1253
- t[16] === S.originalUrl ? F = t[17] : (F = S.originalUrl && Ue(S.originalUrl) !== null ? /* @__PURE__ */ Q(vt, { originalUrl: S.originalUrl }) : null, t[16] = S.originalUrl, t[17] = F);
1254
- let re = F, I;
1255
- t[18] === S.source ? I = t[19] : (I = S.source ? It(S.source) : void 0, t[18] = S.source, t[19] = I);
1256
- let L = I, R = !!L && u === S.src, z;
1257
- t[20] !== L?.format || t[21] !== i || t[22] !== R ? (z = R ? i("Show screenshot") : L?.format === "json" ? i("Show accessibility JSON") : i("Show extracted text"), t[20] = L?.format, t[21] = i, t[22] = R, t[23] = z) : z = t[23];
1258
- let B = z, V;
1259
- t[24] === g ? V = t[25] : (V = (e, t) => {
1260
- e || (t.reason === "escape-key" && oe() ? t.cancel() : g());
1261
- }, t[24] = g, t[25] = V);
1262
- let H;
1263
- t[26] === p.target ? H = t[27] : (H = () => p.target, t[26] = p.target, t[27] = H);
1251
+ if (!C) return null;
1252
+ let P = C.type === "video", F;
1253
+ t[16] === C.originalUrl ? F = t[17] : (F = C.originalUrl && Ue(C.originalUrl) !== null ? /* @__PURE__ */ Q(vt, { originalUrl: C.originalUrl }) : null, t[16] = C.originalUrl, t[17] = F);
1254
+ let I = F, L;
1255
+ t[18] === C.source ? L = t[19] : (L = C.source ? It(C.source) : void 0, t[18] = C.source, t[19] = L);
1256
+ let R = L, z = !!R && u === C.src, B;
1257
+ t[20] !== R?.format || t[21] !== a || t[22] !== z ? (B = z ? a("Show screenshot") : R?.format === "json" ? a("Show accessibility JSON") : a("Show extracted text"), t[20] = R?.format, t[21] = a, t[22] = z, t[23] = B) : B = t[23];
1258
+ let V = B, H;
1259
+ t[24] === h ? H = t[25] : (H = (e, t) => {
1260
+ e || (t.reason === "escape-key" && ae() ? t.cancel() : h());
1261
+ }, t[24] = h, t[25] = H);
1264
1262
  let U;
1265
- t[28] === g ? U = t[29] : (U = (e) => {
1266
- e.target === e.currentTarget && g();
1267
- }, t[28] = g, t[29] = U);
1263
+ t[26] === p.target ? U = t[27] : (U = () => p.target, t[26] = p.target, t[27] = U);
1268
1264
  let W;
1269
- t[30] !== i || t[31] !== P ? (W = i(P ? "Expanded video preview" : "Expanded image preview"), t[30] = i, t[31] = P, t[32] = W) : W = t[32];
1265
+ t[28] === h ? W = t[29] : (W = (e) => {
1266
+ e.target === e.currentTarget && h();
1267
+ }, t[28] = h, t[29] = W);
1270
1268
  let G;
1271
- t[33] === W ? G = t[34] : (G = /* @__PURE__ */ Q(de, {
1272
- className: "sr-only",
1273
- children: W
1274
- }), t[33] = W, t[34] = G);
1269
+ t[30] !== a || t[31] !== P ? (G = a(P ? "Expanded video preview" : "Expanded image preview"), t[30] = a, t[31] = P, t[32] = G) : G = t[32];
1275
1270
  let K;
1276
- t[35] !== i || t[36] !== P ? (K = i(P ? "Back, close video preview" : "Back, close image preview"), t[35] = i, t[36] = P, t[37] = K) : K = t[37];
1277
- let q, J;
1278
- t[38] === Symbol.for("react.memo_cache_sentinel") ? (q = /* @__PURE__ */ Q(te, { "aria-hidden": "true" }), J = /* @__PURE__ */ Q(T, { children: "Back" }), t[38] = q, t[39] = J) : (q = t[38], J = t[39]);
1279
- let se;
1280
- t[40] !== g || t[41] !== K ? (se = /* @__PURE__ */ $(h, {
1271
+ t[33] === G ? K = t[34] : (K = /* @__PURE__ */ Q(de, {
1272
+ className: "sr-only",
1273
+ children: G
1274
+ }), t[33] = G, t[34] = K);
1275
+ let q;
1276
+ t[35] !== a || t[36] !== P ? (q = a(P ? "Back, close video preview" : "Back, close image preview"), t[35] = a, t[36] = P, t[37] = q) : q = t[37];
1277
+ let J, Y;
1278
+ t[38] === Symbol.for("react.memo_cache_sentinel") ? (J = /* @__PURE__ */ Q(te, { "aria-hidden": "true" }), Y = /* @__PURE__ */ Q(g, { children: "Back" }), t[38] = J, t[39] = Y) : (J = t[38], Y = t[39]);
1279
+ let oe;
1280
+ t[40] !== h || t[41] !== q ? (oe = /* @__PURE__ */ $(v, {
1281
1281
  type: "button",
1282
- ref: y,
1282
+ ref: _,
1283
1283
  size: "sm",
1284
1284
  variant: "media-close",
1285
1285
  className: "absolute left-0 top-0 z-20 max-[8rem]:left-1/2 max-[8rem]:-translate-x-1/2",
1286
- onClick: g,
1287
- "aria-label": K,
1288
- children: [q, J]
1289
- }), t[40] = g, t[41] = K, t[42] = se) : se = t[42];
1290
- let Y;
1291
- t[43] !== i || t[44] !== n.images.length ? (Y = n.images.length > 1 && /* @__PURE__ */ Q(h, {
1286
+ onClick: h,
1287
+ "aria-label": q,
1288
+ children: [J, Y]
1289
+ }), t[40] = h, t[41] = q, t[42] = oe) : oe = t[42];
1290
+ let se;
1291
+ t[43] !== a || t[44] !== n.images.length ? (se = n.images.length > 1 && /* @__PURE__ */ Q(v, {
1292
1292
  type: "button",
1293
1293
  size: "icon",
1294
1294
  variant: "media-navigation",
1295
1295
  className: "left-0 top-auto bottom-0 translate-y-0 sm:top-1/2 sm:bottom-auto sm:-translate-y-1/2",
1296
- "aria-label": i("Previous media"),
1296
+ "aria-label": a("Previous media"),
1297
1297
  onClick: () => j(-1),
1298
1298
  children: /* @__PURE__ */ Q(ne, { className: "size-5" })
1299
- }), t[43] = i, t[44] = n.images.length, t[45] = Y) : Y = t[45];
1299
+ }), t[43] = a, t[44] = n.images.length, t[45] = se) : se = t[45];
1300
1300
  let ce;
1301
- t[46] !== L || t[47] !== s || t[48] !== i || t[49] !== x || t[50] !== S || t[51] !== re || t[52] !== R ? (ce = S.type === "video" ? /* @__PURE__ */ Q(Zt, { item: S }, x) : R ? L ? /* @__PURE__ */ Q(Ft, {
1302
- details: L,
1301
+ t[46] !== R || t[47] !== c || t[48] !== a || t[49] !== S || t[50] !== C || t[51] !== I || t[52] !== z ? (ce = C.type === "video" ? /* @__PURE__ */ Q(Zt, { item: C }, S) : z ? R ? /* @__PURE__ */ Q(Ft, {
1302
+ details: R,
1303
1303
  className: "h-[min(var(--media-height),40rem)] w-[min(var(--media-width),42rem)] transition-opacity duration-140 ease-out starting:opacity-0 rounded-lg border border-border/70 bg-background p-4 text-xs leading-5 shadow-2xl motion-reduce:transition-none"
1304
- }) : null : S.src === null || s === S.src ? /* @__PURE__ */ $(Yt, { children: [/* @__PURE__ */ Q("p", { children: i(re ? "This image could not be loaded." : "Image unavailable. The file may have been moved or deleted.") }), re] }) : /* @__PURE__ */ Q(qt, {
1304
+ }) : null : C.src === null || c === C.src ? /* @__PURE__ */ $(Yt, { children: [/* @__PURE__ */ Q("p", { children: a(I ? "This image could not be loaded." : "Image unavailable. The file may have been moved or deleted.") }), I] }) : /* @__PURE__ */ Q(qt, {
1305
1305
  ref: f,
1306
- src: S.src,
1307
- name: S.name,
1308
- mimeType: Xt(S),
1309
- onError: () => l(S.src)
1310
- }, `${x}:${S.src}`), t[46] = L, t[47] = s, t[48] = i, t[49] = x, t[50] = S, t[51] = re, t[52] = R, t[53] = ce) : ce = t[53];
1311
- let le = n.images.length > 1 ? ` (${x + 1}/${n.images.length})` : "", ue;
1312
- t[54] !== S.name || t[55] !== le ? (ue = /* @__PURE__ */ $("span", {
1306
+ src: C.src,
1307
+ name: C.name,
1308
+ mimeType: Xt(C),
1309
+ onError: () => l(C.src)
1310
+ }, `${S}:${C.src}`), t[46] = R, t[47] = c, t[48] = a, t[49] = S, t[50] = C, t[51] = I, t[52] = z, t[53] = ce) : ce = t[53];
1311
+ let le = n.images.length > 1 ? ` (${S + 1}/${n.images.length})` : "", ue;
1312
+ t[54] !== C.name || t[55] !== le ? (ue = /* @__PURE__ */ $("span", {
1313
1313
  className: "truncate",
1314
1314
  "aria-live": "polite",
1315
1315
  "aria-atomic": "true",
1316
- children: [S.name, le]
1317
- }), t[54] = S.name, t[55] = le, t[56] = ue) : ue = t[56];
1316
+ children: [C.name, le]
1317
+ }), t[54] = C.name, t[55] = le, t[56] = ue) : ue = t[56];
1318
1318
  let me;
1319
- t[57] !== L || t[58] !== B || t[59] !== S.source || t[60] !== S.src || t[61] !== R ? (me = L && S.source ? /* @__PURE__ */ $(v, { children: [/* @__PURE__ */ Q(E, {
1320
- render: /* @__PURE__ */ Q(h, {
1321
- "aria-label": B,
1322
- "aria-pressed": R,
1323
- onClick: () => d(R ? null : S.src),
1319
+ t[57] !== R || t[58] !== V || t[59] !== C.source || t[60] !== C.src || t[61] !== z ? (me = R && C.source ? /* @__PURE__ */ $(b, { children: [/* @__PURE__ */ Q(E, {
1320
+ render: /* @__PURE__ */ Q(v, {
1321
+ "aria-label": V,
1322
+ "aria-pressed": z,
1323
+ onClick: () => d(z ? null : C.src),
1324
1324
  size: "icon-micro",
1325
1325
  variant: "overlay"
1326
1326
  }),
1327
- children: Q(R ? ie : ae, {
1327
+ children: Q(z ? re : ie, {
1328
1328
  className: "size-3",
1329
1329
  "aria-hidden": "true"
1330
1330
  })
1331
- }), /* @__PURE__ */ Q(_, {
1331
+ }), /* @__PURE__ */ Q(y, {
1332
1332
  side: "top",
1333
- children: B
1334
- })] }) : S.source ? /* @__PURE__ */ Q(zt, {
1335
- source: S.source,
1333
+ children: V
1334
+ })] }) : C.source ? /* @__PURE__ */ Q(zt, {
1335
+ source: C.source,
1336
1336
  side: "top"
1337
- }) : null, t[57] = L, t[58] = B, t[59] = S.source, t[60] = S.src, t[61] = R, t[62] = me) : me = t[62];
1337
+ }) : null, t[57] = R, t[58] = V, t[59] = C.source, t[60] = C.src, t[61] = z, t[62] = me) : me = t[62];
1338
1338
  let he;
1339
- t[63] === S.onCopySnapshot ? he = t[64] : (he = S.onCopySnapshot && /* @__PURE__ */ Q("div", {
1339
+ t[63] === C.onCopySnapshot ? he = t[64] : (he = C.onCopySnapshot && /* @__PURE__ */ Q("div", {
1340
1340
  className: "-my-1.5",
1341
- children: /* @__PURE__ */ Q(Rt, { onCopy: S.onCopySnapshot })
1342
- }), t[63] = S.onCopySnapshot, t[64] = he);
1341
+ children: /* @__PURE__ */ Q(Rt, { onCopy: C.onCopySnapshot })
1342
+ }), t[63] = C.onCopySnapshot, t[64] = he);
1343
1343
  let ge;
1344
1344
  t[65] !== ue || t[66] !== me || t[67] !== he ? (ge = /* @__PURE__ */ $("div", {
1345
1345
  className: "mt-2 flex max-w-[var(--media-width)] items-center justify-center gap-1.5 text-xs text-white/80 max-sm:px-10",
@@ -1361,17 +1361,17 @@ var Qt = we(function(e) {
1361
1361
  children: _e
1362
1362
  }), t[72] = k, t[73] = _e, t[74] = ve) : ve = t[74];
1363
1363
  let ye;
1364
- t[75] !== i || t[76] !== n.images.length ? (ye = n.images.length > 1 && /* @__PURE__ */ Q(h, {
1364
+ t[75] !== a || t[76] !== n.images.length ? (ye = n.images.length > 1 && /* @__PURE__ */ Q(v, {
1365
1365
  type: "button",
1366
1366
  size: "icon",
1367
1367
  variant: "media-navigation",
1368
1368
  className: "right-0 top-auto bottom-0 translate-y-0 sm:top-1/2 sm:bottom-auto sm:-translate-y-1/2",
1369
- "aria-label": i("Next media"),
1369
+ "aria-label": a("Next media"),
1370
1370
  onClick: () => j(1),
1371
1371
  children: /* @__PURE__ */ Q(ee, { className: "size-5" })
1372
- }), t[75] = i, t[76] = n.images.length, t[77] = ye) : ye = t[77];
1372
+ }), t[75] = a, t[76] = n.images.length, t[77] = ye) : ye = t[77];
1373
1373
  let be;
1374
- t[78] !== N || t[79] !== H || t[80] !== U || t[81] !== G || t[82] !== se || t[83] !== Y || t[84] !== ve || t[85] !== ye ? (be = /* @__PURE__ */ $(pe, {
1374
+ t[78] !== N || t[79] !== U || t[80] !== W || t[81] !== K || t[82] !== oe || t[83] !== se || t[84] !== ve || t[85] !== ye ? (be = /* @__PURE__ */ $(pe, {
1375
1375
  ...ct,
1376
1376
  variant: "media",
1377
1377
  mediaControlsPlacement: "inside",
@@ -1379,31 +1379,31 @@ var Qt = we(function(e) {
1379
1379
  bottomStickOnMobile: !1,
1380
1380
  className: "row-start-1 h-full max-h-[92vh] w-[92vw] max-w-[92vw] items-center justify-center overflow-visible [--media-width:92vw] [--media-height:min(calc((100vh-var(--native-titlebar-height,0px))*0.86),calc(100vh-var(--native-titlebar-height,0px)-160px))] sm:[--media-width:calc(92vw-96px)]",
1381
1381
  onKeyDown: N,
1382
- initialFocus: y,
1383
- finalFocus: H,
1384
- onClick: U,
1382
+ initialFocus: _,
1383
+ finalFocus: U,
1384
+ onClick: W,
1385
1385
  children: [
1386
- G,
1386
+ K,
1387
+ oe,
1387
1388
  se,
1388
- Y,
1389
1389
  ve,
1390
1390
  ye
1391
1391
  ]
1392
- }), t[78] = N, t[79] = H, t[80] = U, t[81] = G, t[82] = se, t[83] = Y, t[84] = ve, t[85] = ye, t[86] = be) : be = t[86];
1392
+ }), t[78] = N, t[79] = U, t[80] = W, t[81] = K, t[82] = oe, t[83] = se, t[84] = ve, t[85] = ye, t[86] = be) : be = t[86];
1393
1393
  let xe;
1394
- return t[87] !== be || t[88] !== V ? (xe = /* @__PURE__ */ Q(fe, {
1394
+ return t[87] !== be || t[88] !== H ? (xe = /* @__PURE__ */ Q(fe, {
1395
1395
  open: !0,
1396
- onOpenChange: V,
1396
+ onOpenChange: H,
1397
1397
  children: be
1398
- }), t[87] = be, t[88] = V, t[89] = xe) : xe = t[89], xe;
1399
- }), $t = p(null).pipe(f, b("chat:expanded-image-preview"));
1398
+ }), t[87] = be, t[88] = H, t[89] = xe) : xe = t[89], xe;
1399
+ }), $t = l(null).pipe(m, _("chat:expanded-image-preview"));
1400
1400
  function en(e) {
1401
1401
  let t = e?.preview.images[e.preview.index];
1402
1402
  return t?.ownsSrc === !0 ? t.src : null;
1403
1403
  }
1404
1404
  function tn(e) {
1405
- let t = en(y.get($t));
1406
- y.set($t, e), t !== null && t !== en(e) && URL.revokeObjectURL(t);
1405
+ let t = en(x.get($t));
1406
+ x.set($t, e), t !== null && t !== en(e) && URL.revokeObjectURL(t);
1407
1407
  }
1408
1408
  function nn(e, t) {
1409
1409
  tn({
@@ -1415,19 +1415,19 @@ function rn() {
1415
1415
  tn(null);
1416
1416
  }
1417
1417
  Ne((e) => {
1418
- let t = y.get($t);
1418
+ let t = x.get($t);
1419
1419
  t !== null && t.threadKey !== e && rn();
1420
1420
  });
1421
1421
  function an(e) {
1422
- let t = Z(5), { threadKey: n } = e, r = a($t), i = r?.threadKey === n ? r.preview : null;
1422
+ let t = Z(5), { threadKey: n } = e, r = s($t), i = r?.threadKey === n ? r.preview : null;
1423
1423
  if (i === null) return null;
1424
+ let a;
1425
+ t[0] === i ? a = t[1] : (a = tt(i), t[0] = i, t[1] = a);
1424
1426
  let o;
1425
- t[0] === i ? o = t[1] : (o = tt(i), t[0] = i, t[1] = o);
1426
- let s;
1427
- return t[2] !== i || t[3] !== o ? (s = /* @__PURE__ */ Q(Qt, {
1427
+ return t[2] !== i || t[3] !== a ? (o = /* @__PURE__ */ Q(Qt, {
1428
1428
  preview: i,
1429
1429
  onClose: rn
1430
- }, o), t[2] = i, t[3] = o, t[4] = s) : s = t[4], s;
1430
+ }, a), t[2] = i, t[3] = a, t[4] = o) : o = t[4], o;
1431
1431
  }
1432
1432
  function on() {
1433
1433
  let e = document.activeElement instanceof HTMLElement ? document.activeElement : null;