@linktr.ee/messaging-react 3.11.0 → 3.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{Card-V5d6qhDT.js → Card-BnbNynLQ.js} +2 -2
- package/dist/{Card-V5d6qhDT.js.map → Card-BnbNynLQ.js.map} +1 -1
- package/dist/{Card-CyWdUMCB.cjs → Card-UnwKmYzt.cjs} +2 -2
- package/dist/{Card-CyWdUMCB.cjs.map → Card-UnwKmYzt.cjs.map} +1 -1
- package/dist/{index-Bx_zjNMR.cjs → index-CyHyftBi.cjs} +2 -2
- package/dist/{index-Bx_zjNMR.cjs.map → index-CyHyftBi.cjs.map} +1 -1
- package/dist/{index-DFZrAiLB.js → index-DJXjS2H9.js} +494 -482
- package/dist/{index-DFZrAiLB.js.map → index-DJXjS2H9.js.map} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +32 -0
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/src/components/ChannelList/index.test.tsx +46 -0
- package/src/components/ChannelList/index.tsx +12 -0
- package/src/index.ts +1 -0
- package/src/types.ts +34 -1
|
@@ -25,10 +25,10 @@ const os = ot({
|
|
|
25
25
|
debug: i = !1,
|
|
26
26
|
client: o
|
|
27
27
|
}) => {
|
|
28
|
-
var
|
|
28
|
+
var I, T;
|
|
29
29
|
const l = J(
|
|
30
|
-
(M, ...
|
|
31
|
-
i && console.log(`🔥 [MessagingProvider] ${M}`, ...
|
|
30
|
+
(M, ...P) => {
|
|
31
|
+
i && console.log(`🔥 [MessagingProvider] ${M}`, ...P);
|
|
32
32
|
},
|
|
33
33
|
[i]
|
|
34
34
|
);
|
|
@@ -38,11 +38,11 @@ const os = ot({
|
|
|
38
38
|
serviceConfig: !!n,
|
|
39
39
|
capabilities: Object.keys(r)
|
|
40
40
|
});
|
|
41
|
-
const [d, m] = U(null), [g, h] = U(null), [f, c] = U(!1), [b,
|
|
42
|
-
|
|
43
|
-
const
|
|
44
|
-
|
|
45
|
-
const
|
|
41
|
+
const [d, m] = U(null), [g, h] = U(null), [f, c] = U(!1), [b, v] = U(!1), [x, p] = U(null), _ = G(!1), w = G(null), k = G(n);
|
|
42
|
+
k.current = n;
|
|
43
|
+
const L = G(i);
|
|
44
|
+
L.current = i;
|
|
45
|
+
const S = G({
|
|
46
46
|
userId: t == null ? void 0 : t.id,
|
|
47
47
|
apiKey: a,
|
|
48
48
|
serviceConfig: n,
|
|
@@ -52,27 +52,27 @@ const os = ot({
|
|
|
52
52
|
renderCount: R.current,
|
|
53
53
|
currentProps: { userId: t == null ? void 0 : t.id, apiKey: (a == null ? void 0 : a.substring(0, 8)) + "..." },
|
|
54
54
|
propChanges: {
|
|
55
|
-
userChanged:
|
|
56
|
-
apiKeyChanged:
|
|
57
|
-
serviceConfigChanged:
|
|
58
|
-
capabilitiesChanged:
|
|
55
|
+
userChanged: S.current.userId !== (t == null ? void 0 : t.id),
|
|
56
|
+
apiKeyChanged: S.current.apiKey !== a,
|
|
57
|
+
serviceConfigChanged: S.current.serviceConfig !== n,
|
|
58
|
+
capabilitiesChanged: S.current.capabilities !== r
|
|
59
59
|
}
|
|
60
|
-
}),
|
|
60
|
+
}), S.current = {
|
|
61
61
|
userId: t == null ? void 0 : t.id,
|
|
62
62
|
apiKey: a,
|
|
63
63
|
serviceConfig: n,
|
|
64
64
|
capabilities: r
|
|
65
65
|
};
|
|
66
66
|
const O = G(null);
|
|
67
|
-
!o && a && ((
|
|
68
|
-
const
|
|
67
|
+
!o && a && ((I = O.current) == null ? void 0 : I.apiKey) !== a && (O.current = { apiKey: a, client: new Gs(a) });
|
|
68
|
+
const F = o || (a ? ((T = O.current) == null ? void 0 : T.client) ?? null : null);
|
|
69
69
|
K(() => {
|
|
70
|
-
const M = R.current,
|
|
70
|
+
const M = R.current, P = k.current;
|
|
71
71
|
if (o) {
|
|
72
|
-
w.current = null, m(null), h(null), c(!1), p(null),
|
|
72
|
+
w.current = null, m(null), h(null), c(!1), p(null), v(!1);
|
|
73
73
|
return;
|
|
74
74
|
}
|
|
75
|
-
if (!a || !
|
|
75
|
+
if (!a || !F || !P) {
|
|
76
76
|
l("⚠️ SERVICE INIT SKIPPED", {
|
|
77
77
|
renderCount: M,
|
|
78
78
|
reason: "Missing apiKey, client, or serviceConfig"
|
|
@@ -84,24 +84,24 @@ const os = ot({
|
|
|
84
84
|
apiKey: (a == null ? void 0 : a.substring(0, 8)) + "..."
|
|
85
85
|
});
|
|
86
86
|
const $ = new Vs({
|
|
87
|
-
...
|
|
87
|
+
...P,
|
|
88
88
|
apiKey: a,
|
|
89
|
-
debug:
|
|
90
|
-
client:
|
|
89
|
+
debug: L.current,
|
|
90
|
+
client: F
|
|
91
91
|
});
|
|
92
92
|
w.current = $, m($), l("✅ SERVICE SET", {
|
|
93
93
|
renderCount: M,
|
|
94
94
|
serviceInstance: !!$
|
|
95
95
|
});
|
|
96
|
-
}, [a,
|
|
96
|
+
}, [a, F, o]);
|
|
97
97
|
const D = G(null);
|
|
98
98
|
K(() => {
|
|
99
|
-
var
|
|
99
|
+
var P, $;
|
|
100
100
|
if (l("🔗 USER CONNECTION EFFECT TRIGGERED", {
|
|
101
101
|
hasService: !!d,
|
|
102
102
|
hasUser: !!t,
|
|
103
103
|
userId: t == null ? void 0 : t.id,
|
|
104
|
-
isConnecting:
|
|
104
|
+
isConnecting: _.current,
|
|
105
105
|
isConnected: f,
|
|
106
106
|
dependencies: { service: !!d, userId: t == null ? void 0 : t.id }
|
|
107
107
|
}), o)
|
|
@@ -110,11 +110,11 @@ const os = ot({
|
|
|
110
110
|
l("⚠️ USER CONNECTION SKIPPED", "Missing service or user");
|
|
111
111
|
return;
|
|
112
112
|
}
|
|
113
|
-
if (
|
|
113
|
+
if (_.current) {
|
|
114
114
|
l("⚠️ USER CONNECTION SKIPPED", "Already connecting");
|
|
115
115
|
return;
|
|
116
116
|
}
|
|
117
|
-
if (((
|
|
117
|
+
if (((P = D.current) == null ? void 0 : P.serviceId) === d && (($ = D.current) == null ? void 0 : $.userId) === t.id) {
|
|
118
118
|
l(
|
|
119
119
|
"⚠️ USER CONNECTION SKIPPED",
|
|
120
120
|
"Already connected this user with this service"
|
|
@@ -122,7 +122,7 @@ const os = ot({
|
|
|
122
122
|
return;
|
|
123
123
|
}
|
|
124
124
|
(async () => {
|
|
125
|
-
l("🚀 STARTING USER CONNECTION", { userId: t.id }),
|
|
125
|
+
l("🚀 STARTING USER CONNECTION", { userId: t.id }), _.current = !0, v(!0), p(null);
|
|
126
126
|
try {
|
|
127
127
|
l("📞 CALLING SERVICE.CONNECTUSER", { userId: t.id });
|
|
128
128
|
const j = await d.connectUser(t);
|
|
@@ -137,20 +137,20 @@ const os = ot({
|
|
|
137
137
|
error: Q
|
|
138
138
|
});
|
|
139
139
|
} finally {
|
|
140
|
-
|
|
140
|
+
v(!1), _.current = !1, l("🔄 USER CONNECTION FINISHED", {
|
|
141
141
|
userId: t.id,
|
|
142
142
|
isConnected: f
|
|
143
143
|
});
|
|
144
144
|
}
|
|
145
145
|
})();
|
|
146
146
|
}, [d, t, l, f, o]), K(() => {
|
|
147
|
-
const M =
|
|
147
|
+
const M = F;
|
|
148
148
|
return () => {
|
|
149
|
-
var
|
|
150
|
-
M && (D.current = null, (
|
|
149
|
+
var P;
|
|
150
|
+
M && (D.current = null, (P = w.current) == null || P.disconnectUser().catch(console.error));
|
|
151
151
|
};
|
|
152
|
-
}, [
|
|
153
|
-
const
|
|
152
|
+
}, [F]);
|
|
153
|
+
const C = J(async () => {
|
|
154
154
|
if (l("🔄 REFRESH CONNECTION CALLED", {
|
|
155
155
|
hasService: !!d,
|
|
156
156
|
hasUser: !!t
|
|
@@ -159,27 +159,27 @@ const os = ot({
|
|
|
159
159
|
l("⚠️ REFRESH CONNECTION SKIPPED", "Missing service or user");
|
|
160
160
|
return;
|
|
161
161
|
}
|
|
162
|
-
l("🚀 STARTING CONNECTION REFRESH", { userId: t.id }),
|
|
162
|
+
l("🚀 STARTING CONNECTION REFRESH", { userId: t.id }), v(!0);
|
|
163
163
|
try {
|
|
164
164
|
l("🔌 DISCONNECTING FOR REFRESH"), await d.disconnectUser(), l("📞 RECONNECTING FOR REFRESH");
|
|
165
165
|
const M = await d.connectUser(t);
|
|
166
166
|
h(M), c(!0), p(null), l("✅ CONNECTION REFRESH SUCCESS", { userId: t.id });
|
|
167
167
|
} catch (M) {
|
|
168
|
-
const
|
|
169
|
-
p(
|
|
168
|
+
const P = M instanceof Error ? M.message : "Refresh failed";
|
|
169
|
+
p(P), l("❌ CONNECTION REFRESH ERROR", {
|
|
170
170
|
userId: t.id,
|
|
171
|
-
error:
|
|
171
|
+
error: P
|
|
172
172
|
});
|
|
173
173
|
} finally {
|
|
174
|
-
|
|
174
|
+
v(!1), l("🔄 CONNECTION REFRESH FINISHED", { userId: t.id });
|
|
175
175
|
}
|
|
176
176
|
}
|
|
177
|
-
}, [d, t, l, o]),
|
|
177
|
+
}, [d, t, l, o]), E = V.useMemo(() => (l("💫 CONTEXT VALUE MEMOIZATION", {
|
|
178
178
|
hasService: !!d,
|
|
179
179
|
hasClient: !!g,
|
|
180
180
|
isConnected: f,
|
|
181
181
|
isLoading: b,
|
|
182
|
-
hasError: !!
|
|
182
|
+
hasError: !!x,
|
|
183
183
|
capabilitiesKeys: Object.keys(r)
|
|
184
184
|
}), {
|
|
185
185
|
// With an injected client, expose no service — the injected client owns
|
|
@@ -194,9 +194,9 @@ const os = ot({
|
|
|
194
194
|
client: o ?? g,
|
|
195
195
|
isConnected: o ? !0 : f,
|
|
196
196
|
isLoading: o ? !1 : b,
|
|
197
|
-
error: o ? null :
|
|
197
|
+
error: o ? null : x,
|
|
198
198
|
capabilities: r,
|
|
199
|
-
refreshConnection:
|
|
199
|
+
refreshConnection: C,
|
|
200
200
|
debug: i
|
|
201
201
|
}), [
|
|
202
202
|
d,
|
|
@@ -204,20 +204,20 @@ const os = ot({
|
|
|
204
204
|
o,
|
|
205
205
|
f,
|
|
206
206
|
b,
|
|
207
|
-
|
|
207
|
+
x,
|
|
208
208
|
r,
|
|
209
|
-
|
|
209
|
+
C,
|
|
210
210
|
i,
|
|
211
211
|
l
|
|
212
212
|
]);
|
|
213
213
|
return l("🔄 RENDER END", {
|
|
214
214
|
renderCount: R.current,
|
|
215
|
-
willRenderChat: !!
|
|
216
|
-
contextValueReady: !!
|
|
217
|
-
}), /* @__PURE__ */ s(os.Provider, { value:
|
|
215
|
+
willRenderChat: !!F,
|
|
216
|
+
contextValueReady: !!E
|
|
217
|
+
}), /* @__PURE__ */ s(os.Provider, { value: E, children: F ? /* @__PURE__ */ s(
|
|
218
218
|
Hs,
|
|
219
219
|
{
|
|
220
|
-
client:
|
|
220
|
+
client: F,
|
|
221
221
|
customClasses: {
|
|
222
222
|
channelList: "str-chat__channel-list str-chat__channel-list-react bg-transparent lg:border-r-2 border-r-0 border-[#0000000A]"
|
|
223
223
|
},
|
|
@@ -407,73 +407,73 @@ const ne = ({
|
|
|
407
407
|
onActionComplete: m,
|
|
408
408
|
logLabel: g = "useChannelModerationActions"
|
|
409
409
|
}) => {
|
|
410
|
-
var
|
|
411
|
-
const { service: h, debug: f } = ct(), c = (
|
|
410
|
+
var E;
|
|
411
|
+
const { service: h, debug: f } = ct(), c = (E = t == null ? void 0 : t.user) == null ? void 0 : E.id, b = !!(a && n && h && c), [v, x] = U(!1), [p, _] = U(null), [w, k] = U(!1), [L, S] = U(!1), R = b && ((p == null ? void 0 : p.participantId) !== c || (p == null ? void 0 : p.service) !== h);
|
|
412
412
|
return K(() => {
|
|
413
413
|
if (!b || !h || !c) {
|
|
414
|
-
|
|
414
|
+
x(!1), _(null);
|
|
415
415
|
return;
|
|
416
416
|
}
|
|
417
|
-
let
|
|
417
|
+
let I = !1;
|
|
418
418
|
return (async () => {
|
|
419
419
|
try {
|
|
420
420
|
const T = await h.getBlockedUsers();
|
|
421
|
-
if (
|
|
422
|
-
|
|
421
|
+
if (I) return;
|
|
422
|
+
x(
|
|
423
423
|
T.some(
|
|
424
424
|
(M) => M.blocked_user_id === c
|
|
425
425
|
)
|
|
426
426
|
);
|
|
427
427
|
} catch (T) {
|
|
428
|
-
|
|
428
|
+
I || console.error(`[${g}] Failed to check blocked status:`, T);
|
|
429
429
|
} finally {
|
|
430
|
-
|
|
430
|
+
I || _({ participantId: c, service: h });
|
|
431
431
|
}
|
|
432
432
|
})(), () => {
|
|
433
|
-
|
|
433
|
+
I = !0;
|
|
434
434
|
};
|
|
435
435
|
}, [b, h, c, g]), {
|
|
436
|
-
isParticipantBlocked:
|
|
436
|
+
isParticipantBlocked: v,
|
|
437
437
|
isCheckingBlockedStatus: R,
|
|
438
438
|
isLeaving: w,
|
|
439
|
-
isUpdatingBlockStatus:
|
|
439
|
+
isUpdatingBlockStatus: L,
|
|
440
440
|
handleLeaveConversation: async () => {
|
|
441
|
-
var
|
|
441
|
+
var I;
|
|
442
442
|
if (!w) {
|
|
443
|
-
o == null || o(), f && console.log(`[${g}] Leave conversation`, e.cid),
|
|
443
|
+
o == null || o(), f && console.log(`[${g}] Leave conversation`, e.cid), k(!0);
|
|
444
444
|
try {
|
|
445
|
-
const T = ((
|
|
445
|
+
const T = ((I = e._client) == null ? void 0 : I.userID) ?? null;
|
|
446
446
|
await e.hide(T, !1), r && await r(e), m == null || m();
|
|
447
447
|
} catch (T) {
|
|
448
448
|
console.error(`[${g}] Failed to leave conversation`, T);
|
|
449
449
|
} finally {
|
|
450
|
-
|
|
450
|
+
k(!1);
|
|
451
451
|
}
|
|
452
452
|
}
|
|
453
453
|
},
|
|
454
454
|
handleBlockUser: async () => {
|
|
455
|
-
var
|
|
456
|
-
if (!(
|
|
457
|
-
l == null || l(), f && console.log(`[${g}] Block member`, (
|
|
455
|
+
var I, T, M;
|
|
456
|
+
if (!(L || !h)) {
|
|
457
|
+
l == null || l(), f && console.log(`[${g}] Block member`, (I = t == null ? void 0 : t.user) == null ? void 0 : I.id), S(!0);
|
|
458
458
|
try {
|
|
459
459
|
await h.blockUser((T = t == null ? void 0 : t.user) == null ? void 0 : T.id), i && await i((M = t == null ? void 0 : t.user) == null ? void 0 : M.id), m == null || m();
|
|
460
|
-
} catch (
|
|
461
|
-
console.error(`[${g}] Failed to block member`,
|
|
460
|
+
} catch (P) {
|
|
461
|
+
console.error(`[${g}] Failed to block member`, P);
|
|
462
462
|
} finally {
|
|
463
|
-
|
|
463
|
+
S(!1);
|
|
464
464
|
}
|
|
465
465
|
}
|
|
466
466
|
},
|
|
467
467
|
handleUnblockUser: async () => {
|
|
468
|
-
var
|
|
469
|
-
if (!(
|
|
470
|
-
l == null || l(), f && console.log(`[${g}] Unblock member`, (
|
|
468
|
+
var I, T, M;
|
|
469
|
+
if (!(L || !h)) {
|
|
470
|
+
l == null || l(), f && console.log(`[${g}] Unblock member`, (I = t == null ? void 0 : t.user) == null ? void 0 : I.id), S(!0);
|
|
471
471
|
try {
|
|
472
472
|
await h.unBlockUser((T = t == null ? void 0 : t.user) == null ? void 0 : T.id), i && await i((M = t == null ? void 0 : t.user) == null ? void 0 : M.id), m == null || m();
|
|
473
|
-
} catch (
|
|
474
|
-
console.error(`[${g}] Failed to unblock member`,
|
|
473
|
+
} catch (P) {
|
|
474
|
+
console.error(`[${g}] Failed to unblock member`, P);
|
|
475
475
|
} finally {
|
|
476
|
-
|
|
476
|
+
S(!1);
|
|
477
477
|
}
|
|
478
478
|
}
|
|
479
479
|
},
|
|
@@ -512,13 +512,13 @@ const ne = ({
|
|
|
512
512
|
customChannelActions: g,
|
|
513
513
|
triggerClassName: h
|
|
514
514
|
}) => {
|
|
515
|
-
const [f, c] = U(!1), b = G(null),
|
|
515
|
+
const [f, c] = U(!1), b = G(null), v = Us(), x = J(() => c(!1), []), {
|
|
516
516
|
isParticipantBlocked: p,
|
|
517
|
-
isCheckingBlockedStatus:
|
|
517
|
+
isCheckingBlockedStatus: _,
|
|
518
518
|
isLeaving: w,
|
|
519
|
-
isUpdatingBlockStatus:
|
|
520
|
-
handleLeaveConversation:
|
|
521
|
-
handleBlockUser:
|
|
519
|
+
isUpdatingBlockStatus: k,
|
|
520
|
+
handleLeaveConversation: L,
|
|
521
|
+
handleBlockUser: S,
|
|
522
522
|
handleUnblockUser: R,
|
|
523
523
|
handleReportUser: O
|
|
524
524
|
} = ca({
|
|
@@ -531,18 +531,18 @@ const ne = ({
|
|
|
531
531
|
onDeleteConversationClick: l,
|
|
532
532
|
onBlockParticipantClick: d,
|
|
533
533
|
onReportParticipantClick: m,
|
|
534
|
-
onActionComplete:
|
|
534
|
+
onActionComplete: x,
|
|
535
535
|
logLabel: "ChannelActionsMenu"
|
|
536
536
|
});
|
|
537
537
|
return K(() => {
|
|
538
538
|
if (!f) return;
|
|
539
|
-
const D = (
|
|
540
|
-
b.current && !b.current.contains(
|
|
541
|
-
},
|
|
542
|
-
|
|
539
|
+
const D = (E) => {
|
|
540
|
+
b.current && !b.current.contains(E.target) && c(!1);
|
|
541
|
+
}, C = (E) => {
|
|
542
|
+
E.key === "Escape" && c(!1);
|
|
543
543
|
};
|
|
544
|
-
return document.addEventListener("mousedown", D), document.addEventListener("keydown",
|
|
545
|
-
document.removeEventListener("mousedown", D), document.removeEventListener("keydown",
|
|
544
|
+
return document.addEventListener("mousedown", D), document.addEventListener("keydown", C), () => {
|
|
545
|
+
document.removeEventListener("mousedown", D), document.removeEventListener("keydown", C);
|
|
546
546
|
};
|
|
547
547
|
}, [f]), !t || !(n || a || r || !!g) ? null : /* @__PURE__ */ u("div", { ref: b, className: "relative", children: [
|
|
548
548
|
/* @__PURE__ */ u(
|
|
@@ -552,7 +552,7 @@ const ne = ({
|
|
|
552
552
|
type: "button",
|
|
553
553
|
"aria-haspopup": "true",
|
|
554
554
|
"aria-expanded": f,
|
|
555
|
-
"aria-controls": f ?
|
|
555
|
+
"aria-controls": f ? v : void 0,
|
|
556
556
|
onClick: () => c((D) => !D),
|
|
557
557
|
children: [
|
|
558
558
|
/* @__PURE__ */ s(Tn, { className: "size-5 text-black/90" }),
|
|
@@ -563,7 +563,7 @@ const ne = ({
|
|
|
563
563
|
f && /* @__PURE__ */ s(
|
|
564
564
|
"div",
|
|
565
565
|
{
|
|
566
|
-
id:
|
|
566
|
+
id: v,
|
|
567
567
|
"aria-label": "Conversation options",
|
|
568
568
|
className: y(
|
|
569
569
|
"absolute right-0 top-full z-50 mt-2 w-56 overflow-hidden",
|
|
@@ -573,7 +573,7 @@ const ne = ({
|
|
|
573
573
|
n && /* @__PURE__ */ s("li", { children: /* @__PURE__ */ u(
|
|
574
574
|
Ne,
|
|
575
575
|
{
|
|
576
|
-
onClick:
|
|
576
|
+
onClick: L,
|
|
577
577
|
disabled: w,
|
|
578
578
|
"aria-busy": w,
|
|
579
579
|
children: [
|
|
@@ -582,7 +582,7 @@ const ne = ({
|
|
|
582
582
|
]
|
|
583
583
|
}
|
|
584
584
|
) }),
|
|
585
|
-
a && /* @__PURE__ */ s("li", { children:
|
|
585
|
+
a && /* @__PURE__ */ s("li", { children: _ ? (
|
|
586
586
|
// Block status not yet resolved — show a disabled placeholder
|
|
587
587
|
// so a premature click can't act on a stale block state.
|
|
588
588
|
/* @__PURE__ */ u(Ne, { disabled: !0, "aria-busy": !0, children: [
|
|
@@ -593,21 +593,21 @@ const ne = ({
|
|
|
593
593
|
Ne,
|
|
594
594
|
{
|
|
595
595
|
onClick: R,
|
|
596
|
-
disabled:
|
|
597
|
-
"aria-busy":
|
|
596
|
+
disabled: k,
|
|
597
|
+
"aria-busy": k,
|
|
598
598
|
children: [
|
|
599
|
-
|
|
599
|
+
k ? /* @__PURE__ */ s(ze, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ s(Yt, { className: "h-5 w-5" }),
|
|
600
600
|
/* @__PURE__ */ s("span", { children: "Unblock" })
|
|
601
601
|
]
|
|
602
602
|
}
|
|
603
603
|
) : /* @__PURE__ */ u(
|
|
604
604
|
Ne,
|
|
605
605
|
{
|
|
606
|
-
onClick:
|
|
607
|
-
disabled:
|
|
608
|
-
"aria-busy":
|
|
606
|
+
onClick: S,
|
|
607
|
+
disabled: k,
|
|
608
|
+
"aria-busy": k,
|
|
609
609
|
children: [
|
|
610
|
-
|
|
610
|
+
k ? /* @__PURE__ */ s(ze, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ s(Yt, { className: "h-5 w-5" }),
|
|
611
611
|
/* @__PURE__ */ s("span", { children: "Block" })
|
|
612
612
|
]
|
|
613
613
|
}
|
|
@@ -640,27 +640,27 @@ const ne = ({
|
|
|
640
640
|
onReportParticipantClick: f,
|
|
641
641
|
customChannelActions: c,
|
|
642
642
|
renderChannelActions: b,
|
|
643
|
-
showChannelInfo:
|
|
644
|
-
onParticipantNameClick:
|
|
643
|
+
showChannelInfo: v = !0,
|
|
644
|
+
onParticipantNameClick: x
|
|
645
645
|
}) => {
|
|
646
|
-
var
|
|
647
|
-
const { channel: p } = oe(), { client:
|
|
646
|
+
var F, D, C;
|
|
647
|
+
const { channel: p } = oe(), { client: _ } = he(), w = V.useMemo(
|
|
648
648
|
() => {
|
|
649
|
-
var
|
|
649
|
+
var E;
|
|
650
650
|
return Ge(
|
|
651
|
-
(
|
|
652
|
-
|
|
651
|
+
(E = p.state) == null ? void 0 : E.members,
|
|
652
|
+
_ == null ? void 0 : _.userID,
|
|
653
653
|
p.type
|
|
654
654
|
);
|
|
655
655
|
},
|
|
656
|
-
[(
|
|
657
|
-
),
|
|
656
|
+
[(F = p.state) == null ? void 0 : F.members, _ == null ? void 0 : _.userID, p.type]
|
|
657
|
+
), k = ut(w == null ? void 0 : w.user), L = (D = w == null ? void 0 : w.user) == null ? void 0 : D.image, S = dt(p), R = ha(w), O = async () => {
|
|
658
658
|
try {
|
|
659
|
-
|
|
660
|
-
} catch (
|
|
659
|
+
S ? await p.unpin() : await p.pin();
|
|
660
|
+
} catch (E) {
|
|
661
661
|
console.error(
|
|
662
662
|
"[ChannelHeaderRedesign] Failed to update pinned status:",
|
|
663
|
-
|
|
663
|
+
E
|
|
664
664
|
);
|
|
665
665
|
}
|
|
666
666
|
};
|
|
@@ -690,16 +690,16 @@ const ne = ({
|
|
|
690
690
|
"button",
|
|
691
691
|
{
|
|
692
692
|
type: "button",
|
|
693
|
-
onClick:
|
|
694
|
-
"aria-label": `View details for ${
|
|
693
|
+
onClick: x,
|
|
694
|
+
"aria-label": `View details for ${k}`,
|
|
695
695
|
className: "group flex min-w-0 max-w-full appearance-none flex-col items-center border-0 bg-transparent px-2 focus-ring focus-visible:outline-none",
|
|
696
696
|
children: [
|
|
697
697
|
/* @__PURE__ */ s(
|
|
698
698
|
ne,
|
|
699
699
|
{
|
|
700
|
-
id: ((
|
|
701
|
-
name:
|
|
702
|
-
image:
|
|
700
|
+
id: ((C = w == null ? void 0 : w.user) == null ? void 0 : C.id) || p.id || "unknown",
|
|
701
|
+
name: k,
|
|
702
|
+
image: L,
|
|
703
703
|
dmAgentEnabled: r,
|
|
704
704
|
shape: "circle",
|
|
705
705
|
size: 48,
|
|
@@ -708,7 +708,7 @@ const ne = ({
|
|
|
708
708
|
),
|
|
709
709
|
/* @__PURE__ */ u("span", { className: "relative z-10 flex max-w-full flex-col items-center justify-center rounded-full border border-white/10 bg-white/65 py-1.5 pl-3 pr-2 shadow-[0px_0px_0px_0px_rgba(0,0,0,0.04),0px_1px_2px_0px_rgba(0,0,0,0.04),0px_8px_32px_0px_rgba(0,0,0,0.1)] backdrop-blur-[2px] transition-filter duration-150 group-hover:brightness-95", children: [
|
|
710
710
|
/* @__PURE__ */ u("span", { className: "flex max-w-full items-center justify-center", children: [
|
|
711
|
-
/* @__PURE__ */ s("span", { className: "min-w-0 truncate text-sm font-bold leading-[1.43] tracking-[0.28px] text-black/90", children:
|
|
711
|
+
/* @__PURE__ */ s("span", { className: "min-w-0 truncate text-sm font-bold leading-[1.43] tracking-[0.28px] text-black/90", children: k }),
|
|
712
712
|
/* @__PURE__ */ u("span", { className: "ml-2 flex gap-1", children: [
|
|
713
713
|
R && /* @__PURE__ */ s(
|
|
714
714
|
"span",
|
|
@@ -718,7 +718,7 @@ const ne = ({
|
|
|
718
718
|
children: /* @__PURE__ */ s(An, { className: "size-2.5", weight: "bold" })
|
|
719
719
|
}
|
|
720
720
|
),
|
|
721
|
-
a &&
|
|
721
|
+
a && S && /* @__PURE__ */ s(
|
|
722
722
|
"span",
|
|
723
723
|
{
|
|
724
724
|
"aria-label": "Starred conversation",
|
|
@@ -751,21 +751,21 @@ const ne = ({
|
|
|
751
751
|
className: Ke,
|
|
752
752
|
onClick: O,
|
|
753
753
|
type: "button",
|
|
754
|
-
"aria-pressed":
|
|
755
|
-
"aria-label":
|
|
754
|
+
"aria-pressed": S,
|
|
755
|
+
"aria-label": S ? "Unstar conversation" : "Star conversation",
|
|
756
756
|
children: /* @__PURE__ */ s(
|
|
757
757
|
Ee,
|
|
758
758
|
{
|
|
759
759
|
className: y("size-5", {
|
|
760
|
-
"text-[#FFD60A]":
|
|
761
|
-
"text-black/90": !
|
|
760
|
+
"text-[#FFD60A]": S,
|
|
761
|
+
"text-black/90": !S
|
|
762
762
|
}),
|
|
763
|
-
weight:
|
|
763
|
+
weight: S ? "fill" : "regular"
|
|
764
764
|
}
|
|
765
765
|
)
|
|
766
766
|
}
|
|
767
767
|
),
|
|
768
|
-
|
|
768
|
+
v && (b !== void 0 ? b : /* @__PURE__ */ s(
|
|
769
769
|
rt,
|
|
770
770
|
{
|
|
771
771
|
channel: p,
|
|
@@ -885,53 +885,53 @@ const ya = (e) => {
|
|
|
885
885
|
muted: d = !1,
|
|
886
886
|
onContainerClick: m
|
|
887
887
|
}) => {
|
|
888
|
-
const g = ce(t), h = G(null), f = G(null), c = G(null), b = G(r), [
|
|
889
|
-
O(!1),
|
|
890
|
-
}, []),
|
|
888
|
+
const g = ce(t), h = G(null), f = G(null), c = G(null), b = G(r), [v, x] = U(a), [p, _] = U(0), [w, k] = U(!1), [L, S] = U(!1), [R, O] = U(!1), [F, D] = U(!1), [C, E] = U(!0), [I, T] = U(null), M = J(() => {
|
|
889
|
+
O(!1), x(!0);
|
|
890
|
+
}, []), P = J((N) => {
|
|
891
891
|
const A = f.current;
|
|
892
892
|
if (!A) return 0;
|
|
893
893
|
const H = A.getBoundingClientRect();
|
|
894
894
|
return Math.max(
|
|
895
895
|
0,
|
|
896
|
-
Math.min(1, (ya(
|
|
896
|
+
Math.min(1, (ya(N) - H.left) / H.width)
|
|
897
897
|
);
|
|
898
|
-
}, []), $ = J((
|
|
898
|
+
}, []), $ = J((N) => {
|
|
899
899
|
const A = h.current;
|
|
900
|
-
A && A.duration && (A.currentTime =
|
|
901
|
-
}, []), j = (
|
|
902
|
-
|
|
903
|
-
const A =
|
|
904
|
-
|
|
900
|
+
A && A.duration && (A.currentTime = N * A.duration);
|
|
901
|
+
}, []), j = (N) => {
|
|
902
|
+
N.stopPropagation(), k(!0);
|
|
903
|
+
const A = P(N);
|
|
904
|
+
_(A), $(A);
|
|
905
905
|
};
|
|
906
906
|
K(() => {
|
|
907
|
-
r !== void 0 && r !== b.current && (b.current = r,
|
|
907
|
+
r !== void 0 && r !== b.current && (b.current = r, x(r));
|
|
908
908
|
}, [r]), K(() => {
|
|
909
|
-
if (!
|
|
909
|
+
if (!v) {
|
|
910
910
|
c.current !== null && (cancelAnimationFrame(c.current), c.current = null);
|
|
911
911
|
return;
|
|
912
912
|
}
|
|
913
|
-
const
|
|
913
|
+
const N = () => {
|
|
914
914
|
const A = h.current;
|
|
915
|
-
A && A.duration && !w &&
|
|
915
|
+
A && A.duration && !w && _(A.currentTime / A.duration), c.current = requestAnimationFrame(N);
|
|
916
916
|
};
|
|
917
|
-
return c.current = requestAnimationFrame(
|
|
917
|
+
return c.current = requestAnimationFrame(N), () => {
|
|
918
918
|
c.current !== null && cancelAnimationFrame(c.current);
|
|
919
919
|
};
|
|
920
|
-
}, [
|
|
921
|
-
const
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
}) :
|
|
925
|
-
}, [
|
|
920
|
+
}, [v, w]), K(() => {
|
|
921
|
+
const N = h.current;
|
|
922
|
+
N && (v ? N.play().catch((A) => {
|
|
923
|
+
x(!1), O(!0);
|
|
924
|
+
}) : N.pause());
|
|
925
|
+
}, [v]), K(() => {
|
|
926
926
|
if (!w) return;
|
|
927
|
-
const
|
|
928
|
-
|
|
927
|
+
const N = (H) => _(P(H)), A = (H) => {
|
|
928
|
+
k(!1), $(P(H));
|
|
929
929
|
};
|
|
930
|
-
return window.addEventListener("mousemove",
|
|
931
|
-
window.removeEventListener("mousemove",
|
|
930
|
+
return window.addEventListener("mousemove", N), window.addEventListener("mouseup", A), window.addEventListener("touchmove", N, { passive: !0 }), window.addEventListener("touchend", A), () => {
|
|
931
|
+
window.removeEventListener("mousemove", N), window.removeEventListener("mouseup", A), window.removeEventListener("touchmove", N), window.removeEventListener("touchend", A);
|
|
932
932
|
};
|
|
933
|
-
}, [w,
|
|
934
|
-
const Q =
|
|
933
|
+
}, [w, P, $]);
|
|
934
|
+
const Q = I ? { aspectRatio: String(I) } : void 0, ee = I ? "" : " aspect-video", X = Math.round(p * 100);
|
|
935
935
|
return /* @__PURE__ */ u(
|
|
936
936
|
"div",
|
|
937
937
|
{
|
|
@@ -939,24 +939,24 @@ const ya = (e) => {
|
|
|
939
939
|
tabIndex: 0,
|
|
940
940
|
className: `relative cursor-pointer overflow-hidden bg-black ${ee}`,
|
|
941
941
|
style: Q,
|
|
942
|
-
onClick: (
|
|
942
|
+
onClick: (N) => {
|
|
943
943
|
if (m) {
|
|
944
|
-
m(
|
|
944
|
+
m(N);
|
|
945
945
|
return;
|
|
946
946
|
}
|
|
947
|
-
R || o &&
|
|
947
|
+
R || o && x((A) => !A);
|
|
948
948
|
},
|
|
949
|
-
onKeyDown: (
|
|
950
|
-
if (!(
|
|
951
|
-
if (
|
|
952
|
-
m(
|
|
949
|
+
onKeyDown: (N) => {
|
|
950
|
+
if (!(N.key !== "Enter" && N.key !== " ")) {
|
|
951
|
+
if (N.preventDefault(), m) {
|
|
952
|
+
m(N);
|
|
953
953
|
return;
|
|
954
954
|
}
|
|
955
|
-
R || o &&
|
|
955
|
+
R || o && x((A) => !A);
|
|
956
956
|
}
|
|
957
957
|
},
|
|
958
958
|
children: [
|
|
959
|
-
n && (g === "audio" ||
|
|
959
|
+
n && (g === "audio" || C) && /* @__PURE__ */ s(
|
|
960
960
|
"img",
|
|
961
961
|
{
|
|
962
962
|
src: n,
|
|
@@ -964,7 +964,7 @@ const ya = (e) => {
|
|
|
964
964
|
className: "absolute inset-0 h-full w-full object-cover"
|
|
965
965
|
}
|
|
966
966
|
),
|
|
967
|
-
!n && (g === "audio" ||
|
|
967
|
+
!n && (g === "audio" || C) && /* @__PURE__ */ s("div", { className: "absolute inset-0 flex items-center justify-center", children: we(t, {
|
|
968
968
|
className: "size-12 text-black/20",
|
|
969
969
|
weight: "regular"
|
|
970
970
|
}) }),
|
|
@@ -978,12 +978,12 @@ const ya = (e) => {
|
|
|
978
978
|
style: { width: "100%", height: "100%" },
|
|
979
979
|
onLoadStart: () => D(!0),
|
|
980
980
|
onCanPlay: () => {
|
|
981
|
-
D(!1),
|
|
981
|
+
D(!1), E(!1);
|
|
982
982
|
},
|
|
983
983
|
onWaiting: () => D(!0),
|
|
984
984
|
onPlay: () => O(!1),
|
|
985
985
|
onEnded: () => {
|
|
986
|
-
i || (
|
|
986
|
+
i || (x(!1), _(0));
|
|
987
987
|
},
|
|
988
988
|
children: /* @__PURE__ */ s("track", { kind: "captions" })
|
|
989
989
|
}
|
|
@@ -998,21 +998,21 @@ const ya = (e) => {
|
|
|
998
998
|
style: { width: "100%", height: "100%" },
|
|
999
999
|
onLoadStart: () => D(!0),
|
|
1000
1000
|
onCanPlay: () => {
|
|
1001
|
-
D(!1),
|
|
1001
|
+
D(!1), E(!1);
|
|
1002
1002
|
},
|
|
1003
1003
|
onWaiting: () => D(!0),
|
|
1004
1004
|
onPlay: () => O(!1),
|
|
1005
1005
|
onLoadedMetadata: () => {
|
|
1006
|
-
const
|
|
1007
|
-
|
|
1006
|
+
const N = h.current;
|
|
1007
|
+
N instanceof HTMLVideoElement && N.videoWidth && N.videoHeight && T(N.videoWidth / N.videoHeight);
|
|
1008
1008
|
},
|
|
1009
1009
|
onEnded: () => {
|
|
1010
|
-
i || (
|
|
1010
|
+
i || (x(!1), _(0));
|
|
1011
1011
|
},
|
|
1012
1012
|
children: /* @__PURE__ */ s("track", { kind: "captions" })
|
|
1013
1013
|
}
|
|
1014
1014
|
) }),
|
|
1015
|
-
|
|
1015
|
+
F && !R && /* @__PURE__ */ s("div", { className: "absolute inset-0 z-10 flex items-center justify-center", children: /* @__PURE__ */ s(
|
|
1016
1016
|
Ce,
|
|
1017
1017
|
{
|
|
1018
1018
|
className: "size-8 animate-spin text-white/80",
|
|
@@ -1026,11 +1026,11 @@ const ya = (e) => {
|
|
|
1026
1026
|
role: "button",
|
|
1027
1027
|
tabIndex: 0,
|
|
1028
1028
|
"aria-label": "Play preview",
|
|
1029
|
-
onClick: (
|
|
1030
|
-
|
|
1029
|
+
onClick: (N) => {
|
|
1030
|
+
N.stopPropagation(), M();
|
|
1031
1031
|
},
|
|
1032
|
-
onKeyDown: (
|
|
1033
|
-
|
|
1032
|
+
onKeyDown: (N) => {
|
|
1033
|
+
N.key !== "Enter" && N.key !== " " || (N.preventDefault(), N.stopPropagation(), M());
|
|
1034
1034
|
},
|
|
1035
1035
|
children: /* @__PURE__ */ s("span", { className: "flex size-16 items-center justify-center rounded-full bg-white/20 text-white backdrop-blur-sm", children: /* @__PURE__ */ s(at, { className: "size-9 translate-x-0.5", weight: "fill" }) })
|
|
1036
1036
|
}
|
|
@@ -1048,9 +1048,9 @@ const ya = (e) => {
|
|
|
1048
1048
|
className: "relative flex h-4 w-full cursor-pointer items-center",
|
|
1049
1049
|
onMouseDown: j,
|
|
1050
1050
|
onTouchStart: j,
|
|
1051
|
-
onClick: (
|
|
1052
|
-
onKeyDown: (
|
|
1053
|
-
|
|
1051
|
+
onClick: (N) => N.stopPropagation(),
|
|
1052
|
+
onKeyDown: (N) => {
|
|
1053
|
+
N.key === "ArrowRight" && $(Math.min(1, p + 0.05)), N.key === "ArrowLeft" && $(Math.max(0, p - 0.05));
|
|
1054
1054
|
},
|
|
1055
1055
|
children: /* @__PURE__ */ s("div", { className: "w-full overflow-hidden rounded-full bg-white/30 h-1", children: /* @__PURE__ */ s(
|
|
1056
1056
|
"div",
|
|
@@ -1066,12 +1066,12 @@ const ya = (e) => {
|
|
|
1066
1066
|
"button",
|
|
1067
1067
|
{
|
|
1068
1068
|
type: "button",
|
|
1069
|
-
onClick: (
|
|
1070
|
-
|
|
1069
|
+
onClick: (N) => {
|
|
1070
|
+
N.stopPropagation(), x((A) => !A);
|
|
1071
1071
|
},
|
|
1072
1072
|
className: "shrink-0 text-white",
|
|
1073
|
-
"aria-label":
|
|
1074
|
-
children:
|
|
1073
|
+
"aria-label": v ? "Pause" : "Play",
|
|
1074
|
+
children: v ? /* @__PURE__ */ s(jn, { className: "size-5", weight: "fill" }) : /* @__PURE__ */ s(at, { className: "size-5 translate-x-px", weight: "fill" })
|
|
1075
1075
|
}
|
|
1076
1076
|
),
|
|
1077
1077
|
/* @__PURE__ */ u(
|
|
@@ -1087,17 +1087,17 @@ const ya = (e) => {
|
|
|
1087
1087
|
className: "relative flex h-4 w-full cursor-pointer items-center",
|
|
1088
1088
|
onMouseDown: j,
|
|
1089
1089
|
onTouchStart: j,
|
|
1090
|
-
onClick: (
|
|
1091
|
-
onMouseEnter: () =>
|
|
1092
|
-
onMouseLeave: () =>
|
|
1093
|
-
onKeyDown: (
|
|
1094
|
-
|
|
1090
|
+
onClick: (N) => N.stopPropagation(),
|
|
1091
|
+
onMouseEnter: () => S(!0),
|
|
1092
|
+
onMouseLeave: () => S(!1),
|
|
1093
|
+
onKeyDown: (N) => {
|
|
1094
|
+
N.key === "ArrowRight" && $(Math.min(1, p + 0.05)), N.key === "ArrowLeft" && $(Math.max(0, p - 0.05));
|
|
1095
1095
|
},
|
|
1096
1096
|
children: [
|
|
1097
1097
|
/* @__PURE__ */ s(
|
|
1098
1098
|
"div",
|
|
1099
1099
|
{
|
|
1100
|
-
className: `w-full overflow-hidden rounded-full bg-white/30 transition-all duration-200 ${
|
|
1100
|
+
className: `w-full overflow-hidden rounded-full bg-white/30 transition-all duration-200 ${L || w ? "h-1.5" : "h-1"}`,
|
|
1101
1101
|
children: /* @__PURE__ */ s(
|
|
1102
1102
|
"div",
|
|
1103
1103
|
{
|
|
@@ -1110,7 +1110,7 @@ const ya = (e) => {
|
|
|
1110
1110
|
/* @__PURE__ */ s(
|
|
1111
1111
|
"div",
|
|
1112
1112
|
{
|
|
1113
|
-
className: `absolute size-3 -translate-x-1/2 rounded-full bg-white shadow transition-[opacity,transform] duration-200 ${
|
|
1113
|
+
className: `absolute size-3 -translate-x-1/2 rounded-full bg-white shadow transition-[opacity,transform] duration-200 ${L || w ? "scale-100 opacity-100" : "scale-0 opacity-0"}`,
|
|
1114
1114
|
style: { left: `${X}%` }
|
|
1115
1115
|
}
|
|
1116
1116
|
)
|
|
@@ -1361,13 +1361,13 @@ const Ra = ({
|
|
|
1361
1361
|
function gt(e) {
|
|
1362
1362
|
var h, f, c, b;
|
|
1363
1363
|
const t = (h = e.attachments) == null ? void 0 : h.find(
|
|
1364
|
-
(
|
|
1364
|
+
(v) => v.type === "video" && v.asset_url
|
|
1365
1365
|
), n = (f = e.attachments) == null ? void 0 : f.find(
|
|
1366
|
-
(
|
|
1366
|
+
(v) => v.type === "image" && v.image_url
|
|
1367
1367
|
), a = (c = e.attachments) == null ? void 0 : c.find(
|
|
1368
|
-
(
|
|
1368
|
+
(v) => v.type === "audio" && v.asset_url
|
|
1369
1369
|
), r = (b = e.attachments) == null ? void 0 : b.find(
|
|
1370
|
-
(
|
|
1370
|
+
(v) => v.type === "file" && v.asset_url
|
|
1371
1371
|
), i = t ?? n ?? a ?? r, o = (t == null ? void 0 : t.asset_url) ?? (n == null ? void 0 : n.image_url) ?? (a == null ? void 0 : a.asset_url) ?? (r == null ? void 0 : r.asset_url);
|
|
1372
1372
|
if (!o) return null;
|
|
1373
1373
|
const l = (i == null ? void 0 : i.mime_type) ?? ((i == null ? void 0 : i.type) === "image" ? "image/jpeg" : (i == null ? void 0 : i.type) === "video" ? "video/mp4" : (i == null ? void 0 : i.type) === "audio" ? "audio/mpeg" : "application/octet-stream"), d = i == null ? void 0 : i.title, m = i == null ? void 0 : i.file_size, g = t == null ? void 0 : t.thumb_url;
|
|
@@ -1815,16 +1815,16 @@ const tr = ({
|
|
|
1815
1815
|
mimeType: r,
|
|
1816
1816
|
title: i,
|
|
1817
1817
|
items: o
|
|
1818
|
-
}), b = (
|
|
1819
|
-
if ((m == null ? void 0 : m(
|
|
1820
|
-
const p = c[
|
|
1818
|
+
}), b = (x) => {
|
|
1819
|
+
if ((m == null ? void 0 : m(x)) === !1) return;
|
|
1820
|
+
const p = c[x];
|
|
1821
1821
|
if (!p) return;
|
|
1822
|
-
const
|
|
1823
|
-
xs(p.src,
|
|
1822
|
+
const _ = p.filename ?? ie(p.src);
|
|
1823
|
+
xs(p.src, _);
|
|
1824
1824
|
};
|
|
1825
1825
|
if (c.length === 0)
|
|
1826
1826
|
return null;
|
|
1827
|
-
const
|
|
1827
|
+
const v = /* @__PURE__ */ s(
|
|
1828
1828
|
"span",
|
|
1829
1829
|
{
|
|
1830
1830
|
className: y(
|
|
@@ -1842,16 +1842,16 @@ const tr = ({
|
|
|
1842
1842
|
text: l,
|
|
1843
1843
|
groupPosition: d,
|
|
1844
1844
|
"data-testid": "file-attachment",
|
|
1845
|
-
children: /* @__PURE__ */ s("div", { className: "flex flex-col gap-2", children: c.map((
|
|
1845
|
+
children: /* @__PURE__ */ s("div", { className: "flex flex-col gap-2", children: c.map((x, p) => /* @__PURE__ */ s(
|
|
1846
1846
|
sr,
|
|
1847
1847
|
{
|
|
1848
1848
|
variant: h,
|
|
1849
|
-
item:
|
|
1849
|
+
item: x,
|
|
1850
1850
|
index: p,
|
|
1851
1851
|
onActivate: b,
|
|
1852
|
-
trailingAction: f && p === 0 ? /* @__PURE__ */ s(Me, { onClick: g, variant: "inline" }) :
|
|
1852
|
+
trailingAction: f && p === 0 ? /* @__PURE__ */ s(Me, { onClick: g, variant: "inline" }) : v
|
|
1853
1853
|
},
|
|
1854
|
-
`${
|
|
1854
|
+
`${x.src}-${p}`
|
|
1855
1855
|
)) })
|
|
1856
1856
|
}
|
|
1857
1857
|
);
|
|
@@ -2294,8 +2294,8 @@ const tr = ({
|
|
|
2294
2294
|
);
|
|
2295
2295
|
if (m.length === 0)
|
|
2296
2296
|
return null;
|
|
2297
|
-
const
|
|
2298
|
-
(
|
|
2297
|
+
const v = m.map(
|
|
2298
|
+
(x, p) => or(x, p, m.length, l)
|
|
2299
2299
|
);
|
|
2300
2300
|
return /* @__PURE__ */ u(
|
|
2301
2301
|
Te,
|
|
@@ -2305,7 +2305,7 @@ const tr = ({
|
|
|
2305
2305
|
groupPosition: o,
|
|
2306
2306
|
"data-testid": "image-attachment",
|
|
2307
2307
|
children: [
|
|
2308
|
-
/* @__PURE__ */ s("div", { className: "relative", children: /* @__PURE__ */ s(Ns, { tiles:
|
|
2308
|
+
/* @__PURE__ */ s("div", { className: "relative", children: /* @__PURE__ */ s(Ns, { tiles: v, onTileActivate: c }) }),
|
|
2309
2309
|
/* @__PURE__ */ s(
|
|
2310
2310
|
_s,
|
|
2311
2311
|
{
|
|
@@ -2412,14 +2412,14 @@ const tr = ({
|
|
|
2412
2412
|
onClick: d,
|
|
2413
2413
|
onDismiss: m
|
|
2414
2414
|
}) => {
|
|
2415
|
-
const g = Ae(e), h = br({ src: t, filename: n, fileSize: a, title: r, items: i }), { viewerOpen: f, viewerIndex: c, handleActivate: b, closeViewer:
|
|
2415
|
+
const g = Ae(e), h = br({ src: t, filename: n, fileSize: a, title: r, items: i }), { viewerOpen: f, viewerIndex: c, handleActivate: b, closeViewer: v } = Re(
|
|
2416
2416
|
d
|
|
2417
|
-
),
|
|
2417
|
+
), x = e === "composer" && !!m;
|
|
2418
2418
|
if (h.length === 0)
|
|
2419
2419
|
return null;
|
|
2420
|
-
const p = h.map((
|
|
2421
|
-
src:
|
|
2422
|
-
filename:
|
|
2420
|
+
const p = h.map((_) => ({
|
|
2421
|
+
src: _.src,
|
|
2422
|
+
filename: _.filename ?? ie(_.src)
|
|
2423
2423
|
}));
|
|
2424
2424
|
return /* @__PURE__ */ u(
|
|
2425
2425
|
Te,
|
|
@@ -2429,14 +2429,14 @@ const tr = ({
|
|
|
2429
2429
|
groupPosition: l,
|
|
2430
2430
|
"data-testid": "pdf-attachment",
|
|
2431
2431
|
children: [
|
|
2432
|
-
/* @__PURE__ */ s("div", { className: "flex flex-col gap-2", children: h.map((
|
|
2433
|
-
const
|
|
2432
|
+
/* @__PURE__ */ s("div", { className: "flex flex-col gap-2", children: h.map((_, w) => {
|
|
2433
|
+
const k = _.filename ?? ie(_.src), L = x && w === 0 ? /* @__PURE__ */ s(Me, { onClick: m, variant: "inline" }) : e === "composer" ? void 0 : /* @__PURE__ */ s(
|
|
2434
2434
|
ws,
|
|
2435
2435
|
{
|
|
2436
|
-
url:
|
|
2437
|
-
filename:
|
|
2436
|
+
url: _.src,
|
|
2437
|
+
filename: k,
|
|
2438
2438
|
variant: "inline",
|
|
2439
|
-
label: `Download ${
|
|
2439
|
+
label: `Download ${k}`,
|
|
2440
2440
|
tone: g
|
|
2441
2441
|
}
|
|
2442
2442
|
);
|
|
@@ -2444,12 +2444,12 @@ const tr = ({
|
|
|
2444
2444
|
vr,
|
|
2445
2445
|
{
|
|
2446
2446
|
variant: g,
|
|
2447
|
-
item:
|
|
2447
|
+
item: _,
|
|
2448
2448
|
index: w,
|
|
2449
2449
|
onActivate: b,
|
|
2450
|
-
trailingAction:
|
|
2450
|
+
trailingAction: L
|
|
2451
2451
|
},
|
|
2452
|
-
`${
|
|
2452
|
+
`${_.src}-${w}`
|
|
2453
2453
|
);
|
|
2454
2454
|
}) }),
|
|
2455
2455
|
/* @__PURE__ */ s(
|
|
@@ -2458,7 +2458,7 @@ const tr = ({
|
|
|
2458
2458
|
open: f,
|
|
2459
2459
|
items: p,
|
|
2460
2460
|
initialIndex: c,
|
|
2461
|
-
onClose:
|
|
2461
|
+
onClose: v
|
|
2462
2462
|
}
|
|
2463
2463
|
)
|
|
2464
2464
|
]
|
|
@@ -2597,13 +2597,13 @@ const tr = ({
|
|
|
2597
2597
|
preload: d,
|
|
2598
2598
|
onClick: m
|
|
2599
2599
|
}) => {
|
|
2600
|
-
const g = Cr({ src: t, poster: n, mimeType: a, preload: d, items: i }), h = Ae(e), { viewerOpen: f, viewerIndex: c, handleActivate: b, closeViewer:
|
|
2600
|
+
const g = Cr({ src: t, poster: n, mimeType: a, preload: d, items: i }), h = Ae(e), { viewerOpen: f, viewerIndex: c, handleActivate: b, closeViewer: v } = Re(
|
|
2601
2601
|
m
|
|
2602
2602
|
);
|
|
2603
2603
|
if (g.length === 0)
|
|
2604
2604
|
return null;
|
|
2605
|
-
const
|
|
2606
|
-
(p,
|
|
2605
|
+
const x = g.map(
|
|
2606
|
+
(p, _) => kr(p, _, g.length)
|
|
2607
2607
|
);
|
|
2608
2608
|
return /* @__PURE__ */ u(
|
|
2609
2609
|
Te,
|
|
@@ -2616,7 +2616,7 @@ const tr = ({
|
|
|
2616
2616
|
/* @__PURE__ */ s("div", { className: "relative", children: /* @__PURE__ */ s(
|
|
2617
2617
|
Ns,
|
|
2618
2618
|
{
|
|
2619
|
-
tiles:
|
|
2619
|
+
tiles: x,
|
|
2620
2620
|
onTileActivate: b,
|
|
2621
2621
|
className: "overflow-hidden rounded-md"
|
|
2622
2622
|
}
|
|
@@ -2627,7 +2627,7 @@ const tr = ({
|
|
|
2627
2627
|
open: f,
|
|
2628
2628
|
items: Es(g, r),
|
|
2629
2629
|
initialIndex: c,
|
|
2630
|
-
onClose:
|
|
2630
|
+
onClose: v
|
|
2631
2631
|
}
|
|
2632
2632
|
)
|
|
2633
2633
|
]
|
|
@@ -2651,7 +2651,7 @@ const tr = ({
|
|
|
2651
2651
|
function Dr(e) {
|
|
2652
2652
|
return Ie(Ts)[e] ?? Rr[e];
|
|
2653
2653
|
}
|
|
2654
|
-
const Lr = V.lazy(() => import("./Card-qS17qnN0.js")), zr = V.lazy(() => import("./Card-
|
|
2654
|
+
const Lr = V.lazy(() => import("./Card-qS17qnN0.js")), zr = V.lazy(() => import("./Card-BnbNynLQ.js")), Fr = () => /* @__PURE__ */ s(
|
|
2655
2655
|
"div",
|
|
2656
2656
|
{
|
|
2657
2657
|
className: "w-[280px] min-h-[200px] animate-pulse rounded-md bg-black/[0.06] shadow-[0_0_0_1px_rgba(0,0,0,0.04),0_1px_2px_rgba(0,0,0,0.04),0_8px_32px_rgba(0,0,0,0.1)]",
|
|
@@ -2843,7 +2843,7 @@ const Wr = {
|
|
|
2843
2843
|
}) => {
|
|
2844
2844
|
const d = e === "dark", m = t ?? (d ? n : void 0) ?? "", g = m.trim() !== "", h = a != null && a.trim() !== "", f = typeof r == "string" ? r.trim() : "", c = f !== "", b = o != null;
|
|
2845
2845
|
if (!g && !h && !c && !b) return null;
|
|
2846
|
-
const
|
|
2846
|
+
const x = y(
|
|
2847
2847
|
"truncate text-base font-medium leading-6",
|
|
2848
2848
|
d && !t ? Zr : Kr[e]
|
|
2849
2849
|
), p = y(
|
|
@@ -2856,7 +2856,7 @@ const Wr = {
|
|
|
2856
2856
|
/* @__PURE__ */ u("div", { className: "flex min-w-0 flex-col gap-1", children: [
|
|
2857
2857
|
g && /* @__PURE__ */ u("div", { className: "flex min-w-0 items-center gap-2", children: [
|
|
2858
2858
|
i ? /* @__PURE__ */ s("span", { className: "shrink-0", children: i }) : null,
|
|
2859
|
-
/* @__PURE__ */ s("p", { className: y("min-w-0",
|
|
2859
|
+
/* @__PURE__ */ s("p", { className: y("min-w-0", x), children: m })
|
|
2860
2860
|
] }),
|
|
2861
2861
|
h && /* @__PURE__ */ s("p", { className: p, children: a })
|
|
2862
2862
|
] }),
|
|
@@ -3030,7 +3030,7 @@ const Wr = {
|
|
|
3030
3030
|
className: "flex size-6 items-center justify-center rounded-full bg-[#121110] text-white",
|
|
3031
3031
|
children: /* @__PURE__ */ s(Ve, { className: "size-3", weight: "bold" })
|
|
3032
3032
|
}
|
|
3033
|
-
) : void 0,
|
|
3033
|
+
) : void 0, v = h ? /* @__PURE__ */ s(
|
|
3034
3034
|
"button",
|
|
3035
3035
|
{
|
|
3036
3036
|
type: "button",
|
|
@@ -3078,7 +3078,7 @@ const Wr = {
|
|
|
3078
3078
|
url: a,
|
|
3079
3079
|
appIcon: d,
|
|
3080
3080
|
cta: m,
|
|
3081
|
-
trailingAction:
|
|
3081
|
+
trailingAction: v
|
|
3082
3082
|
}
|
|
3083
3083
|
)
|
|
3084
3084
|
]
|
|
@@ -3096,11 +3096,11 @@ const Wr = {
|
|
|
3096
3096
|
cta: d,
|
|
3097
3097
|
onClick: m
|
|
3098
3098
|
}) => {
|
|
3099
|
-
const g = Ct(a, i), h = yt(n), f = d == null && h != null && !g ? h : void 0, c = d == null && !g ? m : void 0, b = He(a, i) ? St : void 0,
|
|
3099
|
+
const g = Ct(a, i), h = yt(n), f = d == null && h != null && !g ? h : void 0, c = d == null && !g ? m : void 0, b = He(a, i) ? St : void 0, v = d && m ? {
|
|
3100
3100
|
...d,
|
|
3101
3101
|
onClick: () => {
|
|
3102
|
-
var
|
|
3103
|
-
m(), (
|
|
3102
|
+
var x;
|
|
3103
|
+
m(), (x = d.onClick) == null || x.call(d);
|
|
3104
3104
|
}
|
|
3105
3105
|
} : d;
|
|
3106
3106
|
return /* @__PURE__ */ u(
|
|
@@ -3131,7 +3131,7 @@ const Wr = {
|
|
|
3131
3131
|
description: t,
|
|
3132
3132
|
url: n,
|
|
3133
3133
|
appIcon: l,
|
|
3134
|
-
cta:
|
|
3134
|
+
cta: v
|
|
3135
3135
|
}
|
|
3136
3136
|
)
|
|
3137
3137
|
]
|
|
@@ -3189,7 +3189,7 @@ const Wr = {
|
|
|
3189
3189
|
Sent: ai,
|
|
3190
3190
|
Received: ni
|
|
3191
3191
|
};
|
|
3192
|
-
function
|
|
3192
|
+
function z(e) {
|
|
3193
3193
|
const t = e == null ? void 0 : e.trim();
|
|
3194
3194
|
return t || void 0;
|
|
3195
3195
|
}
|
|
@@ -3208,10 +3208,10 @@ function ri(e, t) {
|
|
|
3208
3208
|
return !/[^\p{P}\p{Z}\p{C}]/u.test(r);
|
|
3209
3209
|
}
|
|
3210
3210
|
function Jt(e) {
|
|
3211
|
-
const t =
|
|
3211
|
+
const t = z(e.og_scrape_url) ?? z(e.title_link), n = z(e.image_url) ?? z(e.thumb_url), a = z(e.asset_url), r = z(e.mime_type);
|
|
3212
3212
|
return {
|
|
3213
|
-
title:
|
|
3214
|
-
description:
|
|
3213
|
+
title: z(e.title),
|
|
3214
|
+
description: z(e.text),
|
|
3215
3215
|
url: t,
|
|
3216
3216
|
thumbnailUrl: n,
|
|
3217
3217
|
// Playable clip embedded in a link preview — lets LinkAttachment render its
|
|
@@ -3226,7 +3226,7 @@ function ii(e) {
|
|
|
3226
3226
|
return As(e) ? null : e.type === "image" ? e.image_url || e.asset_url ? "image" : null : e.type === "video" && e.asset_url ? "video" : e.type === "audio" && e.asset_url ? "audio" : e.type === "file" && e.asset_url ? e.mime_type === "application/pdf" ? "pdf" : (t = e.mime_type) != null && t.startsWith("audio/") ? "audio" : "file" : null;
|
|
3227
3227
|
}
|
|
3228
3228
|
function As(e) {
|
|
3229
|
-
const t =
|
|
3229
|
+
const t = z(e.og_scrape_url);
|
|
3230
3230
|
return e.type === "link" || !!t && !e.asset_url;
|
|
3231
3231
|
}
|
|
3232
3232
|
function Rs(e) {
|
|
@@ -3263,7 +3263,7 @@ function oi(e, t, n) {
|
|
|
3263
3263
|
return t <= 1 ? n : e === 0 ? "first" : e === t - 1 ? "end" : "middle";
|
|
3264
3264
|
}
|
|
3265
3265
|
function Qt(e) {
|
|
3266
|
-
return
|
|
3266
|
+
return z(e.image_url) ?? z(e.asset_url) ?? "";
|
|
3267
3267
|
}
|
|
3268
3268
|
function ci(e) {
|
|
3269
3269
|
switch (e) {
|
|
@@ -3286,25 +3286,25 @@ function di(e, t) {
|
|
|
3286
3286
|
return {
|
|
3287
3287
|
items: t.map((a) => ({
|
|
3288
3288
|
src: Qt(a),
|
|
3289
|
-
alt:
|
|
3289
|
+
alt: z(a.title)
|
|
3290
3290
|
}))
|
|
3291
3291
|
};
|
|
3292
3292
|
case "video":
|
|
3293
3293
|
return {
|
|
3294
3294
|
items: t.map((a) => ({
|
|
3295
|
-
src:
|
|
3296
|
-
poster:
|
|
3295
|
+
src: z(a.asset_url) ?? "",
|
|
3296
|
+
poster: z(
|
|
3297
3297
|
a.thumb_url
|
|
3298
3298
|
),
|
|
3299
|
-
mimeType:
|
|
3299
|
+
mimeType: z(a.mime_type)
|
|
3300
3300
|
}))
|
|
3301
3301
|
};
|
|
3302
3302
|
case "audio":
|
|
3303
3303
|
return {
|
|
3304
3304
|
items: t.map((a) => ({
|
|
3305
|
-
src:
|
|
3306
|
-
mimeType:
|
|
3307
|
-
filename:
|
|
3305
|
+
src: z(a.asset_url) ?? "",
|
|
3306
|
+
mimeType: z(a.mime_type) ?? "audio/mpeg",
|
|
3307
|
+
filename: z(
|
|
3308
3308
|
a.title
|
|
3309
3309
|
)
|
|
3310
3310
|
}))
|
|
@@ -3312,8 +3312,8 @@ function di(e, t) {
|
|
|
3312
3312
|
case "pdf":
|
|
3313
3313
|
return {
|
|
3314
3314
|
items: t.map((a) => ({
|
|
3315
|
-
src:
|
|
3316
|
-
filename:
|
|
3315
|
+
src: z(a.asset_url) ?? "",
|
|
3316
|
+
filename: z(
|
|
3317
3317
|
a.title
|
|
3318
3318
|
),
|
|
3319
3319
|
fileSize: a.file_size
|
|
@@ -3322,12 +3322,12 @@ function di(e, t) {
|
|
|
3322
3322
|
case "file":
|
|
3323
3323
|
return {
|
|
3324
3324
|
items: t.map((a) => ({
|
|
3325
|
-
src:
|
|
3326
|
-
filename:
|
|
3325
|
+
src: z(a.asset_url) ?? "",
|
|
3326
|
+
filename: z(
|
|
3327
3327
|
a.title
|
|
3328
3328
|
),
|
|
3329
3329
|
fileSize: a.file_size,
|
|
3330
|
-
mimeType:
|
|
3330
|
+
mimeType: z(a.mime_type) ?? "application/octet-stream"
|
|
3331
3331
|
}))
|
|
3332
3332
|
};
|
|
3333
3333
|
}
|
|
@@ -3337,32 +3337,32 @@ function di(e, t) {
|
|
|
3337
3337
|
case "image":
|
|
3338
3338
|
return {
|
|
3339
3339
|
src: Qt(n),
|
|
3340
|
-
alt:
|
|
3340
|
+
alt: z(n.title)
|
|
3341
3341
|
};
|
|
3342
3342
|
case "video":
|
|
3343
3343
|
return {
|
|
3344
|
-
src:
|
|
3345
|
-
poster:
|
|
3346
|
-
mimeType:
|
|
3344
|
+
src: z(n.asset_url) ?? "",
|
|
3345
|
+
poster: z(n.thumb_url),
|
|
3346
|
+
mimeType: z(n.mime_type)
|
|
3347
3347
|
};
|
|
3348
3348
|
case "audio":
|
|
3349
3349
|
return {
|
|
3350
|
-
src:
|
|
3351
|
-
mimeType:
|
|
3352
|
-
filename:
|
|
3350
|
+
src: z(n.asset_url) ?? "",
|
|
3351
|
+
mimeType: z(n.mime_type) ?? "audio/mpeg",
|
|
3352
|
+
filename: z(n.title)
|
|
3353
3353
|
};
|
|
3354
3354
|
case "pdf":
|
|
3355
3355
|
return {
|
|
3356
|
-
src:
|
|
3357
|
-
filename:
|
|
3356
|
+
src: z(n.asset_url) ?? "",
|
|
3357
|
+
filename: z(n.title),
|
|
3358
3358
|
fileSize: n.file_size
|
|
3359
3359
|
};
|
|
3360
3360
|
case "file":
|
|
3361
3361
|
return {
|
|
3362
|
-
src:
|
|
3363
|
-
filename:
|
|
3362
|
+
src: z(n.asset_url) ?? "",
|
|
3363
|
+
filename: z(n.title),
|
|
3364
3364
|
fileSize: n.file_size,
|
|
3365
|
-
mimeType:
|
|
3365
|
+
mimeType: z(n.mime_type) ?? "application/octet-stream"
|
|
3366
3366
|
};
|
|
3367
3367
|
}
|
|
3368
3368
|
}
|
|
@@ -3386,14 +3386,14 @@ const mi = ({
|
|
|
3386
3386
|
var b;
|
|
3387
3387
|
const r = Rs(n.attachments);
|
|
3388
3388
|
if (r.length === 0) return null;
|
|
3389
|
-
const i = li(r), o = (b = n.text) == null ? void 0 : b.trim(), l = r.find((
|
|
3389
|
+
const i = li(r), o = (b = n.text) == null ? void 0 : b.trim(), l = r.find((v) => v.type === "link"), d = (l == null ? void 0 : l.type) === "link" ? Jt(l.attachments[0] ?? {}).url : void 0, m = o && ri(o, d) ? void 0 : o;
|
|
3390
3390
|
let g = 0;
|
|
3391
|
-
const h = [], f = (
|
|
3391
|
+
const h = [], f = (v, x) => {
|
|
3392
3392
|
const p = t ? Kt.Sent : Kt.Received;
|
|
3393
3393
|
h.push(
|
|
3394
|
-
/* @__PURE__ */ s(p, { ...Jt(
|
|
3394
|
+
/* @__PURE__ */ s(p, { ...Jt(v) }, x)
|
|
3395
3395
|
);
|
|
3396
|
-
}, c = (
|
|
3396
|
+
}, c = (v, x) => {
|
|
3397
3397
|
const p = oi(
|
|
3398
3398
|
g,
|
|
3399
3399
|
i,
|
|
@@ -3405,20 +3405,20 @@ const mi = ({
|
|
|
3405
3405
|
{
|
|
3406
3406
|
groupPosition: p,
|
|
3407
3407
|
isMyMessage: t,
|
|
3408
|
-
segment:
|
|
3408
|
+
segment: v
|
|
3409
3409
|
},
|
|
3410
|
-
|
|
3410
|
+
x
|
|
3411
3411
|
)
|
|
3412
3412
|
);
|
|
3413
3413
|
};
|
|
3414
|
-
return r.forEach((
|
|
3415
|
-
if (
|
|
3416
|
-
|
|
3417
|
-
f(p, `link-${
|
|
3414
|
+
return r.forEach((v, x) => {
|
|
3415
|
+
if (v.type === "link") {
|
|
3416
|
+
v.attachments.forEach((p, _) => {
|
|
3417
|
+
f(p, `link-${x}-${_}`);
|
|
3418
3418
|
});
|
|
3419
3419
|
return;
|
|
3420
3420
|
}
|
|
3421
|
-
c(
|
|
3421
|
+
c(v, `media-${x}`);
|
|
3422
3422
|
}), /* @__PURE__ */ u("div", { className: "str-chat__message-bubble-wrapper", children: [
|
|
3423
3423
|
/* @__PURE__ */ u(
|
|
3424
3424
|
"div",
|
|
@@ -3465,19 +3465,19 @@ const mi = ({
|
|
|
3465
3465
|
isMyMessage: f,
|
|
3466
3466
|
message: c,
|
|
3467
3467
|
renderText: b,
|
|
3468
|
-
threadList:
|
|
3469
|
-
viewerLanguage:
|
|
3470
|
-
} = e, { client: p } = he("CustomMessage"), { channel:
|
|
3471
|
-
Attachment:
|
|
3468
|
+
threadList: v,
|
|
3469
|
+
viewerLanguage: x
|
|
3470
|
+
} = e, { client: p } = he("CustomMessage"), { channel: _ } = oe("CustomMessage"), { isUnlocking: w, onUnlockClick: k, onFetchSource: L, onDownloadClick: S } = Dr("LockedAttachment"), [R, O] = U(!1), F = Xs(c.id), { selected: D, voteUp: C, voteDown: E } = ba(c), {
|
|
3471
|
+
Attachment: I = Ks,
|
|
3472
3472
|
EditMessageModal: T = Zs,
|
|
3473
3473
|
MessageActions: M,
|
|
3474
|
-
MessageBlocked:
|
|
3474
|
+
MessageBlocked: P = Js,
|
|
3475
3475
|
MessageBouncePrompt: $ = Qs,
|
|
3476
3476
|
MessageDeleted: j = en,
|
|
3477
3477
|
MessageIsThreadReplyInChannelButtonIndicator: Q = tn,
|
|
3478
3478
|
MessageRepliesCountButton: ee = sn,
|
|
3479
3479
|
ReminderNotification: X = nn,
|
|
3480
|
-
StreamedMessageText:
|
|
3480
|
+
StreamedMessageText: N = an,
|
|
3481
3481
|
PinIndicator: A
|
|
3482
3482
|
} = ns("CustomMessage"), H = rn(c), q = ln(c), Y = re(
|
|
3483
3483
|
() => h == null ? void 0 : h(c),
|
|
@@ -3491,9 +3491,9 @@ const mi = ({
|
|
|
3491
3491
|
() => Rs(B),
|
|
3492
3492
|
[B]
|
|
3493
3493
|
), Z = re(() => {
|
|
3494
|
-
const me = ds({ message: c, viewerLanguage:
|
|
3494
|
+
const me = ds({ message: c, viewerLanguage: x });
|
|
3495
3495
|
return me === c.text ? c : { ...c, text: me };
|
|
3496
|
-
}, [c,
|
|
3496
|
+
}, [c, x]), de = W.length > 0, De = W.reduce(
|
|
3497
3497
|
(me, pe) => me + pe.attachments.length,
|
|
3498
3498
|
0
|
|
3499
3499
|
) === ((B == null ? void 0 : B.length) ?? 0), Le = Ua({
|
|
@@ -3506,8 +3506,8 @@ const mi = ({
|
|
|
3506
3506
|
if (c.deleted_at || c.type === "deleted")
|
|
3507
3507
|
return /* @__PURE__ */ s(j, { message: c });
|
|
3508
3508
|
if (cn(c))
|
|
3509
|
-
return /* @__PURE__ */ s(
|
|
3510
|
-
const ae = !
|
|
3509
|
+
return /* @__PURE__ */ s(P, {});
|
|
3510
|
+
const ae = !v && !!c.reply_count, ue = !v && c.show_in_channel && c.parent_id, le = c.status === "failed" && ((Dt = c.error) == null ? void 0 : Dt.status) !== 403, It = dn(c);
|
|
3511
3511
|
let fe;
|
|
3512
3512
|
le ? fe = () => m(c) : It && (fe = () => O(!0));
|
|
3513
3513
|
const te = f(), Os = y(
|
|
@@ -3540,7 +3540,7 @@ const mi = ({
|
|
|
3540
3540
|
amountText: (Bt = c.metadata) == null ? void 0 : Bt.amount_text,
|
|
3541
3541
|
detail: (Ut = c.metadata) == null ? void 0 : Ut.attachment_detail,
|
|
3542
3542
|
paymentStatus: (jt = c.metadata) == null ? void 0 : jt.payment_status,
|
|
3543
|
-
onFetchSource:
|
|
3543
|
+
onFetchSource: L ? () => L(c, _) : void 0
|
|
3544
3544
|
};
|
|
3545
3545
|
return /* @__PURE__ */ u(se, { children: [
|
|
3546
3546
|
a && /* @__PURE__ */ s(
|
|
@@ -3565,7 +3565,7 @@ const mi = ({
|
|
|
3565
3565
|
"data-dd-privacy": "mask",
|
|
3566
3566
|
children: [
|
|
3567
3567
|
A && /* @__PURE__ */ s(A, {}),
|
|
3568
|
-
!!
|
|
3568
|
+
!!F && /* @__PURE__ */ s(X, { reminder: F }),
|
|
3569
3569
|
c.user && /* @__PURE__ */ s(
|
|
3570
3570
|
ne,
|
|
3571
3571
|
{
|
|
@@ -3609,7 +3609,7 @@ const mi = ({
|
|
|
3609
3609
|
...At,
|
|
3610
3610
|
isMine: !1,
|
|
3611
3611
|
isUnlocking: w(c.id),
|
|
3612
|
-
onUnlockClick: () =>
|
|
3612
|
+
onUnlockClick: () => k == null ? void 0 : k(c, _)
|
|
3613
3613
|
}
|
|
3614
3614
|
),
|
|
3615
3615
|
!te && M && /* @__PURE__ */ s(M, {})
|
|
@@ -3621,7 +3621,7 @@ const mi = ({
|
|
|
3621
3621
|
{
|
|
3622
3622
|
...Rt,
|
|
3623
3623
|
isMine: !0,
|
|
3624
|
-
onPreviewClick: () =>
|
|
3624
|
+
onPreviewClick: () => k ? k(c, _) : void 0
|
|
3625
3625
|
}
|
|
3626
3626
|
) : /* @__PURE__ */ s(
|
|
3627
3627
|
Fe,
|
|
@@ -3629,8 +3629,8 @@ const mi = ({
|
|
|
3629
3629
|
...Rt,
|
|
3630
3630
|
isMine: !1,
|
|
3631
3631
|
isUnlocking: w(c.id),
|
|
3632
|
-
onUnlockClick: () =>
|
|
3633
|
-
onDownloadClick: () =>
|
|
3632
|
+
onUnlockClick: () => k ? k(c, _) : void 0,
|
|
3633
|
+
onDownloadClick: () => S ? S(c, _) : void 0
|
|
3634
3634
|
}
|
|
3635
3635
|
),
|
|
3636
3636
|
!te && M && /* @__PURE__ */ s(M, {})
|
|
@@ -3668,14 +3668,14 @@ const mi = ({
|
|
|
3668
3668
|
),
|
|
3669
3669
|
Ye && /* @__PURE__ */ s(mn, { poll: Ye }),
|
|
3670
3670
|
B != null && B.length && !c.quoted_message ? /* @__PURE__ */ s(
|
|
3671
|
-
|
|
3671
|
+
I,
|
|
3672
3672
|
{
|
|
3673
3673
|
actionHandler: l,
|
|
3674
3674
|
attachments: B
|
|
3675
3675
|
}
|
|
3676
3676
|
) : null,
|
|
3677
3677
|
Y ? /* @__PURE__ */ s(
|
|
3678
|
-
|
|
3678
|
+
N,
|
|
3679
3679
|
{
|
|
3680
3680
|
message: Z,
|
|
3681
3681
|
renderText: b
|
|
@@ -3704,8 +3704,8 @@ const mi = ({
|
|
|
3704
3704
|
Vr,
|
|
3705
3705
|
{
|
|
3706
3706
|
selected: D,
|
|
3707
|
-
onVoteUp:
|
|
3708
|
-
onVoteDown:
|
|
3707
|
+
onVoteUp: C,
|
|
3708
|
+
onVoteDown: E
|
|
3709
3709
|
}
|
|
3710
3710
|
)
|
|
3711
3711
|
] }),
|
|
@@ -4046,16 +4046,16 @@ const mi = ({
|
|
|
4046
4046
|
Xe.Generating,
|
|
4047
4047
|
Xe.ExternalSources
|
|
4048
4048
|
]), zi = ({ threadList: e }) => {
|
|
4049
|
-
var b,
|
|
4049
|
+
var b, v;
|
|
4050
4050
|
const { channel: t, channelConfig: n, thread: a } = oe(), { client: r } = he(), { typing: i = {} } = _n(), { aiState: o } = Nn(t), l = Ie(Ds);
|
|
4051
4051
|
if (!e && l && Li.has(o)) {
|
|
4052
|
-
const
|
|
4052
|
+
const x = Fi(t, (b = r.user) == null ? void 0 : b.id);
|
|
4053
4053
|
return /* @__PURE__ */ s(
|
|
4054
4054
|
ts,
|
|
4055
4055
|
{
|
|
4056
|
-
avatarId: (
|
|
4057
|
-
avatarName: (
|
|
4058
|
-
avatarImage:
|
|
4056
|
+
avatarId: (x == null ? void 0 : x.id) ?? "ai-agent",
|
|
4057
|
+
avatarName: (x == null ? void 0 : x.name) ?? (x == null ? void 0 : x.id) ?? "Agent",
|
|
4058
|
+
avatarImage: x == null ? void 0 : x.image,
|
|
4059
4059
|
testId: "typing-indicator-ai"
|
|
4060
4060
|
}
|
|
4061
4061
|
);
|
|
@@ -4063,19 +4063,19 @@ const mi = ({
|
|
|
4063
4063
|
if ((n == null ? void 0 : n.typing_events) === !1)
|
|
4064
4064
|
return null;
|
|
4065
4065
|
const m = e ? [] : Object.values(i).filter(
|
|
4066
|
-
({ parent_id:
|
|
4067
|
-
var
|
|
4068
|
-
return (p == null ? void 0 : p.id) !== ((
|
|
4066
|
+
({ parent_id: x, user: p }) => {
|
|
4067
|
+
var _;
|
|
4068
|
+
return (p == null ? void 0 : p.id) !== ((_ = r.user) == null ? void 0 : _.id) && !x;
|
|
4069
4069
|
}
|
|
4070
4070
|
), g = e ? Object.values(i).filter(
|
|
4071
|
-
({ parent_id:
|
|
4072
|
-
var
|
|
4073
|
-
return (p == null ? void 0 : p.id) !== ((
|
|
4071
|
+
({ parent_id: x, user: p }) => {
|
|
4072
|
+
var _;
|
|
4073
|
+
return (p == null ? void 0 : p.id) !== ((_ = r.user) == null ? void 0 : _.id) && x === (a == null ? void 0 : a.id);
|
|
4074
4074
|
}
|
|
4075
4075
|
) : [], h = e ? g : m;
|
|
4076
4076
|
if (!h.length)
|
|
4077
4077
|
return null;
|
|
4078
|
-
const f = (
|
|
4078
|
+
const f = (v = h[0]) == null ? void 0 : v.user, c = f != null && f.id && t.state.members[f.id] ? t.state.members[f.id].user : void 0;
|
|
4079
4079
|
return /* @__PURE__ */ s(
|
|
4080
4080
|
ts,
|
|
4081
4081
|
{
|
|
@@ -4202,29 +4202,29 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
4202
4202
|
customChannelActions: f,
|
|
4203
4203
|
renderChannelActions: c,
|
|
4204
4204
|
showChannelInfo: b = !0,
|
|
4205
|
-
onParticipantNameClick:
|
|
4206
|
-
renderHeaderTitleBadges:
|
|
4205
|
+
onParticipantNameClick: v,
|
|
4206
|
+
renderHeaderTitleBadges: x
|
|
4207
4207
|
}) => {
|
|
4208
|
-
var
|
|
4209
|
-
const { channel: p } = oe(), { client:
|
|
4208
|
+
var E, I, T, M, P, $;
|
|
4209
|
+
const { channel: p } = oe(), { client: _ } = he(), w = V.useMemo(
|
|
4210
4210
|
() => {
|
|
4211
4211
|
var j;
|
|
4212
4212
|
return Ge(
|
|
4213
4213
|
(j = p.state) == null ? void 0 : j.members,
|
|
4214
|
-
|
|
4214
|
+
_ == null ? void 0 : _.userID,
|
|
4215
4215
|
p.type
|
|
4216
4216
|
);
|
|
4217
4217
|
},
|
|
4218
|
-
[(
|
|
4219
|
-
),
|
|
4218
|
+
[(E = p.state) == null ? void 0 : E.members, _ == null ? void 0 : _.userID, p.type]
|
|
4219
|
+
), k = ut(w == null ? void 0 : w.user), L = (I = w == null ? void 0 : w.user) == null ? void 0 : I.image, S = dt(p), R = x == null ? void 0 : x({
|
|
4220
4220
|
channel: p,
|
|
4221
4221
|
participant: w
|
|
4222
|
-
}), O = "flex max-w-full flex-col items-center gap-1 rounded-[12px] px-1 py-0.5 text-center text-xs font-medium text-black/90",
|
|
4223
|
-
/* @__PURE__ */ s("span", { className: "min-w-0 truncate", children:
|
|
4222
|
+
}), O = "flex max-w-full flex-col items-center gap-1 rounded-[12px] px-1 py-0.5 text-center text-xs font-medium text-black/90", F = "flex min-w-0 max-w-full items-center gap-4 rounded-[12px] px-1 py-0.5 text-left text-black/90", D = /* @__PURE__ */ u(se, { children: [
|
|
4223
|
+
/* @__PURE__ */ s("span", { className: "min-w-0 truncate", children: k }),
|
|
4224
4224
|
R && /* @__PURE__ */ s("span", { className: "shrink-0", children: R })
|
|
4225
|
-
] }),
|
|
4225
|
+
] }), C = async () => {
|
|
4226
4226
|
try {
|
|
4227
|
-
|
|
4227
|
+
S ? await p.unpin() : await p.pin();
|
|
4228
4228
|
} catch (j) {
|
|
4229
4229
|
console.error(
|
|
4230
4230
|
"[CustomChannelHeader] Failed to update pinned status:",
|
|
@@ -4253,12 +4253,12 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
4253
4253
|
{
|
|
4254
4254
|
className: "flex flex-col gap-1 items-center",
|
|
4255
4255
|
"data-dd-privacy": "mask",
|
|
4256
|
-
children:
|
|
4256
|
+
children: v ? /* @__PURE__ */ u(
|
|
4257
4257
|
"button",
|
|
4258
4258
|
{
|
|
4259
4259
|
type: "button",
|
|
4260
|
-
onClick:
|
|
4261
|
-
"aria-label": `View details for ${
|
|
4260
|
+
onClick: v,
|
|
4261
|
+
"aria-label": `View details for ${k}`,
|
|
4262
4262
|
className: y(
|
|
4263
4263
|
O,
|
|
4264
4264
|
"appearance-none border-0 bg-transparent transition-opacity hover:opacity-70 focus-ring focus-visible:outline-none"
|
|
@@ -4268,9 +4268,9 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
4268
4268
|
ne,
|
|
4269
4269
|
{
|
|
4270
4270
|
id: ((T = w == null ? void 0 : w.user) == null ? void 0 : T.id) || p.id || "unknown",
|
|
4271
|
-
name:
|
|
4272
|
-
image:
|
|
4273
|
-
starred: n &&
|
|
4271
|
+
name: k,
|
|
4272
|
+
image: L,
|
|
4273
|
+
starred: n && S,
|
|
4274
4274
|
dmAgentEnabled: a,
|
|
4275
4275
|
size: 48
|
|
4276
4276
|
}
|
|
@@ -4290,9 +4290,9 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
4290
4290
|
ne,
|
|
4291
4291
|
{
|
|
4292
4292
|
id: ((M = w == null ? void 0 : w.user) == null ? void 0 : M.id) || p.id || "unknown",
|
|
4293
|
-
name:
|
|
4294
|
-
image:
|
|
4295
|
-
starred: n &&
|
|
4293
|
+
name: k,
|
|
4294
|
+
image: L,
|
|
4295
|
+
starred: n && S,
|
|
4296
4296
|
dmAgentEnabled: a,
|
|
4297
4297
|
size: 48
|
|
4298
4298
|
}
|
|
@@ -4319,17 +4319,17 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
4319
4319
|
"button",
|
|
4320
4320
|
{
|
|
4321
4321
|
className: be,
|
|
4322
|
-
onClick:
|
|
4322
|
+
onClick: C,
|
|
4323
4323
|
type: "button",
|
|
4324
|
-
"aria-label":
|
|
4324
|
+
"aria-label": S ? "Unstar conversation" : "Star conversation",
|
|
4325
4325
|
children: /* @__PURE__ */ s(
|
|
4326
4326
|
Ee,
|
|
4327
4327
|
{
|
|
4328
4328
|
className: y("size-5", {
|
|
4329
|
-
"text-yellow-600":
|
|
4330
|
-
"text-black/90": !
|
|
4329
|
+
"text-yellow-600": S,
|
|
4330
|
+
"text-black/90": !S
|
|
4331
4331
|
}),
|
|
4332
|
-
weight:
|
|
4332
|
+
weight: S ? "duotone" : "regular"
|
|
4333
4333
|
}
|
|
4334
4334
|
)
|
|
4335
4335
|
}
|
|
@@ -4368,24 +4368,24 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
4368
4368
|
children: /* @__PURE__ */ s(nt, { className: "size-5 text-black/90" })
|
|
4369
4369
|
}
|
|
4370
4370
|
),
|
|
4371
|
-
|
|
4371
|
+
v ? /* @__PURE__ */ u(
|
|
4372
4372
|
"button",
|
|
4373
4373
|
{
|
|
4374
4374
|
type: "button",
|
|
4375
|
-
onClick:
|
|
4376
|
-
"aria-label": `View details for ${
|
|
4375
|
+
onClick: v,
|
|
4376
|
+
"aria-label": `View details for ${k}`,
|
|
4377
4377
|
className: y(
|
|
4378
|
-
|
|
4378
|
+
F,
|
|
4379
4379
|
"appearance-none border-0 bg-transparent transition-opacity hover:opacity-70 focus-ring focus-visible:outline-none"
|
|
4380
4380
|
),
|
|
4381
4381
|
children: [
|
|
4382
4382
|
/* @__PURE__ */ s(
|
|
4383
4383
|
ne,
|
|
4384
4384
|
{
|
|
4385
|
-
id: ((
|
|
4386
|
-
name:
|
|
4387
|
-
image:
|
|
4388
|
-
starred: n &&
|
|
4385
|
+
id: ((P = w == null ? void 0 : w.user) == null ? void 0 : P.id) || p.id || "unknown",
|
|
4386
|
+
name: k,
|
|
4387
|
+
image: L,
|
|
4388
|
+
starred: n && S,
|
|
4389
4389
|
dmAgentEnabled: a,
|
|
4390
4390
|
size: 48
|
|
4391
4391
|
}
|
|
@@ -4402,14 +4402,14 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
4402
4402
|
] })
|
|
4403
4403
|
]
|
|
4404
4404
|
}
|
|
4405
|
-
) : /* @__PURE__ */ u("div", { className:
|
|
4405
|
+
) : /* @__PURE__ */ u("div", { className: F, children: [
|
|
4406
4406
|
/* @__PURE__ */ s(
|
|
4407
4407
|
ne,
|
|
4408
4408
|
{
|
|
4409
4409
|
id: (($ = w == null ? void 0 : w.user) == null ? void 0 : $.id) || p.id || "unknown",
|
|
4410
|
-
name:
|
|
4411
|
-
image:
|
|
4412
|
-
starred: n &&
|
|
4410
|
+
name: k,
|
|
4411
|
+
image: L,
|
|
4412
|
+
starred: n && S,
|
|
4413
4413
|
dmAgentEnabled: a,
|
|
4414
4414
|
size: 48
|
|
4415
4415
|
}
|
|
@@ -4437,17 +4437,17 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
4437
4437
|
"button",
|
|
4438
4438
|
{
|
|
4439
4439
|
className: be,
|
|
4440
|
-
onClick:
|
|
4440
|
+
onClick: C,
|
|
4441
4441
|
type: "button",
|
|
4442
|
-
"aria-label":
|
|
4442
|
+
"aria-label": S ? "Unstar conversation" : "Star conversation",
|
|
4443
4443
|
children: /* @__PURE__ */ s(
|
|
4444
4444
|
Ee,
|
|
4445
4445
|
{
|
|
4446
4446
|
className: y("size-6", {
|
|
4447
|
-
"text-yellow-600":
|
|
4448
|
-
"text-black/90": !
|
|
4447
|
+
"text-yellow-600": S,
|
|
4448
|
+
"text-black/90": !S
|
|
4449
4449
|
}),
|
|
4450
|
-
weight:
|
|
4450
|
+
weight: S ? "duotone" : "regular"
|
|
4451
4451
|
}
|
|
4452
4452
|
)
|
|
4453
4453
|
}
|
|
@@ -4488,47 +4488,47 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
4488
4488
|
showReportParticipant: f = !0,
|
|
4489
4489
|
composerDisabled: c = !1,
|
|
4490
4490
|
composerDisabledReason: b,
|
|
4491
|
-
showStarButton:
|
|
4492
|
-
chatbotVotingEnabled:
|
|
4491
|
+
showStarButton: v = !1,
|
|
4492
|
+
chatbotVotingEnabled: x = !1,
|
|
4493
4493
|
renderChannelBanner: p,
|
|
4494
|
-
renderHeaderTitleBadges:
|
|
4494
|
+
renderHeaderTitleBadges: _,
|
|
4495
4495
|
customChannelActions: w,
|
|
4496
|
-
renderChannelActions:
|
|
4497
|
-
renderMessage:
|
|
4498
|
-
dmAgentEnabled:
|
|
4496
|
+
renderChannelActions: k,
|
|
4497
|
+
renderMessage: L,
|
|
4498
|
+
dmAgentEnabled: S = !1,
|
|
4499
4499
|
viewerLanguage: R,
|
|
4500
4500
|
showChannelInfo: O = !0,
|
|
4501
|
-
onParticipantNameClick:
|
|
4501
|
+
onParticipantNameClick: F,
|
|
4502
4502
|
composerInput: D
|
|
4503
4503
|
}) => {
|
|
4504
|
-
var
|
|
4505
|
-
const { channel:
|
|
4504
|
+
var N, A, H, q;
|
|
4505
|
+
const { channel: C } = oe(), { client: E } = he(), I = V.useMemo(
|
|
4506
4506
|
() => {
|
|
4507
4507
|
var Y;
|
|
4508
4508
|
return Ge(
|
|
4509
|
-
(Y =
|
|
4510
|
-
|
|
4511
|
-
|
|
4509
|
+
(Y = C.state) == null ? void 0 : Y.members,
|
|
4510
|
+
E == null ? void 0 : E.userID,
|
|
4511
|
+
C.type
|
|
4512
4512
|
);
|
|
4513
4513
|
},
|
|
4514
|
-
[(
|
|
4514
|
+
[(N = C.state) == null ? void 0 : N.members, E == null ? void 0 : E.userID, C.type]
|
|
4515
4515
|
), T = V.useMemo(() => {
|
|
4516
4516
|
var W;
|
|
4517
|
-
const Y =
|
|
4518
|
-
return Y ? Object.values(((W =
|
|
4517
|
+
const Y = E == null ? void 0 : E.userID;
|
|
4518
|
+
return Y ? Object.values(((W = C.state) == null ? void 0 : W.members) || {}).find((Z) => {
|
|
4519
4519
|
var de;
|
|
4520
4520
|
return ((de = Z.user) == null ? void 0 : de.id) === Y;
|
|
4521
4521
|
}) : void 0;
|
|
4522
|
-
}, [
|
|
4522
|
+
}, [E == null ? void 0 : E.userID, (A = C.state) == null ? void 0 : A.members]), M = ((H = T == null ? void 0 : T.user) == null ? void 0 : H.is_account) ?? (T == null ? void 0 : T.is_account), P = ((q = I == null ? void 0 : I.user) == null ? void 0 : q.is_account) ?? (I == null ? void 0 : I.is_account), $ = S && M === !1 && P === !0, j = C.state.messages.some(
|
|
4523
4523
|
(Y) => Y.type !== "deleted"
|
|
4524
|
-
), Q = p ? /* @__PURE__ */ s(V.Fragment, { children: p() }, "lt-channel-banner") : null, ee =
|
|
4524
|
+
), Q = p ? /* @__PURE__ */ s(V.Fragment, { children: p() }, "lt-channel-banner") : null, ee = F ? /* @__PURE__ */ s(
|
|
4525
4525
|
fa,
|
|
4526
4526
|
{
|
|
4527
4527
|
className: "-mx-[var(--str-chat\\_\\_spacing-2)] px-[var(--str-chat\\_\\_spacing-2)] md:-mx-[min(var(--str-chat\\_\\_spacing-10),4%)] md:px-[min(var(--str-chat\\_\\_spacing-10),4%)]",
|
|
4528
4528
|
onBack: e,
|
|
4529
4529
|
showBackButton: t,
|
|
4530
4530
|
showChannelInfo: O,
|
|
4531
|
-
showStarButton:
|
|
4531
|
+
showStarButton: v,
|
|
4532
4532
|
dmAgentEnabled: $,
|
|
4533
4533
|
onLeaveConversation: i,
|
|
4534
4534
|
onBlockParticipant: o,
|
|
@@ -4539,8 +4539,8 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
4539
4539
|
onBlockParticipantClick: m,
|
|
4540
4540
|
onReportParticipantClick: g,
|
|
4541
4541
|
customChannelActions: w,
|
|
4542
|
-
renderChannelActions:
|
|
4543
|
-
onParticipantNameClick:
|
|
4542
|
+
renderChannelActions: k,
|
|
4543
|
+
onParticipantNameClick: F
|
|
4544
4544
|
}
|
|
4545
4545
|
) : null, X = J(
|
|
4546
4546
|
(Y) => {
|
|
@@ -4548,13 +4548,13 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
4548
4548
|
gi,
|
|
4549
4549
|
{
|
|
4550
4550
|
...Y,
|
|
4551
|
-
chatbotVotingEnabled:
|
|
4551
|
+
chatbotVotingEnabled: x,
|
|
4552
4552
|
viewerLanguage: R
|
|
4553
4553
|
}
|
|
4554
4554
|
);
|
|
4555
|
-
return !
|
|
4555
|
+
return !L || !B ? W : L(W, B);
|
|
4556
4556
|
},
|
|
4557
|
-
[
|
|
4557
|
+
[x, L, R]
|
|
4558
4558
|
);
|
|
4559
4559
|
return /* @__PURE__ */ s(se, { children: /* @__PURE__ */ s(
|
|
4560
4560
|
kn,
|
|
@@ -4564,14 +4564,14 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
4564
4564
|
MessageActions: vi
|
|
4565
4565
|
},
|
|
4566
4566
|
children: /* @__PURE__ */ u(Cn, { children: [
|
|
4567
|
-
!
|
|
4567
|
+
!F && /* @__PURE__ */ u(se, { children: [
|
|
4568
4568
|
/* @__PURE__ */ s("div", { children: /* @__PURE__ */ s(
|
|
4569
4569
|
$i,
|
|
4570
4570
|
{
|
|
4571
4571
|
onBack: e,
|
|
4572
4572
|
showBackButton: t,
|
|
4573
4573
|
showChannelInfo: O,
|
|
4574
|
-
showStarButton:
|
|
4574
|
+
showStarButton: v,
|
|
4575
4575
|
dmAgentEnabled: $,
|
|
4576
4576
|
onLeaveConversation: i,
|
|
4577
4577
|
onBlockParticipant: o,
|
|
@@ -4582,8 +4582,8 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
4582
4582
|
onBlockParticipantClick: m,
|
|
4583
4583
|
onReportParticipantClick: g,
|
|
4584
4584
|
customChannelActions: w,
|
|
4585
|
-
renderChannelActions:
|
|
4586
|
-
renderHeaderTitleBadges:
|
|
4585
|
+
renderChannelActions: k,
|
|
4586
|
+
renderHeaderTitleBadges: _
|
|
4587
4587
|
}
|
|
4588
4588
|
) }, "lt-channel-header"),
|
|
4589
4589
|
Q
|
|
@@ -4593,14 +4593,14 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
4593
4593
|
{
|
|
4594
4594
|
className: "flex-1 overflow-hidden relative",
|
|
4595
4595
|
children: [
|
|
4596
|
-
|
|
4596
|
+
F && !j && /* @__PURE__ */ s("div", { className: "str-chat__list", children: /* @__PURE__ */ u("div", { className: "str-chat__message-list-scroll", children: [
|
|
4597
4597
|
ee,
|
|
4598
4598
|
Q
|
|
4599
4599
|
] }) }),
|
|
4600
4600
|
/* @__PURE__ */ s(
|
|
4601
4601
|
Sn,
|
|
4602
4602
|
{
|
|
4603
|
-
head:
|
|
4603
|
+
head: F && j ? /* @__PURE__ */ u("div", { className: "sticky top-0 z-10", children: [
|
|
4604
4604
|
ee,
|
|
4605
4605
|
Q
|
|
4606
4606
|
] }) : void 0,
|
|
@@ -4612,14 +4612,14 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
4612
4612
|
},
|
|
4613
4613
|
"lt-channel-message-list"
|
|
4614
4614
|
),
|
|
4615
|
-
r ? /* @__PURE__ */ s(V.Fragment, { children: r(
|
|
4615
|
+
r ? /* @__PURE__ */ s(V.Fragment, { children: r(C) }, "lt-channel-conversation-footer") : null,
|
|
4616
4616
|
/* @__PURE__ */ s(
|
|
4617
4617
|
ki,
|
|
4618
4618
|
{
|
|
4619
4619
|
...n && {
|
|
4620
|
-
renderActions: () => n == null ? void 0 : n(
|
|
4620
|
+
renderActions: () => n == null ? void 0 : n(C)
|
|
4621
4621
|
},
|
|
4622
|
-
renderFooter: () => a == null ? void 0 : a(
|
|
4622
|
+
renderFooter: () => a == null ? void 0 : a(C),
|
|
4623
4623
|
disabled: c,
|
|
4624
4624
|
disabledReason: b,
|
|
4625
4625
|
composerInput: D
|
|
@@ -4646,36 +4646,36 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
4646
4646
|
onBlockParticipantClick: f,
|
|
4647
4647
|
onReportParticipantClick: c,
|
|
4648
4648
|
showBlockParticipant: b = !0,
|
|
4649
|
-
showReportParticipant:
|
|
4650
|
-
composerDisabled:
|
|
4649
|
+
showReportParticipant: v = !0,
|
|
4650
|
+
composerDisabled: x = !1,
|
|
4651
4651
|
composerDisabledReason: p,
|
|
4652
|
-
dmAgentEnabled:
|
|
4652
|
+
dmAgentEnabled: _,
|
|
4653
4653
|
messageMetadata: w,
|
|
4654
|
-
onMessageSent:
|
|
4655
|
-
showStarButton:
|
|
4656
|
-
chatbotVotingEnabled:
|
|
4654
|
+
onMessageSent: k,
|
|
4655
|
+
showStarButton: L = !1,
|
|
4656
|
+
chatbotVotingEnabled: S = !1,
|
|
4657
4657
|
renderChannelBanner: R,
|
|
4658
4658
|
renderHeaderTitleBadges: O,
|
|
4659
|
-
customChannelActions:
|
|
4659
|
+
customChannelActions: F,
|
|
4660
4660
|
renderChannelActions: D,
|
|
4661
|
-
renderMessage:
|
|
4662
|
-
onMessageLinkClick:
|
|
4663
|
-
sendButton:
|
|
4661
|
+
renderMessage: C,
|
|
4662
|
+
onMessageLinkClick: E,
|
|
4663
|
+
sendButton: I,
|
|
4664
4664
|
attachmentPreviewList: T,
|
|
4665
4665
|
viewerLanguage: M,
|
|
4666
|
-
showChannelInfo:
|
|
4666
|
+
showChannelInfo: P = !0,
|
|
4667
4667
|
onParticipantNameClick: $,
|
|
4668
4668
|
composerInput: j
|
|
4669
4669
|
}) => {
|
|
4670
4670
|
const Q = J(
|
|
4671
|
-
async (X,
|
|
4671
|
+
async (X, N, A) => {
|
|
4672
4672
|
var Z;
|
|
4673
|
-
const H = ((Z = e.data) == null ? void 0 : Z.chatbot_paused) === !0, q =
|
|
4674
|
-
...
|
|
4673
|
+
const H = ((Z = e.data) == null ? void 0 : Z.chatbot_paused) === !0, q = _ && !H, Y = {
|
|
4674
|
+
...N,
|
|
4675
4675
|
...q && { silent: !0 },
|
|
4676
4676
|
...w && {
|
|
4677
4677
|
metadata: {
|
|
4678
|
-
...
|
|
4678
|
+
...N.metadata ?? {},
|
|
4679
4679
|
...w
|
|
4680
4680
|
}
|
|
4681
4681
|
}
|
|
@@ -4683,22 +4683,22 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
4683
4683
|
...A,
|
|
4684
4684
|
...q && { skip_push: !0 }
|
|
4685
4685
|
}, W = await e.sendMessage(Y, B);
|
|
4686
|
-
return
|
|
4686
|
+
return k == null || k(W), W;
|
|
4687
4687
|
},
|
|
4688
|
-
[e,
|
|
4688
|
+
[e, _, w, k]
|
|
4689
4689
|
), ee = G(null);
|
|
4690
4690
|
return K(() => {
|
|
4691
|
-
if (!
|
|
4691
|
+
if (!E) return;
|
|
4692
4692
|
const X = ee.current;
|
|
4693
4693
|
if (!X) return;
|
|
4694
|
-
const
|
|
4694
|
+
const N = (A) => {
|
|
4695
4695
|
const H = A.target, q = H == null ? void 0 : H.closest("a[href]"), Y = q == null ? void 0 : q.getAttribute("href");
|
|
4696
4696
|
if (!Y) return;
|
|
4697
4697
|
const B = q == null ? void 0 : q.closest("[data-message-id]"), W = B == null ? void 0 : B.getAttribute("data-message-id"), Z = W ? e.state.messages.find((de) => de.id === W) : void 0;
|
|
4698
|
-
|
|
4698
|
+
E(Y, Z);
|
|
4699
4699
|
};
|
|
4700
|
-
return X.addEventListener("click",
|
|
4701
|
-
}, [
|
|
4700
|
+
return X.addEventListener("click", N), () => X.removeEventListener("click", N);
|
|
4701
|
+
}, [E, e]), /* @__PURE__ */ s(
|
|
4702
4702
|
"div",
|
|
4703
4703
|
{
|
|
4704
4704
|
ref: ee,
|
|
@@ -4706,7 +4706,7 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
4706
4706
|
"messaging-channel-view h-full flex flex-col",
|
|
4707
4707
|
d
|
|
4708
4708
|
),
|
|
4709
|
-
children: /* @__PURE__ */ s(Ds.Provider, { value:
|
|
4709
|
+
children: /* @__PURE__ */ s(Ds.Provider, { value: _ ?? !1, children: /* @__PURE__ */ s(
|
|
4710
4710
|
yn,
|
|
4711
4711
|
{
|
|
4712
4712
|
channel: e,
|
|
@@ -4716,7 +4716,7 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
4716
4716
|
DateSeparator: ga,
|
|
4717
4717
|
TypingIndicator: zi,
|
|
4718
4718
|
doSendMessageRequest: Q,
|
|
4719
|
-
...
|
|
4719
|
+
...I ? { SendButton: I } : {},
|
|
4720
4720
|
...T ? { AttachmentPreviewList: T } : {},
|
|
4721
4721
|
children: /* @__PURE__ */ s(
|
|
4722
4722
|
Bi,
|
|
@@ -4734,19 +4734,19 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
4734
4734
|
onBlockParticipantClick: f,
|
|
4735
4735
|
onReportParticipantClick: c,
|
|
4736
4736
|
showBlockParticipant: b,
|
|
4737
|
-
showReportParticipant:
|
|
4738
|
-
composerDisabled:
|
|
4737
|
+
showReportParticipant: v,
|
|
4738
|
+
composerDisabled: x,
|
|
4739
4739
|
composerDisabledReason: p,
|
|
4740
|
-
showStarButton:
|
|
4741
|
-
dmAgentEnabled:
|
|
4742
|
-
chatbotVotingEnabled:
|
|
4740
|
+
showStarButton: L,
|
|
4741
|
+
dmAgentEnabled: _,
|
|
4742
|
+
chatbotVotingEnabled: S,
|
|
4743
4743
|
renderChannelBanner: R,
|
|
4744
4744
|
renderHeaderTitleBadges: O,
|
|
4745
|
-
customChannelActions:
|
|
4745
|
+
customChannelActions: F,
|
|
4746
4746
|
renderChannelActions: D,
|
|
4747
|
-
renderMessage:
|
|
4747
|
+
renderMessage: C,
|
|
4748
4748
|
viewerLanguage: M,
|
|
4749
|
-
showChannelInfo:
|
|
4749
|
+
showChannelInfo: P,
|
|
4750
4750
|
onParticipantNameClick: $,
|
|
4751
4751
|
composerInput: j
|
|
4752
4752
|
}
|
|
@@ -4789,27 +4789,27 @@ const ml = ({
|
|
|
4789
4789
|
chatbotVotingEnabled: f = !1,
|
|
4790
4790
|
viewerLanguage: c,
|
|
4791
4791
|
renderHeaderTitleBadges: b,
|
|
4792
|
-
renderChannelBanner:
|
|
4793
|
-
customChannelActions:
|
|
4792
|
+
renderChannelBanner: v,
|
|
4793
|
+
customChannelActions: x,
|
|
4794
4794
|
renderChannelActions: p,
|
|
4795
|
-
onParticipantNameClick:
|
|
4795
|
+
onParticipantNameClick: _,
|
|
4796
4796
|
renderMessage: w,
|
|
4797
|
-
onMessageLinkClick:
|
|
4798
|
-
showChannelInfo:
|
|
4799
|
-
composerInput:
|
|
4797
|
+
onMessageLinkClick: k,
|
|
4798
|
+
showChannelInfo: L,
|
|
4799
|
+
composerInput: S
|
|
4800
4800
|
}) => {
|
|
4801
4801
|
const {
|
|
4802
4802
|
client: R,
|
|
4803
4803
|
isConnected: O,
|
|
4804
|
-
isLoading:
|
|
4804
|
+
isLoading: F,
|
|
4805
4805
|
error: D,
|
|
4806
|
-
refreshConnection:
|
|
4807
|
-
service:
|
|
4808
|
-
debug:
|
|
4809
|
-
} = ea(), [T, M] = U(null), [
|
|
4806
|
+
refreshConnection: C,
|
|
4807
|
+
service: E,
|
|
4808
|
+
debug: I
|
|
4809
|
+
} = ea(), [T, M] = U(null), [P, $] = U(null), [j, Q] = U(!1), { showDeleteConversation: ee = !0 } = e, X = G(o);
|
|
4810
4810
|
X.current = o;
|
|
4811
|
-
const
|
|
4812
|
-
|
|
4811
|
+
const N = G(a);
|
|
4812
|
+
N.current = a;
|
|
4813
4813
|
const A = G(null), H = G(null);
|
|
4814
4814
|
K(() => {
|
|
4815
4815
|
H.current = T;
|
|
@@ -4826,7 +4826,7 @@ const ml = ({
|
|
|
4826
4826
|
(async () => {
|
|
4827
4827
|
var De, Le;
|
|
4828
4828
|
try {
|
|
4829
|
-
|
|
4829
|
+
I && console.log(
|
|
4830
4830
|
"[MessagingShell] Loading initial conversation with:",
|
|
4831
4831
|
i
|
|
4832
4832
|
);
|
|
@@ -4839,27 +4839,27 @@ const ml = ({
|
|
|
4839
4839
|
{ limit: 1 }
|
|
4840
4840
|
);
|
|
4841
4841
|
if (ae.length > 0) {
|
|
4842
|
-
M(ae[0]), $(null), (De =
|
|
4842
|
+
M(ae[0]), $(null), (De = N.current) == null || De.call(N, ae[0]), I && console.log(
|
|
4843
4843
|
"[MessagingShell] Initial conversation loaded:",
|
|
4844
4844
|
ae[0].id
|
|
4845
4845
|
);
|
|
4846
4846
|
return;
|
|
4847
4847
|
}
|
|
4848
4848
|
const ue = X.current;
|
|
4849
|
-
if (!ue || !
|
|
4850
|
-
Z(), $("No conversation found with this account"),
|
|
4849
|
+
if (!ue || !E) {
|
|
4850
|
+
Z(), $("No conversation found with this account"), I && console.log(
|
|
4851
4851
|
"[MessagingShell] No conversation found for:",
|
|
4852
4852
|
i
|
|
4853
4853
|
);
|
|
4854
4854
|
return;
|
|
4855
4855
|
}
|
|
4856
4856
|
try {
|
|
4857
|
-
const le = await
|
|
4857
|
+
const le = await E.startChannelWithParticipant({
|
|
4858
4858
|
id: ue.id,
|
|
4859
4859
|
name: ue.name,
|
|
4860
4860
|
phone: ue.phone
|
|
4861
4861
|
});
|
|
4862
|
-
M(le), $(null), (Le =
|
|
4862
|
+
M(le), $(null), (Le = N.current) == null || Le.call(N, le), I && console.log(
|
|
4863
4863
|
"[MessagingShell] Channel created and loaded:",
|
|
4864
4864
|
le.id
|
|
4865
4865
|
);
|
|
@@ -4876,26 +4876,26 @@ const ml = ({
|
|
|
4876
4876
|
), Z(), H.current || $("Failed to load conversation");
|
|
4877
4877
|
}
|
|
4878
4878
|
})();
|
|
4879
|
-
}, [i, R, O,
|
|
4879
|
+
}, [i, R, O, E, I]);
|
|
4880
4880
|
const q = G(r);
|
|
4881
4881
|
q.current = r;
|
|
4882
4882
|
const Y = J(() => {
|
|
4883
4883
|
var B;
|
|
4884
4884
|
M(null), Q(!0), (B = q.current) == null || B.call(q);
|
|
4885
4885
|
}, []);
|
|
4886
|
-
return
|
|
4886
|
+
return F ? /* @__PURE__ */ s(je, {}) : D ? /* @__PURE__ */ s(ke, { message: D, onBack: C }) : !O || !R ? /* @__PURE__ */ s(
|
|
4887
4887
|
ke,
|
|
4888
4888
|
{
|
|
4889
4889
|
message: "Not connected to messaging service",
|
|
4890
|
-
onBack:
|
|
4890
|
+
onBack: C
|
|
4891
4891
|
}
|
|
4892
|
-
) :
|
|
4892
|
+
) : P ? /* @__PURE__ */ s(ke, { message: P }) : j && !T ? /* @__PURE__ */ s(ke, { message: "Conversation ended" }) : T ? /* @__PURE__ */ s("div", { className: "messaging-shell h-full bg-background-primary overflow-hidden", children: /* @__PURE__ */ s("div", { className: "flex h-full min-h-0 flex-col", children: /* @__PURE__ */ s(
|
|
4893
4893
|
Ls,
|
|
4894
4894
|
{
|
|
4895
4895
|
channel: T,
|
|
4896
4896
|
renderMessageInputActions: t,
|
|
4897
4897
|
renderConversationFooter: n,
|
|
4898
|
-
renderChannelBanner:
|
|
4898
|
+
renderChannelBanner: v,
|
|
4899
4899
|
onLeaveConversation: Y,
|
|
4900
4900
|
onBlockParticipant: Y,
|
|
4901
4901
|
CustomChannelEmptyState: l,
|
|
@@ -4907,13 +4907,13 @@ const ml = ({
|
|
|
4907
4907
|
chatbotVotingEnabled: f,
|
|
4908
4908
|
viewerLanguage: c,
|
|
4909
4909
|
renderHeaderTitleBadges: b,
|
|
4910
|
-
customChannelActions:
|
|
4910
|
+
customChannelActions: x,
|
|
4911
4911
|
renderChannelActions: p,
|
|
4912
|
-
onParticipantNameClick:
|
|
4912
|
+
onParticipantNameClick: _,
|
|
4913
4913
|
renderMessage: w,
|
|
4914
|
-
onMessageLinkClick:
|
|
4915
|
-
showChannelInfo:
|
|
4916
|
-
composerInput:
|
|
4914
|
+
onMessageLinkClick: k,
|
|
4915
|
+
showChannelInfo: L,
|
|
4916
|
+
composerInput: S
|
|
4917
4917
|
},
|
|
4918
4918
|
T.id
|
|
4919
4919
|
) }) }) : /* @__PURE__ */ s(je, {});
|
|
@@ -4955,7 +4955,7 @@ const zs = V.createContext({
|
|
|
4955
4955
|
});
|
|
4956
4956
|
}, Fs = V.memo(
|
|
4957
4957
|
(e) => {
|
|
4958
|
-
var O,
|
|
4958
|
+
var O, F, D;
|
|
4959
4959
|
const { channel: t, unread: n } = e, {
|
|
4960
4960
|
selectedChannel: a,
|
|
4961
4961
|
onChannelSelect: r,
|
|
@@ -4977,46 +4977,46 @@ const zs = V.createContext({
|
|
|
4977
4977
|
);
|
|
4978
4978
|
const f = () => {
|
|
4979
4979
|
t && r(t);
|
|
4980
|
-
}, c = (
|
|
4981
|
-
const
|
|
4982
|
-
!
|
|
4980
|
+
}, c = (C) => {
|
|
4981
|
+
const E = C.key === "Enter" || C.key === " ", I = C.repeat;
|
|
4982
|
+
!E || I || (C.preventDefault(), f());
|
|
4983
4983
|
}, b = Ge(
|
|
4984
4984
|
(O = t == null ? void 0 : t.state) == null ? void 0 : O.members,
|
|
4985
4985
|
m == null ? void 0 : m.userID,
|
|
4986
4986
|
t == null ? void 0 : t.type
|
|
4987
|
-
),
|
|
4988
|
-
var
|
|
4989
|
-
const
|
|
4990
|
-
if (
|
|
4991
|
-
for (let
|
|
4992
|
-
if (
|
|
4987
|
+
), v = ut(b == null ? void 0 : b.user), x = (F = b == null ? void 0 : b.user) == null ? void 0 : F.image, p = (() => {
|
|
4988
|
+
var E;
|
|
4989
|
+
const C = (E = t == null ? void 0 : t.state) == null ? void 0 : E.messages;
|
|
4990
|
+
if (C != null && C.length) {
|
|
4991
|
+
for (let I = C.length - 1; I >= 0; I--)
|
|
4992
|
+
if (C[I].type !== "system") return C[I];
|
|
4993
4993
|
}
|
|
4994
4994
|
})(), w = (() => {
|
|
4995
4995
|
var M;
|
|
4996
|
-
const
|
|
4996
|
+
const C = ds({
|
|
4997
4997
|
message: p,
|
|
4998
4998
|
viewerLanguage: d
|
|
4999
|
-
}), { custom_type:
|
|
5000
|
-
if (
|
|
5001
|
-
return
|
|
5002
|
-
if (
|
|
5003
|
-
return
|
|
5004
|
-
if (
|
|
5005
|
-
if (
|
|
4999
|
+
}), { custom_type: E, attachment_content_type: I } = (p == null ? void 0 : p.metadata) || {};
|
|
5000
|
+
if (E === "MESSAGE_TIP")
|
|
5001
|
+
return C || "Sent a tip";
|
|
5002
|
+
if (E === "MESSAGE_PAID")
|
|
5003
|
+
return C || "Sent a message";
|
|
5004
|
+
if (E === "MESSAGE_ATTACHMENT") {
|
|
5005
|
+
if (I === "text")
|
|
5006
5006
|
return "🔒 Sent a locked message";
|
|
5007
|
-
if (
|
|
5007
|
+
if (I === "media")
|
|
5008
5008
|
return "🔒 Sent a locked attachment";
|
|
5009
5009
|
}
|
|
5010
|
-
if (
|
|
5010
|
+
if (C) return C;
|
|
5011
5011
|
const T = (M = p == null ? void 0 : p.attachments) == null ? void 0 : M[0];
|
|
5012
5012
|
return T ? T.og_scrape_url ? T.og_scrape_url : T.type === "image" ? "📷 Sent an image" : T.type === "video" ? "🎥 Sent a video" : T.type === "audio" ? "🎵 Sent audio" : T.type === "file" ? "📎 Sent a file" : "📎 Sent an attachment" : "No messages yet";
|
|
5013
|
-
})(),
|
|
5013
|
+
})(), k = p != null && p.created_at ? Hi(new Date(p.created_at)) : "", L = p ? $e(p) : !1, S = l ? l(p, w) : `${L ? "✨ " : ""}${w}`, R = n ?? 0;
|
|
5014
5014
|
return i && console.log("📺 [ChannelList] 📋 CHANNEL PREVIEW RENDER", {
|
|
5015
5015
|
channelId: t == null ? void 0 : t.id,
|
|
5016
5016
|
isSelected: g,
|
|
5017
|
-
participantName:
|
|
5017
|
+
participantName: v,
|
|
5018
5018
|
unreadCount: R,
|
|
5019
|
-
hasTimestamp: !!
|
|
5019
|
+
hasTimestamp: !!k
|
|
5020
5020
|
}), /* @__PURE__ */ s(
|
|
5021
5021
|
"div",
|
|
5022
5022
|
{
|
|
@@ -5037,8 +5037,8 @@ const zs = V.createContext({
|
|
|
5037
5037
|
ne,
|
|
5038
5038
|
{
|
|
5039
5039
|
id: ((D = b == null ? void 0 : b.user) == null ? void 0 : D.id) || t.id || "unknown",
|
|
5040
|
-
name:
|
|
5041
|
-
image:
|
|
5040
|
+
name: v,
|
|
5041
|
+
image: x,
|
|
5042
5042
|
size: 48,
|
|
5043
5043
|
starred: h
|
|
5044
5044
|
}
|
|
@@ -5053,14 +5053,14 @@ const zs = V.createContext({
|
|
|
5053
5053
|
),
|
|
5054
5054
|
children: [
|
|
5055
5055
|
h && /* @__PURE__ */ s("span", { className: "sr-only", children: "Starred conversation. " }),
|
|
5056
|
-
|
|
5056
|
+
v
|
|
5057
5057
|
]
|
|
5058
5058
|
}
|
|
5059
5059
|
),
|
|
5060
|
-
|
|
5060
|
+
k && /* @__PURE__ */ s("span", { className: "text-xs text-[#717070] flex-shrink-0", children: k })
|
|
5061
5061
|
] }),
|
|
5062
5062
|
/* @__PURE__ */ u("div", { className: "flex items-center justify-between gap-2 min-w-0", children: [
|
|
5063
|
-
/* @__PURE__ */ s("p", { className: "text-sm text-[#717070] flex-1 line-clamp-1", children:
|
|
5063
|
+
/* @__PURE__ */ s("p", { className: "text-sm text-[#717070] flex-1 line-clamp-1", children: S }),
|
|
5064
5064
|
R > 0 && /* @__PURE__ */ s("span", { className: "bg-[#7f22fe] text-white text-[10px] rounded-full h-4 flex items-center justify-center p-1 min-w-4 text-center flex-shrink-0", children: R > 99 ? "99+" : R })
|
|
5065
5065
|
] })
|
|
5066
5066
|
] })
|
|
@@ -5083,28 +5083,34 @@ const Yi = { last_message_at: -1 }, qi = V.memo(
|
|
|
5083
5083
|
channelListPaginator: d = In,
|
|
5084
5084
|
channelPreview: m,
|
|
5085
5085
|
renderMessagePreview: g,
|
|
5086
|
-
viewerLanguage: h
|
|
5086
|
+
viewerLanguage: h,
|
|
5087
|
+
lockChannelOrder: f,
|
|
5088
|
+
onMessageNewHandler: c,
|
|
5089
|
+
onMessageNew: b,
|
|
5090
|
+
onChannelVisible: v,
|
|
5091
|
+
onAddedToChannel: x,
|
|
5092
|
+
onChannelUpdated: p
|
|
5087
5093
|
}) => {
|
|
5088
|
-
const
|
|
5089
|
-
|
|
5090
|
-
const { debug:
|
|
5091
|
-
(
|
|
5092
|
-
for (const
|
|
5093
|
-
Ui(
|
|
5094
|
-
return r ? r(
|
|
5094
|
+
const _ = V.useRef(0);
|
|
5095
|
+
_.current++;
|
|
5096
|
+
const { debug: w = !1 } = ct(), k = V.useCallback(
|
|
5097
|
+
(S) => {
|
|
5098
|
+
for (const R of S)
|
|
5099
|
+
Ui(R);
|
|
5100
|
+
return r ? r(S) : S;
|
|
5095
5101
|
},
|
|
5096
5102
|
[r]
|
|
5097
5103
|
);
|
|
5098
|
-
|
|
5099
|
-
renderCount:
|
|
5104
|
+
w && console.log("📺 [ChannelList] 🔄 RENDER START", {
|
|
5105
|
+
renderCount: _.current,
|
|
5100
5106
|
selectedChannelId: t == null ? void 0 : t.id,
|
|
5101
5107
|
filters: n
|
|
5102
5108
|
});
|
|
5103
|
-
const
|
|
5109
|
+
const L = V.useMemo(
|
|
5104
5110
|
() => ({
|
|
5105
5111
|
selectedChannel: t,
|
|
5106
5112
|
onChannelSelect: e,
|
|
5107
|
-
debug:
|
|
5113
|
+
debug: w,
|
|
5108
5114
|
channelPreview: m,
|
|
5109
5115
|
renderMessagePreview: g,
|
|
5110
5116
|
viewerLanguage: h
|
|
@@ -5112,7 +5118,7 @@ const Yi = { last_message_at: -1 }, qi = V.memo(
|
|
|
5112
5118
|
[
|
|
5113
5119
|
t,
|
|
5114
5120
|
e,
|
|
5115
|
-
|
|
5121
|
+
w,
|
|
5116
5122
|
m,
|
|
5117
5123
|
g,
|
|
5118
5124
|
h
|
|
@@ -5125,14 +5131,20 @@ const Yi = { last_message_at: -1 }, qi = V.memo(
|
|
|
5125
5131
|
"messaging-channel-list h-full flex flex-col min-w-0 overflow-hidden",
|
|
5126
5132
|
o
|
|
5127
5133
|
),
|
|
5128
|
-
children: /* @__PURE__ */ s("div", { className: "flex-1 overflow-hidden min-w-0", children: /* @__PURE__ */ s(ji, { value:
|
|
5134
|
+
children: /* @__PURE__ */ s("div", { className: "flex-1 overflow-hidden min-w-0", children: /* @__PURE__ */ s(ji, { value: L, children: /* @__PURE__ */ s(
|
|
5129
5135
|
En,
|
|
5130
5136
|
{
|
|
5131
5137
|
filters: n,
|
|
5132
5138
|
sort: i,
|
|
5133
5139
|
options: { limit: 30 },
|
|
5134
5140
|
allowNewMessagesFromUnfilteredChannels: a,
|
|
5135
|
-
channelRenderFilterFn:
|
|
5141
|
+
channelRenderFilterFn: k,
|
|
5142
|
+
lockChannelOrder: f,
|
|
5143
|
+
onMessageNewHandler: c,
|
|
5144
|
+
onMessageNew: b,
|
|
5145
|
+
onChannelVisible: v,
|
|
5146
|
+
onAddedToChannel: x,
|
|
5147
|
+
onChannelUpdated: p,
|
|
5136
5148
|
Paginator: d,
|
|
5137
5149
|
Preview: Fs,
|
|
5138
5150
|
EmptyStateIndicator: l
|
|
@@ -5316,4 +5328,4 @@ export {
|
|
|
5316
5328
|
ft as y,
|
|
5317
5329
|
gt as z
|
|
5318
5330
|
};
|
|
5319
|
-
//# sourceMappingURL=index-
|
|
5331
|
+
//# sourceMappingURL=index-DJXjS2H9.js.map
|