sceyt-chat-react-uikit 1.7.8-beta.9 → 1.7.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.modern.js CHANGED
@@ -9027,6 +9027,29 @@ var handleVoteDetails = function handleVoteDetails(voteDetails, message) {
9027
9027
  voteDetails: newVoteDetails
9028
9028
  });
9029
9029
  };
9030
+ var _extractTextFromReactElement = function extractTextFromReactElement(element) {
9031
+ if (typeof element === 'string') {
9032
+ return element;
9033
+ }
9034
+ if (element === null || element === undefined) {
9035
+ return '';
9036
+ }
9037
+ if (Array.isArray(element)) {
9038
+ return element.map(_extractTextFromReactElement).join('');
9039
+ }
9040
+ if (typeof element === 'object' && element.props) {
9041
+ if (typeof element.props.children === 'string') {
9042
+ return element.props.children;
9043
+ }
9044
+ if (Array.isArray(element.props.children)) {
9045
+ return element.props.children.map(_extractTextFromReactElement).join('');
9046
+ }
9047
+ if (element.props.children) {
9048
+ return _extractTextFromReactElement(element.props.children);
9049
+ }
9050
+ }
9051
+ return '';
9052
+ };
9030
9053
  var checkIsTypeKeyPressed = function checkIsTypeKeyPressed(code) {
9031
9054
  return !(code === 'Enter' || code === 'NumpadEnter' || code === 'Backspace' || code === 'Delete' || code === 'ArrowLeft' || code === 'ArrowRight' || code === 'ArrowUp' || code === 'ArrowDown' || code === 'PageUp' || code === 'PageDown' || code === 'Home' || code === 'End' || code === 'Insert' || code === 'Escape' || code === 'Tab' || code === 'F1' || code === 'F2' || code === 'F3' || code === 'F4' || code === 'F5' || code === 'F6' || code === 'F7' || code === 'F8' || code === 'F9' || code === 'F10' || code === 'F11' || code === 'F12' || code === 'CapsLock' || code === 'Shift' || code === 'ShiftLeft' || code === 'ShiftRight' || code === 'Control' || code === 'ControlLeft' || code === 'ControlRight' || code === 'Alt' || code === 'AltLeft' || code === 'AltRight' || code === 'MetaLeft' || code === 'MetaRight' || code === 'Space' || code === 'Enter' || code === 'NumpadEnter' || code === 'Backspace' || code === 'Delete' || code === 'ArrowLeft' || code === 'ArrowRight' || code === 'ArrowUp' || code === 'ArrowDown' || code === 'PageUp' || code === 'PageDown' || code === 'Home' || code === 'End' || code === 'Insert' || code === 'Escape' || code === 'Tab' || code === 'F1' || code === 'F2' || code === 'F3' || code === 'F4' || code === 'F5' || code === 'F6' || code === 'F7' || code === 'F8' || code === 'F9' || code === 'F10' || code === 'F11' || code === 'F12' || code === 'Shift');
9032
9055
  };
@@ -9333,7 +9356,11 @@ var initialState = {
9333
9356
  draggedAttachments: [],
9334
9357
  draftIsRemoved: '',
9335
9358
  channelInviteKeys: {},
9336
- joinableChannel: null
9359
+ joinableChannel: null,
9360
+ channelInviteKeyAvailable: true,
9361
+ mutualChannels: [],
9362
+ mutualChannelsHasNext: false,
9363
+ mutualChannelsLoadingState: null
9337
9364
  };
