@ethora/chat-component 26.10.6 → 26.10.8

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 (94) hide show
  1. package/README.md +102 -3
  2. package/dist/ChatProfileModal-83t5BRkI.js +2298 -0
  3. package/dist/{FilePreviewModal-DwNUEHei.js → FilePreviewModal-DxUGjSHe.js} +135 -135
  4. package/dist/{ManageDataModal-CaQ2VBPn.js → ManageDataModal-DFE_Wegj.js} +24 -24
  5. package/dist/{MarkdownBody-BeoG2cpo.js → MarkdownBody-uFITrPjT.js} +1 -1
  6. package/dist/{MessageSearchModal-DMw9o49-.js → MessageSearchModal-CsbTWgNm.js} +46 -46
  7. package/dist/{PublicChatsModal-CWdYILv_.js → PublicChatsModal-bDOp3IL9.js} +18 -18
  8. package/dist/{SideDrawer-Cl-vbuIG.js → SideDrawer-A_1ECqD2.js} +29 -29
  9. package/dist/UserProfileModal-Ca5wHYvr.js +639 -0
  10. package/dist/{UserSettingsModal-DgCAHmNh.js → UserSettingsModal-CAyyQGV6.js} +4 -4
  11. package/dist/{VideoCallOverlay-Cq2cECWj.js → VideoCallOverlay-BMiQh8kI.js} +6605 -4726
  12. package/dist/{VisibilityModal-D7vqGbrA.js → VisibilityModal-BXyIy7_J.js} +12 -12
  13. package/dist/assets/icons.d.ts +4 -0
  14. package/dist/calls/callDisplay.d.ts +22 -0
  15. package/dist/calls/callMode.d.ts +105 -0
  16. package/dist/calls/openScheduledCall.d.ts +20 -0
  17. package/dist/calls/p2p/P2PCallController.d.ts +160 -0
  18. package/dist/calls/p2p/icePolicy.d.ts +36 -0
  19. package/dist/calls/p2p/negotiator.d.ts +56 -0
  20. package/dist/calls/p2p/p2pRuntime.d.ts +35 -0
  21. package/dist/calls/p2p/signalInbox.d.ts +34 -0
  22. package/dist/calls/p2p/signalStanza.d.ts +51 -0
  23. package/dist/calls/placeCall.d.ts +20 -0
  24. package/dist/calls/scheduledCall.d.ts +101 -0
  25. package/dist/calls/scheduledCallActions.d.ts +12 -0
  26. package/dist/calls/scheduledCallFormat.d.ts +13 -0
  27. package/dist/calls/scheduledCallsConfig.d.ts +27 -0
  28. package/dist/calls/senderTrust.d.ts +7 -0
  29. package/dist/calls/startCall.d.ts +16 -0
  30. package/dist/components/MainComponents/ChatWrapper.d.ts +1 -0
  31. package/dist/components/MainComponents/LoginWrapper.d.ts +1 -0
  32. package/dist/components/MainComponents/ProfileImagePlaceholder.d.ts +1 -0
  33. package/dist/components/MainComponents/ReduxWrapper.d.ts +6 -0
  34. package/dist/components/MenuRoom/MenuRoom.d.ts +1 -0
  35. package/dist/components/Modals/NewChatModal/styledNewChatComponents.d.ts +27 -0
  36. package/dist/components/Modals/styledModalComponents.d.ts +25 -4
  37. package/dist/components/ScheduledCalls/ScheduleCallModal.d.ts +3 -0
  38. package/dist/components/ScheduledCalls/ScheduledCallCancelConfirm.d.ts +8 -0
  39. package/dist/components/ScheduledCalls/ScheduledCallCard.d.ts +7 -0
  40. package/dist/components/ScheduledCalls/ScheduledCallLayer.d.ts +15 -0
  41. package/dist/components/ScheduledCalls/ScheduledCallPreJoin.d.ts +3 -0
  42. package/dist/components/VideoCalls/P2PCallRunner.d.ts +1 -0
  43. package/dist/components/VideoCalls/P2PCallSession.d.ts +14 -0
  44. package/dist/components/VideoCalls/VideoCallSession.d.ts +39 -0
  45. package/dist/firebase-messaging-sw.js +918 -96
  46. package/dist/{handleCopyClick-Crn2jEEu.js → handleCopyClick-BX1fcFGN.js} +1 -1
  47. package/dist/helpers/callClaim.d.ts +17 -0
  48. package/dist/helpers/callOutcomeSync.d.ts +23 -0
  49. package/dist/helpers/callPush.d.ts +25 -0
  50. package/dist/helpers/canLeaveRoom.d.ts +3 -0
  51. package/dist/helpers/chatComponentConfigEvents.d.ts +16 -0
  52. package/dist/helpers/incomingCallPush.d.ts +89 -0
  53. package/dist/helpers/liveConfig.d.ts +46 -0
  54. package/dist/helpers/pushRoomHandoff.d.ts +13 -0
  55. package/dist/helpers/reportRoom.d.ts +18 -0
  56. package/dist/helpers/scheduledCallMessage.d.ts +23 -0
  57. package/dist/helpers/storeConsole.d.ts +1 -0
  58. package/dist/hooks/useChatSettingState.d.ts +1 -0
  59. package/dist/hooks/useNow.d.ts +6 -0
  60. package/dist/hooks/usePushNotifications.d.ts +2 -0
  61. package/dist/hooks/useRemoteAppearance.d.ts +21 -0
  62. package/dist/hooks/useTypography.d.ts +4 -0
  63. package/dist/{main-36gqdbJ8.js → main-B25iFKAC.js} +16623 -13399
  64. package/dist/main.d.ts +3 -1
  65. package/dist/main.js +25 -23
  66. package/dist/networking/api-requests/callState.api.d.ts +24 -0
  67. package/dist/networking/api-requests/remoteAppearance.api.d.ts +20 -0
  68. package/dist/networking/api-requests/rooms.api.d.ts +11 -1
  69. package/dist/networking/api-requests/scheduledCalls.api.d.ts +19 -0
  70. package/dist/networking/ethoraEvents.d.ts +14 -1
  71. package/dist/networking/xmpp/notifyXmppEvent.d.ts +6 -0
  72. package/dist/networking/xmpp/sendMessageReaction.xmpp.d.ts +13 -1
  73. package/dist/networking/xmppClient.d.ts +2 -1
  74. package/dist/roomStore/Middleware/blockedHydrationMiddleware.d.ts +2 -0
  75. package/dist/roomStore/callSlice.d.ts +23 -1
  76. package/dist/roomStore/chatSettingsSlice.d.ts +11 -2
  77. package/dist/roomStore/index.d.ts +4 -0
  78. package/dist/roomStore/scheduledCallSlice.d.ts +47 -0
  79. package/dist/types/models/config.model.d.ts +78 -1
  80. package/dist/types/models/message.model.d.ts +2 -0
  81. package/dist/types/models/room.model.d.ts +2 -0
  82. package/dist/types/models/scheduledCall.model.d.ts +116 -0
  83. package/dist/types/models/xmpp.model.d.ts +2 -1
  84. package/dist/utils/callAuthMirror.d.ts +1 -0
  85. package/dist/utils/callBroadcast.d.ts +12 -0
  86. package/dist/utils/callNotifications.d.ts +67 -0
  87. package/dist/utils/firebasePushNotifications.d.ts +14 -0
  88. package/dist/utils/handledCalls.d.ts +5 -0
  89. package/dist/utils/pushServiceWorkerBridge.d.ts +19 -0
  90. package/dist/utils/webLock.d.ts +13 -0
  91. package/package.json +1 -1
  92. package/public/firebase-messaging-sw.js +918 -96
  93. package/dist/ChatProfileModal-OJCKwdNp.js +0 -2168
  94. package/dist/UserProfileModal-B8KtGnwZ.js +0 -594
