@tencentcloud/ai-desk-customer-wechat
Version:
AI Desk customer UIKit for wechat mini program
4 lines • 544 kB
JavaScript
"use strict";const $=require("../../../common/vendor.js");function wi(p,a){var o={};for(var c in p)Object.prototype.hasOwnProperty.call(p,c)&&a.indexOf(c)<0&&(o[c]=p[c]);if(p!=null&&typeof Object.getOwnPropertySymbols=="function"){var d=0;for(c=Object.getOwnPropertySymbols(p);d<c.length;d++)a.indexOf(c[d])<0&&Object.prototype.propertyIsEnumerable.call(p,c[d])&&(o[c[d]]=p[c[d]])}return o}function Vs(p,a,o,c){return new(o||(o=Promise))(function(d,g){function y(S){try{C(c.next(S))}catch(O){g(O)}}function T(S){try{C(c.throw(S))}catch(O){g(O)}}function C(S){var O;S.done?d(S.value):(O=S.value,O instanceof o?O:new o(function(G){G(O)})).then(y,T)}C((c=c.apply(p,a||[])).next())})}var Vt=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Dc(p){return p&&p.__esModule&&Object.prototype.hasOwnProperty.call(p,"default")?p.default:p}var qt;exports.a=void 0;var qs,at,Qa,Yn,Kt,Wn,jt,Gs=Dc(function(){function p(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,s=Array(t);n<t;n++)s[n]=e[n];return s}function a(e){if(Array.isArray(e))return e}function o(e,t,n){t=C(t);var s=e;if(!(t=O()?Reflect.construct(t,n||[],C(e).constructor):t.apply(e,n))||typeof t!="object"&&typeof t!="function"){if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");if((t=s)===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return t}function c(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function d(e,t){for(var n=0;n<t.length;n++){var s=t[n];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(e,Ae(s.key),s)}}function g(e,t,n){return t&&d(e.prototype,t),n&&d(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function y(e,t){var n,s,i,r,u=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(u)return i=!(s=!0),{s:function(){u=u.call(e)},n:function(){var l=u.next();return s=l.done,l},e:function(l){i=!0,n=l},f:function(){try{s||u.return==null||u.return()}finally{if(i)throw n}}};if(Array.isArray(e)||(u=ae(e))||t&&e&&typeof e.length=="number")return u&&(e=u),r=0,{s:t=function(){},n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(l){throw l},f:t};throw new TypeError(`Invalid attempt to iterate non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function T(e,t,n){return(t=Ae(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function C(e){return(C=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(e)}function S(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&N(e,t)}function O(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(O=function(){return!!e})()}function G(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function R(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function w(e,t){var n,s=Object.keys(e);return Object.getOwnPropertySymbols&&(n=Object.getOwnPropertySymbols(e),t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),s.push.apply(s,n)),s}function I(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?w(Object(n),!0).forEach(function(s){T(e,s,n[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):w(Object(n)).forEach(function(s){Object.defineProperty(e,s,Object.getOwnPropertyDescriptor(n,s))})}return e}function j(e,t){if(e==null)return{};var n,s=((u,l)=>{if(u==null)return{};var h,_={};for(h in u)if({}.hasOwnProperty.call(u,h)){if(l.indexOf(h)!==-1)continue;_[h]=u[h]}return _})(e,t);if(Object.getOwnPropertySymbols)for(var i=Object.getOwnPropertySymbols(e),r=0;r<i.length;r++)n=i[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(s[n]=e[n]);return s}function N(e,t){return(N=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,s){return n.__proto__=s,n})(e,t)}function X(e,t){return a(e)||((n,s)=>{var i=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(i!=null){var r,u,l,h,_=[],f=!0,M=!1;try{if(l=(i=i.call(n)).next,s===0){if(Object(i)!==i)return;f=!1}else for(;!(f=(r=l.call(i)).done)&&(_.push(r.value),_.length!==s);f=!0);}catch(k){M=!0,u=k}finally{try{if(!f&&i.return!=null&&(h=i.return(),Object(h)!==h))return}finally{if(M)throw u}}return _}})(e,t)||ae(e,t)||R()}function F(e){return(t=>{if(Array.isArray(t))return p(t)})(e)||G(e)||ae(e)||(()=>{throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}function Ae(e){return e=(t=>{if(typeof t!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n===void 0)return String(t);if(typeof(n=n.call(t,"string"))!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")})(e),typeof e=="symbol"?e:e+""}function Ce(e){return(Ce=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(e)}function ae(e,t){var n;if(e)return typeof e=="string"?p(e,t):(n=(n={}.toString.call(e).slice(8,-1))==="Object"&&e.constructor?e.constructor.name:n)==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?p(e,t):void 0}function Ge(e){var t=typeof Map=="function"?new Map:void 0;return function(n){if(n===null||!(i=>{try{return Function.toString.call(i).indexOf("[native code]")!==-1}catch{return typeof i=="function"}})(n))return n;if(typeof n!="function")throw new TypeError("Super expression must either be null or a function");if(t!==void 0){if(t.has(n))return t.get(n);t.set(n,s)}function s(){return function(i,r,u){var l;return O()?Reflect.construct.apply(null,arguments):((l=[null]).push.apply(l,r),r=new(i.bind.apply(i,l)),u&&N(r,u.prototype),r)}(n,arguments,C(this).constructor)}return s.prototype=Object.create(n.prototype,{constructor:{value:s,enumerable:!1,writable:!0,configurable:!0}}),N(s,n)}(e)}var rt="3.5.9-1028",Q={SDK_READY:"sdkStateReady",SDK_NOT_READY:"sdkStateNotReady",SDK_DESTROY:"sdkDestroy",MESSAGE_RECEIVED:"onMessageReceived",ROOM_CUSTOM_DATA_RECEIVED:"onRoomCustomDataReceived",MESSAGE_MODIFIED:"onMessageModified",MESSAGE_REVOKED:"onMessageRevoked",MESSAGE_READ_BY_PEER:"onMessageReadByPeer",MESSAGE_READ_RECEIPT_RECEIVED:"onMessageReadReceiptReceived",MESSAGE_EXTENSIONS_UPDATED:"onMessageExtensionsUpdated",MESSAGE_EXTENSIONS_DELETED:"onMessageExtensionsDeleted",MESSAGE_REACTIONS_UPDATED:"onMessageReactionsUpdated",CONVERSATION_LIST_UPDATED:"onConversationListUpdated",TOTAL_UNREAD_MESSAGE_COUNT_UPDATED:"onTotalUnreadMessageCountUpdated",CONVERSATION_GROUP_LIST_UPDATED:"onConversationGroupListUpdated",CONVERSATION_IN_GROUP_UPDATED:"onConversationInGroupUpdated",GROUP_LIST_UPDATED:"onGroupListUpdated",GROUP_ATTRIBUTES_UPDATED:"groupAttributesUpdated",GROUP_COUNTER_UPDATED:"onGroupCounterUpdated",TOPIC_CREATED:"onTopicCreated",TOPIC_DELETED:"onTopicDeleted",TOPIC_UPDATED:"onTopicUpdated",PROFILE_UPDATED:"onProfileUpdated",USER_STATUS_UPDATED:"onUserStatusUpdated",BLACKLIST_UPDATED:"blacklistUpdated",FRIEND_LIST_UPDATED:"onFriendListUpdated",FRIEND_GROUP_LIST_UPDATED:"onFriendGroupListUpdated",FRIEND_APPLICATION_LIST_UPDATED:"onFriendApplicationListUpdated",MY_FOLLOWERS_LIST_UPDATED:"onMyFollowersListUpdated",MY_FOLLOWING_LIST_UPDATED:"onMyFollowingListUpdated",MUTUAL_FOLLOWERS_LIST_UPDATED:"onMutualFollowersListUpdated",KICKED_OUT:"kickedOut",ERROR:"error",NET_STATE_CHANGE:"netStateChange",ALL_RECEIVE_MESSAGE_OPT_UPDATED:"onAllReceiveMessageOptUpdated",SERVER_CONFIG_UPDATED:"onServerConfigUpdated",PINNED_GROUP_MESSAGE_UPDATED:"onPinnedGroupMessageUpdated"},v={MSG_TEXT:"TIMTextElem",MSG_IMAGE:"TIMImageElem",MSG_SOUND:"TIMSoundElem",MSG_AUDIO:"TIMSoundElem",MSG_FILE:"TIMFileElem",MSG_FACE:"TIMFaceElem",MSG_VIDEO:"TIMVideoFileElem",MSG_GEO:"TIMLocationElem",MSG_LOCATION:"TIMLocationElem",MSG_GRP_TIP:"TIMGroupTipElem",MSG_GRP_SYS_NOTICE:"TIMGroupSystemNoticeElem",MSG_CUSTOM:"TIMCustomElem",MSG_MERGER:"TIMRelayElem",MSG_PRIORITY_HIGH:"High",MSG_PRIORITY_NORMAL:"Normal",MSG_PRIORITY_LOW:"Low",MSG_PRIORITY_LOWEST:"Lowest",CONV_C2C:"C2C",CONV_GROUP:"GROUP",CONV_TOPIC:"TOPIC",CONV_SYSTEM:"@TIM#SYSTEM",CONV_AT_ME:1,CONV_AT_ALL:2,CONV_AT_ALL_AT_ME:3,CONV_MARK_TYPE_STAR:1,CONV_MARK_TYPE_UNREAD:2,CONV_MARK_TYPE_FOLD:4,CONV_MARK_TYPE_HIDE:8,GRP_PRIVATE:"Private",GRP_WORK:"Private",GRP_PUBLIC:"Public",GRP_CHATROOM:"ChatRoom",GRP_MEETING:"ChatRoom",GRP_AVCHATROOM:"AVChatRoom",GRP_COMMUNITY:"Community",GRP_ROOM:"Room",GRP_LIVE:"Live",GRP_MBR_ROLE_OWNER:"Owner",GRP_MBR_ROLE_ADMIN:"Admin",GRP_MBR_ROLE_MEMBER:"Member",GRP_MBR_ROLE_CUSTOM:"Custom",GRP_TIP_MBR_JOIN:1,GRP_TIP_MBR_QUIT:2,GRP_TIP_MBR_KICKED_OUT:3,GRP_TIP_MBR_SET_ADMIN:4,GRP_TIP_MBR_CANCELED_ADMIN:5,GRP_TIP_GRP_PROFILE_UPDATED:6,GRP_TIP_MBR_PROFILE_UPDATED:7,GRP_TIP_BAN_AVCHATROOM_MEMBER:10,GRP_TIP_UNBAN_AVCHATROOM_MEMBER:11,MSG_REMIND_ACPT_AND_NOTE:"AcceptAndNotify",MSG_REMIND_ACPT_NOT_NOTE:"AcceptNotNotify",MSG_REMIND_DISCARD:"Discard",RECEIVE_WITH_OFFLINE_PUSH_EXCEPT_AT:"AcceptNotNotifyExceptAt",NOT_RECEIVE_OFFLINE_PUSH_EXCEPT_AT:"AcceptNotNotifyExceptAt",NOT_RECEIVE_MSG_EXCEPT_AT:"NotReceiveMsgExceptAt",GENDER_UNKNOWN:"Gender_Type_Unknown",GENDER_FEMALE:"Gender_Type_Female",GENDER_MALE:"Gender_Type_Male",KICKED_OUT_MULT_ACCOUNT:"multipleAccount",KICKED_OUT_MULT_DEVICE:"multipleDevice",KICKED_OUT_USERSIG_EXPIRED:"userSigExpired",KICKED_OUT_REST_API:"REST_API_Kick",ALLOW_TYPE_ALLOW_ANY:"AllowType_Type_AllowAny",ALLOW_TYPE_NEED_CONFIRM:"AllowType_Type_NeedConfirm",ALLOW_TYPE_DENY_ANY:"AllowType_Type_DenyAny",FORBID_TYPE_NONE:"AdminForbid_Type_None",FORBID_TYPE_SEND_OUT:"AdminForbid_Type_SendOut",JOIN_OPTIONS_FREE_ACCESS:"FreeAccess",JOIN_OPTIONS_NEED_PERMISSION:"NeedPermission",JOIN_OPTIONS_DISABLE_APPLY:"DisableApply",JOIN_STATUS_SUCCESS:"JoinedSuccess",JOIN_STATUS_ALREADY_IN_GROUP:"AlreadyInGroup",JOIN_STATUS_WAIT_APPROVAL:"WaitAdminApproval",INVITE_OPTIONS_DISABLE_INVITE:"DisableInvite",INVITE_OPTIONS_NEED_PERMISSION:"NeedPermission",INVITE_OPTIONS_FREE_ACCESS:"FreeAccess",GRP_PROFILE_OWNER_ID:"ownerID",GRP_PROFILE_CREATE_TIME:"createTime",GRP_PROFILE_LAST_INFO_TIME:"lastInfoTime",GRP_PROFILE_MEMBER_NUM:"memberNum",GRP_PROFILE_MAX_MEMBER_NUM:"maxMemberNum",GRP_PROFILE_JOIN_OPTION:"joinOption",GRP_PROFILE_INVITE_OPTION:"inviteOption",GRP_PROFILE_INTRODUCTION:"introduction",GRP_PROFILE_NOTIFICATION:"notification",GRP_PROFILE_MUTE_ALL_MBRS:"muteAllMembers",SNS_ADD_TYPE_SINGLE:"Add_Type_Single",SNS_ADD_TYPE_BOTH:"Add_Type_Both",SNS_DELETE_TYPE_SINGLE:"Delete_Type_Single",SNS_DELETE_TYPE_BOTH:"Delete_Type_Both",SNS_APPLICATION_TYPE_BOTH:"Pendency_Type_Both",SNS_APPLICATION_SENT_TO_ME:"Pendency_Type_ComeIn",SNS_APPLICATION_SENT_BY_ME:"Pendency_Type_SendOut",SNS_APPLICATION_AGREE:"Response_Action_Agree",SNS_APPLICATION_AGREE_AND_ADD:"Response_Action_AgreeAndAdd",SNS_CHECK_TYPE_BOTH:"CheckResult_Type_Both",SNS_CHECK_TYPE_SINGLE:"CheckResult_Type_Single",SNS_TYPE_NO_RELATION:"CheckResult_Type_NoRelation",SNS_TYPE_A_WITH_B:"CheckResult_Type_AWithB",SNS_TYPE_B_WITH_A:"CheckResult_Type_BWithA",SNS_TYPE_BOTH_WAY:"CheckResult_Type_BothWay",NET_STATE_CONNECTED:"connected",NET_STATE_CONNECTING:"connecting",NET_STATE_DISCONNECTED:"disconnected",MSG_AT_ALL:"__kImSDK_MesssageAtALL__",READ_ALL_C2C_MSG:"readAllC2CMessage",READ_ALL_GROUP_MSG:"readAllGroupMessage",READ_ALL_MSG:"readAllMessage",USER_STATUS_UNKNOWN:0,USER_STATUS_ONLINE:1,USER_STATUS_OFFLINE:2,USER_STATUS_UNLOGINED:3,IOS_OFFLINE_PUSH_NO_SOUND:"push.no_sound",IOS_OFFLINE_PUSH_DEFAULT_SOUND:"default"},Nt=g(function e(){c(this,e),this.cache=[],this.options=null},[{key:"use",value:function(e){if(typeof e!="function")throw"middleware must be a function";return this.cache.push(e),this}},{key:"next",value:function(e){if(this.middlewares&&0<this.middlewares.length)return this.middlewares.shift().call(this,this.options,this.next.bind(this))}},{key:"run",value:function(e){return this.middlewares=this.cache.map(function(t){return t}),this.options=e,this.next()}}]),fe=g(function e(){var t=0<arguments.length&&arguments[0]!==void 0?arguments[0]:0,n=1<arguments.length&&arguments[1]!==void 0?arguments[1]:0;c(this,e),this.high=t,this.low=n},[{key:"equal",value:function(e){return e!==null&&this.low===e.low&&this.high===e.high}},{key:"toString",value:function(){var e=Number(this.high).toString(16),t=Number(this.low).toString(16);if(t.length<8)for(var n=8-t.length;n;)t="0"+t,n--;return e+t}}]),Wt={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",BACKUP_CN:"wss://wss.im.tencent.cn",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",BACKUP_CN:"wss://wss.im.tencent.cn",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",ANYCAST:"wss://162.14.13.254"},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"}}},Tt="1.7.3",on=537048168,Ut="CHINA",q={HOST:{CURRENT:{DEFAULT:"wss://wss.im.qcloud.com",STAT:"https://events.im.qcloud.com"},setCurrent:function(){this.CURRENT=Wt.PRODUCTION[0<arguments.length&&arguments[0]!==void 0?arguments[0]:Ut]}},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"}},je={SEARCH_GRP_SNS:new fe(0,Math.pow(2,1)).toString(),AV_HISTORY_MSG:new fe(0,Math.pow(2,2)).toString(),GRP_COMMUNITY:new fe(0,Math.pow(2,3)).toString(),MSG_TO_SPECIFIED_GRP_MBR:new fe(0,Math.pow(2,4)).toString(),AV_MBR_LIST:new fe(0,Math.pow(2,6)).toString(),USER_STATUS:new fe(0,Math.pow(2,7)).toString(),CONV_MARK:new fe(0,Math.pow(2,9)).toString(),CONV_GROUP:new fe(0,Math.pow(2,10)).toString(),AV_BAN_MBR:new fe(0,Math.pow(2,11)).toString(),MSG_EXT:new fe(0,Math.pow(2,13)).toString(),GRP_COUNTER:new fe(0,Math.pow(2,15)).toString(),PLUGIN_TRANSLATE:new fe(Math.pow(2,6)).toString(),PLUGIN_VOICE_TO_TEXT:new fe(Math.pow(2,7)).toString(),PLUGIN_CS:new fe(Math.pow(2,8)).toString(),PLUGIN_PUSH:new fe(Math.pow(2,9)).toString(),PLUGIN_BOT:new fe(Math.pow(2,10)).toString(),MSG_REACTION:new fe(Math.pow(2,16)).toString(),FOLLOW:new fe(Math.pow(2,20)).toString()},Jn="web.sdk.qcloud.com",Pt="web.sdk.cloud.tencent.cn",En="web.sdk.tencent.cn";q.HOST.setCurrent(Ut);for(var St,Y=typeof $.wx$1<"u"&&typeof $.wx$1.getSystemInfoSync=="function"&&($.wx$1.getSystemInfoSync().platform==="mac"||$.wx$1.getSystemInfoSync().platform==="windows"),Je=typeof $.wx$1<"u"&&typeof $.wx$1.getSystemInfoSync=="function"&&!!$.wx$1.getSystemInfoSync().fontSizeSetting||Y,Xn=Je&&typeof $.wx$1.createGamePortal=="function",et=typeof qq<"u"&&typeof qq.getSystemInfoSync=="function"&&!!qq.getSystemInfoSync().fontSizeSetting,nt=typeof tt<"u"&&typeof tt.getSystemInfoSync=="function"&&!!tt.getSystemInfoSync().fontSizeSetting,zt=typeof swan<"u"&&typeof swan.getSystemInfoSync=="function"&&!!swan.getSystemInfoSync().fontSizeSetting,st=typeof my<"u"&&typeof my.getSystemInfoSync=="function"&&!!my.getSystemInfoSync().fontSizeSetting,dt=(Y=typeof jd<"u"&&typeof jd.getSystemInfoSync=="function",typeof $.index<"u"&&typeof window>"u"&&typeof $.index.requireNativePlugin=="function"),ue=Je&&Ce($.wx$1.miniapp)==="object",Vo=typeof $.index<"u",ie=Je||et||nt||zt||st||dt||Y,de=typeof window>"u"&&!ie&&Vt!==void 0&&Vt.NativeScriptGlobals!==void 0,Xe=Vt!==void 0&&(Vt.nativeModuleProxy!==void 0||Vt.ReactNative!==void 0),Fe=typeof $.index<"u"?!ie:typeof window<"u"&&!ie&&!Xe,re=et?qq:nt?tt:zt?swan:st?my:Je?$.wx$1:dt?$.index:Y?jd:{},xe=Fe&&window&&window.navigator&&window.navigator.userAgent||"",Hi=(Y="WEB",/(micromessenger|webbrowser)/i.test(xe)?Y="WEB":et?Y="QQ_MP":nt?Y="TT_MP":zt?Y="BAIDU_MP":st?Y="ALI_MP":Je?Y=ue?"DONUT_NATIVE_APP":"WX_MP":dt?Y="UNI_NATIVE_APP":de?Y="NS_NATIVE_APP":Xe&&(Y="RN_NATIVE_APP"),{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}[Y]),Bi=(ue=/iPad/i.test(xe),de=/iPhone/i.test(xe)&&!ue,Y=/iPod/i.test(xe),de||ue||Y),qo=(de=xe.match(/OS (\d+)_/i))&&de[1]?de[1]:null,Yi=/Android/i.test(xe),Ko=(ue=xe.match(/Android (\d+)(?:\.(\d+))?(?:\.(\d+))*/i))?(Y=ue[1]&&parseFloat(ue[1]),de=ue[2]&&parseFloat(ue[2]),Y&&de?parseFloat(ue[1]+"."+ue[2]):Y||null):null,$s=(ue=!(de=/Edge/i.test(xe))&&/Chrome/i.test(xe),/MSIE/.test(xe)||-1<xe.indexOf("Trident")&&-1<xe.indexOf("rv:11.0")),jo=Y=!(Y=(Y=/MSIE\s(\d+)\.\d/.exec(xe))&&parseFloat(Y[1]))&&/Trident\/7.0/i.test(xe)&&/rv:11.0/.test(xe)?11:Y,Ho=(Y=/Safari/i.test(xe)&&!ue&&!Yi&&!de,/Windows/i.test(xe)),Bo=/MAC OS X/i.test(xe),rn=Fe&&typeof Worker<"u"&&!$s,Yo=Fe&&window.tencent_cloud_im_csig_flutter_for_web_25F_cy!==void 0,Wi=typeof window<"u"&&window.navigator!==void 0&&(ue=window.navigator.standalone,!(!Bi||ue||Y)),zi=typeof console<"u"?console:Vt!==void 0&&Vt.console?Vt.console:typeof window<"u"&&window.console?window.console:{},Wo=function(){},$i=["assert","clear","count","debug","dir","dirxml","error","group","groupCollapsed","groupEnd","info","log","profile","profileEnd","table","time","timeEnd","timeStamp","trace","warn"],Ji=$i.length;Ji--;)St=$i[Ji],console[St]||(zi[St]=Wo);function wt(){return new Date().getTime()+kn}function Xi(){kn=0}function Zi(){return Math.floor(wt()/1e3)}var Qi=zi,kn=0,Et=0;function ea(){return ti()?"%c AIDesk-Chat %c":"AIDesk-Chat"}function ta(){var e;return(e=new Date).setTime(wt()),e.toLocaleTimeString("en-US",{hour12:!1})+"."+(t=>{var n;switch(t.toString().length){case 1:n="00"+t;break;case 2:n="0"+t;break;default:n=t}return n})(e.getMilliseconds())}var m={arguments2String:function(e){var t="";if(e.length===1)t=e[0];else for(var n=0,s=e.length;n<s;n++){if(On(e[n]))try{t+=tr(e[n])?JSON.stringify(e[n],["message","code"]):JSON.stringify(e[n])}catch(i){t+=i?i.message:"";break}else t+=e[n];t+=" "}return t},_exec:function(e,t){ti()?Qi[e](ea(),"background:#1c66e5; padding:1px; border-radius:3px; color: #fff","background:transparent",ta(),t):Qi[e]("".concat(ea()," ").concat(ta()," ").concat(t))},d:function(){var e;Et<=-1&&(e=this.arguments2String(arguments),this._exec("debug",e))},l:function(){var e;Et<=0&&(e=this.arguments2String(arguments),this._exec("log",e))},log:function(){var e;Et<=0&&(e=this.arguments2String(arguments),this._exec("log",e))},i:function(){var e;Et<=1&&(e=this.arguments2String(arguments),this._exec("info",e))},w:function(){var e;Et<=2&&(e=this.arguments2String(arguments),this._exec("warn",e))},e:function(){var e;Et<=3&&(e=this.arguments2String(arguments),this._exec("error",e))},setLevel:function(e){e<4&&this._exec("log","set level from "+Et+" to "+e),Et=e},getLevel:function(){return Et}},Zn={JPG:1,JPEG:1,GIF:2,PNG:3,BMP:4,UNKNOWN:255},Ve={NICK:"".concat(de="Tag_Profile_IM_","Nick"),GENDER:"".concat(de,"Gender"),BIRTHDAY:"".concat(de,"BirthDay"),LOCATION:"".concat(de,"Location"),SELFSIGNATURE:"".concat(de,"SelfSignature"),ALLOWTYPE:"".concat(de,"AllowType"),LANGUAGE:"".concat(de,"Language"),AVATAR:"".concat(de,"Image"),MESSAGESETTINGS:"".concat(de,"MsgSettings"),ADMINFORBIDTYPE:"".concat(de,"AdminForbidType"),LEVEL:"".concat(de,"Level"),ROLE:"".concat(de,"Role")},zo={UNKNOWN:"".concat(ue="Gender_Type_","Unknown"),FEMALE:"".concat(ue,"Female"),MALE:"".concat(ue,"Male")},$o={NONE:"".concat("AdminForbid_Type_","None"),SEND_OUT:"".concat("AdminForbid_Type_","SendOut")},Jo={NEED_CONFIRM:"".concat("AllowType_Type_","NeedConfirm"),ALLOW_ANY:"".concat("AllowType_Type_","AllowAny"),DENY_ANY:"".concat("AllowType_Type_","DenyAny")},Qn="@TOPIC#_",Xo=Object.prototype.hasOwnProperty;function z(e){if(e==null)return 1;if(typeof e!="boolean"){if(typeof e=="number")return e===0;if(typeof e=="string"||typeof e=="function"||Array.isArray(e))return e.length===0;if(e instanceof Error)return e.message==="";if(ce(e)){for(var t in e)if(Xo.call(e,t))return;return 1}return(Zo(e)||Qo(e)||gt(e))&&e.size===0}}function Zo(e){return cn(e)==="map"}function Qo(e){return cn(e)==="set"}function gt(e){return cn(e)==="file"}function Pe(e){return e!==null&&(typeof e=="number"&&!isNaN(+e)||Ce(e)==="object"&&e.constructor===Number)}function kt(e){return e!==null&&Ce(e)==="object"}function ce(e){if(Ce(e)==="object"&&e!==null){if((e=Object.getPrototypeOf(e))===null)return 1;for(var t=e;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return e===t}}function W(e){return typeof Array.isArray=="function"?Array.isArray(e):cn(e)==="array"}function ct(e){return typeof e=="function"}function na(e){return cn(e)==="filelist"}function sa(e){return typeof e=="string"&&(e=e[0],!/[^a-zA-Z0-9]/.test(e))}function bt(e,t,n,s){if(!On(e)||!On(t))return 0;for(var i,r=0,u=Object.keys(t),l=0,h=u.length;l<h;l++)if(i=u[l],!(U(t[i])||n&&n.includes(i)))if(On(e[i])&&On(t[i]))r+=bt(e[i],t[i],n,s);else{if(s&&s.includes(t[i]))continue;e[i]!==t[i]&&(e[i]=t[i],r+=1)}return r}function Js(e,t){var n,s=new Map,i=y(e.entries());try{for(i.s();!(n=i.n()).done;){var r=X(n.value,2),u=r[0],l=r[1];l&&s.set(u,t?JSON.stringify(l):JSON.parse(JSON.stringify(l)))}}catch(h){i.e(h)}finally{i.f()}return s}function ia(e){if(e.length===0)return 0;for(var t=0,n=0,s=typeof document<"u"&&document.characterSet!==void 0?document.characterSet:"UTF-8";e[t]!==void 0;)n+=e[t++].charCodeAt[t]<=255?1:s===!1?3:2;return n}function ut(e){return e=e||99999999,Math.round(Math.random()*e)}function Xs(e,t){for(var n in e)if(e[n]===t)return 1}function Dn(e){return e.indexOf("http://")===-1||e.indexOf("https://")===-1?"https://"+e:e.replace(/https|http/,"https")}var er=["url"],ne=function(e){return typeof e=="string"},U=function(e){return e===void 0},On=function(e){return W(e)||kt(e)},tr=function(e){return e instanceof Error},cn=function(e){return Object.prototype.toString.call(e).match(/^\[object (.*)\]$/)[1].toLowerCase()},aa=(Date.now||(Date.now=function(){return new Date().getTime()}),"0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"),nr=aa.length,es={};function oa(e,t){var n;return!(!W(e)||!W(t))&&(n=!1,t.forEach(function(s){var i=s.key,r=(s=s.value,e.find(function(u){return u.key===i}));r?r.value!==s&&(r.value=s,n=!0):(e.push({key:i,value:s}),n=!0)}),n)}function Rn(e){return e===v.GRP_AVCHATROOM}function An(e){var t=e.type;return e=e.groupID,t===v.GRP_COMMUNITY||"".concat(e).startsWith("@TGS#_")&&!"".concat(e).includes(Qn)}function Ln(e){return"".concat(e).startsWith("@TGS#_")&&"".concat(e).includes(Qn)}function qe(e){return ne(e)&&e.slice(0,3)===v.CONV_C2C}function We(e){return ne(e)&&e.slice(0,5)===v.CONV_GROUP}function Nn(e){return ne(e)&&e===v.CONV_SYSTEM}function ra(e,t){var n={};return Object.keys(e).forEach(function(s){n[s]=t(e[s],s)}),n}function un(e){return Xe?Promise.resolve({width:0,height:0}):ie?new Promise(function(t,n){re.getImageInfo({src:e,success:function(s){t({width:s.width,height:s.height})},fail:function(){t({width:0,height:0})}})}):$s&&jo===9?Promise.resolve({width:0,height:0}):new Promise(function(t,n){var s=new Image;s.onload=function(){t({width:this.width,height:this.height}),s=null},s.onerror=function(){t({width:0,height:0}),s=null},s.src=e})}function ca(){function e(){return(65536*(1+Math.random())|0).toString(16).substring(1)}return"".concat(e()+e()).concat(e()).concat(e()).concat(e()).concat(e()).concat(e()).concat(e())}function ua(){var e=Yi?"android":Bi?"ios":Ho?"windows":Bo?"mac":"unknown";if(ie)try{var t=re.getSystemInfoSync().platform;t!==void 0&&(e=t)}catch{}return e}function la(e,t){e=e.split("."),t=t.split(".");for(var n=Math.max(e.length,t.length);e.length<n;)e.push("0");for(;t.length<n;)t.push("0");for(var s=0;s<n;s++){var i=parseInt(e[s]),r=parseInt(t[s]);if(r<i)return 1;if(i<r)return-1}return 0}function Zs(e){var t=(t=e.originUrl)===void 0?void 0:t,n=e.originHeight,s=(s=e.min)===void 0?198:s,i={url:void 0,width:0,height:0};return((e=parseInt(e.originWidth))<=(n=parseInt(n))?e:n)<=s?(i.url=t,i.width=e,i.height=n):(n<=e?(i.width=Math.ceil(e*s/n),i.height=s):(i.width=s,i.height=Math.ceil(n*s/e)),n=t&&-1<t.indexOf("?")?"".concat(t,"&"):"".concat(t,"?"),i.url="".concat(n,s===198?"imageView2/3/w/198/h/198":"imageView2/3/w/720/h/720")),U(t)?j(i,er):i}function da(e){var t=e[2];e[2]=e[1],e[1]=t;for(var n=0;n<e.length;n++)e[n].setType(n)}function Qs(e){return(e=e.servcmd).slice(e.indexOf(".")+1)}function ht(e,t){return Math.round(Number(e)*Math.pow(10,t))/Math.pow(10,t)}function ga(e,t){return e.includes(t)}function ha(e,t){return e.includes(t)}function ts(e){return e.split(Qn)[0]}function ei(e,t,n){if(U(t))return"";switch(e){case v.MSG_TEXT:return t.text;case v.MSG_IMAGE:return n?"[Image]":"[图片]";case v.MSG_LOCATION:return n?"[Location]":"[位置]";case v.MSG_AUDIO:return n?"[Voice]":"[语音]";case v.MSG_VIDEO:return n?"[Video]":"[视频]";case v.MSG_FILE:return n?"[File]":"[文件]";case v.MSG_CUSTOM:return n?"[Custom Messages]":"[自定义消息]";case v.MSG_GRP_TIP:return n?"[Group Notification]":"[群提示消息]";case v.MSG_GRP_SYS_NOTICE:return n?"[Group System Message]":"[群系统通知]";case v.MSG_FACE:return n?"[Animated Sticker]":"[动画表情]";case v.MSG_MERGER:return n?"[Chat Record]":"[聊天记录]";default:return""}}function ns(e){var t=[];if(ne(e)){var n=e.length;if(n!==0)for(var s=n-1;0<=s;s--)e[s]==="1"&&t.push(Math.pow(2,n-s-1))}return t}function ti(){return!$s&&!ie}function ze(e,t,n){t=!(1<arguments.length&&t!==void 0)||t,n=!(2<arguments.length&&n!==void 0)||n;var s=Date.now();return t?n?"".concat(s-e," ms"):"".concat(Math.round((s-e)/1e3)," s"):n?s-e:Math.round((s-e)/1e3)}function pa(e){return!!(e&&1<e)}function _a(e,t,n,s){var i,r,u;return t===void 0||(i=!0,t.required&&z(e)&&(m.e("[".concat(n,'] Missing required params: "').concat(s,'".')),i=!1),z(e)||(r=cn(e))===(u=t.type.toLowerCase())||r==="asyncfunction"&&u==="function"||(m.e("[".concat(n,'] Invalid params: type check failed for "').concat(s,'". Expected ').concat(t.type,".")),i=!1),t.validator&&!t.validator(e,n,s)&&(m.e("[".concat(n,'] Invalid params: custom validator check failed for "').concat(s,'".')),i=!1),i)}function $t(e){return!(!e||!(qe(e)||We(e)||Nn(e))&&((e=he("InvalidConversationID",e))&&m.w(e),1))}function H(e){e.desc!==""&&he("API_REFER")!==""&&m.w("[".concat(e.api,"] | ").concat(e.paramName," | ").concat(e.desc,", ").concat(he("API_REFER")).concat(e.api))}function pt(){return he("StringRequiredLog")}function fa(e){return he("NonEmptyStringRequiredLog",e)}function ss(){return he("NumberRequiredLog")}function ni(){return he("UndefinedNotAllowedLog")}function si(){return he("FileRequiredLog")}function ma(){return he("FunctionRequiredLog")}function Un(){return he("ArrayRequiredLog")}function is(){return he("NonEmptyArrayLog")}function as(){return he("CallbackMissingLog")}function va(){return he("PositiveIntegerRequiredLog")}function Dt(){return he("PlainObjectRequiredLog")}function ya(){return he("NonEmptyContentRequiredLog")}function ln(){return he("FileNotSelectedLog")}function ii(){return he("MessageInstanceRequiredLog")}function Ia(){return he("NonAnonymousFunctionLog")}function Se(e){return{code:0,data:e||{}}}function se(e){return Promise.resolve(Se(e))}function x(e){var t,n=1<arguments.length&&arguments[1]!==void 0&&arguments[1];return e instanceof Ee?(n&&Xt!==null&&Xt.emit(Q.ERROR,e),Promise.reject(e)):e instanceof Error?(t=new Ee({code:P.UNCAUGHT_ERROR}),n&&Xt!==null&&Xt.emit(Q.ERROR,t),Promise.reject(t)):U(e)||U(e.code)?Promise.reject(new Ee({code:P.UNCAUGHT_ERROR})):(t=new Ee(e),n&&Xt!==null&&Xt.emit(Q.ERROR,t),Promise.reject(t))}var ai="unSend",Jt="success",Pn="notStart",Ma="pending",oi="resolved",os="rejected",He=(Y={type:"String",required:!0},de={type:"Array",required:!0},{type:"Boolean",required:!0}),he=null,Ca={hookGetAPITips:function(e){he=e},login:{userID:Y,userSig:Y},on:[{name:"eventName",type:"String",validator:function(e,t,n){return typeof e=="string"&&e.length!==0||(H({api:t,paramName:n,desc:fa(n)}),!1)}},{name:"handler",type:"Function",validator:function(e,t,n){return typeof e!="function"?(H({api:t,paramName:n,desc:ma()}),!1):(e.name===""&&H({api:t,paramName:n,desc:Ia()}),!0)}}],off:[{name:"eventName",type:"String",validator:function(e,t,n){return typeof e=="string"&&e.length!==0||(H({api:t,paramName:n,desc:fa(n)}),!1)}},{name:"handler",type:"Function",validator:function(e,t,n){return typeof e!="function"?(H({api:t,paramName:n,desc:ma()}),!1):(e.name===""&&H({api:t,paramName:n,desc:Ia()}),!0)}}],sendMessage:[I({name:"message"},ue={type:"Object",required:!0})],getMessageList:{conversationID:I(I({},Y),{},{validator:$t}),nextReqMessageID:{type:"String"},count:{type:"Number",validator:function(e,t,n){return!(!U(e)&&!/^[1-9][0-9]*$/.test(e)&&(H({api:t,paramName:n,desc:va()}),1))}}},getMessageListHopping:{conversationID:I(I({},Y),{},{validator:$t}),sequence:{type:"Number"},time:{type:"Number"},direction:{type:"Number",validator:function(e,t,n){return!(!U(e)&&e!==0&&e!==1&&(H({api:t,paramName:n,desc:he("0Or1RequiredLog")}),1))}},count:{type:"Number",validator:function(e,t,n){return!(!U(e)&&!/^[1-9][0-9]*$/.test(e)&&(H({api:t,paramName:n,desc:va}),1))}}},setMessageRead:{conversationID:I(I({},Y),{},{validator:$t})},setAllMessageRead:{scope:{type:"String",required:!1,validator:function(e,t,n){return!e||[v.READ_ALL_C2C_MSG,v.READ_ALL_GROUP_MSG,v.READ_ALL_MSG].indexOf(e)!==-1||(H({api:t,paramName:n,desc:he("ValidScopeRequired")}),!1)}}},getConversationProfile:[I(I({name:"conversationID"},Y),{},{validator:$t})],clearHistoryMessage:[I(I({name:"conversationID"},Y),{},{validator:$t})],pinConversation:{conversationID:I(I({},Y),{},{validator:$t}),isPinned:I({},He)},setConversationDraft:{conversationID:I(I({},Y),{},{validator:$t}),draftText:{type:"String",validator:function(e,t,n){return!!ne(e)||(H({api:t,paramName:n,desc:pt()}),!1)}}},setConversationCustomData:{conversationIDList:I({},de),customData:{type:"String",validator:function(e,t,n){return ne(e)?!(256<e.length&&(H({api:t,paramName:n,desc:he("StringNotLongerThanLog",n,256)}),1)):(H({api:t,paramName:n,desc:pt()}),!1)}}},markConversation:{conversationIDList:I({},de),markType:{type:"number",validator:function(e,t,n){return Pe(e)?e<=0?(H({api:t,paramName:n,desc:he("NumberGreaterThanLog",n,0)}),!1):!(e>=Math.pow(2,64)&&(H({api:t,paramName:n,desc:he("NumberLessThanLog",n,"Math.pow(2,64)")}),1)):(H({api:t,paramName:n,desc:ss()}),!1)}},enableMark:I({},He)},createTextMessage:{to:Y,conversationType:Y,payload:I(I({},ue),{},{validator:function(e,t,n){return ce(e)?ne(e.text)?e.text.length!==0||(H({api:t,paramName:"payload.text",desc:ya()}),!1):(H({api:t,paramName:"payload.text",desc:pt()}),!1):(H({api:t,paramName:n,desc:Dt()}),!1)}})},createTextAtMessage:{to:Y,conversationType:Y,payload:I(I({},ue),{},{validator:function(e,t,n){return ce(e)?ne(e.text)?e.text.length===0?(H({api:t,paramName:"payload.text",desc:ya()}),!1):!(e.atUserList&&!W(e.atUserList)&&(H({api:t,paramName:"payload.atUserList",desc:Un()}),1)):(H({api:t,paramName:"payload.text",desc:pt()}),!1):(H({api:t,paramName:n,desc:Dt()}),!1)}})},createCustomMessage:{to:Y,conversationType:Y,payload:I(I({},ue),{},{validator:function(e,t,n){return ce(e)?e.data&&!ne(e.data)?(H({api:t,paramName:"payload.data",desc:pt()}),!1):e.description&&!ne(e.description)?(H({api:t,paramName:"payload.description",desc:pt()}),!1):!(e.extension&&!ne(e.extension)&&(H({api:t,paramName:"payload.extension",desc:pt()}),1)):(H({api:t,paramName:"payload",desc:Dt()}),!1)}})},createImageMessage:{to:Y,conversationType:Y,payload:I(I({},ue),{},{validator:function(e,t,n){if(!ce(e))return H({api:t,paramName:n,desc:Dt()}),!1;if(U(e.file))return H({api:t,paramName:"payload.file",desc:ni()}),!1;if(Fe){if(!(e.file instanceof HTMLInputElement||gt(e.file)))return ce(e.file)&&typeof $.index<"u"?e.file.tempFilePaths.length!==0&&e.file.tempFiles.length!==0||(H({api:t,paramName:"payload.file",desc:ln()}),!1):(H({api:t,paramName:"payload.file",desc:si()}),!1);if(e.file instanceof HTMLInputElement&&e.file.files.length===0)return H({api:t,paramName:"payload.file",desc:ln()}),!1}return!0},onProgress:{type:"Function",required:!1,validator:function(e,t,n){return U(e)&&H({api:t,paramName:n,desc:as()}),!0}}})},createAudioMessage:{to:Y,conversationType:Y,payload:I(I({},ue),{},{validator:function(e,t,n){return!!ce(e)||(H({api:t,paramName:n,desc:Dt()}),!1)}}),onProgress:{type:"Function",required:!1,validator:function(e,t,n){return U(e)&&H({api:t,paramName:n,desc:as()}),!0}}},createVideoMessage:{to:Y,conversationType:Y,payload:I(I({},ue),{},{validator:function(e,t,n){if(!ce(e))return H({api:t,paramName:n,desc:Dt()}),!1;if(U(e.file))return H({api:t,paramName:"payload.file",desc:ni()}),!1;if(Fe){if(!(e.file instanceof HTMLInputElement||gt(e.file)))return ce(e.file)&&typeof $.index<"u"?!!gt(e.file.tempFile)||(H({api:t,paramName:"payload.file",desc:ln()}),!1):(H({api:t,paramName:"payload.file",desc:si()}),!1);if(e.file instanceof HTMLInputElement&&e.file.files.length===0)return H({api:t,paramName:"payload.file",desc:ln()}),!1}return!0}}),onProgress:{type:"Function",required:!1,validator:function(e,t,n){return U(e)&&H({api:t,paramName:n,desc:as()}),!0}}},createFaceMessage:{to:Y,conversationType:Y,payload:I(I({},ue),{},{validator:function(e,t,n){return ce(e)?Pe(e.index)?!!ne(e.data)||(H({api:t,paramName:"payload.data",desc:pt()}),!1):(H({api:t,paramName:"payload.index",desc:ss()}),!1):(H({api:t,paramName:n,desc:Dt()}),!1)}})},createFileMessage:{to:Y,conversationType:Y,payload:I(I({},ue),{},{validator:function(e,t,n){if(!ce(e))return H({api:t,paramName:n,desc:Dt()}),!1;if(U(e.file))return H({api:t,paramName:"payload.file",desc:ni()}),!1;if(Fe){if(!(e.file instanceof HTMLInputElement||gt(e.file)))return ce(e.file)&&typeof $.index<"u"?e.file.tempFilePaths.length!==0&&e.file.tempFiles.length!==0||(H({api:t,paramName:"payload.file",desc:ln()}),!1):(H({api:t,paramName:"payload.file",desc:si()}),!1);if(e.file instanceof HTMLInputElement&&e.file.files.length===0)return H({api:t,paramName:"payload.file",desc:ln()}),!1}return!0}}),onProgress:{type:"Function",required:!1,validator:function(e,t,n){return U(e)&&H({api:t,paramName:n,desc:as()}),!0}}},createLocationMessage:{to:Y,conversationType:Y,payload:I(I({},ue),{},{validator:function(e,t,n){return ce(e)?ne(e.description)?Pe(e.longitude)?!!Pe(e.latitude)||(H({api:t,paramName:"payload.latitude",desc:ss()}),!1):(H({api:t,paramName:"payload.longitude",desc:ss()}),!1):(H({api:t,paramName:"payload.description",desc:pt()}),!1):(H({api:t,paramName:n,desc:Dt()}),!1)}})},revokeMessage:[I(I({name:"message"},ue),{},{validator:function(e,t,n){return z(e)?(H({api:t,paramName:n,desc:ii()}),!1):e.conversationType===v.CONV_SYSTEM?(H({api:t,paramName:n,desc:he("MessageCanBeRevokedDesc")}),!1):e.isRevoked!==!0||(H({api:t,paramName:n,desc:he("MessageRevokedLog")}),!1)}})],deleteMessage:[I(I({name:"messageList"},de),{},{validator:function(e,t,n){return!z(e)||(H({api:t,paramName:n,desc:is()}),!1)}})],translateText:{sourceTextList:de,sourceLanguage:Y,targetLanguage:Y},convertVoiceToText:{message:I(I({},ue),{},{validator:function(e,t,n){return z(e)?(H({api:t,paramName:n,desc:ii()}),!1):e.type===v.MSG_AUDIO&&e.status===Jt||(H({api:t,paramName:n,desc:he("AudioMessageRequiredLog")}),!1)}})},modifyMessage:[I(I({name:"message"},ue),{},{validator:function(e,t,n){return z(e)?(H({api:t,paramName:n,desc:ii()}),!1):e.conversationType===v.CONV_SYSTEM?(H({api:t,paramName:n,desc:he("MessageCanBeModifiedLog")}),!1):e._onlineOnlyFlag!==!0||(H({api:t,paramName:n,desc:he("OnlineMessageNotSupportLog")}),!1)}})],getUserProfile:{userIDList:{type:"Array",validator:function(e,t,n){return W(e)?(e.length===0&&H({api:t,paramName:n,desc:is()}),!0):(H({api:t,paramName:n,desc:Un()}),!1)}}},updateMyProfile:{profileCustomField:{type:"Array",validator:function(e,t,n){return!!U(e)||!!W(e)||(H({api:t,paramName:n,desc:Un()}),!1)}}},setSelfStatus:{customStatus:{type:"String",validator:function(e,t,n){return!!ne(e)||(H({api:t,paramName:n,desc:pt()}),!1)}}},sendMessageReadReceipt:[{name:"messageList",type:"Array",validator:function(e,t,n){return W(e)?e.length!==0||(H({api:t,paramName:n,desc:is()}),!1):(H({api:t,paramName:n,desc:Un()}),!1)}}],getMessageReadReceiptList:[{name:"messageList",type:"Array",validator:function(e,t,n){return W(e)?e.length!==0||(H({api:t,paramName:n,desc:is()}),!1):(H({api:t,paramName:n,desc:Un()}),!1)}}]},sr={login:1,logout:1,getLoginUser:1,getServerTime:1,on:1,once:1,off:1,setLogLevel:1,registerPlugin:1,destroy:1,isReady:1,createTextMessage:1,createTextAtMessage:1,createImageMessage:1,createAudioMessage:1,createVideoMessage:1,createCustomMessage:1,createFaceMessage:1,createFileMessage:1,createLocationMessage:1,createMergerMessage:1,downloadMergerMessage:1,createForwardMessage:1,sendMessage:1,resendMessage:1,revokeMessage:1,deleteMessage:1,translateText:1,convertVoiceToText:1,modifyMessage:1,sendMessageReadReceipt:1,getGroupMessageReadMemberList:1,getMessageReadReceiptList:1,setMessageExtensions:1,getMessageExtensions:1,deleteMessageExtensions:1,addMessageReaction:1,removeMessageReaction:1,getMessageReactions:1,getAllUserListOfMessageReaction:1,getMessageList:1,findMessage:1,getMessageListHopping:1,setMessageRead:1,setAllMessageRead:1,getConversationList:1,getConversationProfile:1,deleteConversation:1,setConversationDraft:1,pinConversation:1,getTotalUnreadMessageCount:1,setConversationCustomData:1,markConversation:1,createConversationGroup:1,getConversationGroupList:1,deleteConversationGroup:1,renameConversationGroup:1,addConversationsToGroup:1,deleteConversationsFromGroup:1,clearHistoryMessage:1,setMessageRemindType:1,setAllReceiveMessageOpt:1,getAllReceiveMessageOpt:1,getMyProfile:1,getUserProfile:1,updateMyProfile:1,setSelfStatus:1,getUserStatus:1,subscribeUserStatus:1,unsubscribeUserStatus:1,callExperimentalAPI:1},Ee=(S(ds,Ge(Error)),g(ds)),P={NO_SDKAPPID:2e3,NO_ACCOUNT_TYPE:2001,NO_IDENTIFIER:2002,NO_USERSIG:2003,NO_TINYID:2022,NO_A2KEY:2023,USER_NOT_LOGGED_IN:2024,REPEAT_LOGIN:2025,COS_UNDETECTED:2040,COS_GET_SIG_FAIL:2041,MSG_SEND_FAIL:2100,MSG_SEND_FAIL_NOT_IN_AV:2101,MSG_INSTANCE_REQUIRED:2105,MSG_INVALID_CONV_TYPE:2106,MSG_F_IS_EMPTY:2108,MSG_ONPROGRESS_ERR:2109,MSG_REVOKE_FAIL:2110,MSG_DELETE_FAIL:2111,MSG_UNREAD_ALL_FAIL:2112,READ_RECEIPT_MSG_LIST_EMPTY:2114,MSG_SEND_GRP_WITH_TOPIC_FAIL:2115,CANNOT_DELETE_GRP_SYSTEM_NOTICE:2116,TRANSLATE_TEXT_FAIL:2117,VOICE_TO_TEXT_FAIL:2118,UNSUPPORTED_VOICE_FORMAT:2119,MSG_I_SELECT_F_FIRST:2251,MSG_I_TYPES_LIMIT:2252,MSG_I_SIZE_LIMIT:2253,MSG_A_UPLOAD_FAIL:2300,MSG_A_SIZE_LIMIT:2301,MSG_V_UPLOAD_FAIL:2350,MSG_V_SIZE_LIMIT:2351,MSG_V_TYPES_LIMIT:2352,MSG_F_UPLOAD_FAIL:2400,MSG_F_SELECT_F_FIRST:2401,MSG_F_SIZE_LIMIT:2402,MSG_F_URL_IS_EMPTY:2403,MSG_MERGER_TYPE_INVALID:2450,MSG_MERGER_KEY_INVALID:2451,MSG_MERGER_DOWNLOAD_FAIL:2452,MSG_FORWARD_TYPE_INVALID:2453,MSG_FORWARD_INVALID_ELEMENTS:2454,MSG_MODIFY_CONFLICT:2480,MSG_MODIFY_DISABLED_IN_AV:2481,CONV_NOT_FOUND:2500,USER_OR_GRP_NOT_FOUND:2501,CONV_UN_RECORDED_TYPE:2502,INVALID_CONV_ID:2503,ILLEGAL_GRP_TYPE:2600,ILLEGAL_GRP_ID:2602,CANNOT_FIND_GRP:2603,CANNOT_CHANGE_OWNER_IN_AV:2620,CANNOT_CHANGE_OWNER_TO_SELF:2621,MEMBER_NOT_IN_GRP:2623,JOIN_GRP_FAIL:2660,CANNOT_ADD_MEMBER_IN_AV:2661,CANNOT_JOIN_NON_AV_WITHOUT_LOGIN:2662,NOT_OWNER:2681,INVALID_MEMBER_ROLE:2683,CANNOT_SET_SELF_MEMBER_ROLE:2684,CANNOT_MUTE_SELF:2685,BAN_DURATION_INVALID:2686,OPERATION_NOT_SUPPORTED_IN_AV:2687,NOT_MY_FRIEND:2700,ALREADY_MY_FRIEND:2701,FRIEND_GRP_EXISTED:2710,FRIEND_GRP_NOT_EXIST:2711,FRIEND_APPLICATION_NOT_EXIST:2716,UPDATE_PROFILE_INVALID_PARAM:2721,UPDATE_PROFILE_NO_KEY:2722,CANNOT_ADD_SELF_TO_BLACKLIST:2742,NETWORK_ERROR:2800,NETWORK_TIMEOUT:2801,NO_NETWORK:2805,UNCAUGHT_ERROR:2903,INVALID_OPERATION:2905,INVALID_TRTC_CMD:2995,OVER_FREQUENCY_LIMIT:2996,NO_PROTOCOL:2997,NO_MODULE:2998,SDK_IS_NOT_READY:2999,LOGGING_IN:3e3,LOGIN_FAILED:3001,KICKED_OUT_MULT_DEVICE:3002,KICKED_OUT_MULT_ACCOUNT:3003,KICKED_OUT_USERSIG_EXPIRED:3004,LOGGED_OUT:3005,KICKED_OUT_REST_API:3006,ILLEGAL_TOPIC_ID:3021,NO_USE:3122,PROFANITY_FOUND:3123,OPTIONS_IS_EMPTY:3153,MSG_A2KEY_EXPIRED:20002,ACCOUNT_A2KEY_EXPIRED:70001,HELLO_ANSWER_KICKED_OUT:1002,OPEN_SERVICE_OVERLOAD_ERROR:60022,SIGNALING_INVALID_INVITE_ID:8010,SIGNALING_NO_PERMISSION:8011,SIGNALING_ALREADY_EXISTS:8012,INVALID_CANCEL_MESSAGE:8020},Xt=null,D=(He=g(function e(t){c(this,e),this._m=t,this._n=""},[{key:"isLoggedIn",value:function(){return this._m.get(12).isLoggedIn()}},{key:"isOversea",value:function(){return this._m.get(12).isOversea()}},{key:"isPrivateNetWork",value:function(){var e=this._m.get(12);return e.isPrivateNetWork()&&!e.getFileDownloadProxy()}},{key:"getFileDownloadProxy",value:function(){return this._m.get(12).getFileDownloadProxy()}},{key:"getDownloadFileAuthKey",value:function(){return this._m.get(12).getDownloadFileAuthKey()}},{key:"getMyUserID",value:function(){return this._m.get(12).getUserID()}},{key:"getMyTinyID",value:function(){return this._m.get(12).getTinyID()}},{key:"getSDKAppID",value:function(){return this._m.get(12).getSDKAppID()}},{key:"isIntl",value:function(){return this._m.get(12).isIntl()}},{key:"isUsingChatCore",value:function(){return this._m.get(12).isUsingChatCore()}},{key:"isDevMode",value:function(){return this._m.get(12).isDevMode()}},{key:"get",value:function(e){return this._m.get(e)}},{key:"getPlatform",value:function(){return Hi}},{key:"getCloudConfig",value:function(e){return this._m.get(23).getCloudConfig(e)}},{key:"emitOEvt",value:function(e,t){this._m.getOEmitInst().emit(e,t)}},{key:"emitIEvt",value:function(e,t){this._m.getIEmitInst().emit(e,t)}},{key:"getIEmitInst",value:function(){return this._m.getIEmitInst()}},{key:"req",value:function(e){return this._m.get(20).req(e)}},{key:"canIUse",value:function(e){return this._m.get(27).canIUse(e)}},{key:"getErrMsg",value:function(e,t,n){return this._m.getErrMsg(e,t,n)}},{key:"warn",value:function(e,t,n){(e=this.getErrMsg(e,t,n))&&m.w(e)}},{key:"noUse",value:function(e){var t=P.NO_USE;return x({code:t,message:this.getErrMsg(t,e)})}}]),{LOGIN:"wslogin",LOGOUT:"wslogout",HELLO:"wshello",KICK_OTHER:"KickOther",SYNC_UNREAD_MSG:"getmsg",SEND_C2C_MSG:"sendmsg",GET_USER_PROFILE:"portrait_get_all",UPDATE_MY_PROFILE:"portrait_set",REVOKE_C2C_MSG:"msgwithdraw",SET_C2C_MSG_READ:"msgreaded",SET_C2C_PEER_MUTE_NOTIFICATIONS:"set_c2c_peer_mute_notifications",GET_C2C_PEER_MUTE_NOTIFICATIONS:"get_c2c_peer_mute_notifications",GET_C2C_ROAMING_MSG:"getroammsg",GET_C2C_PEER_READ_TIME:"get_peer_read_time",DEL_C2C_MSG:"delete_c2c_msg_ramble",MODIFY_C2C_MSG:"modify_c2c_msg",MODIFY_C2C_MSG_EXT:"set_key_values",GET_C2C_MSG_EXT:"get_key_values",PAGING_GET_CONV_LIST:"page_get",DEL_CONV:"batch_delete",CLEAR_HISTORY_MSG:"clear_msg",PIN_CONV:"top",DEL_GROUP_AT_TIPS:"deletemsg",SET_CONV_CUSTOM_DATA:"set_conv_custom_data",MARK_CONV:"mark_contact",SEND_C2C_READ_RECEIPT:"c2c_msg_read_receipt",COS_SIGN:"cos",COS_PRE_SIG:"pre_sig",SIMPLE_COS_PRE_SIG:"simple_sig",GET_IMAGE_INFO:"get_imageinfo",GET_IP:"get_final_ip",VIDEO_COVER:"video_cover",SSO_STAT:"tim_web_report_v2",PING:"alive",MSG_PUSH:"msg_push",MSG_PUSH_ACK:"ws_msg_push_ack",STATUS_FORCE_OFFLINE:"stat_forceoffline",FETCH_CLOUD_CTRL_CONFIG:"fetch_config",PUSHED_CLOUD_CTRL_CONFIG:"push_configv2",FETCH_COMMERCIAL_CONFIG:"fetch_imsdk_purchase_bitsv2",PUSHED_COMMERCIAL_CONFIG:"push_imsdk_purchase_bitsv2",OVERLOAD_NOTIFY:"notify2",SET_SELF_STATUS:"ws_set_custom_status",GET_USER_STATUS:"ws_get_user_status",STAT_BACKGROUND:"ws_stat_background",STAT_FOREGROUND:"ws_stat_foreground",SET_TOKEN:"ws_stat_settoken",PUSH_REPORT:"uniapp_sdk_report",TRANSLATE_TEXT:"ws_batch_trans_text",VOICE_TO_TEXT:"ws_sentence_recognition",SET_ALL_RECEIVE_MSG_OPT:"ws_set_do_not_disturb",GET_ALL_RECEIVE_MSG_OPT:"ws_get_do_not_disturb"}),ri="networkRTT",ci="messageE2EDelay",wn="sendMessageC2C",bn="sendMessageGroup",Gn="sendMessageGroupAV",Zt="sendMessageRichMedia",Ze="cosUpload",rs="messageReceivedGroup",cs="messageReceivedGroupAVPush",us="messageReceivedGroupAVPull",ir=T(T(T(T(T(T(T(T(T(T({},ri,2),ci,3),wn,4),bn,5),Gn,6),Zt,7),rs,8),cs,9),us,10),Ze,11),ar={info:4,warning:5,error:6},Ta={wifi:1,"2g":2,"3g":3,"4g":4,"5g":5,unknown:6,none:7,online:8},or={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},K=g(ls,[{key:"updateTimeStamp",value:function(){this.timestamp=wt()}},{key:"start",value:function(e){return this._startts=e,this}},{key:"end",value:function(){var e,t=this,n=0<arguments.length&&arguments[0]!==void 0&&arguments[0];this._sentFlag||(this._netMonitorModule&&(e=this._netMonitorModule.getNetworkType(),this.setNetworkType(e)),e=wt(),this.costTime===0&&(this.costTime=e-this._startts),this.setMoreMessage("startts:".concat(this._startts," endts:").concat(e)),n?(this._sentFlag=!0,this._eventStatModule&&this._eventStatModule.pushIn(this)):setTimeout(function(){t._sentFlag=!0,t._eventStatModule&&t._eventStatModule.pushIn(t)},0))}},{key:"setError",value:function(e){var t;return e instanceof Error?this._sentFlag||(t=!0,(t=this._netMonitorModule?this._netMonitorModule.isOnline():t)?(e.code&&this.setCode(e.code),e.message&&this.setMoreMessage(e.message)):this.setCode(P.NO_NETWORK),this.setLevel("error")):m.w("".concat(this._n,".setError value not instanceof Error, please check!")),this}},{key:"setCode",value:function(e){return U(e)||this._sentFlag||(e==="ECONNABORTED"&&(this.code=103),Pe(e)?this.code=e:m.w("".concat(this._n,".setCode value not a number, please check!"),e,Ce(e))),this}},{key:"setMessage",value:function(e){return U(e)||this._sentFlag||(Pe(e)&&(this.message=e.toString()),ne(e)&&(this.message=e)),this}},{key:"setCostTime",value:function(e){return this.costTime=e,this}},{key:"setLevel",value:function(e){return U(e)||this._sentFlag||(this.level=ar[e]),this}},{key:"setMoreMessage",value:function(e){return z(this.moreMessage)?this.moreMessage="".concat(e):this.moreMessage+=" ".concat(e),this}},{key:"setNetworkType",value:function(e){return U(e)?m.w("".concat(this._n,".setNetworkType value is undefined, please check!")):(e=Ta[e.toLowerCase()],U(e)||(this.networkType=e)),this}},{key:"getStartTs",value:function(){return this._startts}},{key:"setUIPlatform",value:function(e){return this.uiPlatform=e,this}},{key:"setExtension",value:function(e){return this.extension=e,this}},{key:"setEventType",valu