@poolse/react-native 3.8.0 → 3.9.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/index.js CHANGED
@@ -1,6 +1,6 @@
1
- import { useUser, useMe, useConversations, useUserPresence, formatCallLogPreview, useAttachmentUpload, usePoolse, filterConversations, useConversation, useMembers, usePresence, receiptsOf, useMessages, useTyping, useMessageStreams, useRealtimeStatus, isMessageVisibleTo, computeGroupPosition, canEditOwnMessage, isTombstone, formatDayLabel, callLogDisplayFor, useLiveCall, sameDay, useReactions, useThread, useAttachmentUrl } from '@poolse/react';
1
+ import { useUser, useMe, useConversations, useUserPresence, formatCallLogPreview, formatRecordingNoticePreview, useAttachmentUpload, usePoolse, filterConversations, useConversation, useMembers, usePresence, receiptsOf, useMessages, useTyping, useMessageStreams, useRealtimeStatus, isMessageVisibleTo, computeGroupPosition, canEditOwnMessage, isTombstone, formatDayLabel, recordingNoticeDisplayFor, callLogDisplayFor, useLiveCall, sameDay, useReactions, useThread, useAttachmentUrl, captureLabel, useLiveTranscript, groupTranscript, formatCallDuration, useTranscript, findInText, ApiError, captureErrorMessage } from '@poolse/react';
2
2
  import { createContext, forwardRef, useRef, useState, useImperativeHandle, useEffect, useMemo, useCallback, useContext, createElement } from 'react';
3
- import { StyleSheet, View, Pressable, TextInput, Text, useWindowDimensions, Animated, Easing, PanResponder, Keyboard, Platform, ScrollView, Modal, AppState, ActivityIndicator, SectionList, FlatList, KeyboardAvoidingView, Image, Linking, useColorScheme } from 'react-native';
3
+ import { StyleSheet, View, Pressable, TextInput, Text, useWindowDimensions, Animated, Easing, PanResponder, Keyboard, Platform, ScrollView, Modal, AppState, ActivityIndicator, SectionList, FlatList, KeyboardAvoidingView, Image, AccessibilityInfo, Linking, useColorScheme } from 'react-native';
4
4
  import { SvgXml, Svg, Path, Circle, G } from 'react-native-svg';
5
5
  import { toNativeTheme, isBuiltInThemeId } from '@poolse/theme';
6
6
  export { BUILT_IN_THEME_IDS, DEFAULT_THEME_ID, createTheme, decodeTheme, encodeTheme, tokensFromFlat } from '@poolse/theme';