@@ -1,7 +1,7 @@
1
- import { jsxs as o, Fragment as M, jsx as a } from "react/jsx-runtime";
2
- import { useState as m, useCallback as T } from "react";
3
- import { aK as I, E as t, aL as j, aM as w, B, u as E, x as R, Q as z, aN as F, S as U, D as x, aO as O, aP as $, aQ as A, aR as P } from "./main-36gqdbJ8.js";
4
- import { S as Q, D as f, a as u, b as D, e as v, f as b } from "./SideDrawer-Cl-vbuIG.js";
1
+ import { jsxs as o, Fragment as T, jsx as a } from "react/jsx-runtime";
2
+ import { useState as m, useCallback as M } from "react";
3
+ import { b8 as I, a4 as t, b9 as j, ba as w, U as B, u as U, Z as z, ac as E, bb as F, af as R, a2 as x, bc as $, bd as A, be as O, bf as H } from "./main-B25iFKAC.js";
4
+ import { S as P, D as f, a as b, b as u, e as D, f as v } from "./SideDrawer-A_1ECqD2.js";
5
5
  t(j)`
6
6
  display: flex;
7
7
  box-sizing: border-box;
@@ -66,32 +66,32 @@ const y = t(B)`
66
66
  }
67
67
 
68
68
  ${I}
69
- `, H = t.div`
69
+ `, W = t.div`
70
70
  display: flex;
71
71
  align-items: flex-start;
72
72
  background-color: ${({ bgColor: r }) => r};
73
73
  padding: var(--ethora-space-4, 16px);
74
74
  border-radius: var(--ethora-radius-md, 12px);
75
75
  gap: var(--ethora-space-2, 8px);
76
- `, K = t.div`
76
+ `, Z = t.div`
77
77
  font-size: var(--ethora-font-size-xs, 12px);
78
78
  line-height: var(--ethora-line-height-normal, 1.5);
