!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.websdk=t():e.websdk=t()}(self,(function(){return function(){var e={4537:function(e){"use strict";e.exports=function(e,t){for(var r=new Array(arguments.length-1),n=0,o=2,i=!0;o1&&"="===e.charAt(t);)++r;return Math.ceil(3*e.length)/4-r};for(var n=new Array(64),o=new Array(123),i=0;i<64;)o[n[i]=i<26?i+65:i<52?i+71:i<62?i-4:i-59|43]=i++;r.encode=function(e,t,r){for(var o,i=null,a=[],s=0,c=0;t>2],o=(3&u)<<4,c=1;break;case 1:a[s++]=n[o|u>>4],o=(15&u)<<2,c=2;break;case 2:a[s++]=n[o|u>>6],a[s++]=n[63&u],c=0}s>8191&&((i||(i=[])).push(String.fromCharCode.apply(String,a)),s=0)}return c&&(a[s++]=n[o],a[s++]=61,1===c&&(a[s++]=61)),i?(s&&i.push(String.fromCharCode.apply(String,a.slice(0,s))),i.join("")):String.fromCharCode.apply(String,a.slice(0,s))};var a="invalid encoding";r.decode=function(e,t,r){for(var n,i=r,s=0,c=0;c1)break;if(void 0===(u=o[u]))throw Error(a);switch(s){case 0:n=u,s=1;break;case 1:t[r++]=n<<2|(48&u)>>4,n=u,s=2;break;case 2:t[r++]=(15&n)<<4|(60&u)>>2,n=u,s=3;break;case 3:t[r++]=(3&n)<<6|u,s=0}}if(1===s)throw Error(a);return r-i},r.test=function(e){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(e)}},5124:function(e){"use strict";function t(e,r){"string"==typeof e&&(r=e,e=void 0);var n=[];function o(e){if("string"!=typeof e){var r=i();if(t.verbose&&console.log("codegen: "+r),r="return "+r,e){for(var a=Object.keys(e),s=new Array(a.length+1),c=new Array(a.length),u=0;u0?0:2147483648,r,n);else if(isNaN(t))e(2143289344,r,n);else if(t>34028234663852886e22)e((o<<31|2139095040)>>>0,r,n);else if(t<11754943508222875e-54)e((o<<31|Math.round(t/1401298464324817e-60))>>>0,r,n);else{var i=Math.floor(Math.log(t)/Math.LN2);e((o<<31|i+127<<23|8388607&Math.round(t*Math.pow(2,-i)*8388608))>>>0,r,n)}}function a(e,t,r){var n=e(t,r),o=2*(n>>31)+1,i=n>>>23&255,a=8388607&n;return 255===i?a?NaN:o*(1/0):0===i?1401298464324817e-60*o*a:o*Math.pow(2,i-150)*(a+8388608)}e.writeFloatLE=t.bind(null,r),e.writeFloatBE=t.bind(null,n),e.readFloatLE=a.bind(null,o),e.readFloatBE=a.bind(null,i)}(),"undefined"!=typeof Float64Array?function(){var t=new Float64Array([-0]),r=new Uint8Array(t.buffer),n=128===r[7];function o(e,n,o){t[0]=e,n[o]=r[0],n[o+1]=r[1],n[o+2]=r[2],n[o+3]=r[3],n[o+4]=r[4],n[o+5]=r[5],n[o+6]=r[6],n[o+7]=r[7]}function i(e,n,o){t[0]=e,n[o]=r[7],n[o+1]=r[6],n[o+2]=r[5],n[o+3]=r[4],n[o+4]=r[3],n[o+5]=r[2],n[o+6]=r[1],n[o+7]=r[0]}function a(e,n){return r[0]=e[n],r[1]=e[n+1],r[2]=e[n+2],r[3]=e[n+3],r[4]=e[n+4],r[5]=e[n+5],r[6]=e[n+6],r[7]=e[n+7],t[0]}function s(e,n){return r[7]=e[n],r[6]=e[n+1],r[5]=e[n+2],r[4]=e[n+3],r[3]=e[n+4],r[2]=e[n+5],r[1]=e[n+6],r[0]=e[n+7],t[0]}e.writeDoubleLE=n?o:i,e.writeDoubleBE=n?i:o,e.readDoubleLE=n?a:s,e.readDoubleBE=n?s:a}():function(){function t(e,t,r,n,o,i){var a=n<0?1:0;if(a&&(n=-n),0===n)e(0,o,i+t),e(1/n>0?0:2147483648,o,i+r);else if(isNaN(n))e(0,o,i+t),e(2146959360,o,i+r);else if(n>17976931348623157e292)e(0,o,i+t),e((a<<31|2146435072)>>>0,o,i+r);else{var s;if(n<22250738585072014e-324)e((s=n/5e-324)>>>0,o,i+t),e((a<<31|s/4294967296)>>>0,o,i+r);else{var c=Math.floor(Math.log(n)/Math.LN2);1024===c&&(c=1023),e(4503599627370496*(s=n*Math.pow(2,-c))>>>0,o,i+t),e((a<<31|c+1023<<20|1048576*s&1048575)>>>0,o,i+r)}}}function a(e,t,r,n,o){var i=e(n,o+t),a=e(n,o+r),s=2*(a>>31)+1,c=a>>>20&2047,u=4294967296*(1048575&a)+i;return 2047===c?u?NaN:s*(1/0):0===c?5e-324*s*u:s*Math.pow(2,c-1075)*(u+4503599627370496)}e.writeDoubleLE=t.bind(null,r,0,4),e.writeDoubleBE=t.bind(null,n,4,0),e.readDoubleLE=a.bind(null,o,0,4),e.readDoubleBE=a.bind(null,i,4,0)}(),e}function r(e,t,r){t[r]=255&e,t[r+1]=e>>>8&255,t[r+2]=e>>>16&255,t[r+3]=e>>>24}function n(e,t,r){t[r]=e>>>24,t[r+1]=e>>>16&255,t[r+2]=e>>>8&255,t[r+3]=255&e}function o(e,t){return(e[t]|e[t+1]<<8|e[t+2]<<16|e[t+3]<<24)>>>0}function i(e,t){return(e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3])>>>0}e.exports=t(t)},7199:function(e,t,r){"use strict";e.exports=function(e){try{var t=r(822)(e);if(t&&(t.length||Object.keys(t).length))return t}catch(e){}return null}},822:function(e){function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=function(){return[]},t.resolve=t,t.id=822,e.exports=t},8626:function(e,t){"use strict";var r=t,n=r.isAbsolute=function(e){return/^(?:\/|\w+:)/.test(e)},o=r.normalize=function(e){var t=(e=e.replace(/\\/g,"/").replace(/\/{2,}/g,"/")).split("/"),r=n(e),o="";r&&(o=t.shift()+"/");for(var i=0;i0&&".."!==t[i-1]?t.splice(--i,2):r?t.splice(i,1):++i:"."===t[i]?t.splice(i,1):++i;return o+t.join("/")};r.resolve=function(e,t,r){return r||(t=o(t)),n(t)?t:(r||(e=o(e)),(e=e.replace(/(?:\/|^)[^/]+$/,"")).length?o(e+"/"+t):t)}},6662:function(e){"use strict";e.exports=function(e,t,r){var n=r||8192,o=n>>>1,i=null,a=n;return function(r){if(r<1||r>o)return e(r);a+r>n&&(i=e(n),a=0);var s=t.call(i,a,a+=r);return 7&a&&(a=1+(7|a)),s}}},4997:function(e,t){"use strict";var r=t;r.length=function(e){for(var t=0,r=0,n=0;n191&&n<224?i[a++]=(31&n)<<6|63&e[t++]:n>239&&n<365?(n=((7&n)<<18|(63&e[t++])<<12|(63&e[t++])<<6|63&e[t++])-65536,i[a++]=55296+(n>>10),i[a++]=56320+(1023&n)):i[a++]=(15&n)<<12|(63&e[t++])<<6|63&e[t++],a>8191&&((o||(o=[])).push(String.fromCharCode.apply(String,i)),a=0);return o?(a&&o.push(String.fromCharCode.apply(String,i.slice(0,a))),o.join("")):String.fromCharCode.apply(String,i.slice(0,a))},r.write=function(e,t,r){for(var n,o,i=r,a=0;a>6|192,t[r++]=63&n|128):55296==(64512&n)&&56320==(64512&(o=e.charCodeAt(a+1)))?(n=65536+((1023&n)<<10)+(1023&o),++a,t[r++]=n>>18|240,t[r++]=n>>12&63|128,t[r++]=n>>6&63|128,t[r++]=63&n|128):(t[r++]=n>>12|224,t[r++]=n>>6&63|128,t[r++]=63&n|128);return r-i}},4188:function(e,t,r){var n,o,i;!function(a){"use strict";if(null!=t&&"number"!=typeof t.nodeType)e.exports=a();else if(null!=r.amdO)o=[],void 0===(i="function"==typeof(n=a)?n.apply(t,o):n)||(e.exports=i);else{var s=a(),c="undefined"!=typeof self?self:$.global;"function"!=typeof c.btoa&&(c.btoa=s.btoa),"function"!=typeof c.atob&&(c.atob=s.atob)}}((function(){"use strict";var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";function t(e){this.message=e}return t.prototype=new Error,t.prototype.name="InvalidCharacterError",{btoa:function(r){for(var n,o,i=String(r),a=0,s=e,c="";i.charAt(0|a)||(s="=",a%1);c+=s.charAt(63&n>>8-a%1*8)){if((o=i.charCodeAt(a+=3/4))>255)throw new t("'btoa' failed: The string to be encoded contains characters outside of the Latin1 range.");n=n<<8|o}return c},atob:function(r){var n=String(r).replace(/[=]+$/,"");if(n.length%4==1)throw new t("'atob' failed: The string to be decoded is not correctly encoded.");for(var o,i,a=0,s=0,c="";i=n.charAt(s++);~i&&(o=a%4?64*o+i:i,a++%4)?c+=String.fromCharCode(255&o>>(-2*a&6)):0)i=e.indexOf(i);return c}}}))},9667:function(e,t,r){"use strict";r.r(t),r.d(t,{addUsersToChatRoom:function(){return E},addUsersToChatRoomAllowlist:function(){return V},addUsersToChatRoomWhitelist:function(){return z},blockChatRoomMember:function(){return x},blockChatRoomMembers:function(){return D},chatRoomBlockMulti:function(){return L},chatRoomBlockSingle:function(){return U},createChatRoom:function(){return p},deleteChatRoomSharedFile:function(){return ae},destroyChatRoom:function(){return d},disableSendChatRoomMsg:function(){return q},enableSendChatRoomMsg:function(){return K},fetchChatRoomAnnouncement:function(){return ne},fetchChatRoomSharedFileList:function(){return se},getChatRoomAdmin:function(){return S},getChatRoomAllowlist:function(){return $},getChatRoomAttributes:function(){return ue},getChatRoomBlacklist:function(){return W},getChatRoomBlacklistNew:function(){return F},getChatRoomBlocklist:function(){return Z},getChatRoomDetails:function(){return h},getChatRoomMuteList:function(){return k},getChatRoomMuted:function(){return w},getChatRoomMutelist:function(){return P},getChatRoomSharedFilelist:function(){return ce},getChatRoomWhitelist:function(){return Q},getChatRooms:function(){return l},getJoinedChatRooms:function(){return fe},isChatRoomWhiteUser:function(){return ee},isInChatRoomAllowlist:function(){return te},isInChatRoomMutelist:function(){return re},joinChatRoom:function(){return T},leaveChatRoom:function(){return R},listChatRoomMember:function(){return I},listChatRoomMembers:function(){return O},modifyChatRoom:function(){return f},muteChatRoomMember:function(){return b},quitChatRoom:function(){return _},removeChatRoomAdmin:function(){return C},removeChatRoomAllowlistMember:function(){return Y},removeChatRoomAttribute:function(){return he},removeChatRoomAttributes:function(){return de},removeChatRoomBlockMulti:function(){return B},removeChatRoomBlockSingle:function(){return j},removeChatRoomMember:function(){return g},removeChatRoomMembers:function(){return y},removeChatRoomWhitelistMember:function(){return X},removeMultiChatRoomMember:function(){return v},removeMuteChatRoomMember:function(){return N},removeSingleChatRoomMember:function(){return m},rmUsersFromChatRoomWhitelist:function(){return J},setChatRoomAdmin:function(){return A},setChatRoomAttribute:function(){return pe},setChatRoomAttributes:function(){return le},unblockChatRoomMember:function(){return G},unblockChatRoomMembers:function(){return H},unmuteChatRoomMember:function(){return M},updateChatRoomAnnouncement:function(){return oe},uploadChatRoomSharedFile:function(){return ie}}),r(1539),r(8674),r(8309),r(2526),r(1817),r(2222),r(9753),r(9600),r(1249),r(4916),r(3123),r(2165),r(6992),r(8783),r(3948);var n=r(5531),o=r(7252),i=r(4024),a=r(3246),s=r(7360),c=r(1595);function u(e){return u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},u(e)}function l(e){var t=this;if("number"!=typeof e.pagenum||"number"!=typeof e.pagesize)throw Error("Invalid parameter");if(!a.XZ.call(this)){var r=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(r)}var u={pagenum:e.pagenum||1,pagesize:e.pagesize||20},l=this.context,p=l.orgName,d=l.appName,h=l.accessToken,f={url:this.apiUrl+"/"+p+"/"+d+"/chatrooms",dataType:"json",type:"GET",headers:{Authorization:"Bearer "+h},data:u,success:function(t){"function"==typeof e.success&&e.success(t)},error:function(r){r.error&&r.error_description&&t.onError&&t.onError({type:n.E.WEBIM_CONNCTION_LOAD_CHATROOM_ERROR,message:r.error_description,data:r}),"function"==typeof e.error&&e.error(r)}};return s.kg.debug("Call getChatRooms",e),i.hj.call(this,f,c.fI.GET_CHATROOM_LIST)}function p(e){if("string"!=typeof e.name)throw Error("Invalid parameter");if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r={name:e.name,description:e.description,maxusers:e.maxusers,owner:this.user,members:e.members},u=this.context,l=u.orgName,p=u.appName,d=u.accessToken,h=u.jid,f={url:"".concat(this.apiUrl,"/").concat(l,"/").concat(p,"/chatrooms?resource=").concat(h.clientResource),dataType:"json",type:"POST",data:JSON.stringify(r),headers:{Authorization:"Bearer "+(e.token||d),"Content-Type":"application/json"},success:e.success,error:e.error};return s.kg.debug("Call createChatRoom",e),i.hj.call(this,f,c.fI.CREATE_CHATROOM)}function d(e){if("string"!=typeof e.chatRoomId||""===e.chatRoomId)throw Error("Invalid parameter");if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,u=r.orgName,l=r.appName,p=r.accessToken,d=r.jid,h={url:"".concat(this.apiUrl,"/").concat(u,"/").concat(l,"/chatrooms/").concat(e.chatRoomId,"?resource=").concat(d.clientResource,"&version=v3"),dataType:"json",type:"DELETE",headers:{Authorization:"Bearer "+(e.token||p)},success:e.success,error:e.error};return s.kg.debug("Call destroyChatRoom",e),i.hj.call(this,h,c.fI.DESTROY_CHATROOM)}function h(e){if("string"!=typeof e.chatRoomId||""===e.chatRoomId)throw Error("Invalid parameter");if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,u=r.orgName,l=r.appName,p=r.accessToken,d={url:this.apiUrl+"/"+u+"/"+l+"/chatrooms/"+e.chatRoomId,dataType:"json",type:"GET",headers:{Authorization:"Bearer "+p,"Content-Type":"application/json"},success:e.success,error:e.error};return s.kg.debug("Call getChatRoomDetails",e),i.hj.call(this,d,c.fI.GET_CHATROOM_DETAIL)}function f(e){if("string"!=typeof e.chatRoomId||""===e.chatRoomId)throw Error("Invalid parameter");if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,u=r.orgName,l=r.appName,p=r.accessToken,d=r.jid,h=e.chatRoomId,f={groupname:e.chatRoomName,description:e.description,maxusers:e.maxusers},m={url:"".concat(this.apiUrl,"/").concat(u,"/").concat(l,"/chatrooms/").concat(h,"?resource=").concat(d.clientResource),type:"PUT",data:JSON.stringify(f),dataType:"json",headers:{Authorization:"Bearer "+p,"Content-Type":"application/json"},success:e.success,error:e.error};return s.kg.debug("Call modifyChatRoom",e),i.hj.call(this,m,c.fI.MODIFY_CHATROOM)}function m(e){if("string"!=typeof e.chatRoomId||""===e.chatRoomId||"string"!=typeof e.username)throw Error("Invalid parameter");if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,u=r.orgName,l=r.appName,p=r.accessToken,d=r.jid,h=e.chatRoomId,f=e.username,m={url:"".concat(this.apiUrl,"/").concat(u,"/").concat(l,"/chatrooms/").concat(h,"/users/").concat(f,"?resource=").concat(d.clientResource),type:"DELETE",dataType:"json",headers:{Authorization:"Bearer "+p,"Content-Type":"application/json"},success:e.success,error:e.error};return s.kg.debug("Call removeChatRoomMember",e),i.hj.call(this,m,c.fI.REMOVE_CHATROOM_MEMBER)}var g=m;function v(e){if("string"!=typeof e.chatRoomId||""===e.chatRoomId||!Array.isArray(e.users))throw Error("Invalid parameter");if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=e.chatRoomId,u=e.users.join(","),l=this.context,p=l.orgName,d=l.appName,h=l.accessToken,f=l.jid,m={url:"".concat(this.apiUrl,"/").concat(p,"/").concat(d,"/chatrooms/").concat(r,"/users/").concat(u,"?resource=").concat(f.clientResource),type:"DELETE",dataType:"json",headers:{Authorization:"Bearer "+h,"Content-Type":"application/json"},success:e.success,error:e.error};return s.kg.debug("Call removeChatRoomMembers",e),i.hj.call(this,m,c.fI.MULTI_REMOVE_CHATROOM_MEMBER)}var y=v;function E(e){if("string"!=typeof e.chatRoomId||""===e.chatRoomId||!Array.isArray(e.users))throw Error("Invalid parameter");if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=e.chatRoomId,u={usernames:e.users},l=this.context,p=l.orgName,d=l.appName,h=l.accessToken,f=l.jid,m={url:"".concat(this.apiUrl,"/").concat(p,"/").concat(d,"/chatrooms/").concat(r,"/users?resource=").concat(f.clientResource),type:"POST",data:JSON.stringify(u),dataType:"json",headers:{Authorization:"Bearer "+h,"Content-Type":"application/json"},success:e.success,error:e.error};return s.kg.debug("Call addUsersToChatRoom",e),i.hj.call(this,m,c.fI.ADD_USERS_TO_CHATROOM)}function T(e){var t=e.roomId,r=e.message,i=void 0===r?"":r,c=e.ext,u=void 0===c?"":c,l=e.leaveOtherRooms,p=void 0!==l&&l,d=e.success,h=e.error;if("string"!=typeof t||""===t)throw Error("Invalid parameter roomId");if("string"!=typeof u)throw Error("Invalid parameter ext");if("boolean"!=typeof p)throw Error("Invalid parameter leaveOtherRooms");if(!a.XZ.call(this)){var f=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(f)}return s.kg.debug("Call joinChatRoom",e),this.logOut?Promise.reject({type:n.E.WEBIM_CONNECTION_CLOSED,message:"not login"}):this.mSync.handleChatRoom({roomId:t,ext:u,leaveOtherRooms:p,message:i,success:d,error:h},"join")}function _(e){if("string"!=typeof e.roomId||""===e.roomId)throw Error("Invalid parameter");if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}return s.kg.debug("Call leaveChatRoom",e),this.logOut?Promise.reject({type:n.E.WEBIM_CONNECTION_CLOSED,message:"not login"}):this.mSync.handleChatRoom(e,"leave")}var R=_;function I(e){if("string"!=typeof e.chatRoomId||""===e.chatRoomId)throw Error('Invalid parameter: "chatRoomId"');if(isNaN(e.pageNum)||e.pageNum<=0)throw Error('The parameter "pageNum" should be a positive number');if(isNaN(e.pageSize)||e.pageSize<=0)throw Error('The parameter "pageSize" should be a positive number');if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r={pagenum:e.pageNum,pagesize:e.pageSize},u=this.context,l=u.orgName,p=u.appName,d=u.accessToken,h={url:this.apiUrl+"/"+l+"/"+p+"/chatrooms/"+e.chatRoomId+"/users",dataType:"json",type:"GET",data:r,headers:{Authorization:"Bearer "+d,"Content-Type":"application/json"},success:e.success,error:e.error};return s.kg.debug("Call listChatRoomMembers",e),i.hj.call(this,h,c.fI.LIST_CHATROOM_MEMBERS)}var O=I;function S(e){if("string"!=typeof e.chatRoomId||""===e.chatRoomId)throw Error('Invalid parameter: "chatRoomId"');if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,u=r.orgName,l=r.appName,p=r.accessToken,d=e.chatRoomId,h={url:this.apiUrl+"/"+u+"/"+l+"/chatrooms/"+d+"/admin",dataType:"json",type:"GET",headers:{Authorization:"Bearer "+p,"Content-Type":"application/json"},success:e.success,error:e.error};return s.kg.debug("Call getChatRoomAdmin",e),i.hj.call(this,h,c.fI.GET_CHATROOM_ADMIN)}function A(e){if("string"!=typeof e.chatRoomId||""===e.chatRoomId)throw Error('Invalid parameter: "chatRoomId"');if("string"!=typeof e.username||""===e.username)throw Error('Invalid parameter: "username"');if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,u=r.orgName,l=r.appName,p=r.accessToken,d=r.jid,h=e.chatRoomId,f={newadmin:e.username},m={url:"".concat(this.apiUrl,"/").concat(u,"/").concat(l,"/chatrooms/").concat(h,"/admin?resource=").concat(d.clientResource),type:"POST",dataType:"json",data:JSON.stringify(f),headers:{Authorization:"Bearer "+p,"Content-Type":"application/json"},success:e.success,error:e.error};return s.kg.debug("Call setChatRoomAdmin",e),i.hj.call(this,m,c.fI.SET_CHATROOM_ADMIN)}function C(e){if("string"!=typeof e.chatRoomId||""===e.chatRoomId)throw Error('Invalid parameter: "chatRoomId"');if("string"!=typeof e.username||""===e.username)throw Error('Invalid parameter: "username"');if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,u=r.orgName,l=r.appName,p=r.accessToken,d=r.jid,h=e.chatRoomId,f=e.username,m={url:"".concat(this.apiUrl,"/").concat(u,"/").concat(l,"/chatrooms/").concat(h,"/admin/").concat(f,"?resource=").concat(d.clientResource),type:"DELETE",dataType:"json",headers:{Authorization:"Bearer "+p,"Content-Type":"application/json"},success:e.success,error:e.error};return s.kg.debug("Call removeChatRoomAdmin",e),i.hj.call(this,m,c.fI.REMOVE_CHATROOM_ADMIN)}function b(e){if("string"!=typeof e.chatRoomId||""===e.chatRoomId)throw Error('Invalid parameter: "groupId"');if("string"!=typeof e.username||""===e.username)throw Error('Invalid parameter: "username"');if("number"!=typeof e.muteDuration)throw Error('Invalid parameter: "muteDuration"');if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,u=r.orgName,l=r.appName,p=r.accessToken,d=r.jid,h=e.chatRoomId,f={usernames:[e.username],mute_duration:e.muteDuration},m={url:"".concat(this.apiUrl,"/").concat(u,"/").concat(l,"/chatrooms/").concat(h,"/mute?resource=").concat(d.clientResource),dataType:"json",type:"POST",headers:{Authorization:"Bearer "+p,"Content-Type":"application/json"},data:JSON.stringify(f),success:e.success,error:e.error};return s.kg.debug("Call muteChatRoomMember",e),i.hj.call(this,m,c.fI.MUTE_CHATROOM_MEMBER)}function N(e){if("string"!=typeof e.chatRoomId||""===e.chatRoomId)throw Error('Invalid parameter: "chatRoomId"');if("string"!=typeof e.username||""===e.username)throw Error('Invalid parameter: "username"');if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,u=r.orgName,l=r.appName,p=r.accessToken,d=r.jid,h=e.chatRoomId,f=e.username,m={url:"".concat(this.apiUrl,"/").concat(u,"/").concat(l,"/chatrooms/").concat(h,"/mute/").concat(f,"?resource=").concat(d.clientResource),dataType:"json",type:"DELETE",headers:{Authorization:"Bearer "+p,"Content-Type":"application/json"},success:e.success,error:e.error};return s.kg.debug("Call unmuteChatRoomMember",e),i.hj.call(this,m,c.fI.REMOVE_MUTE_CHATROOM_MEMBER)}var M=N;function w(e){if("string"!=typeof e.chatRoomId||""===e.chatRoomId)throw Error('Invalid parameter: "chatRoomId"');if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,u=r.orgName,l=r.appName,p=r.accessToken,d=e.chatRoomId,h={url:this.apiUrl+"/"+u+"/"+l+"/chatrooms/"+d+"/mute",dataType:"json",type:"GET",headers:{Authorization:"Bearer "+p,"Content-Type":"application/json"},success:e.success,error:e.error};return s.kg.debug("Call getChatRoomMutelist",e),i.hj.call(this,h,c.fI.GET_MUTE_CHATROOM_MEMBERS)}var k=w,P=w;function U(e){if("string"!=typeof e.chatRoomId||""===e.chatRoomId)throw Error('Invalid parameter: "chatRoomId"');if("string"!=typeof e.username||""===e.username)throw Error('Invalid parameter: "username"');if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,u=r.orgName,l=r.appName,p=r.accessToken,d=r.jid,h=e.chatRoomId,f=e.username,m={url:"".concat(this.apiUrl,"/").concat(u,"/").concat(l,"/chatrooms/").concat(h,"/blocks/users/").concat(f,"?resource=").concat(d.clientResource),type:"POST",dataType:"json",headers:{Authorization:"Bearer "+p,"Content-Type":"application/json"},success:e.success,error:e.error};return s.kg.debug("Call blockChatRoomMember",e),i.hj.call(this,m,c.fI.SET_CHATROOM_MEMBER_TO_BLACK)}var x=U;function L(e){if("string"!=typeof e.chatRoomId||""===e.chatRoomId)throw Error('Invalid parameter: "chatRoomId"');if(!Array.isArray(e.usernames))throw Error('Invalid parameter: "usernames"');if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,u=r.orgName,l=r.appName,p=r.accessToken,d=r.jid,h=e.chatRoomId,f={usernames:e.usernames},m={url:"".concat(this.apiUrl,"/").concat(u,"/").concat(l,"/chatrooms/").concat(h,"/blocks/users?resource=").concat(d.clientResource),data:JSON.stringify(f),type:"POST",dataType:"json",headers:{Authorization:"Bearer "+p,"Content-Type":"application/json"},success:e.success,error:e.error};return s.kg.debug("Chat blockChatRoomMembers:",m),i.hj.call(this,m,c.fI.MULTI_SET_CHATROOM_MEMBER_TO_BLACK)}var D=L;function j(e){if("string"!=typeof e.chatRoomId||""===e.chatRoomId)throw Error('Invalid parameter: "chatRoomId"');if("string"!=typeof e.username||""===e.username)throw Error('Invalid parameter: "username"');if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,u=r.orgName,l=r.appName,p=r.accessToken,d=r.jid,h=e.chatRoomId,f=e.username,m={url:"".concat(this.apiUrl,"/").concat(u,"/").concat(l,"/chatrooms/").concat(h,"/blocks/users/").concat(f,"?resource=").concat(d.clientResource),type:"DELETE",dataType:"json",headers:{Authorization:"Bearer "+p,"Content-Type":"application/json"},success:e.success,error:e.error};return s.kg.debug("Call unblockChatRoomMember",e),i.hj.call(this,m,c.fI.REMOVE_CHATROOM_MEMBER_BLACK)}var G=j;function B(e){if("string"!=typeof e.chatRoomId||""===e.chatRoomId)throw Error('Invalid parameter: "chatRoomId"');if(!Array.isArray(e.usernames))throw Error('Invalid parameter: "usernames"');if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,u=r.orgName,l=r.appName,p=r.accessToken,d=r.jid,h=e.chatRoomId,f=e.usernames.join(","),m={url:"".concat(this.apiUrl,"/").concat(u,"/").concat(l,"/chatrooms/").concat(h,"/blocks/users/").concat(f,"?resource=").concat(d.clientResource),type:"DELETE",dataType:"json",headers:{Authorization:"Bearer "+p,"Content-Type":"application/json"},success:e.success,error:e.error};return s.kg.debug("Call unblockChatRoomMembers",e),i.hj.call(this,m,c.fI.MULTI_REMOVE_CHATROOM_MEMBER_BLACK)}var H=B;function F(e){if("string"!=typeof e.chatRoomId||""===e.chatRoomId)throw Error('Invalid parameter: "chatRoomId"');if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,u=r.orgName,l=r.appName,p=r.accessToken,d=e.chatRoomId,h={url:this.apiUrl+"/"+u+"/"+l+"/chatrooms/"+d+"/blocks/users",type:"GET",dataType:"json",headers:{Authorization:"Bearer "+p,"Content-Type":"application/json"},success:e.success,error:e.error};return s.kg.debug("Call getChatRoomBlocklist",e),i.hj.call(this,h,c.fI.GET_CHATROOM_BLOCK_MEMBERS)}var W=F,Z=F;function q(e){if("string"!=typeof e.chatRoomId||""===e.chatRoomId)throw Error('Invalid parameter: "chatRoomId"');if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,u=r.orgName,l=r.appName,p=r.accessToken,d=r.jid,h=e.chatRoomId,f={url:"".concat(this.apiUrl,"/").concat(u,"/").concat(l,"/chatrooms/").concat(h,"/ban?resource=").concat(d.clientResource),type:"POST",dataType:"json",headers:{Authorization:"Bearer "+p,"Content-Type":"application/json"},success:e.success,error:e.error};return s.kg.debug("Call disableSendChatRoomMsg",e),i.hj.call(this,f,c.fI.DISABLED_CHATROOM_SEND_MSG)}function K(e){if("string"!=typeof e.chatRoomId||""===e.chatRoomId)throw Error('Invalid parameter: "chatRoomId"');if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,u=r.orgName,l=r.appName,p=r.accessToken,d=r.jid,h=e.chatRoomId,f={url:"".concat(this.apiUrl,"/").concat(u,"/").concat(l,"/chatrooms/").concat(h,"/ban?resource=").concat(d.clientResource),type:"DELETE",dataType:"json",headers:{Authorization:"Bearer "+p,"Content-Type":"application/json"},success:e.success,error:e.error};return s.kg.debug("Call enableSendChatRoomMsg",e),i.hj.call(this,f,c.fI.ENABLE_CHATROOM_SEND_MSG)}function z(e){if("string"!=typeof e.chatRoomId||""===e.chatRoomId)throw Error('Invalid parameter: "chatRoomId"');if(!Array.isArray(e.users))throw Error('Invalid parameter: "users"');if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,u=r.orgName,l=r.appName,p=r.accessToken,d=r.jid,h=e.chatRoomId,f={usernames:e.users},m={url:"".concat(this.apiUrl,"/").concat(u,"/").concat(l,"/chatrooms/").concat(h,"/white/users?resource=").concat(d.clientResource),type:"POST",data:JSON.stringify(f),dataType:"json",headers:{Authorization:"Bearer "+p,"Content-Type":"application/json"},success:e.success,error:e.error};return s.kg.debug("Call addUsersToChatRoomWhitelist",e),i.hj.call(this,m,c.fI.ADD_USERS_TO_CHATROOM)}var V=z;function J(e){if("string"!=typeof e.chatRoomId||""===e.chatRoomId)throw Error('Invalid parameter: "chatRoomId"');if("string"!=typeof e.userName||""===e.userName)throw Error('Invalid parameter: "userName"');if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,u=r.orgName,l=r.appName,p=r.accessToken,d=r.jid,h=e.chatRoomId,f={url:"".concat(this.apiUrl,"/").concat(u,"/").concat(l,"/chatrooms/").concat(h,"/white/users/").concat(e.userName,"?resource=").concat(d.clientResource),type:"DELETE",dataType:"json",headers:{Authorization:"Bearer "+p,"Content-Type":"application/json"},success:e.success,error:e.error};return s.kg.debug("Call removeChatRoomAllowlistMember",e),i.hj.call(this,f,c.fI.REMOVE_CHATROOM_WHITE_USERS)}var X=J,Y=J;function Q(e){if("string"!=typeof e.chatRoomId||""===e.chatRoomId)throw Error('Invalid parameter: "chatRoomId"');if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,u=r.orgName,l=r.appName,p=r.accessToken,d=e.chatRoomId,h={url:this.apiUrl+"/"+u+"/"+l+"/chatrooms/"+d+"/white/users",type:"GET",dataType:"json",headers:{Authorization:"Bearer "+p,"Content-Type":"application/json"},success:e.success,error:e.error};return s.kg.debug("Call getChatRoomAllowlist",e),i.hj.call(this,h,c.fI.GET_CHATROOM_WHITE_USERS)}var $=Q;function ee(e){if("string"!=typeof e.chatRoomId||""===e.chatRoomId)throw Error('Invalid parameter: "chatRoomId"');if("string"!=typeof e.userName||""===e.userName)throw Error('Invalid parameter: "userName"');if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,u=r.orgName,l=r.appName,p=r.accessToken,d=e.chatRoomId,h={url:this.apiUrl+"/"+u+"/"+l+"/chatrooms/"+d+"/white/users/"+e.userName,type:"GET",dataType:"json",headers:{Authorization:"Bearer "+p,"Content-Type":"application/json"},success:e.success,error:e.error};return s.kg.debug("Call isInChatRoomAllowlist",e),i.hj.call(this,h,c.fI.CHECK_CHATROOM_WHITE_USER)}var te=ee;function re(e){if("string"!=typeof e.chatRoomId||""===e.chatRoomId)throw Error('Invalid parameter: "chatRoomId"');if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,c=r.orgName,u=r.appName,l=r.accessToken,p=r.userId,d={url:this.apiUrl+"/"+c+"/"+u+"/sdk/chatrooms/"+e.chatRoomId+"/mute/"+p,dataType:"json",type:"GET",headers:{Authorization:"Bearer "+l}};return s.kg.debug("Call isInChatRoomMutelist",e),i.hj.call(this,d).then((function(e){return{type:e.type,data:e.data}}))}function ne(e){if("string"!=typeof e.roomId||""===e.roomId)throw Error('Invalid parameter: "roomId"');if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,u=r.orgName,l=r.appName,p=r.accessToken,d=e.roomId,h={url:"".concat(this.apiUrl,"/").concat(u,"/").concat(l,"/chatrooms/").concat(d,"/announcement"),type:"GET",dataType:"json",headers:{Authorization:"Bearer "+p,"Content-Type":"application/json"},success:e.success,error:e.error};return s.kg.debug("Call fetchChatRoomAnnouncement",e),i.hj.call(this,h,c.fI.GET_CHATROOM_ANN)}function oe(e){if("string"!=typeof e.roomId||""===e.roomId)throw Error('Invalid parameter: "roomId"');if("string"!=typeof e.announcement)throw Error('Invalid parameter: "announcement"');if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,u=r.orgName,l=r.appName,p=r.accessToken,d=r.jid,h=e.roomId,f={announcement:e.announcement},m={url:"".concat(this.apiUrl,"/").concat(u,"/").concat(l,"/chatrooms/").concat(h,"/announcement?resource=").concat(d.clientResource),type:"POST",dataType:"json",data:JSON.stringify(f),headers:{Authorization:"Bearer "+p,"Content-Type":"application/json"},success:e.success,error:e.error};return s.kg.debug("Call updateChatRoomAnnouncement:",e),i.hj.call(this,m,c.fI.UPDATE_CHATROOM_ANN)}function ie(e){if("string"!=typeof e.roomId||""===e.roomId)throw Error('Invalid parameter: "roomId"');if("object"!==u(e.file))throw Error('Invalid parameter: "file"');if(a.XZ.call(this)){var t=this.context,r=t.orgName,n=t.appName,o=t.accessToken,l=t.jid,p=e.roomId;i.cT.call(this,{uploadUrl:"".concat(this.apiUrl,"/").concat(r,"/").concat(n,"/chatrooms/").concat(p,"/share_files?resource=").concat(l.clientResource),onFileUploadProgress:e.onFileUploadProgress,onFileUploadComplete:e.onFileUploadComplete,onFileUploadError:e.onFileUploadError,onFileUploadCanceled:e.onFileUploadCanceled,accessToken:o,apiUrl:this.apiUrl,file:e.file,appKey:this.context.appKey},c.fI.UPLOAD_CHATROOM_FILE),s.kg.debug("Call uploadChatRoomSharedFile",e)}}function ae(e){if("string"!=typeof e.roomId||""===e.roomId)throw Error('Invalid parameter: "roomId"');if("string"!=typeof e.fileId||""===e.fileId)throw Error('Invalid parameter: "fileId"');if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,u=r.orgName,l=r.appName,p=r.accessToken,d=r.jid,h=e.roomId,f=e.fileId,m={url:"".concat(this.apiUrl,"/").concat(u,"/").concat(l,"/chatrooms/").concat(h,"/share_files/").concat(f,"?resource=").concat(d.clientResource),type:"DELETE",dataType:"json",headers:{Authorization:"Bearer "+p,"Content-Type":"application/json"},success:e.success,error:e.error};return s.kg.debug("Call deleteChatRoomSharedFile",e),i.hj.call(this,m,c.fI.DELETE_CHATROOM_FILE)}function se(e){if("string"!=typeof e.roomId||""===e.roomId)throw Error('Invalid parameter: "roomId"');if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,u=r.orgName,l=r.appName,p=r.accessToken,d=e.roomId,h={url:"".concat(this.apiUrl,"/").concat(u,"/").concat(l,"/chatrooms/").concat(d,"/share_files"),type:"GET",dataType:"json",headers:{Authorization:"Bearer "+p,"Content-Type":"application/json",accept:"application/json"},success:e.success,error:e.error};return s.kg.debug("Call fetchChatRoomSharedFileList",e),i.hj.call(this,h,c.fI.GET_CHATROOM_FILES)}var ce=se;function ue(e){if("string"!=typeof e.chatRoomId||""===e.chatRoomId)throw Error("Invalid parameter chatRoomId: "+e.chatRoomId);if(e.attributeKeys&&!Array.isArray(e.attributeKeys))throw Error('"Invalid parameter attributeKeys": '+e.attributeKeys);if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,u=r.orgName,l=r.appName,p=r.accessToken,d=(r.jid,e.chatRoomId),h={keys:e.attributeKeys},f={url:"".concat(this.apiUrl,"/").concat(u,"/").concat(l,"/metadata/chatroom/").concat(d),type:"POST",dataType:"json",data:JSON.stringify(h),headers:{Authorization:"Bearer "+p,"Content-Type":"application/json"}};return s.kg.debug("Call getChatRoomAttributes:",e),i.hj.call(this,f,c.fI.GET_CHATROOM_ATTR).then((function(e){return{data:e.data,type:e.type}}))}function le(e){if("string"!=typeof e.chatRoomId||""===e.chatRoomId)throw Error("Invalid parameter chatRoomId: "+e.chatRoomId);if("object"!==u(e.attributes))throw Error("Invalid parameter attributes: "+e.attributes);if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,l=r.orgName,p=r.appName,d=r.accessToken,h=r.userId,f=e.chatRoomId,m=e.attributes,g=e.autoDelete,v=void 0===g||g,y=e.isForced?"/forced":"",E={metaData:m,autoDelete:v?"DELETE":"NO_DELETE"},T={url:"".concat(this.apiUrl,"/").concat(l,"/").concat(p,"/metadata/chatroom/").concat(f,"/user/").concat(h)+y,type:"PUT",dataType:"json",data:JSON.stringify(E),headers:{Authorization:"Bearer "+d,"Content-Type":"application/json"}};return s.kg.debug("Call setChatRoomAttributes:",e),i.hj.call(this,T,c.fI.SET_CHATROOM_ATTR).then((function(e){return(0,a._W)(e)}))}function pe(e){var t;if("string"!=typeof e.chatRoomId||""===e.chatRoomId)throw Error("Invalid parameter chatRoomId: "+e.chatRoomId);if("string"!=typeof e.attributeKey||""===e.attributeKey)throw Error("Invalid parameter attributeKey: "+e.attributeKey);if("string"!=typeof e.attributeValue||""===e.attributeValue)throw Error("Invalid parameter attributeValue: "+e.attributeValue);if(!a.XZ.call(this)){var r=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(r)}var u=this.context,l=u.orgName,p=u.appName,d=u.accessToken,h=u.userId,f=e.chatRoomId,m=e.attributeKey,g=e.attributeValue,v=e.autoDelete,y=void 0===v||v,E=e.isForced?"/forced":"",T={metaData:(t={},t[m]=g,t),autoDelete:y?"DELETE":"NO_DELETE"},_={url:"".concat(this.apiUrl,"/").concat(l,"/").concat(p,"/metadata/chatroom/").concat(f,"/user/").concat(h)+E,type:"PUT",dataType:"json",data:JSON.stringify(T),headers:{Authorization:"Bearer "+d,"Content-Type":"application/json"}};return s.kg.debug("Call setChatRoomAttribute:",e),i.hj.call(this,_,c.fI.SET_CHATROOM_ATTR).then((function(e){var t=(0,a.H7)(e);if(t)throw t}))}function de(e){if("string"!=typeof e.chatRoomId||""===e.chatRoomId)throw Error("Invalid parameter chatRoomId: "+e.chatRoomId);if(!Array.isArray(e.attributeKeys))throw Error('"Invalid parameter attributes": '+e.attributeKeys);if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,u=r.orgName,l=r.appName,p=r.accessToken,d=r.userId,h=e.chatRoomId,f=e.attributeKeys,m=e.isForced?"/forced":"",g={keys:f},v={url:"".concat(this.apiUrl,"/").concat(u,"/").concat(l,"/metadata/chatroom/").concat(h,"/user/").concat(d)+m,type:"DELETE",dataType:"json",data:JSON.stringify(g),headers:{Authorization:"Bearer "+p,"Content-Type":"application/json"}};return s.kg.debug("Call removeChatRoomAttributes:",e),i.hj.call(this,v,c.fI.DELETE_CHATROOM_ATTR).then((function(e){return(0,a._W)(e)}))}function he(e){if("string"!=typeof e.chatRoomId||""===e.chatRoomId)throw Error("Invalid parameter chatRoomId: "+e.chatRoomId);if("string"!=typeof e.attributeKey||""===e.attributeKey)throw Error('"Invalid parameter attributeKey": '+e.attributeKey);if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,u=r.orgName,l=r.appName,p=r.accessToken,d=r.userId,h=e.chatRoomId,f=e.attributeKey,m=e.isForced?"/forced":"",g={keys:[f]},v={url:"".concat(this.apiUrl,"/").concat(u,"/").concat(l,"/metadata/chatroom/").concat(h,"/user/").concat(d)+m,type:"DELETE",dataType:"json",data:JSON.stringify(g),headers:{Authorization:"Bearer "+p,"Content-Type":"application/json"}};return s.kg.debug("Call removeChatRoomAttribute:",e),i.hj.call(this,v,c.fI.DELETE_CHATROOM_ATTR).then((function(e){var t=(0,a.H7)(e);if(t)throw t}))}function fe(e){var t=this,r=e||{},u=r.pageNum,l=r.pageSize;if(isNaN(u)||u<=0)throw Error("Invalid parameter pageNum:".concat(u));if(isNaN(l)||l<=0)throw Error("Invalid parameter pageSize:".concat(l));if(!a.XZ.call(this)){var p=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(p)}var d={pagenum:u,pagesize:l,detail:!0},h=this.context,f=h.orgName,m=h.appName,g=h.accessToken,v={url:"".concat(this.apiUrl,"/").concat(f,"/").concat(m,"/users/").concat(this.user,"/joined_chatrooms"),dataType:"json",type:"GET",data:d,headers:{Authorization:"Bearer "+g,"Content-Type":"application/json"}};return s.kg.debug("Call getJoinedChatRooms",e),i.hj.call(this,v,c.fI.GET_USER_JOINED_CHATROOM).then((function(e){var r=(e.data||[]).map((function(e){var r=e.id,n=e.title,o=e.owner,i=e.created,a=e.description,s=e.max_users;return{id:r,name:n,owner:o.split("".concat(t.appKey,"_"))[1],created:i,description:a,maxusers:s}}));return{type:e.type,data:r}}))}},4363:function(e,t,r){"use strict";r.d(t,{U:function(){return s},w:function(){return c}}),r(9601),r(2772),r(1249);var n=r(7360),o=r(8161),i=r(4024),a=function(){return a=Object.assign||function(e){for(var t,r=1,n=arguments.length;r0?g.bodies[0]:{},T={},_={},R=g.type?g.type:y.indexOf("@conference.easemob.com")>-1?"groupChat":"singleChat";R="chat"===R?"singleChat":R,f&&g.type&&(R=s[g.type]);var I="";switch(E.type){case"txt":if(Object.prototype.hasOwnProperty.call(E,"subType")&&"sub_combine"===E.subType)I=o.t.call(this,{remotePath:null==E?void 0:E.url,secret:null==E?void 0:E.secret}),T={id:m,type:"combine",chatType:R,to:g.to,from:g.from,ext:g.ext,time:v,title:E.title||"",summary:E.summary||"",url:I||"",secret:E.secret||"",file_length:E.file_length||0,filename:E.filename||"",compatibleText:E.msg,combineLevel:E.combineLevel||0};else{var O=null===(r=null==g?void 0:g.meta)||void 0===r?void 0:r.edit_msg;if(T={id:m,type:"txt",chatType:R,msg:E.msg||"",to:g.to||"",from:g.from,time:v,ext:g.ext},O){var S=O.edit_time,A=O.operator,C=O.count;T.modifiedInfo={operationTime:S,operatorId:A,operationCount:C}}}break;case"img":I=this.useOwnUploadFun?null==E?void 0:E.url:o.t.call(this,{remotePath:null==E?void 0:E.url,secret:null==E?void 0:E.secret}),T={id:m,type:"img",chatType:R,to:g.to,from:g.from,time:v,ext:g.ext,width:(null===(c=E.size)||void 0===c?void 0:c.width)||0,height:(null===(u=E.size)||void 0===u?void 0:u.height)||0,thumb:this.useOwnUploadFun?"":"".concat(I,"&thumbnail=true"),thumb_secret:E.secret,secret:E.secret||"",url:I||"",file_length:E.file_length||0,file:{}};break;case"video":I=this.useOwnUploadFun?null==E?void 0:E.url:o.t.call(this,{remotePath:null==E?void 0:E.url,secret:null==E?void 0:E.secret}),T={id:m,type:"video",chatType:R,from:g.from,to:g.to,thumb:i.P6.formatAttachUrl.call(this,E.thumb),thumb_secret:E.thumb_secret||"",url:I||"",secret:E.secret||"",filename:E.filename,length:E.length||0,file:{},file_length:E.file_length||0,filetype:g.ext.file_type||"",ext:g.ext,time:v};break;case"loc":T={id:m,type:"loc",chatType:R,from:g.from,to:g.to,buildingName:E.buildingName||"",addr:E.addr,lat:E.lat,lng:E.lng,ext:g.ext,time:v};break;case"audio":I=this.useOwnUploadFun?null==E?void 0:E.url:o.t.call(this,{remotePath:null==E?void 0:E.url,secret:null==E?void 0:E.secret}),T={id:m,type:"audio",chatType:R,from:g.from,to:g.to,secret:E.secret||"",ext:g.ext,time:v,url:I||"",file:{},filename:E.filename,length:E.length||0,file_length:E.file_length||0,filetype:g.ext.file_type||""};break;case"file":I=this.useOwnUploadFun?null==E?void 0:E.url:o.t.call(this,{remotePath:null==E?void 0:E.url,secret:null==E?void 0:E.secret}),T={id:m,type:"file",chatType:R,from:g.from,to:g.to,ext:g.ext,time:v,url:I||"",secret:E.secret||"",file:{},filename:E.filename||"",file_length:E.file_length||0,filetype:g.ext.file_type||""};break;case"cmd":T={id:m,type:"cmd",chatType:R,from:g.from,to:g.to,ext:g.ext,time:v,action:E.action||""};break;case"custom":var b=E.customExts||{};d&&E.customExts&&(b={},E.customExts.map((function(e){b=a(a({},b),e)}))),T={id:m,type:"custom",chatType:R,from:g.from,to:g.to,ext:g.ext,time:v,customEvent:E.customEvent||"",customExts:b};break;case"combine":I=o.t.call(this,{remotePath:null==E?void 0:E.url,secret:null==E?void 0:E.secret}),T={id:m,type:"combine",chatType:R,msg:E.msg||"",to:g.to||"",from:g.from,time:v,ext:g.ext,title:E.title||"",summary:E.summary||"",url:I||"",compatibleText:E.text,combineLevel:E.combineLevel||0,secret:E.secret||"",filename:E.filename||"",file_length:E.file_length||0};break;default:n.kg.error("unexpected message: ".concat(e))}if(g.msgConfig&&(_.msgConfig=g.msgConfig),null==g?void 0:g.meta){var N=g.meta;N.thread&&(_.chatThread={messageId:N.thread.msg_parent_id,parentId:N.thread.muc_parent_id,chatThreadName:N.thread.thread_name}),N.reaction&&(_.reactions=N.reaction),N.translations&&(_.translations=N.translations)}return a(a({},T),_)}},2856:function(e,t,r){"use strict";r.r(t),r.d(t,{acceptGroupInvite:function(){return W},acceptGroupJoinRequest:function(){return G},addUsersToGroupAllowlist:function(){return ve},addUsersToGroupWhitelist:function(){return ge},agreeInviteIntoGroup:function(){return F},agreeJoinGroup:function(){return j},blockGroup:function(){return f},blockGroupMember:function(){return oe},blockGroupMembers:function(){return ae},blockGroupMessages:function(){return m},changeGroupOwner:function(){return _},changeOwner:function(){return T},createGroup:function(){return h},createGroupNew:function(){return d},deleteGroupSharedFile:function(){return we},destroyGroup:function(){return k},disableSendGroupMsg:function(){return fe},dissolveGroup:function(){return w},downloadGroupSharedFile:function(){return Ue},enableSendGroupMsg:function(){return me},fetchGroupAnnouncement:function(){return be},fetchGroupSharedFileList:function(){return ke},getGroup:function(){return y},getGroupAdmin:function(){return A},getGroupAllowlist:function(){return Re},getGroupBlacklist:function(){return de},getGroupBlacklistNew:function(){return pe},getGroupBlocklist:function(){return he},getGroupInfo:function(){return R},getGroupMemberAttributes:function(){return Le},getGroupMembersAttributes:function(){return De},getGroupMsgReadUser:function(){return Ce},getGroupMuteList:function(){return te},getGroupMutelist:function(){return re},getGroupSharedFilelist:function(){return Pe},getGroupWhitelist:function(){return _e},getJoinedGroups:function(){return E},getMuted:function(){return ee},getPublicGroups:function(){return v},groupBlockMulti:function(){return ie},groupBlockSingle:function(){return ne},inviteToGroup:function(){return x},inviteUsersToGroup:function(){return L},isGroupWhiteUser:function(){return Ie},isInGroupAllowlist:function(){return Se},isInGroupMutelist:function(){return Ae},isInGroupWhiteList:function(){return Oe},joinGroup:function(){return D},leaveGroup:function(){return U},listGroupMember:function(){return O},listGroupMembers:function(){return S},listGroups:function(){return g},modifyGroup:function(){return I},mute:function(){return X},muteGroupMember:function(){return Y},quitGroup:function(){return P},rejectGroupInvite:function(){return q},rejectGroupJoinRequest:function(){return H},rejectInviteIntoGroup:function(){return Z},rejectJoinGroup:function(){return B},removeAdmin:function(){return N},removeGroupAdmin:function(){return M},removeGroupAllowlistMember:function(){return Te},removeGroupBlockMulti:function(){return ue},removeGroupBlockSingle:function(){return se},removeGroupMember:function(){return z},removeGroupMembers:function(){return J},removeGroupWhitelistMember:function(){return Ee},removeMultiGroupMember:function(){return V},removeMute:function(){return Q},removeSingleGroupMember:function(){return K},rmUsersFromGroupWhitelist:function(){return ye},setAdmin:function(){return C},setGroupAdmin:function(){return b},setGroupMemberAttributes:function(){return xe},unblockGroupMember:function(){return ce},unblockGroupMembers:function(){return le},unmuteGroupMember:function(){return $},updateGroupAnnouncement:function(){return Ne},uploadGroupSharedFile:function(){return Me}}),r(1539),r(8674),r(2526),r(1817),r(2165),r(6992),r(8783),r(3948),r(2222),r(6699),r(2023),r(9554),r(4747),r(8309),r(9753),r(9600);var n=r(5531),o=r(7252),i=r(4024),a=r(3246),s=r(7360),c=r(1595);function u(e){return u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},u(e)}var l=function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function a(e){try{c(n.next(e))}catch(e){i(e)}}function s(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}c((n=n.apply(e,t||[])).next())}))},p=function(e,t){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]= 0 and "pageSize" should >= 0');if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,u=r.orgName,l=r.appName,p=r.accessToken,d=e.needAffiliations||e.needRole?"/chatgroups/user/".concat(this.user,"?pagenum=").concat(e.pageNum,"&pagesize=").concat(e.pageSize,"&needAffiliations=").concat(e.needAffiliations,"&needRole=").concat(e.needRole):"/users/".concat(this.user,"/joined_chatgroups?pagenum=").concat(e.pageNum,"&pagesize=").concat(e.pageSize),h={url:this.apiUrl+"/"+u+"/"+l+d,dataType:"json",type:"GET",headers:{Authorization:"Bearer "+p,"Content-Type":"application/json"},success:e&&(null==e?void 0:e.success),error:e&&(null==e?void 0:e.error)};return s.kg.debug("Call getGroup",e),i.hj.call(this,h,c.fI.GET_USER_GROUP).then((function(e){var t=e.uri,r=e.entities,n=[];return t.includes("joined_chatgroups")||(r.forEach((function(e){var t={affiliationsCount:e.affiliations_count,groupName:e.name,groupId:e.groupId,role:e.permission,disabled:e.disabled,approval:e.membersonly,allowInvites:e.allowinvites,description:e.description,maxUsers:e.maxusers,public:e.public};n.push(t)})),e.entities=n),e}))}function T(e){if("string"!=typeof e.groupId||"string"!=typeof e.newOwner)throw Error("Invalid parameter");if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r={newowner:e.newOwner},u=this.context,l=u.orgName,p=u.appName,d=u.accessToken,h=u.jid,f={url:"".concat(this.apiUrl,"/").concat(l,"/").concat(p,"/chatgroups/").concat(e.groupId,"?resource=").concat(h.clientResource),type:"PUT",dataType:"json",headers:{Authorization:"Bearer "+d,"Content-Type":"application/json"},data:JSON.stringify(r),success:e.success,error:e.error};return s.kg.debug("Call changeOwner",e),i.hj.call(this,f,c.fI.CHANGE_OWNER)}var _=T;function R(e){if("string"!=typeof e.groupId&&!Array.isArray(e.groupId))throw Error('Invalid parameter: "groupId"');if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,u=r.orgName,l=r.appName,p=r.accessToken,d={url:this.apiUrl+"/"+u+"/"+l+"/chatgroups/"+e.groupId+"?joined_time=true",type:"GET",dataType:"json",headers:{Authorization:"Bearer "+p,"Content-Type":"application/json"},success:e.success,error:e.error};return s.kg.debug("Call getGroupInfo",e),i.hj.call(this,d,c.fI.GET_GROUP_INFO)}function I(e){if("string"!=typeof e.groupId||""===e.groupId)throw Error("Invalid parameter");if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,u=r.orgName,l=r.appName,p=r.accessToken,d=r.jid,h=e.groupId,f={groupname:e.groupName,description:e.description,custom:e.ext},m={url:"".concat(this.apiUrl,"/").concat(u,"/").concat(l,"/chatgroups/").concat(h,"?resource=").concat(d.clientResource),type:"PUT",data:JSON.stringify(f),dataType:"json",headers:{Authorization:"Bearer "+p,"Content-Type":"application/json"},success:e.success,error:e.error};return s.kg.debug("Call modifyGroup",e),i.hj.call(this,m,c.fI.MODIFY_GROUP)}function O(e){if("string"!=typeof e.groupId||""===e.groupId)throw Error('Invalid parameter: "groupId"');if(isNaN(e.pageNum)||e.pageNum<=0)throw Error('The parameter "pageNum" should be a positive number');if(isNaN(e.pageSize)||e.pageSize<=0)throw Error('The parameter "pageSize" should be a positive number');if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r={pagenum:e.pageNum,pagesize:e.pageSize},u=this.context,l=u.orgName,p=u.appName,d=u.accessToken,h={url:this.apiUrl+"/"+l+"/"+p+"/chatgroups/"+e.groupId+"/users",dataType:"json",type:"GET",data:r,headers:{Authorization:"Bearer "+d,"Content-Type":"application/json"},success:e.success,error:e.error};return s.kg.debug("Call listGroupMember",e),i.hj.call(this,h,c.fI.LIST_GROUP_MEMBER)}var S=O;function A(e){if("string"!=typeof e.groupId||""===e.groupId)throw Error('Invalid parameter: "groupId"');if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,u=r.orgName,l=r.appName,p=r.accessToken,d=e.groupId,h={url:this.apiUrl+"/"+u+"/"+l+"/chatgroups/"+d+"/admin",dataType:"json",type:"GET",headers:{Authorization:"Bearer "+p,"Content-Type":"application/json"},success:e.success,error:e.error};return s.kg.debug("Call getGroupAdmin",e),i.hj.call(this,h,c.fI.GET_GROUP_ADMIN)}function C(e){if("string"!=typeof e.groupId||""===e.groupId)throw Error('Invalid parameter: "groupId"');if("string"!=typeof e.username||""===e.username)throw Error('Invalid parameter: "username"');if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,u=r.orgName,l=r.appName,p=r.accessToken,d=r.jid,h=e.groupId,f={newadmin:e.username},m={url:"".concat(this.apiUrl,"/").concat(u,"/").concat(l,"/chatgroups/").concat(h,"/admin?resource=").concat(d.clientResource),type:"POST",dataType:"json",data:JSON.stringify(f),headers:{Authorization:"Bearer "+p,"Content-Type":"application/json"},success:e.success,error:e.error};return s.kg.debug("Call setGroupAdmin",e),i.hj.call(this,m,c.fI.SET_GROUP_ADMIN)}var b=C;function N(e){if("string"!=typeof e.groupId||""===e.groupId)throw Error('Invalid parameter: "groupId"');if("string"!=typeof e.username||""===e.username)throw Error('Invalid parameter: "username"');if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,u=r.orgName,l=r.appName,p=r.accessToken,d=r.jid,h=e.groupId,f=e.username,m={url:"".concat(this.apiUrl,"/").concat(u,"/").concat(l,"/chatgroups/").concat(h,"/admin/").concat(f,"?resource=").concat(d.clientResource),type:"DELETE",dataType:"json",headers:{Authorization:"Bearer "+p,"Content-Type":"application/json"},success:e.success,error:e.error};return s.kg.debug("Call removeAdmin",e),i.hj.call(this,m,c.fI.REMOVE_GROUP_ADMIN)}var M=N;function w(e){if("string"!=typeof e.groupId||""===e.groupId)throw Error('Invalid parameter: "groupId"');if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,u=r.orgName,l=r.appName,p=r.accessToken,d=r.jid,h=e.groupId,f={url:"".concat(this.apiUrl,"/").concat(u,"/").concat(l,"/chatgroups/").concat(h,"?version=v3&resource=").concat(d.clientResource),type:"DELETE",dataType:"json",headers:{Authorization:"Bearer "+p,"Content-Type":"application/json"},success:e.success,error:e.error};return s.kg.debug("Call destroyGroup",e),i.hj.call(this,f,c.fI.DISSOLVE_GROUP)}var k=w;function P(e){if("string"!=typeof e.groupId||""===e.groupId)throw Error('Invalid parameter: "groupId"');if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,u=r.orgName,l=r.appName,p=r.accessToken,d=r.jid,h=e.groupId,f={url:"".concat(this.apiUrl,"/").concat(u,"/").concat(l,"/chatgroups/").concat(h,"/quit?resource=").concat(d.clientResource),type:"DELETE",dataType:"json",headers:{Authorization:"Bearer "+p,"Content-Type":"application/json"},success:e.success,error:e.error};return s.kg.debug("Call quitGroup",e),i.hj.call(this,f,c.fI.QUIT_GROUP)}var U=P;function x(e){if("string"!=typeof e.groupId||""===e.groupId)throw Error('Invalid parameter: "groupId"');if(!Array.isArray(e.users))throw Error('Invalid parameter: "users"');if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=e.groupId,u={usernames:e.users},l=this.context,p=l.orgName,d=l.appName,h=l.accessToken,f=l.jid,m={url:"".concat(this.apiUrl,"/").concat(p,"/").concat(d,"/chatgroups/").concat(r,"/invite?resource=").concat(f.clientResource),type:"POST",data:JSON.stringify(u),dataType:"json",headers:{Authorization:"Bearer "+h,"Content-Type":"application/json"},success:e.success,error:e.error};return s.kg.debug("Call inviteUsersToGroup",e),i.hj.call(this,m,c.fI.INVITE_TO_GROUP)}var L=x;function D(e){if("string"!=typeof e.groupId||""===e.groupId)throw Error('Invalid parameter: "groupId"');if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,u=r.orgName,l=r.appName,p=r.accessToken,d=r.jid,h={url:"".concat(this.apiUrl,"/").concat(u,"/").concat(l,"/chatgroups/").concat(e.groupId,"/apply?resource=").concat(d.clientResource),type:"POST",dataType:"json",data:JSON.stringify({message:e.message||""}),headers:{Authorization:"Bearer "+p,"Content-Type":"application/json"},success:e.success,error:e.error};return s.kg.debug("Call joinGroup",e),i.hj.call(this,h,c.fI.JOIN_GROUP)}function j(e){if("string"!=typeof e.groupId||""===e.groupId)throw Error('Invalid parameter: "groupId"');if("string"!=typeof e.applicant||""===e.applicant)throw Error('Invalid parameter: "applicant"');if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,u=r.orgName,l=r.appName,p=r.accessToken,d=r.jid,h=e.groupId,f={applicant:e.applicant,verifyResult:!0,reason:"no clue"},m={url:"".concat(this.apiUrl,"/").concat(u,"/").concat(l,"/chatgroups/").concat(h,"/apply_verify?resource=").concat(d.clientResource),type:"POST",dataType:"json",data:JSON.stringify(f),headers:{Authorization:"Bearer "+p,"Content-Type":"application/json"},success:e.success,error:e.error};return s.kg.debug("Call agreeJoinGroup",e),i.hj.call(this,m,c.fI.AGREE_JOIN_GROUP)}var G=j;function B(e){if("string"!=typeof e.groupId||""===e.groupId)throw Error('Invalid parameter: "groupId"');if("string"!=typeof e.applicant||""===e.applicant)throw Error('Invalid parameter: "applicant"');if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,u=r.orgName,l=r.appName,p=r.accessToken,d=r.jid,h=e.groupId,f={applicant:e.applicant,verifyResult:!1,reason:e.reason||""},m={url:"".concat(this.apiUrl,"/").concat(u,"/").concat(l,"/chatgroups/").concat(h,"/apply_verify?resource=").concat(d.clientResource),type:"POST",dataType:"json",data:JSON.stringify(f),headers:{Authorization:"Bearer "+p,"Content-Type":"application/json"},success:e.success,error:e.error};return s.kg.debug("Call rejectGroupJoinRequest",e),i.hj.call(this,m,c.fI.REJECT_JOIN_GROUP)}var H=B;function F(e){if("string"!=typeof e.groupId||""===e.groupId)throw Error('Invalid parameter: "groupId"');if("string"!=typeof e.invitee||""===e.invitee)throw Error('Invalid parameter: "invitee"');if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,u=r.orgName,l=r.appName,p=r.accessToken,d=r.jid,h=e.groupId,f={invitee:e.invitee,verifyResult:!0},m={url:"".concat(this.apiUrl,"/").concat(u,"/").concat(l,"/chatgroups/").concat(h,"/invite_verify?resource=").concat(d.clientResource),type:"POST",dataType:"json",data:JSON.stringify(f),headers:{Authorization:"Bearer "+p,"Content-Type":"application/json"},success:e.success,error:e.error};return s.kg.debug("Call acceptGroupInvite",e),i.hj.call(this,m,c.fI.AGREE_INVITE_GROUP)}var W=F;function Z(e){if("string"!=typeof e.groupId||""===e.groupId)throw Error('Invalid parameter: "groupId"');if("string"!=typeof e.invitee||""===e.invitee)throw Error('Invalid parameter: "invitee"');if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,u=r.orgName,l=r.appName,p=r.accessToken,d=r.jid,h=e.groupId,f={invitee:e.invitee,verifyResult:!1},m={url:"".concat(this.apiUrl,"/").concat(u,"/").concat(l,"/chatgroups/").concat(h,"/invite_verify?resource=").concat(d.clientResource),type:"POST",dataType:"json",data:JSON.stringify(f),headers:{Authorization:"Bearer "+p,"Content-Type":"application/json"},success:e.success,error:e.error};return s.kg.debug("Call rejectGroupInvite",e),i.hj.call(this,m,c.fI.REJECT_INVITE_GROUP)}var q=Z;function K(e){if("string"!=typeof e.groupId||""===e.groupId)throw Error('Invalid parameter: "groupId"');if("string"!=typeof e.username||""===e.username)throw Error('Invalid parameter: "username"');if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=e.groupId,u=e.username,l=this.context,p=l.orgName,d=l.appName,h=l.accessToken,f=l.jid,m={url:"".concat(this.apiUrl,"/").concat(p,"/").concat(d,"/chatgroups/").concat(r,"/users/").concat(u,"?resource=").concat(f.clientResource),type:"DELETE",dataType:"json",headers:{Authorization:"Bearer "+h,"Content-Type":"application/json"},success:e.success,error:e.error};return s.kg.debug("Call removeGroupMember",e),i.hj.call(this,m,c.fI.REMOVE_GROUP_MEMBER)}var z=K;function V(e){if("string"!=typeof e.groupId||""===e.groupId)throw Error('Invalid parameter: "groupId"');if(!Array.isArray(e.users))throw Error('Invalid parameter: "users"');if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,u=r.orgName,l=r.appName,p=r.accessToken,d=r.jid,h=e.groupId,f=e.users.join(","),m={url:"".concat(this.apiUrl,"/").concat(u,"/").concat(l,"/chatgroups/").concat(h,"/users/").concat(f,"?resource=").concat(d.clientResource),type:"DELETE",dataType:"json",headers:{Authorization:"Bearer "+p,"Content-Type":"application/json"},success:e.success,error:e.error};return s.kg.debug("Call removeGroupMembers",e),i.hj.call(this,m,c.fI.MULTI_REMOVE_GROUP_MEMBER)}var J=V;function X(e){if("string"!=typeof e.groupId||""===e.groupId)throw Error('Invalid parameter: "groupId"');if(!(Array.isArray(e.username)||"string"==typeof e.username&&""!==e.username))throw Error('Invalid parameter: "username"');if("number"!=typeof e.muteDuration)throw Error('Invalid parameter: "muteDuration"');if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,u=r.orgName,l=r.appName,p=r.accessToken,d=r.jid,h=e.groupId,f={usernames:"string"==typeof e.username?[e.username]:e.username,mute_duration:e.muteDuration},m={url:"".concat(this.apiUrl,"/").concat(u,"/").concat(l,"/chatgroups/").concat(h,"/mute?resource=").concat(d.clientResource),dataType:"json",type:"POST",headers:{Authorization:"Bearer "+p,"Content-Type":"application/json"},data:JSON.stringify(f),success:e.success,error:e.error};return s.kg.debug("Call muteGroupMember",e),i.hj.call(this,m,c.fI.MUTE_GROUP_MEMBER)}var Y=X;function Q(e){if("string"!=typeof e.groupId||""===e.groupId)throw Error('Invalid parameter: "groupId"');if(!(Array.isArray(e.username)||"string"==typeof e.username&&""!==e.username))throw Error('Invalid parameter: "username"');if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,u=r.orgName,l=r.appName,p=r.accessToken,d=r.jid,h=e.groupId,f=e.username,m={url:"".concat(this.apiUrl,"/").concat(u,"/").concat(l,"/chatgroups/").concat(h,"/mute/").concat(f,"?resource=").concat(d.clientResource),dataType:"json",type:"DELETE",headers:{Authorization:"Bearer "+p,"Content-Type":"application/json"},success:e.success,error:e.error};return s.kg.debug("Call unmuteGroupMember",e),i.hj.call(this,m,c.fI.UNMUTE_GROUP_MEMBER)}var $=Q;function ee(e){if("string"!=typeof e.groupId||""===e.groupId)throw Error('Invalid parameter: "groupId"');if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,u=r.orgName,l=r.appName,p=r.accessToken,d=e.groupId,h={url:this.apiUrl+"/"+u+"/"+l+"/chatgroups/"+d+"/mute",dataType:"json",type:"GET",headers:{Authorization:"Bearer "+p,"Content-Type":"application/json"},success:e.success,error:e.error};return s.kg.debug("Call getGroupMuteList",e),i.hj.call(this,h,c.fI.GET_GROUP_MUTE_LIST)}var te=ee,re=ee;function ne(e){if("string"!=typeof e.groupId||""===e.groupId)throw Error('Invalid parameter: "groupId"');if("string"!=typeof e.username||""===e.username)throw Error('Invalid parameter: "username"');if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,u=r.orgName,l=r.appName,p=r.accessToken,d=r.jid,h=e.groupId,f=e.username,m={url:"".concat(this.apiUrl,"/").concat(u,"/").concat(l,"/chatgroups/").concat(h,"/blocks/users/").concat(f,"?resource=").concat(d.clientResource),type:"POST",dataType:"json",headers:{Authorization:"Bearer "+p,"Content-Type":"application/json"},success:e.success,error:e.error};return s.kg.debug("Call blockGroupMember",e),i.hj.call(this,m,c.fI.BLOCK_GROUP_MEMBER)}var oe=ne;function ie(e){if("string"!=typeof e.groupId||""===e.groupId)throw Error('Invalid parameter: "groupId"');if(!Array.isArray(e.usernames))throw Error('Invalid parameter: "usernames"');if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,u=r.orgName,l=r.appName,p=r.accessToken,d=r.jid,h=e.groupId,f={usernames:e.usernames},m={url:"".concat(this.apiUrl,"/").concat(u,"/").concat(l,"/chatgroups/").concat(h,"/blocks/users?resource=").concat(d.clientResource),data:JSON.stringify(f),type:"POST",dataType:"json",headers:{Authorization:"Bearer "+p,"Content-Type":"application/json"},success:e.success,error:e.error};return s.kg.debug("Call blockGroupMembers",e),i.hj.call(this,m,c.fI.BLOCK_GROUP_MEMBERS)}var ae=ie;function se(e){if("string"!=typeof e.groupId||""===e.groupId)throw Error('Invalid parameter: "groupId"');if("string"!=typeof e.username||""===e.username)throw Error('Invalid parameter: "username"');if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,u=r.orgName,l=r.appName,p=r.accessToken,d=r.jid,h=e.groupId,f=e.username,m={url:"".concat(this.apiUrl,"/").concat(u,"/").concat(l,"/chatgroups/").concat(h,"/blocks/users/").concat(f,"?resource=").concat(d.clientResource),type:"DELETE",dataType:"json",headers:{Authorization:"Bearer "+p,"Content-Type":"application/json"},success:e.success,error:e.error};return s.kg.debug("Call unblockGroupMember",e),i.hj.call(this,m,c.fI.UNBLOCK_GROUP_MEMBER)}var ce=se;function ue(e){if("string"!=typeof e.groupId||""===e.groupId)throw Error('Invalid parameter: "groupId"');if(!Array.isArray(e.usernames))throw Error('Invalid parameter: "usernames"');if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,u=r.orgName,l=r.appName,p=r.accessToken,d=r.jid,h=e.groupId,f=e.usernames.join(","),m={url:"".concat(this.apiUrl,"/").concat(u,"/").concat(l,"/chatgroups/").concat(h,"/blocks/users/").concat(f,"?resource=").concat(d.clientResource),type:"DELETE",dataType:"json",headers:{Authorization:"Bearer "+p,"Content-Type":"application/json"},success:e.success,error:e.error};return s.kg.debug("Call unblockGroupMembers",e),i.hj.call(this,m,c.fI.UNBLOCK_GROUP_MEMBERS)}var le=ue;function pe(e){if("string"!=typeof e.groupId||""===e.groupId)throw Error('Invalid parameter: "groupId"');if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,u=r.orgName,l=r.appName,p=r.accessToken,d=e.groupId,h={url:this.apiUrl+"/"+u+"/"+l+"/chatgroups/"+d+"/blocks/users",type:"GET",dataType:"json",headers:{Authorization:"Bearer "+p,"Content-Type":"application/json"},success:e.success,error:e.error};return s.kg.debug("Call getGroupBlacklist",e),i.hj.call(this,h,c.fI.GET_GROUP_BLACK_LIST)}var de=pe,he=pe;function fe(e){if("string"!=typeof e.groupId||""===e.groupId)throw Error('Invalid parameter: "groupId"');if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,u=r.orgName,l=r.appName,p=r.accessToken,d=r.jid,h=e.groupId,f={url:"".concat(this.apiUrl,"/").concat(u,"/").concat(l,"/chatgroups/").concat(h,"/ban?resource=").concat(d.clientResource),type:"POST",dataType:"json",headers:{Authorization:"Bearer "+p,"Content-Type":"application/json"},success:e.success,error:e.error};return s.kg.debug("Call disableSendGroupMsg",e),i.hj.call(this,f,c.fI.DISABLED_SEND_GROUP_MSG)}function me(e){if("string"!=typeof e.groupId||""===e.groupId)throw Error('Invalid parameter: "groupId"');if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,u=r.orgName,l=r.appName,p=r.accessToken,d=r.jid,h=e.groupId,f={url:"".concat(this.apiUrl,"/").concat(u,"/").concat(l,"/chatgroups/").concat(h,"/ban?resource=").concat(d.clientResource),type:"DELETE",dataType:"json",headers:{Authorization:"Bearer "+p,"Content-Type":"application/json"},success:e.success,error:e.error};return s.kg.debug("Call enableSendGroupMsg",e),i.hj.call(this,f,c.fI.ENABLE_SEND_GROUP_MSG)}function ge(e){if("string"!=typeof e.groupId||""===e.groupId)throw Error('Invalid parameter: "groupId"');if(!Array.isArray(e.users))throw Error('Invalid parameter: "users"');if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,u=r.orgName,l=r.appName,p=r.accessToken,d=r.jid,h=e.groupId,f={usernames:e.users},m={url:"".concat(this.apiUrl,"/").concat(u,"/").concat(l,"/chatgroups/").concat(h,"/white/users?resource=").concat(d.clientResource),type:"POST",data:JSON.stringify(f),dataType:"json",headers:{Authorization:"Bearer "+p,"Content-Type":"application/json"},success:e.success,error:e.error};return s.kg.debug("Call addUsersToGroupWhitelist",e),i.hj.call(this,m,c.fI.ADD_USERS_TO_GROUP_WHITE)}var ve=ge;function ye(e){if("string"!=typeof e.groupId||""===e.groupId)throw Error('Invalid parameter: "groupId"');if("string"!=typeof e.userName||""===e.userName)throw Error('Invalid parameter: "userName"');if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,u=r.orgName,l=r.appName,p=r.accessToken,d=r.jid,h=e.groupId,f={url:"".concat(this.apiUrl,"/").concat(u,"/").concat(l,"/chatgroups/").concat(h,"/white/users/").concat(e.userName,"?resource=").concat(d.clientResource),type:"DELETE",dataType:"json",headers:{Authorization:"Bearer "+p,"Content-Type":"application/json"},success:e.success,error:e.error};return s.kg.debug("Call removeGroupAllowlistMember",e),i.hj.call(this,f,c.fI.REMOVE_GROUP_WHITE_MEMBER)}var Ee=ye,Te=ye;function _e(e){if("string"!=typeof e.groupId||""===e.groupId)throw Error('Invalid parameter: "groupId"');if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,u=r.orgName,l=r.appName,p=r.accessToken,d=e.groupId,h={url:this.apiUrl+"/"+u+"/"+l+"/chatgroups/"+d+"/white/users",type:"GET",dataType:"json",headers:{Authorization:"Bearer "+p,"Content-Type":"application/json"},success:e.success,error:e.error};return s.kg.debug("Call getGroupAllowlist",e),i.hj.call(this,h,c.fI.GET_GROUP_WHITE_LIST)}var Re=_e;function Ie(e){if("string"!=typeof e.groupId||""===e.groupId)throw Error('Invalid parameter: "groupId"');if("string"!=typeof e.userName||""===e.userName)throw Error('Invalid parameter: "userName"');if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,u=r.orgName,l=r.appName,p=r.accessToken,d=e.groupId,h={url:this.apiUrl+"/"+u+"/"+l+"/chatgroups/"+d+"/white/users/"+e.userName,type:"GET",dataType:"json",headers:{Authorization:"Bearer "+p,"Content-Type":"application/json"},success:e.success,error:e.error};return s.kg.debug("Call isInGroupAllowlist",e),i.hj.call(this,h,c.fI.IS_IN_GROUP_WHITE_LIST)}var Oe=Ie,Se=Ie;function Ae(e){if("string"!=typeof e.groupId||""===e.groupId)throw Error('Invalid parameter: "groupId"');if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,c=r.orgName,u=r.appName,l=r.accessToken,p=r.userId,d={url:this.apiUrl+"/"+c+"/"+u+"/sdk/chatgroups/"+e.groupId+"/mute/"+p,dataType:"json",type:"GET",headers:{Authorization:"Bearer "+l}};return s.kg.debug("Call isInGroupMutelist",e),i.hj.call(this,d).then((function(e){return{type:e.type,data:e.data}}))}function Ce(e){if("string"!=typeof e.groupId||""===e.groupId)throw Error('Invalid parameter: "groupId"');if("string"!=typeof e.msgId||""===e.msgId)throw Error('Invalid parameter: "msgId"');if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,u=r.orgName,l=r.appName,p=r.accessToken,d={url:this.apiUrl+"/"+u+"/"+l+"/chatgroups/"+e.groupId+"/acks/"+e.msgId,dataType:"json",type:"GET",data:{limit:500,key:void 0},headers:{Authorization:"Bearer "+p},success:e.success,error:e.error};return s.kg.debug("Call getGroupMsgReadUser",e),i.hj.call(this,d,c.fI.GET_GROUP_MSG_READ_USER)}function be(e){if("string"!=typeof e.groupId||""===e.groupId)throw Error('Invalid parameter: "groupId"');if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,u=r.orgName,l=r.appName,p=r.accessToken,d=e.groupId,h={url:"".concat(this.apiUrl,"/").concat(u,"/").concat(l,"/chatgroups/").concat(d,"/announcement"),type:"GET",dataType:"json",headers:{Authorization:"Bearer "+p,"Content-Type":"application/json"},success:e.success,error:e.error};return s.kg.debug("Call fetchGroupAnnouncement",e),i.hj.call(this,h,c.fI.GET_GROUP_ANN)}function Ne(e){if("string"!=typeof e.groupId||""===e.groupId)throw Error('Invalid parameter: "groupId"');if("string"!=typeof e.announcement)throw Error('Invalid parameter: "announcement"');if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,u=r.orgName,l=r.appName,p=r.accessToken,d=r.jid,h=e.groupId,f={announcement:e.announcement},m={url:"".concat(this.apiUrl,"/").concat(u,"/").concat(l,"/chatgroups/").concat(h,"/announcement?resource=").concat(d.clientResource),type:"POST",dataType:"json",data:JSON.stringify(f),headers:{Authorization:"Bearer "+p,"Content-Type":"application/json"},success:e.success,error:e.error};return s.kg.debug("Call updateGroupAnnouncement",e),i.hj.call(this,m,c.fI.UPDATE_GROUP_ANN)}function Me(e){if("string"!=typeof e.groupId||""===e.groupId)throw Error('Invalid parameter: "groupId"');if("object"!==u(e.file))throw Error('Invalid parameter: "file"');if(a.XZ.call(this)){var t=this.context,r=t.orgName,n=t.appName,o=t.accessToken,l=t.jid,p=e.groupId;i.cT.call(this,{uploadUrl:"".concat(this.apiUrl,"/").concat(r,"/").concat(n,"/chatgroups/").concat(p,"/share_files?resource=").concat(l.clientResource),onFileUploadProgress:e.onFileUploadProgress,onFileUploadComplete:e.onFileUploadComplete,onFileUploadError:e.onFileUploadError,onFileUploadCanceled:e.onFileUploadCanceled,accessToken:o,apiUrl:this.apiUrl,file:e.file,appKey:this.context.appKey},c.fI.UPLOAD_GROUP_FILE),s.kg.debug("Call uploadGroupSharedFile",e)}}function we(e){if("string"!=typeof e.groupId||""===e.groupId)throw Error('Invalid parameter: "groupId"');if("string"!=typeof e.fileId||""===e.fileId)throw Error('Invalid parameter: "file"');if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,u=r.orgName,l=r.appName,p=r.accessToken,d=r.jid,h=e.groupId,f=e.fileId,m={url:"".concat(this.apiUrl,"/").concat(u,"/").concat(l,"/chatgroups/").concat(h,"/share_files/").concat(f,"?resource=").concat(d.clientResource),type:"DELETE",dataType:"json",headers:{Authorization:"Bearer "+p,"Content-Type":"application/json"},success:e.success,error:e.error};return s.kg.debug("Call deleteGroupSharedFile",e),i.hj.call(this,m,c.fI.DELETE_GROUP_FILE)}function ke(e){if("string"!=typeof e.groupId||""===e.groupId)throw Error('Invalid parameter: "groupId"');if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,u=r.orgName,l=r.appName,p=r.accessToken,d=e.pageNum||1,h=e.pageSize||10,f=e.groupId,m={url:"".concat(this.apiUrl,"/").concat(u,"/").concat(l,"/chatgroups/").concat(f,"/share_files?pagenum=").concat(d,"&pagesize=").concat(h),type:"GET",dataType:"json",headers:{Authorization:"Bearer "+p,"Content-Type":"application/json"},success:e.success,error:e.error};return s.kg.debug("Call getGroupSharedFilelist",e),i.hj.call(this,m,c.fI.GET_GROUP_FILE_LIST)}var Pe=ke;function Ue(e){var t=this.context,r=t.orgName,n=t.appName,o=t.accessToken,a=this.apiUrl,u=e.groupId,l=e.fileId;i.LR.call(this,{url:"".concat(a,"/").concat(r,"/").concat(n,"/chatgroups/").concat(u,"/share_files/").concat(l),onFileDownloadComplete:e.onFileDownloadComplete,onFileDownloadError:e.onFileDownloadError,accessToken:o,id:l,secret:e.secret},c.fI.DOWN_GROUP_FILE),s.kg.debug("Call downloadGroupSharedFile",e)}function xe(e){return l(this,void 0,void 0,(function(){var t,r,l,d,h,f,m,g,v,y,E;return p(this,(function(p){switch(p.label){case 0:if(t=e.groupId,r=e.userId,l=e.memberAttributes,"string"!=typeof t||""===t)throw Error('Invalid parameter: "groupId"');if("string"!=typeof r||""===r)throw Error('Invalid parameter: "userId"');if("object"!==u(l))throw Error('Invalid parameter: "memberAttributes"');return a.XZ.call(this)?(h=this.context,f=h.orgName,m=h.appName,g=h.accessToken,v=h.jid,y={metaData:l},E={url:"".concat(this.apiUrl,"/").concat(f,"/").concat(m,"/sdk/metadata/chatgroup/").concat(t,"/user/").concat(r,"?resource=").concat(v.clientResource),type:"PUT",dataType:"json",data:JSON.stringify(y),headers:{Authorization:"Bearer "+g,"Content-Type":"application/json"}},s.kg.debug("Call setGroupMemberAttributes",e),[4,i.hj.call(this,E,c.fI.SET_GROUP_MEMBER_ATTRS)]):(d=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"}),[2,Promise.reject(d)]);case 1:return p.sent(),[2]}}))}))}function Le(e){var t=e.groupId,r=e.userId;return De.call(this,{groupId:t,userIds:[r]}).then((function(e){var t;return{type:e.type,data:null===(t=e.data)||void 0===t?void 0:t[r]}}))}function De(e){var t=e.groupId,r=e.userIds,u=e.keys,l=void 0===u?[]:u;if("string"!=typeof t||""===t)throw Error('Invalid parameter: "groupId"');if(!Array.isArray(r)||(null==r?void 0:r.length)<=0)throw Error('Invalid parameter: "userIds"');if(!Array.isArray(l))throw Error('Invalid parameter: "keys"');if(!a.XZ.call(this)){var p=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(p)}var d=this.context,h=d.orgName,f=d.appName,m=d.accessToken,g={targets:r,properties:l},v={url:"".concat(this.apiUrl,"/").concat(h,"/").concat(f,"/sdk/metadata/chatgroup/").concat(t,"/get"),type:"POST",dataType:"json",data:JSON.stringify(g),headers:{Authorization:"Bearer "+m,"Content-Type":"application/json"}};return s.kg.debug("Call getGroupMembersAttributes",e),i.hj.call(this,v,c.fI.GET_GROUP_MEMBER_ATTR).then((function(e){return{type:e.type,data:(null==e?void 0:e.data)||{}}}))}},7479:function(e,t,r){"use strict";r.r(t),r.d(t,{acceptContactInvite:function(){return Z},acceptInvitation:function(){return W},addContact:function(){return B},addConversationMark:function(){return ge},addReaction:function(){return te},addToBlackList:function(){return z},addUsersToBlacklist:function(){return V},addUsersToBlocklist:function(){return J},declineContactInvite:function(){return K},declineInvitation:function(){return q},deleteAllMessagesAndConversations:function(){return Te},deleteContact:function(){return F},deleteConversation:function(){return w},deleteReaction:function(){return re},deleteSession:function(){return M},fetchHistoryMessages:function(){return D},fetchUserInfoById:function(){return U},getAllContacts:function(){return he},getBlacklist:function(){return _},getBlocklist:function(){return R},getContacts:function(){return O},getContactsWithCursor:function(){return fe},getConversationlist:function(){return b},getHistoryMessages:function(){return G},getReactionDetail:function(){return ie},getReactionList:function(){return ne},getReactionlist:function(){return oe},getRoster:function(){return I},getSelfIdsOnOtherPlatform:function(){return Ee},getServerConversations:function(){return ce},getServerConversationsByFilter:function(){return ye},getServerPinnedConversations:function(){return le},getServerPinnedMessages:function(){return Oe},getSessionList:function(){return C},getTokenExpireTimestamp:function(){return L},modifyMessage:function(){return ee},pinConversation:function(){return pe},pinMessage:function(){return Re},recallMessage:function(){return $},removeConversationMark:function(){return ve},removeFromBlackList:function(){return X},removeHistoryMessages:function(){return se},removeRoster:function(){return H},removeUserFromBlackList:function(){return Y},removeUserFromBlocklist:function(){return Q},reportMessage:function(){return ae},setContactRemark:function(){return de},unbindPushToken:function(){return Se},unpinMessage:function(){return Ie},updateCurrentUserNick:function(){return x},updateOwnUserInfo:function(){return k},updateUserInfo:function(){return P},uploadPushToken:function(){return A},uploadToken:function(){return S}}),r(9601),r(1539),r(8674),r(2526),r(1817),r(2165),r(6992),r(8783),r(3948),r(9554),r(4747),r(2222),r(7941),r(6699),r(3710),r(9714),r(9600),r(5069),r(561),r(9753),r(8309),r(1249),r(7327);var n=r(3246),o=r(5531),i=r(7252),a=r(4024),s=r(9937),c=r(8161),u=r(4188),l=r.n(u),p=r(7360),d=r(1595),h=r(4363),f=r(7288),m=r(9743),g=r(6801),v=function(){return v=Object.assign||function(e){for(var t,r=1,n=arguments.length;r0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0&&e.pageSize>0),f={url:"".concat(this.apiUrl,"/").concat(c,"/").concat(u,"/users/").concat(this.user,"/user_channels").concat(h?"/page":""),type:"GET",dataType:"json",headers:{Authorization:"Bearer "+l,"Content-Type":"application/json"},success:e&&(null==e?void 0:e.success),error:e&&(null==e?void 0:e.error)};return h&&(f.data={pageNum:e.pageNum,pageSize:e.pageSize}),p.kg.debug("Call getConversationlist"),a.hj.call(this,f,d.fI.GET_SESSION_LIST).then((function(e){return N.call(t,e)}))}function N(e){var t=this,r=e.data.channel_infos;return null==r||r.forEach((function(e){e.meta&&"{}"!==JSON.stringify(e.meta)?(e.meta.payload=JSON.parse(e.meta.payload),e.lastMessage=h.w.call(t,e.meta,{formatCustomExts:!1})):e.lastMessage=e.meta,delete e.meta})),e}function M(e){if(e&&"string"!=typeof e.channel)throw Error("Invalid parameter channel: ".concat(e.channel));if(e&&"singleChat"!==e.chatType&&"groupChat"!==e.chatType)throw Error("Invalid parameter chatType: ".concat(e.chatType));if(e&&"boolean"!=typeof e.deleteRoam)throw Error("Invalid parameter deleteRoam: ".concat(e.deleteRoam));if(!n.XZ.call(this)){var t=i.Z.create({type:o.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r,s=this.context,c=s.orgName,u=s.appName,l=s.accessToken,h=s.jid;r="singleChat"===e.chatType?"chat":"groupChat";var f={url:"".concat(this.apiUrl,"/").concat(c,"/").concat(u,"/user/").concat(this.user,"/user_channel?resource=").concat(h.clientResource),dataType:"json",type:"DELETE",data:JSON.stringify({channel:e.channel,type:r,delete_roam:e.deleteRoam}),headers:{Authorization:"Bearer "+l,"Content-Type":"application/json"},success:e.success,error:e.error};return p.kg.debug("Call deleteSession",e),a.hj.call(this,f,d.fI.DELETE_SESSION)}var w=M;function k(e,t){if(!n.XZ.call(this)){var r=i.Z.create({type:o.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(r)}var s=this.context,c=s.orgName,u=s.appName,l=s.accessToken,h=["nickname","avatarurl","mail","phone","gender","sign","birth","ext"],f={},m=a.P6.getEnvInfo();if("wx"===m.platform||"qq"===m.platform)if("string"==typeof e&&void 0!==t){if(!h.includes(e))throw new Error("illegal key, only these keys: nickname, avatarurl, mail, phone, gender, sign, birth, ext are allowed");f[e]=t}else{if("[object Object]"!==Object.prototype.toString.call(e))throw new Error("illegal params");h.forEach((function(t){h.includes(t)&&void 0!==e[t]&&(f[t]=e[t])}))}else if("string"==typeof e){if(!h.includes(e))throw new Error("illegal key, only these keys: nickname, avatarurl, mail, phone, gender, sign, birth, ext are allowed");f=e+"="+t}else{if("[object Object]"!==Object.prototype.toString.call(e))throw new Error("illegal params");var g=[];h.forEach((function(t){if(h.includes(t)&&void 0!==e[t]){var r=encodeURIComponent(t),n=encodeURIComponent(e[t]);g.push(r+"="+n)}})),f=g.join("&")}var v={url:"".concat(this.apiUrl,"/").concat(c,"/").concat(u,"/metadata/user/").concat(this.user),type:"PUT",data:f,dataType:"json",headers:{Authorization:"Bearer "+l,"Content-Type":"application/x-www-form-urlencoded"}};return p.kg.debug("Call updateOwnUserInfo",e),a.hj.call(this,v,d.fI.UPDATE_USER_INFO)}var P=k;function U(e,t){if(!n.XZ.call(this)){var r=i.Z.create({type:o.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(r)}var s,c=this.context,u=c.orgName,l=c.appName,h=c.accessToken,f=[];if("string"==typeof e)f=[e];else{if("[object Array]"!==Object.prototype.toString.call(e))throw new Error("illegal params");f=e}s="string"==typeof t?[t]:t&&"[object Array]"===Object.prototype.toString.call(t)?t:["nickname","avatarurl","mail","phone","gender","sign","birth","ext"];var m={url:"".concat(this.apiUrl,"/").concat(u,"/").concat(l,"/metadata/user/get"),type:"POST",data:JSON.stringify({targets:f,properties:s}),dataType:"json",headers:{Authorization:"Bearer "+h,"Content-Type":"application/json"}};return p.kg.debug("Call fetchUserInfoById",e),a.hj.call(this,m,d.fI.GET_USER_INFO)}function x(e){if(!n.XZ.call(this)){var t=i.Z.create({type:o.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,s=r.orgName,c=r.appName,u=r.accessToken,l={url:"".concat(this.apiUrl,"/").concat(s,"/").concat(c,"/users/").concat(this.user),type:"PUT",dataType:"json",data:JSON.stringify({nickname:e}),headers:{Authorization:"Bearer "+u,"Content-Type":"application/json"}};return p.kg.debug("Call updateCurrentUserNick",e),a.hj.call(this,l)}function L(e){if("string"!=typeof e||""===e)throw Error('Invalid parameter: "token"');var t=this.context,r=t.orgName,n=t.appName,o={url:"".concat(this.apiUrl,"/").concat(r,"/").concat(n,"/sdk/users/").concat(this.user,"/token/expires"),type:"GET",dataType:"json",headers:{Authorization:"Bearer "+e,"Content-Type":"application/json"}};return p.kg.debug("Call getTokenExpireTimestamp",e),a.hj.call(this,o,d.fI.SDK_INTERNAL)}function D(e){var t=this;return new Promise((function(r,a){if(!e.queue)throw Error('Invalid parameter: "specified"');if(!n.XZ.call(t)){var s=i.Z.create({type:o.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(s)}(function e(t){var n=this,o=t.count||20;j.call(this,{count:o,isGroup:!!t.isGroup,queue:t.queue,start:t.start,format:t.format,success:function(i){if(i.msgs.length>=o||i.is_last){var a=i.msgs.splice(0,o).reverse();t.success&&t.success(a),r(a)}else e.call(n,v(v({},t),{start:null}))},fail:function(e){a(e),t.fail&&t.fail(e)}})}).call(t,e),p.kg.debug("Call fetchHistoryMessages",e)}))}function j(e){var t=this,r=e.queue,n=this.mr_cache[r]||(this.mr_cache[r]={msgs:[]}),s=this.context.userId,u=e.start||-1,p=e.count||20;if(n.msgs.length>=p||n.is_last)"function"==typeof e.success&&e.success(n);else{n&&n.next_key&&(u=n.next_key),e.start&&(u=e.start);var h={queue:r+(e.isGroup?"@conference.easemob.com":"@easemob.com"),start:u,end:-1},f=this.context,m=f.orgName,g=f.appName,v={url:"".concat(this.apiUrl,"/").concat(m,"/").concat(g,"/users/").concat(s,"/messageroaming"),dataType:"json",type:"POST",headers:{Authorization:"Bearer "+this.token,"Content-Type":"application/json"},data:JSON.stringify(h),success:function(r){return y(t,void 0,void 0,(function(){var t,o,i,a,s,u,p=this;return E(this,(function(d){switch(d.label){case 0:if(t=null==r?void 0:r.data,!r.data.msgs)return"function"==typeof e.success&&e.success(n),n.is_last=!0,n.next_key="",[2];o=t.msgs,i=o.length,n.is_last=t.is_last,n.next_key=t.next_key,a=function(t){return y(p,void 0,void 0,(function(){var r,n,o,i,a;return E(this,(function(s){switch(s.label){case 0:for(r=[],t=l().atob(t),n=0,o=t.length;n18))throw Error('"Invalid parameter beforeTimeStamp": '+e.beforeTimeStamp);if(e.messageIds&&!(Array.isArray(e.messageIds)&&e.messageIds.length>0&&e.messageIds.length<=20))throw Error('"Invalid parameter messageIds": '+e.messageIds);if(!e.messageIds&&!e.beforeTimeStamp)throw Error("messageIds or beforeTimeStamp field is required.");return n.XZ.call(this)?(s=this.context,c=s.orgName,u=s.appName,l=s.userId,d="singleChat"===e.chatType?"userId":"groupId",h="singleChat"===e.chatType?"chat":"group",f=e.messageIds?"".concat(this.apiUrl,"/").concat(c,"/").concat(u,"/sdk/message/roaming/").concat(h,"/user/").concat(l,"?").concat(d,"=").concat(e.targetId,"&msgIdList=").concat(e.messageIds,"&resource=").concat(this.clientResource):"".concat(this.apiUrl,"/").concat(c,"/").concat(u,"/sdk/message/roaming/").concat(h,"/user/").concat(l,"/time?").concat(d,"=").concat(e.targetId,"&delTime=").concat(e.beforeTimeStamp,"&&resource=").concat(this.clientResource),m={url:f,dataType:"json",type:"DELETE",headers:{Authorization:"Bearer "+this.token,"Content-Type":"application/json"}},p.kg.debug("Call removeHistoryMessages",e),[4,a.hj.call(this,m)]):(r=i.Z.create({type:o.E.REST_PARAMS_STATUS,message:"appkey or token error"}),[2,Promise.reject(r)]);case 1:return g.sent(),[2]}}))}))}function ce(e){var t=this;if(!n.XZ.call(this)){var r=i.Z.create({type:o.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(r)}if((null==e?void 0:e.pageSize)&&"number"!=typeof e.pageSize)throw Error("Invalid parameter pageSize: ".concat(e.pageSize));if((null==e?void 0:e.cursor)&&"string"!=typeof e.cursor)throw Error("Invalid parameter cursor: ".concat(e.cursor));var s=this.context,c=s.orgName,u=s.appName,l=s.accessToken,h={url:"".concat(this.apiUrl,"/").concat(c,"/").concat(u,"/sdk/user/").concat(this.user,"/user_channels/list?"),type:"GET",dataType:"json",data:{limit:(null==e?void 0:e.pageSize)||20,cursor:(null==e?void 0:e.cursor)||"",need_mark:!0},headers:{Authorization:"Bearer "+l,"Content-Type":"application/json"}};return p.kg.debug("Call getServerConversations",e),new Promise((function(e,r){a.hj.call(t,h,d.fI.GET_SESSION_LIST).then((function(r){return y(t,void 0,void 0,(function(){var t,n,o=this;return E(this,(function(i){switch(i.label){case 0:return t=ue.call(this,r),this._localCache?(n=t.data.conversations.map((function(e){return y(o,void 0,void 0,(function(){var t,r,n,o;return E(this,(function(i){switch(i.label){case 0:return[4,null===(r=null===(t=this._localCache)||void 0===t?void 0:t.getInstance())||void 0===r?void 0:r.storeMessage(e.lastMessage,f.r.SUCCESS,!0)];case 1:return i.sent(),[4,null===(o=null===(n=this._localCache)||void 0===n?void 0:n.getInstance())||void 0===o?void 0:o.updateLocalConversation((0,m.MQ)({conversationId:e.conversationId,conversationType:e.conversationType}),{unReadCount:e.unReadCount})];case 2:return i.sent(),[2]}}))}))})),[4,Promise.all(n)]):[3,2];case 1:i.sent(),i.label=2;case 2:return e(t),[2]}}))}))})).catch((function(e){r(e)}))}))}function ue(e){var t=this,r=e.data,n=r.cursor,o=r.channel_infos,i=[];null==o||o.forEach((function(e){var r=null;(null==e?void 0:e.meta)&&"{}"!==JSON.stringify(e.meta)&&(e.meta.payload=JSON.parse(e.meta.payload),"delivery"!==(r=h.w.call(t,e.meta)).type&&"read"!==r.type&&"channel"!==r.type&&(r.chatType=h.U[r.chatType]));var n={conversationId:e.session_to,conversationType:"chat"===e.session_type?"singleChat":"groupChat",isPinned:e.is_top,pinnedTime:e.is_top?e.update_top_status_time:0,unReadCount:e.unread_num,lastMessage:r};e.marks&&(n.marks=e.marks.map((function(e){return s.Z[e]}))),i.push(n)}));var a={conversations:i,cursor:n||""};return{type:e.type,data:a}}function le(e){var t=this;if(!n.XZ.call(this)){var r=i.Z.create({type:o.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(r)}if((null==e?void 0:e.pageSize)&&"number"!=typeof e.pageSize)throw Error("Invalid parameter pageSize: ".concat(e.pageSize));if((null==e?void 0:e.cursor)&&"string"!=typeof e.cursor)throw Error("Invalid parameter cursor: ".concat(e.cursor));var s=this.context,c=s.orgName,u=s.appName,l=s.accessToken,h={url:"".concat(this.apiUrl,"/").concat(c,"/").concat(u,"/sdk/user/").concat(this.user,"/user_channels/list?"),type:"GET",dataType:"json",data:{limit:(null==e?void 0:e.pageSize)||20,cursor:(null==e?void 0:e.cursor)||"",is_top:!0,need_mark:!0},headers:{Authorization:"Bearer "+l,"Content-Type":"application/json"}};return p.kg.debug("Call getServerPinnedConversations",e),a.hj.call(this,h,d.fI.GET_SESSION_LIST).then((function(e){return ue.call(t,e)}))}function pe(e){return y(this,void 0,void 0,(function(){var t,r,s,c,u,l,h,f,m,g,v,y,T,_;return E(this,(function(E){if(!n.XZ.call(this))return t=i.Z.create({type:o.E.REST_PARAMS_STATUS,message:"appkey or token error"}),[2,Promise.reject(t)];if(r=e.conversationId,s=e.conversationType,c=e.isPinned,u="singleChat"===s?"chat":"groupChat","string"!=typeof r||""===r)throw Error("Invalid parameter conversationId: ".concat(r));if(!["singleChat","groupChat"].includes(s))throw Error("Invalid parameter conversationType: ".concat(s));if("boolean"!=typeof c)throw Error("Invalid parameter isPinned: ".concat(c));return l=this.context,h=l.orgName,f=l.appName,m=l.accessToken,g=l.jid,v={type:u,to:r},y=c?"":"type=".concat(u,"&to=").concat(r,"&"),T="".concat(this.apiUrl,"/").concat(h,"/").concat(f,"/sdk/user/").concat(this.user,"/user_channel/top?").concat(y,"resource=").concat(g.clientResource),_={url:T,type:c?"POST":"DELETE",dataType:"json",headers:{Authorization:"Bearer "+m,"Content-Type":"application/json"}},c&&(_.data=JSON.stringify(v)),p.kg.debug("Call pinConversation",e),[2,a.hj.call(this,_,d.fI.PIN_CONVERSATION).then((function(e){var t=e.type,r=e.data;return{type:t,data:{isPinned:r.is_top||!1,pinnedTime:r.is_top?r.update_top_status_time:0}}}))]}))}))}function de(e){return y(this,void 0,void 0,(function(){var t,r,s,c,u,l,h,f,m,g;return E(this,(function(v){switch(v.label){case 0:if(t=e.userId,r=e.remark,!n.XZ.call(this))return s=i.Z.create({type:o.E.REST_PARAMS_STATUS,message:"appkey or token error"}),[2,Promise.reject(s)];if("string"!=typeof t||""===t)throw Error('Invalid parameter: "userId"');if("string"!=typeof r)throw Error('Invalid parameter: "remark"');return p.kg.debug("Call setContactRemark",e),c=this.context,u=c.orgName,l=c.appName,h=c.accessToken,f=c.jid,m="".concat(this.apiUrl,"/").concat(u,"/").concat(l,"/users/").concat(this.context.userId,"/contacts/users/").concat(t,"?resource=").concat(f.clientResource),g={url:m,type:"PUT",data:JSON.stringify({remark:r}),dataType:"json",headers:{Authorization:"Bearer "+h,"Content-Type":"application/json"}},[4,a.hj.call(this,g,d.fI.ROSTER_SET_CONTACT_REMARK)];case 1:return v.sent(),[2]}}))}))}function he(){if(!n.XZ.call(this)){var e=i.Z.create({type:o.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(e)}var t=this.context,r=t.orgName,s=t.appName,c=t.accessToken,u={url:"".concat(this.apiUrl,"/").concat(r,"/").concat(s,"/users/").concat(this.user,"/contacts/users?needReturnRemark=true"),dataType:"json",type:"GET",headers:{Authorization:"Bearer "+c}};return p.kg.debug("Call getAllContacts"),a.hj.call(this,u,d.fI.ROSTER_GET_ALL_CONTACTS_REMARKS).then((function(e){var t=((null==e?void 0:e.entities)||[]).map((function(e){return{userId:e.username,remark:e.remark}}));return{type:e.type,data:t}}))}function fe(e){if(!n.XZ.call(this)){var t=i.Z.create({type:o.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}p.kg.debug("Call getContactsWithCursor",e);var r=e||{},s=r.pageSize,c=void 0===s?20:s,u=r.cursor,l=void 0===u?"":u;if(c&&"number"!=typeof c)throw Error("Invalid parameter pageSize: ".concat(e.pageSize));var h=this.context,f=h.orgName,m=h.appName,g=h.accessToken,v={url:"".concat(this.apiUrl,"/").concat(f,"/").concat(m,"/users/").concat(this.user,"/contacts?needReturnRemark=true&limit=").concat(c,"&cursor=").concat(l),dataType:"json",type:"GET",headers:{Authorization:"Bearer "+g}};return a.hj.call(this,v,d.fI.ROSTER_GET_ALL_CONTACTS_REMARKS_FROM_SERVER_BY_PAGE).then((function(e){var t,r,n=(null===(t=null==e?void 0:e.data)||void 0===t?void 0:t.contacts)||[],o=(null===(r=null==e?void 0:e.data)||void 0===r?void 0:r.cursor)||"",i=n.map((function(e){return{userId:e.username,remark:e.remark}}));return{type:e.type,data:{cursor:o,contacts:i}}}))}function me(e){return y(this,void 0,void 0,(function(){var t,r,c,u,l,f,m,g,v,y,_,R,I,O,S;return E(this,(function(E){switch(E.label){case 0:if(!n.XZ.call(this))return t=i.Z.create({type:o.E.REST_PARAMS_STATUS,message:"appkey or token error"}),[2,Promise.reject(t)];if(p.kg.debug("Call markConversation",e),c=(r=e||{}).conversations,u=void 0===c?[]:c,l=r.mark,f=r.isMarked,!Array.isArray(u))throw Error("Invalid parameter conversations");if(m=u.map((function(e){if(!e.conversationId||!["singleChat","groupChat"].includes(e.conversationType))throw Error("Invalid parameter conversations");return{to:e.conversationId,type:T[e.conversationType]}})),"boolean"!=typeof f)throw Error("Invalid parameter isMarked: ".concat(f));if("number"!=typeof l)throw Error("Invalid parameter mark: ".concat(l));return g=this.context,v=g.orgName,y=g.appName,_=g.accessToken,R=g.userId,I=g.jid,O={mark:s.Z[l],targets:m},S={url:"".concat(this.apiUrl,"/").concat(v,"/").concat(y,"/sdk/user/").concat(R,"/user_channels/mark?resource=").concat(I.clientResource),dataType:"json",data:JSON.stringify(O),type:f?"Post":"Delete",headers:{Authorization:"Bearer "+_}},[4,a.hj.call(this,S,d.fI.MARK_CONVERSATION).then((function(e){var t,r=(null===(t=e.data)||void 0===t?void 0:t.ignore)||[];r&&Array.isArray(r)&&r.length>0&&p.kg.debug("markConversation has ignored conversations",r.map((function(e){return{conversationId:e.to,conversationType:h.U[e.type]}})))}))];case 1:return E.sent(),[2]}}))}))}function ge(e){return y(this,void 0,void 0,(function(){var t,r;return E(this,(function(n){return p.kg.debug("Call addConversationMark",e),t=e.conversations,r=e.mark,[2,me.call(this,{conversations:t,mark:r,isMarked:!0})]}))}))}function ve(e){return y(this,void 0,void 0,(function(){var t,r;return E(this,(function(n){return p.kg.debug("Call removeConversationMark",e),t=e.conversations,r=e.mark,[2,me.call(this,{conversations:t,mark:r,isMarked:!1})]}))}))}function ye(e){var t,r,c=this;if(!n.XZ.call(this)){var u=i.Z.create({type:o.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(u)}if(p.kg.debug("Call getServerConversationsByFilter",e),(null==e?void 0:e.pageSize)&&"number"!=typeof e.pageSize)throw Error("Invalid parameter pageSize: ".concat(e.pageSize));if((null==e?void 0:e.cursor)&&"string"!=typeof e.cursor)throw Error("Invalid parameter cursor: ".concat(e.cursor));if("number"!=typeof(null===(t=null==e?void 0:e.filter)||void 0===t?void 0:t.mark))throw Error("Invalid parameter mark: ".concat(null===(r=null==e?void 0:e.filter)||void 0===r?void 0:r.mark));var l=this.context,h=l.orgName,f=l.appName,m=l.accessToken,g="".concat(this.apiUrl,"/").concat(h,"/").concat(f,"/sdk/user/").concat(this.user,"/user_channels/mark/search?"),v=e.pageSize,y=e.cursor,E=((null==e?void 0:e.filter)||{}).mark,T={url:g,type:"GET",dataType:"json",data:{limit:v||10,cursor:y||"",need_mark:!0,mark:s.Z[E]},headers:{Authorization:"Bearer "+m,"Content-Type":"application/json"}};return a.hj.call(this,T,d.fI.GET_SESSION_LIST).then((function(e){return ue.call(c,e)}))}function Ee(){if(!n.XZ.call(this)){var e=i.Z.create({type:o.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(e)}p.kg.debug("Call getSelfIdsOnOtherPlatform");var t=this.context,r=t.orgName,s=t.appName,c=t.accessToken,u=t.userId,l=t.jid,h={url:"".concat(this.apiUrl,"/").concat(r,"/").concat(s,"/users/").concat(u,"/resources"),type:"GET",dataType:"json",headers:{Authorization:"Bearer "+c,"Content-Type":"application/json"}};return a.hj.call(this,h,d.fI.USER_LOGGEDIN_OTHER_PLATFORM).then((function(e){var t,r=null===(t=e.data)||void 0===t?void 0:t.filter((function(e){return e.res!==l.clientResource})),n=null==r?void 0:r.map((function(e){return"".concat(u,"/").concat(e.res)}));return{type:e.type,data:n}}))}function Te(){var e,t,r,s,c,u;return y(this,void 0,void 0,(function(){var l,h,f,m,g,v,y,T,_;return E(this,(function(E){switch(E.label){case 0:return n.XZ.call(this)?(p.kg.debug("Call deleteAllMessagesAndConversations"),h=this.context,f=h.orgName,m=h.appName,g=h.accessToken,v=h.userId,y=h.jid,T="".concat(this.apiUrl,"/").concat(f,"/").concat(m,"/sdk/message/roaming/user/").concat(v,"/delete/all?resource=").concat(y.clientResource),_={url:T,type:"POST",dataType:"json",headers:{Authorization:"Bearer "+g,"Content-Type":"application/json"}},[4,a.hj.call(this,_,d.fI.REST_DELETE_MESSAGES_CONVERSATIONS)]):(l=i.Z.create({type:o.E.REST_PARAMS_STATUS,message:"appkey or token error"}),[2,Promise.reject(l)]);case 1:return E.sent(),null===(t=null===(e=this._localCache)||void 0===e?void 0:e.getInstance())||void 0===t||t.clearConversationMap(),[4,null===(s=null===(r=this._localCache)||void 0===r?void 0:r.getInstance())||void 0===s?void 0:s.clearStoreData("conversationList")];case 2:return E.sent(),[4,null===(u=null===(c=this._localCache)||void 0===c?void 0:c.getInstance())||void 0===u?void 0:u.clearStoreData("message")];case 3:return E.sent(),[2]}}))}))}function _e(e){return y(this,void 0,void 0,(function(){var t,r,s,c,u,l,h,f,m,g,v,y,_,R,I;return E(this,(function(E){switch(E.label){case 0:if(!n.XZ.call(this))return t=i.Z.create({type:o.E.REST_PARAMS_STATUS,message:"appkey or token error"}),[2,Promise.reject(t)];if(p.kg.debug("Call setMessagePinStatus",e),s=(r=e||{}).conversationId,c=void 0===s?"":s,u=r.conversationType,l=r.messageId,h=r.isPinned,"string"!=typeof c||""===c)throw Error("Invalid parameter conversationId");if("string"!=typeof l||""===l)throw Error("Invalid parameter messageId");if("boolean"!=typeof h)throw Error("Invalid parameter isPinned");return f=this.context,m=f.orgName,g=f.appName,v=f.accessToken,y=f.userId,_=f.jid,R={to:c,type:T[u],pin_msg_id:l},I={url:"".concat(this.apiUrl,"/").concat(m,"/").concat(g,"/sdk/user/").concat(y,"/user_channel/pin?resource=").concat(_.clientResource),dataType:"json",data:JSON.stringify(R),type:h?"Post":"Delete",headers:{Authorization:"Bearer "+v}},[4,a.hj.call(this,I,d.fI.REST_PIN_MESSAGE)];case 1:return E.sent(),[2]}}))}))}function Re(e){return y(this,void 0,void 0,(function(){var t,r,n,o;return E(this,(function(i){return p.kg.debug("Call pinMessage",e),r=(t=e||{}).conversationType,n=t.conversationId,o=t.messageId,[2,_e.call(this,{conversationId:n,conversationType:r,messageId:o,isPinned:!0})]}))}))}function Ie(e){return y(this,void 0,void 0,(function(){var t,r,n,o;return E(this,(function(i){return p.kg.debug("Call unpinMessage",e),r=(t=e||{}).conversationType,n=t.conversationId,o=t.messageId,[2,_e.call(this,{conversationId:n,conversationType:r,messageId:o,isPinned:!1})]}))}))}function Oe(e){var t=this;if(!n.XZ.call(this)){var r=i.Z.create({type:o.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(r)}p.kg.debug("Call getServerPinnedMessages",e);var s=e.conversationId,c=e.conversationType,u=e.pageSize,l=e.cursor;if("string"!=typeof s||""===s)throw Error("Invalid parameter conversationId");if(u&&"number"!=typeof u)throw Error("Invalid parameter pageSize: ".concat(u));if(l&&"string"!=typeof l)throw Error("Invalid parameter cursor: ".concat(l));var f=this.context,m=f.orgName,g=f.appName,v=f.accessToken,y={url:"".concat(this.apiUrl,"/").concat(m,"/").concat(g,"/sdk/user/").concat(this.user,"/user_channel/pin"),type:"GET",dataType:"json",data:{to:s,type:T[c],limit:u||10,cursor:l||""},headers:{Authorization:"Bearer "+v,"Content-Type":"application/json"}};return a.hj.call(this,y,d.fI.GET_SESSION_LIST).then((function(e){return{type:0,data:{list:e.data.msg_infos.map((function(e){e.message.payload=JSON.parse(e.message.payload);var r=e.message,n=e.pin_opt_at,o=e.pin_operator;return{message:h.w.call(t,r,{formatChatType:!0}),pinTime:n,operatorId:o}})),cursor:e.data.cursor||""}}}))}function Se(){var e=this;p.kg.debug("Call unbindPushToken");var t={deviceId:this.clientResource,deviceToken:"",notifierName:this.pushCertificateName};return g.r.call(this,t).then((function(t){return e.isRegisterPush=!1,t}))}},3770:function(e,t,r){"use strict";r.r(t),r.d(t,{getPresenceStatus:function(){return m},getSubscribedPresenceList:function(){return h},getSubscribedPresencelist:function(){return f},publishPresence:function(){return l},subscribePresence:function(){return p},unsubscribePresence:function(){return d}}),r(1539),r(8674),r(2526),r(1817),r(2165),r(6992),r(8783),r(3948),r(2222),r(9753);var n=r(4024),o=r(3246),i=r(7252),a=r(5531),s=r(7360),c=function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function a(e){try{c(n.next(e))}catch(e){i(e)}}function s(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}c((n=n.apply(e,t||[])).next())}))},u=function(e,t){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]= 0 and "pageSize" should >= 0');if(!o.XZ.call(this)){var t=i.Z.create({type:a.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,c=r.orgName,u=r.appName,l=r.userId,p=r.accessToken,d={url:"".concat(this.apiUrl,"/").concat(c,"/").concat(u,"/users/").concat(l,"/presence/sublist?pageNum=").concat(e.pageNum,"&pageSize=").concat(e.pageSize),type:"GET",dataType:"json",headers:{Authorization:"Bearer "+p,"Content-Type":"application/json"},success:e.success,error:e.error};return s.kg.debug("Call getSubscribedPresenceList:",e),n.hj.call(this,d).then((function(e){return e.data={result:null==e?void 0:e.result},e}))}var f=h;function m(e){if(!Array.isArray(e.usernames))throw Error('Invalid parameter: "usernames"');if(!e.usernames.length)throw Error('"usernames" can not be empty');if(!o.XZ.call(this)){var t=i.Z.create({type:a.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r={usernames:e.usernames},c=this.context,u=c.orgName,l=c.appName,p=c.userId,d=c.accessToken,h={url:"".concat(this.apiUrl,"/").concat(u,"/").concat(l,"/users/").concat(p,"/presence"),type:"POST",dataType:"json",data:JSON.stringify(r),headers:{Authorization:"Bearer "+d,"Content-Type":"application/json"},success:e.success,error:e.error};return s.kg.debug("Call getPresenceStatus:",e),n.hj.call(this,h).then((function(e){return e.data={result:null==e?void 0:e.result},e}))}},6801:function(e,t,r){"use strict";r.d(t,{r:function(){return u}}),r(1539),r(8674),r(2222),r(4812);var n=r(3246),o=r(5531),i=r(7252),a=r(4024),s=r(7360),c=r(1595);function u(e){if("string"!=typeof e.deviceId||""===e.deviceId)throw Error('Invalid parameter: "deviceId"');if(!n.XZ.call(this)){var t=i.Z.create({type:o.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,u=r.orgName,l=r.appName,p=r.accessToken,d={url:"".concat(this.apiUrl,"/").concat(u,"/").concat(l,"/users/").concat(this.user),type:"PUT",data:JSON.stringify({device_id:e.deviceId,device_token:e.deviceToken,notifier_name:e.notifierName}),dataType:"json",headers:{Authorization:"Bearer "+p,"Content-Type":"application/json"},success:e.success,error:e.error};s.kg.debug("Call uploadPushTokenToServer",e);var h=a.hj.bind(this,d,c.fI.UPLOAD_PUSH_TOKEN);return a.P6.retryPromise(h).then((function(e){var t=e.entities[0]||{};return{type:e.type,data:t}}))}},1735:function(e,t,r){"use strict";r.r(t),r.d(t,{clearRemindTypeForConversation:function(){return p},getPushPerformLanguage:function(){return m},getSilentModeForAll:function(){return u},getSilentModeForConversation:function(){return d},getSilentModeForConversations:function(){return h},getSilentModeRemindTypeConversations:function(){return g},setPushPerformLanguage:function(){return f},setSilentModeForAll:function(){return c},setSilentModeForConversation:function(){return l}}),r(7941),r(1539),r(8674),r(2222),r(9753),r(9554),r(4747),r(9600),r(1249);var n=r(4024),o=r(3246),i=r(7252),a=r(5531),s=r(7360);function c(e){if(!(e.options instanceof Object))throw Error('Invalid parameter: "options"');var t=e.options.paramType;if("number"!=typeof t||t<0||t>2)throw Error('Invalid parameter: "options of paramType"');if(0===t){if("string"!=typeof e.options.remindType)throw Error('Invalid parameter: "options of remindType"')}else if(1===t){if("number"!=typeof e.options.duration)throw Error('Invalid parameter: "options of duration"')}else if(2===t){var r=e.options,c=r.startTime,u=r.endTime;if(!(c instanceof Object&&Object.keys(c).length))throw Error('Invalid parameter: "options of startTime"');if(!c.hours||"number"!=typeof c.hours||!c.minutes||"number"!=typeof c.minutes)throw Error('Invalid parameter: "options of startTime of hours or minutes"');if(!(u instanceof Object&&Object.keys(u).length))throw Error('Invalid parameter: "options of endTime"');if(!u.hours||"number"!=typeof u.hours||!u.minutes||"number"!=typeof u.minutes)throw Error('Invalid parameter: "options of endTime of hours or minutes"')}if(!o.XZ.call(this)){var l=i.Z.create({type:a.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(l)}var p=this.context,d=p.accessToken,h=p.orgName,f=p.appName,m=p.userId,g=p.jid,v={};switch(t){case 0:v={type:e.options.remindType};break;case 1:v={ignoreDuration:e.options.duration};break;case 2:var y=e.options;c=y.startTime,u=y.endTime,v={ignoreInterval:"".concat(c.hours,":").concat(c.minutes,"-").concat(u.hours,":").concat(u.minutes)}}var E={url:"".concat(this.apiUrl,"/").concat(h,"/").concat(f,"/users/").concat(m,"/notification/user/").concat(m,"?resource=").concat(g.clientResource),type:"PUT",dataType:"json",data:JSON.stringify(v),headers:{Authorization:"Bearer "+d,"Content-Type":"application/json"},success:e.success,error:e.error};return s.kg.debug("Call setSilentModeForAll:",e),n.hj.call(this,E)}function u(e){if(!o.XZ.call(this)){var t=i.Z.create({type:a.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,c=r.accessToken,u=r.orgName,l=r.appName,p=r.userId,d={url:"".concat(this.apiUrl,"/").concat(u,"/").concat(l,"/users/").concat(p,"/notification/user/").concat(p),type:"GET",dataType:"json",headers:{Authorization:"Bearer "+c,"Content-Type":"application/json"},success:null==e?void 0:e.success,error:null==e?void 0:e.error};return s.kg.debug("Call getSilentModeForAll:",e),n.hj.call(this,d)}function l(e){if("string"!=typeof e.conversationId||!e.conversationId)throw Error('Invalid parameter: "conversationId"');if("string"!=typeof e.type||!e.type)throw Error('Invalid parameter: "type"');if(!(e.options instanceof Object))throw Error('Invalid parameter: "options"');var t=e.options.paramType;if("number"!=typeof t||t<0||t>2)throw Error('Invalid parameter: "options of paramType"');if(0===t){if("string"!=typeof e.options.remindType)throw Error('Invalid parameter: "options of remindType"')}else if(1===t){if("number"!=typeof e.options.duration)throw Error('Invalid parameter: "options of duration"')}else if(2===t){var r=e.options,c=r.startTime,u=r.endTime;if(!(c instanceof Object&&Object.keys(c).length))throw Error('Invalid parameter: "options of startTime"');if(!c.hours||"number"!=typeof c.hours||!c.minutes||"number"!=typeof c.minutes)throw Error('Invalid parameter: "options of startTime of hours or minutes"');if(!(u instanceof Object&&Object.keys(u).length))throw Error('Invalid parameter: "options of endTime"');if(!u.hours||"number"!=typeof u.hours||!u.minutes||"number"!=typeof u.minutes)throw Error('Invalid parameter: "options of endTime of hours or minutes"')}if(!o.XZ.call(this)){var l=i.Z.create({type:a.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(l)}var p=this.context,d=p.accessToken,h=p.orgName,f=p.appName,m=p.userId,g=p.jid,v="chatgroup",y={};switch(t){case 0:y={type:e.options.remindType};break;case 1:y={ignoreDuration:e.options.duration};break;case 2:var E=e.options;c=E.startTime,u=E.endTime,y={ignoreInterval:"".concat(c.hours,":").concat(c.minutes,"-").concat(u.hours,":").concat(u.minutes)}}"singleChat"===e.type&&(v="user");var T={url:"".concat(this.apiUrl,"/").concat(h,"/").concat(f,"/users/").concat(m,"/notification/").concat(v,"/").concat(e.conversationId,"?resource=").concat(g.clientResource),type:"PUT",dataType:"json",data:JSON.stringify(y),headers:{Authorization:"Bearer "+d,"Content-Type":"application/json"},success:e.success,error:e.error};return s.kg.debug("Call setSilentModeForConversation:",e),n.hj.call(this,T)}function p(e){if("string"!=typeof e.conversationId||!e.conversationId)throw Error('Invalid parameter: "conversationId"');if("string"!=typeof e.type||!e.type)throw Error('Invalid parameter: "type"');if(!o.XZ.call(this)){var t=i.Z.create({type:a.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,c=r.accessToken,u=r.orgName,l=r.appName,p=r.userId,d=r.jid,h="chatgroup";"singleChat"===e.type&&(h="user");var f={url:"".concat(this.apiUrl,"/").concat(u,"/").concat(l,"/users/").concat(p,"/notification/").concat(h,"/").concat(e.conversationId,"?resource=").concat(d.clientResource),type:"PUT",dataType:"json",data:JSON.stringify({type:"DEFAULT"}),headers:{Authorization:"Bearer "+c,"Content-Type":"application/json"},success:e.success,error:e.error};return s.kg.debug("Call clearRemindTypeForConversation:",e),n.hj.call(this,f)}function d(e){if("string"!=typeof e.conversationId||!e.conversationId)throw Error('Invalid parameter: "conversationId"');if("string"!=typeof e.type||!e.type)throw Error('Invalid parameter: "type"');if(!o.XZ.call(this)){var t=i.Z.create({type:a.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,c=r.accessToken,u=r.orgName,l=r.appName,p=r.userId,d="chatgroup";"singleChat"===e.type&&(d="user");var h={url:"".concat(this.apiUrl,"/").concat(u,"/").concat(l,"/users/").concat(p,"/notification/").concat(d,"/").concat(e.conversationId),type:"GET",dataType:"json",headers:{Authorization:"Bearer "+c,"Content-Type":"application/json"},success:e.success,error:e.error};return s.kg.debug("Call getSilentModeForConversation:",e),n.hj.call(this,h)}function h(e){if(!Array.isArray(e.conversationList))throw Error('Invalid parameter: "conversationList"');if(!o.XZ.call(this)){var t=i.Z.create({type:a.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,c=r.accessToken,u=r.orgName,l=r.appName,p=r.userId,d=[],h=[];e.conversationList.forEach((function(e){"singleChat"===e.type?d.push(e.id):h.push(e.id)}));var f=d.length?d.join(","):"",m=h.length?h.join(","):"",g={url:"".concat(this.apiUrl,"/").concat(u,"/").concat(l,"/users/").concat(p,"/notification?user=").concat(f,"&group=").concat(m),type:"GET",dataType:"json",headers:{Authorization:"Bearer "+c,"Content-Type":"application/json"},success:e.success,error:e.error};return s.kg.debug("Call getSilentModeForConversations:",e),n.hj.call(this,g)}function f(e){if("string"!=typeof e.language||!e.language)throw Error('Invalid parameter: "language"');if(!o.XZ.call(this)){var t=i.Z.create({type:a.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r={translationLanguage:e.language},c=this.context,u=c.accessToken,l=c.orgName,p=c.appName,d=c.userId,h={url:"".concat(this.apiUrl,"/").concat(l,"/").concat(p,"/users/").concat(d,"/notification/language"),type:"PUT",dataType:"json",data:JSON.stringify(r),headers:{Authorization:"Bearer "+u,"Content-Type":"application/json"},success:e.success,error:e.error};return s.kg.debug("Call setPushPerformLanguage:",e),n.hj.call(this,h)}function m(e){if(!o.XZ.call(this)){var t=i.Z.create({type:a.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,c=r.accessToken,u=r.orgName,l=r.appName,p=r.userId,d={url:"".concat(this.apiUrl,"/").concat(u,"/").concat(l,"/users/").concat(p,"/notification/language"),type:"GET",dataType:"json",headers:{Authorization:"Bearer "+c,"Content-Type":"application/json"},success:null==e?void 0:e.success,error:null==e?void 0:e.error};return s.kg.debug("Call getPushPerformLanguage:",e),n.hj.call(this,d)}function g(e){if(!o.XZ.call(this)){var t=i.Z.create({type:a.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}if("number"!=typeof e.pageSize)throw Error('Invalid parameter: "pageSize"');var r=this.context,c=r.accessToken,u=r.orgName,l=r.appName,p=r.userId,d={limit:e.pageSize||10,cursor:e.cursor};e.cursor||delete d.cursor;var h={url:"".concat(this.apiUrl,"/").concat(u,"/").concat(l,"/users/").concat(p,"/notification/mute/type"),type:"GET",dataType:"json",data:d,headers:{Authorization:"Bearer "+c,"Content-Type":"application/json"}};return s.kg.debug("Call getSilentModeRemindTypeConversations:",e),n.hj.call(this,h).then((function(e){return e.data?{data:{conversations:e.data.map((function(e){return"user"in e?{conversationId:e.user,type:"singleChat",remindType:e.value}:{conversationId:e.group,type:"groupChat",remindType:e.value}})),cursor:e.cursor},type:e.type}:e}))}},7384:function(e,t,r){"use strict";r.r(t),r.d(t,{changeChatThreadName:function(){return f},createChatThread:function(){return l},destroyChatThread:function(){return h},getChatThreadDetail:function(){return _},getChatThreadLastMessage:function(){return E},getChatThreadMembers:function(){return m},getChatThreads:function(){return y},getJoinedChatThreads:function(){return v},joinChatThread:function(){return p},leaveChatThread:function(){return d},removeChatThreadMember:function(){return g}}),r(1539),r(8674),r(2526),r(1817),r(2165),r(6992),r(8783),r(3948),r(8309),r(2222),r(9554),r(4747),r(9753);var n=r(5531),o=r(7252),i=r(4024),a=r(3246),s=r(4363),c=function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function a(e){try{c(n.next(e))}catch(e){i(e)}}function s(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}c((n=n.apply(e,t||[])).next())}))},u=function(e,t){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0?"fail":"success",errorKeys:t.errorKeys,successKeys:t.successKeys},type:r}}function l(e){var t=e.data,r=void 0;return Object.keys(t.errorKeys).length>0&&Object.keys(t.errorKeys).forEach((function(e){var i=t.errorKeys[e];r=i.includes("is not part of you")?o.Z.create({type:n.E.NO_PERMISSION,message:i}):i.includes("size of metadata for this single chatroom exceeds the user defined limit")||i.includes("total size of chatroom metadata for this app exceeds the user defined limit")||i.includes("is exceeding maximum limit")?o.Z.create({type:n.E.MAX_LIMIT,message:i}):i.includes("is not Legal")?o.Z.create({type:n.E.REQUEST_PARAMETER_ERROR,message:i}):i.includes("Failed to update userMetadata. Concurrent updates not allowed")?o.Z.create({type:n.E.OPERATION_NOT_ALLOWED,message:i}):o.Z.create({type:n.E.WEBIM_CONNCTION_AJAX_ERROR,message:i})})),r}},4319:function(e,t,r){"use strict";r.d(t,{Ge:function(){return h},Gf:function(){return i},Nt:function(){return c},XV:function(){return l},al:function(){return p},bh:function(){return f},ke:function(){return d},th:function(){return s},xd:function(){return u},xz:function(){return o},zj:function(){return a}});var n=r(5531),o=15e3,i=15e3,a=3e5,s=1e4,c=1e4,u=8e3,l=3e5,p=3e4,d=5,h=3,f=[n.E.MAX_LIMIT,n.E.WEBIM_TOKEN_EXPIRED,n.E.WEBIM_CONNCTION_TOKEN_NOT_ASSIGN_ERROR,n.E.USER_NOT_FOUND,n.E.WEBIM_CONNCTION_AUTH_ERROR,n.E.REQUEST_PARAMETER_ERROR,n.E.WEBIM_CONNCTION_AUTH_ERROR,n.E.WEBIM_SERVER_SERVING_DISABLED]},2071:function(e,t,r){"use strict";r.d(t,{$x:function(){return s},F3:function(){return c},TJ:function(){return o},Tp:function(){return p},Wc:function(){return n},el:function(){return i},iB:function(){return u},iO:function(){return a},yK:function(){return l}}),r(6992),r(1532),r(1539),r(8783),r(3948);var n=7,o=new Map,i="im",a=new Map,s="32f24ab2ddb74f508aa9286c356cec84",c=1e3,u={INIT:9674,API:9675},l="direct",p=-1},1595:function(e,t,r){"use strict";var n,o,i,a,s,c;r.d(t,{C8:function(){return n},aC:function(){return c},c:function(){return i},dd:function(){return s},fI:function(){return o},td:function(){return a}}),function(e){e[e.UNKNOWOPERATION=-1]="UNKNOWOPERATION",e[e.REST_GET_SESSION_LIST=1]="REST_GET_SESSION_LIST",e[e.REST_DEL_SESSION=2]="REST_DEL_SESSION",e[e.REST_GET_HISTORY_MESSAGE=3]="REST_GET_HISTORY_MESSAGE",e[e.REST_PIN_CONVERSATION=4]="REST_PIN_CONVERSATION",e[e.REST_MARK_CONVERSATION=5]="REST_MARK_CONVERSATION",e[e.REST_UPLOAD_FILE_IN_PARTS=6]="REST_UPLOAD_FILE_IN_PARTS",e[e.REST_DELETE_MESSAGES_CONVERSATIONS=7]="REST_DELETE_MESSAGES_CONVERSATIONS",e[e.REST_PIN_MESSAGE=8]="REST_PIN_MESSAGE",e[e.REST_FETCH_PINMESSAGES=9]="REST_FETCH_PINMESSAGES",e[e.REST_OPERATE=100]="REST_OPERATE",e[e.MSYNC_SENDMESSAGE=101]="MSYNC_SENDMESSAGE",e[e.MSYNC_RECALLMESSAGE=102]="MSYNC_RECALLMESSAGE",e[e.MSYNC_MODIFYMESSAGE=103]="MSYNC_MODIFYMESSAGE",e[e.MSYNC_OPERATE=200]="MSYNC_OPERATE",e[e.ROSTER_ADD=201]="ROSTER_ADD",e[e.ROSTER_REMOVE=202]="ROSTER_REMOVE",e[e.ROSTER_ACCEPT=203]="ROSTER_ACCEPT",e[e.ROSTER_DECLINE=204]="ROSTER_DECLINE",e[e.ROSTER_BAN=205]="ROSTER_BAN",e[e.ROSTER_ALLOW=206]="ROSTER_ALLOW",e[e.ROSTER_BLACKLIST=207]="ROSTER_BLACKLIST",e[e.ROSTER_CONTACTS=208]="ROSTER_CONTACTS",e[e.ROSTER_GET_ALL_CONTACTS_REMARKS=209]="ROSTER_GET_ALL_CONTACTS_REMARKS",e[e.ROSTER_GET_ALL_CONTACTS_REMARKS_FROM_SERVER_BY_PAGE=210]="ROSTER_GET_ALL_CONTACTS_REMARKS_FROM_SERVER_BY_PAGE",e[e.ROSTER_SET_CONTACT_REMARK=211]="ROSTER_SET_CONTACT_REMARK",e[e.ROSTER_OPERATE=300]="ROSTER_OPERATE",e[e.USER_LOGIN=301]="USER_LOGIN",e[e.USER_CREATE=302]="USER_CREATE",e[e.USER_UPDATE_USERINFO=303]="USER_UPDATE_USERINFO",e[e.USER_FETCH_USERINFO=304]="USER_FETCH_USERINFO",e[e.USER_UPDATE_NICK=305]="USER_UPDATE_NICK",e[e.USER_UPLOAD_PUSH_TOKEN=306]="USER_UPLOAD_PUSH_TOKEN",e[e.USER_LOGGEDIN_OTHER_PLATFORM=307]="USER_LOGGEDIN_OTHER_PLATFORM",e[e.USER_OPERATE=400]="USER_OPERATE",e[e.GROUP_CREATEGROUP=401]="GROUP_CREATEGROUP",e[e.GROUP_BLOCK_MESSAGE=402]="GROUP_BLOCK_MESSAGE",e[e.GROUP_FETCH_PUBLICGROUPS_WITHCURSOR=403]="GROUP_FETCH_PUBLICGROUPS_WITHCURSOR",e[e.GROUP_FETCH_USERS_GROUP=404]="GROUP_FETCH_USERS_GROUP",e[e.GROUP_CHANGE_OWNER=405]="GROUP_CHANGE_OWNER",e[e.GROUP_FETCH_SPECIFICATION=406]="GROUP_FETCH_SPECIFICATION",e[e.GROUP_CHANGE_GROUPATTRIBUTE=407]="GROUP_CHANGE_GROUPATTRIBUTE",e[e.GROUP_FETCH_MEMEBERS=408]="GROUP_FETCH_MEMEBERS",e[e.GROUP_GET_ADMIN=409]="GROUP_GET_ADMIN",e[e.GROUP_SET_ADMIN=410]="GROUP_SET_ADMIN",e[e.GROUP_REMOVE_ADMIN=411]="GROUP_REMOVE_ADMIN",e[e.GROUP_DESTOTYGROUP=412]="GROUP_DESTOTYGROUP",e[e.GROUP_LEAVEGROUP=413]="GROUP_LEAVEGROUP",e[e.GROUP_INVITE_TO_GROUP=414]="GROUP_INVITE_TO_GROUP",e[e.GROUP_JOIN_PUBLICGROUP=415]="GROUP_JOIN_PUBLICGROUP",e[e.GROUP_ACCEPT_JOINPUBLICGROUPAPPL=416]="GROUP_ACCEPT_JOINPUBLICGROUPAPPL",e[e.GROUP_DECLINE_JOINPUBLICGROUPAPPL=417]="GROUP_DECLINE_JOINPUBLICGROUPAPPL",e[e.GROUP_ACCEPT_INVITATION=418]="GROUP_ACCEPT_INVITATION",e[e.GROUP_DECLINE_INVITATION=419]="GROUP_DECLINE_INVITATION",e[e.GROUP_REMOVE_MEMBER=420]="GROUP_REMOVE_MEMBER",e[e.GROUP_REMOVE_MEMBERS=421]="GROUP_REMOVE_MEMBERS",e[e.GROUP_MUTE_MEMBERS=422]="GROUP_MUTE_MEMBERS",e[e.GROUP_UNMUTE_MEMBERS=423]="GROUP_UNMUTE_MEMBERS",e[e.GROUP_FETCH_MUTES=424]="GROUP_FETCH_MUTES",e[e.GROUP_BLOCK_MEMBER=425]="GROUP_BLOCK_MEMBER",e[e.GROUP_BLOCK_MEMBERS=426]="GROUP_BLOCK_MEMBERS",e[e.GROUP_UNBLOCK_MEMBER=427]="GROUP_UNBLOCK_MEMBER",e[e.GROUP_UNBLOCK_MEMBERS=428]="GROUP_UNBLOCK_MEMBERS",e[e.GROUP_GET_BLOCK_LIST=429]="GROUP_GET_BLOCK_LIST",e[e.GROUP_MUTE_ALLMEMBERS=430]="GROUP_MUTE_ALLMEMBERS",e[e.GROUP_UNMUTE_ALLMEMBERS=431]="GROUP_UNMUTE_ALLMEMBERS",e[e.GROUP_ADD_WHITELIST=432]="GROUP_ADD_WHITELIST",e[e.GROUP_REMOVE_WHITELIST=433]="GROUP_REMOVE_WHITELIST",e[e.GROUP_FETCH_WHITELIST=434]="GROUP_FETCH_WHITELIST",e[e.GROUP_IS_IN_WHITELIST=435]="GROUP_IS_IN_WHITELIST",e[e.GROUP_GET_READ_USERS=436]="GROUP_GET_READ_USERS",e[e.GROUP_FETCH_ANNOUNCEMENT=437]="GROUP_FETCH_ANNOUNCEMENT",e[e.GROUP_UPDATE_ANNOUNCEMENT=438]="GROUP_UPDATE_ANNOUNCEMENT",e[e.GROUP_UPLOAD_SHAREDFILE=439]="GROUP_UPLOAD_SHAREDFILE",e[e.GROUP_DELETE_SHAREDFILE=440]="GROUP_DELETE_SHAREDFILE",e[e.GROUP_FETCH_SHAREDFILE=441]="GROUP_FETCH_SHAREDFILE",e[e.GROUP_DOWNLOAD_SHAREDFILE=442]="GROUP_DOWNLOAD_SHAREDFILE",e[e.GROUP_MEMBER_SET_META_DATA=443]="GROUP_MEMBER_SET_META_DATA",e[e.GROUP_MEMBER_FETCH_META_DATA=444]="GROUP_MEMBER_FETCH_META_DATA",e[e.GROUP_OPERATE=500]="GROUP_OPERATE",e[e.CHATROOM_FETCH_CHATROOMSWITHPAGE=501]="CHATROOM_FETCH_CHATROOMSWITHPAGE",e[e.CHATROOM_CREATECHATROOM=502]="CHATROOM_CREATECHATROOM",e[e.CHATROOM_DESTORYCHATROOM=503]="CHATROOM_DESTORYCHATROOM",e[e.CHATROOM_FETCH_SPECIFICATION=504]="CHATROOM_FETCH_SPECIFICATION",e[e.CHATROOM_CHANGE_ATTRIBUTE=505]="CHATROOM_CHANGE_ATTRIBUTE",e[e.CHATROOM_REMOVE_MEMBER=506]="CHATROOM_REMOVE_MEMBER",e[e.CHATROOM_REMOVE_MEMBERS=507]="CHATROOM_REMOVE_MEMBERS",e[e.CHATROOM_ADD_MEMBERS=508]="CHATROOM_ADD_MEMBERS",e[e.CHATROOM_JOINCAHTROOM=509]="CHATROOM_JOINCAHTROOM",e[e.CHATROOM_LEAVECAHTROOM=510]="CHATROOM_LEAVECAHTROOM",e[e.CHATROOM_FETCH_MEMBERS=511]="CHATROOM_FETCH_MEMBERS",e[e.CHATROOM_GET_ADMIN=512]="CHATROOM_GET_ADMIN",e[e.CHATROOM_SET_ADMIN=513]="CHATROOM_SET_ADMIN",e[e.CHATROOM_REMOVE_ADMIN=514]="CHATROOM_REMOVE_ADMIN",e[e.CHATROOM_MUTE_USER=515]="CHATROOM_MUTE_USER",e[e.CHATROOM_UNMUTE_USER=516]="CHATROOM_UNMUTE_USER",e[e.CHATROOM_FETCH_MUTES=517]="CHATROOM_FETCH_MUTES",e[e.CHATROOM_BLOCK_USER=518]="CHATROOM_BLOCK_USER",e[e.CHATROOM_BLOCK_USERS=519]="CHATROOM_BLOCK_USERS",e[e.CHATROOM_UNBLOCK_USER=520]="CHATROOM_UNBLOCK_USER",e[e.CHATROOM_UNBLOCK_USERS=521]="CHATROOM_UNBLOCK_USERS",e[e.CHATROOM_FETCH_BANS=522]="CHATROOM_FETCH_BANS",e[e.CHATROOM_MUTE_ALLMEMEBERS=523]="CHATROOM_MUTE_ALLMEMEBERS",e[e.CHATROOM_UNMUTE_ALLMEMEBERS=524]="CHATROOM_UNMUTE_ALLMEMEBERS",e[e.CHATROOM_ADD_WHITELIST=525]="CHATROOM_ADD_WHITELIST",e[e.CHATROOM_REMOVE_WHITELIST=526]="CHATROOM_REMOVE_WHITELIST",e[e.CHATROOM_FETCH_WHITELIST=527]="CHATROOM_FETCH_WHITELIST",e[e.CHATROOM_FETCH_MEMBERIN_WHITELIST=528]="CHATROOM_FETCH_MEMBERIN_WHITELIST",e[e.CHATROOM_FETCH_ANNOUNCEMENT=529]="CHATROOM_FETCH_ANNOUNCEMENT",e[e.CHATROOM_UPDATE_ANNOUNCEMENT=530]="CHATROOM_UPDATE_ANNOUNCEMENT",e[e.CHATROOM_REMOVE_SHARE_FILE=531]="CHATROOM_REMOVE_SHARE_FILE",e[e.CHATROOM_GET_SHARE_FILE_LIST=532]="CHATROOM_GET_SHARE_FILE_LIST",e[e.CHATROOM_UPLOAD_FILE=533]="CHATROOM_UPLOAD_FILE",e[e.CHATROOM_SET_META_DATA=534]="CHATROOM_SET_META_DATA",e[e.CHATROOM_DELETE_META_DATA=535]="CHATROOM_DELETE_META_DATA",e[e.CHATROOM_FETCH_META_DATA=536]="CHATROOM_FETCH_META_DATA",e[e.CHATROOM_FETCH_USER_JOINED_CHATROOM=537]="CHATROOM_FETCH_USER_JOINED_CHATROOM",e[e.CHATROOM_OPERATE=600]="CHATROOM_OPERATE"}(n||(n={})),function(e){e.SDK_INTERNAL="SDK_INTERNAL",e.LOGIN="USER_LOGIN",e.REGISTER="USER_CREATE",e.GET_CHATROOM_LIST="CHATROOM_FETCH_CHATROOMSWITHPAGE",e.CREATE_CHATROOM="CHATROOM_CREATECHATROOM",e.DESTROY_CHATROOM="CHATROOM_DESTORYCHATROOM",e.GET_CHATROOM_DETAIL="CHATROOM_FETCH_SPECIFICATION",e.MODIFY_CHATROOM="CHATROOM_CHANGE_ATTRIBUTE",e.REMOVE_CHATROOM_MEMBER="CHATROOM_REMOVE_MEMBER",e.MULTI_REMOVE_CHATROOM_MEMBER="CHATROOM_REMOVE_MEMBERS",e.ADD_USERS_TO_CHATROOM="CHATROOM_ADD_MEMBERS",e.JOIN_CHATROOM="CHATROOM_JOINCAHTROOM",e.QUIT_CHATROOM="CHATROOM_LEAVECAHTROOM",e.LIST_CHATROOM_MEMBERS="CHATROOM_FETCH_MEMBERS",e.GET_CHATROOM_ADMIN="CHATROOM_GET_ADMIN",e.SET_CHATROOM_ADMIN="CHATROOM_SET_ADMIN",e.REMOVE_CHATROOM_ADMIN="CHATROOM_REMOVE_ADMIN",e.MUTE_CHATROOM_MEMBER="CHATROOM_MUTE_USER",e.REMOVE_MUTE_CHATROOM_MEMBER="CHATROOM_UNMUTE_USER",e.GET_MUTE_CHATROOM_MEMBERS="CHATROOM_FETCH_MUTES",e.SET_CHATROOM_MEMBER_TO_BLACK="CHATROOM_BLOCK_USER",e.MULTI_SET_CHATROOM_MEMBER_TO_BLACK="CHATROOM_BLOCK_USERS",e.REMOVE_CHATROOM_MEMBER_BLACK="CHATROOM_UNBLOCK_USER",e.MULTI_REMOVE_CHATROOM_MEMBER_BLACK="CHATROOM_UNBLOCK_USERS",e.GET_CHATROOM_BLOCK_MEMBERS="CHATROOM_FETCH_BANS",e.DISABLED_CHATROOM_SEND_MSG="CHATROOM_MUTE_ALLMEMEBERS",e.ENABLE_CHATROOM_SEND_MSG="CHATROOM_UNMUTE_ALLMEMEBERS",e.ADD_CHATROOM_WHITE_USERS="CHATROOM_ADD_WHITELIST",e.REMOVE_CHATROOM_WHITE_USERS="CHATROOM_REMOVE_WHITELIST",e.GET_CHATROOM_WHITE_USERS="CHATROOM_FETCH_WHITELIST",e.CHECK_CHATROOM_WHITE_USER="CHATROOM_FETCH_MEMBERIN_WHITELIST",e.GET_CHATROOM_ANN="CHATROOM_FETCH_ANNOUNCEMENT",e.UPDATE_CHATROOM_ANN="CHATROOM_UPDATE_ANNOUNCEMENT",e.DELETE_CHATROOM_FILE="CHATROOM_REMOVE_SHARE_FILE",e.GET_CHATROOM_FILES="CHATROOM_GET_SHARE_FILE_LIST",e.UPLOAD_CHATROOM_FILE="CHATROOM_UPLOAD_FILE",e.SET_CHATROOM_ATTR="CHATROOM_SET_META_DATA",e.DELETE_CHATROOM_ATTR="CHATROOM_DELETE_META_DATA",e.GET_CHATROOM_ATTR="CHATROOM_FETCH_META_DATA",e.GET_USER_JOINED_CHATROOM="CHATROOM_FETCH_USER_JOINED_CHATROOM",e.CREATE_GROUP="GROUP_CREATEGROUP",e.BLOCK_GROUP="GROUP_BLOCK_MESSAGE",e.LIST_GROUP="GROUP_FETCH_PUBLICGROUPS_WITHCURSOR",e.GET_USER_GROUP="GROUP_FETCH_USERS_GROUP",e.CHANGE_OWNER="GROUP_CHANGE_OWNER",e.GET_GROUP_INFO="GROUP_FETCH_SPECIFICATION",e.MODIFY_GROUP="GROUP_CHANGE_GROUPATTRIBUTE",e.LIST_GROUP_MEMBER="GROUP_FETCH_MEMEBERS",e.GET_GROUP_ADMIN="GROUP_GET_ADMIN",e.SET_GROUP_ADMIN="GROUP_SET_ADMIN",e.REMOVE_GROUP_ADMIN="GROUP_REMOVE_ADMIN",e.DISSOLVE_GROUP="GROUP_DESTOTYGROUP",e.QUIT_GROUP="GROUP_LEAVEGROUP",e.INVITE_TO_GROUP="GROUP_INVITE_TO_GROUP",e.JOIN_GROUP="GROUP_JOIN_PUBLICGROUP",e.AGREE_JOIN_GROUP="GROUP_ACCEPT_JOINPUBLICGROUPAPPL",e.REJECT_JOIN_GROUP="GROUP_DECLINE_JOINPUBLICGROUPAPPL",e.AGREE_INVITE_GROUP="GROUP_ACCEPT_INVITATION",e.REJECT_INVITE_GROUP="GROUP_DECLINE_INVITATION",e.REMOVE_GROUP_MEMBER="GROUP_REMOVE_MEMBER",e.MULTI_REMOVE_GROUP_MEMBER="GROUP_REMOVE_MEMBERS",e.MUTE_GROUP_MEMBER="GROUP_MUTE_MEMBERS",e.UNMUTE_GROUP_MEMBER="GROUP_UNMUTE_MEMBERS",e.GET_GROUP_MUTE_LIST="GROUP_FETCH_MUTES",e.BLOCK_GROUP_MEMBER="GROUP_BLOCK_MEMBER",e.BLOCK_GROUP_MEMBERS="GROUP_BLOCK_MEMBERS",e.UNBLOCK_GROUP_MEMBER="GROUP_UNBLOCK_MEMBER",e.UNBLOCK_GROUP_MEMBERS="GROUP_UNBLOCK_MEMBERS",e.GET_GROUP_BLACK_LIST="GROUP_GET_BLOCK_LIST",e.DISABLED_SEND_GROUP_MSG="GROUP_MUTE_ALLMEMBERS",e.ENABLE_SEND_GROUP_MSG="GROUP_UNMUTE_ALLMEMBERS",e.ADD_USERS_TO_GROUP_WHITE="GROUP_ADD_WHITELIST",e.REMOVE_GROUP_WHITE_MEMBER="GROUP_REMOVE_WHITELIST",e.GET_GROUP_WHITE_LIST="GROUP_FETCH_WHITELIST",e.IS_IN_GROUP_WHITE_LIST="GROUP_IS_IN_WHITELIST",e.GET_GROUP_MSG_READ_USER="GROUP_GET_READ_USERS",e.GET_GROUP_ANN="GROUP_FETCH_ANNOUNCEMENT",e.UPDATE_GROUP_ANN="GROUP_UPDATE_ANNOUNCEMENT",e.UPLOAD_GROUP_FILE="GROUP_UPLOAD_SHAREDFILE",e.DELETE_GROUP_FILE="GROUP_DELETE_SHAREDFILE",e.GET_GROUP_FILE_LIST="GROUP_FETCH_SHAREDFILE",e.DOWN_GROUP_FILE="GROUP_DOWNLOAD_SHAREDFILE",e.SET_GROUP_MEMBER_ATTRS="GROUP_MEMBER_SET_META_DATA",e.GET_GROUP_MEMBER_ATTR="GROUP_MEMBER_FETCH_META_DATA",e.GET_SESSION_LIST="REST_GET_SESSION_LIST",e.DELETE_SESSION="REST_DEL_SESSION",e.GET_HISTORY_MSG="REST_GET_HISTORY_MESSAGE",e.PIN_CONVERSATION="REST_PIN_CONVERSATION",e.REST_UPLOAD_FILE_IN_PARTS="REST_UPLOAD_FILE_IN_PARTS",e.REST_DELETE_MESSAGES_CONVERSATIONS="REST_DELETE_MESSAGES_CONVERSATIONS",e.MARK_CONVERSATION="REST_MARK_CONVERSATION",e.REST_FETCH_PINMESSAGES="REST_FETCH_PINMESSAGES",e.REST_PIN_MESSAGE="REST_PIN_MESSAGE",e.UPDATE_USER_INFO="USER_UPDATE_USERINFO",e.GET_USER_INFO="USER_FETCH_USERINFO",e.UPDATE_USER_NICK="USER_UPDATE_NICK",e.UPLOAD_PUSH_TOKEN="USER_UPLOAD_PUSH_TOKEN",e.USER_LOGGEDIN_OTHER_PLATFORM="USER_LOGGEDIN_OTHER_PLATFORM",e.GET_BLACK_LIST="ROSTER_BLACKLIST",e.GET_CONTACTS="ROSTER_CONTACTS",e.ROSTER_GET_ALL_CONTACTS_REMARKS="ROSTER_GET_ALL_CONTACTS_REMARKS",e.ROSTER_GET_ALL_CONTACTS_REMARKS_FROM_SERVER_BY_PAGE="ROSTER_GET_ALL_CONTACTS_REMARKS_FROM_SERVER_BY_PAGE",e.ROSTER_SET_CONTACT_REMARK="ROSTER_SET_CONTACT_REMARK",e.ROSTER_ADD="ROSTER_ADD",e.ROSTER_REMOVE="ROSTER_REMOVE",e.ROSTER_ACCEPT="ROSTER_ACCEPT",e.ROSTER_DECLINE="ROSTER_DECLINE",e.ROSTER_BAN="ROSTER_BAN",e.ROSTER_ALLOW="ROSTER_ALLOW",e.SEND_MSG="MSYNC_SENDMESSAGE",e.UPLOAD_MSG_ATTACH="UPLOAD_MSG_ATTACH",e.SEND_RECALL_MSG="MSYNC_RECALLMESSAGE",e.MODIFY_MESSAGE="MSYNC_MODIFYMESSAGE"}(o||(o={})),function(e){e.GET_DNS="REST_DNSLIST",e.LOGIN_BY_AGORA_TOKEN="LOGIN_BY_AGORA_TOKEN",e.LOGIN_BY_PWD="LOGIN_BY_PWD",e.RESISTER="REGISTER",e.REST_INIT_UPLOAD_TASK_IN_PARTS="REST_INIT_UPLOAD_TASK_IN_PARTS",e.REST_UPLOAD_PART="REST_UPLOAD_PART",e.REST_COMPLETE_UPLOAD_PART="REST_COMPLETE_UPLOAD_PART",e.REST_ABORT_UPLOAD_PART="REST_ABORT_UPLOAD_PART",e.CONNECT_WEBSOCKET="CONNECT_WEBSOCKET"}(i||(i={})),function(e){e[e["5G"]=7]="5G",e[e["4G"]=7]="4G",e[e["3G"]=7]="3G",e[e["2G"]=7]="2G",e[e["SLOW-2G"]=7]="SLOW-2G",e[e.WIFI=2]="WIFI",e[e.LAN=1]="LAN",e[e.DISCONNECTED=0]="DISCONNECTED",e[e.NONE=0]="NONE",e[e.UNKNOWN=-1]="UNKNOWN",e[e["WEBIM UNABLE TO GET"]=-2]="WEBIM UNABLE TO GET"}(a||(a={})),function(e){e[e.success=200]="success",e[e.failed=500]="failed",e[e.disconnect=-1]="disconnect",e[e.closed=401]="closed",e[e.notFound=404]="notFound",e[e.reachLimit=429]="reachLimit"}(s||(s={})),function(e){e[e.web=0]="web",e[e.native=1]="native"}(c||(c={}))},6424:function(e,t,r){"use strict";r.d(t,{gA:function(){return L},ZP:function(){return Ae}}),r(9601),r(1539),r(8674),r(2526),r(1817),r(2165),r(6992),r(8783),r(3948),r(7042),r(2222),r(3710),r(7941),r(9714),r(3843),r(8309),r(2772),r(5212),r(7327),r(5827),r(9826),r(4553),r(561),r(9653),r(1038),r(2564),r(9575),r(2472),r(2990),r(8927),r(3105),r(5035),r(4345),r(7174),r(2846),r(4731),r(7209),r(6319),r(8867),r(7789),r(3739),r(9368),r(4483),r(2056),r(3462),r(678),r(7462),r(3824),r(5021),r(2974),r(5016),r(6699),r(2023),r(3161),r(4048),r(9753),r(9554),r(4747),r(285),r(1637),r(8145),r(1249),r(4812);var n=r(4188),o=r.n(n),i=r(3720),a=r.n(i),s=r(5531),c=r(8161),u=r(7360),l=["public","members_only","allow_user_invites","invite_need_confirm"],p={name:"name",title:"name",description:"description",public:"public",members_only:"approval",allow_user_invites:"allowInvites",max_users:"maxUsers",invite_need_confirm:"inviteNeedConfirm",custom:"ext",last_modified:"lastModified"};function d(e,t){var r,n,o,i,a,s,c=this,u=this.context,d=u.userId,h=u.jid,f=t.from.name===d&&h.clientResource!==t.from.clientResource;return t.isThread?(o={id:t.mucId.name,name:t.mucName,operation:"",parentId:t.mucParentId.name,operator:t.from.name,userName:t.to.length?t.to[0].name:""},i={chatThreadId:t.mucId.name,chatThreadName:t.mucName,operation:"",parentId:t.mucParentId.name}):(n={type:"",owner:t.from.name,gid:t.mucId.name,from:t.from.name,fromJid:t.from,to:t.to.length?t.to[0].name:"",toJid:t.to,chatroom:t.isChatroom,status:t.status},a={operation:"",id:t.mucId.name,from:t.from.name},t.isChatroom&&(null===(r=null==t?void 0:t.eventInfo)||void 0===r?void 0:r.ext)&&(s=JSON.parse(t.eventInfo.ext))),({45:function(){var e,r,n;a.operation="memberAttributesUpdate";var o=JSON.parse(null===(e=null==t?void 0:t.eventInfo)||void 0===e?void 0:e.ext)||{};a.attributes=o.properties||{},a.userId=o.username||"",f?null===(r=c.eventHandler)||void 0===r||r.dispatch("onMultiDeviceEvent",a):null===(n=c.eventHandler)||void 0===n||n.dispatch("onGroupEvent",a)},44:function(){var e;a.operation="removeChatRoomAttributes",a.attributes=s.result.successKeys,s.result.successKeys.length>0&&(null===(e=c.eventHandler)||void 0===e||e.dispatch("onChatroomEvent",a))},43:function(){var e;a.operation="updateChatRoomAttributes";var t={};s.result.successKeys.forEach((function(e){t[e]=s.properties[e]})),a.attributes=t,s.result.successKeys.length>0&&(null===(e=c.eventHandler)||void 0===e||e.dispatch("onChatroomEvent",a))},42:function(){},41:function(){},40:function(){},39:function(){},38:function(){var e;i.operation="chatThreadNameUpdate",null===(e=c.eventHandler)||void 0===e||e.dispatch("onMultiDeviceEvent",i)},37:function(){var e;o.operation="userRemove",null===(e=c.eventHandler)||void 0===e||e.dispatch("onChatThreadChange",o)},36:function(){var e;i.operation="chatThreadLeave",null===(e=c.eventHandler)||void 0===e||e.dispatch("onMultiDeviceEvent",i)},35:function(){var e;i.operation="chatThreadJoin",null===(e=c.eventHandler)||void 0===e||e.dispatch("onMultiDeviceEvent",i)},34:function(){var e;i.operation="chatThreadDestroy",null===(e=c.eventHandler)||void 0===e||e.dispatch("onMultiDeviceEvent",i)},33:function(){var e;i.operation="chatThreadCreate",null===(e=c.eventHandler)||void 0===e||e.dispatch("onMultiDeviceEvent",i)},32:function(){var e,r,o,i;n.type=t.isChatroom?"rmChatRoomMute":"rmGroupMute",c.onPresence&&c.onPresence(n),t.isChatroom?null===(e=c.eventHandler)||void 0===e||e.dispatch("onChatroomChange",n):null===(r=c.eventHandler)||void 0===r||r.dispatch("onGroupChange",n),a.operation="unmuteAllMembers",t.isChatroom?null===(o=c.eventHandler)||void 0===o||o.dispatch("onChatroomEvent",a):null===(i=c.eventHandler)||void 0===i||i.dispatch("onGroupEvent",a)},31:function(){var e,r,o,i;n.type=t.isChatroom?"muteChatRoom":"muteGroup",c.onPresence&&c.onPresence(n),t.isChatroom?null===(e=c.eventHandler)||void 0===e||e.dispatch("onChatroomChange",n):null===(r=c.eventHandler)||void 0===r||r.dispatch("onGroupChange",n),a.operation="muteAllMembers",t.isChatroom?null===(o=c.eventHandler)||void 0===o||o.dispatch("onChatroomEvent",a):null===(i=c.eventHandler)||void 0===i||i.dispatch("onGroupEvent",a)},30:function(){var e,r,o,i;n.type=t.isChatroom?"rmUserFromChatRoomWhiteList":"rmUserFromGroupWhiteList",c.onPresence&&c.onPresence(n),t.isChatroom?null===(e=c.eventHandler)||void 0===e||e.dispatch("onChatroomChange",n):null===(r=c.eventHandler)||void 0===r||r.dispatch("onGroupChange",n),a.operation="removeAllowlistMember",t.isChatroom?null===(o=c.eventHandler)||void 0===o||o.dispatch("onChatroomEvent",a):null===(i=c.eventHandler)||void 0===i||i.dispatch("onGroupEvent",a)},29:function(){var e,r,o,i;n.type=t.isChatroom?"addUserToChatRoomWhiteList":"addUserToGroupWhiteList",c.onPresence&&c.onPresence(n),t.isChatroom?null===(e=c.eventHandler)||void 0===e||e.dispatch("onChatroomChange",n):null===(r=c.eventHandler)||void 0===r||r.dispatch("onGroupChange",n),a.operation="addUserToAllowlist",t.isChatroom?null===(o=c.eventHandler)||void 0===o||o.dispatch("onChatroomEvent",a):null===(i=c.eventHandler)||void 0===i||i.dispatch("onGroupEvent",a)},28:function(){var e,r,o,i;n.type="deleteFile",c.onPresence&&c.onPresence(n),t.isChatroom?null===(e=c.eventHandler)||void 0===e||e.dispatch("onChatroomChange",n):null===(r=c.eventHandler)||void 0===r||r.dispatch("onGroupChange",n),a.operation="deleteFile",t.isChatroom?null===(o=c.eventHandler)||void 0===o||o.dispatch("onChatroomEvent",a):null===(i=c.eventHandler)||void 0===i||i.dispatch("onGroupEvent",a)},27:function(){var e,r,o,i;n.type="uploadFile",c.onPresence&&c.onPresence(n),t.isChatroom?null===(e=c.eventHandler)||void 0===e||e.dispatch("onChatroomChange",n):null===(r=c.eventHandler)||void 0===r||r.dispatch("onGroupChange",n),a.operation="uploadFile",t.isChatroom?null===(o=c.eventHandler)||void 0===o||o.dispatch("onChatroomEvent",a):null===(i=c.eventHandler)||void 0===i||i.dispatch("onGroupEvent",a)},26:function(){var e,r,o,i;n.type="deleteAnnouncement",c.onPresence&&c.onPresence(n),t.isChatroom?null===(e=c.eventHandler)||void 0===e||e.dispatch("onChatroomChange",n):null===(r=c.eventHandler)||void 0===r||r.dispatch("onGroupChange",n),a.operation="deleteAnnouncement",t.isChatroom?null===(o=c.eventHandler)||void 0===o||o.dispatch("onChatroomEvent",a):null===(i=c.eventHandler)||void 0===i||i.dispatch("onGroupEvent",a)},25:function(){var e,r,o,i;n.type="updateAnnouncement",n.announcement=t.reason,c.onPresence&&c.onPresence(n),t.isChatroom?null===(e=c.eventHandler)||void 0===e||e.dispatch("onChatroomChange",n):null===(r=c.eventHandler)||void 0===r||r.dispatch("onGroupChange",n),a.operation="updateAnnouncement",a.announcement=t.reason,t.isChatroom?null===(o=c.eventHandler)||void 0===o||o.dispatch("onChatroomEvent",a):null===(i=c.eventHandler)||void 0===i||i.dispatch("onGroupEvent",a)},24:function(){var e,r,o,i;n.type="removeMute",c.onPresence&&c.onPresence(n),t.isChatroom?null===(e=c.eventHandler)||void 0===e||e.dispatch("onChatroomChange",n):null===(r=c.eventHandler)||void 0===r||r.dispatch("onGroupChange",n),a.operation="unmuteMember",t.isChatroom?null===(o=c.eventHandler)||void 0===o||o.dispatch("onChatroomEvent",a):null===(i=c.eventHandler)||void 0===i||i.dispatch("onGroupEvent",a)},23:function(){var e,r,o,i;n.type="addMute",c.onPresence&&c.onPresence(n),t.isChatroom?null===(e=c.eventHandler)||void 0===e||e.dispatch("onChatroomChange",n):null===(r=c.eventHandler)||void 0===r||r.dispatch("onGroupChange",n),a.operation="muteMember",t.isChatroom?null===(o=c.eventHandler)||void 0===o||o.dispatch("onChatroomEvent",a):null===(i=c.eventHandler)||void 0===i||i.dispatch("onGroupEvent",a)},22:function(){var e,r,o,i;n.type="removeAdmin",c.onPresence&&c.onPresence(n),t.isChatroom?null===(e=c.eventHandler)||void 0===e||e.dispatch("onChatroomChange",n):null===(r=c.eventHandler)||void 0===r||r.dispatch("onGroupChange",n),a.operation="removeAdmin",t.isChatroom?null===(o=c.eventHandler)||void 0===o||o.dispatch("onChatroomEvent",a):null===(i=c.eventHandler)||void 0===i||i.dispatch("onGroupEvent",a)},21:function(){var e,r,o,i;n.type="addAdmin",c.onPresence&&c.onPresence(n),t.isChatroom?null===(e=c.eventHandler)||void 0===e||e.dispatch("onChatroomChange",n):null===(r=c.eventHandler)||void 0===r||r.dispatch("onGroupChange",n),a.operation="setAdmin",t.isChatroom?null===(o=c.eventHandler)||void 0===o||o.dispatch("onChatroomEvent",a):null===(i=c.eventHandler)||void 0===i||i.dispatch("onGroupEvent",a)},20:function(){var e,r,o,i;n.type="changeOwner",c.onPresence&&c.onPresence(n),t.isChatroom?null===(e=c.eventHandler)||void 0===e||e.dispatch("onChatroomChange",n):null===(r=c.eventHandler)||void 0===r||r.dispatch("onGroupChange",n),a.operation="changeOwner",t.isChatroom?null===(o=c.eventHandler)||void 0===o||o.dispatch("onChatroomEvent",a):null===(i=c.eventHandler)||void 0===i||i.dispatch("onGroupEvent",a)},19:function(){var e,r,o,i;n.type="direct_joined",n.groupName=t.mucName,c.onPresence&&c.onPresence(n),t.isChatroom?null===(e=c.eventHandler)||void 0===e||e.dispatch("onChatroomChange",n):null===(r=c.eventHandler)||void 0===r||r.dispatch("onGroupChange",n),a.operation="directJoined",a.name=t.mucName,t.isChatroom?null===(o=c.eventHandler)||void 0===o||o.dispatch("onChatroomEvent",a):null===(i=c.eventHandler)||void 0===i||i.dispatch("onGroupEvent",a)},18:function(){var e,r,o,i;n.type=t.isChatroom?"leaveChatRoom":"leaveGroup",c.onPresence&&c.onPresence(n);var s=t.mucMemberCount;s&&(a.memberCount=s),t.isChatroom?null===(e=c.eventHandler)||void 0===e||e.dispatch("onChatroomChange",n):null===(r=c.eventHandler)||void 0===r||r.dispatch("onGroupChange",n),a.operation="memberAbsence",t.isChatroom?null===(o=c.eventHandler)||void 0===o||o.dispatch("onChatroomEvent",a):null===(i=c.eventHandler)||void 0===i||i.dispatch("onGroupEvent",a)},17:function(){var e,r,o,i;t.isChatroom&&t.ext&&(a.ext=t.ext,n.ext=t.ext),n.type=t.isChatroom?"memberJoinChatRoomSuccess":"memberJoinPublicGroupSuccess",c.onPresence&&c.onPresence(n);var s=t.mucMemberCount;t.isChatroom?null===(e=c.eventHandler)||void 0===e||e.dispatch("onChatroomChange",n):null===(r=c.eventHandler)||void 0===r||r.dispatch("onGroupChange",n),a.operation="memberPresence",s&&(a.memberCount=s),t.isChatroom?null===(o=c.eventHandler)||void 0===o||o.dispatch("onChatroomEvent",a):null===(i=c.eventHandler)||void 0===i||i.dispatch("onGroupEvent",a)},16:function(){var e,r;n.type="unblock",c.onPresence&&c.onPresence(n),t.isChatroom?null===(e=c.eventHandler)||void 0===e||e.dispatch("onChatroomChange",n):null===(r=c.eventHandler)||void 0===r||r.dispatch("onGroupChange",n)},15:function(){var e,r;n.type="block",c.onPresence&&c.onPresence(n),t.isChatroom?null===(e=c.eventHandler)||void 0===e||e.dispatch("onChatroomChange",n):null===(r=c.eventHandler)||void 0===r||r.dispatch("onGroupChange",n)},14:function(){var e,r,o,i,s,u=t.isChatroom;if(!u){var d=JSON.parse((null===(e=null==t?void 0:t.eventInfo)||void 0===e?void 0:e.ext)||"{}",(function(e,t){return"last_modified"===e?Number(t):l.includes(e)?"true"===t||!0===t:t}));a.detail=n.detail={},Object.keys(d).forEach((function(e){var t=p[e];if(t){var r=d[e];a.detail&&(a.detail[t]=r),n.detail&&(n.detail[t]=r)}}))}n.type="update",c.onPresence&&c.onPresence(n),u?null===(r=c.eventHandler)||void 0===r||r.dispatch("onChatroomChange",n):null===(o=c.eventHandler)||void 0===o||o.dispatch("onGroupChange",n),a.operation="updateInfo",u?null===(i=c.eventHandler)||void 0===i||i.dispatch("onChatroomEvent",a):null===(s=c.eventHandler)||void 0===s||s.dispatch("onGroupEvent",a)},13:function(){var e,r,o,i;n.type="allow",n.reason=t.reason,c.onPresence&&c.onPresence(n),t.isChatroom?null===(e=c.eventHandler)||void 0===e||e.dispatch("onChatroomChange",n):null===(r=c.eventHandler)||void 0===r||r.dispatch("onGroupChange",n),t.reason&&(a.reason=t.reason),a.operation="unblockMember",t.isChatroom?null===(o=c.eventHandler)||void 0===o||o.dispatch("onChatroomEvent",a):null===(i=c.eventHandler)||void 0===i||i.dispatch("onGroupEvent",a)},12:function(){var e,r;n.type="ban",c.onPresence&&c.onPresence(n),t.isChatroom?null===(e=c.eventHandler)||void 0===e||e.dispatch("onChatroomChange",n):null===(r=c.eventHandler)||void 0===r||r.dispatch("onGroupChange",n)},11:function(){var e,r;n.type="getBlackList",c.onPresence&&c.onPresence(n),t.isChatroom?null===(e=c.eventHandler)||void 0===e||e.dispatch("onChatroomChange",n):null===(r=c.eventHandler)||void 0===r||r.dispatch("onGroupChange",n)},10:function(){var e,r,o,i;n.type="removedFromGroup",n.kicked=n.to,c.onPresence&&c.onPresence(n),t.isChatroom?null===(e=c.eventHandler)||void 0===e||e.dispatch("onChatroomChange",n):null===(r=c.eventHandler)||void 0===r||r.dispatch("onGroupChange",n),a.operation="removeMember",t.isChatroom?null===(o=c.eventHandler)||void 0===o||o.dispatch("onChatroomEvent",a):null===(i=c.eventHandler)||void 0===i||i.dispatch("onGroupEvent",a)},9:function(){var e,r,o,i;n.type="invite_decline",n.kicked=n.to,c.onPresence&&c.onPresence(n),t.isChatroom?null===(e=c.eventHandler)||void 0===e||e.dispatch("onChatroomChange",n):null===(r=c.eventHandler)||void 0===r||r.dispatch("onGroupChange",n),a.operation="rejectInvite",t.isChatroom?null===(o=c.eventHandler)||void 0===o||o.dispatch("onChatroomEvent",a):null===(i=c.eventHandler)||void 0===i||i.dispatch("onGroupEvent",a)},8:function(){var e,r,o,i;n.type="invite_accept",n.kicked=n.to,c.onPresence&&c.onPresence(n),t.isChatroom?null===(e=c.eventHandler)||void 0===e||e.dispatch("onChatroomChange",n):null===(r=c.eventHandler)||void 0===r||r.dispatch("onGroupChange",n),a.operation="acceptInvite",t.isChatroom?null===(o=c.eventHandler)||void 0===o||o.dispatch("onChatroomEvent",a):null===(i=c.eventHandler)||void 0===i||i.dispatch("onGroupEvent",a)},7:function(){var e,r,o,i;n.type="invite",n.kicked=n.to,n.groupName=t.mucName,c.onPresence&&c.onPresence(n),t.isChatroom?null===(e=c.eventHandler)||void 0===e||e.dispatch("onChatroomChange",n):null===(r=c.eventHandler)||void 0===r||r.dispatch("onGroupChange",n),a.operation="inviteToJoin",a.name=t.mucName,t.isChatroom?null===(o=c.eventHandler)||void 0===o||o.dispatch("onChatroomEvent",a):null===(i=c.eventHandler)||void 0===i||i.dispatch("onGroupEvent",a)},6:function(){var e,r,o,i;n.type="joinPublicGroupDeclined",c.onPresence&&c.onPresence(n),t.isChatroom?null===(e=c.eventHandler)||void 0===e||e.dispatch("onChatroomChange",n):null===(r=c.eventHandler)||void 0===r||r.dispatch("onGroupChange",n),a.operation="joinPublicGroupDeclined",t.isChatroom?null===(o=c.eventHandler)||void 0===o||o.dispatch("onChatroomEvent",a):(a.userId=t.to.length?t.to[0].name:"",null===(i=c.eventHandler)||void 0===i||i.dispatch("onGroupEvent",a))},5:function(){var e,r,o,i;n.type="joinPublicGroupSuccess",c.onPresence&&c.onPresence(n),t.isChatroom?null===(e=c.eventHandler)||void 0===e||e.dispatch("onChatroomChange",n):null===(r=c.eventHandler)||void 0===r||r.dispatch("onGroupChange",n),a.operation="acceptRequest",t.isChatroom?null===(o=c.eventHandler)||void 0===o||o.dispatch("onChatroomEvent",a):null===(i=c.eventHandler)||void 0===i||i.dispatch("onGroupEvent",a)},4:function(){var e,r,o,i;n.type="joinGroupNotifications",n.reason=t.reason,c.onPresence&&c.onPresence(n),t.isChatroom?null===(e=c.eventHandler)||void 0===e||e.dispatch("onChatroomChange",n):null===(r=c.eventHandler)||void 0===r||r.dispatch("onGroupChange",n),t.reason&&(a.reason=t.reason),a.operation="requestToJoin",t.isChatroom?null===(o=c.eventHandler)||void 0===o||o.dispatch("onChatroomEvent",a):null===(i=c.eventHandler)||void 0===i||i.dispatch("onGroupEvent",a)},3:function(){var e,r;n.type="leave",c.onPresence&&c.onPresence(n),t.isChatroom?null===(e=c.eventHandler)||void 0===e||e.dispatch("onChatroomChange",n):null===(r=c.eventHandler)||void 0===r||r.dispatch("onGroupChange",n)},2:function(){var e,r;n.type="join",c.onPresence&&c.onPresence(n),t.isChatroom?null===(e=c.eventHandler)||void 0===e||e.dispatch("onChatroomChange",n):null===(r=c.eventHandler)||void 0===r||r.dispatch("onGroupChange",n)},1:function(){var e,r,o,i;n.type="deleteGroupChat",c.onPresence&&c.onPresence(n),t.isChatroom?null===(e=c.eventHandler)||void 0===e||e.dispatch("onChatroomChange",n):null===(r=c.eventHandler)||void 0===r||r.dispatch("onGroupChange",n),a.operation="destroy",t.isChatroom?null===(o=c.eventHandler)||void 0===o||o.dispatch("onChatroomEvent",a):null===(i=c.eventHandler)||void 0===i||i.dispatch("onGroupEvent",a)},0:function(){var e,r;a.operation="create",t.isChatroom?null===(e=c.eventHandler)||void 0===e||e.dispatch("onChatroomEvent",a):null===(r=c.eventHandler)||void 0===r||r.dispatch("onGroupEvent",a)}}[e]||function(){console.error("No match operation ".concat(e))})()}var h=function(e){var t=this.root.lookup("easemob.pb.MUCBody").decode(e.payload),r=t.operation;u.kg.debug("onMucMessage",t),d.call(this,r,t)},f={handleRosterMsg:function(e){var t,r,n,o,i,a,s=this.root.lookup("easemob.pb.RosterBody").decode(e.payload),c={type:"",to:s.to[0].name,from:s.from.name,status:s.reason};switch(s.operation){case 2:c.type="subscribe",this.onContactInvited&&this.onContactInvited(c),null===(t=this.eventHandler)||void 0===t||t.dispatch("onContactInvited",c);break;case 3:c.type="unsubscribed",this.onContactDeleted&&this.onContactDeleted(c),null===(r=this.eventHandler)||void 0===r||r.dispatch("onContactDeleted",c);break;case 4:c.type="subscribed",this.onContactAdded&&this.onContactAdded(c),null===(n=this.eventHandler)||void 0===n||n.dispatch("onContactAdded",c);break;case 5:c.type="unsubscribed",this.onContactRefuse&&this.onContactRefuse(c),null===(o=this.eventHandler)||void 0===o||o.dispatch("onContactRefuse",c);break;case 6:case 7:break;case 8:c.type="subscribed",this.onContactAgreed&&this.onContactAgreed(c),null===(i=this.eventHandler)||void 0===i||i.dispatch("onContactAgreed",c);break;case 9:c.type="unsubscribed",this.onContactRefuse&&this.onContactRefuse(c),null===(a=this.eventHandler)||void 0===a||a.dispatch("onContactRefuse",c);break;default:u.kg.error("handleRosterMsg:",s)}this.onPresence&&c.type&&this.onPresence(c)}},m=r(7252),g=function(e){var t,r,n,o,i,a,c=this.root.lookup("easemob.pb.StatisticsBody").decode(e.payload),l=c.operation,p=c.reason;switch(l){case 0:this.onStatisticMessage&&this.onStatisticMessage(c),null===(t=this.eventHandler)||void 0===t||t.dispatch("onStatisticMessage",c);break;case 1:a=m.Z.create({type:s.E.WEBIM_CONNCTION_USER_REMOVED,message:"user has been removed"}),this.disconnectedReason=a,this.logOut=!0,this.onError&&this.onError(a),null===(r=this.eventHandler)||void 0===r||r.dispatch("onError",a);break;case 2:a=m.Z.create({type:s.E.WEBIM_CONNCTION_USER_LOGIN_ANOTHER_DEVICE,message:"the user is already logged on another device"}),p&&(a.data={loginInfoCustomExt:c.reason}),this.disconnectedReason=a,this.logOut=!0,this.onError&&this.onError(a),null===(n=this.eventHandler)||void 0===n||n.dispatch("onError",a);break;case 3:a=m.Z.create({type:s.E.WEBIM_CONNCTION_USER_KICKED_BY_CHANGE_PASSWORD,message:"the user was kicked by changing password"}),this.disconnectedReason=a,this.logOut=!0,this.onError&&this.onError(a),null===(o=this.eventHandler)||void 0===o||o.dispatch("onError",a);break;case 4:a=m.Z.create({type:s.E.WEBIM_CONNCTION_USER_KICKED_BY_OTHER_DEVICE,message:"the user was kicked by other device"}),this.disconnectedReason=a,this.logOut=!0,this.onError&&this.onError(a),null===(i=this.eventHandler)||void 0===i||i.dispatch("onError",a);break;default:u.kg.error("handleStatisticsMsg:",c)}},v=(r(9720),r(4024)),y=r(4363),E=r(9937);function T(e){var t,r=[],n=[],o=e.data;o&&o.values&&o.values.forEach((function(e){Object.entries(e.status).forEach((function(e){n.push({device:e[0],status:Number(e[1])})})),r.push({userId:e.uid,lastTime:Number(e.last_time),expire:Number(e.expiry),ext:e.ext,statusDetails:n})})),this.onPresenceStatusChange&&this.onPresenceStatusChange(r),null===(t=this.eventHandler)||void 0===t||t.dispatch("onPresenceStatusChange",r)}function _(e){var t=this;e.data.forEach((function(e){var r,n={from:e.from,to:e.to,chatType:"chat"===e.channel_type?"singleChat":"groupChat",messageId:e.messageId,reactions:e.reactions,ts:e.ts};null===(r=t.eventHandler)||void 0===r||r.dispatch("onReactionChange",n)}))}function R(e){var t,r,n,o;if(e.data){var i=e.data,a={id:i.id||"",name:i.name||"",parentId:i.muc_parent_id||"",messageId:i.msg_parent_id||"",timestamp:i.timestamp||0,operator:i.from||"",operation:""};switch(i.operation){case"create":a.operation="create",a.createTimestamp=a.timestamp,a.messageCount=0,null===(t=this.eventHandler)||void 0===t||t.dispatch("onChatThreadChange",a);break;case"update_msg":a.operation="update",a.messageCount=i.message_count,i.last_message&&"{}"!==JSON.stringify(i.last_message)?a.lastMessage=y.w.call(this,i.last_message):"{}"===JSON.stringify(i.last_message)&&(a.lastMessage={}),null===(r=this.eventHandler)||void 0===r||r.dispatch("onChatThreadChange",a);break;case"update":a.operation="update",a.messageCount=i.message_count,null===(n=this.eventHandler)||void 0===n||n.dispatch("onChatThreadChange",a);break;case"delete":a.operation="destroy",null===(o=this.eventHandler)||void 0===o||o.dispatch("onChatThreadChange",a)}}}function I(e){var t,r=e.data;if(r.resource!==this.clientResource){var n={operation:"deleteRoaming",conversationId:r.to,chatType:"chat"===r.chatType?"singleChat":"groupChat",resource:r.resource};null===(t=this.eventHandler)||void 0===t||t.dispatch("onMultiDeviceEvent",n)}}function O(e){var t,r,n=e.data,o="";if(this.clientResource!==n.res){switch(n.op){case"del":o="deleteConversation";break;case"top":o="pinnedConversation";break;case"not_top":o="unpinnedConversation";break;case"mark":o="markConversation";break;case"mark_delete":o="unMarkConversation";break;case"pin":o="pin";break;case"pin_delete":o="unpin";break;default:return void u.kg.error("unexpected conversation op:",n.op)}if("pin"!==o&&"unpin"!==o){var i={operation:o,conversationId:n.id,conversationType:"chat"===n.type?"singleChat":"groupChat",timestamp:n.ts};"markConversation"!==i.operation&&"unMarkConversation"!==i.operation||n.ext&&(i.conversationMark=E.Z[n.ext]),null===(r=this.eventHandler)||void 0===r||r.dispatch("onMultiDeviceEvent",i)}else{var a=n.ext,s=n.from,c=n.id,l=n.type,p=n.ts,d={messageId:a||"",conversationId:s===this.user?c:s,conversationType:y.U[l],operation:o,operatorId:s,time:p};null===(t=this.eventHandler)||void 0===t||t.dispatch("onMessagePinEvent",d)}}}function S(e){var t,r=this;null===(t=e.values)||void 0===t||t.forEach((function(e){var t,n,o,i,a;if(e.operator_resource!==r.clientResource)if("ignoreInterval"in e.data){var s={operation:"setSilentModeForUser",resource:e.operator_resource,data:e.data};null===(t=r.eventHandler)||void 0===t||t.dispatch("onMultiDeviceEvent",s)}else"group"in e?(s={operation:0===Object.keys(null!==(n=e.data)&&void 0!==n?n:{}).length?"removeSilentModeForConversation":"setSilentModeForConversation",resource:e.operator_resource,conversationId:e.group,type:"groupChat",data:e.data},null===(o=r.eventHandler)||void 0===o||o.dispatch("onMultiDeviceEvent",s)):(s={operation:0===Object.keys(null!==(i=e.data)&&void 0!==i?i:{}).length?"removeSilentModeForConversation":"setSilentModeForConversation",resource:e.operator_resource,conversationId:e.user,type:"singleChat",data:e.data},null===(a=r.eventHandler)||void 0===a||a.dispatch("onMultiDeviceEvent",s))}))}var A=function(e){var t=v.P6.parseNotify(e.payload);switch(t.type){case"presence":T.call(this,t);break;case"reaction":_.call(this,t);break;case"thread":R.call(this,t);break;case"roaming_delete":I.call(this,t);break;case"conv":O.call(this,t);break;case"user_notification_mute":S.call(this,t);break;default:u.kg.error("unexpected notify type: ".concat(t.type))}},C=r(7288),b=r(9743),N=2,M=r(4998),w=r(6801),k=r(2071),P=r(1595),U=r(4319);function x(e){return x="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},x(e)}var L,D,j,G=function(){return G=Object.assign||function(e){for(var t,r=1,n=arguments.length;r0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0&&(null===(r=this.eventHandler)||void 0===r||r.dispatch("onMessage",p)),[2]}}))}))}function V(e,t){z.call(this,e,t)}function J(e){var t;this._offlineMessagePullState===M.a.SYNC_INIT&&(this._offlineMessagePullState=M.a.SYNC_START,this._offlineMessagePullQueue=e.unread.reduce((function(e,t){return e.find((function(e){return e.name===t.queue.name}))||e.push(t.queue),e}),[]),null===(t=this.eventHandler)||void 0===t||t.dispatch("onOfflineMessageSyncStart"))}function X(e){var t;if(this._offlineMessagePullState===M.a.SYNC_START){var r=this._offlineMessagePullQueue.findIndex((function(t){return t.name===e.queue.name}));r>-1&&this._offlineMessagePullQueue.splice(r,1),0===this._offlineMessagePullQueue.length&&(this._offlineMessagePullState=M.a.SYNC_FINISH,null===(t=this.eventHandler)||void 0===t||t.dispatch("onOfflineMessageSyncFinish"))}}function Y(e){var t=this.root.lookup("easemob.pb.CommUnreadDL");t=t.decode(e.payload);var r=new(a())(t.timestamp.low,t.timestamp.high,t.timestamp.unsigned).toString();if(this.expirationTime&&this.compareTokenExpireTime(Number(r),this.expirationTime),0===t.unread.length)se.call(this);else{J.call(this,t),u.kg.debug("pull unread message",t.unread);for(var n=0;n0){for(var r=Array.from(this.unMSyncSendMsgMap.keys()),n=0;n=30&&(u.kg.debug("send heart beat"),ce.call(e),e.lastHeartbeat=Date.now())}),this.heartBeatWait)}function le(){clearInterval(this.heartBeatID)}function pe(){var e=this.root.lookup("easemob.pb.MSync"),t=e.decode([]);return t.version=this.version,t.encryptType=this.encryptType,t.command=1,e.encode(t).finish()}function de(e,t){return e.some((function(e){return e.name===t.name}))}function he(e){var t=this.root.lookup("easemob.pb.CommNotice"),r=t.decode(e.payload),n=de(this._queues,r.queue);u.kg.debug("receive notice",t,this._queues);var o=de(this.unSyncQueue,r.queue);n||o||this.clientResource===r.queue.clientResource&&r.queue.name===this.context.userId||(this._queues.push(r.queue),1===this._queues.length&&ee.call(this,r.queue))}function fe(e){return B(this,void 0,void 0,(function(){var t,r,n,i,a,s,c,u;return H(this,(function(l){if(t=v.P6.getEnvInfo(),r=this.root.lookup("easemob.pb.MSync"),"miniCore"===this.name){try{i=new Uint8Array(e.data),n=r.decode(i)}catch(e){throw new Error("decode message fail.")}return[2,n]}if("web"===t.platform||"zfb"===t.platform||"dd"===t.platform){for(a=o().atob(e.data),s=[],c=0,u=a.length;c0))return[3,23];if(clearTimeout(null===(t=this._msgHash[le])||void 0===t?void 0:t.messageTimer),!B.status)return[3,22];if(0!==B.status.errorCode)return[3,21];if(null==(pe=this._msgHash[le])?void 0:pe.isHandleChatroom){try{de="join"===(null===(r=this._msgHash[le])||void 0===r?void 0:r.operation),(null===(n=this._msgHash[le])||void 0===n?void 0:n.resolve)instanceof Function&&de&&this._msgHash[le].resolve({type:0,data:{action:"apply",id:this._msgHash[le].roomId,result:!0,user:this.context.userId}}),(null===(o=this._msgHash[le])||void 0===o?void 0:o.success)instanceof Function&&de&&this._msgHash[le].success({type:0,data:{action:"apply",id:this._msgHash[le].roomId,result:!0,user:this.context.userId}}),(null===(i=this._msgHash[le])||void 0===i?void 0:i.resolve)instanceof Function&&!de&&this._msgHash[le].resolve({type:0,data:{result:!0}}),(null===(l=this._msgHash[le])||void 0===l?void 0:l.success)instanceof Function&&!de&&this._msgHash[le].success({type:0,data:{result:!0}}),k.iO.has(le)&&(he=k.iO.get(le),Fe=he.rpt,We=he.requestName,Fe({isEndApi:!0,data:{isSuccess:1,requestName:We,requestMethod:"WEBSOCKET",requestUrl:this.url,code:P.dd.success}}),k.iO.delete(le))}catch(e){k.iO.has(le)&&(fe=k.iO.get(le),Fe=fe.rpt,We=fe.requestName,Fe({isEndApi:!0,data:{isSuccess:0,requestName:We,requestMethod:"WEBSOCKET",requestUrl:this.url,code:P.dd.failed,codeDesc:"when executing success function error"}}),k.iO.delete(le)),qe=m.Z.create({type:s.E.WEBIM_CONNCTION_CALLBACK_INNER_ERROR,message:"when executing success function error",data:e}),this.onError&&this.onError(qe),null===(p=this.eventHandler)||void 0===p||p.dispatch("onError",qe)}delete this._msgHash[le]}return!pe||pe.isHandleChatroom?[3,20]:(me=null,ge="",ve=0,ye=null,this._msgHash[le].thirdMessage?(this._msgHash[le].thirdMessage.id=B.serverId,this._msgHash[le].thirdMessage.timestamp=B.timestamp,[4,c.Z.call(this,this._msgHash[le].thirdMessage,B.status,!0,!0)]):[3,2]);case 1:ye=H.sent(),H.label=2;case 2:if(0===B.metas.length)return[3,13];H.label=3;case 3:switch(H.trys.push([3,12,,13]),Ee=B.metas[0],Te=B.status,Ee.ns){case 1:return[3,4];case 5:return[3,9]}return[3,10];case 4:return this.useReplacedMessageContents?[4,c.Z.call(this,Ee,Te,!0,!0)]:[3,8];case 5:return ye=H.sent(),[4,null===(h=null===(d=this._localCache)||void 0===d?void 0:d.getInstance())||void 0===h?void 0:h.getMessageByServerMsgId(le)];case 6:return(_e=H.sent())?[4,null===(g=null===(f=this._localCache)||void 0===f?void 0:f.getInstance())||void 0===g?void 0:g.putMessageToDB(G(G(G({},_e),ye),{id:le}))]:[3,8];case 7:H.sent(),H.label=8;case 8:return[3,11];case 9:return(Re=v.P6.parseNotify(B.metas[0].payload)).edit_msg&&(Ie=Re.edit_msg,Oe=Ie.count,Se=Ie.operator,Ae=Ie.edit_time,Ce=Ie.sender,be=Ie.send_time,me={operationTime:Ae,operatorId:Se,operationCount:Oe},ge=Ce,ve=Number(be)),[3,11];case 10:return u.kg.error("decode local meta error",Ee),[3,11];case 11:return[3,13];case 12:return Ne=H.sent(),qe=m.Z.create({type:s.E.WEBIM_LOAD_MSG_ERROR,message:"decode local meta message error",data:Ne}),this.onError&&this.onError(qe),null===(y=this.eventHandler)||void 0===y||y.dispatch("onError",qe),[3,13];case 13:k.TJ.has(le)&&(k.TJ.get(le).rpt({isEndApi:!0,data:{isSuccess:1,requestMethod:"WEBSOCKET",requestUrl:this.url,code:P.dd.success,msgId:ue}}),k.TJ.delete(le)),H.label=14;case 14:return H.trys.push([14,18,,19]),Me={localMsgId:le,serverMsgId:ue},me&&(this._msgHash[le].modifiedInfo=me,we=this._msgHash[le],ke=we.editMessageId,Ge=we.type,Pe=we.chatType,Ue=we.msg,xe=we.to,Le=we.translations,De={id:ke,type:Ge,chatType:Pe,msg:Ue,modifiedInfo:me,to:xe,from:ge,time:Number(ve)},Le&&(De.translations=Le),Me.message=De,null===(_=null===(T=null===(E=this._localCache)||void 0===E?void 0:E.getInstance())||void 0===T?void 0:T.getMessageByServerMsgId(ke))||void 0===_||_.then((function(e){var t,r;e&&"txt"===e.type&&(null===(r=null===(t=Ye._localCache)||void 0===t?void 0:t.getInstance())||void 0===r||r.putMessageToDB(G(G({},e),{msg:De.msg,modifiedInfo:De.modifiedInfo,translations:De.translations})))}))),ye&&(Me.message=ye),[4,null===(I=null===(R=this._localCache)||void 0===R?void 0:R.getInstance())||void 0===I?void 0:I.updateLocalMessage(le,{serverMsgId:ue,status:C.r.SUCCESS})];case 15:return H.sent(),(null===(O=this._msgHash[le])||void 0===O?void 0:O.success)instanceof Function?[4,this._msgHash[le].success(le,ue)]:[3,17];case 16:H.sent(),H.label=17;case 17:return(null===(S=this._msgHash[le])||void 0===S?void 0:S.resolve)instanceof Function&&this._msgHash[le].resolve(Me),[3,19];case 18:return je=H.sent(),qe=m.Z.create({type:s.E.WEBIM_CONNCTION_CALLBACK_INNER_ERROR,message:"when executing success function error",data:je}),this.onError&&this.onError(qe),null===(A=this.eventHandler)||void 0===A||A.dispatch("onError",qe),[3,19];case 19:this.onReceivedMessage&&this.onReceivedMessage({id:le,mid:ue,to:this._msgHash[le].to,time:0}),null===(b=this.eventHandler)||void 0===b||b.dispatch("onReceivedMessage",{id:le,mid:ue,to:this._msgHash[le].to}),delete this._msgHash[le],H.label=20;case 20:return[3,22];case 21:if(15===B.status.errorCode)(null===(N=this._msgHash[le])||void 0===N?void 0:N.fail)instanceof Function&&this._msgHash[le].fail({type:s.E.SERVICE_NOT_ALLOW_MESSAGING_MUTE,reason:"you were muted"}),this._msgHash[le].reject instanceof Function&&this._msgHash[le].reject({type:s.E.SERVICE_NOT_ALLOW_MESSAGING_MUTE,reason:"you were muted"}),null===(w=null===(M=this._localCache)||void 0===M?void 0:M.getInstance())||void 0===w||w.updateLocalMessage(le,{serverMsgId:ue,status:C.r.FAIL});else if(1===B.status.errorCode){switch(Ge=void 0,B.status.reason){case"blocked":Ge=s.E.PERMISSION_DENIED;break;case"group not found":Ge=s.E.GROUP_NOT_EXIST;break;case"not in group or chatroom":Ge=s.E.GROUP_NOT_JOINED;break;case"exceed recall time limit":Ge=s.E.MESSAGE_RECALL_TIME_LIMIT;break;case"message recall disabled":Ge=s.E.SERVICE_NOT_ENABLED;break;case"not in group or chatroom white list":Ge=s.E.SERVICE_NOT_ALLOW_MESSAGING;break;case"nonroster":Ge=s.E.USER_NOT_FRIEND,B.status.reason="not contact";break;case"group is disabled":Ge=s.E.GROUP_IS_DISABLED,B.status.reason="group is disabled";break;case"limit directed users":Ge=s.E.MAX_LIMIT;break;case"Sorry, edit limit reached":Ge=s.E.MAX_LIMIT,B.status.reason="Modify message limit reached";break;case"Sorry, message does not exist":Ge=s.E.MODIFY_MESSAGE_NOT_EXIST,B.status.reason="The message does not exist.";break;case"Sorry, You do not have permission":Ge=s.E.PERMISSION_DENIED,B.status.reason="You do not have the modified permission.";break;case"Sorry, format is incorrect":Ge=s.E.MODIFY_MESSAGE_FORMAT_ERROR,B.status.reason="The modify messaged format error.";break;case"Sorry, edit is not available":Ge=s.E.SERVICE_NOT_ENABLED,B.status.reason="The message modify function is not activated.";break;case"Sorry, edit fail":Ge=s.E.MODIFY_MESSAGE_FAILED,B.status.reason="Modify message failed.";break;default:B.status.reason.includes("grpID")&&B.status.reason.includes("does not exist!")?(Ge=s.E.CHATROOM_NOT_EXIST,B.status.reason="The chat room dose not exist."):B.status.reason.includes("username")&&B.status.reason.includes("doesn't exist!")?Ge=s.E.USER_NOT_FOUND:"group member list is full!"===B.status.reason?Ge=s.E.CHATROOM_MEMBERS_FULL:B.status.reason.includes("can not join this group")&&B.status.reason.includes("is in the blacklist")?(Ge=s.E.PERMISSION_DENIED,B.status.reason="permission denied"):"can not operate this group, reason: group is disabled"===B.status.reason?Ge=s.E.GROUP_IS_DISABLED:B.status.reason.includes("moderation")?Ge=s.E.MESSAGE_MODERATION_BLOCKED:B.status.reason.includes("group ID illegal, please check it")?(Ge=s.E.REQUEST_PARAMETER_ERROR,B.status.reason="Invalid parameter"):Ge=B.status.reason.includes("has create too many chatrooms")||B.status.reason.includes("has joined too many chatrooms")?s.E.MAX_LIMIT:B.status.reason.includes("auto create failed")?s.E.SERVER_BUSY:s.E.SERVER_UNKNOWN_ERROR}this._msgHash[le]&&((null===(U=this._msgHash[le])||void 0===U?void 0:U.isHandleChatroom)?(Ze=m.Z.create({type:Ge,message:B.status.reason||"",data:""}),this._msgHash[le].reject instanceof Function&&this._msgHash[le].reject(Ze),this._msgHash[le].error instanceof Function&&this._msgHash[le].error(Ze),k.iO.has(le)&&(Be=P.dd.failed,Ge===s.E.CHATROOM_NOT_EXIST?Be=P.dd.notFound:Ge===s.E.CHATROOM_MEMBERS_FULL&&(Be=P.dd.reachLimit),He=k.iO.get(le),Fe=He.rpt,We=He.requestName,Fe({isEndApi:!0,data:{isSuccess:0,requestName:We,requestMethod:"WEBSOCKET",requestUrl:this.url,code:Be,codeDesc:B.status.reason}}),k.iO.delete(le))):(Ze=m.Z.create({type:Ge,message:B.status.reason||"",data:{id:le,mid:ue}}),this._msgHash[le].reject instanceof Function&&this._msgHash[le].reject(Ze),this._msgHash[le].fail instanceof Function&&this._msgHash[le].fail({type:Ge,reason:B.status.reason?B.status.reason:"",data:{id:le,mid:ue}}),null===(L=null===(x=this._localCache)||void 0===x?void 0:x.getInstance())||void 0===L||L.updateLocalMessage(le,{serverMsgId:ue,status:C.r.FAIL})),delete this._msgHash[le])}else if(7===B.status.errorCode)"sensitive words"===B.status.reason&&this._msgHash[le]?(Ze=m.Z.create({type:s.E.MESSAGE_INCLUDE_ILLEGAL_CONTENT,message:"sensitive words",data:{id:le,mid:ue}}),this._msgHash[le].reject instanceof Function&&this._msgHash[le].reject(Ze),this._msgHash[le].fail instanceof Function&&this._msgHash[le].fail({type:s.E.MESSAGE_INCLUDE_ILLEGAL_CONTENT,data:{id:le,mid:ue,reason:"sensitive words"}}),null===(j=null===(D=this._localCache)||void 0===D?void 0:D.getInstance())||void 0===j||j.updateLocalMessage(le,{serverMsgId:ue,status:C.r.FAIL})):"blocked by mod_antispam"===B.status.reason&&this._msgHash[le]?(Ze=m.Z.create({type:s.E.MESSAGE_INCLUDE_ILLEGAL_CONTENT,message:"blocked by mod_antispam",data:{id:le,mid:ue}}),this._msgHash[le].reject instanceof Function&&this._msgHash[le].reject(Ze),this._msgHash[le].fail instanceof Function&&this._msgHash[le].fail({type:s.E.MESSAGE_INCLUDE_ILLEGAL_CONTENT,data:{id:le,mid:ue,reason:"blocked by mod_antispam"}}),null===(W=null===(F=this._localCache)||void 0===F?void 0:F.getInstance())||void 0===W||W.updateLocalMessage(le,{serverMsgId:ue,status:C.r.FAIL})):"user is mute"===B.status.reason&&this._msgHash[le]?(Ze=m.Z.create({type:s.E.USER_MUTED_BY_ADMIN,message:"user is mute",data:{id:le,mid:ue}}),this._msgHash[le].reject instanceof Function&&this._msgHash[le].reject(Ze),this._msgHash[le].fail instanceof Function&&this._msgHash[le].fail(Ze),null===(q=null===(Z=this._localCache)||void 0===Z?void 0:Z.getInstance())||void 0===q||q.updateLocalMessage(le,{serverMsgId:ue,status:C.r.FAIL})):"traffic limit"===B.status.reason&&this._msgHash[le]?(Ze=m.Z.create({type:s.E.MESSAGE_CURRENT_LIMITING,message:"traffic limit",data:{id:le,mid:ue}}),this._msgHash[le].reject instanceof Function&&this._msgHash[le].reject(Ze),this._msgHash[le].fail instanceof Function&&this._msgHash[le].fail(Ze),null===(z=null===(K=this._localCache)||void 0===K?void 0:K.getInstance())||void 0===z||z.updateLocalMessage(le,{serverMsgId:ue,status:C.r.FAIL})):"Sorry, data is too large"===B.status.reason&&this._msgHash[le]&&(Ze=m.Z.create({type:s.E.MESSAGE_SIZE_LIMIT,message:"Sorry, data is too large",data:{id:le,mid:ue}}),this._msgHash[le].reject instanceof Function&&this._msgHash[le].reject(Ze),this._msgHash[le].fail instanceof Function&&this._msgHash[le].fail(Ze),null===(Y=null===(J=this._localCache)||void 0===J?void 0:J.getInstance())||void 0===Y||Y.updateLocalMessage(le,{serverMsgId:ue,status:C.r.FAIL}));else if(19===B.status.errorCode)this._msgHash[le]&&(k.TJ.has(le)&&(k.TJ.get(le).rpt({isEndApi:!0,data:{isSuccess:0,requestMethod:"WEBSOCKET",requestUrl:this.url,code:s.E.MESSAGE_EXTERNAL_LOGIC_BLOCKED,codeDesc:B.status.reason||"",msgId:ue}}),k.TJ.delete(le)),Ze=m.Z.create({type:s.E.MESSAGE_EXTERNAL_LOGIC_BLOCKED,message:B.status.reason||"",data:{id:le,mid:ue}}),this._msgHash[le].reject instanceof Function&&this._msgHash[le].reject(Ze),this._msgHash[le].fail instanceof Function&&this._msgHash[le].fail({type:s.E.MESSAGE_EXTERNAL_LOGIC_BLOCKED,data:{id:le,mid:ue,reason:B.status.reason}}),null===($=null===(Q=this._localCache)||void 0===Q?void 0:Q.getInstance())||void 0===$||$.updateLocalMessage(le,{serverMsgId:ue,status:C.r.FAIL}));else if(this._msgHash[le]){k.TJ.has(le)&&(k.TJ.get(le).rpt({isEndApi:!0,data:{isSuccess:0,requestMethod:"WEBSOCKET",requestUrl:this.url,code:s.E.WEBIM_LOAD_MSG_ERROR,codeDesc:(null===(te=B.status)||void 0===te?void 0:te.reason)||"",msgId:ue}}),k.TJ.delete(le));try{Ze=m.Z.create({type:s.E.WEBIM_LOAD_MSG_ERROR,message:(null===(re=B.status)||void 0===re?void 0:re.reason)||"",data:{id:le,mid:ue,reason:B.status&&B.status.reason}}),this._msgHash[le].reject instanceof Function&&this._msgHash[le].reject(Ze),null===(ie=null===(ne=this._localCache)||void 0===ne?void 0:ne.getInstance())||void 0===ie||ie.updateLocalMessage(le,{serverMsgId:ue,status:C.r.FAIL}),this._msgHash[le].fail instanceof Function&&this._msgHash[le].fail({type:s.E.WEBIM_LOAD_MSG_ERROR,data:{errorCode:B.status&&B.status.errorCode,reason:B.status&&B.status.reason}})}catch(e){qe=m.Z.create({type:s.E.WEBIM_CONNCTION_CALLBACK_INNER_ERROR,message:"when executing fail function error",data:e}),this.onError&&this.onError(qe),null===(ae=this.eventHandler)||void 0===ae||ae.dispatch("onError",qe)}delete this._msgHash[le]}else k.TJ.has(le)&&(k.TJ.get(le).rpt({isEndApi:!0,data:{isSuccess:0,requestMethod:"WEBSOCKET",requestUrl:this.url,code:s.E.WEBIM_CONNCTION_CALLBACK_INNER_ERROR,codeDesc:"on message error",msgId:ue}}),k.TJ.delete(le)),qe=m.Z.create({type:s.E.WEBIM_CONNCTION_CALLBACK_INNER_ERROR,message:"on message error"}),this.onError&&this.onError(qe),null===(se=this.eventHandler)||void 0===se||se.dispatch("onError",qe);H.label=22;case 22:return[2];case 23:if(B.metas&&0!==B.metas.length)try{V.call(this,B.metas,B.status)}catch(e){qe=m.Z.create({type:s.E.WEBIM_LOAD_MSG_ERROR,message:"decode message error",data:e}),u.kg.error("decode message error",e),this.onError&&this.onError(qe),null===(ce=this.eventHandler)||void 0===ce||ce.dispatch("onError",qe)}finally{B.isLast?(u.kg.debug("metas & CommSyncDLMessage.isLast",B.isLast),Ke=-1,this._queues.some((function(e,t){return e.name===B.name&&(Ke=t,!0)}))&&Ke>0&&this._queues.splice(Ke,1),this._queues.length>0&&ee.call(this,this._queues[0]),ze=-1,this.unSyncQueue.some((function(e,t){return e.name===B.queue.name&&(ze=t,!0)}))&&this.unSyncQueue.splice(ze,1),X.call(this,B)):B.nextKey&&(Xe=new(a())(B.nextKey.low,B.nextKey.high,B.nextKey.unsigned).toString(),u.kg.debug("nexKey:",Xe,"this.nextKey:",this.nexKey),Xe!==this.nexKey&&(this.nexKey=Xe,oe.call(this,B.nextKey,B.queue)))}else B.isLast?(u.kg.debug("CommSyncDLMessage.isLast",B.isLast),Ve=-1,this._queues.some((function(e,t){return e.name===B.queue.name&&(Ve=t,!0)}))&&this._queues.splice(Ve,1),this._queues.length>0&&ee.call(this,this._queues[0]),Je=-1,this.unSyncQueue.some((function(e,t){return e.name===B.queue.name&&(Je=t,!0)}))&&this.unSyncQueue.splice(Je,1),X.call(this,B)):B.nextKey&&(Xe=new(a())(B.nextKey.low,B.nextKey.high,B.nextKey.unsigned).toString(),u.kg.debug("nexKey:",Xe,"this.nextKey:",this.nexKey),Xe!==this.nexKey&&(this.nexKey=Xe,oe.call(this,B.nextKey,B.queue)));return[2]}}))}))}function ve(e){var t=[],r=this.root.lookup("easemob.pb.KeyValue"),n=[];for(var o in e){var i=r.decode(t);if(i.key=o,void 0!==e[o]){if("object"===x(e[o]))i.type=8,i.stringValue=JSON.stringify(e[o]);else if("string"==typeof e[o])i.type=7,i.stringValue=e[o];else if("boolean"==typeof e[o])i.type=1,i.varintValue=!0===e[o]?1:0;else if(Number.isInteger(e[o]))i.type=2,i.varintValue=e[o];else if("bigint"==typeof e[o]||"symbol"===x(e[o])||"function"==typeof e[o]||Number.isNaN(e[o]))i.type=7,i.stringValue=e[o].toString();else{if("number"!=typeof e[o]||Number.isInteger(e[o]))continue;i.type=6,i.doubleValue=e[o]}n.push(i)}}return n}function ye(e){var t,r,n,o=[];if(this.root){var i,c=this.root.lookup("easemob.pb.MessageBody.Content").decode(o);switch(i=!e.group&&"groupchat"!==(null===(t=null==e?void 0:e.chatType)||void 0===t?void 0:t.toLowerCase())||e.roomType?e.group&&e.roomType||"chatroom"===(null===(r=null==e?void 0:e.chatType)||void 0===r?void 0:r.toLowerCase())?"chatRoom":"singleChat":"groupChat",e.type){case"txt":c.type=0,c.text=e.msg;break;case"img":c.type=1,e.body?(c.displayName=e.body.filename,c.remotePath=e.body.url,c.secretKey=e.body.secret,c.fileLength=e.body.file_length,c.size=e.body.size,c.thumbnailDisplayName=e.body.filename):e.file?(c.displayName=e.file.filename,c.remotePath=e.file.url,c.secretKey=e.file.secret,c.fileLength=e.file.file_length,c.size=e.file.size,c.thumbnailDisplayName=e.file.filename):(c.displayName=e.filename,c.remotePath=e.url,c.secretKey=e.secret,c.fileLength=e.file_length,c.size=e.size,c.thumbnailDisplayName=e.filename),e.isBuildCombinedMsg&&(c.remotePath=e.url,c.secretKey=e.secret,c.size={height:e.height,width:e.width});break;case"video":c.type=2,e.body?(c.displayName=e.body.filename,c.remotePath=e.body.url,c.secretKey=e.body.secret,c.fileLength=e.body.file_length,c.duration=e.body.length,c.thumbnailDisplayName=e.body.filename,c.thumbnailRemotePath=this.useOwnUploadFun?"":"".concat(e.body.url,"?vframe=true"),c.thumbnailSecretKey=this.useOwnUploadFun?"":e.body.secret):e.isBuildCombinedMsg&&(c.displayName=e.filename,c.remotePath=e.url,c.secretKey=e.secret,c.fileLength=e.file_length,c.duration=e.length,c.thumbnailDisplayName=e.filename,c.thumbnailRemotePath=e.thumb,c.thumbnailSecretKey=e.thumb_secret);break;case"loc":c.type=3,c.latitude=e.lat,c.longitude=e.lng,c.address=e.addr,c.buildingName=e.buildingName,c.latitude=e.lat;break;case"audio":c.type=4,e.body?(c.displayName=e.body.filename,c.remotePath=e.body.url,c.secretKey=e.body.secret,c.fileLength=e.body.file_length,c.duration=e.body.length,c.thumbnailDisplayName=e.body.filename):e.isBuildCombinedMsg&&(c.displayName=e.filename,c.remotePath=e.url,c.secretKey=e.secret,c.fileLength=e.file_length,c.duration=e.length,c.thumbnailDisplayName=e.filename);break;case"file":c.type=5,e.body?(c.displayName=e.body.filename,c.remotePath=e.body.url,c.secretKey=e.body.secret,c.fileLength=e.body.file_length,c.thumbnailDisplayName=e.body.filename):e.isBuildCombinedMsg&&(c.displayName=e.filename,c.remotePath=e.url,c.secretKey=e.secret,c.fileLength=e.file_length,c.thumbnailDisplayName=e.filename);break;case"cmd":c.type=6,c.action=e.action;break;case"custom":c.type=7,c.customEvent=e.customEvent,c.customExts=ve.call(this,e.customExts);break;case"combine":c.type=0,c.subType=0,c.text=e.compatibleText,c.displayName=e.filename,c.remotePath=e.url,c.secretKey=e.secret,c.fileLength=e.file_length,c.title=e.title,c.summary=e.summary,c.combineLevel=e.combineLevel}var u=[];e.ext&&(u=ve.call(this,e.ext));var l=this.root.lookup("easemob.pb.MessageBody"),p=l.decode(o),d=e.from||this.context.jid.name;p.from={name:e.isBuildCombinedMsg?d:this.context.jid.name};var h=e.to.indexOf("/"),f=h>-1?e.to.substring(0,h):e.to;if(p.to={name:f},"channel"===e.type)p.type=L.CHANNEL_ACK;else if("recall"===e.type)p.type=L.RECALL,p.ackMessageId=e.ackId;else if("delivery"===e.type)p.type=L.DELIVER_ACK,p.ackMessageId=e.ackId;else if("read"===e.type)p.type=L.READ_ACK,p.ackMessageId=e.ackId,"groupChat"===i&&(p.msgConfig={allowGroupAck:!0},p.ackContent=e.ackContent);else if("chatRoom"===i)p.type=L.CHATROOM;else if("groupChat"===i){if(p.type=L.GROUPCHAT,e.msgConfig){var m=e.msgConfig.allowGroupAck;p.msgConfig={allowGroupAck:!!m}}}else"singleChat"===i&&(p.type=L.SINGLECHAT);e.editMessageId&&(p.type=L.EDIT,p.editMessageId=e.editMessageId),p.contents=[c],p.ext=u;var g=function(e){var t={};return"translations"in e&&(t.translations=e.translations),"isChatThread"in e&&e.isChatThread&&(t.thread={}),Object.keys(t).length>0?JSON.stringify(t):""}(e);g&&(p.meta=g),p=l.encode(p).finish();var v=this.root.lookup("easemob.pb.Meta"),y=v.decode(o);y.id=e.id;var E="easemob.com";if("chatRoom"!==i&&"groupChat"!==i||(E="conference.easemob.com"),y.to={appKey:this.appKey,name:f,domain:E},h>-1&&(y.to.clientResource=e.to.substring(h+1,e.to.length)),"chatRoom"===i&&(y.ext=ve.call(this,function(e){return{chatroom_msg_tag:"high"===e.priority?0:"low"===e.priority?2:1}}(e))),"recall"===e.type&&e.metaExt&&(y.ext=ve.call(this,{recallMessageExtensionInfo:e.metaExt})),y.ns=1,y.payload=p,y.routetype=e.deliverOnlineOnly?1:0,"singleChat"!==i&&Array.isArray(e.receiverList)&&(null===(n=e.receiverList)||void 0===n?void 0:n.length)>0&&(y.directedUsers=e.receiverList,y.routetype=2),e.isBuildCombinedMsg)return y.timestamp=a().fromValue(e.time),v.encode(y).finish();var T=this.root.lookup("easemob.pb.CommSyncUL"),_=T.decode(o);_.meta=y,!e.isPing&&Te.call(this,e,y),_=T.encode(_).finish();var R=this.root.lookup("easemob.pb.MSync"),I=R.decode(o);return I.version=this.version,I.encryptType=this.encryptType,I.command=0,I.payload=_,R.encode(I).finish()}e.fail&&e.fail({type:s.E.WEBIM_CONNCTION_CLIENT_OFFLINE,message:"Not logged in"})}function Ee(e){var t,r,n=this,o=G({},e);if(e.file)return o.accessToken=this.token,o.appKey=this.appKey,o.apiUrl=this.apiUrl,o.body&&o.body.url?ye.call(this,o):new Promise((function(t,r){var i=o.onFileUploadComplete;o.onFileUploadComplete=function(t){var r,a,s,c,u,l;if(t.entities[0]["file-metadata"]){var p=t.entities[0]["file-metadata"]["content-length"];o.file_length=p,o.filetype=t.entities[0]["file-metadata"]["content-type"],p>204800&&(o.thumbnail=!0)}var d="".concat(n.apiUrl,"/").concat(n.orgName,"/").concat(n.appName,"/chatfiles/").concat(t.entities[0].uuid);o.body={type:o.type||"file",secret:t.entities[0]["share-secret"],filename:o.file.filename||o.filename,url:d,length:o.length||0,filetype:o.filetype||o.file.filetype,file_length:(null===(a=null===(r=o.file)||void 0===r?void 0:r.data)||void 0===a?void 0:a.size)||0,size:{width:o.width||0,height:o.height||0}},o.file.url=t.uri,e.secret=t.entities[0]["share-secret"],t.url=e.url="".concat(d,"?em-redirect=true&share-secret=").concat(t.entities[0]["share-secret"]),e.file_length=o.file_length=(null===(c=null===(s=o.file)||void 0===s?void 0:s.data)||void 0===c?void 0:c.size)||0,"img"===o.type&&(e.thumb="".concat(e.url,"&thumbnail=true"),t.thumb="".concat(t.url,"&thumbnail=true")),"video"===o.type&&(e.thumb="".concat(e.url,"&vframe=true"),e.thumb_secret=t.entities[0]["share-secret"],t.thumb="".concat(t.url,"&vframe=true")),i instanceof Function&&i(t,o.id);var h=ye.call(n,o);k.TJ.size<=k.F3&&k.TJ.set(o.id,{rpt:n.dataReport.geOperateFun({operationName:P.fI.SEND_MSG})}),null===(l=null===(u=n._localCache)||void 0===u?void 0:u.getInstance())||void 0===l||l.storeMessage(e,C.r.INPROGRESS),Se.call(n,h)},v.P6.uploadFile.call(n,o,P.fI.UPLOAD_MSG_ATTACH)}));if("combine"===e.type){o.accessToken=this.token,o.appKey=this.appKey,o.apiUrl=this.apiUrl;var i=o.onFileUploadComplete,a=o.onFileUploadError;return new Promise((function(t,r){var c,l,p,d;if((null===(c=e.messageList)||void 0===c?void 0:c.length)>300||0===(null===(l=e.messageList)||void 0===l?void 0:l.length))return n._msgHash[o.id].reject({type:s.E.MAX_LIMIT,message:"The number of combined messages exceeded the limit."});var h=F([],e.messageList,!0),f=0;if(h.forEach((function(e){(null==e?void 0:e.combineLevel)>f&&(f=null==e?void 0:e.combineLevel)})),o.combineLevel=f+1,o.combineLevel>10)return n._msgHash[o.id].reject({type:s.E.MAX_LIMIT,message:"The level of the merged message exceeded the limit."});var m=_e.call(n,h),g=function(t,r){var a,s,c,u,l,p,d="".concat(n.apiUrl,"/").concat(n.orgName,"/").concat(n.appName,"/chatfiles/").concat(t.entities[0].uuid),h=null===(a=t.entities[0])||void 0===a?void 0:a["share-secret"],f=d+"?em-redirect=true";h&&(f="".concat(f,"&share-secret=").concat(h)),i instanceof Function&&i({url:f,secret:h}),e.url=f,e.secret=h,o.url=f,o.secret=t.entities[0]["share-secret"],o.filename=(null===(s=o.file)||void 0===s?void 0:s.filename)||(null==r?void 0:r.fileName),o.file_length=(null===(u=null===(c=o.file)||void 0===c?void 0:c.data)||void 0===u?void 0:u.size)||(null==r?void 0:r.fileLength)||0,null===(p=null===(l=n._localCache)||void 0===l?void 0:l.getInstance())||void 0===p||p.storeMessage(e,C.r.INPROGRESS);var m=ye.call(n,o);Se.call(n,m)},y=v.P6.getEnvInfo();if("web"!==y.platform&&"node"!==y.platform&&"quick_app"!==y.platform&&(null===(d=null===(p=y.global)||void 0===p?void 0:p.canIUse)||void 0===d?void 0:d.call(p,"getFileSystemManager"))){var E=y.global.getFileSystemManager(),T="".concat(n.apiUrl,"/").concat(n.orgName,"/").concat(n.appName,"/chatfiles");E.writeFile({filePath:"".concat(y.global.env.USER_DATA_PATH,"/combine"),data:m.buffer,encoding:"binary",success:function(e){y.global.uploadFile({url:T,filePath:"".concat(y.global.env.USER_DATA_PATH,"/combine"),name:"file",header:{"Content-Type":"multipart/form-data",Authorization:"Bearer "+o.accessToken},success:function(e){if(200===e.statusCode){u.kg.debug("upload success",e);var t=JSON.parse(e.data);g(t,{fileName:"combine",fileLength:m.length})}else u.kg.debug("upload fail"),o.onFileUploadError instanceof Function&&o.onFileUploadError(e),this._msgHash[o.id].reject({type:s.E.WEBIM_UPLOADFILE_ERROR,message:"Failed to upload the merge message.Please try again",data:e})},fail:function(t){u.kg.debug("upload fail"),o.onFileUploadError instanceof Function&&o.onFileUploadError(e),this._msgHash[o.id].reject({type:s.E.WEBIM_UPLOADFILE_ERROR,message:"Failed to upload the merge message.Please try again",data:t})}})},fail:function(e){u.kg.debug("write file fail",e),this._msgHash[o.id].reject({type:s.E.WEBIM_UPLOADFILE_ERROR,message:"Failed to upload the merge message.Please try again",data:e})}})}else{var _=new File([m],"combine",{type:"application/octet-stream"}),R={url:URL.createObjectURL(_),filename:o.id,data:_};o.file=R,o.onFileUploadComplete=function(e){g(e)},o.onFileUploadError=function(e){a instanceof Function&&a(e),n._msgHash[o.id].reject({type:s.E.WEBIM_UPLOADFILE_ERROR,message:"Failed to upload the merge message.Please try again",data:e})},v.P6.uploadFile.call(n,o,P.fI.UPLOAD_MSG_ATTACH)}}))}"img"===e.type&&(o.body||(o.body=G(G({},o),{size:{width:o.width||0,height:o.height||0}}))),null===(r=null===(t=this._localCache)||void 0===t?void 0:t.getInstance())||void 0===r||r.storeMessage(e,C.r.INPROGRESS);var c=ye.call(this,o);Se.call(this,c)}function Te(e,t){e.editMessageId||W.includes(e.type)&&(this._msgHash[e.id].thirdMessage=t)}function _e(e){for(var t=Uint8Array.from("cm",(function(e){return e.charCodeAt(0)})),r=0;r>8*(3-c)&255;u.kg.debug("message length:",s);var l=new Uint8Array(t.length+s.length+i.length);l.set(t),l.set(s,t.length),l.set(i,t.length+s.length),t=l}var p=new Uint8Array(t.length+1),d=0;for(r=2;r0){var E=t.translateMessage||t.translation.translateMessage;if(!E)throw new Error("there is no method to translate message");E.call(t,{text:e.msg,languages:e.msgConfig.languages}).then((function(r){var n,o,i,a=null===(n=r.data[0])||void 0===n?void 0:n.translations;a=a.map((function(e){return{code:e.to,text:e.text}})),e.translations=a,t._msgHash[e.id].translations=a,null===(i=null===(o=t._localCache)||void 0===o?void 0:o.getInstance())||void 0===i||i.storeMessage(e,C.r.INPROGRESS);var s=ye.call(t,e);Se.call(t,s,e.id)})).catch((function(e){n(e)}))}else{v&&(null===(p=null===(l=t._localCache)||void 0===l?void 0:l.getInstance())||void 0===p||p.storeMessage(e,C.r.INPROGRESS));var T=ye.call(t,e);Se.call(t,T,e.id)}}))}function Se(e,t){var r,n=this;if(e.isHandleChatroom){if(!this.isOpened()){var o={data:"",type:s.E.WEBIM_CONNCTION_DISCONNECTED,message:"websocket has been disconnected"};if(k.iO.has(e.id)){var i=k.iO.get(e.id);(0,i.rpt)({isEndApi:!0,data:{isSuccess:0,requestName:i.requestName,requestMethod:"WEBSOCKET",requestUrl:this.url,code:P.dd.disconnect,codeDesc:"websocket has been disconnected"}}),k.iO.delete(e.id)}return Promise.reject(o)}return new Promise((function(r,o){var i;n._msgHash[e.id]=G(G({},e),{resolve:r,reject:o}),i="miniCore"===n.name?e.joinMsg:K.call(n,e.joinMsg,t);var a=t&&setTimeout((function(){var t,r,o;if(n._msgHash[e.id]){var i={type:s.E.REQUEST_TIMEOUT,message:"request timeout"};null===(r=(t=n._msgHash[e.id]).reject)||void 0===r||r.call(t,i),clearTimeout(null===(o=n._msgHash[e.id])||void 0===o?void 0:o.messageTimer),delete n._msgHash[e.id],n.reconnecting||n.reconnect(!0)}}),U.xz);n._msgHash[e.id].messageTimer=a,n.sock.send(i)}))}if(!this.isOpened())return null===(r=this.unMSyncSendMsgMap)||void 0===r||r.set(t,e),!this.logOut&&this.autoReconnectNumTotal0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0,ne=h.errorCode,oe=h.reason,ie={},ae=[],se=[],ce={},ue="",le=0,pe=null,de=null,j.ext&&(ie=g(j.ext)),j.meta&&"string"==typeof j.meta&&((fe=JSON.parse(j.meta)).reaction&&(ae=fe.reaction).forEach((function(e){e.isAddedBySelf=e.state,delete e.state})),fe.translations&&(se=fe.translations),fe.edit_msg&&(me=fe.edit_msg,ge=me.count,ve=me.operator,ye=me.edit_time,Ee=me.sender,Te=me.send_time,ce={operationTime:ye,operatorId:ve,operationCount:ge},ue=Ee,le=Te),fe.thread&&"{}"!==JSON.stringify(fe.thread)&&(pe={messageId:fe.thread.msg_parent_id,parentId:fe.thread.muc_parent_id,chatThreadName:fe.thread.thread_name}),fe.thread_overview&&"{}"!==JSON.stringify(fe.thread_overview)&&(de={id:fe.thread_overview.id,parentId:fe.thread_overview.muc_parent_id,name:fe.thread_overview.name,lastMessage:fe.thread_overview.last_message&&"{}"!==JSON.stringify(fe.thread_overview.last_message)?i.w.call(this,fe.thread_overview.last_message):null,createTimestamp:fe.thread_overview.create_timestamp,updateTimestamp:fe.thread_overview.update_timestamp,messageCount:fe.thread_overview.message_count||0})),G.type){case 0:return[3,1];case 1:return[3,7];case 2:return[3,10];case 3:return[3,13];case 4:return[3,16];case 5:return[3,19];case 6:return[3,22];case 7:return[3,23];case 8:return[3,26]}return[3,27];case 1:return Object.prototype.hasOwnProperty.call(G,"subType")&&0===G.subType?(he=v.call(this,G),_e={id:B,type:"combine",chatType:K,to:W,from:F,ext:ie,time:Number(Z),onlineState:q,title:G.title||"",summary:G.summary||"",url:he||"",secret:G.secretKey||"",file_length:G.fileLength||0,filename:G.displayName||"",compatibleText:G.text,combineLevel:G.combineLevel||0},ee.msgConfig&&(_e.msgConfig=ee.msgConfig),ae.length>0&&(_e.reactions=ae),pe&&(_e.chatThread=pe),de&&(_e.chatThreadOverview=de),"chatRoom"===K&&(_e.priority=V,_e.broadcast=Y),$&&(_e.isContentReplaced=$),te=_e,z?[3,3]:[4,null===(r=null===(t=this._localCache)||void 0===t?void 0:t.getInstance())||void 0===r?void 0:r.storeMessage(_e,p.r.SUCCESS)]):[3,4];case 2:f.sent(),null===(n=this.eventHandler)||void 0===n||n.dispatch("onCombineMessage",_e),f.label=3;case 3:return[3,28];case 4:return!(ee={id:B,type:H,contentsType:m[G.type],from:F,to:W,data:G.text,ext:ie,sourceMsg:G.text,time:Z,msgConfig:j.msgConfig,onlineState:q}).msgConfig&&delete j.msgConfig,ee.error=re,ee.errorText=oe,ee.errorCode=ne,!z&&this.onTextMessage&&this.onTextMessage(ee),Re={id:B,type:"txt",chatType:K,msg:G.text,to:W,from:F,ext:ie,time:Number(Z),onlineState:q},ee.msgConfig&&(Re.msgConfig=ee.msgConfig),ae.length>0&&(Re.reactions=ae),pe&&(Re.chatThread=pe),de&&(Re.chatThreadOverview=de),se.length>0&&(Re.translations=se),ce.operationCount>0&&(Re.modifiedInfo=ce,j.type===s.gA.EDIT&&(Re.from=ue,Re.time=le)),"chatRoom"===K&&(Re.priority=V,Re.broadcast=Y),$&&(Re.isContentReplaced=$),te=Re,z?[3,6]:[4,null===(c=null===(o=this._localCache)||void 0===o?void 0:o.getInstance())||void 0===c?void 0:c.storeMessage(Re,p.r.SUCCESS)];case 5:f.sent(),null===(l=this.eventHandler)||void 0===l||l.dispatch("onTextMessage",Re),f.label=6;case 6:return[3,28];case 7:return Ie=(null===(d=null==G?void 0:G.size)||void 0===d?void 0:d.width)||0,Oe=(null===(y=null==G?void 0:G.size)||void 0===y?void 0:y.height)||0,he=this.useOwnUploadFun?G.remotePath:v.call(this,G),!(ee={id:B,type:H,contentsType:m[G.type],from:F,to:W,url:he,secret:G.secretKey,filename:G.displayName,thumb:this.useOwnUploadFun?"":"".concat(he,"&thumbnail=true"),thumb_secret:G.secretKey,file_length:G.fileLength||"",width:Ie,height:Oe,filetype:G.filetype||"",accessToken:this.token,ext:ie,time:Z,msgConfig:j.msgConfig,onlineState:q}).delay&&delete ee.delay,!ee.msgConfig&&delete j.msgConfig,ee.error=re,ee.errorText=oe,ee.errorCode=ne,!z&&this.onPictureMessage&&this.onPictureMessage(ee),Se={id:B,type:"img",chatType:K,from:F,to:W,url:he||"",width:Ie,height:Oe,secret:G.secretKey||"",thumb:this.useOwnUploadFun?"":"".concat(he,"&thumbnail=true"),thumb_secret:G.secretKey,file_length:G.fileLength||0,ext:ie,time:Number(Z),onlineState:q},ee.msgConfig&&(Se.msgConfig=ee.msgConfig),ae.length>0&&(Se.reactions=ae),pe&&(Se.chatThread=pe),de&&(Se.chatThreadOverview=de),"chatRoom"===K&&(Se.priority=V,Se.broadcast=Y),$&&(Se.isContentReplaced=$),te=Se,z?[3,9]:[4,null===(T=null===(E=this._localCache)||void 0===E?void 0:E.getInstance())||void 0===T?void 0:T.storeMessage(Se,p.r.SUCCESS)];case 8:f.sent(),null===(_=this.eventHandler)||void 0===_||_.dispatch("onImageMessage",Se),f.label=9;case 9:return[3,28];case 10:return he=this.useOwnUploadFun?G.remotePath:v.call(this,G),!(ee={id:B,type:H,contentsType:m[G.type],from:F,to:W,url:he,secret:G.secretKey,filename:G.displayName,length:G.duration||"",file_length:G.fileLength||"",filetype:G.filetype||"",accessToken:this.token||"",ext:ie,time:Z,msgConfig:j.msgConfig,onlineState:q}).delay&&delete ee.delay,!ee.msgConfig&&delete j.msgConfig,ee.error=re,ee.errorText=oe,ee.errorCode=ne,!z&&this.onVideoMessage&&this.onVideoMessage(ee),Ae={id:B,type:"video",chatType:K,from:F,to:W,url:he,secret:G.secretKey,thumb:a.P6.formatAttachUrl.call(this,G.thumbnailRemotePath),thumb_secret:G.thumbnailSecretKey,filename:G.displayName,length:G.duration||0,file:{},file_length:G.fileLength||0,filetype:G.filetype||"",accessToken:this.token||"",ext:ie,time:Number(Z),onlineState:q},ee.msgConfig&&(Ae.msgConfig=ee.msgConfig),ae.length>0&&(Ae.reactions=ae),pe&&(Ae.chatThread=pe),de&&(Ae.chatThreadOverview=de),"chatRoom"===K&&(Ae.priority=V,Ae.broadcast=Y),$&&(Ae.isContentReplaced=$),te=Ae,z?[3,12]:[4,null===(I=null===(R=this._localCache)||void 0===R?void 0:R.getInstance())||void 0===I?void 0:I.storeMessage(Ae,p.r.SUCCESS)];case 11:f.sent(),null===(O=this.eventHandler)||void 0===O||O.dispatch("onVideoMessage",Ae),f.label=12;case 12:return[3,28];case 13:return!(ee={id:B,type:H,contentsType:m[G.type],from:F,to:W,addr:G.address,buildingName:G.buildingName,lat:G.latitude,lng:G.longitude,ext:ie,time:Z,msgConfig:j.msgConfig,onlineState:q}).delay&&delete ee.delay,!ee.msgConfig&&delete j.msgConfig,ee.error=re,ee.errorText=oe,ee.errorCode=ne,!z&&this.onLocationMessage&&this.onLocationMessage(ee),Ce={id:B,type:"loc",chatType:K,from:F,to:W,buildingName:G.buildingName,addr:G.address,lat:G.latitude,lng:G.longitude,ext:ie,time:Number(Z),onlineState:q},ee.msgConfig&&(Ce.msgConfig=ee.msgConfig),ae.length>0&&(Ce.reactions=ae),pe&&(Ce.chatThread=pe),de&&(Ce.chatThreadOverview=de),"chatRoom"===K&&(Ce.priority=V,Ce.broadcast=Y),$&&(Ce.isContentReplaced=$),te=Ce,z?[3,15]:[4,null===(A=null===(S=this._localCache)||void 0===S?void 0:S.getInstance())||void 0===A?void 0:A.storeMessage(Ce,p.r.SUCCESS)];case 14:f.sent(),null===(C=this.eventHandler)||void 0===C||C.dispatch("onLocationMessage",Ce),f.label=15;case 15:return[3,28];case 16:return he=this.useOwnUploadFun?G.remotePath:v.call(this,G),!(ee={id:B,type:H,contentsType:m[G.type],from:F,to:W,url:he,secret:G.secretKey,filename:G.displayName,file_length:G.fileLength||"",accessToken:this.token||"",ext:ie,length:G.duration,time:Z,msgConfig:j.msgConfig,onlineState:q}).delay&&delete ee.delay,!ee.msgConfig&&delete j.msgConfig,ee.error=re,ee.errorText=oe,ee.errorCode=ne,!z&&this.onAudioMessage&&this.onAudioMessage(ee),be={id:B,type:"audio",chatType:K,from:F,to:W,url:he,secret:G.secretKey,file:{},filename:G.displayName,length:G.duration||0,file_length:G.fileLength||0,filetype:G.filetype||"",accessToken:this.token||"",ext:ie,time:Number(Z),onlineState:q},ee.msgConfig&&(be.msgConfig=ee.msgConfig),ae.length>0&&(be.reactions=ae),pe&&(be.chatThread=pe),de&&(be.chatThreadOverview=de),"chatRoom"===K&&(be.priority=V,be.broadcast=Y),$&&(be.isContentReplaced=$),te=be,z?[3,18]:[4,null===(N=null===(b=this._localCache)||void 0===b?void 0:b.getInstance())||void 0===N?void 0:N.storeMessage(be,p.r.SUCCESS)];case 17:f.sent(),null===(M=this.eventHandler)||void 0===M||M.dispatch("onAudioMessage",be),f.label=18;case 18:return[3,28];case 19:return he=this.useOwnUploadFun?G.remotePath:v.call(this,G),!(ee={id:B,type:H,contentsType:m[G.type],from:F,to:W,url:he,secret:G.secretKey,filename:G.displayName,file_length:G.fileLength,accessToken:this.token||"",ext:ie,time:Z,msgConfig:j.msgConfig,onlineState:q}).delay&&delete ee.delay,!ee.msgConfig&&delete j.msgConfig,ee.error=re,ee.errorText=oe,ee.errorCode=ne,!z&&this.onFileMessage&&this.onFileMessage(ee),Ne={id:B,type:"file",chatType:K,from:F,to:W,url:he,secret:G.secretKey,file:{},filename:G.displayName,length:G.duration||0,file_length:G.fileLength||0,filetype:G.filetype||"",accessToken:this.token||"",ext:ie,time:Number(Z),onlineState:q},ee.msgConfig&&(Ne.msgConfig=ee.msgConfig),ae.length>0&&(Ne.reactions=ae),pe&&(Ne.chatThread=pe),de&&(Ne.chatThreadOverview=de),"chatRoom"===K&&(Ne.priority=V,Ne.broadcast=Y),$&&(Ne.isContentReplaced=$),te=Ne,z?[3,21]:[4,null===(k=null===(w=this._localCache)||void 0===w?void 0:w.getInstance())||void 0===k?void 0:k.storeMessage(Ne,p.r.SUCCESS)];case 20:f.sent(),null===(P=this.eventHandler)||void 0===P||P.dispatch("onFileMessage",Ne),f.label=21;case 21:return[3,28];case 22:return!(ee={id:B,type:H,contentsType:m[G.type],from:F,to:W,action:G.action,ext:ie,time:Z,msgConfig:j.msgConfig,onlineState:q}).msgConfig&&delete j.msgConfig,ee.error=re,ee.errorText=oe,ee.errorCode=ne,!z&&this.onCmdMessage&&this.onCmdMessage(ee),Me={id:B,type:"cmd",chatType:K,from:F,to:W,action:G.action,ext:ie,time:Number(Z),onlineState:q},ee.msgConfig&&(Me.msgConfig=ee.msgConfig),ae.length>0&&(Me.reactions=ae),pe&&(Me.chatThread=pe),de&&(Me.chatThreadOverview=de),"chatRoom"===K&&(Me.priority=V,Me.broadcast=Y),$&&(Me.isContentReplaced=$),te=Me,z||null===(U=this.eventHandler)||void 0===U||U.dispatch("onCmdMessage",Me),[3,28];case 23:return we={},ke={},j.contents[0].customExts&&(we=g(j.contents[0].customExts)),j.contents[0].params&&(ke=g(j.contents[0].params)),ee={id:B,type:H,contentsType:m[G.type],from:F,to:W,customEvent:G.customEvent,params:ke,customExts:we,ext:ie,time:Z,onlineState:q},!z&&this.onCustomMessage&&this.onCustomMessage(ee),Pe={id:B,type:"custom",chatType:K,from:F,to:W,customEvent:G.customEvent,params:ke,customExts:we,ext:ie,time:Number(Z),onlineState:q},ee.msgConfig&&(Pe.msgConfig=ee.msgConfig),ae.length>0&&(Pe.reactions=ae),pe&&(Pe.chatThread=pe),de&&(Pe.chatThreadOverview=de),ce.operationCount>0&&(Pe.modifiedInfo=ce,j.type===s.gA.EDIT&&(Pe.from=ue,Pe.time=le)),"chatRoom"===K&&(Pe.priority=V,Pe.broadcast=Y),$&&(Pe.isContentReplaced=$),te=Pe,z?[3,25]:[4,null===(L=null===(x=this._localCache)||void 0===x?void 0:x.getInstance())||void 0===L?void 0:L.storeMessage(Pe,p.r.SUCCESS)];case 24:f.sent(),null===(D=this.eventHandler)||void 0===D||D.dispatch("onCustomMessage",Pe),f.label=25;case 25:return[3,28];case 26:return he=v.call(this,G),Ue={id:B,type:"combine",chatType:K,to:W,from:F,ext:ie,time:Number(Z),onlineState:q,title:G.title||"",summary:G.summary||"",url:he||"",secret:G.secretKey||"",file_length:G.fileLength||0,filename:G.displayName||"",compatibleText:G.text,combineLevel:G.combineLevel||0},ee.msgConfig&&(Ue.msgConfig=ee.msgConfig),ae.length>0&&(Ue.reactions=ae),pe&&(Ue.chatThread=pe),de&&(Ue.chatThreadOverview=de),"chatRoom"===K&&(Ue.priority=V,Ue.broadcast=Y),$&&(Ue.isContentReplaced=$),te=Ue,!z&&this.eventHandler&&this.eventHandler.dispatch("onCombineMessage",Ue),[3,28];case 27:return u.kg.error("Unknow message type, message:",G),[3,28];case 28:return J?[2,te]:[2,ee]}}))}))}function _(e,t,r){if(this.delivery&&e!==t){var n=this.getUniqueId(),o=new l.Message("delivery",n);o.set({ackId:r,to:e}),u.kg.debug("send delivery ack"),this.send(o.body)}}t.Z=function(e,t,r,n,i){var l,p,m,v,R,I,O,S,A,C,b,N,M,w,k,P,U,x,L,D,j,G,B,H,F,W;return h(this,void 0,void 0,(function(){var h,Z,q,K,z,V,J,X,Y,Q,$,ee,te,re,ne,oe,ie,ae,se,ce,ue,le,pe,de,he,fe,me,ge,ve,ye,Ee,Te,_e,Re,Ie,Oe,Se,Ae,Ce,be;return f(this,(function(f){switch(f.label){case 0:if(h=new(o())(e.timestamp.low,e.timestamp.high,e.timestamp.unsigned).toString(),Z=this.root.lookup("easemob.pb.MessageBody"),q=Z.decode(e.payload),K=3,z=!1,V=new(o())(e.id.low,e.id.high,e.id.unsigned).toString(),i&&e.from&&e.from.name===this.context.userId&&e.from.clientResource===this.clientResource&&q.type===s.gA.CHATROOM)return[2,u.kg.debug("Discard your own chat room message:",V)];if(e.meta&&e.meta.length){if(J=a.P6.parseNotify(e.meta),X=J.is_online,Y=J.callback_replace,this.useReplacedMessageContents&&Y&&(z=!0),X||0===X)switch(X){case 0:K=0;break;case 1:K=1;break;default:K=2}}else K=3;switch(Q=q.ackMessageId?new(o())(q.ackMessageId.low,q.ackMessageId.high,q.ackMessageId.unsigned).toString():"",$="",ee=y.call(this,e,q),te=E.call(this,e,q),u.kg.debug("meta thirdMessage:",{metaId:V,metaNs:e.ns,type:q.type,from:ee,to:te,contentType:null===(p=null===(l=q.contents)||void 0===l?void 0:l[0])||void 0===p?void 0:p.type,contentLen:null===(m=q.contents)||void 0===m?void 0:m.length}),q.type){case s.gA.SINGLECHAT:return[3,1];case s.gA.GROUPCHAT:return[3,2];case s.gA.CHATROOM:return[3,3];case s.gA.READ_ACK:return[3,4];case s.gA.DELIVER_ACK:return[3,5];case s.gA.RECALL:return[3,6];case s.gA.CHANNEL_ACK:return[3,15];case s.gA.EDIT:return[3,16]}return[3,20];case 1:return $="chat","agoraToken"===this.grantType&&($="singleChat"),this.delivery&&!r&&ee!==this.context.userId&&_.call(this,ee,te,V),[3,21];case 2:return $="groupchat","agoraToken"===this.grantType&&($="groupChat"),[3,21];case 3:return $="chatroom","agoraToken"===this.grantType&&($="chatRoom"),K=1,[3,21];case 4:return $="read_ack",re=void 0,q.ext[0]&&JSON.parse(q.ext[0].stringValue)?(re={id:V,type:"read",from:ee,to:te,mid:Q,groupReadCount:q.ext[0]&&JSON.parse(q.ext[0].stringValue),ackContent:q.ackContent,onlineState:K},this.onReadMessage&&this.onReadMessage(re),null===(v=this.eventHandler)||void 0===v||v.dispatch("onReadMessage",re),[2]):(re={id:V,type:"read",from:ee,to:te,mid:Q,onlineState:K},this.onReadMessage&&this.onReadMessage(re),null===(R=this.eventHandler)||void 0===R||R.dispatch("onReadMessage",re),[2]);case 5:return $="deliver_ack",this.onDeliveredMessage&&this.onDeliveredMessage({id:V,type:"delivery",from:ee,to:te,mid:Q,onlineState:K}),ne={id:V,type:"delivery",from:ee,to:te,mid:Q,onlineState:K},null===(I=this.eventHandler)||void 0===I||I.dispatch("onDeliveredMessage",ne),[2];case 6:return $="recall",oe="",e.ext&&(oe=(null===(O=g(e.ext))||void 0===O?void 0:O.recallMessageExtensionInfo)||""),ie={id:V,from:ee||"admin",to:te,mid:Q,ext:oe,onlineState:K},ae=te===this.user?ee:te,[4,null===(A=null===(S=this._localCache)||void 0===S?void 0:S.getInstance())||void 0===A?void 0:A.getMessageByServerMsgId(ie.mid)];case 7:return(se=f.sent())?[4,null===(b=null===(C=this._localCache)||void 0===C?void 0:C.getInstance())||void 0===b?void 0:b.removeMsgByServerMsgId(ie.mid)]:[3,9];case 8:f.sent(),f.label=9;case 9:return"singleChat"!==(null==se?void 0:se.chatType)&&"groupChat"!==(null==se?void 0:se.chatType)?[3,14]:(ce=(null==se?void 0:se.from)===this.user||""===(null==se?void 0:se.from),[4,null===(M=null===(N=this._localCache)||void 0===N?void 0:N.getInstance())||void 0===M?void 0:M.getConversationLastMessage(ae,se.chatType)]);case 10:return ue=f.sent(),[4,null===(k=null===(w=this._localCache)||void 0===w?void 0:w.getInstance())||void 0===k?void 0:k.getConversationBySessionId((0,c.MQ)({conversationId:ae,conversationType:se.chatType}))];case 11:return(le=f.sent())?[4,null===(U=null===(P=this._localCache)||void 0===P?void 0:P.getInstance())||void 0===U?void 0:U.updateLocalConversation((0,c.MQ)({conversationId:ae,conversationType:se.chatType}),{lastMessageId:null==ue?void 0:ue.serverMsgId,unReadCount:(0,c.E7)({conversation:le,isRecallSelfMsg:ce,recalledMsgTime:se.time})})]:[3,13];case 12:f.sent(),f.label=13;case 13:f.label=14;case 14:return this.onRecallMessage&&this.onRecallMessage(ie),null===(x=this.eventHandler)||void 0===x||x.dispatch("onRecallMessage",ie),[2];case 15:return this.onChannelMessage&&this.onChannelMessage({id:V,type:"channel",chatType:"singleChat",from:ee,to:te,time:Number(h),onlineState:K}),pe={id:V,type:"channel",chatType:"singleChat",from:ee,to:te,time:Number(h),onlineState:K},null===(L=this.eventHandler)||void 0===L||L.dispatch("onChannelMessage",pe),[2];case 16:return de={errorCode:0,reason:""},[4,T.call(this,{status:de,thirdMessage:q,msgBody:q.contents[0],msgId:V,type:$,from:ee,to:te,time:h,onlineState:K,ignoreCallback:!0,format:!0,isContentReplaced:z})];case 17:return he=f.sent(),fe=!!e.to&&-1!==e.to.domain.indexOf("conference"),he.chatType=fe?"groupChat":"singleChat",me=q.editMessageId&&new(o())(q.editMessageId.low,q.editMessageId.high,q.editMessageId.unsigned).toString(),ge={},"txt"===he.type?(ve=he.type,ye=he.chatType,Ee=he.to,Te=he.from,_e=he.time,Re=he.modifiedInfo,ge={id:me,type:ve,chatType:ye,to:Ee,from:Te,time:_e,modifiedInfo:Re,msg:he.msg},he.translations&&(ge.translations=he.translations)):"custom"===he.type&&((ge=he).id=me,delete ge.onlineState),ge?[4,null===(j=null===(D=this._localCache)||void 0===D?void 0:D.getInstance())||void 0===j?void 0:j.getMessageByServerMsgId(me)]:[3,19];case 18:"txt"===(null==(Ie=f.sent())?void 0:Ie.type)&&"txt"===ge.type?null===(B=null===(G=this._localCache)||void 0===G?void 0:G.getInstance())||void 0===B||B.putMessageToDB(d(d({},Ie),{msg:ge.msg,modifiedInfo:ge.modifiedInfo,translations:ge.translations})):"custom"===(null==Ie?void 0:Ie.type)&&"custom"===ge.type&&(null===(F=null===(H=this._localCache)||void 0===H?void 0:H.getInstance())||void 0===F||F.putMessageToDB(d(d({},Ie),{modifiedInfo:ge.modifiedInfo,customEvent:ge.customEvent,customExts:ge.customExts,ext:ge.ext}))),f.label=19;case 19:return"txt"!==he.type&&"custom"!==he.type||null===(W=this.eventHandler)||void 0===W||W.dispatch("onModifiedMessage",ge),[2];case 20:return u.kg.error("unexpected message type: ".concat(q.type)),[2];case 21:Oe="normal",Ae=!1,"chat"===$.toLowerCase()||"singleChat"===$?Se="singleChat":"groupchat"===$.toLowerCase()||"groupChat"===$?Se="groupChat":(Se="chatRoom",K=1,e.ext&&(Ce=g(e.ext),Ae=!!(null==Ce?void 0:Ce.is_broadcast),Oe=0===Ce.chatroom_msg_tag?"high":2===Ce.chatroom_msg_tag?"low":"normal")),be=0,f.label=22;case 22:return ben?i:i&&i>0?i-1:0},i=function(e){var t,r=0;if(0===e.length)return r;for(t=0;t0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]n;)s.push(o.substring(0,n)),a-=n,o=o.substring(n);s.push(o),c=0,l=s,u.label=1;case 1:if(!(c=0&&e<=this.levels.SILENT))throw Error("log.setLevel() called with invalid level: "+e);if(this.currentLevel=e,!1!==t&&this._persistLevel(e),this.replaceLoggingMethods(e,r||""),"undefined"==typeof console&&e=n)){if(r0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]r.file.size?r.file.size:i,total:r.file.size,lengthComputable:e.lengthComputable})}},this.uuid="",this.pool=[],this.progressArr=[],this.connection=e,this.options=t,this.partSize=u,this.file=t.file,this.init(),this.rpt=this.connection.dataReport.geOperateFun({operationName:a.fI.REST_UPLOAD_FILE_IN_PARTS})}return e.prototype.init=function(){var e,t,r,o;return y(this,void 0,void 0,(function(){var i,s,l,d,h,m,g,v,y,T,_,R,I,O,S;return E(this,(function(E){switch(E.label){case 0:return E.trys.push([0,4,,6]),[4,f.call(this.connection)];case 1:return i=E.sent(),s=i.data||{},l=s.fileMaxSize,d=void 0===l?0:l,h=s.partMinSize,m=void 0===h?u:h,g=s.uuid,v=void 0===g?"":g,y=i.extraInfo,R=y.elapse,I=y.httpCode,S=y.url,this.partSize=m,this.uuid=v,p.size=m,c.kg.debug("multipartInit success","uuid: ".concat(v),"fileMaxSize: ".concat(d),"partMinSize: ".concat(m)),this.file.size>d?[4,this.multipartAbort()]:[3,3];case 2:return E.sent(),null===(t=(e=this.options).onFileUploadError)||void 0===t||t.call(e,{code:n.E.WEBIM_UPLOADFILE_ERROR,message:"The file size exceeds the maximum limit"}),[2];case 3:return this.rpt({data:{requestUrl:S,requestName:a.c.REST_INIT_UPLOAD_TASK_IN_PARTS,requestElapse:R,requestMethod:"POST",isSuccess:1,code:I}}),this.upload(),[3,6];case 4:return T=E.sent(),_=(null==T?void 0:T.extraInfo)||{},R=_.elapse,I=_.httpCode,O=_.errDesc,S=_.url,this.rpt({data:{requestUrl:S,requestName:a.c.REST_INIT_UPLOAD_TASK_IN_PARTS,requestElapse:R,requestMethod:"POST",isSuccess:0,codeDesc:O,code:I}}),[4,this.multipartAbort()];case 5:return E.sent(),null===(o=null===(r=this.options)||void 0===r?void 0:r.onInitFail)||void 0===o||o.call(r),[3,6];case 6:return[2]}}))}))},e.prototype.upload=function(){var e,t,r;return y(this,void 0,void 0,(function(){var n,o,i,s,c,u,l=this;return E(this,(function(p){switch(p.label){case 0:(new FileReader).readAsArrayBuffer(this.file),n=this.file.size,o=Math.ceil(n/this.partSize),p.label=1;case 1:p.trys.push([1,7,,9]),i=function(t){var r,o,i,c;return E(this,(function(u){switch(u.label){case 0:return r=t*s.partSize,o=Math.min(n,r+s.partSize),i=null===(e=s.file)||void 0===e?void 0:e.slice(r,o),(c=m.call(s.connection,{uuid:s.uuid,partNumber:"".concat(t+1),part:i,onProgress:function(e){l.handleUploadProgress(e,t)}})).then((function(e){var t=(null==e?void 0:e.extraInfo)||{},r=t.elapse,n=t.httpCode,o=t.url;l.rpt({data:{requestUrl:o,requestName:a.c.REST_UPLOAD_PART,requestElapse:r,isSuccess:1,requestMethod:"PUT",code:n}}),l.handleTask(c)})),c.catch((function(e){var t=(null==e?void 0:e.extraInfo)||{},r=t.elapse,n=t.httpCode,o=t.url,i=t.errDesc;l.rpt({data:{requestUrl:o,requestName:a.c.REST_UPLOAD_PART,requestElapse:r,isSuccess:0,requestMethod:"PUT",code:n,codeDesc:i}}),delete e.extraInfo})),s.pool.push(c),4!==s.pool.length?[3,2]:[4,Promise.race(s.pool)];case 1:u.sent(),u.label=2;case 2:return[2]}}))},s=this,c=0,p.label=2;case 2:return c0?"&":"?")+(m?m+"&":m)+"_v="+(new Date).getTime(),f=null,m=""}r=(new Date).getTime(),l.open(h,e.url);var v=e.headers||{};for(var y in v["Content-Type"]||(v["Content-Type"]="application/json"),v)v.hasOwnProperty(y)&&l.setRequestHeader(y,v[y]);l.send(f)})).then((function(r){return o.dataReport&&t&&t!==a.fI.SDK_INTERNAL&&o.dataReport.geOperateFun({operationName:t})({isEndApi:!0,data:R({isSuccess:1,requestUrl:e.url,requestName:t,requestMethod:e.type},x(r.extraInfo))}),t===a.fI.SDK_INTERNAL&&(r.extraInfo.url=e.url),t!==a.fI.SDK_INTERNAL&&delete r.extraInfo,"Object"===S(r)?R(R({},r),{type:n.E.REQUEST_SUCCESS}):{data:r,type:n.E.REQUEST_SUCCESS}})).catch((function(n){var i,s;if(o.dataReport&&t&&t!==a.fI.SDK_INTERNAL&&o.dataReport.geOperateFun({operationName:t})({isEndApi:!0,data:R({isSuccess:0,requestUrl:e.url,requestName:t,requestMethod:e.type},x(n.extraInfo))}),t===a.fI.SDK_INTERNAL)if(n.extraInfo)n.extraInfo.url=e.url;else{var c={elapse:(new Date).getTime()-r,httpCode:null!==(s=null===(i=n.xhr)||void 0===i?void 0:i.status)&&void 0!==s?s:0,url:e.url};n.extraInfo=c}throw t!==a.fI.SDK_INTERNAL&&delete n.extraInfo,n})):A.call(this,e,t)}function S(e){return Object.prototype.toString.call(e).slice(8,-1)}function A(e,t){var r=this;return new Promise((function(r,o){var i=e.success||I,a=e.error||I,u=e.type||"POST",l=e.data||null,p="",h=(new Date).getTime(),f=D.getEnvInfo();if("get"===u.toLowerCase()&&l){for(var m in l)l.hasOwnProperty(m)&&(p+=m+"="+l[m]+"&");p=p?p.slice(0,-1):p,e.url+=(e.url.indexOf("?")>0?"&":"?")+(p?p+"&":p)+"_v="+(new Date).getTime(),l=null,p=""}var g={url:e.url,data:e.data,method:u,headers:{},timeout:d.Gf,success:function(e){var n,s,u,l,p,d={elapse:(new Date).getTime()-h,httpCode:Number((null===(n=e.statusCode)||void 0===n?void 0:n.toString())||(null===(s=e.status)||void 0===s?void 0:s.toString())),errDesc:(null===(u=null==e?void 0:e.data)||void 0===u?void 0:u.error_description)||""};if("200"===(null===(l=e.statusCode)||void 0===l?void 0:l.toString())||"200"===(null===(p=e.status)||void 0===p?void 0:p.toString())){e.data.extraInfo=d;var f=e.data;i(f),r(f)}else e.extraInfo=d,a(f=e),o(f),c.kg.debug(t,"reject reason: ",f)},complete:function(){},fail:function(e){var r={elapse:(new Date).getTime()-h,httpCode:s.Tp,errDesc:"request:fail"};if(e.extraInfo=r,e.data={error:"request:fail",error_description:"request:fail"},"request:fail timeout"===e.errMsg)return o({type:n.E.REQUEST_TIMEOUT,message:"Request Timeout",extraInfo:r}),void a({type:n.E.REQUEST_TIMEOUT,message:"Request Timeout",extraInfo:r});a(e),o(e),c.kg.error(t,"fail reason:",e)}};if("zfb"===f.platform||"dd"===f.platform?g.headers=e.headers:g.header=e.headers,"dd"===f.platform)return dd.httpRequest(g);f.global.request(g)})).then((function(o){return r.dataReport&&t&&t!==a.fI.SDK_INTERNAL&&r.dataReport.geOperateFun({operationName:t})({isEndApi:!0,data:R({isSuccess:1,requestUrl:e.url,requestName:t,requestMethod:e.type},x(o.extraInfo))}),t!==a.fI.SDK_INTERNAL&&delete o.extraInfo,"Object"===S(o)?R(R({},o),{type:n.E.REQUEST_SUCCESS}):{data:o,type:n.E.REQUEST_SUCCESS}})).catch((function(n){throw r.dataReport&&t&&t!==a.fI.SDK_INTERNAL&&r.dataReport.geOperateFun({operationName:t})({isEndApi:!0,data:R({isSuccess:0,requestUrl:e.url,requestName:t,requestMethod:e.type},x(n.extraInfo))}),t!==a.fI.SDK_INTERNAL&&delete n.extraInfo,n}))}function C(e,t){var r;return function(){for(var n=[],o=0;o1.5*m?new T(this,{file:null===(i=null==e?void 0:e.file)||void 0===i?void 0:i.data,onFileUploadProgress:e.onFileUploadProgress||I,onFileUploadComplete:e.onFileUploadComplete||I,onFileUploadError:e.onFileUploadError||I,onFileUploadCanceled:e.onFileUploadCanceled||I,onInitFail:function(){_.call(a,R(R({},e),{orgName:h,appName:f,operateName:t}))},thumbnailInfo:{width:e.thumbnailWidth,height:e.thumbnailHeight}}):_.call(this,R(R({},e),{orgName:h,appName:f,operateName:t}))}else e.onFileUploadError&&e.onFileUploadError({type:n.E.WEBIM_UPLOADFILE_ERROR,message:"AppKey illegal"});else e.onFileUploadError&&e.onFileUploadError({type:n.E.WEBIM_UPLOADFILE_NO_LOGIN,message:"AccessToken cannot be empty"})}function U(e,t){e.onFileDownloadComplete=e.onFileDownloadComplete||I,e.onFileDownloadError=e.onFileDownloadError||I;var r=(new Date).getTime(),o=new XMLHttpRequest,i=this;o.addEventListener("load",(function(n){var s=(new Date).getTime()-r;i.dataReport&&t&&t===a.fI.DOWN_GROUP_FILE&&i.dataReport.geOperateFun({operationName:t})({isEndApi:!0,data:{isSuccess:200===o.status?1:0,requestMethod:"POST",requestName:t,requestElapse:s,requestUrl:null==e?void 0:e.url,code:o.status,codeDesc:200===o.status?"":"download file error"}}),e.onFileDownloadComplete&&e.onFileDownloadComplete(o.response)}),!1),o.addEventListener("error",(function(s){var c=(new Date).getTime()-r;i.dataReport&&t&&t===a.fI.DOWN_GROUP_FILE&&i.dataReport.geOperateFun({operationName:t})({isEndApi:!0,data:{isSuccess:0,requestMethod:"POST",requestName:t,requestElapse:c,requestUrl:null==e?void 0:e.url,code:(null==o?void 0:o.status)||0,codeDesc:"download file error"}}),e.onFileDownloadError&&e.onFileDownloadError({type:n.E.WEBIM_DOWNLOADFILE_ERROR,id:e.id,xhr:o})}),!1);var s=e.method||"GET",c=e.responseType||"blob",u=e.mimeType||"text/plain; charset=x-user-defined";o.open(s,e.url),"undefined"!=typeof Blob?o.responseType=c:o.overrideMimeType(u);var l={"X-Requested-With":"XMLHttpRequest",Accept:"application/octet-stream","share-secret":e.secret,Authorization:"Bearer "+this.context.accessToken},p=e.headers||{};for(var d in p)l[d]=p[d];for(var d in l)l[d]&&o.setRequestHeader(d,l[d]);o.send(null)}function x(e){void 0===e&&(e={});var t=e.elapse,r=void 0===t?0:t,n=e.httpCode,o=void 0===n?0:n,i=e.errDesc;return{requestElapse:r,code:o,codeDesc:void 0===i?"":i}}!function(e){e.WEB="web",e.WX="wx",e.QQ="qq",e.ZFB="zfb",e.DD="dd",e.TT="tt",e.BAIDU="baidu",e.QUICK_APP="quick_app",e.UNI="uni",e.NODE="node"}(b||(b={}));var L="localDeviceInfo",D={autoIncrement:0,ajaxUnconventionalErrorTimes:0,ajax:O,getUniqueId:function(){this.autoIncrement?this.autoIncrement++:this.autoIncrement=1;var e=new Date,t=new Date(2010,1,1);return(e.getTime()-t.getTime()+this.autoIncrement).toString()},getFileUrl:function(e){var t={url:"",filename:"",filetype:"",data:{}},r="string"==typeof e?document.getElementById(e):e;if(window.URL.createObjectURL){if(!r.files)throw Error("this is not HTMLInputElement");var n=r.files;if(n.length>0){var o=n.item(0);t.data=o,t.url=window.URL.createObjectURL(o),t.filename=(null==o?void 0:o.name)||""}}else{if("string"!=typeof e)throw Error("in IE fileInputId must be string");o=document.getElementById(e).value,t.url=o;var i=o.lastIndexOf("/"),a=o.lastIndexOf("\\"),s=Math.max(i,a);t.filename=s<0?o:o.substring(s+1)}var c=t.filename.lastIndexOf(".");return-1!==c&&(t.filetype=t.filename.substring(c+1).toLowerCase()),t},uploadFile:P,flow:function(e){for(var t=e.length,r=t;r--;)if("function"!=typeof e[r])throw new TypeError("Expected a function");return function(){for(var r=[],n=0;nObject.prototype.toString.call(e).indexOf("Blob")?this.url+"?token=":window.URL.createObjectURL(e)},download:U,parseNotify:function(e){for(var t="",r=0;r0?setTimeout((function(){t(i-1)}),r||1e3):o(e)}))}(t||3)}))},formatAttachUrl:function(e){return e&&"string"==typeof e?"".concat(this.apiUrl).concat(e.substr(e.indexOf("/",9))):""},Uint8ArrayToString:function(e){for(var t="",r=0;r>8&255]},z=function(e){return[255&e,e>>8&255,e>>16&255,e>>24&255]},V=function(e){return e[3]<<24|e[2]<<16|e[1]<<8|e[0]},J=function(e){return W(e,23,4)},X=function(e){return W(e,52,8)},Y=function(e,t,r){u(e[b],t,{configurable:!0,get:function(){return r(this)[t]}})},Q=function(e,t,r,n){var o=m(r),i=w(e);if(o+t>i.byteLength)throw B(N);var a=i.bytes,s=o+i.byteOffset,c=_(a,s,s+t);return n?c:F(c)},$=function(e,t,r,n,o,i){var a=m(r),s=w(e);if(a+t>s.byteLength)throw B(N);for(var c=s.bytes,u=a+s.byteOffset,l=n(+o),p=0;pne;)(te=re[ne++])in U||c(U,te,P[te]);x.constructor=U}y&&v(D)!==j&&y(D,j);var oe=new L(new U(2)),ie=o(D.setInt8);oe.setInt8(0,2147483648),oe.setInt8(1,2147483649),!oe.getInt8(0)&&oe.getInt8(1)||l(D,{setInt8:function(e,t){ie(this,e,t<<24>>24)},setUint8:function(e,t){ie(this,e,t<<24>>24)}},{unsafe:!0})}else x=(U=function(e){d(this,x);var t=m(e);k(this,{type:A,bytes:H(G(t),0),byteLength:t}),i||(this.byteLength=t,this.detached=!1)})[b],D=(L=function(e,t,r){d(this,D),d(e,x);var n=M(e),o=n.byteLength,a=h(t);if(a<0||a>o)throw B("Wrong offset");if(a+(r=void 0===r?o-a:f(r))>o)throw B("Wrong length");k(this,{type:C,buffer:e,byteLength:r,byteOffset:a,bytes:n.bytes}),i||(this.buffer=e,this.byteLength=r,this.byteOffset=a)})[b],i&&(Y(U,"byteLength",M),Y(L,"buffer",w),Y(L,"byteLength",w),Y(L,"byteOffset",w)),l(D,{getInt8:function(e){return Q(this,1,e)[0]<<24>>24},getUint8:function(e){return Q(this,1,e)[0]},getInt16:function(e){var t=Q(this,2,e,arguments.length>1?arguments[1]:void 0);return(t[1]<<8|t[0])<<16>>16},getUint16:function(e){var t=Q(this,2,e,arguments.length>1?arguments[1]:void 0);return t[1]<<8|t[0]},getInt32:function(e){return V(Q(this,4,e,arguments.length>1?arguments[1]:void 0))},getUint32:function(e){return V(Q(this,4,e,arguments.length>1?arguments[1]:void 0))>>>0},getFloat32:function(e){return Z(Q(this,4,e,arguments.length>1?arguments[1]:void 0),23)},getFloat64:function(e){return Z(Q(this,8,e,arguments.length>1?arguments[1]:void 0),52)},setInt8:function(e,t){$(this,1,e,q,t)},setUint8:function(e,t){$(this,1,e,q,t)},setInt16:function(e,t){$(this,2,e,K,t,arguments.length>2?arguments[2]:void 0)},setUint16:function(e,t){$(this,2,e,K,t,arguments.length>2?arguments[2]:void 0)},setInt32:function(e,t){$(this,4,e,z,t,arguments.length>2?arguments[2]:void 0)},setUint32:function(e,t){$(this,4,e,z,t,arguments.length>2?arguments[2]:void 0)},setFloat32:function(e,t){$(this,4,e,J,t,arguments.length>2?arguments[2]:void 0)},setFloat64:function(e,t){$(this,8,e,X,t,arguments.length>2?arguments[2]:void 0)}});R(U,A),R(L,C),e.exports={ArrayBuffer:U,DataView:L}},1048:function(e,t,r){"use strict";var n=r(7908),o=r(1400),i=r(6244),a=r(5117),s=Math.min;e.exports=[].copyWithin||function(e,t){var r=n(this),c=i(r),u=o(e,c),l=o(t,c),p=arguments.length>2?arguments[2]:void 0,d=s((void 0===p?c:o(p,c))-l,c-u),h=1;for(l0;)l in r?r[u]=r[l]:a(r,u),u+=h,l+=h;return r}},1285:function(e,t,r){"use strict";var n=r(7908),o=r(1400),i=r(6244);e.exports=function(e){for(var t=n(this),r=i(t),a=arguments.length,s=o(a>1?arguments[1]:void 0,r),c=a>2?arguments[2]:void 0,u=void 0===c?r:o(c,r);u>s;)t[s++]=e;return t}},8533:function(e,t,r){"use strict";var n=r(2092).forEach,o=r(9341)("forEach");e.exports=o?[].forEach:function(e){return n(this,e,arguments.length>1?arguments[1]:void 0)}},7745:function(e,t,r){var n=r(6244);e.exports=function(e,t){for(var r=0,o=n(t),i=new e(o);o>r;)i[r]=t[r++];return i}},8457:function(e,t,r){"use strict";var n=r(9974),o=r(6916),i=r(7908),a=r(3411),s=r(7659),c=r(4411),u=r(6244),l=r(6135),p=r(4121),d=r(1246),h=Array;e.exports=function(e){var t=i(e),r=c(this),f=arguments.length,m=f>1?arguments[1]:void 0,g=void 0!==m;g&&(m=n(m,f>2?arguments[2]:void 0));var v,y,E,T,_,R,I=d(t),O=0;if(!I||this===h&&s(I))for(v=u(t),y=r?new this(v):h(v);v>O;O++)R=g?m(t[O],O):t[O],l(y,O,R);else for(_=(T=p(t,I)).next,y=r?new this:[];!(E=o(_,T)).done;O++)R=g?a(T,m,[E.value,O],!0):E.value,l(y,O,R);return y.length=O,y}},1318:function(e,t,r){var n=r(5656),o=r(1400),i=r(6244),a=function(e){return function(t,r,a){var s,c=n(t),u=i(c),l=o(a,u);if(e&&r!=r){for(;u>l;)if((s=c[l++])!=s)return!0}else for(;u>l;l++)if((e||l in c)&&c[l]===r)return e||l||0;return!e&&-1}};e.exports={includes:a(!0),indexOf:a(!1)}},2092:function(e,t,r){var n=r(9974),o=r(1702),i=r(8361),a=r(7908),s=r(6244),c=r(5417),u=o([].push),l=function(e){var t=1==e,r=2==e,o=3==e,l=4==e,p=6==e,d=7==e,h=5==e||p;return function(f,m,g,v){for(var y,E,T=a(f),_=i(T),R=n(m,g),I=s(_),O=0,S=v||c,A=t?S(f,I):r||d?S(f,0):void 0;I>O;O++)if((h||O in _)&&(E=R(y=_[O],O,T),e))if(t)A[O]=E;else if(E)switch(e){case 3:return!0;case 5:return y;case 6:return O;case 2:u(A,y)}else switch(e){case 4:return!1;case 7:u(A,y)}return p?-1:o||l?l:A}};e.exports={forEach:l(0),map:l(1),filter:l(2),some:l(3),every:l(4),find:l(5),findIndex:l(6),filterReject:l(7)}},6583:function(e,t,r){"use strict";var n=r(2104),o=r(5656),i=r(9303),a=r(6244),s=r(9341),c=Math.min,u=[].lastIndexOf,l=!!u&&1/[1].lastIndexOf(1,-0)<0,p=s("lastIndexOf"),d=l||!p;e.exports=d?function(e){if(l)return n(u,this,arguments)||0;var t=o(this),r=a(t),s=r-1;for(arguments.length>1&&(s=c(s,i(arguments[1]))),s<0&&(s=r+s);s>=0;s--)if(s in t&&t[s]===e)return s||0;return-1}:u},1194:function(e,t,r){var n=r(7293),o=r(5112),i=r(7392),a=o("species");e.exports=function(e){return i>=51||!n((function(){var t=[];return(t.constructor={})[a]=function(){return{foo:1}},1!==t[e](Boolean).foo}))}},9341:function(e,t,r){"use strict";var n=r(7293);e.exports=function(e,t){var r=[][e];return!!r&&n((function(){r.call(null,t||function(){return 1},1)}))}},3671:function(e,t,r){var n=r(9662),o=r(7908),i=r(8361),a=r(6244),s=TypeError,c=function(e){return function(t,r,c,u){n(r);var l=o(t),p=i(l),d=a(l),h=e?d-1:0,f=e?-1:1;if(c<2)for(;;){if(h in p){u=p[h],h+=f;break}if(h+=f,e?h<0:d<=h)throw s("Reduce of empty array with no initial value")}for(;e?h>=0:d>h;h+=f)h in p&&(u=r(u,p[h],h,l));return u}};e.exports={left:c(!1),right:c(!0)}},3658:function(e,t,r){"use strict";var n=r(9781),o=r(3157),i=TypeError,a=Object.getOwnPropertyDescriptor,s=n&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(e){return e instanceof TypeError}}();e.exports=s?function(e,t){if(o(e)&&!a(e,"length").writable)throw i("Cannot set read only .length");return e.length=t}:function(e,t){return e.length=t}},1589:function(e,t,r){var n=r(1400),o=r(6244),i=r(6135),a=Array,s=Math.max;e.exports=function(e,t,r){for(var c=o(e),u=n(t,c),l=n(void 0===r?c:r,c),p=a(s(l-u,0)),d=0;u0;)e[n]=e[--n];n!==i++&&(e[n]=r)}return e},s=function(e,t,r,n){for(var o=t.length,i=r.length,a=0,s=0;a1?arguments[1]:void 0);t=t?t.next:r.first;)for(n(t.value,t.key,this);t&&t.removed;)t=t.previous},has:function(e){return!!E(this,e)}}),i(d,r?{get:function(e){var t=E(this,e);return t&&t.value},set:function(e,t){return y(this,0===e?0:e,t)}}:{add:function(e){return y(this,e=0===e?0:e,e)}}),h&&o(d,"size",{configurable:!0,get:function(){return m(this).size}}),p},setStrong:function(e,t,r){var n=t+" Iterator",o=v(t),i=v(n);l(e,t,(function(e,t){g(this,{type:n,target:e,state:o(e),kind:t,last:void 0})}),(function(){for(var e=i(this),t=e.kind,r=e.last;r&&r.removed;)r=r.previous;return e.target&&(e.last=r=r?r.next:e.state.first)?p("keys"==t?r.key:"values"==t?r.value:[r.key,r.value],!1):(e.target=void 0,p(void 0,!0))}),r?"entries":"values",!r,!0),d(t)}}},7710:function(e,t,r){"use strict";var n=r(2109),o=r(7854),i=r(1702),a=r(4705),s=r(8052),c=r(2423),u=r(408),l=r(5787),p=r(614),d=r(8554),h=r(111),f=r(7293),m=r(7072),g=r(8003),v=r(9587);e.exports=function(e,t,r){var y=-1!==e.indexOf("Map"),E=-1!==e.indexOf("Weak"),T=y?"set":"add",_=o[e],R=_&&_.prototype,I=_,O={},S=function(e){var t=i(R[e]);s(R,e,"add"==e?function(e){return t(this,0===e?0:e),this}:"delete"==e?function(e){return!(E&&!h(e))&&t(this,0===e?0:e)}:"get"==e?function(e){return E&&!h(e)?void 0:t(this,0===e?0:e)}:"has"==e?function(e){return!(E&&!h(e))&&t(this,0===e?0:e)}:function(e,r){return t(this,0===e?0:e,r),this})};if(a(e,!p(_)||!(E||R.forEach&&!f((function(){(new _).entries().next()})))))I=r.getConstructor(t,e,y,T),c.enable();else if(a(e,!0)){var A=new I,C=A[T](E?{}:-0,1)!=A,b=f((function(){A.has(1)})),N=m((function(e){new _(e)})),M=!E&&f((function(){for(var e=new _,t=5;t--;)e[T](t,t);return!e.has(-0)}));N||((I=t((function(e,t){l(e,R);var r=v(new _,e,I);return d(t)||u(t,r[T],{that:r,AS_ENTRIES:y}),r}))).prototype=R,R.constructor=I),(b||M)&&(S("delete"),S("has"),y&&S("get")),(M||C)&&S(T),E&&R.clear&&delete R.clear}return O[e]=I,n({global:!0,constructor:!0,forced:I!=_},O),g(I,e),E||r.setStrong(I,e,y),I}},9920:function(e,t,r){var n=r(2597),o=r(3887),i=r(1236),a=r(3070);e.exports=function(e,t,r){for(var s=o(t),c=a.f,u=i.f,l=0;l9007199254740991)throw t("Maximum allowed index exceeded");return e}},8324:function(e){e.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},8509:function(e,t,r){var n=r(317)("span").classList,o=n&&n.constructor&&n.constructor.prototype;e.exports=o===Object.prototype?void 0:o},8886:function(e,t,r){var n=r(8113).match(/firefox\/(\d+)/i);e.exports=!!n&&+n[1]},7871:function(e,t,r){var n=r(3823),o=r(5268);e.exports=!n&&!o&&"object"==typeof window&&"object"==typeof document},9363:function(e){e.exports="function"==typeof Bun&&Bun&&"string"==typeof Bun.version},3823:function(e){e.exports="object"==typeof Deno&&Deno&&"object"==typeof Deno.version},256:function(e,t,r){var n=r(8113);e.exports=/MSIE|Trident/.test(n)},1528:function(e,t,r){var n=r(8113);e.exports=/ipad|iphone|ipod/i.test(n)&&"undefined"!=typeof Pebble},6833:function(e,t,r){var n=r(8113);e.exports=/(?:ipad|iphone|ipod).*applewebkit/i.test(n)},5268:function(e,t,r){var n=r(4326);e.exports="undefined"!=typeof process&&"process"==n(process)},1036:function(e,t,r){var n=r(8113);e.exports=/web0s(?!.*chrome)/i.test(n)},8113:function(e){e.exports="undefined"!=typeof navigator&&String(navigator.userAgent)||""},7392:function(e,t,r){var n,o,i=r(7854),a=r(8113),s=i.process,c=i.Deno,u=s&&s.versions||c&&c.version,l=u&&u.v8;l&&(o=(n=l.split("."))[0]>0&&n[0]<4?1:+(n[0]+n[1])),!o&&a&&(!(n=a.match(/Edge\/(\d+)/))||n[1]>=74)&&(n=a.match(/Chrome\/(\d+)/))&&(o=+n[1]),e.exports=o},8008:function(e,t,r){var n=r(8113).match(/AppleWebKit\/(\d+)\./);e.exports=!!n&&+n[1]},748:function(e){e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},2109:function(e,t,r){var n=r(7854),o=r(1236).f,i=r(8880),a=r(8052),s=r(3072),c=r(9920),u=r(4705);e.exports=function(e,t){var r,l,p,d,h,f=e.target,m=e.global,g=e.stat;if(r=m?n:g?n[f]||s(f,{}):(n[f]||{}).prototype)for(l in t){if(d=t[l],p=e.dontCallGetSet?(h=o(r,l))&&h.value:r[l],!u(m?l:f+(g?".":"#")+l,e.forced)&&void 0!==p){if(typeof d==typeof p)continue;c(d,p)}(e.sham||p&&p.sham)&&i(d,"sham",!0),a(r,l,d,e)}}},7293:function(e){e.exports=function(e){try{return!!e()}catch(e){return!0}}},7007:function(e,t,r){"use strict";r(4916);var n=r(1470),o=r(8052),i=r(2261),a=r(7293),s=r(5112),c=r(8880),u=s("species"),l=RegExp.prototype;e.exports=function(e,t,r,p){var d=s(e),h=!a((function(){var t={};return t[d]=function(){return 7},7!=""[e](t)})),f=h&&!a((function(){var t=!1,r=/a/;return"split"===e&&((r={}).constructor={},r.constructor[u]=function(){return r},r.flags="",r[d]=/./[d]),r.exec=function(){return t=!0,null},r[d](""),!t}));if(!h||!f||r){var m=n(/./[d]),g=t(d,""[e],(function(e,t,r,o,a){var s=n(e),c=t.exec;return c===i||c===l.exec?h&&!a?{done:!0,value:m(t,r,o)}:{done:!0,value:s(r,t,o)}:{done:!1}}));o(String.prototype,e,g[0]),o(l,d,g[1])}p&&c(l[d],"sham",!0)}},6677:function(e,t,r){var n=r(7293);e.exports=!n((function(){return Object.isExtensible(Object.preventExtensions({}))}))},2104:function(e,t,r){var n=r(4374),o=Function.prototype,i=o.apply,a=o.call;e.exports="object"==typeof Reflect&&Reflect.apply||(n?a.bind(i):function(){return a.apply(i,arguments)})},9974:function(e,t,r){var n=r(1470),o=r(9662),i=r(4374),a=n(n.bind);e.exports=function(e,t){return o(e),void 0===t?e:i?a(e,t):function(){return e.apply(t,arguments)}}},4374:function(e,t,r){var n=r(7293);e.exports=!n((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")}))},7065:function(e,t,r){"use strict";var n=r(1702),o=r(9662),i=r(111),a=r(2597),s=r(206),c=r(4374),u=Function,l=n([].concat),p=n([].join),d={};e.exports=c?u.bind:function(e){var t=o(this),r=t.prototype,n=s(arguments,1),c=function(){var r=l(n,s(arguments));return this instanceof c?function(e,t,r){if(!a(d,t)){for(var n=[],o=0;o>1,g=23===s?n(2,-24)-n(2,-77):0,v=e<0||0===e&&1/e<0?1:0,y=0;for((e=r(e))!=e||e===1/0?(l=e!=e?1:0,u=f):(u=o(i(e)/a),e*(p=n(2,-u))<1&&(u--,p*=2),(e+=u+m>=1?g/p:g*n(2,1-m))*p>=2&&(u++,p/=2),u+m>=f?(l=0,u=f):u+m>=1?(l=(e*p-1)*n(2,s),u+=m):(l=e*n(2,m-1)*n(2,s),u=0));s>=8;)d[y++]=255&l,l/=256,s-=8;for(u=u<0;)d[y++]=255&u,u/=256,h-=8;return d[--y]|=128*v,d},unpack:function(e,t){var r,o=e.length,i=8*o-t-1,a=(1<>1,c=i-7,u=o-1,l=e[u--],p=127&l;for(l>>=7;c>0;)p=256*p+e[u--],c-=8;for(r=p&(1<<-c)-1,p>>=-c,c+=t;c>0;)r=256*r+e[u--],c-=8;if(0===p)p=1-s;else{if(p===a)return r?NaN:l?-1/0:1/0;r+=n(2,t),p-=s}return(l?-1:1)*r*n(2,p-t)}}},8361:function(e,t,r){var n=r(1702),o=r(7293),i=r(4326),a=Object,s=n("".split);e.exports=o((function(){return!a("z").propertyIsEnumerable(0)}))?function(e){return"String"==i(e)?s(e,""):a(e)}:a},9587:function(e,t,r){var n=r(614),o=r(111),i=r(7674);e.exports=function(e,t,r){var a,s;return i&&n(a=t.constructor)&&a!==r&&o(s=a.prototype)&&s!==r.prototype&&i(e,s),e}},2788:function(e,t,r){var n=r(1702),o=r(614),i=r(5465),a=n(Function.toString);o(i.inspectSource)||(i.inspectSource=function(e){return a(e)}),e.exports=i.inspectSource},2423:function(e,t,r){var n=r(2109),o=r(1702),i=r(3501),a=r(111),s=r(2597),c=r(3070).f,u=r(8006),l=r(1156),p=r(2050),d=r(9711),h=r(6677),f=!1,m=d("meta"),g=0,v=function(e){c(e,m,{value:{objectID:"O"+g++,weakData:{}}})},y=e.exports={enable:function(){y.enable=function(){},f=!0;var e=u.f,t=o([].splice),r={};r[m]=1,e(r).length&&(u.f=function(r){for(var n=e(r),o=0,i=n.length;oy;y++)if((T=M(e[y]))&&u(m,T))return T;return new f(!1)}g=l(e,v)}for(_=S?e.next:g.next;!(R=o(_,g)).done;){try{T=M(R.value)}catch(e){d(g,"throw",e)}if("object"==typeof T&&T&&u(m,T))return T}return new f(!1)}},9212:function(e,t,r){var n=r(6916),o=r(9670),i=r(8173);e.exports=function(e,t,r){var a,s;o(e);try{if(!(a=i(e,"return"))){if("throw"===t)throw r;return r}a=n(a,e)}catch(e){s=!0,a=e}if("throw"===t)throw r;if(s)throw a;return o(a),r}},3061:function(e,t,r){"use strict";var n=r(3383).IteratorPrototype,o=r(30),i=r(9114),a=r(8003),s=r(7497),c=function(){return this};e.exports=function(e,t,r,u){var l=t+" Iterator";return e.prototype=o(n,{next:i(+!u,r)}),a(e,l,!1,!0),s[l]=c,e}},1656:function(e,t,r){"use strict";var n=r(2109),o=r(6916),i=r(1913),a=r(6530),s=r(614),c=r(3061),u=r(9518),l=r(7674),p=r(8003),d=r(8880),h=r(8052),f=r(5112),m=r(7497),g=r(3383),v=a.PROPER,y=a.CONFIGURABLE,E=g.IteratorPrototype,T=g.BUGGY_SAFARI_ITERATORS,_=f("iterator"),R="keys",I="values",O="entries",S=function(){return this};e.exports=function(e,t,r,a,f,g,A){c(r,t,a);var C,b,N,M=function(e){if(e===f&&x)return x;if(!T&&e in P)return P[e];switch(e){case R:case I:case O:return function(){return new r(this,e)}}return function(){return new r(this)}},w=t+" Iterator",k=!1,P=e.prototype,U=P[_]||P["@@iterator"]||f&&P[f],x=!T&&U||M(f),L="Array"==t&&P.entries||U;if(L&&(C=u(L.call(new e)))!==Object.prototype&&C.next&&(i||u(C)===E||(l?l(C,E):s(C[_])||h(C,_,S)),p(C,w,!0,!0),i&&(m[w]=S)),v&&f==I&&U&&U.name!==I&&(!i&&y?d(P,"name",I):(k=!0,x=function(){return o(U,this)})),f)if(b={values:M(I),keys:g?x:M(R),entries:M(O)},A)for(N in b)(T||k||!(N in P))&&h(P,N,b[N]);else n({target:t,proto:!0,forced:T||k},b);return i&&!A||P[_]===x||h(P,_,x,{name:f}),m[t]=x,b}},3383:function(e,t,r){"use strict";var n,o,i,a=r(7293),s=r(614),c=r(111),u=r(30),l=r(9518),p=r(8052),d=r(5112),h=r(1913),f=d("iterator"),m=!1;[].keys&&("next"in(i=[].keys())?(o=l(l(i)))!==Object.prototype&&(n=o):m=!0),!c(n)||a((function(){var e={};return n[f].call(e)!==e}))?n={}:h&&(n=u(n)),s(n[f])||p(n,f,(function(){return this})),e.exports={IteratorPrototype:n,BUGGY_SAFARI_ITERATORS:m}},7497:function(e){e.exports={}},6244:function(e,t,r){var n=r(7466);e.exports=function(e){return n(e.length)}},6339:function(e,t,r){var n=r(1702),o=r(7293),i=r(614),a=r(2597),s=r(9781),c=r(6530).CONFIGURABLE,u=r(2788),l=r(9909),p=l.enforce,d=l.get,h=String,f=Object.defineProperty,m=n("".slice),g=n("".replace),v=n([].join),y=s&&!o((function(){return 8!==f((function(){}),"length",{value:8}).length})),E=String(String).split("String"),T=e.exports=function(e,t,r){"Symbol("===m(h(t),0,7)&&(t="["+g(h(t),/^Symbol\(([^)]*)\)/,"$1")+"]"),r&&r.getter&&(t="get "+t),r&&r.setter&&(t="set "+t),(!a(e,"name")||c&&e.name!==t)&&(s?f(e,"name",{value:t,configurable:!0}):e.name=t),y&&r&&a(r,"arity")&&e.length!==r.arity&&f(e,"length",{value:r.arity});try{r&&a(r,"constructor")&&r.constructor?s&&f(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(e){}var n=p(e);return a(n,"source")||(n.source=v(E,"string"==typeof t?t:"")),e};Function.prototype.toString=T((function(){return i(this)&&d(this).source||u(this)}),"toString")},4758:function(e){var t=Math.ceil,r=Math.floor;e.exports=Math.trunc||function(e){var n=+e;return(n>0?r:t)(n)}},5948:function(e,t,r){var n,o,i,a,s,c=r(7854),u=r(9974),l=r(1236).f,p=r(261).set,d=r(8572),h=r(6833),f=r(1528),m=r(1036),g=r(5268),v=c.MutationObserver||c.WebKitMutationObserver,y=c.document,E=c.process,T=c.Promise,_=l(c,"queueMicrotask"),R=_&&_.value;if(!R){var I=new d,O=function(){var e,t;for(g&&(e=E.domain)&&e.exit();t=I.get();)try{t()}catch(e){throw I.head&&n(),e}e&&e.enter()};h||g||m||!v||!y?!f&&T&&T.resolve?((a=T.resolve(void 0)).constructor=T,s=u(a.then,a),n=function(){s(O)}):g?n=function(){E.nextTick(O)}:(p=u(p,c),n=function(){p(O)}):(o=!0,i=y.createTextNode(""),new v(O).observe(i,{characterData:!0}),n=function(){i.data=o=!o}),R=function(e){I.head||n(),I.add(e)}}e.exports=R},8523:function(e,t,r){"use strict";var n=r(9662),o=TypeError,i=function(e){var t,r;this.promise=new e((function(e,n){if(void 0!==t||void 0!==r)throw o("Bad Promise constructor");t=e,r=n})),this.resolve=n(t),this.reject=n(r)};e.exports.f=function(e){return new i(e)}},3929:function(e,t,r){var n=r(7850),o=TypeError;e.exports=function(e){if(n(e))throw o("The method doesn't accept regular expressions");return e}},1574:function(e,t,r){"use strict";var n=r(9781),o=r(1702),i=r(6916),a=r(7293),s=r(1956),c=r(5181),u=r(5296),l=r(7908),p=r(8361),d=Object.assign,h=Object.defineProperty,f=o([].concat);e.exports=!d||a((function(){if(n&&1!==d({b:1},d(h({},"a",{enumerable:!0,get:function(){h(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},t={},r=Symbol(),o="abcdefghijklmnopqrst";return e[r]=7,o.split("").forEach((function(e){t[e]=e})),7!=d({},e)[r]||s(d({},t)).join("")!=o}))?function(e,t){for(var r=l(e),o=arguments.length,a=1,d=c.f,h=u.f;o>a;)for(var m,g=p(arguments[a++]),v=d?f(s(g),d(g)):s(g),y=v.length,E=0;y>E;)m=v[E++],n&&!i(h,g,m)||(r[m]=g[m]);return r}:d},30:function(e,t,r){var n,o=r(9670),i=r(6048),a=r(748),s=r(3501),c=r(490),u=r(317),l=r(6200),p="prototype",d="script",h=l("IE_PROTO"),f=function(){},m=function(e){return"<"+d+">"+e+""},g=function(e){e.write(m("")),e.close();var t=e.parentWindow.Object;return e=null,t},v=function(){try{n=new ActiveXObject("htmlfile")}catch(e){}var e,t,r;v="undefined"!=typeof document?document.domain&&n?g(n):(t=u("iframe"),r="java"+d+":",t.style.display="none",c.appendChild(t),t.src=String(r),(e=t.contentWindow.document).open(),e.write(m("document.F=Object")),e.close(),e.F):g(n);for(var o=a.length;o--;)delete v[p][a[o]];return v()};s[h]=!0,e.exports=Object.create||function(e,t){var r;return null!==e?(f[p]=o(e),r=new f,f[p]=null,r[h]=e):r=v(),void 0===t?r:i.f(r,t)}},6048:function(e,t,r){var n=r(9781),o=r(3353),i=r(3070),a=r(9670),s=r(5656),c=r(1956);t.f=n&&!o?Object.defineProperties:function(e,t){a(e);for(var r,n=s(t),o=c(t),u=o.length,l=0;u>l;)i.f(e,r=o[l++],n[r]);return e}},3070:function(e,t,r){var n=r(9781),o=r(4664),i=r(3353),a=r(9670),s=r(4948),c=TypeError,u=Object.defineProperty,l=Object.getOwnPropertyDescriptor,p="enumerable",d="configurable",h="writable";t.f=n?i?function(e,t,r){if(a(e),t=s(t),a(r),"function"==typeof e&&"prototype"===t&&"value"in r&&h in r&&!r[h]){var n=l(e,t);n&&n[h]&&(e[t]=r.value,r={configurable:d in r?r[d]:n[d],enumerable:p in r?r[p]:n[p],writable:!1})}return u(e,t,r)}:u:function(e,t,r){if(a(e),t=s(t),a(r),o)try{return u(e,t,r)}catch(e){}if("get"in r||"set"in r)throw c("Accessors not supported");return"value"in r&&(e[t]=r.value),e}},1236:function(e,t,r){var n=r(9781),o=r(6916),i=r(5296),a=r(9114),s=r(5656),c=r(4948),u=r(2597),l=r(4664),p=Object.getOwnPropertyDescriptor;t.f=n?p:function(e,t){if(e=s(e),t=c(t),l)try{return p(e,t)}catch(e){}if(u(e,t))return a(!o(i.f,e,t),e[t])}},1156:function(e,t,r){var n=r(4326),o=r(5656),i=r(8006).f,a=r(1589),s="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];e.exports.f=function(e){return s&&"Window"==n(e)?function(e){try{return i(e)}catch(e){return a(s)}}(e):i(o(e))}},8006:function(e,t,r){var n=r(6324),o=r(748).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return n(e,o)}},5181:function(e,t){t.f=Object.getOwnPropertySymbols},9518:function(e,t,r){var n=r(2597),o=r(614),i=r(7908),a=r(6200),s=r(8544),c=a("IE_PROTO"),u=Object,l=u.prototype;e.exports=s?u.getPrototypeOf:function(e){var t=i(e);if(n(t,c))return t[c];var r=t.constructor;return o(r)&&t instanceof r?r.prototype:t instanceof u?l:null}},2050:function(e,t,r){var n=r(7293),o=r(111),i=r(4326),a=r(7556),s=Object.isExtensible,c=n((function(){s(1)}));e.exports=c||a?function(e){return!!o(e)&&(!a||"ArrayBuffer"!=i(e))&&(!s||s(e))}:s},7976:function(e,t,r){var n=r(1702);e.exports=n({}.isPrototypeOf)},6324:function(e,t,r){var n=r(1702),o=r(2597),i=r(5656),a=r(1318).indexOf,s=r(3501),c=n([].push);e.exports=function(e,t){var r,n=i(e),u=0,l=[];for(r in n)!o(s,r)&&o(n,r)&&c(l,r);for(;t.length>u;)o(n,r=t[u++])&&(~a(l,r)||c(l,r));return l}},1956:function(e,t,r){var n=r(6324),o=r(748);e.exports=Object.keys||function(e){return n(e,o)}},5296:function(e,t){"use strict";var r={}.propertyIsEnumerable,n=Object.getOwnPropertyDescriptor,o=n&&!r.call({1:2},1);t.f=o?function(e){var t=n(this,e);return!!t&&t.enumerable}:r},7674:function(e,t,r){var n=r(5668),o=r(9670),i=r(6077);e.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,r={};try{(e=n(Object.prototype,"__proto__","set"))(r,[]),t=r instanceof Array}catch(e){}return function(r,n){return o(r),i(n),t?e(r,n):r.__proto__=n,r}}():void 0)},4699:function(e,t,r){var n=r(9781),o=r(1702),i=r(1956),a=r(5656),s=o(r(5296).f),c=o([].push),u=function(e){return function(t){for(var r,o=a(t),u=i(o),l=u.length,p=0,d=[];l>p;)r=u[p++],n&&!s(o,r)||c(d,e?[r,o[r]]:o[r]);return d}};e.exports={entries:u(!0),values:u(!1)}},288:function(e,t,r){"use strict";var n=r(1694),o=r(648);e.exports=n?{}.toString:function(){return"[object "+o(this)+"]"}},2140:function(e,t,r){var n=r(6916),o=r(614),i=r(111),a=TypeError;e.exports=function(e,t){var r,s;if("string"===t&&o(r=e.toString)&&!i(s=n(r,e)))return s;if(o(r=e.valueOf)&&!i(s=n(r,e)))return s;if("string"!==t&&o(r=e.toString)&&!i(s=n(r,e)))return s;throw a("Can't convert object to primitive value")}},3887:function(e,t,r){var n=r(5005),o=r(1702),i=r(8006),a=r(5181),s=r(9670),c=o([].concat);e.exports=n("Reflect","ownKeys")||function(e){var t=i.f(s(e)),r=a.f;return r?c(t,r(e)):t}},857:function(e,t,r){var n=r(7854);e.exports=n},2534:function(e){e.exports=function(e){try{return{error:!1,value:e()}}catch(e){return{error:!0,value:e}}}},3702:function(e,t,r){var n=r(7854),o=r(2492),i=r(614),a=r(4705),s=r(2788),c=r(5112),u=r(7871),l=r(3823),p=r(1913),d=r(7392),h=o&&o.prototype,f=c("species"),m=!1,g=i(n.PromiseRejectionEvent),v=a("Promise",(function(){var e=s(o),t=e!==String(o);if(!t&&66===d)return!0;if(p&&(!h.catch||!h.finally))return!0;if(!d||d<51||!/native code/.test(e)){var r=new o((function(e){e(1)})),n=function(e){e((function(){}),(function(){}))};if((r.constructor={})[f]=n,!(m=r.then((function(){}))instanceof n))return!0}return!t&&(u||l)&&!g}));e.exports={CONSTRUCTOR:v,REJECTION_EVENT:g,SUBCLASSING:m}},2492:function(e,t,r){var n=r(7854);e.exports=n.Promise},9478:function(e,t,r){var n=r(9670),o=r(111),i=r(8523);e.exports=function(e,t){if(n(e),o(t)&&t.constructor===e)return t;var r=i.f(e);return(0,r.resolve)(t),r.promise}},612:function(e,t,r){var n=r(2492),o=r(7072),i=r(3702).CONSTRUCTOR;e.exports=i||!o((function(e){n.all(e).then(void 0,(function(){}))}))},8572:function(e){var t=function(){this.head=null,this.tail=null};t.prototype={add:function(e){var t={item:e,next:null},r=this.tail;r?r.next=t:this.head=t,this.tail=t},get:function(){var e=this.head;if(e)return null===(this.head=e.next)&&(this.tail=null),e.item}},e.exports=t},7651:function(e,t,r){var n=r(6916),o=r(9670),i=r(614),a=r(4326),s=r(2261),c=TypeError;e.exports=function(e,t){var r=e.exec;if(i(r)){var u=n(r,e,t);return null!==u&&o(u),u}if("RegExp"===a(e))return n(s,e,t);throw c("RegExp#exec called on incompatible receiver")}},2261:function(e,t,r){"use strict";var n,o,i=r(6916),a=r(1702),s=r(1340),c=r(7066),u=r(2999),l=r(2309),p=r(30),d=r(9909).get,h=r(9441),f=r(7168),m=l("native-string-replace",String.prototype.replace),g=RegExp.prototype.exec,v=g,y=a("".charAt),E=a("".indexOf),T=a("".replace),_=a("".slice),R=(o=/b*/g,i(g,n=/a/,"a"),i(g,o,"a"),0!==n.lastIndex||0!==o.lastIndex),I=u.BROKEN_CARET,O=void 0!==/()??/.exec("")[1];(R||O||I||h||f)&&(v=function(e){var t,r,n,o,a,u,l,h=this,f=d(h),S=s(e),A=f.raw;if(A)return A.lastIndex=h.lastIndex,t=i(v,A,S),h.lastIndex=A.lastIndex,t;var C=f.groups,b=I&&h.sticky,N=i(c,h),M=h.source,w=0,k=S;if(b&&(N=T(N,"y",""),-1===E(N,"g")&&(N+="g"),k=_(S,h.lastIndex),h.lastIndex>0&&(!h.multiline||h.multiline&&"\n"!==y(S,h.lastIndex-1))&&(M="(?: "+M+")",k=" "+k,w++),r=new RegExp("^(?:"+M+")",N)),O&&(r=new RegExp("^"+M+"$(?!\\s)",N)),R&&(n=h.lastIndex),o=i(g,b?r:h,k),b?o?(o.input=_(o.input,w),o[0]=_(o[0],w),o.index=h.lastIndex,h.lastIndex+=o[0].length):h.lastIndex=0:R&&o&&(h.lastIndex=h.global?o.index+o[0].length:n),O&&o&&o.length>1&&i(m,o[0],r,(function(){for(a=1;ab)","g");return"b"!==e.exec("b").groups.a||"bc"!=="b".replace(e,"$c")}))},4488:function(e,t,r){var n=r(8554),o=TypeError;e.exports=function(e){if(n(e))throw o("Can't call method on "+e);return e}},7152:function(e,t,r){"use strict";var n,o=r(7854),i=r(2104),a=r(614),s=r(9363),c=r(8113),u=r(206),l=r(8053),p=o.Function,d=/MSIE .\./.test(c)||s&&((n=o.Bun.version.split(".")).length<3||0==n[0]&&(n[1]<3||3==n[1]&&0==n[2]));e.exports=function(e,t){var r=t?2:1;return d?function(n,o){var s=l(arguments.length,1)>r,c=a(n)?n:p(n),d=s?u(arguments,r):[],h=s?function(){i(c,this,d)}:c;return t?e(h,o):e(h)}:e}},6340:function(e,t,r){"use strict";var n=r(5005),o=r(7045),i=r(5112),a=r(9781),s=i("species");e.exports=function(e){var t=n(e);a&&t&&!t[s]&&o(t,s,{configurable:!0,get:function(){return this}})}},8003:function(e,t,r){var n=r(3070).f,o=r(2597),i=r(5112)("toStringTag");e.exports=function(e,t,r){e&&!r&&(e=e.prototype),e&&!o(e,i)&&n(e,i,{configurable:!0,value:t})}},6200:function(e,t,r){var n=r(2309),o=r(9711),i=n("keys");e.exports=function(e){return i[e]||(i[e]=o(e))}},5465:function(e,t,r){var n=r(7854),o=r(3072),i="__core-js_shared__",a=n[i]||o(i,{});e.exports=a},2309:function(e,t,r){var n=r(1913),o=r(5465);(e.exports=function(e,t){return o[e]||(o[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.30.2",mode:n?"pure":"global",copyright:"© 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.30.2/LICENSE",source:"https://github.com/zloirock/core-js"})},6707:function(e,t,r){var n=r(9670),o=r(9483),i=r(8554),a=r(5112)("species");e.exports=function(e,t){var r,s=n(e).constructor;return void 0===s||i(r=n(s)[a])?t:o(r)}},8710:function(e,t,r){var n=r(1702),o=r(9303),i=r(1340),a=r(4488),s=n("".charAt),c=n("".charCodeAt),u=n("".slice),l=function(e){return function(t,r){var n,l,p=i(a(t)),d=o(r),h=p.length;return d<0||d>=h?e?"":void 0:(n=c(p,d))<55296||n>56319||d+1===h||(l=c(p,d+1))<56320||l>57343?e?s(p,d):n:e?u(p,d,d+2):l-56320+(n-55296<<10)+65536}};e.exports={codeAt:l(!1),charAt:l(!0)}},3197:function(e,t,r){var n=r(1702),o=2147483647,i=/[^\0-\u007E]/,a=/[.\u3002\uFF0E\uFF61]/g,s="Overflow: input needs wider integers to process",c=RangeError,u=n(a.exec),l=Math.floor,p=String.fromCharCode,d=n("".charCodeAt),h=n([].join),f=n([].push),m=n("".replace),g=n("".split),v=n("".toLowerCase),y=function(e){return e+22+75*(e<26)},E=function(e,t,r){var n=0;for(e=r?l(e/700):e>>1,e+=l(e/t);e>455;)e=l(e/35),n+=36;return l(n+36*e/(e+38))},T=function(e){var t=[];e=function(e){for(var t=[],r=0,n=e.length;r=55296&&o<=56319&&r=a&&nl((o-u)/_))throw c(s);for(u+=(T-a)*_,a=T,r=0;ro)throw c(s);if(n==a){for(var R=u,I=36;;){var O=I<=m?1:I>=m+26?26:I-m;if(R0?o(n(e),9007199254740991):0}},7908:function(e,t,r){var n=r(4488),o=Object;e.exports=function(e){return o(n(e))}},4590:function(e,t,r){var n=r(3002),o=RangeError;e.exports=function(e,t){var r=n(e);if(r%t)throw o("Wrong offset");return r}},3002:function(e,t,r){var n=r(9303),o=RangeError;e.exports=function(e){var t=n(e);if(t<0)throw o("The argument can't be less than 0");return t}},7593:function(e,t,r){var n=r(6916),o=r(111),i=r(2190),a=r(8173),s=r(2140),c=r(5112),u=TypeError,l=c("toPrimitive");e.exports=function(e,t){if(!o(e)||i(e))return e;var r,c=a(e,l);if(c){if(void 0===t&&(t="default"),r=n(c,e,t),!o(r)||i(r))return r;throw u("Can't convert object to primitive value")}return void 0===t&&(t="number"),s(e,t)}},4948:function(e,t,r){var n=r(7593),o=r(2190);e.exports=function(e){var t=n(e,"string");return o(t)?t:t+""}},1694:function(e,t,r){var n={};n[r(5112)("toStringTag")]="z",e.exports="[object z]"===String(n)},1340:function(e,t,r){var n=r(648),o=String;e.exports=function(e){if("Symbol"===n(e))throw TypeError("Cannot convert a Symbol value to a string");return o(e)}},6330:function(e){var t=String;e.exports=function(e){try{return t(e)}catch(e){return"Object"}}},9843:function(e,t,r){"use strict";var n=r(2109),o=r(7854),i=r(6916),a=r(9781),s=r(3832),c=r(260),u=r(3331),l=r(5787),p=r(9114),d=r(8880),h=r(5988),f=r(7466),m=r(7067),g=r(4590),v=r(4948),y=r(2597),E=r(648),T=r(111),_=r(2190),R=r(30),I=r(7976),O=r(7674),S=r(8006).f,A=r(7321),C=r(2092).forEach,b=r(6340),N=r(7045),M=r(3070),w=r(1236),k=r(9909),P=r(9587),U=k.get,x=k.set,L=k.enforce,D=M.f,j=w.f,G=Math.round,B=o.RangeError,H=u.ArrayBuffer,F=H.prototype,W=u.DataView,Z=c.NATIVE_ARRAY_BUFFER_VIEWS,q=c.TYPED_ARRAY_TAG,K=c.TypedArray,z=c.TypedArrayPrototype,V=c.aTypedArrayConstructor,J=c.isTypedArray,X="BYTES_PER_ELEMENT",Y="Wrong length",Q=function(e,t){V(e);for(var r=0,n=t.length,o=new e(n);n>r;)o[r]=t[r++];return o},$=function(e,t){N(e,t,{configurable:!0,get:function(){return U(this)[t]}})},ee=function(e){var t;return I(F,e)||"ArrayBuffer"==(t=E(e))||"SharedArrayBuffer"==t},te=function(e,t){return J(e)&&!_(t)&&t in e&&h(+t)&&t>=0},re=function(e,t){return t=v(t),te(e,t)?p(2,e[t]):j(e,t)},ne=function(e,t,r){return t=v(t),!(te(e,t)&&T(r)&&y(r,"value"))||y(r,"get")||y(r,"set")||r.configurable||y(r,"writable")&&!r.writable||y(r,"enumerable")&&!r.enumerable?D(e,t,r):(e[t]=r.value,e)};a?(Z||(w.f=re,M.f=ne,$(z,"buffer"),$(z,"byteOffset"),$(z,"byteLength"),$(z,"length")),n({target:"Object",stat:!0,forced:!Z},{getOwnPropertyDescriptor:re,defineProperty:ne}),e.exports=function(e,t,r){var a=e.match(/\d+/)[0]/8,c=e+(r?"Clamped":"")+"Array",u="get"+e,p="set"+e,h=o[c],v=h,y=v&&v.prototype,E={},_=function(e,t){D(e,t,{get:function(){return function(e,t){var r=U(e);return r.view[u](t*a+r.byteOffset,!0)}(this,t)},set:function(e){return function(e,t,n){var o=U(e);r&&(n=(n=G(n))<0?0:n>255?255:255&n),o.view[p](t*a+o.byteOffset,n,!0)}(this,t,e)},enumerable:!0})};Z?s&&(v=t((function(e,t,r,n){return l(e,y),P(T(t)?ee(t)?void 0!==n?new h(t,g(r,a),n):void 0!==r?new h(t,g(r,a)):new h(t):J(t)?Q(v,t):i(A,v,t):new h(m(t)),e,v)})),O&&O(v,K),C(S(h),(function(e){e in v||d(v,e,h[e])})),v.prototype=y):(v=t((function(e,t,r,n){l(e,y);var o,s,c,u=0,p=0;if(T(t)){if(!ee(t))return J(t)?Q(v,t):i(A,v,t);o=t,p=g(r,a);var d=t.byteLength;if(void 0===n){if(d%a)throw B(Y);if((s=d-p)<0)throw B(Y)}else if((s=f(n)*a)+p>d)throw B(Y);c=s/a}else c=m(t),o=new H(s=c*a);for(x(e,{buffer:o,byteOffset:p,byteLength:s,length:c,view:new W(o)});u1?arguments[1]:void 0,O=void 0!==I,S=u(_);if(S&&!l(S))for(E=(y=c(_,S)).next,_=[];!(v=o(E,y)).done;)_.push(v.value);for(O&&R>2&&(I=n(I,arguments[2])),r=s(_),f=new(d(T))(r),m=p(f),t=0;r>t;t++)g=O?I(_[t],t):_[t],f[t]=m?h(g):+g;return f}},6304:function(e,t,r){var n=r(260),o=r(6707),i=n.aTypedArrayConstructor,a=n.getTypedArrayConstructor;e.exports=function(e){return i(o(e,a(e)))}},9711:function(e,t,r){var n=r(1702),o=0,i=Math.random(),a=n(1..toString);e.exports=function(e){return"Symbol("+(void 0===e?"":e)+")_"+a(++o+i,36)}},5143:function(e,t,r){var n=r(7293),o=r(5112),i=r(9781),a=r(1913),s=o("iterator");e.exports=!n((function(){var e=new URL("b?a=1&b=2&c=3","http://a"),t=e.searchParams,r="";return e.pathname="c%20d",t.forEach((function(e,n){t.delete("b"),r+=n+e})),a&&!e.toJSON||!t.size&&(a||!i)||!t.sort||"http://a/c%20d?a=1&c=3"!==e.href||"3"!==t.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!t[s]||"a"!==new URL("https://a@b").username||"b"!==new URLSearchParams(new URLSearchParams("a=b")).get("a")||"xn--e1aybc"!==new URL("http://тест").host||"#%D0%B1"!==new URL("http://a#б").hash||"a1c3"!==r||"x"!==new URL("http://x",void 0).host}))},3307:function(e,t,r){var n=r(6293);e.exports=n&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},3353:function(e,t,r){var n=r(9781),o=r(7293);e.exports=n&&o((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype}))},8053:function(e){var t=TypeError;e.exports=function(e,r){if(e=51||!o((function(){var e=[];return e[m]=!1,e.concat()[0]!==e})),v=function(e){if(!a(e))return!1;var t=e[m];return void 0!==t?!!t:i(e)};n({target:"Array",proto:!0,arity:1,forced:!g||!d("concat")},{concat:function(e){var t,r,n,o,i,a=s(this),d=p(a,0),h=0;for(t=-1,n=arguments.length;t1?arguments[1]:void 0)}})},4553:function(e,t,r){"use strict";var n=r(2109),o=r(2092).findIndex,i=r(1223),a="findIndex",s=!0;a in[]&&Array(1)[a]((function(){s=!1})),n({target:"Array",proto:!0,forced:s},{findIndex:function(e){return o(this,e,arguments.length>1?arguments[1]:void 0)}}),i(a)},9826:function(e,t,r){"use strict";var n=r(2109),o=r(2092).find,i=r(1223),a="find",s=!0;a in[]&&Array(1)[a]((function(){s=!1})),n({target:"Array",proto:!0,forced:s},{find:function(e){return o(this,e,arguments.length>1?arguments[1]:void 0)}}),i(a)},9554:function(e,t,r){"use strict";var n=r(2109),o=r(8533);n({target:"Array",proto:!0,forced:[].forEach!=o},{forEach:o})},1038:function(e,t,r){var n=r(2109),o=r(8457);n({target:"Array",stat:!0,forced:!r(7072)((function(e){Array.from(e)}))},{from:o})},6699:function(e,t,r){"use strict";var n=r(2109),o=r(1318).includes,i=r(7293),a=r(1223);n({target:"Array",proto:!0,forced:i((function(){return!Array(1).includes()}))},{includes:function(e){return o(this,e,arguments.length>1?arguments[1]:void 0)}}),a("includes")},2772:function(e,t,r){"use strict";var n=r(2109),o=r(1470),i=r(1318).indexOf,a=r(9341),s=o([].indexOf),c=!!s&&1/s([1],1,-0)<0;n({target:"Array",proto:!0,forced:c||!a("indexOf")},{indexOf:function(e){var t=arguments.length>1?arguments[1]:void 0;return c?s(this,e,t)||0:i(this,e,t)}})},9753:function(e,t,r){r(2109)({target:"Array",stat:!0},{isArray:r(3157)})},6992:function(e,t,r){"use strict";var n=r(5656),o=r(1223),i=r(7497),a=r(9909),s=r(3070).f,c=r(1656),u=r(6178),l=r(1913),p=r(9781),d="Array Iterator",h=a.set,f=a.getterFor(d);e.exports=c(Array,"Array",(function(e,t){h(this,{type:d,target:n(e),index:0,kind:t})}),(function(){var e=f(this),t=e.target,r=e.kind,n=e.index++;return!t||n>=t.length?(e.target=void 0,u(void 0,!0)):u("keys"==r?n:"values"==r?t[n]:[n,t[n]],!1)}),"values");var m=i.Arguments=i.Array;if(o("keys"),o("values"),o("entries"),!l&&p&&"values"!==m.name)try{s(m,"name",{value:"values"})}catch(e){}},9600:function(e,t,r){"use strict";var n=r(2109),o=r(1702),i=r(8361),a=r(5656),s=r(9341),c=o([].join);n({target:"Array",proto:!0,forced:i!=Object||!s("join",",")},{join:function(e){return c(a(this),void 0===e?",":e)}})},4986:function(e,t,r){var n=r(2109),o=r(6583);n({target:"Array",proto:!0,forced:o!==[].lastIndexOf},{lastIndexOf:o})},1249:function(e,t,r){"use strict";var n=r(2109),o=r(2092).map;n({target:"Array",proto:!0,forced:!r(1194)("map")},{map:function(e){return o(this,e,arguments.length>1?arguments[1]:void 0)}})},5827:function(e,t,r){"use strict";var n=r(2109),o=r(3671).left,i=r(9341),a=r(7392);n({target:"Array",proto:!0,forced:!r(5268)&&a>79&&a<83||!i("reduce")},{reduce:function(e){var t=arguments.length;return o(this,e,t,t>1?arguments[1]:void 0)}})},5069:function(e,t,r){"use strict";var n=r(2109),o=r(1702),i=r(3157),a=o([].reverse),s=[1,2];n({target:"Array",proto:!0,forced:String(s)===String(s.reverse())},{reverse:function(){return i(this)&&(this.length=this.length),a(this)}})},7042:function(e,t,r){"use strict";var n=r(2109),o=r(3157),i=r(4411),a=r(111),s=r(1400),c=r(6244),u=r(5656),l=r(6135),p=r(5112),d=r(1194),h=r(206),f=d("slice"),m=p("species"),g=Array,v=Math.max;n({target:"Array",proto:!0,forced:!f},{slice:function(e,t){var r,n,p,d=u(this),f=c(d),y=s(e,f),E=s(void 0===t?f:t,f);if(o(d)&&(r=d.constructor,(i(r)&&(r===g||o(r.prototype))||a(r)&&null===(r=r[m]))&&(r=void 0),r===g||void 0===r))return h(d,y,E);for(n=new(void 0===r?g:r)(v(E-y,0)),p=0;y1?arguments[1]:void 0)}})},561:function(e,t,r){"use strict";var n=r(2109),o=r(7908),i=r(1400),a=r(9303),s=r(6244),c=r(3658),u=r(7207),l=r(5417),p=r(6135),d=r(5117),h=r(1194)("splice"),f=Math.max,m=Math.min;n({target:"Array",proto:!0,forced:!h},{splice:function(e,t){var r,n,h,g,v,y,E=o(this),T=s(E),_=i(e,T),R=arguments.length;for(0===R?r=n=0:1===R?(r=0,n=T-_):(r=R-2,n=m(f(a(t),0),T-_)),u(T+r-n),h=l(E,n),g=0;gT-n+r;g--)d(E,g-1)}else if(r>n)for(g=T-n;g>_;g--)y=g+r-1,(v=g+n-1)in E?E[y]=E[v]:d(E,y);for(g=0;g2)if(u=T(u),43===(t=C(u,0))||45===t){if(88===(r=C(u,2))||120===r)return NaN}else if(48===t){switch(C(u,1)){case 66:case 98:n=2,o=49;break;case 79:case 111:n=8,o=55;break;default:return+u}for(a=(i=A(u,2)).length,s=0;so)return NaN;return parseInt(i,n)}return+u}(t)}(e));return d(O,t=this)&&m((function(){E(t)}))?p(Object(r),this,N):r};N.prototype=O,b&&!o&&(O.constructor=N),n({global:!0,constructor:!0,wrap:!0,forced:b},{Number:N});var M=function(e,t){for(var r,n=i?g(t):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,isFinite,isInteger,isNaN,isSafeInteger,parseFloat,parseInt,fromString,range".split(","),o=0;n.length>o;o++)l(t,r=n[o])&&!l(e,r)&&y(e,r,v(t,r))};o&&I&&M(s[_],I),(b||o)&&M(s[_],R)},3161:function(e,t,r){r(2109)({target:"Number",stat:!0},{isInteger:r(5988)})},4048:function(e,t,r){r(2109)({target:"Number",stat:!0},{isNaN:function(e){return e!=e}})},9601:function(e,t,r){var n=r(2109),o=r(1574);n({target:"Object",stat:!0,arity:2,forced:Object.assign!==o},{assign:o})},9070:function(e,t,r){var n=r(2109),o=r(9781),i=r(3070).f;n({target:"Object",stat:!0,forced:Object.defineProperty!==i,sham:!o},{defineProperty:i})},9720:function(e,t,r){var n=r(2109),o=r(4699).entries;n({target:"Object",stat:!0},{entries:function(e){return o(e)}})},9660:function(e,t,r){var n=r(2109),o=r(6293),i=r(7293),a=r(5181),s=r(7908);n({target:"Object",stat:!0,forced:!o||i((function(){a.f(1)}))},{getOwnPropertySymbols:function(e){var t=a.f;return t?t(s(e)):[]}})},7941:function(e,t,r){var n=r(2109),o=r(7908),i=r(1956);n({target:"Object",stat:!0,forced:r(7293)((function(){i(1)}))},{keys:function(e){return i(o(e))}})},1539:function(e,t,r){var n=r(1694),o=r(8052),i=r(288);n||o(Object.prototype,"toString",i,{unsafe:!0})},821:function(e,t,r){"use strict";var n=r(2109),o=r(6916),i=r(9662),a=r(8523),s=r(2534),c=r(408);n({target:"Promise",stat:!0,forced:r(612)},{all:function(e){var t=this,r=a.f(t),n=r.resolve,u=r.reject,l=s((function(){var r=i(t.resolve),a=[],s=0,l=1;c(e,(function(e){var i=s++,c=!1;l++,o(r,t,e).then((function(e){c||(c=!0,a[i]=e,--l||n(a))}),u)})),--l||n(a)}));return l.error&&u(l.value),r.promise}})},4164:function(e,t,r){"use strict";var n=r(2109),o=r(1913),i=r(3702).CONSTRUCTOR,a=r(2492),s=r(5005),c=r(614),u=r(8052),l=a&&a.prototype;if(n({target:"Promise",proto:!0,forced:i,real:!0},{catch:function(e){return this.then(void 0,e)}}),!o&&c(a)){var p=s("Promise").prototype.catch;l.catch!==p&&u(l,"catch",p,{unsafe:!0})}},3401:function(e,t,r){"use strict";var n,o,i,a=r(2109),s=r(1913),c=r(5268),u=r(7854),l=r(6916),p=r(8052),d=r(7674),h=r(8003),f=r(6340),m=r(9662),g=r(614),v=r(111),y=r(5787),E=r(6707),T=r(261).set,_=r(5948),R=r(842),I=r(2534),O=r(8572),S=r(9909),A=r(2492),C=r(3702),b=r(8523),N="Promise",M=C.CONSTRUCTOR,w=C.REJECTION_EVENT,k=C.SUBCLASSING,P=S.getterFor(N),U=S.set,x=A&&A.prototype,L=A,D=x,j=u.TypeError,G=u.document,B=u.process,H=b.f,F=H,W=!!(G&&G.createEvent&&u.dispatchEvent),Z="unhandledrejection",q=function(e){var t;return!(!v(e)||!g(t=e.then))&&t},K=function(e,t){var r,n,o,i=t.value,a=1==t.state,s=a?e.ok:e.fail,c=e.resolve,u=e.reject,p=e.domain;try{s?(a||(2===t.rejection&&Y(t),t.rejection=1),!0===s?r=i:(p&&p.enter(),r=s(i),p&&(p.exit(),o=!0)),r===e.promise?u(j("Promise-chain cycle")):(n=q(r))?l(n,r,c,u):c(r)):u(i)}catch(e){p&&!o&&p.exit(),u(e)}},z=function(e,t){e.notified||(e.notified=!0,_((function(){for(var r,n=e.reactions;r=n.get();)K(r,e);e.notified=!1,t&&!e.rejection&&J(e)})))},V=function(e,t,r){var n,o;W?((n=G.createEvent("Event")).promise=t,n.reason=r,n.initEvent(e,!1,!0),u.dispatchEvent(n)):n={promise:t,reason:r},!w&&(o=u["on"+e])?o(n):e===Z&&R("Unhandled promise rejection",r)},J=function(e){l(T,u,(function(){var t,r=e.facade,n=e.value;if(X(e)&&(t=I((function(){c?B.emit("unhandledRejection",n,r):V(Z,r,n)})),e.rejection=c||X(e)?2:1,t.error))throw t.value}))},X=function(e){return 1!==e.rejection&&!e.parent},Y=function(e){l(T,u,(function(){var t=e.facade;c?B.emit("rejectionHandled",t):V("rejectionhandled",t,e.value)}))},Q=function(e,t,r){return function(n){e(t,n,r)}},$=function(e,t,r){e.done||(e.done=!0,r&&(e=r),e.value=t,e.state=2,z(e,!0))},ee=function(e,t,r){if(!e.done){e.done=!0,r&&(e=r);try{if(e.facade===t)throw j("Promise can't be resolved itself");var n=q(t);n?_((function(){var r={done:!1};try{l(n,t,Q(ee,r,e),Q($,r,e))}catch(t){$(r,t,e)}})):(e.value=t,e.state=1,z(e,!1))}catch(t){$({done:!1},t,e)}}};if(M&&(D=(L=function(e){y(this,D),m(e),l(n,this);var t=P(this);try{e(Q(ee,t),Q($,t))}catch(e){$(t,e)}}).prototype,(n=function(e){U(this,{type:N,done:!1,notified:!1,parent:!1,reactions:new O,rejection:!1,state:0,value:void 0})}).prototype=p(D,"then",(function(e,t){var r=P(this),n=H(E(this,L));return r.parent=!0,n.ok=!g(e)||e,n.fail=g(t)&&t,n.domain=c?B.domain:void 0,0==r.state?r.reactions.add(n):_((function(){K(n,r)})),n.promise})),o=function(){var e=new n,t=P(e);this.promise=e,this.resolve=Q(ee,t),this.reject=Q($,t)},b.f=H=function(e){return e===L||void 0===e?new o(e):F(e)},!s&&g(A)&&x!==Object.prototype)){i=x.then,k||p(x,"then",(function(e,t){var r=this;return new L((function(e,t){l(i,r,e,t)})).then(e,t)}),{unsafe:!0});try{delete x.constructor}catch(e){}d&&d(x,D)}a({global:!0,constructor:!0,wrap:!0,forced:M},{Promise:L}),h(L,N,!1,!0),f(N)},8674:function(e,t,r){r(3401),r(821),r(4164),r(6027),r(683),r(6294)},6027:function(e,t,r){"use strict";var n=r(2109),o=r(6916),i=r(9662),a=r(8523),s=r(2534),c=r(408);n({target:"Promise",stat:!0,forced:r(612)},{race:function(e){var t=this,r=a.f(t),n=r.reject,u=s((function(){var a=i(t.resolve);c(e,(function(e){o(a,t,e).then(r.resolve,n)}))}));return u.error&&n(u.value),r.promise}})},683:function(e,t,r){"use strict";var n=r(2109),o=r(6916),i=r(8523);n({target:"Promise",stat:!0,forced:r(3702).CONSTRUCTOR},{reject:function(e){var t=i.f(this);return o(t.reject,void 0,e),t.promise}})},6294:function(e,t,r){"use strict";var n=r(2109),o=r(5005),i=r(1913),a=r(2492),s=r(3702).CONSTRUCTOR,c=r(9478),u=o("Promise"),l=i&&!s;n({target:"Promise",stat:!0,forced:i||s},{resolve:function(e){return c(l&&this===u?a:this,e)}})},4916:function(e,t,r){"use strict";var n=r(2109),o=r(2261);n({target:"RegExp",proto:!0,forced:/./.exec!==o},{exec:o})},9714:function(e,t,r){"use strict";var n=r(6530).PROPER,o=r(8052),i=r(9670),a=r(1340),s=r(7293),c=r(4706),u="toString",l=RegExp.prototype[u],p=s((function(){return"/a/b"!=l.call({source:"a",flags:"b"})})),d=n&&l.name!=u;(p||d)&&o(RegExp.prototype,u,(function(){var e=i(this);return"/"+a(e.source)+"/"+a(c(e))}),{unsafe:!0})},2023:function(e,t,r){"use strict";var n=r(2109),o=r(1702),i=r(3929),a=r(4488),s=r(1340),c=r(4964),u=o("".indexOf);n({target:"String",proto:!0,forced:!c("includes")},{includes:function(e){return!!~u(s(a(this)),s(i(e)),arguments.length>1?arguments[1]:void 0)}})},8783:function(e,t,r){"use strict";var n=r(8710).charAt,o=r(1340),i=r(9909),a=r(1656),s=r(6178),c="String Iterator",u=i.set,l=i.getterFor(c);a(String,"String",(function(e){u(this,{type:c,string:o(e),index:0})}),(function(){var e,t=l(this),r=t.string,o=t.index;return o>=r.length?s(void 0,!0):(e=n(r,o),t.index+=e.length,s(e,!1))}))},3123:function(e,t,r){"use strict";var n=r(2104),o=r(6916),i=r(1702),a=r(7007),s=r(9670),c=r(8554),u=r(7850),l=r(4488),p=r(6707),d=r(1530),h=r(7466),f=r(1340),m=r(8173),g=r(1589),v=r(7651),y=r(2261),E=r(2999),T=r(7293),_=E.UNSUPPORTED_Y,R=4294967295,I=Math.min,O=[].push,S=i(/./.exec),A=i(O),C=i("".slice),b=!T((function(){var e=/(?:)/,t=e.exec;e.exec=function(){return t.apply(this,arguments)};var r="ab".split(e);return 2!==r.length||"a"!==r[0]||"b"!==r[1]}));a("split",(function(e,t,r){var i;return i="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1).length||2!="ab".split(/(?:ab)*/).length||4!=".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length?function(e,r){var i=f(l(this)),a=void 0===r?R:r>>>0;if(0===a)return[];if(void 0===e)return[i];if(!u(e))return o(t,i,e,a);for(var s,c,p,d=[],h=(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.unicode?"u":"")+(e.sticky?"y":""),m=0,v=new RegExp(e.source,h+"g");(s=o(y,v,i))&&!((c=v.lastIndex)>m&&(A(d,C(i,m,s.index)),s.length>1&&s.index=a));)v.lastIndex===s.index&&v.lastIndex++;return m===i.length?!p&&S(v,"")||A(d,""):A(d,C(i,m)),d.length>a?g(d,0,a):d}:"0".split(void 0,0).length?function(e,r){return void 0===e&&0===r?[]:o(t,this,e,r)}:t,[function(t,r){var n=l(this),a=c(t)?void 0:m(t,e);return a?o(a,t,n,r):o(i,f(n),t,r)},function(e,n){var o=s(this),a=f(e),c=r(i,o,a,n,i!==t);if(c.done)return c.value;var u=p(o,RegExp),l=o.unicode,m=(o.ignoreCase?"i":"")+(o.multiline?"m":"")+(o.unicode?"u":"")+(_?"g":"y"),g=new u(_?"^(?:"+o.source+")":o,m),y=void 0===n?R:n>>>0;if(0===y)return[];if(0===a.length)return null===v(g,a)?[a]:[];for(var E=0,T=0,O=[];T2?arguments[2]:void 0)}))},8927:function(e,t,r){"use strict";var n=r(260),o=r(2092).every,i=n.aTypedArray;(0,n.exportTypedArrayMethod)("every",(function(e){return o(i(this),e,arguments.length>1?arguments[1]:void 0)}))},3105:function(e,t,r){"use strict";var n=r(260),o=r(1285),i=r(4599),a=r(648),s=r(6916),c=r(1702),u=r(7293),l=n.aTypedArray,p=n.exportTypedArrayMethod,d=c("".slice);p("fill",(function(e){var t=arguments.length;l(this);var r="Big"===d(a(this),0,3)?i(e):+e;return s(o,this,r,t>1?arguments[1]:void 0,t>2?arguments[2]:void 0)}),u((function(){var e=0;return new Int8Array(2).fill({valueOf:function(){return e++}}),1!==e})))},5035:function(e,t,r){"use strict";var n=r(260),o=r(2092).filter,i=r(3074),a=n.aTypedArray;(0,n.exportTypedArrayMethod)("filter",(function(e){var t=o(a(this),e,arguments.length>1?arguments[1]:void 0);return i(this,t)}))},7174:function(e,t,r){"use strict";var n=r(260),o=r(2092).findIndex,i=n.aTypedArray;(0,n.exportTypedArrayMethod)("findIndex",(function(e){return o(i(this),e,arguments.length>1?arguments[1]:void 0)}))},4345:function(e,t,r){"use strict";var n=r(260),o=r(2092).find,i=n.aTypedArray;(0,n.exportTypedArrayMethod)("find",(function(e){return o(i(this),e,arguments.length>1?arguments[1]:void 0)}))},2846:function(e,t,r){"use strict";var n=r(260),o=r(2092).forEach,i=n.aTypedArray;(0,n.exportTypedArrayMethod)("forEach",(function(e){o(i(this),e,arguments.length>1?arguments[1]:void 0)}))},8145:function(e,t,r){"use strict";var n=r(3832);(0,r(260).exportTypedArrayStaticMethod)("from",r(7321),n)},4731:function(e,t,r){"use strict";var n=r(260),o=r(1318).includes,i=n.aTypedArray;(0,n.exportTypedArrayMethod)("includes",(function(e){return o(i(this),e,arguments.length>1?arguments[1]:void 0)}))},7209:function(e,t,r){"use strict";var n=r(260),o=r(1318).indexOf,i=n.aTypedArray;(0,n.exportTypedArrayMethod)("indexOf",(function(e){return o(i(this),e,arguments.length>1?arguments[1]:void 0)}))},6319:function(e,t,r){"use strict";var n=r(7854),o=r(7293),i=r(1702),a=r(260),s=r(6992),c=r(5112)("iterator"),u=n.Uint8Array,l=i(s.values),p=i(s.keys),d=i(s.entries),h=a.aTypedArray,f=a.exportTypedArrayMethod,m=u&&u.prototype,g=!o((function(){m[c].call([1])})),v=!!m&&m.values&&m[c]===m.values&&"values"===m.values.name,y=function(){return l(h(this))};f("entries",(function(){return d(h(this))}),g),f("keys",(function(){return p(h(this))}),g),f("values",y,g||!v,{name:"values"}),f(c,y,g||!v,{name:"values"})},8867:function(e,t,r){"use strict";var n=r(260),o=r(1702),i=n.aTypedArray,a=n.exportTypedArrayMethod,s=o([].join);a("join",(function(e){return s(i(this),e)}))},7789:function(e,t,r){"use strict";var n=r(260),o=r(2104),i=r(6583),a=n.aTypedArray;(0,n.exportTypedArrayMethod)("lastIndexOf",(function(e){var t=arguments.length;return o(i,a(this),t>1?[e,arguments[1]]:[e])}))},3739:function(e,t,r){"use strict";var n=r(260),o=r(2092).map,i=r(6304),a=n.aTypedArray;(0,n.exportTypedArrayMethod)("map",(function(e){return o(a(this),e,arguments.length>1?arguments[1]:void 0,(function(e,t){return new(i(e))(t)}))}))},4483:function(e,t,r){"use strict";var n=r(260),o=r(3671).right,i=n.aTypedArray;(0,n.exportTypedArrayMethod)("reduceRight",(function(e){var t=arguments.length;return o(i(this),e,t,t>1?arguments[1]:void 0)}))},9368:function(e,t,r){"use strict";var n=r(260),o=r(3671).left,i=n.aTypedArray;(0,n.exportTypedArrayMethod)("reduce",(function(e){var t=arguments.length;return o(i(this),e,t,t>1?arguments[1]:void 0)}))},2056:function(e,t,r){"use strict";var n=r(260),o=n.aTypedArray,i=n.exportTypedArrayMethod,a=Math.floor;i("reverse",(function(){for(var e,t=this,r=o(t).length,n=a(r/2),i=0;i1?arguments[1]:void 0,1),r=c(e);if(g)return o(h,this,r,t);var n=this.length,i=a(r),u=0;if(i+t>n)throw l("Wrong length");for(;ui;)u[i]=r[i++];return u}),i((function(){new Int8Array(1).slice()})))},7462:function(e,t,r){"use strict";var n=r(260),o=r(2092).some,i=n.aTypedArray;(0,n.exportTypedArrayMethod)("some",(function(e){return o(i(this),e,arguments.length>1?arguments[1]:void 0)}))},3824:function(e,t,r){"use strict";var n=r(7854),o=r(1470),i=r(7293),a=r(9662),s=r(4362),c=r(260),u=r(8886),l=r(256),p=r(7392),d=r(8008),h=c.aTypedArray,f=c.exportTypedArrayMethod,m=n.Uint16Array,g=m&&o(m.prototype.sort),v=!(!g||i((function(){g(new m(2),null)}))&&i((function(){g(new m(2),{})}))),y=!!g&&!i((function(){if(p)return p<74;if(u)return u<67;if(l)return!0;if(d)return d<602;var e,t,r=new m(516),n=Array(516);for(e=0;e<516;e++)t=e%4,r[e]=515-e,n[e]=e-2*t+3;for(g(r,(function(e,t){return(e/4|0)-(t/4|0)})),e=0;e<516;e++)if(r[e]!==n[e])return!0}));f("sort",(function(e){return void 0!==e&&a(e),y?g(this,e):s(h(this),function(e){return function(t,r){return void 0!==e?+e(t,r)||0:r!=r?-1:t!=t?1:0===t&&0===r?1/t>0&&1/r<0?1:-1:t>r}}(e))}),!y||v)},5021:function(e,t,r){"use strict";var n=r(260),o=r(7466),i=r(1400),a=r(6304),s=n.aTypedArray;(0,n.exportTypedArrayMethod)("subarray",(function(e,t){var r=s(this),n=r.length,c=i(e,n);return new(a(r))(r.buffer,r.byteOffset+c*r.BYTES_PER_ELEMENT,o((void 0===t?n:i(t,n))-c))}))},2974:function(e,t,r){"use strict";var n=r(7854),o=r(2104),i=r(260),a=r(7293),s=r(206),c=n.Int8Array,u=i.aTypedArray,l=i.exportTypedArrayMethod,p=[].toLocaleString,d=!!c&&a((function(){p.call(new c(1))}));l("toLocaleString",(function(){return o(p,d?s(u(this)):u(this),s(arguments))}),a((function(){return[1,2].toLocaleString()!=new c([1,2]).toLocaleString()}))||!a((function(){c.prototype.toLocaleString.call([1,2])})))},5016:function(e,t,r){"use strict";var n=r(260).exportTypedArrayMethod,o=r(7293),i=r(7854),a=r(1702),s=i.Uint8Array,c=s&&s.prototype||{},u=[].toString,l=a([].join);o((function(){u.call({})}))&&(u=function(){return l(this)});var p=c.toString!=u;n("toString",u,p)},2472:function(e,t,r){r(9843)("Uint8",(function(e){return function(t,r,n){return e(this,t,r,n)}}))},4747:function(e,t,r){var n=r(7854),o=r(8324),i=r(8509),a=r(8533),s=r(8880),c=function(e){if(e&&e.forEach!==a)try{s(e,"forEach",a)}catch(t){e.forEach=a}};for(var u in o)o[u]&&c(n[u]&&n[u].prototype);c(i)},3948:function(e,t,r){var n=r(7854),o=r(8324),i=r(8509),a=r(6992),s=r(8880),c=r(5112),u=c("iterator"),l=c("toStringTag"),p=a.values,d=function(e,t){if(e){if(e[u]!==p)try{s(e,u,p)}catch(t){e[u]=p}if(e[l]||s(e,l,t),o[t])for(var r in a)if(e[r]!==a[r])try{s(e,r,a[r])}catch(t){e[r]=a[r]}}};for(var h in o)d(n[h]&&n[h].prototype,h);d(i,"DOMTokenList")},6815:function(e,t,r){var n=r(2109),o=r(7854),i=r(7152)(o.setInterval,!0);n({global:!0,bind:!0,forced:o.setInterval!==i},{setInterval:i})},8417:function(e,t,r){var n=r(2109),o=r(7854),i=r(7152)(o.setTimeout,!0);n({global:!0,bind:!0,forced:o.setTimeout!==i},{setTimeout:i})},2564:function(e,t,r){r(6815),r(8417)},5556:function(e,t,r){"use strict";r(6992);var n=r(2109),o=r(7854),i=r(6916),a=r(1702),s=r(9781),c=r(5143),u=r(8052),l=r(7045),p=r(9190),d=r(8003),h=r(3061),f=r(9909),m=r(5787),g=r(614),v=r(2597),y=r(9974),E=r(648),T=r(9670),_=r(111),R=r(1340),I=r(30),O=r(9114),S=r(4121),A=r(1246),C=r(8053),b=r(5112),N=r(4362),M=b("iterator"),w="URLSearchParams",k=w+"Iterator",P=f.set,U=f.getterFor(w),x=f.getterFor(k),L=Object.getOwnPropertyDescriptor,D=function(e){if(!s)return o[e];var t=L(o,e);return t&&t.value},j=D("fetch"),G=D("Request"),B=D("Headers"),H=G&&G.prototype,F=B&&B.prototype,W=o.RegExp,Z=o.TypeError,q=o.decodeURIComponent,K=o.encodeURIComponent,z=a("".charAt),V=a([].join),J=a([].push),X=a("".replace),Y=a([].shift),Q=a([].splice),$=a("".split),ee=a("".slice),te=/\+/g,re=Array(4),ne=function(e){return re[e-1]||(re[e-1]=W("((?:%[\\da-f]{2}){"+e+"})","gi"))},oe=function(e){try{return q(e)}catch(t){return e}},ie=function(e){var t=X(e,te," "),r=4;try{return q(t)}catch(e){for(;r;)t=X(t,ne(r--),oe);return t}},ae=/[!'()~]|%20/g,se={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},ce=function(e){return se[e]},ue=function(e){return X(K(e),ae,ce)},le=h((function(e,t){P(this,{type:k,iterator:S(U(e).entries),kind:t})}),"Iterator",(function(){var e=x(this),t=e.kind,r=e.iterator.next(),n=r.value;return r.done||(r.value="keys"===t?n.key:"values"===t?n.value:[n.key,n.value]),r}),!0),pe=function(e){this.entries=[],this.url=null,void 0!==e&&(_(e)?this.parseObject(e):this.parseQuery("string"==typeof e?"?"===z(e,0)?ee(e,1):e:R(e)))};pe.prototype={type:w,bindURL:function(e){this.url=e,this.update()},parseObject:function(e){var t,r,n,o,a,s,c,u=A(e);if(u)for(r=(t=S(e,u)).next;!(n=i(r,t)).done;){if(a=(o=S(T(n.value))).next,(s=i(a,o)).done||(c=i(a,o)).done||!i(a,o).done)throw Z("Expected sequence with length 2");J(this.entries,{key:R(s.value),value:R(c.value)})}else for(var l in e)v(e,l)&&J(this.entries,{key:l,value:R(e[l])})},parseQuery:function(e){if(e)for(var t,r,n=$(e,"&"),o=0;o0?arguments[0]:void 0));s||(this.length=e.entries.length)},he=de.prototype;if(p(he,{append:function(e,t){C(arguments.length,2);var r=U(this);J(r.entries,{key:R(e),value:R(t)}),s||this.length++,r.updateURL()},delete:function(e){C(arguments.length,1);for(var t=U(this),r=t.entries,n=R(e),o=0;ot.key?1:-1})),e.updateURL()},forEach:function(e){for(var t,r=U(this).entries,n=y(e,arguments.length>1?arguments[1]:void 0),o=0;o1?ge(arguments[1]):{})}}),g(G)){var ve=function(e){return m(this,H),new G(e,arguments.length>1?ge(arguments[1]):{})};H.constructor=ve,ve.prototype=H,n({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:ve})}}e.exports={URLSearchParams:de,getState:U}},1637:function(e,t,r){r(5556)},8789:function(e,t,r){"use strict";r(8783);var n,o=r(2109),i=r(9781),a=r(5143),s=r(7854),c=r(9974),u=r(1702),l=r(8052),p=r(7045),d=r(5787),h=r(2597),f=r(1574),m=r(8457),g=r(1589),v=r(8710).codeAt,y=r(3197),E=r(1340),T=r(8003),_=r(8053),R=r(5556),I=r(9909),O=I.set,S=I.getterFor("URL"),A=R.URLSearchParams,C=R.getState,b=s.URL,N=s.TypeError,M=s.parseInt,w=Math.floor,k=Math.pow,P=u("".charAt),U=u(/./.exec),x=u([].join),L=u(1..toString),D=u([].pop),j=u([].push),G=u("".replace),B=u([].shift),H=u("".split),F=u("".slice),W=u("".toLowerCase),Z=u([].unshift),q="Invalid scheme",K="Invalid host",z="Invalid port",V=/[a-z]/i,J=/[\d+-.a-z]/i,X=/\d/,Y=/^0x/i,Q=/^[0-7]+$/,$=/^\d+$/,ee=/^[\da-f]+$/i,te=/[\0\t\n\r #%/:<>?@[\\\]^|]/,re=/[\0\t\n\r #/:<>?@[\\\]^|]/,ne=/^[\u0000-\u0020]+/,oe=/(^|[^\u0000-\u0020])[\u0000-\u0020]+$/,ie=/[\t\n\r]/g,ae=function(e){var t,r,n,o;if("number"==typeof e){for(t=[],r=0;r<4;r++)Z(t,e%256),e=w(e/256);return x(t,".")}if("object"==typeof e){for(t="",n=function(e){for(var t=null,r=1,n=null,o=0,i=0;i<8;i++)0!==e[i]?(o>r&&(t=n,r=o),n=null,o=0):(null===n&&(n=i),++o);return o>r&&(t=n,r=o),t}(e),r=0;r<8;r++)o&&0===e[r]||(o&&(o=!1),n===r?(t+=r?":":"::",o=!0):(t+=L(e[r],16),r<7&&(t+=":")));return"["+t+"]"}return e},se={},ce=f({},se,{" ":1,'"':1,"<":1,">":1,"`":1}),ue=f({},ce,{"#":1,"?":1,"{":1,"}":1}),le=f({},ue,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),pe=function(e,t){var r=v(e,0);return r>32&&r<127&&!h(t,e)?e:encodeURIComponent(e)},de={ftp:21,file:null,http:80,https:443,ws:80,wss:443},he=function(e,t){var r;return 2==e.length&&U(V,P(e,0))&&(":"==(r=P(e,1))||!t&&"|"==r)},fe=function(e){var t;return e.length>1&&he(F(e,0,2))&&(2==e.length||"/"===(t=P(e,2))||"\\"===t||"?"===t||"#"===t)},me=function(e){return"."===e||"%2e"===W(e)},ge={},ve={},ye={},Ee={},Te={},_e={},Re={},Ie={},Oe={},Se={},Ae={},Ce={},be={},Ne={},Me={},we={},ke={},Pe={},Ue={},xe={},Le={},De=function(e,t,r){var n,o,i,a=E(e);if(t){if(o=this.parse(a))throw N(o);this.searchParams=null}else{if(void 0!==r&&(n=new De(r,!0)),o=this.parse(a,null,n))throw N(o);(i=C(new A)).bindURL(this),this.searchParams=i}};De.prototype={type:"URL",parse:function(e,t,r){var o,i,a,s,c,u=this,l=t||ge,p=0,d="",f=!1,v=!1,y=!1;for(e=E(e),t||(u.scheme="",u.username="",u.password="",u.host=null,u.port=null,u.path=[],u.query=null,u.fragment=null,u.cannotBeABaseURL=!1,e=G(e,ne,""),e=G(e,oe,"$1")),e=G(e,ie,""),o=m(e);p<=o.length;){switch(i=o[p],l){case ge:if(!i||!U(V,i)){if(t)return q;l=ye;continue}d+=W(i),l=ve;break;case ve:if(i&&(U(J,i)||"+"==i||"-"==i||"."==i))d+=W(i);else{if(":"!=i){if(t)return q;d="",l=ye,p=0;continue}if(t&&(u.isSpecial()!=h(de,d)||"file"==d&&(u.includesCredentials()||null!==u.port)||"file"==u.scheme&&!u.host))return;if(u.scheme=d,t)return void(u.isSpecial()&&de[u.scheme]==u.port&&(u.port=null));d="","file"==u.scheme?l=Ne:u.isSpecial()&&r&&r.scheme==u.scheme?l=Ee:u.isSpecial()?l=Ie:"/"==o[p+1]?(l=Te,p++):(u.cannotBeABaseURL=!0,j(u.path,""),l=Ue)}break;case ye:if(!r||r.cannotBeABaseURL&&"#"!=i)return q;if(r.cannotBeABaseURL&&"#"==i){u.scheme=r.scheme,u.path=g(r.path),u.query=r.query,u.fragment="",u.cannotBeABaseURL=!0,l=Le;break}l="file"==r.scheme?Ne:_e;continue;case Ee:if("/"!=i||"/"!=o[p+1]){l=_e;continue}l=Oe,p++;break;case Te:if("/"==i){l=Se;break}l=Pe;continue;case _e:if(u.scheme=r.scheme,i==n)u.username=r.username,u.password=r.password,u.host=r.host,u.port=r.port,u.path=g(r.path),u.query=r.query;else if("/"==i||"\\"==i&&u.isSpecial())l=Re;else if("?"==i)u.username=r.username,u.password=r.password,u.host=r.host,u.port=r.port,u.path=g(r.path),u.query="",l=xe;else{if("#"!=i){u.username=r.username,u.password=r.password,u.host=r.host,u.port=r.port,u.path=g(r.path),u.path.length--,l=Pe;continue}u.username=r.username,u.password=r.password,u.host=r.host,u.port=r.port,u.path=g(r.path),u.query=r.query,u.fragment="",l=Le}break;case Re:if(!u.isSpecial()||"/"!=i&&"\\"!=i){if("/"!=i){u.username=r.username,u.password=r.password,u.host=r.host,u.port=r.port,l=Pe;continue}l=Se}else l=Oe;break;case Ie:if(l=Oe,"/"!=i||"/"!=P(d,p+1))continue;p++;break;case Oe:if("/"!=i&&"\\"!=i){l=Se;continue}break;case Se:if("@"==i){f&&(d="%40"+d),f=!0,a=m(d);for(var T=0;T65535)return z;u.port=u.isSpecial()&&I===de[u.scheme]?null:I,d=""}if(t)return;l=ke;continue}return z}d+=i;break;case Ne:if(u.scheme="file","/"==i||"\\"==i)l=Me;else{if(!r||"file"!=r.scheme){l=Pe;continue}if(i==n)u.host=r.host,u.path=g(r.path),u.query=r.query;else if("?"==i)u.host=r.host,u.path=g(r.path),u.query="",l=xe;else{if("#"!=i){fe(x(g(o,p),""))||(u.host=r.host,u.path=g(r.path),u.shortenPath()),l=Pe;continue}u.host=r.host,u.path=g(r.path),u.query=r.query,u.fragment="",l=Le}}break;case Me:if("/"==i||"\\"==i){l=we;break}r&&"file"==r.scheme&&!fe(x(g(o,p),""))&&(he(r.path[0],!0)?j(u.path,r.path[0]):u.host=r.host),l=Pe;continue;case we:if(i==n||"/"==i||"\\"==i||"?"==i||"#"==i){if(!t&&he(d))l=Pe;else if(""==d){if(u.host="",t)return;l=ke}else{if(s=u.parseHost(d))return s;if("localhost"==u.host&&(u.host=""),t)return;d="",l=ke}continue}d+=i;break;case ke:if(u.isSpecial()){if(l=Pe,"/"!=i&&"\\"!=i)continue}else if(t||"?"!=i)if(t||"#"!=i){if(i!=n&&(l=Pe,"/"!=i))continue}else u.fragment="",l=Le;else u.query="",l=xe;break;case Pe:if(i==n||"/"==i||"\\"==i&&u.isSpecial()||!t&&("?"==i||"#"==i)){if(".."===(c=W(c=d))||"%2e."===c||".%2e"===c||"%2e%2e"===c?(u.shortenPath(),"/"==i||"\\"==i&&u.isSpecial()||j(u.path,"")):me(d)?"/"==i||"\\"==i&&u.isSpecial()||j(u.path,""):("file"==u.scheme&&!u.path.length&&he(d)&&(u.host&&(u.host=""),d=P(d,0)+":"),j(u.path,d)),d="","file"==u.scheme&&(i==n||"?"==i||"#"==i))for(;u.path.length>1&&""===u.path[0];)B(u.path);"?"==i?(u.query="",l=xe):"#"==i&&(u.fragment="",l=Le)}else d+=pe(i,ue);break;case Ue:"?"==i?(u.query="",l=xe):"#"==i?(u.fragment="",l=Le):i!=n&&(u.path[0]+=pe(i,se));break;case xe:t||"#"!=i?i!=n&&("'"==i&&u.isSpecial()?u.query+="%27":u.query+="#"==i?"%23":pe(i,se)):(u.fragment="",l=Le);break;case Le:i!=n&&(u.fragment+=pe(i,ce))}p++}},parseHost:function(e){var t,r,n;if("["==P(e,0)){if("]"!=P(e,e.length-1))return K;if(t=function(e){var t,r,n,o,i,a,s,c=[0,0,0,0,0,0,0,0],u=0,l=null,p=0,d=function(){return P(e,p)};if(":"==d()){if(":"!=P(e,1))return;p+=2,l=++u}for(;d();){if(8==u)return;if(":"!=d()){for(t=r=0;r<4&&U(ee,d());)t=16*t+M(d(),16),p++,r++;if("."==d()){if(0==r)return;if(p-=r,u>6)return;for(n=0;d();){if(o=null,n>0){if(!("."==d()&&n<4))return;p++}if(!U(X,d()))return;for(;U(X,d());){if(i=M(d(),10),null===o)o=i;else{if(0==o)return;o=10*o+i}if(o>255)return;p++}c[u]=256*c[u]+o,2!=++n&&4!=n||u++}if(4!=n)return;break}if(":"==d()){if(p++,!d())return}else if(d())return;c[u++]=t}else{if(null!==l)return;p++,l=++u}}if(null!==l)for(a=u-l,u=7;0!=u&&a>0;)s=c[u],c[u--]=c[l+a-1],c[l+--a]=s;else if(8!=u)return;return c}(F(e,1,-1)),!t)return K;this.host=t}else if(this.isSpecial()){if(e=y(e),U(te,e))return K;if(t=function(e){var t,r,n,o,i,a,s,c=H(e,".");if(c.length&&""==c[c.length-1]&&c.length--,(t=c.length)>4)return e;for(r=[],n=0;n1&&"0"==P(o,0)&&(i=U(Y,o)?16:8,o=F(o,8==i?1:2)),""===o)a=0;else{if(!U(10==i?$:8==i?Q:ee,o))return e;a=M(o,i)}j(r,a)}for(n=0;n=k(256,5-t))return null}else if(a>255)return null;for(s=D(r),n=0;n1?arguments[1]:void 0,n=O(t,new De(e,!1,r));i||(t.href=n.serialize(),t.origin=n.getOrigin(),t.protocol=n.getProtocol(),t.username=n.getUsername(),t.password=n.getPassword(),t.host=n.getHost(),t.hostname=n.getHostname(),t.port=n.getPort(),t.pathname=n.getPathname(),t.search=n.getSearch(),t.searchParams=n.getSearchParams(),t.hash=n.getHash())},Ge=je.prototype,Be=function(e,t){return{get:function(){return S(this)[e]()},set:t&&function(e){return S(this)[t](e)},configurable:!0,enumerable:!0}};if(i&&(p(Ge,"href",Be("serialize","setHref")),p(Ge,"origin",Be("getOrigin")),p(Ge,"protocol",Be("getProtocol","setProtocol")),p(Ge,"username",Be("getUsername","setUsername")),p(Ge,"password",Be("getPassword","setPassword")),p(Ge,"host",Be("getHost","setHost")),p(Ge,"hostname",Be("getHostname","setHostname")),p(Ge,"port",Be("getPort","setPort")),p(Ge,"pathname",Be("getPathname","setPathname")),p(Ge,"search",Be("getSearch","setSearch")),p(Ge,"searchParams",Be("getSearchParams")),p(Ge,"hash",Be("getHash","setHash"))),l(Ge,"toJSON",(function(){return S(this).serialize()}),{enumerable:!0}),l(Ge,"toString",(function(){return S(this).serialize()}),{enumerable:!0}),b){var He=b.createObjectURL,Fe=b.revokeObjectURL;He&&l(je,"createObjectURL",c(He,b)),Fe&&l(je,"revokeObjectURL",c(Fe,b))}T(je,"URL"),o({global:!0,constructor:!0,forced:!a,sham:!i},{URL:je})},285:function(e,t,r){r(8789)},5717:function(e){"function"==typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}}},3720:function(e){e.exports=r;var t=null;try{t=new WebAssembly.Instance(new WebAssembly.Module(new Uint8Array([0,97,115,109,1,0,0,0,1,13,2,96,0,1,127,96,4,127,127,127,127,1,127,3,7,6,0,1,1,1,1,1,6,6,1,127,1,65,0,11,7,50,6,3,109,117,108,0,1,5,100,105,118,95,115,0,2,5,100,105,118,95,117,0,3,5,114,101,109,95,115,0,4,5,114,101,109,95,117,0,5,8,103,101,116,95,104,105,103,104,0,0,10,191,1,6,4,0,35,0,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,126,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,127,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,128,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,129,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,130,34,4,66,32,135,167,36,0,32,4,167,11])),{}).exports}catch(e){}function r(e,t,r){this.low=0|e,this.high=0|t,this.unsigned=!!r}function n(e){return!0===(e&&e.__isLong__)}r.prototype.__isLong__,Object.defineProperty(r.prototype,"__isLong__",{value:!0}),r.isLong=n;var o={},i={};function a(e,t){var r,n,a;return t?(a=0<=(e>>>=0)&&e<256)&&(n=i[e])?n:(r=c(e,(0|e)<0?-1:0,!0),a&&(i[e]=r),r):(a=-128<=(e|=0)&&e<128)&&(n=o[e])?n:(r=c(e,e<0?-1:0,!1),a&&(o[e]=r),r)}function s(e,t){if(isNaN(e))return t?v:g;if(t){if(e<0)return v;if(e>=h)return R}else{if(e<=-f)return I;if(e+1>=f)return _}return e<0?s(-e,t).neg():c(e%d|0,e/d|0,t)}function c(e,t,n){return new r(e,t,n)}r.fromInt=a,r.fromNumber=s,r.fromBits=c;var u=Math.pow;function l(e,t,r){if(0===e.length)throw Error("empty string");if("NaN"===e||"Infinity"===e||"+Infinity"===e||"-Infinity"===e)return g;if("number"==typeof t?(r=t,t=!1):t=!!t,(r=r||10)<2||360)throw Error("interior hyphen");if(0===n)return l(e.substring(1),t,r).neg();for(var o=s(u(r,8)),i=g,a=0;a>>0:this.low},O.toNumber=function(){return this.unsigned?(this.high>>>0)*d+(this.low>>>0):this.high*d+(this.low>>>0)},O.toString=function(e){if((e=e||10)<2||36>>0).toString(e);if((i=c).isZero())return l+a;for(;l.length<6;)l="0"+l;a=""+l+a}},O.getHighBits=function(){return this.high},O.getHighBitsUnsigned=function(){return this.high>>>0},O.getLowBits=function(){return this.low},O.getLowBitsUnsigned=function(){return this.low>>>0},O.getNumBitsAbs=function(){if(this.isNegative())return this.eq(I)?64:this.neg().getNumBitsAbs();for(var e=0!=this.high?this.high:this.low,t=31;t>0&&0==(e&1<=0},O.isOdd=function(){return 1==(1&this.low)},O.isEven=function(){return 0==(1&this.low)},O.equals=function(e){return n(e)||(e=p(e)),(this.unsigned===e.unsigned||this.high>>>31!=1||e.high>>>31!=1)&&this.high===e.high&&this.low===e.low},O.eq=O.equals,O.notEquals=function(e){return!this.eq(e)},O.neq=O.notEquals,O.ne=O.notEquals,O.lessThan=function(e){return this.comp(e)<0},O.lt=O.lessThan,O.lessThanOrEqual=function(e){return this.comp(e)<=0},O.lte=O.lessThanOrEqual,O.le=O.lessThanOrEqual,O.greaterThan=function(e){return this.comp(e)>0},O.gt=O.greaterThan,O.greaterThanOrEqual=function(e){return this.comp(e)>=0},O.gte=O.greaterThanOrEqual,O.ge=O.greaterThanOrEqual,O.compare=function(e){if(n(e)||(e=p(e)),this.eq(e))return 0;var t=this.isNegative(),r=e.isNegative();return t&&!r?-1:!t&&r?1:this.unsigned?e.high>>>0>this.high>>>0||e.high===this.high&&e.low>>>0>this.low>>>0?-1:1:this.sub(e).isNegative()?-1:1},O.comp=O.compare,O.negate=function(){return!this.unsigned&&this.eq(I)?I:this.not().add(y)},O.neg=O.negate,O.add=function(e){n(e)||(e=p(e));var t=this.high>>>16,r=65535&this.high,o=this.low>>>16,i=65535&this.low,a=e.high>>>16,s=65535&e.high,u=e.low>>>16,l=0,d=0,h=0,f=0;return h+=(f+=i+(65535&e.low))>>>16,d+=(h+=o+u)>>>16,l+=(d+=r+s)>>>16,l+=t+a,c((h&=65535)<<16|(f&=65535),(l&=65535)<<16|(d&=65535),this.unsigned)},O.subtract=function(e){return n(e)||(e=p(e)),this.add(e.neg())},O.sub=O.subtract,O.multiply=function(e){if(this.isZero())return g;if(n(e)||(e=p(e)),t)return c(t.mul(this.low,this.high,e.low,e.high),t.get_high(),this.unsigned);if(e.isZero())return g;if(this.eq(I))return e.isOdd()?I:g;if(e.eq(I))return this.isOdd()?I:g;if(this.isNegative())return e.isNegative()?this.neg().mul(e.neg()):this.neg().mul(e).neg();if(e.isNegative())return this.mul(e.neg()).neg();if(this.lt(m)&&e.lt(m))return s(this.toNumber()*e.toNumber(),this.unsigned);var r=this.high>>>16,o=65535&this.high,i=this.low>>>16,a=65535&this.low,u=e.high>>>16,l=65535&e.high,d=e.low>>>16,h=65535&e.low,f=0,v=0,y=0,E=0;return y+=(E+=a*h)>>>16,v+=(y+=i*h)>>>16,y&=65535,v+=(y+=a*d)>>>16,f+=(v+=o*h)>>>16,v&=65535,f+=(v+=i*d)>>>16,v&=65535,f+=(v+=a*l)>>>16,f+=r*h+o*d+i*l+a*u,c((y&=65535)<<16|(E&=65535),(f&=65535)<<16|(v&=65535),this.unsigned)},O.mul=O.multiply,O.divide=function(e){if(n(e)||(e=p(e)),e.isZero())throw Error("division by zero");var r,o,i;if(t)return this.unsigned||-2147483648!==this.high||-1!==e.low||-1!==e.high?c((this.unsigned?t.div_u:t.div_s)(this.low,this.high,e.low,e.high),t.get_high(),this.unsigned):this;if(this.isZero())return this.unsigned?v:g;if(this.unsigned){if(e.unsigned||(e=e.toUnsigned()),e.gt(this))return v;if(e.gt(this.shru(1)))return E;i=v}else{if(this.eq(I))return e.eq(y)||e.eq(T)?I:e.eq(I)?y:(r=this.shr(1).div(e).shl(1)).eq(g)?e.isNegative()?y:T:(o=this.sub(e.mul(r)),i=r.add(o.div(e)));if(e.eq(I))return this.unsigned?v:g;if(this.isNegative())return e.isNegative()?this.neg().div(e.neg()):this.neg().div(e).neg();if(e.isNegative())return this.div(e.neg()).neg();i=g}for(o=this;o.gte(e);){r=Math.max(1,Math.floor(o.toNumber()/e.toNumber()));for(var a=Math.ceil(Math.log(r)/Math.LN2),l=a<=48?1:u(2,a-48),d=s(r),h=d.mul(e);h.isNegative()||h.gt(o);)h=(d=s(r-=l,this.unsigned)).mul(e);d.isZero()&&(d=y),i=i.add(d),o=o.sub(h)}return i},O.div=O.divide,O.modulo=function(e){return n(e)||(e=p(e)),t?c((this.unsigned?t.rem_u:t.rem_s)(this.low,this.high,e.low,e.high),t.get_high(),this.unsigned):this.sub(this.div(e).mul(e))},O.mod=O.modulo,O.rem=O.modulo,O.not=function(){return c(~this.low,~this.high,this.unsigned)},O.and=function(e){return n(e)||(e=p(e)),c(this.low&e.low,this.high&e.high,this.unsigned)},O.or=function(e){return n(e)||(e=p(e)),c(this.low|e.low,this.high|e.high,this.unsigned)},O.xor=function(e){return n(e)||(e=p(e)),c(this.low^e.low,this.high^e.high,this.unsigned)},O.shiftLeft=function(e){return n(e)&&(e=e.toInt()),0==(e&=63)?this:e<32?c(this.low<>>32-e,this.unsigned):c(0,this.low<>>e|this.high<<32-e,this.high>>e,this.unsigned):c(this.high>>e-32,this.high>=0?0:-1,this.unsigned)},O.shr=O.shiftRight,O.shiftRightUnsigned=function(e){if(n(e)&&(e=e.toInt()),0==(e&=63))return this;var t=this.high;return e<32?c(this.low>>>e|t<<32-e,t>>>e,this.unsigned):c(32===e?t:t>>>e-32,0,this.unsigned)},O.shru=O.shiftRightUnsigned,O.shr_u=O.shiftRightUnsigned,O.toSigned=function(){return this.unsigned?c(this.low,this.high,!1):this},O.toUnsigned=function(){return this.unsigned?this:c(this.low,this.high,!0)},O.toBytes=function(e){return e?this.toBytesLE():this.toBytesBE()},O.toBytesLE=function(){var e=this.high,t=this.low;return[255&t,t>>>8&255,t>>>16&255,t>>>24,255&e,e>>>8&255,e>>>16&255,e>>>24]},O.toBytesBE=function(){var e=this.high,t=this.low;return[e>>>24,e>>>16&255,e>>>8&255,255&e,t>>>24,t>>>16&255,t>>>8&255,255&t]},r.fromBytes=function(e,t,n){return n?r.fromBytesLE(e,t):r.fromBytesBE(e,t)},r.fromBytesLE=function(e,t){return new r(e[0]|e[1]<<8|e[2]<<16|e[3]<<24,e[4]|e[5]<<8|e[6]<<16|e[7]<<24,t)},r.fromBytesBE=function(e,t){return new r(e[4]<<24|e[5]<<16|e[6]<<8|e[7],e[0]<<24|e[1]<<16|e[2]<<8|e[3],t)}},3281:function(e,t,r){"use strict";e.exports=r(9050)},2967:function(e){"use strict";e.exports=n;var t,r=/\/|\./;function n(e,t){r.test(e)||(e="google/protobuf/"+e+".proto",t={nested:{google:{nested:{protobuf:{nested:t}}}}}),n[e]=t}n("any",{Any:{fields:{type_url:{type:"string",id:1},value:{type:"bytes",id:2}}}}),n("duration",{Duration:t={fields:{seconds:{type:"int64",id:1},nanos:{type:"int32",id:2}}}}),n("timestamp",{Timestamp:t}),n("empty",{Empty:{fields:{}}}),n("struct",{Struct:{fields:{fields:{keyType:"string",type:"Value",id:1}}},Value:{oneofs:{kind:{oneof:["nullValue","numberValue","stringValue","boolValue","structValue","listValue"]}},fields:{nullValue:{type:"NullValue",id:1},numberValue:{type:"double",id:2},stringValue:{type:"string",id:3},boolValue:{type:"bool",id:4},structValue:{type:"Struct",id:5},listValue:{type:"ListValue",id:6}}},NullValue:{values:{NULL_VALUE:0}},ListValue:{fields:{values:{rule:"repeated",type:"Value",id:1}}}}),n("wrappers",{DoubleValue:{fields:{value:{type:"double",id:1}}},FloatValue:{fields:{value:{type:"float",id:1}}},Int64Value:{fields:{value:{type:"int64",id:1}}},UInt64Value:{fields:{value:{type:"uint64",id:1}}},Int32Value:{fields:{value:{type:"int32",id:1}}},UInt32Value:{fields:{value:{type:"uint32",id:1}}},BoolValue:{fields:{value:{type:"bool",id:1}}},StringValue:{fields:{value:{type:"string",id:1}}},BytesValue:{fields:{value:{type:"bytes",id:1}}}}),n("field_mask",{FieldMask:{fields:{paths:{rule:"repeated",type:"string",id:1}}}}),n.get=function(e){return n[e]||null}},3996:function(e,t,r){"use strict";var n=t,o=r(7025),i=r(9935);function a(e,t,r,n){if(t.resolvedType)if(t.resolvedType instanceof o){e("switch(d%s){",n);for(var i=t.resolvedType.values,a=Object.keys(i),s=0;s>>0",n,n);break;case"int32":case"sint32":case"sfixed32":e("m%s=d%s|0",n,n);break;case"uint64":c=!0;case"int64":case"sint64":case"fixed64":case"sfixed64":e("if(util.Long)")("(m%s=util.Long.fromValue(d%s)).unsigned=%j",n,n,c)('else if(typeof d%s==="string")',n)("m%s=parseInt(d%s,10)",n,n)('else if(typeof d%s==="number")',n)("m%s=d%s",n,n)('else if(typeof d%s==="object")',n)("m%s=new util.LongBits(d%s.low>>>0,d%s.high>>>0).toNumber(%s)",n,n,n,c?"true":"");break;case"bytes":e('if(typeof d%s==="string")',n)("util.base64.decode(d%s,m%s=util.newBuffer(util.base64.length(d%s)),0)",n,n,n)("else if(d%s.length)",n)("m%s=d%s",n,n);break;case"string":e("m%s=String(d%s)",n,n);break;case"bool":e("m%s=Boolean(d%s)",n,n)}}return e}function s(e,t,r,n){if(t.resolvedType)t.resolvedType instanceof o?e("d%s=o.enums===String?types[%i].values[m%s]:m%s",n,r,n,n):e("d%s=types[%i].toObject(m%s,o)",n,r,n);else{var i=!1;switch(t.type){case"double":case"float":e("d%s=o.json&&!isFinite(m%s)?String(m%s):m%s",n,n,n,n);break;case"uint64":i=!0;case"int64":case"sint64":case"fixed64":case"sfixed64":e('if(typeof m%s==="number")',n)("d%s=o.longs===String?String(m%s):m%s",n,n,n)("else")("d%s=o.longs===String?util.Long.prototype.toString.call(m%s):o.longs===Number?new util.LongBits(m%s.low>>>0,m%s.high>>>0).toNumber(%s):m%s",n,n,n,n,i?"true":"",n);break;case"bytes":e("d%s=o.bytes===String?util.base64.encode(m%s,0,m%s.length):o.bytes===Array?Array.prototype.slice.call(m%s):m%s",n,n,n,n,n);break;default:e("d%s=m%s",n,n)}}return e}n.fromObject=function(e){var t=e.fieldsArray,r=i.codegen(["d"],e.name+"$fromObject")("if(d instanceof this.ctor)")("return d");if(!t.length)return r("return new this.ctor");r("var m=new this.ctor");for(var n=0;n>>3){");for(var r=0;r>>3){")("case 1: k=r.%s(); break",s.keyType)("case 2:"),void 0===o.basic[c]?t("value=types[%i].decode(r,r.uint32())",r):t("value=r.%s()",c),t("break")("default:")("r.skipType(tag2&7)")("break")("}")("}"),void 0!==o.long[s.keyType]?t('%s[typeof k==="object"?util.longToHash(k):k]=value',u):t("%s[k]=value",u)):s.repeated?(t("if(!(%s&&%s.length))",u,u)("%s=[]",u),void 0!==o.packed[c]&&t("if((t&7)===2){")("var c2=r.uint32()+r.pos")("while(r.pos>>0,8|o.mapKey[u.keyType],u.keyType),void 0===d?r("types[%i].encode(%s[ks[i]],w.uint32(18).fork()).ldelim().ldelim()",l,t):r(".uint32(%i).%s(%s[ks[i]]).ldelim()",16|d,p,t),r("}")("}")):u.repeated?(r("if(%s!=null&&%s.length){",t,t),u.packed&&void 0!==o.packed[p]?r("w.uint32(%i).fork()",(u.id<<3|2)>>>0)("for(var i=0;i<%s.length;++i)",t)("w.%s(%s[i])",p,t)("w.ldelim()"):(r("for(var i=0;i<%s.length;++i)",t),void 0===d?a(r,u,l,t+"[i]"):r("w.uint32(%i).%s(%s[i])",(u.id<<3|d)>>>0,p,t)),r("}")):(u.optional&&r("if(%s!=null&&Object.hasOwnProperty.call(m,%j))",t,u.name),void 0===d?a(r,u,l,t):r("w.uint32(%i).%s(%s)",(u.id<<3|d)>>>0,p,t))}return r("return w")};var n=r(7025),o=r(7063),i=r(9935);function a(e,t,r,n){return t.resolvedType.group?e("types[%i].encode(%s,w.uint32(%i)).uint32(%i)",r,n,(t.id<<3|3)>>>0,(t.id<<3|4)>>>0):e("types[%i].encode(%s,w.uint32(%i).fork()).ldelim()",r,n,(t.id<<3|2)>>>0)}},7025:function(e,t,r){"use strict";e.exports=a;var n=r(3243);((a.prototype=Object.create(n.prototype)).constructor=a).className="Enum";var o=r(9313),i=r(9935);function a(e,t,r,o,i){if(n.call(this,e,r),t&&"object"!=typeof t)throw TypeError("values must be an object");if(this.valuesById={},this.values=Object.create(this.valuesById),this.comment=o,this.comments=i||{},this.reserved=void 0,t)for(var a=Object.keys(t),s=0;st)return!0;return!1},p.isReservedName=function(e,t){if(e)for(var r=0;r0;){var n=e.shift();if(r.nested&&r.nested[n]){if(!((r=r.nested[n])instanceof p))throw Error("path conflicts with non-namespace objects")}else r.add(r=new p(n))}return t&&r.addJSON(t),r},p.prototype.resolveAll=function(){for(var e=this.nestedArray,t=0;t-1)return n}else if(n instanceof p&&(n=n.lookup(e.slice(1),t,!0)))return n}else for(var o=0;o-1&&this.oneof.splice(t,1),e.partOf=null,this},a.prototype.onAdd=function(e){n.prototype.onAdd.call(this,e);for(var t=0;t");var n=k();if(!_.test(n))throw H(n,"name");x("=");var o=new s(B(n),q(k()),t,r);X(o,(function(e){if("option"!==e)throw H(e);Q(o,e),x(";")}),(function(){te(o)})),e.add(o)}(r);break;case"required":case"repeated":Y(r,e);break;case"optional":Y(r,j?"proto3_optional":"optional");break;case"oneof":!function(e,t){if(!_.test(t=k()))throw H(t,"name");var r=new c(B(t));X(r,(function(e){"option"===e?(Q(r,e),x(";")):(P(e),Y(r,"optional"))})),e.add(r)}(r,e);break;case"extensions":Z(r.extensions||(r.extensions=[]));break;case"reserved":Z(r.reserved||(r.reserved=[]),!0);break;default:if(!j||!R.test(e))throw H(e);P(e),Y(r,"optional")}})),e.add(r)}(e,t),!0;case"enum":return function(e,t){if(!_.test(t=k()))throw H(t,"name");var r=new u(t);X(r,(function(e){switch(e){case"option":Q(r,e),x(";");break;case"reserved":Z(r.reserved||(r.reserved=[]),!0);break;default:!function(e,t){if(!_.test(t))throw H(t,"name");x("=");var r=q(k(),!0),n={};X(n,(function(e){if("option"!==e)throw H(e);Q(n,e),x(";")}),(function(){te(n)})),e.add(t,r,n.comment)}(r,e)}})),e.add(r)}(e,t),!0;case"service":return function(e,t){if(!_.test(t=k()))throw H(t,"service name");var r=new l(t);X(r,(function(e){if(!J(r,e)){if("rpc"!==e)throw H(e);!function(e,t){var r=L(),n=t;if(!_.test(t=k()))throw H(t,"name");var o,i,a,s,c=t;if(x("("),x("stream",!0)&&(i=!0),!R.test(t=k()))throw H(t);if(o=t,x(")"),x("returns"),x("("),x("stream",!0)&&(s=!0),!R.test(t=k()))throw H(t);a=t,x(")");var u=new p(c,n,o,a,i,s);u.comment=r,X(u,(function(e){if("option"!==e)throw H(e);Q(u,e),x(";")})),e.add(u)}(r,e)}})),e.add(r)}(e,t),!0;case"extend":return function(e,t){if(!R.test(t=k()))throw H(t,"reference");var r=t;X(null,(function(t){switch(t){case"required":case"repeated":Y(e,t,r);break;case"optional":Y(e,j?"proto3_optional":"optional",r);break;default:if(!j||!R.test(t))throw H(t);P(t),Y(e,"optional",r)}}))}(e,t),!0}return!1}function X(e,t,r){var n=w.line;if(e&&("string"!=typeof e.comment&&(e.comment=L()),e.filename=O.filename),x("{",!0)){for(var o;"}"!==(o=k());)t(o);x(";",!0)}else r&&r(),x(";"),e&&("string"!=typeof e.comment||M)&&(e.comment=L(n)||e.comment)}function Y(e,t,r){var n=k();if("group"!==n){if(!R.test(n))throw H(n,"type");var o=k();if(!_.test(o))throw H(o,"name");o=B(o),x("=");var s=new a(o,q(k()),n,t,r);if(X(s,(function(e){if("option"!==e)throw H(e);Q(s,e),x(";")}),(function(){te(s)})),"proto3_optional"===t){var u=new c("_"+o);s.setOption("proto3_optional",!0),u.add(s),e.add(u)}else e.add(s);j||!s.repeated||void 0===d.packed[n]&&void 0!==d.basic[n]||s.setOption("packed",!1,!0)}else!function(e,t){var r=k();if(!_.test(r))throw H(r,"name");var n=h.lcFirst(r);r===n&&(r=h.ucFirst(r)),x("=");var o=q(k()),s=new i(r);s.group=!0;var c=new a(n,o,r,t);c.filename=O.filename,X(s,(function(e){switch(e){case"option":Q(s,e),x(";");break;case"required":case"repeated":Y(s,e);break;case"optional":Y(s,j?"proto3_optional":"optional");break;default:throw H(e)}})),e.add(s).add(c)}(e,t)}function Q(e,t){var r=x("(",!0);if(!R.test(t=k()))throw H(t,"name");var n,o=t,i=o;r&&(x(")"),i=o="("+o+")",t=U(),I.test(t)&&(n=t.substr(1),o+=t,k())),x("="),function(e,t,r,n){e.setParsedOption&&e.setParsedOption(t,r,n)}(e,i,$(e,o),n)}function $(e,t){if(x("{",!0)){for(var r={};!x("}",!0);){if(!_.test(N=k()))throw H(N,"name");var n,o=N;"{"===U()?n=$(e,t+"."+N):(x(":"),"{"===U()?n=$(e,t+"."+N):(n=W(!0),ee(e,t+"."+N,n)));var i=r[o];i&&(n=[].concat(i).concat(n)),r[o]=n,x(",",!0)}return r}var a=W(!0);return ee(e,t,a),a}function ee(e,t,r){e.setOption&&e.setOption(t,r)}function te(e){if(x("[",!0)){do{Q(e,"option")}while(x(",",!0));x("]")}return e}for(;null!==(N=k());)switch(N){case"package":if(!D)throw H(N);K();break;case"import":if(!D)throw H(N);z();break;case"syntax":if(!D)throw H(N);V();break;case"option":Q(G,N),x(";");break;default:if(J(G,N)){D=!1;continue}throw H(N)}return O.filename=null,{package:S,imports:A,weakImports:C,syntax:b,root:t}}},1408:function(e,t,r){"use strict";e.exports=c;var n,o=r(9693),i=o.LongBits,a=o.utf8;function s(e,t){return RangeError("index out of range: "+e.pos+" + "+(t||1)+" > "+e.len)}function c(e){this.buf=e,this.pos=0,this.len=e.length}var u,l="undefined"!=typeof Uint8Array?function(e){if(e instanceof Uint8Array||Array.isArray(e))return new c(e);throw Error("illegal buffer")}:function(e){if(Array.isArray(e))return new c(e);throw Error("illegal buffer")},p=function(){return o.Buffer?function(e){return(c.create=function(e){return o.Buffer.isBuffer(e)?new n(e):l(e)})(e)}:l};function d(){var e=new i(0,0),t=0;if(!(this.len-this.pos>4)){for(;t<3;++t){if(this.pos>=this.len)throw s(this);if(e.lo=(e.lo|(127&this.buf[this.pos])<<7*t)>>>0,this.buf[this.pos++]<128)return e}return e.lo=(e.lo|(127&this.buf[this.pos++])<<7*t)>>>0,e}for(;t<4;++t)if(e.lo=(e.lo|(127&this.buf[this.pos])<<7*t)>>>0,this.buf[this.pos++]<128)return e;if(e.lo=(e.lo|(127&this.buf[this.pos])<<28)>>>0,e.hi=(e.hi|(127&this.buf[this.pos])>>4)>>>0,this.buf[this.pos++]<128)return e;if(t=0,this.len-this.pos>4){for(;t<5;++t)if(e.hi=(e.hi|(127&this.buf[this.pos])<<7*t+3)>>>0,this.buf[this.pos++]<128)return e}else for(;t<5;++t){if(this.pos>=this.len)throw s(this);if(e.hi=(e.hi|(127&this.buf[this.pos])<<7*t+3)>>>0,this.buf[this.pos++]<128)return e}throw Error("invalid varint encoding")}function h(e,t){return(e[t-4]|e[t-3]<<8|e[t-2]<<16|e[t-1]<<24)>>>0}function f(){if(this.pos+8>this.len)throw s(this,8);return new i(h(this.buf,this.pos+=4),h(this.buf,this.pos+=4))}c.create=p(),c.prototype._slice=o.Array.prototype.subarray||o.Array.prototype.slice,c.prototype.uint32=(u=4294967295,function(){if(u=(127&this.buf[this.pos])>>>0,this.buf[this.pos++]<128)return u;if(u=(u|(127&this.buf[this.pos])<<7)>>>0,this.buf[this.pos++]<128)return u;if(u=(u|(127&this.buf[this.pos])<<14)>>>0,this.buf[this.pos++]<128)return u;if(u=(u|(127&this.buf[this.pos])<<21)>>>0,this.buf[this.pos++]<128)return u;if(u=(u|(15&this.buf[this.pos])<<28)>>>0,this.buf[this.pos++]<128)return u;if((this.pos+=5)>this.len)throw this.pos=this.len,s(this,10);return u}),c.prototype.int32=function(){return 0|this.uint32()},c.prototype.sint32=function(){var e=this.uint32();return e>>>1^-(1&e)|0},c.prototype.bool=function(){return 0!==this.uint32()},c.prototype.fixed32=function(){if(this.pos+4>this.len)throw s(this,4);return h(this.buf,this.pos+=4)},c.prototype.sfixed32=function(){if(this.pos+4>this.len)throw s(this,4);return 0|h(this.buf,this.pos+=4)},c.prototype.float=function(){if(this.pos+4>this.len)throw s(this,4);var e=o.float.readFloatLE(this.buf,this.pos);return this.pos+=4,e},c.prototype.double=function(){if(this.pos+8>this.len)throw s(this,4);var e=o.float.readDoubleLE(this.buf,this.pos);return this.pos+=8,e},c.prototype.bytes=function(){var e=this.uint32(),t=this.pos,r=this.pos+e;if(r>this.len)throw s(this,e);return this.pos+=e,Array.isArray(this.buf)?this.buf.slice(t,r):t===r?new this.buf.constructor(0):this._slice.call(this.buf,t,r)},c.prototype.string=function(){var e=this.bytes();return a.read(e,0,e.length)},c.prototype.skip=function(e){if("number"==typeof e){if(this.pos+e>this.len)throw s(this,e);this.pos+=e}else do{if(this.pos>=this.len)throw s(this)}while(128&this.buf[this.pos++]);return this},c.prototype.skipType=function(e){switch(e){case 0:this.skip();break;case 1:this.skip(8);break;case 2:this.skip(this.uint32());break;case 3:for(;4!=(e=7&this.uint32());)this.skipType(e);break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+e+" at offset "+this.pos)}return this},c._configure=function(e){n=e,c.create=p(),n._configure();var t=o.Long?"toLong":"toNumber";o.merge(c.prototype,{int64:function(){return d.call(this)[t](!1)},uint64:function(){return d.call(this)[t](!0)},sint64:function(){return d.call(this).zzDecode()[t](!1)},fixed64:function(){return f.call(this)[t](!0)},sfixed64:function(){return f.call(this)[t](!1)}})}},593:function(e,t,r){"use strict";e.exports=i;var n=r(1408);(i.prototype=Object.create(n.prototype)).constructor=i;var o=r(9693);function i(e){n.call(this,e)}i._configure=function(){o.Buffer&&(i.prototype._slice=o.Buffer.prototype.slice)},i.prototype.string=function(){var e=this.uint32();return this.buf.utf8Slice?this.buf.utf8Slice(this.pos,this.pos=Math.min(this.pos+e,this.len)):this.buf.toString("utf-8",this.pos,this.pos=Math.min(this.pos+e,this.len))},i._configure()},9424:function(e,t,r){"use strict";e.exports=p;var n=r(9313);((p.prototype=Object.create(n.prototype)).constructor=p).className="Root";var o,i,a,s=r(3548),c=r(7025),u=r(7598),l=r(9935);function p(e){n.call(this,"",e),this.deferred=[],this.files=[]}function d(){}p.fromJSON=function(e,t){return t||(t=new p),e.options&&t.setOptions(e.options),t.addJSON(e.nested)},p.prototype.resolvePath=l.path.resolve,p.prototype.fetch=l.fetch,p.prototype.load=function e(t,r,n){"function"==typeof r&&(n=r,r=void 0);var o=this;if(!n)return l.asPromise(e,o,t,r);var s=n===d;function c(e,t){if(n){var r=n;if(n=null,s)throw e;r(e,t)}}function u(e){var t=e.lastIndexOf("google/protobuf/");if(t>-1){var r=e.substring(t);if(r in a)return r}return null}function p(e,t){try{if(l.isString(t)&&"{"===t.charAt(0)&&(t=JSON.parse(t)),l.isString(t)){i.filename=e;var n,a=i(t,o,r),p=0;if(a.imports)for(;p-1))if(o.files.push(e),e in a)s?p(e,a[e]):(++f,setTimeout((function(){--f,p(e,a[e])})));else if(s){var r;try{r=l.fs.readFileSync(e).toString("utf8")}catch(e){return void(t||c(e))}p(e,r)}else++f,o.fetch(e,(function(r,i){--f,n&&(r?t?f||c(null,o):c(r):p(e,i))}))}var f=0;l.isString(t)&&(t=[t]);for(var m,g=0;g-1&&this.deferred.splice(t,1)}}else if(e instanceof c)h.test(e.name)&&delete e.parent[e.name];else if(e instanceof n){for(var r=0;r]/g,r=/(?:"([^"\\]*(?:\\.[^"\\]*)*)")/g,n=/(?:'([^'\\]*(?:\\.[^'\\]*)*)')/g,o=/^ *[*/]+ */,i=/^\s*\*?\/*/,a=/\n/g,s=/\s/,c=/\\(.?)/g,u={0:"\0",r:"\r",n:"\n",t:"\t"};function l(e){return e.replace(c,(function(e,t){switch(t){case"\\":case"":return t;default:return u[t]||""}}))}function p(e,c){e=e.toString();var u=0,p=e.length,d=1,h=null,f=null,m=0,g=!1,v=!1,y=[],E=null;function T(e){return Error("illegal "+e+" (line "+d+")")}function _(t){return e.charAt(t)}function R(t,r,n){h=e.charAt(t++),m=d,g=!1,v=n;var s,u=t-(c?2:3);do{if(--u<0||"\n"===(s=e.charAt(u))){g=!0;break}}while(" "===s||"\t"===s);for(var l=e.substring(t,r).split(a),p=0;p0)return y.shift();if(E)return function(){var t="'"===E?n:r;t.lastIndex=u-1;var o=t.exec(e);if(!o)throw T("string");return u=t.lastIndex,A(E),E=null,l(o[1])}();var o,i,a,h,f,m=0===u;do{if(u===p)return null;for(o=!1;s.test(a=_(u));)if("\n"===a&&(m=!0,++d),++u===p)return null;if("/"===_(u)){if(++u===p)throw T("comment");if("/"===_(u))if(c){if(h=u,f=!1,I(u)){f=!0;do{if((u=O(u))===p)break;u++}while(I(u))}else u=Math.min(p,O(u)+1);f&&R(h,u,m),d++,o=!0}else{for(f="/"===_(h=u+1);"\n"!==_(++u);)if(u===p)return null;++u,f&&R(h,u-1,m),++d,o=!0}else{if("*"!==(a=_(u)))return"/";h=u+1,f=c||"*"===_(h);do{if("\n"===a&&++d,++u===p)throw T("comment");i=a,a=_(u)}while("*"!==i||"/"!==a);++u,f&&R(h,u-2,m),o=!0}}}while(o);var g=u;if(t.lastIndex=0,!t.test(_(g++)))for(;g0)t[o]=e(t[o]||{},r,n);else{var i=t[o];i&&(n=[].concat(i).concat(n)),t[o]=n}return t}(e,t=t.split("."),r)},Object.defineProperty(i,"decorateRoot",{get:function(){return a.decorated||(a.decorated=new(r(9424)))}})},1945:function(e,t,r){"use strict";e.exports=o;var n=r(9693);function o(e,t){this.lo=e>>>0,this.hi=t>>>0}var i=o.zero=new o(0,0);i.toNumber=function(){return 0},i.zzEncode=i.zzDecode=function(){return this},i.length=function(){return 1};var a=o.zeroHash="\0\0\0\0\0\0\0\0";o.fromNumber=function(e){if(0===e)return i;var t=e<0;t&&(e=-e);var r=e>>>0,n=(e-r)/4294967296>>>0;return t&&(n=~n>>>0,r=~r>>>0,++r>4294967295&&(r=0,++n>4294967295&&(n=0))),new o(r,n)},o.from=function(e){if("number"==typeof e)return o.fromNumber(e);if(n.isString(e)){if(!n.Long)return o.fromNumber(parseInt(e,10));e=n.Long.fromString(e)}return e.low||e.high?new o(e.low>>>0,e.high>>>0):i},o.prototype.toNumber=function(e){if(!e&&this.hi>>>31){var t=1+~this.lo>>>0,r=~this.hi>>>0;return t||(r=r+1>>>0),-(t+4294967296*r)}return this.lo+4294967296*this.hi},o.prototype.toLong=function(e){return n.Long?new n.Long(0|this.lo,0|this.hi,Boolean(e)):{low:0|this.lo,high:0|this.hi,unsigned:Boolean(e)}};var s=String.prototype.charCodeAt;o.fromHash=function(e){return e===a?i:new o((s.call(e,0)|s.call(e,1)<<8|s.call(e,2)<<16|s.call(e,3)<<24)>>>0,(s.call(e,4)|s.call(e,5)<<8|s.call(e,6)<<16|s.call(e,7)<<24)>>>0)},o.prototype.toHash=function(){return String.fromCharCode(255&this.lo,this.lo>>>8&255,this.lo>>>16&255,this.lo>>>24,255&this.hi,this.hi>>>8&255,this.hi>>>16&255,this.hi>>>24)},o.prototype.zzEncode=function(){var e=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^e)>>>0,this.lo=(this.lo<<1^e)>>>0,this},o.prototype.zzDecode=function(){var e=-(1&this.lo);return this.lo=((this.lo>>>1|this.hi<<31)^e)>>>0,this.hi=(this.hi>>>1^e)>>>0,this},o.prototype.length=function(){var e=this.lo,t=(this.lo>>>28|this.hi<<4)>>>0,r=this.hi>>>24;return 0===r?0===t?e<16384?e<128?1:2:e<2097152?3:4:t<16384?t<128?5:6:t<2097152?7:8:r<128?9:10}},9693:function(e,t,r){"use strict";var n=t;function o(e,t,r){for(var n=Object.keys(t),o=0;o0)},n.Buffer=function(){try{var e=n.inquire("buffer").Buffer;return e.prototype.utf8Write?e:null}catch(e){return null}}(),n._Buffer_from=null,n._Buffer_allocUnsafe=null,n.newBuffer=function(e){return"number"==typeof e?n.Buffer?n._Buffer_allocUnsafe(e):new n.Array(e):n.Buffer?n._Buffer_from(e):"undefined"==typeof Uint8Array?e:new Uint8Array(e)},n.Array="undefined"!=typeof Uint8Array?Uint8Array:Array,n.Long=n.global.dcodeIO&&n.global.dcodeIO.Long||n.global.Long||n.inquire("long"),n.key2Re=/^true|false|0|1$/,n.key32Re=/^-?(?:0|[1-9][0-9]*)$/,n.key64Re=/^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/,n.longToHash=function(e){return e?n.LongBits.from(e).toHash():n.LongBits.zeroHash},n.longFromHash=function(e,t){var r=n.LongBits.fromHash(e);return n.Long?n.Long.fromBits(r.lo,r.hi,t):r.toNumber(Boolean(t))},n.merge=o,n.lcFirst=function(e){return e.charAt(0).toLowerCase()+e.substring(1)},n.newError=i,n.ProtocolError=i("ProtocolError"),n.oneOfGetter=function(e){for(var t={},r=0;r-1;--r)if(1===t[e[r]]&&void 0!==this[e[r]]&&null!==this[e[r]])return e[r]}},n.oneOfSetter=function(e){return function(t){for(var r=0;r>>7|e.hi<<25)>>>0,e.hi>>>=7;for(;e.lo>127;)t[r++]=127&e.lo|128,e.lo=e.lo>>>7;t[r++]=e.lo}function g(e,t,r){t[r]=255&e,t[r+1]=e>>>8&255,t[r+2]=e>>>16&255,t[r+3]=e>>>24}p.create=d(),p.alloc=function(e){return new o.Array(e)},o.Array!==Array&&(p.alloc=o.pool(p.alloc,o.Array.prototype.subarray)),p.prototype._push=function(e,t,r){return this.tail=this.tail.next=new c(e,t,r),this.len+=t,this},f.prototype=Object.create(c.prototype),f.prototype.fn=function(e,t,r){for(;e>127;)t[r++]=127&e|128,e>>>=7;t[r]=e},p.prototype.uint32=function(e){return this.len+=(this.tail=this.tail.next=new f((e>>>=0)<128?1:e<16384?2:e<2097152?3:e<268435456?4:5,e)).len,this},p.prototype.int32=function(e){return e<0?this._push(m,10,i.fromNumber(e)):this.uint32(e)},p.prototype.sint32=function(e){return this.uint32((e<<1^e>>31)>>>0)},p.prototype.uint64=function(e){var t=i.from(e);return this._push(m,t.length(),t)},p.prototype.int64=p.prototype.uint64,p.prototype.sint64=function(e){var t=i.from(e).zzEncode();return this._push(m,t.length(),t)},p.prototype.bool=function(e){return this._push(h,1,e?1:0)},p.prototype.fixed32=function(e){return this._push(g,4,e>>>0)},p.prototype.sfixed32=p.prototype.fixed32,p.prototype.fixed64=function(e){var t=i.from(e);return this._push(g,4,t.lo)._push(g,4,t.hi)},p.prototype.sfixed64=p.prototype.fixed64,p.prototype.float=function(e){return this._push(o.float.writeFloatLE,4,e)},p.prototype.double=function(e){return this._push(o.float.writeDoubleLE,8,e)};var v=o.Array.prototype.set?function(e,t,r){t.set(e,r)}:function(e,t,r){for(var n=0;n>>0;if(!t)return this._push(h,1,0);if(o.isString(e)){var r=p.alloc(t=a.length(e));a.decode(e,r,0),e=r}return this.uint32(t)._push(v,t,e)},p.prototype.string=function(e){var t=s.length(e);return t?this.uint32(t)._push(s.write,t,e):this._push(h,1,0)},p.prototype.fork=function(){return this.states=new l(this),this.head=this.tail=new c(u,0,0),this.len=0,this},p.prototype.reset=function(){return this.states?(this.head=this.states.head,this.tail=this.states.tail,this.len=this.states.len,this.states=this.states.next):(this.head=this.tail=new c(u,0,0),this.len=0),this},p.prototype.ldelim=function(){var e=this.head,t=this.tail,r=this.len;return this.reset().uint32(r),r&&(this.tail.next=e.next,this.tail=t,this.len+=r),this},p.prototype.finish=function(){for(var e=this.head.next,t=this.constructor.alloc(this.len),r=0;e;)e.fn(e.val,t,r),r+=e.len,e=e.next;return t},p._configure=function(e){n=e,p.create=d(),n._configure()}},3155:function(e,t,r){"use strict";e.exports=i;var n=r(1173);(i.prototype=Object.create(n.prototype)).constructor=i;var o=r(9693);function i(){n.call(this)}function a(e,t,r){e.length<40?o.utf8.write(e,t,r):t.utf8Write?t.utf8Write(e,r):t.write(e,r)}i._configure=function(){i.alloc=o._Buffer_allocUnsafe,i.writeBytesBuffer=o.Buffer&&o.Buffer.prototype instanceof Uint8Array&&"set"===o.Buffer.prototype.set.name?function(e,t,r){t.set(e,r)}:function(e,t,r){if(e.copy)e.copy(t,r,0,e.length);else for(var n=0;n>>0;return this.uint32(t),t&&this._push(i.writeBytesBuffer,t,e),this},i.prototype.string=function(e){var t=o.Buffer.byteLength(e);return this.uint32(t),t&&this._push(a,t,e),this},i._configure()},8e3:function(e,t,r){"use strict";var n=r(7581);e.exports=r(3626)(n),"_sockjs_onload"in r.g&&setTimeout(r.g._sockjs_onload,1)},2530:function(e,t,r){"use strict";var n=r(5717),o=r(685);function i(){o.call(this),this.initEvent("close",!1,!1),this.wasClean=!1,this.code=0,this.reason=""}n(i,o),e.exports=i},3212:function(e,t,r){"use strict";var n=r(5717),o=r(3184);function i(){o.call(this)}n(i,o),i.prototype.removeAllListeners=function(e){e?delete this._listeners[e]:this._listeners={}},i.prototype.once=function(e,t){var r=this,n=!1;this.on(e,(function o(){r.removeListener(e,o),n||(n=!0,t.apply(this,arguments))}))},i.prototype.emit=function(){var e=arguments[0],t=this._listeners[e];if(t){for(var r=arguments.length,n=new Array(r-1),o=1;o1?this._listeners[e]=r.slice(0,n).concat(r.slice(n+1)):delete this._listeners[e])}},t.prototype.dispatchEvent=function(){var e=arguments[0],t=e.type,r=1===arguments.length?[e]:Array.apply(null,arguments);if(this["on"+t]&&this["on"+t].apply(this,r),t in this._listeners)for(var n=this._listeners[t],o=0;o=3e3&&e<=4999}i(T,m),T.prototype.close=function(e,t){if(e&&!_(e))throw new Error("InvalidAccessError: Invalid code");if(t&&t.length>123)throw new SyntaxError("reason argument has an invalid length");this.readyState!==T.CLOSING&&this.readyState!==T.CLOSED&&this._close(e||1e3,t||"Normal closure",!0)},T.prototype.send=function(e){if("string"!=typeof e&&(e=""+e),this.readyState===T.CONNECTING)throw new Error("InvalidStateError: The connection has not been established yet");this.readyState===T.OPEN&&this._transport.send(s.quote(e))},T.version=r(2828),T.CONNECTING=0,T.OPEN=1,T.CLOSING=2,T.CLOSED=3,T.prototype._receiveInfo=function(e,t){if(this._ir=null,e){this._rto=this.countRTO(t),this._transUrl=e.base_url?e.base_url:this.url,e=p.extend(e,this._urlInfo);var r=n.filterToEnabled(this._transportsWhitelist,e);this._transports=r.main,this._transports.length,this._connect()}else this._close(1002,"Cannot connect to server")},T.prototype._connect=function(){for(var e=this._transports.shift();e;e=this._transports.shift()){if(e.transportName,e.needBody&&(!r.g.document.body||void 0!==r.g.document.readyState&&"complete"!==r.g.document.readyState&&"interactive"!==r.g.document.readyState))return this._transports.unshift(e),void u.attachEvent("load",this._connect.bind(this));var t=Math.max(this._timeout,this._rto*e.roundTrips||5e3);this._transportTimeoutId=setTimeout(this._transportTimeout.bind(this),t);var n=c.addPath(this._transUrl,"/"+this._server+"/"+this._generateSessionId()),o=this._transportOptions[e.transportName],i=new e(n,this._transUrl,o);return i.on("message",this._transportMessage.bind(this)),i.once("close",this._transportClose.bind(this)),i.transportName=e.transportName,void(this._transport=i)}this._close(2e3,"All transports failed",!1)},T.prototype._transportTimeout=function(){this.readyState===T.CONNECTING&&(this._transport&&this._transport.close(),this._transportClose(2007,"Transport timed out"))},T.prototype._transportMessage=function(e){var t,r=this,n=e.slice(0,1),o=e.slice(1);switch(n){case"o":return void this._open();case"h":return this.dispatchEvent(new f("heartbeat")),void this.transport}if(o)try{t=JSON.parse(o)}catch(e){}if(void 0!==t)switch(n){case"a":Array.isArray(t)&&t.forEach((function(e){r.transport,r.dispatchEvent(new y(e))}));break;case"m":this.transport,this.dispatchEvent(new y(t));break;case"c":Array.isArray(t)&&2===t.length&&this._close(t[0],t[1],!0)}},T.prototype._transportClose=function(e,t){this.transport,this._transport&&(this._transport.removeAllListeners(),this._transport=null,this.transport=null),_(e)||2e3===e||this.readyState!==T.CONNECTING?this._close(e,t):this._connect()},T.prototype._open=function(){this._transport&&this._transport.transportName,this.readyState,this.readyState===T.CONNECTING?(this._transportTimeoutId&&(clearTimeout(this._transportTimeoutId),this._transportTimeoutId=null),this.readyState=T.OPEN,this.transport=this._transport.transportName,this.dispatchEvent(new f("open")),this.transport):this._close(1006,"Server lost session")},T.prototype._close=function(e,t,r){this.transport,this.readyState;var n=!1;if(this._ir&&(n=!0,this._ir.close(),this._ir=null),this._transport&&(this._transport.close(),this._transport=null,this.transport=null),this.readyState===T.CLOSED)throw new Error("InvalidStateError: SockJS has already been closed");this.readyState=T.CLOSING,setTimeout(function(){this.readyState=T.CLOSED,n&&this.dispatchEvent(new f("error"));var o=new v("close");o.wasClean=r||!1,o.code=e||1e3,o.reason=t,this.dispatchEvent(o),this.onmessage=this.onclose=this.onerror=null}.bind(this),0)},T.prototype.countRTO=function(e){return e>100?4*e:300+e},e.exports=function(e){return n=l(e),r(551)(T,e),T}},1247:function(){"use strict";var e,t=Array.prototype,r=Object.prototype,n=Function.prototype,o=String.prototype,i=t.slice,a=r.toString,s=function(e){return"[object Function]"===r.toString.call(e)},c=function(e){return"[object String]"===a.call(e)},u=Object.defineProperty&&function(){try{return Object.defineProperty({},"x",{}),!0}catch(e){return!1}}();e=u?function(e,t,r,n){!n&&t in e||Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:!0,value:r})}:function(e,t,r,n){!n&&t in e||(e[t]=r)};var l=function(t,n,o){for(var i in n)r.hasOwnProperty.call(n,i)&&e(t,i,n[i],o)},p=function(e){if(null==e)throw new TypeError("can't convert "+e+" to object");return Object(e)};function d(){}l(n,{bind:function(e){var t=this;if(!s(t))throw new TypeError("Function.prototype.bind called on incompatible "+t);for(var r=i.call(arguments,1),n=Math.max(0,t.length-r.length),o=[],a=0;a>>0;if(!s(e))throw new TypeError;for(;++o>>0;if(!r)return-1;var n,o=0;for(arguments.length>1&&((n=+arguments[1])!=n?n=0:0!==n&&n!==1/0&&n!==-1/0&&(n=(n>0||-1)*Math.floor(Math.abs(n))),o=n),o=o>=0?o:Math.max(0,r+o);o1?(E=void 0===/()??/.exec("")[1],o.split=function(e,r){var n=this;if(void 0===e&&0===r)return[];if("[object RegExp]"!==a.call(e))return T.call(this,e,r);var o,i,s,c,u=[],l=(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.extended?"x":"")+(e.sticky?"y":""),p=0;for(e=new RegExp(e.source,l+"g"),n+="",E||(o=new RegExp("^"+e.source+"$(?!\\s)",l)),r=void 0===r?-1>>>0:r>>>0;(i=e.exec(n))&&!((s=i.index+i[0].length)>p&&(u.push(n.slice(p,i.index)),!E&&i.length>1&&i[0].replace(o,(function(){for(var e=1;e1&&i.index=r));)e.lastIndex===i.index&&e.lastIndex++;return p===n.length?!c&&e.test("")||u.push(""):u.push(n.slice(p)),u.length>r?u.slice(0,r):u}):"0".split(void 0,0).length&&(o.split=function(e,t){return void 0===e&&0===t?[]:T.call(this,e,t)});var _=o.substr;l(o,{substr:function(e,t){return _.call(this,e<0&&(e=this.length+e)<0?0:e,t)}},"".substr&&"b"!=="0b".substr(-1))},7581:function(e,t,r){"use strict";e.exports=[r(2412),r(9842),r(4620),r(3004),r(882)(r(3004)),r(5616),r(882)(r(5616)),r(2387),r(9998),r(882)(r(2387)),r(5375)]},2940:function(e,t,r){"use strict";var n=r(3212).v,o=r(5717),i=r(7705),a=r(273),s=r.g.XMLHttpRequest;function c(e,t,r,o){var i=this;n.call(this),setTimeout((function(){i._start(e,t,r,o)}),0)}o(c,n),c.prototype._start=function(e,t,r,n){var o=this;try{this.xhr=new s}catch(e){}if(!this.xhr)return this.emit("finish",0,"no xhr support"),void this._cleanup();t=a.addQuery(t,"t="+ +new Date),this.unloadRef=i.unloadAdd((function(){o._cleanup(!0)}));try{this.xhr.open(e,t,!0),this.timeout&&"timeout"in this.xhr&&(this.xhr.timeout=this.timeout,this.xhr.ontimeout=function(){o.emit("finish",0,""),o._cleanup(!1)})}catch(e){return this.emit("finish",0,""),void this._cleanup(!1)}if(n&&n.noCredentials||!c.supportsCORS||(this.xhr.withCredentials=!0),n&&n.headers)for(var u in n.headers)this.xhr.setRequestHeader(u,n.headers[u]);this.xhr.onreadystatechange=function(){if(o.xhr){var e,t,r=o.xhr;switch(r.readyState,r.readyState){case 3:try{t=r.status,e=r.responseText}catch(e){}1223===t&&(t=204),200===t&&e&&e.length>0&&o.emit("chunk",t,e);break;case 4:1223===(t=r.status)&&(t=204),12005!==t&&12029!==t||(t=0),r.responseText,o.emit("finish",t,r.responseText),o._cleanup(!1)}}};try{o.xhr.send(r)}catch(e){o.emit("finish",0,""),o._cleanup(!1)}},c.prototype._cleanup=function(e){if(this.xhr){if(this.removeAllListeners(),i.unloadDel(this.unloadRef),this.xhr.onreadystatechange=function(){},this.xhr.ontimeout&&(this.xhr.ontimeout=null),e)try{this.xhr.abort()}catch(e){}this.unloadRef=this.xhr=null}},c.prototype.close=function(){this._cleanup(!0)},c.enabled=!!s;var u=["Active"].concat("Object").join("X");!c.enabled&&u in r.g&&(s=function(){try{return new r.g[u]("Microsoft.XMLHTTP")}catch(e){return null}},c.enabled=!!new s);var l=!1;try{l="withCredentials"in new s}catch(e){}c.supportsCORS=l,e.exports=c},3759:function(e,t,r){e.exports=r.g.EventSource},9334:function(e,t,r){"use strict";var n=r.g.WebSocket||r.g.MozWebSocket;e.exports=n?function(e){return new n(e)}:void 0},3004:function(e,t,r){"use strict";var n=r(5717),o=r(9395),i=r(6709),a=r(9033),s=r(3759);function c(e){if(!c.enabled())throw new Error("Transport created when disabled");o.call(this,e,"/eventsource",i,a)}n(c,o),c.enabled=function(){return!!s},c.transportName="eventsource",c.roundTrips=2,e.exports=c},5616:function(e,t,r){"use strict";var n=r(5717),o=r(3608),i=r(3515),a=r(9395);function s(e){if(!o.enabled)throw new Error("Transport created when disabled");a.call(this,e,"/htmlfile",o,i)}n(s,a),s.enabled=function(e){return o.enabled&&e.sameOrigin},s.transportName="htmlfile",s.roundTrips=2,e.exports=s},5088:function(e,t,r){"use strict";var n=r(5717),o=r(3212).v,i=r(2828),a=r(273),s=r(3683),c=r(7705),u=r(8915);function l(e,t,r){if(!l.enabled())throw new Error("Transport created when disabled");o.call(this);var n=this;this.origin=a.getOrigin(r),this.baseUrl=r,this.transUrl=t,this.transport=e,this.windowId=u.string(8);var i=a.addPath(r,"/iframe.html")+"#"+this.windowId;this.iframeObj=s.createIframe(i,(function(e){n.emit("close",1006,"Unable to load an iframe ("+e+")"),n.close()})),this.onmessageCallback=this._message.bind(this),c.attachEvent("message",this.onmessageCallback)}n(l,o),l.prototype.close=function(){if(this.removeAllListeners(),this.iframeObj){c.detachEvent("message",this.onmessageCallback);try{this.postMessage("c")}catch(e){}this.iframeObj.cleanup(),this.iframeObj=null,this.onmessageCallback=this.iframeObj=null}},l.prototype._message=function(e){if(e.data,!a.isOriginEqual(e.origin,this.origin))return e.origin,void this.origin;var t;try{t=JSON.parse(e.data)}catch(t){return void e.data}if(t.windowId!==this.windowId)return t.windowId,void this.windowId;switch(t.type){case"s":this.iframeObj.loaded(),this.postMessage("s",JSON.stringify([i,this.transport,this.transUrl,this.baseUrl]));break;case"t":this.emit("message",t.data);break;case"c":var r;try{r=JSON.parse(t.data)}catch(e){return void t.data}this.emit("close",r[0],r[1]),this.close()}},l.prototype.postMessage=function(e,t){this.iframeObj.post(JSON.stringify({windowId:this.windowId,type:e,data:t||""}),this.origin)},l.prototype.send=function(e){this.postMessage("m",e)},l.enabled=function(){return s.iframeEnabled},l.transportName="iframe",l.roundTrips=2,e.exports=l},5375:function(e,t,r){"use strict";var n=r(5717),o=r(8347),i=r(514),a=r(771);function s(e){if(!s.enabled())throw new Error("Transport created when disabled");o.call(this,e,"/jsonp",a,i)}n(s,o),s.enabled=function(){return!!r.g.document},s.transportName="jsonp-polling",s.roundTrips=1,s.needBody=!0,e.exports=s},9395:function(e,t,r){"use strict";var n=r(5717),o=r(273),i=r(8347);function a(e,t,r,n){i.call(this,e,t,function(e){return function(t,r,n){var i={};"string"==typeof r&&(i.headers={"Content-type":"text/plain"});var a=o.addPath(t,"/xhr_send"),s=new e("POST",a,r,i);return s.once("finish",(function(e){if(s=null,200!==e&&204!==e)return n(new Error("http status "+e));n()})),function(){s.close(),s=null;var e=new Error("Aborted");e.code=1e3,n(e)}}}(n),r,n)}n(a,i),e.exports=a},1851:function(e,t,r){"use strict";var n=r(5717),o=r(3212).v;function i(e,t){o.call(this),this.sendBuffer=[],this.sender=t,this.url=e}n(i,o),i.prototype.send=function(e){this.sendBuffer.push(e),this.sendStop||this.sendSchedule()},i.prototype.sendScheduleWait=function(){var e,t=this;this.sendStop=function(){t.sendStop=null,clearTimeout(e)},e=setTimeout((function(){t.sendStop=null,t.sendSchedule()}),25)},i.prototype.sendSchedule=function(){this.sendBuffer.length;var e=this;if(this.sendBuffer.length>0){var t="["+this.sendBuffer.join(",")+"]";this.sendStop=this.sender(this.url,t,(function(t){e.sendStop=null,t?(e.emit("close",t.code||1006,"Sending error: "+t),e.close()):e.sendScheduleWait()})),this.sendBuffer=[]}},i.prototype._cleanup=function(){this.removeAllListeners()},i.prototype.close=function(){this._cleanup(),this.sendStop&&(this.sendStop(),this.sendStop=null)},e.exports=i},882:function(e,t,r){"use strict";var n=r(5717),o=r(5088),i=r(2217);e.exports=function(e){function t(t,r){o.call(this,e.transportName,t,r)}return n(t,o),t.enabled=function(t,n){if(!r.g.document)return!1;var a=i.extend({},n);return a.sameOrigin=!0,e.enabled(a)&&o.enabled()},t.transportName="iframe-"+e.transportName,t.needBody=!0,t.roundTrips=o.roundTrips+e.roundTrips-1,t.facadeTransport=e,t}},1265:function(e,t,r){"use strict";var n=r(5717),o=r(3212).v;function i(e,t,r){o.call(this),this.Receiver=e,this.receiveUrl=t,this.AjaxObject=r,this._scheduleReceiver()}n(i,o),i.prototype._scheduleReceiver=function(){var e=this,t=this.poll=new this.Receiver(this.receiveUrl,this.AjaxObject);t.on("message",(function(t){e.emit("message",t)})),t.once("close",(function(r,n){e.pollIsClosing,e.poll=t=null,e.pollIsClosing||("network"===n?e._scheduleReceiver():(e.emit("close",r||1006,n),e.removeAllListeners()))}))},i.prototype.abort=function(){this.removeAllListeners(),this.pollIsClosing=!0,this.poll&&this.poll.abort()},e.exports=i},8347:function(e,t,r){"use strict";var n=r(5717),o=r(273),i=r(1851),a=r(1265);function s(e,t,r,n,s){var c=o.addPath(e,t),u=this;i.call(this,e,r),this.poll=new a(n,c,s),this.poll.on("message",(function(e){u.emit("message",e)})),this.poll.once("close",(function(e,t){u.poll=null,u.emit("close",e,t),u.close()}))}n(s,i),s.prototype.close=function(){i.prototype.close.call(this),this.removeAllListeners(),this.poll&&(this.poll.abort(),this.poll=null)},e.exports=s},6709:function(e,t,r){"use strict";var n=r(5717),o=r(3212).v,i=r(3759);function a(e){o.call(this);var t=this,r=this.es=new i(e);r.onmessage=function(e){e.data,t.emit("message",decodeURI(e.data))},r.onerror=function(e){r.readyState;var n=2!==r.readyState?"network":"permanent";t._cleanup(),t._close(n)}}n(a,o),a.prototype.abort=function(){this._cleanup(),this._close("user")},a.prototype._cleanup=function(){var e=this.es;e&&(e.onmessage=e.onerror=null,e.close(),this.es=null)},a.prototype._close=function(e){var t=this;setTimeout((function(){t.emit("close",null,e),t.removeAllListeners()}),200)},e.exports=a},3608:function(e,t,r){"use strict";var n=r(5717),o=r(3683),i=r(273),a=r(3212).v,s=r(8915);function c(e){a.call(this);var t=this;o.polluteGlobalNamespace(),this.id="a"+s.string(6),e=i.addQuery(e,"c="+decodeURIComponent(o.WPrefix+"."+this.id)),c.htmlfileEnabled;var n=c.htmlfileEnabled?o.createHtmlfile:o.createIframe;r.g[o.WPrefix][this.id]={start:function(){t.iframeObj.loaded()},message:function(e){t.emit("message",e)},stop:function(){t._cleanup(),t._close("network")}},this.iframeObj=n(e,(function(){t._cleanup(),t._close("permanent")}))}n(c,a),c.prototype.abort=function(){this._cleanup(),this._close("user")},c.prototype._cleanup=function(){this.iframeObj&&(this.iframeObj.cleanup(),this.iframeObj=null),delete r.g[o.WPrefix][this.id]},c.prototype._close=function(e){this.emit("close",null,e),this.removeAllListeners()},c.htmlfileEnabled=!1;var u=["Active"].concat("Object").join("X");if(u in r.g)try{c.htmlfileEnabled=!!new r.g[u]("htmlfile")}catch(e){}c.enabled=c.htmlfileEnabled||o.iframeEnabled,e.exports=c},514:function(e,t,r){"use strict";var n=r(3683),o=r(8915),i=r(8510),a=r(273),s=r(5717),c=r(3212).v;function u(e){var t=this;c.call(this),n.polluteGlobalNamespace(),this.id="a"+o.string(6);var i=a.addQuery(e,"c="+encodeURIComponent(n.WPrefix+"."+this.id));r.g[n.WPrefix][this.id]=this._callback.bind(this),this._createScript(i),this.timeoutId=setTimeout((function(){t._abort(new Error("JSONP script loaded abnormally (timeout)"))}),u.timeout)}s(u,c),u.prototype.abort=function(){if(r.g[n.WPrefix][this.id]){var e=new Error("JSONP user aborted read");e.code=1e3,this._abort(e)}},u.timeout=35e3,u.scriptErrorTimeout=1e3,u.prototype._callback=function(e){this._cleanup(),this.aborting||(e&&this.emit("message",e),this.emit("close",null,"network"),this.removeAllListeners())},u.prototype._abort=function(e){this._cleanup(),this.aborting=!0,this.emit("close",e.code,e.message),this.removeAllListeners()},u.prototype._cleanup=function(){if(clearTimeout(this.timeoutId),this.script2&&(this.script2.parentNode.removeChild(this.script2),this.script2=null),this.script){var e=this.script;e.parentNode.removeChild(e),e.onreadystatechange=e.onerror=e.onload=e.onclick=null,this.script=null}delete r.g[n.WPrefix][this.id]},u.prototype._scriptError=function(){var e=this;this.errorTimer||(this.errorTimer=setTimeout((function(){e.loadedOkay||e._abort(new Error("JSONP script loaded abnormally (onerror)"))}),u.scriptErrorTimeout))},u.prototype._createScript=function(e){var t,n=this,a=this.script=r.g.document.createElement("script");if(a.id="a"+o.string(8),a.src=e,a.type="text/javascript",a.charset="UTF-8",a.onerror=this._scriptError.bind(this),a.onload=function(){n._abort(new Error("JSONP script loaded abnormally (onload)"))},a.onreadystatechange=function(){if(a.readyState,/loaded|closed/.test(a.readyState)){if(a&&a.htmlFor&&a.onclick){n.loadedOkay=!0;try{a.onclick()}catch(e){}}a&&n._abort(new Error("JSONP script loaded abnormally (onreadystatechange)"))}},void 0===a.async&&r.g.document.attachEvent)if(i.isOpera())(t=this.script2=r.g.document.createElement("script")).text="try{var a = document.getElementById('"+a.id+"'); if(a)a.onerror();}catch(x){};",a.async=t.async=!1;else{try{a.htmlFor=a.id,a.event="onclick"}catch(e){}a.async=!0}void 0!==a.async&&(a.async=!0);var s=r.g.document.getElementsByTagName("head")[0];s.insertBefore(a,s.firstChild),t&&s.insertBefore(t,s.firstChild)},e.exports=u},1044:function(e,t,r){"use strict";var n=r(5717),o=r(3212).v;function i(e,t){o.call(this);var r=this;this.bufferPosition=0,this.xo=new t("POST",e,null),this.xo.on("chunk",this._chunkHandler.bind(this)),this.xo.once("finish",(function(e,t){r._chunkHandler(e,t),r.xo=null;var n=200===e?"network":"permanent";r.emit("close",null,n),r._cleanup()}))}n(i,o),i.prototype._chunkHandler=function(e,t){if(200===e&&t)for(var r=-1;;this.bufferPosition+=r+1){var n=t.slice(this.bufferPosition);if(-1===(r=n.indexOf("\n")))break;var o=n.slice(0,r);o&&this.emit("message",o)}},i.prototype._cleanup=function(){this.removeAllListeners()},i.prototype.abort=function(){this.xo&&(this.xo.close(),this.emit("close",null,"user"),this.xo=null),this._cleanup()},e.exports=i},771:function(e,t,r){"use strict";var n,o,i=r(8915),a=r(273);e.exports=function(e,t,s){n||((n=r.g.document.createElement("form")).style.display="none",n.style.position="absolute",n.method="POST",n.enctype="application/x-www-form-urlencoded",n.acceptCharset="UTF-8",(o=r.g.document.createElement("textarea")).name="d",n.appendChild(o),r.g.document.body.appendChild(n));var c="a"+i.string(8);n.target=c,n.action=a.addQuery(a.addPath(e,"/jsonp_send"),"i="+c);var u=function(e){try{return r.g.document.createElement('