@rongcloud/imlib-next 5.10.2 → 5.10.4
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.d.ts +30 -2
- package/index.esm.js +2 -2
- package/index.js +1 -1
- package/package.json +2 -2
package/index.esm.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{httpRequest as e,NetworkType as t,HttpMethod as n,HTTP_TIMEOUT as i,appendUrl as o,ErrorCode as r,ReceivedStatus as a,ConversationType as s,EventEmitter as
|
|
1
|
+
import{httpRequest as e,NetworkType as t,HttpMethod as n,HTTP_TIMEOUT as i,appendUrl as o,ErrorCode as r,ReceivedStatus as a,ConversationType as s,EventEmitter as _,RCConnectionStatus as c,VersionManage as d,assert as u,AssertRules as T,isArray as E,isHttpUrl as S,APIContext as l,LogTagId as A,logger as R,ValidatorManage as v,validate as f,isValidConversationType as I,isValidNotificationLevel as O,NotificationLevel as N,UltraGroupChannelType as g,isNumber as C,isString as h,isLimitedString as m,MAX_CHATROOM_NOTIFICATION_EXTRA_LENGTH as U,MessageType as p,MAX_UPLOAD_FILE_SIZE as y,UPLOAD_FILE_CHUNK_SIZE as G,UploadMethod as M,fixUrlProtocol as L,FileType as P,getUUID as D,MAX_MESSAGE_CONTENT_BYTES as w,isValidFileType as B,usingCppEngine as V,isLimitedArray as b,isValidTargetId as J,MessageDirection as F,SentStatus as H,isUndefined as Y,notEmptyString as x,isValidConversation as k,transformReceivedStatusFlag as K,isInteger as X,UserProfileVisibility as q,SubscribeType as z}from"@rongcloud/engine";export{AreaCode,ChatroomEntryType,ChatroomSyncStatusReason,ChatroomUserChangeType,ChrmMemBanType,ChrmMemOperateType,ChrmSyncStatus,ConnectionStatus,ConversationType,ErrorCode,FileType,InterruptionLevel,LogL,LogLevel,MentionedType,MessageBlockSourceType,MessageBlockType,MessageDirection,NotificationLevel,NotificationStatus,OnlineStatus,OperateStatus,PlatformInfo,PushImportanceHonor,RCConnectionStatus,ReceivedStatus,SentStatus,SubscribeOperationType,SubscribeType,UltraGroupChannelChangeType,UltraGroupChannelType,UploadMethod,UserProfileVisibility}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 j=function(e,t){return j=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])},j(e,t)};function Q(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}j(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var X=function(){return X=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},X.apply(this,arguments)};function Z(e,t,n,i){return new(n||(n=Promise))((function(o,r){function a(e){try{c(i.next(e))}catch(e){r(e)}}function s(e){try{c(i.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((i=i.apply(e,t||[])).next())}))}function $(e,t){var n,i,o,r,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return r={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function s(r){return function(s){return function(r){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,i&&(o=2&r[0]?i.return:r[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,r[1])).done)return o;switch(i=0,o&&(r=[2&r[0],o.value]),r[0]){case 0:case 1:o=r;break;case 4:return a.label++,{value:r[1],done:!1};case 5:a.label++,i=r[1],r=[0];continue;case 7:r=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==r[0]&&2!==r[0])){a=0;continue}if(3===r[0]&&(!o||r[1]>o[0]&&r[1]<o[3])){a.label=r[1];break}if(6===r[0]&&a.label<o[1]){a.label=o[1],o=r;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(r);break}o[2]&&a.ops.pop(),a.trys.pop();continue}r=t.call(e,a)}catch(e){r=[6,e],i=0}finally{n=o=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}([r,s])}}}var ee=function(){return!("undefined"==typeof uni||!function(e){for(var t=["request","getSystemInfo"],n=0,i=t.length;n<i;n++)if(!e[t[n]])return!1;return!0}(uni))},te=ee();var ne=null,ie=function(e){return Z(void 0,void 0,void 0,(function(){var t;return $(this,(function(n){switch(n.label){case 0:return[4,oe.getNetworkType()];case 1:return t=n.sent(),ne({status:"online"===e.type,type:t}),[2]}}))}))};var oe={tag:"browser",httpReq:function(t){return e(t).result()},localStorage:null===window||void 0===window?void 0:window.localStorage,sessionStorage:null===window||void 0===window?void 0:window.sessionStorage,useNavi:!0,connectPlatform:"",isFromUniapp:te,createWebSocket:function(e,t){var n=new WebSocket(e,t);return n.binaryType="arraybuffer",{id:Date.now(),onClose:function(e){n.onclose=function(t){var n=t.code,i=t.reason;e(n,i)}},onError:function(e){n.onerror=e},onMessage:function(e){n.onmessage=function(t){e(t.data)}},onOpen:function(e){n.onopen=e},send:function(e){n.send(e)},close:function(e,t){n.close()}}},getNetworkType:function(){var e=navigator.connection||navigator.mozConnection||navigator.webkitConnection||{effectiveType:t.UNKONWN},n=e.type,i=e.effectiveType,o=n||i||t.UNKONWN;return Promise.resolve(o)},setNetworkStatusListener:function(e){ne=e,"undefined"!=typeof window&&window&&(window.addEventListener("offline",ie),window.addEventListener("online",ie))},removeNetworkStatusListener:function(){"undefined"!=typeof window&&window&&(window.removeEventListener("offline",ie),window.removeEventListener("online",ie)),ne=null}},re=ee(),ae=function(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];try{return wx[e].apply(wx,t)}catch(e){null===console||void 0===console||console.error(e)}}},se={setItem:ae("setStorageSync"),getItem:ae("getStorageSync"),removeItem:ae("removeStorageSync"),clear:ae("clearStorageSync")},ce=null,de=function(e){var t=e.isConnected,n=e.networkType;ce({status:t,type:n})};var ue={tag:"wechat",httpReq:function(e){var t=e.method||n.GET,a=e.timeout||i,s=e.headers,c=e.query,d=e.body,u=o(e.url,c);return new Promise((function(e){wx.request({url:u,method:t,header:s,timeout:a,data:d,success:function(t){e({data:t.data,status:t.statusCode})},fail:function(){e({status:r.RC_HTTP_REQ_FAIL})}})}))},localStorage:se,sessionStorage:se,useNavi:!1,connectPlatform:"MiniProgram",isFromUniapp:re,createWebSocket:function(e,t){var n=wx.connectSocket({url:e,protocols:t});return{id:Date.now(),onClose:function(e){n.onClose((function(t){e(t.code,t.reason)}))},onError:function(e){n.onError((function(t){e(t.errMsg)}))},onMessage:function(e){n.onMessage((function(t){e(t.data)}))},onOpen:function(e){n.onOpen(e)},send:function(e){n.send({data:e})},close:function(e,t){n.close({code:e,reason:t})}}},getNetworkType:function(){return new Promise((function(e){wx.getNetworkType({success:function(t){var n=t.networkType;e(n)},fail:function(){e(t.UNKONWN)}})}))},setNetworkStatusListener:function(e){ce=e,wx.onNetworkStatusChange(de)},removeNetworkStatusListener:function(){wx.offNetworkStatusChange(de),ce=null}},le=ee(),ve=function(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];try{if("setStorageSync"===e)return my[e]({key:t[0],data:JSON.parse(t[1])});if("clearStorageSync"===e)return my[e]();if("removeStorageSync"===e)return my[e]({key:t[0]});var i=my[e]({key:t[0]}).data;return i?JSON.stringify(i):i}catch(e){}}},fe={setItem:ve("setStorageSync"),getItem:ve("getStorageSync"),removeItem:ve("removeStorageSync"),clear:ve("clearStorageSync")},ge=null,Se=function(e){var t=e.isConnected,n=e.networkType;ge({status:t,type:n})};var he={tag:"alipay",httpReq:function(e){var t=e.method||n.GET,a=e.timeout||i,s=e.headers,c=e.query,d=e.body,u=o(e.url,c),l=e.dataType||"json";return new Promise((function(e){my.request({url:u,method:t,headers:s,timeout:a,data:d,dataType:l,success:function(t){e({data:t.data,status:t.status})},fail:function(){e({status:r.RC_HTTP_REQ_FAIL})}})}))},localStorage:fe,sessionStorage:fe,useNavi:!1,connectPlatform:"MiniProgram",isFromUniapp:le,createWebSocket:function(e){var t=my.connectSocket({url:e,multiple:!0});return{id:Date.now(),onClose:function(e){t.onClose(e)},onError:function(e){t.onError((function(t){e(t.errMsg)}))},onMessage:function(e){t.onMessage((function(t){t.data.isBuffer?e(my.base64ToArrayBuffer(t.data.data)):e(t.data.data)}))},onOpen:function(e){t.onOpen(e)},send:function(e){t.send({data:my.arrayBufferToBase64(e),isBuffer:!0})},close:function(){t.close()}}},getNetworkType:function(){return new Promise((function(e){my.getNetworkType({success:function(t){var n=t.networkType;e(n)},fail:function(){e(t.UNKONWN)}})}))},setNetworkStatusListener:function(e){ge=e,my.onNetworkStatusChange(Se)},removeNetworkStatusListener:function(){my.offNetworkStatusChange(Se),ge=null}},Te=ee(),Ie=function(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];try{return tt[e].apply(tt,t)}catch(e){}}},_e={setItem:Ie("setStorageSync"),getItem:Ie("getStorageSync"),removeItem:Ie("removeStorageSync"),clear:Ie("clearStorageSync")},me=null,pe=function(e){var t=e.isConnected,n=e.networkType;me({status:t,type:n})};var Ne={tag:"toutiao",useNavi:!1,connectPlatform:"MiniProgram",isFromUniapp:Te,localStorage:_e,sessionStorage:_e,httpReq:function(e){return new Promise((function(t){tt.request({url:e.url,data:e.body,header:e.headers,method:e.method,success:function(e){var n=(null==e?void 0:e.data)||{},i={data:JSON.stringify(n),status:e.statusCode};t(i)},fail:function(e){t({status:r.RC_HTTP_REQ_FAIL})}})}))},createWebSocket:function(e,t){var n=tt.connectSocket({url:e,protocols:t});return{id:Date.now(),onOpen:function(e){n.onOpen(e)},onClose:function(e){n.onClose((function(t){return e(t.code,t.reason)}))},onError:function(e){n.onError((function(t){return e(t.errMsg)}))},onMessage:function(e){n.onMessage((function(t){return e(t.data)}))},send:function(e){n.send({data:e})},close:function(e,t){n.close({code:e,reason:t})}}},getNetworkType:function(){return new Promise((function(e){tt.getNetworkType({success:function(t){var n=t.networkType;e(n)},fail:function(){e(t.UNKONWN)}})}))},setNetworkStatusListener:function(e){me=e,tt.onNetworkStatusChange(pe)},removeNetworkStatusListener:function(){tt.offNetworkStatusChange(pe),me=null}},Ee=ee(),ye=function(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];try{return swan[e].apply(swan,t)}catch(e){}}},Re={setItem:ye("setStorageSync"),getItem:ye("getStorageSync"),removeItem:ye("removeStorageSync"),clear:ye("clearStorageSync")},Ce=null,Oe=function(e){var t=e.isConnected,n=e.networkType;Ce({status:t,type:n})};var Ae={tag:"baidu",useNavi:!1,connectPlatform:"MiniProgram",isFromUniapp:Ee,localStorage:Re,sessionStorage:Re,httpReq:function(e){return new Promise((function(t){swan.request({url:e.url,data:e.body,header:e.headers,method:e.method,success:function(e){var n=(null==e?void 0:e.data)||{},i={data:JSON.stringify(n),status:e.statusCode};t(i)},fail:function(e){t({status:r.RC_HTTP_REQ_FAIL})}})}))},createWebSocket:function(e,t){var n=swan.connectSocket({url:e,protocols:t});return{id:Date.now(),onOpen:function(e){n.onOpen(e)},onClose:function(e){n.onClose((function(t){return e(t.code,t.reason)}))},onError:function(e){n.onError((function(t){return e(t.errMsg)}))},onMessage:function(e){n.onMessage((function(t){return e(t.data)}))},send:function(e){n.send({data:e})},close:function(e,t){n.close({code:e,reason:t})}}},getNetworkType:function(){return Z(this,void 0,void 0,(function(){return $(this,(function(e){return[2,new Promise((function(e){swan.getNetworkType({success:function(t){var n=t.networkType;e(n)},fail:function(){e(t.UNKONWN)}})}))]}))}))},setNetworkStatusListener:function(e){Ce=e,swan.onNetworkStatusChange(Oe)},removeNetworkStatusListener:function(){swan.offNetworkStatusChange(Oe),Ce=null}},Ue=ee(),we=function(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];try{return jd[e].apply(jd,t)}catch(e){null===console||void 0===console||console.error(e)}}},Pe={setItem:we("setStorageSync"),getItem:we("getStorageSync"),removeItem:we("removeStorageSync"),clear:we("clearStorageSync")},Me=null,be=function(e){var t=e.isConnected,n=e.networkType;Me({status:t,type:n})};var Le={tag:"jingdong",httpReq:function(e){var t=e.method||n.GET,a=e.timeout||i,s=e.headers,c=e.query,d=e.body,u=o(e.url,c);return new Promise((function(e){jd.request({url:u,method:t,header:s,timeout:a,data:d,success:function(t){e({data:t.data,status:t.statusCode})},fail:function(){e({status:r.RC_HTTP_REQ_FAIL})}})}))},localStorage:Pe,sessionStorage:Pe,useNavi:!1,connectPlatform:"MiniProgram",isFromUniapp:Ue,createWebSocket:function(e,t){return jd.connectSocket({url:e,protocols:t}),{id:Date.now(),onClose:function(e){jd.onSocketClose((function(t){e(t.code,t.reason)}))},onError:function(e){jd.onSocketError((function(t){e(t.errMsg)}))},onMessage:function(e){jd.onSocketMessage((function(t){e(t.data)}))},onOpen:function(e){jd.onSocketOpen(e)},send:function(e){jd.sendSocketMessage({data:e})},close:function(e,t){jd.closeSocket({code:e,reason:t})}}},getNetworkType:function(){return new Promise((function(e){jd.getNetworkType({success:function(t){var n=t.networkType;e(n)},fail:function(){e(t.UNKONWN)}})}))},setNetworkStatusListener:function(e){Me=e,jd.onNetworkStatusChange(be)},removeNetworkStatusListener:function(){jd.offNetworkStatusChange(be),Me=null}},Ge=function(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];try{return uni[e].apply(uni,t)}catch(e){null===console||void 0===console||console.error(e)}}},Je={setItem:Ge("setStorageSync"),getItem:Ge("getStorageSync"),removeItem:Ge("removeStorageSync"),clear:Ge("clearStorageSync")},De=null,Be=function(e){var t=e.isConnected,n=e.networkType;De({status:t,type:n})};var xe,ke={tag:"uniapp",httpReq:function(e){var t=e.method||n.GET,a=e.timeout||i,s=e.headers,c=e.query,d=e.body,u=o(e.url,c);return new Promise((function(e){uni.request({url:u,method:t,header:s,timeout:a,data:d,success:function(t){e({data:t.data,status:t.statusCode})},fail:function(){e({status:r.RC_HTTP_REQ_FAIL})}})}))},localStorage:Je,sessionStorage:Je,useNavi:!0,connectPlatform:"",isFromUniapp:!0,createWebSocket:function(e,t){var n={complete:function(){},url:e,protocols:t},i=uni.connectSocket(n);return{id:Date.now(),onClose:function(e){i.onClose((function(t){e(t.code,t.reason)}))},onError:function(e){i.onError((function(t){e(t.errMsg)}))},onMessage:function(e){i.onMessage((function(t){e(t.data)}))},onOpen:function(e){i.onOpen(e)},send:function(e){i.send({data:e})},close:function(e,t){i.close({code:e,reason:t})}}},getNetworkType:function(){return new Promise((function(e){uni.getNetworkType({success:function(t){var n=t.networkType;e(n)},fail:function(){e(t.UNKONWN)}})}))},setNetworkStatusListener:function(e){De=e,uni.onNetworkStatusChange(Be)},removeNetworkStatusListener:function(){uni.offNetworkStatusChange(Be),De=null}},Ve=function(e){return e&&e.request&&e.getSystemInfo},He="undefined"!=typeof uni&&Ve(uni)?function(){switch(process.env.VUE_APP_PLATFORM){case"app-plus":return ke;case"mp-jd":return Le;case"mp-baidu":return Ae;case"mp-toutiao":return Ne;case"mp-alipay":return he;case"mp-weixin":return ue;default:return oe}}():"undefined"!=typeof jd&&Ve(jd)?Le:"undefined"!=typeof my&&Ve(my)?he:"undefined"!=typeof tt&&Ve(tt)?Ne:"undefined"!=typeof swan&&Ve(swan)?Ae:"undefined"!=typeof wx&&Ve(wx)?ue:oe;function Fe(e){var t=e.conversationType,n=e.channelId,i=e.messageType,o=e.content,r=e.senderUserId,s=e.targetId,c=e.sentTime,d=e.receivedTime,u=e.messageUId,l=e.messageDirection,v=e.isPersited,f=e.isCounted,g=e.isOffLineMessage,S=e.canIncludeExpansion,h=e.expansion,T=e.receivedStatus,I=e.receivedStatusInfo,_=e.disableNotification,m=e.isMentioned,p=e.isStatusMessage,N=e.readReceiptInfo,E=e.pushConfig,y=e.messageId,R=e.isInterrupt,C=e.isModifyMessage,O=e.channelType,A=e.sentStatus,U=e.directedUserIds;return T||(T=a.UNREAD),{messageType:i,channelId:n||"",content:o,senderUserId:r,targetId:s,conversationType:t,sentTime:c,receivedTime:d,messageUId:u,messageDirection:l,isPersited:v,isCounted:f,isMentioned:m,disableNotification:_,isStatusMessage:p,canIncludeExpansion:S,expansion:h,receivedStatus:T,receivedStatusInfo:I,readReceiptInfo:N,pushConfig:E,messageId:y,isInterrupt:R,isModifyMessage:C,sentStatus:A,isOffLineMessage:g,channelType:O,directedUserIds:U}}function Ye(e){var t=e.conversationType,n=e.targetId,i=e.latestMessage,o=e.unreadMessageCount,r=e.hasMentioned,a=e.mentionedInfo,c=e.lastUnreadTime,d=e.notificationStatus,u=e.notificationLevel,l=e.isTop,v=e.channelId,f=e.unreadMentionedCount,g=e.matchCount,S=e.operationTime,h=e.draft,T={conversationType:t,targetId:n,latestMessage:i&&Fe(i),unreadMessageCount:o,hasMentioned:r,mentionedInfo:r?{type:null==a?void 0:a.type,userIdList:null==a?void 0:a.userIdList}:void 0,lastUnreadTime:c,notificationStatus:d,notificationLevel:u,isTop:l,channelId:v,unreadMentionedCount:f,matchCount:g,operationTime:S,draft:h||""};return T.conversationType===s.ULTRA_GROUP&&(T.firstUnreadMessage=e.firstUnreadMessage,T.channelType=e.channelType,T.unreadMentionedMeCount=e.unreadMentionedMeCount),T}function qe(e,t){null===console||void 0===console||console.warn("Method '"+e+"' is deprecated, please use '"+t+"' instead")}!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.CONVERSATION_TAG="CONVERSATION_TAG",e.TYPING_STATUS="TYPING_STATUS",e.MESSAGE_BLOCKED="MESSAGE_BLOCKED",e.ULTRA_GROUP_ENABLE="ULTRA_GROUP_ENABLE",e.OPERATE_STATUS="OPERATE_STATUS",e.ULTRA_GROUP_MESSAGE_EXPANSION_UPDATED="ULTRA_GROUP_MESSAGE_EXPANSION_UPDATED",e.ULTRA_GROUP_MESSAGE_MODIFIED="ULTRA_GROUP_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.PRIVATE_MESSAGE_DELIVERED="PRIVATE_MESSAGE_DELIVERED",e.GROUP_MESSAGE_DELIVERED="GROUP_MESSAGE_DELIVERED",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"}(xe||(xe={}));var Ke,ze="A-add_to_blacklist-T",We="A-add_to_blacklist-R",je="A-remove_from_blacklist-T",Qe="A-remove_from_blacklist-R",Xe="A-get_blacklist-T",Ze="A-get_blacklist-R",$e="A-get_blacklist_status-T",et="A-get_blacklist_status-R",nt="A-get_chatroom_info-T",it="A-get_chatroom_info-R",ot="A-set_chatroom_entry-T",rt="A-set_chatroom_entry-R",at="A-set_chatroom_entries-T",st="A-set_chatroom_entries-R",ct="A-force_set_chatroom_entry-T",dt="A-force_set_chatroom_entry-R",ut="A-remove_chatroom_entry-T",lt="A-remove_chatroom_entry-R",vt="A-remove_chatroom_entries-T",ft="A-remove_chatroom_entries-R",gt="A-force_remove_chatroom_entry-T",St="A-force_remove_chatroom_entry-R",ht="A-get_chatroom_entry-T",Tt="A-get_chatroom_entry-R",It="A-get_all_chatroom_entries-T",_t="A-get_all_chatroom_entries-R",mt="A-get_chatroom_history_messages-T",pt="A-get_chatroom_history_messages-R",Nt="A-bind_rtc_room_for_chatroom-T",Et="A-bind_rtc_room_for_chatroom-R",yt="A-get_top_conversation_list-R",Rt="A-get_top_conversation_list-T",Ct="A-get_conversation_list-T",Ot="A-get_conversation_list-R",At="A-get_conversation-T",Ut="A-get_conversation-R",wt="A-remove_conversation-T",Pt="A-remove_conversation-R",Mt="A-get_conversation_message_draft-T",bt="A-get_conversation_message_draft-R",Lt="A-save_conversation_message_draft-T",Gt="A-save_conversation_message_draft-R",Jt="A-clear_conversation_message_draft-T",Dt="A-clear_conversation_message_draft-R",Bt="A-get_total_unread_count-T",xt="A-get_total_unread_count-R",kt="A-get_total_unread_count_by_levels-T",Vt="A-get_total_unread_count_by_levels-R",Ht="A-get_unread_count-T",Ft="A-get_unread_count-R",Yt="A-clear_unread_count-T",qt="A-clear_unread_count-R",Kt="A-clear_all_unread_count-O",zt="A-set_conversation_notification_level-T",Wt="A-set_conversation_notification_level-R",jt="A-set_conversation_status-T",Qt="A-set_conversation_status-R",Xt="A-get_conversation_notification_level-T",Zt="A-get_conversation_notification_level-R",$t="A-get_conversation_notification_status-T",en="A-get_conversation_notification_status-R",tn="A-set_conversation_notification_status-T",nn="A-set_conversation_notification_status-R",on="A-get_unread_conversation_list-T",rn="A-get_unread_conversation_list-R",an="A-get_unread_mentioned_count-T",sn="A-get_unread_mentioned_count-R",cn="A-get_all_unread_mentioned_count-T",dn="A-get_all_unread_mentioned_count-R",un="A-get_all_conversation-state-T",ln="A-e_get_all_conversation_list-T",vn="A-e_get_all_conversation_list-R",fn="A-e_get_conversation_list-T",gn="A-e_get_conversation_list-R",Sn="A-e_search_conversation_by_content-T",hn="A-e_search_conversation_by_content-R",Tn="A-get_conversations-T",In="A-get_conversations-R",_n="A-e_search_messages-T",mn="A-e_search_messages-R",pn="A-e_search_message_in_time_range-T",Nn="A-e_search_message_in_time_range-R",En="A-e_search_messages_by_user-T",yn="A-e_search_messages_by_user-R",Rn="A-e_get_history_messages_by_message_types-T",Cn="A-e_get_history_messages_by_message_types-R",On="A-e_get_continuous_messages-T",An="A-e_get_continuous_messages-R",Un="A-e_set_message_status_to_read-T",wn="A-e_set_message_status_to_read-R",Pn="A-e_set_message_received_status-T",Mn="A-e_set_message_received_status-R",bn="A-e_set_message_sent_status-T",Ln="A-e_set_message_sent_status-R",Gn="A-e_set_message_sent_status_info-T",Jn="A-e_set_message_sent_status_info-R",Dn="A-e_set_message_content-T",Bn="A-e_set_message_content-R",xn="A-e_delete_messages-T",kn="A-e_delete_messages-R",Vn="A-e_clear_messages-T",Hn="A-e_clear_messages-R",Fn="A-e_delete_messages_by_timestamp-T",Yn="A-e_delete_messages_by_timestamp-R",qn="A-e_insert_message-T",Kn="A-e_insert_message-R",zn="A-e_batch_insert_message-T",Wn="A-e_batch_insert_message-R",jn="A-e_get_message_count-T",Qn="A-e_get_message_count-R",Xn="A-e_get_private_message_deliver_time-T",Zn="A-e_get_private_message_deliver_time-R",$n="A-e_get_group_message_deliver_list-T",ei="A-e_get_group_message_deliver_list-R",ti="A-e_set_check_duplicate_message-T",ni="A-e_set_check_duplicate_message-R",ii="A-e_set_check_duplicate_message-T",oi="A-e_set_check_duplicate_message-R",ri="A-batch_Remove_conversation-T",ai="A-batch_Remove_conversation-R",si="A-batch_set_con_notifi_level-T",ci="A-batch_set_con_notifi_level-R",di="A-batch_set_con_to_top-T",ui="A-batch_set_con_to_top-R",li="A-batch_clear_remote_msg-T",vi="A-batch_clear_remote_msg-R",fi="A-batch_clear_msg-T",gi="A-batch_clear_msg-R",Si="A-get_remote_history_messages-T",hi="A-get_remote_history_messages-R",Ti="A-recall_message-T",Ii="A-recall_message-R",_i="A-delete_remote_message-T",mi="A-delete_remote_message-R",pi="A-delete_remote_message_by_timestamp-T",Ni="A-delete_remote_message_by_timestamp-R",Ei="A-update_message_expansion-T",yi="A-update_message_expansion-R",Ri="A-remove_message_expansion_for_key-T",Ci="A-remove_message_expansion_for_key-R",Oi="A-get_message_reader-T",Ai="A-get_message_reader-R",Ui="A-get_first_unread_message-T",wi="A-get_first_unread_message-R",Pi="A-get_first_unread_message_info-T",Mi="A-get_first_unread_message_info-R",bi="A-insert_message-T",Li="A-insert_message-R",Gi="A-get_message-T",Ji="A-get_message-R",Di="A-get_unread_mentioned_messages-T",Bi="A-get_unread_mentioned_messages-R",xi="A-delete_local_messages_by_timestamp-T",ki="A-delete_local_messages_by_timestamp-R",Vi="A-clear_messages-T",Hi="A-clear_messages-R",Fi="A-search_conversation_by_content-T",Yi="A-search_conversation_by_content-R",qi="A-clear_unread_count_by_timestamp-T",Ki="A-clear_unread_count_by_timestamp-R",zi="A-set_message_received_status-T",Wi="A-set_message_received_status-R",ji="A-set_proxy-T",Qi="A-set_proxy-R",Xi="A-get_proxy-T",Zi="A-get_proxy-R",$i="A-test_proxy-T",eo="A-test_proxy-R",to="A-add_tag-T",no="A-add_tag-R",io="A-remove_tag-T",oo="A-remove_tag-R",ro="A-update_tag-T",ao="A-update_tag-R",so="A-get_tags-T",co="A-get_tags-R",uo="A-get_tags_for_conversation-T",lo="A-get_tags_for_conversation-R",vo="A-add_tag_for_conversations-T",fo="A-add_tag_for_conversations-R",go="A-remove_conversations_from_tag-T",So="A-remove_conversations_from_tag-R",ho="A-remove_tags_from_conversation-T",To="A-remove_tags_from_conversation-R",Io="A-remove_tag_from_conversations-T",_o="A-remove_tag_from_conversations-R",mo="A-get_conversations_from_tag_by_page-T",po="A-get_conversations_from_tag_by_page-R",No="A-get_unread_count_by_tag-T",Eo="A-get_unread_count_by_tag-R",yo="A-set_conversation_status_in_tag-R",Ro="A-get_ultra_group_list-T",Co="A-get_ultra_group_list-R",Oo="A-get_block_ultra_group_list-T",Ao="A-get_block_ultra_group_list-R",Uo="A-send_ultra_group_typing_status-T",wo="A-send_ultra_group_typing_status-R",Po="A-get_ultra_group_message_list_by_message_uid-T",Mo="A-get_ultra_group_message_list_by_message_uid-R",bo="A-update_expansion_for_ultra_group_message-T",Lo="A-update_expansion_for_ultra_group_message-R",Go="A-remove_expansion_for_ultra_group_message-T",Jo="A-remove_expansion_for_ultra_group_message-R",Do="A-remove_all_expansion_for_ultra_group_message-T",Bo="A-remove_all_expansion_for_ultra_group_message-R",xo="A-modify_message-T",ko="A-modify_message-R",Vo="A-get_ultra_group_unread_mentioned_count_by_target_id-T",Ho="A-get_ultra_group_unread_mentioned_count_by_target_id-R",Fo="A-get_ultra_group_default_notification_level-T",Yo="A-get_ultra_group_default_notification_level-R",qo="A-set_ultra_group_default_notification_level-T",Ko="A-set_ultra_group_default_notification_level-R",zo="A-get_ultra_group_unread_count_by_target_id-T",Wo="A-get_ultra_group_unread_count_by_target_id-R",jo="A-get_all_ultra_group_unread_count-T",Qo="A-get_all_ultra_group_unread_count-R",Xo="A-get_all_ultra_group_unread_mentioned_count-T",Zo="A-get_all_ultra_group_unread_mentioned_count-R",$o="A-get_ultra_group_unread_mentioned_messages-T",er="A-get_ultra_group_unread_mentioned_messages-R",tr="A-get_ultra_group_first_unread_message_timestamp-T",nr="A-get_ultra_group_first_unread_message_timestamp-R",ir="A-get_ultra_group_unread_info_list-T",or="A-get_ultra_group_unread_info_list-R",rr="A-subscribe_user_status-T",ar="A-subscribe_user_status-R",sr="A-unsubscribe_user_status-T",cr="A-unsubscribe_user_status-R",dr="A-get_subscribe_user_status-T",ur="A-get_subscribe_user_status-R",lr="A-get_subscribe_user_status_list-T",vr="A-get_subscribe_user_status_list-R",fr="A-get_message_by_timestamp-T",gr="A-get_message_by_timestamp-R",Sr="A-update_my_user_profile-T",hr="A-update_my_user_profile-R",Tr="A-get_user_profiles-T",Ir="A-get_user_profiles-R",_r="A-get_my_user_profile-T",mr="A-get_my_user_profile-R",pr="A-update_my_user_profile_visibility-T",Nr="A-update_my_user_profile_visibility-R",Er="A-get_my_user_profile_visibility-T",yr="A-get_my_user_profile_visibility-R",Rr="A-search_user_profile_by_unique_id-T",Cr="A-search_user_profile_by_unique_id-R";!function(e){e[e.DISALLOW=0]="DISALLOW",e[e.ALLOW=1]="ALLOW"}(Ke||(Ke={}));var Or=new c,Ar={connection:function(e,t){switch(e){case d.CONNECTED:Or.emit(xe.CONNECTED);break;case d.CONNECTING:Or.emit(xe.CONNECTING);break;case d.SUSPENDED:Or.emit(xe.SUSPEND,t);break;case d.DISCONNECTED:Or.emit(xe.DISCONNECT,t)}},batchMessage:function(e){Or.emit(xe.MESSAGES,{messages:e.map((function(e){return Fe(e)}))})},typingState:function(e){Or.emit(xe.TYPING_STATUS,{status:e})},readReceiptReceived:function(e,t,n,i){Or.emit(xe.READ_RECEIPT_RECEIVED,{conversation:e,messageUId:t,sentTime:n,sendUserId:i})},messageReceiptRequest:function(e,t,n){Or.emit(xe.MESSAGE_RECEIPT_REQUEST,{conversation:e,messageUId:t,senderUserId:n})},messageReceiptResponse:function(e,t,n){Or.emit(xe.MESSAGE_RECEIPT_RESPONSE,{conversation:e,receivedUserId:t,messageUIdList:n})},conversationState:function(e){var t=e.map((function(e){var t=e.conversationType,n={conversationType:t,latestMessage:e.latestMessage?Fe(e.latestMessage):null,targetId:e.targetId,unreadMessageCount:e.unreadMessageCount,unreadMentionedCount:e.unreadMentionedCount,notificationStatus:e.notificationStatus,notificationLevel:e.notificationLevel,lastUnreadTime:e.lastUnreadTime,channelId:e.channelId};return t===s.ULTRA_GROUP?(n.versionTime=e.versionTime,n.unreadMessageCount=Ur(e.unreadMessageCount||0),n.unreadMentionedCount=Ur(e.unreadMentionedCount||0),n.unreadMentionedMeCount=Ur(e.unreadMentionedMeCount||0),{conversation:n}):(n.hasMentioned=e.hasMentioned,n.mentionedInfo=e.mentionedInfo,n.isTop=e.isTop,{conversation:n,updatedItems:e.updatedItems})}));Or.emit(xe.CONVERSATION,{conversationList:t})},chatroomState:function(e){Or.emit(xe.CHATROOM,e)},expansion:function(e){Or.emit(xe.EXPANSION,e)},pullFinished:function(){Or.emit(xe.PULL_OFFLINE_MESSAGE_FINISHED)},tag:function(){Or.emit(xe.TAG)},conversationTagChanged:function(){Or.emit(xe.CONVERSATION_TAG)},messageBlocked:function(e){Or.emit(xe.MESSAGE_BLOCKED,e)},messageDelivered:function(e){Or.emit(xe.PRIVATE_MESSAGE_DELIVERED,e)},groupMessageDeliveredStatus:function(e){Or.emit(xe.GROUP_MESSAGE_DELIVERED,e)},ultraGroupEnable:function(e){Or.emit(xe.ULTRA_GROUP_ENABLE,e.map((function(e){return Ye(e)})))},operateStatus:function(e){Or.emit(xe.OPERATE_STATUS,e)},ultraGroupMessageExpansionUpdated:function(e){Or.emit(xe.ULTRA_GROUP_MESSAGE_EXPANSION_UPDATED,e.map((function(e){return Fe(e)})))},ultraGroupMessageModified:function(e){Or.emit(xe.ULTRA_GROUP_MESSAGE_MODIFIED,e.map((function(e){return Fe(e)})))},ultraGroupMessageRecalled:function(e){Or.emit(xe.ULTRA_GROUP_MESSAGE_RECALLED,e.map((function(e){return Fe(e)})))},ultraGroupChannelChangeType:function(e){Or.emit(xe.ULTRA_GROUP_CHANNEL_TYPE_CHANGE,e)},ultraGroupChannelUserKicked:function(e){Or.emit(xe.ULTRA_GROUP_CHANNEL_USER_KICKED,e)},ultraGroupChannelDelete:function(e){Or.emit(xe.ULTRA_GROUP_CHANNEL_DELETE,e)},userGroupStatus:function(e){Or.emit(xe.USER_GROUP_STATUS,e)},messageReadReceipt:function(e){Or.emit(xe.MESSAGE_READ_RECEIPT_V4,e)},syncReadStatus:function(e){Or.emit(xe.SYNC_READ_STATUS,e)},subscribedUserStatusChange:function(e){Or.emit(xe.SUBSCRIBED_USER_STATUS_CHANGE,e)},subscribedRelationChange:function(e){Or.emit(xe.SUBSCRIBED_RELATION_CHANGE,e)},syncSubscribedUserStatusFinished:function(e){Or.emit(xe.SYNC_SUBSCRIBED_USER_STATUS_FINISHED,e)},ownUserProfileChanged:function(e){Or.emit(xe.OWN_USER_PROFILE_CHANGED,e)}};function Ur(e){return e>999?999:e}u.add("imlib-next","5.10.2");var wr=null,Pr=null,Mr=null;function br(){return Z(this,void 0,void 0,(function(){return $(this,(function(e){switch(e.label){case 0:return wr?(Mr.info(h.A_DESTROY_O),[4,S.destroy()]):[2];case 1:return e.sent(),Pr=null,wr=null,Mr=null,[2]}}))}))}function Lr(e){if(!wr)throw new Error("Not initialized yet!");return e(wr,Mr,Pr)}function Gr(e){return wr?e(wr,Mr,Pr):Promise.resolve({code:r.BIZ_ERROR_CLIENT_NOT_INIT})}function Jr(e,t,n){Or.on(e,t,n)}function Dr(e,t,n){Or.once(e,t,n)}function Br(e,t,n){Or.off(e,t,n)}function xr(e){Or.removeAll(e)}function kr(){Or.clear()}function Vr(e){!function(e){var t,n,i=e.appkey,o=e.navigators;wr?Mr.warn(h.A_INIT_REPEAT_O):(l("options.appkey",e.appkey,v.STRING,!0),l("options.navigators",e.navigators,(function(e){return f(e)&&(0===e.length||e.every(g))})),Pr=e,wr=S.init((null===(t=e.__runtimeCreator__)||void 0===t?void 0:t.call(e))||He,{appkey:e.appkey,navigators:e.navigators||[],miniCMPProxy:e.customCMP||[],logOutputLevel:e.logOutputLevel,__reportLogLevel:e.__reportLogLevel,httpInMainProcess:!!e.httpInMainProcess,logExpireTime:e.logExpireTime,areaCode:e.areaCode,logServerUrl:e.logServerUrl,uploadDomain:e.uploadDomain,environment:null!==(n=e.environment)&&void 0!==n?n:"default"}),(Mr=wr.createLogger("RC-IM","IM")).setOutputLevel(e.logOutputLevel),Mr.info(h.A_INIT_O,JSON.stringify({appkey:i,navigators:o,version:"5.10.2",commit:"3cbfa0729fd40ab8df50322aa87f2e7cc2601fcc"})),wr.assignWatcher(Ar),T.init(Mr))}(e)}function Hr(){return Z(this,void 0,void 0,(function(){return $(this,(function(e){return wr?(kr(),[2,br()]):[2]}))}))}function Fr(){return Lr((function(e){return e.getConnectionStatus()}))}function Yr(){return Lr((function(e){return e.getServerTime()}))}function qr(){return Lr((function(e){return e.getCurrentUserId()}))}function Kr(e,t){u.add(e,t)}function zr(){return Lr((function(e){return e.getDeviceId()}))}function Wr(e,t){return Lr((function(n){return n.install(e,t)}))}var jr={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:r.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:r.NOT_SUPPORT,msg:"The method is not supported in a browser!"}},Qr={},Xr={};for(var Zr in jr){var $r=jr[Zr],ea=$r.code;Qr[ea]=Zr,Xr[ea]=$r}function ta(e,t){return Z(this,void 0,void 0,(function(){var n=this;return $(this,(function(i){return[2,new I(h.A_CONNECT_T,h.A_CONNECT_R).validate("token",e,v.STRING,!0).ifReady((function(i,o){return Z(n,void 0,void 0,(function(){var n,a,s;return $(this,(function(c){switch(c.label){case 0:return n=o.createTraceId(),o.info(h.A_CONNECT_T,JSON.stringify({token:e,reconnectKickEnable:t}),n),[4,i.connect(e,!!t,n)];case 1:return a=c.sent(),s=a.code===r.SUCCESS?"info":"warn",o[s](h.A_CONNECT_R,JSON.stringify({code:a.code,userId:a.userId}),n),a.code===r.SUCCESS?[2,{code:a.code,data:{userId:a.userId}}]:[2,{code:a.code,msg:Qr[a.code]}]}}))}))}))]}))}))}function na(e){return T.info(h.A_DISCONNECT_O,{}),Lr((function(t){return t.disconnect(e)}))}function ia(e,t){return Z(this,void 0,void 0,(function(){var n=this;return $(this,(function(i){return[2,new I(Ct,Ot).validate("count",null==e?void 0:e.count,v.NUMBER).validate("startTime",null==e?void 0:e.startTime,v.NUMBER).validate("order",null==e?void 0:e.order,v.NUMBER).validate("channelId",t,v.CHANNEL_ID).ifReady((function(i,o){return Z(n,void 0,void 0,(function(){var n,a,s,c,d;return $(this,(function(u){switch(u.label){case 0:return n=o.createTraceId(),o.info(Ct,JSON.stringify({count:null==e?void 0:e.count,startTime:null==e?void 0:e.startTime,order:null==e?void 0:e.order,channelId:t}),n),[4,i.getConversationList(null==e?void 0:e.count,void 0,null==e?void 0:e.startTime,null==e?void 0:e.order,t)];case 1:return a=u.sent(),s=a.code,c=a.data,s===r.SUCCESS&&c?(d=c.map((function(e){return Ye(e)})),o.info(Ot,JSON.stringify({code:s,list:d.length}),n),[2,{code:0,data:d}]):(o.warn(Ot,JSON.stringify({code:s})),[2,{code:s,msg:Qr[s]}])}}))}))}))]}))}))}function oa(e){return Z(this,void 0,void 0,(function(){var t=this;return $(this,(function(n){return[2,new I(At,Ut).validate("conversation",e,v.OBJECT,!0).validate("conversationType",null==e?void 0:e.conversationType,v.CONVERSATION_TYPE,!0).validate("targetId",null==e?void 0:e.targetId,v.STRING,!0).validate("channelId",null==e?void 0:e.channelId,v.CHANNEL_ID).ifReady((function(n,i){return Z(t,void 0,void 0,(function(){var t,o,a,s,c,d,u,l;return $(this,(function(v){switch(v.label){case 0:return t=e.conversationType,o=e.targetId,a=e.channelId,s=i.createTraceId(),i.info(At,JSON.stringify({conversationType:t,targetId:o,channelId:a}),s),[4,n.getConversation(t,o,a||"")];case 1:return c=v.sent(),d=c.code,u=c.data,l=d===r.SUCCESS?"info":"warn",i[l](Ut,JSON.stringify({code:d}),s),d!==r.SUCCESS?[2,{code:d,msg:Qr[d]}]:[2,{code:d,data:u?Ye(u):null}]}}))}))}))]}))}))}function ra(e){return Z(this,void 0,void 0,(function(){var t=this;return $(this,(function(n){return[2,new I(wt,Pt).validate("conversation",e,v.OBJECT,!0).validate("conversationType",null==e?void 0:e.conversationType,v.CONVERSATION_TYPE,!0).validate("targetId",null==e?void 0:e.targetId,v.STRING,!0).validate("channelId",null==e?void 0:e.channelId,v.CHANNEL_ID).ifReady((function(n,i){return Z(t,void 0,void 0,(function(){var t,o,a,s,c,d;return $(this,(function(u){switch(u.label){case 0:return t=e.conversationType,o=e.targetId,a=e.channelId,s=i.createTraceId(),i.info(wt,JSON.stringify({conversationType:t,targetId:o,channelId:a}),s),[4,n.removeConversation(t,o,a)];case 1:return c=u.sent(),d=c===r.SUCCESS?"info":"warn",i[d](Pt,JSON.stringify({code:c}),s),c!==r.SUCCESS?[2,{code:c,msg:Qr[c]}]:[2,{code:c}]}}))}))}))]}))}))}function aa(e){return Z(this,void 0,void 0,(function(){var t=this;return $(this,(function(n){return[2,new I(ri,ai).validate("conversations",e,(function(t){if(!_("conversations",t,v.ARRAY,!0))return!1;if(t.length>20||0===t.length)return!1;for(var n=0,i=e;n<i.length;n++){var o=i[n];if(!(_("conversations",o,v.OBJECT,!0)&&_("conversations.targetId",o.targetId,v.STRING,!0)&&_("conversations.conversationType",o.conversationType,(function(e){var t=[s.PRIVATE,s.GROUP,s.SYSTEM].includes(e);return t||console.warn(ai,"conversations.conversationType is invalid, It should be one of the following values:\n ConversationType.PRIVATE,\n ConversationType.GROUP,\n ConversationType.SYSTEM,\n "),t}),!0)&&_("conversations.channelId",o.channelId,v.ONLY_STRING)))return!1}return!0}),!0).ifReady((function(n,i){return Z(t,void 0,void 0,(function(){var t,o,a;return $(this,(function(s){switch(s.label){case 0:return t=e.map((function(e){return{conversationType:e.conversationType,targetId:e.targetId,channelId:e.channelId||""}})),o=i.createTraceId(),i.info(ri,"conversations: "+JSON.stringify(t),o),[4,n.batchRemoveConversation(t)];case 1:return a=s.sent(),i[r.SUCCESS===a?"info":"warn"](ai,"code: "+a,o),[2,{code:a}]}}))}))}))]}))}))}function sa(e){return Z(this,void 0,void 0,(function(){var t=this;return $(this,(function(n){return[2,new I(Mt,bt).validate("conversation",e,v.OBJECT,!0).validate("conversationType",null==e?void 0:e.conversationType,v.CONVERSATION_TYPE,!0).validate("targetId",null==e?void 0:e.targetId,v.STRING,!0).validate("channelId",null==e?void 0:e.channelId,v.CHANNEL_ID).ifReady((function(n,i){return Z(t,void 0,void 0,(function(){var t,o,a,s,c,d,u,l;return $(this,(function(v){switch(v.label){case 0:return t=e.conversationType,o=e.targetId,a=e.channelId,s=i.createTraceId(),i.info(Mt,JSON.stringify({conversationType:t,targetId:o,channelId:a}),s),[4,n.getConversationMessageDraft(t,o,a)];case 1:return c=v.sent(),d=c.code,u=c.data,l=d===r.SUCCESS?"info":"warn",i[l](bt,JSON.stringify({code:d,data:u}),s),d===r.SUCCESS?[2,{code:d,data:u||""}]:[2,{code:d,msg:Qr[d]}]}}))}))}))]}))}))}function ca(e,t){return Z(this,void 0,void 0,(function(){var n=this;return $(this,(function(i){return[2,new I(Lt,Gt).validate("conversation",e,v.OBJECT,!0).validate("conversationType",null==e?void 0:e.conversationType,v.CONVERSATION_TYPE,!0).validate("targetId",null==e?void 0:e.targetId,v.STRING,!0).validate("channelId",null==e?void 0:e.channelId,v.CHANNEL_ID).validate("draft",t,v.STRING,!0).ifReady((function(i,o){return Z(n,void 0,void 0,(function(){var n,a,s;return $(this,(function(c){switch(c.label){case 0:return n=o.createTraceId(),o.info(Lt,JSON.stringify({conversationType:e.conversationType,targetId:e.targetId,channelId:e.channelId,draft:t}),n),[4,i.saveConversationMessageDraft(e.conversationType,e.targetId,t,e.channelId)];case 1:return a=c.sent(),s=a===r.SUCCESS?"info":"warn",o[s](Gt,JSON.stringify({code:a}),n),a===r.SUCCESS?[2,{code:a}]:[2,{code:a,msg:Qr[a]}]}}))}))}))]}))}))}function da(e){return Z(this,void 0,void 0,(function(){var t=this;return $(this,(function(n){return[2,new I(Jt,Dt).validate("conversation",e,v.OBJECT,!0).validate("conversationType",null==e?void 0:e.conversationType,v.CONVERSATION_TYPE,!0).validate("targetId",null==e?void 0:e.targetId,v.STRING,!0).validate("channelId",null==e?void 0:e.channelId,v.CHANNEL_ID).ifReady((function(n,i){return Z(t,void 0,void 0,(function(){var t,o,a,s,c,d;return $(this,(function(u){switch(u.label){case 0:return t=e.conversationType,o=e.targetId,a=e.channelId,s=i.createTraceId(),i.info(Jt,JSON.stringify({conversationType:t,targetId:o,channelId:a}),s),[4,n.clearConversationMessageDraft(t,o,a)];case 1:return c=u.sent(),d=c===r.SUCCESS?"info":"warn",i[d](Dt,JSON.stringify({code:c}),s),c===r.SUCCESS?[2,{code:c}]:[2,{code:c,msg:Qr[c]}]}}))}))}))]}))}))}function ua(e,t){return Z(this,void 0,void 0,(function(){var n=this;return $(this,(function(i){return[2,new I(Bt,xt).validate("conversationTypes",t,(function(e){return!!f(e)&&!e.some((function(e){return!m(e)}))}),!1).ifReady((function(i,o){return Z(n,void 0,void 0,(function(){var n,a,s,c;return $(this,(function(d){switch(d.label){case 0:return n=o.createTraceId(),o.info(Bt,JSON.stringify({conversationTypes:t,includeMuted:e}),n),[4,i.getTotalUnreadCount("",t,e)];case 1:return a=d.sent(),s=a.code,c=a.data,s===r.SUCCESS?(o.info(xt,JSON.stringify({code:s,data:c}),n),[2,{code:s,data:c}]):(o.warn(xt,JSON.stringify({code:s}),n),[2,{code:s,msg:Qr[s]}])}}))}))}))]}))}))}function la(e,t){return Z(this,void 0,void 0,(function(){var n=this;return $(this,(function(i){return[2,new I(kt,Vt).validate("conversationTypes",e,(function(e){return!!f(e)&&!e.some((function(e){return!m(e)}))}),!0).validate("levels",t,(function(e){return!!f(t)&&!e.some((function(e){return!p(e)}))}),!0).ifReady((function(i,o){return Z(n,void 0,void 0,(function(){var n,a,s,c;return $(this,(function(d){switch(d.label){case 0:return n=o.createTraceId(),o.info(kt,JSON.stringify({conversationTypes:e,levels:t,isMentioned:!1}),n),[4,i.getTotalUnreadCountByLevels(e,t)];case 1:return a=d.sent(),s=a.code,c=a.data,s===r.SUCCESS?(o.info(Vt,JSON.stringify({code:s,data:c}),n),[2,{code:s,data:c}]):(o.warn(Vt,JSON.stringify({code:s}),n),[2,{code:s,msg:Qr[s]}])}}))}))}))]}))}))}function va(e,t){return Z(this,void 0,void 0,(function(){var n=this;return $(this,(function(i){return[2,new I(kt,Vt).validate("conversationTypes",e,(function(e){return!!f(e)&&!e.some((function(e){return!m(e)}))}),!0).validate("levels",t,(function(e){return!!f(e)&&!e.some((function(e){return!p(e)}))}),!0).ifReady((function(i,o){return Z(n,void 0,void 0,(function(){var n,a,s,c;return $(this,(function(d){switch(d.label){case 0:return n=o.createTraceId(),o.info(kt,JSON.stringify({conversationTypes:e,levels:t,isMentioned:!0}),n),[4,i.getTotalUnreadCountByLevels(e,t,!0)];case 1:return a=d.sent(),s=a.code,c=a.data,s===r.SUCCESS?(o.info(Vt,JSON.stringify({code:s,data:c}),n),[2,{code:s,data:c}]):(o.warn(Vt,JSON.stringify({code:s}),n),[2,{code:s,msg:Qr[s]}])}}))}))}))]}))}))}function fa(e){return Z(this,void 0,void 0,(function(){var t=this;return $(this,(function(n){return[2,new I(Ht,Ft).validate("conversation",e,v.OBJECT,!0).validate("conversationType",null==e?void 0:e.conversationType,v.CONVERSATION_TYPE,!0).validate("targetId",null==e?void 0:e.targetId,v.STRING,!0).validate("channelId",null==e?void 0:e.channelId,v.CHANNEL_ID).ifReady((function(n,i){return Z(t,void 0,void 0,(function(){var t,o,a,s,c,d,u;return $(this,(function(l){switch(l.label){case 0:return t=e.conversationType,o=e.targetId,a=e.channelId,s=i.createTraceId(),i.info(Ht,JSON.stringify({conversationType:t,targetId:o,channelId:a}),s),[4,n.getUnreadCount(t,o,a)];case 1:return c=l.sent(),d=c.code,u=c.data,d===r.SUCCESS?(i.info(Ft,JSON.stringify({code:d,data:u})),[2,{code:d,data:u}]):(i.warn(Ft,JSON.stringify({code:d})),[2,{code:d,msg:Qr[d]}])}}))}))}))]}))}))}function ga(e){return Z(this,void 0,void 0,(function(){var t=this;return $(this,(function(n){return[2,new I(Yt,qt).validate("conversation",e,v.OBJECT,!0).validate("conversationType",null==e?void 0:e.conversationType,v.CONVERSATION_TYPE,!0).validate("targetId",null==e?void 0:e.targetId,v.STRING,!0).validate("channelId",null==e?void 0:e.channelId,v.CHANNEL_ID).ifReady((function(n,i){return Z(t,void 0,void 0,(function(){var t,o,a,s,c,d;return $(this,(function(u){switch(u.label){case 0:return t=e.conversationType,o=e.targetId,a=e.channelId,s=i.createTraceId(),i.info(Yt,JSON.stringify({conversationType:t,targetId:o,channelId:a}),s),[4,n.clearUnreadCount(t,o,a)];case 1:return c=u.sent(),d=c===r.SUCCESS?"info":"warn",i[d](qt,JSON.stringify({code:c}),s),c!==r.SUCCESS?[2,{code:c,msg:Qr[c]}]:[2,{code:c}]}}))}))}))]}))}))}function Sa(){return Z(this,void 0,void 0,(function(){var e=this;return $(this,(function(t){return[2,new I("","").ifReady((function(t,n){return Z(e,void 0,void 0,(function(){var e;return $(this,(function(i){switch(i.label){case 0:return e=n.createTraceId(),n.info(Kt,"",e),[4,t.clearAllUnreadCount()];case 1:return[2,{code:i.sent()}]}}))}))}))]}))}))}jr.ROAMING_SERVICE_UNAVAILABLE.code;var ha=function(e,t,n,i){return void 0===i&&(i=""),Z(void 0,void 0,void 0,(function(){var o,a;return $(this,(function(s){switch(s.label){case 0:return o=function(e,t,n){void 0===n&&(n="");var i="conversationType:"+t.conversationType+",targetId:"+t.targetId;return e.debug(h.O,n+" -> "+i),i}(e,t,i),[4,n()];case 1:return(a=s.sent())!==r.SUCCESS?(e.warn(h.O,i+" fail -> "+a+" : "+Qr[a]+" , "+o),[2,{code:a,msg:Qr[a]}]):[2,{code:a}]}}))}))};function Ta(e,t){return Z(this,void 0,void 0,(function(){return $(this,(function(n){return[2,new I(zt,Wt).validate("conversation",e,v.OBJECT,!0).validate("conversationType",null==e?void 0:e.conversationType,v.CONVERSATION_TYPE,!0).validate("targetId",null==e?void 0:e.targetId,v.STRING,!0).validate("channelId",null==e?void 0:e.channelId,v.CHANNEL_ID).validate("notificationLevel",t,(function(e){return void 0!==N[e]}),!0).ifReady((function(n,i){return ha(i,e,(function(){return n.setConversationNotificationLevel(e.conversationType,e.targetId,t,e.channelId)}),"setConversationNotificationLevel")}))]}))}))}function Ia(e,t){return Z(this,void 0,void 0,(function(){var n=this;return $(this,(function(i){return[2,new I(si,ci).validate("conversations",e,(function(e){if(!_("conversations",e,v.ARRAY,!0))return!1;if(e.length>20||0===e.length)return!1;for(var t=0,n=e;t<n.length;t++){var i=n[t];if(!(_("conversations",i,v.OBJECT,!0)&&_("conversations.targetId",i.targetId,v.STRING,!0)&&_("conversations.conversationType",i.conversationType,(function(e){var t=[s.PRIVATE,s.GROUP,s.SYSTEM].includes(e);return t||console.warn(ai,"conversations.conversationType is invalid, It should be one of the following values:\n ConversationType.PRIVATE,\n ConversationType.GROUP,\n ConversationType.SYSTEM,\n "),t}),!0)&&_("conversations.channelId",i.channelId,v.ONLY_STRING)))return!1}return!0}),!0).validate("notificationLevel",t,(function(e){return[-1,0,1,2,3,4,5].includes(e)}),!0).ifReady((function(i,o){return Z(n,void 0,void 0,(function(){var n,a,s;return $(this,(function(c){switch(c.label){case 0:return n=e.map((function(e){return{conversationType:e.conversationType,targetId:e.targetId,channelId:e.channelId||""}})),a=o.createTraceId(),o.info(si,"conversations: "+JSON.stringify(n),a),[4,i.batchSetConversationNotificationLevel(n,t)];case 1:return s=c.sent(),o[r.SUCCESS===s?"info":"warn"](ci,"code: "+s,a),[2,{code:s}]}}))}))}))]}))}))}function _a(e,t){return Z(this,void 0,void 0,(function(){return $(this,(function(n){return[2,new I(tn,nn).validate("conversation",e,v.OBJECT,!0).validate("conversationType",null==e?void 0:e.conversationType,v.CONVERSATION_TYPE,!0).validate("targetId",null==e?void 0:e.targetId,v.STRING,!0).validate("channelId",null==e?void 0:e.channelId,v.CHANNEL_ID).validate("notificationStatus",t,(function(e){return 1===e||2===e}),!0).ifReady((function(n,i){return ha(i,e,(function(){return n.setConversationStatus(e.conversationType,e.targetId,void 0,t,e.channelId)}),"setConversationNotificationStatus")}))]}))}))}function ma(e){return Z(this,void 0,void 0,(function(){var t=this;return $(this,(function(n){return[2,new I(Zt,Zt).validate("conversation",e,v.OBJECT,!0).validate("conversationType",null==e?void 0:e.conversationType,v.CONVERSATION_TYPE,!0).validate("targetId",null==e?void 0:e.targetId,v.STRING,!0).validate("channelId",null==e?void 0:e.channelId,v.CHANNEL_ID).ifReady((function(n,i){return Z(t,void 0,void 0,(function(){var t,o,a,s,c,d,u;return $(this,(function(l){switch(l.label){case 0:return t=e.conversationType,o=e.targetId,a=e.channelId,s=i.createTraceId(),i.info(Xt,JSON.stringify({conversationType:t,targetId:o,channelId:a}),s),[4,n.getConversationNotificationLevel(t,o,a)];case 1:return c=l.sent(),d=c.code,u=c.data,d===r.SUCCESS?(i.info(Zt,JSON.stringify({code:d,data:u}),s),[2,{code:d,data:u}]):(i.warn(Zt,JSON.stringify({code:d}),s),[2,{code:d,msg:Qr[d]}])}}))}))}))]}))}))}function pa(e){return Z(this,void 0,void 0,(function(){var t=this;return $(this,(function(n){return[2,new I($t,en).validate("conversation",e,v.OBJECT,!0).validate("conversationType",null==e?void 0:e.conversationType,v.CONVERSATION_TYPE,!0).validate("targetId",null==e?void 0:e.targetId,v.STRING,!0).validate("channelId",null==e?void 0:e.channelId,v.CHANNEL_ID).ifReady((function(n,i){return Z(t,void 0,void 0,(function(){var t,o,a,s,c,d,u;return $(this,(function(l){switch(l.label){case 0:return t=e.conversationType,o=e.targetId,a=e.channelId,s=i.createTraceId(),i.info($t,JSON.stringify({conversationType:t,targetId:o,channelId:a}),s),[4,n.getConversationNotificationStatus(t,o,a)];case 1:return c=l.sent(),d=c.code,u=c.data,d===r.SUCCESS?(i.info(en,JSON.stringify({code:d,data:u}),s),[2,{code:d,data:u}]):(i.warn(en,JSON.stringify({code:d}),s),[2,{code:d,msg:Qr[d]}])}}))}))}))]}))}))}function Na(){return Z(this,void 0,void 0,(function(){return $(this,(function(e){return[2,new I("","").ifReady((function(e){return e.getBlockConversationList()}))]}))}))}function Ea(e,t){return Z(this,void 0,void 0,(function(){var n=this;return $(this,(function(i){return _("conversationType",e,(function(){return[s.PRIVATE,s.GROUP,s.SYSTEM,s.PUBLIC_SERVICE,s.APP_PUBLIC_SERVICE,s.ULTRA_GROUP].includes(e)}))&&_("level",t,p)?[2,Gr((function(i,o){return Z(n,void 0,void 0,(function(){var n,a,s;return $(this,(function(c){switch(c.label){case 0:return o.info(h.O,"setConversationTypeNotificationLevel ->conversationType:"+e+",level:"+t),[4,i.setConversationTypeNotificationLevel(e,t)];case 1:return n=c.sent(),a=n.code,s=n.data,a===r.SUCCESS?[2,{code:a,data:s}]:(o.warn(h.O,"setConversationTypeNotificationLevel ->conversationType:"+e+",level:"+t),[2,{code:a,msg:Qr[a]}])}}))}))}))]:[2,{code:r.BIZ_ERROR_INVALID_PARAMETER}]}))}))}function ya(e){return Z(this,void 0,void 0,(function(){var t=this;return $(this,(function(n){return _("conversationType",e,(function(){return[s.PRIVATE,s.GROUP,s.SYSTEM,s.PUBLIC_SERVICE,s.APP_PUBLIC_SERVICE,s.ULTRA_GROUP].includes(e)}))?[2,Gr((function(n,i){return Z(t,void 0,void 0,(function(){var t,o,a;return $(this,(function(s){switch(s.label){case 0:return i.info(h.O,"getConversationTypeNotificationLevel ->conversationType:"+e),[4,n.getConversationTypeNotificationLevel(e)];case 1:return t=s.sent(),o=t.code,a=t.data,o===r.SUCCESS?[2,{code:o,data:a}]:(i.warn(h.O,"getConversationTypeNotificationLevel ->conversationType:"+e),[2,{code:o,msg:Qr[o]}])}}))}))}))]:[2,{code:r.BIZ_ERROR_INVALID_PARAMETER}]}))}))}function Ra(e,t,n){return void 0===t&&(t=!0),void 0===n&&(n=!0),Z(this,void 0,void 0,(function(){var i=this;return $(this,(function(o){return[2,new I(jt,Qt).validate("conversation",e,v.OBJECT,!0).validate("conversationType",null==e?void 0:e.conversationType,v.CONVERSATION_TYPE,!0).validate("targetId",null==e?void 0:e.targetId,v.STRING,!0).validate("channelId",null==e?void 0:e.channelId,v.CHANNEL_ID).validate("isTop",t,v.BOOLEAN).validate("isUpdateTime",n,v.BOOLEAN).ifReady((function(o,a){return Z(i,void 0,void 0,(function(){var i,s,c,d,u,l;return $(this,(function(v){switch(v.label){case 0:return i=e.conversationType,s=e.targetId,c=e.channelId,d=a.createTraceId(),a.info(jt,JSON.stringify({conversationType:i,targetId:s,channelId:c,isTop:t}),d),[4,o.setConversationStatus(e.conversationType,e.targetId,t,void 0,e.channelId,n)];case 1:return u=v.sent(),l=u===r.SUCCESS?"info":"warn",a[l](Qt,JSON.stringify({code:u}),d),u!==r.SUCCESS?[2,{code:u,msg:Qr[u]}]:[2,{code:u}]}}))}))}))]}))}))}function Ca(e,t,n){return Z(this,void 0,void 0,(function(){var i=this;return $(this,(function(o){return[2,new I(di,ui).validate("conversations",e,(function(e){if(!_("conversations",e,v.ARRAY,!0))return!1;if(e.length>20||0===e.length)return!1;for(var t=0,n=e;t<n.length;t++){var i=n[t];if(!(_("conversations",i,v.OBJECT,!0)&&_("conversations.targetId",i.targetId,v.STRING,!0)&&_("conversations.conversationType",i.conversationType,(function(e){var t=[s.PRIVATE,s.GROUP,s.SYSTEM].includes(e);return t||console.warn(ai,"conversations.conversationType is invalid, It should be one of the following values:\n ConversationType.PRIVATE,\n ConversationType.GROUP,\n ConversationType.SYSTEM,\n "),t}),!0)&&_("conversations.channelId",i.channelId,v.ONLY_STRING)))return!1}return!0}),!0).validate("isTop",t,v.BOOLEAN,!0).ifReady((function(o,a){return Z(i,void 0,void 0,(function(){var i,s,c;return $(this,(function(d){switch(d.label){case 0:return i=e.map((function(e){return{conversationType:e.conversationType,targetId:e.targetId,channelId:e.channelId||""}})),s=a.createTraceId(),a.info(di,"conversations: "+JSON.stringify(i),s),[4,o.batchSetConversationToTop(i,t,n)];case 1:return c=d.sent(),a[r.SUCCESS===c?"info":"warn"](ui,"code: "+c,s),[2,{code:c}]}}))}))}))]}))}))}function Oa(e,t){return Z(this,void 0,void 0,(function(){var n=this;return $(this,(function(i){return[2,new I(Rt,yt).validate("conversationTypes",e,(function(e){return!!f(e)&&!e.some((function(e){return!m(e)}))})).validate("channelId",t,v.CHANNEL_ID).ifReady((function(i,o){return Z(n,void 0,void 0,(function(){var n,a,s,c,d,u;return $(this,(function(l){switch(l.label){case 0:return n=o.createTraceId(),o.info(Rt,JSON.stringify({conversationTypes:e,channelId:t}),n),[4,i.getTopConversationList(e,t)];case 1:return a=l.sent(),s=a.code,c=a.data,s===r.SUCCESS&&c?(d=[],u=c.map((function(e){return d.push({targetId:e.targetId,conversationType:e.conversationType,channelId:e.channelId}),Ye(e)})),o.info(yt,JSON.stringify({code:s,list:d}),n),[2,{code:0,data:u}]):(o.warn(h.A_GET_TOP_CONVERSATION_LIST_E,JSON.stringify({code:s}),n),[2,{code:s,msg:Qr[s]}])}}))}))}))]}))}))}function Aa(e){return Z(this,void 0,void 0,(function(){var t=this;return $(this,(function(n){return[2,new I(on,rn).validate("conversationTypes",e,(function(e){return!!f(e)&&!e.some((function(e){return!m(e)}))})).ifReady((function(n,i){return Z(t,void 0,void 0,(function(){var t,o,a,s,c,d;return $(this,(function(u){switch(u.label){case 0:return t=i.createTraceId(),i.info(on,JSON.stringify({conversationTypes:e}),t),[4,n.getUnreadConversationList(e)];case 1:return o=u.sent(),a=o.code,s=o.data,a===r.SUCCESS&&s?(c=[],d=s.map((function(e){return c.push({targetId:e.targetId,conversationType:e.conversationType,channelId:e.channelId,unreadMessageCount:e.unreadMessageCount}),Ye(e)})),i.info(rn,JSON.stringify({code:a,list:c}),t),[2,{code:0,data:d}]):(i.warn(rn,JSON.stringify({code:a}),t),[2,{code:a,msg:Qr[a]}])}}))}))}))]}))}))}function Ua(e){return Z(this,void 0,void 0,(function(){var t=this;return $(this,(function(n){return[2,new I($t,en).validate("conversation",e,v.OBJECT,!0).validate("conversationType",null==e?void 0:e.conversationType,v.CONVERSATION_TYPE,!0).validate("targetId",null==e?void 0:e.targetId,v.STRING,!0).validate("channelId",null==e?void 0:e.channelId,v.CHANNEL_ID).ifReady((function(n,i){return Z(t,void 0,void 0,(function(){var t,o,a,s;return $(this,(function(c){switch(c.label){case 0:return t=i.createTraceId(),i.info(an,JSON.stringify({conversationType:e.conversationType,targetId:e.targetId,channelId:e.channelId}),t),[4,n.getUnreadMentionedCount(e)];case 1:return o=c.sent(),a=o.code,s=o.data,a===r.SUCCESS?(i.info(sn,JSON.stringify({code:a,data:s}),t),[2,{code:a,data:s}]):(i.warn(sn,JSON.stringify({code:a}),t),[2,{code:a}])}}))}))}))]}))}))}function wa(){return Z(this,void 0,void 0,(function(){var e=this;return $(this,(function(t){return[2,new I("","").ifReady((function(t,n){return Z(e,void 0,void 0,(function(){var e,i,o,a;return $(this,(function(s){switch(s.label){case 0:return e=n.createTraceId(),n.info(cn,"",e),[4,t.getAllUnreadMentionedCount()];case 1:return i=s.sent(),o=i.code,a=i.data,o===r.SUCCESS?(n.warn(dn,JSON.stringify({code:o,data:a}),e),[2,{code:o,data:a}]):[2,{code:o}]}}))}))}))]}))}))}function Pa(){return Z(this,void 0,void 0,(function(){var e=this;return $(this,(function(t){return[2,new I("","").ifReady((function(t,n){return Z(e,void 0,void 0,(function(){var e,i,o,a,s;return $(this,(function(c){switch(c.label){case 0:return e=n.createTraceId(),n.info(un,"",e),[4,t.getAllConversationState()];case 1:return i=c.sent(),o=i.code,a=i.data,s=o===r.SUCCESS?"info":"warn",n[s](Qt,JSON.stringify({code:o}),e),o===r.SUCCESS?[2,{code:o,data:a}]:[2,{code:o}]}}))}))}))]}))}))}function Ma(e){return void 0===e&&(e={}),Z(this,void 0,void 0,(function(){var t=this;return $(this,(function(n){return[2,new I(Ro,Co).validate("targetId",null==e?void 0:e.targetId,v.STRING,!1).validate("channelType",null==e?void 0:e.channelType,(function(e){return void 0!==E[e]}),!1).ifReady((function(n,i){return Z(t,void 0,void 0,(function(){var t,o,a,s;return $(this,(function(c){switch(c.label){case 0:return t=i.createTraceId(),i.info(Ro,JSON.stringify({targetId:e.targetId,channelType:e.channelType}),t),[4,n.getUltraGroupList(e)];case 1:return o=c.sent(),a=o.code,s=o.data,a===r.SUCCESS?(i.info(Co,JSON.stringify({code:a,length:null==s?void 0:s.length}),t),[2,{code:r.SUCCESS,data:s}]):(i.warn(Co,JSON.stringify({code:a}),t),[2,{code:a,msg:Qr[a]}])}}))}))}))]}))}))}function ba(){return Z(this,void 0,void 0,(function(){var e=this;return $(this,(function(t){return[2,new I("","").ifReady((function(t,n){return Z(e,void 0,void 0,(function(){var e,i,o,a;return $(this,(function(s){switch(s.label){case 0:return e=n.createTraceId(),n.info(Oo,"",e),[4,t.getBlockUltraGroupList()];case 1:return i=s.sent(),o=i.code,a=i.data,o===r.SUCCESS?(n.info(Ao,JSON.stringify({code:o,length:null==a?void 0:a.length}),e),[2,{code:r.SUCCESS,data:a}]):(n.warn(Ao,JSON.stringify({code:o}),e),[2,{code:o,msg:Qr[o]}])}}))}))}))]}))}))}function La(e){return Z(this,void 0,void 0,(function(){var t=this;return $(this,(function(n){return[2,new I(Uo,wo).validate("conversation",e,v.OBJECT,!0).validate("conversationType",null==e?void 0:e.conversationType,v.CONVERSATION_TYPE,!0).validate("targetId",null==e?void 0:e.targetId,v.STRING,!0).validate("channelId",null==e?void 0:e.channelId,v.CHANNEL_ID).ifReady((function(n,i){return Z(t,void 0,void 0,(function(){var t,o,a;return $(this,(function(s){switch(s.label){case 0:return t=i.createTraceId(),i.info(Uo,JSON.stringify({targetId:e.targetId,channelId:e.channelId}),t),[4,n.sendUltraGroupTypingStatus(e)];case 1:return o=s.sent().code,a=o===r.SUCCESS?"info":"warn",i[a](wo,JSON.stringify({code:o}),t),o===r.SUCCESS?[2,{code:r.SUCCESS}]:[2,{code:o,msg:Qr[o]}]}}))}))}))]}))}))}function Ga(e,t){return Z(this,void 0,void 0,(function(){var n=this;return $(this,(function(i){return[2,new I(Po,Mo).validate("conversation",e,v.OBJECT,!0).validate("conversationType",null==e?void 0:e.conversationType,v.CONVERSATION_TYPE,!0).validate("targetId",null==e?void 0:e.targetId,v.STRING,!0).validate("channelId",null==e?void 0:e.channelId,v.CHANNEL_ID).validate("messages",t,v.ARRAY,!0).ifReady((function(i,o){return Z(n,void 0,void 0,(function(){var n,a,s,c,d,u,l,v,f,g,S,h;return $(this,(function(T){switch(T.label){case 0:return n=e.targetId,a=e.conversationType,s=e.channelId,c=[],t.forEach((function(e){var t=e.sendTime,n=e.messageUId;c.push({sendTime:t,messageUId:n,channelId:s})})),d={targetId:n,conversationType:a,messages:c},u=o.createTraceId(),o.info(Po,JSON.stringify(d),u),[4,i.getUltraGroupMessageListByMessageUId(d)];case 1:if(l=T.sent(),v=l.code,f=l.data,v===r.SUCCESS){for(h in g={},S=[],f)S.push(h),g[h]=f[h]?Fe(f[h]):void 0;return o.info(Mo,JSON.stringify({code:v,messageUIds:S}),u),[2,{code:r.SUCCESS,data:g}]}return o.warn(Mo,JSON.stringify({code:v}),u),[2,{code:v,msg:Qr[v]}]}}))}))}))]}))}))}function Ja(e,t){return Z(this,void 0,void 0,(function(){var n=this;return $(this,(function(i){return[2,new I(bo,Lo).validate("expansion",e,v.OBJECT,!0).validate("message",t,v.OBJECT,!0).ifReady((function(i,o){return Z(n,void 0,void 0,(function(){var n,a,s,c,d,u,l,v,f,g;return $(this,(function(S){switch(S.label){case 0:return n=t.conversationType,a=t.targetId,s=t.messageUId,c=t.sentTime,d=t.canIncludeExpansion,u=t.channelId,l=o.createTraceId(),o.info(bo,JSON.stringify({conversationType:n,targetId:a,messageUId:s,channelId:u}),l),v={targetId:a,channelId:u,conversationType:n,sendTime:c,canIncludeExpansion:d,messageUId:s,expansion:e},[4,i.expandUltraMessage(v)];case 1:return f=S.sent().code,g=f===r.SUCCESS?"info":"warn",o[g](Lo,JSON.stringify({code:f}),l),f===r.SUCCESS?[2,{code:r.SUCCESS}]:[2,{code:f,msg:Qr[f]}]}}))}))}))]}))}))}function Da(e,t){return Z(this,void 0,void 0,(function(){var n=this;return $(this,(function(i){return[2,new I(Go,Jo).validate("expansion",e,v.ARRAY,!0).validate("message",t,v.OBJECT,!0).ifReady((function(i,o){return Z(n,void 0,void 0,(function(){var n,a,s,c,d,u,l,v,f,g;return $(this,(function(S){switch(S.label){case 0:return n=t.conversationType,a=t.targetId,s=t.messageUId,c=t.sentTime,d=t.canIncludeExpansion,u=t.channelId,l=o.createTraceId(),o.info(Go,JSON.stringify({conversationType:n,targetId:a,messageUId:s,channelId:u}),l),v={targetId:a,channelId:u,conversationType:n,sendTime:c,canIncludeExpansion:d,messageUId:s,keys:e},[4,i.expandUltraMessage(v)];case 1:return f=S.sent().code,g=f===r.SUCCESS?"info":"warn",o[g](Jo,JSON.stringify({code:f}),l),f===r.SUCCESS?[2,{code:r.SUCCESS}]:[2,{code:f,msg:Qr[f]}]}}))}))}))]}))}))}function Ba(e){return Z(this,void 0,void 0,(function(){var t=this;return $(this,(function(n){return[2,new I(Do,Bo).validate("message",e,v.OBJECT,!0).ifReady((function(n,i){return Z(t,void 0,void 0,(function(){var t,o,a,s,c,d,u,l,v,f;return $(this,(function(g){switch(g.label){case 0:return t=e.conversationType,o=e.targetId,a=e.messageUId,s=e.sentTime,c=e.canIncludeExpansion,d=e.channelId,u=i.createTraceId(),i.info(Do,JSON.stringify({conversationType:t,targetId:o,messageUId:a,channelId:d}),u),l={targetId:o,channelId:d,conversationType:t,sendTime:s,canIncludeExpansion:c,messageUId:a,removeAll:!0},[4,n.expandUltraMessage(l)];case 1:return v=g.sent().code,f=v===r.SUCCESS?"info":"warn",i[f](Bo,JSON.stringify({code:v}),u),v===r.SUCCESS?[2,{code:r.SUCCESS}]:[2,{code:v,msg:Qr[v]}]}}))}))}))]}))}))}function xa(e,t){return Z(this,void 0,void 0,(function(){var n=this;return $(this,(function(i){return[2,new I(ko,ko).validate("content",e,v.OBJECT,!0).validate("message",t,v.OBJECT,!0).ifReady((function(i,o){return Z(n,void 0,void 0,(function(){var n,a,s,c,d,u,l,v,f,g,S;return $(this,(function(h){switch(h.label){case 0:return n=t.conversationType,a=t.targetId,s=t.messageUId,c=t.senderUserId,d=t.sentTime,u=t.canIncludeExpansion,l=t.channelId,v=o.createTraceId(),o.info(xo,JSON.stringify({conversationType:n,targetId:a,messageUId:s,channelId:l}),v),f={targetId:a,channelId:l,conversationType:n,fromUserId:c,sendTime:d,canIncludeExpansion:u,messageUId:s,content:e},[4,i.modifyMessage(f)];case 1:return g=h.sent().code,S=g===r.SUCCESS?"info":"warn",o[S](ko,JSON.stringify({code:g}),v),g===r.SUCCESS?[2,{code:r.SUCCESS}]:[2,{code:g,msg:Qr[g]}]}}))}))}))]}))}))}function ka(e,t){return Z(this,void 0,void 0,(function(){var n=this;return $(this,(function(i){return[2,new I(Vo,Vo).validate("targetId",e,v.STRING,!0).validate("notificationLevels",t,v.ARRAY).validate("notificationLevels",t,(function(e){return!(null==t?void 0:t.some((function(e){return!p(e)})))})).ifReady((function(i,o){return Z(n,void 0,void 0,(function(){var n,a,s,c;return $(this,(function(d){switch(d.label){case 0:return n=o.createTraceId(),o.info(Vo,JSON.stringify({targetId:e,notificationLevels:t}),n),[4,i.getUltraGroupUnreadMentionedCountByTargetId(e,t)];case 1:return a=d.sent(),s=a.code,c=a.data,s===r.SUCCESS?(o.info(Ho,JSON.stringify({code:s,data:c}),e),[2,{code:r.SUCCESS,data:c}]):(o.warn(Ho,JSON.stringify({code:s}),n),[2,{code:s,msg:Qr[s]}])}}))}))}))]}))}))}function Va(e){return Z(this,void 0,void 0,(function(){var t=this;return $(this,(function(n){return[2,new I(Fo,Yo).validate("targetId",null==e?void 0:e.targetId,v.STRING,!0).validate("channelId",null==e?void 0:e.channelId,v.CHANNEL_ID).ifReady((function(n,i){return Z(t,void 0,void 0,(function(){var t,o,a,s;return $(this,(function(c){switch(c.label){case 0:return t=i.createTraceId(),i.info(Fo,JSON.stringify({targetId:e.targetId,channelId:e.channelId}),t),[4,n.getUltraGroupDefaultNotificationLevel(e.targetId,e.channelId)];case 1:return o=c.sent(),a=o.code,s=o.data,a===r.SUCCESS?(i.info(Yo,JSON.stringify({code:a,data:s}),t),[2,{code:a,data:s}]):(i.warn(Yo,JSON.stringify({code:a}),t),[2,{code:a,msg:Qr[a]}])}}))}))}))]}))}))}function Ha(e,t){return Z(this,void 0,void 0,(function(){var n=this;return $(this,(function(i){return e.channelId=e.channelId||"",[2,new I(qo,Ko).validate("targetId",null==e?void 0:e.targetId,v.STRING,!0).validate("channelId",null==e?void 0:e.channelId,v.CHANNEL_ID).validate("notificationLevel",t,(function(e){return void 0!==N[e]}),!0).ifReady((function(i,o){return Z(n,void 0,void 0,(function(){var n,a,s;return $(this,(function(c){switch(c.label){case 0:return n=o.createTraceId(),o.info(qo,JSON.stringify({targetId:e.targetId,channelId:e.channelId,notificationLevel:t}),n),[4,i.setUltraGroupDefaultNotificationLevel(e.targetId,t,e.channelId)];case 1:return a=c.sent().code,s=a===r.SUCCESS?"info":"warn",o[s](Ko,JSON.stringify({code:a}),n),a===r.SUCCESS?[2,{code:a}]:[2,{code:a,msg:Qr[a]}]}}))}))}))]}))}))}function Fa(e,t){return Z(this,void 0,void 0,(function(){var n=this;return $(this,(function(i){return[2,new I(zo,Wo).validate("targetId",e,v.STRING,!0).validate("notificationLevels",t,v.ARRAY).validate("notificationLevels",t,(function(e){return!(null==t?void 0:t.some((function(e){return!p(e)})))})).ifReady((function(i,o){return Z(n,void 0,void 0,(function(){var n,a,s,c,d;return $(this,(function(u){switch(u.label){case 0:return n=o.createTraceId(),o.info(zo,JSON.stringify({targetId:e,notificationLevels:t}),n),[4,i.getUltraGroupUnreadCountByTargetId(e,t)];case 1:return a=u.sent(),s=a.code,c=a.data,d=s===r.SUCCESS?"info":"warn",o[d](Wo,JSON.stringify({code:s,data:c}),n),[2,{code:s,data:c}]}}))}))}))]}))}))}function Ya(){return Z(this,void 0,void 0,(function(){var e=this;return $(this,(function(t){return[2,new I(jo,Qo).ifReady((function(t,n){return Z(e,void 0,void 0,(function(){var e,i,o,a,s;return $(this,(function(c){switch(c.label){case 0:return e=n.createTraceId(),n.info(jo,"getAllUltraGroupUnreadCount",e),[4,t.getAllUltraGroupUnreadCount()];case 1:return i=c.sent(),o=i.code,a=i.data,s=o===r.SUCCESS?"info":"warn",n[s](Qo,JSON.stringify({code:o,data:a}),e),o===r.SUCCESS?[2,{code:o,data:a}]:[2,{code:o,msg:Qr[o]}]}}))}))}))]}))}))}function qa(){return Z(this,void 0,void 0,(function(){var e=this;return $(this,(function(t){return[2,new I(Xo,Zo).ifReady((function(t,n){return Z(e,void 0,void 0,(function(){var e,i,o,a,s;return $(this,(function(c){switch(c.label){case 0:return e=n.createTraceId(),n.info(Xo,"getAllUltraGroupUnreadCount",e),[4,t.getAllUltraGroupUnreadCount(true)];case 1:return i=c.sent(),o=i.code,a=i.data,s=o===r.SUCCESS?"info":"warn",n[s](Zo,JSON.stringify({code:o,data:a}),e),o===r.SUCCESS?[2,{code:o,data:a}]:[2,{code:o,msg:Qr[o]}]}}))}))}))]}))}))}function Ka(e){return Z(this,void 0,void 0,(function(){var t=this;return $(this,(function(n){return e.channelId=e.channelId||"",[2,new I($o,er).validate("targetId",null==e?void 0:e.targetId,v.STRING,!0).validate("channelId",null==e?void 0:e.channelId,v.CHANNEL_ID).validate("sentTime",null==e?void 0:e.sentTime,v.NUMBER,!0).validate("count",null==e?void 0:e.count,(function(e){return y(e)&&e>0&&e<=50}),!0).ifReady((function(n,i){return Z(t,void 0,void 0,(function(){var t,o,a,s,c,d,u,l,v;return $(this,(function(f){switch(f.label){case 0:return t=e.targetId,o=e.channelId,a=e.sentTime,s=e.count,c={targetId:t,channelId:o,sentTime:a,count:s},d=i.createTraceId(),i.info($o,JSON.stringify(c),d),[4,n.getUltraGroupUnreadMentionedMessages(c)];case 1:return u=f.sent(),l=u.code,v=u.data,l===r.SUCCESS?(i.info(er,JSON.stringify({code:l,data:null==v?void 0:v.map((function(e){return e.messageUId}))}),d),[2,{code:l,data:v}]):(i.warn(er,JSON.stringify({code:l}),d),[2,{code:l,msg:Qr[l]}])}}))}))}))]}))}))}function za(e){return Z(this,void 0,void 0,(function(){var t=this;return $(this,(function(n){return[2,new I($o,er).validate("targetId",null==e?void 0:e.targetId,v.STRING,!0).validate("channelId",null==e?void 0:e.channelId,v.CHANNEL_ID,!0).ifReady((function(n,i){return Z(t,void 0,void 0,(function(){var t,o,a,s,c,d,u;return $(this,(function(l){switch(l.label){case 0:return t=e.targetId,o=e.channelId,a={targetId:t,channelId:o},s=i.createTraceId(),i.info(tr,JSON.stringify(a),s),[4,n.getUltraGroupFirstUnreadMessageTimestamp(a)];case 1:return c=l.sent(),d=c.code,u=c.data,d===r.SUCCESS?(i.info(nr,JSON.stringify({code:d,sentTime:null==u?void 0:u.sentTime}),s),[2,{code:d,data:u}]):(i.warn(nr,JSON.stringify({code:d}),s),[2,{code:d,msg:Qr[d]}])}}))}))}))]}))}))}function Wa(e){return Z(this,void 0,void 0,(function(){var t=this;return $(this,(function(n){return[2,new I(ir,or).validate("targetIds",e,(function(t){return!!_("targetIds",e,v.ARRAY,!0)&&(!(t.length<=0||t.length>20)&&!e.some((function(e){return!R(e)})))})).ifReady((function(n,i){return Z(t,void 0,void 0,(function(){var t,o,a,s,c,d;return $(this,(function(u){switch(u.label){case 0:return t=e.filter((function(t,n){return e.indexOf(t)===n})),o=i.createTraceId(),i.info(ir,JSON.stringify({targetIds:e}),o),[4,n.getUltraGroupUnreadInfoList(t)];case 1:return a=u.sent(),s=a.code,c=a.data,d=s===r.SUCCESS?"info":"warn",i[d](or,JSON.stringify({code:s}),o),s===r.SUCCESS?[2,{code:s,data:c}]:[2,{code:s,msg:Qr[s]}]}}))}))}))]}))}))}function ja(e,t){return Z(this,void 0,void 0,(function(){var n=this;return $(this,(function(i){return[2,new I(h.A_JOIN_CHATROOM_T,h.A_JOIN_CHATROOM_R).validate("targetId",e,v.STRING,!0).validate("count",t,v.OBJECT,!0).validate("count",null==t?void 0:t.count,v.NUMBER,!0).ifReady((function(i,o){return Z(n,void 0,void 0,(function(){var n,a,s;return $(this,(function(c){switch(c.label){case 0:return n=o.createTraceId(),o.info(h.A_JOIN_CHATROOM_T,JSON.stringify({chatroomId:e,count:t.count,joinExist:!1}),n),[4,i.joinChatroom(e,t.count,n)];case 1:return a=c.sent(),s=a===r.SUCCESS?"info":"warn",o[s](h.A_JOIN_CHATROOM_R,JSON.stringify({code:a,timestamp:(new Date).getTime()}),n),a!==r.SUCCESS?[2,{code:a,msg:Qr[a]}]:[2,{code:a}]}}))}))}))]}))}))}function Qa(e,t){return Z(this,void 0,void 0,(function(){var n=this;return $(this,(function(i){return[2,new I(h.A_JOIN_CHATROOM_T,h.A_JOIN_CHATROOM_R).validate("targetId",e,v.STRING,!0).validate("count",null==t?void 0:t.count,v.NUMBER,!0).ifReady((function(i,o){return Z(n,void 0,void 0,(function(){var n,a,s,c,d;return $(this,(function(u){switch(u.label){case 0:return n=o.createTraceId(),o.info(h.A_JOIN_CHATROOM_T,JSON.stringify({chatroomId:e,count:t.count,joinExist:!0}),n),[4,i.joinExistChatroom(e,t.count,n)];case 1:return a=u.sent(),s=a.code,c=a.data,d=s===r.SUCCESS?"info":"warn",o[d](h.A_JOIN_CHATROOM_R,JSON.stringify({code:s,timestamp:(new Date).getTime()}),n),s!==r.SUCCESS?[2,{code:s,msg:Qr[s]}]:[2,{code:s,data:c}]}}))}))}))]}))}))}function Xa(e){return Z(this,void 0,void 0,(function(){var t=this;return $(this,(function(n){return[2,new I(h.A_QUIT_CHATROOM_T,h.A_QUIT_CHATROOM_R).validate("targetId",e,v.STRING,!0).ifReady((function(n,i){return Z(t,void 0,void 0,(function(){var t,o,a;return $(this,(function(s){switch(s.label){case 0:return t=i.createTraceId(),i.info(h.A_QUIT_CHATROOM_T,JSON.stringify({chatroomId:e}),t),[4,n.quitChatroom(e)];case 1:return o=s.sent(),a=o===r.SUCCESS?"info":"warn",i[a](h.A_QUIT_CHATROOM_R,JSON.stringify({code:o}),t),o!==r.SUCCESS?[2,{code:o,msg:Qr[o]}]:[2,{code:o}]}}))}))}))]}))}))}function Za(e,t){return Z(this,void 0,void 0,(function(){var n=this;return $(this,(function(i){return[2,new I(h.A_QUIT_CHATROOM_T,h.A_QUIT_CHATROOM_R).validate("targetId",e,v.STRING,!0).validate("count",null==t?void 0:t.count,v.NUMBER).validate("order",null==t?void 0:t.order,(function(e){return[0,1,2].includes(e)})).ifReady((function(i,o){return Z(n,void 0,void 0,(function(){var n,a,s,c,d;return $(this,(function(u){switch(u.label){case 0:return n=o.createTraceId(),o.info(nt,JSON.stringify({chatroomId:e,count:null==t?void 0:t.count,order:null==t?void 0:t.order}),n),[4,i.getChatroomInfo(e,null==t?void 0:t.count,null==t?void 0:t.order)];case 1:return a=u.sent(),s=a.code,c=a.data,d=s===r.SUCCESS?"info":"warn",o[d](it,JSON.stringify({code:s}),n),s===r.SUCCESS&&c?[2,{code:s,data:c}]:[2,{code:s,msg:Qr[s]}]}}))}))}))]}))}))}function $a(e,t){return Z(this,void 0,void 0,(function(){var n=this;return $(this,(function(i){return[2,new I(ot,rt).validate("targetId",e,v.STRING,!0).validate("key",null==t?void 0:t.key,v.STRING,!0).validate("value",null==t?void 0:t.value,v.STRING,!0).validate("isAutoDelete",null==t?void 0:t.isAutoDelete,v.BOOLEAN).validate("isSendNotification",null==t?void 0:t.isSendNotification,v.BOOLEAN).validate("notificationExtra",null==t?void 0:t.notificationExtra,C({maxLength:O})).ifReady((function(i,o){return Z(n,void 0,void 0,(function(){var n,a,s;return $(this,(function(c){switch(c.label){case 0:return n=o.createTraceId(),o.info(ot,JSON.stringify({chatroomId:e,key:t.key,value:t.value,isSendNotification:t.isSendNotification,isAutoDelete:t.isAutoDelete,notificationExtra:t.notificationExtra}),n),[4,i.setChatroomEntry(e,t)];case 1:return a=c.sent(),s=a===r.SUCCESS?"info":"warn",o[s](rt,JSON.stringify({code:a}),n),a!==r.SUCCESS?[2,{code:a,msg:Qr[a]}]:[2,{code:a}]}}))}))}))]}))}))}function es(e,t){return Z(this,void 0,void 0,(function(){var n=this;return $(this,(function(i){return[2,new I(at,st).validate("targetId",e,v.STRING,!0).validate("entries",null==t?void 0:t.entries,(function(e){return!!_("entry.key",e,v.ARRAY,!0)&&t.entries.every((function(e){return _("entry.key",e.key,v.STRING,!0)&&_("entry.value",e.value,v.STRING,!0)}))}),!0).validate("isAutoDelete",null==t?void 0:t.isAutoDelete,v.BOOLEAN).validate("isForce",null==t?void 0:t.isForce,v.BOOLEAN).validate("notificationExtra",null==t?void 0:t.notificationExtra,C({maxLength:O})).ifReady((function(i,o){return Z(n,void 0,void 0,(function(){var n,a,s,c,d;return $(this,(function(u){switch(u.label){case 0:return t.entries.length>10?[2,jr.CHATROOM_KV_STORE_OUT_LIMIT]:(n=o.createTraceId(),o.info(at,JSON.stringify({chatroomId:e,entries:t.entries.map((function(e){return{key:e.key,value:e.value}})),isAutoDelete:t.isAutoDelete,notificationExtra:t.notificationExtra,isForce:t.isForce}),n),[4,i.setChatroomEntries(e,t)]);case 1:return a=u.sent(),s=a.code,c=a.data,d=s===r.SUCCESS?"info":"warn",o[d](st,JSON.stringify({code:s}),n),s!==r.SUCCESS?[2,{code:s,msg:Qr[s],data:c}]:[2,{code:s}]}}))}))}))]}))}))}function ts(e,t){return Z(this,void 0,void 0,(function(){var n=this;return $(this,(function(i){return[2,new I(ct,dt).validate("targetId",e,v.STRING,!0).validate("key",null==t?void 0:t.key,v.STRING,!0).validate("value",null==t?void 0:t.value,v.STRING,!0).validate("isAutoDelete",null==t?void 0:t.isAutoDelete,v.BOOLEAN).validate("isSendNotification",null==t?void 0:t.isSendNotification,v.BOOLEAN).validate("notificationExtra",null==t?void 0:t.notificationExtra,C({maxLength:O})).ifReady((function(i,o){return Z(n,void 0,void 0,(function(){var n,a,s;return $(this,(function(c){switch(c.label){case 0:return n=o.createTraceId(),o.info(ct,JSON.stringify({chatroomId:e,key:t.key,value:t.value,isSendNotification:t.isSendNotification,isAutoDelete:t.isAutoDelete,notificationExtra:t.notificationExtra}),n),[4,i.forceSetChatroomEntry(e,t)];case 1:return a=c.sent(),s=a===r.SUCCESS?"info":"warn",o[s](dt,JSON.stringify({code:a}),n),a!==r.SUCCESS?[2,{code:a,msg:Qr[a]}]:[2,{code:a}]}}))}))}))]}))}))}function ns(e,t){return Z(this,void 0,void 0,(function(){var n=this;return $(this,(function(i){return[2,new I(ut,lt).validate("targetId",e,v.STRING,!0).validate("key",null==t?void 0:t.key,v.STRING,!0).validate("isSendNotification",null==t?void 0:t.isSendNotification,v.BOOLEAN).validate("notificationExtra",null==t?void 0:t.notificationExtra,C({maxLength:O})).ifReady((function(i,o){return Z(n,void 0,void 0,(function(){var n,a,s;return $(this,(function(c){switch(c.label){case 0:return n=o.createTraceId(),o.info(ut,JSON.stringify({chatroomId:e,key:t.key,isSendNotification:t.isSendNotification,notificationExtra:t.notificationExtra}),n),[4,i.removeChatroomEntry(e,t)];case 1:return a=c.sent(),s=a===r.SUCCESS?"info":"warn",o[s](lt,JSON.stringify({code:a}),n),a!==r.SUCCESS?[2,{code:a,msg:Qr[a]}]:[2,{code:a}]}}))}))}))]}))}))}function is(e,t){return Z(this,void 0,void 0,(function(){var n=this;return $(this,(function(i){return[2,new I(vt,ft).validate("targetId",e,v.STRING,!0).validate("entries",null==t?void 0:t.entries,(function(e){return!!_("entry.key",e,v.ARRAY,!0)&&t.entries.every((function(e){return _("key",e,v.STRING,!0)}))}),!0).validate("notificationExtra",null==t?void 0:t.notificationExtra,C({maxLength:O})).ifReady((function(i,o){return Z(n,void 0,void 0,(function(){var n,a,s,c,d,u;return $(this,(function(l){switch(l.label){case 0:return n=t.entries.map((function(e){return{key:e}})),a=o.createTraceId(),o.info(vt,JSON.stringify({chatroomId:e,notificationExtra:t.notificationExtra,entries:n}),a),[4,i.removeChatroomEntries(e,{entries:n,notificationExtra:t.notificationExtra})];case 1:return s=l.sent(),c=s.code,d=s.data,u=c===r.SUCCESS?"info":"warn",o[u](ft,JSON.stringify({code:c}),a),c!==r.SUCCESS?[2,{code:c,msg:Qr[c],data:d}]:[2,{code:c}]}}))}))}))]}))}))}function os(e,t){return Z(this,void 0,void 0,(function(){var n=this;return $(this,(function(i){return[2,new I(gt,St).validate("targetId",e,v.STRING,!0).validate("key",null==t?void 0:t.key,v.STRING,!0).validate("isSendNotification",null==t?void 0:t.isSendNotification,v.BOOLEAN).validate("notificationExtra",null==t?void 0:t.notificationExtra,C({maxLength:O})).ifReady((function(i,o){return Z(n,void 0,void 0,(function(){var n,a,s;return $(this,(function(c){switch(c.label){case 0:return n=o.createTraceId(),o.info(gt,JSON.stringify({chatroomId:e,key:t.key,isSendNotification:t.isSendNotification,notificationExtra:t.notificationExtra}),n),[4,i.forceRemoveChatroomEntry(e,t)];case 1:return a=c.sent(),s=a===r.SUCCESS?"info":"warn",o[s](St,JSON.stringify({code:a}),n),a!==r.SUCCESS?[2,{code:a,msg:Qr[a]}]:[2,{code:a}]}}))}))}))]}))}))}function rs(e,t){return Z(this,void 0,void 0,(function(){var n=this;return $(this,(function(i){return[2,new I(ht,Tt).validate("targetId",e,v.STRING,!0).validate("key",t,(function(e){return R(e)&&/[\w+=-]+/.test(e)&&e.length<=128}),!0).ifReady((function(i,o){return Z(n,void 0,void 0,(function(){var n,a,s,c;return $(this,(function(d){switch(d.label){case 0:return n=o.createTraceId(),o.info(ht,JSON.stringify({chatroomId:e,key:t}),n),[4,i.getChatroomEntry(e,t)];case 1:return a=d.sent(),s=a.code,c=a.data,s===r.SUCCESS&&c?(o.info(Tt,JSON.stringify({code:s,data:c}),n),[2,{code:s,data:c}]):(o.warn(Tt,JSON.stringify({code:s}),n),[2,{code:s,msg:Qr[s]}])}}))}))}))]}))}))}function as(e){return Z(this,void 0,void 0,(function(){var t=this;return $(this,(function(n){return[2,new I(It,_t).validate("targetId",e,v.STRING,!0).ifReady((function(n,i){return Z(t,void 0,void 0,(function(){var t,o,a,s;return $(this,(function(c){switch(c.label){case 0:return t=i.createTraceId(),i.info(It,JSON.stringify({chatroomId:e}),t),[4,n.getAllChatroomEntries(e)];case 1:return o=c.sent(),a=o.code,s=o.data,a===r.SUCCESS&&s?(i.info(_t,JSON.stringify({code:a,data:s}),t),[2,{code:a,data:s}]):(i.warn(_t,JSON.stringify({code:a}),t),[2,{code:a,msg:Qr[a]}])}}))}))}))]}))}))}function ss(e,t){return Z(this,void 0,void 0,(function(){var n=this;return $(this,(function(i){return[2,new I(mt,pt).validate("targetId",e,v.STRING,!0).validate("timestamp",null==t?void 0:t.timestamp,v.NUMBER).validate("count",null==t?void 0:t.count,v.NUMBER).validate("count",null==t?void 0:t.count,(function(e){var t=e>0&&e<=100;return t||null===console||void 0===console||console.error('"options.count" is invalid, It should be greater than 0 and less than 100'),t})).validate("order",null==t?void 0:t.order,(function(e){return 0===e||1===e})).ifReady((function(i,o){return Z(n,void 0,void 0,(function(){var n,a,s,c,d,u;return $(this,(function(l){switch(l.label){case 0:return n=o.createTraceId(),o.info(mt,JSON.stringify({chatroomId:e,timestamp:t.timestamp,count:t.count,order:t.order}),n),[4,i.getChatRoomHistoryMessages(e,t.count,t.order,t.timestamp)];case 1:return a=l.sent(),s=a.code,c=a.data,s===r.SUCCESS&&c?(d=[],u=c.list.map((function(e){return d.push(e.messageUId),Fe(e)})),o.info(pt,JSON.stringify({code:s,data:d}),n),[2,{code:s,data:{list:u,hasMore:!!c.hasMore}}]):(o.warn(pt,JSON.stringify({code:s}),n),[2,{code:s,msg:Qr[s]}])}}))}))}))]}))}))}function cs(e){return Z(this,void 0,void 0,(function(){var t=this;return $(this,(function(n){return[2,new I(Nt,Et).validate("targetId",null==e?void 0:e.chatRoomId,v.STRING,!0).validate("rtcRoomId",null==e?void 0:e.rtcRoomId,v.STRING,!0).ifReady((function(n,i){return Z(t,void 0,void 0,(function(){var t,o,a;return $(this,(function(s){switch(s.label){case 0:return t=i.createTraceId(),i.info(Nt,JSON.stringify({chatRoomId:e.chatRoomId,rtcRoomId:e.rtcRoomId}),t),[4,n.bindRTCRoomForChatroom(e)];case 1:return o=s.sent(),a=o===r.SUCCESS?"info":"warn",i[a](Et,JSON.stringify({code:o}),t),[2,{code:o,msg:Qr[o]}]}}))}))}))]}))}))}function ds(e){return Z(this,void 0,void 0,(function(){var t=this;return $(this,(function(n){return[2,new I(ze,We).validate("userId",e,v.STRING,!0).ifReady((function(n,i){return Z(t,void 0,void 0,(function(){var t,o,a;return $(this,(function(s){switch(s.label){case 0:return t=i.createTraceId(),i.info(ze,JSON.stringify({userId:e}),t),[4,n.addToBlacklist(e)];case 1:return o=s.sent(),a=o===r.SUCCESS?"info":"warn",i[a](We,JSON.stringify({code:o}),t),[2,{code:o}]}}))}))}))]}))}))}function us(e){return Z(this,void 0,void 0,(function(){var t=this;return $(this,(function(n){return[2,new I(je,Qe).validate("userId",e,v.STRING,!0).ifReady((function(n,i){return Z(t,void 0,void 0,(function(){var t,o,a;return $(this,(function(s){switch(s.label){case 0:return t=i.createTraceId(),i.info(je,JSON.stringify({userId:e}),t),[4,n.removeFromBlacklist(e)];case 1:return o=s.sent(),a=o===r.SUCCESS?"info":"warn",i[a](Qe,JSON.stringify({code:o}),t),[2,{code:o}]}}))}))}))]}))}))}function ls(){return Z(this,void 0,void 0,(function(){var e=this;return $(this,(function(t){return[2,new I(Xe,Ze).ifReady((function(t,n){return Z(e,void 0,void 0,(function(){var e,i,o,a;return $(this,(function(s){switch(s.label){case 0:return e=n.createTraceId(),n.info(Xe,"getBlacklist -> ",e),[4,t.getBlacklist()];case 1:return i=s.sent(),o=i.code,a=i.data,o===r.SUCCESS&&a?(n.info(Ze,JSON.stringify({code:o,data:a}),e),[2,{code:o,data:a}]):(n.warn(Ze,JSON.stringify({code:o}),e),[2,{code:o}])}}))}))}))]}))}))}function vs(e){return Z(this,void 0,void 0,(function(){var t=this;return $(this,(function(n){return[2,new I($e,et).validate("userId",e,v.STRING,!0).ifReady((function(n,i){return Z(t,void 0,void 0,(function(){var t,o,a,s;return $(this,(function(c){switch(c.label){case 0:return t=i.createTraceId(),i.info($e,JSON.stringify({userId:e}),t),[4,n.getBlacklistStatus(e)];case 1:return o=c.sent(),a=o.code,s=o.data,a===r.SUCCESS?(i.info(et,JSON.stringify({code:a,data:0===s}),t),[2,{code:a,data:0===s}]):(i.warn(et,JSON.stringify({code:a}),t),[2,{code:a}])}}))}))}))]}))}))}var fs=function(e,t,n,i){void 0===n&&(n=!0),void 0===i&&(i=!0),this.messageType=e,this.content=t,this.isPersited=n,this.isCounted=i};function gs(e,t,n){void 0===t&&(t=!0),void 0===n&&(n=!0);return function(i){return new fs(e,i,t,n)}}var Ss,hs=gs("RC:ImgMsg"),Ts=gs("RC:HQVCMsg"),Is=gs("RC:SightMsg"),_s=gs("RC:TxtMsg"),ms=gs("RC:CombineMsg"),ps=gs(A.COMBINE_V2),Ns=gs("RC:FileMsg"),Es=gs("RC:GIFMsg"),ys=gs("RC:VcMsg"),Rs=gs("RC:LBSMsg"),Cs=gs("RC:ReferenceMsg"),Os=gs("RC:ImgTextMsg"),As=gs("RC:CmdMsg"),Us=gs("RC:InfoNtf"),ws=gs("RC:GrpNtf");!function(e){e.ALIYUN="aliyun",e.S3="s3",e.STC="stc",e.MINIO="minio",e.QINIU="qiniu",e.BAIDU="baidu",e.RCX="rcx"}(Ss||(Ss={}));var Ps,Ms=function(){function e(e,t,n){this.isSupportMultipart=!1,this._serverType=0,this._isAbort=!1,this._url=e,this._getFileToken=t,this._serverType=n}return e.prototype.isAbort=function(){return this._isAbort},e.prototype.abort=function(){this._isAbort=!0,this._abortHandler()},e.prototype.upload=function(e){return e.file.size>U?Promise.resolve({code:r.UPLOAD_FAIL,msg:"the file size is over 5GB!"}):e.file.size>w&&this.isSupportMultipart?this.multipartUpload(e):this.commonUpload(e)},e}(),bs=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e._promise=null,e}return Q(n,t),n.prototype.commonUpload=function(t){return Z(this,void 0,void 0,(function(){var n,i,o,a,s,c,d;return $(this,(function(u){switch(u.label){case 0:n=t.file,i=t.onProgress,o=t.fileType,u.label=1;case 1:return u.trys.push([1,3,,4]),[4,this._getFileToken(o,n.name)];case 2:return a=u.sent(),[3,4];case 3:return[2,{code:u.sent()}];case 4:return s={},(c=new FormData).set("token",a.token),c.set("key",a.fileName),c.set("file",n),this._promise=e({url:M(this._url),headers:s,onProgress:function(e){return null==i?void 0:i(e.loaded,e.total)},method:"POST",body:c,timeout:0}),[4,this._promise.result()];case 5:return d=u.sent().status,this._promise=null,200===d||204===d?[2,{code:r.SUCCESS,data:{uniqueName:a.fileName,uploadMethod:P.QINIU}}]:[2,{code:r.UPLOAD_FAIL,msg:d.toString()}]}}))}))},n.prototype.multipartUpload=function(e){return Z(this,void 0,void 0,(function(){return $(this,(function(e){throw new Error("Method not implemented.")}))}))},n.prototype._abortHandler=function(){var e;null===(e=this._promise)||void 0===e||e.abort()},n}(Ms),Ls=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e._promise=null,e}return Q(n,t),n.prototype.commonUpload=function(t){return Z(this,void 0,void 0,(function(){var n,i,o,a,s,c,d;return $(this,(function(u){switch(u.label){case 0:n=t.file,i=t.onProgress,o=t.fileType,u.label=1;case 1:return u.trys.push([1,3,,4]),[4,this._getFileToken(o)];case 2:return a=u.sent(),[3,4];case 3:return[2,{code:u.sent()}];case 4:return s=M(a.ossBucketName+"."+this._url),(c=new FormData).set("token",a.token),c.set("OSSAccessKeyId",a.osskeyId),c.set("policy",a.ossPolicy),c.set("Signature",a.ossSign),c.set("success_action_status","200"),c.set("key",a.fileName),c.set("file",n),this._promise=e({url:s,onProgress:function(e){return null==i?void 0:i(e.loaded,e.total)},method:"POST",body:c,timeout:0}),[4,this._promise.result()];case 5:return d=u.sent().status,this._promise=null,200===d||204===d?[2,{code:r.SUCCESS,data:{uniqueName:a.fileName,uploadMethod:P.ALI}}]:[2,{code:r.UPLOAD_FAIL,msg:d.toString()}]}}))}))},n.prototype._abortHandler=function(){var e;null===(e=this._promise)||void 0===e||e.abort()},n.prototype.multipartUpload=function(e){throw new Error("Method not implemented.")},n}(Ms),Gs=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e._promise=null,e}return Q(n,t),n.prototype.commonUpload=function(t){return Z(this,void 0,void 0,(function(){var n,i,o,a,s,c,d,u,l;return $(this,(function(v){switch(v.label){case 0:n=t.file,i=t.onProgress,o=t.fileType,a=t.contentDisposition,v.label=1;case 1:return v.trys.push([1,3,,4]),[4,this._getFileToken(o<=b.FILE?o:b.FILE)];case 2:return s=v.sent(),[3,4];case 3:return[2,{code:v.sent()}];case 4:return c=a||("text/html"===n.type?"inline":"attachment"),d={authorization:s.bosToken,"x-bce-date":s.bosDate,"Content-Disposition":c+"; filename="+encodeURIComponent(n.name)+";"},u=M(""+this._url+s.path),this._promise=e({url:u,headers:d,onProgress:function(e){return null==i?void 0:i(e.loaded,e.total)},method:"POST",body:n,timeout:0}),[4,this._promise.result()];case 5:return l=v.sent().status,this._promise=null,200===l||204===l?[2,{code:r.SUCCESS,data:{uniqueName:s.fileName,downloadUrl:u}}]:[2,{code:r.UPLOAD_FAIL,msg:l.toString()}]}}))}))},n.prototype.multipartUpload=function(e){throw new Error("Method not implemented.")},n.prototype._abortHandler=function(){var e;null===(e=this._promise)||void 0===e||e.abort()},n}(Ms),Js=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e._promise=null,e.isSupportMultipart=!0,e}return Q(n,t),n.prototype.commonUpload=function(t){return Z(this,void 0,void 0,(function(){var n,i,o,a,s,c,d;return $(this,(function(u){switch(u.label){case 0:n=t.file,i=t.onProgress,o=t.fileType,u.label=1;case 1:return u.trys.push([1,3,,4]),[4,this._getFileToken(o)];case 2:return a=u.sent(),[3,4];case 3:return[2,{code:u.sent()}];case 4:return s=M(this._url+"/"+a.minioBucketName+"/"+a.fileName),c=this.getBaseHeaders(n,a,t),this._promise=e({url:s,headers:c,onProgress:function(e){return null==i?void 0:i(e.loaded,e.total)},method:"PUT",body:n,timeout:0}),[4,this._promise.result()];case 5:return d=u.sent().status,this._promise=null,200===d||204===d?[2,{code:r.SUCCESS,data:{uniqueName:a.fileName,uploadMethod:P.MINIO}}]:[2,{code:r.UPLOAD_FAIL,msg:d.toString()}]}}))}))},n.prototype.multipartUpload=function(t){var n;return Z(this,void 0,void 0,(function(){var i,o,a,s,c,d,u,l,v,f,g,S,h,T,I,_;return $(this,(function(m){switch(m.label){case 0:i=t.file,o=t.fileType,m.label=1;case 1:return m.trys.push([1,3,,4]),[4,this._getFileToken(o,i.name,"POST","uploads")];case 2:return a=m.sent(),[3,4];case 3:return[2,{code:m.sent()}];case 4:return s=M(this._url+"/"+a.minioBucketName+"/"+a.fileName),c=this.getBaseHeaders(i,a,t),this._promise=e({url:s+"?uploads",headers:c,method:"POST"}),[4,this._promise.result()];case 5:return d=m.sent(),u=d.status,l=d.data,this._promise=null,v=null===(n=null==l?void 0:l.match(/(?:<UploadId>)(\S*?)(?:<\/UploadId>)/))||void 0===n?void 0:n[1],200!==u&&204!==u||!v?[2,{code:r.UPLOAD_FAIL,msg:"start upload fail"}]:(f=[],[4,this.requestUploadPart(s,i,v,a.fileName,t,f)]);case 6:if(g=m.sent(),S=g.code,h=g.msg,S!==r.SUCCESS)return[2,{code:S,msg:h}];m.label=7;case 7:return m.trys.push([7,9,,10]),[4,this._getFileToken(o,a.fileName,"POST","uploadId="+v)];case 8:return a=m.sent(),[3,10];case 9:return[2,{code:m.sent()}];case 10:return T=f.map((function(e,t){return"<Part><PartNumber>"+(t+1)+"</PartNumber><ETag>"+e+"</ETag></Part>"})).join(""),T="<CompleteMultipartUpload xmlns='http://s3.amazonaws.com/doc/2006-03-01/'>"+T+"</CompleteMultipartUpload>",I=this.getBaseHeaders(i,a,t),this._promise=e({url:s+"?uploadId="+v,headers:I,method:"POST",body:T,timeout:0}),[4,this._promise.result()];case 11:return _=m.sent().status,this._promise=null,200===_||204===_?[2,{code:r.SUCCESS,data:{uniqueName:a.fileName,uploadMethod:P.MINIO}}]:[2,{code:r.UPLOAD_FAIL,msg:"end upload fail"}]}}))}))},n.prototype.requestUploadPart=function(t,n,i,o,a,s,c,d){return void 0===c&&(c=1),void 0===d&&(d=0),Z(this,void 0,void 0,(function(){var u,l,v,f,g,S,h,T,I;return $(this,(function(_){switch(_.label){case 0:if(d>=5)return[2,{code:r.UPLOAD_FAIL,msg:"Upload retry times exceeded 5. Procedure"}];u=(c-1)*w,l=Math.min(w,n.size-u),v="partNumber="+c+"&uploadId="+i,_.label=1;case 1:return _.trys.push([1,3,,4]),[4,this._getFileToken(a.fileType,o,"PUT",v)];case 2:return f=_.sent(),[3,4];case 3:return[2,{code:_.sent()}];case 4:return g=n.slice(u,c*w),S=this.getBaseHeaders(n,f,a),this._promise=e({url:t+"?"+v,headers:S,method:"PUT",body:g,timeout:0,onProgress:function(e){var t;return null===(t=null==a?void 0:a.onProgress)||void 0===t?void 0:t.call(a,u+e.loaded,n.size)}}),[4,this._promise.result()];case 5:return h=_.sent(),T=h.status,I=h.xhr,this._promise=null,200===T||204===T?(s.push((null==I?void 0:I.getResponseHeader("ETag"))||""),u+l<n.size?[2,this.requestUploadPart(t,n,i,o,a,s,c+1,0)]:[2,{code:r.SUCCESS}]):[2,this.requestUploadPart(t,n,i,o,a,s,c,d+1)]}}))}))},n.prototype.getBaseHeaders=function(e,t,n){return{"Content-Disposition":(n.contentDisposition||("text/html"===e.type?"inline":"attachment"))+"; filename="+encodeURIComponent(e.name)+";",Authorization:t.minioAuthorization,"x-amz-content-sha256":t.minioContentSha256,"x-amz-date":t.minioDate,"Content-Type":e.type||"text/plain"}},n.prototype._abortHandler=function(){var e;null===(e=this._promise)||void 0===e||e.abort()},n}(Ms),Ds=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e.isSupportMultipart=!0,e._promise=null,e}return Q(n,t),n.prototype.commonUpload=function(t){return Z(this,void 0,void 0,(function(){var n,i,o,a,s,c,d,u,l,v,f;return $(this,(function(g){switch(g.label){case 0:n=t.file,i=t.onProgress,o=t.fileType,g.label=1;case 1:return g.trys.push([1,3,,4]),[4,this._getFileToken(o,n.name)];case 2:return a=g.sent(),[3,4];case 3:return[2,{code:g.sent()}];case 4:return s={},(c=new FormData).set("token",a.token),c.set("key",a.fileName),c.set("file",n),d=M(this._url),this._promise=e({url:d,headers:s,onProgress:function(e){return null==i?void 0:i(e.loaded,e.total)},method:"POST",body:c,timeout:0}),[4,this._promise.result()];case 5:return u=g.sent(),l=u.status,v=u.data,this._promise=null,200!==l&&204!==l||!v?[2,{code:r.UPLOAD_FAIL,msg:l.toString()}]:(f=JSON.parse(v),[2,{code:r.SUCCESS,data:{uniqueName:f.rc_url.file_name,downloadUrl:d+"/"+f.rc_url.path}}])}}))}))},n.prototype.multipartUpload=function(e){return Z(this,void 0,void 0,(function(){var t,n,i,o,r;return $(this,(function(a){switch(a.label){case 0:t=e.file,n=e.onProgress,i=e.fileType,o=L(),a.label=1;case 1:return a.trys.push([1,3,,4]),[4,this._getFileToken(i,t.name)];case 2:return r=a.sent(),[3,4];case 3:return[2,{code:a.sent()}];case 4:return[2,this._requestUploadPart(o,t,r.token,n)]}}))}))},n.prototype._requestUploadPart=function(t,n,i,o,a){return void 0===a&&(a=0),Z(this,void 0,void 0,(function(){var s,c,d,u,l,v,f,g,S,h;return $(this,(function(T){switch(T.label){case 0:return s=Math.min(w,n.size-a),c=t+n.name.substring(n.name.lastIndexOf(".")),d={Range:"bytes="+a+"-"+(a+s),"X-File-TransactionId":c,"X-File-Total-Size":n.size.toString()},u=n.slice(a,a+s),(l=new FormData).set("file",u,n.name),l.set("key",c),l.set("name",c),l.set("token",i),v=M(this._url),this._promise=e({url:v,headers:d,onProgress:function(e){return null==o?void 0:o(a+e.loaded,n.size)},method:"POST",body:l,timeout:0}),[4,this._promise.result()];case 1:return f=T.sent(),g=f.status,S=f.data,this._promise=null,200===g||204===g?a+s<n.size?[2,this._requestUploadPart(t,n,i,o,a+s)]:(h=JSON.parse(S),[2,{code:r.SUCCESS,data:{uniqueName:h.rc_url.file_name,downloadUrl:v+"/"+h.rc_url.path}}]):[2,{code:r.UPLOAD_FAIL,msg:g.toString()}]}}))}))},n.prototype._abortHandler=function(){var e;null===(e=this._promise)||void 0===e||e.abort()},n}(Ms),Bs=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e._promise=null,e}return Q(n,t),n.prototype.commonUpload=function(t){return Z(this,void 0,void 0,(function(){var n,i,o,a,s,c,d,u,l,v;return $(this,(function(f){switch(f.label){case 0:n=t.file,i=t.onProgress,o=t.fileType,a=t.contentDisposition,f.label=1;case 1:return f.trys.push([1,3,,4]),[4,this._getFileToken(o,n.name)];case 2:return s=f.sent(),[3,4];case 3:return[2,{code:f.sent()}];case 4:return c={},d=M(s.s3BucketName+"."+this._url),u=new FormData,a?u.set("Content-Disposition",a):u.set("Content-Disposition","text/html"===n.type?"inline;":"attachment;"),u.set("Content-Type",n.type),u.set("x-amz-credential",s.s3Credential),u.set("x-amz-algorithm",s.s3Algorithm),u.set("x-amz-date",s.s3Date),u.set("policy",s.s3Policy),u.set("x-amz-signature",s.s3Signature),u.set("key",s.fileName),u.set("file",n),this._promise=e({url:d,headers:c,onProgress:function(e){return null==i?void 0:i(e.loaded,e.total)},method:"POST",body:u,timeout:0}),[4,this._promise.result()];case 5:return l=f.sent(),v=l.status,this._promise=null,200===v||204===v?[2,{code:r.SUCCESS,data:{uniqueName:s.fileName,uploadMethod:P.AWS}}]:[2,{code:r.UPLOAD_FAIL,msg:v.toString()}]}}))}))},n.prototype.multipartUpload=function(e){throw new Error("Method not implemented.")},n.prototype._abortHandler=function(){var e;null===(e=this._promise)||void 0===e||e.abort()},n}(Ms),xs=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e._promise=null,e.isSupportMultipart=!0,e}return Q(n,t),n.prototype.commonUpload=function(t){return Z(this,void 0,void 0,(function(){var n,i,o,a,s,c,d;return $(this,(function(u){switch(u.label){case 0:n=t.file,i=t.onProgress,o=t.fileType,u.label=1;case 1:return u.trys.push([1,3,,4]),[4,this._getFileToken(o)];case 2:return a=u.sent(),[3,4];case 3:return[2,{code:u.sent()}];case 4:return s=M(this._url+"/"+a.stcBucketName+"/"+a.fileName),c=this.getBaseHeaders(n,a,t),this._promise=e({url:s,headers:c,onProgress:function(e){return null==i?void 0:i(e.loaded,e.total)},method:"PUT",body:n,timeout:0}),[4,this._promise.result()];case 5:return d=u.sent().status,this._promise=null,200===d||204===d?[2,{code:r.SUCCESS,data:{uniqueName:a.fileName,uploadMethod:P.STC}}]:[2,{code:r.UPLOAD_FAIL}]}}))}))},n.prototype.multipartUpload=function(t){var n;return Z(this,void 0,void 0,(function(){var i,o,a,s,c,d,u,l,v,f,g,S,h,T,I,_;return $(this,(function(m){switch(m.label){case 0:i=t.file,o=t.fileType,m.label=1;case 1:return m.trys.push([1,3,,4]),[4,this._getFileToken(o,i.name,"POST","uploads")];case 2:return a=m.sent(),[3,4];case 3:return[2,{code:m.sent()}];case 4:return s=M(this._url+"/"+a.stcBucketName+"/"+a.fileName),c=this.getBaseHeaders(i,a,t),this._promise=e({url:s+"?uploads",headers:c,method:"POST"}),[4,this._promise.result()];case 5:return d=m.sent(),u=d.status,l=d.data,this._promise=null,v=null===(n=null==l?void 0:l.match(/(?:<UploadId>)(\S*?)(?:<\/UploadId>)/))||void 0===n?void 0:n[1],200!==u&&204!==u||!v?[2,{code:r.UPLOAD_FAIL,msg:"start upload fail"}]:(f=[],[4,this.requestUploadPart(s,i,v,a.fileName,t,f)]);case 6:if(g=m.sent(),S=g.code,h=g.msg,S!==r.SUCCESS)return[2,{code:S,msg:h}];m.label=7;case 7:return m.trys.push([7,9,,10]),[4,this._getFileToken(o,a.fileName,"POST","uploadId="+v)];case 8:return a=m.sent(),[3,10];case 9:return[2,{code:m.sent()}];case 10:return T=f.map((function(e,t){return"<Part><PartNumber>"+(t+1)+"</PartNumber><ETag>"+e+"</ETag></Part>"})).join(""),T="<CompleteMultipartUpload xmlns='http://s3.amazonaws.com/doc/2006-03-01/'>"+T+"</CompleteMultipartUpload>",I=this.getBaseHeaders(i,a,t),this._promise=e({url:s+"?uploadId="+v,headers:I,method:"POST",body:T}),[4,this._promise.result()];case 11:return _=m.sent().status,this._promise=null,200===_||204===_?[2,{code:r.SUCCESS,data:{uniqueName:a.fileName,uploadMethod:P.STC}}]:[2,{code:r.UPLOAD_FAIL,msg:"end upload fail"}]}}))}))},n.prototype.requestUploadPart=function(t,n,i,o,a,s,c,d){return void 0===c&&(c=1),void 0===d&&(d=0),Z(this,void 0,void 0,(function(){var u,l,v,f,g,S,h,T,I;return $(this,(function(_){switch(_.label){case 0:if(d>=5)return[2,{code:r.UPLOAD_FAIL,msg:"Upload retry times exceeded 5. Procedure"}];u=(c-1)*w,l=Math.min(w,n.size-u),v="partNumber="+c+"&uploadId="+i,_.label=1;case 1:return _.trys.push([1,3,,4]),[4,this._getFileToken(a.fileType,o,"PUT",v)];case 2:return f=_.sent(),[3,4];case 3:return[2,{code:_.sent()}];case 4:return g=n.slice(u,c*w),S=this.getBaseHeaders(n,f,a),this._promise=e({url:t+"?"+v,headers:S,method:"PUT",body:g,onProgress:function(e){var t;return null===(t=null==a?void 0:a.onProgress)||void 0===t?void 0:t.call(a,u+e.loaded,n.size)},timeout:0}),[4,this._promise.result()];case 5:return h=_.sent(),T=h.status,I=h.xhr,this._promise=null,200===T||204===T?(s.push((null==I?void 0:I.getResponseHeader("ETag"))||""),u+l<n.size?[2,this.requestUploadPart(t,n,i,o,a,s,c+1,0)]:[2,{code:r.SUCCESS}]):[2,this.requestUploadPart(t,n,i,o,a,s,c,d+1)]}}))}))},n.prototype.getBaseHeaders=function(e,t,n){return{"Content-Disposition":(n.contentDisposition||("text/html"===e.type?"inline":"attachment"))+"; filename="+encodeURIComponent(e.name)+";",Authorization:t.stcAuthorization,"x-amz-content-sha256":t.stcContentSha256,"x-amz-date":t.stcDate,"Content-Type":e.type||"text/plain"}},n.prototype._abortHandler=function(){var e;null===(e=this._promise)||void 0===e||e.abort()},n}(Ms);var ks=((Ps={})[Ss.QINIU]=bs,Ps[Ss.ALIYUN]=Ls,Ps[Ss.BAIDU]=Gs,Ps[Ss.S3]=Bs,Ps[Ss.STC]=xs,Ps[Ss.MINIO]=Js,Ps[Ss.RCX]=Ds,Ps);function Vs(e,t,n,i){var o=document.createElement("canvas"),a=o.getContext("2d"),s=new Image;s.onload=function(t){var c=i||{},d=c.maxHeight,u=void 0===d?160:d,l=c.maxWidth,v=void 0===l?160:l,f=c.quality,g=void 0===f?.7:f,S=c.scale,h=void 0===S?1:S,T=Fs(s.width,s.height,{maxHeight:u,maxWidth:v,scale:h});o.width=Math.min(T.w,v),o.height=Math.min(T.h,u),a.drawImage(s,T.x,T.y,T.w,T.h);var I=Hs(o,g);I=I.replace(/data:image\/[^;]+;base64,/,""),e({code:r.SUCCESS,data:X(X({},n),{thumbnail:I,width:T.w,height:T.h})})},s.onerror=function(t){e({code:r.UPLOAD_FAIL,msg:"get image info fail:"+JSON.stringify(t)})},s.src=(window.URL||window.webkitURL).createObjectURL(t)}function Hs(e,t){var n=e.toDataURL("image/jpeg",t);return n.length>G-10240?Hs(e,t-.1):n}var Fs=function(e,t,n){var i,o,r=n.maxHeight,a=void 0===r?160:r,s=n.maxWidth,c=void 0===s?160:s,d=n.scale,u=e<t,l=0,v=0;return(u?t/e:e/t)>(void 0===d?1:d)?(u?(i=100,v=((o=t/(e/100))-a)/2):(o=100,l=((i=e/(t/100))-c)/2),{w:i,h:o,x:-l,y:-v}):(u?(o=a,i=e/(t/a)):(i=c,o=t/(e/c)),{w:i,h:o,x:-l,y:-v})},Ys=0,qs=function(){function e(e,t){this._client=null,this.id=++Ys,this._promise=this._handleUpload(e,t)}return e.prototype.abort=function(){var e;this._resolve({code:r.UPLOAD_FAIL,msg:"upload abort"}),null===(e=this._client)||void 0===e||e.abort()},e.prototype._uploadInLoop=function(e,t,n,i,o){return void 0===o&&(o=[]),Z(this,void 0,void 0,(function(){var a,s,c,d,u,l;return $(this,(function(v){switch(v.label){case 0:a=0,v.label=1;case 1:return a<e.length?(s=e[a],this._client=new ks[s.type](s.url,n,i),[4,this._client.upload(t)]):[3,4];case 2:if(c=v.sent(),d=c.code,u=c.data,l=c.msg,d===r.SUCCESS)return[2,{code:d,data:u}];if(this._client.isAbort())return this._client=null,[2,{code:d,data:u,msg:l}];this._client=null,o.push({type:s.type,url:s.url,code:d,msg:l}),v.label=3;case 3:return a++,[3,1];case 4:return[2,{code:r.UPLOAD_FAIL,msg:"Failed to upload all channels, msg: "+JSON.stringify(o)}]}}))}))},e.prototype._handleUpload=function(e,t){return Z(this,void 0,void 0,(function(){var n=this;return $(this,(function(i){return[2,new Promise((function(i){return Z(n,void 0,void 0,(function(){var n,o,a,s,c,d,u,l,v,f,g,S,h,T,I,_,m,p,N;return $(this,(function(E){switch(E.label){case 0:return this._resolve=i,n=t.getFileToken,o=t.serverType,a=t.customDomain,s=t.ossConfig,c=t.uploadServer,d=t.bosAddr,u=e.file,l=e.fileType,v=e.thumbnailConfig,f=function(e,t,n,i,o){if(n)return[{type:Ss.RCX,url:n,p:"1"}];if(e)return JSON.parse(e).map((function(e){var t={type:Ss.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 r=[];return i&&r.push({type:Ss.QINIU,url:i,p:"1"}),o&&r.push({type:Ss.BAIDU,url:o,p:"2"}),r}(s,0,a,c,d),0===f.length?(i({code:r.INVALID_PARAMETER_MEDIA_URL,msg:"uploadUrlList is empty"}),[2]):[4,this._uploadInLoop(f,e,n,o)];case 1:if(g=E.sent(),S=g.code,h=g.data,T=g.msg,S!==r.SUCCESS||!h)return i({code:S,msg:T}),[2];if(I=h.downloadUrl)return[3,5];E.label=2;case 2:return E.trys.push([2,4,,5]),[4,t.getFileUrl(l,h.uniqueName,u.name,void 0,h.uploadMethod)];case 3:return _=E.sent(),I=_.downloadUrl,[3,5];case 4:return m=E.sent(),i({code:m,msg:"Get download url fail"}),[3,5];case 5:return I?(p={downloadUrl:I,uniqueName:(null==h?void 0:h.uniqueName)||"",name:u.name,size:u.size,type:u.type},l!==b.AUDIO?[3,7]:[4,u.arrayBuffer()]):(i({code:r.UPLOAD_FAIL,msg:"Get download url fail"}),[2]);case 6:return N=E.sent(),function(e,t,n){(new AudioContext).decodeAudioData(t,(function(t){e({code:r.SUCCESS,data:X(X({},n),{duration:t.duration,length:t.length})})}),(function(t){e({code:r.UPLOAD_FAIL,msg:"get audio info fail:"+JSON.stringify(t)})}))}(i,N,p),[2];case 7:return l===b.IMAGE?(Vs(i,u,p,v),[2]):(i({code:S,data:p}),[2])}}))}))}))]}))}))},e.prototype.awaitResult=function(){return Z(this,void 0,void 0,(function(){return $(this,(function(e){return[2,this._promise]}))}))},e}(),Ks={};function zs(e,t){var n=new qs(e,t);return function(e){Z(this,void 0,void 0,(function(){return $(this,(function(t){switch(t.label){case 0:return Ks[e.id]=e,[4,e.awaitResult()];case 1:return t.sent(),delete Ks[e.id],[2]}}))}))}(n),n}function Ws(e){var t=Ks[e];return!!t&&(t.abort(),!0)}var js=function(e,t){var n=e.getNaviInfoFromCache();return{getFileToken:e.getFileToken.bind(e),getFileUrl:e.getFileUrl.bind(e),customDomain:t.uploadDomain||"",serverType:null==n?void 0:n.type,ossConfig:null==n?void 0:n.ossConfig,uploadServer:null==n?void 0:n.uploadServer,bosAddr:null==n?void 0:n.bosAddr}};function Qs(e){return Z(this,void 0,void 0,(function(){var t,n,i;return $(this,(function(o){return t=e.contentDisposition,n=e.fileType,i=e.file,[2,new I("","").validate("contentDisposition",t,(function(e){return"inline"===e||"attachment"===e}),!1).validate("fileType",n,(function(e){return!!b[e]}),!0).validate("file",i,(function(e){return e instanceof File&&(!(n===b.IMAGE&&!e.type.match(/^image\//))&&!(n===b.AUDIO&&!e.type.match(/^audio\//)))}),!0).ifReadySync((function(t,n,i){var o=zs(e,js(t,i));return{code:r.SUCCESS,data:o}}))]}))}))}function Xs(e){return Z(this,void 0,void 0,(function(){return $(this,(function(t){return[2,{code:r.SUCCESS,data:Ws(e)}]}))}))}function Zs(e){return Z(this,void 0,void 0,(function(){var t,n,i;return $(this,(function(o){return t=e.contentDisposition,n=e.fileType,i=e.file,[2,new I("","").validate("contentDisposition",t,(function(e){return"inline"===e||"attachment"===e}),!1).validate("fileType",n,(function(e){return!!b[e]}),!0).validate("file",i,(function(e){return e instanceof File&&(!(n===b.IMAGE&&!e.type.match(/^image\//))&&!(n===b.AUDIO&&!e.type.match(/^audio\//)))}),!0).ifReady((function(t,n,i){return function(e,t){return Z(this,void 0,void 0,(function(){return $(this,(function(n){return[2,new qs(e,t).awaitResult()]}))}))}(e,js(t,i))}))]}))}))}function $s(e,t,n,i){return Gr((function(o){return new Promise((function(a){o.getFileToken(e,t,n,i).then((function(e){a({code:r.SUCCESS,data:e})})).catch((function(e){a({code:e,msg:Qr[e]})}))}))}))}function ec(e){return new I("","").validate("mediaUrl",e,v.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,o=e.deadline;n({code:r.SUCCESS,data:{token:t,downloadAuthInfo:i,deadline:o}})})).catch((function(e){n({code:e,msg:Qr[e]})}))}))}))}function tc(e,t,n,i,o){return new I("","").validate("fileType",e,J,!0).validate("filename",t,v.STRING).validate("saveName",n,v.STRING).validate("serverType",o,v.NUMBER).ifReady((function(a){return new Promise((function(s){a.getFileUrl(e,t,n,i,o).then((function(e){s({code:r.SUCCESS,data:e})})).catch((function(e){s({code:e})}))}))}))}function nc(e,t,n){return Z(this,void 0,void 0,(function(){var i=this;return $(this,(function(o){return[2,new I(h.A_SEND_MSG_T,h.A_SEND_MSG_R).validate("message",t,(function(){return t instanceof fs}),!0).validate("conversation",e,v.OBJECT,!0).validate("conversationType",null==e?void 0:e.conversationType,v.CONVERSATION_TYPE,!0).validate("targetId",null==e?void 0:e.targetId,v.STRING,!0).validate("channelId",null==e?void 0:e.channelId,v.CHANNEL_ID).validate("isStatusMessage",null==n?void 0:n.isStatusMessage,v.BOOLEAN).validate("disableNotification",null==n?void 0:n.disableNotification,v.BOOLEAN).validate("pushContent",null==n?void 0:n.pushContent,v.STRING).validate("pushData",null==n?void 0:n.pushData,v.STRING).validate("isMentioned",null==n?void 0:n.isMentioned,v.BOOLEAN).validate("mentionedType",null==n?void 0:n.mentionedType,v.NUMBER).validate("mentionedUserIdList",null==n?void 0:n.mentionedUserIdList,B({itemValidator:x})).validate("directionalUserIdList",null==n?void 0:n.directionalUserIdList,B({maxLength:300,itemValidator:x})).validate("isVoipPush",null==n?void 0:n.isVoipPush,v.BOOLEAN).validate("canIncludeExpansion",null==n?void 0:n.canIncludeExpansion,v.BOOLEAN).validate("expansion",null==n?void 0:n.expansion,v.OBJECT).validate("pushConfig",null==n?void 0:n.pushConfig,v.OBJECT).validate("messageId",null==n?void 0:n.messageId,v.NUMBER).ifReady((function(o,c){return Z(i,void 0,void 0,(function(){var i,d,u,l,v,f,g,S,T,I,_,m,p,N,E,y,R,C,O,A,U;return $(this,(function(w){switch(w.label){case 0:return d=(i=n||{}).disableNotification,u=i.isMentioned,l=i.directionalUserIdList,v=i.canIncludeExpansion,f=i.onSendBefore,g=i.expansion,S=i.pushConfig,T=i.isStatusMessage,I=c.createTraceId(),_=e.conversationType,m=e.targetId,p=e.channelId,l&&l.length>0&&![3,10].includes(_)?[2,{code:r.RC_DIRECTIONAL_MESSAGE_INVALID_CONVERSATION_TYPE}]:(N=function(e,t,n){var i=e.isStatusMessage,o=e.disableNotification,r=e.pushContent,a=e.pushData,s=e.isMentioned,c=e.mentionedType,d=e.mentionedUserIdList,u=e.directionalUserIdList,l=e.isVoipPush,v=e.canIncludeExpansion,f=e.expansion,g=e.isFilerWhiteBlacklist,S=e.pushConfig,h=e.messageId,T=n.channelId;return X({isStatusMessage:i,disableNotification:o,pushContent:r,pushData:a,isMentioned:s,mentionedType:c,mentionedUserIdList:d,directionalUserIdList:u,isVoipPush:l,canIncludeExpansion:v,expansion:f,isFilerWhiteBlacklist:g,pushConfig:S,channelId:T||"",messageId:h},t)}(n||{},t,e),E={isMentioned:!!u,content:t.content,messageType:t.messageType,isPersited:!!t.isPersited,isCounted:!!t.isCounted,disableNotification:!!d,canIncludeExpansion:!!v,expansion:g||null,conversationType:e.conversationType,targetId:e.targetId,channelId:e.channelId,senderUserId:o.getCurrentUserId(),messageUId:"",messageDirection:k.SEND,receivedTime:0,isStatusMessage:!!T,receivedStatus:a.UNREAD,isOffLineMessage:!1,pushConfig:S,sentStatus:V.SENDING,sentTime:0,directedUserIds:l||[]},_!==s.ULTRA_GROUP&&(E.isOffLineMessage=!1),y=function(e){E.messageId=e;try{f&&f(Fe(E))}catch(e){c.error(h.A_SEND_MSG_T,'Callback method "onSendBefore" execution error.\n'+(null==e?void 0:e.stack),I)}},c.info(h.A_SEND_MSG_T,JSON.stringify({messageType:t.messageType,conversationType:_,targetId:m,channelId:p}),I),[4,o.sendMessage(_,m,N,y,I)]);case 1:return R=w.sent(),C=R.code,O=R.data,A=R.msg,C===r.SUCCESS?(c.info(h.A_SEND_MSG_R,JSON.stringify({code:C,messageUId:O.messageUId,messageId:O.messageId}),I),U=Fe(O),[2,{code:C,data:U}]):(c.warn(h.A_SEND_MSG_R,JSON.stringify({code:C}),I),E.sentTime=(null==O?void 0:O.sentTime)||0,E.sentStatus=null==O?void 0:O.sentStatus,[2,{code:C,msg:A||Qr[C],data:Fe(E)}])}}))}))}))]}))}))}function ic(e,t,n){return nc(e,new _s(t),n)}function oc(e,t){return function(n,i,o,a){var s;if(!_("sendOptions.contentDisposition",null==a?void 0:a.contentDisposition,(function(e){return["inline","attachment"].includes(e)})))return Promise.resolve({code:r.INVALID_PARAMETER_SENDOPTIONS});var c={contentDisposition:null==a?void 0:a.contentDisposition};if(a&&"thumbnailConfig"in a){var d=null===(s=a)||void 0===s?void 0:s.thumbnailConfig;if(!(_("sendOptions.maxHeight",null==d?void 0:d.maxHeight,v.NUMBER)&&_("sendOptions.maxWidth",null==d?void 0:d.maxWidth,v.NUMBER)&&_("sendOptions.quality",null==d?void 0:d.quality,v.NUMBER)&&_("sendOptions.scale",null==d?void 0:d.scale,v.NUMBER)))return Promise.resolve({code:r.INVALID_PARAMETER_SENDOPTIONS});c.thumbnailConfig=d}return Gr((function(s,d,u){return new Promise((function(s){var u=d.createTraceId();d.info(h.L_MEDIA_UPLOAD_T,JSON.stringify({filesize:i.file.size,type:e}),u),Zs({file:i.file,fileType:e,onProgress:function(e,t){var n;null===(n=null==o?void 0:o.onProgress)||void 0===n||n.call(o,Math.floor(e/t*100))},contentDisposition:c.contentDisposition,thumbnailConfig:c.thumbnailConfig}).then((function(e){var c,l=e.code,v=e.data,f=e.msg;if(l===r.SUCCESS&&v){var g=(null===(c=null==o?void 0:o.onComplete)||void 0===c?void 0:c.call(o,X({url:v.downloadUrl},v)))||t(v,i);return d.info(h.L_MEDIA_UPLOAD_R,JSON.stringify({downurl:v.downloadUrl,code:r.SUCCESS}),u),void nc(n,g,a).then(s)}s({code:l,msg:f})}))}))}))}}var rc=oc(b.FILE,(function(e,t){var n,i,o={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&&(o.user=t.user),t.extra&&(o.extra=t.extra),t.mentionedInfo&&(o.mentionedInfo=t.mentionedInfo),new Ns(o)})),ac=oc(b.IMAGE,(function(e,t){var n={content:e.thumbnail,imageUri:e.downloadUrl};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 hs(n)})),sc=oc(b.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 Es(n)})),cc=oc(b.AUDIO,(function(e,t){var n={remoteUrl:e.downloadUrl,duration:e.duration,type:e.type};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 Ts(n)})),dc=oc(b.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 Is(n)}));function uc(e,t){return Z(this,void 0,void 0,(function(){var n=this;return $(this,(function(i){return[2,new I(h.A_GET_HISTORY_MSG_T,h.A_GET_HISTORY_MSG_R).validate("conversation",e,v.OBJECT,!0).validate("conversationType",null==e?void 0:e.conversationType,v.CONVERSATION_TYPE,!0).validate("targetId",null==e?void 0:e.targetId,v.STRING,!0).validate("channelId",null==e?void 0:e.channelId,v.CHANNEL_ID).validate("timestamp",null==t?void 0:t.timestamp,v.NUMBER).validate("count",null==t?void 0:t.count,v.NUMBER).validate("count",null==t?void 0:t.count,(function(e){if(D())return!0;var t=e>0&&e<=100;return t||null===console||void 0===console||console.error('"options.count" is invalid, It should be greater than 0 and less than 100'),t})).validate("order",null==t?void 0:t.order,(function(e){return 0===e||1===e})).ifReady((function(i,o){return Z(n,void 0,void 0,(function(){var n,a,s,c,d,u;return $(this,(function(l){switch(l.label){case 0:return n=o.createTraceId(),o.info(h.A_GET_HISTORY_MSG_T,JSON.stringify({targetId:e.targetId,conversationType:e.conversationType,channelId:e.channelId,timestamp:null==t?void 0:t.timestamp,count:null==t?void 0:t.count}),n),[4,i.getHistoryMessage(e.conversationType,e.targetId,null==t?void 0:t.timestamp,null==t?void 0:t.count,null==t?void 0:t.order,null==e?void 0:e.channelId,"",n)];case 1:return a=l.sent(),s=a.code,c=a.data,s===r.SUCCESS&&c?(d=[],u=c.list.map((function(e){return d.push(e.messageUId),Fe(e)})),o.info(h.A_GET_HISTORY_MSG_R,JSON.stringify({code:s,messageUIds:d}),n),[2,{code:s,data:{list:u,hasMore:c.hasMore}}]):(o.warn(h.A_GET_HISTORY_MSG_R,JSON.stringify({code:s,messageUIds:""}),n),[2,{code:s,msg:Qr[s]}])}}))}))}))]}))}))}function lc(e,t){return Z(this,void 0,void 0,(function(){var n=this;return $(this,(function(i){return[2,new I(Si,hi).validate("conversation",e,v.OBJECT,!0).validate("conversationType",null==e?void 0:e.conversationType,v.CONVERSATION_TYPE,!0).validate("targetId",null==e?void 0:e.targetId,v.STRING,!0).validate("channelId",null==e?void 0:e.channelId,v.CHANNEL_ID).validate("timestamp",null==t?void 0:t.timestamp,v.NUMBER).validate("count",null==t?void 0:t.count,v.NUMBER).validate("count",null==t?void 0:t.count,(function(e){return e>0&&e<=100})).validate("order",null==t?void 0:t.order,(function(e){return 0===e||1===e})).ifReady((function(i,o){return Z(n,void 0,void 0,(function(){var n,a,s,c,d,u;return $(this,(function(l){switch(l.label){case 0:return n=o.createTraceId(),o.info(Si,JSON.stringify({targetId:e.targetId,conversationType:e.conversationType,channelId:e.channelId,timestamp:null==t?void 0:t.timestamp,count:null==t?void 0:t.count,order:null==t?void 0:t.order}),n),[4,i.getRemoteHistoryMessages(e.conversationType,e.targetId,(null==t?void 0:t.timestamp)||0,(null==t?void 0:t.count)||20,(null==t?void 0:t.order)||0,e.channelId||"")];case 1:return a=l.sent(),s=a.code,c=a.data,s===r.SUCCESS&&c?(d=[],u=c.list.map((function(e){return d.push(e.messageUId),Fe(e)})),o.info(hi,JSON.stringify({code:s,messageUIds:d})),[2,{code:s,data:{list:u,hasMore:c.hasMore}}]):(o.warn(hi,JSON.stringify({code:s})),[2,{code:s,msg:Qr[s]}])}}))}))}))]}))}))}function vc(e,t,n,i){return Z(this,void 0,void 0,(function(){var o=this;return $(this,(function(r){return[2,new I(h.A_SEND_MSG_T,h.A_SEND_MSG_R).validate("targetId",e,v.STRING,!0).validate("messageUId",t,v.STRING,!0).validate("timestamp",n,v.NUMBER,!0).validate("channelId",i,v.CHANNEL_ID).ifReady((function(r){return Z(o,void 0,void 0,(function(){var o,r,a,c,d;return $(this,(function(u){switch(u.label){case 0:return o={targetId:e,conversationType:s.PRIVATE,channelId:i},r=new fs("RC:ReadNtf",{messageUId:t,lastMessageSendTime:n,type:1}),[4,nc(o,r)];case 1:return a=u.sent(),c=a.code,d=a.msg,0===c?[2,{code:c}]:[2,{code:c,msg:d}]}}))}))}))]}))}))}function fc(e,t,n){return Z(this,void 0,void 0,(function(){var i=this;return $(this,(function(o){return[2,new I(h.A_SEND_MSG_T,h.A_SEND_MSG_R).validate("targetId",e,v.STRING,!0).validate("messageUId",t,v.STRING,!0).validate("channelId",n,v.CHANNEL_ID).ifReady((function(o,r){return Z(i,void 0,void 0,(function(){var i,o,a,c,d;return $(this,(function(u){switch(u.label){case 0:return i="messageUId:"+t+",targetId:"+e,r.debug(h.A_SEND_MSG_T,"send read receipt message ->"+i),o=new fs("RC:RRReqMsg",{messageUId:t}),[4,nc({targetId:e,conversationType:s.GROUP,channelId:n},o)];case 1:return a=u.sent(),c=a.code,d=a.msg,0===c?[2,{code:c}]:[2,{code:c,msg:d}]}}))}))}))]}))}))}function gc(e,t,n){return Z(this,void 0,void 0,(function(){return $(this,(function(e){throw new Error("This method is deprecated, please use method sendReadReceiptResponseV2.")}))}))}oc(b.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 ms(n)}));var Sc=function(e,t,n,i){return Z(void 0,void 0,void 0,(function(){var o,a;return $(this,(function(s){switch(s.label){case 0:return!_("messageList",i,v.OBJECT,!0)||Object.keys(i).some((function(e){return!_(e,i[e],v.ARRAY)}))?[2,Promise.resolve({code:r.MSG_LIMIT_ERROR})]:(o=[],Object.keys(i).forEach((function(e){i[e].forEach((function(e){-1===o.indexOf(e)&&o.push(e)}))})),o.length?[4,e.sendReadReceiptMessage(n.targetId,o,n.channelId)]:(t.warn(h.A_SEND_MSG_R,JSON.stringify({code:r.MSG_LIMIT_ERROR,msg:"Error in parameter messageList."})),[2,Promise.resolve({code:r.MSG_LIMIT_ERROR})]));case 1:return a=s.sent().code,[2,Promise.resolve({code:a})]}}))}))};function hc(e,t,n){return Z(this,void 0,void 0,(function(){var i=this;return $(this,(function(o){return[2,new I(h.A_SEND_MSG_T,h.A_SEND_MSG_R).validate("targetId",e,v.STRING,!0).validate("channelId",n,v.CHANNEL_ID).ifReady((function(o,a){return Z(i,void 0,void 0,(function(){var i,c,d,u,l;return $(this,(function(f){switch(f.label){case 0:return i={targetId:e,conversationType:s.GROUP,channelId:n},d=o.getNaviInfoFromCache(),1!==(null==d?void 0:d.grpRRVer)?[3,2]:[4,Sc(o,a,i,t)];case 1:return c=f.sent(),[3,4];case 2:return!_("messageList",t,v.OBJECT,!1)||t&&Object.keys(t).some((function(e){return!_(e,t[e],v.ARRAY)}))?[2,{code:r.MSG_LIMIT_ERROR}]:(u=new fs("RC:RRRspMsg",{receiptMessageDic:t}),[4,nc(i,u)]);case 3:c=f.sent(),f.label=4;case 4:return(l=c.code)===r.SUCCESS?[2,{code:l}]:[2,{code:l,msg:Qr[l]}]}}))}))}))]}))}))}function Tc(e,t){return Z(this,void 0,void 0,(function(){var n=this;return $(this,(function(i){return[2,new I(h.A_SYNC_READ_STATUS_T,h.A_SYNC_READ_STATUS_R).validate("timestamp",t,v.NUMBER,!0).validate("conversation",e,v.OBJECT,!0).validate("conversationType",null==e?void 0:e.conversationType,(function(e){return[s.GROUP,s.PRIVATE,s.APP_PUBLIC_SERVICE,s.PUBLIC_SERVICE,s.SYSTEM].includes(e)}),!0).validate("targetId",null==e?void 0:e.targetId,v.STRING,!0).validate("channelId",null==e?void 0:e.channelId,v.CHANNEL_ID).ifReady((function(i,o){return Z(n,void 0,void 0,(function(){var n,a,s,c,d,u,l;return $(this,(function(v){switch(v.label){case 0:return n="conversationType:"+e.conversationType+",targetId:"+e.targetId+",\n channelId: "+e.channelId+", timestamp:"+t,a=o.createTraceId(),o.info(h.A_SYNC_READ_STATUS_T,n,a),1!==(null==(s=i.getNaviInfoFromCache())?void 0:s.sesDriven)?[3,2]:[4,i.updateConversationReadTime(e,t)];case 1:return c=v.sent(),[3,4];case 2:return d=new fs("RC:SRSMsg",{lastMessageSendTime:t}),[4,nc(e,d)];case 3:c=v.sent(),v.label=4;case 4:return u=c.code,l=c.msg,o[u===r.SUCCESS?"info":"warn"](h.A_SYNC_READ_STATUS_R,"code: "+u+", msg: "+l,a),[2,{code:u,msg:l}]}}))}))}))]}))}))}function Ic(e,t,n){return void 0===n&&(n=""),Z(this,void 0,void 0,(function(){var i=this;return $(this,(function(o){return[2,new I(h.A_SEND_MESSAGE_READ_RECEIPT_V4_T,h.A_SEND_MESSAGE_READ_RECEIPT_V4_R).validate("conversation",e,v.OBJECT,!0).validate("conversationType",null==e?void 0:e.conversationType,(function(e){return e===s.GROUP||e===s.PRIVATE}),!0,"It should be ConversationType.GROUP or ConversationType.PRIVATE").validate("targetId",null==e?void 0:e.targetId,v.STRING,!0).validate("channelId",null==e?void 0:e.channelId,v.CHANNEL_ID).validate("startMsgUId",n,v.ONLY_STRING,!0).validate("endMsgUId",t,v.STRING,!0).ifReady((function(o,a){return Z(i,void 0,void 0,(function(){var i,s,c,d,u,l;return $(this,(function(v){switch(v.label){case 0:return i=a.createTraceId(),s="conversationType:"+e.conversationType+",targetId:"+e.targetId+",\n channelId: "+e.channelId+", startMsgUId:"+n+", endMsgUId: "+t,a.info(h.A_SEND_MESSAGE_READ_RECEIPT_V4_T,s,i),3!==(null==(c=o.getNaviInfoFromCache())?void 0:c.grpRRVer)?[2,{code:r.READ_RECEIPT_V4_NOT_SUPPORT}]:[4,o.sendReadReceiptMessageV4(e,n,t)];case 1:return d=v.sent(),u=d.code,l=d.msg,a[u===r.SUCCESS?"info":"warn"](h.A_SEND_MESSAGE_READ_RECEIPT_V4_R,"code: "+u+", msg: "+l,i),[2,{code:u,msg:l}]}}))}))}))]}))}))}function _c(e,t){return Z(this,void 0,void 0,(function(){var n=this;return $(this,(function(i){return[2,new I(h.A_GET_MESSAGE_READ_RECEIPT_V4_T,h.A_GET_MESSAGE_READ_RECEIPT_V4_R).validate("conversation",e,v.OBJECT,!0).validate("conversationType",null==e?void 0:e.conversationType,(function(e){return e===s.GROUP}),!0,"It should be ConversationType.GROUP").validate("targetId",null==e?void 0:e.targetId,v.STRING,!0).validate("channelId",null==e?void 0:e.channelId,v.CHANNEL_ID).validate("messageUId",t,v.STRING,!0).ifReady((function(i,o){return Z(n,void 0,void 0,(function(){var n,a,s,c,d,u,l;return $(this,(function(v){switch(v.label){case 0:return n="conversationType:"+e.conversationType+",targetId:"+e.targetId+",\n channelId: "+e.channelId+", messageUid:"+t,a=o.createTraceId(),o.info(h.A_GET_MESSAGE_READ_RECEIPT_V4_T,n,a),3!==(null==(s=i.getNaviInfoFromCache())?void 0:s.grpRRVer)?[2,{code:r.READ_RECEIPT_V4_NOT_SUPPORT}]:[4,i.getMessageReadReceiptV4(e,t)];case 1:return c=v.sent(),d=c.code,u=c.msg,l=c.data,o[d===r.SUCCESS?"info":"warn"](h.A_GET_MESSAGE_READ_RECEIPT_V4_R,"code: "+d+", msg: "+u,a),d===r.SUCCESS&&l?[2,{code:d,data:l}]:[2,{code:d,msg:u}]}}))}))}))]}))}))}function mc(e,t){return Z(this,void 0,void 0,(function(){var n=this;return $(this,(function(i){return[2,new I(h.A_BATCH_GET_MESSAGE_READ_RECEIPT_INFO_V4_T,h.A_BATCH_GET_MESSAGE_READ_RECEIPT_INFO_V4_R).validate("conversation",e,v.OBJECT,!0).validate("conversationType",null==e?void 0:e.conversationType,(function(e){return e===s.GROUP}),!0,"It should be ConversationType.GROUP").validate("targetId",null==e?void 0:e.targetId,v.STRING,!0).validate("channelId",null==e?void 0:e.channelId,v.CHANNEL_ID).validate("messageUId",t,(function(e){return!!_("messageUIds",e,v.ARRAY,!0)&&!e.some((function(e){return!R(e)}))}),!0).ifReady((function(i,o){return Z(n,void 0,void 0,(function(){var n,a,s,c,d,u,l;return $(this,(function(v){switch(v.label){case 0:return n="conversationType:"+e.conversationType+",targetId:"+e.targetId+",\n channelId: "+e.channelId+", messageUid:"+t.toString(),a=o.createTraceId(),o.info(h.A_BATCH_GET_MESSAGE_READ_RECEIPT_INFO_V4_T,n,a),3!==(null==(s=i.getNaviInfoFromCache())?void 0:s.grpRRVer)?[2,{code:r.READ_RECEIPT_V4_NOT_SUPPORT}]:[4,i.batchGetMessageReadReceiptInfoV4(e,t)];case 1:return c=v.sent(),d=c.code,u=c.msg,l=c.data,o[d===r.SUCCESS?"info":"warn"](h.A_BATCH_GET_MESSAGE_READ_RECEIPT_INFO_V4_R,"code: "+d+", msg: "+u,a),d===r.SUCCESS?[2,{code:d,data:l}]:[2,{code:d,msg:u}]}}))}))}))]}))}))}function pc(e,t){return Z(this,void 0,void 0,(function(){var n=this;return $(this,(function(i){return[2,new I(Ti,Ii).validate("conversation",e,v.OBJECT,!0).validate("conversationType",null==e?void 0:e.conversationType,v.CONVERSATION_TYPE,!0).validate("targetId",null==e?void 0:e.targetId,v.STRING,!0).validate("channelId",null==e?void 0:e.channelId,v.CHANNEL_ID).validate("messageUId",t.messageUId,v.STRING,!0).validate("sentTime",t.sentTime,v.NUMBER,!0).validate("disableNotification",null==t?void 0:t.disableNotification,v.BOOLEAN).validate("pushConfig",null==t?void 0:t.pushConfig,v.OBJECT).validate("directionalUserIdList",null==t?void 0:t.directionalUserIdList,B({maxLength:300,minLength:1,itemValidator:function(e){return R(e)}})).ifReady((function(i,o){return Z(n,void 0,void 0,(function(){var n,a,s,c,d;return $(this,(function(u){switch(u.label){case 0:return n={user:t.user,channelId:e.channelId||"",disableNotification:null==t?void 0:t.disableNotification,pushConfig:null==t?void 0:t.pushConfig,extra:t.extra,isDelete:t.isDelete,directionalUserIdList:t.directionalUserIdList},a=o.createTraceId(),o.info(Ti,JSON.stringify({targetId:e.targetId,conversationType:e.conversationType,messageUId:t.messageUId}),a),[4,i.recallMessage(e.conversationType,e.targetId,t.messageUId,t.sentTime,n)];case 1:return s=u.sent(),c=s.code,d=s.data,c===r.SUCCESS&&d?(o.info(Ii,JSON.stringify({code:c,messageUId:d.messageUId}),a),[2,{code:c,data:Fe(d)}]):c===r.SUCCESS?[2,{code:c}]:(o.warn(Ii,JSON.stringify({code:c}),a),[2,{code:c,msg:Qr[c]}])}}))}))}))]}))}))}function Nc(e,t){return Z(this,void 0,void 0,(function(){var n=this;return $(this,(function(i){return[2,new I(_i,mi).validate("conversation",e,v.OBJECT,!0).validate("conversationType",null==e?void 0:e.conversationType,v.CONVERSATION_TYPE,!0).validate("targetId",null==e?void 0:e.targetId,v.STRING,!0).validate("channelId",null==e?void 0:e.channelId,v.CHANNEL_ID).validate("messages",t,(function(e){return f(e)&&e.length}),!0).validate("messages",t,(function(e){return!(!e||!f(e))&&!e.some((function(e){return!R(null==e?void 0:e.messageUId)||!y(null==e?void 0:e.sentTime)||!_("options.messageDirection",null==e?void 0:e.messageDirection,(function(e){return 1===e||2===e}),!0)}))}),!0).ifReady((function(i,o){return Z(n,void 0,void 0,(function(){var n,a,s;return $(this,(function(c){switch(c.label){case 0:return n=o.createTraceId(),o.info(_i,JSON.stringify({targetId:e.targetId,conversationType:e.conversationType,channelId:e.channelId,messages:t.map((function(e){return e.messageUId}))}),n),[4,i.deleteRemoteMessage(e.conversationType,e.targetId,t,e.channelId)];case 1:return a=c.sent(),s=a===r.SUCCESS?"info":"warn",o[s](mi,JSON.stringify({code:a}),n),a!==r.SUCCESS?[2,{code:a,msg:Qr[a]}]:[2,{code:r.SUCCESS}]}}))}))}))]}))}))}function Ec(e,t){return Z(this,void 0,void 0,(function(){var n=this;return $(this,(function(i){return[2,new I(pi,Ni).validate("conversation",e,v.OBJECT,!0).validate("conversationType",null==e?void 0:e.conversationType,v.CONVERSATION_TYPE,!0).validate("targetId",null==e?void 0:e.targetId,v.STRING,!0).validate("channelId",null==e?void 0:e.channelId,v.CHANNEL_ID).validate("timestamp",t,v.NUMBER,!0).ifReady((function(i,o){return Z(n,void 0,void 0,(function(){var n,a,s;return $(this,(function(c){switch(c.label){case 0:return n=o.createTraceId(),o.info(pi,JSON.stringify({targetId:e.targetId,conversationType:e.conversationType,channelId:e.channelId,timestamp:t}),n),[4,i.deleteRemoteMessageByTimestamp(e.conversationType,e.targetId,t,e.channelId)];case 1:return a=c.sent(),s=a===r.SUCCESS?"info":"warn",o[s](Ni,JSON.stringify({code:a}),n),a!==r.SUCCESS?[2,{code:a,msg:Qr[a]}]:[2,{code:r.SUCCESS}]}}))}))}))]}))}))}function yc(e,t){return Z(this,void 0,void 0,(function(){var n=this;return $(this,(function(i){return[2,new I(li,vi).validate("clearMessageOption",e,(function(e){if(!_("clearMessageOption",e,v.ARRAY,!0))return!1;if(e.length>20||0===e.length)return!1;for(var t=0,n=e;t<n.length;t++){var i=n[t];if(!(_("options",i,v.OBJECT,!0)&&_("options.targetId",i.targetId,v.STRING,!0)&&_("options.conversationType",i.conversationType,(function(e){return[s.PRIVATE,s.GROUP,s.CHATROOM,s.SYSTEM].includes(e)}),!0)&&_("options.timestamp",i.timestamp,v.NUMBER,!0)&&_("options.channelId",i.channelId,v.ONLY_STRING)))return!1}return!0}),!0).ifReady((function(i,o){return Z(n,void 0,void 0,(function(){var n,a,s;return $(this,(function(c){switch(c.label){case 0:return n=e.map((function(e){return{conversationType:e.conversationType,targetId:e.targetId,timestamp:e.timestamp,channelId:e.channelId||""}})),a=o.createTraceId(),o.info(li,"options: "+JSON.stringify(n)+", isDeleteLocal: "+!!t,a),[4,i.batchClearRemoteHistoryMessages(n,!!t)];case 1:return s=c.sent(),o[r.SUCCESS===s?"info":"warn"](vi,"code: "+s,a),[2,{code:s}]}}))}))}))]}))}))}function Rc(e,t){return Z(this,void 0,void 0,(function(){var n=this;return $(this,(function(i){return[2,new I(Ei,yi).validate("expansion",e,v.OBJECT,!0).validate("message",t,v.OBJECT,!0).validate("conversationType",null==t?void 0:t.conversationType,v.NUMBER,!0).validate("targetId",null==t?void 0:t.targetId,v.STRING,!0).validate("channelId",null==t?void 0:t.channelId,v.CHANNEL_ID).validate("messageUId",null==t?void 0:t.messageUId,v.STRING,!0).validate("expansion",null==t?void 0:t.expansion,v.OBJECT).validate("canIncludeExpansion",null==t?void 0:t.canIncludeExpansion,v.BOOLEAN,!0).ifReady((function(i,o){return Z(n,void 0,void 0,(function(){var n,a,s,c,d,u,l,v,f;return $(this,(function(g){switch(g.label){case 0:return n=t.conversationType,a=t.targetId,s=t.messageUId,c=t.canIncludeExpansion,d=t.expansion,u=t.channelId,l=o.createTraceId(),o.info(Ei,JSON.stringify({targetId:a,channelId:u,conversationType:n,messageUId:s,canIncludeExpansion:c}),l),[4,i.sendExpansionMessage({conversationType:n,targetId:a,messageUId:s,expansion:e,canIncludeExpansion:c,originExpansion:d,channelId:u})];case 1:return v=g.sent().code,f=v===r.SUCCESS?"info":"warn",o[f](yi,JSON.stringify({code:v}),l),v!==r.SUCCESS?[2,{code:v,msg:Qr[v]}]:[2,{code:v}]}}))}))}))]}))}))}function Cc(e,t){return Z(this,void 0,void 0,(function(){var n=this;return $(this,(function(i){return[2,new I(Ri,Ci).validate("keys",e,v.ARRAY,!0).validate("message",t,v.OBJECT,!0).validate("conversationType",null==t?void 0:t.conversationType,v.NUMBER,!0).validate("targetId",null==t?void 0:t.targetId,v.STRING,!0).validate("channelId",null==t?void 0:t.channelId,v.CHANNEL_ID).validate("messageUId",null==t?void 0:t.messageUId,v.STRING,!0).validate("canIncludeExpansion",null==t?void 0:t.canIncludeExpansion,v.BOOLEAN,!0).ifReady((function(i,o){return Z(n,void 0,void 0,(function(){var n,a,s,c,d,u,l,v;return $(this,(function(f){switch(f.label){case 0:return n=t.conversationType,a=t.targetId,s=t.messageUId,c=t.canIncludeExpansion,d=t.channelId,u=o.createTraceId(),o.info(Ri,JSON.stringify({targetId:a,channelId:d,conversationType:n,messageUId:s,canIncludeExpansion:c}),u),[4,i.sendExpansionMessage({conversationType:n,targetId:a,messageUId:s,canIncludeExpansion:c,keys:e,channelId:d})];case 1:return l=f.sent().code,v=l===r.SUCCESS?"info":"warn",o[v](Ci,JSON.stringify({code:l}),u),l!==r.SUCCESS?[2,{code:l,msg:Qr[l]}]:[2,{code:l}]}}))}))}))]}))}))}function Oc(e,t){return Z(this,void 0,void 0,(function(){var n=this;return $(this,(function(i){return[2,new I(h.A_SEND_MSG_T,h.A_SEND_MSG_R).validate("conversation",e,v.OBJECT,!0).validate("conversationType",null==e?void 0:e.conversationType,v.CONVERSATION_TYPE,!0).validate("targetId",null==e?void 0:e.targetId,v.STRING,!0).validate("channelId",null==e?void 0:e.channelId,v.CHANNEL_ID).validate("messageType",t,v.STRING,!0).ifReady((function(i,o){return Z(n,void 0,void 0,(function(){var n,a,s,c,d,u;return $(this,(function(l){switch(l.label){case 0:return n={messageType:"RC:TypSts",content:{typingContentType:t},isStatusMessage:!0,channelId:e.channelId},a=o.createTraceId(),o.info(h.A_SEND_MSG_T,JSON.stringify({messageType:n.messageType,conversationType:e.conversationType,targetId:e.targetId,channelId:e.channelId}),a),[4,i.sendMessage(e.conversationType,e.targetId,n,void 0,a)];case 1:return s=l.sent(),c=s.code,d=s.data,u=c===r.SUCCESS?"info":"warn",o[u](h.A_SEND_MSG_R,JSON.stringify({code:c,messageUId:d?d.messageUId:"",messageId:d?d.messageId:""}),a),c===r.SUCCESS?[2,{code:c,data:Fe(d)}]:[2,{code:c,msg:Qr[c]}]}}))}))}))]}))}))}function Ac(e,t,n){return Z(this,void 0,void 0,(function(){var i=this;return $(this,(function(o){return[2,new I(Oi,Ai).validate("messageUId",t,v.STRING,!0).validate("targetId",e,v.STRING,!0).validate("channelId",n,v.CHANNEL_ID).ifReady((function(o,a){return Z(i,void 0,void 0,(function(){var i,s,c,d;return $(this,(function(u){switch(u.label){case 0:return i=a.createTraceId(),a.info(Oi,JSON.stringify({targetId:e,messageUId:t,channelId:n}),i),[4,o.getMessageReader(e,t,n)];case 1:return s=u.sent(),c=s.code,d=s.data,c===r.SUCCESS?(a.info(Ai,JSON.stringify({code:c,totalMemberCount:null==d?void 0:d.totalMemberCount}),i),[2,{code:c,data:d}]):(a.warn(Ai,JSON.stringify({code:c})),[2,{code:c,msg:Qr[c]}])}}))}))}))]}))}))}function Uc(e,t,n,i,o){return Lr((function(r,a){return l("messageType",e,v.STRING,!0),l("isPersited",t,v.BOOLEAN,!0),l("isCounted",n,v.BOOLEAN,!0),l("isStatusMessage",o,v.BOOLEAN,!1),l("searchProps",i,v.ARRAY),a.info(h.A_REGTYP_O,JSON.stringify({messageType:e,isCounted:n,isStatusMessage:o,isPersited:t})),r.registerMessageType(e,t,n,i,o),gs(e,t,n)}))}function wc(e){return Z(this,void 0,void 0,(function(){var t=this;return $(this,(function(n){return D()?[2,new I(Ui,wi).validate("conversation",e,v.OBJECT,!0).validate("conversationType",null==e?void 0:e.conversationType,v.CONVERSATION_TYPE,!0).validate("targetId",null==e?void 0:e.targetId,v.STRING,!0).validate("channelId",null==e?void 0:e.channelId,v.CHANNEL_ID).ifReady((function(n,i){return Z(t,void 0,void 0,(function(){var t,o,a,s,c,d,u,l;return $(this,(function(v){switch(v.label){case 0:return t=e.conversationType,o=e.targetId,a=e.channelId,s=i.createTraceId(),i.info(Ui,JSON.stringify({conversationType:t,targetId:o,channelId:a}),s),[4,n.getFirstUnreadMessage(t,o,a)];case 1:return c=v.sent(),d=c.code,u=c.data,d===r.SUCCESS?(l=u&&Fe(u)||null,i.info(wi,JSON.stringify({code:d,messageUId:null==u?void 0:u.messageUId}),s),[2,{code:d,data:l}]):(i.warn(wi,JSON.stringify({code:d}),s),[2,{code:d,msg:Qr[d]}])}}))}))}))]:[2,{code:r.NOT_SUPPORT,msg:Qr[r.NOT_SUPPORT]}]}))}))}function Pc(e){return Z(this,void 0,void 0,(function(){var t=this;return $(this,(function(n){return[2,new I(Pi,Mi).validate("conversation",e,v.OBJECT,!0).validate("conversationType",null==e?void 0:e.conversationType,v.CONVERSATION_TYPE,!0).validate("targetId",null==e?void 0:e.targetId,v.STRING,!0).validate("channelId",null==e?void 0:e.channelId,v.CHANNEL_ID).ifReady((function(n,i){return Z(t,void 0,void 0,(function(){var t,o,a,s,c,d,u;return $(this,(function(l){switch(l.label){case 0:return t=e.conversationType,o=e.targetId,a=e.channelId,s=i.createTraceId(),i.info(Pi,JSON.stringify({conversationType:t,targetId:o,channelId:a}),s),[4,n.getFirstUnreadMessageInfo(t,o,a||"")];case 1:return c=l.sent(),d=c.code,u=c.data,d===r.SUCCESS?(i.info(Mi,JSON.stringify({code:d,messageUId:null==u?void 0:u.messageUId,sentTime:null==u?void 0:u.sentTime}),s),[2,{code:d,data:u}]):(i.warn(Mi,JSON.stringify({code:d}),s),[2,{code:d,msg:Qr[d]}])}}))}))}))]}))}))}function Mc(e,t,n){return void 0===n&&(n={}),Z(this,void 0,void 0,(function(){var i=this;return $(this,(function(o){return qe("RongIMLib.insertMessage","RongIMLib.ElectronExtension.insertMessage"),D()?[2,new I(bi,Li).validate("conversation",e,v.OBJECT,!0).validate("conversationType",null==e?void 0:e.conversationType,v.CONVERSATION_TYPE,!0).validate("targetId",null==e?void 0:e.targetId,v.STRING,!0).validate("channelId",null==e?void 0:e.channelId,v.CHANNEL_ID).validate("searchContent",null==n?void 0:n.searchContent,v.STRING).validate("senderUserId",null==t?void 0:t.senderUserId,v.STRING,!0).validate("messageType",null==t?void 0:t.messageType,v.STRING,!0).validate("content",null==t?void 0:t.content,v.OBJECT,!0).validate("messageDirection",null==t?void 0:t.messageDirection,v.NUMBER,!0).validate("canIncludeExpansion",null==t?void 0:t.canIncludeExpansion,v.BOOLEAN).validate("expansion",null==t?void 0:t.expansion,v.OBJECT).validate("disableNotification",null==t?void 0:t.disableNotification,v.BOOLEAN).validate("sentTime",null==t?void 0:t.sentTime,v.NUMBER).validate("sentStatus",null==t?void 0:t.sentStatus,v.NUMBER).ifReady((function(o,a){return Z(i,void 0,void 0,(function(){var i,s,c,d,u,l,v,f,g,S,h,T,I,_,m,p,N;return $(this,(function(E){switch(E.label){case 0:return i=t.senderUserId,s=t.messageType,c=t.content,d=t.messageDirection,u=t.messageUId,l=t.canIncludeExpansion,v=t.expansion,f=t.disableNotification,g=t.sentTime,S=t.sentStatus,h=a.createTraceId(),a.info(bi,JSON.stringify({conversationType:e.conversationType,targetId:e.targetId,channelId:e.channelId}),h),T=n.isUnread,I=n.searchContent,_={senderUserId:i,messageType:s,content:c,messageDirection:d,sentTime:g,sentStatus:S,searchContent:I,isUnread:!!T,messageUId:u,disableNotification:f,canIncludeExpansion:l,expansionMsg:JSON.stringify(v),channelId:e.channelId||""},[4,o.insertMessage(e.conversationType,e.targetId,_)];case 1:return m=E.sent(),p=m.code,N=m.data,p===r.SUCCESS?(a.info(Li,JSON.stringify({code:p,messageId:null==N?void 0:N.messageId}),h),[2,{code:p,data:Fe(N)}]):(a.warn(Li,JSON.stringify({code:p}),h),[2,{code:p,msg:Qr[p]}])}}))}))}))]:[2,{code:r.NOT_SUPPORT,msg:Qr[r.NOT_SUPPORT]}]}))}))}function bc(e){return Z(this,void 0,void 0,(function(){var t=this;return $(this,(function(n){return D()?[2,new I(Gi,Ji).validate("messageId",e,(function(e){return y(e)||R(e)}),!0).ifReady((function(n,i){return Z(t,void 0,void 0,(function(){var t,o,a,s;return $(this,(function(c){switch(c.label){case 0:return t=i.createTraceId(),i.info(Gi,JSON.stringify({messageId:e}),t),[4,n.getMessage(e)];case 1:return o=c.sent(),a=o.code,s=o.data,a===r.SUCCESS?(i.info(Ji,JSON.stringify({code:a,messageUId:null==s?void 0:s.messageUId,messageId:null==s?void 0:s.messageId})),[2,{code:a,data:Fe(s)}]):(i.warn(Ji,JSON.stringify({code:a})),[2,{code:a,msg:Qr[a]}])}}))}))}))]:[2,{code:r.NOT_SUPPORT,msg:Qr[r.NOT_SUPPORT]}]}))}))}function Lc(e){return D()?new I(Di,Bi).validate("conversation",e,v.OBJECT,!0).validate("conversationType",null==e?void 0:e.conversationType,v.CONVERSATION_TYPE,!0).validate("targetId",null==e?void 0:e.targetId,v.STRING,!0).validate("channelId",null==e?void 0:e.channelId,v.CHANNEL_ID).ifReadySync((function(t,n){var i=e.conversationType,o=e.targetId,a=e.channelId,s=n.createTraceId();n.info(Di,JSON.stringify({conversationType:i,targetId:o,channelId:a}),s);var c=t.getUnreadMentionedMessages(i,o,a),d=[];return c&&c.length&&c.forEach((function(e){return d.push(Fe(e))})),n.info(Bi,JSON.stringify({code:r.SUCCESS,count:d.length}),s),{code:r.SUCCESS,data:d}})):{code:r.NOT_SUPPORT,msg:Qr[r.NOT_SUPPORT]}}function Gc(e,t,n,i){return Z(this,void 0,void 0,(function(){var o=this;return $(this,(function(a){return qe("RongIMLib.searchMessages","RongIMLib.ElectronExtension.searchMessages"),D()?[2,new I("A-search_messages-T","A-search_messages-R").validate("conversation",e,v.OBJECT,!0).validate("conversationType",null==e?void 0:e.conversationType,v.CONVERSATION_TYPE,!0).validate("targetId",null==e?void 0:e.targetId,v.STRING,!0).validate("channelId",null==e?void 0:e.channelId,v.CHANNEL_ID).validate("keyword",t,v.STRING,!0).validate("timestamp",n,v.NUMBER).validate("count",i,v.NUMBER).ifReady((function(a,s){return Z(o,void 0,void 0,(function(){var o,c,d,u;return $(this,(function(l){switch(l.label){case 0:return[4,a.searchMessageByContent(e.conversationType,e.targetId,t,n,i,1,e.channelId)];case 1:return o=l.sent(),c=o.code,d=o.data,c===r.SUCCESS?(u=[],(null==d?void 0:d.messages)&&d.messages.length&&d.messages.forEach((function(e){return u.push(Fe(e))})),[2,{code:c,data:{messages:u,count:null==d?void 0:d.count}}]):(s.warn(h.O,"searchMessages ->code:"+c+",targetId:"+e.targetId),[2,{code:c,msg:Qr[c]}])}}))}))}))]:[2,{code:r.NOT_SUPPORT,msg:Qr[r.NOT_SUPPORT]}]}))}))}function Jc(e,t,n){return Z(this,void 0,void 0,(function(){var i,o,a,s=this;return $(this,(function(c){return qe("RongIMLib.deleteLocalMessagesByTimestamp","RongIMLib.ElectronExtension.deleteMessagesByTimestamp"),D()?(i=e.conversationType,o=e.targetId,a=e.channelId,[2,new I(xi,ki).validate("conversation",e,v.OBJECT,!0).validate("conversationType",null==e?void 0:e.conversationType,v.CONVERSATION_TYPE,!0).validate("targetId",null==e?void 0:e.targetId,v.STRING,!0).validate("channelId",null==e?void 0:e.channelId,v.CHANNEL_ID).validate("timestamp",t,v.NUMBER,!0).validate("cleanSpace",n,v.BOOLEAN).ifReady((function(e,c){return Z(s,void 0,void 0,(function(){var s,d,u;return $(this,(function(l){switch(l.label){case 0:return s=c.createTraceId(),c.info(xi,JSON.stringify({conversationType:i,targetId:o,channelId:a,timestamp:t,cleanSpace:n}),s),[4,e.deleteMessagesByTimestamp(i,o,t,n,a)];case 1:return d=l.sent(),c.debug(h.A_DELETE_MESSAGES_S,JSON.stringify({code:d,conversationType:i,targetId:o,channelId:a,timestamp:t})),u=d===r.SUCCESS?"info":"warn",c[u](ki,JSON.stringify({code:d}),s),d===r.SUCCESS?[2,{code:d}]:[2,{code:d,msg:Qr[d]}]}}))}))}))]):[2,{code:r.NOT_SUPPORT,msg:Qr[r.NOT_SUPPORT]}]}))}))}function Dc(e){return Z(this,void 0,void 0,(function(){var t=this;return $(this,(function(n){return qe("RongIMLib.clearMessages","RongIMLib.ElectronExtension.clearMessages"),D()?[2,new I(Vi,Hi).validate("conversation",e,v.OBJECT,!0).validate("conversationType",null==e?void 0:e.conversationType,v.CONVERSATION_TYPE,!0).validate("targetId",null==e?void 0:e.targetId,v.STRING,!0).validate("channelId",null==e?void 0:e.channelId,v.CHANNEL_ID).ifReady((function(n,i){return Z(t,void 0,void 0,(function(){var t,o,a,s,c,d;return $(this,(function(u){switch(u.label){case 0:return t=e.conversationType,o=e.targetId,a=e.channelId,s=i.createTraceId(),i.info(Vi,JSON.stringify({conversationType:t,targetId:o,channelId:a}),s),[4,n.clearMessages(t,o,a)];case 1:return c=u.sent(),d=c===r.SUCCESS?"info":"warn",i[d](Hi,JSON.stringify({code:c}),s),c===r.SUCCESS?[2,{code:c}]:[2,{code:c,msg:Qr[c]}]}}))}))}))]:[2,{code:r.NOT_SUPPORT,msg:Qr[r.NOT_SUPPORT]}]}))}))}function Bc(e,t,n,i){return Z(this,void 0,void 0,(function(){var o=this;return $(this,(function(a){return qe("RongIMLib.searchConversationByContent","RongIMLib.ElectronExtension.searchConversationByContent"),D()?[2,new I(Fi,Yi).validate("keyword",e,v.STRING,!0).validate("conversationTypes",t,(function(e){return!!f(e)&&!e.some((function(e){return!m(e)}))}),!1).validate("messageTypes",n,(function(e){return!!f(e)&&!(null==n?void 0:n.some((function(e){return!R(e)})))}),!1).validate("channelId",i,v.STRING).ifReady((function(a,s){return Z(o,void 0,void 0,(function(){var o,c,d,u;return $(this,(function(l){switch(l.label){case 0:return o=s.createTraceId(),s.info(Fi,JSON.stringify({keyword:e,conversationTypes:t,messageTypes:n,channelId:i}),o),[4,a.searchConversationByContent(e,n,i,t)];case 1:return c=l.sent(),d=c.code,u=c.data,d===r.SUCCESS?(s.info(Yi,JSON.stringify({code:d,count:null==u?void 0:u.length}),o),[2,{code:d,data:u}]):(s.warn(Yi,JSON.stringify({code:d}),o),[2,{code:d,msg:Qr[d]}])}}))}))}))]:[2,{code:r.NOT_SUPPORT,msg:Qr[r.NOT_SUPPORT]}]}))}))}function xc(e,t){return Z(this,void 0,void 0,(function(){var n=this;return $(this,(function(i){return D()?[2,new I(qi,Ki).validate("conversation",e,v.OBJECT,!0).validate("conversationType",null==e?void 0:e.conversationType,v.CONVERSATION_TYPE,!0).validate("targetId",null==e?void 0:e.targetId,v.STRING,!0).validate("channelId",null==e?void 0:e.channelId,v.CHANNEL_ID).validate("timestamp",t,v.NUMBER).ifReady((function(i,o){return Z(n,void 0,void 0,(function(){var n,a,s,c,d,u;return $(this,(function(l){switch(l.label){case 0:return n=e.conversationType,a=e.targetId,s=e.channelId,c=o.createTraceId(),o.info(qi,JSON.stringify({conversationType:n,targetId:a,channelId:s,timestamp:t}),c),[4,i.clearUnreadCountByTimestamp(n,a,t,s)];case 1:return d=l.sent(),u=d===r.SUCCESS?"info":"warn",o[u](Ki,JSON.stringify({code:d}),c),d===r.SUCCESS?[2,{code:d}]:[2,{code:d,msg:Qr[d]}]}}))}))}))]:[2,{code:r.NOT_SUPPORT,msg:Qr[r.NOT_SUPPORT]}]}))}))}function kc(e,t){return Z(this,void 0,void 0,(function(){var n=this;return $(this,(function(i){return qe("RongIMLib.setMessageReceivedStatus","RongIMLib.ElectronExtension.setMessageReceivedStatus"),D()?[2,new I(zi,Wi).validate("messageId",e,v.NUMBER,!0).validate("receivedStatus",t,v.NUMBER,!0).ifReady((function(i,o){return Z(n,void 0,void 0,(function(){var n,a,s;return $(this,(function(c){switch(c.label){case 0:return n=o.createTraceId(),o.info(zi,JSON.stringify({messageId:e,receivedStatus:t}),n),[4,i.setMessageReceivedStatus(e,t)];case 1:return a=c.sent(),s=a===r.SUCCESS?"info":"warn",o[s](Wi,JSON.stringify({code:a}),n),a===r.SUCCESS?[2,{code:a}]:[2,{code:a,msg:Qr[a]}]}}))}))}))]:[2,{code:r.NOT_SUPPORT,msg:Qr[r.NOT_SUPPORT]}]}))}))}function Vc(e){return Z(this,void 0,void 0,(function(){var t=this;return $(this,(function(n){return[2,new I(to,no).validate("tagId",null==e?void 0:e.tagId,v.STRING,!0).validate("tagId",null==e?void 0:e.tagId,(function(e){return!!e&&e.length<=10})).validate("tagName",null==e?void 0:e.tagName,v.STRING,!0).validate("tagName",null==e?void 0:e.tagName,(function(e){return!!e&&e.length<=15})).ifReady((function(n,i){return Z(t,void 0,void 0,(function(){var t,o,a;return $(this,(function(s){switch(s.label){case 0:return t=i.createTraceId(),i.info(to,JSON.stringify({tagId:e.tagId,tagName:e.tagName}),t),[4,n.createTag(e)];case 1:return o=s.sent().code,a=o===r.SUCCESS?"info":"warn",i[a](no,JSON.stringify({code:o}),t),o===r.SUCCESS?[2,{code:o}]:[2,{code:o,msg:Qr[o]}]}}))}))}))]}))}))}function Hc(e){return Z(this,void 0,void 0,(function(){var t=this;return $(this,(function(n){return[2,new I(io,oo).validate("tagId",e,v.STRING,!0).ifReady((function(n,i){return Z(t,void 0,void 0,(function(){var t,o,a;return $(this,(function(s){switch(s.label){case 0:return t=i.createTraceId(),i.info(io,JSON.stringify({tagId:e}),t),[4,n.removeTag(e)];case 1:return o=s.sent().code,a=o===r.SUCCESS?"info":"warn",i[a](oo,JSON.stringify({code:o}),t),o===r.SUCCESS?[2,{code:o}]:[2,{code:o,msg:Qr[o]}]}}))}))}))]}))}))}function Fc(e){return Z(this,void 0,void 0,(function(){var t=this;return $(this,(function(n){return[2,new I(ro,ao).validate("tagId",null==e?void 0:e.tagId,v.STRING,!0).validate("tagName",null==e?void 0:e.tagName,v.STRING,!0).validate("tagName",null==e?void 0:e.tagName,(function(e){return!!e&&e.length<=15})).ifReady((function(n,i){return Z(t,void 0,void 0,(function(){var t,o,a;return $(this,(function(s){switch(s.label){case 0:return t=i.createTraceId(),i.info(ro,JSON.stringify({tagId:e.tagId,tagName:e.tagName}),t),[4,n.updateTag(e)];case 1:return o=s.sent().code,a=o===r.SUCCESS?"info":"warn",i[a](ao,JSON.stringify({code:o}),t),o===r.SUCCESS?[2,{code:o}]:[2,{code:o,msg:Qr[o]}]}}))}))}))]}))}))}function Yc(){return Z(this,void 0,void 0,(function(){var e=this;return $(this,(function(t){return[2,new I("","").ifReady((function(t,n){return Z(e,void 0,void 0,(function(){var e,i,o,a,s;return $(this,(function(c){switch(c.label){case 0:return e=n.createTraceId(),n.info(so,"",e),[4,t.getTagList()];case 1:return i=c.sent(),o=i.code,a=i.data,s=o===r.SUCCESS?"info":"warn",n[s](co,JSON.stringify({code:o}),e),[2,{code:r.SUCCESS,data:a}]}}))}))}))]}))}))}function qc(e){return Z(this,void 0,void 0,(function(){var t=this;return $(this,(function(n){return[2,new I(uo,lo).validate("conversation",e,v.OBJECT,!0).validate("conversationType",null==e?void 0:e.conversationType,v.CONVERSATION_TYPE,!0).validate("targetId",null==e?void 0:e.targetId,v.STRING,!0).validate("channelId",null==e?void 0:e.channelId,v.CHANNEL_ID).ifReady((function(n,i){return Z(t,void 0,void 0,(function(){var t,o,a,s,c;return $(this,(function(d){switch(d.label){case 0:return t=i.createTraceId(),i.info(uo,JSON.stringify({conversationType:e.conversationType,targetId:e.targetId,channelId:e.channelId}),t),[4,n.getTagsForConversation(e)];case 1:return o=d.sent(),a=o.code,s=o.data,c=a===r.SUCCESS?"info":"warn",i[c](lo,JSON.stringify({code:a}),t),a===r.SUCCESS?[2,{code:a,data:s}]:[2,{code:a,msg:Qr[a]}]}}))}))}))]}))}))}function Kc(e,t){return Z(this,void 0,void 0,(function(){var n=this;return $(this,(function(i){return[2,new I(vo,fo).validate("tagId",e,v.STRING,!0).validate("conversations",t,(function(e){return!(!_("conversations",e,v.ARRAY,!0)||e.length<=0)&&!e.some((function(e){return!_("conversation",e,v.CONVERSATION,!0)}))}),!0).ifReady((function(i,o){return Z(n,void 0,void 0,(function(){var n,a,s;return $(this,(function(c){switch(c.label){case 0:return n=o.createTraceId(),o.info(vo,JSON.stringify({conversations:t.map((function(e){return{conversationType:e.conversationType,targetId:e.targetId}})),tagId:e}),n),[4,i.addTagForConversations(e,t)];case 1:return a=c.sent().code,s=a===r.SUCCESS?"info":"warn",o[s](fo,JSON.stringify({code:a}),n),a===r.SUCCESS?[2,{code:a}]:[2,{code:a,msg:Qr[a]}]}}))}))}))]}))}))}function zc(e,t){return Z(this,void 0,void 0,(function(){var n=this;return $(this,(function(i){return[2,new I(go,So).validate("tagId",e,v.STRING,!0).validate("conversations",t,(function(e){return!(!_("conversations",e,v.ARRAY,!0)||e.length<=0)&&!e.some((function(e){return!_("conversation",e,v.CONVERSATION,!0)}))}),!0).ifReady((function(i,o){return Z(n,void 0,void 0,(function(){var n,a,s;return $(this,(function(c){switch(c.label){case 0:return n=o.createTraceId(),o.info(go,JSON.stringify({conversations:t.map((function(e){return{conversationType:e.conversationType,targetId:e.targetId}})),tagId:e}),n),[4,i.removeTagForConversations(e,t)];case 1:return a=c.sent().code,s=a===r.SUCCESS?"info":"warn",o[s](So,JSON.stringify({code:a}),n),a===r.SUCCESS?[2,{code:a}]:[2,{code:a,msg:Qr[a]}]}}))}))}))]}))}))}function Wc(e,t){return Z(this,void 0,void 0,(function(){var n=this;return $(this,(function(i){return[2,new I(ho,To).validate("conversation",e,v.OBJECT,!0).validate("conversationType",null==e?void 0:e.conversationType,v.CONVERSATION_TYPE,!0).validate("targetId",null==e?void 0:e.targetId,v.STRING,!0).validate("channelId",null==e?void 0:e.channelId,v.CHANNEL_ID).validate("tagIds",t,(function(e){return!!_("tagIds",e,v.ARRAY,!0)&&!e.some((function(e){return!R(e)}))}),!0).ifReady((function(i,o){return Z(n,void 0,void 0,(function(){var n,a,s;return $(this,(function(c){switch(c.label){case 0:return n=o.createTraceId(),o.info(ho,JSON.stringify({tagIds:t,targetId:e.targetId,conversationType:e.conversationType}),n),[4,i.removeTagsForConversation(e,t)];case 1:return a=c.sent().code,s=a===r.SUCCESS?"info":"warn",o[s](To,JSON.stringify({code:a}),n),a===r.SUCCESS?[2,{code:a}]:[2,{code:a,msg:Qr[a]}]}}))}))}))]}))}))}function jc(e,t){return Z(this,void 0,void 0,(function(){var n=this;return $(this,(function(i){return[2,new I(Io,_o).validate("tagId",e,v.STRING,!0).validate("conversations",t,(function(e){return!(!_("conversations",e,v.ARRAY,!0)||e.length<=0)&&!e.some((function(e){return!_("conversation",e,v.CONVERSATION,!0)}))}),!0).ifReady((function(i,o){return Z(n,void 0,void 0,(function(){var n,a,s;return $(this,(function(c){switch(c.label){case 0:return n=o.createTraceId(),o.info(Io,JSON.stringify({conversations:t.map((function(e){return{conversationType:e.conversationType,targetId:e.targetId}})),tagId:e}),n),[4,i.removeTagForConversations(e,t)];case 1:return a=c.sent().code,s=a===r.SUCCESS?"info":"warn",o[s](_o,JSON.stringify({code:a}),n),a===r.SUCCESS?[2,{code:a}]:[2,{code:a,msg:Qr[a]}]}}))}))}))]}))}))}function Qc(e,t,n){return Z(this,void 0,void 0,(function(){var i=this;return $(this,(function(o){return[2,new I(mo,po).validate("tagId",e,v.STRING,!0).validate("count",t,v.NUMBER,!0).validate("startTime",n,v.NUMBER,!0).ifReady((function(o,a){return Z(i,void 0,void 0,(function(){var i,s,c,d,u;return $(this,(function(l){switch(l.label){case 0:return i=a.createTraceId(),a.info(mo,JSON.stringify({tagId:e,count:t,startTime:n}),i),[4,o.getConversationListByTag(e,n,t)];case 1:return s=l.sent(),c=s.code,d=s.data,c===r.SUCCESS?(u=null==d?void 0:d.map((function(e){return function(e){return X(X({},Ye(e)),{isTopInTag:e.isTopInTag})}(e)})),a.info(po,JSON.stringify({code:c,length:null==u?void 0:u.length}),i),[2,{code:c,data:u}]):(a.warn(po,JSON.stringify({code:c}),i),[2,{code:c,msg:Qr[c]}])}}))}))}))]}))}))}function Xc(e,t){return Z(this,void 0,void 0,(function(){var n=this;return $(this,(function(i){return[2,new I(No,Eo).validate("tagId",e,v.STRING,!0).validate("containMuted",t,v.BOOLEAN,!0).ifReady((function(i,o){return Z(n,void 0,void 0,(function(){var n,a,s,c,d;return $(this,(function(u){switch(u.label){case 0:return n=o.createTraceId(),o.info(No,JSON.stringify({tagId:e,containMuted:t}),n),[4,i.getUnreadCountByTag(e,t)];case 1:return a=u.sent(),s=a.code,c=a.data,d=s===r.SUCCESS?"info":"warn",o[d](No,JSON.stringify({code:s,data:c}),n),[2,{code:s,data:c}]}}))}))}))]}))}))}function Zc(e,t,n){return Z(this,void 0,void 0,(function(){var i=this;return $(this,(function(o){return[2,new I(No,Eo).validate("tagId",e,v.STRING,!0).validate("isTop",n,v.BOOLEAN,!0).validate("conversationType",null==t?void 0:t.conversationType,v.CONVERSATION_TYPE,!0).validate("targetId",null==t?void 0:t.targetId,v.STRING,!0).validate("channelId",null==t?void 0:t.channelId,v.CHANNEL_ID).ifReady((function(o,a){return Z(i,void 0,void 0,(function(){var i,s,c;return $(this,(function(d){switch(d.label){case 0:return i=a.createTraceId(),a.info(No,JSON.stringify({tagId:e,targetId:t.targetId,conversationType:t.conversationType,isTop:n}),i),[4,o.setConversationStatusInTag(e,t,{isTop:n})];case 1:return s=d.sent().code,c=s===r.SUCCESS?"info":"warn",a[c](yo,JSON.stringify({code:s}),i),s===r.SUCCESS?[2,{code:s}]:[2,{code:s,msg:Qr[s]}]}}))}))}))]}))}))}var $c={COMET:"comet",WEBSOCKET:"websocket"},ed={TEXT:"RC:TxtMsg",VOICE:"RC:VcMsg",HQ_VOICE:"RC:HQVCMsg",IMAGE:"RC:ImgMsg",GIF:"RC:GIFMsg",RICH_CONTENT:"RC:ImgTextMsg",LOCATION:"RC:LBSMsg",FILE:"RC:FileMsg",SIGHT:"RC:SightMsg",COMBINE:"RC:CombineMsg",COMBINE_V2:"RC:CombineV2Msg",CHRM_KV_NOTIFY:"RC:chrmKVNotiMsg",LOG_COMMAND:"RC:LogCmdMsg",EXPANSION_NOTIFY:"RC:MsgExMsg",REFERENCE:"RC:ReferenceMsg",RECALL_MESSAGE_TYPE:"RC:RcCmd"};var td=Object.freeze({__proto__:null,getAllConversationList:function(e){return Z(this,void 0,void 0,(function(){var t=this;return $(this,(function(n){return D()?[2,new I(ln,vn).validate("channelId",e,v.CHANNEL_ID).ifReady((function(n,i){return Z(t,void 0,void 0,(function(){var t,o,a,s,c;return $(this,(function(d){switch(d.label){case 0:return t=i.createTraceId(),i.info(ln,JSON.stringify({channelId:e}),t),H(e)?[4,n.getConversationListWithAllChannel()]:[3,2];case 1:return o=d.sent(),[3,4];case 2:return[4,n.getConversationList(void 0,void 0,void 0,void 0,e)];case 3:o=d.sent(),d.label=4;case 4:return a=o.code,s=o.data,i.info(vn,JSON.stringify({code:a,length:null==s?void 0:s.length}),t),a===r.SUCCESS&&s?(c=s.map((function(e){return Ye(e)})),[2,{code:a,data:c}]):(i.warn(vn,JSON.stringify({code:a}),t),[2,{code:a,msg:Qr[a]}])}}))}))}))]:[2,{code:r.NOT_SUPPORT,msg:Qr[r.NOT_SUPPORT]}]}))}))},getConversationList:function(e,t,n,i){return Z(this,void 0,void 0,(function(){var o=this;return $(this,(function(a){return D()?[2,new I(fn,gn).validate("startTime",e,v.NUMBER,!0).validate("count",t,v.NUMBER,!0).validate("channelId",n,v.CHANNEL_ID).ifReady((function(a,s){return Z(o,void 0,void 0,(function(){var o,c,d,u,l,v;return $(this,(function(f){switch(f.label){case 0:return o=s.createTraceId(),s.info(fn,JSON.stringify({startTime:e,count:t,channelId:n}),o),H(n)?[4,a.getConversationListWithAllChannelByPage(e,t)]:[3,2];case 1:return c=f.sent(),[3,4];case 2:return d=[1,2,3,5,6,7,8],[4,a.getConversationsByPage(d,e,t,n,!!i)];case 3:c=f.sent(),f.label=4;case 4:return u=c.code,l=c.data,u===r.SUCCESS&&l?(v=l.map((function(e){return Ye(e)})),s.info(gn,JSON.stringify({code:u,length:v.length}),o),[2,{code:u,data:v}]):(s.warn(gn,JSON.stringify({code:u}),o),[2,{code:u,msg:Qr[u]}])}}))}))}))]:[2,{code:r.NOT_SUPPORT,msg:Qr[r.NOT_SUPPORT]}]}))}))},searchConversationByContent:function(e,t,n){return Z(this,void 0,void 0,(function(){var i=this;return $(this,(function(o){return D()?[2,new I(Sn,hn).validate("keyword",e,v.STRING,!0).validate("messageTypes",t,(function(e){return!!f(e)&&!e.some((function(e){return!F(e)}))}),!0).validate("channelId",n,v.CHANNEL_ID).ifReady((function(o,a){return Z(i,void 0,void 0,(function(){var i,s,c,d,u;return $(this,(function(l){switch(l.label){case 0:return i=a.createTraceId(),a.info(Sn,JSON.stringify({keyword:e,messageTypes:t,channelId:n}),i),H(n)?[4,o.searchConversationByContentWithAllChannel(e,t)]:[3,2];case 1:return s=l.sent(),[3,4];case 2:return[4,o.searchConversationByContent(e,t,n)];case 3:s=l.sent(),l.label=4;case 4:return c=s.code,d=s.data,c===r.SUCCESS&&d?(u=d.map((function(e){return Ye(e)})),a.info(hn,JSON.stringify({code:c,length:u.length}),i),[2,{code:c,data:u}]):(a.warn(hn,JSON.stringify({code:c}),i),[2,{code:c,msg:Qr[c]}])}}))}))}))]:[2,{code:r.NOT_SUPPORT,msg:Qr[r.NOT_SUPPORT]}]}))}))},getConversations:function(e){return Z(this,void 0,void 0,(function(){var t=this;return $(this,(function(n){return D()?[2,new I(Tn,In).validate("conversationList",e,B({maxLength:100,minLength:1,itemValidator:function(e){return Y(e,[s.PRIVATE,s.GROUP,s.SYSTEM])}}),!0).ifReady((function(n,i){return Z(t,void 0,void 0,(function(){var t,o,a,s,c;return $(this,(function(d){switch(d.label){case 0:return t=i.createTraceId(),i.info(Tn,JSON.stringify({conversations:e}),t),[4,n.getConversations(e)];case 1:return o=d.sent(),a=o.code,s=o.data,a===r.SUCCESS&&s?(c=s.map((function(e){return Ye(e)})),i.info(In,JSON.stringify({code:a,length:c.length}),t),[2,{code:a,data:c}]):(i.warn(In,JSON.stringify({code:a}),t),[2,{code:a,msg:Qr[a]}])}}))}))}))]:[2,{code:r.NOT_SUPPORT,msg:Qr[r.NOT_SUPPORT]}]}))}))},searchMessages:function(e,t,n,i,o){return Z(this,void 0,void 0,(function(){var a=this;return $(this,(function(s){return D()?[2,new I(_n,mn).validate("conversation",e,v.OBJECT,!0).validate("conversationType",null==e?void 0:e.conversationType,v.CONVERSATION_TYPE,!0).validate("targetId",null==e?void 0:e.targetId,v.STRING,!0).validate("channelId",null==e?void 0:e.channelId,v.CHANNEL_ID).validate("keyword",t,v.STRING,!0).validate("startTime",n,v.NUMBER,!0).validate("count",i,v.NUMBER,!0).validate("messageTypes",o,B({itemValidator:F})).ifReady((function(s,c){return Z(a,void 0,void 0,(function(){var a,d,u,l,v,f,g,S,h,T,I;return $(this,(function(_){switch(_.label){case 0:return a=e.targetId,d=e.conversationType,u=e.channelId,l=c.createTraceId(),c.info(_n,JSON.stringify({targetId:a,conversationType:d,channelId:u,keyword:t,startTime:n,count:i}),l),o?[4,s.searchMessageByContentAndMessageType(d,a,t,n,i,o,u)]:[3,2];case 1:return v=_.sent(),[3,6];case 2:return H(u)?[4,s.searchMessageByContentWithAllChannel(d,a,t,n,i)]:[3,4];case 3:return v=_.sent(),[3,6];case 4:return[4,s.searchMessageByContent(d,a,t,n,i,0,u)];case 5:v=_.sent(),_.label=6;case 6:return f=v.code,g=v.data,f===r.SUCCESS&&g?(S=g.messages,h=g.count,T=[],I=S.map((function(e){return T.push(e.messageUId),Fe(e)})),c.info(mn,JSON.stringify({code:f,list:T}),l),[2,{code:f,data:{messages:I,count:h}}]):(c.warn(mn,JSON.stringify({code:f}),l),[2,{code:f,msg:Qr[f]}])}}))}))}))]:[2,{code:r.NOT_SUPPORT,msg:Qr[r.NOT_SUPPORT]}]}))}))},searchMessageInTimeRange:function(e,t){return Z(this,void 0,void 0,(function(){var n=this;return $(this,(function(i){return D()?[2,new I(pn,Nn).validate("conversation",e,v.OBJECT,!0).validate("conversationType",null==e?void 0:e.conversationType,v.CONVERSATION_TYPE,!0).validate("targetId",null==e?void 0:e.targetId,v.STRING,!0).validate("startTime",null==t?void 0:t.startTime,v.NUMBER,!0).validate("endTime",null==t?void 0:t.endTime,v.NUMBER,!0).validate("offset",null==t?void 0:t.offset,v.NUMBER).validate("limit",null==t?void 0:t.limit,v.NUMBER).validate("keyword",null==t?void 0:t.keyword,v.STRING,!0).ifReady((function(i,o){return Z(n,void 0,void 0,(function(){var n,a,s,c,d,u,l,v,f,g,S;return $(this,(function(h){switch(h.label){case 0:return n=e.conversationType,a=e.targetId,s=t.keyword,c=t.startTime,d=t.endTime,u=t.offset,l=t.limit,u=u||0,l=l||5,v=o.createTraceId(),o.info(pn,JSON.stringify({targetId:a,conversationType:n,keyword:s,startTime:c,endTime:d,offset:u,limit:l}),v),[4,i.searchMessageByContentInTimeRangeWithAllChannel(n,a,s,c,d,u,l)];case 1:return f=h.sent(),g=f.code,S=f.data,g===r.SUCCESS&&S?[2,{code:g,data:{messages:S.messages.map((function(e){return Fe(e)}))}}]:(o.warn(Nn,JSON.stringify({code:g}),v),[2,{code:g}])}}))}))}))]:[2,{code:r.NOT_SUPPORT,msg:Qr[r.NOT_SUPPORT]}]}))}))},searchMessagesByUser:function(e,t,n,i){return Z(this,void 0,void 0,(function(){var o=this;return $(this,(function(a){return D()?[2,new I(En,yn).validate("conversation",e,v.OBJECT,!0).validate("conversationType",null==e?void 0:e.conversationType,v.CONVERSATION_TYPE,!0).validate("targetId",null==e?void 0:e.targetId,v.STRING,!0).validate("channelId",null==e?void 0:e.channelId,v.CHANNEL_ID).validate("userId",t,v.STRING,!0).validate("startTime",n,v.NUMBER,!0).validate("count",i,v.NUMBER,!0).ifReady((function(a,s){return Z(o,void 0,void 0,(function(){var o,c,d,u,l,v,f;return $(this,(function(g){switch(g.label){case 0:return o=e.conversationType,c=e.targetId,d=e.channelId,u=s.createTraceId(),s.info(En,JSON.stringify({targetId:c,conversationType:o,channelId:d,startTime:n,userId:t,count:i}),u),[4,a.searchMessagesByUser(o,c,t,n,i,d)];case 1:return l=g.sent(),v=l.code,f=l.data,v===r.SUCCESS&&f?[2,{code:v,data:{messages:f.messages.map((function(e){return Fe(e)}))}}]:(s.warn(yn,JSON.stringify({code:v})),[2,{code:v}])}}))}))}))]:[2,{code:r.NOT_SUPPORT,msg:Qr[r.NOT_SUPPORT]}]}))}))},getHistoryMessagesByMessageTypes:function(e,t){return Z(this,void 0,void 0,(function(){var n=this;return $(this,(function(i){return D()?[2,new I(Rn,Cn).validate("conversation",e,v.OBJECT,!0).validate("conversationType",null==e?void 0:e.conversationType,v.CONVERSATION_TYPE,!0).validate("targetId",null==e?void 0:e.targetId,v.STRING,!0).validate("channelId",null==e?void 0:e.channelId,v.CHANNEL_ID).validate("count",null==t?void 0:t.count,v.NUMBER).validate("count",null==t?void 0:t.count,(function(e){var t=e>0&&e<=100;return t||null===console||void 0===console||console.error("option.count is invalid, It should be greater than 0 and less than 100"),t})).validate("timestamp",null==t?void 0:t.timestamp,v.NUMBER).validate("order",null==t?void 0:t.order,(function(e){return[0,1].includes(e)})).validate("messageTypes",null==t?void 0:t.messageTypes,(function(e){return!!f(e)&&!e.some((function(e){return!F(e)}))}),!0).ifReady((function(i,o){return Z(n,void 0,void 0,(function(){var n,a,s,c,d,u,l,v,f,g,S,h,T,I,_,m,p,N,E;return $(this,(function(y){switch(y.label){case 0:return n=t.count,a=void 0===n?20:n,s=t.timestamp,c=void 0===s?0:s,d=t.order,u=void 0===d?0:d,l=t.messageTypes,v=e.conversationType,f=e.targetId,g=e.channelId,S=void 0===g?"":g,h=o.createTraceId(),o.info(Rn,JSON.stringify({targetId:f,conversationType:v,channelId:S,count:a,timestamp:c,messageTypes:l}),h),[4,i.getHistoryMessagesByObjectNames(v,f,c,a,l,u,S)];case 1:return T=y.sent(),I=T.code,_=T.data,I===r.SUCCESS?(p=(m=_).list,N=m.hasMore,E=p.map((function(e){return Fe(e)})),[2,{code:I,data:{messages:E,hasMore:N,list:E}}]):(o.warn(Cn,JSON.stringify({code:I})),[2,{code:I,msg:Qr[I]}])}}))}))}))]:[2,{code:r.NOT_SUPPORT,msg:Qr[r.NOT_SUPPORT]}]}))}))},getContinuousMessages:function(e,t){return Z(this,void 0,void 0,(function(){var n=this;return $(this,(function(i){return D()?[2,new I(On,An).validate("conversation",e,v.OBJECT,!0).validate("conversationType",null==e?void 0:e.conversationType,v.CONVERSATION_TYPE,!0).validate("targetId",null==e?void 0:e.targetId,v.STRING,!0).validate("channelId",null==e?void 0:e.channelId,v.CHANNEL_ID).validate("timestamp",null==t?void 0:t.timestamp,v.NUMBER).validate("count",null==t?void 0:t.count,v.NUMBER).validate("count",null==t?void 0:t.count,(function(e){var t=e>0&&e<=100;return t||null===console||void 0===console||console.error('"options.count" is invalid, It should be greater than 0 and less than 100'),t})).validate("order",null==t?void 0:t.order,(function(e){return 0===e||1===e})).ifReady((function(i,o){return Z(n,void 0,void 0,(function(){var n,a,s,c,d,u,l,v,f,g,S,h,T,I,_;return $(this,(function(m){switch(m.label){case 0:return n=t.count,a=t.timestamp,s=t.order,c=e.conversationType,d=e.targetId,u=e.channelId,l=o.createTraceId(),o.info(On,JSON.stringify({targetId:d,conversationType:c,channelId:u,count:n,timestamp:a}),l),(i.getNaviInfoFromCache()||{}).historyMsg?[4,i.getContinuousMessages(c,d,a||0,n||20,s||0,u||"")]:[2,{code:r.MESSAGE_STORAGE_SERVICE_UNAVAILABLE}];case 1:return v=m.sent(),f=v.code,g=v.data,f===r.SUCCESS?(h=(S=g).list,T=S.timestamp,I=S.hasMore,_=h.map((function(e){return Fe(e)})),[2,{code:f,data:{list:_,timestamp:T,hasMore:I}}]):(o.warn(An,JSON.stringify({code:f})),[2,{code:f,msg:Qr[f]}])}}))}))}))]:[2,{code:r.NOT_SUPPORT,msg:Qr[r.NOT_SUPPORT]}]}))}))},setMessageStatusToRead:function(e,t){return Z(this,void 0,void 0,(function(){var n=this;return $(this,(function(i){return D()?[2,new I(Un,wn).validate("conversation",e,v.OBJECT,!0).validate("conversationType",null==e?void 0:e.conversationType,v.CONVERSATION_TYPE,!0).validate("targetId",null==e?void 0:e.targetId,v.STRING,!0).validate("channelId",null==e?void 0:e.channelId,v.CHANNEL_ID).validate("timestamp",t,v.NUMBER,!0).ifReady((function(i,o){return Z(n,void 0,void 0,(function(){var n,r,a,s,c;return $(this,(function(d){switch(d.label){case 0:return n=e.conversationType,r=e.targetId,a=e.channelId,s=o.createTraceId(),o.info(Un,JSON.stringify({targetId:r,conversationType:n,channelId:a,timestamp:t}),s),[4,i.setMessageStatusToRead(n,r,t,a)];case 1:return c=d.sent(),o.info(wn,JSON.stringify(c),s),[2,c]}}))}))}))]:[2,{code:r.NOT_SUPPORT,msg:Qr[r.NOT_SUPPORT]}]}))}))},setMessageReceivedStatus:function(e,t){return Z(this,void 0,void 0,(function(){var n=this;return $(this,(function(i){return console.warn("`setMessageSentStatus` has being deprecated, use `setMessageReceivedStatusInfo` instead."),D()?[2,new I(Pn,Mn).validate("messageId",e,v.NUMBER,!0).validate("receivedStatus",t,(function(e){return!H(a[e])}),!0).ifReady((function(i,o){return Z(n,void 0,void 0,(function(){var n,r;return $(this,(function(a){switch(a.label){case 0:return n=o.createTraceId(),o.info(Pn,JSON.stringify({messageId:e,receivedStatus:t}),n),[4,i.setMessageReceivedStatus(e,t)];case 1:return r=a.sent(),o.info(Mn,JSON.stringify({code:r}),n),[2,{code:r}]}}))}))}))]:[2,{code:r.NOT_SUPPORT,msg:Qr[r.NOT_SUPPORT]}]}))}))},setMessageReceivedStatusInfo:function(e,t){return Z(this,void 0,void 0,(function(){var n=this;return $(this,(function(i){return D()?[2,new I(Gn,Jn).validate("messageId",e,v.NUMBER,!0).validate("receivedStatusInfo",t,v.OBJECT,!0).validate("receivedStatusInfo",null==t?void 0:t.isRead,v.BOOLEAN).validate("receivedStatusInfo",null==t?void 0:t.isListened,v.BOOLEAN).validate("receivedStatusInfo",null==t?void 0:t.isDownload,v.BOOLEAN).validate("receivedStatusInfo",null==t?void 0:t.isRetrieved,v.BOOLEAN).ifReady((function(i,o){return Z(n,void 0,void 0,(function(){var n,r,a;return $(this,(function(s){switch(s.label){case 0:return n=q(t),r=o.createTraceId(),o.info(Gn,JSON.stringify({messageId:e,sentStatus:n}),r),[4,i.setMessageReceivedStatus(e,n)];case 1:return a=s.sent(),o.info(Jn,JSON.stringify({code:a}),r),[2,{code:a}]}}))}))}))]:[2,{code:r.NOT_SUPPORT,msg:Qr[r.NOT_SUPPORT]}]}))}))},setMessageSentStatus:function(e,t){return Z(this,void 0,void 0,(function(){var n=this;return $(this,(function(i){return D()?[2,new I(bn,bn).validate("messageId",e,v.NUMBER,!0).validate("sentStatus",t,(function(e){return!H(V[e])}),!0).ifReady((function(i,o){return Z(n,void 0,void 0,(function(){var n,r;return $(this,(function(a){switch(a.label){case 0:return n=o.createTraceId(),o.info(bn,JSON.stringify({messageId:e,sentStatus:t}),n),[4,i.setMessageSentStatus(e,t)];case 1:return r=a.sent(),o.info(Ln,JSON.stringify({code:r}),n),[2,{code:r}]}}))}))}))]:[2,{code:r.NOT_SUPPORT,msg:Qr[r.NOT_SUPPORT]}]}))}))},setMessageContent:function(e,t,n){return void 0===n&&(n=""),Z(this,void 0,void 0,(function(){var i=this;return $(this,(function(o){return D()?[2,new I(Dn,Bn).validate("messageId",e,v.NUMBER,!0).validate("content",t,v.OBJECT,!0).validate("messageType",n,v.ONLY_STRING,!0).ifReady((function(o,r){return Z(i,void 0,void 0,(function(){var i,a;return $(this,(function(s){switch(s.label){case 0:return i=r.createTraceId(),r.info(Dn,JSON.stringify({messageId:e,messageType:n}),i),[4,o.setMessageContent(e,t,n)];case 1:return a=s.sent(),r.info(Bn,JSON.stringify({code:a}),i),[2,{code:a}]}}))}))}))]:[2,{code:r.NOT_SUPPORT,msg:Qr[r.NOT_SUPPORT]}]}))}))},deleteMessages:function(e){return Z(this,void 0,void 0,(function(){var t=this;return $(this,(function(n){return D()?[2,new I(xn,kn).validate("messageIds",e,(function(e){return!!f(e)&&!e.some((function(e){return!y(e)}))}),!0).ifReady((function(n,i){return Z(t,void 0,void 0,(function(){var t,o;return $(this,(function(r){switch(r.label){case 0:return t=i.createTraceId(),i.info(xn,JSON.stringify({messageIds:e}),t),[4,n.deleteMessages(e)];case 1:return o=r.sent(),i.info(kn,JSON.stringify({code:o}),t),[2,{code:o}]}}))}))}))]:[2,{code:r.NOT_SUPPORT,msg:Qr[r.NOT_SUPPORT]}]}))}))},clearMessages:function(e){return Z(this,void 0,void 0,(function(){var t=this;return $(this,(function(n){return D()?[2,new I(Vn,Hn).validate("conversation",e,v.OBJECT,!0).validate("conversationType",null==e?void 0:e.conversationType,v.CONVERSATION_TYPE,!0).validate("targetId",null==e?void 0:e.targetId,v.STRING,!0).validate("channelId",null==e?void 0:e.channelId,v.CHANNEL_ID).ifReady((function(n,i){return Z(t,void 0,void 0,(function(){var t,o,r,a,s;return $(this,(function(c){switch(c.label){case 0:return t=e.conversationType,o=e.targetId,r=e.channelId,a=i.createTraceId(),i.info(Vn,JSON.stringify({conversationType:t,targetId:o,channelId:r}),a),[4,n.clearMessages(t,o,r)];case 1:return s=c.sent(),i.info(Hn,JSON.stringify({code:s}),a),[2,{code:s}]}}))}))}))]:[2,{code:r.NOT_SUPPORT,msg:Qr[r.NOT_SUPPORT]}]}))}))},deleteMessagesByTimestamp:function(e,t,n){return Z(this,void 0,void 0,(function(){var i,o,a,s=this;return $(this,(function(c){return D()?(i=e.conversationType,o=e.targetId,a=e.channelId,[2,new I(Fn,Yn).validate("conversation",e,v.OBJECT,!0).validate("conversationType",null==e?void 0:e.conversationType,v.CONVERSATION_TYPE,!0).validate("targetId",null==e?void 0:e.targetId,v.STRING,!0).validate("channelId",null==e?void 0:e.channelId,v.CHANNEL_ID).validate("timestamp",t,v.NUMBER,!0).validate("cleanSpace",n,v.BOOLEAN).ifReady((function(e,c){return Z(s,void 0,void 0,(function(){var s,d,u;return $(this,(function(l){switch(l.label){case 0:return s=c.createTraceId(),c.info(Fn,JSON.stringify({conversationType:i,targetId:o,channelId:a,timestamp:t,cleanSpace:n}),s),[4,e.deleteMessagesByTimestamp(i,o,t,n,a)];case 1:return d=l.sent(),u=d===r.SUCCESS?"info":"warn",c[u](Yn,JSON.stringify({code:d}),s),[2,{code:d}]}}))}))}))]):[2,{code:r.NOT_SUPPORT,msg:Qr[r.NOT_SUPPORT]}]}))}))},batchClearMessagesByTimestamp:function(e){return Z(this,void 0,void 0,(function(){var t=this;return $(this,(function(n){return D()?[2,new I(fi,gi).ifReady((function(n,i){return Z(t,void 0,void 0,(function(){var t,o,a,c;return $(this,(function(d){switch(d.label){case 0:return t=function(e,t){if(!_("options",e,v.ARRAY,!0)||!_("options",e,(function(n){return!(e.length>20||0===e.length)||(t.error(gi,"conversations length should not be greater than 20 and not be equal to 0"),!1)}),!0))return r.INVALID_PARAMETER_CLEAR_MESSAGE_OPTION_LIST;for(var n=0,i=e;n<i.length;n++){var o=i[n];if(!(_("options",o,v.OBJECT,!0)&&_("options.targetId",o.targetId,v.STRING,!0)&&_("options.conversationType",o.conversationType,(function(e){var n=[s.PRIVATE,s.GROUP,s.CHATROOM,s.SYSTEM].includes(e);return n||t.error(gi,"conversations.conversationType is invalid, It should be one of the following values:\n ConversationType.PRIVATE,\n ConversationType.GROUP,\n ConversationType.CHATROOM,\n ConversationType.SYSTEM,\n "),n}),!0)&&_("options.timestamp",o.timestamp,v.NUMBER,!0)&&_("options.channelId",o.channelId,v.ONLY_STRING)))return r.INVALID_PARAMETER_CLEAR_MESSAGE_OPTION_LIST}}(e,i),t?[2,{code:r.INVALID_PARAMETER_CLEAR_MESSAGE_OPTION_LIST}]:(o=e.map((function(e){return{conversationType:e.conversationType,targetId:e.targetId,timestamp:e.timestamp,channelId:e.channelId||""}})),a=i.createTraceId(),i.info(fi,"options: "+JSON.stringify(o),a),[4,n.batchClearMessagesByTimestamp(o)]);case 1:return c=d.sent(),i[r.SUCCESS===c?"info":"warn"](gi,"code: "+c,a),[2,{code:c}]}}))}))}))]:[2,{code:r.NOT_SUPPORT,msg:Qr[r.NOT_SUPPORT]}]}))}))},insertMessage:function(e,t,n){return void 0===n&&(n={}),Z(this,void 0,void 0,(function(){var i=this;return $(this,(function(o){return D()?[2,new I(qn,Kn).validate("conversation",e,v.OBJECT,!0).validate("conversationType",null==e?void 0:e.conversationType,v.CONVERSATION_TYPE,!0).validate("targetId",null==e?void 0:e.targetId,v.STRING,!0).validate("channelId",null==e?void 0:e.channelId,v.CHANNEL_ID).validate("userId",t,(function(e){return e instanceof fs||_("message.senderUserId",null==e?void 0:e.senderUserId,v.STRING,!0)}),!0).validate("messageType",null==t?void 0:t.messageType,v.STRING,!0).validate("content",null==t?void 0:t.content,v.OBJECT,!0).validate("messageDirection",t,(function(e){return e instanceof fs||_("message.messageDirection",null==e?void 0:e.messageDirection,v.NUMBER,!0)}),!0).validate("canIncludeExpansion",t,(function(e){return e instanceof fs||_("message.canIncludeExpansion",null==e?void 0:e.canIncludeExpansion,v.BOOLEAN)})).validate("expansion",t,(function(e){return e instanceof fs||_("message.expansion",null==e?void 0:e.expansion,v.OBJECT)})).validate("disableNotification",t,(function(e){return e instanceof fs||_("message.expansion",null==e?void 0:e.disableNotification,v.BOOLEAN)})).validate("timestamp",t,(function(e){return e instanceof fs||_("message.sentTime",null==e?void 0:e.sentTime,v.NUMBER)})).validate("sentStatus",t,(function(e){return e instanceof fs||_("message.sentStatus",null==e?void 0:e.sentStatus,v.NUMBER)})).validate("receivedStatus",t,(function(e){return e instanceof fs||_("message.receivedStatus",null==e?void 0:e.receivedStatus,v.NUMBER)})).validate("receivedStatusInfo",t,(function(e){return e instanceof fs||_("message.receivedStatusInfo",null==e?void 0:e.receivedStatusInfo,v.OBJECT)})).validate("directedUserIds",t,(function(e){return e instanceof fs||!(null==e?void 0:e.directedUserIds)||!(!(null==e?void 0:e.directedUserIds)||!f(null==e?void 0:e.directedUserIds))&&(!e.directedUserIds.some((function(e){return!R(e)}))&&e.directedUserIds.length<300)})).validate("searchContent",null==n?void 0:n.searchContent,v.STRING).ifReady((function(o,s){return Z(i,void 0,void 0,(function(){var i,c,d,u,l,v,f,g,S,h,T,I,_,m,p,N,E,y,R,C;return $(this,(function(O){switch(O.label){case 0:return i="",c=1,v=!1,g=a.UNREAD,T=t.messageType,I=t.content,t instanceof fs||(i=t.senderUserId,c=t.messageDirection,v=t.canIncludeExpansion,f=t.expansion,l=t.disableNotification,d=t.sentTime,u=t.sentStatus,g=t.receivedStatus,S=t.receivedStatusInfo,h=t.directedUserIds),_=s.createTraceId(),s.info(qn,JSON.stringify({conversationType:e.conversationType,targetId:e.targetId,messageType:T,sentTime:d}),_),m=n.isUnread,p=n.searchContent,N=g,S&&(N=q(S)),E={senderUserId:i,messageType:T,content:I,messageDirection:c,sentTime:d,sentStatus:u,searchContent:p,isUnread:!!m,messageUId:"",disableNotification:l,canIncludeExpansion:v,expansionMsg:JSON.stringify(f),channelId:e.channelId||"",readStatus:N,directedUserIds:h},[4,o.insertMessage(e.conversationType,e.targetId,E)];case 1:return y=O.sent(),R=y.code,C=y.data,R===r.SUCCESS?(s.info(Kn,JSON.stringify({code:R,messageId:null==C?void 0:C.messageId}),_),[2,{code:R,data:Fe(C)}]):(s.warn(Kn,JSON.stringify({code:R}),_),[2,{code:R,msg:Qr[R]}])}}))}))}))]:[2,{code:r.NOT_SUPPORT,msg:Qr[r.NOT_SUPPORT]}]}))}))},batchInsertMessage:function(e,t){return Z(this,void 0,void 0,(function(){var n=this;return $(this,(function(i){return D()?[2,new I(Wn,Wn).validate("messages",e,(function(e){var t,n,i,o;if(!_("messages",e,v.ARRAY,!0))return!1;if(e.length<=0||e.length>=500)return!1;for(var r in e)if(!_("message",e[r],v.OBJECT,!0)||!_("message.conversationType",e[r].conversationType,(function(e){return[s.PRIVATE,s.DISCUSSION,s.GROUP,s.CUSTOMER_SERVICE,s.SYSTEM,s.APP_PUBLIC_SERVICE,s.PUBLIC_SERVICE].includes(e)}),!0)||!_("message.targetId",e[r].targetId,v.STRING,!0)||!_("message.senderUserId",e[r].senderUserId,v.STRING,!0)||!_("message.messageType",e[r].messageType,v.STRING,!0)||!_("message.content",e[r].content,v.OBJECT,!0)||!_("message.messageDirection",e[r].messageDirection,v.NUMBER,!0)||!_("message.canIncludeExpansion",e[r].canIncludeExpansion,v.BOOLEAN)||!_("message.expansion",e[r].expansion,v.OBJECT)||!_("message.disableNotification",e[r].disableNotification,v.BOOLEAN)||!_("message.sentTime",e[r].sentTime,v.NUMBER)||!_("message.sentStatus",e[r].sentStatus,v.NUMBER)||!_("options.isUnread",null===(t=e[r])||void 0===t?void 0:t.isUnread,v.BOOLEAN)||!_("options.searchContent",null===(n=e[r])||void 0===n?void 0:n.searchContent,v.STRING)||!_("options.receivedStatus",null===(i=e[r])||void 0===i?void 0:i.receivedStatus,v.NUMBER)||!_("options.receivedStatusInfo",null===(o=e[r])||void 0===o?void 0:o.receivedStatusInfo,v.OBJECT)||e[r].directedUserIds&&e[r].directedUserIds.some((function(e){return!_("userId",e,v.STRING,!0)}))&&e[r].directedUserIds.length<300)return console.warn("then "+r+" index message validation failed"),!1;return!0}),!0).validate("checkDuplicate",t,v.BOOLEAN).ifReady((function(i,o){return Z(n,void 0,void 0,(function(){var n,a,s,c;return $(this,(function(d){switch(d.label){case 0:return n=o.createTraceId(),o.info(zn,JSON.stringify({checkDuplicate:t,length:e.length}),n),[4,i.batchInsertMessage(e,t)];case 1:return a=d.sent(),s=a.code,c=a.data,s===r.SUCCESS?(o.info(Wn,JSON.stringify({code:s,data:c}),n),[2,{code:s,data:c}]):(o.warn(Wn,JSON.stringify({code:s}),n),[2,{code:s,msg:Qr[s]}])}}))}))}))]:[2,{code:r.NOT_SUPPORT,msg:Qr[r.NOT_SUPPORT]}]}))}))},getMessageCount:function(e){return Z(this,void 0,void 0,(function(){var t=this;return $(this,(function(n){return D()?[2,new I(jn,Qn).validate("conversation",e,v.OBJECT,!0).validate("conversationType",null==e?void 0:e.conversationType,v.CONVERSATION_TYPE,!0).validate("targetId",null==e?void 0:e.targetId,v.STRING,!0).validate("channelId",null==e?void 0:e.channelId,v.CHANNEL_ID).ifReady((function(n,i){return Z(t,void 0,void 0,(function(){var t,o,r,a,s,c,d;return $(this,(function(u){switch(u.label){case 0:return t=e.conversationType,o=e.targetId,r=e.channelId,a=i.createTraceId(),i.info(jn,JSON.stringify({conversationType:t,targetId:o,channelId:r}),a),[4,n.getMessageCount(t,o,r)];case 1:return s=u.sent(),c=s.code,d=s.data,i.info(Qn,JSON.stringify({code:c,data:d}),a),[2,{code:c,data:d}]}}))}))}))]:[2,{code:r.NOT_SUPPORT,msg:Qr[r.NOT_SUPPORT]}]}))}))},getPrivateMessageDeliverTime:function(e){return Z(this,void 0,void 0,(function(){var t=this;return $(this,(function(n){return D()?[2,new I(Xn,Zn).validate("messageUId",e,v.STRING,!0).ifReady((function(n,i){return Z(t,void 0,void 0,(function(){var t,o,a,s;return $(this,(function(c){switch(c.label){case 0:return t=i.createTraceId(),i.info(Xn,JSON.stringify({messageUId:e}),t),[4,n.getPrivateMessageDeliverTime(e)];case 1:return o=c.sent(),a=o.code,s=o.data,a===r.SUCCESS?(i.info(Zn,JSON.stringify({code:a,data:s}),t),[2,{code:a,data:s}]):(i.warn(Zn,JSON.stringify({code:a}),t),[2,{code:a,msg:Qr[a]}])}}))}))}))]:[2,{code:r.NOT_SUPPORT,msg:Qr[r.NOT_SUPPORT]}]}))}))},getGroupMessageDeliverList:function(e,t){return Z(this,void 0,void 0,(function(){var n=this;return $(this,(function(i){return D()?[2,new I($n,ei).validate("targetId",e,v.STRING,!0).validate("messageUId",t,v.STRING,!0).ifReady((function(i,o){return Z(n,void 0,void 0,(function(){var n,a,s,c,d;return $(this,(function(u){switch(u.label){case 0:return n=o.createTraceId(),o.info($n,JSON.stringify({targetId:e,messageUId:t}),n),[4,i.getGroupMessageDeliverList(e,t)];case 1:return a=u.sent(),s=a.code,c=a.data,d=s===r.SUCCESS?"info":"warn",o[d](ei,JSON.stringify({code:s}),n),s===r.SUCCESS?[2,{code:s,data:c}]:[2,{code:s,msg:Qr[s]}]}}))}))}))]:[2,{code:r.NOT_SUPPORT,msg:Qr[r.NOT_SUPPORT]}]}))}))},setCheckDuplicateMessage:function(e){return Z(this,void 0,void 0,(function(){var t=this;return $(this,(function(n){return D()?[2,new I(ti,ni).validate("checkDuplicate",e,v.BOOLEAN).ifReady((function(n,i){return Z(t,void 0,void 0,(function(){var t,o,r,a;return $(this,(function(s){switch(s.label){case 0:return t=i.createTraceId(),i.info(ti,JSON.stringify({checkDuplicate:e}),t),[4,n.setCheckDuplicateMessage(!!e)];case 1:return o=s.sent(),r=o.code,a=o.data,i.info(ni,JSON.stringify({code:r,data:a}),t),[2,{code:r}]}}))}))}))]:[2,{code:r.NOT_SUPPORT,msg:Qr[r.NOT_SUPPORT]}]}))}))},setCheckChatRoomDuplicateMessage:function(e){return Z(this,void 0,void 0,(function(){var t=this;return $(this,(function(n){return D()?[2,new I(ii,oi).validate("checkDuplicate",e,v.BOOLEAN).ifReady((function(n,i){return Z(t,void 0,void 0,(function(){var t,o,r,a;return $(this,(function(s){switch(s.label){case 0:return t=i.createTraceId(),i.info(ii,JSON.stringify({checkDuplicate:e}),t),[4,n.setCheckChatRoomDuplicateMessage(!!e)];case 1:return o=s.sent(),r=o.code,a=o.data,i.info(oi,JSON.stringify({code:r,data:a}),t),[2,{code:r}]}}))}))}))]:[2,{code:r.NOT_SUPPORT,msg:Qr[r.NOT_SUPPORT]}]}))}))},getMessagesAroundTimestamp:function(e,t){return Z(this,void 0,void 0,(function(){var n=this;return $(this,(function(i){return D()?[2,new I(fr,gr).validate("conversation",e,v.OBJECT,!0).validate("conversationType",null==e?void 0:e.conversationType,v.CONVERSATION_TYPE,!0).validate("targetId",null==e?void 0:e.targetId,x,!0).validate("channelId",null==e?void 0:e.channelId,v.CHANNEL_ID).validate("timestamp",null==t?void 0:t.timestamp,K({min:0}),!0).validate("beforeCount",null==t?void 0:t.beforeCount,K({min:0}),!0).validate("afterCount",null==t?void 0:t.afterCount,K({min:0}),!0).ifReady((function(i,o){return Z(n,void 0,void 0,(function(){var n,a,s,c,d,u,l;return $(this,(function(v){switch(v.label){case 0:return n=o.createTraceId(),o.info(fr,JSON.stringify({option:t,conversation:e}),n),a=t.timestamp,s=t.beforeCount,c=t.afterCount,[4,i.getMessagesByTimestamp(e,a,s,c)];case 1:return d=v.sent(),u=d.code,l=d.data,u===r.SUCCESS?(o.info(gr,JSON.stringify({code:u,data:l}),n),[2,{code:u,data:null==l?void 0:l.map((function(e){return Fe(e)}))}]):(o.warn(gr,JSON.stringify({code:u}),n),[2,{code:u,msg:Qr[u]}])}}))}))}))]:[2,{code:r.NOT_SUPPORT,msg:Qr[r.NOT_SUPPORT]}]}))}))},clearLocalData:function(){return Z(this,void 0,void 0,(function(){var e=this;return $(this,(function(t){return D()?[2,Gr((function(t,n){return Z(e,void 0,void 0,(function(){var e,i,o,a,s;return $(this,(function(c){switch(c.label){case 0:return e=n.createTraceId(),n.info(ti,"clearLocalData ->",e),[4,t.clearData()];case 1:return i=c.sent(),o=i.code,a=i.data,s=o===r.SUCCESS?"info":"warn",n[s](ni,JSON.stringify({code:o}),e),[2,{code:o,data:a}]}}))}))}))]:[2,{code:r.NOT_SUPPORT,msg:Qr[r.NOT_SUPPORT]}]}))}))},enable:function(){return D()}});function nd(e){return Z(this,void 0,void 0,(function(){var t=this;return $(this,(function(n){return[2,new I(ji,Qi).validate("set.proxy",e,(function(t){return!!(!e||_("proxy.socksHost",e.socksHost,v.STRING,!0)&&_("proxy.socksPort",e.socksPort,v.NUMBER,!0))})).ifReady((function(n,i){return Z(t,void 0,void 0,(function(){var t,o,a;return $(this,(function(s){switch(s.label){case 0:return t=i.createTraceId(),i.info(ji,JSON.stringify({socksHost:null==e?void 0:e.socksHost,socksPort:null==e?void 0:e.socksPort}),t),[4,n.setProxy(e)];case 1:return o=s.sent().code,a=o===r.SUCCESS?"info":"warn",i[a](Qi,JSON.stringify({code:o}),t),o===r.SUCCESS?[2,{code:o}]:[2,{code:o,msg:Qr[o]}]}}))}))}))]}))}))}function id(){return Z(this,void 0,void 0,(function(){var e=this;return $(this,(function(t){return[2,new I(Xi,Zi).ifReady((function(t,n){return Z(e,void 0,void 0,(function(){var e,i,o,a;return $(this,(function(s){switch(s.label){case 0:return e=n.createTraceId(),n.info(Xi,"",e),[4,t.getProxy()];case 1:return i=s.sent(),o=i.code,a=i.data,o===r.SUCCESS?(n.info(Zi,JSON.stringify({code:o,data:a}),e),[2,{code:o,data:a}]):(n.warn(Zi,JSON.stringify({code:o}),e),[2,{code:o,msg:Qr[o]}])}}))}))}))]}))}))}function od(e,t){return Z(this,void 0,void 0,(function(){var n=this;return $(this,(function(i){return[2,new I($i,eo).validate("test.proxy",e,v.OBJECT,!0).validate("test.proxy.socksHost",null==e?void 0:e.socksHost,v.STRING,!0).validate("test.proxy.socksPort",null==e?void 0:e.socksPort,v.NUMBER,!0).ifReady((function(i,o){return Z(n,void 0,void 0,(function(){var n,a,s,c;return $(this,(function(d){switch(d.label){case 0:return n=o.createTraceId(),o.info($i,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 a=d.sent(),s=a.status,c=a.data,s===r.SUCCESS?[2,{code:s,msg:c}]:(o.warn(eo,JSON.stringify({status:s}),n),[2,{code:s,msg:Qr[s]}])}}))}))}))]}))}))}function rd(e,t,n){return Z(this,void 0,void 0,(function(){var i=this;return $(this,(function(o){return[2,new I(rr,ar).validate("subscribeUserIds",e,B({maxLength:200,minLength:1,itemValidator:x}),!0).validate("subscribeType",t,(function(e){return[W.ONLINE_STATUS,W.USER_PROFILE].includes(e)}),!0).validate("expiry",n,K({min:60,max:2592e3}),!0).ifReady((function(o,a){return Z(i,void 0,void 0,(function(){var i,s,c,d,u;return $(this,(function(l){switch(l.label){case 0:return i=a.createTraceId(),a.info(rr,JSON.stringify({userIds:e,subscribeType:t,expiry:n}),i),[4,o.subscribeUser(e,t,n)];case 1:return s=l.sent(),c=s.code,d=s.data,u=c===r.SUCCESS?"info":"warn",a[u](ar,JSON.stringify({code:c,data:d}),i),[2,{code:c,data:d}]}}))}))}))]}))}))}function ad(e,t){return Z(this,void 0,void 0,(function(){var n=this;return $(this,(function(i){return[2,new I(sr,cr).validate("subscribeUserIds",e,B({maxLength:200,minLength:1,itemValidator:x}),!0).validate("subscribeType",t,(function(e){return[W.ONLINE_STATUS,W.USER_PROFILE].includes(e)}),!0).ifReady((function(i,o){return Z(n,void 0,void 0,(function(){var n,a,s;return $(this,(function(c){switch(c.label){case 0:return n=o.createTraceId(),o.info(sr,JSON.stringify({userIds:e,subscribeType:t}),n),[4,i.unSubscribeUser(e,t)];case 1:return a=c.sent().code,s=a===r.SUCCESS?"info":"warn",o[s](cr,JSON.stringify({code:a}),n),[2,{code:a}]}}))}))}))]}))}))}function sd(e,t,n){return Z(this,void 0,void 0,(function(){var i=this;return $(this,(function(o){return[2,new I(lr,vr).validate("subscribeType",e,(function(e){return[W.ONLINE_STATUS,W.USER_PROFILE].includes(e)}),!0).validate("subscribePageSize",t,K({min:1,max:200}),!0).validate("offset",n,K({min:0}),!0).ifReady((function(o,a){return Z(i,void 0,void 0,(function(){var i,s,c,d,u;return $(this,(function(l){switch(l.label){case 0:return i=a.createTraceId(),a.info(lr,JSON.stringify({pageSize:t,offset:n}),i),[4,o.getSubscribeUserList(e,t,n)];case 1:return s=l.sent(),c=s.code,d=s.data,u=c===r.SUCCESS?"info":"warn",a[u](vr,JSON.stringify({code:c,data:d}),i),c===r.SUCCESS?[2,{code:c,data:d}]:[2,{code:c}]}}))}))}))]}))}))}function cd(e,t){return Z(this,void 0,void 0,(function(){var n=this;return $(this,(function(i){return[2,new I(sr,cr).validate("subscribeType",e,(function(e){return[W.ONLINE_STATUS,W.USER_PROFILE].includes(e)}),!0).validate("subscribeUserIds",t,B({maxLength:200,minLength:1,itemValidator:x}),!0).ifReady((function(i,o){return Z(n,void 0,void 0,(function(){var n,a,s,c,d;return $(this,(function(u){switch(u.label){case 0:return n=o.createTraceId(),o.info(dr,JSON.stringify({userIds:t}),n),[4,i.getSubscribeUserStatus(e,t)];case 1:return a=u.sent(),s=a.code,c=a.data,d=s===r.SUCCESS?"info":"warn",o[d](ur,JSON.stringify({code:s}),n),s===r.SUCCESS?[2,{code:s,data:c}]:[2,{code:s}]}}))}))}))]}))}))}function dd(e){var t=this;return new I(Sr,hr).validate("profile",e,v.OBJECT,!0).validate("profile",e.name,v.ONLY_STRING).validate("profile",e.portraitUri,v.ONLY_STRING).validate("profile",e.email,v.ONLY_STRING).validate("profile",e.birthday,v.ONLY_STRING).validate("profile",e.gender,v.NUMBER).validate("profile",e.location,v.ONLY_STRING).validate("profile",e.role,v.NUMBER).validate("profile",e.level,v.NUMBER).validate("profile",e.extraProfile,v.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 Z(t,void 0,void 0,(function(){var t,o,a,s,c,d,u;return $(this,(function(l){switch(l.label){case 0:return t=i.createTraceId(),i.info(Sr,JSON.stringify({profile:e}),t),o=e.extraProfile,a={},["name","portraitUri","email","birthday","gender","location","role","level"].forEach((function(t){H(e[t])||(a[t]=e[t])})),H(o)||(a.extraProfile=X({},o)),[4,n.updateMyUserProfile(a)];case 1:return s=l.sent(),c=s.code,d=s.data,u=c===r.SUCCESS?"info":"warn",i[u](hr,JSON.stringify({code:c,data:d}),t),[2,{code:c,data:d}]}}))}))}))}function ud(e){var t=this;return new I(Tr,Ir).validate("userId",e,B({minLength:1,itemValidator:F}),!0).ifReady((function(n,i){return Z(t,void 0,void 0,(function(){var t,o,a,s,c;return $(this,(function(d){switch(d.label){case 0:return t=i.createTraceId(),i.info(Tr,JSON.stringify({userIds:e}),t),[4,n.getUserProfiles(e)];case 1:return o=d.sent(),a=o.code,s=o.data,c=a===r.SUCCESS?"info":"warn",i[c](Ir,JSON.stringify({code:a,data:s}),t),[2,{code:a,data:s}]}}))}))}))}function ld(){var e=this;return new I(_r,mr).ifReady((function(t,n){return Z(e,void 0,void 0,(function(){var e,i,o,a,s;return $(this,(function(c){switch(c.label){case 0:return e=n.createTraceId(),n.info(_r,"",e),[4,t.getMyUserProfile()];case 1:return i=c.sent(),o=i.code,a=i.data,s=o===r.SUCCESS?"info":"warn",n[s](mr,JSON.stringify({code:o,data:a}),e),[2,{code:o,data:a}]}}))}))}))}function vd(e){var t=this;return new I(pr,Nr).validate("userProfileVisibility",e,(function(e){return[z.NOT_SET,z.INVISIBLE,z.EVERYONE].includes(e)}),!0).ifReady((function(n,i){return Z(t,void 0,void 0,(function(){var t,o,a,s,c;return $(this,(function(d){switch(d.label){case 0:return t=i.createTraceId(),i.info(pr,e,t),[4,n.updateMyUserProfileVisibility(e)];case 1:return o=d.sent(),a=o.code,s=o.data,c=a===r.SUCCESS?"info":"warn",i[c](Nr,JSON.stringify({code:a,data:s}),t),[2,{code:a,data:s}]}}))}))}))}function fd(){var e=this;return new I(Er,yr).ifReady((function(t,n){return Z(e,void 0,void 0,(function(){var e,i,o,a,s;return $(this,(function(c){switch(c.label){case 0:return e=n.createTraceId(),n.info(Er,"",e),[4,t.getMyUserProfileVisibility()];case 1:return i=c.sent(),o=i.code,a=i.data,s=o===r.SUCCESS?"info":"warn",n[s](yr,JSON.stringify({code:o,data:a}),e),[2,{code:o,data:a}]}}))}))}))}function gd(e){var t=this;return new I(Rr,Cr).validate("uniqueId",e,v.STRING,!0).ifReady((function(n,i){return Z(t,void 0,void 0,(function(){var t,o,a,s,c;return $(this,(function(d){switch(d.label){case 0:return t=i.createTraceId(),i.info(Rr,e,t),[4,n.searchUserProfileByUniqueId(e)];case 1:return o=d.sent(),a=o.code,s=o.data,c=a===r.SUCCESS?"info":"warn",i[c](Cr,JSON.stringify({code:a,data:s}),t),[2,{code:a,data:s}]}}))}))}))}export{fs as BaseMessage,ms as CombineMessage,ps as CombineV2Message,As as CommandMessage,$c as ConnectType,xe as Events,Ns as FileMessage,Es as GIFMessage,ws as GroupNotificationMessage,Ts as HQVoiceMessage,hs as ImageMessage,Us as InformationNotificationMessage,Rs as LocationMessage,Ke as MessageAuditType,ed as MessageType,Cs as ReferenceMessage,Os as RichContentMessage,Is as SightMessage,_s as TextMessage,qs as UploadTask,ys as VoiceMessage,Kr as __addSDKVersion,Kc as addConversationsToTag,Jr as addEventListener,Vc as addTag,ds as addToBlacklist,yc as batchClearRemoteHistoryMessages,mc as batchGetMessageReadReceiptInfoV4,aa as batchRemoveConversation,Ia as batchSetConversationNotificationLevel,Ca as batchSetConversationToTop,cs as bindRTCRoomForChatroom,Sa as clearAllMessagesUnreadStatus,kr as clearEventListeners,Ec as clearHistoryMessages,Dc as clearMessages,ga as clearMessagesUnreadStatus,da as clearTextMessageDraft,xc as clearUnreadCountByTimestamp,ta as connect,Qs as createUploadTask,Jc as deleteLocalMessagesByTimestamp,Nc as deleteMessages,Hr as destroy,na as disconnect,td as electronExtension,os as forceRemoveChatRoomEntry,ts as forceSetChatRoomEntry,as as getAllChatRoomEntries,Pa as getAllConversationState,Ya as getAllUltraGroupUnreadCount,qa as getAllUltraGroupUnreadMentionedCount,wa as getAllUnreadMentionedCount,ls as getBlacklist,vs as getBlacklistStatus,ba as getBlockUltraGroupList,Na as getBlockedConversationList,rs as getChatRoomEntry,Za as getChatRoomInfo,ss as getChatroomHistoryMessages,Fr as getConnectionStatus,oa as getConversation,ia as getConversationList,ma as getConversationNotificationLevel,pa as getConversationNotificationStatus,ya as getConversationTypeNotificationLevel,Qc as getConversationsFromTagByPage,qr as getCurrentUserId,zr as getDeviceId,ec as getDownloadAuth,$s as getFileToken,tc as getFileUrl,wc as getFirstUnreadMessage,Pc as getFirstUnreadMessageInfo,uc as getHistoryMessages,bc as getMessage,_c as getMessageReadReceiptV4,Ac as getMessageReader,ld as getMyUserProfile,fd as getMyUserProfileVisibility,id as getProxy,lc as getRemoteHistoryMessages,Yr as getServerTime,sd as getSubscribeUserList,cd as getSubscribeUserStatus,Yc as getTags,qc as getTagsFromConversation,sa as getTextMessageDraft,Oa as getTopConversationList,ua as getTotalUnreadCount,la as getTotalUnreadCountByLevels,va as getTotalUnreadMentionedCountByLevels,Va as getUltraGroupDefaultNotificationLevel,za as getUltraGroupFirstUnreadMessageTimestamp,Ma as getUltraGroupList,Ga as getUltraGroupMessageListByMessageUId,Fa as getUltraGroupUnreadCountByTargetId,Wa as getUltraGroupUnreadInfoList,ka as getUltraGroupUnreadMentionedCountByTargetId,Ka as getUltraGroupUnreadMentionedMessages,Aa as getUnreadConversationList,fa as getUnreadCount,Xc as getUnreadCountByTag,Ua as getUnreadMentionedCount,Lc as getUnreadMentionedMessages,ud as getUserProfiles,Vr as init,Mc as insertMessage,Wr as installPlugin,ja as joinChatRoom,Qa as joinExistChatRoom,xa as modifyMessage,Dr as onceEventListener,Xa as quitChatRoom,pc as recallMessage,Uc as registerMessageType,Ba as removeAllExpansionForUltraGroupMessage,is as removeChatRoomEntries,ns as removeChatRoomEntry,ra as removeConversation,zc as removeConversationsFromTag,Br as removeEventListener,xr as removeEventListeners,Da as removeExpansionForUltraGroupMessage,us as removeFromBlacklist,Cc as removeMessageExpansionForKey,Hc as removeTag,jc as removeTagFromConversations,Wc as removeTagsFromConversation,ca as saveTextMessageDraft,Bc as searchConversationByContent,Gc as searchMessages,gd as searchUserProfileByUniqueId,rc as sendFileMessage,sc as sendGIFMessage,cc as sendHQVoiceMessage,ac as sendImageMessage,nc as sendMessage,vc as sendReadReceiptMessage,Ic as sendReadReceiptMessageV4,fc as sendReadReceiptRequest,gc as sendReadReceiptResponse,hc as sendReadReceiptResponseV2,dc as sendSightMessage,Tc as sendSyncReadStatusMessage,ic as sendTextMessage,Oc as sendTypingStatusMessage,La as sendUltraGroupTypingStatus,es as setChatRoomEntries,$a as setChatRoomEntry,Ta as setConversationNotificationLevel,_a as setConversationNotificationStatus,Ra as setConversationToTop,Zc as setConversationToTopInTag,Ea as setConversationTypeNotificationLevel,kc as setMessageReceivedStatus,nd as setProxy,Ha as setUltraGroupDefaultNotificationLevel,Xs as stopUploadTask,rd as subscribeUserStatus,od as testProxy,ad as unSubscribeUserStatus,Ja as updateExpansionForUltraGroupMessage,Rc as updateMessageExpansion,dd as updateMyUserProfile,vd as updateMyUserProfileVisibility,Fc as updateTag,Zs as upload};
|
|
15
|
+
***************************************************************************** */var W=function(e,t){return W=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])},W(e,t)};function j(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}W(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var Q=function(){return Q=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},Q.apply(this,arguments)};function Z(e,t,n,i){return new(n||(n=Promise))((function(o,r){function a(e){try{_(i.next(e))}catch(e){r(e)}}function s(e){try{_(i.throw(e))}catch(e){r(e)}}function _(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}_((i=i.apply(e,t||[])).next())}))}function $(e,t){var n,i,o,r,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return r={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function s(r){return function(s){return function(r){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,i&&(o=2&r[0]?i.return:r[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,r[1])).done)return o;switch(i=0,o&&(r=[2&r[0],o.value]),r[0]){case 0:case 1:o=r;break;case 4:return a.label++,{value:r[1],done:!1};case 5:a.label++,i=r[1],r=[0];continue;case 7:r=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==r[0]&&2!==r[0])){a=0;continue}if(3===r[0]&&(!o||r[1]>o[0]&&r[1]<o[3])){a.label=r[1];break}if(6===r[0]&&a.label<o[1]){a.label=o[1],o=r;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(r);break}o[2]&&a.ops.pop(),a.trys.pop();continue}r=t.call(e,a)}catch(e){r=[6,e],i=0}finally{n=o=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}([r,s])}}}var ee=function(){return!("undefined"==typeof uni||!function(e){for(var t=["request","getSystemInfo"],n=0,i=t.length;n<i;n++)if(!e[t[n]])return!1;return!0}(uni))},te=ee();var ne=null,ie=function(e){return Z(void 0,void 0,void 0,(function(){var t;return $(this,(function(n){switch(n.label){case 0:return[4,oe.getNetworkType()];case 1:return t=n.sent(),ne({status:"online"===e.type,type:t}),[2]}}))}))};var oe={tag:"browser",httpReq:function(t){return e(t).result()},localStorage:null===window||void 0===window?void 0:window.localStorage,sessionStorage:null===window||void 0===window?void 0:window.sessionStorage,useNavi:!0,connectPlatform:"",isFromUniapp:te,createWebSocket:function(e,t){var n=new WebSocket(e,t);return n.binaryType="arraybuffer",{id:Date.now(),onClose:function(e){n.onclose=function(t){var n=t.code,i=t.reason;e(n,i)}},onError:function(e){n.onerror=e},onMessage:function(e){n.onmessage=function(t){e(t.data)}},onOpen:function(e){n.onopen=e},send:function(e){n.send(e)},close:function(e,t){n.close()}}},getNetworkType:function(){var e=navigator.connection||navigator.mozConnection||navigator.webkitConnection||{effectiveType:t.UNKONWN},n=e.type,i=e.effectiveType,o=n||i||t.UNKONWN;return Promise.resolve(o)},setNetworkStatusListener:function(e){ne=e,"undefined"!=typeof window&&window&&(window.addEventListener("offline",ie),window.addEventListener("online",ie))},removeNetworkStatusListener:function(){"undefined"!=typeof window&&window&&(window.removeEventListener("offline",ie),window.removeEventListener("online",ie)),ne=null}},re=ee(),ae=function(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];try{return wx[e].apply(wx,t)}catch(e){null===console||void 0===console||console.error(e)}}},se={setItem:ae("setStorageSync"),getItem:ae("getStorageSync"),removeItem:ae("removeStorageSync"),clear:ae("clearStorageSync")},_e=null,ce=function(e){var t=e.isConnected,n=e.networkType;_e({status:t,type:n})};var de={tag:"wechat",httpReq:function(e){var t=e.method||n.GET,a=e.timeout||i,s=e.headers,_=e.query,c=e.body,d=o(e.url,_);return new Promise((function(e){wx.request({url:d,method:t,header:s,timeout:a,data:c,success:function(t){e({data:t.data,status:t.statusCode})},fail:function(){e({status:r.RC_HTTP_REQ_FAIL})}})}))},localStorage:se,sessionStorage:se,useNavi:!1,connectPlatform:"MiniProgram",isFromUniapp:re,createWebSocket:function(e,t){var n=wx.connectSocket({url:e,protocols:t});return{id:Date.now(),onClose:function(e){n.onClose((function(t){e(t.code,t.reason)}))},onError:function(e){n.onError((function(t){e(t.errMsg)}))},onMessage:function(e){n.onMessage((function(t){e(t.data)}))},onOpen:function(e){n.onOpen(e)},send:function(e){n.send({data:e})},close:function(e,t){n.close({code:e,reason:t})}}},getNetworkType:function(){return new Promise((function(e){wx.getNetworkType({success:function(t){var n=t.networkType;e(n)},fail:function(){e(t.UNKONWN)}})}))},setNetworkStatusListener:function(e){_e=e,wx.onNetworkStatusChange(ce)},removeNetworkStatusListener:function(){wx.offNetworkStatusChange(ce),_e=null}},ue=ee(),Te=function(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];try{if("setStorageSync"===e)return my[e]({key:t[0],data:JSON.parse(t[1])});if("clearStorageSync"===e)return my[e]();if("removeStorageSync"===e)return my[e]({key:t[0]});var i=my[e]({key:t[0]}).data;return i?JSON.stringify(i):i}catch(e){}}},Ee={setItem:Te("setStorageSync"),getItem:Te("getStorageSync"),removeItem:Te("removeStorageSync"),clear:Te("clearStorageSync")},Se=null,le=function(e){var t=e.isConnected,n=e.networkType;Se({status:t,type:n})};var Ae={tag:"alipay",httpReq:function(e){var t=e.method||n.GET,a=e.timeout||i,s=e.headers,_=e.query,c=e.body,d=o(e.url,_),u=e.dataType||"json";return new Promise((function(e){my.request({url:d,method:t,headers:s,timeout:a,data:c,dataType:u,success:function(t){e({data:t.data,status:t.status})},fail:function(){e({status:r.RC_HTTP_REQ_FAIL})}})}))},localStorage:Ee,sessionStorage:Ee,useNavi:!1,connectPlatform:"MiniProgram",isFromUniapp:ue,createWebSocket:function(e){var t=my.connectSocket({url:e,multiple:!0});return{id:Date.now(),onClose:function(e){t.onClose(e)},onError:function(e){t.onError((function(t){e(t.errMsg)}))},onMessage:function(e){t.onMessage((function(t){t.data.isBuffer?e(my.base64ToArrayBuffer(t.data.data)):e(t.data.data)}))},onOpen:function(e){t.onOpen(e)},send:function(e){t.send({data:my.arrayBufferToBase64(e),isBuffer:!0})},close:function(){t.close()}}},getNetworkType:function(){return new Promise((function(e){my.getNetworkType({success:function(t){var n=t.networkType;e(n)},fail:function(){e(t.UNKONWN)}})}))},setNetworkStatusListener:function(e){Se=e,my.onNetworkStatusChange(le)},removeNetworkStatusListener:function(){my.offNetworkStatusChange(le),Se=null}},Re=ee(),ve=function(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];try{return tt[e].apply(tt,t)}catch(e){}}},fe={setItem:ve("setStorageSync"),getItem:ve("getStorageSync"),removeItem:ve("removeStorageSync"),clear:ve("clearStorageSync")},Ie=null,Oe=function(e){var t=e.isConnected,n=e.networkType;Ie({status:t,type:n})};var Ne={tag:"toutiao",useNavi:!1,connectPlatform:"MiniProgram",isFromUniapp:Re,localStorage:fe,sessionStorage:fe,httpReq:function(e){return new Promise((function(t){tt.request({url:e.url,data:e.body,header:e.headers,method:e.method,success:function(e){var n=(null==e?void 0:e.data)||{},i={data:JSON.stringify(n),status:e.statusCode};t(i)},fail:function(e){t({status:r.RC_HTTP_REQ_FAIL})}})}))},createWebSocket:function(e,t){var n=tt.connectSocket({url:e,protocols:t});return{id:Date.now(),onOpen:function(e){n.onOpen(e)},onClose:function(e){n.onClose((function(t){return e(t.code,t.reason)}))},onError:function(e){n.onError((function(t){return e(t.errMsg)}))},onMessage:function(e){n.onMessage((function(t){return e(t.data)}))},send:function(e){n.send({data:e})},close:function(e,t){n.close({code:e,reason:t})}}},getNetworkType:function(){return new Promise((function(e){tt.getNetworkType({success:function(t){var n=t.networkType;e(n)},fail:function(){e(t.UNKONWN)}})}))},setNetworkStatusListener:function(e){Ie=e,tt.onNetworkStatusChange(Oe)},removeNetworkStatusListener:function(){tt.offNetworkStatusChange(Oe),Ie=null}},ge=ee(),Ce=function(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];try{return swan[e].apply(swan,t)}catch(e){}}},he={setItem:Ce("setStorageSync"),getItem:Ce("getStorageSync"),removeItem:Ce("removeStorageSync"),clear:Ce("clearStorageSync")},me=null,Ue=function(e){var t=e.isConnected,n=e.networkType;me({status:t,type:n})};var pe={tag:"baidu",useNavi:!1,connectPlatform:"MiniProgram",isFromUniapp:ge,localStorage:he,sessionStorage:he,httpReq:function(e){return new Promise((function(t){swan.request({url:e.url,data:e.body,header:e.headers,method:e.method,success:function(e){var n=(null==e?void 0:e.data)||{},i={data:JSON.stringify(n),status:e.statusCode};t(i)},fail:function(e){t({status:r.RC_HTTP_REQ_FAIL})}})}))},createWebSocket:function(e,t){var n=swan.connectSocket({url:e,protocols:t});return{id:Date.now(),onOpen:function(e){n.onOpen(e)},onClose:function(e){n.onClose((function(t){return e(t.code,t.reason)}))},onError:function(e){n.onError((function(t){return e(t.errMsg)}))},onMessage:function(e){n.onMessage((function(t){return e(t.data)}))},send:function(e){n.send({data:e})},close:function(e,t){n.close({code:e,reason:t})}}},getNetworkType:function(){return Z(this,void 0,void 0,(function(){return $(this,(function(e){return[2,new Promise((function(e){swan.getNetworkType({success:function(t){var n=t.networkType;e(n)},fail:function(){e(t.UNKONWN)}})}))]}))}))},setNetworkStatusListener:function(e){me=e,swan.onNetworkStatusChange(Ue)},removeNetworkStatusListener:function(){swan.offNetworkStatusChange(Ue),me=null}},ye=ee(),Ge=function(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];try{return jd[e].apply(jd,t)}catch(e){null===console||void 0===console||console.error(e)}}},Me={setItem:Ge("setStorageSync"),getItem:Ge("getStorageSync"),removeItem:Ge("removeStorageSync"),clear:Ge("clearStorageSync")},Le=null,Pe=function(e){var t=e.isConnected,n=e.networkType;Le({status:t,type:n})};var De={tag:"jingdong",httpReq:function(e){var t=e.method||n.GET,a=e.timeout||i,s=e.headers,_=e.query,c=e.body,d=o(e.url,_);return new Promise((function(e){jd.request({url:d,method:t,header:s,timeout:a,data:c,success:function(t){e({data:t.data,status:t.statusCode})},fail:function(){e({status:r.RC_HTTP_REQ_FAIL})}})}))},localStorage:Me,sessionStorage:Me,useNavi:!1,connectPlatform:"MiniProgram",isFromUniapp:ye,createWebSocket:function(e,t){return jd.connectSocket({url:e,protocols:t}),{id:Date.now(),onClose:function(e){jd.onSocketClose((function(t){e(t.code,t.reason)}))},onError:function(e){jd.onSocketError((function(t){e(t.errMsg)}))},onMessage:function(e){jd.onSocketMessage((function(t){e(t.data)}))},onOpen:function(e){jd.onSocketOpen(e)},send:function(e){jd.sendSocketMessage({data:e})},close:function(e,t){jd.closeSocket({code:e,reason:t})}}},getNetworkType:function(){return new Promise((function(e){jd.getNetworkType({success:function(t){var n=t.networkType;e(n)},fail:function(){e(t.UNKONWN)}})}))},setNetworkStatusListener:function(e){Le=e,jd.onNetworkStatusChange(Pe)},removeNetworkStatusListener:function(){jd.offNetworkStatusChange(Pe),Le=null}},we=function(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];try{return uni[e].apply(uni,t)}catch(e){null===console||void 0===console||console.error(e)}}},Be={setItem:we("setStorageSync"),getItem:we("getStorageSync"),removeItem:we("removeStorageSync"),clear:we("clearStorageSync")},Ve=null,be=function(e){var t=e.isConnected,n=e.networkType;Ve({status:t,type:n})};var Je,Fe={tag:"uniapp",httpReq:function(e){var t=e.method||n.GET,a=e.timeout||i,s=e.headers,_=e.query,c=e.body,d=o(e.url,_);return new Promise((function(e){uni.request({url:d,method:t,header:s,timeout:a,data:c,success:function(t){e({data:t.data,status:t.statusCode})},fail:function(){e({status:r.RC_HTTP_REQ_FAIL})}})}))},localStorage:Be,sessionStorage:Be,useNavi:!0,connectPlatform:"",isFromUniapp:!0,createWebSocket:function(e,t){var n={complete:function(){},url:e,protocols:t},i=uni.connectSocket(n);return{id:Date.now(),onClose:function(e){i.onClose((function(t){e(t.code,t.reason)}))},onError:function(e){i.onError((function(t){e(t.errMsg)}))},onMessage:function(e){i.onMessage((function(t){e(t.data)}))},onOpen:function(e){i.onOpen(e)},send:function(e){i.send({data:e})},close:function(e,t){i.close({code:e,reason:t})}}},getNetworkType:function(){return new Promise((function(e){uni.getNetworkType({success:function(t){var n=t.networkType;e(n)},fail:function(){e(t.UNKONWN)}})}))},setNetworkStatusListener:function(e){Ve=e,uni.onNetworkStatusChange(be)},removeNetworkStatusListener:function(){uni.offNetworkStatusChange(be),Ve=null}},He=function(e){return e&&e.request&&e.getSystemInfo},Ye="undefined"!=typeof uni&&He(uni)?function(){switch(process.env.VUE_APP_PLATFORM){case"app-plus":case"app":return Fe;case"mp-jd":return De;case"mp-baidu":return pe;case"mp-toutiao":return Ne;case"mp-alipay":return Ae;case"mp-weixin":return de;default:return oe}}():"undefined"!=typeof jd&&He(jd)?De:"undefined"!=typeof my&&He(my)?Ae:"undefined"!=typeof tt&&He(tt)?Ne:"undefined"!=typeof swan&&He(swan)?pe:"undefined"!=typeof wx&&He(wx)?de:oe;function xe(e){var t=e.conversationType,n=e.channelId,i=e.messageType,o=e.content,r=e.senderUserId,s=e.targetId,_=e.sentTime,c=e.receivedTime,d=e.messageUId,u=e.messageDirection,T=e.isPersited,E=e.isCounted,S=e.isOffLineMessage,l=e.canIncludeExpansion,A=e.expansion,R=e.receivedStatus,v=e.receivedStatusInfo,f=e.disableNotification,I=e.isMentioned,O=e.isStatusMessage,N=e.readReceiptInfo,g=e.pushConfig,C=e.messageId,h=e.isInterrupt,m=e.isModifyMessage,U=e.channelType,p=e.sentStatus,y=e.directedUserIds;return R||(R=a.UNREAD),{messageType:i,channelId:n||"",content:o,senderUserId:r,targetId:s,conversationType:t,sentTime:_,receivedTime:c,messageUId:d,messageDirection:u,isPersited:T,isCounted:E,isMentioned:I,disableNotification:f,isStatusMessage:O,canIncludeExpansion:l,expansion:A,receivedStatus:R,receivedStatusInfo:v,readReceiptInfo:N,pushConfig:g,messageId:C,isInterrupt:h,isModifyMessage:m,sentStatus:p,isOffLineMessage:S,channelType:U,directedUserIds:y}}function ke(e){var t=e.conversationType,n=e.targetId,i=e.latestMessage,o=e.unreadMessageCount,r=e.hasMentioned,a=e.mentionedInfo,_=e.lastUnreadTime,c=e.notificationStatus,d=e.notificationLevel,u=e.isTop,T=e.channelId,E=e.unreadMentionedCount,S=e.matchCount,l=e.operationTime,A=e.draft,R={conversationType:t,targetId:n,latestMessage:i&&xe(i),unreadMessageCount:o,hasMentioned:r,mentionedInfo:r?{type:null==a?void 0:a.type,userIdList:null==a?void 0:a.userIdList}:void 0,lastUnreadTime:_,notificationStatus:c,notificationLevel:d,isTop:u,channelId:T,unreadMentionedCount:E,matchCount:S,operationTime:l,draft:A||""};return R.conversationType===s.ULTRA_GROUP&&(R.firstUnreadMessage=e.firstUnreadMessage,R.channelType=e.channelType,R.unreadMentionedMeCount=e.unreadMentionedMeCount),R}function Ke(e,t){null===console||void 0===console||console.warn("Method '"+e+"' is deprecated, please use '"+t+"' instead")}!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.CONVERSATION_TAG="CONVERSATION_TAG",e.TYPING_STATUS="TYPING_STATUS",e.MESSAGE_BLOCKED="MESSAGE_BLOCKED",e.ULTRA_GROUP_ENABLE="ULTRA_GROUP_ENABLE",e.OPERATE_STATUS="OPERATE_STATUS",e.ULTRA_GROUP_MESSAGE_EXPANSION_UPDATED="ULTRA_GROUP_MESSAGE_EXPANSION_UPDATED",e.ULTRA_GROUP_MESSAGE_MODIFIED="ULTRA_GROUP_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.PRIVATE_MESSAGE_DELIVERED="PRIVATE_MESSAGE_DELIVERED",e.GROUP_MESSAGE_DELIVERED="GROUP_MESSAGE_DELIVERED",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.DATABASE_UPGRADE_WILL_START="DATABASE_UPGRADE_WILL_START",e.DATABASE_UPGRADING="DATABASE_UPGRADING",e.DATABASE_UPGRADE_DID_COMPLETE="DATABASE_UPGRADE_DID_COMPLETE"}(Je||(Je={}));var Xe,qe={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_CHATROOM_INFO_T:"A-get_chatroom_info-T",A_GET_CHATROOM_INFO_R:"A-get_chatroom_info-R",A_SET_CHATROOM_ENTRY_T:"A-set_chatroom_entry-T",A_SET_CHATROOM_ENTRY_R:"A-set_chatroom_entry-R",A_SET_CHATROOM_ENTRIES_T:"A-set_chatroom_entries-T",A_SET_CHATROOM_ENTRIES_R:"A-set_chatroom_entries-R",A_FORCE_SET_CHATROOM_ENTRY_T:"A-force_set_chatroom_entry-T",A_FORCE_SET_CHATROOM_ENTRY_R:"A-force_set_chatroom_entry-R",A_REMOVE_CHATROOM_ENTRY_T:"A-remove_chatroom_entry-T",A_REMOVE_CHATROOM_ENTRY_R:"A-remove_chatroom_entry-R",A_REMOVE_CHATROOM_ENTRIES_T:"A-remove_chatroom_entries-T",A_REMOVE_CHATROOM_ENTRIES_R:"A-remove_chatroom_entries-R",A_FORCE_REMOVE_CHATROOM_ENTRY_T:"A-force_remove_chatroom_entry-T",A_FORCE_REMOVE_CHATROOM_ENTRY_R:"A-force_remove_chatroom_entry-R",A_GET_CHATROOM_ENTRY_T:"A-get_chatroom_entry-T",A_GET_CHATROOM_ENTRY_R:"A-get_chatroom_entry-R",A_GET_ALL_CHATROOM_ENTRIES_T:"A-get_all_chatroom_entries-T",A_GET_ALL_CHATROOM_ENTRIES_R:"A-get_all_chatroom_entries-R",A_GET_CHATROOM_HISTORY_MESSAGES_T:"A-get_chatroom_history_messages-T",A_GET_CHATROOM_HISTORY_MESSAGES_R:"A-get_chatroom_history_messages-R",A_BIND_RTC_ROOM_FOR_CHATROOM_T:"A-bind_rtc_room_for_chatroom-T",A_BIND_RTC_ROOM_FOR_CHATROOM_R:"A-bind_rtc_room_for_chatroom-R",A_GET_TOP_CONVERSATION_LIST_R:"A-get_top_conversation_list-R",A_GET_TOP_CONVERSATION_LIST_T:"A-get_top_conversation_list-T",A_GET_CONVERSATION_LIST_T:"A-get_conversation_list-T",A_GET_CONVERSATION_LIST_R:"A-get_conversation_list-R",A_GET_CONVERSATION_T:"A-get_conversation-T",A_GET_CONVERSATION_R:"A-get_conversation-R",A_REMOVE_CONVERSATION_T:"A-remove_conversation-T",A_REMOVE_CONVERSATION_R:"A-remove_conversation-R",A_GET_CONVERSATION_MESSAGE_DRAFT_T:"A-get_conversation_message_draft-T",A_GET_CONVERSATION_MESSAGE_DRAFT_R:"A-get_conversation_message_draft-R",A_SAVE_CONVERSATION_MESSAGE_DRAFT_T:"A-save_conversation_message_draft-T",A_SAVE_CONVERSATION_MESSAGE_DRAFT_R:"A-save_conversation_message_draft-R",A_CLEAR_CONVERSATION_MESSAGE_DRAFT_T:"A-clear_conversation_message_draft-T",A_CLEAR_CONVERSATION_MESSAGE_DRAFT_R:"A-clear_conversation_message_draft-R",A_GET_TOTAL_UNREAD_COUNT_T:"A-get_total_unread_count-T",A_GET_TOTAL_UNREAD_COUNT_R:"A-get_total_unread_count-R",A_GET_TOTAL_UNREAD_COUNT_BY_LEVELS_T:"A-get_total_unread_count_by_levels-T",A_GET_TOTAL_UNREAD_COUNT_BY_LEVELS_R:"A-get_total_unread_count_by_levels-R",A_GET_UNREAD_COUNT_T:"A-get_unread_count-T",A_GET_UNREAD_COUNT_R:"A-get_unread_count-R",A_CLEAR_UNREAD_COUNT_T:"A-clear_unread_count-T",A_CLEAR_UNREAD_COUNT_R:"A-clear_unread_count-R",A_CLEAR_ALL_UNREAD_COUNT_O:"A-clear_all_unread_count-O",A_SET_CONVERSATION_NOTIFICATION_LEVEL_T:"A-set_conversation_notification_level-T",A_SET_CONVERSATION_NOTIFICATION_LEVEL_R:"A-set_conversation_notification_level-R",A_SET_CONVERSATION_STATUS_T:"A-set_conversation_status-T",A_SET_CONVERSATION_STATUS_R:"A-set_conversation_status-R",A_GET_CONVERSATION_NOTIFICATION_LEVEL_T:"A-get_conversation_notification_level-T",A_GET_CONVERSATION_NOTIFICATION_LEVEL_R:"A-get_conversation_notification_level-R",A_GET_CONVERSATION_NOTIFICATION_STATUS_T:"A-get_conversation_notification_status-T",A_GET_CONVERSATION_NOTIFICATION_STATUS_R:"A-get_conversation_notification_status-R",A_SET_CONVERSATION_NOTIFICATION_STATUS_T:"A-set_conversation_notification_status-T",A_SET_CONVERSATION_NOTIFICATION_STATUS_R:"A-set_conversation_notification_status-R",A_GET_UNREAD_CONVERSATION_LIST_T:"A-get_unread_conversation_list-T",A_GET_UNREAD_CONVERSATION_LIST_R:"A-get_unread_conversation_list-R",A_GET_UNREAD_MENTIONED_COUNT_T:"A-get_unread_mentioned_count-T",A_GET_UNREAD_MENTIONED_COUNT_R:"A-get_unread_mentioned_count-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_GET_ALL_CONVERSATION_STATE_T:"A-get_all_conversation-state-T",A_GET_ALL_CONVERSATION_STATE_R:"A-get_all_conversation-state-R",A_E_GET_ALL_CONVERSATION_LIST_T:"A-e_get_all_conversation_list-T",A_E_GET_ALL_CONVERSATION_LIST_R:"A-e_get_all_conversation_list-R",A_E_GET_CONVERSATION_LIST_T:"A-e_get_conversation_list-T",A_E_GET_CONVERSATION_LIST_R:"A-e_get_conversation_list-R",A_E_SEARCH_CONVERSATION_BY_CONTENT_T:"A-e_search_conversation_by_content-T",A_E_SEARCH_CONVERSATION_BY_CONTENT_R:"A-e_search_conversation_by_content-R",A_GET_CONVERSATIONS_T:"A-get_conversations-T",A_GET_CONVERSATIONS_R:"A-get_conversations-R",A_E_SEARCH_MESSAGES_T:"A-e_search_messages-T",A_E_SEARCH_MESSAGES_R:"A-e_search_messages-R",A_E_SEARCH_MESSAGE_IN_TIME_RANGE_T:"A-e_search_message_in_time_range-T",A_E_SEARCH_MESSAGE_IN_TIME_RANGE_R:"A-e_search_message_in_time_range-R",A_E_SEARCH_MESSAGES_BY_USER_T:"A-e_search_messages_by_user-T",A_E_SEARCH_MESSAGES_BY_USER_R:"A-e_search_messages_by_user-R",A_E_GET_HISTORY_MESSAGES_BY_MESSAGE_TYPES_T:"A-e_get_history_messages_by_message_types-T",A_E_GET_HISTORY_MESSAGES_BY_MESSAGE_TYPES_R:"A-e_get_history_messages_by_message_types-R",A_E_GET_CONTINUOUS_MESSAGES_T:"A-e_get_continuous_messages-T",A_E_GET_CONTINUOUS_MESSAGES_R:"A-e_get_continuous_messages-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_MESSAGE_CONTENT_T:"A-e_set_message_content-T",A_E_SET_MESSAGE_CONTENT_R:"A-e_set_message_content-R",A_E_DELETE_MESSAGES_T:"A-e_delete_messages-T",A_E_DELETE_MESSAGES_R:"A-e_delete_messages-R",A_E_CLEAR_MESSAGES_T:"A-e_clear_messages-T",A_E_CLEAR_MESSAGES_R:"A-e_clear_messages-R",A_E_DELETE_MESSAGES_BY_TIMESTAMP_T:"A-e_delete_messages_by_timestamp-T",A_E_DELETE_MESSAGES_BY_TIMESTAMP_R:"A-e_delete_messages_by_timestamp-R",A_E_INSERT_MESSAGE_T:"A-e_insert_message-T",A_E_INSERT_MESSAGE_R:"A-e_insert_message-R",A_E_BATCH_INSERT_MESSAGE_T:"A-e_batch_insert_message-T",A_E_BATCH_INSERT_MESSAGE_R:"A-e_batch_insert_message-R",A_E_GET_MESSAGE_COUNT_T:"A-e_get_message_count-T",A_E_GET_MESSAGE_COUNT_R:"A-e_get_message_count-R",A_E_GET_PRIVATE_MESSAGE_DELIVER_TIME_T:"A-e_get_private_message_deliver_time-T",A_E_GET_PRIVATE_MESSAGE_DELIVER_TIME_R:"A-e_get_private_message_deliver_time-R",A_E_GET_GROUP_MESSAGE_DELIVER_LIST_T:"A-e_get_group_message_deliver_list-T",A_E_GET_GROUP_MESSAGE_DELIVER_LIST_R:"A-e_get_group_message_deliver_list-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_E_SET_CHECK_CHAT_ROOM_DUPLICATE_MESSAGE_T:"A-e_set_check_duplicate_message-T",A_E_SET_CHECK_CHAT_ROOM_DUPLICATE_MESSAGE_R:"A-e_set_check_duplicate_message-R",A_E_CLEAR_LOCAL_DATA_T:"A-e_clear_local_data-T",A_E_CLEAR_LOCAL_DATA_R:"A-e_clear_local_data-R",A_BATCH_CLEAR_MESSAGES_BY_TIMESTAMP_T:"A-batch_clear_messages_by_timestamp-T",A_BATCH_CLEAR_MESSAGES_BY_TIMESTAMP_R:"A-batch_clear_messages_by_timestamp-R",A_BATCH_REMOVE_CONVERSATION_T:"A-batch_Remove_conversation-T",A_BATCH_REMOVE_CONVERSATION_R:"A-batch_Remove_conversation-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_BATCH_CLEAR_REMOTE_MSG_T:"A-batch_clear_remote_msg-T",A_BATCH_CLEAR_REMOTE_MSG_R:"A-batch_clear_remote_msg-R",A_BATCH_CLEAR_MSG_T:"A-batch_clear_msg-T",A_BATCH_CLEAR_MSG_R:"A-batch_clear_msg-R",A_GET_REMOTE_HISTORY_MESSAGES_T:"A-get_remote_history_messages-T",A_GET_REMOTE_HISTORY_MESSAGES_R:"A-get_remote_history_messages-R",A_RECALL_MESSAGE_T:"A-recall_message-T",A_RECALL_MESSAGE_R:"A-recall_message-R",A_DELETE_REMOTE_MESSAGE_T:"A-delete_remote_message-T",A_DELETE_REMOTE_MESSAGE_R:"A-delete_remote_message-R",A_DELETE_REMOTE_MESSAGE_BY_TIMESTAMP_T:"A-delete_remote_message_by_timestamp-T",A_DELETE_REMOTE_MESSAGE_BY_TIMESTAMP_R:"A-delete_remote_message_by_timestamp-R",A_UPDATE_MESSAGE_EXPANSION_T:"A-update_message_expansion-T",A_UPDATE_MESSAGE_EXPANSION_R:"A-update_message_expansion-R",A_REMOVE_MESSAGE_EXPANSION_FOR_KEY_T:"A-remove_message_expansion_for_key-T",A_REMOVE_MESSAGE_EXPANSION_FOR_KEY_R:"A-remove_message_expansion_for_key-R",A_GET_MESSAGE_READER_T:"A-get_message_reader-T",A_GET_MESSAGE_READER_R:"A-get_message_reader-R",A_GET_FIRST_UNREAD_MESSAGE_T:"A-get_first_unread_message-T",A_GET_FIRST_UNREAD_MESSAGE_R:"A-get_first_unread_message-R",A_GET_FIRST_UNREAD_MESSAGE_INFO_T:"A-get_first_unread_message_info-T",A_GET_FIRST_UNREAD_MESSAGE_INFO_R:"A-get_first_unread_message_info-R",A_INSERT_MESSAGE_T:"A-insert_message-T",A_INSERT_MESSAGE_R:"A-insert_message-R",A_GET_MESSAGE_T:"A-get_message-T",A_GET_MESSAGE_R:"A-get_message-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_DELETE_LOCAL_MESSAGES_BY_TIMESTAMP_T:"A-delete_local_messages_by_timestamp-T",A_DELETE_LOCAL_MESSAGES_BY_TIMESTAMP_R:"A-delete_local_messages_by_timestamp-R",A_CLEAR_MESSAGES_T:"A-clear_messages-T",A_CLEAR_MESSAGES_R:"A-clear_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_MESSAGE_RECEIVED_STATUS_T:"A-set_message_received_status-T",A_SET_MESSAGE_RECEIVED_STATUS_R:"A-set_message_received_status-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_ADD_TAG_T:"A-add_tag-T",A_ADD_TAG_R:"A-add_tag-R",A_REMOVE_TAG_T:"A-remove_tag-T",A_REMOVE_TAG_R:"A-remove_tag-R",A_UPDATE_TAG_T:"A-update_tag-T",A_UPDATE_TAG_R:"A-update_tag-R",A_GET_TAGS_T:"A-get_tags-T",A_GET_TAGS_R:"A-get_tags-R",A_GET_TAGS_FOR_CONVERSATION_T:"A-get_tags_for_conversation-T",A_GET_TAGS_FOR_CONVERSATION_R:"A-get_tags_for_conversation-R",A_ADD_TAG_FOR_CONVERSATIONS_T:"A-add_tag_for_conversations-T",A_ADD_TAG_FOR_CONVERSATIONS_R:"A-add_tag_for_conversations-R",A_REMOVE_CONVERSATIONS_FROM_TAG_T:"A-remove_conversations_from_tag-T",A_REMOVE_CONVERSATIONS_FROM_TAG_R:"A-remove_conversations_from_tag-R",A_REMOVE_TAGS_FROM_CONVERSATION_T:"A-remove_tags_from_conversation-T",A_REMOVE_TAGS_FROM_CONVERSATION_R:"A-remove_tags_from_conversation-R",A_REMOVE_TAG_FROM_CONVERSATIONS_T:"A-remove_tag_from_conversations-T",A_REMOVE_TAG_FROM_CONVERSATIONS_R:"A-remove_tag_from_conversations-R",A_GET_CONVERSATIONS_FROM_TAG_BY_PAGE_T:"A-get_conversations_from_tag_by_page-T",A_GET_CONVERSATIONS_FROM_TAG_BY_PAGE_R:"A-get_conversations_from_tag_by_page-R",A_GET_UNREAD_COUNT_BY_TAG_T:"A-get_unread_count_by_tag-T",A_GET_UNREAD_COUNT_BY_TAG_R:"A-get_unread_count_by_tag-R",A_SET_CONVERSATION_STATUS_IN_TAG_T:"A-set_conversation_status_in_tag-T",A_SET_CONVERSATION_STATUS_IN_TAG_R:"A-set_conversation_status_in_tag-R",A_GET_ULTRA_GROUP_LIST_T:"A-get_ultra_group_list-T",A_GET_ULTRA_GROUP_LIST_R:"A-get_ultra_group_list-R",A_GET_BLOCK_ULTRA_GROUP_LIST_T:"A-get_block_ultra_group_list-T",A_GET_BLOCK_ULTRA_GROUP_LIST_R:"A-get_block_ultra_group_list-R",A_SEND_ULTRA_GROUP_TYPING_STATUS_T:"A-send_ultra_group_typing_status-T",A_SEND_ULTRA_GROUP_TYPING_STATUS_R:"A-send_ultra_group_typing_status-R",A_GET_ULTRA_GROUP_MESSAGE_LIST_BY_MESSAGE_UID_T:"A-get_ultra_group_message_list_by_message_uid-T",A_GET_ULTRA_GROUP_MESSAGE_LIST_BY_MESSAGE_UID_R:"A-get_ultra_group_message_list_by_message_uid-R",A_UPDATE_EXPANSION_FOR_ULTRA_GROUP_MESSAGE_T:"A-update_expansion_for_ultra_group_message-T",A_UPDATE_EXPANSION_FOR_ULTRA_GROUP_MESSAGE_R:"A-update_expansion_for_ultra_group_message-R",A_REMOVE_EXPANSION_FOR_ULTRA_GROUP_MESSAGE_T:"A-remove_expansion_for_ultra_group_message-T",A_REMOVE_EXPANSION_FOR_ULTRA_GROUP_MESSAGE_R:"A-remove_expansion_for_ultra_group_message-R",A_REMOVE_ALL_EXPANSION_FOR_ULTRA_GROUP_MESSAGE_T:"A-remove_all_expansion_for_ultra_group_message-T",A_REMOVE_ALL_EXPANSION_FOR_ULTRA_GROUP_MESSAGE_R:"A-remove_all_expansion_for_ultra_group_message-R",A_MODIFY_MESSAGE_T:"A-modify_message-T",A_MODIFY_MESSAGE_R:"A-modify_message-R",A_GET_ULTRA_GROUP_UNREAD_MENTIONED_COUNT_BY_TARGET_ID_T:"A-get_ultra_group_unread_mentioned_count_by_target_id-T",A_GET_ULTRA_GROUP_UNREAD_MENTIONED_COUNT_BY_TARGET_ID_R:"A-get_ultra_group_unread_mentioned_count_by_target_id-R",A_GET_ULTRA_GROUP_DEFAULT_NOTIFICATION_LEVEL_T:"A-get_ultra_group_default_notification_level-T",A_GET_ULTRA_GROUP_DEFAULT_NOTIFICATION_LEVEL_R:"A-get_ultra_group_default_notification_level-R",A_SET_ULTRA_GROUP_DEFAULT_NOTIFICATION_LEVEL_T:"A-set_ultra_group_default_notification_level-T",A_SET_ULTRA_GROUP_DEFAULT_NOTIFICATION_LEVEL_R:"A-set_ultra_group_default_notification_level-R",A_GET_ULTRA_GROUP_UNREAD_COUNT_BY_TARGET_ID_T:"A-get_ultra_group_unread_count_by_target_id-T",A_GET_ULTRA_GROUP_UNREAD_COUNT_BY_TARGET_ID_R:"A-get_ultra_group_unread_count_by_target_id-R",A_GET_ALL_ULTRA_GROUP_UNREAD_COUNT_T:"A-get_all_ultra_group_unread_count-T",A_GET_ALL_ULTRA_GROUP_UNREAD_COUNT_R:"A-get_all_ultra_group_unread_count-R",A_GET_ALL_ULTRA_GROUP_UNREAD_MENTIONED_COUNT_T:"A-get_all_ultra_group_unread_mentioned_count-T",A_GET_ALL_ULTRA_GROUP_UNREAD_MENTIONED_COUNT_R:"A-get_all_ultra_group_unread_mentioned_count-R",A_GET_ULTRA_GROUP_UNREAD_MENTIONED_MESSAGES_T:"A-get_ultra_group_unread_mentioned_messages-T",A_GET_ULTRA_GROUP_UNREAD_MENTIONED_MESSAGES_R:"A-get_ultra_group_unread_mentioned_messages-R",A_GET_ULTRA_GROUP_FIRST_UNREAD_MESSAGE_TIMESTAMP_T:"A-get_ultra_group_first_unread_message_timestamp-T",A_GET_ULTRA_GROUP_FIRST_UNREAD_MESSAGE_TIMESTAMP_R:"A-get_ultra_group_first_unread_message_timestamp-R",A_GET_ULTRA_GROUP_UNREAD_INFO_LIST_T:"A-get_ultra_group_unread_info_list-T",A_GET_ULTRA_GROUP_UNREAD_INFO_LIST_R:"A-get_ultra_group_unread_info_list-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_T:"A-get_subscribe_user_status-T",A_GET_SUBSCRIBE_USER_STATUS_R:"A-get_subscribe_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_GET_MESSAGE_BY_TIMESTAMP_T:"A-get_message_by_timestamp-T",A_GET_MESSAGE_BY_TIMESTAMP_R:"A-get_message_by_timestamp-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_USER_PROFILES_T:"A-get_user_profiles-T",A_GET_USER_PROFILES_R:"A-get_user_profiles-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"};!function(e){e[e.DISALLOW=0]="DISALLOW",e[e.ALLOW=1]="ALLOW"}(Xe||(Xe={}));var ze=new _,We={connection:function(e,t){switch(e){case c.CONNECTED:ze.emit(Je.CONNECTED);break;case c.CONNECTING:ze.emit(Je.CONNECTING);break;case c.SUSPENDED:ze.emit(Je.SUSPEND,t);break;case c.DISCONNECTED:ze.emit(Je.DISCONNECT,t)}},batchMessage:function(e){ze.emit(Je.MESSAGES,{messages:e.map((function(e){return xe(e)}))})},typingState:function(e){ze.emit(Je.TYPING_STATUS,{status:e})},readReceiptReceived:function(e,t,n,i){ze.emit(Je.READ_RECEIPT_RECEIVED,{conversation:e,messageUId:t,sentTime:n,sendUserId:i})},messageReceiptRequest:function(e,t,n){ze.emit(Je.MESSAGE_RECEIPT_REQUEST,{conversation:e,messageUId:t,senderUserId:n})},messageReceiptResponse:function(e,t,n){ze.emit(Je.MESSAGE_RECEIPT_RESPONSE,{conversation:e,receivedUserId:t,messageUIdList:n})},conversationState:function(e){var t=e.map((function(e){var t=e.conversationType,n={conversationType:t,latestMessage:e.latestMessage?xe(e.latestMessage):null,targetId:e.targetId,unreadMessageCount:e.unreadMessageCount,unreadMentionedCount:e.unreadMentionedCount,notificationStatus:e.notificationStatus,notificationLevel:e.notificationLevel,lastUnreadTime:e.lastUnreadTime,channelId:e.channelId};return t===s.ULTRA_GROUP?(n.versionTime=e.versionTime,n.unreadMessageCount=je(e.unreadMessageCount||0),n.unreadMentionedCount=je(e.unreadMentionedCount||0),n.unreadMentionedMeCount=je(e.unreadMentionedMeCount||0),{conversation:n}):(n.hasMentioned=e.hasMentioned,n.mentionedInfo=e.mentionedInfo,n.isTop=e.isTop,{conversation:n,updatedItems:e.updatedItems})}));ze.emit(Je.CONVERSATION,{conversationList:t})},chatroomState:function(e){ze.emit(Je.CHATROOM,e)},expansion:function(e){ze.emit(Je.EXPANSION,e)},pullFinished:function(){ze.emit(Je.PULL_OFFLINE_MESSAGE_FINISHED)},tag:function(){ze.emit(Je.TAG)},conversationTagChanged:function(){ze.emit(Je.CONVERSATION_TAG)},messageBlocked:function(e){ze.emit(Je.MESSAGE_BLOCKED,e)},messageDelivered:function(e){ze.emit(Je.PRIVATE_MESSAGE_DELIVERED,e)},groupMessageDeliveredStatus:function(e){ze.emit(Je.GROUP_MESSAGE_DELIVERED,e)},ultraGroupEnable:function(e){ze.emit(Je.ULTRA_GROUP_ENABLE,e.map((function(e){return ke(e)})))},operateStatus:function(e){ze.emit(Je.OPERATE_STATUS,e)},ultraGroupMessageExpansionUpdated:function(e){ze.emit(Je.ULTRA_GROUP_MESSAGE_EXPANSION_UPDATED,e.map((function(e){return xe(e)})))},ultraGroupMessageModified:function(e){ze.emit(Je.ULTRA_GROUP_MESSAGE_MODIFIED,e.map((function(e){return xe(e)})))},ultraGroupMessageRecalled:function(e){ze.emit(Je.ULTRA_GROUP_MESSAGE_RECALLED,e.map((function(e){return xe(e)})))},ultraGroupChannelChangeType:function(e){ze.emit(Je.ULTRA_GROUP_CHANNEL_TYPE_CHANGE,e)},ultraGroupChannelUserKicked:function(e){ze.emit(Je.ULTRA_GROUP_CHANNEL_USER_KICKED,e)},ultraGroupChannelDelete:function(e){ze.emit(Je.ULTRA_GROUP_CHANNEL_DELETE,e)},userGroupStatus:function(e){ze.emit(Je.USER_GROUP_STATUS,e)},messageReadReceipt:function(e){ze.emit(Je.MESSAGE_READ_RECEIPT_V4,e)},syncReadStatus:function(e){ze.emit(Je.SYNC_READ_STATUS,e)},subscribedUserStatusChange:function(e){ze.emit(Je.SUBSCRIBED_USER_STATUS_CHANGE,e)},subscribedRelationChange:function(e){ze.emit(Je.SUBSCRIBED_RELATION_CHANGE,e)},syncSubscribedUserStatusFinished:function(e){ze.emit(Je.SYNC_SUBSCRIBED_USER_STATUS_FINISHED,e)},ownUserProfileChanged:function(e){ze.emit(Je.OWN_USER_PROFILE_CHANGED,e)},databaseUpgradeWillStart:function(){ze.emit(Je.DATABASE_UPGRADE_WILL_START)},databaseUpgrading:function(e){ze.emit(Je.DATABASE_UPGRADING,e)},databaseUpgradeDidComplete:function(e){ze.emit(Je.DATABASE_UPGRADE_DID_COMPLETE,e)}};function je(e){return e>999?999:e}d.add("imlib-next","5.10.4");var Qe=null,Ze=null,$e=null;function et(){return Z(this,void 0,void 0,(function(){return $(this,(function(e){switch(e.label){case 0:return Qe?($e.info(A.A_DESTROY_O),[4,l.destroy()]):[2];case 1:return e.sent(),Ze=null,Qe=null,$e=null,[2]}}))}))}function nt(e){if(!Qe)throw new Error("Not initialized yet!");return e(Qe,$e,Ze)}function it(e){return Qe?e(Qe,$e,Ze):Promise.resolve({code:r.BIZ_ERROR_CLIENT_NOT_INIT})}function ot(e,t,n){ze.on(e,t,n)}function rt(e,t,n){ze.once(e,t,n)}function at(e,t,n){ze.off(e,t,n)}function st(e){ze.removeAll(e)}function _t(){ze.clear()}function ct(e){!function(e){var t,n,i=e.appkey,o=e.navigators;Qe?$e.warn(A.A_INIT_REPEAT_O):(u("options.appkey",e.appkey,T.STRING,!0),u("options.navigators",e.navigators,(function(e){return E(e)&&(0===e.length||e.every(S))})),Ze=e,Qe=l.init((null===(t=e.__runtimeCreator__)||void 0===t?void 0:t.call(e))||Ye,{appkey:e.appkey,navigators:e.navigators||[],miniCMPProxy:e.customCMP||[],logOutputLevel:e.logOutputLevel,__reportLogLevel:e.__reportLogLevel,httpInMainProcess:!!e.httpInMainProcess,logExpireTime:e.logExpireTime,areaCode:e.areaCode,logServerUrl:e.logServerUrl,uploadDomain:e.uploadDomain,environment:null!==(n=e.environment)&&void 0!==n?n:"default"}),($e=Qe.createLogger("RC-IM","IM")).setOutputLevel(e.logOutputLevel),$e.info(A.A_INIT_O,JSON.stringify({appkey:i,navigators:o,version:"5.10.4",commit:"f7380d004bba1b1a54269056967b75ec9521f7a4"})),Qe.assignWatcher(We),R.init($e))}(e)}function dt(){return Z(this,void 0,void 0,(function(){return $(this,(function(e){return Qe?(_t(),[2,et()]):[2]}))}))}function ut(){return nt((function(e){return e.getConnectionStatus()}))}function Tt(){return nt((function(e){return e.getServerTime()}))}function Et(){return nt((function(e){return e.getCurrentUserId()}))}function St(e,t){d.add(e,t)}function lt(){return nt((function(e){return e.getDeviceId()}))}function At(e,t){return nt((function(n){return n.install(e,t)}))}var Rt={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:r.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:r.NOT_SUPPORT,msg:"The method is not supported in a browser!"}},vt={},ft={};for(var It in Rt){var Ot=Rt[It],Nt=Ot.code;vt[Nt]=It,ft[Nt]=Ot}function gt(e,t){return Z(this,void 0,void 0,(function(){var n=this;return $(this,(function(i){return[2,new v(A.A_CONNECT_T,A.A_CONNECT_R).validate("token",e,T.STRING,!0).ifReady((function(i,o){return Z(n,void 0,void 0,(function(){var n,a,s;return $(this,(function(_){switch(_.label){case 0:return n=o.createTraceId(),o.info(A.A_CONNECT_T,JSON.stringify({token:e,reconnectKickEnable:t}),n),[4,i.connect(e,!!t,n)];case 1:return a=_.sent(),s=a.code===r.SUCCESS?"info":"warn",o[s](A.A_CONNECT_R,JSON.stringify({code:a.code,userId:a.userId}),n),a.code===r.SUCCESS?[2,{code:a.code,data:{userId:a.userId}}]:[2,{code:a.code,msg:vt[a.code]}]}}))}))}))]}))}))}function Ct(e){return R.info(A.A_DISCONNECT_O,{}),nt((function(t){return t.disconnect(e)}))}function ht(e,t){return Z(this,void 0,void 0,(function(){var n=this;return $(this,(function(i){return[2,new v(qe.A_GET_CONVERSATION_LIST_T,qe.A_GET_CONVERSATION_LIST_R).validate("count",null==e?void 0:e.count,T.NUMBER).validate("startTime",null==e?void 0:e.startTime,T.NUMBER).validate("order",null==e?void 0:e.order,T.NUMBER).validate("channelId",t,T.CHANNEL_ID).ifReady((function(i,o){return Z(n,void 0,void 0,(function(){var n,a,s,_,c;return $(this,(function(d){switch(d.label){case 0:return n=o.createTraceId(),o.info(qe.A_GET_CONVERSATION_LIST_T,JSON.stringify({count:null==e?void 0:e.count,startTime:null==e?void 0:e.startTime,order:null==e?void 0:e.order,channelId:t}),n),[4,i.getConversationList(null==e?void 0:e.count,void 0,null==e?void 0:e.startTime,null==e?void 0:e.order,t)];case 1:return a=d.sent(),s=a.code,_=a.data,s===r.SUCCESS&&_?(c=_.map((function(e){return ke(e)})),o.info(qe.A_GET_CONVERSATION_LIST_R,JSON.stringify({code:s,list:c.length}),n),[2,{code:0,data:c}]):(o.warn(qe.A_GET_CONVERSATION_LIST_R,JSON.stringify({code:s})),[2,{code:s,msg:vt[s]}])}}))}))}))]}))}))}function mt(e){return Z(this,void 0,void 0,(function(){var t=this;return $(this,(function(n){return[2,new v(qe.A_GET_CONVERSATION_T,qe.A_GET_CONVERSATION_R).validate("conversation",e,T.OBJECT,!0).validate("conversationType",null==e?void 0:e.conversationType,T.CONVERSATION_TYPE,!0).validate("targetId",null==e?void 0:e.targetId,T.STRING,!0).validate("channelId",null==e?void 0:e.channelId,T.CHANNEL_ID).ifReady((function(n,i){return Z(t,void 0,void 0,(function(){var t,o,a,s,_,c,d,u;return $(this,(function(T){switch(T.label){case 0:return t=e.conversationType,o=e.targetId,a=e.channelId,s=i.createTraceId(),i.info(qe.A_GET_CONVERSATION_T,JSON.stringify({conversationType:t,targetId:o,channelId:a}),s),[4,n.getConversation(t,o,a||"")];case 1:return _=T.sent(),c=_.code,d=_.data,u=c===r.SUCCESS?"info":"warn",i[u](qe.A_GET_CONVERSATION_R,JSON.stringify({code:c}),s),c!==r.SUCCESS?[2,{code:c,msg:vt[c]}]:[2,{code:c,data:d?ke(d):null}]}}))}))}))]}))}))}function Ut(e){return Z(this,void 0,void 0,(function(){var t=this;return $(this,(function(n){return[2,new v(qe.A_REMOVE_CONVERSATION_T,qe.A_REMOVE_CONVERSATION_R).validate("conversation",e,T.OBJECT,!0).validate("conversationType",null==e?void 0:e.conversationType,T.CONVERSATION_TYPE,!0).validate("targetId",null==e?void 0:e.targetId,T.STRING,!0).validate("channelId",null==e?void 0:e.channelId,T.CHANNEL_ID).ifReady((function(n,i){return Z(t,void 0,void 0,(function(){var t,o,a,s,_,c;return $(this,(function(d){switch(d.label){case 0:return t=e.conversationType,o=e.targetId,a=e.channelId,s=i.createTraceId(),i.info(qe.A_REMOVE_CONVERSATION_T,JSON.stringify({conversationType:t,targetId:o,channelId:a}),s),[4,n.removeConversation(t,o,a)];case 1:return _=d.sent(),c=_===r.SUCCESS?"info":"warn",i[c](qe.A_REMOVE_CONVERSATION_R,JSON.stringify({code:_}),s),_!==r.SUCCESS?[2,{code:_,msg:vt[_]}]:[2,{code:_}]}}))}))}))]}))}))}function pt(e){return Z(this,void 0,void 0,(function(){var t=this;return $(this,(function(n){return[2,new v(qe.A_BATCH_REMOVE_CONVERSATION_T,qe.A_BATCH_REMOVE_CONVERSATION_R).validate("conversations",e,(function(t){if(!f("conversations",t,T.ARRAY,!0))return!1;if(t.length>20||0===t.length)return!1;for(var n=0,i=e;n<i.length;n++){var o=i[n];if(!(f("conversations",o,T.OBJECT,!0)&&f("conversations.targetId",o.targetId,T.STRING,!0)&&f("conversations.conversationType",o.conversationType,(function(e){var t=[s.PRIVATE,s.GROUP,s.SYSTEM].includes(e);return t||console.warn(qe.A_BATCH_REMOVE_CONVERSATION_R,"conversations.conversationType is invalid, It should be one of the following values:\n ConversationType.PRIVATE,\n ConversationType.GROUP,\n ConversationType.SYSTEM,\n "),t}),!0)&&f("conversations.channelId",o.channelId,T.ONLY_STRING)))return!1}return!0}),!0).ifReady((function(n,i){return Z(t,void 0,void 0,(function(){var t,o,a;return $(this,(function(s){switch(s.label){case 0:return t=e.map((function(e){return{conversationType:e.conversationType,targetId:e.targetId,channelId:e.channelId||""}})),o=i.createTraceId(),i.info(qe.A_BATCH_REMOVE_CONVERSATION_T,"conversations: "+JSON.stringify(t),o),[4,n.batchRemoveConversation(t)];case 1:return a=s.sent(),i[r.SUCCESS===a?"info":"warn"](qe.A_BATCH_REMOVE_CONVERSATION_R,"code: "+a,o),[2,{code:a}]}}))}))}))]}))}))}function yt(e){return Z(this,void 0,void 0,(function(){var t=this;return $(this,(function(n){return[2,new v(qe.A_GET_CONVERSATION_MESSAGE_DRAFT_T,qe.A_GET_CONVERSATION_MESSAGE_DRAFT_R).validate("conversation",e,T.OBJECT,!0).validate("conversationType",null==e?void 0:e.conversationType,T.CONVERSATION_TYPE,!0).validate("targetId",null==e?void 0:e.targetId,T.STRING,!0).validate("channelId",null==e?void 0:e.channelId,T.CHANNEL_ID).ifReady((function(n,i){return Z(t,void 0,void 0,(function(){var t,o,a,s,_,c,d,u;return $(this,(function(T){switch(T.label){case 0:return t=e.conversationType,o=e.targetId,a=e.channelId,s=i.createTraceId(),i.info(qe.A_GET_CONVERSATION_MESSAGE_DRAFT_T,JSON.stringify({conversationType:t,targetId:o,channelId:a}),s),[4,n.getConversationMessageDraft(t,o,a)];case 1:return _=T.sent(),c=_.code,d=_.data,u=c===r.SUCCESS?"info":"warn",i[u](qe.A_GET_CONVERSATION_MESSAGE_DRAFT_R,JSON.stringify({code:c,data:d}),s),c===r.SUCCESS?[2,{code:c,data:d||""}]:[2,{code:c,msg:vt[c]}]}}))}))}))]}))}))}function Gt(e,t){return Z(this,void 0,void 0,(function(){var n=this;return $(this,(function(i){return[2,new v(qe.A_SAVE_CONVERSATION_MESSAGE_DRAFT_T,qe.A_SAVE_CONVERSATION_MESSAGE_DRAFT_R).validate("conversation",e,T.OBJECT,!0).validate("conversationType",null==e?void 0:e.conversationType,T.CONVERSATION_TYPE,!0).validate("targetId",null==e?void 0:e.targetId,T.STRING,!0).validate("channelId",null==e?void 0:e.channelId,T.CHANNEL_ID).validate("draft",t,T.STRING,!0).ifReady((function(i,o){return Z(n,void 0,void 0,(function(){var n,a,s;return $(this,(function(_){switch(_.label){case 0:return n=o.createTraceId(),o.info(qe.A_SAVE_CONVERSATION_MESSAGE_DRAFT_T,JSON.stringify({conversationType:e.conversationType,targetId:e.targetId,channelId:e.channelId,draft:t}),n),[4,i.saveConversationMessageDraft(e.conversationType,e.targetId,t,e.channelId)];case 1:return a=_.sent(),s=a===r.SUCCESS?"info":"warn",o[s](qe.A_SAVE_CONVERSATION_MESSAGE_DRAFT_R,JSON.stringify({code:a}),n),a===r.SUCCESS?[2,{code:a}]:[2,{code:a,msg:vt[a]}]}}))}))}))]}))}))}function Mt(e){return Z(this,void 0,void 0,(function(){var t=this;return $(this,(function(n){return[2,new v(qe.A_CLEAR_CONVERSATION_MESSAGE_DRAFT_T,qe.A_CLEAR_CONVERSATION_MESSAGE_DRAFT_R).validate("conversation",e,T.OBJECT,!0).validate("conversationType",null==e?void 0:e.conversationType,T.CONVERSATION_TYPE,!0).validate("targetId",null==e?void 0:e.targetId,T.STRING,!0).validate("channelId",null==e?void 0:e.channelId,T.CHANNEL_ID).ifReady((function(n,i){return Z(t,void 0,void 0,(function(){var t,o,a,s,_,c;return $(this,(function(d){switch(d.label){case 0:return t=e.conversationType,o=e.targetId,a=e.channelId,s=i.createTraceId(),i.info(qe.A_CLEAR_CONVERSATION_MESSAGE_DRAFT_T,JSON.stringify({conversationType:t,targetId:o,channelId:a}),s),[4,n.clearConversationMessageDraft(t,o,a)];case 1:return _=d.sent(),c=_===r.SUCCESS?"info":"warn",i[c](qe.A_CLEAR_CONVERSATION_MESSAGE_DRAFT_R,JSON.stringify({code:_}),s),_===r.SUCCESS?[2,{code:_}]:[2,{code:_,msg:vt[_]}]}}))}))}))]}))}))}function Lt(e,t){return Z(this,void 0,void 0,(function(){var n=this;return $(this,(function(i){return[2,new v(qe.A_GET_TOTAL_UNREAD_COUNT_T,qe.A_GET_TOTAL_UNREAD_COUNT_R).validate("conversationTypes",t,(function(e){return!!E(e)&&!e.some((function(e){return!I(e)}))}),!1).ifReady((function(i,o){return Z(n,void 0,void 0,(function(){var n,a,s,_;return $(this,(function(c){switch(c.label){case 0:return n=o.createTraceId(),o.info(qe.A_GET_TOTAL_UNREAD_COUNT_T,JSON.stringify({conversationTypes:t,includeMuted:e}),n),[4,i.getTotalUnreadCount("",t,e)];case 1:return a=c.sent(),s=a.code,_=a.data,s===r.SUCCESS?(o.info(qe.A_GET_TOTAL_UNREAD_COUNT_R,JSON.stringify({code:s,data:_}),n),[2,{code:s,data:_}]):(o.warn(qe.A_GET_TOTAL_UNREAD_COUNT_R,JSON.stringify({code:s}),n),[2,{code:s,msg:vt[s]}])}}))}))}))]}))}))}function Pt(e,t){return Z(this,void 0,void 0,(function(){var n=this;return $(this,(function(i){return[2,new v(qe.A_GET_TOTAL_UNREAD_COUNT_BY_LEVELS_T,qe.A_GET_TOTAL_UNREAD_COUNT_BY_LEVELS_R).validate("conversationTypes",e,(function(e){return!!E(e)&&!e.some((function(e){return!I(e)}))}),!0).validate("levels",t,(function(e){return!!E(t)&&!e.some((function(e){return!O(e)}))}),!0).ifReady((function(i,o){return Z(n,void 0,void 0,(function(){var n,a,s,_;return $(this,(function(c){switch(c.label){case 0:return n=o.createTraceId(),o.info(qe.A_GET_TOTAL_UNREAD_COUNT_BY_LEVELS_T,JSON.stringify({conversationTypes:e,levels:t,isMentioned:!1}),n),[4,i.getTotalUnreadCountByLevels(e,t)];case 1:return a=c.sent(),s=a.code,_=a.data,s===r.SUCCESS?(o.info(qe.A_GET_TOTAL_UNREAD_COUNT_BY_LEVELS_R,JSON.stringify({code:s,data:_}),n),[2,{code:s,data:_}]):(o.warn(qe.A_GET_TOTAL_UNREAD_COUNT_BY_LEVELS_R,JSON.stringify({code:s}),n),[2,{code:s,msg:vt[s]}])}}))}))}))]}))}))}function Dt(e,t){return Z(this,void 0,void 0,(function(){var n=this;return $(this,(function(i){return[2,new v(qe.A_GET_TOTAL_UNREAD_COUNT_BY_LEVELS_T,qe.A_GET_TOTAL_UNREAD_COUNT_BY_LEVELS_R).validate("conversationTypes",e,(function(e){return!!E(e)&&!e.some((function(e){return!I(e)}))}),!0).validate("levels",t,(function(e){return!!E(e)&&!e.some((function(e){return!O(e)}))}),!0).ifReady((function(i,o){return Z(n,void 0,void 0,(function(){var n,a,s,_;return $(this,(function(c){switch(c.label){case 0:return n=o.createTraceId(),o.info(qe.A_GET_TOTAL_UNREAD_COUNT_BY_LEVELS_T,JSON.stringify({conversationTypes:e,levels:t,isMentioned:!0}),n),[4,i.getTotalUnreadCountByLevels(e,t,!0)];case 1:return a=c.sent(),s=a.code,_=a.data,s===r.SUCCESS?(o.info(qe.A_GET_TOTAL_UNREAD_COUNT_BY_LEVELS_R,JSON.stringify({code:s,data:_}),n),[2,{code:s,data:_}]):(o.warn(qe.A_GET_TOTAL_UNREAD_COUNT_BY_LEVELS_R,JSON.stringify({code:s}),n),[2,{code:s,msg:vt[s]}])}}))}))}))]}))}))}function wt(e){return Z(this,void 0,void 0,(function(){var t=this;return $(this,(function(n){return[2,new v(qe.A_GET_UNREAD_COUNT_T,qe.A_GET_UNREAD_COUNT_R).validate("conversation",e,T.OBJECT,!0).validate("conversationType",null==e?void 0:e.conversationType,T.CONVERSATION_TYPE,!0).validate("targetId",null==e?void 0:e.targetId,T.STRING,!0).validate("channelId",null==e?void 0:e.channelId,T.CHANNEL_ID).ifReady((function(n,i){return Z(t,void 0,void 0,(function(){var t,o,a,s,_,c,d;return $(this,(function(u){switch(u.label){case 0:return t=e.conversationType,o=e.targetId,a=e.channelId,s=i.createTraceId(),i.info(qe.A_GET_UNREAD_COUNT_T,JSON.stringify({conversationType:t,targetId:o,channelId:a}),s),[4,n.getUnreadCount(t,o,a)];case 1:return _=u.sent(),c=_.code,d=_.data,c===r.SUCCESS?(i.info(qe.A_GET_UNREAD_COUNT_R,JSON.stringify({code:c,data:d})),[2,{code:c,data:d}]):(i.warn(qe.A_GET_UNREAD_COUNT_R,JSON.stringify({code:c})),[2,{code:c,msg:vt[c]}])}}))}))}))]}))}))}function Bt(e){return Z(this,void 0,void 0,(function(){var t=this;return $(this,(function(n){return[2,new v(qe.A_CLEAR_UNREAD_COUNT_T,qe.A_CLEAR_UNREAD_COUNT_R).validate("conversation",e,T.OBJECT,!0).validate("conversationType",null==e?void 0:e.conversationType,T.CONVERSATION_TYPE,!0).validate("targetId",null==e?void 0:e.targetId,T.STRING,!0).validate("channelId",null==e?void 0:e.channelId,T.CHANNEL_ID).ifReady((function(n,i){return Z(t,void 0,void 0,(function(){var t,o,a,s,_,c;return $(this,(function(d){switch(d.label){case 0:return t=e.conversationType,o=e.targetId,a=e.channelId,s=i.createTraceId(),i.info(qe.A_CLEAR_UNREAD_COUNT_T,JSON.stringify({conversationType:t,targetId:o,channelId:a}),s),[4,n.clearUnreadCount(t,o,a)];case 1:return _=d.sent(),c=_===r.SUCCESS?"info":"warn",i[c](qe.A_CLEAR_UNREAD_COUNT_R,JSON.stringify({code:_}),s),_!==r.SUCCESS?[2,{code:_,msg:vt[_]}]:[2,{code:_}]}}))}))}))]}))}))}function Vt(){return Z(this,void 0,void 0,(function(){var e=this;return $(this,(function(t){return[2,new v("","").ifReady((function(t,n){return Z(e,void 0,void 0,(function(){var e;return $(this,(function(i){switch(i.label){case 0:return e=n.createTraceId(),n.info(qe.A_CLEAR_ALL_UNREAD_COUNT_O,"",e),[4,t.clearAllUnreadCount()];case 1:return[2,{code:i.sent()}]}}))}))}))]}))}))}Rt.ROAMING_SERVICE_UNAVAILABLE.code;var bt=function(e,t,n,i){return void 0===i&&(i=""),Z(void 0,void 0,void 0,(function(){var o,a;return $(this,(function(s){switch(s.label){case 0:return o=function(e,t,n){void 0===n&&(n="");var i="conversationType:"+t.conversationType+",targetId:"+t.targetId;return e.debug(A.O,n+" -> "+i),i}(e,t,i),[4,n()];case 1:return(a=s.sent())!==r.SUCCESS?(e.warn(A.O,i+" fail -> "+a+" : "+vt[a]+" , "+o),[2,{code:a,msg:vt[a]}]):[2,{code:a}]}}))}))};function Jt(e,t){return Z(this,void 0,void 0,(function(){return $(this,(function(n){return[2,new v(qe.A_SET_CONVERSATION_NOTIFICATION_LEVEL_T,qe.A_SET_CONVERSATION_NOTIFICATION_LEVEL_R).validate("conversation",e,T.OBJECT,!0).validate("conversationType",null==e?void 0:e.conversationType,T.CONVERSATION_TYPE,!0).validate("targetId",null==e?void 0:e.targetId,T.STRING,!0).validate("channelId",null==e?void 0:e.channelId,T.CHANNEL_ID).validate("notificationLevel",t,(function(e){return void 0!==N[e]}),!0).ifReady((function(n,i){return bt(i,e,(function(){return n.setConversationNotificationLevel(e.conversationType,e.targetId,t,e.channelId)}),"setConversationNotificationLevel")}))]}))}))}function Ft(e,t){return Z(this,void 0,void 0,(function(){var n=this;return $(this,(function(i){return[2,new v(qe.A_BATCH_SET_CON_NOTIFI_LEVEL_T,qe.A_BATCH_SET_CON_NOTIFI_LEVEL_R).validate("conversations",e,(function(e){if(!f("conversations",e,T.ARRAY,!0))return!1;if(e.length>20||0===e.length)return!1;for(var t=0,n=e;t<n.length;t++){var i=n[t];if(!(f("conversations",i,T.OBJECT,!0)&&f("conversations.targetId",i.targetId,T.STRING,!0)&&f("conversations.conversationType",i.conversationType,(function(e){var t=[s.PRIVATE,s.GROUP,s.SYSTEM].includes(e);return t||console.warn(qe.A_BATCH_REMOVE_CONVERSATION_R,"conversations.conversationType is invalid, It should be one of the following values:\n ConversationType.PRIVATE,\n ConversationType.GROUP,\n ConversationType.SYSTEM,\n "),t}),!0)&&f("conversations.channelId",i.channelId,T.ONLY_STRING)))return!1}return!0}),!0).validate("notificationLevel",t,(function(e){return[-1,0,1,2,3,4,5].includes(e)}),!0).ifReady((function(i,o){return Z(n,void 0,void 0,(function(){var n,a,s;return $(this,(function(_){switch(_.label){case 0:return n=e.map((function(e){return{conversationType:e.conversationType,targetId:e.targetId,channelId:e.channelId||""}})),a=o.createTraceId(),o.info(qe.A_BATCH_SET_CON_NOTIFI_LEVEL_T,"conversations: "+JSON.stringify(n),a),[4,i.batchSetConversationNotificationLevel(n,t)];case 1:return s=_.sent(),o[r.SUCCESS===s?"info":"warn"](qe.A_BATCH_SET_CON_NOTIFI_LEVEL_R,"code: "+s,a),[2,{code:s}]}}))}))}))]}))}))}function Ht(e,t){return Z(this,void 0,void 0,(function(){return $(this,(function(n){return[2,new v(qe.A_SET_CONVERSATION_NOTIFICATION_STATUS_T,qe.A_SET_CONVERSATION_NOTIFICATION_STATUS_R).validate("conversation",e,T.OBJECT,!0).validate("conversationType",null==e?void 0:e.conversationType,T.CONVERSATION_TYPE,!0).validate("targetId",null==e?void 0:e.targetId,T.STRING,!0).validate("channelId",null==e?void 0:e.channelId,T.CHANNEL_ID).validate("notificationStatus",t,(function(e){return 1===e||2===e}),!0).ifReady((function(n,i){return bt(i,e,(function(){return n.setConversationStatus(e.conversationType,e.targetId,void 0,t,e.channelId)}),"setConversationNotificationStatus")}))]}))}))}function Yt(e){return Z(this,void 0,void 0,(function(){var t=this;return $(this,(function(n){return[2,new v(qe.A_GET_CONVERSATION_NOTIFICATION_LEVEL_R,qe.A_GET_CONVERSATION_NOTIFICATION_LEVEL_R).validate("conversation",e,T.OBJECT,!0).validate("conversationType",null==e?void 0:e.conversationType,T.CONVERSATION_TYPE,!0).validate("targetId",null==e?void 0:e.targetId,T.STRING,!0).validate("channelId",null==e?void 0:e.channelId,T.CHANNEL_ID).ifReady((function(n,i){return Z(t,void 0,void 0,(function(){var t,o,a,s,_,c,d;return $(this,(function(u){switch(u.label){case 0:return t=e.conversationType,o=e.targetId,a=e.channelId,s=i.createTraceId(),i.info(qe.A_GET_CONVERSATION_NOTIFICATION_LEVEL_T,JSON.stringify({conversationType:t,targetId:o,channelId:a}),s),[4,n.getConversationNotificationLevel(t,o,a)];case 1:return _=u.sent(),c=_.code,d=_.data,c===r.SUCCESS?(i.info(qe.A_GET_CONVERSATION_NOTIFICATION_LEVEL_R,JSON.stringify({code:c,data:d}),s),[2,{code:c,data:d}]):(i.warn(qe.A_GET_CONVERSATION_NOTIFICATION_LEVEL_R,JSON.stringify({code:c}),s),[2,{code:c,msg:vt[c]}])}}))}))}))]}))}))}function xt(e){return Z(this,void 0,void 0,(function(){var t=this;return $(this,(function(n){return[2,new v(qe.A_GET_CONVERSATION_NOTIFICATION_STATUS_T,qe.A_GET_CONVERSATION_NOTIFICATION_STATUS_R).validate("conversation",e,T.OBJECT,!0).validate("conversationType",null==e?void 0:e.conversationType,T.CONVERSATION_TYPE,!0).validate("targetId",null==e?void 0:e.targetId,T.STRING,!0).validate("channelId",null==e?void 0:e.channelId,T.CHANNEL_ID).ifReady((function(n,i){return Z(t,void 0,void 0,(function(){var t,o,a,s,_,c,d;return $(this,(function(u){switch(u.label){case 0:return t=e.conversationType,o=e.targetId,a=e.channelId,s=i.createTraceId(),i.info(qe.A_GET_CONVERSATION_NOTIFICATION_STATUS_T,JSON.stringify({conversationType:t,targetId:o,channelId:a}),s),[4,n.getConversationNotificationStatus(t,o,a)];case 1:return _=u.sent(),c=_.code,d=_.data,c===r.SUCCESS?(i.info(qe.A_GET_CONVERSATION_NOTIFICATION_STATUS_R,JSON.stringify({code:c,data:d}),s),[2,{code:c,data:d}]):(i.warn(qe.A_GET_CONVERSATION_NOTIFICATION_STATUS_R,JSON.stringify({code:c}),s),[2,{code:c,msg:vt[c]}])}}))}))}))]}))}))}function kt(){return Z(this,void 0,void 0,(function(){return $(this,(function(e){return[2,new v("","").ifReady((function(e){return e.getBlockConversationList()}))]}))}))}function Kt(e,t){return Z(this,void 0,void 0,(function(){var n=this;return $(this,(function(i){return f("conversationType",e,(function(){return[s.PRIVATE,s.GROUP,s.SYSTEM,s.PUBLIC_SERVICE,s.APP_PUBLIC_SERVICE,s.ULTRA_GROUP].includes(e)}))&&f("level",t,O)?[2,it((function(i,o){return Z(n,void 0,void 0,(function(){var n,a,s;return $(this,(function(_){switch(_.label){case 0:return o.info(A.O,"setConversationTypeNotificationLevel ->conversationType:"+e+",level:"+t),[4,i.setConversationTypeNotificationLevel(e,t)];case 1:return n=_.sent(),a=n.code,s=n.data,a===r.SUCCESS?[2,{code:a,data:s}]:(o.warn(A.O,"setConversationTypeNotificationLevel ->conversationType:"+e+",level:"+t),[2,{code:a,msg:vt[a]}])}}))}))}))]:[2,{code:r.BIZ_ERROR_INVALID_PARAMETER}]}))}))}function Xt(e){return Z(this,void 0,void 0,(function(){var t=this;return $(this,(function(n){return f("conversationType",e,(function(){return[s.PRIVATE,s.GROUP,s.SYSTEM,s.PUBLIC_SERVICE,s.APP_PUBLIC_SERVICE,s.ULTRA_GROUP].includes(e)}))?[2,it((function(n,i){return Z(t,void 0,void 0,(function(){var t,o,a;return $(this,(function(s){switch(s.label){case 0:return i.info(A.O,"getConversationTypeNotificationLevel ->conversationType:"+e),[4,n.getConversationTypeNotificationLevel(e)];case 1:return t=s.sent(),o=t.code,a=t.data,o===r.SUCCESS?[2,{code:o,data:a}]:(i.warn(A.O,"getConversationTypeNotificationLevel ->conversationType:"+e),[2,{code:o,msg:vt[o]}])}}))}))}))]:[2,{code:r.BIZ_ERROR_INVALID_PARAMETER}]}))}))}function qt(e,t,n){return void 0===t&&(t=!0),void 0===n&&(n=!0),Z(this,void 0,void 0,(function(){var i=this;return $(this,(function(o){return[2,new v(qe.A_SET_CONVERSATION_STATUS_T,qe.A_SET_CONVERSATION_STATUS_R).validate("conversation",e,T.OBJECT,!0).validate("conversationType",null==e?void 0:e.conversationType,T.CONVERSATION_TYPE,!0).validate("targetId",null==e?void 0:e.targetId,T.STRING,!0).validate("channelId",null==e?void 0:e.channelId,T.CHANNEL_ID).validate("isTop",t,T.BOOLEAN).validate("isUpdateTime",n,T.BOOLEAN).ifReady((function(o,a){return Z(i,void 0,void 0,(function(){var i,s,_,c,d,u;return $(this,(function(T){switch(T.label){case 0:return i=e.conversationType,s=e.targetId,_=e.channelId,c=a.createTraceId(),a.info(qe.A_SET_CONVERSATION_STATUS_T,JSON.stringify({conversationType:i,targetId:s,channelId:_,isTop:t}),c),[4,o.setConversationStatus(e.conversationType,e.targetId,t,void 0,e.channelId,n)];case 1:return d=T.sent(),u=d===r.SUCCESS?"info":"warn",a[u](qe.A_SET_CONVERSATION_STATUS_R,JSON.stringify({code:d}),c),d!==r.SUCCESS?[2,{code:d,msg:vt[d]}]:[2,{code:d}]}}))}))}))]}))}))}function zt(e,t,n){return Z(this,void 0,void 0,(function(){var i=this;return $(this,(function(o){return[2,new v(qe.A_BATCH_SET_CON_TO_TOP_T,qe.A_BATCH_SET_CON_TO_TOP_R).validate("conversations",e,(function(e){if(!f("conversations",e,T.ARRAY,!0))return!1;if(e.length>20||0===e.length)return!1;for(var t=0,n=e;t<n.length;t++){var i=n[t];if(!(f("conversations",i,T.OBJECT,!0)&&f("conversations.targetId",i.targetId,T.STRING,!0)&&f("conversations.conversationType",i.conversationType,(function(e){var t=[s.PRIVATE,s.GROUP,s.SYSTEM].includes(e);return t||console.warn(qe.A_BATCH_REMOVE_CONVERSATION_R,"conversations.conversationType is invalid, It should be one of the following values:\n ConversationType.PRIVATE,\n ConversationType.GROUP,\n ConversationType.SYSTEM,\n "),t}),!0)&&f("conversations.channelId",i.channelId,T.ONLY_STRING)))return!1}return!0}),!0).validate("isTop",t,T.BOOLEAN,!0).ifReady((function(o,a){return Z(i,void 0,void 0,(function(){var i,s,_;return $(this,(function(c){switch(c.label){case 0:return i=e.map((function(e){return{conversationType:e.conversationType,targetId:e.targetId,channelId:e.channelId||""}})),s=a.createTraceId(),a.info(qe.A_BATCH_SET_CON_TO_TOP_T,"conversations: "+JSON.stringify(i),s),[4,o.batchSetConversationToTop(i,t,n)];case 1:return _=c.sent(),a[r.SUCCESS===_?"info":"warn"](qe.A_BATCH_SET_CON_TO_TOP_R,"code: "+_,s),[2,{code:_}]}}))}))}))]}))}))}function Wt(e,t){return Z(this,void 0,void 0,(function(){var n=this;return $(this,(function(i){return[2,new v(qe.A_GET_TOP_CONVERSATION_LIST_T,qe.A_GET_TOP_CONVERSATION_LIST_R).validate("conversationTypes",e,(function(e){return!!E(e)&&!e.some((function(e){return!I(e)}))})).validate("channelId",t,T.CHANNEL_ID).ifReady((function(i,o){return Z(n,void 0,void 0,(function(){var n,a,s,_,c,d;return $(this,(function(u){switch(u.label){case 0:return n=o.createTraceId(),o.info(qe.A_GET_TOP_CONVERSATION_LIST_T,JSON.stringify({conversationTypes:e,channelId:t}),n),[4,i.getTopConversationList(e,t)];case 1:return a=u.sent(),s=a.code,_=a.data,s===r.SUCCESS&&_?(c=[],d=_.map((function(e){return c.push({targetId:e.targetId,conversationType:e.conversationType,channelId:e.channelId}),ke(e)})),o.info(qe.A_GET_TOP_CONVERSATION_LIST_R,JSON.stringify({code:s,list:c}),n),[2,{code:0,data:d}]):(o.warn(A.A_GET_TOP_CONVERSATION_LIST_E,JSON.stringify({code:s}),n),[2,{code:s,msg:vt[s]}])}}))}))}))]}))}))}function jt(e){return Z(this,void 0,void 0,(function(){var t=this;return $(this,(function(n){return[2,new v(qe.A_GET_UNREAD_CONVERSATION_LIST_T,qe.A_GET_UNREAD_CONVERSATION_LIST_R).validate("conversationTypes",e,(function(e){return!!E(e)&&!e.some((function(e){return!I(e)}))})).ifReady((function(n,i){return Z(t,void 0,void 0,(function(){var t,o,a,s,_,c;return $(this,(function(d){switch(d.label){case 0:return t=i.createTraceId(),i.info(qe.A_GET_UNREAD_CONVERSATION_LIST_T,JSON.stringify({conversationTypes:e}),t),[4,n.getUnreadConversationList(e)];case 1:return o=d.sent(),a=o.code,s=o.data,a===r.SUCCESS&&s?(_=[],c=s.map((function(e){return _.push({targetId:e.targetId,conversationType:e.conversationType,channelId:e.channelId,unreadMessageCount:e.unreadMessageCount}),ke(e)})),i.info(qe.A_GET_UNREAD_CONVERSATION_LIST_R,JSON.stringify({code:a,list:_}),t),[2,{code:0,data:c}]):(i.warn(qe.A_GET_UNREAD_CONVERSATION_LIST_R,JSON.stringify({code:a}),t),[2,{code:a,msg:vt[a]}])}}))}))}))]}))}))}function Qt(e){return Z(this,void 0,void 0,(function(){var t=this;return $(this,(function(n){return[2,new v(qe.A_GET_CONVERSATION_NOTIFICATION_STATUS_T,qe.A_GET_CONVERSATION_NOTIFICATION_STATUS_R).validate("conversation",e,T.OBJECT,!0).validate("conversationType",null==e?void 0:e.conversationType,T.CONVERSATION_TYPE,!0).validate("targetId",null==e?void 0:e.targetId,T.STRING,!0).validate("channelId",null==e?void 0:e.channelId,T.CHANNEL_ID).ifReady((function(n,i){return Z(t,void 0,void 0,(function(){var t,o,a,s;return $(this,(function(_){switch(_.label){case 0:return t=i.createTraceId(),i.info(qe.A_GET_UNREAD_MENTIONED_COUNT_T,JSON.stringify({conversationType:e.conversationType,targetId:e.targetId,channelId:e.channelId}),t),[4,n.getUnreadMentionedCount(e)];case 1:return o=_.sent(),a=o.code,s=o.data,a===r.SUCCESS?(i.info(qe.A_GET_UNREAD_MENTIONED_COUNT_R,JSON.stringify({code:a,data:s}),t),[2,{code:a,data:s}]):(i.warn(qe.A_GET_UNREAD_MENTIONED_COUNT_R,JSON.stringify({code:a}),t),[2,{code:a}])}}))}))}))]}))}))}function Zt(){return Z(this,void 0,void 0,(function(){var e=this;return $(this,(function(t){return[2,new v("","").ifReady((function(t,n){return Z(e,void 0,void 0,(function(){var e,i,o,a;return $(this,(function(s){switch(s.label){case 0:return e=n.createTraceId(),n.info(qe.A_GET_ALL_UNREAD_MENTIONED_COUNT_T,"",e),[4,t.getAllUnreadMentionedCount()];case 1:return i=s.sent(),o=i.code,a=i.data,o===r.SUCCESS?(n.warn(qe.A_GET_ALL_UNREAD_MENTIONED_COUNT_R,JSON.stringify({code:o,data:a}),e),[2,{code:o,data:a}]):[2,{code:o}]}}))}))}))]}))}))}function $t(){return Z(this,void 0,void 0,(function(){var e=this;return $(this,(function(t){return[2,new v("","").ifReady((function(t,n){return Z(e,void 0,void 0,(function(){var e,i,o,a,s;return $(this,(function(_){switch(_.label){case 0:return e=n.createTraceId(),n.info(qe.A_GET_ALL_CONVERSATION_STATE_T,"",e),[4,t.getAllConversationState()];case 1:return i=_.sent(),o=i.code,a=i.data,s=o===r.SUCCESS?"info":"warn",n[s](qe.A_SET_CONVERSATION_STATUS_R,JSON.stringify({code:o}),e),o===r.SUCCESS?[2,{code:o,data:a}]:[2,{code:o}]}}))}))}))]}))}))}function en(e){return void 0===e&&(e={}),Z(this,void 0,void 0,(function(){var t=this;return $(this,(function(n){return[2,new v(qe.A_GET_ULTRA_GROUP_LIST_T,qe.A_GET_ULTRA_GROUP_LIST_R).validate("targetId",null==e?void 0:e.targetId,T.STRING,!1).validate("channelType",null==e?void 0:e.channelType,(function(e){return void 0!==g[e]}),!1).ifReady((function(n,i){return Z(t,void 0,void 0,(function(){var t,o,a,s;return $(this,(function(_){switch(_.label){case 0:return t=i.createTraceId(),i.info(qe.A_GET_ULTRA_GROUP_LIST_T,JSON.stringify({targetId:e.targetId,channelType:e.channelType}),t),[4,n.getUltraGroupList(e)];case 1:return o=_.sent(),a=o.code,s=o.data,a===r.SUCCESS?(i.info(qe.A_GET_ULTRA_GROUP_LIST_R,JSON.stringify({code:a,length:null==s?void 0:s.length}),t),[2,{code:r.SUCCESS,data:s}]):(i.warn(qe.A_GET_ULTRA_GROUP_LIST_R,JSON.stringify({code:a}),t),[2,{code:a,msg:vt[a]}])}}))}))}))]}))}))}function tn(){return Z(this,void 0,void 0,(function(){var e=this;return $(this,(function(t){return[2,new v("","").ifReady((function(t,n){return Z(e,void 0,void 0,(function(){var e,i,o,a;return $(this,(function(s){switch(s.label){case 0:return e=n.createTraceId(),n.info(qe.A_GET_BLOCK_ULTRA_GROUP_LIST_T,"",e),[4,t.getBlockUltraGroupList()];case 1:return i=s.sent(),o=i.code,a=i.data,o===r.SUCCESS?(n.info(qe.A_GET_BLOCK_ULTRA_GROUP_LIST_R,JSON.stringify({code:o,length:null==a?void 0:a.length}),e),[2,{code:r.SUCCESS,data:a}]):(n.warn(qe.A_GET_BLOCK_ULTRA_GROUP_LIST_R,JSON.stringify({code:o}),e),[2,{code:o,msg:vt[o]}])}}))}))}))]}))}))}function nn(e){return Z(this,void 0,void 0,(function(){var t=this;return $(this,(function(n){return[2,new v(qe.A_SEND_ULTRA_GROUP_TYPING_STATUS_T,qe.A_SEND_ULTRA_GROUP_TYPING_STATUS_R).validate("conversation",e,T.OBJECT,!0).validate("conversationType",null==e?void 0:e.conversationType,T.CONVERSATION_TYPE,!0).validate("targetId",null==e?void 0:e.targetId,T.STRING,!0).validate("channelId",null==e?void 0:e.channelId,T.CHANNEL_ID).ifReady((function(n,i){return Z(t,void 0,void 0,(function(){var t,o,a;return $(this,(function(s){switch(s.label){case 0:return t=i.createTraceId(),i.info(qe.A_SEND_ULTRA_GROUP_TYPING_STATUS_T,JSON.stringify({targetId:e.targetId,channelId:e.channelId}),t),[4,n.sendUltraGroupTypingStatus(e)];case 1:return o=s.sent().code,a=o===r.SUCCESS?"info":"warn",i[a](qe.A_SEND_ULTRA_GROUP_TYPING_STATUS_R,JSON.stringify({code:o}),t),o===r.SUCCESS?[2,{code:r.SUCCESS}]:[2,{code:o,msg:vt[o]}]}}))}))}))]}))}))}function on(e,t){return Z(this,void 0,void 0,(function(){var n=this;return $(this,(function(i){return[2,new v(qe.A_GET_ULTRA_GROUP_MESSAGE_LIST_BY_MESSAGE_UID_T,qe.A_GET_ULTRA_GROUP_MESSAGE_LIST_BY_MESSAGE_UID_R).validate("conversation",e,T.OBJECT,!0).validate("conversationType",null==e?void 0:e.conversationType,T.CONVERSATION_TYPE,!0).validate("targetId",null==e?void 0:e.targetId,T.STRING,!0).validate("channelId",null==e?void 0:e.channelId,T.CHANNEL_ID).validate("messages",t,T.ARRAY,!0).ifReady((function(i,o){return Z(n,void 0,void 0,(function(){var n,a,s,_,c,d,u,T,E,S,l,A;return $(this,(function(R){switch(R.label){case 0:return n=e.targetId,a=e.conversationType,s=e.channelId,_=[],t.forEach((function(e){var t=e.sendTime,n=e.messageUId;_.push({sendTime:t,messageUId:n,channelId:s})})),c={targetId:n,conversationType:a,messages:_},d=o.createTraceId(),o.info(qe.A_GET_ULTRA_GROUP_MESSAGE_LIST_BY_MESSAGE_UID_T,JSON.stringify(c),d),[4,i.getUltraGroupMessageListByMessageUId(c)];case 1:if(u=R.sent(),T=u.code,E=u.data,T===r.SUCCESS){for(A in S={},l=[],E)l.push(A),S[A]=E[A]?xe(E[A]):void 0;return o.info(qe.A_GET_ULTRA_GROUP_MESSAGE_LIST_BY_MESSAGE_UID_R,JSON.stringify({code:T,messageUIds:l}),d),[2,{code:r.SUCCESS,data:S}]}return o.warn(qe.A_GET_ULTRA_GROUP_MESSAGE_LIST_BY_MESSAGE_UID_R,JSON.stringify({code:T}),d),[2,{code:T,msg:vt[T]}]}}))}))}))]}))}))}function rn(e,t){return Z(this,void 0,void 0,(function(){var n=this;return $(this,(function(i){return[2,new v(qe.A_UPDATE_EXPANSION_FOR_ULTRA_GROUP_MESSAGE_T,qe.A_UPDATE_EXPANSION_FOR_ULTRA_GROUP_MESSAGE_R).validate("expansion",e,T.OBJECT,!0).validate("message",t,T.OBJECT,!0).ifReady((function(i,o){return Z(n,void 0,void 0,(function(){var n,a,s,_,c,d,u,T,E,S;return $(this,(function(l){switch(l.label){case 0:return n=t.conversationType,a=t.targetId,s=t.messageUId,_=t.sentTime,c=t.canIncludeExpansion,d=t.channelId,u=o.createTraceId(),o.info(qe.A_UPDATE_EXPANSION_FOR_ULTRA_GROUP_MESSAGE_T,JSON.stringify({conversationType:n,targetId:a,messageUId:s,channelId:d}),u),T={targetId:a,channelId:d,conversationType:n,sendTime:_,canIncludeExpansion:c,messageUId:s,expansion:e},[4,i.expandUltraMessage(T)];case 1:return E=l.sent().code,S=E===r.SUCCESS?"info":"warn",o[S](qe.A_UPDATE_EXPANSION_FOR_ULTRA_GROUP_MESSAGE_R,JSON.stringify({code:E}),u),E===r.SUCCESS?[2,{code:r.SUCCESS}]:[2,{code:E,msg:vt[E]}]}}))}))}))]}))}))}function an(e,t){return Z(this,void 0,void 0,(function(){var n=this;return $(this,(function(i){return[2,new v(qe.A_REMOVE_EXPANSION_FOR_ULTRA_GROUP_MESSAGE_T,qe.A_REMOVE_EXPANSION_FOR_ULTRA_GROUP_MESSAGE_R).validate("expansion",e,T.ARRAY,!0).validate("message",t,T.OBJECT,!0).ifReady((function(i,o){return Z(n,void 0,void 0,(function(){var n,a,s,_,c,d,u,T,E,S;return $(this,(function(l){switch(l.label){case 0:return n=t.conversationType,a=t.targetId,s=t.messageUId,_=t.sentTime,c=t.canIncludeExpansion,d=t.channelId,u=o.createTraceId(),o.info(qe.A_REMOVE_EXPANSION_FOR_ULTRA_GROUP_MESSAGE_T,JSON.stringify({conversationType:n,targetId:a,messageUId:s,channelId:d}),u),T={targetId:a,channelId:d,conversationType:n,sendTime:_,canIncludeExpansion:c,messageUId:s,keys:e},[4,i.expandUltraMessage(T)];case 1:return E=l.sent().code,S=E===r.SUCCESS?"info":"warn",o[S](qe.A_REMOVE_EXPANSION_FOR_ULTRA_GROUP_MESSAGE_R,JSON.stringify({code:E}),u),E===r.SUCCESS?[2,{code:r.SUCCESS}]:[2,{code:E,msg:vt[E]}]}}))}))}))]}))}))}function sn(e){return Z(this,void 0,void 0,(function(){var t=this;return $(this,(function(n){return[2,new v(qe.A_REMOVE_ALL_EXPANSION_FOR_ULTRA_GROUP_MESSAGE_T,qe.A_REMOVE_ALL_EXPANSION_FOR_ULTRA_GROUP_MESSAGE_R).validate("message",e,T.OBJECT,!0).ifReady((function(n,i){return Z(t,void 0,void 0,(function(){var t,o,a,s,_,c,d,u,T,E;return $(this,(function(S){switch(S.label){case 0:return t=e.conversationType,o=e.targetId,a=e.messageUId,s=e.sentTime,_=e.canIncludeExpansion,c=e.channelId,d=i.createTraceId(),i.info(qe.A_REMOVE_ALL_EXPANSION_FOR_ULTRA_GROUP_MESSAGE_T,JSON.stringify({conversationType:t,targetId:o,messageUId:a,channelId:c}),d),u={targetId:o,channelId:c,conversationType:t,sendTime:s,canIncludeExpansion:_,messageUId:a,removeAll:!0},[4,n.expandUltraMessage(u)];case 1:return T=S.sent().code,E=T===r.SUCCESS?"info":"warn",i[E](qe.A_REMOVE_ALL_EXPANSION_FOR_ULTRA_GROUP_MESSAGE_R,JSON.stringify({code:T}),d),T===r.SUCCESS?[2,{code:r.SUCCESS}]:[2,{code:T,msg:vt[T]}]}}))}))}))]}))}))}function _n(e,t){return Z(this,void 0,void 0,(function(){var n=this;return $(this,(function(i){return[2,new v(qe.A_MODIFY_MESSAGE_R,qe.A_MODIFY_MESSAGE_R).validate("content",e,T.OBJECT,!0).validate("message",t,T.OBJECT,!0).ifReady((function(i,o){return Z(n,void 0,void 0,(function(){var n,a,s,_,c,d,u,T,E,S,l;return $(this,(function(A){switch(A.label){case 0:return n=t.conversationType,a=t.targetId,s=t.messageUId,_=t.senderUserId,c=t.sentTime,d=t.canIncludeExpansion,u=t.channelId,T=o.createTraceId(),o.info(qe.A_MODIFY_MESSAGE_T,JSON.stringify({conversationType:n,targetId:a,messageUId:s,channelId:u}),T),E={targetId:a,channelId:u,conversationType:n,fromUserId:_,sendTime:c,canIncludeExpansion:d,messageUId:s,content:e},[4,i.modifyMessage(E)];case 1:return S=A.sent().code,l=S===r.SUCCESS?"info":"warn",o[l](qe.A_MODIFY_MESSAGE_R,JSON.stringify({code:S}),T),S===r.SUCCESS?[2,{code:r.SUCCESS}]:[2,{code:S,msg:vt[S]}]}}))}))}))]}))}))}function cn(e,t){return Z(this,void 0,void 0,(function(){var n=this;return $(this,(function(i){return[2,new v(qe.A_GET_ULTRA_GROUP_UNREAD_MENTIONED_COUNT_BY_TARGET_ID_T,qe.A_GET_ULTRA_GROUP_UNREAD_MENTIONED_COUNT_BY_TARGET_ID_T).validate("targetId",e,T.STRING,!0).validate("notificationLevels",t,T.ARRAY).validate("notificationLevels",t,(function(e){return!(null==t?void 0:t.some((function(e){return!O(e)})))})).ifReady((function(i,o){return Z(n,void 0,void 0,(function(){var n,a,s,_;return $(this,(function(c){switch(c.label){case 0:return n=o.createTraceId(),o.info(qe.A_GET_ULTRA_GROUP_UNREAD_MENTIONED_COUNT_BY_TARGET_ID_T,JSON.stringify({targetId:e,notificationLevels:t}),n),[4,i.getUltraGroupUnreadMentionedCountByTargetId(e,t)];case 1:return a=c.sent(),s=a.code,_=a.data,s===r.SUCCESS?(o.info(qe.A_GET_ULTRA_GROUP_UNREAD_MENTIONED_COUNT_BY_TARGET_ID_R,JSON.stringify({code:s,data:_}),e),[2,{code:r.SUCCESS,data:_}]):(o.warn(qe.A_GET_ULTRA_GROUP_UNREAD_MENTIONED_COUNT_BY_TARGET_ID_R,JSON.stringify({code:s}),n),[2,{code:s,msg:vt[s]}])}}))}))}))]}))}))}function dn(e){return Z(this,void 0,void 0,(function(){var t=this;return $(this,(function(n){return[2,new v(qe.A_GET_ULTRA_GROUP_DEFAULT_NOTIFICATION_LEVEL_T,qe.A_GET_ULTRA_GROUP_DEFAULT_NOTIFICATION_LEVEL_R).validate("targetId",null==e?void 0:e.targetId,T.STRING,!0).validate("channelId",null==e?void 0:e.channelId,T.CHANNEL_ID).ifReady((function(n,i){return Z(t,void 0,void 0,(function(){var t,o,a,s;return $(this,(function(_){switch(_.label){case 0:return t=i.createTraceId(),i.info(qe.A_GET_ULTRA_GROUP_DEFAULT_NOTIFICATION_LEVEL_T,JSON.stringify({targetId:e.targetId,channelId:e.channelId}),t),[4,n.getUltraGroupDefaultNotificationLevel(e.targetId,e.channelId)];case 1:return o=_.sent(),a=o.code,s=o.data,a===r.SUCCESS?(i.info(qe.A_GET_ULTRA_GROUP_DEFAULT_NOTIFICATION_LEVEL_R,JSON.stringify({code:a,data:s}),t),[2,{code:a,data:s}]):(i.warn(qe.A_GET_ULTRA_GROUP_DEFAULT_NOTIFICATION_LEVEL_R,JSON.stringify({code:a}),t),[2,{code:a,msg:vt[a]}])}}))}))}))]}))}))}function un(e,t){return Z(this,void 0,void 0,(function(){var n=this;return $(this,(function(i){return e.channelId=e.channelId||"",[2,new v(qe.A_SET_ULTRA_GROUP_DEFAULT_NOTIFICATION_LEVEL_T,qe.A_SET_ULTRA_GROUP_DEFAULT_NOTIFICATION_LEVEL_R).validate("targetId",null==e?void 0:e.targetId,T.STRING,!0).validate("channelId",null==e?void 0:e.channelId,T.CHANNEL_ID).validate("notificationLevel",t,(function(e){return void 0!==N[e]}),!0).ifReady((function(i,o){return Z(n,void 0,void 0,(function(){var n,a,s;return $(this,(function(_){switch(_.label){case 0:return n=o.createTraceId(),o.info(qe.A_SET_ULTRA_GROUP_DEFAULT_NOTIFICATION_LEVEL_T,JSON.stringify({targetId:e.targetId,channelId:e.channelId,notificationLevel:t}),n),[4,i.setUltraGroupDefaultNotificationLevel(e.targetId,t,e.channelId)];case 1:return a=_.sent().code,s=a===r.SUCCESS?"info":"warn",o[s](qe.A_SET_ULTRA_GROUP_DEFAULT_NOTIFICATION_LEVEL_R,JSON.stringify({code:a}),n),a===r.SUCCESS?[2,{code:a}]:[2,{code:a,msg:vt[a]}]}}))}))}))]}))}))}function Tn(e,t){return Z(this,void 0,void 0,(function(){var n=this;return $(this,(function(i){return[2,new v(qe.A_GET_ULTRA_GROUP_UNREAD_COUNT_BY_TARGET_ID_T,qe.A_GET_ULTRA_GROUP_UNREAD_COUNT_BY_TARGET_ID_R).validate("targetId",e,T.STRING,!0).validate("notificationLevels",t,T.ARRAY).validate("notificationLevels",t,(function(e){return!(null==t?void 0:t.some((function(e){return!O(e)})))})).ifReady((function(i,o){return Z(n,void 0,void 0,(function(){var n,a,s,_,c;return $(this,(function(d){switch(d.label){case 0:return n=o.createTraceId(),o.info(qe.A_GET_ULTRA_GROUP_UNREAD_COUNT_BY_TARGET_ID_T,JSON.stringify({targetId:e,notificationLevels:t}),n),[4,i.getUltraGroupUnreadCountByTargetId(e,t)];case 1:return a=d.sent(),s=a.code,_=a.data,c=s===r.SUCCESS?"info":"warn",o[c](qe.A_GET_ULTRA_GROUP_UNREAD_COUNT_BY_TARGET_ID_R,JSON.stringify({code:s,data:_}),n),[2,{code:s,data:_}]}}))}))}))]}))}))}function En(){return Z(this,void 0,void 0,(function(){var e=this;return $(this,(function(t){return[2,new v(qe.A_GET_ALL_ULTRA_GROUP_UNREAD_COUNT_T,qe.A_GET_ALL_ULTRA_GROUP_UNREAD_COUNT_R).ifReady((function(t,n){return Z(e,void 0,void 0,(function(){var e,i,o,a,s;return $(this,(function(_){switch(_.label){case 0:return e=n.createTraceId(),n.info(qe.A_GET_ALL_ULTRA_GROUP_UNREAD_COUNT_T,"getAllUltraGroupUnreadCount",e),[4,t.getAllUltraGroupUnreadCount()];case 1:return i=_.sent(),o=i.code,a=i.data,s=o===r.SUCCESS?"info":"warn",n[s](qe.A_GET_ALL_ULTRA_GROUP_UNREAD_COUNT_R,JSON.stringify({code:o,data:a}),e),o===r.SUCCESS?[2,{code:o,data:a}]:[2,{code:o,msg:vt[o]}]}}))}))}))]}))}))}function Sn(){return Z(this,void 0,void 0,(function(){var e=this;return $(this,(function(t){return[2,new v(qe.A_GET_ALL_ULTRA_GROUP_UNREAD_MENTIONED_COUNT_T,qe.A_GET_ALL_ULTRA_GROUP_UNREAD_MENTIONED_COUNT_R).ifReady((function(t,n){return Z(e,void 0,void 0,(function(){var e,i,o,a,s;return $(this,(function(_){switch(_.label){case 0:return e=n.createTraceId(),n.info(qe.A_GET_ALL_ULTRA_GROUP_UNREAD_MENTIONED_COUNT_T,"getAllUltraGroupUnreadCount",e),[4,t.getAllUltraGroupUnreadCount(true)];case 1:return i=_.sent(),o=i.code,a=i.data,s=o===r.SUCCESS?"info":"warn",n[s](qe.A_GET_ALL_ULTRA_GROUP_UNREAD_MENTIONED_COUNT_R,JSON.stringify({code:o,data:a}),e),o===r.SUCCESS?[2,{code:o,data:a}]:[2,{code:o,msg:vt[o]}]}}))}))}))]}))}))}function ln(e){return Z(this,void 0,void 0,(function(){var t=this;return $(this,(function(n){return e.channelId=e.channelId||"",[2,new v(qe.A_GET_ULTRA_GROUP_UNREAD_MENTIONED_MESSAGES_T,qe.A_GET_ULTRA_GROUP_UNREAD_MENTIONED_MESSAGES_R).validate("targetId",null==e?void 0:e.targetId,T.STRING,!0).validate("channelId",null==e?void 0:e.channelId,T.CHANNEL_ID).validate("sentTime",null==e?void 0:e.sentTime,T.NUMBER,!0).validate("count",null==e?void 0:e.count,(function(e){return C(e)&&e>0&&e<=50}),!0).ifReady((function(n,i){return Z(t,void 0,void 0,(function(){var t,o,a,s,_,c,d,u,T;return $(this,(function(E){switch(E.label){case 0:return t=e.targetId,o=e.channelId,a=e.sentTime,s=e.count,_={targetId:t,channelId:o,sentTime:a,count:s},c=i.createTraceId(),i.info(qe.A_GET_ULTRA_GROUP_UNREAD_MENTIONED_MESSAGES_T,JSON.stringify(_),c),[4,n.getUltraGroupUnreadMentionedMessages(_)];case 1:return d=E.sent(),u=d.code,T=d.data,u===r.SUCCESS?(i.info(qe.A_GET_ULTRA_GROUP_UNREAD_MENTIONED_MESSAGES_R,JSON.stringify({code:u,data:null==T?void 0:T.map((function(e){return e.messageUId}))}),c),[2,{code:u,data:T}]):(i.warn(qe.A_GET_ULTRA_GROUP_UNREAD_MENTIONED_MESSAGES_R,JSON.stringify({code:u}),c),[2,{code:u,msg:vt[u]}])}}))}))}))]}))}))}function An(e){return Z(this,void 0,void 0,(function(){var t=this;return $(this,(function(n){return[2,new v(qe.A_GET_ULTRA_GROUP_UNREAD_MENTIONED_MESSAGES_T,qe.A_GET_ULTRA_GROUP_UNREAD_MENTIONED_MESSAGES_R).validate("targetId",null==e?void 0:e.targetId,T.STRING,!0).validate("channelId",null==e?void 0:e.channelId,T.CHANNEL_ID,!0).ifReady((function(n,i){return Z(t,void 0,void 0,(function(){var t,o,a,s,_,c,d;return $(this,(function(u){switch(u.label){case 0:return t=e.targetId,o=e.channelId,a={targetId:t,channelId:o},s=i.createTraceId(),i.info(qe.A_GET_ULTRA_GROUP_FIRST_UNREAD_MESSAGE_TIMESTAMP_T,JSON.stringify(a),s),[4,n.getUltraGroupFirstUnreadMessageTimestamp(a)];case 1:return _=u.sent(),c=_.code,d=_.data,c===r.SUCCESS?(i.info(qe.A_GET_ULTRA_GROUP_FIRST_UNREAD_MESSAGE_TIMESTAMP_R,JSON.stringify({code:c,sentTime:null==d?void 0:d.sentTime}),s),[2,{code:c,data:d}]):(i.warn(qe.A_GET_ULTRA_GROUP_FIRST_UNREAD_MESSAGE_TIMESTAMP_R,JSON.stringify({code:c}),s),[2,{code:c,msg:vt[c]}])}}))}))}))]}))}))}function Rn(e){return Z(this,void 0,void 0,(function(){var t=this;return $(this,(function(n){return[2,new v(qe.A_GET_ULTRA_GROUP_UNREAD_INFO_LIST_T,qe.A_GET_ULTRA_GROUP_UNREAD_INFO_LIST_R).validate("targetIds",e,(function(t){return!!f("targetIds",e,T.ARRAY,!0)&&(!(t.length<=0||t.length>20)&&!e.some((function(e){return!h(e)})))})).ifReady((function(n,i){return Z(t,void 0,void 0,(function(){var t,o,a,s,_,c;return $(this,(function(d){switch(d.label){case 0:return t=e.filter((function(t,n){return e.indexOf(t)===n})),o=i.createTraceId(),i.info(qe.A_GET_ULTRA_GROUP_UNREAD_INFO_LIST_T,JSON.stringify({targetIds:e}),o),[4,n.getUltraGroupUnreadInfoList(t)];case 1:return a=d.sent(),s=a.code,_=a.data,c=s===r.SUCCESS?"info":"warn",i[c](qe.A_GET_ULTRA_GROUP_UNREAD_INFO_LIST_R,JSON.stringify({code:s}),o),s===r.SUCCESS?[2,{code:s,data:_}]:[2,{code:s,msg:vt[s]}]}}))}))}))]}))}))}function vn(e,t){return Z(this,void 0,void 0,(function(){var n=this;return $(this,(function(i){return[2,new v(A.A_JOIN_CHATROOM_T,A.A_JOIN_CHATROOM_R).validate("targetId",e,T.STRING,!0).validate("count",t,T.OBJECT,!0).validate("count",null==t?void 0:t.count,T.NUMBER,!0).validate("extra",null==t?void 0:t.extra,T.ONLY_STRING,!1).ifReady((function(i,o){return Z(n,void 0,void 0,(function(){var n,a,s;return $(this,(function(_){switch(_.label){case 0:return n=o.createTraceId(),o.info(A.A_JOIN_CHATROOM_T,JSON.stringify({chatroomId:e,count:t.count,joinExist:!1}),n),[4,i.joinChatroom(e,t.count,n,t.extra)];case 1:return a=_.sent(),s=a===r.SUCCESS?"info":"warn",o[s](A.A_JOIN_CHATROOM_R,JSON.stringify({code:a,timestamp:(new Date).getTime()}),n),a!==r.SUCCESS?[2,{code:a,msg:vt[a]}]:[2,{code:a}]}}))}))}))]}))}))}function fn(e,t){return Z(this,void 0,void 0,(function(){var n=this;return $(this,(function(i){return[2,new v(A.A_JOIN_CHATROOM_T,A.A_JOIN_CHATROOM_R).validate("targetId",e,T.STRING,!0).validate("count",null==t?void 0:t.count,T.NUMBER,!0).validate("extra",null==t?void 0:t.extra,T.ONLY_STRING,!1).ifReady((function(i,o){return Z(n,void 0,void 0,(function(){var n,a,s,_,c;return $(this,(function(d){switch(d.label){case 0:return n=o.createTraceId(),o.info(A.A_JOIN_CHATROOM_T,JSON.stringify({chatroomId:e,count:t.count,joinExist:!0}),n),[4,i.joinExistChatroom(e,t.count,n,t.extra)];case 1:return a=d.sent(),s=a.code,_=a.data,c=s===r.SUCCESS?"info":"warn",o[c](A.A_JOIN_CHATROOM_R,JSON.stringify({code:s,timestamp:(new Date).getTime()}),n),s!==r.SUCCESS?[2,{code:s,msg:vt[s]}]:[2,{code:s,data:_}]}}))}))}))]}))}))}function In(e){return Z(this,void 0,void 0,(function(){var t=this;return $(this,(function(n){return[2,new v(A.A_QUIT_CHATROOM_T,A.A_QUIT_CHATROOM_R).validate("targetId",e,T.STRING,!0).ifReady((function(n,i){return Z(t,void 0,void 0,(function(){var t,o,a;return $(this,(function(s){switch(s.label){case 0:return t=i.createTraceId(),i.info(A.A_QUIT_CHATROOM_T,JSON.stringify({chatroomId:e}),t),[4,n.quitChatroom(e)];case 1:return o=s.sent(),a=o===r.SUCCESS?"info":"warn",i[a](A.A_QUIT_CHATROOM_R,JSON.stringify({code:o}),t),o!==r.SUCCESS?[2,{code:o,msg:vt[o]}]:[2,{code:o}]}}))}))}))]}))}))}function On(e,t){return Z(this,void 0,void 0,(function(){var n=this;return $(this,(function(i){return[2,new v(A.A_QUIT_CHATROOM_T,A.A_QUIT_CHATROOM_R).validate("targetId",e,T.STRING,!0).validate("count",null==t?void 0:t.count,T.NUMBER).validate("order",null==t?void 0:t.order,(function(e){return[0,1,2].includes(e)})).ifReady((function(i,o){return Z(n,void 0,void 0,(function(){var n,a,s,_,c;return $(this,(function(d){switch(d.label){case 0:return n=o.createTraceId(),o.info(qe.A_GET_CHATROOM_INFO_T,JSON.stringify({chatroomId:e,count:null==t?void 0:t.count,order:null==t?void 0:t.order}),n),[4,i.getChatroomInfo(e,null==t?void 0:t.count,null==t?void 0:t.order)];case 1:return a=d.sent(),s=a.code,_=a.data,c=s===r.SUCCESS?"info":"warn",o[c](qe.A_GET_CHATROOM_INFO_R,JSON.stringify({code:s}),n),s===r.SUCCESS&&_?[2,{code:s,data:_}]:[2,{code:s,msg:vt[s]}]}}))}))}))]}))}))}function Nn(e,t){return Z(this,void 0,void 0,(function(){var n=this;return $(this,(function(i){return[2,new v(qe.A_SET_CHATROOM_ENTRY_T,qe.A_SET_CHATROOM_ENTRY_R).validate("targetId",e,T.STRING,!0).validate("key",null==t?void 0:t.key,T.STRING,!0).validate("value",null==t?void 0:t.value,T.STRING,!0).validate("isAutoDelete",null==t?void 0:t.isAutoDelete,T.BOOLEAN).validate("isSendNotification",null==t?void 0:t.isSendNotification,T.BOOLEAN).validate("notificationExtra",null==t?void 0:t.notificationExtra,m({maxLength:U})).ifReady((function(i,o){return Z(n,void 0,void 0,(function(){var n,a,s;return $(this,(function(_){switch(_.label){case 0:return n=o.createTraceId(),o.info(qe.A_SET_CHATROOM_ENTRY_T,JSON.stringify({chatroomId:e,key:t.key,value:t.value,isSendNotification:t.isSendNotification,isAutoDelete:t.isAutoDelete,notificationExtra:t.notificationExtra}),n),[4,i.setChatroomEntry(e,t)];case 1:return a=_.sent(),s=a===r.SUCCESS?"info":"warn",o[s](qe.A_SET_CHATROOM_ENTRY_R,JSON.stringify({code:a}),n),a!==r.SUCCESS?[2,{code:a,msg:vt[a]}]:[2,{code:a}]}}))}))}))]}))}))}function gn(e,t){return Z(this,void 0,void 0,(function(){var n=this;return $(this,(function(i){return[2,new v(qe.A_SET_CHATROOM_ENTRIES_T,qe.A_SET_CHATROOM_ENTRIES_R).validate("targetId",e,T.STRING,!0).validate("entries",null==t?void 0:t.entries,(function(e){return!!f("entry.key",e,T.ARRAY,!0)&&t.entries.every((function(e){return f("entry.key",e.key,T.STRING,!0)&&f("entry.value",e.value,T.STRING,!0)}))}),!0).validate("isAutoDelete",null==t?void 0:t.isAutoDelete,T.BOOLEAN).validate("isForce",null==t?void 0:t.isForce,T.BOOLEAN).validate("notificationExtra",null==t?void 0:t.notificationExtra,m({maxLength:U})).ifReady((function(i,o){return Z(n,void 0,void 0,(function(){var n,a,s,_,c;return $(this,(function(d){switch(d.label){case 0:return t.entries.length>10?[2,Rt.CHATROOM_KV_STORE_OUT_LIMIT]:(n=o.createTraceId(),o.info(qe.A_SET_CHATROOM_ENTRIES_T,JSON.stringify({chatroomId:e,entries:t.entries.map((function(e){return{key:e.key,value:e.value}})),isAutoDelete:t.isAutoDelete,notificationExtra:t.notificationExtra,isForce:t.isForce}),n),[4,i.setChatroomEntries(e,t)]);case 1:return a=d.sent(),s=a.code,_=a.data,c=s===r.SUCCESS?"info":"warn",o[c](qe.A_SET_CHATROOM_ENTRIES_R,JSON.stringify({code:s}),n),s!==r.SUCCESS?[2,{code:s,msg:vt[s],data:_}]:[2,{code:s}]}}))}))}))]}))}))}function Cn(e,t){return Z(this,void 0,void 0,(function(){var n=this;return $(this,(function(i){return[2,new v(qe.A_FORCE_SET_CHATROOM_ENTRY_T,qe.A_FORCE_SET_CHATROOM_ENTRY_R).validate("targetId",e,T.STRING,!0).validate("key",null==t?void 0:t.key,T.STRING,!0).validate("value",null==t?void 0:t.value,T.STRING,!0).validate("isAutoDelete",null==t?void 0:t.isAutoDelete,T.BOOLEAN).validate("isSendNotification",null==t?void 0:t.isSendNotification,T.BOOLEAN).validate("notificationExtra",null==t?void 0:t.notificationExtra,m({maxLength:U})).ifReady((function(i,o){return Z(n,void 0,void 0,(function(){var n,a,s;return $(this,(function(_){switch(_.label){case 0:return n=o.createTraceId(),o.info(qe.A_FORCE_SET_CHATROOM_ENTRY_T,JSON.stringify({chatroomId:e,key:t.key,value:t.value,isSendNotification:t.isSendNotification,isAutoDelete:t.isAutoDelete,notificationExtra:t.notificationExtra}),n),[4,i.forceSetChatroomEntry(e,t)];case 1:return a=_.sent(),s=a===r.SUCCESS?"info":"warn",o[s](qe.A_FORCE_SET_CHATROOM_ENTRY_R,JSON.stringify({code:a}),n),a!==r.SUCCESS?[2,{code:a,msg:vt[a]}]:[2,{code:a}]}}))}))}))]}))}))}function hn(e,t){return Z(this,void 0,void 0,(function(){var n=this;return $(this,(function(i){return[2,new v(qe.A_REMOVE_CHATROOM_ENTRY_T,qe.A_REMOVE_CHATROOM_ENTRY_R).validate("targetId",e,T.STRING,!0).validate("key",null==t?void 0:t.key,T.STRING,!0).validate("isSendNotification",null==t?void 0:t.isSendNotification,T.BOOLEAN).validate("notificationExtra",null==t?void 0:t.notificationExtra,m({maxLength:U})).ifReady((function(i,o){return Z(n,void 0,void 0,(function(){var n,a,s;return $(this,(function(_){switch(_.label){case 0:return n=o.createTraceId(),o.info(qe.A_REMOVE_CHATROOM_ENTRY_T,JSON.stringify({chatroomId:e,key:t.key,isSendNotification:t.isSendNotification,notificationExtra:t.notificationExtra}),n),[4,i.removeChatroomEntry(e,t)];case 1:return a=_.sent(),s=a===r.SUCCESS?"info":"warn",o[s](qe.A_REMOVE_CHATROOM_ENTRY_R,JSON.stringify({code:a}),n),a!==r.SUCCESS?[2,{code:a,msg:vt[a]}]:[2,{code:a}]}}))}))}))]}))}))}function mn(e,t){return Z(this,void 0,void 0,(function(){var n=this;return $(this,(function(i){return[2,new v(qe.A_REMOVE_CHATROOM_ENTRIES_T,qe.A_REMOVE_CHATROOM_ENTRIES_R).validate("targetId",e,T.STRING,!0).validate("entries",null==t?void 0:t.entries,(function(e){return!!f("entry.key",e,T.ARRAY,!0)&&t.entries.every((function(e){return f("key",e,T.STRING,!0)}))}),!0).validate("notificationExtra",null==t?void 0:t.notificationExtra,m({maxLength:U})).ifReady((function(i,o){return Z(n,void 0,void 0,(function(){var n,a,s,_,c,d;return $(this,(function(u){switch(u.label){case 0:return n=t.entries.map((function(e){return{key:e}})),a=o.createTraceId(),o.info(qe.A_REMOVE_CHATROOM_ENTRIES_T,JSON.stringify({chatroomId:e,notificationExtra:t.notificationExtra,entries:n}),a),[4,i.removeChatroomEntries(e,{entries:n,notificationExtra:t.notificationExtra})];case 1:return s=u.sent(),_=s.code,c=s.data,d=_===r.SUCCESS?"info":"warn",o[d](qe.A_REMOVE_CHATROOM_ENTRIES_R,JSON.stringify({code:_}),a),_!==r.SUCCESS?[2,{code:_,msg:vt[_],data:c}]:[2,{code:_}]}}))}))}))]}))}))}function Un(e,t){return Z(this,void 0,void 0,(function(){var n=this;return $(this,(function(i){return[2,new v(qe.A_FORCE_REMOVE_CHATROOM_ENTRY_T,qe.A_FORCE_REMOVE_CHATROOM_ENTRY_R).validate("targetId",e,T.STRING,!0).validate("key",null==t?void 0:t.key,T.STRING,!0).validate("isSendNotification",null==t?void 0:t.isSendNotification,T.BOOLEAN).validate("notificationExtra",null==t?void 0:t.notificationExtra,m({maxLength:U})).ifReady((function(i,o){return Z(n,void 0,void 0,(function(){var n,a,s;return $(this,(function(_){switch(_.label){case 0:return n=o.createTraceId(),o.info(qe.A_FORCE_REMOVE_CHATROOM_ENTRY_T,JSON.stringify({chatroomId:e,key:t.key,isSendNotification:t.isSendNotification,notificationExtra:t.notificationExtra}),n),[4,i.forceRemoveChatroomEntry(e,t)];case 1:return a=_.sent(),s=a===r.SUCCESS?"info":"warn",o[s](qe.A_FORCE_REMOVE_CHATROOM_ENTRY_R,JSON.stringify({code:a}),n),a!==r.SUCCESS?[2,{code:a,msg:vt[a]}]:[2,{code:a}]}}))}))}))]}))}))}function pn(e,t){return Z(this,void 0,void 0,(function(){var n=this;return $(this,(function(i){return[2,new v(qe.A_GET_CHATROOM_ENTRY_T,qe.A_GET_CHATROOM_ENTRY_R).validate("targetId",e,T.STRING,!0).validate("key",t,(function(e){return h(e)&&/[\w+=-]+/.test(e)&&e.length<=128}),!0).ifReady((function(i,o){return Z(n,void 0,void 0,(function(){var n,a,s,_;return $(this,(function(c){switch(c.label){case 0:return n=o.createTraceId(),o.info(qe.A_GET_CHATROOM_ENTRY_T,JSON.stringify({chatroomId:e,key:t}),n),[4,i.getChatroomEntry(e,t)];case 1:return a=c.sent(),s=a.code,_=a.data,s===r.SUCCESS&&_?(o.info(qe.A_GET_CHATROOM_ENTRY_R,JSON.stringify({code:s,data:_}),n),[2,{code:s,data:_}]):(o.warn(qe.A_GET_CHATROOM_ENTRY_R,JSON.stringify({code:s}),n),[2,{code:s,msg:vt[s]}])}}))}))}))]}))}))}function yn(e){return Z(this,void 0,void 0,(function(){var t=this;return $(this,(function(n){return[2,new v(qe.A_GET_ALL_CHATROOM_ENTRIES_T,qe.A_GET_ALL_CHATROOM_ENTRIES_R).validate("targetId",e,T.STRING,!0).ifReady((function(n,i){return Z(t,void 0,void 0,(function(){var t,o,a,s;return $(this,(function(_){switch(_.label){case 0:return t=i.createTraceId(),i.info(qe.A_GET_ALL_CHATROOM_ENTRIES_T,JSON.stringify({chatroomId:e}),t),[4,n.getAllChatroomEntries(e)];case 1:return o=_.sent(),a=o.code,s=o.data,a===r.SUCCESS&&s?(i.info(qe.A_GET_ALL_CHATROOM_ENTRIES_R,JSON.stringify({code:a,data:s}),t),[2,{code:a,data:s}]):(i.warn(qe.A_GET_ALL_CHATROOM_ENTRIES_R,JSON.stringify({code:a}),t),[2,{code:a,msg:vt[a]}])}}))}))}))]}))}))}function Gn(e,t){return Z(this,void 0,void 0,(function(){var n=this;return $(this,(function(i){return[2,new v(qe.A_GET_CHATROOM_HISTORY_MESSAGES_T,qe.A_GET_CHATROOM_HISTORY_MESSAGES_R).validate("targetId",e,T.STRING,!0).validate("timestamp",null==t?void 0:t.timestamp,T.NUMBER).validate("count",null==t?void 0:t.count,T.NUMBER).validate("count",null==t?void 0:t.count,(function(e){var t=e>0&&e<=100;return t||null===console||void 0===console||console.error('"options.count" is invalid, It should be greater than 0 and less than 100'),t})).validate("order",null==t?void 0:t.order,(function(e){return 0===e||1===e})).ifReady((function(i,o){return Z(n,void 0,void 0,(function(){var n,a,s,_,c,d;return $(this,(function(u){switch(u.label){case 0:return n=o.createTraceId(),o.info(qe.A_GET_CHATROOM_HISTORY_MESSAGES_T,JSON.stringify({chatroomId:e,timestamp:t.timestamp,count:t.count,order:t.order}),n),[4,i.getChatRoomHistoryMessages(e,t.count,t.order,t.timestamp)];case 1:return a=u.sent(),s=a.code,_=a.data,s===r.SUCCESS&&_?(c=[],d=_.list.map((function(e){return c.push(e.messageUId),xe(e)})),o.info(qe.A_GET_CHATROOM_HISTORY_MESSAGES_R,JSON.stringify({code:s,data:c}),n),[2,{code:s,data:{list:d,hasMore:!!_.hasMore}}]):(o.warn(qe.A_GET_CHATROOM_HISTORY_MESSAGES_R,JSON.stringify({code:s}),n),[2,{code:s,msg:vt[s]}])}}))}))}))]}))}))}function Mn(e){return Z(this,void 0,void 0,(function(){var t=this;return $(this,(function(n){return[2,new v(qe.A_BIND_RTC_ROOM_FOR_CHATROOM_T,qe.A_BIND_RTC_ROOM_FOR_CHATROOM_R).validate("targetId",null==e?void 0:e.chatRoomId,T.STRING,!0).validate("rtcRoomId",null==e?void 0:e.rtcRoomId,T.STRING,!0).ifReady((function(n,i){return Z(t,void 0,void 0,(function(){var t,o,a;return $(this,(function(s){switch(s.label){case 0:return t=i.createTraceId(),i.info(qe.A_BIND_RTC_ROOM_FOR_CHATROOM_T,JSON.stringify({chatRoomId:e.chatRoomId,rtcRoomId:e.rtcRoomId}),t),[4,n.bindRTCRoomForChatroom(e)];case 1:return o=s.sent(),a=o===r.SUCCESS?"info":"warn",i[a](qe.A_BIND_RTC_ROOM_FOR_CHATROOM_R,JSON.stringify({code:o}),t),[2,{code:o,msg:vt[o]}]}}))}))}))]}))}))}function Ln(e){return Z(this,void 0,void 0,(function(){var t=this;return $(this,(function(n){return[2,new v(qe.A_ADD_TO_BLACKLIST_T,qe.A_ADD_TO_BLACKLIST_R).validate("userId",e,T.STRING,!0).ifReady((function(n,i){return Z(t,void 0,void 0,(function(){var t,o,a;return $(this,(function(s){switch(s.label){case 0:return t=i.createTraceId(),i.info(qe.A_ADD_TO_BLACKLIST_T,JSON.stringify({userId:e}),t),[4,n.addToBlacklist(e)];case 1:return o=s.sent(),a=o===r.SUCCESS?"info":"warn",i[a](qe.A_ADD_TO_BLACKLIST_R,JSON.stringify({code:o}),t),[2,{code:o}]}}))}))}))]}))}))}function Pn(e){return Z(this,void 0,void 0,(function(){var t=this;return $(this,(function(n){return[2,new v(qe.A_REMOVE_FROM_BLACKLIST_T,qe.A_REMOVE_FROM_BLACKLIST_R).validate("userId",e,T.STRING,!0).ifReady((function(n,i){return Z(t,void 0,void 0,(function(){var t,o,a;return $(this,(function(s){switch(s.label){case 0:return t=i.createTraceId(),i.info(qe.A_REMOVE_FROM_BLACKLIST_T,JSON.stringify({userId:e}),t),[4,n.removeFromBlacklist(e)];case 1:return o=s.sent(),a=o===r.SUCCESS?"info":"warn",i[a](qe.A_REMOVE_FROM_BLACKLIST_R,JSON.stringify({code:o}),t),[2,{code:o}]}}))}))}))]}))}))}function Dn(){return Z(this,void 0,void 0,(function(){var e=this;return $(this,(function(t){return[2,new v(qe.A_GET_BLACKLIST_T,qe.A_GET_BLACKLIST_R).ifReady((function(t,n){return Z(e,void 0,void 0,(function(){var e,i,o,a;return $(this,(function(s){switch(s.label){case 0:return e=n.createTraceId(),n.info(qe.A_GET_BLACKLIST_T,"getBlacklist -> ",e),[4,t.getBlacklist()];case 1:return i=s.sent(),o=i.code,a=i.data,o===r.SUCCESS&&a?(n.info(qe.A_GET_BLACKLIST_R,JSON.stringify({code:o,data:a}),e),[2,{code:o,data:a}]):(n.warn(qe.A_GET_BLACKLIST_R,JSON.stringify({code:o}),e),[2,{code:o}])}}))}))}))]}))}))}function wn(e){return Z(this,void 0,void 0,(function(){var t=this;return $(this,(function(n){return[2,new v(qe.A_GET_BLACKLIST_STATUS_T,qe.A_GET_BLACKLIST_STATUS_R).validate("userId",e,T.STRING,!0).ifReady((function(n,i){return Z(t,void 0,void 0,(function(){var t,o,a,s;return $(this,(function(_){switch(_.label){case 0:return t=i.createTraceId(),i.info(qe.A_GET_BLACKLIST_STATUS_T,JSON.stringify({userId:e}),t),[4,n.getBlacklistStatus(e)];case 1:return o=_.sent(),a=o.code,s=o.data,a===r.SUCCESS?(i.info(qe.A_GET_BLACKLIST_STATUS_R,JSON.stringify({code:a,data:0===s}),t),[2,{code:a,data:0===s}]):(i.warn(qe.A_GET_BLACKLIST_STATUS_R,JSON.stringify({code:a}),t),[2,{code:a}])}}))}))}))]}))}))}var Bn=function(e,t,n,i){void 0===n&&(n=!0),void 0===i&&(i=!0),this.messageType=e,this.content=t,this.isPersited=n,this.isCounted=i};function Vn(e,t,n){void 0===t&&(t=!0),void 0===n&&(n=!0);return function(i){return new Bn(e,i,t,n)}}var bn,Jn=Vn("RC:ImgMsg"),Fn=Vn("RC:HQVCMsg"),Hn=Vn("RC:SightMsg"),Yn=Vn("RC:TxtMsg"),xn=Vn("RC:CombineMsg"),kn=Vn(p.COMBINE_V2),Kn=Vn("RC:FileMsg"),Xn=Vn("RC:GIFMsg"),qn=Vn("RC:VcMsg"),zn=Vn("RC:LBSMsg"),Wn=Vn("RC:ReferenceMsg"),jn=Vn("RC:ImgTextMsg"),Qn=Vn("RC:CmdMsg"),Zn=Vn("RC:InfoNtf"),$n=Vn("RC:GrpNtf");!function(e){e.ALIYUN="aliyun",e.S3="s3",e.STC="stc",e.MINIO="minio",e.QINIU="qiniu",e.BAIDU="baidu",e.RCX="rcx"}(bn||(bn={}));var ei=function(){function e(e,t,n){this.isSupportMultipart=!1,this._serverType=0,this._isAbort=!1,this._url=e,this._getFileToken=t,this._serverType=n}return e.prototype.isAbort=function(){return this._isAbort},e.prototype.abort=function(){this._isAbort=!0,this._abortHandler()},e.prototype.upload=function(e){return e.file.size>y?Promise.resolve({code:r.UPLOAD_FAIL,msg:"the file size is over 5GB!"}):e.file.size>G&&this.isSupportMultipart?this.multipartUpload(e):this.commonUpload(e)},e}();function ti(e){return e/1024||0}var ni,ii=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e._promise=null,e}return j(n,t),n.prototype.commonUpload=function(t){return Z(this,void 0,void 0,(function(){var n,i,o,a,s,_,c;return $(this,(function(d){switch(d.label){case 0:n=t.file,i=t.onProgress,o=t.fileType,d.label=1;case 1:return d.trys.push([1,3,,4]),[4,this._getFileToken(o,n.name,void 0,void 0,void 0,ti(n.size))];case 2:return a=d.sent(),[3,4];case 3:return[2,{code:d.sent()}];case 4:return s={},(_=new FormData).set("token",a.token),_.set("key",a.fileName),_.set("file",n),this._promise=e({url:L(this._url),headers:s,onProgress:function(e){return null==i?void 0:i(e.loaded,e.total)},method:"POST",body:_,timeout:0}),[4,this._promise.result()];case 5:return c=d.sent().status,this._promise=null,200===c||204===c?[2,{code:r.SUCCESS,data:{uniqueName:a.fileName,uploadMethod:M.QINIU}}]:[2,{code:r.UPLOAD_FAIL,msg:c.toString()}]}}))}))},n.prototype.multipartUpload=function(e){return Z(this,void 0,void 0,(function(){return $(this,(function(e){throw new Error("Method not implemented.")}))}))},n.prototype._abortHandler=function(){var e;null===(e=this._promise)||void 0===e||e.abort()},n}(ei),oi=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e._promise=null,e}return j(n,t),n.prototype.commonUpload=function(t){return Z(this,void 0,void 0,(function(){var n,i,o,a,s,_,c;return $(this,(function(d){switch(d.label){case 0:n=t.file,i=t.onProgress,o=t.fileType,d.label=1;case 1:return d.trys.push([1,3,,4]),[4,this._getFileToken(o,void 0,void 0,void 0,void 0,ti(n.size))];case 2:return a=d.sent(),[3,4];case 3:return[2,{code:d.sent()}];case 4:return s=L(a.ossBucketName+"."+this._url),(_=new FormData).set("token",a.token),_.set("OSSAccessKeyId",a.osskeyId),_.set("policy",a.ossPolicy),_.set("Signature",a.ossSign),_.set("success_action_status","200"),_.set("key",a.fileName),_.set("file",n),this._promise=e({url:s,onProgress:function(e){return null==i?void 0:i(e.loaded,e.total)},method:"POST",body:_,timeout:0}),[4,this._promise.result()];case 5:return c=d.sent().status,this._promise=null,200===c||204===c?[2,{code:r.SUCCESS,data:{uniqueName:a.fileName,uploadMethod:M.ALI}}]:[2,{code:r.UPLOAD_FAIL,msg:c.toString()}]}}))}))},n.prototype._abortHandler=function(){var e;null===(e=this._promise)||void 0===e||e.abort()},n.prototype.multipartUpload=function(e){throw new Error("Method not implemented.")},n}(ei),ri=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e._promise=null,e}return j(n,t),n.prototype.commonUpload=function(t){return Z(this,void 0,void 0,(function(){var n,i,o,a,s,_,c,d,u;return $(this,(function(T){switch(T.label){case 0:n=t.file,i=t.onProgress,o=t.fileType,a=t.contentDisposition,T.label=1;case 1:return T.trys.push([1,3,,4]),[4,this._getFileToken(o<=P.FILE?o:P.FILE)];case 2:return s=T.sent(),[3,4];case 3:return[2,{code:T.sent()}];case 4:return _=a||("text/html"===n.type?"inline":"attachment"),c={authorization:s.bosToken,"x-bce-date":s.bosDate,"Content-Disposition":_+"; filename="+encodeURIComponent(n.name)+";"},d=L(""+this._url+s.path),this._promise=e({url:d,headers:c,onProgress:function(e){return null==i?void 0:i(e.loaded,e.total)},method:"POST",body:n,timeout:0}),[4,this._promise.result()];case 5:return u=T.sent().status,this._promise=null,200===u||204===u?[2,{code:r.SUCCESS,data:{uniqueName:s.fileName,downloadUrl:d}}]:[2,{code:r.UPLOAD_FAIL,msg:u.toString()}]}}))}))},n.prototype.multipartUpload=function(e){throw new Error("Method not implemented.")},n.prototype._abortHandler=function(){var e;null===(e=this._promise)||void 0===e||e.abort()},n}(ei),ai=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e._promise=null,e.isSupportMultipart=!0,e}return j(n,t),n.prototype.commonUpload=function(t){return Z(this,void 0,void 0,(function(){var n,i,o,a,s,_,c;return $(this,(function(d){switch(d.label){case 0:n=t.file,i=t.onProgress,o=t.fileType,d.label=1;case 1:return d.trys.push([1,3,,4]),[4,this._getFileToken(o,void 0,void 0,void 0,void 0,ti(n.size))];case 2:return a=d.sent(),[3,4];case 3:return[2,{code:d.sent()}];case 4:return s=L(this._url+"/"+a.minioBucketName+"/"+a.fileName),_=this.getBaseHeaders(n,a,t),this._promise=e({url:s,headers:_,onProgress:function(e){return null==i?void 0:i(e.loaded,e.total)},method:"PUT",body:n,timeout:0}),[4,this._promise.result()];case 5:return c=d.sent().status,this._promise=null,200===c||204===c?[2,{code:r.SUCCESS,data:{uniqueName:a.fileName,uploadMethod:M.MINIO}}]:[2,{code:r.UPLOAD_FAIL,msg:c.toString()}]}}))}))},n.prototype.multipartUpload=function(t){var n;return Z(this,void 0,void 0,(function(){var i,o,a,s,_,c,d,u,T,E,S,l,A,R,v,f;return $(this,(function(I){switch(I.label){case 0:i=t.file,o=t.fileType,I.label=1;case 1:return I.trys.push([1,3,,4]),[4,this._getFileToken(o,i.name,"POST","uploads",void 0,ti(i.size))];case 2:return a=I.sent(),[3,4];case 3:return[2,{code:I.sent()}];case 4:return s=L(this._url+"/"+a.minioBucketName+"/"+a.fileName),_=this.getBaseHeaders(i,a,t),this._promise=e({url:s+"?uploads",headers:_,method:"POST"}),[4,this._promise.result()];case 5:return c=I.sent(),d=c.status,u=c.data,this._promise=null,T=null===(n=null==u?void 0:u.match(/(?:<UploadId>)(\S*?)(?:<\/UploadId>)/))||void 0===n?void 0:n[1],200!==d&&204!==d||!T?[2,{code:r.UPLOAD_FAIL,msg:"start upload fail"}]:(E=[],[4,this.requestUploadPart(s,i,T,a.fileName,t,E)]);case 6:if(S=I.sent(),l=S.code,A=S.msg,l!==r.SUCCESS)return[2,{code:l,msg:A}];I.label=7;case 7:return I.trys.push([7,9,,10]),[4,this._getFileToken(o,a.fileName,"POST","uploadId="+T,void 0,ti(i.size))];case 8:return a=I.sent(),[3,10];case 9:return[2,{code:I.sent()}];case 10:return R=E.map((function(e,t){return"<Part><PartNumber>"+(t+1)+"</PartNumber><ETag>"+e+"</ETag></Part>"})).join(""),R="<CompleteMultipartUpload xmlns='http://s3.amazonaws.com/doc/2006-03-01/'>"+R+"</CompleteMultipartUpload>",v=this.getBaseHeaders(i,a,t),this._promise=e({url:s+"?uploadId="+T,headers:v,method:"POST",body:R,timeout:0}),[4,this._promise.result()];case 11:return f=I.sent().status,this._promise=null,200===f||204===f?[2,{code:r.SUCCESS,data:{uniqueName:a.fileName,uploadMethod:M.MINIO}}]:[2,{code:r.UPLOAD_FAIL,msg:"end upload fail"}]}}))}))},n.prototype.requestUploadPart=function(t,n,i,o,a,s,_,c){return void 0===_&&(_=1),void 0===c&&(c=0),Z(this,void 0,void 0,(function(){var d,u,T,E,S,l,A,R,v;return $(this,(function(f){switch(f.label){case 0:if(c>=5)return[2,{code:r.UPLOAD_FAIL,msg:"Upload retry times exceeded 5. Procedure"}];d=(_-1)*G,u=Math.min(G,n.size-d),T="partNumber="+_+"&uploadId="+i,f.label=1;case 1:return f.trys.push([1,3,,4]),[4,this._getFileToken(a.fileType,o,"PUT",T,void 0,ti(n.size))];case 2:return E=f.sent(),[3,4];case 3:return[2,{code:f.sent()}];case 4:return S=n.slice(d,_*G),l=this.getBaseHeaders(n,E,a),this._promise=e({url:t+"?"+T,headers:l,method:"PUT",body:S,timeout:0,onProgress:function(e){var t;return null===(t=null==a?void 0:a.onProgress)||void 0===t?void 0:t.call(a,d+e.loaded,n.size)}}),[4,this._promise.result()];case 5:return A=f.sent(),R=A.status,v=A.xhr,this._promise=null,200===R||204===R?(s.push((null==v?void 0:v.getResponseHeader("ETag"))||""),d+u<n.size?[2,this.requestUploadPart(t,n,i,o,a,s,_+1,0)]:[2,{code:r.SUCCESS}]):[2,this.requestUploadPart(t,n,i,o,a,s,_,c+1)]}}))}))},n.prototype.getBaseHeaders=function(e,t,n){return{"Content-Disposition":(n.contentDisposition||("text/html"===e.type?"inline":"attachment"))+"; filename="+encodeURIComponent(e.name)+";",Authorization:t.minioAuthorization,"x-amz-content-sha256":t.minioContentSha256,"x-amz-date":t.minioDate,"Content-Type":e.type||"text/plain"}},n.prototype._abortHandler=function(){var e;null===(e=this._promise)||void 0===e||e.abort()},n}(ei),si=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e.isSupportMultipart=!0,e._promise=null,e}return j(n,t),n.prototype.commonUpload=function(t){return Z(this,void 0,void 0,(function(){var n,i,o,a,s,_,c,d,u,T,E;return $(this,(function(S){switch(S.label){case 0:n=t.file,i=t.onProgress,o=t.fileType,S.label=1;case 1:return S.trys.push([1,3,,4]),[4,this._getFileToken(o,n.name)];case 2:return a=S.sent(),[3,4];case 3:return[2,{code:S.sent()}];case 4:return s={},(_=new FormData).set("token",a.token),_.set("key",a.fileName),_.set("file",n),c=L(this._url),this._promise=e({url:c,headers:s,onProgress:function(e){return null==i?void 0:i(e.loaded,e.total)},method:"POST",body:_,timeout:0}),[4,this._promise.result()];case 5:return d=S.sent(),u=d.status,T=d.data,this._promise=null,200!==u&&204!==u||!T?[2,{code:r.UPLOAD_FAIL,msg:u.toString()}]:(E=JSON.parse(T),[2,{code:r.SUCCESS,data:{uniqueName:E.rc_url.file_name,downloadUrl:c+"/"+E.rc_url.path}}])}}))}))},n.prototype.multipartUpload=function(e){return Z(this,void 0,void 0,(function(){var t,n,i,o,r;return $(this,(function(a){switch(a.label){case 0:t=e.file,n=e.onProgress,i=e.fileType,o=D(),a.label=1;case 1:return a.trys.push([1,3,,4]),[4,this._getFileToken(i,t.name)];case 2:return r=a.sent(),[3,4];case 3:return[2,{code:a.sent()}];case 4:return[2,this._requestUploadPart(o,t,r.token,n)]}}))}))},n.prototype._requestUploadPart=function(t,n,i,o,a){return void 0===a&&(a=0),Z(this,void 0,void 0,(function(){var s,_,c,d,u,T,E,S,l,A;return $(this,(function(R){switch(R.label){case 0:return s=Math.min(G,n.size-a),_=t+n.name.substring(n.name.lastIndexOf(".")),c={Range:"bytes="+a+"-"+(a+s),"X-File-TransactionId":_,"X-File-Total-Size":n.size.toString()},d=n.slice(a,a+s),(u=new FormData).set("file",d,n.name),u.set("key",_),u.set("name",_),u.set("token",i),T=L(this._url),this._promise=e({url:T,headers:c,onProgress:function(e){return null==o?void 0:o(a+e.loaded,n.size)},method:"POST",body:u,timeout:0}),[4,this._promise.result()];case 1:return E=R.sent(),S=E.status,l=E.data,this._promise=null,200===S||204===S?a+s<n.size?[2,this._requestUploadPart(t,n,i,o,a+s)]:(A=JSON.parse(l),[2,{code:r.SUCCESS,data:{uniqueName:A.rc_url.file_name,downloadUrl:T+"/"+A.rc_url.path}}]):[2,{code:r.UPLOAD_FAIL,msg:S.toString()}]}}))}))},n.prototype._abortHandler=function(){var e;null===(e=this._promise)||void 0===e||e.abort()},n}(ei),_i=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e._promise=null,e}return j(n,t),n.prototype.commonUpload=function(t){return Z(this,void 0,void 0,(function(){var n,i,o,a,s,_,c,d,u,T;return $(this,(function(E){switch(E.label){case 0:n=t.file,i=t.onProgress,o=t.fileType,a=t.contentDisposition,E.label=1;case 1:return E.trys.push([1,3,,4]),[4,this._getFileToken(o,n.name,void 0,void 0,void 0,ti(n.size))];case 2:return s=E.sent(),[3,4];case 3:return[2,{code:E.sent()}];case 4:return _={},c=L(s.s3BucketName+"."+this._url),d=new FormData,a?d.set("Content-Disposition",a):d.set("Content-Disposition","text/html"===n.type?"inline;":"attachment;"),d.set("Content-Type",n.type),d.set("x-amz-credential",s.s3Credential),d.set("x-amz-algorithm",s.s3Algorithm),d.set("x-amz-date",s.s3Date),d.set("policy",s.s3Policy),d.set("x-amz-signature",s.s3Signature),d.set("key",s.fileName),d.set("file",n),this._promise=e({url:c,headers:_,onProgress:function(e){return null==i?void 0:i(e.loaded,e.total)},method:"POST",body:d,timeout:0}),[4,this._promise.result()];case 5:return u=E.sent(),T=u.status,this._promise=null,200===T||204===T?[2,{code:r.SUCCESS,data:{uniqueName:s.fileName,uploadMethod:M.AWS}}]:[2,{code:r.UPLOAD_FAIL,msg:T.toString()}]}}))}))},n.prototype.multipartUpload=function(e){throw new Error("Method not implemented.")},n.prototype._abortHandler=function(){var e;null===(e=this._promise)||void 0===e||e.abort()},n}(ei),ci=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e._promise=null,e.isSupportMultipart=!0,e}return j(n,t),n.prototype.commonUpload=function(t){return Z(this,void 0,void 0,(function(){var n,i,o,a,s,_,c;return $(this,(function(d){switch(d.label){case 0:n=t.file,i=t.onProgress,o=t.fileType,d.label=1;case 1:return d.trys.push([1,3,,4]),[4,this._getFileToken(o)];case 2:return a=d.sent(),[3,4];case 3:return[2,{code:d.sent()}];case 4:return s=L(this._url+"/"+a.stcBucketName+"/"+a.fileName),_=this.getBaseHeaders(n,a,t),this._promise=e({url:s,headers:_,onProgress:function(e){return null==i?void 0:i(e.loaded,e.total)},method:"PUT",body:n,timeout:0}),[4,this._promise.result()];case 5:return c=d.sent().status,this._promise=null,200===c||204===c?[2,{code:r.SUCCESS,data:{uniqueName:a.fileName,uploadMethod:M.STC}}]:[2,{code:r.UPLOAD_FAIL}]}}))}))},n.prototype.multipartUpload=function(t){var n;return Z(this,void 0,void 0,(function(){var i,o,a,s,_,c,d,u,T,E,S,l,A,R,v,f;return $(this,(function(I){switch(I.label){case 0:i=t.file,o=t.fileType,I.label=1;case 1:return I.trys.push([1,3,,4]),[4,this._getFileToken(o,i.name,"POST","uploads")];case 2:return a=I.sent(),[3,4];case 3:return[2,{code:I.sent()}];case 4:return s=L(this._url+"/"+a.stcBucketName+"/"+a.fileName),_=this.getBaseHeaders(i,a,t),this._promise=e({url:s+"?uploads",headers:_,method:"POST"}),[4,this._promise.result()];case 5:return c=I.sent(),d=c.status,u=c.data,this._promise=null,T=null===(n=null==u?void 0:u.match(/(?:<UploadId>)(\S*?)(?:<\/UploadId>)/))||void 0===n?void 0:n[1],200!==d&&204!==d||!T?[2,{code:r.UPLOAD_FAIL,msg:"start upload fail"}]:(E=[],[4,this.requestUploadPart(s,i,T,a.fileName,t,E)]);case 6:if(S=I.sent(),l=S.code,A=S.msg,l!==r.SUCCESS)return[2,{code:l,msg:A}];I.label=7;case 7:return I.trys.push([7,9,,10]),[4,this._getFileToken(o,a.fileName,"POST","uploadId="+T)];case 8:return a=I.sent(),[3,10];case 9:return[2,{code:I.sent()}];case 10:return R=E.map((function(e,t){return"<Part><PartNumber>"+(t+1)+"</PartNumber><ETag>"+e+"</ETag></Part>"})).join(""),R="<CompleteMultipartUpload xmlns='http://s3.amazonaws.com/doc/2006-03-01/'>"+R+"</CompleteMultipartUpload>",v=this.getBaseHeaders(i,a,t),this._promise=e({url:s+"?uploadId="+T,headers:v,method:"POST",body:R}),[4,this._promise.result()];case 11:return f=I.sent().status,this._promise=null,200===f||204===f?[2,{code:r.SUCCESS,data:{uniqueName:a.fileName,uploadMethod:M.STC}}]:[2,{code:r.UPLOAD_FAIL,msg:"end upload fail"}]}}))}))},n.prototype.requestUploadPart=function(t,n,i,o,a,s,_,c){return void 0===_&&(_=1),void 0===c&&(c=0),Z(this,void 0,void 0,(function(){var d,u,T,E,S,l,A,R,v;return $(this,(function(f){switch(f.label){case 0:if(c>=5)return[2,{code:r.UPLOAD_FAIL,msg:"Upload retry times exceeded 5. Procedure"}];d=(_-1)*G,u=Math.min(G,n.size-d),T="partNumber="+_+"&uploadId="+i,f.label=1;case 1:return f.trys.push([1,3,,4]),[4,this._getFileToken(a.fileType,o,"PUT",T)];case 2:return E=f.sent(),[3,4];case 3:return[2,{code:f.sent()}];case 4:return S=n.slice(d,_*G),l=this.getBaseHeaders(n,E,a),this._promise=e({url:t+"?"+T,headers:l,method:"PUT",body:S,onProgress:function(e){var t;return null===(t=null==a?void 0:a.onProgress)||void 0===t?void 0:t.call(a,d+e.loaded,n.size)},timeout:0}),[4,this._promise.result()];case 5:return A=f.sent(),R=A.status,v=A.xhr,this._promise=null,200===R||204===R?(s.push((null==v?void 0:v.getResponseHeader("ETag"))||""),d+u<n.size?[2,this.requestUploadPart(t,n,i,o,a,s,_+1,0)]:[2,{code:r.SUCCESS}]):[2,this.requestUploadPart(t,n,i,o,a,s,_,c+1)]}}))}))},n.prototype.getBaseHeaders=function(e,t,n){return{"Content-Disposition":(n.contentDisposition||("text/html"===e.type?"inline":"attachment"))+"; filename="+encodeURIComponent(e.name)+";",Authorization:t.stcAuthorization,"x-amz-content-sha256":t.stcContentSha256,"x-amz-date":t.stcDate,"Content-Type":e.type||"text/plain"}},n.prototype._abortHandler=function(){var e;null===(e=this._promise)||void 0===e||e.abort()},n}(ei);var di=((ni={})[bn.QINIU]=ii,ni[bn.ALIYUN]=oi,ni[bn.BAIDU]=ri,ni[bn.S3]=_i,ni[bn.STC]=ci,ni[bn.MINIO]=ai,ni[bn.RCX]=si,ni);function ui(e,t,n,i){var o=document.createElement("canvas"),a=o.getContext("2d"),s=new Image;s.onload=function(t){var _=i||{},c=_.maxHeight,d=void 0===c?160:c,u=_.maxWidth,T=void 0===u?160:u,E=_.quality,S=void 0===E?1:E,l=_.scale,A=void 0===l?1:l,R=Ei(s.width,s.height,{maxHeight:d,maxWidth:T,scale:A});o.width=Math.min(R.w,T),o.height=Math.min(R.h,d),a.drawImage(s,R.x,R.y,R.w,R.h);var v=Ti(o,S);v=v.replace(/data:image\/[^;]+;base64,/,""),e({code:r.SUCCESS,data:Q(Q({},n),{thumbnail:v,width:R.w,height:R.h})})},s.onerror=function(t){e({code:r.UPLOAD_FAIL,msg:"get image info fail:"+JSON.stringify(t)})},s.src=(window.URL||window.webkitURL).createObjectURL(t)}function Ti(e,t){var n=e.toDataURL("image/jpeg",t);return n.length>w-10240?Ti(e,t-.1):n}var Ei=function(e,t,n){var i,o,r=n.maxHeight,a=void 0===r?160:r,s=n.maxWidth,_=void 0===s?160:s,c=n.scale,d=e<t,u=0,T=0;return(d?t/e:e/t)>(void 0===c?1:c)?(d?(i=160,(o=t/(e/160))>a&&(T=(o-a)/2)):(o=160,(i=e/(t/160))>_&&(u=(i-_)/2)),{w:i,h:o,x:-u,y:-T}):(d?(o=a,i=e/(t/a)):(i=_,o=t/(e/_)),{w:i,h:o,x:-u,y:-T})},Si=0,li=function(){function e(e,t){this._client=null,this.id=++Si,this._promise=this._handleUpload(e,t)}return e.prototype.abort=function(){var e;this._resolve({code:r.UPLOAD_FAIL,msg:"upload abort"}),null===(e=this._client)||void 0===e||e.abort()},e.prototype._uploadInLoop=function(e,t,n,i,o){return void 0===o&&(o=[]),Z(this,void 0,void 0,(function(){var a,s,_,c,d,u;return $(this,(function(T){switch(T.label){case 0:a=0,T.label=1;case 1:return a<e.length?(s=e[a],this._client=new di[s.type](s.url,n,i),[4,this._client.upload(t)]):[3,4];case 2:if(_=T.sent(),c=_.code,d=_.data,u=_.msg,c===r.SUCCESS)return[2,{code:c,data:d}];if(c===r.RC_FILE_SIZE_EXCEED_LIMIT)return[2,{code:c,msg:"File size exceeds the limit"}];if(c===r.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:d,msg:u}];this._client=null,o.push({type:s.type,url:s.url,code:c,msg:u}),T.label=3;case 3:return a++,[3,1];case 4:return[2,{code:r.UPLOAD_FAIL,msg:"Failed to upload all channels, msg: "+JSON.stringify(o)}]}}))}))},e.prototype._handleUpload=function(e,t){return Z(this,void 0,void 0,(function(){var n=this;return $(this,(function(i){return[2,new Promise((function(i){return Z(n,void 0,void 0,(function(){var n,o,a,s,_,c,d,u,T,E,S,l,A,R,v,f,I,O,N;return $(this,(function(g){switch(g.label){case 0:return this._resolve=i,n=t.getFileToken,o=t.serverType,a=t.customDomain,s=t.ossConfig,_=t.uploadServer,c=t.bosAddr,d=e.file,u=e.fileType,T=e.thumbnailConfig,E=function(e,t,n,i,o){if(n)return[{type:bn.RCX,url:n,p:"1"}];if(e)return JSON.parse(e).map((function(e){var t={type:bn.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 r=[];return i&&r.push({type:bn.QINIU,url:i,p:"1"}),o&&r.push({type:bn.BAIDU,url:o,p:"2"}),r}(s,0,a,_,c),0===E.length?(i({code:r.INVALID_PARAMETER_MEDIA_URL,msg:"uploadUrlList is empty"}),[2]):[4,this._uploadInLoop(E,e,n,o)];case 1:if(S=g.sent(),l=S.code,A=S.data,R=S.msg,l!==r.SUCCESS||!A)return i({code:l,msg:R}),[2];if(v=A.downloadUrl)return[3,5];g.label=2;case 2:return g.trys.push([2,4,,5]),[4,t.getFileUrl(u,A.uniqueName,d.name,void 0,A.uploadMethod)];case 3:return f=g.sent(),v=f.downloadUrl,[3,5];case 4:return I=g.sent(),i({code:I,msg:"Get download url fail"}),[3,5];case 5:return v?(O={downloadUrl:v,uniqueName:(null==A?void 0:A.uniqueName)||"",name:d.name,size:d.size,type:d.type},u!==P.AUDIO?[3,7]:[4,d.arrayBuffer()]):(i({code:r.UPLOAD_FAIL,msg:"Get download url fail"}),[2]);case 6:return N=g.sent(),function(e,t,n){(new AudioContext).decodeAudioData(t,(function(t){e({code:r.SUCCESS,data:Q(Q({},n),{duration:t.duration,length:t.length})})}),(function(t){e({code:r.UPLOAD_FAIL,msg:"get audio info fail:"+JSON.stringify(t)})}))}(i,N,O),[2];case 7:return u===P.IMAGE?(ui(i,d,O,T),[2]):(i({code:l,data:O}),[2])}}))}))}))]}))}))},e.prototype.awaitResult=function(){return Z(this,void 0,void 0,(function(){return $(this,(function(e){return[2,this._promise]}))}))},e}(),Ai={};function Ri(e,t){var n=new li(e,t);return function(e){Z(this,void 0,void 0,(function(){return $(this,(function(t){switch(t.label){case 0:return Ai[e.id]=e,[4,e.awaitResult()];case 1:return t.sent(),delete Ai[e.id],[2]}}))}))}(n),n}function vi(e){var t=Ai[e];return!!t&&(t.abort(),!0)}var fi=function(e,t){var n=e.getNaviInfoFromCache();return{getFileToken:e.getFileToken.bind(e),getFileUrl:e.getFileUrl.bind(e),customDomain:t.uploadDomain||"",serverType:null==n?void 0:n.type,ossConfig:null==n?void 0:n.ossConfig,uploadServer:null==n?void 0:n.uploadServer,bosAddr:null==n?void 0:n.bosAddr}};function Ii(e){return Z(this,void 0,void 0,(function(){var t,n,i;return $(this,(function(o){return t=e.contentDisposition,n=e.fileType,i=e.file,[2,new v("","").validate("contentDisposition",t,(function(e){return"inline"===e||"attachment"===e}),!1).validate("fileType",n,(function(e){return!!P[e]}),!0).validate("file",i,(function(e){return e instanceof File&&(!(n===P.IMAGE&&!e.type.match(/^image\//))&&!(n===P.AUDIO&&!e.type.match(/^audio\//)))}),!0).ifReadySync((function(t,n,i){var o=Ri(e,fi(t,i));return{code:r.SUCCESS,data:o}}))]}))}))}function Oi(e){return Z(this,void 0,void 0,(function(){return $(this,(function(t){return[2,{code:r.SUCCESS,data:vi(e)}]}))}))}function Ni(e){return Z(this,void 0,void 0,(function(){var t,n,i;return $(this,(function(o){return t=e.contentDisposition,n=e.fileType,i=e.file,[2,new v("","").validate("contentDisposition",t,(function(e){return"inline"===e||"attachment"===e}),!1).validate("fileType",n,(function(e){return!!P[e]}),!0).validate("file",i,(function(e){return e instanceof File&&(!(n===P.IMAGE&&!e.type.match(/^image\//))&&!(n===P.AUDIO&&!e.type.match(/^audio\//)))}),!0).ifReady((function(t,n,i){return function(e,t){return Z(this,void 0,void 0,(function(){return $(this,(function(n){return[2,new li(e,t).awaitResult()]}))}))}(e,fi(t,i))}))]}))}))}function gi(e,t,n,i){return it((function(o){return new Promise((function(a){o.getFileToken(e,t,n,i).then((function(e){a({code:r.SUCCESS,data:e})})).catch((function(e){a({code:e,msg:vt[e]})}))}))}))}function Ci(e){return new v("","").validate("mediaUrl",e,T.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,o=e.deadline;n({code:r.SUCCESS,data:{token:t,downloadAuthInfo:i,deadline:o}})})).catch((function(e){n({code:e,msg:vt[e]})}))}))}))}function hi(e,t,n,i,o){return new v("","").validate("fileType",e,B,!0).validate("filename",t,T.STRING).validate("saveName",n,T.STRING).validate("serverType",o,T.NUMBER).ifReady((function(a){return new Promise((function(s){a.getFileUrl(e,t,n,i,o).then((function(e){s({code:r.SUCCESS,data:e})})).catch((function(e){s({code:e})}))}))}))}function mi(e,t,n){return Z(this,void 0,void 0,(function(){var i=this;return $(this,(function(o){return[2,new v(A.A_SEND_MSG_T,A.A_SEND_MSG_R).validate("message",t,(function(){return t instanceof Bn}),!0).validate("conversation",e,T.OBJECT,!0).validate("conversationType",null==e?void 0:e.conversationType,T.CONVERSATION_TYPE,!0).validate("targetId",null==e?void 0:e.targetId,T.STRING,!0).validate("channelId",null==e?void 0:e.channelId,T.CHANNEL_ID).validate("isStatusMessage",null==n?void 0:n.isStatusMessage,T.BOOLEAN).validate("disableNotification",null==n?void 0:n.disableNotification,T.BOOLEAN).validate("pushContent",null==n?void 0:n.pushContent,T.STRING).validate("pushData",null==n?void 0:n.pushData,T.STRING).validate("isMentioned",null==n?void 0:n.isMentioned,T.BOOLEAN).validate("mentionedType",null==n?void 0:n.mentionedType,T.NUMBER).validate("mentionedUserIdList",null==n?void 0:n.mentionedUserIdList,b({itemValidator:J})).validate("directionalUserIdList",null==n?void 0:n.directionalUserIdList,b({maxLength:300,itemValidator:J})).validate("isVoipPush",null==n?void 0:n.isVoipPush,T.BOOLEAN).validate("canIncludeExpansion",null==n?void 0:n.canIncludeExpansion,T.BOOLEAN).validate("expansion",null==n?void 0:n.expansion,T.OBJECT).validate("pushConfig",null==n?void 0:n.pushConfig,T.OBJECT).validate("messageId",null==n?void 0:n.messageId,T.NUMBER).ifReady((function(o,_){return Z(i,void 0,void 0,(function(){var i,c,d,u,T,E,S,l,R,v,f,I,O,N,g,C,h,m,U,p,y;return $(this,(function(G){switch(G.label){case 0:return c=(i=n||{}).disableNotification,d=i.isMentioned,u=i.directionalUserIdList,T=i.canIncludeExpansion,E=i.onSendBefore,S=i.expansion,l=i.pushConfig,R=i.isStatusMessage,v=_.createTraceId(),f=e.conversationType,I=e.targetId,O=e.channelId,u&&u.length>0&&![3,10].includes(f)?[2,{code:r.RC_DIRECTIONAL_MESSAGE_INVALID_CONVERSATION_TYPE}]:(N=function(e,t,n){var i=e.isStatusMessage,o=e.disableNotification,r=e.pushContent,a=e.pushData,s=e.isMentioned,_=e.mentionedType,c=e.mentionedUserIdList,d=e.directionalUserIdList,u=e.isVoipPush,T=e.canIncludeExpansion,E=e.expansion,S=e.isFilerWhiteBlacklist,l=e.pushConfig,A=e.messageId,R=n.channelId;return Q({isStatusMessage:i,disableNotification:o,pushContent:r,pushData:a,isMentioned:s,mentionedType:_,mentionedUserIdList:c,directionalUserIdList:d,isVoipPush:u,canIncludeExpansion:T,expansion:E,isFilerWhiteBlacklist:S,pushConfig:l,channelId:R||"",messageId:A},t)}(n||{},t,e),g={isMentioned:!!d,content:t.content,messageType:t.messageType,isPersited:!!t.isPersited,isCounted:!!t.isCounted,disableNotification:!!c,canIncludeExpansion:!!T,expansion:S||null,conversationType:e.conversationType,targetId:e.targetId,channelId:e.channelId,senderUserId:o.getCurrentUserId(),messageUId:"",messageDirection:F.SEND,receivedTime:0,isStatusMessage:!!R,receivedStatus:a.UNREAD,isOffLineMessage:!1,pushConfig:l,sentStatus:H.SENDING,sentTime:0,directedUserIds:u||[]},f!==s.ULTRA_GROUP&&(g.isOffLineMessage=!1),C=function(e){g.messageId=e;try{E&&E(xe(g))}catch(e){_.error(A.A_SEND_MSG_T,'Callback method "onSendBefore" execution error.\n'+(null==e?void 0:e.stack),v)}},_.info(A.A_SEND_MSG_T,JSON.stringify({messageType:t.messageType,conversationType:f,targetId:I,channelId:O}),v),[4,o.sendMessage(f,I,N,C,v)]);case 1:return h=G.sent(),m=h.code,U=h.data,p=h.msg,m===r.SUCCESS?(_.info(A.A_SEND_MSG_R,JSON.stringify({code:m,messageUId:U.messageUId,messageId:U.messageId}),v),y=xe(U),[2,{code:m,data:y}]):(_.warn(A.A_SEND_MSG_R,JSON.stringify({code:m}),v),g.sentTime=(null==U?void 0:U.sentTime)||0,g.sentStatus=null==U?void 0:U.sentStatus,[2,{code:m,msg:p||vt[m],data:xe(g)}])}}))}))}))]}))}))}function Ui(e,t,n){return mi(e,new Yn(t),n)}function pi(e,t){return function(n,i,o,a){var s;if(!f("sendOptions.contentDisposition",null==a?void 0:a.contentDisposition,(function(e){return["inline","attachment"].includes(e)})))return Promise.resolve({code:r.INVALID_PARAMETER_SENDOPTIONS});var _={contentDisposition:null==a?void 0:a.contentDisposition};if(a&&"thumbnailConfig"in a){var c=null===(s=a)||void 0===s?void 0:s.thumbnailConfig;if(!(f("sendOptions.maxHeight",null==c?void 0:c.maxHeight,T.NUMBER)&&f("sendOptions.maxWidth",null==c?void 0:c.maxWidth,T.NUMBER)&&f("sendOptions.quality",null==c?void 0:c.quality,T.NUMBER)&&f("sendOptions.scale",null==c?void 0:c.scale,T.NUMBER)))return Promise.resolve({code:r.INVALID_PARAMETER_SENDOPTIONS});_.thumbnailConfig=c}return it((function(s,c,d){return new Promise((function(s){var d=c.createTraceId();c.info(A.L_MEDIA_UPLOAD_T,JSON.stringify({filesize:i.file.size,type:e}),d),Ni({file:i.file,fileType:e,onProgress:function(e,t){var n;null===(n=null==o?void 0:o.onProgress)||void 0===n||n.call(o,Math.floor(e/t*100))},contentDisposition:_.contentDisposition,thumbnailConfig:_.thumbnailConfig}).then((function(e){var _,u=e.code,T=e.data,E=e.msg;if(u===r.SUCCESS&&T){var S=(null===(_=null==o?void 0:o.onComplete)||void 0===_?void 0:_.call(o,Q({url:T.downloadUrl},T)))||t(T,i);return c.info(A.L_MEDIA_UPLOAD_R,JSON.stringify({downurl:T.downloadUrl,code:r.SUCCESS}),d),void mi(n,S,a).then(s)}s({code:u,msg:E})}))}))}))}}var yi=pi(P.FILE,(function(e,t){var n,i,o={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&&(o.user=t.user),t.extra&&(o.extra=t.extra),t.mentionedInfo&&(o.mentionedInfo=t.mentionedInfo),new Kn(o)})),Gi=pi(P.IMAGE,(function(e,t){var n={content:e.thumbnail,imageUri:e.downloadUrl};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 Jn(n)})),Mi=pi(P.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 Xn(n)})),Li=pi(P.AUDIO,(function(e,t){var n={remoteUrl:e.downloadUrl,duration:e.duration,type:e.type};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 Fn(n)})),Pi=pi(P.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 Hn(n)}));function Di(e,t){return Z(this,void 0,void 0,(function(){var n=this;return $(this,(function(i){return[2,new v(A.A_GET_HISTORY_MSG_T,A.A_GET_HISTORY_MSG_R).validate("conversation",e,T.OBJECT,!0).validate("conversationType",null==e?void 0:e.conversationType,T.CONVERSATION_TYPE,!0).validate("targetId",null==e?void 0:e.targetId,T.STRING,!0).validate("channelId",null==e?void 0:e.channelId,T.CHANNEL_ID).validate("timestamp",null==t?void 0:t.timestamp,T.NUMBER).validate("count",null==t?void 0:t.count,T.NUMBER).validate("count",null==t?void 0:t.count,(function(e){if(V())return!0;var t=e>0&&e<=100;return t||null===console||void 0===console||console.error('"options.count" is invalid, It should be greater than 0 and less than 100'),t})).validate("order",null==t?void 0:t.order,(function(e){return 0===e||1===e})).ifReady((function(i,o){return Z(n,void 0,void 0,(function(){var n,a,s,_,c,d;return $(this,(function(u){switch(u.label){case 0:return n=o.createTraceId(),o.info(A.A_GET_HISTORY_MSG_T,JSON.stringify({targetId:e.targetId,conversationType:e.conversationType,channelId:e.channelId,timestamp:null==t?void 0:t.timestamp,count:null==t?void 0:t.count}),n),[4,i.getHistoryMessage(e.conversationType,e.targetId,null==t?void 0:t.timestamp,null==t?void 0:t.count,null==t?void 0:t.order,null==e?void 0:e.channelId,"",n)];case 1:return a=u.sent(),s=a.code,_=a.data,s===r.SUCCESS&&_?(c=[],d=_.list.map((function(e){return c.push(e.messageUId),xe(e)})),o.info(A.A_GET_HISTORY_MSG_R,JSON.stringify({code:s,messageUIds:c}),n),[2,{code:s,data:{list:d,hasMore:_.hasMore}}]):(o.warn(A.A_GET_HISTORY_MSG_R,JSON.stringify({code:s,messageUIds:""}),n),[2,{code:s,msg:vt[s]}])}}))}))}))]}))}))}function wi(e,t){return Z(this,void 0,void 0,(function(){var n=this;return $(this,(function(i){return[2,new v(qe.A_GET_REMOTE_HISTORY_MESSAGES_T,qe.A_GET_REMOTE_HISTORY_MESSAGES_R).validate("conversation",e,T.OBJECT,!0).validate("conversationType",null==e?void 0:e.conversationType,T.CONVERSATION_TYPE,!0).validate("targetId",null==e?void 0:e.targetId,T.STRING,!0).validate("channelId",null==e?void 0:e.channelId,T.CHANNEL_ID).validate("timestamp",null==t?void 0:t.timestamp,T.NUMBER).validate("count",null==t?void 0:t.count,T.NUMBER).validate("count",null==t?void 0:t.count,(function(e){return e>0&&e<=100})).validate("order",null==t?void 0:t.order,(function(e){return 0===e||1===e})).ifReady((function(i,o){return Z(n,void 0,void 0,(function(){var n,a,s,_,c,d;return $(this,(function(u){switch(u.label){case 0:return n=o.createTraceId(),o.info(qe.A_GET_REMOTE_HISTORY_MESSAGES_T,JSON.stringify({targetId:e.targetId,conversationType:e.conversationType,channelId:e.channelId,timestamp:null==t?void 0:t.timestamp,count:null==t?void 0:t.count,order:null==t?void 0:t.order}),n),[4,i.getRemoteHistoryMessages(e.conversationType,e.targetId,(null==t?void 0:t.timestamp)||0,(null==t?void 0:t.count)||20,(null==t?void 0:t.order)||0,e.channelId||"")];case 1:return a=u.sent(),s=a.code,_=a.data,s===r.SUCCESS&&_?(c=[],d=_.list.map((function(e){return c.push(e.messageUId),xe(e)})),o.info(qe.A_GET_REMOTE_HISTORY_MESSAGES_R,JSON.stringify({code:s,messageUIds:c})),[2,{code:s,data:{list:d,hasMore:_.hasMore}}]):(o.warn(qe.A_GET_REMOTE_HISTORY_MESSAGES_R,JSON.stringify({code:s})),[2,{code:s,msg:vt[s]}])}}))}))}))]}))}))}function Bi(e,t,n,i){return Z(this,void 0,void 0,(function(){var o=this;return $(this,(function(r){return[2,new v(A.A_SEND_MSG_T,A.A_SEND_MSG_R).validate("targetId",e,T.STRING,!0).validate("messageUId",t,T.STRING,!0).validate("timestamp",n,T.NUMBER,!0).validate("channelId",i,T.CHANNEL_ID).ifReady((function(r){return Z(o,void 0,void 0,(function(){var o,r,a,_,c;return $(this,(function(d){switch(d.label){case 0:return o={targetId:e,conversationType:s.PRIVATE,channelId:i},r=new Bn("RC:ReadNtf",{messageUId:t,lastMessageSendTime:n,type:1}),[4,mi(o,r)];case 1:return a=d.sent(),_=a.code,c=a.msg,0===_?[2,{code:_}]:[2,{code:_,msg:c}]}}))}))}))]}))}))}function Vi(e,t,n){return Z(this,void 0,void 0,(function(){var i=this;return $(this,(function(o){return[2,new v(A.A_SEND_MSG_T,A.A_SEND_MSG_R).validate("targetId",e,T.STRING,!0).validate("messageUId",t,T.STRING,!0).validate("channelId",n,T.CHANNEL_ID).ifReady((function(o,r){return Z(i,void 0,void 0,(function(){var i,o,a,_,c;return $(this,(function(d){switch(d.label){case 0:return i="messageUId:"+t+",targetId:"+e,r.debug(A.A_SEND_MSG_T,"send read receipt message ->"+i),o=new Bn("RC:RRReqMsg",{messageUId:t}),[4,mi({targetId:e,conversationType:s.GROUP,channelId:n},o)];case 1:return a=d.sent(),_=a.code,c=a.msg,0===_?[2,{code:_}]:[2,{code:_,msg:c}]}}))}))}))]}))}))}function bi(e,t,n){return Z(this,void 0,void 0,(function(){return $(this,(function(e){throw new Error("This method is deprecated, please use method sendReadReceiptResponseV2.")}))}))}pi(P.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 xn(n)}));var Ji=function(e,t,n,i){return Z(void 0,void 0,void 0,(function(){var o,a;return $(this,(function(s){switch(s.label){case 0:return!f("messageList",i,T.OBJECT,!0)||Object.keys(i).some((function(e){return!f(e,i[e],T.ARRAY)}))?[2,Promise.resolve({code:r.MSG_LIMIT_ERROR})]:(o=[],Object.keys(i).forEach((function(e){i[e].forEach((function(e){-1===o.indexOf(e)&&o.push(e)}))})),o.length?[4,e.sendReadReceiptMessage(n.targetId,o,n.channelId)]:(t.warn(A.A_SEND_MSG_R,JSON.stringify({code:r.MSG_LIMIT_ERROR,msg:"Error in parameter messageList."})),[2,Promise.resolve({code:r.MSG_LIMIT_ERROR})]));case 1:return a=s.sent().code,[2,Promise.resolve({code:a})]}}))}))};function Fi(e,t,n){return Z(this,void 0,void 0,(function(){var i=this;return $(this,(function(o){return[2,new v(A.A_SEND_MSG_T,A.A_SEND_MSG_R).validate("targetId",e,T.STRING,!0).validate("channelId",n,T.CHANNEL_ID).ifReady((function(o,a){return Z(i,void 0,void 0,(function(){var i,_,c,d,u;return $(this,(function(E){switch(E.label){case 0:return i={targetId:e,conversationType:s.GROUP,channelId:n},c=o.getNaviInfoFromCache(),1!==(null==c?void 0:c.grpRRVer)?[3,2]:[4,Ji(o,a,i,t)];case 1:return _=E.sent(),[3,4];case 2:return!f("messageList",t,T.OBJECT,!1)||t&&Object.keys(t).some((function(e){return!f(e,t[e],T.ARRAY)}))?[2,{code:r.MSG_LIMIT_ERROR}]:(d=new Bn("RC:RRRspMsg",{receiptMessageDic:t}),[4,mi(i,d)]);case 3:_=E.sent(),E.label=4;case 4:return(u=_.code)===r.SUCCESS?[2,{code:u}]:[2,{code:u,msg:vt[u]}]}}))}))}))]}))}))}function Hi(e,t){return Z(this,void 0,void 0,(function(){var n=this;return $(this,(function(i){return[2,new v(A.A_SYNC_READ_STATUS_T,A.A_SYNC_READ_STATUS_R).validate("timestamp",t,T.NUMBER,!0).validate("conversation",e,T.OBJECT,!0).validate("conversationType",null==e?void 0:e.conversationType,(function(e){return[s.GROUP,s.PRIVATE,s.APP_PUBLIC_SERVICE,s.PUBLIC_SERVICE,s.SYSTEM].includes(e)}),!0).validate("targetId",null==e?void 0:e.targetId,T.STRING,!0).validate("channelId",null==e?void 0:e.channelId,T.CHANNEL_ID).ifReady((function(i,o){return Z(n,void 0,void 0,(function(){var n,a,s,_,c,d,u;return $(this,(function(T){switch(T.label){case 0:return n="conversationType:"+e.conversationType+",targetId:"+e.targetId+",\n channelId: "+e.channelId+", timestamp:"+t,a=o.createTraceId(),o.info(A.A_SYNC_READ_STATUS_T,n,a),1!==(null==(s=i.getNaviInfoFromCache())?void 0:s.sesDriven)?[3,2]:[4,i.updateConversationReadTime(e,t)];case 1:return _=T.sent(),[3,4];case 2:return c=new Bn("RC:SRSMsg",{lastMessageSendTime:t}),[4,mi(e,c)];case 3:_=T.sent(),T.label=4;case 4:return d=_.code,u=_.msg,o[d===r.SUCCESS?"info":"warn"](A.A_SYNC_READ_STATUS_R,"code: "+d+", msg: "+u,a),[2,{code:d,msg:u}]}}))}))}))]}))}))}function Yi(e,t,n){return void 0===n&&(n=""),Z(this,void 0,void 0,(function(){var i=this;return $(this,(function(o){return[2,new v(A.A_SEND_MESSAGE_READ_RECEIPT_V4_T,A.A_SEND_MESSAGE_READ_RECEIPT_V4_R).validate("conversation",e,T.OBJECT,!0).validate("conversationType",null==e?void 0:e.conversationType,(function(e){return e===s.GROUP||e===s.PRIVATE}),!0,"It should be ConversationType.GROUP or ConversationType.PRIVATE").validate("targetId",null==e?void 0:e.targetId,T.STRING,!0).validate("channelId",null==e?void 0:e.channelId,T.CHANNEL_ID).validate("startMsgUId",n,T.ONLY_STRING,!0).validate("endMsgUId",t,T.STRING,!0).ifReady((function(o,a){return Z(i,void 0,void 0,(function(){var i,s,_,c,d,u;return $(this,(function(T){switch(T.label){case 0:return i=a.createTraceId(),s="conversationType:"+e.conversationType+",targetId:"+e.targetId+",\n channelId: "+e.channelId+", startMsgUId:"+n+", endMsgUId: "+t,a.info(A.A_SEND_MESSAGE_READ_RECEIPT_V4_T,s,i),3!==(null==(_=o.getNaviInfoFromCache())?void 0:_.grpRRVer)?[2,{code:r.READ_RECEIPT_V4_NOT_SUPPORT}]:[4,o.sendReadReceiptMessageV4(e,n,t)];case 1:return c=T.sent(),d=c.code,u=c.msg,a[d===r.SUCCESS?"info":"warn"](A.A_SEND_MESSAGE_READ_RECEIPT_V4_R,"code: "+d+", msg: "+u,i),[2,{code:d,msg:u}]}}))}))}))]}))}))}function xi(e,t){return Z(this,void 0,void 0,(function(){var n=this;return $(this,(function(i){return[2,new v(A.A_GET_MESSAGE_READ_RECEIPT_V4_T,A.A_GET_MESSAGE_READ_RECEIPT_V4_R).validate("conversation",e,T.OBJECT,!0).validate("conversationType",null==e?void 0:e.conversationType,(function(e){return e===s.GROUP}),!0,"It should be ConversationType.GROUP").validate("targetId",null==e?void 0:e.targetId,T.STRING,!0).validate("channelId",null==e?void 0:e.channelId,T.CHANNEL_ID).validate("messageUId",t,T.STRING,!0).ifReady((function(i,o){return Z(n,void 0,void 0,(function(){var n,a,s,_,c,d,u;return $(this,(function(T){switch(T.label){case 0:return n="conversationType:"+e.conversationType+",targetId:"+e.targetId+",\n channelId: "+e.channelId+", messageUid:"+t,a=o.createTraceId(),o.info(A.A_GET_MESSAGE_READ_RECEIPT_V4_T,n,a),3!==(null==(s=i.getNaviInfoFromCache())?void 0:s.grpRRVer)?[2,{code:r.READ_RECEIPT_V4_NOT_SUPPORT}]:[4,i.getMessageReadReceiptV4(e,t)];case 1:return _=T.sent(),c=_.code,d=_.msg,u=_.data,o[c===r.SUCCESS?"info":"warn"](A.A_GET_MESSAGE_READ_RECEIPT_V4_R,"code: "+c+", msg: "+d,a),c===r.SUCCESS&&u?[2,{code:c,data:u}]:[2,{code:c,msg:d}]}}))}))}))]}))}))}function ki(e,t){return Z(this,void 0,void 0,(function(){var n=this;return $(this,(function(i){return[2,new v(A.A_BATCH_GET_MESSAGE_READ_RECEIPT_INFO_V4_T,A.A_BATCH_GET_MESSAGE_READ_RECEIPT_INFO_V4_R).validate("conversation",e,T.OBJECT,!0).validate("conversationType",null==e?void 0:e.conversationType,(function(e){return e===s.GROUP}),!0,"It should be ConversationType.GROUP").validate("targetId",null==e?void 0:e.targetId,T.STRING,!0).validate("channelId",null==e?void 0:e.channelId,T.CHANNEL_ID).validate("messageUId",t,(function(e){return!!f("messageUIds",e,T.ARRAY,!0)&&!e.some((function(e){return!h(e)}))}),!0).ifReady((function(i,o){return Z(n,void 0,void 0,(function(){var n,a,s,_,c,d,u;return $(this,(function(T){switch(T.label){case 0:return n="conversationType:"+e.conversationType+",targetId:"+e.targetId+",\n channelId: "+e.channelId+", messageUid:"+t.toString(),a=o.createTraceId(),o.info(A.A_BATCH_GET_MESSAGE_READ_RECEIPT_INFO_V4_T,n,a),3!==(null==(s=i.getNaviInfoFromCache())?void 0:s.grpRRVer)?[2,{code:r.READ_RECEIPT_V4_NOT_SUPPORT}]:[4,i.batchGetMessageReadReceiptInfoV4(e,t)];case 1:return _=T.sent(),c=_.code,d=_.msg,u=_.data,o[c===r.SUCCESS?"info":"warn"](A.A_BATCH_GET_MESSAGE_READ_RECEIPT_INFO_V4_R,"code: "+c+", msg: "+d,a),c===r.SUCCESS?[2,{code:c,data:u}]:[2,{code:c,msg:d}]}}))}))}))]}))}))}function Ki(e,t){return Z(this,void 0,void 0,(function(){var n=this;return $(this,(function(i){return[2,new v(qe.A_RECALL_MESSAGE_T,qe.A_RECALL_MESSAGE_R).validate("conversation",e,T.OBJECT,!0).validate("conversationType",null==e?void 0:e.conversationType,T.CONVERSATION_TYPE,!0).validate("targetId",null==e?void 0:e.targetId,T.STRING,!0).validate("channelId",null==e?void 0:e.channelId,T.CHANNEL_ID).validate("messageUId",t.messageUId,T.STRING,!0).validate("sentTime",t.sentTime,T.NUMBER,!0).validate("disableNotification",null==t?void 0:t.disableNotification,T.BOOLEAN).validate("pushConfig",null==t?void 0:t.pushConfig,T.OBJECT).validate("directionalUserIdList",null==t?void 0:t.directionalUserIdList,b({maxLength:300,minLength:1,itemValidator:function(e){return h(e)}})).ifReady((function(i,o){return Z(n,void 0,void 0,(function(){var n,a,s,_,c;return $(this,(function(d){switch(d.label){case 0:return n={user:t.user,channelId:e.channelId||"",disableNotification:null==t?void 0:t.disableNotification,pushConfig:null==t?void 0:t.pushConfig,extra:t.extra,isDelete:t.isDelete,directionalUserIdList:t.directionalUserIdList},a=o.createTraceId(),o.info(qe.A_RECALL_MESSAGE_T,JSON.stringify({targetId:e.targetId,conversationType:e.conversationType,messageUId:t.messageUId}),a),[4,i.recallMessage(e.conversationType,e.targetId,t.messageUId,t.sentTime,n)];case 1:return s=d.sent(),_=s.code,c=s.data,_===r.SUCCESS&&c?(o.info(qe.A_RECALL_MESSAGE_R,JSON.stringify({code:_,messageUId:c.messageUId}),a),[2,{code:_,data:xe(c)}]):_===r.SUCCESS?[2,{code:_}]:(o.warn(qe.A_RECALL_MESSAGE_R,JSON.stringify({code:_}),a),[2,{code:_,msg:vt[_]}])}}))}))}))]}))}))}function Xi(e,t){return Z(this,void 0,void 0,(function(){var n=this;return $(this,(function(i){return[2,new v(qe.A_DELETE_REMOTE_MESSAGE_T,qe.A_DELETE_REMOTE_MESSAGE_R).validate("conversation",e,T.OBJECT,!0).validate("conversationType",null==e?void 0:e.conversationType,T.CONVERSATION_TYPE,!0).validate("targetId",null==e?void 0:e.targetId,T.STRING,!0).validate("channelId",null==e?void 0:e.channelId,T.CHANNEL_ID).validate("messages",t,(function(e){return E(e)&&e.length}),!0).validate("messages",t,(function(e){return!(!e||!E(e))&&!e.some((function(e){return!h(null==e?void 0:e.messageUId)||!C(null==e?void 0:e.sentTime)||!f("options.messageDirection",null==e?void 0:e.messageDirection,(function(e){return 1===e||2===e}),!0)}))}),!0).ifReady((function(i,o){return Z(n,void 0,void 0,(function(){var n,a,s;return $(this,(function(_){switch(_.label){case 0:return n=o.createTraceId(),o.info(qe.A_DELETE_REMOTE_MESSAGE_T,JSON.stringify({targetId:e.targetId,conversationType:e.conversationType,channelId:e.channelId,messages:t.map((function(e){return e.messageUId}))}),n),[4,i.deleteRemoteMessage(e.conversationType,e.targetId,t,e.channelId)];case 1:return a=_.sent(),s=a===r.SUCCESS?"info":"warn",o[s](qe.A_DELETE_REMOTE_MESSAGE_R,JSON.stringify({code:a}),n),a!==r.SUCCESS?[2,{code:a,msg:vt[a]}]:[2,{code:r.SUCCESS}]}}))}))}))]}))}))}function qi(e,t){return Z(this,void 0,void 0,(function(){var n=this;return $(this,(function(i){return[2,new v(qe.A_DELETE_REMOTE_MESSAGE_BY_TIMESTAMP_T,qe.A_DELETE_REMOTE_MESSAGE_BY_TIMESTAMP_R).validate("conversation",e,T.OBJECT,!0).validate("conversationType",null==e?void 0:e.conversationType,T.CONVERSATION_TYPE,!0).validate("targetId",null==e?void 0:e.targetId,T.STRING,!0).validate("channelId",null==e?void 0:e.channelId,T.CHANNEL_ID).validate("timestamp",t,T.NUMBER,!0).ifReady((function(i,o){return Z(n,void 0,void 0,(function(){var n,a,s;return $(this,(function(_){switch(_.label){case 0:return n=o.createTraceId(),o.info(qe.A_DELETE_REMOTE_MESSAGE_BY_TIMESTAMP_T,JSON.stringify({targetId:e.targetId,conversationType:e.conversationType,channelId:e.channelId,timestamp:t}),n),[4,i.deleteRemoteMessageByTimestamp(e.conversationType,e.targetId,t,e.channelId)];case 1:return a=_.sent(),s=a===r.SUCCESS?"info":"warn",o[s](qe.A_DELETE_REMOTE_MESSAGE_BY_TIMESTAMP_R,JSON.stringify({code:a}),n),a!==r.SUCCESS?[2,{code:a,msg:vt[a]}]:[2,{code:r.SUCCESS}]}}))}))}))]}))}))}function zi(e,t){return Z(this,void 0,void 0,(function(){var n=this;return $(this,(function(i){return[2,new v(qe.A_BATCH_CLEAR_REMOTE_MSG_T,qe.A_BATCH_CLEAR_REMOTE_MSG_R).validate("clearMessageOption",e,(function(e){if(!f("clearMessageOption",e,T.ARRAY,!0))return!1;if(e.length>20||0===e.length)return!1;for(var t=0,n=e;t<n.length;t++){var i=n[t];if(!(f("options",i,T.OBJECT,!0)&&f("options.targetId",i.targetId,T.STRING,!0)&&f("options.conversationType",i.conversationType,(function(e){return[s.PRIVATE,s.GROUP,s.CHATROOM,s.SYSTEM].includes(e)}),!0)&&f("options.timestamp",i.timestamp,T.NUMBER,!0)&&f("options.channelId",i.channelId,T.ONLY_STRING)))return!1}return!0}),!0).ifReady((function(i,o){return Z(n,void 0,void 0,(function(){var n,a,s;return $(this,(function(_){switch(_.label){case 0:return n=e.map((function(e){return{conversationType:e.conversationType,targetId:e.targetId,timestamp:e.timestamp,channelId:e.channelId||""}})),a=o.createTraceId(),o.info(qe.A_BATCH_CLEAR_REMOTE_MSG_T,"options: "+JSON.stringify(n)+", isDeleteLocal: "+!!t,a),[4,i.batchClearRemoteHistoryMessages(n,!!t)];case 1:return s=_.sent(),o[r.SUCCESS===s?"info":"warn"](qe.A_BATCH_CLEAR_REMOTE_MSG_R,"code: "+s,a),[2,{code:s}]}}))}))}))]}))}))}function Wi(e,t){return Z(this,void 0,void 0,(function(){var n=this;return $(this,(function(i){return[2,new v(qe.A_UPDATE_MESSAGE_EXPANSION_T,qe.A_UPDATE_MESSAGE_EXPANSION_R).validate("expansion",e,T.OBJECT,!0).validate("message",t,T.OBJECT,!0).validate("conversationType",null==t?void 0:t.conversationType,T.NUMBER,!0).validate("targetId",null==t?void 0:t.targetId,T.STRING,!0).validate("channelId",null==t?void 0:t.channelId,T.CHANNEL_ID).validate("messageUId",null==t?void 0:t.messageUId,T.STRING,!0).validate("expansion",null==t?void 0:t.expansion,T.OBJECT).validate("canIncludeExpansion",null==t?void 0:t.canIncludeExpansion,T.BOOLEAN,!0).ifReady((function(i,o){return Z(n,void 0,void 0,(function(){var n,a,s,_,c,d,u,T,E;return $(this,(function(S){switch(S.label){case 0:return n=t.conversationType,a=t.targetId,s=t.messageUId,_=t.canIncludeExpansion,c=t.expansion,d=t.channelId,u=o.createTraceId(),o.info(qe.A_UPDATE_MESSAGE_EXPANSION_T,JSON.stringify({targetId:a,channelId:d,conversationType:n,messageUId:s,canIncludeExpansion:_}),u),[4,i.sendExpansionMessage({conversationType:n,targetId:a,messageUId:s,expansion:e,canIncludeExpansion:_,originExpansion:c,channelId:d})];case 1:return T=S.sent().code,E=T===r.SUCCESS?"info":"warn",o[E](qe.A_UPDATE_MESSAGE_EXPANSION_R,JSON.stringify({code:T}),u),T!==r.SUCCESS?[2,{code:T,msg:vt[T]}]:[2,{code:T}]}}))}))}))]}))}))}function ji(e,t){return Z(this,void 0,void 0,(function(){var n=this;return $(this,(function(i){return[2,new v(qe.A_REMOVE_MESSAGE_EXPANSION_FOR_KEY_T,qe.A_REMOVE_MESSAGE_EXPANSION_FOR_KEY_R).validate("keys",e,T.ARRAY,!0).validate("message",t,T.OBJECT,!0).validate("conversationType",null==t?void 0:t.conversationType,T.NUMBER,!0).validate("targetId",null==t?void 0:t.targetId,T.STRING,!0).validate("channelId",null==t?void 0:t.channelId,T.CHANNEL_ID).validate("messageUId",null==t?void 0:t.messageUId,T.STRING,!0).validate("canIncludeExpansion",null==t?void 0:t.canIncludeExpansion,T.BOOLEAN,!0).ifReady((function(i,o){return Z(n,void 0,void 0,(function(){var n,a,s,_,c,d,u,T;return $(this,(function(E){switch(E.label){case 0:return n=t.conversationType,a=t.targetId,s=t.messageUId,_=t.canIncludeExpansion,c=t.channelId,d=o.createTraceId(),o.info(qe.A_REMOVE_MESSAGE_EXPANSION_FOR_KEY_T,JSON.stringify({targetId:a,channelId:c,conversationType:n,messageUId:s,canIncludeExpansion:_}),d),[4,i.sendExpansionMessage({conversationType:n,targetId:a,messageUId:s,canIncludeExpansion:_,keys:e,channelId:c})];case 1:return u=E.sent().code,T=u===r.SUCCESS?"info":"warn",o[T](qe.A_REMOVE_MESSAGE_EXPANSION_FOR_KEY_R,JSON.stringify({code:u}),d),u!==r.SUCCESS?[2,{code:u,msg:vt[u]}]:[2,{code:u}]}}))}))}))]}))}))}function Qi(e,t){return Z(this,void 0,void 0,(function(){var n=this;return $(this,(function(i){return[2,new v(A.A_SEND_MSG_T,A.A_SEND_MSG_R).validate("conversation",e,T.OBJECT,!0).validate("conversationType",null==e?void 0:e.conversationType,T.CONVERSATION_TYPE,!0).validate("targetId",null==e?void 0:e.targetId,T.STRING,!0).validate("channelId",null==e?void 0:e.channelId,T.CHANNEL_ID).validate("messageType",t,T.STRING,!0).ifReady((function(i,o){return Z(n,void 0,void 0,(function(){var n,a,s,_,c,d;return $(this,(function(u){switch(u.label){case 0:return n={messageType:"RC:TypSts",content:{typingContentType:t},isStatusMessage:!0,channelId:e.channelId},a=o.createTraceId(),o.info(A.A_SEND_MSG_T,JSON.stringify({messageType:n.messageType,conversationType:e.conversationType,targetId:e.targetId,channelId:e.channelId}),a),[4,i.sendMessage(e.conversationType,e.targetId,n,void 0,a)];case 1:return s=u.sent(),_=s.code,c=s.data,d=_===r.SUCCESS?"info":"warn",o[d](A.A_SEND_MSG_R,JSON.stringify({code:_,messageUId:c?c.messageUId:"",messageId:c?c.messageId:""}),a),_===r.SUCCESS?[2,{code:_,data:xe(c)}]:[2,{code:_,msg:vt[_]}]}}))}))}))]}))}))}function Zi(e,t,n){return Z(this,void 0,void 0,(function(){var i=this;return $(this,(function(o){return[2,new v(qe.A_GET_MESSAGE_READER_T,qe.A_GET_MESSAGE_READER_R).validate("messageUId",t,T.STRING,!0).validate("targetId",e,T.STRING,!0).validate("channelId",n,T.CHANNEL_ID).ifReady((function(o,a){return Z(i,void 0,void 0,(function(){var i,s,_,c;return $(this,(function(d){switch(d.label){case 0:return i=a.createTraceId(),a.info(qe.A_GET_MESSAGE_READER_T,JSON.stringify({targetId:e,messageUId:t,channelId:n}),i),[4,o.getMessageReader(e,t,n)];case 1:return s=d.sent(),_=s.code,c=s.data,_===r.SUCCESS?(a.info(qe.A_GET_MESSAGE_READER_R,JSON.stringify({code:_,totalMemberCount:null==c?void 0:c.totalMemberCount}),i),[2,{code:_,data:c}]):(a.warn(qe.A_GET_MESSAGE_READER_R,JSON.stringify({code:_})),[2,{code:_,msg:vt[_]}])}}))}))}))]}))}))}function $i(e,t,n,i,o){return nt((function(r,a){return u("messageType",e,T.STRING,!0),u("isPersited",t,T.BOOLEAN,!0),u("isCounted",n,T.BOOLEAN,!0),u("isStatusMessage",o,T.BOOLEAN,!1),u("searchProps",i,T.ARRAY),a.info(A.A_REGTYP_O,JSON.stringify({messageType:e,isCounted:n,isStatusMessage:o,isPersited:t})),r.registerMessageType(e,t,n,i,o),Vn(e,t,n)}))}function eo(e){return Z(this,void 0,void 0,(function(){var t=this;return $(this,(function(n){return V()?[2,new v(qe.A_GET_FIRST_UNREAD_MESSAGE_T,qe.A_GET_FIRST_UNREAD_MESSAGE_R).validate("conversation",e,T.OBJECT,!0).validate("conversationType",null==e?void 0:e.conversationType,T.CONVERSATION_TYPE,!0).validate("targetId",null==e?void 0:e.targetId,T.STRING,!0).validate("channelId",null==e?void 0:e.channelId,T.CHANNEL_ID).ifReady((function(n,i){return Z(t,void 0,void 0,(function(){var t,o,a,s,_,c,d,u;return $(this,(function(T){switch(T.label){case 0:return t=e.conversationType,o=e.targetId,a=e.channelId,s=i.createTraceId(),i.info(qe.A_GET_FIRST_UNREAD_MESSAGE_T,JSON.stringify({conversationType:t,targetId:o,channelId:a}),s),[4,n.getFirstUnreadMessage(t,o,a)];case 1:return _=T.sent(),c=_.code,d=_.data,c===r.SUCCESS?(u=d&&xe(d)||null,i.info(qe.A_GET_FIRST_UNREAD_MESSAGE_R,JSON.stringify({code:c,messageUId:null==d?void 0:d.messageUId}),s),[2,{code:c,data:u}]):(i.warn(qe.A_GET_FIRST_UNREAD_MESSAGE_R,JSON.stringify({code:c}),s),[2,{code:c,msg:vt[c]}])}}))}))}))]:[2,{code:r.NOT_SUPPORT,msg:vt[r.NOT_SUPPORT]}]}))}))}function to(e){return Z(this,void 0,void 0,(function(){var t=this;return $(this,(function(n){return[2,new v(qe.A_GET_FIRST_UNREAD_MESSAGE_INFO_T,qe.A_GET_FIRST_UNREAD_MESSAGE_INFO_R).validate("conversation",e,T.OBJECT,!0).validate("conversationType",null==e?void 0:e.conversationType,T.CONVERSATION_TYPE,!0).validate("targetId",null==e?void 0:e.targetId,T.STRING,!0).validate("channelId",null==e?void 0:e.channelId,T.CHANNEL_ID).ifReady((function(n,i){return Z(t,void 0,void 0,(function(){var t,o,a,s,_,c,d;return $(this,(function(u){switch(u.label){case 0:return t=e.conversationType,o=e.targetId,a=e.channelId,s=i.createTraceId(),i.info(qe.A_GET_FIRST_UNREAD_MESSAGE_INFO_T,JSON.stringify({conversationType:t,targetId:o,channelId:a}),s),[4,n.getFirstUnreadMessageInfo(t,o,a||"")];case 1:return _=u.sent(),c=_.code,d=_.data,c===r.SUCCESS?(i.info(qe.A_GET_FIRST_UNREAD_MESSAGE_INFO_R,JSON.stringify({code:c,messageUId:null==d?void 0:d.messageUId,sentTime:null==d?void 0:d.sentTime}),s),[2,{code:c,data:d}]):(i.warn(qe.A_GET_FIRST_UNREAD_MESSAGE_INFO_R,JSON.stringify({code:c}),s),[2,{code:c,msg:vt[c]}])}}))}))}))]}))}))}function no(e,t,n){return void 0===n&&(n={}),Z(this,void 0,void 0,(function(){var i=this;return $(this,(function(o){return Ke("RongIMLib.insertMessage","RongIMLib.ElectronExtension.insertMessage"),V()?[2,new v(qe.A_INSERT_MESSAGE_T,qe.A_INSERT_MESSAGE_R).validate("conversation",e,T.OBJECT,!0).validate("conversationType",null==e?void 0:e.conversationType,T.CONVERSATION_TYPE,!0).validate("targetId",null==e?void 0:e.targetId,T.STRING,!0).validate("channelId",null==e?void 0:e.channelId,T.CHANNEL_ID).validate("searchContent",null==n?void 0:n.searchContent,T.STRING).validate("senderUserId",null==t?void 0:t.senderUserId,T.STRING,!0).validate("messageType",null==t?void 0:t.messageType,T.STRING,!0).validate("content",null==t?void 0:t.content,T.OBJECT,!0).validate("messageDirection",null==t?void 0:t.messageDirection,T.NUMBER,!0).validate("canIncludeExpansion",null==t?void 0:t.canIncludeExpansion,T.BOOLEAN).validate("expansion",null==t?void 0:t.expansion,T.OBJECT).validate("disableNotification",null==t?void 0:t.disableNotification,T.BOOLEAN).validate("sentTime",null==t?void 0:t.sentTime,T.NUMBER).validate("sentStatus",null==t?void 0:t.sentStatus,T.NUMBER).ifReady((function(o,a){return Z(i,void 0,void 0,(function(){var i,s,_,c,d,u,T,E,S,l,A,R,v,f,I,O,N;return $(this,(function(g){switch(g.label){case 0:return i=t.senderUserId,s=t.messageType,_=t.content,c=t.messageDirection,d=t.messageUId,u=t.canIncludeExpansion,T=t.expansion,E=t.disableNotification,S=t.sentTime,l=t.sentStatus,A=a.createTraceId(),a.info(qe.A_INSERT_MESSAGE_T,JSON.stringify({conversationType:e.conversationType,targetId:e.targetId,channelId:e.channelId}),A),R=n.isUnread,v=n.searchContent,f={senderUserId:i,messageType:s,content:_,messageDirection:c,sentTime:S,sentStatus:l,searchContent:v,isUnread:!!R,messageUId:d,disableNotification:E,canIncludeExpansion:u,expansionMsg:JSON.stringify(T),channelId:e.channelId||""},[4,o.insertMessage(e.conversationType,e.targetId,f)];case 1:return I=g.sent(),O=I.code,N=I.data,O===r.SUCCESS?(a.info(qe.A_INSERT_MESSAGE_R,JSON.stringify({code:O,messageId:null==N?void 0:N.messageId}),A),[2,{code:O,data:xe(N)}]):(a.warn(qe.A_INSERT_MESSAGE_R,JSON.stringify({code:O}),A),[2,{code:O,msg:vt[O]}])}}))}))}))]:[2,{code:r.NOT_SUPPORT,msg:vt[r.NOT_SUPPORT]}]}))}))}function io(e){return Z(this,void 0,void 0,(function(){var t=this;return $(this,(function(n){return V()?[2,new v(qe.A_GET_MESSAGE_T,qe.A_GET_MESSAGE_R).validate("messageId",e,(function(e){return C(e)||h(e)}),!0).ifReady((function(n,i){return Z(t,void 0,void 0,(function(){var t,o,a,s;return $(this,(function(_){switch(_.label){case 0:return t=i.createTraceId(),i.info(qe.A_GET_MESSAGE_T,JSON.stringify({messageId:e}),t),[4,n.getMessage(e)];case 1:return o=_.sent(),a=o.code,s=o.data,a===r.SUCCESS?(i.info(qe.A_GET_MESSAGE_R,JSON.stringify({code:a,messageUId:null==s?void 0:s.messageUId,messageId:null==s?void 0:s.messageId})),[2,{code:a,data:xe(s)}]):(i.warn(qe.A_GET_MESSAGE_R,JSON.stringify({code:a})),[2,{code:a,msg:vt[a]}])}}))}))}))]:[2,{code:r.NOT_SUPPORT,msg:vt[r.NOT_SUPPORT]}]}))}))}function oo(e){return V()?new v(qe.A_GET_UNREAD_MENTIONED_MESSAGES_T,qe.A_GET_UNREAD_MENTIONED_MESSAGES_R).validate("conversation",e,T.OBJECT,!0).validate("conversationType",null==e?void 0:e.conversationType,T.CONVERSATION_TYPE,!0).validate("targetId",null==e?void 0:e.targetId,T.STRING,!0).validate("channelId",null==e?void 0:e.channelId,T.CHANNEL_ID).ifReadySync((function(t,n){var i=e.conversationType,o=e.targetId,a=e.channelId,s=n.createTraceId();n.info(qe.A_GET_UNREAD_MENTIONED_MESSAGES_T,JSON.stringify({conversationType:i,targetId:o,channelId:a}),s);var _=t.getUnreadMentionedMessages(i,o,a),c=[];return _&&_.length&&_.forEach((function(e){return c.push(xe(e))})),n.info(qe.A_GET_UNREAD_MENTIONED_MESSAGES_R,JSON.stringify({code:r.SUCCESS,count:c.length}),s),{code:r.SUCCESS,data:c}})):{code:r.NOT_SUPPORT,msg:vt[r.NOT_SUPPORT]}}function ro(e,t,n,i){return Z(this,void 0,void 0,(function(){var o=this;return $(this,(function(a){return Ke("RongIMLib.searchMessages","RongIMLib.ElectronExtension.searchMessages"),V()?[2,new v("A-search_messages-T","A-search_messages-R").validate("conversation",e,T.OBJECT,!0).validate("conversationType",null==e?void 0:e.conversationType,T.CONVERSATION_TYPE,!0).validate("targetId",null==e?void 0:e.targetId,T.STRING,!0).validate("channelId",null==e?void 0:e.channelId,T.CHANNEL_ID).validate("keyword",t,T.STRING,!0).validate("timestamp",n,T.NUMBER).validate("count",i,T.NUMBER).ifReady((function(a,s){return Z(o,void 0,void 0,(function(){var o,_,c,d;return $(this,(function(u){switch(u.label){case 0:return[4,a.searchMessageByContent(e.conversationType,e.targetId,t,n,i,1,e.channelId)];case 1:return o=u.sent(),_=o.code,c=o.data,_===r.SUCCESS?(d=[],(null==c?void 0:c.messages)&&c.messages.length&&c.messages.forEach((function(e){return d.push(xe(e))})),[2,{code:_,data:{messages:d,count:null==c?void 0:c.count}}]):(s.warn(A.O,"searchMessages ->code:"+_+",targetId:"+e.targetId),[2,{code:_,msg:vt[_]}])}}))}))}))]:[2,{code:r.NOT_SUPPORT,msg:vt[r.NOT_SUPPORT]}]}))}))}function ao(e,t,n){return Z(this,void 0,void 0,(function(){var i,o,a,s=this;return $(this,(function(_){return Ke("RongIMLib.deleteLocalMessagesByTimestamp","RongIMLib.ElectronExtension.deleteMessagesByTimestamp"),V()?(i=e.conversationType,o=e.targetId,a=e.channelId,[2,new v(qe.A_DELETE_LOCAL_MESSAGES_BY_TIMESTAMP_T,qe.A_DELETE_LOCAL_MESSAGES_BY_TIMESTAMP_R).validate("conversation",e,T.OBJECT,!0).validate("conversationType",null==e?void 0:e.conversationType,T.CONVERSATION_TYPE,!0).validate("targetId",null==e?void 0:e.targetId,T.STRING,!0).validate("channelId",null==e?void 0:e.channelId,T.CHANNEL_ID).validate("timestamp",t,T.NUMBER,!0).validate("cleanSpace",n,T.BOOLEAN).ifReady((function(e,_){return Z(s,void 0,void 0,(function(){var s,c,d;return $(this,(function(u){switch(u.label){case 0:return s=_.createTraceId(),_.info(qe.A_DELETE_LOCAL_MESSAGES_BY_TIMESTAMP_T,JSON.stringify({conversationType:i,targetId:o,channelId:a,timestamp:t,cleanSpace:n}),s),[4,e.deleteMessagesByTimestamp(i,o,t,n,a)];case 1:return c=u.sent(),_.debug(A.A_DELETE_MESSAGES_S,JSON.stringify({code:c,conversationType:i,targetId:o,channelId:a,timestamp:t})),d=c===r.SUCCESS?"info":"warn",_[d](qe.A_DELETE_LOCAL_MESSAGES_BY_TIMESTAMP_R,JSON.stringify({code:c}),s),c===r.SUCCESS?[2,{code:c}]:[2,{code:c,msg:vt[c]}]}}))}))}))]):[2,{code:r.NOT_SUPPORT,msg:vt[r.NOT_SUPPORT]}]}))}))}function so(e){return Z(this,void 0,void 0,(function(){var t=this;return $(this,(function(n){return Ke("RongIMLib.clearMessages","RongIMLib.ElectronExtension.clearMessages"),V()?[2,new v(qe.A_CLEAR_MESSAGES_T,qe.A_CLEAR_MESSAGES_R).validate("conversation",e,T.OBJECT,!0).validate("conversationType",null==e?void 0:e.conversationType,T.CONVERSATION_TYPE,!0).validate("targetId",null==e?void 0:e.targetId,T.STRING,!0).validate("channelId",null==e?void 0:e.channelId,T.CHANNEL_ID).ifReady((function(n,i){return Z(t,void 0,void 0,(function(){var t,o,a,s,_,c;return $(this,(function(d){switch(d.label){case 0:return t=e.conversationType,o=e.targetId,a=e.channelId,s=i.createTraceId(),i.info(qe.A_CLEAR_MESSAGES_T,JSON.stringify({conversationType:t,targetId:o,channelId:a}),s),[4,n.clearMessages(t,o,a)];case 1:return _=d.sent(),c=_===r.SUCCESS?"info":"warn",i[c](qe.A_CLEAR_MESSAGES_R,JSON.stringify({code:_}),s),_===r.SUCCESS?[2,{code:_}]:[2,{code:_,msg:vt[_]}]}}))}))}))]:[2,{code:r.NOT_SUPPORT,msg:vt[r.NOT_SUPPORT]}]}))}))}function _o(e,t,n,i){return Z(this,void 0,void 0,(function(){var o=this;return $(this,(function(a){return Ke("RongIMLib.searchConversationByContent","RongIMLib.ElectronExtension.searchConversationByContent"),V()?[2,new v(qe.A_SEARCH_CONVERSATION_BY_CONTENT_T,qe.A_SEARCH_CONVERSATION_BY_CONTENT_R).validate("keyword",e,T.STRING,!0).validate("conversationTypes",t,(function(e){return!!E(e)&&!e.some((function(e){return!I(e)}))}),!1).validate("messageTypes",n,(function(e){return!!E(e)&&!(null==n?void 0:n.some((function(e){return!h(e)})))}),!1).validate("channelId",i,T.STRING).ifReady((function(a,s){return Z(o,void 0,void 0,(function(){var o,_,c,d;return $(this,(function(u){switch(u.label){case 0:return o=s.createTraceId(),s.info(qe.A_SEARCH_CONVERSATION_BY_CONTENT_T,JSON.stringify({keyword:e,conversationTypes:t,messageTypes:n,channelId:i}),o),[4,a.searchConversationByContent(e,n,i,t)];case 1:return _=u.sent(),c=_.code,d=_.data,c===r.SUCCESS?(s.info(qe.A_SEARCH_CONVERSATION_BY_CONTENT_R,JSON.stringify({code:c,count:null==d?void 0:d.length}),o),[2,{code:c,data:d}]):(s.warn(qe.A_SEARCH_CONVERSATION_BY_CONTENT_R,JSON.stringify({code:c}),o),[2,{code:c,msg:vt[c]}])}}))}))}))]:[2,{code:r.NOT_SUPPORT,msg:vt[r.NOT_SUPPORT]}]}))}))}function co(e,t){return Z(this,void 0,void 0,(function(){var n=this;return $(this,(function(i){return V()?[2,new v(qe.A_CLEAR_UNREAD_COUNT_BY_TIMESTAMP_T,qe.A_CLEAR_UNREAD_COUNT_BY_TIMESTAMP_R).validate("conversation",e,T.OBJECT,!0).validate("conversationType",null==e?void 0:e.conversationType,T.CONVERSATION_TYPE,!0).validate("targetId",null==e?void 0:e.targetId,T.STRING,!0).validate("channelId",null==e?void 0:e.channelId,T.CHANNEL_ID).validate("timestamp",t,T.NUMBER).ifReady((function(i,o){return Z(n,void 0,void 0,(function(){var n,a,s,_,c,d;return $(this,(function(u){switch(u.label){case 0:return n=e.conversationType,a=e.targetId,s=e.channelId,_=o.createTraceId(),o.info(qe.A_CLEAR_UNREAD_COUNT_BY_TIMESTAMP_T,JSON.stringify({conversationType:n,targetId:a,channelId:s,timestamp:t}),_),[4,i.clearUnreadCountByTimestamp(n,a,t,s)];case 1:return c=u.sent(),d=c===r.SUCCESS?"info":"warn",o[d](qe.A_CLEAR_UNREAD_COUNT_BY_TIMESTAMP_R,JSON.stringify({code:c}),_),c===r.SUCCESS?[2,{code:c}]:[2,{code:c,msg:vt[c]}]}}))}))}))]:[2,{code:r.NOT_SUPPORT,msg:vt[r.NOT_SUPPORT]}]}))}))}function uo(e,t){return Z(this,void 0,void 0,(function(){var n=this;return $(this,(function(i){return Ke("RongIMLib.setMessageReceivedStatus","RongIMLib.ElectronExtension.setMessageReceivedStatus"),V()?[2,new v(qe.A_SET_MESSAGE_RECEIVED_STATUS_T,qe.A_SET_MESSAGE_RECEIVED_STATUS_R).validate("messageId",e,T.NUMBER,!0).validate("receivedStatus",t,T.NUMBER,!0).ifReady((function(i,o){return Z(n,void 0,void 0,(function(){var n,a,s;return $(this,(function(_){switch(_.label){case 0:return n=o.createTraceId(),o.info(qe.A_SET_MESSAGE_RECEIVED_STATUS_T,JSON.stringify({messageId:e,receivedStatus:t}),n),[4,i.setMessageReceivedStatus(e,t)];case 1:return a=_.sent(),s=a===r.SUCCESS?"info":"warn",o[s](qe.A_SET_MESSAGE_RECEIVED_STATUS_R,JSON.stringify({code:a}),n),a===r.SUCCESS?[2,{code:a}]:[2,{code:a,msg:vt[a]}]}}))}))}))]:[2,{code:r.NOT_SUPPORT,msg:vt[r.NOT_SUPPORT]}]}))}))}function To(e){return Z(this,void 0,void 0,(function(){var t=this;return $(this,(function(n){return[2,new v(qe.A_ADD_TAG_T,qe.A_ADD_TAG_R).validate("tagId",null==e?void 0:e.tagId,T.STRING,!0).validate("tagId",null==e?void 0:e.tagId,(function(e){return!!e&&e.length<=10})).validate("tagName",null==e?void 0:e.tagName,T.STRING,!0).validate("tagName",null==e?void 0:e.tagName,(function(e){return!!e&&e.length<=15})).ifReady((function(n,i){return Z(t,void 0,void 0,(function(){var t,o,a;return $(this,(function(s){switch(s.label){case 0:return t=i.createTraceId(),i.info(qe.A_ADD_TAG_T,JSON.stringify({tagId:e.tagId,tagName:e.tagName}),t),[4,n.createTag(e)];case 1:return o=s.sent().code,a=o===r.SUCCESS?"info":"warn",i[a](qe.A_ADD_TAG_R,JSON.stringify({code:o}),t),o===r.SUCCESS?[2,{code:o}]:[2,{code:o,msg:vt[o]}]}}))}))}))]}))}))}function Eo(e){return Z(this,void 0,void 0,(function(){var t=this;return $(this,(function(n){return[2,new v(qe.A_REMOVE_TAG_T,qe.A_REMOVE_TAG_R).validate("tagId",e,T.STRING,!0).ifReady((function(n,i){return Z(t,void 0,void 0,(function(){var t,o,a;return $(this,(function(s){switch(s.label){case 0:return t=i.createTraceId(),i.info(qe.A_REMOVE_TAG_T,JSON.stringify({tagId:e}),t),[4,n.removeTag(e)];case 1:return o=s.sent().code,a=o===r.SUCCESS?"info":"warn",i[a](qe.A_REMOVE_TAG_R,JSON.stringify({code:o}),t),o===r.SUCCESS?[2,{code:o}]:[2,{code:o,msg:vt[o]}]}}))}))}))]}))}))}function So(e){return Z(this,void 0,void 0,(function(){var t=this;return $(this,(function(n){return[2,new v(qe.A_UPDATE_TAG_T,qe.A_UPDATE_TAG_R).validate("tagId",null==e?void 0:e.tagId,T.STRING,!0).validate("tagName",null==e?void 0:e.tagName,T.STRING,!0).validate("tagName",null==e?void 0:e.tagName,(function(e){return!!e&&e.length<=15})).ifReady((function(n,i){return Z(t,void 0,void 0,(function(){var t,o,a;return $(this,(function(s){switch(s.label){case 0:return t=i.createTraceId(),i.info(qe.A_UPDATE_TAG_T,JSON.stringify({tagId:e.tagId,tagName:e.tagName}),t),[4,n.updateTag(e)];case 1:return o=s.sent().code,a=o===r.SUCCESS?"info":"warn",i[a](qe.A_UPDATE_TAG_R,JSON.stringify({code:o}),t),o===r.SUCCESS?[2,{code:o}]:[2,{code:o,msg:vt[o]}]}}))}))}))]}))}))}function lo(){return Z(this,void 0,void 0,(function(){var e=this;return $(this,(function(t){return[2,new v("","").ifReady((function(t,n){return Z(e,void 0,void 0,(function(){var e,i,o,a,s;return $(this,(function(_){switch(_.label){case 0:return e=n.createTraceId(),n.info(qe.A_GET_TAGS_T,"",e),[4,t.getTagList()];case 1:return i=_.sent(),o=i.code,a=i.data,s=o===r.SUCCESS?"info":"warn",n[s](qe.A_GET_TAGS_R,JSON.stringify({code:o}),e),[2,{code:r.SUCCESS,data:a}]}}))}))}))]}))}))}function Ao(e){return Z(this,void 0,void 0,(function(){var t=this;return $(this,(function(n){return[2,new v(qe.A_GET_TAGS_FOR_CONVERSATION_T,qe.A_GET_TAGS_FOR_CONVERSATION_R).validate("conversation",e,T.OBJECT,!0).validate("conversationType",null==e?void 0:e.conversationType,T.CONVERSATION_TYPE,!0).validate("targetId",null==e?void 0:e.targetId,T.STRING,!0).validate("channelId",null==e?void 0:e.channelId,T.CHANNEL_ID).ifReady((function(n,i){return Z(t,void 0,void 0,(function(){var t,o,a,s,_;return $(this,(function(c){switch(c.label){case 0:return t=i.createTraceId(),i.info(qe.A_GET_TAGS_FOR_CONVERSATION_T,JSON.stringify({conversationType:e.conversationType,targetId:e.targetId,channelId:e.channelId}),t),[4,n.getTagsForConversation(e)];case 1:return o=c.sent(),a=o.code,s=o.data,_=a===r.SUCCESS?"info":"warn",i[_](qe.A_GET_TAGS_FOR_CONVERSATION_R,JSON.stringify({code:a}),t),a===r.SUCCESS?[2,{code:a,data:s}]:[2,{code:a,msg:vt[a]}]}}))}))}))]}))}))}function Ro(e,t){return Z(this,void 0,void 0,(function(){var n=this;return $(this,(function(i){return[2,new v(qe.A_ADD_TAG_FOR_CONVERSATIONS_T,qe.A_ADD_TAG_FOR_CONVERSATIONS_R).validate("tagId",e,T.STRING,!0).validate("conversations",t,(function(e){return!(!f("conversations",e,T.ARRAY,!0)||e.length<=0)&&!e.some((function(e){return!f("conversation",e,T.CONVERSATION,!0)}))}),!0).ifReady((function(i,o){return Z(n,void 0,void 0,(function(){var n,a,s;return $(this,(function(_){switch(_.label){case 0:return n=o.createTraceId(),o.info(qe.A_ADD_TAG_FOR_CONVERSATIONS_T,JSON.stringify({conversations:t.map((function(e){return{conversationType:e.conversationType,targetId:e.targetId}})),tagId:e}),n),[4,i.addTagForConversations(e,t)];case 1:return a=_.sent().code,s=a===r.SUCCESS?"info":"warn",o[s](qe.A_ADD_TAG_FOR_CONVERSATIONS_R,JSON.stringify({code:a}),n),a===r.SUCCESS?[2,{code:a}]:[2,{code:a,msg:vt[a]}]}}))}))}))]}))}))}function vo(e,t){return Z(this,void 0,void 0,(function(){var n=this;return $(this,(function(i){return[2,new v(qe.A_REMOVE_CONVERSATIONS_FROM_TAG_T,qe.A_REMOVE_CONVERSATIONS_FROM_TAG_R).validate("tagId",e,T.STRING,!0).validate("conversations",t,(function(e){return!(!f("conversations",e,T.ARRAY,!0)||e.length<=0)&&!e.some((function(e){return!f("conversation",e,T.CONVERSATION,!0)}))}),!0).ifReady((function(i,o){return Z(n,void 0,void 0,(function(){var n,a,s;return $(this,(function(_){switch(_.label){case 0:return n=o.createTraceId(),o.info(qe.A_REMOVE_CONVERSATIONS_FROM_TAG_T,JSON.stringify({conversations:t.map((function(e){return{conversationType:e.conversationType,targetId:e.targetId}})),tagId:e}),n),[4,i.removeTagForConversations(e,t)];case 1:return a=_.sent().code,s=a===r.SUCCESS?"info":"warn",o[s](qe.A_REMOVE_CONVERSATIONS_FROM_TAG_R,JSON.stringify({code:a}),n),a===r.SUCCESS?[2,{code:a}]:[2,{code:a,msg:vt[a]}]}}))}))}))]}))}))}function fo(e,t){return Z(this,void 0,void 0,(function(){var n=this;return $(this,(function(i){return[2,new v(qe.A_REMOVE_TAGS_FROM_CONVERSATION_T,qe.A_REMOVE_TAGS_FROM_CONVERSATION_R).validate("conversation",e,T.OBJECT,!0).validate("conversationType",null==e?void 0:e.conversationType,T.CONVERSATION_TYPE,!0).validate("targetId",null==e?void 0:e.targetId,T.STRING,!0).validate("channelId",null==e?void 0:e.channelId,T.CHANNEL_ID).validate("tagIds",t,(function(e){return!!f("tagIds",e,T.ARRAY,!0)&&!e.some((function(e){return!h(e)}))}),!0).ifReady((function(i,o){return Z(n,void 0,void 0,(function(){var n,a,s;return $(this,(function(_){switch(_.label){case 0:return n=o.createTraceId(),o.info(qe.A_REMOVE_TAGS_FROM_CONVERSATION_T,JSON.stringify({tagIds:t,targetId:e.targetId,conversationType:e.conversationType}),n),[4,i.removeTagsForConversation(e,t)];case 1:return a=_.sent().code,s=a===r.SUCCESS?"info":"warn",o[s](qe.A_REMOVE_TAGS_FROM_CONVERSATION_R,JSON.stringify({code:a}),n),a===r.SUCCESS?[2,{code:a}]:[2,{code:a,msg:vt[a]}]}}))}))}))]}))}))}function Io(e,t){return Z(this,void 0,void 0,(function(){var n=this;return $(this,(function(i){return[2,new v(qe.A_REMOVE_TAG_FROM_CONVERSATIONS_T,qe.A_REMOVE_TAG_FROM_CONVERSATIONS_R).validate("tagId",e,T.STRING,!0).validate("conversations",t,(function(e){return!(!f("conversations",e,T.ARRAY,!0)||e.length<=0)&&!e.some((function(e){return!f("conversation",e,T.CONVERSATION,!0)}))}),!0).ifReady((function(i,o){return Z(n,void 0,void 0,(function(){var n,a,s;return $(this,(function(_){switch(_.label){case 0:return n=o.createTraceId(),o.info(qe.A_REMOVE_TAG_FROM_CONVERSATIONS_T,JSON.stringify({conversations:t.map((function(e){return{conversationType:e.conversationType,targetId:e.targetId}})),tagId:e}),n),[4,i.removeTagForConversations(e,t)];case 1:return a=_.sent().code,s=a===r.SUCCESS?"info":"warn",o[s](qe.A_REMOVE_TAG_FROM_CONVERSATIONS_R,JSON.stringify({code:a}),n),a===r.SUCCESS?[2,{code:a}]:[2,{code:a,msg:vt[a]}]}}))}))}))]}))}))}function Oo(e,t,n){return Z(this,void 0,void 0,(function(){var i=this;return $(this,(function(o){return[2,new v(qe.A_GET_CONVERSATIONS_FROM_TAG_BY_PAGE_T,qe.A_GET_CONVERSATIONS_FROM_TAG_BY_PAGE_R).validate("tagId",e,T.STRING,!0).validate("count",t,T.NUMBER,!0).validate("startTime",n,T.NUMBER,!0).ifReady((function(o,a){return Z(i,void 0,void 0,(function(){var i,s,_,c,d;return $(this,(function(u){switch(u.label){case 0:return i=a.createTraceId(),a.info(qe.A_GET_CONVERSATIONS_FROM_TAG_BY_PAGE_T,JSON.stringify({tagId:e,count:t,startTime:n}),i),[4,o.getConversationListByTag(e,n,t)];case 1:return s=u.sent(),_=s.code,c=s.data,_===r.SUCCESS?(d=null==c?void 0:c.map((function(e){return function(e){return Q(Q({},ke(e)),{isTopInTag:e.isTopInTag})}(e)})),a.info(qe.A_GET_CONVERSATIONS_FROM_TAG_BY_PAGE_R,JSON.stringify({code:_,length:null==d?void 0:d.length}),i),[2,{code:_,data:d}]):(a.warn(qe.A_GET_CONVERSATIONS_FROM_TAG_BY_PAGE_R,JSON.stringify({code:_}),i),[2,{code:_,msg:vt[_]}])}}))}))}))]}))}))}function No(e,t){return Z(this,void 0,void 0,(function(){var n=this;return $(this,(function(i){return[2,new v(qe.A_GET_UNREAD_COUNT_BY_TAG_T,qe.A_GET_UNREAD_COUNT_BY_TAG_R).validate("tagId",e,T.STRING,!0).validate("containMuted",t,T.BOOLEAN,!0).ifReady((function(i,o){return Z(n,void 0,void 0,(function(){var n,a,s,_,c;return $(this,(function(d){switch(d.label){case 0:return n=o.createTraceId(),o.info(qe.A_GET_UNREAD_COUNT_BY_TAG_T,JSON.stringify({tagId:e,containMuted:t}),n),[4,i.getUnreadCountByTag(e,t)];case 1:return a=d.sent(),s=a.code,_=a.data,c=s===r.SUCCESS?"info":"warn",o[c](qe.A_GET_UNREAD_COUNT_BY_TAG_T,JSON.stringify({code:s,data:_}),n),[2,{code:s,data:_}]}}))}))}))]}))}))}function go(e,t,n){return Z(this,void 0,void 0,(function(){var i=this;return $(this,(function(o){return[2,new v(qe.A_GET_UNREAD_COUNT_BY_TAG_T,qe.A_GET_UNREAD_COUNT_BY_TAG_R).validate("tagId",e,T.STRING,!0).validate("isTop",n,T.BOOLEAN,!0).validate("conversationType",null==t?void 0:t.conversationType,T.CONVERSATION_TYPE,!0).validate("targetId",null==t?void 0:t.targetId,T.STRING,!0).validate("channelId",null==t?void 0:t.channelId,T.CHANNEL_ID).ifReady((function(o,a){return Z(i,void 0,void 0,(function(){var i,s,_;return $(this,(function(c){switch(c.label){case 0:return i=a.createTraceId(),a.info(qe.A_GET_UNREAD_COUNT_BY_TAG_T,JSON.stringify({tagId:e,targetId:t.targetId,conversationType:t.conversationType,isTop:n}),i),[4,o.setConversationStatusInTag(e,t,{isTop:n})];case 1:return s=c.sent().code,_=s===r.SUCCESS?"info":"warn",a[_](qe.A_SET_CONVERSATION_STATUS_IN_TAG_R,JSON.stringify({code:s}),i),s===r.SUCCESS?[2,{code:s}]:[2,{code:s,msg:vt[s]}]}}))}))}))]}))}))}var Co={COMET:"comet",WEBSOCKET:"websocket"},ho={TEXT:"RC:TxtMsg",VOICE:"RC:VcMsg",HQ_VOICE:"RC:HQVCMsg",IMAGE:"RC:ImgMsg",GIF:"RC:GIFMsg",RICH_CONTENT:"RC:ImgTextMsg",LOCATION:"RC:LBSMsg",FILE:"RC:FileMsg",SIGHT:"RC:SightMsg",COMBINE:"RC:CombineMsg",COMBINE_V2:"RC:CombineV2Msg",CHRM_KV_NOTIFY:"RC:chrmKVNotiMsg",LOG_COMMAND:"RC:LogCmdMsg",EXPANSION_NOTIFY:"RC:MsgExMsg",REFERENCE:"RC:ReferenceMsg",RECALL_MESSAGE_TYPE:"RC:RcCmd"};function mo(e,t,n){return void 0===n&&(n={}),Z(this,void 0,void 0,(function(){var i=this;return $(this,(function(o){return[2,new v(qe.A_E_INSERT_MESSAGE_T,qe.A_E_INSERT_MESSAGE_R).validate("conversation",e,T.OBJECT,!0).validate("conversationType",null==e?void 0:e.conversationType,T.CONVERSATION_TYPE,!0).validate("targetId",null==e?void 0:e.targetId,T.STRING,!0).validate("channelId",null==e?void 0:e.channelId,T.CHANNEL_ID).validate("userId",t,(function(e){return f("message.senderUserId",null==e?void 0:e.senderUserId,T.STRING,!0)}),!0).validate("messageType",null==t?void 0:t.messageType,T.STRING,!0).validate("content",null==t?void 0:t.content,T.OBJECT,!0).validate("messageDirection",t.messageDirection,T.NUMBER,!0).validate("canIncludeExpansion",t.canIncludeExpansion,T.BOOLEAN).validate("expansion",t.expansion,T.OBJECT).validate("disableNotification",t.disableNotification,T.BOOLEAN).validate("sentTime",t.sentTime,T.NUMBER).validate("sentStatus",t.sentStatus,T.NUMBER).validate("receivedStatus",t.receivedStatus,T.NUMBER).validate("receivedStatusInfo",t.receivedStatusInfo,T.OBJECT).validate("directedUserIds",null==t?void 0:t.directedUserIds,b({maxLength:300,itemValidator:x})).validate("searchContent",null==n?void 0:n.searchContent,T.STRING).ifReady((function(o,a){return Z(i,void 0,void 0,(function(){var i,s,_,c,d,u,T,E,S,l,A,R,v,f,I,O,N,g,C,h;return $(this,(function(m){switch(m.label){case 0:return i=t.messageType,s=t.content,_=t.senderUserId,c=t.messageDirection,d=t.canIncludeExpansion,u=t.expansion,T=t.disableNotification,E=t.sentTime,S=t.sentStatus,l=t.receivedStatus,A=t.receivedStatusInfo,R=t.directedUserIds,v=a.createTraceId(),a.info(qe.A_E_INSERT_MESSAGE_T,JSON.stringify({conversationType:e.conversationType,targetId:e.targetId,messageType:i,sentTime:E}),v),f=n.isUnread,I=n.searchContent,O=l,A&&(O=K(A)),N={senderUserId:_,messageType:i,content:s,messageDirection:c,sentTime:E,sentStatus:S,searchContent:I,isUnread:!!f,messageUId:"",disableNotification:T,canIncludeExpansion:d,expansionMsg:JSON.stringify(u),channelId:e.channelId||"",readStatus:O,directedUserIds:R},[4,o.insertMessage(e.conversationType,e.targetId,N)];case 1:return g=m.sent(),C=g.code,h=g.data,C===r.SUCCESS?(a.info(qe.A_E_INSERT_MESSAGE_R,JSON.stringify({code:C,messageId:null==h?void 0:h.messageId}),v),[2,{code:C,data:xe(h)}]):(a.warn(qe.A_E_INSERT_MESSAGE_R,JSON.stringify({code:C}),v),[2,{code:C,msg:vt[C]}])}}))}))}))]}))}))}function Uo(e,t,n){return void 0===n&&(n={}),Z(this,void 0,void 0,(function(){var i=this;return $(this,(function(o){return[2,new v(qe.A_E_INSERT_MESSAGE_T,qe.A_E_INSERT_MESSAGE_R).validate("conversation",e,T.OBJECT,!0).validate("conversationType",null==e?void 0:e.conversationType,T.CONVERSATION_TYPE,!0).validate("targetId",null==e?void 0:e.targetId,T.STRING,!0).validate("channelId",null==e?void 0:e.channelId,T.CHANNEL_ID).validate("messageType",null==t?void 0:t.messageType,T.STRING,!0).validate("content",null==t?void 0:t.content,T.OBJECT,!0).validate("searchContent",null==n?void 0:n.searchContent,T.STRING).ifReady((function(o,a){return Z(i,void 0,void 0,(function(){var i,s,_,c,d,u,T,E,S,l;return $(this,(function(A){switch(A.label){case 0:return i=t.messageType,s=t.content,_=a.createTraceId(),a.info(qe.A_E_INSERT_MESSAGE_T,JSON.stringify({conversationType:e.conversationType,targetId:e.targetId,messageType:i}),_),c=n.isUnread,d=n.searchContent,u={senderUserId:"",messageType:i,content:s,searchContent:d,messageDirection:1,isUnread:!!c,messageUId:"",channelId:null!==(l=e.channelId)&&void 0!==l?l:""},[4,o.insertMessage(e.conversationType,e.targetId,u)];case 1:return T=A.sent(),E=T.code,S=T.data,E===r.SUCCESS?(a.info(qe.A_E_INSERT_MESSAGE_R,JSON.stringify({code:E,messageId:null==S?void 0:S.messageId}),_),[2,{code:E,data:xe(S)}]):(a.warn(qe.A_E_INSERT_MESSAGE_R,JSON.stringify({code:E}),_),[2,{code:E,msg:vt[E]}])}}))}))}))]}))}))}var po=Object.freeze({__proto__:null,getAllConversationList:function(e){return Z(this,void 0,void 0,(function(){var t=this;return $(this,(function(n){return V()?[2,new v(qe.A_E_GET_ALL_CONVERSATION_LIST_T,qe.A_E_GET_ALL_CONVERSATION_LIST_R).validate("channelId",e,T.CHANNEL_ID).ifReady((function(n,i){return Z(t,void 0,void 0,(function(){var t,o,a,s,_;return $(this,(function(c){switch(c.label){case 0:return t=i.createTraceId(),i.info(qe.A_E_GET_ALL_CONVERSATION_LIST_T,JSON.stringify({channelId:e}),t),Y(e)?[4,n.getConversationListWithAllChannel()]:[3,2];case 1:return o=c.sent(),[3,4];case 2:return[4,n.getConversationList(void 0,void 0,void 0,void 0,e)];case 3:o=c.sent(),c.label=4;case 4:return a=o.code,s=o.data,i.info(qe.A_E_GET_ALL_CONVERSATION_LIST_R,JSON.stringify({code:a,length:null==s?void 0:s.length}),t),a===r.SUCCESS&&s?(_=s.map((function(e){return ke(e)})),[2,{code:a,data:_}]):(i.warn(qe.A_E_GET_ALL_CONVERSATION_LIST_R,JSON.stringify({code:a}),t),[2,{code:a,msg:vt[a]}])}}))}))}))]:[2,{code:r.NOT_SUPPORT,msg:vt[r.NOT_SUPPORT]}]}))}))},getConversationList:function(e,t,n,i){return Z(this,void 0,void 0,(function(){var o=this;return $(this,(function(a){return V()?[2,new v(qe.A_E_GET_CONVERSATION_LIST_T,qe.A_E_GET_CONVERSATION_LIST_R).validate("startTime",e,T.NUMBER,!0).validate("count",t,T.NUMBER,!0).validate("channelId",n,T.CHANNEL_ID).ifReady((function(a,s){return Z(o,void 0,void 0,(function(){var o,_,c,d,u,T;return $(this,(function(E){switch(E.label){case 0:return o=s.createTraceId(),s.info(qe.A_E_GET_CONVERSATION_LIST_T,JSON.stringify({startTime:e,count:t,channelId:n}),o),Y(n)?[4,a.getConversationListWithAllChannelByPage(e,t)]:[3,2];case 1:return _=E.sent(),[3,4];case 2:return c=[1,2,3,5,6,7,8],[4,a.getConversationsByPage(c,e,t,n,!!i)];case 3:_=E.sent(),E.label=4;case 4:return d=_.code,u=_.data,d===r.SUCCESS&&u?(T=u.map((function(e){return ke(e)})),s.info(qe.A_E_GET_CONVERSATION_LIST_R,JSON.stringify({code:d,length:T.length}),o),[2,{code:d,data:T}]):(s.warn(qe.A_E_GET_CONVERSATION_LIST_R,JSON.stringify({code:d}),o),[2,{code:d,msg:vt[d]}])}}))}))}))]:[2,{code:r.NOT_SUPPORT,msg:vt[r.NOT_SUPPORT]}]}))}))},searchConversationByContent:function(e,t,n){return Z(this,void 0,void 0,(function(){var i=this;return $(this,(function(o){return V()?[2,new v(qe.A_E_SEARCH_CONVERSATION_BY_CONTENT_T,qe.A_E_SEARCH_CONVERSATION_BY_CONTENT_R).validate("keyword",e,T.STRING,!0).validate("messageTypes",t,(function(e){return!!E(e)&&!e.some((function(e){return!x(e)}))}),!0).validate("channelId",n,T.CHANNEL_ID).ifReady((function(o,a){return Z(i,void 0,void 0,(function(){var i,s,_,c,d;return $(this,(function(u){switch(u.label){case 0:return i=a.createTraceId(),a.info(qe.A_E_SEARCH_CONVERSATION_BY_CONTENT_T,JSON.stringify({keyword:e,messageTypes:t,channelId:n}),i),Y(n)?[4,o.searchConversationByContentWithAllChannel(e,t)]:[3,2];case 1:return s=u.sent(),[3,4];case 2:return[4,o.searchConversationByContent(e,t,n)];case 3:s=u.sent(),u.label=4;case 4:return _=s.code,c=s.data,_===r.SUCCESS&&c?(d=c.map((function(e){return ke(e)})),a.info(qe.A_E_SEARCH_CONVERSATION_BY_CONTENT_R,JSON.stringify({code:_,length:d.length}),i),[2,{code:_,data:d}]):(a.warn(qe.A_E_SEARCH_CONVERSATION_BY_CONTENT_R,JSON.stringify({code:_}),i),[2,{code:_,msg:vt[_]}])}}))}))}))]:[2,{code:r.NOT_SUPPORT,msg:vt[r.NOT_SUPPORT]}]}))}))},getConversations:function(e){return Z(this,void 0,void 0,(function(){var t=this;return $(this,(function(n){return V()?[2,new v(qe.A_GET_CONVERSATIONS_T,qe.A_GET_CONVERSATIONS_R).validate("conversationList",e,b({maxLength:100,minLength:1,itemValidator:function(e){return k(e,[s.PRIVATE,s.GROUP,s.SYSTEM])}}),!0).ifReady((function(n,i){return Z(t,void 0,void 0,(function(){var t,o,a,s,_;return $(this,(function(c){switch(c.label){case 0:return t=i.createTraceId(),i.info(qe.A_GET_CONVERSATIONS_T,JSON.stringify({conversations:e}),t),[4,n.getConversations(e)];case 1:return o=c.sent(),a=o.code,s=o.data,a===r.SUCCESS&&s?(_=s.map((function(e){return ke(e)})),i.info(qe.A_GET_CONVERSATIONS_R,JSON.stringify({code:a,length:_.length}),t),[2,{code:a,data:_}]):(i.warn(qe.A_GET_CONVERSATIONS_R,JSON.stringify({code:a}),t),[2,{code:a,msg:vt[a]}])}}))}))}))]:[2,{code:r.NOT_SUPPORT,msg:vt[r.NOT_SUPPORT]}]}))}))},searchMessages:function(e,t,n,i,o){return Z(this,void 0,void 0,(function(){var a=this;return $(this,(function(s){return V()?[2,new v(qe.A_E_SEARCH_MESSAGES_T,qe.A_E_SEARCH_MESSAGES_R).validate("conversation",e,T.OBJECT,!0).validate("conversationType",null==e?void 0:e.conversationType,T.CONVERSATION_TYPE,!0).validate("targetId",null==e?void 0:e.targetId,T.STRING,!0).validate("channelId",null==e?void 0:e.channelId,T.CHANNEL_ID).validate("keyword",t,T.STRING,!0).validate("startTime",n,T.NUMBER,!0).validate("count",i,T.NUMBER,!0).validate("messageTypes",o,b({itemValidator:x})).ifReady((function(s,_){return Z(a,void 0,void 0,(function(){var a,c,d,u,T,E,S,l,A,R,v;return $(this,(function(f){switch(f.label){case 0:return a=e.targetId,c=e.conversationType,d=e.channelId,u=_.createTraceId(),_.info(qe.A_E_SEARCH_MESSAGES_T,JSON.stringify({targetId:a,conversationType:c,channelId:d,keyword:t,startTime:n,count:i}),u),o?[4,s.searchMessageByContentAndMessageType(c,a,t,n,i,o,d)]:[3,2];case 1:return T=f.sent(),[3,6];case 2:return Y(d)?[4,s.searchMessageByContentWithAllChannel(c,a,t,n,i)]:[3,4];case 3:return T=f.sent(),[3,6];case 4:return[4,s.searchMessageByContent(c,a,t,n,i,0,d)];case 5:T=f.sent(),f.label=6;case 6:return E=T.code,S=T.data,E===r.SUCCESS&&S?(l=S.messages,A=S.count,R=[],v=l.map((function(e){return R.push(e.messageUId),xe(e)})),_.info(qe.A_E_SEARCH_MESSAGES_R,JSON.stringify({code:E,list:R}),u),[2,{code:E,data:{messages:v,count:A}}]):(_.warn(qe.A_E_SEARCH_MESSAGES_R,JSON.stringify({code:E}),u),[2,{code:E,msg:vt[E]}])}}))}))}))]:[2,{code:r.NOT_SUPPORT,msg:vt[r.NOT_SUPPORT]}]}))}))},searchMessageInTimeRange:function(e,t){return Z(this,void 0,void 0,(function(){var n=this;return $(this,(function(i){return V()?[2,new v(qe.A_E_SEARCH_MESSAGE_IN_TIME_RANGE_T,qe.A_E_SEARCH_MESSAGE_IN_TIME_RANGE_R).validate("conversation",e,T.OBJECT,!0).validate("conversationType",null==e?void 0:e.conversationType,T.CONVERSATION_TYPE,!0).validate("targetId",null==e?void 0:e.targetId,T.STRING,!0).validate("startTime",null==t?void 0:t.startTime,T.NUMBER,!0).validate("endTime",null==t?void 0:t.endTime,T.NUMBER,!0).validate("offset",null==t?void 0:t.offset,T.NUMBER).validate("limit",null==t?void 0:t.limit,T.NUMBER).validate("keyword",null==t?void 0:t.keyword,T.STRING,!0).ifReady((function(i,o){return Z(n,void 0,void 0,(function(){var n,a,s,_,c,d,u,T,E,S,l;return $(this,(function(A){switch(A.label){case 0:return n=e.conversationType,a=e.targetId,s=t.keyword,_=t.startTime,c=t.endTime,d=t.offset,u=t.limit,d=d||0,u=u||5,T=o.createTraceId(),o.info(qe.A_E_SEARCH_MESSAGE_IN_TIME_RANGE_T,JSON.stringify({targetId:a,conversationType:n,keyword:s,startTime:_,endTime:c,offset:d,limit:u}),T),[4,i.searchMessageByContentInTimeRangeWithAllChannel(n,a,s,_,c,d,u)];case 1:return E=A.sent(),S=E.code,l=E.data,S===r.SUCCESS&&l?[2,{code:S,data:{messages:l.messages.map((function(e){return xe(e)}))}}]:(o.warn(qe.A_E_SEARCH_MESSAGE_IN_TIME_RANGE_R,JSON.stringify({code:S}),T),[2,{code:S}])}}))}))}))]:[2,{code:r.NOT_SUPPORT,msg:vt[r.NOT_SUPPORT]}]}))}))},searchMessagesByUser:function(e,t,n,i){return Z(this,void 0,void 0,(function(){var o=this;return $(this,(function(a){return V()?[2,new v(qe.A_E_SEARCH_MESSAGES_BY_USER_T,qe.A_E_SEARCH_MESSAGES_BY_USER_R).validate("conversation",e,T.OBJECT,!0).validate("conversationType",null==e?void 0:e.conversationType,T.CONVERSATION_TYPE,!0).validate("targetId",null==e?void 0:e.targetId,T.STRING,!0).validate("channelId",null==e?void 0:e.channelId,T.CHANNEL_ID).validate("userId",t,T.STRING,!0).validate("startTime",n,T.NUMBER,!0).validate("count",i,T.NUMBER,!0).ifReady((function(a,s){return Z(o,void 0,void 0,(function(){var o,_,c,d,u,T,E;return $(this,(function(S){switch(S.label){case 0:return o=e.conversationType,_=e.targetId,c=e.channelId,d=s.createTraceId(),s.info(qe.A_E_SEARCH_MESSAGES_BY_USER_T,JSON.stringify({targetId:_,conversationType:o,channelId:c,startTime:n,userId:t,count:i}),d),[4,a.searchMessagesByUser(o,_,t,n,i,c)];case 1:return u=S.sent(),T=u.code,E=u.data,T===r.SUCCESS&&E?[2,{code:T,data:{messages:E.messages.map((function(e){return xe(e)}))}}]:(s.warn(qe.A_E_SEARCH_MESSAGES_BY_USER_R,JSON.stringify({code:T})),[2,{code:T}])}}))}))}))]:[2,{code:r.NOT_SUPPORT,msg:vt[r.NOT_SUPPORT]}]}))}))},getHistoryMessagesByMessageTypes:function(e,t){return Z(this,void 0,void 0,(function(){var n=this;return $(this,(function(i){return V()?[2,new v(qe.A_E_GET_HISTORY_MESSAGES_BY_MESSAGE_TYPES_T,qe.A_E_GET_HISTORY_MESSAGES_BY_MESSAGE_TYPES_R).validate("conversation",e,T.OBJECT,!0).validate("conversationType",null==e?void 0:e.conversationType,T.CONVERSATION_TYPE,!0).validate("targetId",null==e?void 0:e.targetId,T.STRING,!0).validate("channelId",null==e?void 0:e.channelId,T.CHANNEL_ID).validate("count",null==t?void 0:t.count,T.NUMBER).validate("count",null==t?void 0:t.count,(function(e){var t=e>0&&e<=100;return t||null===console||void 0===console||console.error("option.count is invalid, It should be greater than 0 and less than 100"),t})).validate("timestamp",null==t?void 0:t.timestamp,T.NUMBER).validate("order",null==t?void 0:t.order,(function(e){return[0,1].includes(e)})).validate("messageTypes",null==t?void 0:t.messageTypes,(function(e){return!!E(e)&&!e.some((function(e){return!x(e)}))}),!0).ifReady((function(i,o){return Z(n,void 0,void 0,(function(){var n,a,s,_,c,d,u,T,E,S,l,A,R,v,f,I,O,N,g;return $(this,(function(C){switch(C.label){case 0:return n=t.count,a=void 0===n?20:n,s=t.timestamp,_=void 0===s?0:s,c=t.order,d=void 0===c?0:c,u=t.messageTypes,T=e.conversationType,E=e.targetId,S=e.channelId,l=void 0===S?"":S,A=o.createTraceId(),o.info(qe.A_E_GET_HISTORY_MESSAGES_BY_MESSAGE_TYPES_T,JSON.stringify({targetId:E,conversationType:T,channelId:l,count:a,timestamp:_,messageTypes:u}),A),[4,i.getHistoryMessagesByObjectNames(T,E,_,a,u,d,l)];case 1:return R=C.sent(),v=R.code,f=R.data,v===r.SUCCESS?(O=(I=f).list,N=I.hasMore,g=O.map((function(e){return xe(e)})),[2,{code:v,data:{messages:g,hasMore:N,list:g}}]):(o.warn(qe.A_E_GET_HISTORY_MESSAGES_BY_MESSAGE_TYPES_R,JSON.stringify({code:v})),[2,{code:v,msg:vt[v]}])}}))}))}))]:[2,{code:r.NOT_SUPPORT,msg:vt[r.NOT_SUPPORT]}]}))}))},getContinuousMessages:function(e,t){return Z(this,void 0,void 0,(function(){var n=this;return $(this,(function(i){return V()?[2,new v(qe.A_E_GET_CONTINUOUS_MESSAGES_T,qe.A_E_GET_CONTINUOUS_MESSAGES_R).validate("conversation",e,T.OBJECT,!0).validate("conversationType",null==e?void 0:e.conversationType,T.CONVERSATION_TYPE,!0).validate("targetId",null==e?void 0:e.targetId,T.STRING,!0).validate("channelId",null==e?void 0:e.channelId,T.CHANNEL_ID).validate("timestamp",null==t?void 0:t.timestamp,T.NUMBER).validate("count",null==t?void 0:t.count,T.NUMBER).validate("count",null==t?void 0:t.count,(function(e){var t=e>0&&e<=100;return t||null===console||void 0===console||console.error('"options.count" is invalid, It should be greater than 0 and less than 100'),t})).validate("order",null==t?void 0:t.order,(function(e){return 0===e||1===e})).ifReady((function(i,o){return Z(n,void 0,void 0,(function(){var n,a,s,_,c,d,u,T,E,S,l,A,R,v,f;return $(this,(function(I){switch(I.label){case 0:return n=t.count,a=t.timestamp,s=t.order,_=e.conversationType,c=e.targetId,d=e.channelId,u=o.createTraceId(),o.info(qe.A_E_GET_CONTINUOUS_MESSAGES_T,JSON.stringify({targetId:c,conversationType:_,channelId:d,count:n,timestamp:a}),u),(i.getNaviInfoFromCache()||{}).historyMsg?[4,i.getContinuousMessages(_,c,a||0,n||20,s||0,d||"")]:[2,{code:r.MESSAGE_STORAGE_SERVICE_UNAVAILABLE}];case 1:return T=I.sent(),E=T.code,S=T.data,E===r.SUCCESS?(A=(l=S).list,R=l.timestamp,v=l.hasMore,f=A.map((function(e){return xe(e)})),[2,{code:E,data:{list:f,timestamp:R,hasMore:v}}]):(o.warn(qe.A_E_GET_CONTINUOUS_MESSAGES_R,JSON.stringify({code:E})),[2,{code:E,msg:vt[E]}])}}))}))}))]:[2,{code:r.NOT_SUPPORT,msg:vt[r.NOT_SUPPORT]}]}))}))},setMessageStatusToRead:function(e,t){return Z(this,void 0,void 0,(function(){var n=this;return $(this,(function(i){return V()?[2,new v(qe.A_E_SET_MESSAGE_STATUS_TO_READ_T,qe.A_E_SET_MESSAGE_STATUS_TO_READ_R).validate("conversation",e,T.OBJECT,!0).validate("conversationType",null==e?void 0:e.conversationType,T.CONVERSATION_TYPE,!0).validate("targetId",null==e?void 0:e.targetId,T.STRING,!0).validate("channelId",null==e?void 0:e.channelId,T.CHANNEL_ID).validate("timestamp",t,T.NUMBER,!0).ifReady((function(i,o){return Z(n,void 0,void 0,(function(){var n,r,a,s,_;return $(this,(function(c){switch(c.label){case 0:return n=e.conversationType,r=e.targetId,a=e.channelId,s=o.createTraceId(),o.info(qe.A_E_SET_MESSAGE_STATUS_TO_READ_T,JSON.stringify({targetId:r,conversationType:n,channelId:a,timestamp:t}),s),[4,i.setMessageStatusToRead(n,r,t,a)];case 1:return _=c.sent(),o.info(qe.A_E_SET_MESSAGE_STATUS_TO_READ_R,JSON.stringify(_),s),[2,_]}}))}))}))]:[2,{code:r.NOT_SUPPORT,msg:vt[r.NOT_SUPPORT]}]}))}))},setMessageReceivedStatus:function(e,t){return Z(this,void 0,void 0,(function(){var n=this;return $(this,(function(i){return console.warn("`setMessageReceivedStatus` has being deprecated, use `setMessageReceivedStatusInfo` instead."),V()?[2,new v(qe.A_E_SET_MESSAGE_RECEIVED_STATUS_T,qe.A_E_SET_MESSAGE_RECEIVED_STATUS_R).validate("messageId",e,T.NUMBER,!0).validate("receivedStatus",t,(function(e){return!Y(a[e])}),!0).ifReady((function(i,o){return Z(n,void 0,void 0,(function(){var n,r;return $(this,(function(a){switch(a.label){case 0:return n=o.createTraceId(),o.info(qe.A_E_SET_MESSAGE_RECEIVED_STATUS_T,JSON.stringify({messageId:e,receivedStatus:t}),n),[4,i.setMessageReceivedStatus(e,t)];case 1:return r=a.sent(),o.info(qe.A_E_SET_MESSAGE_RECEIVED_STATUS_R,JSON.stringify({code:r}),n),[2,{code:r}]}}))}))}))]:[2,{code:r.NOT_SUPPORT,msg:vt[r.NOT_SUPPORT]}]}))}))},setMessageReceivedStatusInfo:function(e,t){return Z(this,void 0,void 0,(function(){var n=this;return $(this,(function(i){return V()?[2,new v(qe.A_E_SET_MESSAGE_SENT_STATUS_INFO_T,qe.A_E_SET_MESSAGE_SENT_STATUS_INFO_R).validate("messageId",e,T.NUMBER,!0).validate("receivedStatusInfo",t,T.OBJECT,!0).validate("receivedStatusInfo",null==t?void 0:t.isRead,T.BOOLEAN).validate("receivedStatusInfo",null==t?void 0:t.isListened,T.BOOLEAN).validate("receivedStatusInfo",null==t?void 0:t.isDownload,T.BOOLEAN).validate("receivedStatusInfo",null==t?void 0:t.isRetrieved,T.BOOLEAN).ifReady((function(i,o){return Z(n,void 0,void 0,(function(){var n,r,a;return $(this,(function(s){switch(s.label){case 0:return n=K(t),r=o.createTraceId(),o.info(qe.A_E_SET_MESSAGE_SENT_STATUS_INFO_T,JSON.stringify({messageId:e,sentStatus:n}),r),[4,i.setMessageReceivedStatus(e,n)];case 1:return a=s.sent(),o.info(qe.A_E_SET_MESSAGE_SENT_STATUS_INFO_R,JSON.stringify({code:a}),r),[2,{code:a}]}}))}))}))]:[2,{code:r.NOT_SUPPORT,msg:vt[r.NOT_SUPPORT]}]}))}))},setMessageSentStatus:function(e,t){return Z(this,void 0,void 0,(function(){var n=this;return $(this,(function(i){return V()?[2,new v(qe.A_E_SET_MESSAGE_SENT_STATUS_T,qe.A_E_SET_MESSAGE_SENT_STATUS_T).validate("messageId",e,T.NUMBER,!0).validate("sentStatus",t,(function(e){return!Y(H[e])}),!0).ifReady((function(i,o){return Z(n,void 0,void 0,(function(){var n,r;return $(this,(function(a){switch(a.label){case 0:return n=o.createTraceId(),o.info(qe.A_E_SET_MESSAGE_SENT_STATUS_T,JSON.stringify({messageId:e,sentStatus:t}),n),[4,i.setMessageSentStatus(e,t)];case 1:return r=a.sent(),o.info(qe.A_E_SET_MESSAGE_SENT_STATUS_R,JSON.stringify({code:r}),n),[2,{code:r}]}}))}))}))]:[2,{code:r.NOT_SUPPORT,msg:vt[r.NOT_SUPPORT]}]}))}))},setMessageContent:function(e,t,n){return void 0===n&&(n=""),Z(this,void 0,void 0,(function(){var i=this;return $(this,(function(o){return V()?[2,new v(qe.A_E_SET_MESSAGE_CONTENT_T,qe.A_E_SET_MESSAGE_CONTENT_R).validate("messageId",e,T.NUMBER,!0).validate("content",t,T.OBJECT,!0).validate("messageType",n,T.ONLY_STRING,!0).ifReady((function(o,r){return Z(i,void 0,void 0,(function(){var i,a;return $(this,(function(s){switch(s.label){case 0:return i=r.createTraceId(),r.info(qe.A_E_SET_MESSAGE_CONTENT_T,JSON.stringify({messageId:e,messageType:n}),i),[4,o.setMessageContent(e,t,n)];case 1:return a=s.sent(),r.info(qe.A_E_SET_MESSAGE_CONTENT_R,JSON.stringify({code:a}),i),[2,{code:a}]}}))}))}))]:[2,{code:r.NOT_SUPPORT,msg:vt[r.NOT_SUPPORT]}]}))}))},deleteMessages:function(e){return Z(this,void 0,void 0,(function(){var t=this;return $(this,(function(n){return V()?[2,new v(qe.A_E_DELETE_MESSAGES_T,qe.A_E_DELETE_MESSAGES_R).validate("messageIds",e,(function(e){return!!E(e)&&!e.some((function(e){return!C(e)}))}),!0).ifReady((function(n,i){return Z(t,void 0,void 0,(function(){var t,o;return $(this,(function(r){switch(r.label){case 0:return t=i.createTraceId(),i.info(qe.A_E_DELETE_MESSAGES_T,JSON.stringify({messageIds:e}),t),[4,n.deleteMessages(e)];case 1:return o=r.sent(),i.info(qe.A_E_DELETE_MESSAGES_R,JSON.stringify({code:o}),t),[2,{code:o}]}}))}))}))]:[2,{code:r.NOT_SUPPORT,msg:vt[r.NOT_SUPPORT]}]}))}))},clearMessages:function(e){return Z(this,void 0,void 0,(function(){var t=this;return $(this,(function(n){return V()?[2,new v(qe.A_E_CLEAR_MESSAGES_T,qe.A_E_CLEAR_MESSAGES_R).validate("conversation",e,T.OBJECT,!0).validate("conversationType",null==e?void 0:e.conversationType,T.CONVERSATION_TYPE,!0).validate("targetId",null==e?void 0:e.targetId,T.STRING,!0).validate("channelId",null==e?void 0:e.channelId,T.CHANNEL_ID).ifReady((function(n,i){return Z(t,void 0,void 0,(function(){var t,o,r,a,s;return $(this,(function(_){switch(_.label){case 0:return t=e.conversationType,o=e.targetId,r=e.channelId,a=i.createTraceId(),i.info(qe.A_E_CLEAR_MESSAGES_T,JSON.stringify({conversationType:t,targetId:o,channelId:r}),a),[4,n.clearMessages(t,o,r)];case 1:return s=_.sent(),i.info(qe.A_E_CLEAR_MESSAGES_R,JSON.stringify({code:s}),a),[2,{code:s}]}}))}))}))]:[2,{code:r.NOT_SUPPORT,msg:vt[r.NOT_SUPPORT]}]}))}))},deleteMessagesByTimestamp:function(e,t,n){return Z(this,void 0,void 0,(function(){var i,o,a,s=this;return $(this,(function(_){return V()?(i=e.conversationType,o=e.targetId,a=e.channelId,[2,new v(qe.A_E_DELETE_MESSAGES_BY_TIMESTAMP_T,qe.A_E_DELETE_MESSAGES_BY_TIMESTAMP_R).validate("conversation",e,T.OBJECT,!0).validate("conversationType",null==e?void 0:e.conversationType,T.CONVERSATION_TYPE,!0).validate("targetId",null==e?void 0:e.targetId,T.STRING,!0).validate("channelId",null==e?void 0:e.channelId,T.CHANNEL_ID).validate("timestamp",t,T.NUMBER,!0).validate("cleanSpace",n,T.BOOLEAN).ifReady((function(e,_){return Z(s,void 0,void 0,(function(){var s,c,d;return $(this,(function(u){switch(u.label){case 0:return s=_.createTraceId(),_.info(qe.A_E_DELETE_MESSAGES_BY_TIMESTAMP_T,JSON.stringify({conversationType:i,targetId:o,channelId:a,timestamp:t,cleanSpace:n}),s),[4,e.deleteMessagesByTimestamp(i,o,t,n,a)];case 1:return c=u.sent(),d=c===r.SUCCESS?"info":"warn",_[d](qe.A_E_DELETE_MESSAGES_BY_TIMESTAMP_R,JSON.stringify({code:c}),s),[2,{code:c}]}}))}))}))]):[2,{code:r.NOT_SUPPORT,msg:vt[r.NOT_SUPPORT]}]}))}))},batchClearMessagesByTimestamp:function(e){return Z(this,void 0,void 0,(function(){var t=this;return $(this,(function(n){return V()?[2,new v(qe.A_BATCH_CLEAR_MSG_T,qe.A_BATCH_CLEAR_MSG_R).ifReady((function(n,i){return Z(t,void 0,void 0,(function(){var t,o,a,_;return $(this,(function(c){switch(c.label){case 0:return t=function(e,t){if(!f("options",e,T.ARRAY,!0)||!f("options",e,(function(n){return!(e.length>20||0===e.length)||(t.error(qe.A_BATCH_CLEAR_MSG_R,"conversations length should not be greater than 20 and not be equal to 0"),!1)}),!0))return r.INVALID_PARAMETER_CLEAR_MESSAGE_OPTION_LIST;for(var n=0,i=e;n<i.length;n++){var o=i[n];if(!(f("options",o,T.OBJECT,!0)&&f("options.targetId",o.targetId,T.STRING,!0)&&f("options.conversationType",o.conversationType,(function(e){var n=[s.PRIVATE,s.GROUP,s.CHATROOM,s.SYSTEM].includes(e);return n||t.error(qe.A_BATCH_CLEAR_MSG_R,"conversations.conversationType is invalid, It should be one of the following values:\n ConversationType.PRIVATE,\n ConversationType.GROUP,\n ConversationType.CHATROOM,\n ConversationType.SYSTEM,\n "),n}),!0)&&f("options.timestamp",o.timestamp,T.NUMBER,!0)&&f("options.channelId",o.channelId,T.ONLY_STRING)))return r.INVALID_PARAMETER_CLEAR_MESSAGE_OPTION_LIST}}(e,i),t?[2,{code:r.INVALID_PARAMETER_CLEAR_MESSAGE_OPTION_LIST}]:(o=e.map((function(e){return{conversationType:e.conversationType,targetId:e.targetId,timestamp:e.timestamp,channelId:e.channelId||""}})),a=i.createTraceId(),i.info(qe.A_BATCH_CLEAR_MSG_T,"options: "+JSON.stringify(o),a),[4,n.batchClearMessagesByTimestamp(o)]);case 1:return _=c.sent(),i[r.SUCCESS===_?"info":"warn"](qe.A_BATCH_CLEAR_MSG_R,"code: "+_,a),[2,{code:_}]}}))}))}))]:[2,{code:r.NOT_SUPPORT,msg:vt[r.NOT_SUPPORT]}]}))}))},insertMessage:function(e,t,n){return void 0===n&&(n={}),Z(this,void 0,void 0,(function(){return $(this,(function(i){return V()?t instanceof Bn?[2,Uo(e,t,n)]:[2,mo(e,t,n)]:[2,{code:r.NOT_SUPPORT,msg:vt[r.NOT_SUPPORT]}]}))}))},batchInsertMessage:function(e,t){return Z(this,void 0,void 0,(function(){var n=this;return $(this,(function(i){return V()?[2,new v(qe.A_E_BATCH_INSERT_MESSAGE_R,qe.A_E_BATCH_INSERT_MESSAGE_R).validate("messages",e,(function(e){var t,n,i,o;if(!f("messages",e,T.ARRAY,!0))return!1;if(e.length<=0||e.length>=500)return!1;for(var r in e)if(!f("message",e[r],T.OBJECT,!0)||!f("message.conversationType",e[r].conversationType,(function(e){return[s.PRIVATE,s.DISCUSSION,s.GROUP,s.CUSTOMER_SERVICE,s.SYSTEM,s.APP_PUBLIC_SERVICE,s.PUBLIC_SERVICE].includes(e)}),!0)||!f("message.targetId",e[r].targetId,T.STRING,!0)||!f("message.senderUserId",e[r].senderUserId,T.STRING,!0)||!f("message.messageType",e[r].messageType,T.STRING,!0)||!f("message.content",e[r].content,T.OBJECT,!0)||!f("message.messageDirection",e[r].messageDirection,T.NUMBER,!0)||!f("message.canIncludeExpansion",e[r].canIncludeExpansion,T.BOOLEAN)||!f("message.expansion",e[r].expansion,T.OBJECT)||!f("message.disableNotification",e[r].disableNotification,T.BOOLEAN)||!f("message.sentTime",e[r].sentTime,T.NUMBER)||!f("message.sentStatus",e[r].sentStatus,T.NUMBER)||!f("options.isUnread",null===(t=e[r])||void 0===t?void 0:t.isUnread,T.BOOLEAN)||!f("options.searchContent",null===(n=e[r])||void 0===n?void 0:n.searchContent,T.STRING)||!f("options.receivedStatus",null===(i=e[r])||void 0===i?void 0:i.receivedStatus,T.NUMBER)||!f("options.receivedStatusInfo",null===(o=e[r])||void 0===o?void 0:o.receivedStatusInfo,T.OBJECT)||e[r].directedUserIds&&e[r].directedUserIds.some((function(e){return!f("userId",e,T.STRING,!0)}))&&e[r].directedUserIds.length<300)return console.warn("then "+r+" index message validation failed"),!1;return!0}),!0).validate("checkDuplicate",t,T.BOOLEAN).ifReady((function(i,o){return Z(n,void 0,void 0,(function(){var n,a,s,_;return $(this,(function(c){switch(c.label){case 0:return n=o.createTraceId(),o.info(qe.A_E_BATCH_INSERT_MESSAGE_T,JSON.stringify({checkDuplicate:t,length:e.length}),n),[4,i.batchInsertMessage(e,t)];case 1:return a=c.sent(),s=a.code,_=a.data,s===r.SUCCESS?(o.info(qe.A_E_BATCH_INSERT_MESSAGE_R,JSON.stringify({code:s,data:_}),n),[2,{code:s,data:_}]):(o.warn(qe.A_E_BATCH_INSERT_MESSAGE_R,JSON.stringify({code:s}),n),[2,{code:s,msg:vt[s]}])}}))}))}))]:[2,{code:r.NOT_SUPPORT,msg:vt[r.NOT_SUPPORT]}]}))}))},getMessageCount:function(e){return Z(this,void 0,void 0,(function(){var t=this;return $(this,(function(n){return V()?[2,new v(qe.A_E_GET_MESSAGE_COUNT_T,qe.A_E_GET_MESSAGE_COUNT_R).validate("conversation",e,T.OBJECT,!0).validate("conversationType",null==e?void 0:e.conversationType,T.CONVERSATION_TYPE,!0).validate("targetId",null==e?void 0:e.targetId,T.STRING,!0).validate("channelId",null==e?void 0:e.channelId,T.CHANNEL_ID).ifReady((function(n,i){return Z(t,void 0,void 0,(function(){var t,o,r,a,s,_,c;return $(this,(function(d){switch(d.label){case 0:return t=e.conversationType,o=e.targetId,r=e.channelId,a=i.createTraceId(),i.info(qe.A_E_GET_MESSAGE_COUNT_T,JSON.stringify({conversationType:t,targetId:o,channelId:r}),a),[4,n.getMessageCount(t,o,r)];case 1:return s=d.sent(),_=s.code,c=s.data,i.info(qe.A_E_GET_MESSAGE_COUNT_R,JSON.stringify({code:_,data:c}),a),[2,{code:_,data:c}]}}))}))}))]:[2,{code:r.NOT_SUPPORT,msg:vt[r.NOT_SUPPORT]}]}))}))},getPrivateMessageDeliverTime:function(e){return Z(this,void 0,void 0,(function(){var t=this;return $(this,(function(n){return V()?[2,new v(qe.A_E_GET_PRIVATE_MESSAGE_DELIVER_TIME_T,qe.A_E_GET_PRIVATE_MESSAGE_DELIVER_TIME_R).validate("messageUId",e,T.STRING,!0).ifReady((function(n,i){return Z(t,void 0,void 0,(function(){var t,o,a,s;return $(this,(function(_){switch(_.label){case 0:return t=i.createTraceId(),i.info(qe.A_E_GET_PRIVATE_MESSAGE_DELIVER_TIME_T,JSON.stringify({messageUId:e}),t),[4,n.getPrivateMessageDeliverTime(e)];case 1:return o=_.sent(),a=o.code,s=o.data,a===r.SUCCESS?(i.info(qe.A_E_GET_PRIVATE_MESSAGE_DELIVER_TIME_R,JSON.stringify({code:a,data:s}),t),[2,{code:a,data:s}]):(i.warn(qe.A_E_GET_PRIVATE_MESSAGE_DELIVER_TIME_R,JSON.stringify({code:a}),t),[2,{code:a,msg:vt[a]}])}}))}))}))]:[2,{code:r.NOT_SUPPORT,msg:vt[r.NOT_SUPPORT]}]}))}))},getGroupMessageDeliverList:function(e,t){return Z(this,void 0,void 0,(function(){var n=this;return $(this,(function(i){return V()?[2,new v(qe.A_E_GET_GROUP_MESSAGE_DELIVER_LIST_T,qe.A_E_GET_GROUP_MESSAGE_DELIVER_LIST_R).validate("targetId",e,T.STRING,!0).validate("messageUId",t,T.STRING,!0).ifReady((function(i,o){return Z(n,void 0,void 0,(function(){var n,a,s,_,c;return $(this,(function(d){switch(d.label){case 0:return n=o.createTraceId(),o.info(qe.A_E_GET_GROUP_MESSAGE_DELIVER_LIST_T,JSON.stringify({targetId:e,messageUId:t}),n),[4,i.getGroupMessageDeliverList(e,t)];case 1:return a=d.sent(),s=a.code,_=a.data,c=s===r.SUCCESS?"info":"warn",o[c](qe.A_E_GET_GROUP_MESSAGE_DELIVER_LIST_R,JSON.stringify({code:s}),n),s===r.SUCCESS?[2,{code:s,data:_}]:[2,{code:s,msg:vt[s]}]}}))}))}))]:[2,{code:r.NOT_SUPPORT,msg:vt[r.NOT_SUPPORT]}]}))}))},setCheckDuplicateMessage:function(e){return Z(this,void 0,void 0,(function(){var t=this;return $(this,(function(n){return V()?[2,new v(qe.A_E_SET_CHECK_DUPLICATE_MESSAGE_T,qe.A_E_SET_CHECK_DUPLICATE_MESSAGE_R).validate("checkDuplicate",e,T.BOOLEAN).ifReady((function(n,i){return Z(t,void 0,void 0,(function(){var t,o,r,a;return $(this,(function(s){switch(s.label){case 0:return t=i.createTraceId(),i.info(qe.A_E_SET_CHECK_DUPLICATE_MESSAGE_T,JSON.stringify({checkDuplicate:e}),t),[4,n.setCheckDuplicateMessage(!!e)];case 1:return o=s.sent(),r=o.code,a=o.data,i.info(qe.A_E_SET_CHECK_DUPLICATE_MESSAGE_R,JSON.stringify({code:r,data:a}),t),[2,{code:r}]}}))}))}))]:[2,{code:r.NOT_SUPPORT,msg:vt[r.NOT_SUPPORT]}]}))}))},setCheckChatRoomDuplicateMessage:function(e){return Z(this,void 0,void 0,(function(){var t=this;return $(this,(function(n){return V()?[2,new v(qe.A_E_SET_CHECK_CHAT_ROOM_DUPLICATE_MESSAGE_T,qe.A_E_SET_CHECK_CHAT_ROOM_DUPLICATE_MESSAGE_R).validate("checkDuplicate",e,T.BOOLEAN).ifReady((function(n,i){return Z(t,void 0,void 0,(function(){var t,o,r,a;return $(this,(function(s){switch(s.label){case 0:return t=i.createTraceId(),i.info(qe.A_E_SET_CHECK_CHAT_ROOM_DUPLICATE_MESSAGE_T,JSON.stringify({checkDuplicate:e}),t),[4,n.setCheckChatRoomDuplicateMessage(!!e)];case 1:return o=s.sent(),r=o.code,a=o.data,i.info(qe.A_E_SET_CHECK_CHAT_ROOM_DUPLICATE_MESSAGE_R,JSON.stringify({code:r,data:a}),t),[2,{code:r}]}}))}))}))]:[2,{code:r.NOT_SUPPORT,msg:vt[r.NOT_SUPPORT]}]}))}))},getMessagesAroundTimestamp:function(e,t){return Z(this,void 0,void 0,(function(){var n=this;return $(this,(function(i){return V()?[2,new v(qe.A_GET_MESSAGE_BY_TIMESTAMP_T,qe.A_GET_MESSAGE_BY_TIMESTAMP_R).validate("conversation",e,T.OBJECT,!0).validate("conversationType",null==e?void 0:e.conversationType,T.CONVERSATION_TYPE,!0).validate("targetId",null==e?void 0:e.targetId,J,!0).validate("channelId",null==e?void 0:e.channelId,T.CHANNEL_ID).validate("timestamp",null==t?void 0:t.timestamp,X({min:0}),!0).validate("beforeCount",null==t?void 0:t.beforeCount,X({min:0}),!0).validate("afterCount",null==t?void 0:t.afterCount,X({min:0}),!0).ifReady((function(i,o){return Z(n,void 0,void 0,(function(){var n,a,s,_,c,d,u;return $(this,(function(T){switch(T.label){case 0:return n=o.createTraceId(),o.info(qe.A_GET_MESSAGE_BY_TIMESTAMP_T,JSON.stringify({option:t,conversation:e}),n),a=t.timestamp,s=t.beforeCount,_=t.afterCount,[4,i.getMessagesByTimestamp(e,a,s,_)];case 1:return c=T.sent(),d=c.code,u=c.data,d===r.SUCCESS?(o.info(qe.A_GET_MESSAGE_BY_TIMESTAMP_R,JSON.stringify({code:d,data:u}),n),[2,{code:d,data:null==u?void 0:u.map((function(e){return xe(e)}))}]):(o.warn(qe.A_GET_MESSAGE_BY_TIMESTAMP_R,JSON.stringify({code:d}),n),[2,{code:d,msg:vt[d]}])}}))}))}))]:[2,{code:r.NOT_SUPPORT,msg:vt[r.NOT_SUPPORT]}]}))}))},clearLocalData:function(){return Z(this,void 0,void 0,(function(){var e=this;return $(this,(function(t){return V()?[2,it((function(t,n){return Z(e,void 0,void 0,(function(){var e,i,o,a,s;return $(this,(function(_){switch(_.label){case 0:return e=n.createTraceId(),n.info(qe.A_E_SET_CHECK_DUPLICATE_MESSAGE_T,"clearLocalData ->",e),[4,t.clearData()];case 1:return i=_.sent(),o=i.code,a=i.data,s=o===r.SUCCESS?"info":"warn",n[s](qe.A_E_SET_CHECK_DUPLICATE_MESSAGE_R,JSON.stringify({code:o}),e),[2,{code:o,data:a}]}}))}))}))]:[2,{code:r.NOT_SUPPORT,msg:vt[r.NOT_SUPPORT]}]}))}))},enable:function(){return V()}});function yo(e){return Z(this,void 0,void 0,(function(){var t=this;return $(this,(function(n){return[2,new v(qe.A_SET_PROXY_T,qe.A_SET_PROXY_R).validate("set.proxy",e,(function(t){return!!(!e||f("proxy.socksHost",e.socksHost,T.STRING,!0)&&f("proxy.socksPort",e.socksPort,T.NUMBER,!0))})).ifReady((function(n,i){return Z(t,void 0,void 0,(function(){var t,o,a;return $(this,(function(s){switch(s.label){case 0:return t=i.createTraceId(),i.info(qe.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 o=s.sent().code,a=o===r.SUCCESS?"info":"warn",i[a](qe.A_SET_PROXY_R,JSON.stringify({code:o}),t),o===r.SUCCESS?[2,{code:o}]:[2,{code:o,msg:vt[o]}]}}))}))}))]}))}))}function Go(){return Z(this,void 0,void 0,(function(){var e=this;return $(this,(function(t){return[2,new v(qe.A_GET_PROXY_T,qe.A_GET_PROXY_R).ifReady((function(t,n){return Z(e,void 0,void 0,(function(){var e,i,o,a;return $(this,(function(s){switch(s.label){case 0:return e=n.createTraceId(),n.info(qe.A_GET_PROXY_T,"",e),[4,t.getProxy()];case 1:return i=s.sent(),o=i.code,a=i.data,o===r.SUCCESS?(n.info(qe.A_GET_PROXY_R,JSON.stringify({code:o,data:a}),e),[2,{code:o,data:a}]):(n.warn(qe.A_GET_PROXY_R,JSON.stringify({code:o}),e),[2,{code:o,msg:vt[o]}])}}))}))}))]}))}))}function Mo(e,t){return Z(this,void 0,void 0,(function(){var n=this;return $(this,(function(i){return[2,new v(qe.A_TEST_PROXY_T,qe.A_TEST_PROXY_R).validate("test.proxy",e,T.OBJECT,!0).validate("test.proxy.socksHost",null==e?void 0:e.socksHost,T.STRING,!0).validate("test.proxy.socksPort",null==e?void 0:e.socksPort,T.NUMBER,!0).ifReady((function(i,o){return Z(n,void 0,void 0,(function(){var n,a,s,_;return $(this,(function(c){switch(c.label){case 0:return n=o.createTraceId(),o.info(qe.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 a=c.sent(),s=a.status,_=a.data,s===r.SUCCESS?[2,{code:s,msg:_}]:(o.warn(qe.A_TEST_PROXY_R,JSON.stringify({status:s}),n),[2,{code:s,msg:vt[s]}])}}))}))}))]}))}))}function Lo(e,t,n){return Z(this,void 0,void 0,(function(){var i=this;return $(this,(function(o){return[2,new v(qe.A_SUBSCRIBE_USER_STATUS_T,qe.A_SUBSCRIBE_USER_STATUS_R).validate("subscribeUserIds",e,b({maxLength:200,minLength:1,itemValidator:J}),!0).validate("subscribeType",t,(function(e){return[z.ONLINE_STATUS,z.USER_PROFILE].includes(e)}),!0).validate("expiry",n,X({min:60,max:2592e3}),!0).ifReady((function(o,a){return Z(i,void 0,void 0,(function(){var i,s,_,c,d;return $(this,(function(u){switch(u.label){case 0:return i=a.createTraceId(),a.info(qe.A_SUBSCRIBE_USER_STATUS_T,JSON.stringify({userIds:e,subscribeType:t,expiry:n}),i),[4,o.subscribeUser(e,t,n)];case 1:return s=u.sent(),_=s.code,c=s.data,d=_===r.SUCCESS?"info":"warn",a[d](qe.A_SUBSCRIBE_USER_STATUS_R,JSON.stringify({code:_,data:c}),i),[2,{code:_,data:c}]}}))}))}))]}))}))}function Po(e,t){return Z(this,void 0,void 0,(function(){var n=this;return $(this,(function(i){return[2,new v(qe.A_UNSUBSCRIBE_USER_STATUS_T,qe.A_UNSUBSCRIBE_USER_STATUS_R).validate("subscribeUserIds",e,b({maxLength:200,minLength:1,itemValidator:J}),!0).validate("subscribeType",t,(function(e){return[z.ONLINE_STATUS,z.USER_PROFILE].includes(e)}),!0).ifReady((function(i,o){return Z(n,void 0,void 0,(function(){var n,a,s;return $(this,(function(_){switch(_.label){case 0:return n=o.createTraceId(),o.info(qe.A_UNSUBSCRIBE_USER_STATUS_T,JSON.stringify({userIds:e,subscribeType:t}),n),[4,i.unSubscribeUser(e,t)];case 1:return a=_.sent().code,s=a===r.SUCCESS?"info":"warn",o[s](qe.A_UNSUBSCRIBE_USER_STATUS_R,JSON.stringify({code:a}),n),[2,{code:a}]}}))}))}))]}))}))}function Do(e,t,n){return Z(this,void 0,void 0,(function(){var i=this;return $(this,(function(o){return[2,new v(qe.A_GET_SUBSCRIBE_USER_STATUS_LIST_T,qe.A_GET_SUBSCRIBE_USER_STATUS_LIST_R).validate("subscribeType",e,(function(e){return[z.ONLINE_STATUS,z.USER_PROFILE].includes(e)}),!0).validate("subscribePageSize",t,X({min:1,max:200}),!0).validate("offset",n,X({min:0}),!0).ifReady((function(o,a){return Z(i,void 0,void 0,(function(){var i,s,_,c,d;return $(this,(function(u){switch(u.label){case 0:return i=a.createTraceId(),a.info(qe.A_GET_SUBSCRIBE_USER_STATUS_LIST_T,JSON.stringify({pageSize:t,offset:n}),i),[4,o.getSubscribeUserList(e,t,n)];case 1:return s=u.sent(),_=s.code,c=s.data,d=_===r.SUCCESS?"info":"warn",a[d](qe.A_GET_SUBSCRIBE_USER_STATUS_LIST_R,JSON.stringify({code:_,data:c}),i),_===r.SUCCESS?[2,{code:_,data:c}]:[2,{code:_}]}}))}))}))]}))}))}function wo(e,t){return Z(this,void 0,void 0,(function(){var n=this;return $(this,(function(i){return[2,new v(qe.A_UNSUBSCRIBE_USER_STATUS_T,qe.A_UNSUBSCRIBE_USER_STATUS_R).validate("subscribeType",e,(function(e){return[z.ONLINE_STATUS,z.USER_PROFILE].includes(e)}),!0).validate("subscribeUserIds",t,b({maxLength:200,minLength:1,itemValidator:J}),!0).ifReady((function(i,o){return Z(n,void 0,void 0,(function(){var n,a,s,_,c;return $(this,(function(d){switch(d.label){case 0:return n=o.createTraceId(),o.info(qe.A_GET_SUBSCRIBE_USER_STATUS_T,JSON.stringify({userIds:t}),n),[4,i.getSubscribeUserStatus(e,t)];case 1:return a=d.sent(),s=a.code,_=a.data,c=s===r.SUCCESS?"info":"warn",o[c](qe.A_GET_SUBSCRIBE_USER_STATUS_R,JSON.stringify({code:s}),n),s===r.SUCCESS?[2,{code:s,data:_}]:[2,{code:s}]}}))}))}))]}))}))}function Bo(e){var t=this;return new v(qe.A_UPDATE_MY_USER_PROFILE_T,qe.A_UPDATE_MY_USER_PROFILE_R).validate("profile",e,T.OBJECT,!0).validate("profile",e.name,T.ONLY_STRING).validate("profile",e.portraitUri,T.ONLY_STRING).validate("profile",e.email,T.ONLY_STRING).validate("profile",e.birthday,T.ONLY_STRING).validate("profile",e.gender,T.NUMBER).validate("profile",e.location,T.ONLY_STRING).validate("profile",e.role,T.NUMBER).validate("profile",e.level,T.NUMBER).validate("profile",e.extraProfile,T.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 Z(t,void 0,void 0,(function(){var t,o,a,s,_,c,d;return $(this,(function(u){switch(u.label){case 0:return t=i.createTraceId(),i.info(qe.A_UPDATE_MY_USER_PROFILE_T,JSON.stringify({profile:e}),t),o=e.extraProfile,a={},["name","portraitUri","email","birthday","gender","location","role","level"].forEach((function(t){Y(e[t])||(a[t]=e[t])})),Y(o)||(a.extraProfile=Q({},o)),[4,n.updateMyUserProfile(a)];case 1:return s=u.sent(),_=s.code,c=s.data,d=_===r.SUCCESS?"info":"warn",i[d](qe.A_UPDATE_MY_USER_PROFILE_R,JSON.stringify({code:_,data:c}),t),[2,{code:_,data:c}]}}))}))}))}function Vo(e){var t=this;return new v(qe.A_GET_USER_PROFILES_T,qe.A_GET_USER_PROFILES_R).validate("userId",e,b({minLength:1,itemValidator:x}),!0).ifReady((function(n,i){return Z(t,void 0,void 0,(function(){var t,o,a,s,_;return $(this,(function(c){switch(c.label){case 0:return t=i.createTraceId(),i.info(qe.A_GET_USER_PROFILES_T,JSON.stringify({userIds:e}),t),[4,n.getUserProfiles(e)];case 1:return o=c.sent(),a=o.code,s=o.data,_=a===r.SUCCESS?"info":"warn",i[_](qe.A_GET_USER_PROFILES_R,JSON.stringify({code:a,data:s}),t),[2,{code:a,data:s}]}}))}))}))}function bo(){var e=this;return new v(qe.A_GET_MY_USER_PROFILE_T,qe.A_GET_MY_USER_PROFILE_R).ifReady((function(t,n){return Z(e,void 0,void 0,(function(){var e,i,o,a,s;return $(this,(function(_){switch(_.label){case 0:return e=n.createTraceId(),n.info(qe.A_GET_MY_USER_PROFILE_T,"",e),[4,t.getMyUserProfile()];case 1:return i=_.sent(),o=i.code,a=i.data,s=o===r.SUCCESS?"info":"warn",n[s](qe.A_GET_MY_USER_PROFILE_R,JSON.stringify({code:o,data:a}),e),[2,{code:o,data:a}]}}))}))}))}function Jo(e){var t=this;return new v(qe.A_UPDATE_MY_USER_PROFILE_VISIBILITY_T,qe.A_UPDATE_MY_USER_PROFILE_VISIBILITY_R).validate("userProfileVisibility",e,(function(e){return[q.NOT_SET,q.INVISIBLE,q.EVERYONE].includes(e)}),!0).ifReady((function(n,i){return Z(t,void 0,void 0,(function(){var t,o,a,s,_;return $(this,(function(c){switch(c.label){case 0:return t=i.createTraceId(),i.info(qe.A_UPDATE_MY_USER_PROFILE_VISIBILITY_T,e,t),[4,n.updateMyUserProfileVisibility(e)];case 1:return o=c.sent(),a=o.code,s=o.data,_=a===r.SUCCESS?"info":"warn",i[_](qe.A_UPDATE_MY_USER_PROFILE_VISIBILITY_R,JSON.stringify({code:a,data:s}),t),[2,{code:a,data:s}]}}))}))}))}function Fo(){var e=this;return new v(qe.A_GET_MY_USER_PROFILE_VISIBILITY_T,qe.A_GET_MY_USER_PROFILE_VISIBILITY_R).ifReady((function(t,n){return Z(e,void 0,void 0,(function(){var e,i,o,a,s;return $(this,(function(_){switch(_.label){case 0:return e=n.createTraceId(),n.info(qe.A_GET_MY_USER_PROFILE_VISIBILITY_T,"",e),[4,t.getMyUserProfileVisibility()];case 1:return i=_.sent(),o=i.code,a=i.data,s=o===r.SUCCESS?"info":"warn",n[s](qe.A_GET_MY_USER_PROFILE_VISIBILITY_R,JSON.stringify({code:o,data:a}),e),[2,{code:o,data:a}]}}))}))}))}function Ho(e){var t=this;return new v(qe.A_SEARCH_USER_PROFILE_BY_UNIQUE_ID_T,qe.A_SEARCH_USER_PROFILE_BY_UNIQUE_ID_R).validate("uniqueId",e,T.STRING,!0).ifReady((function(n,i){return Z(t,void 0,void 0,(function(){var t,o,a,s,_;return $(this,(function(c){switch(c.label){case 0:return t=i.createTraceId(),i.info(qe.A_SEARCH_USER_PROFILE_BY_UNIQUE_ID_T,e,t),[4,n.searchUserProfileByUniqueId(e)];case 1:return o=c.sent(),a=o.code,s=o.data,_=a===r.SUCCESS?"info":"warn",i[_](qe.A_SEARCH_USER_PROFILE_BY_UNIQUE_ID_R,JSON.stringify({code:a,data:s}),t),[2,{code:a,data:s}]}}))}))}))}export{Bn as BaseMessage,xn as CombineMessage,kn as CombineV2Message,Qn as CommandMessage,Co as ConnectType,Je as Events,Kn as FileMessage,Xn as GIFMessage,$n as GroupNotificationMessage,Fn as HQVoiceMessage,Jn as ImageMessage,Zn as InformationNotificationMessage,zn as LocationMessage,Xe as MessageAuditType,ho as MessageType,Wn as ReferenceMessage,jn as RichContentMessage,Hn as SightMessage,Yn as TextMessage,li as UploadTask,qn as VoiceMessage,St as __addSDKVersion,Ro as addConversationsToTag,ot as addEventListener,To as addTag,Ln as addToBlacklist,zi as batchClearRemoteHistoryMessages,ki as batchGetMessageReadReceiptInfoV4,pt as batchRemoveConversation,Ft as batchSetConversationNotificationLevel,zt as batchSetConversationToTop,Mn as bindRTCRoomForChatroom,Vt as clearAllMessagesUnreadStatus,_t as clearEventListeners,qi as clearHistoryMessages,so as clearMessages,Bt as clearMessagesUnreadStatus,Mt as clearTextMessageDraft,co as clearUnreadCountByTimestamp,gt as connect,Ii as createUploadTask,ao as deleteLocalMessagesByTimestamp,Xi as deleteMessages,dt as destroy,Ct as disconnect,po as electronExtension,Un as forceRemoveChatRoomEntry,Cn as forceSetChatRoomEntry,yn as getAllChatRoomEntries,$t as getAllConversationState,En as getAllUltraGroupUnreadCount,Sn as getAllUltraGroupUnreadMentionedCount,Zt as getAllUnreadMentionedCount,Dn as getBlacklist,wn as getBlacklistStatus,tn as getBlockUltraGroupList,kt as getBlockedConversationList,pn as getChatRoomEntry,On as getChatRoomInfo,Gn as getChatroomHistoryMessages,ut as getConnectionStatus,mt as getConversation,ht as getConversationList,Yt as getConversationNotificationLevel,xt as getConversationNotificationStatus,Xt as getConversationTypeNotificationLevel,Oo as getConversationsFromTagByPage,Et as getCurrentUserId,lt as getDeviceId,Ci as getDownloadAuth,gi as getFileToken,hi as getFileUrl,eo as getFirstUnreadMessage,to as getFirstUnreadMessageInfo,Di as getHistoryMessages,io as getMessage,xi as getMessageReadReceiptV4,Zi as getMessageReader,bo as getMyUserProfile,Fo as getMyUserProfileVisibility,Go as getProxy,wi as getRemoteHistoryMessages,Tt as getServerTime,Do as getSubscribeUserList,wo as getSubscribeUserStatus,lo as getTags,Ao as getTagsFromConversation,yt as getTextMessageDraft,Wt as getTopConversationList,Lt as getTotalUnreadCount,Pt as getTotalUnreadCountByLevels,Dt as getTotalUnreadMentionedCountByLevels,dn as getUltraGroupDefaultNotificationLevel,An as getUltraGroupFirstUnreadMessageTimestamp,en as getUltraGroupList,on as getUltraGroupMessageListByMessageUId,Tn as getUltraGroupUnreadCountByTargetId,Rn as getUltraGroupUnreadInfoList,cn as getUltraGroupUnreadMentionedCountByTargetId,ln as getUltraGroupUnreadMentionedMessages,jt as getUnreadConversationList,wt as getUnreadCount,No as getUnreadCountByTag,Qt as getUnreadMentionedCount,oo as getUnreadMentionedMessages,Vo as getUserProfiles,ct as init,no as insertMessage,At as installPlugin,vn as joinChatRoom,fn as joinExistChatRoom,_n as modifyMessage,rt as onceEventListener,In as quitChatRoom,Ki as recallMessage,$i as registerMessageType,sn as removeAllExpansionForUltraGroupMessage,mn as removeChatRoomEntries,hn as removeChatRoomEntry,Ut as removeConversation,vo as removeConversationsFromTag,at as removeEventListener,st as removeEventListeners,an as removeExpansionForUltraGroupMessage,Pn as removeFromBlacklist,ji as removeMessageExpansionForKey,Eo as removeTag,Io as removeTagFromConversations,fo as removeTagsFromConversation,Gt as saveTextMessageDraft,_o as searchConversationByContent,ro as searchMessages,Ho as searchUserProfileByUniqueId,yi as sendFileMessage,Mi as sendGIFMessage,Li as sendHQVoiceMessage,Gi as sendImageMessage,mi as sendMessage,Bi as sendReadReceiptMessage,Yi as sendReadReceiptMessageV4,Vi as sendReadReceiptRequest,bi as sendReadReceiptResponse,Fi as sendReadReceiptResponseV2,Pi as sendSightMessage,Hi as sendSyncReadStatusMessage,Ui as sendTextMessage,Qi as sendTypingStatusMessage,nn as sendUltraGroupTypingStatus,gn as setChatRoomEntries,Nn as setChatRoomEntry,Jt as setConversationNotificationLevel,Ht as setConversationNotificationStatus,qt as setConversationToTop,go as setConversationToTopInTag,Kt as setConversationTypeNotificationLevel,uo as setMessageReceivedStatus,yo as setProxy,un as setUltraGroupDefaultNotificationLevel,Oi as stopUploadTask,Lo as subscribeUserStatus,Mo as testProxy,Po as unSubscribeUserStatus,rn as updateExpansionForUltraGroupMessage,Wi as updateMessageExpansion,Bo as updateMyUserProfile,Jo as updateMyUserProfileVisibility,So as updateTag,Ni as upload};
|