@rongcloud/imlib-next 5.30.0 → 5.32.0-c-rtc-alpha.2

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.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import{ConversationType as e,EventEmitter as t,RCConnectionStatus as n,VersionManage as i,assert as r,AssertRules as o,isArray as a,isHttpUrl as u,LogDBProxy as s,APIContext as c,logger as _,fail as d,ErrorCode as f,ok as l,LogTagId as E,ValidatorManage as R,MessageType as A,getMessageTypeDescription as S,MAX_UPLOAD_FILE_SIZE as T,UPLOAD_FILE_CHUNK_SIZE as I,UploadMethod as v,httpRequest as h,fixUrlProtocol as O,UUId as N,FileType as g,MAX_MESSAGE_CONTENT_BYTES as m,isValidFileType as P,validate as p,isObject as U,MentionedType as C,isValidTargetId as M,isLimitedArray as L,MessageDirection as D,ReceivedStatus as G,SentStatus as y,isNumber as b,isString as w,usingCppEngine as F,NotificationStatus as x,trans2NotificationLevel as B,trans2NotificationStatus as V,isUndefined as H,transformReceivedStatusFlag as Y,MAX_U32_INTEGER as J,isValidEnum as k,UserProfileVisibility as K,SubscribeType as j,isInteger as W,isValidGroupId as Q,isLimitedString as X,GroupJoinPermission as z,GroupOperationPermission as q,GroupInviteHandlePermission as Z,GroupMemberInfoEditPermission as $,GroupMemberRole as ee,GroupApplicationDirection as te,GroupApplicationStatus as ne,DirectionType as ie,QueryFriendsDirectionType as re,FriendApplicationType as oe,FriendApplicationStatus as ae,FriendAddPermission as ue}from"@rongcloud/engine";export{AreaCode,ChatroomEntryType,ChatroomSyncStatusReason,ChatroomUserChangeType,ChrmMemBanType,ChrmMemOperateType,ChrmSyncStatus,ConnectionStatus,ConversationType,DirectionType,ErrorCode,FileType,FriendAddPermission,FriendApplicationStatus,FriendApplicationType,FriendRelationType,GroupApplicationDirection,GroupApplicationStatus,GroupApplicationType,GroupInviteHandlePermission,GroupJoinPermission,GroupMemberInfoEditPermission,GroupMemberRole,GroupOperation,GroupOperationPermission,GroupOperationType,GroupReadReceiptVersion,InterruptionLevel,LogL,LogLevel,MentionedType,MessageAuditType,MessageBlockSourceType,MessageBlockType,MessageDirection,MessageType,NotificationLevel,NotificationStatus,OnlineStatus,OperateStatus,Platform,Platform as PlatformInfo,PushImportanceHonor,PushNotificationQuietHoursLevel,QueryFriendsDirectionType,RCConnectionStatus,ReceivedStatus,ReferenceMessageStatus,SentStatus,SpeechToTextStatus,StreamMessageResponseEventType,SubscribeOperationType,SubscribeType,TranslateMessageParam,TranslateMode,TranslateStatus,TranslateStrategy,TranslateTextParam,UltraGroupChannelChangeType,UltraGroupChannelType,UploadMethod,UserProfileVisibility,UserSettingsChangedKey,UserType,createLogDBProxy,fail,ok}from"@rongcloud/engine";
1
+ import{ConversationType as n,EventEmitter as t,RCConnectionStatus as e,VersionManage as r,assert as i,AssertRules as o,isArray as u,isHttpUrl as s,LogDBProxy as a,APIContext as c,logger as f,fail as d,ErrorCode as l,ok as h,LogTagId as v,MessageType as p,getMessageTypeDescription as g,MAX_UPLOAD_FILE_SIZE as m,UPLOAD_FILE_CHUNK_SIZE as E,UploadMethod as _,httpRequest as S,fixUrlProtocol as T,UUId as I,FileType as C,promiseWithResolvers as A,MAX_MESSAGE_CONTENT_BYTES as b,Validator as R,SentStatus as N,MessageDirection as M,ReceivedStatus as U,validate as O,NotificationStatus as y,trans2NotificationLevel as P,trans2NotificationStatus as x,transformReceivedStatusFlag as D,MAX_U32_INTEGER as L,usingCppEngine as G}from"@rongcloud/engine";export{AreaCode,ChatroomEntryType,ChatroomSyncStatusReason,ChatroomUserChangeType,ChrmMemBanType,ChrmMemOperateType,ChrmSyncStatus,ConnectionStatus,ConversationType,DirectionType,ErrorCode,FileType,FriendAddPermission,FriendApplicationStatus,FriendApplicationType,FriendRelationType,GroupApplicationDirection,GroupApplicationStatus,GroupApplicationType,GroupInviteHandlePermission,GroupJoinPermission,GroupMemberInfoEditPermission,GroupMemberRole,GroupOperation,GroupOperationPermission,GroupReadReceiptVersion,InterruptionLevel,LogL,LogLevel,MentionedType,MessageAuditType,MessageBlockSourceType,MessageBlockType,MessageDirection,MessageType,NotificationLevel,NotificationStatus,OnlineStatus,OperateStatus,Platform,Platform as PlatformInfo,PushImportanceHonor,PushNotificationQuietHoursLevel,QueryFriendsDirectionType,RCConnectionStatus,ReceivedStatus,ReferenceMessageStatus,SentStatus,SpeechToTextStatus,StreamMessageResponseEventType,SubscribeOperationType,SubscribeType,TranslateMessageParam,TranslateMode,TranslateStatus,TranslateStrategy,TranslateTextParam,UltraGroupChannelChangeType,UltraGroupChannelType,UploadMethod,UserProfileVisibility,UserSettingsChangedKey,UserType,createLogDBProxy,fail,ok}from"@rongcloud/engine";
2
2
  /*! *****************************************************************************
3
3
  Copyright (c) Microsoft Corporation.
4
4
 
@@ -12,4 +12,4 @@ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
12
12
  LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
13
13
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
14
14
  PERFORMANCE OF THIS SOFTWARE.
15
- ***************************************************************************** */var se=function(e,t){return se=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},se(e,t)};function ce(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}se(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var _e=function(){return _e=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},_e.apply(this,arguments)};function de(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{s(i.next(e))}catch(e){o(e)}}function u(e){try{s(i.throw(e))}catch(e){o(e)}}function s(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,u)}s((i=i.apply(e,t||[])).next())}))}function fe(e,t){var n,i,r,o,a={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return o={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function u(o){return function(u){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,i&&(r=2&o[0]?i.return:o[0]?i.throw||((r=i.return)&&r.call(i),0):i.next)&&!(r=r.call(i,o[1])).done)return r;switch(i=0,r&&(o=[2&o[0],r.value]),o[0]){case 0:case 1:r=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,i=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(r=a.trys,(r=r.length>0&&r[r.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!r||o[1]>r[0]&&o[1]<r[3])){a.label=o[1];break}if(6===o[0]&&a.label<r[1]){a.label=r[1],r=o;break}if(r&&a.label<r[2]){a.label=r[2],a.ops.push(o);break}r[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(e){o=[6,e],i=0}finally{n=r=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}}function le(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var i,r,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(i=o.next()).done;)a.push(i.value)}catch(e){r={error:e}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return a}function Ee(e,t,n){if(n||2===arguments.length)for(var i,r=0,o=t.length;r<o;r++)!i&&r in t||(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))}function Re(e){return _e(_e({},e),{channelId:e.channelId||""})}function Ae(t){var n=t.conversationType,i=t.targetId,r=t.latestMessage,o=t.unreadMessageCount,a=t.hasMentioned,u=t.mentionedInfo,s=t.lastUnreadTime,c=t.notificationStatus,_=t.notificationLevel,d=t.isTop,f=t.channelId,l=t.unreadMentionedCount,E=t.matchCount,R=t.operationTime,A=t.draft,S=t.translateStrategy,T=t.editedMessageDraft,I={conversationType:n,targetId:i,latestMessage:r&&Re(r),unreadMessageCount:o,hasMentioned:a,mentionedInfo:a?{type:null==u?void 0:u.type,userIdList:null==u?void 0:u.userIdList}:void 0,lastUnreadTime:s,notificationStatus:c,notificationLevel:_,isTop:d,channelId:f,unreadMentionedCount:l,matchCount:E,operationTime:R,draft:A||"",translateStrategy:S,editedMessageDraft:T};return I.conversationType===e.ULTRA_GROUP&&(I.firstUnreadMessage=t.firstUnreadMessage,I.channelType=t.channelType,I.unreadMentionedMeCount=t.unreadMentionedMeCount),I}function Se(e,t){null===console||void 0===console||console.warn("Method '".concat(e,"' is deprecated, please use '").concat(t,"' instead"))}var Te,Ie={groupName:"name",portraitUri:"portraitUrl",introduction:"introduction",notice:"announcement",joinPermission:"joinPerm",removeMemberPermission:"removePerm",invitePermission:"memInvitePerm",inviteHandlePermission:"invitePerm",groupInfoEditPermission:"profilePerm",memberInfoEditPermission:"memProfilePerm"};!function(e){e.CONNECTING="CONNECTING",e.CONNECTED="CONNECTED",e.DISCONNECT="DISCONNECT",e.SUSPEND="SUSPEND",e.MESSAGES="MESSAGES",e.READ_RECEIPT_RECEIVED="READ_RECEIPT_RECEIVED",e.MESSAGE_RECEIPT_REQUEST="MESSAGE_RECEIPT_REQUEST",e.MESSAGE_RECEIPT_RESPONSE="MESSAGE_RECEIPT_RESPONSE",e.MESSAGE_READ_RECEIPT_V4="MESSAGE_READ_RECEIPT_V4",e.SYNC_READ_STATUS="SYNC_READ_STATUS",e.CONVERSATION="CONVERSATION",e.CHATROOM="CHATROOM",e.EXPANSION="EXPANSION",e.PULL_OFFLINE_MESSAGE_FINISHED="PULL_OFFLINE_MESSAGE_FINISHED",e.TAG="TAG",e.USER_SETTINGS_SYNCED="USER_SETTINGS_SYNCED",e.USER_SETTINGS_CHANGED="USER_SETTINGS_CHANGED",e.CONVERSATIONS_SETTINGS_SYNCED="CONVERSATIONS_SETTINGS_SYNCED",e.CONVERSATION_TAG="CONVERSATION_TAG",e.TYPING_STATUS="TYPING_STATUS",e.MESSAGE_BLOCKED="MESSAGE_BLOCKED",e.ULTRA_GROUP_ENABLE="ULTRA_GROUP_ENABLE",e.CONVERSATIONS_SYNCED="CONVERSATIONS_SYNCED",e.OPERATE_STATUS="OPERATE_STATUS",e.ULTRA_GROUP_MESSAGE_EXPANSION_UPDATED="ULTRA_GROUP_MESSAGE_EXPANSION_UPDATED",e.ULTRA_GROUP_MESSAGE_MODIFIED="MESSAGE_MODIFIED",e.ULTRA_GROUP_MESSAGE_RECALLED="ULTRA_GROUP_MESSAGE_RECALLED",e.ULTRA_GROUP_CHANNEL_TYPE_CHANGE="ULTRA_GROUP_CHANNEL_TYPE_CHANGE",e.ULTRA_GROUP_CHANNEL_DELETE="ULTRA_GROUP_CHANNEL_DELETE",e.ULTRA_GROUP_CHANNEL_USER_KICKED="ULTRA_GROUP_CHANNEL_USER_KICKED",e.USER_GROUP_STATUS="USER_GROUP_STATUS",e.SUBSCRIBED_USER_STATUS_CHANGE="SUBSCRIBED_USER_STATUS_CHANGE",e.SUBSCRIBED_RELATION_CHANGE="SUBSCRIBED_RELATION_CHANGE",e.SYNC_SUBSCRIBED_USER_STATUS_FINISHED="SYNC_SUBSCRIBED_USER_STATUS_FINISHED",e.OWN_USER_PROFILE_CHANGED="OWN_USER_PROFILE_CHANGED",e.GROUP_OPERATION="GROUP_OPERATION",e.GROUP_INFO_CHANGED="GROUP_INFO_CHANGED",e.GROUP_MEMBER_INFO_CHANGED="GROUP_MEMBER_INFO_CHANGED",e.GROUP_APPLICATION_EVENT="GROUP_APPLICATION_EVENT",e.GROUP_REMARK_CHANGED_SYNC="GROUP_REMARK_CHANGED_SYNC",e.GROUP_FOLLOWS_CHANGED_SYNC="GROUP_FOLLOWS_CHANGED_SYNC",e.FRIEND_ADDED="FRIEND_ADDED",e.FRIEND_DELETE="FRIEND_DELETE",e.FRIEND_APPLICATION_STATUS_CHANGED="FRIEND_APPLICATION_STATUS_CHANGED",e.FRIEND_CLEARED="FRIEND_CLEARED",e.FRIEND_INFO_CHANGED_SYNC="FRIEND_INFO_CHANGED_SYNC",e.DATABASE_OPENED="DATABASE_OPENED",e.DATABASE_UPGRADE_WILL_START="DATABASE_UPGRADE_WILL_START",e.DATABASE_UPGRADING="DATABASE_UPGRADING",e.DATABASE_UPGRADE_DID_COMPLETE="DATABASE_UPGRADE_DID_COMPLETE",e.STREAM_MESSAGE_RESPONSE="STREAM_MESSAGE_RESPONSE",e.MESSAGE_RECEIPT_RESPONSE_V5="MESSAGE_RECEIPT_RESPONSE_V5",e.SPEECH_TO_TEXT_RESPONSE="SPEECH_TO_TEXT_RESPONSE",e.TRANSLATE_RESPONSE="TRANSLATE_RESPONSE",e.MESSAGE_MODIFIED="MESSAGE_MODIFIED",e.MESSAGE_MODIFIED_SYNC_COMPLETED="MESSAGE_MODIFIED_SYNC_COMPLETED"}(Te||(Te={}));var ve,he={A_ADD_TO_BLACKLIST_T:"A-add_to_blacklist-T",A_ADD_TO_BLACKLIST_R:"A-add_to_blacklist-R",A_REMOVE_FROM_BLACKLIST_T:"A-remove_from_blacklist-T",A_REMOVE_FROM_BLACKLIST_R:"A-remove_from_blacklist-R",A_GET_BLACKLIST_T:"A-get_blacklist-T",A_GET_BLACKLIST_R:"A-get_blacklist-R",A_GET_BLACKLIST_STATUS_T:"A-get_blacklist_status-T",A_GET_BLACKLIST_STATUS_R:"A-get_blacklist_status-R",A_GET_ALL_UNREAD_MENTIONED_COUNT_T:"A-get_all_unread_mentioned_count-T",A_GET_ALL_UNREAD_MENTIONED_COUNT_R:"A-get_all_unread_mentioned_count-R",A_E_SET_MESSAGE_STATUS_TO_READ_T:"A-e_set_message_status_to_read-T",A_E_SET_MESSAGE_STATUS_TO_READ_R:"A-e_set_message_status_to_read-R",A_E_SET_MESSAGE_RECEIVED_STATUS_T:"A-e_set_message_received_status-T",A_E_SET_MESSAGE_RECEIVED_STATUS_R:"A-e_set_message_received_status-R",A_E_SET_MESSAGE_SENT_STATUS_T:"A-e_set_message_sent_status-T",A_E_SET_MESSAGE_SENT_STATUS_R:"A-e_set_message_sent_status-R",A_E_SET_MESSAGE_SENT_STATUS_INFO_T:"A-e_set_message_sent_status_info-T",A_E_SET_MESSAGE_SENT_STATUS_INFO_R:"A-e_set_message_sent_status_info-R",A_E_SET_CHECK_DUPLICATE_MESSAGE_T:"A-e_set_check_duplicate_message-T",A_E_SET_CHECK_DUPLICATE_MESSAGE_R:"A-e_set_check_duplicate_message-R",A_BATCH_SET_CON_NOTIFI_LEVEL_T:"A-batch_set_con_notifi_level-T",A_BATCH_SET_CON_NOTIFI_LEVEL_R:"A-batch_set_con_notifi_level-R",A_BATCH_SET_CON_TO_TOP_T:"A-batch_set_con_to_top-T",A_BATCH_SET_CON_TO_TOP_R:"A-batch_set_con_to_top-R",A_RECALL_MESSAGE_T:"A-recall_message-T",A_RECALL_MESSAGE_R:"A-recall_message-R",A_GET_MESSAGE_READER_T:"A-get_message_reader-T",A_GET_MESSAGE_READER_R:"A-get_message_reader-R",A_GET_UNREAD_MENTIONED_MESSAGES_T:"A-get_unread_mentioned_messages-T",A_GET_UNREAD_MENTIONED_MESSAGES_R:"A-get_unread_mentioned_messages-R",A_SEARCH_CONVERSATION_BY_CONTENT_T:"A-search_conversation_by_content-T",A_SEARCH_CONVERSATION_BY_CONTENT_R:"A-search_conversation_by_content-R",A_CLEAR_UNREAD_COUNT_BY_TIMESTAMP_T:"A-clear_unread_count_by_timestamp-T",A_CLEAR_UNREAD_COUNT_BY_TIMESTAMP_R:"A-clear_unread_count_by_timestamp-R",A_SET_PROXY_T:"A-set_proxy-T",A_SET_PROXY_R:"A-set_proxy-R",A_GET_PROXY_T:"A-get_proxy-T",A_GET_PROXY_R:"A-get_proxy-R",A_TEST_PROXY_T:"A-test_proxy-T",A_TEST_PROXY_R:"A-test_proxy-R",A_SUBSCRIBE_USER_STATUS_T:"A-subscribe_user_status-T",A_SUBSCRIBE_USER_STATUS_R:"A-subscribe_user_status-R",A_UNSUBSCRIBE_USER_STATUS_T:"A-unsubscribe_user_status-T",A_UNSUBSCRIBE_USER_STATUS_R:"A-unsubscribe_user_status-R",A_GET_SUBSCRIBE_USER_STATUS_LIST_T:"A-get_subscribe_user_status_list-T",A_GET_SUBSCRIBE_USER_STATUS_LIST_R:"A-get_subscribe_user_status_list-R",A_UPDATE_MY_USER_PROFILE_T:"A-update_my_user_profile-T",A_UPDATE_MY_USER_PROFILE_R:"A-update_my_user_profile-R",A_GET_MY_USER_PROFILE_T:"A-get_my_user_profile-T",A_GET_MY_USER_PROFILE_R:"A-get_my_user_profile-R",A_UPDATE_MY_USER_PROFILE_VISIBILITY_T:"A-update_my_user_profile_visibility-T",A_UPDATE_MY_USER_PROFILE_VISIBILITY_R:"A-update_my_user_profile_visibility-R",A_GET_MY_USER_PROFILE_VISIBILITY_T:"A-get_my_user_profile_visibility-T",A_GET_MY_USER_PROFILE_VISIBILITY_R:"A-get_my_user_profile_visibility-R",A_SEARCH_USER_PROFILE_BY_UNIQUE_ID_T:"A-search_user_profile_by_unique_id-T",A_SEARCH_USER_PROFILE_BY_UNIQUE_ID_R:"A-search_user_profile_by_unique_id-R",A_CREATE_GROUP_T:"A-create_group-T",A_CREATE_GROUP_R:"A-create_group-R",A_UPDATE_GROUP_INFO_T:"A-update_group_info-T",A_UPDATE_GROUP_INFO_R:"A-update_group_info-R",A_GET_GROUPS_INFO_T:"A-get_groups_info-T",A_GET_GROUPS_INFO_R:"A-get_groups_info-R",A_KICK_GROUP_MEMBERS_T:"A-kick_group_members-T",A_KICK_GROUP_MEMBERS_R:"A-kick_group_members-R",A_QUIT_GROUP_T:"A-quit_group-T",A_QUIT_GROUP_R:"A-quit_group-R",A_DISMISS_GROUP_T:"A-dismiss_group-T",A_DISMISS_GROUP_R:"A-dismiss_group-R",A_TRANSFER_GROUP_OWNER_T:"A-transfer_group_owner-T",A_TRANSFER_GROUP_OWNER_R:"A-transfer_group_owner-R",A_ADD_GROUP_MANAGERS_T:"A-add_group_managers-T",A_ADD_GROUP_MANAGERS_R:"A-add_group_managers-R",A_REMOVE_GROUP_MANAGERS_T:"A-remove_group_managers-T",A_REMOVE_GROUP_MANAGERS_R:"A-remove_group_managers-R",A_GET_GROUP_MEMBERS_BY_ROLES_T:"A-get_group_members_by_roles-T",A_GET_GROUP_MEMBERS_BY_ROLES_R:"A-get_group_members_by_roles-R",A_GET_GROUP_MEMBERS_T:"A-get_group_members-T",A_GET_GROUP_MEMBERS_R:"A-get_group_members-R",A_SET_GROUP_MEMBER_INFO_T:"A-set_group_member_info-T",A_SET_GROUP_MEMBER_INFO_R:"A-set_group_member_info-R",A_SEARCH_GROUP_MEMBERS_T:"A-search_group_members-T",A_SEARCH_GROUP_MEMBERS_R:"A-search_group_members-R",A_JOIN_GROUP_T:"A-join_group-T",A_JOIN_GROUP_R:"A-join_group-R",A_INVITE_USERS_TO_GROUP_T:"A-invite_users_to_group-T",A_INVITE_USERS_TO_GROUP_R:"A-invite_users_to_group-R",A_ACCEPT_GROUP_INVITE_T:"A-accept_group_invite-T",A_ACCEPT_GROUP_INVITE_R:"A-accept_group_invite-R",A_REFUSE_GROUP_INVITE_T:"A-refuse_group_invite-T",A_REFUSE_GROUP_INVITE_R:"A-refuse_group_invite-R",A_ACCEPT_GROUP_APPLICATION_T:"A-accept_group_application-T",A_ACCEPT_GROUP_APPLICATION_R:"A-accept_group_application-R",A_REFUSE_GROUP_APPLICATION_T:"A-refuse_group_application-T",A_REFUSE_GROUP_APPLICATION_R:"A-refuse_group_application-R",A_GET_GROUP_APPLICATIONS_T:"A-get_group_applications-T",A_GET_GROUP_APPLICATIONS_R:"A-get_group_applications-R",A_GET_JOINED_GROUPS_BY_ROLES_T:"A-get_joined_groups_by_roles-T",A_GET_JOINED_GROUPS_BY_ROLES_R:"A-get_joined_groups_by_roles-R",A_SEARCH_JOINED_GROUPS_T:"A-search_joined_groups-T",A_SEARCH_JOINED_GROUPS_R:"A-search_joined_groups-R",A_GET_JOINED_GROUPS_T:"A-get_joined_groups-T",A_GET_JOINED_GROUPS_R:"A-get_joined_groups-R",A_SET_GROUP_REMARK_T:"A-set_group_remark-T",A_SET_GROUP_REMARK_R:"A-set_group_remark-R",A_GET_GROUP_REMARK_T:"A-get_group_remark-T",A_GET_GROUP_REMARK_R:"A-get_group_remark-R",A_ADD_GROUP_FOLLOWS_T:"A-add_group_follows-T",A_ADD_GROUP_FOLLOWS_R:"A-add_group_follows-R",A_REMOVE_GROUP_FOLLOWS_T:"A-remove_group_follows-T",A_REMOVE_GROUP_FOLLOWS_R:"A-remove_group_follows-R",A_GET_GROUP_FOLLOWS_T:"A-get_group_follows-T",A_GET_GROUP_FOLLOWS_R:"A-get_group_follows-R",A_ADD_FRIEND_T:"A-add_friend-T",A_ADD_FRIEND_R:"A-add_friend-R",A_DELETE_FRIENDS_T:"A-delete_friends-T",A_DELETE_FRIENDS_R:"A-delete_friends-R",A_ACCEPT_FRIEND_APPLICATION_T:"A-accept_friend_application-T",A_ACCEPT_FRIEND_APPLICATION_R:"A-accept_friend_application-R",A_REFUSE_FRIEND_APPLICATION_T:"A-refuse_friend_application-T",A_REFUSE_FRIEND_APPLICATION_R:"A-refuse_friend_application-R",A_SET_FRIEND_INFO_T:"A-set_friend_info-T",A_SET_FRIEND_INFO_R:"A-set_friend_info-R",A_CHECK_FRIENDS_T:"A-check_friends-T",A_CHECK_FRIENDS_R:"A-check_friends-R",A_GET_FRIENDS_T:"A-get_friends-T",A_GET_FRIENDS_R:"A-get_friends-R",A_GET_FRIEND_APPLICATIONS_T:"A-get_friend_applications-T",A_GET_FRIEND_APPLICATIONS_R:"A-get_friend_applications-R",A_DELETE_FRIEND_APPLICATION_T:"A-delete_friend_application-T",A_DELETE_FRIEND_APPLICATION_R:"A-delete_friend_application-R",A_GET_FRIENDS_INFO_T:"A-get_friends_info-T",A_GET_FRIENDS_INFO_R:"A-get_friends_info-R",A_SEARCH_FRIENDS_INFO_T:"A-search_friends_info-T",A_SEARCH_FRIENDS_INFO_R:"A-search_friends_info-R",A_SET_ADD_FRIEND_PERMISSION_T:"A-set_add_friend_permission-T",A_SET_ADD_FRIEND_PERMISSION_R:"A-set_add_friend_permission-R",A_GET_ADD_FRIEND_PERMISSION_T:"A-get_add_friend_permission-T",A_GET_ADD_FRIEND_PERMISSION_R:"A-get_add_friend_permission-R"};!function(e){e[e.DISALLOW=0]="DISALLOW",e[e.ALLOW=1]="ALLOW"}(ve||(ve={}));var Oe=new t,Ne={connection:function(e,t){switch(e){case n.CONNECTED:Oe.emit(Te.CONNECTED);break;case n.CONNECTING:Oe.emit(Te.CONNECTING);break;case n.SUSPENDED:Oe.emit(Te.SUSPEND,t);break;case n.DISCONNECTED:Oe.emit(Te.DISCONNECT,t)}},batchMessage:function(e){Oe.emit(Te.MESSAGES,{messages:e.map((function(e){return Re(e)}))})},typingState:function(e){Oe.emit(Te.TYPING_STATUS,{status:e})},readReceiptReceived:function(e,t,n,i){Oe.emit(Te.READ_RECEIPT_RECEIVED,{conversation:e,messageUId:t,sentTime:n,sendUserId:i})},messageReceiptRequest:function(e,t,n){Oe.emit(Te.MESSAGE_RECEIPT_REQUEST,{conversation:e,messageUId:t,senderUserId:n})},messageReceiptResponse:function(e,t,n){Oe.emit(Te.MESSAGE_RECEIPT_RESPONSE,{conversation:e,receivedUserId:t,messageUIdList:n})},conversationState:function(t){var n=t.map((function(t){var n=t.conversation,i=t.updatedItems,r=n.conversationType,o=Ae(n);return r===e.ULTRA_GROUP&&(o.versionTime=n.versionTime,o.unreadMessageCount=ge(n.unreadMessageCount||0),o.unreadMentionedCount=ge(n.unreadMentionedCount||0),o.unreadMentionedMeCount=ge(n.unreadMentionedMeCount||0)),{conversation:o,updatedItems:i}}));Oe.emit(Te.CONVERSATION,{conversationList:n})},chatroomState:function(e){Oe.emit(Te.CHATROOM,e)},expansion:function(e){Oe.emit(Te.EXPANSION,e)},pullFinished:function(){Oe.emit(Te.PULL_OFFLINE_MESSAGE_FINISHED)},tag:function(){Oe.emit(Te.TAG)},userSettingsSynced:function(e){Oe.emit(Te.USER_SETTINGS_SYNCED,e)},userSettingsChanged:function(e){Oe.emit(Te.USER_SETTINGS_CHANGED,e)},conversationStatusSynced:function(e){Oe.emit(Te.CONVERSATIONS_SETTINGS_SYNCED,e)},conversationTagChanged:function(){Oe.emit(Te.CONVERSATION_TAG)},messageBlocked:function(e){Oe.emit(Te.MESSAGE_BLOCKED,e)},ultraGroupEnable:function(){Oe.emit(Te.ULTRA_GROUP_ENABLE)},sgRelationsSynced:function(e){Oe.emit(Te.CONVERSATIONS_SYNCED,e)},operateStatus:function(e){Oe.emit(Te.OPERATE_STATUS,e)},ultraGroupMessageExpansionUpdated:function(e){Oe.emit(Te.ULTRA_GROUP_MESSAGE_EXPANSION_UPDATED,e.map((function(e){return Re(e)})))},ultraGroupMessageRecalled:function(e){Oe.emit(Te.ULTRA_GROUP_MESSAGE_RECALLED,e.map((function(e){return Re(e)})))},ultraGroupChannelChangeType:function(e){Oe.emit(Te.ULTRA_GROUP_CHANNEL_TYPE_CHANGE,e)},ultraGroupChannelUserKicked:function(e){Oe.emit(Te.ULTRA_GROUP_CHANNEL_USER_KICKED,e)},ultraGroupChannelDelete:function(e){Oe.emit(Te.ULTRA_GROUP_CHANNEL_DELETE,e)},userGroupStatus:function(e){Oe.emit(Te.USER_GROUP_STATUS,e)},messageReadReceipt:function(e){Oe.emit(Te.MESSAGE_READ_RECEIPT_V4,e)},syncReadStatus:function(e){Oe.emit(Te.SYNC_READ_STATUS,e)},subscribedUserStatusChange:function(e){Oe.emit(Te.SUBSCRIBED_USER_STATUS_CHANGE,e)},subscribedRelationChange:function(e){Oe.emit(Te.SUBSCRIBED_RELATION_CHANGE,e)},syncSubscribedUserStatusFinished:function(e){Oe.emit(Te.SYNC_SUBSCRIBED_USER_STATUS_FINISHED,e)},ownUserProfileChanged:function(e){Oe.emit(Te.OWN_USER_PROFILE_CHANGED,e)},groupOperation:function(e){Oe.emit(Te.GROUP_OPERATION,e)},groupInfoChanged:function(e){Oe.emit(Te.GROUP_INFO_CHANGED,e)},groupMemberInfoChanged:function(e){Oe.emit(Te.GROUP_MEMBER_INFO_CHANGED,e)},groupApplicationEvent:function(e){Oe.emit(Te.GROUP_APPLICATION_EVENT,e)},groupRemarkChangedSync:function(e){Oe.emit(Te.GROUP_REMARK_CHANGED_SYNC,e)},groupFollowsChangedSync:function(e){Oe.emit(Te.GROUP_FOLLOWS_CHANGED_SYNC,e)},friendAdd:function(e){Oe.emit(Te.FRIEND_ADDED,e)},friendDelete:function(e){Oe.emit(Te.FRIEND_DELETE,e)},friendApplicationStatusChanged:function(e){Oe.emit(Te.FRIEND_APPLICATION_STATUS_CHANGED,e)},friendCleared:function(e){Oe.emit(Te.FRIEND_CLEARED,e)},friendInfoChangedSync:function(e){Oe.emit(Te.FRIEND_INFO_CHANGED_SYNC,e)},databaseOpened:function(e,t){Oe.emit(Te.DATABASE_OPENED,e,t)},databaseUpgradeWillStart:function(){Oe.emit(Te.DATABASE_UPGRADE_WILL_START)},databaseUpgrading:function(e){Oe.emit(Te.DATABASE_UPGRADING,e)},databaseUpgradeDidComplete:function(e){Oe.emit(Te.DATABASE_UPGRADE_DID_COMPLETE,e)},readReceiptResponseV5:function(e){Oe.emit(Te.MESSAGE_RECEIPT_RESPONSE_V5,e)},speechToTextResponse:function(e){Oe.emit(Te.SPEECH_TO_TEXT_RESPONSE,e)},translateResponse:function(e){Oe.emit(Te.TRANSLATE_RESPONSE,e)},messagesModified:function(e){Oe.emit(Te.MESSAGE_MODIFIED,e.map((function(e){return Re(e)})))},messageModifiedSyncCompleted:function(){Oe.emit(Te.MESSAGE_MODIFIED_SYNC_COMPLETED)}};function ge(e){return e>999?999:e}i.add("imlib-next","5.30.0");var me=null,Pe=null,pe=null;function Ue(){return de(this,void 0,void 0,(function(){return fe(this,(function(e){switch(e.label){case 0:return me?[4,c.destroy()]:[2];case 1:return e.sent(),Pe=null,me=null,pe=null,[2]}}))}))}function Ce(e){if(!me)throw new Error("Not initialized yet!");return e(me,pe,Pe)}function Me(e){return de(this,void 0,void 0,(function(){return fe(this,(function(t){return me?[2,e(me,pe,Pe)]:[2,d(f.BIZ_ERROR_CLIENT_NOT_INIT)]}))}))}function Le(){return me?l(me):d(f.BIZ_ERROR_CLIENT_NOT_INIT)}function De(e,t){return Ce((function(n){return n.install(e,t)}))}var Ge={TIMEOUT:{code:-1,msg:"Network timeout"},REJECTED_BY_BLACKLIST:{code:405,msg:"Blacklisted by the other party"},SEND_TOO_FAST:{code:20604,msg:"Sending messages too quickly"},NOT_IN_GROUP:{code:22406,msg:"Not in group"},ULTRA_GROUP_USER_NOT_IN_PRIVATE_CHANNEL:{code:f.ULTRA_GROUP_USER_NOT_IN_PRIVATE_CHANNEL,msg:"ultra group user not in private channel"},FORBIDDEN_IN_GROUP:{code:22408,msg:"Forbbiden from speaking in the group"},NOT_IN_CHATROOM:{code:23406,msg:"Not in chatRoom"},FORBIDDEN_IN_CHATROOM:{code:23408,msg:"Forbbiden from speaking in the chatRoom"},KICKED_FROM_CHATROOM:{code:23409,msg:"Kicked out and forbbiden from joining the chatRoom"},CHATROOM_NOT_EXIST:{code:23410,msg:"ChatRoom does not exist"},CHATROOM_IS_FULL:{code:23411,msg:"ChatRoom members exceeded"},PARAMETER_INVALID_CHATROOM:{code:23412,msg:"Invalid chatRoom parameters"},ROAMING_SERVICE_UNAVAILABLE_CHATROOM:{code:23414,msg:"ChatRoom message roaming service is not open, Please go to the developer to open this service"},RECALLMESSAGE_PARAMETER_INVALID:{code:25101,msg:"Invalid recall message parameter"},ROAMING_SERVICE_UNAVAILABLE_MESSAGE:{code:25102,msg:"Single group chat roaming service is not open, Please go to the developer to open this service"},PUSHSETTING_PARAMETER_INVALID:{code:26001,msg:"Invalid push parameter"},OPERATION_BLOCKED:{code:20605,msg:"Operation is blocked"},OPERATION_NOT_SUPPORT:{code:20606,msg:"Operation is not supported"},MSG_BLOCKED_SENSITIVE_WORD:{code:21501,msg:"The sent message contains sensitive words"},REPLACED_SENSITIVE_WORD:{code:21502,msg:"Sensitive words in the message have been replaced"},NOT_CONNECTED:{code:30001,msg:"Please connect successfully first"},NAVI_REQUEST_ERROR:{code:30007,msg:"Navigation http request failed"},CMP_REQUEST_ERROR:{code:30010,msg:"CMP sniff http request failed"},CONN_APPKEY_FAKE:{code:31002,msg:"Your appkey is fake"},CONN_MINI_SERVICE_NOT_OPEN:{code:31003,msg:"Mini program service is not open, Please go to the developer to open this service"},CONN_ACK_TIMEOUT:{code:31e3,msg:"Connection ACK timeout"},CONN_TOKEN_INCORRECT:{code:31004,msg:"Your token is not valid or expired"},CONN_NOT_AUTHRORIZED:{code:31005,msg:"AppKey and Token do not match"},CONN_REDIRECTED:{code:31006,msg:"Connection redirection"},CONN_APP_BLOCKED_OR_DELETED:{code:31008,msg:"AppKey is banned or deleted"},CONN_USER_BLOCKED:{code:31009,msg:"User blocked"},CONN_DOMAIN_INCORRECT:{code:31012,msg:"Connect domain error, Please check the set security domain"},ROAMING_SERVICE_UNAVAILABLE:{code:33007,msg:"Roaming service cloud is not open, Please go to the developer to open this service"},RC_CONNECTION_EXIST:{code:34001,msg:"Connection already exists"},CHATROOM_KV_EXCEED:{code:23423,msg:"ChatRoom KV setting exceeds maximum"},CHATROOM_KV_OVERWRITE_INVALID:{code:23424,msg:"ChatRoom KV already exists"},CHATROOM_KV_STORE_NOT_OPEN:{code:23426,msg:"ChatRoom KV storage service is not open, Please go to the developer to open this service"},CHATROOM_KEY_NOT_EXIST:{code:23427,msg:"ChatRoom key does not exist"},MSG_KV_NOT_SUPPORT:{code:34008,msg:"The message cannot be extended"},SEND_MESSAGE_KV_FAIL:{code:34009,msg:"Sending RC expansion message fail"},EXPANSION_LIMIT_EXCEET:{code:34010,msg:"The message expansion size is beyond the limit"},ILLGAL_PARAMS:{code:33003,msg:"Incorrect parameters passed in while calling the interface"},UPLOAD_FILE_FAILED:{code:35020,msg:"File upload failed"},CHATROOM_KV_STORE_NOT_ALL_SUCCESS:{code:23428,msg:"Chatroom kv store not all success"},CHATROOM_KV_STORE_OUT_LIMIT:{code:23429,msg:"Chatroom kv's length is out of limit"},TAG_EXISTS:{code:33101,msg:"The tag already exists"},TAG_NOT_EXIST:{code:33100,msg:"The tag does not exist"},NOT_SUPPORT:{code:f.NOT_SUPPORT,msg:"The method is not supported in a browser!"}},ye={};for(var be in Ge){var we=Ge[be].code;ye[we]=be}var Fe=0,xe=new Map;function Be(e,t){var n=function(){for(var e=[],i=0;i<arguments.length;i++)e[i]=arguments[i];var r=[],o=[];Ee([],le(xe.values()),!1).forEach((function(e){var t=le(e,3),i=t[0],a=t[1],u=t[2];i===n&&(o.push(a),u&&r.push(u))})),r.forEach((function(t){e=t(e)}));var a=t.apply(void 0,Ee([],le(e),!1));return o.forEach((function(t){t(e,a)})),a};return Object.defineProperty(n,"original",{value:t,writable:!1,enumerable:!1,configurable:!1}),Object.defineProperty(n,"name",{value:e,writable:!1,enumerable:!1,configurable:!1}),Object.defineProperty(n,"monitorable",{value:!0,writable:!1,enumerable:!1,configurable:!1}),n}function Ve(e,t,n){if(!e.monitorable)throw new Error("Not monitorable API: ".concat(e.name));var i=++Fe;return xe.set(i,[e,t,n]),i}function He(e){xe.delete(e)}function Ye(e,t){return de(this,void 0,void 0,(function(){var n=this;return fe(this,(function(i){return[2,new R(E.A_CONNECT_T,E.A_CONNECT_R).validate("token",e,o.STRING,!0).ifReady((function(i,r){return de(n,void 0,void 0,(function(){var n,o,a;return fe(this,(function(u){switch(u.label){case 0:return n=r.createTraceId(),r.info(E.A_CONNECT_T,JSON.stringify({token:e,reconnectKickEnable:t}),n),[4,i.connect(e,!!t,n)];case 1:return o=u.sent(),a=o.code===f.SUCCESS?"info":"warn",r[a](E.A_CONNECT_R,JSON.stringify({code:o.code,userId:o.userId}),n),o.code===f.SUCCESS?[2,{code:o.code,data:{userId:o.userId}}]:[2,{code:o.code,msg:ye[o.code]}]}}))}))}))]}))}))}var Je=Be("disconnect",(function(e,t){return Ce((function(n,i){return i.info(E.A_DISCONNECT_O),n.disconnect(e,t)}))}));function ke(e,t,n){Oe.on(e,t,n)}function Ke(e,t,n){Oe.once(e,t,n)}function je(e,t,n){Oe.off(e,t,n)}function We(e){Oe.removeAll(e)}function Qe(){Oe.clear()}var Xe=function(e,t,n,i){void 0===n&&(n=!0),void 0===i&&(i=!0),Object.defineProperty(this,"messageType",{enumerable:!0,configurable:!0,writable:!0,value:e}),Object.defineProperty(this,"content",{enumerable:!0,configurable:!0,writable:!0,value:t}),Object.defineProperty(this,"isPersited",{enumerable:!0,configurable:!0,writable:!0,value:n}),Object.defineProperty(this,"isCounted",{enumerable:!0,configurable:!0,writable:!0,value:i})},ze=function(e){function t(t,n,i){return e.call(this,t,i,n.isPersited,n.isCounted)||this}return ce(t,e),t}(Xe);var qe,Ze=function(e){function t(t){return e.call(this,A.COMBINE,S(A.COMBINE),t)||this}return ce(t,e),t}(ze),$e=function(e){function t(t){return e.call(this,A.COMBINE_V2,S(A.COMBINE_V2),t)||this}return ce(t,e),t}(ze),et=function(e){function t(t){return e.call(this,"RC:CmdMsg",S("RC:CmdMsg"),t)||this}return ce(t,e),t}(ze),tt=function(e){function t(t){return e.call(this,A.FILE,S(A.FILE),t)||this}return ce(t,e),t}(ze),nt=function(e){function t(t){return e.call(this,A.GIF,S(A.GIF),t)||this}return ce(t,e),t}(ze),it=function(e){function t(t){return e.call(this,"RC:GrpNtf",S("RC:GrpNtf"),t)||this}return ce(t,e),t}(ze),rt=function(e){function t(t){return e.call(this,A.IMAGE,S(A.IMAGE),t)||this}return ce(t,e),t}(ze),ot=function(e){function t(t){return e.call(this,"RC:InfoNtf",S("RC:InfoNtf"),t)||this}return ce(t,e),t}(ze),at=function(e){function t(t){return e.call(this,A.LOCATION,S(A.LOCATION),t)||this}return ce(t,e),t}(ze),ut=function(e){function t(t){return e.call(this,A.REFERENCE,S(A.REFERENCE),t)||this}return ce(t,e),t}(ze),st=function(e){function t(t){return e.call(this,A.RICH_CONTENT,S(A.RICH_CONTENT),t)||this}return ce(t,e),t}(ze),ct=function(e){function t(t){return e.call(this,A.SIGHT,S(A.SIGHT),t)||this}return ce(t,e),t}(ze),_t=function(e){function t(t){return e.call(this,A.TEXT,S(A.TEXT),t)||this}return ce(t,e),t}(ze),dt=function(e){function t(t){return e.call(this,A.HQ_VOICE,S(A.HQ_VOICE),t)||this}return ce(t,e),t}(ze),ft=function(e){function t(t){return e.call(this,A.VOICE,S(A.VOICE),t)||this}return ce(t,e),t}(ze);!function(e){e.ALIYUN="aliyun",e.S3="s3",e.MINIO="minio",e.QINIU="qiniu",e.RCX="rcx"}(qe||(qe={}));var lt=function(){function e(e,t,n){Object.defineProperty(this,"_url",{enumerable:!0,configurable:!0,writable:!0,value:e}),Object.defineProperty(this,"_authInfo",{enumerable:!0,configurable:!0,writable:!0,value:t}),Object.defineProperty(this,"_getFileToken",{enumerable:!0,configurable:!0,writable:!0,value:n}),Object.defineProperty(this,"multipartUpload",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_isAbort",{enumerable:!0,configurable:!0,writable:!0,value:!1})}return Object.defineProperty(e.prototype,"isAbort",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this._isAbort}}),Object.defineProperty(e.prototype,"abort",{enumerable:!1,configurable:!0,writable:!0,value:function(){this._isAbort=!0,this._abortHandler()}}),Object.defineProperty(e.prototype,"upload",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return e.file.size>T?Promise.resolve({code:f.UPLOAD_FAIL,msg:"the file size is over 5GB!"}):e.file.size>I&&this.multipartUpload?this.multipartUpload(e):this.commonUpload(e)}}),e}(),Et=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return Object.defineProperty(t,"_promise",{enumerable:!0,configurable:!0,writable:!0,value:null}),t}return ce(t,e),Object.defineProperty(t.prototype,"commonUpload",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return de(this,void 0,void 0,(function(){var t,n,i,r,o,a;return fe(this,(function(u){switch(u.label){case 0:return t=e.file,n=e.onProgress,i=this._authInfo,r={},(o=new FormData).set("token",i.token),o.set("key",i.fileName),o.set("file",t),this._promise=h({url:O(this._url),headers:r,onProgress:function(e){return null==n?void 0:n(e.loaded,e.total)},method:"POST",body:o,timeout:0}),[4,this._promise.result()];case 1:return a=u.sent().status,this._promise=null,200===a||204===a?[2,{code:f.SUCCESS,data:{uniqueName:i.fileName,uploadMethod:v.QINIU}}]:[2,{code:f.UPLOAD_FAIL,msg:a.toString()}]}}))}))}}),Object.defineProperty(t.prototype,"_abortHandler",{enumerable:!1,configurable:!0,writable:!0,value:function(){var e;null===(e=this._promise)||void 0===e||e.abort()}}),t}(lt),Rt=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return Object.defineProperty(t,"_promise",{enumerable:!0,configurable:!0,writable:!0,value:null}),t}return ce(t,e),Object.defineProperty(t.prototype,"commonUpload",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return de(this,void 0,void 0,(function(){var t,n,i,r,o,a;return fe(this,(function(u){switch(u.label){case 0:return t=e.file,n=e.onProgress,i=this._authInfo,r=O("".concat(i.ossBucketName,".").concat(this._url)),(o=new FormData).set("token",i.token),o.set("OSSAccessKeyId",i.osskeyId),o.set("policy",i.ossPolicy),o.set("Signature",i.ossSign),o.set("success_action_status","200"),o.set("key",i.fileName),o.set("file",t),this._promise=h({url:r,onProgress:function(e){return null==n?void 0:n(e.loaded,e.total)},method:"POST",body:o,timeout:0}),[4,this._promise.result()];case 1:return a=u.sent().status,this._promise=null,200===a||204===a?[2,{code:f.SUCCESS,data:{uniqueName:i.fileName,uploadMethod:v.ALI}}]:[2,{code:f.UPLOAD_FAIL,msg:a.toString()}]}}))}))}}),Object.defineProperty(t.prototype,"_abortHandler",{enumerable:!1,configurable:!0,writable:!0,value:function(){var e;null===(e=this._promise)||void 0===e||e.abort()}}),t}(lt);function At(e){return Math.ceil(e/1024)||0}var St,Tt=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return Object.defineProperty(t,"_promise",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(t,"isSupportMultipart",{enumerable:!0,configurable:!0,writable:!0,value:!0}),Object.defineProperty(t,"multipartUpload",{enumerable:!0,configurable:!0,writable:!0,value:function(e){return de(t,void 0,void 0,(function(){var t,n,i,r,o,a,u,s,c,_,d,l,E,R,A,S,T;return fe(this,(function(I){switch(I.label){case 0:t=e.file,n=e.fileType,I.label=1;case 1:return I.trys.push([1,3,,4]),[4,this._getFileToken(n,t.name,"POST","uploads",void 0,At(t.size))];case 2:return i=I.sent(),[3,4];case 3:return[2,{code:I.sent()}];case 4:return r=O("".concat(this._url,"/").concat(i.minioBucketName,"/").concat(i.fileName)),o=this.getBaseHeaders(t,i,e),this._promise=h({url:"".concat(r,"?uploads"),headers:o,method:"POST"}),[4,this._promise.result()];case 5:return a=I.sent(),u=a.status,s=a.data,this._promise=null,c=null===(T=null==s?void 0:s.match(/(?:<UploadId>)(\S*?)(?:<\/UploadId>)/))||void 0===T?void 0:T[1],200!==u&&204!==u||!c?[2,{code:f.UPLOAD_FAIL,msg:"start upload fail"}]:(_=[],[4,this.requestUploadPart(r,t,c,i.fileName,e,_)]);case 6:if(d=I.sent(),l=d.code,E=d.msg,l!==f.SUCCESS)return[2,{code:l,msg:E}];I.label=7;case 7:return I.trys.push([7,9,,10]),[4,this._getFileToken(n,i.fileName,"POST","uploadId=".concat(c),void 0,At(t.size))];case 8:return i=I.sent(),[3,10];case 9:return[2,{code:I.sent()}];case 10:return R=_.map((function(e,t){return"<Part><PartNumber>".concat(t+1,"</PartNumber><ETag>").concat(e,"</ETag></Part>")})).join(""),R="<CompleteMultipartUpload xmlns='http://s3.amazonaws.com/doc/2006-03-01/'>".concat(R,"</CompleteMultipartUpload>"),A=this.getBaseHeaders(t,i,e),this._promise=h({url:"".concat(r,"?uploadId=").concat(c),headers:A,method:"POST",body:R,timeout:0}),[4,this._promise.result()];case 11:return S=I.sent().status,this._promise=null,200===S||204===S?[2,{code:f.SUCCESS,data:{uniqueName:i.fileName,uploadMethod:v.MINIO}}]:[2,{code:f.UPLOAD_FAIL,msg:"end upload fail"}]}}))}))}}),t}return ce(t,e),Object.defineProperty(t.prototype,"commonUpload",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return de(this,void 0,void 0,(function(){var t,n,i,r,o,a;return fe(this,(function(u){switch(u.label){case 0:return t=e.file,n=e.onProgress,i=this._authInfo,r=O("".concat(this._url,"/").concat(i.minioBucketName,"/").concat(i.fileName)),o=this.getBaseHeaders(t,i,e),this._promise=h({url:r,headers:o,onProgress:function(e){return null==n?void 0:n(e.loaded,e.total)},method:"PUT",body:t,timeout:0}),[4,this._promise.result()];case 1:return a=u.sent().status,this._promise=null,200===a||204===a?[2,{code:f.SUCCESS,data:{uniqueName:i.fileName,uploadMethod:v.MINIO}}]:[2,{code:f.UPLOAD_FAIL,msg:a.toString()}]}}))}))}}),Object.defineProperty(t.prototype,"requestUploadPart",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,n,i,r,o,a,u){return void 0===a&&(a=1),void 0===u&&(u=0),de(this,void 0,void 0,(function(){var s,c,_,d,l,E,R,A,S;return fe(this,(function(T){switch(T.label){case 0:if(u>=5)return[2,{code:f.UPLOAD_FAIL,msg:"Upload retry times exceeded 5. Procedure"}];s=(a-1)*I,c=Math.min(I,t.size-s),_="partNumber=".concat(a,"&uploadId=").concat(n),T.label=1;case 1:return T.trys.push([1,3,,4]),[4,this._getFileToken(r.fileType,i,"PUT",_,void 0,At(t.size))];case 2:return d=T.sent(),[3,4];case 3:return[2,{code:T.sent()}];case 4:return l=t.slice(s,a*I),E=this.getBaseHeaders(t,d,r),this._promise=h({url:"".concat(e,"?").concat(_),headers:E,method:"PUT",body:l,timeout:0,onProgress:function(e){var n;return null===(n=null==r?void 0:r.onProgress)||void 0===n?void 0:n.call(r,s+e.loaded,t.size)}}),[4,this._promise.result()];case 5:return R=T.sent(),A=R.status,S=R.xhr,this._promise=null,200===A||204===A?(o.push((null==S?void 0:S.getResponseHeader("ETag"))||""),s+c<t.size?[2,this.requestUploadPart(e,t,n,i,r,o,a+1,0)]:[2,{code:f.SUCCESS}]):[2,this.requestUploadPart(e,t,n,i,r,o,a,u+1)]}}))}))}}),Object.defineProperty(t.prototype,"getBaseHeaders",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,n){var i=n.contentDisposition||("text/html"===e.type?"inline":"attachment");return{"Content-Disposition":"".concat(i,"; filename=").concat(encodeURIComponent(e.name),";"),Authorization:t.minioAuthorization,"x-amz-content-sha256":t.minioContentSha256,"x-amz-date":t.minioDate,"Content-Type":e.type||"text/plain"}}}),Object.defineProperty(t.prototype,"_abortHandler",{enumerable:!1,configurable:!0,writable:!0,value:function(){var e;null===(e=this._promise)||void 0===e||e.abort()}}),t}(lt),It=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return Object.defineProperty(t,"isSupportMultipart",{enumerable:!0,configurable:!0,writable:!0,value:!0}),Object.defineProperty(t,"_promise",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(t,"multipartUpload",{enumerable:!0,configurable:!0,writable:!0,value:function(e){return de(t,void 0,void 0,(function(){var t,n,i,r;return fe(this,(function(o){return t=e.file,n=e.onProgress,i=N.gen(),r=this._authInfo,[2,this._requestUploadPart(i,t,r.token,n)]}))}))}}),t}return ce(t,e),Object.defineProperty(t.prototype,"commonUpload",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return de(this,void 0,void 0,(function(){var t,n,i,r,o,a,u,s,c,_;return fe(this,(function(d){switch(d.label){case 0:return t=e.file,n=e.onProgress,i=this._authInfo,r={},(o=new FormData).set("token",i.token),o.set("key",i.fileName),o.set("file",t),a=O(this._url),this._promise=h({url:a,headers:r,onProgress:function(e){return null==n?void 0:n(e.loaded,e.total)},method:"POST",body:o,timeout:0}),[4,this._promise.result()];case 1:return u=d.sent(),s=u.status,c=u.data,this._promise=null,200!==s&&204!==s||!c?[2,{code:f.UPLOAD_FAIL,msg:s.toString()}]:(_=JSON.parse(c),[2,{code:f.SUCCESS,data:{uniqueName:_.rc_url.file_name,downloadUrl:"".concat(a,"/").concat(_.rc_url.path),uploadMethod:v.QINIU}}])}}))}))}}),Object.defineProperty(t.prototype,"_requestUploadPart",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,n,i,r){return void 0===r&&(r=0),de(this,void 0,void 0,(function(){var o,a,u,s,c,_,d,l,E,R;return fe(this,(function(A){switch(A.label){case 0:return o=Math.min(I,t.size-r),a=e+t.name.substring(t.name.lastIndexOf(".")),u={Range:"bytes=".concat(r,"-").concat(r+o),"X-File-TransactionId":a,"X-File-Total-Size":t.size.toString()},s=t.slice(r,r+o),(c=new FormData).set("file",s,t.name),c.set("key",a),c.set("name",a),c.set("token",n),_=O(this._url),this._promise=h({url:_,headers:u,onProgress:function(e){return null==i?void 0:i(r+e.loaded,t.size)},method:"POST",body:c,timeout:0}),[4,this._promise.result()];case 1:return d=A.sent(),l=d.status,E=d.data,this._promise=null,200===l||204===l?r+o<t.size?[2,this._requestUploadPart(e,t,n,i,r+o)]:(R=JSON.parse(E),[2,{code:f.SUCCESS,data:{uniqueName:R.rc_url.file_name,downloadUrl:"".concat(_,"/").concat(R.rc_url.path),uploadMethod:v.QINIU}}]):[2,{code:f.UPLOAD_FAIL,msg:l.toString()}]}}))}))}}),Object.defineProperty(t.prototype,"_abortHandler",{enumerable:!1,configurable:!0,writable:!0,value:function(){var e;null===(e=this._promise)||void 0===e||e.abort()}}),t}(lt),vt=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return Object.defineProperty(t,"_promise",{enumerable:!0,configurable:!0,writable:!0,value:null}),t}return ce(t,e),Object.defineProperty(t.prototype,"commonUpload",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return de(this,void 0,void 0,(function(){var t,n,i,r,o,a,u,s,c;return fe(this,(function(_){switch(_.label){case 0:return t=e.file,n=e.onProgress,i=e.contentDisposition,r=this._authInfo,o={},a=O("".concat(r.s3BucketName,".").concat(this._url)),u=new FormData,i?u.set("Content-Disposition",i):u.set("Content-Disposition","text/html"===t.type?"inline;":"attachment;"),u.set("Content-Type",t.type),u.set("x-amz-credential",r.s3Credential),u.set("x-amz-algorithm",r.s3Algorithm),u.set("x-amz-date",r.s3Date),u.set("policy",r.s3Policy),u.set("x-amz-signature",r.s3Signature),u.set("key",r.fileName),u.set("file",t),this._promise=h({url:a,headers:o,onProgress:function(e){return null==n?void 0:n(e.loaded,e.total)},method:"POST",body:u,timeout:0}),[4,this._promise.result()];case 1:return s=_.sent(),c=s.status,this._promise=null,200===c||204===c?[2,l({uniqueName:r.fileName,uploadMethod:v.AWS})]:[2,d(f.UPLOAD_FAIL,c.toString())]}}))}))}}),Object.defineProperty(t.prototype,"_abortHandler",{enumerable:!1,configurable:!0,writable:!0,value:function(){var e;null===(e=this._promise)||void 0===e||e.abort()}}),t}(lt);var ht=((St={})[qe.QINIU]=Et,St[qe.ALIYUN]=Rt,St[qe.S3]=vt,St[qe.MINIO]=Tt,St[qe.RCX]=It,St);function Ot(e,t,n,i){var r=document.createElement("canvas"),o=r.getContext("2d"),a=new Image;a.onload=function(t){var u=i||{},s=u.maxHeight,c=void 0===s?160:s,_=u.maxWidth,d=void 0===_?160:_,l=u.quality,E=void 0===l?1:l,R=u.scale,A=void 0===R?1:R,S=gt(a.width,a.height,{maxHeight:c,maxWidth:d,scale:A});r.width=Math.min(S.w,d),r.height=Math.min(S.h,c),o.drawImage(a,S.x,S.y,S.w,S.h);var T=Nt(r,E);T=T.replace(/data:image\/[^;]+;base64,/,""),e({code:f.SUCCESS,data:_e(_e({},n),{thumbnail:T,width:Math.ceil(S.w),height:Math.ceil(S.h)})})},a.onerror=function(t){e({code:f.UPLOAD_FAIL,msg:"get image info fail:".concat(JSON.stringify(t))})},a.src=(window.URL||window.webkitURL).createObjectURL(t)}function Nt(e,t){var n=e.toDataURL("image/jpeg",t);return n.length>m-10240?Nt(e,t-.1):n}var gt=function(e,t,n){var i,r,o=n.maxHeight,a=void 0===o?160:o,u=n.maxWidth,s=void 0===u?160:u,c=n.scale,_=e<t,d=0,f=0;return(_?t/e:e/t)>(void 0===c?1:c)?(_?(i=160,(r=t/(e/160))>a&&(f=(r-a)/2)):(r=160,(i=e/(t/160))>s&&(d=(i-s)/2)),{w:i,h:r,x:-d,y:-f}):(_?(r=a,i=e/(t/a)):(i=s,r=t/(e/s)),{w:i,h:r,x:-d,y:-f})},mt=0,Pt=function(){function e(e,t){Object.defineProperty(this,"_promise",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_resolve",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_client",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"id",{enumerable:!0,configurable:!0,writable:!0,value:++mt}),this._promise=this._handleUpload(e,t)}return Object.defineProperty(e.prototype,"abort",{enumerable:!1,configurable:!0,writable:!0,value:function(){var e;this._resolve({code:f.UPLOAD_FAIL,msg:"upload abort"}),null===(e=this._client)||void 0===e||e.abort()}}),Object.defineProperty(e.prototype,"_uploadInLoop",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,n,i,r){return void 0===r&&(r=[]),de(this,void 0,void 0,(function(){var o,a,u,s,c,_,d;return fe(this,(function(l){switch(l.label){case 0:o=0,l.label=1;case 1:return o<e.length?(a=e[o],(u=ht[a.type])?(this._client=new u(a.url,n,i),[4,this._client.upload(t)]):(r.push({type:a.type,url:a.url,code:f.UPLOAD_FAIL,msg:"Upload type not supported"}),[3,3])):[3,4];case 2:if(s=l.sent(),c=s.code,_=s.data,d=s.msg,c===f.SUCCESS)return[2,{code:c,data:_}];if(c===f.RC_FILE_SIZE_EXCEED_LIMIT)return[2,{code:c,msg:"File size exceeds the limit"}];if(c===f.INVALID_PARAMETER_SIZE_NOT_FOUND)return[2,{code:c,msg:"File size not found"}];if(this._client.isAbort())return this._client=null,[2,{code:c,data:_,msg:d}];this._client=null,r.push({type:a.type,url:a.url,code:c,msg:d}),l.label=3;case 3:return o++,[3,1];case 4:return[2,{code:f.UPLOAD_FAIL,msg:"Failed to upload all channels, msg: ".concat(JSON.stringify(r))}]}}))}))}}),Object.defineProperty(e.prototype,"_handleUpload",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){return de(this,void 0,void 0,(function(){var n=this;return fe(this,(function(i){return[2,new Promise((function(i){return de(n,void 0,void 0,(function(){var n,r,o,a,u,s,c,_,d,l,E,R,A,S,T,I,v,h;return fe(this,(function(O){switch(O.label){case 0:return this._resolve=i,n=t.getFileToken,r=t.customDomain,o=t.uploadServer,a=t.ossConfig,u=e.file,s=e.fileType,c=e.thumbnailConfig,[4,n(s,u.name,void 0,void 0,void 0,At(u.size))];case 1:return _=O.sent(),d=function(e,t,n){if(t)return[{type:qe.RCX,url:t,p:"1"}];if(e)return JSON.parse(e).map((function(e){var t={type:qe.QINIU,url:"",p:""};return Object.keys(e).forEach((function(n){"p"===n?t.p=e[n]:(t.type=n,t.url=e[n])})),t})).sort((function(e,t){return e.p-t.p}));var i=[];return n&&i.push({type:qe.QINIU,url:n,p:"1"}),i}(_.ossConfig||a,r,o),0===d.length?(i({code:f.INVALID_PARAMETER_MEDIA_URL,msg:"uploadUrlList is empty"}),[2]):[4,this._uploadInLoop(d,e,_,n)];case 2:return l=O.sent(),E=l.code,R=l.data,A=l.msg,E===f.SUCCESS&&R?(S=R.downloadUrl,T=R.uploadMethod,S?[3,4]:[4,t.getFileUrl(s,R.uniqueName,T,u.name)]):(i({code:E,msg:A}),[2]);case 3:if(!(I=O.sent()).isOk)return i({code:I.code,msg:"Get download url fail"}),[2];S=I.data.downloadUrl,O.label=4;case 4:return S?(v={downloadUrl:S,uniqueName:(null==R?void 0:R.uniqueName)||"",name:u.name,size:u.size,type:u.type},s!==g.AUDIO?[3,6]:[4,u.arrayBuffer()]):(i({code:f.UPLOAD_FAIL,msg:"Get download url fail"}),[2]);case 5:return h=O.sent(),function(e,t,n){new AudioContext({sampleRate:16e3}).decodeAudioData(t,(function(t){var i,r;e({code:f.SUCCESS,data:_e(_e({},n),{duration:t.duration,length:t.length,sampleRate:null!==(i=t.sampleRate)&&void 0!==i?i:void 0,numberOfChannels:null!==(r=t.numberOfChannels)&&void 0!==r?r:void 0})})}),(function(t){e({code:f.UPLOAD_FAIL,msg:"get audio info fail:".concat(JSON.stringify(t))})}))}(i,h,v),[2];case 6:return s===g.IMAGE?(Ot(i,u,v,c),[2]):(i({code:E,data:v}),[2])}}))}))}))]}))}))}}),Object.defineProperty(e.prototype,"awaitResult",{enumerable:!1,configurable:!0,writable:!0,value:function(){return de(this,void 0,void 0,(function(){return fe(this,(function(e){return[2,this._promise]}))}))}}),e}(),pt={};function Ut(e,t){var n=new Pt(e,t);return function(e){de(this,void 0,void 0,(function(){return fe(this,(function(t){switch(t.label){case 0:return pt[e.id]=e,[4,e.awaitResult()];case 1:return t.sent(),delete pt[e.id],[2]}}))}))}(n),n}function Ct(e){var t=pt[e];return!!t&&(t.abort(),!0)}var Mt=function(e,t){var n=e.getNaviInfoFromCache();return{getFileToken:e.getFileToken.bind(e),getFileUrl:e.getFileUrl.bind(e),customDomain:t||"",ossConfig:null==n?void 0:n.ossConfig,uploadServer:null==n?void 0:n.uploadServer}};function Lt(e){return de(this,void 0,void 0,(function(){var t,n,i;return fe(this,(function(r){return t=e.contentDisposition,n=e.fileType,i=e.file,[2,new R("","").validate("contentDisposition",t,(function(e){return"inline"===e||"attachment"===e}),!1).validate("fileType",n,(function(e){return!!g[e]}),!0).validate("file",i,(function(e){return e instanceof File&&(!(n===g.IMAGE&&!e.type.match(/^image\//))&&!(n===g.AUDIO&&!e.type.match(/^audio\//)))}),!0).ifReadySync((function(t,n,i){var r=Ut(e,Mt(t,i.uploadDomain));return{code:f.SUCCESS,data:r}}))]}))}))}function Dt(e){return de(this,void 0,void 0,(function(){return fe(this,(function(t){return[2,{code:f.SUCCESS,data:Ct(e)}]}))}))}function Gt(e){return de(this,void 0,void 0,(function(){var t,n,i;return fe(this,(function(r){return t=e.contentDisposition,n=e.fileType,i=e.file,[2,new R("","").validate("contentDisposition",t,(function(e){return"inline"===e||"attachment"===e}),!1).validate("fileType",n,(function(e){return!!g[e]}),!0).validate("file",i,(function(e){return e instanceof File&&(!(n===g.IMAGE&&!e.type.match(/^image\//))&&!(n===g.AUDIO&&!e.type.match(/^audio\//)))}),!0).ifReady((function(t,n,i){return function(e,t){return de(this,void 0,void 0,(function(){return fe(this,(function(n){return[2,new Pt(e,t).awaitResult()]}))}))}(e,Mt(t,i.uploadDomain))}))]}))}))}function yt(e,t,n,i){return Me((function(r){return new Promise((function(o){r.getFileToken(e,t,n,i).then((function(e){o({code:f.SUCCESS,data:e})})).catch((function(e){o({code:e,msg:ye[e]})}))}))}))}function bt(e){return new R("","").validate("mediaUrl",e,o.STRING,!0).ifReady((function(t){return new Promise((function(n){t.getFileToken(1,void 0,void 0,void 0,e).then((function(e){var t=e.token,i=e.downloadAuthInfo,r=e.deadline;n({code:f.SUCCESS,data:{token:t,downloadAuthInfo:i,deadline:r}})})).catch((function(e){n({code:e,msg:ye[e]})}))}))}))}function wt(e,t,n,i,r){return de(this,void 0,void 0,(function(){return fe(this,(function(a){return(null==i?void 0:i.isBosRes)?[2,l(i)]:[2,new R("","").validate("fileType",e,P,!0).validate("filename",t,o.STRING,!0).validate("saveName",n,o.STRING).validate("serverType",r,o.NUMBER).ifReady((function(i){return i.getFileUrl(e,t,r||v.QINIU,n)}))]}))}))}var Ft=rr,xt=Be("sendMessage",(function(t,n,i){return de(void 0,void 0,void 0,(function(){return fe(this,(function(r){return[2,new R(E.A_SEND_MSG_T,E.A_SEND_MSG_R).validate("message",n,(function(){return n instanceof Xe}),!0).validate("message",n,(function(){if(!U(n.content))return!1;if(!(null==i?void 0:i.isMentioned))return!0;var e=n.content.mentionedInfo||{type:null==i?void 0:i.mentionedType,userIdList:null==i?void 0:i.mentionedUserIdList};if(!U(e))return!1;var t=e.type,r=e.userIdList,o=void 0===r?[]:r,u=e.mentionedContent;return!![C.ALL,C.SINGAL].includes(t)&&(("string"==typeof u||void 0===u)&&(a(o)&&o.every((function(e){return M(e)}))))}),!0).validate("conversation",t,o.OBJECT,!0).validate("conversationType",null==t?void 0:t.conversationType,o.CONVERSATION_TYPE,!0).validate("targetId",null==t?void 0:t.targetId,M,!0).validate("channelId",null==t?void 0:t.channelId,o.CHANNEL_ID).validate("isStatusMessage",null==i?void 0:i.isStatusMessage,o.BOOLEAN).validate("disableNotification",null==i?void 0:i.disableNotification,o.BOOLEAN).validate("pushContent",null==i?void 0:i.pushContent,o.STRING).validate("pushData",null==i?void 0:i.pushData,o.STRING).validate("isMentioned",null==i?void 0:i.isMentioned,o.BOOLEAN).validate("mentionedType",null==i?void 0:i.mentionedType,o.NUMBER).validate("mentionedUserIdList",null==i?void 0:i.mentionedUserIdList,L({itemValidator:M})).validate("directionalUserIdList",null==i?void 0:i.directionalUserIdList,L({maxLength:300,itemValidator:M})).validate("isVoipPush",null==i?void 0:i.isVoipPush,o.BOOLEAN).validate("canIncludeExpansion",null==i?void 0:i.canIncludeExpansion,o.BOOLEAN).validate("expansion",null==i?void 0:i.expansion,o.OBJECT).validate("pushConfig",null==i?void 0:i.pushConfig,o.OBJECT).validate("messageId",null==i?void 0:i.messageId,o.NUMBER).validate("disableUpdateLastMessage",null==i?void 0:i.disableUpdateLastMessage,o.BOOLEAN).ifReady((function(r,o){return de(void 0,void 0,void 0,(function(){var a,u,s,c,_,d,l,R,A,S,T,I,v,h,O,N,g,m,P,p,U,C;return fe(this,(function(M){switch(M.label){case 0:return u=(a=i||{}).disableNotification,s=a.isMentioned,c=a.directionalUserIdList,_=a.canIncludeExpansion,d=a.onSendBefore,l=a.expansion,R=a.pushConfig,A=a.isStatusMessage,S=a.disableUpdateLastMessage,T=o.createTraceId(),I=t.conversationType,v=t.targetId,h=t.channelId,c&&c.length>0&&![3,7,8,10].includes(I)?[2,{code:f.RC_DIRECTIONAL_MESSAGE_INVALID_CONVERSATION_TYPE}]:S&&I===e.ULTRA_GROUP?[2,{code:f.INVALID_DISABLE_UPDATE_LAST_MESSAGE}]:(O=function(e,t,n){var i=e.isStatusMessage,r=e.disableNotification,o=e.pushContent,a=e.pushData,u=e.isMentioned,s=e.mentionedType,c=e.mentionedUserIdList,_=e.directionalUserIdList,d=e.isVoipPush,f=e.canIncludeExpansion,l=e.expansion,E=e.isFilerWhiteBlacklist,R=e.pushConfig,A=e.messageId,S=e.disableUpdateLastMessage,T=e.needReceipt,I=n.channelId;return _e({isStatusMessage:i,disableNotification:r,pushContent:o,pushData:a,isMentioned:u,mentionedType:s,mentionedUserIdList:c,directionalUserIdList:_,isVoipPush:d,canIncludeExpansion:f,expansion:l,isFilerWhiteBlacklist:E,pushConfig:R,channelId:I||"",messageId:A,disableUpdateLastMessage:S,needReceipt:T},t)}(i||{},n,t),N={isMentioned:!!s,content:n.content,messageType:n.messageType,isPersited:!!n.isPersited,isCounted:!!n.isCounted,disableNotification:!!u,canIncludeExpansion:!!_,expansion:l||null,conversationType:t.conversationType,targetId:t.targetId,channelId:t.channelId,senderUserId:r.getCurrentUserId(),messageUId:"",messageDirection:D.SEND,receivedTime:0,isStatusMessage:!!A,receivedStatus:G.UNREAD,isOffLineMessage:!1,pushConfig:R,sentStatus:y.SENDING,sentTime:0,directedUserIds:c||[],disableUpdateLastMessage:S},I!==e.ULTRA_GROUP&&(N.isOffLineMessage=!1),g=function(e){N.messageId=e;try{d&&d(Re(N))}catch(e){o.error(E.A_SEND_MSG_T,'Callback method "onSendBefore" execution error.\n'.concat(null==e?void 0:e.stack),T)}},o.info(E.A_SEND_MSG_T,JSON.stringify({messageType:n.messageType,conversationType:I,targetId:v,channelId:h}),T),[4,r.sendMessage(I,v,O,T,g)]);case 1:return m=M.sent(),P=m.code,p=m.data,U=m.msg,P===f.SUCCESS?(o.info(E.A_SEND_MSG_R,JSON.stringify({code:P,messageUId:p.messageUId,messageId:p.messageId}),T),C=Re(p),[2,{code:P,data:C}]):(o.warn(E.A_SEND_MSG_R,JSON.stringify({code:P}),T),N.sentTime=(null==p?void 0:p.sentTime)||0,N.sentStatus=null==p?void 0:p.sentStatus,[2,{code:P,msg:U||ye[P],data:Re(N)}])}}))}))}))]}))}))}));function Bt(e,t,n){var i=new _t(t);return xt(e,i,n)}function Vt(e,t){return function(n,i,r,a){var u;if(!p("sendOptions.contentDisposition",null==a?void 0:a.contentDisposition,(function(e){return["inline","attachment"].includes(e)})))return Promise.resolve({code:f.INVALID_PARAMETER_SENDOPTIONS});var s={contentDisposition:null==a?void 0:a.contentDisposition};if(a&&"thumbnailConfig"in a){var c=null===(u=a)||void 0===u?void 0:u.thumbnailConfig;if(!(p("sendOptions.maxHeight",null==c?void 0:c.maxHeight,o.NUMBER)&&p("sendOptions.maxWidth",null==c?void 0:c.maxWidth,o.NUMBER)&&p("sendOptions.quality",null==c?void 0:c.quality,o.NUMBER)&&p("sendOptions.scale",null==c?void 0:c.scale,o.NUMBER)))return Promise.resolve({code:f.INVALID_PARAMETER_SENDOPTIONS});s.thumbnailConfig=c}return Me((function(o,u,c){return new Promise((function(o){var c=u.createTraceId();u.info(E.L_MEDIA_UPLOAD_T,JSON.stringify({filesize:i.file.size,type:e}),c),Gt({file:i.file,fileType:e,onProgress:function(e,t){var n;null===(n=null==r?void 0:r.onProgress)||void 0===n||n.call(r,Math.floor(e/t*100))},contentDisposition:s.contentDisposition,thumbnailConfig:s.thumbnailConfig}).then((function(e){var s,_=e.code,d=e.data,l=e.msg;if(_===f.SUCCESS&&d){var R=(null===(s=null==r?void 0:r.onComplete)||void 0===s?void 0:s.call(r,_e({url:d.downloadUrl},d)))||t(d,i);return u.info(E.L_MEDIA_UPLOAD_R,JSON.stringify({downurl:d.downloadUrl,code:f.SUCCESS}),c),void xt(n,R,a).then(o)}o({code:_,msg:l})}))}))}))}}var Ht=Vt(g.FILE,(function(e,t){var n,i,r={name:e.name,size:t.file.size,type:(n=e.name,i=n.match(/\.(\w+)$/),i?i[1]:"bin"),fileUrl:e.downloadUrl};return t.user&&(r.user=t.user),t.extra&&(r.extra=t.extra),t.mentionedInfo&&(r.mentionedInfo=t.mentionedInfo),new tt(r)})),Yt=Vt(g.IMAGE,(function(e,t){var n={content:e.thumbnail,imageUri:e.downloadUrl,thumWidth:e.width,thumHeight:e.height};return t.user&&(n.user=t.user),t.extra&&(n.extra=t.extra),t.mentionedInfo&&(n.mentionedInfo=t.mentionedInfo),t.audit&&(n.audit=t.audit),new rt(n)})),Jt=Vt(g.IMAGE,(function(e,t){var n={gifDataSize:e.size,remoteUrl:e.downloadUrl,width:e.width,height:e.height};return t.user&&(n.user=t.user),t.extra&&(n.extra=t.extra),t.mentionedInfo&&(n.mentionedInfo=t.mentionedInfo),t.audit&&(n.audit=t.audit),new nt(n)})),kt=Vt(g.AUDIO,(function(e,t){var n,i={remoteUrl:e.downloadUrl,duration:Math.floor(null!==(n=e.duration)&&void 0!==n?n:0),sampleRate:e.sampleRate,numberOfChannels:e.numberOfChannels};return t.user&&(i.user=t.user),t.extra&&(i.extra=t.extra),t.mentionedInfo&&(i.mentionedInfo=t.mentionedInfo),t.audit&&(i.audit=t.audit),new dt(i)})),Kt=Vt(g.SIGHT,(function(e,t){var n={sightUrl:e.downloadUrl,content:t.thumbnail,duration:t.duration,size:t.file.size||e.size,name:t.name||e.name};return t.user&&(n.user=t.user),t.extra&&(n.extra=t.extra),t.mentionedInfo&&(n.mentionedInfo=t.mentionedInfo),t.audit&&(n.audit=t.audit),new ct(n)}));function jt(e,t){return de(this,void 0,void 0,(function(){return fe(this,(function(n){switch(n.label){case 0:return[4,Le().next((function(n){return n.getHistoryMessage(e,t)}))];case 1:return[2,n.sent().trans((function(e){var t=e.list;return{hasMore:e.hasMore,list:t.map((function(e){return Re(e)}))}}))]}}))}))}function Wt(e,t){return de(this,void 0,void 0,(function(){return fe(this,(function(n){switch(n.label){case 0:return[4,Le().next((function(n){return n.getRemoteHistoryMessages(e,t)}))];case 1:return[2,n.sent().trans((function(e){var t=e.list;return{hasMore:e.hasMore,list:t.map((function(e){return Re(e)}))}}))]}}))}))}function Qt(t,n,i,r){return de(this,void 0,void 0,(function(){var a=this;return fe(this,(function(u){return[2,new R(E.A_SEND_MSG_T,E.A_SEND_MSG_R).validate("targetId",t,o.STRING,!0).validate("messageUId",n,o.STRING,!0).validate("timestamp",i,(function(e){return b(e)&&e>0}),!0).validate("channelId",r,o.CHANNEL_ID).ifReady((function(o){return de(a,void 0,void 0,(function(){var o,a,u,s,c;return fe(this,(function(_){switch(_.label){case 0:return o={targetId:t,conversationType:e.PRIVATE,channelId:r},a=new Xe("RC:ReadNtf",{messageUId:n,lastMessageSendTime:i,type:1}),[4,xt(o,a)];case 1:return u=_.sent(),s=u.code,c=u.msg,0===s?[2,{code:s}]:[2,{code:s,msg:c}]}}))}))}))]}))}))}function Xt(t,n,i){return de(this,void 0,void 0,(function(){var r=this;return fe(this,(function(a){return[2,new R(E.A_SEND_MSG_T,E.A_SEND_MSG_R).validate("targetId",t,o.STRING,!0).validate("messageUId",n,o.STRING,!0).validate("channelId",i,o.CHANNEL_ID).ifReady((function(o,a){return de(r,void 0,void 0,(function(){var r,o,u,s,c,_;return fe(this,(function(d){switch(d.label){case 0:return r="messageUId:".concat(n,",targetId:").concat(t),a.debug(E.A_SEND_MSG_T,"send read receipt message ->".concat(r)),o=new Xe("RC:RRReqMsg",{messageUId:n}),u={targetId:t,conversationType:e.GROUP,channelId:i},[4,xt(u,o)];case 1:return s=d.sent(),c=s.code,_=s.msg,0===c?[2,{code:c}]:[2,{code:c,msg:_}]}}))}))}))]}))}))}function zt(e,t,n){return de(this,void 0,void 0,(function(){return fe(this,(function(e){throw new Error("This method is deprecated, please use method sendReadReceiptResponseV2.")}))}))}function qt(e,t,n){return de(this,void 0,void 0,(function(){return fe(this,(function(i){return[2,Le().next((function(i){return i.sendReadReceipt(e,t,n)}))]}))}))}function Zt(t,n){return de(this,void 0,void 0,(function(){var i=this;return fe(this,(function(r){return[2,new R(E.A_SYNC_READ_STATUS_T,E.A_SYNC_READ_STATUS_R).validate("timestamp",n,o.NUMBER,!0).validate("conversation",t,o.OBJECT,!0).validate("conversationType",null==t?void 0:t.conversationType,(function(t){return[e.GROUP,e.PRIVATE,e.APP_PUBLIC_SERVICE,e.PUBLIC_SERVICE,e.SYSTEM].includes(t)}),!0).validate("targetId",null==t?void 0:t.targetId,o.STRING,!0).validate("channelId",null==t?void 0:t.channelId,o.CHANNEL_ID).ifReady((function(e,r){return de(i,void 0,void 0,(function(){var i,o,a,u,s,c,_;return fe(this,(function(d){switch(d.label){case 0:return i="conversationType:".concat(t.conversationType,",targetId:").concat(t.targetId,",\n channelId: ").concat(t.channelId,", timestamp:").concat(n),o=r.createTraceId(),r.info(E.A_SYNC_READ_STATUS_T,i,o),1!==(null==(a=e.getNaviInfoFromCache())?void 0:a.sesDriven)?[3,2]:[4,e.updateConversationReadTime(t,n)];case 1:return u=d.sent(),[3,4];case 2:return s=new Xe(A.SYNC_READ_STATUS,{lastMessageSendTime:n}),[4,xt(t,s)];case 3:u=d.sent(),d.label=4;case 4:return c=u.code,_=u.msg,r[c===f.SUCCESS?"info":"warn"](E.A_SYNC_READ_STATUS_R,"code: ".concat(c,", msg: ").concat(_),o),[2,{code:c,msg:_}]}}))}))}))]}))}))}function $t(t,n,i){return void 0===i&&(i=""),de(this,void 0,void 0,(function(){var r=this;return fe(this,(function(a){return[2,new R(E.A_SEND_MESSAGE_READ_RECEIPT_V4_T,E.A_SEND_MESSAGE_READ_RECEIPT_V4_R).validate("conversation",t,o.OBJECT,!0).validate("conversationType",null==t?void 0:t.conversationType,(function(t){return t===e.GROUP||t===e.PRIVATE}),!0,"It should be ConversationType.GROUP or ConversationType.PRIVATE").validate("targetId",null==t?void 0:t.targetId,o.STRING,!0).validate("channelId",null==t?void 0:t.channelId,o.CHANNEL_ID).validate("startMsgUId",i,o.ONLY_STRING,!0).validate("endMsgUId",n,o.STRING,!0).ifReady((function(e,o){return de(r,void 0,void 0,(function(){var r,a,u,s,c,_;return fe(this,(function(d){switch(d.label){case 0:return r=o.createTraceId(),a="conversationType:".concat(t.conversationType,",targetId:").concat(t.targetId,",\n channelId: ").concat(t.channelId,", startMsgUId:").concat(i,", endMsgUId: ").concat(n),o.info(E.A_SEND_MESSAGE_READ_RECEIPT_V4_T,a,r),3!==(null==(u=e.getNaviInfoFromCache())?void 0:u.grpRRVer)?[2,{code:f.READ_RECEIPT_V4_NOT_SUPPORT}]:[4,e.sendReadReceiptMessageV4(t,i,n)];case 1:return s=d.sent(),c=s.code,_=s.msg,o[c===f.SUCCESS?"info":"warn"](E.A_SEND_MESSAGE_READ_RECEIPT_V4_R,"code: ".concat(c,", msg: ").concat(_),r),[2,{code:c,msg:_}]}}))}))}))]}))}))}function en(t,n){return de(this,void 0,void 0,(function(){var i=this;return fe(this,(function(r){return[2,new R(E.A_GET_MESSAGE_READ_RECEIPT_V4_T,E.A_GET_MESSAGE_READ_RECEIPT_V4_R).validate("conversation",t,o.OBJECT,!0).validate("conversationType",null==t?void 0:t.conversationType,(function(t){return t===e.GROUP}),!0,"It should be ConversationType.GROUP").validate("targetId",null==t?void 0:t.targetId,o.STRING,!0).validate("channelId",null==t?void 0:t.channelId,o.CHANNEL_ID).validate("messageUId",n,o.STRING,!0).ifReady((function(e,r){return de(i,void 0,void 0,(function(){var i,o,a,u,s,c,_;return fe(this,(function(d){switch(d.label){case 0:return i="conversationType:".concat(t.conversationType,",targetId:").concat(t.targetId,",\n channelId: ").concat(t.channelId,", messageUid:").concat(n),o=r.createTraceId(),r.info(E.A_GET_MESSAGE_READ_RECEIPT_V4_T,i,o),3!==(null==(a=e.getNaviInfoFromCache())?void 0:a.grpRRVer)?[2,{code:f.READ_RECEIPT_V4_NOT_SUPPORT}]:[4,e.getMessageReadReceiptV4(t,n)];case 1:return u=d.sent(),s=u.code,c=u.msg,_=u.data,r[s===f.SUCCESS?"info":"warn"](E.A_GET_MESSAGE_READ_RECEIPT_V4_R,"code: ".concat(s,", msg: ").concat(c),o),s===f.SUCCESS&&_?[2,{code:s,data:_}]:[2,{code:s,msg:c}]}}))}))}))]}))}))}function tn(t,n){return de(this,void 0,void 0,(function(){var i=this;return fe(this,(function(r){return[2,new R(E.A_BATCH_GET_MESSAGE_READ_RECEIPT_INFO_V4_T,E.A_BATCH_GET_MESSAGE_READ_RECEIPT_INFO_V4_R).validate("conversation",t,o.OBJECT,!0).validate("conversationType",null==t?void 0:t.conversationType,(function(t){return t===e.GROUP}),!0,"It should be ConversationType.GROUP").validate("targetId",null==t?void 0:t.targetId,o.STRING,!0).validate("channelId",null==t?void 0:t.channelId,o.CHANNEL_ID).validate("messageUId",n,(function(e){return!!p("messageUIds",e,o.ARRAY,!0)&&!e.some((function(e){return!w(e)}))}),!0).ifReady((function(e,r){return de(i,void 0,void 0,(function(){var i,o,a,u,s,c,_;return fe(this,(function(d){switch(d.label){case 0:return i="conversationType:".concat(t.conversationType,",targetId:").concat(t.targetId,",\n channelId: ").concat(t.channelId,", messageUid:").concat(n.toString()),o=r.createTraceId(),r.info(E.A_BATCH_GET_MESSAGE_READ_RECEIPT_INFO_V4_T,i,o),3!==(null==(a=e.getNaviInfoFromCache())?void 0:a.grpRRVer)?[2,{code:f.READ_RECEIPT_V4_NOT_SUPPORT}]:[4,e.batchGetMessageReadReceiptInfoV4(t,n)];case 1:return u=d.sent(),s=u.code,c=u.msg,_=u.data,r[s===f.SUCCESS?"info":"warn"](E.A_BATCH_GET_MESSAGE_READ_RECEIPT_INFO_V4_R,"code: ".concat(s,", msg: ").concat(c),o),s===f.SUCCESS?[2,{code:s,data:_}]:[2,{code:s,msg:c}]}}))}))}))]}))}))}Vt(g.COMBINE_HTML,(function(e,t){var n={remoteUrl:e.downloadUrl,nameList:t.nameList,summaryList:t.summaryList,conversationType:t.conversationType};return t.user&&(n.user=t.user),t.extra&&(n.extra=t.extra),t.mentionedInfo&&(n.mentionedInfo=t.mentionedInfo),new Ze(n)}));var nn=Be("recallMessage",(function(e,t){return de(void 0,void 0,void 0,(function(){return fe(this,(function(n){return[2,Le().next((function(n){return de(void 0,void 0,void 0,(function(){return fe(this,(function(i){switch(i.label){case 0:return[4,n.recallMessage(e,t)];case 1:return[2,i.sent().trans((function(e){return Re(e)}))]}}))}))}))]}))}))}));function rn(e,t){return de(this,void 0,void 0,(function(){return fe(this,(function(n){return[2,Le().next((function(n){return n.deleteRemoteMessage(e,t)}))]}))}))}function on(e,t){return de(this,void 0,void 0,(function(){return fe(this,(function(n){return[2,Le().next((function(n){return n.deleteRemoteMessageByTimestamp(e,t)}))]}))}))}function an(e,t){return de(this,void 0,void 0,(function(){return fe(this,(function(n){return[2,Le().next((function(n){return n.batchClearRemoteHistoryMessages(e,t)}))]}))}))}function un(e,t){return de(this,void 0,void 0,(function(){return fe(this,(function(n){return[2,Le().next((function(n){return n.updateMessageExpansion(e,t)}))]}))}))}function sn(e,t){return de(this,void 0,void 0,(function(){return fe(this,(function(n){return[2,Le().next((function(n){return n.removeMessageExpansion(e,t)}))]}))}))}function cn(e,t){return de(this,void 0,void 0,(function(){var n=this;return fe(this,(function(i){return[2,new R(E.A_SEND_MSG_T,E.A_SEND_MSG_R).validate("conversation",e,o.OBJECT,!0).validate("conversationType",null==e?void 0:e.conversationType,o.CONVERSATION_TYPE,!0).validate("targetId",null==e?void 0:e.targetId,o.STRING,!0).validate("channelId",null==e?void 0:e.channelId,o.CHANNEL_ID).validate("messageType",t,o.STRING,!0).ifReady((function(i,r){return de(n,void 0,void 0,(function(){var n,o,a,u,s,c;return fe(this,(function(_){switch(_.label){case 0:return n={messageType:"RC:TypSts",content:{typingContentType:t},isStatusMessage:!0,channelId:e.channelId},o=r.createTraceId(),r.info(E.A_SEND_MSG_T,JSON.stringify({messageType:n.messageType,conversationType:e.conversationType,targetId:e.targetId,channelId:e.channelId}),o),[4,i.sendMessage(e.conversationType,e.targetId,n,o)];case 1:return a=_.sent(),u=a.code,s=a.data,c=u===f.SUCCESS?"info":"warn",r[c](E.A_SEND_MSG_R,JSON.stringify({code:u,messageUId:s?s.messageUId:"",messageId:s?s.messageId:""}),o),u===f.SUCCESS?[2,{code:u,data:Re(s)}]:[2,{code:u,msg:ye[u]}]}}))}))}))]}))}))}function _n(e,t,n){return de(this,void 0,void 0,(function(){var i=this;return fe(this,(function(r){return[2,new R(he.A_GET_MESSAGE_READER_T,he.A_GET_MESSAGE_READER_R).validate("messageUId",t,o.STRING,!0).validate("targetId",e,o.STRING,!0).validate("channelId",n,o.CHANNEL_ID).ifReady((function(r,o){return de(i,void 0,void 0,(function(){var i,a,u,s;return fe(this,(function(c){switch(c.label){case 0:return i=o.createTraceId(),o.info(he.A_GET_MESSAGE_READER_T,JSON.stringify({targetId:e,messageUId:t,channelId:n}),i),[4,r.getMessageReader(e,t,n)];case 1:return a=c.sent(),u=a.code,s=a.data,u===f.SUCCESS?(o.info(he.A_GET_MESSAGE_READER_R,JSON.stringify({code:u,totalMemberCount:null==s?void 0:s.totalMemberCount}),i),[2,{code:u,data:s}]):(o.warn(he.A_GET_MESSAGE_READER_R,JSON.stringify({code:u})),[2,{code:u,msg:ye[u]}])}}))}))}))]}))}))}function dn(e,t,n,i,a){return Ce((function(u,s){return r("messageType",e,o.STRING,!0),r("isPersited",t,o.BOOLEAN,!0),r("isCounted",n,o.BOOLEAN,!0),r("isStatusMessage",a,o.BOOLEAN,!1),r("searchProps",i,o.ARRAY),s.info(E.A_REGTYP_O,JSON.stringify({messageType:e,isCounted:n,isStatusMessage:a,isPersited:t})),u.registerMessageType(e,t,n,i,a),function(e,t,n){return void 0===t&&(t=!0),void 0===n&&(n=!0),function(i){return new Xe(e,i,t,n)}}(e,t,n)}))}function fn(e){return de(this,void 0,void 0,(function(){return fe(this,(function(t){switch(t.label){case 0:return[4,Le().next((function(t){return t.getFirstUnreadMessage(e)}))];case 1:return[2,t.sent().trans((function(e){return e?Re(e):null}))]}}))}))}function ln(e){return de(this,void 0,void 0,(function(){return fe(this,(function(t){return[2,Le().next((function(t){return t.getFirstUnreadMessageDigest(e)}))]}))}))}function En(e,t,n){return void 0===n&&(n={}),de(this,void 0,void 0,(function(){return fe(this,(function(i){return Se("insertMessage","electronExtension.insertMessage"),[2,tr(e,t,n)]}))}))}function Rn(e){throw new Error("getUnreadMentionedMessages is deprecated, please use electronExtension.getUnreadMentionedMessages instead")}function An(e,t,n,i){return de(this,void 0,void 0,(function(){return fe(this,(function(r){return Se("RongIMLib.searchMessages","RongIMLib.ElectronExtension.searchMessagesWithParams"),[2,qi(e,t,n,i)]}))}))}function Sn(e,t,n){return de(this,void 0,void 0,(function(){return fe(this,(function(i){return Se("RongIMLib.deleteLocalMessagesByTimestamp","RongIMLib.electronExtension.deleteMessagesByTimestamp"),[2,er(e,t,n)]}))}))}function Tn(e){return de(this,void 0,void 0,(function(){return fe(this,(function(t){return Se("RongIMLib.clearMessages","RongIMLib.electronExtension.clearMessages"),[2,$i(e)]}))}))}function In(e,t,n,i){return de(this,void 0,void 0,(function(){return fe(this,(function(r){return Se("searchConversationByContent","electronExtension.searchConversationByContent"),[2,Xi(e,null!=n?n:[A.TEXT,A.FILE],i,t)]}))}))}function vn(e,t){return de(this,void 0,void 0,(function(){var n=this;return fe(this,(function(i){return F()?[2,new R(he.A_CLEAR_UNREAD_COUNT_BY_TIMESTAMP_T,he.A_CLEAR_UNREAD_COUNT_BY_TIMESTAMP_R).validate("conversation",e,o.OBJECT,!0).validate("conversationType",null==e?void 0:e.conversationType,o.CONVERSATION_TYPE,!0).validate("targetId",null==e?void 0:e.targetId,o.STRING,!0).validate("channelId",null==e?void 0:e.channelId,o.CHANNEL_ID).validate("timestamp",t,o.NUMBER).ifReady((function(i,r){return de(n,void 0,void 0,(function(){var n,o,a,u,s,c,_;return fe(this,(function(d){switch(d.label){case 0:return n=e.conversationType,o=e.targetId,a=e.channelId,u=void 0===a?"":a,s=r.createTraceId(),r.info(he.A_CLEAR_UNREAD_COUNT_BY_TIMESTAMP_T,JSON.stringify({conversationType:n,targetId:o,channelId:u,timestamp:t}),s),[4,i.clearUnreadCountByTimestamp(n,o,t,u)];case 1:return c=d.sent(),_=c===f.SUCCESS?"info":"warn",r[_](he.A_CLEAR_UNREAD_COUNT_BY_TIMESTAMP_R,JSON.stringify({code:c}),s),c===f.SUCCESS?[2,{code:c}]:[2,{code:c,msg:ye[c]}]}}))}))}))]:[2,{code:f.NOT_SUPPORT,msg:ye[f.NOT_SUPPORT]}]}))}))}function hn(e,t){return de(this,void 0,void 0,(function(){return fe(this,(function(n){return[2,Zi(e,t)]}))}))}function On(e){return Le().next((function(t){return t.sse.requestStreamMessageContent(e)}))}function Nn(e,t){return de(this,void 0,void 0,(function(){var n=this;return fe(this,(function(i){return[2,Le().next((function(i){return de(n,void 0,void 0,(function(){return fe(this,(function(n){return[2,i.sendReadReceiptResponseV5(e,t)]}))}))}))]}))}))}function gn(e,t){return de(this,void 0,void 0,(function(){var n=this;return fe(this,(function(i){return[2,Le().next((function(i){return de(n,void 0,void 0,(function(){return fe(this,(function(n){return[2,i.getMessageReadReceiptInfoV5(e,t)]}))}))}))]}))}))}function mn(e){return de(this,void 0,void 0,(function(){var t=this;return fe(this,(function(n){return[2,Le().next((function(n){return de(t,void 0,void 0,(function(){return fe(this,(function(t){return[2,n.getMessageReadReceiptInfoV5ByIdentifiers(e)]}))}))}))]}))}))}function Pn(e,t,n){return de(this,void 0,void 0,(function(){var i=this;return fe(this,(function(r){return[2,Le().next((function(r){return de(i,void 0,void 0,(function(){return fe(this,(function(i){return[2,r.getMessagesReadReceiptUsersByPageV5(e,t,n)]}))}))}))]}))}))}function pn(e,t,n){return de(this,void 0,void 0,(function(){var i=this;return fe(this,(function(r){return[2,Le().next((function(r){return de(i,void 0,void 0,(function(){return fe(this,(function(i){return[2,r.getMessagesReadReceiptByUsersV5(e,t,n)]}))}))}))]}))}))}function Un(e,t){return Le().next((function(n){return n.requestSpeechToTextForMessage(e,t)}))}function Cn(e){return Le().next((function(t){return t.translateMessagesWithParams(e)}))}function Mn(e){return Le().next((function(t){return t.translateTextsWithParams(e)}))}function Ln(e,t){return de(this,void 0,void 0,(function(){return fe(this,(function(n){return Se("modifyMessage","modifyMessageWithParams"),[2,Dn({messageUId:null==t?void 0:t.messageUId,messageContent:e,conversation:{conversationType:null==t?void 0:t.conversationType,targetId:null==t?void 0:t.targetId,channelId:null==t?void 0:t.channelId}})]}))}))}function Dn(e){return Le().next((function(t){return t.modifyMessageWithParams(e)}))}function Gn(e){return Le().next((function(t){var n=function(e){return e.map((function(e){return{messageUId:e.messageUId,message:e.message?Re(e.message):void 0,code:e.code}}))};return t.refreshReferenceMessageWithParams(_e(_e({},e),{remoteMessageBlock:function(t){e.remoteMessageBlock&&e.remoteMessageBlock(n(t))},localMessageBlock:function(t){e.localMessageBlock&&e.localMessageBlock(n(t))}}))}))}function yn(e,t){return de(this,void 0,void 0,(function(){var n=this;return fe(this,(function(i){switch(i.label){case 0:return Se("getConversationList","getConversationListByTimestamp"),[4,Le().next((function(i){return de(n,void 0,void 0,(function(){return fe(this,(function(n){return[2,i.getConversationList({count:(null==e?void 0:e.count)||300,startTime:(null==e?void 0:e.startTime)||0,order:null==e?void 0:e.order,channelId:t})]}))}))}))];case 1:return[2,i.sent().trans((function(e){return e.map(Ae)}))]}}))}))}function bn(e){return de(this,void 0,void 0,(function(){var t=this;return fe(this,(function(n){switch(n.label){case 0:return[4,Le().next((function(n){return de(t,void 0,void 0,(function(){return fe(this,(function(t){return[2,n.getAllConversationList(e)]}))}))}))];case 1:return[2,n.sent().trans((function(e){return e.map(Ae)}))]}}))}))}function wn(e){return de(this,void 0,void 0,(function(){var t=this;return fe(this,(function(n){switch(n.label){case 0:return[4,Le().next((function(n){return de(t,void 0,void 0,(function(){return fe(this,(function(t){return[2,n.getConversationListByTimestamp(e)]}))}))}))];case 1:return[2,n.sent().trans((function(e){return e.map(Ae)}))]}}))}))}function Fn(e){return de(this,void 0,void 0,(function(){var t=this;return fe(this,(function(n){return[2,Le().next((function(n){return de(t,void 0,void 0,(function(){return fe(this,(function(t){switch(t.label){case 0:return[4,n.getConversation(e)];case 1:return[2,t.sent().trans((function(e){return Ae(e)}))]}}))}))}))]}))}))}var xn=Be("removeConversation",(function(e,t){return de(void 0,void 0,void 0,(function(){return fe(this,(function(n){return[2,Le().next((function(n){return n.removeConversation(e,t)}))]}))}))}));function Bn(e){return de(this,void 0,void 0,(function(){return fe(this,(function(t){return Se("batchRemoveConversation","batchDeleteConversations"),[2,Vn({identifiers:e,deleteRemotely:!1,deleteMessages:!1})]}))}))}function Vn(e){return de(this,void 0,void 0,(function(){return fe(this,(function(t){return[2,Le().next((function(t){return t.batchDeleteConversations(e)}))]}))}))}function Hn(e){return de(this,void 0,void 0,(function(){return fe(this,(function(t){return[2,Le().next((function(t){return t.getTextMessageDraft(e)}))]}))}))}function Yn(e,t){return de(this,void 0,void 0,(function(){return fe(this,(function(n){return[2,Le().next((function(n){return n.saveTextMessageDraft(e,t)}))]}))}))}function Jn(e){return de(this,void 0,void 0,(function(){return fe(this,(function(t){return[2,Le().next((function(t){return t.clearTextMessageDraft(e)}))]}))}))}function kn(e,t){return de(this,void 0,void 0,(function(){return fe(this,(function(n){return[2,Le().next((function(n){return n.getTotalUnreadCount(t,e)}))]}))}))}function Kn(e,t){return de(this,void 0,void 0,(function(){return fe(this,(function(n){return[2,Le().next((function(n){return n.getTotalUnreadCountByLevels(e,t)}))]}))}))}function jn(e,t){return de(this,void 0,void 0,(function(){return fe(this,(function(n){return[2,Le().next((function(n){return n.getTotalUnreadCountByLevels(e,t,!0)}))]}))}))}function Wn(e){return de(this,void 0,void 0,(function(){return fe(this,(function(t){return[2,Le().next((function(t){return t.getUnreadCount(e)}))]}))}))}var Qn=Be("clearMessagesUnreadStatus",(function(e){return de(void 0,void 0,void 0,(function(){return fe(this,(function(t){return[2,Le().next((function(t){return t.clearUnreadCount(e)}))]}))}))}));function Xn(){return de(this,void 0,void 0,(function(){return fe(this,(function(e){return[2,Le().next((function(e){return e.clearAllUnreadCount()}))]}))}))}var zn=Be("setConversationNotificationLevel",(function(e,t){return de(void 0,void 0,void 0,(function(){return fe(this,(function(n){return[2,Le().next((function(n){return n.batchSetConversationNotificationLevel([e],t)}))]}))}))}));function qn(e,t){return de(this,void 0,void 0,(function(){return fe(this,(function(n){return[2,Le().next((function(n){return n.batchSetConversationNotificationLevel(e,t)}))]}))}))}function Zn(e,t){return de(this,void 0,void 0,(function(){return fe(this,(function(n){return[2,Le().next((function(n){return n.batchSetConversationTranslateStrategy(e,t)}))]}))}))}function $n(e,t){return de(this,void 0,void 0,(function(){var n=this;return fe(this,(function(i){return[2,Le().next((function(i){return de(n,void 0,void 0,(function(){var n;return fe(this,(function(r){return t!==x.CLOSE&&t!==x.OPEN?[2,d(f.INVALID_PARAMETER_NOTIFICATION_LEVEL)]:(n=B(t),[2,i.batchSetConversationNotificationLevel([e],n)])}))}))}))]}))}))}function ei(e){return de(this,void 0,void 0,(function(){return fe(this,(function(t){return[2,Le().next((function(t){return t.getConversationNotificationLevel(e)}))]}))}))}function ti(e){return de(this,void 0,void 0,(function(){var t=this;return fe(this,(function(n){return[2,Le().next((function(n){return de(t,void 0,void 0,(function(){return fe(this,(function(t){switch(t.label){case 0:return[4,n.getConversationNotificationLevel(e)];case 1:return[2,t.sent().trans((function(e){return V(e)}))]}}))}))}))]}))}))}function ni(){return de(this,void 0,void 0,(function(){return fe(this,(function(e){switch(e.label){case 0:return[4,Le().next((function(e){return e.getBlockedConversationList()}))];case 1:return[2,e.sent().trans((function(e){return e.map(Ae)}))]}}))}))}function ii(e,t){return de(this,void 0,void 0,(function(){return fe(this,(function(n){return[2,Le().next((function(n){return n.setConversationTypeNotificationLevel(e,t)}))]}))}))}function ri(e){return de(this,void 0,void 0,(function(){return fe(this,(function(t){return[2,Le().next((function(t){return t.getConversationTypeNotificationLevel(e)}))]}))}))}var oi=Be("setConversationToTop",(function(e,t,n,i){return void 0===t&&(t=!0),void 0===n&&(n=!0),void 0===i&&(i=!1),de(void 0,void 0,void 0,(function(){return fe(this,(function(r){return[2,Le().next((function(r){return r.batchSetConversationToTop([e],!!t,n,i)}))]}))}))}));function ai(e,t,n,i){return void 0===n&&(n=!0),void 0===i&&(i=!0),de(this,void 0,void 0,(function(){return fe(this,(function(r){return[2,Le().next((function(r){return r.batchSetConversationToTop(e,!!t,i,n)}))]}))}))}function ui(e,t){return de(this,void 0,void 0,(function(){return fe(this,(function(n){switch(n.label){case 0:return[4,Le().next((function(n){return n.getTopConversationList(e,t)}))];case 1:return[2,n.sent().trans((function(e){return e.map(Ae)}))]}}))}))}function si(e){return de(this,void 0,void 0,(function(){return fe(this,(function(t){switch(t.label){case 0:return[4,Le().next((function(t){return t.getUnreadConversationList(e)}))];case 1:return[2,t.sent().trans((function(e){return e.map(Ae)}))]}}))}))}function ci(e){return de(this,void 0,void 0,(function(){return fe(this,(function(t){return[2,Le().next((function(t){return t.getUnreadMentionedCount(e)}))]}))}))}function _i(){return de(this,void 0,void 0,(function(){return fe(this,(function(e){return[2,Le().next((function(e){return e.getAllUnreadMentionedCount()}))]}))}))}function di(e){return de(this,void 0,void 0,(function(){return fe(this,(function(t){switch(t.label){case 0:return[4,Le().next((function(t){var n,i,r;return t.getRealtimeConversations(null!==(n=null==e?void 0:e.count)&&void 0!==n?n:30,null!==(i=null==e?void 0:e.startTime)&&void 0!==i?i:0,null!==(r=null==e?void 0:e.order)&&void 0!==r?r:0)}))];case 1:return[2,t.sent().trans((function(e){return e.map(Ae)}))]}}))}))}function fi(){return de(this,void 0,void 0,(function(){return fe(this,(function(e){return[2,Le().next((function(e){return e.getRealtimeConTotalUnreadCount()}))]}))}))}function li(e){return de(this,void 0,void 0,(function(){return fe(this,(function(t){return[2,Le().next((function(t){return t.clearRealtimeConUnreadCount(e)}))]}))}))}function Ei(e){return de(this,void 0,void 0,(function(){return fe(this,(function(t){return[2,Le().next((function(t){return t.removeRealtimeConversations(e)}))]}))}))}function Ri(e){return de(this,void 0,void 0,(function(){return fe(this,(function(t){return[2,Le().next((function(t){return t.batchGetRealtimeConUnreadCount(e)}))]}))}))}function Ai(e){return de(this,void 0,void 0,(function(){return fe(this,(function(t){switch(t.label){case 0:return[4,Le().next((function(t){return t.getUnreadMentionMeConversationList(e)}))];case 1:return[2,t.sent().trans((function(e){return e.map(Ae)}))]}}))}))}function Si(e){return de(this,void 0,void 0,(function(){return fe(this,(function(t){return[2,Le().next((function(t){return t.getUltraGroupList(e)}))]}))}))}function Ti(){return de(this,void 0,void 0,(function(){return fe(this,(function(e){switch(e.label){case 0:return[4,Le().next((function(e){return e.getBlockedUGList()}))];case 1:return[2,e.sent().trans((function(e){return e.map((function(e){return Ae(e)}))}))]}}))}))}function Ii(e){return de(this,void 0,void 0,(function(){return fe(this,(function(t){return[2,Le().next((function(t){return t.sendUltraGroupTypingStatus(e)}))]}))}))}function vi(e,t){return de(this,void 0,void 0,(function(){var n=this;return fe(this,(function(i){switch(i.label){case 0:return[4,Le().next((function(i){return de(n,void 0,void 0,(function(){return fe(this,(function(n){return[2,i.getUltraGroupMessageListByMessageUId(e,t)]}))}))}))];case 1:return[2,i.sent().trans((function(e){var t={};for(var n in e)t[n]=e[n]?Re(e[n]):void 0;return t}))]}}))}))}function hi(e,t){return de(this,void 0,void 0,(function(){return fe(this,(function(n){return Se("updateExpansionForUltraGroupMessage","updateMessageExpansion"),[2,un(e,t)]}))}))}function Oi(e,t){return de(this,void 0,void 0,(function(){return fe(this,(function(n){return Se("removeExpansionForUltraGroupMessage","removeMessageExpansionForKey"),[2,sn(e,t)]}))}))}function Ni(e){return de(this,void 0,void 0,(function(){return fe(this,(function(t){return[2,Le().next((function(t){return t.removeAllMessageExpansion(e)}))]}))}))}function gi(e,t){return de(this,void 0,void 0,(function(){return fe(this,(function(n){return[2,Le().next((function(n){return n.getUGUnreadCountForAllChannels(e,!0,t)}))]}))}))}function mi(e){return de(this,void 0,void 0,(function(){return fe(this,(function(t){return[2,Le().next((function(t){return t.getUltraGroupDefaultNotificationLevel(null==e?void 0:e.targetId,null==e?void 0:e.channelId)}))]}))}))}function Pi(e,t){return de(this,void 0,void 0,(function(){return fe(this,(function(n){return[2,Le().next((function(n){return n.setUltraGroupDefaultNotificationLevel(null==e?void 0:e.targetId,t,null==e?void 0:e.channelId)}))]}))}))}function pi(e,t){return de(this,void 0,void 0,(function(){return fe(this,(function(n){return[2,Le().next((function(n){return n.getUGUnreadCountForAllChannels(e,!1,t)}))]}))}))}function Ui(){return de(this,void 0,void 0,(function(){return fe(this,(function(t){return Se("getAllUltraGroupUnreadCount","getTotalUnreadCountByLevels"),[2,Kn([e.ULTRA_GROUP],[])]}))}))}function Ci(){return de(this,void 0,void 0,(function(){return fe(this,(function(t){return Se("getAllUltraGroupUnreadMentionedCount","getTotalUnreadMentionedCountByLevels"),[2,jn([e.ULTRA_GROUP],[])]}))}))}function Mi(e){return de(this,void 0,void 0,(function(){return fe(this,(function(t){return[2,Le().next((function(t){return t.getUGUnreadMentionedDigest(e)}))]}))}))}function Li(e){return de(this,void 0,void 0,(function(){return fe(this,(function(t){return[2,Le().next((function(t){return t.getUGFirstUnreadMessageDigest(e)}))]}))}))}function Di(e){return de(this,void 0,void 0,(function(){return fe(this,(function(t){return[2,Le().next((function(t){return t.getUGUnreadInfoList(e)}))]}))}))}function Gi(e){return de(this,void 0,void 0,(function(){var t=this;return fe(this,(function(n){return[2,new R(he.A_ADD_TO_BLACKLIST_T,he.A_ADD_TO_BLACKLIST_R).validate("userId",e,o.STRING,!0).ifReady((function(n,i){return de(t,void 0,void 0,(function(){var t,r,o;return fe(this,(function(a){switch(a.label){case 0:return t=i.createTraceId(),i.info(he.A_ADD_TO_BLACKLIST_T,JSON.stringify({userId:e}),t),[4,n.addToBlacklist(e)];case 1:return r=a.sent(),o=r===f.SUCCESS?"info":"warn",i[o](he.A_ADD_TO_BLACKLIST_R,JSON.stringify({code:r}),t),[2,{code:r}]}}))}))}))]}))}))}function yi(e){return de(this,void 0,void 0,(function(){var t=this;return fe(this,(function(n){return[2,new R(he.A_REMOVE_FROM_BLACKLIST_T,he.A_REMOVE_FROM_BLACKLIST_R).validate("userId",e,o.STRING,!0).ifReady((function(n,i){return de(t,void 0,void 0,(function(){var t,r,o;return fe(this,(function(a){switch(a.label){case 0:return t=i.createTraceId(),i.info(he.A_REMOVE_FROM_BLACKLIST_T,JSON.stringify({userId:e}),t),[4,n.removeFromBlacklist(e)];case 1:return r=a.sent(),o=r===f.SUCCESS?"info":"warn",i[o](he.A_REMOVE_FROM_BLACKLIST_R,JSON.stringify({code:r}),t),[2,{code:r}]}}))}))}))]}))}))}function bi(){return de(this,void 0,void 0,(function(){var e=this;return fe(this,(function(t){return[2,new R(he.A_GET_BLACKLIST_T,he.A_GET_BLACKLIST_R).ifReady((function(t,n){return de(e,void 0,void 0,(function(){var e,i,r,o;return fe(this,(function(a){switch(a.label){case 0:return e=n.createTraceId(),n.info(he.A_GET_BLACKLIST_T,"getBlacklist -> ",e),[4,t.getBlacklist()];case 1:return i=a.sent(),r=i.code,o=i.data,r===f.SUCCESS&&o?(n.info(he.A_GET_BLACKLIST_R,JSON.stringify({code:r,data:o}),e),[2,{code:r,data:o}]):(n.warn(he.A_GET_BLACKLIST_R,JSON.stringify({code:r}),e),[2,{code:r}])}}))}))}))]}))}))}function wi(e){return de(this,void 0,void 0,(function(){var t=this;return fe(this,(function(n){return[2,new R(he.A_GET_BLACKLIST_STATUS_T,he.A_GET_BLACKLIST_STATUS_R).validate("userId",e,o.STRING,!0).ifReady((function(n,i){return de(t,void 0,void 0,(function(){var t,r,o,a;return fe(this,(function(u){switch(u.label){case 0:return t=i.createTraceId(),i.info(he.A_GET_BLACKLIST_STATUS_T,JSON.stringify({userId:e}),t),[4,n.getBlacklistStatus(e)];case 1:return r=u.sent(),o=r.code,a=r.data,o===f.SUCCESS?(i.info(he.A_GET_BLACKLIST_STATUS_R,JSON.stringify({code:o,data:0===a}),t),[2,{code:o,data:0===a}]):(i.warn(he.A_GET_BLACKLIST_STATUS_R,JSON.stringify({code:o}),t),[2,{code:o}])}}))}))}))]}))}))}function Fi(e){return de(this,void 0,void 0,(function(){return fe(this,(function(t){return[2,Le().next((function(t){return t.createTag(e)}))]}))}))}function xi(e){return de(this,void 0,void 0,(function(){return fe(this,(function(t){return[2,Le().next((function(t){return t.removeTag(e)}))]}))}))}function Bi(e){return de(this,void 0,void 0,(function(){return fe(this,(function(t){return[2,Le().next((function(t){return t.updateTag(e)}))]}))}))}function Vi(){return de(this,void 0,void 0,(function(){return fe(this,(function(e){return[2,Le().next((function(e){return e.getTagList()}))]}))}))}function Hi(e){return de(this,void 0,void 0,(function(){return fe(this,(function(t){return[2,Le().next((function(t){return t.getTagsForConversation(e)}))]}))}))}function Yi(e,t){return de(this,void 0,void 0,(function(){return fe(this,(function(n){return[2,Le().next((function(n){return n.addTagForConversations(e,t)}))]}))}))}function Ji(e,t){return de(this,void 0,void 0,(function(){return fe(this,(function(n){return[2,Le().next((function(n){return n.removeTagForConversations(e,t)}))]}))}))}function ki(e,t){return de(this,void 0,void 0,(function(){return fe(this,(function(n){return[2,Le().next((function(n){return n.removeTagsForConversation(e,t)}))]}))}))}function Ki(e,t){return de(this,void 0,void 0,(function(){return fe(this,(function(n){return[2,Le().next((function(n){return n.removeTagForConversations(e,t)}))]}))}))}function ji(e,t,n){return de(this,void 0,void 0,(function(){return fe(this,(function(i){switch(i.label){case 0:return[4,Le().next((function(i){return i.getConversationListByTag(e,n,t)}))];case 1:return[2,i.sent().trans((function(e){return e.map((function(e){return _e(_e({},Ae(t=e)),{isTopInTag:t.isTopInTag});var t}))}))]}}))}))}function Wi(e,t){return de(this,void 0,void 0,(function(){return fe(this,(function(n){return[2,Le().next((function(n){return n.getUnreadCountByTag(e,t)}))]}))}))}function Qi(e,t,n){return de(this,void 0,void 0,(function(){return fe(this,(function(i){return[2,Le().next((function(i){return i.setConversationStatusInTag(e,t,{isTop:n})}))]}))}))}function Xi(e,t,n,i){return de(this,void 0,void 0,(function(){var r=this;return fe(this,(function(o){return[2,Le().next((function(o){return de(r,void 0,void 0,(function(){return fe(this,(function(r){switch(r.label){case 0:return[4,o.searchConversationByContent(e,t,n,i)];case 1:return[2,r.sent().trans((function(e){return e.map((function(e){return Ae(e)}))}))]}}))}))}))]}))}))}function zi(e,t){return de(this,void 0,void 0,(function(){return fe(this,(function(n){switch(n.label){case 0:return[4,Le().next((function(n){return n.searchMessages(e,t)}))];case 1:return[2,n.sent().trans((function(e){var t=e.totalMatched,n=e.messages;return e.conditionsMatched,{count:t,messages:n.map((function(e){return Re(e)}))}}))]}}))}))}function qi(e,t,n,i,r){return de(this,void 0,void 0,(function(){return fe(this,(function(o){return Se("RongIMLib.electronExtension.searchMessages","RongIMLib.electronExtension.searchMessagesWithParams"),[2,zi(e,{keyword:t,limit:i||J,order:0,timeRange:{endTime:n?n-1:n||0},messageFilter:{objectNames:r}})]}))}))}function Zi(e,t){return de(this,void 0,void 0,(function(){var n=this;return fe(this,(function(i){return console.warn("`setMessageReceivedStatus` has being deprecated, use `setMessageReceivedStatusInfo` instead."),F()?[2,new R(he.A_E_SET_MESSAGE_RECEIVED_STATUS_T,he.A_E_SET_MESSAGE_RECEIVED_STATUS_R).validate("messageId",e,o.NUMBER,!0).validate("receivedStatus",t,(function(e){return!H(G[e])}),!0).ifReady((function(i,r){return de(n,void 0,void 0,(function(){var n,o;return fe(this,(function(a){switch(a.label){case 0:return n=r.createTraceId(),r.info(he.A_E_SET_MESSAGE_RECEIVED_STATUS_T,JSON.stringify({messageId:e,receivedStatus:t}),n),[4,i.setMessageReceivedStatus(e,t)];case 1:return o=a.sent(),r.info(he.A_E_SET_MESSAGE_RECEIVED_STATUS_R,JSON.stringify({code:o}),n),[2,{code:o}]}}))}))}))]:[2,{code:f.NOT_SUPPORT,msg:ye[f.NOT_SUPPORT]}]}))}))}function $i(e){return de(this,void 0,void 0,(function(){return fe(this,(function(t){return[2,Le().next((function(t){return t.clearLocalMessages(e)}))]}))}))}function er(e,t,n){return de(this,void 0,void 0,(function(){return fe(this,(function(i){return[2,Le().next((function(i){return i.deleteLocalMessagesByTimestamp(e,t,n)}))]}))}))}function tr(e,t,n){return void 0===n&&(n={}),de(this,void 0,void 0,(function(){return fe(this,(function(i){return t instanceof Xe?[2,ir(e,t,n)]:[2,nr(e,t,n)]}))}))}function nr(e,t,n){return void 0===n&&(n={}),de(this,void 0,void 0,(function(){var i,r,o,a;return fe(this,(function(u){switch(u.label){case 0:return i=!!(null==n?void 0:n.isUnread),r=null==n?void 0:n.searchContent,o=null==n?void 0:n.disableUpdateLastMessage,a={senderUserId:null==t?void 0:t.senderUserId,messageType:null==t?void 0:t.messageType,content:null==t?void 0:t.content,messageDirection:null==t?void 0:t.messageDirection,readStatus:"object"==typeof(null==t?void 0:t.receivedStatusInfo)?Y(t.receivedStatusInfo):null==t?void 0:t.receivedStatus,sentTime:null==t?void 0:t.sentTime,sentStatus:null==t?void 0:t.sentStatus,searchContent:r,messageUId:"",isUnread:i,disableNotification:null==t?void 0:t.disableNotification,canIncludeExpansion:null==t?void 0:t.canIncludeExpansion,expansion:(null==t?void 0:t.expansion)||void 0,directedUserIds:null==t?void 0:t.directedUserIds,disableUpdateLastMessage:(null==t?void 0:t.disableUpdateLastMessage)||o},[4,Le().next((function(t){return t.insertMessage(e,a)}))];case 1:return[2,u.sent().trans(Re)]}}))}))}function ir(e,t,n){return void 0===n&&(n={}),de(this,void 0,void 0,(function(){var i,r,o,a;return fe(this,(function(u){switch(u.label){case 0:return i=!!(null==n?void 0:n.isUnread),r=null==n?void 0:n.searchContent,o=null==n?void 0:n.disableUpdateLastMessage,a={senderUserId:"",messageType:null==t?void 0:t.messageType,content:null==t?void 0:t.content,searchContent:r,messageDirection:D.SEND,isUnread:i,messageUId:"",disableUpdateLastMessage:o},[4,Le().next((function(t){return t.insertMessage(e,a)}))];case 1:return[2,u.sent().trans(Re)]}}))}))}function rr(e){return de(this,void 0,void 0,(function(){return fe(this,(function(t){switch(t.label){case 0:return[4,Le().next((function(t){return t.getLocalMessage(e)}))];case 1:return[2,t.sent().trans((function(e){return Re(e)}))]}}))}))}var or=Object.freeze({__proto__:null,getAllConversationList:function(e){return de(this,void 0,void 0,(function(){return fe(this,(function(t){return Se("electronExtension.getAllConversationList","getAllConversationList"),[2,bn(e)]}))}))},getConversationList:function(e,t,n,i){return de(this,void 0,void 0,(function(){var r=this;return fe(this,(function(o){switch(o.label){case 0:return Se("electronExtension.getConversationList","getAllConversationList or getConversationListByTimestamp"),[4,Le().next((function(o){return de(r,void 0,void 0,(function(){return fe(this,(function(r){return[2,o.getConversationList({startTime:e,count:t,channelId:n,topPriority:i})]}))}))}))];case 1:return[2,o.sent().trans((function(e){return e.map((function(e){return Ae(e)}))}))]}}))}))},searchConversationByContent:Xi,getConversations:function(e){return de(this,void 0,void 0,(function(){return fe(this,(function(t){switch(t.label){case 0:return[4,Le().next((function(t){return t.getConversations(e)}))];case 1:return[2,t.sent().trans((function(e){return e.map(Ae)}))]}}))}))},getUntaggedConversationListByPage:function(e,t,n){return de(this,void 0,void 0,(function(){var i=this;return fe(this,(function(r){return[2,Le().next((function(r){return de(i,void 0,void 0,(function(){return fe(this,(function(i){switch(i.label){case 0:return[4,r.getUntaggedConversationListByPage(e,t,n)];case 1:return[2,i.sent().trans((function(e){return e.map((function(e){return Ae(e)}))}))]}}))}))}))]}))}))},getRemoteConversations:function(){return de(this,void 0,void 0,(function(){return fe(this,(function(e){return[2,Le().next((function(e){return e.syncRemoteConversations()}))]}))}))},saveEditedMessageDraft:function(e,t){return de(this,void 0,void 0,(function(){return fe(this,(function(n){return[2,Le().next((function(n){return n.chat.saveEditedMessageDraft(e,t)}))]}))}))},getEditedMessageDraft:function(e){return de(this,void 0,void 0,(function(){return fe(this,(function(t){return[2,Le().next((function(t){return t.chat.getEditedMessageDraft(e)}))]}))}))},clearEditedMessageDraft:function(e){return de(this,void 0,void 0,(function(){return fe(this,(function(t){return[2,Le().next((function(t){return t.chat.clearEditedMessageDraft(e)}))]}))}))},searchMessages:qi,searchMessageInTimeRange:function(e,t){return de(this,void 0,void 0,(function(){return fe(this,(function(n){return Se("RongIMLib.electronExtension.searchMessageInTimeRange","RongIMLib.electronExtension.searchMessagesWithParams"),[2,zi(e,{keyword:null==t?void 0:t.keyword,limit:(null==t?void 0:t.limit)||5,offset:null==t?void 0:t.offset,order:0,timeRange:{startTime:null==t?void 0:t.startTime,endTime:null==t?void 0:t.endTime}})]}))}))},searchMessagesByUser:function(e,t,n,i){return de(this,void 0,void 0,(function(){return fe(this,(function(r){switch(r.label){case 0:return Se("RongIMLib.electronExtension.searchMessagesByUser","RongIMLib.electronExtension.searchMessagesWithParams"),[4,zi(e,{limit:i,keyword:"",order:0,timeRange:{endTime:n?n-1:n||0},messageFilter:{senderIds:[t]}})];case 1:return[2,r.sent().trans((function(e){return{messages:e.messages}}))]}}))}))},getHistoryMessagesByMessageTypes:function(e,t){return de(this,void 0,void 0,(function(){return fe(this,(function(n){switch(n.label){case 0:return[4,Le().next((function(n){return n.getHistoryMessagesByObjectNames(e,t)}))];case 1:return[2,n.sent().trans((function(e){var t=e.list,n=e.hasMore,i=t.map(Re);return{messages:i,hasMore:n,list:i}}))]}}))}))},getContinuousMessages:function(e,t){return de(this,void 0,void 0,(function(){return fe(this,(function(n){switch(n.label){case 0:return[4,Le().next((function(n){return n.getContinuousMessages(e,t)}))];case 1:return[2,n.sent().trans((function(e){var t=e.list,n=e.hasMore,i=e.timestamp;return{hasMore:n,list:t.map(Re),timestamp:i}}))]}}))}))},setMessageStatusToRead:function(e,t){return de(this,void 0,void 0,(function(){return fe(this,(function(n){return[2,Le().next((function(n){return n.setMessageStatusToRead(e,t)}))]}))}))},setMessageReceivedStatus:Zi,setMessageReceivedStatusInfo:function(e,t){return de(this,void 0,void 0,(function(){var n=this;return fe(this,(function(i){return F()?[2,new R(he.A_E_SET_MESSAGE_SENT_STATUS_INFO_T,he.A_E_SET_MESSAGE_SENT_STATUS_INFO_R).validate("messageId",e,o.NUMBER,!0).validate("receivedStatusInfo",t,o.OBJECT,!0).validate("receivedStatusInfo",null==t?void 0:t.isRead,o.BOOLEAN).validate("receivedStatusInfo",null==t?void 0:t.isListened,o.BOOLEAN).validate("receivedStatusInfo",null==t?void 0:t.isDownload,o.BOOLEAN).validate("receivedStatusInfo",null==t?void 0:t.isRetrieved,o.BOOLEAN).ifReady((function(i,r){return de(n,void 0,void 0,(function(){var n,o,a;return fe(this,(function(u){switch(u.label){case 0:return n=Y(t),o=r.createTraceId(),r.info(he.A_E_SET_MESSAGE_SENT_STATUS_INFO_T,JSON.stringify({messageId:e,sentStatus:n}),o),[4,i.setMessageReceivedStatus(e,n)];case 1:return a=u.sent(),r.info(he.A_E_SET_MESSAGE_SENT_STATUS_INFO_R,JSON.stringify({code:a}),o),[2,{code:a}]}}))}))}))]:[2,{code:f.NOT_SUPPORT,msg:ye[f.NOT_SUPPORT]}]}))}))},setMessageSentStatus:function(e,t){return de(this,void 0,void 0,(function(){var n=this;return fe(this,(function(i){return F()?[2,new R(he.A_E_SET_MESSAGE_SENT_STATUS_T,he.A_E_SET_MESSAGE_SENT_STATUS_T).validate("messageId",e,o.NUMBER,!0).validate("sentStatus",t,(function(e){return b(e)&&!H(y[e])}),!0).ifReady((function(i,r){return de(n,void 0,void 0,(function(){var n,o;return fe(this,(function(a){switch(a.label){case 0:return n=r.createTraceId(),r.info(he.A_E_SET_MESSAGE_SENT_STATUS_T,JSON.stringify({messageId:e,sentStatus:t}),n),[4,i.setMessageSentStatus(e,t)];case 1:return o=a.sent(),r.info(he.A_E_SET_MESSAGE_SENT_STATUS_R,JSON.stringify({code:o}),n),[2,{code:o}]}}))}))}))]:[2,{code:f.NOT_SUPPORT,msg:ye[f.NOT_SUPPORT]}]}))}))},setMessageContent:function(e,t,n){return de(this,void 0,void 0,(function(){return fe(this,(function(i){return[2,Le().next((function(i){return i.setMessageContent(e,t,n)}))]}))}))},deleteMessages:function(e){return de(this,void 0,void 0,(function(){return fe(this,(function(t){return[2,Le().next((function(t){return t.deleteLocalMessages(e)}))]}))}))},clearMessages:$i,deleteMessagesByTimestamp:er,batchClearMessagesByTimestamp:function(e){return de(this,void 0,void 0,(function(){return fe(this,(function(t){return[2,Le().next((function(t){return t.batchClearLocalMessagesByTimestamp(e)}))]}))}))},insertMessage:tr,batchInsertMessage:function(e,t){return de(this,void 0,void 0,(function(){return fe(this,(function(n){return[2,Le().next((function(n){return n.batchInsertMessage(e,t)}))]}))}))},getMessageCount:function(e){return de(this,void 0,void 0,(function(){return fe(this,(function(t){return[2,Le().next((function(t){return t.getLocalMessageCount(e)}))]}))}))},setCheckDuplicateMessage:function(e){return de(this,void 0,void 0,(function(){var t=this;return fe(this,(function(n){return F()?[2,new R(he.A_E_SET_CHECK_DUPLICATE_MESSAGE_T,he.A_E_SET_CHECK_DUPLICATE_MESSAGE_R).validate("checkDuplicate",e,o.BOOLEAN).ifReady((function(n,i){return de(t,void 0,void 0,(function(){var t,r,o,a;return fe(this,(function(u){switch(u.label){case 0:return t=i.createTraceId(),i.info(he.A_E_SET_CHECK_DUPLICATE_MESSAGE_T,JSON.stringify({checkDuplicate:e}),t),[4,n.setCheckDuplicateMessage(!!e)];case 1:return r=u.sent(),o=r.code,a=r.data,i.info(he.A_E_SET_CHECK_DUPLICATE_MESSAGE_R,JSON.stringify({code:o,data:a}),t),[2,{code:o}]}}))}))}))]:[2,{code:f.NOT_SUPPORT,msg:ye[f.NOT_SUPPORT]}]}))}))},setCheckChatRoomDuplicateMessage:function(e){return de(this,void 0,void 0,(function(){return fe(this,(function(t){return[2,Le().next((function(t){return t.chatroom.setCheckChatRoomDuplicateMessage(!!e)}))]}))}))},getMessagesAroundTimestamp:function(e,t){return de(this,void 0,void 0,(function(){return fe(this,(function(n){switch(n.label){case 0:return[4,Le().next((function(n){var i=null==t?void 0:t.timestamp,r=null==t?void 0:t.beforeCount,o=null==t?void 0:t.afterCount;return n.getMessagesAroundTimestamp(e,i,r,o)}))];case 1:return[2,n.sent().trans((function(e){return e.map(Re)}))]}}))}))},getLocalMessage:rr,searchMessagesWithParams:function(e){return de(this,void 0,void 0,(function(){return fe(this,(function(t){switch(t.label){case 0:return[4,Le().next((function(t){return t.searchMessagesWithParams(e)}))];case 1:return[2,t.sent().trans((function(e){e.totalMatched;var t=e.messages;return{count:e.conditionsMatched,messages:t.map((function(e){return Re(e)}))}}))]}}))}))},setMessageSpeechToTextVisible:function(e,t){return Le().next((function(n){return n.setMessageSpeechToTextVisible(e,t)}))},deleteUltraGroupMessagesForAllChannel:function(e,t){return Le().next((function(n){return n.deleteLocalUGMessagesForAllChannel(e,t)}))},getUnreadMentionedMessages:function(e){return de(this,void 0,void 0,(function(){return fe(this,(function(t){switch(t.label){case 0:return[4,Le().next((function(t){return t.getUnreadMentionedMessages(e)}))];case 1:return[2,t.sent().trans((function(e){return e.map(Re)}))]}}))}))},clearLocalData:function(){return de(this,void 0,void 0,(function(){return fe(this,(function(e){return[2,Le().next((function(e){return e.clearLocalData()}))]}))}))},enable:function(){return F()}});function ar(e){return de(this,void 0,void 0,(function(){var t=this;return fe(this,(function(n){return[2,new R(he.A_SET_PROXY_T,he.A_SET_PROXY_R).validate("set.proxy",e,(function(t){return!!(!e||p("proxy.socksHost",e.socksHost,o.STRING,!0)&&p("proxy.socksPort",e.socksPort,o.NUMBER,!0))})).ifReady((function(n,i){return de(t,void 0,void 0,(function(){var t,r,o;return fe(this,(function(a){switch(a.label){case 0:return t=i.createTraceId(),i.info(he.A_SET_PROXY_T,JSON.stringify({socksHost:null==e?void 0:e.socksHost,socksPort:null==e?void 0:e.socksPort}),t),[4,n.setProxy(e)];case 1:return r=a.sent().code,o=r===f.SUCCESS?"info":"warn",i[o](he.A_SET_PROXY_R,JSON.stringify({code:r}),t),r===f.SUCCESS?[2,{code:r}]:[2,{code:r,msg:ye[r]}]}}))}))}))]}))}))}function ur(){return de(this,void 0,void 0,(function(){var e=this;return fe(this,(function(t){return[2,new R(he.A_GET_PROXY_T,he.A_GET_PROXY_R).ifReady((function(t,n){return de(e,void 0,void 0,(function(){var e,i,r,o;return fe(this,(function(a){switch(a.label){case 0:return e=n.createTraceId(),n.info(he.A_GET_PROXY_T,"",e),[4,t.getProxy()];case 1:return i=a.sent(),r=i.code,o=i.data,r===f.SUCCESS?(n.info(he.A_GET_PROXY_R,JSON.stringify({code:r,data:o}),e),[2,{code:r,data:o}]):(n.warn(he.A_GET_PROXY_R,JSON.stringify({code:r}),e),[2,{code:r,msg:ye[r]}])}}))}))}))]}))}))}function sr(e,t){return de(this,void 0,void 0,(function(){var n=this;return fe(this,(function(i){return[2,new R(he.A_TEST_PROXY_T,he.A_TEST_PROXY_R).validate("test.proxy",e,o.OBJECT,!0).validate("test.proxy.socksHost",null==e?void 0:e.socksHost,o.STRING,!0).validate("test.proxy.socksPort",null==e?void 0:e.socksPort,o.NUMBER,!0).ifReady((function(i,r){return de(n,void 0,void 0,(function(){var n,o,a,u;return fe(this,(function(s){switch(s.label){case 0:return n=r.createTraceId(),r.info(he.A_TEST_PROXY_T,JSON.stringify({socksHost:null==e?void 0:e.socksHost,socksPort:null==e?void 0:e.socksPort}),n),[4,i.testProxy(e,t)];case 1:return o=s.sent(),a=o.status,u=o.data,a===f.SUCCESS?[2,{code:a,msg:u}]:(r.warn(he.A_TEST_PROXY_R,JSON.stringify({status:a}),n),[2,{code:a,msg:ye[a]}])}}))}))}))]}))}))}function cr(e,t,n){return de(this,void 0,void 0,(function(){var i=this;return fe(this,(function(r){return[2,new R(he.A_SUBSCRIBE_USER_STATUS_T,he.A_SUBSCRIBE_USER_STATUS_R).validate("subscribeUserIds",e,L({maxLength:200,minLength:1,itemValidator:M}),!0).validate("subscribeType",t,(function(e){return[j.ONLINE_STATUS,j.USER_PROFILE].includes(e)}),!0).validate("expiry",n,W({min:60,max:2592e3}),!0).ifReady((function(r,o){return de(i,void 0,void 0,(function(){var i,a,u,s,c;return fe(this,(function(_){switch(_.label){case 0:return i=o.createTraceId(),o.info(he.A_SUBSCRIBE_USER_STATUS_T,JSON.stringify({userIds:e,subscribeType:t,expiry:n}),i),[4,r.subscribeUser(e,t,n)];case 1:return a=_.sent(),u=a.code,s=a.data,c=u===f.SUCCESS?"info":"warn",o[c](he.A_SUBSCRIBE_USER_STATUS_R,JSON.stringify({code:u,data:s}),i),[2,{code:u,data:s}]}}))}))}))]}))}))}function _r(e,t){return de(this,void 0,void 0,(function(){var n=this;return fe(this,(function(i){return[2,new R(he.A_UNSUBSCRIBE_USER_STATUS_T,he.A_UNSUBSCRIBE_USER_STATUS_R).validate("subscribeUserIds",e,L({maxLength:200,minLength:1,itemValidator:M}),!0).validate("subscribeType",t,(function(e){return[j.ONLINE_STATUS,j.USER_PROFILE].includes(e)}),!0).ifReady((function(i,r){return de(n,void 0,void 0,(function(){var n,o,a;return fe(this,(function(u){switch(u.label){case 0:return n=r.createTraceId(),r.info(he.A_UNSUBSCRIBE_USER_STATUS_T,JSON.stringify({userIds:e,subscribeType:t}),n),[4,i.unSubscribeUser(e,t)];case 1:return o=u.sent().code,a=o===f.SUCCESS?"info":"warn",r[a](he.A_UNSUBSCRIBE_USER_STATUS_R,JSON.stringify({code:o}),n),[2,{code:o}]}}))}))}))]}))}))}function dr(e,t,n){return de(this,void 0,void 0,(function(){var i=this;return fe(this,(function(r){return[2,new R(he.A_GET_SUBSCRIBE_USER_STATUS_LIST_T,he.A_GET_SUBSCRIBE_USER_STATUS_LIST_R).validate("subscribeType",e,(function(e){return[j.ONLINE_STATUS,j.USER_PROFILE].includes(e)}),!0).validate("subscribePageSize",t,W({min:1,max:200}),!0).validate("offset",n,W({min:0}),!0).ifReady((function(r,o){return de(i,void 0,void 0,(function(){var i,a,u,s,c;return fe(this,(function(_){switch(_.label){case 0:return i=o.createTraceId(),o.info(he.A_GET_SUBSCRIBE_USER_STATUS_LIST_T,JSON.stringify({pageSize:t,offset:n}),i),[4,r.getSubscribeUserList(e,t,n)];case 1:return a=_.sent(),u=a.code,s=a.data,c=u===f.SUCCESS?"info":"warn",o[c](he.A_GET_SUBSCRIBE_USER_STATUS_LIST_R,JSON.stringify({code:u,data:s}),i),u===f.SUCCESS?[2,{code:u,data:s}]:[2,{code:u}]}}))}))}))]}))}))}function fr(e,t){return de(this,void 0,void 0,(function(){return fe(this,(function(n){return[2,Le().next((function(n){return n.getSubscribeUserStatus(e,t)}))]}))}))}function lr(e){var t=this;return new R(he.A_UPDATE_MY_USER_PROFILE_T,he.A_UPDATE_MY_USER_PROFILE_R).validate("profile",e,o.OBJECT,!0).validate("profile",e.name,o.ONLY_STRING).validate("profile",e.portraitUri,o.ONLY_STRING).validate("profile",e.email,o.ONLY_STRING).validate("profile",e.birthday,o.ONLY_STRING).validate("profile",e.gender,o.NUMBER).validate("profile",e.location,o.ONLY_STRING).validate("profile",e.role,o.NUMBER).validate("profile",e.level,o.NUMBER).validate("profile",e.extraProfile,o.OBJECT).validate("profile",e.extraProfile,(function(e){for(var t in e)if(Object.prototype.hasOwnProperty.call(e,t)&&"string"!=typeof e[t])return!1;return!0})).ifReady((function(n,i){return de(t,void 0,void 0,(function(){var t,r,o,a,u,s,c;return fe(this,(function(_){switch(_.label){case 0:return t=i.createTraceId(),i.info(he.A_UPDATE_MY_USER_PROFILE_T,JSON.stringify({profile:e}),t),r=e.extraProfile,o={},["name","portraitUri","email","birthday","gender","location","role","level"].forEach((function(t){H(e[t])||(o[t]=e[t])})),H(r)||(o.extraProfile=_e({},r)),[4,n.updateMyUserProfile(o)];case 1:return a=_.sent(),u=a.code,s=a.data,c=u===f.SUCCESS?"info":"warn",i[c](he.A_UPDATE_MY_USER_PROFILE_R,JSON.stringify({code:u,data:s}),t),[2,{code:u,data:s}]}}))}))}))}function Er(e){return Le().next((function(t){return t.getUserProfiles(e)}))}function Rr(){var e=this;return new R(he.A_GET_MY_USER_PROFILE_T,he.A_GET_MY_USER_PROFILE_R).ifReady((function(t,n){return de(e,void 0,void 0,(function(){var e,i,r,o,a;return fe(this,(function(u){switch(u.label){case 0:return e=n.createTraceId(),n.info(he.A_GET_MY_USER_PROFILE_T,"",e),[4,t.getMyUserProfile()];case 1:return i=u.sent(),r=i.code,o=i.data,a=r===f.SUCCESS?"info":"warn",n[a](he.A_GET_MY_USER_PROFILE_R,JSON.stringify({code:r,data:o}),e),[2,{code:r,data:o}]}}))}))}))}function Ar(e){var t=this;return new R(he.A_UPDATE_MY_USER_PROFILE_VISIBILITY_T,he.A_UPDATE_MY_USER_PROFILE_VISIBILITY_R).validate("userProfileVisibility",e,(function(e){return k({value:e,type:K})}),!0).ifReady((function(n,i){return de(t,void 0,void 0,(function(){var t,r,o,a,u;return fe(this,(function(s){switch(s.label){case 0:return t=i.createTraceId(),i.info(he.A_UPDATE_MY_USER_PROFILE_VISIBILITY_T,e,t),[4,n.updateMyUserProfileVisibility(e)];case 1:return r=s.sent(),o=r.code,a=r.data,u=o===f.SUCCESS?"info":"warn",i[u](he.A_UPDATE_MY_USER_PROFILE_VISIBILITY_R,JSON.stringify({code:o,data:a}),t),[2,{code:o,data:a}]}}))}))}))}function Sr(){var e=this;return new R(he.A_GET_MY_USER_PROFILE_VISIBILITY_T,he.A_GET_MY_USER_PROFILE_VISIBILITY_R).ifReady((function(t,n){return de(e,void 0,void 0,(function(){var e,i,r,o,a;return fe(this,(function(u){switch(u.label){case 0:return e=n.createTraceId(),n.info(he.A_GET_MY_USER_PROFILE_VISIBILITY_T,"",e),[4,t.getMyUserProfileVisibility()];case 1:return i=u.sent(),r=i.code,o=i.data,a=r===f.SUCCESS?"info":"warn",n[a](he.A_GET_MY_USER_PROFILE_VISIBILITY_R,JSON.stringify({code:r,data:o}),e),[2,{code:r,data:o}]}}))}))}))}function Tr(e){var t=this;return new R(he.A_SEARCH_USER_PROFILE_BY_UNIQUE_ID_T,he.A_SEARCH_USER_PROFILE_BY_UNIQUE_ID_R).validate("uniqueId",e,o.STRING,!0).ifReady((function(n,i){return de(t,void 0,void 0,(function(){var t,r,o,a,u;return fe(this,(function(s){switch(s.label){case 0:return t=i.createTraceId(),i.info(he.A_SEARCH_USER_PROFILE_BY_UNIQUE_ID_T,e,t),[4,n.searchUserProfileByUniqueId(e)];case 1:return r=s.sent(),o=r.code,a=r.data,u=o===f.SUCCESS?"info":"warn",i[u](he.A_SEARCH_USER_PROFILE_BY_UNIQUE_ID_R,JSON.stringify({code:o,data:a}),t),[2,{code:o,data:a}]}}))}))}))}function Ir(e){return Le().next((function(t){return t.getSubscribeUsersOnlineStatus(e)}))}var vr=function(e){var t=e.count,n=e.pageToken,i=void 0===n?"":n,r=e.order;return{count:t,pageToken:i,order:void 0!==r&&r}};function hr(e,t){return de(this,void 0,void 0,(function(){var n=this;return fe(this,(function(i){return[2,new R(he.A_CREATE_GROUP_T,he.A_CREATE_GROUP_R).validateParameters("groupId",e.groupId,Q,f.INVALID_PARAMETER_GROUP_ID,!0).validateParameters("groupName",e.groupName,X({isTrim:!0,minLength:1,maxLength:64}),f.INVALID_PARAMETER_GROUP_NAME,!0).validateParameters("groupInfo.portraitUri",null==e?void 0:e.portraitUri,o.ONLY_STRING,f.INVALID_PARAMETER_GROUP_INFO).validateParameters("groupInfo.introduction",null==e?void 0:e.introduction,o.ONLY_STRING,f.INVALID_PARAMETER_GROUP_INFO).validateParameters("groupInfo.notice",null==e?void 0:e.notice,o.ONLY_STRING,f.INVALID_PARAMETER_GROUP_INFO).validateParameters("groupInfo.extProfile",null==e?void 0:e.extProfile,o.OBJECT,f.INVALID_PARAMETER_GROUP_INFO).validateParameters("groupInfo.extProfile",null==e?void 0:e.extProfile,(function(e){for(var t in e)if("string"!=typeof e[t])return!1;return!0}),f.INVALID_PARAMETER_GROUP_INFO).validateParameters("groupInfo.joinPermission",null==e?void 0:e.joinPermission,(function(e){return k({value:e,type:z})}),f.INVALID_PARAMETER_GROUP_INFO).validateParameters("groupInfo.removeMemberPermission",null==e?void 0:e.removeMemberPermission,(function(e){return k({value:e,type:q})}),f.INVALID_PARAMETER_GROUP_INFO).validateParameters("groupInfo.invitePermission",null==e?void 0:e.invitePermission,(function(e){return k({value:e,type:q})}),f.INVALID_PARAMETER_GROUP_INFO).validateParameters("groupInfo.inviteHandlePermission",null==e?void 0:e.inviteHandlePermission,(function(e){return k({value:e,type:Z})}),f.INVALID_PARAMETER_GROUP_INFO).validateParameters("groupInfo.groupInfoEditPermission",null==e?void 0:e.groupInfoEditPermission,(function(e){return k({value:e,type:q})}),f.INVALID_PARAMETER_GROUP_INFO).validateParameters("groupInfo.memberInfoEditPermission",null==e?void 0:e.memberInfoEditPermission,(function(e){return k({value:e,type:$})}),f.INVALID_PARAMETER_GROUP_INFO).validateParameters("inviteeUserIds",t,L({minLength:0,maxLength:30,itemValidator:M}),f.INVALID_PARAMETER_USERIDLIST).ifReady((function(i,r){return de(n,void 0,void 0,(function(){var n,o,a,u,s,c,_,d,l,E,R;return fe(this,(function(A){switch(A.label){case 0:return n=r.createTraceId(),r.info(he.A_CREATE_GROUP_T,JSON.stringify({groupInfo:e,inviteeUserIds:t}),n),o=e.groupId,a=e.extProfile,u={},s=Object.keys(Ie),Object.keys(e).forEach((function(t){s.includes(t)&&(u[Ie[t]]=e[t])})),[4,i.createGroup(o,u,a,t)];case 1:return c=A.sent(),_=c.code,d=c.msg,l=void 0===d?"":d,E=c.data,R=_===f.SUCCESS?"info":"warn",r[R](he.A_CREATE_GROUP_R,JSON.stringify({code:_}),n),_!==f.SUCCESS?[2,{code:_,msg:l,data:E}]:[2,{code:_,data:E}]}}))}))}))]}))}))}function Or(e){return de(this,void 0,void 0,(function(){var t=this;return fe(this,(function(n){return[2,new R(he.A_UPDATE_GROUP_INFO_T,he.A_UPDATE_GROUP_INFO_R).validateParameters("groupId",e.groupId,M,f.INVALID_PARAMETER_GROUP_ID,!0).validateParameters("groupName",e.groupName,X({isTrim:!0,maxLength:64}),f.INVALID_PARAMETER_GROUP_NAME).validateParameters("groupInfo.portraitUri",null==e?void 0:e.portraitUri,o.ONLY_STRING,f.INVALID_PARAMETER_GROUP_INFO).validateParameters("groupInfo.introduction",null==e?void 0:e.introduction,o.ONLY_STRING,f.INVALID_PARAMETER_GROUP_INFO).validateParameters("groupInfo.notice",null==e?void 0:e.notice,o.ONLY_STRING,f.INVALID_PARAMETER_GROUP_INFO).validateParameters("groupInfo.extProfile",null==e?void 0:e.extProfile,o.OBJECT,f.INVALID_PARAMETER_GROUP_INFO).validateParameters("groupInfo.extProfile",null==e?void 0:e.extProfile,(function(e){for(var t in e)if("string"!=typeof e[t])return!1;return!0}),f.INVALID_PARAMETER_GROUP_INFO).validateParameters("groupInfo.joinPermission",null==e?void 0:e.joinPermission,(function(e){return k({value:e,type:z})}),f.INVALID_PARAMETER_GROUP_INFO).validateParameters("groupInfo.removeMemberPermission",null==e?void 0:e.removeMemberPermission,(function(e){return k({value:e,type:q})}),f.INVALID_PARAMETER_GROUP_INFO).validateParameters("groupInfo.invitePermission",null==e?void 0:e.invitePermission,(function(e){return k({value:e,type:q})}),f.INVALID_PARAMETER_GROUP_INFO).validateParameters("groupInfo.inviteHandlePermission",null==e?void 0:e.inviteHandlePermission,(function(e){return k({value:e,type:Z})}),f.INVALID_PARAMETER_GROUP_INFO).validateParameters("groupInfo.groupInfoEditPermission",null==e?void 0:e.groupInfoEditPermission,(function(e){return k({value:e,type:q})}),f.INVALID_PARAMETER_GROUP_INFO).validateParameters("groupInfo.memberInfoEditPermission",null==e?void 0:e.memberInfoEditPermission,(function(e){return k({value:e,type:$})}),f.INVALID_PARAMETER_GROUP_INFO).ifReady((function(n,i){return de(t,void 0,void 0,(function(){var t,r,o,a,u,s,c,_,d,l,E;return fe(this,(function(R){switch(R.label){case 0:return t=i.createTraceId(),i.info(he.A_UPDATE_GROUP_INFO_T,JSON.stringify({groupInfo:e}),t),r=e.groupId,o=e.extProfile,a={},u=Object.keys(Ie),Object.keys(e).forEach((function(t){u.includes(t)&&(a[Ie[t]]=e[t])})),[4,n.updateGroupInfo(r,a,o)];case 1:return s=R.sent(),c=s.code,_=s.msg,d=void 0===_?"":_,l=s.data,E=c===f.SUCCESS?"info":"warn",i[E](he.A_UPDATE_GROUP_INFO_R,JSON.stringify({code:c}),t),c!==f.SUCCESS?[2,{code:c,msg:d,data:l}]:[2,{code:c}]}}))}))}))]}))}))}function Nr(e){return de(this,void 0,void 0,(function(){var t=this;return fe(this,(function(n){return[2,new R(he.A_GET_GROUPS_INFO_T,he.A_GET_GROUPS_INFO_R).validateParameters("groupIds",e,L({minLength:1,maxLength:20,itemValidator:M}),f.INVALID_PARAMETER_GROUP_IDS,!0).ifReady((function(n,i){return de(t,void 0,void 0,(function(){var t,r,o,a,u;return fe(this,(function(s){switch(s.label){case 0:return t=i.createTraceId(),i.info(he.A_GET_GROUPS_INFO_T,JSON.stringify({groupIds:e}),t),[4,n.getGroupsInfo(e)];case 1:return r=s.sent(),o=r.code,a=r.data,u=o===f.SUCCESS?"info":"warn",i[u](he.A_GET_GROUPS_INFO_R,JSON.stringify({code:o,data:a}),t),o!==f.SUCCESS?[2,{code:o}]:[2,{code:o,data:a}]}}))}))}))]}))}))}function gr(e,t,n){return void 0===n&&(n={removeMuteStatus:!0,removeWhiteList:!0,removeFollow:!0}),de(this,void 0,void 0,(function(){var i=this;return fe(this,(function(r){return[2,new R(he.A_KICK_GROUP_MEMBERS_T,he.A_KICK_GROUP_MEMBERS_R).validateParameters("groupId",e,M,f.INVALID_PARAMETER_GROUP_ID,!0).validateParameters("userIds",t,L({minLength:1,maxLength:100,itemValidator:M}),f.INVALID_PARAMETER_USERIDLIST,!0).ifReady((function(r,o){return de(i,void 0,void 0,(function(){var i,a,u;return fe(this,(function(s){switch(s.label){case 0:return i=o.createTraceId(),o.info(he.A_KICK_GROUP_MEMBERS_T,JSON.stringify({groupId:e,userIds:t,config:n}),i),[4,r.kickGroupMembers(e,t,n)];case 1:return a=s.sent().code,u=a===f.SUCCESS?"info":"warn",o[u](he.A_KICK_GROUP_MEMBERS_R,JSON.stringify({code:a}),i),[2,{code:a}]}}))}))}))]}))}))}function mr(e,t){return void 0===t&&(t={removeMuteStatus:!0,removeWhiteList:!0,removeFollow:!0}),de(this,void 0,void 0,(function(){var n=this;return fe(this,(function(i){return[2,new R(he.A_QUIT_GROUP_T,he.A_QUIT_GROUP_R).validateParameters("groupId",e,M,f.INVALID_PARAMETER_GROUP_ID,!0).ifReady((function(i,r){return de(n,void 0,void 0,(function(){var n,o,a;return fe(this,(function(u){switch(u.label){case 0:return n=r.createTraceId(),r.info(he.A_QUIT_GROUP_T,JSON.stringify({groupId:e,config:t}),n),[4,i.quitGroup(e,t)];case 1:return o=u.sent().code,a=o===f.SUCCESS?"info":"warn",r[a](he.A_QUIT_GROUP_R,JSON.stringify({code:o}),n),[2,{code:o}]}}))}))}))]}))}))}function Pr(e){return de(this,void 0,void 0,(function(){var t=this;return fe(this,(function(n){return[2,new R(he.A_DISMISS_GROUP_T,he.A_DISMISS_GROUP_R).validateParameters("groupId",e,M,f.INVALID_PARAMETER_GROUP_ID,!0).ifReady((function(n,i){return de(t,void 0,void 0,(function(){var t,r,o;return fe(this,(function(a){switch(a.label){case 0:return t=i.createTraceId(),i.info(he.A_DISMISS_GROUP_T,JSON.stringify({groupId:e}),t),[4,n.dismissGroup(e)];case 1:return r=a.sent().code,o=r===f.SUCCESS?"info":"warn",i[o](he.A_DISMISS_GROUP_R,JSON.stringify({code:r}),t),[2,{code:r}]}}))}))}))]}))}))}function pr(e,t,n,i){return void 0===n&&(n=!1),void 0===i&&(i={removeMuteStatus:!0,removeWhiteList:!0,removeFollow:!0}),de(this,void 0,void 0,(function(){var r=this;return fe(this,(function(o){return[2,new R(he.A_TRANSFER_GROUP_OWNER_T,he.A_TRANSFER_GROUP_OWNER_R).validateParameters("groupId",e,M,f.INVALID_PARAMETER_GROUP_ID,!0).validateParameters("newOwnerId",t,M,f.INVALID_PARAMETER_USER_ID,!0).ifReady((function(o,a){return de(r,void 0,void 0,(function(){var r,u,s;return fe(this,(function(c){switch(c.label){case 0:return r=a.createTraceId(),a.info(he.A_TRANSFER_GROUP_OWNER_T,JSON.stringify({groupId:e,newOwnerId:t,quitGroup:n,config:i}),r),[4,o.transferGroupOwner(e,t,i,n)];case 1:return u=c.sent().code,s=u===f.SUCCESS?"info":"warn",a[s](he.A_TRANSFER_GROUP_OWNER_R,JSON.stringify({code:u}),r),[2,{code:u}]}}))}))}))]}))}))}function Ur(e,t){return de(this,void 0,void 0,(function(){var n=this;return fe(this,(function(i){return[2,new R(he.A_ADD_GROUP_MANAGERS_T,he.A_ADD_GROUP_MANAGERS_R).validateParameters("groupId",e,M,f.INVALID_PARAMETER_GROUP_ID,!0).validateParameters("userIds",t,L({minLength:1,maxLength:10,itemValidator:M}),f.INVALID_PARAMETER_USERIDLIST,!0).ifReady((function(i,r){return de(n,void 0,void 0,(function(){var n,o,a;return fe(this,(function(u){switch(u.label){case 0:return n=r.createTraceId(),r.info(he.A_ADD_GROUP_MANAGERS_T,JSON.stringify({groupId:e,userIds:t}),n),[4,i.setGroupManagers(1,e,t)];case 1:return o=u.sent().code,a=o===f.SUCCESS?"info":"warn",r[a](he.A_ADD_GROUP_MANAGERS_R,JSON.stringify({code:o}),n),[2,{code:o}]}}))}))}))]}))}))}function Cr(e,t){return de(this,void 0,void 0,(function(){var n=this;return fe(this,(function(i){return[2,new R(he.A_REMOVE_GROUP_MANAGERS_T,he.A_REMOVE_GROUP_MANAGERS_R).validateParameters("groupId",e,M,f.INVALID_PARAMETER_GROUP_ID,!0).validateParameters("userIds",t,L({minLength:1,maxLength:10,itemValidator:M}),f.INVALID_PARAMETER_USERIDLIST,!0).ifReady((function(i,r){return de(n,void 0,void 0,(function(){var n,o,a;return fe(this,(function(u){switch(u.label){case 0:return n=r.createTraceId(),r.info(he.A_REMOVE_GROUP_MANAGERS_T,JSON.stringify({groupId:e,userIds:t}),n),[4,i.setGroupManagers(2,e,t)];case 1:return o=u.sent().code,a=o===f.SUCCESS?"info":"warn",r[a](he.A_REMOVE_GROUP_MANAGERS_R,JSON.stringify({code:o}),n),[2,{code:o}]}}))}))}))]}))}))}function Mr(e,t,n){return de(this,void 0,void 0,(function(){var i=this;return fe(this,(function(r){return[2,new R(he.A_GET_GROUP_MEMBERS_BY_ROLES_T,he.A_GET_GROUP_MEMBERS_BY_ROLES_R).validateParameters("groupId",e,M,f.INVALID_PARAMETER_GROUP_ID,!0).validateParameters("role",t,(function(e){return k({value:e,type:ee})}),f.INVALID_PARAMETER_GROUP_MEMBER_ROLE,!0).validateParameters("option",n,o.OBJECT,f.INVALID_PARAMETER_PAGING_QUERY_OPTION,!0).validateParameters("option.count",n.count,W({min:1,max:100}),f.INVALID_PARAMETER_COUNT,!0).validateParameters("option.pageToken",null==n?void 0:n.pageToken,o.ONLY_STRING,f.INVALID_PARAMETER_PAGING_QUERY_OPTION).validateParameters("option.order",null==n?void 0:n.order,o.BOOLEAN,f.INVALID_PARAMETER_PAGING_QUERY_OPTION).ifReady((function(r,o){return de(i,void 0,void 0,(function(){var i,a,u,s,c;return fe(this,(function(_){switch(_.label){case 0:return i=o.createTraceId(),o.info(he.A_GET_GROUP_MEMBERS_BY_ROLES_T,JSON.stringify({groupId:e,role:t,option:n,formatOption:vr(n)}),i),[4,r.getGroupMembersByRole(e,t,vr(n))];case 1:return a=_.sent(),u=a.code,s=a.data,c=u===f.SUCCESS?"info":"warn",o[c](he.A_GET_GROUP_MEMBERS_BY_ROLES_R,JSON.stringify({code:u,data:s}),i),u!==f.SUCCESS?[2,{code:u}]:[2,{code:u,data:s}]}}))}))}))]}))}))}function Lr(e,t){return de(this,void 0,void 0,(function(){var n=this;return fe(this,(function(i){return[2,new R(he.A_GET_GROUP_MEMBERS_T,he.A_GET_GROUP_MEMBERS_R).validateParameters("groupId",e,M,f.INVALID_PARAMETER_GROUP_ID,!0).validateParameters("userIds",t,L({minLength:1,maxLength:100,itemValidator:M}),f.INVALID_PARAMETER_USERIDLIST,!0).ifReady((function(i,r){return de(n,void 0,void 0,(function(){var n,o,a,u,s;return fe(this,(function(c){switch(c.label){case 0:return n=r.createTraceId(),r.info(he.A_GET_GROUP_MEMBERS_T,JSON.stringify({groupId:e,userIds:t}),n),[4,i.getGroupMembers(e,t)];case 1:return o=c.sent(),a=o.code,u=o.data,s=a===f.SUCCESS?"info":"warn",r[s](he.A_GET_GROUP_MEMBERS_R,JSON.stringify({code:a,data:u}),n),a!==f.SUCCESS?[2,{code:a}]:[2,{code:a,data:u}]}}))}))}))]}))}))}function Dr(e,t,n,i){return de(this,void 0,void 0,(function(){var r=this;return fe(this,(function(o){return[2,new R(he.A_SET_GROUP_MEMBER_INFO_T,he.A_SET_GROUP_MEMBER_INFO_R).validateParameters("groupId",e,M,f.INVALID_PARAMETER_GROUP_ID,!0).validateParameters("userId",t,M,f.INVALID_PARAMETER_USER_ID,!0).validateParameters("nickname",n,X({isTrim:!0,maxLength:64}),f.INVALID_PARAMETER_NICK_NAME,!0).validateParameters("extra",i,X({maxLength:128}),f.INVALID_PARAMETER_EXTRA).ifReady((function(o,a){return de(r,void 0,void 0,(function(){var r,u,s,c,_;return fe(this,(function(d){switch(d.label){case 0:return r=a.createTraceId(),a.info(he.A_SET_GROUP_MEMBER_INFO_T,JSON.stringify({groupId:e,userId:t,nickname:n,extra:i}),r),[4,o.setGroupMemberInfo(e,t,n,i)];case 1:return u=d.sent(),s=u.code,c=u.data,_=s===f.SUCCESS?"info":"warn",a[_](he.A_SET_GROUP_MEMBER_INFO_R,JSON.stringify({code:s}),r),s===f.SUCCESS?[2,{code:s}]:[2,{code:s,data:c}]}}))}))}))]}))}))}function Gr(e,t,n){return de(this,void 0,void 0,(function(){var i=this;return fe(this,(function(r){return[2,new R(he.A_SEARCH_GROUP_MEMBERS_T,he.A_SEARCH_GROUP_MEMBERS_R).validateParameters("groupId",e,M,f.INVALID_PARAMETER_GROUP_ID,!0).validateParameters("name",t,X({isTrim:!0,minLength:1,maxLength:64}),f.INVALID_PARAMETER_NICK_NAME,!0).validateParameters("option",n,o.OBJECT,f.INVALID_PARAMETER_PAGING_QUERY_OPTION,!0).validateParameters("option.count",n.count,W({min:1,max:200}),f.INVALID_PARAMETER_COUNT,!0).validateParameters("option.pageToken",null==n?void 0:n.pageToken,o.ONLY_STRING,f.INVALID_PARAMETER_PAGING_QUERY_OPTION).validateParameters("option.order",null==n?void 0:n.order,o.BOOLEAN,f.INVALID_PARAMETER_PAGING_QUERY_OPTION).ifReady((function(r,o){return de(i,void 0,void 0,(function(){var i,a,u,s,c;return fe(this,(function(_){switch(_.label){case 0:return i=o.createTraceId(),o.info(he.A_SEARCH_GROUP_MEMBERS_T,JSON.stringify({groupId:e,name:t,option:n,formatOption:vr(n)}),i),[4,r.searchGroupMembers(e,t,vr(n))];case 1:return a=_.sent(),u=a.code,s=a.data,c=u===f.SUCCESS?"info":"warn",o[c](he.A_SEARCH_GROUP_MEMBERS_R,JSON.stringify({code:u,data:s}),i),u!==f.SUCCESS?[2,{code:u}]:[2,{code:u,data:s}]}}))}))}))]}))}))}function yr(e){return de(this,void 0,void 0,(function(){var t=this;return fe(this,(function(n){return[2,new R(he.A_JOIN_GROUP_T,he.A_JOIN_GROUP_R).validateParameters("groupId",e,M,f.INVALID_PARAMETER_GROUP_ID,!0).ifReady((function(n,i){return de(t,void 0,void 0,(function(){var t,r,o,a,u;return fe(this,(function(s){switch(s.label){case 0:return t=i.createTraceId(),i.info(he.A_JOIN_GROUP_T,JSON.stringify({groupId:e}),t),[4,n.joinGroup(e)];case 1:return r=s.sent(),o=r.code,a=r.data,u=o===f.SUCCESS?"info":"warn",i[u](he.A_JOIN_GROUP_R,JSON.stringify({code:o}),t),o!==f.SUCCESS?[2,{code:o}]:[2,{code:o,data:a}]}}))}))}))]}))}))}function br(e,t){return de(this,void 0,void 0,(function(){var n=this;return fe(this,(function(i){return[2,new R(he.A_INVITE_USERS_TO_GROUP_T,he.A_INVITE_USERS_TO_GROUP_R).validateParameters("groupId",e,M,f.INVALID_PARAMETER_GROUP_ID,!0).validateParameters("userIds",t,L({minLength:1,maxLength:30,itemValidator:M}),f.INVALID_PARAMETER_USERIDLIST).ifReady((function(i,r){return de(n,void 0,void 0,(function(){var n,o,a,u,s;return fe(this,(function(c){switch(c.label){case 0:return n=r.createTraceId(),r.info(he.A_INVITE_USERS_TO_GROUP_T,JSON.stringify({groupId:e,userIds:t}),n),[4,i.inviteUsersToGroup(e,t)];case 1:return o=c.sent(),a=o.code,u=o.data,s=a===f.SUCCESS?"info":"warn",r[s](he.A_INVITE_USERS_TO_GROUP_R,JSON.stringify({code:a}),n),a!==f.SUCCESS?[2,{code:a}]:[2,{code:a,data:u}]}}))}))}))]}))}))}function wr(e,t){return de(this,void 0,void 0,(function(){var n=this;return fe(this,(function(i){return[2,new R(he.A_ACCEPT_GROUP_INVITE_T,he.A_ACCEPT_GROUP_INVITE_R).validateParameters("groupId",e,M,f.INVALID_PARAMETER_GROUP_ID,!0).validateParameters("inviterId",t,M,f.INVALID_PARAMETER_USER_ID,!0).ifReady((function(i,r){return de(n,void 0,void 0,(function(){var n,o,a;return fe(this,(function(u){switch(u.label){case 0:return n=r.createTraceId(),r.info(he.A_ACCEPT_GROUP_INVITE_T,JSON.stringify({groupId:e,inviterId:t}),n),[4,i.acceptGroupInvite(e,t)];case 1:return o=u.sent().code,a=o===f.SUCCESS?"info":"warn",r[a](he.A_ACCEPT_GROUP_INVITE_R,JSON.stringify({code:o}),n),[2,{code:o}]}}))}))}))]}))}))}function Fr(e,t,n){return de(this,void 0,void 0,(function(){var i=this;return fe(this,(function(r){return[2,new R(he.A_REFUSE_GROUP_INVITE_T,he.A_REFUSE_GROUP_INVITE_R).validateParameters("groupId",e,M,f.INVALID_PARAMETER_GROUP_ID,!0).validateParameters("inviterId",t,M,f.INVALID_PARAMETER_USER_ID,!0).validateParameters("reason",n,X({maxLength:128}),f.INVALID_PARAMETER_REASON).ifReady((function(r,o){return de(i,void 0,void 0,(function(){var i,a,u;return fe(this,(function(s){switch(s.label){case 0:return i=o.createTraceId(),o.info(he.A_REFUSE_GROUP_INVITE_T,JSON.stringify({groupId:e,inviterId:t,reason:n}),i),[4,r.refuseGroupInvite(e,t,null!=n?n:"")];case 1:return a=s.sent().code,u=a===f.SUCCESS?"info":"warn",o[u](he.A_REFUSE_GROUP_INVITE_R,JSON.stringify({code:a}),i),[2,{code:a}]}}))}))}))]}))}))}function xr(e,t,n){return de(this,void 0,void 0,(function(){var i=this;return fe(this,(function(r){return[2,new R(he.A_ACCEPT_GROUP_APPLICATION_T,he.A_ACCEPT_GROUP_APPLICATION_R).validateParameters("groupId",e,M,f.INVALID_PARAMETER_GROUP_ID,!0).validateParameters("applicantId",t,M,f.INVALID_PARAMETER_USER_ID,!0).validateParameters("inviterId",n,M,f.INVALID_PARAMETER_USER_ID).ifReady((function(r,o){return de(i,void 0,void 0,(function(){var i,a,u,s,c;return fe(this,(function(_){switch(_.label){case 0:return i=o.createTraceId(),o.info(he.A_ACCEPT_GROUP_APPLICATION_T,JSON.stringify({groupId:e,inviterId:n,applicantId:t}),i),[4,r.acceptGroupApplication(e,t,null!=n?n:"")];case 1:return a=_.sent(),u=a.code,s=a.data,c=u===f.SUCCESS?"info":"warn",o[c](he.A_ACCEPT_GROUP_APPLICATION_R,JSON.stringify({code:u}),i),u!==f.SUCCESS?[2,{code:u}]:[2,{code:u,data:s}]}}))}))}))]}))}))}function Br(e,t,n,i){return de(this,void 0,void 0,(function(){var r=this;return fe(this,(function(o){return[2,new R(he.A_REFUSE_GROUP_APPLICATION_T,he.A_REFUSE_GROUP_APPLICATION_R).validateParameters("groupId",e,M,f.INVALID_PARAMETER_GROUP_ID,!0).validateParameters("applicantId",t,M,f.INVALID_PARAMETER_USER_ID,!0).validateParameters("inviterId",n,M,f.INVALID_PARAMETER_USER_ID).validateParameters("reason",i,X({maxLength:128}),f.INVALID_PARAMETER_REASON).ifReady((function(o,a){return de(r,void 0,void 0,(function(){var r,u,s;return fe(this,(function(c){switch(c.label){case 0:return r=a.createTraceId(),a.info(he.A_REFUSE_GROUP_APPLICATION_T,JSON.stringify({groupId:e,applicantId:t,reason:i}),r),[4,o.refuseGroupApplication(e,t,null!=n?n:"",null!=i?i:"")];case 1:return u=c.sent().code,s=u===f.SUCCESS?"info":"warn",a[s](he.A_REFUSE_GROUP_APPLICATION_R,JSON.stringify({code:u}),r),[2,{code:u}]}}))}))}))]}))}))}function Vr(e,t,n){return de(this,void 0,void 0,(function(){var i=this;return fe(this,(function(r){return[2,new R(he.A_GET_GROUP_APPLICATIONS_T,he.A_GET_GROUP_APPLICATIONS_R).validateParameters("option",e,o.OBJECT,f.INVALID_PARAMETER_PAGING_QUERY_OPTION,!0).validateParameters("option.count",e.count,W({min:1,max:200}),f.INVALID_PARAMETER_COUNT,!0).validateParameters("option.pageToken",null==e?void 0:e.pageToken,o.ONLY_STRING,f.INVALID_PARAMETER_PAGING_QUERY_OPTION).validateParameters("option.order",null==e?void 0:e.order,o.BOOLEAN,f.INVALID_PARAMETER_PAGING_QUERY_OPTION).validateParameters("directions",t,L({minLength:1,itemValidator:function(e){return k({value:e,type:te})}}),f.INVALID_PARAMETER_GROUP_APPLICATION_DIRECTION,F()).validateParameters("status",n,L({minLength:1,itemValidator:function(e){return k({value:e,type:ne})}}),f.INVALID_PARAMETER_GROUP_APPLICATION_STATUS,F()).ifReady((function(r,o){return de(i,void 0,void 0,(function(){var i,a,u,s,c;return fe(this,(function(_){switch(_.label){case 0:return i=o.createTraceId(),o.info(he.A_GET_GROUP_APPLICATIONS_T,JSON.stringify({status:n,option:e,formatOption:vr(e)}),i),[4,r.getGroupApplications(vr(e),t,n)];case 1:return a=_.sent(),u=a.code,s=a.data,c=u===f.SUCCESS?"info":"warn",o[c](he.A_GET_GROUP_APPLICATIONS_R,JSON.stringify({code:u,data:s}),i),u!==f.SUCCESS?[2,{code:u}]:[2,{code:u,data:s}]}}))}))}))]}))}))}function Hr(e,t){return de(this,void 0,void 0,(function(){var n=this;return fe(this,(function(i){return[2,new R(he.A_GET_JOINED_GROUPS_BY_ROLES_T,he.A_GET_JOINED_GROUPS_BY_ROLES_R).validateParameters("option",e,o.OBJECT,f.INVALID_PARAMETER_PAGING_QUERY_OPTION,!0).validateParameters("option.count",e.count,W({min:1,max:100}),f.INVALID_PARAMETER_COUNT,!0).validateParameters("option.pageToken",null==e?void 0:e.pageToken,o.ONLY_STRING,f.INVALID_PARAMETER_PAGING_QUERY_OPTION).validateParameters("option.order",null==e?void 0:e.order,o.BOOLEAN,f.INVALID_PARAMETER_PAGING_QUERY_OPTION).validateParameters("role",t,(function(e){return k({value:e,type:ee})}),f.INVALID_PARAMETER_GROUP_MEMBER_ROLE).ifReady((function(i,r){return de(n,void 0,void 0,(function(){var n,o,a,u,s;return fe(this,(function(c){switch(c.label){case 0:return n=r.createTraceId(),r.info(he.A_GET_JOINED_GROUPS_BY_ROLES_T,JSON.stringify({role:t,option:e,formatOption:vr(e)}),n),[4,i.getJoinedGroupsByRole(t,vr(e))];case 1:return o=c.sent(),a=o.code,u=o.data,s=a===f.SUCCESS?"info":"warn",r[s](he.A_GET_JOINED_GROUPS_BY_ROLES_R,JSON.stringify({code:a,data:u}),n),a!==f.SUCCESS?[2,{code:a}]:[2,{code:a,data:u}]}}))}))}))]}))}))}function Yr(e,t){return de(this,void 0,void 0,(function(){var n=this;return fe(this,(function(i){return[2,new R(he.A_SEARCH_JOINED_GROUPS_T,he.A_SEARCH_JOINED_GROUPS_R).validateParameters("groupName",e,X({isTrim:!0,minLength:1,maxLength:64}),f.INVALID_PARAMETER_GROUP_NAME,!0).validateParameters("option",t,o.OBJECT,f.INVALID_PARAMETER_PAGING_QUERY_OPTION,!0).validateParameters("option.count",t.count,W({min:1,max:200}),f.INVALID_PARAMETER_COUNT,!0).validateParameters("option.pageToken",null==t?void 0:t.pageToken,o.ONLY_STRING,f.INVALID_PARAMETER_PAGING_QUERY_OPTION).validateParameters("option.order",null==t?void 0:t.order,o.BOOLEAN,f.INVALID_PARAMETER_PAGING_QUERY_OPTION).ifReady((function(i,r){return de(n,void 0,void 0,(function(){var n,o,a,u,s;return fe(this,(function(c){switch(c.label){case 0:return n=r.createTraceId(),r.info(he.A_SEARCH_JOINED_GROUPS_T,JSON.stringify({groupName:e,option:t,formatOption:vr(t)}),n),[4,i.searchJoinedGroups(e,vr(t))];case 1:return o=c.sent(),a=o.code,u=o.data,s=a===f.SUCCESS?"info":"warn",r[s](he.A_SEARCH_JOINED_GROUPS_R,JSON.stringify({code:a}),n),a!==f.SUCCESS?[2,{code:a}]:[2,{code:a,data:u}]}}))}))}))]}))}))}function Jr(e){return de(this,void 0,void 0,(function(){var t=this;return fe(this,(function(n){return[2,new R(he.A_GET_JOINED_GROUPS_T,he.A_GET_JOINED_GROUPS_R).validateParameters("groupIds",e,L({minLength:1,maxLength:20,itemValidator:M}),f.INVALID_PARAMETER_GROUP_IDS,!0).ifReady((function(n,i){return de(t,void 0,void 0,(function(){var t,r,o,a,u;return fe(this,(function(s){switch(s.label){case 0:return t=i.createTraceId(),i.info(he.A_GET_JOINED_GROUPS_T,JSON.stringify({groupIds:e}),t),[4,n.getJoinedGroups(e)];case 1:return r=s.sent(),o=r.code,a=r.data,u=o===f.SUCCESS?"info":"warn",i[u](he.A_GET_JOINED_GROUPS_R,JSON.stringify({code:o}),t),o!==f.SUCCESS?[2,{code:o}]:[2,{code:o,data:a}]}}))}))}))]}))}))}function kr(e,t){return de(this,void 0,void 0,(function(){var n=this;return fe(this,(function(i){return[2,new R(he.A_SET_GROUP_REMARK_T,he.A_SET_GROUP_REMARK_R).validateParameters("groupId",e,M,f.INVALID_PARAMETER_GROUP_ID,!0).validateParameters("remark",t,X({isTrim:!0,maxLength:64}),f.INVALID_PARAMETER_REMARK,!0).ifReady((function(i,r){return de(n,void 0,void 0,(function(){var n,o,a;return fe(this,(function(u){switch(u.label){case 0:return n=r.createTraceId(),r.info(he.A_SET_GROUP_REMARK_T,JSON.stringify({groupId:e,remark:t}),n),[4,i.setGroupRemark(e,t)];case 1:return o=u.sent().code,a=o===f.SUCCESS?"info":"warn",r[a](he.A_SET_GROUP_REMARK_R,JSON.stringify({code:o}),n),[2,{code:o}]}}))}))}))]}))}))}function Kr(e,t){return de(this,void 0,void 0,(function(){var n=this;return fe(this,(function(i){return[2,new R(he.A_ADD_GROUP_FOLLOWS_T,he.A_ADD_GROUP_FOLLOWS_R).validateParameters("groupId",e,M,f.INVALID_PARAMETER_GROUP_ID,!0).validateParameters("userIds",t,L({minLength:1,maxLength:100,itemValidator:M}),f.INVALID_PARAMETER_USERIDLIST,!0).ifReady((function(i,r){return de(n,void 0,void 0,(function(){var n,o,a;return fe(this,(function(u){switch(u.label){case 0:return n=r.createTraceId(),r.info(he.A_ADD_GROUP_FOLLOWS_T,JSON.stringify({groupId:e,userIds:t}),n),[4,i.addGroupFollows(e,t)];case 1:return o=u.sent().code,a=o===f.SUCCESS?"info":"warn",r[a](he.A_ADD_GROUP_FOLLOWS_R,JSON.stringify({code:o}),n),[2,{code:o}]}}))}))}))]}))}))}function jr(e,t){return de(this,void 0,void 0,(function(){var n=this;return fe(this,(function(i){return[2,new R(he.A_REMOVE_GROUP_FOLLOWS_T,he.A_REMOVE_GROUP_FOLLOWS_R).validateParameters("groupId",e,M,f.INVALID_PARAMETER_GROUP_ID,!0).validateParameters("userIds",t,L({minLength:1,maxLength:100,itemValidator:M}),f.INVALID_PARAMETER_USERIDLIST,!0).ifReady((function(i,r){return de(n,void 0,void 0,(function(){var n,o,a;return fe(this,(function(u){switch(u.label){case 0:return n=r.createTraceId(),r.info(he.A_REMOVE_GROUP_FOLLOWS_T,JSON.stringify({groupId:e,userIds:t}),n),[4,i.removeGroupFollows(e,t)];case 1:return o=u.sent().code,a=o===f.SUCCESS?"info":"warn",r[a](he.A_REMOVE_GROUP_FOLLOWS_R,JSON.stringify({code:o}),n),[2,{code:o}]}}))}))}))]}))}))}function Wr(e){return de(this,void 0,void 0,(function(){var t=this;return fe(this,(function(n){return[2,new R(he.A_GET_GROUP_FOLLOWS_T,he.A_GET_GROUP_FOLLOWS_R).validateParameters("groupId",e,M,f.INVALID_PARAMETER_GROUP_ID,!0).ifReady((function(n,i){return de(t,void 0,void 0,(function(){var t,r,o,a,u;return fe(this,(function(s){switch(s.label){case 0:return t=i.createTraceId(),i.info(he.A_GET_GROUP_FOLLOWS_T,JSON.stringify({groupId:e}),t),[4,n.getGroupFollows(e)];case 1:return r=s.sent(),o=r.code,a=r.data,u=o===f.SUCCESS?"info":"warn",i[u](he.A_GET_GROUP_FOLLOWS_R,JSON.stringify({code:o}),t),o!==f.SUCCESS?[2,{code:o}]:[2,{code:o,data:a}]}}))}))}))]}))}))}function Qr(e,t,n){var i=this;return new R(he.A_ADD_FRIEND_T,he.A_ADD_FRIEND_R).validateParameters("userId",e,M,f.INVALID_PARAMETER_USER_ID,!0).validateParameters("directionType",t,(function(e){return k({value:e,type:ie})}),f.INVALID_PARAMETER_DIRECTION_TYPE,!0).validateParameters("extra",n,X({maxLength:128}),f.INVALID_PARAMETER_EXTRA).ifReady((function(r,o){return de(i,void 0,void 0,(function(){var i,a,u;return fe(this,(function(s){switch(s.label){case 0:return o.info(he.A_ADD_FRIEND_T,JSON.stringify({userId:e,directionType:t,extra:n})),[4,r.addFriend(e,t,n||"")];case 1:return i=s.sent(),a=i.code,u=i.data,o[a===f.SUCCESS?"info":"warn"](he.A_ADD_FRIEND_R,a),a!==f.SUCCESS?[2,{code:a}]:[2,{code:a,data:u}]}}))}))}))}function Xr(e,t){var n=this;return new R(he.A_DELETE_FRIENDS_T,he.A_DELETE_FRIENDS_R).validateParameters("userIds",e,L({minLength:1,maxLength:100,itemValidator:M}),f.INVALID_PARAMETER_USERIDLIST,!0).validateParameters("directionType",t,(function(e){return k({value:e,type:ie})}),f.INVALID_PARAMETER_DIRECTION_TYPE,!0).ifReady((function(i,r){return de(n,void 0,void 0,(function(){var n;return fe(this,(function(o){switch(o.label){case 0:return r.info(he.A_DELETE_FRIENDS_T,JSON.stringify({userIds:e,directionType:t})),[4,i.deleteFriends(e,t)];case 1:return n=o.sent().code,r[n===f.SUCCESS?"info":"warn"](he.A_DELETE_FRIENDS_R,n),[2,{code:n}]}}))}))}))}function zr(e){var t=this;return new R(he.A_ACCEPT_FRIEND_APPLICATION_T,he.A_ACCEPT_FRIEND_APPLICATION_R).validateParameters("userId",e,M,f.INVALID_PARAMETER_USER_ID,!0).ifReady((function(n,i){return de(t,void 0,void 0,(function(){var t;return fe(this,(function(r){switch(r.label){case 0:return i.info(he.A_ACCEPT_FRIEND_APPLICATION_T,e),[4,n.acceptFriendApplication(e)];case 1:return t=r.sent().code,i[t===f.SUCCESS?"info":"warn"](he.A_ACCEPT_FRIEND_APPLICATION_R,t),[2,{code:t}]}}))}))}))}function qr(e){var t=this;return new R(he.A_REFUSE_FRIEND_APPLICATION_T,he.A_REFUSE_FRIEND_APPLICATION_R).validateParameters("userId",e,M,f.INVALID_PARAMETER_USER_ID,!0).ifReady((function(n,i){return de(t,void 0,void 0,(function(){var t;return fe(this,(function(r){switch(r.label){case 0:return i.info(he.A_REFUSE_FRIEND_APPLICATION_T,JSON.stringify({userId:e})),[4,n.refuseFriendApplication(e,"")];case 1:return t=r.sent().code,i[t===f.SUCCESS?"info":"warn"](he.A_REFUSE_FRIEND_APPLICATION_R,t),[2,{code:t}]}}))}))}))}function Zr(e,t,n){var i=this;return void 0===t&&(t=""),void 0===n&&(n={}),new R(he.A_SET_FRIEND_INFO_T,he.A_SET_FRIEND_INFO_R).validateParameters("userId",e,M,f.INVALID_PARAMETER_USER_ID,!0).validateParameters("remark",t,X({isTrim:!0,maxLength:64}),f.INVALID_PARAMETER_REMARK).validateParameters("extProfile",n,o.OBJECT,f.INVALID_PARAMETER_FRIEND_INFO_EXT_FIELDS).validateParameters("extProfile",n,(function(e){for(var t in e)if(!w(e[t]))return!1;return!0}),f.INVALID_PARAMETER_FRIEND_INFO_EXT_FIELDS).ifReady((function(r,o){return de(i,void 0,void 0,(function(){var i,a,u;return fe(this,(function(s){switch(s.label){case 0:return o.info(he.A_SET_FRIEND_INFO_T,JSON.stringify({userId:e,remark:t,extProfile:n})),[4,r.setFriendInfo(e,t,n)];case 1:return i=s.sent(),a=i.code,u=i.data,o[a===f.SUCCESS?"info":"warn"](he.A_SET_FRIEND_INFO_R,a),[2,{code:a,data:u}]}}))}))}))}function $r(e,t){var n=this;return new R(he.A_CHECK_FRIENDS_T,he.A_CHECK_FRIENDS_R).validateParameters("userIds",e,L({minLength:1,maxLength:20,itemValidator:M}),f.INVALID_PARAMETER_USERIDLIST,!0).validateParameters("directionType",t,(function(e){return k({value:e,type:ie})}),f.INVALID_PARAMETER_DIRECTION_TYPE,!0).ifReady((function(i,r){return de(n,void 0,void 0,(function(){var n,o,a;return fe(this,(function(u){switch(u.label){case 0:return r.info(he.A_CHECK_FRIENDS_T,JSON.stringify({userIds:e,directionType:t})),[4,i.checkFriends(e,t)];case 1:return n=u.sent(),o=n.code,a=n.data,r[o===f.SUCCESS?"info":"warn"](he.A_CHECK_FRIENDS_R,JSON.stringify({code:o,data:a})),o!==f.SUCCESS?[2,{code:o}]:[2,{code:o,data:a}]}}))}))}))}function eo(e,t){var n=this;return void 0===t&&(t={count:50,pageToken:"",order:!1}),new R(he.A_GET_FRIENDS_T,he.A_GET_FRIENDS_R).validateParameters("directionType",e,(function(e){return k({value:e,type:re})}),f.INVALID_PARAMETER_QUERY_FRIENDS_DIRECTION_TYPE,!0).validateParameters("option.count",null==t?void 0:t.count,W({min:1,max:100}),f.INVALID_PARAMETER_COUNT,!F()).validateParameters("option.pageToken",null==t?void 0:t.pageToken,o.ONLY_STRING,f.INVALID_PARAMETER_PAGING_QUERY_OPTION).validateParameters("option.order",null==t?void 0:t.order,o.BOOLEAN,f.INVALID_PARAMETER_PAGING_QUERY_OPTION).ifReady((function(i,r){return de(n,void 0,void 0,(function(){var n,o,a;return fe(this,(function(u){switch(u.label){case 0:return r.info(he.A_GET_FRIENDS_T,JSON.stringify({directionType:e,option:t})),[4,i.getFriends(e,t)];case 1:return n=u.sent(),o=n.code,a=n.data,r[o===f.SUCCESS?"info":"warn"](he.A_GET_FRIENDS_R,JSON.stringify({code:o,data:a})),o!==f.SUCCESS?[2,{code:o}]:[2,{code:o,data:a}]}}))}))}))}function to(e,t,n){var i=this;return void 0===e&&(e={count:50,pageToken:"",order:!1}),new R(he.A_GET_FRIEND_APPLICATIONS_T,he.A_GET_FRIEND_APPLICATIONS_R).validateParameters("types",t,L({itemValidator:function(e){return k({value:e,type:oe})}}),f.INVALID_PARAMETER_FRIEND_APPLICATION_TYPE).validateParameters("option.count",e.count,W({min:1,max:100}),f.INVALID_PARAMETER_COUNT,!0).validateParameters("option.pageToken",e.pageToken,o.ONLY_STRING,f.INVALID_PARAMETER_PAGING_QUERY_OPTION).validateParameters("option.order",e.order,o.BOOLEAN,f.INVALID_PARAMETER_PAGING_QUERY_OPTION).validateParameters("status",n,L({itemValidator:function(e){return k({value:e,type:ae})}}),f.INVALID_PARAMETER_FRIEND_APPLICATION_STATUS).ifReady((function(r,o){return de(i,void 0,void 0,(function(){var i,a,u,s,c;return fe(this,(function(_){switch(_.label){case 0:return o.info(he.A_GET_FRIEND_APPLICATIONS_T,JSON.stringify({types:t,status:n,option:e})),[4,r.getFriendApplications({count:e.count,pageToken:null!==(s=null==e?void 0:e.pageToken)&&void 0!==s?s:"",order:null!==(c=null==e?void 0:e.order)&&void 0!==c&&c},t,n)];case 1:return i=_.sent(),a=i.code,u=i.data,o[a===f.SUCCESS?"info":"warn"](he.A_GET_FRIEND_APPLICATIONS_R,JSON.stringify({code:a,data:u})),a!==f.SUCCESS?[2,{code:a}]:[2,{code:a,data:u}]}}))}))}))}function no(e){var t=this;return new R(he.A_GET_FRIENDS_INFO_T,he.A_GET_FRIENDS_INFO_R).validateParameters("userIds",e,L({minLength:1,maxLength:100,itemValidator:M}),f.INVALID_PARAMETER_USERIDLIST,!0).ifReady((function(n,i){return de(t,void 0,void 0,(function(){var t,r,o;return fe(this,(function(a){switch(a.label){case 0:return i.info(he.A_GET_FRIENDS_INFO_T,JSON.stringify({userIds:e})),[4,n.getFriendsInfo(e)];case 1:return t=a.sent(),r=t.code,o=t.data,i[r===f.SUCCESS?"info":"warn"](he.A_GET_FRIENDS_INFO_R,JSON.stringify({code:r,data:o})),r!==f.SUCCESS?[2,{code:r}]:[2,{code:r,data:o}]}}))}))}))}function io(e){var t=this;return new R(he.A_SEARCH_FRIENDS_INFO_T,he.A_SEARCH_FRIENDS_INFO_R).validateParameters("name",e,X({isTrim:!0,minLength:1,maxLength:64}),f.INVALID_PARAMETER_NICK_NAME,!0).ifReady((function(n,i){return de(t,void 0,void 0,(function(){var t,r,o;return fe(this,(function(a){switch(a.label){case 0:return i.info(he.A_SEARCH_FRIENDS_INFO_T,JSON.stringify({name:e})),[4,n.searchFriendsInfo(e)];case 1:return t=a.sent(),r=t.code,o=t.data,i[r===f.SUCCESS?"info":"warn"](he.A_SEARCH_FRIENDS_INFO_R,JSON.stringify({code:r,data:o})),[2,{code:r,data:o}]}}))}))}))}function ro(e){var t=this;return new R(he.A_SET_ADD_FRIEND_PERMISSION_T,he.A_SET_ADD_FRIEND_PERMISSION_R).validateParameters("permission",e,(function(e){return k({value:e,type:ue})}),f.INVALID_PARAMETER_FRIEND_ADD_PERMISSION,!0).ifReady((function(n,i){return de(t,void 0,void 0,(function(){var t,r,o;return fe(this,(function(a){switch(a.label){case 0:return i.info(he.A_SET_ADD_FRIEND_PERMISSION_T,JSON.stringify(e)),[4,n.setFriendAddPermission(e)];case 1:return t=a.sent(),r=t.code,o=t.data,i[r===f.SUCCESS?"info":"warn"](he.A_SET_ADD_FRIEND_PERMISSION_R,JSON.stringify({code:r,data:o})),[2,{code:r}]}}))}))}))}function oo(){var e=this;return new R(he.A_GET_ADD_FRIEND_PERMISSION_T,he.A_GET_ADD_FRIEND_PERMISSION_R).ifReady((function(t,n){return de(e,void 0,void 0,(function(){var e,i,r;return fe(this,(function(o){switch(o.label){case 0:return n.info(he.A_GET_ADD_FRIEND_PERMISSION_T),[4,t.getFriendAddPermission()];case 1:return e=o.sent(),i=e.code,r=e.data,n[i===f.SUCCESS?"info":"warn"](he.A_GET_ADD_FRIEND_PERMISSION_R,JSON.stringify({code:i,data:r})),i!==f.SUCCESS?[2,{code:i}]:[2,{code:i,data:r}]}}))}))}))}function ao(e){!function(e){var t,n,i;me?pe.warn(E.A_INIT_REPEAT_O):(r("options.appkey",e.appkey,o.STRING,!0),r("options.navigators",e.navigators,(function(e){return a(e)&&(0===e.length||e.every(u))})),r("options.loggerProxy",e.loggerProxy,(function(e){return e instanceof s})),Pe=e,me=c.init({appkey:e.appkey,navigators:e.navigators||[],miniCMPProxy:e.customCMP||[],logOutputLevel:e.logOutputLevel,httpInMainProcess:!!e.httpInMainProcess,logExpireTime:e.logExpireTime,areaCode:e.areaCode,logServerUrl:e.logServerUrl,uploadDomain:e.uploadDomain,environment:null!==(t=e.environment)&&void 0!==t?t:"default",eventLoopBlockingCheck:e.eventLoopBlockingCheck,enableReadReceiptStorage:null===(n=e.enableReadReceiptStorage)||void 0===n||n,useNaviV2:null!==(i=e.useNaviV2)&&void 0!==i&&i,loggerProxy:e.loggerProxy}),pe=me.logger,me.assignWatcher(Ne),_.init(pe),me.sse.on("message",(function(e,t){var n=_e(_e({},t),{message:t.message?Re(t.message):void 0});Oe.emit(Te.STREAM_MESSAGE_RESPONSE,n)})))}(e)}function uo(){return de(this,void 0,void 0,(function(){return fe(this,(function(e){return Qe(),[2,Ue()]}))}))}function so(){return Ce((function(e){return e.getConnectionStatus()}))}function co(){return Ce((function(e){return e.getServerTime()}))}function _o(){return Ce((function(e){return e.getCurrentUserId()}))}function fo(e,t){i.add(e,t)}function lo(){return Ce((function(e){return e.getDeviceId()}))}function Eo(){var e=Le().tryTrans((function(e){return e.getAppSettings()}));return e.isOk?e.data:null}var Ro={COMET:"_",WEBSOCKET:"_"};function Ao(e){return Le().next((function(t){return t.setNotificationQuietHoursWithSetting(e)}))}function So(){return Le().next((function(e){return e.removeNotificationQuietHoursSetting()}))}function To(){return Le().next((function(e){return e.getNotificationQuietHoursSetting()}))}function Io(e,t){return de(this,void 0,void 0,(function(){return fe(this,(function(n){switch(n.label){case 0:return[4,Le().next((function(n){return n.chatroom.joinChatroom(e,null==t?void 0:t.count,!0,null==t?void 0:t.extra)}))];case 1:return[2,n.sent().wipe()]}}))}))}function vo(e,t){return de(this,void 0,void 0,(function(){return fe(this,(function(n){return[2,Le().next((function(n){return n.chatroom.joinChatroom(e,null==t?void 0:t.count,!1,null==t?void 0:t.extra)}))]}))}))}function ho(e){return de(this,void 0,void 0,(function(){return fe(this,(function(t){return[2,Le().next((function(t){return t.chatroom.quitChatroom(e)}))]}))}))}function Oo(e,t){return de(this,void 0,void 0,(function(){return fe(this,(function(n){return[2,Le().next((function(n){return n.chatroom.getChatroomInfo(e,null==t?void 0:t.count,null==t?void 0:t.order)}))]}))}))}function No(e,t){return de(this,void 0,void 0,(function(){return fe(this,(function(n){return[2,Le().next((function(n){return n.chatroom.setChatroomEntry(e,t,!1)}))]}))}))}function go(e,t){return de(this,void 0,void 0,(function(){return fe(this,(function(n){switch(n.label){case 0:return[4,Le().next((function(n){return n.chatroom.setChatroomEntries(e,t)}))];case 1:return[2,n.sent().wipe()]}}))}))}function mo(e,t){return de(this,void 0,void 0,(function(){return fe(this,(function(n){return[2,Le().next((function(n){return n.chatroom.setChatroomEntry(e,t,!0)}))]}))}))}function Po(e,t){return de(this,void 0,void 0,(function(){return fe(this,(function(n){return[2,Le().next((function(n){return n.chatroom.removeChatroomEntry(e,t,!1)}))]}))}))}function po(e,t){return de(this,void 0,void 0,(function(){return fe(this,(function(n){return[2,Le().next((function(n){return n.chatroom.removeChatroomEntries(e,{keys:null==t?void 0:t.entries,notificationExtra:null==t?void 0:t.notificationExtra})}))]}))}))}function Uo(e,t){return de(this,void 0,void 0,(function(){return fe(this,(function(n){return[2,Le().next((function(n){return n.chatroom.removeChatroomEntry(e,t,!0)}))]}))}))}function Co(e,t){return de(this,void 0,void 0,(function(){return fe(this,(function(n){return[2,Le().next((function(n){return n.chatroom.getChatroomEntry(e,t)}))]}))}))}function Mo(e){return de(this,void 0,void 0,(function(){return fe(this,(function(t){return[2,Le().next((function(t){return t.chatroom.getAllChatroomEntries(e)}))]}))}))}function Lo(e,t){return de(this,void 0,void 0,(function(){return fe(this,(function(n){switch(n.label){case 0:return[4,Le().next((function(n){return n.chatroom.getChatroomHistoryMessages(e,null==t?void 0:t.count,null==t?void 0:t.order,null==t?void 0:t.timestamp)}))];case 1:return[2,n.sent().trans((function(e){var t=e.list;return{hasMore:e.hasMore,list:t.map((function(e){return Re(e)}))}}))]}}))}))}function Do(e){return de(this,void 0,void 0,(function(){return fe(this,(function(t){return[2,Le().next((function(t){return t.chatroom.bindRTCRoomForChatroom(e)}))]}))}))}function Go(e){return de(this,void 0,void 0,(function(){return fe(this,(function(t){return[2,Le().next((function(t){return t.setTranslationLanguage(e)}))]}))}))}function yo(){return de(this,void 0,void 0,(function(){return fe(this,(function(e){return[2,Le().next((function(e){return e.getTranslationLanguage()}))]}))}))}function bo(e){return de(this,void 0,void 0,(function(){return fe(this,(function(t){return[2,Le().next((function(t){return t.setAutoTranslateEnabled(e)}))]}))}))}function wo(){return de(this,void 0,void 0,(function(){return fe(this,(function(e){return[2,Le().next((function(e){return e.getAutoTranslateEnabled()}))]}))}))}export{Xe as BaseMessage,Ze as CombineMessage,$e as CombineV2Message,et as CommandMessage,Ro as ConnectType,Te as Events,tt as FileMessage,nt as GIFMessage,it as GroupNotificationMessage,dt as HQVoiceMessage,rt as ImageMessage,ot as InformationNotificationMessage,at as LocationMessage,ut as ReferenceMessage,st as RichContentMessage,ct as SightMessage,_t as TextMessage,Pt as UploadTask,ft as VoiceMessage,fo as __addSDKVersion,zr as acceptFriendApplication,xr as acceptGroupApplication,wr as acceptGroupInvite,Yi as addConversationsToTag,ke as addEventListener,Qr as addFriend,Kr as addGroupFollows,Ur as addGroupManagers,Ve as addMonitor,Fi as addTag,Gi as addToBlacklist,an as batchClearRemoteHistoryMessages,Vn as batchDeleteConversations,tn as batchGetMessageReadReceiptInfoV4,Bn as batchRemoveConversation,qn as batchSetConversationNotificationLevel,ai as batchSetConversationToTop,Zn as batchSetConversationTranslateStrategy,Do as bindRTCRoomForChatroom,$r as checkFriends,Xn as clearAllMessagesUnreadStatus,Qe as clearEventListeners,on as clearHistoryMessages,Tn as clearMessages,Qn as clearMessagesUnreadStatus,li as clearRealtimeConUnreadCount,Jn as clearTextMessageDraft,vn as clearUnreadCountByTimestamp,Ye as connect,hr as createGroup,Lt as createUploadTask,Xr as deleteFriends,Sn as deleteLocalMessagesByTimestamp,rn as deleteMessages,uo as destroy,Je as disconnect,Pr as dismissGroup,or as electronExtension,Uo as forceRemoveChatRoomEntry,mo as forceSetChatRoomEntry,Mo as getAllChatRoomEntries,bn as getAllConversationList,Ui as getAllUltraGroupUnreadCount,Ci as getAllUltraGroupUnreadMentionedCount,_i as getAllUnreadMentionedCount,Eo as getAppSettings,wo as getAutoTranslateEnabled,bi as getBlacklist,wi as getBlacklistStatus,Ti as getBlockUltraGroupList,ni as getBlockedConversationList,Co as getChatRoomEntry,Oo as getChatRoomInfo,Lo as getChatroomHistoryMessages,so as getConnectionStatus,Fn as getConversation,yn as getConversationList,wn as getConversationListByTimestamp,ei as getConversationNotificationLevel,ti as getConversationNotificationStatus,ri as getConversationTypeNotificationLevel,ji as getConversationsFromTagByPage,_o as getCurrentUserId,lo as getDeviceId,bt as getDownloadAuth,yt as getFileToken,wt as getFileUrl,fn as getFirstUnreadMessage,ln as getFirstUnreadMessageInfo,oo as getFriendAddPermission,to as getFriendApplications,eo as getFriends,no as getFriendsInfo,Vr as getGroupApplications,Wr as getGroupFollows,Lr as getGroupMembers,Mr as getGroupMembersByRole,Nr as getGroupsInfo,jt as getHistoryMessages,Jr as getJoinedGroups,Hr as getJoinedGroupsByRole,Ft as getMessage,gn as getMessageReadReceiptInfoV5,mn as getMessageReadReceiptInfoV5ByIdentifiers,en as getMessageReadReceiptV4,_n as getMessageReader,pn as getMessagesReadReceiptByUsersV5,Pn as getMessagesReadReceiptUsersByPageV5,Rr as getMyUserProfile,Sr as getMyUserProfileVisibility,To as getNotificationQuietHoursSetting,ur as getProxy,fi as getRealtimeConTotalUnreadCount,Ri as getRealtimeConUnreadCounts,di as getRealtimeConversations,Wt as getRemoteHistoryMessages,co as getServerTime,dr as getSubscribeUserList,fr as getSubscribeUserStatus,Ir as getSubscribeUsersOnlineStatus,Vi as getTags,Hi as getTagsFromConversation,Hn as getTextMessageDraft,ui as getTopConversationList,kn as getTotalUnreadCount,Kn as getTotalUnreadCountByLevels,jn as getTotalUnreadMentionedCountByLevels,yo as getTranslationLanguage,mi as getUltraGroupDefaultNotificationLevel,Li as getUltraGroupFirstUnreadMessageTimestamp,Si as getUltraGroupList,vi as getUltraGroupMessageListByMessageUId,pi as getUltraGroupUnreadCountByTargetId,Di as getUltraGroupUnreadInfoList,gi as getUltraGroupUnreadMentionedCountByTargetId,Mi as getUltraGroupUnreadMentionedMessages,si as getUnreadConversationList,Wn as getUnreadCount,Wi as getUnreadCountByTag,Ai as getUnreadMentionMeConversationList,ci as getUnreadMentionedCount,Rn as getUnreadMentionedMessages,Er as getUserProfiles,ao as init,En as insertMessage,De as installPlugin,br as inviteUsersToGroup,Io as joinChatRoom,vo as joinExistChatRoom,yr as joinGroup,gr as kickGroupMembers,Ln as modifyMessage,Dn as modifyMessageWithParams,Ke as onceEventListener,ho as quitChatRoom,mr as quitGroup,nn as recallMessage,Gn as refreshReferenceMessageWithParams,qr as refuseFriendApplication,Br as refuseGroupApplication,Fr as refuseGroupInvite,dn as registerMessageType,Ni as removeAllExpansionForUltraGroupMessage,po as removeChatRoomEntries,Po as removeChatRoomEntry,xn as removeConversation,Ji as removeConversationsFromTag,je as removeEventListener,We as removeEventListeners,Oi as removeExpansionForUltraGroupMessage,yi as removeFromBlacklist,jr as removeGroupFollows,Cr as removeGroupManagers,sn as removeMessageExpansionForKey,He as removeMonitor,So as removeNotificationQuietHoursSetting,Ei as removeRealtimeConversations,xi as removeTag,Ki as removeTagFromConversations,ki as removeTagsFromConversation,Un as requestSpeechToTextForMessage,On as requestStreamMessageContent,Yn as saveTextMessageDraft,In as searchConversationByContent,io as searchFriendsInfo,Gr as searchGroupMembers,Yr as searchJoinedGroups,An as searchMessages,Tr as searchUserProfileByUniqueId,Ht as sendFileMessage,Jt as sendGIFMessage,kt as sendHQVoiceMessage,Yt as sendImageMessage,xt as sendMessage,Qt as sendReadReceiptMessage,$t as sendReadReceiptMessageV4,Xt as sendReadReceiptRequest,zt as sendReadReceiptResponse,qt as sendReadReceiptResponseV2,Nn as sendReadReceiptResponseV5,Kt as sendSightMessage,Zt as sendSyncReadStatusMessage,Bt as sendTextMessage,cn as sendTypingStatusMessage,Ii as sendUltraGroupTypingStatus,bo as setAutoTranslateEnabled,go as setChatRoomEntries,No as setChatRoomEntry,zn as setConversationNotificationLevel,$n as setConversationNotificationStatus,oi as setConversationToTop,Qi as setConversationToTopInTag,ii as setConversationTypeNotificationLevel,ro as setFriendAddPermission,Zr as setFriendInfo,Dr as setGroupMemberInfo,kr as setGroupRemark,hn as setMessageReceivedStatus,Ao as setNotificationQuietHoursWithSetting,ar as setProxy,Go as setTranslationLanguage,Pi as setUltraGroupDefaultNotificationLevel,Dt as stopUploadTask,cr as subscribeUserStatus,sr as testProxy,pr as transferGroupOwner,Cn as translateMessagesWithParams,Mn as translateTextsWithParams,_r as unSubscribeUserStatus,hi as updateExpansionForUltraGroupMessage,Or as updateGroupInfo,un as updateMessageExpansion,lr as updateMyUserProfile,Ar as updateMyUserProfileVisibility,Bi as updateTag,Gt as upload};
15
+ ***************************************************************************** */var w=function(n,t){return w=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var e in t)Object.prototype.hasOwnProperty.call(t,e)&&(n[e]=t[e])},w(n,t)};function F(n,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function e(){this.constructor=n}w(n,t),n.prototype=null===t?Object.create(t):(e.prototype=t.prototype,new e)}var H,B,k=function(){return k=Object.assign||function(n){for(var t,e=1,r=arguments.length;e<r;e++)for(var i in t=arguments[e])Object.prototype.hasOwnProperty.call(t,i)&&(n[i]=t[i]);return n},k.apply(this,arguments)};function V(n,t,e,r){return new(e||(e=Promise))((function(i,o){function u(n){try{a(r.next(n))}catch(n){o(n)}}function s(n){try{a(r.throw(n))}catch(n){o(n)}}function a(n){var t;n.done?i(n.value):(t=n.value,t instanceof e?t:new e((function(n){n(t)}))).then(u,s)}a((r=r.apply(n,t||[])).next())}))}function j(n,t){var e,r,i,o,u={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(e)throw new TypeError("Generator is already executing.");for(;u;)try{if(e=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return u.label++,{value:o[1],done:!1};case 5:u.label++,r=o[1],o=[0];continue;case 7:o=u.ops.pop(),u.trys.pop();continue;default:if(!(i=u.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){u=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){u.label=o[1];break}if(6===o[0]&&u.label<i[1]){u.label=i[1],i=o;break}if(i&&u.label<i[2]){u.label=i[2],u.ops.push(o);break}i[2]&&u.ops.pop(),u.trys.pop();continue}o=t.call(n,u)}catch(n){o=[6,n],r=0}finally{e=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}}function Y(n,t){var e="function"==typeof Symbol&&n[Symbol.iterator];if(!e)return n;var r,i,o=e.call(n),u=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)u.push(r.value)}catch(n){i={error:n}}finally{try{r&&!r.done&&(e=o.return)&&e.call(o)}finally{if(i)throw i.error}}return u}function z(n,t,e){if(e||2===arguments.length)for(var r,i=0,o=t.length;i<o;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return n.concat(r||Array.prototype.slice.call(t))}function W(n){return k(k({},n),{channelId:n.channelId||""})}function q(t){var e=t.conversationType,r=t.targetId,i=t.latestMessage,o=t.unreadMessageCount,u=t.hasMentioned,s=t.mentionedInfo,a=t.lastUnreadTime,c=t.notificationStatus,f=t.notificationLevel,d=t.isTop,l=t.channelId,h=t.unreadMentionedCount,v=t.matchCount,p=t.operationTime,g=t.draft,m=t.translateStrategy,E=t.editedMessageDraft,_={conversationType:e,targetId:r,latestMessage:i&&W(i),unreadMessageCount:o,hasMentioned:u,mentionedInfo:u?{type:null==s?void 0:s.type,userIdList:null==s?void 0:s.userIdList}:void 0,lastUnreadTime:a,notificationStatus:c,notificationLevel:f,isTop:d,channelId:l,unreadMentionedCount:h,matchCount:v,operationTime:p,draft:g||"",translateStrategy:m,editedMessageDraft:E};return _.conversationType===n.ULTRA_GROUP&&(_.firstUnreadMessage=t.firstUnreadMessage,_.channelType=t.channelType,_.unreadMentionedMeCount=t.unreadMentionedMeCount),_}function X(n,t){null===console||void 0===console||console.warn("Method '".concat(n,"' is deprecated, please use '").concat(t,"' instead"))}!function(n){n.CONNECTING="CONNECTING",n.CONNECTED="CONNECTED",n.DISCONNECT="DISCONNECT",n.SUSPEND="SUSPEND",n.MESSAGES="MESSAGES",n.READ_RECEIPT_RECEIVED="READ_RECEIPT_RECEIVED",n.MESSAGE_RECEIPT_REQUEST="MESSAGE_RECEIPT_REQUEST",n.MESSAGE_RECEIPT_RESPONSE="MESSAGE_RECEIPT_RESPONSE",n.MESSAGE_READ_RECEIPT_V4="MESSAGE_READ_RECEIPT_V4",n.SYNC_READ_STATUS="SYNC_READ_STATUS",n.CONVERSATION="CONVERSATION",n.CHATROOM="CHATROOM",n.EXPANSION="EXPANSION",n.PULL_OFFLINE_MESSAGE_FINISHED="PULL_OFFLINE_MESSAGE_FINISHED",n.TAG="TAG",n.USER_SETTINGS_SYNCED="USER_SETTINGS_SYNCED",n.USER_SETTINGS_CHANGED="USER_SETTINGS_CHANGED",n.CONVERSATIONS_SETTINGS_SYNCED="CONVERSATIONS_SETTINGS_SYNCED",n.CONVERSATION_TAG="CONVERSATION_TAG",n.TYPING_STATUS="TYPING_STATUS",n.MESSAGE_BLOCKED="MESSAGE_BLOCKED",n.ULTRA_GROUP_ENABLE="ULTRA_GROUP_ENABLE",n.CONVERSATIONS_SYNCED="CONVERSATIONS_SYNCED",n.OPERATE_STATUS="OPERATE_STATUS",n.ULTRA_GROUP_MESSAGE_EXPANSION_UPDATED="ULTRA_GROUP_MESSAGE_EXPANSION_UPDATED",n.ULTRA_GROUP_MESSAGE_MODIFIED="MESSAGE_MODIFIED",n.ULTRA_GROUP_MESSAGE_RECALLED="ULTRA_GROUP_MESSAGE_RECALLED",n.ULTRA_GROUP_CHANNEL_TYPE_CHANGE="ULTRA_GROUP_CHANNEL_TYPE_CHANGE",n.ULTRA_GROUP_CHANNEL_DELETE="ULTRA_GROUP_CHANNEL_DELETE",n.ULTRA_GROUP_CHANNEL_USER_KICKED="ULTRA_GROUP_CHANNEL_USER_KICKED",n.USER_GROUP_STATUS="USER_GROUP_STATUS",n.SUBSCRIBED_USER_STATUS_CHANGE="SUBSCRIBED_USER_STATUS_CHANGE",n.SUBSCRIBED_RELATION_CHANGE="SUBSCRIBED_RELATION_CHANGE",n.SYNC_SUBSCRIBED_USER_STATUS_FINISHED="SYNC_SUBSCRIBED_USER_STATUS_FINISHED",n.OWN_USER_PROFILE_CHANGED="OWN_USER_PROFILE_CHANGED",n.GROUP_OPERATION="GROUP_OPERATION",n.GROUP_INFO_CHANGED="GROUP_INFO_CHANGED",n.GROUP_MEMBER_INFO_CHANGED="GROUP_MEMBER_INFO_CHANGED",n.GROUP_APPLICATION_EVENT="GROUP_APPLICATION_EVENT",n.GROUP_REMARK_CHANGED_SYNC="GROUP_REMARK_CHANGED_SYNC",n.GROUP_FOLLOWS_CHANGED_SYNC="GROUP_FOLLOWS_CHANGED_SYNC",n.FRIEND_ADDED="FRIEND_ADDED",n.FRIEND_DELETE="FRIEND_DELETE",n.FRIEND_APPLICATION_STATUS_CHANGED="FRIEND_APPLICATION_STATUS_CHANGED",n.FRIEND_CLEARED="FRIEND_CLEARED",n.FRIEND_INFO_CHANGED_SYNC="FRIEND_INFO_CHANGED_SYNC",n.DATABASE_OPENED="DATABASE_OPENED",n.DATABASE_UPGRADE_WILL_START="DATABASE_UPGRADE_WILL_START",n.DATABASE_UPGRADING="DATABASE_UPGRADING",n.DATABASE_UPGRADE_DID_COMPLETE="DATABASE_UPGRADE_DID_COMPLETE",n.STREAM_MESSAGE_RESPONSE="STREAM_MESSAGE_RESPONSE",n.MESSAGE_RECEIPT_RESPONSE_V5="MESSAGE_RECEIPT_RESPONSE_V5",n.SPEECH_TO_TEXT_RESPONSE="SPEECH_TO_TEXT_RESPONSE",n.TRANSLATE_RESPONSE="TRANSLATE_RESPONSE",n.MESSAGE_MODIFIED="MESSAGE_MODIFIED",n.MESSAGE_MODIFIED_SYNC_COMPLETED="MESSAGE_MODIFIED_SYNC_COMPLETED"}(H||(H={})),function(n){n[n.DISALLOW=0]="DISALLOW",n[n.ALLOW=1]="ALLOW"}(B||(B={}));var K=new t,Q={connection:function(n,t){switch(n){case e.CONNECTED:K.emit(H.CONNECTED);break;case e.CONNECTING:K.emit(H.CONNECTING);break;case e.SUSPENDED:K.emit(H.SUSPEND,t);break;case e.DISCONNECTED:K.emit(H.DISCONNECT,t)}},batchMessage:function(n){K.emit(H.MESSAGES,{messages:n.map((function(n){return W(n)}))})},typingState:function(n){K.emit(H.TYPING_STATUS,{status:n})},readReceiptReceived:function(n,t,e,r){K.emit(H.READ_RECEIPT_RECEIVED,{conversation:n,messageUId:t,sentTime:e,sendUserId:r})},messageReceiptRequest:function(n,t,e){K.emit(H.MESSAGE_RECEIPT_REQUEST,{conversation:n,messageUId:t,senderUserId:e})},messageReceiptResponse:function(n,t,e){K.emit(H.MESSAGE_RECEIPT_RESPONSE,{conversation:n,receivedUserId:t,messageUIdList:e})},conversationState:function(t){var e=t.map((function(t){var e=t.conversation,r=t.updatedItems,i=e.conversationType,o=q(e);return i===n.ULTRA_GROUP&&(o.versionTime=e.versionTime,o.unreadMessageCount=J(e.unreadMessageCount||0),o.unreadMentionedCount=J(e.unreadMentionedCount||0),o.unreadMentionedMeCount=J(e.unreadMentionedMeCount||0)),{conversation:o,updatedItems:r}}));K.emit(H.CONVERSATION,{conversationList:e})},chatroomState:function(n){K.emit(H.CHATROOM,n)},expansion:function(n){K.emit(H.EXPANSION,n)},pullFinished:function(){K.emit(H.PULL_OFFLINE_MESSAGE_FINISHED)},tag:function(){K.emit(H.TAG)},userSettingsSynced:function(n){K.emit(H.USER_SETTINGS_SYNCED,n)},userSettingsChanged:function(n){K.emit(H.USER_SETTINGS_CHANGED,n)},conversationStatusSynced:function(n){K.emit(H.CONVERSATIONS_SETTINGS_SYNCED,n)},conversationTagChanged:function(){K.emit(H.CONVERSATION_TAG)},messageBlocked:function(n){K.emit(H.MESSAGE_BLOCKED,n)},ultraGroupEnable:function(){K.emit(H.ULTRA_GROUP_ENABLE)},sgRelationsSynced:function(n){K.emit(H.CONVERSATIONS_SYNCED,n)},operateStatus:function(n){K.emit(H.OPERATE_STATUS,n)},ultraGroupMessageExpansionUpdated:function(n){K.emit(H.ULTRA_GROUP_MESSAGE_EXPANSION_UPDATED,n.map((function(n){return W(n)})))},ultraGroupMessageRecalled:function(n){K.emit(H.ULTRA_GROUP_MESSAGE_RECALLED,n.map((function(n){return W(n)})))},ultraGroupChannelChangeType:function(n){K.emit(H.ULTRA_GROUP_CHANNEL_TYPE_CHANGE,n)},ultraGroupChannelUserKicked:function(n){K.emit(H.ULTRA_GROUP_CHANNEL_USER_KICKED,n)},ultraGroupChannelDelete:function(n){K.emit(H.ULTRA_GROUP_CHANNEL_DELETE,n)},userGroupStatus:function(n){K.emit(H.USER_GROUP_STATUS,n)},messageReadReceipt:function(n){K.emit(H.MESSAGE_READ_RECEIPT_V4,n)},syncReadStatus:function(n){K.emit(H.SYNC_READ_STATUS,n)},subscribedUserStatusChange:function(n){K.emit(H.SUBSCRIBED_USER_STATUS_CHANGE,n)},subscribedRelationChange:function(n){K.emit(H.SUBSCRIBED_RELATION_CHANGE,n)},syncSubscribedUserStatusFinished:function(n){K.emit(H.SYNC_SUBSCRIBED_USER_STATUS_FINISHED,n)},ownUserProfileChanged:function(n){K.emit(H.OWN_USER_PROFILE_CHANGED,n)},groupOperation:function(n){K.emit(H.GROUP_OPERATION,n)},groupInfoChanged:function(n){K.emit(H.GROUP_INFO_CHANGED,n)},groupMemberInfoChanged:function(n){K.emit(H.GROUP_MEMBER_INFO_CHANGED,n)},groupApplicationEvent:function(n){K.emit(H.GROUP_APPLICATION_EVENT,n)},groupRemarkChangedSync:function(n){K.emit(H.GROUP_REMARK_CHANGED_SYNC,n)},groupFollowsChangedSync:function(n){K.emit(H.GROUP_FOLLOWS_CHANGED_SYNC,n)},friendAdd:function(n){K.emit(H.FRIEND_ADDED,n)},friendDelete:function(n){K.emit(H.FRIEND_DELETE,n)},friendApplicationStatusChanged:function(n){K.emit(H.FRIEND_APPLICATION_STATUS_CHANGED,n)},friendCleared:function(n){K.emit(H.FRIEND_CLEARED,n)},friendInfoChangedSync:function(n){K.emit(H.FRIEND_INFO_CHANGED_SYNC,n)},databaseOpened:function(n,t){K.emit(H.DATABASE_OPENED,n,t)},databaseUpgradeWillStart:function(){K.emit(H.DATABASE_UPGRADE_WILL_START)},databaseUpgrading:function(n){K.emit(H.DATABASE_UPGRADING,n)},databaseUpgradeDidComplete:function(n){K.emit(H.DATABASE_UPGRADE_DID_COMPLETE,n)},readReceiptResponseV5:function(n){K.emit(H.MESSAGE_RECEIPT_RESPONSE_V5,n)},speechToTextResponse:function(n){K.emit(H.SPEECH_TO_TEXT_RESPONSE,n)},translateResponse:function(n){K.emit(H.TRANSLATE_RESPONSE,n)},messagesModified:function(n){K.emit(H.MESSAGE_MODIFIED,n.map((function(n){return W(n)})))},messageModifiedSyncCompleted:function(){K.emit(H.MESSAGE_MODIFIED_SYNC_COMPLETED)}};function J(n){return n>999?999:n}r.add("imlib-next","5.32.0-c-rtc-alpha.2");var Z=null,$=null,nn=null;function tn(){return V(this,void 0,void 0,(function(){return j(this,(function(n){switch(n.label){case 0:return Z?[4,c.destroy()]:[2];case 1:return n.sent(),$=null,Z=null,nn=null,[2]}}))}))}function en(n){if(!Z)throw new Error("Not initialized yet!");return n(Z,nn,$)}function rn(){return Z?h(Z):d(l.BIZ_ERROR_CLIENT_NOT_INIT)}function on(n,t){return en((function(e){return e.install(n,t)}))}var un=0,sn=new Map;function an(n,t){var e=function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var i=[],o=[];z([],Y(sn.values()),!1).forEach((function(n){var t=Y(n,3),r=t[0],u=t[1],s=t[2];r===e&&(o.push(u),s&&i.push(s))})),i.forEach((function(t){n=t(n)}));var u=t.apply(void 0,z([],Y(n),!1));return o.forEach((function(t){t(n,u)})),u};return Object.defineProperty(e,"original",{value:t,writable:!1,enumerable:!1,configurable:!1}),Object.defineProperty(e,"name",{value:n,writable:!1,enumerable:!1,configurable:!1}),Object.defineProperty(e,"monitorable",{value:!0,writable:!1,enumerable:!1,configurable:!1}),e}function cn(n,t,e){if(!n.monitorable)throw new Error("Not monitorable API: ".concat(n.name));var r=++un;return sn.set(r,[n,t,e]),r}function fn(n){sn.delete(n)}function dn(n,t){return V(this,void 0,void 0,(function(){return j(this,(function(e){switch(e.label){case 0:return[4,rn().next((function(e){return e.connect(n,!!t)}))];case 1:return[2,e.sent().trans((function(n){return{userId:n}}))]}}))}))}var ln=an("disconnect",(function(n,t){return en((function(e){return e.disconnect(n,t)}))}));function hn(n,t,e){K.on(n,t,e)}function vn(n,t,e){K.once(n,t,e)}function pn(n,t,e){K.off(n,t,e)}function gn(n){K.removeAll(n)}function mn(){K.clear()}var En=function(n,t,e,r){void 0===e&&(e=!0),void 0===r&&(r=!0),Object.defineProperty(this,"messageType",{enumerable:!0,configurable:!0,writable:!0,value:n}),Object.defineProperty(this,"content",{enumerable:!0,configurable:!0,writable:!0,value:t}),Object.defineProperty(this,"isPersited",{enumerable:!0,configurable:!0,writable:!0,value:e}),Object.defineProperty(this,"isCounted",{enumerable:!0,configurable:!0,writable:!0,value:r})},_n=function(n){function t(t,e,r){return n.call(this,t,r,e.isPersited,e.isCounted)||this}return F(t,n),t}(En);var Sn,Tn=function(n){function t(t){return n.call(this,p.COMBINE,g(p.COMBINE),t)||this}return F(t,n),t}(_n),In=function(n){function t(t){return n.call(this,p.COMBINE_V2,g(p.COMBINE_V2),t)||this}return F(t,n),t}(_n),Cn=function(n){function t(t){return n.call(this,"RC:CmdMsg",g("RC:CmdMsg"),t)||this}return F(t,n),t}(_n),An=function(n){function t(t){return n.call(this,p.FILE,g(p.FILE),t)||this}return F(t,n),t}(_n),bn=function(n){function t(t){return n.call(this,p.GIF,g(p.GIF),t)||this}return F(t,n),t}(_n),Rn=function(n){function t(t){return n.call(this,"RC:GrpNtf",g("RC:GrpNtf"),t)||this}return F(t,n),t}(_n),Nn=function(n){function t(t){return n.call(this,p.IMAGE,g(p.IMAGE),t)||this}return F(t,n),t}(_n),Mn=function(n){function t(t){return n.call(this,"RC:InfoNtf",g("RC:InfoNtf"),t)||this}return F(t,n),t}(_n),Un=function(n){function t(t){return n.call(this,p.LOCATION,g(p.LOCATION),t)||this}return F(t,n),t}(_n),On=function(n){function t(t){return n.call(this,p.REFERENCE,g(p.REFERENCE),t)||this}return F(t,n),t}(_n),yn=function(n){function t(t){return n.call(this,p.RICH_CONTENT,g(p.RICH_CONTENT),t)||this}return F(t,n),t}(_n),Pn=function(n){function t(t){return n.call(this,p.SIGHT,g(p.SIGHT),t)||this}return F(t,n),t}(_n),xn=function(n){function t(t){return n.call(this,p.TEXT,g(p.TEXT),t)||this}return F(t,n),t}(_n),Dn=function(n){function t(t){return n.call(this,p.HQ_VOICE,g(p.HQ_VOICE),t)||this}return F(t,n),t}(_n),Ln=function(n){function t(t){return n.call(this,p.VOICE,g(p.VOICE),t)||this}return F(t,n),t}(_n);!function(n){n.ALIYUN="aliyun",n.S3="s3",n.MINIO="minio",n.QINIU="qiniu",n.RCX="rcx"}(Sn||(Sn={}));var Gn=function(){function n(n,t,e){Object.defineProperty(this,"_url",{enumerable:!0,configurable:!0,writable:!0,value:n}),Object.defineProperty(this,"_authInfo",{enumerable:!0,configurable:!0,writable:!0,value:t}),Object.defineProperty(this,"_getFileToken",{enumerable:!0,configurable:!0,writable:!0,value:e}),Object.defineProperty(this,"multipartUpload",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_isAbort",{enumerable:!0,configurable:!0,writable:!0,value:!1})}return Object.defineProperty(n.prototype,"isAbort",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this._isAbort}}),Object.defineProperty(n.prototype,"abort",{enumerable:!1,configurable:!0,writable:!0,value:function(){this._isAbort=!0,this._abortHandler()}}),Object.defineProperty(n.prototype,"upload",{enumerable:!1,configurable:!0,writable:!0,value:function(n){return n.file.size>m?Promise.resolve(d(l.UPLOAD_FAIL,"the file size is over 5GB!")):n.file.size>E&&this.multipartUpload?this.multipartUpload(n):this.commonUpload(n)}}),n}(),wn=function(n){function t(){var t=null!==n&&n.apply(this,arguments)||this;return Object.defineProperty(t,"_promise",{enumerable:!0,configurable:!0,writable:!0,value:null}),t}return F(t,n),Object.defineProperty(t.prototype,"commonUpload",{enumerable:!1,configurable:!0,writable:!0,value:function(n){return V(this,void 0,void 0,(function(){var t,e,r,i,o,u;return j(this,(function(s){switch(s.label){case 0:return t=n.file,e=n.onProgress,n.fileType,r=this._authInfo,i={},(o=new FormData).set("token",r.token),o.set("key",r.fileName),o.set("file",t),this._promise=S({url:T(this._url),headers:i,onProgress:function(n){return null==e?void 0:e(n.loaded,n.total)},method:"POST",body:o,timeout:0}),[4,this._promise.result()];case 1:return u=s.sent().status,this._promise=null,200===u||204===u?[2,h({uniqueName:r.fileName,uploadMethod:_.QINIU})]:[2,d(l.UPLOAD_FAIL,u.toString())]}}))}))}}),Object.defineProperty(t.prototype,"_abortHandler",{enumerable:!1,configurable:!0,writable:!0,value:function(){var n;null===(n=this._promise)||void 0===n||n.abort()}}),t}(Gn),Fn=function(n){function t(){var t=null!==n&&n.apply(this,arguments)||this;return Object.defineProperty(t,"_promise",{enumerable:!0,configurable:!0,writable:!0,value:null}),t}return F(t,n),Object.defineProperty(t.prototype,"commonUpload",{enumerable:!1,configurable:!0,writable:!0,value:function(n){return V(this,void 0,void 0,(function(){var t,e,r,i,o,u;return j(this,(function(s){switch(s.label){case 0:return t=n.file,e=n.onProgress,n.fileType,r=this._authInfo,i=T("".concat(r.ossBucketName,".").concat(this._url)),(o=new FormData).set("token",r.token),o.set("OSSAccessKeyId",r.osskeyId),o.set("policy",r.ossPolicy),o.set("Signature",r.ossSign),o.set("success_action_status","200"),o.set("key",r.fileName),o.set("file",t),this._promise=S({url:i,onProgress:function(n){return null==e?void 0:e(n.loaded,n.total)},method:"POST",body:o,timeout:0}),[4,this._promise.result()];case 1:return u=s.sent().status,this._promise=null,200===u||204===u?[2,h({uniqueName:r.fileName,uploadMethod:_.ALI})]:[2,d(l.UPLOAD_FAIL,u.toString())]}}))}))}}),Object.defineProperty(t.prototype,"_abortHandler",{enumerable:!1,configurable:!0,writable:!0,value:function(){var n;null===(n=this._promise)||void 0===n||n.abort()}}),t}(Gn);function Hn(n){return Math.ceil(n/1024)||0}var Bn,kn=function(n){function t(){var t=null!==n&&n.apply(this,arguments)||this;return Object.defineProperty(t,"_promise",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(t,"isSupportMultipart",{enumerable:!0,configurable:!0,writable:!0,value:!0}),Object.defineProperty(t,"multipartUpload",{enumerable:!0,configurable:!0,writable:!0,value:function(n){return V(t,void 0,void 0,(function(){var t,e,r,i,o,u,s,a,c,f,v,p,g,m,E,I,C,A,b;return j(this,(function(R){switch(R.label){case 0:t=n.file,e=n.fileType,R.label=1;case 1:return R.trys.push([1,3,,4]),[4,this._getFileToken(e,t.name,"POST","uploads",void 0,Hn(t.size))];case 2:return r=R.sent(),[3,4];case 3:return i=R.sent(),[2,d(i)];case 4:return o=T("".concat(this._url,"/").concat(r.minioBucketName,"/").concat(r.fileName)),u=this.getBaseHeaders(t,r,n),this._promise=S({url:"".concat(o,"?uploads"),headers:u,method:"POST"}),[4,this._promise.result()];case 5:return s=R.sent(),a=s.status,c=s.data,this._promise=null,f=null===(b=null==c?void 0:c.match(/(?:<UploadId>)(\S*?)(?:<\/UploadId>)/))||void 0===b?void 0:b[1],200!==a&&204!==a||!f?[2,d(l.UPLOAD_FAIL,"start upload fail")]:(v=[],[4,this.requestUploadPart(o,t,f,r.fileName,n,v)]);case 6:if(p=R.sent(),g=p.code,m=p.msg,g!==l.SUCCESS)return[2,d(g,m)];R.label=7;case 7:return R.trys.push([7,9,,10]),[4,this._getFileToken(e,r.fileName,"POST","uploadId=".concat(f),void 0,Hn(t.size))];case 8:return r=R.sent(),[3,10];case 9:return E=R.sent(),[2,d(E)];case 10:return I=v.map((function(n,t){return"<Part><PartNumber>".concat(t+1,"</PartNumber><ETag>").concat(n,"</ETag></Part>")})).join(""),I="<CompleteMultipartUpload xmlns='http://s3.amazonaws.com/doc/2006-03-01/'>".concat(I,"</CompleteMultipartUpload>"),C=this.getBaseHeaders(t,r,n),this._promise=S({url:"".concat(o,"?uploadId=").concat(f),headers:C,method:"POST",body:I,timeout:0}),[4,this._promise.result()];case 11:return A=R.sent().status,this._promise=null,200===A||204===A?[2,h({uniqueName:r.fileName,uploadMethod:_.MINIO})]:[2,d(l.UPLOAD_FAIL,"end upload fail")]}}))}))}}),t}return F(t,n),Object.defineProperty(t.prototype,"commonUpload",{enumerable:!1,configurable:!0,writable:!0,value:function(n){return V(this,void 0,void 0,(function(){var t,e,r,i,o,u;return j(this,(function(s){switch(s.label){case 0:return t=n.file,e=n.onProgress,n.fileType,r=this._authInfo,i=T("".concat(this._url,"/").concat(r.minioBucketName,"/").concat(r.fileName)),o=this.getBaseHeaders(t,r,n),this._promise=S({url:i,headers:o,onProgress:function(n){return null==e?void 0:e(n.loaded,n.total)},method:"PUT",body:t,timeout:0}),[4,this._promise.result()];case 1:return u=s.sent().status,this._promise=null,200===u||204===u?[2,h({uniqueName:r.fileName,uploadMethod:_.MINIO})]:[2,d(l.UPLOAD_FAIL,u.toString())]}}))}))}}),Object.defineProperty(t.prototype,"requestUploadPart",{enumerable:!1,configurable:!0,writable:!0,value:function(n,t,e,r,i,o,u,s){return void 0===u&&(u=1),void 0===s&&(s=0),V(this,void 0,void 0,(function(){var a,c,f,v,p,g,m,_,T,I;return j(this,(function(C){switch(C.label){case 0:if(s>=5)return[2,d(l.UPLOAD_FAIL,"Upload retry times exceeded 5. Procedure")];a=(u-1)*E,c=Math.min(E,t.size-a),f="partNumber=".concat(u,"&uploadId=").concat(e),C.label=1;case 1:return C.trys.push([1,3,,4]),[4,this._getFileToken(i.fileType,r,"PUT",f,void 0,Hn(t.size))];case 2:return v=C.sent(),[3,4];case 3:return p=C.sent(),[2,d(p)];case 4:return g=t.slice(a,u*E),m=this.getBaseHeaders(t,v,i),this._promise=S({url:"".concat(n,"?").concat(f),headers:m,method:"PUT",body:g,timeout:0,onProgress:function(n){var e;return null===(e=null==i?void 0:i.onProgress)||void 0===e?void 0:e.call(i,a+n.loaded,t.size)}}),[4,this._promise.result()];case 5:return _=C.sent(),T=_.status,I=_.xhr,this._promise=null,200===T||204===T?(o.push((null==I?void 0:I.getResponseHeader("ETag"))||""),a+c<t.size?[2,this.requestUploadPart(n,t,e,r,i,o,u+1,0)]:[2,h()]):[2,this.requestUploadPart(n,t,e,r,i,o,u,s+1)]}}))}))}}),Object.defineProperty(t.prototype,"getBaseHeaders",{enumerable:!1,configurable:!0,writable:!0,value:function(n,t,e){var r=e.contentDisposition||("text/html"===n.type?"inline":"attachment");return{"Content-Disposition":"".concat(r,"; filename=").concat(encodeURIComponent(n.name),";"),Authorization:t.minioAuthorization,"x-amz-content-sha256":t.minioContentSha256,"x-amz-date":t.minioDate,"Content-Type":n.type||"text/plain"}}}),Object.defineProperty(t.prototype,"_abortHandler",{enumerable:!1,configurable:!0,writable:!0,value:function(){var n;null===(n=this._promise)||void 0===n||n.abort()}}),t}(Gn),Vn=function(n){function t(){var t=null!==n&&n.apply(this,arguments)||this;return Object.defineProperty(t,"isSupportMultipart",{enumerable:!0,configurable:!0,writable:!0,value:!0}),Object.defineProperty(t,"_promise",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(t,"multipartUpload",{enumerable:!0,configurable:!0,writable:!0,value:function(n){return V(t,void 0,void 0,(function(){var t,e,r,i;return j(this,(function(o){return t=n.file,e=n.onProgress,n.fileType,r=I.gen(),i=this._authInfo,[2,this._requestUploadPart(r,t,i.token,e)]}))}))}}),t}return F(t,n),Object.defineProperty(t.prototype,"commonUpload",{enumerable:!1,configurable:!0,writable:!0,value:function(n){return V(this,void 0,void 0,(function(){var t,e,r,i,o,u,s,a,c,f;return j(this,(function(v){switch(v.label){case 0:return t=n.file,e=n.onProgress,n.fileType,r=this._authInfo,i={},(o=new FormData).set("token",r.token),o.set("key",r.fileName),o.set("file",t),u=T(this._url),this._promise=S({url:u,headers:i,onProgress:function(n){return null==e?void 0:e(n.loaded,n.total)},method:"POST",body:o,timeout:0}),[4,this._promise.result()];case 1:return s=v.sent(),a=s.status,c=s.data,this._promise=null,200!==a&&204!==a||!c?[2,d(l.UPLOAD_FAIL,a.toString())]:(f=JSON.parse(c),[2,h({uniqueName:f.rc_url.file_name,downloadUrl:"".concat(u,"/").concat(f.rc_url.path),uploadMethod:_.QINIU})])}}))}))}}),Object.defineProperty(t.prototype,"_requestUploadPart",{enumerable:!1,configurable:!0,writable:!0,value:function(n,t,e,r,i){return void 0===i&&(i=0),V(this,void 0,void 0,(function(){var o,u,s,a,c,f,v,p,g,m;return j(this,(function(I){switch(I.label){case 0:return o=Math.min(E,t.size-i),u=n+t.name.substring(t.name.lastIndexOf(".")),s={Range:"bytes=".concat(i,"-").concat(i+o),"X-File-TransactionId":u,"X-File-Total-Size":t.size.toString()},a=t.slice(i,i+o),(c=new FormData).set("file",a,t.name),c.set("key",u),c.set("name",u),c.set("token",e),f=T(this._url),this._promise=S({url:f,headers:s,onProgress:function(n){return null==r?void 0:r(i+n.loaded,t.size)},method:"POST",body:c,timeout:0}),[4,this._promise.result()];case 1:return v=I.sent(),p=v.status,g=v.data,this._promise=null,200===p||204===p?i+o<t.size?[2,this._requestUploadPart(n,t,e,r,i+o)]:(m=JSON.parse(g),[2,h({uniqueName:m.rc_url.file_name,downloadUrl:"".concat(f,"/").concat(m.rc_url.path),uploadMethod:_.QINIU})]):[2,d(l.UPLOAD_FAIL,p.toString())]}}))}))}}),Object.defineProperty(t.prototype,"_abortHandler",{enumerable:!1,configurable:!0,writable:!0,value:function(){var n;null===(n=this._promise)||void 0===n||n.abort()}}),t}(Gn),jn=function(n){function t(){var t=null!==n&&n.apply(this,arguments)||this;return Object.defineProperty(t,"_promise",{enumerable:!0,configurable:!0,writable:!0,value:null}),t}return F(t,n),Object.defineProperty(t.prototype,"commonUpload",{enumerable:!1,configurable:!0,writable:!0,value:function(n){return V(this,void 0,void 0,(function(){var t,e,r,i,o,u,s,a,c;return j(this,(function(f){switch(f.label){case 0:return t=n.file,e=n.onProgress,n.fileType,r=n.contentDisposition,i=this._authInfo,o={},u=T("".concat(i.s3BucketName,".").concat(this._url)),s=new FormData,r?s.set("Content-Disposition",r):s.set("Content-Disposition","text/html"===t.type?"inline;":"attachment;"),s.set("Content-Type",t.type),s.set("x-amz-credential",i.s3Credential),s.set("x-amz-algorithm",i.s3Algorithm),s.set("x-amz-date",i.s3Date),s.set("policy",i.s3Policy),s.set("x-amz-signature",i.s3Signature),s.set("key",i.fileName),s.set("file",t),this._promise=S({url:u,headers:o,onProgress:function(n){return null==e?void 0:e(n.loaded,n.total)},method:"POST",body:s,timeout:0}),[4,this._promise.result()];case 1:return a=f.sent(),c=a.status,a.data,this._promise=null,200===c||204===c?[2,h({uniqueName:i.fileName,uploadMethod:_.AWS})]:[2,d(l.UPLOAD_FAIL,c.toString())]}}))}))}}),Object.defineProperty(t.prototype,"_abortHandler",{enumerable:!1,configurable:!0,writable:!0,value:function(){var n;null===(n=this._promise)||void 0===n||n.abort()}}),t}(Gn);function Yn(n,t){var e=new AudioContext({sampleRate:16e3}),r=A(),i=r.promise,o=r.resolve;return e.decodeAudioData(n,(function(n){var e,r;o(h(k(k({},t),{duration:n.duration,length:n.length,sampleRate:null!==(e=n.sampleRate)&&void 0!==e?e:void 0,numberOfChannels:null!==(r=n.numberOfChannels)&&void 0!==r?r:void 0})))}),(function(n){o(d(l.UPLOAD_FAIL,"get audio info fail:".concat(JSON.stringify(n))))})),i}var zn=((Bn={})[Sn.QINIU]=wn,Bn[Sn.ALIYUN]=Fn,Bn[Sn.S3]=jn,Bn[Sn.MINIO]=kn,Bn[Sn.RCX]=Vn,Bn);function Wn(n,t,e){var r=A(),i=r.promise,o=r.resolve,u=document.createElement("canvas"),s=u.getContext("2d"),a=new Image;return a.onload=function(n){var r=e||{},i=r.maxHeight,c=void 0===i?160:i,f=r.maxWidth,d=void 0===f?160:f,l=r.quality,v=void 0===l?1:l,p=r.scale,g=void 0===p?1:p,m=Xn(a.width,a.height,{maxHeight:c,maxWidth:d,scale:g});u.width=Math.min(m.w,d),u.height=Math.min(m.h,c),s.drawImage(a,m.x,m.y,m.w,m.h);var E=qn(u,v);E=E.replace(/data:image\/[^;]+;base64,/,""),o(h(k(k({},t),{thumbnail:E,width:Math.ceil(m.w),height:Math.ceil(m.h)})))},a.onerror=function(n){o(d(l.UPLOAD_FAIL,"get image info fail:".concat(JSON.stringify(n))))},a.src=(window.URL||window.webkitURL).createObjectURL(n),i}function qn(n,t){var e=n.toDataURL("image/jpeg",t);return e.length>b-10240?qn(n,t-.1):e}var Xn=function(n,t,e){var r,i,o=e.maxHeight,u=void 0===o?160:o,s=e.maxWidth,a=void 0===s?160:s,c=e.scale,f=n<t,d=0,l=0;return(f?t/n:n/t)>(void 0===c?1:c)?(f?(r=160,(i=t/(n/160))>u&&(l=(i-u)/2)):(i=160,(r=n/(t/160))>a&&(d=(r-a)/2)),{w:r,h:i,x:-d,y:-l}):(f?(i=u,r=n/(t/u)):(r=a,i=t/(n/a)),{w:r,h:i,x:-d,y:-l})},Kn=0,Qn=function(){function n(n,t){Object.defineProperty(this,"_promise",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_resolve",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_client",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"id",{enumerable:!0,configurable:!0,writable:!0,value:++Kn}),this._promise=this._handleUpload(n,t)}return Object.defineProperty(n.prototype,"abort",{enumerable:!1,configurable:!0,writable:!0,value:function(){var n;this._resolve(d(l.UPLOAD_FAIL,"upload abort")),null===(n=this._client)||void 0===n||n.abort()}}),Object.defineProperty(n.prototype,"_uploadInLoop",{enumerable:!1,configurable:!0,writable:!0,value:function(n,t,e,r,i){return void 0===i&&(i=[]),V(this,void 0,void 0,(function(){var o,u,s,a,c;return j(this,(function(f){switch(f.label){case 0:o=0,f.label=1;case 1:return o<n.length?(u=n[o],(s=zn[u.type])?(this._client=new s(u.url,e,r),[4,this._client.upload(t)]):(i.push({type:u.type,url:u.url,code:l.UPLOAD_FAIL,msg:"Upload type not supported"}),[3,3])):[3,4];case 2:if((a=f.sent()).isOk)return[2,a];if(c=a.code,[l.RC_FILE_SIZE_EXCEED_LIMIT,l.INVALID_PARAMETER_SIZE_NOT_FOUND].includes(a.code))return[2,a];if(this._client.isAbort())return this._client=null,[2,a];this._client=null,i.push({type:u.type,url:u.url,code:c,msg:a.msg}),f.label=3;case 3:return o++,[3,1];case 4:return[2,d(l.UPLOAD_FAIL,"Failed to upload all channels, msg: ".concat(JSON.stringify(i)))]}}))}))}}),Object.defineProperty(n.prototype,"_handleUpload",{enumerable:!1,configurable:!0,writable:!0,value:function(n,t){return V(this,void 0,void 0,(function(){var e,r,i,o,u,s,a,c,f,v,p,g,m,E,_,S,T,I,A;return j(this,(function(b){switch(b.label){case 0:return e=t.getFileToken,r=t.customDomain,i=t.uploadServer,o=t.ossConfig,u=n.file,s=n.fileType,a=n.thumbnailConfig,[4,e(s,u.name,void 0,void 0,void 0,Hn(u.size))];case 1:return(c=b.sent()).isOk?(f=c.data,v=function(n,t,e){if(t)return[{type:Sn.RCX,url:t,p:"1"}];if(n)return JSON.parse(n).map((function(n){var t={type:Sn.QINIU,url:"",p:""};return Object.keys(n).forEach((function(e){"p"===e?t.p=n[e]:(t.type=e,t.url=n[e])})),t})).sort((function(n,t){return n.p-t.p}));var r=[];return e&&r.push({type:Sn.QINIU,url:e,p:"1"}),r}(f.ossConfig||o,r,i),0===v.length?[2,d(l.INVALID_PARAMETER_MEDIA_URL,"uploadUrlList is empty")]:[4,this._uploadInLoop(v,n,f,e)]):[2,c.wipe()];case 2:return p=b.sent(),g=p.code,m=p.data,E=p.msg,p.isOk?(S=(_=m).downloadUrl,T=_.uploadMethod,S?[3,4]:[4,t.getFileUrl(s,m.uniqueName,T,u.name)]):[2,d(g,E)];case 3:if(!(I=b.sent()).isOk)return[2,d(I.code,"Get download url fail")];S=I.data.downloadUrl,b.label=4;case 4:return S?(A={downloadUrl:S,uniqueName:(null==m?void 0:m.uniqueName)||"",name:u.name,size:u.size,type:u.type},s!==C.AUDIO?[3,6]:[4,u.arrayBuffer()]):[2,d(l.UPLOAD_FAIL,"Get download url fail")];case 5:return[2,Yn(b.sent(),A)];case 6:return s===C.IMAGE?[2,Wn(u,A,a)]:[2,h(A)]}}))}))}}),Object.defineProperty(n.prototype,"awaitResult",{enumerable:!1,configurable:!0,writable:!0,value:function(){return V(this,void 0,void 0,(function(){return j(this,(function(n){return[2,this._promise]}))}))}}),n}(),Jn={};function Zn(n,t){var e=new Qn(n,t);return function(n){V(this,void 0,void 0,(function(){return j(this,(function(t){switch(t.label){case 0:return Jn[n.id]=n,[4,n.awaitResult()];case 1:return t.sent(),delete Jn[n.id],[2]}}))}))}(e),e}function $n(n){var t=Jn[n];return!!t&&(t.abort(),!0)}var nt=function(n,t){var e=n.getNaviInfoFromCache();return{getFileToken:n.getFileToken.bind(n),getFileUrl:n.getFileUrl.bind(n),customDomain:t||"",ossConfig:null==e?void 0:e.ossConfig,uploadServer:null==e?void 0:e.uploadServer}};function tt(n){return V(this,void 0,void 0,(function(){var t=this;return j(this,(function(e){return[2,rn().next((function(e){return V(t,void 0,void 0,(function(){var t,r,i;return j(this,(function(o){return t=n.contentDisposition,r=n.fileType,i=n.file,[2,R.create("createUploadTask").validate("contentDisposition",t,(function(n){return"inline"===n||"attachment"===n}),!1).fail(l.INVALID_PARAMETER_CONTENT_DISPOSITION).isValueOf("fileType",r,C,!0).fail(l.INVALID_PARAMETER_MEDIA_TYPE).validate("file",i,(function(n){return n instanceof File&&(!(r===C.IMAGE&&!n.type.match(/^image\//))&&!(r===C.AUDIO&&!n.type.match(/^audio\//)))}),!0).fail(l.MEDIA_EXCEPTION).result().trans((function(){return Zn(n,nt(e,e.getOptions().uploadDomain))}))]}))}))}))]}))}))}function et(n){return V(this,void 0,void 0,(function(){return j(this,(function(t){return[2,h($n(n))]}))}))}function rt(n){return V(this,void 0,void 0,(function(){var t,e,r,i=this;return j(this,(function(o){return t=n.contentDisposition,e=n.fileType,r=n.file,[2,rn().next((function(o){return V(i,void 0,void 0,(function(){return j(this,(function(i){switch(i.label){case 0:return[4,R.create("upload").validate("contentDisposition",t,(function(n){return"inline"===n||"attachment"===n}),!1).fail(l.INVALID_PARAMETER_CONTENT_DISPOSITION).isValueOf("fileType",e,C,!0).fail(l.INVALID_PARAMETER_MEDIA_TYPE).validate("file",r,(function(n){return n instanceof File&&(!(e===C.IMAGE&&!n.type.match(/^image\//))&&!(e===C.AUDIO&&!n.type.match(/^audio\//)))}),!0).fail(l.MEDIA_EXCEPTION).result().next((function(){return function(n,t){return V(this,void 0,void 0,(function(){return j(this,(function(e){return[2,new Qn(n,t).awaitResult()]}))}))}(n,nt(o,o.getOptions().uploadDomain))}))];case 1:return[2,i.sent()]}}))}))}))]}))}))}function it(n,t,e,r){return rn().next((function(i){return i.getFileToken(n,t,e,r)}))}function ot(n){var t=this;return rn().next((function(e){return V(t,void 0,void 0,(function(){return j(this,(function(t){switch(t.label){case 0:return[4,R.create("getDownloadAuth").isNotEmptyString("url",n,!0).fail(l.INVALID_PARAMETER_MEDIA_URL).result().next((function(){return e.getFileToken(1,void 0,void 0,void 0,n)}))];case 1:return[2,t.sent().trans((function(n){return{deadline:n.deadline,token:n.token,downloadAuthInfo:n.downloadAuthInfo}}))]}}))}))}))}function ut(n,t,e,r,i){return V(this,void 0,void 0,(function(){return j(this,(function(o){return(null==r?void 0:r.isBosRes)?[2,h(r)]:[2,rn().next((function(r){return r.getFileUrl(n,t,i||_.QINIU,e)}))]}))}))}var st=Nr,at=an("sendMessage",(function(n,t,e){return V(void 0,void 0,void 0,(function(){var r,i,o,u,s,a,c,f,l,h,p,g,m;return j(this,(function(E){switch(E.label){case 0:return i=(r=e||{}).disableNotification,o=r.isMentioned,u=r.directionalUserIdList,s=r.canIncludeExpansion,a=r.onSendBefore,c=r.expansion,f=r.pushConfig,l=r.isStatusMessage,h=r.disableUpdateLastMessage,p=function(n,t){var e=n.disableNotification,r=n.pushContent,i=n.pushData,o=n.isMentioned,u=n.mentionedType,s=n.mentionedUserIdList,a=n.directionalUserIdList,c=n.isVoipPush,f=n.canIncludeExpansion,d=n.expansion,l=n.isFilerWhiteBlacklist,h=n.pushConfig,v=n.messageId,p=n.disableUpdateLastMessage,g=n.needReceipt;return k({disableNotification:e,pushContent:r,pushData:i,isMentioned:o,mentionedType:u,mentionedUserIdList:s,directionalUserIdList:a,isVoipPush:c,canIncludeExpansion:f,expansion:d,isFilerWhiteBlacklist:l,pushConfig:h,messageId:v,disableUpdateLastMessage:p,needReceipt:g},t)}(e||{},t),g=k(k({},n),{isMentioned:!!o,content:t.content,messageType:t.messageType,isPersited:!!t.isPersited,isCounted:!!t.isCounted,disableNotification:!!i,canIncludeExpansion:!!s,expansion:c||null,senderUserId:"",messageUId:"",messageDirection:M.SEND,receivedTime:0,isStatusMessage:!!l,receivedStatus:U.UNREAD,isOffLineMessage:!1,pushConfig:f,sentStatus:N.SENDING,sentTime:0,directedUserIds:u||[],disableUpdateLastMessage:h}),[4,rn().next((function(t){g.senderUserId=t.getCurrentUserId();return t.sendMessage(n,p,(function(n){g.messageId=n;try{a&&a(W(g))}catch(n){t.logger.error(v.L_CALLBACK_E,'Callback method "onSendBefore" execution error.\n'.concat(null==n?void 0:n.stack)),console.error(n)}}))}))];case 1:return(m=E.sent()).isOk?[2,m.trans((function(n){return W(n)}))]:(g.sentStatus=N.FAILED,[2,d(m.code,m.msg,W(g))])}}))}))}));function ct(n,t,e){return at(n,new xn(t),e)}function ft(n,t){var e=this;return function(r,i,u,s){return V(e,void 0,void 0,(function(){var e,a,c,f,h,p,g,m,E,_,S,T,I;return j(this,(function(C){switch(C.label){case 0:if(!(e=rn()).isOk)return[2,e.wipe()];if(a=e.data,!O("sendOptions.contentDisposition",null==s?void 0:s.contentDisposition,(function(n){return["inline","attachment"].includes(n)})))return[2,d(l.INVALID_PARAMETER_SENDOPTIONS)];if(c={contentDisposition:null==s?void 0:s.contentDisposition},s&&"thumbnailConfig"in s){if(f=null===(T=s)||void 0===T?void 0:T.thumbnailConfig,!(O("sendOptions.maxHeight",null==f?void 0:f.maxHeight,o.NUMBER)&&O("sendOptions.maxWidth",null==f?void 0:f.maxWidth,o.NUMBER)&&O("sendOptions.quality",null==f?void 0:f.quality,o.NUMBER)&&O("sendOptions.scale",null==f?void 0:f.scale,o.NUMBER)))return[2,d(l.INVALID_PARAMETER_SENDOPTIONS)];c.thumbnailConfig=f}return h=a.logger,p=h.createTraceId(),h.info(v.L_MEDIA_UPLOAD_T,JSON.stringify({filesize:i.file.size,type:n}),p),[4,rt({file:i.file,fileType:n,onProgress:function(n,t){var e;null===(e=null==u?void 0:u.onProgress)||void 0===e||e.call(u,Math.floor(n/t*100))},contentDisposition:c.contentDisposition,thumbnailConfig:c.thumbnailConfig})];case 1:return g=C.sent(),m=g.code,E=g.data,_=g.msg,m===l.SUCCESS&&E?(S=(null===(I=null==u?void 0:u.onComplete)||void 0===I?void 0:I.call(u,k({url:E.downloadUrl},E)))||t(E,i),h.info(v.L_MEDIA_UPLOAD_R,JSON.stringify({downurl:E.downloadUrl,code:l.SUCCESS}),p),[2,at(r,S,s)]):[2,d(m,_)]}}))}))}}var dt=ft(C.FILE,(function(n,t){var e,r,i={name:n.name,size:t.file.size,type:(e=n.name,r=e.match(/\.(\w+)$/),r?r[1]:"bin"),fileUrl:n.downloadUrl};return t.user&&(i.user=t.user),t.extra&&(i.extra=t.extra),t.mentionedInfo&&(i.mentionedInfo=t.mentionedInfo),new An(i)})),lt=ft(C.IMAGE,(function(n,t){var e={content:n.thumbnail,imageUri:n.downloadUrl,thumWidth:n.width,thumHeight:n.height};return t.user&&(e.user=t.user),t.extra&&(e.extra=t.extra),t.mentionedInfo&&(e.mentionedInfo=t.mentionedInfo),t.audit&&(e.audit=t.audit),new Nn(e)})),ht=ft(C.IMAGE,(function(n,t){var e={gifDataSize:n.size,remoteUrl:n.downloadUrl,width:n.width,height:n.height};return t.user&&(e.user=t.user),t.extra&&(e.extra=t.extra),t.mentionedInfo&&(e.mentionedInfo=t.mentionedInfo),t.audit&&(e.audit=t.audit),new bn(e)})),vt=ft(C.AUDIO,(function(n,t){var e,r={remoteUrl:n.downloadUrl,duration:Math.floor(null!==(e=n.duration)&&void 0!==e?e:0),sampleRate:n.sampleRate,numberOfChannels:n.numberOfChannels};return t.user&&(r.user=t.user),t.extra&&(r.extra=t.extra),t.mentionedInfo&&(r.mentionedInfo=t.mentionedInfo),t.audit&&(r.audit=t.audit),new Dn(r)})),pt=ft(C.SIGHT,(function(n,t){var e={sightUrl:n.downloadUrl,content:t.thumbnail,duration:t.duration,size:t.file.size||n.size,name:t.name||n.name};return t.user&&(e.user=t.user),t.extra&&(e.extra=t.extra),t.mentionedInfo&&(e.mentionedInfo=t.mentionedInfo),t.audit&&(e.audit=t.audit),new Pn(e)}));function gt(n,t){return V(this,void 0,void 0,(function(){return j(this,(function(e){switch(e.label){case 0:return[4,rn().next((function(e){return e.getHistoryMessage(n,t)}))];case 1:return[2,e.sent().trans((function(n){var t=n.list;return{hasMore:n.hasMore,list:t.map((function(n){return W(n)}))}}))]}}))}))}function mt(n,t){return V(this,void 0,void 0,(function(){return j(this,(function(e){switch(e.label){case 0:return[4,rn().next((function(e){return e.getRemoteHistoryMessages(n,t)}))];case 1:return[2,e.sent().trans((function(n){var t=n.list;return{hasMore:n.hasMore,list:t.map((function(n){return W(n)}))}}))]}}))}))}function Et(t,e,r,i){return V(this,void 0,void 0,(function(){return j(this,(function(o){return[2,rn().next((function(o){return o.chat.sendReadReceiptMessage({targetId:t,conversationType:n.PRIVATE,channelId:i},e,r)}))]}))}))}function _t(t,e,r){return V(this,void 0,void 0,(function(){return j(this,(function(i){return[2,rn().next((function(i){return i.chat.sendReadReceiptRequest({targetId:t,conversationType:n.GROUP,channelId:r},e)}))]}))}))}function St(n,t,e){return V(this,void 0,void 0,(function(){return j(this,(function(n){throw new Error("This method is deprecated, please use method sendReadReceiptResponseV2.")}))}))}function Tt(t,e,r){return V(this,void 0,void 0,(function(){return j(this,(function(i){return[2,rn().next((function(i){return i.chat.sendReadReceipt({targetId:t,conversationType:n.GROUP,channelId:r},e)}))]}))}))}function It(n,t){return V(this,void 0,void 0,(function(){return j(this,(function(e){return[2,rn().next((function(e){return e.chat.sendSyncReadStatusMessage(n,t)}))]}))}))}function Ct(n,t,e){return V(this,void 0,void 0,(function(){return j(this,(function(r){return[2,rn().next((function(r){return r.chat.sendReadReceiptMessageV4(n,t,e)}))]}))}))}function At(n,t){return V(this,void 0,void 0,(function(){return j(this,(function(e){return[2,rn().next((function(e){return e.chat.getMessageReadReceiptV4(n,t)}))]}))}))}function bt(n,t){return V(this,void 0,void 0,(function(){return j(this,(function(e){return[2,rn().next((function(e){return e.chat.batchGetMessageReadReceiptInfoV4(n,t)}))]}))}))}ft(C.COMBINE_HTML,(function(n,t){var e={remoteUrl:n.downloadUrl,nameList:t.nameList,summaryList:t.summaryList,conversationType:t.conversationType};return t.user&&(e.user=t.user),t.extra&&(e.extra=t.extra),t.mentionedInfo&&(e.mentionedInfo=t.mentionedInfo),new Tn(e)}));var Rt=an("recallMessage",(function(n,t){return V(void 0,void 0,void 0,(function(){return j(this,(function(e){return[2,rn().next((function(e){return V(void 0,void 0,void 0,(function(){return j(this,(function(r){switch(r.label){case 0:return[4,e.recallMessage(n,t)];case 1:return[2,r.sent().trans((function(n){return W(n)}))]}}))}))}))]}))}))}));function Nt(n,t){return V(this,void 0,void 0,(function(){return j(this,(function(e){return[2,rn().next((function(e){return e.deleteRemoteMessage(n,t)}))]}))}))}function Mt(n,t){return V(this,void 0,void 0,(function(){return j(this,(function(e){return[2,rn().next((function(e){return e.deleteRemoteMessageByTimestamp(n,t)}))]}))}))}function Ut(n,t){return V(this,void 0,void 0,(function(){return j(this,(function(e){return[2,rn().next((function(e){return e.batchClearRemoteHistoryMessages(n,t)}))]}))}))}function Ot(n,t){return V(this,void 0,void 0,(function(){return j(this,(function(e){return[2,rn().next((function(e){return e.updateMessageExpansion(n,t)}))]}))}))}function yt(n,t){return V(this,void 0,void 0,(function(){return j(this,(function(e){return[2,rn().next((function(e){return e.removeMessageExpansion(n,t)}))]}))}))}function Pt(n,t){return V(this,void 0,void 0,(function(){return j(this,(function(e){switch(e.label){case 0:return[4,rn().next((function(e){return e.chat.sendTypingStatus(n,t)}))];case 1:return[2,e.sent().trans(W)]}}))}))}function xt(n,t,e){return V(this,void 0,void 0,(function(){var r=this;return j(this,(function(i){return[2,rn().next((function(i){return V(r,void 0,void 0,(function(){return j(this,(function(r){return[2,i.chat.getMessageReader(n,t,e)]}))}))}))]}))}))}function Dt(n,t,e,r,u){return en((function(s,a){return i("messageType",n,o.STRING,!0),i("isPersited",t,o.BOOLEAN,!0),i("isCounted",e,o.BOOLEAN,!0),i("isStatusMessage",u,o.BOOLEAN),i("searchProps",r,o.ARRAY),a.info(v.A_REGTYP_O,JSON.stringify({messageType:n,isCounted:e,isStatusMessage:u,isPersited:t,searchProps:r})),s.registerMessageType(n,t,e,r,u),function(n,t,e){return void 0===t&&(t=!0),void 0===e&&(e=!0),function(r){return new En(n,r,t,e)}}(n,t,e)}))}function Lt(n){return V(this,void 0,void 0,(function(){return j(this,(function(t){switch(t.label){case 0:return[4,rn().next((function(t){return t.getFirstUnreadMessage(n)}))];case 1:return[2,t.sent().trans((function(n){return n?W(n):null}))]}}))}))}function Gt(n){return V(this,void 0,void 0,(function(){return j(this,(function(t){return[2,rn().next((function(t){return t.getFirstUnreadMessageDigest(n)}))]}))}))}function wt(n,t,e){return void 0===e&&(e={}),V(this,void 0,void 0,(function(){return j(this,(function(r){return X("insertMessage","electronExtension.insertMessage"),[2,Ar(n,t,e)]}))}))}function Ft(n){throw new Error("getUnreadMentionedMessages is deprecated, please use electronExtension.getUnreadMentionedMessages instead")}function Ht(n,t,e,r){return V(this,void 0,void 0,(function(){return j(this,(function(i){return X("RongIMLib.searchMessages","RongIMLib.ElectronExtension.searchMessagesWithParams"),[2,Sr(n,t,e,r)]}))}))}function Bt(n,t,e){return V(this,void 0,void 0,(function(){return j(this,(function(r){return X("RongIMLib.deleteLocalMessagesByTimestamp","RongIMLib.electronExtension.deleteMessagesByTimestamp"),[2,Cr(n,t,e)]}))}))}function kt(n){return V(this,void 0,void 0,(function(){return j(this,(function(t){return X("RongIMLib.clearMessages","RongIMLib.electronExtension.clearMessages"),[2,Ir(n)]}))}))}function Vt(n,t,e,r){return V(this,void 0,void 0,(function(){return j(this,(function(i){return X("searchConversationByContent","electronExtension.searchConversationByContent"),[2,Er(n,null!=e?e:[p.TEXT,p.FILE],r,t)]}))}))}function jt(n,t){return V(this,void 0,void 0,(function(){var e=this;return j(this,(function(r){return[2,rn().next((function(r){return V(e,void 0,void 0,(function(){return j(this,(function(e){return[2,r.chat.clearUnreadCountByTimestamp(n,t)]}))}))}))]}))}))}function Yt(n,t){return V(this,void 0,void 0,(function(){return j(this,(function(e){return[2,Tr(n,t)]}))}))}function zt(n){return rn().next((function(t){return t.sse.requestStreamMessageContent(n)}))}function Wt(n,t){return V(this,void 0,void 0,(function(){var e=this;return j(this,(function(r){return[2,rn().next((function(r){return V(e,void 0,void 0,(function(){return j(this,(function(e){return[2,r.sendReadReceiptResponseV5(n,t)]}))}))}))]}))}))}function qt(n,t){return V(this,void 0,void 0,(function(){var e=this;return j(this,(function(r){return[2,rn().next((function(r){return V(e,void 0,void 0,(function(){return j(this,(function(e){return[2,r.getMessageReadReceiptInfoV5(n,t)]}))}))}))]}))}))}function Xt(n){return V(this,void 0,void 0,(function(){var t=this;return j(this,(function(e){return[2,rn().next((function(e){return V(t,void 0,void 0,(function(){return j(this,(function(t){return[2,e.getMessageReadReceiptInfoV5ByIdentifiers(n)]}))}))}))]}))}))}function Kt(n,t,e){return V(this,void 0,void 0,(function(){var r=this;return j(this,(function(i){return[2,rn().next((function(i){return V(r,void 0,void 0,(function(){return j(this,(function(r){return[2,i.getMessagesReadReceiptUsersByPageV5(n,t,e)]}))}))}))]}))}))}function Qt(n,t,e){return V(this,void 0,void 0,(function(){var r=this;return j(this,(function(i){return[2,rn().next((function(i){return V(r,void 0,void 0,(function(){return j(this,(function(r){return[2,i.getMessagesReadReceiptByUsersV5(n,t,e)]}))}))}))]}))}))}function Jt(n,t){return rn().next((function(e){return e.requestSpeechToTextForMessage(n,t)}))}function Zt(n){return rn().next((function(t){return t.translateMessagesWithParams(n)}))}function $t(n){return rn().next((function(t){return t.translateTextsWithParams(n)}))}function ne(n,t){return V(this,void 0,void 0,(function(){return j(this,(function(e){return X("modifyMessage","modifyMessageWithParams"),[2,te({messageUId:null==t?void 0:t.messageUId,messageContent:n,conversation:{conversationType:null==t?void 0:t.conversationType,targetId:null==t?void 0:t.targetId,channelId:null==t?void 0:t.channelId}})]}))}))}function te(n){return rn().next((function(t){return t.modifyMessageWithParams(n)}))}function ee(n){return rn().next((function(t){var e=function(n){return n.map((function(n){return{messageUId:n.messageUId,message:n.message?W(n.message):void 0,code:n.code}}))};return t.refreshReferenceMessageWithParams(k(k({},n),{remoteMessageBlock:function(t){n.remoteMessageBlock&&n.remoteMessageBlock(e(t))},localMessageBlock:function(t){n.localMessageBlock&&n.localMessageBlock(e(t))}}))}))}function re(n,t){return V(this,void 0,void 0,(function(){var e=this;return j(this,(function(r){switch(r.label){case 0:return X("getConversationList","getConversationListByTimestamp"),[4,rn().next((function(r){return V(e,void 0,void 0,(function(){return j(this,(function(e){return[2,r.getConversationList({count:(null==n?void 0:n.count)||300,startTime:(null==n?void 0:n.startTime)||0,order:null==n?void 0:n.order,channelId:t})]}))}))}))];case 1:return[2,r.sent().trans((function(n){return n.map(q)}))]}}))}))}function ie(n){return V(this,void 0,void 0,(function(){var t=this;return j(this,(function(e){switch(e.label){case 0:return[4,rn().next((function(e){return V(t,void 0,void 0,(function(){return j(this,(function(t){return[2,e.getAllConversationList(n)]}))}))}))];case 1:return[2,e.sent().trans((function(n){return n.map(q)}))]}}))}))}function oe(n){return V(this,void 0,void 0,(function(){var t=this;return j(this,(function(e){switch(e.label){case 0:return[4,rn().next((function(e){return V(t,void 0,void 0,(function(){return j(this,(function(t){return[2,e.getConversationListByTimestamp(n)]}))}))}))];case 1:return[2,e.sent().trans((function(n){return n.map(q)}))]}}))}))}function ue(n){return V(this,void 0,void 0,(function(){var t=this;return j(this,(function(e){return[2,rn().next((function(e){return V(t,void 0,void 0,(function(){return j(this,(function(t){switch(t.label){case 0:return[4,e.getConversation(n)];case 1:return[2,t.sent().trans((function(n){return q(n)}))]}}))}))}))]}))}))}var se=an("removeConversation",(function(n,t){return V(void 0,void 0,void 0,(function(){return j(this,(function(e){return[2,rn().next((function(e){return e.removeConversation(n,t)}))]}))}))}));function ae(n){return V(this,void 0,void 0,(function(){return j(this,(function(t){return X("batchRemoveConversation","batchDeleteConversations"),[2,ce({identifiers:n,deleteRemotely:!1,deleteMessages:!1})]}))}))}function ce(n){return V(this,void 0,void 0,(function(){return j(this,(function(t){return[2,rn().next((function(t){return t.batchDeleteConversations(n)}))]}))}))}function fe(n){return V(this,void 0,void 0,(function(){return j(this,(function(t){return[2,rn().next((function(t){return t.getTextMessageDraft(n)}))]}))}))}function de(n,t){return V(this,void 0,void 0,(function(){return j(this,(function(e){return[2,rn().next((function(e){return e.saveTextMessageDraft(n,t)}))]}))}))}function le(n){return V(this,void 0,void 0,(function(){return j(this,(function(t){return[2,rn().next((function(t){return t.clearTextMessageDraft(n)}))]}))}))}function he(n,t){return V(this,void 0,void 0,(function(){return j(this,(function(e){return[2,rn().next((function(e){return e.getTotalUnreadCount(t,n)}))]}))}))}function ve(n,t){return V(this,void 0,void 0,(function(){return j(this,(function(e){return[2,rn().next((function(e){return e.getTotalUnreadCountByLevels(n,t)}))]}))}))}function pe(n,t){return V(this,void 0,void 0,(function(){return j(this,(function(e){return[2,rn().next((function(e){return e.getTotalUnreadCountByLevels(n,t,!0)}))]}))}))}function ge(n){return V(this,void 0,void 0,(function(){return j(this,(function(t){return[2,rn().next((function(t){return t.getUnreadCount(n)}))]}))}))}var me=an("clearMessagesUnreadStatus",(function(n){return V(void 0,void 0,void 0,(function(){return j(this,(function(t){return[2,rn().next((function(t){return t.clearUnreadCount(n)}))]}))}))}));function Ee(){return V(this,void 0,void 0,(function(){return j(this,(function(n){return[2,rn().next((function(n){return n.clearAllUnreadCount()}))]}))}))}var _e=an("setConversationNotificationLevel",(function(n,t){return V(void 0,void 0,void 0,(function(){return j(this,(function(e){return[2,rn().next((function(e){return e.batchSetConversationNotificationLevel([n],t)}))]}))}))}));function Se(n,t){return V(this,void 0,void 0,(function(){return j(this,(function(e){return[2,rn().next((function(e){return e.batchSetConversationNotificationLevel(n,t)}))]}))}))}function Te(n,t){return V(this,void 0,void 0,(function(){return j(this,(function(e){return[2,rn().next((function(e){return e.batchSetConversationTranslateStrategy(n,t)}))]}))}))}function Ie(n,t){return V(this,void 0,void 0,(function(){var e=this;return j(this,(function(r){return[2,rn().next((function(r){return V(e,void 0,void 0,(function(){var e;return j(this,(function(i){return t!==y.CLOSE&&t!==y.OPEN?[2,d(l.INVALID_PARAMETER_NOTIFICATION_LEVEL)]:(e=P(t),[2,r.batchSetConversationNotificationLevel([n],e)])}))}))}))]}))}))}function Ce(n){return V(this,void 0,void 0,(function(){return j(this,(function(t){return[2,rn().next((function(t){return t.getConversationNotificationLevel(n)}))]}))}))}function Ae(n){return V(this,void 0,void 0,(function(){var t=this;return j(this,(function(e){return[2,rn().next((function(e){return V(t,void 0,void 0,(function(){return j(this,(function(t){switch(t.label){case 0:return[4,e.getConversationNotificationLevel(n)];case 1:return[2,t.sent().trans((function(n){return x(n)}))]}}))}))}))]}))}))}function be(){return V(this,void 0,void 0,(function(){return j(this,(function(n){switch(n.label){case 0:return[4,rn().next((function(n){return n.getBlockedConversationList()}))];case 1:return[2,n.sent().trans((function(n){return n.map(q)}))]}}))}))}function Re(n,t){return V(this,void 0,void 0,(function(){return j(this,(function(e){return[2,rn().next((function(e){return e.setConversationTypeNotificationLevel(n,t)}))]}))}))}function Ne(n){return V(this,void 0,void 0,(function(){return j(this,(function(t){return[2,rn().next((function(t){return t.getConversationTypeNotificationLevel(n)}))]}))}))}var Me=an("setConversationToTop",(function(n,t,e,r){return void 0===t&&(t=!0),void 0===e&&(e=!0),void 0===r&&(r=!1),V(void 0,void 0,void 0,(function(){return j(this,(function(i){return[2,rn().next((function(i){return i.batchSetConversationToTop([n],!!t,e,r)}))]}))}))}));function Ue(n,t,e,r){return void 0===e&&(e=!0),void 0===r&&(r=!0),V(this,void 0,void 0,(function(){return j(this,(function(i){return[2,rn().next((function(i){return i.batchSetConversationToTop(n,!!t,r,e)}))]}))}))}function Oe(n,t){return V(this,void 0,void 0,(function(){return j(this,(function(e){switch(e.label){case 0:return[4,rn().next((function(e){return e.getTopConversationList(n,t)}))];case 1:return[2,e.sent().trans((function(n){return n.map(q)}))]}}))}))}function ye(n){return V(this,void 0,void 0,(function(){return j(this,(function(t){switch(t.label){case 0:return[4,rn().next((function(t){return t.getUnreadConversationList(n)}))];case 1:return[2,t.sent().trans((function(n){return n.map(q)}))]}}))}))}function Pe(n){return V(this,void 0,void 0,(function(){return j(this,(function(t){return[2,rn().next((function(t){return t.getUnreadMentionedCount(n)}))]}))}))}function xe(){return V(this,void 0,void 0,(function(){return j(this,(function(n){return[2,rn().next((function(n){return n.getAllUnreadMentionedCount()}))]}))}))}function De(n){return V(this,void 0,void 0,(function(){return j(this,(function(t){switch(t.label){case 0:return[4,rn().next((function(t){var e,r,i;return t.getRealtimeConversations(null!==(e=null==n?void 0:n.count)&&void 0!==e?e:30,null!==(r=null==n?void 0:n.startTime)&&void 0!==r?r:0,null!==(i=null==n?void 0:n.order)&&void 0!==i?i:0)}))];case 1:return[2,t.sent().trans((function(n){return n.map(q)}))]}}))}))}function Le(){return V(this,void 0,void 0,(function(){return j(this,(function(n){return[2,rn().next((function(n){return n.getRealtimeConTotalUnreadCount()}))]}))}))}function Ge(n){return V(this,void 0,void 0,(function(){return j(this,(function(t){return[2,rn().next((function(t){return t.clearRealtimeConUnreadCount(n)}))]}))}))}function we(n){return V(this,void 0,void 0,(function(){return j(this,(function(t){return[2,rn().next((function(t){return t.removeRealtimeConversations(n)}))]}))}))}function Fe(n){return V(this,void 0,void 0,(function(){return j(this,(function(t){return[2,rn().next((function(t){return t.batchGetRealtimeConUnreadCount(n)}))]}))}))}function He(n){return V(this,void 0,void 0,(function(){return j(this,(function(t){switch(t.label){case 0:return[4,rn().next((function(t){return t.getUnreadMentionMeConversationList(n)}))];case 1:return[2,t.sent().trans((function(n){return n.map(q)}))]}}))}))}function Be(n){return V(this,void 0,void 0,(function(){return j(this,(function(t){return[2,rn().next((function(t){return t.getUltraGroupList(n)}))]}))}))}function ke(){return V(this,void 0,void 0,(function(){return j(this,(function(n){switch(n.label){case 0:return[4,rn().next((function(n){return n.getBlockedUGList()}))];case 1:return[2,n.sent().trans((function(n){return n.map((function(n){return q(n)}))}))]}}))}))}function Ve(n){return V(this,void 0,void 0,(function(){return j(this,(function(t){return[2,rn().next((function(t){return t.chat.sendUltraGroupTypingStatus(n)}))]}))}))}function je(n,t){return V(this,void 0,void 0,(function(){var e=this;return j(this,(function(r){switch(r.label){case 0:return[4,rn().next((function(r){return V(e,void 0,void 0,(function(){return j(this,(function(e){return[2,r.getUltraGroupMessageListByMessageUId(n,t)]}))}))}))];case 1:return[2,r.sent().trans((function(n){var t={};for(var e in n)t[e]=n[e]?W(n[e]):void 0;return t}))]}}))}))}function Ye(n,t){return V(this,void 0,void 0,(function(){return j(this,(function(e){return X("updateExpansionForUltraGroupMessage","updateMessageExpansion"),[2,Ot(n,t)]}))}))}function ze(n,t){return V(this,void 0,void 0,(function(){return j(this,(function(e){return X("removeExpansionForUltraGroupMessage","removeMessageExpansionForKey"),[2,yt(n,t)]}))}))}function We(n){return V(this,void 0,void 0,(function(){return j(this,(function(t){return[2,rn().next((function(t){return t.removeAllMessageExpansion(n)}))]}))}))}function qe(n,t){return V(this,void 0,void 0,(function(){return j(this,(function(e){return[2,rn().next((function(e){return e.getUGUnreadCountForAllChannels(n,!0,t)}))]}))}))}function Xe(n){return V(this,void 0,void 0,(function(){return j(this,(function(t){return[2,rn().next((function(t){return t.getUltraGroupDefaultNotificationLevel(null==n?void 0:n.targetId,null==n?void 0:n.channelId)}))]}))}))}function Ke(n,t){return V(this,void 0,void 0,(function(){return j(this,(function(e){return[2,rn().next((function(e){return e.setUltraGroupDefaultNotificationLevel(null==n?void 0:n.targetId,t,null==n?void 0:n.channelId)}))]}))}))}function Qe(n,t){return V(this,void 0,void 0,(function(){return j(this,(function(e){return[2,rn().next((function(e){return e.getUGUnreadCountForAllChannels(n,!1,t)}))]}))}))}function Je(){return V(this,void 0,void 0,(function(){return j(this,(function(t){return X("getAllUltraGroupUnreadCount","getTotalUnreadCountByLevels"),[2,ve([n.ULTRA_GROUP],[])]}))}))}function Ze(){return V(this,void 0,void 0,(function(){return j(this,(function(t){return X("getAllUltraGroupUnreadMentionedCount","getTotalUnreadMentionedCountByLevels"),[2,pe([n.ULTRA_GROUP],[])]}))}))}function $e(n){return V(this,void 0,void 0,(function(){return j(this,(function(t){return[2,rn().next((function(t){return t.getUGUnreadMentionedDigest(n)}))]}))}))}function nr(n){return V(this,void 0,void 0,(function(){return j(this,(function(t){return[2,rn().next((function(t){return t.getUGFirstUnreadMessageDigest(n)}))]}))}))}function tr(n){return V(this,void 0,void 0,(function(){return j(this,(function(t){return[2,rn().next((function(t){return t.getUGUnreadInfoList(n)}))]}))}))}function er(n){return V(this,void 0,void 0,(function(){return j(this,(function(t){return[2,rn().next((function(t){return t.addToBlacklist(n)}))]}))}))}function rr(n){return V(this,void 0,void 0,(function(){return j(this,(function(t){return[2,rn().next((function(t){return t.removeFromBlacklist(n)}))]}))}))}function ir(){return V(this,void 0,void 0,(function(){return j(this,(function(n){return[2,rn().next((function(n){return n.getBlacklist()}))]}))}))}function or(n){return V(this,void 0,void 0,(function(){return j(this,(function(t){switch(t.label){case 0:return[4,rn().next((function(t){return t.getBlacklistStatus(n)}))];case 1:return[2,t.sent().trans((function(n){return 0===n}))]}}))}))}function ur(n){return V(this,void 0,void 0,(function(){return j(this,(function(t){return[2,rn().next((function(t){return t.createTag(n)}))]}))}))}function sr(n){return V(this,void 0,void 0,(function(){return j(this,(function(t){return[2,rn().next((function(t){return t.removeTag(n)}))]}))}))}function ar(n){return V(this,void 0,void 0,(function(){return j(this,(function(t){return[2,rn().next((function(t){return t.updateTag(n)}))]}))}))}function cr(){return V(this,void 0,void 0,(function(){return j(this,(function(n){return[2,rn().next((function(n){return n.getTagList()}))]}))}))}function fr(n){return V(this,void 0,void 0,(function(){return j(this,(function(t){return[2,rn().next((function(t){return t.getTagsForConversation(n)}))]}))}))}function dr(n,t){return V(this,void 0,void 0,(function(){return j(this,(function(e){return[2,rn().next((function(e){return e.addTagForConversations(n,t)}))]}))}))}function lr(n,t){return V(this,void 0,void 0,(function(){return j(this,(function(e){return[2,rn().next((function(e){return e.removeTagForConversations(n,t)}))]}))}))}function hr(n,t){return V(this,void 0,void 0,(function(){return j(this,(function(e){return[2,rn().next((function(e){return e.removeTagsForConversation(n,t)}))]}))}))}function vr(n,t){return V(this,void 0,void 0,(function(){return j(this,(function(e){return[2,rn().next((function(e){return e.removeTagForConversations(n,t)}))]}))}))}function pr(n,t,e){return V(this,void 0,void 0,(function(){return j(this,(function(r){switch(r.label){case 0:return[4,rn().next((function(r){return r.getConversationListByTag(n,e,t)}))];case 1:return[2,r.sent().trans((function(n){return n.map((function(n){return k(k({},q(t=n)),{isTopInTag:t.isTopInTag});var t}))}))]}}))}))}function gr(n,t){return V(this,void 0,void 0,(function(){return j(this,(function(e){return[2,rn().next((function(e){return e.getUnreadCountByTag(n,t)}))]}))}))}function mr(n,t,e){return V(this,void 0,void 0,(function(){return j(this,(function(r){return[2,rn().next((function(r){return r.setConversationStatusInTag(n,t,{isTop:e})}))]}))}))}function Er(n,t,e,r){return V(this,void 0,void 0,(function(){var i=this;return j(this,(function(o){return[2,rn().next((function(o){return V(i,void 0,void 0,(function(){return j(this,(function(i){switch(i.label){case 0:return[4,o.searchConversationByContent(n,t,e,r)];case 1:return[2,i.sent().trans((function(n){return n.map((function(n){return q(n)}))}))]}}))}))}))]}))}))}function _r(n,t){return V(this,void 0,void 0,(function(){return j(this,(function(e){switch(e.label){case 0:return[4,rn().next((function(e){return e.searchMessages(n,t)}))];case 1:return[2,e.sent().trans((function(n){var t=n.totalMatched,e=n.messages;return n.conditionsMatched,{count:t,messages:e.map((function(n){return W(n)}))}}))]}}))}))}function Sr(n,t,e,r,i){return V(this,void 0,void 0,(function(){return j(this,(function(o){return X("RongIMLib.electronExtension.searchMessages","RongIMLib.electronExtension.searchMessagesWithParams"),[2,_r(n,{keyword:t,limit:r||L,order:0,timeRange:{endTime:e?e-1:e||0},messageFilter:{objectNames:i}})]}))}))}function Tr(n,t){return V(this,void 0,void 0,(function(){return j(this,(function(e){return X("setMessageReceivedStatus","setMessageReceivedStatusInfo"),[2,rn().next((function(e){return e.setMessageReceivedStatus(n,t)}))]}))}))}function Ir(n){return V(this,void 0,void 0,(function(){return j(this,(function(t){return[2,rn().next((function(t){return t.clearLocalMessages(n)}))]}))}))}function Cr(n,t,e){return V(this,void 0,void 0,(function(){return j(this,(function(r){return[2,rn().next((function(r){return r.deleteLocalMessagesByTimestamp(n,t,e)}))]}))}))}function Ar(n,t,e){return void 0===e&&(e={}),V(this,void 0,void 0,(function(){return j(this,(function(r){return t instanceof En?[2,Rr(n,t,e)]:[2,br(n,t,e)]}))}))}function br(n,t,e){return void 0===e&&(e={}),V(this,void 0,void 0,(function(){var r,i,o,u;return j(this,(function(s){switch(s.label){case 0:return r=!!(null==e?void 0:e.isUnread),i=null==e?void 0:e.searchContent,o=null==e?void 0:e.disableUpdateLastMessage,u={senderUserId:null==t?void 0:t.senderUserId,messageType:null==t?void 0:t.messageType,content:null==t?void 0:t.content,messageDirection:null==t?void 0:t.messageDirection,readStatus:"object"==typeof(null==t?void 0:t.receivedStatusInfo)?D(t.receivedStatusInfo):null==t?void 0:t.receivedStatus,sentTime:null==t?void 0:t.sentTime,sentStatus:null==t?void 0:t.sentStatus,searchContent:i,messageUId:"",isUnread:r,disableNotification:null==t?void 0:t.disableNotification,canIncludeExpansion:null==t?void 0:t.canIncludeExpansion,expansion:(null==t?void 0:t.expansion)||void 0,directedUserIds:null==t?void 0:t.directedUserIds,disableUpdateLastMessage:(null==t?void 0:t.disableUpdateLastMessage)||o},[4,rn().next((function(t){return t.insertMessage(n,u)}))];case 1:return[2,s.sent().trans(W)]}}))}))}function Rr(n,t,e){return void 0===e&&(e={}),V(this,void 0,void 0,(function(){var r,i,o,u;return j(this,(function(s){switch(s.label){case 0:return r=!!(null==e?void 0:e.isUnread),i=null==e?void 0:e.searchContent,o=null==e?void 0:e.disableUpdateLastMessage,u={senderUserId:"",messageType:null==t?void 0:t.messageType,content:null==t?void 0:t.content,searchContent:i,messageDirection:M.SEND,isUnread:r,messageUId:"",disableUpdateLastMessage:o},[4,rn().next((function(t){return t.insertMessage(n,u)}))];case 1:return[2,s.sent().trans(W)]}}))}))}function Nr(n){return V(this,void 0,void 0,(function(){return j(this,(function(t){switch(t.label){case 0:return[4,rn().next((function(t){return t.getLocalMessage(n)}))];case 1:return[2,t.sent().trans((function(n){return W(n)}))]}}))}))}var Mr=Object.freeze({__proto__:null,getAllConversationList:function(n){return V(this,void 0,void 0,(function(){return j(this,(function(t){return X("electronExtension.getAllConversationList","getAllConversationList"),[2,ie(n)]}))}))},getConversationList:function(n,t,e,r){return V(this,void 0,void 0,(function(){var i=this;return j(this,(function(o){switch(o.label){case 0:return X("electronExtension.getConversationList","getAllConversationList or getConversationListByTimestamp"),[4,rn().next((function(o){return V(i,void 0,void 0,(function(){return j(this,(function(i){return[2,o.getConversationList({startTime:n,count:t,channelId:e,topPriority:r})]}))}))}))];case 1:return[2,o.sent().trans((function(n){return n.map((function(n){return q(n)}))}))]}}))}))},searchConversationByContent:Er,getConversations:function(n){return V(this,void 0,void 0,(function(){return j(this,(function(t){switch(t.label){case 0:return[4,rn().next((function(t){return t.getConversations(n)}))];case 1:return[2,t.sent().trans((function(n){return n.map(q)}))]}}))}))},getUntaggedConversationListByPage:function(n,t,e){return V(this,void 0,void 0,(function(){var r=this;return j(this,(function(i){return[2,rn().next((function(i){return V(r,void 0,void 0,(function(){return j(this,(function(r){switch(r.label){case 0:return[4,i.getUntaggedConversationListByPage(n,t,e)];case 1:return[2,r.sent().trans((function(n){return n.map((function(n){return q(n)}))}))]}}))}))}))]}))}))},getRemoteConversations:function(){return V(this,void 0,void 0,(function(){return j(this,(function(n){return[2,rn().next((function(n){return n.syncRemoteConversations()}))]}))}))},saveEditedMessageDraft:function(n,t){return V(this,void 0,void 0,(function(){return j(this,(function(e){return[2,rn().next((function(e){return e.chat.saveEditedMessageDraft(n,t)}))]}))}))},getEditedMessageDraft:function(n){return V(this,void 0,void 0,(function(){return j(this,(function(t){return[2,rn().next((function(t){return t.chat.getEditedMessageDraft(n)}))]}))}))},clearEditedMessageDraft:function(n){return V(this,void 0,void 0,(function(){return j(this,(function(t){return[2,rn().next((function(t){return t.chat.clearEditedMessageDraft(n)}))]}))}))},searchMessages:Sr,searchMessageInTimeRange:function(n,t){return V(this,void 0,void 0,(function(){return j(this,(function(e){return X("RongIMLib.electronExtension.searchMessageInTimeRange","RongIMLib.electronExtension.searchMessagesWithParams"),[2,_r(n,{keyword:null==t?void 0:t.keyword,limit:(null==t?void 0:t.limit)||5,offset:null==t?void 0:t.offset,order:0,timeRange:{startTime:null==t?void 0:t.startTime,endTime:null==t?void 0:t.endTime}})]}))}))},searchMessagesByUser:function(n,t,e,r){return V(this,void 0,void 0,(function(){return j(this,(function(i){switch(i.label){case 0:return X("RongIMLib.electronExtension.searchMessagesByUser","RongIMLib.electronExtension.searchMessagesWithParams"),[4,_r(n,{limit:r,keyword:"",order:0,timeRange:{endTime:e?e-1:e||0},messageFilter:{senderIds:[t]}})];case 1:return[2,i.sent().trans((function(n){return{messages:n.messages}}))]}}))}))},getHistoryMessagesByMessageTypes:function(n,t){return V(this,void 0,void 0,(function(){return j(this,(function(e){switch(e.label){case 0:return[4,rn().next((function(e){return e.getHistoryMessagesByObjectNames(n,t)}))];case 1:return[2,e.sent().trans((function(n){var t=n.list,e=n.hasMore,r=t.map(W);return{messages:r,hasMore:e,list:r}}))]}}))}))},getContinuousMessages:function(n,t){return V(this,void 0,void 0,(function(){return j(this,(function(e){switch(e.label){case 0:return[4,rn().next((function(e){return e.getContinuousMessages(n,t)}))];case 1:return[2,e.sent().trans((function(n){var t=n.list,e=n.hasMore,r=n.timestamp;return{hasMore:e,list:t.map(W),timestamp:r}}))]}}))}))},setMessageStatusToRead:function(n,t){return V(this,void 0,void 0,(function(){return j(this,(function(e){return[2,rn().next((function(e){return e.setMessageStatusToRead(n,t)}))]}))}))},setMessageReceivedStatus:Tr,setMessageReceivedStatusInfo:function(n,t){return V(this,void 0,void 0,(function(){var e;return j(this,(function(r){return e=D(t||{}),[2,rn().next((function(t){return t.setMessageReceivedStatus(n,e)}))]}))}))},setMessageSentStatus:function(n,t){return V(this,void 0,void 0,(function(){return j(this,(function(e){return[2,rn().next((function(e){return e.setMessageSentStatus(n,t)}))]}))}))},setMessageContent:function(n,t,e){return V(this,void 0,void 0,(function(){return j(this,(function(r){return[2,rn().next((function(r){return r.setMessageContent(n,t,e)}))]}))}))},deleteMessages:function(n){return V(this,void 0,void 0,(function(){return j(this,(function(t){return[2,rn().next((function(t){return t.deleteLocalMessages(n)}))]}))}))},clearMessages:Ir,deleteMessagesByTimestamp:Cr,batchClearMessagesByTimestamp:function(n){return V(this,void 0,void 0,(function(){return j(this,(function(t){return[2,rn().next((function(t){return t.batchClearLocalMessagesByTimestamp(n)}))]}))}))},insertMessage:Ar,batchInsertMessage:function(n,t){return V(this,void 0,void 0,(function(){return j(this,(function(e){return[2,rn().next((function(e){return e.batchInsertMessage(n,t)}))]}))}))},getMessageCount:function(n){return V(this,void 0,void 0,(function(){return j(this,(function(t){return[2,rn().next((function(t){return t.getLocalMessageCount(n)}))]}))}))},setCheckDuplicateMessage:function(n){return V(this,void 0,void 0,(function(){return j(this,(function(t){return[2,rn().next((function(t){return t.setCheckDuplicateMessage(n)}))]}))}))},setCheckChatRoomDuplicateMessage:function(n){return V(this,void 0,void 0,(function(){return j(this,(function(t){return[2,rn().next((function(t){return t.chatroom.setCheckChatRoomDuplicateMessage(!!n)}))]}))}))},getMessagesAroundTimestamp:function(n,t){return V(this,void 0,void 0,(function(){return j(this,(function(e){switch(e.label){case 0:return[4,rn().next((function(e){var r=null==t?void 0:t.timestamp,i=null==t?void 0:t.beforeCount,o=null==t?void 0:t.afterCount;return e.getMessagesAroundTimestamp(n,r,i,o)}))];case 1:return[2,e.sent().trans((function(n){return n.map(W)}))]}}))}))},getLocalMessage:Nr,searchMessagesWithParams:function(n){return V(this,void 0,void 0,(function(){return j(this,(function(t){switch(t.label){case 0:return[4,rn().next((function(t){return t.searchMessagesWithParams(n)}))];case 1:return[2,t.sent().trans((function(n){n.totalMatched;var t=n.messages;return{count:n.conditionsMatched,messages:t.map((function(n){return W(n)}))}}))]}}))}))},setMessageSpeechToTextVisible:function(n,t){return rn().next((function(e){return e.setMessageSpeechToTextVisible(n,t)}))},deleteUltraGroupMessagesForAllChannel:function(n,t){return rn().next((function(e){return e.deleteLocalUGMessagesForAllChannel(n,t)}))},getUnreadMentionedMessages:function(n){return V(this,void 0,void 0,(function(){return j(this,(function(t){switch(t.label){case 0:return[4,rn().next((function(t){return t.getUnreadMentionedMessages(n)}))];case 1:return[2,t.sent().trans((function(n){return n.map(W)}))]}}))}))},clearLocalData:function(){return V(this,void 0,void 0,(function(){return j(this,(function(n){return[2,rn().next((function(n){return n.clearLocalData()}))]}))}))},enable:function(){return G()}});function Ur(n){return V(this,void 0,void 0,(function(){return j(this,(function(t){return[2,rn().next((function(t){return t.setProxy(n)}))]}))}))}function Or(){return V(this,void 0,void 0,(function(){return j(this,(function(n){return[2,rn().next((function(n){return n.getProxy()}))]}))}))}function yr(n,t){return V(this,void 0,void 0,(function(){return j(this,(function(e){return[2,rn().next((function(e){return e.testProxy(n,t)}))]}))}))}function Pr(n,t,e){return V(this,void 0,void 0,(function(){return j(this,(function(r){return[2,rn().next((function(r){return r.subscribeUser(n,t,e)}))]}))}))}function xr(n,t){return V(this,void 0,void 0,(function(){return j(this,(function(e){return[2,rn().next((function(e){return e.unSubscribeUser(n,t)}))]}))}))}function Dr(n,t,e){return V(this,void 0,void 0,(function(){return j(this,(function(r){return[2,rn().next((function(r){return r.getSubscribeUserList(n,t,e)}))]}))}))}function Lr(n,t){return V(this,void 0,void 0,(function(){return j(this,(function(e){return[2,rn().next((function(e){return e.getSubscribeUserStatus(n,t)}))]}))}))}function Gr(n){return rn().next((function(t){return t.updateMyUserProfile(n)}))}function wr(n){return rn().next((function(t){return t.getUserProfiles(n)}))}function Fr(){return rn().next((function(n){return n.getMyUserProfile()}))}function Hr(n){return rn().next((function(t){return t.dataHosting.updateMyUserProfileVisibility(n)}))}function Br(){return rn().next((function(n){return n.dataHosting.getMyUserProfileVisibility()}))}function kr(n){return rn().next((function(t){return t.dataHosting.searchUserProfileByUniqueId(n)}))}function Vr(n){return rn().next((function(t){return t.getSubscribeUsersOnlineStatus(n)}))}function jr(n,t){return V(this,void 0,void 0,(function(){return j(this,(function(e){return[2,rn().next((function(e){return e.dataHosting.createGroup(n,t)}))]}))}))}function Yr(n){return V(this,void 0,void 0,(function(){return j(this,(function(t){return[2,rn().next((function(t){return t.dataHosting.updateGroupInfo(n)}))]}))}))}function zr(n){return V(this,void 0,void 0,(function(){return j(this,(function(t){return[2,rn().next((function(t){return t.dataHosting.getGroupsInfo(n)}))]}))}))}function Wr(n,t,e){return V(this,void 0,void 0,(function(){return j(this,(function(r){return[2,rn().next((function(r){return r.dataHosting.kickGroupMembers(n,t,e)}))]}))}))}function qr(n,t){return V(this,void 0,void 0,(function(){return j(this,(function(e){return[2,rn().next((function(e){return e.dataHosting.quitGroup(n,t)}))]}))}))}function Xr(n){return V(this,void 0,void 0,(function(){return j(this,(function(t){return[2,rn().next((function(t){return t.dataHosting.dismissGroup(n)}))]}))}))}function Kr(n,t,e,r){return V(this,void 0,void 0,(function(){return j(this,(function(i){return[2,rn().next((function(i){return i.dataHosting.transferGroupOwner(n,t,!!e,r)}))]}))}))}function Qr(n,t){return V(this,void 0,void 0,(function(){return j(this,(function(e){return[2,rn().next((function(e){return e.dataHosting.addGroupManagers(n,t)}))]}))}))}function Jr(n,t){return V(this,void 0,void 0,(function(){return j(this,(function(e){return[2,rn().next((function(e){return e.dataHosting.removeGroupManagers(n,t)}))]}))}))}function Zr(n,t,e){return V(this,void 0,void 0,(function(){return j(this,(function(r){return[2,rn().next((function(r){return r.dataHosting.getGroupMembersByRole(n,t,e)}))]}))}))}function $r(n,t){return V(this,void 0,void 0,(function(){return j(this,(function(e){return[2,rn().next((function(e){return e.dataHosting.getGroupMembers(n,t)}))]}))}))}function ni(n,t,e,r){return V(this,void 0,void 0,(function(){return j(this,(function(i){return[2,rn().next((function(i){return i.dataHosting.setGroupMemberInfo(n,t,e,r)}))]}))}))}function ti(n,t,e){return V(this,void 0,void 0,(function(){return j(this,(function(r){return[2,rn().next((function(r){return r.dataHosting.searchGroupMembers(n,t,e)}))]}))}))}function ei(n){return V(this,void 0,void 0,(function(){return j(this,(function(t){return[2,rn().next((function(t){return t.dataHosting.joinGroup(n)}))]}))}))}function ri(n,t){return V(this,void 0,void 0,(function(){return j(this,(function(e){return[2,rn().next((function(e){return e.dataHosting.inviteUsersToGroup(n,t)}))]}))}))}function ii(n,t){return V(this,void 0,void 0,(function(){return j(this,(function(e){return[2,rn().next((function(e){return e.dataHosting.acceptGroupInvite(n,t)}))]}))}))}function oi(n,t,e){return V(this,void 0,void 0,(function(){return j(this,(function(r){return[2,rn().next((function(r){return r.dataHosting.refuseGroupInvite(n,t,e)}))]}))}))}function ui(n,t,e){return V(this,void 0,void 0,(function(){return j(this,(function(r){return[2,rn().next((function(r){return r.dataHosting.acceptGroupApplication(n,t,e)}))]}))}))}function si(n,t,e,r){return V(this,void 0,void 0,(function(){return j(this,(function(i){return[2,rn().next((function(i){return i.dataHosting.refuseGroupApplication(n,t,e,r)}))]}))}))}function ai(n,t,e){return V(this,void 0,void 0,(function(){return j(this,(function(r){return[2,rn().next((function(r){return r.dataHosting.getGroupApplications(n,t,e)}))]}))}))}function ci(n,t){return V(this,void 0,void 0,(function(){return j(this,(function(e){return[2,rn().next((function(e){return e.dataHosting.getJoinedGroupsByRole(t,n)}))]}))}))}function fi(n,t){return V(this,void 0,void 0,(function(){return j(this,(function(e){return[2,rn().next((function(e){return e.dataHosting.searchJoinedGroups(n,t)}))]}))}))}function di(n){return V(this,void 0,void 0,(function(){return j(this,(function(t){return[2,rn().next((function(t){return t.dataHosting.getJoinedGroups(n)}))]}))}))}function li(n,t){return V(this,void 0,void 0,(function(){return j(this,(function(e){return[2,rn().next((function(e){return e.dataHosting.setGroupRemark(n,t)}))]}))}))}function hi(n,t){return V(this,void 0,void 0,(function(){return j(this,(function(e){return[2,rn().next((function(e){return e.dataHosting.addGroupFollows(n,t)}))]}))}))}function vi(n,t){return V(this,void 0,void 0,(function(){return j(this,(function(e){return[2,rn().next((function(e){return e.dataHosting.removeGroupFollows(n,t)}))]}))}))}function pi(n){return V(this,void 0,void 0,(function(){return j(this,(function(t){return[2,rn().next((function(t){return t.dataHosting.getGroupFollows(n)}))]}))}))}function gi(n,t,e){return rn().next((function(r){return r.dataHosting.addFriend(n,t,e)}))}function mi(n,t){return rn().next((function(e){return e.dataHosting.deleteFriends(n,t)}))}function Ei(n){return rn().next((function(t){return t.dataHosting.acceptFriendRequest(n)}))}function _i(n){return rn().next((function(t){return t.dataHosting.refuseFriendRequest(n)}))}function Si(n,t,e){return rn().next((function(r){return r.dataHosting.setFriendInfo(n,t||"",e)}))}function Ti(n,t){return rn().next((function(e){return e.dataHosting.checkFriends(n,t)}))}function Ii(n,t){return rn().next((function(e){return e.dataHosting.getFriends(n,t)}))}function Ci(n,t,e){return rn().next((function(r){return r.dataHosting.getFriendApplications(n,t,e)}))}function Ai(n){return rn().next((function(t){return t.dataHosting.getFriendsInfo(n)}))}function bi(n){return rn().next((function(t){return t.dataHosting.searchFriendsInfo(n)}))}function Ri(n){return rn().next((function(t){return t.dataHosting.setFriendAddPermission(n)}))}function Ni(){return rn().next((function(n){return n.dataHosting.getFriendAddPermission()}))}function Mi(n){!function(n){var t,e,r;Z?nn.warn(v.A_INIT_REPEAT_O):(i("options.appkey",n.appkey,o.STRING,!0),i("options.navigators",n.navigators,(function(n){return u(n)&&(0===n.length||n.every(s))})),i("options.loggerProxy",n.loggerProxy,(function(n){return n instanceof a})),$=n,Z=c.init({appkey:n.appkey,navigators:n.navigators||[],miniCMPProxy:n.customCMP||[],logOutputLevel:n.logOutputLevel,httpInMainProcess:!!n.httpInMainProcess,logExpireTime:n.logExpireTime,areaCode:n.areaCode,logServerUrl:n.logServerUrl,uploadDomain:n.uploadDomain,environment:null!==(t=n.environment)&&void 0!==t?t:"default",eventLoopBlockingCheck:n.eventLoopBlockingCheck,enableReadReceiptStorage:null===(e=n.enableReadReceiptStorage)||void 0===e||e,useNaviV2:null!==(r=n.useNaviV2)&&void 0!==r&&r,loggerProxy:n.loggerProxy}),nn=Z.logger,Z.assignWatcher(Q),f.init(nn),Z.sse.on("message",(function(n,t){var e=k(k({},t),{message:t.message?W(t.message):void 0});K.emit(H.STREAM_MESSAGE_RESPONSE,e)})))}(n)}function Ui(){return V(this,void 0,void 0,(function(){return j(this,(function(n){return mn(),[2,tn()]}))}))}function Oi(){return en((function(n){return n.getConnectionStatus()}))}function yi(){return en((function(n){return n.getServerTime()}))}function Pi(){return en((function(n){return n.getCurrentUserId()}))}function xi(n,t){r.add(n,t)}function Di(){return en((function(n){return n.getDeviceId()}))}function Li(){var n=rn().tryTrans((function(n){return n.getAppSettings()}));return n.isOk?n.data:null}var Gi={COMET:"_",WEBSOCKET:"_"};function wi(n){return rn().next((function(t){return t.setNotificationQuietHoursWithSetting(n)}))}function Fi(){return rn().next((function(n){return n.removeNotificationQuietHoursSetting()}))}function Hi(){return rn().next((function(n){return n.getNotificationQuietHoursSetting()}))}function Bi(n,t){return V(this,void 0,void 0,(function(){return j(this,(function(e){switch(e.label){case 0:return[4,rn().next((function(e){return e.chatroom.joinChatroom(n,null==t?void 0:t.count,!0,null==t?void 0:t.extra)}))];case 1:return[2,e.sent().wipe()]}}))}))}function ki(n,t){return V(this,void 0,void 0,(function(){return j(this,(function(e){return[2,rn().next((function(e){return e.chatroom.joinChatroom(n,null==t?void 0:t.count,!1,null==t?void 0:t.extra)}))]}))}))}function Vi(n){return V(this,void 0,void 0,(function(){return j(this,(function(t){return[2,rn().next((function(t){return t.chatroom.quitChatroom(n)}))]}))}))}function ji(n,t){return V(this,void 0,void 0,(function(){return j(this,(function(e){return[2,rn().next((function(e){return e.chatroom.getChatroomInfo(n,null==t?void 0:t.count,null==t?void 0:t.order)}))]}))}))}function Yi(n,t){return V(this,void 0,void 0,(function(){return j(this,(function(e){return[2,rn().next((function(e){return e.chatroom.setChatroomEntry(n,t,!1)}))]}))}))}function zi(n,t){return V(this,void 0,void 0,(function(){return j(this,(function(e){switch(e.label){case 0:return[4,rn().next((function(e){return e.chatroom.setChatroomEntries(n,t)}))];case 1:return[2,e.sent().wipe()]}}))}))}function Wi(n,t){return V(this,void 0,void 0,(function(){return j(this,(function(e){return[2,rn().next((function(e){return e.chatroom.setChatroomEntry(n,t,!0)}))]}))}))}function qi(n,t){return V(this,void 0,void 0,(function(){return j(this,(function(e){return[2,rn().next((function(e){return e.chatroom.removeChatroomEntry(n,t,!1)}))]}))}))}function Xi(n,t){return V(this,void 0,void 0,(function(){return j(this,(function(e){return[2,rn().next((function(e){return e.chatroom.removeChatroomEntries(n,{keys:null==t?void 0:t.entries,notificationExtra:null==t?void 0:t.notificationExtra})}))]}))}))}function Ki(n,t){return V(this,void 0,void 0,(function(){return j(this,(function(e){return[2,rn().next((function(e){return e.chatroom.removeChatroomEntry(n,t,!0)}))]}))}))}function Qi(n,t){return V(this,void 0,void 0,(function(){return j(this,(function(e){return[2,rn().next((function(e){return e.chatroom.getChatroomEntry(n,t)}))]}))}))}function Ji(n){return V(this,void 0,void 0,(function(){return j(this,(function(t){return[2,rn().next((function(t){return t.chatroom.getAllChatroomEntries(n)}))]}))}))}function Zi(n,t){return V(this,void 0,void 0,(function(){return j(this,(function(e){switch(e.label){case 0:return[4,rn().next((function(e){return e.chatroom.getChatroomHistoryMessages(n,null==t?void 0:t.count,null==t?void 0:t.order,null==t?void 0:t.timestamp)}))];case 1:return[2,e.sent().trans((function(n){var t=n.list;return{hasMore:n.hasMore,list:t.map((function(n){return W(n)}))}}))]}}))}))}function $i(n){return V(this,void 0,void 0,(function(){return j(this,(function(t){return[2,rn().next((function(t){return t.chatroom.bindRTCRoomForChatroom(n)}))]}))}))}function no(n){return V(this,void 0,void 0,(function(){return j(this,(function(t){return[2,rn().next((function(t){return t.setTranslationLanguage(n)}))]}))}))}function to(){return V(this,void 0,void 0,(function(){return j(this,(function(n){return[2,rn().next((function(n){return n.getTranslationLanguage()}))]}))}))}function eo(n){return V(this,void 0,void 0,(function(){return j(this,(function(t){return[2,rn().next((function(t){return t.setAutoTranslateEnabled(n)}))]}))}))}function ro(){return V(this,void 0,void 0,(function(){return j(this,(function(n){return[2,rn().next((function(n){return n.getAutoTranslateEnabled()}))]}))}))}export{En as BaseMessage,Tn as CombineMessage,In as CombineV2Message,Cn as CommandMessage,Gi as ConnectType,H as Events,An as FileMessage,bn as GIFMessage,Rn as GroupNotificationMessage,Dn as HQVoiceMessage,Nn as ImageMessage,Mn as InformationNotificationMessage,Un as LocationMessage,On as ReferenceMessage,yn as RichContentMessage,Pn as SightMessage,xn as TextMessage,Qn as UploadTask,Ln as VoiceMessage,xi as __addSDKVersion,Ei as acceptFriendApplication,ui as acceptGroupApplication,ii as acceptGroupInvite,dr as addConversationsToTag,hn as addEventListener,gi as addFriend,hi as addGroupFollows,Qr as addGroupManagers,cn as addMonitor,ur as addTag,er as addToBlacklist,Ut as batchClearRemoteHistoryMessages,ce as batchDeleteConversations,bt as batchGetMessageReadReceiptInfoV4,ae as batchRemoveConversation,Se as batchSetConversationNotificationLevel,Ue as batchSetConversationToTop,Te as batchSetConversationTranslateStrategy,$i as bindRTCRoomForChatroom,Ti as checkFriends,Ee as clearAllMessagesUnreadStatus,mn as clearEventListeners,Mt as clearHistoryMessages,kt as clearMessages,me as clearMessagesUnreadStatus,Ge as clearRealtimeConUnreadCount,le as clearTextMessageDraft,jt as clearUnreadCountByTimestamp,dn as connect,jr as createGroup,tt as createUploadTask,mi as deleteFriends,Bt as deleteLocalMessagesByTimestamp,Nt as deleteMessages,Ui as destroy,ln as disconnect,Xr as dismissGroup,Mr as electronExtension,Ki as forceRemoveChatRoomEntry,Wi as forceSetChatRoomEntry,Ji as getAllChatRoomEntries,ie as getAllConversationList,Je as getAllUltraGroupUnreadCount,Ze as getAllUltraGroupUnreadMentionedCount,xe as getAllUnreadMentionedCount,Li as getAppSettings,ro as getAutoTranslateEnabled,ir as getBlacklist,or as getBlacklistStatus,ke as getBlockUltraGroupList,be as getBlockedConversationList,Qi as getChatRoomEntry,ji as getChatRoomInfo,Zi as getChatroomHistoryMessages,Oi as getConnectionStatus,ue as getConversation,re as getConversationList,oe as getConversationListByTimestamp,Ce as getConversationNotificationLevel,Ae as getConversationNotificationStatus,Ne as getConversationTypeNotificationLevel,pr as getConversationsFromTagByPage,Pi as getCurrentUserId,Di as getDeviceId,ot as getDownloadAuth,it as getFileToken,ut as getFileUrl,Lt as getFirstUnreadMessage,Gt as getFirstUnreadMessageInfo,Ni as getFriendAddPermission,Ci as getFriendApplications,Ii as getFriends,Ai as getFriendsInfo,ai as getGroupApplications,pi as getGroupFollows,$r as getGroupMembers,Zr as getGroupMembersByRole,zr as getGroupsInfo,gt as getHistoryMessages,di as getJoinedGroups,ci as getJoinedGroupsByRole,st as getMessage,qt as getMessageReadReceiptInfoV5,Xt as getMessageReadReceiptInfoV5ByIdentifiers,At as getMessageReadReceiptV4,xt as getMessageReader,Qt as getMessagesReadReceiptByUsersV5,Kt as getMessagesReadReceiptUsersByPageV5,Fr as getMyUserProfile,Br as getMyUserProfileVisibility,Hi as getNotificationQuietHoursSetting,Or as getProxy,Le as getRealtimeConTotalUnreadCount,Fe as getRealtimeConUnreadCounts,De as getRealtimeConversations,mt as getRemoteHistoryMessages,yi as getServerTime,Dr as getSubscribeUserList,Lr as getSubscribeUserStatus,Vr as getSubscribeUsersOnlineStatus,cr as getTags,fr as getTagsFromConversation,fe as getTextMessageDraft,Oe as getTopConversationList,he as getTotalUnreadCount,ve as getTotalUnreadCountByLevels,pe as getTotalUnreadMentionedCountByLevels,to as getTranslationLanguage,Xe as getUltraGroupDefaultNotificationLevel,nr as getUltraGroupFirstUnreadMessageTimestamp,Be as getUltraGroupList,je as getUltraGroupMessageListByMessageUId,Qe as getUltraGroupUnreadCountByTargetId,tr as getUltraGroupUnreadInfoList,qe as getUltraGroupUnreadMentionedCountByTargetId,$e as getUltraGroupUnreadMentionedMessages,ye as getUnreadConversationList,ge as getUnreadCount,gr as getUnreadCountByTag,He as getUnreadMentionMeConversationList,Pe as getUnreadMentionedCount,Ft as getUnreadMentionedMessages,wr as getUserProfiles,Mi as init,wt as insertMessage,on as installPlugin,ri as inviteUsersToGroup,Bi as joinChatRoom,ki as joinExistChatRoom,ei as joinGroup,Wr as kickGroupMembers,ne as modifyMessage,te as modifyMessageWithParams,vn as onceEventListener,Vi as quitChatRoom,qr as quitGroup,Rt as recallMessage,ee as refreshReferenceMessageWithParams,_i as refuseFriendApplication,si as refuseGroupApplication,oi as refuseGroupInvite,Dt as registerMessageType,We as removeAllExpansionForUltraGroupMessage,Xi as removeChatRoomEntries,qi as removeChatRoomEntry,se as removeConversation,lr as removeConversationsFromTag,pn as removeEventListener,gn as removeEventListeners,ze as removeExpansionForUltraGroupMessage,rr as removeFromBlacklist,vi as removeGroupFollows,Jr as removeGroupManagers,yt as removeMessageExpansionForKey,fn as removeMonitor,Fi as removeNotificationQuietHoursSetting,we as removeRealtimeConversations,sr as removeTag,vr as removeTagFromConversations,hr as removeTagsFromConversation,Jt as requestSpeechToTextForMessage,zt as requestStreamMessageContent,de as saveTextMessageDraft,Vt as searchConversationByContent,bi as searchFriendsInfo,ti as searchGroupMembers,fi as searchJoinedGroups,Ht as searchMessages,kr as searchUserProfileByUniqueId,dt as sendFileMessage,ht as sendGIFMessage,vt as sendHQVoiceMessage,lt as sendImageMessage,at as sendMessage,Et as sendReadReceiptMessage,Ct as sendReadReceiptMessageV4,_t as sendReadReceiptRequest,St as sendReadReceiptResponse,Tt as sendReadReceiptResponseV2,Wt as sendReadReceiptResponseV5,pt as sendSightMessage,It as sendSyncReadStatusMessage,ct as sendTextMessage,Pt as sendTypingStatusMessage,Ve as sendUltraGroupTypingStatus,eo as setAutoTranslateEnabled,zi as setChatRoomEntries,Yi as setChatRoomEntry,_e as setConversationNotificationLevel,Ie as setConversationNotificationStatus,Me as setConversationToTop,mr as setConversationToTopInTag,Re as setConversationTypeNotificationLevel,Ri as setFriendAddPermission,Si as setFriendInfo,ni as setGroupMemberInfo,li as setGroupRemark,Yt as setMessageReceivedStatus,wi as setNotificationQuietHoursWithSetting,Ur as setProxy,no as setTranslationLanguage,Ke as setUltraGroupDefaultNotificationLevel,et as stopUploadTask,Pr as subscribeUserStatus,yr as testProxy,Kr as transferGroupOwner,Zt as translateMessagesWithParams,$t as translateTextsWithParams,xr as unSubscribeUserStatus,Ye as updateExpansionForUltraGroupMessage,Yr as updateGroupInfo,Ot as updateMessageExpansion,Gr as updateMyUserProfile,Hr as updateMyUserProfileVisibility,ar as updateTag,rt as upload};