@@ -1619,7 +1619,7 @@ function ConversationRow({
1619
1619
  const title = isDirect ? otherExtId ? labelFor?.(otherExtId) ?? resolvedOther.profile?.displayName ?? otherExtId : "Direct chat" : conv.name ?? "Untitled conversation";
1620
1620
  const avatarUrl = isDirect && otherExtId ? avatarFor?.(otherExtId) ?? resolvedOther.profile?.avatarUrl ?? null : conv.avatar_url ?? null;
1621
1621
  const avatarSeed = isDirect ? otherExtId ?? conv.id : conv.id;
1622
- const preview = conv.last_message_preview ? formatCallLogPreview(conv.last_message_preview, meId) ?? conv.last_message_preview : null;
1622
+ const preview = conv.last_message_preview ? formatCallLogPreview(conv.last_message_preview, meId) ?? formatRecordingNoticePreview(conv.last_message_preview, meId) ?? conv.last_message_preview : null;
1623
1623
  const when = relativeTime(conv.last_message_at, Date.now(), "short");
1624
1624
  const bold = unread > 0;
1625
1625
  return /* @__PURE__ */ jsxs(
@@ -3663,6 +3663,403 @@ var styles16 = StyleSheet.create({
3663
3663
  fontVariant: ["tabular-nums"]
3664
3664
  }
3665
3665
  });
3666
+ function RecDot({ off = false, color }) {
3667
+ const theme = useTheme();
3668
+ const opacity = useRef(new Animated.Value(1)).current;
3669
+ useEffect(() => {
3670
+ if (off) return;
3671
+ let loop = null;
3672
+ let cancelled = false;
3673
+ void AccessibilityInfo.isReduceMotionEnabled?.().then((reduce) => {
3674
+ if (reduce || cancelled) return;
3675
+ loop = Animated.loop(
3676
+ Animated.sequence([
3677
+ Animated.timing(opacity, { toValue: 0.35, duration: 800, useNativeDriver: true }),
3678
+ Animated.timing(opacity, { toValue: 1, duration: 800, useNativeDriver: true })
3679
+ ])
3680
+ );
3681
+ loop.start();
3682
+ }).catch(() => {
3683
+ });
3684
+ return () => {
3685
+ cancelled = true;
3686
+ loop?.stop();
3687
+ };
3688
+ }, [off, opacity]);
3689
+ return /* @__PURE__ */ jsx(
3690
+ Animated.View,
3691
+ {
3692
+ style: [
3693
+ styles17.dot,
3694
+ {
3695
+ backgroundColor: off ? theme.colors.textSubtle : color ?? theme.colors.danger,
3696
+ opacity: off ? 1 : opacity
3697
+ }
3698
+ ]
3699
+ }
3700
+ );
3701
+ }
3702
+ function RecordingBanner({
3703
+ recording,
3704
+ transcribing = false,
3705
+ mode,
3706
+ consentRequired = false,
3707
+ myConsent,
3708
+ onStop,
3709
+ onChangeConsent,
3710
+ pending = false,
3711
+ style
3712
+ }) {
3713
+ const theme = useTheme();
3714
+ const label = captureLabel(recording, transcribing, mode);
3715
+ if (!label) return null;
3716
+ const listenOnly = consentRequired && myConsent === "declined";
3717
+ const meta = listenOnly ? "You declined \u2014 you are listen-only" : consentRequired ? "Only people who agreed are captured" : "Everyone in the call is told";
3718
+ const button = (text, onPress) => /* @__PURE__ */ jsx(
3719
+ Pressable,
3720
+ {
3721
+ onPress,
3722
+ disabled: pending,
3723
+ accessibilityRole: "button",
3724
+ accessibilityLabel: text === "Stop" ? "Stop recording" : "Change consent",
3725
+ hitSlop: 8,
3726
+ style: ({ pressed }) => [
3727
+ styles17.bannerBtn,
3728
+ { borderColor: theme.colors.border, backgroundColor: theme.colors.surface },
3729
+ (pressed || pending) && styles17.pressed
3730
+ ],
3731
+ children: /* @__PURE__ */ jsx(
3732
+ Text,
3733
+ {
3734
+ style: [styles17.bannerBtnText, { color: theme.colors.text, fontFamily: theme.fonts.body }],
3735
+ children: text
3736
+ }
3737
+ )
3738
+ }
3739
+ );
3740
+ return /* @__PURE__ */ jsxs(
3741
+ View,
3742
+ {
3743
+ style: [
3744
+ styles17.banner,
3745
+ { backgroundColor: theme.colors.surfaceAlt, borderColor: theme.colors.danger },
3746
+ style
3747
+ ],
3748
+ accessibilityRole: "summary",
3749
+ accessibilityLabel: `${label}. ${meta}`,
3750
+ children: [
3751
+ /* @__PURE__ */ jsx(RecDot, {}),
3752
+ /* @__PURE__ */ jsxs(View, { style: styles17.bannerText, children: [
3753
+ /* @__PURE__ */ jsx(
3754
+ Text,
3755
+ {
3756
+ style: [styles17.bannerTitle, { color: theme.colors.text, fontFamily: theme.fonts.body }],
3757
+ numberOfLines: 1,
3758
+ children: label
3759
+ }
3760
+ ),
3761
+ /* @__PURE__ */ jsx(
3762
+ Text,
3763
+ {
3764
+ style: [
3765
+ styles17.bannerMeta,
3766
+ { color: theme.colors.textMuted, fontFamily: theme.fonts.body }
3767
+ ],
3768
+ numberOfLines: 2,
3769
+ children: meta
3770
+ }
3771
+ )
3772
+ ] }),
3773
+ listenOnly && onChangeConsent ? button("Change", onChangeConsent) : null,
3774
+ recording && onStop ? button("Stop", onStop) : null
3775
+ ]
3776
+ }
3777
+ );
3778
+ }
3779
+ function RecordingIndicator({
3780
+ recording,
3781
+ transcribing = false,
3782
+ mode,
3783
+ color,
3784
+ style
3785
+ }) {
3786
+ const theme = useTheme();
3787
+ const label = captureLabel(recording, transcribing, mode);
3788
+ if (!label) return null;
3789
+ return /* @__PURE__ */ jsxs(
3790
+ View,
3791
+ {
3792
+ style: [styles17.indicator, style],
3793
+ accessible: true,
3794
+ accessibilityRole: "image",
3795
+ accessibilityLabel: label,
3796
+ children: [
3797
+ /* @__PURE__ */ jsx(RecDot, {}),
3798
+ /* @__PURE__ */ jsx(
3799
+ Text,
3800
+ {
3801
+ style: [
3802
+ styles17.indicatorText,
3803
+ { color: color ?? theme.colors.danger, fontFamily: theme.fonts.body }
3804
+ ],
3805
+ children: recording ? "REC" : "Transcript"
3806
+ }
3807
+ )
3808
+ ]
3809
+ }
3810
+ );
3811
+ }
3812
+ function ConsentPrompt({
3813
+ recording,
3814
+ transcribing = false,
3815
+ mode,
3816
+ startedByName,
3817
+ onAnswer,
3818
+ onAccepted,
3819
+ onDeclined,
3820
+ pending = false,
3821
+ error,
3822
+ overlay = true,
3823
+ style
3824
+ }) {
3825
+ const theme = useTheme();
3826
+ const [busy, setBusy] = useState(false);
3827
+ const [failed, setFailed] = useState(false);
3828
+ const what = recording && transcribing ? "recorded and transcribed" : recording ? mode === "audio" ? "recorded (audio)" : "recorded" : "transcribed";
3829
+ const title = `This call is being ${what}`;
3830
+ useEffect(() => {
3831
+ AccessibilityInfo.announceForAccessibility?.(title);
3832
+ }, [title]);
3833
+ const answer = async (decision) => {
3834
+ setBusy(true);
3835
+ setFailed(false);
3836
+ try {
3837
+ const ok = await onAnswer(decision);
3838
+ if (ok === false) {
3839
+ setFailed(true);
3840
+ return;
3841
+ }
3842
+ if (decision === "accepted") onAccepted?.();
3843
+ else onDeclined?.();
3844
+ } catch {
3845
+ setFailed(true);
3846
+ } finally {
3847
+ setBusy(false);
3848
+ }
3849
+ };
3850
+ const disabled = busy || pending;
3851
+ const shownError = error ?? (failed ? "That didn\u2019t go through. Try again." : null);
3852
+ const card = /* @__PURE__ */ jsxs(
3853
+ View,
3854
+ {
3855
+ style: [
3856
+ styles17.card,
3857
+ { backgroundColor: theme.colors.surface, borderColor: theme.colors.border },
3858
+ !overlay && style
3859
+ ],
3860
+ accessibilityViewIsModal: overlay,
3861
+ children: [
3862
+ /* @__PURE__ */ jsxs(View, { style: styles17.cardHead, children: [
3863
+ /* @__PURE__ */ jsx(RecDot, {}),
3864
+ /* @__PURE__ */ jsx(
3865
+ Text,
3866
+ {
3867
+ style: [styles17.cardTitle, { color: theme.colors.text, fontFamily: theme.fonts.body }],
3868
+ accessibilityRole: "header",
3869
+ children: title
3870
+ }
3871
+ )
3872
+ ] }),
3873
+ /* @__PURE__ */ jsxs(
3874
+ Text,
3875
+ {
3876
+ style: [styles17.cardBody, { color: theme.colors.textMuted, fontFamily: theme.fonts.body }],
3877
+ children: [
3878
+ startedByName ? `${startedByName} started it. ` : "",
3879
+ "Your microphone and camera stay off until you agree. You can still hear and see everyone."
3880
+ ]
3881
+ }
3882
+ ),
3883
+ /* @__PURE__ */ jsxs(View, { style: styles17.cardActions, children: [
3884
+ /* @__PURE__ */ jsx(
3885
+ Pressable,
3886
+ {
3887
+ onPress: () => void answer("declined"),
3888
+ disabled,
3889
+ accessibilityRole: "button",
3890
+ accessibilityLabel: "Stay listen-only",
3891
+ style: ({ pressed }) => [
3892
+ styles17.cardBtn,
3893
+ { backgroundColor: theme.colors.surfaceAlt, borderColor: theme.colors.border },
3894
+ (pressed || disabled) && styles17.pressed
3895
+ ],
3896
+ children: /* @__PURE__ */ jsx(
3897
+ Text,
3898
+ {
3899
+ style: [styles17.cardBtnText, { color: theme.colors.text, fontFamily: theme.fonts.body }],
3900
+ children: "Stay listen-only"
3901
+ }
3902
+ )
3903
+ }
3904
+ ),
3905
+ /* @__PURE__ */ jsx(
3906
+ Pressable,
3907
+ {
3908
+ onPress: () => void answer("accepted"),
3909
+ disabled,
3910
+ accessibilityRole: "button",
3911
+ accessibilityLabel: "Agree to be recorded",
3912
+ style: ({ pressed }) => [
3913
+ styles17.cardBtn,
3914
+ { backgroundColor: theme.colors.accent, borderColor: theme.colors.accent },
3915
+ (pressed || disabled) && styles17.pressed
3916
+ ],
3917
+ children: /* @__PURE__ */ jsx(
3918
+ Text,
3919
+ {
3920
+ style: [
3921
+ styles17.cardBtnText,
3922
+ { color: theme.colors.accentText, fontFamily: theme.fonts.body }
3923
+ ],
3924
+ children: "Agree"
3925
+ }
3926
+ )
3927
+ }
3928
+ )
3929
+ ] }),
3930
+ shownError ? /* @__PURE__ */ jsx(
3931
+ Text,
3932
+ {
3933
+ style: [styles17.cardError, { color: theme.colors.danger, fontFamily: theme.fonts.body }],
3934
+ accessibilityLiveRegion: "assertive",
3935
+ children: shownError
3936
+ }
3937
+ ) : null
3938
+ ]
3939
+ }
3940
+ );
3941
+ if (!overlay) return card;
3942
+ return /* @__PURE__ */ jsx(View, { style: [styles17.scrim, { backgroundColor: theme.colors.overlay }, style], children: card });
3943
+ }
3944
+ function RecordingNoticeRow({ msg, meId, nameFor }) {
3945
+ const theme = useTheme();
3946
+ const display = recordingNoticeDisplayFor(msg, meId, nameFor);
3947
+ if (!display) return null;
3948
+ const time = formatTime2(msg.inserted_at);
3949
+ const label = [display.title, display.detail, time].filter(Boolean).join(", ");
3950
+ const metaStyle = [styles17.meta, { color: theme.colors.textSubtle, fontFamily: theme.fonts.body }];
3951
+ return /* @__PURE__ */ jsx(View, { style: styles17.noticeWrap, accessible: true, accessibilityLabel: label, children: /* @__PURE__ */ jsxs(
3952
+ View,
3953
+ {
3954
+ style: [
3955
+ styles17.chip,
3956
+ { backgroundColor: theme.colors.surfaceAlt, borderColor: theme.colors.border }
3957
+ ],
3958
+ children: [
3959
+ /* @__PURE__ */ jsx(RecDot, { off: display.event === "stopped" }),
3960
+ /* @__PURE__ */ jsx(
3961
+ Text,
3962
+ {
3963
+ style: [
3964
+ styles17.chipTitle,
3965
+ { color: theme.colors.textMuted, fontFamily: theme.fonts.body }
3966
+ ],
3967
+ numberOfLines: 1,
3968
+ children: display.title
3969
+ }
3970
+ ),
3971
+ display.detail ? /* @__PURE__ */ jsxs(Text, { style: metaStyle, numberOfLines: 1, children: [
3972
+ "\xB7 ",
3973
+ display.detail
3974
+ ] }) : null,
3975
+ time ? /* @__PURE__ */ jsxs(Text, { style: metaStyle, children: [
3976
+ "\xB7 ",
3977
+ time
3978
+ ] }) : null
3979
+ ]
3980
+ }
3981
+ ) });
3982
+ }
3983
+ function formatTime2(iso) {
3984
+ const d = new Date(iso);
3985
+ if (Number.isNaN(d.getTime())) return "";
3986
+ return d.toLocaleTimeString([], { hour: "numeric", minute: "2-digit" });
3987
+ }
3988
+ var styles17 = StyleSheet.create({
3989
+ dot: { width: 8, height: 8, borderRadius: 4 },
3990
+ pressed: { opacity: 0.6 },
3991
+ banner: {
3992
+ flexDirection: "row",
3993
+ alignItems: "center",
3994
+ gap: 10,
3995
+ paddingHorizontal: 12,
3996
+ paddingVertical: 6,
3997
+ borderBottomWidth: StyleSheet.hairlineWidth
3998
+ },
3999
+ bannerText: { flex: 1, minWidth: 0 },
4000
+ bannerTitle: { fontSize: 13, fontWeight: "600" },
4001
+ bannerMeta: { fontSize: 12, fontWeight: "500" },
4002
+ bannerBtn: {
4003
+ paddingHorizontal: 12,
4004
+ paddingVertical: 4,
4005
+ borderRadius: 999,
4006
+ borderWidth: StyleSheet.hairlineWidth
4007
+ },
4008
+ bannerBtnText: { fontSize: 12, fontWeight: "600" },
4009
+ indicator: {
4010
+ flexDirection: "row",
4011
+ alignItems: "center",
4012
+ gap: 6,
4013
+ paddingHorizontal: 8,
4014
+ paddingVertical: 2,
4015
+ borderRadius: 999
4016
+ },
4017
+ indicatorText: { fontSize: 11, fontWeight: "700", letterSpacing: 0.4 },
4018
+ scrim: {
4019
+ ...StyleSheet.absoluteFillObject,
4020
+ zIndex: 20,
4021
+ alignItems: "center",
4022
+ justifyContent: "center",
4023
+ padding: 16
4024
+ },
4025
+ card: {
4026
+ width: "100%",
4027
+ maxWidth: 380,
4028
+ padding: 18,
4029
+ borderRadius: 16,
4030
+ borderWidth: StyleSheet.hairlineWidth
4031
+ },
4032
+ cardHead: { flexDirection: "row", alignItems: "center", gap: 10 },
4033
+ cardTitle: { flex: 1, fontSize: 16, fontWeight: "700" },
4034
+ cardBody: { marginTop: 8, marginBottom: 16, fontSize: 14, lineHeight: 20 },
4035
+ cardActions: { flexDirection: "row", flexWrap: "wrap", justifyContent: "flex-end", gap: 8 },
4036
+ cardBtn: {
4037
+ paddingHorizontal: 16,
4038
+ paddingVertical: 10,
4039
+ borderRadius: 999,
4040
+ borderWidth: StyleSheet.hairlineWidth
4041
+ },
4042
+ cardBtnText: { fontSize: 14, fontWeight: "600" },
4043
+ cardError: { marginTop: 10, fontSize: 13, fontWeight: "500" },
4044
+ noticeWrap: {
4045
+ alignItems: "center",
4046
+ alignSelf: "stretch",
4047
+ marginVertical: 6,
4048
+ paddingHorizontal: 16
4049
+ },
4050
+ chip: {
4051
+ flexDirection: "row",
4052
+ alignItems: "center",
4053
+ gap: 6,
4054
+ maxWidth: "100%",
4055
+ paddingHorizontal: 12,
4056
+ paddingVertical: 4,
4057
+ borderRadius: 999,
4058
+ borderWidth: StyleSheet.hairlineWidth
4059
+ },
4060
+ chipTitle: { fontSize: 11, fontWeight: "600", letterSpacing: 0.3, flexShrink: 1 },
4061
+ meta: { fontSize: 11, fontWeight: "500", letterSpacing: 0.3, flexShrink: 1 }
4062
+ });
3666
4063
  var forbidden = /* @__PURE__ */ new Set();
3667
4064
  function canShowEditHistory(messageId) {
3668
4065
  return !forbidden.has(messageId);
@@ -3703,12 +4100,12 @@ function EditHistorySheet({
3703
4100
  live = false;
3704
4101
  };
3705
4102
  }, [visible, messageId, chat]);
3706
- const entry = (key, label, body, when) => /* @__PURE__ */ jsxs(View, { style: [styles17.entry, { borderBottomColor: theme.colors.border }], children: [
3707
- /* @__PURE__ */ jsxs(View, { style: styles17.entryHead, children: [
3708
- /* @__PURE__ */ jsx(Text, { style: [styles17.entryLabel, { color: theme.colors.textMuted }], children: label }),
3709
- when ? /* @__PURE__ */ jsx(Text, { style: [styles17.entryTime, { color: theme.colors.textSubtle }], children: when }) : null
4103
+ const entry = (key, label, body, when) => /* @__PURE__ */ jsxs(View, { style: [styles18.entry, { borderBottomColor: theme.colors.border }], children: [
4104
+ /* @__PURE__ */ jsxs(View, { style: styles18.entryHead, children: [
4105
+ /* @__PURE__ */ jsx(Text, { style: [styles18.entryLabel, { color: theme.colors.textMuted }], children: label }),
4106
+ when ? /* @__PURE__ */ jsx(Text, { style: [styles18.entryTime, { color: theme.colors.textSubtle }], children: when }) : null
3710
4107
  ] }),
3711
- /* @__PURE__ */ jsx(Text, { style: [styles17.entryBody, { color: theme.colors.text, fontFamily: theme.fonts.body }], children: body ?? "\u2014" })
4108
+ /* @__PURE__ */ jsx(Text, { style: [styles18.entryBody, { color: theme.colors.text, fontFamily: theme.fonts.body }], children: body ?? "\u2014" })
3712
4109
  ] }, key);
3713
4110
  return /* @__PURE__ */ jsx(
3714
4111
  Modal,
@@ -3721,14 +4118,14 @@ function EditHistorySheet({
3721
4118
  children: /* @__PURE__ */ jsx(
3722
4119
  Pressable,
3723
4120
  {
3724
- style: [styles17.backdrop, { backgroundColor: theme.colors.overlay }],
4121
+ style: [styles18.backdrop, { backgroundColor: theme.colors.overlay }],
3725
4122
  onPress: onClose,
3726
4123
  children: /* @__PURE__ */ jsxs(
3727
4124
  Pressable,
3728
4125
  {
3729
4126
  onPress: () => void 0,
3730
4127
  style: [
3731
- styles17.sheet,
4128
+ styles18.sheet,
3732
4129
  {
3733
4130
  backgroundColor: theme.colors.surface,
3734
4131
  borderTopLeftRadius: theme.radii.lg,
@@ -3743,12 +4140,12 @@ function EditHistorySheet({
3743
4140
  /* @__PURE__ */ jsx(
3744
4141
  Text,
3745
4142
  {
3746
- style: [styles17.title, { color: theme.colors.text, fontFamily: theme.fonts.display }],
4143
+ style: [styles18.title, { color: theme.colors.text, fontFamily: theme.fonts.display }],
3747
4144
  accessibilityRole: "header",
3748
4145
  children: "Edit history"
3749
4146
  }
3750
4147
  ),
3751
- failed ? /* @__PURE__ */ jsx(Text, { style: [styles17.status, { color: theme.colors.textMuted }], children: "Couldn't load the earlier versions." }) : edits === null ? /* @__PURE__ */ jsx(ActivityIndicator, { color: theme.colors.accent, style: styles17.spinner }) : /* @__PURE__ */ jsxs(ScrollView, { style: styles17.scroll, children: [
4148
+ failed ? /* @__PURE__ */ jsx(Text, { style: [styles18.status, { color: theme.colors.textMuted }], children: "Couldn't load the earlier versions." }) : edits === null ? /* @__PURE__ */ jsx(ActivityIndicator, { color: theme.colors.accent, style: styles18.spinner }) : /* @__PURE__ */ jsxs(ScrollView, { style: styles18.scroll, children: [
3752
4149
  currentBody !== void 0 ? entry("current", "Current", currentBody, "") : null,
3753
4150
  edits.map(
3754
4151
  (e) => entry(
@@ -3758,7 +4155,7 @@ function EditHistorySheet({
3758
4155
  relativeTime(e.written_at)
3759
4156
  )
3760
4157
  ),
3761
- edits.length === 0 ? /* @__PURE__ */ jsx(Text, { style: [styles17.status, { color: theme.colors.textMuted }], children: "No earlier versions." }) : null
4158
+ edits.length === 0 ? /* @__PURE__ */ jsx(Text, { style: [styles18.status, { color: theme.colors.textMuted }], children: "No earlier versions." }) : null
3762
4159
  ] })
3763
4160
  ]
3764
4161
  }
@@ -3768,7 +4165,7 @@ function EditHistorySheet({
3768
4165
  }
3769
4166
  );
3770
4167
  }
3771
- var styles17 = StyleSheet.create({
4168
+ var styles18 = StyleSheet.create({
3772
4169
  backdrop: {
3773
4170
  flex: 1,
3774
4171
  justifyContent: "flex-end"
@@ -3846,7 +4243,7 @@ function AttachmentPreview({
3846
4243
  View,
3847
4244
  {
3848
4245
  style: [
3849
- styles18.imagePlaceholder,
4246
+ styles19.imagePlaceholder,
3850
4247
  {
3851
4248
  width: maxWidth,
3852
4249
  height: 200,
@@ -3866,7 +4263,7 @@ function AttachmentPreview({
3866
4263
  onPress,
3867
4264
  disabled: !onPress,
3868
4265
  style: [
3869
- styles18.fileCard,
4266
+ styles19.fileCard,
3870
4267
  {
3871
4268
  backgroundColor: onBrand ? "rgba(255,255,255,0.18)" : theme.colors.surfaceAlt,
3872
4269
  borderColor: onBrand ? "transparent" : theme.colors.border,
@@ -3879,12 +4276,12 @@ function AttachmentPreview({
3879
4276
  /* @__PURE__ */ jsx(
3880
4277
  Text,
3881
4278
  {
3882
- style: [styles18.fileName, { color: ink, fontFamily: theme.fonts.body }],
4279
+ style: [styles19.fileName, { color: ink, fontFamily: theme.fonts.body }],
3883
4280
  numberOfLines: 1,
3884
4281
  children: attachment.original_filename ?? "file"
3885
4282
  }
3886
4283
  ),
3887
- /* @__PURE__ */ jsx(Text, { style: [styles18.fileSize, { color: inkSoft, opacity: onBrand ? 0.8 : 1 }], children: formatBytes3(attachment.byte_size) })
4284
+ /* @__PURE__ */ jsx(Text, { style: [styles19.fileSize, { color: inkSoft, opacity: onBrand ? 0.8 : 1 }], children: formatBytes3(attachment.byte_size) })
3888
4285
  ] })
3889
4286
  ]
3890
4287
  }
@@ -3896,7 +4293,7 @@ function formatBytes3(n) {
3896
4293
  if (n < 1024 * 1024 * 1024) return `${(n / 1024 / 1024).toFixed(1)} MB`;
3897
4294
  return `${(n / 1024 / 1024 / 1024).toFixed(1)} GB`;
3898
4295
  }
3899
- var styles18 = StyleSheet.create({
4296
+ var styles19 = StyleSheet.create({
3900
4297
  imagePlaceholder: {},
3901
4298
  fileCard: {
3902
4299
  flexDirection: "row",
@@ -3932,7 +4329,7 @@ function ImageMosaic({
3932
4329
  View,
3933
4330
  {
3934
4331
  style: [
3935
- styles19.root,
4332
+ styles20.root,
3936
4333
  {
3937
4334
  borderTopLeftRadius: r,
3938
4335
  borderTopRightRadius: r,
@@ -3953,18 +4350,18 @@ function ImageMosaic({
3953
4350
  {
3954
4351
  onLongPress,
3955
4352
  attachment: visible[0],
3956
- style: styles19.tileFull,
4353
+ style: styles20.tileFull,
3957
4354
  onPress: () => setViewerIndex(0),
3958
4355
  overlay: null
3959
4356
  }
3960
4357
  ) : null,
3961
- n === 2 ? /* @__PURE__ */ jsxs(View, { style: styles19.rowEven, children: [
4358
+ n === 2 ? /* @__PURE__ */ jsxs(View, { style: styles20.rowEven, children: [
3962
4359
  /* @__PURE__ */ jsx(
3963
4360
  Tile,
3964
4361
  {
3965
4362
  onLongPress,
3966
4363
  attachment: visible[0],
3967
- style: styles19.tileHalfSquare,
4364
+ style: styles20.tileHalfSquare,
3968
4365
  onPress: () => setViewerIndex(0),
3969
4366
  overlay: null
3970
4367
  }
@@ -3974,7 +4371,7 @@ function ImageMosaic({
3974
4371
  {
3975
4372
  onLongPress,
3976
4373
  attachment: visible[1],
3977
- style: styles19.tileHalfSquare,
4374
+ style: styles20.tileHalfSquare,
3978
4375
  onPress: () => setViewerIndex(1),
3979
4376
  overlay: null
3980
4377
  }
@@ -3986,18 +4383,18 @@ function ImageMosaic({
3986
4383
  {
3987
4384
  onLongPress,
3988
4385
  attachment: visible[0],
3989
- style: styles19.tileHero,
4386
+ style: styles20.tileHero,
3990
4387
  onPress: () => setViewerIndex(0),
3991
4388
  overlay: null
3992
4389
  }
3993
4390
  ),
3994
- /* @__PURE__ */ jsxs(View, { style: [styles19.rowEven, { marginTop: 2 }], children: [
4391
+ /* @__PURE__ */ jsxs(View, { style: [styles20.rowEven, { marginTop: 2 }], children: [
3995
4392
  /* @__PURE__ */ jsx(
3996
4393
  Tile,
3997
4394
  {
3998
4395
  onLongPress,
3999
4396
  attachment: visible[1],
4000
- style: styles19.tileHalfSquare,
4397
+ style: styles20.tileHalfSquare,
4001
4398
  onPress: () => setViewerIndex(1),
4002
4399
  overlay: null
4003
4400
  }
@@ -4007,7 +4404,7 @@ function ImageMosaic({
4007
4404
  {
4008
4405
  onLongPress,
4009
4406
  attachment: visible[2],
4010
- style: styles19.tileHalfSquare,
4407
+ style: styles20.tileHalfSquare,
4011
4408
  onPress: () => setViewerIndex(2),
4012
4409
  overlay: null
4013
4410
  }
@@ -4015,13 +4412,13 @@ function ImageMosaic({
4015
4412
  ] })
4016
4413
  ] }) : null,
4017
4414
  n === 4 ? /* @__PURE__ */ jsxs(Fragment, { children: [
4018
- /* @__PURE__ */ jsxs(View, { style: styles19.rowEven, children: [
4415
+ /* @__PURE__ */ jsxs(View, { style: styles20.rowEven, children: [
4019
4416
  /* @__PURE__ */ jsx(
4020
4417
  Tile,
4021
4418
  {
4022
4419
  onLongPress,
4023
4420
  attachment: visible[0],
4024
- style: styles19.tileHalfSquare,
4421
+ style: styles20.tileHalfSquare,
4025
4422
  onPress: () => setViewerIndex(0),
4026
4423
  overlay: null
4027
4424
  }
@@ -4031,19 +4428,19 @@ function ImageMosaic({
4031
4428
  {
4032
4429
  onLongPress,
4033
4430
  attachment: visible[1],
4034
- style: styles19.tileHalfSquare,
4431
+ style: styles20.tileHalfSquare,
4035
4432
  onPress: () => setViewerIndex(1),
4036
4433
  overlay: null
4037
4434
  }
4038
4435
  )
4039
4436
  ] }),
4040
- /* @__PURE__ */ jsxs(View, { style: [styles19.rowEven, { marginTop: 2 }], children: [
4437
+ /* @__PURE__ */ jsxs(View, { style: [styles20.rowEven, { marginTop: 2 }], children: [
4041
4438
  /* @__PURE__ */ jsx(
4042
4439
  Tile,
4043
4440
  {
4044
4441
  onLongPress,
4045
4442
  attachment: visible[2],
4046
- style: styles19.tileHalfSquare,
4443
+ style: styles20.tileHalfSquare,
4047
4444
  onPress: () => setViewerIndex(2),
4048
4445
  overlay: null
4049
4446
  }
@@ -4053,7 +4450,7 @@ function ImageMosaic({
4053
4450
  {
4054
4451
  onLongPress,
4055
4452
  attachment: visible[3],
4056
- style: styles19.tileHalfSquare,
4453
+ style: styles20.tileHalfSquare,
4057
4454
  onPress: () => setViewerIndex(3),
4058
4455
  overlay: overflow > 0 ? `+${overflow}` : null
4059
4456
  }
@@ -4091,18 +4488,18 @@ function Tile({
4091
4488
  }) {
4092
4489
  const theme = useTheme();
4093
4490
  const { url } = useAttachmentUrl(attachment.id);
4094
- return /* @__PURE__ */ jsxs(Pressable, { onPress, onLongPress, style: [styles19.tileBase, style], children: [
4491
+ return /* @__PURE__ */ jsxs(Pressable, { onPress, onLongPress, style: [styles20.tileBase, style], children: [
4095
4492
  url ? /* @__PURE__ */ jsx(
4096
4493
  Image,
4097
4494
  {
4098
4495
  source: { uri: url },
4099
- style: [styles19.tileImage, { backgroundColor: theme.colors.surfaceAlt }],
4496
+ style: [styles20.tileImage, { backgroundColor: theme.colors.surfaceAlt }],
4100
4497
  resizeMode: "cover",
4101
4498
  accessible: true,
4102
4499
  accessibilityLabel: attachment.original_filename ?? "image"
4103
4500
  }
4104
- ) : /* @__PURE__ */ jsx(View, { style: [styles19.tileImage, { backgroundColor: theme.colors.surfaceAlt }] }),
4105
- overlay ? /* @__PURE__ */ jsx(View, { style: styles19.overflow, children: /* @__PURE__ */ jsx(Text, { style: styles19.overflowText, children: overlay }) }) : null
4501
+ ) : /* @__PURE__ */ jsx(View, { style: [styles20.tileImage, { backgroundColor: theme.colors.surfaceAlt }] }),
4502
+ overlay ? /* @__PURE__ */ jsx(View, { style: styles20.overflow, children: /* @__PURE__ */ jsx(Text, { style: styles20.overflowText, children: overlay }) }) : null
4106
4503
  ] });
4107
4504
  }
4108
4505
  function FullScreenViewer({
@@ -4112,7 +4509,7 @@ function FullScreenViewer({
4112
4509
  const { url } = useAttachmentUrl(attachment.id);
4113
4510
  const { width, height } = useWindowDimensions();
4114
4511
  const insets = useSafeInsets();
4115
- return /* @__PURE__ */ jsxs(Pressable, { style: styles19.viewer, onPress: onClose, children: [
4512
+ return /* @__PURE__ */ jsxs(Pressable, { style: styles20.viewer, onPress: onClose, children: [
4116
4513
  url ? /* @__PURE__ */ jsx(
4117
4514
  Image,
4118
4515
  {
@@ -4128,14 +4525,14 @@ function FullScreenViewer({
4128
4525
  {
4129
4526
  onPress: onClose,
4130
4527
  hitSlop: 12,
4131
- style: [styles19.closeBtn, { top: insets.top + 12, right: insets.right + 16 }],
4528
+ style: [styles20.closeBtn, { top: insets.top + 12, right: insets.right + 16 }],
4132
4529
  accessibilityLabel: "Close viewer",
4133
4530
  children: /* @__PURE__ */ jsx(PoolseIcon, { name: "close", size: 20, color: "#ffffff" })
4134
4531
  }
4135
4532
  )
4136
4533
  ] });
4137
4534
  }
4138
- var styles19 = StyleSheet.create({
4535
+ var styles20 = StyleSheet.create({
4139
4536
  root: {
4140
4537
  width: "100%",
4141
4538
  overflow: "hidden",
@@ -4308,7 +4705,7 @@ function LinkPreviewCard({
4308
4705
  {
4309
4706
  onPress: onRemove,
4310
4707
  hitSlop: 8,
4311
- style: [styles20.remove, { backgroundColor: theme.colors.overlay }],
4708
+ style: [styles21.remove, { backgroundColor: theme.colors.overlay }],
4312
4709
  accessibilityRole: "button",
4313
4710
  accessibilityLabel: "Remove preview",
4314
4711
  children: /* @__PURE__ */ jsx(PoolseIcon, { name: "close", size: 12, color: "#FFFFFF", label: null })
@@ -4324,13 +4721,13 @@ function LinkPreviewCard({
4324
4721
  ...onLongPress ? { onLongPress } : {},
4325
4722
  accessibilityRole: "link",
4326
4723
  accessibilityLabel: preview.title || "Image link",
4327
- style: [styles20.imageOnly, { maxWidth, borderRadius: theme.radii.md }],
4724
+ style: [styles21.imageOnly, { maxWidth, borderRadius: theme.radii.md }],
4328
4725
  children: [
4329
4726
  /* @__PURE__ */ jsx(
4330
4727
  Image,
4331
4728
  {
4332
4729
  source: { uri: src },
4333
- style: [styles20.inlineImage, { borderRadius: theme.radii.md }],
4730
+ style: [styles21.inlineImage, { borderRadius: theme.radii.md }],
4334
4731
  resizeMode: "cover",
4335
4732
  onError: () => setImageFailed(true),
4336
4733
  accessible: false
@@ -4350,7 +4747,7 @@ function LinkPreviewCard({
4350
4747
  accessibilityRole: "link",
4351
4748
  accessibilityLabel: [site, preview.title].filter(Boolean).join(": ") || preview.url,
4352
4749
  style: ({ pressed }) => [
4353
- styles20.card,
4750
+ styles21.card,
4354
4751
  {
4355
4752
  maxWidth,
4356
4753
  borderRadius: theme.radii.md,
@@ -4365,7 +4762,7 @@ function LinkPreviewCard({
4365
4762
  {
4366
4763
  source: { uri: preview.image_url },
4367
4764
  style: [
4368
- styles20.cardImage,
4765
+ styles21.cardImage,
4369
4766
  { borderTopLeftRadius: theme.radii.md, borderTopRightRadius: theme.radii.md }
4370
4767
  ],
4371
4768
  resizeMode: "cover",
@@ -4373,13 +4770,13 @@ function LinkPreviewCard({
4373
4770
  accessible: false
4374
4771
  }
4375
4772
  ) : null,
4376
- /* @__PURE__ */ jsxs(View, { style: [styles20.cardBody, { padding: theme.spacing.sm, gap: 2 }], children: [
4377
- /* @__PURE__ */ jsxs(View, { style: styles20.siteLine, children: [
4773
+ /* @__PURE__ */ jsxs(View, { style: [styles21.cardBody, { padding: theme.spacing.sm, gap: 2 }], children: [
4774
+ /* @__PURE__ */ jsxs(View, { style: styles21.siteLine, children: [
4378
4775
  preview.favicon_url && !faviconFailed ? /* @__PURE__ */ jsx(
4379
4776
  Image,
4380
4777
  {
4381
4778
  source: { uri: preview.favicon_url },
4382
- style: styles20.favicon,
4779
+ style: styles21.favicon,
4383
4780
  onError: () => setFaviconFailed(true),
4384
4781
  accessible: false
4385
4782
  }
@@ -4387,7 +4784,7 @@ function LinkPreviewCard({
4387
4784
  /* @__PURE__ */ jsx(
4388
4785
  Text,
4389
4786
  {
4390
- style: [styles20.site, { color: muted, fontFamily: theme.fonts.body }],
4787
+ style: [styles21.site, { color: muted, fontFamily: theme.fonts.body }],
4391
4788
  numberOfLines: 1,
4392
4789
  children: site
4393
4790
  }
@@ -4397,7 +4794,7 @@ function LinkPreviewCard({
4397
4794
  Text,
4398
4795
  {
4399
4796
  style: [
4400
- styles20.title,
4797
+ styles21.title,
4401
4798
  { color: onBrand ? text : theme.colors.link, fontFamily: theme.fonts.body }
4402
4799
  ],
4403
4800
  numberOfLines: 2,
@@ -4407,7 +4804,7 @@ function LinkPreviewCard({
4407
4804
  preview.description ? /* @__PURE__ */ jsx(
4408
4805
  Text,
4409
4806
  {
4410
- style: [styles20.description, { color: muted, fontFamily: theme.fonts.body }],
4807
+ style: [styles21.description, { color: muted, fontFamily: theme.fonts.body }],
4411
4808
  numberOfLines: 2,
4412
4809
  children: preview.description
4413
4810
  }
@@ -4422,7 +4819,7 @@ function hostOf(url) {
4422
4819
  const m = /^[a-z][a-z0-9+.-]*:\/\/([^/?#]+)/i.exec(url);
4423
4820
  return (m?.[1] ?? url).replace(/^www\./, "");
4424
4821
  }
4425
- var styles20 = StyleSheet.create({
4822
+ var styles21 = StyleSheet.create({
4426
4823
  card: {
4427
4824
  alignSelf: "stretch",
4428
4825
  borderLeftWidth: 3,
@@ -4529,7 +4926,7 @@ function MessageBubble({
4529
4926
  const isEdited = !!message.edited_at && !isDeleted;
4530
4927
  const trimmable = maxBodyLength > 0 && body.length > maxBodyLength;
4531
4928
  const truncated = trimmable && !expanded ? body.slice(0, maxBodyLength) + "\u2026" : body;
4532
- const time = formatTime2(message.inserted_at, timeFormat);
4929
+ const time = formatTime3(message.inserted_at, timeFormat);
4533
4930
  const images = showAttachments && !isDeleted ? (message.attachments ?? []).filter((a) => isImageContentType(a.content_type)) : [];
4534
4931
  const files = showAttachments && !isDeleted ? (message.attachments ?? []).filter((a) => !isImageContentType(a.content_type)) : [];
4535
4932
  const hasMedia = images.length > 0;
@@ -4548,16 +4945,16 @@ function MessageBubble({
4548
4945
  View,
4549
4946
  {
4550
4947
  style: [
4551
- styles21.metaRow,
4552
- variant === "inline" && styles21.metaInline,
4553
- variant === "inline" && dense && styles21.metaInlineDense,
4554
- variant === "wrapped" && styles21.metaWrapped,
4555
- variant === "overlay" && styles21.metaOverlay,
4556
- variant === "block" && styles21.metaBlock,
4948
+ styles22.metaRow,
4949
+ variant === "inline" && styles22.metaInline,
4950
+ variant === "inline" && dense && styles22.metaInlineDense,
4951
+ variant === "wrapped" && styles22.metaWrapped,
4952
+ variant === "overlay" && styles22.metaOverlay,
4953
+ variant === "block" && styles22.metaBlock,
4557
4954
  // File-only bubble: the meta row follows the cards directly —
4558
4955
  // give it air so the time doesn't sit glued to the card.
4559
- variant === "block" && hasFiles && !hasBody && styles21.metaBlockAfterFiles,
4560
- variant === "jumbo" && styles21.metaJumbo
4956
+ variant === "block" && hasFiles && !hasBody && styles22.metaBlockAfterFiles,
4957
+ variant === "jumbo" && styles22.metaJumbo
4561
4958
  ],
4562
4959
  onLayout: variant === "inline" || variant === "wrapped" ? (e) => setMetaWidth(e.nativeEvent.layout.width) : void 0,
4563
4960
  pointerEvents: isEdited && onEditedPress ? "box-none" : "none",
@@ -4565,7 +4962,7 @@ function MessageBubble({
4565
4962
  isEdited ? /* @__PURE__ */ jsx(
4566
4963
  Text,
4567
4964
  {
4568
- style: [styles21.editedTag, { color, opacity: 0.8 }],
4965
+ style: [styles22.editedTag, { color, opacity: 0.8 }],
4569
4966
  ...onEditedPress ? {
4570
4967
  onPress: onEditedPress,
4571
4968
  suppressHighlighting: true,
@@ -4576,8 +4973,8 @@ function MessageBubble({
4576
4973
  children: "edited"
4577
4974
  }
4578
4975
  ) : null,
4579
- /* @__PURE__ */ jsx(Text, { style: [styles21.meta, { color, opacity: variant === "overlay" ? 1 : 0.75 }], children: time }),
4580
- isSelf && readState ? /* @__PURE__ */ jsx(View, { style: styles21.readTick, children: /* @__PURE__ */ jsx(
4976
+ /* @__PURE__ */ jsx(Text, { style: [styles22.meta, { color, opacity: variant === "overlay" ? 1 : 0.75 }], children: time }),
4977
+ isSelf && readState ? /* @__PURE__ */ jsx(View, { style: styles22.readTick, children: /* @__PURE__ */ jsx(
4581
4978
  PoolseIcon,
4582
4979
  {
4583
4980
  name: readState === "read" ? "check-double" : "check",
@@ -4593,7 +4990,7 @@ function MessageBubble({
4593
4990
  View,
4594
4991
  {
4595
4992
  style: [
4596
- styles21.wrap,
4993
+ styles22.wrap,
4597
4994
  { alignSelf: isSelf ? "flex-end" : "flex-start", maxWidth: bubbleMaxWidth }
4598
4995
  ],
4599
4996
  children: [
@@ -4619,7 +5016,7 @@ function MessageBubble({
4619
5016
  showSenderName && !isSelf && jumboCount === 0 && (groupPosition === "first" || groupPosition === "standalone") ? /* @__PURE__ */ jsx(
4620
5017
  Text,
4621
5018
  {
4622
- style: [styles21.senderName, { color: senderTint, fontFamily: theme.fonts.body }],
5019
+ style: [styles22.senderName, { color: senderTint, fontFamily: theme.fonts.body }],
4623
5020
  ...onSenderPress ? {
4624
5021
  onPress: onSenderPress,
4625
5022
  accessibilityRole: "button",
@@ -4646,7 +5043,7 @@ function MessageBubble({
4646
5043
  // 3px of bubble color framing the picture; the mosaic clips
4647
5044
  // itself 3px tighter than the bubble so the curves stay
4648
5045
  // concentric.
4649
- /* @__PURE__ */ jsxs(View, { style: styles21.mediaFrame, children: [
5046
+ /* @__PURE__ */ jsxs(View, { style: styles22.mediaFrame, children: [
4650
5047
  /* @__PURE__ */ jsx(
4651
5048
  ImageMosaic,
4652
5049
  {
@@ -4660,7 +5057,7 @@ function MessageBubble({
4660
5057
  metaOverlay ? metaRow("overlay") : null
4661
5058
  ] })
4662
5059
  ) : null,
4663
- hasFiles ? /* @__PURE__ */ jsx(View, { style: styles21.filesBlock, children: files.map((att) => /* @__PURE__ */ jsx(
5060
+ hasFiles ? /* @__PURE__ */ jsx(View, { style: styles22.filesBlock, children: files.map((att) => /* @__PURE__ */ jsx(
4664
5061
  AttachmentPreview,
4665
5062
  {
4666
5063
  attachment: att,
@@ -4679,9 +5076,9 @@ function MessageBubble({
4679
5076
  View,
4680
5077
  {
4681
5078
  style: [
4682
- styles21.textBlock,
4683
- dense && styles21.textBlockDense,
4684
- sectionAbove && styles21.textBlockAfter
5079
+ styles22.textBlock,
5080
+ dense && styles22.textBlockDense,
5081
+ sectionAbove && styles22.textBlockAfter
4685
5082
  ],
4686
5083
  children: /* @__PURE__ */ jsx(
4687
5084
  Text,
@@ -4699,7 +5096,7 @@ function MessageBubble({
4699
5096
  )
4700
5097
  }
4701
5098
  ) : null,
4702
- hasBody && jumboCount > 0 ? /* @__PURE__ */ jsx(View, { style: styles21.jumboBlock, children: /* @__PURE__ */ jsx(
5099
+ hasBody && jumboCount > 0 ? /* @__PURE__ */ jsx(View, { style: styles22.jumboBlock, children: /* @__PURE__ */ jsx(
4703
5100
  Text,
4704
5101
  {
4705
5102
  style: {
@@ -4713,9 +5110,9 @@ function MessageBubble({
4713
5110
  View,
4714
5111
  {
4715
5112
  style: [
4716
- styles21.textBlock,
4717
- dense && styles21.textBlockDense,
4718
- sectionAbove && styles21.textBlockAfter
5113
+ styles22.textBlock,
5114
+ dense && styles22.textBlockDense,
5115
+ sectionAbove && styles22.textBlockAfter
4719
5116
  ],
4720
5117
  onLayout: inlineMeta ? (e) => setTextBoxWidth(e.nativeEvent.layout.width - 24) : void 0,
4721
5118
  children: [
@@ -4750,7 +5147,7 @@ function MessageBubble({
4750
5147
  Text,
4751
5148
  {
4752
5149
  style: [
4753
- styles21.readMore,
5150
+ styles22.readMore,
4754
5151
  { color: isSelf ? theme.colors.ownBubbleText : theme.colors.link }
4755
5152
  ],
4756
5153
  children: expanded ? "Show less" : "Read more"
@@ -4765,7 +5162,7 @@ function MessageBubble({
4765
5162
  hasPreviews ? (
4766
5163
  // A fixed width, like media: a card squeezed into the width of
4767
5164
  // a one-word message would be unreadable.
4768
- /* @__PURE__ */ jsx(View, { style: [styles21.previews, !hasBody && styles21.previewsAlone, { width: mediaWidth }], children: previews.map((p) => /* @__PURE__ */ jsx(
5165
+ /* @__PURE__ */ jsx(View, { style: [styles22.previews, !hasBody && styles22.previewsAlone, { width: mediaWidth }], children: previews.map((p) => /* @__PURE__ */ jsx(
4769
5166
  LinkPreviewCard,
4770
5167
  {
4771
5168
  preview: p,
@@ -4777,7 +5174,7 @@ function MessageBubble({
4777
5174
  )) })
4778
5175
  ) : null,
4779
5176
  !inlineMeta && !metaOverlay && jumboCount === 0 ? metaRow("block") : null,
4780
- actionsTrigger ? /* @__PURE__ */ jsx(View, { style: styles21.actionsSlot, children: actionsTrigger }) : null
5177
+ actionsTrigger ? /* @__PURE__ */ jsx(View, { style: styles22.actionsSlot, children: actionsTrigger }) : null
4781
5178
  ]
4782
5179
  }
4783
5180
  ),
@@ -4804,15 +5201,15 @@ function QuotedCard({
4804
5201
  onPress,
4805
5202
  disabled: !onPress,
4806
5203
  style: [
4807
- styles21.quoted,
5204
+ styles22.quoted,
4808
5205
  {
4809
5206
  backgroundColor: bg,
4810
5207
  borderLeftColor: accent
4811
5208
  }
4812
5209
  ],
4813
5210
  children: [
4814
- /* @__PURE__ */ jsx(Text, { style: [styles21.quotedSender, { color: accent }], numberOfLines: 1, children: senderName }),
4815
- /* @__PURE__ */ jsx(Text, { style: [styles21.quotedBody, { color: txt }], numberOfLines: 2, children: quoted.deleted_at ? "Original message deleted" : quoted.body ?? "\u2026" })
5211
+ /* @__PURE__ */ jsx(Text, { style: [styles22.quotedSender, { color: accent }], numberOfLines: 1, children: senderName }),
5212
+ /* @__PURE__ */ jsx(Text, { style: [styles22.quotedBody, { color: txt }], numberOfLines: 2, children: quoted.deleted_at ? "Original message deleted" : quoted.body ?? "\u2026" })
4816
5213
  ]
4817
5214
  }
4818
5215
  );
@@ -4821,7 +5218,7 @@ function isImageContentType(ct) {
4821
5218
  if (!ct) return false;
4822
5219
  return ct.startsWith("image/");
4823
5220
  }
4824
- function formatTime2(iso, format2) {
5221
+ function formatTime3(iso, format2) {
4825
5222
  try {
4826
5223
  const d = new Date(iso);
4827
5224
  if (typeof format2 === "function") return format2(d);
@@ -4845,7 +5242,7 @@ function formatTime2(iso, format2) {
4845
5242
  function isSameDay(a, b) {
4846
5243
  return a.getFullYear() === b.getFullYear() && a.getMonth() === b.getMonth() && a.getDate() === b.getDate();
4847
5244
  }
4848
- var styles21 = StyleSheet.create({
5245
+ var styles22 = StyleSheet.create({
4849
5246
  wrap: {
4850
5247
  marginBottom: 2
4851
5248
  },
@@ -5006,7 +5403,7 @@ function ReactionStrip({
5006
5403
  });
5007
5404
  const entries = Object.entries(reactions);
5008
5405
  if (entries.length === 0) return null;
5009
- return /* @__PURE__ */ jsxs(View, { style: styles22.strip, children: [
5406
+ return /* @__PURE__ */ jsxs(View, { style: styles23.strip, children: [
5010
5407
  entries.map(([emoji, userIds]) => {
5011
5408
  const userArr = Array.isArray(userIds) ? userIds : [];
5012
5409
  const meReacted = meId !== null && userArr.includes(meId);
@@ -5019,7 +5416,7 @@ function ReactionStrip({
5019
5416
  accessibilityState: { selected: meReacted },
5020
5417
  accessibilityHint: meReacted ? "Removes your reaction" : "Adds this reaction",
5021
5418
  style: [
5022
- styles22.chip,
5419
+ styles23.chip,
5023
5420
  {
5024
5421
  backgroundColor: meReacted ? theme.colors.accentSoft : theme.colors.surfaceAlt,
5025
5422
  borderColor: meReacted ? theme.colors.accent : theme.colors.border,
@@ -5028,12 +5425,12 @@ function ReactionStrip({
5028
5425
  }
5029
5426
  ],
5030
5427
  children: [
5031
- /* @__PURE__ */ jsx(Text, { style: styles22.emoji, children: emoji }),
5428
+ /* @__PURE__ */ jsx(Text, { style: styles23.emoji, children: emoji }),
5032
5429
  /* @__PURE__ */ jsx(
5033
5430
  Text,
5034
5431
  {
5035
5432
  style: [
5036
- styles22.count,
5433
+ styles23.count,
5037
5434
  {
5038
5435
  color: meReacted ? theme.colors.accent : theme.colors.textMuted,
5039
5436
  fontWeight: meReacted ? "700" : "600"
@@ -5053,7 +5450,7 @@ function ReactionStrip({
5053
5450
  onPress: onMorePress,
5054
5451
  hitSlop: 4,
5055
5452
  style: [
5056
- styles22.chip,
5453
+ styles23.chip,
5057
5454
  {
5058
5455
  backgroundColor: theme.colors.surfaceAlt,
5059
5456
  borderColor: theme.colors.border,
@@ -5086,13 +5483,13 @@ function ReactionPicker({
5086
5483
  children: /* @__PURE__ */ jsx(
5087
5484
  Pressable,
5088
5485
  {
5089
- style: [styles22.backdrop, { paddingTop: insets.top, paddingBottom: insets.bottom }],
5486
+ style: [styles23.backdrop, { paddingTop: insets.top, paddingBottom: insets.bottom }],
5090
5487
  onPress: onClose,
5091
5488
  children: /* @__PURE__ */ jsx(
5092
5489
  View,
5093
5490
  {
5094
5491
  style: [
5095
- styles22.sheet,
5492
+ styles23.sheet,
5096
5493
  {
5097
5494
  backgroundColor: theme.colors.surface,
5098
5495
  borderRadius: theme.radii.lg
@@ -5102,12 +5499,12 @@ function ReactionPicker({
5102
5499
  children: emojis.map((emoji) => /* @__PURE__ */ jsx(
5103
5500
  Pressable,
5104
5501
  {
5105
- style: styles22.emojiBtn,
5502
+ style: styles23.emojiBtn,
5106
5503
  onPress: () => {
5107
5504
  onPick(emoji);
5108
5505
  onClose();
5109
5506
  },
5110
- children: /* @__PURE__ */ jsx(Text, { style: styles22.bigEmoji, children: emoji })
5507
+ children: /* @__PURE__ */ jsx(Text, { style: styles23.bigEmoji, children: emoji })
5111
5508
  },
5112
5509
  emoji
5113
5510
  ))
@@ -5118,7 +5515,7 @@ function ReactionPicker({
5118
5515
  }
5119
5516
  );
5120
5517
  }
5121
- var styles22 = StyleSheet.create({
5518
+ var styles23 = StyleSheet.create({
5122
5519
  strip: {
5123
5520
  flexDirection: "row",
5124
5521
  flexWrap: "wrap",
@@ -5187,12 +5584,12 @@ function SendStatus({ message, onRetry, onDiscard, alignEnd = true }) {
5187
5584
  accessibilityRole: "button",
5188
5585
  accessibilityLabel: `${label} message`,
5189
5586
  hitSlop: 8,
5190
- style: styles23.button,
5587
+ style: styles24.button,
5191
5588
  children: /* @__PURE__ */ jsx(
5192
5589
  Text,
5193
5590
  {
5194
5591
  style: [
5195
- styles23.buttonText,
5592
+ styles24.buttonText,
5196
5593
  { color: danger ? theme.colors.danger : theme.colors.accentStrong },
5197
5594
  { fontFamily: theme.fonts.body }
5198
5595
  ],
@@ -5204,14 +5601,14 @@ function SendStatus({ message, onRetry, onDiscard, alignEnd = true }) {
5204
5601
  return /* @__PURE__ */ jsxs(
5205
5602
  View,
5206
5603
  {
5207
- style: [styles23.root, { justifyContent: alignEnd ? "flex-end" : "flex-start" }],
5604
+ style: [styles24.root, { justifyContent: alignEnd ? "flex-end" : "flex-start" }],
5208
5605
  accessibilityLiveRegion: "polite",
5209
5606
  children: [
5210
5607
  /* @__PURE__ */ jsx(
5211
5608
  Text,
5212
5609
  {
5213
5610
  style: [
5214
- styles23.text,
5611
+ styles24.text,
5215
5612
  { color: failed ? theme.colors.danger : theme.colors.textMuted },
5216
5613
  { fontFamily: theme.fonts.body }
5217
5614
  ],
@@ -5224,7 +5621,7 @@ function SendStatus({ message, onRetry, onDiscard, alignEnd = true }) {
5224
5621
  }
5225
5622
  );
5226
5623
  }
5227
- var styles23 = StyleSheet.create({
5624
+ var styles24 = StyleSheet.create({
5228
5625
  root: {
5229
5626
  flexDirection: "row",
5230
5627
  flexWrap: "wrap",
@@ -5277,7 +5674,7 @@ function ThreadSummary({
5277
5674
  accessibilityLabel: `${label}. Open thread`,
5278
5675
  hitSlop: 4,
5279
5676
  style: ({ pressed }) => [
5280
- styles24.row,
5677
+ styles25.row,
5281
5678
  {
5282
5679
  alignSelf: alignEnd ? "flex-end" : "flex-start",
5283
5680
  borderRadius: theme.radii.pill,
@@ -5285,11 +5682,11 @@ function ThreadSummary({
5285
5682
  }
5286
5683
  ],
5287
5684
  children: [
5288
- people.length > 0 ? /* @__PURE__ */ jsx(View, { style: styles24.stack, children: people.map((p, i) => /* @__PURE__ */ jsx(
5685
+ people.length > 0 ? /* @__PURE__ */ jsx(View, { style: styles25.stack, children: people.map((p, i) => /* @__PURE__ */ jsx(
5289
5686
  View,
5290
5687
  {
5291
5688
  style: [
5292
- styles24.stacked,
5689
+ styles25.stacked,
5293
5690
  {
5294
5691
  marginLeft: i === 0 ? 0 : -6,
5295
5692
  borderColor: theme.colors.background,
@@ -5311,7 +5708,7 @@ function ThreadSummary({
5311
5708
  /* @__PURE__ */ jsx(
5312
5709
  Text,
5313
5710
  {
5314
- style: [styles24.text, { color: theme.colors.link, fontFamily: theme.fonts.body }],
5711
+ style: [styles25.text, { color: theme.colors.link, fontFamily: theme.fonts.body }],
5315
5712
  numberOfLines: 1,
5316
5713
  children: label
5317
5714
  }
@@ -5331,7 +5728,7 @@ function Participant({
5331
5728
  const src = externalId ? avatarFor?.(externalId) ?? resolved.profile?.avatarUrl ?? null : null;
5332
5729
  return /* @__PURE__ */ jsx(Avatar, { src, name, seed: externalId ?? fallback, size: "xs" });
5333
5730
  }
5334
- var styles24 = StyleSheet.create({
5731
+ var styles25 = StyleSheet.create({
5335
5732
  row: {
5336
5733
  flexDirection: "row",
5337
5734
  alignItems: "center",
@@ -5447,10 +5844,10 @@ function FlatMessageRow({
5447
5844
  Text,
5448
5845
  {
5449
5846
  style: [
5450
- styles25.name,
5847
+ styles26.name,
5451
5848
  text,
5452
5849
  compact ? { color: userColor(ext ?? msg.sender_id ?? msg.id) } : null,
5453
- compact ? styles25.nameCompact : null
5850
+ compact ? styles26.nameCompact : null
5454
5851
  ],
5455
5852
  numberOfLines: 1,
5456
5853
  ...onSenderPress && !isSelf ? {
@@ -5465,22 +5862,22 @@ function FlatMessageRow({
5465
5862
  Text,
5466
5863
  {
5467
5864
  style: [
5468
- styles25.time,
5865
+ styles26.time,
5469
5866
  { color: theme.colors.textSubtle, fontFamily: theme.fonts.body },
5470
- dim ? styles25.timeDim : null
5867
+ dim ? styles26.timeDim : null
5471
5868
  ],
5472
5869
  ...dim ? { numberOfLines: 1, adjustsFontSizeToFit: true, minimumFontScale: 0.6 } : {},
5473
5870
  children: dim ? gutterTime(time) : time
5474
5871
  }
5475
5872
  );
5476
- const header = compact ? name : isRunStart ? /* @__PURE__ */ jsxs(View, { style: styles25.header, children: [
5873
+ const header = compact ? name : isRunStart ? /* @__PURE__ */ jsxs(View, { style: styles26.header, children: [
5477
5874
  name,
5478
5875
  timeText(false)
5479
5876
  ] }) : null;
5480
5877
  const images = attachments && !deleted ? (msg.attachments ?? []).filter((a) => isImageContentType(a.content_type)) : [];
5481
5878
  const files = attachments && !deleted ? (msg.attachments ?? []).filter((a) => !isImageContentType(a.content_type)) : [];
5482
5879
  const mediaWidth = Math.min(screenWidth - GUTTER - 48, 320);
5483
- const attachmentsEl = images.length > 0 || files.length > 0 ? /* @__PURE__ */ jsxs(View, { style: styles25.attachments, children: [
5880
+ const attachmentsEl = images.length > 0 || files.length > 0 ? /* @__PURE__ */ jsxs(View, { style: styles26.attachments, children: [
5484
5881
  images.length > 0 ? /* @__PURE__ */ jsx(
5485
5882
  ImageMosaic,
5486
5883
  {
@@ -5503,11 +5900,11 @@ function FlatMessageRow({
5503
5900
  lineHeight: dense ? theme.fonts.lineHeight - 3 : theme.fonts.lineHeight
5504
5901
  };
5505
5902
  const edited = !!msg.edited_at && !deleted;
5506
- const meta = edited || isSelf && readState ? /* @__PURE__ */ jsxs(View, { style: styles25.meta, children: [
5903
+ const meta = edited || isSelf && readState ? /* @__PURE__ */ jsxs(View, { style: styles26.meta, children: [
5507
5904
  edited ? /* @__PURE__ */ jsx(
5508
5905
  Text,
5509
5906
  {
5510
- style: [styles25.edited, { color: theme.colors.textSubtle }],
5907
+ style: [styles26.edited, { color: theme.colors.textSubtle }],
5511
5908
  ...editHistory && canShowEditHistory(msg.id) ? {
5512
5909
  onPress: () => setHistoryOpen(true),
5513
5910
  suppressHighlighting: true,
@@ -5527,7 +5924,7 @@ function FlatMessageRow({
5527
5924
  }
5528
5925
  ) : null
5529
5926
  ] }) : null;
5530
- const body = deleted ? /* @__PURE__ */ jsx(Text, { style: [bodyText, styles25.deleted, { color: theme.colors.textMuted }], children: "This message was deleted" }) : raw ? /* @__PURE__ */ jsxs(View, { children: [
5927
+ const body = deleted ? /* @__PURE__ */ jsx(Text, { style: [bodyText, styles26.deleted, { color: theme.colors.textMuted }], children: "This message was deleted" }) : raw ? /* @__PURE__ */ jsxs(View, { children: [
5531
5928
  jumbo > 0 ? /* @__PURE__ */ jsx(Text, { style: { fontSize: emojiFontSize(jumbo), lineHeight: emojiFontSize(jumbo) + 8 }, children: raw }) : markdown && hasMarkdown(shown) ? renderMarkdown(shown, {
5532
5929
  textColor: bodyText.color,
5533
5930
  linkColor: theme.colors.link,
@@ -5539,8 +5936,8 @@ function FlatMessageRow({
5539
5936
  return false;
5540
5937
  }
5541
5938
  }) : /* @__PURE__ */ jsx(Text, { style: bodyText, children: shown }),
5542
- trimmable ? /* @__PURE__ */ jsx(Pressable, { onPress: () => setExpanded((e) => !e), children: /* @__PURE__ */ jsx(Text, { style: [styles25.readMore, { color: theme.colors.link }], children: expanded ? "Show less" : "Read more" }) }) : null,
5543
- previews.length > 0 ? /* @__PURE__ */ jsx(View, { style: styles25.previews, children: previews.map((p) => /* @__PURE__ */ jsx(
5939
+ trimmable ? /* @__PURE__ */ jsx(Pressable, { onPress: () => setExpanded((e) => !e), children: /* @__PURE__ */ jsx(Text, { style: [styles26.readMore, { color: theme.colors.link }], children: expanded ? "Show less" : "Read more" }) }) : null,
5940
+ previews.length > 0 ? /* @__PURE__ */ jsx(View, { style: styles26.previews, children: previews.map((p) => /* @__PURE__ */ jsx(
5544
5941
  LinkPreviewCard,
5545
5942
  {
5546
5943
  preview: p,
@@ -5564,7 +5961,7 @@ function FlatMessageRow({
5564
5961
  }
5565
5962
  ) : null
5566
5963
  );
5567
- const reactionsEl = reactions && !inert ? /* @__PURE__ */ jsx(View, { style: styles25.reactions, children: /* @__PURE__ */ jsx(
5964
+ const reactionsEl = reactions && !inert ? /* @__PURE__ */ jsx(View, { style: styles26.reactions, children: /* @__PURE__ */ jsx(
5568
5965
  ReactionStrip,
5569
5966
  {
5570
5967
  messageId: msg.id,
@@ -5583,7 +5980,7 @@ function FlatMessageRow({
5583
5980
  ...onQuotedClick ? { onPress: () => onQuotedClick(msg.quoted_message.id) } : {}
5584
5981
  }
5585
5982
  ) : null;
5586
- const content = /* @__PURE__ */ jsxs(View, { style: styles25.content, children: [
5983
+ const content = /* @__PURE__ */ jsxs(View, { style: styles26.content, children: [
5587
5984
  !compact ? renderSlot(slots?.header, ctx, header) : null,
5588
5985
  quote,
5589
5986
  renderSlot(slots?.attachments, ctx, attachmentsEl),
@@ -5624,19 +6021,19 @@ function FlatMessageRow({
5624
6021
  View,
5625
6022
  {
5626
6023
  style: [
5627
- styles25.row,
5628
- compact ? styles25.rowCompact : null,
5629
- dense ? styles25.rowDense : null,
5630
- !compact && isRunStart ? dense ? styles25.runStartDense : styles25.runStart : null,
6024
+ styles26.row,
6025
+ compact ? styles26.rowCompact : null,
6026
+ dense ? styles26.rowDense : null,
6027
+ !compact && isRunStart ? dense ? styles26.runStartDense : styles26.runStart : null,
5631
6028
  mentionsMe ? { backgroundColor: theme.colors.mention, borderLeftColor: theme.colors.accent } : null,
5632
- isEditing ? styles25.rowEditing : null
6029
+ isEditing ? styles26.rowEditing : null
5633
6030
  ],
5634
6031
  children: [
5635
6032
  /* @__PURE__ */ jsx(
5636
6033
  Pressable,
5637
6034
  {
5638
6035
  onLongPress: openActions,
5639
- style: [styles25.line, compact ? styles25.lineCompact : null],
6036
+ style: [styles26.line, compact ? styles26.lineCompact : null],
5640
6037
  accessibilityLabel: messageA11yLabel(msg, senderName, isSelf),
5641
6038
  ...actions && !inert ? {
5642
6039
  accessibilityHint: "Long press for message actions",
@@ -5645,11 +6042,11 @@ function FlatMessageRow({
5645
6042
  } : {},
5646
6043
  children: compact ? /* @__PURE__ */ jsxs(Fragment, { children: [
5647
6044
  timeText(false),
5648
- avatar ? /* @__PURE__ */ jsx(View, { style: styles25.avatarCompact, children: avatar }) : null,
6045
+ avatar ? /* @__PURE__ */ jsx(View, { style: styles26.avatarCompact, children: avatar }) : null,
5649
6046
  renderSlot(slots?.header, ctx, header),
5650
6047
  content
5651
6048
  ] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
5652
- /* @__PURE__ */ jsx(View, { style: styles25.gutter, children: isRunStart ? avatar : timeText(true) }),
6049
+ /* @__PURE__ */ jsx(View, { style: styles26.gutter, children: isRunStart ? avatar : timeText(true) }),
5653
6050
  content
5654
6051
  ] })
5655
6052
  }
@@ -5670,7 +6067,7 @@ function FlatMessageRow({
5670
6067
  }
5671
6068
  );
5672
6069
  }
5673
- var styles25 = StyleSheet.create({
6070
+ var styles26 = StyleSheet.create({
5674
6071
  row: {
5675
6072
  // 3px left border reserved for the mention accent bar.
5676
6073
  borderLeftWidth: 3,
@@ -5822,13 +6219,13 @@ function MessageActions({
5822
6219
  animationType: "fade",
5823
6220
  onRequestClose: onClose,
5824
6221
  ...EDGE_TO_EDGE_MODAL,
5825
- children: /* @__PURE__ */ jsx(Pressable, { style: styles26.backdrop, onPress: onClose, children: /* @__PURE__ */ jsxs(
6222
+ children: /* @__PURE__ */ jsx(Pressable, { style: styles27.backdrop, onPress: onClose, children: /* @__PURE__ */ jsxs(
5826
6223
  Pressable,
5827
6224
  {
5828
6225
  onPress: () => void 0,
5829
6226
  accessible: false,
5830
6227
  style: [
5831
- styles26.sheet,
6228
+ styles27.sheet,
5832
6229
  {
5833
6230
  backgroundColor: theme.colors.surface,
5834
6231
  borderTopLeftRadius: theme.radii.lg,
@@ -5841,7 +6238,7 @@ function MessageActions({
5841
6238
  theme.shadows.lg
5842
6239
  ],
5843
6240
  children: [
5844
- showEmojiRow ? /* @__PURE__ */ jsxs(View, { style: [styles26.emojiRow, { borderBottomColor: theme.colors.border }], children: [
6241
+ showEmojiRow ? /* @__PURE__ */ jsxs(View, { style: [styles27.emojiRow, { borderBottomColor: theme.colors.border }], children: [
5845
6242
  emojis.map((emoji) => /* @__PURE__ */ jsx(
5846
6243
  Pressable,
5847
6244
  {
@@ -5849,10 +6246,10 @@ function MessageActions({
5849
6246
  onPickReaction(emoji);
5850
6247
  onClose();
5851
6248
  },
5852
- style: styles26.emojiBtn,
6249
+ style: styles27.emojiBtn,
5853
6250
  hitSlop: 6,
5854
6251
  accessibilityLabel: `React with ${emoji}`,
5855
- children: /* @__PURE__ */ jsx(Text, { style: styles26.emoji, children: emoji })
6252
+ children: /* @__PURE__ */ jsx(Text, { style: styles27.emoji, children: emoji })
5856
6253
  },
5857
6254
  emoji
5858
6255
  )),
@@ -5863,7 +6260,7 @@ function MessageActions({
5863
6260
  onClose();
5864
6261
  onMoreReactions();
5865
6262
  },
5866
- style: [styles26.moreBtn, { backgroundColor: theme.colors.surfaceAlt }],
6263
+ style: [styles27.moreBtn, { backgroundColor: theme.colors.surfaceAlt }],
5867
6264
  hitSlop: 6,
5868
6265
  accessibilityRole: "button",
5869
6266
  accessibilityLabel: "More reactions",
@@ -5871,7 +6268,7 @@ function MessageActions({
5871
6268
  }
5872
6269
  ) : null
5873
6270
  ] }) : null,
5874
- items.map((item) => /* @__PURE__ */ jsxs(Pressable, { onPress: item.onPress, style: styles26.item, children: [
6271
+ items.map((item) => /* @__PURE__ */ jsxs(Pressable, { onPress: item.onPress, style: styles27.item, children: [
5875
6272
  /* @__PURE__ */ jsx(
5876
6273
  PoolseIcon,
5877
6274
  {
@@ -5884,7 +6281,7 @@ function MessageActions({
5884
6281
  Text,
5885
6282
  {
5886
6283
  style: [
5887
- styles26.itemText,
6284
+ styles27.itemText,
5888
6285
  {
5889
6286
  color: item.danger ? theme.colors.danger : theme.colors.text,
5890
6287
  fontFamily: theme.fonts.body
@@ -5904,7 +6301,7 @@ function hostOf2(url) {
5904
6301
  const m = /^[a-z][a-z0-9+.-]*:\/\/([^/?#]+)/i.exec(url);
5905
6302
  return (m?.[1] ?? url).replace(/^www\./, "");
5906
6303
  }
5907
- var styles26 = StyleSheet.create({
6304
+ var styles27 = StyleSheet.create({
5908
6305
  backdrop: {
5909
6306
  flex: 1,
5910
6307
  backgroundColor: "rgba(0,0,0,0.35)",
@@ -6021,6 +6418,16 @@ function RowSheets({
6021
6418
  ] });
6022
6419
  }
6023
6420
  function MessageRow(props) {
6421
+ if (recordingNoticeDisplayFor(props.msg, props.meId)) {
6422
+ return /* @__PURE__ */ jsx(
6423
+ RecordingNoticeRow,
6424
+ {
6425
+ msg: props.msg,
6426
+ meId: props.meId,
6427
+ ...props.nameForUserId ? { nameFor: props.nameForUserId } : {}
6428
+ }
6429
+ );
6430
+ }
6024
6431
  const callLog = callLogDisplayFor(props.msg, props.meId);
6025
6432
  if (callLog !== void 0) {
6026
6433
  return callLog ? /* @__PURE__ */ jsx(
@@ -6186,16 +6593,16 @@ function BubbleMessageRow({
6186
6593
  View,
6187
6594
  {
6188
6595
  style: [
6189
- styles27.row,
6596
+ styles28.row,
6190
6597
  { alignSelf: isSelf ? "flex-end" : "flex-start" },
6191
- density === "compact" ? styles27.rowDense : null,
6598
+ density === "compact" ? styles28.rowDense : null,
6192
6599
  // Lift this row above the dim backdrop the parent renders
6193
6600
  // during edit mode. zIndex covers iOS / web; elevation does
6194
6601
  // the equivalent on Android.
6195
- isEditing ? styles27.rowEditing : null
6602
+ isEditing ? styles28.rowEditing : null
6196
6603
  ],
6197
6604
  children: [
6198
- showAvatarSlot ? /* @__PURE__ */ jsx(View, { style: styles27.avatarSlot, children: !showAvatarRender ? null : onAvatarPress ? /* @__PURE__ */ jsx(
6605
+ showAvatarSlot ? /* @__PURE__ */ jsx(View, { style: styles28.avatarSlot, children: !showAvatarRender ? null : onAvatarPress ? /* @__PURE__ */ jsx(
6199
6606
  Pressable,
6200
6607
  {
6201
6608
  onPress: () => onAvatarPress(sender),
@@ -6205,14 +6612,14 @@ function BubbleMessageRow({
6205
6612
  children: avatar
6206
6613
  }
6207
6614
  ) : avatar }) : null,
6208
- /* @__PURE__ */ jsxs(View, { style: styles27.bubbleCol, children: [
6615
+ /* @__PURE__ */ jsxs(View, { style: styles28.bubbleCol, children: [
6209
6616
  swipeEnabled ? /* @__PURE__ */ jsx(
6210
6617
  Animated.View,
6211
6618
  {
6212
6619
  pointerEvents: "none",
6213
6620
  style: [
6214
- styles27.replyHint,
6215
- isSelf ? styles27.replyHintRight : styles27.replyHintLeft,
6621
+ styles28.replyHint,
6622
+ isSelf ? styles28.replyHintRight : styles28.replyHintLeft,
6216
6623
  {
6217
6624
  opacity: replyIconOpacity,
6218
6625
  transform: [{ scale: replyIconScale }],
@@ -6294,7 +6701,7 @@ function BubbleMessageRow({
6294
6701
  renderSlot(
6295
6702
  slots?.reactions,
6296
6703
  slotContext,
6297
- reactions && !tombstone ? /* @__PURE__ */ jsx(View, { style: [styles27.reactionsRow, { alignSelf: isSelf ? "flex-end" : "flex-start" }], children: /* @__PURE__ */ jsx(
6704
+ reactions && !tombstone ? /* @__PURE__ */ jsx(View, { style: [styles28.reactionsRow, { alignSelf: isSelf ? "flex-end" : "flex-start" }], children: /* @__PURE__ */ jsx(
6298
6705
  ReactionStrip,
6299
6706
  {
6300
6707
  messageId: msg.id,
@@ -6345,7 +6752,7 @@ function BubbleMessageRow({
6345
6752
  }
6346
6753
  );
6347
6754
  }
6348
- var styles27 = StyleSheet.create({
6755
+ var styles28 = StyleSheet.create({
6349
6756
  row: {
6350
6757
  flexDirection: "row",
6351
6758
  alignItems: "flex-end",
@@ -6402,24 +6809,24 @@ function NewMessagesDivider({ label = "New messages" }) {
6402
6809
  return /* @__PURE__ */ jsxs(
6403
6810
  View,
6404
6811
  {
6405
- style: [styles28.row, { paddingHorizontal: theme.spacing.md }],
6812
+ style: [styles29.row, { paddingHorizontal: theme.spacing.md }],
6406
6813
  accessibilityRole: "text",
6407
6814
  accessibilityLabel: label,
6408
6815
  children: [
6409
- /* @__PURE__ */ jsx(View, { style: [styles28.line, { backgroundColor: theme.colors.accent }] }),
6816
+ /* @__PURE__ */ jsx(View, { style: [styles29.line, { backgroundColor: theme.colors.accent }] }),
6410
6817
  /* @__PURE__ */ jsx(
6411
6818
  Text,
6412
6819
  {
6413
- style: [styles28.label, { color: theme.colors.accentStrong, fontFamily: theme.fonts.body }],
6820
+ style: [styles29.label, { color: theme.colors.accentStrong, fontFamily: theme.fonts.body }],
6414
6821
  children: label
6415
6822
  }
6416
6823
  ),
6417
- /* @__PURE__ */ jsx(View, { style: [styles28.line, { backgroundColor: theme.colors.accent }] })
6824
+ /* @__PURE__ */ jsx(View, { style: [styles29.line, { backgroundColor: theme.colors.accent }] })
6418
6825
  ]
6419
6826
  }
6420
6827
  );
6421
6828
  }
6422
- var styles28 = StyleSheet.create({
6829
+ var styles29 = StyleSheet.create({
6423
6830
  row: {
6424
6831
  flexDirection: "row",
6425
6832
  alignItems: "center",
@@ -6588,15 +6995,15 @@ function ThreadSheet({
6588
6995
  return /* @__PURE__ */ jsxs(
6589
6996
  View,
6590
6997
  {
6591
- style: styles29.modalRoot,
6998
+ style: styles30.modalRoot,
6592
6999
  onLayout: (e) => setRootHeight(Math.round(e.nativeEvent.layout.height)),
6593
7000
  children: [
6594
- /* @__PURE__ */ jsx(Pressable, { style: styles29.backdrop, onPress: onClose, accessibilityLabel: "Close thread" }),
7001
+ /* @__PURE__ */ jsx(Pressable, { style: styles30.backdrop, onPress: onClose, accessibilityLabel: "Close thread" }),
6595
7002
  /* @__PURE__ */ jsxs(
6596
7003
  Animated.View,
6597
7004
  {
6598
7005
  style: [
6599
- styles29.sheet,
7006
+ styles30.sheet,
6600
7007
  {
6601
7008
  height: sheetHeight,
6602
7009
  backgroundColor: theme.colors.background,
@@ -6610,14 +7017,14 @@ function ThreadSheet({
6610
7017
  ],
6611
7018
  children: [
6612
7019
  /* @__PURE__ */ jsxs(View, { ...panHandlers, children: [
6613
- /* @__PURE__ */ jsx(View, { style: styles29.dragHandle, children: /* @__PURE__ */ jsx(View, { style: [styles29.dragPill, { backgroundColor: theme.colors.textSubtle }] }) }),
6614
- /* @__PURE__ */ jsxs(View, { style: [styles29.header, { borderBottomColor: theme.colors.border }], children: [
7020
+ /* @__PURE__ */ jsx(View, { style: styles30.dragHandle, children: /* @__PURE__ */ jsx(View, { style: [styles30.dragPill, { backgroundColor: theme.colors.textSubtle }] }) }),
7021
+ /* @__PURE__ */ jsxs(View, { style: [styles30.header, { borderBottomColor: theme.colors.border }], children: [
6615
7022
  /* @__PURE__ */ jsx(
6616
7023
  Pressable,
6617
7024
  {
6618
7025
  onPress: onClose,
6619
7026
  hitSlop: 16,
6620
- style: [styles29.closeBtn, { backgroundColor: theme.colors.surfaceAlt }],
7027
+ style: [styles30.closeBtn, { backgroundColor: theme.colors.surfaceAlt }],
6621
7028
  accessibilityLabel: "Close thread",
6622
7029
  children: /* @__PURE__ */ jsx(PoolseIcon, { name: "close", size: 18, color: theme.colors.text })
6623
7030
  }
@@ -6625,7 +7032,7 @@ function ThreadSheet({
6625
7032
  /* @__PURE__ */ jsx(
6626
7033
  Text,
6627
7034
  {
6628
- style: [styles29.title, { color: theme.colors.text, fontFamily: theme.fonts.display }],
7035
+ style: [styles30.title, { color: theme.colors.text, fontFamily: theme.fonts.display }],
6629
7036
  children: "Thread"
6630
7037
  }
6631
7038
  )
@@ -6634,12 +7041,12 @@ function ThreadSheet({
6634
7041
  /* @__PURE__ */ jsxs(
6635
7042
  KeyboardAvoidingView,
6636
7043
  {
6637
- style: styles29.kavBody,
7044
+ style: styles30.kavBody,
6638
7045
  behavior: "padding",
6639
7046
  keyboardVerticalOffset: gutter,
6640
7047
  children: [
6641
- /* @__PURE__ */ jsx(View, { style: [styles29.rootPreview, { backgroundColor: theme.colors.surfaceAlt }], children: rootRow }),
6642
- /* @__PURE__ */ jsx(View, { style: styles29.listWrap, children: /* @__PURE__ */ jsx(
7048
+ /* @__PURE__ */ jsx(View, { style: [styles30.rootPreview, { backgroundColor: theme.colors.surfaceAlt }], children: rootRow }),
7049
+ /* @__PURE__ */ jsx(View, { style: styles30.listWrap, children: /* @__PURE__ */ jsx(
6643
7050
  MessageList,
6644
7051
  {
6645
7052
  messages: replies,
@@ -6684,7 +7091,7 @@ function ThreadSheet({
6684
7091
  }
6685
7092
  );
6686
7093
  }
6687
- var styles29 = StyleSheet.create({
7094
+ var styles30 = StyleSheet.create({
6688
7095
  modalRoot: {
6689
7096
  flex: 1,
6690
7097
  justifyContent: "flex-end"
@@ -6756,7 +7163,7 @@ function TypingIndicator({ typing, labelFor }) {
6756
7163
  const ids = Array.from(typing);
6757
7164
  const isTyping = ids.length > 0;
6758
7165
  if (!isTyping) return /* @__PURE__ */ jsx(View, { style: { height: 0 } });
6759
- return /* @__PURE__ */ jsxs(View, { style: styles30.row, children: [
7166
+ return /* @__PURE__ */ jsxs(View, { style: styles31.row, children: [
6760
7167
  /* @__PURE__ */ jsx(TypingDots, {}),
6761
7168
  /* @__PURE__ */ jsx(TypingLabel, { ids, ...labelFor ? { labelFor } : {} })
6762
7169
  ] });
@@ -6801,7 +7208,7 @@ function TypingDots() {
6801
7208
  ],
6802
7209
  opacity: val.interpolate({ inputRange: [0, 1], outputRange: [0.5, 1] })
6803
7210
  });
6804
- return /* @__PURE__ */ jsxs(View, { style: styles30.dotsWrap, children: [
7211
+ return /* @__PURE__ */ jsxs(View, { style: styles31.dotsWrap, children: [
6805
7212
  /* @__PURE__ */ jsx(Animated.View, { style: dot(a) }),
6806
7213
  /* @__PURE__ */ jsx(Animated.View, { style: dot(b) }),
6807
7214
  /* @__PURE__ */ jsx(Animated.View, { style: dot(c) })
@@ -6817,9 +7224,9 @@ function TypingLabel({
6817
7224
  const name1 = useDisplayName(id1, labelFor);
6818
7225
  const name2 = useDisplayName(id2, labelFor);
6819
7226
  const text = ids.length === 1 ? `${name1} is typing` : ids.length === 2 ? `${name1} and ${name2} are typing` : `${ids.length} people are typing`;
6820
- return /* @__PURE__ */ jsx(Text, { style: [styles30.label, { color: theme.colors.textMuted, fontFamily: theme.fonts.body }], children: text });
7227
+ return /* @__PURE__ */ jsx(Text, { style: [styles31.label, { color: theme.colors.textMuted, fontFamily: theme.fonts.body }], children: text });
6821
7228
  }
6822
- var styles30 = StyleSheet.create({
7229
+ var styles31 = StyleSheet.create({
6823
7230
  row: {
6824
7231
  flexDirection: "row",
6825
7232
  alignItems: "center",
@@ -7133,6 +7540,14 @@ function ConversationView({
7133
7540
  }, [realtimeStatus, refetch]);
7134
7541
  const wantsMembers = mentions || senderLabels === "auto" || avatars === "auto";
7135
7542
  const { members } = useMembers(wantsMembers ? conversationId : "");
7543
+ const nameForUserId = useCallback(
7544
+ (userId) => {
7545
+ const ext = members.find((m) => m.user_id === userId)?.external_id;
7546
+ if (!ext) return null;
7547
+ return chat.users.peek(ext)?.displayName ?? labelFor?.(ext) ?? null;
7548
+ },
7549
+ [members, chat, labelFor]
7550
+ );
7136
7551
  const isGroupChat = members.length > 2;
7137
7552
  const showSenderLabels = senderLabels === "always" || senderLabels === "auto" && isGroupChat;
7138
7553
  const showAvatars = showAvatarsProp ?? (layout === "list" ? true : layout === "compact" ? false : avatars === "always" || avatars === "auto" && isGroupChat);
@@ -7409,6 +7824,7 @@ function ConversationView({
7409
7824
  groupPosition,
7410
7825
  markdown,
7411
7826
  ...onCallBack ? { onCallBack } : {},
7827
+ nameForUserId,
7412
7828
  ...layoutProps,
7413
7829
  mentionsMe: mentionsViewer(msg, meId)
7414
7830
  }
@@ -7448,7 +7864,8 @@ function ConversationView({
7448
7864
  linkPreviews,
7449
7865
  markUnread,
7450
7866
  markMessageUnread,
7451
- removeLinkPreview
7867
+ removeLinkPreview,
7868
+ nameForUserId
7452
7869
  ]
7453
7870
  );
7454
7871
  const renderItem = useCallback(
@@ -7566,7 +7983,7 @@ function ConversationView({
7566
7983
  return /* @__PURE__ */ jsx(UploadProvider, { children: /* @__PURE__ */ jsxs(
7567
7984
  KeyboardAvoidingView,
7568
7985
  {
7569
- style: [styles31.root, { backgroundColor: theme.colors.background }],
7986
+ style: [styles32.root, { backgroundColor: theme.colors.background }],
7570
7987
  behavior: Platform.OS === "ios" ? "padding" : "height",
7571
7988
  keyboardVerticalOffset: keyboardOffset,
7572
7989
  children: [
@@ -7575,7 +7992,7 @@ function ConversationView({
7575
7992
  Text,
7576
7993
  {
7577
7994
  style: [
7578
- styles31.notice,
7995
+ styles32.notice,
7579
7996
  { color: theme.colors.textMuted, backgroundColor: theme.colors.surfaceAlt }
7580
7997
  ],
7581
7998
  accessibilityRole: "alert",
@@ -7591,7 +8008,7 @@ function ConversationView({
7591
8008
  onJoin: onJoinCall
7592
8009
  }
7593
8010
  ) : null,
7594
- /* @__PURE__ */ jsxs(View, { style: styles31.listWrap, children: [
8011
+ /* @__PURE__ */ jsxs(View, { style: styles32.listWrap, children: [
7595
8012
  /* @__PURE__ */ jsx(
7596
8013
  MessageList,
7597
8014
  {
@@ -7610,7 +8027,7 @@ function ConversationView({
7610
8027
  (stream) => stream.status === "failed" ? /* @__PURE__ */ jsx(
7611
8028
  Text,
7612
8029
  {
7613
- style: [styles31.streamFailed, { color: theme.colors.textSubtle }],
8030
+ style: [styles32.streamFailed, { color: theme.colors.textSubtle }],
7614
8031
  accessibilityRole: "alert",
7615
8032
  children: stream.error ? `The agent couldn't reply: ${stream.error}` : "The agent couldn't reply."
7616
8033
  },
@@ -7651,7 +8068,7 @@ function ConversationView({
7651
8068
  {
7652
8069
  onPress: jumpToUnread,
7653
8070
  style: [
7654
- styles31.unreadPill,
8071
+ styles32.unreadPill,
7655
8072
  { backgroundColor: theme.colors.accent, borderRadius: theme.radii.pill },
7656
8073
  theme.shadows.sm
7657
8074
  ],
@@ -7667,7 +8084,7 @@ function ConversationView({
7667
8084
  label: null
7668
8085
  }
7669
8086
  ),
7670
- /* @__PURE__ */ jsx(Text, { style: [styles31.unreadPillText, { color: theme.colors.accentText }], children: seekingUnread ? "Loading\u2026" : "New messages" }),
8087
+ /* @__PURE__ */ jsx(Text, { style: [styles32.unreadPillText, { color: theme.colors.accentText }], children: seekingUnread ? "Loading\u2026" : "New messages" }),
7671
8088
  /* @__PURE__ */ jsx(
7672
8089
  Pressable,
7673
8090
  {
@@ -7684,7 +8101,7 @@ function ConversationView({
7684
8101
  editingId ? /* @__PURE__ */ jsx(
7685
8102
  Pressable,
7686
8103
  {
7687
- style: [styles31.editBackdrop, { backgroundColor: theme.colors.overlay }],
8104
+ style: [styles32.editBackdrop, { backgroundColor: theme.colors.overlay }],
7688
8105
  onPress: () => setEditingId(null),
7689
8106
  accessibilityLabel: "Cancel editing"
7690
8107
  }
@@ -7746,7 +8163,7 @@ function readStateForMessage(msg, members, meId, sequenceByMessageId) {
7746
8163
  return anyRead ? "read" : "sent";
7747
8164
  }
7748
8165
  var NEW_MESSAGES_KEY = "new-messages";
7749
- var styles31 = StyleSheet.create({
8166
+ var styles32 = StyleSheet.create({
7750
8167
  root: {
7751
8168
  flex: 1
7752
8169
  },
@@ -7882,15 +8299,15 @@ function UserPickerSheet({
7882
8299
  children: /* @__PURE__ */ jsxs(
7883
8300
  View,
7884
8301
  {
7885
- style: styles32.modalRoot,
8302
+ style: styles33.modalRoot,
7886
8303
  onLayout: (e) => setRootHeight(Math.round(e.nativeEvent.layout.height)),
7887
8304
  children: [
7888
- /* @__PURE__ */ jsx(Pressable, { style: styles32.backdrop, onPress: handleClose }),
8305
+ /* @__PURE__ */ jsx(Pressable, { style: styles33.backdrop, onPress: handleClose }),
7889
8306
  /* @__PURE__ */ jsx(
7890
8307
  Animated.View,
7891
8308
  {
7892
8309
  style: [
7893
- styles32.sheet,
8310
+ styles33.sheet,
7894
8311
  {
7895
8312
  backgroundColor: theme.colors.background,
7896
8313
  borderTopLeftRadius: theme.radii.xl,
@@ -7908,18 +8325,18 @@ function UserPickerSheet({
7908
8325
  children: /* @__PURE__ */ jsxs(
7909
8326
  KeyboardAvoidingView,
7910
8327
  {
7911
- style: styles32.kav,
8328
+ style: styles33.kav,
7912
8329
  behavior: "padding",
7913
8330
  keyboardVerticalOffset: screenHeight - sheetHeight,
7914
8331
  children: [
7915
- /* @__PURE__ */ jsx(View, { ...panHandlers, style: styles32.dragHandle, children: /* @__PURE__ */ jsx(View, { style: [styles32.dragPill, { backgroundColor: theme.colors.textSubtle }] }) }),
7916
- /* @__PURE__ */ jsxs(View, { style: styles32.header, children: [
8332
+ /* @__PURE__ */ jsx(View, { ...panHandlers, style: styles33.dragHandle, children: /* @__PURE__ */ jsx(View, { style: [styles33.dragPill, { backgroundColor: theme.colors.textSubtle }] }) }),
8333
+ /* @__PURE__ */ jsxs(View, { style: styles33.header, children: [
7917
8334
  /* @__PURE__ */ jsx(
7918
8335
  Pressable,
7919
8336
  {
7920
8337
  onPress: handleClose,
7921
8338
  hitSlop: 16,
7922
- style: [styles32.closeBtn, { backgroundColor: theme.colors.surfaceAlt }],
8339
+ style: [styles33.closeBtn, { backgroundColor: theme.colors.surfaceAlt }],
7923
8340
  accessibilityLabel: "Close picker",
7924
8341
  children: /* @__PURE__ */ jsx(PoolseIcon, { name: "close", size: 18, color: theme.colors.text })
7925
8342
  }
@@ -7928,7 +8345,7 @@ function UserPickerSheet({
7928
8345
  Text,
7929
8346
  {
7930
8347
  style: [
7931
- styles32.title,
8348
+ styles33.title,
7932
8349
  { color: theme.colors.text, fontFamily: theme.fonts.display }
7933
8350
  ],
7934
8351
  numberOfLines: 1,
@@ -7942,7 +8359,7 @@ function UserPickerSheet({
7942
8359
  disabled: !canCreate,
7943
8360
  hitSlop: 6,
7944
8361
  style: [
7945
- styles32.createBtn,
8362
+ styles33.createBtn,
7946
8363
  {
7947
8364
  backgroundColor: canCreate ? theme.colors.accent : theme.colors.surfaceAlt,
7948
8365
  opacity: canCreate ? 1 : 0.6
@@ -7973,7 +8390,7 @@ function UserPickerSheet({
7973
8390
  value: groupName,
7974
8391
  onChangeText: setGroupName,
7975
8392
  style: [
7976
- styles32.groupNameInput,
8393
+ styles33.groupNameInput,
7977
8394
  {
7978
8395
  color: theme.colors.text,
7979
8396
  backgroundColor: theme.colors.surfaceAlt,
@@ -7992,7 +8409,7 @@ function UserPickerSheet({
7992
8409
  value: query,
7993
8410
  onChangeText: setQuery,
7994
8411
  style: [
7995
- styles32.searchInput,
8412
+ styles33.searchInput,
7996
8413
  {
7997
8414
  color: theme.colors.text,
7998
8415
  backgroundColor: theme.colors.surfaceAlt,
@@ -8009,7 +8426,7 @@ function UserPickerSheet({
8009
8426
  data: filtered,
8010
8427
  keyExtractor: (u) => u.externalId,
8011
8428
  keyboardShouldPersistTaps: "handled",
8012
- ListEmptyComponent: /* @__PURE__ */ jsx(View, { style: styles32.empty, children: /* @__PURE__ */ jsx(Text, { style: [styles32.emptyText, { color: theme.colors.textSubtle }], children: query ? "No matches." : "No users to show." }) }),
8429
+ ListEmptyComponent: /* @__PURE__ */ jsx(View, { style: styles33.empty, children: /* @__PURE__ */ jsx(Text, { style: [styles33.emptyText, { color: theme.colors.textSubtle }], children: query ? "No matches." : "No users to show." }) }),
8013
8430
  renderItem: ({ item }) => /* @__PURE__ */ jsx(
8014
8431
  UserRow,
8015
8432
  {
@@ -8051,29 +8468,29 @@ function UserRow({
8051
8468
  {
8052
8469
  onPress,
8053
8470
  style: [
8054
- styles32.row,
8471
+ styles33.row,
8055
8472
  {
8056
8473
  backgroundColor: selected ? theme.colors.accentSoft : "transparent"
8057
8474
  }
8058
8475
  ],
8059
8476
  children: [
8060
- user.avatarUrl ? /* @__PURE__ */ jsx(Image, { source: { uri: user.avatarUrl }, style: styles32.avatarImg }) : /* @__PURE__ */ jsx(Avatar, { src: null, name: user.name, seed: user.externalId, size: "md" }),
8061
- /* @__PURE__ */ jsxs(View, { style: styles32.body, children: [
8477
+ user.avatarUrl ? /* @__PURE__ */ jsx(Image, { source: { uri: user.avatarUrl }, style: styles33.avatarImg }) : /* @__PURE__ */ jsx(Avatar, { src: null, name: user.name, seed: user.externalId, size: "md" }),
8478
+ /* @__PURE__ */ jsxs(View, { style: styles33.body, children: [
8062
8479
  /* @__PURE__ */ jsx(
8063
8480
  Text,
8064
8481
  {
8065
- style: [styles32.name, { color: theme.colors.text, fontFamily: theme.fonts.body }],
8482
+ style: [styles33.name, { color: theme.colors.text, fontFamily: theme.fonts.body }],
8066
8483
  numberOfLines: 1,
8067
8484
  children: user.name
8068
8485
  }
8069
8486
  ),
8070
- user.subtitle ? /* @__PURE__ */ jsx(Text, { style: [styles32.subtitle, { color: theme.colors.textSubtle }], numberOfLines: 1, children: user.subtitle }) : null
8487
+ user.subtitle ? /* @__PURE__ */ jsx(Text, { style: [styles33.subtitle, { color: theme.colors.textSubtle }], numberOfLines: 1, children: user.subtitle }) : null
8071
8488
  ] }),
8072
8489
  isGroup ? /* @__PURE__ */ jsx(
8073
8490
  View,
8074
8491
  {
8075
8492
  style: [
8076
- styles32.checkbox,
8493
+ styles33.checkbox,
8077
8494
  {
8078
8495
  borderColor: selected ? theme.colors.accent : theme.colors.border,
8079
8496
  backgroundColor: selected ? theme.colors.accent : "transparent"
@@ -8086,7 +8503,7 @@ function UserRow({
8086
8503
  }
8087
8504
  );
8088
8505
  }
8089
- var styles32 = StyleSheet.create({
8506
+ var styles33 = StyleSheet.create({
8090
8507
  modalRoot: {
8091
8508
  flex: 1,
8092
8509
  justifyContent: "flex-end"
@@ -8357,7 +8774,7 @@ var PoolseInbox = forwardRef(
8357
8774
  },
8358
8775
  [renderConversationRow, meExternalId, meId, labelFor, avatarFor, unreadCounts, showPresence]
8359
8776
  );
8360
- return /* @__PURE__ */ jsxs(View, { style: [styles33.root, { backgroundColor: theme.colors.background }], children: [
8777
+ return /* @__PURE__ */ jsxs(View, { style: [styles34.root, { backgroundColor: theme.colors.background }], children: [
8361
8778
  /* @__PURE__ */ jsxs(
8362
8779
  Animated.View,
8363
8780
  {
@@ -8368,7 +8785,7 @@ var PoolseInbox = forwardRef(
8368
8785
  View,
8369
8786
  {
8370
8787
  style: [
8371
- styles33.listHeader,
8788
+ styles34.listHeader,
8372
8789
  {
8373
8790
  backgroundColor: theme.colors.surface,
8374
8791
  borderBottomColor: theme.colors.border
@@ -8379,13 +8796,13 @@ var PoolseInbox = forwardRef(
8379
8796
  Text,
8380
8797
  {
8381
8798
  style: [
8382
- styles33.listTitle,
8799
+ styles34.listTitle,
8383
8800
  { color: theme.colors.text, fontFamily: theme.fonts.display }
8384
8801
  ],
8385
8802
  children: title
8386
8803
  }
8387
8804
  ),
8388
- /* @__PURE__ */ jsxs(View, { style: styles33.headerActions, children: [
8805
+ /* @__PURE__ */ jsxs(View, { style: styles34.headerActions, children: [
8389
8806
  users ? /* @__PURE__ */ jsxs(Fragment, { children: [
8390
8807
  /* @__PURE__ */ jsx(
8391
8808
  HeaderIconButton,
@@ -8501,7 +8918,7 @@ function HeaderIconButton({
8501
8918
  hitSlop: 10,
8502
8919
  accessibilityLabel: label,
8503
8920
  style: ({ pressed }) => [
8504
- styles33.iconBtn,
8921
+ styles34.iconBtn,
8505
8922
  {
8506
8923
  backgroundColor: pressed ? theme.colors.surfaceAlt : "transparent"
8507
8924
  }
@@ -8534,7 +8951,7 @@ function DefaultConversationRow({
8534
8951
  {
8535
8952
  onPress,
8536
8953
  style: [
8537
- styles33.row,
8954
+ styles34.row,
8538
8955
  {
8539
8956
  backgroundColor: selected ? theme.colors.surfaceAlt : "transparent",
8540
8957
  borderBottomColor: theme.colors.border
@@ -8551,23 +8968,23 @@ function DefaultConversationRow({
8551
8968
  ...presence ? { presence: presence.state, doNotDisturb: !!presence.do_not_disturb } : {}
8552
8969
  }
8553
8970
  ),
8554
- /* @__PURE__ */ jsxs(View, { style: styles33.rowBody, children: [
8971
+ /* @__PURE__ */ jsxs(View, { style: styles34.rowBody, children: [
8555
8972
  /* @__PURE__ */ jsx(
8556
8973
  Text,
8557
8974
  {
8558
- style: [styles33.rowTitle, { color: theme.colors.text, fontFamily: theme.fonts.body }],
8975
+ style: [styles34.rowTitle, { color: theme.colors.text, fontFamily: theme.fonts.body }],
8559
8976
  numberOfLines: 1,
8560
8977
  children: title
8561
8978
  }
8562
8979
  ),
8563
- /* @__PURE__ */ jsx(Text, { style: [styles33.rowSubtitle, { color: theme.colors.textSubtle }], numberOfLines: 1, children: formatCallLogPreview(conv.last_message_preview, meId) ?? conv.last_message_preview ?? (isDirect ? otherExtId ?? "" : `${(conv.member_external_ids ?? []).length} members`) })
8980
+ /* @__PURE__ */ jsx(Text, { style: [styles34.rowSubtitle, { color: theme.colors.textSubtle }], numberOfLines: 1, children: formatCallLogPreview(conv.last_message_preview, meId) ?? formatRecordingNoticePreview(conv.last_message_preview, meId) ?? conv.last_message_preview ?? (isDirect ? otherExtId ?? "" : `${(conv.member_external_ids ?? []).length} members`) })
8564
8981
  ] }),
8565
- unread > 0 ? /* @__PURE__ */ jsx(View, { style: [styles33.unreadPill, { backgroundColor: theme.colors.badge }], children: /* @__PURE__ */ jsx(Text, { style: [styles33.unreadText, { color: theme.colors.badgeText }], children: unread > 99 ? "99+" : String(unread) }) }) : null
8982
+ unread > 0 ? /* @__PURE__ */ jsx(View, { style: [styles34.unreadPill, { backgroundColor: theme.colors.badge }], children: /* @__PURE__ */ jsx(Text, { style: [styles34.unreadText, { color: theme.colors.badgeText }], children: unread > 99 ? "99+" : String(unread) }) }) : null
8566
8983
  ]
8567
8984
  }
8568
8985
  );
8569
8986
  }
8570
- var styles33 = StyleSheet.create({
8987
+ var styles34 = StyleSheet.create({
8571
8988
  root: {
8572
8989
  flex: 1,
8573
8990
  overflow: "hidden"
@@ -8629,6 +9046,439 @@ var styles33 = StyleSheet.create({
8629
9046
  fontWeight: "700"
8630
9047
  }
8631
9048
  });
9049
+ function LiveTranscriptPanel({
9050
+ callId,
9051
+ enabled = true,
9052
+ showControls = true,
9053
+ onClose,
9054
+ title = "Live transcript",
9055
+ style
9056
+ }) {
9057
+ const theme = useTheme();
9058
+ const live = useLiveTranscript(callId, { enabled });
9059
+ const blocks = useMemo(() => groupTranscript(live.segments), [live.segments]);
9060
+ const scroller = useRef(null);
9061
+ const pinned = useRef(true);
9062
+ const error = live.error ? transcriptError(live.error) : null;
9063
+ const text = { color: theme.colors.text, fontFamily: theme.fonts.body };
9064
+ const subtle = { color: theme.colors.textSubtle, fontFamily: theme.fonts.body };
9065
+ return /* @__PURE__ */ jsxs(View, { style: [styles35.panel, { backgroundColor: theme.colors.surface }, style], children: [
9066
+ /* @__PURE__ */ jsxs(View, { style: [styles35.head, { borderColor: theme.colors.border }], children: [
9067
+ /* @__PURE__ */ jsxs(Text, { style: [styles35.title, text], numberOfLines: 1, accessibilityRole: "header", children: [
9068
+ live.live ? "\u25CF " : "",
9069
+ title
9070
+ ] }),
9071
+ showControls && callId ? /* @__PURE__ */ jsx(
9072
+ Pressable,
9073
+ {
9074
+ onPress: () => void (live.live ? live.stop() : live.start()),
9075
+ disabled: live.pending,
9076
+ accessibilityRole: "button",
9077
+ accessibilityLabel: live.live ? "Stop the transcript" : "Start the transcript",
9078
+ hitSlop: 8,
9079
+ style: ({ pressed }) => [
9080
+ styles35.btn,
9081
+ { backgroundColor: theme.colors.surfaceAlt, borderColor: theme.colors.border },
9082
+ (pressed || live.pending) && styles35.pressed
9083
+ ],
9084
+ children: /* @__PURE__ */ jsx(Text, { style: [styles35.btnText, text], children: live.live ? "Stop" : live.transcript ? "Resume" : "Start" })
9085
+ }
9086
+ ) : null,
9087
+ onClose ? /* @__PURE__ */ jsx(
9088
+ Pressable,
9089
+ {
9090
+ onPress: onClose,
9091
+ accessibilityRole: "button",
9092
+ accessibilityLabel: "Close transcript",
9093
+ hitSlop: 8,
9094
+ children: /* @__PURE__ */ jsx(PoolseIcon, { name: "close", size: 18, color: theme.colors.textMuted, label: null })
9095
+ }
9096
+ ) : null
9097
+ ] }),
9098
+ /* @__PURE__ */ jsx(
9099
+ ScrollView,
9100
+ {
9101
+ ref: scroller,
9102
+ style: styles35.body,
9103
+ contentContainerStyle: styles35.bodyContent,
9104
+ onScroll: (e) => {
9105
+ const { contentOffset, contentSize, layoutMeasurement } = e.nativeEvent;
9106
+ pinned.current = contentSize.height - contentOffset.y - layoutMeasurement.height < 24;
9107
+ },
9108
+ scrollEventThrottle: 100,
9109
+ onContentSizeChange: () => {
9110
+ if (pinned.current) scroller.current?.scrollToEnd({ animated: false });
9111
+ },
9112
+ accessibilityLiveRegion: "polite",
9113
+ children: blocks.length === 0 ? /* @__PURE__ */ jsx(Text, { style: [styles35.empty, subtle], children: error ?? (live.live ? "Listening\u2026" : live.joined ? "Transcription is off. Start it to see what is said." : "Opening the transcript\u2026") }) : blocks.map((b, i) => /* @__PURE__ */ jsxs(View, { style: styles35.block, children: [
9114
+ /* @__PURE__ */ jsxs(View, { style: styles35.who, children: [
9115
+ /* @__PURE__ */ jsx(Text, { style: [styles35.name, text], numberOfLines: 1, children: b.name }),
9116
+ /* @__PURE__ */ jsx(Text, { style: [styles35.time, subtle], children: formatCallDuration(b.startMs) })
9117
+ ] }),
9118
+ /* @__PURE__ */ jsx(Text, { style: [styles35.text, text], children: b.segments.map((s, k) => /* @__PURE__ */ jsxs(Text, { style: s.final ? void 0 : { color: theme.colors.textSubtle }, children: [
9119
+ k > 0 ? " " : "",
9120
+ s.text
9121
+ ] }, k)) })
9122
+ ] }, `${b.speaker}-${b.startMs}-${i}`))
9123
+ }
9124
+ ),
9125
+ error && blocks.length > 0 ? /* @__PURE__ */ jsx(Text, { style: [styles35.error, { color: theme.colors.danger, fontFamily: theme.fonts.body }], children: error }) : null
9126
+ ] });
9127
+ }
9128
+ function TranscriptViewer({
9129
+ callId,
9130
+ canRename = true,
9131
+ onSeek,
9132
+ title = "Transcript",
9133
+ style
9134
+ }) {
9135
+ const theme = useTheme();
9136
+ const { transcript, loading, missing, error, renameSpeakers } = useTranscript(callId);
9137
+ const [query, setQuery] = useState("");
9138
+ const [hit, setHit] = useState(0);
9139
+ const blocks = useMemo(() => groupTranscript(transcript?.segments ?? []), [transcript]);
9140
+ const scroller = useRef(null);
9141
+ const blockY = useRef(/* @__PURE__ */ new Map());
9142
+ const hits = useMemo(() => {
9143
+ const out = [];
9144
+ if (!query.trim()) return out;
9145
+ blocks.forEach(
9146
+ (block, b) => block.segments.forEach((seg, s) => {
9147
+ for (const r of findInText(seg.text, query)) out.push({ b, s, r });
9148
+ })
9149
+ );
9150
+ return out;
9151
+ }, [blocks, query]);
9152
+ const go = (next) => {
9153
+ setHit(next);
9154
+ const target = hits[next];
9155
+ const y = target ? blockY.current.get(target.b) : void 0;
9156
+ if (y !== void 0) scroller.current?.scrollTo({ y: Math.max(0, y - 40), animated: true });
9157
+ };
9158
+ const step = (d) => {
9159
+ if (hits.length) go((hit + d + hits.length) % hits.length);
9160
+ };
9161
+ if (!callId) return null;
9162
+ const text = { color: theme.colors.text, fontFamily: theme.fonts.body };
9163
+ const subtle = { color: theme.colors.textSubtle, fontFamily: theme.fonts.body };
9164
+ const meta = transcript ? [
9165
+ transcript.started_at ? formatDate(transcript.started_at) : null,
9166
+ duration(transcript),
9167
+ transcript.speakers.length === 1 ? "1 speaker" : `${transcript.speakers.length} speakers`
9168
+ ].filter(Boolean).join(" \xB7 ") : null;
9169
+ return /* @__PURE__ */ jsxs(View, { style: [styles35.panel, { backgroundColor: theme.colors.surface }, style], children: [
9170
+ /* @__PURE__ */ jsx(View, { style: [styles35.head, { borderColor: theme.colors.border }], children: /* @__PURE__ */ jsxs(View, { style: styles35.heading, children: [
9171
+ /* @__PURE__ */ jsx(Text, { style: [styles35.title, text], numberOfLines: 1, accessibilityRole: "header", children: title }),
9172
+ meta ? /* @__PURE__ */ jsx(Text, { style: [styles35.meta, subtle], numberOfLines: 1, children: meta }) : null
9173
+ ] }) }),
9174
+ transcript && transcript.segments.length > 0 ? /* @__PURE__ */ jsxs(View, { style: [styles35.search, { backgroundColor: theme.colors.surfaceAlt }], children: [
9175
+ /* @__PURE__ */ jsx(PoolseIcon, { name: "search", size: 15, color: theme.colors.textSubtle, label: null }),
9176
+ /* @__PURE__ */ jsx(
9177
+ TextInput,
9178
+ {
9179
+ value: query,
9180
+ onChangeText: (v) => {
9181
+ setQuery(v);
9182
+ setHit(0);
9183
+ },
9184
+ onSubmitEditing: () => step(1),
9185
+ placeholder: "Search the transcript",
9186
+ placeholderTextColor: theme.colors.textSubtle,
9187
+ accessibilityLabel: "Search the transcript",
9188
+ returnKeyType: "search",
9189
+ style: [styles35.searchInput, text]
9190
+ }
9191
+ ),
9192
+ query.trim() ? /* @__PURE__ */ jsxs(Fragment, { children: [
9193
+ /* @__PURE__ */ jsx(Text, { style: [styles35.count, subtle], accessibilityLiveRegion: "polite", children: hits.length ? `${hit + 1} of ${hits.length}` : "No matches" }),
9194
+ /* @__PURE__ */ jsx(
9195
+ Pressable,
9196
+ {
9197
+ onPress: () => step(-1),
9198
+ disabled: !hits.length,
9199
+ accessibilityRole: "button",
9200
+ accessibilityLabel: "Previous match",
9201
+ hitSlop: 6,
9202
+ children: /* @__PURE__ */ jsx(
9203
+ PoolseIcon,
9204
+ {
9205
+ name: "chevron-up",
9206
+ size: 16,
9207
+ color: theme.colors.textMuted,
9208
+ label: null
9209
+ }
9210
+ )
9211
+ }
9212
+ ),
9213
+ /* @__PURE__ */ jsx(
9214
+ Pressable,
9215
+ {
9216
+ onPress: () => step(1),
9217
+ disabled: !hits.length,
9218
+ accessibilityRole: "button",
9219
+ accessibilityLabel: "Next match",
9220
+ hitSlop: 6,
9221
+ children: /* @__PURE__ */ jsx(
9222
+ PoolseIcon,
9223
+ {
9224
+ name: "chevron-down",
9225
+ size: 16,
9226
+ color: theme.colors.textMuted,
9227
+ label: null
9228
+ }
9229
+ )
9230
+ }
9231
+ )
9232
+ ] }) : null
9233
+ ] }) : null,
9234
+ transcript && transcript.speakers.length > 0 ? /* @__PURE__ */ jsx(
9235
+ SpeakerList,
9236
+ {
9237
+ speakers: transcript.speakers,
9238
+ canRename,
9239
+ onRename: renameSpeakers
9240
+ }
9241
+ ) : null,
9242
+ /* @__PURE__ */ jsx(ScrollView, { ref: scroller, style: styles35.body, contentContainerStyle: styles35.bodyContent, children: loading && !transcript ? /* @__PURE__ */ jsx(Text, { style: [styles35.empty, subtle], children: "Loading the transcript\u2026" }) : missing ? /* @__PURE__ */ jsx(Text, { style: [styles35.empty, subtle], children: "This call has no transcript." }) : error && !transcript ? /* @__PURE__ */ jsx(Text, { style: [styles35.empty, subtle], children: transcriptError(error) }) : transcript && transcript.segments.length === 0 ? /* @__PURE__ */ jsx(Text, { style: [styles35.empty, subtle], children: "Nothing was said in this call." }) : blocks.map((block, b) => /* @__PURE__ */ jsxs(
9243
+ View,
9244
+ {
9245
+ style: styles35.block,
9246
+ onLayout: (e) => blockY.current.set(b, e.nativeEvent.layout.y),
9247
+ children: [
9248
+ /* @__PURE__ */ jsxs(View, { style: styles35.who, children: [
9249
+ /* @__PURE__ */ jsx(Text, { style: [styles35.name, text], numberOfLines: 1, children: block.name }),
9250
+ onSeek ? /* @__PURE__ */ jsx(
9251
+ Pressable,
9252
+ {
9253
+ onPress: () => onSeek(block.startMs),
9254
+ accessibilityRole: "button",
9255
+ accessibilityLabel: `Play from ${formatCallDuration(block.startMs)}`,
9256
+ hitSlop: 6,
9257
+ children: /* @__PURE__ */ jsx(Text, { style: [styles35.time, subtle, styles35.timeLink], children: formatCallDuration(block.startMs) })
9258
+ }
9259
+ ) : /* @__PURE__ */ jsx(Text, { style: [styles35.time, subtle], children: formatCallDuration(block.startMs) })
9260
+ ] }),
9261
+ /* @__PURE__ */ jsx(Text, { style: [styles35.text, text], children: block.segments.map((seg, s) => /* @__PURE__ */ jsxs(Text, { children: [
9262
+ s > 0 ? " " : "",
9263
+ highlight(seg, hits, b, s, hit, theme.colors.warning)
9264
+ ] }, s)) })
9265
+ ]
9266
+ },
9267
+ `${block.speaker}-${block.startMs}-${b}`
9268
+ )) })
9269
+ ] });
9270
+ }
9271
+ function SpeakerList({
9272
+ speakers,
9273
+ canRename,
9274
+ onRename
9275
+ }) {
9276
+ const theme = useTheme();
9277
+ const [editing, setEditing] = useState(null);
9278
+ const [draft, setDraft] = useState("");
9279
+ const [busy, setBusy] = useState(false);
9280
+ const [error, setError] = useState(null);
9281
+ const text = { color: theme.colors.text, fontFamily: theme.fonts.body };
9282
+ const save = async (key, name) => {
9283
+ setBusy(true);
9284
+ setError(null);
9285
+ try {
9286
+ await onRename({ [key]: name });
9287
+ setEditing(null);
9288
+ } catch (err) {
9289
+ setError(
9290
+ err instanceof ApiError && err.status === 403 ? "Only people who were in the call can rename speakers." : err instanceof ApiError && err.code === "validation_failed" ? "Names can be up to 100 characters." : "The name could not be saved. Try again."
9291
+ );
9292
+ } finally {
9293
+ setBusy(false);
9294
+ }
9295
+ };
9296
+ const action = (label, onPress, primary = false) => /* @__PURE__ */ jsx(
9297
+ Pressable,
9298
+ {
9299
+ onPress,
9300
+ disabled: busy,
9301
+ accessibilityRole: "button",
9302
+ accessibilityLabel: label,
9303
+ hitSlop: 6,
9304
+ style: ({ pressed }) => [styles35.renameBtn, (pressed || busy) && styles35.pressed],
9305
+ children: /* @__PURE__ */ jsx(
9306
+ Text,
9307
+ {
9308
+ style: [
9309
+ styles35.renameBtnText,
9310
+ {
9311
+ color: primary ? theme.colors.accentStrong : theme.colors.text,
9312
+ fontFamily: theme.fonts.body
9313
+ }
9314
+ ],
9315
+ children: label
9316
+ }
9317
+ )
9318
+ }
9319
+ );
9320
+ return /* @__PURE__ */ jsxs(View, { style: styles35.speakers, children: [
9321
+ /* @__PURE__ */ jsx(View, { style: styles35.speakerRow, accessibilityLabel: "Speakers", children: speakers.map(
9322
+ (sp) => editing === sp.key ? /* @__PURE__ */ jsxs(View, { style: styles35.rename, children: [
9323
+ /* @__PURE__ */ jsx(
9324
+ TextInput,
9325
+ {
9326
+ value: draft,
9327
+ onChangeText: setDraft,
9328
+ maxLength: 100,
9329
+ autoFocus: true,
9330
+ accessibilityLabel: "Speaker name",
9331
+ onSubmitEditing: () => draft.trim() && void save(sp.key, draft.trim()),
9332
+ style: [
9333
+ styles35.renameInput,
9334
+ text,
9335
+ { borderColor: theme.colors.border, backgroundColor: theme.colors.background }
9336
+ ]
9337
+ }
9338
+ ),
9339
+ action("Save", () => draft.trim() && void save(sp.key, draft.trim()), true),
9340
+ sp.corrected ? action("Use their own name", () => void save(sp.key, null)) : null,
9341
+ action("Cancel", () => setEditing(null))
9342
+ ] }, sp.key) : /* @__PURE__ */ jsxs(
9343
+ View,
9344
+ {
9345
+ style: [styles35.speaker, { backgroundColor: theme.colors.surfaceAlt }],
9346
+ children: [
9347
+ /* @__PURE__ */ jsx(Text, { style: [styles35.speakerName, text], numberOfLines: 1, children: sp.name?.trim() || "Speaker" }),
9348
+ canRename ? /* @__PURE__ */ jsx(
9349
+ Pressable,
9350
+ {
9351
+ onPress: () => {
9352
+ setDraft(sp.name ?? "");
9353
+ setError(null);
9354
+ setEditing(sp.key);
9355
+ },
9356
+ accessibilityRole: "button",
9357
+ accessibilityLabel: `Rename ${sp.name?.trim() || "speaker"}`,
9358
+ hitSlop: 8,
9359
+ style: styles35.speakerEdit,
9360
+ children: /* @__PURE__ */ jsx(PoolseIcon, { name: "edit", size: 13, color: theme.colors.textMuted, label: null })
9361
+ }
9362
+ ) : null
9363
+ ]
9364
+ },
9365
+ sp.key
9366
+ )
9367
+ ) }),
9368
+ error ? /* @__PURE__ */ jsx(Text, { style: [styles35.error, { color: theme.colors.danger, fontFamily: theme.fonts.body }], children: error }) : null
9369
+ ] });
9370
+ }
9371
+ function highlight(seg, hits, b, s, current, color) {
9372
+ const mine = hits.map((h, i) => ({ ...h, i })).filter((h) => h.b === b && h.s === s);
9373
+ if (!mine.length) return seg.text;
9374
+ const out = [];
9375
+ let at = 0;
9376
+ for (const h of mine) {
9377
+ if (h.r[0] > at) out.push(seg.text.slice(at, h.r[0]));
9378
+ out.push(
9379
+ /* @__PURE__ */ jsx(Text, { style: { backgroundColor: hexAlpha(color, h.i === current ? 0.65 : 0.3) }, children: seg.text.slice(h.r[0], h.r[1]) }, h.i)
9380
+ );
9381
+ at = h.r[1];
9382
+ }
9383
+ if (at < seg.text.length) out.push(seg.text.slice(at));
9384
+ return out;
9385
+ }
9386
+ function hexAlpha(color, a) {
9387
+ const m = /^#([0-9a-f]{6})$/i.exec(color);
9388
+ if (!m) return color;
9389
+ const n = parseInt(m[1], 16);
9390
+ return `rgba(${n >> 16 & 255}, ${n >> 8 & 255}, ${n & 255}, ${a})`;
9391
+ }
9392
+ function duration(t) {
9393
+ if (!t.started_at || !t.ended_at) return null;
9394
+ const ms = Date.parse(t.ended_at) - Date.parse(t.started_at);
9395
+ return Number.isFinite(ms) && ms > 0 ? formatCallDuration(ms) : null;
9396
+ }
9397
+ function formatDate(iso) {
9398
+ const d = new Date(iso);
9399
+ if (Number.isNaN(d.getTime())) return null;
9400
+ return d.toLocaleString([], {
9401
+ month: "short",
9402
+ day: "numeric",
9403
+ hour: "numeric",
9404
+ minute: "2-digit"
9405
+ });
9406
+ }
9407
+ function transcriptError(err) {
9408
+ const code = err instanceof ApiError ? err.code : err.message;
9409
+ if (code === "forbidden") return "You can\u2019t open this transcript.";
9410
+ if (code === "not_found") return "There is no transcript for this call.";
9411
+ return captureErrorMessage(err instanceof ApiError ? err : { code });
9412
+ }
9413
+ var styles35 = StyleSheet.create({
9414
+ panel: { flex: 1, minHeight: 0 },
9415
+ pressed: { opacity: 0.6 },
9416
+ head: {
9417
+ flexDirection: "row",
9418
+ alignItems: "center",
9419
+ gap: 8,
9420
+ paddingHorizontal: 12,
9421
+ paddingVertical: 10,
9422
+ borderBottomWidth: StyleSheet.hairlineWidth
9423
+ },
9424
+ heading: { flex: 1, minWidth: 0 },
9425
+ title: { flex: 1, fontSize: 15, fontWeight: "600" },
9426
+ meta: { fontSize: 12, fontWeight: "500" },
9427
+ btn: {
9428
+ paddingHorizontal: 12,
9429
+ paddingVertical: 4,
9430
+ borderRadius: 999,
9431
+ borderWidth: StyleSheet.hairlineWidth
9432
+ },
9433
+ btnText: { fontSize: 12, fontWeight: "600" },
9434
+ search: {
9435
+ flexDirection: "row",
9436
+ alignItems: "center",
9437
+ gap: 6,
9438
+ marginHorizontal: 12,
9439
+ marginTop: 8,
9440
+ paddingLeft: 10,
9441
+ paddingRight: 6,
9442
+ borderRadius: 12
9443
+ },
9444
+ searchInput: { flex: 1, minWidth: 0, paddingVertical: 8, fontSize: 14 },
9445
+ count: { fontSize: 12, fontWeight: "500", fontVariant: ["tabular-nums"] },
9446
+ speakers: { paddingHorizontal: 12, paddingTop: 8 },
9447
+ speakerRow: { flexDirection: "row", flexWrap: "wrap", gap: 6 },
9448
+ speaker: {
9449
+ flexDirection: "row",
9450
+ alignItems: "center",
9451
+ maxWidth: "100%",
9452
+ paddingLeft: 10,
9453
+ paddingRight: 4,
9454
+ paddingVertical: 3,
9455
+ borderRadius: 999
9456
+ },
9457
+ speakerName: { flexShrink: 1, maxWidth: 220, fontSize: 12, fontWeight: "500" },
9458
+ speakerEdit: { padding: 4 },
9459
+ rename: { flexDirection: "row", flexWrap: "wrap", alignItems: "center", gap: 4, width: "100%" },
9460
+ renameInput: {
9461
+ flexGrow: 1,
9462
+ minWidth: 140,
9463
+ paddingHorizontal: 8,
9464
+ paddingVertical: 6,
9465
+ fontSize: 13,
9466
+ borderRadius: 8,
9467
+ borderWidth: StyleSheet.hairlineWidth
9468
+ },
9469
+ renameBtn: { paddingHorizontal: 8, paddingVertical: 6 },
9470
+ renameBtnText: { fontSize: 12, fontWeight: "600" },
9471
+ body: { flex: 1 },
9472
+ bodyContent: { paddingHorizontal: 12, paddingTop: 8, paddingBottom: 12 },
9473
+ empty: { marginVertical: 24, textAlign: "center", fontSize: 14 },
9474
+ block: { paddingVertical: 6 },
9475
+ who: { flexDirection: "row", alignItems: "baseline", gap: 8, minWidth: 0 },
9476
+ name: { flexShrink: 1, fontSize: 13, fontWeight: "600" },
9477
+ time: { fontSize: 11, fontWeight: "500", fontVariant: ["tabular-nums"] },
9478
+ timeLink: { textDecorationLine: "underline" },
9479
+ text: { marginTop: 2, fontSize: 14, lineHeight: 21 },
9480
+ error: { marginHorizontal: 12, marginVertical: 6, fontSize: 13, fontWeight: "500" }
9481
+ });
8632
9482
  var TILE_PATH = "M50 4 C20 4 4 20 4 50 C4 80 20 96 50 96 C80 96 96 80 96 50 C96 20 80 4 50 4 Z";
8633
9483
  var PULSE_PATH = "M16 55 H34 L40 55 L47 30 L54 73 L60 55 H72";
8634
9484
  var WORDMARK_P_PATH = "M62 -169V258V528H194L196 378L214 376Q223 432 246.0 469.0Q269 506 305.5 524.0Q342 542 389 542Q459 542 509.5 508.0Q560 474 587.0 411.0Q614 348 614 260Q614 182 590.5 120.0Q567 58 519.5 22.0Q472 -14 399 -14Q350 -14 316.0 3.5Q282 21 258.5 55.0Q235 89 219 140H200Q206 113 211.0 85.0Q216 57 219.5 31.0Q223 5 223 -19V-169ZM340 113Q373 113 396.5 131.0Q420 149 433.0 182.0Q446 215 446 259Q446 306 432.5 339.5Q419 373 394.0 391.5Q369 410 336 410Q305 410 283.5 396.5Q262 383 248.5 361.5Q235 340 229.0 316.0Q223 292 223 271V249Q223 230 228.0 211.0Q233 192 243.0 174.5Q253 157 267.0 143.0Q281 129 299.5 121.0Q318 113 340 113Z";
@@ -8798,7 +9648,7 @@ function CallControlButton({
8798
9648
  const size = large ? CONTROL_SIZE_LARGE : CONTROL_SIZE;
8799
9649
  const background = tone === "danger" ? callColors.danger : tone === "accept" ? callColors.accept : active ? callColors.controlActive : callColors.control;
8800
9650
  const iconColor = tone === "neutral" && active ? callColors.controlActiveIcon : callColors.onAction;
8801
- return /* @__PURE__ */ jsxs(View, { style: styles34.slot, children: [
9651
+ return /* @__PURE__ */ jsxs(View, { style: styles36.slot, children: [
8802
9652
  /* @__PURE__ */ jsx(
8803
9653
  Pressable,
8804
9654
  {
@@ -8809,7 +9659,7 @@ function CallControlButton({
8809
9659
  accessibilityLabel: accessibilityLabel ?? label ?? icon,
8810
9660
  hitSlop: 8,
8811
9661
  style: ({ pressed }) => [
8812
- styles34.button,
9662
+ styles36.button,
8813
9663
  {
8814
9664
  width: size,
8815
9665
  height: size,
@@ -8823,10 +9673,10 @@ function CallControlButton({
8823
9673
  children: /* @__PURE__ */ jsx(PoolseIcon, { name: icon, size: large ? 30 : 25, color: iconColor, label: null })
8824
9674
  }
8825
9675
  ),
8826
- label ? /* @__PURE__ */ jsx(Text, { numberOfLines: 1, style: styles34.label, children: label }) : null
9676
+ label ? /* @__PURE__ */ jsx(Text, { numberOfLines: 1, style: styles36.label, children: label }) : null
8827
9677
  ] });
8828
9678
  }
8829
- var styles34 = StyleSheet.create({
9679
+ var styles36 = StyleSheet.create({
8830
9680
  // Fixed width so captions of different lengths cannot shift the row.
8831
9681
  slot: { width: 76, alignItems: "center", gap: 7 },
8832
9682
  button: { alignItems: "center", justifyContent: "center" },
@@ -8839,7 +9689,7 @@ function CallAvatar({ name, seed, size, speaking = false }) {
8839
9689
  View,
8840
9690
  {
8841
9691
  style: [
8842
- styles35.ring,
9692
+ styles37.ring,
8843
9693
  {
8844
9694
  width: outer,
8845
9695
  height: outer,
@@ -8852,7 +9702,7 @@ function CallAvatar({ name, seed, size, speaking = false }) {
8852
9702
  View,
8853
9703
  {
8854
9704
  style: [
8855
- styles35.circle,
9705
+ styles37.circle,
8856
9706
  {
8857
9707
  width: size,
8858
9708
  height: size,
@@ -8863,7 +9713,7 @@ function CallAvatar({ name, seed, size, speaking = false }) {
8863
9713
  children: /* @__PURE__ */ jsx(
8864
9714
  Text,
8865
9715
  {
8866
- style: [styles35.initials, { fontSize: Math.round(size * 0.38) }],
9716
+ style: [styles37.initials, { fontSize: Math.round(size * 0.38) }],
8867
9717
  numberOfLines: 1,
8868
9718
  allowFontScaling: false,
8869
9719
  children: initialsOf(name)
@@ -8880,7 +9730,7 @@ function initialsOf(name) {
8880
9730
  if (parts.length === 1) return parts[0].slice(0, 2).toUpperCase();
8881
9731
  return (parts[0][0] + parts[parts.length - 1][0]).toUpperCase();
8882
9732
  }
8883
- var styles35 = StyleSheet.create({
9733
+ var styles37 = StyleSheet.create({
8884
9734
  ring: { alignItems: "center", justifyContent: "center" },
8885
9735
  circle: { alignItems: "center", justifyContent: "center" },
8886
9736
  initials: { color: "#ffffff", fontWeight: "600" }
@@ -8908,15 +9758,15 @@ function AudioRouteSheet({
8908
9758
  animationType: "fade",
8909
9759
  onRequestClose: onClose,
8910
9760
  ...EDGE_TO_EDGE_MODAL,
8911
- children: /* @__PURE__ */ jsx(Pressable, { style: styles36.backdrop, onPress: onClose, accessibilityRole: "button", children: /* @__PURE__ */ jsxs(
9761
+ children: /* @__PURE__ */ jsx(Pressable, { style: styles38.backdrop, onPress: onClose, accessibilityRole: "button", children: /* @__PURE__ */ jsxs(
8912
9762
  Pressable,
8913
9763
  {
8914
- style: [styles36.sheet, { paddingBottom: Math.max(34, insets.bottom + 16) }],
9764
+ style: [styles38.sheet, { paddingBottom: Math.max(34, insets.bottom + 16) }],
8915
9765
  onPress: () => {
8916
9766
  },
8917
9767
  children: [
8918
- /* @__PURE__ */ jsx(View, { style: styles36.grabber }),
8919
- /* @__PURE__ */ jsx(Text, { style: styles36.title, children: "Audio output" }),
9768
+ /* @__PURE__ */ jsx(View, { style: styles38.grabber }),
9769
+ /* @__PURE__ */ jsx(Text, { style: styles38.title, children: "Audio output" }),
8920
9770
  routes.map((route) => {
8921
9771
  const selected = route.id === selectedRouteId;
8922
9772
  return /* @__PURE__ */ jsxs(
@@ -8928,7 +9778,7 @@ function AudioRouteSheet({
8928
9778
  },
8929
9779
  accessibilityRole: "button",
8930
9780
  accessibilityState: { selected },
8931
- style: ({ pressed }) => [styles36.row, pressed && styles36.rowPressed],
9781
+ style: ({ pressed }) => [styles38.row, pressed && styles38.rowPressed],
8932
9782
  children: [
8933
9783
  /* @__PURE__ */ jsx(
8934
9784
  PoolseIcon,
@@ -8939,7 +9789,7 @@ function AudioRouteSheet({
8939
9789
  label: null
8940
9790
  }
8941
9791
  ),
8942
- /* @__PURE__ */ jsx(Text, { style: [styles36.label, selected && styles36.labelSelected], children: route.label }),
9792
+ /* @__PURE__ */ jsx(Text, { style: [styles38.label, selected && styles38.labelSelected], children: route.label }),
8943
9793
  selected && /* @__PURE__ */ jsx(PoolseIcon, { name: "check", size: 19, color: callColors.accept, label: "selected" })
8944
9794
  ]
8945
9795
  },
@@ -8952,7 +9802,7 @@ function AudioRouteSheet({
8952
9802
  }
8953
9803
  );
8954
9804
  }
8955
- var styles36 = StyleSheet.create({
9805
+ var styles38 = StyleSheet.create({
8956
9806
  backdrop: { flex: 1, backgroundColor: "rgba(0,0,0,0.55)", justifyContent: "flex-end" },
8957
9807
  sheet: {
8958
9808
  backgroundColor: callColors.tile,
@@ -9012,6 +9862,6 @@ function format(total) {
9012
9862
  return `${hours > 0 ? `${hours}:` : ""}${mm}:${String(seconds).padStart(2, "0")}`;
9013
9863
  }
9014
9864
 
9015
- export { AttachmentPicker, AttachmentPreview, AudioRouteSheet, Avatar, CallAvatar, CallControlButton, CallLogRow, ChatHeader, ConversationList, ConversationView, DaySeparator, EditHistorySheet, EmojiPicker, EmptyState, GroupDetailsSheet, ImageMosaic, LinkPreviewCard, LiveCallBanner, MemberList, MentionInput, MessageActions, MessageBubble, MessageComposer, MessageList, MessageRow, NewMessagesDivider, PoolseIcon, PoolseInbox, PoolseLogo, PoolseTheme, PresenceBadge, primitives as Primitives, ReactionPicker, ReactionStrip, SendStatus, ThreadSummary, ThreadView, TypingIndicator, UploadQueueStrip, UserName, applyBackground, callColors, defaultDarkTheme, defaultLightTheme, useAppStateLifecycle, useAppStatePresence, useBackgroundClients, useCallDuration, useDisplayName, usePoolseTheme, useTheme };
9865
+ export { AttachmentPicker, AttachmentPreview, AudioRouteSheet, Avatar, CallAvatar, CallControlButton, CallLogRow, ChatHeader, ConsentPrompt, ConversationList, ConversationView, DaySeparator, EditHistorySheet, EmojiPicker, EmptyState, GroupDetailsSheet, ImageMosaic, LinkPreviewCard, LiveCallBanner, LiveTranscriptPanel, MemberList, MentionInput, MessageActions, MessageBubble, MessageComposer, MessageList, MessageRow, NewMessagesDivider, PoolseIcon, PoolseInbox, PoolseLogo, PoolseTheme, PresenceBadge, primitives as Primitives, ReactionPicker, ReactionStrip, RecordingBanner, RecordingIndicator, RecordingNoticeRow, SendStatus, ThreadSummary, ThreadView, TranscriptViewer, TypingIndicator, UploadQueueStrip, UserName, applyBackground, callColors, defaultDarkTheme, defaultLightTheme, useAppStateLifecycle, useAppStatePresence, useBackgroundClients, useCallDuration, useDisplayName, usePoolseTheme, useTheme };
9016
9866
  //# sourceMappingURL=index.js.map
9017
9867
  //# sourceMappingURL=index.js.map