isdata-customer-sdk 0.1.57 → 0.1.59

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.
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.common.802.js","mappings":";;;;;;;;;;AAAA,wEAAwE,QAAQ,qBAAqB,uBAAuB,SAAS,sDAAsD,WAAW,qCAAqC,oCAAoC,eAAe,iBAAiB,KAAK,EAAE,aAAa,YAAY,OAAO,MAAM,OAAO,mCAAmC,UAAU,mCAAmC,YAAY,yCAAyC,QAAQ,wCAAwC,UAAU,yCAAyC,MAAM,yCAAyC,MAAM,yCAAyC,MAAM,yCAAyC,YAAY,0CAA0C,aAAa,OAAO,6OAA6O,UAAU,iNAAiN,YAAY,2PAA2P,QAAQ,uPAAuP,UAAU,yPAAyP,MAAM,0PAA0P,MAAM,6NAA6N,MAAM,0PAA0P,YAAY,6PAA6P,IAAI,2JAA2J,cAAc,MAAM,SAAS,sEAAsE,iBAAiB,8BAA8B,OAAO,sjCAAsjC,IAAI,y0BAAy0B,wrCAAwrC,qBAAM,WAAW,qBAAM,2CAA2C,qBAAM,YAAY,qBAAM,6BAA6B,qBAAM,2OAA2O,YAAY,2KAA2K,kBAAkB,4BAA4B,cAAc,cAAc,4DAA4D,uFAAuF,wFAAwF,sDAAsD,+CAA+C,6DAA6D,qBAAM,EAAE,qBAAM,SAAS,qBAAM,qEAAqE,aAAa,qMAAqM,KAAK,IAAI,6BAA6B,QAAQ,kiBAAkiB,6BAA6B,KAAK,2CAA2C,KAAK,yaAAya,wGAAwG,eAAe,oBAAoB,gCAAgC,mCAAmC,0CAA0C,4CAA4C,wCAAwC,2CAA2C,UAAU,wCAAwC,SAAS,0CAA0C,mBAAmB,oBAAoB,gBAAgB,oBAAoB,gBAAgB,qBAAqB,gBAAgB,8FAA8F,gBAAgB,yBAAyB,gBAAgB,yCAAyC,2BAA2B,qBAAqB,QAAQ,KAAK,gCAAgC,4BAA4B,aAAa,gBAAgB,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,yBAAyB,2DAA2D,oBAAoB,sDAAsD,wBAAwB,0DAA0D,wBAAwB,0DAA0D,oBAAoB,sDAAsD,wBAAwB,gCAAgC,sBAAsB,sDAAsD,yBAAyB,yDAAyD,kBAAkB,kDAAkD,qBAAqB,qDAAqD,0BAA0B,0DAA0D,sBAAsB,sDAAsD,0BAA0B,0DAA0D,6BAA6B,6DAA6D,uBAAuB,uDAAuD,yBAAyB,yDAAyD,iBAAiB,yCAAyC,qBAAqB,MAAM,uGAAuG,sBAAsB,mBAAmB,OAAO,EAAE,8BAA8B,iDAAiD,UAAU,OAAO,6EAA6E,GAAG,UAAU,GAAG,+BAA+B,mBAAmB,6BAA6B,mBAAmB,sBAAsB,2BAA2B,OAAO,mDAAmD,yCAAyC,6FAA6F,UAAU,6FAA6F,aAAa,YAAY,kBAAkB,mDAAmD,GAAG,iBAAiB,GAAG,+DAA+D,oCAAoC,EAAE,0EAA0E,0BAA0B,iCAAiC,wJAAwJ,UAAU,EAAE,QAAQ","sources":["webpack://isdata-customer-sdk/./node_modules/@tencentcloud/chat/modules/group-module.js"],"sourcesContent":["let e=2,t=4,s=10,o=11,r=12,i=14,n=17,a=20,u=23,p=26,l=27,c=29,h=30,g=34;class m{constructor(e=0,t=0){this.high=e,this.low=t}equal(e){return null!==e&&this.low===e.low&&this.high===e.high}toString(){var e=Number(this.high).toString(16);let t=Number(this.low).toString(16);if(t.length<8){let e=8-t.length;for(;e;)t=\"0\"+t,e--}return e+t}}let d={TEST:{CHINA:{DEFAULT:\"wss://wss-dev.tim.qq.com\"},OVERSEA:{DEFAULT:\"wss://wss-dev.tim.qq.com\"},SINGAPORE:{DEFAULT:\"wss://wsssgp-dev.im.qcloud.com\"},KOREA:{DEFAULT:\"wss://wsskr-dev.im.qcloud.com\"},GERMANY:{DEFAULT:\"wss://wssger-dev.im.qcloud.com\"},IND:{DEFAULT:\"wss://wssind-dev.im.qcloud.com\"},JPN:{DEFAULT:\"wss://wssjpn-dev.im.qcloud.com\"},USA:{DEFAULT:\"wss://wssusa-dev.im.qcloud.com\"},INDONESIA:{DEFAULT:\"wss://wssidn-dev.im.qcloud.com\"}},PRODUCTION:{CHINA:{DEFAULT0:\"wss://*w4c.my-imcloud.com\",DEFAULT:\"wss://wss.im.qcloud.com\",IPV6:\"wss://wssv6.im.qcloud.com\",BACKUP:\"wss://wss.tim.qq.com\",BACKUP_WEB:\"wss://*w4c.my-cpaas.com\",STAT:\"https://events.im.qcloud.com\",ANYCAST:\"wss://162.14.13.203\"},OVERSEA:{DEFAULT0:\"wss://*w4c.my-imcloud.com\",DEFAULT:\"wss://wss.im.qcloud.com\",IPV6:\"wss://wssv6.im.qcloud.com\",BACKUP:\"wss://wss.my-imcloud.com\",BACKUP_WEB:\"wss://*w4c.my-cpaas.com\",STAT:\"https://api.my-imcloud.com\"},SINGAPORE:{DEFAULT0:\"wss://*w4s.my-imcloud.com\",DEFAULT:\"wss://wsssgp.im.qcloud.com\",IPV6:\"wss://wsssgpv6.im.qcloud.com\",BACKUP:\"wss://wsssgp.my-imcloud.com\",BACKUP_WEB:\"wss://*w4s.my-cpaas.com\",STAT:\"https://apisgp.my-imcloud.com\",ANYCAST:\"wss://162.14.19.159\"},KOREA:{DEFAULT0:\"wss://*w4k.my-imcloud.com\",DEFAULT:\"wss://wsskr.im.qcloud.com\",IPV6:\"wss://wsskrv6.im.qcloud.com\",BACKUP:\"wss://wsskr.my-imcloud.com\",BACKUP_WEB:\"wss://*w4k.my-cpaas.com\",STAT:\"https://apikr.my-imcloud.com\",ANYCAST:\"wss://162.14.13.104\"},GERMANY:{DEFAULT0:\"wss://*w4g.my-imcloud.com\",DEFAULT:\"wss://wssger.im.qcloud.com\",IPV6:\"wss://wssgerv6.im.qcloud.com\",BACKUP:\"wss://wssger.my-imcloud.com\",BACKUP_WEB:\"wss://*w4g.my-cpaas.com\",STAT:\"https://apiger.my-imcloud.com\",ANYCAST:\"wss://162.14.3.17\"},IND:{DEFAULT0:\"wss://*w4i.my-imcloud.com\",DEFAULT:\"wss://wssind.my-imcloud.com\",IPV6:\"wss://wssindv6.im.qcloud.com\",BACKUP:\"wss://wssind.im.qcloud.com\",BACKUP_WEB:\"wss://*w4i.my-cpaas.com\",STAT:\"https://apiind.my-imcloud.com\",ANYCAST:\"wss://162.14.19.46\"},JPN:{DEFAULT0:\"wss://*w4j.my-imcloud.com\",DEFAULT:\"wss://wssjpn.im.qcloud.com\",IPV6:\"wss://wssjpnv6.im.qcloud.com\",BACKUP:\"wss://wssjpn.my-imcloud.com\",BACKUP_WEB:\"wss://*w4j.my-cpaas.com\",STAT:\"https://apijpn.my-imcloud.com\"},USA:{DEFAULT0:\"wss://*w4u.my-imcloud.com\",DEFAULT:\"wss://wssusa.im.qcloud.com\",IPV6:\"wss://wssusav6.im.qcloud.com\",BACKUP:\"wss://wssusa.my-imcloud.com\",BACKUP_WEB:\"wss://*w4u.my-cpaas.com\",STAT:\"https://apiusa.my-imcloud.com\",ANYCAST:\"wss://162.14.10.42\"},INDONESIA:{DEFAULT0:\"wss://*w4y.my-imcloud.com\",DEFAULT:\"wss://wssidn.im.qcloud.com\",IPV6:\"wss://wssidnv6.im.qcloud.com\",BACKUP:\"wss://wssidn.my-imcloud.com\",BACKUP_WEB:\"wss://*w4y.my-cpaas.com\",STAT:\"https://apiidn.my-imcloud.com\",ANYCAST:\"wss://43.129.34.169\"}}},_={ANDROID:2,IOS:3,MAC:4,WEB:7,WX_MP:8,QQ_MP:9,TT_MP:10,BAIDU_MP:11,ALI_MP:12,IPAD:13,UNI_NATIVE_APP:15,DONUT_NATIVE_APP:19,NS_NATIVE_APP:20,RN_NATIVE_APP:21},f=\"CHINA\",I={HOST:{CURRENT:{DEFAULT:\"wss://wss.im.qcloud.com\",STAT:\"https://events.im.qcloud.com\"},setCurrent(e=f){this.CURRENT=d.PRODUCTION[e]}},NAME:{OPEN_IM:\"openim\",OPEN_IM_MSG_EXT:\"openim_msg_ext_http_svc\",GRP:\"group_open_http_svc\",GRP_AV:\"group_open_avchatroom_http_svc\",GRP_COMMUNITY:\"million_group_open_http_svc\",GRP_ATTR:\"group_open_attr_http_svc\",FD:\"sns\",PROFILE:\"profile\",RECENT_CONTACT:\"recentcontact\",PIC:\"openpic\",BIG_GRP_NO_AUTH:\"group_open_http_noauth_svc\",BIG_GRP_POLLING:\"group_open_long_polling_http_svc\",BIG_GRP_POLLING_NO_AUTH:\"group_open_long_polling_http_noauth_svc\",IM_OPEN_STAT:\"imopenstat\",WEB_IM:\"webim\",IM_COS_SIGN:\"im_cos_sign_svr\",CUSTOM_UPLOAD:\"im_cos_msg\",HEARTBEAT:\"heartbeat\",IM_OPEN_PUSH:\"im_open_push\",IM_OPEN_STATUS:\"im_open_status\",IM_LONG_MSG:\"im_long_msg\",IM_CONFIG_MANAGER:\"im_sdk_config_mgr\",STAT_SERVICE:\"StatSvc\",OVERLOAD_PUSH:\"OverLoadPush\",IM_MSG_AUDIT_MGR:\"im_msg_audit_mgr\",TUIROOM_SVR:\"tui_room_svr\",IM_OPEN_TRANSLATE:\"im_open_translate\",IM_OPEN_SPEECH:\"im_open_speech\",MSG_SEARCH:\"message_search\",GRP_SEARCH:\"group_search\",GRP_MEMBER_SEARCH:\"group_member_search\",USER_SEARCH:\"user_search\",FOLLOW:\"follow\",OFFLINE_PUSH_REPORT:\"offline_push_report\",IM_MSG_LOGIC:\"im_msg_db_logic\"}},M={SEARCH_GRP_SNS:new m(0,Math.pow(2,1)).toString(),AV_HISTORY_MSG:new m(0,Math.pow(2,2)).toString(),GRP_COMMUNITY:new m(0,Math.pow(2,3)).toString(),MSG_TO_SPECIFIED_GRP_MBR:new m(0,Math.pow(2,4)).toString(),AV_MBR_LIST:new m(0,Math.pow(2,6)).toString(),USER_STATUS:new m(0,Math.pow(2,7)).toString(),CONV_MARK:new m(0,Math.pow(2,9)).toString(),CONV_GROUP:new m(0,Math.pow(2,10)).toString(),AV_BAN_MBR:new m(0,Math.pow(2,11)).toString(),MSG_EXT:new m(0,Math.pow(2,13)).toString(),GRP_COUNTER:new m(0,Math.pow(2,15)).toString(),PLUGIN_TRANSLATE:new m(Math.pow(2,6)).toString(),PLUGIN_VOICE_TO_TEXT:new m(Math.pow(2,7)).toString(),PLUGIN_CS:new m(Math.pow(2,8)).toString(),PLUGIN_PUSH:new m(Math.pow(2,9)).toString(),PLUGIN_BOT:new m(Math.pow(2,10)).toString(),MSG_REACTION:new m(Math.pow(2,16)).toString(),FOLLOW:new m(Math.pow(2,20)).toString()},y=\"group_profile\",D=\"group_member_profile\",L=[\"Type\",\"Name\",\"Introduction\",\"Notification\",\"FaceUrl\",\"Owner_Account\",\"CreateTime\",\"InfoSeq\",\"LastInfoTime\",\"LastMsgTime\",\"MemberNum\",\"MaxMemberNum\",\"ApplyJoinOption\",\"NextMsgSeq\",\"ShutUpAllMember\",\"InviteJoinOption\"],C=[\"Role\",\"JoinTime\",\"MsgSeq\",\"MsgFlag\"],G=(I.HOST.setCurrent(f),\"undefined\"!=typeof wx&&\"function\"==typeof wx.getSystemInfoSync&&Boolean(wx.getSystemInfoSync().fontSizeSetting)),b=(G&&wx.createGamePortal,\"undefined\"!=typeof qq&&\"function\"==typeof qq.getSystemInfoSync&&Boolean(qq.getSystemInfoSync().fontSizeSetting)),A=\"undefined\"!=typeof tt&&\"function\"==typeof tt.getSystemInfoSync&&Boolean(tt.getSystemInfoSync().fontSizeSetting),T=\"undefined\"!=typeof swan&&\"function\"==typeof swan.getSystemInfoSync&&Boolean(swan.getSystemInfoSync().fontSizeSetting),v=\"undefined\"!=typeof my&&\"function\"==typeof my.getSystemInfoSync&&Boolean(my.getSystemInfoSync().fontSizeSetting),S=\"undefined\"!=typeof jd&&\"function\"==typeof jd.getSystemInfoSync,P=\"undefined\"!=typeof uni&&\"undefined\"==typeof window&&\"function\"==typeof uni.requireNativePlugin,R=G&&\"object\"==typeof wx.miniapp,w=G||b||A||T||v||P||S,$=\"undefined\"==typeof window&&!w&&\"undefined\"!=typeof global&&void 0!==global.NativeScriptGlobals,E=\"undefined\"!=typeof global&&(void 0!==global.nativeModuleProxy||void 0!==global.ReactNative),U=\"undefined\"!=typeof uni?!w:\"undefined\"!=typeof window&&!w&&!E,N=(b?qq:A?tt:T?swan:v?my:G?wx:P?uni:S&&jd,U&&window&&window.navigator&&window.navigator.userAgent||\"\"),q=/(micromessenger|webbrowser)/i.test(N),k=function(){let e=\"WEB\";return q?e=\"WEB\":b?e=\"QQ_MP\":A?e=\"TT_MP\":T?e=\"BAIDU_MP\":v?e=\"ALI_MP\":G?e=R?\"DONUT_NATIVE_APP\":\"WX_MP\":P?e=\"UNI_NATIVE_APP\":$?e=\"NS_NATIVE_APP\":E&&(e=\"RN_NATIVE_APP\"),_[e]}(),O=(!function(){var e=N.match(/OS (\\d+)_/i);e&&e[1]&&e[1]}(),function(){var e,t,s=N.match(/Android (\\d+)(?:\\.(\\d+))?(?:\\.(\\d+))*/i);s&&(e=s[1]&&parseFloat(s[1]),t=s[2]&&parseFloat(s[2]),e)&&t&&parseFloat(s[1]+\".\"+s[2])}(),/MSIE/.test(N)||-1<N.indexOf(\"Trident\")&&-1<N.indexOf(\"rv:11.0\")),F,x,V=(!function(){var e=/MSIE\\s(\\d+)\\.\\d/.exec(N),e=e&&parseFloat(e[1]);!e&&/Trident\\/7.0/i.test(N)&&/rv:11.0/.test(N)}(),F=\"undefined\"!=typeof console?console:\"undefined\"!=typeof global&&global.console?global.console:\"undefined\"!=typeof window&&window.console?window.console:{},function(){}),H=[\"assert\",\"clear\",\"count\",\"debug\",\"dir\",\"dirxml\",\"error\",\"group\",\"groupCollapsed\",\"groupEnd\",\"info\",\"log\",\"profile\",\"profileEnd\",\"table\",\"time\",\"timeEnd\",\"timeStamp\",\"trace\",\"warn\"],K=H.length;for(;K--;)x=H[K],console[x]||(F[x]=V);var B=F;let j=\"TIMTextElem\",J=\"TIMImageElem\",W=\"TIMSoundElem\",z=\"TIMFileElem\",X=\"TIMFaceElem\",Y=\"TIMVideoFileElem\",Q=\"TIMLocationElem\",Z=\"TIMGroupTipElem\",ee=\"TIMGroupSystemNoticeElem\",te=\"TIMCustomElem\",se=\"TIMRelayElem\",oe=\"High\",re=\"Normal\",ie=\"Low\",ne=\"Lowest\",ae=\"C2C\",ue=\"GROUP\",pe=\"TOPIC\",le=\"@TIM#SYSTEM\",ce=\"Private\",he=\"Public\",ge=\"ChatRoom\",me=\"AVChatRoom\",de=\"Community\",_e=\"Room\",fe=\"Live\",Ie=\"Owner\",Me=\"Admin\",ye=\"Member\",De=\"Custom\",Le=1,Ce=3,Ge=4,be=5,Ae=\"AcceptAndNotify\",Te=\"AlreadyInGroup\",ve=\"__kImSDK_MesssageAtALL__\",Se=function(){return(new Date).getTime()+0},Pe={JPG:1,JPEG:1,GIF:2,PNG:3,BMP:4,UNKNOWN:255},Re={NICK:\"Tag_Profile_IM_Nick\",GENDER:\"Tag_Profile_IM_Gender\",BIRTHDAY:\"Tag_Profile_IM_BirthDay\",LOCATION:\"Tag_Profile_IM_Location\",SELFSIGNATURE:\"Tag_Profile_IM_SelfSignature\",ALLOWTYPE:\"Tag_Profile_IM_AllowType\",LANGUAGE:\"Tag_Profile_IM_Language\",AVATAR:\"Tag_Profile_IM_Image\",MESSAGESETTINGS:\"Tag_Profile_IM_MsgSettings\",ADMINFORBIDTYPE:\"Tag_Profile_IM_AdminForbidType\",LEVEL:\"Tag_Profile_IM_Level\",ROLE:\"Tag_Profile_IM_Role\"},we=\"JoinedSuccess\",$e=\"WaitAdminApproval\",Ee=\"@TGS#_\",Ue=\"@TOPIC#_\",Ne=Object.prototype.hasOwnProperty;function qe(e){if(null==e)return!0;if(\"boolean\"==typeof e)return!1;if(\"number\"==typeof e)return 0===e;if(\"string\"==typeof e)return 0===e.length;if(\"function\"==typeof e)return 0===e.length;if(Array.isArray(e))return 0===e.length;if(e instanceof Error)return\"\"===e.message;if(He(e)){for(var t in e)if(Ne.call(e,t))return!1;return!0}return!!(ke(e)||Oe(e)||Fe(e))&&0===e.size}let ke=function(e){return\"map\"===Je(e)},Oe=function(e){return\"set\"===Je(e)},Fe=function(e){return\"file\"===Je(e)},xe=function(e){return null!==e&&(\"number\"==typeof e&&!isNaN(+e)||\"object\"==typeof e&&e.constructor===Number)},Ve=function(e){return\"string\"==typeof e},He=function(e){if(\"object\"!=typeof e||null===e)return!1;e=Object.getPrototypeOf(e);if(null===e)return!0;let t=e;for(;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return e===t},Ke=function(e){return\"function\"==typeof Array.isArray?Array.isArray(e):\"array\"===Je(e)},Be=function(e){return void 0===e},je=function(e){return Ke(e)||null!==e&&\"object\"==typeof e},Je=function(e){return Object.prototype.toString.call(e).match(/^\\[object (.*)\\]$/)[1].toLowerCase()},We=(Date.now||(Date.now=function(){return(new Date).getTime()}),function(s,o,r,i){if(!je(s)||!je(o))return 0;let n=0;var a,u=Object.keys(o);for(let e=0,t=u.length;e<t;e++)if(a=u[e],!(Be(o[a])||r&&r.includes(a)))if(je(s[a])&&je(o[a]))n+=We(s[a],o[a],r,i);else{if(i&&i.includes(o[a]))continue;s[a]!==o[a]&&(s[a]=o[a],n+=1)}return n}),ze=function(e){e=e||99999999;return Math.round(Math.random()*e)},Xe={},Ye=function(e){if(0===Object.getOwnPropertyNames(e).length)return Object.create(null);var t,s,o=Array.isArray(e)?[]:Object.create(null);for(s in e)null!==e[s]?void 0!==e[s]?(t=typeof e[s],0<=[\"string\",\"number\",\"function\",\"boolean\"].indexOf(t)?o[s]=e[s]:o[s]=Ye(e[s])):o[s]=void 0:o[s]=null;return o};function Qe(o,e){if(!Ke(o)||!Ke(e))return!1;let r=!1;return e.forEach(({key:t,value:e})=>{var s=o.find(e=>e.key===t);s?s.value!==e&&(s.value=e,r=!0):(o.push({key:t,value:e}),r=!0)}),r}function Ze(e){return qe(e)?[]:e.filter(e=>!0===e.isModified)}function et(e){var t;if(He(e)&&He(e.webhookInfo))return t=[],e.webhookInfo.disableCloudMessagePreHook&&t.push(\"ForbidBeforeSendMsgCallback\"),e.webhookInfo.disableCloudMessagePostHook&&t.push(\"ForbidAfterSendMsgCallback\"),0!==t.length?t:void 0}function st(e){return qe(e)?[]:e.filter(e=>!1===e.isModified)}let ot=e=>e===me,rt=({type:e,groupID:t})=>e===de||(\"\"+t).startsWith(Ee)&&!(\"\"+t).includes(Ue),it=e=>(\"\"+e).startsWith(Ee)&&(\"\"+e).includes(Ue);function nt(e){return e.split(Ue)[0]}function at(){return!O&&!w}function ut(e,t=!0,s=!0){var o=Date.now();return t?s?o-e+\" ms\":Math.round((o-e)/1e3)+\" s\":s?o-e:Math.round((o-e)/1e3)}let pt=0;function lt(){return at()?\"%c Chat %c\":\"Chat\"}function ct(){(e=new Date).setTime(Se());var e;return e.toLocaleTimeString(\"en-US\",{hour12:!1})+\".\"+function(e){let t;switch(e.toString().length){case 1:t=\"00\"+e;break;case 2:t=\"0\"+e;break;default:t=e}return t}(e.getMilliseconds())}let ht={arguments2String(s){let o=\"\";if(1===s.length)o=s[0];else for(let e=0,t=s.length;e<t;e++){if(je(s[e]))try{o+=s[e]instanceof Error?JSON.stringify(s[e],[\"message\",\"code\"]):JSON.stringify(s[e])}catch(e){o+=e?e.message:\"\";break}else o+=s[e];o+=\" \"}return o},_exec(e,t){at()?B[e](lt(),\"background:#0abf5b; padding:1px; border-radius:3px; color: #fff\",\"background:transparent\",ct(),t):B[e](`${lt()} ${ct()} `+t)},d:function(){var e;pt<=-1&&(e=this.arguments2String(arguments),this._exec(\"debug\",e))},l:function(){var e;pt<=0&&(e=this.arguments2String(arguments),this._exec(\"log\",e))},log:function(){var e;pt<=0&&(e=this.arguments2String(arguments),this._exec(\"log\",e))},i:function(){var e;pt<=1&&(e=this.arguments2String(arguments),this._exec(\"info\",e))},w:function(){var e;pt<=2&&(e=this.arguments2String(arguments),this._exec(\"warn\",e))},e:function(){var e;pt<=3&&(e=this.arguments2String(arguments),this._exec(\"error\",e))},setLevel:function(e){e<4&&this._exec(\"log\",\"set level from \"+pt+\" to \"+e),pt=e},getLevel:function(){return pt}},gt=function(e){return{code:0,data:e||{}}};class mt extends Error{constructor(e){super();var{code:e,message:t,data:s}=e;this.code=e,t?this.message=t:this._getErrMsg&&(this.message=this._getErrMsg(this.code)),this.data=s||{}}}let dt=2101,_t=2114,ft=2600,It=2602,Mt=2603,yt=2620,Dt=2621,Lt=2623,Ct=2660,Gt=2661,bt=2662,At=2681,Tt=2683,vt=2684,St=2685,Pt=2686,Rt=2687,wt=2805,$t=2903,Et=3122,Ut=3123,Nt=\"onMessageReceived\",qt=\"onMessageModified\",kt=\"onMessageRevoked\",Ot=\"onGroupListUpdated\",Ft=\"groupAttributesUpdated\",xt=\"onGroupCounterUpdated\",Vt=\"onTopicUpdated\",Ht=\"error\",Kt=null,Bt=function(e){return Promise.resolve(gt(e))},jt=function(e,t=!1){if(e instanceof mt)return t&&null!==Kt&&Kt.emit(Ht,e),Promise.reject(e);if(e instanceof Error){let e=new mt({code:$t});return t&&null!==Kt&&Kt.emit(Ht,e),Promise.reject(e)}return Be(e)||Be(e.code)?Promise.reject(new mt({code:$t})):(e=new mt(e),t&&null!==Kt&&Kt.emit(Ht,e),Promise.reject(e))},Jt={A2KEY_AND_TINYID_UPDATED:\"_inner1\",CLOUD_CONFIG:\"_inner2\",PROFILE_UPDATED:\"_inner3\",CONV_SYNC_COMPLETED:\"_inner4\",C2C_UNREAD_HANDLE_COMPLETED:\"_inner5\"},Wt=\"messageReceivedGroup\",zt=\"messageReceivedGroupAVPush\",Xt=\"messageReceivedGroupAVPull\",Yt={info:4,warning:5,error:6},Qt={wifi:1,\"2g\":2,\"3g\":3,\"4g\":4,\"5g\":5,unknown:6,none:7,online:8},Zt={login:4,plugin_search:16,plugin_translate:16,plugin_voice_to_text:16,plugin_cs:16,plugin_push:16,plugin_bot:16,plugin_emoji_reaction:16,tui_key_features:16};class es{constructor(e){this._n=\"SSOLogData\",this.eventType=Zt[e]||0,this.timestamp=0,this.networkType=8,this.code=0,this.message=\"\",this.moreMessage=\"\",this.extension=e,this.costTime=0,this.duplicate=!1,this.level=4,this.uiPlatform=void 0,this._sentFlag=!1,this._startts=Se()}static bindEventStatModule(e){es.prototype._eventStatModule=e}static bindNetMonitorModule(e){es.prototype._netMonitorModule=e}updateTimeStamp(){this.timestamp=Se()}start(e){return this._startts=e,this}end(e=!1){if(!this._sentFlag){if(this._netMonitorModule){let e=this._netMonitorModule.getNetworkType();this.setNetworkType(e)}var t=Se();0===this.costTime&&(this.costTime=t-this._startts),this.setMoreMessage(`startts:${this._startts} endts:`+t),e?(this._sentFlag=!0,this._eventStatModule&&this._eventStatModule.pushIn(this)):setTimeout(()=>{this._sentFlag=!0,this._eventStatModule&&this._eventStatModule.pushIn(this)},0)}}setError(t){if(t instanceof Error){if(!this._sentFlag){let e=!0;if(e=this._netMonitorModule?this._netMonitorModule.isOnline():e)t.code&&this.setCode(t.code),t.message&&this.setMoreMessage(t.message);else{let e=wt;this.setCode(e)}this.setLevel(\"error\")}}else ht.w(this._n+\".setError value not instanceof Error, please check!\");return this}setCode(e){return Be(e)||this._sentFlag||(\"ECONNABORTED\"===e&&(this.code=103),xe(e)?this.code=e:ht.w(this._n+\".setCode value not a number, please check!\",e,typeof e)),this}setMessage(e){return Be(e)||this._sentFlag||(xe(e)&&(this.message=e.toString()),Ve(e)&&(this.message=e)),this}setCostTime(e){return this.costTime=e,this}setLevel(e){return Be(e)||this._sentFlag||(this.level=Yt[e]),this}setMoreMessage(e){return qe(this.moreMessage)?this.moreMessage=\"\"+e:this.moreMessage+=\" \"+e,this}setNetworkType(e){return Be(e)?ht.w(this._n+\".setNetworkType value is undefined, please check!\"):(e=Qt[e.toLowerCase()],Be(e)||(this.networkType=e)),this}getStartTs(){return this._startts}setUIPlatform(e){return this.uiPlatform=e,this}setExtension(e){return this.extension=e,this}setEventType(e){return this.eventType=e,this}}let ts=\"send_group_msg\",ss=\"get_joined_group_list\",os=\"get_group_self_member_info\",rs=\"create_group\",is=\"destroy_group\",ns=\"modify_group_base_info\",as=\"apply_join_group\",us=\"apply_join_group_noauth\",ps=\"quit_group\",ls=\"get_group_public_info\",cs=\"change_group_owner\",hs=\"handle_apply_join_group\",gs=\"handle_invite_join_permission_group\",ms=\"handle_invite_join_group\",ds=\"group_msg_recall\",_s=\"msg_read_report\",fs=\"group_msg_get\",Is=\"get_group_msg_receipt\",Ms=\"group_msg_receipt\",ys=\"get_group_msg_receipt_detail\",Ds=\"get_group_msg_receipts_by_users\",Ls=\"get_pendency\",Cs=\"deletemsg\",Gs=\"get_msg\",bs=\"get_msg_noauth\",As=\"get_online_member_num\",Ts=\"delete_group_ramble_msg_by_seq\",vs=\"modify_group_msg\",Ss=\"set_group_attr\",Ps=\"modify_group_attr\",Rs=\"delete_group_attr\",ws=\"clear_group_attr\",$s=\"get_group_attr\",Es=\"group_set_key_values\",Us=\"group_get_key_values\",Ns=\"batch_get_group_notify\",qs=\"update_group_counter\",ks=\"get_group_counter\",Os=\"get_group_member_info\",Fs=\"get_members\",xs=\"get_specified_group_member_info\",Vs=\"add_group_member\",Hs=\"delete_group_member\",Ks=\"ban_group_member\",Bs=\"modify_group_member_info\",js=\"modify_user_info\",Js=\"unSend\",Ws=\"success\",zs=\"notStart\",Xs=\"resolved\",Ys=\"rejected\";class Qs{constructor(e){this.type=j,this.content={text:e.text||\"\"}}setText(e){this.content.text=e}sendable(){return 0!==this.content.text.length}}function Zs(e,t,s,o=[]){if(!e)return e;let r=e;return t&&(e.startsWith(\"http://\")?r=e.replace(/^http:\\/\\/[^/]+/,t):e.startsWith(\"https://\")&&(r=e.replace(/^https:\\/\\/[^/]+/,t))),r=s&&-1===r.indexOf(\"authKey=\")&&so(r,o)?-1<r.indexOf(\"?\")?r+\"&authKey=\"+s:r+\"?authKey=\"+s:r}function eo(e,s,o=[]){let t=s[0].content||s[0].payload;if(e===J)t.imageInfoArray.forEach(e=>{so(e.imageUrl,o)&&(e.imageUrl=to(e.imageUrl))});else if(e===Y)so(t.snapshotUrl,o)&&(t.snapshotUrl=to(t.snapshotUrl),t.thumbUrl=to(t.thumbUrl)),so(t.remoteVideoUrl,o)&&(t.remoteVideoUrl=to(t.remoteVideoUrl));else if(e===W)so(t.remoteAudioUrl,o)&&(t.remoteAudioUrl=to(t.remoteAudioUrl));else if(e===z)so(t.fileUrl,o)&&(t.fileUrl=to(t.fileUrl));else if(e===se){let{downloadKey:e=\"\",messageList:t=[]}=s[0].content||s[0].payload;qe(e)&&t.forEach(e=>{eo(e.messageBody[0].type,e.messageBody,o)})}return s}function to(e){if(!e)return e;if(-1===e.indexOf(\"authKey=\"))return e;var e=e.split(\"?\"),t=e[1].split(\"&\");let s=0;for(let e=0;e<t.length;e++)if(-1<t[e].indexOf(\"authKey=\")){s=e;break}return t.splice(s,1),0<t.length?e[0]+\"?\"+t.join(\"&\"):e[0]}function so(e,t){let s=!1;if(e){var e=e.match(/:\\/\\/([0-9]?\\.)?(.[^/:]+)/),o=e&&e[2]||\"\";if(o.includes(\"rich-dev\"))return!0;for(let e=0;e<t.length;e++)if(o.endsWith(t[e])){s=!0;break}}return s}class oo{constructor(e,t,s,o){this._imageMemoryURL=\"\",this._fileDownloadProxy=t,this._authKey=s,this._fileDNList=o,w||E?this.createImageDataASURL(e.file):this.createImageDataASURLInWeb(e.file),this._initImageInfoModel(),this.type=J,this._percent=0,this.content={imageFormat:e.imageFormat||Pe.UNKNOWN,uuid:e.uuid,imageInfoArray:[]},this.initImageInfoArray(e.imageInfoArray),this._autoFixUrl()}_initImageInfoModel(){let t=this;this._ImageInfoModel=function(e){this.instanceID=ze(9999999),this.sizeType=e.type||0,this.type=0,this.size=e.size||0,this.width=e.width||0,this.height=e.height||0,this.imageUrl=e.imageUrl||e.url||\"\",this.url=Zs(e.url||t._imageMemoryURL,t._fileDownloadProxy,t._authKey,t._fileDNList)},this._ImageInfoModel.prototype={setSizeType(e){this.sizeType=e},setType(e){this.type=e},setImageUrl(e){e&&(this.imageUrl=Zs(e,t._fileDownloadProxy,t._authKey,t._fileDNList))},getImageUrl(){return this.imageUrl}}}initImageInfoArray(e){let t=0,s=null,o;for(;t<=2;)o=Be(e)||Be(e[t])?{type:0,size:0,width:0,height:0,url:\"\"}:e[t],(s=new this._ImageInfoModel(o)).setSizeType(t+1),s.setType(t),this.addImageInfo(s),t++;this.updateAccessSideImageInfoArray()}updateImageInfoArray(t){var s,o=this.content.imageInfoArray.length;for(let e=0;e<o;e++)s=this.content.imageInfoArray[e],t[e].size&&(s.size=t[e].size),t[e].url&&s.setImageUrl(t[e].url),t[e].width&&(s.width=t[e].width),t[e].height&&(s.height=t[e].height)}_autoFixUrl(){var t=this.content.imageInfoArray.length;let s=\"\",o=\"\";var r=[\"http\",\"https\"],i=null;for(let e=0;e<t;e++)this.content.imageInfoArray[e].url&&\"\"!==(i=this.content.imageInfoArray[e]).imageUrl&&(o=i.imageUrl.slice(0,i.imageUrl.indexOf(\"://\")+1),s=i.imageUrl.slice(i.imageUrl.indexOf(\"://\")+1),r.indexOf(o)<0&&(o=\"https:\"),this.content.imageInfoArray[e].setImageUrl([o,s].join(\"\")))}updatePercent(e){this._percent=e,1<this._percent&&(this._percent=1)}updateImageFormat(e){this.content.imageFormat=Pe[e.toUpperCase()]||Pe.UNKNOWN}createImageDataASURLInWeb(e){void 0!==e&&0<e.files.length&&(this._imageMemoryURL=window.URL.createObjectURL(e.files[0]))}createImageDataASURL(e){e&&e.url&&(this._imageMemoryURL=e.url)}replaceImageInfo(e,t){this.content.imageInfoArray[t]instanceof this._ImageInfoModel||(this.content.imageInfoArray[t]=e)}addImageInfo(e){3<=this.content.imageInfoArray.length||this.content.imageInfoArray.push(e)}updateAccessSideImageInfoArray(){var e=this.content.imageInfoArray,{width:t=0,height:s=0}=e[0];if(0!==t&&0!==s){var o=e,r=o[2];o[2]=o[1],o[1]=r;for(let e=0;e<o.length;e++)o[e].setType(e);Object.assign(e[2],function(e){let{originUrl:t,originWidth:s,originHeight:o,min:r=198}=e,i=parseInt(s),n=parseInt(o),a={url:void 0,width:0,height:0};if((i<=n?i:n)<=r)a.url=t,a.width=i,a.height=n;else{n<=i?(a.width=Math.ceil(i*r/n),a.height=r):(a.width=r,a.height=Math.ceil(n*r/i));let e=t&&-1<t.indexOf(\"?\")?t+\"&\":t+\"?\";a.url=198===r?e+\"imageView2/3/w/198/h/198\":e+\"imageView2/3/w/720/h/720\"}if(Be(t)){let{url:e,...t}=a;return t}return a}({originWidth:t,originHeight:s,min:720}))}}sendable(){return 0!==this.content.imageInfoArray.length&&\"\"!==this.content.imageInfoArray[0].imageUrl&&0!==this.content.imageInfoArray[0].size}}class ro{constructor(e){this.type=X,this.content=e||null}sendable(){return null!==this.content}}class io{constructor(e,t,s,o){this.type=W,this._percent=0,this._fileDownloadProxy=t,this._authKey=s,this._fileDNList=o,this.content={downloadFlag:2,second:e.second,size:e.size,url:Zs(e.url,this._fileDownloadProxy,this._authKey,this._fileDNList),remoteAudioUrl:Zs(e.url||\"\",this._fileDownloadProxy,this._authKey,this._fileDNList),uuid:e.uuid}}updatePercent(e){this._percent=e,1<this._percent&&(this._percent=1)}updateAudioUrl(e){this.content.remoteAudioUrl=Zs(e,this._fileDownloadProxy,this._authKey,this._fileDNList)}sendable(){return\"\"!==this.content.remoteAudioUrl}}let no={from:!0,groupID:!0,groupName:!0,to:!0};class ao{constructor(e){this.type=Z,this.content={},this._initContent(e)}_initContent(t){Object.keys(t).forEach(e=>{switch(e){case\"remarkInfo\":break;case\"groupProfile\":this.content.groupProfile={},this._initGroupProfile(t[e]);break;case\"operatorInfo\":this.content.operatorInfo={},this._initOperatorInfo(t[e]);break;case\"memberInfoList\":case\"msgMemberInfo\":this._updateMemberList(t[e]);break;case\"memberExtraInfo\":case\"onlineMemberInfo\":break;case\"memberNum\":this.content[e]=t[e],this.content.memberCount=t[e];break;case\"newGroupProfile\":this.content.newGroupProfile={},this._initNewGroupProfile(t[e]);break;default:this.content[e]=t[e]}}),this.content.userIDList||(this.content.userIDList=[this.content.operatorID])}_initGroupProfile(t){var s=Object.keys(t);for(let e=0;e<s.length;e++){var o=s[e];no[o]&&(this.content.groupProfile[o]=t[o])}}_initOperatorInfo(t){var s=Object.keys(t);for(let e=0;e<s.length;e++){var o=s[e];this.content.operatorInfo[o]=t[o]}}_updateMemberList(e){qe(this.content.memberList)?this.content.memberList=e:this.content.memberList.forEach(t=>{e.forEach(e=>{t.userID===e.userID&&Object.assign(t,e)})})}_initNewGroupProfile(t){var s=Object.keys(t);for(let e=0;e<s.length;e++){var o=s[e];this.content.newGroupProfile[o]=\"muteAllMembers\"!==o?t[o]:1===t[o]}}}let uo={from:!0,groupID:!0,groupName:!0,to:!0,groupType:!0};class po{constructor(e){this.type=ee,this.content={},this._initContent(e)}_initContent(t){Object.keys(t).forEach(e=>{switch(e){case\"memberInfoList\":break;case\"remarkInfo\":this.content.handleMessage=t[e];break;case\"groupProfile\":this.content.groupProfile={},this._initGroupProfile(t[e]);break;default:this.content[e]=t[e]}})}_initGroupProfile(t){var s=Object.keys(t);for(let e=0;e<s.length;e++){var o=s[e];uo[o]&&(\"groupName\"===o?this.content.groupProfile.name=t[o]:this.content.groupProfile[o]=t[o])}}}class lo{constructor(e,t,s,o){this.type=z,this._percent=0;var r=this._getFileInfo(e);this.content={downloadFlag:2,fileUrl:Zs(e.url||e.fileUrl,t,s,o)||\"\",uuid:e.uuid,fileName:r.name||\"\",fileSize:r.size||0}}_getFileInfo(e){if(!Be(e.fileName)&&!Be(e.fileSize))return{size:e.fileSize,name:e.fileName};var t=e.file.files[0];if(P){if(t.path&&-1!==t.path.indexOf(\".\")){let e=t.path.slice(t.path.lastIndexOf(\".\")+1).toLowerCase();t.type=e,t.name||(t.name=ze(999999)+\".\"+e)}t.name||(t.type=\"\",t.name=t.path.slice(t.path.lastIndexOf(\"/\")+1).toLowerCase()),t.suffix&&(t.type=t.suffix),t.url||(t.url=t.path)}return{size:t.size,name:t.name}}updatePercent(e){this._percent=e,1<this._percent&&(this._percent=1)}updateFileUrl(e){this.content.fileUrl=e}sendable(){return\"\"!==this.content.fileUrl&&\"\"!==this.content.fileName&&0!==this.content.fileSize}}class co{constructor(e){this.type=te,this.content={data:e.data||\"\",description:e.description||\"\",extension:e.extension||\"\"}}setData(e){return this.content.data=e,this}setDescription(e){return this.content.description=e,this}setExtension(e){return this.content.extension=e,this}sendable(){return 0!==this.content.data.length||0!==this.content.description.length||0!==this.content.extension.length}}class ho{constructor(e,t,s,o){this.type=Y,this._percent=0,this._fileDownloadProxy=t,this._authKey=s,this._fileDNList=o,this.content={remoteVideoUrl:Zs(e.remoteVideoUrl||e.videoUrl||\"\",this._fileDownloadProxy,this._authKey,this._fileDNList),videoFormat:e.videoFormat,videoSecond:parseInt(e.videoSecond,10),videoSize:e.videoSize,videoUrl:Zs(e.videoUrl,this._fileDownloadProxy,this._authKey,this._fileDNList),videoDownloadFlag:2,videoUUID:e.videoUUID,thumbUUID:e.thumbUUID,thumbFormat:e.thumbFormat,thumbWidth:e.thumbWidth,snapshotWidth:e.thumbWidth,thumbHeight:e.thumbHeight,snapshotHeight:e.thumbHeight,thumbSize:e.thumbSize,snapshotSize:e.thumbSize,thumbDownloadFlag:2,thumbUrl:Zs(e.thumbUrl,this._fileDownloadProxy,this._authKey,this._fileDNList),snapshotUrl:Zs(e.thumbUrl,this._fileDownloadProxy,this._authKey,this._fileDNList)}}updatePercent(e){this._percent=e,1<this._percent&&(this._percent=1)}updateVideoUrl(e){e&&(this.content.remoteVideoUrl=Zs(e,this._fileDownloadProxy,this._authKey,this._fileDNList))}updateSnapshotInfo(e){var{snapshotUrl:e,snapshotWidth:t,snapshotHeight:s}=e;qe(e)||(this.content.thumbUrl=this.content.snapshotUrl=e),qe(t)||(this.content.thumbWidth=this.content.snapshotWidth=Number(t)),qe(s)||(this.content.thumbHeight=this.content.snapshotHeight=Number(s))}sendable(){return\"\"!==this.content.remoteVideoUrl}}class go{constructor(e){this.type=Q;var{description:e,longitude:t,latitude:s}=e;this.content={description:e,longitude:t,latitude:s}}sendable(){return!0}}class mo{constructor(e,t,s,o){var r,i;this.from=e.from,this.messageSender=e.from,this.time=e.time,this.messageSequence=e.sequence,this.clientSequence=e.clientSequence||e.sequence,this.messageRandom=e.random,this.cloudCustomData=e.cloudCustomData||\"\",this.clientTime=e.clientTime||void 0,e.ID?(this.ID=e.ID||\"\",this.nick=e.nick||\"\",this.avatar=e.avatar||\"\",e.messageBody?this.messageBody=JSON.parse(JSON.stringify(e.messageBody)):this.messageBody=[{type:e.type,payload:e.payload}],e.conversationType?e.conversationType.startsWith(ae)?this.receiverUserID=e.to:e.conversationType.startsWith(ue)&&(this.receiverGroupID=e.to):e.receiverGroupID?this.receiverGroupID=e.receiverGroupID:e.receiverUserID&&(this.receiverUserID=e.receiverUserID),this.messageReceiver=e.to||e.messageReceiver):(this.nick=e.nick||\"\",this.avatar=e.avatar||\"\",this.messageBody=[],r=e.elements[0].type,i=e.elements[0].content,this._patchRichMediaPayload(r,i),this._updateRichMediaDownloadUrl(r,i,t,s,o),r===se?this.messageBody.push({type:r,payload:new _o(i,t,s,o).content}):this.messageBody.push({type:r,payload:i}),e.groupID&&(this.receiverGroupID=e.groupID,this.messageReceiver=e.groupID),e.to&&(this.receiverUserID=e.to,this.messageReceiver=e.to),this.ID=`${e.tinyID}-${e.clientTime}-`+e.random)}_patchRichMediaPayload(e,t){e===J?t.imageInfoArray.forEach(e=>{!e.imageUrl&&e.url&&(e.imageUrl=e.url,e.sizeType=e.type,1===e.type?e.type=0:3===e.type&&(e.type=1))}):e===Y?!t.remoteVideoUrl&&t.videoUrl&&(t.remoteVideoUrl=t.videoUrl):e===W?!t.remoteAudioUrl&&t.url&&(t.remoteAudioUrl=t.url):e===z&&!t.fileUrl&&t.url&&(t.fileUrl=t.url,t.url=void 0)}_updateRichMediaDownloadUrl(e,t,s,o,r){(s||o)&&(e===J?t.imageInfoArray.forEach(e=>{e.imageUrl=Zs(e.imageUrl,s,o,r),e.url=Zs(e.url,s,o,r)}):e===Y?(t.remoteVideoUrl=Zs(t.remoteVideoUrl,s,o,r),t.videoUrl=Zs(t.videoUrl,s,o,r),t.thumbUrl=Zs(t.thumbUrl,s,o,r),t.snapshotUrl=Zs(t.thumbUrl,s,o,r),t.snapshotHeight=t.thumbHeight,t.snapshotWidth=t.thumbWidth):e===W?(t.remoteAudioUrl=Zs(t.remoteAudioUrl,s,o,r),t.url=Zs(t.url,s,o,r)):e===z&&(t.fileUrl=Zs(t.fileUrl,s,o,r)))}}var _o=class{constructor(n,a,u,p){if(this.type=se,this.content={downloadKey:\"\",pbDownloadKey:\"\",messageList:[],title:\"\",abstractList:[],compatibleText:\"\",version:0,layersOverLimit:!1},n.downloadKey){let{downloadKey:e,pbDownloadKey:t,title:s,abstractList:o,compatibleText:r,version:i}=n;this.content.downloadKey=e,this.content.pbDownloadKey=t,this.content.title=s,this.content.abstractList=o,this.content.compatibleText=r,this.content.version=i||0}else if(qe(n.messageList))1===n.layersOverLimit&&(this.content.layersOverLimit=!0);else{let{messageList:e,title:t,abstractList:s,compatibleText:o,version:r}=n,i=[];e.forEach(e=>{qe(e)||(e=new mo(e,a,u,p),i.push(e))}),this.content.messageList=i,this.content.title=t,this.content.abstractList=s,this.content.compatibleText=o,this.content.version=r||0}}sendable(){return!qe(this.content.messageList)||!qe(this.content.downloadKey)}};let fo={1:oe,2:re,3:ie,4:ne};class Io{constructor(e){this.ID=\"\",this.conversationID=e.conversationID||null,this.conversationType=e.conversationType||ae,this.conversationSubType=e.conversationSubType,this.time=e.time||Math.ceil(Date.now()/1e3),this.sequence=e.sequence||0,this.clientSequence=e.clientSequence||e.sequence||0,this.random=e.random||0===e.random?e.random:ze(),this.priority=this._computePriority(e.priority),this.nick=e.nick||\"\",this.avatar=e.avatar||\"\",this.isPeerRead=!1,this.nameCard=\"\",this.hasRiskContent=function(e){let t=e&&1<e?!0:!1;return t}(e.checkResult),this._elements=[],this.isPlaceMessage=e.isPlaceMessage||0,this.isRevoked=2===e.isPlaceMessage||8===e.msgFlagBits,this.from=e.from||null,this.to=e.to||null,this.flow=\"\",this.isSystemMessage=e.isSystemMessage||!1,this.protocol=e.protocol||\"JSON\",this.isResend=!1,this.isRead=!1,this.status=e.status||Ws,this._onlineOnlyFlag=!1,this._groupAtInfoList=[],this._relayFlag=!1,this.atUserList=[],this.cloudCustomData=e.cloudCustomData||\"\",this.isDeleted=!1,this.isModified=!!e.messageVersion,this._isExcludedFromUnreadCount=!(!e.messageControlInfo||1!==e.messageControlInfo.excludedFromUnreadCount),this._isExcludedFromLastMessage=!(!e.messageControlInfo||1!==e.messageControlInfo.excludedFromLastMessage),this.clientTime=e.clientTime||Math.floor(Se()/1e3)||0,this.senderTinyID=e.senderTinyID||e.tinyID||\"\",this.readReceiptInfo=e.readReceiptInfo||{readCount:void 0,unreadCount:void 0,isPeerRead:void 0,timestamp:0},this.needReadReceipt=!0===e.needReadReceipt||1===e.needReadReceipt,this.version=e.messageVersion||0,this.isBroadcastMessage=e.isBroadcastMessage||!1,this._receiverList=e.receiverList||void 0,this.isSupportExtension=!0===e.isSupportExtension||1===e.isSupportExtension,this._cmConfigID=e.customModerationConfigurationID,this.revoker=e.revokerInfo&&e.revokerInfo.revoker||\"\",this.revokerInfo=e.revokerInfo||{userID:\"\",nick:\"\",avatar:\"\"},this.revokeReason=e.revokeReason||\"\",this.reInitialize(e.currentUser),this.extractGroupInfo(e.groupProfile||null),this.handleGroupAtInfo(e),this.initC2CReadReceiptInfo(e)}get elements(){return this._elements}getElements(){return this._elements}extractGroupInfo(e){null!==e&&(Ve(e.nick)&&(this.nick=e.nick),Ve(e.avatar)&&(this.avatar=e.avatar),e=e.messageFromAccountExtraInformation,He(e))&&Ve(e.nameCard)&&(this.nameCard=e.nameCard)}handleGroupAtInfo(e){e.payload&&e.payload.atUserList&&e.payload.atUserList.forEach(e=>{e!==ve?(this._groupAtInfoList.push({groupAtAllFlag:0,groupAtUserID:e}),this.atUserList.push(e)):(this._groupAtInfoList.push({groupAtAllFlag:1}),this.atUserList.push(ve))}),Ke(e.groupAtInfo)&&e.groupAtInfo.forEach(e=>{0===e.groupAtAllFlag?this.atUserList.push(e.groupAtUserID):1===e.groupAtAllFlag&&this.atUserList.push(ve)})}getGroupAtInfoList(){return this._groupAtInfoList}_initProxy(){this._elements[0]&&(this.payload=this._elements[0].content,this.type=this._elements[0].type)}reInitialize(e){e&&(this.status=this.from?Ws:Js,!this.from)&&(this.from=e),this._initFlow(e),this._initSequence(e),this._concatConversationID(e),this.generateMessageID()}isSendable(){return 0!==this._elements.length&&(!0===this._relayFlag||\"function\"==typeof this._elements[0].sendable&&this._elements[0].sendable())}_initTo(e){this.conversationType===ue&&(this.to=e.groupID)}_initSequence(e){0===this.clientSequence&&e&&(this.clientSequence=function(o){if(!o)return!1;if(void 0===Xe[o]){var r=new Date;let e=(\"3\"+r.getHours()).slice(-2),t=(\"0\"+r.getMinutes()).slice(-2),s=(\"0\"+r.getSeconds()).slice(-2);Xe[o]=parseInt([e,t,s,\"0001\"].join(\"\")),e=null,t=null,s=null,ht.l(\"autoIncrementIndex start index:\"+Xe[o])}return Xe[o]++}(e)),0===this.sequence&&this.conversationType===ae&&(this.sequence=this.clientSequence)}generateMessageID(){this.from===le&&(this.senderTinyID=\"144115198244471703\"),this.ID=`${this.senderTinyID}-${this.clientTime}-`+this.random}_initFlow(e){\"\"!==e&&(e===this.from?(this.flow=\"out\",this.isRead=!0):this.flow=\"in\")}_concatConversationID(e){var t=this[\"to\"],s=this.conversationType;s!==le?(e=s===ae?e===this.from?t:this.from:this.to,this.conversationID=e?\"\"+s+e:null):this.conversationID=le}isElement(e){return e instanceof Qs||e instanceof oo||e instanceof ro||e instanceof io||e instanceof lo||e instanceof ho||e instanceof ao||e instanceof po||e instanceof co||e instanceof go||e instanceof _o}setElement(t,s,o,r){if(this.isElement(t))this._elements=[t];else{var i=e=>{if(e.type&&e.content)switch(e.type){case j:this.setTextElement(e.content);break;case J:this.setImageElement(e.content,s,o,r);break;case W:this.setAudioElement(e.content,s,o,r);break;case z:this.setFileElement(e.content,s,o,r);break;case Y:this.setVideoElement(e.content,s,o,r);break;case te:this.setCustomElement(e.content);break;case Q:this.setLocationElement(e.content);break;case Z:this.setGroupTipElement(e.content);break;case ee:this.setGroupSystemNoticeElement(e.content);break;case X:this.setFaceElement(e.content);break;case se:this.setMergerElement(e.content,s,o,r)}};if(Ke(t))for(let e=0;e<t.length;e++)i(t[e]);else i(t)}this._initProxy()}clearElement(){this._elements.length=0}setTextElement(e){e=\"string\"==typeof e?e:e.text,e=new Qs({text:e});this._elements.push(e)}setImageElement(e,t,s,o){e=new oo(e,t,s,o);this._elements.push(e)}setAudioElement(e,t,s,o){e=new io(e,t,s,o);this._elements.push(e)}setFileElement(e,t,s,o){e=new lo(e,t,s,o);this._elements.push(e)}setVideoElement(e,t,s,o){e=new ho(e,t,s,o);this._elements.push(e)}setLocationElement(e){e=new go(e);this._elements.push(e)}setCustomElement(e){e=new co(e);this._elements.push(e)}setGroupTipElement(e){let t={};var s=e.operationType;if(qe(e.memberInfoList)?e.operatorInfo&&(t=e.operatorInfo):s!==Le&&s!==Ce&&s!==Ge&&s!==be||(t=e.memberInfoList[0]),!qe(e.memberExtraInfo)){let t=e.memberExtraInfo[\"reason\"];e.msgMemberInfo.forEach(e=>{e.reason=t})}var{nick:s,avatar:o}=t,s=(Ve(s)&&(this.nick=s),Ve(o)&&(this.avatar=o),new ao(e));this._elements.push(s)}setGroupSystemNoticeElement(e){e=new po(e);this._elements.push(e)}setFaceElement(e){e=new ro(e);this._elements.push(e)}setMergerElement(e,t,s,o){e=new _o(e,t,s,o);this._elements.push(e)}setIsRead(e){this.isRead=e}setRelayFlag(e){this._relayFlag=e}_computePriority(e){if(!Be(e)){if(Ve(e)&&-1!==Object.values(fo).indexOf(e))return e;if(xe(e)){e=\"\"+e;if(-1!==Object.keys(fo).indexOf(e))return fo[e]}}return re}setNickAndAvatar(e){var{nick:e,avatar:t}=e;Ve(e)&&(this.nick=e),Ve(t)&&(this.avatar=t)}setNameCard(e){Ve(e)&&(this.nameCard=e)}initC2CReadReceiptInfo(e){var{readReceiptSentByPeer:e,timestamp:t=0}=e;this.conversationType===ae&&!0===this.needReadReceipt&&(this.readReceiptInfo.isPeerRead=1===e,this.readReceiptInfo.timestamp=t)}}class Mo{constructor(e){this._grpM=e,this._n=\"GroupTipsHandler\",this._cachedGroupTipsMap=new Map,this._checkCountMap=new Map,this.MAX_CHECK_COUNT=4}onCheckTimer(e){e%1==0&&0<this._cachedGroupTipsMap.size&&this._check()}_check(){this._cachedGroupTipsMap.forEach((e,t)=>{var s=this._checkCountMap.get(t),o=this._grpM.hasLocalGroup(t);ht.l(this._n+`._check groupID:${t} hasLocalGroup:${o} checkCount:`+s),o?(this._notifyCachedGroupTips(t),this._checkCountMap.delete(t),this._grpM.deleteUnjoinedAVChatRoom(t)):s>=this.MAX_CHECK_COUNT?(this._deleteCachedGroupTips(t),this._checkCountMap.delete(t)):this._checkCountMap.set(t,++s)})}onNewGroupTips(e){ht.l(this._n+\".onNewGroupTips options:\"+JSON.stringify(e.dataList));var{eventDataList:e,result:t,AVChatRoomMessageList:s}=this._assembly(e);0<s.length&&this._grpM.onAVChatRoomMessage(s),0<t.length&&(this._grpM.emitOEvt(Nt,t),this._handleTips(t)),0<e.length&&(this._grpM.updateNextMessageSeq(e),this._grpM.get(o).onNewMessage({conversationOptionsList:e,isInstantMessage:!0}))}_assembly(e){var{event:r,dataList:i}=e,n=null,a=[],u=[],p={},l=[];for(let s=0,e=i.length;s<e;s++){let e=Ye(i[s]);if(6===r){if(this._grpM.isGroupAttributesUpdatedNotice(e))continue;if(this._grpM.isGroupCountersNotice(e))continue}var{groupProfile:{groupID:h,communityType:g=0,topicID:c,invisible:m,groupType:d}}=e;let t=void 0;var _=this._grpM.isMessageFromTopic(g,c),f=(_&&(t=pe,e.to=c),this._grpM.hasLocalGroup(h));if(f||!this._grpM.isUnjoinedAVChatRoom(h))if(f||_)if(this._grpM.isMessageFromOrToAVChatroom(h))e.event=r,l.push(e);else if(e.currentUser=this._grpM.getMyUserID(),e.conversationType=ue,(n=new Io(e)).setElement({type:Z,content:{...e.elements,groupProfile:e.groupProfile}}),n.isSystemMessage=!1,1===m)this._qualityStat(n);else{var f=this._grpM.get(o),{conversationID:_,sequence:m}=n;if(6===r)n._onlineOnlyFlag=!0,u.push(n);else if(!f.pushIntoNoticeResult(u,n))continue;if(!(this._grpM.isMessageFromCommunityOfTopic(g,c)||6===r&&f.getLocalConversation(_))){6!==r&&this._qualityStat(n);g=f.isRemoteRead({conversationID:_,sequence:m});if(Be(p[_])){let e=0;\"in\"!==n.flow||n._isExcludedFromUnreadCount||n._onlineOnlyFlag||g||(e=1),p[_]=a.push({conversationID:_,unreadCount:e,type:Be(t)?n.conversationType:t,subType:n.conversationSubType,lastMessage:n._isExcludedFromLastMessage?\"\":n})-1}else{let e=p[_];a[e].type=n.conversationType,a[e].subType=n.conversationSubType,a[e].lastMessage=n._isExcludedFromLastMessage?\"\":n,\"in\"!==n.flow||n._isExcludedFromUnreadCount||n._onlineOnlyFlag||g||a[e].unreadCount++}}}else this._cacheAndCompare({groupID:h,event:r,item:e,groupType:d})}return{eventDataList:a,result:u,AVChatRoomMessageList:l}}_qualityStat(e){this._grpM.get(p).addMessageSequence({key:Wt,message:e})}_handleTips(e){e.forEach(e=>{switch(e.payload.operationType){case 1:this._onNewMemberComeIn(e);break;case 2:this._onMemberQuit(e);break;case 3:this._onMemberKickedOut(e);break;case 4:this._onMemberSetAdmin(e);break;case 5:this._onMemberCancelledAdmin(e);break;case 6:this._onGroupProfileModified(e);break;case 7:this._onMemberInfoModified(e);break;case 8:this._onTopicProfileUpdated(e);break;default:ht.w(this._n+\"._handleTips unknown operationType:\"+e.payload.operationType)}})}_onNewMemberComeIn(e){var{memberNum:e,groupProfile:{groupID:t}}=e.payload,t=this._grpM.getLocalGroupProfile(t);t&&xe(e)&&t.memberCount!==e&&(t.memberCount=e,this._updateConvGroupProfile(t))}_onMemberQuit(e){var{memberNum:t,groupProfile:{groupID:s}}=e.payload,o=this._grpM.getLocalGroupProfile(s);o&&xe(t)&&o.memberCount!==t&&(o.memberCount=t,this._updateConvGroupProfile(o)),this._grpM.getGroupMemberHandler().deleteLocalGroupMembers(s,e.payload.userIDList)}_onMemberKickedOut(e){var{memberNum:t,groupProfile:{groupID:s}}=e.payload,o=this._grpM.getLocalGroupProfile(s);o&&xe(t)&&o.memberCount!==t&&(o.memberCount=t,this._updateConvGroupProfile(o)),this._grpM.getGroupMemberHandler().deleteLocalGroupMembers(s,e.payload.userIDList)}_updateConvGroupProfile(e){this._grpM.get(o).updateConvGroupProfile([e])}_onMemberSetAdmin(e){let t=e.payload.groupProfile.groupID,s=e.payload.userIDList,o=this._grpM.getGroupMemberHandler();s.forEach(e=>{e=o.getLocalGroupMemberInfo(t,e);e&&e.updateRole(Me)})}_onMemberCancelledAdmin(e){let t=e.payload.groupProfile.groupID,s=e.payload.userIDList,o=this._grpM.getGroupMemberHandler();s.forEach(e=>{e=o.getLocalGroupMemberInfo(t,e);e&&e.updateRole(ye)})}_onGroupProfileModified(e){let{newGroupProfile:t,groupProfile:s,operatorInfo:o}=e.payload,r=s[\"groupID\"],i=this._grpM.getLocalGroupProfile(r);Object.keys(t).forEach(e=>{switch(e){case\"ownerID\":this._ownerChanged(i,t);break;case\"groupName\":i.name=t[e];break;default:i[e]=t[e]}}),Be(o)||Object.keys(o).forEach(t=>{if(\"nameCard\"===t)i.updateSelfInfo({nameCard:o[t]});else if(\"role\"===t){let e=\"\";400===o[t]?e=Ie:300===o[t]?e=Me:200===o[t]&&(e=ye),i.updateSelfInfo({role:e})}});e=!i.isSupportTopic;this._grpM.emitGroupListUpdate(!0,e)}_ownerChanged({groupID:r},e){var i=this._grpM.getLocalGroupProfile(r),n=this._grpM.getMyUserID();if(n===e.ownerID){i.updateGroup({selfInfo:{role:Ie}});let e=this._grpM.getGroupMemberHandler(),t=e.getLocalGroupMemberInfo(r,n),s=this._grpM.getLocalGroupProfile(r).ownerID,o=e.getLocalGroupMemberInfo(r,s);t&&t.updateRole(Ie),o&&o.updateRole(ye)}}_onMemberInfoModified(e){let{to:t,payload:{groupProfile:s,memberList:o}}=e,r=s.groupID,i=(it(t)&&this._updateTopicMuteTime(e),this._grpM.getGroupMemberHandler());o.forEach(e=>{var t=i.getLocalGroupMemberInfo(r,e.userID);t&&xe(e.muteTime)&&t.updateMuteUntil(e.muteTime)})}_updateTopicMuteTime(e){var{to:e,payload:{groupProfile:t,memberList:o=[]}}=e,t=t[\"groupID\"],r=this._grpM.get(s).getLocalTopic(t,e);if(r){let s=!1;for(let t=0;t<o.length;t++){let e=o[t];if(e.userID===this._grpM.getMyUserID()&&0<=e.muteTime){r.updateSelfInfo({muteTime:e.muteTime}),s=!0;break}}s&&this._grpM.emitOEvt(Vt,{groupID:t,topic:r})}}_onTopicProfileUpdated(e){var{groupProfile:{groupID:t},newTopicInfo:o}=e.payload;this._grpM.get(s).onTopicProfileUpdated({groupID:t,topicID:e.to,...o})}_cacheGroupTips(e,t){this._cachedGroupTipsMap.has(e)||this._cachedGroupTipsMap.set(e,[]),this._cachedGroupTipsMap.get(e).push(t)}_deleteCachedGroupTips(e){this._cachedGroupTipsMap.has(e)&&this._cachedGroupTipsMap.delete(e)}_notifyCachedGroupTips(e,t){var s=this._cachedGroupTipsMap.get(e)||[];ht.l(this._n+`._notifyCachedGroupTips groupID:${e} groupType:${t} count:`+s.length),s.forEach(e=>{this.onNewGroupTips(e)}),this._deleteCachedGroupTips(e)}_cacheAndCompare(e){var{groupID:e,event:t,item:s,groupType:o}=e,t=(ht.l(this._n+`._cacheAndCompare groupID:${e} groupType:`+o),this._cacheGroupTips(e,{event:t,dataList:[s]}),{groupID:e,type:o});o===me?this._grpM.hasLocalGroup(e)?this._notifyCachedGroupTips(e,o):this._grpM.setUnjoinedAVChatRoom(e):(this._grpM.updateGroupMap([t]),this._notifyCachedGroupTips(e,o)),this._checkCountMap.has(e)||this._checkCountMap.set(e,0)}reset(){this._cachedGroupTipsMap.clear(),this._checkCountMap.clear()}}class yo{constructor(e){this._grpM=e,this._n=\"CommonGroupHandler\",this.tempConversationList=null,this._cachedGroupMessageMap=new Map,this._checkCountMap=new Map,this.MAX_CHECK_COUNT=4,this.PAGING_GRP_COUNT_LIMIT=200,this._pagingStatus=zs,this._pagingGetCostList=[],e.getIEmitInst().on(Jt.A2KEY_AND_TINYID_UPDATED,this.syncGroupList,this)}onCheckTimer(e){e%1==0&&0<this._cachedGroupMessageMap.size&&this._check()}_check(){this._cachedGroupMessageMap.forEach((e,t)=>{var s=this._checkCountMap.get(t),o=this._grpM.hasLocalGroup(t);ht.l(this._n+`._check groupID:${t} hasLocalGroup:${o} checkCount:`+s),o?(this._notifyCachedGroupMessage(t),this._checkCountMap.delete(t),this._grpM.deleteUnjoinedAVChatRoom(t)):s>=this.MAX_CHECK_COUNT?(this._deleteCachedGroupMessage(t),this._checkCountMap.delete(t)):this._checkCountMap.set(t,++s)})}updateLastMsg(i){var e=this._n+\".updateLastMsg\";if(0===this._grpM.getGroupMap().size)this.tempConversationList=i;else{let t,s,o,r=!1;var n,a,u=i.length;for(let e=0;e<u;e++)(t=i[e]).type===ue&&0!==t.lastMessage.lastSequence&&null!==t.lastMessage.payload&&(s=t.conversationID.split(/^GROUP/)[1],o=this._grpM.getLocalGroupProfile(s))&&(n=o.lastMessage,a=t.lastMessage,JSON.stringify(n)!==JSON.stringify(a))&&(o.lastMessage={...t.lastMessage},r=!0);ht.l(e+` convCount:${u} groupCount:${this._grpM.getLocalGroupList().length} isUpdated:`+r),r&&(this._grpM.sortLocalGroupList(),this._grpM.emitGroupListUpdate(!0,!1))}}onNewMessage(e){var{conversationOptionsList:t,messageList:s,AVChatRoomMessageList:r}=this._assembly(e),r=(0<r.length&&this._grpM.onAVChatRoomMessage(r),Ze(s)),r=(0<r.length&&this._grpM.emitOEvt(qt,r),0<t.length&&(this._grpM.get(o).onNewMessage({conversationOptionsList:t,isInstantMessage:!1!==e.isInstantMessage,updateUnreadCount:!1!==e.updateUnreadCount}),this._grpM.updateNextMessageSeq(t)),st(s));0<r.length&&this._grpM.emitOEvt(Nt,r),s.length=0}_assembly(e){let{dataList:u,event:p,isInstantMessage:l}=e;var h=null;let g=[],c=[],m=[],d={},_=this._grpM.getFileDownloadProxy(),f=this._grpM.getDownloadFileAuthKey(),I=this._grpM.get(n).getFileDNList(),s=u.length;1<s&&u.sort((e,t)=>e.sequence-t.sequence);var M=this._grpM.get(o),y=this._grpM.get(t);for(let a=0;a<s;a++){let e=Ye(u[a]),{groupProfile:{groupID:t,communityType:r=0,topicID:i,invisible:s,groupType:o}}=e,n=void 0;var D=this._grpM.isMessageFromTopic(r,i),L=(D&&(n=pe,e.to=i),this._grpM.hasLocalGroup(t));if(L||!this._grpM.isUnjoinedAVChatRoom(t))if(L||D)if(this._grpM.isMessageFromOrToAVChatroom(t))e.event=p,m.push(e);else if(e.currentUser=this._grpM.getMyUserID(),e.conversationType=ue,e.isSystemMessage=!!e.isSystemMessage,(h=new Io(e)).setElement(e.elements,_,f,I),1===s)this._qualityStat(l,h);else{let s=1===u[a].isModified;if(M.isMessageSentByCurrentInstance(h)?h.isModified=s:s=!1,1===e.onlineOnlyFlag)h._onlineOnlyFlag=!0,M.isMessageSentByCurrentInstance(h)||c.push(h);else{if(this._grpM.isMessageFromCommunityOfTopic(r,i)){c.push(h);continue}if(h.from===this._grpM.getMyUserID()){let s=M.getLatestMessageSentByMe(h.conversationID);if(s){let{nick:e,avatar:t}=s;e===h.nick&&t===h.avatar||(M.modifyMessageSentByMe({conversationID:o,latestNick:h.nick,latestAvatar:h.avatar}),y.mockOnNickAvatarModified(h.nick,h.avatar))}}if(!M.pushIntoMessageList(c,h,s))continue;this._qualityStat(l,h);let{conversationID:o,sequence:e}=h,t=M.isRemoteRead({conversationID:o,sequence:e});if(Be(d[o])){let e=0;\"in\"!==h.flow||h._isExcludedFromUnreadCount||t||(e=1),d[o]=g.push({conversationID:o,unreadCount:e,type:Be(n)?h.conversationType:n,subType:h.conversationSubType,lastMessage:h._isExcludedFromLastMessage?\"\":h})-1}else{let e=d[o];g[e].type=Be(n)?h.conversationType:n,g[e].subType=h.conversationSubType,g[e].lastMessage=h._isExcludedFromLastMessage?\"\":h,\"in\"!==h.flow||h._isExcludedFromUnreadCount||t||g[e].unreadCount++}}}else this._cacheAndCompare({groupID:t,event:p,item:e,groupType:o})}return{conversationOptionsList:g,messageList:c,AVChatRoomMessageList:m}}_qualityStat(e,t){var s=this._grpM.get(p);s.addMessageSequence({key:Wt,message:t}),e&&0<t.clientTime&&s.addMessageDelay(t.clientTime)}onMsgRevoked(e,t){let p=this._grpM.get(o),l=[],h=[];e.dataList.forEach(e=>{let t=e.elements[\"revokedInfos\"],{revokerInfo:n,groupProfile:a}=e,u=!1;a&&(u=rt({groupID:a.groupID})||!qe(a.topicID)),Be(t)||t.forEach(t=>{var s=qe(t.topicID)?\"GROUP\"+t.groupID:\"GROUP\"+t.topicID,e=p.getLocalConversation(s),o=t.revokerInfo&&t.revokerInfo.revoker||n&&n.revoker,r=n&&n.reason||\"\";let i;if(e&&ot(e.type))i={conversationID:s,sequence:t.sequence,ID:`${t.tinyID}-${t.clientTime}-`+t.random};else{let e=p.revoke(s,t.sequence,t.random);e?i=e:(i={conversationID:s,sequence:t.sequence},t.tinyID&&t.clientTime&&t.random&&(i.ID=`${t.tinyID}-${t.clientTime}-`+t.random),t.time&&(i.time=t.time))}i&&(i.revoker=o,i.revokeReason=r,i.revokerInfo={userID:o,nick:\"\",avatar:\"\"},(u?(i.revokerInfo.nick=a.nick,i.revokerInfo.avatar=a.avatar,l):h).push(i))})}),0===h.length&&0===l.length||(p.onMessageRevoked([...l,...h],t),0<l.length&&this._grpM.emitOEvt(kt,l),0<h.length&&p.updateRevokerInfo(h).then(e=>{this._grpM.emitOEvt(kt,e)}))}_groupListTreeShaking(s){let o=new Map([...this._grpM.getGroupMap()]);for(let e=0,t=s.length;e<t;e++)o.delete(s[e].groupID);this._grpM.hasJoinedAVChatRoom()&&this._grpM.getJoinedAVChatRoom().forEach(e=>{o.delete(e)}),this._grpM.getGroupMap().forEach((e,t)=>{e.isSupportTopic&&o.delete(t)});var r=[...o.keys()];for(let e=0,t=r.length;e<t;e++)this._grpM.deleteGroup(r[e])}syncGroupList(e=!1){this._pagingStatus===zs&&this._grpM.clearGroupMap();let t=[...L],s=this.PAGING_GRP_COUNT_LIMIT,o=[];if(!0===e)return this._pagingGetGroupListWithTopic({limit:s,offset:0,groupBaseInfoFilter:t,groupList:o});let r=this._n+\".syncGroupList\",i=new es(\"syncGroupList\");return this._pagingGetGroupList({limit:s,offset:0,groupBaseInfoFilter:t,groupList:o}).then(()=>{var e=function(e){if(Ke(e)&&0!==e.length){let t=0;return e.forEach(e=>{t+=e}),(t/e.length).toFixed(0)}}(this._pagingGetCostList),t=function(e){if(Ke(e)&&0!==e.length){let t=0;return e.forEach(e=>{t+=e}),t.toFixed(0)}}(this._pagingGetCostList),t=(this._pagingGetCostList.length=0,this._pagingStatus=Xs,this._groupListTreeShaking(o),this._grpM.updateGroupMap(o),`count:${this._grpM.getLocalGroupList().length} sum:${t} avg:`+e);return ht.l(r+\" ok. \"+t),i.setMessage(t).end(),this.tempConversationList&&(this.updateLastMsg(this.tempConversationList),this.tempConversationList=null),this._grpM.emitGroupListUpdate(!0,!0),gt({groupList:this._grpM.getLocalGroupList()})}).catch(e=>(this._pagingStatus=Ys,i.setError(e).end(),ht.e(r+\" failed. error:\",e),jt(e)))}getGroupList(){let t=this._n+\".getGroupList\";var e;return ht.l(t+\" pagingStatus:\"+this._pagingStatus),this._pagingStatus===Ys||this._pagingStatus===zs?this.syncGroupList().then(()=>{var e=this._grpM.getLocalGroupList();return gt({groupList:e,isSyncCompleted:this.isPagingGetCompleted()})}).catch(e=>(ht.e(t+\" failed. error:\",e),jt(e))):(e=this._grpM.getLocalGroupList(),ht.l(t+\". returned group count:\"+e.length),Bt({groupList:e,isSyncCompleted:this.isPagingGetCompleted()}))}isPagingGetCompleted(){return this._pagingStatus===Xs}_pagingGetGroupList(e){let o=this._n+\"._pagingGetGroupList\",{isCommunityRelay:r=!1,limit:i,offset:n,groupBaseInfoFilter:a,groupList:u}=e,p=Date.now();return this._grpM.req({P:ss,data:{type:r?de:void 0,memberAccount:this._grpM.getMyUserID(),limit:i,offset:n,responseFilter:{groupBaseInfoFilter:a,selfInfoFilter:[\"Role\",\"JoinTime\",\"MsgFlag\",\"MsgSeq\"]}}}).then(e=>{var{groups:e=[],totalCount:t}=e.data,e=(u.push(...e),this._handleGroupAtInfoWithoutTopic(r,e),n+i),s=!(e<t),t=`offset:${n} limit:${i} total:${t} isCompleted:${s} current:${u.length} isCommunityRelay:`+r;return this._pagingGetCostList.push(ut(p,!1)),ht.l(o+` ok. ${t} cost:`+ut(p)),r||s?!r&&s?(ht.l(o+\" start to get community list\"),n=0,this._pagingGetGroupList({limit:i,offset:n,groupBaseInfoFilter:a,groupList:u,isCommunityRelay:!0})):r&&!s?(n=e,this._pagingGetGroupList({limit:i,offset:n,groupBaseInfoFilter:a,groupList:u,isCommunityRelay:!0})):gt({groupList:u}):(n=e,this._pagingGetGroupList({limit:i,offset:n,groupBaseInfoFilter:a,groupList:u}))}).catch(e=>10018===e.code?(ht.w(this.logPrefix+\" response size exceeds the limit, request count:\"+i),i=50,this._pagingGetGroupList({limit:i,offset:n,groupBaseInfoFilter:a,groupList:u,isCommunityRelay:r})):r?(11e3===e.code&&ht.l(o+\" ok. community unavailable\"),Bt({groupList:u})):jt(e))}_pagingGetGroupListWithTopic(e){let o=this._n+\"._pagingGetGroupListWithTopic\",{limit:r,offset:i,groupBaseInfoFilter:n,groupList:a}=e,u=Date.now();return this._grpM.req({P:ss,data:{type:de,memberAccount:this._grpM.getMyUserID(),limit:r,offset:i,responseFilter:{groupBaseInfoFilter:n,selfInfoFilter:[...C]},isSupportTopic:1,needAppDefineData:1}}).then(e=>{var{groups:e=[],totalCount:t}=e.data,e=(a.push(...e),i+r),s=!(e<t);if(ht.l(o+` ok. offset:${i} limit:${r} totalCount:${t} isCompleted:${s} currentCount:${a.length} cost:`+ut(u)),!s)return i=e,this._pagingGetGroupListWithTopic({limit:r,offset:i,groupBaseInfoFilter:n,groupList:a});this._grpM.updateGroupMap(a),this._grpM.emitGroupListUpdate(!0,!1);t=this._grpM.getLocalGroupList().filter(e=>!0===e.isSupportTopic);return gt({groupList:t})}).catch(e=>10018===e.code?(ht.w(this.logPrefix+\" response size exceeds the limit, request count:\"+r),r=50,this._pagingGetGroupListWithTopic({limit:r,offset:i,groupBaseInfoFilter:n,groupList:a})):jt(e))}_cacheGroupMessage(e,t){this._cachedGroupMessageMap.has(e)||this._cachedGroupMessageMap.set(e,[]),this._cachedGroupMessageMap.get(e).push(t)}_deleteCachedGroupMessage(e){this._cachedGroupMessageMap.has(e)&&this._cachedGroupMessageMap.delete(e)}_notifyCachedGroupMessage(e,t){var s=this._cachedGroupMessageMap.get(e)||[];ht.l(this._n+`._notifyCachedGroupMessage groupID:${e} groupType:${t} count:`+s.length),s.forEach(e=>{this.onNewMessage(e)}),this._deleteCachedGroupMessage(e)}_cacheAndCompare(e){var{groupID:e,event:t,item:s,groupType:o}=e,t=(ht.l(this._n+`._cacheAndCompare groupID:${e} groupType:`+o),this._cacheGroupMessage(e,{event:t,dataList:[s]}),{groupID:e,type:o});o===me?this._grpM.hasLocalGroup(e)?this._notifyCachedGroupMessage(e,o):this._grpM.setUnjoinedAVChatRoom(e):(this._grpM.updateGroupMap([t]),this._notifyCachedGroupMessage(e,o)),this._checkCountMap.has(e)||this._checkCountMap.set(e,0)}_handleGroupAtInfoWithoutTopic(e,t){e&&0!==t.length&&t.forEach(e=>{let{groupID:t,groupAtInfoList:s}=e,r=[];Be(s)||(s.forEach(e=>{r.push({...e,groupID:t})}),this._grpM.get(o).onNewGroupAtTips({dataList:r}))})}setPagingGroupCount(e){Be(e)||(this.PAGING_GRP_COUNT_LIMIT=parseInt(e,10))}reset(){this.PAGING_GRP_COUNT_LIMIT=200,this._cachedGroupMessageMap.clear(),this._checkCountMap.clear(),this._pagingStatus=zs,this._pagingGetCostList=[]}}let Do=1,Lo=2,Co=3,Go=4,bo=5;class Ao{constructor(e){this._grpM=e,this._n=\"GroupAttributesHandler\",this._groupAttributesMap=new Map,this._groupAttributesCopy={},this.CACHE_EXPIRE_TIME=3e4,this._grpM.getIEmitInst().on(Jt.CLOUD_CONFIG,this._onCloudConfig,this)}_onCloudConfig(){var e=this._grpM.getCloudConfig(\"grp_attr_cache_time\");Be(e)||(this.CACHE_EXPIRE_TIME=Number(e))}updateLocalMainSequenceOnReconnected(){this._groupAttributesMap.forEach(e=>{e.localMainSequence=0})}isGroupAttributesUpdatedNotice(e){var{to:e,elements:{newGroupProfile:t}}=e,s=!Be(t)&&!qe(t.groupAttributeOption);return s&&this._onGroupAttributesUpdated({groupID:e,groupAttributeOption:t.groupAttributeOption}),s}_onGroupAttributesUpdated(e){let{groupID:t,groupAttributeOption:s}=e,{mainSequence:o,isWithChangedAttributeInfo:r,groupAttributeList:i=[],operationType:n}=s;if(ht.l(this._n+\".onGroupAttributesUpdated. \"+`groupID:${t} isWithChangedAttributeInfo:${r} operationType:`+n),!Be(n)){this._groupAttributesCopy=this._getCachedAttributes({groupID:t});e=this._getLocalGroupAttributes(t)[\"localMainSequence\"],e=o-e;if(0!=e)if(1===r&&1==e)this._refreshCachedGroupAttributes({groupID:t,remoteMainSequence:o,groupAttributeList:i,operationType:n}),this._emitGroupAttributesUpdated(t);else if(this._hasLocalGroupAttributes(t)){let e=this._getLocalGroupAttributes(t)[\"avChatRoomKey\"];this._getGroupAttributes({groupID:t,avChatRoomKey:e}).then(()=>{this._emitGroupAttributesUpdated(t)})}}}initGroupAttributesCache(e){var{groupID:e,avChatRoomKey:t}=e;this._groupAttributesMap.set(e,{lastUpdateTime:0,localMainSequence:0,remoteMainSequence:0,attributes:new Map,avChatRoomKey:t}),ht.l(this._n+`.initGroupAttributesCache groupID:${e} avChatRoomKey:`+t)}initGroupAttributes(e){let{groupID:s,groupAttributes:o}=e,{remoteMainSequence:t,avChatRoomKey:r}=this._getLocalGroupAttributes(s),i=new es(\"initGroupAttributes\");return i.setMessage(`groupID:${s} avChatRoomKey:${r} mainSequence:`+t),this._grpM.req({P:Ss,data:{groupID:s,avChatRoomKey:r,mainSequence:t,groupAttributeList:this._transformGroupAttributes(o)}}).then(e=>{ht.l(this._n+\".initGroupAttributes ok. groupID:\"+s);var{mainSequence:e,groupAttributeList:t}=e.data,t=[...t];return t.forEach(e=>{e.value=o[e.key]}),this._groupAttributesCopy=this._getCachedAttributes({groupID:s}),this._refreshCachedGroupAttributes({groupID:s,remoteMainSequence:e,groupAttributeList:t,operationType:Do}),this._emitGroupAttributesUpdated(s),i.end(),gt({groupAttributes:o})}).catch(e=>(i.setError(e).end(),jt(e)))}setGroupAttributes(e){let s=this._n+\".setGroupAttributes\",{groupID:o,groupAttributes:r}=e,{remoteMainSequence:t,avChatRoomKey:i,attributes:n}=this._getLocalGroupAttributes(o),a=this._transformGroupAttributes(r),u=(a.forEach(e=>{var t=e[\"key\"];e.sequence=0,n.has(t)&&(e.sequence=n.get(t).sequence)}),new es(\"setGroupAttributes\"));return u.setMessage(`groupID:${o} groupAttributes:`+JSON.stringify(r)),ht.l(s+`. groupID:${o} mainSequence:`+t),this._grpM.req({P:Ps,data:{groupID:o,avChatRoomKey:i,mainSequence:t,groupAttributeList:a}}).then(e=>{ht.l(s+\" ok.\");var{mainSequence:e,groupAttributeList:t}=e.data,t=[...t];return t.forEach(e=>{e.value=r[e.key]}),this._groupAttributesCopy=this._getCachedAttributes({groupID:o}),this._refreshCachedGroupAttributes({groupID:o,remoteMainSequence:e,groupAttributeList:t,operationType:Lo}),this._emitGroupAttributesUpdated(o),u.end(),gt({groupAttributes:r})}).catch(e=>(u.setError(e).end(),jt(e)))}deleteGroupAttributes(e){let{groupID:t,keyList:s=[]}=e,{remoteMainSequence:o,avChatRoomKey:r,attributes:i}=this._getLocalGroupAttributes(t),n=[...i.keys()],a=ws,u=Co,p={groupID:t,avChatRoomKey:r,mainSequence:o},l=[],h=(0<s.length&&(n=[],a=Rs,u=Go,s.forEach(e=>{let t=0;i.has(e)&&(t=i.get(e).sequence,n.push(e)),l.push({key:e,sequence:t})}),p.groupAttributeList=l),new es(\"deleteGroupAttributes\"));return h.setMessage(`groupID:${t} mainSequence:${o} keyList:${s} proto:`+a),this._grpM.req({P:a,data:p}).then(e=>{ht.l(this._n+\".deleteGroupAttributes ok. groupID:\"+t);e=e.data.mainSequence;return this._groupAttributesCopy=this._getCachedAttributes({groupID:t}),this._refreshCachedGroupAttributes({groupID:t,remoteMainSequence:e,groupAttributeList:l,operationType:u}),this._emitGroupAttributesUpdated(t),h.end(),gt({keyList:n})}).catch(e=>(h.setError(e).end(),jt(e)))}getGroupAttributes(t){let s=this._n+\".getGroupAttributes\",o=t[\"groupID\"],{avChatRoomKey:e,lastUpdateTime:r,localMainSequence:i,remoteMainSequence:n}=this._getLocalGroupAttributes(o),a=new es(\"getGroupAttributes\");if(a.setMessage(`groupID:${o} localMainSequence:${i} remoteMainSequence:${n} keyList:`+t.keyList),Date.now()-r>=this.CACHE_EXPIRE_TIME||i<n)return this._getGroupAttributes({groupID:o,avChatRoomKey:e}).then(e=>{a.setMoreMessage(\"get attributes from remote. count:\"+e.length).end(),ht.l(s+\" from remote. groupID:\"+o);e=this._getCachedAttributes(t);return gt({groupAttributes:e})}).catch(e=>(a.setError(e).end(),jt(e)));a.setMoreMessage(\"get attributes from cache\").end(),ht.l(s+\" from cache. groupID:\"+o);var u=this._getCachedAttributes(t);return Bt({groupAttributes:u})}_getGroupAttributes(o){let e=0;return Be(o.avChatRoomKey)||(e=1),this._grpM.req({P:$s,data:{...o,groupType:e}}).then(e=>{ht.l(this._n+\"._getGroupAttributes ok. groupID:\"+o.groupID);var{mainSequence:e,groupAttributeList:t}=e.data,s=[...t];return Be(e)||this._refreshCachedGroupAttributes({groupID:o.groupID,remoteMainSequence:e,groupAttributeList:s,operationType:bo}),t}).catch(e=>jt(e))}_refreshCachedGroupAttributes(e){var{groupID:s,remoteMainSequence:o,groupAttributeList:r,operationType:i}=e;if(this._hasLocalGroupAttributes(s)){let e=this._getLocalGroupAttributes(s),t=e[\"localMainSequence\"];if(i===bo||o-t==1)e.remoteMainSequence=o,e.localMainSequence=o,e.lastUpdateTime=Date.now(),this._updateCachedAttributes({groupAttributes:e,groupAttributeList:r,operationType:i});else{if(t===o)return;e.remoteMainSequence=o}this._groupAttributesMap.set(s,e);r=`operationType:${i} localMainSequence:${t} remoteMainSequence:`+o;ht.l(this._n+\"._refreshCachedGroupAttributes. \"+r)}}_getCachedAttributes(e){let{groupID:s,keyList:o=[]}=e,r={};if(this._hasLocalGroupAttributes(s)){let t=this._getLocalGroupAttributes(s)[\"attributes\"];if(0<o.length)o.forEach(e=>{t.has(e)&&(r[e]=t.get(e).value)});else for(let e of t.keys())r[e]=t.get(e).value}return r}_updateCachedAttributes(e){let{groupAttributes:o,groupAttributeList:t,operationType:s}=e;s!==Co?s!==Go?(s===Do&&o.attributes.clear(),t.forEach(e=>{var{key:e,value:t,sequence:s}=e;o.attributes.set(e,{value:t,sequence:s})})):t.forEach(e=>{o.attributes.delete(e.key)}):o.attributes.clear()}_hasLocalGroupAttributes(e){return this._groupAttributesMap.has(e)}_getLocalGroupAttributes(e){return this._hasLocalGroupAttributes(e)||this.initGroupAttributesCache({groupID:e}),this._groupAttributesMap.get(e)}_transformGroupAttributes(t){let s=[];return Object.keys(t).forEach(e=>{s.push({key:e,value:t[e]})}),s}_emitGroupAttributesUpdated(e){var t=this._getCachedAttributes({groupID:e}),{updatedKeyList:s,deletedKeyList:o}=this._computeAttrChangedInfo(t);ht.l(`${this._n}._emitGroupAttributesUpdated update:${s.length}, delete:`+o.length),0===s.length&&0===o.length||this._grpM.emitOEvt(Ft,{groupID:e,groupAttributes:t,updatedKeyList:s,deletedKeyList:o})}_computeAttrChangedInfo(t){let s=[],o=[];return Object.keys(t).forEach(e=>{t[e]!==this._groupAttributesCopy[e]&&s.push(e)}),Object.keys(this._groupAttributesCopy).forEach(e=>{Be(t[e])&&o.push(e)}),this._groupAttributesCopy={},{updatedKeyList:s,deletedKeyList:o}}deleteLocalGroupAttributes(e){this._hasLocalGroupAttributes(e)&&this._groupAttributesMap.delete(e)}reset(){this._groupAttributesMap.clear(),this._groupAttributesCopy={},this.CACHE_EXPIRE_TIME=3e4}}let To=\"Set\",vo=\"Increase\",So=\"Decrease\";class Po{constructor(e){this._grpM=e,this._n=\"GroupCountersHandler\",this._groupCountersMap=new Map,this.EXPIRE_TIME=3e4,this._grpM.getIEmitInst().on(Jt.CLOUD_CONFIG,this._onCloudConfig,this)}_onCloudConfig(){var e=this._grpM.getCloudConfig(\"grp_counter_expire_time\");Be(e)||(this.EXPIRE_TIME=Number(e))}isGroupCountersNotice(e){var{to:e,elements:{groupCounterInfo:t}}=e;let s=!1;return qe(t)||(this._onGroupCountersUpdated({groupID:e,groupCounterInfo:t}),s=!0),s}_onGroupCountersUpdated(e){let{groupID:o,groupCounterInfo:t}=e;t.forEach(e=>{var{type:e,groupCounterSeq:t,counterList:s=[]}=e;0!==e&&2!==e||(this._updateLocalGroupCounters({groupID:o,groupCounterSeq:t,counterList:s}),s.forEach(e=>{this._grpM.emitOEvt(xt,{groupID:o,key:e.key,value:e.value})})),1===e&&this._deleteLocalGroupCounters({groupID:o,groupCounterSeq:t,counterList:s})}),ht.l(this._n+\"._onGroupCountersUpdated groupID:\"+o)}initGroupCountersCache(e){var{groupID:e,avChatRoomKey:t}=e;this._groupCountersMap.set(e,{lastUpdateTime:0,groupCounterSeq:0,counters:new Map,avChatRoomKey:t}),ht.l(this._n+`.initGroupCountersCache groupID:${e} avChatRoomKey:`+t)}setGroupCounters(e){if(!this._grpM.canIUse(M.GRP_COUNTER))return this._grpM.noUse(\"setGroupCounters\");let t=this._n+\".setGroupCounters\",{groupID:s,counters:o}=e,r=this._convertObjectToList(o),i=this._getLocalGroupCounters(s)[\"avChatRoomKey\"],n=`groupID:${s} count:`+r.length,a=new es(\"setGroupCounters\");return a.setMessage(n),ht.l(t+\". \"+n),this._updateGroupCounters({groupID:s,counterList:r,avChatRoomKey:i,mode:To}).then(e=>(a.end(),ht.l(t+\" ok.\"),gt({counters:e}))).catch(e=>(a.setError(e).end(),ht.e(t+\" failed. error:\",e),jt(e)))}increaseGroupCounter(e){var t=\"increaseGroupCounter\";if(!this._grpM.canIUse(M.GRP_COUNTER))return this._grpM.noUse(t);let s=this._n+\".\"+t,{groupID:o,key:r,value:i}=e,n=this._getLocalGroupCounters(o)[\"avChatRoomKey\"],a=`groupID:${o} key:${r} value:`+i,u=new es(t);return u.setMessage(a),ht.l(s+\". \"+a),this._updateGroupCounters({groupID:o,counterList:[{key:r,value:i}],avChatRoomKey:n,mode:vo}).then(e=>(u.end(),ht.l(s+\" ok.\"),gt({counters:e}))).catch(e=>(u.setError(e).end(),ht.e(s+\" failed. error:\",e),jt(e)))}decreaseGroupCounter(e){var t=\"decreaseGroupCounter\";if(!this._grpM.canIUse(M.GRP_COUNTER))return this._grpM.noUse(t);let s=this._n+\".\"+t,{groupID:o,key:r,value:i}=e,n=this._getLocalGroupCounters(o)[\"avChatRoomKey\"],a=`groupID:${o} key:${r} value:`+i,u=new es(t);return u.setMessage(a),ht.l(s+\". \"+a),this._updateGroupCounters({groupID:o,counterList:[{key:r,value:i}],avChatRoomKey:n,mode:So}).then(e=>(u.end(),ht.l(s+\" ok.\"),gt({counters:e}))).catch(e=>(u.setError(e).end(),ht.e(s+\" failed. error:\",e),jt(e)))}getGroupCounters(e){if(!this._grpM.canIUse(M.GRP_COUNTER))return this._grpM.noUse(\"getGroupCounters\");let t=this._n+\".getGroupCounters\",{groupID:s,keyList:o=[]}=e,{avChatRoomKey:r,lastUpdateTime:i}=this._getLocalGroupCounters(s),n=new es(\"getGroupCounters\");if(n.setMessage(\"groupID:\"+s),Date.now()-i>=this.EXPIRE_TIME)return this._getRemoteGroupCounters({groupID:s,avChatRoomKey:r}).then(e=>{n.setMoreMessage(\"from remote. count:\"+e.length).end(),ht.l(t+\" from remote. groupID:\"+s);e=this._getLocalCounters(s,o);return gt({counters:e})}).catch(e=>(n.setError(e).end(),jt(e)));n.setMoreMessage(\"from cache\").end(),ht.l(t+\" from cache. groupID:\"+s);e=this._getLocalCounters(s,o);return Bt({counters:e})}_getRemoteGroupCounters(s){return this._grpM.req({P:ks,data:{...s}}).then(e=>{var{counterList:e=[],groupCounterSeq:t}=e.data;return this._updateLocalGroupCounters({groupID:s.groupID,counterList:e,groupCounterSeq:t}),ht.l(this._n+\"._getRemoteGroupCounters ok. groupID:\"+s.groupID),e}).catch(e=>jt(e))}_convertObjectToList(t){let s=[];return Object.keys(t).forEach(e=>{s.push({key:e,value:t[e]})}),s}_updateGroupCounters(e){let o=this._n+\"._updateGroupCounters\",{groupID:t,avChatRoomKey:s,mode:r}=e;return ht.l(o+`. groupID:${t} avChatRoomKey:${s} mode:`+r),this._grpM.req({P:qs,data:{...e}}).then(e=>{ht.l(o+\" ok.\");let{counterList:t=[]}=e.data,s={};return t.forEach(e=>{var{key:e,value:t}=e;s[e]=t}),s}).catch(e=>jt(e))}_hasLocalGroupCounters(e){return this._groupCountersMap.has(e)}_getLocalGroupCounters(e){return this._hasLocalGroupCounters(e)||this.initGroupCountersCache({groupID:e}),this._groupCountersMap.get(e)}_updateLocalGroupCounters(e){var{groupID:o,counterList:r=[],groupCounterSeq:i}=e;if(this._hasLocalGroupCounters(o)){let{counters:s,avChatRoomKey:e,groupCounterSeq:t}=this._getLocalGroupCounters(o);0<i&&i<t||(r.forEach(e=>{var{key:e,value:t}=e;s.set(e,t)}),this._groupCountersMap.set(o,{lastUpdateTime:Date.now(),groupCounterSeq:i,counters:s,avChatRoomKey:e}))}}_deleteLocalGroupCounters(e){var{groupID:s,counterList:o=[],groupCounterSeq:r}=e;if(this._hasLocalGroupCounters(s)){let{counters:t,avChatRoomKey:e}=this._getLocalGroupCounters(s);o.forEach(e=>{t.delete(e.key)}),this._groupCountersMap.set(s,{lastUpdateTime:Date.now(),groupCounterSeq:r,counters:t,avChatRoomKey:e})}}_getLocalCounters(e,s){let o={};if(this._hasLocalGroupCounters(e)){let t=this._getLocalGroupCounters(e)[\"counters\"];if(0<s.length)s.forEach(e=>{t.has(e)&&(o[e]=t.get(e))});else for(var r of t.keys())o[r]=t.get(r)}return o}reset(){this._groupCountersMap.clear(),this.EXPIRE_TIME=3e4}}class Ro{constructor(e){var{manager:e,groupID:t,onInit:s,onSuccess:o,onFail:r}=e;this._n=\"Polling\",this._manager=e,this._grpM=e._grpM,this._onInit=s,this._onSuccess=o,this._onFail=r,this._groupID=t,this._timeoutID=-1,this._isRunning=!1,this._proto=Gs}start(){var e=this._grpM.isLoggedIn();e||(this._proto=bs),ht.l(`${this._n}.start pollingInterval:${this._manager.getPollingInterval()} isLoggedIn:`+e),this._isRunning=!0,this._request()}isRunning(){return this._isRunning}_request(){var e=this._onInit(this._groupID);this._grpM.req({P:this._proto,data:e}).then(e=>{this._onSuccess(this._groupID,e),this.isRunning()&&(-1<this._timeoutID&&clearTimeout(this._timeoutID),this._timeoutID=setTimeout(this._request.bind(this),this._manager.getPollingInterval()))}).catch(e=>{this._onFail(this._groupID,e),this.isRunning()&&(-1<this._timeoutID&&clearTimeout(this._timeoutID),this._timeoutID=setTimeout(this._request.bind(this),this._manager.MAX_POLLING_INTERVAL))})}stop(){ht.l(this._n+\".stop\"),-1<this._timeoutID&&(clearTimeout(this._timeoutID),this._timeoutID=-1),this._isRunning=!1}getPollingTimerID(){return this._timeoutID}}class wo{constructor(e){this.MAX_LENGTH=e,this.map=new Map}set(e){if(this.map.size>=this.MAX_LENGTH){let e=this.map.entries().next().value[0];this.map.delete(e)}this.map.set(e,1)}has(e){return this.map.has(e)}delete(e){this.has(e)&&this.map.delete(e)}reset(){this.map.clear()}}let $o=[\"groupID\",\"name\",\"avatar\",\"type\",\"introduction\",\"notification\",\"ownerID\",\"selfInfo\",\"createTime\",\"infoSequence\",\"lastInfoTime\",\"lastMessage\",\"nextMessageSeq\",\"memberNum\",\"maxMemberNum\",\"memberList\",\"joinOption\",\"groupCustomField\",\"muteAllMembers\",\"isSupportTopic\",\"inviteOption\",\"_lastRevokedTime\"];class Eo{constructor(e){this.groupID=\"\",this.name=\"\",this.avatar=\"\",this.type=\"\",this.introduction=\"\",this.notification=\"\",this.ownerID=\"\",this.createTime=\"\",this.infoSequence=\"\",this.lastInfoTime=\"\",this.selfInfo={messageRemindType:\"\",joinTime:\"\",nameCard:\"\",role:\"\",userID:\"\",memberCustomField:void 0,readedSequence:0,excludedUnreadSequenceList:void 0},this.lastMessage={lastTime:\"\",lastSequence:\"\",fromAccount:\"\",messageForShow:\"\"},this.nextMessageSeq=\"\",this.memberNum=\"\",this.memberCount=\"\",this.maxMemberNum=\"\",this.maxMemberCount=\"\",this.joinOption=\"\",this.inviteOption=\"\",this.groupCustomField=[],this.muteAllMembers=!1,this.isSupportTopic=!1,this._lastRevokedTime=0,this._initGroup(e)}set memberNum(e){}set maxMemberNum(e){}get memberNum(){return this.memberCount}get maxMemberNum(){return this.maxMemberCount}_initGroup(e){for(var t in e)$o.indexOf(t)<0||(\"selfInfo\"!==t?(\"memberNum\"===t&&(this.memberCount=e[t]),\"maxMemberNum\"===t&&(this.maxMemberCount=e[t]),\"isSupportTopic\"!==t?this[t]=e[t]:this.isSupportTopic=1===e[t]):this.updateSelfInfo(e[t]))}updateGroup(e){e.appid=void 0,e.grossTopicNextMsgSeq=void 0,e.selfInfo&&(e.selfInfo.grossTopicReadSeq=void 0);e=JSON.parse(JSON.stringify(e));e.lastMsgTime&&(this.lastMessage.lastTime=e.lastMsgTime),Be(e.muteAllMembers)||(\"On\"===e.muteAllMembers?e.muteAllMembers=!0:e.muteAllMembers=!1),e.groupCustomField&&Qe(this.groupCustomField,e.groupCustomField),Be(e.memberNum)||(this.memberCount=e.memberNum),Be(e.maxMemberNum)||(this.maxMemberCount=e.maxMemberNum),Be(e.isSupportTopic)||(this.isSupportTopic=xe(e.isSupportTopic)?1===e.isSupportTopic:e.isSupportTopic),We(this,e,[\"members\",\"errorCode\",\"lastMsgTime\",\"groupCustomField\",\"memberNum\",\"maxMemberNum\",\"isSupportTopic\"]),Ke(e.members)&&0<e.members.length&&e.members.forEach(e=>{e.userID===this.selfInfo.userID&&We(this.selfInfo,e,[\"sequence\"])})}updateSelfInfo({nameCard:e,joinTime:t,role:s,messageRemindType:o,readedSequence:r,excludedUnreadSequenceList:i}){e={nameCard:e,joinTime:t,role:s,messageRemindType:o,readedSequence:r,excludedUnreadSequenceList:i};We(this.selfInfo,{...e},[],[\"\",null,void 0,0,NaN])}setSelfNameCard(e){this.selfInfo.nameCard=e}}let Uo={3:!0,4:!0,5:!0,6:!0,17:!0,20:!0,21:!0,100:!0};class No{constructor(e){this._grpM=e,this._n=\"AVChatRoomHandler\",this._joinedGroupMap=new Map,this._pollingRequestInfoMap=new Map,this._pollingInstanceMap=new Map,this._seqSll=new wo(200),this._IDSll=new wo(100),this._reportMessageStackedCount=0,this._onlineMemberCountMap=new Map,this.DEFAULT_EXPIRE_TIME=60,this.DEFAULT_POLLING_INTERVAL=300,this.MAX_POLLING_INTERVAL=2e3,this._pollingInterval=this.DEFAULT_POLLING_INTERVAL,this.DEFAULT_POLLING_NO_MESSAGE_COUNT=20,this.DEFAULT_POLLING_INTERVAL_PLUS=2e3,this._pollingNoMessageCount=0,this._startBroadcastSeq=1,this._broadcastMessageIDMap=new Map,this.DEFAULT_POLLING_SIMPLIFIED_MSG=0}hasJoinedAVChatRoom(){let e=[];return 0<(e=0<this._joinedGroupMap.size?[...this._joinedGroupMap.values()].filter(e=>e.type===me):e).length}getJoinedLiveList(){let e=[];return e=0<this._joinedGroupMap.size?[...this._joinedGroupMap.values()].filter(e=>e.type===fe):e}checkJoinedAVChatRoomByID(e){return this._joinedGroupMap.has(e)}getJoinedAVChatRoom(){return 0<this._joinedGroupMap.size?[...this._joinedGroupMap.keys()]:[]}_updatedata(e){var t=this._pollingRequestInfoMap.get(e);return e===[...this._pollingInstanceMap.keys()][0]?{...t,startBroadcastSeq:this._startBroadcastSeq,simplifiedMessage:this.DEFAULT_POLLING_SIMPLIFIED_MSG}:{...t,simplifiedMessage:this.DEFAULT_POLLING_SIMPLIFIED_MSG}}_handleSuccess(o,r){let{key:e,nextSeq:t,rspMsgList:s,errorCode:i,nextBroadcastSeq:n,broadcastMessageList:a}=r.data;if(0!==i){let e=this._pollingRequestInfoMap.get(o),t=new es(\"longPollingAVError\"),s=e?e.key+\"-\"+e.startSeq:\"requestInfo is undefined\";t.setMessage(`${o}-${s}-`+r.errorInfo).setCode(r.errorCode).end(!0)}else this.checkJoinedAVChatRoomByID(o)&&(Ve(e)&&xe(t)&&this._pollingRequestInfoMap.set(o,{key:e,startSeq:t}),xe(n)&&n>this._startBroadcastSeq&&(this._startBroadcastSeq=n),Ke(s)&&0<s.length?(s.forEach(e=>{e.to=e.groupID}),this.onMessage(s,o)):(this._pollingNoMessageCount+=1,this._pollingNoMessageCount===this.DEFAULT_POLLING_NO_MESSAGE_COUNT&&(this._pollingInterval=this.DEFAULT_POLLING_INTERVAL+this.DEFAULT_POLLING_INTERVAL_PLUS)),this._onBroadcastMessage(a))}_handleFailure(e,t){}onMessage(t,e){if(Ke(t)&&0!==t.length){let i=this._n+\".onMessage\";e&&(i+=\" groupID:\"+e),0!==this._pollingNoMessageCount&&(this._pollingNoMessageCount=0,this._pollingInterval=this.DEFAULT_POLLING_INTERVAL);var a=null,u=[],l=this._get(o),h=this._get(p),s=t.length,c=(1<s&&t.sort((e,t)=>e.sequence-t.sequence),this._get(r).isUnlimitedAVChatRoom());let n=!1;if(ht.getLevel()<=0){let e=t.map(e=>e.sequence);ht.l(`${i} count:${e.length} sequenceList:`+e),e.length=0}for(let e=0;e<s;e++){let s=this.restoreMessageFromSimplified(t[e]);if(Uo[s.event]){if(6===s.event){if(this._grpM.isGroupAttributesUpdatedNotice(s))continue;if(this._grpM.isGroupCountersNotice(s))continue}if(20===s.event)this.handleMessageRevokedNotice(s);else if(21===s.event)this._get(g).onMessageReactionNotify({event:21,dataList:s.elements.messageReactionNotifyList});else if(100===s.event)this.onRoomCustomData(s);else{a=this.packMessage(s,s.event);let t=1===s.isModified;if(n=1===s.isHistoryMessage,!c){if(this._seqSll.has(a.sequence))continue;this._seqSll.set(a.sequence)}let e=this._IDSll.has(a.ID);if(e)ht.w(`${i} ID:${a.ID} has:`+e);else{this._IDSll.set(a.ID);let e=!1;if(!n&&this._isMessageSentByCurrentInstance(a)?t&&(e=!0,a.isModified=t,l.updateMsgIsModifiedProp(a)):e=!0,e){if(a.conversationType===le&&5===a.payload.operationType&&this._onGroupDismissed(a.payload.groupProfile.groupID),!n&&a.conversationType!==le){let e=a.conversationID.replace(ue,\"\");this._pollingInstanceMap.has(e)?this._grpM.isLoggedIn()&&h.addMessageSequence({key:Xt,message:a}):(a.type!==Z&&0<a.clientTime&&h.addMessageDelay(a.clientTime),h.addMessageSequence({key:zt,message:a}))}u.push(a)}}}}else ht.w(i+\". unknown event:\"+s.event)}if(0!==u.length){e=Ze(u);if(0<e.length&&this._grpM.emitOEvt(qt,e),!n){let e=this.packConversationOption(u);0<e.length&&l.onNewMessage({conversationOptionsList:e,isInstantMessage:!0})}this._checkMessageStacked(u);e=st(u);0<e.length&&this._grpM.emitOEvt(Nt,e),u.length=0}}}handleMessageRevokedNotice(e){let{groupID:r,elements:{revokeMsgList:t},revokerInfo:i}=e,n=[];t.forEach(e=>{var{tinyID:e,clientTime:t,random:s,sequence:o}=e,e={conversationID:\"\"+ue+r,ID:e+`-${t}-`+s,revoker:i.revoker,revokeReason:i.reason||\"\",revokerInfo:{userID:i.revoker,nick:\"\",avatar:\"\"},sequence:o};n.push(e)}),0!==n.length&&this._get(o).updateRevokerInfo(n).then(e=>{this._grpM.emitOEvt(kt,e)})}isBroadcastOrNormal(e){return 3===e||17===e}isGroupTip(e){return 4===e||6===e}isGroupSystemNotice(e){return 5===e}restoreGroupTipElements(e={}){var{operatorInfo:t={},operatorID:s,userIDList:o=[],operationType:r}=e,{userID:r=s,avatar:t=\"\",nick:s=\"\"}=(xe(e.groupJoinType)||1!==r&&2!==r||(e.groupJoinType=2===r?0:1),t),r=(e.operatorInfo={userID:r,avatar:t,nick:s},o.map(e=>({userID:e})));return e.memberInfoList=e.memberInfoList||r,e}restoreMessageFromSimplified(o){let e=o[\"event\"];if(this.isBroadcastOrNormal(e)&&(o.cloudCustomData=o.cloudCustomData||\"\",o.elements=o.elements.map(e=>{var t;return e.type===te&&({content:t={}}=e,e.content={data:\"\",description:\"\",extension:\"\",...t}),e})),(this.isGroupTip(e)||this.isGroupSystemNotice(e))&&(o.from=o.from||\"@TIM#SYSTEM\"),this.isGroupTip(e)){o.elements=this.restoreGroupTipElements(o.elements);let{elements:t={}}=o,{operationType:e,operatorInfo:s={}}=t;if(1===e){let e=[{userID:s.userID}];t.memberInfoList=t.memberInfoList||e}}if(this.isGroupSystemNotice(e)){let{memberInfoList:e,operatorInfo:t={}}=o.elements;e=e||t,o.elements.memberInfoList={userID:o.elements.operatorID,avatar:\"\",nick:\"\",...e},o.elements={authentication:\"\",remarkInfo:\"\",messageKey:1e3*o.time,...o.elements};var s=Object.keys(o.elements).filter(e=>\"operatorInfo\"!==e).reduce((e,t)=>({...e,[t]:o.elements[t]}),{});o.elements=s}return o}_onGroupDismissed(e){ht.l(this._n+\"._onGroupDismissed groupID:\"+e),this._grpM.deleteLocalGroupAndConversation(e),this.reset(e)}_checkMessageStacked(e){var t=\"MessageStacked\",e=e.length;100<=e&&(this._grpM.warn(t,e),this._reportMessageStackedCount<5)&&(new es(t).setMessage(`count:${e} groupID:`+[...this._joinedGroupMap.keys()]).setLevel(\"warning\").end(),this._reportMessageStackedCount+=1)}_isMessageSentByCurrentInstance(e){return!!this._get(o).isMessageSentByCurrentInstance(e)}packMessage(e,t){e.currentUser=this._grpM.getMyUserID(),e.conversationType=5===t?le:ue,e.isSystemMessage=!!e.isSystemMessage;var s=new Io(e),e=this.packElements(e,t),t=this._grpM.getFileDownloadProxy(),o=this._grpM.getDownloadFileAuthKey(),r=this._get(n).getFileDNList();return s.setElement(e,t,o,r),s}packElements(e,t){return 4===t||6===t?(this._updateMemberCountByGroupTips(e),{type:Z,content:{...e.elements,groupProfile:e.groupProfile}}):5===t?{type:ee,content:{...e.elements,groupProfile:{...e.groupProfile,groupID:e.groupID}}}:e.elements}packConversationOption(t){var s=new Map;for(let e=0;e<t.length;e++){var o=t[e],r=o.conversationID;if(s.has(r)){let e=s.get(r);\"in\"===(e.lastMessage=o).flow&&e.unreadCount++}else s.set(r,{conversationID:o.conversationID,unreadCount:\"out\"===o.flow?0:1,type:o.conversationType,subType:o.conversationSubType,lastMessage:o})}return[...s.values()]}_updateMemberCountByGroupTips(e){var t,s,o,{groupProfile:{groupID:e},elements:{onlineMemberInfo:r}}=e;qe(r)||({onlineMemberNum:r=0,expireTime:t=this.DEFAULT_EXPIRE_TIME}=r,s=this._onlineMemberCountMap.get(e)||{},o=Date.now(),qe(s)?Object.assign(s,{lastReqTime:0,lastSyncTime:0,latestUpdateTime:o,memberCount:r,expireTime:t}):(s.latestUpdateTime=o,s.memberCount=r),this._onlineMemberCountMap.set(e,s))}_onBroadcastMessage(o){if(!qe(o)){let s=[],e=o.length;var r=null;for(let t=0;t<e;t++){let e=this.restoreMessageFromSimplified(o[t]);Uo[e.event]?((r=this.packMessage(e,e.event)).isBroadcastMessage=!0,this._broadcastMessageIDMap.has(r.ID)||(s.push(r),this._broadcastMessageIDMap.set(r.ID,1))):ht.w(this._n+\"._onBroadcastMessage unknown event:\"+e.event)}0<s.length&&this._grpM.emitOEvt(Nt,s)}}start(t){if(this._pollingInstanceMap.has(t)){let e=this._pollingInstanceMap.get(t);void(e.isRunning()||e.start())}else{let e=new Ro({manager:this,groupID:t,onInit:this._updatedata.bind(this),onSuccess:this._handleSuccess.bind(this),onFail:this._handleFailure.bind(this)});e.start(),this._pollingInstanceMap.set(t,e),ht.l(this._n+\".start groupID:\"+t)}}handleJoinResult(o){return this._preCheck(o.group).then(()=>{var{longPollingKey:e,group:t}=o,s=t.groupID;return this._joinedGroupMap.set(s,t),this._grpM.updateGroupMap([t]),this._grpM.deleteUnjoinedAVChatRoom(s),this._grpM.emitGroupListUpdate(!0,!1),Be(e)?Bt({status:we,group:t}):Promise.resolve()})}startRunLoop(r){return this.handleJoinResult(r).then(()=>{var{longPollingKey:e,group:t,startSeq:s=0}=r,o=t.groupID;return this._pollingRequestInfoMap.set(o,{key:e,startSeq:s}),this.start(o),this._grpM.isLoggedIn()?Bt({status:we,group:t}):Bt({status:we})})}_preCheck(e){if(!this._get(r).isUnlimitedAVChatRoom()&&this.hasJoinedAVChatRoom()&&e.type!==fe){var[e,t]=this._joinedGroupMap.entries().next().value;if(this._grpM.isLoggedIn()&&t.selfInfo.role!==Ie&&t.ownerID!==this._grpM.getMyUserID())return this._grpM.quitGroup(e);this._grpM.deleteLocalGroupAndConversation(e),this.reset(e)}return Promise.resolve()}joinWithoutAuth(e){let s=e[\"groupID\"],r=this._n+\".joinWithoutAuth\",n=new es(\"joinWithoutAuth\");return this._grpM.req({P:us,data:e}).then(({data:{longPollingKey:e}})=>{if(n.setMessage(`groupID:${s} longPollingKey:`+e).end(!0),Be(e))return jt({code:bt});ht.l(r+\" ok. groupID:\"+s),this._get(o).setCompleted(\"\"+ue+s);var t=new Eo({groupID:s});return this.startRunLoop({group:t,longPollingKey:e}),gt({status:we})}).catch(e=>(ht.e(r+` failed. groupID:${s} error:`,e),n.setError(e).setMessage(\"groupID:\"+s).end(!0),jt(e))).finally(()=>{this._grpM.get(i).reportAtOnce()})}getGroupOnlineMemberCount(e){var t=this._onlineMemberCountMap.get(e)||{},s=Date.now();return qe(t)||s-t.lastSyncTime>1e3*t.expireTime&&1e4<s-t.latestUpdateTime&&3e3<s-t.lastReqTime?(t.lastReqTime=s,this._onlineMemberCountMap.set(e,t),this._getGroupOnlineMemberCount(e).then(e=>gt({memberCount:e.memberCount})).catch(e=>jt(e))):Bt({memberCount:t.memberCount})}_getGroupOnlineMemberCount(r){let i=this._n+\"._getGroupOnlineMemberCount\",t=new es(\"_getGroupOnlineMemberCount\");return this._grpM.requestOnlineCount(r).then(e=>{var t=this._onlineMemberCountMap.get(r)||{},{memberCount:e=0,expireTime:s=this.DEFAULT_EXPIRE_TIME}=e.data,o=(ht.l(i+` ok. groupID:${r} memberCount:${e} expireTime:`+s),Date.now());return qe(t)&&(t.lastReqTime=o),this._onlineMemberCountMap.set(r,Object.assign(t,{lastSyncTime:o,latestUpdateTime:o,memberCount:e,expireTime:s})),{memberCount:e}}).catch(e=>(ht.w(i+\" failed. error:\",e),t.setCode(e.code).setMessage(`groupID:${r} error:`+JSON.stringify(e)).end(),Promise.reject(e)))}_get(e){return this._grpM.get(e)}setPollingInterval(e){Be(e)||(xe(e)?this._pollingInterval=this.DEFAULT_POLLING_INTERVAL=e:this._pollingInterval=this.DEFAULT_POLLING_INTERVAL=parseInt(e,10))}setPollingIntervalPlus(e){Be(e)||(xe(e)?this.DEFAULT_POLLING_INTERVAL_PLUS=e:this.DEFAULT_POLLING_INTERVAL_PLUS=parseInt(e,10))}setPollingNoMessageCount(e){Be(e)||(xe(e)?this.DEFAULT_POLLING_NO_MESSAGE_COUNT=e:this.DEFAULT_POLLING_NO_MESSAGE_COUNT=parseInt(e,10))}setPollingSimplifiedMessage(e){Be(e)||\"0\"!==e&&\"1\"!==e||(this.DEFAULT_POLLING_SIMPLIFIED_MSG=parseInt(e,10))}getPollingInterval(){return this._pollingInterval}onAVChatRoomMemberBanned(e){e=e.payload.groupProfile.groupID;ht.l(this._n+\".onAVChatRoomMemberBanned groupID:\"+e),this._grpM.deleteLocalGroupAndConversation(e),this.reset(e)}restartPolling(){ht.l(this._n+\".restartPolling count:\"+this._pollingInstanceMap.size);for(var e of this._pollingInstanceMap.values())e.stop(),e.start()}getPollingTimerID(e){var t;return this._pollingInstanceMap.has(e)?(t=this._pollingInstanceMap.get(e).getPollingTimerID(),ht.l(this._n+`.getPollingTimerID groupID:${e} timerID:`+t),t):-1}hasPollingInstance(e){return this._pollingInstanceMap.has(e)}onRoomCustomData(e){var{groupID:e,sequence:t,time:s,elements:o}=e,o=o&&o.content;this._get(h).onRoomCustomDataReceived(o),ht.l(this._n+`.onRoomCustomData groupID:${e} sequence:${t} time:${s} data:`+o)}reset(e){if(e){ht.l(this._n+\".reset groupID:\"+e);var t=this._pollingInstanceMap.get(e);t&&t.stop(),this._pollingInstanceMap.delete(e),this._joinedGroupMap.delete(e),this._pollingRequestInfoMap.delete(e),this._onlineMemberCountMap.delete(e)}else{ht.l(this._n+\".reset all\");for(let e of this._pollingInstanceMap.values())e.stop();this._pollingInstanceMap.clear(),this._joinedGroupMap.clear(),this._pollingRequestInfoMap.clear(),this._onlineMemberCountMap.clear(),this._broadcastMessageIDMap.clear()}this._seqSll.reset(),this._IDSll.reset(),this._reportMessageStackedCount=0,this._pollingInterval=this.DEFAULT_POLLING_INTERVAL=300,this.DEFAULT_POLLING_NO_MESSAGE_COUNT=20,this.DEFAULT_POLLING_INTERVAL_PLUS=2e3,this._pollingNoMessageCount=0}}class qo{constructor(e){this.userID=\"\",this.avatar=\"\",this.nick=\"\",this.role=\"\",this.joinTime=\"\",this.lastSendMsgTime=\"\",this.nameCard=\"\",this.muteUntil=0,this.memberCustomField=[],this.isOnline=!1,this.updateMember(e)}updateMember(e){Be(e.onlineStatus)||(this.isOnline=\"Online\"===e.onlineStatus);var t=[null,void 0,\"\",0,NaN];e.memberCustomField&&Qe(this.memberCustomField,e.memberCustomField),We(this,e,[\"memberCustomField\",\"marks\",\"onlineStatus\"],t)}updateRole(e){[\"Owner\",\"Admin\",\"Member\"].indexOf(e)<0||(this.role=e)}updateMuteUntil(e){Be(e)||(this.muteUntil=Math.floor((Date.now()+1e3*e)/1e3))}updateNameCard(e){Be(e)||(this.nameCard=e)}updateMemberCustomField(e){e&&Qe(this.memberCustomField,e)}}class ko{constructor(e){this._grpM=e,this._n=\"GroupMemberHandler\",this.groupMemberListMap=new Map,this.DEFAULT_MEMBER_INFO_FILTER=[\"Role\",\"JoinTime\",\"NameCard\",\"ShutUpUntil\",\"OnlineStatus\"],this._grpM.getIEmitInst().on(Jt.PROFILE_UPDATED,this._onProfileUpdated,this)}_onProfileUpdated({data:s}){for(let e=0;e<s.length;e++){let t=s[e];this.groupMemberListMap.forEach(e=>{e.has(t.userID)&&e.get(t.userID).updateMember({nick:t.nick,avatar:t.avatar})})}}deleteGroupMemberList(e){this.groupMemberListMap.delete(e)}getGroupMemberList({groupID:r,role:e,offset:s=0,count:o=15,filter:i}){let n=this._n+\".getGroupMemberList\",a=this._grpM.hasLocalGroup(r);if(ht.l(n+` groupID:${r} role:${e} offset:${s} count:${o} hasLocalGroup:`+a),!a)return Bt({memberList:[],offset:0});if(this._grpM.getLocalGroupProfile(r).type===me){if(this._grpM.canIUse(M.AV_MBR_LIST))return this._getAVChatRoomMemberList({groupID:r,offset:s,filter:i});this._grpM.warn(\"LiveOnlineMember\")}let u,p=(e!==Me&&e!==Ie&&e!==ye||(u=e),new es(\"getGroupMemberList\")),l=0;i={groupID:r,limit:100<o?100:o,memberRoleFilter:u?[u]:void 0,memberInfoFilter:this.DEFAULT_MEMBER_INFO_FILTER};rt({groupID:r})?i.next=\"\"+s:(i.offset=s,l=s+o);let h=[];return this._grpM.req({P:Os,data:i}).then(({data:{members:e,memberNum:s,next:o}})=>(Be(o)||(l=qe(o)?0:o),Ke(e)&&0!==e.length?(this._grpM.hasLocalGroup(r)&&(this._grpM.getLocalGroupProfile(r).memberNum=s),h=this._updateLocalGroupMemberMap(r,e),this._grpM.get(t).getUserProfile({userIDList:e.map(e=>e.userID),tagList:[Re.NICK,Re.AVATAR]})):(l=0,Promise.resolve([])))).then(e=>{var e=e[\"data\"];return Ke(e)&&0!==e.length?(e=e.map(e=>({userID:e.userID,nick:e.nick,avatar:e.avatar})),this._updateLocalGroupMemberMap(r,e),h.length<o&&(l=0),p.setMessage(`groupID:${r} offset:${s} count:`+o).end(),ht.l(n+\" ok.\"),gt({memberList:h,offset:l})):Bt({memberList:[],offset:l})}).catch(e=>(p.setError(e).end(),ht.e(n+\" failed. error:\",e),jt(e)))}_getAVChatRoomMemberList({groupID:s,offset:e,filter:t}){let o=this._n+\"._getAVChatRoomMemberList\",r=new es(\"_getAVChatRoomMemberList\");return r.setMessage(`groupID:${s} offset:${e} filter:`+t),this._grpM.req({P:Fs,data:{groupID:s,offset:e,filter:t}}).then(e=>{var{memberList:e=[],offset:t=0}=e.data,e=(r.end(),ht.l(o+` ok. member count:${e.length}, next request timestamp:`+t),e.map(e=>({...e,onlineStatus:\"Online\"}))),e=this._updateLocalGroupMemberMap(s,e);return gt({memberList:e,offset:t})}).catch(e=>(r.setError(e).end(),ht.e(o+\" failed. error:\",e),jt(e)))}getGroupMemberProfile(e){var s=\"getGroupMemberProfile\",o=this._n+\".\"+s;let r=\"groupID:\"+e.groupID,{groupID:i,userIDList:n}=(5<e.userIDList.length?r+=\" userIDList.length:\"+e.userIDList.length:r+=\" userIDList:\"+e.userIDList,ht.l(o+\" \"+r),50<e.userIDList.length&&(e.userIDList=e.userIDList.slice(0,50)),e),a=this._grpM.getLocalGroupProfile(i);if(a&&ot(a.type)){let e=Rt;return jt({code:e,message:this._grpM.getErrMsg(e,s)})}let u=new es(s);return u.setMessage(r),this._getGroupMemberProfileAdvance({...e,userIDList:n}).then(e=>{e=e.data.members;return Ke(e)&&0!==e.length?(this._updateLocalGroupMemberMap(i,e),this._grpM.get(t).getUserProfile({userIDList:e.map(({userID:e})=>e),tagList:[Re.NICK,Re.AVATAR]})):Bt([])}).then(e=>{e=e.data.map(({userID:e,nick:t,avatar:s})=>({userID:e,nick:t,avatar:s})),this._updateLocalGroupMemberMap(i,e),e=n.filter(e=>this.hasLocalGroupMember(i,e)).map(e=>this.getLocalGroupMemberInfo(i,e));return u.end(),gt({memberList:e})})}addGroupMember(i){let n=this._n+\".addGroupMember\",e=i[\"groupID\"],a=this._grpM.getLocalGroupProfile(e),t=a[\"type\"],u=new es(\"addGroupMember\");if(u.setMessage(`groupID:${e} groupType:`+t),ot(t)){let e=new mt({code:Gt});return u.setError(e).end(),jt(e)}return i.userIDList=i.userIDList.map(e=>({userID:e})),ht.l(n+\" groupID:\"+e),this._grpM.req({P:Vs,data:i}).then(({data:{members:e}})=>{ht.l(n+\" ok\");var t=e.filter(e=>1===e.result).map(e=>e.userID),s=e.filter(e=>0===e.result).map(e=>e.userID),o=e.filter(e=>2===e.result).map(e=>e.userID),e=e.filter(e=>4===e.result).map(e=>e.userID),r=`groupID:${i.groupID}, successUserIDList:${t}, failureUserIDList:${s}, existedUserIDList:${o}, overLimitUserIDList:`+e;return u.setMoreMessage(r).end(),0===t.length?gt({successUserIDList:t,failureUserIDList:s,existedUserIDList:o,overLimitUserIDList:e}):(this._updateConvGroupProfile(a),gt({successUserIDList:t,failureUserIDList:s,existedUserIDList:o,overLimitUserIDList:e,group:a}))}).catch(e=>(u.setError(e).end(),ht.e(n+\" failed. error:\",e),jt(e)))}deleteGroupMember(e){let t=this._n+\".deleteGroupMember\",{groupID:s,userIDList:o}=e,r=this._grpM.getLocalGroupProfile(s);if(Be(r))return jt({code:Mt});if(ot(r.type))return this._grpM.canIUse(M.AV_BAN_MBR)?this._banAVChatRoomMember(e):this._grpM.noUse(\"deleteGroupMember\");var i=`groupID:${s} `+(5<o.length?\"userIDList.length:\"+o.length:\"userIDList:\"+o);ht.l(t+` groupID:${s} userIDList:`,o);let n=new es(\"deleteGroupMember\");return n.setMessage(i),this._grpM.req({P:Hs,data:e}).then(()=>(n.end(),ht.l(t+\" ok\"),this._updateConvGroupProfile(r),this.deleteLocalGroupMembers(s,o),gt({group:r,userIDList:o}))).catch(e=>(n.setError(e).end(),ht.e(t+\" failed. error:\",e),jt(e)))}_updateConvGroupProfile(e){this._grpM.get(o).updateConvGroupProfile([e])}_banAVChatRoomMember(e){let t=this._n+\"._banAVChatRoomMember\",{groupID:s,userIDList:o}=e,r=`groupID:${s} `+(5<o.length?\"userIDList.length:\"+o.length:\"userIDList:\"+o),i=new es(\"_banAVChatRoomMember\"),n=(i.setMessage(r),ht.l(t+` groupID:${s} userIDList:`,o),this._grpM.getLocalGroupProfile(s));return Be(e.duration)||0===e.duration?jt({code:Pt}):this._grpM.req({P:Ks,data:e}).then(()=>(i.end(),ht.l(t+\" ok\"),this.deleteLocalGroupMembers(s,o),gt({group:n,userIDList:o}))).catch(e=>(i.setError(e).end(),ht.e(t+\" failed. error:\",e),jt(e)))}setGroupMemberMuteTime(e){let{groupID:s,userID:t,muteTime:o}=e,r=this._n+\".setGroupMemberMuteTime\";if(t===this._grpM.getMyUserID())return jt({code:St});e=`groupID:${s} userID:${t} muteTime:`+o;ht.l(r+\" \"+e);let i=new es(\"setGroupMemberMuteTime\");return i.setMessage(e),this.modifyGroupMemberInfo({groupID:s,userID:t,muteTime:o}).then(e=>{i.end(),ht.l(r+\" ok\");var t=this._grpM.getLocalGroupProfile(s);return gt({group:t,member:e})}).catch(e=>(i.setError(e).end(),ht.e(r+\" failed. error:\",e),jt(e)))}setGroupMemberRole(e){let t=this._n+\".setGroupMemberRole\",{groupID:s,userID:o,role:r}=e,i=`groupID:${s} userID:${o} role:`+r,n=this._grpM.getLocalGroupProfile(s);if(n&&n.selfInfo.role!==Ie)return jt({code:At});e=[Me,ye];if(rt({groupID:s})&&e.push(De),e.indexOf(r)<0)return jt({code:Tt});if(o===this._grpM.getMyUserID())return jt({code:vt});let a=new es(\"setGroupMemberRole\");return a.setMessage(i),ht.l(t+\" \"+i),this.modifyGroupMemberInfo({groupID:s,userID:o,role:r}).then(e=>(a.end(),ht.l(t+\" ok\"),gt({group:n,member:e}))).catch(e=>(a.setError(e).end(),ht.e(t+\" failed. error:\",e),jt(e)))}_filterProfanity(e,t){var s,o=this._grpM.get(c);return!o||({isAllowedToSend:o,modifiedText:s}=o.filterText(t[e],D),!0===o&&(t[e]=s,!0))}setGroupMemberNameCard(e){let t=\"setGroupMemberNameCard\",s=this._n+\".\"+t;if(e.nameCard&&!1===this._filterProfanity(\"nameCard\",e))return jt({code:Ut});let{groupID:o,userID:r=this._grpM.getMyUserID(),nameCard:i}=e,n=`groupID:${o} userID:${r} nameCard:`+i;ht.l(s+\" \"+n);e=this._grpM.getLocalGroupProfile(o);if(e&&ot(e.type)){let e=Rt;return jt({code:e,message:this._grpM.getErrMsg(e,t)})}let a=new es(t);return a.setMessage(n),this.modifyGroupMemberInfo({groupID:o,userID:r,nameCard:i}).then(e=>{ht.l(s+\" ok\"),a.end();var t=this._grpM.getLocalGroupProfile(o);return r===this._grpM.getMyUserID()&&t&&t.setSelfNameCard(i),gt({group:t,member:e})}).catch(e=>(a.setError(e).end(),ht.e(s+\" failed. error:\",e),jt(e)))}setGroupMemberCustomField(e){let t=\"setGroupMemberCustomField\",s=this._n+\".\"+t,{groupID:o,userID:r=this._grpM.getMyUserID(),memberCustomField:i}=e,n=`groupID:${o} userID:${r} memberCustomField:`+JSON.stringify(i);ht.l(s+\" \"+n);e=this._grpM.getLocalGroupProfile(o);if(e&&ot(e.type)){let e=Rt;return jt({code:e,message:this._grpM.getErrMsg(e,t)})}let a=new es(t);return a.setMessage(n),this.modifyGroupMemberInfo({groupID:o,userID:r,memberCustomField:i}).then(e=>{a.end(),ht.l(s+\" ok\");var t=this._grpM.getLocalGroupProfile(o);return gt({group:t,member:e})}).catch(e=>(a.setError(e).end(),ht.e(s+\" failed. error:\",e),jt(e)))}modifyGroupMemberInfo(t){let{groupID:s,userID:o}=t,e=void 0;return it(s)&&(s=nt(e=s)),this._grpM.req({P:Bs,data:{...t,groupID:s,topicID:e}}).then(()=>{if(this.hasLocalGroupMember(s,o)){let e=this.getLocalGroupMemberInfo(s,o);return Be(t.muteTime)||e.updateMuteUntil(t.muteTime),Be(t.role)||e.updateRole(t.role),Be(t.nameCard)||e.updateNameCard(t.nameCard),Be(t.memberCustomField)||e.updateMemberCustomField(t.memberCustomField),e}let e=this._grpM.getLocalGroupProfile(s);if(e&&!ot(e.type))return this.getGroupMemberProfile({groupID:s,userIDList:[o]}).then(({data:{memberList:[e]}})=>e)})}markGroupMemberList(e){let r=this._n+\".markGroupMemberList\",{groupID:t,markType:s,enableMark:o,userIDList:i=[]}=e,n=`groupID:${t} markType:${s} enableMark:${o} userIDList count:`+i.length,a=(ht.l(r+\" \"+n),2),u=[],p=(!0===o&&(a=1),[...i]),l=(500<i.length&&(p=i.slice(0,500),ht.w(r+\" \"+\"the length of userIDList cannot exceed 500\")),p.forEach(e=>{u.push({userID:e,markType:[s]})}),p=null,new es(\"markGroupMemberList\"));return l.setMessage(n),this._grpM.req({P:js,data:{groupID:t,operationType:a,memberList:u}}).then(e=>{let{memberList:t=[]}=e.data,s=[],o=[];t.length===i.length?s.push(...i):(t.forEach(e=>{s.push(e.userID)}),i.forEach(e=>{s.includes(e)||o.push(e)}));e=`success count:${s.length} fail count:`+o.length;return l.setMessage(e).end(),ht.l(r+\" ok. \"+e),gt({successUserIDList:s,failureUserIDList:o})}).catch(e=>(l.setError(e).end(),ht.e(r+\" failed. error:\",e),jt(e)))}_getGroupMemberProfileAdvance(e){return this._grpM.req({P:xs,data:{...e,memberInfoFilter:e.memberInfoFilter||this.DEFAULT_MEMBER_INFO_FILTER}})}_updateLocalGroupMemberMap(t,e){return Ke(e)&&0!==e.length?e.map(e=>(this.hasLocalGroupMember(t,e.userID)?this.getLocalGroupMemberInfo(t,e.userID).updateMember(e):this.setLocalGroupMember(t,new qo(e)),this.getLocalGroupMemberInfo(t,e.userID))):[]}deleteLocalGroupMembers(e,t){let s=this.groupMemberListMap.get(e);s&&t.forEach(e=>{s.delete(e)})}getLocalGroupMemberInfo(e,t){return this.groupMemberListMap.has(e)?this.groupMemberListMap.get(e).get(t):null}setLocalGroupMember(e,t){this.groupMemberListMap.has(e)?this.groupMemberListMap.get(e).set(t.userID,t):(t=(new Map).set(t.userID,t),this.groupMemberListMap.set(e,t))}getLocalGroupMemberList(e){return this.groupMemberListMap.get(e)}hasLocalGroupMember(e,t){return this.groupMemberListMap.has(e)&&this.groupMemberListMap.get(e).has(t)}hasLocalGroupMemberMap(e){return this.groupMemberListMap.has(e)}reset(){this.groupMemberListMap.clear()}}function Oo(e){var t=e.lastIndexOf(\".\");return-1===t?e:e.slice(0,t)}function Fo(e){let{androidInfo:t={},androidOPPOChannelID:s=\"\"}=e,o=t.OPPOChannelID||s,{sound:r=\"\",FCMChannelID:i=\"\",...n}=t;return{...n,Sound:Oo(r),OPPOChannelID:o,GoogleChannelID:i}}function xo(e){var{apnsInfo:e={},ignoreIOSBadge:t=!1,disableVoipPush:s}=e,t=!0===e.ignoreIOSBadge||!0===t?1:0;let o=void 0;return Be(s)||(o=!1===s?1:0),Be(e.disableVoipPush)||(o=!1===e.disableVoipPush?1:0),{...e,badgeMode:t,isVoipPush:o}}function Vo(e){if(He(e))return{pushFlag:!0===e.disablePush?1:0,title:e.title||\"\",desc:e.description||\"\",ext:e.extension||\"\",apnsInfo:xo(e),androidInfo:Fo(e)}}let Ho=1,Ko=15,Bo=[17,18,20];class jo{constructor(e){this._grpM=e,this._n=\"GroupSystemNoticeHandler\",this.pendencyMap=new Map}onNewGroupSystemNotice(e){var{dataList:e,isSyncingEnded:t,isInstantMessage:s}=e,{eventDataList:e,result:r}=(ht.d(this._n+\".onReceiveSystemNotice count:\"+e.length),this._assembly({notifiesList:e,isInstantMessage:s}));0<e.length&&(this._grpM.get(o).onNewMessage({conversationOptionsList:e,isInstantMessage:s}),this._onReceivedGroupSystemNotice({result:r,isInstantMessage:s})),s?0<r.length&&this._grpM.emitOEvt(Nt,r):!0===t&&this._clearGroupSystemNotice()}_assembly({notifiesList:n,isInstantMessage:a}){var u=null;let e=n.length,p=0;var l=[],h={conversationID:le,unreadCount:0,type:le,subType:null,lastMessage:null};for(p=0;p<e;p++){let e=n[p],{groupProfile:{communityType:t=0,topicID:s},elements:{topicIDList:r,operationType:i}}=e;if(!(2!==t||qe(s)&&qe(r))){if(Bo.includes(i)){this._handleTopicSystemNotice(e);continue}qe(s)||(e.to=s)}e.elements.operationType!==Ko&&(e.currentUser=this._grpM.getMyUserID(),e.conversationType=le,e.conversationID=le,(u=new Io(e)).setElement({type:ee,content:{...e.elements,groupProfile:{...e.groupProfile}}}),u.isSystemMessage=!0,(1===u.sequence&&1===u.random||2===u.sequence&&2===u.random)&&(u.sequence=ze(),u.random=ze(),u.generateMessageID(),ht.l(this._n+\"._assembly regenerate ID:\"+u.ID)),this._grpM.get(o).pushIntoNoticeResult(l,u))&&(a?h.unreadCount++:u.setIsRead(!0),h.subType=u.conversationSubType)}return h.lastMessage=l[l.length-1],{eventDataList:0<l.length?[h]:[],result:l}}_clearGroupSystemNotice(){this._getPendencyList().then(e=>{e.forEach(e=>{this.pendencyMap.set(`${e.from}_${e.groupID}_`+e.to,e)});let t=this._grpM.get(o).getLocalMessageList(le),i=[];t.forEach(s=>{let{operatorID:o,operationType:e,groupProfile:r}=s.payload;if(e===Ho){let e=`${o}_${r.groupID}_`+r.to,t=this.pendencyMap.get(e);t&&xe(t.handled)&&0!==t.handled&&i.push(s)}}),this.deleteGroupSystemNotice({messageList:i})})}deleteGroupSystemNotice(e){let s=this._n+\".deleteGroupSystemNotice\";return Ke(e.messageList)&&0!==e.messageList.length?(ht.l(s+\" \"+e.messageList.map(e=>e.ID)),this._grpM.req({P:Cs,data:{messageListToDelete:e.messageList.map(e=>({from:le,messageSeq:e.clientSequence,messageRandom:e.random}))}}).then(()=>{ht.l(s+\" ok\");let t=this._grpM.get(o);return e.messageList.forEach(e=>{t.deleteLocalMessage(e)}),gt()}).catch(e=>(ht.e(s+\" error:\",e),jt(e)))):Bt()}_getPendencyList(e={}){var{type:e,startTime:t=0,limit:s=20}=e;return this._grpM.req({P:Ls,data:{type:e,startTime:t,limit:s,handleAccount:this._grpM.getMyUserID()}}).then(e=>{let t=e.data.pendencyList;return 0!==e.data.nextStartTime?this._getPendencyList({startTime:e.data.nextStartTime}).then(e=>[...t,...e]):t})}getGroupApplicationList(){return this._getPendencyList().then(t=>this._getPendencyList({type:de}).then(e=>(t.push(...e),this._handlePendencyResult(t))).catch(e=>this._handlePendencyResult(t)))}_handlePendencyResult(e){let t=[];return e.forEach(e=>{this.pendencyMap.set(`${e.from}_${e.groupID}_`+e.to,e),0===e.handled&&t.push({applicant:e.from,applicantNick:e.fromUserNickName,groupName:e.groupName,groupID:e.groupID,authentication:e.authentication,messageKey:e.time,applicationType:e.applicationType,userID:e.userID,note:e.note})}),Bt({applicationList:t})}_onReceivedGroupSystemNotice({result:e,isInstantMessage:t}){t&&e.forEach(e=>{switch(e.payload.operationType){case 1:break;case 2:this._onApplyJoinGroup(e);break;case 3:break;case 4:this._onMemberKicked(e);break;case 5:this._onGroupDismissed(e);break;case 6:break;case 7:this._onInviteGroup(e);break;case 8:this._onQuitGroup(e);break;case 9:this._onSetManager(e);break;case 10:this._onDeleteManager(e);break;case 11:case 12:case 15:break;case 20:this._onMessageRemindTypeSynced(e);break;case 21:this._grpM.onAVChatRoomMemberBanned(e)}})}_onApplyJoinGroup(e){var{groupID:e,groupType:t}=e.payload.groupProfile,s=this._grpM.hasLocalGroup(e);ht.l(this._n+`._onApplyJoinGroup groupID:${e} groupType:${t} hasGroup:`+s),s||ot(t)||this._grpM.getGroupProfile({groupID:e}).then(({data:{group:e}})=>{e&&(this._grpM.updateGroupMap([e]),e=!e.isSupportTopic,this._grpM.emitGroupListUpdate(!0,e))})}_onMemberKicked(e){e=e.payload.groupProfile.groupID;this._grpM.hasLocalGroup(e)&&this._grpM.deleteLocalGroupAndConversation(e)}_onGroupDismissed(e){var e=e.payload.groupProfile.groupID,t=(this._grpM.hasLocalGroup(e)&&this._grpM.deleteLocalGroupAndConversation(e),this._grpM)[\"_AVChatRoomHandler\"];t&&t.checkJoinedAVChatRoomByID(e)&&t.reset(e)}_onInviteGroup(e){let t=e.payload.groupProfile.groupID,s=this._grpM.hasLocalGroup(t);ht.l(`${this._n}._onInviteGroup groupID:${t} hasGroup:`+s),this._grpM.getGroupProfile({groupID:t}).then(()=>{this._grpM.emitGroupListUpdate(),this._grpM.get(o).pullMsgOnInvite(\"\"+ue+t)})}_onQuitGroup(e){var{groupID:e,groupType:t}=e.payload.groupProfile,s=this._grpM.hasLocalGroup(e);ht.l(this._n+`._onQuitGroup groupID:${e} groupType:${t} hasGroup:`+s),s&&this._grpM.deleteLocalGroupAndConversation(e)}_onSetManager(e){var{to:e,groupID:t}=e.payload.groupProfile,t=this._grpM.getGroupMemberHandler().getLocalGroupMemberInfo(t,e);t&&t.updateRole(Me)}_onDeleteManager(e){var{to:e,groupID:t}=e.payload.groupProfile,t=this._grpM.getGroupMemberHandler().getLocalGroupMemberInfo(t,e);t&&t.updateRole(ye)}_onMessageRemindTypeSynced(e){var t=e.payload.groupProfile[\"groupID\"],e=e.payload.messageRemindType;this._grpM.get(o).onGroupMsgRemindTypeUpdated({groupID:t,messageRemindType:e})}_handleTopicSystemNotice(e){var{groupProfile:{groupID:e,topicID:t},elements:{operationType:o,topicIDList:r,messageRemindType:i}}=e,n=this._grpM.get(s);17===o?n.onTopicCreated({groupID:e,topicID:t}):18===o?n.onTopicDeleted({groupID:e,topicIDList:r}):20===o&&n.onMessageRemindTypeUpdated({groupID:e,topicID:t,messageRemindType:i})}reset(){this.pendencyMap.clear()}}class Jo extends class{constructor(e){this._m=e,this._n=\"\"}isLoggedIn(){return this._m.get(r).isLoggedIn()}isOversea(){return this._m.get(r).isOversea()}isPrivateNetWork(){var e=this._m.get(r);return e.isPrivateNetWork()&&!e.getFileDownloadProxy()}getFileDownloadProxy(){return this._m.get(r).getFileDownloadProxy()}getDownloadFileAuthKey(){return this._m.get(r).getDownloadFileAuthKey()}getMyUserID(){return this._m.get(r).getUserID()}getMyTinyID(){return this._m.get(r).getTinyID()}getSDKAppID(){return this._m.get(r).getSDKAppID()}isIntl(){return this._m.get(r).isIntl()}isUsingChatCore(){return this._m.get(r).isUsingChatCore()}isDevMode(){return this._m.get(r).isDevMode()}get(e){return this._m.get(e)}getPlatform(){return k}getCloudConfig(e){return this._m.get(u).getCloudConfig(e)}emitOEvt(e,t){this._m.getOEmitInst().emit(e,t)}emitIEvt(e,t){this._m.getIEmitInst().emit(e,t)}getIEmitInst(){return this._m.getIEmitInst()}req(e){return this._m.get(a).req(e)}canIUse(e){return this._m.get(l).canIUse(e)}getErrMsg(e,t,s){return this._m.getErrMsg(e,t,s)}warn(e,t,s){e=this.getErrMsg(e,t,s);e&&ht.w(e)}noUse(e){var t=Et;return jt({code:t,message:this.getErrMsg(t,e)})}}{constructor(e){super(e),this._n=\"GroupModule\",this._commonGroupHandler=new yo(this),this._groupAttributesHandler=new Ao(this),this._groupCountersHandler=new Po(this),this._AVChatRoomHandler=new No(this),this._groupTipsHandler=new Mo(this),this._groupSystemNoticeHandler=new jo(this),this._groupMemberHandler=new ko(this),this.groupMap=new Map,this._unjoinedAVChatRoomList=new Map,this._receiptDetailCompleteMap=new Map,this._onlineMemberCountMap=new Map,this._timeoutIDs=[],this.getIEmitInst().on(Jt.CLOUD_CONFIG,this._onCloudConfig,this)}_onCloudConfig(){var e=this.getCloudConfig(\"polling_interval\"),t=this.getCloudConfig(\"polling_interval_plus\"),s=this.getCloudConfig(\"polling_no_msg_count\"),o=this.getCloudConfig(\"polling_simplified_msg\"),r=this.getCloudConfig(\"paging_grp_count\");ht.l(this._n+`._onCloudConfig pollingInterval:${e} pollingIntervalPlus:${t} pollingNoMessageCount:${s} pollingSimplifiedMessage:${o} pagingGroupCount:`+r),this._AVChatRoomHandler.setPollingInterval(e),this._AVChatRoomHandler.setPollingIntervalPlus(t),this._AVChatRoomHandler.setPollingNoMessageCount(s),this._AVChatRoomHandler.setPollingSimplifiedMessage(o),this._commonGroupHandler.setPagingGroupCount(r)}onCheckTimer(e){this.isLoggedIn()&&(this._commonGroupHandler.onCheckTimer(e),this._groupTipsHandler.onCheckTimer(e))}guardForAVChatRoom(s){if(s.conversationType!==ue)return Bt();{let t=it(s.to)?nt(s.to):s.to;return this.hasLocalGroup(t)?Bt():this.getGroupProfile({groupID:t}).then(e=>{e=e.data.group.type;if(ht.l(`${this._n}.guardForAVChatRoom. groupID:${t} type:`+e),e!==me)return Bt();{let e=dt;return jt(new mt({code:e,message:this.getErrMsg(e,s.from,t),data:{message:s}}))}})}}checkJoinedAVChatRoomByID(e){return this._AVChatRoomHandler.checkJoinedAVChatRoomByID(e)}onNewMessage(e){this._commonGroupHandler.onNewMessage(e)}updateNextMessageSeq(e){if(Ke(e)){let o=this.get(s);e.forEach(e=>{var t=e.conversationID.replace(ue,\"\");it(t)&&o.updateUnreadCountAndLastMsg(t,e.lastMessage),this.groupMap.has(t)&&(this.groupMap.get(t).nextMessageSeq=e.lastMessage.sequence+1)})}}onNewGroupTips(e){this._groupTipsHandler.onNewGroupTips(e)}onMsgRevoked(e,t=!0){this._commonGroupHandler.onMsgRevoked(e,t)}onNewGroupSystemNotice(e){this._groupSystemNoticeHandler.onNewGroupSystemNotice(e)}onMsgReadNotice(e){e.dataList.forEach(e=>{var t=e.elements[\"groupMessageReadNotice\"];if(!Be(t)){let i=this.get(o);t.forEach(e=>{var{groupID:e,topicID:t,lastMessageSeq:s}=e;ht.l(this._n+`.onMsgReadNotice groupID:${e} lastMessageSeq:`+s);let o=\"\"+ue+e,r=!0;qe(t)||(o=\"\"+ue+t,r=!1),i.updateIsReadAfterReadReport({conversationID:o,lastMessageSeq:s}),i.updateUnreadCount(o,r),i.clearGroupAtInfoList(o,r)})}})}onReadReceiptList(e){ht.l(this._n+\".onReadReceiptList options:\",e),e.dataList.forEach(e=>{var{groupProfile:e,elements:t}=e,e=e[\"groupID\"],t=t[\"readReceiptList\"];this.get(o).updateReadReceiptInfo({groupID:e,readReceiptList:t})})}onMsgModified(e){ht.l(this._n+\".onMsgModified options:\",e);let t=this.get(o);e.dataList.forEach(e=>{t.onMessageModified({...e,conversationType:ue,to:e.topicID||e.groupID})})}deleteGroupSystemNotice(e){this._groupSystemNoticeHandler.deleteGroupSystemNotice(e)}initGroupMap(e){this.groupMap.set(e.groupID,new Eo(e))}clearGroupMap(){this.groupMap.clear()}deleteGroup(e){this.groupMap.delete(e)}updateGroupMap(e){let t=this.get(o),s;e.forEach(e=>{s=e.groupID,this.groupMap.has(s)?this.groupMap.get(s).updateGroup(e):(this.groupMap.set(s,new Eo(e)),t.deleteGroupRoamingInfo(s))});var r=this.getMyUserID();for(let[,e]of this.groupMap)e.selfInfo.userID=r,\"Owner\"===e.selfInfo.role&&(e.ownerID=r)}getGroupMap(){return this.groupMap}getLocalGroupList(){return[...this.groupMap.values()].filter(e=>e.type!==_e&&e.type!==fe)}getLocalGroupProfile(e){return this.groupMap.get(e)}sortLocalGroupList(){var e=[...this.groupMap].filter(([,e])=>!qe(e.lastMessage));e.sort((e,t)=>t[1].lastMessage.lastTime-e[1].lastMessage.lastTime),this.groupMap=new Map([...e])}updateGroupLastMessage(e){this._commonGroupHandler.updateLastMsg(e)}emitGroupListUpdate(e=!0,t=!0){var s=this.getLocalGroupList();if(e&&this.emitOEvt(Ot),t){let e=JSON.parse(JSON.stringify(s));this.get(o).updateConvGroupProfile(e)}}getMyNameCardByGroupID(e){e=this.getLocalGroupProfile(e);return e?e.selfInfo.nameCard:\"\"}isPagingGetCompleted(){return this._commonGroupHandler.isPagingGetCompleted()}getMsgRemindType(e){return!Ke(e)||0===e.length||0===(e=e.filter(e=>!ot(this.getLocalGroupProfile(e).type))).length?Promise.resolve():(ht.l(this._n+\".getMsgRemindType groupIDList:\"+e),this.getGroupProfileAdvance({groupIDList:e,responseFilter:{memberInfoFilter:[\"MsgFlag\"]}}).then(e=>{let t=e.data[\"successGroupList\"],s=this.get(o);t.forEach(e=>{s.onGroupMsgRemindTypeUpdated({groupID:e.groupID,messageRemindType:Ke(e.members)?e.members[0].messageRemindType:\"\"})})}))}getGroupList(){return this._commonGroupHandler.getGroupList()}syncCommunityWithTopic(){return this._commonGroupHandler.syncGroupList(!0)}getGroupProfile(t){let r=this._n+\".getGroupProfile\",i=new es(\"getGroupProfile\"),{groupID:n,groupCustomFieldFilter:e}=t;ht.l(r+\" groupID:\"+n);var s={groupIDList:[n],responseFilter:{groupBaseInfoFilter:[...L],groupCustomFieldFilter:e,memberInfoFilter:[...C,\"NameCard\"]}};return this.getGroupProfileAdvance(s).then(({data:{successGroupList:e,failureGroupList:t}})=>{if(ht.l(r+\" ok\"),0<t.length)return jt(t[0]);let s;return(s=ot(e[0].type)&&!this.hasLocalGroup(n)?new Eo(e[0]):(this.updateGroupMap(e),this.getLocalGroupProfile(n))).isSupportTopic||this.get(o).updateConvGroupProfile([s]),i.setMessage(`groupID:${n} type:${s.type} muteAllMembers:${s.muteAllMembers} ownerID:`+s.ownerID).end(),gt({group:s})}).catch(e=>(i.setError(e).setMessage(\"groupID:\"+t.groupID).end(),ht.e(r+\" failed. error:\",e),jt(e)))}getGroupProfileAdvance(t){let s=this._n+\".getGroupProfileAdvance\",e=t[\"groupIDList\"],o=(Ke(e)&&50<e.length&&(this.warn(\"GetGroupProfileLimit\"),e.length=50),[]),r=[];e.forEach(e=>{(rt({groupID:e})?r:o).push(e)});var i=[];if(0<o.length){let e=this._getGroupProfileAdvance({...t,groupIDList:o});i.push(e)}if(0<r.length){let e=this._getGroupProfileAdvance({...t,groupIDList:r,relayFlag:0<o.length});i.push(e)}return Promise.all(i).then(e=>{let t=[],s=[];return e.forEach(e=>{t.push(...e.successGroupList),s.push(...e.failureGroupList)}),gt({successGroupList:t,failureGroupList:s})}).catch(e=>(ht.e(s+\" failed. error:\",e),jt(e)))}_getGroupProfileAdvance(t){let{relayFlag:s=!1,...o}=t;return this.req({P:os,data:o}).then(e=>{ht.l(this._n+\"._getGroupProfileAdvance ok. options:\",o);e=e.data.groups;return{successGroupList:e.filter(e=>Be(e.errorCode)||0===e.errorCode),failureGroupList:e.filter(e=>e.errorCode&&0!==e.errorCode).map(e=>new mt({code:e.errorCode,message:e.errorInfo,data:{groupID:e.groupID}}))}}).catch(e=>s&&rt({groupID:t.groupIDList[0]})?{successGroupList:[],failureGroupList:[]}:jt(e))}createGroup(u){let s=[he,ce,ge,me,de],o=this._n+\".createGroup\",{type:r,groupID:i}=u;if(u.name&&!1===this._filterProfanity(\"name\",u))return jt({code:Ut});if(u.introduction&&!1===this._filterProfanity(\"introduction\",u))return jt({code:Ut});if(u.notification&&!1===this._filterProfanity(\"notification\",u))return jt({code:Ut});if(!s.includes(r))return jt({code:ft});if(!rt({type:r})){if(!qe(i)&&rt({groupID:i}))return jt({code:It});u.isSupportTopic=void 0}if(ot(r)&&!Be(u.memberList)&&0<u.memberList.length&&(u.memberList=void 0),this._canIUseJoinOption(r)||Be(u.joinOption)||(u.joinOption=void 0),rt({type:r})){if(!qe(i)&&!rt({groupID:i}))return jt({code:It});u.isSupportTopic=!0===u.isSupportTopic?1:0}let p=new es(\"createGroup\"),l=(ht.l(o+\" options:\",u),null),h=[];return this.req({P:rs,data:{...u,ownerID:this.getMyUserID(),webPushFlag:1}}).then(r=>{let{groupID:i,overLimitUserIDList:n=[]}=r.data;l=i,h=n;r=`groupType:${u.type} groupID:${i} overLimitUserIDList:`+n;if(p.setMessage(r).end(),ht.l(o+\" ok. \"+r),u.type!==me&&(u.type!==de||1!==u.isSupportTopic)){qe(u.memberList)||qe(n)||(u.memberList=u.memberList.filter(e=>-1===n.indexOf(e.userID))),this.updateGroupMap([{...u,groupID:i}]);r=this.get(e);let s=\"\",o=0;u.type===de?(s=this.isIntl()?\"Create Community\":\"创建社群\",o=1):s=this.isIntl()?\"Create Group\":\"创建群组\";var a=this.get(t).getMyNick(),a=r.createCustomMessage({to:i,conversationType:ue,payload:{data:JSON.stringify({businessID:\"group_create\",content:s,cmd:o,opUser:a||this.getMyUserID(),version:4})}});r.sendMessageInstance(a),this.emitGroupListUpdate()}return this.getGroupProfile({groupID:i})}).then(e=>{var e=e.data[\"group\"],{nameCard:t,joinTime:s}=e.selfInfo;return e.updateSelfInfo({nameCard:t,joinTime:s,messageRemindType:Ae,role:Ie}),gt({group:e,overLimitUserIDList:h})}).catch(e=>{var t;return p.setMessage(\"groupType:\"+u.type).setError(e).end(),10010===e.code||10007===e.code?(this._silentlyGetGroupProfile(e.code,l),this.updateGroupMap([{...u,groupID:l}]),(t=this.getLocalGroupProfile(l)).selfInfo.role=Ie,gt({group:t,overLimitUserIDList:h})):(ht.e(o+\" failed. error:\",e),jt(e))})}dismissGroup(e){let t=this._n+\".dismissGroup\",s=\"groupID:\"+e,o=new es(\"dismissGroup\");return o.setMessage(s),ht.l(t+\" \"+s),this.req({P:is,data:{groupID:e}}).then(()=>(o.end(),ht.l(t+\" ok\"),this.deleteLocalGroupAndConversation(e),this.checkJoinedAVChatRoomByID(e)&&this._AVChatRoomHandler.reset(e),this._groupAttributesHandler.deleteLocalGroupAttributes(e),gt({groupID:e}))).catch(e=>(o.setError(e).end(),ht.e(t+\" failed. error:\",e),jt(e)))}updateGroupProfile(t){let s=this._n+\".updateGroupProfile\";if(this.hasLocalGroup(t.groupID)){let e=this.getLocalGroupProfile(t.groupID).type;this._canIUseJoinOption(e)||Be(t.joinOption)||(ht.w(s+\" joinOption is unavailable for Work/Meeting/AVChatRoom\"),t.joinOption=void 0)}if(Be(t.muteAllMembers)||(t.muteAllMembers?t.muteAllMembers=\"On\":t.muteAllMembers=\"Off\"),t.name&&!1===this._filterProfanity(\"name\",t))return jt({code:Ut});if(t.introduction&&!1===this._filterProfanity(\"introduction\",t))return jt({code:Ut});if(t.notification&&!1===this._filterProfanity(\"notification\",t))return jt({code:Ut});let o=new es(\"updateGroupProfile\");return o.setMessage(JSON.stringify(t)),ht.l(s+\" groupID:\"+t.groupID),this.req({P:ns,data:t}).then(()=>(o.end(),ht.l(s+\" ok\"),this.hasLocalGroup(t.groupID)&&this.groupMap.get(t.groupID).updateGroup(t),gt({group:this.groupMap.get(t.groupID)}))).catch(e=>(o.setError(e).end(),ht.l(s+\" failed. error:\",e),jt(e)))}_filterProfanity(e,t){var s,o=this.get(c);return!o||({isAllowedToSend:o,modifiedText:s}=o.filterText(t[e],y),!0===o&&(t[e]=s,!0))}joinGroup(s){let o=s[\"groupID\"],r=this._n+\".joinGroup\";if(this.deleteUnjoinedAVChatRoom(o),this.hasLocalGroup(o)){if(!this.isLoggedIn())return Bt({status:Te});let t=new es(\"applyJoinGroup\");return this.getGroupProfile({groupID:o}).then(()=>(t.setMessage(`groupID:${o} joinedStatus:`+Te).end(),Bt({status:Te}))).catch(e=>(t.setMessage(`groupID:${o} unjoined`).end(),ht.w(r+` ${o} was unjoined, now join!`),this.groupMap.delete(o),this.applyJoinGroup(s)))}return ht.l(r+\" groupID:\"+o),this.isLoggedIn()?this.applyJoinGroup(s):this._AVChatRoomHandler.joinWithoutAuth(s)}applyJoinGroup(e){let a=this._n+\".applyJoinGroup\",{groupID:u,applyMessage:t}=e;if(!qe(t)&&!1===this._filterProfanity(\"applyMessage\",e))return jt({code:Ut});let p=new es(\"applyJoinGroup\"),s={...e},l=this.canIUse(M.AV_HISTORY_MSG);return l&&(s.historyMessageFlag=1),this.get(o).deleteTopicRoamingInfo(u),this.req({P:as,data:s}).then(({data:{joinedStatus:e,longPollingKey:s,startSeq:o,avChatRoomFlag:r,avChatRoomKey:i,messageList:n}})=>{var t=`groupID:${u} joinedStatus:${e} longPollingKey:${s} startSeq:${o} avChatRoomFlag:${r} canGetAVChatRoomHistoryMsg:${l}, historyMsgCount:`+(qe(n)?0:n.length);switch(p.setMessage(t).end(),ht.l(a+\" ok. \"+t),e){case $e:return gt({status:$e});case we:return this.getGroupProfile({groupID:u}).then(({data:{group:e}})=>this._handleJoinResult({group:e,avChatRoomFlag:r,longPollingKey:s,startSeq:o,avChatRoomKey:i,messageList:n})).catch(t=>{if(10010!==t.code&&10007!==t.code)return ht.e(a+\" failed. error:\",t),jt(t);{this._silentlyGetGroupProfile(t.code,u);let e=new Eo({groupID:u});return this.updateGroupMap([e]),this._handleJoinResult({group:e,avChatRoomFlag:r,longPollingKey:s,startSeq:o,avChatRoomKey:i,messageList:n})}});default:{let e=new mt({code:Ct});return ht.e(a+\" failed. error:\",e),jt(e)}}}).catch(e=>(p.setMessage(\"groupID:\"+u).setError(e).end(),ht.e(a+\" failed. error:\",e),jt(e)))}_handleJoinResult(e){let{group:t,avChatRoomFlag:s,longPollingKey:r,startSeq:i,avChatRoomKey:n,messageList:a}=e,u=t[\"groupID\"];return 1===s?(this.get(o).setCompleted(\"\"+ue+u),this._groupAttributesHandler.initGroupAttributesCache({groupID:u,avChatRoomKey:n}),this._groupCountersHandler.initGroupCountersCache({groupID:u,avChatRoomKey:n}),(e=Be(r)?this._AVChatRoomHandler.handleJoinResult({group:t}):this._AVChatRoomHandler.startRunLoop({group:t,longPollingKey:r,startSeq:i})).then(()=>{this._onAVChatRoomHistoryMessage(a,u)}),e):(this.emitGroupListUpdate(!0,!1),gt({status:we,group:t}))}quitGroup(e){let t=this._n+\".quitGroup\",s=\"groupID:\"+e,o=(ht.l(t+\" \"+s),this.checkJoinedAVChatRoomByID(e));if(!o&&!this.hasLocalGroup(e))return jt({code:Lt});if(o&&!this.isLoggedIn())return ht.l(t+\" anonymously ok. \"+s),this.deleteLocalGroupAndConversation(e),this._AVChatRoomHandler.reset(e),Bt({groupID:e});let r=new es(\"quitGroup\");return r.setMessage(s),this.req({P:ps,data:{groupID:e}}).then(()=>(r.end(),ht.l(t+\" ok\"),this.deleteLocalGroupAndConversation(e),o&&this._AVChatRoomHandler.reset(e),this._groupAttributesHandler.deleteLocalGroupAttributes(e),gt({groupID:e}))).catch(e=>(r.setError(e).end(),ht.e(t+\" failed. error:\",e),jt(e)))}searchGroupByID(e){let t=this._n+\".searchGroupByID\",s={groupIDList:[e]},o=new es(\"searchGroupByID\");return o.setMessage(\"groupID:\"+e),ht.l(t+\" groupID:\"+e),this.req({P:ls,data:s}).then(({data:{groupProfile:e}})=>{if(0!==e[0].errorCode)throw new mt({code:e[0].errorCode,message:e[0].errorInfo});return o.end(),ht.l(t+\" ok\"),gt({group:new Eo(e[0])})}).catch(e=>(o.setError(e).end(),ht.w(t+\" failed. error:\",e),jt(e)))}changeGroupOwner(e){let t=this._n+\".changeGroupOwner\";if(this.hasLocalGroup(e.groupID)&&this.getLocalGroupProfile(e.groupID).type===me)return jt({code:yt});if(e.newOwnerID===this.getMyUserID())return jt({code:Dt});let i=new es(\"changeGroupOwner\");return i.setMessage(`groupID:${e.groupID} newOwnerID:`+e.newOwnerID),ht.l(t+\" groupID:\"+e.groupID),this.req({P:cs,data:e}).then(()=>{i.end(),ht.l(t+\" ok\");var{groupID:s,newOwnerID:o}=e,r=(this.groupMap.get(s).ownerID=o,this._groupMemberHandler.getLocalGroupMemberList(s));if(r instanceof Map){let e=r.get(this.getMyUserID()),t=(Be(e)||(e.updateRole(\"Member\"),this.groupMap.get(s).selfInfo.role=\"Member\"),r.get(o));Be(t)||t.updateRole(\"Owner\")}return this.emitGroupListUpdate(!0,!1),gt({group:this.groupMap.get(s)})}).catch(e=>(i.setError(e).end(),ht.e(t+\" failed. error:\",e),jt(e)))}getGroupApplicationList(){return this._groupSystemNoticeHandler.getGroupApplicationList()}handleGroupApplication(e){let t=this._n+\".handleGroupApplication\",{handleAction:s,handleMessage:o,message:r,application:i}=e,n,a,u,p,l,h=(r?(n=r.payload.operatorID,a=r.payload.groupProfile.groupID,u=r.payload.authentication,p=r.payload.messageKey):i&&(n=i.applicant,a=i.groupID,u=i.authentication,p=i.messageKey),hs),g=(i&&2===i.applicationType&&(h=gs,l=i.userID),new es(\"handleGroupApplication\"));return g.setMessage(\"groupID:\"+a),ht.l(t+\" groupID:\"+a),this.req({P:h,data:{handleAction:s,handleMessage:o,applicant:n,invitee:l,groupID:a,authentication:u,messageKey:p}}).then(()=>(g.end(),ht.l(t+\" ok\"),r&&this._groupSystemNoticeHandler.deleteGroupSystemNotice({messageList:[e.message]}),gt({group:this.getLocalGroupProfile(a)}))).catch(e=>(g.setError(e).end(),ht.e(t+\" failed. error\",e),jt(e)))}handleGroupInvitation(e){let t=this._n+\".handleGroupInvitation\",{groupProfile:{groupID:s},authentication:o,messageKey:r,operatorID:i}=e.message.payload,n=e[\"handleAction\"],a=new es(\"handleGroupInvitation\");return a.setMessage(`groupID:${s} inviter:${i} handleAction:`+n),ht.l(t+` groupID:${s} inviter:${i} handleAction:`+n),this.req({P:ms,data:{...e,inviter:i,groupID:s,authentication:o,messageKey:r}}).then(()=>(a.end(),ht.l(t+\" ok\"),this._groupSystemNoticeHandler.deleteGroupSystemNotice({messageList:[e.message]}),gt({group:this.getLocalGroupProfile(s)}))).catch(e=>(a.setError(e).end(),ht.e(t+\" failed. error\",e),jt(e)))}getGroupOnlineMemberCount(t){let s=this._n+\".getGroupOnlineMemberCount\",e=this._AVChatRoomHandler.checkJoinedAVChatRoomByID(t),o=this.hasLocalGroup(t);if(ht.l(s+` groupID:${t} isAVChatRoom:${e} has:`+o),e)return this._AVChatRoomHandler.getGroupOnlineMemberCount(t);if(!o)return Bt({memberCount:0});var r=Date.now();if(this._onlineMemberCountMap.has(t)){let e=this._onlineMemberCountMap.get(t);if(r-e.lastReqTime<=6e4)return Bt({memberCount:e.memberCount});e.lastReqTime=r}return this.requestOnlineCount(t).then(e=>{var{memberCount:e=0}=e.data;return this._onlineMemberCountMap.set(t,{lastReqTime:Date.now(),memberCount:e}),ht.l(s+` ok. groupID:${t} memberCount:`+e),Bt({memberCount:e})}).catch(e=>(ht.w(s+\" failed. error:\",e),Promise.reject(e)))}requestOnlineCount(e){return this.req({P:As,data:{groupID:e}})}hasLocalGroup(e){return this.groupMap.has(e)}deleteLocalGroupAndConversation(t){let e=this.checkJoinedAVChatRoomByID(t);ht.l(this._n+`.deleteLocalGroupAndConversation groupID:${t} isJoinedAVChatRoom:`+e);var r=this.get(o),i=\"\"+ue+t;if(e&&(this.stopMessageLongPolling({groupID:t}),r.deleteLocalConv(i)),rt({groupID:t})){let e=this.getLocalGroupProfile(t);e&&!0===e.isSupportTopic&&this.get(s).deleteTopicListInCommunity(t)}r.clearUnreadCount(i),r.setCompleted(i),this._deleteLocalGroup(t),this._onlineMemberCountMap.delete(t),this.emitGroupListUpdate(!0,!1)}_deleteLocalGroup(e){this.groupMap.delete(e),this._groupMemberHandler.deleteGroupMemberList(e)}sendMessage(e,t){return Ke(e._receiverList)&&0<e._receiverList.length&&!this.canIUse(M.MSG_TO_SPECIFIED_GRP_MBR)?this.noUse(\"Targeted Group Message\"):(e=this.createGroupMessagePack(e,t),this.req(e))}createGroupMessagePack(e,o){let t=null,s=(o&&o.offlinePushInfo&&(t=o.offlinePushInfo),\"\");Ve(e.cloudCustomData)&&0<e.cloudCustomData.length&&(s=e.cloudCustomData);var r=[];if(He(o)&&He(o.messageControlInfo)){let{excludedFromUnreadCount:e,excludedFromLastMessage:t,excludedFromContentModeration:s}=o.messageControlInfo;!0===e&&r.push(\"NoUnread\"),!0===t&&r.push(\"NoLastMsg\"),!0===s&&r.push(\"NoMsgCheck\")}let i=void 0;Ke(e._receiverList)&&0<e._receiverList.length&&(i=e._receiverList,50<e._receiverList.length)&&(i=e._receiverList.slice(0,50),this.warn(\"ReceiverListLimit\"));var a=this.isOnlineMessage(e,o)?1:0,u=JSON.parse(JSON.stringify(e.getElements())),p=this.get(n).getFileDNList(),l=e.getGroupAtInfoList(),u={fromAccount:this.getMyUserID(),groupID:e.to,msgBody:eo(e.type,u,p),cloudCustomData:s,random:e.random,priority:e.priority,clientSequence:e.clientSequence,groupAtInfo:e.type!==j||qe(l)?void 0:l,onlineOnlyFlag:a,clientTime:e.clientTime,offlinePushInfo:Vo(t),messageControlInfo:0==a?r:void 0,needReadReceipt:!0!==e.needReadReceipt||this.isMessageFromOrToAVChatroom(e.to)?0:1,receiverList:i,isSupportExtension:!0===e.isSupportExtension?1:0,isRelayMessage:!0===e._relayFlag?1:0,cmConfigID:e._cmConfigID,forbidCallbackControl:et(o)};return it(e.to)&&(u.groupID=nt(e.to),u.topicID=e.to),{P:ts,data:u}}revokeMessage(e){var t={groupID:e.to,msgSeqList:[{msgSeq:e.sequence}]};return it(e.to)&&(t.groupID=nt(e.to),t.topicID=e.to),this.req({P:ds,data:t})}deleteMessage(e){var{to:e,keyList:t}=e,t=(ht.l(this._n+`.deleteMessage groupID:${e} count:`+t.length),{groupID:e,deleter:this.getMyUserID(),keyList:t});return it(e)&&(t.groupID=nt(e),t.topicID=e),this.req({P:Ts,data:t})}modifyRemoteMessage(e){var{to:e,sequence:t,payload:s,type:o,version:r=0,cloudCustomData:i,_elements:n}=e;let a=e,u=void 0,p=(it(e)&&(a=nt(e),u=e),void 0);return(e=o)!==j&&e!==te&&e!==Q&&e!==X||(1<n.length&&n.splice(0,1,{type:o,content:s}),p=n),this.req({P:vs,data:{groupID:a,topicID:u,sequence:t,version:r,elements:p,cloudCustomData:i}})}getRoamingMessage(e){let u=this._n+\".getRoamingMessage\",{conversationID:p,groupID:l,sequence:t}=e,h=new es(\"getRoamingMessage\"),g=0,c=void 0;return it(l)&&(l=nt(c=l)),this._computeLastSequence({groupID:l,topicID:c,sequence:t}).then(e=>(g=e,ht.l(u+` groupID:${l} startSequence:`+g),this.req({P:fs,data:{groupID:l,count:21,sequence:g,topicID:c}}))).then(e=>{var{messageList:t,complete:s,invisibleSequenceList:r=[]}=e.data;let{nextSequence:i=0}=e.data;Be(t)?ht.l(u+` ok. complete:${s} nextSequence:${i} but messageList is undefined!`):ht.l(u+` ok. complete:${s} nextSequence:${i} count:`+t.length),h.setMessage(`groupID:${l} topicID:${c} startSequence:${g} complete:${s} nextSequence:`+i).end();e=this.get(o);let n=[];var a=[],t=(qe(t)||(n=e.onRoamingMessage(t,p,!0,a),e.updateIsRead(p),e.patchConvLastMessage(p)),2===s||i<1);return t&&(e.setCompleted(p),i=\"\"),ht.l(u+` isPullingCompleted:${t} nextReqID:${i} storedMsgCount:${n.length} invisibleSeqCount:`+r.length),{nextReqID:i+\"\",storedMessageList:n,assembledMessageList:a,isPullingCompleted:t}}).catch(e=>(h.setError(e).setMessage(`groupID:${l} topicID:${c} startSequence:`+g).end(),ht.w(u+\" failed. error:\",e),jt(e)))}_getGroupIDOfMessage(e){return e.conversationID.replace(ue,\"\")}getReadReceiptList(s){let t=this._n+\".getReadReceiptList\",e=this._getGroupIDOfMessage(s[0]),o=this.getMyUserID(),r=s.filter(e=>e.from===o&&!0===e.needReadReceipt).map(e=>({sequence:e.sequence}));if(ht.l(t+` groupID:${e} sequenceList:`+JSON.stringify(r)),0===r.length)return Bt({messageList:s});let i=new es(\"getReadReceiptList\");return i.setMessage(\"groupID:\"+e),this.req({P:Is,data:{groupID:e,sequenceList:r}}).then(e=>{i.end(),ht.l(t+\" ok\");e=e.data.readReceiptList;return Ke(e)&&e.forEach(t=>{s.forEach(e=>{0===t.code&&t.sequence===e.sequence&&(e.readReceiptInfo.readCount=t.readCount,e.readReceiptInfo.unreadCount=t.unreadCount)})}),gt({messageList:s})}).catch(e=>(i.setError(e).end(),ht.w(t+\" failed. error:\",e),jt(e)))}sendReadReceipt(e){let t=this._n+\".sendReadReceipt\",s=this._getGroupIDOfMessage(e[0]),o=new es(\"sendReadReceipt\"),r=(o.setMessage(\"groupID:\"+s),this.getMyUserID()),i=e.filter(e=>e.from!==r&&!0===e.needReadReceipt).map(e=>({sequence:e.sequence}));return 0===i.length?jt({code:_t}):(ht.l(t+\". sequenceList:\"+JSON.stringify(i)),this.req({P:Ms,data:{groupID:s,sequenceList:i}}).then(e=>(o.end(),ht.l(t+\" ok\"),gt())).catch(e=>(o.setError(e).end(),ht.w(t+\" failed. error:\",e),jt(e))))}getReadReceiptDetail(e){let{message:t,filter:s,cursor:o,count:r}=e,i=this._getGroupIDOfMessage(t),n=t.ID,a=t.sequence,u=this._n+\".getReadReceiptDetail\",p=this._receiptDetailCompleteMap.get(n)||!1,l=0!==s&&1!==s?0:s,h=Ve(o)?o:\"\",g=!xe(r)||r<=0||100<=r?100:r,c=`groupID:${i} sequence:${a} cursor:${h} filter:${l} completeFlag:`+p,m=(ht.l(u+\" \"+c),{cursor:\"\",isCompleted:!1,messageID:n,unreadUserIDList:[],readUserIDList:[]}),d=new es(\"getReadReceiptDetail\");return d.setMessage(c),this.req({P:ys,data:{groupID:i,sequence:a,flag:l,cursor:h,count:g}}).then(e=>{d.end();var{cursor:e,isCompleted:t,unreadUserIDList:s,readUserIDList:o}=e.data;return m.cursor=e,1===t&&(m.isCompleted=!0,this._receiptDetailCompleteMap.set(n,!0)),0===l?m.readUserIDList=o.map(e=>e.userID):1===l&&(m.unreadUserIDList=s.map(e=>e.userID)),ht.l(u+\" ok\"),gt(m)}).catch(e=>(d.setError(e).end(),ht.w(u+\" failed. error:\",e),jt(e)))}getGroupReceiptsByUsers(e){let t=this._n+\".getGroupReceiptsByUsers\",{groupID:s,dataList:o=[]}=e,r=`groupID:${s} dataList length:`+o.length;return ht.l(t+\" \"+r),0===o.length&&ht.w(t+\" dataList is empty.\"),this.req({P:Ds,data:{groupID:s,dataList:o}}).then(e=>{var{dataList:e=[]}=e.data;return ht.l(t+\" ok.\"),gt({dataList:e})}).catch(e=>(ht.w(t+\" failed. error:\",e),jt(e)))}getRoamingMessagesHopping(p){let l=this._n+\".getRoamingMessagesHopping\",{groupID:t,count:s,sequence:h,direction:g}=p,r=void 0;return Be(h)&&1===g?Bt({messageList:[],isCompleted:!0,nextMessageSeq:\"\"}):(it(t)&&(t=nt(r=t)),this._computeReqSeqHopping({groupID:t,topicID:r,sequence:h}).then(e=>{Be(h)||1!==g||(e=h+s-1);let a=`${r?\"topicID:\"+r:\"groupID:\"+t} sequence:${h} reqSeq:${e} direction:`+g,u=(ht.l(l+\" \"+a),new es(\"getRoamingMessagesHopping\"));return this.req({P:fs,data:{groupID:t,topicID:r,count:s,sequence:e}}).then(e=>{var{messageList:e=[],complete:t,nextSequence:s=0,invisibleSequenceList:r=[]}=e.data,i=`complete:${t} nextSequence:${s} remoteMsgCount:${e.length} invisibleSequenceList:`+r,i=(u.setMessage(a+\" \"+i).end(),ht.l(l+\" ok. \"+i),\"\"+ue+p.groupID),n=this.get(o),i=n.onRoamingMessage(e,i,!1),e=this._computeResult({groupID:p.groupID,direction:g,sequence:h,remoteMessageList:e,processedMessageList:i,complete:t,nextSequence:s,invisibleSequenceList:r});return n.storeHoppingMessageList(e.messageList),gt(e)}).catch(e=>(u.setError(e).setMessage(`groupID:${t} sequence:${h} count:`+s).end(),ht.w(l+\" failed. error:\",e),jt(e)))}))}_computeReqSeqHopping(e){let{groupID:s,topicID:t,sequence:o}=e;return 0<o?Promise.resolve(o):Be(t)?this.getGroupProfileAdvance({groupIDList:[s],responseFilter:{groupBaseInfoFilter:[\"NextMsgSeq\"]}}).then(({data:{successGroupList:e}})=>{let t=0;return qe(e)||(t=e[0].nextMessageSeq-1),ht.l(`${this._n}._computeReqSeqHopping groupID:${s} lastSequence:${t} from remote`),t}).catch(e=>jt(e)):Promise.resolve(0)}_computeResult(e){let s={messageList:[],isCompleted:!1,nextMessageSeq:\"\"},{groupID:t,direction:o,sequence:r,remoteMessageList:i=[],processedMessageList:n=[],complete:a,nextSequence:u,invisibleSequenceList:p}=e;if(0===o)return s.nextMessageSeq=u,(2===a||u<1)&&(s.isCompleted=!0,s.nextMessageSeq=\"\"),s.messageList=n,s;if(1===o){if(qe(i)){if(qe(p))return s.isCompleted=!0,s.nextMessageSeq=\"\",s;s.nextMessageSeq=p[0]+1}else{let e=i[0].sequence,t=p[0]||0;s.nextMessageSeq=e>t?e+1:t+1}return n.forEach(e=>{e.sequence>=r&&s.messageList.push(e)}),(rt({groupID:t})||it(t))&&0===s.messageList.length&&i[0].sequence<r&&(s.isCompleted=!0,s.nextMessageSeq=\"\"),s}}setMessageRead({conversationID:r,lastMessageSeq:i}){let n=this._n+\".setMessageRead\",e=`convID:${r} lastMessageSeq:`+i,a=(ht.l(n+\" \"+e),xe(i)||this.warn(\"DoNotModifyLastSeq\"),new es(\"setMessageRead\")),u=(a.setMessage(e),r.replace(ue,\"\")),p=void 0;return it(u)&&(u=nt(p=u)),this.req({P:_s,data:{groupID:u,topicID:p,messageReadSeq:i}}).then(()=>{a.end(),ht.l(n+\" ok\");var e=this.get(o);e.updateIsReadAfterReadReport({conversationID:r,lastMessageSeq:i});let t=!0;if(!Be(p)){t=!1;let e=this.get(s).getLocalTopic(u,p);e&&e.updateSelfInfo({readedSequence:i})}return e.updateUnreadCount(r,t),gt()}).catch(e=>(a.setError(e).end(),ht.l(n+\" failed. error:\",e),jt(e)))}_computeLastSequence(e){var{groupID:e,topicID:t,sequence:s}=e;return 0<s?Promise.resolve(s):Be(t)?this.getGroupLastSequence(e):Promise.resolve(0)}getGroupLastSequence(s){let r=this._n+\".getGroupLastSequence\",i=new es(\"getGroupLastSequence\"),n=0,a=\"\",u=\"groupID:\"+s;if(this.hasLocalGroup(s)){let e=this.getLocalGroupProfile(s),t=e.lastMessage;if(0<t.lastSequence&&!1===t.onlineOnlyFlag)return n=t.lastSequence,a=u+`, ${n} from group.lastMessage.lastSequence`,ht.l(r+\" \"+a),i.setMessage(a).end(),Promise.resolve(n);if(1<e.nextMessageSeq)return n=e.nextMessageSeq-1,a=u+`, ${n} from group.nextMessageSeq`,ht.l(r+\" \"+a),i.setMessage(a).end(),Promise.resolve(n)}let e=this.get(o).getLocalConversation(\"GROUP\"+s);return e&&e.lastMessage.lastSequence&&!1===e.lastMessage.onlineOnlyFlag?(n=e.lastMessage.lastSequence,a=u+`, ${n} from conversation.lastMessage.lastSequence`,ht.l(r+\" \"+a),i.setMessage(a).end(),Promise.resolve(n)):this.getGroupProfileAdvance({groupIDList:[s],responseFilter:{groupBaseInfoFilter:[\"NextMsgSeq\"]}}).then(({data:{successGroupList:e}})=>(qe(e)?ht.w(r+` ${u}, empty successGroupList`):(n=e[0].nextMessageSeq-1,a=u+`, ${n} from remote`,ht.l(r+\" \"+a)),i.setMessage(a).end(),n)).catch(e=>(i.setError(e).setMessage(u).end(),ht.w(r+\" failed. error:\",e),jt(e)))}isMessageFromOrToAVChatroom(e){return this._AVChatRoomHandler.checkJoinedAVChatRoomByID(e)}hasJoinedAVChatRoom(){return this._AVChatRoomHandler.hasJoinedAVChatRoom()}getJoinedAVChatRoom(){return this._AVChatRoomHandler.getJoinedAVChatRoom()}getGroupRemoteLastSeq(e){e=this.getLocalGroupProfile(e);return e?e.nextMessageSeq-1:1}isOnlineMessage(e,t){return!(!this._canIUseOnlineOnlyFlag(e)||!t||!0!==t.onlineUserOnly)}_canIUseOnlineOnlyFlag(e){var t=this.getJoinedAVChatRoom();return!t||!t.includes(e.to)||e.conversationType!==ue}_onAVChatRoomHistoryMessage(e,s){if(!qe(e)){ht.l(this._n+`._onAVChatRoomHistoryMessage groupID:${s} count:`+e.length);let t=[];e.forEach(e=>{t.push({...e,isHistoryMessage:1})}),this.onAVChatRoomMessage(t,s)}}onAVChatRoomMessage(e,t=\"\"){this._AVChatRoomHandler.onMessage(e,t)}onAVChatRoomMemberBanned(e){this._AVChatRoomHandler.onAVChatRoomMemberBanned(e)}setUnjoinedAVChatRoom(e){this._unjoinedAVChatRoomList.set(e,1)}deleteUnjoinedAVChatRoom(e){this._unjoinedAVChatRoomList.has(e)&&this._unjoinedAVChatRoomList.delete(e)}isUnjoinedAVChatRoom(e){return this._unjoinedAVChatRoomList.has(e)}isGroupAttributesUpdatedNotice(e){return this._groupAttributesHandler.isGroupAttributesUpdatedNotice(e)}updateLocalMainSequenceOnReconnected(){this._groupAttributesHandler.updateLocalMainSequenceOnReconnected()}initGroupAttributes(e){return this._groupAttributesHandler.initGroupAttributes(e)}setGroupAttributes(e){return this._groupAttributesHandler.setGroupAttributes(e)}deleteGroupAttributes(e){return this._groupAttributesHandler.deleteGroupAttributes(e)}getGroupAttributes(e){return this._groupAttributesHandler.getGroupAttributes(e)}isMessageFromTopic(e,t){return 2===e&&!qe(t)}isMessageFromCommunityOfTopic(e,t){return 2===e&&qe(t)}getMessageExtensions(e,t){return ht.l(this._n+\".getMessageExtensions startSequence:\"+t),this.req({P:Us,data:{groupID:e.to,messageSequence:e.sequence,startSequence:t}})}modifyMsgExts(e,t,s=1){return ht.l(this._n+\".modifyMsgExts operateType:\"+s),this.req({P:Es,data:{groupID:e.to,messageSequence:e.sequence,extensionList:t,operateType:s}})}_genNotifyReqList(s){var o,r,i,n,a=[];for(let e=0,t=s.length;e<t;e++)o=s[e],n=this.getLocalGroupProfile(o).type,r=this._getGroupLastRevokedTime(o),i=1e3*Se(),n={notifyType:1,limit:20,type:rt({type:n,groupID:o})?de:void 0,groupID:o,beginTime:r,endTime:i},a.push(n);return a}getNotice(e){let s=this._n+\".getNotice\",t=e.filter(e=>{var t;return!!this.hasLocalGroup(e)&&({type:e,isSupportTopic:t}=this.getLocalGroupProfile(e),!ot(e))&&!t});0!==t.length&&(ht.l(s+\" list:\"+t),this.req({P:Ns,data:{notifyReqList:this._genNotifyReqList(t)}}).then(e=>{let t=e.data[\"notifyRspList\"],n=[];if(Ke(t)){let r={dataList:[]},i=s+\" ok.\";t.forEach(e=>{var{nextRevokedTime:t,groupID:s,notifyList:o}=e;i+=` groupID:${s} nextRevokedTime:${t} count:${o.length}\n`,r.dataList.push({elements:{revokedInfos:this._genRevokedInfos(e)}}),0!==t?(this._setGroupLastRevokedTime(s,t),n.push(s)):this._setGroupLastRevokedTime(s,1e3*Se())}),ht.l(i),this.onMsgRevoked(r,!1)}0<n.length&&this.getNotice(n)}).catch(e=>{ht.e(s+\" failed. error:\",e)}))}_genRevokedInfos(e){let{notifyList:t,groupID:s}=e,o=[];return Ke(t)&&t.forEach(e=>{o.push({groupID:s,sequence:e.sequence,random:e.random,revokerInfo:{...e.revokerInfo}})}),o}_getGroupLastRevokedTime(e){return this.hasLocalGroup(e)?this.getLocalGroupProfile(e)._lastRevokedTime:0}_setGroupLastRevokedTime(e,t){this.hasLocalGroup(e)&&(this.getLocalGroupProfile(e)._lastRevokedTime=t)}isGroupCountersNotice(e){return this._groupCountersHandler.isGroupCountersNotice(e)}setGroupCounters(e){return this._groupCountersHandler.setGroupCounters(e)}increaseGroupCounter(e){return this._groupCountersHandler.increaseGroupCounter(e)}decreaseGroupCounter(e){return this._groupCountersHandler.decreaseGroupCounter(e)}getGroupCounters(e){return this._groupCountersHandler.getGroupCounters(e)}getGroupMemberHandler(){return this._groupMemberHandler}getGroupMemberList(e){return this._groupMemberHandler.getGroupMemberList(e)}getGroupMemberProfile(e){return this._groupMemberHandler.getGroupMemberProfile(e)}addGroupMember(e){return this._groupMemberHandler.addGroupMember(e)}deleteGroupMember(e){return this._groupMemberHandler.deleteGroupMember(e)}setGroupMemberMuteTime(e){return this._groupMemberHandler.setGroupMemberMuteTime(e)}setGroupMemberRole(e){return this._groupMemberHandler.setGroupMemberRole(e)}setGroupMemberNameCard(e){return this._groupMemberHandler.setGroupMemberNameCard(e)}setGroupMemberCustomField(e){return this._groupMemberHandler.setGroupMemberCustomField(e)}markGroupMemberList(e){return this._groupMemberHandler.markGroupMemberList(e)}modifyGroupMemberInfo(e){return this._groupMemberHandler.modifyGroupMemberInfo(e)}restartPolling(){this._AVChatRoomHandler.restartPolling()}getPollingTimerID(e){var t;return e&&(t=this.getLocalGroupProfile(e))&&ot(t.type)?this._AVChatRoomHandler.getPollingTimerID(e):-1}_canIUseJoinOption(e){return e===he||rt({type:e})}_silentlyGetGroupProfile(e,t){var s=setTimeout(this.getGroupProfile.bind(this,{groupID:t}),3e3);this._timeoutIDs.push(s),ht.l(this._n+`._silentlyGetGroupProfile errorCode:${e} groupID:${t} timeoutIDs:`+this._timeoutIDs)}_clearTimeoutIDs(){this._timeoutIDs.forEach(e=>{e&&clearTimeout(e)}),this._timeoutIDs=[]}startMessageLongPolling(e){var t,{groupID:e,longPollingKey:s,longPollingSequence:o=1}=e,i=this.get(r).isUnlimitedAVChatRoom();if(!qe(s))return this._AVChatRoomHandler.hasPollingInstance(e)&&this.stopMessageLongPolling({groupID:e}),t=this._AVChatRoomHandler.getJoinedLiveList(),!i&&0<t.length&&this.stopMessageLongPolling({groupID:t[0]}),i=new Eo({groupID:e,type:fe}),ht.l(this._n+`.startMessageLongPolling groupID:${e} longPollingKey:${s} longPollingSequence:`+o),this._AVChatRoomHandler.startRunLoop({group:i,longPollingKey:s,startSeq:o});console.warn(this._n+\".startMessageLongPolling longPollingKey is empty.\")}stopMessageLongPolling(e){var e=e[\"groupID\"],t=this.get(o);return this._AVChatRoomHandler.reset(e),this._deleteLocalGroup(e),t.deleteLocalConv(\"\"+ue+e),ht.l(this._n+\".stopMessageLongPolling ok, groupID:\"+e),Bt({groupID:e})}reset(){this.groupMap.clear(),this._unjoinedAVChatRoomList.clear(),this._receiptDetailCompleteMap.clear(),this._onlineMemberCountMap.clear(),this._commonGroupHandler.reset(),this._groupSystemNoticeHandler.reset(),this._groupTipsHandler.reset(),this._groupAttributesHandler.reset(),this._groupCountersHandler.reset(),this._AVChatRoomHandler.reset(),this._groupMemberHandler.reset(),this._clearTimeoutIDs()}}export{Jo as default};"],"names":[],"sourceRoot":""}
package/dist/index.995.js DELETED
@@ -1,17 +0,0 @@
1
- "use strict";
2
- ((typeof self !== 'undefined' ? self : this)["webpackChunkisdata_customer_sdk"] = (typeof self !== 'undefined' ? self : this)["webpackChunkisdata_customer_sdk"] || []).push([[995],{
3
-
4
- /***/ 5995:
5
- /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
6
-
7
- __webpack_require__.r(__webpack_exports__);
8
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
9
- /* harmony export */ "default": function() { return /* binding */ Lt; }
10
- /* harmony export */ });
11
- let t=2,e=6,i=11,n=12,s=20,o=23,a=27;class r{constructor(t=0,e=0){this.high=t,this.low=e}equal(t){return null!==t&&this.low===t.low&&this.high===t.high}toString(){var t=Number(this.high).toString(16);let e=Number(this.low).toString(16);if(e.length<8){let t=8-e.length;for(;t;)e="0"+e,t--}return t+e}}let c={TEST:{CHINA:{DEFAULT:"wss://wss-dev.tim.qq.com"},OVERSEA:{DEFAULT:"wss://wss-dev.tim.qq.com"},SINGAPORE:{DEFAULT:"wss://wsssgp-dev.im.qcloud.com"},KOREA:{DEFAULT:"wss://wsskr-dev.im.qcloud.com"},GERMANY:{DEFAULT:"wss://wssger-dev.im.qcloud.com"},IND:{DEFAULT:"wss://wssind-dev.im.qcloud.com"},JPN:{DEFAULT:"wss://wssjpn-dev.im.qcloud.com"},USA:{DEFAULT:"wss://wssusa-dev.im.qcloud.com"},INDONESIA:{DEFAULT:"wss://wssidn-dev.im.qcloud.com"}},PRODUCTION:{CHINA:{DEFAULT0:"wss://*w4c.my-imcloud.com",DEFAULT:"wss://wss.im.qcloud.com",IPV6:"wss://wssv6.im.qcloud.com",BACKUP:"wss://wss.tim.qq.com",BACKUP_WEB:"wss://*w4c.my-cpaas.com",STAT:"https://events.im.qcloud.com",ANYCAST:"wss://162.14.13.203"},OVERSEA:{DEFAULT0:"wss://*w4c.my-imcloud.com",DEFAULT:"wss://wss.im.qcloud.com",IPV6:"wss://wssv6.im.qcloud.com",BACKUP:"wss://wss.my-imcloud.com",BACKUP_WEB:"wss://*w4c.my-cpaas.com",STAT:"https://api.my-imcloud.com"},SINGAPORE:{DEFAULT0:"wss://*w4s.my-imcloud.com",DEFAULT:"wss://wsssgp.im.qcloud.com",IPV6:"wss://wsssgpv6.im.qcloud.com",BACKUP:"wss://wsssgp.my-imcloud.com",BACKUP_WEB:"wss://*w4s.my-cpaas.com",STAT:"https://apisgp.my-imcloud.com",ANYCAST:"wss://162.14.19.159"},KOREA:{DEFAULT0:"wss://*w4k.my-imcloud.com",DEFAULT:"wss://wsskr.im.qcloud.com",IPV6:"wss://wsskrv6.im.qcloud.com",BACKUP:"wss://wsskr.my-imcloud.com",BACKUP_WEB:"wss://*w4k.my-cpaas.com",STAT:"https://apikr.my-imcloud.com",ANYCAST:"wss://162.14.13.104"},GERMANY:{DEFAULT0:"wss://*w4g.my-imcloud.com",DEFAULT:"wss://wssger.im.qcloud.com",IPV6:"wss://wssgerv6.im.qcloud.com",BACKUP:"wss://wssger.my-imcloud.com",BACKUP_WEB:"wss://*w4g.my-cpaas.com",STAT:"https://apiger.my-imcloud.com",ANYCAST:"wss://162.14.3.17"},IND:{DEFAULT0:"wss://*w4i.my-imcloud.com",DEFAULT:"wss://wssind.my-imcloud.com",IPV6:"wss://wssindv6.im.qcloud.com",BACKUP:"wss://wssind.im.qcloud.com",BACKUP_WEB:"wss://*w4i.my-cpaas.com",STAT:"https://apiind.my-imcloud.com",ANYCAST:"wss://162.14.19.46"},JPN:{DEFAULT0:"wss://*w4j.my-imcloud.com",DEFAULT:"wss://wssjpn.im.qcloud.com",IPV6:"wss://wssjpnv6.im.qcloud.com",BACKUP:"wss://wssjpn.my-imcloud.com",BACKUP_WEB:"wss://*w4j.my-cpaas.com",STAT:"https://apijpn.my-imcloud.com"},USA:{DEFAULT0:"wss://*w4u.my-imcloud.com",DEFAULT:"wss://wssusa.im.qcloud.com",IPV6:"wss://wssusav6.im.qcloud.com",BACKUP:"wss://wssusa.my-imcloud.com",BACKUP_WEB:"wss://*w4u.my-cpaas.com",STAT:"https://apiusa.my-imcloud.com",ANYCAST:"wss://162.14.10.42"},INDONESIA:{DEFAULT0:"wss://*w4y.my-imcloud.com",DEFAULT:"wss://wssidn.im.qcloud.com",IPV6:"wss://wssidnv6.im.qcloud.com",BACKUP:"wss://wssidn.my-imcloud.com",BACKUP_WEB:"wss://*w4y.my-cpaas.com",STAT:"https://apiidn.my-imcloud.com",ANYCAST:"wss://43.129.34.169"}}},g={ANDROID:2,IOS:3,MAC:4,WEB:7,WX_MP:8,QQ_MP:9,TT_MP:10,BAIDU_MP:11,ALI_MP:12,IPAD:13,UNI_NATIVE_APP:15,DONUT_NATIVE_APP:19,NS_NATIVE_APP:20,RN_NATIVE_APP:21},l="CHINA",h={HOST:{CURRENT:{DEFAULT:"wss://wss.im.qcloud.com",STAT:"https://events.im.qcloud.com"},setCurrent(t=l){this.CURRENT=c.PRODUCTION[t]}},NAME:{OPEN_IM:"openim",OPEN_IM_MSG_EXT:"openim_msg_ext_http_svc",GRP:"group_open_http_svc",GRP_AV:"group_open_avchatroom_http_svc",GRP_COMMUNITY:"million_group_open_http_svc",GRP_ATTR:"group_open_attr_http_svc",FD:"sns",PROFILE:"profile",RECENT_CONTACT:"recentcontact",PIC:"openpic",BIG_GRP_NO_AUTH:"group_open_http_noauth_svc",BIG_GRP_POLLING:"group_open_long_polling_http_svc",BIG_GRP_POLLING_NO_AUTH:"group_open_long_polling_http_noauth_svc",IM_OPEN_STAT:"imopenstat",WEB_IM:"webim",IM_COS_SIGN:"im_cos_sign_svr",CUSTOM_UPLOAD:"im_cos_msg",HEARTBEAT:"heartbeat",IM_OPEN_PUSH:"im_open_push",IM_OPEN_STATUS:"im_open_status",IM_LONG_MSG:"im_long_msg",IM_CONFIG_MANAGER:"im_sdk_config_mgr",STAT_SERVICE:"StatSvc",OVERLOAD_PUSH:"OverLoadPush",IM_MSG_AUDIT_MGR:"im_msg_audit_mgr",TUIROOM_SVR:"tui_room_svr",IM_OPEN_TRANSLATE:"im_open_translate",IM_OPEN_SPEECH:"im_open_speech",MSG_SEARCH:"message_search",GRP_SEARCH:"group_search",GRP_MEMBER_SEARCH:"group_member_search",USER_SEARCH:"user_search",FOLLOW:"follow",OFFLINE_PUSH_REPORT:"offline_push_report",IM_MSG_LOGIC:"im_msg_db_logic"}},u=(new r(0,Math.pow(2,1)).toString(),new r(0,Math.pow(2,2)).toString(),new r(0,Math.pow(2,3)).toString(),new r(0,Math.pow(2,4)).toString(),new r(0,Math.pow(2,6)).toString(),new r(0,Math.pow(2,7)).toString(),new r(0,Math.pow(2,9)).toString(),new r(0,Math.pow(2,10)).toString(),new r(0,Math.pow(2,11)).toString(),new r(0,Math.pow(2,13)).toString(),new r(0,Math.pow(2,15)).toString(),new r(Math.pow(2,6)).toString(),new r(Math.pow(2,7)).toString(),new r(Math.pow(2,8)).toString(),new r(Math.pow(2,9)).toString(),new r(Math.pow(2,10)).toString(),new r(Math.pow(2,16)).toString(),new r(Math.pow(2,20)).toString(),h.HOST.setCurrent(l),"undefined"!=typeof wx&&"function"==typeof wx.getSystemInfoSync&&Boolean(wx.getSystemInfoSync().fontSizeSetting)),m=(u&&wx.createGamePortal,"undefined"!=typeof qq&&"function"==typeof qq.getSystemInfoSync&&Boolean(qq.getSystemInfoSync().fontSizeSetting)),_="undefined"!=typeof tt&&"function"==typeof tt.getSystemInfoSync&&Boolean(tt.getSystemInfoSync().fontSizeSetting),d="undefined"!=typeof swan&&"function"==typeof swan.getSystemInfoSync&&Boolean(swan.getSystemInfoSync().fontSizeSetting),I="undefined"!=typeof my&&"function"==typeof my.getSystemInfoSync&&Boolean(my.getSystemInfoSync().fontSizeSetting),v="undefined"!=typeof jd&&"function"==typeof jd.getSystemInfoSync,f="undefined"!=typeof uni&&"undefined"==typeof window&&"function"==typeof uni.requireNativePlugin,p=u&&"object"==typeof wx.miniapp,D=u||m||_||d||I||f||v,w="undefined"==typeof window&&!D&&"undefined"!=typeof __webpack_require__.g&&void 0!==__webpack_require__.g.NativeScriptGlobals,y="undefined"!=typeof __webpack_require__.g&&(void 0!==__webpack_require__.g.nativeModuleProxy||void 0!==__webpack_require__.g.ReactNative),S="undefined"!=typeof uni?!D:"undefined"!=typeof window&&!D&&!y,M=(m?qq:_?tt:d?swan:I?my:u?wx:f?uni:v&&jd,S&&window&&window.navigator&&window.navigator.userAgent||""),C=/(micromessenger|webbrowser)/i.test(M),T=function(){let t="WEB";return C?t="WEB":m?t="QQ_MP":_?t="TT_MP":d?t="BAIDU_MP":I?t="ALI_MP":u?t=p?"DONUT_NATIVE_APP":"WX_MP":f?t="UNI_NATIVE_APP":w?t="NS_NATIVE_APP":y&&(t="RN_NATIVE_APP"),g[t]}(),E=(!function(){var t=M.match(/OS (\d+)_/i);t&&t[1]&&t[1]}(),function(){var t,e,i=M.match(/Android (\d+)(?:\.(\d+))?(?:\.(\d+))*/i);i&&(t=i[1]&&parseFloat(i[1]),e=i[2]&&parseFloat(i[2]),t)&&e&&parseFloat(i[1]+"."+i[2])}(),/MSIE/.test(M)||-1<M.indexOf("Trident")&&-1<M.indexOf("rv:11.0")),A,L,P=(!function(){var t=/MSIE\s(\d+)\.\d/.exec(M),t=t&&parseFloat(t[1]);!t&&/Trident\/7.0/i.test(M)&&/rv:11.0/.test(M)}(),A="undefined"!=typeof console?console:"undefined"!=typeof __webpack_require__.g&&__webpack_require__.g.console?__webpack_require__.g.console:"undefined"!=typeof window&&window.console?window.console:{},function(){}),U=["assert","clear","count","debug","dir","dirxml","error","group","groupCollapsed","groupEnd","info","log","profile","profileEnd","table","time","timeEnd","timeStamp","trace","warn"],N=U.length;for(;N--;)L=U[N],console[L]||(A[L]=P);var O=A;let $="TIMCustomElem",R="High",H="C2C",F="GROUP",B=function(){return(new Date).getTime()+0},b=function(){var t=new Date;return t.setTime(B()),t},x=function(){return Math.floor(B()/1e3)},q=Object.prototype.hasOwnProperty;function G(t){if(null==t)return!0;if("boolean"==typeof t)return!1;if("number"==typeof t)return 0===t;if("string"==typeof t)return 0===t.length;if("function"==typeof t)return 0===t.length;if(Array.isArray(t))return 0===t.length;if(t instanceof Error)return""===t.message;if(k(t)){for(var e in t)if(q.call(t,e))return!1;return!0}return!!(j(t)||V(t)||K(t))&&0===t.size}let j=function(t){return"map"===Y(t)},V=function(t){return"set"===Y(t)},K=function(t){return"file"===Y(t)},k=function(t){if("object"!=typeof t||null===t)return!1;t=Object.getPrototypeOf(t);if(null===t)return!0;let e=t;for(;null!==Object.getPrototypeOf(e);)e=Object.getPrototypeOf(e);return t===e},W=function(t){return void 0===t},J=function(t){return e=t,("function"==typeof Array.isArray?Array.isArray(e):"array"===Y(e))||null!==t&&"object"==typeof t;// removed by dead control flow
12
- { var e; }},Y=function(t){return Object.prototype.toString.call(t).match(/^\[object (.*)\]$/)[1].toLowerCase()};function z(){return!E&&!D}Date.now||(Date.now=function(){return(new Date).getTime()});let X=0;function Q(){return z()?"%c Chat %c":"Chat"}function Z(){var t=b();return t.toLocaleTimeString("en-US",{hour12:!1})+"."+function(t){let e;switch(t.toString().length){case 1:e="00"+t;break;case 2:e="0"+t;break;default:e=t}return e}(t.getMilliseconds())}let et={arguments2String(i){let n="";if(1===i.length)n=i[0];else for(let t=0,e=i.length;t<e;t++){if(J(i[t]))try{n+=i[t]instanceof Error?JSON.stringify(i[t],["message","code"]):JSON.stringify(i[t])}catch(t){n+=t?t.message:"";break}else n+=i[t];n+=" "}return n},_exec(t,e){z()?O[t](Q(),"background:#0abf5b; padding:1px; border-radius:3px; color: #fff","background:transparent",Z(),e):O[t](`${Q()} ${Z()} `+e)},d:function(){var t;X<=-1&&(t=this.arguments2String(arguments),this._exec("debug",t))},l:function(){var t;X<=0&&(t=this.arguments2String(arguments),this._exec("log",t))},log:function(){var t;X<=0&&(t=this.arguments2String(arguments),this._exec("log",t))},i:function(){var t;X<=1&&(t=this.arguments2String(arguments),this._exec("info",t))},w:function(){var t;X<=2&&(t=this.arguments2String(arguments),this._exec("warn",t))},e:function(){var t;X<=3&&(t=this.arguments2String(arguments),this._exec("error",t))},setLevel:function(t){t<4&&this._exec("log","set level from "+X+" to "+t),X=t},getLevel:function(){return X}};class it extends Error{constructor(t){super();var{code:t,message:e,data:i}=t;this.code=t,e?this.message=e:this._getErrMsg&&(this.message=this._getErrMsg(this.code)),this.data=i||{}}}let nt=2903,st=3122,ot=8010,at=8011,rt=8020,ct="error",gt=null,lt=function(t,e=!1){if(t instanceof it)return e&&null!==gt&&gt.emit(ct,t),Promise.reject(t);if(t instanceof Error){let t=new it({code:nt});return e&&null!==gt&&gt.emit(ct,t),Promise.reject(t)}return W(t)||W(t.code)?Promise.reject(new it({code:nt})):(t=new it(t),e&&null!==gt&&gt.emit(ct,t),Promise.reject(t))},ht="newInvitationReceived",ut="ts_invitee_accepted",mt="ts_invitee_rejected",_t="ts_invitation_cancelled",dt="ts_invitation_timeout",It="ts_invitation_modified",vt=1,ft=2,pt=3,Dt=4,wt=5;class yt{constructor(t){this._n="RemoteSignalingHandler",this._sigM=t}onNewMessageList(t){t.forEach(t=>{var e=this.getPayloadData(t);e&&this._handleActionType(e,t)})}onMessageModified(t){t.forEach(t=>{var e=this.getPayloadData(t);e&&this._onInvitationModified(e,t)})}getPayloadData(e){var i=this._n+".getPayloadData",e=e.payload["data"];try{return JSON.parse(e)}catch(t){return et.e(i+" JSON parse error. signalingData:"+e),null}}_handleActionType(t,e){var i=t["actionType"];switch(i){case vt:this._onNewInvitationReceived(t,e);break;case Dt:this._onInviteeRejected(t);break;case pt:this._onInviteeAccepted(t);break;case ft:this._onInvitationCancelled(t);break;case wt:this._onInvitationTimeout(t)}}_genBaseEmitData(t){var{inviteID:t,inviter:e,groupID:i,data:n}=t;return{inviteID:t,inviter:e,groupID:i,data:n||""}}_onNewInvitationReceived(e,i){let t=this._n+"._onNewInvitationReceived",{inviteID:n,inviteeList:s,groupID:o,inviter:a}=e,r=this._sigM.getMyUserID(),l=s.includes(r),g=e.timeout;var c=(b().getTime()-1e3*i.time)/1e3,h=(0<g&&0<c&&g>c&&(g-=c),t+` myselfIncluded:${l} groupID:${o} signalObj:`+JSON.stringify(e));if(et.l(h+` timeout:${g}s delta:${c}s`),o&&l||!o){let t=this._sigM.getInviteInfo(n);t&&t===e||(t||this._sigM.setInviteInfo(n,{...e,message:i}),this._sigM.emitEvent(ht,{...this._genBaseEmitData(e),inviteeList:s}),a!==r&&this._sigM.startTimer({...e,timeout:g}))}}_onInviteeRejected(t){var e=this._n+"._onInviteeRejected",{inviteID:i,inviter:n,groupID:s}=t,o=this._sigM.hasInviteInfo(i);et.l(e+` inviteID:${i} hasInviteID:${o} inviter:${n} groupID:`+s),o&&(this._sigM.updateInviteInfo(t),this._sigM.emitEvent(mt,{...this._genBaseEmitData(t),invitee:t.inviteeList[0]}))}_onInviteeAccepted(t){var e=this._n+"._onInviteeAccepted",{inviteID:i,inviter:n,groupID:s}=t,o=this._sigM.hasInviteInfo(i);et.l(e+` inviteID:${i} hasInviteID:${o} inviter:${n} groupID:`+s),o&&(this._sigM.updateInviteInfo(t),this._sigM.emitEvent(ut,{...this._genBaseEmitData(t),invitee:t.inviteeList[0]}))}_onInvitationCancelled(t){var e=this._n+"._onInvitationCancelled",{inviteID:i,inviter:n,groupID:s}=t,o=this._sigM.hasInviteInfo(i);et.l(e+` inviteID:${i} hasInviteID:${o} inviter:${n} groupID:`+s),o&&(this._sigM.deleteInviteInfo(i),this._sigM.emitEvent(_t,this._genBaseEmitData(t)))}_onInvitationTimeout(t){var e=this._n+"._onInvitationTimeout",{inviteID:i,inviter:n,groupID:s,inviteeList:o}=t,a=this._sigM.hasInviteInfo(i);et.l(e+` inviteID:${i} hasInviteID:${a} inviter:${n} groupID:${s} data:`+t.data),a&&(this._sigM.updateInviteInfo(t),this._sigM.emitEvent(dt,{...this._genBaseEmitData(t),inviteeList:o,isSelfTimeout:!1}))}_onInvitationModified(t,e){var i=this._n+"._onInvitationModified",{inviteID:n,data:s}=t,o=this._sigM.hasInviteInfo(n);et.l(i+` inviteID:${n} hasInviteID:${o} data:`+s),o&&(this._sigM.setInviteInfo(n,{...t,message:e}),this._sigM.emitEvent(It,{inviteID:n,data:s}))}}let St=function(t){var e;return t<0||53<t?NaN:(e=0|1073741824*Math.random(),30<t?e+1073741824*(0|Math.random()*(1<<t-30)):e>>>30-t)},Mt=function(t,e){let i=t.toString(16),n=e-i.length,s="0";for(;0<n;n>>>=1,s+=s)1&n&&(i=s+i);return i};class Ct{constructor(t){this._n="LocalSignalingHandler",this._sigM=t}generateInviteID(){t=St;var t,e=(e=Mt)(t(32),8)+"-"+e(t(16),4)+"-"+e(16384|t(12),4)+"-"+e(32768|t(14),4)+"-"+e(t(48),12);return et.l(this._n+".generateInviteID inviteID:"+e),e}createInviteInfo(t){var e=this.generateInviteID(),t=this.createInviteCustomData({...t,inviteID:e}),{groupID:i,inviteeList:n}=t,i=i||n[0];return{customData:t,message:this._sigM.createSignaling(t,i),inviteID:e}}_genBaseCustomData(t){var{data:t="",inviteID:e="",groupID:i=""}=t;return{businessID:1,timeout:0,data:t,inviteID:e,groupID:i}}createInviteCustomData(t){var{userID:e,timeout:i=0,groupID:n=""}=t,s=this._sigM.getMyUserID(),s={...this._genBaseCustomData(t),actionType:vt,inviter:s,inviteeList:n?t.inviteeList:[e],timeout:i};return et.l(this._n+".createInviteCustomData customData:",s),s}createCancelCustomData(t){var e=this._n+".createCancelCustomData",i=t["inviteID"];let n;var s=this._sigM.getMyUserID(),{inviteeList:i,groupID:o,inviter:a}=this._sigM.getInviteInfo(i);return a===s?n={...this._genBaseCustomData(t),actionType:ft,groupID:o,inviter:s,inviteeList:i}:et.e(e+` unmatched inviter:${a} and my userID:`+s),et.l(e+" customData:",n),n}createAcceptCustomData(t){var e=this._n+".createAcceptCustomData",i=t["inviteID"];let n;var s=this._sigM.getMyUserID(),{inviter:o,groupID:a,inviteeList:r}=this._sigM.getInviteInfo(i);return r.includes(s)?n={...this._genBaseCustomData(t),actionType:pt,groupID:a,inviter:o,inviteeList:[s]}:et.e(e+` userID:${s} not in inviteeList. inviteID:${i} groupID:`+a),et.l(e+" customData:",n),n}createRejectCustomData(t){var e=this._n+".createRejectCustomData",i=t["inviteID"];let n;var s=this._sigM.getMyUserID(),{inviter:o,groupID:a,inviteeList:r}=this._sigM.getInviteInfo(i);return r.includes(s)?n={...this._genBaseCustomData(t),actionType:Dt,groupID:a,inviter:o,inviteeList:[s]}:et.e(e+` userID:${s} not in inviteeList. inviteID:${i} groupID:`+a),et.l(e+" customData:",n),n}createTimeoutCustomData(t){var e=this._n+".createTimeoutCustomData",{inviteeList:i,inviter:n,isInviter:s=!1}=t,o=this._sigM.getMyUserID(),t={...this._genBaseCustomData(t),actionType:wt,inviter:n,inviteeList:s?i:[o]};return et.l(e+" customData:",t),t}}class Tt{constructor(t){this._n="HistorySignalingHandler",this._sigM=t,this.COUNT=20,this.EXPIRED_TIME=300,this._map=new Map,this._relatedToMeMap=new Map}setCloudConfig(t=20,e=300){this.COUNT=t,this.EXPIRED_TIME=e,et.l(this._n+`.setCloudConfig count:${t}, time:`+e)}getHistorySignaling(){var t=this._sigM.get(i).getLocalConvList();G(t)||(this._getC2CSignalingList(),t=this._getValidGroupConvList(t),this._getGroupSignalingList(t).then(t=>{this._handleSignalingList(t)}))}_getC2CSignalingList(){var t=this._sigM.get(e).getMessageListFromUnreadDB(),t=this._sigM.filterMessageList(t);this._getRelatedToMeMap(t)}_getGroupSignalingList(t){t=this._createPromiseList(t);return 0===t.length?Promise.resolve(this._sortSignaling(this._relatedToMeMap)):this._concurrentGetMessageList(t).then(t=>{let e=new Map;return t.forEach(t=>{t=t.list,t=this._getRelatedToMeMap(t);e=new Map([...e,...t])}),this._sortSignaling(e)})}_handleSignalingList(t){G(t)||this._sigM.onNewMessageList(t)}_getValidGroupConvList(i){var n=[];for(let t=0,e=i.length;t<e;t++){var{type:s,unreadCount:o,lastMessage:a}=i[t],s=s===F,a=this._isNotExpired(a);s&&o&&a&&n.push(i[t])}return n}_isNotExpired(t){return!(!t||!t.lastTime)&&t.lastTime>x()-this.EXPIRED_TIME}_createPromiseList(e){var n=[];for(let t=0;t<e.length;t++){var{conversationID:s,unreadCount:o}=e[t],o=o<this.COUNT?o:this.COUNT,o=(this._map.set(s,{msgCount:o,list:[]}),this._sigM.get(i).getMessageList({conversationID:s}));n.push(o)}return n}_concurrentGetMessageList(t){let s=[];return Promise.all(t).then(e=>{for(let t=0;t<e.length;t++){var{code:i,data:n}=e[t];0===i&&0!==n.messageList.length&&(this._handleMessageList(n.messageList),i=this._relayGetMessageList(n))&&s.push(i)}return 0<s.length?this._concurrentGetMessageList(s):this._map})}_relayGetMessageList(t){var e,{messageList:t,nextReqMessageID:n,isCompleted:s}=t;return 0===t.length||(t=t[0].conversationID,e=this._map.get(t).msgCount,0===e)||s?null:this._sigM.get(i).getMessageList({conversationID:t,nextReqMessageID:n,count:e})}_handleMessageList(t){var e=t.length,i=t[0]["conversationID"],{msgCount:n,list:s}=this._map.get(i);this._map.set(i,{msgCount:0<n-e?n-e:0,list:s.concat(this._sigM.filterMessageList(t))})}_getRelatedToMeMap(e){for(let t=0;t<e.length;t++){var i=e[t];this._saveRelatedToMe(i)}return this._relatedToMeMap}_saveRelatedToMe(t){var{actionType:e="",inviteID:i=""}=this._sigM.getPayloadData(t)||{};switch(e){case vt:this._setHistoryInvite(t);break;case Dt:case pt:this._updateHistoryInvite(t);break;case ft:this._delHistoryInvite(i);break;case wt:this._updateHistoryInvite(t)}}_setHistoryInvite(t){var e=this._sigM.getPayloadData(t)||{},{inviteID:i="",inviteeList:n=[],timeout:s=0}=e,o=this._sigM.getMyUserID();n.includes(o)&&(n=x()-t.time,0<s&&s<n&&0!==s||this._relatedToMeMap.set(i,{...e,messageList:[t]}))}_delHistoryInvite(t){this._relatedToMeMap.has(t)&&this._relatedToMeMap.delete(t)}_updateHistoryInvite(e){let t=this._sigM.getPayloadData(e)||{},{inviteID:n="",inviteeList:s=[]}=t;if(this._relatedToMeMap.has(n)){let{inviteeList:i,messageList:t}=this._relatedToMeMap.get(n);for(let e=0;e<s.length;e++){let t=s[e];i.includes(t)&&i.splice(i.indexOf(t),1)}0===i.length?this._delHistoryInvite(n):t.push(e)}else this._delHistoryInvite(n)}_sortSignaling(t){let e=[];return t.forEach(t=>{e=[...e,...t.messageList]}),e.sort((t,e)=>t.time-e.time)}reset(){this._map.clear(),this._relatedToMeMap.clear()}}class Et{constructor(t,e){this.businessID=t.businessID||1,this.inviteID=t.inviteID,this.groupID=t.groupID||"",this.inviter=t.inviter||"",this.inviteeList=t.inviteeList||[],this.data=t.data||"",this.actionType=t.actionType||vt,this.timeout=t.timeout||0}}let At={A2KEY_AND_TINYID_UPDATED:"_inner1",CLOUD_CONFIG:"_inner2",PROFILE_UPDATED:"_inner3",CONV_SYNC_COMPLETED:"_inner4",C2C_UNREAD_HANDLE_COMPLETED:"_inner5"};class Lt extends class{constructor(t){this._m=t,this._n=""}isLoggedIn(){return this._m.get(n).isLoggedIn()}isOversea(){return this._m.get(n).isOversea()}isPrivateNetWork(){var t=this._m.get(n);return t.isPrivateNetWork()&&!t.getFileDownloadProxy()}getFileDownloadProxy(){return this._m.get(n).getFileDownloadProxy()}getDownloadFileAuthKey(){return this._m.get(n).getDownloadFileAuthKey()}getMyUserID(){return this._m.get(n).getUserID()}getMyTinyID(){return this._m.get(n).getTinyID()}getSDKAppID(){return this._m.get(n).getSDKAppID()}isIntl(){return this._m.get(n).isIntl()}isUsingChatCore(){return this._m.get(n).isUsingChatCore()}isDevMode(){return this._m.get(n).isDevMode()}get(t){return this._m.get(t)}getPlatform(){return T}getCloudConfig(t){return this._m.get(o).getCloudConfig(t)}emitOEvt(t,e){this._m.getOEmitInst().emit(t,e)}emitIEvt(t,e){this._m.getIEmitInst().emit(t,e)}getIEmitInst(){return this._m.getIEmitInst()}req(t){return this._m.get(s).req(t)}canIUse(t){return this._m.get(a).canIUse(t)}getErrMsg(t,e,i){return this._m.getErrMsg(t,e,i)}warn(t,e,i){t=this.getErrMsg(t,e,i);t&&et.w(t)}noUse(t){var e=st;return lt({code:e,message:this.getErrMsg(e,t)})}}{constructor(t){super(t),this._n="SignalingModule",this._inviteInfoMap=new Map,this._canIUseSignaling=!1,this._isHandling=!1,this._remoteSignalingHandler=new yt(this),this._localSignalingHandler=new Ct(this),this._historySignalingHandler=new Tt(this),this._isC2CUnreadHandleCompleted=!1,this._isConvSyncCompleted=!1,this._isSyncCompleted=!1,this._isCloudConfigCompleted=!1;t=this.getIEmitInst();t.on(At.C2C_UNREAD_HANDLE_COMPLETED,this.onC2CUnreadHandleCompleted,this),t.on(At.CONV_SYNC_COMPLETED,this.onConvSyncCompleted,this),t.on(At.CLOUD_CONFIG,this.onCloudConfig,this)}onC2CUnreadHandleCompleted(){this._isC2CUnreadHandleCompleted=!0,this._isCloudConfigCompleted&&this._isConvSyncCompleted&&!this._isSyncCompleted&&this.onReady()}onConvSyncCompleted(){this._isConvSyncCompleted=!0,this._isC2CUnreadHandleCompleted&&this._isCloudConfigCompleted&&!this._isSyncCompleted&&this.onReady()}onCloudConfig(){this._isCloudConfigCompleted=!0;let t=this.getCloudConfig("history_s_count"),e=this.getCloudConfig("history_s_time");W(t)||(t=Number(t)),W(e)||(e=Number(e)),this._historySignalingHandler.setCloudConfig(t,e),this._isC2CUnreadHandleCompleted&&this._isConvSyncCompleted&&!this._isSyncCompleted&&this.onReady()}_isListenerExisted(){return-1<this._m.getOEmitInst().eventNames().indexOf(ht)}onReady(){this._isSyncCompleted=!0;var t=this._isListenerExisted();et.l(this._n+".onReady. isListenerExisted: "+t),t&&this._historySignalingHandler.getHistorySignaling()}onNewMessageList(t){t=this.filterMessageList(t);if(0<t.length)return this._remoteSignalingHandler.onNewMessageList(t)}onMessageModified(t){t=this.filterMessageList(t);if(0<t.length)return this._remoteSignalingHandler.onMessageModified(t)}hasInviteInfo(t){return this._inviteInfoMap.has(t)}getInviteInfo(t){return this._inviteInfoMap.get(t)}setInviteInfo(t,e){let{message:i,...n}=e;et.l(this._n+`.setInviteInfo inviteID:${t} data:`,n),this._inviteInfoMap.set(t,{...n,message:i})}deleteInviteInfo(t){this.hasInviteInfo(t)&&(et.l(this._n+`.deleteInviteInfo inviteID:${t}.`),this._inviteInfoMap.delete(t))}updateInviteInfo(t){let i=this._n+".updateInviteInfo",{inviteID:n,inviter:e,inviteeList:s,groupID:o}=t;if(et.l(i+` inviteID:${n} inviter:${e} groupID:`+o),o&&this.hasInviteInfo(n)){let t=s[0],e=this.getInviteInfo(n)["inviteeList"];e.includes(t)&&(e.splice(e.indexOf(t),1),et.l(i+` remove ${t}. localInviteeList.length:`+e.length)),0===e.length&&this.deleteInviteInfo(n)}else this.deleteInviteInfo(n)}canIUseSignaling(){return this._canIUseSignaling}emitEvent(t,e){this.emitOEvt(t,e)}addSignalingListener(t,e,i){this._canIUseSignaling||(this._canIUseSignaling=!0),this._m.getOEmitInst().on(t,e,i)}removeSignalingListener(t,e,i){this._m.getOEmitInst().off(t,e,i),this._isListenerExisted()||(this._canIUseSignaling=!1)}invite(t){let e=this._n+".invite",{message:i,customData:n,inviteID:s}=this._localSignalingHandler.createInviteInfo(t);return et.l(e+` options:${JSON.stringify(t)} inviteID:`+s),this.sendSignaling(i,t).then(t=>t&&0===t.code?(this.setInviteInfo(s,{...n,message:i}),this.startTimer({...n,inviteID:s}),{...t,inviteID:s}):t).catch(t=>lt(t))}inviteSync(t,e,i){let n=this._n+".inviteSync",{message:s,customData:o,inviteID:a}=this._localSignalingHandler.createInviteInfo(t);return et.l(n+` options:${JSON.stringify(t)} inviteID:`+a),this.sendSignaling(s,t).then(t=>{if(t&&0===t.code)return this.setInviteInfo(a,{...o,message:s}),this.startTimer({...o,inviteID:a}),e&&e({inviteID:a}),{inviteID:a};i&&i(0===t.code,t.message||"")}).catch(t=>(i&&i(t.code,t.message),lt(t))),a}_handleImResponse(t,e,i){e&&0===e.code&&(this._isHandling=!1,i?this.deleteInviteInfo(t.inviteID):this.updateInviteInfo(t))}cancel(e){var t,i=this._n+".cancel";if(et.l(i+" options:"+JSON.stringify(e)),!this.hasInviteInfo(e.inviteID)||this._isHandling)return lt({code:rt});this._isHandling=!0;let n=this._localSignalingHandler.createCancelCustomData(e);return n?({groupID:i,inviteeList:t}=n,i=i||t[0],t=this.createSignaling(n,i),this.sendSignaling(t,e).then(t=>(this._handleImResponse(n,t,!0),0===t.code?{...t,inviteID:e.inviteID}:t)).catch(t=>lt(t))):(this._isHandling=!1,lt({code:at}))}accept(e){var t=this._n+".accept";if(et.l(t+" options:"+JSON.stringify(e)),!this.hasInviteInfo(e.inviteID)||this._isHandling)return lt({code:ot});this._isHandling=!0;let i=this._localSignalingHandler.createAcceptCustomData(e);return i?(t=this.createSignaling(i),this.sendSignaling(t,e).then(t=>(this._handleImResponse(i,t),0===t.code?{...t,inviteID:e.inviteID}:t)).catch(t=>lt(t))):(this._isHandling=!1,lt({code:at}))}reject(e){var t=this._n+".reject";if(et.l(t+" options:"+JSON.stringify(e)),!this.hasInviteInfo(e.inviteID)||this._isHandling)return lt({code:ot});this._isHandling=!0;let i=this._localSignalingHandler.createRejectCustomData(e);return i?(t=this.createSignaling(i),this.sendSignaling(t,e).then(t=>(this._handleImResponse(i,t,!0),0===t.code?{...t,inviteID:e.inviteID}:t)).catch(t=>lt(t))):(this._isHandling=!1,lt({code:at}))}getSignalingInfo(e){let t=this._n+".getSignalingInfo",{ID:i,from:n,to:s}=e,o=this._filterSignaling(e),a=null;if(o){let t=this.getPayloadData(e);a=new Et(t)}e=o?"actionType:"+a.actionType:"";return et.l(t+` messageID:${i} from:${n} to:${s} ${e} isSignaling:`+o),a}modifyInvitation(e){let{inviteID:i,data:n}=e;if(!this.hasInviteInfo(i))return lt({code:ot});let{message:s,...o}=this.getInviteInfo(i),a=s.payload.data;return o.data=n,s.payload.data=JSON.stringify(o),this.get(t).modifyRemoteMessage(s).then(t=>(this.hasInviteInfo(i)&&this.setInviteInfo(i,{...o,message:s}),t)).catch(t=>(s.payload.data=a,lt(t)))}_genMsgCtrlInfo(t={}){var{data:e="",onlineUserOnly:t,inviteID:i="",offlinePushInfo:n,actionType:s}=t;let o={_onlineOnlyFlag:!1};i={onlineUserOnly:(o=i&&this.getInviteInfo(i)?this.getInviteInfo(i).message:o)._onlineOnlyFlag||t||!1,offlinePushInfo:n,messageControlInfo:{excludedFromContentModeration:!0,excludedFromUnreadCount:!1,excludedFromLastMessage:!1}};if(s===wt){let t=!!e.match(/excludeTimeoutSignalingFromHistoryMessage/);i.messageControlInfo.excludedFromUnreadCount=t,i.messageControlInfo.excludedFromLastMessage=t}else{t=!!e.match(/excludeFromHistoryMessage/),n=!!e.match(/excludeOriginalSignalingFromHistoryMessage/);i.messageControlInfo.excludedFromUnreadCount=t||n,i.messageControlInfo.excludedFromLastMessage=t||n}return i}sendSignaling(e,i){return this.get(t).sendMessageInstance(e,this._genMsgCtrlInfo(i)).catch(t=>(this._isHandling=!1,lt(t)))}filterMessageList(t){return t.filter(t=>this._filterSignaling(t))}getPayloadData(t){return this._remoteSignalingHandler.getPayloadData(t)}createSignaling(e,i){var{groupID:n,inviter:s}=e,i={to:i||n||s,conversationType:n?F:H,priority:R,payload:{data:JSON.stringify(e)}},s=this.get(t).createCustomMessage(i);return et.l(this._n+".createSignaling. message:",s),s}_filterSignaling(t){let e=!1;var i,n;return t.type&&t.type===$&&({cloudCustomData:t="",payload:{data:n=""}}=t,t=t.match(/"type":"tsignaling"/),i=n.match(/inviteID/),n=n.match(/actionType/),e=t||i&&n),!!e}startTimer(s){let o=this._n+".startTimer",{timeout:t,inviteID:a,inviter:e,groupID:i}=s,r=e===this.getMyUserID();if(et.l(o+` timeout:${t} isInviter:${r} groupID:`+i),!(t<=0)){let e=r?t+5:t,i=1,n=setInterval(()=>{var t=this._hasLocalInviteInfo(s,r);i<e&&t?++i:(t&&this._sendTimeoutNotice(a,r),et.l(o+" end."),clearInterval(n))},1e3)}}_hasLocalInviteInfo(t,e){var i,n,{inviteID:t,groupID:s}=t;return!!this.hasInviteInfo(t)&&(i=this._n+"._hasLocalInviteInfo",n=this.getInviteInfo(t)["inviteeList"],et.l(i+` inviteID:${t} inviteeList:${n} groupID:`+s),!s||(e?0<n.length:0<n.length&&n.includes(this.getMyUserID())))}_getReceiver(t,e){var{groupID:e,inviteeList:i,inviter:n}=e;return t?e||i[0]:e||n}_sendTimeoutNotice(s,o){var t=this.getInviteInfo(s),e=this._getReceiver(o,t);et.l(this._n+`._sendTimeoutNotice inviteID:${s} to:${e} isInviter:`+o);let a=this._localSignalingHandler.createTimeoutCustomData({...t,isInviter:o}),r=this.createSignaling(a,e);return this.sendSignaling(r,a).then(t=>{if(t&&0===t.code){let{data:t,groupID:e,inviteeList:i,inviter:n}=a;this.emitEvent(dt,{data:t,groupID:e,inviteID:s,inviteeList:i,inviter:n,isSelfTimeout:!0,message:r}),o?this.deleteInviteInfo(s):this.updateInviteInfo(a)}})}reset(){et.l(this._n+".reset"),this._inviteInfoMap.clear(),this._canIUseSignaling=!1,this._isHandling=!1,this._historySignalingHandler.reset(),this._isC2CUnreadHandleCompleted=!1,this._isConvSyncCompleted=!1,this._isSyncCompleted=!1,this._isCloudConfigCompleted=!1}}
13
-
14
- /***/ })
15
-
16
- }]);
17
- //# sourceMappingURL=index.common.995.js.map