9338
9365
  var channelSlice = createSlice({
9339
9366
  name: 'channels',
@@ -9639,6 +9666,22 @@ var channelSlice = createSlice({
9639
9666
  },
9640
9667
  setJoinableChannel: function setJoinableChannel(state, action) {
9641
9668
  state.joinableChannel = action.payload.channel;
9669
+ },
9670
+ setChannelInviteKeyAvailable: function setChannelInviteKeyAvailable(state, action) {
9671
+ state.channelInviteKeyAvailable = action.payload.available;
9672
+ },
9673
+ setMutualChannels: function setMutualChannels(state, action) {
9674
+ if (action.payload.channels.length === 0 && state.mutualChannels.length > 0) {
9675
+ state.mutualChannels = [];
9676
+ } else {
9677
+ state.mutualChannels = [].concat(state.mutualChannels, action.payload.channels);
9678
+ }
9679
+ },
9680
+ setMutualChannelsHasNext: function setMutualChannelsHasNext(state, action) {
9681
+ state.mutualChannelsHasNext = action.payload.hasNext;
9682
+ },
9683
+ setMutualChannelsLoadingState: function setMutualChannelsLoadingState(state, action) {
9684
+ state.mutualChannelsLoadingState = action.payload.state;
9642
9685
  }
9643
9686
  },
9644
9687
  extraReducers: function extraReducers(builder) {
@@ -9683,7 +9726,11 @@ var _channelSlice$actions = channelSlice.actions,
9683
9726
  setHideChannelList = _channelSlice$actions.setHideChannelList,
9684
9727
  setDraftIsRemoved = _channelSlice$actions.setDraftIsRemoved,
9685
9728
  setChannelInviteKeys = _channelSlice$actions.setChannelInviteKeys,
9686
- setJoinableChannel = _channelSlice$actions.setJoinableChannel;
9729
+ setJoinableChannel = _channelSlice$actions.setJoinableChannel,
9730
+ setChannelInviteKeyAvailable = _channelSlice$actions.setChannelInviteKeyAvailable,
9731
+ setMutualChannels = _channelSlice$actions.setMutualChannels,
9732
+ setMutualChannelsHasNext = _channelSlice$actions.setMutualChannelsHasNext,
9733
+ setMutualChannelsLoadingState = _channelSlice$actions.setMutualChannelsLoadingState;
9687
9734
  var ChannelReducer = channelSlice.reducer;
9688
9735
 
9689
9736
  var CREATE_CHANNEL = 'CREATE_CHANNEL';
@@ -9723,6 +9770,8 @@ var DESTROY_SESSION = 'DESTROY_SESSION';
9723
9770
  var GET_CHANNEL_BY_INVITE_KEY = 'GET_CHANNEL_BY_INVITE_KEY';
9724
9771
  var JOIN_TO_CHANNEL_WITH_INVITE_KEY = 'JOIN_TO_CHANNEL_WITH_INVITE_KEY';
9725
9772
  var SET_MESSAGE_RETENTION_PERIOD = 'SET_MESSAGE_RETENTION_PERIOD';
9773
+ var GET_CHANNELS_WITH_USER = 'GET_CHANNELS_WITH_USER';
9774
+ var LOAD_MORE_MUTUAL_CHANNELS = 'LOAD_MORE_MUTUAL_CHANNELS';
9726
9775
  var CHANNEL_EVENT_TYPES = {
9727
9776
  POLL_ADDED: 'POLL_ADDED',
9728
9777
  POLL_DELETED: 'POLL_DELETED',
@@ -9743,10 +9792,6 @@ var CHANNEL_EVENT_TYPES = {
9743
9792
  REACTION_ADDED: 'REACTION_ADDED',
9744
9793
  REACTION_DELETED: 'REACTION_DELETED',
9745
9794
  EDIT_MESSAGE: 'EDIT_MESSAGE',
9746
- START_TYPING: 'START_TYPING',
9747
- STOP_TYPING: 'STOP_TYPING',
9748
- START_RECORDING: 'START_RECORDING',
9749
- STOP_RECORDING: 'STOP_RECORDING',
9750
9795
  MESSAGE_MARKERS_RECEIVED: 'MESSAGE_MARKERS_RECEIVED',
9751
9796
  UNREAD_MESSAGES_INFO: 'UNREAD_MESSAGES_INFO',
9752
9797
  HIDE: 'HIDE',
@@ -11976,7 +12021,13 @@ var initialState$2 = {
11976
12021
  activeChannelMembers: [],
11977
12022
  roles: [],
11978
12023
  getRolesFail: undefined,
11979
- rolesMap: {}
12024
+ rolesMap: {},
12025
+ restricted: {
12026
+ isRestricted: false,
12027
+ fromChannel: false,
12028
+ members: []
12029
+ },
12030
+ openInviteModal: false
11980
12031
  };
11981
12032
  var memberSlice = createSlice({
11982
12033
  name: 'members',
@@ -12059,6 +12110,18 @@ var memberSlice = createSlice({
12059
12110
  },
12060
12111
  setMembersHasNext: function setMembersHasNext(state, action) {
12061
12112
  state.membersHasNext = action.payload.hasNext;
12113
+ },
12114
+ setActionIsRestricted: function setActionIsRestricted(state, action) {
12115
+ var _action$payload2 = action.payload,
12116
+ isRestricted = _action$payload2.isRestricted,
12117
+ fromChannel = _action$payload2.fromChannel,
12118
+ members = _action$payload2.members;
12119
+ state.restricted.isRestricted = isRestricted;
12120
+ state.restricted.fromChannel = fromChannel;
12121
+ state.restricted.members = members;
12122
+ },
12123
+ setOpenInviteModal: function setOpenInviteModal(state, action) {
12124
+ state.openInviteModal = action.payload.open;
12062
12125
  }
12063
12126
  },
12064
12127
  extraReducers: function extraReducers(builder) {
@@ -12076,7 +12139,9 @@ var _memberSlice$actions = memberSlice.actions,
12076
12139
  setMembersLoadingState = _memberSlice$actions.setMembersLoadingState,
12077
12140
  getRolesSuccess = _memberSlice$actions.getRolesSuccess,
12078
12141
  getRolesFail = _memberSlice$actions.getRolesFail,
12079
- setMembersHasNext = _memberSlice$actions.setMembersHasNext;
12142
+ setMembersHasNext = _memberSlice$actions.setMembersHasNext,
12143
+ setActionIsRestricted = _memberSlice$actions.setActionIsRestricted,
12144
+ setOpenInviteModal = _memberSlice$actions.setOpenInviteModal;
12080
12145
  var MembersReducer = memberSlice.reducer;
12081
12146
 
12082
12147
  var SET_CONTACT_LOADING_STATE = 'SET_CONTACT_LOADING_STATE';
@@ -12139,7 +12204,7 @@ var userSlice = createSlice({
12139
12204
  state.usersLoadingState = action.payload.state;
12140
12205
  },
12141
12206
  updateUserMap: function updateUserMap(state, action) {
12142
- state.updatedUserMap = action.payload.usersMap;
12207
+ state.updatedUserMap = _extends({}, state.updatedUserMap, action.payload.usersMap);
12143
12208
  },
12144
12209
  setContacts: function setContacts(state, action) {
12145
12210
  var contacts = action.payload.contacts;
@@ -12569,6 +12634,11 @@ var switchChannelActionAC = function switchChannelActionAC(channel, updateActive
12569
12634
  }
12570
12635
  };
12571
12636
  };
12637
+ var setChannelInviteKeyAvailableAC = function setChannelInviteKeyAvailableAC(available) {
12638
+ return setChannelInviteKeyAvailable({
12639
+ available: available
12640
+ });
12641
+ };
12572
12642
  var updateChannelAC = function updateChannelAC(channelId, config) {
12573
12643
  return {
12574
12644
  type: UPDATE_CHANNEL,
@@ -12868,6 +12938,37 @@ var setMessageRetentionPeriodAC = function setMessageRetentionPeriodAC(channelId
12868
12938
  }
12869
12939
  };
12870
12940
  };
12941
+ var getChannelsWithUserAC = function getChannelsWithUserAC(userId) {
12942
+ return {
12943
+ type: GET_CHANNELS_WITH_USER,
12944
+ payload: {
12945
+ userId: userId
12946
+ }
12947
+ };
12948
+ };
12949
+ var setMutualChannelsAC = function setMutualChannelsAC(channels) {
12950
+ return setMutualChannels({
12951
+ channels: channels
12952
+ });
12953
+ };
12954
+ var setMutualChannelsHasNextAC = function setMutualChannelsHasNextAC(hasNext) {
12955
+ return setMutualChannelsHasNext({
12956
+ hasNext: hasNext
12957
+ });
12958
+ };
12959
+ var setMutualChannelsLoadingStateAC = function setMutualChannelsLoadingStateAC(state) {
12960
+ return setMutualChannelsLoadingState({
12961
+ state: state
12962
+ });
12963
+ };
12964
+ var loadMoreMutualChannelsAC = function loadMoreMutualChannelsAC(limit) {
12965
+ return {
12966
+ type: LOAD_MORE_MUTUAL_CHANNELS,
12967
+ payload: {
12968
+ limit: limit
12969
+ }
12970
+ };
12971
+ };
12871
12972
 
12872
12973
  var getUsersAC = function getUsersAC(params) {
12873
12974
  return {
@@ -13277,6 +13378,18 @@ var setMembersHasNextAC = function setMembersHasNextAC(hasNext) {
13277
13378
  hasNext: hasNext
13278
13379
  });
13279
13380
  };
13381
+ var setActionIsRestrictedAC = function setActionIsRestrictedAC(isRestricted, fromChannel, members) {
13382
+ return setActionIsRestricted({
13383
+ isRestricted: isRestricted,
13384
+ fromChannel: fromChannel,
13385
+ members: members || []
13386
+ });
13387
+ };
13388
+ var setOpenInviteModalAC = function setOpenInviteModalAC(open) {
13389
+ return setOpenInviteModal({
13390
+ open: open
13391
+ });
13392
+ };
13280
13393
 
13281
13394
  var connectionStatusSelector = function connectionStatusSelector(store) {
13282
13395
  return store.UserReducer.connectionStatus;
@@ -13299,6 +13412,9 @@ var usersLoadingStateSelector = function usersLoadingStateSelector(store) {
13299
13412
  var browserTabIsActiveSelector = function browserTabIsActiveSelector(store) {
13300
13413
  return store.UserReducer.browserTabIsActive;
13301
13414
  };
13415
+ var usersMapSelector = function usersMapSelector(store) {
13416
+ return store.UserReducer.updatedUserMap;
13417
+ };
13302
13418
 
13303
13419
  var _path;
13304
13420
  function _extends$1() {
@@ -14026,6 +14142,15 @@ var MessageStatusIcon = function MessageStatusIcon(_ref) {
14026
14142
  size = _ref.size,
14027
14143
  accentColor = _ref.accentColor;
14028
14144
  switch (messageStatus) {
14145
+ case MESSAGE_DELIVERY_STATUS.PLAYED:
14146
+ return messageStatusDisplayingType === 'ticks' ? (/*#__PURE__*/React__default.createElement(ReadIconWrapper, {
14147
+ width: size,
14148
+ height: size,
14149
+ color: readIconColor || accentColor
14150
+ })) : (/*#__PURE__*/React__default.createElement(StatusText, {
14151
+ fontSize: size,
14152
+ color: color
14153
+ }, "\u2022 Seen"));
14029
14154
  case MESSAGE_DELIVERY_STATUS.READ:
14030
14155
  return messageStatusDisplayingType === 'ticks' ? (/*#__PURE__*/React__default.createElement(ReadIconWrapper, {
14031
14156
  width: size,
@@ -14221,6 +14346,147 @@ var MessageTextFormat = function MessageTextFormat(_ref2) {
14221
14346
  return text;
14222
14347
  }
14223
14348
  };
14349
+ var _getNodeTextLength = function getNodeTextLength(node) {
14350
+ if (!node) return 0;
14351
+ if (typeof node === 'string') return node.length;
14352
+ if (typeof node === 'number') return String(node).length;
14353
+ if (Array.isArray(node)) {
14354
+ return node.reduce(function (sum, child) {
14355
+ return sum + _getNodeTextLength(child);
14356
+ }, 0);
14357
+ }
14358
+ if (node.props && node.props.children) {
14359
+ return _getNodeTextLength(node.props.children);
14360
+ }
14361
+ return 0;
14362
+ };
14363
+ var _truncateNodeText3 = function truncateNodeText(node, maxLength) {
14364
+ if (!node) return {
14365
+ node: node,
14366
+ usedLength: 0
14367
+ };
14368
+ if (typeof node === 'string') {
14369
+ if (node.length > maxLength) {
14370
+ return {
14371
+ node: node.slice(0, maxLength),
14372
+ usedLength: maxLength
14373
+ };
14374
+ }
14375
+ return {
14376
+ node: node,
14377
+ usedLength: node.length
14378
+ };
14379
+ }
14380
+ if (typeof node === 'number') {
14381
+ var str = String(node);
14382
+ if (str.length > maxLength) {
14383
+ return {
14384
+ node: str.slice(0, maxLength),
14385
+ usedLength: maxLength
14386
+ };
14387
+ }
14388
+ return {
14389
+ node: node,
14390
+ usedLength: str.length
14391
+ };
14392
+ }
14393
+ if (Array.isArray(node)) {
14394
+ var result = [];
14395
+ var remaining = maxLength;
14396
+ for (var _iterator = _createForOfIteratorHelperLoose(node), _step; !(_step = _iterator()).done;) {
14397
+ var child = _step.value;
14398
+ if (remaining <= 0) break;
14399
+ var _truncateNodeText = _truncateNodeText3(child, remaining),
14400
+ truncatedChild = _truncateNodeText.node,
14401
+ usedLength = _truncateNodeText.usedLength;
14402
+ result.push(truncatedChild);
14403
+ remaining -= usedLength;
14404
+ }
14405
+ return {
14406
+ node: result,
14407
+ usedLength: maxLength - remaining
14408
+ };
14409
+ }
14410
+ if (node.props && node.props.children !== undefined) {
14411
+ var _truncateNodeText2 = _truncateNodeText3(node.props.children, maxLength),
14412
+ truncatedChildren = _truncateNodeText2.node,
14413
+ _usedLength = _truncateNodeText2.usedLength;
14414
+ return {
14415
+ node: _extends({}, node, {
14416
+ props: _extends({}, node.props, {
14417
+ children: truncatedChildren
14418
+ })
14419
+ }),
14420
+ usedLength: _usedLength
14421
+ };
14422
+ }
14423
+ return {
14424
+ node: node,
14425
+ usedLength: 0
14426
+ };
14427
+ };
14428
+ var trimReactMessage = function trimReactMessage(parts, limit) {
14429
+ if (typeof limit !== 'number' || limit < 0) {
14430
+ return {
14431
+ result: parts,
14432
+ truncated: false
14433
+ };
14434
+ }
14435
+ if (typeof parts === 'string') {
14436
+ if (parts.length > limit) {
14437
+ return {
14438
+ result: parts.slice(0, limit) + '...',
14439
+ truncated: true
14440
+ };
14441
+ }
14442
+ return {
14443
+ result: parts,
14444
+ truncated: false
14445
+ };
14446
+ }
14447
+ var remaining = limit;
14448
+ var truncated = false;
14449
+ var result = [];
14450
+ for (var _iterator2 = _createForOfIteratorHelperLoose(parts), _step2; !(_step2 = _iterator2()).done;) {
14451
+ var part = _step2.value;
14452
+ if (typeof part === 'string') {
14453
+ if (remaining <= 0) {
14454
+ truncated = true;
14455
+ break;
14456
+ }
14457
+ if (part.length > remaining) {
14458
+ result.push(part.slice(0, remaining));
14459
+ remaining = 0;
14460
+ truncated = true;
14461
+ break;
14462
+ } else {
14463
+ result.push(part);
14464
+ remaining -= part.length;
14465
+ }
14466
+ } else if (part && typeof part === 'object') {
14467
+ if (remaining <= 0) {
14468
+ truncated = true;
14469
+ break;
14470
+ }
14471
+ var nodeTextLength = _getNodeTextLength(part);
14472
+ if (nodeTextLength > remaining) {
14473
+ var _truncateNodeText4 = _truncateNodeText3(part, remaining),
14474
+ truncatedNode = _truncateNodeText4.node;
14475
+ result.push(truncatedNode);
14476
+ remaining = 0;
14477
+ truncated = true;
14478
+ break;
14479
+ } else {
14480
+ result.push(part);
14481
+ remaining -= nodeTextLength;
14482
+ }
14483
+ }
14484
+ }
14485
+ return {
14486
+ result: result,
14487
+ truncated: truncated
14488
+ };
14489
+ };
14224
14490
 
14225
14491
  var _marked = /*#__PURE__*/_regenerator().m(updateActiveChannelMembersAdd),
14226
14492
  _marked2 = /*#__PURE__*/_regenerator().m(updateActiveChannelMembersRemove);
@@ -15446,7 +15712,7 @@ function watchForEvents() {
15446
15712
  }
15447
15713
  return _context.a(3, 183);
15448
15714
  case 99:
15449
- console.log('CHANNEL_EVENT_TYPES.POLL_ADDED ... ');
15715
+ log.info('CHANNEL_EVENT_TYPES.POLL_ADDED ... ');
15450
15716
  _channel10 = args.channel, pollDetails = args.pollDetails, _messageId = args.messageId;
15451
15717
  pollDetailsData = pollDetails;
15452
15718
  _context.n = 100;
@@ -15531,7 +15797,7 @@ function watchForEvents() {
15531
15797
  case 108:
15532
15798
  return _context.a(3, 183);
15533
15799
  case 109:
15534
- console.log('CHANNEL_EVENT_TYPES.POLL_DELETED ... ');
15800
+ log.info('CHANNEL_EVENT_TYPES.POLL_DELETED ... ');
15535
15801
  _channel11 = args.channel, _pollDetails = args.pollDetails, _messageId2 = args.messageId;
15536
15802
  _pollDetailsData = _pollDetails;
15537
15803
  _context.n = 110;
@@ -15591,7 +15857,7 @@ function watchForEvents() {
15591
15857
  case 116:
15592
15858
  return _context.a(3, 183);
15593
15859
  case 117:
15594
- console.log('CHANNEL_EVENT_TYPES.POLL_RETRACTED ... ');
15860
+ log.info('CHANNEL_EVENT_TYPES.POLL_RETRACTED ... ');
15595
15861
  _channel12 = args.channel, _pollDetails2 = args.pollDetails, _messageId3 = args.messageId;
15596
15862
  _context.n = 118;
15597
15863
  return call(getActiveChannelId);
@@ -15650,7 +15916,7 @@ function watchForEvents() {
15650
15916
  case 124:
15651
15917
  return _context.a(3, 183);
15652
15918
  case 125:
15653
- console.log('CHANNEL_EVENT_TYPES.POLL_CLOSED ... ');
15919
+ log.info('CHANNEL_EVENT_TYPES.POLL_CLOSED ... ');
15654
15920
  _channel13 = args.channel, _messageId4 = args.messageId;
15655
15921
  _context.n = 126;
15656
15922
  return call(getActiveChannelId);
@@ -16073,7 +16339,9 @@ var _marked$2 = /*#__PURE__*/_regenerator().m(createChannel),
16073
16339
  _marked33 = /*#__PURE__*/_regenerator().m(getChannelByInviteKey),
16074
16340
  _marked34 = /*#__PURE__*/_regenerator().m(joinChannelWithInviteKey),
16075
16341
  _marked35 = /*#__PURE__*/_regenerator().m(setMessageRetentionPeriod),
16076
- _marked36 = /*#__PURE__*/_regenerator().m(ChannelsSaga);
16342
+ _marked36 = /*#__PURE__*/_regenerator().m(getChannelsWithUser),
16343
+ _marked37 = /*#__PURE__*/_regenerator().m(loadMoreMutualChannels),
16344
+ _marked38 = /*#__PURE__*/_regenerator().m(ChannelsSaga);
16077
16345
  function createChannel(action) {
16078
16346
  var payload, channelData, dontCreateIfNotExists, callback, SceytChatClient, createChannelData, fileToUpload, isSelfChannel, channelIsExistOnAllChannels, createdChannel, allChannels, memberId, checkChannelExist, messageToSend, _allChannels, _memberId, _t;
16079
16347
  return _regenerator().w(function (_context) {
@@ -16249,13 +16517,20 @@ function createChannel(action) {
16249
16517
  _context.n = 16;
16250
16518
  return call(setActiveChannelId, createdChannel.id);
16251
16519
  case 16:
16252
- _context.n = 18;
16520
+ _context.n = 19;
16253
16521
  break;
16254
16522
  case 17:
16255
16523
  _context.p = 17;
16256
16524
  _t = _context.v;
16257
- log.error(_t, 'Error on create channel');
16525
+ if (!(_t.code === 1041)) {
16526
+ _context.n = 18;
16527
+ break;
16528
+ }
16529
+ _context.n = 18;
16530
+ return put(setActionIsRestrictedAC(true, false, null));
16258
16531
  case 18:
16532
+ log.error(_t, 'Error on create channel');
16533
+ case 19:
16259
16534
  return _context.a(2);
16260
16535
  }
16261
16536
  }, _marked$2, null, [[0, 17]]);
@@ -18304,13 +18579,20 @@ function getChannelByInviteKey(action) {
18304
18579
  case 4:
18305
18580
  window.history.pushState({}, '', window.location.pathname);
18306
18581
  case 5:
18307
- _context33.n = 7;
18582
+ _context33.n = 8;
18308
18583
  break;
18309
18584
  case 6:
18310
18585
  _context33.p = 6;
18311
18586
  _t33 = _context33.v;
18312
- log.error('ERROR in get channel by invite key', _t33);
18587
+ if (!(_t33.code === 1109)) {
18588
+ _context33.n = 7;
18589
+ break;
18590
+ }
18591
+ _context33.n = 7;
18592
+ return put(setChannelInviteKeyAvailableAC(false));
18313
18593
  case 7:
18594
+ log.error('ERROR in get channel by invite key', _t33);
18595
+ case 8:
18314
18596
  return _context33.a(2);
18315
18597
  }
18316
18598
  }, _marked33, null, [[0, 6]]);
@@ -18412,124 +18694,250 @@ function setMessageRetentionPeriod(action) {
18412
18694
  }
18413
18695
  }, _marked35, null, [[0, 5]]);
18414
18696
  }
18415
- function ChannelsSaga() {
18697
+ function getChannelsWithUser(action) {
18698
+ var payload, userId, _SceytChatClient10, channelsQueryBuilder, channelsQuery, channelsData, channels, _t36;
18416
18699
  return _regenerator().w(function (_context36) {
18417
- while (1) switch (_context36.n) {
18700
+ while (1) switch (_context36.p = _context36.n) {
18418
18701
  case 0:
18419
18702
  _context36.n = 1;
18420
- return takeLatest(CREATE_CHANNEL, createChannel);
18703
+ return put(setMutualChannelsLoadingStateAC(LOADING_STATE.LOADING));
18421
18704
  case 1:
18422
18705
  _context36.n = 2;
18423
- return takeLatest(GET_CHANNELS, getChannels);
18706
+ return put(setMutualChannelsAC([]));
18424
18707
  case 2:
18708
+ _context36.p = 2;
18709
+ payload = action.payload;
18710
+ userId = payload.userId;
18711
+ _SceytChatClient10 = getClient();
18712
+ channelsQueryBuilder = new _SceytChatClient10.ChannelListQueryBuilder();
18713
+ channelsQueryBuilder.memberCount(0);
18714
+ channelsQueryBuilder.setMutualWithUserId(userId);
18715
+ channelsQueryBuilder.limit(15);
18425
18716
  _context36.n = 3;
18426
- return takeLatest(SEARCH_CHANNELS, searchChannels);
18717
+ return call(channelsQueryBuilder.build);
18427
18718
  case 3:
18719
+ channelsQuery = _context36.v;
18720
+ query.mutualChannelsQuery = channelsQuery;
18428
18721
  _context36.n = 4;
18429
- return takeLatest(GET_CHANNELS_FOR_FORWARD, getChannelsForForward);
18722
+ return call(channelsQuery.loadNextPage);
18430
18723
  case 4:
18724
+ channelsData = _context36.v;
18725
+ channels = channelsData.channels;
18726
+ if (!channelsData.hasNext) {
18727
+ _context36.n = 6;
18728
+ break;
18729
+ }
18431
18730
  _context36.n = 5;
18432
- return takeLatest(SEARCH_CHANNELS_FOR_FORWARD, searchChannelsForForward);
18731
+ return put(setMutualChannelsHasNextAC(true));
18433
18732
  case 5:
18434
- _context36.n = 6;
18435
- return takeLatest(LOAD_MORE_CHANNEL, channelsLoadMore);
18733
+ _context36.n = 7;
18734
+ break;
18436
18735
  case 6:
18437
18736
  _context36.n = 7;
18438
- return takeLatest(LOAD_MORE_CHANNELS_FOR_FORWARD, channelsForForwardLoadMore);
18737
+ return put(setMutualChannelsHasNextAC(false));
18439
18738
  case 7:
18440
18739
  _context36.n = 8;
18441
- return takeEvery(SWITCH_CHANNEL, switchChannel);
18740
+ return put(setMutualChannelsAC(channels));
18442
18741
  case 8:
18443
- _context36.n = 9;
18444
- return takeLatest(LEAVE_CHANNEL, leaveChannel);
18445
- case 9:
18446
18742
  _context36.n = 10;
18447
- return takeLatest(DELETE_CHANNEL, deleteChannel);
18743
+ break;
18744
+ case 9:
18745
+ _context36.p = 9;
18746
+ _t36 = _context36.v;
18747
+ log.error('ERROR in get groups in common', _t36);
18448
18748
  case 10:
18749
+ _context36.p = 10;
18449
18750
  _context36.n = 11;
18450
- return takeLatest(BLOCK_CHANNEL, blockChannel);
18751
+ return put(setMutualChannelsLoadingStateAC(LOADING_STATE.LOADED));
18451
18752
  case 11:
18452
- _context36.n = 12;
18453
- return takeLatest(UPDATE_CHANNEL, updateChannel);
18753
+ return _context36.f(10);
18454
18754
  case 12:
18455
- _context36.n = 13;
18456
- return takeEvery(MARK_MESSAGES_AS_READ, markMessagesRead);
18755
+ return _context36.a(2);
18756
+ }
18757
+ }, _marked36, null, [[2, 9, 10, 12]]);
18758
+ }
18759
+ function loadMoreMutualChannels(action) {
18760
+ var payload, limit, mutualChannelsQuery, channelsData, _t37;
18761
+ return _regenerator().w(function (_context37) {
18762
+ while (1) switch (_context37.p = _context37.n) {
18763
+ case 0:
18764
+ _context37.n = 1;
18765
+ return put(setMutualChannelsLoadingStateAC(LOADING_STATE.LOADING));
18766
+ case 1:
18767
+ _context37.p = 1;
18768
+ payload = action.payload;
18769
+ limit = payload.limit;
18770
+ mutualChannelsQuery = query.mutualChannelsQuery;
18771
+ if (mutualChannelsQuery) {
18772
+ _context37.n = 2;
18773
+ break;
18774
+ }
18775
+ return _context37.a(2);
18776
+ case 2:
18777
+ if (limit) {
18778
+ mutualChannelsQuery.limit = limit;
18779
+ }
18780
+ _context37.n = 3;
18781
+ return call(mutualChannelsQuery.loadNextPage);
18782
+ case 3:
18783
+ channelsData = _context37.v;
18784
+ if (!channelsData.hasNext) {
18785
+ _context37.n = 5;
18786
+ break;
18787
+ }
18788
+ _context37.n = 4;
18789
+ return put(setMutualChannelsHasNextAC(true));
18790
+ case 4:
18791
+ _context37.n = 6;
18792
+ break;
18793
+ case 5:
18794
+ _context37.n = 6;
18795
+ return put(setMutualChannelsHasNextAC(false));
18796
+ case 6:
18797
+ _context37.n = 7;
18798
+ return put(setMutualChannelsAC(channelsData.channels));
18799
+ case 7:
18800
+ _context37.n = 9;
18801
+ break;
18802
+ case 8:
18803
+ _context37.p = 8;
18804
+ _t37 = _context37.v;
18805
+ log.error('ERROR in load more mutual channels', _t37);
18806
+ case 9:
18807
+ _context37.p = 9;
18808
+ _context37.n = 10;
18809
+ return put(setMutualChannelsLoadingStateAC(LOADING_STATE.LOADED));
18810
+ case 10:
18811
+ return _context37.f(9);
18812
+ case 11:
18813
+ return _context37.a(2);
18814
+ }
18815
+ }, _marked37, null, [[1, 8, 9, 11]]);
18816
+ }
18817
+ function ChannelsSaga() {
18818
+ return _regenerator().w(function (_context38) {
18819
+ while (1) switch (_context38.n) {
18820
+ case 0:
18821
+ _context38.n = 1;
18822
+ return takeLatest(CREATE_CHANNEL, createChannel);
18823
+ case 1:
18824
+ _context38.n = 2;
18825
+ return takeLatest(GET_CHANNELS, getChannels);
18826
+ case 2:
18827
+ _context38.n = 3;
18828
+ return takeLatest(SEARCH_CHANNELS, searchChannels);
18829
+ case 3:
18830
+ _context38.n = 4;
18831
+ return takeLatest(GET_CHANNELS_FOR_FORWARD, getChannelsForForward);
18832
+ case 4:
18833
+ _context38.n = 5;
18834
+ return takeLatest(SEARCH_CHANNELS_FOR_FORWARD, searchChannelsForForward);
18835
+ case 5:
18836
+ _context38.n = 6;
18837
+ return takeLatest(LOAD_MORE_CHANNEL, channelsLoadMore);
18838
+ case 6:
18839
+ _context38.n = 7;
18840
+ return takeLatest(LOAD_MORE_CHANNELS_FOR_FORWARD, channelsForForwardLoadMore);
18841
+ case 7:
18842
+ _context38.n = 8;
18843
+ return takeLatest(GET_CHANNELS_WITH_USER, getChannelsWithUser);
18844
+ case 8:
18845
+ _context38.n = 9;
18846
+ return takeLatest(LOAD_MORE_MUTUAL_CHANNELS, loadMoreMutualChannels);
18847
+ case 9:
18848
+ _context38.n = 10;
18849
+ return takeEvery(SWITCH_CHANNEL, switchChannel);
18850
+ case 10:
18851
+ _context38.n = 11;
18852
+ return takeLatest(LEAVE_CHANNEL, leaveChannel);
18853
+ case 11:
18854
+ _context38.n = 12;
18855
+ return takeLatest(DELETE_CHANNEL, deleteChannel);
18856
+ case 12:
18857
+ _context38.n = 13;
18858
+ return takeLatest(BLOCK_CHANNEL, blockChannel);
18457
18859
  case 13:
18458
- _context36.n = 14;
18459
- return takeLatest(MARK_MESSAGES_AS_DELIVERED, markMessagesDelivered);
18860
+ _context38.n = 14;
18861
+ return takeLatest(UPDATE_CHANNEL, updateChannel);
18460
18862
  case 14:
18461
- _context36.n = 15;
18462
- return takeLatest(MARK_VOICE_MESSAGE_AS_PLAYED, markVoiceMessageAsPlayed);
18863
+ _context38.n = 15;
18864
+ return takeEvery(MARK_MESSAGES_AS_READ, markMessagesRead);
18463
18865
  case 15:
18464
- _context36.n = 16;
18465
- return takeLatest(WATCH_FOR_EVENTS, watchForChannelEvents);
18866
+ _context38.n = 16;
18867
+ return takeLatest(MARK_MESSAGES_AS_DELIVERED, markMessagesDelivered);
18466
18868
  case 16:
18467
- _context36.n = 17;
18468
- return takeLatest(TURN_OFF_NOTIFICATION, notificationsTurnOff);
18869
+ _context38.n = 17;
18870
+ return takeLatest(MARK_VOICE_MESSAGE_AS_PLAYED, markVoiceMessageAsPlayed);
18469
18871
  case 17:
18470
- _context36.n = 18;
18471
- return takeLatest(TURN_ON_NOTIFICATION, notificationsTurnOn);
18872
+ _context38.n = 18;
18873
+ return takeLatest(WATCH_FOR_EVENTS, watchForChannelEvents);
18472
18874
  case 18:
18473
- _context36.n = 19;
18474
- return takeLatest(MARK_CHANNEL_AS_READ, markChannelAsRead);
18875
+ _context38.n = 19;
18876
+ return takeLatest(TURN_OFF_NOTIFICATION, notificationsTurnOff);
18475
18877
  case 19:
18476
- _context36.n = 20;
18477
- return takeLatest(MARK_CHANNEL_AS_UNREAD, markChannelAsUnRead);
18878
+ _context38.n = 20;
18879
+ return takeLatest(TURN_ON_NOTIFICATION, notificationsTurnOn);
18478
18880
  case 20:
18479
- _context36.n = 21;
18480
- return takeLatest(CHECK_USER_STATUS, checkUsersStatus);
18881
+ _context38.n = 21;
18882
+ return takeLatest(MARK_CHANNEL_AS_READ, markChannelAsRead);
18481
18883
  case 21:
18482
- _context36.n = 22;
18483
- return takeLatest(SEND_TYPING, sendTyping);
18884
+ _context38.n = 22;
18885
+ return takeLatest(MARK_CHANNEL_AS_UNREAD, markChannelAsUnRead);
18484
18886
  case 22:
18485
- _context36.n = 23;
18486
- return takeLatest(SEND_RECORDING, sendRecording);
18887
+ _context38.n = 23;
18888
+ return takeLatest(CHECK_USER_STATUS, checkUsersStatus);
18487
18889
  case 23:
18488
- _context36.n = 24;
18489
- return takeLatest(PIN_CHANNEL, pinChannel);
18890
+ _context38.n = 24;
18891
+ return takeLatest(SEND_TYPING, sendTyping);
18490
18892
  case 24:
18491
- _context36.n = 25;
18492
- return takeLatest(UNPIN_CHANNEL, unpinChannel);
18893
+ _context38.n = 25;
18894
+ return takeLatest(SEND_RECORDING, sendRecording);
18493
18895
  case 25:
18494
- _context36.n = 26;
18495
- return takeLatest(CLEAR_HISTORY, clearHistory);
18896
+ _context38.n = 26;
18897
+ return takeLatest(PIN_CHANNEL, pinChannel);
18496
18898
  case 26:
18497
- _context36.n = 27;
18498
- return takeLatest(JOIN_TO_CHANNEL, joinChannel);
18899
+ _context38.n = 27;
18900
+ return takeLatest(UNPIN_CHANNEL, unpinChannel);
18499
18901
  case 27:
18500
- _context36.n = 28;
18501
- return takeLatest(DELETE_ALL_MESSAGES, deleteAllMessages);
18902
+ _context38.n = 28;
18903
+ return takeLatest(CLEAR_HISTORY, clearHistory);
18502
18904
  case 28:
18503
- _context36.n = 29;
18504
- return takeLatest(REMOVE_CHANNEL_CACHES, removeChannelCaches);
18905
+ _context38.n = 29;
18906
+ return takeLatest(JOIN_TO_CHANNEL, joinChannel);
18505
18907
  case 29:
18506
- _context36.n = 30;
18507
- return takeLatest(GET_CHANNEL_MENTIONS, getChannelMentions);
18908
+ _context38.n = 30;
18909
+ return takeLatest(DELETE_ALL_MESSAGES, deleteAllMessages);
18508
18910
  case 30:
18509
- _context36.n = 31;
18510
- return takeLatest(CREATE_CHANNEL_INVITE_KEY, createChannelInviteKey);
18911
+ _context38.n = 31;
18912
+ return takeLatest(REMOVE_CHANNEL_CACHES, removeChannelCaches);
18511
18913
  case 31:
18512
- _context36.n = 32;
18513
- return takeLatest(UPDATE_CHANNEL_INVITE_KEY, updateChannelInviteKey);
18914
+ _context38.n = 32;
18915
+ return takeLatest(GET_CHANNEL_MENTIONS, getChannelMentions);
18514
18916
  case 32:
18515
- _context36.n = 33;
18516
- return takeLatest(REGENERATE_CHANNEL_INVITE_KEY, regenerateChannelInviteKey);
18917
+ _context38.n = 33;
18918
+ return takeLatest(CREATE_CHANNEL_INVITE_KEY, createChannelInviteKey);
18517
18919
  case 33:
18518
- _context36.n = 34;
18519
- return takeLatest(GET_CHANNEL_INVITE_KEYS, getChannelInviteKeys);
18920
+ _context38.n = 34;
18921
+ return takeLatest(UPDATE_CHANNEL_INVITE_KEY, updateChannelInviteKey);
18520
18922
  case 34:
18521
- _context36.n = 35;
18522
- return takeLatest(GET_CHANNEL_BY_INVITE_KEY, getChannelByInviteKey);
18923
+ _context38.n = 35;
18924
+ return takeLatest(REGENERATE_CHANNEL_INVITE_KEY, regenerateChannelInviteKey);
18523
18925
  case 35:
18524
- _context36.n = 36;
18525
- return takeLatest(JOIN_TO_CHANNEL_WITH_INVITE_KEY, joinChannelWithInviteKey);
18926
+ _context38.n = 36;
18927
+ return takeLatest(GET_CHANNEL_INVITE_KEYS, getChannelInviteKeys);
18526
18928
  case 36:
18527
- _context36.n = 37;
18528
- return takeLatest(SET_MESSAGE_RETENTION_PERIOD, setMessageRetentionPeriod);
18929
+ _context38.n = 37;
18930
+ return takeLatest(GET_CHANNEL_BY_INVITE_KEY, getChannelByInviteKey);
18529
18931
  case 37:
18530
- return _context36.a(2);
18932
+ _context38.n = 38;
18933
+ return takeLatest(JOIN_TO_CHANNEL_WITH_INVITE_KEY, joinChannelWithInviteKey);
18934
+ case 38:
18935
+ _context38.n = 39;
18936
+ return takeLatest(SET_MESSAGE_RETENTION_PERIOD, setMessageRetentionPeriod);
18937
+ case 39:
18938
+ return _context38.a(2);
18531
18939
  }
18532
- }, _marked36);
18940
+ }, _marked38);
18533
18941
  }
18534
18942
 
18535
18943
  function rgbaToThumbHash(w, h, rgba) {
@@ -19388,7 +19796,7 @@ function sendMessage(action) {
19388
19796
  messagesToSend.push(messageToSend);
19389
19797
  case 12:
19390
19798
  _loop2 = /*#__PURE__*/_regenerator().m(function _callee3() {
19391
- var messageAttachment, messageToSend, messageCopy, _attachmentsToSend, linkAttachmentToSend, linkAttachmentBuilder, messageResponse, k, pendingAttachment, attachmentsToUpdate, currentAttachmentsMap, messageUpdateData, stringifiedMessageUpdateData, activeChannelId, channelUpdateParam, isErrorResendable, _t;
19799
+ var messageAttachment, messageToSend, messageCopy, _attachmentsToSend, linkAttachmentToSend, linkAttachmentBuilder, messageResponse, k, pendingAttachment, attachmentsToUpdate, currentAttachmentsMap, messageUpdateData, stringifiedMessageUpdateData, activeChannelId, messageToUpdate, channelUpdateParam, isErrorResendable, _t;
19392
19800
  return _regenerator().w(function (_context3) {
19393
19801
  while (1) switch (_context3.p = _context3.n) {
19394
19802
  case 0:
@@ -19490,7 +19898,7 @@ function sendMessage(action) {
19490
19898
  createdAt: messageResponse.createdAt,
19491
19899
  channelId: channel.id
19492
19900
  };
19493
- stringifiedMessageUpdateData = JSON.parse(JSON.stringify(messageUpdateData));
19901
+ stringifiedMessageUpdateData = JSON.parse(JSON.stringify(messageResponse));
19494
19902
  activeChannelId = getActiveChannelId();
19495
19903
  if (!(activeChannelId === channel.id)) {
19496
19904
  _context3.n = 9;
@@ -19502,11 +19910,12 @@ function sendMessage(action) {
19502
19910
  _context3.n = 10;
19503
19911
  return put(removePendingMessageAC(channel.id, messageToSend.tid));
19504
19912
  case 10:
19505
- addMessageToMap(channel.id, stringifiedMessageUpdateData);
19506
19913
  updateMessageOnAllMessages(messageToSend.tid, messageUpdateData);
19507
- updateChannelLastMessageOnAllChannels(channel.id, stringifiedMessageUpdateData);
19914
+ messageToUpdate = JSON.parse(JSON.stringify(messageResponse));
19915
+ addMessageToMap(channel.id, messageToUpdate);
19916
+ updateChannelLastMessageOnAllChannels(channel.id, messageToUpdate);
19508
19917
  channelUpdateParam = {
19509
- lastMessage: stringifiedMessageUpdateData,
19918
+ lastMessage: messageToUpdate,
19510
19919
  lastReactedMessage: null
19511
19920
  };
19512
19921
  if (!channel.unread) {
@@ -22500,7 +22909,7 @@ function loadMoreMembers(action) {
22500
22909
  }, _marked2$3, null, [[0, 7, 8, 10]]);
22501
22910
  }
22502
22911
  function addMembers(action) {
22503
- var payload, members, channelId, channel, membersToAdd, addedMembers, membersIds, messageToSend, updateChannelData, _t3;
22912
+ var payload, members, channelId, channel, membersToAdd, addedMembers, membersIds, messageToSend, updateChannelData, _action$payload, _t3;
22504
22913
  return _regenerator().w(function (_context3) {
22505
22914
  while (1) switch (_context3.p = _context3.n) {
22506
22915
  case 0:
@@ -22558,13 +22967,20 @@ function addMembers(action) {
22558
22967
  memberCount: channel.memberCount + addedMembers.length
22559
22968
  }, updateChannelData)));
22560
22969
  case 6:
22561
- _context3.n = 8;
22970
+ _context3.n = 9;
22562
22971
  break;
22563
22972
  case 7:
22564
22973
  _context3.p = 7;
22565
22974
  _t3 = _context3.v;
22566
- log.error('error on add members... ', _t3);
22975
+ if (!(_t3.code === 1041)) {
22976
+ _context3.n = 8;
22977
+ break;
22978
+ }
22979
+ _context3.n = 8;
22980
+ return put(setActionIsRestrictedAC(true, true, (action === null || action === void 0 ? void 0 : (_action$payload = action.payload) === null || _action$payload === void 0 ? void 0 : _action$payload.members) || []));
22567
22981
  case 8:
22982
+ log.error('error on add members... ', _t3);
22983
+ case 9:
22568
22984
  return _context3.a(2);
22569
22985
  }
22570
22986
  }, _marked3$2, null, [[0, 7]]);
@@ -22722,11 +23138,11 @@ function reportMember(action) {
22722
23138
  }, _marked7$2, null, [[1, 3]]);
22723
23139
  }
22724
23140
  function getRoles(action) {
22725
- var _action$payload, timeout, attempts, SceytChatClient, roles, _t8;
23141
+ var _action$payload2, timeout, attempts, SceytChatClient, roles, _t8;
22726
23142
  return _regenerator().w(function (_context8) {
22727
23143
  while (1) switch (_context8.p = _context8.n) {
22728
23144
  case 0:
22729
- _action$payload = action.payload, timeout = _action$payload.timeout, attempts = _action$payload.attempts;
23145
+ _action$payload2 = action.payload, timeout = _action$payload2.timeout, attempts = _action$payload2.attempts;
22730
23146
  _context8.p = 1;
22731
23147
  SceytChatClient = getClient();
22732
23148
  if (!(store.getState().UserReducer.connectionStatus !== CONNECTION_STATUS.CONNECTED)) {
@@ -23267,6 +23683,18 @@ var channelInviteKeysSelector = function channelInviteKeysSelector(store) {
23267
23683
  var joinableChannelSelector = function joinableChannelSelector(store) {
23268
23684
  return store.ChannelReducer.joinableChannel;
23269
23685
  };
23686
+ var channelInviteKeyAvailableSelector = function channelInviteKeyAvailableSelector(store) {
23687
+ return store.ChannelReducer.channelInviteKeyAvailable;
23688
+ };
23689
+ var mutualChannelsSelector = function mutualChannelsSelector(store) {
23690
+ return store.ChannelReducer.mutualChannels;
23691
+ };
23692
+ var mutualChannelsHasNextSelector = function mutualChannelsHasNextSelector(store) {
23693
+ return store.ChannelReducer.mutualChannelsHasNext;
23694
+ };
23695
+ var mutualChannelsLoadingStateSelector = function mutualChannelsLoadingStateSelector(store) {
23696
+ return store.ChannelReducer.mutualChannelsLoadingState;
23697
+ };
23270
23698
 
23271
23699
  var activeChannelMembersSelector = function activeChannelMembersSelector(store) {
23272
23700
  return store.MembersReducer.activeChannelMembers;
@@ -23286,6 +23714,12 @@ var membersLoadingStateSelector = function membersLoadingStateSelector(store) {
23286
23714
  var membersHasNextSelector = function membersHasNextSelector(store) {
23287
23715
  return store.MembersReducer.membersHasNext;
23288
23716
  };
23717
+ var restrictedSelector = function restrictedSelector(store) {
23718
+ return store.MembersReducer.restricted;
23719
+ };
23720
+ var openInviteModalSelector = function openInviteModalSelector(store) {
23721
+ return store.MembersReducer.openInviteModal;
23722
+ };
23289
23723
 
23290
23724
  var useDidUpdate = function useDidUpdate(callback, deps) {
23291
23725
  var hasMount = useRef(false);
@@ -23384,6 +23818,24 @@ var useColors = function useColors() {
23384
23818
  }, [theme.colors, currentThemeMode]);
23385
23819
  };
23386
23820
 
23821
+ function useUpdatedUser(user) {
23822
+ var dispatch = useDispatch();
23823
+ var usersMap = useSelector(usersMapSelector);
23824
+ useEffect(function () {
23825
+ if (user !== null && user !== void 0 && user.id && !usersMap[user.id]) {
23826
+ var _updateUserStatusOnMa;
23827
+ setUserToMap(user);
23828
+ dispatch(updateUserStatusOnMapAC((_updateUserStatusOnMa = {}, _updateUserStatusOnMa[user.id] = user, _updateUserStatusOnMa)));
23829
+ }
23830
+ }, [user === null || user === void 0 ? void 0 : user.id]);
23831
+ return useMemo(function () {
23832
+ if (!(user !== null && user !== void 0 && user.id)) {
23833
+ return user;
23834
+ }
23835
+ return usersMap[user.id] || user;
23836
+ }, [user, usersMap]);
23837
+ }
23838
+
23387
23839
  function setThemeAC(theme) {
23388
23840
  return {
23389
23841
  type: SET_THEME,
@@ -23838,6 +24290,98 @@ var MembersText = styled.div(_templateObject7$1 || (_templateObject7$1 = _tagged
23838
24290
  });
23839
24291
  var Center = styled.div(_templateObject8$1 || (_templateObject8$1 = _taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n justify-content: center;\n margin-top: 24px;\n"])));
23840
24292
 
24293
+ var ActionRestrictedPopup = function ActionRestrictedPopup(_ref) {
24294
+ var fromChannel = _ref.fromChannel;
24295
+ var dispatch = useDispatch();
24296
+ var _useColor = useColors(),
24297
+ background = _useColor[THEME_COLORS.BACKGROUND],
24298
+ textPrimary = _useColor[THEME_COLORS.TEXT_PRIMARY],
24299
+ surface1 = _useColor[THEME_COLORS.SURFACE_1],
24300
+ iconPrimary = _useColor[THEME_COLORS.ICON_PRIMARY],
24301
+ accentColor = _useColor[THEME_COLORS.ACCENT],
24302
+ textOnPrimary = _useColor[THEME_COLORS.TEXT_ON_PRIMARY],
24303
+ linkColor = _useColor[THEME_COLORS.LINK_COLOR];
24304
+ var handleClose = function handleClose() {
24305
+ dispatch(setActionIsRestrictedAC(false, false, null));
24306
+ };
24307
+ var handleInvite = function handleInvite() {
24308
+ dispatch(setOpenInviteModalAC(true));
24309
+ handleClose();
24310
+ };
24311
+ return /*#__PURE__*/React__default.createElement(PopupContainer, null, /*#__PURE__*/React__default.createElement(Popup, {
24312
+ backgroundColor: background,
24313
+ maxWidth: '520px',
24314
+ minWidth: '520px',
24315
+ padding: '0'
24316
+ }, /*#__PURE__*/React__default.createElement(PopupBody, {
24317
+ paddingH: '24px',
24318
+ paddingV: '24px'
24319
+ }, /*#__PURE__*/React__default.createElement(CloseIcon, {
24320
+ color: iconPrimary,
24321
+ onClick: handleClose
24322
+ }), /*#__PURE__*/React__default.createElement(PopupName, {
24323
+ color: textPrimary,
24324
+ marginBottom: '20px'
24325
+ }, fromChannel ? 'Privacy note' : "Can't create group"), /*#__PURE__*/React__default.createElement(PopupDescription, {
24326
+ color: textPrimary,
24327
+ highlightColor: linkColor
24328
+ }, fromChannel ? 'Couldn’t add the user. Please invite them directly instead.' : 'Not everyone can be added to this group.')), /*#__PURE__*/React__default.createElement(PopupFooter, {
24329
+ backgroundColor: surface1
24330
+ }, fromChannel && (/*#__PURE__*/React__default.createElement(Button, {
24331
+ type: 'button',
24332
+ color: textPrimary,
24333
+ backgroundColor: 'transparent',
24334
+ onClick: handleClose
24335
+ }, "Cancel")), /*#__PURE__*/React__default.createElement(Button, {
24336
+ type: 'button',
24337
+ backgroundColor: accentColor,
24338
+ color: textOnPrimary,
24339
+ borderRadius: '8px',
24340
+ onClick: fromChannel ? handleInvite : handleClose
24341
+ }, fromChannel ? 'Invite' : 'Cancel'))));
24342
+ };
24343
+
24344
+ var UnavailableInviteKeyPopup = function UnavailableInviteKeyPopup() {
24345
+ var dispatch = useDispatch();
24346
+ var _useColor = useColors(),
24347
+ background = _useColor[THEME_COLORS.BACKGROUND],
24348
+ textPrimary = _useColor[THEME_COLORS.TEXT_PRIMARY],
24349
+ surface1 = _useColor[THEME_COLORS.SURFACE_1],
24350
+ iconPrimary = _useColor[THEME_COLORS.ICON_PRIMARY],
24351
+ accentColor = _useColor[THEME_COLORS.ACCENT],
24352
+ textOnPrimary = _useColor[THEME_COLORS.TEXT_ON_PRIMARY],
24353
+ linkColor = _useColor[THEME_COLORS.LINK_COLOR];
24354
+ var handleClose = function handleClose() {
24355
+ dispatch(setChannelInviteKeyAvailableAC(true));
24356
+ };
24357
+ return /*#__PURE__*/React__default.createElement(PopupContainer, null, /*#__PURE__*/React__default.createElement(Popup, {
24358
+ backgroundColor: background,
24359
+ maxWidth: '520px',
24360
+ minWidth: '520px',
24361
+ padding: '0'
24362
+ }, /*#__PURE__*/React__default.createElement(PopupBody, {
24363
+ paddingH: '24px',
24364
+ paddingV: '24px'
24365
+ }, /*#__PURE__*/React__default.createElement(CloseIcon, {
24366
+ color: iconPrimary,
24367
+ onClick: handleClose
24368
+ }), /*#__PURE__*/React__default.createElement(PopupName, {
24369
+ color: textPrimary,
24370
+ marginBottom: '20px'
24371
+ }, "Failed to join"), /*#__PURE__*/React__default.createElement(PopupDescription, {
24372
+ color: textPrimary,
24373
+ highlightColor: linkColor
24374
+ }, "You can't join the group or community as the invite link was reset.")), /*#__PURE__*/React__default.createElement(PopupFooter, {
24375
+ backgroundColor: surface1
24376
+ }, /*#__PURE__*/React__default.createElement(Button, {
24377
+ type: 'button',
24378
+ backgroundColor: accentColor,
24379
+ color: textOnPrimary,
24380
+ borderRadius: '8px',
24381
+ onClick: handleClose
24382
+ }, "Close"))));
24383
+ };
24384
+
23841
24385
  var _templateObject$5, _templateObject2$4, _templateObject3$4;
23842
24386
  var SceytChat = function SceytChat(_ref) {
23843
24387
  var client = _ref.client,
@@ -23881,6 +24425,8 @@ var SceytChat = function SceytChat(_ref) {
23881
24425
  SceytChatClient = _useState[0],
23882
24426
  setSceytChatClient = _useState[1];
23883
24427
  var connectionStatus = useSelector(connectionStatusSelector, shallowEqual);
24428
+ var restricted = useSelector(restrictedSelector, shallowEqual);
24429
+ var channelInviteKeyAvailable = useSelector(channelInviteKeyAvailableSelector, shallowEqual);
23884
24430
  var _useState2 = useState(true),
23885
24431
  tabIsActive = _useState2[0],
23886
24432
  setTabIsActive = _useState2[1];
@@ -24125,7 +24671,9 @@ var SceytChat = function SceytChat(_ref) {
24125
24671
  highlightedBackground: highlightedBackground,
24126
24672
  id: 'sceyt_chat_container',
24127
24673
  chatMinWidth: chatMinWidth
24128
- }, children, embeddedJoinGroupPopup && joinPopup && /*#__PURE__*/React__default.createElement(EmbeddedPopupWrapper, null, joinPopup))) : '', !embeddedJoinGroupPopup && joinPopup);
24674
+ }, children, embeddedJoinGroupPopup && joinPopup && /*#__PURE__*/React__default.createElement(EmbeddedPopupWrapper, null, joinPopup), (restricted === null || restricted === void 0 ? void 0 : restricted.isRestricted) && /*#__PURE__*/React__default.createElement(ActionRestrictedPopup, {
24675
+ fromChannel: restricted === null || restricted === void 0 ? void 0 : restricted.fromChannel
24676
+ }), !channelInviteKeyAvailable && /*#__PURE__*/React__default.createElement(UnavailableInviteKeyPopup, null))) : '', !embeddedJoinGroupPopup && joinPopup);
24129
24677
  };
24130
24678
  var Container$2 = styled.div(_templateObject$5 || (_templateObject$5 = _taggedTemplateLiteralLoose(["\n display: flex;\n height: 100vh;\n"])));
24131
24679
  var ChatContainer = styled.div(_templateObject2$4 || (_templateObject2$4 = _taggedTemplateLiteralLoose(["\n display: flex;\n height: 100%;\n max-height: 100vh;\n min-width: ", ";\n background-color: ", ";\n position: relative;\n\n /* Global highlighted background styles */\n ::selection {\n background-color: ", ";\n }\n\n ::-moz-selection {\n background-color: ", ";\n }\n\n /* For text selection highlighting */\n *::selection {\n background-color: ", ";\n }\n\n *::-moz-selection {\n background-color: ", ";\n }\n"])), function (props) {
@@ -25460,30 +26008,43 @@ var Title$1 = styled.h4(_templateObject4$6 || (_templateObject4$6 = _taggedTempl
25460
26008
  });
25461
26009
 
25462
26010
  var _templateObject$b, _templateObject2$a, _templateObject3$8, _templateObject4$7, _templateObject5$4, _templateObject6$3, _templateObject7$3, _templateObject8$3, _templateObject9$2, _templateObject0$2, _templateObject1$2;
25463
- var UsersPopup = function UsersPopup(_ref) {
25464
- var channel = _ref.channel,
25465
- toggleCreatePopup = _ref.toggleCreatePopup,
25466
- actionType = _ref.actionType,
25467
- getSelectedUsers = _ref.getSelectedUsers,
25468
- memberIds = _ref.memberIds,
25469
- creatChannelSelectedMembers = _ref.creatChannelSelectedMembers,
25470
- popupHeight = _ref.popupHeight,
25471
- selectIsRequired = _ref.selectIsRequired,
25472
- popupWidth = _ref.popupWidth,
25473
- handleOpenInviteModal = _ref.handleOpenInviteModal;
26011
+ var UserItem = function UserItem(_ref) {
26012
+ var user = _ref.user,
26013
+ memberDisplayName = _ref.memberDisplayName;
25474
26014
  var _useColor = useColors(),
25475
- accentColor = _useColor[THEME_COLORS.ACCENT],
25476
- surface1Background = _useColor[THEME_COLORS.SURFACE_1],
25477
26015
  textPrimary = _useColor[THEME_COLORS.TEXT_PRIMARY],
25478
- textSecondary = _useColor[THEME_COLORS.TEXT_SECONDARY],
25479
- iconInactive = _useColor[THEME_COLORS.ICON_INACTIVE],
25480
- backgroundHovered = _useColor[THEME_COLORS.BACKGROUND_HOVERED],
25481
- background = _useColor[THEME_COLORS.BACKGROUND],
25482
- border = _useColor[THEME_COLORS.BORDER],
25483
- textFootnote = _useColor[THEME_COLORS.TEXT_FOOTNOTE],
25484
- surface1 = _useColor[THEME_COLORS.SURFACE_1],
25485
- textOnPrimary = _useColor[THEME_COLORS.TEXT_ON_PRIMARY],
25486
- surface2 = _useColor[THEME_COLORS.SURFACE_2];
26016
+ textSecondary = _useColor[THEME_COLORS.TEXT_SECONDARY];
26017
+ var userUpdated = useUpdatedUser(user);
26018
+ return /*#__PURE__*/React__default.createElement(UserNamePresence, null, /*#__PURE__*/React__default.createElement(MemberName, {
26019
+ color: textPrimary
26020
+ }, memberDisplayName), /*#__PURE__*/React__default.createElement(SubTitle, {
26021
+ color: textSecondary
26022
+ }, userUpdated.presence && userUpdated.presence.state === USER_PRESENCE_STATUS.ONLINE ? 'Online' : userUpdated.presence && userUpdated.presence.lastActiveAt && userLastActiveDateFormat(userUpdated.presence.lastActiveAt)));
26023
+ };
26024
+ var UsersPopup = function UsersPopup(_ref2) {
26025
+ var channel = _ref2.channel,
26026
+ toggleCreatePopup = _ref2.toggleCreatePopup,
26027
+ actionType = _ref2.actionType,
26028
+ getSelectedUsers = _ref2.getSelectedUsers,
26029
+ memberIds = _ref2.memberIds,
26030
+ creatChannelSelectedMembers = _ref2.creatChannelSelectedMembers,
26031
+ popupHeight = _ref2.popupHeight,
26032
+ selectIsRequired = _ref2.selectIsRequired,
26033
+ popupWidth = _ref2.popupWidth,
26034
+ handleOpenInviteModal = _ref2.handleOpenInviteModal;
26035
+ var _useColor2 = useColors(),
26036
+ accentColor = _useColor2[THEME_COLORS.ACCENT],
26037
+ surface1Background = _useColor2[THEME_COLORS.SURFACE_1],
26038
+ textPrimary = _useColor2[THEME_COLORS.TEXT_PRIMARY],
26039
+ textSecondary = _useColor2[THEME_COLORS.TEXT_SECONDARY],
26040
+ iconInactive = _useColor2[THEME_COLORS.ICON_INACTIVE],
26041
+ backgroundHovered = _useColor2[THEME_COLORS.BACKGROUND_HOVERED],
26042
+ background = _useColor2[THEME_COLORS.BACKGROUND],
26043
+ border = _useColor2[THEME_COLORS.BORDER],
26044
+ textFootnote = _useColor2[THEME_COLORS.TEXT_FOOTNOTE],
26045
+ surface1 = _useColor2[THEME_COLORS.SURFACE_1],
26046
+ textOnPrimary = _useColor2[THEME_COLORS.TEXT_ON_PRIMARY],
26047
+ surface2 = _useColor2[THEME_COLORS.SURFACE_2];
25487
26048
  var dispatch = useDispatch();
25488
26049
  var ChatClient = getClient();
25489
26050
  var selfUser = ChatClient.user;
@@ -25758,11 +26319,10 @@ var UsersPopup = function UsersPopup(_ref) {
25758
26319
  size: 40,
25759
26320
  textSize: 16,
25760
26321
  setDefaultAvatar: true
25761
- }), /*#__PURE__*/React__default.createElement(UserNamePresence, null, /*#__PURE__*/React__default.createElement(MemberName, {
25762
- color: textPrimary
25763
- }, memberDisplayName), /*#__PURE__*/React__default.createElement(SubTitle, {
25764
- color: textSecondary
25765
- }, user.presence && user.presence.state === USER_PRESENCE_STATUS.ONLINE ? 'Online' : user.presence && user.presence.lastActiveAt && userLastActiveDateFormat(user.presence.lastActiveAt))), actionType !== 'createChat' && (/*#__PURE__*/React__default.createElement(CustomCheckbox, {
26322
+ }), /*#__PURE__*/React__default.createElement(UserItem, {
26323
+ user: user,
26324
+ memberDisplayName: memberDisplayName
26325
+ }), actionType !== 'createChat' && (/*#__PURE__*/React__default.createElement(CustomCheckbox, {
25766
26326
  index: user.id,
25767
26327
  state: isSelected,
25768
26328
  backgroundColor: 'transparent',
@@ -28629,23 +29189,35 @@ var Progress = styled.input(_templateObject0$5 || (_templateObject0$5 = _taggedT
28629
29189
  var FullScreenWrapper = styled.div(_templateObject1$3 || (_templateObject1$3 = _taggedTemplateLiteralLoose(["\n display: flex;\n margin-left: 16px;\n cursor: pointer;\n @media (max-width: 768px) {\n margin-left: 12px;\n & > svg {\n width: 18px;\n height: 18px;\n }\n }\n @media (max-width: 480px) {\n margin-left: auto;\n & > svg {\n width: 16px;\n height: 16px;\n }\n }\n"])));
28630
29190
 
28631
29191
  var _templateObject$n, _templateObject2$k, _templateObject3$h, _templateObject4$e, _templateObject5$b, _templateObject6$9, _templateObject7$8, _templateObject8$8, _templateObject9$7, _templateObject0$6, _templateObject1$4;
28632
- function ForwardMessagePopup(_ref) {
28633
- var title = _ref.title,
28634
- buttonText = _ref.buttonText,
28635
- togglePopup = _ref.togglePopup,
28636
- handleForward = _ref.handleForward,
28637
- loading = _ref.loading;
29192
+ var ChannelMembersItem = function ChannelMembersItem(_ref) {
29193
+ var channel = _ref.channel,
29194
+ directChannelUser = _ref.directChannelUser,
29195
+ isDirectChannel = _ref.isDirectChannel;
28638
29196
  var _useColor = useColors(),
28639
- accentColor = _useColor[THEME_COLORS.ACCENT],
28640
- textPrimary = _useColor[THEME_COLORS.TEXT_PRIMARY],
28641
- surface1 = _useColor[THEME_COLORS.SURFACE_1],
28642
- textSecondary = _useColor[THEME_COLORS.TEXT_SECONDARY],
28643
- background = _useColor[THEME_COLORS.BACKGROUND],
28644
- iconInactive = _useColor[THEME_COLORS.ICON_INACTIVE],
28645
- textOnPrimary = _useColor[THEME_COLORS.TEXT_ON_PRIMARY],
28646
- iconPrimary = _useColor[THEME_COLORS.ICON_PRIMARY],
28647
- backgroundHovered = _useColor[THEME_COLORS.BACKGROUND_HOVERED],
28648
- surface2 = _useColor[THEME_COLORS.SURFACE_2];
29197
+ textSecondary = _useColor[THEME_COLORS.TEXT_SECONDARY];
29198
+ var updatedUser = useUpdatedUser(directChannelUser);
29199
+ var directChannelUserUpdated = isDirectChannel ? updatedUser : directChannelUser;
29200
+ return /*#__PURE__*/React__default.createElement(ChannelMembers, {
29201
+ color: textSecondary
29202
+ }, isDirectChannel && directChannelUserUpdated ? (hideUserPresence && hideUserPresence(directChannelUserUpdated) ? '' : directChannelUserUpdated.presence && directChannelUserUpdated.presence.state === USER_PRESENCE_STATUS.ONLINE) ? 'Online' : directChannelUserUpdated && directChannelUserUpdated.presence && directChannelUserUpdated.presence.lastActiveAt && userLastActiveDateFormat(directChannelUserUpdated.presence.lastActiveAt) : (channel === null || channel === void 0 ? void 0 : channel.memberCount) + " " + (channel.type === DEFAULT_CHANNEL_TYPE.BROADCAST || channel.type === DEFAULT_CHANNEL_TYPE.PUBLIC ? (channel === null || channel === void 0 ? void 0 : channel.memberCount) > 1 ? 'subscribers' : 'subscriber' : (channel === null || channel === void 0 ? void 0 : channel.memberCount) > 1 ? 'members' : 'member') + " ");
29203
+ };
29204
+ function ForwardMessagePopup(_ref2) {
29205
+ var title = _ref2.title,
29206
+ buttonText = _ref2.buttonText,
29207
+ togglePopup = _ref2.togglePopup,
29208
+ handleForward = _ref2.handleForward,
29209
+ loading = _ref2.loading;
29210
+ var _useColor2 = useColors(),
29211
+ accentColor = _useColor2[THEME_COLORS.ACCENT],
29212
+ textPrimary = _useColor2[THEME_COLORS.TEXT_PRIMARY],
29213
+ surface1 = _useColor2[THEME_COLORS.SURFACE_1],
29214
+ textSecondary = _useColor2[THEME_COLORS.TEXT_SECONDARY],
29215
+ background = _useColor2[THEME_COLORS.BACKGROUND],
29216
+ iconInactive = _useColor2[THEME_COLORS.ICON_INACTIVE],
29217
+ textOnPrimary = _useColor2[THEME_COLORS.TEXT_ON_PRIMARY],
29218
+ iconPrimary = _useColor2[THEME_COLORS.ICON_PRIMARY],
29219
+ backgroundHovered = _useColor2[THEME_COLORS.BACKGROUND_HOVERED],
29220
+ surface2 = _useColor2[THEME_COLORS.SURFACE_2];
28649
29221
  var ChatClient = getClient();
28650
29222
  var user = ChatClient.user;
28651
29223
  var dispatch = useDispatch();
@@ -28838,9 +29410,11 @@ function ForwardMessagePopup(_ref) {
28838
29410
  setDefaultAvatar: isDirectChannel
28839
29411
  }), /*#__PURE__*/React__default.createElement(ChannelInfo$3, null, /*#__PURE__*/React__default.createElement(ChannelTitle, {
28840
29412
  color: textPrimary
28841
- }, isDirectChannel ? isSelfChannel ? 'Me' : directChannelUser ? makeUsername(contactsMap[directChannelUser.id], directChannelUser, getFromContacts) : 'Deleted User' : channel.subject), /*#__PURE__*/React__default.createElement(ChannelMembers, {
28842
- color: textSecondary
28843
- }, isDirectChannel && directChannelUser ? (hideUserPresence && hideUserPresence(directChannelUser) ? '' : directChannelUser.presence && directChannelUser.presence.state === USER_PRESENCE_STATUS.ONLINE) ? 'Online' : directChannelUser && directChannelUser.presence && directChannelUser.presence.lastActiveAt && userLastActiveDateFormat(directChannelUser.presence.lastActiveAt) : (channel === null || channel === void 0 ? void 0 : channel.memberCount) + " " + (channel.type === DEFAULT_CHANNEL_TYPE.BROADCAST || channel.type === DEFAULT_CHANNEL_TYPE.PUBLIC ? (channel === null || channel === void 0 ? void 0 : channel.memberCount) > 1 ? 'subscribers' : 'subscriber' : (directChannelUser === null || directChannelUser === void 0 ? void 0 : directChannelUser.memberCount) > 1 ? 'members' : 'member') + " ")), /*#__PURE__*/React__default.createElement(CustomCheckbox, {
29413
+ }, isDirectChannel ? isSelfChannel ? 'Me' : directChannelUser ? makeUsername(contactsMap[directChannelUser.id], directChannelUser, getFromContacts) : 'Deleted User' : channel.subject), /*#__PURE__*/React__default.createElement(ChannelMembersItem, {
29414
+ channel: channel,
29415
+ directChannelUser: directChannelUser,
29416
+ isDirectChannel: isDirectChannel
29417
+ })), /*#__PURE__*/React__default.createElement(CustomCheckbox, {
28844
29418
  borderColor: iconInactive,
28845
29419
  index: channel.id,
28846
29420
  disabled: selectedChannels.length >= 5 && !isSelected,
@@ -28858,6 +29432,11 @@ function ForwardMessagePopup(_ref) {
28858
29432
  var isSelected = selectedChannels.findIndex(function (chan) {
28859
29433
  return chan.id === channel.id;
28860
29434
  }) >= 0;
29435
+ var isDirectChannel = channel.type === DEFAULT_CHANNEL_TYPE.DIRECT;
29436
+ var isSelfChannel = isDirectChannel && channel.memberCount === 1 && channel.members.length > 0 && channel.members[0].id === user.id;
29437
+ var directChannelUser = isDirectChannel && isSelfChannel ? user : channel.members.find(function (member) {
29438
+ return member.id !== user.id;
29439
+ });
28861
29440
  return /*#__PURE__*/React__default.createElement(ChannelItem, {
28862
29441
  key: channel.id,
28863
29442
  onClick: function onClick() {
@@ -28873,9 +29452,11 @@ function ForwardMessagePopup(_ref) {
28873
29452
  setDefaultAvatar: false
28874
29453
  }), /*#__PURE__*/React__default.createElement(ChannelInfo$3, null, /*#__PURE__*/React__default.createElement(ChannelTitle, {
28875
29454
  color: textPrimary
28876
- }, channel.subject), /*#__PURE__*/React__default.createElement(ChannelMembers, {
28877
- color: textSecondary
28878
- }, channel.memberCount + " " + (channel.type === DEFAULT_CHANNEL_TYPE.BROADCAST || channel.type === DEFAULT_CHANNEL_TYPE.PUBLIC ? channel.memberCount > 1 ? 'subscribers' : 'subscriber' : channel.memberCount > 1 ? 'members' : 'member') + " ")), /*#__PURE__*/React__default.createElement(CustomCheckbox, {
29455
+ }, channel.subject), /*#__PURE__*/React__default.createElement(ChannelMembersItem, {
29456
+ channel: channel,
29457
+ directChannelUser: directChannelUser,
29458
+ isDirectChannel: isDirectChannel
29459
+ })), /*#__PURE__*/React__default.createElement(CustomCheckbox, {
28879
29460
  borderColor: iconInactive,
28880
29461
  index: channel.id,
28881
29462
  disabled: selectedChannels.length >= 5 && !isSelected,
@@ -28913,9 +29494,11 @@ function ForwardMessagePopup(_ref) {
28913
29494
  setDefaultAvatar: isDirectChannel
28914
29495
  }), /*#__PURE__*/React__default.createElement(ChannelInfo$3, null, /*#__PURE__*/React__default.createElement(ChannelTitle, {
28915
29496
  color: textPrimary
28916
- }, channel.subject || (isDirectChannel && isSelfChannel ? 'Me' : directChannelUser ? makeUsername(contactsMap[directChannelUser.id], directChannelUser, getFromContacts) : '')), /*#__PURE__*/React__default.createElement(ChannelMembers, {
28917
- color: textSecondary
28918
- }, isDirectChannel && directChannelUser ? (hideUserPresence && hideUserPresence(directChannelUser) ? '' : directChannelUser.presence && directChannelUser.presence.state === USER_PRESENCE_STATUS.ONLINE) ? 'Online' : directChannelUser && directChannelUser.presence && directChannelUser.presence.lastActiveAt && userLastActiveDateFormat(directChannelUser.presence.lastActiveAt) : channel.memberCount + " " + (channel.type === DEFAULT_CHANNEL_TYPE.BROADCAST || channel.type === DEFAULT_CHANNEL_TYPE.PUBLIC ? channel.memberCount > 1 ? 'subscribers' : 'subscriber' : channel.memberCount > 1 ? 'members' : 'member') + " ")), /*#__PURE__*/React__default.createElement(CustomCheckbox, {
29497
+ }, channel.subject || (isDirectChannel && isSelfChannel ? 'Me' : directChannelUser ? makeUsername(contactsMap[directChannelUser.id], directChannelUser, getFromContacts) : '')), /*#__PURE__*/React__default.createElement(ChannelMembersItem, {
29498
+ channel: channel,
29499
+ directChannelUser: directChannelUser,
29500
+ isDirectChannel: isDirectChannel
29501
+ })), /*#__PURE__*/React__default.createElement(CustomCheckbox, {
28919
29502
  borderColor: iconInactive,
28920
29503
  index: channel.id,
28921
29504
  disabled: selectedChannels.length >= 5 && !isSelected,
@@ -29703,7 +30286,7 @@ var IconWrapper = styled.span(_templateObject10$2 || (_templateObject10$2 = _tag
29703
30286
  }, function (props) {
29704
30287
  return props.hideInMobile && "\n @media (max-width: 550px) {\n display: none;\n }\n ";
29705
30288
  });
29706
- var CarouselItem = styled.div(_templateObject11$2 || (_templateObject11$2 = _taggedTemplateLiteralLoose(["\n position: relative;\n display: flex;\n opacity: ", ";\n\n img,\n video {\n //max-width: calc(100vw - 300px);\n min-width: 280px;\n max-width: 100%;\n max-height: calc(100vh - 200px);\n height: 100%;\n @media (max-width: 480px) {\n min-width: inherit;\n }\n }\n\n img {\n min-width: inherit;\n }\n"])), function (props) {
30289
+ var CarouselItem = styled.div(_templateObject11$2 || (_templateObject11$2 = _taggedTemplateLiteralLoose(["\n position: relative;\n display: flex;\n opacity: ", ";\n\n img,\n video {\n min-width: 280px;\n max-width: 100%;\n max-height: calc(100vh - 200px);\n height: 100%;\n width: 100%;\n @media (max-width: 480px) {\n min-width: inherit;\n }\n }\n\n img {\n min-width: inherit;\n }\n"])), function (props) {
29707
30290
  return props.visibleSlide ? 1 : 0;
29708
30291
  });
29709
30292
  var UploadCont$1 = styled.div(_templateObject12$2 || (_templateObject12$2 = _taggedTemplateLiteralLoose(["\n //position: absolute;\n left: 0;\n top: 0;\n width: 100%;\n height: 100%;\n min-height: 100px;\n min-width: 100px;\n display: flex;\n align-items: center;\n justify-content: center;\n"])));
@@ -36089,7 +36672,7 @@ var OGTextWrapper = styled.div(_templateObject9$e || (_templateObject9$e = _tagg
36089
36672
  var FaviconContainer = styled.div(_templateObject0$d || (_templateObject0$d = _taggedTemplateLiteralLoose(["\n width: 52px;\n height: 52px;\n border-radius: 8px;\n overflow: hidden;\n margin: 8px;\n flex: 0 0 52px;\n"])));
36090
36673
  var FaviconImg = styled.img(_templateObject1$a || (_templateObject1$a = _taggedTemplateLiteralLoose(["\n width: 100%;\n height: 100%;\n object-fit: cover;\n display: block;\n"])));
36091
36674
 
36092
- var _templateObject$H, _templateObject2$C, _templateObject3$w, _templateObject4$r, _templateObject5$m;
36675
+ var _templateObject$H, _templateObject2$C, _templateObject3$w, _templateObject4$r, _templateObject5$m, _templateObject6$k, _templateObject7$j;
36093
36676
  var MessageBody = function MessageBody(_ref) {
36094
36677
  var message = _ref.message,
36095
36678
  channel = _ref.channel,
@@ -36238,7 +36821,8 @@ var MessageBody = function MessageBody(_ref) {
36238
36821
  shouldOpenUserProfileForMention = _ref.shouldOpenUserProfileForMention,
36239
36822
  ogMetadataProps = _ref.ogMetadataProps,
36240
36823
  unsupportedMessage = _ref.unsupportedMessage,
36241
- onInviteLinkClick = _ref.onInviteLinkClick;
36824
+ onInviteLinkClick = _ref.onInviteLinkClick,
36825
+ collapsedCharacterLimit = _ref.collapsedCharacterLimit;
36242
36826
  var _useColor = useColors(),
36243
36827
  accentColor = _useColor[THEME_COLORS.ACCENT],
36244
36828
  textPrimary = _useColor[THEME_COLORS.TEXT_PRIMARY],
@@ -36253,6 +36837,61 @@ var MessageBody = function MessageBody(_ref) {
36253
36837
  var user = ChatClient.user;
36254
36838
  var getFromContacts = getShowOnlyContactUsers();
36255
36839
  var messageUserID = message.user ? message.user.id : 'deleted';
36840
+ var _useState = useState(false),
36841
+ isExpanded = _useState[0],
36842
+ setIsExpanded = _useState[1];
36843
+ var textContainerRef = useRef(null);
36844
+ var _useState2 = useState('auto'),
36845
+ textHeight = _useState2[0],
36846
+ setTextHeight = _useState2[1];
36847
+ var messageText = useMemo(function () {
36848
+ return MessageTextFormat({
36849
+ text: message.body,
36850
+ message: message,
36851
+ contactsMap: contactsMap,
36852
+ getFromContacts: getFromContacts,
36853
+ accentColor: accentColor,
36854
+ textSecondary: textSecondary,
36855
+ onMentionNameClick: handleOpenUserProfile,
36856
+ shouldOpenUserProfileForMention: !!shouldOpenUserProfileForMention,
36857
+ unsupportedMessage: unsupportedMessage,
36858
+ target: ogMetadataProps === null || ogMetadataProps === void 0 ? void 0 : ogMetadataProps.target,
36859
+ isInviteLink: (ogMetadataProps === null || ogMetadataProps === void 0 ? void 0 : ogMetadataProps.isInviteLink) || false,
36860
+ onInviteLinkClick: onInviteLinkClick
36861
+ });
36862
+ }, [message, contactsMap, getFromContacts, accentColor, textSecondary, shouldOpenUserProfileForMention, unsupportedMessage, ogMetadataProps === null || ogMetadataProps === void 0 ? void 0 : ogMetadataProps.target, ogMetadataProps === null || ogMetadataProps === void 0 ? void 0 : ogMetadataProps.isInviteLink, onInviteLinkClick]);
36863
+ var messageTextTrimmed = useMemo(function () {
36864
+ if (!message.body) return {
36865
+ result: messageText,
36866
+ truncated: false
36867
+ };
36868
+ if (isExpanded) return {
36869
+ result: messageText,
36870
+ truncated: false
36871
+ };
36872
+ return trimReactMessage(messageText, collapsedCharacterLimit);
36873
+ }, [message.body, messageText, isExpanded, collapsedCharacterLimit]);
36874
+ useEffect(function () {
36875
+ if (textContainerRef.current && typeof collapsedCharacterLimit === 'number' && collapsedCharacterLimit >= 0) {
36876
+ if (messageTextTrimmed.truncated && !isExpanded) {
36877
+ requestAnimationFrame(function () {
36878
+ if (textContainerRef.current) {
36879
+ var height = textContainerRef.current.scrollHeight;
36880
+ setTextHeight(height);
36881
+ }
36882
+ });
36883
+ } else if (isExpanded) {
36884
+ requestAnimationFrame(function () {
36885
+ if (textContainerRef.current) {
36886
+ var fullHeight = textContainerRef.current.scrollHeight;
36887
+ setTextHeight(fullHeight);
36888
+ }
36889
+ });
36890
+ } else if (!messageTextTrimmed.truncated && textHeight !== 'auto') {
36891
+ setTextHeight('auto');
36892
+ }
36893
+ }
36894
+ }, [isExpanded, messageTextTrimmed.truncated, textHeight, collapsedCharacterLimit]);
36256
36895
  var prevMessageUserID = useMemo(function () {
36257
36896
  return prevMessage ? prevMessage.user ? prevMessage.user.id : 'deleted' : null;
36258
36897
  }, [prevMessage]);
@@ -36550,22 +37189,17 @@ var MessageBody = function MessageBody(_ref) {
36550
37189
  ogContainerShowBackground: ogMetadataProps === null || ogMetadataProps === void 0 ? void 0 : ogMetadataProps.ogContainerShowBackground,
36551
37190
  ogContainerBackground: ogMetadataProps === null || ogMetadataProps === void 0 ? void 0 : ogMetadataProps.ogContainerBackground,
36552
37191
  infoPadding: ogMetadataProps === null || ogMetadataProps === void 0 ? void 0 : ogMetadataProps.infoPadding
36553
- })), message.type !== MESSAGE_TYPE.POLL && (/*#__PURE__*/React__default.createElement("span", {
37192
+ })), message.type !== MESSAGE_TYPE.POLL && (/*#__PURE__*/React__default.createElement(TextContentContainer, {
37193
+ ref: textContainerRef,
37194
+ textHeight: textHeight
37195
+ }, /*#__PURE__*/React__default.createElement("span", {
36554
37196
  ref: messageTextRef
36555
- }, MessageTextFormat({
36556
- text: message.body,
36557
- message: message,
36558
- contactsMap: contactsMap,
36559
- getFromContacts: getFromContacts,
36560
- accentColor: accentColor,
36561
- textSecondary: textSecondary,
36562
- onMentionNameClick: handleOpenUserProfile,
36563
- shouldOpenUserProfileForMention: !!shouldOpenUserProfileForMention,
36564
- unsupportedMessage: unsupportedMessage,
36565
- target: ogMetadataProps === null || ogMetadataProps === void 0 ? void 0 : ogMetadataProps.target,
36566
- isInviteLink: (ogMetadataProps === null || ogMetadataProps === void 0 ? void 0 : ogMetadataProps.isInviteLink) || false,
36567
- onInviteLinkClick: onInviteLinkClick
36568
- }))), !withAttachments && message.state === MESSAGE_STATUS.DELETE ? (/*#__PURE__*/React__default.createElement(MessageStatusDeleted$1, {
37197
+ }, messageTextTrimmed === null || messageTextTrimmed === void 0 ? void 0 : messageTextTrimmed.result, messageTextTrimmed !== null && messageTextTrimmed !== void 0 && messageTextTrimmed.truncated && !isExpanded ? '...' : ''), messageTextTrimmed.truncated && !isExpanded && (/*#__PURE__*/React__default.createElement(ReadMoreLink, {
37198
+ onClick: function onClick() {
37199
+ return setIsExpanded(true);
37200
+ },
37201
+ accentColor: accentColor
37202
+ }, "Read more")))), !withAttachments && message.state === MESSAGE_STATUS.DELETE ? (/*#__PURE__*/React__default.createElement(MessageStatusDeleted$1, {
36569
37203
  color: textSecondary
36570
37204
  }, " Message was deleted. ")) : '', !ogContainerFirst && linkAttachment && !mediaAttachment && !withMediaAttachment && !fileAttachment && (/*#__PURE__*/React__default.createElement(OGMetadata, {
36571
37205
  maxWidth: ogMetadataContainerWidth,
@@ -36683,7 +37317,7 @@ var MessageBody = function MessageBody(_ref) {
36683
37317
  };
36684
37318
  var MessageBody$1 = /*#__PURE__*/React__default.memo(MessageBody, function (prevProps, nextProps) {
36685
37319
  var _prevProps$ogMetadata, _nextProps$ogMetadata, _prevProps$ogMetadata2, _nextProps$ogMetadata2, _prevProps$ogMetadata3, _nextProps$ogMetadata3, _prevProps$ogMetadata4, _nextProps$ogMetadata4, _prevProps$ogMetadata5, _nextProps$ogMetadata5, _prevProps$ogMetadata6, _nextProps$ogMetadata6;
36686
- return !!(prevProps.message.deliveryStatus === nextProps.message.deliveryStatus && prevProps.message.state === nextProps.message.state && prevProps.message.userReactions === nextProps.message.userReactions && prevProps.message.body === nextProps.message.body && prevProps.message.reactionTotals === nextProps.message.reactionTotals && prevProps.message.attachments === nextProps.message.attachments && prevProps.message.userMarkers === nextProps.message.userMarkers && prevProps.prevMessage === nextProps.prevMessage && prevProps.nextMessage === nextProps.nextMessage && prevProps.selectedMessagesMap === nextProps.selectedMessagesMap && prevProps.contactsMap === nextProps.contactsMap && prevProps.connectionStatus === nextProps.connectionStatus && prevProps.openedMessageMenuId === nextProps.openedMessageMenuId && prevProps.ownMessageOnRightSide === nextProps.ownMessageOnRightSide && prevProps.showSenderNameOnDirectChannel === nextProps.showSenderNameOnDirectChannel && prevProps.showSenderNameOnGroupChannel === nextProps.showSenderNameOnGroupChannel && prevProps.showSenderNameOnOwnMessages === nextProps.showSenderNameOnOwnMessages && prevProps.messageStatusAndTimePosition === nextProps.messageStatusAndTimePosition && prevProps.messageStatusDisplayingType === nextProps.messageStatusDisplayingType && prevProps.outgoingMessageStyles === nextProps.outgoingMessageStyles && prevProps.incomingMessageStyles === nextProps.incomingMessageStyles && prevProps.ownRepliedMessageBackground === nextProps.ownRepliedMessageBackground && prevProps.incomingRepliedMessageBackground === nextProps.incomingRepliedMessageBackground && prevProps.showMessageStatus === nextProps.showMessageStatus && prevProps.showMessageTimeAndStatusOnlyOnHover === nextProps.showMessageTimeAndStatusOnlyOnHover && prevProps.showMessageTime === nextProps.showMessageTime && prevProps.showMessageStatusForEachMessage === nextProps.showMessageStatusForEachMessage && prevProps.showMessageTimeForEachMessage === nextProps.showMessageTimeForEachMessage && prevProps.messageReaction === nextProps.messageReaction && prevProps.editMessage === nextProps.editMessage && prevProps.copyMessage === nextProps.copyMessage && prevProps.replyMessage === nextProps.replyMessage && prevProps.replyMessageInThread === nextProps.replyMessageInThread && prevProps.forwardMessage === nextProps.forwardMessage && prevProps.deleteMessage === nextProps.deleteMessage && prevProps.selectMessage === nextProps.selectMessage && prevProps.allowEditDeleteIncomingMessage === nextProps.allowEditDeleteIncomingMessage && prevProps.reportMessage === nextProps.reportMessage && prevProps.reactionIcon === nextProps.reactionIcon && prevProps.editIcon === nextProps.editIcon && prevProps.copyIcon === nextProps.copyIcon && prevProps.replyIcon === nextProps.replyIcon && prevProps.replyInThreadIcon === nextProps.replyInThreadIcon && prevProps.forwardIcon === nextProps.forwardIcon && prevProps.deleteIcon === nextProps.deleteIcon && prevProps.selectIcon === nextProps.selectIcon && prevProps.starIcon === nextProps.starIcon && prevProps.staredIcon === nextProps.staredIcon && prevProps.reportIcon === nextProps.reportIcon && prevProps.fixEmojiCategoriesTitleOnTop === nextProps.fixEmojiCategoriesTitleOnTop && prevProps.emojisCategoryIconsPosition === nextProps.emojisCategoryIconsPosition && prevProps.emojisContainerBorderRadius === nextProps.emojisContainerBorderRadius && prevProps.reactionIconOrder === nextProps.reactionIconOrder && prevProps.editIconOrder === nextProps.editIconOrder && prevProps.copyIconOrder === nextProps.copyIconOrder && prevProps.replyIconOrder === nextProps.replyIconOrder && prevProps.replyInThreadIconOrder === nextProps.replyInThreadIconOrder && prevProps.forwardIconOrder === nextProps.forwardIconOrder && prevProps.deleteIconOrder === nextProps.deleteIconOrder && prevProps.selectIconOrder === nextProps.selectIconOrder && prevProps.starIconOrder === nextProps.starIconOrder && prevProps.reportIconOrder === nextProps.reportIconOrder && prevProps.reactionIconTooltipText === nextProps.reactionIconTooltipText && prevProps.editIconTooltipText === nextProps.editIconTooltipText && prevProps.copyIconTooltipText === nextProps.copyIconTooltipText && prevProps.replyIconTooltipText === nextProps.replyIconTooltipText && prevProps.replyInThreadIconTooltipText === nextProps.replyInThreadIconTooltipText && prevProps.forwardIconTooltipText === nextProps.forwardIconTooltipText && prevProps.deleteIconTooltipText === nextProps.deleteIconTooltipText && prevProps.selectIconTooltipText === nextProps.selectIconTooltipText && prevProps.starIconTooltipText === nextProps.starIconTooltipText && prevProps.reportIconTooltipText === nextProps.reportIconTooltipText && prevProps.messageActionIconsColor === nextProps.messageActionIconsColor && prevProps.inlineReactionIcon === nextProps.inlineReactionIcon && prevProps.messageStatusSize === nextProps.messageStatusSize && prevProps.messageStatusColor === nextProps.messageStatusColor && prevProps.messageReadStatusColor === nextProps.messageReadStatusColor && prevProps.messageStateFontSize === nextProps.messageStateFontSize && prevProps.messageStateColor === nextProps.messageStateColor && prevProps.messageTimeFontSize === nextProps.messageTimeFontSize && prevProps.messageTimeColor === nextProps.messageTimeColor && prevProps.messageStatusAndTimeLineHeight === nextProps.messageStatusAndTimeLineHeight && prevProps.fileAttachmentsBoxWidth === nextProps.fileAttachmentsBoxWidth && prevProps.fileAttachmentsBoxBackground === nextProps.fileAttachmentsBoxBackground && prevProps.fileAttachmentsBoxBorder === nextProps.fileAttachmentsBoxBorder && prevProps.fileAttachmentsTitleColor === nextProps.fileAttachmentsTitleColor && prevProps.fileAttachmentsSizeColor === nextProps.fileAttachmentsSizeColor && prevProps.fileAttachmentsIcon === nextProps.fileAttachmentsIcon && prevProps.imageAttachmentMaxWidth === nextProps.imageAttachmentMaxWidth && prevProps.imageAttachmentMaxHeight === nextProps.imageAttachmentMaxHeight && prevProps.videoAttachmentMaxWidth === nextProps.videoAttachmentMaxWidth && prevProps.videoAttachmentMaxHeight === nextProps.videoAttachmentMaxHeight && prevProps.theme === nextProps.theme && prevProps.messageTextFontSize === nextProps.messageTextFontSize && prevProps.messageTextLineHeight === nextProps.messageTextLineHeight && prevProps.messageActionsShow === nextProps.messageActionsShow && prevProps.emojisPopupOpen === nextProps.emojisPopupOpen && prevProps.emojisPopupPosition === nextProps.emojisPopupPosition && prevProps.frequentlyEmojisOpen === nextProps.frequentlyEmojisOpen && (((_prevProps$ogMetadata = prevProps.ogMetadataProps) === null || _prevProps$ogMetadata === void 0 ? void 0 : _prevProps$ogMetadata.ogLayoutOrder) || 'og-first') === (((_nextProps$ogMetadata = nextProps.ogMetadataProps) === null || _nextProps$ogMetadata === void 0 ? void 0 : _nextProps$ogMetadata.ogLayoutOrder) || 'og-first') && ((_prevProps$ogMetadata2 = prevProps.ogMetadataProps) === null || _prevProps$ogMetadata2 === void 0 ? void 0 : _prevProps$ogMetadata2.ogShowUrl) === ((_nextProps$ogMetadata2 = nextProps.ogMetadataProps) === null || _nextProps$ogMetadata2 === void 0 ? void 0 : _nextProps$ogMetadata2.ogShowUrl) && ((_prevProps$ogMetadata3 = prevProps.ogMetadataProps) === null || _prevProps$ogMetadata3 === void 0 ? void 0 : _prevProps$ogMetadata3.ogShowTitle) === ((_nextProps$ogMetadata3 = nextProps.ogMetadataProps) === null || _nextProps$ogMetadata3 === void 0 ? void 0 : _nextProps$ogMetadata3.ogShowTitle) && ((_prevProps$ogMetadata4 = prevProps.ogMetadataProps) === null || _prevProps$ogMetadata4 === void 0 ? void 0 : _prevProps$ogMetadata4.ogShowDescription) === ((_nextProps$ogMetadata4 = nextProps.ogMetadataProps) === null || _nextProps$ogMetadata4 === void 0 ? void 0 : _nextProps$ogMetadata4.ogShowDescription) && ((_prevProps$ogMetadata5 = prevProps.ogMetadataProps) === null || _prevProps$ogMetadata5 === void 0 ? void 0 : _prevProps$ogMetadata5.ogShowFavicon) === ((_nextProps$ogMetadata5 = nextProps.ogMetadataProps) === null || _nextProps$ogMetadata5 === void 0 ? void 0 : _nextProps$ogMetadata5.ogShowFavicon) && ((_prevProps$ogMetadata6 = prevProps.ogMetadataProps) === null || _prevProps$ogMetadata6 === void 0 ? void 0 : _prevProps$ogMetadata6.order) === ((_nextProps$ogMetadata6 = nextProps.ogMetadataProps) === null || _nextProps$ogMetadata6 === void 0 ? void 0 : _nextProps$ogMetadata6.order));
37320
+ return !!(prevProps.message.deliveryStatus === nextProps.message.deliveryStatus && prevProps.message.state === nextProps.message.state && prevProps.message.userReactions === nextProps.message.userReactions && prevProps.message.body === nextProps.message.body && prevProps.message.reactionTotals === nextProps.message.reactionTotals && prevProps.message.attachments === nextProps.message.attachments && prevProps.message.userMarkers === nextProps.message.userMarkers && prevProps.prevMessage === nextProps.prevMessage && prevProps.nextMessage === nextProps.nextMessage && prevProps.selectedMessagesMap === nextProps.selectedMessagesMap && prevProps.contactsMap === nextProps.contactsMap && prevProps.connectionStatus === nextProps.connectionStatus && prevProps.openedMessageMenuId === nextProps.openedMessageMenuId && prevProps.ownMessageOnRightSide === nextProps.ownMessageOnRightSide && prevProps.showSenderNameOnDirectChannel === nextProps.showSenderNameOnDirectChannel && prevProps.showSenderNameOnGroupChannel === nextProps.showSenderNameOnGroupChannel && prevProps.showSenderNameOnOwnMessages === nextProps.showSenderNameOnOwnMessages && prevProps.messageStatusAndTimePosition === nextProps.messageStatusAndTimePosition && prevProps.messageStatusDisplayingType === nextProps.messageStatusDisplayingType && prevProps.outgoingMessageStyles === nextProps.outgoingMessageStyles && prevProps.incomingMessageStyles === nextProps.incomingMessageStyles && prevProps.ownRepliedMessageBackground === nextProps.ownRepliedMessageBackground && prevProps.incomingRepliedMessageBackground === nextProps.incomingRepliedMessageBackground && prevProps.showMessageStatus === nextProps.showMessageStatus && prevProps.showMessageTimeAndStatusOnlyOnHover === nextProps.showMessageTimeAndStatusOnlyOnHover && prevProps.showMessageTime === nextProps.showMessageTime && prevProps.showMessageStatusForEachMessage === nextProps.showMessageStatusForEachMessage && prevProps.showMessageTimeForEachMessage === nextProps.showMessageTimeForEachMessage && prevProps.messageReaction === nextProps.messageReaction && prevProps.editMessage === nextProps.editMessage && prevProps.copyMessage === nextProps.copyMessage && prevProps.replyMessage === nextProps.replyMessage && prevProps.replyMessageInThread === nextProps.replyMessageInThread && prevProps.forwardMessage === nextProps.forwardMessage && prevProps.deleteMessage === nextProps.deleteMessage && prevProps.selectMessage === nextProps.selectMessage && prevProps.allowEditDeleteIncomingMessage === nextProps.allowEditDeleteIncomingMessage && prevProps.reportMessage === nextProps.reportMessage && prevProps.reactionIcon === nextProps.reactionIcon && prevProps.editIcon === nextProps.editIcon && prevProps.copyIcon === nextProps.copyIcon && prevProps.replyIcon === nextProps.replyIcon && prevProps.replyInThreadIcon === nextProps.replyInThreadIcon && prevProps.forwardIcon === nextProps.forwardIcon && prevProps.deleteIcon === nextProps.deleteIcon && prevProps.selectIcon === nextProps.selectIcon && prevProps.starIcon === nextProps.starIcon && prevProps.staredIcon === nextProps.staredIcon && prevProps.reportIcon === nextProps.reportIcon && prevProps.fixEmojiCategoriesTitleOnTop === nextProps.fixEmojiCategoriesTitleOnTop && prevProps.emojisCategoryIconsPosition === nextProps.emojisCategoryIconsPosition && prevProps.emojisContainerBorderRadius === nextProps.emojisContainerBorderRadius && prevProps.reactionIconOrder === nextProps.reactionIconOrder && prevProps.editIconOrder === nextProps.editIconOrder && prevProps.copyIconOrder === nextProps.copyIconOrder && prevProps.replyIconOrder === nextProps.replyIconOrder && prevProps.replyInThreadIconOrder === nextProps.replyInThreadIconOrder && prevProps.forwardIconOrder === nextProps.forwardIconOrder && prevProps.deleteIconOrder === nextProps.deleteIconOrder && prevProps.selectIconOrder === nextProps.selectIconOrder && prevProps.starIconOrder === nextProps.starIconOrder && prevProps.reportIconOrder === nextProps.reportIconOrder && prevProps.reactionIconTooltipText === nextProps.reactionIconTooltipText && prevProps.editIconTooltipText === nextProps.editIconTooltipText && prevProps.copyIconTooltipText === nextProps.copyIconTooltipText && prevProps.replyIconTooltipText === nextProps.replyIconTooltipText && prevProps.replyInThreadIconTooltipText === nextProps.replyInThreadIconTooltipText && prevProps.forwardIconTooltipText === nextProps.forwardIconTooltipText && prevProps.deleteIconTooltipText === nextProps.deleteIconTooltipText && prevProps.selectIconTooltipText === nextProps.selectIconTooltipText && prevProps.starIconTooltipText === nextProps.starIconTooltipText && prevProps.reportIconTooltipText === nextProps.reportIconTooltipText && prevProps.messageActionIconsColor === nextProps.messageActionIconsColor && prevProps.inlineReactionIcon === nextProps.inlineReactionIcon && prevProps.messageStatusSize === nextProps.messageStatusSize && prevProps.messageStatusColor === nextProps.messageStatusColor && prevProps.messageReadStatusColor === nextProps.messageReadStatusColor && prevProps.messageStateFontSize === nextProps.messageStateFontSize && prevProps.messageStateColor === nextProps.messageStateColor && prevProps.messageTimeFontSize === nextProps.messageTimeFontSize && prevProps.messageTimeColor === nextProps.messageTimeColor && prevProps.messageStatusAndTimeLineHeight === nextProps.messageStatusAndTimeLineHeight && prevProps.fileAttachmentsBoxWidth === nextProps.fileAttachmentsBoxWidth && prevProps.fileAttachmentsBoxBackground === nextProps.fileAttachmentsBoxBackground && prevProps.fileAttachmentsBoxBorder === nextProps.fileAttachmentsBoxBorder && prevProps.fileAttachmentsTitleColor === nextProps.fileAttachmentsTitleColor && prevProps.fileAttachmentsSizeColor === nextProps.fileAttachmentsSizeColor && prevProps.fileAttachmentsIcon === nextProps.fileAttachmentsIcon && prevProps.imageAttachmentMaxWidth === nextProps.imageAttachmentMaxWidth && prevProps.imageAttachmentMaxHeight === nextProps.imageAttachmentMaxHeight && prevProps.videoAttachmentMaxWidth === nextProps.videoAttachmentMaxWidth && prevProps.videoAttachmentMaxHeight === nextProps.videoAttachmentMaxHeight && prevProps.theme === nextProps.theme && prevProps.messageTextFontSize === nextProps.messageTextFontSize && prevProps.messageTextLineHeight === nextProps.messageTextLineHeight && prevProps.messageActionsShow === nextProps.messageActionsShow && prevProps.emojisPopupOpen === nextProps.emojisPopupOpen && prevProps.emojisPopupPosition === nextProps.emojisPopupPosition && prevProps.frequentlyEmojisOpen === nextProps.frequentlyEmojisOpen && (((_prevProps$ogMetadata = prevProps.ogMetadataProps) === null || _prevProps$ogMetadata === void 0 ? void 0 : _prevProps$ogMetadata.ogLayoutOrder) || 'og-first') === (((_nextProps$ogMetadata = nextProps.ogMetadataProps) === null || _nextProps$ogMetadata === void 0 ? void 0 : _nextProps$ogMetadata.ogLayoutOrder) || 'og-first') && ((_prevProps$ogMetadata2 = prevProps.ogMetadataProps) === null || _prevProps$ogMetadata2 === void 0 ? void 0 : _prevProps$ogMetadata2.ogShowUrl) === ((_nextProps$ogMetadata2 = nextProps.ogMetadataProps) === null || _nextProps$ogMetadata2 === void 0 ? void 0 : _nextProps$ogMetadata2.ogShowUrl) && ((_prevProps$ogMetadata3 = prevProps.ogMetadataProps) === null || _prevProps$ogMetadata3 === void 0 ? void 0 : _prevProps$ogMetadata3.ogShowTitle) === ((_nextProps$ogMetadata3 = nextProps.ogMetadataProps) === null || _nextProps$ogMetadata3 === void 0 ? void 0 : _nextProps$ogMetadata3.ogShowTitle) && ((_prevProps$ogMetadata4 = prevProps.ogMetadataProps) === null || _prevProps$ogMetadata4 === void 0 ? void 0 : _prevProps$ogMetadata4.ogShowDescription) === ((_nextProps$ogMetadata4 = nextProps.ogMetadataProps) === null || _nextProps$ogMetadata4 === void 0 ? void 0 : _nextProps$ogMetadata4.ogShowDescription) && ((_prevProps$ogMetadata5 = prevProps.ogMetadataProps) === null || _prevProps$ogMetadata5 === void 0 ? void 0 : _prevProps$ogMetadata5.ogShowFavicon) === ((_nextProps$ogMetadata5 = nextProps.ogMetadataProps) === null || _nextProps$ogMetadata5 === void 0 ? void 0 : _nextProps$ogMetadata5.ogShowFavicon) && ((_prevProps$ogMetadata6 = prevProps.ogMetadataProps) === null || _prevProps$ogMetadata6 === void 0 ? void 0 : _prevProps$ogMetadata6.order) === ((_nextProps$ogMetadata6 = nextProps.ogMetadataProps) === null || _nextProps$ogMetadata6 === void 0 ? void 0 : _nextProps$ogMetadata6.order) && prevProps.collapsedCharacterLimit === nextProps.collapsedCharacterLimit);
36687
37321
  });
36688
37322
  var ForwardedTitle = styled.h3(_templateObject$H || (_templateObject$H = _taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n font-weight: 500;\n font-size: 13px;\n line-height: 16px;\n color: ", ";\n // margin: ", ";\n margin: 0;\n padding: ", ";\n padding-top: ", ";\n padding-bottom: ", ";\n\n & > svg {\n margin-right: 4px;\n width: 16px;\n height: 16px;\n color: ", ";\n }\n"])), function (props) {
36689
37323
  return props.color;
@@ -36740,8 +37374,14 @@ var FrequentlyEmojisContainer = styled.div(_templateObject5$m || (_templateObjec
36740
37374
  }, function (props) {
36741
37375
  return props.rtlDirection && '0';
36742
37376
  });
37377
+ var TextContentContainer = styled.div(_templateObject6$k || (_templateObject6$k = _taggedTemplateLiteralLoose(["\n overflow: hidden;\n height: ", ";\n transition: height 0.3s ease-out;\n"])), function (props) {
37378
+ return props.textHeight !== 'auto' ? props.textHeight + "px" : 'auto';
37379
+ });
37380
+ var ReadMoreLink = styled.span(_templateObject7$j || (_templateObject7$j = _taggedTemplateLiteralLoose(["\n display: block;\n color: ", ";\n cursor: pointer;\n font-weight: 500;\n margin-top: 8px;\n font-style: Medium;\n font-size: 15px;\n line-height: 20px;\n letter-spacing: -0.4px;\n user-select: none;\n transition: opacity 0.2s ease;\n"])), function (props) {
37381
+ return props.accentColor;
37382
+ });
36743
37383
 
36744
- var _templateObject$I, _templateObject2$D, _templateObject3$x, _templateObject4$s, _templateObject5$n, _templateObject6$k, _templateObject7$j, _templateObject8$h, _templateObject9$f, _templateObject0$e, _templateObject1$b;
37384
+ var _templateObject$I, _templateObject2$D, _templateObject3$x, _templateObject4$s, _templateObject5$n, _templateObject6$l, _templateObject7$k, _templateObject8$h, _templateObject9$f, _templateObject0$e, _templateObject1$b;
36745
37385
  var defaultFormatDate = function defaultFormatDate(date) {
36746
37386
  var m = moment(date);
36747
37387
  if (m.isSame(moment(), 'day')) {
@@ -37236,10 +37876,10 @@ var Row$2 = styled.div(_templateObject4$s || (_templateObject4$s = _taggedTempla
37236
37876
  return p.backgroundHover;
37237
37877
  });
37238
37878
  var RowInfo = styled.div(_templateObject5$n || (_templateObject5$n = _taggedTemplateLiteralLoose(["\n display: flex;\n margin-right: auto;\n min-width: 0;\n align-items: center;\n justify-content: space-between;\n width: 100%;\n"])));
37239
- var RowTitle = styled.div(_templateObject6$k || (_templateObject6$k = _taggedTemplateLiteralLoose(["\n color: ", ";\n font-size: 16px;\n font-weight: 500;\n line-height: 22px;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n"])), function (p) {
37879
+ var RowTitle = styled.div(_templateObject6$l || (_templateObject6$l = _taggedTemplateLiteralLoose(["\n color: ", ";\n font-size: 16px;\n font-weight: 500;\n line-height: 22px;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n"])), function (p) {
37240
37880
  return p.color;
37241
37881
  });
37242
- var RowDate = styled.div(_templateObject7$j || (_templateObject7$j = _taggedTemplateLiteralLoose(["\n color: ", ";\n min-width: max-content;\n font-weight: 400;\n font-size: 13px;\n line-height: 16px;\n"])), function (p) {
37882
+ var RowDate = styled.div(_templateObject7$k || (_templateObject7$k = _taggedTemplateLiteralLoose(["\n color: ", ";\n min-width: max-content;\n font-weight: 400;\n font-size: 13px;\n line-height: 16px;\n"])), function (p) {
37243
37883
  return p.color;
37244
37884
  });
37245
37885
  var Empty = styled.div(_templateObject8$h || (_templateObject8$h = _taggedTemplateLiteralLoose(["\n color: ", ";\n text-align: center;\n padding: 16px 0;\n font-size: 14px;\n height: calc(100% - 32px);\n display: flex;\n align-items: center;\n justify-content: center;\n overflow: hidden;\n"])), function (p) {
@@ -37285,7 +37925,7 @@ function ConfirmEndPollPopup(_ref) {
37285
37925
  });
37286
37926
  }
37287
37927
 
37288
- var _templateObject$J, _templateObject2$E, _templateObject3$y, _templateObject4$t, _templateObject5$o, _templateObject6$l, _templateObject7$k, _templateObject8$i, _templateObject9$g, _templateObject0$f, _templateObject1$c, _templateObject10$7, _templateObject11$5, _templateObject12$4;
37928
+ var _templateObject$J, _templateObject2$E, _templateObject3$y, _templateObject4$t, _templateObject5$o, _templateObject6$m, _templateObject7$l, _templateObject8$i, _templateObject9$g, _templateObject0$f, _templateObject1$c, _templateObject10$7, _templateObject11$5, _templateObject12$4;
37289
37929
  var Message$1 = function Message(_ref) {
37290
37930
  var message = _ref.message,
37291
37931
  channel = _ref.channel,
@@ -37443,7 +38083,8 @@ var Message$1 = function Message(_ref) {
37443
38083
  shouldOpenUserProfileForMention = _ref.shouldOpenUserProfileForMention,
37444
38084
  ogMetadataProps = _ref.ogMetadataProps,
37445
38085
  _ref$showInfoMessageP = _ref.showInfoMessageProps,
37446
- showInfoMessageProps = _ref$showInfoMessageP === void 0 ? {} : _ref$showInfoMessageP;
38086
+ showInfoMessageProps = _ref$showInfoMessageP === void 0 ? {} : _ref$showInfoMessageP,
38087
+ collapsedCharacterLimit = _ref.collapsedCharacterLimit;
37447
38088
  var _useColor = useColors(),
37448
38089
  accentColor = _useColor[THEME_COLORS.ACCENT],
37449
38090
  backgroundSections = _useColor[THEME_COLORS.BACKGROUND_SECTIONS],
@@ -37587,7 +38228,17 @@ var Message$1 = function Message(_ref) {
37587
38228
  setMessageActionsShow(false);
37588
38229
  };
37589
38230
  var handleCopyMessage = function handleCopyMessage() {
37590
- navigator.clipboard.writeText(messageTextRef.current.innerText);
38231
+ var getFromContacts = getShowOnlyContactUsers();
38232
+ var textToCopyHTML = MessageTextFormat({
38233
+ text: message.body,
38234
+ message: message,
38235
+ contactsMap: contactsMap,
38236
+ getFromContacts: getFromContacts,
38237
+ accentColor: '',
38238
+ textSecondary: ''
38239
+ });
38240
+ var textToCopy = typeof textToCopyHTML === 'string' ? textToCopyHTML : _extractTextFromReactElement(textToCopyHTML);
38241
+ navigator.clipboard.writeText(textToCopy);
37591
38242
  setMessageActionsShow(false);
37592
38243
  };
37593
38244
  var handleToggleReactionsPopup = function handleToggleReactionsPopup() {
@@ -37976,7 +38627,8 @@ var Message$1 = function Message(_ref) {
37976
38627
  handleOpenUserProfile: handleOpenUserProfile,
37977
38628
  shouldOpenUserProfileForMention: shouldOpenUserProfileForMention,
37978
38629
  ogMetadataProps: ogMetadataProps,
37979
- unsupportedMessage: unsupportedMessage
38630
+ unsupportedMessage: unsupportedMessage,
38631
+ collapsedCharacterLimit: collapsedCharacterLimit
37980
38632
  })), messageStatusAndTimePosition === 'bottomOfMessage' && (messageStatusVisible || messageTimeVisible) && (/*#__PURE__*/React__default.createElement(MessageStatusAndTime$1, {
37981
38633
  message: message,
37982
38634
  showMessageTimeAndStatusOnlyOnHover: showMessageTimeAndStatusOnlyOnHover,
@@ -38115,8 +38767,8 @@ var FailedMessageIcon = styled.div(_templateObject5$o || (_templateObject5$o = _
38115
38767
  }, function (props) {
38116
38768
  return props.rtl && '-24px';
38117
38769
  });
38118
- var ErrorIconWrapper = styled(SvgErrorIcon)(_templateObject6$l || (_templateObject6$l = _taggedTemplateLiteralLoose(["\n width: 20px;\n height: 20px;\n"])));
38119
- var SelectMessageWrapper = styled.div(_templateObject7$k || (_templateObject7$k = _taggedTemplateLiteralLoose(["\n display: flex;\n padding: 10px;\n position: absolute;\n left: 4%;\n bottom: calc(50% - 22px);\n cursor: ", ";\n & > svg {\n color: ", ";\n width: 24px;\n height: 24px;\n }\n"])), function (props) {
38770
+ var ErrorIconWrapper = styled(SvgErrorIcon)(_templateObject6$m || (_templateObject6$m = _taggedTemplateLiteralLoose(["\n width: 20px;\n height: 20px;\n"])));
38771
+ var SelectMessageWrapper = styled.div(_templateObject7$l || (_templateObject7$l = _taggedTemplateLiteralLoose(["\n display: flex;\n padding: 10px;\n position: absolute;\n left: 4%;\n bottom: calc(50% - 22px);\n cursor: ", ";\n & > svg {\n color: ", ";\n width: 24px;\n height: 24px;\n }\n"])), function (props) {
38120
38772
  return !props.disabled && 'pointer';
38121
38773
  }, function (props) {
38122
38774
  return props.activeColor;
@@ -38187,7 +38839,7 @@ var MessageItem = styled.div(_templateObject12$4 || (_templateObject12$4 = _tagg
38187
38839
  return props.hoverBackground || '';
38188
38840
  }, HiddenMessageTime$1, MessageStatus$1);
38189
38841
 
38190
- var _templateObject$K, _templateObject2$F, _templateObject3$z, _templateObject4$u, _templateObject5$p, _templateObject6$m, _templateObject7$l, _templateObject8$j, _templateObject9$h, _templateObject0$g, _templateObject1$d;
38842
+ var _templateObject$K, _templateObject2$F, _templateObject3$z, _templateObject4$u, _templateObject5$p, _templateObject6$n, _templateObject7$m, _templateObject8$j, _templateObject9$h, _templateObject0$g, _templateObject1$d;
38191
38843
  var CreateMessageDateDivider = function CreateMessageDateDivider(_ref) {
38192
38844
  var lastIndex = _ref.lastIndex,
38193
38845
  currentMessageDate = _ref.currentMessageDate,
@@ -38377,7 +39029,8 @@ var MessageList = function MessageList(_ref2) {
38377
39029
  shouldOpenUserProfileForMention = _ref2.shouldOpenUserProfileForMention,
38378
39030
  _ref2$showInfoMessage = _ref2.showInfoMessageProps,
38379
39031
  showInfoMessageProps = _ref2$showInfoMessage === void 0 ? {} : _ref2$showInfoMessage,
38380
- ogMetadataProps = _ref2.ogMetadataProps;
39032
+ ogMetadataProps = _ref2.ogMetadataProps,
39033
+ collapsedCharacterLimit = _ref2.collapsedCharacterLimit;
38381
39034
  var _useColor = useColors(),
38382
39035
  outgoingMessageBackground = _useColor[THEME_COLORS.OUTGOING_MESSAGE_BACKGROUND],
38383
39036
  themeBackgroundColor = _useColor[THEME_COLORS.BACKGROUND],
@@ -39238,7 +39891,8 @@ var MessageList = function MessageList(_ref2) {
39238
39891
  messageStatusAndTimeLineHeight: messageStatusAndTimeLineHeight,
39239
39892
  shouldOpenUserProfileForMention: shouldOpenUserProfileForMention,
39240
39893
  showInfoMessageProps: showInfoMessageProps,
39241
- ogMetadataProps: ogMetadataProps
39894
+ ogMetadataProps: ogMetadataProps,
39895
+ collapsedCharacterLimit: collapsedCharacterLimit
39242
39896
  }))), isUnreadMessage ? (/*#__PURE__*/React__default.createElement(MessageDivider, {
39243
39897
  theme: theme,
39244
39898
  newMessagesSeparatorTextColor: newMessagesSeparatorTextColor,
@@ -39301,12 +39955,12 @@ var DragAndDropContainer = styled.div(_templateObject5$p || (_templateObject5$p
39301
39955
  }, function (props) {
39302
39956
  return props.backgroundColor;
39303
39957
  });
39304
- var IconWrapper$1 = styled.span(_templateObject6$m || (_templateObject6$m = _taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n justify-content: center;\n height: 64px;\n width: 64px;\n background-color: ", ";\n border-radius: 50%;\n text-align: center;\n margin-bottom: 16px;\n transition: all 0.3s;\n pointer-events: none;\n\n & > svg {\n color: ", ";\n width: 32px;\n height: 32px;\n }\n"])), function (props) {
39958
+ var IconWrapper$1 = styled.span(_templateObject6$n || (_templateObject6$n = _taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n justify-content: center;\n height: 64px;\n width: 64px;\n background-color: ", ";\n border-radius: 50%;\n text-align: center;\n margin-bottom: 16px;\n transition: all 0.3s;\n pointer-events: none;\n\n & > svg {\n color: ", ";\n width: 32px;\n height: 32px;\n }\n"])), function (props) {
39305
39959
  return props.backgroundColor;
39306
39960
  }, function (props) {
39307
39961
  return props.iconColor;
39308
39962
  });
39309
- var DropAttachmentArea = styled.div(_templateObject7$l || (_templateObject7$l = _taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n justify-content: center;\n flex-direction: column;\n height: 100%;\n border: 1px dashed ", ";\n border-radius: 16px;\n margin: ", ";\n font-weight: 400;\n font-size: 15px;\n line-height: 18px;\n letter-spacing: -0.2px;\n color: ", ";\n transition: all 0.1s;\n\n &.dragover {\n background-color: ", ";\n border: 1px dashed ", ";\n\n ", " {\n background-color: ", ";\n }\n }\n"])), function (props) {
39963
+ var DropAttachmentArea = styled.div(_templateObject7$m || (_templateObject7$m = _taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n justify-content: center;\n flex-direction: column;\n height: 100%;\n border: 1px dashed ", ";\n border-radius: 16px;\n margin: ", ";\n font-weight: 400;\n font-size: 15px;\n line-height: 18px;\n letter-spacing: -0.2px;\n color: ", ";\n transition: all 0.1s;\n\n &.dragover {\n background-color: ", ";\n border: 1px dashed ", ";\n\n ", " {\n background-color: ", ";\n }\n }\n"])), function (props) {
39310
39964
  return props.borderColor;
39311
39965
  }, function (props) {
39312
39966
  return props.margin || '12px 32px 32px';
@@ -39499,7 +40153,8 @@ var MessagesContainer = function MessagesContainer(_ref) {
39499
40153
  },
39500
40154
  infoPadding: '0 8px',
39501
40155
  isInviteLink: false
39502
- } : _ref$ogMetadataProps;
40156
+ } : _ref$ogMetadataProps,
40157
+ collapsedCharacterLimit = _ref.collapsedCharacterLimit;
39503
40158
  return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(MessageList, {
39504
40159
  fontFamily: fontFamily,
39505
40160
  ownMessageOnRightSide: ownMessageOnRightSide,
@@ -39633,7 +40288,8 @@ var MessagesContainer = function MessagesContainer(_ref) {
39633
40288
  hiddenMessagesProperties: hiddenMessagesProperties,
39634
40289
  shouldOpenUserProfileForMention: shouldOpenUserProfileForMention,
39635
40290
  showInfoMessageProps: showInfoMessageProps,
39636
- ogMetadataProps: ogMetadataProps
40291
+ ogMetadataProps: ogMetadataProps,
40292
+ collapsedCharacterLimit: collapsedCharacterLimit
39637
40293
  }));
39638
40294
  };
39639
40295
 
@@ -39760,7 +40416,6 @@ var LENGTH_LIMIT = 75;
39760
40416
  var AtSignMentionsRegex = new RegExp('(^|\\s|\\()(' + '[' + TRIGGERS + ']' + '((?:' + VALID_CHARS + VALID_JOINS + '){0,' + LENGTH_LIMIT + '})' + ')$');
39761
40417
  var ALIAS_LENGTH_LIMIT = 50;
39762
40418
  var AtSignMentionsRegexAliasRegex = new RegExp('(^|\\s|\\()(' + '[' + TRIGGERS + ']' + '((?:' + VALID_CHARS + '){0,' + ALIAS_LENGTH_LIMIT + '})' + ')$');
39763
- var SUGGESTION_LIST_LENGTH_LIMIT = 50;
39764
40419
  var mentionsCache = new Map();
39765
40420
  var membersMap = {};
39766
40421
  function useMentionLookupService(mentionString, contactsMap, userId, members, getFromContacts) {
@@ -39884,11 +40539,16 @@ function MentionsContainer(_ref2) {
39884
40539
  selectedIndex = _ref2.selectedIndex,
39885
40540
  selectOptionAndCleanUp = _ref2.selectOptionAndCleanUp,
39886
40541
  setHighlightedIndex = _ref2.setHighlightedIndex,
39887
- setMentionsIsOpen = _ref2.setMentionsIsOpen;
40542
+ setMentionsIsOpen = _ref2.setMentionsIsOpen,
40543
+ channelId = _ref2.channelId;
39888
40544
  var theme = useSelector(themeSelector);
39889
40545
  var _useColor2 = useColors(),
39890
40546
  borderColor = _useColor2[THEME_COLORS.BORDER],
39891
40547
  background = _useColor2[THEME_COLORS.BACKGROUND];
40548
+ var dispatch = useDispatch();
40549
+ var membersHasNext = useSelector(membersHasNextSelector);
40550
+ var membersLoadingState = useSelector(membersLoadingStateSelector);
40551
+ var mentionsListRef = useRef(null);
39892
40552
  var contRef = useRef();
39893
40553
  var handleKeyDown = function handleKeyDown(event) {
39894
40554
  var code = event.code;
@@ -39929,13 +40589,22 @@ function MentionsContainer(_ref2) {
39929
40589
  setMentionsIsOpen(false);
39930
40590
  };
39931
40591
  }, []);
40592
+ var handleScroll = useCallback(function (e) {
40593
+ var target = e.currentTarget;
40594
+ var isScrolledToBottom = target.scrollHeight - target.scrollTop <= target.clientHeight + 10;
40595
+ if (isScrolledToBottom && membersHasNext && membersLoadingState !== LOADING_STATE.LOADING && channelId) {
40596
+ dispatch(loadMoreMembersAC(15, channelId));
40597
+ }
40598
+ }, [membersHasNext, membersLoadingState, channelId, dispatch]);
39932
40599
  return /*#__PURE__*/React__default.createElement(MentionsContainerWrapper, {
39933
40600
  className: 'typeahead-popover mentions-menu',
39934
40601
  ref: contRef
39935
40602
  }, /*#__PURE__*/React__default.createElement(MentionsList, {
40603
+ ref: mentionsListRef,
39936
40604
  borderColor: borderColor,
39937
40605
  backgroundColor: background,
39938
- theme: theme
40606
+ theme: theme,
40607
+ onScroll: handleScroll
39939
40608
  }, options.map(function (option, i) {
39940
40609
  return /*#__PURE__*/React__default.createElement(MentionsTypeaheadMenuItem, {
39941
40610
  index: i,
@@ -39958,7 +40627,8 @@ function MentionsPlugin(_ref3) {
39958
40627
  getFromContacts = _ref3.getFromContacts,
39959
40628
  setMentionMember = _ref3.setMentionMember,
39960
40629
  setMentionsIsOpen = _ref3.setMentionsIsOpen,
39961
- members = _ref3.members;
40630
+ members = _ref3.members,
40631
+ channelId = _ref3.channelId;
39962
40632
  var _useLexicalComposerCo = useLexicalComposerContext(),
39963
40633
  editor = _useLexicalComposerCo[0];
39964
40634
  var _useState2 = useState(null),
@@ -39971,8 +40641,8 @@ function MentionsPlugin(_ref3) {
39971
40641
  var options = useMemo(function () {
39972
40642
  return results.map(function (result) {
39973
40643
  return new MentionTypeaheadOption(result.name, result.id, result.presence, result.avatar);
39974
- }).slice(0, SUGGESTION_LIST_LENGTH_LIMIT);
39975
- }, [results]);
40644
+ });
40645
+ }, [results === null || results === void 0 ? void 0 : results.length]);
39976
40646
  var handleOnOpen = function handleOnOpen() {
39977
40647
  var menuElement = document.getElementById('typeahead-menu');
39978
40648
  if (menuElement) {
@@ -40014,13 +40684,14 @@ function MentionsPlugin(_ref3) {
40014
40684
  var selectedIndex = _ref4.selectedIndex,
40015
40685
  selectOptionAndCleanUp = _ref4.selectOptionAndCleanUp,
40016
40686
  setHighlightedIndex = _ref4.setHighlightedIndex;
40017
- return anchorElementRef.current && results.length ? /*#__PURE__*/createPortal(/*#__PURE__*/React__default.createElement(MentionsContainer, {
40687
+ return anchorElementRef.current && options.length ? /*#__PURE__*/createPortal(/*#__PURE__*/React__default.createElement(MentionsContainer, {
40018
40688
  queryString: queryString,
40019
40689
  options: options,
40020
40690
  setMentionsIsOpen: setMentionsIsOpen,
40021
40691
  selectOptionAndCleanUp: selectOptionAndCleanUp,
40022
40692
  selectedIndex: selectedIndex,
40023
- setHighlightedIndex: setHighlightedIndex
40693
+ setHighlightedIndex: setHighlightedIndex,
40694
+ channelId: channelId
40024
40695
  }), anchorElementRef.current) : null;
40025
40696
  }
40026
40697
  });
@@ -40735,26 +41406,121 @@ function EditMessagePlugin(_ref) {
40735
41406
  return null;
40736
41407
  }
40737
41408
 
40738
- function useFormatMessage(editor, editorState, setMessageBodyAttributes, setMessageText, messageToEdit) {
40739
- function $insertDataTransferForPlainText(dataTransfer, selection) {
40740
- var text = dataTransfer.getData('text/plain') || dataTransfer.getData('text/uri-list');
40741
- if (text != null) {
40742
- selection.insertRawText(text);
41409
+ function useFormatMessage(editor, editorState, setMessageBodyAttributes, setMessageText, setMentionedMember, messageToEdit, activeChannelMembers, contactsMap, getFromContacts) {
41410
+ if (activeChannelMembers === void 0) {
41411
+ activeChannelMembers = [];
41412
+ }
41413
+ if (contactsMap === void 0) {
41414
+ contactsMap = {};
41415
+ }
41416
+ if (getFromContacts === void 0) {
41417
+ getFromContacts = false;
41418
+ }
41419
+ function processMentionsInPastedText(pastedText, activeChannelMembers, contactsMap, getFromContacts, setMentionedMember, selection) {
41420
+ if (!pastedText) return;
41421
+ var contacts = getFromContacts ? [].concat(Object.values(contactsMap), activeChannelMembers) : activeChannelMembers;
41422
+ var mentionPatterns = [];
41423
+ contacts.forEach(function (contactOrMember) {
41424
+ var contactFromMap = contactsMap[contactOrMember.id];
41425
+ var contact = getFromContacts && contactFromMap ? contactFromMap : undefined;
41426
+ var member = contact ? undefined : contactOrMember;
41427
+ var fullDisplayName = makeUsername(contact, member, getFromContacts, false);
41428
+ if (fullDisplayName && fullDisplayName !== 'Deleted user') {
41429
+ mentionPatterns.push({
41430
+ pattern: "@" + fullDisplayName,
41431
+ contact: contactOrMember
41432
+ });
41433
+ }
41434
+ });
41435
+ mentionPatterns.sort(function (a, b) {
41436
+ return b.pattern.length - a.pattern.length;
41437
+ });
41438
+ var matches = [];
41439
+ var usedRanges = [];
41440
+ mentionPatterns.forEach(function (_ref) {
41441
+ var pattern = _ref.pattern,
41442
+ contact = _ref.contact;
41443
+ var searchIndex = 0;
41444
+ var _loop = function _loop() {
41445
+ var index = pastedText.indexOf(pattern, searchIndex);
41446
+ if (index === -1) return 1;
41447
+ var isOverlapping = usedRanges.some(function (range) {
41448
+ return index < range.end && index + pattern.length > range.start;
41449
+ });
41450
+ if (!isOverlapping) {
41451
+ var charBefore = index > 0 ? pastedText[index - 1] : undefined;
41452
+ var isValidStart = charBefore === undefined || charBefore === ' ' || charBefore === '\n' || charBefore === '\r';
41453
+ var charAfter = pastedText[index + pattern.length];
41454
+ var isValidEnd = charAfter === undefined || charAfter === ' ' || charAfter === '\n' || charAfter === '\r';
41455
+ if (isValidStart && isValidEnd) {
41456
+ matches.push({
41457
+ start: index,
41458
+ end: index + pattern.length,
41459
+ contact: contact,
41460
+ pattern: pattern
41461
+ });
41462
+ usedRanges.push({
41463
+ start: index,
41464
+ end: index + pattern.length
41465
+ });
41466
+ }
41467
+ }
41468
+ searchIndex = index + 1;
41469
+ };
41470
+ while (true) {
41471
+ if (_loop()) break;
41472
+ }
41473
+ });
41474
+ matches.sort(function (a, b) {
41475
+ return a.start - b.start;
41476
+ });
41477
+ var nodes = [];
41478
+ var currentIndex = 0;
41479
+ matches.forEach(function (_ref2) {
41480
+ var start = _ref2.start,
41481
+ end = _ref2.end,
41482
+ contact = _ref2.contact,
41483
+ pattern = _ref2.pattern;
41484
+ if (start > currentIndex) {
41485
+ var textBefore = pastedText.substring(currentIndex, start);
41486
+ if (textBefore) {
41487
+ nodes.push($createTextNode(textBefore));
41488
+ }
41489
+ }
41490
+ setMentionedMember(contact);
41491
+ var mentionNode = $createMentionNode(_extends({}, contact, {
41492
+ name: pattern
41493
+ }));
41494
+ nodes.push(mentionNode);
41495
+ currentIndex = end;
41496
+ });
41497
+ if (currentIndex < pastedText.length) {
41498
+ var remainingText = pastedText.substring(currentIndex);
41499
+ if (remainingText) {
41500
+ nodes.push($createTextNode(remainingText));
41501
+ }
41502
+ }
41503
+ if (matches.length === 0) {
41504
+ selection.insertText(pastedText);
41505
+ } else if (nodes.length > 0) {
41506
+ selection.insertNodes(nodes);
40743
41507
  }
40744
41508
  }
40745
41509
  var handlePast = useCallback(function (e) {
40746
- var pastedTex = e.clipboardData.getData('text/plain');
40747
- if (pastedTex) {
41510
+ if (!('clipboardData' in e) || !e.clipboardData) {
41511
+ return false;
41512
+ }
41513
+ var pastedText = e.clipboardData.getData('text/plain');
41514
+ if (pastedText) {
40748
41515
  editor.update(function () {
40749
41516
  var selection = $getSelection();
40750
- var _event = event,
40751
- clipboardData = _event.clipboardData;
40752
- if (clipboardData != null && $isRangeSelection(selection)) {
40753
- $insertDataTransferForPlainText(clipboardData, selection);
41517
+ if ($isRangeSelection(selection)) {
41518
+ processMentionsInPastedText(pastedText, activeChannelMembers, contactsMap, getFromContacts, setMentionedMember, selection);
40754
41519
  }
40755
41520
  });
40756
41521
  }
40757
- }, [editor]);
41522
+ return true;
41523
+ }, [editor, contactsMap, setMentionedMember, getFromContacts, activeChannelMembers]);
40758
41524
  var onDelete = useCallback(function (event) {
40759
41525
  event.preventDefault();
40760
41526
  editor.update(function () {
@@ -40868,18 +41634,22 @@ function useFormatMessage(editor, editorState, setMessageBodyAttributes, setMess
40868
41634
  }
40869
41635
  }, [editor, editorState]);
40870
41636
  }
40871
- function FormatMessagePlugin(_ref) {
40872
- var editorState = _ref.editorState,
40873
- setMessageBodyAttributes = _ref.setMessageBodyAttributes,
40874
- setMessageText = _ref.setMessageText,
40875
- messageToEdit = _ref.messageToEdit;
41637
+ function FormatMessagePlugin(_ref3) {
41638
+ var editorState = _ref3.editorState,
41639
+ setMessageBodyAttributes = _ref3.setMessageBodyAttributes,
41640
+ setMessageText = _ref3.setMessageText,
41641
+ setMentionedMember = _ref3.setMentionedMember,
41642
+ messageToEdit = _ref3.messageToEdit,
41643
+ activeChannelMembers = _ref3.activeChannelMembers,
41644
+ contactsMap = _ref3.contactsMap,
41645
+ getFromContacts = _ref3.getFromContacts;
40876
41646
  var _useLexicalComposerCo = useLexicalComposerContext(),
40877
41647
  editor = _useLexicalComposerCo[0];
40878
- useFormatMessage(editor, editorState, setMessageBodyAttributes, setMessageText, messageToEdit);
41648
+ useFormatMessage(editor, editorState, setMessageBodyAttributes, setMessageText, setMentionedMember, messageToEdit, activeChannelMembers, contactsMap, getFromContacts);
40879
41649
  return null;
40880
41650
  }
40881
41651
 
40882
- var _templateObject$N, _templateObject2$I, _templateObject3$B, _templateObject4$w, _templateObject5$r, _templateObject6$n, _templateObject7$m, _templateObject8$k;
41652
+ var _templateObject$N, _templateObject2$I, _templateObject3$B, _templateObject4$w, _templateObject5$r, _templateObject6$o, _templateObject7$n, _templateObject8$k;
40883
41653
  var EmojiIcon$1 = function EmojiIcon(_ref) {
40884
41654
  var collectionName = _ref.collectionName;
40885
41655
  switch (collectionName) {
@@ -41105,8 +41875,8 @@ var EmojiCollection$1 = styled.span(_templateObject4$w || (_templateObject4$w =
41105
41875
  return props.iconColor;
41106
41876
  });
41107
41877
  var CollectionPointer$1 = styled.span(_templateObject5$r || (_templateObject5$r = _taggedTemplateLiteralLoose([""])));
41108
- var AllEmojis$1 = styled.ul(_templateObject6$n || (_templateObject6$n = _taggedTemplateLiteralLoose(["\n overflow: hidden;\n padding: 0 8px 8px;\n margin: 0;\n"])));
41109
- var EmojiFooter$1 = styled.div(_templateObject7$m || (_templateObject7$m = _taggedTemplateLiteralLoose(["\n height: 42px;\n display: flex;\n justify-content: space-around;\n align-items: center;\n border-top: ", ";\n border-bottom: ", ";\n padding: 0 10px;\n & > span {\n width: 100%;\n text-align: center;\n }\n"])), function (props) {
41878
+ var AllEmojis$1 = styled.ul(_templateObject6$o || (_templateObject6$o = _taggedTemplateLiteralLoose(["\n overflow: hidden;\n padding: 0 8px 8px;\n margin: 0;\n"])));
41879
+ var EmojiFooter$1 = styled.div(_templateObject7$n || (_templateObject7$n = _taggedTemplateLiteralLoose(["\n height: 42px;\n display: flex;\n justify-content: space-around;\n align-items: center;\n border-top: ", ";\n border-bottom: ", ";\n padding: 0 10px;\n & > span {\n width: 100%;\n text-align: center;\n }\n"])), function (props) {
41110
41880
  return props.emojisCategoryIconsPosition !== 'top' && "1px solid " + props.borderColor;
41111
41881
  }, function (props) {
41112
41882
  return props.emojisCategoryIconsPosition === 'top' && "1px solid " + props.borderColor;
@@ -41312,7 +42082,7 @@ function SvgRecordButton(props) {
41312
42082
  })));
41313
42083
  }
41314
42084
 
41315
- var _templateObject$O, _templateObject2$J, _templateObject3$C, _templateObject4$x, _templateObject5$s, _templateObject6$o, _templateObject7$n;
42085
+ var _templateObject$O, _templateObject2$J, _templateObject3$C, _templateObject4$x, _templateObject5$s, _templateObject6$p, _templateObject7$o;
41316
42086
  var fieldsObject = {
41317
42087
  channelId: '',
41318
42088
  currentRecordedFile: null,
@@ -41954,7 +42724,7 @@ var AudioVisualization$1 = styled.div(_templateObject4$x || (_templateObject4$x
41954
42724
  var PlayPause$1 = styled.div(_templateObject5$s || (_templateObject5$s = _taggedTemplateLiteralLoose(["\n cursor: pointer;\n padding: 10px;\n > svg {\n color: ", ";\n }\n"])), function (props) {
41955
42725
  return props.iconColor;
41956
42726
  });
41957
- var Canvas = styled.canvas(_templateObject6$o || (_templateObject6$o = _taggedTemplateLiteralLoose(["\n height: 28px;\n width: ", ";\n max-width: calc(100% - 110px);\n position: absolute;\n opacity: ", ";\n z-index: ", ";\n left: 42px;\n"])), function (_ref8) {
42727
+ var Canvas = styled.canvas(_templateObject6$p || (_templateObject6$p = _taggedTemplateLiteralLoose(["\n height: 28px;\n width: ", ";\n max-width: calc(100% - 110px);\n position: absolute;\n opacity: ", ";\n z-index: ", ";\n left: 42px;\n"])), function (_ref8) {
41958
42728
  var recording = _ref8.recording;
41959
42729
  return recording ? '300px' : '0';
41960
42730
  }, function (_ref9) {
@@ -41964,7 +42734,7 @@ var Canvas = styled.canvas(_templateObject6$o || (_templateObject6$o = _taggedTe
41964
42734
  var hide = _ref0.hide;
41965
42735
  return hide && '-1';
41966
42736
  });
41967
- var Timer$2 = styled.div(_templateObject7$n || (_templateObject7$n = _taggedTemplateLiteralLoose(["\n width: 40px;\n font-weight: 400;\n font-size: 16px;\n line-height: 12px;\n color: ", ";\n margin-left: auto;\n"])), function (props) {
42737
+ var Timer$2 = styled.div(_templateObject7$o || (_templateObject7$o = _taggedTemplateLiteralLoose(["\n width: 40px;\n font-weight: 400;\n font-size: 16px;\n line-height: 12px;\n color: ", ";\n margin-left: auto;\n"])), function (props) {
41968
42738
  return props.color;
41969
42739
  });
41970
42740
 
@@ -42019,7 +42789,7 @@ function SvgDotsVertica(props) {
42019
42789
  })));
42020
42790
  }
42021
42791
 
42022
- var _templateObject$Q, _templateObject2$L, _templateObject3$E, _templateObject4$y, _templateObject5$t, _templateObject6$p, _templateObject7$o, _templateObject8$l, _templateObject9$i;
42792
+ var _templateObject$Q, _templateObject2$L, _templateObject3$E, _templateObject4$y, _templateObject5$t, _templateObject6$q, _templateObject7$p, _templateObject8$l, _templateObject9$i;
42023
42793
  var CreatePollPopup = function CreatePollPopup(_ref) {
42024
42794
  var togglePopup = _ref.togglePopup,
42025
42795
  onCreate = _ref.onCreate;
@@ -42418,7 +43188,7 @@ var OptionRow = styled.div(_templateObject5$t || (_templateObject5$t = _taggedTe
42418
43188
  }, function (props) {
42419
43189
  return props.isDragging ? 0.6 : 1;
42420
43190
  });
42421
- var RemoveOptionIcon = styled(SvgClose)(_templateObject6$p || (_templateObject6$p = _taggedTemplateLiteralLoose(["\n cursor: pointer;\n color: ", ";\n width: ", ";\n height: ", ";\n opacity: ", ";\n"])), function (props) {
43191
+ var RemoveOptionIcon = styled(SvgClose)(_templateObject6$q || (_templateObject6$q = _taggedTemplateLiteralLoose(["\n cursor: pointer;\n color: ", ";\n width: ", ";\n height: ", ";\n opacity: ", ";\n"])), function (props) {
42422
43192
  return props.color;
42423
43193
  }, function (props) {
42424
43194
  return props.width;
@@ -42427,7 +43197,7 @@ var RemoveOptionIcon = styled(SvgClose)(_templateObject6$p || (_templateObject6$
42427
43197
  }, function (props) {
42428
43198
  return props.disabled ? 0.5 : 1;
42429
43199
  });
42430
- var AddOptionButton = styled.button(_templateObject7$o || (_templateObject7$o = _taggedTemplateLiteralLoose(["\n margin: 16px 0 0 0;\n background: transparent;\n border: none;\n color: ", ";\n cursor: ", ";\n width: 100%;\n text-align: left;\n padding-left: 32px;\n opacity: ", ";\n"])), function (props) {
43200
+ var AddOptionButton = styled.button(_templateObject7$p || (_templateObject7$p = _taggedTemplateLiteralLoose(["\n margin: 16px 0 0 0;\n background: transparent;\n border: none;\n color: ", ";\n cursor: ", ";\n width: 100%;\n text-align: left;\n padding-left: 32px;\n opacity: ", ";\n"])), function (props) {
42431
43201
  return props.disabled ? props.disabledColor : props.color;
42432
43202
  }, function (props) {
42433
43203
  return props.disabled ? 'not-allowed' : 'pointer';
@@ -42439,7 +43209,7 @@ var SettingItem = styled.div(_templateObject9$i || (_templateObject9$i = _tagged
42439
43209
  return props.color;
42440
43210
  });
42441
43211
 
42442
- var _templateObject$R, _templateObject2$M, _templateObject3$F, _templateObject4$z, _templateObject5$u, _templateObject6$q, _templateObject7$p, _templateObject8$m, _templateObject9$j, _templateObject0$h, _templateObject1$e, _templateObject10$8, _templateObject11$6, _templateObject12$5, _templateObject13$3, _templateObject14$2, _templateObject15$2, _templateObject16$2, _templateObject17$2, _templateObject18$2, _templateObject19$2, _templateObject20$2, _templateObject21$2, _templateObject22$1, _templateObject23$1, _templateObject24$1, _templateObject25$1, _templateObject26$1, _templateObject27$1, _templateObject28$1, _templateObject29$1, _templateObject30$1, _templateObject31$1, _templateObject32$1, _templateObject33$1, _templateObject34$1;
43212
+ var _templateObject$R, _templateObject2$M, _templateObject3$F, _templateObject4$z, _templateObject5$u, _templateObject6$r, _templateObject7$q, _templateObject8$m, _templateObject9$j, _templateObject0$h, _templateObject1$e, _templateObject10$8, _templateObject11$6, _templateObject12$5, _templateObject13$3, _templateObject14$2, _templateObject15$2, _templateObject16$2, _templateObject17$2, _templateObject18$2, _templateObject19$2, _templateObject20$2, _templateObject21$2, _templateObject22$1, _templateObject23$1, _templateObject24$1, _templateObject25$1, _templateObject26$1, _templateObject27$1, _templateObject28$1, _templateObject29$1, _templateObject30$1, _templateObject31$1, _templateObject32$1, _templateObject33$1, _templateObject34$1;
42443
43213
  function AutoFocusPlugin(_ref) {
42444
43214
  var messageForReply = _ref.messageForReply;
42445
43215
  var _useLexicalComposerCo = useLexicalComposerContext(),
@@ -43557,7 +44327,7 @@ var SendMessageInput = function SendMessageInput(_ref3) {
43557
44327
  setMentionedUsers([]);
43558
44328
  }, [activeChannel.id]);
43559
44329
  useEffect(function () {
43560
- if (messageText.trim() || editMessageText.trim() && editMessageText && editMessageText.trim() !== messageToEdit.body || attachments.length) {
44330
+ if (messageText.trim() || editMessageText !== null && editMessageText !== void 0 && editMessageText.trim() && editMessageText && (editMessageText === null || editMessageText === void 0 ? void 0 : editMessageText.trim()) !== (messageToEdit === null || messageToEdit === void 0 ? void 0 : messageToEdit.body) || attachments.length) {
43561
44331
  if (attachments.length) {
43562
44332
  var videoAttachment = false;
43563
44333
  attachments.forEach(function (att) {
@@ -43879,7 +44649,9 @@ var SendMessageInput = function SendMessageInput(_ref3) {
43879
44649
  })) : messageForReply.attachments[0].type === attachmentTypes.file && (/*#__PURE__*/React__default.createElement(ReplyIconWrapper, {
43880
44650
  backgroundColor: accentColor,
43881
44651
  iconColor: textOnPrimary
43882
- }, /*#__PURE__*/React__default.createElement(SvgChoseFile, null)))), /*#__PURE__*/React__default.createElement(ReplyMessageBody$1, null, /*#__PURE__*/React__default.createElement(EditReplyMessageHeader, {
44652
+ }, /*#__PURE__*/React__default.createElement(SvgChoseFile, null)))), /*#__PURE__*/React__default.createElement(ReplyMessageBody$1, {
44653
+ linkColor: accentColor
44654
+ }, /*#__PURE__*/React__default.createElement(EditReplyMessageHeader, {
43883
44655
  color: accentColor
43884
44656
  }, replyMessageIcon || /*#__PURE__*/React__default.createElement(SvgReplyIcon, null), " Reply to", /*#__PURE__*/React__default.createElement(UserName$1, null, user.id === messageForReply.user.id ? user.firstName ? user.firstName + " " + user.lastName : user.id : makeUsername(contactsMap[messageForReply.user.id], messageForReply.user, getFromContacts))), messageForReply.attachments && messageForReply.attachments.length ? messageForReply.attachments[0].type === attachmentTypes.voice ? 'Voice' : messageForReply.body && messageForReply.bodyAttributes && messageForReply.bodyAttributes.length > 0 ? MessageTextFormat({
43885
44657
  text: messageForReply.body,
@@ -44027,7 +44799,11 @@ var SendMessageInput = function SendMessageInput(_ref3) {
44027
44799
  editorState: realEditorState,
44028
44800
  setMessageBodyAttributes: setMessageBodyAttributes,
44029
44801
  setMessageText: messageToEdit ? setEditMessageText : setMessageText,
44030
- messageToEdit: messageToEdit
44802
+ messageToEdit: messageToEdit,
44803
+ activeChannelMembers: activeChannelMembers,
44804
+ contactsMap: contactsMap,
44805
+ getFromContacts: getFromContacts,
44806
+ setMentionedMember: handleSetMentionMember
44031
44807
  }), /*#__PURE__*/React__default.createElement(React__default.Fragment, null, isEmojisOpened && (/*#__PURE__*/React__default.createElement(EmojisPopup$1, {
44032
44808
  handleEmojiPopupToggle: handleEmojiPopupToggle,
44033
44809
  rightSide: emojisInRightSide,
@@ -44039,7 +44815,8 @@ var SendMessageInput = function SendMessageInput(_ref3) {
44039
44815
  userId: user.id,
44040
44816
  getFromContacts: getFromContacts,
44041
44817
  members: activeChannelMembers,
44042
- setMentionsIsOpen: setMentionsIsOpen
44818
+ setMentionsIsOpen: setMentionsIsOpen,
44819
+ channelId: activeChannel === null || activeChannel === void 0 ? void 0 : activeChannel.id
44043
44820
  })), /*#__PURE__*/React__default.createElement(HistoryPlugin, null), /*#__PURE__*/React__default.createElement(RichTextPlugin, {
44044
44821
  contentEditable: /*#__PURE__*/React__default.createElement("div", {
44045
44822
  onKeyDown: handleSendEditMessage,
@@ -44119,11 +44896,13 @@ var EditMessageText = styled.p(_templateObject4$z || (_templateObject4$z = _tagg
44119
44896
  var UploadErrorMessage = styled.p(_templateObject5$u || (_templateObject5$u = _taggedTemplateLiteralLoose(["\n margin: 0;\n position: absolute;\n top: -30px;\n color: ", ";\n"])), function (props) {
44120
44897
  return props.color;
44121
44898
  });
44122
- var CloseEditMode = styled.span(_templateObject6$q || (_templateObject6$q = _taggedTemplateLiteralLoose(["\n position: absolute;\n top: 8px;\n right: 12px;\n width: 20px;\n height: 20px;\n text-align: center;\n line-height: 22px;\n cursor: pointer;\n\n & > svg {\n color: ", ";\n }\n"])), function (props) {
44899
+ var CloseEditMode = styled.span(_templateObject6$r || (_templateObject6$r = _taggedTemplateLiteralLoose(["\n position: absolute;\n top: 8px;\n right: 12px;\n width: 20px;\n height: 20px;\n text-align: center;\n line-height: 22px;\n cursor: pointer;\n\n & > svg {\n color: ", ";\n }\n"])), function (props) {
44123
44900
  return props.color;
44124
44901
  });
44125
- var UserName$1 = styled.span(_templateObject7$p || (_templateObject7$p = _taggedTemplateLiteralLoose(["\n font-weight: 500;\n margin-left: 4px;\n"])));
44126
- var ReplyMessageBody$1 = styled.div(_templateObject8$m || (_templateObject8$m = _taggedTemplateLiteralLoose(["\n word-break: break-word;\n display: -webkit-box;\n -webkit-line-clamp: 3;\n -webkit-box-orient: vertical;\n overflow: hidden;\n text-overflow: ellipsis;\n"])));
44902
+ var UserName$1 = styled.span(_templateObject7$q || (_templateObject7$q = _taggedTemplateLiteralLoose(["\n font-weight: 500;\n margin-left: 4px;\n"])));
44903
+ var ReplyMessageBody$1 = styled.div(_templateObject8$m || (_templateObject8$m = _taggedTemplateLiteralLoose(["\n word-break: break-word;\n display: -webkit-box;\n -webkit-line-clamp: 3;\n -webkit-box-orient: vertical;\n overflow: hidden;\n text-overflow: ellipsis;\n a {\n color: ", ";\n }\n"])), function (props) {
44904
+ return props.linkColor;
44905
+ });
44127
44906
  var EditReplyMessageHeader = styled.h4(_templateObject9$j || (_templateObject9$j = _taggedTemplateLiteralLoose(["\n display: flex;\n margin: 0 0 2px;\n font-weight: 400;\n font-size: 13px;\n line-height: 16px;\n color: ", ";\n\n > svg {\n margin-right: 4px;\n width: 16px;\n height: 16px;\n }\n"])), function (props) {
44128
44907
  return props.color;
44129
44908
  });
@@ -44521,6 +45300,29 @@ function SvgChevronBottom(props) {
44521
45300
  })));
44522
45301
  }
44523
45302
 
45303
+ var _path$1v;
45304
+ function _extends$1z() {
45305
+ return _extends$1z = Object.assign ? Object.assign.bind() : function (n) {
45306
+ for (var e = 1; e < arguments.length; e++) {
45307
+ var t = arguments[e];
45308
+ for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
45309
+ }
45310
+ return n;
45311
+ }, _extends$1z.apply(null, arguments);
45312
+ }
45313
+ function SvgUsers(props) {
45314
+ return /*#__PURE__*/createElement$1("svg", _extends$1z({
45315
+ width: 24,
45316
+ height: 24,
45317
+ viewBox: "0 0 20 20",
45318
+ fill: "none",
45319
+ xmlns: "http://www.w3.org/2000/svg"
45320
+ }, props), _path$1v || (_path$1v = /*#__PURE__*/createElement$1("path", {
45321
+ d: "M13.75 10.625c1.911 0 5.416.714 5.416 3.571 0 1.25-.318 1.429-.956 1.429h-5.075c.132-.407.198-.885.198-1.429 0-1.436-.526-2.556-1.393-3.385a9.226 9.226 0 011.81-.186zm-7.5 0c1.911 0 5.416.714 5.416 3.571 0 1.25-.318 1.429-.956 1.429H1.79c-.637 0-.956-.179-.956-1.429 0-2.857 3.505-3.571 5.417-3.571zm0-6.25a2.5 2.5 0 11.001 4.998 2.5 2.5 0 01-.001-4.998zm7.5 0a2.5 2.5 0 11.001 4.998 2.5 2.5 0 01-.001-4.998z",
45322
+ fill: "#818C99"
45323
+ })));
45324
+ }
45325
+
44524
45326
  var _templateObject$S, _templateObject2$N, _templateObject3$G;
44525
45327
  function NetworkErrorPopup(_ref) {
44526
45328
  var theme = _ref.theme,
@@ -44568,7 +45370,7 @@ var StyledPopupName = styled(PopupName)(_templateObject$S || (_templateObject$S
44568
45370
  var StyledPopupDescription = styled(PopupDescription)(_templateObject2$N || (_templateObject2$N = _taggedTemplateLiteralLoose(["\n font-weight: 400;\n font-style: normal;\n font-size: 15px;\n line-height: 150%;\n letter-spacing: 0%;\n margin-top: 0;\n margin-bottom: 0;\n width: 437px;\n height: 68px;\n opacity: 1;\n display: block;\n overflow-wrap: break-word;\n word-wrap: break-word;\n"])));
44569
45371
  var CloseButton = styled(Button)(_templateObject3$G || (_templateObject3$G = _taggedTemplateLiteralLoose(["\n width: 73px;\n height: 36px;\n min-width: 73px;\n max-width: 73px;\n padding: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n"])));
44570
45372
 
44571
- var _templateObject$T, _templateObject2$O, _templateObject3$H, _templateObject4$A, _templateObject5$v, _templateObject6$r, _templateObject7$q, _templateObject8$n;
45373
+ var _templateObject$T, _templateObject2$O, _templateObject3$H, _templateObject4$A, _templateObject5$v, _templateObject6$s, _templateObject7$r, _templateObject8$n;
44572
45374
  var TIMER_OPTIONS = [{
44573
45375
  key: 'off',
44574
45376
  label: 'Off'
@@ -44820,13 +45622,190 @@ var CustomSelectWrapper = styled.div(_templateObject4$A || (_templateObject4$A =
44820
45622
  return props.accentColor;
44821
45623
  });
44822
45624
  var CustomSelectTriggerStyled = styled(CustomSelectTrigger)(_templateObject5$v || (_templateObject5$v = _taggedTemplateLiteralLoose(["\n font-size: 15px;\n text-transform: none;\n"])));
44823
- var CustomDropdownOptionLi = styled(DropdownOptionLi)(_templateObject6$r || (_templateObject6$r = _taggedTemplateLiteralLoose(["\n font-size: 15px;\n"])));
44824
- var CustomDropdownOptionsUl = styled(DropdownOptionsUl)(_templateObject7$q || (_templateObject7$q = _taggedTemplateLiteralLoose(["\n border-color: ", ";\n height: 268px;\n max-height: 268px;\n border-radius: 0;\n\n ", " {\n padding-left: 24px;\n padding-right: 24px;\n }\n"])), function (props) {
45625
+ var CustomDropdownOptionLi = styled(DropdownOptionLi)(_templateObject6$s || (_templateObject6$s = _taggedTemplateLiteralLoose(["\n font-size: 15px;\n"])));
45626
+ var CustomDropdownOptionsUl = styled(DropdownOptionsUl)(_templateObject7$r || (_templateObject7$r = _taggedTemplateLiteralLoose(["\n border-color: ", ";\n height: 268px;\n max-height: 268px;\n border-radius: 0;\n\n ", " {\n padding-left: 24px;\n padding-right: 24px;\n }\n"])), function (props) {
44825
45627
  return props.accentColor;
44826
45628
  }, CustomDropdownOptionLi);
44827
45629
  var SetButton = styled(Button)(_templateObject8$n || (_templateObject8$n = _taggedTemplateLiteralLoose(["\n width: 57px;\n height: 36px;\n min-width: 57px;\n max-width: 57px;\n padding: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n"])));
44828
45630
 
44829
- var _templateObject$U, _templateObject2$P, _templateObject3$I, _templateObject4$B, _templateObject5$w, _templateObject6$s, _templateObject7$r, _templateObject8$o, _templateObject9$k, _templateObject0$i, _templateObject1$f, _templateObject10$9, _templateObject11$7, _templateObject12$6, _templateObject13$4, _templateObject14$3, _templateObject15$3, _templateObject16$3, _templateObject17$3, _templateObject18$3, _templateObject19$3, _templateObject20$3;
45631
+ var _templateObject$U, _templateObject2$P, _templateObject3$I, _templateObject4$B, _templateObject5$w, _templateObject6$t, _templateObject7$s, _templateObject8$o;
45632
+ var formatMemberCount = function formatMemberCount(count, channelType) {
45633
+ if (channelType === DEFAULT_CHANNEL_TYPE.BROADCAST || channelType === DEFAULT_CHANNEL_TYPE.PUBLIC) {
45634
+ return count + " " + (count > 1 ? 'subscribers' : 'subscriber');
45635
+ }
45636
+ return count + " " + (count > 1 ? 'members' : 'member');
45637
+ };
45638
+ var MutualChannelItem = function MutualChannelItem(_ref) {
45639
+ var channel = _ref.channel,
45640
+ backgroundHovered = _ref.backgroundHovered,
45641
+ textPrimary = _ref.textPrimary,
45642
+ textSecondary = _ref.textSecondary,
45643
+ currentUser = _ref.currentUser,
45644
+ contactsMap = _ref.contactsMap,
45645
+ getFromContacts = _ref.getFromContacts,
45646
+ iconPrimary = _ref.iconPrimary,
45647
+ activeChannel = _ref.activeChannel,
45648
+ togglePopup = _ref.togglePopup;
45649
+ var dispatch = useDispatch();
45650
+ var setSelectedChannel = function setSelectedChannel(channel) {
45651
+ if (activeChannel.id !== channel.id) {
45652
+ dispatch(clearMessagesAC());
45653
+ dispatch(switchChannelActionAC(channel));
45654
+ togglePopup();
45655
+ }
45656
+ };
45657
+ var isDirectChannel = useMemo(function () {
45658
+ return channel.type === DEFAULT_CHANNEL_TYPE.DIRECT;
45659
+ }, [channel.type]);
45660
+ var directChannelUser = useMemo(function () {
45661
+ return isDirectChannel && channel.members.find(function (member) {
45662
+ return member.id !== (currentUser === null || currentUser === void 0 ? void 0 : currentUser.id) || '';
45663
+ });
45664
+ }, [isDirectChannel, channel.members, currentUser === null || currentUser === void 0 ? void 0 : currentUser.id]);
45665
+ var avatarName = useMemo(function () {
45666
+ return channel.subject || (isDirectChannel && directChannelUser ? directChannelUser.firstName || directChannelUser.id : '');
45667
+ }, [channel.subject, isDirectChannel, directChannelUser]);
45668
+ return /*#__PURE__*/React__default.createElement(ChannelItem$1, {
45669
+ key: "mutual-channel-" + channel.id,
45670
+ backgroundHover: backgroundHovered,
45671
+ onClick: function onClick() {
45672
+ return setSelectedChannel(channel);
45673
+ }
45674
+ }, /*#__PURE__*/React__default.createElement(Avatar, {
45675
+ name: avatarName,
45676
+ image: channel.avatarUrl || (isDirectChannel && directChannelUser ? directChannelUser === null || directChannelUser === void 0 ? void 0 : directChannelUser.avatarUrl : ''),
45677
+ size: 40,
45678
+ textSize: 12,
45679
+ setDefaultAvatar: isDirectChannel
45680
+ }), /*#__PURE__*/React__default.createElement(ChannelInfo$4, null, /*#__PURE__*/React__default.createElement(ChannelTitle$1, {
45681
+ color: textPrimary
45682
+ }, channel.subject || (isDirectChannel && directChannelUser ? makeUsername(contactsMap[directChannelUser.id], directChannelUser, getFromContacts) : '')), /*#__PURE__*/React__default.createElement(ChannelMembers$1, {
45683
+ color: textSecondary
45684
+ }, formatMemberCount(channel.memberCount, channel.type))), /*#__PURE__*/React__default.createElement(ChevronRightIconWrapper, null, /*#__PURE__*/React__default.createElement(SvgChevronBottom, {
45685
+ color: iconPrimary
45686
+ })));
45687
+ };
45688
+ var GroupsInCommonPopup = function GroupsInCommonPopup(_ref2) {
45689
+ var theme = _ref2.theme,
45690
+ togglePopup = _ref2.togglePopup,
45691
+ user = _ref2.user;
45692
+ var ChatClient = getClient();
45693
+ var currentUser = ChatClient.user;
45694
+ var _useColor = useColors(),
45695
+ textPrimary = _useColor[THEME_COLORS.TEXT_PRIMARY],
45696
+ textSecondary = _useColor[THEME_COLORS.TEXT_SECONDARY],
45697
+ background = _useColor[THEME_COLORS.BACKGROUND],
45698
+ iconPrimary = _useColor[THEME_COLORS.ICON_PRIMARY],
45699
+ backgroundHovered = _useColor[THEME_COLORS.BACKGROUND_HOVERED];
45700
+ var contactsMap = useSelector(contactsMapSelector);
45701
+ var getFromContacts = getShowOnlyContactUsers();
45702
+ var dispatch = useDispatch();
45703
+ var mutualChannels = useSelector(mutualChannelsSelector) || [];
45704
+ var mutualChannelsHasNext = useSelector(mutualChannelsHasNextSelector);
45705
+ var mutualChannelsLoadingState = useSelector(mutualChannelsLoadingStateSelector);
45706
+ var connectionStatus = useSelector(connectionStatusSelector);
45707
+ var activeChannel = useSelector(activeChannelSelector);
45708
+ var _useState = useState(false),
45709
+ isScrolling = _useState[0],
45710
+ setIsScrolling = _useState[1];
45711
+ var loadingRef = useRef(false);
45712
+ var isLoading = mutualChannelsLoadingState === LOADING_STATE.LOADING;
45713
+ var isLoadingInitial = mutualChannels.length === 0 && isLoading;
45714
+ useEffect(function () {
45715
+ if (mutualChannelsLoadingState === LOADING_STATE.LOADED) {
45716
+ loadingRef.current = false;
45717
+ }
45718
+ }, [mutualChannelsLoadingState]);
45719
+ var handleScroll = useCallback(function (event) {
45720
+ var target = event.currentTarget;
45721
+ var isNearBottom = target.scrollTop >= target.scrollHeight - target.offsetHeight - 100;
45722
+ if (isNearBottom && mutualChannelsHasNext && !isLoading && !loadingRef.current) {
45723
+ loadingRef.current = true;
45724
+ dispatch(loadMoreMutualChannelsAC(15));
45725
+ }
45726
+ }, [mutualChannelsHasNext, isLoading, dispatch]);
45727
+ useEffect(function () {
45728
+ if (connectionStatus === CONNECTION_STATUS.CONNECTED && !(mutualChannels !== null && mutualChannels !== void 0 && mutualChannels.length)) {
45729
+ if (user !== null && user !== void 0 && user.id) {
45730
+ dispatch(getChannelsWithUserAC(user.id));
45731
+ }
45732
+ }
45733
+ }, [connectionStatus, dispatch, user === null || user === void 0 ? void 0 : user.id, mutualChannels === null || mutualChannels === void 0 ? void 0 : mutualChannels.length]);
45734
+ useEffect(function () {
45735
+ return function () {
45736
+ dispatch(setMutualChannelsAC([]));
45737
+ };
45738
+ }, [dispatch]);
45739
+ return /*#__PURE__*/React__default.createElement(PopupContainer, null, /*#__PURE__*/React__default.createElement(Popup, {
45740
+ theme: theme,
45741
+ backgroundColor: background,
45742
+ maxWidth: '520px',
45743
+ minWidth: '520px',
45744
+ isLoading: isLoadingInitial,
45745
+ padding: '0'
45746
+ }, /*#__PURE__*/React__default.createElement(PopupBody, {
45747
+ paddingH: '24px',
45748
+ paddingV: '24px'
45749
+ }, /*#__PURE__*/React__default.createElement(CloseIcon, {
45750
+ color: iconPrimary,
45751
+ onClick: togglePopup
45752
+ }), /*#__PURE__*/React__default.createElement(PopupName, {
45753
+ color: textPrimary,
45754
+ marginBottom: '20px'
45755
+ }, "Groups in common"), /*#__PURE__*/React__default.createElement(ChannelsList$1, {
45756
+ onScroll: handleScroll,
45757
+ className: isScrolling ? 'show-scrollbar' : '',
45758
+ onMouseEnter: function onMouseEnter() {
45759
+ return setIsScrolling(true);
45760
+ },
45761
+ onMouseLeave: function onMouseLeave() {
45762
+ return setIsScrolling(false);
45763
+ },
45764
+ thumbColor: background
45765
+ }, isLoadingInitial ? (/*#__PURE__*/React__default.createElement(LoadingText$1, {
45766
+ color: textSecondary
45767
+ }, "Loading...")) : mutualChannels.length > 0 ? mutualChannels.map(function (channel) {
45768
+ return /*#__PURE__*/React__default.createElement(MutualChannelItem, {
45769
+ key: "mutual-channel-" + channel.id,
45770
+ channel: channel,
45771
+ backgroundHovered: backgroundHovered,
45772
+ textPrimary: textPrimary,
45773
+ textSecondary: textSecondary,
45774
+ currentUser: currentUser,
45775
+ contactsMap: contactsMap,
45776
+ getFromContacts: getFromContacts,
45777
+ iconPrimary: iconPrimary,
45778
+ activeChannel: activeChannel,
45779
+ togglePopup: togglePopup
45780
+ });
45781
+ }) : (/*#__PURE__*/React__default.createElement(EmptyText, {
45782
+ color: textSecondary
45783
+ }, "No groups in common")), isLoading && mutualChannels.length > 0 && /*#__PURE__*/React__default.createElement(LoadingText$1, {
45784
+ color: textSecondary
45785
+ }, "Loading more...")))));
45786
+ };
45787
+ var ChannelsList$1 = styled.div(_templateObject$U || (_templateObject$U = _taggedTemplateLiteralLoose(["\n max-height: 400px;\n overflow-y: auto;\n overflow-x: hidden;\n\n &::-webkit-scrollbar {\n width: 6px;\n }\n\n &::-webkit-scrollbar-track {\n background: transparent;\n }\n\n &::-webkit-scrollbar-thumb {\n background: ", ";\n border-radius: 3px;\n opacity: 0.3;\n }\n\n &.show-scrollbar::-webkit-scrollbar-thumb {\n opacity: 0.6;\n }\n"])), function (props) {
45788
+ return props.thumbColor;
45789
+ });
45790
+ var ChannelItem$1 = styled.div(_templateObject2$P || (_templateObject2$P = _taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n padding: 6px 2px 6px 6px;\n border-radius: 8px;\n cursor: pointer;\n transition: background-color 0.2s;\n\n &:hover {\n background-color: ", ";\n }\n"])), function (props) {
45791
+ return props.backgroundHover;
45792
+ });
45793
+ var ChannelInfo$4 = styled.div(_templateObject3$I || (_templateObject3$I = _taggedTemplateLiteralLoose(["\n flex: 1;\n margin-left: 12px;\n min-width: 0;\n"])));
45794
+ var ChannelTitle$1 = styled.div(_templateObject4$B || (_templateObject4$B = _taggedTemplateLiteralLoose(["\n font-size: 15px;\n font-weight: 500;\n line-height: 20px;\n font-family: Inter;\n letter-spacing: -0.2px;\n color: ", ";\n margin-bottom: 4px;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n"])), function (props) {
45795
+ return props.color;
45796
+ });
45797
+ var ChannelMembers$1 = styled.div(_templateObject5$w || (_templateObject5$w = _taggedTemplateLiteralLoose(["\n font-weight: 400;\n font-size: 14px;\n line-height: 20px;\n letter-spacing: -0.2px;\n color: ", ";\n"])), function (props) {
45798
+ return props.color;
45799
+ });
45800
+ var LoadingText$1 = styled.div(_templateObject6$t || (_templateObject6$t = _taggedTemplateLiteralLoose(["\n text-align: center;\n padding: 20px;\n font-size: 14px;\n color: ", ";\n"])), function (props) {
45801
+ return props.color;
45802
+ });
45803
+ var EmptyText = styled.div(_templateObject7$s || (_templateObject7$s = _taggedTemplateLiteralLoose(["\n text-align: center;\n padding: 40px 20px;\n font-size: 14px;\n color: ", ";\n"])), function (props) {
45804
+ return props.color;
45805
+ });
45806
+ var ChevronRightIconWrapper = styled.span(_templateObject8$o || (_templateObject8$o = _taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n\n & > svg {\n width: 16px;\n height: 16px;\n transform: rotate(-90deg);\n }\n"])));
45807
+
45808
+ var _templateObject$V, _templateObject2$Q, _templateObject3$J, _templateObject4$C, _templateObject5$x, _templateObject6$u, _templateObject7$t, _templateObject8$p, _templateObject9$k, _templateObject0$i, _templateObject1$f, _templateObject10$9, _templateObject11$7, _templateObject12$6, _templateObject13$4, _templateObject14$3, _templateObject15$3, _templateObject16$3, _templateObject17$3, _templateObject18$3, _templateObject19$3, _templateObject20$3;
44830
45809
  var Actions = function Actions(_ref) {
44831
45810
  var _getDisappearingSetti;
44832
45811
  var setActionsHeight = _ref.setActionsHeight,
@@ -44901,7 +45880,12 @@ var Actions = function Actions(_ref) {
44901
45880
  deleteAllMessagesIcon = _ref.deleteAllMessagesIcon,
44902
45881
  deleteAllMessagesTextColor = _ref.deleteAllMessagesTextColor,
44903
45882
  actionItemsFontSize = _ref.actionItemsFontSize,
44904
- borderColor = _ref.borderColor;
45883
+ borderColor = _ref.borderColor,
45884
+ commonGroupsOrder = _ref.commonGroupsOrder,
45885
+ commonGroupsIcon = _ref.commonGroupsIcon,
45886
+ commonGroupsIconColor = _ref.commonGroupsIconColor,
45887
+ commonGroupsTextColor = _ref.commonGroupsTextColor,
45888
+ showGroupsInCommon = _ref.showGroupsInCommon;
44905
45889
  var _useColor = useColors(),
44906
45890
  textPrimary = _useColor[THEME_COLORS.TEXT_PRIMARY],
44907
45891
  textSecondary = _useColor[THEME_COLORS.TEXT_SECONDARY],
@@ -44938,14 +45922,17 @@ var Actions = function Actions(_ref) {
44938
45922
  var _useState9 = useState(false),
44939
45923
  disappearingMessagesPopupOpen = _useState9[0],
44940
45924
  setDisappearingMessagesPopupOpen = _useState9[1];
45925
+ var _useState0 = useState(false),
45926
+ groupsInCommonPopupOpen = _useState0[0],
45927
+ setGroupsInCommonPopupOpen = _useState0[1];
44941
45928
  var _usePermissions = usePermissions(channel.userRole),
44942
45929
  checkActionPermission = _usePermissions[0];
44943
- var _useState0 = useState(''),
44944
- popupButtonText = _useState0[0],
44945
- setPopupButtonText = _useState0[1];
44946
45930
  var _useState1 = useState(''),
44947
- popupTitle = _useState1[0],
44948
- setPopupTitle = _useState1[1];
45931
+ popupButtonText = _useState1[0],
45932
+ setPopupButtonText = _useState1[1];
45933
+ var _useState10 = useState(''),
45934
+ popupTitle = _useState10[0],
45935
+ setPopupTitle = _useState10[1];
44949
45936
  var dispatch = useDispatch();
44950
45937
  var oneHour = 60 * 60 * 1000;
44951
45938
  var twoHours = oneHour * 2;
@@ -45038,6 +46025,9 @@ var Actions = function Actions(_ref) {
45038
46025
  dispatch(pinChannelAC(channel.id));
45039
46026
  }
45040
46027
  };
46028
+ var handleToggleGroupsInCommonPopup = function handleToggleGroupsInCommonPopup() {
46029
+ setGroupsInCommonPopupOpen(!groupsInCommonPopupOpen);
46030
+ };
45041
46031
  var handleToggleDisappearingMessagesPopup = function handleToggleDisappearingMessagesPopup() {
45042
46032
  setDisappearingMessagesPopupOpen(!disappearingMessagesPopupOpen);
45043
46033
  };
@@ -45149,7 +46139,7 @@ var Actions = function Actions(_ref) {
45149
46139
  "$isLightMode": backgroundColor === '#FFFFFF'
45150
46140
  }), "Disappearing messages", /*#__PURE__*/React__default.createElement(DisappearingMessagesStatusWrapper, null, /*#__PURE__*/React__default.createElement(DisappearingMessagesStatus, {
45151
46141
  color: textSecondary
45152
- }, formatDisappearingMessageTime(channel.messageRetentionPeriod)), /*#__PURE__*/React__default.createElement(ChevronRightIconWrapper, null, /*#__PURE__*/React__default.createElement(SvgChevronBottom, {
46142
+ }, formatDisappearingMessageTime(channel.messageRetentionPeriod)), /*#__PURE__*/React__default.createElement(ChevronRightIconWrapper$1, null, /*#__PURE__*/React__default.createElement(SvgChevronBottom, {
45153
46143
  color: iconPrimary
45154
46144
  })))))), showPinChannel && !channel.isMockChannel && (isDirectChannel && directChannelUser ? directChannelUser.state !== USER_STATE.DELETED : true) && (/*#__PURE__*/React__default.createElement(ActionItem, {
45155
46145
  key: 2,
@@ -45175,7 +46165,17 @@ var Actions = function Actions(_ref) {
45175
46165
  color: markAsReadUnreadTextColor || textPrimary,
45176
46166
  hoverColor: markAsReadUnreadTextColor || textPrimary,
45177
46167
  fontSize: actionItemsFontSize
45178
- }, /*#__PURE__*/React__default.createElement(React__default.Fragment, null, markAsUnreadIcon || /*#__PURE__*/React__default.createElement(DefaultMarkAsUnRead, null), " Mark as unread")))), !isDirectChannel && showLeaveChannel && (/*#__PURE__*/React__default.createElement(ActionItem, {
46168
+ }, /*#__PURE__*/React__default.createElement(React__default.Fragment, null, markAsUnreadIcon || /*#__PURE__*/React__default.createElement(DefaultMarkAsUnRead, null), " Mark as unread")))), !isSelfChannel && isDirectChannel && !channel.isMockChannel && showGroupsInCommon && (/*#__PURE__*/React__default.createElement(ActionItem, {
46169
+ key: 4,
46170
+ order: commonGroupsOrder,
46171
+ iconColor: commonGroupsTextColor || iconPrimary,
46172
+ color: commonGroupsIconColor || textPrimary,
46173
+ hoverColor: commonGroupsTextColor || textPrimary,
46174
+ fontSize: actionItemsFontSize,
46175
+ onClick: handleToggleGroupsInCommonPopup
46176
+ }, /*#__PURE__*/React__default.createElement(React__default.Fragment, null, commonGroupsIcon || /*#__PURE__*/React__default.createElement(SvgUsers, null), "Groups in common", /*#__PURE__*/React__default.createElement(DisappearingMessagesStatusWrapper, null, /*#__PURE__*/React__default.createElement(ChevronRightIconWrapper$1, null, /*#__PURE__*/React__default.createElement(SvgChevronBottom, {
46177
+ color: iconPrimary
46178
+ })))))), !isDirectChannel && showLeaveChannel && (/*#__PURE__*/React__default.createElement(ActionItem, {
45179
46179
  key: 4,
45180
46180
  order: leaveChannelOrder,
45181
46181
  color: leaveChannelTextColor || warningColor,
@@ -45322,20 +46322,26 @@ var Actions = function Actions(_ref) {
45322
46322
  togglePopup: handleToggleDisappearingMessagesPopup,
45323
46323
  handleSetTimer: handleSetDisappearingMessagesTimer,
45324
46324
  currentTimer: channel.messageRetentionPeriod
46325
+ })), groupsInCommonPopupOpen && (/*#__PURE__*/React__default.createElement(GroupsInCommonPopup, {
46326
+ theme: theme,
46327
+ togglePopup: handleToggleGroupsInCommonPopup,
46328
+ user: channel.members.find(function (member) {
46329
+ return member.id !== user.id;
46330
+ })
45325
46331
  })));
45326
46332
  };
45327
- var Container$n = styled.div(_templateObject$U || (_templateObject$U = _taggedTemplateLiteralLoose(["\n padding: 10px 16px;\n border-bottom: 6px solid ", ";\n]"])), function (props) {
46333
+ var Container$n = styled.div(_templateObject$V || (_templateObject$V = _taggedTemplateLiteralLoose(["\n padding: 10px 16px;\n border-bottom: 6px solid ", ";\n]"])), function (props) {
45328
46334
  return props.borderColor;
45329
46335
  });
45330
- var ActionHeader = styled.div(_templateObject2$P || (_templateObject2$P = _taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n justify-content: space-between;\n margin: 25px 0 22px;\n cursor: pointer;\n"])));
45331
- var MenuTriggerIcon = styled.span(_templateObject3$I || (_templateObject3$I = _taggedTemplateLiteralLoose(["\n transition: all 0.2s;\n ", "\n"])), function (props) {
46336
+ var ActionHeader = styled.div(_templateObject2$Q || (_templateObject2$Q = _taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n justify-content: space-between;\n margin: 25px 0 22px;\n cursor: pointer;\n"])));
46337
+ var MenuTriggerIcon = styled.span(_templateObject3$J || (_templateObject3$J = _taggedTemplateLiteralLoose(["\n transition: all 0.2s;\n ", "\n"])), function (props) {
45332
46338
  return !props.isOpen && ' transform: rotate(-90deg);';
45333
46339
  });
45334
- var ActionsMenu = styled.ul(_templateObject4$B || (_templateObject4$B = _taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: column;\n margin: 0;\n padding: 0;\n list-style: none;\n transition: all 0.2s;\n"])));
45335
- var DefaultMutedIcon = styled(SvgUnmuteNotifications)(_templateObject5$w || (_templateObject5$w = _taggedTemplateLiteralLoose([""])));
45336
- var DefaultMuteIcon = styled(SvgNotifications)(_templateObject6$s || (_templateObject6$s = _taggedTemplateLiteralLoose([""])));
45337
- var DefaultStarIcon = styled(SvgStar)(_templateObject7$r || (_templateObject7$r = _taggedTemplateLiteralLoose([""])));
45338
- var DefaultUnpinIcon = styled(SvgUnpin)(_templateObject8$o || (_templateObject8$o = _taggedTemplateLiteralLoose([""])));
46340
+ var ActionsMenu = styled.ul(_templateObject4$C || (_templateObject4$C = _taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: column;\n margin: 0;\n padding: 0;\n list-style: none;\n transition: all 0.2s;\n"])));
46341
+ var DefaultMutedIcon = styled(SvgUnmuteNotifications)(_templateObject5$x || (_templateObject5$x = _taggedTemplateLiteralLoose([""])));
46342
+ var DefaultMuteIcon = styled(SvgNotifications)(_templateObject6$u || (_templateObject6$u = _taggedTemplateLiteralLoose([""])));
46343
+ var DefaultStarIcon = styled(SvgStar)(_templateObject7$t || (_templateObject7$t = _taggedTemplateLiteralLoose([""])));
46344
+ var DefaultUnpinIcon = styled(SvgUnpin)(_templateObject8$p || (_templateObject8$p = _taggedTemplateLiteralLoose([""])));
45339
46345
  var DefaultPinIcon = styled(SvgPin)(_templateObject9$k || (_templateObject9$k = _taggedTemplateLiteralLoose([""])));
45340
46346
  var DefaultMarkAsRead = styled(SvgMarkAsRead)(_templateObject0$i || (_templateObject0$i = _taggedTemplateLiteralLoose([""])));
45341
46347
  var DefaultMarkAsUnRead = styled(SvgMarkAsUnRead)(_templateObject1$f || (_templateObject1$f = _taggedTemplateLiteralLoose([""])));
@@ -45367,20 +46373,20 @@ var DisappearingMessagesStatusWrapper = styled.div(_templateObject18$3 || (_temp
45367
46373
  var DisappearingMessagesStatus = styled.span(_templateObject19$3 || (_templateObject19$3 = _taggedTemplateLiteralLoose(["\n color: ", ";\n font-weight: 400;\n font-style: normal;\n font-size: 15px;\n line-height: 20px;\n letter-spacing: -0.2px;\n"])), function (props) {
45368
46374
  return props.color;
45369
46375
  });
45370
- var ChevronRightIconWrapper = styled.span(_templateObject20$3 || (_templateObject20$3 = _taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n\n & > svg {\n width: 16px;\n height: 16px;\n transform: rotate(-90deg);\n }\n"])));
46376
+ var ChevronRightIconWrapper$1 = styled.span(_templateObject20$3 || (_templateObject20$3 = _taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n\n & > svg {\n width: 16px;\n height: 16px;\n transform: rotate(-90deg);\n }\n"])));
45371
46377
 
45372
- var _rect$2, _rect2, _path$1v;
45373
- function _extends$1z() {
45374
- return _extends$1z = Object.assign ? Object.assign.bind() : function (n) {
46378
+ var _rect$2, _rect2, _path$1w;
46379
+ function _extends$1A() {
46380
+ return _extends$1A = Object.assign ? Object.assign.bind() : function (n) {
45375
46381
  for (var e = 1; e < arguments.length; e++) {
45376
46382
  var t = arguments[e];
45377
46383
  for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
45378
46384
  }
45379
46385
  return n;
45380
- }, _extends$1z.apply(null, arguments);
46386
+ }, _extends$1A.apply(null, arguments);
45381
46387
  }
45382
46388
  function SvgAddMember(props) {
45383
- return /*#__PURE__*/createElement$1("svg", _extends$1z({
46389
+ return /*#__PURE__*/createElement$1("svg", _extends$1A({
45384
46390
  width: 40,
45385
46391
  height: 40,
45386
46392
  viewBox: "0 0 40.01 40.01",
@@ -45400,35 +46406,35 @@ function SvgAddMember(props) {
45400
46406
  stroke: "#000",
45401
46407
  strokeOpacity: 0.08,
45402
46408
  strokeWidth: 0.5
45403
- })), _path$1v || (_path$1v = /*#__PURE__*/createElement$1("path", {
46409
+ })), _path$1w || (_path$1w = /*#__PURE__*/createElement$1("path", {
45404
46410
  d: "M20 12a1 1 0 011 1v6h6a1 1 0 110 2h-6v6a1 1 0 11-2 0l-.001-6H13a1 1 0 110-2h5.999L19 13a1 1 0 011-1z",
45405
46411
  fill: "CurrentColor"
45406
46412
  })));
45407
46413
  }
45408
46414
 
45409
- var _path$1w;
45410
- function _extends$1A() {
45411
- return _extends$1A = Object.assign ? Object.assign.bind() : function (n) {
46415
+ var _path$1x;
46416
+ function _extends$1B() {
46417
+ return _extends$1B = Object.assign ? Object.assign.bind() : function (n) {
45412
46418
  for (var e = 1; e < arguments.length; e++) {
45413
46419
  var t = arguments[e];
45414
46420
  for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
45415
46421
  }
45416
46422
  return n;
45417
- }, _extends$1A.apply(null, arguments);
46423
+ }, _extends$1B.apply(null, arguments);
45418
46424
  }
45419
46425
  function SvgMoreVert(props) {
45420
- return /*#__PURE__*/createElement$1("svg", _extends$1A({
46426
+ return /*#__PURE__*/createElement$1("svg", _extends$1B({
45421
46427
  width: 4,
45422
46428
  height: 14,
45423
46429
  fill: "none",
45424
46430
  xmlns: "http://www.w3.org/2000/svg"
45425
- }, props), _path$1w || (_path$1w = /*#__PURE__*/createElement$1("path", {
46431
+ }, props), _path$1x || (_path$1x = /*#__PURE__*/createElement$1("path", {
45426
46432
  d: "M.532 11.012c.355-.355.764-.533 1.228-.533.464 0 .874.178 1.228.533.355.354.532.764.532 1.228 0 .464-.177.873-.532 1.228-.354.355-.764.532-1.228.532-.464 0-.873-.177-1.228-.532C.177 13.113 0 12.704 0 12.24c0-.464.177-.873.532-1.228zm0-5.24c.355-.355.764-.532 1.228-.532.464 0 .874.177 1.228.532.355.355.532.764.532 1.228 0 .464-.177.873-.532 1.228-.354.355-.764.532-1.228.532-.464 0-.873-.177-1.228-.532C.177 7.873 0 7.464 0 7c0-.464.177-.873.532-1.228zm2.456-2.784c-.354.355-.764.532-1.228.532-.464 0-.873-.177-1.228-.532C.177 2.634 0 2.224 0 1.76 0 1.296.177.887.532.532.887.177 1.296 0 1.76 0c.464 0 .874.177 1.228.532.355.355.532.764.532 1.228 0 .464-.177.874-.532 1.228z",
45427
46433
  fill: "#9B9DA8"
45428
46434
  })));
45429
46435
  }
45430
46436
 
45431
- var _templateObject$V, _templateObject2$Q, _templateObject3$J;
46437
+ var _templateObject$W, _templateObject2$R, _templateObject3$K;
45432
46438
  var ChangeMemberRole = function ChangeMemberRole(_ref) {
45433
46439
  var theme = _ref.theme,
45434
46440
  channelId = _ref.channelId,
@@ -45531,12 +46537,12 @@ var ChangeMemberRole = function ChangeMemberRole(_ref) {
45531
46537
  onClick: handleSave
45532
46538
  }, "Save"))));
45533
46539
  };
45534
- var RolesSelect = styled.div(_templateObject$V || (_templateObject$V = _taggedTemplateLiteralLoose(["\n margin-bottom: 32px;\n"])));
45535
- var RoleLabel = styled.div(_templateObject2$Q || (_templateObject2$Q = _taggedTemplateLiteralLoose(["\n font-style: normal;\n font-weight: 500;\n font-size: 14px;\n margin: 20px 0 8px;\n color: ", ";\n"])), function (_ref2) {
46540
+ var RolesSelect = styled.div(_templateObject$W || (_templateObject$W = _taggedTemplateLiteralLoose(["\n margin-bottom: 32px;\n"])));
46541
+ var RoleLabel = styled.div(_templateObject2$R || (_templateObject2$R = _taggedTemplateLiteralLoose(["\n font-style: normal;\n font-weight: 500;\n font-size: 14px;\n margin: 20px 0 8px;\n color: ", ";\n"])), function (_ref2) {
45536
46542
  var color = _ref2.color;
45537
46543
  return color;
45538
46544
  });
45539
- var RoleSpan = styled.span(_templateObject3$J || (_templateObject3$J = _taggedTemplateLiteralLoose(["\n font-style: normal;\n font-weight: normal;\n font-size: 14px;\n text-transform: capitalize;\n"])));
46545
+ var RoleSpan = styled.span(_templateObject3$K || (_templateObject3$K = _taggedTemplateLiteralLoose(["\n font-style: normal;\n font-weight: normal;\n font-size: 14px;\n text-transform: capitalize;\n"])));
45540
46546
 
45541
46547
  function ResetLinkConfirmModal(_ref) {
45542
46548
  var _getInviteLinkOptions;
@@ -45573,7 +46579,7 @@ function ResetLinkConfirmModal(_ref) {
45573
46579
  });
45574
46580
  }
45575
46581
 
45576
- var _templateObject$W, _templateObject2$R, _templateObject3$K, _templateObject4$C, _templateObject5$x, _templateObject6$t, _templateObject7$s, _templateObject8$p, _templateObject9$l, _templateObject0$j, _templateObject1$g, _templateObject10$a, _templateObject11$8, _templateObject12$7, _templateObject13$5;
46582
+ var _templateObject$X, _templateObject2$S, _templateObject3$L, _templateObject4$D, _templateObject5$y, _templateObject6$v, _templateObject7$u, _templateObject8$q, _templateObject9$l, _templateObject0$j, _templateObject1$g, _templateObject10$a, _templateObject11$8, _templateObject12$7, _templateObject13$5;
45577
46583
  function InviteLinkModal(_ref) {
45578
46584
  var _getInviteLinkOptions, _tabs$link, _tabs$qr, _tabs$link2, _tabs$qr2;
45579
46585
  var onClose = _ref.onClose,
@@ -46057,34 +47063,34 @@ function InviteLinkModal(_ref) {
46057
47063
  handleForward: handleForwardChannels
46058
47064
  })));
46059
47065
  }
46060
- var LogoIconCont = styled.div(_templateObject$W || (_templateObject$W = _taggedTemplateLiteralLoose(["\n position: absolute;\n top: calc(50% - 11%);\n left: calc(50% - 11%);\n width: 22%;\n height: 22%;\n img {\n width: 100%;\n height: 100%;\n object-fit: contain;\n border-radius: 10px;\n }\n svg {\n width: 100%;\n height: 100%;\n object-fit: contain;\n border-radius: 10px;\n }\n"])));
46061
- var Tabs$1 = styled.div(_templateObject2$R || (_templateObject2$R = _taggedTemplateLiteralLoose(["\n display: grid;\n grid-template-columns: 1fr 1fr;\n gap: 8px;\n border-radius: 10px;\n background-color: ", ";\n padding: 2px;\n margin: 4px 0 16px;\n border: 1px solid ", ";\n"])), function (p) {
47066
+ var LogoIconCont = styled.div(_templateObject$X || (_templateObject$X = _taggedTemplateLiteralLoose(["\n position: absolute;\n top: calc(50% - 11%);\n left: calc(50% - 11%);\n width: 22%;\n height: 22%;\n img {\n width: 100%;\n height: 100%;\n object-fit: contain;\n border-radius: 10px;\n }\n svg {\n width: 100%;\n height: 100%;\n object-fit: contain;\n border-radius: 10px;\n }\n"])));
47067
+ var Tabs$1 = styled.div(_templateObject2$S || (_templateObject2$S = _taggedTemplateLiteralLoose(["\n display: grid;\n grid-template-columns: 1fr 1fr;\n gap: 8px;\n border-radius: 10px;\n background-color: ", ";\n padding: 2px;\n margin: 4px 0 16px;\n border: 1px solid ", ";\n"])), function (p) {
46062
47068
  return p.backgroundColor;
46063
47069
  }, function (p) {
46064
47070
  return p.borderColor;
46065
47071
  });
46066
- var TabButton = styled.button(_templateObject3$K || (_templateObject3$K = _taggedTemplateLiteralLoose(["\n height: 36px;\n border: none;\n border-radius: 10px;\n cursor: pointer;\n background-color: ", ";\n ", "\n color: ", ";\n"])), function (p) {
47072
+ var TabButton = styled.button(_templateObject3$L || (_templateObject3$L = _taggedTemplateLiteralLoose(["\n height: 36px;\n border: none;\n border-radius: 10px;\n cursor: pointer;\n background-color: ", ";\n ", "\n color: ", ";\n"])), function (p) {
46067
47073
  return p.active ? p.activeBackgroundColor : p.backgroundColor;
46068
47074
  }, function (p) {
46069
47075
  return p.active && "\n box-shadow: 0px 3px 6px -4px #0000001F;\n ";
46070
47076
  }, function (p) {
46071
47077
  return p.active ? p.activeColor : p.inactiveColor;
46072
47078
  });
46073
- var Description = styled.p(_templateObject4$C || (_templateObject4$C = _taggedTemplateLiteralLoose(["\n margin: 8px 0 16px;\n font-size: 14px;\n line-height: 16px;\n color: ", ";\n"])), function (p) {
47079
+ var Description = styled.p(_templateObject4$D || (_templateObject4$D = _taggedTemplateLiteralLoose(["\n margin: 8px 0 16px;\n font-size: 14px;\n line-height: 16px;\n color: ", ";\n"])), function (p) {
46074
47080
  return p.color;
46075
47081
  });
46076
- var FieldLabel = styled.span(_templateObject5$x || (_templateObject5$x = _taggedTemplateLiteralLoose(["\n font-size: 14px;\n line-height: 16px;\n color: ", ";\n"])), function (p) {
47082
+ var FieldLabel = styled.span(_templateObject5$y || (_templateObject5$y = _taggedTemplateLiteralLoose(["\n font-size: 14px;\n line-height: 16px;\n color: ", ";\n"])), function (p) {
46077
47083
  return p.color;
46078
47084
  });
46079
- var LinkField = styled.div(_templateObject6$t || (_templateObject6$t = _taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n border: 1px solid ", ";\n border-radius: 8px;\n margin-top: 8px;\n padding-left: 12px;\n background-color: ", ";\n"])), function (p) {
47085
+ var LinkField = styled.div(_templateObject6$v || (_templateObject6$v = _taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n border: 1px solid ", ";\n border-radius: 8px;\n margin-top: 8px;\n padding-left: 12px;\n background-color: ", ";\n"])), function (p) {
46080
47086
  return p.borderColor;
46081
47087
  }, function (p) {
46082
47088
  return p.backgroundColor;
46083
47089
  });
46084
- var LinkInput = styled.input(_templateObject7$s || (_templateObject7$s = _taggedTemplateLiteralLoose(["\n flex: 1;\n border: none;\n outline: none;\n height: 40px;\n background: transparent;\n color: ", ";\n font-size: 14px;\n"])), function (p) {
47090
+ var LinkInput = styled.input(_templateObject7$u || (_templateObject7$u = _taggedTemplateLiteralLoose(["\n flex: 1;\n border: none;\n outline: none;\n height: 40px;\n background: transparent;\n color: ", ";\n font-size: 14px;\n"])), function (p) {
46085
47091
  return p.color;
46086
47092
  });
46087
- var CopyButton = styled.button(_templateObject8$p || (_templateObject8$p = _taggedTemplateLiteralLoose(["\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 40px;\n height: 40px;\n border: none;\n background: transparent;\n cursor: pointer;\n"])));
47093
+ var CopyButton = styled.button(_templateObject8$q || (_templateObject8$q = _taggedTemplateLiteralLoose(["\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 40px;\n height: 40px;\n border: none;\n background: transparent;\n cursor: pointer;\n"])));
46088
47094
  var CopyButtonWrapper = styled.div(_templateObject9$l || (_templateObject9$l = _taggedTemplateLiteralLoose(["\n position: relative;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n"])));
46089
47095
  var SectionTitle = styled.h4(_templateObject0$j || (_templateObject0$j = _taggedTemplateLiteralLoose(["\n margin: 16px 0 8px;\n font-weight: 500;\n font-size: 15px;\n line-height: 16px;\n color: ", ";\n"])), function (p) {
46090
47096
  return p.color;
@@ -46105,7 +47111,7 @@ var QrHint = styled.p(_templateObject13$5 || (_templateObject13$5 = _taggedTempl
46105
47111
  return p.color;
46106
47112
  });
46107
47113
 
46108
- var _templateObject$X, _templateObject2$S, _templateObject3$L, _templateObject4$D, _templateObject5$y, _templateObject6$u, _templateObject7$t, _templateObject8$q, _templateObject9$m;
47114
+ var _templateObject$Y, _templateObject2$T, _templateObject3$M, _templateObject4$E, _templateObject5$z, _templateObject6$w, _templateObject7$v, _templateObject8$r, _templateObject9$m;
46109
47115
  var Members = function Members(_ref) {
46110
47116
  var _members$find;
46111
47117
  var channel = _ref.channel,
@@ -46158,14 +47164,12 @@ var Members = function Members(_ref) {
46158
47164
  var _useState7 = useState(false),
46159
47165
  addMemberPopupOpen = _useState7[0],
46160
47166
  setAddMemberPopupOpen = _useState7[1];
46161
- var _useState8 = useState(false),
46162
- openInviteModal = _useState8[0],
46163
- setOpenInviteModal = _useState8[1];
46164
- var _useState9 = useState(),
46165
- closeMenu = _useState9[0],
46166
- setCloseMenu = _useState9[1];
47167
+ var _useState8 = useState(),
47168
+ closeMenu = _useState8[0],
47169
+ setCloseMenu = _useState8[1];
46167
47170
  var members = useSelector(activeChannelMembersSelector) || [];
46168
47171
  var contactsMap = useSelector(contactsMapSelector) || {};
47172
+ var openInviteModal = useSelector(openInviteModalSelector);
46169
47173
  var user = getClient().user;
46170
47174
  var memberDisplayText = getChannelTypesMemberDisplayTextMap();
46171
47175
  var channelTypeRoleMap = getDefaultRolesByChannelTypesMap();
@@ -46261,7 +47265,7 @@ var Members = function Members(_ref) {
46261
47265
  }
46262
47266
  };
46263
47267
  var handleOpenInviteModal = function handleOpenInviteModal() {
46264
- setOpenInviteModal(true);
47268
+ dispatch(setOpenInviteModalAC(true));
46265
47269
  setAddMemberPopupOpen(false);
46266
47270
  };
46267
47271
  useEffect(function () {
@@ -46413,24 +47417,24 @@ var Members = function Members(_ref) {
46413
47417
  handleOpenInviteModal: handleOpenInviteModal
46414
47418
  })), openInviteModal && (/*#__PURE__*/React__default.createElement(InviteLinkModal, {
46415
47419
  onClose: function onClose() {
46416
- return setOpenInviteModal(false);
47420
+ return dispatch(setOpenInviteModalAC(false));
46417
47421
  },
46418
47422
  SVGOrPNGLogoIcon: QRCodeIcon,
46419
47423
  channelId: channel.id
46420
47424
  })));
46421
47425
  };
46422
- var Container$o = styled.div(_templateObject$X || (_templateObject$X = _taggedTemplateLiteralLoose([""])));
46423
- var ActionsMenu$1 = styled.div(_templateObject2$S || (_templateObject2$S = _taggedTemplateLiteralLoose(["\n position: relative;\n transition: all 0.2s;\n"])));
46424
- var MemberNamePresence = styled.div(_templateObject3$L || (_templateObject3$L = _taggedTemplateLiteralLoose(["\n margin-left: 12px;\n max-width: calc(100% - 84px);\n\n & > ", " {\n display: block;\n }\n"])), SubTitle);
46425
- var MemberNameWrapper = styled.div(_templateObject4$D || (_templateObject4$D = _taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n"])));
46426
- var MemberName$3 = styled.h4(_templateObject5$y || (_templateObject5$y = _taggedTemplateLiteralLoose(["\n margin: 0;\n font-weight: 400;\n white-space: nowrap;\n text-overflow: ellipsis;\n overflow: hidden;\n color: ", ";\n"])), function (props) {
47426
+ var Container$o = styled.div(_templateObject$Y || (_templateObject$Y = _taggedTemplateLiteralLoose([""])));
47427
+ var ActionsMenu$1 = styled.div(_templateObject2$T || (_templateObject2$T = _taggedTemplateLiteralLoose(["\n position: relative;\n transition: all 0.2s;\n"])));
47428
+ var MemberNamePresence = styled.div(_templateObject3$M || (_templateObject3$M = _taggedTemplateLiteralLoose(["\n margin-left: 12px;\n max-width: calc(100% - 84px);\n\n & > ", " {\n display: block;\n }\n"])), SubTitle);
47429
+ var MemberNameWrapper = styled.div(_templateObject4$E || (_templateObject4$E = _taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n"])));
47430
+ var MemberName$3 = styled.h4(_templateObject5$z || (_templateObject5$z = _taggedTemplateLiteralLoose(["\n margin: 0;\n font-weight: 400;\n white-space: nowrap;\n text-overflow: ellipsis;\n overflow: hidden;\n color: ", ";\n"])), function (props) {
46427
47431
  return props.color;
46428
47432
  });
46429
- var EditMemberIcon = styled.span(_templateObject6$u || (_templateObject6$u = _taggedTemplateLiteralLoose(["\n margin-left: auto;\n cursor: pointer;\n padding: 15px;\n opacity: 0;\n visibility: hidden;\n transition: all 0.2s;\n\n & svg {\n color: ", ";\n }\n"])), function (props) {
47433
+ var EditMemberIcon = styled.span(_templateObject6$w || (_templateObject6$w = _taggedTemplateLiteralLoose(["\n margin-left: auto;\n cursor: pointer;\n padding: 15px;\n opacity: 0;\n visibility: hidden;\n transition: all 0.2s;\n\n & svg {\n color: ", ";\n }\n"])), function (props) {
46430
47434
  return props.color;
46431
47435
  });
46432
- var MembersList = styled.ul(_templateObject7$t || (_templateObject7$t = _taggedTemplateLiteralLoose(["\n margin: 0;\n padding: 0;\n list-style: none;\n transition: all 0.2s;\n"])));
46433
- var MemberItem$1 = styled.li(_templateObject8$q || (_templateObject8$q = _taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n font-size: ", ";\n font-weight: 500;\n padding: 6px 16px;\n transition: all 0.2s;\n color: ", ";\n cursor: pointer;\n\n & > svg {\n rect {\n fill: transparent;\n }\n }\n\n &:first-child {\n cursor: pointer;\n\n > svg {\n color: ", ";\n margin-right: 12px;\n & > rect {\n fill: ", " !important;\n }\n }\n }\n\n &:hover {\n background-color: ", ";\n }\n\n &:hover ", " {\n opacity: 1;\n visibility: visible;\n }\n\n & .dropdown-wrapper {\n margin-left: auto;\n }\n\n & ", " {\n width: 12px;\n height: 12px;\n right: -1px;\n bottom: -1px;\n }\n"])), function (props) {
47436
+ var MembersList = styled.ul(_templateObject7$v || (_templateObject7$v = _taggedTemplateLiteralLoose(["\n margin: 0;\n padding: 0;\n list-style: none;\n transition: all 0.2s;\n"])));
47437
+ var MemberItem$1 = styled.li(_templateObject8$r || (_templateObject8$r = _taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n font-size: ", ";\n font-weight: 500;\n padding: 6px 16px;\n transition: all 0.2s;\n color: ", ";\n cursor: pointer;\n\n & > svg {\n rect {\n fill: transparent;\n }\n }\n\n &:first-child {\n cursor: pointer;\n\n > svg {\n color: ", ";\n margin-right: 12px;\n & > rect {\n fill: ", " !important;\n }\n }\n }\n\n &:hover {\n background-color: ", ";\n }\n\n &:hover ", " {\n opacity: 1;\n visibility: visible;\n }\n\n & .dropdown-wrapper {\n margin-left: auto;\n }\n\n & ", " {\n width: 12px;\n height: 12px;\n right: -1px;\n bottom: -1px;\n }\n"])), function (props) {
46434
47438
  return props.fontSize || '15px';
46435
47439
  }, function (props) {
46436
47440
  return props.color;
@@ -46447,7 +47451,7 @@ var RoleBadge = styled.span(_templateObject9$m || (_templateObject9$m = _taggedT
46447
47451
  return props.backgroundColor;
46448
47452
  });
46449
47453
 
46450
- var _templateObject$Y;
47454
+ var _templateObject$Z;
46451
47455
  var MonthHeader = function MonthHeader(_ref) {
46452
47456
  var currentCreatedAt = _ref.currentCreatedAt,
46453
47457
  previousCreatedAt = _ref.previousCreatedAt,
@@ -46472,7 +47476,7 @@ var MonthHeader = function MonthHeader(_ref) {
46472
47476
  }, [currentCreatedAt, previousCreatedAt, isFirst, textSecondary, padding, fullWidth]);
46473
47477
  return monthComponent;
46474
47478
  };
46475
- var MonthHeaderContainer = styled.div(_templateObject$Y || (_templateObject$Y = _taggedTemplateLiteralLoose(["\n padding: ", ";\n width: ", ";\n font-style: normal;\n font-weight: 500;\n font-size: 13px;\n line-height: 16px;\n color: ", ";\n text-transform: uppercase;\n"])), function (props) {
47479
+ var MonthHeaderContainer = styled.div(_templateObject$Z || (_templateObject$Z = _taggedTemplateLiteralLoose(["\n padding: ", ";\n width: ", ";\n font-style: normal;\n font-weight: 500;\n font-size: 13px;\n line-height: 16px;\n color: ", ";\n text-transform: uppercase;\n"])), function (props) {
46476
47480
  return props.padding || '9px 12px';
46477
47481
  }, function (props) {
46478
47482
  return props.fullWidth ? '100%' : 'auto';
@@ -46480,7 +47484,7 @@ var MonthHeaderContainer = styled.div(_templateObject$Y || (_templateObject$Y =
46480
47484
  return props.color;
46481
47485
  });
46482
47486
 
46483
- var _templateObject$Z, _templateObject2$T;
47487
+ var _templateObject$_, _templateObject2$U;
46484
47488
  var Media = function Media(_ref) {
46485
47489
  var channel = _ref.channel;
46486
47490
  var _useColor = useColors(),
@@ -46532,21 +47536,21 @@ var Media = function Media(_ref) {
46532
47536
  currentMediaFile: mediaFile
46533
47537
  })));
46534
47538
  };
46535
- var Container$p = styled.div(_templateObject$Z || (_templateObject$Z = _taggedTemplateLiteralLoose(["\n padding: 6px 4px;\n overflow-x: hidden;\n overflow-y: auto;\n list-style: none;\n transition: all 0.2s;\n align-items: flex-start;\n display: flex;\n flex-wrap: wrap;\n"])));
46536
- var MediaItem = styled.div(_templateObject2$T || (_templateObject2$T = _taggedTemplateLiteralLoose(["\n width: calc(33.3333% - 4px);\n aspect-ratio: 1/1;\n box-sizing: border-box;\n //border: 1px solid #ccc;\n border: 0.5px solid rgba(0, 0, 0, 0.1);\n border-radius: 8px;\n overflow: hidden;\n margin: 2px;\n"])));
47539
+ var Container$p = styled.div(_templateObject$_ || (_templateObject$_ = _taggedTemplateLiteralLoose(["\n padding: 6px 4px;\n overflow-x: hidden;\n overflow-y: auto;\n list-style: none;\n transition: all 0.2s;\n align-items: flex-start;\n display: flex;\n flex-wrap: wrap;\n"])));
47540
+ var MediaItem = styled.div(_templateObject2$U || (_templateObject2$U = _taggedTemplateLiteralLoose(["\n width: calc(33.3333% - 4px);\n aspect-ratio: 1/1;\n box-sizing: border-box;\n //border: 1px solid #ccc;\n border: 0.5px solid rgba(0, 0, 0, 0.1);\n border-radius: 8px;\n overflow: hidden;\n margin: 2px;\n"])));
46537
47541
 
46538
- var _rect$3, _path$1x;
46539
- function _extends$1B() {
46540
- return _extends$1B = Object.assign ? Object.assign.bind() : function (n) {
47542
+ var _rect$3, _path$1y;
47543
+ function _extends$1C() {
47544
+ return _extends$1C = Object.assign ? Object.assign.bind() : function (n) {
46541
47545
  for (var e = 1; e < arguments.length; e++) {
46542
47546
  var t = arguments[e];
46543
47547
  for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
46544
47548
  }
46545
47549
  return n;
46546
- }, _extends$1B.apply(null, arguments);
47550
+ }, _extends$1C.apply(null, arguments);
46547
47551
  }
46548
47552
  function SvgDocumentIcon(props) {
46549
- return /*#__PURE__*/createElement$1("svg", _extends$1B({
47553
+ return /*#__PURE__*/createElement$1("svg", _extends$1C({
46550
47554
  width: 40,
46551
47555
  height: 40,
46552
47556
  fill: "none",
@@ -46557,7 +47561,7 @@ function SvgDocumentIcon(props) {
46557
47561
  rx: 8,
46558
47562
  fill: "currentColor",
46559
47563
  fillOpacity: 0.2
46560
- })), _path$1x || (_path$1x = /*#__PURE__*/createElement$1("path", {
47564
+ })), _path$1y || (_path$1y = /*#__PURE__*/createElement$1("path", {
46561
47565
  fillRule: "evenodd",
46562
47566
  clipRule: "evenodd",
46563
47567
  d: "M17.593 9.5c-2.098 0-3.023.185-3.962.687a4.685 4.685 0 00-1.944 1.944c-.502.939-.687 1.864-.687 3.962v7.386c0 2.098.185 3.023.687 3.962a4.685 4.685 0 001.944 1.944c.939.502 1.864.686 3.962.686h3.957c2.098 0 3.023-.184 3.962-.687a4.685 4.685 0 001.944-1.944c.502-.938.687-1.863.687-3.961v-5.1c0-.683-.024-.99-.105-1.34a3.094 3.094 0 00-.399-.964c-.19-.305-.39-.54-.874-1.022l-4.175-4.175c-.483-.483-.717-.684-1.022-.874a3.096 3.096 0 00-.963-.4c-.294-.067-.556-.095-1.034-.102V9.5h-1.978zm0 1.714c-2.002 0-2.587.182-3.154.485a2.971 2.971 0 00-1.24 1.24c-.303.567-.485 1.152-.485 3.154v7.386c0 2.001.182 2.587.485 3.153a2.97 2.97 0 001.24 1.24c.567.304 1.152.485 3.154.485h3.957c2.001 0 2.587-.181 3.153-.484a2.97 2.97 0 001.241-1.241c.303-.566.485-1.152.485-3.153v-5.1c0-.118-.001-.22-.003-.308h-4.712a2.143 2.143 0 01-2.143-2.142l.002-4.713-.15-.001h-1.83zm3.785.876l-.092-.091v3.93c0 .21.151.385.351.421l.077.007 3.932.002-.093-.094-4.175-4.175zm-6.092 12.839c0-.474.383-.858.857-.858h3.428a.857.857 0 010 1.715h-3.428a.857.857 0 01-.857-.857zm.857-4.286a.857.857 0 100 1.714h6a.857.857 0 000-1.714h-6z",
@@ -46565,30 +47569,30 @@ function SvgDocumentIcon(props) {
46565
47569
  })));
46566
47570
  }
46567
47571
 
46568
- var _path$1y;
46569
- function _extends$1C() {
46570
- return _extends$1C = Object.assign ? Object.assign.bind() : function (n) {
47572
+ var _path$1z;
47573
+ function _extends$1D() {
47574
+ return _extends$1D = Object.assign ? Object.assign.bind() : function (n) {
46571
47575
  for (var e = 1; e < arguments.length; e++) {
46572
47576
  var t = arguments[e];
46573
47577
  for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
46574
47578
  }
46575
47579
  return n;
46576
- }, _extends$1C.apply(null, arguments);
47580
+ }, _extends$1D.apply(null, arguments);
46577
47581
  }
46578
47582
  function SvgDownloadFile(props) {
46579
- return /*#__PURE__*/createElement$1("svg", _extends$1C({
47583
+ return /*#__PURE__*/createElement$1("svg", _extends$1D({
46580
47584
  width: 24,
46581
47585
  height: 24,
46582
47586
  xmlns: "http://www.w3.org/2000/svg",
46583
47587
  fill: "currentColor"
46584
- }, props), _path$1y || (_path$1y = /*#__PURE__*/createElement$1("path", {
47588
+ }, props), _path$1z || (_path$1z = /*#__PURE__*/createElement$1("path", {
46585
47589
  fillRule: "evenodd",
46586
47590
  clipRule: "evenodd",
46587
47591
  d: "M12 2a.91.91 0 01.91.91v11.44l2.993-2.993a.91.91 0 011.285 1.286l-4.545 4.545a.91.91 0 01-1.286 0l-4.545-4.545a.909.909 0 111.285-1.286l2.994 2.994V2.909A.91.91 0 0112 2zM2.91 15.636a.91.91 0 01.908.91v1.136a2.5 2.5 0 002.5 2.5h11.364a2.5 2.5 0 002.5-2.5v-1.136a.91.91 0 111.818 0v1.136A4.318 4.318 0 0117.682 22H6.318A4.318 4.318 0 012 17.682v-1.136a.91.91 0 01.91-.91z"
46588
47592
  })));
46589
47593
  }
46590
47594
 
46591
- var _templateObject$_, _templateObject2$U, _templateObject3$M, _templateObject4$E, _templateObject5$z, _templateObject6$v, _templateObject7$u, _templateObject8$r;
47595
+ var _templateObject$$, _templateObject2$V, _templateObject3$N, _templateObject4$F, _templateObject5$A, _templateObject6$x, _templateObject7$w, _templateObject8$s;
46592
47596
  var Files = function Files(_ref) {
46593
47597
  var channelId = _ref.channelId,
46594
47598
  filePreviewIcon = _ref.filePreviewIcon,
@@ -46710,30 +47714,30 @@ var Files = function Files(_ref) {
46710
47714
  }))) : filePreviewDownloadIcon || /*#__PURE__*/React__default.createElement(SvgDownloadFile, null))));
46711
47715
  }));
46712
47716
  };
46713
- var Container$q = styled.ul(_templateObject$_ || (_templateObject$_ = _taggedTemplateLiteralLoose(["\n margin: 0;\n padding: 0;\n overflow-x: hidden;\n overflow-y: auto;\n list-style: none;\n transition: all 0.2s;\n"])));
46714
- var DownloadWrapper = styled.a(_templateObject2$U || (_templateObject2$U = _taggedTemplateLiteralLoose(["\n text-decoration: none;\n visibility: ", ";\n padding: 5px 6px;\n position: absolute;\n top: 25%;\n right: 16px;\n cursor: pointer;\n & > svg {\n & path {\n fill: ", ";\n }\n color: ", ";\n }\n"])), function (props) {
47717
+ var Container$q = styled.ul(_templateObject$$ || (_templateObject$$ = _taggedTemplateLiteralLoose(["\n margin: 0;\n padding: 0;\n overflow-x: hidden;\n overflow-y: auto;\n list-style: none;\n transition: all 0.2s;\n"])));
47718
+ var DownloadWrapper = styled.a(_templateObject2$V || (_templateObject2$V = _taggedTemplateLiteralLoose(["\n text-decoration: none;\n visibility: ", ";\n padding: 5px 6px;\n position: absolute;\n top: 25%;\n right: 16px;\n cursor: pointer;\n & > svg {\n & path {\n fill: ", ";\n }\n color: ", ";\n }\n"])), function (props) {
46715
47719
  return props.visible ? 'visible' : 'hidden';
46716
47720
  }, function (props) {
46717
47721
  return props.iconColor;
46718
47722
  }, function (props) {
46719
47723
  return props.iconColor;
46720
47724
  });
46721
- var ProgressWrapper$2 = styled.span(_templateObject3$M || (_templateObject3$M = _taggedTemplateLiteralLoose(["\n display: inline-block;\n width: 20px;\n height: 20px;\n animation: preloader 1.5s linear infinite;\n\n @keyframes preloader {\n 0% {\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(360deg);\n }\n }\n"])));
46722
- var FileIconCont = styled.span(_templateObject4$E || (_templateObject4$E = _taggedTemplateLiteralLoose(["\n display: inline-flex;\n & > svg {\n width: 40px;\n height: 40px;\n color: ", ";\n rect {\n fill: ", ";\n }\n }\n"])), function (props) {
47725
+ var ProgressWrapper$2 = styled.span(_templateObject3$N || (_templateObject3$N = _taggedTemplateLiteralLoose(["\n display: inline-block;\n width: 20px;\n height: 20px;\n animation: preloader 1.5s linear infinite;\n\n @keyframes preloader {\n 0% {\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(360deg);\n }\n }\n"])));
47726
+ var FileIconCont = styled.span(_templateObject4$F || (_templateObject4$F = _taggedTemplateLiteralLoose(["\n display: inline-flex;\n & > svg {\n width: 40px;\n height: 40px;\n color: ", ";\n rect {\n fill: ", ";\n }\n }\n"])), function (props) {
46723
47727
  return props.iconColor;
46724
47728
  }, function (props) {
46725
47729
  return props.fillColor;
46726
47730
  });
46727
- var FileHoverIconCont = styled.span(_templateObject5$z || (_templateObject5$z = _taggedTemplateLiteralLoose(["\n display: none;\n & > svg {\n width: 40px;\n height: 40px;\n color: ", ";\n rect {\n fill: ", ";\n }\n }\n"])), function (props) {
47731
+ var FileHoverIconCont = styled.span(_templateObject5$A || (_templateObject5$A = _taggedTemplateLiteralLoose(["\n display: none;\n & > svg {\n width: 40px;\n height: 40px;\n color: ", ";\n rect {\n fill: ", ";\n }\n }\n"])), function (props) {
46728
47732
  return props.iconColor;
46729
47733
  }, function (props) {
46730
47734
  return props.fillColor;
46731
47735
  });
46732
- var FileThumb = styled.img(_templateObject6$v || (_templateObject6$v = _taggedTemplateLiteralLoose(["\n width: 40px;\n height: 40px;\n border: 0.5px solid rgba(0, 0, 0, 0.1);\n border-radius: 8px;\n object-fit: cover;\n"])));
46733
- var FileItem = styled.div(_templateObject7$u || (_templateObject7$u = _taggedTemplateLiteralLoose(["\n position: relative;\n padding: 11px 16px;\n display: flex;\n align-items: center;\n font-size: 15px;\n transition: all 0.2s;\n div {\n margin-left: 7px;\n width: calc(100% - 48px);\n }\n &:hover {\n background-color: ", ";\n ", " {\n visibility: visible;\n }\n & ", " {\n display: none;\n }\n & ", " {\n display: inline-flex;\n }\n }\n /*&.isHover {\n\n }*/\n"])), function (props) {
47736
+ var FileThumb = styled.img(_templateObject6$x || (_templateObject6$x = _taggedTemplateLiteralLoose(["\n width: 40px;\n height: 40px;\n border: 0.5px solid rgba(0, 0, 0, 0.1);\n border-radius: 8px;\n object-fit: cover;\n"])));
47737
+ var FileItem = styled.div(_templateObject7$w || (_templateObject7$w = _taggedTemplateLiteralLoose(["\n position: relative;\n padding: 11px 16px;\n display: flex;\n align-items: center;\n font-size: 15px;\n transition: all 0.2s;\n div {\n margin-left: 7px;\n width: calc(100% - 48px);\n }\n &:hover {\n background-color: ", ";\n ", " {\n visibility: visible;\n }\n & ", " {\n display: none;\n }\n & ", " {\n display: inline-flex;\n }\n }\n /*&.isHover {\n\n }*/\n"])), function (props) {
46734
47738
  return props.hoverBackgroundColor;
46735
47739
  }, DownloadWrapper, FileIconCont, FileHoverIconCont);
46736
- var FileSizeAndDate = styled.span(_templateObject8$r || (_templateObject8$r = _taggedTemplateLiteralLoose(["\n display: block;\n font-style: normal;\n font-weight: normal;\n font-size: ", ";\n line-height: ", ";\n color: ", ";\n margin-top: 2px;\n"])), function (props) {
47740
+ var FileSizeAndDate = styled.span(_templateObject8$s || (_templateObject8$s = _taggedTemplateLiteralLoose(["\n display: block;\n font-style: normal;\n font-weight: normal;\n font-size: ", ";\n line-height: ", ";\n color: ", ";\n margin-top: 2px;\n"])), function (props) {
46737
47741
  return props.fontSize || '13px';
46738
47742
  }, function (props) {
46739
47743
  return props.lineHeight || '16px';
@@ -46741,18 +47745,18 @@ var FileSizeAndDate = styled.span(_templateObject8$r || (_templateObject8$r = _t
46741
47745
  return props.color;
46742
47746
  });
46743
47747
 
46744
- var _rect$4, _path$1z;
46745
- function _extends$1D() {
46746
- return _extends$1D = Object.assign ? Object.assign.bind() : function (n) {
47748
+ var _rect$4, _path$1A;
47749
+ function _extends$1E() {
47750
+ return _extends$1E = Object.assign ? Object.assign.bind() : function (n) {
46747
47751
  for (var e = 1; e < arguments.length; e++) {
46748
47752
  var t = arguments[e];
46749
47753
  for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
46750
47754
  }
46751
47755
  return n;
46752
- }, _extends$1D.apply(null, arguments);
47756
+ }, _extends$1E.apply(null, arguments);
46753
47757
  }
46754
47758
  function SvgLinkIcon(props) {
46755
- return /*#__PURE__*/createElement$1("svg", _extends$1D({
47759
+ return /*#__PURE__*/createElement$1("svg", _extends$1E({
46756
47760
  width: 40,
46757
47761
  height: 40,
46758
47762
  fill: "none",
@@ -46764,7 +47768,7 @@ function SvgLinkIcon(props) {
46764
47768
  rx: 8,
46765
47769
  fill: "currentColor",
46766
47770
  fillOpacity: 0.2
46767
- })), _path$1z || (_path$1z = /*#__PURE__*/createElement$1("path", {
47771
+ })), _path$1A || (_path$1A = /*#__PURE__*/createElement$1("path", {
46768
47772
  fillRule: "evenodd",
46769
47773
  clipRule: "evenodd",
46770
47774
  d: "M21.547 11.524a4.9 4.9 0 016.928 6.929l-.01.011-4 4a4.9 4.9 0 01-6.93 0 .9.9 0 011.273-1.273 3.1 3.1 0 004.384 0l3.994-3.994a3.1 3.1 0 00-4.384-4.383l-1.094 1.094a.9.9 0 01-1.272-1.273l1.1-1.1.01-.01zm-6.011 6.011a4.9 4.9 0 016.928 0 .9.9 0 11-1.272 1.273 3.1 3.1 0 00-4.384 0l-4 4-.01.011a3.1 3.1 0 104.383 4.384l.01-.012 1.103-1.1a.9.9 0 111.272 1.272l-1.097 1.096a4.9 4.9 0 11-6.928-6.929l3.995-3.995z",
@@ -46772,7 +47776,7 @@ function SvgLinkIcon(props) {
46772
47776
  })));
46773
47777
  }
46774
47778
 
46775
- var _templateObject$$, _templateObject2$V, _templateObject3$N, _templateObject4$F, _templateObject5$A;
47779
+ var _templateObject$10, _templateObject2$W, _templateObject3$O, _templateObject4$G, _templateObject5$B;
46776
47780
  var LinkItem = function LinkItem(_ref) {
46777
47781
  var link = _ref.link,
46778
47782
  linkPreviewIcon = _ref.linkPreviewIcon,
@@ -46803,25 +47807,25 @@ var LinkItem = function LinkItem(_ref) {
46803
47807
  color: linkPreviewColor || textPrimary
46804
47808
  }, link))));
46805
47809
  };
46806
- var LinkIconCont = styled.span(_templateObject$$ || (_templateObject$$ = _taggedTemplateLiteralLoose(["\n display: inline-flex;\n > svg {\n color: ", ";\n rect {\n fill: ", ";\n }\n }\n"])), function (props) {
47810
+ var LinkIconCont = styled.span(_templateObject$10 || (_templateObject$10 = _taggedTemplateLiteralLoose(["\n display: inline-flex;\n > svg {\n color: ", ";\n rect {\n fill: ", ";\n }\n }\n"])), function (props) {
46807
47811
  return props.iconColor;
46808
47812
  }, function (props) {
46809
47813
  return props.fillColor;
46810
47814
  });
46811
- var LinkHoverIconCont = styled.span(_templateObject2$V || (_templateObject2$V = _taggedTemplateLiteralLoose(["\n display: none;\n > svg {\n color: ", ";\n rect {\n fill: ", ";\n }\n }\n"])), function (props) {
47815
+ var LinkHoverIconCont = styled.span(_templateObject2$W || (_templateObject2$W = _taggedTemplateLiteralLoose(["\n display: none;\n > svg {\n color: ", ";\n rect {\n fill: ", ";\n }\n }\n"])), function (props) {
46812
47816
  return props.iconColor;
46813
47817
  }, function (props) {
46814
47818
  return props.fillColor;
46815
47819
  });
46816
- var LinkInfoCont = styled.div(_templateObject3$N || (_templateObject3$N = _taggedTemplateLiteralLoose(["\n margin-left: 12px;\n width: calc(100% - 40px);\n"])));
46817
- var FileItem$1 = styled.li(_templateObject4$F || (_templateObject4$F = _taggedTemplateLiteralLoose(["\n padding: 9px 16px;\n a {\n display: flex;\n align-items: center;\n text-decoration: none;\n }\n &:hover {\n background-color: ", ";\n & ", " {\n display: none;\n }\n & ", " {\n display: inline-flex;\n }\n }\n"])), function (props) {
47820
+ var LinkInfoCont = styled.div(_templateObject3$O || (_templateObject3$O = _taggedTemplateLiteralLoose(["\n margin-left: 12px;\n width: calc(100% - 40px);\n"])));
47821
+ var FileItem$1 = styled.li(_templateObject4$G || (_templateObject4$G = _taggedTemplateLiteralLoose(["\n padding: 9px 16px;\n a {\n display: flex;\n align-items: center;\n text-decoration: none;\n }\n &:hover {\n background-color: ", ";\n & ", " {\n display: none;\n }\n & ", " {\n display: inline-flex;\n }\n }\n"])), function (props) {
46818
47822
  return props.hoverBackgroundColor;
46819
47823
  }, LinkIconCont, LinkHoverIconCont);
46820
- var LinkUrl = styled.span(_templateObject5$A || (_templateObject5$A = _taggedTemplateLiteralLoose(["\n display: block;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n max-width: calc(100% - 52px);\n font-style: normal;\n font-weight: normal;\n font-size: 13px;\n line-height: 16px;\n text-decoration: underline;\n color: ", ";\n"])), function (props) {
47824
+ var LinkUrl = styled.span(_templateObject5$B || (_templateObject5$B = _taggedTemplateLiteralLoose(["\n display: block;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n max-width: calc(100% - 52px);\n font-style: normal;\n font-weight: normal;\n font-size: 13px;\n line-height: 16px;\n text-decoration: underline;\n color: ", ";\n"])), function (props) {
46821
47825
  return props.color;
46822
47826
  });
46823
47827
 
46824
- var _templateObject$10;
47828
+ var _templateObject$11;
46825
47829
  var Links = function Links(_ref) {
46826
47830
  var channelId = _ref.channelId,
46827
47831
  linkPreviewIcon = _ref.linkPreviewIcon,
@@ -46852,20 +47856,20 @@ var Links = function Links(_ref) {
46852
47856
  }));
46853
47857
  }));
46854
47858
  };
46855
- var Container$r = styled.ul(_templateObject$10 || (_templateObject$10 = _taggedTemplateLiteralLoose(["\n margin: 0;\n padding: 11px 0 0;\n overflow-x: hidden;\n overflow-y: auto;\n list-style: none;\n transition: all 0.2s;\n"])));
47859
+ var Container$r = styled.ul(_templateObject$11 || (_templateObject$11 = _taggedTemplateLiteralLoose(["\n margin: 0;\n padding: 11px 0 0;\n overflow-x: hidden;\n overflow-y: auto;\n list-style: none;\n transition: all 0.2s;\n"])));
46856
47860
 
46857
- var _rect$5, _path$1A;
46858
- function _extends$1E() {
46859
- return _extends$1E = Object.assign ? Object.assign.bind() : function (n) {
47861
+ var _rect$5, _path$1B;
47862
+ function _extends$1F() {
47863
+ return _extends$1F = Object.assign ? Object.assign.bind() : function (n) {
46860
47864
  for (var e = 1; e < arguments.length; e++) {
46861
47865
  var t = arguments[e];
46862
47866
  for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
46863
47867
  }
46864
47868
  return n;
46865
- }, _extends$1E.apply(null, arguments);
47869
+ }, _extends$1F.apply(null, arguments);
46866
47870
  }
46867
47871
  function SvgVoicePreview(props) {
46868
- return /*#__PURE__*/createElement$1("svg", _extends$1E({
47872
+ return /*#__PURE__*/createElement$1("svg", _extends$1F({
46869
47873
  width: 40,
46870
47874
  height: 40,
46871
47875
  fill: "none",
@@ -46875,24 +47879,24 @@ function SvgVoicePreview(props) {
46875
47879
  height: 40,
46876
47880
  rx: 20,
46877
47881
  fill: "#5159F6"
46878
- })), _path$1A || (_path$1A = /*#__PURE__*/createElement$1("path", {
47882
+ })), _path$1B || (_path$1B = /*#__PURE__*/createElement$1("path", {
46879
47883
  d: "M27.536 18.696c.952.576.952 2.03 0 2.605l-9.918 5.997c-.944.57-2.118-.151-2.118-1.303V14.002c0-1.151 1.174-1.873 2.118-1.303l9.918 5.997z",
46880
47884
  fill: "#fff"
46881
47885
  })));
46882
47886
  }
46883
47887
 
46884
- var _rect$6, _path$1B;
46885
- function _extends$1F() {
46886
- return _extends$1F = Object.assign ? Object.assign.bind() : function (n) {
47888
+ var _rect$6, _path$1C;
47889
+ function _extends$1G() {
47890
+ return _extends$1G = Object.assign ? Object.assign.bind() : function (n) {
46887
47891
  for (var e = 1; e < arguments.length; e++) {
46888
47892
  var t = arguments[e];
46889
47893
  for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
46890
47894
  }
46891
47895
  return n;
46892
- }, _extends$1F.apply(null, arguments);
47896
+ }, _extends$1G.apply(null, arguments);
46893
47897
  }
46894
47898
  function SvgVoicePreviewPause(props) {
46895
- return /*#__PURE__*/createElement$1("svg", _extends$1F({
47899
+ return /*#__PURE__*/createElement$1("svg", _extends$1G({
46896
47900
  width: 40,
46897
47901
  height: 40,
46898
47902
  fill: "none",
@@ -46902,13 +47906,13 @@ function SvgVoicePreviewPause(props) {
46902
47906
  height: 40,
46903
47907
  rx: 20,
46904
47908
  fill: "#5159F6"
46905
- })), _path$1B || (_path$1B = /*#__PURE__*/createElement$1("path", {
47909
+ })), _path$1C || (_path$1C = /*#__PURE__*/createElement$1("path", {
46906
47910
  d: "M16.962 12.5c.535 0 .729.056.924.16.196.105.35.258.454.454.104.195.16.39.16.924v11.924c0 .535-.056.729-.16.924a1.09 1.09 0 01-.454.454c-.195.104-.39.16-.924.16h-1.424c-.535 0-.729-.056-.924-.16a1.09 1.09 0 01-.454-.454c-.104-.195-.16-.39-.16-.924V14.038c0-.535.056-.729.16-.924a1.09 1.09 0 01.454-.454c.195-.104.39-.16.924-.16h1.424zm7.5 0c.535 0 .729.056.924.16.196.105.35.258.454.454.104.195.16.39.16.924v11.924c0 .535-.056.729-.16.924a1.09 1.09 0 01-.454.454c-.195.104-.39.16-.924.16h-1.424c-.535 0-.729-.056-.924-.16a1.09 1.09 0 01-.454-.454c-.104-.195-.16-.39-.16-.924V14.038c0-.535.056-.729.16-.924a1.09 1.09 0 01.454-.454c.195-.104.39-.16.924-.16h1.424z",
46907
47911
  fill: "#fff"
46908
47912
  })));
46909
47913
  }
46910
47914
 
46911
- var _templateObject$11, _templateObject2$W, _templateObject3$O, _templateObject4$G, _templateObject5$B, _templateObject6$w, _templateObject7$v, _templateObject8$s;
47915
+ var _templateObject$12, _templateObject2$X, _templateObject3$P, _templateObject4$H, _templateObject5$C, _templateObject6$y, _templateObject7$x, _templateObject8$t;
46912
47916
  var VoiceItem = function VoiceItem(_ref) {
46913
47917
  var file = _ref.file,
46914
47918
  voicePreviewPlayIcon = _ref.voicePreviewPlayIcon,
@@ -47033,32 +48037,32 @@ var VoiceItem = function VoiceItem(_ref) {
47033
48037
  type: 'audio/mpeg'
47034
48038
  })));
47035
48039
  };
47036
- var FileIconCont$1 = styled.span(_templateObject$11 || (_templateObject$11 = _taggedTemplateLiteralLoose(["\n cursor: pointer;\n display: inline-flex;\n fill: ", ";\n rect {\n fill: ", ";\n }\n"])), function (props) {
48040
+ var FileIconCont$1 = styled.span(_templateObject$12 || (_templateObject$12 = _taggedTemplateLiteralLoose(["\n cursor: pointer;\n display: inline-flex;\n fill: ", ";\n rect {\n fill: ", ";\n }\n"])), function (props) {
47037
48041
  return props.fill || 'transparent';
47038
48042
  }, function (props) {
47039
48043
  return props.fill || 'transparent';
47040
48044
  });
47041
- var FileHoverIconCont$1 = styled.span(_templateObject2$W || (_templateObject2$W = _taggedTemplateLiteralLoose(["\n cursor: pointer;\n display: none;\n fill: ", ";\n rect {\n fill: ", ";\n }\n"])), function (props) {
48045
+ var FileHoverIconCont$1 = styled.span(_templateObject2$X || (_templateObject2$X = _taggedTemplateLiteralLoose(["\n cursor: pointer;\n display: none;\n fill: ", ";\n rect {\n fill: ", ";\n }\n"])), function (props) {
47042
48046
  return props.fill || 'transparent';
47043
48047
  }, function (props) {
47044
48048
  return props.fill || 'transparent';
47045
48049
  });
47046
- var FileItem$2 = styled.li(_templateObject3$O || (_templateObject3$O = _taggedTemplateLiteralLoose(["\n padding: 9px 16px;\n display: flex;\n align-items: center;\n text-decoration: none;\n\n &:hover {\n background-color: ", ";\n }\n div {\n margin-left: 12px;\n width: 100%;\n }\n img {\n width: 42px;\n height: 42px;\n border: 0.5px solid rgba(0, 0, 0, 0.1);\n box-sizing: border-box;\n border-radius: 6px;\n }\n\n &.isHover {\n & ", " {\n display: none;\n }\n & ", " {\n display: inline-flex;\n }\n }\n"])), function (props) {
48050
+ var FileItem$2 = styled.li(_templateObject3$P || (_templateObject3$P = _taggedTemplateLiteralLoose(["\n padding: 9px 16px;\n display: flex;\n align-items: center;\n text-decoration: none;\n\n &:hover {\n background-color: ", ";\n }\n div {\n margin-left: 12px;\n width: 100%;\n }\n img {\n width: 42px;\n height: 42px;\n border: 0.5px solid rgba(0, 0, 0, 0.1);\n box-sizing: border-box;\n border-radius: 6px;\n }\n\n &.isHover {\n & ", " {\n display: none;\n }\n & ", " {\n display: inline-flex;\n }\n }\n"])), function (props) {
47047
48051
  return props.hoverBackgroundColor;
47048
48052
  }, FileIconCont$1, FileHoverIconCont$1);
47049
- var AudioInfo = styled.div(_templateObject4$G || (_templateObject4$G = _taggedTemplateLiteralLoose(["\n position: relative;\n"])));
47050
- var AudioTitle = styled.span(_templateObject5$B || (_templateObject5$B = _taggedTemplateLiteralLoose(["\n display: block;\n font-style: normal;\n font-weight: 500;\n font-size: 15px;\n line-height: 20px;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n max-width: calc(100% - 72px);\n color: ", ";\n"])), function (props) {
48053
+ var AudioInfo = styled.div(_templateObject4$H || (_templateObject4$H = _taggedTemplateLiteralLoose(["\n position: relative;\n"])));
48054
+ var AudioTitle = styled.span(_templateObject5$C || (_templateObject5$C = _taggedTemplateLiteralLoose(["\n display: block;\n font-style: normal;\n font-weight: 500;\n font-size: 15px;\n line-height: 20px;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n max-width: calc(100% - 72px);\n color: ", ";\n"])), function (props) {
47051
48055
  return props.color;
47052
48056
  });
47053
- var AudioDate = styled.span(_templateObject6$w || (_templateObject6$w = _taggedTemplateLiteralLoose(["\n display: block;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n max-width: calc(100% - 72px);\n font-style: normal;\n font-weight: normal;\n font-size: 13px;\n line-height: 16px;\n color: ", ";\n"])), function (props) {
48057
+ var AudioDate = styled.span(_templateObject6$y || (_templateObject6$y = _taggedTemplateLiteralLoose(["\n display: block;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n max-width: calc(100% - 72px);\n font-style: normal;\n font-weight: normal;\n font-size: 13px;\n line-height: 16px;\n color: ", ";\n"])), function (props) {
47054
48058
  return props.color;
47055
48059
  });
47056
- var AudioSendTime = styled.span(_templateObject7$v || (_templateObject7$v = _taggedTemplateLiteralLoose(["\n position: absolute;\n right: 0;\n top: 11px;\n color: ", ";\n font-size: 12px;\n line-height: 16px;\n"])), function (props) {
48060
+ var AudioSendTime = styled.span(_templateObject7$x || (_templateObject7$x = _taggedTemplateLiteralLoose(["\n position: absolute;\n right: 0;\n top: 11px;\n color: ", ";\n font-size: 12px;\n line-height: 16px;\n"])), function (props) {
47057
48061
  return props.color;
47058
48062
  });
47059
- var Audio = styled.audio(_templateObject8$s || (_templateObject8$s = _taggedTemplateLiteralLoose(["\n display: none;\n"])));
48063
+ var Audio = styled.audio(_templateObject8$t || (_templateObject8$t = _taggedTemplateLiteralLoose(["\n display: none;\n"])));
47060
48064
 
47061
- var _templateObject$12;
48065
+ var _templateObject$13;
47062
48066
  var Voices = function Voices(_ref) {
47063
48067
  var channelId = _ref.channelId,
47064
48068
  voicePreviewPlayIcon = _ref.voicePreviewPlayIcon,
@@ -47095,9 +48099,9 @@ var Voices = function Voices(_ref) {
47095
48099
  }));
47096
48100
  }));
47097
48101
  };
47098
- var Container$s = styled.ul(_templateObject$12 || (_templateObject$12 = _taggedTemplateLiteralLoose(["\n margin: 0;\n padding: 11px 0 0;\n overflow-x: hidden;\n overflow-y: auto;\n list-style: none;\n transition: all 0.2s;\n"])));
48102
+ var Container$s = styled.ul(_templateObject$13 || (_templateObject$13 = _taggedTemplateLiteralLoose(["\n margin: 0;\n padding: 11px 0 0;\n overflow-x: hidden;\n overflow-y: auto;\n list-style: none;\n transition: all 0.2s;\n"])));
47099
48103
 
47100
- var _templateObject$13, _templateObject2$X;
48104
+ var _templateObject$14, _templateObject2$Y;
47101
48105
  var DetailsTab = function DetailsTab(_ref) {
47102
48106
  var channel = _ref.channel,
47103
48107
  theme = _ref.theme,
@@ -47248,8 +48252,8 @@ var DetailsTab = function DetailsTab(_ref) {
47248
48252
  voicePreviewHoverBackgroundColor: voicePreviewHoverBackgroundColor
47249
48253
  })));
47250
48254
  };
47251
- var Container$t = styled.div(_templateObject$13 || (_templateObject$13 = _taggedTemplateLiteralLoose(["\n min-height: calc(100vh - 64px);\n"])));
47252
- var DetailsTabHeader = styled.div(_templateObject2$X || (_templateObject2$X = _taggedTemplateLiteralLoose(["\n overflow-x: auto;\n overflow-y: hidden;\n border-bottom: 1px solid ", ";\n background-color: ", ";\n display: flex;\n justify-content: space-between;\n position: sticky;\n top: 0;\n z-index: 12;\n /* width */\n &::-webkit-scrollbar {\n width: 0;\n height: 0;\n }\n\n /* Track */\n &::-webkit-scrollbar-track {\n background: transparent;\n }\n\n /* Handle */\n &::-webkit-scrollbar-thumb {\n background: transparent;\n }\n\n /* Handle on hover */\n &::-webkit-scrollbar-thumb:hover {\n background: transparent;\n }\n button {\n position: relative;\n border: none;\n background: transparent;\n outline: none;\n height: 44px;\n text-transform: capitalize;\n font-style: normal;\n font-weight: 500;\n font-size: ", ";\n line-height: ", ";\n color: ", ";\n min-width: ", ";\n cursor: pointer;\n }\n\n & span {\n position: relative;\n display: inline-flex;\n align-items: center;\n height: 100%;\n }\n\n & .active span {\n color: ", ";\n\n &:after {\n content: '';\n width: 100%;\n border-radius: 2px;\n height: 2px;\n background-color: ", ";\n position: absolute;\n top: calc(100% - 1px);\n left: 0;\n }\n }\n"])), function (props) {
48255
+ var Container$t = styled.div(_templateObject$14 || (_templateObject$14 = _taggedTemplateLiteralLoose(["\n min-height: calc(100vh - 64px);\n"])));
48256
+ var DetailsTabHeader = styled.div(_templateObject2$Y || (_templateObject2$Y = _taggedTemplateLiteralLoose(["\n overflow-x: auto;\n overflow-y: hidden;\n border-bottom: 1px solid ", ";\n background-color: ", ";\n display: flex;\n justify-content: space-between;\n position: sticky;\n top: 0;\n z-index: 12;\n /* width */\n &::-webkit-scrollbar {\n width: 0;\n height: 0;\n }\n\n /* Track */\n &::-webkit-scrollbar-track {\n background: transparent;\n }\n\n /* Handle */\n &::-webkit-scrollbar-thumb {\n background: transparent;\n }\n\n /* Handle on hover */\n &::-webkit-scrollbar-thumb:hover {\n background: transparent;\n }\n button {\n position: relative;\n border: none;\n background: transparent;\n outline: none;\n height: 44px;\n text-transform: capitalize;\n font-style: normal;\n font-weight: 500;\n font-size: ", ";\n line-height: ", ";\n color: ", ";\n min-width: ", ";\n cursor: pointer;\n }\n\n & span {\n position: relative;\n display: inline-flex;\n align-items: center;\n height: 100%;\n }\n\n & .active span {\n color: ", ";\n\n &:after {\n content: '';\n width: 100%;\n border-radius: 2px;\n height: 2px;\n background-color: ", ";\n position: absolute;\n top: calc(100% - 1px);\n left: 0;\n }\n }\n"])), function (props) {
47253
48257
  return props.borderColor;
47254
48258
  }, function (props) {
47255
48259
  return props.backgroundColor || 'transparent';
@@ -47267,17 +48271,17 @@ var DetailsTabHeader = styled.div(_templateObject2$X || (_templateObject2$X = _t
47267
48271
  return props.activeTabColor;
47268
48272
  });
47269
48273
 
47270
- var _templateObject$14, _templateObject2$Y, _templateObject3$P, _templateObject4$H;
47271
- var Container$u = styled.div(_templateObject$14 || (_templateObject$14 = _taggedTemplateLiteralLoose(["\n ", ";\n height: ", ";\n position: absolute;\n padding: 24px 16px;\n background-color: ", ";\n z-index: 25;\n"])), function (props) {
48274
+ var _templateObject$15, _templateObject2$Z, _templateObject3$Q, _templateObject4$I;
48275
+ var Container$u = styled.div(_templateObject$15 || (_templateObject$15 = _taggedTemplateLiteralLoose(["\n ", ";\n height: ", ";\n position: absolute;\n padding: 24px 16px;\n background-color: ", ";\n z-index: 25;\n"])), function (props) {
47272
48276
  return props.active ? 'display: block' : 'display: none';
47273
48277
  }, function (props) {
47274
48278
  return "calc(100vh - " + (props.heightOffset ? props.heightOffset + 48 : 48) + "px)";
47275
48279
  }, function (props) {
47276
48280
  return props.backgroundColor;
47277
48281
  });
47278
- var AvatarCont = styled.div(_templateObject2$Y || (_templateObject2$Y = _taggedTemplateLiteralLoose(["\n display: flex;\n justify-content: center;\n align-items: center;\n position: relative;\n margin-bottom: 4px;\n\n &::after {\n content: '';\n position: absolute;\n width: 120px;\n height: 120px;\n border-radius: 50%;\n background-color: rgba(0, 0, 0, 0.4);\n }\n .dropdown-body {\n top: inherit;\n right: inherit;\n bottom: -90px;\n }\n"])));
47279
- var DropDownWrapper = styled.div(_templateObject3$P || (_templateObject3$P = _taggedTemplateLiteralLoose(["\n position: absolute;\n z-index: 4;\n width: 40px;\n height: 40px;\n"])));
47280
- var EditChannelFooter = styled(ButtonBlock)(_templateObject4$H || (_templateObject4$H = _taggedTemplateLiteralLoose(["\n margin-top: 24px;\n\n & > button {\n margin-left: 12px;\n }\n"])));
48282
+ var AvatarCont = styled.div(_templateObject2$Z || (_templateObject2$Z = _taggedTemplateLiteralLoose(["\n display: flex;\n justify-content: center;\n align-items: center;\n position: relative;\n margin-bottom: 4px;\n\n &::after {\n content: '';\n position: absolute;\n width: 120px;\n height: 120px;\n border-radius: 50%;\n background-color: rgba(0, 0, 0, 0.4);\n }\n .dropdown-body {\n top: inherit;\n right: inherit;\n bottom: -90px;\n }\n"])));
48283
+ var DropDownWrapper = styled.div(_templateObject3$Q || (_templateObject3$Q = _taggedTemplateLiteralLoose(["\n position: absolute;\n z-index: 4;\n width: 40px;\n height: 40px;\n"])));
48284
+ var EditChannelFooter = styled(ButtonBlock)(_templateObject4$I || (_templateObject4$I = _taggedTemplateLiteralLoose(["\n margin-top: 24px;\n\n & > button {\n margin-left: 12px;\n }\n"])));
47281
48285
  var EditChannel = function EditChannel(_ref) {
47282
48286
  var channel = _ref.channel,
47283
48287
  theme = _ref.theme,
@@ -47532,7 +48536,7 @@ var EditChannel = function EditChannel(_ref) {
47532
48536
  })));
47533
48537
  };
47534
48538
 
47535
- var _templateObject$15, _templateObject2$Z, _templateObject3$Q, _templateObject4$I, _templateObject5$C, _templateObject6$x, _templateObject7$w, _templateObject8$t, _templateObject9$n, _templateObject0$k, _templateObject1$h, _templateObject10$b, _templateObject11$9;
48539
+ var _templateObject$16, _templateObject2$_, _templateObject3$R, _templateObject4$J, _templateObject5$D, _templateObject6$z, _templateObject7$y, _templateObject8$u, _templateObject9$n, _templateObject0$k, _templateObject1$h, _templateObject10$b, _templateObject11$9;
47536
48540
  var Details = function Details(_ref) {
47537
48541
  var _activeChannel$member;
47538
48542
  var detailsTitleText = _ref.detailsTitleText,
@@ -47650,7 +48654,12 @@ var Details = function Details(_ref) {
47650
48654
  backgroundColor = _ref.backgroundColor,
47651
48655
  bordersColor = _ref.bordersColor,
47652
48656
  showPhoneNumber = _ref.showPhoneNumber,
47653
- QRCodeIcon = _ref.QRCodeIcon;
48657
+ QRCodeIcon = _ref.QRCodeIcon,
48658
+ commonGroupsOrder = _ref.commonGroupsOrder,
48659
+ commonGroupsIcon = _ref.commonGroupsIcon,
48660
+ commonGroupsIconColor = _ref.commonGroupsIconColor,
48661
+ commonGroupsTextColor = _ref.commonGroupsTextColor,
48662
+ showGroupsInCommon = _ref.showGroupsInCommon;
47654
48663
  var _useColor = useColors(),
47655
48664
  accentColor = _useColor[THEME_COLORS.ACCENT],
47656
48665
  textPrimary = _useColor[THEME_COLORS.TEXT_PRIMARY],
@@ -47821,7 +48830,7 @@ var Details = function Details(_ref) {
47821
48830
  size: channelAvatarSize || 72,
47822
48831
  textSize: channelAvatarTextSize || 26,
47823
48832
  setDefaultAvatar: isDirectChannel
47824
- }), /*#__PURE__*/React__default.createElement(ChannelInfo$4, {
48833
+ }), /*#__PURE__*/React__default.createElement(ChannelInfo$5, {
47825
48834
  direction: avatarAndNameDirection
47826
48835
  }, /*#__PURE__*/React__default.createElement(ChannelNameWrapper, null, /*#__PURE__*/React__default.createElement(ChannelName$1, {
47827
48836
  isDirect: isDirectChannel,
@@ -47916,7 +48925,12 @@ var Details = function Details(_ref) {
47916
48925
  toggleable: false,
47917
48926
  timeOptionsToMuteNotifications: timeOptionsToMuteNotifications,
47918
48927
  actionItemsFontSize: actionItemsFontSize,
47919
- borderColor: bordersColor
48928
+ borderColor: bordersColor,
48929
+ commonGroupsOrder: commonGroupsOrder,
48930
+ commonGroupsIcon: commonGroupsIcon,
48931
+ commonGroupsIconColor: commonGroupsIconColor,
48932
+ commonGroupsTextColor: commonGroupsTextColor,
48933
+ showGroupsInCommon: showGroupsInCommon
47920
48934
  })), !(activeChannel && activeChannel.isMockChannel) && (/*#__PURE__*/React__default.createElement(DetailsTab, {
47921
48935
  theme: theme,
47922
48936
  channel: activeChannel,
@@ -47963,17 +48977,17 @@ var Details = function Details(_ref) {
47963
48977
  QRCodeIcon: QRCodeIcon
47964
48978
  }))));
47965
48979
  };
47966
- var Container$v = styled.div(_templateObject$15 || (_templateObject$15 = _taggedTemplateLiteralLoose(["\n flex: 0 0 auto;\n width: 0;\n border-left: 1px solid ", ";\n //transition: all 0.1s;\n ", "\n background-color: ", ";\n}\n"])), function (props) {
48980
+ var Container$v = styled.div(_templateObject$16 || (_templateObject$16 = _taggedTemplateLiteralLoose(["\n flex: 0 0 auto;\n width: 0;\n border-left: 1px solid ", ";\n //transition: all 0.1s;\n ", "\n background-color: ", ";\n}\n"])), function (props) {
47967
48981
  return props.borderColor;
47968
48982
  }, function (props) {
47969
48983
  return props.mounted && " width: " + (props.size === 'small' ? '300px' : props.size === 'medium' ? '350px' : '400px') + ";";
47970
48984
  }, function (props) {
47971
48985
  return props.backgroundColor;
47972
48986
  });
47973
- var ChannelDetailsHeader = styled.div(_templateObject2$Z || (_templateObject2$Z = _taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n padding: 16px;\n position: relative;\n height: 64px;\n box-sizing: border-box;\n border-bottom: 1px solid ", ";\n\n & svg {\n cursor: pointer;\n }\n"])), function (props) {
48987
+ var ChannelDetailsHeader = styled.div(_templateObject2$_ || (_templateObject2$_ = _taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n padding: 16px;\n position: relative;\n height: 64px;\n box-sizing: border-box;\n border-bottom: 1px solid ", ";\n\n & svg {\n cursor: pointer;\n }\n"])), function (props) {
47974
48988
  return props.borderColor;
47975
48989
  });
47976
- var ChatDetails = styled.div(_templateObject3$Q || (_templateObject3$Q = _taggedTemplateLiteralLoose(["\n //position: relative;\n width: ", ";\n //height: ", ";\n height: ", ";\n overflow-y: auto;\n\n &::-webkit-scrollbar {\n width: 8px;\n background: transparent;\n }\n &::-webkit-scrollbar-thumb {\n background: transparent;\n }\n\n &.show-scrollbar::-webkit-scrollbar-thumb {\n background: ", ";\n border-radius: 4px;\n }\n &.show-scrollbar::-webkit-scrollbar-track {\n background: transparent;\n }\n"])), function (props) {
48990
+ var ChatDetails = styled.div(_templateObject3$R || (_templateObject3$R = _taggedTemplateLiteralLoose(["\n //position: relative;\n width: ", ";\n //height: ", ";\n height: ", ";\n overflow-y: auto;\n\n &::-webkit-scrollbar {\n width: 8px;\n background: transparent;\n }\n &::-webkit-scrollbar-thumb {\n background: transparent;\n }\n\n &.show-scrollbar::-webkit-scrollbar-thumb {\n background: ", ";\n border-radius: 4px;\n }\n &.show-scrollbar::-webkit-scrollbar-track {\n background: transparent;\n }\n"])), function (props) {
47977
48991
  return props.size === 'small' ? '300px' : props.size === 'medium' ? '350px' : '400px';
47978
48992
  }, function (props) {
47979
48993
  return props.height ? "calc(100vh - " + props.heightOffset + "px)" : '100vh';
@@ -47982,21 +48996,21 @@ var ChatDetails = styled.div(_templateObject3$Q || (_templateObject3$Q = _tagged
47982
48996
  }, function (props) {
47983
48997
  return props.thumbColor;
47984
48998
  });
47985
- var AboutChannel = styled.div(_templateObject4$I || (_templateObject4$I = _taggedTemplateLiteralLoose(["\n margin-top: 20px;\n"])));
47986
- var AboutChannelTitle = styled.h4(_templateObject5$C || (_templateObject5$C = _taggedTemplateLiteralLoose(["\n font-size: 12px;\n margin: 0;\n line-height: 16px;\n color: ", ";\n"])), function (props) {
48999
+ var AboutChannel = styled.div(_templateObject4$J || (_templateObject4$J = _taggedTemplateLiteralLoose(["\n margin-top: 20px;\n"])));
49000
+ var AboutChannelTitle = styled.h4(_templateObject5$D || (_templateObject5$D = _taggedTemplateLiteralLoose(["\n font-size: 12px;\n margin: 0;\n line-height: 16px;\n color: ", ";\n"])), function (props) {
47987
49001
  return props.color;
47988
49002
  });
47989
- var AboutChannelText = styled.h3(_templateObject6$x || (_templateObject6$x = _taggedTemplateLiteralLoose(["\n font-size: 15px;\n margin: 0;\n font-weight: 400;\n line-height: 20px;\n color: ", ";\n"])), function (props) {
49003
+ var AboutChannelText = styled.h3(_templateObject6$z || (_templateObject6$z = _taggedTemplateLiteralLoose(["\n font-size: 15px;\n margin: 0;\n font-weight: 400;\n line-height: 20px;\n color: ", ";\n"])), function (props) {
47990
49004
  return props.color;
47991
49005
  });
47992
- var ChannelInfo$4 = styled.div(_templateObject7$w || (_templateObject7$w = _taggedTemplateLiteralLoose(["\n position: relative;\n margin-left: ", ";\n margin-top: ", ";\n text-align: ", ";\n"])), function (props) {
49006
+ var ChannelInfo$5 = styled.div(_templateObject7$y || (_templateObject7$y = _taggedTemplateLiteralLoose(["\n position: relative;\n margin-left: ", ";\n margin-top: ", ";\n text-align: ", ";\n"])), function (props) {
47993
49007
  return (!props.direction || props.direction !== 'column') && '16px';
47994
49008
  }, function (props) {
47995
49009
  return props.direction && props.direction === 'column' && '16px';
47996
49010
  }, function (props) {
47997
49011
  return props.direction && props.direction === 'column' && 'center';
47998
49012
  });
47999
- var DetailsHeader = styled.div(_templateObject8$t || (_templateObject8$t = _taggedTemplateLiteralLoose(["\n border-bottom: 6px solid ", ";\n align-items: center;\n box-sizing: border-box;\n padding: 20px 16px;\n"])), function (props) {
49013
+ var DetailsHeader = styled.div(_templateObject8$u || (_templateObject8$u = _taggedTemplateLiteralLoose(["\n border-bottom: 6px solid ", ";\n align-items: center;\n box-sizing: border-box;\n padding: 20px 16px;\n"])), function (props) {
48000
49014
  return props.borderColor;
48001
49015
  });
48002
49016
  var ChannelAvatarAndName = styled.div(_templateObject9$n || (_templateObject9$n = _taggedTemplateLiteralLoose(["\n position: relative;\n display: flex;\n align-items: center;\n box-sizing: border-box;\n flex-direction: ", ";\n"])), function (props) {
@@ -48013,7 +49027,7 @@ var ChannelNameWrapper = styled.div(_templateObject1$h || (_templateObject1$h =
48013
49027
  var EditButton = styled.span(_templateObject10$b || (_templateObject10$b = _taggedTemplateLiteralLoose(["\n margin-left: 6px;\n cursor: pointer;\n color: #b2b6be;\n"])));
48014
49028
  var PhoneNumberContainer = styled.span(_templateObject11$9 || (_templateObject11$9 = _taggedTemplateLiteralLoose(["\n position: relative;\n display: inline-flex;\n align-items: center;\n cursor: pointer;\n user-select: text;\n"])));
48015
49029
 
48016
- var _templateObject$16;
49030
+ var _templateObject$17;
48017
49031
  var ChannelDetailsContainer = function ChannelDetailsContainer(_ref) {
48018
49032
  var _ref$size = _ref.size,
48019
49033
  size = _ref$size === void 0 ? 'large' : _ref$size,
@@ -48126,7 +49140,12 @@ var ChannelDetailsContainer = function ChannelDetailsContainer(_ref) {
48126
49140
  tabItemsMinWidth = _ref.tabItemsMinWidth,
48127
49141
  bordersColor = _ref.bordersColor,
48128
49142
  showPhoneNumber = _ref.showPhoneNumber,
48129
- QRCodeIcon = _ref.QRCodeIcon;
49143
+ QRCodeIcon = _ref.QRCodeIcon,
49144
+ commonGroupsOrder = _ref.commonGroupsOrder,
49145
+ commonGroupsIcon = _ref.commonGroupsIcon,
49146
+ commonGroupsIconColor = _ref.commonGroupsIconColor,
49147
+ commonGroupsTextColor = _ref.commonGroupsTextColor,
49148
+ showGroupsInCommon = _ref.showGroupsInCommon;
48130
49149
  var channelDetailsIsOpen = useSelector(channelInfoIsOpenSelector, shallowEqual);
48131
49150
  useEffect(function () {
48132
49151
  setShowChannelDetails(true);
@@ -48241,34 +49260,39 @@ var ChannelDetailsContainer = function ChannelDetailsContainer(_ref) {
48241
49260
  tabItemsLineHeight: tabItemsLineHeight,
48242
49261
  tabItemsMinWidth: tabItemsMinWidth,
48243
49262
  showPhoneNumber: showPhoneNumber,
48244
- QRCodeIcon: QRCodeIcon
49263
+ QRCodeIcon: QRCodeIcon,
49264
+ commonGroupsOrder: commonGroupsOrder,
49265
+ commonGroupsIcon: commonGroupsIcon,
49266
+ commonGroupsIconColor: commonGroupsIconColor,
49267
+ commonGroupsTextColor: commonGroupsTextColor,
49268
+ showGroupsInCommon: showGroupsInCommon
48245
49269
  })));
48246
49270
  };
48247
- var DetailsWrapper = styled.div(_templateObject$16 || (_templateObject$16 = _taggedTemplateLiteralLoose(["\n user-select: text;\n"])));
49271
+ var DetailsWrapper = styled.div(_templateObject$17 || (_templateObject$17 = _taggedTemplateLiteralLoose(["\n user-select: text;\n"])));
48248
49272
 
48249
- var _path$1C;
48250
- function _extends$1G() {
48251
- return _extends$1G = Object.assign ? Object.assign.bind() : function (n) {
49273
+ var _path$1D;
49274
+ function _extends$1H() {
49275
+ return _extends$1H = Object.assign ? Object.assign.bind() : function (n) {
48252
49276
  for (var e = 1; e < arguments.length; e++) {
48253
49277
  var t = arguments[e];
48254
49278
  for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
48255
49279
  }
48256
49280
  return n;
48257
- }, _extends$1G.apply(null, arguments);
49281
+ }, _extends$1H.apply(null, arguments);
48258
49282
  }
48259
49283
  function SvgChevronDown(props) {
48260
- return /*#__PURE__*/createElement$1("svg", _extends$1G({
49284
+ return /*#__PURE__*/createElement$1("svg", _extends$1H({
48261
49285
  width: 32,
48262
49286
  height: 32,
48263
49287
  fill: "none",
48264
49288
  xmlns: "http://www.w3.org/2000/svg"
48265
- }, props), _path$1C || (_path$1C = /*#__PURE__*/createElement$1("path", {
49289
+ }, props), _path$1D || (_path$1D = /*#__PURE__*/createElement$1("path", {
48266
49290
  d: "M9.298 12.937a1.056 1.056 0 10-1.374 1.603l7.39 6.333c.395.339.978.339 1.373 0l7.389-6.333a1.056 1.056 0 10-1.374-1.603L16 18.68l-6.702-5.744z",
48267
49291
  fill: "CurrentColor"
48268
49292
  })));
48269
49293
  }
48270
49294
 
48271
- var _templateObject$17, _templateObject2$_;
49295
+ var _templateObject$18, _templateObject2$$;
48272
49296
  var MessagesScrollToBottomButton = function MessagesScrollToBottomButton(_ref) {
48273
49297
  var buttonIcon = _ref.buttonIcon,
48274
49298
  buttonWidth = _ref.buttonWidth,
@@ -48351,7 +49375,7 @@ var MessagesScrollToBottomButton = function MessagesScrollToBottomButton(_ref) {
48351
49375
  isMuted: channel.muted
48352
49376
  }, channel.newMessageCount ? channel.newMessageCount > 99 ? '99+' : channel.newMessageCount : '')), buttonIcon || /*#__PURE__*/React__default.createElement(SvgChevronDown, null)));
48353
49377
  };
48354
- var BottomButton = styled.div(_templateObject$17 || (_templateObject$17 = _taggedTemplateLiteralLoose(["\n transition: all 0.3s ease-in-out;\n position: absolute;\n ", ";\n\n ", ";\n\n ", ";\n right: ", "px;\n\n margin-right: 16px;\n display: flex;\n align-items: center;\n justify-content: center;\n background-color: ", ";\n border: 0.5px solid rgba(0, 0, 0, 0.1);\n border-radius: 50px;\n width: 48px;\n height: 48px;\n cursor: pointer;\n z-index: 14;\n & > svg {\n color: rgba(129, 140, 153, 1);\n }\n\n & > span {\n bottom: 32px;\n right: 0;\n }\n"])), function (props) {
49378
+ var BottomButton = styled.div(_templateObject$18 || (_templateObject$18 = _taggedTemplateLiteralLoose(["\n transition: all 0.3s ease-in-out;\n position: absolute;\n ", ";\n\n ", ";\n\n ", ";\n right: ", "px;\n\n margin-right: 16px;\n display: flex;\n align-items: center;\n justify-content: center;\n background-color: ", ";\n border: 0.5px solid rgba(0, 0, 0, 0.1);\n border-radius: 50px;\n width: 48px;\n height: 48px;\n cursor: pointer;\n z-index: 14;\n & > svg {\n color: rgba(129, 140, 153, 1);\n }\n\n & > span {\n bottom: 32px;\n right: 0;\n }\n"])), function (props) {
48355
49379
  return props.animateFrom === 'bottom' && "bottom: " + (props.bottomOffset + (props.bottomPosition === undefined ? 45 : props.bottomPosition) - 130) + "px";
48356
49380
  }, function (props) {
48357
49381
  return props.animateFrom === 'right' && "right: " + (props.rightPosition === undefined ? 16 : props.rightPosition - 100) + "px";
@@ -48362,7 +49386,7 @@ var BottomButton = styled.div(_templateObject$17 || (_templateObject$17 = _tagge
48362
49386
  }, function (props) {
48363
49387
  return props.backgroundColor;
48364
49388
  });
48365
- var UnreadCount$1 = styled.span(_templateObject2$_ || (_templateObject2$_ = _taggedTemplateLiteralLoose(["\n position: absolute;\n bottom: 11px;\n right: 16px;\n flex: 0 0 auto;\n margin-left: auto;\n background-color: ", ";\n padding: 0 4px;\n font-size: ", ";\n line-height: 20px;\n min-width: ", ";\n height: ", ";\n text-align: center;\n font-weight: 500;\n color: ", ";\n border-radius: 10px;\n box-sizing: border-box;\n"])), function (props) {
49389
+ var UnreadCount$1 = styled.span(_templateObject2$$ || (_templateObject2$$ = _taggedTemplateLiteralLoose(["\n position: absolute;\n bottom: 11px;\n right: 16px;\n flex: 0 0 auto;\n margin-left: auto;\n background-color: ", ";\n padding: 0 4px;\n font-size: ", ";\n line-height: 20px;\n min-width: ", ";\n height: ", ";\n text-align: center;\n font-weight: 500;\n color: ", ";\n border-radius: 10px;\n box-sizing: border-box;\n"])), function (props) {
48366
49390
  return props.backgroundColor;
48367
49391
  }, function (props) {
48368
49392
  return props.fontSize || '13px';
@@ -48374,23 +49398,23 @@ var UnreadCount$1 = styled.span(_templateObject2$_ || (_templateObject2$_ = _tag
48374
49398
  return props.textColor || '#fff';
48375
49399
  });
48376
49400
 
48377
- var _path$1D, _path2$d;
48378
- function _extends$1H() {
48379
- return _extends$1H = Object.assign ? Object.assign.bind() : function (n) {
49401
+ var _path$1E, _path2$d;
49402
+ function _extends$1I() {
49403
+ return _extends$1I = Object.assign ? Object.assign.bind() : function (n) {
48380
49404
  for (var e = 1; e < arguments.length; e++) {
48381
49405
  var t = arguments[e];
48382
49406
  for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
48383
49407
  }
48384
49408
  return n;
48385
- }, _extends$1H.apply(null, arguments);
49409
+ }, _extends$1I.apply(null, arguments);
48386
49410
  }
48387
49411
  function SvgMention(props) {
48388
- return /*#__PURE__*/createElement$1("svg", _extends$1H({
49412
+ return /*#__PURE__*/createElement$1("svg", _extends$1I({
48389
49413
  width: 24,
48390
49414
  height: 24,
48391
49415
  fill: "none",
48392
49416
  xmlns: "http://www.w3.org/2000/svg"
48393
- }, props), _path$1D || (_path$1D = /*#__PURE__*/createElement$1("path", {
49417
+ }, props), _path$1E || (_path$1E = /*#__PURE__*/createElement$1("path", {
48394
49418
  d: "M12 15.6a3.6 3.6 0 100-7.2 3.6 3.6 0 000 7.2z",
48395
49419
  stroke: "currentColor",
48396
49420
  strokeWidth: 1.8,
@@ -48405,7 +49429,7 @@ function SvgMention(props) {
48405
49429
  })));
48406
49430
  }
48407
49431
 
48408
- var _templateObject$18, _templateObject2$$;
49432
+ var _templateObject$19, _templateObject2$10;
48409
49433
  var MessagesScrollToUnreadMentionsButton = function MessagesScrollToUnreadMentionsButton(_ref) {
48410
49434
  var buttonIcon = _ref.buttonIcon,
48411
49435
  buttonWidth = _ref.buttonWidth,
@@ -48548,7 +49572,7 @@ var MessagesScrollToUnreadMentionsButton = function MessagesScrollToUnreadMentio
48548
49572
  isMuted: channel.muted
48549
49573
  }, channel.newMentionCount ? channel.newMentionCount > 99 ? '99+' : channel.newMentionCount : '')), buttonIcon || /*#__PURE__*/React__default.createElement(SvgMention, null)));
48550
49574
  };
48551
- var BottomButton$1 = styled.div(_templateObject$18 || (_templateObject$18 = _taggedTemplateLiteralLoose(["\n transition: all 0.3s ease-in-out;\n position: absolute;\n ", ";\n\n ", ";\n\n ", ";\n right: ", ";\n margin-right: 16px;\n display: flex;\n align-items: center;\n justify-content: center;\n background-color: ", ";\n border: 0.5px solid rgba(0, 0, 0, 0.1);\n border-radius: 50px;\n width: 48px;\n height: 48px;\n cursor: pointer;\n z-index: 14;\n\n & > svg {\n color: rgba(129, 140, 153, 1);\n }\n\n & > span {\n bottom: 32px;\n right: 0;\n }\n"])), function (props) {
49575
+ var BottomButton$1 = styled.div(_templateObject$19 || (_templateObject$19 = _taggedTemplateLiteralLoose(["\n transition: all 0.3s ease-in-out;\n position: absolute;\n ", ";\n\n ", ";\n\n ", ";\n right: ", ";\n margin-right: 16px;\n display: flex;\n align-items: center;\n justify-content: center;\n background-color: ", ";\n border: 0.5px solid rgba(0, 0, 0, 0.1);\n border-radius: 50px;\n width: 48px;\n height: 48px;\n cursor: pointer;\n z-index: 14;\n\n & > svg {\n color: rgba(129, 140, 153, 1);\n }\n\n & > span {\n bottom: 32px;\n right: 0;\n }\n"])), function (props) {
48552
49576
  return props.animateFrom === 'bottom' && "bottom: " + (props.bottomOffset + (props.bottomPosition === undefined ? 45 : props.bottomPosition) + (props.showsUnreadMentionsButton ? 60 : 0) - 180) + "px";
48553
49577
  }, function (props) {
48554
49578
  return props.animateFrom === 'right' && "right: " + (props.rightPosition === undefined ? 16 : props.rightPosition - 100) + "px";
@@ -48559,7 +49583,7 @@ var BottomButton$1 = styled.div(_templateObject$18 || (_templateObject$18 = _tag
48559
49583
  }, function (props) {
48560
49584
  return props.backgroundColor;
48561
49585
  });
48562
- var UnreadCount$2 = styled.span(_templateObject2$$ || (_templateObject2$$ = _taggedTemplateLiteralLoose(["\n position: absolute;\n bottom: 11px;\n right: 16px;\n flex: 0 0 auto;\n margin-left: auto;\n background-color: ", ";\n padding: 0 4px;\n font-size: ", ";\n line-height: 20px;\n min-width: ", ";\n height: ", ";\n text-align: center;\n font-weight: 500;\n color: ", ";\n border-radius: 10px;\n box-sizing: border-box;\n"])), function (props) {
49586
+ var UnreadCount$2 = styled.span(_templateObject2$10 || (_templateObject2$10 = _taggedTemplateLiteralLoose(["\n position: absolute;\n bottom: 11px;\n right: 16px;\n flex: 0 0 auto;\n margin-left: auto;\n background-color: ", ";\n padding: 0 4px;\n font-size: ", ";\n line-height: 20px;\n min-width: ", ";\n height: ", ";\n text-align: center;\n font-weight: 500;\n color: ", ";\n border-radius: 10px;\n box-sizing: border-box;\n"])), function (props) {
48563
49587
  return props.backgroundColor;
48564
49588
  }, function (props) {
48565
49589
  return props.fontSize || '13px';
@@ -48602,5 +49626,5 @@ var handleGetMessage = function handleGetMessage(channelId, messageId) {
48602
49626
  return store.dispatch(getMessageAC(channelId, messageId));
48603
49627
  };
48604
49628
 
48605
- export { Attachment$1 as Attachment, Avatar, Channel, ChannelDetailsContainer as ChannelDetails, ChannelList, ChannelSearch, Chat, ChatHeader, CreateChannel, DropDown, EmojisPopup, FrequentlyEmojis, MESSAGE_TYPE, MessagesContainer as MessageList, MessageStatusIcon, MessageTextFormat, MessagesScrollToBottomButton, MessagesScrollToUnreadMentionsButton, OGMetadata, PollMessage, SceytChatContainer as SceytChat, SendMessageInput as SendMessage, THEME_COLORS, createOrGetDirectChannel, handleGetMessage, handleSendMessage, switchChannelActiveChannel };
49629
+ export { Attachment$1 as Attachment, Avatar, Channel, ChannelDetailsContainer as ChannelDetails, ChannelList, ChannelSearch, Chat, ChatHeader, CreateChannel, DropDown, EmojisPopup, FrequentlyEmojis, MESSAGE_TYPE, MessagesContainer as MessageList, MessageStatusIcon, MessageTextFormat, MessagesScrollToBottomButton, MessagesScrollToUnreadMentionsButton, OGMetadata, PollMessage, SceytChatContainer as SceytChat, SendMessageInput as SendMessage, THEME_COLORS, createOrGetDirectChannel, handleGetMessage, handleSendMessage, switchChannelActiveChannel, trimReactMessage };
48606
49630
  //# sourceMappingURL=index.modern.js.map