79
79
  color: var(--ethora-color-text, #141414);
80
80
  display: flex;
81
81
  text-align: start;
82
- `, J = ({
82
+ `, N = ({
83
83
  handleCloseModal: r
84
84
  }) => {
85
- const { config: l } = E((s) => s.chatSettingStore), e = R(), { showToast: d } = z(), [C, c] = m(!1), [i, g] = m(!1), S = async () => {
86
- const p = (await P()).data;
85
+ const { config: l } = U((s) => s.chatSettingStore), e = z(), { showToast: d } = E(), [C, c] = m(!1), [i, g] = m(!1), S = async () => {
86
+ const p = (await H()).data;
87
87
  x.log(p);
88
88
  const L = new Blob([p], { type: "text/plain" }), h = URL.createObjectURL(L), n = document.createElement("a");
89
89
  n.href = h, n.download = "mydata.json", document.body.appendChild(n), n.click(), document.body.removeChild(n), URL.revokeObjectURL(h);
90
- }, k = T(async () => {
90
+ }, k = M(async () => {
91
91
  if (!i) {
92
92
  g(!0);
93
93
  try {
94
- await F(), c(!1), await U.performLogout();
94
+ await F(), c(!1), await R.performLogout();
95
95
  } catch (s) {
96
96
  x.error("Failed to delete account", s), d({
97
97
  id: Date.now().toString(),
@@ -103,18 +103,18 @@ const y = t(B)`
103
103
  }
104
104
  }
105
105
  }, [i, d, e]);
106
- return /* @__PURE__ */ o(M, { children: [
106
+ return /* @__PURE__ */ o(T, { children: [
107
107
  /* @__PURE__ */ o(
108
- Q,
108
+ P,
109
109
  {
110
110
  title: e("settings.manageData.title"),
111
111
  onClose: r,
112
112
  backLabel: e("action.back"),
113
113
  children: [
114
114
  /* @__PURE__ */ o(f, { children: [
115
- /* @__PURE__ */ a(u, { children: e("settings.manageData.section.export") }),
116
- /* @__PURE__ */ a(D, { children: /* @__PURE__ */ o(v, { children: [
117
- /* @__PURE__ */ a(b, { children: e("settings.manageData.downloadDescription") }),
115
+ /* @__PURE__ */ a(b, { children: e("settings.manageData.section.export") }),
116
+ /* @__PURE__ */ a(u, { children: /* @__PURE__ */ o(D, { children: [
117
+ /* @__PURE__ */ a(v, { children: e("settings.manageData.downloadDescription") }),
118
118
  /* @__PURE__ */ a(
119
119
  y,
120
120
  {
@@ -127,17 +127,17 @@ const y = t(B)`
127
127
  ] }) })
128
128
  ] }),
129
129
  /* @__PURE__ */ o(f, { children: [
130
- /* @__PURE__ */ a(u, { children: e("settings.manageData.deleteLabel") }),
131
- /* @__PURE__ */ a(D, { children: /* @__PURE__ */ o(v, { children: [
132
- /* @__PURE__ */ a(b, { children: e("settings.manageData.deleteDescription") }),
130
+ /* @__PURE__ */ a(b, { children: e("settings.manageData.deleteLabel") }),
131
+ /* @__PURE__ */ a(u, { children: /* @__PURE__ */ o(D, { children: [
132
+ /* @__PURE__ */ a(v, { children: e("settings.manageData.deleteDescription") }),
133
133
  /* @__PURE__ */ o(
134
- H,
134
+ W,
135
135
  {
136
136
  bgColor: l?.colors?.secondary || "var(--ethora-color-primary-soft, #E7EDF9)",
137
137
  style: { marginTop: "var(--ethora-space-2, 8px)" },
138
138
  children: [
139
- /* @__PURE__ */ a("div", { children: /* @__PURE__ */ a(O, { color: $(l) }) }),
140
- /* @__PURE__ */ a(K, { children: e("settings.manageData.deleteDisclosure") })
139
+ /* @__PURE__ */ a("div", { children: /* @__PURE__ */ a($, { color: A(l) }) }),
140
+ /* @__PURE__ */ a(Z, { children: e("settings.manageData.deleteDisclosure") })
141
141
  ]
142
142
  }
143
143
  ),
@@ -159,7 +159,7 @@ const y = t(B)`
159
159
  }
160
160
  ),
161
161
  C && /* @__PURE__ */ a(
162
- A,
162
+ O,
163
163
  {
164
164
  title: e("settings.manageData.deleteConfirmTitle"),
165
165
  description: e("settings.manageData.deleteConfirmDescription"),
@@ -174,5 +174,5 @@ const y = t(B)`
174
174
  ] });
175
175
  };
176
176
  export {
177
- J as default
177
+ N as default
178
178
  };
@@ -1,6 +1,6 @@
1
1
  import { jsxs as fs, jsx as ie, Fragment as hs } from "react/jsx-runtime";
2
2
  import "react";
3
- import { w as ei } from "./main-36gqdbJ8.js";
3
+ import { Y as ei } from "./main-B25iFKAC.js";
4
4
  function zr(e) {
5
5
  const t = [], n = String(e || "");
6
6
  let r = n.indexOf(","), u = 0, i = !1;
@@ -1,7 +1,7 @@
1
1
  import { jsx as a, jsxs as i, Fragment as G } from "react/jsx-runtime";
2
2
  import { useRef as J, useState as h, useMemo as I, useEffect as V } from "react";
3
- import { x as Y, a as W, aU as X, u as z, at as Z, as as K, au as ee, aV as re, aW as te, aB as ae, aX as oe, aY as se, aZ as ne, E as c, y as ie } from "./main-36gqdbJ8.js";
4
- import { S as ce, i as le, j as de, f as S } from "./SideDrawer-Cl-vbuIG.js";
3
+ import { Z as Y, a as Z, bi as K, u as z, aS as W, aR as X, aT as ee, bj as re, bk as te, a_ as ae, bl as oe, bm as se, bn as ne, a4 as c, _ as ie } from "./main-B25iFKAC.js";
4
+ import { S as ce, i as le, j as de, f as S } from "./SideDrawer-A_1ECqD2.js";
5
5
  function he(t) {
6
6
  const e = /^(\d{4})-(\d{2})-(\d{2})$/.exec(t || "");
7
7
  if (!e) return;
@@ -16,7 +16,7 @@ function he(t) {
16
16
  );
17
17
  return Number.isNaN(l.getTime()) ? void 0 : l.toISOString();
18
18
  }
19
- function ue(t) {
19
+ function pe(t) {
20
20
  const e = /^(\d{4})-(\d{2})-(\d{2})$/.exec(t || "");
21
21
  if (!e) return;
22
22
  const l = new Date(
@@ -30,29 +30,29 @@ function ue(t) {
30
30
  );
31
31
  return Number.isNaN(l.getTime()) ? void 0 : l.toISOString();
32
32
  }
33
- const pe = (t, e) => !!(t && e && t > e), me = (t) => `${t.firstName || ""} ${t.lastName || ""}`.trim() || t.name || "";
33
+ const ue = (t, e) => !!(t && e && t > e), me = (t) => `${t.firstName || ""} ${t.lastName || ""}`.trim() || t.name || "";
34
34
  function fe(t, e, l = 8) {
35
35
  const k = e.trim().toLowerCase();
36
36
  if (!k) return [];
37
- const u = [], p = [], n = /* @__PURE__ */ new Set();
38
- for (const x of t) {
39
- const d = x._id, b = me(x);
40
- if (!d || !b || n.has(d)) continue;
41
- const s = b.toLowerCase().indexOf(k);
42
- if (s !== -1 && (n.add(d), (s === 0 ? u : p).push({ id: d, name: b }), u.length >= l))
37
+ const p = [], u = [], n = /* @__PURE__ */ new Set();
38
+ for (const b of t) {
39
+ const d = b._id, x = me(b);
40
+ if (!d || !x || n.has(d)) continue;
41
+ const s = x.toLowerCase().indexOf(k);
42
+ if (s !== -1 && (n.add(d), (s === 0 ? p : u).push({ id: d, name: x }), p.length >= l))
43
43
  break;
44
44
  }
45
- return [...u, ...p].slice(0, l);
45
+ return [...p, ...u].slice(0, l);
46
46
  }
47
47
  const ge = c.div`
48
48
  display: flex;
49
49
  flex-direction: column;
50
50
  gap: var(--ethora-space-3, 12px);
51
51
  min-height: 0;
52
- `, xe = c.div`
52
+ `, be = c.div`
53
53
  display: flex;
54
54
  gap: var(--ethora-space-2, 8px);
55
- `, E = c.button`
55
+ `, H = c.button`
56
56
  flex: 1 1 0;
57
57
  height: 32px;
58
58
  border: 1px solid
@@ -65,7 +65,7 @@ const ge = c.div`
65
65
  font-weight: var(--ethora-font-weight-medium, 500);
66
66
  cursor: pointer;
67
67
  transition: background-color var(--ethora-motion-fast, 150ms);
68
- `, be = c.button`
68
+ `, xe = c.button`
69
69
  align-self: flex-start;
70
70
  display: inline-flex;
71
71
  align-items: center;
@@ -175,49 +175,49 @@ const ge = c.div`
175
175
  `, Re = ({
176
176
  handleCloseModal: t
177
177
  }) => {
178
- const e = Y(), l = W(), k = X(767), u = J(null), p = z((r) => r.rooms.rooms), n = z(
178
+ const e = Y(), l = Z(), k = K(767), p = J(null), u = z((r) => r.rooms.rooms), n = z(
179
179
  (r) => r.rooms.activeRoomJID
180
- ), x = z((r) => r.rooms.usersSet);
180
+ ), b = z((r) => r.rooms.usersSet);
181
181
  z(
182
182
  (r) => r.chatSettingStore.user?.xmppUsername
183
183
  );
184
- const [d, b] = h(""), [s, O] = h(
184
+ const [d, x] = h(""), [s, O] = h(
185
185
  n ? "chat" : "all"
186
- ), F = n ? n.split("@")[0] : void 0, [C, H] = h(!1), [m, B] = h(""), [f, L] = h(""), [g, M] = h(
186
+ ), F = n ? n.split("@")[0] : void 0, [C, U] = h(!1), [m, T] = h(""), [f, L] = h(""), [g, M] = h(
187
187
  null
188
- ), [v, N] = h(""), y = pe(m, f), j = I(
188
+ ), [v, N] = h(""), y = ue(m, f), _ = I(
189
189
  () => ({
190
190
  fromUserId: g?.id,
191
191
  since: y ? void 0 : he(m),
192
- until: y ? void 0 : ue(f)
192
+ until: y ? void 0 : pe(f)
193
193
  }),
194
194
  [g?.id, m, f, y]
195
- ), w = (g ? 1 : 0) + (m ? 1 : 0) + (f ? 1 : 0), Q = () => {
196
- M(null), N(""), B(""), L("");
197
- }, P = n ? p[n] : void 0, { members: D } = Z(
195
+ ), w = (g ? 1 : 0) + (m ? 1 : 0) + (f ? 1 : 0), E = () => {
196
+ M(null), N(""), T(""), L("");
197
+ }, Q = n ? u[n] : void 0, { members: D } = W(
198
198
  n || void 0,
199
- s === "chat" && K(P) && (C || v.trim() !== "")
200
- ), T = I(() => {
199
+ s === "chat" && X(Q) && (C || v.trim() !== "")
200
+ ), j = I(() => {
201
201
  if (!v.trim()) return [];
202
202
  let r;
203
203
  if (s === "chat") {
204
- const A = n && p[n]?.members || [];
205
- D.length > 0 ? r = ee([...A, ...D]) : r = A;
204
+ const B = n && u[n]?.members || [];
205
+ D.length > 0 ? r = ee([...B, ...D]) : r = B;
206
206
  } else
207
- r = Object.values(x || {});
207
+ r = Object.values(b || {});
208
208
  return fe(r, v);
209
- }, [v, s, p, n, x, D]), o = re(
209
+ }, [v, s, u, n, b, D]), o = re(
210
210
  y ? "" : d,
211
211
  s,
212
212
  F,
213
- j
213
+ _
214
214
  );
215
215
  V(() => {
216
- u.current?.focus();
216
+ p.current?.focus();
217
217
  }, []);
218
- const { open: _ } = te(), q = (r) => {
219
- _(r) && k && l(ie(void 0));
220
- }, R = I(() => o.items, [o.items]), U = d.trim();
218
+ const { open: P } = te(), q = (r) => {
219
+ P(r) && k && l(ie(void 0));
220
+ }, R = I(() => o.items, [o.items]), A = d.trim();
221
221
  return /* @__PURE__ */ a(
222
222
  ce,
223
223
  {
@@ -230,11 +230,11 @@ const ge = c.div`
230
230
  /* @__PURE__ */ a(
231
231
  de,
232
232
  {
233
- ref: u,
233
+ ref: p,
234
234
  "data-autofocus": !0,
235
235
  type: "search",
236
236
  value: d,
237
- onChange: (r) => b(r.target.value),
237
+ onChange: (r) => x(r.target.value),
238
238
  placeholder: e(
239
239
  s === "chat" ? "search.messages.placeholderChat" : "search.messages.placeholderAll"
240
240
  ),
@@ -242,9 +242,9 @@ const ge = c.div`
242
242
  }
243
243
  )
244
244
  ] }),
245
- /* @__PURE__ */ i(xe, { role: "group", "aria-label": e("search.messages.scope"), children: [
245
+ /* @__PURE__ */ i(be, { role: "group", "aria-label": e("search.messages.scope"), children: [
246
246
  /* @__PURE__ */ a(
247
- E,
247
+ H,
248
248
  {
249
249
  type: "button",
250
250
  $active: s === "chat",
@@ -255,7 +255,7 @@ const ge = c.div`
255
255
  }
256
256
  ),
257
257
  /* @__PURE__ */ a(
258
- E,
258
+ H,
259
259
  {
260
260
  type: "button",
261
261
  $active: s === "all",
@@ -266,12 +266,12 @@ const ge = c.div`
266
266
  )
267
267
  ] }),
268
268
  /* @__PURE__ */ i(
269
- be,
269
+ xe,
270
270
  {
271
271
  type: "button",
272
272
  $active: C || w > 0,
273
273
  "aria-expanded": C,
274
- onClick: () => H((r) => !r),
274
+ onClick: () => U((r) => !r),
275
275
  children: [
276
276
  e("search.messages.filters"),
277
277
  w > 0 && /* @__PURE__ */ a("span", { children: w })
@@ -302,7 +302,7 @@ const ge = c.div`
302
302
  }
303
303
  )
304
304
  ] }),
305
- !g && T.length > 0 && /* @__PURE__ */ a(Se, { role: "listbox", children: T.map((r) => /* @__PURE__ */ a("li", { children: /* @__PURE__ */ a(
305
+ !g && j.length > 0 && /* @__PURE__ */ a(Se, { role: "listbox", children: j.map((r) => /* @__PURE__ */ a("li", { children: /* @__PURE__ */ a(
306
306
  "button",
307
307
  {
308
308
  type: "button",
@@ -323,7 +323,7 @@ const ge = c.div`
323
323
  type: "date",
324
324
  value: m,
325
325
  max: f || void 0,
326
- onChange: (r) => B(r.target.value)
326
+ onChange: (r) => T(r.target.value)
327
327
  }
328
328
  )
329
329
  ] }),
@@ -341,9 +341,9 @@ const ge = c.div`
341
341
  ] })
342
342
  ] }),
343
343
  y && /* @__PURE__ */ a(S, { role: "alert", children: e("search.messages.dateOrder") }),
344
- w > 0 && /* @__PURE__ */ a(Ce, { type: "button", onClick: Q, children: e("search.messages.filterClearAll") })
344
+ w > 0 && /* @__PURE__ */ a(Ce, { type: "button", onClick: E, children: e("search.messages.filterClearAll") })
345
345
  ] }),
346
- !o.searchable && /* @__PURE__ */ a(S, { children: U ? e("search.messages.tooShort", { count: oe }) : e("search.messages.hint") }),
346
+ !o.searchable && /* @__PURE__ */ a(S, { children: A ? e("search.messages.tooShort", { count: oe }) : e("search.messages.hint") }),
347
347
  o.searchable && o.status === "loading" && /* @__PURE__ */ a(S, { role: "status", children: e("search.messages.searching") }),
348
348
  o.status === "error" && /* @__PURE__ */ i(S, { role: "alert", children: [
349
349
  e("search.messages.error"),
@@ -357,7 +357,7 @@ const ge = c.div`
357
357
  se,
358
358
  {
359
359
  hits: R,
360
- query: U,
360
+ query: A,
361
361
  showRoom: s === "all",
362
362
  onOpen: q
363
363
  }
@@ -1,14 +1,14 @@
1
- import { jsxs as d, jsx as a } from "react/jsx-runtime";
2
- import { useState as p, useRef as E, useCallback as N, useEffect as P, useMemo as z } from "react";
3
- import { l as T, a_ as U, x as _, a as F, aU as H, u as A, aB as J, E as c, a7 as q, y as G } from "./main-36gqdbJ8.js";
4
- import { S as V, i as Z, j as K, f as S } from "./SideDrawer-Cl-vbuIG.js";
1
+ import { jsxs as p, jsx as a } from "react/jsx-runtime";
2
+ import { useState as d, useRef as B, useCallback as N, useEffect as P, useMemo as z } from "react";
3
+ import { c as T, bo as E, Z as U, a as F, bi as H, u as A, a_ as J, a4 as c, ap as Z, _ as q } from "./main-B25iFKAC.js";
4
+ import { S as G, i as V, j as K, f as S } from "./SideDrawer-A_1ECqD2.js";
5
5
  const I = 50;
6
6
  async function Q({
7
7
  offset: r = 0,
8
8
  limit: t = I,
9
9
  signal: u
10
10
  } = {}) {
11
- const x = T.getState().chatSettingStore.user?.token || "", s = (await U.get("/v1/chats/public", {
11
+ const x = T.getState().chatSettingStore.user?.token || "", s = (await E.get("/v1/chats/public", {
12
12
  params: { limit: Math.min(t, I), offset: r },
13
13
  headers: { Authorization: x },
14
14
  signal: u
@@ -103,17 +103,17 @@ const W = c.ul`
103
103
  `, oe = (r) => (r.title || r.name).trim().charAt(0).toUpperCase() || "#", le = ({
104
104
  handleCloseModal: r
105
105
  }) => {
106
- const t = _(), u = F(), x = H(767), b = A((e) => e.rooms.rooms), s = A(
106
+ const t = U(), u = F(), x = H(767), b = A((e) => e.rooms.rooms), s = A(
107
107
  (e) => e.chatSettingStore.config?.xmppSettings?.conference
108
- ), [l, i] = p([]), [j, $] = p(0), [v, D] = p(0), [n, w] = p("loading"), [h, L] = p(""), m = E(0), f = N(async (e) => {
108
+ ), [l, i] = d([]), [j, $] = d(0), [v, D] = d(0), [n, w] = d("loading"), [h, L] = d(""), m = B(0), f = N(async (e) => {
109
109
  const o = ++m.current;
110
110
  w(e ? "loadingMore" : "loading");
111
111
  try {
112
112
  const g = await Q({ offset: e });
113
113
  if (o !== m.current) return;
114
114
  i((k) => {
115
- const R = new Set(k.map((C) => C.name));
116
- return e ? [...k, ...g.items.filter((C) => !R.has(C.name))] : g.items;
115
+ const _ = new Set(k.map((C) => C.name));
116
+ return e ? [...k, ...g.items.filter((C) => !_.has(C.name))] : g.items;
117
117
  }), $(g.total), D(g.nextOffset), w("done");
118
118
  } catch {
119
119
  o === m.current && w("error");
@@ -130,18 +130,18 @@ const W = c.ul`
130
130
  return e ? l.filter(
131
131
  (o) => o.title.toLowerCase().includes(e) || o.description.toLowerCase().includes(e)
132
132
  ) : l;
133
- }, [l, h]), B = (e) => {
133
+ }, [l, h]), R = (e) => {
134
134
  const o = (s || "").trim();
135
- o && (u(q({ roomJID: `${e.name}@${o}` })), x && u(G(void 0)));
135
+ o && (u(Z({ roomJID: `${e.name}@${o}` })), x && u(q(void 0)));
136
136
  }, M = v < j;
137
- return /* @__PURE__ */ d(
138
- V,
137
+ return /* @__PURE__ */ p(
138
+ G,
139
139
  {
140
140
  title: t("publicChats.title"),
141
141
  onClose: r,
142
142
  backLabel: t("action.close"),
143
143
  children: [
144
- /* @__PURE__ */ d(Z, { children: [
144
+ /* @__PURE__ */ p(V, { children: [
145
145
  /* @__PURE__ */ a(J, {}),
146
146
  /* @__PURE__ */ a(
147
147
  K,
@@ -155,7 +155,7 @@ const W = c.ul`
155
155
  )
156
156
  ] }),
157
157
  n === "loading" && /* @__PURE__ */ a(S, { role: "status", children: t("publicChats.loading") }),
158
- n === "error" && /* @__PURE__ */ d(S, { role: "alert", children: [
158
+ n === "error" && /* @__PURE__ */ p(S, { role: "alert", children: [
159
159
  t("publicChats.error"),
160
160
  " ",
161
161
  /* @__PURE__ */ a("button", { type: "button", onClick: () => {
@@ -165,9 +165,9 @@ const W = c.ul`
165
165
  n !== "loading" && n !== "error" && y.length === 0 && /* @__PURE__ */ a(S, { children: h.trim() && M ? t("publicChats.emptyFilterMore") : t("publicChats.empty") }),
166
166
  y.length > 0 && /* @__PURE__ */ a(W, { children: y.map((e) => {
167
167
  const o = O.has(e.name);
168
- return /* @__PURE__ */ d(X, { children: [
168
+ return /* @__PURE__ */ p(X, { children: [
169
169
  /* @__PURE__ */ a(Y, { $src: e.picture, "aria-hidden": "true", children: !e.picture && oe(e) }),
170
- /* @__PURE__ */ d(ee, { children: [
170
+ /* @__PURE__ */ p(ee, { children: [
171
171
  /* @__PURE__ */ a("strong", { children: e.title || t("search.messages.chat") }),
172
172
  e.description && /* @__PURE__ */ a("span", { children: e.description })
173
173
  ] }),
@@ -176,7 +176,7 @@ const W = c.ul`
176
176
  {
177
177
  type: "button",
178
178
  $open: o,
179
- onClick: () => B(e),
179
+ onClick: () => R(e),
180
180
  children: t(o ? "publicChats.open" : "publicChats.join")
181
181
  }
182
182
  )
@@ -1,6 +1,6 @@
1
1
  import { jsxs as i, jsx as o } from "react/jsx-runtime";
2
2
  import { useId as f, useRef as v } from "react";
3
- import { x as g, F as u, aU as m, a$ as w, B as b, b0 as y, E as e, b1 as D, b2 as k } from "./main-36gqdbJ8.js";
3
+ import { Z as g, a5 as u, bi as m, bp as b, U as w, bq as y, a4 as e, br as D, bs as k } from "./main-B25iFKAC.js";
4
4
  const c = 767, R = `${c}px`, z = e.div`
5
5
  position: relative;
6
6
  pointer-events: auto;
@@ -58,7 +58,7 @@ const c = 767, R = `${c}px`, z = e.div`
58
58
  padding-left: var(--ethora-space-4, 16px);
59
59
  padding-right: var(--ethora-space-4, 16px);
60
60
  }
61
- `, H = e.section`
61
+ `, $ = e.section`
62
62
  display: flex;
63
63
  flex-direction: column;
64
64
  gap: var(--ethora-space-2, 8px);
@@ -84,12 +84,12 @@ const c = 767, R = `${c}px`, z = e.div`
84
84
  flex-direction: column;
85
85
  gap: var(--ethora-space-1, 4px);
86
86
  padding: var(--ethora-space-3, 12px) var(--ethora-space-4, 16px);
87
- `, F = e.div`
87
+ `, K = e.div`
88
88
  display: flex;
89
89
  align-items: baseline;
90
90
  justify-content: space-between;
91
91
  gap: var(--ethora-space-2, 8px);
92
- `, K = e.button`
92
+ `, q = e.button`
93
93
  border: none;
94
94
  background: transparent;
95
95
  padding: var(--ethora-space-2, 8px) 0;
@@ -109,11 +109,11 @@ const c = 767, R = `${c}px`, z = e.div`
109
109
  outline-offset: 2px;
110
110
  border-radius: var(--ethora-radius-sm, 8px);
111
111
  }
112
- `, U = e.div`
112
+ `, F = e.div`
113
113
  height: 1px;
114
114
  margin: 0 var(--ethora-space-4, 16px);
115
115
  background-color: var(--ethora-color-border, #e6e8ec);
116
- `, V = e.div`
116
+ `, U = e.div`
117
117
  display: flex;
118
118
  align-items: center;
119
119
  gap: var(--ethora-space-2, 8px);
@@ -135,7 +135,7 @@ const c = 767, R = `${c}px`, z = e.div`
135
135
  & > svg {
136
136
  flex: 0 0 auto;
137
137
  }
138
- `, X = e.input`
138
+ `, V = e.input`
139
139
  flex: 1 1 auto;
140
140
  min-width: 0;
141
141
  border: none;
@@ -148,22 +148,22 @@ const c = 767, R = `${c}px`, z = e.div`
148
148
  &::placeholder {
149
149
  color: var(--ethora-color-text-muted, #8c8c8c);
150
150
  }
151
- `, q = e.div`
151
+ `, X = e.div`
152
152
  display: flex;
153
153
  flex-direction: column;
154
154
  width: 100%;
155
- `, E = e.div`
155
+ `, T = e.div`
156
156
  font-size: var(--ethora-font-size-sm, 14px);
157
157
  font-weight: var(--ethora-font-weight-medium, 500);
158
158
  color: var(--ethora-color-text, #141414);
159
159
  text-align: start;
160
- `, T = e.div`
160
+ `, C = e.div`
161
161
  font-size: var(--ethora-font-size-xs, 12px);
162
162
  font-weight: var(--ethora-font-weight-regular, 400);
163
163
  color: var(--ethora-color-text-muted, #8c8c8c);
164
164
  text-align: start;
165
165
  line-height: 1.4;
166
- `, C = e.button`
166
+ `, E = e.button`
167
167
  display: flex;
168
168
  align-items: center;
169
169
  gap: var(--ethora-space-3, 12px);
@@ -205,17 +205,17 @@ const c = 767, R = `${c}px`, z = e.div`
205
205
  strokeLinecap: "round",
206
206
  strokeLinejoin: "round"
207
207
  }
208
- ) }), G = ({
208
+ ) }), Z = ({
209
209
  label: r,
210
210
  hint: a,
211
211
  onClick: t
212
- }) => /* @__PURE__ */ i(C, { type: "button", onClick: t, children: [
212
+ }) => /* @__PURE__ */ i(E, { type: "button", onClick: t, children: [
213
213
  /* @__PURE__ */ i(L, { children: [
214
- /* @__PURE__ */ o(E, { children: r }),
215
- a && /* @__PURE__ */ o(T, { children: a })
214
+ /* @__PURE__ */ o(T, { children: r }),
215
+ a && /* @__PURE__ */ o(C, { children: a })
216
216
  ] }),
217
217
  /* @__PURE__ */ o(j, { "aria-hidden": "true", children: /* @__PURE__ */ o(M, {}) })
218
- ] }), J = ({
218
+ ] }), G = ({
219
219
  title: r,
220
220
  onClose: a,
221
221
  headerActions: t,
@@ -224,7 +224,7 @@ const c = 767, R = `${c}px`, z = e.div`
224
224
  }) => {
225
225
  const h = g(), n = f(), s = v(null);
226
226
  u({ onClose: a, containerRef: s });
227
- const p = m(c), x = w();
227
+ const p = m(c), x = b();
228
228
  return /* @__PURE__ */ i(
229
229
  z,
230
230
  {
@@ -237,7 +237,7 @@ const c = 767, R = `${c}px`, z = e.div`
237
237
  children: [
238
238
  /* @__PURE__ */ i(B, { children: [
239
239
  /* @__PURE__ */ o(
240
- b,
240
+ w,
241
241
  {
242
242
  EndIcon: /* @__PURE__ */ o(y, {}),
243
243
  onClick: a,
@@ -253,18 +253,18 @@ const c = 767, R = `${c}px`, z = e.div`
253
253
  );
254
254
  };
255
255
  export {
256
- H as D,
257
- J as S,
256
+ $ as D,
257
+ G as S,
258
258
  O as a,
259
259
  W as b,
260
- U as c,
261
- G as d,
260
+ F as c,
261
+ Z as d,
262
262
  _ as e,
263
- T as f,
264
- E as g,
265
- F as h,
266
- V as i,
267
- X as j,
268
- q as k,
269
- K as l
263
+ C as f,
264
+ T as g,
265
+ K as h,
266
+ U as i,
267
+ V as j,
268
+ X as k,
269
+ q as l
270
270
  };