easemob-websdk 4.24.2 → 4.24.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Easemob-chat.js +1 -1
- package/miniCore/miniCore.js +1 -1
- package/miniProgram/Easemob-chat.js +1 -1
- package/package.json +1 -1
- package/uniApp/Easemob-chat.js +1 -1
package/miniCore/miniCore.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! For license information please see miniCore.js.LICENSE.txt */
|
|
2
|
-
!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 __webpack_modules__={34:function(e,t,r){var n=r(4901);e.exports=function(e){return"object"==typeof e?null!==e:n(e)}},81:function(e,t,r){"use strict";var n=r(9565),i=r(9306),o=r(8551),s=r(6823),a=r(851),u=TypeError;e.exports=function(e,t){var r=arguments.length<2?a(e):t;if(i(r))return o(n(r,e));throw new u(s(e)+" is not iterable")}},113:function(e,t,r){"use strict";var n=r(6518),i=r(9213).find,o=r(6469),s="find",a=!0;s in[]&&Array(1)[s]((function(){a=!1})),n({target:"Array",proto:!0,forced:a},{find:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}}),o(s)},150:function(e,t,r){"use strict";r(6518)({target:"Number",stat:!0},{isNaN:function(e){return e!=e}})},208:function(e,t,r){"use strict";r.d(t,{E:function(){return i}}),r(9089),r(9449);var n=r(4269),i=function(){function e(e){var t=e.type,r=e.id||n.Wp.getUniqueId();this.id=r,this.type=t}return e.prototype.set=function(e){e.file=e.file||e.fileInputId&&n.Wp.getFileUrl(e.fileInputId),this.body={id:this.id,chatType:e.chatType||"singleChat",type:"img",file:e.file,width:e.width,height:e.height,to:e.to,from:e.from||"",roomType:e.roomType,success:e.success,fail:e.fail,ext:e.ext,time:Date.now(),onFileUploadError:e.onFileUploadError,onFileUploadComplete:e.onFileUploadComplete,onFileUploadProgress:e.onFileUploadProgress,body:e.body,isChatThread:e.isChatThread}},e.prototype.setChatType=function(e){return!!this.body&&(this.body.chatType=e,!0)},e.prototype.setGroup=function(e){return!!this.body&&(this.body.group=e,!0)},e.create=function(e){var t,r,i,o,s,a,u,c=e.imageType,l=null===(i=null===(r=null===(t=e.file)||void 0===t?void 0:t.data)||void 0===r?void 0:r.type)||void 0===i?void 0:i.toLowerCase(),d=null===(s=null===(o=e.file)||void 0===o?void 0:o.filetype)||void 0===s?void 0:s.toLowerCase(),f=null===(u=null===(a=e.file)||void 0===a?void 0:a.filename)||void 0===u?void 0:u.toLowerCase(),h="image/gif"===l||"gif"===d||"image/gif"===d||!0===(null==f?void 0:f.endsWith(".gif")),p=e.isGif||h,v=p||!0===e.isOriginalImage||"original"===c;return{id:n.Wp.getUniqueId(),chatType:e.chatType,type:"img",url:e.url,width:e.width,height:e.height,file:e.file,to:e.to,from:e.from||"",ext:e.ext,time:Date.now(),msgConfig:e.msgConfig,file_length:e.file_length,onFileUploadError:e.onFileUploadError,onFileUploadComplete:e.onFileUploadComplete,onFileUploadProgress:e.onFileUploadProgress,isChatThread:e.isChatThread,priority:e.priority,deliverOnlineOnly:e.deliverOnlineOnly,receiverList:e.receiverList,webhookEnv:e.webhookEnv,thumbnailWidth:e.thumbnailWidth,thumbnailHeight:e.thumbnailHeight,isGif:p,isOriginalImage:v}},e}()},229:function(e,t,r){"use strict";function n(e,t){return e+t|0}function i(e){for(var t="",r=0;r<4;r++)t+="0".concat((e>>>8*r&255).toString(16)).slice(-2);return t}function o(e){var t=new Uint8Array(e),r=t.length,o=64*((r+8>>>6)+1),s=new Uint8Array(o);s.set(t),s[r]=128;for(var a=8*r,u=a>>>0,c=Math.floor(a/4294967296)>>>0,l=0;l<4;l++)s[o-8+l]=u>>>8*l&255,s[o-4+l]=c>>>8*l&255;var d=[7,12,17,22,7,12,17,22,7,12,17,22,7,12,17,22,5,9,14,20,5,9,14,20,5,9,14,20,5,9,14,20,4,11,16,23,4,11,16,23,4,11,16,23,4,11,16,23,6,10,15,21,6,10,15,21,6,10,15,21,6,10,15,21],f=new Array(64);for(l=0;l<64;l++)f[l]=Math.floor(4294967296*Math.abs(Math.sin(l+1)));for(var h,p,v=1732584193,m=4023233417,_=2562383102,g=271733878,E=new Array(16),y=0;y<o;y+=64){for(l=0;l<16;l++){var O=y+4*l;E[l]=s[O]|s[O+1]<<8|s[O+2]<<16|s[O+3]<<24}var T=v,R=m,I=_,S=g;for(l=0;l<64;l++){var C=0,b=0;l<16?(C=R&I|~R&S,b=l):l<32?(C=S&R|~S&I,b=(5*l+1)%16):l<48?(C=R^I^S,b=(3*l+5)%16):(C=I^(R|~S),b=7*l%16);var N=I,A=R,M=(h=n(n(T,C),n(f[l],E[b])))<<(p=d[l])|h>>>32-p;R=n(R,M),T=S,I=A,S=N}v=n(v,T),m=n(m,R),_=n(_,I),g=n(g,S)}return"".concat(i(v)).concat(i(m)).concat(i(_)).concat(i(g))}r.d(t,{K:function(){return o}}),r(8706),r(3792),r(4782),r(4743),r(1745),r(8309),r(3288),r(6099),r(8781),r(1489),r(1630),r(2170),r(5044),r(1920),r(1694),r(9955),r(3206),r(4496),r(6651),r(2887),r(9369),r(6812),r(8995),r(1575),r(6072),r(8747),r(8845),r(9423),r(7301),r(373),r(6614),r(1405),r(3684)},235:function(e,t,r){"use strict";var n=r(9213).forEach,i=r(4598)("forEach");e.exports=i?[].forEach:function(e){return n(this,e,arguments.length>1?arguments[1]:void 0)}},280:function(e,t,r){"use strict";var n=r(6518),i=r(7751),o=r(6395),s=r(550),a=r(916).CONSTRUCTOR,u=r(3438),c=i("Promise"),l=o&&!a;n({target:"Promise",stat:!0,forced:o||a},{resolve:function(e){return u(l&&this===c?s:this,e)}})},283:function(e,t,r){"use strict";var n=r(9504),i=r(9039),o=r(4901),s=r(9297),a=r(3724),u=r(350).CONFIGURABLE,c=r(3706),l=r(1181),d=l.enforce,f=l.get,h=String,p=Object.defineProperty,v=n("".slice),m=n("".replace),_=n([].join),g=a&&!i((function(){return 8!==p((function(){}),"length",{value:8}).length})),E=String(String).split("String"),y=e.exports=function(e,t,r){"Symbol("===v(h(t),0,7)&&(t="["+m(h(t),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),r&&r.getter&&(t="get "+t),r&&r.setter&&(t="set "+t),(!s(e,"name")||u&&e.name!==t)&&(a?p(e,"name",{value:t,configurable:!0}):e.name=t),g&&r&&s(r,"arity")&&e.length!==r.arity&&p(e,"length",{value:r.arity});try{r&&s(r,"constructor")&&r.constructor?a&&p(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(e){}var n=d(e);return s(n,"source")||(n.source=_(E,"string"==typeof t?t:"")),e};Function.prototype.toString=y((function(){return o(this)&&f(this).source||c(this)}),"toString")},298:function(e,t,r){"use strict";var n=r(2195),i=r(5397),o=r(8480).f,s=r(7680),a="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];e.exports.f=function(e){return a&&"Window"===n(e)?function(e){try{return o(e)}catch(e){return s(a)}}(e):o(i(e))}},350:function(e,t,r){"use strict";var n=r(3724),i=r(9297),o=Function.prototype,s=n&&Object.getOwnPropertyDescriptor,a=i(o,"name"),u=a&&"something"===function(){}.name,c=a&&(!n||n&&s(o,"name").configurable);e.exports={EXISTS:a,PROPER:u,CONFIGURABLE:c}},361:function(e,t,r){"use strict";var n=t,i=r(3262),o=["double","float","int32","uint32","sint32","fixed32","sfixed32","int64","uint64","sint64","fixed64","sfixed64","bool","string","bytes"];function s(e,t){var r=0,n={};for(t|=0;r<e.length;)n[o[r+t]]=e[r++];return n}n.basic=s([1,5,0,0,0,5,5,0,0,0,1,1,0,2,2]),n.defaults=s([0,0,0,0,0,0,0,0,0,0,0,0,!1,"",i.emptyArray,null]),n.long=s([0,0,0,1,1],7),n.mapKey=s([0,0,0,5,5,0,0,0,1,1,0,2],2),n.packed=s([1,5,0,0,0,5,5,0,0,0,1,1,0])},373:function(e,t,r){"use strict";var n=r(4576),i=r(7476),o=r(9039),s=r(9306),a=r(4488),u=r(4644),c=r(3709),l=r(3763),d=r(9519),f=r(3607),h=u.aTypedArray,p=u.exportTypedArrayMethod,v=n.Uint16Array,m=v&&i(v.prototype.sort),_=!(!m||o((function(){m(new v(2),null)}))&&o((function(){m(new v(2),{})}))),g=!!m&&!o((function(){if(d)return d<74;if(c)return c<67;if(l)return!0;if(f)return f<602;var e,t,r=new v(516),n=Array(516);for(e=0;e<516;e++)t=e%4,r[e]=515-e,n[e]=e-2*t+3;for(m(r,(function(e,t){return(e/4|0)-(t/4|0)})),e=0;e<516;e++)if(r[e]!==n[e])return!0}));p("sort",(function(e){return void 0!==e&&s(e),g?m(this,e):a(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))}),!g||_)},397:function(e,t,r){"use strict";var n=r(7751);e.exports=n("document","documentElement")},420:function(e,t,r){"use strict";e.exports=function(e){var t=i.codegen(["m"],e.name+"$verify")('if(typeof m!=="object"||m===null)')("return%j","object expected"),r={};e.oneofsArray.length&&t("var p={}");for(var n=0;n<e.fieldsArray.length;++n){var u=e._fieldsArray[n].resolve(),c="m"+i.safeProp(u.name);if(u.optional&&t("if(%s!=null&&m.hasOwnProperty(%j)){",c,u.name),u.map)t("if(!util.isObject(%s))",c)("return%j",o(u,"object"))("var k=Object.keys(%s)",c)("for(var i=0;i<k.length;++i){"),a(t,u,"k[i]"),s(t,u,n,c+"[k[i]]")("}");else if(u.repeated)t("if(!Array.isArray(%s))",c)("return%j",o(u,"array"))("for(var i=0;i<%s.length;++i){",c),s(t,u,n,c+"[i]")("}");else{if(u.partOf){var l=i.safeProp(u.partOf.name);1===r[u.partOf.name]&&t("if(p%s===1)",l)("return%j",u.partOf.name+": multiple values"),r[u.partOf.name]=1,t("p%s=1",l)}s(t,u,n,c)}u.optional&&t("}")}return t("return null")};var n=r(5643),i=r(3262);function o(e,t){return e.name+": "+t+(e.repeated&&"array"!==t?"[]":e.map&&"object"!==t?"{k:"+e.keyType+"}":"")+" expected"}function s(e,t,r,i){if(t.resolvedType)if(t.resolvedType instanceof n){e("switch(%s){",i)("default:")("return%j",o(t,"enum value"));for(var s=Object.keys(t.resolvedType.values),a=0;a<s.length;++a)e("case %i:",t.resolvedType.values[s[a]]);e("break")("}")}else e("{")("var e=types[%i].verify(%s);",r,i)("if(e)")("return%j+e",t.name+".")("}");else switch(t.type){case"int32":case"uint32":case"sint32":case"fixed32":case"sfixed32":e("if(!util.isInteger(%s))",i)("return%j",o(t,"integer"));break;case"int64":case"uint64":case"sint64":case"fixed64":case"sfixed64":e("if(!util.isInteger(%s)&&!(%s&&util.isInteger(%s.low)&&util.isInteger(%s.high)))",i,i,i,i)("return%j",o(t,"integer|Long"));break;case"float":case"double":e('if(typeof %s!=="number")',i)("return%j",o(t,"number"));break;case"bool":e('if(typeof %s!=="boolean")',i)("return%j",o(t,"boolean"));break;case"string":e("if(!util.isString(%s))",i)("return%j",o(t,"string"));break;case"bytes":e('if(!(%s&&typeof %s.length==="number"||util.isString(%s)))',i,i,i)("return%j",o(t,"buffer"))}return e}function a(e,t,r){switch(t.keyType){case"int32":case"uint32":case"sint32":case"fixed32":case"sfixed32":e("if(!util.key32Re.test(%s))",r)("return%j",o(t,"integer key"));break;case"int64":case"uint64":case"sint64":case"fixed64":case"sfixed64":e("if(!util.key64Re.test(%s))",r)("return%j",o(t,"integer|Long key"));break;case"bool":e("if(!util.key2Re.test(%s))",r)("return%j",o(t,"boolean key"))}return e}},421:function(e){"use strict";e.exports={}},436:function(e,t,r){"use strict";var n,i,o,s=r(6518),a=r(6395),u=r(6193),c=r(4576),l=r(9565),d=r(6840),f=r(2967),h=r(687),p=r(7633),v=r(9306),m=r(4901),_=r(34),g=r(679),E=r(2293),y=r(9225).set,O=r(1955),T=r(3138),R=r(1103),I=r(8265),S=r(1181),C=r(550),b=r(916),N=r(6043),A="Promise",M=b.CONSTRUCTOR,w=b.REJECTION_EVENT,L=b.SUBCLASSING,U=S.getterFor(A),x=S.set,D=C&&C.prototype,P=C,k=D,F=c.TypeError,H=c.document,B=c.process,G=N.f,W=G,j=!!(H&&H.createEvent&&c.dispatchEvent),q="unhandledrejection",K=function(e){var t;return!(!_(e)||!m(t=e.then))&&t},z=function(e,t){var r,n,i,o=t.value,s=1===t.state,a=s?e.ok:e.fail,u=e.resolve,c=e.reject,d=e.domain;try{a?(s||(2===t.rejection&&Q(t),t.rejection=1),!0===a?r=o:(d&&d.enter(),r=a(o),d&&(d.exit(),i=!0)),r===e.promise?c(new F("Promise-chain cycle")):(n=K(r))?l(n,r,u,c):u(r)):c(o)}catch(e){d&&!i&&d.exit(),c(e)}},V=function(e,t){e.notified||(e.notified=!0,O((function(){for(var r,n=e.reactions;r=n.get();)z(r,e);e.notified=!1,t&&!e.rejection&&Y(e)})))},J=function(e,t,r){var n,i;j?((n=H.createEvent("Event")).promise=t,n.reason=r,n.initEvent(e,!1,!0),c.dispatchEvent(n)):n={promise:t,reason:r},!w&&(i=c["on"+e])?i(n):e===q&&T("Unhandled promise rejection",r)},Y=function(e){l(y,c,(function(){var t,r=e.facade,n=e.value;if(X(e)&&(t=R((function(){u?B.emit("unhandledRejection",n,r):J(q,r,n)})),e.rejection=u||X(e)?2:1,t.error))throw t.value}))},X=function(e){return 1!==e.rejection&&!e.parent},Q=function(e){l(y,c,(function(){var t=e.facade;u?B.emit("rejectionHandled",t):J("rejectionhandled",t,e.value)}))},$=function(e,t,r){return function(n){e(t,n,r)}},Z=function(e,t,r){e.done||(e.done=!0,r&&(e=r),e.value=t,e.state=2,V(e,!0))},ee=function(e,t,r){if(!e.done){e.done=!0,r&&(e=r);try{if(e.facade===t)throw new F("Promise can't be resolved itself");var n=K(t);n?O((function(){var r={done:!1};try{l(n,t,$(ee,r,e),$(Z,r,e))}catch(t){Z(r,t,e)}})):(e.value=t,e.state=1,V(e,!1))}catch(t){Z({done:!1},t,e)}}};if(M&&(k=(P=function(e){g(this,k),v(e),l(n,this);var t=U(this);try{e($(ee,t),$(Z,t))}catch(e){Z(t,e)}}).prototype,(n=function(e){x(this,{type:A,done:!1,notified:!1,parent:!1,reactions:new I,rejection:!1,state:0,value:null})}).prototype=d(k,"then",(function(e,t){var r=U(this),n=G(E(this,P));return r.parent=!0,n.ok=!m(e)||e,n.fail=m(t)&&t,n.domain=u?B.domain:void 0,0===r.state?r.reactions.add(n):O((function(){z(n,r)})),n.promise})),i=function(){var e=new n,t=U(e);this.promise=e,this.resolve=$(ee,t),this.reject=$(Z,t)},N.f=G=function(e){return e===P||void 0===e?new i(e):W(e)},!a&&m(C)&&D!==Object.prototype)){o=D.then,L||d(D,"then",(function(e,t){var r=this;return new P((function(e,t){l(o,r,e,t)})).then(e,t)}),{unsafe:!0});try{delete D.constructor}catch(e){}f&&f(D,k)}s({global:!0,constructor:!0,wrap:!0,forced:M},{Promise:P}),h(P,A,!1,!0),p(A)},511:function(e,t,r){"use strict";var n=r(9167),i=r(9297),o=r(1951),s=r(4913).f;e.exports=function(e){var t=n.Symbol||(n.Symbol={});i(t,e)||s(t,e,{value:o.f(e)})}},527:function(e){"use strict";e.exports=d;var t=/[\s{}=;:[\],'"()<>]/g,r=/(?:"([^"\\]*(?:\\.[^"\\]*)*)")/g,n=/(?:'([^'\\]*(?:\\.[^'\\]*)*)')/g,i=/^ *[*/]+ */,o=/^\s*\*?\/*/,s=/\n/g,a=/\s/,u=/\\(.?)/g,c={0:"\0",r:"\r",n:"\n",t:"\t"};function l(e){return e.replace(u,(function(e,t){switch(t){case"\\":case"":return t;default:return c[t]||""}}))}function d(e,u){e=e.toString();var c=0,d=e.length,f=1,h=null,p=null,v=0,m=!1,_=!1,g=[],E=null;function y(e){return Error("illegal "+e+" (line "+f+")")}function O(t){return e.charAt(t)}function T(t,r,n){h=e.charAt(t++),v=f,m=!1,_=n;var a,c=t-(u?2:3);do{if(--c<0||"\n"===(a=e.charAt(c))){m=!0;break}}while(" "===a||"\t"===a);for(var l=e.substring(t,r).split(s),d=0;d<l.length;++d)l[d]=l[d].replace(u?o:i,"").trim();p=l.join("\n").trim()}function R(t){var r=I(t),n=e.substring(t,r);return/^\s*\/{1,2}/.test(n)}function I(e){for(var t=e;t<d&&"\n"!==O(t);)t++;return t}function S(){if(g.length>0)return g.shift();if(E)return function(){var t="'"===E?n:r;t.lastIndex=c-1;var i=t.exec(e);if(!i)throw y("string");return c=t.lastIndex,C(E),E=null,l(i[1])}();var i,o,s,h,p,v=0===c;do{if(c===d)return null;for(i=!1;a.test(s=O(c));)if("\n"===s&&(v=!0,++f),++c===d)return null;if("/"===O(c)){if(++c===d)throw y("comment");if("/"===O(c))if(u){if(h=c,p=!1,R(c)){p=!0;do{if((c=I(c))===d)break;c++}while(R(c))}else c=Math.min(d,I(c)+1);p&&T(h,c,v),f++,i=!0}else{for(p="/"===O(h=c+1);"\n"!==O(++c);)if(c===d)return null;++c,p&&T(h,c-1,v),++f,i=!0}else{if("*"!==(s=O(c)))return"/";h=c+1,p=u||"*"===O(h);do{if("\n"===s&&++f,++c===d)throw y("comment");o=s,s=O(c)}while("*"!==o||"/"!==s);++c,p&&T(h,c-2,v),i=!0}}}while(i);var m=c;if(t.lastIndex=0,!t.test(O(m++)))for(;m<d&&!t.test(O(m));)++m;var _=e.substring(c,c=m);return'"'!==_&&"'"!==_||(E=_),_}function C(e){g.push(e)}function b(){if(!g.length){var e=S();if(null===e)return null;C(e)}return g[0]}return Object.defineProperty({next:S,peek:b,push:C,skip:function(e,t){var r=b();if(r===e)return S(),!0;if(!t)throw y("token '"+r+"', '"+e+"' expected");return!1},cmnt:function(e){var t=null;return void 0===e?v===f-1&&(u||"*"===h||m)&&(t=_?p:null):(v<e&&b(),v!==e||m||!u&&"/"!==h||(t=_?null:p)),t}},"line",{get:function(){return f}})}d.unescape=l},537:function(e,t,r){"use strict";var n=r(550),i=r(4428),o=r(916).CONSTRUCTOR;e.exports=o||!i((function(e){n.all(e).then(void 0,(function(){}))}))},550:function(e,t,r){"use strict";var n=r(4576);e.exports=n.Promise},566:function(e,t,r){"use strict";var n=r(9504),i=r(9306),o=r(34),s=r(9297),a=r(7680),u=r(616),c=Function,l=n([].concat),d=n([].join),f={};e.exports=u?c.bind:function(e){var t=i(this),r=t.prototype,n=a(arguments,1),u=function(){var r=l(n,a(arguments));return this instanceof u?function(e,t,r){if(!s(f,t)){for(var n=[],i=0;i<t;i++)n[i]="a["+i+"]";f[t]=c("C,a","return new C("+d(n,",")+")")}return f[t](e,r)}(t,r.length,r):t.apply(e,r)};return o(r)&&(u.prototype=r),u}},589:function(e,t,r){"use strict";r.d(t,{V:function(){return o},v:function(){return s}}),r(9085);var n=r(7968),i=function(){return i=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},i.apply(this,arguments)};function o(e){try{var t=this._compressor;return t&&t.enableDownlinkCompression&&"string"!=typeof e.data?[i(i({},e),{data:t.decompress(e.data)}),!0]:[e,!0]}catch(t){return this._compressorFailureCount++,n.vF.error("decompress message error",t),n.vF.error("decompress failure times:",this._compressorFailureCount),this.sock.close(),[e,!1]}}function s(e){try{var t=this._compressor;return t&&t.enableUplinkCompression?[t.compress(e),!0]:[e,!0]}catch(t){return this._compressorFailureCount++,n.vF.error("compress message error",t),n.vF.error("compress failure times:",this._compressorFailureCount),this.sock.close(),[e,!1]}}},597:function(e,t,r){"use strict";var n=r(9039),i=r(8227),o=r(9519),s=i("species");e.exports=function(e){return o>=51||!n((function(){var t=[];return(t.constructor={})[s]=function(){return{foo:1}},1!==t[e](Boolean).foo}))}},616:function(e,t,r){"use strict";var n=r(9039);e.exports=!n((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")}))},655:function(e,t,r){"use strict";var n=r(6955),i=String;e.exports=function(e){if("Symbol"===n(e))throw new TypeError("Cannot convert a Symbol value to a string");return i(e)}},666:function(e,t,r){"use strict";var n,i;r.d(t,{J:function(){return i}}),function(e){e[e.OFFLINE=0]="OFFLINE",e[e.ONLINE=1]="ONLINE",e[e.UNKNOWN=2]="UNKNOWN",e[e.NONE=3]="NONE"}(n||(n={})),function(e){e[e.START=0]="START",e[e.START_AND_COMPLETED=1]="START_AND_COMPLETED",e[e.IN_PROGRESS=2]="IN_PROGRESS",e[e.COMPLETED=3]="COMPLETED",e[e.ERROR=4]="ERROR"}(i||(i={}))},679:function(e,t,r){"use strict";var n=r(1625),i=TypeError;e.exports=function(e,t){if(n(t,e))return e;throw new i("Incorrect invocation")}},686:function(e,t,r){"use strict";r.d(t,{Qv:function(){return n},s$:function(){return o},tx:function(){return i}});var n=720,i=.85;function o(e,t,r){var n=Math.min(e,t);if(n<=r)return{width:e,height:t};var i=r/n;return{width:Math.round(e*i),height:Math.round(t*i)}}},687:function(e,t,r){"use strict";var n=r(4913).f,i=r(9297),o=r(8227)("toStringTag");e.exports=function(e,t,r){e&&!r&&(e=e.prototype),e&&!i(e,o)&&n(e,o,{configurable:!0,value:t})}},707:function(e,t,r){"use strict";r.d(t,{r:function(){return i}});var n=r(4269),i=function(){function e(e){this.id=e.id,this.type=e.type}return e.prototype.set=function(e){this.body={id:this.id,ackId:e.ackId,type:"delivery",to:e.to,from:e.from||""}},e.create=function(e){return{id:n.Wp.getUniqueId(),ackId:e.ackId,type:"delivery",to:e.to,from:e.from||"",isChatThread:e.isChatThread,priority:e.priority,deliverOnlineOnly:e.deliverOnlineOnly}},e}()},739:function(e,t,r){"use strict";var n=r(6518),i=r(9039),o=r(8981),s=r(2777);n({target:"Date",proto:!0,arity:1,forced:i((function(){return null!==new Date(NaN).toJSON()||1!==Date.prototype.toJSON.call({toISOString:function(){return 1}})}))},{toJSON:function(e){var t=o(this),r=s(t,"number");return"number"!=typeof r||isFinite(r)?t.toISOString():null}})},741:function(e){"use strict";var t=Math.ceil,r=Math.floor;e.exports=Math.trunc||function(e){var n=+e;return(n>0?r:t)(n)}},744:function(e,t,r){"use strict";var n=t,i=r(5643),o=r(3262);function s(e,t,r,n){if(t.resolvedType)if(t.resolvedType instanceof i){e("switch(d%s){",n);for(var o=t.resolvedType.values,s=Object.keys(o),a=0;a<s.length;++a)t.repeated&&o[s[a]]===t.typeDefault&&e("default:"),e("case%j:",s[a])("case %i:",o[s[a]])("m%s=%j",n,o[s[a]])("break");e("}")}else e('if(typeof d%s!=="object")',n)("throw TypeError(%j)",t.fullName+": object expected")("m%s=types[%i].fromObject(d%s)",n,r,n);else{var u=!1;switch(t.type){case"double":case"float":e("m%s=Number(d%s)",n,n);break;case"uint32":case"fixed32":e("m%s=d%s>>>0",n,n);break;case"int32":case"sint32":case"sfixed32":e("m%s=d%s|0",n,n);break;case"uint64":u=!0;case"int64":case"sint64":case"fixed64":case"sfixed64":e("if(util.Long)")("(m%s=util.Long.fromValue(d%s)).unsigned=%j",n,n,u)('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,u?"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 a(e,t,r,n){if(t.resolvedType)t.resolvedType instanceof i?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 o=!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":o=!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,o?"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=o.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<t.length;++n){var a=t[n].resolve(),u=o.safeProp(a.name);a.map?(r("if(d%s){",u)('if(typeof d%s!=="object")',u)("throw TypeError(%j)",a.fullName+": object expected")("m%s={}",u)("for(var ks=Object.keys(d%s),i=0;i<ks.length;++i){",u),s(r,a,n,u+"[ks[i]]")("}")("}")):a.repeated?(r("if(d%s){",u)("if(!Array.isArray(d%s))",u)("throw TypeError(%j)",a.fullName+": array expected")("m%s=[]",u)("for(var i=0;i<d%s.length;++i){",u),s(r,a,n,u+"[i]")("}")("}")):(a.resolvedType instanceof i||r("if(d%s!=null){",u),s(r,a,n,u),a.resolvedType instanceof i||r("}"))}return r("return m")},n.toObject=function(e){var t=e.fieldsArray.slice().sort(o.compareFieldsById);if(!t.length)return o.codegen()("return {}");for(var r=o.codegen(["m","o"],e.name+"$toObject")("if(!o)")("o={}")("var d={}"),n=[],s=[],u=[],c=0;c<t.length;++c)t[c].partOf||(t[c].resolve().repeated?n:t[c].map?s:u).push(t[c]);if(n.length){for(r("if(o.arrays||o.defaults){"),c=0;c<n.length;++c)r("d%s=[]",o.safeProp(n[c].name));r("}")}if(s.length){for(r("if(o.objects||o.defaults){"),c=0;c<s.length;++c)r("d%s={}",o.safeProp(s[c].name));r("}")}if(u.length){for(r("if(o.defaults){"),c=0;c<u.length;++c){var l=u[c],d=o.safeProp(l.name);if(l.resolvedType instanceof i)r("d%s=o.enums===String?%j:%j",d,l.resolvedType.valuesById[l.typeDefault],l.typeDefault);else if(l.long)r("if(util.Long){")("var n=new util.Long(%i,%i,%j)",l.typeDefault.low,l.typeDefault.high,l.typeDefault.unsigned)("d%s=o.longs===String?n.toString():o.longs===Number?n.toNumber():n",d)("}else")("d%s=o.longs===String?%j:%i",d,l.typeDefault.toString(),l.typeDefault.toNumber());else if(l.bytes){var f="["+Array.prototype.slice.call(l.typeDefault).join(",")+"]";r("if(o.bytes===String)d%s=%j",d,String.fromCharCode.apply(String,l.typeDefault))("else{")("d%s=%s",d,f)("if(o.bytes!==Array)d%s=util.newBuffer(d%s)",d,d)("}")}else r("d%s=%j",d,l.typeDefault)}r("}")}var h=!1;for(c=0;c<t.length;++c){l=t[c];var p=e._fieldsArray.indexOf(l);d=o.safeProp(l.name),l.map?(h||(h=!0,r("var ks2")),r("if(m%s&&(ks2=Object.keys(m%s)).length){",d,d)("d%s={}",d)("for(var j=0;j<ks2.length;++j){"),a(r,l,p,d+"[ks2[j]]")("}")):l.repeated?(r("if(m%s&&m%s.length){",d,d)("d%s=[]",d)("for(var j=0;j<m%s.length;++j){",d),a(r,l,p,d+"[j]")("}")):(r("if(m%s!=null&&m.hasOwnProperty(%j)){",d,l.name),a(r,l,p,d),l.partOf&&r("if(o.oneofs)")("d%s=%j",o.safeProp(l.partOf.name),l.name)),r("}")}return r("return d")}},757:function(e,t,r){"use strict";var n=r(7751),i=r(4901),o=r(1625),s=r(7040),a=Object;e.exports=s?function(e){return"symbol"==typeof e}:function(e){var t=n("Symbol");return i(t)&&o(t.prototype,a(e))}},788:function(e,t,r){"use strict";var n=r(34),i=r(2195),o=r(8227)("match");e.exports=function(e){var t;return n(e)&&(void 0!==(t=e[o])?!!t:"RegExp"===i(e))}},810:function(e,t,r){"use strict";r.d(t,{f:function(){return i}}),r(9089);var n=r(4269),i=function(){function e(e){var t=e.type,r=e.id||n.Wp.getUniqueId();this.id=r,this.type=t}return e.prototype.set=function(e){e.file=e.file||e.fileInputId&&n.Wp.getFileUrl(e.fileInputId),this.body={id:this.id,chatType:e.chatType||"singleChat",type:"audio",file:e.file,filename:e.filename,length:e.length,file_length:e.file_length,fileInputId:e.fileInputId,to:e.to,from:e.from,roomType:e.roomType,success:e.success,fail:e.fail,ext:e.ext,time:Date.now(),onFileUploadError:e.onFileUploadError,onFileUploadComplete:e.onFileUploadComplete,onFileUploadProgress:e.onFileUploadProgress,body:e.body,isChatThread:e.isChatThread}},e.prototype.setChatType=function(e){return!!this.body&&(this.body.chatType=e,!0)},e.prototype.setGroup=function(e){return!!this.body&&(this.body.group=e,!0)},e.create=function(e){return{id:n.Wp.getUniqueId(),chatType:e.chatType,type:"audio",filename:e.filename,length:e.length,file:e.file,to:e.to,from:e.from||"",ext:e.ext,time:Date.now(),onFileUploadError:e.onFileUploadError,onFileUploadComplete:e.onFileUploadComplete,onFileUploadProgress:e.onFileUploadProgress,body:e.body,file_length:e.file_length,msgConfig:e.msgConfig,isChatThread:e.isChatThread,priority:e.priority,deliverOnlineOnly:e.deliverOnlineOnly,receiverList:e.receiverList,webhookEnv:e.webhookEnv}},e}()},818:function(e,t,r){"use strict";e.exports=o;var n=r(3449);(o.prototype=Object.create(n.prototype)).constructor=o;var i=r(3610);function o(){n.call(this)}function s(e,t,r){e.length<40?i.utf8.write(e,t,r):t.utf8Write?t.utf8Write(e,r):t.write(e,r)}o._configure=function(){o.alloc=i._Buffer_allocUnsafe,o.writeBytesBuffer=i.Buffer&&i.Buffer.prototype instanceof Uint8Array&&"set"===i.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<e.length;)t[r++]=e[n++]}},o.prototype.bytes=function(e){i.isString(e)&&(e=i._Buffer_from(e,"base64"));var t=e.length>>>0;return this.uint32(t),t&&this._push(o.writeBytesBuffer,t,e),this},o.prototype.string=function(e){var t=i.Buffer.byteLength(e);return this.uint32(t),t&&this._push(s,t,e),this},o._configure()},851:function(e,t,r){"use strict";var n=r(6955),i=r(5966),o=r(4117),s=r(6269),a=r(8227)("iterator");e.exports=function(e){if(!o(e))return i(e,a)||i(e,"@@iterator")||s[n(e)]}},859:function(e,t,r){"use strict";r.d(t,{a:function(){return i}}),r(9089);var n=r(4269),i=function(){function e(e){var t=e.type,r=e.id;this.id=r||n.Wp.getUniqueId(),this.type=t}return e.prototype.set=function(e){this.body={id:this.id,chatType:e.chatType||"singleChat",type:"loc",to:e.to,addr:e.addr,buildingName:e.buildingName,lat:e.lat,lng:e.lng,from:e.from,roomType:e.roomType,success:e.success,fail:e.fail,ext:e.ext,time:Date.now()}},e.prototype.setChatType=function(e){return!!this.body&&(this.body.chatType=e,!0)},e.prototype.setGroup=function(e){return!!this.body&&(this.body.group=e,!0)},e.create=function(e){return{id:n.Wp.getUniqueId(),chatType:e.chatType||"singleChat",type:"loc",to:e.to,addr:e.addr,buildingName:e.buildingName,lat:e.lat,lng:e.lng,from:e.from||"",ext:e.ext,time:Date.now(),msgConfig:e.msgConfig,isChatThread:e.isChatThread,priority:e.priority,deliverOnlineOnly:e.deliverOnlineOnly,receiverList:e.receiverList,webhookEnv:e.webhookEnv}},e}()},916:function(e,t,r){"use strict";var n=r(4576),i=r(550),o=r(4901),s=r(2796),a=r(3706),u=r(8227),c=r(4215),l=r(6395),d=r(9519),f=i&&i.prototype,h=u("species"),p=!1,v=o(n.PromiseRejectionEvent),m=s("Promise",(function(){var e=a(i),t=e!==String(i);if(!t&&66===d)return!0;if(l&&(!f.catch||!f.finally))return!0;if(!d||d<51||!/native code/.test(e)){var r=new i((function(e){e(1)})),n=function(e){e((function(){}),(function(){}))};if((r.constructor={})[h]=n,!(p=r.then((function(){}))instanceof n))return!0}return!(t||"BROWSER"!==c&&"DENO"!==c||v)}));e.exports={CONSTRUCTOR:m,REJECTION_EVENT:v,SUBCLASSING:p}},926:function(e,t,r){"use strict";var n=r(9306),i=r(8981),o=r(7055),s=r(6198),a=TypeError,u="Reduce of empty array with no initial value",c=function(e){return function(t,r,c,l){var d=i(t),f=o(d),h=s(d);if(n(r),0===h&&c<2)throw new a(u);var p=e?h-1:0,v=e?-1:1;if(c<2)for(;;){if(p in f){l=f[p],p+=v;break}if(p+=v,e?p<0:h<=p)throw new a(u)}for(;e?p>=0:h>p;p+=v)p in f&&(l=r(l,f[p],p,d));return l}};e.exports={left:c(!1),right:c(!0)}},1034:function(e,t,r){"use strict";var n=r(9565),i=r(9297),o=r(1625),s=r(7979),a=RegExp.prototype;e.exports=function(e){var t=e.flags;return void 0!==t||"flags"in a||i(e,"flags")||!o(a,e)?t:n(s,e)}},1072:function(e,t,r){"use strict";var n=r(1828),i=r(8727);e.exports=Object.keys||function(e){return n(e,i)}},1080:function(e,t,r){"use strict";e.exports=function(e){for(var t,r=o.codegen(["m","w"],e.name+"$encode")("if(!w)")("w=Writer.create()"),a=e.fieldsArray.slice().sort(o.compareFieldsById),u=0;u<a.length;++u){var c=a[u].resolve(),l=e._fieldsArray.indexOf(c),d=c.resolvedType instanceof n?"int32":c.type,f=i.basic[d];t="m"+o.safeProp(c.name),c.map?(r("if(%s!=null&&Object.hasOwnProperty.call(m,%j)){",t,c.name)("for(var ks=Object.keys(%s),i=0;i<ks.length;++i){",t)("w.uint32(%i).fork().uint32(%i).%s(ks[i])",(c.id<<3|2)>>>0,8|i.mapKey[c.keyType],c.keyType),void 0===f?r("types[%i].encode(%s[ks[i]],w.uint32(18).fork()).ldelim().ldelim()",l,t):r(".uint32(%i).%s(%s[ks[i]]).ldelim()",16|f,d,t),r("}")("}")):c.repeated?(r("if(%s!=null&&%s.length){",t,t),c.packed&&void 0!==i.packed[d]?r("w.uint32(%i).fork()",(c.id<<3|2)>>>0)("for(var i=0;i<%s.length;++i)",t)("w.%s(%s[i])",d,t)("w.ldelim()"):(r("for(var i=0;i<%s.length;++i)",t),void 0===f?s(r,c,l,t+"[i]"):r("w.uint32(%i).%s(%s[i])",(c.id<<3|f)>>>0,d,t)),r("}")):(c.optional&&r("if(%s!=null&&Object.hasOwnProperty.call(m,%j))",t,c.name),void 0===f?s(r,c,l,t):r("w.uint32(%i).%s(%s)",(c.id<<3|f)>>>0,d,t))}return r("return w")};var n=r(5643),i=r(361),o=r(3262);function s(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)}},1088:function(e,t,r){"use strict";var n=r(6518),i=r(9565),o=r(6395),s=r(350),a=r(4901),u=r(3994),c=r(2787),l=r(2967),d=r(687),f=r(6699),h=r(6840),p=r(8227),v=r(6269),m=r(7657),_=s.PROPER,g=s.CONFIGURABLE,E=m.IteratorPrototype,y=m.BUGGY_SAFARI_ITERATORS,O=p("iterator"),T="keys",R="values",I="entries",S=function(){return this};e.exports=function(e,t,r,s,p,m,C){u(r,t,s);var b,N,A,M=function(e){if(e===p&&D)return D;if(!y&&e&&e in U)return U[e];switch(e){case T:case R:case I:return function(){return new r(this,e)}}return function(){return new r(this)}},w=t+" Iterator",L=!1,U=e.prototype,x=U[O]||U["@@iterator"]||p&&U[p],D=!y&&x||M(p),P="Array"===t&&U.entries||x;if(P&&(b=c(P.call(new e)))!==Object.prototype&&b.next&&(o||c(b)===E||(l?l(b,E):a(b[O])||h(b,O,S)),d(b,w,!0,!0),o&&(v[w]=S)),_&&p===R&&x&&x.name!==R&&(!o&&g?f(U,"name",R):(L=!0,D=function(){return i(x,this)})),p)if(N={values:M(R),keys:m?D:M(T),entries:M(I)},C)for(A in N)(y||L||!(A in U))&&h(U,A,N[A]);else n({target:t,proto:!0,forced:y||L},N);return o&&!C||U[O]===D||h(U,O,D,{name:p}),v[t]=D,N}},1103:function(e){"use strict";e.exports=function(e){try{return{error:!1,value:e()}}catch(e){return{error:!0,value:e}}}},1108:function(e,t,r){"use strict";var n=r(6955);e.exports=function(e){var t=n(e);return"BigInt64Array"===t||"BigUint64Array"===t}},1156:function(e,t,r){"use strict";r.d(t,{A4:function(){return l},dO:function(){return u},fu:function(){return c}}),r(1629),r(4423),r(9432),r(6099),r(1699),r(3500);var n=r(8093),i=r(3484),o=r(7968);function s(){var e=this.context.appName,t=this.context.orgName;return!(!e||!t)||(this.onError&&this.onError({type:n.C.WEBIM_CONNCTION_AUTH_ERROR,message:"appName or orgName is illegal"}),!1)}function a(){var e,t=this.context.accessToken;if(!t){var r=i.A.create({type:n.C.WEBIM_CONNCTION_TOKEN_NOT_ASSIGN_ERROR,message:"token not assign error"});return o.vF.debug("token not assign error",t),this.onError&&this.onError(r),null===(e=this.eventHandler)||void 0===e||e.dispatch("onError",r),!1}return!0}function u(){if(this._initWithAppId){if(!s.call(this))return{error:i.A.create({type:n.C.WEBIM_CONNECTION_CLOSED,message:"not login"})};if(!a.call(this))return{error:i.A.create({type:n.C.WEBIM_CONNCTION_TOKEN_NOT_ASSIGN_ERROR,message:"token not assign error"})}}else if(!s.call(this)||!a.call(this))return{error:i.A.create({type:n.C.REST_PARAMS_STATUS,message:"appkey or token error"})};return{}}function c(e){var t=e.data,r=e.type;return{data:{status:Object.keys(t.errorKeys).length>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 o=t.errorKeys[e];r=o.includes("is not part of you")?i.A.create({type:n.C.NO_PERMISSION,message:o}):o.includes("size of metadata for this single chatroom exceeds the user defined limit")||o.includes("total size of chatroom metadata for this app exceeds the user defined limit")||o.includes("is exceeding maximum limit")?i.A.create({type:n.C.MAX_LIMIT,message:o}):o.includes("is not Legal")?i.A.create({type:n.C.REQUEST_PARAMETER_ERROR,message:o}):o.includes("Failed to update userMetadata. Concurrent updates not allowed")?i.A.create({type:n.C.OPERATION_NOT_ALLOWED,message:o}):i.A.create({type:n.C.WEBIM_CONNCTION_AJAX_ERROR,message:o})})),r}},1181:function(e,t,r){"use strict";var n,i,o,s=r(8622),a=r(4576),u=r(34),c=r(6699),l=r(9297),d=r(7629),f=r(6119),h=r(421),p="Object already initialized",v=a.TypeError,m=a.WeakMap;if(s||d.state){var _=d.state||(d.state=new m);_.get=_.get,_.has=_.has,_.set=_.set,n=function(e,t){if(_.has(e))throw new v(p);return t.facade=e,_.set(e,t),t},i=function(e){return _.get(e)||{}},o=function(e){return _.has(e)}}else{var g=f("state");h[g]=!0,n=function(e,t){if(l(e,g))throw new v(p);return t.facade=e,c(e,g,t),t},i=function(e){return l(e,g)?e[g]:{}},o=function(e){return l(e,g)}}e.exports={set:n,get:i,has:o,enforce:function(e){return o(e)?i(e):n(e,{})},getterFor:function(e){return function(t){var r;if(!u(t)||(r=i(t)).type!==e)throw new v("Incompatible receiver, "+e+" required");return r}}}},1240:function(e,t,r){"use strict";var n=r(9504);e.exports=n(1..valueOf)},1274:function(e,t,r){"use strict";var n;r.d(t,{q:function(){return n}}),function(e){e[e.CREATE=0]="CREATE",e[e.FAIL=1]="FAIL",e[e.INPROGRESS=2]="INPROGRESS",e[e.SUCCESS=3]="SUCCESS"}(n||(n={}))},1291:function(e,t,r){"use strict";var n=r(741);e.exports=function(e){var t=+e;return t!=t||0===t?0:n(t)}},1296:function(e,t,r){"use strict";var n=r(4495);e.exports=n&&!!Symbol.for&&!!Symbol.keyFor},1344:function(e,t,r){"use strict";e.exports=c;var n=r(7209);((c.prototype=Object.create(n.prototype)).constructor=c).className="Field";var i,o=r(5643),s=r(361),a=r(3262),u=/^required|optional|repeated$/;function c(e,t,r,i,o,c,l){if(a.isObject(i)?(l=o,c=i,i=o=void 0):a.isObject(o)&&(l=c,c=o,o=void 0),n.call(this,e,c),!a.isInteger(t)||t<0)throw TypeError("id must be a non-negative integer");if(!a.isString(r))throw TypeError("type must be a string");if(void 0!==i&&!u.test(i=i.toString().toLowerCase()))throw TypeError("rule must be a string rule");if(void 0!==o&&!a.isString(o))throw TypeError("extend must be a string");"proto3_optional"===i&&(i="optional"),this.rule=i&&"optional"!==i?i:void 0,this.type=r,this.id=t,this.extend=o||void 0,this.required="required"===i,this.optional=!this.required,this.repeated="repeated"===i,this.map=!1,this.message=null,this.partOf=null,this.typeDefault=null,this.defaultValue=null,this.long=!!a.Long&&void 0!==s.long[r],this.bytes="bytes"===r,this.resolvedType=null,this.extensionField=null,this.declaringField=null,this._packed=null,this.comment=l}c.fromJSON=function(e,t){return new c(e,t.id,t.type,t.rule,t.extend,t.options,t.comment)},Object.defineProperty(c.prototype,"packed",{get:function(){return null===this._packed&&(this._packed=!1!==this.getOption("packed")),this._packed}}),c.prototype.setOption=function(e,t,r){return"packed"===e&&(this._packed=null),n.prototype.setOption.call(this,e,t,r)},c.prototype.toJSON=function(e){var t=!!e&&Boolean(e.keepComments);return a.toObject(["rule","optional"!==this.rule&&this.rule||void 0,"type",this.type,"id",this.id,"extend",this.extend,"options",this.options,"comment",t?this.comment:void 0])},c.prototype.resolve=function(){if(this.resolved)return this;if(void 0===(this.typeDefault=s.defaults[this.type])&&(this.resolvedType=(this.declaringField?this.declaringField.parent:this.parent).lookupTypeOrEnum(this.type),this.resolvedType instanceof i?this.typeDefault=null:this.typeDefault=this.resolvedType.values[Object.keys(this.resolvedType.values)[0]]),this.options&&null!=this.options.default&&(this.typeDefault=this.options.default,this.resolvedType instanceof o&&"string"==typeof this.typeDefault&&(this.typeDefault=this.resolvedType.values[this.typeDefault])),this.options&&(!0!==this.options.packed&&(void 0===this.options.packed||!this.resolvedType||this.resolvedType instanceof o)||delete this.options.packed,Object.keys(this.options).length||(this.options=void 0)),this.long)this.typeDefault=a.Long.fromNumber(this.typeDefault,"u"===this.type.charAt(0)),Object.freeze&&Object.freeze(this.typeDefault);else if(this.bytes&&"string"==typeof this.typeDefault){var e;a.base64.test(this.typeDefault)?a.base64.decode(this.typeDefault,e=a.newBuffer(a.base64.length(this.typeDefault)),0):a.utf8.write(this.typeDefault,e=a.newBuffer(a.utf8.length(this.typeDefault)),0),this.typeDefault=e}return this.map?this.defaultValue=a.emptyObject:this.repeated?this.defaultValue=a.emptyArray:this.defaultValue=this.typeDefault,this.parent instanceof i&&(this.parent.ctor.prototype[this.name]=this.defaultValue),n.prototype.resolve.call(this)},c.d=function(e,t,r,n){return"function"==typeof t?t=a.decorateType(t).name:t&&"object"==typeof t&&(t=a.decorateEnum(t).name),function(i,o){a.decorateType(i.constructor).add(new c(o,e,t,r,{default:n}))}},c._configure=function(e){i=e}},1392:function(e,t,r){"use strict";var n,i=r(6518),o=r(7476),s=r(7347).f,a=r(8014),u=r(655),c=r(5749),l=r(7750),d=r(1436),f=r(6395),h=o("".slice),p=Math.min,v=d("startsWith");i({target:"String",proto:!0,forced:!(!f&&!v&&(n=s(String.prototype,"startsWith"),n&&!n.writable)||v)},{startsWith:function(e){var t=u(l(this));c(e);var r=a(p(arguments.length>1?arguments[1]:void 0,t.length)),n=u(e);return h(t,r,r+n.length)===n}})},1405:function(e,t,r){"use strict";var n=r(4576),i=r(8745),o=r(4644),s=r(9039),a=r(7680),u=n.Int8Array,c=o.aTypedArray,l=o.exportTypedArrayMethod,d=[].toLocaleString,f=!!u&&s((function(){d.call(new u(1))}));l("toLocaleString",(function(){return i(d,f?a(c(this)):c(this),a(arguments))}),s((function(){return[1,2].toLocaleString()!==new u([1,2]).toLocaleString()}))||!s((function(){u.prototype.toLocaleString.call([1,2])})))},1408:function(e,t,r){"use strict";r(1629),r(4423),r(2010),r(2892),r(9085),r(9432),r(6099),r(3500);var n=r(7968),i=function(){return i=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},i.apply(this,arguments)},o=["public","members_only","allow_user_invites","invite_need_confirm"],s={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",avatar:"avatar"};function a(e,t){var r,n,a,u,c,l,d=this,f=this.context,h=f.userId,p=f.jid,v=t.from.name===h&&p.clientResource!==t.from.clientResource;return t.isThread?(a={id:t.mucId.name,name:t.mucName,operation:"",parentId:t.mucParentId.name,operator:t.from.name,userName:t.to.length?t.to[0].name:""},u={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},c={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)&&(l=JSON.parse(t.eventInfo.ext))),({45:function(){var e,r,n;c.operation="memberAttributesUpdate";var i=JSON.parse(null===(e=null==t?void 0:t.eventInfo)||void 0===e?void 0:e.ext)||{};c.attributes=i.properties||{},c.userId=i.username||"",v?null===(r=d.eventHandler)||void 0===r||r.dispatch("onMultiDeviceEvent",c):null===(n=d.eventHandler)||void 0===n||n.dispatch("onGroupEvent",c)},44:function(){var e;c.operation="removeChatRoomAttributes",c.attributes=l.result.successKeys,l.result.successKeys.length>0&&(null===(e=d.eventHandler)||void 0===e||e.dispatch("onChatroomEvent",c))},43:function(){var e;c.operation="updateChatRoomAttributes";var t={};l.result.successKeys.forEach((function(e){t[e]=l.properties[e]})),c.attributes=t,l.result.successKeys.length>0&&(null===(e=d.eventHandler)||void 0===e||e.dispatch("onChatroomEvent",c))},42:function(){},41:function(){},40:function(){},39:function(){},38:function(){var e;u.operation="chatThreadNameUpdate",null===(e=d.eventHandler)||void 0===e||e.dispatch("onMultiDeviceEvent",u)},37:function(){var e;a.operation="userRemove",null===(e=d.eventHandler)||void 0===e||e.dispatch("onChatThreadChange",a)},36:function(){var e;u.operation="chatThreadLeave",null===(e=d.eventHandler)||void 0===e||e.dispatch("onMultiDeviceEvent",u)},35:function(){var e;u.operation="chatThreadJoin",null===(e=d.eventHandler)||void 0===e||e.dispatch("onMultiDeviceEvent",u)},34:function(){var e;u.operation="chatThreadDestroy",null===(e=d.eventHandler)||void 0===e||e.dispatch("onMultiDeviceEvent",u)},33:function(){var e;u.operation="chatThreadCreate",null===(e=d.eventHandler)||void 0===e||e.dispatch("onMultiDeviceEvent",u)},32:function(){var e,r,i,o;n.type=t.isChatroom?"rmChatRoomMute":"rmGroupMute",d.onPresence&&d.onPresence(n),t.isChatroom?null===(e=d.eventHandler)||void 0===e||e.dispatch("onChatroomChange",n):null===(r=d.eventHandler)||void 0===r||r.dispatch("onGroupChange",n),c.operation="unmuteAllMembers",t.isChatroom?null===(i=d.eventHandler)||void 0===i||i.dispatch("onChatroomEvent",c):null===(o=d.eventHandler)||void 0===o||o.dispatch("onGroupEvent",c)},31:function(){var e,r,i,o;n.type=t.isChatroom?"muteChatRoom":"muteGroup",d.onPresence&&d.onPresence(n),t.isChatroom?null===(e=d.eventHandler)||void 0===e||e.dispatch("onChatroomChange",n):null===(r=d.eventHandler)||void 0===r||r.dispatch("onGroupChange",n),c.operation="muteAllMembers",t.isChatroom?null===(i=d.eventHandler)||void 0===i||i.dispatch("onChatroomEvent",c):null===(o=d.eventHandler)||void 0===o||o.dispatch("onGroupEvent",c)},30:function(){var e,r,i,o;n.type=t.isChatroom?"rmUserFromChatRoomWhiteList":"rmUserFromGroupWhiteList",d.onPresence&&d.onPresence(n),t.isChatroom?null===(e=d.eventHandler)||void 0===e||e.dispatch("onChatroomChange",n):null===(r=d.eventHandler)||void 0===r||r.dispatch("onGroupChange",n),c.operation="removeAllowlistMember",c.userId=n.to,t.isChatroom?null===(i=d.eventHandler)||void 0===i||i.dispatch("onChatroomEvent",c):null===(o=d.eventHandler)||void 0===o||o.dispatch("onGroupEvent",c)},29:function(){var e,r,i,o;n.type=t.isChatroom?"addUserToChatRoomWhiteList":"addUserToGroupWhiteList",d.onPresence&&d.onPresence(n),t.isChatroom?null===(e=d.eventHandler)||void 0===e||e.dispatch("onChatroomChange",n):null===(r=d.eventHandler)||void 0===r||r.dispatch("onGroupChange",n),c.operation="addUserToAllowlist",c.userId=n.to,t.isChatroom?null===(i=d.eventHandler)||void 0===i||i.dispatch("onChatroomEvent",c):null===(o=d.eventHandler)||void 0===o||o.dispatch("onGroupEvent",c)},28:function(){var e,r,i,o;n.type="deleteFile",d.onPresence&&d.onPresence(n),t.isChatroom?null===(e=d.eventHandler)||void 0===e||e.dispatch("onChatroomChange",n):null===(r=d.eventHandler)||void 0===r||r.dispatch("onGroupChange",n),c.operation="deleteFile",t.isChatroom?null===(i=d.eventHandler)||void 0===i||i.dispatch("onChatroomEvent",c):null===(o=d.eventHandler)||void 0===o||o.dispatch("onGroupEvent",c)},27:function(){var e,r,i,o;n.type="uploadFile",d.onPresence&&d.onPresence(n),t.isChatroom?null===(e=d.eventHandler)||void 0===e||e.dispatch("onChatroomChange",n):null===(r=d.eventHandler)||void 0===r||r.dispatch("onGroupChange",n),c.operation="uploadFile",t.isChatroom?null===(i=d.eventHandler)||void 0===i||i.dispatch("onChatroomEvent",c):null===(o=d.eventHandler)||void 0===o||o.dispatch("onGroupEvent",c)},26:function(){var e,r,i,o;n.type="deleteAnnouncement",d.onPresence&&d.onPresence(n),t.isChatroom?null===(e=d.eventHandler)||void 0===e||e.dispatch("onChatroomChange",n):null===(r=d.eventHandler)||void 0===r||r.dispatch("onGroupChange",n),c.operation="deleteAnnouncement",t.isChatroom?null===(i=d.eventHandler)||void 0===i||i.dispatch("onChatroomEvent",c):null===(o=d.eventHandler)||void 0===o||o.dispatch("onGroupEvent",c)},25:function(){var e,r,i,o;n.type="updateAnnouncement",n.announcement=t.reason,d.onPresence&&d.onPresence(n),t.isChatroom?null===(e=d.eventHandler)||void 0===e||e.dispatch("onChatroomChange",n):null===(r=d.eventHandler)||void 0===r||r.dispatch("onGroupChange",n),c.operation="updateAnnouncement",c.announcement=t.reason,t.isChatroom?null===(i=d.eventHandler)||void 0===i||i.dispatch("onChatroomEvent",c):null===(o=d.eventHandler)||void 0===o||o.dispatch("onGroupEvent",c)},24:function(){var e,r,i,o;n.type="removeMute",d.onPresence&&d.onPresence(n),t.isChatroom?null===(e=d.eventHandler)||void 0===e||e.dispatch("onChatroomChange",n):null===(r=d.eventHandler)||void 0===r||r.dispatch("onGroupChange",n),c.operation="unmuteMember",c.userId=n.to,t.isChatroom?null===(i=d.eventHandler)||void 0===i||i.dispatch("onChatroomEvent",c):null===(o=d.eventHandler)||void 0===o||o.dispatch("onGroupEvent",c)},23:function(){var e,r,i,o;if(n.type="addMute",d.onPresence&&d.onPresence(n),t.ext&&"string"==typeof t.ext){var s=JSON.parse(t.ext);s.user_mute_time&&(n.muteTimestamp=s.user_mute_time,c.muteTimestamp=s.user_mute_time)}t.isChatroom?null===(e=d.eventHandler)||void 0===e||e.dispatch("onChatroomChange",n):null===(r=d.eventHandler)||void 0===r||r.dispatch("onGroupChange",n),c.operation="muteMember",c.userId=n.to,t.isChatroom?null===(i=d.eventHandler)||void 0===i||i.dispatch("onChatroomEvent",c):null===(o=d.eventHandler)||void 0===o||o.dispatch("onGroupEvent",c)},22:function(){var e,r,i,o;n.type="removeAdmin",d.onPresence&&d.onPresence(n),t.isChatroom?null===(e=d.eventHandler)||void 0===e||e.dispatch("onChatroomChange",n):null===(r=d.eventHandler)||void 0===r||r.dispatch("onGroupChange",n),c.operation="removeAdmin",t.isChatroom?null===(i=d.eventHandler)||void 0===i||i.dispatch("onChatroomEvent",c):null===(o=d.eventHandler)||void 0===o||o.dispatch("onGroupEvent",c)},21:function(){var e,r,i,o;n.type="addAdmin",d.onPresence&&d.onPresence(n),t.isChatroom?null===(e=d.eventHandler)||void 0===e||e.dispatch("onChatroomChange",n):null===(r=d.eventHandler)||void 0===r||r.dispatch("onGroupChange",n),c.operation="setAdmin",c.userId=n.to,t.isChatroom?null===(i=d.eventHandler)||void 0===i||i.dispatch("onChatroomEvent",c):null===(o=d.eventHandler)||void 0===o||o.dispatch("onGroupEvent",c)},20:function(){var e,r,i,o;n.type="changeOwner",d.onPresence&&d.onPresence(n),t.isChatroom?null===(e=d.eventHandler)||void 0===e||e.dispatch("onChatroomChange",n):null===(r=d.eventHandler)||void 0===r||r.dispatch("onGroupChange",n),c.operation="changeOwner",t.isChatroom?null===(i=d.eventHandler)||void 0===i||i.dispatch("onChatroomEvent",c):null===(o=d.eventHandler)||void 0===o||o.dispatch("onGroupEvent",c)},19:function(){var e,r,i,o;n.type="direct_joined",n.groupName=t.mucName,d.onPresence&&d.onPresence(n),t.isChatroom?null===(e=d.eventHandler)||void 0===e||e.dispatch("onChatroomChange",n):null===(r=d.eventHandler)||void 0===r||r.dispatch("onGroupChange",n),c.operation="directJoined",c.name=t.mucName,t.isChatroom?null===(i=d.eventHandler)||void 0===i||i.dispatch("onChatroomEvent",c):null===(o=d.eventHandler)||void 0===o||o.dispatch("onGroupEvent",c)},18:function(){var e,r,o,s,a;n.type=t.isChatroom?"leaveChatRoom":"leaveGroup",d.onPresence&&d.onPresence(n),t.isChatroom?null===(e=d.eventHandler)||void 0===e||e.dispatch("onChatroomChange",n):null===(r=d.eventHandler)||void 0===r||r.dispatch("onGroupChange",n);var u=t.mucMemberCount;if(u&&(c.memberCount=u),c.operation="memberAbsence",t.members&&t.members.length>0){var l=i({},c);l.members=t.members,l.operation="membersAbsence",delete l.from,t.isChatroom?t.members.forEach((function(e){var t;null===(t=d.eventHandler)||void 0===t||t.dispatch("onChatroomEvent",i(i({},c),{from:e}))})):null===(o=d.eventHandler)||void 0===o||o.dispatch("onGroupEvent",l)}else t.isChatroom?null===(s=d.eventHandler)||void 0===s||s.dispatch("onChatroomEvent",c):null===(a=d.eventHandler)||void 0===a||a.dispatch("onGroupEvent",c)},17:function(){var e,r,o,s,a;t.isChatroom&&t.ext&&(c.ext=t.ext,n.ext=t.ext),n.type=t.isChatroom?"memberJoinChatRoomSuccess":"memberJoinPublicGroupSuccess",d.onPresence&&d.onPresence(n),t.isChatroom?null===(e=d.eventHandler)||void 0===e||e.dispatch("onChatroomChange",n):null===(r=d.eventHandler)||void 0===r||r.dispatch("onGroupChange",n);var u=t.mucMemberCount;if(c.operation="memberPresence",u&&(c.memberCount=u),t.members&&t.members.length>0){var l=i({},c);l.members=t.members,l.operation="membersPresence",delete l.from,t.isChatroom?t.members.forEach((function(e){var t;null===(t=d.eventHandler)||void 0===t||t.dispatch("onChatroomEvent",i(i({},c),{from:e}))})):null===(o=d.eventHandler)||void 0===o||o.dispatch("onGroupEvent",l)}else t.isChatroom?null===(s=d.eventHandler)||void 0===s||s.dispatch("onChatroomEvent",c):null===(a=d.eventHandler)||void 0===a||a.dispatch("onGroupEvent",c)},16:function(){var e,r;n.type="unblock",d.onPresence&&d.onPresence(n),t.isChatroom?null===(e=d.eventHandler)||void 0===e||e.dispatch("onChatroomChange",n):null===(r=d.eventHandler)||void 0===r||r.dispatch("onGroupChange",n)},15:function(){var e,r;n.type="block",d.onPresence&&d.onPresence(n),t.isChatroom?null===(e=d.eventHandler)||void 0===e||e.dispatch("onChatroomChange",n):null===(r=d.eventHandler)||void 0===r||r.dispatch("onGroupChange",n)},14:function(){var e,r,i,a,u,l=t.isChatroom;if(!l){var f=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):o.includes(e)?"true"===t||!0===t:t}));c.detail=n.detail={},Object.keys(f).forEach((function(e){var t=s[e];if(t){var r=f[e];c.detail&&(c.detail[t]=r),n.detail&&(n.detail[t]=r)}}))}n.type="update",d.onPresence&&d.onPresence(n),l?null===(r=d.eventHandler)||void 0===r||r.dispatch("onChatroomChange",n):null===(i=d.eventHandler)||void 0===i||i.dispatch("onGroupChange",n),c.operation="updateInfo",l?null===(a=d.eventHandler)||void 0===a||a.dispatch("onChatroomEvent",c):null===(u=d.eventHandler)||void 0===u||u.dispatch("onGroupEvent",c)},13:function(){var e,r,i,o;n.type="allow",n.reason=t.reason,d.onPresence&&d.onPresence(n),t.isChatroom?null===(e=d.eventHandler)||void 0===e||e.dispatch("onChatroomChange",n):null===(r=d.eventHandler)||void 0===r||r.dispatch("onGroupChange",n),t.reason&&(c.reason=t.reason),c.operation="unblockMember",t.isChatroom?null===(i=d.eventHandler)||void 0===i||i.dispatch("onChatroomEvent",c):null===(o=d.eventHandler)||void 0===o||o.dispatch("onGroupEvent",c)},12:function(){var e,r;n.type="ban",d.onPresence&&d.onPresence(n),t.isChatroom?null===(e=d.eventHandler)||void 0===e||e.dispatch("onChatroomChange",n):null===(r=d.eventHandler)||void 0===r||r.dispatch("onGroupChange",n)},11:function(){var e,r;n.type="getBlackList",d.onPresence&&d.onPresence(n),t.isChatroom?null===(e=d.eventHandler)||void 0===e||e.dispatch("onChatroomChange",n):null===(r=d.eventHandler)||void 0===r||r.dispatch("onGroupChange",n)},10:function(){var e,r,i,o;n.type="removedFromGroup",n.kicked=n.to,d.onPresence&&d.onPresence(n),t.isChatroom?null===(e=d.eventHandler)||void 0===e||e.dispatch("onChatroomChange",n):null===(r=d.eventHandler)||void 0===r||r.dispatch("onGroupChange",n),c.operation="removeMember",t.isChatroom?null===(i=d.eventHandler)||void 0===i||i.dispatch("onChatroomEvent",c):null===(o=d.eventHandler)||void 0===o||o.dispatch("onGroupEvent",c)},9:function(){var e,r,i,o;n.type="invite_decline",n.kicked=n.to,d.onPresence&&d.onPresence(n),t.isChatroom?null===(e=d.eventHandler)||void 0===e||e.dispatch("onChatroomChange",n):null===(r=d.eventHandler)||void 0===r||r.dispatch("onGroupChange",n),c.operation="rejectInvite",t.isChatroom?null===(i=d.eventHandler)||void 0===i||i.dispatch("onChatroomEvent",c):null===(o=d.eventHandler)||void 0===o||o.dispatch("onGroupEvent",c)},8:function(){var e,r,i,o;n.type="invite_accept",n.kicked=n.to,d.onPresence&&d.onPresence(n),t.isChatroom?null===(e=d.eventHandler)||void 0===e||e.dispatch("onChatroomChange",n):null===(r=d.eventHandler)||void 0===r||r.dispatch("onGroupChange",n),c.operation="acceptInvite",t.isChatroom?null===(i=d.eventHandler)||void 0===i||i.dispatch("onChatroomEvent",c):null===(o=d.eventHandler)||void 0===o||o.dispatch("onGroupEvent",c)},7:function(){var e,r,i,o;n.type="invite",n.kicked=n.to,n.groupName=t.mucName,d.onPresence&&d.onPresence(n),t.isChatroom?null===(e=d.eventHandler)||void 0===e||e.dispatch("onChatroomChange",n):null===(r=d.eventHandler)||void 0===r||r.dispatch("onGroupChange",n),c.operation="inviteToJoin",c.name=t.mucName,t.isChatroom?null===(i=d.eventHandler)||void 0===i||i.dispatch("onChatroomEvent",c):null===(o=d.eventHandler)||void 0===o||o.dispatch("onGroupEvent",c)},6:function(){var e,r,i,o;n.type="joinPublicGroupDeclined",d.onPresence&&d.onPresence(n),t.isChatroom?null===(e=d.eventHandler)||void 0===e||e.dispatch("onChatroomChange",n):null===(r=d.eventHandler)||void 0===r||r.dispatch("onGroupChange",n),c.operation="joinPublicGroupDeclined",t.isChatroom?null===(i=d.eventHandler)||void 0===i||i.dispatch("onChatroomEvent",c):(c.userId=t.to.length?t.to[0].name:"",null===(o=d.eventHandler)||void 0===o||o.dispatch("onGroupEvent",c))},5:function(){var e,r,i,o;n.type="joinPublicGroupSuccess",d.onPresence&&d.onPresence(n),t.isChatroom?null===(e=d.eventHandler)||void 0===e||e.dispatch("onChatroomChange",n):null===(r=d.eventHandler)||void 0===r||r.dispatch("onGroupChange",n),c.operation="acceptRequest",t.isChatroom?null===(i=d.eventHandler)||void 0===i||i.dispatch("onChatroomEvent",c):null===(o=d.eventHandler)||void 0===o||o.dispatch("onGroupEvent",c)},4:function(){var e,r,i,o;n.type="joinGroupNotifications",n.reason=t.reason,d.onPresence&&d.onPresence(n),t.isChatroom?null===(e=d.eventHandler)||void 0===e||e.dispatch("onChatroomChange",n):null===(r=d.eventHandler)||void 0===r||r.dispatch("onGroupChange",n),t.reason&&(c.reason=t.reason),c.operation="requestToJoin",t.isChatroom?null===(i=d.eventHandler)||void 0===i||i.dispatch("onChatroomEvent",c):null===(o=d.eventHandler)||void 0===o||o.dispatch("onGroupEvent",c)},3:function(){var e,r;n.type="leave",d.onPresence&&d.onPresence(n),t.isChatroom?null===(e=d.eventHandler)||void 0===e||e.dispatch("onChatroomChange",n):null===(r=d.eventHandler)||void 0===r||r.dispatch("onGroupChange",n)},2:function(){var e,r;n.type="join",d.onPresence&&d.onPresence(n),t.isChatroom?null===(e=d.eventHandler)||void 0===e||e.dispatch("onChatroomChange",n):null===(r=d.eventHandler)||void 0===r||r.dispatch("onGroupChange",n)},1:function(){var e,r,i,o;n.type="deleteGroupChat",d.onPresence&&d.onPresence(n),t.isChatroom?null===(e=d.eventHandler)||void 0===e||e.dispatch("onChatroomChange",n):null===(r=d.eventHandler)||void 0===r||r.dispatch("onGroupChange",n),c.operation="destroy",t.isChatroom?null===(i=d.eventHandler)||void 0===i||i.dispatch("onChatroomEvent",c):null===(o=d.eventHandler)||void 0===o||o.dispatch("onGroupEvent",c)},0:function(){var e,r;c.operation="create",t.isChatroom?null===(e=d.eventHandler)||void 0===e||e.dispatch("onChatroomEvent",c):null===(r=d.eventHandler)||void 0===r||r.dispatch("onGroupEvent",c)}}[e]||function(){console.error("No match operation ".concat(e))})()}t.A=function(e){var t=this.root.lookup("easemob.pb.MUCBody").decode(e.payload),r=t.operation;n.vF.debug("onMucMessage",t),a.call(this,r,t)}},1415:function(e,t,r){"use strict";r(2405)},1436:function(e,t,r){"use strict";var n=r(8227)("match");e.exports=function(e){var t=/./;try{"/./"[e](t)}catch(r){try{return t[n]=!1,"/./"[e](t)}catch(e){}}return!1}},1447:function(e,t){"use strict";var r=t;r.length=function(e){for(var t=0,r=0,n=0;n<e.length;++n)(r=e.charCodeAt(n))<128?t+=1:r<2048?t+=2:55296==(64512&r)&&56320==(64512&e.charCodeAt(n+1))?(++n,t+=4):t+=3;return t},r.read=function(e,t,r){if(r-t<1)return"";for(var n,i=null,o=[],s=0;t<r;)(n=e[t++])<128?o[s++]=n:n>191&&n<224?o[s++]=(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,o[s++]=55296+(n>>10),o[s++]=56320+(1023&n)):o[s++]=(15&n)<<12|(63&e[t++])<<6|63&e[t++],s>8191&&((i||(i=[])).push(String.fromCharCode.apply(String,o)),s=0);return i?(s&&i.push(String.fromCharCode.apply(String,o.slice(0,s))),i.join("")):String.fromCharCode.apply(String,o.slice(0,s))},r.write=function(e,t,r){for(var n,i,o=r,s=0;s<e.length;++s)(n=e.charCodeAt(s))<128?t[r++]=n:n<2048?(t[r++]=n>>6|192,t[r++]=63&n|128):55296==(64512&n)&&56320==(64512&(i=e.charCodeAt(s+1)))?(n=65536+((1023&n)<<10)+(1023&i),++s,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-o}},1457:function(e,t,r){"use strict";e.exports=s;var n=r(7209);((s.prototype=Object.create(n.prototype)).constructor=s).className="OneOf";var i=r(1344),o=r(3262);function s(e,t,r,i){if(Array.isArray(t)||(r=t,t=void 0),n.call(this,e,r),void 0!==t&&!Array.isArray(t))throw TypeError("fieldNames must be an Array");this.oneof=t||[],this.fieldsArray=[],this.comment=i}function a(e){if(e.parent)for(var t=0;t<e.fieldsArray.length;++t)e.fieldsArray[t].parent||e.parent.add(e.fieldsArray[t])}s.fromJSON=function(e,t){return new s(e,t.oneof,t.options,t.comment)},s.prototype.toJSON=function(e){var t=!!e&&Boolean(e.keepComments);return o.toObject(["options",this.options,"oneof",this.oneof,"comment",t?this.comment:void 0])},s.prototype.add=function(e){if(!(e instanceof i))throw TypeError("field must be a Field");return e.parent&&e.parent!==this.parent&&e.parent.remove(e),this.oneof.push(e.name),this.fieldsArray.push(e),e.partOf=this,a(this),this},s.prototype.remove=function(e){if(!(e instanceof i))throw TypeError("field must be a Field");var t=this.fieldsArray.indexOf(e);if(t<0)throw Error(e+" is not a member of "+this);return this.fieldsArray.splice(t,1),(t=this.oneof.indexOf(e.name))>-1&&this.oneof.splice(t,1),e.partOf=null,this},s.prototype.onAdd=function(e){n.prototype.onAdd.call(this,e);for(var t=0;t<this.oneof.length;++t){var r=e.get(this.oneof[t]);r&&!r.partOf&&(r.partOf=this,this.fieldsArray.push(r))}a(this)},s.prototype.onRemove=function(e){for(var t,r=0;r<this.fieldsArray.length;++r)(t=this.fieldsArray[r]).parent&&t.parent.remove(t);n.prototype.onRemove.call(this,e)},s.d=function(){for(var e=new Array(arguments.length),t=0;t<arguments.length;)e[t]=arguments[t++];return function(t,r){o.decorateType(t.constructor).add(new s(r,e)),Object.defineProperty(t,r,{get:o.oneOfGetter(e),set:o.oneOfSetter(e)})}}},1469:function(e,t,r){"use strict";var n=r(7433);e.exports=function(e,t){return new(n(e))(0===t?0:t)}},1481:function(e,t,r){"use strict";var n=r(6518),i=r(6043);n({target:"Promise",stat:!0,forced:r(916).CONSTRUCTOR},{reject:function(e){var t=i.f(this);return(0,t.reject)(e),t.promise}})},1487:function(e,t,r){"use strict";r(2675),r(9463),r(2259),r(8980),r(3792),r(2712),r(4782),r(4554),r(6099),r(3362),r(7764),r(2953);var n=r(8093),i=r(7968),o=r(8288),s=r(3603),a=r(7507),u=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function s(e){try{u(n.next(e))}catch(e){o(e)}}function a(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}u((n=n.apply(e,t||[])).next())}))},c=function(e,t){var r,n,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;s;)try{if(r=1,n&&(i=2&o[0]?n.return:o[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,o[1])).done)return i;switch(n=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,n=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],n=0}finally{r=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}},l=function(){function e(e,t){var r=this;this.handleUploadProgress=function(e,t){var n,i;if(e.total){r.progressArr[t]=e.loaded;var o=r.progressArr.reduce((function(e,t){return e+t}),0);null===(i=(n=r.options).onFileUploadProgress)||void 0===i||i.call(n,{isTrusted:e.isTrusted,type:e.type,loaded:o>r.file.size?r.file.size:o,total:r.file.size,lengthComputable:e.lengthComputable})}},this.uuid="",this.pool=[],this.progressArr=[],this.connection=e,this.options=t,this.partSize=o.El,this.file=t.file,this.init(),this.rpt=this.connection.dataReport.geOperateFun({operationName:s.jz.REST_UPLOAD_FILE_IN_PARTS})}return e.prototype.init=function(){var e,t,r,l;return u(this,void 0,void 0,(function(){var u,d,f,h,p,v,m,_,g,E,y,O,T,R,I;return c(this,(function(c){switch(c.label){case 0:return c.trys.push([0,4,,6]),[4,a.v7.call(this.connection)];case 1:return u=c.sent(),d=u.data||{},f=d.fileMaxSize,h=void 0===f?0:f,p=d.partMinSize,v=void 0===p?o.El:p,m=d.uuid,_=void 0===m?"":m,g=u.extraInfo,O=g.elapse,T=g.httpCode,I=g.url,this.partSize=v,this.uuid=_,o.aI.size=v,i.vF.debug("multipartInit success","uuid: ".concat(_),"fileMaxSize: ".concat(h),"partMinSize: ".concat(v)),this.file.size>h?[4,this.multipartAbort()]:[3,3];case 2:return c.sent(),null===(t=(e=this.options).onFileUploadError)||void 0===t||t.call(e,{code:n.C.WEBIM_UPLOADFILE_ERROR,message:"The file size exceeds the maximum limit"}),[2];case 3:return this.rpt({data:{requestUrl:I,requestName:s.TT.REST_INIT_UPLOAD_TASK_IN_PARTS,requestElapse:O,requestMethod:"POST",isSuccess:1,code:T}}),this.upload(),[3,6];case 4:return E=c.sent(),y=(null==E?void 0:E.extraInfo)||{},O=y.elapse,T=y.httpCode,R=y.errDesc,I=y.url,this.rpt({data:{requestUrl:I,requestName:s.TT.REST_INIT_UPLOAD_TASK_IN_PARTS,requestElapse:O,requestMethod:"POST",isSuccess:0,codeDesc:R,code:T}}),[4,this.multipartAbort()];case 5:return c.sent(),null===(l=null===(r=this.options)||void 0===r?void 0:r.onInitFail)||void 0===l||l.call(r),[3,6];case 6:return[2]}}))}))},e.prototype.upload=function(){var e,t,r;return u(this,void 0,void 0,(function(){var n,i,u,l,d,f,h=this;return c(this,(function(p){switch(p.label){case 0:(new FileReader).readAsArrayBuffer(this.file),n=this.file.size,i=Math.ceil(n/this.partSize),p.label=1;case 1:p.trys.push([1,7,,9]),u=function(t){var r,i,u,d;return c(this,(function(c){switch(c.label){case 0:return r=t*l.partSize,i=Math.min(n,r+l.partSize),u=null===(e=l.file)||void 0===e?void 0:e.slice(r,i),(d=a.mr.call(l.connection,{uuid:l.uuid,partNumber:"".concat(t+1),part:u,onProgress:function(e){h.handleUploadProgress(e,t)}})).then((function(e){var t=(null==e?void 0:e.extraInfo)||{},r=t.elapse,n=t.httpCode,i=t.url;h.rpt({data:{requestUrl:i,requestName:s.TT.REST_UPLOAD_PART,requestElapse:r,isSuccess:1,requestMethod:"PUT",code:n}}),h.handleTask(d)})),d.catch((function(e){var t=(null==e?void 0:e.extraInfo)||{},r=t.elapse,n=t.httpCode,i=t.url,o=t.errDesc;h.rpt({data:{requestUrl:i,requestName:s.TT.REST_UPLOAD_PART,requestElapse:r,isSuccess:0,requestMethod:"PUT",code:n,codeDesc:o}}),delete e.extraInfo})),l.pool.push(d),l.pool.length!==o.UJ?[3,2]:[4,Promise.race(l.pool)];case 1:c.sent(),c.label=2;case 2:return[2]}}))},l=this,d=0,p.label=2;case 2:return d<i?[5,u(d)]:[3,5];case 3:p.sent(),p.label=4;case 4:return d++,[3,2];case 5:return[4,Promise.all(this.pool)];case 6:return p.sent(),this.multipartComplete(),[3,9];case 7:return f=p.sent(),[4,this.multipartAbort()];case 8:return p.sent(),this.rpt({data:{isLastApi:1,isSuccess:0}}),null===(r=(t=this.options).onFileUploadError)||void 0===r||r.call(t,f),[3,9];case 9:return[2]}}))}))},e.prototype.multipartComplete=function(){var e,t,r,n;return u(this,void 0,void 0,(function(){var i,o,u,l,d,f,h,p,v,m,_;return c(this,(function(c){switch(c.label){case 0:return c.trys.push([0,2,,3]),i=this.options.thumbnailInfo||{},o=i.width,u=i.height,[4,a.iK.call(this.connection,{uuid:this.uuid,thumbnailHeight:u,thumbnailWidth:o,conversationInfo:this.options.conversationInfo,uploadMd5:this.options.uploadMd5,uploadImageType:this.options.uploadImageType,imageWidth:this.options.imageWidth,imageHeight:this.options.imageHeight})];case 1:return l=c.sent(),d=(null==l?void 0:l.extraInfo)||{},p=d.elapse,v=d.httpCode,_=d.url,this.rpt({data:{requestUrl:_,requestName:s.TT.REST_COMPLETE_UPLOAD_PART,requestElapse:p,requestMethod:"POST",isSuccess:1,code:v}}),this.rpt({data:{isLastApi:1,isSuccess:1}}),null===(t=(e=this.options).onFileUploadComplete)||void 0===t||t.call(e,l),[3,3];case 2:return f=c.sent(),h=(null==f?void 0:f.extraInfo)||{},p=h.elapse,v=h.httpCode,m=h.errDesc,_=h.url,this.rpt({data:{requestUrl:_,requestName:s.TT.REST_COMPLETE_UPLOAD_PART,requestElapse:p,requestMethod:"POST",isSuccess:0,codeDesc:m,code:v}}),this.rpt({data:{isLastApi:1,isSuccess:0}}),null===(n=(r=this.options).onFileUploadError)||void 0===n||n.call(r,f),[3,3];case 3:return[2]}}))}))},e.prototype.multipartAbort=function(){return u(this,void 0,void 0,(function(){var e,t,r,n,i,o,u,l;return c(this,(function(c){switch(c.label){case 0:if(!this.uuid)return[2];c.label=1;case 1:return c.trys.push([1,3,,4]),[4,a.Hc.call(this.connection,{uuid:this.uuid})];case 2:return e=c.sent(),t=(null==e?void 0:e.extraInfo)||{},i=t.elapse,o=t.httpCode,l=t.url,this.rpt({data:{requestUrl:l,requestName:s.TT.REST_ABORT_UPLOAD_PART,requestElapse:i,requestMethod:"DELETE",isSuccess:1,code:o}}),[3,4];case 3:return r=c.sent(),n=(null==r?void 0:r.extraInfo)||{},i=n.elapse,o=n.httpCode,u=n.errDesc,l=n.url,this.rpt({data:{requestUrl:l,requestName:s.TT.REST_ABORT_UPLOAD_PART,requestElapse:i,requestMethod:"DELETE",isSuccess:0,codeDesc:u,code:o}}),[3,4];case 4:return[2]}}))}))},e.prototype.handleTask=function(e){var t=this.pool.findIndex((function(t){return t===e}));this.pool.splice(t,1)},e}();t.A=l},1489:function(e,t,r){"use strict";r(5823)("Uint8",(function(e){return function(t,r,n){return e(this,t,r,n)}}))},1510:function(e,t,r){"use strict";var n=r(6518),i=r(7751),o=r(9297),s=r(655),a=r(5745),u=r(1296),c=a("string-to-symbol-registry"),l=a("symbol-to-string-registry");n({target:"Symbol",stat:!0,forced:!u},{for:function(e){var t=s(e);if(o(c,t))return c[t];var r=i("Symbol")(t);return c[t]=r,l[r]=t,r}})},1575:function(e,t,r){"use strict";var n=r(4644),i=r(926).left,o=n.aTypedArray;(0,n.exportTypedArrayMethod)("reduce",(function(e){var t=arguments.length;return i(o(this),e,t,t>1?arguments[1]:void 0)}))},1625:function(e,t,r){"use strict";var n=r(9504);e.exports=n({}.isPrototypeOf)},1629:function(e,t,r){"use strict";var n=r(6518),i=r(235);n({target:"Array",proto:!0,forced:[].forEach!==i},{forEach:i})},1630:function(e,t,r){"use strict";var n=r(9504),i=r(4644),o=n(r(7029)),s=i.aTypedArray;(0,i.exportTypedArrayMethod)("copyWithin",(function(e,t){return o(s(this),e,t,arguments.length>2?arguments[2]:void 0)}))},1672:function(e,t,r){"use strict";r(2010);var n=r(7968),i={handleRosterMsg:function(e){var t,r,i,o,s,a,u=this.root.lookup("easemob.pb.RosterBody").decode(e.payload),c={type:"",to:u.to[0].name,from:u.from.name,status:u.reason};switch(u.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===(i=this.eventHandler)||void 0===i||i.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===(s=this.eventHandler)||void 0===s||s.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:n.vF.error("handleRosterMsg:",u)}this.onPresence&&c.type&&this.onPresence(c)}};t.A=i},1694:function(e,t,r){"use strict";var n=r(4644),i=r(9213).find,o=n.aTypedArray;(0,n.exportTypedArrayMethod)("find",(function(e){return i(o(this),e,arguments.length>1?arguments[1]:void 0)}))},1699:function(e,t,r){"use strict";var n=r(6518),i=r(9504),o=r(5749),s=r(7750),a=r(655),u=r(1436),c=i("".indexOf);n({target:"String",proto:!0,forced:!u("includes")},{includes:function(e){return!!~c(a(s(this)),a(o(e)),arguments.length>1?arguments[1]:void 0)}})},1745:function(e,t,r){"use strict";var n=r(6518),i=r(7476),o=r(9039),s=r(6346),a=r(8551),u=r(5610),c=r(8014),l=s.ArrayBuffer,d=s.DataView,f=d.prototype,h=i(l.prototype.slice),p=i(f.getUint8),v=i(f.setUint8);n({target:"ArrayBuffer",proto:!0,unsafe:!0,forced:o((function(){return!new l(2).slice(1,void 0).byteLength}))},{slice:function(e,t){if(h&&void 0===t)return h(a(this),e);for(var r=a(this).byteLength,n=u(e,r),i=u(void 0===t?r:t,r),o=new l(c(i-n)),s=new d(this),f=new d(o),m=0;n<i;)v(f,m++,p(s,n++));return o}})},1761:function(e,t,r){"use strict";var n=r(9565),i=r(9228),o=r(8551),s=r(34),a=r(8014),u=r(655),c=r(7750),l=r(5966),d=r(7829),f=r(6682);i("match",(function(e,t,r){return[function(t){var r=c(this),i=s(t)?l(t,e):void 0;return i?n(i,t,r):new RegExp(t)[e](u(r))},function(e){var n=o(this),i=u(e),s=r(t,n,i);if(s.done)return s.value;if(!n.global)return f(n,i);var c=n.unicode;n.lastIndex=0;for(var l,h=[],p=0;null!==(l=f(n,i));){var v=u(l[0]);h[p]=v,""===v&&(n.lastIndex=d(i,a(n.lastIndex),c)),p++}return 0===p?null:h}]}))},1798:function(e,t,r){"use strict";r(4423),r(9085),r(9432),r(1699);var n=r(8093),i=function(){return i=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},i.apply(this,arguments)};t.A=function(e,t,r,o){var s,a,u,c,l,d,f,h,p,v,m,_,g,E,y,O,T,R,I,S,C,b,N,A,M,w,L,U,x,D,P,k=e.response;k&&"string"==typeof k&&(k=JSON.parse(k));var F=e.status,H={elapse:o,httpCode:F,errDesc:null==k?void 0:k.error_description};if(400===F){if(4000005===k.error_code||4000006===k.error_code)return void t({type:n.C.REQUEST_PARAMETER_ERROR,message:null==k?void 0:k.error_description,extraInfo:H});if(40002===k.error_code)return void t({type:n.C.THREAD_ALREADY_EXIST,message:null==k?void 0:k.error_description,extraInfo:H});if(40009===k.error_code)return void t({type:n.C.OPERATION_UNSUPPORTED,message:null==k?void 0:k.error_description,extraInfo:H});if(60005===k.error_code)return void t({type:n.C.GROUP_MEMBER_ATTRIBUTES_SET_FAILED,message:(null==k?void 0:k.desc)||(null==k?void 0:k.error_description),extraInfo:H});if(60010===k.error_code)return void((null===(s=null==k?void 0:k.error_description)||void 0===s?void 0:s.includes("exceeds chatgroup user metadata single value limit"))?t({type:n.C.MAX_LIMIT,message:(null==k?void 0:k.desc)||k.error_description,extraInfo:H}):t({type:n.C.NO_PERMISSION,message:(null==k?void 0:k.desc)||k.error_description,extraInfo:H}));if(60011===k.error_code)return void t({type:n.C.CHATROOM_NOT_JOINED,message:null==k?void 0:k.desc,extraInfo:H});if(14403===k.error_code)return void t({type:n.C.WEBIM_UPLOADFILE_ERROR,message:null==k?void 0:k.error_description,data:k,extraInfo:H});if(60006===k.error_code||60007===k.error_code||60009===k.error_code||60012===k.error_code)return void t({type:n.C.MAX_LIMIT,message:(null==k?void 0:k.desc)||(null==k?void 0:k.error_description),extraInfo:H});if(91104===k.error_code)return void t({type:n.C.NO_PERMISSION,message:null==k?void 0:k.error_description,extraInfo:H});if(null===(a=k.error_description)||void 0===a?void 0:a.includes("are not members of this group"))return(null===(u=e.responseURL)||void 0===u?void 0:u.includes("chatgroups"))?t({type:n.C.GROUP_NOT_JOINED,data:e.response||e.responseText,message:k.error_description,extraInfo:H}):t({type:n.C.CHATROOM_NOT_JOINED,data:e.response||e.responseText,message:k.error_description,extraInfo:H}),void r({type:n.C.WEBIM_CONNCTION_AJAX_ERROR,message:null==k?void 0:k.error_description,data:e.responseText,extraInfo:H});if("the app not open presence"===(null==k?void 0:k.result))return void t({type:n.C.SERVICE_NOT_ENABLED,message:null==k?void 0:k.result,extraInfo:H});if(null===(c=null==k?void 0:k.error_description)||void 0===c?void 0:c.includes("remark length must less"))return void t({type:n.C.MAX_LIMIT,message:null==k?void 0:k.error_description,extraInfo:H});switch(null==k?void 0:k.error_description){case"the user is already operation this message":t({type:n.C.REACTION_ALREADY_ADDED,message:null==k?void 0:k.error_description,extraInfo:H});break;case"The quantity has exceeded the limit!":t({type:n.C.MAX_LIMIT,message:null==k?void 0:k.error_description,extraInfo:H});break;case"The user not in this group!":t({type:n.C.GROUP_NOT_JOINED,message:null==k?void 0:k.error_description,extraInfo:H});break;case"the user operation is illegal!":t({type:n.C.REACTION_OPERATION_IS_ILLEGAL,message:null==k?void 0:k.error_description,extraInfo:H});break;case"this appKey is not open reaction service!":case"this appKey not open message roaming":t({type:n.C.SERVICE_NOT_ENABLED,message:null==k?void 0:k.error_description,extraInfo:H});break;case"this message is creating reaction, please try again.":t({type:n.C.REACTION_CREATING,message:null==k?void 0:k.error_description,extraInfo:H});break;case"groupId can not be null!":t({type:n.C.GROUP_NOT_EXIST,message:null==k?void 0:k.error_description,extraInfo:H});break;case"The input text is too long.":t({type:n.C.TRANSLATION_TEXT_TOO_LONG,message:null==k?void 0:k.error_description,extraInfo:H});break;case"The target language is not valid.":t({type:n.C.TRANSLATION_NOT_VALID,message:null==k?void 0:k.error_description,extraInfo:H});break;case"report failed, get message by id failed":t({type:n.C.MESSAGE_NOT_FOUND,message:null==k?void 0:k.error_description,extraInfo:H});break;case"ext is too big ":t({type:n.C.PRESENCE_PARAM_EXCEED,message:null==k?void 0:k.error_description,extraInfo:H});break;case"Request body not readable.Please check content type is correct!":case"param mark must be not empty, please check!":case"param mark illegal, please check it!":case"param pin_msg_id illegal, please check it!":t({type:n.C.REQUEST_PARAMETER_ERROR,message:null==k?void 0:k.error_description,extraInfo:H});break;case"updateRemark | they are not friends, please add as a friend first.":t({type:n.C.USER_NOT_FRIEND,message:null==k?void 0:k.error_description,extraInfo:H});break;default:t({type:n.C.WEBIM_CONNCTION_AJAX_ERROR,message:null==k?void 0:k.error_description,data:e.responseText,extraInfo:H}),r({type:n.C.WEBIM_CONNCTION_AJAX_ERROR,message:null==k?void 0:k.error_description,data:e.responseText,extraInfo:H})}}else if(401===F)4010101===k.error_code?t({type:n.C.WEBIM_CONNCTION_TOKEN_NOT_ASSIGN_ERROR,message:null==k?void 0:k.error_description,extraInfo:H}):40001===k.error_code||60001===k.error_code||"Unable to authenticate (OAuth)"===k.error_description?t({type:n.C.NO_PERMISSION,message:null==k?void 0:k.error_description,extraInfo:H}):(r({type:n.C.WEBIM_CONNCTION_AJAX_ERROR,data:e.responseText,message:e.responseText,extraInfo:H}),t({type:n.C.WEBIM_CONNCTION_AJAX_ERROR,data:e.responseText,message:e.responseText,extraInfo:H}));else if(403===F)(null===(l=e.responseURL)||void 0===l?void 0:l.includes("/chatgroups/"))&&(null===(d=e.responseURL)||void 0===d?void 0:d.includes("/invite"))&&(null===(f=k.error_description)||void 0===f?void 0:f.includes("doesn't exist"))?t({type:n.C.USER_NOT_FOUND,data:e.response||e.responseText,message:k.error_description,extraInfo:H}):4e4===k.error_code||60004===k.error_code||15002===k.error_code||4030204===k.error_code?t({type:n.C.SERVICE_NOT_ENABLED,message:null==k?void 0:k.error_description,extraInfo:H}):40003===k.error_code||40004===k.error_code?t({type:n.C.THREAD_ALREADY_EXIST,message:null==k?void 0:k.error_description,extraInfo:H}):40005===k.error_code||40007===k.error_code||91002===k.error_code?t({type:n.C.MAX_LIMIT,message:null==k?void 0:k.error_description,extraInfo:H}):60002===k.error_code?t({type:n.C.PERMISSION_DENIED,message:null==k?void 0:k.error_description,extraInfo:H}):91101===k.error_code?t({type:n.C.MAX_LIMIT,message:null==k?void 0:k.error_description,extraInfo:H}):91102===k.error_code&&t({type:n.C.REQUEST_PARAMETER_ERROR,message:k.error_description,extraInfo:H}),"group member list is full!"===k.error_description?(null===(h=e.responseURL)||void 0===h?void 0:h.includes("chatgroups"))?t({type:n.C.GROUP_MEMBERS_FULL,data:e.response||e.responseText,message:k.error_description,extraInfo:H}):t({type:n.C.CHATROOM_MEMBERS_FULL,data:e.response||e.responseText,message:k.error_description,extraInfo:H}):(null===(p=k.error_description)||void 0===p?void 0:p.includes("invite users to join group failed"))&&(null===(v=k.error_description)||void 0===v?void 0:v.includes("already in group"))?(null===(m=e.responseURL)||void 0===m?void 0:m.includes("chatgroups"))&&t({type:n.C.GROUP_ALREADY_JOINED,data:e.response||e.responseText,message:k.error_description,extraInfo:H}):(null===(_=k.error_description)||void 0===_?void 0:_.includes("are not members of this group"))?(null===(g=e.responseURL)||void 0===g?void 0:g.includes("chatgroups"))?t({type:n.C.GROUP_NOT_JOINED,data:e.response||e.responseText,message:k.error_description,extraInfo:H}):t({type:n.C.CHATROOM_NOT_JOINED,data:e.response||e.responseText,message:k.error_description,extraInfo:H}):(null===(E=k.error_description)||void 0===E?void 0:E.includes("service not open!"))||(null===(y=k.error_description)||void 0===y?void 0:y.includes("message report not open"))||(null===(O=k.error_description)||void 0===O?void 0:O.includes("messageroaming function not open"))?t({type:n.C.SERVICE_NOT_ENABLED,data:e.response||e.responseText,message:k.error_description,extraInfo:H}):(null===(T=k.error_description)||void 0===T?void 0:T.includes("members size is greater than max user size !"))?t({type:n.C.GROUP_MEMBERS_LIMIT,data:e.response||e.responseText,message:k.error_description,extraInfo:H}):(null===(R=k.error_description)||void 0===R?void 0:R.includes("can not operate this group, reason: group is disabled"))?t({type:n.C.GROUP_IS_DISABLED,data:e.response||e.responseText,message:k.error_description,extraInfo:H}):(null===(I=k.error_description)||void 0===I?void 0:I.includes("Invitee's contact max count"))||(null===(S=k.error_description)||void 0===S?void 0:S.includes("Inviter's contact max count"))?t({type:n.C.MAX_LIMIT,data:e.response||e.responseText,message:k.error_description,extraInfo:H}):t({type:n.C.PERMISSION_DENIED,data:e.response||e.responseText,message:"permission denied",extraInfo:i(i({},H),{errDesc:"permission denied"})}),r({type:n.C.WEBIM_CONNCTION_AJAX_ERROR,data:e.responseText,message:e.responseText,extraInfo:H});else if(404===F){if(4040302===k.error_code)return void t({type:n.C.WEBIM_CONNCTION_APPKEY_NOT_ASSIGN_ERROR,message:null==k?void 0:k.error_description,extraInfo:H});40011===k.error_code?t({type:n.C.THREAD_NOT_EXIST,message:null==k?void 0:k.error_description,extraInfo:H}):40012===k.error_code?t({type:n.C.NO_PERMISSION,message:null==k?void 0:k.error_description,extraInfo:H}):60003===k.error_code||20004===k.error_code?t({type:n.C.GROUP_NOT_JOINED,message:null==k?void 0:k.error_description,extraInfo:H}):91001===k.error_code&&t({type:n.C.CONVERSATION_NOT_EXIST,message:null==k?void 0:k.error_description,extraInfo:H}),(null===(C=k.error_description)||void 0===C?void 0:C.includes("do not find this group"))||(null===(b=k.error_description)||void 0===b?void 0:b.includes("does not exist"))?(null===(N=e.responseURL)||void 0===N?void 0:N.includes("chatgroups"))?t({type:n.C.GROUP_NOT_EXIST,data:e.response||e.responseText,message:"The chat room dose not exist.",extraInfo:i(i({},H),{errDesc:"The chat room dose not exist."})}):t({type:n.C.CHATROOM_NOT_EXIST,data:e.response||e.responseText,message:"The chat room dose not exist.",extraInfo:i(i({},H),{errDesc:"The chat room dose not exist."})}):(null===(A=k.error_description)||void 0===A?void 0:A.includes("username"))&&(null===(M=k.error_description)||void 0===M?void 0:M.includes("doesn't exist!'"))||(null===(w=k.error_description)||void 0===w?void 0:w.includes("user not found"))||(null===(L=k.error_description)||void 0===L?void 0:L.includes("Service resource not found"))&&"UserNotFoundException"===(null==k?void 0:k.exception)?t({type:n.C.USER_NOT_FOUND,data:e.response||e.responseText,message:k.error_description,extraInfo:H}):(null===(U=k.error_description)||void 0===U?void 0:U.includes("user session pin message not exist"))?t({type:n.C.MESSAGE_NOT_FOUND,message:k.error_description,extraInfo:H}):t({type:n.C.WEBIM_CONNCTION_AJAX_ERROR,data:e.response||e.responseText,message:e.responseText,extraInfo:H}),r({type:n.C.WEBIM_CONNCTION_AJAX_ERROR,data:e.response||e.responseText,message:e.responseText,extraInfo:H})}else if(406===F)90004===k.error_code&&t({type:n.C.OPERATION_NOT_ALLOWED,message:null==k?void 0:k.error_description,extraInfo:H});else if(429===F||503===F){if(null===(x=k.error_description)||void 0===x?void 0:x.includes("The request has reached the maximum limit"))return void t({type:n.C.MAX_LIMIT,message:e.responseText,extraInfo:H});if(null===(D=k.error_description)||void 0===D?void 0:D.includes("upload client logs reached limit"))return void t({type:n.C.MAX_LIMIT,message:e.responseText});t({type:n.C.SERVER_BUSY,data:e.response||e.responseText,message:"Server is busy.",extraInfo:i(i({},H),{errDesc:"Server is busy."})}),r({type:n.C.WEBIM_CONNCTION_AJAX_ERROR,data:e.responseText,message:"Server is busy.",extraInfo:i(i({},H),{errDesc:"Server is busy."})})}else if(500===F){if(40006===k.error_code||40008===k.error_code||40010===k.error_code||5000701===k.error_code)return void t({type:n.C.SERVER_UNKNOWN_ERROR,message:null==k?void 0:k.error_description,extraInfo:H});if(90005===k.error_code||99999===k.error_code)return void t({type:n.C.REQUEST_UNKNOWN,message:null==k?void 0:k.error_description,extraInfo:H});if(null===(P=k.error_description)||void 0===P?void 0:P.includes("translte failed!"))return void t({type:n.C.TRANSLATION_FAILED,message:e.responseText,extraInfo:H});t({type:n.C.WEBIM_CONNCTION_AJAX_ERROR,data:e.responseText,message:"",extraInfo:H}),r({type:n.C.WEBIM_CONNCTION_AJAX_ERROR,data:e.responseText,message:"",extraInfo:H})}else if(502===F){if(5020801===k.error_code)return void t({type:n.C.SERVER_UNKNOWN_ERROR,message:null==k?void 0:k.error_description,extraInfo:H});t({type:n.C.WEBIM_CONNCTION_AJAX_ERROR,data:e.responseText,message:e.responseText,extraInfo:i(i({},H),{errDesc:"ajax error"})}),r({type:n.C.WEBIM_CONNCTION_AJAX_ERROR,data:e.responseText,message:e.responseText,extraInfo:i(i({},H),{errDesc:"ajax error"})})}else t({type:n.C.WEBIM_CONNCTION_AJAX_ERROR,data:e.responseText,message:e.responseText,extraInfo:i(i({},H),{errDesc:"ajax error"})}),r({type:n.C.WEBIM_CONNCTION_AJAX_ERROR,data:e.responseText,message:e.responseText,extraInfo:i(i({},H),{errDesc:"ajax error"})})}},1828:function(e,t,r){"use strict";var n=r(9504),i=r(9297),o=r(5397),s=r(9617).indexOf,a=r(421),u=n([].push);e.exports=function(e,t){var r,n=o(e),c=0,l=[];for(r in n)!i(a,r)&&i(n,r)&&u(l,r);for(;t.length>c;)i(n,r=t[c++])&&(~s(l,r)||u(l,r));return l}},1920:function(e,t,r){"use strict";var n=r(4644),i=r(9213).filter,o=r(9948),s=n.aTypedArray;(0,n.exportTypedArrayMethod)("filter",(function(e){var t=i(s(this),e,arguments.length>1?arguments[1]:void 0);return o(this,t)}))},1951:function(e,t,r){"use strict";var n=r(8227);t.f=n},1955:function(e,t,r){"use strict";var n,i,o,s,a,u=r(4576),c=r(3389),l=r(6080),d=r(9225).set,f=r(8265),h=r(9544),p=r(4265),v=r(7860),m=r(6193),_=u.MutationObserver||u.WebKitMutationObserver,g=u.document,E=u.process,y=u.Promise,O=c("queueMicrotask");if(!O){var T=new f,R=function(){var e,t;for(m&&(e=E.domain)&&e.exit();t=T.get();)try{t()}catch(e){throw T.head&&n(),e}e&&e.enter()};h||m||v||!_||!g?!p&&y&&y.resolve?((s=y.resolve(void 0)).constructor=y,a=l(s.then,s),n=function(){a(R)}):m?n=function(){E.nextTick(R)}:(d=l(d,u),n=function(){d(R)}):(i=!0,o=g.createTextNode(""),new _(R).observe(o,{characterData:!0}),n=function(){o.data=i=!i}),O=function(e){T.head||n(),T.add(e)}}e.exports=O},2003:function(e,t,r){"use strict";var n=r(6518),i=r(6395),o=r(916).CONSTRUCTOR,s=r(550),a=r(7751),u=r(4901),c=r(6840),l=s&&s.prototype;if(n({target:"Promise",proto:!0,forced:o,real:!0},{catch:function(e){return this.then(void 0,e)}}),!i&&u(s)){var d=a("Promise").prototype.catch;l.catch!==d&&c(l,"catch",d,{unsafe:!0})}},2008:function(e,t,r){"use strict";var n=r(6518),i=r(9213).filter;n({target:"Array",proto:!0,forced:!r(597)("filter")},{filter:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}})},2010:function(e,t,r){"use strict";var n=r(3724),i=r(350).EXISTS,o=r(9504),s=r(2106),a=Function.prototype,u=o(a.toString),c=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,l=o(c.exec);n&&!i&&s(a,"name",{configurable:!0,get:function(){try{return l(c,u(this))[1]}catch(e){return""}}})},2055:function(e,t,r){"use strict";r(1629),r(3792),r(739),r(2010),r(2892),r(5506),r(9432),r(6099),r(3500),r(2953);var n=r(4269),i=r(7968),o=r(8211),s=r(4865);function a(e){var t,r=[],n=[],i=e.data;i&&i.values&&i.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 u(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 c(e){var t,r,n,i;if(e.data){var s=e.data,a={id:s.id||"",name:s.name||"",parentId:s.muc_parent_id||"",messageId:s.msg_parent_id||"",timestamp:s.timestamp||0,operator:s.from||"",operation:""};switch(s.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=s.message_count,s.last_message&&"{}"!==JSON.stringify(s.last_message)?a.lastMessage=o.h.call(this,s.last_message):"{}"===JSON.stringify(s.last_message)&&(a.lastMessage={}),null===(r=this.eventHandler)||void 0===r||r.dispatch("onChatThreadChange",a);break;case"update":a.operation="update",a.messageCount=s.message_count,null===(n=this.eventHandler)||void 0===n||n.dispatch("onChatThreadChange",a);break;case"delete":a.operation="destroy",null===(i=this.eventHandler)||void 0===i||i.dispatch("onChatThreadChange",a)}}}function l(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 d(e){var t,r,n=e.data,a="";if(this.clientResource!==n.res||n.from!==this.user){switch(n.op){case"del":a="deleteConversation";break;case"top":a="pinnedConversation";break;case"not_top":a="unpinnedConversation";break;case"mark":a="markConversation";break;case"mark_delete":a="unMarkConversation";break;case"pin":a="pin";break;case"pin_delete":a="unpin";break;default:return void i.vF.error("unexpected conversation op:",n.op)}if("pin"!==a&&"unpin"!==a){var u={operation:a,conversationId:n.id,conversationType:"chat"===n.type?"singleChat":"groupChat",timestamp:n.ts};"markConversation"!==u.operation&&"unMarkConversation"!==u.operation||n.ext&&(u.conversationMark=s.s[n.ext]),null===(r=this.eventHandler)||void 0===r||r.dispatch("onMultiDeviceEvent",u)}else{var c=n.ext,l=n.from,d=n.id,f=n.type,h=n.ts,p={messageId:c||"",conversationId:"chat"===f?l:d,conversationType:o.p[f],operation:a,operatorId:l,time:h};null===(t=this.eventHandler)||void 0===t||t.dispatch("onMessagePinEvent",p)}}}function f(e){var t,r=this;null===(t=e.values)||void 0===t||t.forEach((function(e){var t,n,i,o,s;if(e.operator_resource!==r.clientResource)if("ignoreInterval"in e.data){var a={operation:"setSilentModeForUser",resource:e.operator_resource,data:e.data};null===(t=r.eventHandler)||void 0===t||t.dispatch("onMultiDeviceEvent",a)}else"group"in e?(a={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===(i=r.eventHandler)||void 0===i||i.dispatch("onMultiDeviceEvent",a)):(a={operation:0===Object.keys(null!==(o=e.data)&&void 0!==o?o:{}).length?"removeSilentModeForConversation":"setSilentModeForConversation",resource:e.operator_resource,conversationId:e.user,type:"singleChat",data:e.data},null===(s=r.eventHandler)||void 0===s||s.dispatch("onMultiDeviceEvent",a))}))}t.A=function(e){var t=n.Wp.parseNotify(e.payload);switch(t.type){case"presence":a.call(this,t);break;case"reaction":u.call(this,t);break;case"thread":c.call(this,t);break;case"roaming_delete":l.call(this,t);break;case"conv":d.call(this,t);break;case"user_notification_mute":f.call(this,t);break;default:i.vF.error("unexpected notify type: ".concat(t.type))}}},2062:function(e,t,r){"use strict";var n=r(6518),i=r(9213).map;n({target:"Array",proto:!0,forced:!r(597)("map")},{map:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}})},2087:function(e,t,r){"use strict";var n=r(34),i=Math.floor;e.exports=Number.isInteger||function(e){return!n(e)&&isFinite(e)&&i(e)===e}},2106:function(e,t,r){"use strict";var n=r(283),i=r(4913);e.exports=function(e,t,r){return r.get&&n(r.get,t,{getter:!0}),r.set&&n(r.set,t,{setter:!0}),i.f(e,t,r)}},2140:function(e,t,r){"use strict";var n={};n[r(8227)("toStringTag")]="z",e.exports="[object z]"===String(n)},2170:function(e,t,r){"use strict";var n=r(4644),i=r(9213).every,o=n.aTypedArray;(0,n.exportTypedArrayMethod)("every",(function(e){return i(o(this),e,arguments.length>1?arguments[1]:void 0)}))},2195:function(e,t,r){"use strict";var n=r(9504),i=n({}.toString),o=n("".slice);e.exports=function(e){return o(i(e),8,-1)}},2211:function(e,t,r){"use strict";var n=r(9039);e.exports=!n((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}))},2239:function(e,t,r){"use strict";e.exports=i;var n=r(3610);function i(e,t){this.lo=e>>>0,this.hi=t>>>0}var o=i.zero=new i(0,0);o.toNumber=function(){return 0},o.zzEncode=o.zzDecode=function(){return this},o.length=function(){return 1};var s=i.zeroHash="\0\0\0\0\0\0\0\0";i.fromNumber=function(e){if(0===e)return o;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 i(r,n)},i.from=function(e){if("number"==typeof e)return i.fromNumber(e);if(n.isString(e)){if(!n.Long)return i.fromNumber(parseInt(e,10));e=n.Long.fromString(e)}return e.low||e.high?new i(e.low>>>0,e.high>>>0):o},i.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},i.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 a=String.prototype.charCodeAt;i.fromHash=function(e){return e===s?o:new i((a.call(e,0)|a.call(e,1)<<8|a.call(e,2)<<16|a.call(e,3)<<24)>>>0,(a.call(e,4)|a.call(e,5)<<8|a.call(e,6)<<16|a.call(e,7)<<24)>>>0)},i.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)},i.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},i.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},i.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}},2259:function(e,t,r){"use strict";r(511)("iterator")},2293:function(e,t,r){"use strict";var n=r(8551),i=r(5548),o=r(4117),s=r(8227)("species");e.exports=function(e,t){var r,a=n(e).constructor;return void 0===a||o(r=n(a)[s])?t:i(r)}},2333:function(e,t,r){"use strict";var n=r(1291),i=r(655),o=r(7750),s=RangeError;e.exports=function(e){var t=i(o(this)),r="",a=n(e);if(a<0||a===1/0)throw new s("Wrong number of repetitions");for(;a>0;(a>>>=1)&&(t+=t))1&a&&(r+=t);return r}},2357:function(e,t,r){"use strict";var n=r(3724),i=r(9039),o=r(9504),s=r(2787),a=r(1072),u=r(5397),c=o(r(8773).f),l=o([].push),d=n&&i((function(){var e=Object.create(null);return e[2]=2,!c(e,2)})),f=function(e){return function(t){for(var r,i=u(t),o=a(i),f=d&&null===s(i),h=o.length,p=0,v=[];h>p;)r=o[p++],n&&!(f?r in i:c(i,r))||l(v,e?[r,i[r]]:i[r]);return v}};e.exports={entries:f(!0),values:f(!1)}},2360:function(e,t,r){"use strict";var n,i=r(8551),o=r(6801),s=r(8727),a=r(421),u=r(397),c=r(4055),l=r(6119),d="prototype",f="script",h=l("IE_PROTO"),p=function(){},v=function(e){return"<"+f+">"+e+"</"+f+">"},m=function(e){e.write(v("")),e.close();var t=e.parentWindow.Object;return e=null,t},_=function(){try{n=new ActiveXObject("htmlfile")}catch(e){}var e,t,r;_="undefined"!=typeof document?document.domain&&n?m(n):(t=c("iframe"),r="java"+f+":",t.style.display="none",u.appendChild(t),t.src=String(r),(e=t.contentWindow.document).open(),e.write(v("document.F=Object")),e.close(),e.F):m(n);for(var i=s.length;i--;)delete _[d][s[i]];return _()};a[h]=!0,e.exports=Object.create||function(e,t){var r;return null!==e?(p[d]=i(e),r=new p,p[d]=null,r[h]=e):r=_(),void 0===t?r:o.f(r,t)}},2405:function(e,t,r){"use strict";r(6468)("Set",(function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}}),r(6938))},2480:function(e,t,r){"use strict";r(5081)},2529:function(e){"use strict";e.exports=function(e,t){return{value:e,done:t}}},2549:function(e,t,r){"use strict";e.exports=r(9100)},2551:function(e,t,r){"use strict";e.exports=i;var n=r(3610);function i(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)this[t[r]]=e[t[r]]}i.create=function(e){return this.$type.create(e)},i.encode=function(e,t){return this.$type.encode(e,t)},i.encodeDelimited=function(e,t){return this.$type.encodeDelimited(e,t)},i.decode=function(e){return this.$type.decode(e)},i.decodeDelimited=function(e){return this.$type.decodeDelimited(e)},i.verify=function(e){return this.$type.verify(e)},i.fromObject=function(e){return this.$type.fromObject(e)},i.toObject=function(e,t){return this.$type.toObject(e,t)},i.prototype.toJSON=function(){return this.$type.toObject(this,n.toJSONOptions)}},2566:function(e,t){var r;r=function(e){e.version="1.2.2";var t=function(){for(var e=0,t=new Array(256),r=0;256!=r;++r)e=1&(e=1&(e=1&(e=1&(e=1&(e=1&(e=1&(e=1&(e=r)?-306674912^e>>>1:e>>>1)?-306674912^e>>>1:e>>>1)?-306674912^e>>>1:e>>>1)?-306674912^e>>>1:e>>>1)?-306674912^e>>>1:e>>>1)?-306674912^e>>>1:e>>>1)?-306674912^e>>>1:e>>>1)?-306674912^e>>>1:e>>>1,t[r]=e;return"undefined"!=typeof Int32Array?new Int32Array(t):t}(),r=function(e){var t=0,r=0,n=0,i="undefined"!=typeof Int32Array?new Int32Array(4096):new Array(4096);for(n=0;256!=n;++n)i[n]=e[n];for(n=0;256!=n;++n)for(r=e[n],t=256+n;t<4096;t+=256)r=i[t]=r>>>8^e[255&r];var o=[];for(n=1;16!=n;++n)o[n-1]="undefined"!=typeof Int32Array?i.subarray(256*n,256*n+256):i.slice(256*n,256*n+256);return o}(t),n=r[0],i=r[1],o=r[2],s=r[3],a=r[4],u=r[5],c=r[6],l=r[7],d=r[8],f=r[9],h=r[10],p=r[11],v=r[12],m=r[13],_=r[14];e.table=t,e.bstr=function(e,r){for(var n=-1^r,i=0,o=e.length;i<o;)n=n>>>8^t[255&(n^e.charCodeAt(i++))];return~n},e.buf=function(e,r){for(var g=-1^r,E=e.length-15,y=0;y<E;)g=_[e[y++]^255&g]^m[e[y++]^g>>8&255]^v[e[y++]^g>>16&255]^p[e[y++]^g>>>24]^h[e[y++]]^f[e[y++]]^d[e[y++]]^l[e[y++]]^c[e[y++]]^u[e[y++]]^a[e[y++]]^s[e[y++]]^o[e[y++]]^i[e[y++]]^n[e[y++]]^t[e[y++]];for(E+=15;y<E;)g=g>>>8^t[255&(g^e[y++])];return~g},e.str=function(e,r){for(var n=-1^r,i=0,o=e.length,s=0,a=0;i<o;)(s=e.charCodeAt(i++))<128?n=n>>>8^t[255&(n^s)]:s<2048?n=(n=n>>>8^t[255&(n^(192|s>>6&31))])>>>8^t[255&(n^(128|63&s))]:s>=55296&&s<57344?(s=64+(1023&s),a=1023&e.charCodeAt(i++),n=(n=(n=(n=n>>>8^t[255&(n^(240|s>>8&7))])>>>8^t[255&(n^(128|s>>2&63))])>>>8^t[255&(n^(128|a>>6&15|(3&s)<<4))])>>>8^t[255&(n^(128|63&a))]):n=(n=(n=n>>>8^t[255&(n^(224|s>>12&15))])>>>8^t[255&(n^(128|s>>6&63))])>>>8^t[255&(n^(128|63&s))];return~n}},"undefined"==typeof DO_NOT_EXPORT_CRC?r(t):r({})},2637:function(e,t,r){"use strict";r(6518)({target:"Number",stat:!0},{isInteger:r(2087)})},2652:function(e,t,r){"use strict";var n=r(6080),i=r(9565),o=r(8551),s=r(6823),a=r(4209),u=r(6198),c=r(1625),l=r(81),d=r(851),f=r(9539),h=TypeError,p=function(e,t){this.stopped=e,this.result=t},v=p.prototype;e.exports=function(e,t,r){var m,_,g,E,y,O,T,R=r&&r.that,I=!(!r||!r.AS_ENTRIES),S=!(!r||!r.IS_RECORD),C=!(!r||!r.IS_ITERATOR),b=!(!r||!r.INTERRUPTED),N=n(t,R),A=function(e){return m&&f(m,"normal",e),new p(!0,e)},M=function(e){return I?(o(e),b?N(e[0],e[1],A):N(e[0],e[1])):b?N(e,A):N(e)};if(S)m=e.iterator;else if(C)m=e;else{if(!(_=d(e)))throw new h(s(e)+" is not iterable");if(a(_)){for(g=0,E=u(e);E>g;g++)if((y=M(e[g]))&&c(v,y))return y;return new p(!1)}m=l(e,_)}for(O=S?e.next:m.next;!(T=i(O,m)).done;){try{y=M(T.value)}catch(e){f(m,"throw",e)}if("object"==typeof y&&y&&c(v,y))return y}return new p(!1)}},2675:function(e,t,r){"use strict";r(6761),r(1510),r(7812),r(3110),r(9773)},2703:function(e,t,r){"use strict";var n=r(4576),i=r(9039),o=r(9504),s=r(655),a=r(3802).trim,u=r(7452),c=n.parseInt,l=n.Symbol,d=l&&l.iterator,f=/^[+-]?0x/i,h=o(f.exec),p=8!==c(u+"08")||22!==c(u+"0x16")||d&&!i((function(){c(Object(d))}));e.exports=p?function(e,t){var r=a(s(e));return c(r,t>>>0||(h(f,r)?16:10))}:c},2712:function(e,t,r){"use strict";var n=r(6518),i=r(926).left,o=r(4598),s=r(9519);n({target:"Array",proto:!0,forced:!r(6193)&&s>79&&s<83||!o("reduce")},{reduce:function(e){var t=arguments.length;return i(this,e,t,t>1?arguments[1]:void 0)}})},2744:function(e,t,r){"use strict";var n=r(9039);e.exports=!n((function(){return Object.isExtensible(Object.preventExtensions({}))}))},2777:function(e,t,r){"use strict";var n=r(9565),i=r(34),o=r(757),s=r(5966),a=r(4270),u=r(8227),c=TypeError,l=u("toPrimitive");e.exports=function(e,t){if(!i(e)||o(e))return e;var r,u=s(e,l);if(u){if(void 0===t&&(t="default"),r=n(u,e,t),!i(r)||o(r))return r;throw new c("Can't convert object to primitive value")}return void 0===t&&(t="number"),a(e,t)}},2787:function(e,t,r){"use strict";var n=r(9297),i=r(4901),o=r(8981),s=r(6119),a=r(2211),u=s("IE_PROTO"),c=Object,l=c.prototype;e.exports=a?c.getPrototypeOf:function(e){var t=o(e);if(n(t,u))return t[u];var r=t.constructor;return i(r)&&t instanceof r?r.prototype:t instanceof c?l:null}},2796:function(e,t,r){"use strict";var n=r(9039),i=r(4901),o=/#|\.prototype\./,s=function(e,t){var r=u[a(e)];return r===l||r!==c&&(i(t)?n(t):!!t)},a=s.normalize=function(e){return String(e).replace(o,".").toLowerCase()},u=s.data={},c=s.NATIVE="N",l=s.POLYFILL="P";e.exports=s},2805:function(e,t,r){"use strict";var n=r(4576),i=r(9039),o=r(4428),s=r(4644).NATIVE_ARRAY_BUFFER_VIEWS,a=n.ArrayBuffer,u=n.Int8Array;e.exports=!s||!i((function(){u(1)}))||!i((function(){new u(-1)}))||!o((function(e){new u,new u(null),new u(1.5),new u(e)}),!0)||i((function(){return 1!==new u(new a(2),1,void 0).length}))},2812:function(e){"use strict";var t=TypeError;e.exports=function(e,r){if(e<r)throw new t("Not enough arguments");return e}},2839:function(e,t,r){"use strict";var n=r(4576).navigator,i=n&&n.userAgent;e.exports=i?String(i):""},2887:function(e,t,r){"use strict";var n=r(4576),i=r(9039),o=r(9504),s=r(4644),a=r(3792),u=r(8227)("iterator"),c=n.Uint8Array,l=o(a.values),d=o(a.keys),f=o(a.entries),h=s.aTypedArray,p=s.exportTypedArrayMethod,v=c&&c.prototype,m=!i((function(){v[u].call([1])})),_=!!v&&v.values&&v[u]===v.values&&"values"===v.values.name,g=function(){return l(h(this))};p("entries",(function(){return f(h(this))}),m),p("keys",(function(){return d(h(this))}),m),p("values",g,m||!_,{name:"values"}),p(u,g,m||!_,{name:"values"})},2892:function(e,t,r){"use strict";var n=r(6518),i=r(6395),o=r(3724),s=r(4576),a=r(9167),u=r(9504),c=r(2796),l=r(9297),d=r(3167),f=r(1625),h=r(757),p=r(2777),v=r(9039),m=r(8480).f,_=r(7347).f,g=r(4913).f,E=r(1240),y=r(3802).trim,O="Number",T=s[O],R=a[O],I=T.prototype,S=s.TypeError,C=u("".slice),b=u("".charCodeAt),N=c(O,!T(" 0o1")||!T("0b1")||T("+0x1")),A=function(e){var t,r=arguments.length<1?0:T(function(e){var t=p(e,"number");return"bigint"==typeof t?t:function(e){var t,r,n,i,o,s,a,u,c=p(e,"number");if(h(c))throw new S("Cannot convert a Symbol value to a number");if("string"==typeof c&&c.length>2)if(c=y(c),43===(t=b(c,0))||45===t){if(88===(r=b(c,2))||120===r)return NaN}else if(48===t){switch(b(c,1)){case 66:case 98:n=2,i=49;break;case 79:case 111:n=8,i=55;break;default:return+c}for(s=(o=C(c,2)).length,a=0;a<s;a++)if((u=b(o,a))<48||u>i)return NaN;return parseInt(o,n)}return+c}(t)}(e));return f(I,t=this)&&v((function(){E(t)}))?d(Object(r),this,A):r};A.prototype=I,N&&!i&&(I.constructor=A),n({global:!0,constructor:!0,wrap:!0,forced:N},{Number:A});var M=function(e,t){for(var r,n=o?m(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(","),i=0;n.length>i;i++)l(t,r=n[i])&&!l(e,r)&&g(e,r,_(t,r))};i&&R&&M(a[O],R),(N||i)&&M(a[O],T)},2953:function(e,t,r){"use strict";var n=r(4576),i=r(7400),o=r(9296),s=r(3792),a=r(6699),u=r(687),c=r(8227)("iterator"),l=s.values,d=function(e,t){if(e){if(e[c]!==l)try{a(e,c,l)}catch(t){e[c]=l}if(u(e,t,!0),i[t])for(var r in s)if(e[r]!==s[r])try{a(e,r,s[r])}catch(t){e[r]=s[r]}}};for(var f in i)d(n[f]&&n[f].prototype,f);d(o,"DOMTokenList")},2967:function(e,t,r){"use strict";var n=r(6706),i=r(34),o=r(7750),s=r(3506);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),s(n),i(r)?(t?e(r,n):r.__proto__=n,r):r}}():void 0)},3110:function(e,t,r){"use strict";var n=r(6518),i=r(7751),o=r(8745),s=r(9565),a=r(9504),u=r(9039),c=r(4901),l=r(757),d=r(7680),f=r(6933),h=r(4495),p=String,v=i("JSON","stringify"),m=a(/./.exec),_=a("".charAt),g=a("".charCodeAt),E=a("".replace),y=a(1..toString),O=/[\uD800-\uDFFF]/g,T=/^[\uD800-\uDBFF]$/,R=/^[\uDC00-\uDFFF]$/,I=!h||u((function(){var e=i("Symbol")("stringify detection");return"[null]"!==v([e])||"{}"!==v({a:e})||"{}"!==v(Object(e))})),S=u((function(){return'"\\udf06\\ud834"'!==v("\udf06\ud834")||'"\\udead"'!==v("\udead")})),C=function(e,t){var r=d(arguments),n=f(t);if(c(n)||void 0!==e&&!l(e))return r[1]=function(e,t){if(c(n)&&(t=s(n,this,p(e),t)),!l(t))return t},o(v,null,r)},b=function(e,t,r){var n=_(r,t-1),i=_(r,t+1);return m(T,e)&&!m(R,i)||m(R,e)&&!m(T,n)?"\\u"+y(g(e,0),16):e};v&&n({target:"JSON",stat:!0,arity:3,forced:I||S},{stringify:function(e,t,r){var n=d(arguments),i=o(I?C:v,null,n);return S&&"string"==typeof i?E(i,O,b):i}})},3138:function(e){"use strict";e.exports=function(e,t){try{1===arguments.length?console.error(e):console.error(e,t)}catch(e){}}},3158:function(e,t,r){"use strict";e.exports=o;var n=r(6237);(o.prototype=Object.create(n.prototype)).constructor=o;var i=r(3610);function o(e){n.call(this,e)}o._configure=function(){i.Buffer&&(o.prototype._slice=i.Buffer.prototype.slice)},o.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))},o._configure()},3164:function(e,t,r){"use strict";var n=r(7782),i=r(3602),o=Math.abs;e.exports=function(e,t,r,s){var a=+e,u=o(a),c=n(a);if(u<s)return c*i(u/s/t)*s*t;var l=(1+t/2220446049250313e-31)*u,d=l-(l-u);return d>r||d!=d?c*(1/0):c*d}},3167:function(e,t,r){"use strict";var n=r(4901),i=r(34),o=r(2967);e.exports=function(e,t,r){var s,a;return o&&n(s=t.constructor)&&s!==r&&i(a=s.prototype)&&a!==r.prototype&&o(e,a),e}},3179:function(e,t,r){"use strict";var n=r(2140),i=r(6955);e.exports=n?{}.toString:function(){return"[object "+i(this)+"]"}},3206:function(e,t,r){"use strict";var n=r(4644),i=r(9213).forEach,o=n.aTypedArray;(0,n.exportTypedArrayMethod)("forEach",(function(e){i(o(this),e,arguments.length>1?arguments[1]:void 0)}))},3240:function(e,t,r){"use strict";r(8706),r(4423),r(3288),r(9432);var n=r(8093),i=r(4269),o=r(3603),s=r(4331),a=r(8288);t.A=function(e){var t,r,u=this,c=(new Date).getTime(),l=e.apiUrl,d=e.orgName,f=e.appName,h=e.operateName,p=e.accessToken,v=e.conversationInfo,m=v.conversationType,_=v.conversationId,g=a.Z2[m],E=e.uploadUrl||"".concat(l,"/").concat(d,"/").concat(f,"/chatfiles?chat-type=").concat(g,"&chat-target=").concat(_);e.uploadUrl||(e._uploadMd5&&(E+="&md5=".concat(encodeURIComponent(e._uploadMd5))),e._uploadImageType&&(E+="&imagetype=".concat(e._uploadImageType),"number"==typeof e.width&&e.width>0&&(E+="&width=".concat(e.width)),"number"==typeof e.height&&e.height>0&&(E+="&height=".concat(e.height))));var y=function(t){var r=(new Date).getTime()-c;u.dataReport&&h&&[o.jz.UPLOAD_MSG_ATTACH,o.jz.UPLOAD_CHATROOM_FILE,o.jz.UPLOAD_GROUP_FILE].includes(h)&&u.dataReport.geOperateFun({operationName:h})({isEndApi:!0,data:{isSuccess:0,requestMethod:"POST",requestName:h,requestElapse:r,requestUrl:E,code:(null==T?void 0:T.status)||0,codeDesc:"upload file error"}}),e.onFileUploadError&&e.onFileUploadError(t)};function O(e){y({type:n.C.WEBIM_UPLOADFILE_ERROR,data:T})}var T=new XMLHttpRequest;T.upload&&(null===(r=(t=T.upload).addEventListener)||void 0===r||r.call(t,"progress",e.onFileUploadProgress||i.om,!1)),T.addEventListener("abort",e.onFileUploadCanceled||i.om,!1),T.addEventListener("error",O,!1),T.addEventListener("load",(function(t){try{var r=JSON.parse(T.responseText);if(400===T.status)return y({type:n.C.WEBIM_UPLOADFILE_ERROR,data:r}),!1;try{!function(t){var r=(new Date).getTime()-c;u.dataReport&&h&&[o.jz.UPLOAD_MSG_ATTACH,o.jz.UPLOAD_CHATROOM_FILE,o.jz.UPLOAD_GROUP_FILE].includes(h)&&u.dataReport.geOperateFun({operationName:h})({isEndApi:!0,data:{isSuccess:(null==t?void 0:t.error)?0:1,requestMethod:"POST",requestName:h,requestElapse:r,requestUrl:E,code:T.status,codeDesc:(null==t?void 0:t.error_description)||""}}),e.onFileUploadComplete&&e.onFileUploadComplete(t)}(r)}catch(t){y({type:n.C.WEBIM_CONNCTION_CALLBACK_INNER_ERROR,data:t})}}catch(t){y({type:n.C.WEBIM_UPLOADFILE_ERROR,data:T.responseText})}}),!1),T.addEventListener("timeout",O,!1),T.timeout=s.Gc,T.open("POST",E),T.setRequestHeader("restrict-access","true"),T.setRequestHeader("Accept","*/*"),T.setRequestHeader("Authorization","Bearer "+p);var R=new FormData;R.append("file",e.file.data),e.thumbnailWidth&&R.append("thumbnail-width",e.thumbnailWidth+""),e.thumbnailHeight&&R.append("thumbnail-height",e.thumbnailHeight+""),T.send(R)}},3251:function(e,t,r){"use strict";var n=r(6080),i=r(9565),o=r(5548),s=r(8981),a=r(6198),u=r(81),c=r(851),l=r(4209),d=r(1108),f=r(4644).aTypedArrayConstructor,h=r(5854);e.exports=function(e){var t,r,p,v,m,_,g,E,y=o(this),O=s(e),T=arguments.length,R=T>1?arguments[1]:void 0,I=void 0!==R,S=c(O);if(S&&!l(S))for(E=(g=u(O,S)).next,O=[];!(_=i(E,g)).done;)O.push(_.value);for(I&&T>2&&(R=n(R,arguments[2])),r=a(O),p=new(f(y))(r),v=d(p),t=0;r>t;t++)m=I?R(O[t],t):O[t],p[t]=v?h(m):+m;return p}},3262:function(e,t,r){"use strict";var n,i,o=e.exports=r(3610),s=r(4529);o.codegen=r(8561),o.fetch=r(5212),o.path=r(9207),o.fs=o.inquire("fs"),o.toArray=function(e){if(e){for(var t=Object.keys(e),r=new Array(t.length),n=0;n<t.length;)r[n]=e[t[n++]];return r}return[]},o.toObject=function(e){for(var t={},r=0;r<e.length;){var n=e[r++],i=e[r++];void 0!==i&&(t[n]=i)}return t};var a=/\\/g,u=/"/g;o.isReserved=function(e){return/^(?:do|if|in|for|let|new|try|var|case|else|enum|eval|false|null|this|true|void|with|break|catch|class|const|super|throw|while|yield|delete|export|import|public|return|static|switch|typeof|default|extends|finally|package|private|continue|debugger|function|arguments|interface|protected|implements|instanceof)$/.test(e)},o.safeProp=function(e){return!/^[$\w_]+$/.test(e)||o.isReserved(e)?'["'+e.replace(a,"\\\\").replace(u,'\\"')+'"]':"."+e},o.ucFirst=function(e){return e.charAt(0).toUpperCase()+e.substring(1)};var c=/_([a-z])/g;o.camelCase=function(e){return e.substring(0,1)+e.substring(1).replace(c,(function(e,t){return t.toUpperCase()}))},o.compareFieldsById=function(e,t){return e.id-t.id},o.decorateType=function(e,t){if(e.$type)return t&&e.$type.name!==t&&(o.decorateRoot.remove(e.$type),e.$type.name=t,o.decorateRoot.add(e.$type)),e.$type;n||(n=r(7882));var i=new n(t||e.name);return o.decorateRoot.add(i),i.ctor=e,Object.defineProperty(e,"$type",{value:i,enumerable:!1}),Object.defineProperty(e.prototype,"$type",{value:i,enumerable:!1}),i};var l=0;o.decorateEnum=function(e){if(e.$type)return e.$type;i||(i=r(5643));var t=new i("Enum"+l++,e);return o.decorateRoot.add(t),Object.defineProperty(e,"$type",{value:t,enumerable:!1}),t},o.setProperty=function(e,t,r){if("object"!=typeof e)throw TypeError("dst must be an object");if(!t)throw TypeError("path must be specified");return function e(t,r,n){var i=r.shift();if("__proto__"===i||"prototype"===i)return t;if(r.length>0)t[i]=e(t[i]||{},r,n);else{var o=t[i];o&&(n=[].concat(o).concat(n)),t[i]=n}return t}(e,t=t.split("."),r)},Object.defineProperty(o,"decorateRoot",{get:function(){return s.decorated||(s.decorated=new(r(5330)))}})},3288:function(e,t,r){"use strict";var n=r(9504),i=r(6840),o=Date.prototype,s="Invalid Date",a="toString",u=n(o[a]),c=n(o.getTime);String(new Date(NaN))!==s&&i(o,a,(function(){var e=c(this);return e==e?u(this):s}))},3296:function(e,t,r){"use strict";r(5806)},3312:function(e,t,r){"use strict";r.d(t,{S:function(){return i}}),r(9089);var n=r(4269),i=function(){function e(e){var t=e.type,r=e.id||n.Wp.getUniqueId();this.id=r,this.type=t}return e.prototype.set=function(e){this.body={id:this.id,chatType:e.chatType||"singleChat",type:"custom",to:e.to,customEvent:e.customEvent,customExts:e.customExts,from:e.from,roomType:e.roomType,success:e.success,fail:e.fail,ext:e.ext,time:Date.now()}},e.prototype.setChatType=function(e){return!!this.body&&(this.body.chatType=e,!0)},e.prototype.setGroup=function(e){return!!this.body&&(this.body.group=e,!0)},e.create=function(e){return{id:n.Wp.getUniqueId(),chatType:e.chatType||"singleChat",type:"custom",to:e.to,customEvent:e.customEvent,customExts:e.customExts,from:e.from||"",ext:e.ext,time:Date.now(),msgConfig:e.msgConfig,isChatThread:e.isChatThread,priority:e.priority,deliverOnlineOnly:e.deliverOnlineOnly,receiverList:e.receiverList,webhookEnv:e.webhookEnv}},e}()},3362:function(e,t,r){"use strict";r(436),r(6499),r(2003),r(7743),r(1481),r(280)},3389:function(e,t,r){"use strict";var n=r(4576),i=r(3724),o=Object.getOwnPropertyDescriptor;e.exports=function(e){if(!i)return n[e];var t=o(n,e);return t&&t.value}},3392:function(e,t,r){"use strict";var n=r(9504),i=0,o=Math.random(),s=n(1..toString);e.exports=function(e){return"Symbol("+(void 0===e?"":e)+")_"+s(++i+o,36)}},3418:function(e,t,r){"use strict";var n=r(6518),i=r(7916);n({target:"Array",stat:!0,forced:!r(4428)((function(e){Array.from(e)}))},{from:i})},3438:function(e,t,r){"use strict";var n=r(8551),i=r(34),o=r(6043);e.exports=function(e,t){if(n(e),i(t)&&t.constructor===e)return t;var r=o.f(e);return(0,r.resolve)(t),r.promise}},3449:function(e,t,r){"use strict";e.exports=d;var n,i=r(3610),o=i.LongBits,s=i.base64,a=i.utf8;function u(e,t,r){this.fn=e,this.len=t,this.next=void 0,this.val=r}function c(){}function l(e){this.head=e.head,this.tail=e.tail,this.len=e.len,this.next=e.states}function d(){this.len=0,this.head=new u(c,0,0),this.tail=this.head,this.states=null}var f=function(){return i.Buffer?function(){return(d.create=function(){return new n})()}:function(){return new d}};function h(e,t,r){t[r]=255&e}function p(e,t){this.len=e,this.next=void 0,this.val=t}function v(e,t,r){for(;e.hi;)t[r++]=127&e.lo|128,e.lo=(e.lo>>>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 m(e,t,r){t[r]=255&e,t[r+1]=e>>>8&255,t[r+2]=e>>>16&255,t[r+3]=e>>>24}d.create=f(),d.alloc=function(e){return new i.Array(e)},i.Array!==Array&&(d.alloc=i.pool(d.alloc,i.Array.prototype.subarray)),d.prototype._push=function(e,t,r){return this.tail=this.tail.next=new u(e,t,r),this.len+=t,this},p.prototype=Object.create(u.prototype),p.prototype.fn=function(e,t,r){for(;e>127;)t[r++]=127&e|128,e>>>=7;t[r]=e},d.prototype.uint32=function(e){return this.len+=(this.tail=this.tail.next=new p((e>>>=0)<128?1:e<16384?2:e<2097152?3:e<268435456?4:5,e)).len,this},d.prototype.int32=function(e){return e<0?this._push(v,10,o.fromNumber(e)):this.uint32(e)},d.prototype.sint32=function(e){return this.uint32((e<<1^e>>31)>>>0)},d.prototype.uint64=function(e){var t=o.from(e);return this._push(v,t.length(),t)},d.prototype.int64=d.prototype.uint64,d.prototype.sint64=function(e){var t=o.from(e).zzEncode();return this._push(v,t.length(),t)},d.prototype.bool=function(e){return this._push(h,1,e?1:0)},d.prototype.fixed32=function(e){return this._push(m,4,e>>>0)},d.prototype.sfixed32=d.prototype.fixed32,d.prototype.fixed64=function(e){var t=o.from(e);return this._push(m,4,t.lo)._push(m,4,t.hi)},d.prototype.sfixed64=d.prototype.fixed64,d.prototype.float=function(e){return this._push(i.float.writeFloatLE,4,e)},d.prototype.double=function(e){return this._push(i.float.writeDoubleLE,8,e)};var _=i.Array.prototype.set?function(e,t,r){t.set(e,r)}:function(e,t,r){for(var n=0;n<e.length;++n)t[r+n]=e[n]};d.prototype.bytes=function(e){var t=e.length>>>0;if(!t)return this._push(h,1,0);if(i.isString(e)){var r=d.alloc(t=s.length(e));s.decode(e,r,0),e=r}return this.uint32(t)._push(_,t,e)},d.prototype.string=function(e){var t=a.length(e);return t?this.uint32(t)._push(a.write,t,e):this._push(h,1,0)},d.prototype.fork=function(){return this.states=new l(this),this.head=this.tail=new u(c,0,0),this.len=0,this},d.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 u(c,0,0),this.len=0),this},d.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},d.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},d._configure=function(e){n=e,d.create=f(),n._configure()}},3451:function(e,t,r){"use strict";var n=r(6518),i=r(9504),o=r(421),s=r(34),a=r(9297),u=r(4913).f,c=r(8480),l=r(298),d=r(4124),f=r(3392),h=r(2744),p=!1,v=f("meta"),m=0,_=function(e){u(e,v,{value:{objectID:"O"+m++,weakData:{}}})},g=e.exports={enable:function(){g.enable=function(){},p=!0;var e=c.f,t=i([].splice),r={};r[v]=1,e(r).length&&(c.f=function(r){for(var n=e(r),i=0,o=n.length;i<o;i++)if(n[i]===v){t(n,i,1);break}return n},n({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:l.f}))},fastKey:function(e,t){if(!s(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!a(e,v)){if(!d(e))return"F";if(!t)return"E";_(e)}return e[v].objectID},getWeakData:function(e,t){if(!a(e,v)){if(!d(e))return!0;if(!t)return!1;_(e)}return e[v].weakData},onFreeze:function(e){return h&&p&&d(e)&&!a(e,v)&&_(e),e}};o[v]=!0},3484:function(e,t){"use strict";var r=function(){function e(e){this.type=e.type,this.message=e.message,this.data=e.data}return e.create=function(t){return new e(t)},e}();t.A=r},3500:function(e,t,r){"use strict";var n=r(4576),i=r(7400),o=r(9296),s=r(235),a=r(6699),u=function(e){if(e&&e.forEach!==s)try{a(e,"forEach",s)}catch(t){e.forEach=s}};for(var c in i)i[c]&&u(n[c]&&n[c].prototype);u(o)},3506:function(e,t,r){"use strict";var n=r(3925),i=String,o=TypeError;e.exports=function(e){if(n(e))return e;throw new o("Can't set "+i(e)+" as a prototype")}},3517:function(e,t,r){"use strict";var n=r(9504),i=r(9039),o=r(4901),s=r(6955),a=r(7751),u=r(3706),c=function(){},l=a("Reflect","construct"),d=/^\s*(?:class|function)\b/,f=n(d.exec),h=!d.test(c),p=function(e){if(!o(e))return!1;try{return l(c,[],e),!0}catch(e){return!1}},v=function(e){if(!o(e))return!1;switch(s(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return h||!!f(d,u(e))}catch(e){return!0}};v.sham=!0,e.exports=!l||i((function(){var e;return p(p.call)||!p(Object)||!p((function(){e=!0}))||e}))?v:p},3602:function(e){"use strict";var t=4503599627370496;e.exports=function(e){return e+t-t}},3603:function(e,t,r){"use strict";var n,i,o,s,a,u,c;r.d(t,{G8:function(){return a},He:function(){return c},S5:function(){return n},TT:function(){return o},Wz:function(){return u},jz:function(){return i},z1:function(){return s}}),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_FETCH_CONVERSATIONS=10]="REST_FETCH_CONVERSATIONS",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.REST_FETCH_CONVERSATIONS="REST_FETCH_CONVERSATIONS",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",e.REST_FETCHHISTORYMESSAGE="REST_FETCHHISTORYMESSAGE",e.REST_SEARCH_MESSAGES="REST_SEARCH_MESSAGES",e.MSYNC_SYNCOFFLINEMESSAGE="MSYNC_SYNCOFFLINEMESSAGE"}(i||(i={})),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"}(o||(o={})),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"}(s||(s={})),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"}(a||(a={})),function(e){e[e.web=0]="web",e[e.native=1]="native"}(u||(u={})),function(e){e[e.singleChat=0]="singleChat",e[e.groupChat=1]="groupChat",e[e.chatRoom=2]="chatRoom"}(c||(c={}))},3607:function(e,t,r){"use strict";var n=r(2839).match(/AppleWebKit\/(\d+)\./);e.exports=!!n&&+n[1]},3610:function(e,t,r){"use strict";var n=t;function i(e,t,r){for(var n=Object.keys(t),i=0;i<n.length;++i)void 0!==e[n[i]]&&r||(e[n[i]]=t[n[i]]);return e}function o(e){function t(e,r){if(!(this instanceof t))return new t(e,r);Object.defineProperty(this,"message",{get:function(){return e}}),Error.captureStackTrace?Error.captureStackTrace(this,t):Object.defineProperty(this,"stack",{value:(new Error).stack||""}),r&&i(this,r)}return(t.prototype=Object.create(Error.prototype)).constructor=t,Object.defineProperty(t.prototype,"name",{get:function(){return e}}),t.prototype.toString=function(){return this.name+": "+this.message},t}n.asPromise=r(8045),n.base64=r(8839),n.EventEmitter=r(4358),n.float=r(9410),n.inquire=r(4153),n.utf8=r(1447),n.pool=r(9390),n.LongBits=r(2239),n.isNode=Boolean(void 0!==r.g&&r.g&&r.g.process&&r.g.process.versions&&r.g.process.versions.node),n.global=n.isNode&&r.g||"undefined"!=typeof window&&window||"undefined"!=typeof self&&self||this,n.emptyArray=Object.freeze?Object.freeze([]):[],n.emptyObject=Object.freeze?Object.freeze({}):{},n.isInteger=Number.isInteger||function(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e},n.isString=function(e){return"string"==typeof e||e instanceof String},n.isObject=function(e){return e&&"object"==typeof e},n.isset=n.isSet=function(e,t){var r=e[t];return!(null==r||!e.hasOwnProperty(t))&&("object"!=typeof r||(Array.isArray(r)?r.length:Object.keys(r).length)>0)},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=i,n.lcFirst=function(e){return e.charAt(0).toLowerCase()+e.substring(1)},n.newError=o,n.ProtocolError=o("ProtocolError"),n.oneOfGetter=function(e){for(var t={},r=0;r<e.length;++r)t[e[r]]=1;return function(){for(var e=Object.keys(this),r=e.length-1;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<e.length;++r)e[r]!==t&&delete this[e[r]]}},n.toJSONOptions={longs:String,enums:String,bytes:String,json:!0},n._configure=function(){var e=n.Buffer;e?(n._Buffer_from=e.from!==Uint8Array.from&&e.from||function(t,r){return new e(t,r)},n._Buffer_allocUnsafe=e.allocUnsafe||function(t){return new e(t)}):n._Buffer_from=n._Buffer_allocUnsafe=null}},3635:function(e,t,r){"use strict";var n=r(9039),i=r(4576).RegExp;e.exports=n((function(){var e=i(".","s");return!(e.dotAll&&e.test("\n")&&"s"===e.flags)}))},3684:function(e,t,r){"use strict";var n=r(4644).exportTypedArrayMethod,i=r(9039),o=r(4576),s=r(9504),a=o.Uint8Array,u=a&&a.prototype||{},c=[].toString,l=s([].join);i((function(){c.call({})}))&&(c=function(){return l(this)});var d=u.toString!==c;n("toString",c,d)},3706:function(e,t,r){"use strict";var n=r(9504),i=r(4901),o=r(7629),s=n(Function.toString);i(o.inspectSource)||(o.inspectSource=function(e){return s(e)}),e.exports=o.inspectSource},3709:function(e,t,r){"use strict";var n=r(2839).match(/firefox\/(\d+)/i);e.exports=!!n&&+n[1]},3717:function(e,t){"use strict";t.f=Object.getOwnPropertySymbols},3724:function(e,t,r){"use strict";var n=r(9039);e.exports=!n((function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]}))},3763:function(e,t,r){"use strict";var n=r(2839);e.exports=/MSIE|Trident/.test(n)},3792:function(e,t,r){"use strict";var n=r(5397),i=r(6469),o=r(6269),s=r(1181),a=r(4913).f,u=r(1088),c=r(2529),l=r(6395),d=r(3724),f="Array Iterator",h=s.set,p=s.getterFor(f);e.exports=u(Array,"Array",(function(e,t){h(this,{type:f,target:n(e),index:0,kind:t})}),(function(){var e=p(this),t=e.target,r=e.index++;if(!t||r>=t.length)return e.target=null,c(void 0,!0);switch(e.kind){case"keys":return c(r,!1);case"values":return c(t[r],!1)}return c([r,t[r]],!1)}),"values");var v=o.Arguments=o.Array;if(i("keys"),i("values"),i("entries"),!l&&d&&"values"!==v.name)try{a(v,"name",{value:"values"})}catch(e){}},3802:function(e,t,r){"use strict";var n=r(9504),i=r(7750),o=r(655),s=r(7452),a=n("".replace),u=RegExp("^["+s+"]+"),c=RegExp("(^|[^"+s+"])["+s+"]+$"),l=function(e){return function(t){var r=o(i(t));return 1&e&&(r=a(r,u,"")),2&e&&(r=a(r,c,"$1")),r}};e.exports={start:l(1),end:l(2),trim:l(3)}},3850:function(e,t,r){"use strict";r.d(t,{P:function(){return d}}),r(2675),r(9463),r(2259),r(113),r(8980),r(3792),r(2062),r(4782),r(5086),r(6910),r(3288),r(6033),r(2892),r(9085),r(9432),r(6099),r(8781),r(1415),r(7764),r(2953);var n=r(8570),i=r.n(n),o=r(666),s=r(7968),a=r(8093);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 c,l=function(){return l=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},l.apply(this,arguments)};!function(e){e[e.STREAM_START=0]="STREAM_START",e[e.STREAM_START_COMPLETED=1]="STREAM_START_COMPLETED",e[e.STREAM_IN_PROGRESS=2]="STREAM_IN_PROGRESS",e[e.STREAM_COMPLETED=3]="STREAM_COMPLETED",e[e.STREAM_FULL=4]="STREAM_FULL"}(c||(c={}));var d=new(function(){function e(){this.cache=new Map,this.mergedContent=new Map,this.lastDispatchedSeq=new Map,this.hasCompleted=new Map,this.msgExt=new Map}return e.prototype.addChunk=function(e,t){this.cache.has(e)||(this.cache.set(e,[]),this.mergedContent.set(e,""),this.lastDispatchedSeq.set(e,-1),this.hasCompleted.set(e,!1)),t.streamInfo.status===o.J.COMPLETED&&this.hasCompleted.set(e,!0);var r=this.cache.get(e);-1===r.findIndex((function(e){return e.seq===t.seq}))?(r.push(t),r.sort((function(e,t){return e.seq-t.seq}))):s.vF.warn("Stream message chunk already exists",t.seq)},e.prototype.getMergedContent=function(e){return this.mergedContent.get(e)||""},e.prototype.appendToMergedContent=function(e,t){var r=this.mergedContent.get(e)||"";this.mergedContent.set(e,r+t)},e.prototype.getChunks=function(e){return this.cache.get(e)||[]},e.prototype.getSequentialChunks=function(e){var t=this.cache.get(e);if(!t||0===t.length)return[];for(var r=this.lastDispatchedSeq.get(e),n=[],i=0,o=t;i<o.length;i++){var s=o[i];if(0!==n.length){var a=n[n.length-1];if(s.seq!==a.seq+1)break;n.push(s)}else{if(void 0!==r&&-1!==r&&s.seq!==r+1)continue;n.push(s)}}return n},e.prototype.markDispatched=function(e,t){var r;t>(null!==(r=this.lastDispatchedSeq.get(e))&&void 0!==r?r:-1)&&this.lastDispatchedSeq.set(e,t)},e.prototype.getLastDispatchedSeq=function(e){var t;return null!==(t=this.lastDispatchedSeq.get(e))&&void 0!==t?t:-1},e.prototype.isCompleted=function(e){var t=this.cache.get(e);return!(!t||0===t.length)&&t[t.length-1].streamInfo.status===o.J.COMPLETED},e.prototype.hasMissingSeqs=function(e){var t=this.cache.get(e);if(!t||0===t.length)return!1;var r=t.find((function(e){return e.streamInfo.status===o.J.START||e.streamInfo.status===o.J.START_AND_COMPLETED}));if(!r)return!0;for(var n=r.seq,i=Math.max.apply(Math,t.map((function(e){return e.seq}))),s=new Set(t.map((function(e){return e.seq}))),a=n;a<=i;a++)if(!s.has(a))return!0;return!1},e.prototype.setMergedContent=function(e,t){this.mergedContent.set(e,t)},e.prototype.hasReceivedCompleted=function(e){return this.hasCompleted.get(e)||!1},e.prototype.hasReceivedFull=function(e){var t=this.cache.get(e);return!!t&&t.some((function(e){return e.streamInfo.status===c.STREAM_FULL}))},e.prototype.setMsgExt=function(e,t){this.msgExt.set(e,t)},e.prototype.getMsgExt=function(e){return this.msgExt.get(e)},e.prototype.clear=function(e){this.cache.delete(e),this.mergedContent.delete(e),this.lastDispatchedSeq.delete(e),this.hasCompleted.delete(e),this.msgExt.delete(e)},e.prototype.clearAll=function(){this.cache.clear(),this.mergedContent.clear(),this.lastDispatchedSeq.clear(),this.hasCompleted.clear(),this.msgExt.clear()},e}());function f(e,t,r,n,i,o,s,a,u,c,l,d,f,h,p,v,m){var _={id:e,chatType:t,type:"txt",to:r,msg:n,from:i,time:o,stream:s,onlineState:a};return function(e,t,r,n,i,o,s,a,u,c){t&&Object.keys(t).length>0&&(e.ext=t),r&&r.length>0&&(e.reactions=r),n&&n.length>0&&(e.translations=n),i&&i.operationCount>0&&(e.modifiedInfo=i),o&&(e.chatThread=o),s&&(e.chatThreadOverview=s),a&&(e.isContentReplaced=a),u&&(e.isRead=u),c&&(e.isDelivered=c)}(_,u,c,l,d,f,h,p,v,m),_}t.A=function(e,t,r,n,h,p,v,m,_,g,E,y,O,T,R,I,S,C,b){var N,A,M,w,L,U;try{var x=function(e,t){var r,n=null!==(r=e.streamError)&&void 0!==r?r:0;512===n?n=a.C.MESSAGE_STREAM_INTERVAL_TIMEOUT:513===n&&(n=a.C.MESSAGE_STREAM_TIMEOUT);var o={customType:e.streamType,seq:Number(e.streamSeq.toString()),status:e.streamStatus,errorType:n,text:t,finishReason:e.streamFinishReason};return void 0!==e.streamSeq&&(e.streamSeq&&"object"===u(e.streamSeq)?o.seq=Number(new(i())(e.streamSeq.low,e.streamSeq.high,e.streamSeq.unsigned).toString()):o.seq=Number(e.streamSeq)),o}(t.stream,e.text),D=x.seq,P=x.text,k=(x.finishReason,t.stream.streamStatus),F={msgId:n,seq:D,text:P,streamInfo:x,timestamp:Number(v)};if(d.addChunk(n,F),k===c.STREAM_FULL){var H=d.getChunks(n);if(0===H.length){var B=P,G=d.getMergedContent(n),W=B.slice(G.length),j=l(l({},x),{status:o.J.START_AND_COMPLETED,text:W}),q=f(n,m,p,B,h,Number(v),j,_,g,E,y,O,T,R,I,S,C);return!b&&(null===(A=null===(N=this.eventHandler)||void 0===N?void 0:N.dispatch)||void 0===A||A.call(N,"onStreamMessage",q)),d.setMergedContent(n,B),d.clear(n),q}var K=H[H.length-2];if(K&&K.streamInfo.status===o.J.START_AND_COMPLETED)return void s.vF.debug("Stream message FULL ignored (already dispatched)");var z=d.hasMissingSeqs(n),V=d.hasReceivedCompleted(n);if(z||!V){s.vF.debug("Stream message has missing (FULL)",{msgId:n,seq:D}),B=P,G=d.getMergedContent(n),W=B.slice(G.length),"seq"in(j=l(l({},x),{status:0===x.errorType?o.J.COMPLETED:o.J.ERROR,text:W}))&&delete j.seq;var J=H[0].timestamp;return q=f(n,m,p,B,h,Number(J)||Number(v),j,_,g,E,y,O,T,R,I,S,C),!b&&(null===(w=null===(M=this.eventHandler)||void 0===M?void 0:M.dispatch)||void 0===w||w.call(M,"onStreamMessage",q)),d.setMergedContent(n,B),s.vF.debug("Stream message dispatched (FULL with missing)",{msgId:n,seq:D,status:"STREAM_COMPLETED",incrementalLength:W.length,fullLength:B.length}),d.clear(n),q}return s.vF.debug("Stream message FULL ignored (no missing)",{msgId:n,seq:D}),void d.clear(n)}if(d.hasMissingSeqs(n))return void s.vF.debug("Stream message has missing",{msgId:n,seq:D});for(var Y=d.getSequentialChunks(n),X=0,Q=Y;X<Q.length;X++){var $=Q[X],Z=d.getMergedContent(n)+$.text,ee=(W=$.text,$.streamInfo.status);ee===c.STREAM_FULL&&(ee=o.J.COMPLETED),0!==$.streamInfo.errorType&&(ee=o.J.ERROR),"seq"in(j=l(l({},$.streamInfo),{status:ee,text:W}))&&delete j.seq,q=f(n,m,p,Z,h,(J=d.getChunks(n)[0].timestamp)||$.timestamp,j,_,g,E,y,O,T,R,I,S,C),!b&&(null===(U=null===(L=this.eventHandler)||void 0===L?void 0:L.dispatch)||void 0===U||U.call(L,"onStreamMessage",q)),d.markDispatched(n,$.seq),d.appendToMergedContent(n,$.text),s.vF.debug("Stream message dispatched",{msgId:n,seq:$.seq,status:ee,incrementalLength:W.length,mergedLength:Z.length})}var te=d.getMergedContent(n);s.vF.debug("Stream message processed",{msgId:n,seq:D,status:k,textLength:P.length,mergedLength:te.length,dispatchedChunks:Y.length})}catch(t){s.vF.error("Error handling stream message",t,{msgId:n,msgBody:e})}}},3887:function(e,t,r){var n,i,o;!function(s){"use strict";if(null!=t&&"number"!=typeof t.nodeType)e.exports=s();else if(null!=r.amdO)i=[],void 0===(o="function"==typeof(n=s)?n.apply(t,i):n)||(e.exports=o);else{var a=s(),u="undefined"!=typeof self?self:$.global;"function"!=typeof u.btoa&&(u.btoa=a.btoa),"function"!=typeof u.atob&&(u.atob=a.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,i,o=String(r),s=0,a=e,u="";o.charAt(0|s)||(a="=",s%1);u+=a.charAt(63&n>>8-s%1*8)){if((i=o.charCodeAt(s+=3/4))>255)throw new t("'btoa' failed: The string to be encoded contains characters outside of the Latin1 range.");n=n<<8|i}return u},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 i,o,s=0,a=0,u="";o=n.charAt(a++);~o&&(i=s%4?64*i+o:o,s++%4)?u+=String.fromCharCode(255&i>>(-2*s&6)):0)o=e.indexOf(o);return u}}}))},3925:function(e,t,r){"use strict";var n=r(34);e.exports=function(e){return n(e)||null===e}},3994:function(e,t,r){"use strict";var n=r(7657).IteratorPrototype,i=r(2360),o=r(6980),s=r(687),a=r(6269),u=function(){return this};e.exports=function(e,t,r,c){var l=t+" Iterator";return e.prototype=i(n,{next:o(+!c,r)}),s(e,l,!1,!0),a[l]=u,e}},4035:function(e,t,r){"use strict";r.d(t,{Z:function(){return i}});var n=r(4269),i=function(){function e(e){var t=e.id;this.id=t,this.type=e.type}return e.prototype.set=function(e){this.body={id:this.id,ackId:e.id,type:"read",to:e.to,from:e.from||"",chatType:e.chatType}},e.create=function(e){return{id:n.Wp.getUniqueId(),chatType:e.chatType,ackId:e.id,type:"read",to:e.to,from:e.from||"",ackContent:e.ackContent,isChatThread:e.isChatThread,priority:e.priority,deliverOnlineOnly:e.deliverOnlineOnly}},e}()},4055:function(e,t,r){"use strict";var n=r(4576),i=r(34),o=n.document,s=i(o)&&i(o.createElement);e.exports=function(e){return s?o.createElement(e):{}}},4117:function(e){"use strict";e.exports=function(e){return null==e}},4124:function(e,t,r){"use strict";var n=r(9039),i=r(34),o=r(2195),s=r(5652),a=Object.isExtensible,u=n((function(){a(1)}));e.exports=u||s?function(e){return!!i(e)&&(!s||"ArrayBuffer"!==o(e))&&(!a||a(e))}:a},4153:function(module){"use strict";function inquire(moduleName){try{var mod=eval("quire".replace(/^/,"re"))(moduleName);if(mod&&(mod.length||Object.keys(mod).length))return mod}catch(e){}return null}module.exports=inquire},4170:function(e,t,r){"use strict";var n=r(6518),i=r(566);n({target:"Function",proto:!0,forced:Function.bind!==i},{bind:i})},4209:function(e,t,r){"use strict";var n=r(8227),i=r(6269),o=n("iterator"),s=Array.prototype;e.exports=function(e){return void 0!==e&&(i.Array===e||s[o]===e)}},4213:function(e,t,r){"use strict";var n=r(3724),i=r(9504),o=r(9565),s=r(9039),a=r(1072),u=r(3717),c=r(8773),l=r(8981),d=r(7055),f=Object.assign,h=Object.defineProperty,p=i([].concat);e.exports=!f||s((function(){if(n&&1!==f({b:1},f(h({},"a",{enumerable:!0,get:function(){h(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},t={},r=Symbol("assign detection"),i="abcdefghijklmnopqrst";return e[r]=7,i.split("").forEach((function(e){t[e]=e})),7!==f({},e)[r]||a(f({},t)).join("")!==i}))?function(e,t){for(var r=l(e),i=arguments.length,s=1,f=u.f,h=c.f;i>s;)for(var v,m=d(arguments[s++]),_=f?p(a(m),f(m)):a(m),g=_.length,E=0;g>E;)v=_[E++],n&&!o(h,m,v)||(r[v]=m[v]);return r}:f},4215:function(e,t,r){"use strict";var n=r(4576),i=r(2839),o=r(2195),s=function(e){return i.slice(0,e.length)===e};e.exports=s("Bun/")?"BUN":s("Cloudflare-Workers")?"CLOUDFLARE":s("Deno/")?"DENO":s("Node.js/")?"NODE":n.Bun&&"string"==typeof Bun.version?"BUN":n.Deno&&"object"==typeof Deno.version?"DENO":"process"===o(n.process)?"NODE":n.window&&n.document?"BROWSER":"REST"},4265:function(e,t,r){"use strict";var n=r(2839);e.exports=/ipad|iphone|ipod/i.test(n)&&"undefined"!=typeof Pebble},4269:function(e,t,r){"use strict";r.d(t,{En:function(){return y},LP:function(){return _},QM:function(){return I},RD:function(){return p},RG:function(){return S},Wp:function(){return N},X0:function(){return O},i9:function(){return E},om:function(){return h}}),r(8706),r(4423),r(5276),r(3792),r(8921),r(4782),r(739),r(3288),r(2010),r(2892),r(9868),r(9085),r(9432),r(6099),r(3362),r(7495),r(8781),r(7764),r(2953),r(6031),r(3296),r(7208),r(8408);var n=r(8093),i=r(1798),o=r(3603),s=r(9061),a=r(7968),u=r(8288),c=r(1487),l=r(3240),d=r(4331),f=function(){return f=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},f.apply(this,arguments)},h=function(){};function p(e,t){var r,s=this;return T().platform===E.WEB?new Promise((function(t,o){var s=e.dataType||"text",u=e.success||h,c=e.error||h,l=new XMLHttpRequest;l.timeout=d._h;var f=!1;l.ontimeout=function(){a.vF.warn("request timeout"),f=!0;var e={type:n.C.REQUEST_TIMEOUT,message:"Request Timeout",errorType:"timeout_error",xhr:l};c(e),o(e)},l.onerror=function(){o({type:n.C.REQUEST_UNKNOWN,message:"Request Unknow Error",errorType:"onerror",xhr:l})},l.onabort=function(){o({type:n.C.REQUEST_ABORT,message:"Request Abort",errorType:"onabort",xhr:l})},l.onreadystatechange=function(){if(4===l.readyState){var e=(new Date).getTime()-r,d=l.status||0,h={elapse:e,httpCode:d};if(200===d){N.ajaxUnconventionalErrorTimes=0;try{switch(s){case"text":return u(l.responseText),void t(l.responseText);case"json":var p=JSON.parse(l.responseText);return p.extraInfo=h,u(p),void t(p);case"xml":return l.responseXML&&l.responseXML.documentElement?(u(l.responseXML.documentElement),void t(l.responseXML.documentElement)):(c({type:n.C.WEBIM_CONNCTION_AJAX_ERROR,data:l.responseText,message:"XHR.responseXML is null or XHR.responseXML.documentElement is null"}),void o({type:n.C.WEBIM_CONNCTION_AJAX_ERROR,data:l.responseText,message:"XHR.responseXML is null or XHR.responseXML.documentElement is null"}));default:c({type:n.C.WEBIM_CONNCTION_AJAX_ERROR,data:l.responseText,message:"Invalid dataType"}),o({type:n.C.WEBIM_CONNCTION_AJAX_ERROR,data:l.responseText,message:"Invalid dataType"})}return t(l.response||l.responseText),void u(l.response||l.responseText,l)}catch(e){o(e)}return}0===d?setTimeout((function(){a.vF.error("request timeout:",f),!f&&(0,i.A)(l,o,c,e)}),0):([400,401,403,404,429,500,503].includes(d)||(a.vF.warn("rest api request fail status:",d),N.ajaxUnconventionalErrorTimes++),(0,i.A)(l,o,c,e))}0===l.readyState&&(c({type:n.C.WEBIM_CONNCTION_AJAX_ERROR,data:l.responseText,message:"Request not initialized"}),o({type:n.C.WEBIM_CONNCTION_AJAX_ERROR,data:l.responseText,message:"Request not initialized"}))},e.responseType&&l.responseType&&(l.responseType=e.responseType),e.mimeType&&l.overrideMimeType(e.mimeType);var p=e.type||"POST",v=e.data||null,m="";if("get"===p.toLowerCase()&&v){for(var _ in v)v.hasOwnProperty(_)&&(m+=_+"="+v[_]+"&");m=m?m.slice(0,-1):m,e.url+=(e.url.indexOf("?")>0?"&":"?")+(m?m+"&":m)+"_v="+(new Date).getTime(),v=null,m=""}r=(new Date).getTime(),l.open(p,e.url);var g=e.headers||{};for(var E in g["Content-Type"]||(g["Content-Type"]="application/json"),g)g.hasOwnProperty(E)&&l.setRequestHeader(E,g[E]);l.send(v)})).then((function(r){var i,a;if(s.dataReport&&t&&t!==o.jz.SDK_INTERNAL){var u=s.dataReport.geOperateFun({operationName:t}),c=f({isSuccess:1,requestUrl:e.url,requestName:t,requestMethod:e.type},C(r.extraInfo));t===o.jz.REST_FETCH_CONVERSATIONS?c.resultCount=null===(i=r.data.channel_infos)||void 0===i?void 0:i.length:t===o.jz.REST_FETCHHISTORYMESSAGE&&(c.resultCount=null===(a=r.data.msgs)||void 0===a?void 0:a.length),u({isEndApi:!0,data:c})}return t===o.jz.SDK_INTERNAL&&(r.extraInfo.url=e.url),t!==o.jz.SDK_INTERNAL&&delete r.extraInfo,"Object"===v(r)?f(f({},r),{type:n.C.REQUEST_SUCCESS}):{data:r,type:n.C.REQUEST_SUCCESS}})).catch((function(n){var i,a;if(s.dataReport&&t&&t!==o.jz.SDK_INTERNAL&&s.dataReport.geOperateFun({operationName:t})({isEndApi:!0,data:f({isSuccess:0,requestUrl:e.url,requestName:t,requestMethod:e.type},C(n.extraInfo))}),t===o.jz.SDK_INTERNAL)if(n.extraInfo)n.extraInfo.url=e.url;else{var u={elapse:(new Date).getTime()-r,httpCode:null!==(a=null===(i=n.xhr)||void 0===i?void 0:i.status)&&void 0!==a?a:0,url:e.url};n.extraInfo=u}throw t!==o.jz.SDK_INTERNAL&&delete n.extraInfo,n})):m.call(this,e,t)}function v(e){return Object.prototype.toString.call(e).slice(8,-1)}function m(e,t){var r=this;return new Promise((function(r,i){var o=e.success||h,u=e.error||h,c=e.type||"POST",l=e.data||null,f="",p=(new Date).getTime(),v=N.getEnvInfo();if("get"===c.toLowerCase()&&l){for(var m in l)l.hasOwnProperty(m)&&(f+=m+"="+l[m]+"&");f=f?f.slice(0,-1):f,e.url+=(e.url.indexOf("?")>0?"&":"?")+(f?f+"&":f)+"_v="+(new Date).getTime(),l=null,f=""}var _={url:e.url,data:e.data,method:c,headers:{},timeout:d._h,success:function(e){var n,s,c,l,d,f={elapse:(new Date).getTime()-p,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===(c=null==e?void 0:e.data)||void 0===c?void 0:c.error_description)||""};if("200"===(null===(l=e.statusCode)||void 0===l?void 0:l.toString())||"200"===(null===(d=e.status)||void 0===d?void 0:d.toString())){e.data.extraInfo=f;var h=e.data;o(h),r(h)}else e.extraInfo=f,u(h=e),i(h),a.vF.warn(t,"reject reason: ",h)},complete:function(){},fail:function(e){var r={elapse:(new Date).getTime()-p,httpCode:s.XI,errDesc:"request:fail"};if(e.extraInfo=r,e.data={error:"request:fail",error_description:"request:fail"},"request:fail timeout"===e.errMsg)return i({type:n.C.REQUEST_TIMEOUT,message:"Request Timeout",extraInfo:r}),void u({type:n.C.REQUEST_TIMEOUT,message:"Request Timeout",extraInfo:r});u(e),i(e),a.vF.error(t,"fail reason:",e)}};if("zfb"===v.platform||"dd"===v.platform?_.headers=e.headers:_.header=e.headers,"dd"===v.platform)return dd.httpRequest(_);v.global.request(_)})).then((function(i){var s,a;if(r.dataReport&&t&&t!==o.jz.SDK_INTERNAL){var u=r.dataReport.geOperateFun({operationName:t}),c=f({isSuccess:1,requestUrl:e.url,requestName:t,requestMethod:e.type},C(i.extraInfo));t===o.jz.REST_FETCH_CONVERSATIONS?c.resultCount=null===(s=i.data.channel_infos)||void 0===s?void 0:s.length:t===o.jz.REST_FETCHHISTORYMESSAGE&&(c.resultCount=null===(a=i.data.msgs)||void 0===a?void 0:a.length),u({isEndApi:!0,data:c})}return t!==o.jz.SDK_INTERNAL&&delete i.extraInfo,"Object"===v(i)?f(f({},i),{type:n.C.REQUEST_SUCCESS}):{data:i,type:n.C.REQUEST_SUCCESS}})).catch((function(n){r.dataReport&&t&&t!==o.jz.SDK_INTERNAL&&r.dataReport.geOperateFun({operationName:t})({isEndApi:!0,data:f({isSuccess:0,requestUrl:e.url,requestName:t,requestMethod:e.type},C(n.extraInfo))}),t!==o.jz.SDK_INTERNAL&&delete n.extraInfo;var s=JSON.stringify(n.data||{}),a=f(f({},n),{status:n.statusCode||n.status||0,response:s,responseText:s});(0,i.A)(a,(function(e){throw f(f({},n),{message:e.message,type:e.type})}),h,0)}))}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()}function g(e,t){var r;return function(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];if(!e)return r;r=t?e.apply(t,n):e.apply(void 0,n),e=null}}var E,y=g((function(e,t){var r=T();if(r.platform!==E.WEB){var n=r.global,i=function(r){r.isConnected?e():t()};n.offNetworkStatusChange&&n.offNetworkStatusChange(i),n.onNetworkStatusChange&&n.onNetworkStatusChange(i)}else"undefined"!=typeof addEventListener&&(window.addEventListener("online",e),window.addEventListener("offline",t))})),O=g((function(e,t){var r,n,i=T();if(i.platform===E.WEB)"undefined"!=typeof document&&document.addEventListener("visibilitychange",(function(){document.hidden?null==t||t():null==e||e()}),!1);else{var o=i.global;o.onAppShow&&(null===(r=o.onAppShow)||void 0===r||r.call(o,e)),o.onAppHide&&(null===(n=o.onAppHide)||void 0===n||n.call(o,t))}}));function T(){return"undefined"!=typeof swan&&R(swan)?{platform:E.BAIDU,global:swan}:"undefined"!=typeof tt&&R(tt)?{platform:E.TT,global:tt}:"undefined"!=typeof dd&&R(dd)?{platform:E.DD,global:dd}:"undefined"!=typeof my&&R(my)?{platform:E.ZFB,global:my}:"undefined"!=typeof wx&&R(wx)||"undefined"!=typeof wx&&"function"==typeof wx.createCanvas?{platform:E.WX,global:wx}:"undefined"!=typeof qq&&R(qq)?{platform:E.QQ,global:qq}:"undefined"!=typeof uni&&R(uni)?{platform:E.UNI,global:uni}:"undefined"!=typeof window&&window.WebSocket?{platform:E.WEB,global:window}:{platform:E.NODE,global:r.g||{}}}function R(e){for(var t=["canIUse","getSystemInfo"],r=0,n=t.length;r<n;r++)if(!e[t[r]])return!1;return!0}function I(e,t){var r,i,o,s,a=this,d=e.accessToken,p=e.appKey,v=null===(i=null===(r=null==e?void 0:e.file)||void 0===r?void 0:r.data)||void 0===i?void 0:i.size,m=[],_="",g="";if(d)if(p&&(m=p.split("#"),_=m[0],g=m[1]),_||g){var y=e._filePath;if(y&&"string"==typeof y){var O=T(),R=null===(o=O.global)||void 0===o?void 0:o.uploadFile;if(O.platform!==E.WEB&&"function"==typeof R){var I=u.Z2[e.chatType]||"CHAT",S="".concat(e.apiUrl,"/").concat(_,"/").concat(g,"/chatfiles?chat-type=").concat(I,"&chat-target=").concat(e.to);return e._uploadMd5&&(S+="&md5=".concat(encodeURIComponent(e._uploadMd5))),e._uploadImageType&&(S+="&imagetype=".concat(e._uploadImageType),"number"==typeof e.width&&e.width>0&&(S+="&width=".concat(e.width)),"number"==typeof e.height&&e.height>0&&(S+="&height=".concat(e.height))),void R({url:S,filePath:y,name:"file",header:{"Content-Type":"multipart/form-data",Authorization:"Bearer "+d,"restrict-access":"true"},success:function(t){if(200===t.statusCode)try{var r="string"==typeof t.data?JSON.parse(t.data):t.data;e.onFileUploadComplete&&e.onFileUploadComplete(r)}catch(r){e.onFileUploadError&&e.onFileUploadError({type:n.C.WEBIM_UPLOADFILE_ERROR,data:f(f({},t),{rawData:t.data,error:r})})}else e.onFileUploadError&&e.onFileUploadError({type:n.C.WEBIM_UPLOADFILE_ERROR,data:t})},fail:function(t){e.onFileUploadError&&e.onFileUploadError({type:n.C.WEBIM_UPLOADFILE_ERROR,data:t})}})}e.onFileUploadError&&e.onFileUploadError({type:n.C.WEBIM_UPLOADFILE_ERROR,message:"Current platform does not support path-based upload"})}else if(v<=0)e.onFileUploadError&&e.onFileUploadError({type:n.C.WEBIM_UPLOADFILE_ERROR,message:"fileSize must be greater than 0"});else if(e.uploadUrl)l.A.call(this,f(f({},e),{orgName:_,appName:g,operateName:t,conversationInfo:{conversationId:e.to,conversationType:e.chatType}}));else{var C=u.aI.size||u.tz;this.uploadPartEnable&&v>1.5*C?new c.A(this,{file:null===(s=null==e?void 0:e.file)||void 0===s?void 0:s.data,onFileUploadProgress:e.onFileUploadProgress||h,onFileUploadComplete:e.onFileUploadComplete||h,onFileUploadError:e.onFileUploadError||h,onFileUploadCanceled:e.onFileUploadCanceled||h,conversationInfo:{conversationId:e.to,conversationType:e.chatType},onInitFail:function(){l.A.call(a,f(f({},e),{orgName:_,appName:g,operateName:t,conversationInfo:{conversationId:e.to,conversationType:e.chatType}}))},thumbnailInfo:{width:e.thumbnailWidth,height:e.thumbnailHeight},uploadMd5:e._uploadMd5,uploadImageType:e._uploadImageType,imageWidth:e.width,imageHeight:e.height}):l.A.call(this,f(f({},e),{orgName:_,appName:g,operateName:t,conversationInfo:{conversationId:e.to,conversationType:e.chatType}}))}}else e.onFileUploadError&&e.onFileUploadError({type:n.C.WEBIM_UPLOADFILE_ERROR,message:this._initWithAppId?"appId illegal":"AppKey illegal"});else e.onFileUploadError&&e.onFileUploadError({type:n.C.WEBIM_UPLOADFILE_NO_LOGIN,message:"AccessToken cannot be empty"})}function S(e,t){var r;e.onFileDownloadComplete=e.onFileDownloadComplete||h,e.onFileDownloadError=e.onFileDownloadError||h;var i=(new Date).getTime(),s=new XMLHttpRequest,u=this;s.addEventListener("load",(function(){var r,c=(new Date).getTime()-i;u.dataReport&&t&&t===o.jz.DOWN_GROUP_FILE&&u.dataReport.geOperateFun({operationName:t})({isEndApi:!0,data:{isSuccess:200===s.status?1:0,requestMethod:e.method||"GET",requestName:t,requestElapse:c,requestUrl:null==e?void 0:e.url,code:s.status,codeDesc:200===s.status?"":"download file error"}}),200===s.status?e.onFileDownloadComplete&&e.onFileDownloadComplete(s.response):403===s.status||404===s.status?((r=new FileReader).addEventListener("loadend",(function(t){var r;try{var i=JSON.parse(null===(r=t.target)||void 0===r?void 0:r.result);a.vF.error("download file failed","status:".concat(s.status),i),403===s.status?"chatfile no permission"===i.error_description?e.onFileDownloadError&&e.onFileDownloadError({type:n.C.WEBIM_DOWNLOADFILE_ERROR_NO_PERMISSION,id:e.id,xhr:s}):e.onFileDownloadError&&e.onFileDownloadError({type:n.C.PERMISSION_DENIED,id:e.id,xhr:s}):404===s.status&&("file_expired"===i.error?e.onFileDownloadError&&e.onFileDownloadError({type:n.C.WEBIM_DOWNLOADFILE_ERROR_EXPIRED,id:e.id,xhr:s}):e.onFileDownloadError&&e.onFileDownloadError({type:n.C.WEBIM_DOWNLOADFILE_ERROR,id:e.id,xhr:s}))}catch(t){a.vF.error("Error parsing download error response:",t),e.onFileDownloadError&&e.onFileDownloadError({type:n.C.WEBIM_DOWNLOADFILE_ERROR,id:e.id,xhr:s})}})),r.readAsText(s.response)):500===s.status?(a.vF.error("download file failed","status:".concat(s.status),"type:".concat(n.C.SERVER_UNKNOWN_ERROR)),e.onFileDownloadError&&e.onFileDownloadError({type:n.C.SERVER_UNKNOWN_ERROR,id:e.id,xhr:s})):(a.vF.error("download file failed","status:".concat(s.status),"type:".concat(n.C.WEBIM_DOWNLOADFILE_ERROR)),e.onFileDownloadError&&e.onFileDownloadError({type:n.C.WEBIM_DOWNLOADFILE_ERROR,id:e.id,xhr:s}))}),!1),s.addEventListener("error",(function(r){var a=(new Date).getTime()-i;u.dataReport&&t&&t===o.jz.DOWN_GROUP_FILE&&u.dataReport.geOperateFun({operationName:t})({isEndApi:!0,data:{isSuccess:0,requestMethod:e.method||"GET",requestName:t,requestElapse:a,requestUrl:null==e?void 0:e.url,code:(null==s?void 0:s.status)||0,codeDesc:"download file error"}}),e.onFileDownloadError&&e.onFileDownloadError({type:n.C.WEBIM_DOWNLOADFILE_ERROR,id:e.id,xhr:s})}),!1);var c=e.method||"GET",l=e.responseType||"blob",d=e.mimeType||"text/plain; charset=x-user-defined";s.open(c,e.url),"undefined"!=typeof Blob?s.responseType=l:s.overrideMimeType(d);var f={"X-Requested-With":"XMLHttpRequest","share-secret":e.secret,Authorization:"Bearer "+(null===(r=null==this?void 0:this.context)||void 0===r?void 0:r.accessToken)},p=e.headers||{};for(var v in p)f[v]=p[v];for(var v in f)f[v]&&s.setRequestHeader(v,f[v]);s.send(null)}function C(e){void 0===e&&(e={});var t=e.elapse,r=void 0===t?0:t,n=e.httpCode,i=void 0===n?0:n,o=e.errDesc;return{requestElapse:r,code:i,codeDesc:void 0===o?"":o}}!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"}(E||(E={}));var b="localDeviceInfo",N={autoIncrement:0,ajaxUnconventionalErrorTimes:0,isUseHttps:function(e){var t;return"boolean"==typeof e?e:!("undefined"!=typeof window)||"https:"===(null===(t=window.location)||void 0===t?void 0:t.protocol)},getRetryDelay:function(e){return e<=5?Number((Math.random()+1).toFixed(2)):e>5&&e<20?Math.floor(4*Math.random())+3:Math.floor(6*Math.random())+5},ajax:p,getUniqueId:_,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 i=n.item(0);t.data=i,t.url=window.URL.createObjectURL(i),t.filename=(null==i?void 0:i.name)||""}}else{if("string"!=typeof e)throw Error("in IE fileInputId must be string");i=document.getElementById(e).value,t.url=i;var o=i.lastIndexOf("/"),s=i.lastIndexOf("\\"),a=Math.max(o,s);t.filename=a<0?i:i.substring(a+1)}var u=t.filename.lastIndexOf(".");return-1!==u&&(t.filetype=t.filename.substring(u+1).toLowerCase()),t},uploadFile:I,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;n<arguments.length;n++)r[n]=arguments[n];for(var i=0,o=t?e[i].apply(this,r):r[0];++i<t;)o=e[i].call(this,o);return o}},listenNetwork:y,listenBrowserVisibility:O,getEnvInfo:T,wxRequest:m,parseDownloadResponse:function(e){if(!window||!window.URL)throw Error("parseDownloadResponse can be used in broswer only");return e&&e.type&&"application/json"===e.type||0>Object.prototype.toString.call(e).indexOf("Blob")?this.url+"?token=":window.URL.createObjectURL(e)},download:S,parseNotify:function(e){for(var t="",r=0;r<e.length;r++)t+="%"+e[r].toString(16);return JSON.parse(decodeURIComponent(t))},getExtraData:C,retryPromise:function(e,t,r){return new Promise((function(n,i){var o=function(t){e().then(n).catch((function(e){t>0?setTimeout((function(){o(t-1)}),r||1e3):i(e)}))};o(t||3)}))},formatAttachUrl:function(e){return e&&"string"==typeof e?"".concat(this.apiUrl).concat(e.slice(e.indexOf("/",9))):""},Uint8ArrayToString:function(e){for(var t="",r=0;r<e.length;r++)t+=String.fromCharCode(e[r]);return t},getLocalDeviceInfo:function(){return function(e){var t,r=N.getEnvInfo(),n=r.platform,i="";n!==E.NODE&&n!==E.QUICK_APP||(i="");try{n===E.WEB?window.localStorage?i=localStorage.getItem(e)||"":a.vF.error("localStorage is not supported"):n===E.WX||n===E.QQ||n===E.TT||n===E.BAIDU||n===E.UNI?i=r.global.getStorageSync(e)||"":n!==E.ZFB&&n!==E.DD||(i=(null===(t=r.global.getStorageSync({key:e}))||void 0===t?void 0:t.data)||"")}catch(t){a.vF.info("get local ".concat(e," failed: "),t)}return a.vF.info("".concat(e," "),i),i}(b)},setLocalDeviceInfo:function(e){!function(e,t){var r=N.getEnvInfo(),n=r.platform;if(n!==E.NODE&&n!==E.QUICK_APP)if(n===E.WEB)try{window.localStorage?localStorage.setItem(e,t):a.vF.error("localStorage is not supported")}catch(t){a.vF.error("set local ".concat(e," failed: "),t)}else r.global.setStorage({key:e,data:t,success:function(t){a.vF.debug("set local ".concat(e," success: "),t)},fail:function(t){a.vF.error("set local ".concat(e," failed: "),t)}})}(b,e)},detectBrowser:function(){if("undefined"==typeof navigator)return"unknown";var e=navigator.userAgent;return/MicroMessenger/i.test(e)?"WeChat":/QQBrowser/i.test(e)?"QQ":!/Chrome/i.test(e)||/Edg/i.test(e)||/OPR/i.test(e)?!/Safari/i.test(e)||/Chrome/i.test(e)||/CriOS/i.test(e)?/Firefox/i.test(e)?"Firefox":/MSIE/i.test(e)||/Trident/i.test(e)?"IE":/Edg/i.test(e)?"Edge":"unknown":"Safari":"Chrome"},getDevicePlatform:function(e){return e.platform===E.WX&&"undefined"!=typeof uni&&R(uni)?E.UNI:e.platform},delay:function(e){return new Promise((function(t){return setTimeout(t,e)}))}}},4270:function(e,t,r){"use strict";var n=r(9565),i=r(4901),o=r(34),s=TypeError;e.exports=function(e,t){var r,a;if("string"===t&&i(r=e.toString)&&!o(a=n(r,e)))return a;if(i(r=e.valueOf)&&!o(a=n(r,e)))return a;if("string"!==t&&i(r=e.toString)&&!o(a=n(r,e)))return a;throw new s("Can't convert object to primitive value")}},4331:function(e,t,r){"use strict";r.d(t,{Ec:function(){return p},Ez:function(){return i},Gc:function(){return s},HJ:function(){return d},Qb:function(){return u},Rk:function(){return l},WR:function(){return f},_h:function(){return o},oi:function(){return c},rO:function(){return h},x0:function(){return a}});var n=r(8093),i=15e3,o=15e3,s=3e5,a=1e4,u=1e4,c=8e3,l=3e5,d=3e4,f=5,h=3,p=[n.C.MAX_LIMIT,n.C.WEBIM_TOKEN_EXPIRED,n.C.WEBIM_CONNCTION_TOKEN_NOT_ASSIGN_ERROR,n.C.USER_NOT_FOUND,n.C.WEBIM_CONNCTION_AUTH_ERROR,n.C.REQUEST_PARAMETER_ERROR,n.C.WEBIM_CONNCTION_AUTH_ERROR,n.C.WEBIM_SERVER_SERVING_DISABLED,n.C.USER_LOGIN_TOO_MANY_DEVICES,n.C.USER_DEVICE_CHANGED]},4346:function(e,t,r){"use strict";r(6518)({target:"Array",stat:!0},{isArray:r(4376)})},4358:function(e){"use strict";function t(){this._listeners={}}e.exports=t,t.prototype.on=function(e,t,r){return(this._listeners[e]||(this._listeners[e]=[])).push({fn:t,ctx:r||this}),this},t.prototype.off=function(e,t){if(void 0===e)this._listeners={};else if(void 0===t)this._listeners[e]=[];else for(var r=this._listeners[e],n=0;n<r.length;)r[n].fn===t?r.splice(n,1):++n;return this},t.prototype.emit=function(e){var t=this._listeners[e];if(t){for(var r=[],n=1;n<arguments.length;)r.push(arguments[n++]);for(n=0;n<t.length;)t[n].fn.apply(t[n++].ctx,r)}return this}},4359:function(e,t,r){"use strict";var n=r(6518),i=r(6346);n({global:!0,constructor:!0,forced:!r(7811)},{DataView:i.DataView})},4373:function(e,t,r){"use strict";var n=r(8981),i=r(5610),o=r(6198);e.exports=function(e){for(var t=n(this),r=o(t),s=arguments.length,a=i(s>1?arguments[1]:void 0,r),u=s>2?arguments[2]:void 0,c=void 0===u?r:i(u,r);c>a;)t[a++]=e;return t}},4376:function(e,t,r){"use strict";var n=r(2195);e.exports=Array.isArray||function(e){return"Array"===n(e)}},4394:function(e,t,r){"use strict";var n=t;function i(){n.util._configure(),n.Writer._configure(n.BufferWriter),n.Reader._configure(n.BufferReader)}n.build="minimal",n.Writer=r(3449),n.BufferWriter=r(818),n.Reader=r(6237),n.BufferReader=r(3158),n.util=r(3610),n.rpc=r(5047),n.roots=r(4529),n.configure=i,i()},4423:function(e,t,r){"use strict";var n=r(6518),i=r(9617).includes,o=r(9039),s=r(6469);n({target:"Array",proto:!0,forced:o((function(){return!Array(1).includes()}))},{includes:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}}),s("includes")},4428:function(e,t,r){"use strict";var n=r(8227)("iterator"),i=!1;try{var o=0,s={next:function(){return{done:!!o++}},return:function(){i=!0}};s[n]=function(){return this},Array.from(s,(function(){throw 2}))}catch(e){}e.exports=function(e,t){try{if(!t&&!i)return!1}catch(e){return!1}var r=!1;try{var o={};o[n]=function(){return{next:function(){return{done:r=!0}}}},e(o)}catch(e){}return r}},4467:function(e,t,r){"use strict";r.d(t,{Dz:function(){return f},dc:function(){return n},eB:function(){return i},kO:function(){return d}}),r(8706),r(3792),r(4743),r(1745),r(8309),r(6099),r(1489),r(1630),r(2170),r(5044),r(1920),r(1694),r(9955),r(3206),r(4496),r(6651),r(2887),r(9369),r(6812),r(8995),r(1575),r(6072),r(8747),r(8845),r(9423),r(7301),r(373),r(6614),r(1405),r(3684);var n,i,o=r(9638),s=r.n(o),a=r(6602);!function(e){e[e.COMPRESS_NONE=0]="COMPRESS_NONE",e[e.COMPRESS_ZLIB=1]="COMPRESS_ZLIB",e[e.COMPRESS_LZ4=2]="COMPRESS_LZ4"}(n||(n={})),function(e){e[e.NONE=-1]="NONE",e[e.UPLINK_ONLY=0]="UPLINK_ONLY",e[e.DOWNLINK_ONLY=1]="DOWNLINK_ONLY",e[e.BIDIRECTIONAL=2]="BIDIRECTIONAL"}(i||(i={}));var u=268435455,c=function(){function e(){this.mode=i.NONE,this.enableUplinkCompression=!1,this.enableDownlinkCompression=!1;var e={minWorkArea:s().DEFAULT_WORK_AREA,maxWorkArea:s().DEFAULT_MAX_WORK,shrinkMode:s().SHRINK_MODE.MANUAL};this.encoder=new(s().RingBufferEncoder)(e),this.decoder=new(s().RingBufferDecoder)(e)}return e.prototype.compress=function(e){var t=e instanceof ArrayBuffer?new Uint8Array(e):e;if(!t||0===t.length)return new Uint8Array(0);if(t.length>u)throw new Error("Data size exceeds maximum allowed: ".concat(t.length));var r=s().compressBound(t.length),n=new Uint8Array(r),i=this.encoder.compress(t,n);if(i<0)throw new Error("LZ4 compression failed with error code: ".concat(i));var o=n.subarray(0,i),c=(0,a.Rp)(t.length),l=(0,a.QR)(t),d=new Uint8Array(c.length+4+i),f=0;return d.set(c,f),f+=c.length,new DataView(d.buffer).setUint32(f,l,!1),f+=4,d.set(o,f),d},e.prototype.decompress=function(e){var t=e instanceof ArrayBuffer?new Uint8Array(e):e;if(!t||0===t.length)return new Uint8Array(0);if(t.length<5)throw new Error("Compressed data is too short: must contain at least length and CRC32");var r={offset:0},n=(0,a.b6)(t,r);if(n>u)throw new Error("Original size exceeds maximum allowed: ".concat(n));if(t.length<r.offset+4)throw new Error("Compressed data is too short: missing CRC32 checksum");var i=new DataView(t.buffer,t.byteOffset+r.offset,4).getUint32(0,!1);r.offset+=4;var o=t.subarray(r.offset),s=new Uint8Array(n),c=this.decoder.decompress(o,s,n);if(c<0||c!==n)throw new Error("LZ4 decompression failed: expected ".concat(n,", got ").concat(c));var l=(0,a.QR)(s);if(l!==i)throw new Error("CRC32 checksum mismatch: expected ".concat(i,", got ").concat(l));return s},e.prototype.resetEncoder=function(){this.encoder.reset()},e.prototype.resetDecoder=function(){this.decoder.reset()},e.prototype.reset=function(){this.resetEncoder(),this.resetDecoder()},e.prototype.shrinkEncoder=function(){this.encoder.shrink()},e.prototype.shrinkDecoder=function(){this.decoder.shrink()},e.prototype.shrink=function(){this.shrinkEncoder(),this.shrinkDecoder()},e}();function l(e){switch(e){case i.UPLINK_ONLY:return{mode:i.UPLINK_ONLY,enableUplinkCompression:!0,enableDownlinkCompression:!1};case i.DOWNLINK_ONLY:return{mode:i.DOWNLINK_ONLY,enableUplinkCompression:!1,enableDownlinkCompression:!0};case i.BIDIRECTIONAL:return{mode:i.BIDIRECTIONAL,enableUplinkCompression:!0,enableDownlinkCompression:!0};case i.NONE:default:return{mode:i.NONE,enableUplinkCompression:!1,enableDownlinkCompression:!1}}}function d(e){var t=l(e),r=t.mode,n=t.enableUplinkCompression,o=t.enableDownlinkCompression;if(r===i.NONE)return null;var s=new c;return s.mode=r,s.enableUplinkCompression=n,s.enableDownlinkCompression=o,s}function f(e,t){var r=l(t),n=r.mode,i=r.enableUplinkCompression,o=r.enableDownlinkCompression;e.reset(),e.mode=n,e.enableUplinkCompression=i,e.enableDownlinkCompression=o}},4478:function(e,t,r){"use strict";r.d(t,{I:function(){return i}}),r(9089);var n=r(4269),i=function(){function e(e){var t=e.type,r=e.id||n.Wp.getUniqueId();this.id=r,this.type=t,this.value=""}return e.create=function(e){return{type:"combine",id:n.Wp.getUniqueId(),to:e.to,from:e.from||"",chatType:e.chatType,ext:e.ext,time:Date.now(),msgConfig:e.msgConfig,isChatThread:e.isChatThread,priority:e.priority,deliverOnlineOnly:e.deliverOnlineOnly,receiverList:e.receiverList,webhookEnv:e.webhookEnv,compatibleText:e.compatibleText,title:e.title,summary:e.summary,messageList:e.messageList,onFileUploadError:e.onFileUploadError,onFileUploadComplete:e.onFileUploadComplete}},e}()},4488:function(e,t,r){"use strict";var n=r(7680),i=Math.floor,o=function(e,t){var r=e.length;if(r<8)for(var s,a,u=1;u<r;){for(a=u,s=e[u];a&&t(e[a-1],s)>0;)e[a]=e[--a];a!==u++&&(e[a]=s)}else for(var c=i(r/2),l=o(n(e,0,c),t),d=o(n(e,c),t),f=l.length,h=d.length,p=0,v=0;p<f||v<h;)e[p+v]=p<f&&v<h?t(l[p],d[v])<=0?l[p++]:d[v++]:p<f?l[p++]:d[v++];return e};e.exports=o},4494:function(e,t,r){"use strict";function n(){console.log&&(console.log.apply?console.log.apply(console,Array.prototype.slice.call(arguments)):Function.prototype.apply.apply(console.log,[console,arguments])),console.trace&&console.trace()}r.d(t,{l:function(){return i},n:function(){return n}}),r(4782),r(7495);var i="undefined"!=typeof window&&void 0!==window.navigator&&/Trident\/|MSIE /.test(window.navigator.userAgent)},4495:function(e,t,r){"use strict";var n=r(9519),i=r(9039),o=r(4576).String;e.exports=!!Object.getOwnPropertySymbols&&!i((function(){var e=Symbol("symbol detection");return!o(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&n&&n<41}))},4496:function(e,t,r){"use strict";var n=r(4644),i=r(9617).includes,o=n.aTypedArray;(0,n.exportTypedArrayMethod)("includes",(function(e){return i(o(this),e,arguments.length>1?arguments[1]:void 0)}))},4527:function(e,t,r){"use strict";var n=r(3724),i=r(4376),o=TypeError,s=Object.getOwnPropertyDescriptor,a=n&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(e){return e instanceof TypeError}}();e.exports=a?function(e,t){if(i(e)&&!s(e,"length").writable)throw new o("Cannot set read only .length");return e.length=t}:function(e,t){return e.length=t}},4529:function(e){"use strict";e.exports={}},4554:function(e,t,r){"use strict";var n=r(6518),i=r(8981),o=r(5610),s=r(1291),a=r(6198),u=r(4527),c=r(6837),l=r(1469),d=r(4659),f=r(4606),h=r(597)("splice"),p=Math.max,v=Math.min;n({target:"Array",proto:!0,forced:!h},{splice:function(e,t){var r,n,h,m,_,g,E=i(this),y=a(E),O=o(e,y),T=arguments.length;for(0===T?r=n=0:1===T?(r=0,n=y-O):(r=T-2,n=v(p(s(t),0),y-O)),c(y+r-n),h=l(E,n),m=0;m<n;m++)(_=O+m)in E&&d(h,m,E[_]);if(h.length=n,r<n){for(m=O;m<y-n;m++)g=m+r,(_=m+n)in E?E[g]=E[_]:f(E,g);for(m=y;m>y-n+r;m--)f(E,m-1)}else if(r>n)for(m=y-n;m>O;m--)g=m+r-1,(_=m+n-1)in E?E[g]=E[_]:f(E,g);for(m=0;m<r;m++)E[m+O]=arguments[m+2];return u(E,y-n+r),h}})},4576:function(e,t,r){"use strict";var n=function(e){return e&&e.Math===Math&&e};e.exports=n("object"==typeof globalThis&&globalThis)||n("object"==typeof window&&window)||n("object"==typeof self&&self)||n("object"==typeof r.g&&r.g)||n("object"==typeof this&&this)||function(){return this}()||Function("return this")()},4598:function(e,t,r){"use strict";var n=r(9039);e.exports=function(e,t){var r=[][e];return!!r&&n((function(){r.call(null,t||function(){return 1},1)}))}},4599:function(e,t,r){"use strict";var n=r(6518),i=r(4576),o=r(9472)(i.setTimeout,!0);n({global:!0,bind:!0,forced:i.setTimeout!==o},{setTimeout:o})},4606:function(e,t,r){"use strict";var n=r(6823),i=TypeError;e.exports=function(e,t){if(!delete e[t])throw new i("Cannot delete property "+n(t)+" of "+n(e))}},4644:function(e,t,r){"use strict";var n,i,o,s=r(7811),a=r(3724),u=r(4576),c=r(4901),l=r(34),d=r(9297),f=r(6955),h=r(6823),p=r(6699),v=r(6840),m=r(2106),_=r(1625),g=r(2787),E=r(2967),y=r(8227),O=r(3392),T=r(1181),R=T.enforce,I=T.get,S=u.Int8Array,C=S&&S.prototype,b=u.Uint8ClampedArray,N=b&&b.prototype,A=S&&g(S),M=C&&g(C),w=Object.prototype,L=u.TypeError,U=y("toStringTag"),x=O("TYPED_ARRAY_TAG"),D="TypedArrayConstructor",P=s&&!!E&&"Opera"!==f(u.opera),k=!1,F={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},H={BigInt64Array:8,BigUint64Array:8},B=function(e){var t=g(e);if(l(t)){var r=I(t);return r&&d(r,D)?r[D]:B(t)}},G=function(e){if(!l(e))return!1;var t=f(e);return d(F,t)||d(H,t)};for(n in F)(o=(i=u[n])&&i.prototype)?R(o)[D]=i:P=!1;for(n in H)(o=(i=u[n])&&i.prototype)&&(R(o)[D]=i);if((!P||!c(A)||A===Function.prototype)&&(A=function(){throw new L("Incorrect invocation")},P))for(n in F)u[n]&&E(u[n],A);if((!P||!M||M===w)&&(M=A.prototype,P))for(n in F)u[n]&&E(u[n].prototype,M);if(P&&g(N)!==M&&E(N,M),a&&!d(M,U))for(n in k=!0,m(M,U,{configurable:!0,get:function(){return l(this)?this[x]:void 0}}),F)u[n]&&p(u[n],x,n);e.exports={NATIVE_ARRAY_BUFFER_VIEWS:P,TYPED_ARRAY_TAG:k&&x,aTypedArray:function(e){if(G(e))return e;throw new L("Target is not a typed array")},aTypedArrayConstructor:function(e){if(c(e)&&(!E||_(A,e)))return e;throw new L(h(e)+" is not a typed array constructor")},exportTypedArrayMethod:function(e,t,r,n){if(a){if(r)for(var i in F){var o=u[i];if(o&&d(o.prototype,e))try{delete o.prototype[e]}catch(r){try{o.prototype[e]=t}catch(e){}}}M[e]&&!r||v(M,e,r?t:P&&C[e]||t,n)}},exportTypedArrayStaticMethod:function(e,t,r){var n,i;if(a){if(E){if(r)for(n in F)if((i=u[n])&&d(i,e))try{delete i[e]}catch(e){}if(A[e]&&!r)return;try{return v(A,e,r?t:P&&A[e]||t)}catch(e){}}for(n in F)!(i=u[n])||i[e]&&!r||v(i,e,t)}},getTypedArrayConstructor:B,isView:function(e){if(!l(e))return!1;var t=f(e);return"DataView"===t||d(F,t)||d(H,t)},isTypedArray:G,TypedArray:A,TypedArrayPrototype:M}},4659:function(e,t,r){"use strict";var n=r(3724),i=r(4913),o=r(6980);e.exports=function(e,t,r){n?i.f(e,t,o(0,r)):e[t]=r}},4706:function(e,t,r){"use strict";function n(e,t,r){for(var n=[],i=Math.max(e.length,t.length),o=0,s=0;s<i||o;){var a=o+(s<e.length?e[s]:0)+(s<t.length?t[s]:0);n.push(a%r),o=Math.floor(a/r),s++}return n}function i(e,t,r){if(e<0)return null;if(0==e)return[];for(var i=[],o=t;1&e&&(i=n(i,o,r)),0!=(e>>=1);)o=n(o,o,r);return i}function o(e){return"0x"===e.substring(0,2)&&(e=e.substring(2)),function(e,t,r){var o=function(e,t){for(var r=e.split(""),n=[],i=r.length-1;i>=0;i--){var o=parseInt(r[i],t);if(isNaN(o))return null;n.push(o)}return n}(e,t);if(null===o)return null;for(var s=[],a=[1],u=0;u<o.length;u++)o[u]&&(s=n(s,i(o[u],a,r),r)),a=i(t,a,r);var c="";for(u=s.length-1;u>=0;u--)c+=s[u].toString(r);return c}(e=e.toLowerCase(),16,10)}r.d(t,{x:function(){return o}}),r(3288),r(6099),r(8940),r(8781)},4743:function(e,t,r){"use strict";var n=r(6518),i=r(4576),o=r(6346),s=r(7633),a="ArrayBuffer",u=o[a];n({global:!0,constructor:!0,forced:i[a]!==u},{ArrayBuffer:u}),s(a)},4782:function(e,t,r){"use strict";var n=r(6518),i=r(4376),o=r(3517),s=r(34),a=r(5610),u=r(6198),c=r(5397),l=r(4659),d=r(8227),f=r(597),h=r(7680),p=f("slice"),v=d("species"),m=Array,_=Math.max;n({target:"Array",proto:!0,forced:!p},{slice:function(e,t){var r,n,d,f=c(this),p=u(f),g=a(e,p),E=a(void 0===t?p:t,p);if(i(f)&&(r=f.constructor,(o(r)&&(r===m||i(r.prototype))||s(r)&&null===(r=r[v]))&&(r=void 0),r===m||void 0===r))return h(f,g,E);for(n=new(void 0===r?m:r)(_(E-g,0)),d=0;g<E;g++,d++)g in f&&l(n,d,f[g]);return n.length=d,n}})},4863:function(e,t,r){"use strict";e.exports=I,I.filename=null,I.defaults={keepCase:!1};var n=r(527),i=r(5330),o=r(7882),s=r(1344),a=r(8252),u=r(1457),c=r(5643),l=r(9687),d=r(8811),f=r(361),h=r(3262),p=/^[1-9][0-9]*$/,v=/^-?[1-9][0-9]*$/,m=/^0[x][0-9a-fA-F]+$/,_=/^-?0[x][0-9a-fA-F]+$/,g=/^0[0-7]+$/,E=/^-?0[0-7]+$/,y=/^(?![eE])[0-9]*(?:\.[0-9]*)?(?:[eE][+-]?[0-9]+)?$/,O=/^[a-zA-Z_][a-zA-Z_0-9]*$/,T=/^(?:\.?[a-zA-Z_][a-zA-Z_0-9]*)(?:\.[a-zA-Z_][a-zA-Z_0-9]*)*$/,R=/^(?:\.[a-zA-Z_][a-zA-Z_0-9]*)+$/;function I(e,t,r){t instanceof i||(r=t,t=new i),r||(r=I.defaults);var S,C,b,N,A,M=r.preferTrailingComment||!1,w=n(e,r.alternateCommentMode||!1),L=w.next,U=w.push,x=w.peek,D=w.skip,P=w.cmnt,k=!0,F=!1,H=t,B=r.keepCase?function(e){return e}:h.camelCase;function G(e,t,r){var n=I.filename;return r||(I.filename=null),Error("illegal "+(t||"token")+" '"+e+"' ("+(n?n+", ":"")+"line "+w.line+")")}function W(){var e,t=[];do{if('"'!==(e=L())&&"'"!==e)throw G(e);t.push(L()),D(e),e=x()}while('"'===e||"'"===e);return t.join("")}function j(e){var t=L();switch(t){case"'":case'"':return U(t),W();case"true":case"TRUE":return!0;case"false":case"FALSE":return!1}try{return function(e){var t=1;switch("-"===e.charAt(0)&&(t=-1,e=e.substring(1)),e){case"inf":case"INF":case"Inf":return t*(1/0);case"nan":case"NAN":case"Nan":case"NaN":return NaN;case"0":return 0}if(p.test(e))return t*parseInt(e,10);if(m.test(e))return t*parseInt(e,16);if(g.test(e))return t*parseInt(e,8);if(y.test(e))return t*parseFloat(e);throw G(e,"number",!0)}(t)}catch(r){if(e&&T.test(t))return t;throw G(t,"value")}}function q(e,t){var r,n;do{!t||'"'!==(r=x())&&"'"!==r?e.push([n=K(L()),D("to",!0)?K(L()):n]):e.push(W())}while(D(",",!0));D(";")}function K(e,t){switch(e){case"max":case"MAX":case"Max":return 536870911;case"0":return 0}if(!t&&"-"===e.charAt(0))throw G(e,"id");if(v.test(e))return parseInt(e,10);if(_.test(e))return parseInt(e,16);if(E.test(e))return parseInt(e,8);throw G(e,"id")}function z(){if(void 0!==S)throw G("package");if(S=L(),!T.test(S))throw G(S,"name");H=H.define(S),D(";")}function V(){var e,t=x();switch(t){case"weak":e=b||(b=[]),L();break;case"public":L();default:e=C||(C=[])}t=W(),D(";"),e.push(t)}function J(){if(D("="),N=W(),!(F="proto3"===N)&&"proto2"!==N)throw G(N,"syntax");D(";")}function Y(e,t){switch(t){case"option":return $(e,t),D(";"),!0;case"message":return function(e,t){if(!O.test(t=L()))throw G(t,"type name");var r=new o(t);X(r,(function(e){if(!Y(r,e))switch(e){case"map":!function(e){D("<");var t=L();if(void 0===f.mapKey[t])throw G(t,"type");D(",");var r=L();if(!T.test(r))throw G(r,"type");D(">");var n=L();if(!O.test(n))throw G(n,"name");D("=");var i=new a(B(n),K(L()),t,r);X(i,(function(e){if("option"!==e)throw G(e);$(i,e),D(";")}),(function(){te(i)})),e.add(i)}(r);break;case"required":case"repeated":Q(r,e);break;case"optional":Q(r,F?"proto3_optional":"optional");break;case"oneof":!function(e,t){if(!O.test(t=L()))throw G(t,"name");var r=new u(B(t));X(r,(function(e){"option"===e?($(r,e),D(";")):(U(e),Q(r,"optional"))})),e.add(r)}(r,e);break;case"extensions":q(r.extensions||(r.extensions=[]));break;case"reserved":q(r.reserved||(r.reserved=[]),!0);break;default:if(!F||!T.test(e))throw G(e);U(e),Q(r,"optional")}})),e.add(r)}(e,t),!0;case"enum":return function(e,t){if(!O.test(t=L()))throw G(t,"name");var r=new c(t);X(r,(function(e){switch(e){case"option":$(r,e),D(";");break;case"reserved":q(r.reserved||(r.reserved=[]),!0);break;default:!function(e,t){if(!O.test(t))throw G(t,"name");D("=");var r=K(L(),!0),n={};X(n,(function(e){if("option"!==e)throw G(e);$(n,e),D(";")}),(function(){te(n)})),e.add(t,r,n.comment)}(r,e)}})),e.add(r)}(e,t),!0;case"service":return function(e,t){if(!O.test(t=L()))throw G(t,"service name");var r=new l(t);X(r,(function(e){if(!Y(r,e)){if("rpc"!==e)throw G(e);!function(e,t){var r=P(),n=t;if(!O.test(t=L()))throw G(t,"name");var i,o,s,a,u=t;if(D("("),D("stream",!0)&&(o=!0),!T.test(t=L()))throw G(t);if(i=t,D(")"),D("returns"),D("("),D("stream",!0)&&(a=!0),!T.test(t=L()))throw G(t);s=t,D(")");var c=new d(u,n,i,s,o,a);c.comment=r,X(c,(function(e){if("option"!==e)throw G(e);$(c,e),D(";")})),e.add(c)}(r,e)}})),e.add(r)}(e,t),!0;case"extend":return function(e,t){if(!T.test(t=L()))throw G(t,"reference");var r=t;X(null,(function(t){switch(t){case"required":case"repeated":Q(e,t,r);break;case"optional":Q(e,F?"proto3_optional":"optional",r);break;default:if(!F||!T.test(t))throw G(t);U(t),Q(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=P()),e.filename=I.filename),D("{",!0)){for(var i;"}"!==(i=L());)t(i);D(";",!0)}else r&&r(),D(";"),e&&("string"!=typeof e.comment||M)&&(e.comment=P(n)||e.comment)}function Q(e,t,r){var n=L();if("group"!==n){if(!T.test(n))throw G(n,"type");var i=L();if(!O.test(i))throw G(i,"name");i=B(i),D("=");var a=new s(i,K(L()),n,t,r);if(X(a,(function(e){if("option"!==e)throw G(e);$(a,e),D(";")}),(function(){te(a)})),"proto3_optional"===t){var c=new u("_"+i);a.setOption("proto3_optional",!0),c.add(a),e.add(c)}else e.add(a);F||!a.repeated||void 0===f.packed[n]&&void 0!==f.basic[n]||a.setOption("packed",!1,!0)}else!function(e,t){var r=L();if(!O.test(r))throw G(r,"name");var n=h.lcFirst(r);r===n&&(r=h.ucFirst(r)),D("=");var i=K(L()),a=new o(r);a.group=!0;var u=new s(n,i,r,t);u.filename=I.filename,X(a,(function(e){switch(e){case"option":$(a,e),D(";");break;case"required":case"repeated":Q(a,e);break;case"optional":Q(a,F?"proto3_optional":"optional");break;default:throw G(e)}})),e.add(a).add(u)}(e,t)}function $(e,t){var r=D("(",!0);if(!T.test(t=L()))throw G(t,"name");var n,i=t,o=i;r&&(D(")"),o=i="("+i+")",t=x(),R.test(t)&&(n=t.substr(1),i+=t,L())),D("="),function(e,t,r,n){e.setParsedOption&&e.setParsedOption(t,r,n)}(e,o,Z(e,i),n)}function Z(e,t){if(D("{",!0)){for(var r={};!D("}",!0);){if(!O.test(A=L()))throw G(A,"name");var n,i=A;"{"===x()?n=Z(e,t+"."+A):(D(":"),"{"===x()?n=Z(e,t+"."+A):(n=j(!0),ee(e,t+"."+A,n)));var o=r[i];o&&(n=[].concat(o).concat(n)),r[i]=n,D(",",!0)}return r}var s=j(!0);return ee(e,t,s),s}function ee(e,t,r){e.setOption&&e.setOption(t,r)}function te(e){if(D("[",!0)){do{$(e,"option")}while(D(",",!0));D("]")}return e}for(;null!==(A=L());)switch(A){case"package":if(!k)throw G(A);z();break;case"import":if(!k)throw G(A);V();break;case"syntax":if(!k)throw G(A);J();break;case"option":$(H,A),D(";");break;default:if(Y(H,A)){k=!1;continue}throw G(A)}return I.filename=null,{package:S,imports:C,weakImports:b,syntax:N,root:t}}},4865:function(e,t,r){"use strict";var n;r.d(t,{s:function(){return n}}),function(e){e[e.mark_0=0]="mark_0",e[e.mark_1=1]="mark_1",e[e.mark_2=2]="mark_2",e[e.mark_3=3]="mark_3",e[e.mark_4=4]="mark_4",e[e.mark_5=5]="mark_5",e[e.mark_6=6]="mark_6",e[e.mark_7=7]="mark_7",e[e.mark_8=8]="mark_8",e[e.mark_9=9]="mark_9",e[e.mark_10=10]="mark_10",e[e.mark_11=11]="mark_11",e[e.mark_12=12]="mark_12",e[e.mark_13=13]="mark_13",e[e.mark_14=14]="mark_14",e[e.mark_15=15]="mark_15",e[e.mark_16=16]="mark_16",e[e.mark_17=17]="mark_17",e[e.mark_18=18]="mark_18",e[e.mark_19=19]="mark_19"}(n||(n={}))},4901:function(e){"use strict";var t="object"==typeof document&&document.all;e.exports=void 0===t&&void 0!==t?function(e){return"function"==typeof e||e===t}:function(e){return"function"==typeof e}},4913:function(e,t,r){"use strict";var n=r(3724),i=r(5917),o=r(8686),s=r(8551),a=r(6969),u=TypeError,c=Object.defineProperty,l=Object.getOwnPropertyDescriptor,d="enumerable",f="configurable",h="writable";t.f=n?o?function(e,t,r){if(s(e),t=a(t),s(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:f in r?r[f]:n[f],enumerable:d in r?r[d]:n[d],writable:!1})}return c(e,t,r)}:c:function(e,t,r){if(s(e),t=a(t),s(r),i)try{return c(e,t,r)}catch(e){}if("get"in r||"set"in r)throw new u("Accessors not supported");return"value"in r&&(e[t]=r.value),e}},4917:function(e,t,r){"use strict";r.d(t,{i:function(){return i}}),r(9089);var n=r(4269),i=function(){function e(e){var t=e.type,r=e.id;this.id=r,this.type=t}return e.prototype.set=function(e){e.file=e.file||e.fileInputId&&n.Wp.getFileUrl(e.fileInputId),this.body={id:this.id,chatType:e.chatType||"singleChat",type:"file",file:e.file,filename:e.filename,fileInputId:e.fileInputId,to:e.to,from:e.from,roomType:e.roomType,success:e.success,fail:e.fail,ext:e.ext,time:Date.now(),onFileUploadError:e.onFileUploadError,onFileUploadComplete:e.onFileUploadComplete,onFileUploadProgress:e.onFileUploadProgress,body:e.body,isChatThread:e.isChatThread}},e.prototype.setChatType=function(e){return!!this.body&&(this.body.chatType=e,!0)},e.prototype.setGroup=function(e){return!!this.body&&(this.body.group=e,!0)},e.create=function(e){return{id:n.Wp.getUniqueId(),chatType:e.chatType||"singleChat",type:"file",file:e.file,filename:e.filename,fileInputId:e.fileInputId,file_length:e.file_length,to:e.to,from:e.from||"",ext:e.ext,onFileUploadError:e.onFileUploadError,onFileUploadComplete:e.onFileUploadComplete,onFileUploadProgress:e.onFileUploadProgress,body:e.body,time:Date.now(),msgConfig:e.msgConfig,isChatThread:e.isChatThread,priority:e.priority,deliverOnlineOnly:e.deliverOnlineOnly,receiverList:e.receiverList,webhookEnv:e.webhookEnv}},e}()},5031:function(e,t,r){"use strict";var n=r(7751),i=r(9504),o=r(8480),s=r(3717),a=r(8551),u=i([].concat);e.exports=n("Reflect","ownKeys")||function(e){var t=o.f(a(e)),r=s.f;return r?u(t,r(e)):t}},5044:function(e,t,r){"use strict";var n=r(4644),i=r(4373),o=r(5854),s=r(6955),a=r(9565),u=r(9504),c=r(9039),l=n.aTypedArray,d=n.exportTypedArrayMethod,f=u("".slice);d("fill",(function(e){var t=arguments.length;l(this);var r="Big"===f(s(this),0,3)?o(e):+e;return a(i,this,r,t>1?arguments[1]:void 0,t>2?arguments[2]:void 0)}),c((function(){var e=0;return new Int8Array(2).fill({valueOf:function(){return e++}}),1!==e})))},5047:function(e,t,r){"use strict";t.Service=r(7595)},5081:function(e,t,r){"use strict";var n=r(6518),i=r(4576);n({global:!0,forced:i.globalThis!==i},{globalThis:i})},5086:function(e,t,r){"use strict";var n=r(6518),i=r(9213).some;n({target:"Array",proto:!0,forced:!r(4598)("some")},{some:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}})},5095: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}},5212:function(e,t,r){"use strict";e.exports=o;var n=r(8045),i=r(4153)("fs");function o(e,t,r){return"function"==typeof t?(r=t,t={}):t||(t={}),r?!t.xhr&&i&&i.readFile?i.readFile(e,(function(n,i){return n&&"undefined"!=typeof XMLHttpRequest?o.xhr(e,t,r):n?r(n):r(null,t.binary?i:i.toString("utf8"))})):o.xhr(e,t,r):n(o,this,e,t)}o.xhr=function(e,t,r){var n=new XMLHttpRequest;n.onreadystatechange=function(){if(4===n.readyState){if(0!==n.status&&200!==n.status)return r(Error("status "+n.status));if(t.binary){var e=n.response;if(!e){e=[];for(var i=0;i<n.responseText.length;++i)e.push(255&n.responseText.charCodeAt(i))}return r(null,"undefined"!=typeof Uint8Array?new Uint8Array(e):e)}return r(null,n.responseText)}},t.binary&&("overrideMimeType"in n&&n.overrideMimeType("text/plain; charset=x-user-defined"),n.responseType="arraybuffer"),n.open("GET",e),n.send()}},5276:function(e,t,r){"use strict";var n=r(6518),i=r(7476),o=r(9617).indexOf,s=r(4598),a=i([].indexOf),u=!!a&&1/a([1],1,-0)<0;n({target:"Array",proto:!0,forced:u||!s("indexOf")},{indexOf:function(e){var t=arguments.length>1?arguments[1]:void 0;return u?a(this,e,t)||0:o(this,e,t)}})},5325:function(e,t,r){"use strict";var n=e.exports=r(4394);n.build="light",n.load=function(e,t,r){return"function"==typeof t?(r=t,t=new n.Root):t||(t=new n.Root),t.load(e,r)},n.loadSync=function(e,t){return t||(t=new n.Root),t.loadSync(e)},n.encoder=r(1080),n.decoder=r(7728),n.verifier=r(420),n.converter=r(744),n.ReflectionObject=r(7209),n.Namespace=r(8923),n.Root=r(5330),n.Enum=r(5643),n.Type=r(7882),n.Field=r(1344),n.OneOf=r(1457),n.MapField=r(8252),n.Service=r(9687),n.Method=r(8811),n.Message=r(2551),n.wrappers=r(6434),n.types=r(361),n.util=r(3262),n.ReflectionObject._configure(n.Root),n.Namespace._configure(n.Type,n.Service,n.Enum),n.Root._configure(n.Type),n.Field._configure(n.Type)},5330:function(e,t,r){"use strict";e.exports=d;var n=r(8923);((d.prototype=Object.create(n.prototype)).constructor=d).className="Root";var i,o,s,a=r(1344),u=r(5643),c=r(1457),l=r(3262);function d(e){n.call(this,"",e),this.deferred=[],this.files=[]}function f(){}d.fromJSON=function(e,t){return t||(t=new d),e.options&&t.setOptions(e.options),t.addJSON(e.nested)},d.prototype.resolvePath=l.path.resolve,d.prototype.fetch=l.fetch,d.prototype.load=function e(t,r,n){"function"==typeof r&&(n=r,r=void 0);var i=this;if(!n)return l.asPromise(e,i,t,r);var a=n===f;function u(e,t){if(n){var r=n;if(n=null,a)throw e;r(e,t)}}function c(e){var t=e.lastIndexOf("google/protobuf/");if(t>-1){var r=e.substring(t);if(r in s)return r}return null}function d(e,t){try{if(l.isString(t)&&"{"===t.charAt(0)&&(t=JSON.parse(t)),l.isString(t)){o.filename=e;var n,s=o(t,i,r),d=0;if(s.imports)for(;d<s.imports.length;++d)(n=c(s.imports[d])||i.resolvePath(e,s.imports[d]))&&h(n);if(s.weakImports)for(d=0;d<s.weakImports.length;++d)(n=c(s.weakImports[d])||i.resolvePath(e,s.weakImports[d]))&&h(n,!0)}else i.setOptions(t.options).addJSON(t.nested)}catch(e){u(e)}a||p||u(null,i)}function h(e,t){if(!(i.files.indexOf(e)>-1))if(i.files.push(e),e in s)a?d(e,s[e]):(++p,setTimeout((function(){--p,d(e,s[e])})));else if(a){var r;try{r=l.fs.readFileSync(e).toString("utf8")}catch(e){return void(t||u(e))}d(e,r)}else++p,i.fetch(e,(function(r,o){--p,n&&(r?t?p||u(null,i):u(r):d(e,o))}))}var p=0;l.isString(t)&&(t=[t]);for(var v,m=0;m<t.length;++m)(v=i.resolvePath("",t[m]))&&h(v);if(a)return i;p||u(null,i)},d.prototype.loadSync=function(e,t){if(!l.isNode)throw Error("not supported");return this.load(e,t,f)},d.prototype.resolveAll=function(){if(this.deferred.length)throw Error("unresolvable extensions: "+this.deferred.map((function(e){return"'extend "+e.extend+"' in "+e.parent.fullName})).join(", "));return n.prototype.resolveAll.call(this)};var h=/^[A-Z]/;function p(e,t){var r=t.parent.lookup(t.extend);if(r){var n=new a(t.fullName,t.id,t.type,t.rule,void 0,t.options);return n.declaringField=t,t.extensionField=n,r.add(n),!0}return!1}d.prototype._handleAdd=function(e){if(e instanceof a)void 0===e.extend||e.extensionField||p(0,e)||this.deferred.push(e);else if(e instanceof u)h.test(e.name)&&(e.parent[e.name]=e.values);else if(!(e instanceof c)){if(e instanceof i)for(var t=0;t<this.deferred.length;)p(0,this.deferred[t])?this.deferred.splice(t,1):++t;for(var r=0;r<e.nestedArray.length;++r)this._handleAdd(e._nestedArray[r]);h.test(e.name)&&(e.parent[e.name]=e)}},d.prototype._handleRemove=function(e){if(e instanceof a){if(void 0!==e.extend)if(e.extensionField)e.extensionField.parent.remove(e.extensionField),e.extensionField=null;else{var t=this.deferred.indexOf(e);t>-1&&this.deferred.splice(t,1)}}else if(e instanceof u)h.test(e.name)&&delete e.parent[e.name];else if(e instanceof n){for(var r=0;r<e.nestedArray.length;++r)this._handleRemove(e._nestedArray[r]);h.test(e.name)&&delete e.parent[e.name]}},d._configure=function(e,t,r){i=e,o=t,s=r}},5370:function(e,t,r){"use strict";var n=r(6198);e.exports=function(e,t,r){for(var i=0,o=arguments.length>2?r:n(t),s=new e(o);o>i;)s[i]=t[i++];return s}},5397:function(e,t,r){"use strict";var n=r(7055),i=r(7750);e.exports=function(e){return n(i(e))}},5506:function(e,t,r){"use strict";var n=r(6518),i=r(2357).entries;n({target:"Object",stat:!0},{entries:function(e){return i(e)}})},5548:function(e,t,r){"use strict";var n=r(3517),i=r(6823),o=TypeError;e.exports=function(e){if(n(e))return e;throw new o(i(e)+" is not a constructor")}},5575:function(e,t,r){"use strict";var n=r(6518),i=r(4576),o=r(9472)(i.setInterval,!0);n({global:!0,bind:!0,forced:i.setInterval!==o},{setInterval:o})},5610:function(e,t,r){"use strict";var n=r(1291),i=Math.max,o=Math.min;e.exports=function(e,t){var r=n(e);return r<0?i(r+t,0):o(r,t)}},5617:function(e,t,r){"use strict";var n=r(3164);e.exports=Math.fround||function(e){return n(e,1.1920928955078125e-7,34028234663852886e22,11754943508222875e-54)}},5643:function(e,t,r){"use strict";e.exports=s;var n=r(7209);((s.prototype=Object.create(n.prototype)).constructor=s).className="Enum";var i=r(8923),o=r(3262);function s(e,t,r,i,o){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=i,this.comments=o||{},this.reserved=void 0,t)for(var s=Object.keys(t),a=0;a<s.length;++a)"number"==typeof t[s[a]]&&(this.valuesById[this.values[s[a]]=t[s[a]]]=s[a])}s.fromJSON=function(e,t){var r=new s(e,t.values,t.options,t.comment,t.comments);return r.reserved=t.reserved,r},s.prototype.toJSON=function(e){var t=!!e&&Boolean(e.keepComments);return o.toObject(["options",this.options,"values",this.values,"reserved",this.reserved&&this.reserved.length?this.reserved:void 0,"comment",t?this.comment:void 0,"comments",t?this.comments:void 0])},s.prototype.add=function(e,t,r){if(!o.isString(e))throw TypeError("name must be a string");if(!o.isInteger(t))throw TypeError("id must be an integer");if(void 0!==this.values[e])throw Error("duplicate name '"+e+"' in "+this);if(this.isReservedId(t))throw Error("id "+t+" is reserved in "+this);if(this.isReservedName(e))throw Error("name '"+e+"' is reserved in "+this);if(void 0!==this.valuesById[t]){if(!this.options||!this.options.allow_alias)throw Error("duplicate id "+t+" in "+this);this.values[e]=t}else this.valuesById[this.values[e]=t]=e;return this.comments[e]=r||null,this},s.prototype.remove=function(e){if(!o.isString(e))throw TypeError("name must be a string");var t=this.values[e];if(null==t)throw Error("name '"+e+"' does not exist in "+this);return delete this.valuesById[t],delete this.values[e],delete this.comments[e],this},s.prototype.isReservedId=function(e){return i.isReservedId(this.reserved,e)},s.prototype.isReservedName=function(e){return i.isReservedName(this.reserved,e)}},5652:function(e,t,r){"use strict";var n=r(9039);e.exports=n((function(){if("function"==typeof ArrayBuffer){var e=new ArrayBuffer(8);Object.isExtensible(e)&&Object.defineProperty(e,"a",{value:8})}}))},5732:function(e,t,r){"use strict";r.d(t,{Aj:function(){return h},GD:function(){return p},Xn:function(){return f},d2:function(){return m},fg:function(){return v}}),r(2675),r(9463),r(2259),r(8706),r(3792),r(6099),r(3362),r(7764),r(2953);var n=r(4269),i=r(3603),o=r(7968),s=r(229),a=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function s(e){try{u(n.next(e))}catch(e){o(e)}}function a(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}u((n=n.apply(e,t||[])).next())}))},u=function(e,t){var r,n,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;s;)try{if(r=1,n&&(i=2&o[0]?n.return:o[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,o[1])).done)return i;switch(n=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,n=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],n=0}finally{r=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}},c=204800,l=1048576;function d(e){return new Promise((function(t,r){if("undefined"!=typeof FileReader){var n=new FileReader;n.onload=function(){return t(n.result)},n.onerror=function(){return r(n.error||new Error("Failed to read file"))},n.readAsArrayBuffer(e)}else r(new Error("FileReader is not available"))}))}function f(e,t,r){return"img"===t?e>("original"===r?c:l):e>l}function h(e){return a(this,void 0,void 0,(function(){var t;return u(this,(function(r){switch(r.label){case 0:return[4,d(e)];case 1:return t=r.sent(),[2,(0,s.K)(t)]}}))}))}function p(e){return"original"===e?"origin":"large"}function v(e,t,r,s){var c,l;return a(this,void 0,void 0,(function(){var a,d,f,h,v,m,_,g,E,y,O,T,R,I;return u(this,(function(u){switch(u.label){case 0:a=e.context,d=a.orgName,f=a.appName,h=a.accessToken,v="".concat(e.apiUrl,"/").concat(d,"/").concat(f,"/chatfiles/exists?md5=").concat(t),"img"===r&&s&&(v+="&imageType=".concat(p(s))),u.label=1;case 1:return u.trys.push([1,3,,4]),[4,n.RD.call(e,{url:v,dataType:"json",type:"GET",headers:{Authorization:"Bearer "+h}},i.jz.SDK_INTERNAL)];case 2:return m=u.sent(),(_=null===(c=null==m?void 0:m.entities)||void 0===c?void 0:c[0])?(g=!0===_.exists,E=_.uuid||"",y=_["share-secret"]||"",S=null!==(l=_["exists-type"])&&void 0!==l?l:_.existsType,O="origin"===S||"original"===S?"original":"large"===S?"large":void 0,T=g&&!!E,R=s,"img"===r&&T&&("original"===O?R="original":"large"===O&&("original"===s?T=!1:R="large")),o.vF.debug("precheck result","exists: ".concat(g),"uuid: ".concat(E),"existsType: ".concat(O||""),"effectiveImageType: ".concat(R||""),"hit: ".concat(T)),[2,{exists:g,uuid:E,shareSecret:y,existsType:O,effectiveImageType:R,hit:T}]):[2,{exists:!1,hit:!1}];case 3:return I=u.sent(),o.vF.warn("precheck failed, proceeding with upload",I),[2,{exists:!1,hit:!1}];case 4:return[2]}var S}))}))}function m(e,t){var r="em-redirect=true".concat(t?"&share-secret=".concat(t):"");return{originalImageUrl:"".concat(e,"?").concat(r),bigImageUrl:"".concat(e,"?size=large&").concat(r)}}},5745:function(e,t,r){"use strict";var n=r(7629);e.exports=function(e,t){return n[e]||(n[e]=t||{})}},5749:function(e,t,r){"use strict";var n=r(788),i=TypeError;e.exports=function(e){if(n(e))throw new i("The method doesn't accept regular expressions");return e}},5806:function(e,t,r){"use strict";r(7764);var n,i=r(6518),o=r(3724),s=r(7416),a=r(4576),u=r(6080),c=r(9504),l=r(6840),d=r(2106),f=r(679),h=r(9297),p=r(4213),v=r(7916),m=r(7680),_=r(8183).codeAt,g=r(6098),E=r(655),y=r(687),O=r(2812),T=r(8406),R=r(1181),I=R.set,S=R.getterFor("URL"),C=T.URLSearchParams,b=T.getState,N=a.URL,A=a.TypeError,M=a.parseInt,w=Math.floor,L=Math.pow,U=c("".charAt),x=c(/./.exec),D=c([].join),P=c(1..toString),k=c([].pop),F=c([].push),H=c("".replace),B=c([].shift),G=c("".split),W=c("".slice),j=c("".toLowerCase),q=c([].unshift),K="Invalid scheme",z="Invalid host",V="Invalid port",J=/[a-z]/i,Y=/[\d+-.a-z]/i,X=/\d/,Q=/^0x/i,$=/^[0-7]+$/,Z=/^\d+$/,ee=/^[\da-f]+$/i,te=/[\0\t\n\r #%/:<>?@[\\\]^|]/,re=/[\0\t\n\r #/:<>?@[\\\]^|]/,ne=/^[\u0000-\u0020]+/,ie=/(^|[^\u0000-\u0020])[\u0000-\u0020]+$/,oe=/[\t\n\r]/g,se=function(e){var t,r,n,i;if("number"==typeof e){for(t=[],r=0;r<4;r++)q(t,e%256),e=w(e/256);return D(t,".")}if("object"==typeof e){for(t="",n=function(e){for(var t=null,r=1,n=null,i=0,o=0;o<8;o++)0!==e[o]?(i>r&&(t=n,r=i),n=null,i=0):(null===n&&(n=o),++i);return i>r?n:t}(e),r=0;r<8;r++)i&&0===e[r]||(i&&(i=!1),n===r?(t+=r?":":"::",i=!0):(t+=P(e[r],16),r<7&&(t+=":")));return"["+t+"]"}return e},ae={},ue=p({},ae,{" ":1,'"':1,"<":1,">":1,"`":1}),ce=p({},ue,{"#":1,"?":1,"{":1,"}":1}),le=p({},ce,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),de=function(e,t){var r=_(e,0);return r>32&&r<127&&!h(t,e)?e:encodeURIComponent(e)},fe={ftp:21,file:null,http:80,https:443,ws:80,wss:443},he=function(e,t){var r;return 2===e.length&&x(J,U(e,0))&&(":"===(r=U(e,1))||!t&&"|"===r)},pe=function(e){var t;return e.length>1&&he(W(e,0,2))&&(2===e.length||"/"===(t=U(e,2))||"\\"===t||"?"===t||"#"===t)},ve=function(e){return"."===e||"%2e"===j(e)},me={},_e={},ge={},Ee={},ye={},Oe={},Te={},Re={},Ie={},Se={},Ce={},be={},Ne={},Ae={},Me={},we={},Le={},Ue={},xe={},De={},Pe={},ke=function(e,t,r){var n,i,o,s=E(e);if(t){if(i=this.parse(s))throw new A(i);this.searchParams=null}else{if(void 0!==r&&(n=new ke(r,!0)),i=this.parse(s,null,n))throw new A(i);(o=b(new C)).bindURL(this),this.searchParams=o}};ke.prototype={type:"URL",parse:function(e,t,r){var i,o,s,a,u,c=this,l=t||me,d=0,f="",p=!1,_=!1,g=!1;for(e=E(e),t||(c.scheme="",c.username="",c.password="",c.host=null,c.port=null,c.path=[],c.query=null,c.fragment=null,c.cannotBeABaseURL=!1,e=H(e,ne,""),e=H(e,ie,"$1")),e=H(e,oe,""),i=v(e);d<=i.length;){switch(o=i[d],l){case me:if(!o||!x(J,o)){if(t)return K;l=ge;continue}f+=j(o),l=_e;break;case _e:if(o&&(x(Y,o)||"+"===o||"-"===o||"."===o))f+=j(o);else{if(":"!==o){if(t)return K;f="",l=ge,d=0;continue}if(t&&(c.isSpecial()!==h(fe,f)||"file"===f&&(c.includesCredentials()||null!==c.port)||"file"===c.scheme&&!c.host))return;if(c.scheme=f,t)return void(c.isSpecial()&&fe[c.scheme]===c.port&&(c.port=null));f="","file"===c.scheme?l=Ae:c.isSpecial()&&r&&r.scheme===c.scheme?l=Ee:c.isSpecial()?l=Re:"/"===i[d+1]?(l=ye,d++):(c.cannotBeABaseURL=!0,F(c.path,""),l=xe)}break;case ge:if(!r||r.cannotBeABaseURL&&"#"!==o)return K;if(r.cannotBeABaseURL&&"#"===o){c.scheme=r.scheme,c.path=m(r.path),c.query=r.query,c.fragment="",c.cannotBeABaseURL=!0,l=Pe;break}l="file"===r.scheme?Ae:Oe;continue;case Ee:if("/"!==o||"/"!==i[d+1]){l=Oe;continue}l=Ie,d++;break;case ye:if("/"===o){l=Se;break}l=Ue;continue;case Oe:if(c.scheme=r.scheme,o===n)c.username=r.username,c.password=r.password,c.host=r.host,c.port=r.port,c.path=m(r.path),c.query=r.query;else if("/"===o||"\\"===o&&c.isSpecial())l=Te;else if("?"===o)c.username=r.username,c.password=r.password,c.host=r.host,c.port=r.port,c.path=m(r.path),c.query="",l=De;else{if("#"!==o){c.username=r.username,c.password=r.password,c.host=r.host,c.port=r.port,c.path=m(r.path),c.path.length--,l=Ue;continue}c.username=r.username,c.password=r.password,c.host=r.host,c.port=r.port,c.path=m(r.path),c.query=r.query,c.fragment="",l=Pe}break;case Te:if(!c.isSpecial()||"/"!==o&&"\\"!==o){if("/"!==o){c.username=r.username,c.password=r.password,c.host=r.host,c.port=r.port,l=Ue;continue}l=Se}else l=Ie;break;case Re:if(l=Ie,"/"!==o||"/"!==U(f,d+1))continue;d++;break;case Ie:if("/"!==o&&"\\"!==o){l=Se;continue}break;case Se:if("@"===o){p&&(f="%40"+f),p=!0,s=v(f);for(var y=0;y<s.length;y++){var O=s[y];if(":"!==O||g){var T=de(O,le);g?c.password+=T:c.username+=T}else g=!0}f=""}else if(o===n||"/"===o||"?"===o||"#"===o||"\\"===o&&c.isSpecial()){if(p&&""===f)return"Invalid authority";d-=v(f).length+1,f="",l=Ce}else f+=o;break;case Ce:case be:if(t&&"file"===c.scheme){l=we;continue}if(":"!==o||_){if(o===n||"/"===o||"?"===o||"#"===o||"\\"===o&&c.isSpecial()){if(c.isSpecial()&&""===f)return z;if(t&&""===f&&(c.includesCredentials()||null!==c.port))return;if(a=c.parseHost(f))return a;if(f="",l=Le,t)return;continue}"["===o?_=!0:"]"===o&&(_=!1),f+=o}else{if(""===f)return z;if(a=c.parseHost(f))return a;if(f="",l=Ne,t===be)return}break;case Ne:if(!x(X,o)){if(o===n||"/"===o||"?"===o||"#"===o||"\\"===o&&c.isSpecial()||t){if(""!==f){var R=M(f,10);if(R>65535)return V;c.port=c.isSpecial()&&R===fe[c.scheme]?null:R,f=""}if(t)return;l=Le;continue}return V}f+=o;break;case Ae:if(c.scheme="file","/"===o||"\\"===o)l=Me;else{if(!r||"file"!==r.scheme){l=Ue;continue}switch(o){case n:c.host=r.host,c.path=m(r.path),c.query=r.query;break;case"?":c.host=r.host,c.path=m(r.path),c.query="",l=De;break;case"#":c.host=r.host,c.path=m(r.path),c.query=r.query,c.fragment="",l=Pe;break;default:pe(D(m(i,d),""))||(c.host=r.host,c.path=m(r.path),c.shortenPath()),l=Ue;continue}}break;case Me:if("/"===o||"\\"===o){l=we;break}r&&"file"===r.scheme&&!pe(D(m(i,d),""))&&(he(r.path[0],!0)?F(c.path,r.path[0]):c.host=r.host),l=Ue;continue;case we:if(o===n||"/"===o||"\\"===o||"?"===o||"#"===o){if(!t&&he(f))l=Ue;else if(""===f){if(c.host="",t)return;l=Le}else{if(a=c.parseHost(f))return a;if("localhost"===c.host&&(c.host=""),t)return;f="",l=Le}continue}f+=o;break;case Le:if(c.isSpecial()){if(l=Ue,"/"!==o&&"\\"!==o)continue}else if(t||"?"!==o)if(t||"#"!==o){if(o!==n&&(l=Ue,"/"!==o))continue}else c.fragment="",l=Pe;else c.query="",l=De;break;case Ue:if(o===n||"/"===o||"\\"===o&&c.isSpecial()||!t&&("?"===o||"#"===o)){if(".."===(u=j(u=f))||"%2e."===u||".%2e"===u||"%2e%2e"===u?(c.shortenPath(),"/"===o||"\\"===o&&c.isSpecial()||F(c.path,"")):ve(f)?"/"===o||"\\"===o&&c.isSpecial()||F(c.path,""):("file"===c.scheme&&!c.path.length&&he(f)&&(c.host&&(c.host=""),f=U(f,0)+":"),F(c.path,f)),f="","file"===c.scheme&&(o===n||"?"===o||"#"===o))for(;c.path.length>1&&""===c.path[0];)B(c.path);"?"===o?(c.query="",l=De):"#"===o&&(c.fragment="",l=Pe)}else f+=de(o,ce);break;case xe:"?"===o?(c.query="",l=De):"#"===o?(c.fragment="",l=Pe):o!==n&&(c.path[0]+=de(o,ae));break;case De:t||"#"!==o?o!==n&&("'"===o&&c.isSpecial()?c.query+="%27":c.query+="#"===o?"%23":de(o,ae)):(c.fragment="",l=Pe);break;case Pe:o!==n&&(c.fragment+=de(o,ue))}d++}},parseHost:function(e){var t,r,n;if("["===U(e,0)){if("]"!==U(e,e.length-1))return z;if(t=function(e){var t,r,n,i,o,s,a,u=[0,0,0,0,0,0,0,0],c=0,l=null,d=0,f=function(){return U(e,d)};if(":"===f()){if(":"!==U(e,1))return;d+=2,l=++c}for(;f();){if(8===c)return;if(":"!==f()){for(t=r=0;r<4&&x(ee,f());)t=16*t+M(f(),16),d++,r++;if("."===f()){if(0===r)return;if(d-=r,c>6)return;for(n=0;f();){if(i=null,n>0){if(!("."===f()&&n<4))return;d++}if(!x(X,f()))return;for(;x(X,f());){if(o=M(f(),10),null===i)i=o;else{if(0===i)return;i=10*i+o}if(i>255)return;d++}u[c]=256*u[c]+i,2!==++n&&4!==n||c++}if(4!==n)return;break}if(":"===f()){if(d++,!f())return}else if(f())return;u[c++]=t}else{if(null!==l)return;d++,l=++c}}if(null!==l)for(s=c-l,c=7;0!==c&&s>0;)a=u[c],u[c--]=u[l+s-1],u[l+--s]=a;else if(8!==c)return;return u}(W(e,1,-1)),!t)return z;this.host=t}else if(this.isSpecial()){if(e=g(e),x(te,e))return z;if(t=function(e){var t,r,n,i,o,s,a,u=G(e,".");if(u.length&&""===u[u.length-1]&&u.length--,(t=u.length)>4)return e;for(r=[],n=0;n<t;n++){if(""===(i=u[n]))return e;if(o=10,i.length>1&&"0"===U(i,0)&&(o=x(Q,i)?16:8,i=W(i,8===o?1:2)),""===i)s=0;else{if(!x(10===o?Z:8===o?$:ee,i))return e;s=M(i,o)}F(r,s)}for(n=0;n<t;n++)if(s=r[n],n===t-1){if(s>=L(256,5-t))return null}else if(s>255)return null;for(a=k(r),n=0;n<r.length;n++)a+=r[n]*L(256,3-n);return a}(e),null===t)return z;this.host=t}else{if(x(re,e))return z;for(t="",r=v(e),n=0;n<r.length;n++)t+=de(r[n],ae);this.host=t}},cannotHaveUsernamePasswordPort:function(){return!this.host||this.cannotBeABaseURL||"file"===this.scheme},includesCredentials:function(){return""!==this.username||""!==this.password},isSpecial:function(){return h(fe,this.scheme)},shortenPath:function(){var e=this.path,t=e.length;!t||"file"===this.scheme&&1===t&&he(e[0],!0)||e.length--},serialize:function(){var e=this,t=e.scheme,r=e.username,n=e.password,i=e.host,o=e.port,s=e.path,a=e.query,u=e.fragment,c=t+":";return null!==i?(c+="//",e.includesCredentials()&&(c+=r+(n?":"+n:"")+"@"),c+=se(i),null!==o&&(c+=":"+o)):"file"===t&&(c+="//"),c+=e.cannotBeABaseURL?s[0]:s.length?"/"+D(s,"/"):"",null!==a&&(c+="?"+a),null!==u&&(c+="#"+u),c},setHref:function(e){var t=this.parse(e);if(t)throw new A(t);this.searchParams.update()},getOrigin:function(){var e=this.scheme,t=this.port;if("blob"===e)try{return new Fe(e.path[0]).origin}catch(e){return"null"}return"file"!==e&&this.isSpecial()?e+"://"+se(this.host)+(null!==t?":"+t:""):"null"},getProtocol:function(){return this.scheme+":"},setProtocol:function(e){this.parse(E(e)+":",me)},getUsername:function(){return this.username},setUsername:function(e){var t=v(E(e));if(!this.cannotHaveUsernamePasswordPort()){this.username="";for(var r=0;r<t.length;r++)this.username+=de(t[r],le)}},getPassword:function(){return this.password},setPassword:function(e){var t=v(E(e));if(!this.cannotHaveUsernamePasswordPort()){this.password="";for(var r=0;r<t.length;r++)this.password+=de(t[r],le)}},getHost:function(){var e=this.host,t=this.port;return null===e?"":null===t?se(e):se(e)+":"+t},setHost:function(e){this.cannotBeABaseURL||this.parse(e,Ce)},getHostname:function(){var e=this.host;return null===e?"":se(e)},setHostname:function(e){this.cannotBeABaseURL||this.parse(e,be)},getPort:function(){var e=this.port;return null===e?"":E(e)},setPort:function(e){this.cannotHaveUsernamePasswordPort()||(""===(e=E(e))?this.port=null:this.parse(e,Ne))},getPathname:function(){var e=this.path;return this.cannotBeABaseURL?e[0]:e.length?"/"+D(e,"/"):""},setPathname:function(e){this.cannotBeABaseURL||(this.path=[],this.parse(e,Le))},getSearch:function(){var e=this.query;return e?"?"+e:""},setSearch:function(e){""===(e=E(e))?this.query=null:("?"===U(e,0)&&(e=W(e,1)),this.query="",this.parse(e,De)),this.searchParams.update()},getSearchParams:function(){return this.searchParams.facade},getHash:function(){var e=this.fragment;return e?"#"+e:""},setHash:function(e){""!==(e=E(e))?("#"===U(e,0)&&(e=W(e,1)),this.fragment="",this.parse(e,Pe)):this.fragment=null},update:function(){this.query=this.searchParams.serialize()||null}};var Fe=function(e){var t=f(this,He),r=O(arguments.length,1)>1?arguments[1]:void 0,n=I(t,new ke(e,!1,r));o||(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())},He=Fe.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(o&&(d(He,"href",Be("serialize","setHref")),d(He,"origin",Be("getOrigin")),d(He,"protocol",Be("getProtocol","setProtocol")),d(He,"username",Be("getUsername","setUsername")),d(He,"password",Be("getPassword","setPassword")),d(He,"host",Be("getHost","setHost")),d(He,"hostname",Be("getHostname","setHostname")),d(He,"port",Be("getPort","setPort")),d(He,"pathname",Be("getPathname","setPathname")),d(He,"search",Be("getSearch","setSearch")),d(He,"searchParams",Be("getSearchParams")),d(He,"hash",Be("getHash","setHash"))),l(He,"toJSON",(function(){return S(this).serialize()}),{enumerable:!0}),l(He,"toString",(function(){return S(this).serialize()}),{enumerable:!0}),N){var Ge=N.createObjectURL,We=N.revokeObjectURL;Ge&&l(Fe,"createObjectURL",u(Ge,N)),We&&l(Fe,"revokeObjectURL",u(We,N))}y(Fe,"URL"),i({global:!0,constructor:!0,forced:!s,sham:!o},{URL:Fe})},5823:function(e,t,r){"use strict";var n=r(6518),i=r(4576),o=r(9565),s=r(3724),a=r(2805),u=r(4644),c=r(6346),l=r(679),d=r(6980),f=r(6699),h=r(2087),p=r(8014),v=r(7696),m=r(8229),_=r(8319),g=r(6969),E=r(9297),y=r(6955),O=r(34),T=r(757),R=r(2360),I=r(1625),S=r(2967),C=r(8480).f,b=r(3251),N=r(9213).forEach,A=r(7633),M=r(2106),w=r(4913),L=r(7347),U=r(5370),x=r(1181),D=r(3167),P=x.get,k=x.set,F=x.enforce,H=w.f,B=L.f,G=i.RangeError,W=c.ArrayBuffer,j=W.prototype,q=c.DataView,K=u.NATIVE_ARRAY_BUFFER_VIEWS,z=u.TYPED_ARRAY_TAG,V=u.TypedArray,J=u.TypedArrayPrototype,Y=u.isTypedArray,X="BYTES_PER_ELEMENT",Q="Wrong length",$=function(e,t){M(e,t,{configurable:!0,get:function(){return P(this)[t]}})},Z=function(e){var t;return I(j,e)||"ArrayBuffer"===(t=y(e))||"SharedArrayBuffer"===t},ee=function(e,t){return Y(e)&&!T(t)&&t in e&&h(+t)&&t>=0},te=function(e,t){return t=g(t),ee(e,t)?d(2,e[t]):B(e,t)},re=function(e,t,r){return t=g(t),!(ee(e,t)&&O(r)&&E(r,"value"))||E(r,"get")||E(r,"set")||r.configurable||E(r,"writable")&&!r.writable||E(r,"enumerable")&&!r.enumerable?H(e,t,r):(e[t]=r.value,e)};s?(K||(L.f=te,w.f=re,$(J,"buffer"),$(J,"byteOffset"),$(J,"byteLength"),$(J,"length")),n({target:"Object",stat:!0,forced:!K},{getOwnPropertyDescriptor:te,defineProperty:re}),e.exports=function(e,t,r){var s=e.match(/\d+/)[0]/8,u=e+(r?"Clamped":"")+"Array",c="get"+e,d="set"+e,h=i[u],g=h,E=g&&g.prototype,y={},T=function(e,t){H(e,t,{get:function(){return function(e,t){var r=P(e);return r.view[c](t*s+r.byteOffset,!0)}(this,t)},set:function(e){return function(e,t,n){var i=P(e);i.view[d](t*s+i.byteOffset,r?_(n):n,!0)}(this,t,e)},enumerable:!0})};K?a&&(g=t((function(e,t,r,n){return l(e,E),D(O(t)?Z(t)?void 0!==n?new h(t,m(r,s),n):void 0!==r?new h(t,m(r,s)):new h(t):Y(t)?U(g,t):o(b,g,t):new h(v(t)),e,g)})),S&&S(g,V),N(C(h),(function(e){e in g||f(g,e,h[e])})),g.prototype=E):(g=t((function(e,t,r,n){l(e,E);var i,a,u,c=0,d=0;if(O(t)){if(!Z(t))return Y(t)?U(g,t):o(b,g,t);i=t,d=m(r,s);var f=t.byteLength;if(void 0===n){if(f%s)throw new G(Q);if((a=f-d)<0)throw new G(Q)}else if((a=p(n)*s)+d>f)throw new G(Q);u=a/s}else u=v(t),i=new W(a=u*s);for(k(e,{buffer:i,byteOffset:d,byteLength:a,length:u,view:new q(i)});c<u;)T(e,c++)})),S&&S(g,V),E=g.prototype=R(J)),E.constructor!==g&&f(E,"constructor",g),F(E).TypedArrayConstructor=g,z&&f(E,z,u);var I=g!==h;y[u]=g,n({global:!0,constructor:!0,forced:I,sham:!K},y),X in g||f(g,X,s),X in E||f(E,X,s),A(u)}):e.exports=function(){}},5854:function(e,t,r){"use strict";var n=r(2777),i=TypeError;e.exports=function(e){var t=n(e,"number");if("number"==typeof t)throw new i("Can't convert number to bigint");return BigInt(t)}},5917:function(e,t,r){"use strict";var n=r(3724),i=r(9039),o=r(4055);e.exports=!n&&!i((function(){return 7!==Object.defineProperty(o("div"),"a",{get:function(){return 7}}).a}))},5966:function(e,t,r){"use strict";var n=r(9306),i=r(4117);e.exports=function(e,t){var r=e[t];return i(r)?void 0:n(r)}},6031:function(e,t,r){"use strict";r(5575),r(4599)},6033:function(e,t,r){"use strict";r(8523)},6043:function(e,t,r){"use strict";var n=r(9306),i=TypeError,o=function(e){var t,r;this.promise=new e((function(e,n){if(void 0!==t||void 0!==r)throw new i("Bad Promise constructor");t=e,r=n})),this.resolve=n(t),this.reject=n(r)};e.exports.f=function(e){return new o(e)}},6072:function(e,t,r){"use strict";var n=r(4644),i=r(926).right,o=n.aTypedArray;(0,n.exportTypedArrayMethod)("reduceRight",(function(e){var t=arguments.length;return i(o(this),e,t,t>1?arguments[1]:void 0)}))},6080:function(e,t,r){"use strict";var n=r(7476),i=r(9306),o=r(616),s=n(n.bind);e.exports=function(e,t){return i(e),void 0===t?e:o?s(e,t):function(){return e.apply(t,arguments)}}},6098:function(e,t,r){"use strict";var n=r(9504),i=2147483647,o=/[^\0-\u007E]/,s=/[.\u3002\uFF0E\uFF61]/g,a="Overflow: input needs wider integers to process",u=RangeError,c=n(s.exec),l=Math.floor,d=String.fromCharCode,f=n("".charCodeAt),h=n([].join),p=n([].push),v=n("".replace),m=n("".split),_=n("".toLowerCase),g=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))},y=function(e){var t=[];e=function(e){for(var t=[],r=0,n=e.length;r<n;){var i=f(e,r++);if(i>=55296&&i<=56319&&r<n){var o=f(e,r++);56320==(64512&o)?p(t,((1023&i)<<10)+(1023&o)+65536):(p(t,i),r--)}else p(t,i)}return t}(e);var r,n,o=e.length,s=128,c=0,v=72;for(r=0;r<e.length;r++)(n=e[r])<128&&p(t,d(n));var m=t.length,_=m;for(m&&p(t,"-");_<o;){var y=i;for(r=0;r<e.length;r++)(n=e[r])>=s&&n<y&&(y=n);var O=_+1;if(y-s>l((i-c)/O))throw new u(a);for(c+=(y-s)*O,s=y,r=0;r<e.length;r++){if((n=e[r])<s&&++c>i)throw new u(a);if(n===s){for(var T=c,R=36;;){var I=R<=v?1:R>=v+26?26:R-v;if(T<I)break;var S=T-I,C=36-I;p(t,d(g(I+S%C))),T=l(S/C),R+=36}p(t,d(g(T))),v=E(c,O,_===m),c=0,_++}}c++,s++}return h(t,"")};e.exports=function(e){var t,r,n=[],i=m(v(_(e),s,"."),".");for(t=0;t<i.length;t++)r=i[t],p(n,c(o,r)?"xn--"+y(r):r);return h(n,".")}},6099:function(e,t,r){"use strict";var n=r(2140),i=r(6840),o=r(3179);n||i(Object.prototype,"toString",o,{unsafe:!0})},6119:function(e,t,r){"use strict";var n=r(5745),i=r(3392),o=n("keys");e.exports=function(e){return o[e]||(o[e]=i(e))}},6193:function(e,t,r){"use strict";var n=r(4215);e.exports="NODE"===n},6198:function(e,t,r){"use strict";var n=r(8014);e.exports=function(e){return n(e.length)}},6237:function(e,t,r){"use strict";e.exports=u;var n,i=r(3610),o=i.LongBits,s=i.utf8;function a(e,t){return RangeError("index out of range: "+e.pos+" + "+(t||1)+" > "+e.len)}function u(e){this.buf=e,this.pos=0,this.len=e.length}var c,l="undefined"!=typeof Uint8Array?function(e){if(e instanceof Uint8Array||Array.isArray(e))return new u(e);throw Error("illegal buffer")}:function(e){if(Array.isArray(e))return new u(e);throw Error("illegal buffer")},d=function(){return i.Buffer?function(e){return(u.create=function(e){return i.Buffer.isBuffer(e)?new n(e):l(e)})(e)}:l};function f(){var e=new o(0,0),t=0;if(!(this.len-this.pos>4)){for(;t<3;++t){if(this.pos>=this.len)throw a(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 a(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 p(){if(this.pos+8>this.len)throw a(this,8);return new o(h(this.buf,this.pos+=4),h(this.buf,this.pos+=4))}u.create=d(),u.prototype._slice=i.Array.prototype.subarray||i.Array.prototype.slice,u.prototype.uint32=(c=4294967295,function(){if(c=(127&this.buf[this.pos])>>>0,this.buf[this.pos++]<128)return c;if(c=(c|(127&this.buf[this.pos])<<7)>>>0,this.buf[this.pos++]<128)return c;if(c=(c|(127&this.buf[this.pos])<<14)>>>0,this.buf[this.pos++]<128)return c;if(c=(c|(127&this.buf[this.pos])<<21)>>>0,this.buf[this.pos++]<128)return c;if(c=(c|(15&this.buf[this.pos])<<28)>>>0,this.buf[this.pos++]<128)return c;if((this.pos+=5)>this.len)throw this.pos=this.len,a(this,10);return c}),u.prototype.int32=function(){return 0|this.uint32()},u.prototype.sint32=function(){var e=this.uint32();return e>>>1^-(1&e)},u.prototype.bool=function(){return 0!==this.uint32()},u.prototype.fixed32=function(){if(this.pos+4>this.len)throw a(this,4);return h(this.buf,this.pos+=4)},u.prototype.sfixed32=function(){if(this.pos+4>this.len)throw a(this,4);return 0|h(this.buf,this.pos+=4)},u.prototype.float=function(){if(this.pos+4>this.len)throw a(this,4);var e=i.float.readFloatLE(this.buf,this.pos);return this.pos+=4,e},u.prototype.double=function(){if(this.pos+8>this.len)throw a(this,4);var e=i.float.readDoubleLE(this.buf,this.pos);return this.pos+=8,e},u.prototype.bytes=function(){var e=this.uint32(),t=this.pos,r=this.pos+e;if(r>this.len)throw a(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)},u.prototype.string=function(){var e=this.bytes();return s.read(e,0,e.length)},u.prototype.skip=function(e){if("number"==typeof e){if(this.pos+e>this.len)throw a(this,e);this.pos+=e}else do{if(this.pos>=this.len)throw a(this)}while(128&this.buf[this.pos++]);return this},u.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},u._configure=function(e){n=e,u.create=d(),n._configure();var t=i.Long?"toLong":"toNumber";i.merge(u.prototype,{int64:function(){return f.call(this)[t](!1)},uint64:function(){return f.call(this)[t](!0)},sint64:function(){return f.call(this).zzDecode()[t](!1)},fixed64:function(){return p.call(this)[t](!0)},sfixed64:function(){return p.call(this)[t](!1)}})}},6269:function(e){"use strict";e.exports={}},6279:function(e,t,r){"use strict";var n=r(6840);e.exports=function(e,t,r){for(var i in t)n(e,i,t[i],r);return e}},6319:function(e,t,r){"use strict";var n=r(8551),i=r(9539);e.exports=function(e,t,r,o){try{return o?t(n(r)[0],r[1]):t(r)}catch(t){i(e,"throw",t)}}},6346:function(e,t,r){"use strict";var n=r(4576),i=r(9504),o=r(3724),s=r(7811),a=r(350),u=r(6699),c=r(2106),l=r(6279),d=r(9039),f=r(679),h=r(1291),p=r(8014),v=r(7696),m=r(5617),_=r(8490),g=r(2787),E=r(2967),y=r(4373),O=r(7680),T=r(3167),R=r(7740),I=r(687),S=r(1181),C=a.PROPER,b=a.CONFIGURABLE,N="ArrayBuffer",A="DataView",M="prototype",w="Wrong index",L=S.getterFor(N),U=S.getterFor(A),x=S.set,D=n[N],P=D,k=P&&P[M],F=n[A],H=F&&F[M],B=Object.prototype,G=n.Array,W=n.RangeError,j=i(y),q=i([].reverse),K=_.pack,z=_.unpack,V=function(e){return[255&e]},J=function(e){return[255&e,e>>8&255]},Y=function(e){return[255&e,e>>8&255,e>>16&255,e>>24&255]},X=function(e){return e[3]<<24|e[2]<<16|e[1]<<8|e[0]},Q=function(e){return K(m(e),23,4)},$=function(e){return K(e,52,8)},Z=function(e,t,r){c(e[M],t,{configurable:!0,get:function(){return r(this)[t]}})},ee=function(e,t,r,n){var i=U(e),o=v(r),s=!!n;if(o+t>i.byteLength)throw new W(w);var a=i.bytes,u=o+i.byteOffset,c=O(a,u,u+t);return s?c:q(c)},te=function(e,t,r,n,i,o){var s=U(e),a=v(r),u=n(+i),c=!!o;if(a+t>s.byteLength)throw new W(w);for(var l=s.bytes,d=a+s.byteOffset,f=0;f<t;f++)l[d+f]=u[c?f:t-f-1]};if(s){var re=C&&D.name!==N;d((function(){D(1)}))&&d((function(){new D(-1)}))&&!d((function(){return new D,new D(1.5),new D(NaN),1!==D.length||re&&!b}))?re&&b&&u(D,"name",N):((P=function(e){return f(this,k),T(new D(v(e)),this,P)})[M]=k,k.constructor=P,R(P,D)),E&&g(H)!==B&&E(H,B);var ne=new F(new P(2)),ie=i(H.setInt8);ne.setInt8(0,2147483648),ne.setInt8(1,2147483649),!ne.getInt8(0)&&ne.getInt8(1)||l(H,{setInt8:function(e,t){ie(this,e,t<<24>>24)},setUint8:function(e,t){ie(this,e,t<<24>>24)}},{unsafe:!0})}else k=(P=function(e){f(this,k);var t=v(e);x(this,{type:N,bytes:j(G(t),0),byteLength:t}),o||(this.byteLength=t,this.detached=!1)})[M],H=(F=function(e,t,r){f(this,H),f(e,k);var n=L(e),i=n.byteLength,s=h(t);if(s<0||s>i)throw new W("Wrong offset");if(s+(r=void 0===r?i-s:p(r))>i)throw new W("Wrong length");x(this,{type:A,buffer:e,byteLength:r,byteOffset:s,bytes:n.bytes}),o||(this.buffer=e,this.byteLength=r,this.byteOffset=s)})[M],o&&(Z(P,"byteLength",L),Z(F,"buffer",U),Z(F,"byteLength",U),Z(F,"byteOffset",U)),l(H,{getInt8:function(e){return ee(this,1,e)[0]<<24>>24},getUint8:function(e){return ee(this,1,e)[0]},getInt16:function(e){var t=ee(this,2,e,arguments.length>1&&arguments[1]);return(t[1]<<8|t[0])<<16>>16},getUint16:function(e){var t=ee(this,2,e,arguments.length>1&&arguments[1]);return t[1]<<8|t[0]},getInt32:function(e){return X(ee(this,4,e,arguments.length>1&&arguments[1]))},getUint32:function(e){return X(ee(this,4,e,arguments.length>1&&arguments[1]))>>>0},getFloat32:function(e){return z(ee(this,4,e,arguments.length>1&&arguments[1]),23)},getFloat64:function(e){return z(ee(this,8,e,arguments.length>1&&arguments[1]),52)},setInt8:function(e,t){te(this,1,e,V,t)},setUint8:function(e,t){te(this,1,e,V,t)},setInt16:function(e,t){te(this,2,e,J,t,arguments.length>2&&arguments[2])},setUint16:function(e,t){te(this,2,e,J,t,arguments.length>2&&arguments[2])},setInt32:function(e,t){te(this,4,e,Y,t,arguments.length>2&&arguments[2])},setUint32:function(e,t){te(this,4,e,Y,t,arguments.length>2&&arguments[2])},setFloat32:function(e,t){te(this,4,e,Q,t,arguments.length>2&&arguments[2])},setFloat64:function(e,t){te(this,8,e,$,t,arguments.length>2&&arguments[2])}});I(P,N),I(F,A),e.exports={ArrayBuffer:P,DataView:F}},6395:function(e){"use strict";e.exports=!1},6434:function(e,t,r){"use strict";var n=t,i=r(2551);n[".google.protobuf.Any"]={fromObject:function(e){if(e&&e["@type"]){var t=e["@type"].substring(e["@type"].lastIndexOf("/")+1),r=this.lookup(t);if(r){var n="."===e["@type"].charAt(0)?e["@type"].substr(1):e["@type"];return-1===n.indexOf("/")&&(n="/"+n),this.create({type_url:n,value:r.encode(r.fromObject(e)).finish()})}}return this.fromObject(e)},toObject:function(e,t){var r="",n="";if(t&&t.json&&e.type_url&&e.value){n=e.type_url.substring(e.type_url.lastIndexOf("/")+1),r=e.type_url.substring(0,e.type_url.lastIndexOf("/")+1);var o=this.lookup(n);o&&(e=o.decode(e.value))}if(!(e instanceof this.ctor)&&e instanceof i){var s=e.$type.toObject(e,t);return""===r&&(r="type.googleapis.com/"),n=r+("."===e.$type.fullName[0]?e.$type.fullName.substr(1):e.$type.fullName),s["@type"]=n,s}return this.toObject(e,t)}}},6448:function(e,t,r){"use strict";r.d(t,{C:function(){return i}}),r(9089);var n=r(4269),i=function(){function e(e){var t=e.type,r=e.id;this.id=r,this.type=t}return e.prototype.set=function(e){e.file=e.file||e.fileInputId&&n.Wp.getFileUrl(e.fileInputId),this.body={id:this.id,chatType:e.chatType||"singleChat",type:"video",file:e.file,filename:e.filename,length:e.length,file_length:e.file_length,fileInputId:e.fileInputId,to:e.to,from:e.from,roomType:e.roomType,success:e.success,fail:e.fail,ext:e.ext,time:Date.now(),apiUrl:e.apiUrl,onFileUploadError:e.onFileUploadError,onFileUploadComplete:e.onFileUploadComplete,onFileUploadProgress:e.onFileUploadProgress,body:e.body,isChatThread:e.isChatThread}},e.prototype.setChatType=function(e){return!!this.body&&(this.body.chatType=e,!0)},e.prototype.setGroup=function(e){return!!this.body&&(this.body.group=e,!0)},e.create=function(e){return{id:n.Wp.getUniqueId(),chatType:e.chatType||"singleChat",type:"video",file:e.file,filename:e.filename,length:e.length,file_length:e.file_length,fileInputId:e.fileInputId,to:e.to,from:e.from||"",ext:e.ext,time:Date.now(),onFileUploadError:e.onFileUploadError,onFileUploadComplete:e.onFileUploadComplete,onFileUploadProgress:e.onFileUploadProgress,body:e.body,msgConfig:e.msgConfig,isChatThread:e.isChatThread,priority:e.priority,deliverOnlineOnly:e.deliverOnlineOnly,receiverList:e.receiverList,webhookEnv:e.webhookEnv}},e}()},6468:function(e,t,r){"use strict";var n=r(6518),i=r(4576),o=r(9504),s=r(2796),a=r(6840),u=r(3451),c=r(2652),l=r(679),d=r(4901),f=r(4117),h=r(34),p=r(9039),v=r(4428),m=r(687),_=r(3167);e.exports=function(e,t,r){var g=-1!==e.indexOf("Map"),E=-1!==e.indexOf("Weak"),y=g?"set":"add",O=i[e],T=O&&O.prototype,R=O,I={},S=function(e){var t=o(T[e]);a(T,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(s(e,!d(O)||!(E||T.forEach&&!p((function(){(new O).entries().next()})))))R=r.getConstructor(t,e,g,y),u.enable();else if(s(e,!0)){var C=new R,b=C[y](E?{}:-0,1)!==C,N=p((function(){C.has(1)})),A=v((function(e){new O(e)})),M=!E&&p((function(){for(var e=new O,t=5;t--;)e[y](t,t);return!e.has(-0)}));A||((R=t((function(e,t){l(e,T);var r=_(new O,e,R);return f(t)||c(t,r[y],{that:r,AS_ENTRIES:g}),r}))).prototype=T,T.constructor=R),(N||M)&&(S("delete"),S("has"),g&&S("get")),(M||b)&&S(y),E&&T.clear&&delete T.clear}return I[e]=R,n({global:!0,constructor:!0,forced:R!==O},I),m(R,e),E||r.setStrong(R,e,g),R}},6469:function(e,t,r){"use strict";var n=r(8227),i=r(2360),o=r(4913).f,s=n("unscopables"),a=Array.prototype;void 0===a[s]&&o(a,s,{configurable:!0,value:i(null)}),e.exports=function(e){a[s][e]=!0}},6496:function(e,t,r){"use strict";r.d(t,{E:function(){return i}}),r(4346),r(9089);var n=r(4269),i=function(){function e(e){var t=e.type,r=e.id||n.Wp.getUniqueId();this.id=r,this.type=t,this.value=""}return e.prototype.set=function(e){this.body={id:this.id,chatType:e.chatType||"singleChat",type:"txt",to:e.to,msg:e.msg,from:e.from,roomType:e.roomType,success:e.success,fail:e.fail,ext:e.ext,time:Date.now(),isChatThread:e.isChatThread},this.value=e.msg},e.prototype.setChatType=function(e){return!!this.body&&(this.body.chatType=e,!0)},e.prototype.setGroup=function(e){return!!this.body&&(this.body.group=e,!0)},e.create=function(e){var t,r;return(null===(t=e.msgConfig)||void 0===t?void 0:t.languages)&&Array.isArray(null===(r=e.msgConfig)||void 0===r?void 0:r.languages),{type:"txt",id:n.Wp.getUniqueId(),msg:e.msg,to:e.to,from:e.from||"",chatType:e.chatType,ext:e.ext,time:Date.now(),msgConfig:e.msgConfig,isChatThread:e.isChatThread,priority:e.priority,deliverOnlineOnly:e.deliverOnlineOnly,receiverList:e.receiverList,webhookEnv:e.webhookEnv}},e}()},6499:function(e,t,r){"use strict";var n=r(6518),i=r(9565),o=r(9306),s=r(6043),a=r(1103),u=r(2652);n({target:"Promise",stat:!0,forced:r(537)},{all:function(e){var t=this,r=s.f(t),n=r.resolve,c=r.reject,l=a((function(){var r=o(t.resolve),s=[],a=0,l=1;u(e,(function(e){var o=a++,u=!1;l++,i(r,t,e).then((function(e){u||(u=!0,s[o]=e,--l||n(s))}),c)})),--l||n(s)}));return l.error&&c(l.value),r.promise}})},6518:function(e,t,r){"use strict";var n=r(4576),i=r(7347).f,o=r(6699),s=r(6840),a=r(9433),u=r(7740),c=r(2796);e.exports=function(e,t){var r,l,d,f,h,p=e.target,v=e.global,m=e.stat;if(r=v?n:m?n[p]||a(p,{}):n[p]&&n[p].prototype)for(l in t){if(f=t[l],d=e.dontCallGetSet?(h=i(r,l))&&h.value:r[l],!c(v?l:p+(m?".":"#")+l,e.forced)&&void 0!==d){if(typeof f==typeof d)continue;u(f,d)}(e.sham||d&&d.sham)&&o(f,"sham",!0),s(r,l,f,e)}}},6602:function(e,t,r){"use strict";r.d(t,{QR:function(){return s},Rp:function(){return a},b6:function(){return u}}),r(3792),r(4743),r(1745),r(8309),r(6099),r(1489),r(1630),r(2170),r(5044),r(1920),r(1694),r(9955),r(3206),r(4496),r(6651),r(2887),r(9369),r(6812),r(8995),r(1575),r(6072),r(8747),r(8845),r(9423),r(7301),r(373),r(6614),r(1405),r(3684);var n=r(2566),i=r.n(n),o=268435455;function s(e){var t=e;return i().buf(t)>>>0}function a(e){if(e<0)throw new Error("encodeLength: Length must be non-negative");if(e>o)throw new Error("encodeLength: Length exceeds maximum: ".concat(o));if(0===e)return new Uint8Array([0]);for(var t=[],r=e;r>0;){var n=127&r;(r>>>=7)>0&&(n|=128),t.push(n)}return new Uint8Array(t)}function u(e,t){if(t.offset>=e.length)throw new Error("decodeLength: No data to decode: offset beyond data length");for(var r=0,n=0;t.offset<e.length;){var i=e[t.offset];if(t.offset++,r|=(127&i)<<n,!(128&i))return r>>>0;if((n+=7)>=28)throw new Error("decodeLength: Invalid length encoding: exceeds 4 bytes")}throw new Error("decodeLength: Incomplete length encoding: missing terminator byte")}},6614:function(e,t,r){"use strict";var n=r(4644),i=r(8014),o=r(5610),s=n.aTypedArray,a=n.getTypedArrayConstructor;(0,n.exportTypedArrayMethod)("subarray",(function(e,t){var r=s(this),n=r.length,u=o(e,n);return new(a(r))(r.buffer,r.byteOffset+u*r.BYTES_PER_ELEMENT,i((void 0===t?n:o(t,n))-u))}))},6646:function(e,t,r){"use strict";r.d(t,{up:function(){return b},xz:function(){return N}}),r(2675),r(9463),r(2259),r(8706),r(2008),r(113),r(8980),r(1629),r(3418),r(4423),r(5276),r(4346),r(3792),r(2062),r(2712),r(4782),r(5086),r(4554),r(4743),r(1745),r(8309),r(9089),r(739),r(3288),r(4170),r(2010),r(6033),r(2892),r(2637),r(150),r(9085),r(9432),r(6099),r(3362),r(7495),r(8781),r(1699),r(7764),r(1489),r(1630),r(2170),r(5044),r(1920),r(1694),r(9955),r(3206),r(8345),r(4496),r(6651),r(2887),r(9369),r(6812),r(8995),r(1575),r(6072),r(8747),r(8845),r(9423),r(7301),r(373),r(6614),r(1405),r(3684),r(3500),r(2953),r(6031),r(3296),r(7208),r(8408);var n=r(3887),i=r.n(n),o=r(8570),s=r.n(o),a=r(8093),u=r(6834),c=r(1274),l=r(9254),d=r(7120),f=r(7468),h=r(6981),p=r(8579),v=r(4269),m=r(3484),_=r(7968),g=r(9061),E=r(3603),y=r(4331),O=r(4467),T=r(8021),R=r(589),I=r(686),S=r(5732);function C(e){return C="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},C(e)}var b,N,A,M,w=function(){return w=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},w.apply(this,arguments)},L=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function s(e){try{u(n.next(e))}catch(e){o(e)}}function a(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}u((n=n.apply(e,t||[])).next())}))},U=function(e,t){var r,n,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;s;)try{if(r=1,n&&(i=2&o[0]?n.return:o[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,o[1])).done)return i;switch(n=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,n=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],n=0}finally{r=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}},x=new T.A;!function(e){e[e.NORMAL=0]="NORMAL",e[e.SINGLECHAT=1]="SINGLECHAT",e[e.GROUPCHAT=2]="GROUPCHAT",e[e.CHATROOM=3]="CHATROOM",e[e.READ_ACK=4]="READ_ACK",e[e.DELIVER_ACK=5]="DELIVER_ACK",e[e.RECALL=6]="RECALL",e[e.CHANNEL_ACK=7]="CHANNEL_ACK",e[e.EDIT=8]="EDIT"}(b||(b={})),function(e){e[e.BODY=1]="BODY",e[e.BODY_AND_EXT=2]="BODY_AND_EXT"}(N||(N={})),function(e){e[e.APNs=0]="APNs",e[e.FCM=1]="FCM",e[e.HMSPUSH=2]="HMSPUSH",e[e.MIPUSH=3]="MIPUSH",e[e.MEIZUPUSH=4]="MEIZUPUSH",e[e.VIVOPUSH=5]="VIVOPUSH",e[e.OPPOPUSH=6]="OPPOPUSH",e[e.HONORPUSH=7]="HONORPUSH"}(A||(A={})),function(e){e[e.OK=0]="OK",e[e.FAIL=1]="FAIL",e[e.UNAUTHORIZED=2]="UNAUTHORIZED",e[e.MISSING_PARAMETER=3]="MISSING_PARAMETER",e[e.WRONG_PARAMETER=4]="WRONG_PARAMETER",e[e.REDIRECT=5]="REDIRECT",e[e.TOKEN_EXPIRED=6]="TOKEN_EXPIRED",e[e.PERMISSION_DENIED=7]="PERMISSION_DENIED",e[e.NO_ROUTE=8]="NO_ROUTE",e[e.UNKNOWN_COMMAND=9]="UNKNOWN_COMMAND",e[e.PB_PARSER_ERROR=10]="PB_PARSER_ERROR",e[e.BIND_ANOTHER_DEVICE=11]="BIND_ANOTHER_DEVICE",e[e.IM_FORBIDDEN=12]="IM_FORBIDDEN",e[e.TOO_MANY_DEVICES=13]="TOO_MANY_DEVICES",e[e.PLATFORM_LIMIT=14]="PLATFORM_LIMIT",e[e.USER_MUTED=15]="USER_MUTED",e[e.ENCRYPT_DISABLE=16]="ENCRYPT_DISABLE",e[e.ENCRYPT_ENABLE=17]="ENCRYPT_ENABLE",e[e.DECRYPT_FAILURE=18]="DECRYPT_FAILURE",e[e.PERMISSION_DENIED_EXTERNAL=19]="PERMISSION_DENIED_EXTERNAL",e[e.RESOURCE_CHANGED=20]="RESOURCE_CHANGED"}(M||(M={}));var D=["txt","img","video","audio","file","loc","custom","cmd","combine"],P=v.Wp.getEnvInfo();function k(){var e="webim",t="",r="",n=(new Date).valueOf(),i=v.Wp.getDevicePlatform(P);if(this.isFixedDeviceId){var o=v.Wp.getLocalDeviceInfo();if(o){var s=JSON.parse(o);e=s.deviceId,t=s.deviceName,r=s.deviceUuid,void 0!==this.customOSPlatform&&(t=this.deviceId,e="custom".concat(this.customOSPlatform,"_").concat(r))}else"webim"===this.deviceId?(r="".concat(i,"_").concat(n.toString()),e="".concat(this.deviceId,"_").concat(r),t=this.deviceId,void 0!==this.customOSPlatform&&(e="custom".concat(this.customOSPlatform,"_").concat(r))):(e=t=r="webim_".concat(i,"_").concat(this.deviceId),void 0!==this.customOSPlatform&&(r="".concat(i,"_").concat(n.toString()),t=this.deviceId,e="custom".concat(this.customOSPlatform,"_").concat(r))),v.Wp.setLocalDeviceInfo(JSON.stringify({deviceId:e,deviceName:t,deviceUuid:r}))}else"webim"===this.deviceId?(r="random_".concat(i,"_").concat(n.toString()),e="".concat(this.deviceId,"_").concat(r),t=this.deviceId):e=t=r="webim_".concat(i,"_").concat(this.deviceId),void 0!==this.customOSPlatform&&(r="random_".concat(i,"_").concat(n.toString()),t=this.deviceId,e="custom".concat(this.customOSPlatform,"_").concat(r));return{deviceId:e,deviceName:t,deviceUuid:r,devicePlatform:i}}function F(){var e,t,r,n,i=k.call(this),o=i.deviceId,s=i.deviceName,a=i.deviceUuid,u=i.devicePlatform,c=[];this.context.jid&&(this.context.jid.clientResource=o),this._compressor&&(0,O.Dz)(this._compressor,O.eB.NONE);var l=this.root.lookup("easemob.pb.Provision"),d=u===v.i9.UNI,f=!this.logOut,h=l.decode(c);if(void 0!==this.customOSPlatform&&(h.osCustomValue=this.customOSPlatform,this.osType=5),h.compressType=this.compressType,h.encryptType=this.encryptType,h.osType=this.osType,h.version=this.version,h.deviceName=s,h.resource=o,h.deviceUuid=a,h.authToken='{"token":"$t$'+this.token+'"}',h.sessionId=Date.now().toString()+":",d){var p=!this.isAutoLogin;f&&(p=!1),_.vF.debug("isManualLogin",p),h.isManualLogin=p}var m=this._compressorFailureCount>=1?[]:[O.dc.COMPRESS_LZ4];h.protocolCompressType=m,this.sessionId=h.sessionId,this.loginInfoCustomExt&&(h.reason=this.loginInfoCustomExt),_.vF.info("provision info",{version:this.version,resource:o,isFixedDeviceId:this.isFixedDeviceId,loginInfoCustomExt:!!this.loginInfoCustomExt,token:(null===(t=null===(e=this.token)||void 0===e?void 0:e.slice)||void 0===t?void 0:t.call(e,0,10))+"...",userId:null===(n=null===(r=this.context)||void 0===r?void 0:r.jid)||void 0===n?void 0:n.name}),h.actionVersion="v5.2",h=l.encode(h).finish();var g=this.root.lookup("easemob.pb.MSync"),E=g.decode(c);return E.version=this.version,E.guid=this.context.jid,E.auth="$t$"+this.token,E.command=3,E.deviceId=s,E.serviceId=this.dataReport.getServiceId(),E.encryptType=this.encryptType,E.payload=h,E.traceId=x.gen(),g.encode(E).finish()}function H(e){var t=[],r=this.root.lookup("easemob.pb.Logout"),n=r.decode(t);n.sessionId=this.sessionId,n.reason=e,n=r.encode(n).finish();var i=this.root.lookup("easemob.pb.MSync"),o=i.decode(t);return o.version=this.version,o.guid=this.context.jid,o.auth="$t$"+this.token,o.command=4,o.deviceId=this.deviceId||"webim",o.serviceId=this.dataReport.getServiceId(),o.encryptType=this.encryptType,o.payload=n,o.traceId=x.gen(),_.vF.debug("traceId",o.traceId),i.encode(o).finish()}function B(e,t){var r=this,n=v.Wp.getEnvInfo();if("zfb"===n.platform||"dd"===n.platform){for(var o="",s=0;s<e.length;s++)o+=String.fromCharCode(e[s]);return{data:o=i().btoa(o),isBuffer:!1,complete:function(){},fail:function(e){"sendSocketMessage:fail taskID not exist"!==e.errMsg&&"SocketTast.send:fail SocketTask.readyState is not OPEN"!==e.errMsg||(_.vF.error("send message fail and reconnect"),r.reconnecting||r.reconnect()),t&&r._msgHash&&r._msgHash[t]&&r._msgHash[t].fail({id:t})}}}var a=e;return{data:a.buffer.slice(a.byteOffset,a.byteOffset+a.byteLength),fail:function(e){"sendSocketMessage:fail taskID not exist"!==e.errMsg&&"SocketTast.send:fail SocketTask.readyState is not OPEN"!==e.errMsg||r.reconnecting||r.reconnect(),t&&r._msgHash&&r._msgHash[t]&&r._msgHash[t].fail({id:t})}}}function G(e,t){var r;return L(this,void 0,void 0,(function(){var n,i,o,a,c;return U(this,(function(l){switch(l.label){case 0:for(_.vF.debug("metas length: ",e.length),n=[],i=0;i<e.length;i++)switch(o=e[i],new(s())(o.id.low,o.id.high,o.id.unsigned).toString(),o.ns){case 0:u.$b.call(this,o);break;case 1:n.push(u.yH.call(this,o,t,!1,!0,!0));break;case 2:u.PM.call(this,o);break;case 3:u.u0.handleRosterMsg.call(this,o);break;case 4:this.registerConfrIQHandler&&this.registerConfrIQHandler(o,t,this);break;case 5:u.CD.call(this,o);break;default:_.vF.error("distributeMeta",o)}return[4,Promise.all(n)];case 1:return a=l.sent(),(c=a.filter((function(e){return e&&"cmd"!==e.type}))).length>0&&(null===(r=this.eventHandler)||void 0===r||r.dispatch("onMessage",c)),[2]}}))}))}function W(e,t){G.call(this,e,t)}function j(e){var t,r=this;de.clear(),this._offlineMessagePullState===f.P.SYNC_INIT&&(this._offlineMessagePullState=f.P.SYNC_START,this._offlineMessagePullQueue=e.unread.reduce((function(e,t,n){return e.find((function(e){return e.name===t.queue.name}))||e.push(t),r.pullOfflineMessageInfo.pullCount+=t.n,e}),[]),this.pullOfflineMessageInfo.startTime=Date.now(),this._offlineMessageRpt=this.dataReport.geOperateFun({operationName:E.jz.MSYNC_SYNCOFFLINEMESSAGE}),null===(t=this.eventHandler)||void 0===t||t.dispatch("onOfflineMessageSyncStart"))}function q(e){var t;if(this._offlineMessagePullState===f.P.SYNC_START){var r=this._offlineMessagePullQueue.findIndex((function(t){return t.queue.name===e.queue.name}));if(r>-1){this._offlineMessagePullQueue.splice(r,1);var n=de.get(e.queue.name)||0;n>0&&this._offlineMessageRpt({isEndApi:!1,data:{isSuccess:1,requestName:E.jz.MSYNC_SYNCOFFLINEMESSAGE,requestMethod:"WEBSOCKET",requestUrl:this.url,code:E.G8.success,resultCount:n,requestElapse:Date.now()-this.pullOfflineMessageInfo.startTime}})}0===this._offlineMessagePullQueue.length&&(this._offlineMessagePullState=f.P.SYNC_FINISH,null===(t=this.eventHandler)||void 0===t||t.dispatch("onOfflineMessageSyncFinish"),this._offlineMessageRpt({data:{isLastApi:1,isSuccess:1,requestName:E.jz.MSYNC_SYNCOFFLINEMESSAGE,requestMethod:"WEBSOCKET",requestUrl:this.url,code:E.G8.success,resultCount:this.pullOfflineMessageInfo.pullCount}}),de.clear())}}function K(e){var t=this.root.lookup("easemob.pb.CommUnreadDL");t=t.decode(e.payload);var r=new(s())(t.timestamp.low,t.timestamp.high,t.timestamp.unsigned).toString();if(this.expirationTime&&this.compareTokenExpireTime(Number(r),this.expirationTime),0===t.unread.length)re.call(this);else{j.call(this,t),_.vF.debug("pull unread message",t.unread);for(var n=0;n<t.unread.length;n++)J.call(this,t.unread[n].queue)}re.call(this)}function z(){var e=[],t=this.root.lookup("easemob.pb.StatisticsBody"),r=t.decode(e);r.operation=0,r=t.encode(r).finish();var n=this.root.lookup("easemob.pb.Meta").decode(e);n.id=(new Date).valueOf(),n.ns=0,n.payload=r;var i=this.root.lookup("easemob.pb.CommSyncUL"),o=i.decode(e);o.meta=n,o=i.encode(o).finish();var s=this.root.lookup("easemob.pb.MSync"),a=s.decode(e);return a.version=this.version,a.encryptType=[0],a.command=0,a.payload=o,a.traceId=x.gen(),_.vF.debug("traceId",a.traceId),s.encode(a).finish()}function V(e){var t=[],r=this.root.lookup("easemob.pb.CommSyncUL"),n=r.decode(t);n.queue=e,n=r.encode(n).finish();var i=this.root.lookup("easemob.pb.MSync"),o=i.decode(t);return o.version=this.version,o.encryptType=this.encryptType,o.command=0,o.payload=n,o.traceId=x.gen(),_.vF.debug("traceId",o.traceId),i.encode(o).finish()}function J(e){_.vF.debug("sendBackqueue",e);var t=V.call(this,e);Oe.call(this,t)}function Y(e,t){var r=[],n=this.root.lookup("easemob.pb.CommSyncUL"),i=n.decode(r);i.queue=t,i.key=new(s())(e.low,e.high,e.unsigned).toString(),i=n.encode(i).finish();var o=this.root.lookup("easemob.pb.MSync"),a=o.decode(r);return a.version=this.version,a.encryptType=this.encryptType,a.command=0,a.payload=i,a.traceId=x.gen(),_.vF.debug("traceId",a.traceId),o.encode(a).finish()}function X(){var e=this;this.uniPush&&!1===this.isRegisterPush&&(this.isRegisterPush=!0,this.uniPush.onRegister((function(t){_.vF.debug("push token onRegister");var r=e.uniPushConfig||{},n=r.APNsCertificateName,i=void 0===n?"":n,o=r.HMSCertificateName,s=void 0===o?"":o,a=r.HONORCertificateName,u=void 0===a?"":a,c=r.MEIZUCertificateName,l=void 0===c?"":c,d=r.MICertificateName,f=void 0===d?"":d,p=r.OPPOCertificateName,v=void 0===p?"":p,m=r.VIVOCertificateName,g=void 0===m?"":m,E=r.FCMCertificateName,y=void 0===E?"":E;switch(t.push_type){case A.APNs:e.pushCertificateName=i;break;case A.FCM:e.pushCertificateName=y;break;case A.HMSPUSH:e.pushCertificateName=s;break;case A.HONORPUSH:e.pushCertificateName=u;break;case A.MEIZUPUSH:e.pushCertificateName=l;break;case A.MIPUSH:e.pushCertificateName=f;break;case A.OPPOPUSH:e.pushCertificateName=v;break;case A.VIVOPUSH:e.pushCertificateName=g;break;default:_.vF.error("unexpected push type",t.push_type)}e.pushCertificateName&&t.push_token&&h.B.call(e,{deviceId:e.clientResource,deviceToken:t.push_token,notifierName:e.pushCertificateName}).then((function(){_.vF.debug("uploadPushToken success")})).catch((function(e){_.vF.debug("uploadPushToken failed",e)}))})))}function Q(){var e;this._offlineMessagePullState=f.P.SYNC_INIT,this._offlineMessagePullQueue=[],this.times=1,this.autoReconnectNumTotal=0,this.onOpened&&this.onOpened(),X.call(this),null===(e=this.eventHandler)||void 0===e||e.dispatch("onConnected"),te.call(this),ie.call(this),ne.call(this),re.call(this),this.pullOfflineMessageInfo={pullCount:0,startTime:0}}function $(e,t){_.vF.debug("sendLastSession",e);var r=Y.call(this,e,t);Oe.call(this,r)}function Z(e){var t,r,n,i,o,s,u,c,f,h,p,v,g,E,y,T,R,I,S=this,C=this.root.lookup("easemob.pb.Provision").decode(e.payload);if(this.context.jid&&(this.context.jid.clientResource=C.resource),this.clientResource=C.resource,this.provisionTimer&&clearTimeout(this.provisionTimer),_.vF.debug("provision status",C.status),this._isLogging=!1,C.status.errorCode===M.OK){if(this.disconnectedReason=void 0,C.authToken){var b=JSON.parse(C.authToken).expires_in;if(!this.tokenExpiredTimer&&!this.tokenWillExpireTimer){var N=Date.now();this.expirationTime=b;var A=this.expirationTime-N;this.expiresIn=A<0?0:A,this.tokenExpireTimeCountDown(this.expiresIn)}}var x=C.protocolCompressType,D=C.protocolCompressDirection;if(_.vF.debug("protocol compress types",x),_.vF.debug("protocol compress direction",D),x.length>0&&x[0]===O.dc.COMPRESS_LZ4){var P=null!=D?D:O.eB.NONE;this._compressor?(0,O.Dz)(this._compressor,P):this._compressor=(0,O.kO)(P)}this.reconnecting=!1,this.logOut=!1,this.needSetReadyState&&(this.sock=w(w({},this.sock),{close:this.sock.close,send:this.sock.send,readyState:1})),this._localCache?(null===(t=this._localCache)||void 0===t?void 0:t.getInstance())?Q.call(this):this._localCache&&new this._localCache({user:this.user,dbName:"cache_".concat(Math.abs((0,l.s5)(this.appKey||this.appId)),"_").concat(this.user),version:d.G,onInit:function(){return L(S,void 0,void 0,(function(){return U(this,(function(e){return _.vF.debug("localCache init success"),Q.call(this),[2]}))}))}}):Q.call(this),null===(r=this.connectionResolve)||void 0===r||r.call(this)}else{var k=void 0,F=C.status,H=F.reason,B=F.errorCode;switch(_.vF.error("provision errorCode: ",B),_.vF.error("provision reason: ",H),B){case M.FAIL:k="Sorry, user register limit"===H?m.A.create({type:a.C.MAX_LIMIT,message:"Sorry, the number of user registrations limit has been reached"}):"Sorry, user register rate limit"===H?m.A.create({type:a.C.MAX_LIMIT,message:"Sorry, user register rate limit"}):"Sorry, token expired"===H?m.A.create({type:a.C.WEBIM_TOKEN_EXPIRED,message:"Sorry, token expired"}):"Sorry, token or password does not match login info"===H?m.A.create({type:a.C.WEBIM_CONNCTION_TOKEN_NOT_ASSIGN_ERROR,message:"INVALID_TOKEN"}):"Sorry, user not found"===H?m.A.create({type:a.C.USER_NOT_FOUND,message:"User not found"}):m.A.create({type:a.C.WEBIM_CONNCTION_AUTH_ERROR,message:"Auth failed"}),null===(n=this.connectionReject)||void 0===n||n.call(this,k),null===(i=this.eventHandler)||void 0===i||i.dispatch("onError",k);break;case M.WRONG_PARAMETER:k=m.A.create({type:a.C.REQUEST_PARAMETER_ERROR,message:"Invalid parameter"}),null===(o=this.connectionReject)||void 0===o||o.call(this,k),null===(s=this.eventHandler)||void 0===s||s.dispatch("onError",k);break;case M.UNAUTHORIZED:k=m.A.create({type:a.C.WEBIM_CONNCTION_AUTH_ERROR,message:"Auth failed"}),null===(u=this.connectionReject)||void 0===u||u.call(this,k),null===(c=this.eventHandler)||void 0===c||c.dispatch("onError",k);break;case M.IM_FORBIDDEN:k=m.A.create({type:a.C.WEBIM_SERVER_SERVING_DISABLED,message:"Server serving disabled."}),null===(f=this.connectionReject)||void 0===f||f.call(this,k),null===(h=this.eventHandler)||void 0===h||h.dispatch("onError",k);break;case M.PERMISSION_DENIED:k="Sorry, the app month live count limit"===H?m.A.create({type:a.C.MAX_LIMIT,message:"Sorry, the monthly active user limit for this app has been reached"}):"Sorry, the app day live count limit"===H?m.A.create({type:a.C.MAX_LIMIT,message:"Sorry, the daily active user limit for this app has been reached"}):"Sorry, the app online count limit"===H?m.A.create({type:a.C.MAX_LIMIT,message:"Sorry, the maximum number limit of online users for this app has been reached"}):m.A.create({type:a.C.WEBIM_CONNCTION_AUTH_ERROR,message:"Auth failed"}),null===(p=this.connectionReject)||void 0===p||p.call(this,k),null===(v=this.eventHandler)||void 0===v||v.dispatch("onError",k);break;case M.TOO_MANY_DEVICES:k=m.A.create({type:a.C.USER_LOGIN_TOO_MANY_DEVICES,message:"the number of devices the user is logged in to exceeds the limit"}),null===(g=this.connectionReject)||void 0===g||g.call(this,k),null===(E=this.eventHandler)||void 0===E||E.dispatch("onError",k);break;case M.RESOURCE_CHANGED:k=m.A.create({type:a.C.USER_DEVICE_CHANGED,message:"user device is changed"}),null===(y=this.connectionReject)||void 0===y||y.call(this,k),null===(T=this.eventHandler)||void 0===T||T.dispatch("onError",k);break;default:k=m.A.create({type:a.C.WEBIM_CONNCTION_AUTH_ERROR,message:H}),null===(R=this.connectionReject)||void 0===R||R.call(this,k),null===(I=this.eventHandler)||void 0===I||I.dispatch("onError",k)}this.disconnectedReason=k}}function ee(e){var t=this.root.lookup("easemob.pb.Logout").decode(e.payload);_.vF.debug("receiveLogoutResult",t)}function te(){var e,t;if((null===(e=this.unMSyncSendMsgMap)||void 0===e?void 0:e.size)>0){for(var r=Array.from(this.unMSyncSendMsgMap.keys()),n=0;n<r.length;n++){var i=this.unMSyncSendMsgMap.get(r[n]);Oe.call(this,i,r[n])}null===(t=this.unMSyncSendMsgMap)||void 0===t||t.clear()}}function re(){var e=z.call(this);Oe.call(this,e)}function ne(){_.vF.debug("sendUnreadDeal");var e=se.call(this);Oe.call(this,e)}function ie(){var e=this;oe.call(this),this.heartBeatID=setInterval((function(){(Date.now()-e.lastHeartbeat)/1e3>=30&&(_.vF.debug("send heart beat"),ne.call(e),e.lastHeartbeat=Date.now())}),this.heartBeatWait)}function oe(){clearInterval(this.heartBeatID)}function se(){var e=this.root.lookup("easemob.pb.MSync"),t=e.decode([]);return t.version=this.version,t.encryptType=this.encryptType,t.command=1,t.traceId=x.gen(),_.vF.debug("traceId",t.traceId),e.encode(t).finish()}function ae(e,t){return e.some((function(e){return e.name===t.name}))}function ue(e){var t=this.root.lookup("easemob.pb.CommNotice").decode(e.payload),r=ae(this._queues,t.queue);_.vF.debug("receive notice",t.queue,r),r||this.clientResource===t.queue.clientResource&&t.queue.name===this.context.userId||(this._queues.push(t.queue),1===this._queues.length&&J.call(this,t.queue))}function ce(e){return L(this,void 0,void 0,(function(){var t,r,n,o,s,a,u,c,l;return U(this,(function(d){t=v.Wp.getEnvInfo(),r=this.root.lookup("easemob.pb.MSync"),n=e,"zfb"!==t.platform&&"dd"!==t.platform||(o=i().atob(e.data),s=Array.from(o,(function(e,t){return o.charCodeAt(t)})),n=w(w({},e),{data:new Uint8Array(s)}));try{return a=R.V.call(this,n),u=a[0],a[1]?(c="miniCore"===this.name||"web"===t.platform,l=c?new Uint8Array(u.data):u.data,[2,r.decode(l)]):[2,void 0]}catch(e){throw new Error("decode message fail.")}}))}))}function le(e){var t=this;this.lastHeartbeat=Date.now(),this.probingTimer&&clearTimeout(this.probingTimer),e.then((function(e){if(e)switch(e.command){case 0:fe.call(t,e);break;case 1:K.call(t,e);break;case 2:ue.call(t,e);break;case 3:Z.call(t,e);break;case 4:ee.call(t,e);break;default:_.vF.error("unexpected msync command: ".concat(e.command))}else _.vF.error("unexpected msync result: ".concat(e))}))}var de=new Map;function fe(e){var t,r,n,i,o,l,d,h,y,O,T,R,I,S,C,b,N,A,M,x,D,P,k,F,H,B,G,j,K,z,V,Y,X,Q,Z,ee,te,re,ne,ie,oe,se,ae,ue,ce,le,fe,he,pe,ve,me,_e,ge,Ee,ye,Oe,Te;return L(this,void 0,void 0,(function(){var L,Re,Ie,Se,Ce,be,Ne,Ae,Me,we,Le,Ue,xe,De,Pe,ke,Fe,He,Be,Ge,We,je,qe,Ke,ze,Ve,Je,Ye,Xe,Qe,$e,Ze,et,tt,rt,nt,it,ot,st,at,ut,ct,lt,dt,ft,ht,pt,vt=this;return U(this,(function(U){switch(U.label){case 0:if(L=(L=this.root.lookup("easemob.pb.CommSyncDL")).decode(e.payload),Re=new(s())(L.serverId.low,L.serverId.high,L.serverId.unsigned).toString(),Ie=new(s())(L.metaId.low,L.metaId.high,L.metaId.unsigned).toString(),!(Number(Ie)>0))return[3,23];if(clearTimeout(null===(t=this._msgHash[Ie])||void 0===t?void 0:t.messageTimer),!L.status)return[3,22];if(0!==L.status.errorCode)return[3,21];if(null==(Se=this._msgHash[Ie])?void 0:Se.isHandleChatroom){try{if(Ce="join"===(null===(r=this._msgHash[Ie])||void 0===r?void 0:r.operation)){be={};try{L.metas.length>0&&(Ne=this.root.lookup("easemob.pb.MUCBody"),Ae=Ne.decode(L.metas[0].payload),(Me=JSON.parse(Ae.status.chatroomInfo||"{}")[this.user])&&(be={isAllMembersMuted:Me.is_all_mute,createTimestamp:Me.create_timestamp,isInAllowlist:Me.is_in_white_list,memberCount:Me.member_count,muteExpireTimestamp:Me.mute_duration?Me.mute_duration:-1}))}catch(e){_.vF.error("decode chat room info error",e)}(null===(n=this._msgHash[Ie])||void 0===n?void 0:n.resolve)instanceof Function&&this._msgHash[Ie].resolve({type:0,data:{action:"apply",id:this._msgHash[Ie].roomId,result:!0,user:this.context.userId,info:be}}),(null===(i=this._msgHash[Ie])||void 0===i?void 0:i.success)instanceof Function&&this._msgHash[Ie].success({type:0,data:{action:"apply",id:this._msgHash[Ie].roomId,result:!0,user:this.context.userId,info:be}})}(null===(o=this._msgHash[Ie])||void 0===o?void 0:o.resolve)instanceof Function&&!Ce&&this._msgHash[Ie].resolve({type:0,data:{result:!0}}),(null===(l=this._msgHash[Ie])||void 0===l?void 0:l.success)instanceof Function&&!Ce&&this._msgHash[Ie].success({type:0,data:{result:!0}}),g.Xp.has(Ie)&&(we=g.Xp.get(Ie),st=we.rpt,at=we.requestName,st({isEndApi:!0,data:{isSuccess:1,requestName:at,requestMethod:"WEBSOCKET",requestUrl:this.url,code:E.G8.success}}),g.Xp.delete(Ie))}catch(e){g.Xp.has(Ie)&&(Le=g.Xp.get(Ie),st=Le.rpt,at=Le.requestName,st({isEndApi:!0,data:{isSuccess:0,requestName:at,requestMethod:"WEBSOCKET",requestUrl:this.url,code:E.G8.failed,codeDesc:"when executing success function error"}}),g.Xp.delete(Ie)),ct=m.A.create({type:a.C.WEBIM_CONNCTION_CALLBACK_INNER_ERROR,message:"when executing success function error",data:e}),this.onError&&this.onError(ct),null===(d=this.eventHandler)||void 0===d||d.dispatch("onError",ct)}delete this._msgHash[Ie]}return!Se||Se.isHandleChatroom?[3,20]:(Ue=null,xe="",De=0,Pe="",ke=null,this._msgHash[Ie].thirdMessage?(this._msgHash[Ie].thirdMessage.id=L.serverId,this._msgHash[Ie].thirdMessage.timestamp=L.timestamp,[4,u.yH.call(this,this._msgHash[Ie].thirdMessage,L.status,!0,!0)]):[3,2]);case 1:ke=U.sent(),U.label=2;case 2:if(0===L.metas.length)return[3,13];U.label=3;case 3:switch(U.trys.push([3,12,,13]),Fe=L.metas[0],He=L.status,Fe.ns){case 1:return[3,4];case 5:return[3,9]}return[3,10];case 4:return this.useReplacedMessageContents?[4,u.yH.call(this,Fe,He,!0,!0)]:[3,8];case 5:return ke=U.sent(),[4,null===(y=null===(h=this._localCache)||void 0===h?void 0:h.getInstance())||void 0===y?void 0:y.getMessageByServerMsgId(Ie)];case 6:return(Be=U.sent())?[4,null===(T=null===(O=this._localCache)||void 0===O?void 0:O.getInstance())||void 0===T?void 0:T.putMessageToDB(w(w(w({},Be),ke),{id:Ie}))]:[3,8];case 7:U.sent(),U.label=8;case 8:return[3,11];case 9:return(Ge=v.Wp.parseNotify(L.metas[0].payload)).edit_msg&&(We=Ge.edit_msg,je=We.count,qe=We.operator,Ke=We.edit_time,ze=We.sender,Ve=We.send_time,Je=We.chat_type,Ue={operationTime:Ke,operatorId:qe,operationCount:je},xe=ze,De=Number(Ve),Pe=p.Q[Je]),[3,11];case 10:return _.vF.error("decode local meta error",Fe),[3,11];case 11:return[3,13];case 12:return Ye=U.sent(),ct=m.A.create({type:a.C.WEBIM_LOAD_MSG_ERROR,message:"decode local meta message error",data:Ye}),this.onError&&this.onError(ct),null===(R=this.eventHandler)||void 0===R||R.dispatch("onError",ct),[3,13];case 13:g.nf.has(Ie)&&(g.nf.get(Ie).rpt({isEndApi:!0,data:{isSuccess:1,requestMethod:"WEBSOCKET",requestUrl:this.url,code:E.G8.success,msgId:Re,messageType:null!==(I=E.He[null==ke?void 0:ke.chatType])&&void 0!==I?I:E.He.singleChat}}),g.nf.delete(Ie)),U.label=14;case 14:return U.trys.push([14,18,,19]),Xe={localMsgId:Ie,serverMsgId:Re},Ue&&(Qe=this._msgHash[Ie],$e=Qe.editMessageId,Ze=Qe.ext,et=Qe.customExts,tt=Qe.customEvent,ke.modifiedInfo=Ue,ke.from=xe,ke.time=Number(De),ke.chatType=Pe,ke.id=$e,null===(b=null===(C=null===(S=this._localCache)||void 0===S?void 0:S.getInstance())||void 0===C?void 0:C.getMessageByServerMsgId($e))||void 0===b||b.then((function(e){var t,r,n,i,o,s;e&&("txt"===e.type?null===(r=null===(t=vt._localCache)||void 0===t?void 0:t.getInstance())||void 0===r||r.putMessageToDB(w(w({},e),{msg:ke.msg,modifiedInfo:ke.modifiedInfo,translations:ke.translations,ext:Ze?ke.ext:e.ext})):"custom"===e.type?null===(i=null===(n=vt._localCache)||void 0===n?void 0:n.getInstance())||void 0===i||i.putMessageToDB(w(w({},e),{ext:Ze?ke.ext:e.ext,customExts:et,customEvent:tt,modifiedInfo:ke.modifiedInfo})):null===(s=null===(o=vt._localCache)||void 0===o?void 0:o.getInstance())||void 0===s||s.putMessageToDB(w(w({},e),{ext:Ze?ke.ext:e.ext,modifiedInfo:ke.modifiedInfo})))}))),ke&&(Ue?("txt"===ke.type&&(Xe.message=ke),Xe.modifiedInfo=Ue):Xe.message=ke),[4,null===(A=null===(N=this._localCache)||void 0===N?void 0:N.getInstance())||void 0===A?void 0:A.updateLocalMessage(Ie,{serverMsgId:Re,status:c.q.SUCCESS})];case 15:return U.sent(),(null===(M=this._msgHash[Ie])||void 0===M?void 0:M.success)instanceof Function?[4,this._msgHash[Ie].success(Ie,Re)]:[3,17];case 16:U.sent(),U.label=17;case 17:return(null===(x=this._msgHash[Ie])||void 0===x?void 0:x.resolve)instanceof Function&&this._msgHash[Ie].resolve(Xe),[3,19];case 18:return rt=U.sent(),ct=m.A.create({type:a.C.WEBIM_CONNCTION_CALLBACK_INNER_ERROR,message:"when executing success function error",data:rt}),this.onError&&this.onError(ct),null===(D=this.eventHandler)||void 0===D||D.dispatch("onError",ct),[3,19];case 19:this.onReceivedMessage&&this.onReceivedMessage({id:Ie,mid:Re,to:this._msgHash[Ie].to,time:0}),null===(P=this.eventHandler)||void 0===P||P.dispatch("onReceivedMessage",{id:Ie,mid:Re,to:this._msgHash[Ie].to}),delete this._msgHash[Ie],U.label=20;case 20:return[3,22];case 21:if(15===L.status.errorCode)(null===(k=this._msgHash[Ie])||void 0===k?void 0:k.fail)instanceof Function&&this._msgHash[Ie].fail({type:a.C.SERVICE_NOT_ALLOW_MESSAGING_MUTE,reason:"you were muted"}),this._msgHash[Ie].reject instanceof Function&&this._msgHash[Ie].reject({type:a.C.SERVICE_NOT_ALLOW_MESSAGING_MUTE,reason:"you were muted"}),null===(H=null===(F=this._localCache)||void 0===F?void 0:F.getInstance())||void 0===H||H.updateLocalMessage(Ie,{serverMsgId:Re,status:c.q.FAIL});else if(1===L.status.errorCode){switch(nt=void 0,L.status.reason){case"blocked":nt=a.C.PERMISSION_DENIED;break;case"group not found":nt=a.C.GROUP_NOT_EXIST;break;case"not in group or chatroom":nt=a.C.GROUP_NOT_JOINED;break;case"exceed recall time limit":nt=a.C.MESSAGE_RECALL_TIME_LIMIT;break;case"message recall disabled":nt=a.C.SERVICE_NOT_ENABLED;break;case"not in group or chatroom white list":nt=a.C.SERVICE_NOT_ALLOW_MESSAGING;break;case"nonroster":nt=a.C.USER_NOT_FRIEND,L.status.reason="not contact";break;case"group is disabled":nt=a.C.GROUP_IS_DISABLED,L.status.reason="group is disabled";break;case"limit directed users":nt=a.C.MAX_LIMIT;break;case"Sorry, edit limit reached":nt=a.C.MAX_LIMIT,L.status.reason="Modify message limit reached";break;case"Sorry, message does not exist":nt=a.C.MODIFY_MESSAGE_NOT_EXIST,L.status.reason="The message does not exist.";break;case"Sorry, You do not have permission":nt=a.C.PERMISSION_DENIED,L.status.reason="You do not have the modified permission.";break;case"Sorry, format is incorrect":nt=a.C.MODIFY_MESSAGE_FORMAT_ERROR,L.status.reason="The modify messaged format error.";break;case"Sorry, edit is not available":nt=a.C.SERVICE_NOT_ENABLED,L.status.reason="The message modify function is not activated.";break;case"Sorry, edit fail":nt=a.C.MODIFY_MESSAGE_FAILED,L.status.reason="Modify message failed.";break;default:L.status.reason.includes("grpID")&&L.status.reason.includes("does not exist!")?(nt=a.C.CHATROOM_NOT_EXIST,L.status.reason="The chat room dose not exist."):L.status.reason.includes("username")&&L.status.reason.includes("doesn't exist!")?nt=a.C.USER_NOT_FOUND:"group member list is full!"===L.status.reason?nt=a.C.CHATROOM_MEMBERS_FULL:L.status.reason.includes("can not join this group")&&L.status.reason.includes("is in the blacklist")?(nt=a.C.PERMISSION_DENIED,L.status.reason="permission denied"):"can not operate this group, reason: group is disabled"===L.status.reason?nt=a.C.GROUP_IS_DISABLED:L.status.reason.includes("moderation")?nt=a.C.MESSAGE_MODERATION_BLOCKED:L.status.reason.includes("group ID illegal, please check it")?(nt=a.C.REQUEST_PARAMETER_ERROR,L.status.reason="Invalid parameter"):nt=L.status.reason.includes("has create too many chatrooms")||L.status.reason.includes("has joined too many chatrooms")?a.C.MAX_LIMIT:L.status.reason.includes("auto create failed")?a.C.SERVER_BUSY:a.C.SERVER_UNKNOWN_ERROR}this._msgHash[Ie]&&((null===(B=this._msgHash[Ie])||void 0===B?void 0:B.isHandleChatroom)?(ut=m.A.create({type:nt,message:L.status.reason||"",data:""}),this._msgHash[Ie].reject instanceof Function&&this._msgHash[Ie].reject(ut),this._msgHash[Ie].error instanceof Function&&this._msgHash[Ie].error(ut),g.Xp.has(Ie)&&(it=E.G8.failed,nt===a.C.CHATROOM_NOT_EXIST?it=E.G8.notFound:nt===a.C.CHATROOM_MEMBERS_FULL&&(it=E.G8.reachLimit),ot=g.Xp.get(Ie),st=ot.rpt,at=ot.requestName,st({isEndApi:!0,data:{isSuccess:0,requestName:at,requestMethod:"WEBSOCKET",requestUrl:this.url,code:it,codeDesc:L.status.reason}}),g.Xp.delete(Ie))):(ut=m.A.create({type:nt,message:L.status.reason||"",data:{id:Ie,mid:Re}}),this._msgHash[Ie].reject instanceof Function&&this._msgHash[Ie].reject(ut),this._msgHash[Ie].fail instanceof Function&&this._msgHash[Ie].fail({type:nt,reason:L.status.reason?L.status.reason:"",data:{id:Ie,mid:Re}}),null===(j=null===(G=this._localCache)||void 0===G?void 0:G.getInstance())||void 0===j||j.updateLocalMessage(Ie,{serverMsgId:Re,status:c.q.FAIL})),delete this._msgHash[Ie])}else if(7===L.status.errorCode)"sensitive words"===L.status.reason&&this._msgHash[Ie]?(ut=m.A.create({type:a.C.MESSAGE_INCLUDE_ILLEGAL_CONTENT,message:"sensitive words",data:{id:Ie,mid:Re}}),this._msgHash[Ie].reject instanceof Function&&this._msgHash[Ie].reject(ut),this._msgHash[Ie].fail instanceof Function&&this._msgHash[Ie].fail({type:a.C.MESSAGE_INCLUDE_ILLEGAL_CONTENT,data:{id:Ie,mid:Re,reason:"sensitive words"}}),null===(z=null===(K=this._localCache)||void 0===K?void 0:K.getInstance())||void 0===z||z.updateLocalMessage(Ie,{serverMsgId:Re,status:c.q.FAIL})):"blocked by mod_antispam"===L.status.reason&&this._msgHash[Ie]?(ut=m.A.create({type:a.C.MESSAGE_INCLUDE_ILLEGAL_CONTENT,message:"blocked by mod_antispam",data:{id:Ie,mid:Re}}),this._msgHash[Ie].reject instanceof Function&&this._msgHash[Ie].reject(ut),this._msgHash[Ie].fail instanceof Function&&this._msgHash[Ie].fail({type:a.C.MESSAGE_INCLUDE_ILLEGAL_CONTENT,data:{id:Ie,mid:Re,reason:"blocked by mod_antispam"}}),null===(Y=null===(V=this._localCache)||void 0===V?void 0:V.getInstance())||void 0===Y||Y.updateLocalMessage(Ie,{serverMsgId:Re,status:c.q.FAIL})):"user is mute"===L.status.reason&&this._msgHash[Ie]?(ut=m.A.create({type:a.C.USER_MUTED_BY_ADMIN,message:"user is mute",data:{id:Ie,mid:Re}}),this._msgHash[Ie].reject instanceof Function&&this._msgHash[Ie].reject(ut),this._msgHash[Ie].fail instanceof Function&&this._msgHash[Ie].fail(ut),null===(Q=null===(X=this._localCache)||void 0===X?void 0:X.getInstance())||void 0===Q||Q.updateLocalMessage(Ie,{serverMsgId:Re,status:c.q.FAIL})):"traffic limit"===L.status.reason&&this._msgHash[Ie]?(ut=m.A.create({type:a.C.MESSAGE_CURRENT_LIMITING,message:"traffic limit",data:{id:Ie,mid:Re}}),this._msgHash[Ie].reject instanceof Function&&this._msgHash[Ie].reject(ut),this._msgHash[Ie].fail instanceof Function&&this._msgHash[Ie].fail(ut),null===(ee=null===(Z=this._localCache)||void 0===Z?void 0:Z.getInstance())||void 0===ee||ee.updateLocalMessage(Ie,{serverMsgId:Re,status:c.q.FAIL})):"Sorry, data is too large"===L.status.reason&&this._msgHash[Ie]&&(ut=m.A.create({type:a.C.MESSAGE_SIZE_LIMIT,message:"Sorry, data is too large",data:{id:Ie,mid:Re}}),this._msgHash[Ie].reject instanceof Function&&this._msgHash[Ie].reject(ut),this._msgHash[Ie].fail instanceof Function&&this._msgHash[Ie].fail(ut),null===(re=null===(te=this._localCache)||void 0===te?void 0:te.getInstance())||void 0===re||re.updateLocalMessage(Ie,{serverMsgId:Re,status:c.q.FAIL}));else if(19===L.status.errorCode)this._msgHash[Ie]&&(g.nf.has(Ie)&&(g.nf.get(Ie).rpt({isEndApi:!0,data:{isSuccess:0,requestMethod:"WEBSOCKET",requestUrl:this.url,code:a.C.MESSAGE_EXTERNAL_LOGIC_BLOCKED,codeDesc:L.status.reason||"",msgId:Re,messageType:null!==(ie=E.He[null===(ne=this._msgHash[Ie])||void 0===ne?void 0:ne.chatType])&&void 0!==ie?ie:E.He.singleChat}}),g.nf.delete(Ie)),ut=m.A.create({type:a.C.MESSAGE_EXTERNAL_LOGIC_BLOCKED,message:L.status.reason||"",data:{id:Ie,mid:Re}}),this._msgHash[Ie].reject instanceof Function&&this._msgHash[Ie].reject(ut),this._msgHash[Ie].fail instanceof Function&&this._msgHash[Ie].fail({type:a.C.MESSAGE_EXTERNAL_LOGIC_BLOCKED,data:{id:Ie,mid:Re,reason:L.status.reason}}),null===(se=null===(oe=this._localCache)||void 0===oe?void 0:oe.getInstance())||void 0===se||se.updateLocalMessage(Ie,{serverMsgId:Re,status:c.q.FAIL}));else if(this._msgHash[Ie]){g.nf.has(Ie)&&(g.nf.get(Ie).rpt({isEndApi:!0,data:{isSuccess:0,requestMethod:"WEBSOCKET",requestUrl:this.url,code:a.C.WEBIM_LOAD_MSG_ERROR,codeDesc:(null===(ae=L.status)||void 0===ae?void 0:ae.reason)||"",msgId:Re,messageType:null!==(ce=E.He[null===(ue=this._msgHash[Ie])||void 0===ue?void 0:ue.chatType])&&void 0!==ce?ce:E.He.singleChat}}),g.nf.delete(Ie));try{ut=m.A.create({type:a.C.WEBIM_LOAD_MSG_ERROR,message:(null===(le=L.status)||void 0===le?void 0:le.reason)||"",data:{id:Ie,mid:Re,reason:L.status&&L.status.reason}}),this._msgHash[Ie].reject instanceof Function&&this._msgHash[Ie].reject(ut),null===(he=null===(fe=this._localCache)||void 0===fe?void 0:fe.getInstance())||void 0===he||he.updateLocalMessage(Ie,{serverMsgId:Re,status:c.q.FAIL}),this._msgHash[Ie].fail instanceof Function&&this._msgHash[Ie].fail({type:a.C.WEBIM_LOAD_MSG_ERROR,data:{errorCode:L.status&&L.status.errorCode,reason:L.status&&L.status.reason}})}catch(e){ct=m.A.create({type:a.C.WEBIM_CONNCTION_CALLBACK_INNER_ERROR,message:"when executing fail function error",data:e}),this.onError&&this.onError(ct),null===(pe=this.eventHandler)||void 0===pe||pe.dispatch("onError",ct)}delete this._msgHash[Ie]}else g.nf.has(Ie)&&(g.nf.get(Ie).rpt({isEndApi:!0,data:{isSuccess:0,requestMethod:"WEBSOCKET",requestUrl:this.url,code:a.C.WEBIM_CONNCTION_CALLBACK_INNER_ERROR,codeDesc:"on message error",msgId:Re,messageType:null!==(me=E.He[null===(ve=this._msgHash[Ie])||void 0===ve?void 0:ve.chatType])&&void 0!==me?me:E.He.singleChat}}),g.nf.delete(Ie)),ct=m.A.create({type:a.C.WEBIM_CONNCTION_CALLBACK_INNER_ERROR,message:"on message error"}),this.onError&&this.onError(ct),null===(_e=this.eventHandler)||void 0===_e||_e.dispatch("onError",ct);U.label=22;case 22:return[2];case 23:if(L.metas&&0!==L.metas.length){this._offlineMessagePullState!==f.P.SYNC_FINISH&&de.set(L.queue.name,L.metas.length);try{W.call(this,L.metas,L.status)}catch(e){ct=m.A.create({type:a.C.WEBIM_LOAD_MSG_ERROR,message:"decode message error",data:e}),_.vF.error("decode message error",e),this.onError&&this.onError(ct),null===(ge=this.eventHandler)||void 0===ge||ge.dispatch("onError",ct)}finally{L.isLast?(_.vF.debug("DLMessage isLast",L.isLast),lt=-1,this._queues.some((function(e,t){return e.name===L.name&&(lt=t,!0)}))&<>0&&this._queues.splice(lt,1),this._queues.length>0&&J.call(this,this._queues[0]),q.call(this,L)):L.nextKey&&(ht=new(s())(L.nextKey.low,L.nextKey.high,L.nextKey.unsigned).toString(),_.vF.debug("nexKey:",ht,"this.nextKey:",this.nexKey),ht!==this.nexKey||(null===(Ee=L.queue)||void 0===Ee?void 0:Ee.name)!==this.currentQueue?(this.nexKey=ht,this.currentQueue=null===(ye=L.queue)||void 0===ye?void 0:ye.name,$.call(this,L.nextKey,L.queue)):(_.vF.debug("nexKey and queue are same, delete it"),dt=-1,this._queues.some((function(e,t){return e.name===L.queue.name&&(dt=t,!0)}))&&this._queues.splice(dt,1),this._queues.length>0&&J.call(this,this._queues[0])))}}else L.isLast?(_.vF.debug("isLast",L.isLast),ft=-1,this._queues.some((function(e,t){return e.name===L.queue.name&&(ft=t,!0)}))&&this._queues.splice(ft,1),this._queues.length>0&&J.call(this,this._queues[0]),q.call(this,L)):L.nextKey&&(ht=new(s())(L.nextKey.low,L.nextKey.high,L.nextKey.unsigned).toString(),_.vF.debug("nexKey:",ht,"this.nextKey:",this.nexKey),ht!==this.nexKey||(null===(Oe=L.queue)||void 0===Oe?void 0:Oe.name)!==this.currentQueue?(this.nexKey=ht,this.currentQueue=null===(Te=L.queue)||void 0===Te?void 0:Te.name,$.call(this,L.nextKey,L.queue)):(_.vF.debug("nexKey and queue are same, delete it"),pt=-1,this._queues.some((function(e,t){return e.name===L.queue.name&&(pt=t,!0)}))&&this._queues.splice(pt,1),this._queues.length>0&&J.call(this,this._queues[0])));return[2]}}))}))}function he(e){var t=[],r=this.root.lookup("easemob.pb.KeyValue"),n=[];for(var i in e){var o=r.decode(t);if(o.key=i,void 0!==e[i]){if("object"===C(e[i]))o.type=8,o.stringValue=JSON.stringify(e[i]);else if("string"==typeof e[i])o.type=7,o.stringValue=e[i];else if("boolean"==typeof e[i])o.type=1,o.varintValue=!0===e[i]?1:0;else if(Number.isInteger(e[i]))o.type=2,o.varintValue=e[i];else if("bigint"==typeof e[i]||"symbol"===C(e[i])||"function"==typeof e[i]||Number.isNaN(e[i]))o.type=7,o.stringValue=e[i].toString();else{if("number"!=typeof e[i]||Number.isInteger(e[i]))continue;o.type=6,o.doubleValue=e[i]}n.push(o)}}return n}function pe(e){var t,r,n,i=[];if(this.root){var o,u=this.root.lookup("easemob.pb.MessageBody.Content").decode(i);switch(o=!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":u.type=0,u.text=e.msg;break;case"img":u.type=1,e.body?(u.displayName=e.body.filename,u.remotePath=e.body.url,u.secretKey=e.body.secret,u.fileLength=e.body.file_length,u.size=e.body.size,u.thumbnailDisplayName=e.body.filename):e.file?(u.displayName=e.file.filename,u.remotePath=e.file.url,u.secretKey=e.file.secret,u.fileLength=e.file.file_length,u.size=e.file.size,u.thumbnailDisplayName=e.file.filename):(u.displayName=e.filename,u.remotePath=e.url,u.secretKey=e.secret,u.fileLength=e.file_length,u.size=e.size,u.thumbnailDisplayName=e.filename),e.isBuildCombinedMsg&&(u.remotePath=e.url,u.secretKey=e.secret,u.size={height:e.height,width:e.width}),e.isGif&&(u.subType=1);var c=e.imageType,l=e.isGif||!0===e.isOriginalImage||"original"===c;u.imageType=l?1:2;break;case"video":u.type=2,e.body?(u.displayName=e.body.filename,u.remotePath=e.body.url,u.secretKey=e.body.secret,u.fileLength=e.body.file_length,u.duration=e.body.length,u.thumbnailDisplayName=e.body.filename,u.thumbnailRemotePath=this.useOwnUploadFun?"":"".concat(e.body.url,"?vframe=true"),u.thumbnailSecretKey=this.useOwnUploadFun?"":e.body.secret):e.isBuildCombinedMsg&&(u.displayName=e.filename,u.remotePath=e.url,u.secretKey=e.secret,u.fileLength=e.file_length,u.duration=e.length,u.thumbnailDisplayName=e.filename,u.thumbnailRemotePath=e.thumb,u.thumbnailSecretKey=e.thumb_secret);break;case"loc":u.type=3,u.latitude=e.lat,u.longitude=e.lng,u.address=e.addr,u.buildingName=e.buildingName,u.latitude=e.lat;break;case"audio":u.type=4,e.body?(u.displayName=e.body.filename,u.remotePath=e.body.url,u.secretKey=e.body.secret,u.fileLength=e.body.file_length,u.duration=e.body.length,u.thumbnailDisplayName=e.body.filename):e.isBuildCombinedMsg&&(u.displayName=e.filename,u.remotePath=e.url,u.secretKey=e.secret,u.fileLength=e.file_length,u.duration=e.length,u.thumbnailDisplayName=e.filename);break;case"file":u.type=5,e.body?(u.displayName=e.body.filename,u.remotePath=e.body.url,u.secretKey=e.body.secret,u.fileLength=e.body.file_length,u.thumbnailDisplayName=e.body.filename):e.isBuildCombinedMsg&&(u.displayName=e.filename,u.remotePath=e.url,u.secretKey=e.secret,u.fileLength=e.file_length,u.thumbnailDisplayName=e.filename);break;case"cmd":u.type=6,u.action=e.action;break;case"custom":u.type=7,u.customEvent=e.customEvent,u.customExts=he.call(this,e.customExts);break;case"combine":u.type=0,u.subType=0,u.text=e.compatibleText,u.displayName=e.filename,u.remotePath=e.url,u.secretKey=e.secret,u.fileLength=e.file_length,u.title=e.title,u.summary=e.summary,u.combineLevel=e.combineLevel}var d=[];e.ext&&(d=he.call(this,e.ext));var f=this.root.lookup("easemob.pb.MessageBody"),h=f.decode(i),p=e.from||this.context.jid.name;h.from={name:e.isBuildCombinedMsg?p:this.context.jid.name};var v=e.to.indexOf("/"),m=v>-1?e.to.substring(0,v):e.to;if(h.to={name:m},"channel"===e.type)h.type=b.CHANNEL_ACK,e.mid&&(h.ackMessageId=e.mid);else if("recall"===e.type)h.type=b.RECALL,h.ackMessageId=e.ackId;else if("delivery"===e.type)h.type=b.DELIVER_ACK,h.ackMessageId=e.ackId;else if("read"===e.type)h.type=b.READ_ACK,h.ackMessageId=e.ackId,"groupChat"===o&&(h.msgConfig={allowGroupAck:!0},h.ackContent=e.ackContent);else if("chatRoom"===o)h.type=b.CHATROOM;else if("groupChat"===o){if(h.type=b.GROUPCHAT,e.msgConfig){var g=e.msgConfig.allowGroupAck;h.msgConfig={allowGroupAck:!!g}}}else"singleChat"===o&&(h.type=b.SINGLECHAT);e.editMessageId&&(h.type=b.EDIT,h.editMessageId=e.editMessageId,h.editScope=N.BODY,e.ext&&(h.editScope=N.BODY_AND_EXT)),h.contents=[u],h.ext=d;var E=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);E&&(h.meta=E),h=f.encode(h).finish();var y=this.root.lookup("easemob.pb.Meta"),O=y.decode(i);O.id=e.id;var T="easemob.com";if("chatRoom"!==o&&"groupChat"!==o||(T="conference.easemob.com"),O.to={appKey:this.appKey,name:m,domain:T},v>-1&&(O.to.clientResource=e.to.substring(v+1,e.to.length)),"chatRoom"===o&&(O.ext=he.call(this,function(e){return{chatroom_msg_tag:"high"===e.priority?0:"low"===e.priority?2:1}}(e))),"recall"===e.type&&e.metaExt&&(O.ext=he.call(this,{recallMessageExtensionInfo:e.metaExt})),O.ns=1,O.payload=h,O.routetype=e.deliverOnlineOnly?1:0,"singleChat"!==o&&Array.isArray(e.receiverList)&&(null===(n=e.receiverList)||void 0===n?void 0:n.length)>0&&(O.directedUsers=e.receiverList,O.routetype=2),"delivery"!==e.type&&void 0!==e.webhookEnv){if("string"!=typeof e.webhookEnv)throw Error('Invalid parameter: "webhookEnv"');O.env=e.webhookEnv}if(e.isBuildCombinedMsg)return O.timestamp=s().fromValue(e.time),y.encode(O).finish();var R=this.root.lookup("easemob.pb.CommSyncUL"),I=R.decode(i);I.meta=O,!e.isPing&&me.call(this,e,O),I=R.encode(I).finish();var S=this.root.lookup("easemob.pb.MSync"),C=S.decode(i);return C.version=this.version,C.encryptType=this.encryptType,C.command=0,C.payload=I,C.traceId=x.gen(),_.vF.debug("traceId",C.traceId),S.encode(C).finish()}e.fail&&e.fail({type:a.C.WEBIM_CONNCTION_CLIENT_OFFLINE,message:"Not logged in"})}function ve(e){var t,r,n,i,o,s,u,l,d,f=this,h=w({},e);if(h.editMessageId){var p=pe.call(this,h);Oe.call(this,p)}else{if(e.file||"img"===e.type&&e._filePath){if(h.accessToken=this.token,h.appKey=this.appKey,h.apiUrl=this.apiUrl,h.body&&h.body.url)return pe.call(this,h);var m=(null===(r=null===(t=h.file)||void 0===t?void 0:t.data)||void 0===r?void 0:r.type)||(null===(n=h.file)||void 0===n?void 0:n.filetype)||h.filetype||"";if(h.isGif&&m&&"image/gif"!==m)return void this._msgHash[h.id].reject({type:a.C.MESSAGE_INCLUDE_ILLEGAL_CONTENT,message:"The file type is not gif."});var y=null!==(s=null===(o=null===(i=h.file)||void 0===i?void 0:i.data)||void 0===o?void 0:o.size)&&void 0!==s?s:h.file_length;if("number"==typeof y&&y<=0){var O={type:a.C.WEBIM_UPLOADFILE_ERROR,message:"fileSize must be greater than 0"};return h.onFileUploadError instanceof Function&&h.onFileUploadError(O),void(null===(u=this._msgHash[h.id])||void 0===u||u.reject(O))}return new Promise((function(t,r){var n=h.onFileUploadComplete,i=h.onFileUploadError,o=function(e,t){var r,n={type:a.C.WEBIM_UPLOADFILE_ERROR,message:e,data:t};i instanceof Function&&i(n),null===(r=f._msgHash[h.id])||void 0===r||r.reject(n)},s=function(e){var t=(null==e?void 0:e.message)||"";return/missing .*capability|requires file path string/i.test(t)},u=function(t){var r,i,o,s,u,l,d,p,v,m,_,y,O;if(t.entities){if(t.entities[0]["file-metadata"]){var T=t.entities[0]["file-metadata"]["content-length"];h.file_length=T,h.filetype=t.entities[0]["file-metadata"]["content-type"],T>204800&&(h.thumbnail=!0)}var R=(null===(i=h.file)||void 0===i?void 0:i.filename)||h.filename||(null===(o=h.body)||void 0===o?void 0:o.filename)||"image",I=h.filetype||(null===(s=h.file)||void 0===s?void 0:s.filetype)||(null===(u=t.entities[0]["file-metadata"])||void 0===u?void 0:u["content-type"])||"",C=null!==(_=null!==(v=null!==(p=null===(d=null===(l=h.file)||void 0===l?void 0:l.data)||void 0===d?void 0:d.size)&&void 0!==p?p:h.file_length)&&void 0!==v?v:null===(m=t.entities[0]["file-metadata"])||void 0===m?void 0:m["content-length"])&&void 0!==_?_:0,b="".concat(f.getChatFilesUrl(),"/").concat(t.entities[0].uuid);if(h.body={type:h.type||"file",secret:t.entities[0]["share-secret"],filename:R,url:b,length:h.length||0,filetype:I,file_length:C,size:{width:h.width||0,height:h.height||0}},h.file&&(h.file.url=t.uri),e.secret=t.entities[0]["share-secret"],t.url=e.url="".concat(b,"?em-redirect=true&share-secret=").concat(t.entities[0]["share-secret"]),e.file_length=h.file_length=C,"img"===h.type){var N=(0,S.d2)(b,t.entities[0]["share-secret"]),A="".concat(e.url,"&thumbnail=true");e.thumb=A,t.thumb="".concat(t.url,"&thumbnail=true"),e.originalImageUrl=N.originalImageUrl,e.bigImageUrl=N.bigImageUrl,t.originalImageUrl=N.originalImageUrl,t.bigImageUrl=N.bigImageUrl}"video"===h.type&&(e.thumb="".concat(e.url,"&vframe=true"),e.thumb_secret=t.entities[0]["share-secret"],t.thumb="".concat(t.url,"&vframe=true")),n instanceof Function&&n(t,h.id);var M=pe.call(f,h);g.nf.size<=g.Po&&g.nf.set(h.id,{rpt:f.dataReport.geOperateFun({operationName:E.jz.SEND_MSG})}),null===(O=null===(y=f._localCache)||void 0===y?void 0:y.getInstance())||void 0===O||O.storeMessage(e,c.q.INPROGRESS),Oe.call(f,M)}else null===(r=f._msgHash[h.id])||void 0===r||r.reject({type:a.C.WEBIM_UPLOADFILE_ERROR,message:"Failed to upload the file",data:t})};h.onFileUploadComplete=u,h.onFileUploadError=function(e){var t;i instanceof Function&&i(e),null===(t=f._msgHash[h.id])||void 0===t||t.reject({type:a.C.WEBIM_UPLOADFILE_ERROR,message:e.message||"Failed to upload the file",data:e})},L(f,void 0,void 0,(function(){var e,t,r,n,i,a,c,l,d,f,p,m,g,y,O,T,R,C,b,N,A,M,L,x,D,P,k,F,H,B,G,W,j,q,K,z,V,J,Y,X,Q,$,Z,ee,te,re,ne;return U(this,(function(U){switch(U.label){case 0:if(U.trys.push([0,26,,27]),"img"!==h.type)return[3,25];if(e=this._imageProcessor,t=null===(q=h.file)||void 0===q?void 0:q.data,r=h._filePath,n=null!==(z=null!==(K=null==t?void 0:t.size)&&void 0!==K?K:h.file_length)&&void 0!==z?z:0,i=(null==t?void 0:t.type)||(null===(V=h.file)||void 0===V?void 0:V.filetype)||h.filetype||"",a=h.imageType,c=h.isGif||!0===h.isOriginalImage||"original"===a,l=void 0,!r||!e)return[3,4];U.label=1;case 1:return U.trys.push([1,3,,4]),[4,e.getImageInfo(r)];case 2:return(l=U.sent()).path&&l.path!==r&&(_.vF.debug("Miniapp image message file path normalized",r,l.path),r=l.path,h._filePath=l.path),[3,4];case 3:return d=U.sent(),_.vF.warn("Failed to normalize miniapp image path",d),[3,4];case 4:if(h.width&&h.height||!t&&!r)return[3,12];U.label=5;case 5:return U.trys.push([5,11,,12]),e?(p=l)?[3,7]:[4,e.getImageInfo(r||t)]:[3,8];case 6:p=U.sent(),U.label=7;case 7:return f=p,r&&f.path&&f.path!==r&&(r=f.path,h._filePath=f.path),h.width||(h.width=f.width),h.height||(h.height=f.height),[3,10];case 8:return"undefined"==typeof Image||"undefined"==typeof URL?[3,10]:[4,new Promise((function(e,r){var n=new Image,i=URL.createObjectURL(t);n.onload=function(){URL.revokeObjectURL(i),e({w:n.width,h:n.height})},n.onerror=function(){URL.revokeObjectURL(i),r(new Error("load failed"))},n.src=i}))];case 9:m=U.sent(),h.width||(h.width=m.w),h.height||(h.height=m.h),U.label=10;case 10:return[3,12];case 11:return g=U.sent(),r&&s(g)?(o("Failed to read image info on mini program platform",g),[2]):(_.vF.warn("Failed to read image info",g),[3,12]);case 12:if(r&&(!h.width||!h.height)&&!e)return o("Mini program platform is missing image info capability"),[2];if(y=h.width,O=h.height,T=r||t,!c&&!h.isGif&&r&&!e)return o("Mini program platform is missing image compression capability"),[2];if(c||h.isGif||!e)return[3,16];if(!(R=r||t))return[3,16];U.label=13;case 13:return U.trys.push([13,15,,16]),[4,e.generateBigImage(R,{maxShortEdge:I.Qv,quality:I.tx})];case 14:return(C=U.sent())&&(C.file&&(h.file=w(w({},h.file),{data:C.file})),C.path&&(h._filePath=C.path,r=C.path),h.file_length=C.size,h.filetype=C.type,h.file&&(h.file.filetype=C.type),h.width=C.width,h.height=C.height,_.vF.debug("Image compressed for large send","".concat(C.width,"x").concat(C.height,", size: ").concat(C.size))),[3,16];case 15:return b=U.sent(),r&&s(b)?(o("Mini program platform is missing image compression capability",b),[2]):(_.vF.warn("Big image generation failed, falling back to original",b),h.isOriginalImage=!0,c=!0,[3,16]);case 16:return H=null!==(Q=null!==(X=null===(Y=null===(J=h.file)||void 0===J?void 0:J.data)||void 0===Y?void 0:Y.size)&&void 0!==X?X:h.file_length)&&void 0!==Q?Q:0,N=c?"original":"large",this.enableMd5Check?(h._uploadMd5=void 0,B="",e&&T?[3,17]:(_.vF.warn("Image MD5 capability or source is missing, proceeding without MD5"),[3,20])):[3,24];case 17:return U.trys.push([17,19,,20]),[4,e.computeMd5(T)];case 18:return B=U.sent(),h._uploadMd5=B,[3,20];case 19:return A=U.sent(),_.vF.warn("Failed to compute image MD5, proceeding without MD5",A),[3,20];case 20:if(!B||!(0,S.Xn)(H,"img",N))return[3,24];U.label=21;case 21:return U.trys.push([21,23,,24]),[4,(0,S.fg)(this,B,"img",N)];case 22:return(W=U.sent()).hit&&W.uuid?("original"===(M=W.effectiveImageType||N)&&(h.isOriginalImage=!0,c=!0,h.width=y,h.height=O),_.vF.debug("Precheck hit, skipping upload","uuid: ".concat(W.uuid),"effectiveImageType: ".concat(M)),L="original"===M?n:H,x="original"===M?i||(null===($=h.file)||void 0===$?void 0:$.filetype)||"image/jpeg":(null===(Z=h.file)||void 0===Z?void 0:Z.filetype)||h.filetype||"image/jpeg",D={entities:[{uuid:W.uuid,"share-secret":W.shareSecret||"","file-metadata":{"content-length":L,"content-type":x}}],uri:"".concat(this.getChatFilesUrl(),"/").concat(W.uuid)},u(D),[2]):[3,24];case 23:return P=U.sent(),_.vF.warn("Precheck error, proceeding with upload",P),[3,24];case 24:h._uploadImageType=(0,S.GD)(N),U.label=25;case 25:return[3,27];case 26:return k=U.sent(),_.vF.warn("Image preprocessing failed, proceeding with normal upload",k),[3,27];case 27:return this.enableMd5Check&&"img"!==h.type?(F=null===(ee=h.file)||void 0===ee?void 0:ee.data,H=null!==(re=null!==(te=null==F?void 0:F.size)&&void 0!==te?te:h.file_length)&&void 0!==re?re:0,h._uploadMd5=void 0,B="",F?[3,28]:(_.vF.warn("Attachment source is unavailable, proceeding without MD5"),[3,31])):[3,35];case 28:return U.trys.push([28,30,,31]),[4,(0,S.Aj)(F)];case 29:return B=U.sent(),h._uploadMd5=B,[3,31];case 30:return G=U.sent(),_.vF.warn("Failed to compute attachment MD5, proceeding without MD5",G),[3,31];case 31:if(!B||!(0,S.Xn)(H,h.type))return[3,35];U.label=32;case 32:return U.trys.push([32,34,,35]),[4,(0,S.fg)(this,B,h.type)];case 33:return(W=U.sent()).hit&&W.uuid?(_.vF.debug("Attachment precheck hit, skipping upload","uuid: ".concat(W.uuid),"type: ".concat(h.type)),u({entities:[{uuid:W.uuid,"share-secret":W.shareSecret||"","file-metadata":{"content-length":H,"content-type":F.type||h.filetype||(null===(ne=h.file)||void 0===ne?void 0:ne.filetype)||""}}],uri:"".concat(this.getChatFilesUrl(),"/").concat(W.uuid)}),[2]):[3,35];case 34:return j=U.sent(),_.vF.warn("Attachment precheck failed, proceeding with upload",j),[3,35];case 35:return v.Wp.uploadFile.call(this,h,E.jz.UPLOAD_MSG_ATTACH),[2]}}))}))}))}if("combine"===e.type){h.accessToken=this.token,h.appKey=this.appKey,h.apiUrl=this.apiUrl;var T=h.onFileUploadComplete,R=h.onFileUploadError;return new Promise((function(t,r){var n,i,o,s;if((null===(n=e.messageList)||void 0===n?void 0:n.length)>300||0===(null===(i=e.messageList)||void 0===i?void 0:i.length))return f._msgHash[h.id].reject({type:a.C.MAX_LIMIT,message:"The number of combined messages exceeded the limit."});var u=function(e,t,r){if(r||2===arguments.length)for(var n,i=0,o=t.length;i<o;i++)!n&&i in t||(n||(n=Array.prototype.slice.call(t,0,i)),n[i]=t[i]);return e.concat(n||Array.prototype.slice.call(t))}([],e.messageList,!0),l=0;if(u.forEach((function(e){(null==e?void 0:e.combineLevel)>l&&(l=null==e?void 0:e.combineLevel)})),h.combineLevel=l+1,h.combineLevel>10)return f._msgHash[h.id].reject({type:a.C.MAX_LIMIT,message:"The level of the merged message exceeded the limit."});var d=_e.call(f,u),p=function(t,r){var n,i,o,s,a,u,l="".concat(f.getChatFilesUrl(),"/").concat(t.entities[0].uuid),d=null===(n=t.entities[0])||void 0===n?void 0:n["share-secret"],p="".concat(l,"?em-redirect=true");d&&(p="".concat(p,"&share-secret=").concat(d)),T instanceof Function&&T({url:p,secret:d}),e.url=p,e.secret=d,h.url=p,h.secret=t.entities[0]["share-secret"],h.filename=(null===(i=h.file)||void 0===i?void 0:i.filename)||(null==r?void 0:r.fileName),h.file_length=(null===(s=null===(o=h.file)||void 0===o?void 0:o.data)||void 0===s?void 0:s.size)||(null==r?void 0:r.fileLength)||0,null===(u=null===(a=f._localCache)||void 0===a?void 0:a.getInstance())||void 0===u||u.storeMessage(e,c.q.INPROGRESS);var v=pe.call(f,h);Oe.call(f,v)},m=v.Wp.getEnvInfo();if("web"!==m.platform&&"node"!==m.platform&&"quick_app"!==m.platform&&(null===(s=null===(o=m.global)||void 0===o?void 0:o.canIUse)||void 0===s?void 0:s.call(o,"getFileSystemManager"))){var g=m.global.getFileSystemManager(),y=f.getChatFilesUrl();g.writeFile({filePath:"".concat(m.global.env.USER_DATA_PATH,"/combine"),data:d.buffer,encoding:"binary",success:function(e){m.global.uploadFile({url:y,filePath:"".concat(m.global.env.USER_DATA_PATH,"/combine"),name:"file",header:{"Content-Type":"multipart/form-data",Authorization:"Bearer "+h.accessToken},success:function(e){if(200===e.statusCode){_.vF.debug("upload success");var t=JSON.parse(e.data);p(t,{fileName:"combine",fileLength:d.length})}else _.vF.error("upload fail"),h.onFileUploadError instanceof Function&&h.onFileUploadError(e),this._msgHash[h.id].reject({type:a.C.WEBIM_UPLOADFILE_ERROR,message:"Failed to upload the merge message.Please try again",data:e})},fail:function(t){_.vF.error("upload fail"),h.onFileUploadError instanceof Function&&h.onFileUploadError(e),this._msgHash[h.id].reject({type:a.C.WEBIM_UPLOADFILE_ERROR,message:"Failed to upload the merge message.Please try again",data:t})}})},fail:function(e){_.vF.error("write file fail",e),this._msgHash[h.id].reject({type:a.C.WEBIM_UPLOADFILE_ERROR,message:"Failed to upload the merge message.Please try again",data:e})}})}else{var O=new File([d],"combine",{type:"application/octet-stream"}),I={url:URL.createObjectURL(O),filename:h.id,data:O};h.file=I,h.onFileUploadComplete=function(e){p(e)},h.onFileUploadError=function(e){R instanceof Function&&R(e),f._msgHash[h.id].reject({type:a.C.WEBIM_UPLOADFILE_ERROR,message:"Failed to upload the merge message.Please try again",data:e})},v.Wp.uploadFile.call(f,h,E.jz.UPLOAD_MSG_ATTACH)}}))}"img"===e.type&&(h.body||(h.body=w(w({},h),{size:{width:h.width||0,height:h.height||0}}))),null===(d=null===(l=this._localCache)||void 0===l?void 0:l.getInstance())||void 0===d||d.storeMessage(e,c.q.INPROGRESS),p=pe.call(this,h),Oe.call(this,p)}}function me(e,t){if(e.editMessageId)return t.ignoreCallback=!0,void(this._msgHash[e.id].thirdMessage=t);D.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<e.length;r++){for(var n=e[r],i=w(w({},n),{isBuildCombinedMsg:!0}),o=this.mSync.encodeChatMsg.call(this,i),s=o.length,a=new Uint8Array(4),u=0;u<4;u++)a[u]=s>>8*(3-u)&255;var c=new Uint8Array(t.length+a.length+o.length);c.set(t),c.set(a,t.length),c.set(o,t.length+a.length),t=c}var l=new Uint8Array(t.length+1),d=0;for(r=2;r<t.length;r++)r%2==1&&(d^=t[r]);return l.set(t),_.vF.debug("checkResult:",d),l[t.length]=d,l}function ge(e,t,r){var n=[],i=this.root.lookup("easemob.pb.MUCBody"),o=e.roomId,s=e.ext,a=void 0===s?"":s,u=e.leaveOtherRooms,c=void 0!==u&&u,l=i.decode(n);l.mucId={appKey:this.appKey,name:o,domain:"conference.easemob.com"},l.operation="join"===r?2:3,l.from={name:this.context.userId},l.isChatroom=!0,"join"===r&&(l.ext=a,l.leaveOtherRooms=c),l=i.encode(l).finish();var d=this.root.lookup("easemob.pb.Meta").decode(n);d.id=t,d.from={appKey:this.appKey,name:this.context.userId,domain:"easemob.com",client_resource:this.context.jid.clientResource},d.to={domain:"easemob.com"},d.ns=2,d.payload=l;var f=this.root.lookup("easemob.pb.CommSyncUL"),h=f.decode(n);h.meta=d,h=f.encode(h).finish();var p=this.root.lookup("easemob.pb.MSync"),v=p.decode(n);return v.version=this.version,v.encryptType=this.encryptType,v.command=0,v.payload=h,v.traceId=x.gen(),_.vF.debug("traceId",v.traceId),p.encode(v).finish()}function Ee(e,t){var r=v.Wp.getUniqueId(),n=ge.call(this,e,r,t),i="join"===t?E.jz.JOIN_CHATROOM:E.jz.QUIT_CHATROOM,o=this.dataReport.geOperateFun({operationName:i});return g.Xp.size<=g.Po&&g.Xp.set(r,{rpt:o,requestName:i}),Oe.call(this,w(w({},e),{isHandleChatroom:!0,joinMsg:n,id:r,operation:t}),r)}function ye(e){var t=this;return new Promise((function(r,n){var i,o,s,u,l,d;if(_.vF.debug("call send"),t.logOut)return _.vF.error("send message failed",a.C.WEBIM_CONNECTION_CLOSED),n({type:a.C.WEBIM_CONNECTION_CLOSED,message:"not login"});if(!e.id||"string"!=typeof e.id||""===e.id)return n({type:a.C.MESSAGE_PARAMETER_ERROR,message:'Missing required parameter: "id"'});if(!e.to||"string"!=typeof e.to||""===e.to)return n({type:a.C.MESSAGE_PARAMETER_ERROR,message:'Missing required parameter: "to"'});var f="file"===e.type||"img"===e.type||"audio"===e.type||"video"===e.type,h="delivery"===e.type||"read"===e.type||"channel"===e.type,p="cmd"===e.type,v="recall"===e.type,m=null==e?void 0:e.editMessageId,y=!(h||v||p||m);if(e.id){if(!f&&!h||f&&t.useOwnUploadFun){var O="recall"===e.type?E.jz.SEND_RECALL_MSG:E.jz.SEND_MSG;m&&(O=E.jz.MODIFY_MESSAGE),g.nf.size<=g.Po&&g.nf.set(e.id,{rpt:t.dataReport.geOperateFun({operationName:O})})}y&&(null===(o=null===(i=t._localCache)||void 0===i?void 0:i.getInstance())||void 0===o||o.storeMessage(e,c.q.CREATE)),t._msgHash[e.id]=w(w({},e),{resolve:r,reject:n})}if(f||"combine"===e.type)return ve.call(t,e);if("txt"===e.type&&(null===(s=e.msgConfig)||void 0===s?void 0:s.languages)&&Array.isArray(null===(u=e.msgConfig)||void 0===u?void 0:u.languages)&&e.msgConfig.languages.length>0){var T=t.translateMessage||t.translation.translateMessage;if(!T)throw new Error("there is no method to translate message");T.call(t,{text:e.msg,languages:e.msgConfig.languages}).then((function(r){var n,i,o,s=null===(n=r.data[0])||void 0===n?void 0:n.translations;s=s.map((function(e){return{code:e.to,text:e.text}})),e.translations=s,t._msgHash[e.id].translations=s,null===(o=null===(i=t._localCache)||void 0===i?void 0:i.getInstance())||void 0===o||o.storeMessage(e,c.q.INPROGRESS);var a=pe.call(t,e);Oe.call(t,a,e.id)})).catch((function(e){n(e)}))}else{y&&(null===(d=null===(l=t._localCache)||void 0===l?void 0:l.getInstance())||void 0===d||d.storeMessage(e,c.q.INPROGRESS));var R=pe.call(t,e);Oe.call(t,R,e.id)}}))}function Oe(e,t){var r,n,i,o,s=this;if(e.isHandleChatroom){if(!this.isOpened()){var u={data:"",type:a.C.WEBIM_CONNCTION_DISCONNECTED,message:"websocket has been disconnected"};if(g.Xp.has(e.id)){var c=g.Xp.get(e.id);(0,c.rpt)({isEndApi:!0,data:{isSuccess:0,requestName:c.requestName,requestMethod:"WEBSOCKET",requestUrl:this.url,code:E.G8.disconnect,codeDesc:"websocket has been disconnected"}}),g.Xp.delete(e.id)}return Promise.reject(u)}return new Promise((function(r,n){var i,o;s._msgHash[e.id]=w(w({},e),{resolve:r,reject:n});var u=R.v.call(s,e.joinMsg),c=u[0];if(!u[1]){var l={type:a.C.SDK_RUNTIME_ERROR,message:"compress message failed"};return null===(o=null===(i=s._msgHash[e.id])||void 0===i?void 0:i.reject)||void 0===o||o.call(i,l),void delete s._msgHash[e.id]}var d=s._getSock?B.call(s,c,t):c;if(t){var f=setTimeout((function(){var t,r=s._msgHash[e.id];if(r){var n={type:a.C.REQUEST_TIMEOUT,message:"request timeout"};null===(t=r.reject)||void 0===t||t.call(r,n),clearTimeout(r.messageTimer),delete s._msgHash[e.id],s.reconnecting||s.reconnect(!0)}}),y.Ez);s._msgHash[e.id].messageTimer=f}s.sock.send(d)}))}if(!this.isOpened())return null===(r=this.unMSyncSendMsgMap)||void 0===r||r.set(t,e),!this.logOut&&this.autoReconnectNumTotal<this.autoReconnectNumMax&&(_.vF.info("need to reconnect",this.autoReconnectNumTotal,this.autoReconnectNumMax),this.offLineSendConnecting=!0,this.reconnecting||this.reconnect()),void(this.onError&&this.onError({type:a.C.WEBIM_CONNCTION_DISCONNECTED,message:"websocket has been disconnected"}));var l=t&&setTimeout((function(){var e,r,n;if(s._msgHash[null!=t?t:""]){var i={type:a.C.MESSAGE_SEND_TIMEOUT,message:"send message timeout"};null===(r=(e=s._msgHash[null!=t?t:""]).reject)||void 0===r||r.call(e,i),clearTimeout(null===(n=s._msgHash[null!=t?t:""])||void 0===n?void 0:n.messageTimer),delete s._msgHash[null!=t?t:""],s.reconnecting||s.reconnect(!0)}}),y.Ez);this._msgHash[null!=t?t:""]&&(this._msgHash[null!=t?t:""].messageTimer=l);var d=R.v.call(this,e),f=d[0];if(!d[1])return u={type:a.C.SDK_RUNTIME_ERROR,message:"compress message failed"},null===(i=null===(n=this._msgHash[null!=t?t:""])||void 0===n?void 0:n.reject)||void 0===i||i.call(n,u),clearTimeout(null===(o=this._msgHash[null!=t?t:""])||void 0===o?void 0:o.messageTimer),void delete this._msgHash[null!=t?t:""];var h=this._getSock?B.call(this,f,t):f;this.sock.send(h)}t.Ay=function(e,t){return e.send=ye,e.sendMsg=ye,_.vF.info("init Msync by ".concat(e.name)),{generateProvision:F.bind(e),generateLogout:H.bind(e),base64transform:B.bind(e),distributeMeta:G.bind(e),decodeMeta:W.bind(e),decodeUnreadDL:K.bind(e),_rebuild:z.bind(e),_lastsession:Y.bind(e),receiveProvision:Z.bind(e),isInQueue:ae.bind(e),decodeNotice:ue.bind(e),decodeMSync:ce.bind(e),distributeMSync:le.bind(e),encodeChatMsg:pe.bind(e),upLoadFile:ve.bind(e),send:ye.bind(e),stopHeartBeat:oe.bind(e),handleChatRoom:Ee.bind(e),sendUnreadDeal:ne.bind(e)}}},6651:function(e,t,r){"use strict";var n=r(4644),i=r(9617).indexOf,o=n.aTypedArray;(0,n.exportTypedArrayMethod)("indexOf",(function(e){return i(o(this),e,arguments.length>1?arguments[1]:void 0)}))},6682:function(e,t,r){"use strict";var n=r(9565),i=r(8551),o=r(4901),s=r(2195),a=r(7323),u=TypeError;e.exports=function(e,t){var r=e.exec;if(o(r)){var c=n(r,e,t);return null!==c&&i(c),c}if("RegExp"===s(e))return n(a,e,t);throw new u("RegExp#exec called on incompatible receiver")}},6699:function(e,t,r){"use strict";var n=r(3724),i=r(4913),o=r(6980);e.exports=n?function(e,t,r){return i.f(e,t,o(1,r))}:function(e,t,r){return e[t]=r,e}},6706:function(e,t,r){"use strict";var n=r(9504),i=r(9306);e.exports=function(e,t,r){try{return n(i(Object.getOwnPropertyDescriptor(e,t)[r]))}catch(e){}}},6761:function(e,t,r){"use strict";var n=r(6518),i=r(4576),o=r(9565),s=r(9504),a=r(6395),u=r(3724),c=r(4495),l=r(9039),d=r(9297),f=r(1625),h=r(8551),p=r(5397),v=r(6969),m=r(655),_=r(6980),g=r(2360),E=r(1072),y=r(8480),O=r(298),T=r(3717),R=r(7347),I=r(4913),S=r(6801),C=r(8773),b=r(6840),N=r(2106),A=r(5745),M=r(6119),w=r(421),L=r(3392),U=r(8227),x=r(1951),D=r(511),P=r(8242),k=r(687),F=r(1181),H=r(9213).forEach,B=M("hidden"),G="Symbol",W="prototype",j=F.set,q=F.getterFor(G),K=Object[W],z=i.Symbol,V=z&&z[W],J=i.RangeError,Y=i.TypeError,X=i.QObject,Q=R.f,$=I.f,Z=O.f,ee=C.f,te=s([].push),re=A("symbols"),ne=A("op-symbols"),ie=A("wks"),oe=!X||!X[W]||!X[W].findChild,se=function(e,t,r){var n=Q(K,t);n&&delete K[t],$(e,t,r),n&&e!==K&&$(K,t,n)},ae=u&&l((function(){return 7!==g($({},"a",{get:function(){return $(this,"a",{value:7}).a}})).a}))?se:$,ue=function(e,t){var r=re[e]=g(V);return j(r,{type:G,tag:e,description:t}),u||(r.description=t),r},ce=function(e,t,r){e===K&&ce(ne,t,r),h(e);var n=v(t);return h(r),d(re,n)?(r.enumerable?(d(e,B)&&e[B][n]&&(e[B][n]=!1),r=g(r,{enumerable:_(0,!1)})):(d(e,B)||$(e,B,_(1,g(null))),e[B][n]=!0),ae(e,n,r)):$(e,n,r)},le=function(e,t){h(e);var r=p(t),n=E(r).concat(pe(r));return H(n,(function(t){u&&!o(de,r,t)||ce(e,t,r[t])})),e},de=function(e){var t=v(e),r=o(ee,this,t);return!(this===K&&d(re,t)&&!d(ne,t))&&(!(r||!d(this,t)||!d(re,t)||d(this,B)&&this[B][t])||r)},fe=function(e,t){var r=p(e),n=v(t);if(r!==K||!d(re,n)||d(ne,n)){var i=Q(r,n);return!i||!d(re,n)||d(r,B)&&r[B][n]||(i.enumerable=!0),i}},he=function(e){var t=Z(p(e)),r=[];return H(t,(function(e){d(re,e)||d(w,e)||te(r,e)})),r},pe=function(e){var t=e===K,r=Z(t?ne:p(e)),n=[];return H(r,(function(e){!d(re,e)||t&&!d(K,e)||te(n,re[e])})),n};c||(z=function(){if(f(V,this))throw new Y("Symbol is not a constructor");var e=arguments.length&&void 0!==arguments[0]?m(arguments[0]):void 0,t=L(e),r=function(e){var n=void 0===this?i:this;n===K&&o(r,ne,e),d(n,B)&&d(n[B],t)&&(n[B][t]=!1);var s=_(1,e);try{ae(n,t,s)}catch(e){if(!(e instanceof J))throw e;se(n,t,s)}};return u&&oe&&ae(K,t,{configurable:!0,set:r}),ue(t,e)},b(V=z[W],"toString",(function(){return q(this).tag})),b(z,"withoutSetter",(function(e){return ue(L(e),e)})),C.f=de,I.f=ce,S.f=le,R.f=fe,y.f=O.f=he,T.f=pe,x.f=function(e){return ue(U(e),e)},u&&(N(V,"description",{configurable:!0,get:function(){return q(this).description}}),a||b(K,"propertyIsEnumerable",de,{unsafe:!0}))),n({global:!0,constructor:!0,wrap:!0,forced:!c,sham:!c},{Symbol:z}),H(E(ie),(function(e){D(e)})),n({target:G,stat:!0,forced:!c},{useSetter:function(){oe=!0},useSimple:function(){oe=!1}}),n({target:"Object",stat:!0,forced:!c,sham:!u},{create:function(e,t){return void 0===t?g(e):le(g(e),t)},defineProperty:ce,defineProperties:le,getOwnPropertyDescriptor:fe}),n({target:"Object",stat:!0,forced:!c},{getOwnPropertyNames:he}),P(),k(z,G),w[B]=!0},6801:function(e,t,r){"use strict";var n=r(3724),i=r(8686),o=r(4913),s=r(8551),a=r(5397),u=r(1072);t.f=n&&!i?Object.defineProperties:function(e,t){s(e);for(var r,n=a(t),i=u(t),c=i.length,l=0;c>l;)o.f(e,r=i[l++],n[r]);return e}},6812:function(e,t,r){"use strict";var n=r(4644),i=r(8745),o=r(8379),s=n.aTypedArray;(0,n.exportTypedArrayMethod)("lastIndexOf",(function(e){var t=arguments.length;return i(o,s(this),t>1?[e,arguments[1]]:[e])}))},6823:function(e){"use strict";var t=String;e.exports=function(e){try{return t(e)}catch(e){return"Object"}}},6834:function(e,t,r){"use strict";r.d(t,{$b:function(){return s.A},CD:function(){return a.A},PM:function(){return i.A},u0:function(){return o.A},yH:function(){return n.Ay}});var n=r(8579),i=r(1408),o=r(1672),s=r(7725),a=r(2055)},6837:function(e){"use strict";var t=TypeError;e.exports=function(e){if(e>9007199254740991)throw t("Maximum allowed index exceeded");return e}},6840:function(e,t,r){"use strict";var n=r(4901),i=r(4913),o=r(283),s=r(9433);e.exports=function(e,t,r,a){a||(a={});var u=a.enumerable,c=void 0!==a.name?a.name:t;if(n(r)&&o(r,c,a),a.global)u?e[t]=r:s(t,r);else{try{a.unsafe?e[t]&&(u=!0):delete e[t]}catch(e){}u?e[t]=r:i.f(e,t,{value:r,enumerable:!1,configurable:!a.nonConfigurable,writable:!a.nonWritable})}return e}},6910:function(e,t,r){"use strict";var n=r(6518),i=r(9504),o=r(9306),s=r(8981),a=r(6198),u=r(4606),c=r(655),l=r(9039),d=r(4488),f=r(4598),h=r(3709),p=r(3763),v=r(9519),m=r(3607),_=[],g=i(_.sort),E=i(_.push),y=l((function(){_.sort(void 0)})),O=l((function(){_.sort(null)})),T=f("sort"),R=!l((function(){if(v)return v<70;if(!(h&&h>3)){if(p)return!0;if(m)return m<603;var e,t,r,n,i="";for(e=65;e<76;e++){switch(t=String.fromCharCode(e),e){case 66:case 69:case 70:case 72:r=3;break;case 68:case 71:r=4;break;default:r=2}for(n=0;n<47;n++)_.push({k:t+n,v:r})}for(_.sort((function(e,t){return t.v-e.v})),n=0;n<_.length;n++)t=_[n].k.charAt(0),i.charAt(i.length-1)!==t&&(i+=t);return"DGBEFHACIJK"!==i}}));n({target:"Array",proto:!0,forced:y||!O||!T||!R},{sort:function(e){void 0!==e&&o(e);var t=s(this);if(R)return void 0===e?g(t):g(t,e);var r,n,i=[],l=a(t);for(n=0;n<l;n++)n in t&&E(i,t[n]);for(d(i,function(e){return function(t,r){return void 0===r?-1:void 0===t?1:void 0!==e?+e(t,r)||0:c(t)>c(r)?1:-1}}(e)),r=a(i),n=0;n<r;)t[n]=i[n++];for(;n<l;)u(t,n++);return t}})},6933:function(e,t,r){"use strict";var n=r(9504),i=r(4376),o=r(4901),s=r(2195),a=r(655),u=n([].push);e.exports=function(e){if(o(e))return e;if(i(e)){for(var t=e.length,r=[],n=0;n<t;n++){var c=e[n];"string"==typeof c?u(r,c):"number"!=typeof c&&"Number"!==s(c)&&"String"!==s(c)||u(r,a(c))}var l=r.length,d=!0;return function(e,t){if(d)return d=!1,t;if(i(this))return t;for(var n=0;n<l;n++)if(r[n]===e)return t}}}},6938:function(e,t,r){"use strict";var n=r(2360),i=r(2106),o=r(6279),s=r(6080),a=r(679),u=r(4117),c=r(2652),l=r(1088),d=r(2529),f=r(7633),h=r(3724),p=r(3451).fastKey,v=r(1181),m=v.set,_=v.getterFor;e.exports={getConstructor:function(e,t,r,l){var d=e((function(e,i){a(e,f),m(e,{type:t,index:n(null),first:null,last:null,size:0}),h||(e.size=0),u(i)||c(i,e[l],{that:e,AS_ENTRIES:r})})),f=d.prototype,v=_(t),g=function(e,t,r){var n,i,o=v(e),s=E(e,t);return s?s.value=r:(o.last=s={index:i=p(t,!0),key:t,value:r,previous:n=o.last,next:null,removed:!1},o.first||(o.first=s),n&&(n.next=s),h?o.size++:e.size++,"F"!==i&&(o.index[i]=s)),e},E=function(e,t){var r,n=v(e),i=p(t);if("F"!==i)return n.index[i];for(r=n.first;r;r=r.next)if(r.key===t)return r};return o(f,{clear:function(){for(var e=v(this),t=e.first;t;)t.removed=!0,t.previous&&(t.previous=t.previous.next=null),t=t.next;e.first=e.last=null,e.index=n(null),h?e.size=0:this.size=0},delete:function(e){var t=this,r=v(t),n=E(t,e);if(n){var i=n.next,o=n.previous;delete r.index[n.index],n.removed=!0,o&&(o.next=i),i&&(i.previous=o),r.first===n&&(r.first=i),r.last===n&&(r.last=o),h?r.size--:t.size--}return!!n},forEach:function(e){for(var t,r=v(this),n=s(e,arguments.length>1?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)}}),o(f,r?{get:function(e){var t=E(this,e);return t&&t.value},set:function(e,t){return g(this,0===e?0:e,t)}}:{add:function(e){return g(this,e=0===e?0:e,e)}}),h&&i(f,"size",{configurable:!0,get:function(){return v(this).size}}),d},setStrong:function(e,t,r){var n=t+" Iterator",i=_(t),o=_(n);l(e,t,(function(e,t){m(this,{type:n,target:e,state:i(e),kind:t,last:null})}),(function(){for(var e=o(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)?d("keys"===t?r.key:"values"===t?r.value:[r.key,r.value],!1):(e.target=null,d(void 0,!0))}),r?"entries":"values",!r,!0),f(t)}}},6955:function(e,t,r){"use strict";var n=r(2140),i=r(4901),o=r(2195),s=r(8227)("toStringTag"),a=Object,u="Arguments"===o(function(){return arguments}());e.exports=n?o:function(e){var t,r,n;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(r=function(e,t){try{return e[t]}catch(e){}}(t=a(e),s))?r:u?o(t):"Object"===(n=o(t))&&i(t.callee)?"Arguments":n}},6969:function(e,t,r){"use strict";var n=r(2777),i=r(757);e.exports=function(e){var t=n(e,"string");return i(t)?t:t+""}},6980:function(e){"use strict";e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},6981:function(e,t,r){"use strict";r.d(t,{B:function(){return a}}),r(8706),r(739),r(4170),r(6099),r(3362);var n=r(1156),i=r(4269),o=r(7968),s=r(3603);function a(e){if("string"!=typeof e.deviceId||""===e.deviceId)throw Error('Invalid parameter: "deviceId"');var t=n.dO.call(this).error;if(t)return Promise.reject(t);var r=this.context,a=r.orgName,u=r.appName,c=r.accessToken,l={url:"".concat(this.apiUrl,"/").concat(a,"/").concat(u,"/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 "+c,"Content-Type":"application/json"},success:e.success,error:e.error};o.vF.debug("Call uploadPushTokenToServer",e);var d=i.RD.bind(this,l,s.jz.UPLOAD_PUSH_TOKEN);return i.Wp.retryPromise(d).then((function(e){var t=e.entities[0]||{};return{type:e.type,data:t}}))}},7029:function(e,t,r){"use strict";var n=r(8981),i=r(5610),o=r(6198),s=r(4606),a=Math.min;e.exports=[].copyWithin||function(e,t){var r=n(this),u=o(r),c=i(e,u),l=i(t,u),d=arguments.length>2?arguments[2]:void 0,f=a((void 0===d?u:i(d,u))-l,u-c),h=1;for(l<c&&c<l+f&&(h=-1,l+=f-1,c+=f-1);f-- >0;)l in r?r[c]=r[l]:s(r,c),c+=h,l+=h;return r}},7040:function(e,t,r){"use strict";var n=r(4495);e.exports=n&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},7055:function(e,t,r){"use strict";var n=r(9504),i=r(9039),o=r(2195),s=Object,a=n("".split);e.exports=i((function(){return!s("z").propertyIsEnumerable(0)}))?function(e){return"String"===o(e)?a(e,""):s(e)}:s},7087:function(e,t,r){"use strict";r.d(t,{Z:function(){return i}}),r(9089),r(9449);var n=r(4269);function i(e){var t,r="image/gif"===e.file.filetype||(null===(t=e.file.filename)||void 0===t?void 0:t.toLowerCase().endsWith(".gif")),i=r||!!e.isOriginalImage;return{id:n.Wp.getUniqueId(),chatType:e.chatType,type:"img",to:e.to,from:e.from||"",file:{url:"",filename:e.file.filename,filetype:e.file.filetype||"",data:e.file.data||void 0},filename:e.file.filename,filetype:e.file.filetype||"",width:e.width,height:e.height,file_length:e.file.size,ext:e.ext,time:Date.now(),msgConfig:e.msgConfig,onFileUploadError:e.onFileUploadError,onFileUploadComplete:e.onFileUploadComplete,onFileUploadProgress:e.onFileUploadProgress,isChatThread:e.isChatThread,priority:e.priority,deliverOnlineOnly:e.deliverOnlineOnly,receiverList:e.receiverList,isGif:r,isOriginalImage:i,_useInternalUpload:!!e.file.path||void 0,_filePath:e.file.path}}},7120:function(e,t,r){"use strict";r.d(t,{G:function(){return n}});var n=2},7208:function(e,t,r){"use strict";var n=r(6518),i=r(9565);n({target:"URL",proto:!0,enumerable:!0},{toJSON:function(){return i(URL.prototype.toString,this)}})},7209:function(e,t,r){"use strict";e.exports=o,o.className="ReflectionObject";var n,i=r(3262);function o(e,t){if(!i.isString(e))throw TypeError("name must be a string");if(t&&!i.isObject(t))throw TypeError("options must be an object");this.options=t,this.parsedOptions=null,this.name=e,this.parent=null,this.resolved=!1,this.comment=null,this.filename=null}Object.defineProperties(o.prototype,{root:{get:function(){for(var e=this;null!==e.parent;)e=e.parent;return e}},fullName:{get:function(){for(var e=[this.name],t=this.parent;t;)e.unshift(t.name),t=t.parent;return e.join(".")}}}),o.prototype.toJSON=function(){throw Error()},o.prototype.onAdd=function(e){this.parent&&this.parent!==e&&this.parent.remove(this),this.parent=e,this.resolved=!1;var t=e.root;t instanceof n&&t._handleAdd(this)},o.prototype.onRemove=function(e){var t=e.root;t instanceof n&&t._handleRemove(this),this.parent=null,this.resolved=!1},o.prototype.resolve=function(){return this.resolved||this.root instanceof n&&(this.resolved=!0),this},o.prototype.getOption=function(e){if(this.options)return this.options[e]},o.prototype.setOption=function(e,t,r){return r&&this.options&&void 0!==this.options[e]||((this.options||(this.options={}))[e]=t),this},o.prototype.setParsedOption=function(e,t,r){this.parsedOptions||(this.parsedOptions=[]);var n=this.parsedOptions;if(r){var o=n.find((function(t){return Object.prototype.hasOwnProperty.call(t,e)}));if(o){var s=o[e];i.setProperty(s,r,t)}else(o={})[e]=i.setProperty({},r,t),n.push(o)}else{var a={};a[e]=t,n.push(a)}return this},o.prototype.setOptions=function(e,t){if(e)for(var r=Object.keys(e),n=0;n<r.length;++n)this.setOption(r[n],e[r[n]],t);return this},o.prototype.toString=function(){var e=this.constructor.className,t=this.fullName;return t.length?e+" "+t:e},o._configure=function(e){n=e}},7301:function(e,t,r){"use strict";var n=r(4644),i=r(9213).some,o=n.aTypedArray;(0,n.exportTypedArrayMethod)("some",(function(e){return i(o(this),e,arguments.length>1?arguments[1]:void 0)}))},7323:function(e,t,r){"use strict";var n,i,o=r(9565),s=r(9504),a=r(655),u=r(7979),c=r(8429),l=r(5745),d=r(2360),f=r(1181).get,h=r(3635),p=r(8814),v=l("native-string-replace",String.prototype.replace),m=RegExp.prototype.exec,_=m,g=s("".charAt),E=s("".indexOf),y=s("".replace),O=s("".slice),T=(i=/b*/g,o(m,n=/a/,"a"),o(m,i,"a"),0!==n.lastIndex||0!==i.lastIndex),R=c.BROKEN_CARET,I=void 0!==/()??/.exec("")[1];(T||I||R||h||p)&&(_=function(e){var t,r,n,i,s,c,l,h=this,p=f(h),S=a(e),C=p.raw;if(C)return C.lastIndex=h.lastIndex,t=o(_,C,S),h.lastIndex=C.lastIndex,t;var b=p.groups,N=R&&h.sticky,A=o(u,h),M=h.source,w=0,L=S;if(N&&(A=y(A,"y",""),-1===E(A,"g")&&(A+="g"),L=O(S,h.lastIndex),h.lastIndex>0&&(!h.multiline||h.multiline&&"\n"!==g(S,h.lastIndex-1))&&(M="(?: "+M+")",L=" "+L,w++),r=new RegExp("^(?:"+M+")",A)),I&&(r=new RegExp("^"+M+"$(?!\\s)",A)),T&&(n=h.lastIndex),i=o(m,N?r:h,L),N?i?(i.input=O(i.input,w),i[0]=O(i[0],w),i.index=h.lastIndex,h.lastIndex+=i[0].length):h.lastIndex=0:T&&i&&(h.lastIndex=h.global?i.index+i[0].length:n),I&&i&&i.length>1&&o(v,i[0],r,(function(){for(s=1;s<arguments.length-2;s++)void 0===arguments[s]&&(i[s]=void 0)})),i&&b)for(i.groups=c=d(null),s=0;s<b.length;s++)c[(l=b[s])[0]]=i[l[1]];return i}),e.exports=_},7337:function(e,t,r){"use strict";var n=r(6518),i=r(9504),o=r(5610),s=RangeError,a=String.fromCharCode,u=String.fromCodePoint,c=i([].join);n({target:"String",stat:!0,arity:1,forced:!!u&&1!==u.length},{fromCodePoint:function(e){for(var t,r=[],n=arguments.length,i=0;n>i;){if(t=+arguments[i++],o(t,1114111)!==t)throw new s(t+" is not a valid code point");r[i]=t<65536?a(t):a(55296+((t-=65536)>>10),t%1024+56320)}return c(r,"")}})},7347:function(e,t,r){"use strict";var n=r(3724),i=r(9565),o=r(8773),s=r(6980),a=r(5397),u=r(6969),c=r(9297),l=r(5917),d=Object.getOwnPropertyDescriptor;t.f=n?d:function(e,t){if(e=a(e),t=u(t),l)try{return d(e,t)}catch(e){}if(c(e,t))return s(!i(o.f,e,t),e[t])}},7400:function(e){"use strict";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}},7416:function(e,t,r){"use strict";var n=r(9039),i=r(8227),o=r(3724),s=r(6395),a=i("iterator");e.exports=!n((function(){var e=new URL("b?a=1&b=2&c=3","https://a"),t=e.searchParams,r=new URLSearchParams("a=1&a=2&b=3"),n="";return e.pathname="c%20d",t.forEach((function(e,r){t.delete("b"),n+=r+e})),r.delete("a",2),r.delete("b",void 0),s&&(!e.toJSON||!r.has("a",1)||r.has("a",2)||!r.has("a",void 0)||r.has("b"))||!t.size&&(s||!o)||!t.sort||"https://a/c%20d?a=1&c=3"!==e.href||"3"!==t.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!t[a]||"a"!==new URL("https://a@b").username||"b"!==new URLSearchParams(new URLSearchParams("a=b")).get("a")||"xn--e1aybc"!==new URL("https://тест").host||"#%D0%B1"!==new URL("https://a#б").hash||"a1c3"!==n||"x"!==new URL("https://x",void 0).host}))},7433:function(e,t,r){"use strict";var n=r(4376),i=r(3517),o=r(34),s=r(8227)("species"),a=Array;e.exports=function(e){var t;return n(e)&&(t=e.constructor,(i(t)&&(t===a||n(t.prototype))||o(t)&&null===(t=t[s]))&&(t=void 0)),void 0===t?a:t}},7452:function(e){"use strict";e.exports="\t\n\v\f\r \u2028\u2029\ufeff"},7468:function(e,t,r){"use strict";var n;r.d(t,{P:function(){return n}}),r(3484),function(e){e[e.SYNC_INIT=0]="SYNC_INIT",e[e.SYNC_START=1]="SYNC_START",e[e.SYNC_FINISH=2]="SYNC_FINISH"}(n||(n={}))},7476:function(e,t,r){"use strict";var n=r(2195),i=r(9504);e.exports=function(e){if("Function"===n(e))return i(e)}},7495:function(e,t,r){"use strict";var n=r(6518),i=r(7323);n({target:"RegExp",proto:!0,forced:/./.exec!==i},{exec:i})},7507:function(e,t,r){"use strict";r.d(t,{Hc:function(){return h},iK:function(){return f},mr:function(){return d},v7:function(){return l}}),r(8706),r(3288),r(9085),r(9432),r(6099),r(3362);var n=r(8093),i=r(7968),o=r(4269),s=r(3603),a=r(4331),u=r(8288),c=function(){return c=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},c.apply(this,arguments)};function l(){var e=this.context,t=e.orgName,r=e.appName,n=e.accessToken,a={url:"".concat(this.apiUrl,"/").concat(t,"/").concat(r,"/sdk/chatfiles/part-upload"),dataType:"json",type:"POST",headers:{Authorization:"Bearer "+n}};return i.vF.debug("Call multipartInit"),o.RD.call(this,a,s.jz.SDK_INTERNAL).then((function(e){var t=e.entities[0];return{data:{fileMaxSize:t.file_upper_limit,partMinSize:t.part_lower_limit,uuid:t.uuid},extraInfo:e.extraInfo,type:e.type}}))}function d(e){var t=this;return new Promise((function(r,o){var s,u,l=(new Date).getTime(),d=t.context,f=d.orgName,h=d.appName,p=d.accessToken,v=e.uuid,m=e.partNumber,_=e.part,g=e.onProgress,E="".concat(t.apiUrl,"/").concat(f,"/").concat(h,"/sdk/chatfiles/part-upload/").concat(v),y=new XMLHttpRequest;i.vF.debug("Call multipartUpload"),y.upload&&(null===(u=(s=y.upload).addEventListener)||void 0===u||u.call(s,"progress",(function(e){null==g||g(e)}),!1)),y.addEventListener("abort",(function(){o({type:n.C.REQUEST_ABORT,message:"Request Abort",errorType:"onabort",xhr:y,extraInfo:{elapse:(new Date).getTime()-l,httpCode:y.status||-1,errDesc:"Request Abort",url:E}})}),!1),y.addEventListener("error",(function(){o({type:n.C.WEBIM_UPLOADFILE_ERROR,data:y,extraInfo:{elapse:(new Date).getTime()-l,httpCode:y.status||-1,errDesc:"request error",url:E}})}),!1),y.addEventListener("load",(function(){try{var e=JSON.parse(y.responseText);if(200!==y.status)return o({type:n.C.WEBIM_UPLOADFILE_ERROR,data:e,extraInfo:{elapse:(new Date).getTime()-l,httpCode:y.status||-1,errDesc:"part upload failed",url:E}}),!1;try{r(c(c({},e),{extraInfo:{elapse:(new Date).getTime()-l,httpCode:y.status||-1,url:E}}))}catch(e){o({type:n.C.WEBIM_CONNCTION_CALLBACK_INNER_ERROR,data:e,extraInfo:{elapse:(new Date).getTime()-l,httpCode:y.status||-1,errDesc:"part upload failed",url:E}})}}catch(e){o({type:n.C.WEBIM_UPLOADFILE_ERROR,data:y.responseText,extraInfo:{elapse:(new Date).getTime()-l,httpCode:y.status||-1,errDesc:"part upload failed",url:E}})}}),!1),y.addEventListener("timeout",(function(){o({type:n.C.REQUEST_TIMEOUT,message:"request timeout",extraInfo:{elapse:(new Date).getTime()-l,httpCode:y.status||-1,errDesc:"request timeout",url:E}})}),!1);var O=new FormData;O.append("part_file",_),O.append("part_number",m),y.timeout=a.Gc,y.open("PUT",E),y.setRequestHeader("restrict-access","true"),y.setRequestHeader("Accept","*/*"),y.setRequestHeader("Authorization","Bearer "+p),y.send(O)}))}function f(e){var t=e.uuid,r=e.thumbnailHeight,n=e.thumbnailWidth,a=e.conversationInfo,c=e.uploadMd5,l=e.uploadImageType,d=e.imageWidth,f=e.imageHeight,h=a.conversationId,p=a.conversationType,v=u.Z2[p],m=this.context,_=m.orgName,g=m.appName,E=m.accessToken,y="".concat(this.apiUrl,"/").concat(_,"/").concat(g,"/sdk/chatfiles/part-upload/").concat(t,"?restrict-access=true&chat-type=").concat(v,"&chat-target=").concat(h);n&&(y+="&thumbnail-width=".concat(n)),r&&(y+="&thumbnail-height=".concat(r)),c&&(y+="&md5=".concat(encodeURIComponent(c))),l&&(y+="&imagetype=".concat(l),"number"==typeof d&&d>0&&(y+="&width=".concat(d)),"number"==typeof f&&f>0&&(y+="&height=".concat(f)));var O={url:y,dataType:"json",type:"POST",headers:{Authorization:"Bearer "+E}};return i.vF.debug("Call multipartComplete"),o.RD.call(this,O,s.jz.SDK_INTERNAL)}function h(e){var t=e.uuid,r=this.context,n=r.orgName,a=r.appName,u=r.accessToken,c={url:"".concat(this.apiUrl,"/").concat(n,"/").concat(a,"/sdk/chatfiles/part-upload/").concat(t),dataType:"json",type:"DELETE",headers:{Authorization:"Bearer "+u}};return i.vF.debug("Call multipartAbort"),o.RD.call(this,c,s.jz.SDK_INTERNAL)}},7535:function(e,t,r){"use strict";r.d(t,{Q:function(){return _}});var n=r(4269),i=r(4035),o=r(707),s=r(9532),a=r(6496),u=r(8307),c=r(3312),l=r(859),d=r(208),f=r(810),h=r(6448),p=r(4917),v=r(7087),m=r(4478),_=function(){function e(t,r){return this.type=t,this.id=r||n.Wp.getUniqueId(),e.createOldMsg({type:t,id:this.id})}return e.createOldMsg=function(e){switch(e.type){case"read":return new i.Z({type:"read",id:e.id});case"delivery":return new o.r({type:"delivery",id:e.id});case"channel":return new s.c({type:"channel",id:e.id});case"txt":return new a.E({type:"txt",id:e.id});case"cmd":return new u.z({type:"cmd",id:e.id});case"custom":return new c.S({type:"custom",id:e.id});case"loc":return new l.a({type:"loc",id:e.id});case"img":return new d.E({type:"img",id:e.id});case"audio":return new f.f({type:"audio",id:e.id});case"video":return new h.C({type:"video",id:e.id});case"file":return new p.i({type:"file",id:e.id})}},e.create=function(e){return"txt"!==(t=e).type||"version"in t?function(e){return"img"===e.type&&!("version"in e)}(e)?d.E.create(e):function(e){return"cmd"===e.type&&!("version"in e)}(e)?u.z.create(e):function(e){return"file"===e.type&&!("version"in e)}(e)?p.i.create(e):function(e){return"audio"===e.type&&!("version"in e)}(e)?f.f.create(e):function(e){return"video"===e.type&&!("version"in e)}(e)?h.C.create(e):function(e){return"custom"===e.type&&!("version"in e)}(e)?c.S.create(e):function(e){return"loc"===e.type&&!("version"in e)}(e)?l.a.create(e):function(e){return"channel"===e.type&&!("version"in e)}(e)?s.c.create(e):function(e){return"delivery"===e.type&&!("version"in e)}(e)?o.r.create(e):function(e){return"read"===e.type&&!("version"in e)}(e)?i.Z.create(e):function(e){return"combine"===e.type&&!("version"in e)}(e)?m.I.create(e):{}:a.E.create(e);var t},e.prototype.set=function(e){},e.getFileUrl=n.Wp.getFileUrl,e.createImageMessage=function(e){return(0,v.Z)(e)},e.download=n.Wp.download,e.parseDownloadResponse=n.Wp.parseDownloadResponse,e}()},7595:function(e,t,r){"use strict";e.exports=i;var n=r(3610);function i(e,t,r){if("function"!=typeof e)throw TypeError("rpcImpl must be a function");n.EventEmitter.call(this),this.rpcImpl=e,this.requestDelimited=Boolean(t),this.responseDelimited=Boolean(r)}(i.prototype=Object.create(n.EventEmitter.prototype)).constructor=i,i.prototype.rpcCall=function e(t,r,i,o,s){if(!o)throw TypeError("request must be specified");var a=this;if(!s)return n.asPromise(e,a,t,r,i,o);if(a.rpcImpl)try{return a.rpcImpl(t,r[a.requestDelimited?"encodeDelimited":"encode"](o).finish(),(function(e,r){if(e)return a.emit("error",e,t),s(e);if(null!==r){if(!(r instanceof i))try{r=i[a.responseDelimited?"decodeDelimited":"decode"](r)}catch(e){return a.emit("error",e,t),s(e)}return a.emit("data",r,t),s(null,r)}a.end(!0)}))}catch(e){return a.emit("error",e,t),void setTimeout((function(){s(e)}),0)}else setTimeout((function(){s(Error("already ended"))}),0)},i.prototype.end=function(e){return this.rpcImpl&&(e||this.rpcImpl(null,null,null),this.rpcImpl=null,this.emit("end").off()),this}},7629:function(e,t,r){"use strict";var n=r(6395),i=r(4576),o=r(9433),s="__core-js_shared__",a=e.exports=i[s]||o(s,{});(a.versions||(a.versions=[])).push({version:"3.42.0",mode:n?"pure":"global",copyright:"© 2014-2025 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.42.0/LICENSE",source:"https://github.com/zloirock/core-js"})},7633:function(e,t,r){"use strict";var n=r(7751),i=r(2106),o=r(8227),s=r(3724),a=o("species");e.exports=function(e){var t=n(e);s&&t&&!t[a]&&i(t,a,{configurable:!0,get:function(){return this}})}},7657:function(e,t,r){"use strict";var n,i,o,s=r(9039),a=r(4901),u=r(34),c=r(2360),l=r(2787),d=r(6840),f=r(8227),h=r(6395),p=f("iterator"),v=!1;[].keys&&("next"in(o=[].keys())?(i=l(l(o)))!==Object.prototype&&(n=i):v=!0),!u(n)||s((function(){var e={};return n[p].call(e)!==e}))?n={}:h&&(n=c(n)),a(n[p])||d(n,p,(function(){return this})),e.exports={IteratorPrototype:n,BUGGY_SAFARI_ITERATORS:v}},7680:function(e,t,r){"use strict";var n=r(9504);e.exports=n([].slice)},7696:function(e,t,r){"use strict";var n=r(1291),i=r(8014),o=RangeError;e.exports=function(e){if(void 0===e)return 0;var t=n(e),r=i(t);if(t!==r)throw new o("Wrong length or index");return r}},7725:function(e,t,r){"use strict";var n=r(8093),i=r(3484),o=r(7968),s=r(3850);t.A=function(e){var t,r,a,u,c,l,d=this.root.lookup("easemob.pb.StatisticsBody").decode(e.payload),f=d.operation,h=d.reason;switch(f){case 0:this.onStatisticMessage&&this.onStatisticMessage(d),null===(t=this.eventHandler)||void 0===t||t.dispatch("onStatisticMessage",d);break;case 1:l=i.A.create({type:n.C.WEBIM_CONNCTION_USER_REMOVED,message:"user has been removed"}),this.disconnectedReason=l,this.logOut=!0,this.onError&&this.onError(l),null===(r=this.eventHandler)||void 0===r||r.dispatch("onError",l),s.P.clearAll();break;case 2:l=i.A.create({type:n.C.WEBIM_CONNCTION_USER_LOGIN_ANOTHER_DEVICE,message:"the user is already logged on another device"}),h&&(l.data={loginInfoCustomExt:d.reason}),this.disconnectedReason=l,this.logOut=!0,this.onError&&this.onError(l),null===(a=this.eventHandler)||void 0===a||a.dispatch("onError",l),s.P.clearAll();break;case 3:l=i.A.create({type:n.C.WEBIM_CONNCTION_USER_KICKED_BY_CHANGE_PASSWORD,message:"the user was kicked by changing password"}),this.disconnectedReason=l,this.logOut=!0,this.onError&&this.onError(l),null===(u=this.eventHandler)||void 0===u||u.dispatch("onError",l),s.P.clearAll();break;case 4:l=i.A.create({type:n.C.WEBIM_CONNCTION_USER_KICKED_BY_OTHER_DEVICE,message:"the user was kicked by other device"}),this.disconnectedReason=l,this.logOut=!0,this.onError&&this.onError(l),null===(c=this.eventHandler)||void 0===c||c.dispatch("onError",l),s.P.clearAll();break;default:o.vF.error("handleStatisticsMsg:",d)}}},7728:function(e,t,r){"use strict";e.exports=function(e){var t=o.codegen(["r","l"],e.name+"$decode")("if(!(r instanceof Reader))")("r=Reader.create(r)")("var c=l===undefined?r.len:r.pos+l,m=new this.ctor"+(e.fieldsArray.filter((function(e){return e.map})).length?",k,value":""))("while(r.pos<c){")("var t=r.uint32()");e.group&&t("if((t&7)===4)")("break"),t("switch(t>>>3){");for(var r=0;r<e.fieldsArray.length;++r){var a=e._fieldsArray[r].resolve(),u=a.resolvedType instanceof n?"int32":a.type,c="m"+o.safeProp(a.name);t("case %i:",a.id),a.map?(t("if(%s===util.emptyObject)",c)("%s={}",c)("var c2 = r.uint32()+r.pos"),void 0!==i.defaults[a.keyType]?t("k=%j",i.defaults[a.keyType]):t("k=null"),void 0!==i.defaults[u]?t("value=%j",i.defaults[u]):t("value=null"),t("while(r.pos<c2){")("var tag2=r.uint32()")("switch(tag2>>>3){")("case 1: k=r.%s(); break",a.keyType)("case 2:"),void 0===i.basic[u]?t("value=types[%i].decode(r,r.uint32())",r):t("value=r.%s()",u),t("break")("default:")("r.skipType(tag2&7)")("break")("}")("}"),void 0!==i.long[a.keyType]?t('%s[typeof k==="object"?util.longToHash(k):k]=value',c):t("%s[k]=value",c)):a.repeated?(t("if(!(%s&&%s.length))",c,c)("%s=[]",c),void 0!==i.packed[u]&&t("if((t&7)===2){")("var c2=r.uint32()+r.pos")("while(r.pos<c2)")("%s.push(r.%s())",c,u)("}else"),void 0===i.basic[u]?t(a.resolvedType.group?"%s.push(types[%i].decode(r))":"%s.push(types[%i].decode(r,r.uint32()))",c,r):t("%s.push(r.%s())",c,u)):void 0===i.basic[u]?t(a.resolvedType.group?"%s=types[%i].decode(r)":"%s=types[%i].decode(r,r.uint32())",c,r):t("%s=r.%s()",c,u),t("break")}for(t("default:")("r.skipType(t&7)")("break")("}")("}"),r=0;r<e._fieldsArray.length;++r){var l=e._fieldsArray[r];l.required&&t("if(!m.hasOwnProperty(%j))",l.name)("throw util.ProtocolError(%j,{instance:m})",s(l))}return t("return m")};var n=r(5643),i=r(361),o=r(3262);function s(e){return"missing required '"+e.name+"'"}},7740:function(e,t,r){"use strict";var n=r(9297),i=r(5031),o=r(7347),s=r(4913);e.exports=function(e,t,r){for(var a=i(t),u=s.f,c=o.f,l=0;l<a.length;l++){var d=a[l];n(e,d)||r&&n(r,d)||u(e,d,c(t,d))}}},7743:function(e,t,r){"use strict";var n=r(6518),i=r(9565),o=r(9306),s=r(6043),a=r(1103),u=r(2652);n({target:"Promise",stat:!0,forced:r(537)},{race:function(e){var t=this,r=s.f(t),n=r.reject,c=a((function(){var s=o(t.resolve);u(e,(function(e){i(s,t,e).then(r.resolve,n)}))}));return c.error&&n(c.value),r.promise}})},7750:function(e,t,r){"use strict";var n=r(4117),i=TypeError;e.exports=function(e){if(n(e))throw new i("Can't call method on "+e);return e}},7751:function(e,t,r){"use strict";var n=r(4576),i=r(4901);e.exports=function(e,t){return arguments.length<2?(r=n[e],i(r)?r:void 0):n[e]&&n[e][t];var r}},7764:function(e,t,r){"use strict";var n=r(8183).charAt,i=r(655),o=r(1181),s=r(1088),a=r(2529),u="String Iterator",c=o.set,l=o.getterFor(u);s(String,"String",(function(e){c(this,{type:u,string:i(e),index:0})}),(function(){var e,t=l(this),r=t.string,i=t.index;return i>=r.length?a(void 0,!0):(e=n(r,i),t.index+=e.length,a(e,!1))}))},7782:function(e){"use strict";e.exports=Math.sign||function(e){var t=+e;return 0===t||t!=t?t:t<0?-1:1}},7811:function(e){"use strict";e.exports="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView},7812:function(e,t,r){"use strict";var n=r(6518),i=r(9297),o=r(757),s=r(6823),a=r(5745),u=r(1296),c=a("symbol-to-string-registry");n({target:"Symbol",stat:!0,forced:!u},{keyFor:function(e){if(!o(e))throw new TypeError(s(e)+" is not a symbol");if(i(c,e))return c[e]}})},7829:function(e,t,r){"use strict";var n=r(8183).charAt;e.exports=function(e,t,r){return t+(r?n(e,t).length:1)}},7860:function(e,t,r){"use strict";var n=r(2839);e.exports=/web0s(?!.*chrome)/i.test(n)},7882:function(e,t,r){"use strict";e.exports=g;var n=r(8923);((g.prototype=Object.create(n.prototype)).constructor=g).className="Type";var i=r(5643),o=r(1457),s=r(1344),a=r(8252),u=r(9687),c=r(2551),l=r(6237),d=r(3449),f=r(3262),h=r(1080),p=r(7728),v=r(420),m=r(744),_=r(6434);function g(e,t){n.call(this,e,t),this.fields={},this.oneofs=void 0,this.extensions=void 0,this.reserved=void 0,this.group=void 0,this._fieldsById=null,this._fieldsArray=null,this._oneofsArray=null,this._ctor=null}function E(e){return e._fieldsById=e._fieldsArray=e._oneofsArray=null,delete e.encode,delete e.decode,delete e.verify,e}Object.defineProperties(g.prototype,{fieldsById:{get:function(){if(this._fieldsById)return this._fieldsById;this._fieldsById={};for(var e=Object.keys(this.fields),t=0;t<e.length;++t){var r=this.fields[e[t]],n=r.id;if(this._fieldsById[n])throw Error("duplicate id "+n+" in "+this);this._fieldsById[n]=r}return this._fieldsById}},fieldsArray:{get:function(){return this._fieldsArray||(this._fieldsArray=f.toArray(this.fields))}},oneofsArray:{get:function(){return this._oneofsArray||(this._oneofsArray=f.toArray(this.oneofs))}},ctor:{get:function(){return this._ctor||(this.ctor=g.generateConstructor(this)())},set:function(e){var t=e.prototype;t instanceof c||((e.prototype=new c).constructor=e,f.merge(e.prototype,t)),e.$type=e.prototype.$type=this,f.merge(e,c,!0),this._ctor=e;for(var r=0;r<this.fieldsArray.length;++r)this._fieldsArray[r].resolve();var n={};for(r=0;r<this.oneofsArray.length;++r)n[this._oneofsArray[r].resolve().name]={get:f.oneOfGetter(this._oneofsArray[r].oneof),set:f.oneOfSetter(this._oneofsArray[r].oneof)};r&&Object.defineProperties(e.prototype,n)}}}),g.generateConstructor=function(e){for(var t,r=f.codegen(["p"],e.name),n=0;n<e.fieldsArray.length;++n)(t=e._fieldsArray[n]).map?r("this%s={}",f.safeProp(t.name)):t.repeated&&r("this%s=[]",f.safeProp(t.name));return r("if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)")("this[ks[i]]=p[ks[i]]")},g.fromJSON=function(e,t){var r=new g(e,t.options);r.extensions=t.extensions,r.reserved=t.reserved;for(var c=Object.keys(t.fields),l=0;l<c.length;++l)r.add((void 0!==t.fields[c[l]].keyType?a.fromJSON:s.fromJSON)(c[l],t.fields[c[l]]));if(t.oneofs)for(c=Object.keys(t.oneofs),l=0;l<c.length;++l)r.add(o.fromJSON(c[l],t.oneofs[c[l]]));if(t.nested)for(c=Object.keys(t.nested),l=0;l<c.length;++l){var d=t.nested[c[l]];r.add((void 0!==d.id?s.fromJSON:void 0!==d.fields?g.fromJSON:void 0!==d.values?i.fromJSON:void 0!==d.methods?u.fromJSON:n.fromJSON)(c[l],d))}return t.extensions&&t.extensions.length&&(r.extensions=t.extensions),t.reserved&&t.reserved.length&&(r.reserved=t.reserved),t.group&&(r.group=!0),t.comment&&(r.comment=t.comment),r},g.prototype.toJSON=function(e){var t=n.prototype.toJSON.call(this,e),r=!!e&&Boolean(e.keepComments);return f.toObject(["options",t&&t.options||void 0,"oneofs",n.arrayToJSON(this.oneofsArray,e),"fields",n.arrayToJSON(this.fieldsArray.filter((function(e){return!e.declaringField})),e)||{},"extensions",this.extensions&&this.extensions.length?this.extensions:void 0,"reserved",this.reserved&&this.reserved.length?this.reserved:void 0,"group",this.group||void 0,"nested",t&&t.nested||void 0,"comment",r?this.comment:void 0])},g.prototype.resolveAll=function(){for(var e=this.fieldsArray,t=0;t<e.length;)e[t++].resolve();var r=this.oneofsArray;for(t=0;t<r.length;)r[t++].resolve();return n.prototype.resolveAll.call(this)},g.prototype.get=function(e){return this.fields[e]||this.oneofs&&this.oneofs[e]||this.nested&&this.nested[e]||null},g.prototype.add=function(e){if(this.get(e.name))throw Error("duplicate name '"+e.name+"' in "+this);if(e instanceof s&&void 0===e.extend){if(this._fieldsById?this._fieldsById[e.id]:this.fieldsById[e.id])throw Error("duplicate id "+e.id+" in "+this);if(this.isReservedId(e.id))throw Error("id "+e.id+" is reserved in "+this);if(this.isReservedName(e.name))throw Error("name '"+e.name+"' is reserved in "+this);return e.parent&&e.parent.remove(e),this.fields[e.name]=e,e.message=this,e.onAdd(this),E(this)}return e instanceof o?(this.oneofs||(this.oneofs={}),this.oneofs[e.name]=e,e.onAdd(this),E(this)):n.prototype.add.call(this,e)},g.prototype.remove=function(e){if(e instanceof s&&void 0===e.extend){if(!this.fields||this.fields[e.name]!==e)throw Error(e+" is not a member of "+this);return delete this.fields[e.name],e.parent=null,e.onRemove(this),E(this)}if(e instanceof o){if(!this.oneofs||this.oneofs[e.name]!==e)throw Error(e+" is not a member of "+this);return delete this.oneofs[e.name],e.parent=null,e.onRemove(this),E(this)}return n.prototype.remove.call(this,e)},g.prototype.isReservedId=function(e){return n.isReservedId(this.reserved,e)},g.prototype.isReservedName=function(e){return n.isReservedName(this.reserved,e)},g.prototype.create=function(e){return new this.ctor(e)},g.prototype.setup=function(){for(var e=this.fullName,t=[],r=0;r<this.fieldsArray.length;++r)t.push(this._fieldsArray[r].resolve().resolvedType);this.encode=h(this)({Writer:d,types:t,util:f}),this.decode=p(this)({Reader:l,types:t,util:f}),this.verify=v(this)({types:t,util:f}),this.fromObject=m.fromObject(this)({types:t,util:f}),this.toObject=m.toObject(this)({types:t,util:f});var n=_[e];if(n){var i=Object.create(this);i.fromObject=this.fromObject,this.fromObject=n.fromObject.bind(i),i.toObject=this.toObject,this.toObject=n.toObject.bind(i)}return this},g.prototype.encode=function(e,t){return this.setup().encode(e,t)},g.prototype.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},g.prototype.decode=function(e,t){return this.setup().decode(e,t)},g.prototype.decodeDelimited=function(e){return e instanceof l||(e=l.create(e)),this.decode(e,e.uint32())},g.prototype.verify=function(e){return this.setup().verify(e)},g.prototype.fromObject=function(e){return this.setup().fromObject(e)},g.prototype.toObject=function(e,t){return this.setup().toObject(e,t)},g.d=function(e){return function(t){f.decorateType(t,e)}}},7916:function(e,t,r){"use strict";var n=r(6080),i=r(9565),o=r(8981),s=r(6319),a=r(4209),u=r(3517),c=r(6198),l=r(4659),d=r(81),f=r(851),h=Array;e.exports=function(e){var t=o(e),r=u(this),p=arguments.length,v=p>1?arguments[1]:void 0,m=void 0!==v;m&&(v=n(v,p>2?arguments[2]:void 0));var _,g,E,y,O,T,R=f(t),I=0;if(!R||this===h&&a(R))for(_=c(t),g=r?new this(_):h(_);_>I;I++)T=m?v(t[I],I):t[I],l(g,I,T);else for(g=r?new this:[],O=(y=d(t,R)).next;!(E=i(O,y)).done;I++)T=m?s(y,v,[E.value,I],!0):E.value,l(g,I,T);return g.length=I,g}},7968:function(e,t,r){"use strict";r.d(t,{vF:function(){return p}}),r(2675),r(9463),r(2259),r(8706),r(1629),r(5276),r(3792),r(8598),r(4782),r(9089),r(739),r(3288),r(4170),r(2010),r(6099),r(3362),r(7495),r(7764),r(2953),r(6031),r(3296),r(7208),r(8408);var n=r(4494),i=r(4269);function o(e){return o="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},o(e)}var s,a=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function s(e){try{u(n.next(e))}catch(e){o(e)}}function a(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}u((n=n.apply(e,t||[])).next())}))},u=function(e,t){var r,n,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;s;)try{if(r=1,n&&(i=2&o[0]?n.return:o[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,o[1])).done)return i;switch(n=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,n=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],n=0}finally{r=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}},c=function(){},l={};!function(e){e[e.TRACE=0]="TRACE",e[e.DEBUG=1]="DEBUG",e[e.INFO=2]="INFO",e[e.WARN=3]="WARN",e[e.ERROR=4]="ERROR",e[e.SILENT=5]="SILENT"}(s||(s={}));var d=function(){function e(e,t,r){this.name=e||"defaultLogger",this.currentLevel=0,this.useCookiePersist=!1,this.storageLogLevelKey="loglevel",this.levels=s,this.consoleLogVisibility=!0,this.logMethods=["trace","debug","info","warn","error"],this.methodFactory=r||this.defaultMethodFactory,this.report=!1;var n=this._getPersistedLevel();null==n&&(n=null===t?"WARN":t),this.logs=[],this.reportLogs=[],this.reportInterval=3e5,this.timer=null,this.config={useCache:!1,maxCache:3145728,color:"",background:""},this.logBytes=0,this.setLevel(n,!1,"")}return e.prototype.reportLog=function(){var e,t,r;return a(this,void 0,void 0,(function(){var n,o,s,a,c,l,d,f;return u(this,(function(u){switch(u.label){case 0:if(0===(null===(e=this.reportLogs)||void 0===e?void 0:e.length))return[2];for(n=2097152,o=this.reportLogs.join("\n")+"\n",s=o.length,a=[];s>n;)a.push(o.substring(0,n)),s-=n,o=o.substring(n);a.push(o),c=0,l=a,u.label=1;case 1:if(!(c<l.length))return[3,8];if(d=l[c],this.reportLogs=[],!(null===(r=null===(t=this.connection)||void 0===t?void 0:t.context)||void 0===r?void 0:r.accessToken))return[2];u.label=2;case 2:return u.trys.push([2,4,,5]),[4,this.reportData(d)];case 3:return"ok"!==(null==(f=u.sent())?void 0:f.status)&&this.reportLogs.unshift(d),[3,5];case 4:return u.sent(),this.reportLogs.unshift(d),[3,5];case 5:return[4,i.Wp.delay(3e3)];case 6:u.sent(),u.label=7;case 7:return c++,[3,1];case 8:return[2]}}))}))},e.prototype.reportData=function(e){var t,r=this;if(this.connection){var n=this.connection.context||{},o=n.orgName,s=n.appName,a=n.accessToken,u=n.userId;if(o&&s){var c={url:"".concat(null===(t=this.connection)||void 0===t?void 0:t.apiUrl,"/").concat(o,"/").concat(s,"/sdk/users/").concat(u,"/client/logs"),type:"POST",data:JSON.stringify({resource:this.connection.clientResource||"random_".concat(Date.now()),logContent:e}),dataType:"json",headers:{Authorization:"Bearer "+a,"Content-Type":"application/json"}};return i.RD.call(this.connection,c).then((function(e){return r.log("report log success",e),e})).catch((function(e){r.error("report log error",e)}))}}else this.error("report log error","connection is null")},e.prototype._regularlyReportLogs=function(){var e,t=this;this.timer&&clearInterval(this.timer),(null!==(e=this.reportInterval)&&void 0!==e?e:0)<6e4&&(this.reportInterval=6e4),this.timer=setInterval((function(){t.reportLog()}),this.reportInterval||3e5)},e.prototype._stopReportLogs=function(){return a(this,void 0,void 0,(function(){return u(this,(function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),[4,this.reportLog()];case 1:return e.sent(),[3,3];case 2:return e.sent(),this.error("report log error when stopping upload"),[3,3];case 3:return this.reportLogs=[],clearInterval(this.timer),[2]}}))}))},e.prototype.setConfig=function(e){this.config=e},e.prototype.getLevel=function(){return this.currentLevel},e.prototype.setLevel=function(e,t,r){if("string"==typeof e&&(e=s[e]),void 0===e&&(e=0),!("number"==typeof e&&e>=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<s.SILENT)throw Error("No console available for logging")},e.prototype.setDefaultLevel=function(e){this._getPersistedLevel()||this.setLevel(e,!1,"")},e.prototype.enableAll=function(e){this.setLevel(this.levels.TRACE,!0,"")},e.prototype.disableAll=function(e){this.setLevel(this.levels.SILENT,!0,"")},e.prototype.getLogs=function(){return this.logs},e.prototype.download=function(){if("undefined"!=typeof window&&"undefined"!=typeof document){var e=this.getLogs().join("\n"),t=new Blob([e],{type:"text/plain;charset=UTF-8"}),r=window.URL.createObjectURL(t),n=document.createElement("a");n.style.display="none",n.href=r,n.setAttribute("download","sdklog"),document.body.appendChild(n),n.click()}},e.prototype.setConsoleLogVisibility=function(e){this.consoleLogVisibility=e},e.prototype._bindMethod=function(e,t,r){var n=this,i=e[t],o=this.getTime();if(r)return this._cacheLog;if("function"==typeof i.bind)return function(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];var s=n.getTime();n.consoleLogVisibility&&i.call.apply(i,function(e,t,r){if(r||2===arguments.length)for(var n,i=0,o=t.length;i<o;i++)!n&&i in t||(n||(n=Array.prototype.slice.call(t,0,i)),n[i]=t[i]);return e.concat(n||Array.prototype.slice.call(t))}([e,"".concat(s," IM SDK [").concat("log"===t?"debug":t,"]: ")],r,!1)),n.onLog&&n.onLog({time:s,level:"log"===t?"debug":t,logs:r}),n._cacheReportLogs.apply(n,r)};try{return Function.prototype.bind.call(i,e,"".concat(o," IM SDK [").concat("log"===t?"debug":t,"]: "))}catch(t){return function(){return Function.prototype.apply.apply(i,[e,arguments])}}},e.prototype.getTime=function(){var e=new Date;return e.toTimeString().split(" ")[0]+":"+e.getMilliseconds()},e.prototype._cacheLog=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=(new Date).toLocaleString()+": ",n="";e.forEach((function(e){"object"===o(e)?n+=JSON.stringify(e)+" ":n+=e+" "})),this._cacheLogCall(r+n),this._cacheReportLogs.apply(this,e)},e.prototype._cacheLogCall=function(e){var t=e.length,r=this.logBytes+t,n=this.config.maxCache;if(!(t>=n)){if(r<n)this.logBytes+=t;else for(var i=r-n,o=0;o<i;){var s=this.logs.shift();void 0!==s&&(o+=s.length)}this.logs.push(e)}},e.prototype._cacheReportLogs=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(this.report){var r=(new Date).toLocaleString()+": ",n="";e.forEach((function(e){"object"===o(e)?n+=JSON.stringify(e)+" ":n+=e+" "})),this.reportLogs.push(r+n)}},e.prototype._getPersistedLevel=function(){var e;if("undefined"==typeof window)return 5;if("undefined"===(e=window&&window.localStorage&&window.localStorage[this.storageLogLevelKey])){var t=window.document.cookie,r=t.indexOf(encodeURIComponent(this.storageLogLevelKey));-1!==r&&(e=/^([^;]+)/.exec(t.slice(r))[1])}return e||5},e.prototype._persistLevel=function(e){var t=this.logMethods[e]||"SILENT";if("undefined"!=typeof window){if(window.localStorage)try{window.localStorage[this.storageLogLevelKey]=t}catch(e){console.log(e)}this.useCookiePersist&&(window.document.cookie=encodeURIComponent(this.storageLogLevelKey)+"="+t+";")}},e.prototype.replaceLoggingMethods=function(e,t){for(var r=this,n=0;n<this.logMethods.length;n++){var i=this.logMethods[n];this[i]=n<e?function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];r.report&&r._cacheReportLogs.apply(r,e)}:this.methodFactory(i,e,t)}this.log=this.debug},e.prototype.defaultMethodFactory=function(e,t,r){return this.realMethod(e)||this.enableLoggingWhenConsoleArrives.apply(this,[e,t,r])},e.prototype.realMethod=function(e){return"debug"===e&&(e="log"),"undefined"!=typeof console&&("trace"===e&&n.l?n.n:void 0!==console[e]?this._bindMethod(console,e,this.config.useCache):void 0!==console.log?this._bindMethod(console,"log",this.config.useCache):c)},e.prototype.enableLoggingWhenConsoleArrives=function(e,t,r){return function(){"undefined"!=typeof console&&(this.replaceLoggingMethods.call(this,t,r),this[e].apply(this,arguments))}.bind(this)},e}(),f=new d;f.getLogger=function(e){if("string"!=typeof e||""===e)throw new TypeError("You must supply a name when creating a logger.");return this};var h="undefined"!=typeof window?window.log:void 0;f.noConflict=function(){return"undefined"!=typeof window&&window.log===f&&(window.log=h),f},f.getLoggers=function(){return l},f.initReport=function(e){var t=e.report,r=e.reportInterval,n=e.connection;f.report=t,f.reportInterval=r,f.connection=n,t&&f._regularlyReportLogs()};var p=f},7979:function(e,t,r){"use strict";var n=r(8551);e.exports=function(){var e=n(this),t="";return e.hasIndices&&(t+="d"),e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.unicodeSets&&(t+="v"),e.sticky&&(t+="y"),t}},8014:function(e,t,r){"use strict";var n=r(1291),i=Math.min;e.exports=function(e){var t=n(e);return t>0?i(t,9007199254740991):0}},8021:function(e,t,r){"use strict";r(9089),r(3288),r(6099),r(8940),r(8781);var n=r(4706),i=function(){function e(e){e=e||{},this.seq=0,this.mid=(e.mid||1)%1023,this.timeOffset=e.timeOffset||0,this.lastTime=0}return e.prototype.gen=function(){var e=Date.now();if(this.lastTime==e){if(this.seq++,this.seq>4095){for(this.seq=0;Date.now()<=e;);e=Date.now()}}else this.seq=0;this.lastTime=e;for(var t=(e-this.timeOffset).toString(2),r=this.seq.toString(2),i=this.mid.toString(2);r.length<12;)r="0"+r;for(;i.length<10;)i="0"+i;for(var o=t+i+r,s="",a=o.length;a>0;a-=4)s=parseInt(o.substring(a-4,a),2).toString(16)+s;return(0,n.x)(s)},e}();t.A=i},8045:function(e){"use strict";e.exports=function(e,t){for(var r=new Array(arguments.length-1),n=0,i=2,o=!0;i<arguments.length;)r[n++]=arguments[i++];return new Promise((function(i,s){r[n]=function(e){if(o)if(o=!1,e)s(e);else{for(var t=new Array(arguments.length-1),r=0;r<t.length;)t[r++]=arguments[r];i.apply(null,t)}};try{e.apply(t||null,r)}catch(e){o&&(o=!1,s(e))}}))}},8093:function(e,t,r){"use strict";var n;r.d(t,{C:function(){return n}}),function(e){e[e.REQUEST_SUCCESS=0]="REQUEST_SUCCESS",e[e.REQUEST_TIMEOUT=-1]="REQUEST_TIMEOUT",e[e.REQUEST_UNKNOWN=-2]="REQUEST_UNKNOWN",e[e.REQUEST_PARAMETER_ERROR=-3]="REQUEST_PARAMETER_ERROR",e[e.REQUEST_ABORT=-4]="REQUEST_ABORT",e[e.WEBIM_CONNCTION_USER_NOT_ASSIGN_ERROR=0]="WEBIM_CONNCTION_USER_NOT_ASSIGN_ERROR",e[e.WEBIM_CONNCTION_OPEN_ERROR=1]="WEBIM_CONNCTION_OPEN_ERROR",e[e.WEBIM_CONNCTION_AUTH_ERROR=2]="WEBIM_CONNCTION_AUTH_ERROR",e[e.WEBIM_CONNCTION_OPEN_USERGRID_ERROR=3]="WEBIM_CONNCTION_OPEN_USERGRID_ERROR",e[e.WEBIM_CONNCTION_ATTACH_ERROR=4]="WEBIM_CONNCTION_ATTACH_ERROR",e[e.WEBIM_CONNCTION_ATTACH_USERGRID_ERROR=5]="WEBIM_CONNCTION_ATTACH_USERGRID_ERROR",e[e.WEBIM_CONNCTION_REOPEN_ERROR=6]="WEBIM_CONNCTION_REOPEN_ERROR",e[e.WEBIM_CONNCTION_SERVER_CLOSE_ERROR=7]="WEBIM_CONNCTION_SERVER_CLOSE_ERROR",e[e.WEBIM_CONNCTION_SERVER_ERROR=8]="WEBIM_CONNCTION_SERVER_ERROR",e[e.WEBIM_CONNCTION_IQ_ERROR=9]="WEBIM_CONNCTION_IQ_ERROR",e[e.WEBIM_CONNCTION_PING_ERROR=10]="WEBIM_CONNCTION_PING_ERROR",e[e.WEBIM_CONNCTION_NOTIFYVERSION_ERROR=11]="WEBIM_CONNCTION_NOTIFYVERSION_ERROR",e[e.WEBIM_CONNCTION_GETROSTER_ERROR=12]="WEBIM_CONNCTION_GETROSTER_ERROR",e[e.WEBIM_CONNCTION_CROSSDOMAIN_ERROR=13]="WEBIM_CONNCTION_CROSSDOMAIN_ERROR",e[e.WEBIM_CONNCTION_LISTENING_OUTOF_MAXRETRIES=14]="WEBIM_CONNCTION_LISTENING_OUTOF_MAXRETRIES",e[e.WEBIM_CONNCTION_RECEIVEMSG_CONTENTERROR=15]="WEBIM_CONNCTION_RECEIVEMSG_CONTENTERROR",e[e.WEBIM_CONNCTION_DISCONNECTED=16]="WEBIM_CONNCTION_DISCONNECTED",e[e.WEBIM_CONNCTION_AJAX_ERROR=17]="WEBIM_CONNCTION_AJAX_ERROR",e[e.WEBIM_CONNCTION_JOINROOM_ERROR=18]="WEBIM_CONNCTION_JOINROOM_ERROR",e[e.WEBIM_CONNCTION_GETROOM_ERROR=19]="WEBIM_CONNCTION_GETROOM_ERROR",e[e.WEBIM_CONNCTION_GETROOMINFO_ERROR=20]="WEBIM_CONNCTION_GETROOMINFO_ERROR",e[e.WEBIM_CONNCTION_GETROOMMEMBER_ERROR=21]="WEBIM_CONNCTION_GETROOMMEMBER_ERROR",e[e.WEBIM_CONNCTION_GETROOMOCCUPANTS_ERROR=22]="WEBIM_CONNCTION_GETROOMOCCUPANTS_ERROR",e[e.WEBIM_CONNCTION_LOAD_CHATROOM_ERROR=23]="WEBIM_CONNCTION_LOAD_CHATROOM_ERROR",e[e.WEBIM_CONNCTION_NOT_SUPPORT_CHATROOM_ERROR=24]="WEBIM_CONNCTION_NOT_SUPPORT_CHATROOM_ERROR",e[e.WEBIM_CONNCTION_JOINCHATROOM_ERROR=25]="WEBIM_CONNCTION_JOINCHATROOM_ERROR",e[e.WEBIM_CONNCTION_QUITCHATROOM_ERROR=26]="WEBIM_CONNCTION_QUITCHATROOM_ERROR",e[e.WEBIM_CONNCTION_APPKEY_NOT_ASSIGN_ERROR=27]="WEBIM_CONNCTION_APPKEY_NOT_ASSIGN_ERROR",e[e.WEBIM_CONNCTION_TOKEN_NOT_ASSIGN_ERROR=28]="WEBIM_CONNCTION_TOKEN_NOT_ASSIGN_ERROR",e[e.WEBIM_CONNCTION_SESSIONID_NOT_ASSIGN_ERROR=29]="WEBIM_CONNCTION_SESSIONID_NOT_ASSIGN_ERROR",e[e.WEBIM_CONNCTION_RID_NOT_ASSIGN_ERROR=30]="WEBIM_CONNCTION_RID_NOT_ASSIGN_ERROR",e[e.WEBIM_CONNCTION_CALLBACK_INNER_ERROR=31]="WEBIM_CONNCTION_CALLBACK_INNER_ERROR",e[e.WEBIM_CONNCTION_CLIENT_OFFLINE=32]="WEBIM_CONNCTION_CLIENT_OFFLINE",e[e.WEBIM_CONNCTION_CLIENT_LOGOUT=33]="WEBIM_CONNCTION_CLIENT_LOGOUT",e[e.WEBIM_CONNCTION_CLIENT_TOO_MUCH_ERROR=34]="WEBIM_CONNCTION_CLIENT_TOO_MUCH_ERROR",e[e.WEBIM_CONNECTION_ACCEPT_INVITATION_FROM_GROUP=35]="WEBIM_CONNECTION_ACCEPT_INVITATION_FROM_GROUP",e[e.WEBIM_CONNECTION_DECLINE_INVITATION_FROM_GROUP=36]="WEBIM_CONNECTION_DECLINE_INVITATION_FROM_GROUP",e[e.WEBIM_CONNECTION_ACCEPT_JOIN_GROUP=37]="WEBIM_CONNECTION_ACCEPT_JOIN_GROUP",e[e.WEBIM_CONNECTION_DECLINE_JOIN_GROUP=38]="WEBIM_CONNECTION_DECLINE_JOIN_GROUP",e[e.WEBIM_CONNECTION_CLOSED=39]="WEBIM_CONNECTION_CLOSED",e[e.WEBIM_CONNECTION_ERROR=40]="WEBIM_CONNECTION_ERROR",e[e.MAX_LIMIT=50]="MAX_LIMIT",e[e.MESSAGE_NOT_FOUND=51]="MESSAGE_NOT_FOUND",e[e.NO_PERMISSION=52]="NO_PERMISSION",e[e.OPERATION_UNSUPPORTED=53]="OPERATION_UNSUPPORTED",e[e.OPERATION_NOT_ALLOWED=54]="OPERATION_NOT_ALLOWED",e[e.WEBIM_TOKEN_EXPIRED=56]="WEBIM_TOKEN_EXPIRED",e[e.WEBIM_SERVER_SERVING_DISABLED=57]="WEBIM_SERVER_SERVING_DISABLED",e[e.WEBIM_UPLOADFILE_BROWSER_ERROR=100]="WEBIM_UPLOADFILE_BROWSER_ERROR",e[e.WEBIM_UPLOADFILE_ERROR=101]="WEBIM_UPLOADFILE_ERROR",e[e.WEBIM_UPLOADFILE_NO_LOGIN=102]="WEBIM_UPLOADFILE_NO_LOGIN",e[e.WEBIM_UPLOADFILE_NO_FILE=103]="WEBIM_UPLOADFILE_NO_FILE",e[e.WEBIM_DOWNLOADFILE_ERROR=200]="WEBIM_DOWNLOADFILE_ERROR",e[e.WEBIM_DOWNLOADFILE_NO_LOGIN=201]="WEBIM_DOWNLOADFILE_NO_LOGIN",e[e.WEBIM_DOWNLOADFILE_BROWSER_ERROR=202]="WEBIM_DOWNLOADFILE_BROWSER_ERROR",e[e.PARSE_FILE_ERROR=203]="PARSE_FILE_ERROR",e[e.USER_NOT_FOUND=204]="USER_NOT_FOUND",e[e.MESSAGE_PARAMETER_ERROR=205]="MESSAGE_PARAMETER_ERROR",e[e.WEBIM_CONNCTION_USER_LOGIN_ANOTHER_DEVICE=206]="WEBIM_CONNCTION_USER_LOGIN_ANOTHER_DEVICE",e[e.WEBIM_CONNCTION_USER_REMOVED=207]="WEBIM_CONNCTION_USER_REMOVED",e[e.WEBIM_USER_ALREADY_LOGIN=208]="WEBIM_USER_ALREADY_LOGIN",e[e.USER_LOGIN_TOO_MANY_DEVICES=214]="USER_LOGIN_TOO_MANY_DEVICES",e[e.WEBIM_CONNCTION_USER_KICKED_BY_CHANGE_PASSWORD=216]="WEBIM_CONNCTION_USER_KICKED_BY_CHANGE_PASSWORD",e[e.WEBIM_CONNCTION_USER_KICKED_BY_OTHER_DEVICE=217]="WEBIM_CONNCTION_USER_KICKED_BY_OTHER_DEVICE",e[e.USER_MUTED_BY_ADMIN=219]="USER_MUTED_BY_ADMIN",e[e.USER_DEVICE_CHANGED=220]="USER_DEVICE_CHANGED",e[e.USER_NOT_FRIEND=221]="USER_NOT_FRIEND",e[e.WEBIM_DOWNLOADFILE_ERROR_NO_PERMISSION=222]="WEBIM_DOWNLOADFILE_ERROR_NO_PERMISSION",e[e.WEBIM_DOWNLOADFILE_ERROR_EXPIRED=223]="WEBIM_DOWNLOADFILE_ERROR_EXPIRED",e[e.WEBIM_MESSAGE_REC_TEXT=300]="WEBIM_MESSAGE_REC_TEXT",e[e.WEBIM_MESSAGE_REC_TEXT_ERROR=301]="WEBIM_MESSAGE_REC_TEXT_ERROR",e[e.WEBIM_MESSAGE_REC_EMOTION=302]="WEBIM_MESSAGE_REC_EMOTION",e[e.WEBIM_MESSAGE_REC_PHOTO=303]="WEBIM_MESSAGE_REC_PHOTO",e[e.SERVER_GET_DNSLIST_FAILED=304]="SERVER_GET_DNSLIST_FAILED",e[e.WEBIM_MESSAGE_REC_AUDIO_FILE=305]="WEBIM_MESSAGE_REC_AUDIO_FILE",e[e.WEBIM_MESSAGE_REC_VEDIO=306]="WEBIM_MESSAGE_REC_VEDIO",e[e.WEBIM_MESSAGE_REC_VEDIO_FILE=307]="WEBIM_MESSAGE_REC_VEDIO_FILE",e[e.WEBIM_MESSAGE_REC_FILE=308]="WEBIM_MESSAGE_REC_FILE",e[e.WEBIM_MESSAGE_SED_TEXT=309]="WEBIM_MESSAGE_SED_TEXT",e[e.WEBIM_MESSAGE_SED_EMOTION=310]="WEBIM_MESSAGE_SED_EMOTION",e[e.WEBIM_MESSAGE_SED_PHOTO=311]="WEBIM_MESSAGE_SED_PHOTO",e[e.WEBIM_MESSAGE_SED_AUDIO=312]="WEBIM_MESSAGE_SED_AUDIO",e[e.WEBIM_MESSAGE_SED_AUDIO_FILE=313]="WEBIM_MESSAGE_SED_AUDIO_FILE",e[e.WEBIM_MESSAGE_SED_VEDIO=314]="WEBIM_MESSAGE_SED_VEDIO",e[e.WEBIM_MESSAGE_SED_VEDIO_FILE=315]="WEBIM_MESSAGE_SED_VEDIO_FILE",e[e.WEBIM_MESSAGE_SED_FILE=316]="WEBIM_MESSAGE_SED_FILE",e[e.WEBIM_MESSAGE_SED_ERROR=317]="WEBIM_MESSAGE_SED_ERROR",e[e.STATUS_INIT=400]="STATUS_INIT",e[e.STATUS_DOLOGIN_USERGRID=401]="STATUS_DOLOGIN_USERGRID",e[e.STATUS_DOLOGIN_IM=402]="STATUS_DOLOGIN_IM",e[e.STATUS_OPENED=403]="STATUS_OPENED",e[e.STATUS_CLOSING=404]="STATUS_CLOSING",e[e.STATUS_CLOSED=405]="STATUS_CLOSED",e[e.STATUS_ERROR=406]="STATUS_ERROR",e[e.FILE_INVALID=407]="FILE_INVALID",e[e.FILE_DURATION_TOO_LONG=408]="FILE_DURATION_TOO_LONG",e[e.FILE_VOICE_TO_TEXT_FAILED=409]="FILE_VOICE_TO_TEXT_FAILED",e[e.FILE_NOT_FOUND=410]="FILE_NOT_FOUND",e[e.FILE_TOO_LARGE=411]="FILE_TOO_LARGE",e[e.SERVER_BUSY=500]="SERVER_BUSY",e[e.MESSAGE_INCLUDE_ILLEGAL_CONTENT=501]="MESSAGE_INCLUDE_ILLEGAL_CONTENT",e[e.MESSAGE_EXTERNAL_LOGIC_BLOCKED=502]="MESSAGE_EXTERNAL_LOGIC_BLOCKED",e[e.SERVER_UNKNOWN_ERROR=503]="SERVER_UNKNOWN_ERROR",e[e.MESSAGE_RECALL_TIME_LIMIT=504]="MESSAGE_RECALL_TIME_LIMIT",e[e.SERVICE_NOT_ENABLED=505]="SERVICE_NOT_ENABLED",e[e.SERVICE_NOT_ALLOW_MESSAGING=506]="SERVICE_NOT_ALLOW_MESSAGING",e[e.SERVICE_NOT_ALLOW_MESSAGING_MUTE=507]="SERVICE_NOT_ALLOW_MESSAGING_MUTE",e[e.MESSAGE_MODERATION_BLOCKED=508]="MESSAGE_MODERATION_BLOCKED",e[e.MESSAGE_CURRENT_LIMITING=509]="MESSAGE_CURRENT_LIMITING",e[e.MESSAGE_WEBSOCKET_DISCONNECTED=510]="MESSAGE_WEBSOCKET_DISCONNECTED",e[e.MESSAGE_SIZE_LIMIT=511]="MESSAGE_SIZE_LIMIT",e[e.MESSAGE_SEND_TIMEOUT=512]="MESSAGE_SEND_TIMEOUT",e[e.MESSAGE_STREAM_INTERVAL_TIMEOUT=513]="MESSAGE_STREAM_INTERVAL_TIMEOUT",e[e.MESSAGE_STREAM_TIMEOUT=514]="MESSAGE_STREAM_TIMEOUT",e[e.GROUP_NOT_EXIST=605]="GROUP_NOT_EXIST",e[e.GROUP_NOT_JOINED=602]="GROUP_NOT_JOINED",e[e.GROUP_MEMBERS_FULL=606]="GROUP_MEMBERS_FULL",e[e.PERMISSION_DENIED=603]="PERMISSION_DENIED",e[e.WEBIM_LOAD_MSG_ERROR=604]="WEBIM_LOAD_MSG_ERROR",e[e.GROUP_ALREADY_JOINED=601]="GROUP_ALREADY_JOINED",e[e.GROUP_MEMBERS_LIMIT=607]="GROUP_MEMBERS_LIMIT",e[e.GROUP_IS_DISABLED=608]="GROUP_IS_DISABLED",e[e.GROUP_MEMBER_ATTRIBUTES_SET_FAILED=609]="GROUP_MEMBER_ATTRIBUTES_SET_FAILED",e[e.REST_PARAMS_STATUS=700]="REST_PARAMS_STATUS",e[e.CHATROOM_NOT_JOINED=702]="CHATROOM_NOT_JOINED",e[e.CHATROOM_MEMBERS_FULL=704]="CHATROOM_MEMBERS_FULL",e[e.CHATROOM_NOT_EXIST=705]="CHATROOM_NOT_EXIST",e[e.LOCAL_DB_OPERATION_FAILED=800]="LOCAL_DB_OPERATION_FAILED",e[e.SDK_RUNTIME_ERROR=999]="SDK_RUNTIME_ERROR",e[e.PRESENCE_PARAM_EXCEED=1100]="PRESENCE_PARAM_EXCEED",e[e.REACTION_ALREADY_ADDED=1101]="REACTION_ALREADY_ADDED",e[e.REACTION_CREATING=1102]="REACTION_CREATING",e[e.REACTION_OPERATION_IS_ILLEGAL=1103]="REACTION_OPERATION_IS_ILLEGAL",e[e.TRANSLATION_NOT_VALID=1200]="TRANSLATION_NOT_VALID",e[e.TRANSLATION_TEXT_TOO_LONG=1201]="TRANSLATION_TEXT_TOO_LONG",e[e.TRANSLATION_FAILED=1204]="TRANSLATION_FAILED",e[e.THREAD_NOT_EXIST=1300]="THREAD_NOT_EXIST",e[e.THREAD_ALREADY_EXIST=1301]="THREAD_ALREADY_EXIST",e[e.MODIFY_MESSAGE_NOT_EXIST=1302]="MODIFY_MESSAGE_NOT_EXIST",e[e.MODIFY_MESSAGE_FORMAT_ERROR=1303]="MODIFY_MESSAGE_FORMAT_ERROR",e[e.MODIFY_MESSAGE_FAILED=1304]="MODIFY_MESSAGE_FAILED",e[e.CONVERSATION_NOT_EXIST=1400]="CONVERSATION_NOT_EXIST"}(n||(n={}))},8183:function(e,t,r){"use strict";var n=r(9504),i=r(1291),o=r(655),s=r(7750),a=n("".charAt),u=n("".charCodeAt),c=n("".slice),l=function(e){return function(t,r){var n,l,d=o(s(t)),f=i(r),h=d.length;return f<0||f>=h?e?"":void 0:(n=u(d,f))<55296||n>56319||f+1===h||(l=u(d,f+1))<56320||l>57343?e?a(d,f):n:e?c(d,f,f+2):l-56320+(n-55296<<10)+65536}};e.exports={codeAt:l(!1),charAt:l(!0)}},8211:function(e,t,r){"use strict";r.d(t,{h:function(){return l},p:function(){return c}}),r(5276),r(2062),r(9085),r(6099);var n=r(7968),i=r(8579),o=r(4269),s=r(666),a=r(8093),u=function(){return u=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},u.apply(this,arguments)},c={chat:"singleChat",chatroom:"chatRoom",groupchat:"groupChat",singleChat:"singleChat",chatRoom:"chatRoom",groupChat:"groupChat"};function l(e,t){var r,l,d,f=t||{},h=f.formatCustomExts,p=void 0===h||h,v=f.formatChatType,m=void 0!==v&&v,_=e.id,g=e.payload,E=e.timestamp,y=e.to,O=g.bodies&&g.bodies.length>0?g.bodies[0]:{},T={},R={},I=g.type?g.type:y.indexOf("@conference.easemob.com")>-1?"groupChat":"singleChat";I="chat"===I?"singleChat":I,m&&g.type&&(I=c[g.type]);var S="";switch(O.type){case"txt":if(Object.prototype.hasOwnProperty.call(O,"subType")&&"sub_combine"===O.subType)S=i.zK.call(this,{remotePath:null==O?void 0:O.url,secret:null==O?void 0:O.secret}),T={id:_,type:"combine",chatType:I,to:g.to,from:g.from,ext:g.ext,time:E,title:O.title||"",summary:O.summary||"",url:S||"",secret:O.secret||"",file_length:O.file_length||0,filename:O.filename||"",compatibleText:O.msg,combineLevel:O.combineLevel||0};else if(T={id:_,type:"txt",chatType:I,msg:O.msg||"",to:g.to||"",from:g.from,time:E,ext:g.ext},Object.prototype.hasOwnProperty.call(O,"subType")&&"sub_stream"===O.subType&&g.stream){var C=0;switch(g.stream.stream_status){case"stream_start":C=s.J.START;break;case"stream_start_completed":C=s.J.START_AND_COMPLETED;break;case"stream_in_progress":C=s.J.IN_PROGRESS;break;case"stream_completed":case"stream_full":C=s.J.COMPLETED;break;default:C=0}var b=0;512===g.stream.stream_error?b=a.C.MESSAGE_STREAM_INTERVAL_TIMEOUT:513===g.stream.stream_error&&(b=a.C.MESSAGE_STREAM_TIMEOUT),T.stream={customType:g.stream.stream_type,status:C,errorType:b,text:O.msg,finishReason:g.stream.stream_finish_reason}}break;case"img":S=this.useOwnUploadFun?null==O?void 0:O.url:i.zK.call(this,{remotePath:null==O?void 0:O.url,secret:null==O?void 0:O.secret}),T={id:_,type:"img",chatType:I,to:g.to,from:g.from,time:E,ext:g.ext,width:(null===(r=O.size)||void 0===r?void 0:r.width)||0,height:(null===(l=O.size)||void 0===l?void 0:l.height)||0,thumb:this.useOwnUploadFun?"":"".concat(S,"&thumbnail=true"),thumb_secret:O.secret,secret:O.secret||"",url:S||"",file_length:O.file_length||0,file:{},isGif:"sub_gif"===O.subType};break;case"video":S=this.useOwnUploadFun?null==O?void 0:O.url:i.zK.call(this,{remotePath:null==O?void 0:O.url,secret:null==O?void 0:O.secret}),T={id:_,type:"video",chatType:I,from:g.from,to:g.to,thumb:o.Wp.formatAttachUrl.call(this,O.thumb),thumb_secret:O.thumb_secret||"",url:S||"",secret:O.secret||"",filename:O.filename,length:O.length||0,file:{},file_length:O.file_length||0,filetype:g.ext.file_type||"",ext:g.ext,time:E};break;case"loc":T={id:_,type:"loc",chatType:I,from:g.from,to:g.to,buildingName:O.buildingName||"",addr:O.addr,lat:O.lat,lng:O.lng,ext:g.ext,time:E};break;case"audio":S=this.useOwnUploadFun?null==O?void 0:O.url:i.zK.call(this,{remotePath:null==O?void 0:O.url,secret:null==O?void 0:O.secret}),T={id:_,type:"audio",chatType:I,from:g.from,to:g.to,secret:O.secret||"",ext:g.ext,time:E,url:S||"",file:{},filename:O.filename,length:O.length||0,file_length:O.file_length||0,filetype:g.ext.file_type||""};break;case"file":S=this.useOwnUploadFun?null==O?void 0:O.url:i.zK.call(this,{remotePath:null==O?void 0:O.url,secret:null==O?void 0:O.secret}),T={id:_,type:"file",chatType:I,from:g.from,to:g.to,ext:g.ext,time:E,url:S||"",secret:O.secret||"",file:{},filename:O.filename||"",file_length:O.file_length||0,filetype:g.ext.file_type||""};break;case"cmd":T={id:_,type:"cmd",chatType:I,from:g.from,to:g.to,ext:g.ext,time:E,action:O.action||""};break;case"custom":var N=O.customExts||{};p&&O.customExts&&(N={},O.customExts.map((function(e){N=u(u({},N),e)}))),T={id:_,type:"custom",chatType:I,from:g.from,to:g.to,ext:g.ext,time:E,customEvent:O.customEvent||"",customExts:N};break;case"combine":S=i.zK.call(this,{remotePath:null==O?void 0:O.url,secret:null==O?void 0:O.secret}),T={id:_,type:"combine",chatType:I,msg:O.msg||"",to:g.to||"",from:g.from,time:E,ext:g.ext,title:O.title||"",summary:O.summary||"",url:S||"",compatibleText:O.text,combineLevel:O.combineLevel||0,secret:O.secret||"",filename:O.filename||"",file_length:O.file_length||0};break;default:n.vF.error("unexpected message: ".concat(e))}if(g.msgConfig&&(R.msgConfig=g.msgConfig),null==g?void 0:g.meta){var A=g.meta;A.thread&&(R.chatThread={messageId:A.thread.msg_parent_id,parentId:A.thread.muc_parent_id,chatThreadName:A.thread.thread_name}),A.reaction&&(R.reactions=A.reaction),A.translations&&(R.translations=A.translations)}var M=null===(d=null==g?void 0:g.meta)||void 0===d?void 0:d.edit_msg;if(M){var w=M.edit_time,L=M.operator,U=M.count;T.modifiedInfo={operationTime:w,operatorId:L,operationCount:U}}return u(u({},T),R)}},8227:function(e,t,r){"use strict";var n=r(4576),i=r(5745),o=r(9297),s=r(3392),a=r(4495),u=r(7040),c=n.Symbol,l=i("wks"),d=u?c.for||c:c&&c.withoutSetter||s;e.exports=function(e){return o(l,e)||(l[e]=a&&o(c,e)?c[e]:d("Symbol."+e)),l[e]}},8229:function(e,t,r){"use strict";var n=r(9590),i=RangeError;e.exports=function(e,t){var r=n(e);if(r%t)throw new i("Wrong offset");return r}},8242:function(e,t,r){"use strict";var n=r(9565),i=r(7751),o=r(8227),s=r(6840);e.exports=function(){var e=i("Symbol"),t=e&&e.prototype,r=t&&t.valueOf,a=o("toPrimitive");t&&!t[a]&&s(t,a,(function(e){return n(r,this)}),{arity:1})}},8252:function(e,t,r){"use strict";e.exports=s;var n=r(1344);((s.prototype=Object.create(n.prototype)).constructor=s).className="MapField";var i=r(361),o=r(3262);function s(e,t,r,i,s,a){if(n.call(this,e,t,i,void 0,void 0,s,a),!o.isString(r))throw TypeError("keyType must be a string");this.keyType=r,this.resolvedKeyType=null,this.map=!0}s.fromJSON=function(e,t){return new s(e,t.id,t.keyType,t.type,t.options,t.comment)},s.prototype.toJSON=function(e){var t=!!e&&Boolean(e.keepComments);return o.toObject(["keyType",this.keyType,"type",this.type,"id",this.id,"extend",this.extend,"options",this.options,"comment",t?this.comment:void 0])},s.prototype.resolve=function(){if(this.resolved)return this;if(void 0===i.mapKey[this.keyType])throw Error("invalid key type: "+this.keyType);return n.prototype.resolve.call(this)},s.d=function(e,t,r){return"function"==typeof r?r=o.decorateType(r).name:r&&"object"==typeof r&&(r=o.decorateEnum(r).name),function(n,i){o.decorateType(n.constructor).add(new s(i,e,t,r))}}},8265:function(e){"use strict";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},8288:function(e,t,r){"use strict";r.d(t,{El:function(){return i},UJ:function(){return n},Z2:function(){return a},aI:function(){return s},tz:function(){return o}});var n=4,i=5242880,o=5242880,s={size:0},a={singleChat:"CHAT",groupChat:"GROUP",chatRoom:"ROOM"}},8307:function(e,t,r){"use strict";r.d(t,{z:function(){return i}}),r(9089);var n=r(4269),i=function(){function e(e){var t=e.type,r=e.id;this.id=r||n.Wp.getUniqueId(),this.type=t}return e.prototype.set=function(e){this.body={id:this.id,chatType:e.chatType||"singleChat",type:"cmd",to:e.to,action:e.action,from:e.from,roomType:e.roomType,success:e.success,fail:e.fail,ext:e.ext,time:Date.now()}},e.prototype.setChatType=function(e){return!!this.body&&(this.body.chatType=e,!0)},e.prototype.setGroup=function(e){return!!this.body&&(this.body.group=e,!0)},e.create=function(e){return{id:n.Wp.getUniqueId(),type:"cmd",to:e.to,from:e.from||"",chatType:e.chatType||"singleChat",action:e.action,time:Date.now(),ext:e.ext,msgConfig:e.msgConfig,isChatThread:e.isChatThread,priority:e.priority,deliverOnlineOnly:e.deliverOnlineOnly,receiverList:e.receiverList,webhookEnv:e.webhookEnv}},e}()},8309:function(e,t,r){"use strict";r(4359)},8319:function(e){"use strict";var t=Math.round;e.exports=function(e){var r=t(e);return r<0?0:r>255?255:255&r}},8345:function(e,t,r){"use strict";var n=r(2805);(0,r(4644).exportTypedArrayStaticMethod)("from",r(3251),n)},8379:function(e,t,r){"use strict";var n=r(8745),i=r(5397),o=r(1291),s=r(6198),a=r(4598),u=Math.min,c=[].lastIndexOf,l=!!c&&1/[1].lastIndexOf(1,-0)<0,d=a("lastIndexOf"),f=l||!d;e.exports=f?function(e){if(l)return n(c,this,arguments)||0;var t=i(this),r=s(t);if(0===r)return-1;var a=r-1;for(arguments.length>1&&(a=u(a,o(arguments[1]))),a<0&&(a=r+a);a>=0;a--)if(a in t&&t[a]===e)return a||0;return-1}:c},8406:function(e,t,r){"use strict";r(3792),r(7337);var n=r(6518),i=r(4576),o=r(3389),s=r(7751),a=r(9565),u=r(9504),c=r(3724),l=r(7416),d=r(6840),f=r(2106),h=r(6279),p=r(687),v=r(3994),m=r(1181),_=r(679),g=r(4901),E=r(9297),y=r(6080),O=r(6955),T=r(8551),R=r(34),I=r(655),S=r(2360),C=r(6980),b=r(81),N=r(851),A=r(2529),M=r(2812),w=r(8227),L=r(4488),U=w("iterator"),x="URLSearchParams",D=x+"Iterator",P=m.set,k=m.getterFor(x),F=m.getterFor(D),H=o("fetch"),B=o("Request"),G=o("Headers"),W=B&&B.prototype,j=G&&G.prototype,q=i.TypeError,K=i.encodeURIComponent,z=String.fromCharCode,V=s("String","fromCodePoint"),J=parseInt,Y=u("".charAt),X=u([].join),Q=u([].push),$=u("".replace),Z=u([].shift),ee=u([].splice),te=u("".split),re=u("".slice),ne=u(/./.exec),ie=/\+/g,oe=/^[0-9a-f]+$/i,se=function(e,t){var r=re(e,t,t+2);return ne(oe,r)?J(r,16):NaN},ae=function(e){for(var t=0,r=128;r>0&&0!==(e&r);r>>=1)t++;return t},ue=function(e){var t=null;switch(e.length){case 1:t=e[0];break;case 2:t=(31&e[0])<<6|63&e[1];break;case 3:t=(15&e[0])<<12|(63&e[1])<<6|63&e[2];break;case 4:t=(7&e[0])<<18|(63&e[1])<<12|(63&e[2])<<6|63&e[3]}return t>1114111?null:t},ce=function(e){for(var t=(e=$(e,ie," ")).length,r="",n=0;n<t;){var i=Y(e,n);if("%"===i){if("%"===Y(e,n+1)||n+3>t){r+="%",n++;continue}var o=se(e,n+1);if(o!=o){r+=i,n++;continue}n+=2;var s=ae(o);if(0===s)i=z(o);else{if(1===s||s>4){r+="�",n++;continue}for(var a=[o],u=1;u<s&&!(3+ ++n>t||"%"!==Y(e,n));){var c=se(e,n+1);if(c!=c){n+=3;break}if(c>191||c<128)break;Q(a,c),n+=2,u++}if(a.length!==s){r+="�";continue}var l=ue(a);null===l?r+="�":i=V(l)}}r+=i,n++}return r},le=/[!'()~]|%20/g,de={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},fe=function(e){return de[e]},he=function(e){return $(K(e),le,fe)},pe=v((function(e,t){P(this,{type:D,target:k(e).entries,index:0,kind:t})}),x,(function(){var e=F(this),t=e.target,r=e.index++;if(!t||r>=t.length)return e.target=null,A(void 0,!0);var n=t[r];switch(e.kind){case"keys":return A(n.key,!1);case"values":return A(n.value,!1)}return A([n.key,n.value],!1)}),!0),ve=function(e){this.entries=[],this.url=null,void 0!==e&&(R(e)?this.parseObject(e):this.parseQuery("string"==typeof e?"?"===Y(e,0)?re(e,1):e:I(e)))};ve.prototype={type:x,bindURL:function(e){this.url=e,this.update()},parseObject:function(e){var t,r,n,i,o,s,u,c=this.entries,l=N(e);if(l)for(r=(t=b(e,l)).next;!(n=a(r,t)).done;){if(o=(i=b(T(n.value))).next,(s=a(o,i)).done||(u=a(o,i)).done||!a(o,i).done)throw new q("Expected sequence with length 2");Q(c,{key:I(s.value),value:I(u.value)})}else for(var d in e)E(e,d)&&Q(c,{key:d,value:I(e[d])})},parseQuery:function(e){if(e)for(var t,r,n=this.entries,i=te(e,"&"),o=0;o<i.length;)(t=i[o++]).length&&(r=te(t,"="),Q(n,{key:ce(Z(r)),value:ce(X(r,"="))}))},serialize:function(){for(var e,t=this.entries,r=[],n=0;n<t.length;)e=t[n++],Q(r,he(e.key)+"="+he(e.value));return X(r,"&")},update:function(){this.entries.length=0,this.parseQuery(this.url.query)},updateURL:function(){this.url&&this.url.update()}};var me=function(){_(this,_e);var e=P(this,new ve(arguments.length>0?arguments[0]:void 0));c||(this.size=e.entries.length)},_e=me.prototype;if(h(_e,{append:function(e,t){var r=k(this);M(arguments.length,2),Q(r.entries,{key:I(e),value:I(t)}),c||this.length++,r.updateURL()},delete:function(e){for(var t=k(this),r=M(arguments.length,1),n=t.entries,i=I(e),o=r<2?void 0:arguments[1],s=void 0===o?o:I(o),a=0;a<n.length;){var u=n[a];if(u.key!==i||void 0!==s&&u.value!==s)a++;else if(ee(n,a,1),void 0!==s)break}c||(this.size=n.length),t.updateURL()},get:function(e){var t=k(this).entries;M(arguments.length,1);for(var r=I(e),n=0;n<t.length;n++)if(t[n].key===r)return t[n].value;return null},getAll:function(e){var t=k(this).entries;M(arguments.length,1);for(var r=I(e),n=[],i=0;i<t.length;i++)t[i].key===r&&Q(n,t[i].value);return n},has:function(e){for(var t=k(this).entries,r=M(arguments.length,1),n=I(e),i=r<2?void 0:arguments[1],o=void 0===i?i:I(i),s=0;s<t.length;){var a=t[s++];if(a.key===n&&(void 0===o||a.value===o))return!0}return!1},set:function(e,t){var r=k(this);M(arguments.length,1);for(var n,i=r.entries,o=!1,s=I(e),a=I(t),u=0;u<i.length;u++)(n=i[u]).key===s&&(o?ee(i,u--,1):(o=!0,n.value=a));o||Q(i,{key:s,value:a}),c||(this.size=i.length),r.updateURL()},sort:function(){var e=k(this);L(e.entries,(function(e,t){return e.key>t.key?1:-1})),e.updateURL()},forEach:function(e){for(var t,r=k(this).entries,n=y(e,arguments.length>1?arguments[1]:void 0),i=0;i<r.length;)n((t=r[i++]).value,t.key,this)},keys:function(){return new pe(this,"keys")},values:function(){return new pe(this,"values")},entries:function(){return new pe(this,"entries")}},{enumerable:!0}),d(_e,U,_e.entries,{name:"entries"}),d(_e,"toString",(function(){return k(this).serialize()}),{enumerable:!0}),c&&f(_e,"size",{get:function(){return k(this).entries.length},configurable:!0,enumerable:!0}),p(me,x),n({global:!0,constructor:!0,forced:!l},{URLSearchParams:me}),!l&&g(G)){var ge=u(j.has),Ee=u(j.set),ye=function(e){if(R(e)){var t,r=e.body;if(O(r)===x)return t=e.headers?new G(e.headers):new G,ge(t,"content-type")||Ee(t,"content-type","application/x-www-form-urlencoded;charset=UTF-8"),S(e,{body:C(0,I(r)),headers:C(0,t)})}return e};if(g(H)&&n({global:!0,enumerable:!0,dontCallGetSet:!0,forced:!0},{fetch:function(e){return H(e,arguments.length>1?ye(arguments[1]):{})}}),g(B)){var Oe=function(e){return _(this,W),new B(e,arguments.length>1?ye(arguments[1]):{})};W.constructor=Oe,Oe.prototype=W,n({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:Oe})}}e.exports={URLSearchParams:me,getState:k}},8408:function(e,t,r){"use strict";r(8406)},8429:function(e,t,r){"use strict";var n=r(9039),i=r(4576).RegExp,o=n((function(){var e=i("a","y");return e.lastIndex=2,null!==e.exec("abcd")})),s=o||n((function(){return!i("a","y").sticky})),a=o||n((function(){var e=i("^r","gy");return e.lastIndex=2,null!==e.exec("str")}));e.exports={BROKEN_CARET:a,MISSED_STICKY:s,UNSUPPORTED_Y:o}},8480:function(e,t,r){"use strict";var n=r(1828),i=r(8727).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return n(e,i)}},8490:function(e){"use strict";var t=Array,r=Math.abs,n=Math.pow,i=Math.floor,o=Math.log,s=Math.LN2;e.exports={pack:function(e,a,u){var c,l,d,f=t(u),h=8*u-a-1,p=(1<<h)-1,v=p>>1,m=23===a?n(2,-24)-n(2,-77):0,_=e<0||0===e&&1/e<0?1:0,g=0;for((e=r(e))!=e||e===1/0?(l=e!=e?1:0,c=p):(c=i(o(e)/s),e*(d=n(2,-c))<1&&(c--,d*=2),(e+=c+v>=1?m/d:m*n(2,1-v))*d>=2&&(c++,d/=2),c+v>=p?(l=0,c=p):c+v>=1?(l=(e*d-1)*n(2,a),c+=v):(l=e*n(2,v-1)*n(2,a),c=0));a>=8;)f[g++]=255&l,l/=256,a-=8;for(c=c<<a|l,h+=a;h>0;)f[g++]=255&c,c/=256,h-=8;return f[g-1]|=128*_,f},unpack:function(e,t){var r,i=e.length,o=8*i-t-1,s=(1<<o)-1,a=s>>1,u=o-7,c=i-1,l=e[c--],d=127&l;for(l>>=7;u>0;)d=256*d+e[c--],u-=8;for(r=d&(1<<-u)-1,d>>=-u,u+=t;u>0;)r=256*r+e[c--],u-=8;if(0===d)d=1-a;else{if(d===s)return r?NaN:l?-1/0:1/0;r+=n(2,t),d-=a}return(l?-1:1)*r*n(2,d-t)}}},8523:function(e,t,r){"use strict";r(6468)("Map",(function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}}),r(6938))},8551:function(e,t,r){"use strict";var n=r(34),i=String,o=TypeError;e.exports=function(e){if(n(e))return e;throw new o(i(e)+" is not an object")}},8561:function(e){"use strict";function t(e,r){"string"==typeof e&&(r=e,e=void 0);var n=[];function i(e){if("string"!=typeof e){var r=o();if(t.verbose&&console.log("codegen: "+r),r="return "+r,e){for(var s=Object.keys(e),a=new Array(s.length+1),u=new Array(s.length),c=0;c<s.length;)a[c]=s[c],u[c]=e[s[c++]];return a[c]=r,Function.apply(null,a).apply(null,u)}return Function(r)()}for(var l=new Array(arguments.length-1),d=0;d<l.length;)l[d]=arguments[++d];if(d=0,e=e.replace(/%([%dfijs])/g,(function(e,t){var r=l[d++];switch(t){case"d":case"f":return String(Number(r));case"i":return String(Math.floor(r));case"j":return JSON.stringify(r);case"s":return String(r)}return"%"})),d!==l.length)throw Error("parameter count mismatch");return n.push(e),i}function o(t){return"function "+(t||r||"")+"("+(e&&e.join(",")||"")+"){\n "+n.join("\n ")+"\n}"}return i.toString=o,i}e.exports=t,t.verbose=!1},8570: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 i={},o={};function s(e,t){var r,n,s;return t?(s=0<=(e>>>=0)&&e<256)&&(n=o[e])?n:(r=u(e,(0|e)<0?-1:0,!0),s&&(o[e]=r),r):(s=-128<=(e|=0)&&e<128)&&(n=i[e])?n:(r=u(e,e<0?-1:0,!1),s&&(i[e]=r),r)}function a(e,t){if(isNaN(e))return t?_:m;if(t){if(e<0)return _;if(e>=h)return T}else{if(e<=-p)return R;if(e+1>=p)return O}return e<0?a(-e,t).neg():u(e%f|0,e/f|0,t)}function u(e,t,n){return new r(e,t,n)}r.fromInt=s,r.fromNumber=a,r.fromBits=u;var c=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 m;if("number"==typeof t?(r=t,t=!1):t=!!t,(r=r||10)<2||36<r)throw RangeError("radix");var n;if((n=e.indexOf("-"))>0)throw Error("interior hyphen");if(0===n)return l(e.substring(1),t,r).neg();for(var i=a(c(r,8)),o=m,s=0;s<e.length;s+=8){var u=Math.min(8,e.length-s),d=parseInt(e.substring(s,s+u),r);if(u<8){var f=a(c(r,u));o=o.mul(f).add(a(d))}else o=(o=o.mul(i)).add(a(d))}return o.unsigned=t,o}function d(e,t){return"number"==typeof e?a(e,t):"string"==typeof e?l(e,t):u(e.low,e.high,"boolean"==typeof t?t:e.unsigned)}r.fromString=l,r.fromValue=d;var f=4294967296,h=f*f,p=h/2,v=s(1<<24),m=s(0);r.ZERO=m;var _=s(0,!0);r.UZERO=_;var g=s(1);r.ONE=g;var E=s(1,!0);r.UONE=E;var y=s(-1);r.NEG_ONE=y;var O=u(-1,2147483647,!1);r.MAX_VALUE=O;var T=u(-1,-1,!0);r.MAX_UNSIGNED_VALUE=T;var R=u(0,-2147483648,!1);r.MIN_VALUE=R;var I=r.prototype;I.toInt=function(){return this.unsigned?this.low>>>0:this.low},I.toNumber=function(){return this.unsigned?(this.high>>>0)*f+(this.low>>>0):this.high*f+(this.low>>>0)},I.toString=function(e){if((e=e||10)<2||36<e)throw RangeError("radix");if(this.isZero())return"0";if(this.isNegative()){if(this.eq(R)){var t=a(e),r=this.div(t),n=r.mul(t).sub(this);return r.toString(e)+n.toInt().toString(e)}return"-"+this.neg().toString(e)}for(var i=a(c(e,6),this.unsigned),o=this,s="";;){var u=o.div(i),l=(o.sub(u.mul(i)).toInt()>>>0).toString(e);if((o=u).isZero())return l+s;for(;l.length<6;)l="0"+l;s=""+l+s}},I.getHighBits=function(){return this.high},I.getHighBitsUnsigned=function(){return this.high>>>0},I.getLowBits=function(){return this.low},I.getLowBitsUnsigned=function(){return this.low>>>0},I.getNumBitsAbs=function(){if(this.isNegative())return this.eq(R)?64:this.neg().getNumBitsAbs();for(var e=0!=this.high?this.high:this.low,t=31;t>0&&!(e&1<<t);t--);return 0!=this.high?t+33:t+1},I.isZero=function(){return 0===this.high&&0===this.low},I.eqz=I.isZero,I.isNegative=function(){return!this.unsigned&&this.high<0},I.isPositive=function(){return this.unsigned||this.high>=0},I.isOdd=function(){return!(1&~this.low)},I.isEven=function(){return!(1&this.low)},I.equals=function(e){return n(e)||(e=d(e)),(this.unsigned===e.unsigned||this.high>>>31!=1||e.high>>>31!=1)&&this.high===e.high&&this.low===e.low},I.eq=I.equals,I.notEquals=function(e){return!this.eq(e)},I.neq=I.notEquals,I.ne=I.notEquals,I.lessThan=function(e){return this.comp(e)<0},I.lt=I.lessThan,I.lessThanOrEqual=function(e){return this.comp(e)<=0},I.lte=I.lessThanOrEqual,I.le=I.lessThanOrEqual,I.greaterThan=function(e){return this.comp(e)>0},I.gt=I.greaterThan,I.greaterThanOrEqual=function(e){return this.comp(e)>=0},I.gte=I.greaterThanOrEqual,I.ge=I.greaterThanOrEqual,I.compare=function(e){if(n(e)||(e=d(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},I.comp=I.compare,I.negate=function(){return!this.unsigned&&this.eq(R)?R:this.not().add(g)},I.neg=I.negate,I.add=function(e){n(e)||(e=d(e));var t=this.high>>>16,r=65535&this.high,i=this.low>>>16,o=65535&this.low,s=e.high>>>16,a=65535&e.high,c=e.low>>>16,l=0,f=0,h=0,p=0;return h+=(p+=o+(65535&e.low))>>>16,f+=(h+=i+c)>>>16,l+=(f+=r+a)>>>16,l+=t+s,u((h&=65535)<<16|(p&=65535),(l&=65535)<<16|(f&=65535),this.unsigned)},I.subtract=function(e){return n(e)||(e=d(e)),this.add(e.neg())},I.sub=I.subtract,I.multiply=function(e){if(this.isZero())return m;if(n(e)||(e=d(e)),t)return u(t.mul(this.low,this.high,e.low,e.high),t.get_high(),this.unsigned);if(e.isZero())return m;if(this.eq(R))return e.isOdd()?R:m;if(e.eq(R))return this.isOdd()?R:m;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(v)&&e.lt(v))return a(this.toNumber()*e.toNumber(),this.unsigned);var r=this.high>>>16,i=65535&this.high,o=this.low>>>16,s=65535&this.low,c=e.high>>>16,l=65535&e.high,f=e.low>>>16,h=65535&e.low,p=0,_=0,g=0,E=0;return g+=(E+=s*h)>>>16,_+=(g+=o*h)>>>16,g&=65535,_+=(g+=s*f)>>>16,p+=(_+=i*h)>>>16,_&=65535,p+=(_+=o*f)>>>16,_&=65535,p+=(_+=s*l)>>>16,p+=r*h+i*f+o*l+s*c,u((g&=65535)<<16|(E&=65535),(p&=65535)<<16|(_&=65535),this.unsigned)},I.mul=I.multiply,I.divide=function(e){if(n(e)||(e=d(e)),e.isZero())throw Error("division by zero");var r,i,o;if(t)return this.unsigned||-2147483648!==this.high||-1!==e.low||-1!==e.high?u((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?_:m;if(this.unsigned){if(e.unsigned||(e=e.toUnsigned()),e.gt(this))return _;if(e.gt(this.shru(1)))return E;o=_}else{if(this.eq(R))return e.eq(g)||e.eq(y)?R:e.eq(R)?g:(r=this.shr(1).div(e).shl(1)).eq(m)?e.isNegative()?g:y:(i=this.sub(e.mul(r)),o=r.add(i.div(e)));if(e.eq(R))return this.unsigned?_:m;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();o=m}for(i=this;i.gte(e);){r=Math.max(1,Math.floor(i.toNumber()/e.toNumber()));for(var s=Math.ceil(Math.log(r)/Math.LN2),l=s<=48?1:c(2,s-48),f=a(r),h=f.mul(e);h.isNegative()||h.gt(i);)h=(f=a(r-=l,this.unsigned)).mul(e);f.isZero()&&(f=g),o=o.add(f),i=i.sub(h)}return o},I.div=I.divide,I.modulo=function(e){return n(e)||(e=d(e)),t?u((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))},I.mod=I.modulo,I.rem=I.modulo,I.not=function(){return u(~this.low,~this.high,this.unsigned)},I.and=function(e){return n(e)||(e=d(e)),u(this.low&e.low,this.high&e.high,this.unsigned)},I.or=function(e){return n(e)||(e=d(e)),u(this.low|e.low,this.high|e.high,this.unsigned)},I.xor=function(e){return n(e)||(e=d(e)),u(this.low^e.low,this.high^e.high,this.unsigned)},I.shiftLeft=function(e){return n(e)&&(e=e.toInt()),0==(e&=63)?this:e<32?u(this.low<<e,this.high<<e|this.low>>>32-e,this.unsigned):u(0,this.low<<e-32,this.unsigned)},I.shl=I.shiftLeft,I.shiftRight=function(e){return n(e)&&(e=e.toInt()),0==(e&=63)?this:e<32?u(this.low>>>e|this.high<<32-e,this.high>>e,this.unsigned):u(this.high>>e-32,this.high>=0?0:-1,this.unsigned)},I.shr=I.shiftRight,I.shiftRightUnsigned=function(e){if(n(e)&&(e=e.toInt()),0==(e&=63))return this;var t=this.high;return e<32?u(this.low>>>e|t<<32-e,t>>>e,this.unsigned):u(32===e?t:t>>>e-32,0,this.unsigned)},I.shru=I.shiftRightUnsigned,I.shr_u=I.shiftRightUnsigned,I.toSigned=function(){return this.unsigned?u(this.low,this.high,!1):this},I.toUnsigned=function(){return this.unsigned?this:u(this.low,this.high,!0)},I.toBytes=function(e){return e?this.toBytesLE():this.toBytesBE()},I.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]},I.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)}},8579:function(e,t,r){"use strict";r.d(t,{Q:function(){return n},zK:function(){return E}}),r(2675),r(9463),r(2259),r(8706),r(1629),r(4423),r(5276),r(3792),r(8598),r(4782),r(5086),r(739),r(3288),r(2010),r(2892),r(9085),r(9432),r(6099),r(3362),r(8781),r(1699),r(7764),r(3500),r(2953);var n,i=r(8570),o=r.n(i),s=r(8211),a=r(4269),u=r(6646),c=r(9254),l=r(3850),d=r(7968),f=r(7535),h=r(1274),p=function(){return p=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},p.apply(this,arguments)},v=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function s(e){try{u(n.next(e))}catch(e){o(e)}}function a(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}u((n=n.apply(e,t||[])).next())}))},m=function(e,t){var r,n,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;s;)try{if(r=1,n&&(i=2&o[0]?n.return:o[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,o[1])).done)return i;switch(n=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,n=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],n=0}finally{r=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}};!function(e){e["chat:user"]="singleChat",e["chat:group"]="groupChat",e["chat:room"]="chatRoom"}(n||(n={}));var _={0:"TEXT",1:"IMAGE",2:"VIDEO",3:"LOCATION",4:"VOICE",5:"FILE",6:"COMMAND",7:"CUSTOM",8:"COMBINE"};function g(e){for(var t={},r=0;r<e.length;r++)if(8===e[r].type)t[e[r].key]=JSON.parse(e[r].stringValue);else if(7===e[r].type)t[e[r].key]=e[r].stringValue;else if(6===e[r].type)t[e[r].key]=e[r].doubleValue;else if(5===e[r].type)t[e[r].key]=e[r].floatValue;else if(1===e[r].type){var n=e[r].varintValue,i=new(o())(n.low,n.high,n.unsigned).toString();t[e[r].key]=0!==Number(i)}else 2!==e[r].type&&3!==e[r].type&&4!==e[r].type||(n=e[r].varintValue,i=new(o())(n.low,n.high,n.unsigned).toString(),t[e[r].key]=Number(i));return t}function E(e){var t="";return e.remotePath&&(t=a.Wp.formatAttachUrl.call(this,e.remotePath),e.remotePath.includes("?em-redirect")||(t="".concat(t,"?em-redirect=true"),e.secretKey&&(t="".concat(t,"&share-secret=").concat(e.secretKey)))),t}function y(e,t,r){var n=a.Wp.formatAttachUrl.call(this,e),i=n.indexOf("#"),o=i>=0?n.slice(0,i):n,s=i>=0?n.slice(i):"",u=o.indexOf("?"),c=u>=0?o.slice(0,u):o,l=u>=0?o.slice(u+1):"",d=l?l.split("&"):[],f=function(e){return d.some((function(t){return t.split("=")[0]===e}))};return r&&!f("size")&&d.push("size=".concat(r)),f("em-redirect")||d.push("em-redirect=true"),t&&!f("share-secret")&&d.push("share-secret=".concat(t)),"".concat(c).concat(d.length?"?".concat(d.join("&")):"").concat(s)}function O(e,t){var r,n,i=t.from&&t.from.name;if(i===this.context.userId){var o=null===(r=null==e?void 0:e.from)||void 0===r?void 0:r.clientResource;i===(null===(n=null==t?void 0:t.to)||void 0===n?void 0:n.name)&&o&&o!==this.clientResource&&(i="".concat(i,"/").concat(o))}return i}function T(e,t){var r,n=t.to&&t.to.name;return(null===(r=null==e?void 0:e.to)||void 0===r?void 0:r.clientResource)&&(n="".concat(n,"/").concat(e.to.clientResource)),n}function R(e){var t,r,n,i,o,u,c,f,p,O,T,R,I,S,C,b,N,A,M,w,L,U,x,D,P,k,F;return v(this,void 0,void 0,(function(){var v,H,B,G,W,j,q,K,z,V,J,Y,X,Q,$,Z,ee,te,re,ne,ie,oe,se,ae,ue,ce,le,de,fe,he,pe,ve,me,_e,ge,Ee,ye,Oe,Te,Re,Ie,Se,Ce,be,Ne,Ae,Me,we,Le,Ue,xe,De;return m(this,(function(m){switch(m.label){case 0:switch(v=e.status,H=e.thirdMessage,B=e.msgBody,G=e.msgId,W=e.type,j=e.from,q=e.to,K=e.time,z=e.onlineState,V=e.chatType,J=e.ignoreCallback,Y=e.priority,X=e.format,Q=e.broadcast,$=void 0!==Q&&Q,Z=e.isContentReplaced,ee=void 0!==Z&&Z,te=e.meta,re={},ne={},ie=v.errorCode>0,oe=v.errorCode,se=v.reason,ae={},ue=[],ce=[],le={},de=null,fe=null,pe=!1,ve=!1,H.ext&&(ae=g(H.ext)),H.meta&&"string"==typeof H.meta&&((me=JSON.parse(H.meta)).reaction&&(ue=me.reaction).forEach((function(e){e.isAddedBySelf=e.state,delete e.state})),me.translations&&(ce=me.translations),me.edit_msg&&(_e=me.edit_msg,ge=_e.count,Ee=_e.operator,ye=_e.edit_time,le={operationTime:ye,operatorId:Ee,operationCount:ge}),me.thread&&"{}"!==JSON.stringify(me.thread)&&(de={messageId:me.thread.msg_parent_id,parentId:me.thread.muc_parent_id,chatThreadName:me.thread.thread_name}),me.thread_overview&&"{}"!==JSON.stringify(me.thread_overview)&&(fe={id:me.thread_overview.id,parentId:me.thread_overview.muc_parent_id,name:me.thread_overview.name,lastMessage:me.thread_overview.last_message&&"{}"!==JSON.stringify(me.thread_overview.last_message)?s.h.call(this,me.thread_overview.last_message):null,createTimestamp:me.thread_overview.create_timestamp,updateTimestamp:me.thread_overview.update_timestamp,messageCount:me.thread_overview.message_count||0}),me.isDelivered&&(pe=!0),me.isRead&&(ve=!0)),B.type){case 0:return[3,1];case 1:return[3,8];case 2:return[3,11];case 3:return[3,14];case 4:return[3,17];case 5:return[3,20];case 6:return[3,23];case 7:return[3,24];case 8:return[3,27]}return[3,28];case 1:return Object.prototype.hasOwnProperty.call(B,"subType")&&0===B.subType?(he=E.call(this,B),Oe={id:G,type:"combine",chatType:V,to:q,from:j,ext:ae,time:Number(K),onlineState:z,title:B.title||"",summary:B.summary||"",url:he||"",secret:B.secretKey||"",file_length:B.fileLength||0,filename:B.displayName||"",compatibleText:B.text,combineLevel:B.combineLevel||0},re.msgConfig&&(Oe.msgConfig=re.msgConfig),ue.length>0&&(Oe.reactions=ue),de&&(Oe.chatThread=de),fe&&(Oe.chatThreadOverview=fe),"chatRoom"===V&&(Oe.priority=Y,Oe.broadcast=$),le.operationCount>0&&(Oe.modifiedInfo=le),ee&&(Oe.isContentReplaced=ee),ve&&(Oe.isRead=!0),pe&&(Oe.isDelivered=!0),ne=Oe,J?[3,3]:[4,null===(r=null===(t=this._localCache)||void 0===t?void 0:t.getInstance())||void 0===r?void 0:r.storeMessage(Oe,h.q.SUCCESS)]):[3,4];case 2:m.sent(),null===(n=this.eventHandler)||void 0===n||n.dispatch("onCombineMessage",Oe),m.label=3;case 3:return[3,29];case 4:return Object.prototype.hasOwnProperty.call(B,"subType")&&10===B.subType&&H.stream?(Te=l.A.call(this,B,H,te,G,j,q,K,V,z,ae,ue,ce,le,de,fe,ee,ve,pe,null!=J&&J),ne=Te,[3,29]):[3,5];case 5:return!(re={id:G,type:W,contentsType:_[B.type],from:j,to:q,data:B.text,ext:ae,sourceMsg:B.text,time:K,msgConfig:H.msgConfig,onlineState:z}).msgConfig&&delete H.msgConfig,re.error=ie,re.errorText=se,re.errorCode=oe,!J&&this.onTextMessage&&this.onTextMessage(re),Re={id:G,type:"txt",chatType:V,msg:B.text,to:q,from:j,ext:ae,time:Number(K),onlineState:z},re.msgConfig&&(Re.msgConfig=re.msgConfig),ue.length>0&&(Re.reactions=ue),de&&(Re.chatThread=de),fe&&(Re.chatThreadOverview=fe),ce.length>0&&(Re.translations=ce),le.operationCount>0&&(Re.modifiedInfo=le),"chatRoom"===V&&(Re.priority=Y,Re.broadcast=$),ee&&(Re.isContentReplaced=ee),ve&&(Re.isRead=!0),pe&&(Re.isDelivered=!0),ne=Re,J?[3,7]:[4,null===(o=null===(i=this._localCache)||void 0===i?void 0:i.getInstance())||void 0===o?void 0:o.storeMessage(Re,h.q.SUCCESS)];case 6:m.sent(),null===(u=this.eventHandler)||void 0===u||u.dispatch("onTextMessage",Re),m.label=7;case 7:return[3,29];case 8:return Ie=(null===(c=null==B?void 0:B.size)||void 0===c?void 0:c.width)||0,Se=(null===(f=null==B?void 0:B.size)||void 0===f?void 0:f.height)||0,he=this.useOwnUploadFun?B.remotePath:E.call(this,B),!(re={id:G,type:W,contentsType:_[B.type],from:j,to:q,url:he,secret:B.secretKey,filename:B.displayName,thumb:this.useOwnUploadFun?"":"".concat(he,"&thumbnail=true"),thumb_secret:B.secretKey,file_length:B.fileLength||"",width:Ie,height:Se,filetype:B.filetype||"",accessToken:this.token,ext:ae,time:K,msgConfig:H.msgConfig,onlineState:z}).delay&&delete re.delay,!re.msgConfig&&delete H.msgConfig,re.error=ie,re.errorText=se,re.errorCode=oe,!J&&this.onPictureMessage&&this.onPictureMessage(re),Ce={id:G,type:"img",chatType:V,from:j,to:q,url:he||"",width:Ie,height:Se,secret:B.secretKey||"",thumb:this.useOwnUploadFun?"":"".concat(he,"&thumbnail=true"),thumb_secret:B.secretKey,file_length:B.fileLength||0,ext:ae,time:Number(K),onlineState:z},re.msgConfig&&(Ce.msgConfig=re.msgConfig),ue.length>0&&(Ce.reactions=ue),de&&(Ce.chatThread=de),fe&&(Ce.chatThreadOverview=fe),"chatRoom"===V&&(Ce.priority=Y,Ce.broadcast=$),le.operationCount>0&&(Ce.modifiedInfo=le),ee&&(Ce.isContentReplaced=ee),ve&&(Ce.isRead=!0),pe&&(Ce.isDelivered=!0),Object.prototype.hasOwnProperty.call(B,"subType")&&1===B.subType&&(Ce.isGif=!0),Ce.isOriginalImage=!(2===B.imageType&&!Ce.isGif),B.remotePath&&!this.useOwnUploadFun?(Ce.originalImageUrl=y.call(this,B.remotePath,B.secretKey),Ce.bigImageUrl=y.call(this,B.remotePath,B.secretKey,"large"),Ce.thumb="".concat(he,"&thumbnail=true")):B.remotePath&&this.useOwnUploadFun&&(Ce.originalImageUrl=B.remotePath),ne=Ce,J?[3,10]:[4,null===(O=null===(p=this._localCache)||void 0===p?void 0:p.getInstance())||void 0===O?void 0:O.storeMessage(Ce,h.q.SUCCESS)];case 9:m.sent(),null===(T=this.eventHandler)||void 0===T||T.dispatch("onImageMessage",Ce),m.label=10;case 10:return[3,29];case 11:return he=this.useOwnUploadFun?B.remotePath:E.call(this,B),!(re={id:G,type:W,contentsType:_[B.type],from:j,to:q,url:he,secret:B.secretKey,filename:B.displayName,length:B.duration||"",file_length:B.fileLength||"",filetype:B.filetype||"",accessToken:this.token||"",ext:ae,time:K,msgConfig:H.msgConfig,onlineState:z}).delay&&delete re.delay,!re.msgConfig&&delete H.msgConfig,re.error=ie,re.errorText=se,re.errorCode=oe,!J&&this.onVideoMessage&&this.onVideoMessage(re),be={id:G,type:"video",chatType:V,from:j,to:q,url:he,secret:B.secretKey,thumb:a.Wp.formatAttachUrl.call(this,B.thumbnailRemotePath),thumb_secret:B.thumbnailSecretKey,filename:B.displayName,length:B.duration||0,file:{},file_length:B.fileLength||0,filetype:B.filetype||"",accessToken:this.token||"",ext:ae,time:Number(K),onlineState:z},re.msgConfig&&(be.msgConfig=re.msgConfig),ue.length>0&&(be.reactions=ue),de&&(be.chatThread=de),fe&&(be.chatThreadOverview=fe),"chatRoom"===V&&(be.priority=Y,be.broadcast=$),le.operationCount>0&&(be.modifiedInfo=le),ee&&(be.isContentReplaced=ee),ve&&(be.isRead=!0),pe&&(be.isDelivered=!0),ne=be,J?[3,13]:[4,null===(I=null===(R=this._localCache)||void 0===R?void 0:R.getInstance())||void 0===I?void 0:I.storeMessage(be,h.q.SUCCESS)];case 12:m.sent(),null===(S=this.eventHandler)||void 0===S||S.dispatch("onVideoMessage",be),m.label=13;case 13:return[3,29];case 14:return!(re={id:G,type:W,contentsType:_[B.type],from:j,to:q,addr:B.address,buildingName:B.buildingName,lat:B.latitude,lng:B.longitude,ext:ae,time:K,msgConfig:H.msgConfig,onlineState:z}).delay&&delete re.delay,!re.msgConfig&&delete H.msgConfig,re.error=ie,re.errorText=se,re.errorCode=oe,!J&&this.onLocationMessage&&this.onLocationMessage(re),Ne={id:G,type:"loc",chatType:V,from:j,to:q,buildingName:B.buildingName,addr:B.address,lat:B.latitude,lng:B.longitude,ext:ae,time:Number(K),onlineState:z},re.msgConfig&&(Ne.msgConfig=re.msgConfig),ue.length>0&&(Ne.reactions=ue),de&&(Ne.chatThread=de),fe&&(Ne.chatThreadOverview=fe),"chatRoom"===V&&(Ne.priority=Y,Ne.broadcast=$),le.operationCount>0&&(Ne.modifiedInfo=le),ee&&(Ne.isContentReplaced=ee),ve&&(Ne.isRead=!0),pe&&(Ne.isDelivered=!0),ne=Ne,J?[3,16]:[4,null===(b=null===(C=this._localCache)||void 0===C?void 0:C.getInstance())||void 0===b?void 0:b.storeMessage(Ne,h.q.SUCCESS)];case 15:m.sent(),null===(N=this.eventHandler)||void 0===N||N.dispatch("onLocationMessage",Ne),m.label=16;case 16:return[3,29];case 17:return he=this.useOwnUploadFun?B.remotePath:E.call(this,B),!(re={id:G,type:W,contentsType:_[B.type],from:j,to:q,url:he,secret:B.secretKey,filename:B.displayName,file_length:B.fileLength||"",accessToken:this.token||"",ext:ae,length:B.duration,time:K,msgConfig:H.msgConfig,onlineState:z}).delay&&delete re.delay,!re.msgConfig&&delete H.msgConfig,re.error=ie,re.errorText=se,re.errorCode=oe,!J&&this.onAudioMessage&&this.onAudioMessage(re),Ae={id:G,type:"audio",chatType:V,from:j,to:q,url:he,secret:B.secretKey,file:{},filename:B.displayName,length:B.duration||0,file_length:B.fileLength||0,filetype:B.filetype||"",accessToken:this.token||"",ext:ae,time:Number(K),onlineState:z},re.msgConfig&&(Ae.msgConfig=re.msgConfig),ue.length>0&&(Ae.reactions=ue),de&&(Ae.chatThread=de),fe&&(Ae.chatThreadOverview=fe),"chatRoom"===V&&(Ae.priority=Y,Ae.broadcast=$),le.operationCount>0&&(Ae.modifiedInfo=le),ee&&(Ae.isContentReplaced=ee),ve&&(Ae.isRead=!0),pe&&(Ae.isDelivered=!0),ne=Ae,J?[3,19]:[4,null===(M=null===(A=this._localCache)||void 0===A?void 0:A.getInstance())||void 0===M?void 0:M.storeMessage(Ae,h.q.SUCCESS)];case 18:m.sent(),null===(w=this.eventHandler)||void 0===w||w.dispatch("onAudioMessage",Ae),m.label=19;case 19:return[3,29];case 20:return he=this.useOwnUploadFun?B.remotePath:E.call(this,B),!(re={id:G,type:W,contentsType:_[B.type],from:j,to:q,url:he,secret:B.secretKey,filename:B.displayName,file_length:B.fileLength,accessToken:this.token||"",ext:ae,time:K,msgConfig:H.msgConfig,onlineState:z}).delay&&delete re.delay,!re.msgConfig&&delete H.msgConfig,re.error=ie,re.errorText=se,re.errorCode=oe,!J&&this.onFileMessage&&this.onFileMessage(re),Me={id:G,type:"file",chatType:V,from:j,to:q,url:he,secret:B.secretKey,file:{},filename:B.displayName,length:B.duration||0,file_length:B.fileLength||0,filetype:B.filetype||"",accessToken:this.token||"",ext:ae,time:Number(K),onlineState:z},re.msgConfig&&(Me.msgConfig=re.msgConfig),ue.length>0&&(Me.reactions=ue),de&&(Me.chatThread=de),fe&&(Me.chatThreadOverview=fe),"chatRoom"===V&&(Me.priority=Y,Me.broadcast=$),le.operationCount>0&&(Me.modifiedInfo=le),ee&&(Me.isContentReplaced=ee),ve&&(Me.isRead=!0),pe&&(Me.isDelivered=!0),ne=Me,J?[3,22]:[4,null===(U=null===(L=this._localCache)||void 0===L?void 0:L.getInstance())||void 0===U?void 0:U.storeMessage(Me,h.q.SUCCESS)];case 21:m.sent(),null===(x=this.eventHandler)||void 0===x||x.dispatch("onFileMessage",Me),m.label=22;case 22:return[3,29];case 23:return!(re={id:G,type:W,contentsType:_[B.type],from:j,to:q,action:B.action,ext:ae,time:K,msgConfig:H.msgConfig,onlineState:z}).msgConfig&&delete H.msgConfig,re.error=ie,re.errorText=se,re.errorCode=oe,!J&&this.onCmdMessage&&this.onCmdMessage(re),we={id:G,type:"cmd",chatType:V,from:j,to:q,action:B.action,ext:ae,time:Number(K),onlineState:z},re.msgConfig&&(we.msgConfig=re.msgConfig),ue.length>0&&(we.reactions=ue),de&&(we.chatThread=de),fe&&(we.chatThreadOverview=fe),"chatRoom"===V&&(we.priority=Y,we.broadcast=$),le.operationCount>0&&(we.modifiedInfo=le),ee&&(we.isContentReplaced=ee),ve&&(we.isRead=!0),pe&&(we.isDelivered=!0),ne=we,J||null===(D=this.eventHandler)||void 0===D||D.dispatch("onCmdMessage",we),[3,29];case 24:return Le={},Ue={},H.contents[0].customExts&&(Le=g(H.contents[0].customExts)),H.contents[0].params&&(Ue=g(H.contents[0].params)),re={id:G,type:W,contentsType:_[B.type],from:j,to:q,customEvent:B.customEvent,params:Ue,customExts:Le,ext:ae,time:K,onlineState:z},!J&&this.onCustomMessage&&this.onCustomMessage(re),xe={id:G,type:"custom",chatType:V,from:j,to:q,customEvent:B.customEvent,params:Ue,customExts:Le,ext:ae,time:Number(K),onlineState:z},re.msgConfig&&(xe.msgConfig=re.msgConfig),ue.length>0&&(xe.reactions=ue),de&&(xe.chatThread=de),fe&&(xe.chatThreadOverview=fe),le.operationCount>0&&(xe.modifiedInfo=le),"chatRoom"===V&&(xe.priority=Y,xe.broadcast=$),ee&&(xe.isContentReplaced=ee),ve&&(xe.isRead=!0),pe&&(xe.isDelivered=!0),ne=xe,J?[3,26]:[4,null===(k=null===(P=this._localCache)||void 0===P?void 0:P.getInstance())||void 0===k?void 0:k.storeMessage(xe,h.q.SUCCESS)];case 25:m.sent(),null===(F=this.eventHandler)||void 0===F||F.dispatch("onCustomMessage",xe),m.label=26;case 26:return[3,29];case 27:return he=E.call(this,B),De={id:G,type:"combine",chatType:V,to:q,from:j,ext:ae,time:Number(K),onlineState:z,title:B.title||"",summary:B.summary||"",url:he||"",secret:B.secretKey||"",file_length:B.fileLength||0,filename:B.displayName||"",compatibleText:B.text,combineLevel:B.combineLevel||0},re.msgConfig&&(De.msgConfig=re.msgConfig),ue.length>0&&(De.reactions=ue),de&&(De.chatThread=de),fe&&(De.chatThreadOverview=fe),"chatRoom"===V&&(De.priority=Y,De.broadcast=$),le.operationCount>0&&(De.modifiedInfo=le),ee&&(De.isContentReplaced=ee),ve&&(De.isRead=!0),pe&&(De.isDelivered=!0),ne=De,!J&&this.eventHandler&&this.eventHandler.dispatch("onCombineMessage",De),[3,29];case 28:return d.vF.error("Unknow message type, message:",B),[3,29];case 29:return X?[2,ne]:[2,re]}}))}))}function I(e,t,r){if(this.delivery&&e!==t){var n=this.getUniqueId(),i=new f.Q("delivery",n);i.set({ackId:r,to:e}),d.vF.debug("send delivery ack"),this.send(i.body)}}t.Ay=function(e,t,r,i,s){var l,f,h,_,E,y,S,C,b,N,A,M,w,L,U,x,D,P,k,F,H,B,G,W,j,q,K,z,V,J;return v(this,void 0,void 0,(function(){var v,Y,X,Q,$,Z,ee,te,re,ne,ie,oe,se,ae,ue,ce,le,de,fe,he,pe,ve,me,_e,ge,Ee,ye,Oe,Te,Re,Ie,Se,Ce,be,Ne,Ae,Me,we,Le,Ue,xe,De,Pe,ke,Fe;return m(this,(function(m){switch(m.label){case 0:if(v=new(o())(e.timestamp.low,e.timestamp.high,e.timestamp.unsigned).toString(),Y=this.root.lookup("easemob.pb.MessageBody"),X=Y.decode(e.payload),Q=3,$=!1,Z=new(o())(e.id.low,e.id.high,e.id.unsigned).toString(),s&&e.from&&e.from.name===this.context.userId&&e.from.clientResource===this.clientResource&&X.type===u.up.CHATROOM)return[2,d.vF.debug("Discard your own chat room message:",Z)];if(ee=(null===(l=e.from)||void 0===l?void 0:l.name)||"",te=e.to?e.to.name:"",re=!!e.to&&-1!==e.to.domain.indexOf("conference"),this._load_msg_cache.some((function(e){return e.msgId===Z}))&&10!==X.contents[0].subType&&!r)return[2,d.vF.debug("Discard message in cache:",Z)];if(this._load_msg_cache.length<=this.max_cache_length||this._load_msg_cache.shift(),this._load_msg_cache.push({msgId:Z,from:ee,to:te,isGroup:re}),e.meta&&e.meta.length){if(ne=a.Wp.parseNotify(e.meta),ie=ne.is_online,oe=ne.callback_replace,this.useReplacedMessageContents&&oe&&($=!0),ie||0===ie)switch(ie){case 0:Q=0;break;case 1:Q=1;break;default:Q=2}}else Q=3;switch(se=X.ackMessageId?new(o())(X.ackMessageId.low,X.ackMessageId.high,X.ackMessageId.unsigned).toString():"",ae="",ue=O.call(this,e,X),ce=T.call(this,e,X),d.vF.debug("received message:",{metaId:Z,metaNs:e.ns,type:X.type,from:ue,to:ce,contentType:null===(h=null===(f=X.contents)||void 0===f?void 0:f[0])||void 0===h?void 0:h.type,contentLen:null===(_=X.contents)||void 0===_?void 0:_.length}),X.type){case u.up.SINGLECHAT:return[3,1];case u.up.GROUPCHAT:return[3,2];case u.up.CHATROOM:return[3,3];case u.up.READ_ACK:return[3,4];case u.up.DELIVER_ACK:return[3,5];case u.up.RECALL:return[3,6];case u.up.CHANNEL_ACK:return[3,15];case u.up.EDIT:return[3,16]}return[3,20];case 1:return ae="chat","agoraToken"===this.grantType&&(ae="singleChat"),this.delivery&&!r&&ue!==this.context.userId&&10!==(null===(E=X.contents[0])||void 0===E?void 0:E.subType)&&I.call(this,ue,ce,Z),[3,21];case 2:return ae="groupchat","agoraToken"===this.grantType&&(ae="groupChat"),[3,21];case 3:return ae="chatroom","agoraToken"===this.grantType&&(ae="chatRoom"),Q=1,[3,21];case 4:return ae="read_ack",le=void 0,X.ext[0]&&JSON.parse(X.ext[0].stringValue)?(le={id:Z,type:"read",from:ue,to:ce,mid:se,groupReadCount:X.ext[0]&&JSON.parse(X.ext[0].stringValue),ackContent:X.ackContent,onlineState:Q},this.onReadMessage&&this.onReadMessage(le),null===(y=this.eventHandler)||void 0===y||y.dispatch("onReadMessage",le),[2]):(le={id:Z,type:"read",from:ue,to:ce,mid:se,onlineState:Q},this.onReadMessage&&this.onReadMessage(le),null===(S=this.eventHandler)||void 0===S||S.dispatch("onReadMessage",le),[2]);case 5:return ae="deliver_ack",this.onDeliveredMessage&&this.onDeliveredMessage({id:Z,type:"delivery",from:ue,to:ce,mid:se,onlineState:Q}),de={id:Z,type:"delivery",from:ue,to:ce,mid:se,onlineState:Q},null===(C=this.eventHandler)||void 0===C||C.dispatch("onDeliveredMessage",de),[2];case 6:return ae="recall",fe="",e.ext&&(fe=(null===(b=g(e.ext))||void 0===b?void 0:b.recallMessageExtensionInfo)||""),he={id:Z,from:ue||"admin",to:ce,mid:se,ext:fe,onlineState:Q},pe=ce===this.user?ue:ce,[4,null===(A=null===(N=this._localCache)||void 0===N?void 0:N.getInstance())||void 0===A?void 0:A.getMessageByServerMsgId(he.mid)];case 7:return(ve=m.sent())?[4,null===(w=null===(M=this._localCache)||void 0===M?void 0:M.getInstance())||void 0===w?void 0:w.removeMsgByServerMsgId(he.mid)]:[3,9];case 8:m.sent(),m.label=9;case 9:return"singleChat"!==(null==ve?void 0:ve.chatType)&&"groupChat"!==(null==ve?void 0:ve.chatType)?[3,14]:(me=(null==ve?void 0:ve.from)===this.user||""===(null==ve?void 0:ve.from),[4,null===(U=null===(L=this._localCache)||void 0===L?void 0:L.getInstance())||void 0===U?void 0:U.getConversationLastMessage(pe,ve.chatType)]);case 10:return _e=m.sent(),[4,null===(D=null===(x=this._localCache)||void 0===x?void 0:x.getInstance())||void 0===D?void 0:D.getConversationBySessionId((0,c.u0)({conversationId:pe,conversationType:ve.chatType}))];case 11:return(ge=m.sent())?[4,null===(k=null===(P=this._localCache)||void 0===P?void 0:P.getInstance())||void 0===k?void 0:k.updateLocalConversation((0,c.u0)({conversationId:pe,conversationType:ve.chatType}),{lastMessageId:null==_e?void 0:_e.serverMsgId,unReadCount:(0,c.rH)({conversation:ge,isRecallSelfMsg:me,recalledMsgTime:ve.time})})]:[3,13];case 12:m.sent(),m.label=13;case 13:m.label=14;case 14:return this.onRecallMessage&&this.onRecallMessage(he),null===(F=this.eventHandler)||void 0===F||F.dispatch("onRecallMessage",he),[2];case 15:return this.onChannelMessage&&this.onChannelMessage({id:Z,mid:se,type:"channel",chatType:"singleChat",from:ue,to:ce,time:Number(v),onlineState:Q}),Ee={id:Z,mid:se,type:"channel",chatType:"singleChat",from:ue,to:ce,time:Number(v),onlineState:Q},null===(H=this.eventHandler)||void 0===H||H.dispatch("onChannelMessage",Ee),[2];case 16:return ye={errorCode:0,reason:""},Oe="",Te=0,Re="",X.meta&&"string"==typeof X.meta&&(Ie=JSON.parse(X.meta)).edit_msg&&(Se=Ie.edit_msg,Ce=Se.sender,be=Se.send_time,Ne=Se.chat_type,Oe=Ce,Te=be,Re=n[Ne]),Ae=X.editMessageId&&new(o())(X.editMessageId.low,X.editMessageId.high,X.editMessageId.unsigned).toString(),Me=X.editScope,[4,R.call(this,{status:ye,thirdMessage:X,msgBody:X.contents[0],msgId:Ae,type:ae,from:Oe,to:ce,time:Te,onlineState:Q,ignoreCallback:!0,format:!0,isContentReplaced:$})];case 17:return(we=m.sent()).chatType=Re,e.ignoreCallback?[2,we]:we?[4,null===(G=null===(B=this._localCache)||void 0===B?void 0:B.getInstance())||void 0===G?void 0:G.getMessageByServerMsgId(we.id)]:[3,19];case 18:(Le=m.sent())&&(Ue=Le.ext||{},(Me===u.xz.BODY_AND_EXT||Object.keys(we.ext||{}).length>0)&&(Ue=we.ext),"txt"===we.type&&"txt"===Le.type?null===(j=null===(W=this._localCache)||void 0===W?void 0:W.getInstance())||void 0===j||j.putMessageToDB(p(p({},Le),{msg:we.msg,modifiedInfo:we.modifiedInfo,translations:we.translations,ext:Ue})):"custom"===we.type&&"custom"===Le.type?null===(K=null===(q=this._localCache)||void 0===q?void 0:q.getInstance())||void 0===K||K.putMessageToDB(p(p({},Le),{ext:Ue,customExts:we.customExts,customEvent:we.customEvent,modifiedInfo:we.modifiedInfo})):null===(V=null===(z=this._localCache)||void 0===z?void 0:z.getInstance())||void 0===V||V.putMessageToDB(p(p({},Le),{ext:Ue,modifiedInfo:we.modifiedInfo}))),m.label=19;case 19:return null===(J=this.eventHandler)||void 0===J||J.dispatch("onModifiedMessage",we),[2];case 20:return d.vF.error("unexpected message type: ".concat(X.type)),[2];case 21:xe="normal",Pe=!1,"chat"===ae.toLowerCase()||"singleChat"===ae?De="singleChat":"groupchat"===ae.toLowerCase()||"groupChat"===ae?De="groupChat":(De="chatRoom",Q=1,e.ext&&(ke=g(e.ext),Pe=!!(null==ke?void 0:ke.is_broadcast),xe=0===ke.chatroom_msg_tag?"high":2===ke.chatroom_msg_tag?"low":"normal")),Fe=0,m.label=22;case 22:return Fe<X.contents.length?[4,R.call(this,{status:t,thirdMessage:X,msgBody:X.contents[Fe],msgId:Z,type:ae,from:ue,to:ce,time:v,onlineState:Q,chatType:De,ignoreCallback:r,priority:xe,format:i,broadcast:Pe,isContentReplaced:$,meta:e})]:[3,25];case 23:return[2,m.sent()];case 24:return Fe++,[3,22];case 25:return[2]}}))}))}},8598:function(e,t,r){"use strict";var n=r(6518),i=r(9504),o=r(7055),s=r(5397),a=r(4598),u=i([].join);n({target:"Array",proto:!0,forced:o!==Object||!a("join",",")},{join:function(e){return u(s(this),void 0===e?",":e)}})},8622:function(e,t,r){"use strict";var n=r(4576),i=r(4901),o=n.WeakMap;e.exports=i(o)&&/native code/.test(String(o))},8686:function(e,t,r){"use strict";var n=r(3724),i=r(9039);e.exports=n&&i((function(){return 42!==Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype}))},8706:function(e,t,r){"use strict";var n=r(6518),i=r(9039),o=r(4376),s=r(34),a=r(8981),u=r(6198),c=r(6837),l=r(4659),d=r(1469),f=r(597),h=r(8227),p=r(9519),v=h("isConcatSpreadable"),m=p>=51||!i((function(){var e=[];return e[v]=!1,e.concat()[0]!==e})),_=function(e){if(!s(e))return!1;var t=e[v];return void 0!==t?!!t:o(e)};n({target:"Array",proto:!0,arity:1,forced:!m||!f("concat")},{concat:function(e){var t,r,n,i,o,s=a(this),f=d(s,0),h=0;for(t=-1,n=arguments.length;t<n;t++)if(_(o=-1===t?s:arguments[t]))for(i=u(o),c(h+i),r=0;r<i;r++,h++)r in o&&l(f,h,o[r]);else c(h+1),l(f,h++,o);return f.length=h,f}})},8727:function(e){"use strict";e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},8745:function(e,t,r){"use strict";var n=r(616),i=Function.prototype,o=i.apply,s=i.call;e.exports="object"==typeof Reflect&&Reflect.apply||(n?s.bind(o):function(){return s.apply(o,arguments)})},8747:function(e,t,r){"use strict";var n=r(4644),i=n.aTypedArray,o=n.exportTypedArrayMethod,s=Math.floor;o("reverse",(function(){for(var e,t=this,r=i(t).length,n=s(r/2),o=0;o<n;)e=t[o],t[o++]=t[--r],t[r]=e;return t}))},8773:function(e,t){"use strict";var r={}.propertyIsEnumerable,n=Object.getOwnPropertyDescriptor,i=n&&!r.call({1:2},1);t.f=i?function(e){var t=n(this,e);return!!t&&t.enumerable}:r},8781:function(e,t,r){"use strict";var n=r(350).PROPER,i=r(6840),o=r(8551),s=r(655),a=r(9039),u=r(1034),c="toString",l=RegExp.prototype,d=l[c],f=a((function(){return"/a/b"!==d.call({source:"a",flags:"b"})})),h=n&&d.name!==c;(f||h)&&i(l,c,(function(){var e=o(this);return"/"+s(e.source)+"/"+s(u(e))}),{unsafe:!0})},8811:function(e,t,r){"use strict";e.exports=o;var n=r(7209);((o.prototype=Object.create(n.prototype)).constructor=o).className="Method";var i=r(3262);function o(e,t,r,o,s,a,u,c,l){if(i.isObject(s)?(u=s,s=a=void 0):i.isObject(a)&&(u=a,a=void 0),void 0!==t&&!i.isString(t))throw TypeError("type must be a string");if(!i.isString(r))throw TypeError("requestType must be a string");if(!i.isString(o))throw TypeError("responseType must be a string");n.call(this,e,u),this.type=t||"rpc",this.requestType=r,this.requestStream=!!s||void 0,this.responseType=o,this.responseStream=!!a||void 0,this.resolvedRequestType=null,this.resolvedResponseType=null,this.comment=c,this.parsedOptions=l}o.fromJSON=function(e,t){return new o(e,t.type,t.requestType,t.responseType,t.requestStream,t.responseStream,t.options,t.comment,t.parsedOptions)},o.prototype.toJSON=function(e){var t=!!e&&Boolean(e.keepComments);return i.toObject(["type","rpc"!==this.type&&this.type||void 0,"requestType",this.requestType,"requestStream",this.requestStream,"responseType",this.responseType,"responseStream",this.responseStream,"options",this.options,"comment",t?this.comment:void 0,"parsedOptions",this.parsedOptions])},o.prototype.resolve=function(){return this.resolved?this:(this.resolvedRequestType=this.parent.lookupType(this.requestType),this.resolvedResponseType=this.parent.lookupType(this.responseType),n.prototype.resolve.call(this))}},8814:function(e,t,r){"use strict";var n=r(9039),i=r(4576).RegExp;e.exports=n((function(){var e=i("(?<a>b)","g");return"b"!==e.exec("b").groups.a||"bc"!=="b".replace(e,"$<a>c")}))},8839:function(e,t){"use strict";var r=t;r.length=function(e){var t=e.length;if(!t)return 0;for(var r=0;--t%4>1&&"="===e.charAt(t);)++r;return Math.ceil(3*e.length)/4-r};for(var n=new Array(64),i=new Array(123),o=0;o<64;)i[n[o]=o<26?o+65:o<52?o+71:o<62?o-4:o-59|43]=o++;r.encode=function(e,t,r){for(var i,o=null,s=[],a=0,u=0;t<r;){var c=e[t++];switch(u){case 0:s[a++]=n[c>>2],i=(3&c)<<4,u=1;break;case 1:s[a++]=n[i|c>>4],i=(15&c)<<2,u=2;break;case 2:s[a++]=n[i|c>>6],s[a++]=n[63&c],u=0}a>8191&&((o||(o=[])).push(String.fromCharCode.apply(String,s)),a=0)}return u&&(s[a++]=n[i],s[a++]=61,1===u&&(s[a++]=61)),o?(a&&o.push(String.fromCharCode.apply(String,s.slice(0,a))),o.join("")):String.fromCharCode.apply(String,s.slice(0,a))};var s="invalid encoding";r.decode=function(e,t,r){for(var n,o=r,a=0,u=0;u<e.length;){var c=e.charCodeAt(u++);if(61===c&&a>1)break;if(void 0===(c=i[c]))throw Error(s);switch(a){case 0:n=c,a=1;break;case 1:t[r++]=n<<2|(48&c)>>4,n=c,a=2;break;case 2:t[r++]=(15&n)<<4|(60&c)>>2,n=c,a=3;break;case 3:t[r++]=(3&n)<<6|c,a=0}}if(1===a)throw Error(s);return r-o},r.test=function(e){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(e)}},8845:function(e,t,r){"use strict";var n=r(4576),i=r(9565),o=r(4644),s=r(6198),a=r(8229),u=r(8981),c=r(9039),l=n.RangeError,d=n.Int8Array,f=d&&d.prototype,h=f&&f.set,p=o.aTypedArray,v=o.exportTypedArrayMethod,m=!c((function(){var e=new Uint8ClampedArray(2);return i(h,e,{length:1,0:3},1),3!==e[1]})),_=m&&o.NATIVE_ARRAY_BUFFER_VIEWS&&c((function(){var e=new d(2);return e.set(1),e.set("2",1),0!==e[0]||2!==e[1]}));v("set",(function(e){p(this);var t=a(arguments.length>1?arguments[1]:void 0,1),r=u(e);if(m)return i(h,this,r,t);var n=this.length,o=s(r),c=0;if(o+t>n)throw new l("Wrong length");for(;c<o;)this[t+c]=r[c++]}),!m||_)},8921:function(e,t,r){"use strict";var n=r(6518),i=r(8379);n({target:"Array",proto:!0,forced:i!==[].lastIndexOf},{lastIndexOf:i})},8923:function(e,t,r){"use strict";e.exports=d;var n=r(7209);((d.prototype=Object.create(n.prototype)).constructor=d).className="Namespace";var i,o,s,a=r(1344),u=r(1457),c=r(3262);function l(e,t){if(e&&e.length){for(var r={},n=0;n<e.length;++n)r[e[n].name]=e[n].toJSON(t);return r}}function d(e,t){n.call(this,e,t),this.nested=void 0,this._nestedArray=null}function f(e){return e._nestedArray=null,e}d.fromJSON=function(e,t){return new d(e,t.options).addJSON(t.nested)},d.arrayToJSON=l,d.isReservedId=function(e,t){if(e)for(var r=0;r<e.length;++r)if("string"!=typeof e[r]&&e[r][0]<=t&&e[r][1]>t)return!0;return!1},d.isReservedName=function(e,t){if(e)for(var r=0;r<e.length;++r)if(e[r]===t)return!0;return!1},Object.defineProperty(d.prototype,"nestedArray",{get:function(){return this._nestedArray||(this._nestedArray=c.toArray(this.nested))}}),d.prototype.toJSON=function(e){return c.toObject(["options",this.options,"nested",l(this.nestedArray,e)])},d.prototype.addJSON=function(e){if(e)for(var t,r=Object.keys(e),n=0;n<r.length;++n)t=e[r[n]],this.add((void 0!==t.fields?i.fromJSON:void 0!==t.values?s.fromJSON:void 0!==t.methods?o.fromJSON:void 0!==t.id?a.fromJSON:d.fromJSON)(r[n],t));return this},d.prototype.get=function(e){return this.nested&&this.nested[e]||null},d.prototype.getEnum=function(e){if(this.nested&&this.nested[e]instanceof s)return this.nested[e].values;throw Error("no such enum: "+e)},d.prototype.add=function(e){if(!(e instanceof a&&void 0!==e.extend||e instanceof i||e instanceof s||e instanceof o||e instanceof d||e instanceof u))throw TypeError("object must be a valid nested object");if(this.nested){var t=this.get(e.name);if(t){if(!(t instanceof d&&e instanceof d)||t instanceof i||t instanceof o)throw Error("duplicate name '"+e.name+"' in "+this);for(var r=t.nestedArray,n=0;n<r.length;++n)e.add(r[n]);this.remove(t),this.nested||(this.nested={}),e.setOptions(t.options,!0)}}else this.nested={};return this.nested[e.name]=e,e.onAdd(this),f(this)},d.prototype.remove=function(e){if(!(e instanceof n))throw TypeError("object must be a ReflectionObject");if(e.parent!==this)throw Error(e+" is not a member of "+this);return delete this.nested[e.name],Object.keys(this.nested).length||(this.nested=void 0),e.onRemove(this),f(this)},d.prototype.define=function(e,t){if(c.isString(e))e=e.split(".");else if(!Array.isArray(e))throw TypeError("illegal path");if(e&&e.length&&""===e[0])throw Error("path must be relative");for(var r=this;e.length>0;){var n=e.shift();if(r.nested&&r.nested[n]){if(!((r=r.nested[n])instanceof d))throw Error("path conflicts with non-namespace objects")}else r.add(r=new d(n))}return t&&r.addJSON(t),r},d.prototype.resolveAll=function(){for(var e=this.nestedArray,t=0;t<e.length;)e[t]instanceof d?e[t++].resolveAll():e[t++].resolve();return this.resolve()},d.prototype.lookup=function(e,t,r){if("boolean"==typeof t?(r=t,t=void 0):t&&!Array.isArray(t)&&(t=[t]),c.isString(e)&&e.length){if("."===e)return this.root;e=e.split(".")}else if(!e.length)return this;if(""===e[0])return this.root.lookup(e.slice(1),t);var n=this.get(e[0]);if(n){if(1===e.length){if(!t||t.indexOf(n.constructor)>-1)return n}else if(n instanceof d&&(n=n.lookup(e.slice(1),t,!0)))return n}else for(var i=0;i<this.nestedArray.length;++i)if(this._nestedArray[i]instanceof d&&(n=this._nestedArray[i].lookup(e,t,!0)))return n;return null===this.parent||r?null:this.parent.lookup(e,t)},d.prototype.lookupType=function(e){var t=this.lookup(e,[i]);if(!t)throw Error("no such type: "+e);return t},d.prototype.lookupEnum=function(e){var t=this.lookup(e,[s]);if(!t)throw Error("no such Enum '"+e+"' in "+this);return t},d.prototype.lookupTypeOrEnum=function(e){var t=this.lookup(e,[i,s]);if(!t)throw Error("no such Type or Enum '"+e+"' in "+this);return t},d.prototype.lookupService=function(e){var t=this.lookup(e,[o]);if(!t)throw Error("no such Service '"+e+"' in "+this);return t},d._configure=function(e,t,r){i=e,o=t,s=r}},8940:function(e,t,r){"use strict";var n=r(6518),i=r(2703);n({global:!0,forced:parseInt!==i},{parseInt:i})},8980:function(e,t,r){"use strict";var n=r(6518),i=r(9213).findIndex,o=r(6469),s="findIndex",a=!0;s in[]&&Array(1)[s]((function(){a=!1})),n({target:"Array",proto:!0,forced:a},{findIndex:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}}),o(s)},8981:function(e,t,r){"use strict";var n=r(7750),i=Object;e.exports=function(e){return i(n(e))}},8995:function(e,t,r){"use strict";var n=r(4644),i=r(9213).map,o=n.aTypedArray,s=n.getTypedArrayConstructor;(0,n.exportTypedArrayMethod)("map",(function(e){return i(o(this),e,arguments.length>1?arguments[1]:void 0,(function(e,t){return new(s(e))(t)}))}))},9039:function(e){"use strict";e.exports=function(e){try{return!!e()}catch(e){return!0}}},9061:function(e,t,r){"use strict";r.d(t,{Jz:function(){return n},KU:function(){return o},Po:function(){return u},XI:function(){return d},Xp:function(){return s},ey:function(){return a},lM:function(){return l},nf:function(){return i},uN:function(){return c}}),r(3792),r(6033),r(6099),r(7764),r(2953);var n=7,i=new Map,o="im",s=new Map,a="32f24ab2ddb74f508aa9286c356cec84",u=1e3,c={INIT:9674,API:9675},l="direct",d=-1},9085:function(e,t,r){"use strict";var n=r(6518),i=r(4213);n({target:"Object",stat:!0,arity:2,forced:Object.assign!==i},{assign:i})},9089:function(e,t,r){"use strict";var n=r(6518),i=r(9504),o=Date,s=i(o.prototype.getTime);n({target:"Date",stat:!0},{now:function(){return s(new o)}})},9100:function(e,t,r){"use strict";var n=e.exports=r(5325);n.build="full",n.tokenize=r(527),n.parse=r(4863),n.common=r(5095),n.Root._configure(n.Type,n.parse,n.common)},9167:function(e,t,r){"use strict";var n=r(4576);e.exports=n},9207:function(e,t){"use strict";var r=t,n=r.isAbsolute=function(e){return/^(?:\/|\w+:)/.test(e)},i=r.normalize=function(e){var t=(e=e.replace(/\\/g,"/").replace(/\/{2,}/g,"/")).split("/"),r=n(e),i="";r&&(i=t.shift()+"/");for(var o=0;o<t.length;)".."===t[o]?o>0&&".."!==t[o-1]?t.splice(--o,2):r?t.splice(o,1):++o:"."===t[o]?t.splice(o,1):++o;return i+t.join("/")};r.resolve=function(e,t,r){return r||(t=i(t)),n(t)?t:(r||(e=i(e)),(e=e.replace(/(?:\/|^)[^/]+$/,"")).length?i(e+"/"+t):t)}},9213:function(e,t,r){"use strict";var n=r(6080),i=r(9504),o=r(7055),s=r(8981),a=r(6198),u=r(1469),c=i([].push),l=function(e){var t=1===e,r=2===e,i=3===e,l=4===e,d=6===e,f=7===e,h=5===e||d;return function(p,v,m,_){for(var g,E,y=s(p),O=o(y),T=a(O),R=n(v,m),I=0,S=_||u,C=t?S(p,T):r||f?S(p,0):void 0;T>I;I++)if((h||I in O)&&(E=R(g=O[I],I,y),e))if(t)C[I]=E;else if(E)switch(e){case 3:return!0;case 5:return g;case 6:return I;case 2:c(C,g)}else switch(e){case 4:return!1;case 7:c(C,g)}return d?-1:i||l?l:C}};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)}},9225:function(e,t,r){"use strict";var n,i,o,s,a=r(4576),u=r(8745),c=r(6080),l=r(4901),d=r(9297),f=r(9039),h=r(397),p=r(7680),v=r(4055),m=r(2812),_=r(9544),g=r(6193),E=a.setImmediate,y=a.clearImmediate,O=a.process,T=a.Dispatch,R=a.Function,I=a.MessageChannel,S=a.String,C=0,b={},N="onreadystatechange";f((function(){n=a.location}));var A=function(e){if(d(b,e)){var t=b[e];delete b[e],t()}},M=function(e){return function(){A(e)}},w=function(e){A(e.data)},L=function(e){a.postMessage(S(e),n.protocol+"//"+n.host)};E&&y||(E=function(e){m(arguments.length,1);var t=l(e)?e:R(e),r=p(arguments,1);return b[++C]=function(){u(t,void 0,r)},i(C),C},y=function(e){delete b[e]},g?i=function(e){O.nextTick(M(e))}:T&&T.now?i=function(e){T.now(M(e))}:I&&!_?(s=(o=new I).port2,o.port1.onmessage=w,i=c(s.postMessage,s)):a.addEventListener&&l(a.postMessage)&&!a.importScripts&&n&&"file:"!==n.protocol&&!f(L)?(i=L,a.addEventListener("message",w,!1)):i=N in v("script")?function(e){h.appendChild(v("script"))[N]=function(){h.removeChild(this),A(e)}}:function(e){setTimeout(M(e),0)}),e.exports={set:E,clear:y}},9228:function(e,t,r){"use strict";r(7495);var n=r(9565),i=r(6840),o=r(7323),s=r(9039),a=r(8227),u=r(6699),c=a("species"),l=RegExp.prototype;e.exports=function(e,t,r,d){var f=a(e),h=!s((function(){var t={};return t[f]=function(){return 7},7!==""[e](t)})),p=h&&!s((function(){var t=!1,r=/a/;return"split"===e&&((r={}).constructor={},r.constructor[c]=function(){return r},r.flags="",r[f]=/./[f]),r.exec=function(){return t=!0,null},r[f](""),!t}));if(!h||!p||r){var v=/./[f],m=t(f,""[e],(function(e,t,r,i,s){var a=t.exec;return a===o||a===l.exec?h&&!s?{done:!0,value:n(v,t,r,i)}:{done:!0,value:n(e,r,t,i)}:{done:!1}}));i(String.prototype,e,m[0]),i(l,f,m[1])}d&&u(l[f],"sham",!0)}},9254:function(e,t,r){"use strict";r.d(t,{rH:function(){return i},s5:function(){return o},u0:function(){return n}}),r(8706);var n=function(e){return"".concat(e.conversationType,"-").concat(e.conversationId)},i=function(e){var t=e.isRecallSelfMsg,r=e.conversation,n=e.recalledMsgTime,i=r.unReadCount,o=void 0===i?0:i,s=r.unreadCountClearTimestamp;return t||(void 0===s?0:s)>n?o:o&&o>0?o-1:0},o=function(e){var t,r=0;if(0===e.length)return r;for(t=0;t<e.length;t++)r=(r<<5)-r+e.charCodeAt(t),r|=0;return r}},9296:function(e,t,r){"use strict";var n=r(4055)("span").classList,i=n&&n.constructor&&n.constructor.prototype;e.exports=i===Object.prototype?void 0:i},9297:function(e,t,r){"use strict";var n=r(9504),i=r(8981),o=n({}.hasOwnProperty);e.exports=Object.hasOwn||function(e,t){return o(i(e),t)}},9306:function(e,t,r){"use strict";var n=r(4901),i=r(6823),o=TypeError;e.exports=function(e){if(n(e))return e;throw new o(i(e)+" is not a function")}},9369:function(e,t,r){"use strict";var n=r(4644),i=r(9504),o=n.aTypedArray,s=n.exportTypedArrayMethod,a=i([].join);s("join",(function(e){return a(o(this),e)}))},9390:function(e){"use strict";e.exports=function(e,t,r){var n=r||8192,i=n>>>1,o=null,s=n;return function(r){if(r<1||r>i)return e(r);s+r>n&&(o=e(n),s=0);var a=t.call(o,s,s+=r);return 7&s&&(s=1+(7|s)),a}}},9410:function(e){"use strict";function t(e){return"undefined"!=typeof Float32Array?function(){var t=new Float32Array([-0]),r=new Uint8Array(t.buffer),n=128===r[3];function i(e,n,i){t[0]=e,n[i]=r[0],n[i+1]=r[1],n[i+2]=r[2],n[i+3]=r[3]}function o(e,n,i){t[0]=e,n[i]=r[3],n[i+1]=r[2],n[i+2]=r[1],n[i+3]=r[0]}function s(e,n){return r[0]=e[n],r[1]=e[n+1],r[2]=e[n+2],r[3]=e[n+3],t[0]}function a(e,n){return r[3]=e[n],r[2]=e[n+1],r[1]=e[n+2],r[0]=e[n+3],t[0]}e.writeFloatLE=n?i:o,e.writeFloatBE=n?o:i,e.readFloatLE=n?s:a,e.readFloatBE=n?a:s}():function(){function t(e,t,r,n){var i=t<0?1:0;if(i&&(t=-t),0===t)e(1/t>0?0:2147483648,r,n);else if(isNaN(t))e(2143289344,r,n);else if(t>34028234663852886e22)e((i<<31|2139095040)>>>0,r,n);else if(t<11754943508222875e-54)e((i<<31|Math.round(t/1401298464324817e-60))>>>0,r,n);else{var o=Math.floor(Math.log(t)/Math.LN2);e((i<<31|o+127<<23|8388607&Math.round(t*Math.pow(2,-o)*8388608))>>>0,r,n)}}function s(e,t,r){var n=e(t,r),i=2*(n>>31)+1,o=n>>>23&255,s=8388607&n;return 255===o?s?NaN:i*(1/0):0===o?1401298464324817e-60*i*s:i*Math.pow(2,o-150)*(s+8388608)}e.writeFloatLE=t.bind(null,r),e.writeFloatBE=t.bind(null,n),e.readFloatLE=s.bind(null,i),e.readFloatBE=s.bind(null,o)}(),"undefined"!=typeof Float64Array?function(){var t=new Float64Array([-0]),r=new Uint8Array(t.buffer),n=128===r[7];function i(e,n,i){t[0]=e,n[i]=r[0],n[i+1]=r[1],n[i+2]=r[2],n[i+3]=r[3],n[i+4]=r[4],n[i+5]=r[5],n[i+6]=r[6],n[i+7]=r[7]}function o(e,n,i){t[0]=e,n[i]=r[7],n[i+1]=r[6],n[i+2]=r[5],n[i+3]=r[4],n[i+4]=r[3],n[i+5]=r[2],n[i+6]=r[1],n[i+7]=r[0]}function s(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 a(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?i:o,e.writeDoubleBE=n?o:i,e.readDoubleLE=n?s:a,e.readDoubleBE=n?a:s}():function(){function t(e,t,r,n,i,o){var s=n<0?1:0;if(s&&(n=-n),0===n)e(0,i,o+t),e(1/n>0?0:2147483648,i,o+r);else if(isNaN(n))e(0,i,o+t),e(2146959360,i,o+r);else if(n>17976931348623157e292)e(0,i,o+t),e((s<<31|2146435072)>>>0,i,o+r);else{var a;if(n<22250738585072014e-324)e((a=n/5e-324)>>>0,i,o+t),e((s<<31|a/4294967296)>>>0,i,o+r);else{var u=Math.floor(Math.log(n)/Math.LN2);1024===u&&(u=1023),e(4503599627370496*(a=n*Math.pow(2,-u))>>>0,i,o+t),e((s<<31|u+1023<<20|1048576*a&1048575)>>>0,i,o+r)}}}function s(e,t,r,n,i){var o=e(n,i+t),s=e(n,i+r),a=2*(s>>31)+1,u=s>>>20&2047,c=4294967296*(1048575&s)+o;return 2047===u?c?NaN:a*(1/0):0===u?5e-324*a*c:a*Math.pow(2,u-1075)*(c+4503599627370496)}e.writeDoubleLE=t.bind(null,r,0,4),e.writeDoubleBE=t.bind(null,n,4,0),e.readDoubleLE=s.bind(null,i,0,4),e.readDoubleBE=s.bind(null,o,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 i(e,t){return(e[t]|e[t+1]<<8|e[t+2]<<16|e[t+3]<<24)>>>0}function o(e,t){return(e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3])>>>0}e.exports=t(t)},9423:function(e,t,r){"use strict";var n=r(4644),i=r(9039),o=r(7680),s=n.aTypedArray,a=n.getTypedArrayConstructor;(0,n.exportTypedArrayMethod)("slice",(function(e,t){for(var r=o(s(this),e,t),n=a(this),i=0,u=r.length,c=new n(u);u>i;)c[i]=r[i++];return c}),i((function(){new Int8Array(1).slice()})))},9432:function(e,t,r){"use strict";var n=r(6518),i=r(8981),o=r(1072);n({target:"Object",stat:!0,forced:r(9039)((function(){o(1)}))},{keys:function(e){return o(i(e))}})},9433:function(e,t,r){"use strict";var n=r(4576),i=Object.defineProperty;e.exports=function(e,t){try{i(n,e,{value:t,configurable:!0,writable:!0})}catch(r){n[e]=t}return t}},9449:function(e,t,r){"use strict";var n,i=r(6518),o=r(7476),s=r(7347).f,a=r(8014),u=r(655),c=r(5749),l=r(7750),d=r(1436),f=r(6395),h=o("".slice),p=Math.min,v=d("endsWith");i({target:"String",proto:!0,forced:!(!f&&!v&&(n=s(String.prototype,"endsWith"),n&&!n.writable)||v)},{endsWith:function(e){var t=u(l(this));c(e);var r=arguments.length>1?arguments[1]:void 0,n=t.length,i=void 0===r?n:p(a(r),n),o=u(e);return h(t,i-o.length,i)===o}})},9463:function(e,t,r){"use strict";var n=r(6518),i=r(3724),o=r(4576),s=r(9504),a=r(9297),u=r(4901),c=r(1625),l=r(655),d=r(2106),f=r(7740),h=o.Symbol,p=h&&h.prototype;if(i&&u(h)&&(!("description"in p)||void 0!==h().description)){var v={},m=function(){var e=arguments.length<1||void 0===arguments[0]?void 0:l(arguments[0]),t=c(p,this)?new h(e):void 0===e?h():h(e);return""===e&&(v[t]=!0),t};f(m,h),m.prototype=p,p.constructor=m;var _="Symbol(description detection)"===String(h("description detection")),g=s(p.valueOf),E=s(p.toString),y=/^Symbol\((.*)\)[^)]+$/,O=s("".replace),T=s("".slice);d(p,"description",{configurable:!0,get:function(){var e=g(this);if(a(v,e))return"";var t=E(e),r=_?T(t,7,-1):O(t,y,"$1");return""===r?void 0:r}}),n({global:!0,constructor:!0,forced:!0},{Symbol:m})}},9472:function(e,t,r){"use strict";var n,i=r(4576),o=r(8745),s=r(4901),a=r(4215),u=r(2839),c=r(7680),l=r(2812),d=i.Function,f=/MSIE .\./.test(u)||"BUN"===a&&((n=i.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 f?function(n,i){var a=l(arguments.length,1)>r,u=s(n)?n:d(n),f=a?c(arguments,r):[],h=a?function(){o(u,this,f)}:u;return t?e(h,i):e(h)}:e}},9504:function(e,t,r){"use strict";var n=r(616),i=Function.prototype,o=i.call,s=n&&i.bind.bind(o,o);e.exports=n?s:function(e){return function(){return o.apply(e,arguments)}}},9519:function(e,t,r){"use strict";var n,i,o=r(4576),s=r(2839),a=o.process,u=o.Deno,c=a&&a.versions||u&&u.version,l=c&&c.v8;l&&(i=(n=l.split("."))[0]>0&&n[0]<4?1:+(n[0]+n[1])),!i&&s&&(!(n=s.match(/Edge\/(\d+)/))||n[1]>=74)&&(n=s.match(/Chrome\/(\d+)/))&&(i=+n[1]),e.exports=i},9532:function(e,t,r){"use strict";r.d(t,{c:function(){return i}}),r(9089);var n=r(4269),i=function(){function e(e){var t=e.type,r=e.id;this.id=r,this.type=t}return e.prototype.set=function(e){this.body={id:this.id,chatType:e.chatType||"singleChat",type:"channel",to:e.to,from:e.from||"",time:Date.now()}},e.prototype.setChatType=function(e){return!!this.body&&(this.body.chatType=e,!0)},e.prototype.setGroup=function(e){return!!this.body&&(this.body.group=e,!0)},e.create=function(e){return{id:n.Wp.getUniqueId(),mid:e.mid,type:"channel",chatType:e.chatType||"singleChat",to:e.to,from:e.from||"",time:Date.now(),isChatThread:e.isChatThread,priority:e.priority,deliverOnlineOnly:e.deliverOnlineOnly}},e}()},9539:function(e,t,r){"use strict";var n=r(9565),i=r(8551),o=r(5966);e.exports=function(e,t,r){var s,a;i(e);try{if(!(s=o(e,"return"))){if("throw"===t)throw r;return r}s=n(s,e)}catch(e){a=!0,s=e}if("throw"===t)throw r;if(a)throw s;return i(s),r}},9544:function(e,t,r){"use strict";var n=r(2839);e.exports=/(?:ipad|iphone|ipod).*applewebkit/i.test(n)},9565:function(e,t,r){"use strict";var n=r(616),i=Function.prototype.call;e.exports=n?i.bind(i):function(){return i.apply(i,arguments)}},9590:function(e,t,r){"use strict";var n=r(1291),i=RangeError;e.exports=function(e){var t=n(e);if(t<0)throw new i("The argument can't be less than 0");return t}},9617:function(e,t,r){"use strict";var n=r(5397),i=r(5610),o=r(6198),s=function(e){return function(t,r,s){var a=n(t),u=o(a);if(0===u)return!e&&-1;var c,l=i(s,u);if(e&&r!=r){for(;u>l;)if((c=a[l++])!=c)return!0}else for(;u>l;l++)if((e||l in a)&&a[l]===r)return e||l||0;return!e&&-1}};e.exports={includes:s(!0),indexOf:s(!1)}},9638:function(e){"use strict";var t=4096,r=65547,n=15,i=2113929216,o=65536,s=65536,a=10485760,u={MANUAL:0,AUTO_IMMEDIATE:1,AUTO_THRESHOLD:2},c={SUCCESS:0,FAILED:-1,NOT_INITIALIZED:-2,INITIALIZED_FAILED:-3,COMPRESS_FAILED:-4,DECOMPRESS_FAILED:-5,PARAM_ERROR:-6,BUFFER_RESIZE_FAILED:-7};function l(e){if(!(e>0))return s;if(e<=s)return s;if(e>1073741823)return e;for(var t=s;t<e;)t*=2;return t}var d={byU16:0,byU32:1};function f(e,t){return(e[t]|e[t+1]<<8|e[t+2]<<16|e[t+3]<<24)>>>0}var h="fast";function p(e){return 2654435761*(e>>>0)>>>20&4095}function v(e){return 2654435761*(e>>>0)>>>19&8191}function m(e,t,r){if("fast"===h){var n=f(e,t);return r===d.byU16?v(n):p(n)}throw new Error("Unsupported hash strategy: "+h)}function _(e,t,r,n,i){r[t]=e-i}function g(e,t,r,n,i){_(t,m(e,t,n),r,0,i)}function E(e,t,r,n){return t[e]+n}function y(e,t,r,n,i){return E(m(e,t,n),r,0,i)}function O(e,t,r,n){for(var i=t;t<n-3;){if(f(e,t)!==f(e,r)){for(;t<n&&e[t]===e[r];)t++,r++;return t-i}t+=4,r+=4}for(;t<n&&e[t]===e[r];)t++,r++;return t-i}function T(e,t,o,s,a,u,c,l,f,h){var p,v,T,C,b,N,A=e.hashTable,M=s,w=M-e.dictSize,L=e.dictionary,U=e.dictionaryStart,x=U+e.dictSize,D=e.dictSize>0?x-s:0,P=s,k=s+a,F=k-12,H=k-5,B=0,G=u>0?u:o.length,W=0;if(a>i)return 0;switch(f){case 0:default:p=s,v=s;break;case 1:p=s-e.currentOffset,v=s-e.dictSize;break;case 2:p=s-e.currentOffset,v=s}if(l===d.byU16&&a>=r)return 0;if(a<13)return S(t,o,P,k,B,G,c);g(t,M,A,l,p),T=m(t,++M,l);e:for(;;){var j,q,K=M,z=1,V=64;do{var J=T;if(M=K,K+=z,z=V++>>>6,K>F)return S(t,o,P,k,B,G,c);j=E(J,A,0,p),2===f&&(j<s?(W=D,v=U):(W=0,v=s)),T=m(t,K,l),_(M,J,A,0,p)}while(1===h&&j<w||l!==d.byU16&&j+65535<M||!R(t,L,M,j,W,f,s));for(;M>P&&j+W>v;){var Y=j+W-1;if(t[M-1]!==(2===f&&j<s?L[Y-U+e.dictionaryStart]:t[Y]))break;M--,j--}var X=M-P;if(q=B++,c&&B+X+8+Math.floor(X/255)>G)return 0;if(X>=n){var Q=X-n;for(o[q]=240;Q>=255;)o[B++]=255,Q-=255;o[B++]=Q}else o[q]=X<<4;if(X>=16&&o.set&&t.subarray)o.set(t.subarray(P,P+X),B),B+=X;else for(var $=0;$<X;$++)o[B++]=t[P+$];t:for(;;){var Z;if(N=M-j,(C=o)[b=B]=255&N,C[b+1]=N>>>8&255,B+=2,2===f&&j<s){var ee=M+(x-(j+W));if(ee>H&&(ee=H),(M+=4+(Z=I(t,L,M+4,j+W+4-U+e.dictionaryStart,ee,x-U)))===ee&&ee<H){var te=O(t,M,s,H);Z+=te,M+=te}}else M+=4+(Z=O(t,M+4,j+4,H));if(c&&B+6+(Z>>>8)>G)return 0;if(Z>=15){for(o[q]+=15,Z-=15;Z>=510;)o[B++]=255,o[B++]=255,Z-=510;Z>=255&&(Z-=255,o[B++]=255),o[B++]=Z}else o[q]+=Z;if(P=M,M>F)break e;if(g(t,M-2,A,l,p),j=y(t,M,A,l,p),2===f&&(j<s?(W=D,v=U):(W=0,v=s)),g(t,M,A,l,p),!((1!==h||j>=w)&&j+65535>=M&&R(t,L,M,j,W,f,s)))break t;o[q=B++]=0}T=m(t,++M,l)}return S(t,o,P,k,B,G,c)}function R(e,t,r,n,i,o,s){return f(e,r)===f(2===o&&n+i<s?t:e,n+i)}function I(e,t,r,n,i,o,s){for(var a=r;n<o&&r<i&&t[n]===e[r];)n++,r++;return r-a}function S(e,t,r,i,o,s,a){var u=i-r;if(a&&o+u+1+Math.floor((u+255-n)/255)>s)return 0;if(u>=n){for(t[o++]=240,u-=n;u>=255;)t[o++]=255,u-=255;t[o++]=u}else t[o++]=u<<4;var c=r,l=i,d=l-c;if(d>=16&&t.set&&e.subarray)t.set(e.subarray(c,l),o),o+=d;else for(var f=c;f<l;f++)t[o++]=e[f];return o}function C(e,t,r,n){var i,o=0;if(n&&t.ip>=r)return-1;do{if(o+=i=e[t.ip++],t.ip>r)return-1;if(o>2147483647)return-1}while(255===i);return o}function b(e,t,r,i,o,s,a,u,c,l,d,f,h){if(null==e)return-1;if(s<0)return-1;var p,v,m=r,_=r+i,g=o,E=o+s,y=o+c,O=d-h,T=f+h,R=h<65536;if(u&&y>E-12&&(y=E-12),0===s)return u||1===i&&0===e[m]?0:-1;if(0===i)return-1;for(;;){var I,S,b,N;if(m>=_)return-(m-r)-1;if((S=(I=e[m++])>>>4)===n){var A=C(e,L={ip:m},_-n,!0);if(m=L.ip,-1===A)return-(m-r)-1;if(g+(S+=A)<g)return-(m-r)-1;if(m+S<m)return-(m-r)-1}if(b=g+S,a&&(b>(u?y:E-12)||m+S>_-8)||!a&&b>E-8){if(u)m+S>_&&(b=g+(S=_-m)),b>E&&(b=E,S=E-g);else{if(!a&&b!==E)return-(m-r)-1;if(a&&(m+S!==_||b>E))return-(m-r)-1}if(S>=16&&t.set&&e.subarray)t.set(e.subarray(m,m+S),g);else for(var M=0;M<S;M++)t[g+M]=e[m+M];if(m+=S,g+=S,!u||b===E||m>=_-2)break;if(!u)break}if(S>=16&&t.set&&e.subarray)t.set(e.subarray(m,m+S),g);else for(M=0;M<S;M++)t[g+M]=e[m+M];if(g=b,(m+=S)+2>_)return-(m-r)-1;var w=(p=e)[v=m]|p[v+1]<<8;if(m+=2,N=b-w,R&&N+h<d)return-(m-r)-1;if(0===w)return-(m-r)-1;if(15==(S=15&I)){var L;if(A=C(e,L={ip:m},_-5+1,!1),m=L.ip,-1===A)return-(m-r)-1;if(g+(S+=A)<g)return-(m-r)-1}if(S+=4,2===l&&N<d){if(g+S>E-5){if(!u)return-(m-r)-1;S=Math.min(S,E-g)}if(S<=d-N){var U=T-(d-N);for(M=0;M<S;M++)t[g+M]=t[U+M];g+=S}else{var x=d-N;for(U=T-x,M=0;M<x;M++)t[g+M]=t[U+M];var D=S-x;if(D>(g+=x)-d)for(var P=d,k=g+D;g<k;)t[g++]=t[P++];else{for(M=0;M<D;M++)t[g+M]=t[d+M];g+=D}}}else{if(N<O)return-(m-r)-1;if(b=g+S,u&&b>E-12){var F=Math.min(S,E-g),H=g+F;if(N+F>g)for(;g<H;)t[g++]=t[N++];else{for(M=0;M<F;M++)t[g+M]=t[N+M];g=H}if(g===E)break}else if(g-N<8)for(t[g]=t[N],t[g+1]=t[N+1],t[g+2]=t[N+2],t[g+3]=t[N+3],g+=4,N+=4;g<b;)t[g++]=t[N++];else for(;g<b;)t[g++]=t[N++]}}return a?g-o:m-r}function N(){return{hashTable:new Uint32Array(t),currentOffset:0,initCheck:0,dictionary:null,dictionaryStart:0,dictSize:0,bufferStart:null}}function A(e){e.hashTable.fill(0),e.currentOffset=0,e.initCheck=0,e.dictionary=null,e.dictionaryStart=0,e.dictSize=0,e.bufferStart=null}function M(e,t,r,n,i,o,s,a){n=n||0,o=o||0;var u=e.dictionaryStart+e.dictSize,c=n;if(e.initCheck)return 0;e.dictSize>0&&c>u&&(c=u),function(e){if(e.currentOffset>2147483648){for(var t=e.currentOffset-65536,r=e.dictionaryStart+e.dictSize,n=0;n<e.hashTable.length;n++)e.hashTable[n]<t?e.hashTable[n]=0:e.hashTable[n]-=t;e.currentOffset=65536,e.dictSize>65536&&(e.dictSize=65536),e.dictionaryStart=r-e.dictSize}}(e);var l,f=n+i;e.dictionary&&f>e.dictionaryStart&&f<u&&(e.dictSize=u-f,e.dictSize>65536&&(e.dictSize=65536),e.dictSize<4&&(e.dictSize=0),e.dictionaryStart=u-e.dictSize);var h=e.dictSize<65536&&e.dictSize<e.currentOffset?1:0;return e.dictionary&&u===n?(l=T(e,t,r,n,i,s||0,a||!1,d.byU32,1,h),e.dictSize+=i,e.currentOffset+=i,l):(l=T(e,t,r,n,i,s||0,a||!1,d.byU32,2,h),e.dictionary=t,e.dictionaryStart=n,e.dictSize=i,e.currentOffset+=i,l)}function w(e,t,r,n){var i=e.dictionaryStart+e.dictSize;n>65536&&(n=65536),n>e.dictSize&&(n=e.dictSize);var o=i-n;if(t.set&&e.dictionary.subarray)t.set(e.dictionary.subarray(o,o+n),r);else for(var s=0;s<n;s++)t[r+s]=e.dictionary[o+s];return e.dictionary=t,e.dictionaryStart=r,e.dictSize=n,n}function L(e,t,r,n){return e.prefixSize=n,e.prefixEnd=r+n,e.externalDict=null,e.extDictStart=0,e.extDictSize=0,1}function U(e,t,r,n,i,o,s){var a;if(e.prefixEnd===o){if((a=b(t,r,n,i,o,s,!0,!1,0,2,e.prefixEnd-e.prefixSize,e.extDictStart,e.extDictSize))<=0)return a;e.prefixSize+=a,e.prefixEnd+=a}else{if(e.extDictSize=e.prefixSize,e.extDictStart=e.prefixEnd-e.extDictSize,(a=b(t,r,n,i,o,s,!0,!1,0,2,o,e.extDictStart,e.extDictSize))<=0)return a;e.prefixSize=a,e.prefixEnd=o+a}return a}function x(e){var t=(e=e||{}).minWorkArea||s,r=e.maxWorkArea||a,n=e.shrinkThreshold||t;t<s&&(t=s),r<t&&(r=t),n<t&&(n=t),n>r&&(n=r),this.minBufferSize=o+t,this.maxBufferSize=o+r,this.shrinkThreshold=o+n,this.ringBufferSize=this.minBufferSize,this.shrinkMode=void 0!==e.shrinkMode?e.shrinkMode:u.MANUAL,this.ringBuffer=new Uint8Array(this.ringBufferSize),this.offset=0,this.stream=N()}function D(e){var t=(e=e||{}).minWorkArea||s,r=e.maxWorkArea||a,n=e.shrinkThreshold||t;t<s&&(t=s),r<t&&(r=t),n<t&&(n=t),n>r&&(n=r),this.minBufferSize=o+t,this.maxBufferSize=o+r,this.shrinkThreshold=o+n,this.ringBufferSize=this.minBufferSize,this.shrinkMode=void 0!==e.shrinkMode?e.shrinkMode:u.MANUAL,this.ringBuffer=new Uint8Array(this.ringBufferSize),this.offset=0,this.streamDecode={externalDict:null,extDictStart:0,extDictSize:0,prefixEnd:0,prefixSize:0}}x.prototype._resizeBuffer=function(e){var t=new Uint8Array(e),r=0;if(this.offset>0){var n=this.offset<o?this.offset:o,i=this.offset>o?this.offset-o:0;t.set(this.ringBuffer.subarray(i,i+n),0),w(this.stream,t,0,n),r=n}return this.ringBuffer=t,this.ringBufferSize=e,this.offset=r,!0},x.prototype.compress=function(e,t){var r=e.length;if(r<=0)return c.PARAM_ERROR;if(r>this.maxBufferSize-o)return c.PARAM_ERROR;if(r>this.ringBufferSize-o){var n=l(r),i=o+n;if(i>this.maxBufferSize&&(i=this.maxBufferSize),!this._resizeBuffer(i))return c.BUFFER_RESIZE_FAILED}this.offset+r>this.ringBufferSize&&(w(this.stream,this.ringBuffer,0,o),this.offset=o);var s=this.offset;this.ringBuffer.set(e,s);var a=M(this.stream,this.ringBuffer,t,s,r,0,t.length,!0);return a<=0?c.COMPRESS_FAILED:(this.offset+=r,this._tryAutoShrink(),a)},x.prototype.reset=function(){this.offset=0,A(this.stream)},x.prototype.shrink=function(){this.ringBufferSize>this.minBufferSize&&this._resizeBuffer(this.minBufferSize)},x.prototype._tryAutoShrink=function(){this.shrinkMode!==u.MANUAL&&(this.ringBufferSize<=this.minBufferSize||(this.shrinkMode===u.AUTO_IMMEDIATE||this.shrinkMode===u.AUTO_THRESHOLD&&this.ringBufferSize>this.shrinkThreshold)&&this.shrink())},x.prototype.getWorkArea=function(){return this.ringBufferSize-o},x.prototype.getRingBufferSize=function(){return this.ringBufferSize},x.prototype.getBaseBufferSize=function(){return this.minBufferSize},x.prototype.getMaxBufferSize=function(){return this.maxBufferSize},x.prototype.getCurrentOffset=function(){return this.offset},x.prototype.getShrinkMode=function(){return this.shrinkMode},x.prototype.setShrinkMode=function(e){this.shrinkMode=e},x.prototype.getShrinkThreshold=function(){return this.shrinkThreshold},x.prototype.setShrinkThreshold=function(e){var t=this.minBufferSize-o,r=this.maxBufferSize-o;if(e<t||e>r)return c.PARAM_ERROR;this.shrinkThreshold=o+e},D.prototype._resizeBuffer=function(e){var t=new Uint8Array(e),r=0;if(this.offset>0){var n=this.offset<o?this.offset:o,i=this.offset>o?this.offset-o:0;t.set(this.ringBuffer.subarray(i,i+n),0),r=n,L(this.streamDecode,0,0,n)}return this.ringBuffer=t,this.ringBufferSize=e,this.offset=r,!0},D.prototype.decompress=function(e,t,r){var n=e.length;if(n<=0||r<=0)return c.PARAM_ERROR;if(r>this.maxBufferSize-o)return c.PARAM_ERROR;if(r>this.ringBufferSize-o){var i=l(r),s=o+i;if(s>this.maxBufferSize&&(s=this.maxBufferSize),!this._resizeBuffer(s))return c.BUFFER_RESIZE_FAILED}if(this.offset+r>this.ringBufferSize){var a=this.offset-o;a>0&&this.ringBuffer.set(this.ringBuffer.subarray(a,a+o),0),L(this.streamDecode,this.ringBuffer,0,o),this.offset=o}var u=U(this.streamDecode,e,this.ringBuffer,0,n,this.offset,r);return u<=0?c.DECOMPRESS_FAILED:(t.set(this.ringBuffer.subarray(this.offset,this.offset+u),0),this.offset+=u,this._tryAutoShrink(),u)},D.prototype.reset=function(){this.offset=0,this.streamDecode={externalDict:null,extDictStart:0,extDictSize:0,prefixEnd:0,prefixSize:0}},D.prototype.shrink=function(){this.ringBufferSize>this.minBufferSize&&this._resizeBuffer(this.minBufferSize)},D.prototype._tryAutoShrink=function(){this.shrinkMode!==u.MANUAL&&(this.ringBufferSize<=this.minBufferSize||(this.shrinkMode===u.AUTO_IMMEDIATE||this.shrinkMode===u.AUTO_THRESHOLD&&this.ringBufferSize>this.shrinkThreshold)&&this.shrink())},D.prototype.getWorkArea=function(){return this.ringBufferSize-o},D.prototype.getRingBufferSize=function(){return this.ringBufferSize},D.prototype.getBaseBufferSize=function(){return this.minBufferSize},D.prototype.getMaxBufferSize=function(){return this.maxBufferSize},D.prototype.getCurrentOffset=function(){return this.offset},D.prototype.getShrinkMode=function(){return this.shrinkMode},D.prototype.setShrinkMode=function(e){this.shrinkMode=e},D.prototype.getShrinkThreshold=function(){return this.shrinkThreshold},D.prototype.setShrinkThreshold=function(e){var t=this.minBufferSize-o,r=this.maxBufferSize-o;if(e<t||e>r)return c.PARAM_ERROR;this.shrinkThreshold=o+e},e.exports={LZ4_MAX_INPUT_SIZE:i,BLOCK_MAX_SIZE:65536,DICT_SIZE:o,DEFAULT_WORK_AREA:s,DEFAULT_MAX_WORK:a,SHRINK_MODE:u,LZ4_ERROR:c,alignToPowerOf2:l,calcDefaultBufferSize:function(){return 131072},calcDefaultMaxBufferSize:function(){return 10551296},setHashStrategy:function(e){if("fast"!==e&&"compatible"!==e)throw new Error("Invalid hash strategy: "+e+'. Use "fast" or "compatible".');h=e},getHashStrategy:function(){return h},compress:function(e,n,o,s,a){if(null==e)return 0;if(null==n)return 0;if(o=o||0,s=void 0===s?e.length:s,a=a||0,o<0||a<0)return 0;if(s<0)return 0;if(o+s>e.length)return 0;if(s>i)return 0;if(0===s)return n.length>a?(n[a]=0,1):0;var u=s<r?d.byU16:d.byU32;return T({hashTable:new Uint32Array(u===d.byU16?8192:t),currentOffset:0,dictSize:0,dictionary:null,dictionaryStart:0},e,n,o,s,0,!1,u,0,0)},compressLimited:function(e,n,o,s,a,u){if(null==e)return 0;if(null==n)return 0;if(o=o||0,s=void 0===s?e.length:s,a=a||0,o<0||a<0)return 0;if(s<0||u<0)return 0;if(o+s>e.length)return 0;if(s>i)return 0;if(u<1)return 0;if(0===s)return n[a]=0,1;var c=s<r?d.byU16:d.byU32;return T({hashTable:new Uint32Array(c===d.byU16?8192:t),currentOffset:0,dictSize:0,dictionary:null,dictionaryStart:0},e,n,o,s,u,!0,c,0,0)},compressBound:function(e){return e<0||e>i?0:e+Math.floor(e/255)+16},decompressSafe:function(e,t,r,n,i,o){return null==e||null==t?-1:(i=i||0,(r=r||0)<0||i<0||n<0||o<0||r+n>e.length||i+o>t.length?-1:b(e,t,r,n,i,o,!0,!1,0,0,i,null,0))},decompressFast:function(e,t,r,n,i){return b(e,t,r=r||0,0,n=n||0,i,!1,!1,0,1,n-65536,0,65536)},createStream:N,resetStream:A,loadDict:function(e,t,r,n){if(e.initCheck&&A(e),n<4)return e.dictionary=null,e.dictSize=0,0;n>65536&&(r=r+n-65536,n=65536);var i=r-e.currentOffset;e.dictionary=t,e.dictionaryStart=r,e.dictSize=n,e.currentOffset+=n;for(var o=r,s=r+n;o<=s-4;)g(t,o,e.hashTable,d.byU32,i),o+=3;return n},compressContinue:M,saveDict:w,createStreamDecode:function(){return{externalDict:null,extDictStart:0,extDictSize:0,prefixEnd:0,prefixSize:0}},setStreamDecode:L,decompressSafeContinue:U,RingBufferEncoder:x,RingBufferDecoder:D,_hashU16:v,_hashU32:p,_TABLE_TYPE:d}},9687:function(e,t,r){"use strict";e.exports=a;var n=r(8923);((a.prototype=Object.create(n.prototype)).constructor=a).className="Service";var i=r(8811),o=r(3262),s=r(5047);function a(e,t){n.call(this,e,t),this.methods={},this._methodsArray=null}function u(e){return e._methodsArray=null,e}a.fromJSON=function(e,t){var r=new a(e,t.options);if(t.methods)for(var n=Object.keys(t.methods),o=0;o<n.length;++o)r.add(i.fromJSON(n[o],t.methods[n[o]]));return t.nested&&r.addJSON(t.nested),r.comment=t.comment,r},a.prototype.toJSON=function(e){var t=n.prototype.toJSON.call(this,e),r=!!e&&Boolean(e.keepComments);return o.toObject(["options",t&&t.options||void 0,"methods",n.arrayToJSON(this.methodsArray,e)||{},"nested",t&&t.nested||void 0,"comment",r?this.comment:void 0])},Object.defineProperty(a.prototype,"methodsArray",{get:function(){return this._methodsArray||(this._methodsArray=o.toArray(this.methods))}}),a.prototype.get=function(e){return this.methods[e]||n.prototype.get.call(this,e)},a.prototype.resolveAll=function(){for(var e=this.methodsArray,t=0;t<e.length;++t)e[t].resolve();return n.prototype.resolve.call(this)},a.prototype.add=function(e){if(this.get(e.name))throw Error("duplicate name '"+e.name+"' in "+this);return e instanceof i?(this.methods[e.name]=e,e.parent=this,u(this)):n.prototype.add.call(this,e)},a.prototype.remove=function(e){if(e instanceof i){if(this.methods[e.name]!==e)throw Error(e+" is not a member of "+this);return delete this.methods[e.name],e.parent=null,u(this)}return n.prototype.remove.call(this,e)},a.prototype.create=function(e,t,r){for(var n,i=new s.Service(e,t,r),a=0;a<this.methodsArray.length;++a){var u=o.lcFirst((n=this._methodsArray[a]).resolve().name).replace(/[^$\w_]/g,"");i[u]=o.codegen(["r","c"],o.isReserved(u)?u+"_":u)("return this.rpcCall(m,q,s,r,c)")({m:n,q:n.resolvedRequestType.ctor,s:n.resolvedResponseType.ctor})}return i}},9773:function(e,t,r){"use strict";var n=r(6518),i=r(4495),o=r(9039),s=r(3717),a=r(8981);n({target:"Object",stat:!0,forced:!i||o((function(){s.f(1)}))},{getOwnPropertySymbols:function(e){var t=s.f;return t?t(a(e)):[]}})},9868:function(e,t,r){"use strict";var n=r(6518),i=r(9504),o=r(1291),s=r(1240),a=r(2333),u=r(9039),c=RangeError,l=String,d=Math.floor,f=i(a),h=i("".slice),p=i(1..toFixed),v=function(e,t,r){return 0===t?r:t%2==1?v(e,t-1,r*e):v(e*e,t/2,r)},m=function(e,t,r){for(var n=-1,i=r;++n<6;)i+=t*e[n],e[n]=i%1e7,i=d(i/1e7)},_=function(e,t){for(var r=6,n=0;--r>=0;)n+=e[r],e[r]=d(n/t),n=n%t*1e7},g=function(e){for(var t=6,r="";--t>=0;)if(""!==r||0===t||0!==e[t]){var n=l(e[t]);r=""===r?n:r+f("0",7-n.length)+n}return r};n({target:"Number",proto:!0,forced:u((function(){return"0.000"!==p(8e-5,3)||"1"!==p(.9,0)||"1.25"!==p(1.255,2)||"1000000000000000128"!==p(0xde0b6b3a7640080,0)}))||!u((function(){p({})}))},{toFixed:function(e){var t,r,n,i,a=s(this),u=o(e),d=[0,0,0,0,0,0],p="",E="0";if(u<0||u>20)throw new c("Incorrect fraction digits");if(a!=a)return"NaN";if(a<=-1e21||a>=1e21)return l(a);if(a<0&&(p="-",a=-a),a>1e-21)if(r=(t=function(e){for(var t=0,r=e;r>=4096;)t+=12,r/=4096;for(;r>=2;)t+=1,r/=2;return t}(a*v(2,69,1))-69)<0?a*v(2,-t,1):a/v(2,t,1),r*=4503599627370496,(t=52-t)>0){for(m(d,0,r),n=u;n>=7;)m(d,1e7,0),n-=7;for(m(d,v(10,n,1),0),n=t-1;n>=23;)_(d,1<<23),n-=23;_(d,1<<n),m(d,1,1),_(d,2),E=g(d)}else m(d,0,r),m(d,1<<-t,0),E=g(d)+f("0",u);return u>0?p+((i=E.length)<=u?"0."+f("0",u-i)+E:h(E,0,i-u)+"."+h(E,i-u)):p+E}})},9948:function(e,t,r){"use strict";var n=r(5370),i=r(4644).getTypedArrayConstructor;e.exports=function(e,t){return n(i(e),t)}},9955:function(e,t,r){"use strict";var n=r(4644),i=r(9213).findIndex,o=n.aTypedArray;(0,n.exportTypedArrayMethod)("findIndex",(function(e){return i(o(this),e,arguments.length>1?arguments[1]:void 0)}))}},__webpack_module_cache__={},deferred;function __webpack_require__(e){var t=__webpack_module_cache__[e];if(void 0!==t)return t.exports;var r=__webpack_module_cache__[e]={exports:{}};return __webpack_modules__[e].call(r.exports,r,r.exports,__webpack_require__),r.exports}__webpack_require__.m=__webpack_modules__,__webpack_require__.amdO={},deferred=[],__webpack_require__.O=function(e,t,r,n){if(!t){var i=1/0;for(u=0;u<deferred.length;u++){t=deferred[u][0],r=deferred[u][1],n=deferred[u][2];for(var o=!0,s=0;s<t.length;s++)(!1&n||i>=n)&&Object.keys(__webpack_require__.O).every((function(e){return __webpack_require__.O[e](t[s])}))?t.splice(s--,1):(o=!1,n<i&&(i=n));if(o){deferred.splice(u--,1);var a=r();void 0!==a&&(e=a)}}return e}n=n||0;for(var u=deferred.length;u>0&&deferred[u-1][2]>n;u--)deferred[u]=deferred[u-1];deferred[u]=[t,r,n]},__webpack_require__.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return __webpack_require__.d(t,{a:t}),t},__webpack_require__.d=function(e,t){for(var r in t)__webpack_require__.o(t,r)&&!__webpack_require__.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},__webpack_require__.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),__webpack_require__.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},__webpack_require__.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},function(){var e={891:0};__webpack_require__.O.j=function(t){return 0===e[t]};var t=function(t,r){var n,i,o=r[0],s=r[1],a=r[2],u=0;if(o.some((function(t){return 0!==e[t]}))){for(n in s)__webpack_require__.o(s,n)&&(__webpack_require__.m[n]=s[n]);if(a)var c=a(__webpack_require__)}for(t&&t(r);u<o.length;u++)i=o[u],__webpack_require__.o(e,i)&&e[i]&&e[i][0](),e[i]=0;return __webpack_require__.O(c)},r=self.webpackChunkwebsdk=self.webpackChunkwebsdk||[];r.forEach(t.bind(null,0)),r.push=t.bind(null,r.push.bind(r))}();var __webpack_exports__={};return function(){"use strict";__webpack_require__.d(__webpack_exports__,{default:function(){return Z}}),__webpack_require__(2675),__webpack_require__(9463),__webpack_require__(2259),__webpack_require__(8706),__webpack_require__(2008),__webpack_require__(1629),__webpack_require__(4423),__webpack_require__(3792),__webpack_require__(2712),__webpack_require__(4743),__webpack_require__(1745),__webpack_require__(8309),__webpack_require__(9089),__webpack_require__(739),__webpack_require__(3288),__webpack_require__(4170),__webpack_require__(2010),__webpack_require__(6033),__webpack_require__(2892),__webpack_require__(9085),__webpack_require__(9432),__webpack_require__(6099),__webpack_require__(3362),__webpack_require__(1699),__webpack_require__(7764),__webpack_require__(1392),__webpack_require__(1489),__webpack_require__(1630),__webpack_require__(2170),__webpack_require__(5044),__webpack_require__(1920),__webpack_require__(1694),__webpack_require__(9955),__webpack_require__(3206),__webpack_require__(4496),__webpack_require__(6651),__webpack_require__(2887),__webpack_require__(9369),__webpack_require__(6812),__webpack_require__(8995),__webpack_require__(1575),__webpack_require__(6072),__webpack_require__(8747),__webpack_require__(8845),__webpack_require__(9423),__webpack_require__(7301),__webpack_require__(373),__webpack_require__(6614),__webpack_require__(1405),__webpack_require__(3684),__webpack_require__(3500),__webpack_require__(2953),__webpack_require__(6031);var e=__webpack_require__(2549),t=__webpack_require__.n(e),r=__webpack_require__(8570),n=__webpack_require__.n(r),i=__webpack_require__(7535),o=__webpack_require__(4269),s=__webpack_require__(7968),a=__webpack_require__(6646),u=["onTextMessage","onFileMessage","onAudioMessage","onVideoMessage","onImageMessage","onLocationMessage","onCustomMessage","onCMDMessage","onStreamMessage"],c=function(){function e(e,t,r){this.handlerData={},this.handlerData={},e.addEventHandler=this.addEventHandler.bind(this),e.removeEventHandler=this.removeEventHandler.bind(this)}return e.prototype.addEventHandler=function(e,t){this.handlerData[e]=t},e.prototype.removeEventHandler=function(e){delete this.handlerData[e]},e.prototype.dispatch=function(e,t){for(var r in u.includes(e)&&t?s.vF.debug("dispatch event: "+e,{id:t.id,type:t.type,time:t.time,from:t.from,to:t.to,chatType:t.chatType}):"onMessage"===e?s.vF.debug("dispatch event: "+e,null==t?void 0:t.length):s.vF.debug("dispatch event: "+e,t||""),this.handlerData){var n=this.handlerData[r][e];n&&n(t)}},e}(),l=(__webpack_require__(5276),{biz:"",debug:!1,token:""}),d="https://data-reporting.rtnsvc.com/report",f="https://data-reporting.realtimemesh.com/report",h=__webpack_require__(9061),p=__webpack_require__(3603),v=function(e){var t=Number(p.S5[e]);return t===p.S5.USER_LOGIN?"MANUALLOGIN":t===p.S5.MSYNC_SENDMESSAGE?"SENDMESSAGE":t>p.S5.UNKNOWOPERATION&&t<p.S5.REST_OPERATE?"REST":t>p.S5.REST_OPERATE&&t<p.S5.MSYNC_OPERATE?"MESSAGE":t>p.S5.MSYNC_OPERATE&&t<p.S5.ROSTER_OPERATE?"ROSTER":t>p.S5.ROSTER_OPERATE&&t<p.S5.USER_OPERATE?"USER":t>p.S5.USER_OPERATE&&t<p.S5.GROUP_OPERATE?"GROUP":t>p.S5.GROUP_OPERATE&&t<p.S5.CHATROOM_OPERATE?"CHATROOM":"OPERATION"},m=function(){return(new Date).getTime()},_=function(e){return[o.i9.BAIDU,o.i9.WX,o.i9.DD,o.i9.ZFB,o.i9.TT,o.i9.QUICK_APP,o.i9.UNI].includes(e.platform)},g=function(){return e=1,t=99999,e=Math.ceil(e),t=Math.floor(t),Math.floor(Math.random()*(t-e))+e;var e,t},E=__webpack_require__(4331),y={},O=(__webpack_require__(2062),__webpack_require__(4554),function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]])}return r}),T=1e3,R=function(){function e(e){this.eventQueue=[],this.stock=T,this.config=e,this.governor()}return e.prototype.add=function(e){this.stock<=0?console.warn("Event Report limit ".concat(T," per minute")):(this.eventQueue.push(e),this.consume(),this.stock-=1)},e.prototype.consume=function(){var e=this;0!==this.eventQueue.length&&(this.timer&&this.eventQueue.length<=10&&clearTimeout(this.timer),this.timer=setTimeout((function(){var t,r=e.eventQueue.splice(0,10),n=r.filter((function(e){return e.appId===r[0].appId})),i=r.filter((function(e){return e.appId!==r[0].appId}));(t=e.eventQueue).unshift.apply(t,i),e.batchSend(n)}),1e3))},e.prototype.governor=function(){var e=this,t=setInterval((function(){e.stock=T}),6e4);"undefined"!=typeof addEventListener&&addEventListener("beforeunload",(function(){clearInterval(t)}))},e.prototype.batchSend=function(e){var t,r;if(void 0===e&&(e=[]),0!==e.length)try{var n=e.map((function(e){e.biz,e.appId;var t=e.eventId,r=O(e,["biz","appId","eventId"]);return{eventId:Number(t),body:r}}));!function(e,t){try{var r=t.biz,n=t.appId,i=t.data,s=t.debug,a=t.onSuccess;if(!r)throw new Error("biz is not defined");y.global||(y=o.Wp.getEnvInfo());var u=y;if(_(u)){var c={url:s?f:d,data:i,method:"POST",timeout:E.Gc,success:function(){null==a||a()},fail:function(){},complete:function(){}},l={token:e,appid:null!=n?n:"",sendts:"".concat(Math.floor((new Date).getTime()/1e3)),biz:r,debug:"".concat(s)};if("zfb"===u.platform||"dd"===u.platform?c.headers=l:c.header=l,"dd"===u.platform)return u.global.httpRequest(c);u.global.request(c)}else{var h=new XMLHttpRequest;h.onreadystatechange=function(){2===h.readyState&&(null==a||a())},h.open("POST",s?f:d),h.setRequestHeader("Content-Type","application/json"),h.setRequestHeader("token",e),h.setRequestHeader("appid",null!=n?n:""),h.setRequestHeader("sendts","".concat(Math.floor((new Date).getTime()/1e3))),h.setRequestHeader("biz",r),h.setRequestHeader("debug","".concat(s)),h.send(JSON.stringify(i))}}catch(e){console.error(e)}}(this.config.token,{biz:null===(t=e[0])||void 0===t?void 0:t.biz,appId:null===(r=e[0])||void 0===r?void 0:r.appId,data:n,debug:this.config.debug,onSuccess:this.consume.bind(this)})}catch(e){console.error(e)}},e}(),I=function(){return I=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},I.apply(this,arguments)},S=new(function(){function e(e){this.inited=!1,this.appId="",this.biz="",this.eventQueue={},this.config=l,e&&this.init(e)}return e.prototype.init=function(e){var t;if(void 0===e&&(e={}),!e.biz||!e.token)throw new Error("Event Report: biz or token is not defined");try{this.appId=null!==(t=e.appId)&&void 0!==t?t:"",this.biz=e.biz,this.config=I(I({},l),e),this.eventQueue=new R(this.config),this.log(e),this.inited=!0}catch(e){console.error(e)}},e.prototype.updateAppId=function(e){this.appId=e},e.prototype.send=function(e,t,r){var n;if(void 0===t&&(t={}),this.inited){var i=I(I({},t),{eventId:Number(e),biz:this.biz,appId:null!==(n=null==r?void 0:r.appId)&&void 0!==n?n:this.appId});this.eventQueue.add(i),this.log(i)}else console.error("Event Report: init is not called")},e.prototype.log=function(e){try{if(this.config.debug){var t=e.payload,r=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]])}return r}(e,["payload"]);console.log("%c Event Report: ".concat(this.config.biz," "),"background: #8A97FC; color: #fff"),console.table(r),t&&(console.info("payload:"),console.table(t))}}catch(e){console.error(e)}},e}()),C=function(){return C=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},C.apply(this,arguments)},b={requestName:"",subrequestid:"1",requestMethod:"GET",requestUrl:"",requestElapse:0,code:0,codeDesc:"",isLastApi:0,isSuccess:1},N=function(){function e(e){this.platform=o.Wp.getEnvInfo(),this.isReportDt=e.isReport||!1,this.isCollectDt=!0,_(this.platform)&&!this.isReportDt&&(this.isCollectDt=!1),this.eventQueue=[],this.accessChannel=h.lM,this.options=function(e,t){t.platform||(t=o.Wp.getEnvInfo());var r=e.org,n=e.appkey,i=e.deviceId,s=e.sdkVersion,a=e.uikitVersion,u="undefined"!=typeof navigator?null===navigator||void 0===navigator?void 0:navigator.userAgent:"".concat(t.platform,"_mini_program");return{org:r,appkey:n,deviceId:i,sdkServiceId:"sid_".concat(o.Wp.getUniqueId(),"_").concat(g()),did:u,sdkVersion:s,os:h.Jz,sdkProduct:p.Wz.web,uikitVersion:a}}(e,this.platform),this.sid=this.options.sdkServiceId,this.init(e)}return e.getInstance=function(t){return e.instance||(e.instance=new e(t)),e.instance},e.prototype.getServiceId=function(){return this.sid||"sid_0"},e.prototype.setIsReportDt=function(e){this.isReportDt=e,e&&this.rptEventQueue()},e.prototype.setIsCollectDt=function(e){this.isCollectDt=e,e||(this.eventQueue=[])},e.prototype.rptEventQueue=function(){var e=this;this.eventQueue.length&&this.eventQueue.forEach((function(t,r){S.send(t.eventId,t.dt),r>=e.eventQueue.length-1&&(e.eventQueue=[])}))},e.prototype.init=function(t){e.instance||(e.instance=this,S.init({biz:h.KU,token:h.ey,appId:t.appkey,debug:!1}),this.reportInit())},e.prototype.updateAppKey=function(e){this.options.appkey=e,this.eventQueue.forEach((function(t){"default#appkey"===t.dt.appkey&&(t.dt.appkey=e)}))},e.prototype.reportInit=function(){if(this.isCollectDt){var e=this.options,t=e.did,r=e.os,n=e.sdkVersion,i=e.deviceId;this.reportData(h.uN.INIT,{did:t,os:r,sdkVersion:n,deviceId:i})}},e.prototype.geOperateFun=function(e){var t=this;if(!this.isCollectDt)return function(){};var r=1,n=0,i="",s=m(),a=e.uid,u=e.operationName;a&&(this.uid=a);var c={uid:this.uid,operationId:"opr_".concat(o.Wp.getUniqueId(),"_").concat(g()),requestid:"req_".concat(o.Wp.getUniqueId(),"_").concat(g()),operationName:u};return function(e){var a,l,d,f;if(e.data.isSuccess?(n=0,i=""):(0===e.data.code&&(e.data.code=h.XI),n=null!==(a=e.data.code)&&void 0!==a?a:n,i=null!==(l=e.data.codeDesc)&&void 0!==l?l:i),(null===(d=e.data)||void 0===d?void 0:d.accessChannel)&&(t.accessChannel=null===(f=e.data)||void 0===f?void 0:f.accessChannel),e.isRetry?(r++,e.data.subrequestid="".concat(r)):(c.requestid="req_".concat(o.Wp.getUniqueId(),"_").concat(g()),r=1),e.data.isLastApi){var p=m();e.data.requestElapse=p-s,e.data.requestMethod="",e.data.subrequestid="0",e.data.code=200===n?0:n,e.data.codeDesc=i}else e.data.requestName||(e.data.requestName=u);e.data.requestElapse||(e.data.requestElapse=m()-s),t.reportData.call(t,h.uN.API,C(C(C(C({},b),c),e.data),{accessChannel:t.accessChannel,operationType:v(u)})),e.isEndApi&&t.reportData.call(t,h.uN.API,C(C(C({},c),b),{isSuccess:e.data.isSuccess,isLastApi:1,subrequestid:"0",requestMethod:"",code:200===n?0:n,codeDesc:i,requestElapse:e.data.requestElapse,accessChannel:t.accessChannel,operationType:v(u)}))}},e.prototype.reportData=function(e,t){return r=this,n=void 0,s=function(){var r,n,i,s,a,u,c,l,d;return function(e,t){var r,n,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;s;)try{if(r=1,n&&(i=2&o[0]?n.return:o[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,o[1])).done)return i;switch(n=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,n=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],n=0}finally{r=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}}(this,(function(f){switch(f.label){case 0:return f.trys.push([0,3,,4]),r=m(),n=0,e!==h.uN.API?[3,2]:[4,(v=this.platform,new Promise((function(e){var t;v.platform||(v=o.Wp.getEnvInfo());var r="";if(v.platform===o.i9.WEB){var n=navigator.connection;(null==n?void 0:n.type)?(null==n||n.type,r=p.z1.WIFI):(null==n?void 0:n.effectiveType)&&(r=p.z1[n.effectiveType.toLocaleUpperCase()]),e(r)}else v.platform===o.i9.NODE?(r=p.z1.UNKNOWN,e(r)):null===(t=v.global)||void 0===t||t.getNetworkType({success:function(t){r=p.z1[t.networkType.toLocaleUpperCase()],e(r)}})})))];case 1:n=f.sent(),f.label=2;case 2:return i=this.options,s=i.appkey,a=i.sdkServiceId,u=i.sdkProduct,c=i.uikitVersion,l=C({lts:r,net:n,appkey:s,sdkServiceId:a,sdkProduct:u,uikitVersion:c},t),this.isReportDt?S.send(e,l):this.isCollectDt&&this.eventQueue.push({eventId:e,dt:l}),[3,4];case 3:return d=f.sent(),console.warn(d),[3,4];case 4:return[2]}var v}))},new((i=void 0)||(i=Promise))((function(e,t){function o(e){try{u(s.next(e))}catch(e){t(e)}}function a(e){try{u(s.throw(e))}catch(e){t(e)}}function u(t){var r;t.done?e(t.value):(r=t.value,r instanceof i?r:new i((function(e){e(r)}))).then(o,a)}u((s=s.apply(r,n||[])).next())}));var r,n,i,s},e}(),A=__webpack_require__(3484),M=__webpack_require__(8093),w=__webpack_require__(7468),L=__webpack_require__(8579),U=__webpack_require__(1274),x=__webpack_require__(589),D=__webpack_require__(3850),P=(__webpack_require__(2480),__webpack_require__(3296),__webpack_require__(7208),__webpack_require__(8408),__webpack_require__(686)),k=__webpack_require__(229),F=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function s(e){try{u(n.next(e))}catch(e){o(e)}}function a(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}u((n=n.apply(e,t||[])).next())}))},H=function(e,t){var r,n,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;s;)try{if(r=1,n&&(i=2&o[0]?n.return:o[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,o[1])).done)return i;switch(n=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,n=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],n=0}finally{r=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}};function B(e){return F(this,void 0,void 0,(function(){return H(this,(function(t){return[2,(0,k.K)(e)]}))}))}var G=new(function(){function e(){}return e.prototype.getImageInfo=function(e){return F(this,void 0,void 0,(function(){return H(this,(function(t){return"string"==typeof e?[2,this._getImageInfoFromUrl(e)]:[2,this._getImageInfoFromFile(e)]}))}))},e.prototype._getImageInfoFromFile=function(e){return new Promise((function(t,r){var n=URL.createObjectURL(e),i=new Image;i.onload=function(){URL.revokeObjectURL(n),t({width:i.width,height:i.height,type:e.type})},i.onerror=function(){URL.revokeObjectURL(n),r(new Error("Failed to load image"))},i.src=n}))},e.prototype._getImageInfoFromUrl=function(e){return new Promise((function(t,r){var n=new Image;n.onload=function(){return t({width:n.width,height:n.height})},n.onerror=function(){return r(new Error("Failed to load image from URL"))},n.src=e}))},e.prototype.generateBigImage=function(e,t){return F(this,void 0,void 0,(function(){var r,n,i,o,s,a,u,c,l;return H(this,(function(d){switch(d.label){case 0:if("string"==typeof e)throw new Error("Web image processor requires File input for compression");return[4,this.getImageInfo(e)];case 1:return r=d.sent(),(n=(0,P.s$)(r.width,r.height,t.maxShortEdge)).width===r.width&&n.height===r.height?[2,null]:"function"!=typeof createImageBitmap?[3,3]:[4,createImageBitmap(e)];case 2:return o=d.sent(),[3,5];case 3:return[4,this._loadImage(e)];case 4:o=d.sent(),d.label=5;case 5:if(i=o,s=void 0!==globalThis.OffscreenCanvas?new globalThis.OffscreenCanvas(n.width,n.height):this._createCanvas(n.width,n.height),!(a=s.getContext("2d")))throw new Error("Failed to get canvas context");return a.drawImage(i,0,0,n.width,n.height),u="image/png"===e.type?"image/png":"image/webp"===e.type?"image/webp":"image/jpeg",[4,this._canvasToBlob(s,u,t.quality)];case 6:return c=d.sent(),[2,{file:l=new File([c],e.name||"compressed.jpg",{type:u}),width:n.width,height:n.height,size:l.size,type:u}]}}))}))},e.prototype.computeMd5=function(e){return F(this,void 0,void 0,(function(){return H(this,(function(t){switch(t.label){case 0:if("string"==typeof e)throw new Error("Web image processor requires File input for MD5");return[4,e.arrayBuffer()];case 1:return[2,B(t.sent())]}}))}))},e.prototype._loadImage=function(e){return new Promise((function(t,r){var n=URL.createObjectURL(e),i=new Image;i.onload=function(){URL.revokeObjectURL(n),t(i)},i.onerror=function(){URL.revokeObjectURL(n),r(new Error("Failed to load image"))},i.src=n}))},e.prototype._createCanvas=function(e,t){var r=document.createElement("canvas");return r.width=e,r.height=t,r},e.prototype._canvasToBlob=function(e,t,r){return"convertToBlob"in e?e.convertToBlob({type:t,quality:r}):new Promise((function(n,i){e.toBlob((function(e){return e?n(e):i(new Error("toBlob failed"))}),t,r)}))},e}());function W(e){return W="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},W(e)}__webpack_require__(4782),__webpack_require__(7495),__webpack_require__(8781),__webpack_require__(1761);var j=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function s(e){try{u(n.next(e))}catch(e){o(e)}}function a(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}u((n=n.apply(e,t||[])).next())}))},q=function(e,t){var r,n,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;s;)try{if(r=1,n&&(i=2&o[0]?n.return:o[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,o[1])).done)return i;switch(n=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,n=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],n=0}finally{r=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}},K=function(){function e(e){this._pathCache=new Map,this.runtime=e}return e.prototype.getImageInfo=function(e){return"string"!=typeof e?Promise.reject(new Error("MiniApp image processor requires file path string")):this._loadImageInfo(e)},e.prototype.generateBigImage=function(e,t){return j(this,void 0,void 0,(function(){var r,n,i,o,a,u,c;return q(this,(function(l){switch(l.label){case 0:return"string"!=typeof e?[2,Promise.reject(new Error("MiniApp image processor requires file path string"))]:this.runtime.compressImage?[4,this._loadImageInfo(e)]:[2,Promise.reject(new Error("Platform missing compressImage capability"))];case 1:return r=l.sent(),(n=r.path||e)!==e&&s.vF.debug("Miniapp image path normalized before compress",e,n),(i=(0,P.s$)(r.width,r.height,t.maxShortEdge)).width===r.width&&i.height===r.height?[2,null]:(o=this.runtime.compressImage,[4,new Promise((function(e,r){o({src:n,quality:Math.round(100*t.quality),compressedWidth:i.width,compressedHeight:i.height,success:function(t){return e(t.tempFilePath)},fail:r})}))]);case 2:return a=l.sent(),s.vF.debug("Miniapp compressImage temp path",a),[4,this._normalizeLocalPath(a)];case 3:return u=l.sent(),[4,this._getFileSize(u)];case 4:return c=l.sent(),[2,{path:u,width:i.width,height:i.height,size:c,type:"image/jpeg"}]}}))}))},e.prototype.computeMd5=function(e){var t,r;return j(this,void 0,void 0,(function(){var n,i,o;return q(this,(function(s){switch(s.label){case 0:return"string"!=typeof e?[2,Promise.reject(new Error("MiniApp image processor requires file path string"))]:(n=null===(r=(t=this.runtime).getFileSystemManager)||void 0===r?void 0:r.call(t))?[4,this._normalizeLocalPath(e)]:[2,Promise.reject(new Error("Platform missing getFileSystemManager capability"))];case 1:return i=s.sent(),[4,new Promise((function(e,t){n.readFile({filePath:i,success:function(t){return e(t.data)},fail:t})}))];case 2:return o=s.sent(),[2,(0,k.K)(o)]}}))}))},e.prototype._getFileSize=function(e){var t,r;return j(this,void 0,void 0,(function(){var n,i,o,a,u,c,l,d,f,h;return q(this,(function(p){switch(p.label){case 0:return(n=null===(r=(t=this.runtime).getFileSystemManager)||void 0===r?void 0:r.call(t))?[4,this._normalizeLocalPath(e)]:(s.vF.warn("Miniapp getFileSize: no FileSystemManager available"),[2,0]);case 1:i=p.sent(),s.vF.debug("Miniapp getFileSize paths","original: ".concat(e),"normalized: ".concat(i)),o=function(e){var t,r;return q(this,(function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),[4,new Promise((function(t,r){n.getFileInfo({filePath:e,success:function(e){return t(e.size)},fail:r})}))];case 1:return(t=i.sent())>0?(s.vF.debug("Miniapp getFileSize success via getFileInfo","path: ".concat(e,", size: ").concat(t)),[2,{value:t}]):[3,3];case 2:return r=i.sent(),s.vF.debug("Miniapp getFileInfo failed for path",e,r),[3,3];case 3:return[2]}}))},a=0,u=i!==e?[i,e]:[e],p.label=2;case 2:return a<u.length?(c=u[a],[5,o(c)]):[3,5];case 3:if("object"===W(l=p.sent()))return[2,l.value];p.label=4;case 4:return a++,[3,2];case 5:return p.trys.push([5,7,,8]),[4,new Promise((function(e,t){n.readFile({filePath:i,success:function(t){return e(t.data)},fail:t})}))];case 6:return d=p.sent(),f=d.byteLength,s.vF.debug("Miniapp getFileSize fallback via readFile","size: ".concat(f)),[2,f];case 7:return h=p.sent(),s.vF.warn("Miniapp getFileSize: all methods failed","path: ".concat(e),h),[2,0];case 8:return[2]}}))}))},e.prototype._loadImageInfo=function(e){var t=this;return new Promise((function(r,n){t.runtime.getImageInfo({src:e,success:function(e){return r({width:e.width,height:e.height,type:e.type,path:e.path})},fail:n})}))},e.prototype._normalizeLocalPath=function(e){return j(this,void 0,void 0,(function(){var t,r,n;return q(this,(function(i){switch(i.label){case 0:return/^https?:\/\/tmp\//i.test(e)?(t=this._pathCache.get(e))?[2,t]:[4,this._loadImageInfo(e)]:[2,e];case 1:return r=i.sent(),n=r.path||e,/^https?:\/\/tmp\//i.test(n)?[4,this._materializeTempPath(n)]:[3,3];case 2:n=i.sent(),i.label=3;case 3:return this._pathCache.set(e,n),s.vF.debug("Miniapp image path normalization result",e,n),[2,n]}}))}))},e.prototype._materializeTempPath=function(e){var t,r,n;return j(this,void 0,void 0,(function(){var i,o,a,u,c,l;return q(this,(function(d){switch(d.label){case 0:if(!(null==(i=null===(r=(t=this.runtime).getFileSystemManager)||void 0===r?void 0:r.call(t))?void 0:i.saveFile)||!(null===(n=this.runtime.env)||void 0===n?void 0:n.USER_DATA_PATH))return[2,e];o=e.match(/(\.[a-zA-Z0-9]+)(?:\?.*)?$/),a=o?o[1]:"",u="".concat(this.runtime.env.USER_DATA_PATH,"/em-image-").concat(Date.now(),"-").concat(Math.random().toString(36).slice(2)).concat(a),d.label=1;case 1:return d.trys.push([1,3,,4]),[4,new Promise((function(t,r){var n;null===(n=i.saveFile)||void 0===n||n.call(i,{tempFilePath:e,filePath:u,success:function(e){return t(e.savedFilePath||u)},fail:r})}))];case 2:return c=d.sent(),s.vF.debug("Miniapp temp image materialized to user data path",e,c),[2,c];case 3:return l=d.sent(),s.vF.warn("Miniapp saveFile failed while materializing temp image path",l),[2,e];case 4:return[2]}}))}))},e}();function z(e){return z="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},z(e)}var V=function(){return V=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},V.apply(this,arguments)},J=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function s(e){try{u(n.next(e))}catch(e){o(e)}}function a(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}u((n=n.apply(e,t||[])).next())}))},Y=function(e,t){var r,n,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;s;)try{if(r=1,n&&(i=2&o[0]?n.return:o[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,o[1])).done)return i;switch(n=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,n=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],n=0}finally{r=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}};t().util.Long=n(),t().configure();var X=t().Root.fromJSON({nested:{easemob:{nested:{pb:{nested:{MessageBody:{fields:{type:{type:"Type",id:1},from:{type:"JID",id:2},to:{type:"JID",id:3},contents:{rule:"repeated",type:"Content",id:4},ext:{rule:"repeated",type:"KeyValue",id:5},ackMessageId:{type:"uint64",id:6},msgConfig:{type:"MessageConfig",id:7},ackContent:{type:"string",id:8},meta:{type:"string",id:9},editMessageId:{type:"uint64",id:11},editScope:{type:"EditScope",id:12},stream:{type:"Stream",id:13}},nested:{Content:{fields:{type:{type:"Type",id:1},text:{type:"string",id:2},latitude:{type:"double",id:3},longitude:{type:"double",id:4},address:{type:"string",id:5},displayName:{type:"string",id:6},remotePath:{type:"string",id:7},secretKey:{type:"string",id:8},fileLength:{type:"int32",id:9},action:{type:"string",id:10},params:{rule:"repeated",type:"KeyValue",id:11},duration:{type:"int32",id:12},size:{type:"Size",id:13},thumbnailRemotePath:{type:"string",id:14},thumbnailSecretKey:{type:"string",id:15},thumbnailDisplayName:{type:"string",id:16},thumbnailFileLength:{type:"int32",id:17},thumbnailSize:{type:"Size",id:18},customEvent:{type:"string",id:19},customExts:{rule:"repeated",type:"KeyValue",id:20},buildingName:{type:"string",id:21},subType:{type:"SubType",id:22},title:{type:"string",id:23},summary:{type:"string",id:24},combineLevel:{type:"int32",id:25},imageType:{type:"int32",id:26}},nested:{Type:{values:{TEXT:0,IMAGE:1,VIDEO:2,LOCATION:3,VOICE:4,FILE:5,COMMAND:6,CUSTOM:7,COMBINE:8}},Size:{fields:{width:{type:"double",id:1},height:{type:"double",id:2}}},SubType:{values:{COMBINE:0,GIF:1,SUB_STREAM:10}}}},Type:{values:{NORMAL:0,CHAT:1,GROUPCHAT:2,CHATROOM:3,READ_ACK:4,DELIVER_ACK:5,RECALL:6,CHANNEL_ACK:7,EDIT:8}},EditScope:{values:{BODY:1,BODY_AND_EXT:2}},MessageConfig:{fields:{allowGroupAck:{type:"bool",id:1}}},Stream:{fields:{streamType:{type:"string",id:1},streamSeq:{type:"uint64",id:2},streamStatus:{type:"StreamStatus",id:3},streamError:{type:"uint32",id:4},streamFinishReason:{type:"int32",id:5}},nested:{StreamStatus:{values:{STREAM_START:0,STREAM_IN_PROGRESS:1,STREAM_COMPLETED:2,STREAM_FULL:3}}}}}},KeyValue:{oneofs:{value:{oneof:["varintValue","floatValue","doubleValue","stringValue"]}},fields:{key:{type:"string",id:1},type:{type:"ValueType",id:2},varintValue:{type:"int64",id:3},floatValue:{type:"float",id:4},doubleValue:{type:"double",id:5},stringValue:{type:"string",id:6}},nested:{ValueType:{values:{BOOL:1,INT:2,UINT:3,LLINT:4,FLOAT:5,DOUBLE:6,STRING:7,JSON_STRING:8}}}},JID:{fields:{appKey:{type:"string",id:1},name:{type:"string",id:2},domain:{type:"string",id:3},clientResource:{type:"string",id:4}}},ConferenceBody:{fields:{sessionId:{type:"string",id:1},operation:{type:"Operation",id:2},conferenceId:{type:"string",id:3},type:{type:"Type",id:4},content:{type:"string",id:5},network:{type:"string",id:6},version:{type:"string",id:7},identity:{type:"Identity",id:8},duration:{type:"string",id:9},peerName:{type:"string",id:10},endReason:{type:"EndReason",id:11},status:{type:"Status",id:12},isDirect:{type:"bool",id:13},controlType:{type:"StreamControlType",id:14},routeFlag:{type:"int32",id:15},routeKey:{type:"string",id:16}},nested:{Status:{fields:{errorCode:{type:"int32",id:1}}},Operation:{values:{JOIN:0,INITIATE:1,ACCEPT_INITIATE:2,ANSWER:3,TERMINATE:4,REMOVE:5,STREAM_CONTROL:6,MEDIA_REQUEST:7}},Type:{values:{VOICE:0,VIDEO:1}},Identity:{values:{CALLER:0,CALLEE:1}},EndReason:{values:{HANGUP:0,NORESPONSE:1,REJECT:2,BUSY:3,FAIL:4,UNSUPPORTED:5,OFFLINE:6}},StreamControlType:{values:{PAUSE_VOICE:0,RESUME_VOICE:1,PAUSE_VIDEO:2,RESUME_VIDEO:3}}}},MSync:{fields:{version:{type:"Version",id:1,options:{default:"MSYNC_V1"}},guid:{type:"JID",id:2},auth:{type:"string",id:3},compressAlgorimth:{type:"uint32",id:4},crypto:{type:"uint32",id:5},userAgent:{type:"string",id:6},pov:{type:"uint64",id:7},command:{type:"Command",id:8},deviceId:{type:"uint32",id:10},encryptType:{rule:"repeated",type:"EncryptType",id:11,options:{packed:!1}},encryptKey:{type:"string",id:12},payload:{type:"bytes",id:9},traceId:{type:"uint64",id:20}},nested:{Version:{values:{MSYNC_V1:0,MSYNC_V2:1}},Command:{values:{SYNC:0,UNREAD:1,NOTICE:2,PROVISION:3,LOGOUT:4}}}},EncryptType:{values:{ENCRYPT_NONE:0,ENCRYPT_AES_128_CBC:1,ENCRYPT_AES_256_CBC:2}},CommSyncUL:{fields:{meta:{type:"Meta",id:1},key:{type:"uint64",id:2},queue:{type:"JID",id:3},isRoam:{type:"bool",id:4},lastFullRoamKey:{type:"uint64",id:5}}},CommSyncDL:{fields:{status:{type:"Status",id:1},metaId:{type:"uint64",id:2},serverId:{type:"uint64",id:3},metas:{rule:"repeated",type:"Meta",id:4},nextKey:{type:"uint64",id:5},queue:{type:"JID",id:6},isLast:{type:"bool",id:7},timestamp:{type:"uint64",id:8},isRoam:{type:"bool",id:9}}},CommNotice:{fields:{queue:{type:"JID",id:1}}},CommUnreadUL:{fields:{}},CommUnreadDL:{fields:{status:{type:"Status",id:1},unread:{rule:"repeated",type:"MetaQueue",id:2},timestamp:{type:"uint64",id:3}}},MetaQueue:{fields:{queue:{type:"JID",id:1},n:{type:"uint32",id:2}}},Meta:{fields:{id:{type:"uint64",id:1},from:{type:"JID",id:2},to:{type:"JID",id:3},timestamp:{type:"uint64",id:4},ns:{type:"NameSpace",id:5},payload:{type:"bytes",id:6},routetype:{type:"RouteType",id:7},ext:{rule:"repeated",type:"KeyValue",id:8},meta:{type:"bytes",id:9},directedUsers:{rule:"repeated",type:"string",id:10},env:{type:"string",id:13}},nested:{NameSpace:{values:{STATISTIC:0,CHAT:1,MUC:2,ROSTER:3,CONFERENCE:4,NOTIFY:5,QUERY:6}},RouteType:{values:{ROUTE_ALL:0,ROUTE_ONLINE:1,ROUTE_DIRECT:2}}}},Status:{fields:{errorCode:{type:"ErrorCode",id:1},reason:{type:"string",id:2},redirectInfo:{rule:"repeated",type:"RedirectInfo",id:3}},nested:{ErrorCode:{values:{OK:0,FAIL:1,UNAUTHORIZED:2,MISSING_PARAMETER:3,WRONG_PARAMETER:4,REDIRECT:5,TOKEN_EXPIRED:6,PERMISSION_DENIED:7,NO_ROUTE:8,UNKNOWN_COMMAND:9,PB_PARSER_ERROR:10,BIND_ANOTHER_DEVICE:11,IM_FORBIDDEN:12,TOO_MANY_DEVICES:13,PLATFORM_LIMIT:14,USER_MUTED:15,ENCRYPT_DISABLE:16,ENCRYPT_ENABLE:17,DECRYPT_FAILURE:18,PERMISSION_DENIED_EXTERNAL:19}}}},RedirectInfo:{fields:{host:{type:"string",id:1},port:{type:"uint32",id:2}}},Provision:{fields:{osType:{type:"OsType",id:1},version:{type:"string",id:2},networkType:{type:"NetworkType",id:3},appSign:{type:"string",id:4},compressType:{rule:"repeated",type:"CompressType",id:5,options:{packed:!1}},encryptType:{rule:"repeated",type:"EncryptType",id:6,options:{packed:!1}},encryptKey:{type:"string",id:7},status:{type:"Status",id:8},deviceUuid:{type:"string",id:9},isManualLogin:{type:"bool",id:10},password:{type:"string",id:11},deviceName:{type:"string",id:12},resource:{type:"string",id:13},auth:{type:"string",id:14},serviceId:{type:"string",id:16},actionVersion:{type:"string",id:17},authToken:{type:"string",id:18},osCustomValue:{type:"uint32",id:19},sessionId:{type:"string",id:20},reason:{type:"string",id:21},protocolCompressType:{rule:"repeated",type:"CompressType",id:22},protocolCompressDirection:{type:"CompressDirection",id:23}},nested:{OsType:{values:{OS_IOS:0,OS_ANDROID:1,OS_LINUX:2,OS_OSX:3,OS_WIN:4,OS_CUSTOM:5,OS_OTHER:16}},NetworkType:{values:{NETWORK_NONE:0,NETWORK_WIFI:1,NETWORK_4G:2,NETWORK_3G:3,NETWORK_2G:4,NETWORK_WIRE:5}},CompressType:{values:{COMPRESS_NONE:0,COMPRESS_ZLIB:1,COMPRESS_LZ4:2}},CompressDirection:{values:{ONLY_UP:0,ONLY_DOWN:1,BI:2}}}},Logout:{fields:{sessionId:{type:"string",id:1},reason:{type:"string",id:2},status:{type:"Status",id:3}}},MUCBody:{fields:{mucId:{type:"JID",id:1},operation:{type:"Operation",id:2},from:{type:"JID",id:3},to:{rule:"repeated",type:"JID",id:4},setting:{type:"Setting",id:5},reason:{type:"string",id:6},isChatroom:{type:"bool",id:7},status:{type:"Status",id:8},isThread:{type:"bool",id:9},mucParentId:{type:"JID",id:10},mucName:{type:"string",id:11},eventInfo:{type:"EventInfo",id:12},mucMemberCount:{type:"int32",id:13},ext:{type:"string",id:14},leaveOtherRooms:{type:"bool",id:15},members:{rule:"repeated",type:"string",id:16}},nested:{Operation:{values:{CREATE:0,DESTROY:1,JOIN:2,LEAVE:3,APPLY:4,APPLY_ACCEPT:5,APPLY_DECLINE:6,INVITE:7,INVITE_ACCEPT:8,INVITE_DECLINE:9,KICK:10,GET_BLACKLIST:11,BAN:12,ALLOW:13,UPDATE:14,BLOCK:15,UNBLOCK:16,PRESENCE:17,ABSENCE:18,DIRECT_JOINED:19,ASSIGN_OWNER:20,ADD_ADMIN:21,REMOVE_ADMIN:22,ADD_MUTE:23,REMOVE_MUTE:24,UPDATE_ANNOUNCEMENT:25,DELETE_ANNOUNCEMENT:26,UPLOAD_FILE:27,DELETE_FILE:28,ADD_USER_WHITE_LIST:29,REMOVE_USER_WHITE_LIST:30,BAN_GROUP:31,REMOVE_BAN_GROUP:32,THREAD_CREATE:33,THREAD_DESTROY:34,THREAD_JOIN:35,THREAD_LEAVE:36,THREAD_KICK:37,THREAD_UPDATE:38,THREAD_PRESENCE:39,THREAD_ABSENCE:40,DISABLE_GROUP:41,ABLE_GROUP:42,SET_METADATA:43,DELETE_METADATA:44,GROUP_MEMBER_METADATA_UPDATE:45}},Setting:{fields:{name:{type:"string",id:1},desc:{type:"string",id:2},type:{type:"Type",id:3},maxUsers:{type:"int32",id:4},owner:{type:"string",id:5}},nested:{Type:{values:{PRIVATE_OWNER_INVITE:0,PRIVATE_MEMBER_INVITE:1,PUBLIC_JOIN_APPROVAL:2,PUBLIC_JOIN_OPEN:3,PUBLIC_ANONYMOUS:4}}}},Status:{fields:{errorCode:{type:"ErrorCode",id:1},description:{type:"string",id:2},chatroomInfo:{type:"string",id:3}},nested:{ErrorCode:{values:{OK:0,PERMISSION_DENIED:1,WRONG_PARAMETER:2,MUC_NOT_EXIST:3,USER_NOT_EXIST:4,UNKNOWN:5}}}},EventInfo:{fields:{eventType:{type:"EventType",id:1,options:{default:"EVENT_NONE"}},ext:{type:"string",id:2}},nested:{EventType:{values:{EVENT_NONE:0,CIRCLE_CHANNEL:1}}}}}},RosterBody:{fields:{operation:{type:"Operation",id:1},status:{type:"Status",id:2},from:{type:"JID",id:3},to:{rule:"repeated",type:"JID",id:4},reason:{type:"string",id:5},rosterVer:{type:"string",id:6},biDirection:{type:"bool",id:7}},nested:{Operation:{values:{GET_ROSTER:0,GET_BLACKLIST:1,ADD:2,REMOVE:3,ACCEPT:4,DECLINE:5,BAN:6,ALLOW:7,REMOTE_ACCEPT:8,REMOTE_DECLINE:9}},Status:{fields:{errorCode:{type:"ErrorCode",id:1},description:{type:"string",id:2}},nested:{ErrorCode:{values:{OK:0,USER_NOT_EXIST:1,USER_ALREADY_FRIEND:2,USER_ALREADY_BLACKLIST:3}}}}}},StatisticsBody:{fields:{operation:{type:"Operation",id:1},os:{type:"OsType",id:2},version:{type:"string",id:3},network:{type:"NetworkType",id:4},imTime:{type:"uint32",id:5},chatTime:{type:"uint32",id:6},location:{type:"string",id:7},reason:{type:"string",id:10}},nested:{Operation:{values:{INFORMATION:0,USER_REMOVED:1,USER_LOGIN_ANOTHER_DEVICE:2,USER_KICKED_BY_CHANGE_PASSWORD:3,USER_KICKED_BY_OTHER_DEVICE:4}},OsType:{values:{OS_IOS:0,OS_ANDROID:1,OS_LINUX:2,OS_OSX:3,OS_WIN:4,OS_CUSTOM:5,OS_OTHER:16}},NetworkType:{values:{NETWORK_NONE:0,NETWORK_WIFI:1,NETWORK_4G:2,NETWORK_3G:3,NETWORK_2G:4,NETWORK_WIRE:5}}}}}}}}}}),Q=function(){function e(e){var t,r,n,u,l=this;this.name="miniCore",this.appKey="",this.heartBeatWait=E.HJ,this._compressorFailureCount=0,this.Message=i.Q,this.Code=M.C,this.getUniqueId=o.LP,this._queues=[],this._load_msg_cache=[],this.max_cache_length=100,this.isReport=!1,this.dnsIndex=0,this.autoReconnectNumTotal=0,this.times=1,this._reportLogs=!1,this._reportInterval=E.Rk,this._isLogging=!1,this._initWithAppId=!1,this.lastHeartbeat=Date.now(),this.logger=this.getLogger(),this.url=null!==(t=e.url)&&void 0!==t?t:"",this.apiUrl=null!==(r=e.apiUrl)&&void 0!==r?r:"",this.isHttpDNS=!!e.isHttpDNS,this.uploadPartEnable=!0,this.enableMd5Check=null!==(n=e.enableMd5Check)&&void 0!==n&&n,this.root=X,this.mr_cache={},this.isHttpDNS=void 0===e.isHttpDNS||e.isHttpDNS,this.https=o.Wp.isUseHttps(),this.delivery=e.delivery||!1,this.restIndex=0,this.hostIndex=0,this.autoReconnectNumMax=e.autoReconnectNumMax||E.WR,this.refreshDNSIntervals=this.autoReconnectNumMax<5?this.autoReconnectNumMax:5,this.useReplacedMessageContents=e.useReplacedMessageContents||!1,this.unMSyncSendMsgMap=new Map,this.socketHost=[],this.reconnecting=!1,this._offlineMessagePullState=w.P.SYNC_INIT,this._offlineMessagePullQueue=[],this.dnsArr=["https://rs.easemob.com","https://rs.chat.rtnsvc.com","https://rs.chat.realtimemesh.com"].filter((function(e){return e.startsWith(l.https?"https":"")})),this.dnsTotal=this.dnsArr.length,this.version="".concat("4.24.2",".1")||0,this.deviceId=e.deviceId||"webim",this.isFixedDeviceId=null===(u=e.isFixedDeviceId)||void 0===u||u,this.logOut=!0,this.osType=16,this.useOwnUploadFun=e.useOwnUploadFun||!1;var d=o.Wp.getEnvInfo(),f=d.global;if(this._imageProcessor="web"===d.platform?G:(null==f?void 0:f.getImageInfo)?function(e){return new K(e)}(f):null,this.compressType=[0],this.encryptType=[0],this._msgHash={},this.disconnectedReason=void 0,this.loginInfoCustomExt=void 0,this.appName="",this.orgName="",this._compressor=null,this.context={jid:{appKey:"",clientResource:"",domain:"easemob.com",name:""},userId:"",appKey:"",status:0,restTokenData:"",appName:"",orgName:"",root:{},accessToken:""},this.dnsTotal=this.dnsArr.length,"appKey"in e&&(this.appKey=e.appKey),"appId"in e&&(this.appId=e.appId,this._initWithAppId=!0),this.mSync=this.usePlugin(a.Ay),this.eventHandler=this.usePlugin(c),void 0!==e.customOSPlatform){if("number"!=typeof e.customOSPlatform||e.customOSPlatform<1||e.customOSPlatform>100)throw Error("Invalid customOSPlatform: ".concat(e.customOSPlatform));this.customOSPlatform=e.customOSPlatform,this.deviceId=e.customDeviceName||this.deviceId}if(this._initWithAppId){if(this.appKey="","string"!=typeof this.appId||!this.appId)throw Error("Invalid appId: ".concat(this.appId))}else{if("string"!=typeof this.appKey||2!==this.appKey.split("#").length)throw Error("Invalid appKey: ".concat(this.appKey));this.devInfos=this.appKey.split("#"),this.orgName=this.devInfos[0],this.appName=this.devInfos[1]}if(this.dataReport=new N({appkey:this.appKey||"default#appkey",org:this.orgName,sdkVersion:this.version,deviceId:this.deviceId,isReport:this.isReport,uikitVersion:e.uikitVersion||""}),this.isFixedDeviceId){var h=o.Wp.getLocalDeviceInfo();h&&(this.clientResource=JSON.parse(h).deviceId)}s.vF.debug("init SDK: miniCore ".concat(this.version))}return e.prototype.addEventHandler=function(e,t){},e.prototype.removeEventHandler=function(e){},e.prototype.usePlugin=function(e,t){var r=this;if("function"==typeof e){if(!t)return new e(this);this[t]=new e(this)}else"object"===z(e)&&(t?(this[t]={},e.LocalCache&&(this._localCache=e.LocalCache,e=e.LocalCacheApi),Object.keys(e).forEach((function(n){var i,o;r[t][n]=null===(o=null===(i=e[n])||void 0===i?void 0:i.bind)||void 0===o?void 0:o.call(i,r)}))):Object.assign(this,e))},e.prototype.isOpened=function(){return this.sock&&1===this.sock.readyState||!1},e.prototype._validateOpenParams=function(e){if("object"!==z(e)||null===e)return A.A.create({type:M.C.WEBIM_CONNCTION_OPEN_ERROR,message:"the param is illegal"});if(!e.username||"string"!=typeof e.username){var t=A.A.create({type:M.C.WEBIM_CONNCTION_USER_NOT_ASSIGN_ERROR,message:"the username cannot be empty"});return s.vF.error("open params error",t),t}return!("agoraToken"in e)||e.agoraToken&&"string"==typeof e.agoraToken?!("accessToken"in e)||e.accessToken&&"string"==typeof e.accessToken?"accessToken"in e||"agoraToken"in e||e.password?void 0:(t=A.A.create({type:M.C.WEBIM_CONNCTION_OPEN_ERROR,message:"the accessToken or password is illegal"}),s.vF.error("open params error",t),t):(t=A.A.create({type:M.C.WEBIM_CONNCTION_OPEN_ERROR,message:"the accessToken is illegal"}),s.vF.error("open params error",t),t):(t=A.A.create({type:M.C.WEBIM_CONNCTION_OPEN_ERROR,message:"the agoraToken is illegal"}),s.vF.error("open params error",t),console.warn("agoraToken is deprecated, please use accessToken instead"),t)},e.prototype.open=function(e){var t;return J(this,void 0,void 0,(function(){var r,n,i,a,u,c;return Y(this,(function(l){switch(l.label){case 0:if(s.vF.debug("open",e.username),this._isLogging)throw A.A.create({type:M.C.WEBIM_CONNCTION_OPEN_ERROR,message:"Currently logging in, please wait."});if(!this.logOut)throw A.A.create({type:M.C.WEBIM_USER_ALREADY_LOGIN,message:"The user has logged in."});if(this.retryConnectTimes=0,this._isLogging=!0,r=this._validateOpenParams(e))throw r;n=o.Wp.getEnvInfo(),l.label=1;case 1:if(l.trys.push([1,4,5,6]),"web"===n.platform&&(i=o.Wp.detectBrowser(),s.vF.info("browser",i)),s.vF.debug("socket readyState",null===(t=this.sock)||void 0===t?void 0:t.readyState),this.isOpened.call(this))throw A.A.create({type:M.C.WEBIM_CONNCTION_OPEN_ERROR,message:"You are already logged in"});return a=this.dataReport.geOperateFun({uid:e.username,operationName:p.jz.LOGIN}),[4,this._open(e,!1,a)];case 2:return u=l.sent(),s.vF.initReport({report:this._reportLogs,reportInterval:this._reportInterval,connection:this}),[4,this.retryConnectMSync(a)];case 3:return l.sent(),[2,u];case 4:throw c=l.sent(),this._isLogging=!1,c;case 5:return s.vF.reportLog(),[7];case 6:return[2]}}))}))},e.prototype._open=function(e,t,r){return void 0===t&&(t=!1),J(this,void 0,void 0,(function(){var n,i,a,u,c,l,d,f,h,v,m,_,g;return Y(this,(function(E){switch(E.label){case 0:return this.setContext(e),!this.isHttpDNS||t?[3,2]:(this.dnsIndex=0,[4,this.getDNS({rpt:r,isRetry:!!t})]);case 1:E.sent(),E.label=2;case 2:return this.setContext(e),n=this.apiUrl+"/"+this.orgName+"/"+this.appName+"/token",e.agoraToken?(s.vF.info("login with agoraToken"),this.grantType="agoraToken",this.token=e.agoraToken,this.context.accessToken=e.agoraToken,this.context.restTokenData=e.agoraToken,this.user=e.username,[2,{accessToken:e.agoraToken}]):[3,3];case 3:return e.accessToken?(s.vF.info("login with accessToken"),this.grantType="accessToken",this.token=e.accessToken,this.context.accessToken=e.accessToken,this.context.restTokenData=e.accessToken,this.user=e.username,[2,{accessToken:e.accessToken}]):[3,4];case 4:return s.vF.info("login with password"),i={headers:{"Content-type":"application/json"},url:n,dataType:"json",data:JSON.stringify({grant_type:"password",username:e.username,password:e.password,timestamp:+new Date})},[4,$(o.Wp.ajax(i,p.jz.SDK_INTERNAL))];case 5:return a=E.sent(),u=a[0],c=a[1],u?(l=A.A.create({type:M.C.WEBIM_CONNCTION_OPEN_ERROR,message:u.error_description||u.message,data:u}),d=(null==u?void 0:u.extraInfo)||{},_=d.elapse,m=d.httpCode,f=d.errDesc,h={requestName:p.TT.LOGIN_BY_PWD,requestElapse:_,requestUrl:n,isSuccess:0,code:m,codeDesc:f},r&&r({isRetry:!1,data:h}),"invalid password"!==u.message&&"user not found"!==u.message&&this.isHttpDNS&&this.restIndex+1<this.restTotal?(this.restIndex++,this.setRestUrl(),[4,this._open(e,!0,r)]):[3,7]):[3,8];case 6:return[2,E.sent()];case 7:throw r&&r({data:{isLastApi:1,isSuccess:0}}),this.clear(),delete u.extraInfo,l;case 8:if(!c)throw new Error("get token fail.");return this.expiresIn=c.expires_in,this.grantType="password",this.token=c.access_token,this.user=e.username,this.context.accessToken=c.access_token,c.extraInfo&&(v=c.extraInfo,m=v.httpCode,_=v.elapse,g={requestName:p.TT.LOGIN_BY_PWD,requestElapse:_,requestUrl:n,isSuccess:1,code:m},r&&r({isRetry:!1,data:g})),[2,{accessToken:c.access_token,duration:c.expires_in}]}}))}))},e.prototype.retryConnectMSync=function(e){var t,r,n;return J(this,void 0,void 0,(function(){var i,o,a,u;return Y(this,(function(c){switch(c.label){case 0:i=(new Date).getTime(),c.label=1;case 1:return c.trys.push([1,3,,7]),[4,this.connectMSync.call(this,e)];case 2:return o=c.sent(),e&&e({data:{isLastApi:1,isSuccess:1,accessChannel:null===(t=this.socketHost[this.hostIndex])||void 0===t?void 0:t.channel}}),[2,o];case 3:if(a=c.sent(),s.vF.error("connect to msync failed times:",this.retryConnectTimes+1,a),E.Ec.includes(a.type))throw e&&e({data:{isLastApi:1,isSuccess:0,accessChannel:null===(r=this.socketHost[this.hostIndex])||void 0===r?void 0:r.channel,codeDesc:this.disconnectedReason&&JSON.stringify(this.disconnectedReason)||a.message}}),a;return this.retryConnectTimes++,this.retryConnectTimes<E.rO?(this.isHttpDNS&&(this.hostIndex<this.socketHost.length-1?this.hostIndex++:this.hostIndex=this.socketHost.length-1,this.setSocketUrl()),a.type===M.C.REQUEST_TIMEOUT&&"provision timeout"===a.message||(u=(new Date).getTime()-i,null==e||e({isRetry:1!==this.retryConnectTimes,data:{requestUrl:this.url,requestName:p.TT.CONNECT_WEBSOCKET,isSuccess:0,code:p.G8.closed,requestElapse:u,codeDesc:this.disconnectedReason&&JSON.stringify(this.disconnectedReason)||"websocket close"}})),[4,this.retryConnectMSync(e)]):[3,5];case 4:return c.sent(),[3,6];case 5:throw s.vF.error("connect to msync failed",a),e&&e({data:{isLastApi:1,isSuccess:0,accessChannel:null===(n=this.socketHost[this.hostIndex])||void 0===n?void 0:n.channel,codeDesc:this.disconnectedReason&&JSON.stringify(this.disconnectedReason)||a.message}}),a;case 6:return[3,7];case 7:return[2]}}))}))},e.prototype.connectMSync=function(e){var t=this,r="pending",n=(new Date).getTime();return new Promise((function(i,a){t.connectionResolve=i,t.connectionReject=a;var u=new WebSocket(t.url);u.binaryType="arraybuffer",t.sock=u,t.connectionTimer&&clearTimeout(t.connectionTimer),t.connectionTimer=setTimeout((function(){t.disconnectedReason={type:M.C.REQUEST_TIMEOUT,message:"connection timeout"},u.close(),null==a||a(t.disconnectedReason)}),E.x0),u.onopen=function(){if(t.connectionTimer&&clearTimeout(t.connectionTimer),e){var r=(new Date).getTime()-n;e({isRetry:0!==t.retryConnectTimes,data:{requestUrl:t.url,requestName:p.TT.CONNECT_WEBSOCKET,isSuccess:1,code:p.G8.success,requestElapse:r}})}(0,o.En)(t.online.bind(t),t.offline.bind(t)),(0,o.X0)((function(){s.vF.debug("visibility true")}),(function(){s.vF.debug("visibility false")}));var i=t.mSync.generateProvision();t.provisionTimer&&clearTimeout(t.provisionTimer),t.provisionTimer=setTimeout((function(){s.vF.error("provision timeout"),t.disconnectedReason=A.A.create({type:M.C.REQUEST_TIMEOUT,message:"provision timeout"}),u.close(),null==a||a(t.disconnectedReason)}),E.Qb),u.send(i)},u.onclose=function(e){var n,i,o,u,c,l,d;if(t.connectionTimer&&clearTimeout(t.connectionTimer),s.vF.info("websocket onclose, isLogging:",t._isLogging),t._isLogging)return null==a||a({type:M.C.WEBIM_CONNCTION_DISCONNECTED,message:"websocket has been disconnected"}),void(r="rejected");"rejected"!==r?(r="rejected",t.logOut?(t.clear(),null===(i=null===(n=null==t?void 0:t._localCache)||void 0===n?void 0:n.getInstance())||void 0===i||i.close(),null===(o=t.eventHandler)||void 0===o||o.dispatch("onDisconnected",t.disconnectedReason),t.resetConnState(),null==a||a({type:M.C.WEBIM_CONNCTION_DISCONNECTED,message:"logout"})):t.autoReconnectNumTotal<t.autoReconnectNumMax?(t.reconnect(),t.autoReconnectNumTotal%t.refreshDNSIntervals===0&&t.isHttpDNS&&(s.vF.debug("refresh dns config when websocket close"),t.getDNS({isRetry:!1}).catch((function(e){s.vF.error("get dns error",e)})))):(t.disconnectedReason=A.A.create({type:M.C.WEBIM_CONNCTION_DISCONNECTED,message:"reconnection failed"}),null===(u=t.unMSyncSendMsgMap)||void 0===u||u.clear(),t.rejectMessage(),null===(l=null===(c=null==t?void 0:t._localCache)||void 0===c?void 0:c.getInstance())||void 0===l||l.close(),null===(d=t.eventHandler)||void 0===d||d.dispatch("onDisconnected",t.disconnectedReason),t.resetConnState(),t.reconnecting=!1,null==a||a(t.disconnectedReason),s.vF.info("reconnect fail"))):s.vF.debug("onclose reject is null")},u.onmessage=function(e){var r=t.mSync,n=r.decodeMSync,i=r.distributeMSync;o.Wp.flow([n,i])(e,!1)},u.onerror=function(n){var i,o,u,c;if(t.connectionTimer&&clearTimeout(t.connectionTimer),s.vF.info("websocket onerror, isLogging:",t._isLogging),t._isLogging)return null==a||a({type:M.C.WEBIM_CONNCTION_DISCONNECTED,message:"websocket has been disconnected"}),void(r="rejected");"rejected"!==r?(r="rejected",t.logOut||(t.autoReconnectNumTotal<t.autoReconnectNumMax?(s.vF.debug("sock.onError reconnect",t.autoReconnectNumTotal,t.autoReconnectNumMax),t.reconnect(),t.autoReconnectNumTotal%t.refreshDNSIntervals===0&&t.isHttpDNS&&(s.vF.debug("refresh dns config when websocket error"),t.getDNS({rpt:e,isRetry:!1}).catch((function(e){s.vF.error("get dns error",e)})))):(t.disconnectedReason=A.A.create({type:M.C.WEBIM_CONNCTION_DISCONNECTED,message:"reconnection failed"}),null===(i=t.unMSyncSendMsgMap)||void 0===i||i.clear(),t.rejectMessage(),null===(u=null===(o=null==t?void 0:t._localCache)||void 0===o?void 0:o.getInstance())||void 0===u||u.close(),null===(c=t.eventHandler)||void 0===c||c.dispatch("onDisconnected",t.disconnectedReason),t.resetConnState(),t.reconnecting=!1,s.vF.debug("reconnect fail"),null==a||a(t.disconnectedReason)))):s.vF.debug("onerror reject is null")}}))},e.prototype.close=function(e){var t,r,n,i;void 0===e&&(e="inner:logout"),s.vF.debug("call close"),s.vF._stopReportLogs(),this.logOut=!0,this.disconnectedReason=void 0,this.reconnecting=!1,this.context.status=M.C.STATUS_CLOSING,e&&(null==e?void 0:e.startsWith("inner"))&&this.sendLogout(e),this.sock&&this.sock.close(),null===(t=this.unMSyncSendMsgMap)||void 0===t||t.clear(),this.stopHeartBeat(),this.rejectMessage(),this.context.status=M.C.STATUS_CLOSED,this._load_msg_cache=[],this._queues=[],this._msgHash={},this.mr_cache={},this.token="",this.context.accessToken="",this.clearTokenTimeout(),null===(n=null===(r=this._localCache)||void 0===r?void 0:r.getInstance())||void 0===n||n.close(),this.connectionTimer&&clearTimeout(this.connectionTimer),this.provisionTimer&&clearTimeout(this.provisionTimer),this.probingTimer&&clearTimeout(this.probingTimer),null===(i=this._compressor)||void 0===i||i.shrink(),this._compressorFailureCount=0,this._compressor=null,D.P.clearAll()},e.prototype.sendLogout=function(e){void 0===e&&(e="logout");var t=this.mSync.generateLogout(e),r=x.v.call(this,t),n=r[0],i=r[1];try{i&&this.sock&&1===this.sock.readyState&&this.sock.send(n)}catch(e){s.vF.error("sendLogout failed",e)}},e.prototype.registerUser=function(e){return J(this,void 0,void 0,(function(){var t,r,n,i,s,a,u,c,l,d,f,h,v,m;return Y(this,(function(_){switch(_.label){case 0:return t=this.dataReport.geOperateFun({uid:e.username,operationName:p.jz.REGISTER}),this.isHttpDNS?(this.dnsIndex=0,[4,this.getDNS({rpt:t,isRetry:!1})]):[3,2];case 1:_.sent(),_.label=2;case 2:return r=this.apiUrl,n=r+"/"+this.orgName+"/"+this.appName+"/users",i=JSON.stringify({username:e.username,password:e.password,nickname:e.nickname||""}),s={headers:{"Content-type":"application/json"},url:n,dataType:"json",data:i},[4,$(o.Wp.ajax(s,p.jz.SDK_INTERNAL))];case 3:return a=_.sent(),u=a[0],c=a[1],l={requestName:p.TT.RESISTER,requestUrl:n},u?(d=u.extraInfo||{},v=d.httpCode,m=d.elapse,f=d.errDesc,t({isRetry:!1,data:V(V({},{requestElapse:m,isSuccess:0,code:v,codeDesc:f}),l)}),!(u.message.includes("Open registration doesn't allow")||u.message.includes("username be unique")||u.message.includes("is not legal"))&&this.isHttpDNS&&this.restIndex+1<this.restTotal?(this.restIndex++,this.setRestUrl(),[4,this.registerUser(e)]):[3,5]):[3,7];case 4:return[2,_.sent()];case 5:throw t({data:{isLastApi:1,isSuccess:0}}),delete u.extraInfo,u;case 6:return[3,8];case 7:if(!c)throw new Error("register user fail.");return h=c.extraInfo||{},v=h.httpCode,m=h.elapse,t({isEndApi:!0,isRetry:!1,data:V(V({},{requestElapse:m,isSuccess:1,code:v}),l)}),[2,{data:null==c?void 0:c.entities[0],type:0}];case 8:return[2]}}))}))},e.prototype.renewToken=function(e){var t=this,r=this.isOpened();return s.vF.debug("isOpened",r),r?this.getTokenExpireTimestamp(e).then((function(r){var n=r.expire_timestamp,i=Date.now();return t.expirationTime=n,t.expiresIn=n-i,t.token=e,t.context.accessToken=e,t.clearTokenTimeout(),t.tokenExpireTimeCountDown(t.expiresIn),{status:!0,token:e,expire:r.expire_timestamp}})):Promise.reject({status:!1})},e.prototype.send=function(e){return Promise.resolve(null)},e.prototype.getTokenExpireTimestamp=function(e){if("string"!=typeof e||""===e)throw Error('Invalid parameter: "token"');var t=this.context,r=t.orgName,n=t.appName,i={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 s.vF.debug("Call getTokenExpireTimestamp"),o.Wp.ajax(i,p.jz.SDK_INTERNAL)},e.prototype.clearTokenTimeout=function(){s.vF.debug("clearTokenTimeout"),this.tokenWillExpireTimer&&clearTimeout(this.tokenWillExpireTimer),this.tokenExpiredTimer&&clearTimeout(this.tokenExpiredTimer),this.tokenWillExpireTimer=null,this.tokenExpiredTimer=null},e.prototype.compareTokenExpireTime=function(e,t){var r,n=Number(t)-Number(e);s.vF.debug("compareTokenExpireTime",n),n<=this.expiresIn/5&&n>0?(null===(r=this.eventHandler)||void 0===r||r.dispatch("onTokenWillExpire"),s.vF.info("onTokenWillExpire",n)):n<=0&&(this.closeByTokenExpired(),s.vF.info("closeByTokenExpired",n))},e.prototype.closeByTokenExpired=function(){var e;s.vF.info("closed By TokenExpired"),null===(e=this.eventHandler)||void 0===e||e.dispatch("onTokenExpired"),this.close("inner:token expired")},e.prototype.tokenExpireTimeCountDown=function(e){var t=this;e>Math.pow(2,31)-1&&(e=Math.pow(2,31)-1),this.tokenWillExpireTimer=setTimeout((function(){var r;null===(r=t.eventHandler)||void 0===r||r.dispatch("onTokenWillExpire"),s.vF.info("onTokenWillExpire",Math.floor(e-e/5))}),e-e/5),this.tokenExpiredTimer=setTimeout((function(){var e;s.vF.info("onTokenExpired",0),null===(e=t.eventHandler)||void 0===e||e.dispatch("onTokenExpired"),t.close("inner:token expired")}),e)},e.prototype.stopHeartBeat=function(){clearInterval(this.heartBeatID)},e.prototype.setContext=function(e){this.context.jid={appKey:this.appKey,name:e.username,domain:this.context.jid.domain,clientResource:this.clientResource},this.context.root=this.root,this.context.userId=e.username,this.context.appKey=this.appKey,this.context.appName=this.appName,this.context.orgName=this.orgName},e.prototype.getDNS=function(e){var t;return J(this,void 0,void 0,(function(){var r,n,i,a,u,c,l,d,f,h,v,m,_,g,y,O,T,R,I,S,C,b;return Y(this,(function(N){switch(N.label){case 0:return r=e.rpt,n=e.isRetry,i=this.dnsIndex<this.dnsTotal?this.dnsIndex:0,a="".concat(this.dnsArr[i],"/easemob/server.json"),u={url:a,dataType:"json",type:"GET",data:{}},this._initWithAppId?u.data={app_id:this.appId,sdk_version:"4.10.0",file_version:"1"}:u.data={app_key:encodeURIComponent(this.appKey)},[4,$(o.Wp.ajax(u,p.jz.SDK_INTERNAL))];case 1:return c=N.sent(),l=c[0],d=c[1],l?(f=l.extraInfo||{},h=f.elapse,v=f.httpCode,m=f.errDesc,_={requestUrl:a,requestName:p.TT.GET_DNS,isSuccess:0,code:v,codeDesc:m,requestElapse:h},r&&r({isRetry:n,data:_}),s.vF.debug("getHttpDNS failed: "+this.dnsIndex),this.dnsIndex++,this.dnsIndex<this.dnsTotal?[4,this.getDNS({rpt:r,isRetry:!0})]:[3,3]):[3,4];case 2:return N.sent(),[2];case 3:throw A.A.create({type:M.C.SERVER_GET_DNSLIST_FAILED,message:"get DNS failed",data:l});case 4:if(!d||!(null===(t=d.rest)||void 0===t?void 0:t.hosts)||!d["msync-wx"])throw A.A.create({type:M.C.SERVER_GET_DNSLIST_FAILED,message:"DNS hosts resolution failed",data:d});if(s.vF.debug("getHttpDNS success: "+this.dnsIndex),g=d.extraInfo||{},y=g.elapse,O=g.httpCode,this._reportLogs="true"===d.enableReportLogs,this._reportInterval=Number(d.reportInterval||E.Rk),T={requestUrl:a,requestName:p.TT.GET_DNS,requestElapse:y,isSuccess:1,code:O},r&&r({isRetry:n,data:T}),R=d.rest.hosts,I=this.https?"https":"http",this._initWithAppId){if(!d.app_key)throw A.A.create({type:M.C.SERVER_GET_DNSLIST_FAILED,message:"get DNS failed"});this.appKey=d.app_key,this.context.appKey=this.appKey,this.devInfos=this.appKey.split("#"),this.orgName=this.devInfos[0],this.appName=this.devInfos[1],this.dataReport.updateAppKey(this.appKey)}return S=R.filter((function(e){if(e.protocol===I)return e})),this.restHosts=S,this.restTotal=this.restHosts.length,C=d["msync-wx"].hosts,b=C.filter((function(e){if(e.protocol===I)return e})),this.socketHost=b,"true"===(null==d?void 0:d.enableDataReport)?(this.dataReport.setIsCollectDt(!0),this.dataReport.setIsReportDt(!0)):(this.dataReport.setIsReportDt(!1),this.dataReport.setIsCollectDt(!1)),"false"===(null==d?void 0:d.uploadinparts_enable)&&(this.uploadPartEnable=!1),void 0!==(null==d?void 0:d.enableMd5Check)&&(this.enableMd5Check="true"===d.enableMd5Check),this.setRestUrl(),this.setSocketUrl(),[2]}}))}))},e.prototype.setRestUrl=function(){var e,t;if(this.restIndex>this.restHosts.length)return s.vF.debug("restIndex > restTotal"),"";var r="",n=this.restHosts[this.restIndex],i=n.domain,o=n.ip,a=n.port,u=this.https?"https:":"http:";return o&&"undefined"!=typeof window&&"http:"===(null===(e=null===window||void 0===window?void 0:window.location)||void 0===e?void 0:e.protocol)?r=u+"//"+o+":"+a:(r=u+"//"+i,a&&"80"!==a&&"443"!==a&&(r+=":".concat(a)),"undefined"==typeof window||window.location||(r="https://"+i),"undefined"!=typeof window&&window.location&&"file:"===(null===(t=window.location)||void 0===t?void 0:t.protocol)&&(r="https://"+i)),"undefined"==typeof window&&(r=u+"//"+i),this.apiUrl=r,r},e.prototype.setSocketUrl=function(){var e=this.socketHost[this.hostIndex],t=e.domain,r=e.ip,n=e.port,i="";i=t||r,n&&"80"!==n&&"443"!==n&&(i+=":"+n),i&&(this.url="//"+i+"/websocket");var o=this.https?"wss:":"ws:";this.url=o+this.url},e.prototype.online=function(){var e;s.vF.debug("online"),null===(e=this.eventHandler)||void 0===e||e.dispatch("onOnline"),this.sock&&1!==this.sock.readyState&&(s.vF.debug("sock.readyState:",this.sock.readyState),this.logOut||this.reconnecting||this.reconnect())},e.prototype.offline=function(){var e,t;s.vF.debug("offline"),null===(e=this.sock)||void 0===e||e.close(),null===(t=this.eventHandler)||void 0===t||t.dispatch("onOffline")},e.prototype.getLogger=function(){var e=s.vF.getLogger("defaultLogger");return e.setConfig({useCache:!1,maxCache:3145728,color:"",background:""}),e.enableAll(),e},e.prototype.rejectMessage=function(){var e=this,t=Object.keys(this._msgHash);if(t.length>0){var r=A.A.create({type:M.C.MESSAGE_WEBSOCKET_DISCONNECTED,message:"websocket disconnected"});t.forEach((function(t){var n,i,o;(null===(n=e.unMSyncSendMsgMap)||void 0===n?void 0:n.has(t))||(e._msgHash[t].reject instanceof Function&&e._msgHash[t].reject(r),null===(o=null===(i=e._localCache)||void 0===i?void 0:i.getInstance())||void 0===o||o.updateLocalMessage(t,{serverMsgId:t,status:U.q.FAIL}),e._msgHash[t].fail instanceof Function&&e._msgHash[t].fail(r),e._msgHash[t].messageTimer&&clearTimeout(e._msgHash[t].messageTimer),delete e._msgHash[t])}))}},e.prototype.resetConnState=function(){this.mSync.stopHeartBeat(),this.times=1,this.autoReconnectNumTotal=0,this.hostIndex=0},e.prototype.reconnect=function(e){var t,r=this;if(this.logout)return s.vF.warn("The user has already logged out when reconnecting");if(s.vF.debug("socket reconnect readyState",this.sock.readyState),0!==this.sock.readyState&&1!==this.sock.readyState||e){!1===this.reconnecting&&(this.reconnecting=!0),null===(t=this.eventHandler)||void 0===t||t.dispatch("onReconnecting"),s.vF.info("reconnect times: ",this.times),s.vF.info("reconnect sock.readyState: ",this.sock.readyState),this.rejectMessage(),this.isHttpDNS&&(this.hostIndex<this.socketHost.length-1?this.hostIndex++:this.hostIndex=this.socketHost.length-1);var n=1e3*o.Wp.getRetryDelay(this.times);s.vF.info("reconnect delay: ",n),setTimeout((function(){(1!==r.sock.readyState||e)&&(s.vF.info("login sock.readyState: ",r.sock.readyState),r.sock.close(),r.connectMSync(),r.times++)}),n),this.autoReconnectNumTotal++}},e.prototype.clear=function(){this.restTotal=0,this.restIndex=0,this.hostIndex=0,this.hostTotal=0},e.prototype.onShow=function(){var e=this;s.vF.debug("execute onshow callback"),!this.logOut&&!this.reconnecting&&Date.now()-this.lastHeartbeat>2e3&&(s.vF.debug("send ping"),this.mSync.sendUnreadDeal(),this.probingTimer&&clearTimeout(this.probingTimer),this.probingTimer=setTimeout((function(){s.vF.error("Websocket connection timeout"),e.logOut||e.reconnecting||e.reconnect(!0)}),E.oi))},e.prototype.downloadAndParseCombineMessage=function(e){var t=this,r=e.url,n=e.secret;return new Promise((function(e,i){var a,u,c=o.Wp.getEnvInfo(),l="web"!==c.platform&&"node"!==c.platform&&"quick_app"!==c.platform&&(null===(u=null===(a=c.global)||void 0===a?void 0:a.canIUse)||void 0===u?void 0:u.call(a,"getFileSystemManager")),d=function(r){var n=function(e){i({message:"Read file failed",data:e})},a=function(r){return J(t,void 0,void 0,(function(){var t,n,a,u,c,d,f,h,p,v,m,_,g;return Y(this,(function(E){switch(E.label){case 0:for(t=l?new Uint8Array(r.data):new Uint8Array(r.target.result),n=0,a=0,u=2,c=t.subarray(n,n+u),d=o.Wp.Uint8ArrayToString(c),a+=u,f=0,h=2;h<t.length-1;h++)h%2==1&&(f^=t[h]);if(p=t.subarray(t.length-1,t.length),s.vF.debug("checkResult:",f,p[0]===f),p[0]!==f)return[2,i({message:"File verification failed"})];if("cm"!==d)return[3,7];E.label=1;case 1:E.trys.push([1,5,,6]),v=[],m=function(){var e,r,i,o;return Y(this,(function(s){switch(s.label){case 0:return n+=u,a+=u=4,e=t.subarray(n,n+u),n+=u,u=e.reduce((function(t,r,n){return t+(r<<8*(e.length-n-1))}),0),a+=u,r=t.subarray(n,n+u),i=(i=_.root.lookup("easemob.pb.Meta")).decode(r),[4,L.Ay.call(_,i,0,!0,!0)];case 1:return o=s.sent(),v.push(o),[2]}}))},_=this,E.label=2;case 2:return a<t.length-1?[5,m()]:[3,4];case 3:return E.sent(),[3,2];case 4:return[2,e(v)];case 5:return g=E.sent(),i({message:"Parse file failed",data:g}),[3,6];case 6:return[3,8];case 7:return[2,i({message:"File verification failed"})];case 8:return[2]}}))}))};if(l){var u=c.global.getFileSystemManager(),d=r.tempFilePath;u.readFile({filePath:d,success:a,fail:n})}else if(r instanceof Blob){var f=new FileReader;f.readAsArrayBuffer(r),f.onerror=n,f.onload=a}},f=function(e){i({type:M.C.WEBIM_DOWNLOADFILE_ERROR,message:"Download failed, please try again",data:e})};l?c.global.downloadFile({url:r,success:d,fail:f}):o.Wp.download.call(t,{url:r,headers:{Accept:"application/json"},onFileDownloadComplete:d,onFileDownloadError:f,secret:n,accessToken:t.context.accessToken})}))},e.prototype.getChatFilesUrl=function(){return"".concat(this.apiUrl,"/").concat(this.orgName,"/").concat(this.appName,"/chatfiles")},e.prototype.setLoginInfoCustomExt=function(e){if(s.vF.debug("setLoginInfoCustomExt","params:",e),e){if("string"!=typeof e)throw new Error("ext must be a string");if(e.length>1024)throw new Error("ext length must be less than 1024")}this.loginInfoCustomExt=e},e}(),$=function(e){return e.then((function(e){return[null,e]})).catch((function(e){return[e,null]}))},Z=Q}(),__webpack_exports__=__webpack_require__.O(__webpack_exports__),__webpack_exports__=__webpack_exports__.default,__webpack_exports__}()}));
|
|
2
|
+
!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 __webpack_modules__={34:function(e,t,r){var n=r(4901);e.exports=function(e){return"object"==typeof e?null!==e:n(e)}},81:function(e,t,r){"use strict";var n=r(9565),i=r(9306),o=r(8551),s=r(6823),a=r(851),u=TypeError;e.exports=function(e,t){var r=arguments.length<2?a(e):t;if(i(r))return o(n(r,e));throw new u(s(e)+" is not iterable")}},113:function(e,t,r){"use strict";var n=r(6518),i=r(9213).find,o=r(6469),s="find",a=!0;s in[]&&Array(1)[s]((function(){a=!1})),n({target:"Array",proto:!0,forced:a},{find:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}}),o(s)},150:function(e,t,r){"use strict";r(6518)({target:"Number",stat:!0},{isNaN:function(e){return e!=e}})},208:function(e,t,r){"use strict";r.d(t,{E:function(){return i}}),r(9089),r(9449);var n=r(4269),i=function(){function e(e){var t=e.type,r=e.id||n.Wp.getUniqueId();this.id=r,this.type=t}return e.prototype.set=function(e){e.file=e.file||e.fileInputId&&n.Wp.getFileUrl(e.fileInputId),this.body={id:this.id,chatType:e.chatType||"singleChat",type:"img",file:e.file,width:e.width,height:e.height,to:e.to,from:e.from||"",roomType:e.roomType,success:e.success,fail:e.fail,ext:e.ext,time:Date.now(),onFileUploadError:e.onFileUploadError,onFileUploadComplete:e.onFileUploadComplete,onFileUploadProgress:e.onFileUploadProgress,body:e.body,isChatThread:e.isChatThread}},e.prototype.setChatType=function(e){return!!this.body&&(this.body.chatType=e,!0)},e.prototype.setGroup=function(e){return!!this.body&&(this.body.group=e,!0)},e.create=function(e){var t,r,i,o,s,a,u,c=e.imageType,l=null===(i=null===(r=null===(t=e.file)||void 0===t?void 0:t.data)||void 0===r?void 0:r.type)||void 0===i?void 0:i.toLowerCase(),d=null===(s=null===(o=e.file)||void 0===o?void 0:o.filetype)||void 0===s?void 0:s.toLowerCase(),f=null===(u=null===(a=e.file)||void 0===a?void 0:a.filename)||void 0===u?void 0:u.toLowerCase(),h="image/gif"===l||"gif"===d||"image/gif"===d||!0===(null==f?void 0:f.endsWith(".gif")),p=e.isGif||h,v=p||!0===e.isOriginalImage||"original"===c;return{id:n.Wp.getUniqueId(),chatType:e.chatType,type:"img",url:e.url,width:e.width,height:e.height,file:e.file,to:e.to,from:e.from||"",ext:e.ext,time:Date.now(),msgConfig:e.msgConfig,file_length:e.file_length,onFileUploadError:e.onFileUploadError,onFileUploadComplete:e.onFileUploadComplete,onFileUploadProgress:e.onFileUploadProgress,isChatThread:e.isChatThread,priority:e.priority,deliverOnlineOnly:e.deliverOnlineOnly,receiverList:e.receiverList,webhookEnv:e.webhookEnv,thumbnailWidth:e.thumbnailWidth,thumbnailHeight:e.thumbnailHeight,isGif:p,isOriginalImage:v}},e}()},229:function(e,t,r){"use strict";function n(e,t){return e+t|0}function i(e){for(var t="",r=0;r<4;r++)t+="0".concat((e>>>8*r&255).toString(16)).slice(-2);return t}function o(e){var t=new Uint8Array(e),r=t.length,o=64*((r+8>>>6)+1),s=new Uint8Array(o);s.set(t),s[r]=128;for(var a=8*r,u=a>>>0,c=Math.floor(a/4294967296)>>>0,l=0;l<4;l++)s[o-8+l]=u>>>8*l&255,s[o-4+l]=c>>>8*l&255;var d=[7,12,17,22,7,12,17,22,7,12,17,22,7,12,17,22,5,9,14,20,5,9,14,20,5,9,14,20,5,9,14,20,4,11,16,23,4,11,16,23,4,11,16,23,4,11,16,23,6,10,15,21,6,10,15,21,6,10,15,21,6,10,15,21],f=new Array(64);for(l=0;l<64;l++)f[l]=Math.floor(4294967296*Math.abs(Math.sin(l+1)));for(var h,p,v=1732584193,m=4023233417,_=2562383102,g=271733878,E=new Array(16),y=0;y<o;y+=64){for(l=0;l<16;l++){var O=y+4*l;E[l]=s[O]|s[O+1]<<8|s[O+2]<<16|s[O+3]<<24}var T=v,R=m,I=_,S=g;for(l=0;l<64;l++){var C=0,b=0;l<16?(C=R&I|~R&S,b=l):l<32?(C=S&R|~S&I,b=(5*l+1)%16):l<48?(C=R^I^S,b=(3*l+5)%16):(C=I^(R|~S),b=7*l%16);var N=I,A=R,M=(h=n(n(T,C),n(f[l],E[b])))<<(p=d[l])|h>>>32-p;R=n(R,M),T=S,I=A,S=N}v=n(v,T),m=n(m,R),_=n(_,I),g=n(g,S)}return"".concat(i(v)).concat(i(m)).concat(i(_)).concat(i(g))}r.d(t,{K:function(){return o}}),r(8706),r(3792),r(4782),r(4743),r(1745),r(8309),r(3288),r(6099),r(8781),r(1489),r(1630),r(2170),r(5044),r(1920),r(1694),r(9955),r(3206),r(4496),r(6651),r(2887),r(9369),r(6812),r(8995),r(1575),r(6072),r(8747),r(8845),r(9423),r(7301),r(373),r(6614),r(1405),r(3684)},235:function(e,t,r){"use strict";var n=r(9213).forEach,i=r(4598)("forEach");e.exports=i?[].forEach:function(e){return n(this,e,arguments.length>1?arguments[1]:void 0)}},280:function(e,t,r){"use strict";var n=r(6518),i=r(7751),o=r(6395),s=r(550),a=r(916).CONSTRUCTOR,u=r(3438),c=i("Promise"),l=o&&!a;n({target:"Promise",stat:!0,forced:o||a},{resolve:function(e){return u(l&&this===c?s:this,e)}})},283:function(e,t,r){"use strict";var n=r(9504),i=r(9039),o=r(4901),s=r(9297),a=r(3724),u=r(350).CONFIGURABLE,c=r(3706),l=r(1181),d=l.enforce,f=l.get,h=String,p=Object.defineProperty,v=n("".slice),m=n("".replace),_=n([].join),g=a&&!i((function(){return 8!==p((function(){}),"length",{value:8}).length})),E=String(String).split("String"),y=e.exports=function(e,t,r){"Symbol("===v(h(t),0,7)&&(t="["+m(h(t),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),r&&r.getter&&(t="get "+t),r&&r.setter&&(t="set "+t),(!s(e,"name")||u&&e.name!==t)&&(a?p(e,"name",{value:t,configurable:!0}):e.name=t),g&&r&&s(r,"arity")&&e.length!==r.arity&&p(e,"length",{value:r.arity});try{r&&s(r,"constructor")&&r.constructor?a&&p(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(e){}var n=d(e);return s(n,"source")||(n.source=_(E,"string"==typeof t?t:"")),e};Function.prototype.toString=y((function(){return o(this)&&f(this).source||c(this)}),"toString")},298:function(e,t,r){"use strict";var n=r(2195),i=r(5397),o=r(8480).f,s=r(7680),a="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];e.exports.f=function(e){return a&&"Window"===n(e)?function(e){try{return o(e)}catch(e){return s(a)}}(e):o(i(e))}},350:function(e,t,r){"use strict";var n=r(3724),i=r(9297),o=Function.prototype,s=n&&Object.getOwnPropertyDescriptor,a=i(o,"name"),u=a&&"something"===function(){}.name,c=a&&(!n||n&&s(o,"name").configurable);e.exports={EXISTS:a,PROPER:u,CONFIGURABLE:c}},361:function(e,t,r){"use strict";var n=t,i=r(3262),o=["double","float","int32","uint32","sint32","fixed32","sfixed32","int64","uint64","sint64","fixed64","sfixed64","bool","string","bytes"];function s(e,t){var r=0,n={};for(t|=0;r<e.length;)n[o[r+t]]=e[r++];return n}n.basic=s([1,5,0,0,0,5,5,0,0,0,1,1,0,2,2]),n.defaults=s([0,0,0,0,0,0,0,0,0,0,0,0,!1,"",i.emptyArray,null]),n.long=s([0,0,0,1,1],7),n.mapKey=s([0,0,0,5,5,0,0,0,1,1,0,2],2),n.packed=s([1,5,0,0,0,5,5,0,0,0,1,1,0])},373:function(e,t,r){"use strict";var n=r(4576),i=r(7476),o=r(9039),s=r(9306),a=r(4488),u=r(4644),c=r(3709),l=r(3763),d=r(9519),f=r(3607),h=u.aTypedArray,p=u.exportTypedArrayMethod,v=n.Uint16Array,m=v&&i(v.prototype.sort),_=!(!m||o((function(){m(new v(2),null)}))&&o((function(){m(new v(2),{})}))),g=!!m&&!o((function(){if(d)return d<74;if(c)return c<67;if(l)return!0;if(f)return f<602;var e,t,r=new v(516),n=Array(516);for(e=0;e<516;e++)t=e%4,r[e]=515-e,n[e]=e-2*t+3;for(m(r,(function(e,t){return(e/4|0)-(t/4|0)})),e=0;e<516;e++)if(r[e]!==n[e])return!0}));p("sort",(function(e){return void 0!==e&&s(e),g?m(this,e):a(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))}),!g||_)},397:function(e,t,r){"use strict";var n=r(7751);e.exports=n("document","documentElement")},420:function(e,t,r){"use strict";e.exports=function(e){var t=i.codegen(["m"],e.name+"$verify")('if(typeof m!=="object"||m===null)')("return%j","object expected"),r={};e.oneofsArray.length&&t("var p={}");for(var n=0;n<e.fieldsArray.length;++n){var u=e._fieldsArray[n].resolve(),c="m"+i.safeProp(u.name);if(u.optional&&t("if(%s!=null&&m.hasOwnProperty(%j)){",c,u.name),u.map)t("if(!util.isObject(%s))",c)("return%j",o(u,"object"))("var k=Object.keys(%s)",c)("for(var i=0;i<k.length;++i){"),a(t,u,"k[i]"),s(t,u,n,c+"[k[i]]")("}");else if(u.repeated)t("if(!Array.isArray(%s))",c)("return%j",o(u,"array"))("for(var i=0;i<%s.length;++i){",c),s(t,u,n,c+"[i]")("}");else{if(u.partOf){var l=i.safeProp(u.partOf.name);1===r[u.partOf.name]&&t("if(p%s===1)",l)("return%j",u.partOf.name+": multiple values"),r[u.partOf.name]=1,t("p%s=1",l)}s(t,u,n,c)}u.optional&&t("}")}return t("return null")};var n=r(5643),i=r(3262);function o(e,t){return e.name+": "+t+(e.repeated&&"array"!==t?"[]":e.map&&"object"!==t?"{k:"+e.keyType+"}":"")+" expected"}function s(e,t,r,i){if(t.resolvedType)if(t.resolvedType instanceof n){e("switch(%s){",i)("default:")("return%j",o(t,"enum value"));for(var s=Object.keys(t.resolvedType.values),a=0;a<s.length;++a)e("case %i:",t.resolvedType.values[s[a]]);e("break")("}")}else e("{")("var e=types[%i].verify(%s);",r,i)("if(e)")("return%j+e",t.name+".")("}");else switch(t.type){case"int32":case"uint32":case"sint32":case"fixed32":case"sfixed32":e("if(!util.isInteger(%s))",i)("return%j",o(t,"integer"));break;case"int64":case"uint64":case"sint64":case"fixed64":case"sfixed64":e("if(!util.isInteger(%s)&&!(%s&&util.isInteger(%s.low)&&util.isInteger(%s.high)))",i,i,i,i)("return%j",o(t,"integer|Long"));break;case"float":case"double":e('if(typeof %s!=="number")',i)("return%j",o(t,"number"));break;case"bool":e('if(typeof %s!=="boolean")',i)("return%j",o(t,"boolean"));break;case"string":e("if(!util.isString(%s))",i)("return%j",o(t,"string"));break;case"bytes":e('if(!(%s&&typeof %s.length==="number"||util.isString(%s)))',i,i,i)("return%j",o(t,"buffer"))}return e}function a(e,t,r){switch(t.keyType){case"int32":case"uint32":case"sint32":case"fixed32":case"sfixed32":e("if(!util.key32Re.test(%s))",r)("return%j",o(t,"integer key"));break;case"int64":case"uint64":case"sint64":case"fixed64":case"sfixed64":e("if(!util.key64Re.test(%s))",r)("return%j",o(t,"integer|Long key"));break;case"bool":e("if(!util.key2Re.test(%s))",r)("return%j",o(t,"boolean key"))}return e}},421:function(e){"use strict";e.exports={}},436:function(e,t,r){"use strict";var n,i,o,s=r(6518),a=r(6395),u=r(6193),c=r(4576),l=r(9565),d=r(6840),f=r(2967),h=r(687),p=r(7633),v=r(9306),m=r(4901),_=r(34),g=r(679),E=r(2293),y=r(9225).set,O=r(1955),T=r(3138),R=r(1103),I=r(8265),S=r(1181),C=r(550),b=r(916),N=r(6043),A="Promise",M=b.CONSTRUCTOR,w=b.REJECTION_EVENT,L=b.SUBCLASSING,U=S.getterFor(A),x=S.set,D=C&&C.prototype,P=C,k=D,F=c.TypeError,H=c.document,B=c.process,G=N.f,W=G,j=!!(H&&H.createEvent&&c.dispatchEvent),q="unhandledrejection",K=function(e){var t;return!(!_(e)||!m(t=e.then))&&t},z=function(e,t){var r,n,i,o=t.value,s=1===t.state,a=s?e.ok:e.fail,u=e.resolve,c=e.reject,d=e.domain;try{a?(s||(2===t.rejection&&Q(t),t.rejection=1),!0===a?r=o:(d&&d.enter(),r=a(o),d&&(d.exit(),i=!0)),r===e.promise?c(new F("Promise-chain cycle")):(n=K(r))?l(n,r,u,c):u(r)):c(o)}catch(e){d&&!i&&d.exit(),c(e)}},V=function(e,t){e.notified||(e.notified=!0,O((function(){for(var r,n=e.reactions;r=n.get();)z(r,e);e.notified=!1,t&&!e.rejection&&Y(e)})))},J=function(e,t,r){var n,i;j?((n=H.createEvent("Event")).promise=t,n.reason=r,n.initEvent(e,!1,!0),c.dispatchEvent(n)):n={promise:t,reason:r},!w&&(i=c["on"+e])?i(n):e===q&&T("Unhandled promise rejection",r)},Y=function(e){l(y,c,(function(){var t,r=e.facade,n=e.value;if(X(e)&&(t=R((function(){u?B.emit("unhandledRejection",n,r):J(q,r,n)})),e.rejection=u||X(e)?2:1,t.error))throw t.value}))},X=function(e){return 1!==e.rejection&&!e.parent},Q=function(e){l(y,c,(function(){var t=e.facade;u?B.emit("rejectionHandled",t):J("rejectionhandled",t,e.value)}))},$=function(e,t,r){return function(n){e(t,n,r)}},Z=function(e,t,r){e.done||(e.done=!0,r&&(e=r),e.value=t,e.state=2,V(e,!0))},ee=function(e,t,r){if(!e.done){e.done=!0,r&&(e=r);try{if(e.facade===t)throw new F("Promise can't be resolved itself");var n=K(t);n?O((function(){var r={done:!1};try{l(n,t,$(ee,r,e),$(Z,r,e))}catch(t){Z(r,t,e)}})):(e.value=t,e.state=1,V(e,!1))}catch(t){Z({done:!1},t,e)}}};if(M&&(k=(P=function(e){g(this,k),v(e),l(n,this);var t=U(this);try{e($(ee,t),$(Z,t))}catch(e){Z(t,e)}}).prototype,(n=function(e){x(this,{type:A,done:!1,notified:!1,parent:!1,reactions:new I,rejection:!1,state:0,value:null})}).prototype=d(k,"then",(function(e,t){var r=U(this),n=G(E(this,P));return r.parent=!0,n.ok=!m(e)||e,n.fail=m(t)&&t,n.domain=u?B.domain:void 0,0===r.state?r.reactions.add(n):O((function(){z(n,r)})),n.promise})),i=function(){var e=new n,t=U(e);this.promise=e,this.resolve=$(ee,t),this.reject=$(Z,t)},N.f=G=function(e){return e===P||void 0===e?new i(e):W(e)},!a&&m(C)&&D!==Object.prototype)){o=D.then,L||d(D,"then",(function(e,t){var r=this;return new P((function(e,t){l(o,r,e,t)})).then(e,t)}),{unsafe:!0});try{delete D.constructor}catch(e){}f&&f(D,k)}s({global:!0,constructor:!0,wrap:!0,forced:M},{Promise:P}),h(P,A,!1,!0),p(A)},511:function(e,t,r){"use strict";var n=r(9167),i=r(9297),o=r(1951),s=r(4913).f;e.exports=function(e){var t=n.Symbol||(n.Symbol={});i(t,e)||s(t,e,{value:o.f(e)})}},527:function(e){"use strict";e.exports=d;var t=/[\s{}=;:[\],'"()<>]/g,r=/(?:"([^"\\]*(?:\\.[^"\\]*)*)")/g,n=/(?:'([^'\\]*(?:\\.[^'\\]*)*)')/g,i=/^ *[*/]+ */,o=/^\s*\*?\/*/,s=/\n/g,a=/\s/,u=/\\(.?)/g,c={0:"\0",r:"\r",n:"\n",t:"\t"};function l(e){return e.replace(u,(function(e,t){switch(t){case"\\":case"":return t;default:return c[t]||""}}))}function d(e,u){e=e.toString();var c=0,d=e.length,f=1,h=null,p=null,v=0,m=!1,_=!1,g=[],E=null;function y(e){return Error("illegal "+e+" (line "+f+")")}function O(t){return e.charAt(t)}function T(t,r,n){h=e.charAt(t++),v=f,m=!1,_=n;var a,c=t-(u?2:3);do{if(--c<0||"\n"===(a=e.charAt(c))){m=!0;break}}while(" "===a||"\t"===a);for(var l=e.substring(t,r).split(s),d=0;d<l.length;++d)l[d]=l[d].replace(u?o:i,"").trim();p=l.join("\n").trim()}function R(t){var r=I(t),n=e.substring(t,r);return/^\s*\/{1,2}/.test(n)}function I(e){for(var t=e;t<d&&"\n"!==O(t);)t++;return t}function S(){if(g.length>0)return g.shift();if(E)return function(){var t="'"===E?n:r;t.lastIndex=c-1;var i=t.exec(e);if(!i)throw y("string");return c=t.lastIndex,C(E),E=null,l(i[1])}();var i,o,s,h,p,v=0===c;do{if(c===d)return null;for(i=!1;a.test(s=O(c));)if("\n"===s&&(v=!0,++f),++c===d)return null;if("/"===O(c)){if(++c===d)throw y("comment");if("/"===O(c))if(u){if(h=c,p=!1,R(c)){p=!0;do{if((c=I(c))===d)break;c++}while(R(c))}else c=Math.min(d,I(c)+1);p&&T(h,c,v),f++,i=!0}else{for(p="/"===O(h=c+1);"\n"!==O(++c);)if(c===d)return null;++c,p&&T(h,c-1,v),++f,i=!0}else{if("*"!==(s=O(c)))return"/";h=c+1,p=u||"*"===O(h);do{if("\n"===s&&++f,++c===d)throw y("comment");o=s,s=O(c)}while("*"!==o||"/"!==s);++c,p&&T(h,c-2,v),i=!0}}}while(i);var m=c;if(t.lastIndex=0,!t.test(O(m++)))for(;m<d&&!t.test(O(m));)++m;var _=e.substring(c,c=m);return'"'!==_&&"'"!==_||(E=_),_}function C(e){g.push(e)}function b(){if(!g.length){var e=S();if(null===e)return null;C(e)}return g[0]}return Object.defineProperty({next:S,peek:b,push:C,skip:function(e,t){var r=b();if(r===e)return S(),!0;if(!t)throw y("token '"+r+"', '"+e+"' expected");return!1},cmnt:function(e){var t=null;return void 0===e?v===f-1&&(u||"*"===h||m)&&(t=_?p:null):(v<e&&b(),v!==e||m||!u&&"/"!==h||(t=_?null:p)),t}},"line",{get:function(){return f}})}d.unescape=l},537:function(e,t,r){"use strict";var n=r(550),i=r(4428),o=r(916).CONSTRUCTOR;e.exports=o||!i((function(e){n.all(e).then(void 0,(function(){}))}))},550:function(e,t,r){"use strict";var n=r(4576);e.exports=n.Promise},566:function(e,t,r){"use strict";var n=r(9504),i=r(9306),o=r(34),s=r(9297),a=r(7680),u=r(616),c=Function,l=n([].concat),d=n([].join),f={};e.exports=u?c.bind:function(e){var t=i(this),r=t.prototype,n=a(arguments,1),u=function(){var r=l(n,a(arguments));return this instanceof u?function(e,t,r){if(!s(f,t)){for(var n=[],i=0;i<t;i++)n[i]="a["+i+"]";f[t]=c("C,a","return new C("+d(n,",")+")")}return f[t](e,r)}(t,r.length,r):t.apply(e,r)};return o(r)&&(u.prototype=r),u}},589:function(e,t,r){"use strict";r.d(t,{V:function(){return o},v:function(){return s}}),r(9085);var n=r(7968),i=function(){return i=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},i.apply(this,arguments)};function o(e){try{var t=this._compressor;return t&&t.enableDownlinkCompression&&"string"!=typeof e.data?[i(i({},e),{data:t.decompress(e.data)}),!0]:[e,!0]}catch(t){return this._compressorFailureCount++,n.vF.error("decompress message error",t),n.vF.error("decompress failure times:",this._compressorFailureCount),this.sock.close(),[e,!1]}}function s(e){try{var t=this._compressor;return t&&t.enableUplinkCompression?[t.compress(e),!0]:[e,!0]}catch(t){return this._compressorFailureCount++,n.vF.error("compress message error",t),n.vF.error("compress failure times:",this._compressorFailureCount),this.sock.close(),[e,!1]}}},597:function(e,t,r){"use strict";var n=r(9039),i=r(8227),o=r(9519),s=i("species");e.exports=function(e){return o>=51||!n((function(){var t=[];return(t.constructor={})[s]=function(){return{foo:1}},1!==t[e](Boolean).foo}))}},616:function(e,t,r){"use strict";var n=r(9039);e.exports=!n((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")}))},655:function(e,t,r){"use strict";var n=r(6955),i=String;e.exports=function(e){if("Symbol"===n(e))throw new TypeError("Cannot convert a Symbol value to a string");return i(e)}},666:function(e,t,r){"use strict";var n,i;r.d(t,{J:function(){return i}}),function(e){e[e.OFFLINE=0]="OFFLINE",e[e.ONLINE=1]="ONLINE",e[e.UNKNOWN=2]="UNKNOWN",e[e.NONE=3]="NONE"}(n||(n={})),function(e){e[e.START=0]="START",e[e.START_AND_COMPLETED=1]="START_AND_COMPLETED",e[e.IN_PROGRESS=2]="IN_PROGRESS",e[e.COMPLETED=3]="COMPLETED",e[e.ERROR=4]="ERROR"}(i||(i={}))},679:function(e,t,r){"use strict";var n=r(1625),i=TypeError;e.exports=function(e,t){if(n(t,e))return e;throw new i("Incorrect invocation")}},686:function(e,t,r){"use strict";r.d(t,{Qv:function(){return n},s$:function(){return o},tx:function(){return i}});var n=720,i=.85;function o(e,t,r){var n=Math.min(e,t);if(n<=r)return{width:e,height:t};var i=r/n;return{width:Math.round(e*i),height:Math.round(t*i)}}},687:function(e,t,r){"use strict";var n=r(4913).f,i=r(9297),o=r(8227)("toStringTag");e.exports=function(e,t,r){e&&!r&&(e=e.prototype),e&&!i(e,o)&&n(e,o,{configurable:!0,value:t})}},707:function(e,t,r){"use strict";r.d(t,{r:function(){return i}});var n=r(4269),i=function(){function e(e){this.id=e.id,this.type=e.type}return e.prototype.set=function(e){this.body={id:this.id,ackId:e.ackId,type:"delivery",to:e.to,from:e.from||""}},e.create=function(e){return{id:n.Wp.getUniqueId(),ackId:e.ackId,type:"delivery",to:e.to,from:e.from||"",isChatThread:e.isChatThread,priority:e.priority,deliverOnlineOnly:e.deliverOnlineOnly}},e}()},739:function(e,t,r){"use strict";var n=r(6518),i=r(9039),o=r(8981),s=r(2777);n({target:"Date",proto:!0,arity:1,forced:i((function(){return null!==new Date(NaN).toJSON()||1!==Date.prototype.toJSON.call({toISOString:function(){return 1}})}))},{toJSON:function(e){var t=o(this),r=s(t,"number");return"number"!=typeof r||isFinite(r)?t.toISOString():null}})},741:function(e){"use strict";var t=Math.ceil,r=Math.floor;e.exports=Math.trunc||function(e){var n=+e;return(n>0?r:t)(n)}},744:function(e,t,r){"use strict";var n=t,i=r(5643),o=r(3262);function s(e,t,r,n){if(t.resolvedType)if(t.resolvedType instanceof i){e("switch(d%s){",n);for(var o=t.resolvedType.values,s=Object.keys(o),a=0;a<s.length;++a)t.repeated&&o[s[a]]===t.typeDefault&&e("default:"),e("case%j:",s[a])("case %i:",o[s[a]])("m%s=%j",n,o[s[a]])("break");e("}")}else e('if(typeof d%s!=="object")',n)("throw TypeError(%j)",t.fullName+": object expected")("m%s=types[%i].fromObject(d%s)",n,r,n);else{var u=!1;switch(t.type){case"double":case"float":e("m%s=Number(d%s)",n,n);break;case"uint32":case"fixed32":e("m%s=d%s>>>0",n,n);break;case"int32":case"sint32":case"sfixed32":e("m%s=d%s|0",n,n);break;case"uint64":u=!0;case"int64":case"sint64":case"fixed64":case"sfixed64":e("if(util.Long)")("(m%s=util.Long.fromValue(d%s)).unsigned=%j",n,n,u)('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,u?"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 a(e,t,r,n){if(t.resolvedType)t.resolvedType instanceof i?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 o=!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":o=!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,o?"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=o.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<t.length;++n){var a=t[n].resolve(),u=o.safeProp(a.name);a.map?(r("if(d%s){",u)('if(typeof d%s!=="object")',u)("throw TypeError(%j)",a.fullName+": object expected")("m%s={}",u)("for(var ks=Object.keys(d%s),i=0;i<ks.length;++i){",u),s(r,a,n,u+"[ks[i]]")("}")("}")):a.repeated?(r("if(d%s){",u)("if(!Array.isArray(d%s))",u)("throw TypeError(%j)",a.fullName+": array expected")("m%s=[]",u)("for(var i=0;i<d%s.length;++i){",u),s(r,a,n,u+"[i]")("}")("}")):(a.resolvedType instanceof i||r("if(d%s!=null){",u),s(r,a,n,u),a.resolvedType instanceof i||r("}"))}return r("return m")},n.toObject=function(e){var t=e.fieldsArray.slice().sort(o.compareFieldsById);if(!t.length)return o.codegen()("return {}");for(var r=o.codegen(["m","o"],e.name+"$toObject")("if(!o)")("o={}")("var d={}"),n=[],s=[],u=[],c=0;c<t.length;++c)t[c].partOf||(t[c].resolve().repeated?n:t[c].map?s:u).push(t[c]);if(n.length){for(r("if(o.arrays||o.defaults){"),c=0;c<n.length;++c)r("d%s=[]",o.safeProp(n[c].name));r("}")}if(s.length){for(r("if(o.objects||o.defaults){"),c=0;c<s.length;++c)r("d%s={}",o.safeProp(s[c].name));r("}")}if(u.length){for(r("if(o.defaults){"),c=0;c<u.length;++c){var l=u[c],d=o.safeProp(l.name);if(l.resolvedType instanceof i)r("d%s=o.enums===String?%j:%j",d,l.resolvedType.valuesById[l.typeDefault],l.typeDefault);else if(l.long)r("if(util.Long){")("var n=new util.Long(%i,%i,%j)",l.typeDefault.low,l.typeDefault.high,l.typeDefault.unsigned)("d%s=o.longs===String?n.toString():o.longs===Number?n.toNumber():n",d)("}else")("d%s=o.longs===String?%j:%i",d,l.typeDefault.toString(),l.typeDefault.toNumber());else if(l.bytes){var f="["+Array.prototype.slice.call(l.typeDefault).join(",")+"]";r("if(o.bytes===String)d%s=%j",d,String.fromCharCode.apply(String,l.typeDefault))("else{")("d%s=%s",d,f)("if(o.bytes!==Array)d%s=util.newBuffer(d%s)",d,d)("}")}else r("d%s=%j",d,l.typeDefault)}r("}")}var h=!1;for(c=0;c<t.length;++c){l=t[c];var p=e._fieldsArray.indexOf(l);d=o.safeProp(l.name),l.map?(h||(h=!0,r("var ks2")),r("if(m%s&&(ks2=Object.keys(m%s)).length){",d,d)("d%s={}",d)("for(var j=0;j<ks2.length;++j){"),a(r,l,p,d+"[ks2[j]]")("}")):l.repeated?(r("if(m%s&&m%s.length){",d,d)("d%s=[]",d)("for(var j=0;j<m%s.length;++j){",d),a(r,l,p,d+"[j]")("}")):(r("if(m%s!=null&&m.hasOwnProperty(%j)){",d,l.name),a(r,l,p,d),l.partOf&&r("if(o.oneofs)")("d%s=%j",o.safeProp(l.partOf.name),l.name)),r("}")}return r("return d")}},757:function(e,t,r){"use strict";var n=r(7751),i=r(4901),o=r(1625),s=r(7040),a=Object;e.exports=s?function(e){return"symbol"==typeof e}:function(e){var t=n("Symbol");return i(t)&&o(t.prototype,a(e))}},788:function(e,t,r){"use strict";var n=r(34),i=r(2195),o=r(8227)("match");e.exports=function(e){var t;return n(e)&&(void 0!==(t=e[o])?!!t:"RegExp"===i(e))}},810:function(e,t,r){"use strict";r.d(t,{f:function(){return i}}),r(9089);var n=r(4269),i=function(){function e(e){var t=e.type,r=e.id||n.Wp.getUniqueId();this.id=r,this.type=t}return e.prototype.set=function(e){e.file=e.file||e.fileInputId&&n.Wp.getFileUrl(e.fileInputId),this.body={id:this.id,chatType:e.chatType||"singleChat",type:"audio",file:e.file,filename:e.filename,length:e.length,file_length:e.file_length,fileInputId:e.fileInputId,to:e.to,from:e.from,roomType:e.roomType,success:e.success,fail:e.fail,ext:e.ext,time:Date.now(),onFileUploadError:e.onFileUploadError,onFileUploadComplete:e.onFileUploadComplete,onFileUploadProgress:e.onFileUploadProgress,body:e.body,isChatThread:e.isChatThread}},e.prototype.setChatType=function(e){return!!this.body&&(this.body.chatType=e,!0)},e.prototype.setGroup=function(e){return!!this.body&&(this.body.group=e,!0)},e.create=function(e){return{id:n.Wp.getUniqueId(),chatType:e.chatType,type:"audio",filename:e.filename,length:e.length,file:e.file,to:e.to,from:e.from||"",ext:e.ext,time:Date.now(),onFileUploadError:e.onFileUploadError,onFileUploadComplete:e.onFileUploadComplete,onFileUploadProgress:e.onFileUploadProgress,body:e.body,file_length:e.file_length,msgConfig:e.msgConfig,isChatThread:e.isChatThread,priority:e.priority,deliverOnlineOnly:e.deliverOnlineOnly,receiverList:e.receiverList,webhookEnv:e.webhookEnv}},e}()},818:function(e,t,r){"use strict";e.exports=o;var n=r(3449);(o.prototype=Object.create(n.prototype)).constructor=o;var i=r(3610);function o(){n.call(this)}function s(e,t,r){e.length<40?i.utf8.write(e,t,r):t.utf8Write?t.utf8Write(e,r):t.write(e,r)}o._configure=function(){o.alloc=i._Buffer_allocUnsafe,o.writeBytesBuffer=i.Buffer&&i.Buffer.prototype instanceof Uint8Array&&"set"===i.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<e.length;)t[r++]=e[n++]}},o.prototype.bytes=function(e){i.isString(e)&&(e=i._Buffer_from(e,"base64"));var t=e.length>>>0;return this.uint32(t),t&&this._push(o.writeBytesBuffer,t,e),this},o.prototype.string=function(e){var t=i.Buffer.byteLength(e);return this.uint32(t),t&&this._push(s,t,e),this},o._configure()},851:function(e,t,r){"use strict";var n=r(6955),i=r(5966),o=r(4117),s=r(6269),a=r(8227)("iterator");e.exports=function(e){if(!o(e))return i(e,a)||i(e,"@@iterator")||s[n(e)]}},859:function(e,t,r){"use strict";r.d(t,{a:function(){return i}}),r(9089);var n=r(4269),i=function(){function e(e){var t=e.type,r=e.id;this.id=r||n.Wp.getUniqueId(),this.type=t}return e.prototype.set=function(e){this.body={id:this.id,chatType:e.chatType||"singleChat",type:"loc",to:e.to,addr:e.addr,buildingName:e.buildingName,lat:e.lat,lng:e.lng,from:e.from,roomType:e.roomType,success:e.success,fail:e.fail,ext:e.ext,time:Date.now()}},e.prototype.setChatType=function(e){return!!this.body&&(this.body.chatType=e,!0)},e.prototype.setGroup=function(e){return!!this.body&&(this.body.group=e,!0)},e.create=function(e){return{id:n.Wp.getUniqueId(),chatType:e.chatType||"singleChat",type:"loc",to:e.to,addr:e.addr,buildingName:e.buildingName,lat:e.lat,lng:e.lng,from:e.from||"",ext:e.ext,time:Date.now(),msgConfig:e.msgConfig,isChatThread:e.isChatThread,priority:e.priority,deliverOnlineOnly:e.deliverOnlineOnly,receiverList:e.receiverList,webhookEnv:e.webhookEnv}},e}()},916:function(e,t,r){"use strict";var n=r(4576),i=r(550),o=r(4901),s=r(2796),a=r(3706),u=r(8227),c=r(4215),l=r(6395),d=r(9519),f=i&&i.prototype,h=u("species"),p=!1,v=o(n.PromiseRejectionEvent),m=s("Promise",(function(){var e=a(i),t=e!==String(i);if(!t&&66===d)return!0;if(l&&(!f.catch||!f.finally))return!0;if(!d||d<51||!/native code/.test(e)){var r=new i((function(e){e(1)})),n=function(e){e((function(){}),(function(){}))};if((r.constructor={})[h]=n,!(p=r.then((function(){}))instanceof n))return!0}return!(t||"BROWSER"!==c&&"DENO"!==c||v)}));e.exports={CONSTRUCTOR:m,REJECTION_EVENT:v,SUBCLASSING:p}},926:function(e,t,r){"use strict";var n=r(9306),i=r(8981),o=r(7055),s=r(6198),a=TypeError,u="Reduce of empty array with no initial value",c=function(e){return function(t,r,c,l){var d=i(t),f=o(d),h=s(d);if(n(r),0===h&&c<2)throw new a(u);var p=e?h-1:0,v=e?-1:1;if(c<2)for(;;){if(p in f){l=f[p],p+=v;break}if(p+=v,e?p<0:h<=p)throw new a(u)}for(;e?p>=0:h>p;p+=v)p in f&&(l=r(l,f[p],p,d));return l}};e.exports={left:c(!1),right:c(!0)}},1034:function(e,t,r){"use strict";var n=r(9565),i=r(9297),o=r(1625),s=r(7979),a=RegExp.prototype;e.exports=function(e){var t=e.flags;return void 0!==t||"flags"in a||i(e,"flags")||!o(a,e)?t:n(s,e)}},1072:function(e,t,r){"use strict";var n=r(1828),i=r(8727);e.exports=Object.keys||function(e){return n(e,i)}},1080:function(e,t,r){"use strict";e.exports=function(e){for(var t,r=o.codegen(["m","w"],e.name+"$encode")("if(!w)")("w=Writer.create()"),a=e.fieldsArray.slice().sort(o.compareFieldsById),u=0;u<a.length;++u){var c=a[u].resolve(),l=e._fieldsArray.indexOf(c),d=c.resolvedType instanceof n?"int32":c.type,f=i.basic[d];t="m"+o.safeProp(c.name),c.map?(r("if(%s!=null&&Object.hasOwnProperty.call(m,%j)){",t,c.name)("for(var ks=Object.keys(%s),i=0;i<ks.length;++i){",t)("w.uint32(%i).fork().uint32(%i).%s(ks[i])",(c.id<<3|2)>>>0,8|i.mapKey[c.keyType],c.keyType),void 0===f?r("types[%i].encode(%s[ks[i]],w.uint32(18).fork()).ldelim().ldelim()",l,t):r(".uint32(%i).%s(%s[ks[i]]).ldelim()",16|f,d,t),r("}")("}")):c.repeated?(r("if(%s!=null&&%s.length){",t,t),c.packed&&void 0!==i.packed[d]?r("w.uint32(%i).fork()",(c.id<<3|2)>>>0)("for(var i=0;i<%s.length;++i)",t)("w.%s(%s[i])",d,t)("w.ldelim()"):(r("for(var i=0;i<%s.length;++i)",t),void 0===f?s(r,c,l,t+"[i]"):r("w.uint32(%i).%s(%s[i])",(c.id<<3|f)>>>0,d,t)),r("}")):(c.optional&&r("if(%s!=null&&Object.hasOwnProperty.call(m,%j))",t,c.name),void 0===f?s(r,c,l,t):r("w.uint32(%i).%s(%s)",(c.id<<3|f)>>>0,d,t))}return r("return w")};var n=r(5643),i=r(361),o=r(3262);function s(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)}},1088:function(e,t,r){"use strict";var n=r(6518),i=r(9565),o=r(6395),s=r(350),a=r(4901),u=r(3994),c=r(2787),l=r(2967),d=r(687),f=r(6699),h=r(6840),p=r(8227),v=r(6269),m=r(7657),_=s.PROPER,g=s.CONFIGURABLE,E=m.IteratorPrototype,y=m.BUGGY_SAFARI_ITERATORS,O=p("iterator"),T="keys",R="values",I="entries",S=function(){return this};e.exports=function(e,t,r,s,p,m,C){u(r,t,s);var b,N,A,M=function(e){if(e===p&&D)return D;if(!y&&e&&e in U)return U[e];switch(e){case T:case R:case I:return function(){return new r(this,e)}}return function(){return new r(this)}},w=t+" Iterator",L=!1,U=e.prototype,x=U[O]||U["@@iterator"]||p&&U[p],D=!y&&x||M(p),P="Array"===t&&U.entries||x;if(P&&(b=c(P.call(new e)))!==Object.prototype&&b.next&&(o||c(b)===E||(l?l(b,E):a(b[O])||h(b,O,S)),d(b,w,!0,!0),o&&(v[w]=S)),_&&p===R&&x&&x.name!==R&&(!o&&g?f(U,"name",R):(L=!0,D=function(){return i(x,this)})),p)if(N={values:M(R),keys:m?D:M(T),entries:M(I)},C)for(A in N)(y||L||!(A in U))&&h(U,A,N[A]);else n({target:t,proto:!0,forced:y||L},N);return o&&!C||U[O]===D||h(U,O,D,{name:p}),v[t]=D,N}},1103:function(e){"use strict";e.exports=function(e){try{return{error:!1,value:e()}}catch(e){return{error:!0,value:e}}}},1108:function(e,t,r){"use strict";var n=r(6955);e.exports=function(e){var t=n(e);return"BigInt64Array"===t||"BigUint64Array"===t}},1156:function(e,t,r){"use strict";r.d(t,{A4:function(){return l},dO:function(){return u},fu:function(){return c}}),r(1629),r(4423),r(9432),r(6099),r(1699),r(3500);var n=r(8093),i=r(3484),o=r(7968);function s(){var e=this.context.appName,t=this.context.orgName;return!(!e||!t)||(this.onError&&this.onError({type:n.C.WEBIM_CONNCTION_AUTH_ERROR,message:"appName or orgName is illegal"}),!1)}function a(){var e,t=this.context.accessToken;if(!t){var r=i.A.create({type:n.C.WEBIM_CONNCTION_TOKEN_NOT_ASSIGN_ERROR,message:"token not assign error"});return o.vF.debug("token not assign error",t),this.onError&&this.onError(r),null===(e=this.eventHandler)||void 0===e||e.dispatch("onError",r),!1}return!0}function u(){if(this._initWithAppId){if(!s.call(this))return{error:i.A.create({type:n.C.WEBIM_CONNECTION_CLOSED,message:"not login"})};if(!a.call(this))return{error:i.A.create({type:n.C.WEBIM_CONNCTION_TOKEN_NOT_ASSIGN_ERROR,message:"token not assign error"})}}else if(!s.call(this)||!a.call(this))return{error:i.A.create({type:n.C.REST_PARAMS_STATUS,message:"appkey or token error"})};return{}}function c(e){var t=e.data,r=e.type;return{data:{status:Object.keys(t.errorKeys).length>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 o=t.errorKeys[e];r=o.includes("is not part of you")?i.A.create({type:n.C.NO_PERMISSION,message:o}):o.includes("size of metadata for this single chatroom exceeds the user defined limit")||o.includes("total size of chatroom metadata for this app exceeds the user defined limit")||o.includes("is exceeding maximum limit")?i.A.create({type:n.C.MAX_LIMIT,message:o}):o.includes("is not Legal")?i.A.create({type:n.C.REQUEST_PARAMETER_ERROR,message:o}):o.includes("Failed to update userMetadata. Concurrent updates not allowed")?i.A.create({type:n.C.OPERATION_NOT_ALLOWED,message:o}):i.A.create({type:n.C.WEBIM_CONNCTION_AJAX_ERROR,message:o})})),r}},1181:function(e,t,r){"use strict";var n,i,o,s=r(8622),a=r(4576),u=r(34),c=r(6699),l=r(9297),d=r(7629),f=r(6119),h=r(421),p="Object already initialized",v=a.TypeError,m=a.WeakMap;if(s||d.state){var _=d.state||(d.state=new m);_.get=_.get,_.has=_.has,_.set=_.set,n=function(e,t){if(_.has(e))throw new v(p);return t.facade=e,_.set(e,t),t},i=function(e){return _.get(e)||{}},o=function(e){return _.has(e)}}else{var g=f("state");h[g]=!0,n=function(e,t){if(l(e,g))throw new v(p);return t.facade=e,c(e,g,t),t},i=function(e){return l(e,g)?e[g]:{}},o=function(e){return l(e,g)}}e.exports={set:n,get:i,has:o,enforce:function(e){return o(e)?i(e):n(e,{})},getterFor:function(e){return function(t){var r;if(!u(t)||(r=i(t)).type!==e)throw new v("Incompatible receiver, "+e+" required");return r}}}},1240:function(e,t,r){"use strict";var n=r(9504);e.exports=n(1..valueOf)},1274:function(e,t,r){"use strict";var n;r.d(t,{q:function(){return n}}),function(e){e[e.CREATE=0]="CREATE",e[e.FAIL=1]="FAIL",e[e.INPROGRESS=2]="INPROGRESS",e[e.SUCCESS=3]="SUCCESS"}(n||(n={}))},1291:function(e,t,r){"use strict";var n=r(741);e.exports=function(e){var t=+e;return t!=t||0===t?0:n(t)}},1296:function(e,t,r){"use strict";var n=r(4495);e.exports=n&&!!Symbol.for&&!!Symbol.keyFor},1344:function(e,t,r){"use strict";e.exports=c;var n=r(7209);((c.prototype=Object.create(n.prototype)).constructor=c).className="Field";var i,o=r(5643),s=r(361),a=r(3262),u=/^required|optional|repeated$/;function c(e,t,r,i,o,c,l){if(a.isObject(i)?(l=o,c=i,i=o=void 0):a.isObject(o)&&(l=c,c=o,o=void 0),n.call(this,e,c),!a.isInteger(t)||t<0)throw TypeError("id must be a non-negative integer");if(!a.isString(r))throw TypeError("type must be a string");if(void 0!==i&&!u.test(i=i.toString().toLowerCase()))throw TypeError("rule must be a string rule");if(void 0!==o&&!a.isString(o))throw TypeError("extend must be a string");"proto3_optional"===i&&(i="optional"),this.rule=i&&"optional"!==i?i:void 0,this.type=r,this.id=t,this.extend=o||void 0,this.required="required"===i,this.optional=!this.required,this.repeated="repeated"===i,this.map=!1,this.message=null,this.partOf=null,this.typeDefault=null,this.defaultValue=null,this.long=!!a.Long&&void 0!==s.long[r],this.bytes="bytes"===r,this.resolvedType=null,this.extensionField=null,this.declaringField=null,this._packed=null,this.comment=l}c.fromJSON=function(e,t){return new c(e,t.id,t.type,t.rule,t.extend,t.options,t.comment)},Object.defineProperty(c.prototype,"packed",{get:function(){return null===this._packed&&(this._packed=!1!==this.getOption("packed")),this._packed}}),c.prototype.setOption=function(e,t,r){return"packed"===e&&(this._packed=null),n.prototype.setOption.call(this,e,t,r)},c.prototype.toJSON=function(e){var t=!!e&&Boolean(e.keepComments);return a.toObject(["rule","optional"!==this.rule&&this.rule||void 0,"type",this.type,"id",this.id,"extend",this.extend,"options",this.options,"comment",t?this.comment:void 0])},c.prototype.resolve=function(){if(this.resolved)return this;if(void 0===(this.typeDefault=s.defaults[this.type])&&(this.resolvedType=(this.declaringField?this.declaringField.parent:this.parent).lookupTypeOrEnum(this.type),this.resolvedType instanceof i?this.typeDefault=null:this.typeDefault=this.resolvedType.values[Object.keys(this.resolvedType.values)[0]]),this.options&&null!=this.options.default&&(this.typeDefault=this.options.default,this.resolvedType instanceof o&&"string"==typeof this.typeDefault&&(this.typeDefault=this.resolvedType.values[this.typeDefault])),this.options&&(!0!==this.options.packed&&(void 0===this.options.packed||!this.resolvedType||this.resolvedType instanceof o)||delete this.options.packed,Object.keys(this.options).length||(this.options=void 0)),this.long)this.typeDefault=a.Long.fromNumber(this.typeDefault,"u"===this.type.charAt(0)),Object.freeze&&Object.freeze(this.typeDefault);else if(this.bytes&&"string"==typeof this.typeDefault){var e;a.base64.test(this.typeDefault)?a.base64.decode(this.typeDefault,e=a.newBuffer(a.base64.length(this.typeDefault)),0):a.utf8.write(this.typeDefault,e=a.newBuffer(a.utf8.length(this.typeDefault)),0),this.typeDefault=e}return this.map?this.defaultValue=a.emptyObject:this.repeated?this.defaultValue=a.emptyArray:this.defaultValue=this.typeDefault,this.parent instanceof i&&(this.parent.ctor.prototype[this.name]=this.defaultValue),n.prototype.resolve.call(this)},c.d=function(e,t,r,n){return"function"==typeof t?t=a.decorateType(t).name:t&&"object"==typeof t&&(t=a.decorateEnum(t).name),function(i,o){a.decorateType(i.constructor).add(new c(o,e,t,r,{default:n}))}},c._configure=function(e){i=e}},1392:function(e,t,r){"use strict";var n,i=r(6518),o=r(7476),s=r(7347).f,a=r(8014),u=r(655),c=r(5749),l=r(7750),d=r(1436),f=r(6395),h=o("".slice),p=Math.min,v=d("startsWith");i({target:"String",proto:!0,forced:!(!f&&!v&&(n=s(String.prototype,"startsWith"),n&&!n.writable)||v)},{startsWith:function(e){var t=u(l(this));c(e);var r=a(p(arguments.length>1?arguments[1]:void 0,t.length)),n=u(e);return h(t,r,r+n.length)===n}})},1405:function(e,t,r){"use strict";var n=r(4576),i=r(8745),o=r(4644),s=r(9039),a=r(7680),u=n.Int8Array,c=o.aTypedArray,l=o.exportTypedArrayMethod,d=[].toLocaleString,f=!!u&&s((function(){d.call(new u(1))}));l("toLocaleString",(function(){return i(d,f?a(c(this)):c(this),a(arguments))}),s((function(){return[1,2].toLocaleString()!==new u([1,2]).toLocaleString()}))||!s((function(){u.prototype.toLocaleString.call([1,2])})))},1408:function(e,t,r){"use strict";r(1629),r(4423),r(2010),r(2892),r(9085),r(9432),r(6099),r(3500);var n=r(7968),i=function(){return i=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},i.apply(this,arguments)},o=["public","members_only","allow_user_invites","invite_need_confirm"],s={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",avatar:"avatar"};function a(e,t){var r,n,a,u,c,l,d=this,f=this.context,h=f.userId,p=f.jid,v=t.from.name===h&&p.clientResource!==t.from.clientResource;return t.isThread?(a={id:t.mucId.name,name:t.mucName,operation:"",parentId:t.mucParentId.name,operator:t.from.name,userName:t.to.length?t.to[0].name:""},u={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},c={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)&&(l=JSON.parse(t.eventInfo.ext))),({45:function(){var e,r,n;c.operation="memberAttributesUpdate";var i=JSON.parse(null===(e=null==t?void 0:t.eventInfo)||void 0===e?void 0:e.ext)||{};c.attributes=i.properties||{},c.userId=i.username||"",v?null===(r=d.eventHandler)||void 0===r||r.dispatch("onMultiDeviceEvent",c):null===(n=d.eventHandler)||void 0===n||n.dispatch("onGroupEvent",c)},44:function(){var e;c.operation="removeChatRoomAttributes",c.attributes=l.result.successKeys,l.result.successKeys.length>0&&(null===(e=d.eventHandler)||void 0===e||e.dispatch("onChatroomEvent",c))},43:function(){var e;c.operation="updateChatRoomAttributes";var t={};l.result.successKeys.forEach((function(e){t[e]=l.properties[e]})),c.attributes=t,l.result.successKeys.length>0&&(null===(e=d.eventHandler)||void 0===e||e.dispatch("onChatroomEvent",c))},42:function(){},41:function(){},40:function(){},39:function(){},38:function(){var e;u.operation="chatThreadNameUpdate",null===(e=d.eventHandler)||void 0===e||e.dispatch("onMultiDeviceEvent",u)},37:function(){var e;a.operation="userRemove",null===(e=d.eventHandler)||void 0===e||e.dispatch("onChatThreadChange",a)},36:function(){var e;u.operation="chatThreadLeave",null===(e=d.eventHandler)||void 0===e||e.dispatch("onMultiDeviceEvent",u)},35:function(){var e;u.operation="chatThreadJoin",null===(e=d.eventHandler)||void 0===e||e.dispatch("onMultiDeviceEvent",u)},34:function(){var e;u.operation="chatThreadDestroy",null===(e=d.eventHandler)||void 0===e||e.dispatch("onMultiDeviceEvent",u)},33:function(){var e;u.operation="chatThreadCreate",null===(e=d.eventHandler)||void 0===e||e.dispatch("onMultiDeviceEvent",u)},32:function(){var e,r,i,o;n.type=t.isChatroom?"rmChatRoomMute":"rmGroupMute",d.onPresence&&d.onPresence(n),t.isChatroom?null===(e=d.eventHandler)||void 0===e||e.dispatch("onChatroomChange",n):null===(r=d.eventHandler)||void 0===r||r.dispatch("onGroupChange",n),c.operation="unmuteAllMembers",t.isChatroom?null===(i=d.eventHandler)||void 0===i||i.dispatch("onChatroomEvent",c):null===(o=d.eventHandler)||void 0===o||o.dispatch("onGroupEvent",c)},31:function(){var e,r,i,o;n.type=t.isChatroom?"muteChatRoom":"muteGroup",d.onPresence&&d.onPresence(n),t.isChatroom?null===(e=d.eventHandler)||void 0===e||e.dispatch("onChatroomChange",n):null===(r=d.eventHandler)||void 0===r||r.dispatch("onGroupChange",n),c.operation="muteAllMembers",t.isChatroom?null===(i=d.eventHandler)||void 0===i||i.dispatch("onChatroomEvent",c):null===(o=d.eventHandler)||void 0===o||o.dispatch("onGroupEvent",c)},30:function(){var e,r,i,o;n.type=t.isChatroom?"rmUserFromChatRoomWhiteList":"rmUserFromGroupWhiteList",d.onPresence&&d.onPresence(n),t.isChatroom?null===(e=d.eventHandler)||void 0===e||e.dispatch("onChatroomChange",n):null===(r=d.eventHandler)||void 0===r||r.dispatch("onGroupChange",n),c.operation="removeAllowlistMember",c.userId=n.to,t.isChatroom?null===(i=d.eventHandler)||void 0===i||i.dispatch("onChatroomEvent",c):null===(o=d.eventHandler)||void 0===o||o.dispatch("onGroupEvent",c)},29:function(){var e,r,i,o;n.type=t.isChatroom?"addUserToChatRoomWhiteList":"addUserToGroupWhiteList",d.onPresence&&d.onPresence(n),t.isChatroom?null===(e=d.eventHandler)||void 0===e||e.dispatch("onChatroomChange",n):null===(r=d.eventHandler)||void 0===r||r.dispatch("onGroupChange",n),c.operation="addUserToAllowlist",c.userId=n.to,t.isChatroom?null===(i=d.eventHandler)||void 0===i||i.dispatch("onChatroomEvent",c):null===(o=d.eventHandler)||void 0===o||o.dispatch("onGroupEvent",c)},28:function(){var e,r,i,o;n.type="deleteFile",d.onPresence&&d.onPresence(n),t.isChatroom?null===(e=d.eventHandler)||void 0===e||e.dispatch("onChatroomChange",n):null===(r=d.eventHandler)||void 0===r||r.dispatch("onGroupChange",n),c.operation="deleteFile",t.isChatroom?null===(i=d.eventHandler)||void 0===i||i.dispatch("onChatroomEvent",c):null===(o=d.eventHandler)||void 0===o||o.dispatch("onGroupEvent",c)},27:function(){var e,r,i,o;n.type="uploadFile",d.onPresence&&d.onPresence(n),t.isChatroom?null===(e=d.eventHandler)||void 0===e||e.dispatch("onChatroomChange",n):null===(r=d.eventHandler)||void 0===r||r.dispatch("onGroupChange",n),c.operation="uploadFile",t.isChatroom?null===(i=d.eventHandler)||void 0===i||i.dispatch("onChatroomEvent",c):null===(o=d.eventHandler)||void 0===o||o.dispatch("onGroupEvent",c)},26:function(){var e,r,i,o;n.type="deleteAnnouncement",d.onPresence&&d.onPresence(n),t.isChatroom?null===(e=d.eventHandler)||void 0===e||e.dispatch("onChatroomChange",n):null===(r=d.eventHandler)||void 0===r||r.dispatch("onGroupChange",n),c.operation="deleteAnnouncement",t.isChatroom?null===(i=d.eventHandler)||void 0===i||i.dispatch("onChatroomEvent",c):null===(o=d.eventHandler)||void 0===o||o.dispatch("onGroupEvent",c)},25:function(){var e,r,i,o;n.type="updateAnnouncement",n.announcement=t.reason,d.onPresence&&d.onPresence(n),t.isChatroom?null===(e=d.eventHandler)||void 0===e||e.dispatch("onChatroomChange",n):null===(r=d.eventHandler)||void 0===r||r.dispatch("onGroupChange",n),c.operation="updateAnnouncement",c.announcement=t.reason,t.isChatroom?null===(i=d.eventHandler)||void 0===i||i.dispatch("onChatroomEvent",c):null===(o=d.eventHandler)||void 0===o||o.dispatch("onGroupEvent",c)},24:function(){var e,r,i,o;n.type="removeMute",d.onPresence&&d.onPresence(n),t.isChatroom?null===(e=d.eventHandler)||void 0===e||e.dispatch("onChatroomChange",n):null===(r=d.eventHandler)||void 0===r||r.dispatch("onGroupChange",n),c.operation="unmuteMember",c.userId=n.to,t.isChatroom?null===(i=d.eventHandler)||void 0===i||i.dispatch("onChatroomEvent",c):null===(o=d.eventHandler)||void 0===o||o.dispatch("onGroupEvent",c)},23:function(){var e,r,i,o;if(n.type="addMute",d.onPresence&&d.onPresence(n),t.ext&&"string"==typeof t.ext){var s=JSON.parse(t.ext);s.user_mute_time&&(n.muteTimestamp=s.user_mute_time,c.muteTimestamp=s.user_mute_time)}t.isChatroom?null===(e=d.eventHandler)||void 0===e||e.dispatch("onChatroomChange",n):null===(r=d.eventHandler)||void 0===r||r.dispatch("onGroupChange",n),c.operation="muteMember",c.userId=n.to,t.isChatroom?null===(i=d.eventHandler)||void 0===i||i.dispatch("onChatroomEvent",c):null===(o=d.eventHandler)||void 0===o||o.dispatch("onGroupEvent",c)},22:function(){var e,r,i,o;n.type="removeAdmin",d.onPresence&&d.onPresence(n),t.isChatroom?null===(e=d.eventHandler)||void 0===e||e.dispatch("onChatroomChange",n):null===(r=d.eventHandler)||void 0===r||r.dispatch("onGroupChange",n),c.operation="removeAdmin",c.userId=n.to,t.isChatroom?null===(i=d.eventHandler)||void 0===i||i.dispatch("onChatroomEvent",c):null===(o=d.eventHandler)||void 0===o||o.dispatch("onGroupEvent",c)},21:function(){var e,r,i,o;n.type="addAdmin",d.onPresence&&d.onPresence(n),t.isChatroom?null===(e=d.eventHandler)||void 0===e||e.dispatch("onChatroomChange",n):null===(r=d.eventHandler)||void 0===r||r.dispatch("onGroupChange",n),c.operation="setAdmin",c.userId=n.to,t.isChatroom?null===(i=d.eventHandler)||void 0===i||i.dispatch("onChatroomEvent",c):null===(o=d.eventHandler)||void 0===o||o.dispatch("onGroupEvent",c)},20:function(){var e,r,i,o;n.type="changeOwner",d.onPresence&&d.onPresence(n),t.isChatroom?null===(e=d.eventHandler)||void 0===e||e.dispatch("onChatroomChange",n):null===(r=d.eventHandler)||void 0===r||r.dispatch("onGroupChange",n),c.operation="changeOwner",c.userId=n.to,t.isChatroom?null===(i=d.eventHandler)||void 0===i||i.dispatch("onChatroomEvent",c):null===(o=d.eventHandler)||void 0===o||o.dispatch("onGroupEvent",c)},19:function(){var e,r,i,o;n.type="direct_joined",n.groupName=t.mucName,d.onPresence&&d.onPresence(n),t.isChatroom?null===(e=d.eventHandler)||void 0===e||e.dispatch("onChatroomChange",n):null===(r=d.eventHandler)||void 0===r||r.dispatch("onGroupChange",n),c.operation="directJoined",c.name=t.mucName,t.isChatroom?null===(i=d.eventHandler)||void 0===i||i.dispatch("onChatroomEvent",c):null===(o=d.eventHandler)||void 0===o||o.dispatch("onGroupEvent",c)},18:function(){var e,r,o,s,a;n.type=t.isChatroom?"leaveChatRoom":"leaveGroup",d.onPresence&&d.onPresence(n),t.isChatroom?null===(e=d.eventHandler)||void 0===e||e.dispatch("onChatroomChange",n):null===(r=d.eventHandler)||void 0===r||r.dispatch("onGroupChange",n);var u=t.mucMemberCount;if(u&&(c.memberCount=u),c.operation="memberAbsence",t.members&&t.members.length>0){var l=i({},c);l.members=t.members,l.operation="membersAbsence",delete l.from,t.isChatroom?t.members.forEach((function(e){var t;null===(t=d.eventHandler)||void 0===t||t.dispatch("onChatroomEvent",i(i({},c),{from:e}))})):null===(o=d.eventHandler)||void 0===o||o.dispatch("onGroupEvent",l)}else t.isChatroom?null===(s=d.eventHandler)||void 0===s||s.dispatch("onChatroomEvent",c):null===(a=d.eventHandler)||void 0===a||a.dispatch("onGroupEvent",c)},17:function(){var e,r,o,s,a;t.isChatroom&&t.ext&&(c.ext=t.ext,n.ext=t.ext),n.type=t.isChatroom?"memberJoinChatRoomSuccess":"memberJoinPublicGroupSuccess",d.onPresence&&d.onPresence(n),t.isChatroom?null===(e=d.eventHandler)||void 0===e||e.dispatch("onChatroomChange",n):null===(r=d.eventHandler)||void 0===r||r.dispatch("onGroupChange",n);var u=t.mucMemberCount;if(c.operation="memberPresence",u&&(c.memberCount=u),t.members&&t.members.length>0){var l=i({},c);l.members=t.members,l.operation="membersPresence",delete l.from,t.isChatroom?t.members.forEach((function(e){var t;null===(t=d.eventHandler)||void 0===t||t.dispatch("onChatroomEvent",i(i({},c),{from:e}))})):null===(o=d.eventHandler)||void 0===o||o.dispatch("onGroupEvent",l)}else t.isChatroom?null===(s=d.eventHandler)||void 0===s||s.dispatch("onChatroomEvent",c):null===(a=d.eventHandler)||void 0===a||a.dispatch("onGroupEvent",c)},16:function(){var e,r;n.type="unblock",d.onPresence&&d.onPresence(n),t.isChatroom?null===(e=d.eventHandler)||void 0===e||e.dispatch("onChatroomChange",n):null===(r=d.eventHandler)||void 0===r||r.dispatch("onGroupChange",n)},15:function(){var e,r;n.type="block",d.onPresence&&d.onPresence(n),t.isChatroom?null===(e=d.eventHandler)||void 0===e||e.dispatch("onChatroomChange",n):null===(r=d.eventHandler)||void 0===r||r.dispatch("onGroupChange",n)},14:function(){var e,r,i,a,u,l=t.isChatroom;if(!l){var f=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):o.includes(e)?"true"===t||!0===t:t}));c.detail=n.detail={},Object.keys(f).forEach((function(e){var t=s[e];if(t){var r=f[e];c.detail&&(c.detail[t]=r),n.detail&&(n.detail[t]=r)}}))}n.type="update",d.onPresence&&d.onPresence(n),l?null===(r=d.eventHandler)||void 0===r||r.dispatch("onChatroomChange",n):null===(i=d.eventHandler)||void 0===i||i.dispatch("onGroupChange",n),c.operation="updateInfo",l?null===(a=d.eventHandler)||void 0===a||a.dispatch("onChatroomEvent",c):null===(u=d.eventHandler)||void 0===u||u.dispatch("onGroupEvent",c)},13:function(){var e,r,i,o;n.type="allow",n.reason=t.reason,d.onPresence&&d.onPresence(n),t.isChatroom?null===(e=d.eventHandler)||void 0===e||e.dispatch("onChatroomChange",n):null===(r=d.eventHandler)||void 0===r||r.dispatch("onGroupChange",n),t.reason&&"undefined"!==t.reason&&(c.reason=t.reason),c.operation="unblockMember",c.userId=n.to,t.isChatroom?null===(i=d.eventHandler)||void 0===i||i.dispatch("onChatroomEvent",c):null===(o=d.eventHandler)||void 0===o||o.dispatch("onGroupEvent",c)},12:function(){var e,r;n.type="ban",d.onPresence&&d.onPresence(n),t.isChatroom?null===(e=d.eventHandler)||void 0===e||e.dispatch("onChatroomChange",n):null===(r=d.eventHandler)||void 0===r||r.dispatch("onGroupChange",n)},11:function(){var e,r;n.type="getBlackList",d.onPresence&&d.onPresence(n),t.isChatroom?null===(e=d.eventHandler)||void 0===e||e.dispatch("onChatroomChange",n):null===(r=d.eventHandler)||void 0===r||r.dispatch("onGroupChange",n)},10:function(){var e,r,i,o;n.type="removedFromGroup",n.kicked=n.to,d.onPresence&&d.onPresence(n),t.isChatroom?null===(e=d.eventHandler)||void 0===e||e.dispatch("onChatroomChange",n):null===(r=d.eventHandler)||void 0===r||r.dispatch("onGroupChange",n),c.operation="removeMember",c.userId=n.to,t.isChatroom?null===(i=d.eventHandler)||void 0===i||i.dispatch("onChatroomEvent",c):null===(o=d.eventHandler)||void 0===o||o.dispatch("onGroupEvent",c)},9:function(){var e,r,i,o;n.type="invite_decline",n.kicked=n.to,d.onPresence&&d.onPresence(n),t.isChatroom?null===(e=d.eventHandler)||void 0===e||e.dispatch("onChatroomChange",n):null===(r=d.eventHandler)||void 0===r||r.dispatch("onGroupChange",n),c.operation="rejectInvite",t.isChatroom?null===(i=d.eventHandler)||void 0===i||i.dispatch("onChatroomEvent",c):null===(o=d.eventHandler)||void 0===o||o.dispatch("onGroupEvent",c)},8:function(){var e,r,i,o;n.type="invite_accept",n.kicked=n.to,d.onPresence&&d.onPresence(n),t.isChatroom?null===(e=d.eventHandler)||void 0===e||e.dispatch("onChatroomChange",n):null===(r=d.eventHandler)||void 0===r||r.dispatch("onGroupChange",n),c.operation="acceptInvite",t.isChatroom?null===(i=d.eventHandler)||void 0===i||i.dispatch("onChatroomEvent",c):null===(o=d.eventHandler)||void 0===o||o.dispatch("onGroupEvent",c)},7:function(){var e,r,i,o;n.type="invite",n.kicked=n.to,n.groupName=t.mucName,d.onPresence&&d.onPresence(n),t.isChatroom?null===(e=d.eventHandler)||void 0===e||e.dispatch("onChatroomChange",n):null===(r=d.eventHandler)||void 0===r||r.dispatch("onGroupChange",n),c.operation="inviteToJoin",c.name=t.mucName,c.userId=n.to,t.isChatroom?null===(i=d.eventHandler)||void 0===i||i.dispatch("onChatroomEvent",c):null===(o=d.eventHandler)||void 0===o||o.dispatch("onGroupEvent",c)},6:function(){var e,r,i,o;n.type="joinPublicGroupDeclined",d.onPresence&&d.onPresence(n),t.isChatroom?null===(e=d.eventHandler)||void 0===e||e.dispatch("onChatroomChange",n):null===(r=d.eventHandler)||void 0===r||r.dispatch("onGroupChange",n),c.operation="joinPublicGroupDeclined",t.isChatroom?null===(i=d.eventHandler)||void 0===i||i.dispatch("onChatroomEvent",c):(c.userId=t.to.length?t.to[0].name:"",null===(o=d.eventHandler)||void 0===o||o.dispatch("onGroupEvent",c))},5:function(){var e,r,i,o;n.type="joinPublicGroupSuccess",d.onPresence&&d.onPresence(n),t.isChatroom?null===(e=d.eventHandler)||void 0===e||e.dispatch("onChatroomChange",n):null===(r=d.eventHandler)||void 0===r||r.dispatch("onGroupChange",n),c.operation="acceptRequest",t.isChatroom?null===(i=d.eventHandler)||void 0===i||i.dispatch("onChatroomEvent",c):null===(o=d.eventHandler)||void 0===o||o.dispatch("onGroupEvent",c)},4:function(){var e,r,i,o;n.type="joinGroupNotifications",n.reason=t.reason,d.onPresence&&d.onPresence(n),t.isChatroom?null===(e=d.eventHandler)||void 0===e||e.dispatch("onChatroomChange",n):null===(r=d.eventHandler)||void 0===r||r.dispatch("onGroupChange",n),t.reason&&"undefined"!==t.reason&&(c.reason=t.reason),c.operation="requestToJoin",t.isChatroom?null===(i=d.eventHandler)||void 0===i||i.dispatch("onChatroomEvent",c):null===(o=d.eventHandler)||void 0===o||o.dispatch("onGroupEvent",c)},3:function(){var e,r;n.type="leave",d.onPresence&&d.onPresence(n),t.isChatroom?null===(e=d.eventHandler)||void 0===e||e.dispatch("onChatroomChange",n):null===(r=d.eventHandler)||void 0===r||r.dispatch("onGroupChange",n)},2:function(){var e,r;n.type="join",d.onPresence&&d.onPresence(n),t.isChatroom?null===(e=d.eventHandler)||void 0===e||e.dispatch("onChatroomChange",n):null===(r=d.eventHandler)||void 0===r||r.dispatch("onGroupChange",n)},1:function(){var e,r,i,o;n.type="deleteGroupChat",d.onPresence&&d.onPresence(n),t.isChatroom?null===(e=d.eventHandler)||void 0===e||e.dispatch("onChatroomChange",n):null===(r=d.eventHandler)||void 0===r||r.dispatch("onGroupChange",n),c.operation="destroy",t.isChatroom?null===(i=d.eventHandler)||void 0===i||i.dispatch("onChatroomEvent",c):null===(o=d.eventHandler)||void 0===o||o.dispatch("onGroupEvent",c)},0:function(){var e,r;c.operation="create",t.isChatroom?null===(e=d.eventHandler)||void 0===e||e.dispatch("onChatroomEvent",c):null===(r=d.eventHandler)||void 0===r||r.dispatch("onGroupEvent",c)}}[e]||function(){console.error("No match operation ".concat(e))})()}t.A=function(e){var t=this.root.lookup("easemob.pb.MUCBody").decode(e.payload),r=t.operation;n.vF.debug("onMucMessage",t),a.call(this,r,t)}},1415:function(e,t,r){"use strict";r(2405)},1436:function(e,t,r){"use strict";var n=r(8227)("match");e.exports=function(e){var t=/./;try{"/./"[e](t)}catch(r){try{return t[n]=!1,"/./"[e](t)}catch(e){}}return!1}},1447:function(e,t){"use strict";var r=t;r.length=function(e){for(var t=0,r=0,n=0;n<e.length;++n)(r=e.charCodeAt(n))<128?t+=1:r<2048?t+=2:55296==(64512&r)&&56320==(64512&e.charCodeAt(n+1))?(++n,t+=4):t+=3;return t},r.read=function(e,t,r){if(r-t<1)return"";for(var n,i=null,o=[],s=0;t<r;)(n=e[t++])<128?o[s++]=n:n>191&&n<224?o[s++]=(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,o[s++]=55296+(n>>10),o[s++]=56320+(1023&n)):o[s++]=(15&n)<<12|(63&e[t++])<<6|63&e[t++],s>8191&&((i||(i=[])).push(String.fromCharCode.apply(String,o)),s=0);return i?(s&&i.push(String.fromCharCode.apply(String,o.slice(0,s))),i.join("")):String.fromCharCode.apply(String,o.slice(0,s))},r.write=function(e,t,r){for(var n,i,o=r,s=0;s<e.length;++s)(n=e.charCodeAt(s))<128?t[r++]=n:n<2048?(t[r++]=n>>6|192,t[r++]=63&n|128):55296==(64512&n)&&56320==(64512&(i=e.charCodeAt(s+1)))?(n=65536+((1023&n)<<10)+(1023&i),++s,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-o}},1457:function(e,t,r){"use strict";e.exports=s;var n=r(7209);((s.prototype=Object.create(n.prototype)).constructor=s).className="OneOf";var i=r(1344),o=r(3262);function s(e,t,r,i){if(Array.isArray(t)||(r=t,t=void 0),n.call(this,e,r),void 0!==t&&!Array.isArray(t))throw TypeError("fieldNames must be an Array");this.oneof=t||[],this.fieldsArray=[],this.comment=i}function a(e){if(e.parent)for(var t=0;t<e.fieldsArray.length;++t)e.fieldsArray[t].parent||e.parent.add(e.fieldsArray[t])}s.fromJSON=function(e,t){return new s(e,t.oneof,t.options,t.comment)},s.prototype.toJSON=function(e){var t=!!e&&Boolean(e.keepComments);return o.toObject(["options",this.options,"oneof",this.oneof,"comment",t?this.comment:void 0])},s.prototype.add=function(e){if(!(e instanceof i))throw TypeError("field must be a Field");return e.parent&&e.parent!==this.parent&&e.parent.remove(e),this.oneof.push(e.name),this.fieldsArray.push(e),e.partOf=this,a(this),this},s.prototype.remove=function(e){if(!(e instanceof i))throw TypeError("field must be a Field");var t=this.fieldsArray.indexOf(e);if(t<0)throw Error(e+" is not a member of "+this);return this.fieldsArray.splice(t,1),(t=this.oneof.indexOf(e.name))>-1&&this.oneof.splice(t,1),e.partOf=null,this},s.prototype.onAdd=function(e){n.prototype.onAdd.call(this,e);for(var t=0;t<this.oneof.length;++t){var r=e.get(this.oneof[t]);r&&!r.partOf&&(r.partOf=this,this.fieldsArray.push(r))}a(this)},s.prototype.onRemove=function(e){for(var t,r=0;r<this.fieldsArray.length;++r)(t=this.fieldsArray[r]).parent&&t.parent.remove(t);n.prototype.onRemove.call(this,e)},s.d=function(){for(var e=new Array(arguments.length),t=0;t<arguments.length;)e[t]=arguments[t++];return function(t,r){o.decorateType(t.constructor).add(new s(r,e)),Object.defineProperty(t,r,{get:o.oneOfGetter(e),set:o.oneOfSetter(e)})}}},1469:function(e,t,r){"use strict";var n=r(7433);e.exports=function(e,t){return new(n(e))(0===t?0:t)}},1481:function(e,t,r){"use strict";var n=r(6518),i=r(6043);n({target:"Promise",stat:!0,forced:r(916).CONSTRUCTOR},{reject:function(e){var t=i.f(this);return(0,t.reject)(e),t.promise}})},1487:function(e,t,r){"use strict";r(2675),r(9463),r(2259),r(8980),r(3792),r(2712),r(4782),r(4554),r(6099),r(3362),r(7764),r(2953);var n=r(8093),i=r(7968),o=r(8288),s=r(3603),a=r(7507),u=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function s(e){try{u(n.next(e))}catch(e){o(e)}}function a(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}u((n=n.apply(e,t||[])).next())}))},c=function(e,t){var r,n,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;s;)try{if(r=1,n&&(i=2&o[0]?n.return:o[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,o[1])).done)return i;switch(n=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,n=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],n=0}finally{r=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}},l=function(){function e(e,t){var r=this;this.handleUploadProgress=function(e,t){var n,i;if(e.total){r.progressArr[t]=e.loaded;var o=r.progressArr.reduce((function(e,t){return e+t}),0);null===(i=(n=r.options).onFileUploadProgress)||void 0===i||i.call(n,{isTrusted:e.isTrusted,type:e.type,loaded:o>r.file.size?r.file.size:o,total:r.file.size,lengthComputable:e.lengthComputable})}},this.uuid="",this.pool=[],this.progressArr=[],this.connection=e,this.options=t,this.partSize=o.El,this.file=t.file,this.init(),this.rpt=this.connection.dataReport.geOperateFun({operationName:s.jz.REST_UPLOAD_FILE_IN_PARTS})}return e.prototype.init=function(){var e,t,r,l;return u(this,void 0,void 0,(function(){var u,d,f,h,p,v,m,_,g,E,y,O,T,R,I;return c(this,(function(c){switch(c.label){case 0:return c.trys.push([0,4,,6]),[4,a.v7.call(this.connection)];case 1:return u=c.sent(),d=u.data||{},f=d.fileMaxSize,h=void 0===f?0:f,p=d.partMinSize,v=void 0===p?o.El:p,m=d.uuid,_=void 0===m?"":m,g=u.extraInfo,O=g.elapse,T=g.httpCode,I=g.url,this.partSize=v,this.uuid=_,o.aI.size=v,i.vF.debug("multipartInit success","uuid: ".concat(_),"fileMaxSize: ".concat(h),"partMinSize: ".concat(v)),this.file.size>h?[4,this.multipartAbort()]:[3,3];case 2:return c.sent(),null===(t=(e=this.options).onFileUploadError)||void 0===t||t.call(e,{code:n.C.WEBIM_UPLOADFILE_ERROR,message:"The file size exceeds the maximum limit"}),[2];case 3:return this.rpt({data:{requestUrl:I,requestName:s.TT.REST_INIT_UPLOAD_TASK_IN_PARTS,requestElapse:O,requestMethod:"POST",isSuccess:1,code:T}}),this.upload(),[3,6];case 4:return E=c.sent(),y=(null==E?void 0:E.extraInfo)||{},O=y.elapse,T=y.httpCode,R=y.errDesc,I=y.url,this.rpt({data:{requestUrl:I,requestName:s.TT.REST_INIT_UPLOAD_TASK_IN_PARTS,requestElapse:O,requestMethod:"POST",isSuccess:0,codeDesc:R,code:T}}),[4,this.multipartAbort()];case 5:return c.sent(),null===(l=null===(r=this.options)||void 0===r?void 0:r.onInitFail)||void 0===l||l.call(r),[3,6];case 6:return[2]}}))}))},e.prototype.upload=function(){var e,t,r;return u(this,void 0,void 0,(function(){var n,i,u,l,d,f,h=this;return c(this,(function(p){switch(p.label){case 0:(new FileReader).readAsArrayBuffer(this.file),n=this.file.size,i=Math.ceil(n/this.partSize),p.label=1;case 1:p.trys.push([1,7,,9]),u=function(t){var r,i,u,d;return c(this,(function(c){switch(c.label){case 0:return r=t*l.partSize,i=Math.min(n,r+l.partSize),u=null===(e=l.file)||void 0===e?void 0:e.slice(r,i),(d=a.mr.call(l.connection,{uuid:l.uuid,partNumber:"".concat(t+1),part:u,onProgress:function(e){h.handleUploadProgress(e,t)}})).then((function(e){var t=(null==e?void 0:e.extraInfo)||{},r=t.elapse,n=t.httpCode,i=t.url;h.rpt({data:{requestUrl:i,requestName:s.TT.REST_UPLOAD_PART,requestElapse:r,isSuccess:1,requestMethod:"PUT",code:n}}),h.handleTask(d)})),d.catch((function(e){var t=(null==e?void 0:e.extraInfo)||{},r=t.elapse,n=t.httpCode,i=t.url,o=t.errDesc;h.rpt({data:{requestUrl:i,requestName:s.TT.REST_UPLOAD_PART,requestElapse:r,isSuccess:0,requestMethod:"PUT",code:n,codeDesc:o}}),delete e.extraInfo})),l.pool.push(d),l.pool.length!==o.UJ?[3,2]:[4,Promise.race(l.pool)];case 1:c.sent(),c.label=2;case 2:return[2]}}))},l=this,d=0,p.label=2;case 2:return d<i?[5,u(d)]:[3,5];case 3:p.sent(),p.label=4;case 4:return d++,[3,2];case 5:return[4,Promise.all(this.pool)];case 6:return p.sent(),this.multipartComplete(),[3,9];case 7:return f=p.sent(),[4,this.multipartAbort()];case 8:return p.sent(),this.rpt({data:{isLastApi:1,isSuccess:0}}),null===(r=(t=this.options).onFileUploadError)||void 0===r||r.call(t,f),[3,9];case 9:return[2]}}))}))},e.prototype.multipartComplete=function(){var e,t,r,n;return u(this,void 0,void 0,(function(){var i,o,u,l,d,f,h,p,v,m,_;return c(this,(function(c){switch(c.label){case 0:return c.trys.push([0,2,,3]),i=this.options.thumbnailInfo||{},o=i.width,u=i.height,[4,a.iK.call(this.connection,{uuid:this.uuid,thumbnailHeight:u,thumbnailWidth:o,conversationInfo:this.options.conversationInfo,uploadMd5:this.options.uploadMd5,uploadImageType:this.options.uploadImageType,imageWidth:this.options.imageWidth,imageHeight:this.options.imageHeight})];case 1:return l=c.sent(),d=(null==l?void 0:l.extraInfo)||{},p=d.elapse,v=d.httpCode,_=d.url,this.rpt({data:{requestUrl:_,requestName:s.TT.REST_COMPLETE_UPLOAD_PART,requestElapse:p,requestMethod:"POST",isSuccess:1,code:v}}),this.rpt({data:{isLastApi:1,isSuccess:1}}),null===(t=(e=this.options).onFileUploadComplete)||void 0===t||t.call(e,l),[3,3];case 2:return f=c.sent(),h=(null==f?void 0:f.extraInfo)||{},p=h.elapse,v=h.httpCode,m=h.errDesc,_=h.url,this.rpt({data:{requestUrl:_,requestName:s.TT.REST_COMPLETE_UPLOAD_PART,requestElapse:p,requestMethod:"POST",isSuccess:0,codeDesc:m,code:v}}),this.rpt({data:{isLastApi:1,isSuccess:0}}),null===(n=(r=this.options).onFileUploadError)||void 0===n||n.call(r,f),[3,3];case 3:return[2]}}))}))},e.prototype.multipartAbort=function(){return u(this,void 0,void 0,(function(){var e,t,r,n,i,o,u,l;return c(this,(function(c){switch(c.label){case 0:if(!this.uuid)return[2];c.label=1;case 1:return c.trys.push([1,3,,4]),[4,a.Hc.call(this.connection,{uuid:this.uuid})];case 2:return e=c.sent(),t=(null==e?void 0:e.extraInfo)||{},i=t.elapse,o=t.httpCode,l=t.url,this.rpt({data:{requestUrl:l,requestName:s.TT.REST_ABORT_UPLOAD_PART,requestElapse:i,requestMethod:"DELETE",isSuccess:1,code:o}}),[3,4];case 3:return r=c.sent(),n=(null==r?void 0:r.extraInfo)||{},i=n.elapse,o=n.httpCode,u=n.errDesc,l=n.url,this.rpt({data:{requestUrl:l,requestName:s.TT.REST_ABORT_UPLOAD_PART,requestElapse:i,requestMethod:"DELETE",isSuccess:0,codeDesc:u,code:o}}),[3,4];case 4:return[2]}}))}))},e.prototype.handleTask=function(e){var t=this.pool.findIndex((function(t){return t===e}));this.pool.splice(t,1)},e}();t.A=l},1489:function(e,t,r){"use strict";r(5823)("Uint8",(function(e){return function(t,r,n){return e(this,t,r,n)}}))},1510:function(e,t,r){"use strict";var n=r(6518),i=r(7751),o=r(9297),s=r(655),a=r(5745),u=r(1296),c=a("string-to-symbol-registry"),l=a("symbol-to-string-registry");n({target:"Symbol",stat:!0,forced:!u},{for:function(e){var t=s(e);if(o(c,t))return c[t];var r=i("Symbol")(t);return c[t]=r,l[r]=t,r}})},1575:function(e,t,r){"use strict";var n=r(4644),i=r(926).left,o=n.aTypedArray;(0,n.exportTypedArrayMethod)("reduce",(function(e){var t=arguments.length;return i(o(this),e,t,t>1?arguments[1]:void 0)}))},1625:function(e,t,r){"use strict";var n=r(9504);e.exports=n({}.isPrototypeOf)},1629:function(e,t,r){"use strict";var n=r(6518),i=r(235);n({target:"Array",proto:!0,forced:[].forEach!==i},{forEach:i})},1630:function(e,t,r){"use strict";var n=r(9504),i=r(4644),o=n(r(7029)),s=i.aTypedArray;(0,i.exportTypedArrayMethod)("copyWithin",(function(e,t){return o(s(this),e,t,arguments.length>2?arguments[2]:void 0)}))},1672:function(e,t,r){"use strict";r(2010);var n=r(7968),i={handleRosterMsg:function(e){var t,r,i,o,s,a,u=this.root.lookup("easemob.pb.RosterBody").decode(e.payload),c={type:"",to:u.to[0].name,from:u.from.name,status:u.reason};switch(u.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===(i=this.eventHandler)||void 0===i||i.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===(s=this.eventHandler)||void 0===s||s.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:n.vF.error("handleRosterMsg:",u)}this.onPresence&&c.type&&this.onPresence(c)}};t.A=i},1694:function(e,t,r){"use strict";var n=r(4644),i=r(9213).find,o=n.aTypedArray;(0,n.exportTypedArrayMethod)("find",(function(e){return i(o(this),e,arguments.length>1?arguments[1]:void 0)}))},1699:function(e,t,r){"use strict";var n=r(6518),i=r(9504),o=r(5749),s=r(7750),a=r(655),u=r(1436),c=i("".indexOf);n({target:"String",proto:!0,forced:!u("includes")},{includes:function(e){return!!~c(a(s(this)),a(o(e)),arguments.length>1?arguments[1]:void 0)}})},1745:function(e,t,r){"use strict";var n=r(6518),i=r(7476),o=r(9039),s=r(6346),a=r(8551),u=r(5610),c=r(8014),l=s.ArrayBuffer,d=s.DataView,f=d.prototype,h=i(l.prototype.slice),p=i(f.getUint8),v=i(f.setUint8);n({target:"ArrayBuffer",proto:!0,unsafe:!0,forced:o((function(){return!new l(2).slice(1,void 0).byteLength}))},{slice:function(e,t){if(h&&void 0===t)return h(a(this),e);for(var r=a(this).byteLength,n=u(e,r),i=u(void 0===t?r:t,r),o=new l(c(i-n)),s=new d(this),f=new d(o),m=0;n<i;)v(f,m++,p(s,n++));return o}})},1761:function(e,t,r){"use strict";var n=r(9565),i=r(9228),o=r(8551),s=r(34),a=r(8014),u=r(655),c=r(7750),l=r(5966),d=r(7829),f=r(6682);i("match",(function(e,t,r){return[function(t){var r=c(this),i=s(t)?l(t,e):void 0;return i?n(i,t,r):new RegExp(t)[e](u(r))},function(e){var n=o(this),i=u(e),s=r(t,n,i);if(s.done)return s.value;if(!n.global)return f(n,i);var c=n.unicode;n.lastIndex=0;for(var l,h=[],p=0;null!==(l=f(n,i));){var v=u(l[0]);h[p]=v,""===v&&(n.lastIndex=d(i,a(n.lastIndex),c)),p++}return 0===p?null:h}]}))},1798:function(e,t,r){"use strict";r(4423),r(9085),r(9432),r(1699);var n=r(8093),i=function(){return i=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},i.apply(this,arguments)};t.A=function(e,t,r,o){var s,a,u,c,l,d,f,h,p,v,m,_,g,E,y,O,T,R,I,S,C,b,N,A,M,w,L,U,x,D,P,k=e.response;k&&"string"==typeof k&&(k=JSON.parse(k));var F=e.status,H={elapse:o,httpCode:F,errDesc:null==k?void 0:k.error_description};if(400===F){if(4000005===k.error_code||4000006===k.error_code)return void t({type:n.C.REQUEST_PARAMETER_ERROR,message:null==k?void 0:k.error_description,extraInfo:H});if(40002===k.error_code)return void t({type:n.C.THREAD_ALREADY_EXIST,message:null==k?void 0:k.error_description,extraInfo:H});if(40009===k.error_code)return void t({type:n.C.OPERATION_UNSUPPORTED,message:null==k?void 0:k.error_description,extraInfo:H});if(60005===k.error_code)return void t({type:n.C.GROUP_MEMBER_ATTRIBUTES_SET_FAILED,message:(null==k?void 0:k.desc)||(null==k?void 0:k.error_description),extraInfo:H});if(60010===k.error_code)return void((null===(s=null==k?void 0:k.error_description)||void 0===s?void 0:s.includes("exceeds chatgroup user metadata single value limit"))?t({type:n.C.MAX_LIMIT,message:(null==k?void 0:k.desc)||k.error_description,extraInfo:H}):t({type:n.C.NO_PERMISSION,message:(null==k?void 0:k.desc)||k.error_description,extraInfo:H}));if(60011===k.error_code)return void t({type:n.C.CHATROOM_NOT_JOINED,message:null==k?void 0:k.desc,extraInfo:H});if(14403===k.error_code)return void t({type:n.C.WEBIM_UPLOADFILE_ERROR,message:null==k?void 0:k.error_description,data:k,extraInfo:H});if(60006===k.error_code||60007===k.error_code||60009===k.error_code||60012===k.error_code)return void t({type:n.C.MAX_LIMIT,message:(null==k?void 0:k.desc)||(null==k?void 0:k.error_description),extraInfo:H});if(91104===k.error_code)return void t({type:n.C.NO_PERMISSION,message:null==k?void 0:k.error_description,extraInfo:H});if(null===(a=k.error_description)||void 0===a?void 0:a.includes("are not members of this group"))return(null===(u=e.responseURL)||void 0===u?void 0:u.includes("chatgroups"))?t({type:n.C.GROUP_NOT_JOINED,data:e.response||e.responseText,message:k.error_description,extraInfo:H}):t({type:n.C.CHATROOM_NOT_JOINED,data:e.response||e.responseText,message:k.error_description,extraInfo:H}),void r({type:n.C.WEBIM_CONNCTION_AJAX_ERROR,message:null==k?void 0:k.error_description,data:e.responseText,extraInfo:H});if("the app not open presence"===(null==k?void 0:k.result))return void t({type:n.C.SERVICE_NOT_ENABLED,message:null==k?void 0:k.result,extraInfo:H});if(null===(c=null==k?void 0:k.error_description)||void 0===c?void 0:c.includes("remark length must less"))return void t({type:n.C.MAX_LIMIT,message:null==k?void 0:k.error_description,extraInfo:H});switch(null==k?void 0:k.error_description){case"the user is already operation this message":t({type:n.C.REACTION_ALREADY_ADDED,message:null==k?void 0:k.error_description,extraInfo:H});break;case"The quantity has exceeded the limit!":t({type:n.C.MAX_LIMIT,message:null==k?void 0:k.error_description,extraInfo:H});break;case"The user not in this group!":t({type:n.C.GROUP_NOT_JOINED,message:null==k?void 0:k.error_description,extraInfo:H});break;case"the user operation is illegal!":t({type:n.C.REACTION_OPERATION_IS_ILLEGAL,message:null==k?void 0:k.error_description,extraInfo:H});break;case"this appKey is not open reaction service!":case"this appKey not open message roaming":t({type:n.C.SERVICE_NOT_ENABLED,message:null==k?void 0:k.error_description,extraInfo:H});break;case"this message is creating reaction, please try again.":t({type:n.C.REACTION_CREATING,message:null==k?void 0:k.error_description,extraInfo:H});break;case"groupId can not be null!":t({type:n.C.GROUP_NOT_EXIST,message:null==k?void 0:k.error_description,extraInfo:H});break;case"The input text is too long.":t({type:n.C.TRANSLATION_TEXT_TOO_LONG,message:null==k?void 0:k.error_description,extraInfo:H});break;case"The target language is not valid.":t({type:n.C.TRANSLATION_NOT_VALID,message:null==k?void 0:k.error_description,extraInfo:H});break;case"report failed, get message by id failed":t({type:n.C.MESSAGE_NOT_FOUND,message:null==k?void 0:k.error_description,extraInfo:H});break;case"ext is too big ":t({type:n.C.PRESENCE_PARAM_EXCEED,message:null==k?void 0:k.error_description,extraInfo:H});break;case"Request body not readable.Please check content type is correct!":case"param mark must be not empty, please check!":case"param mark illegal, please check it!":case"param pin_msg_id illegal, please check it!":t({type:n.C.REQUEST_PARAMETER_ERROR,message:null==k?void 0:k.error_description,extraInfo:H});break;case"updateRemark | they are not friends, please add as a friend first.":t({type:n.C.USER_NOT_FRIEND,message:null==k?void 0:k.error_description,extraInfo:H});break;default:t({type:n.C.WEBIM_CONNCTION_AJAX_ERROR,message:null==k?void 0:k.error_description,data:e.responseText,extraInfo:H}),r({type:n.C.WEBIM_CONNCTION_AJAX_ERROR,message:null==k?void 0:k.error_description,data:e.responseText,extraInfo:H})}}else if(401===F)4010101===k.error_code?t({type:n.C.WEBIM_CONNCTION_TOKEN_NOT_ASSIGN_ERROR,message:null==k?void 0:k.error_description,extraInfo:H}):40001===k.error_code||60001===k.error_code||"Unable to authenticate (OAuth)"===k.error_description?t({type:n.C.NO_PERMISSION,message:null==k?void 0:k.error_description,extraInfo:H}):(r({type:n.C.WEBIM_CONNCTION_AJAX_ERROR,data:e.responseText,message:e.responseText,extraInfo:H}),t({type:n.C.WEBIM_CONNCTION_AJAX_ERROR,data:e.responseText,message:e.responseText,extraInfo:H}));else if(403===F)(null===(l=e.responseURL)||void 0===l?void 0:l.includes("/chatgroups/"))&&(null===(d=e.responseURL)||void 0===d?void 0:d.includes("/invite"))&&(null===(f=k.error_description)||void 0===f?void 0:f.includes("doesn't exist"))?t({type:n.C.USER_NOT_FOUND,data:e.response||e.responseText,message:k.error_description,extraInfo:H}):4e4===k.error_code||60004===k.error_code||15002===k.error_code||4030204===k.error_code?t({type:n.C.SERVICE_NOT_ENABLED,message:null==k?void 0:k.error_description,extraInfo:H}):40003===k.error_code||40004===k.error_code?t({type:n.C.THREAD_ALREADY_EXIST,message:null==k?void 0:k.error_description,extraInfo:H}):40005===k.error_code||40007===k.error_code||91002===k.error_code?t({type:n.C.MAX_LIMIT,message:null==k?void 0:k.error_description,extraInfo:H}):60002===k.error_code?t({type:n.C.PERMISSION_DENIED,message:null==k?void 0:k.error_description,extraInfo:H}):91101===k.error_code?t({type:n.C.MAX_LIMIT,message:null==k?void 0:k.error_description,extraInfo:H}):91102===k.error_code&&t({type:n.C.REQUEST_PARAMETER_ERROR,message:k.error_description,extraInfo:H}),"group member list is full!"===k.error_description?(null===(h=e.responseURL)||void 0===h?void 0:h.includes("chatgroups"))?t({type:n.C.GROUP_MEMBERS_FULL,data:e.response||e.responseText,message:k.error_description,extraInfo:H}):t({type:n.C.CHATROOM_MEMBERS_FULL,data:e.response||e.responseText,message:k.error_description,extraInfo:H}):(null===(p=k.error_description)||void 0===p?void 0:p.includes("invite users to join group failed"))&&(null===(v=k.error_description)||void 0===v?void 0:v.includes("already in group"))?(null===(m=e.responseURL)||void 0===m?void 0:m.includes("chatgroups"))&&t({type:n.C.GROUP_ALREADY_JOINED,data:e.response||e.responseText,message:k.error_description,extraInfo:H}):(null===(_=k.error_description)||void 0===_?void 0:_.includes("are not members of this group"))?(null===(g=e.responseURL)||void 0===g?void 0:g.includes("chatgroups"))?t({type:n.C.GROUP_NOT_JOINED,data:e.response||e.responseText,message:k.error_description,extraInfo:H}):t({type:n.C.CHATROOM_NOT_JOINED,data:e.response||e.responseText,message:k.error_description,extraInfo:H}):(null===(E=k.error_description)||void 0===E?void 0:E.includes("service not open!"))||(null===(y=k.error_description)||void 0===y?void 0:y.includes("message report not open"))||(null===(O=k.error_description)||void 0===O?void 0:O.includes("messageroaming function not open"))?t({type:n.C.SERVICE_NOT_ENABLED,data:e.response||e.responseText,message:k.error_description,extraInfo:H}):(null===(T=k.error_description)||void 0===T?void 0:T.includes("members size is greater than max user size !"))?t({type:n.C.GROUP_MEMBERS_LIMIT,data:e.response||e.responseText,message:k.error_description,extraInfo:H}):(null===(R=k.error_description)||void 0===R?void 0:R.includes("can not operate this group, reason: group is disabled"))?t({type:n.C.GROUP_IS_DISABLED,data:e.response||e.responseText,message:k.error_description,extraInfo:H}):(null===(I=k.error_description)||void 0===I?void 0:I.includes("Invitee's contact max count"))||(null===(S=k.error_description)||void 0===S?void 0:S.includes("Inviter's contact max count"))?t({type:n.C.MAX_LIMIT,data:e.response||e.responseText,message:k.error_description,extraInfo:H}):t({type:n.C.PERMISSION_DENIED,data:e.response||e.responseText,message:"permission denied",extraInfo:i(i({},H),{errDesc:"permission denied"})}),r({type:n.C.WEBIM_CONNCTION_AJAX_ERROR,data:e.responseText,message:e.responseText,extraInfo:H});else if(404===F){if(4040302===k.error_code)return void t({type:n.C.WEBIM_CONNCTION_APPKEY_NOT_ASSIGN_ERROR,message:null==k?void 0:k.error_description,extraInfo:H});40011===k.error_code?t({type:n.C.THREAD_NOT_EXIST,message:null==k?void 0:k.error_description,extraInfo:H}):40012===k.error_code?t({type:n.C.NO_PERMISSION,message:null==k?void 0:k.error_description,extraInfo:H}):60003===k.error_code||20004===k.error_code?t({type:n.C.GROUP_NOT_JOINED,message:null==k?void 0:k.error_description,extraInfo:H}):91001===k.error_code&&t({type:n.C.CONVERSATION_NOT_EXIST,message:null==k?void 0:k.error_description,extraInfo:H}),(null===(C=k.error_description)||void 0===C?void 0:C.includes("do not find this group"))||(null===(b=k.error_description)||void 0===b?void 0:b.includes("does not exist"))?(null===(N=e.responseURL)||void 0===N?void 0:N.includes("chatgroups"))?t({type:n.C.GROUP_NOT_EXIST,data:e.response||e.responseText,message:"The chat room dose not exist.",extraInfo:i(i({},H),{errDesc:"The chat room dose not exist."})}):t({type:n.C.CHATROOM_NOT_EXIST,data:e.response||e.responseText,message:"The chat room dose not exist.",extraInfo:i(i({},H),{errDesc:"The chat room dose not exist."})}):(null===(A=k.error_description)||void 0===A?void 0:A.includes("username"))&&(null===(M=k.error_description)||void 0===M?void 0:M.includes("doesn't exist!'"))||(null===(w=k.error_description)||void 0===w?void 0:w.includes("user not found"))||(null===(L=k.error_description)||void 0===L?void 0:L.includes("Service resource not found"))&&"UserNotFoundException"===(null==k?void 0:k.exception)?t({type:n.C.USER_NOT_FOUND,data:e.response||e.responseText,message:k.error_description,extraInfo:H}):(null===(U=k.error_description)||void 0===U?void 0:U.includes("user session pin message not exist"))?t({type:n.C.MESSAGE_NOT_FOUND,message:k.error_description,extraInfo:H}):t({type:n.C.WEBIM_CONNCTION_AJAX_ERROR,data:e.response||e.responseText,message:e.responseText,extraInfo:H}),r({type:n.C.WEBIM_CONNCTION_AJAX_ERROR,data:e.response||e.responseText,message:e.responseText,extraInfo:H})}else if(406===F)90004===k.error_code&&t({type:n.C.OPERATION_NOT_ALLOWED,message:null==k?void 0:k.error_description,extraInfo:H});else if(429===F||503===F){if(null===(x=k.error_description)||void 0===x?void 0:x.includes("The request has reached the maximum limit"))return void t({type:n.C.MAX_LIMIT,message:e.responseText,extraInfo:H});if(null===(D=k.error_description)||void 0===D?void 0:D.includes("upload client logs reached limit"))return void t({type:n.C.MAX_LIMIT,message:e.responseText});t({type:n.C.SERVER_BUSY,data:e.response||e.responseText,message:"Server is busy.",extraInfo:i(i({},H),{errDesc:"Server is busy."})}),r({type:n.C.WEBIM_CONNCTION_AJAX_ERROR,data:e.responseText,message:"Server is busy.",extraInfo:i(i({},H),{errDesc:"Server is busy."})})}else if(500===F){if(40006===k.error_code||40008===k.error_code||40010===k.error_code||5000701===k.error_code)return void t({type:n.C.SERVER_UNKNOWN_ERROR,message:null==k?void 0:k.error_description,extraInfo:H});if(90005===k.error_code||99999===k.error_code)return void t({type:n.C.REQUEST_UNKNOWN,message:null==k?void 0:k.error_description,extraInfo:H});if(null===(P=k.error_description)||void 0===P?void 0:P.includes("translte failed!"))return void t({type:n.C.TRANSLATION_FAILED,message:e.responseText,extraInfo:H});t({type:n.C.WEBIM_CONNCTION_AJAX_ERROR,data:e.responseText,message:"",extraInfo:H}),r({type:n.C.WEBIM_CONNCTION_AJAX_ERROR,data:e.responseText,message:"",extraInfo:H})}else if(502===F){if(5020801===k.error_code)return void t({type:n.C.SERVER_UNKNOWN_ERROR,message:null==k?void 0:k.error_description,extraInfo:H});t({type:n.C.WEBIM_CONNCTION_AJAX_ERROR,data:e.responseText,message:e.responseText,extraInfo:i(i({},H),{errDesc:"ajax error"})}),r({type:n.C.WEBIM_CONNCTION_AJAX_ERROR,data:e.responseText,message:e.responseText,extraInfo:i(i({},H),{errDesc:"ajax error"})})}else t({type:n.C.WEBIM_CONNCTION_AJAX_ERROR,data:e.responseText,message:e.responseText,extraInfo:i(i({},H),{errDesc:"ajax error"})}),r({type:n.C.WEBIM_CONNCTION_AJAX_ERROR,data:e.responseText,message:e.responseText,extraInfo:i(i({},H),{errDesc:"ajax error"})})}},1828:function(e,t,r){"use strict";var n=r(9504),i=r(9297),o=r(5397),s=r(9617).indexOf,a=r(421),u=n([].push);e.exports=function(e,t){var r,n=o(e),c=0,l=[];for(r in n)!i(a,r)&&i(n,r)&&u(l,r);for(;t.length>c;)i(n,r=t[c++])&&(~s(l,r)||u(l,r));return l}},1920:function(e,t,r){"use strict";var n=r(4644),i=r(9213).filter,o=r(9948),s=n.aTypedArray;(0,n.exportTypedArrayMethod)("filter",(function(e){var t=i(s(this),e,arguments.length>1?arguments[1]:void 0);return o(this,t)}))},1951:function(e,t,r){"use strict";var n=r(8227);t.f=n},1955:function(e,t,r){"use strict";var n,i,o,s,a,u=r(4576),c=r(3389),l=r(6080),d=r(9225).set,f=r(8265),h=r(9544),p=r(4265),v=r(7860),m=r(6193),_=u.MutationObserver||u.WebKitMutationObserver,g=u.document,E=u.process,y=u.Promise,O=c("queueMicrotask");if(!O){var T=new f,R=function(){var e,t;for(m&&(e=E.domain)&&e.exit();t=T.get();)try{t()}catch(e){throw T.head&&n(),e}e&&e.enter()};h||m||v||!_||!g?!p&&y&&y.resolve?((s=y.resolve(void 0)).constructor=y,a=l(s.then,s),n=function(){a(R)}):m?n=function(){E.nextTick(R)}:(d=l(d,u),n=function(){d(R)}):(i=!0,o=g.createTextNode(""),new _(R).observe(o,{characterData:!0}),n=function(){o.data=i=!i}),O=function(e){T.head||n(),T.add(e)}}e.exports=O},2003:function(e,t,r){"use strict";var n=r(6518),i=r(6395),o=r(916).CONSTRUCTOR,s=r(550),a=r(7751),u=r(4901),c=r(6840),l=s&&s.prototype;if(n({target:"Promise",proto:!0,forced:o,real:!0},{catch:function(e){return this.then(void 0,e)}}),!i&&u(s)){var d=a("Promise").prototype.catch;l.catch!==d&&c(l,"catch",d,{unsafe:!0})}},2008:function(e,t,r){"use strict";var n=r(6518),i=r(9213).filter;n({target:"Array",proto:!0,forced:!r(597)("filter")},{filter:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}})},2010:function(e,t,r){"use strict";var n=r(3724),i=r(350).EXISTS,o=r(9504),s=r(2106),a=Function.prototype,u=o(a.toString),c=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,l=o(c.exec);n&&!i&&s(a,"name",{configurable:!0,get:function(){try{return l(c,u(this))[1]}catch(e){return""}}})},2055:function(e,t,r){"use strict";r(1629),r(3792),r(739),r(2010),r(2892),r(5506),r(9432),r(6099),r(3500),r(2953);var n=r(4269),i=r(7968),o=r(8211),s=r(4865);function a(e){var t,r=[],n=[],i=e.data;i&&i.values&&i.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 u(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 c(e){var t,r,n,i;if(e.data){var s=e.data,a={id:s.id||"",name:s.name||"",parentId:s.muc_parent_id||"",messageId:s.msg_parent_id||"",timestamp:s.timestamp||0,operator:s.from||"",operation:""};switch(s.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=s.message_count,s.last_message&&"{}"!==JSON.stringify(s.last_message)?a.lastMessage=o.h.call(this,s.last_message):"{}"===JSON.stringify(s.last_message)&&(a.lastMessage={}),null===(r=this.eventHandler)||void 0===r||r.dispatch("onChatThreadChange",a);break;case"update":a.operation="update",a.messageCount=s.message_count,null===(n=this.eventHandler)||void 0===n||n.dispatch("onChatThreadChange",a);break;case"delete":a.operation="destroy",null===(i=this.eventHandler)||void 0===i||i.dispatch("onChatThreadChange",a)}}}function l(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 d(e){var t,r,n=e.data,a="";if(this.clientResource!==n.res||n.from!==this.user){switch(n.op){case"del":a="deleteConversation";break;case"top":a="pinnedConversation";break;case"not_top":a="unpinnedConversation";break;case"mark":a="markConversation";break;case"mark_delete":a="unMarkConversation";break;case"pin":a="pin";break;case"pin_delete":a="unpin";break;default:return void i.vF.error("unexpected conversation op:",n.op)}if("pin"!==a&&"unpin"!==a){var u={operation:a,conversationId:n.id,conversationType:"chat"===n.type?"singleChat":"groupChat",timestamp:n.ts};"markConversation"!==u.operation&&"unMarkConversation"!==u.operation||n.ext&&(u.conversationMark=s.s[n.ext]),null===(r=this.eventHandler)||void 0===r||r.dispatch("onMultiDeviceEvent",u)}else{var c=n.ext,l=n.from,d=n.id,f=n.type,h=n.ts,p={messageId:c||"",conversationId:"chat"===f?l:d,conversationType:o.p[f],operation:a,operatorId:l,time:h};null===(t=this.eventHandler)||void 0===t||t.dispatch("onMessagePinEvent",p)}}}function f(e){var t,r=this;null===(t=e.values)||void 0===t||t.forEach((function(e){var t,n,i,o,s;if(e.operator_resource!==r.clientResource)if("ignoreInterval"in e.data){var a={operation:"setSilentModeForUser",resource:e.operator_resource,data:e.data};null===(t=r.eventHandler)||void 0===t||t.dispatch("onMultiDeviceEvent",a)}else"group"in e?(a={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===(i=r.eventHandler)||void 0===i||i.dispatch("onMultiDeviceEvent",a)):(a={operation:0===Object.keys(null!==(o=e.data)&&void 0!==o?o:{}).length?"removeSilentModeForConversation":"setSilentModeForConversation",resource:e.operator_resource,conversationId:e.user,type:"singleChat",data:e.data},null===(s=r.eventHandler)||void 0===s||s.dispatch("onMultiDeviceEvent",a))}))}t.A=function(e){var t=n.Wp.parseNotify(e.payload);switch(t.type){case"presence":a.call(this,t);break;case"reaction":u.call(this,t);break;case"thread":c.call(this,t);break;case"roaming_delete":l.call(this,t);break;case"conv":d.call(this,t);break;case"user_notification_mute":f.call(this,t);break;default:i.vF.error("unexpected notify type: ".concat(t.type))}}},2062:function(e,t,r){"use strict";var n=r(6518),i=r(9213).map;n({target:"Array",proto:!0,forced:!r(597)("map")},{map:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}})},2087:function(e,t,r){"use strict";var n=r(34),i=Math.floor;e.exports=Number.isInteger||function(e){return!n(e)&&isFinite(e)&&i(e)===e}},2106:function(e,t,r){"use strict";var n=r(283),i=r(4913);e.exports=function(e,t,r){return r.get&&n(r.get,t,{getter:!0}),r.set&&n(r.set,t,{setter:!0}),i.f(e,t,r)}},2140:function(e,t,r){"use strict";var n={};n[r(8227)("toStringTag")]="z",e.exports="[object z]"===String(n)},2170:function(e,t,r){"use strict";var n=r(4644),i=r(9213).every,o=n.aTypedArray;(0,n.exportTypedArrayMethod)("every",(function(e){return i(o(this),e,arguments.length>1?arguments[1]:void 0)}))},2195:function(e,t,r){"use strict";var n=r(9504),i=n({}.toString),o=n("".slice);e.exports=function(e){return o(i(e),8,-1)}},2211:function(e,t,r){"use strict";var n=r(9039);e.exports=!n((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}))},2239:function(e,t,r){"use strict";e.exports=i;var n=r(3610);function i(e,t){this.lo=e>>>0,this.hi=t>>>0}var o=i.zero=new i(0,0);o.toNumber=function(){return 0},o.zzEncode=o.zzDecode=function(){return this},o.length=function(){return 1};var s=i.zeroHash="\0\0\0\0\0\0\0\0";i.fromNumber=function(e){if(0===e)return o;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 i(r,n)},i.from=function(e){if("number"==typeof e)return i.fromNumber(e);if(n.isString(e)){if(!n.Long)return i.fromNumber(parseInt(e,10));e=n.Long.fromString(e)}return e.low||e.high?new i(e.low>>>0,e.high>>>0):o},i.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},i.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 a=String.prototype.charCodeAt;i.fromHash=function(e){return e===s?o:new i((a.call(e,0)|a.call(e,1)<<8|a.call(e,2)<<16|a.call(e,3)<<24)>>>0,(a.call(e,4)|a.call(e,5)<<8|a.call(e,6)<<16|a.call(e,7)<<24)>>>0)},i.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)},i.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},i.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},i.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}},2259:function(e,t,r){"use strict";r(511)("iterator")},2293:function(e,t,r){"use strict";var n=r(8551),i=r(5548),o=r(4117),s=r(8227)("species");e.exports=function(e,t){var r,a=n(e).constructor;return void 0===a||o(r=n(a)[s])?t:i(r)}},2333:function(e,t,r){"use strict";var n=r(1291),i=r(655),o=r(7750),s=RangeError;e.exports=function(e){var t=i(o(this)),r="",a=n(e);if(a<0||a===1/0)throw new s("Wrong number of repetitions");for(;a>0;(a>>>=1)&&(t+=t))1&a&&(r+=t);return r}},2357:function(e,t,r){"use strict";var n=r(3724),i=r(9039),o=r(9504),s=r(2787),a=r(1072),u=r(5397),c=o(r(8773).f),l=o([].push),d=n&&i((function(){var e=Object.create(null);return e[2]=2,!c(e,2)})),f=function(e){return function(t){for(var r,i=u(t),o=a(i),f=d&&null===s(i),h=o.length,p=0,v=[];h>p;)r=o[p++],n&&!(f?r in i:c(i,r))||l(v,e?[r,i[r]]:i[r]);return v}};e.exports={entries:f(!0),values:f(!1)}},2360:function(e,t,r){"use strict";var n,i=r(8551),o=r(6801),s=r(8727),a=r(421),u=r(397),c=r(4055),l=r(6119),d="prototype",f="script",h=l("IE_PROTO"),p=function(){},v=function(e){return"<"+f+">"+e+"</"+f+">"},m=function(e){e.write(v("")),e.close();var t=e.parentWindow.Object;return e=null,t},_=function(){try{n=new ActiveXObject("htmlfile")}catch(e){}var e,t,r;_="undefined"!=typeof document?document.domain&&n?m(n):(t=c("iframe"),r="java"+f+":",t.style.display="none",u.appendChild(t),t.src=String(r),(e=t.contentWindow.document).open(),e.write(v("document.F=Object")),e.close(),e.F):m(n);for(var i=s.length;i--;)delete _[d][s[i]];return _()};a[h]=!0,e.exports=Object.create||function(e,t){var r;return null!==e?(p[d]=i(e),r=new p,p[d]=null,r[h]=e):r=_(),void 0===t?r:o.f(r,t)}},2405:function(e,t,r){"use strict";r(6468)("Set",(function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}}),r(6938))},2480:function(e,t,r){"use strict";r(5081)},2529:function(e){"use strict";e.exports=function(e,t){return{value:e,done:t}}},2549:function(e,t,r){"use strict";e.exports=r(9100)},2551:function(e,t,r){"use strict";e.exports=i;var n=r(3610);function i(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)this[t[r]]=e[t[r]]}i.create=function(e){return this.$type.create(e)},i.encode=function(e,t){return this.$type.encode(e,t)},i.encodeDelimited=function(e,t){return this.$type.encodeDelimited(e,t)},i.decode=function(e){return this.$type.decode(e)},i.decodeDelimited=function(e){return this.$type.decodeDelimited(e)},i.verify=function(e){return this.$type.verify(e)},i.fromObject=function(e){return this.$type.fromObject(e)},i.toObject=function(e,t){return this.$type.toObject(e,t)},i.prototype.toJSON=function(){return this.$type.toObject(this,n.toJSONOptions)}},2566:function(e,t){var r;r=function(e){e.version="1.2.2";var t=function(){for(var e=0,t=new Array(256),r=0;256!=r;++r)e=1&(e=1&(e=1&(e=1&(e=1&(e=1&(e=1&(e=1&(e=r)?-306674912^e>>>1:e>>>1)?-306674912^e>>>1:e>>>1)?-306674912^e>>>1:e>>>1)?-306674912^e>>>1:e>>>1)?-306674912^e>>>1:e>>>1)?-306674912^e>>>1:e>>>1)?-306674912^e>>>1:e>>>1)?-306674912^e>>>1:e>>>1,t[r]=e;return"undefined"!=typeof Int32Array?new Int32Array(t):t}(),r=function(e){var t=0,r=0,n=0,i="undefined"!=typeof Int32Array?new Int32Array(4096):new Array(4096);for(n=0;256!=n;++n)i[n]=e[n];for(n=0;256!=n;++n)for(r=e[n],t=256+n;t<4096;t+=256)r=i[t]=r>>>8^e[255&r];var o=[];for(n=1;16!=n;++n)o[n-1]="undefined"!=typeof Int32Array?i.subarray(256*n,256*n+256):i.slice(256*n,256*n+256);return o}(t),n=r[0],i=r[1],o=r[2],s=r[3],a=r[4],u=r[5],c=r[6],l=r[7],d=r[8],f=r[9],h=r[10],p=r[11],v=r[12],m=r[13],_=r[14];e.table=t,e.bstr=function(e,r){for(var n=-1^r,i=0,o=e.length;i<o;)n=n>>>8^t[255&(n^e.charCodeAt(i++))];return~n},e.buf=function(e,r){for(var g=-1^r,E=e.length-15,y=0;y<E;)g=_[e[y++]^255&g]^m[e[y++]^g>>8&255]^v[e[y++]^g>>16&255]^p[e[y++]^g>>>24]^h[e[y++]]^f[e[y++]]^d[e[y++]]^l[e[y++]]^c[e[y++]]^u[e[y++]]^a[e[y++]]^s[e[y++]]^o[e[y++]]^i[e[y++]]^n[e[y++]]^t[e[y++]];for(E+=15;y<E;)g=g>>>8^t[255&(g^e[y++])];return~g},e.str=function(e,r){for(var n=-1^r,i=0,o=e.length,s=0,a=0;i<o;)(s=e.charCodeAt(i++))<128?n=n>>>8^t[255&(n^s)]:s<2048?n=(n=n>>>8^t[255&(n^(192|s>>6&31))])>>>8^t[255&(n^(128|63&s))]:s>=55296&&s<57344?(s=64+(1023&s),a=1023&e.charCodeAt(i++),n=(n=(n=(n=n>>>8^t[255&(n^(240|s>>8&7))])>>>8^t[255&(n^(128|s>>2&63))])>>>8^t[255&(n^(128|a>>6&15|(3&s)<<4))])>>>8^t[255&(n^(128|63&a))]):n=(n=(n=n>>>8^t[255&(n^(224|s>>12&15))])>>>8^t[255&(n^(128|s>>6&63))])>>>8^t[255&(n^(128|63&s))];return~n}},"undefined"==typeof DO_NOT_EXPORT_CRC?r(t):r({})},2637:function(e,t,r){"use strict";r(6518)({target:"Number",stat:!0},{isInteger:r(2087)})},2652:function(e,t,r){"use strict";var n=r(6080),i=r(9565),o=r(8551),s=r(6823),a=r(4209),u=r(6198),c=r(1625),l=r(81),d=r(851),f=r(9539),h=TypeError,p=function(e,t){this.stopped=e,this.result=t},v=p.prototype;e.exports=function(e,t,r){var m,_,g,E,y,O,T,R=r&&r.that,I=!(!r||!r.AS_ENTRIES),S=!(!r||!r.IS_RECORD),C=!(!r||!r.IS_ITERATOR),b=!(!r||!r.INTERRUPTED),N=n(t,R),A=function(e){return m&&f(m,"normal",e),new p(!0,e)},M=function(e){return I?(o(e),b?N(e[0],e[1],A):N(e[0],e[1])):b?N(e,A):N(e)};if(S)m=e.iterator;else if(C)m=e;else{if(!(_=d(e)))throw new h(s(e)+" is not iterable");if(a(_)){for(g=0,E=u(e);E>g;g++)if((y=M(e[g]))&&c(v,y))return y;return new p(!1)}m=l(e,_)}for(O=S?e.next:m.next;!(T=i(O,m)).done;){try{y=M(T.value)}catch(e){f(m,"throw",e)}if("object"==typeof y&&y&&c(v,y))return y}return new p(!1)}},2675:function(e,t,r){"use strict";r(6761),r(1510),r(7812),r(3110),r(9773)},2703:function(e,t,r){"use strict";var n=r(4576),i=r(9039),o=r(9504),s=r(655),a=r(3802).trim,u=r(7452),c=n.parseInt,l=n.Symbol,d=l&&l.iterator,f=/^[+-]?0x/i,h=o(f.exec),p=8!==c(u+"08")||22!==c(u+"0x16")||d&&!i((function(){c(Object(d))}));e.exports=p?function(e,t){var r=a(s(e));return c(r,t>>>0||(h(f,r)?16:10))}:c},2712:function(e,t,r){"use strict";var n=r(6518),i=r(926).left,o=r(4598),s=r(9519);n({target:"Array",proto:!0,forced:!r(6193)&&s>79&&s<83||!o("reduce")},{reduce:function(e){var t=arguments.length;return i(this,e,t,t>1?arguments[1]:void 0)}})},2744:function(e,t,r){"use strict";var n=r(9039);e.exports=!n((function(){return Object.isExtensible(Object.preventExtensions({}))}))},2777:function(e,t,r){"use strict";var n=r(9565),i=r(34),o=r(757),s=r(5966),a=r(4270),u=r(8227),c=TypeError,l=u("toPrimitive");e.exports=function(e,t){if(!i(e)||o(e))return e;var r,u=s(e,l);if(u){if(void 0===t&&(t="default"),r=n(u,e,t),!i(r)||o(r))return r;throw new c("Can't convert object to primitive value")}return void 0===t&&(t="number"),a(e,t)}},2787:function(e,t,r){"use strict";var n=r(9297),i=r(4901),o=r(8981),s=r(6119),a=r(2211),u=s("IE_PROTO"),c=Object,l=c.prototype;e.exports=a?c.getPrototypeOf:function(e){var t=o(e);if(n(t,u))return t[u];var r=t.constructor;return i(r)&&t instanceof r?r.prototype:t instanceof c?l:null}},2796:function(e,t,r){"use strict";var n=r(9039),i=r(4901),o=/#|\.prototype\./,s=function(e,t){var r=u[a(e)];return r===l||r!==c&&(i(t)?n(t):!!t)},a=s.normalize=function(e){return String(e).replace(o,".").toLowerCase()},u=s.data={},c=s.NATIVE="N",l=s.POLYFILL="P";e.exports=s},2805:function(e,t,r){"use strict";var n=r(4576),i=r(9039),o=r(4428),s=r(4644).NATIVE_ARRAY_BUFFER_VIEWS,a=n.ArrayBuffer,u=n.Int8Array;e.exports=!s||!i((function(){u(1)}))||!i((function(){new u(-1)}))||!o((function(e){new u,new u(null),new u(1.5),new u(e)}),!0)||i((function(){return 1!==new u(new a(2),1,void 0).length}))},2812:function(e){"use strict";var t=TypeError;e.exports=function(e,r){if(e<r)throw new t("Not enough arguments");return e}},2839:function(e,t,r){"use strict";var n=r(4576).navigator,i=n&&n.userAgent;e.exports=i?String(i):""},2887:function(e,t,r){"use strict";var n=r(4576),i=r(9039),o=r(9504),s=r(4644),a=r(3792),u=r(8227)("iterator"),c=n.Uint8Array,l=o(a.values),d=o(a.keys),f=o(a.entries),h=s.aTypedArray,p=s.exportTypedArrayMethod,v=c&&c.prototype,m=!i((function(){v[u].call([1])})),_=!!v&&v.values&&v[u]===v.values&&"values"===v.values.name,g=function(){return l(h(this))};p("entries",(function(){return f(h(this))}),m),p("keys",(function(){return d(h(this))}),m),p("values",g,m||!_,{name:"values"}),p(u,g,m||!_,{name:"values"})},2892:function(e,t,r){"use strict";var n=r(6518),i=r(6395),o=r(3724),s=r(4576),a=r(9167),u=r(9504),c=r(2796),l=r(9297),d=r(3167),f=r(1625),h=r(757),p=r(2777),v=r(9039),m=r(8480).f,_=r(7347).f,g=r(4913).f,E=r(1240),y=r(3802).trim,O="Number",T=s[O],R=a[O],I=T.prototype,S=s.TypeError,C=u("".slice),b=u("".charCodeAt),N=c(O,!T(" 0o1")||!T("0b1")||T("+0x1")),A=function(e){var t,r=arguments.length<1?0:T(function(e){var t=p(e,"number");return"bigint"==typeof t?t:function(e){var t,r,n,i,o,s,a,u,c=p(e,"number");if(h(c))throw new S("Cannot convert a Symbol value to a number");if("string"==typeof c&&c.length>2)if(c=y(c),43===(t=b(c,0))||45===t){if(88===(r=b(c,2))||120===r)return NaN}else if(48===t){switch(b(c,1)){case 66:case 98:n=2,i=49;break;case 79:case 111:n=8,i=55;break;default:return+c}for(s=(o=C(c,2)).length,a=0;a<s;a++)if((u=b(o,a))<48||u>i)return NaN;return parseInt(o,n)}return+c}(t)}(e));return f(I,t=this)&&v((function(){E(t)}))?d(Object(r),this,A):r};A.prototype=I,N&&!i&&(I.constructor=A),n({global:!0,constructor:!0,wrap:!0,forced:N},{Number:A});var M=function(e,t){for(var r,n=o?m(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(","),i=0;n.length>i;i++)l(t,r=n[i])&&!l(e,r)&&g(e,r,_(t,r))};i&&R&&M(a[O],R),(N||i)&&M(a[O],T)},2953:function(e,t,r){"use strict";var n=r(4576),i=r(7400),o=r(9296),s=r(3792),a=r(6699),u=r(687),c=r(8227)("iterator"),l=s.values,d=function(e,t){if(e){if(e[c]!==l)try{a(e,c,l)}catch(t){e[c]=l}if(u(e,t,!0),i[t])for(var r in s)if(e[r]!==s[r])try{a(e,r,s[r])}catch(t){e[r]=s[r]}}};for(var f in i)d(n[f]&&n[f].prototype,f);d(o,"DOMTokenList")},2967:function(e,t,r){"use strict";var n=r(6706),i=r(34),o=r(7750),s=r(3506);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),s(n),i(r)?(t?e(r,n):r.__proto__=n,r):r}}():void 0)},3110:function(e,t,r){"use strict";var n=r(6518),i=r(7751),o=r(8745),s=r(9565),a=r(9504),u=r(9039),c=r(4901),l=r(757),d=r(7680),f=r(6933),h=r(4495),p=String,v=i("JSON","stringify"),m=a(/./.exec),_=a("".charAt),g=a("".charCodeAt),E=a("".replace),y=a(1..toString),O=/[\uD800-\uDFFF]/g,T=/^[\uD800-\uDBFF]$/,R=/^[\uDC00-\uDFFF]$/,I=!h||u((function(){var e=i("Symbol")("stringify detection");return"[null]"!==v([e])||"{}"!==v({a:e})||"{}"!==v(Object(e))})),S=u((function(){return'"\\udf06\\ud834"'!==v("\udf06\ud834")||'"\\udead"'!==v("\udead")})),C=function(e,t){var r=d(arguments),n=f(t);if(c(n)||void 0!==e&&!l(e))return r[1]=function(e,t){if(c(n)&&(t=s(n,this,p(e),t)),!l(t))return t},o(v,null,r)},b=function(e,t,r){var n=_(r,t-1),i=_(r,t+1);return m(T,e)&&!m(R,i)||m(R,e)&&!m(T,n)?"\\u"+y(g(e,0),16):e};v&&n({target:"JSON",stat:!0,arity:3,forced:I||S},{stringify:function(e,t,r){var n=d(arguments),i=o(I?C:v,null,n);return S&&"string"==typeof i?E(i,O,b):i}})},3138:function(e){"use strict";e.exports=function(e,t){try{1===arguments.length?console.error(e):console.error(e,t)}catch(e){}}},3158:function(e,t,r){"use strict";e.exports=o;var n=r(6237);(o.prototype=Object.create(n.prototype)).constructor=o;var i=r(3610);function o(e){n.call(this,e)}o._configure=function(){i.Buffer&&(o.prototype._slice=i.Buffer.prototype.slice)},o.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))},o._configure()},3164:function(e,t,r){"use strict";var n=r(7782),i=r(3602),o=Math.abs;e.exports=function(e,t,r,s){var a=+e,u=o(a),c=n(a);if(u<s)return c*i(u/s/t)*s*t;var l=(1+t/2220446049250313e-31)*u,d=l-(l-u);return d>r||d!=d?c*(1/0):c*d}},3167:function(e,t,r){"use strict";var n=r(4901),i=r(34),o=r(2967);e.exports=function(e,t,r){var s,a;return o&&n(s=t.constructor)&&s!==r&&i(a=s.prototype)&&a!==r.prototype&&o(e,a),e}},3179:function(e,t,r){"use strict";var n=r(2140),i=r(6955);e.exports=n?{}.toString:function(){return"[object "+i(this)+"]"}},3206:function(e,t,r){"use strict";var n=r(4644),i=r(9213).forEach,o=n.aTypedArray;(0,n.exportTypedArrayMethod)("forEach",(function(e){i(o(this),e,arguments.length>1?arguments[1]:void 0)}))},3240:function(e,t,r){"use strict";r(8706),r(4423),r(3288),r(9432);var n=r(8093),i=r(4269),o=r(3603),s=r(4331),a=r(8288);t.A=function(e){var t,r,u=this,c=(new Date).getTime(),l=e.apiUrl,d=e.orgName,f=e.appName,h=e.operateName,p=e.accessToken,v=e.conversationInfo,m=v.conversationType,_=v.conversationId,g=a.Z2[m],E=e.uploadUrl||"".concat(l,"/").concat(d,"/").concat(f,"/chatfiles?chat-type=").concat(g,"&chat-target=").concat(_);e.uploadUrl||(e._uploadMd5&&(E+="&md5=".concat(encodeURIComponent(e._uploadMd5))),e._uploadImageType&&(E+="&imagetype=".concat(e._uploadImageType),"number"==typeof e.width&&e.width>0&&(E+="&width=".concat(e.width)),"number"==typeof e.height&&e.height>0&&(E+="&height=".concat(e.height))));var y=function(t){var r=(new Date).getTime()-c;u.dataReport&&h&&[o.jz.UPLOAD_MSG_ATTACH,o.jz.UPLOAD_CHATROOM_FILE,o.jz.UPLOAD_GROUP_FILE].includes(h)&&u.dataReport.geOperateFun({operationName:h})({isEndApi:!0,data:{isSuccess:0,requestMethod:"POST",requestName:h,requestElapse:r,requestUrl:E,code:(null==T?void 0:T.status)||0,codeDesc:"upload file error"}}),e.onFileUploadError&&e.onFileUploadError(t)};function O(e){y({type:n.C.WEBIM_UPLOADFILE_ERROR,data:T})}var T=new XMLHttpRequest;T.upload&&(null===(r=(t=T.upload).addEventListener)||void 0===r||r.call(t,"progress",e.onFileUploadProgress||i.om,!1)),T.addEventListener("abort",e.onFileUploadCanceled||i.om,!1),T.addEventListener("error",O,!1),T.addEventListener("load",(function(t){try{var r=JSON.parse(T.responseText);if(400===T.status)return y({type:n.C.WEBIM_UPLOADFILE_ERROR,data:r}),!1;try{!function(t){var r=(new Date).getTime()-c;u.dataReport&&h&&[o.jz.UPLOAD_MSG_ATTACH,o.jz.UPLOAD_CHATROOM_FILE,o.jz.UPLOAD_GROUP_FILE].includes(h)&&u.dataReport.geOperateFun({operationName:h})({isEndApi:!0,data:{isSuccess:(null==t?void 0:t.error)?0:1,requestMethod:"POST",requestName:h,requestElapse:r,requestUrl:E,code:T.status,codeDesc:(null==t?void 0:t.error_description)||""}}),e.onFileUploadComplete&&e.onFileUploadComplete(t)}(r)}catch(t){y({type:n.C.WEBIM_CONNCTION_CALLBACK_INNER_ERROR,data:t})}}catch(t){y({type:n.C.WEBIM_UPLOADFILE_ERROR,data:T.responseText})}}),!1),T.addEventListener("timeout",O,!1),T.timeout=s.Gc,T.open("POST",E),T.setRequestHeader("restrict-access","true"),T.setRequestHeader("Accept","*/*"),T.setRequestHeader("Authorization","Bearer "+p);var R=new FormData;R.append("file",e.file.data),e.thumbnailWidth&&R.append("thumbnail-width",e.thumbnailWidth+""),e.thumbnailHeight&&R.append("thumbnail-height",e.thumbnailHeight+""),T.send(R)}},3251:function(e,t,r){"use strict";var n=r(6080),i=r(9565),o=r(5548),s=r(8981),a=r(6198),u=r(81),c=r(851),l=r(4209),d=r(1108),f=r(4644).aTypedArrayConstructor,h=r(5854);e.exports=function(e){var t,r,p,v,m,_,g,E,y=o(this),O=s(e),T=arguments.length,R=T>1?arguments[1]:void 0,I=void 0!==R,S=c(O);if(S&&!l(S))for(E=(g=u(O,S)).next,O=[];!(_=i(E,g)).done;)O.push(_.value);for(I&&T>2&&(R=n(R,arguments[2])),r=a(O),p=new(f(y))(r),v=d(p),t=0;r>t;t++)m=I?R(O[t],t):O[t],p[t]=v?h(m):+m;return p}},3262:function(e,t,r){"use strict";var n,i,o=e.exports=r(3610),s=r(4529);o.codegen=r(8561),o.fetch=r(5212),o.path=r(9207),o.fs=o.inquire("fs"),o.toArray=function(e){if(e){for(var t=Object.keys(e),r=new Array(t.length),n=0;n<t.length;)r[n]=e[t[n++]];return r}return[]},o.toObject=function(e){for(var t={},r=0;r<e.length;){var n=e[r++],i=e[r++];void 0!==i&&(t[n]=i)}return t};var a=/\\/g,u=/"/g;o.isReserved=function(e){return/^(?:do|if|in|for|let|new|try|var|case|else|enum|eval|false|null|this|true|void|with|break|catch|class|const|super|throw|while|yield|delete|export|import|public|return|static|switch|typeof|default|extends|finally|package|private|continue|debugger|function|arguments|interface|protected|implements|instanceof)$/.test(e)},o.safeProp=function(e){return!/^[$\w_]+$/.test(e)||o.isReserved(e)?'["'+e.replace(a,"\\\\").replace(u,'\\"')+'"]':"."+e},o.ucFirst=function(e){return e.charAt(0).toUpperCase()+e.substring(1)};var c=/_([a-z])/g;o.camelCase=function(e){return e.substring(0,1)+e.substring(1).replace(c,(function(e,t){return t.toUpperCase()}))},o.compareFieldsById=function(e,t){return e.id-t.id},o.decorateType=function(e,t){if(e.$type)return t&&e.$type.name!==t&&(o.decorateRoot.remove(e.$type),e.$type.name=t,o.decorateRoot.add(e.$type)),e.$type;n||(n=r(7882));var i=new n(t||e.name);return o.decorateRoot.add(i),i.ctor=e,Object.defineProperty(e,"$type",{value:i,enumerable:!1}),Object.defineProperty(e.prototype,"$type",{value:i,enumerable:!1}),i};var l=0;o.decorateEnum=function(e){if(e.$type)return e.$type;i||(i=r(5643));var t=new i("Enum"+l++,e);return o.decorateRoot.add(t),Object.defineProperty(e,"$type",{value:t,enumerable:!1}),t},o.setProperty=function(e,t,r){if("object"!=typeof e)throw TypeError("dst must be an object");if(!t)throw TypeError("path must be specified");return function e(t,r,n){var i=r.shift();if("__proto__"===i||"prototype"===i)return t;if(r.length>0)t[i]=e(t[i]||{},r,n);else{var o=t[i];o&&(n=[].concat(o).concat(n)),t[i]=n}return t}(e,t=t.split("."),r)},Object.defineProperty(o,"decorateRoot",{get:function(){return s.decorated||(s.decorated=new(r(5330)))}})},3288:function(e,t,r){"use strict";var n=r(9504),i=r(6840),o=Date.prototype,s="Invalid Date",a="toString",u=n(o[a]),c=n(o.getTime);String(new Date(NaN))!==s&&i(o,a,(function(){var e=c(this);return e==e?u(this):s}))},3296:function(e,t,r){"use strict";r(5806)},3312:function(e,t,r){"use strict";r.d(t,{S:function(){return i}}),r(9089);var n=r(4269),i=function(){function e(e){var t=e.type,r=e.id||n.Wp.getUniqueId();this.id=r,this.type=t}return e.prototype.set=function(e){this.body={id:this.id,chatType:e.chatType||"singleChat",type:"custom",to:e.to,customEvent:e.customEvent,customExts:e.customExts,from:e.from,roomType:e.roomType,success:e.success,fail:e.fail,ext:e.ext,time:Date.now()}},e.prototype.setChatType=function(e){return!!this.body&&(this.body.chatType=e,!0)},e.prototype.setGroup=function(e){return!!this.body&&(this.body.group=e,!0)},e.create=function(e){return{id:n.Wp.getUniqueId(),chatType:e.chatType||"singleChat",type:"custom",to:e.to,customEvent:e.customEvent,customExts:e.customExts,from:e.from||"",ext:e.ext,time:Date.now(),msgConfig:e.msgConfig,isChatThread:e.isChatThread,priority:e.priority,deliverOnlineOnly:e.deliverOnlineOnly,receiverList:e.receiverList,webhookEnv:e.webhookEnv}},e}()},3362:function(e,t,r){"use strict";r(436),r(6499),r(2003),r(7743),r(1481),r(280)},3389:function(e,t,r){"use strict";var n=r(4576),i=r(3724),o=Object.getOwnPropertyDescriptor;e.exports=function(e){if(!i)return n[e];var t=o(n,e);return t&&t.value}},3392:function(e,t,r){"use strict";var n=r(9504),i=0,o=Math.random(),s=n(1..toString);e.exports=function(e){return"Symbol("+(void 0===e?"":e)+")_"+s(++i+o,36)}},3418:function(e,t,r){"use strict";var n=r(6518),i=r(7916);n({target:"Array",stat:!0,forced:!r(4428)((function(e){Array.from(e)}))},{from:i})},3438:function(e,t,r){"use strict";var n=r(8551),i=r(34),o=r(6043);e.exports=function(e,t){if(n(e),i(t)&&t.constructor===e)return t;var r=o.f(e);return(0,r.resolve)(t),r.promise}},3449:function(e,t,r){"use strict";e.exports=d;var n,i=r(3610),o=i.LongBits,s=i.base64,a=i.utf8;function u(e,t,r){this.fn=e,this.len=t,this.next=void 0,this.val=r}function c(){}function l(e){this.head=e.head,this.tail=e.tail,this.len=e.len,this.next=e.states}function d(){this.len=0,this.head=new u(c,0,0),this.tail=this.head,this.states=null}var f=function(){return i.Buffer?function(){return(d.create=function(){return new n})()}:function(){return new d}};function h(e,t,r){t[r]=255&e}function p(e,t){this.len=e,this.next=void 0,this.val=t}function v(e,t,r){for(;e.hi;)t[r++]=127&e.lo|128,e.lo=(e.lo>>>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 m(e,t,r){t[r]=255&e,t[r+1]=e>>>8&255,t[r+2]=e>>>16&255,t[r+3]=e>>>24}d.create=f(),d.alloc=function(e){return new i.Array(e)},i.Array!==Array&&(d.alloc=i.pool(d.alloc,i.Array.prototype.subarray)),d.prototype._push=function(e,t,r){return this.tail=this.tail.next=new u(e,t,r),this.len+=t,this},p.prototype=Object.create(u.prototype),p.prototype.fn=function(e,t,r){for(;e>127;)t[r++]=127&e|128,e>>>=7;t[r]=e},d.prototype.uint32=function(e){return this.len+=(this.tail=this.tail.next=new p((e>>>=0)<128?1:e<16384?2:e<2097152?3:e<268435456?4:5,e)).len,this},d.prototype.int32=function(e){return e<0?this._push(v,10,o.fromNumber(e)):this.uint32(e)},d.prototype.sint32=function(e){return this.uint32((e<<1^e>>31)>>>0)},d.prototype.uint64=function(e){var t=o.from(e);return this._push(v,t.length(),t)},d.prototype.int64=d.prototype.uint64,d.prototype.sint64=function(e){var t=o.from(e).zzEncode();return this._push(v,t.length(),t)},d.prototype.bool=function(e){return this._push(h,1,e?1:0)},d.prototype.fixed32=function(e){return this._push(m,4,e>>>0)},d.prototype.sfixed32=d.prototype.fixed32,d.prototype.fixed64=function(e){var t=o.from(e);return this._push(m,4,t.lo)._push(m,4,t.hi)},d.prototype.sfixed64=d.prototype.fixed64,d.prototype.float=function(e){return this._push(i.float.writeFloatLE,4,e)},d.prototype.double=function(e){return this._push(i.float.writeDoubleLE,8,e)};var _=i.Array.prototype.set?function(e,t,r){t.set(e,r)}:function(e,t,r){for(var n=0;n<e.length;++n)t[r+n]=e[n]};d.prototype.bytes=function(e){var t=e.length>>>0;if(!t)return this._push(h,1,0);if(i.isString(e)){var r=d.alloc(t=s.length(e));s.decode(e,r,0),e=r}return this.uint32(t)._push(_,t,e)},d.prototype.string=function(e){var t=a.length(e);return t?this.uint32(t)._push(a.write,t,e):this._push(h,1,0)},d.prototype.fork=function(){return this.states=new l(this),this.head=this.tail=new u(c,0,0),this.len=0,this},d.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 u(c,0,0),this.len=0),this},d.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},d.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},d._configure=function(e){n=e,d.create=f(),n._configure()}},3451:function(e,t,r){"use strict";var n=r(6518),i=r(9504),o=r(421),s=r(34),a=r(9297),u=r(4913).f,c=r(8480),l=r(298),d=r(4124),f=r(3392),h=r(2744),p=!1,v=f("meta"),m=0,_=function(e){u(e,v,{value:{objectID:"O"+m++,weakData:{}}})},g=e.exports={enable:function(){g.enable=function(){},p=!0;var e=c.f,t=i([].splice),r={};r[v]=1,e(r).length&&(c.f=function(r){for(var n=e(r),i=0,o=n.length;i<o;i++)if(n[i]===v){t(n,i,1);break}return n},n({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:l.f}))},fastKey:function(e,t){if(!s(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!a(e,v)){if(!d(e))return"F";if(!t)return"E";_(e)}return e[v].objectID},getWeakData:function(e,t){if(!a(e,v)){if(!d(e))return!0;if(!t)return!1;_(e)}return e[v].weakData},onFreeze:function(e){return h&&p&&d(e)&&!a(e,v)&&_(e),e}};o[v]=!0},3484:function(e,t){"use strict";var r=function(){function e(e){this.type=e.type,this.message=e.message,this.data=e.data}return e.create=function(t){return new e(t)},e}();t.A=r},3500:function(e,t,r){"use strict";var n=r(4576),i=r(7400),o=r(9296),s=r(235),a=r(6699),u=function(e){if(e&&e.forEach!==s)try{a(e,"forEach",s)}catch(t){e.forEach=s}};for(var c in i)i[c]&&u(n[c]&&n[c].prototype);u(o)},3506:function(e,t,r){"use strict";var n=r(3925),i=String,o=TypeError;e.exports=function(e){if(n(e))return e;throw new o("Can't set "+i(e)+" as a prototype")}},3517:function(e,t,r){"use strict";var n=r(9504),i=r(9039),o=r(4901),s=r(6955),a=r(7751),u=r(3706),c=function(){},l=a("Reflect","construct"),d=/^\s*(?:class|function)\b/,f=n(d.exec),h=!d.test(c),p=function(e){if(!o(e))return!1;try{return l(c,[],e),!0}catch(e){return!1}},v=function(e){if(!o(e))return!1;switch(s(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return h||!!f(d,u(e))}catch(e){return!0}};v.sham=!0,e.exports=!l||i((function(){var e;return p(p.call)||!p(Object)||!p((function(){e=!0}))||e}))?v:p},3602:function(e){"use strict";var t=4503599627370496;e.exports=function(e){return e+t-t}},3603:function(e,t,r){"use strict";var n,i,o,s,a,u,c;r.d(t,{G8:function(){return a},He:function(){return c},S5:function(){return n},TT:function(){return o},Wz:function(){return u},jz:function(){return i},z1:function(){return s}}),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_FETCH_CONVERSATIONS=10]="REST_FETCH_CONVERSATIONS",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.REST_FETCH_CONVERSATIONS="REST_FETCH_CONVERSATIONS",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",e.REST_FETCHHISTORYMESSAGE="REST_FETCHHISTORYMESSAGE",e.REST_SEARCH_MESSAGES="REST_SEARCH_MESSAGES",e.MSYNC_SYNCOFFLINEMESSAGE="MSYNC_SYNCOFFLINEMESSAGE"}(i||(i={})),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"}(o||(o={})),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"}(s||(s={})),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"}(a||(a={})),function(e){e[e.web=0]="web",e[e.native=1]="native"}(u||(u={})),function(e){e[e.singleChat=0]="singleChat",e[e.groupChat=1]="groupChat",e[e.chatRoom=2]="chatRoom"}(c||(c={}))},3607:function(e,t,r){"use strict";var n=r(2839).match(/AppleWebKit\/(\d+)\./);e.exports=!!n&&+n[1]},3610:function(e,t,r){"use strict";var n=t;function i(e,t,r){for(var n=Object.keys(t),i=0;i<n.length;++i)void 0!==e[n[i]]&&r||(e[n[i]]=t[n[i]]);return e}function o(e){function t(e,r){if(!(this instanceof t))return new t(e,r);Object.defineProperty(this,"message",{get:function(){return e}}),Error.captureStackTrace?Error.captureStackTrace(this,t):Object.defineProperty(this,"stack",{value:(new Error).stack||""}),r&&i(this,r)}return(t.prototype=Object.create(Error.prototype)).constructor=t,Object.defineProperty(t.prototype,"name",{get:function(){return e}}),t.prototype.toString=function(){return this.name+": "+this.message},t}n.asPromise=r(8045),n.base64=r(8839),n.EventEmitter=r(4358),n.float=r(9410),n.inquire=r(4153),n.utf8=r(1447),n.pool=r(9390),n.LongBits=r(2239),n.isNode=Boolean(void 0!==r.g&&r.g&&r.g.process&&r.g.process.versions&&r.g.process.versions.node),n.global=n.isNode&&r.g||"undefined"!=typeof window&&window||"undefined"!=typeof self&&self||this,n.emptyArray=Object.freeze?Object.freeze([]):[],n.emptyObject=Object.freeze?Object.freeze({}):{},n.isInteger=Number.isInteger||function(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e},n.isString=function(e){return"string"==typeof e||e instanceof String},n.isObject=function(e){return e&&"object"==typeof e},n.isset=n.isSet=function(e,t){var r=e[t];return!(null==r||!e.hasOwnProperty(t))&&("object"!=typeof r||(Array.isArray(r)?r.length:Object.keys(r).length)>0)},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=i,n.lcFirst=function(e){return e.charAt(0).toLowerCase()+e.substring(1)},n.newError=o,n.ProtocolError=o("ProtocolError"),n.oneOfGetter=function(e){for(var t={},r=0;r<e.length;++r)t[e[r]]=1;return function(){for(var e=Object.keys(this),r=e.length-1;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<e.length;++r)e[r]!==t&&delete this[e[r]]}},n.toJSONOptions={longs:String,enums:String,bytes:String,json:!0},n._configure=function(){var e=n.Buffer;e?(n._Buffer_from=e.from!==Uint8Array.from&&e.from||function(t,r){return new e(t,r)},n._Buffer_allocUnsafe=e.allocUnsafe||function(t){return new e(t)}):n._Buffer_from=n._Buffer_allocUnsafe=null}},3635:function(e,t,r){"use strict";var n=r(9039),i=r(4576).RegExp;e.exports=n((function(){var e=i(".","s");return!(e.dotAll&&e.test("\n")&&"s"===e.flags)}))},3684:function(e,t,r){"use strict";var n=r(4644).exportTypedArrayMethod,i=r(9039),o=r(4576),s=r(9504),a=o.Uint8Array,u=a&&a.prototype||{},c=[].toString,l=s([].join);i((function(){c.call({})}))&&(c=function(){return l(this)});var d=u.toString!==c;n("toString",c,d)},3706:function(e,t,r){"use strict";var n=r(9504),i=r(4901),o=r(7629),s=n(Function.toString);i(o.inspectSource)||(o.inspectSource=function(e){return s(e)}),e.exports=o.inspectSource},3709:function(e,t,r){"use strict";var n=r(2839).match(/firefox\/(\d+)/i);e.exports=!!n&&+n[1]},3717:function(e,t){"use strict";t.f=Object.getOwnPropertySymbols},3724:function(e,t,r){"use strict";var n=r(9039);e.exports=!n((function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]}))},3763:function(e,t,r){"use strict";var n=r(2839);e.exports=/MSIE|Trident/.test(n)},3792:function(e,t,r){"use strict";var n=r(5397),i=r(6469),o=r(6269),s=r(1181),a=r(4913).f,u=r(1088),c=r(2529),l=r(6395),d=r(3724),f="Array Iterator",h=s.set,p=s.getterFor(f);e.exports=u(Array,"Array",(function(e,t){h(this,{type:f,target:n(e),index:0,kind:t})}),(function(){var e=p(this),t=e.target,r=e.index++;if(!t||r>=t.length)return e.target=null,c(void 0,!0);switch(e.kind){case"keys":return c(r,!1);case"values":return c(t[r],!1)}return c([r,t[r]],!1)}),"values");var v=o.Arguments=o.Array;if(i("keys"),i("values"),i("entries"),!l&&d&&"values"!==v.name)try{a(v,"name",{value:"values"})}catch(e){}},3802:function(e,t,r){"use strict";var n=r(9504),i=r(7750),o=r(655),s=r(7452),a=n("".replace),u=RegExp("^["+s+"]+"),c=RegExp("(^|[^"+s+"])["+s+"]+$"),l=function(e){return function(t){var r=o(i(t));return 1&e&&(r=a(r,u,"")),2&e&&(r=a(r,c,"$1")),r}};e.exports={start:l(1),end:l(2),trim:l(3)}},3850:function(e,t,r){"use strict";r.d(t,{P:function(){return d}}),r(2675),r(9463),r(2259),r(113),r(8980),r(3792),r(2062),r(4782),r(5086),r(6910),r(3288),r(6033),r(2892),r(9085),r(9432),r(6099),r(8781),r(1415),r(7764),r(2953);var n=r(8570),i=r.n(n),o=r(666),s=r(7968),a=r(8093);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 c,l=function(){return l=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},l.apply(this,arguments)};!function(e){e[e.STREAM_START=0]="STREAM_START",e[e.STREAM_START_COMPLETED=1]="STREAM_START_COMPLETED",e[e.STREAM_IN_PROGRESS=2]="STREAM_IN_PROGRESS",e[e.STREAM_COMPLETED=3]="STREAM_COMPLETED",e[e.STREAM_FULL=4]="STREAM_FULL"}(c||(c={}));var d=new(function(){function e(){this.cache=new Map,this.mergedContent=new Map,this.lastDispatchedSeq=new Map,this.hasCompleted=new Map,this.msgExt=new Map}return e.prototype.addChunk=function(e,t){this.cache.has(e)||(this.cache.set(e,[]),this.mergedContent.set(e,""),this.lastDispatchedSeq.set(e,-1),this.hasCompleted.set(e,!1)),t.streamInfo.status===o.J.COMPLETED&&this.hasCompleted.set(e,!0);var r=this.cache.get(e);-1===r.findIndex((function(e){return e.seq===t.seq}))?(r.push(t),r.sort((function(e,t){return e.seq-t.seq}))):s.vF.warn("Stream message chunk already exists",t.seq)},e.prototype.getMergedContent=function(e){return this.mergedContent.get(e)||""},e.prototype.appendToMergedContent=function(e,t){var r=this.mergedContent.get(e)||"";this.mergedContent.set(e,r+t)},e.prototype.getChunks=function(e){return this.cache.get(e)||[]},e.prototype.getSequentialChunks=function(e){var t=this.cache.get(e);if(!t||0===t.length)return[];for(var r=this.lastDispatchedSeq.get(e),n=[],i=0,o=t;i<o.length;i++){var s=o[i];if(0!==n.length){var a=n[n.length-1];if(s.seq!==a.seq+1)break;n.push(s)}else{if(void 0!==r&&-1!==r&&s.seq!==r+1)continue;n.push(s)}}return n},e.prototype.markDispatched=function(e,t){var r;t>(null!==(r=this.lastDispatchedSeq.get(e))&&void 0!==r?r:-1)&&this.lastDispatchedSeq.set(e,t)},e.prototype.getLastDispatchedSeq=function(e){var t;return null!==(t=this.lastDispatchedSeq.get(e))&&void 0!==t?t:-1},e.prototype.isCompleted=function(e){var t=this.cache.get(e);return!(!t||0===t.length)&&t[t.length-1].streamInfo.status===o.J.COMPLETED},e.prototype.hasMissingSeqs=function(e){var t=this.cache.get(e);if(!t||0===t.length)return!1;var r=t.find((function(e){return e.streamInfo.status===o.J.START||e.streamInfo.status===o.J.START_AND_COMPLETED}));if(!r)return!0;for(var n=r.seq,i=Math.max.apply(Math,t.map((function(e){return e.seq}))),s=new Set(t.map((function(e){return e.seq}))),a=n;a<=i;a++)if(!s.has(a))return!0;return!1},e.prototype.setMergedContent=function(e,t){this.mergedContent.set(e,t)},e.prototype.hasReceivedCompleted=function(e){return this.hasCompleted.get(e)||!1},e.prototype.hasReceivedFull=function(e){var t=this.cache.get(e);return!!t&&t.some((function(e){return e.streamInfo.status===c.STREAM_FULL}))},e.prototype.setMsgExt=function(e,t){this.msgExt.set(e,t)},e.prototype.getMsgExt=function(e){return this.msgExt.get(e)},e.prototype.clear=function(e){this.cache.delete(e),this.mergedContent.delete(e),this.lastDispatchedSeq.delete(e),this.hasCompleted.delete(e),this.msgExt.delete(e)},e.prototype.clearAll=function(){this.cache.clear(),this.mergedContent.clear(),this.lastDispatchedSeq.clear(),this.hasCompleted.clear(),this.msgExt.clear()},e}());function f(e,t,r,n,i,o,s,a,u,c,l,d,f,h,p,v,m){var _={id:e,chatType:t,type:"txt",to:r,msg:n,from:i,time:o,stream:s,onlineState:a};return function(e,t,r,n,i,o,s,a,u,c){t&&Object.keys(t).length>0&&(e.ext=t),r&&r.length>0&&(e.reactions=r),n&&n.length>0&&(e.translations=n),i&&i.operationCount>0&&(e.modifiedInfo=i),o&&(e.chatThread=o),s&&(e.chatThreadOverview=s),a&&(e.isContentReplaced=a),u&&(e.isRead=u),c&&(e.isDelivered=c)}(_,u,c,l,d,f,h,p,v,m),_}t.A=function(e,t,r,n,h,p,v,m,_,g,E,y,O,T,R,I,S,C,b){var N,A,M,w,L,U;try{var x=function(e,t){var r,n=null!==(r=e.streamError)&&void 0!==r?r:0;512===n?n=a.C.MESSAGE_STREAM_INTERVAL_TIMEOUT:513===n&&(n=a.C.MESSAGE_STREAM_TIMEOUT);var o={customType:e.streamType,seq:Number(e.streamSeq.toString()),status:e.streamStatus,errorType:n,text:t,finishReason:e.streamFinishReason};return void 0!==e.streamSeq&&(e.streamSeq&&"object"===u(e.streamSeq)?o.seq=Number(new(i())(e.streamSeq.low,e.streamSeq.high,e.streamSeq.unsigned).toString()):o.seq=Number(e.streamSeq)),o}(t.stream,e.text),D=x.seq,P=x.text,k=(x.finishReason,t.stream.streamStatus),F={msgId:n,seq:D,text:P,streamInfo:x,timestamp:Number(v)};if(d.addChunk(n,F),k===c.STREAM_FULL){var H=d.getChunks(n);if(0===H.length){var B=P,G=d.getMergedContent(n),W=B.slice(G.length),j=l(l({},x),{status:o.J.START_AND_COMPLETED,text:W}),q=f(n,m,p,B,h,Number(v),j,_,g,E,y,O,T,R,I,S,C);return!b&&(null===(A=null===(N=this.eventHandler)||void 0===N?void 0:N.dispatch)||void 0===A||A.call(N,"onStreamMessage",q)),d.setMergedContent(n,B),d.clear(n),q}var K=H[H.length-2];if(K&&K.streamInfo.status===o.J.START_AND_COMPLETED)return void s.vF.debug("Stream message FULL ignored (already dispatched)");var z=d.hasMissingSeqs(n),V=d.hasReceivedCompleted(n);if(z||!V){s.vF.debug("Stream message has missing (FULL)",{msgId:n,seq:D}),B=P,G=d.getMergedContent(n),W=B.slice(G.length),"seq"in(j=l(l({},x),{status:0===x.errorType?o.J.COMPLETED:o.J.ERROR,text:W}))&&delete j.seq;var J=H[0].timestamp;return q=f(n,m,p,B,h,Number(J)||Number(v),j,_,g,E,y,O,T,R,I,S,C),!b&&(null===(w=null===(M=this.eventHandler)||void 0===M?void 0:M.dispatch)||void 0===w||w.call(M,"onStreamMessage",q)),d.setMergedContent(n,B),s.vF.debug("Stream message dispatched (FULL with missing)",{msgId:n,seq:D,status:"STREAM_COMPLETED",incrementalLength:W.length,fullLength:B.length}),d.clear(n),q}return s.vF.debug("Stream message FULL ignored (no missing)",{msgId:n,seq:D}),void d.clear(n)}if(d.hasMissingSeqs(n))return void s.vF.debug("Stream message has missing",{msgId:n,seq:D});for(var Y=d.getSequentialChunks(n),X=0,Q=Y;X<Q.length;X++){var $=Q[X],Z=d.getMergedContent(n)+$.text,ee=(W=$.text,$.streamInfo.status);ee===c.STREAM_FULL&&(ee=o.J.COMPLETED),0!==$.streamInfo.errorType&&(ee=o.J.ERROR),"seq"in(j=l(l({},$.streamInfo),{status:ee,text:W}))&&delete j.seq,q=f(n,m,p,Z,h,(J=d.getChunks(n)[0].timestamp)||$.timestamp,j,_,g,E,y,O,T,R,I,S,C),!b&&(null===(U=null===(L=this.eventHandler)||void 0===L?void 0:L.dispatch)||void 0===U||U.call(L,"onStreamMessage",q)),d.markDispatched(n,$.seq),d.appendToMergedContent(n,$.text),s.vF.debug("Stream message dispatched",{msgId:n,seq:$.seq,status:ee,incrementalLength:W.length,mergedLength:Z.length})}var te=d.getMergedContent(n);s.vF.debug("Stream message processed",{msgId:n,seq:D,status:k,textLength:P.length,mergedLength:te.length,dispatchedChunks:Y.length})}catch(t){s.vF.error("Error handling stream message",t,{msgId:n,msgBody:e})}}},3887:function(e,t,r){var n,i,o;!function(s){"use strict";if(null!=t&&"number"!=typeof t.nodeType)e.exports=s();else if(null!=r.amdO)i=[],void 0===(o="function"==typeof(n=s)?n.apply(t,i):n)||(e.exports=o);else{var a=s(),u="undefined"!=typeof self?self:$.global;"function"!=typeof u.btoa&&(u.btoa=a.btoa),"function"!=typeof u.atob&&(u.atob=a.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,i,o=String(r),s=0,a=e,u="";o.charAt(0|s)||(a="=",s%1);u+=a.charAt(63&n>>8-s%1*8)){if((i=o.charCodeAt(s+=3/4))>255)throw new t("'btoa' failed: The string to be encoded contains characters outside of the Latin1 range.");n=n<<8|i}return u},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 i,o,s=0,a=0,u="";o=n.charAt(a++);~o&&(i=s%4?64*i+o:o,s++%4)?u+=String.fromCharCode(255&i>>(-2*s&6)):0)o=e.indexOf(o);return u}}}))},3925:function(e,t,r){"use strict";var n=r(34);e.exports=function(e){return n(e)||null===e}},3994:function(e,t,r){"use strict";var n=r(7657).IteratorPrototype,i=r(2360),o=r(6980),s=r(687),a=r(6269),u=function(){return this};e.exports=function(e,t,r,c){var l=t+" Iterator";return e.prototype=i(n,{next:o(+!c,r)}),s(e,l,!1,!0),a[l]=u,e}},4035:function(e,t,r){"use strict";r.d(t,{Z:function(){return i}});var n=r(4269),i=function(){function e(e){var t=e.id;this.id=t,this.type=e.type}return e.prototype.set=function(e){this.body={id:this.id,ackId:e.id,type:"read",to:e.to,from:e.from||"",chatType:e.chatType}},e.create=function(e){return{id:n.Wp.getUniqueId(),chatType:e.chatType,ackId:e.id,type:"read",to:e.to,from:e.from||"",ackContent:e.ackContent,isChatThread:e.isChatThread,priority:e.priority,deliverOnlineOnly:e.deliverOnlineOnly}},e}()},4055:function(e,t,r){"use strict";var n=r(4576),i=r(34),o=n.document,s=i(o)&&i(o.createElement);e.exports=function(e){return s?o.createElement(e):{}}},4117:function(e){"use strict";e.exports=function(e){return null==e}},4124:function(e,t,r){"use strict";var n=r(9039),i=r(34),o=r(2195),s=r(5652),a=Object.isExtensible,u=n((function(){a(1)}));e.exports=u||s?function(e){return!!i(e)&&(!s||"ArrayBuffer"!==o(e))&&(!a||a(e))}:a},4153:function(module){"use strict";function inquire(moduleName){try{var mod=eval("quire".replace(/^/,"re"))(moduleName);if(mod&&(mod.length||Object.keys(mod).length))return mod}catch(e){}return null}module.exports=inquire},4170:function(e,t,r){"use strict";var n=r(6518),i=r(566);n({target:"Function",proto:!0,forced:Function.bind!==i},{bind:i})},4209:function(e,t,r){"use strict";var n=r(8227),i=r(6269),o=n("iterator"),s=Array.prototype;e.exports=function(e){return void 0!==e&&(i.Array===e||s[o]===e)}},4213:function(e,t,r){"use strict";var n=r(3724),i=r(9504),o=r(9565),s=r(9039),a=r(1072),u=r(3717),c=r(8773),l=r(8981),d=r(7055),f=Object.assign,h=Object.defineProperty,p=i([].concat);e.exports=!f||s((function(){if(n&&1!==f({b:1},f(h({},"a",{enumerable:!0,get:function(){h(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},t={},r=Symbol("assign detection"),i="abcdefghijklmnopqrst";return e[r]=7,i.split("").forEach((function(e){t[e]=e})),7!==f({},e)[r]||a(f({},t)).join("")!==i}))?function(e,t){for(var r=l(e),i=arguments.length,s=1,f=u.f,h=c.f;i>s;)for(var v,m=d(arguments[s++]),_=f?p(a(m),f(m)):a(m),g=_.length,E=0;g>E;)v=_[E++],n&&!o(h,m,v)||(r[v]=m[v]);return r}:f},4215:function(e,t,r){"use strict";var n=r(4576),i=r(2839),o=r(2195),s=function(e){return i.slice(0,e.length)===e};e.exports=s("Bun/")?"BUN":s("Cloudflare-Workers")?"CLOUDFLARE":s("Deno/")?"DENO":s("Node.js/")?"NODE":n.Bun&&"string"==typeof Bun.version?"BUN":n.Deno&&"object"==typeof Deno.version?"DENO":"process"===o(n.process)?"NODE":n.window&&n.document?"BROWSER":"REST"},4265:function(e,t,r){"use strict";var n=r(2839);e.exports=/ipad|iphone|ipod/i.test(n)&&"undefined"!=typeof Pebble},4269:function(e,t,r){"use strict";r.d(t,{En:function(){return y},LP:function(){return _},QM:function(){return I},RD:function(){return p},RG:function(){return S},Wp:function(){return N},X0:function(){return O},i9:function(){return E},om:function(){return h}}),r(8706),r(4423),r(5276),r(3792),r(8921),r(4782),r(739),r(3288),r(2010),r(2892),r(9868),r(9085),r(9432),r(6099),r(3362),r(7495),r(8781),r(7764),r(2953),r(6031),r(3296),r(7208),r(8408);var n=r(8093),i=r(1798),o=r(3603),s=r(9061),a=r(7968),u=r(8288),c=r(1487),l=r(3240),d=r(4331),f=function(){return f=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},f.apply(this,arguments)},h=function(){};function p(e,t){var r,s=this;return T().platform===E.WEB?new Promise((function(t,o){var s=e.dataType||"text",u=e.success||h,c=e.error||h,l=new XMLHttpRequest;l.timeout=d._h;var f=!1;l.ontimeout=function(){a.vF.warn("request timeout"),f=!0;var e={type:n.C.REQUEST_TIMEOUT,message:"Request Timeout",errorType:"timeout_error",xhr:l};c(e),o(e)},l.onerror=function(){o({type:n.C.REQUEST_UNKNOWN,message:"Request Unknow Error",errorType:"onerror",xhr:l})},l.onabort=function(){o({type:n.C.REQUEST_ABORT,message:"Request Abort",errorType:"onabort",xhr:l})},l.onreadystatechange=function(){if(4===l.readyState){var e=(new Date).getTime()-r,d=l.status||0,h={elapse:e,httpCode:d};if(200===d){N.ajaxUnconventionalErrorTimes=0;try{switch(s){case"text":return u(l.responseText),void t(l.responseText);case"json":var p=JSON.parse(l.responseText);return p.extraInfo=h,u(p),void t(p);case"xml":return l.responseXML&&l.responseXML.documentElement?(u(l.responseXML.documentElement),void t(l.responseXML.documentElement)):(c({type:n.C.WEBIM_CONNCTION_AJAX_ERROR,data:l.responseText,message:"XHR.responseXML is null or XHR.responseXML.documentElement is null"}),void o({type:n.C.WEBIM_CONNCTION_AJAX_ERROR,data:l.responseText,message:"XHR.responseXML is null or XHR.responseXML.documentElement is null"}));default:c({type:n.C.WEBIM_CONNCTION_AJAX_ERROR,data:l.responseText,message:"Invalid dataType"}),o({type:n.C.WEBIM_CONNCTION_AJAX_ERROR,data:l.responseText,message:"Invalid dataType"})}return t(l.response||l.responseText),void u(l.response||l.responseText,l)}catch(e){o(e)}return}0===d?setTimeout((function(){a.vF.error("request timeout:",f),!f&&(0,i.A)(l,o,c,e)}),0):([400,401,403,404,429,500,503].includes(d)||(a.vF.warn("rest api request fail status:",d),N.ajaxUnconventionalErrorTimes++),(0,i.A)(l,o,c,e))}0===l.readyState&&(c({type:n.C.WEBIM_CONNCTION_AJAX_ERROR,data:l.responseText,message:"Request not initialized"}),o({type:n.C.WEBIM_CONNCTION_AJAX_ERROR,data:l.responseText,message:"Request not initialized"}))},e.responseType&&l.responseType&&(l.responseType=e.responseType),e.mimeType&&l.overrideMimeType(e.mimeType);var p=e.type||"POST",v=e.data||null,m="";if("get"===p.toLowerCase()&&v){for(var _ in v)v.hasOwnProperty(_)&&(m+=_+"="+v[_]+"&");m=m?m.slice(0,-1):m,e.url+=(e.url.indexOf("?")>0?"&":"?")+(m?m+"&":m)+"_v="+(new Date).getTime(),v=null,m=""}r=(new Date).getTime(),l.open(p,e.url);var g=e.headers||{};for(var E in g["Content-Type"]||(g["Content-Type"]="application/json"),g)g.hasOwnProperty(E)&&l.setRequestHeader(E,g[E]);l.send(v)})).then((function(r){var i,a;if(s.dataReport&&t&&t!==o.jz.SDK_INTERNAL){var u=s.dataReport.geOperateFun({operationName:t}),c=f({isSuccess:1,requestUrl:e.url,requestName:t,requestMethod:e.type},C(r.extraInfo));t===o.jz.REST_FETCH_CONVERSATIONS?c.resultCount=null===(i=r.data.channel_infos)||void 0===i?void 0:i.length:t===o.jz.REST_FETCHHISTORYMESSAGE&&(c.resultCount=null===(a=r.data.msgs)||void 0===a?void 0:a.length),u({isEndApi:!0,data:c})}return t===o.jz.SDK_INTERNAL&&(r.extraInfo.url=e.url),t!==o.jz.SDK_INTERNAL&&delete r.extraInfo,"Object"===v(r)?f(f({},r),{type:n.C.REQUEST_SUCCESS}):{data:r,type:n.C.REQUEST_SUCCESS}})).catch((function(n){var i,a;if(s.dataReport&&t&&t!==o.jz.SDK_INTERNAL&&s.dataReport.geOperateFun({operationName:t})({isEndApi:!0,data:f({isSuccess:0,requestUrl:e.url,requestName:t,requestMethod:e.type},C(n.extraInfo))}),t===o.jz.SDK_INTERNAL)if(n.extraInfo)n.extraInfo.url=e.url;else{var u={elapse:(new Date).getTime()-r,httpCode:null!==(a=null===(i=n.xhr)||void 0===i?void 0:i.status)&&void 0!==a?a:0,url:e.url};n.extraInfo=u}throw t!==o.jz.SDK_INTERNAL&&delete n.extraInfo,n})):m.call(this,e,t)}function v(e){return Object.prototype.toString.call(e).slice(8,-1)}function m(e,t){var r=this;return new Promise((function(r,i){var o=e.success||h,u=e.error||h,c=e.type||"POST",l=e.data||null,f="",p=(new Date).getTime(),v=N.getEnvInfo();if("get"===c.toLowerCase()&&l){for(var m in l)l.hasOwnProperty(m)&&(f+=m+"="+l[m]+"&");f=f?f.slice(0,-1):f,e.url+=(e.url.indexOf("?")>0?"&":"?")+(f?f+"&":f)+"_v="+(new Date).getTime(),l=null,f=""}var _={url:e.url,data:e.data,method:c,headers:{},timeout:d._h,success:function(e){var n,s,c,l,d,f={elapse:(new Date).getTime()-p,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===(c=null==e?void 0:e.data)||void 0===c?void 0:c.error_description)||""};if("200"===(null===(l=e.statusCode)||void 0===l?void 0:l.toString())||"200"===(null===(d=e.status)||void 0===d?void 0:d.toString())){e.data.extraInfo=f;var h=e.data;o(h),r(h)}else e.extraInfo=f,u(h=e),i(h),a.vF.warn(t,"reject reason: ",h)},complete:function(){},fail:function(e){var r={elapse:(new Date).getTime()-p,httpCode:s.XI,errDesc:"request:fail"};if(e.extraInfo=r,e.data={error:"request:fail",error_description:"request:fail"},"request:fail timeout"===e.errMsg)return i({type:n.C.REQUEST_TIMEOUT,message:"Request Timeout",extraInfo:r}),void u({type:n.C.REQUEST_TIMEOUT,message:"Request Timeout",extraInfo:r});u(e),i(e),a.vF.error(t,"fail reason:",e)}};if("zfb"===v.platform||"dd"===v.platform?_.headers=e.headers:_.header=e.headers,"dd"===v.platform)return dd.httpRequest(_);v.global.request(_)})).then((function(i){var s,a;if(r.dataReport&&t&&t!==o.jz.SDK_INTERNAL){var u=r.dataReport.geOperateFun({operationName:t}),c=f({isSuccess:1,requestUrl:e.url,requestName:t,requestMethod:e.type},C(i.extraInfo));t===o.jz.REST_FETCH_CONVERSATIONS?c.resultCount=null===(s=i.data.channel_infos)||void 0===s?void 0:s.length:t===o.jz.REST_FETCHHISTORYMESSAGE&&(c.resultCount=null===(a=i.data.msgs)||void 0===a?void 0:a.length),u({isEndApi:!0,data:c})}return t!==o.jz.SDK_INTERNAL&&delete i.extraInfo,"Object"===v(i)?f(f({},i),{type:n.C.REQUEST_SUCCESS}):{data:i,type:n.C.REQUEST_SUCCESS}})).catch((function(n){r.dataReport&&t&&t!==o.jz.SDK_INTERNAL&&r.dataReport.geOperateFun({operationName:t})({isEndApi:!0,data:f({isSuccess:0,requestUrl:e.url,requestName:t,requestMethod:e.type},C(n.extraInfo))}),t!==o.jz.SDK_INTERNAL&&delete n.extraInfo;var s=JSON.stringify(n.data||{}),a=f(f({},n),{status:n.statusCode||n.status||0,response:s,responseText:s});(0,i.A)(a,(function(e){throw f(f({},n),{message:e.message,type:e.type})}),h,0)}))}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()}function g(e,t){var r;return function(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];if(!e)return r;r=t?e.apply(t,n):e.apply(void 0,n),e=null}}var E,y=g((function(e,t){var r=T();if(r.platform!==E.WEB){var n=r.global,i=function(r){r.isConnected?e():t()};n.offNetworkStatusChange&&n.offNetworkStatusChange(i),n.onNetworkStatusChange&&n.onNetworkStatusChange(i)}else"undefined"!=typeof addEventListener&&(window.addEventListener("online",e),window.addEventListener("offline",t))})),O=g((function(e,t){var r,n,i=T();if(i.platform===E.WEB)"undefined"!=typeof document&&document.addEventListener("visibilitychange",(function(){document.hidden?null==t||t():null==e||e()}),!1);else{var o=i.global;o.onAppShow&&(null===(r=o.onAppShow)||void 0===r||r.call(o,e)),o.onAppHide&&(null===(n=o.onAppHide)||void 0===n||n.call(o,t))}}));function T(){return"undefined"!=typeof swan&&R(swan)?{platform:E.BAIDU,global:swan}:"undefined"!=typeof tt&&R(tt)?{platform:E.TT,global:tt}:"undefined"!=typeof dd&&R(dd)?{platform:E.DD,global:dd}:"undefined"!=typeof my&&R(my)?{platform:E.ZFB,global:my}:"undefined"!=typeof wx&&R(wx)||"undefined"!=typeof wx&&"function"==typeof wx.createCanvas?{platform:E.WX,global:wx}:"undefined"!=typeof qq&&R(qq)?{platform:E.QQ,global:qq}:"undefined"!=typeof uni&&R(uni)?{platform:E.UNI,global:uni}:"undefined"!=typeof window&&window.WebSocket?{platform:E.WEB,global:window}:{platform:E.NODE,global:r.g||{}}}function R(e){for(var t=["canIUse","getSystemInfo"],r=0,n=t.length;r<n;r++)if(!e[t[r]])return!1;return!0}function I(e,t){var r,i,o,s,a=this,d=e.accessToken,p=e.appKey,v=null===(i=null===(r=null==e?void 0:e.file)||void 0===r?void 0:r.data)||void 0===i?void 0:i.size,m=[],_="",g="";if(d)if(p&&(m=p.split("#"),_=m[0],g=m[1]),_||g){var y=e._filePath;if(y&&"string"==typeof y){var O=T(),R=null===(o=O.global)||void 0===o?void 0:o.uploadFile;if(O.platform!==E.WEB&&"function"==typeof R){var I=u.Z2[e.chatType]||"CHAT",S="".concat(e.apiUrl,"/").concat(_,"/").concat(g,"/chatfiles?chat-type=").concat(I,"&chat-target=").concat(e.to);return e._uploadMd5&&(S+="&md5=".concat(encodeURIComponent(e._uploadMd5))),e._uploadImageType&&(S+="&imagetype=".concat(e._uploadImageType),"number"==typeof e.width&&e.width>0&&(S+="&width=".concat(e.width)),"number"==typeof e.height&&e.height>0&&(S+="&height=".concat(e.height))),void R({url:S,filePath:y,name:"file",header:{"Content-Type":"multipart/form-data",Authorization:"Bearer "+d,"restrict-access":"true"},success:function(t){if(200===t.statusCode)try{var r="string"==typeof t.data?JSON.parse(t.data):t.data;e.onFileUploadComplete&&e.onFileUploadComplete(r)}catch(r){e.onFileUploadError&&e.onFileUploadError({type:n.C.WEBIM_UPLOADFILE_ERROR,data:f(f({},t),{rawData:t.data,error:r})})}else e.onFileUploadError&&e.onFileUploadError({type:n.C.WEBIM_UPLOADFILE_ERROR,data:t})},fail:function(t){e.onFileUploadError&&e.onFileUploadError({type:n.C.WEBIM_UPLOADFILE_ERROR,data:t})}})}e.onFileUploadError&&e.onFileUploadError({type:n.C.WEBIM_UPLOADFILE_ERROR,message:"Current platform does not support path-based upload"})}else if(v<=0)e.onFileUploadError&&e.onFileUploadError({type:n.C.WEBIM_UPLOADFILE_ERROR,message:"fileSize must be greater than 0"});else if(e.uploadUrl)l.A.call(this,f(f({},e),{orgName:_,appName:g,operateName:t,conversationInfo:{conversationId:e.to,conversationType:e.chatType}}));else{var C=u.aI.size||u.tz;this.uploadPartEnable&&v>1.5*C?new c.A(this,{file:null===(s=null==e?void 0:e.file)||void 0===s?void 0:s.data,onFileUploadProgress:e.onFileUploadProgress||h,onFileUploadComplete:e.onFileUploadComplete||h,onFileUploadError:e.onFileUploadError||h,onFileUploadCanceled:e.onFileUploadCanceled||h,conversationInfo:{conversationId:e.to,conversationType:e.chatType},onInitFail:function(){l.A.call(a,f(f({},e),{orgName:_,appName:g,operateName:t,conversationInfo:{conversationId:e.to,conversationType:e.chatType}}))},thumbnailInfo:{width:e.thumbnailWidth,height:e.thumbnailHeight},uploadMd5:e._uploadMd5,uploadImageType:e._uploadImageType,imageWidth:e.width,imageHeight:e.height}):l.A.call(this,f(f({},e),{orgName:_,appName:g,operateName:t,conversationInfo:{conversationId:e.to,conversationType:e.chatType}}))}}else e.onFileUploadError&&e.onFileUploadError({type:n.C.WEBIM_UPLOADFILE_ERROR,message:this._initWithAppId?"appId illegal":"AppKey illegal"});else e.onFileUploadError&&e.onFileUploadError({type:n.C.WEBIM_UPLOADFILE_NO_LOGIN,message:"AccessToken cannot be empty"})}function S(e,t){var r;e.onFileDownloadComplete=e.onFileDownloadComplete||h,e.onFileDownloadError=e.onFileDownloadError||h;var i=(new Date).getTime(),s=new XMLHttpRequest,u=this;s.addEventListener("load",(function(){var r,c=(new Date).getTime()-i;u.dataReport&&t&&t===o.jz.DOWN_GROUP_FILE&&u.dataReport.geOperateFun({operationName:t})({isEndApi:!0,data:{isSuccess:200===s.status?1:0,requestMethod:e.method||"GET",requestName:t,requestElapse:c,requestUrl:null==e?void 0:e.url,code:s.status,codeDesc:200===s.status?"":"download file error"}}),200===s.status?e.onFileDownloadComplete&&e.onFileDownloadComplete(s.response):403===s.status||404===s.status?((r=new FileReader).addEventListener("loadend",(function(t){var r;try{var i=JSON.parse(null===(r=t.target)||void 0===r?void 0:r.result);a.vF.error("download file failed","status:".concat(s.status),i),403===s.status?"chatfile no permission"===i.error_description?e.onFileDownloadError&&e.onFileDownloadError({type:n.C.WEBIM_DOWNLOADFILE_ERROR_NO_PERMISSION,id:e.id,xhr:s}):e.onFileDownloadError&&e.onFileDownloadError({type:n.C.PERMISSION_DENIED,id:e.id,xhr:s}):404===s.status&&("file_expired"===i.error?e.onFileDownloadError&&e.onFileDownloadError({type:n.C.WEBIM_DOWNLOADFILE_ERROR_EXPIRED,id:e.id,xhr:s}):e.onFileDownloadError&&e.onFileDownloadError({type:n.C.WEBIM_DOWNLOADFILE_ERROR,id:e.id,xhr:s}))}catch(t){a.vF.error("Error parsing download error response:",t),e.onFileDownloadError&&e.onFileDownloadError({type:n.C.WEBIM_DOWNLOADFILE_ERROR,id:e.id,xhr:s})}})),r.readAsText(s.response)):500===s.status?(a.vF.error("download file failed","status:".concat(s.status),"type:".concat(n.C.SERVER_UNKNOWN_ERROR)),e.onFileDownloadError&&e.onFileDownloadError({type:n.C.SERVER_UNKNOWN_ERROR,id:e.id,xhr:s})):(a.vF.error("download file failed","status:".concat(s.status),"type:".concat(n.C.WEBIM_DOWNLOADFILE_ERROR)),e.onFileDownloadError&&e.onFileDownloadError({type:n.C.WEBIM_DOWNLOADFILE_ERROR,id:e.id,xhr:s}))}),!1),s.addEventListener("error",(function(r){var a=(new Date).getTime()-i;u.dataReport&&t&&t===o.jz.DOWN_GROUP_FILE&&u.dataReport.geOperateFun({operationName:t})({isEndApi:!0,data:{isSuccess:0,requestMethod:e.method||"GET",requestName:t,requestElapse:a,requestUrl:null==e?void 0:e.url,code:(null==s?void 0:s.status)||0,codeDesc:"download file error"}}),e.onFileDownloadError&&e.onFileDownloadError({type:n.C.WEBIM_DOWNLOADFILE_ERROR,id:e.id,xhr:s})}),!1);var c=e.method||"GET",l=e.responseType||"blob",d=e.mimeType||"text/plain; charset=x-user-defined";s.open(c,e.url),"undefined"!=typeof Blob?s.responseType=l:s.overrideMimeType(d);var f={"X-Requested-With":"XMLHttpRequest","share-secret":e.secret,Authorization:"Bearer "+(null===(r=null==this?void 0:this.context)||void 0===r?void 0:r.accessToken)},p=e.headers||{};for(var v in p)f[v]=p[v];for(var v in f)f[v]&&s.setRequestHeader(v,f[v]);s.send(null)}function C(e){void 0===e&&(e={});var t=e.elapse,r=void 0===t?0:t,n=e.httpCode,i=void 0===n?0:n,o=e.errDesc;return{requestElapse:r,code:i,codeDesc:void 0===o?"":o}}!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"}(E||(E={}));var b="localDeviceInfo",N={autoIncrement:0,ajaxUnconventionalErrorTimes:0,isUseHttps:function(e){var t;return"boolean"==typeof e?e:!("undefined"!=typeof window)||"https:"===(null===(t=window.location)||void 0===t?void 0:t.protocol)},getRetryDelay:function(e){return e<=5?Number((Math.random()+1).toFixed(2)):e>5&&e<20?Math.floor(4*Math.random())+3:Math.floor(6*Math.random())+5},ajax:p,getUniqueId:_,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 i=n.item(0);t.data=i,t.url=window.URL.createObjectURL(i),t.filename=(null==i?void 0:i.name)||""}}else{if("string"!=typeof e)throw Error("in IE fileInputId must be string");i=document.getElementById(e).value,t.url=i;var o=i.lastIndexOf("/"),s=i.lastIndexOf("\\"),a=Math.max(o,s);t.filename=a<0?i:i.substring(a+1)}var u=t.filename.lastIndexOf(".");return-1!==u&&(t.filetype=t.filename.substring(u+1).toLowerCase()),t},uploadFile:I,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;n<arguments.length;n++)r[n]=arguments[n];for(var i=0,o=t?e[i].apply(this,r):r[0];++i<t;)o=e[i].call(this,o);return o}},listenNetwork:y,listenBrowserVisibility:O,getEnvInfo:T,wxRequest:m,parseDownloadResponse:function(e){if(!window||!window.URL)throw Error("parseDownloadResponse can be used in broswer only");return e&&e.type&&"application/json"===e.type||0>Object.prototype.toString.call(e).indexOf("Blob")?this.url+"?token=":window.URL.createObjectURL(e)},download:S,parseNotify:function(e){for(var t="",r=0;r<e.length;r++)t+="%"+e[r].toString(16);return JSON.parse(decodeURIComponent(t))},getExtraData:C,retryPromise:function(e,t,r){return new Promise((function(n,i){var o=function(t){e().then(n).catch((function(e){t>0?setTimeout((function(){o(t-1)}),r||1e3):i(e)}))};o(t||3)}))},formatAttachUrl:function(e){return e&&"string"==typeof e?"".concat(this.apiUrl).concat(e.slice(e.indexOf("/",9))):""},Uint8ArrayToString:function(e){for(var t="",r=0;r<e.length;r++)t+=String.fromCharCode(e[r]);return t},getLocalDeviceInfo:function(){return function(e){var t,r=N.getEnvInfo(),n=r.platform,i="";n!==E.NODE&&n!==E.QUICK_APP||(i="");try{n===E.WEB?window.localStorage?i=localStorage.getItem(e)||"":a.vF.error("localStorage is not supported"):n===E.WX||n===E.QQ||n===E.TT||n===E.BAIDU||n===E.UNI?i=r.global.getStorageSync(e)||"":n!==E.ZFB&&n!==E.DD||(i=(null===(t=r.global.getStorageSync({key:e}))||void 0===t?void 0:t.data)||"")}catch(t){a.vF.info("get local ".concat(e," failed: "),t)}return a.vF.info("".concat(e," "),i),i}(b)},setLocalDeviceInfo:function(e){!function(e,t){var r=N.getEnvInfo(),n=r.platform;if(n!==E.NODE&&n!==E.QUICK_APP)if(n===E.WEB)try{window.localStorage?localStorage.setItem(e,t):a.vF.error("localStorage is not supported")}catch(t){a.vF.error("set local ".concat(e," failed: "),t)}else r.global.setStorage({key:e,data:t,success:function(t){a.vF.debug("set local ".concat(e," success: "),t)},fail:function(t){a.vF.error("set local ".concat(e," failed: "),t)}})}(b,e)},detectBrowser:function(){if("undefined"==typeof navigator)return"unknown";var e=navigator.userAgent;return/MicroMessenger/i.test(e)?"WeChat":/QQBrowser/i.test(e)?"QQ":!/Chrome/i.test(e)||/Edg/i.test(e)||/OPR/i.test(e)?!/Safari/i.test(e)||/Chrome/i.test(e)||/CriOS/i.test(e)?/Firefox/i.test(e)?"Firefox":/MSIE/i.test(e)||/Trident/i.test(e)?"IE":/Edg/i.test(e)?"Edge":"unknown":"Safari":"Chrome"},getDevicePlatform:function(e){return e.platform===E.WX&&"undefined"!=typeof uni&&R(uni)?E.UNI:e.platform},delay:function(e){return new Promise((function(t){return setTimeout(t,e)}))}}},4270:function(e,t,r){"use strict";var n=r(9565),i=r(4901),o=r(34),s=TypeError;e.exports=function(e,t){var r,a;if("string"===t&&i(r=e.toString)&&!o(a=n(r,e)))return a;if(i(r=e.valueOf)&&!o(a=n(r,e)))return a;if("string"!==t&&i(r=e.toString)&&!o(a=n(r,e)))return a;throw new s("Can't convert object to primitive value")}},4331:function(e,t,r){"use strict";r.d(t,{Ec:function(){return p},Ez:function(){return i},Gc:function(){return s},HJ:function(){return d},Qb:function(){return u},Rk:function(){return l},WR:function(){return f},_h:function(){return o},oi:function(){return c},rO:function(){return h},x0:function(){return a}});var n=r(8093),i=15e3,o=15e3,s=3e5,a=1e4,u=1e4,c=8e3,l=3e5,d=3e4,f=5,h=3,p=[n.C.MAX_LIMIT,n.C.WEBIM_TOKEN_EXPIRED,n.C.WEBIM_CONNCTION_TOKEN_NOT_ASSIGN_ERROR,n.C.USER_NOT_FOUND,n.C.WEBIM_CONNCTION_AUTH_ERROR,n.C.REQUEST_PARAMETER_ERROR,n.C.WEBIM_CONNCTION_AUTH_ERROR,n.C.WEBIM_SERVER_SERVING_DISABLED,n.C.USER_LOGIN_TOO_MANY_DEVICES,n.C.USER_DEVICE_CHANGED]},4346:function(e,t,r){"use strict";r(6518)({target:"Array",stat:!0},{isArray:r(4376)})},4358:function(e){"use strict";function t(){this._listeners={}}e.exports=t,t.prototype.on=function(e,t,r){return(this._listeners[e]||(this._listeners[e]=[])).push({fn:t,ctx:r||this}),this},t.prototype.off=function(e,t){if(void 0===e)this._listeners={};else if(void 0===t)this._listeners[e]=[];else for(var r=this._listeners[e],n=0;n<r.length;)r[n].fn===t?r.splice(n,1):++n;return this},t.prototype.emit=function(e){var t=this._listeners[e];if(t){for(var r=[],n=1;n<arguments.length;)r.push(arguments[n++]);for(n=0;n<t.length;)t[n].fn.apply(t[n++].ctx,r)}return this}},4359:function(e,t,r){"use strict";var n=r(6518),i=r(6346);n({global:!0,constructor:!0,forced:!r(7811)},{DataView:i.DataView})},4373:function(e,t,r){"use strict";var n=r(8981),i=r(5610),o=r(6198);e.exports=function(e){for(var t=n(this),r=o(t),s=arguments.length,a=i(s>1?arguments[1]:void 0,r),u=s>2?arguments[2]:void 0,c=void 0===u?r:i(u,r);c>a;)t[a++]=e;return t}},4376:function(e,t,r){"use strict";var n=r(2195);e.exports=Array.isArray||function(e){return"Array"===n(e)}},4394:function(e,t,r){"use strict";var n=t;function i(){n.util._configure(),n.Writer._configure(n.BufferWriter),n.Reader._configure(n.BufferReader)}n.build="minimal",n.Writer=r(3449),n.BufferWriter=r(818),n.Reader=r(6237),n.BufferReader=r(3158),n.util=r(3610),n.rpc=r(5047),n.roots=r(4529),n.configure=i,i()},4423:function(e,t,r){"use strict";var n=r(6518),i=r(9617).includes,o=r(9039),s=r(6469);n({target:"Array",proto:!0,forced:o((function(){return!Array(1).includes()}))},{includes:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}}),s("includes")},4428:function(e,t,r){"use strict";var n=r(8227)("iterator"),i=!1;try{var o=0,s={next:function(){return{done:!!o++}},return:function(){i=!0}};s[n]=function(){return this},Array.from(s,(function(){throw 2}))}catch(e){}e.exports=function(e,t){try{if(!t&&!i)return!1}catch(e){return!1}var r=!1;try{var o={};o[n]=function(){return{next:function(){return{done:r=!0}}}},e(o)}catch(e){}return r}},4467:function(e,t,r){"use strict";r.d(t,{Dz:function(){return f},dc:function(){return n},eB:function(){return i},kO:function(){return d}}),r(8706),r(3792),r(4743),r(1745),r(8309),r(6099),r(1489),r(1630),r(2170),r(5044),r(1920),r(1694),r(9955),r(3206),r(4496),r(6651),r(2887),r(9369),r(6812),r(8995),r(1575),r(6072),r(8747),r(8845),r(9423),r(7301),r(373),r(6614),r(1405),r(3684);var n,i,o=r(9638),s=r.n(o),a=r(6602);!function(e){e[e.COMPRESS_NONE=0]="COMPRESS_NONE",e[e.COMPRESS_ZLIB=1]="COMPRESS_ZLIB",e[e.COMPRESS_LZ4=2]="COMPRESS_LZ4"}(n||(n={})),function(e){e[e.NONE=-1]="NONE",e[e.UPLINK_ONLY=0]="UPLINK_ONLY",e[e.DOWNLINK_ONLY=1]="DOWNLINK_ONLY",e[e.BIDIRECTIONAL=2]="BIDIRECTIONAL"}(i||(i={}));var u=268435455,c=function(){function e(){this.mode=i.NONE,this.enableUplinkCompression=!1,this.enableDownlinkCompression=!1;var e={minWorkArea:s().DEFAULT_WORK_AREA,maxWorkArea:s().DEFAULT_MAX_WORK,shrinkMode:s().SHRINK_MODE.MANUAL};this.encoder=new(s().RingBufferEncoder)(e),this.decoder=new(s().RingBufferDecoder)(e)}return e.prototype.compress=function(e){var t=e instanceof ArrayBuffer?new Uint8Array(e):e;if(!t||0===t.length)return new Uint8Array(0);if(t.length>u)throw new Error("Data size exceeds maximum allowed: ".concat(t.length));var r=s().compressBound(t.length),n=new Uint8Array(r),i=this.encoder.compress(t,n);if(i<0)throw new Error("LZ4 compression failed with error code: ".concat(i));var o=n.subarray(0,i),c=(0,a.Rp)(t.length),l=(0,a.QR)(t),d=new Uint8Array(c.length+4+i),f=0;return d.set(c,f),f+=c.length,new DataView(d.buffer).setUint32(f,l,!1),f+=4,d.set(o,f),d},e.prototype.decompress=function(e){var t=e instanceof ArrayBuffer?new Uint8Array(e):e;if(!t||0===t.length)return new Uint8Array(0);if(t.length<5)throw new Error("Compressed data is too short: must contain at least length and CRC32");var r={offset:0},n=(0,a.b6)(t,r);if(n>u)throw new Error("Original size exceeds maximum allowed: ".concat(n));if(t.length<r.offset+4)throw new Error("Compressed data is too short: missing CRC32 checksum");var i=new DataView(t.buffer,t.byteOffset+r.offset,4).getUint32(0,!1);r.offset+=4;var o=t.subarray(r.offset),s=new Uint8Array(n),c=this.decoder.decompress(o,s,n);if(c<0||c!==n)throw new Error("LZ4 decompression failed: expected ".concat(n,", got ").concat(c));var l=(0,a.QR)(s);if(l!==i)throw new Error("CRC32 checksum mismatch: expected ".concat(i,", got ").concat(l));return s},e.prototype.resetEncoder=function(){this.encoder.reset()},e.prototype.resetDecoder=function(){this.decoder.reset()},e.prototype.reset=function(){this.resetEncoder(),this.resetDecoder()},e.prototype.shrinkEncoder=function(){this.encoder.shrink()},e.prototype.shrinkDecoder=function(){this.decoder.shrink()},e.prototype.shrink=function(){this.shrinkEncoder(),this.shrinkDecoder()},e}();function l(e){switch(e){case i.UPLINK_ONLY:return{mode:i.UPLINK_ONLY,enableUplinkCompression:!0,enableDownlinkCompression:!1};case i.DOWNLINK_ONLY:return{mode:i.DOWNLINK_ONLY,enableUplinkCompression:!1,enableDownlinkCompression:!0};case i.BIDIRECTIONAL:return{mode:i.BIDIRECTIONAL,enableUplinkCompression:!0,enableDownlinkCompression:!0};case i.NONE:default:return{mode:i.NONE,enableUplinkCompression:!1,enableDownlinkCompression:!1}}}function d(e){var t=l(e),r=t.mode,n=t.enableUplinkCompression,o=t.enableDownlinkCompression;if(r===i.NONE)return null;var s=new c;return s.mode=r,s.enableUplinkCompression=n,s.enableDownlinkCompression=o,s}function f(e,t){var r=l(t),n=r.mode,i=r.enableUplinkCompression,o=r.enableDownlinkCompression;e.reset(),e.mode=n,e.enableUplinkCompression=i,e.enableDownlinkCompression=o}},4478:function(e,t,r){"use strict";r.d(t,{I:function(){return i}}),r(9089);var n=r(4269),i=function(){function e(e){var t=e.type,r=e.id||n.Wp.getUniqueId();this.id=r,this.type=t,this.value=""}return e.create=function(e){return{type:"combine",id:n.Wp.getUniqueId(),to:e.to,from:e.from||"",chatType:e.chatType,ext:e.ext,time:Date.now(),msgConfig:e.msgConfig,isChatThread:e.isChatThread,priority:e.priority,deliverOnlineOnly:e.deliverOnlineOnly,receiverList:e.receiverList,webhookEnv:e.webhookEnv,compatibleText:e.compatibleText,title:e.title,summary:e.summary,messageList:e.messageList,onFileUploadError:e.onFileUploadError,onFileUploadComplete:e.onFileUploadComplete}},e}()},4488:function(e,t,r){"use strict";var n=r(7680),i=Math.floor,o=function(e,t){var r=e.length;if(r<8)for(var s,a,u=1;u<r;){for(a=u,s=e[u];a&&t(e[a-1],s)>0;)e[a]=e[--a];a!==u++&&(e[a]=s)}else for(var c=i(r/2),l=o(n(e,0,c),t),d=o(n(e,c),t),f=l.length,h=d.length,p=0,v=0;p<f||v<h;)e[p+v]=p<f&&v<h?t(l[p],d[v])<=0?l[p++]:d[v++]:p<f?l[p++]:d[v++];return e};e.exports=o},4494:function(e,t,r){"use strict";function n(){console.log&&(console.log.apply?console.log.apply(console,Array.prototype.slice.call(arguments)):Function.prototype.apply.apply(console.log,[console,arguments])),console.trace&&console.trace()}r.d(t,{l:function(){return i},n:function(){return n}}),r(4782),r(7495);var i="undefined"!=typeof window&&void 0!==window.navigator&&/Trident\/|MSIE /.test(window.navigator.userAgent)},4495:function(e,t,r){"use strict";var n=r(9519),i=r(9039),o=r(4576).String;e.exports=!!Object.getOwnPropertySymbols&&!i((function(){var e=Symbol("symbol detection");return!o(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&n&&n<41}))},4496:function(e,t,r){"use strict";var n=r(4644),i=r(9617).includes,o=n.aTypedArray;(0,n.exportTypedArrayMethod)("includes",(function(e){return i(o(this),e,arguments.length>1?arguments[1]:void 0)}))},4527:function(e,t,r){"use strict";var n=r(3724),i=r(4376),o=TypeError,s=Object.getOwnPropertyDescriptor,a=n&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(e){return e instanceof TypeError}}();e.exports=a?function(e,t){if(i(e)&&!s(e,"length").writable)throw new o("Cannot set read only .length");return e.length=t}:function(e,t){return e.length=t}},4529:function(e){"use strict";e.exports={}},4554:function(e,t,r){"use strict";var n=r(6518),i=r(8981),o=r(5610),s=r(1291),a=r(6198),u=r(4527),c=r(6837),l=r(1469),d=r(4659),f=r(4606),h=r(597)("splice"),p=Math.max,v=Math.min;n({target:"Array",proto:!0,forced:!h},{splice:function(e,t){var r,n,h,m,_,g,E=i(this),y=a(E),O=o(e,y),T=arguments.length;for(0===T?r=n=0:1===T?(r=0,n=y-O):(r=T-2,n=v(p(s(t),0),y-O)),c(y+r-n),h=l(E,n),m=0;m<n;m++)(_=O+m)in E&&d(h,m,E[_]);if(h.length=n,r<n){for(m=O;m<y-n;m++)g=m+r,(_=m+n)in E?E[g]=E[_]:f(E,g);for(m=y;m>y-n+r;m--)f(E,m-1)}else if(r>n)for(m=y-n;m>O;m--)g=m+r-1,(_=m+n-1)in E?E[g]=E[_]:f(E,g);for(m=0;m<r;m++)E[m+O]=arguments[m+2];return u(E,y-n+r),h}})},4576:function(e,t,r){"use strict";var n=function(e){return e&&e.Math===Math&&e};e.exports=n("object"==typeof globalThis&&globalThis)||n("object"==typeof window&&window)||n("object"==typeof self&&self)||n("object"==typeof r.g&&r.g)||n("object"==typeof this&&this)||function(){return this}()||Function("return this")()},4598:function(e,t,r){"use strict";var n=r(9039);e.exports=function(e,t){var r=[][e];return!!r&&n((function(){r.call(null,t||function(){return 1},1)}))}},4599:function(e,t,r){"use strict";var n=r(6518),i=r(4576),o=r(9472)(i.setTimeout,!0);n({global:!0,bind:!0,forced:i.setTimeout!==o},{setTimeout:o})},4606:function(e,t,r){"use strict";var n=r(6823),i=TypeError;e.exports=function(e,t){if(!delete e[t])throw new i("Cannot delete property "+n(t)+" of "+n(e))}},4644:function(e,t,r){"use strict";var n,i,o,s=r(7811),a=r(3724),u=r(4576),c=r(4901),l=r(34),d=r(9297),f=r(6955),h=r(6823),p=r(6699),v=r(6840),m=r(2106),_=r(1625),g=r(2787),E=r(2967),y=r(8227),O=r(3392),T=r(1181),R=T.enforce,I=T.get,S=u.Int8Array,C=S&&S.prototype,b=u.Uint8ClampedArray,N=b&&b.prototype,A=S&&g(S),M=C&&g(C),w=Object.prototype,L=u.TypeError,U=y("toStringTag"),x=O("TYPED_ARRAY_TAG"),D="TypedArrayConstructor",P=s&&!!E&&"Opera"!==f(u.opera),k=!1,F={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},H={BigInt64Array:8,BigUint64Array:8},B=function(e){var t=g(e);if(l(t)){var r=I(t);return r&&d(r,D)?r[D]:B(t)}},G=function(e){if(!l(e))return!1;var t=f(e);return d(F,t)||d(H,t)};for(n in F)(o=(i=u[n])&&i.prototype)?R(o)[D]=i:P=!1;for(n in H)(o=(i=u[n])&&i.prototype)&&(R(o)[D]=i);if((!P||!c(A)||A===Function.prototype)&&(A=function(){throw new L("Incorrect invocation")},P))for(n in F)u[n]&&E(u[n],A);if((!P||!M||M===w)&&(M=A.prototype,P))for(n in F)u[n]&&E(u[n].prototype,M);if(P&&g(N)!==M&&E(N,M),a&&!d(M,U))for(n in k=!0,m(M,U,{configurable:!0,get:function(){return l(this)?this[x]:void 0}}),F)u[n]&&p(u[n],x,n);e.exports={NATIVE_ARRAY_BUFFER_VIEWS:P,TYPED_ARRAY_TAG:k&&x,aTypedArray:function(e){if(G(e))return e;throw new L("Target is not a typed array")},aTypedArrayConstructor:function(e){if(c(e)&&(!E||_(A,e)))return e;throw new L(h(e)+" is not a typed array constructor")},exportTypedArrayMethod:function(e,t,r,n){if(a){if(r)for(var i in F){var o=u[i];if(o&&d(o.prototype,e))try{delete o.prototype[e]}catch(r){try{o.prototype[e]=t}catch(e){}}}M[e]&&!r||v(M,e,r?t:P&&C[e]||t,n)}},exportTypedArrayStaticMethod:function(e,t,r){var n,i;if(a){if(E){if(r)for(n in F)if((i=u[n])&&d(i,e))try{delete i[e]}catch(e){}if(A[e]&&!r)return;try{return v(A,e,r?t:P&&A[e]||t)}catch(e){}}for(n in F)!(i=u[n])||i[e]&&!r||v(i,e,t)}},getTypedArrayConstructor:B,isView:function(e){if(!l(e))return!1;var t=f(e);return"DataView"===t||d(F,t)||d(H,t)},isTypedArray:G,TypedArray:A,TypedArrayPrototype:M}},4659:function(e,t,r){"use strict";var n=r(3724),i=r(4913),o=r(6980);e.exports=function(e,t,r){n?i.f(e,t,o(0,r)):e[t]=r}},4706:function(e,t,r){"use strict";function n(e,t,r){for(var n=[],i=Math.max(e.length,t.length),o=0,s=0;s<i||o;){var a=o+(s<e.length?e[s]:0)+(s<t.length?t[s]:0);n.push(a%r),o=Math.floor(a/r),s++}return n}function i(e,t,r){if(e<0)return null;if(0==e)return[];for(var i=[],o=t;1&e&&(i=n(i,o,r)),0!=(e>>=1);)o=n(o,o,r);return i}function o(e){return"0x"===e.substring(0,2)&&(e=e.substring(2)),function(e,t,r){var o=function(e,t){for(var r=e.split(""),n=[],i=r.length-1;i>=0;i--){var o=parseInt(r[i],t);if(isNaN(o))return null;n.push(o)}return n}(e,t);if(null===o)return null;for(var s=[],a=[1],u=0;u<o.length;u++)o[u]&&(s=n(s,i(o[u],a,r),r)),a=i(t,a,r);var c="";for(u=s.length-1;u>=0;u--)c+=s[u].toString(r);return c}(e=e.toLowerCase(),16,10)}r.d(t,{x:function(){return o}}),r(3288),r(6099),r(8940),r(8781)},4743:function(e,t,r){"use strict";var n=r(6518),i=r(4576),o=r(6346),s=r(7633),a="ArrayBuffer",u=o[a];n({global:!0,constructor:!0,forced:i[a]!==u},{ArrayBuffer:u}),s(a)},4782:function(e,t,r){"use strict";var n=r(6518),i=r(4376),o=r(3517),s=r(34),a=r(5610),u=r(6198),c=r(5397),l=r(4659),d=r(8227),f=r(597),h=r(7680),p=f("slice"),v=d("species"),m=Array,_=Math.max;n({target:"Array",proto:!0,forced:!p},{slice:function(e,t){var r,n,d,f=c(this),p=u(f),g=a(e,p),E=a(void 0===t?p:t,p);if(i(f)&&(r=f.constructor,(o(r)&&(r===m||i(r.prototype))||s(r)&&null===(r=r[v]))&&(r=void 0),r===m||void 0===r))return h(f,g,E);for(n=new(void 0===r?m:r)(_(E-g,0)),d=0;g<E;g++,d++)g in f&&l(n,d,f[g]);return n.length=d,n}})},4863:function(e,t,r){"use strict";e.exports=I,I.filename=null,I.defaults={keepCase:!1};var n=r(527),i=r(5330),o=r(7882),s=r(1344),a=r(8252),u=r(1457),c=r(5643),l=r(9687),d=r(8811),f=r(361),h=r(3262),p=/^[1-9][0-9]*$/,v=/^-?[1-9][0-9]*$/,m=/^0[x][0-9a-fA-F]+$/,_=/^-?0[x][0-9a-fA-F]+$/,g=/^0[0-7]+$/,E=/^-?0[0-7]+$/,y=/^(?![eE])[0-9]*(?:\.[0-9]*)?(?:[eE][+-]?[0-9]+)?$/,O=/^[a-zA-Z_][a-zA-Z_0-9]*$/,T=/^(?:\.?[a-zA-Z_][a-zA-Z_0-9]*)(?:\.[a-zA-Z_][a-zA-Z_0-9]*)*$/,R=/^(?:\.[a-zA-Z_][a-zA-Z_0-9]*)+$/;function I(e,t,r){t instanceof i||(r=t,t=new i),r||(r=I.defaults);var S,C,b,N,A,M=r.preferTrailingComment||!1,w=n(e,r.alternateCommentMode||!1),L=w.next,U=w.push,x=w.peek,D=w.skip,P=w.cmnt,k=!0,F=!1,H=t,B=r.keepCase?function(e){return e}:h.camelCase;function G(e,t,r){var n=I.filename;return r||(I.filename=null),Error("illegal "+(t||"token")+" '"+e+"' ("+(n?n+", ":"")+"line "+w.line+")")}function W(){var e,t=[];do{if('"'!==(e=L())&&"'"!==e)throw G(e);t.push(L()),D(e),e=x()}while('"'===e||"'"===e);return t.join("")}function j(e){var t=L();switch(t){case"'":case'"':return U(t),W();case"true":case"TRUE":return!0;case"false":case"FALSE":return!1}try{return function(e){var t=1;switch("-"===e.charAt(0)&&(t=-1,e=e.substring(1)),e){case"inf":case"INF":case"Inf":return t*(1/0);case"nan":case"NAN":case"Nan":case"NaN":return NaN;case"0":return 0}if(p.test(e))return t*parseInt(e,10);if(m.test(e))return t*parseInt(e,16);if(g.test(e))return t*parseInt(e,8);if(y.test(e))return t*parseFloat(e);throw G(e,"number",!0)}(t)}catch(r){if(e&&T.test(t))return t;throw G(t,"value")}}function q(e,t){var r,n;do{!t||'"'!==(r=x())&&"'"!==r?e.push([n=K(L()),D("to",!0)?K(L()):n]):e.push(W())}while(D(",",!0));D(";")}function K(e,t){switch(e){case"max":case"MAX":case"Max":return 536870911;case"0":return 0}if(!t&&"-"===e.charAt(0))throw G(e,"id");if(v.test(e))return parseInt(e,10);if(_.test(e))return parseInt(e,16);if(E.test(e))return parseInt(e,8);throw G(e,"id")}function z(){if(void 0!==S)throw G("package");if(S=L(),!T.test(S))throw G(S,"name");H=H.define(S),D(";")}function V(){var e,t=x();switch(t){case"weak":e=b||(b=[]),L();break;case"public":L();default:e=C||(C=[])}t=W(),D(";"),e.push(t)}function J(){if(D("="),N=W(),!(F="proto3"===N)&&"proto2"!==N)throw G(N,"syntax");D(";")}function Y(e,t){switch(t){case"option":return $(e,t),D(";"),!0;case"message":return function(e,t){if(!O.test(t=L()))throw G(t,"type name");var r=new o(t);X(r,(function(e){if(!Y(r,e))switch(e){case"map":!function(e){D("<");var t=L();if(void 0===f.mapKey[t])throw G(t,"type");D(",");var r=L();if(!T.test(r))throw G(r,"type");D(">");var n=L();if(!O.test(n))throw G(n,"name");D("=");var i=new a(B(n),K(L()),t,r);X(i,(function(e){if("option"!==e)throw G(e);$(i,e),D(";")}),(function(){te(i)})),e.add(i)}(r);break;case"required":case"repeated":Q(r,e);break;case"optional":Q(r,F?"proto3_optional":"optional");break;case"oneof":!function(e,t){if(!O.test(t=L()))throw G(t,"name");var r=new u(B(t));X(r,(function(e){"option"===e?($(r,e),D(";")):(U(e),Q(r,"optional"))})),e.add(r)}(r,e);break;case"extensions":q(r.extensions||(r.extensions=[]));break;case"reserved":q(r.reserved||(r.reserved=[]),!0);break;default:if(!F||!T.test(e))throw G(e);U(e),Q(r,"optional")}})),e.add(r)}(e,t),!0;case"enum":return function(e,t){if(!O.test(t=L()))throw G(t,"name");var r=new c(t);X(r,(function(e){switch(e){case"option":$(r,e),D(";");break;case"reserved":q(r.reserved||(r.reserved=[]),!0);break;default:!function(e,t){if(!O.test(t))throw G(t,"name");D("=");var r=K(L(),!0),n={};X(n,(function(e){if("option"!==e)throw G(e);$(n,e),D(";")}),(function(){te(n)})),e.add(t,r,n.comment)}(r,e)}})),e.add(r)}(e,t),!0;case"service":return function(e,t){if(!O.test(t=L()))throw G(t,"service name");var r=new l(t);X(r,(function(e){if(!Y(r,e)){if("rpc"!==e)throw G(e);!function(e,t){var r=P(),n=t;if(!O.test(t=L()))throw G(t,"name");var i,o,s,a,u=t;if(D("("),D("stream",!0)&&(o=!0),!T.test(t=L()))throw G(t);if(i=t,D(")"),D("returns"),D("("),D("stream",!0)&&(a=!0),!T.test(t=L()))throw G(t);s=t,D(")");var c=new d(u,n,i,s,o,a);c.comment=r,X(c,(function(e){if("option"!==e)throw G(e);$(c,e),D(";")})),e.add(c)}(r,e)}})),e.add(r)}(e,t),!0;case"extend":return function(e,t){if(!T.test(t=L()))throw G(t,"reference");var r=t;X(null,(function(t){switch(t){case"required":case"repeated":Q(e,t,r);break;case"optional":Q(e,F?"proto3_optional":"optional",r);break;default:if(!F||!T.test(t))throw G(t);U(t),Q(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=P()),e.filename=I.filename),D("{",!0)){for(var i;"}"!==(i=L());)t(i);D(";",!0)}else r&&r(),D(";"),e&&("string"!=typeof e.comment||M)&&(e.comment=P(n)||e.comment)}function Q(e,t,r){var n=L();if("group"!==n){if(!T.test(n))throw G(n,"type");var i=L();if(!O.test(i))throw G(i,"name");i=B(i),D("=");var a=new s(i,K(L()),n,t,r);if(X(a,(function(e){if("option"!==e)throw G(e);$(a,e),D(";")}),(function(){te(a)})),"proto3_optional"===t){var c=new u("_"+i);a.setOption("proto3_optional",!0),c.add(a),e.add(c)}else e.add(a);F||!a.repeated||void 0===f.packed[n]&&void 0!==f.basic[n]||a.setOption("packed",!1,!0)}else!function(e,t){var r=L();if(!O.test(r))throw G(r,"name");var n=h.lcFirst(r);r===n&&(r=h.ucFirst(r)),D("=");var i=K(L()),a=new o(r);a.group=!0;var u=new s(n,i,r,t);u.filename=I.filename,X(a,(function(e){switch(e){case"option":$(a,e),D(";");break;case"required":case"repeated":Q(a,e);break;case"optional":Q(a,F?"proto3_optional":"optional");break;default:throw G(e)}})),e.add(a).add(u)}(e,t)}function $(e,t){var r=D("(",!0);if(!T.test(t=L()))throw G(t,"name");var n,i=t,o=i;r&&(D(")"),o=i="("+i+")",t=x(),R.test(t)&&(n=t.substr(1),i+=t,L())),D("="),function(e,t,r,n){e.setParsedOption&&e.setParsedOption(t,r,n)}(e,o,Z(e,i),n)}function Z(e,t){if(D("{",!0)){for(var r={};!D("}",!0);){if(!O.test(A=L()))throw G(A,"name");var n,i=A;"{"===x()?n=Z(e,t+"."+A):(D(":"),"{"===x()?n=Z(e,t+"."+A):(n=j(!0),ee(e,t+"."+A,n)));var o=r[i];o&&(n=[].concat(o).concat(n)),r[i]=n,D(",",!0)}return r}var s=j(!0);return ee(e,t,s),s}function ee(e,t,r){e.setOption&&e.setOption(t,r)}function te(e){if(D("[",!0)){do{$(e,"option")}while(D(",",!0));D("]")}return e}for(;null!==(A=L());)switch(A){case"package":if(!k)throw G(A);z();break;case"import":if(!k)throw G(A);V();break;case"syntax":if(!k)throw G(A);J();break;case"option":$(H,A),D(";");break;default:if(Y(H,A)){k=!1;continue}throw G(A)}return I.filename=null,{package:S,imports:C,weakImports:b,syntax:N,root:t}}},4865:function(e,t,r){"use strict";var n;r.d(t,{s:function(){return n}}),function(e){e[e.mark_0=0]="mark_0",e[e.mark_1=1]="mark_1",e[e.mark_2=2]="mark_2",e[e.mark_3=3]="mark_3",e[e.mark_4=4]="mark_4",e[e.mark_5=5]="mark_5",e[e.mark_6=6]="mark_6",e[e.mark_7=7]="mark_7",e[e.mark_8=8]="mark_8",e[e.mark_9=9]="mark_9",e[e.mark_10=10]="mark_10",e[e.mark_11=11]="mark_11",e[e.mark_12=12]="mark_12",e[e.mark_13=13]="mark_13",e[e.mark_14=14]="mark_14",e[e.mark_15=15]="mark_15",e[e.mark_16=16]="mark_16",e[e.mark_17=17]="mark_17",e[e.mark_18=18]="mark_18",e[e.mark_19=19]="mark_19"}(n||(n={}))},4901:function(e){"use strict";var t="object"==typeof document&&document.all;e.exports=void 0===t&&void 0!==t?function(e){return"function"==typeof e||e===t}:function(e){return"function"==typeof e}},4913:function(e,t,r){"use strict";var n=r(3724),i=r(5917),o=r(8686),s=r(8551),a=r(6969),u=TypeError,c=Object.defineProperty,l=Object.getOwnPropertyDescriptor,d="enumerable",f="configurable",h="writable";t.f=n?o?function(e,t,r){if(s(e),t=a(t),s(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:f in r?r[f]:n[f],enumerable:d in r?r[d]:n[d],writable:!1})}return c(e,t,r)}:c:function(e,t,r){if(s(e),t=a(t),s(r),i)try{return c(e,t,r)}catch(e){}if("get"in r||"set"in r)throw new u("Accessors not supported");return"value"in r&&(e[t]=r.value),e}},4917:function(e,t,r){"use strict";r.d(t,{i:function(){return i}}),r(9089);var n=r(4269),i=function(){function e(e){var t=e.type,r=e.id;this.id=r,this.type=t}return e.prototype.set=function(e){e.file=e.file||e.fileInputId&&n.Wp.getFileUrl(e.fileInputId),this.body={id:this.id,chatType:e.chatType||"singleChat",type:"file",file:e.file,filename:e.filename,fileInputId:e.fileInputId,to:e.to,from:e.from,roomType:e.roomType,success:e.success,fail:e.fail,ext:e.ext,time:Date.now(),onFileUploadError:e.onFileUploadError,onFileUploadComplete:e.onFileUploadComplete,onFileUploadProgress:e.onFileUploadProgress,body:e.body,isChatThread:e.isChatThread}},e.prototype.setChatType=function(e){return!!this.body&&(this.body.chatType=e,!0)},e.prototype.setGroup=function(e){return!!this.body&&(this.body.group=e,!0)},e.create=function(e){return{id:n.Wp.getUniqueId(),chatType:e.chatType||"singleChat",type:"file",file:e.file,filename:e.filename,fileInputId:e.fileInputId,file_length:e.file_length,to:e.to,from:e.from||"",ext:e.ext,onFileUploadError:e.onFileUploadError,onFileUploadComplete:e.onFileUploadComplete,onFileUploadProgress:e.onFileUploadProgress,body:e.body,time:Date.now(),msgConfig:e.msgConfig,isChatThread:e.isChatThread,priority:e.priority,deliverOnlineOnly:e.deliverOnlineOnly,receiverList:e.receiverList,webhookEnv:e.webhookEnv}},e}()},5031:function(e,t,r){"use strict";var n=r(7751),i=r(9504),o=r(8480),s=r(3717),a=r(8551),u=i([].concat);e.exports=n("Reflect","ownKeys")||function(e){var t=o.f(a(e)),r=s.f;return r?u(t,r(e)):t}},5044:function(e,t,r){"use strict";var n=r(4644),i=r(4373),o=r(5854),s=r(6955),a=r(9565),u=r(9504),c=r(9039),l=n.aTypedArray,d=n.exportTypedArrayMethod,f=u("".slice);d("fill",(function(e){var t=arguments.length;l(this);var r="Big"===f(s(this),0,3)?o(e):+e;return a(i,this,r,t>1?arguments[1]:void 0,t>2?arguments[2]:void 0)}),c((function(){var e=0;return new Int8Array(2).fill({valueOf:function(){return e++}}),1!==e})))},5047:function(e,t,r){"use strict";t.Service=r(7595)},5081:function(e,t,r){"use strict";var n=r(6518),i=r(4576);n({global:!0,forced:i.globalThis!==i},{globalThis:i})},5086:function(e,t,r){"use strict";var n=r(6518),i=r(9213).some;n({target:"Array",proto:!0,forced:!r(4598)("some")},{some:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}})},5095: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}},5212:function(e,t,r){"use strict";e.exports=o;var n=r(8045),i=r(4153)("fs");function o(e,t,r){return"function"==typeof t?(r=t,t={}):t||(t={}),r?!t.xhr&&i&&i.readFile?i.readFile(e,(function(n,i){return n&&"undefined"!=typeof XMLHttpRequest?o.xhr(e,t,r):n?r(n):r(null,t.binary?i:i.toString("utf8"))})):o.xhr(e,t,r):n(o,this,e,t)}o.xhr=function(e,t,r){var n=new XMLHttpRequest;n.onreadystatechange=function(){if(4===n.readyState){if(0!==n.status&&200!==n.status)return r(Error("status "+n.status));if(t.binary){var e=n.response;if(!e){e=[];for(var i=0;i<n.responseText.length;++i)e.push(255&n.responseText.charCodeAt(i))}return r(null,"undefined"!=typeof Uint8Array?new Uint8Array(e):e)}return r(null,n.responseText)}},t.binary&&("overrideMimeType"in n&&n.overrideMimeType("text/plain; charset=x-user-defined"),n.responseType="arraybuffer"),n.open("GET",e),n.send()}},5276:function(e,t,r){"use strict";var n=r(6518),i=r(7476),o=r(9617).indexOf,s=r(4598),a=i([].indexOf),u=!!a&&1/a([1],1,-0)<0;n({target:"Array",proto:!0,forced:u||!s("indexOf")},{indexOf:function(e){var t=arguments.length>1?arguments[1]:void 0;return u?a(this,e,t)||0:o(this,e,t)}})},5325:function(e,t,r){"use strict";var n=e.exports=r(4394);n.build="light",n.load=function(e,t,r){return"function"==typeof t?(r=t,t=new n.Root):t||(t=new n.Root),t.load(e,r)},n.loadSync=function(e,t){return t||(t=new n.Root),t.loadSync(e)},n.encoder=r(1080),n.decoder=r(7728),n.verifier=r(420),n.converter=r(744),n.ReflectionObject=r(7209),n.Namespace=r(8923),n.Root=r(5330),n.Enum=r(5643),n.Type=r(7882),n.Field=r(1344),n.OneOf=r(1457),n.MapField=r(8252),n.Service=r(9687),n.Method=r(8811),n.Message=r(2551),n.wrappers=r(6434),n.types=r(361),n.util=r(3262),n.ReflectionObject._configure(n.Root),n.Namespace._configure(n.Type,n.Service,n.Enum),n.Root._configure(n.Type),n.Field._configure(n.Type)},5330:function(e,t,r){"use strict";e.exports=d;var n=r(8923);((d.prototype=Object.create(n.prototype)).constructor=d).className="Root";var i,o,s,a=r(1344),u=r(5643),c=r(1457),l=r(3262);function d(e){n.call(this,"",e),this.deferred=[],this.files=[]}function f(){}d.fromJSON=function(e,t){return t||(t=new d),e.options&&t.setOptions(e.options),t.addJSON(e.nested)},d.prototype.resolvePath=l.path.resolve,d.prototype.fetch=l.fetch,d.prototype.load=function e(t,r,n){"function"==typeof r&&(n=r,r=void 0);var i=this;if(!n)return l.asPromise(e,i,t,r);var a=n===f;function u(e,t){if(n){var r=n;if(n=null,a)throw e;r(e,t)}}function c(e){var t=e.lastIndexOf("google/protobuf/");if(t>-1){var r=e.substring(t);if(r in s)return r}return null}function d(e,t){try{if(l.isString(t)&&"{"===t.charAt(0)&&(t=JSON.parse(t)),l.isString(t)){o.filename=e;var n,s=o(t,i,r),d=0;if(s.imports)for(;d<s.imports.length;++d)(n=c(s.imports[d])||i.resolvePath(e,s.imports[d]))&&h(n);if(s.weakImports)for(d=0;d<s.weakImports.length;++d)(n=c(s.weakImports[d])||i.resolvePath(e,s.weakImports[d]))&&h(n,!0)}else i.setOptions(t.options).addJSON(t.nested)}catch(e){u(e)}a||p||u(null,i)}function h(e,t){if(!(i.files.indexOf(e)>-1))if(i.files.push(e),e in s)a?d(e,s[e]):(++p,setTimeout((function(){--p,d(e,s[e])})));else if(a){var r;try{r=l.fs.readFileSync(e).toString("utf8")}catch(e){return void(t||u(e))}d(e,r)}else++p,i.fetch(e,(function(r,o){--p,n&&(r?t?p||u(null,i):u(r):d(e,o))}))}var p=0;l.isString(t)&&(t=[t]);for(var v,m=0;m<t.length;++m)(v=i.resolvePath("",t[m]))&&h(v);if(a)return i;p||u(null,i)},d.prototype.loadSync=function(e,t){if(!l.isNode)throw Error("not supported");return this.load(e,t,f)},d.prototype.resolveAll=function(){if(this.deferred.length)throw Error("unresolvable extensions: "+this.deferred.map((function(e){return"'extend "+e.extend+"' in "+e.parent.fullName})).join(", "));return n.prototype.resolveAll.call(this)};var h=/^[A-Z]/;function p(e,t){var r=t.parent.lookup(t.extend);if(r){var n=new a(t.fullName,t.id,t.type,t.rule,void 0,t.options);return n.declaringField=t,t.extensionField=n,r.add(n),!0}return!1}d.prototype._handleAdd=function(e){if(e instanceof a)void 0===e.extend||e.extensionField||p(0,e)||this.deferred.push(e);else if(e instanceof u)h.test(e.name)&&(e.parent[e.name]=e.values);else if(!(e instanceof c)){if(e instanceof i)for(var t=0;t<this.deferred.length;)p(0,this.deferred[t])?this.deferred.splice(t,1):++t;for(var r=0;r<e.nestedArray.length;++r)this._handleAdd(e._nestedArray[r]);h.test(e.name)&&(e.parent[e.name]=e)}},d.prototype._handleRemove=function(e){if(e instanceof a){if(void 0!==e.extend)if(e.extensionField)e.extensionField.parent.remove(e.extensionField),e.extensionField=null;else{var t=this.deferred.indexOf(e);t>-1&&this.deferred.splice(t,1)}}else if(e instanceof u)h.test(e.name)&&delete e.parent[e.name];else if(e instanceof n){for(var r=0;r<e.nestedArray.length;++r)this._handleRemove(e._nestedArray[r]);h.test(e.name)&&delete e.parent[e.name]}},d._configure=function(e,t,r){i=e,o=t,s=r}},5370:function(e,t,r){"use strict";var n=r(6198);e.exports=function(e,t,r){for(var i=0,o=arguments.length>2?r:n(t),s=new e(o);o>i;)s[i]=t[i++];return s}},5397:function(e,t,r){"use strict";var n=r(7055),i=r(7750);e.exports=function(e){return n(i(e))}},5506:function(e,t,r){"use strict";var n=r(6518),i=r(2357).entries;n({target:"Object",stat:!0},{entries:function(e){return i(e)}})},5548:function(e,t,r){"use strict";var n=r(3517),i=r(6823),o=TypeError;e.exports=function(e){if(n(e))return e;throw new o(i(e)+" is not a constructor")}},5575:function(e,t,r){"use strict";var n=r(6518),i=r(4576),o=r(9472)(i.setInterval,!0);n({global:!0,bind:!0,forced:i.setInterval!==o},{setInterval:o})},5610:function(e,t,r){"use strict";var n=r(1291),i=Math.max,o=Math.min;e.exports=function(e,t){var r=n(e);return r<0?i(r+t,0):o(r,t)}},5617:function(e,t,r){"use strict";var n=r(3164);e.exports=Math.fround||function(e){return n(e,1.1920928955078125e-7,34028234663852886e22,11754943508222875e-54)}},5643:function(e,t,r){"use strict";e.exports=s;var n=r(7209);((s.prototype=Object.create(n.prototype)).constructor=s).className="Enum";var i=r(8923),o=r(3262);function s(e,t,r,i,o){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=i,this.comments=o||{},this.reserved=void 0,t)for(var s=Object.keys(t),a=0;a<s.length;++a)"number"==typeof t[s[a]]&&(this.valuesById[this.values[s[a]]=t[s[a]]]=s[a])}s.fromJSON=function(e,t){var r=new s(e,t.values,t.options,t.comment,t.comments);return r.reserved=t.reserved,r},s.prototype.toJSON=function(e){var t=!!e&&Boolean(e.keepComments);return o.toObject(["options",this.options,"values",this.values,"reserved",this.reserved&&this.reserved.length?this.reserved:void 0,"comment",t?this.comment:void 0,"comments",t?this.comments:void 0])},s.prototype.add=function(e,t,r){if(!o.isString(e))throw TypeError("name must be a string");if(!o.isInteger(t))throw TypeError("id must be an integer");if(void 0!==this.values[e])throw Error("duplicate name '"+e+"' in "+this);if(this.isReservedId(t))throw Error("id "+t+" is reserved in "+this);if(this.isReservedName(e))throw Error("name '"+e+"' is reserved in "+this);if(void 0!==this.valuesById[t]){if(!this.options||!this.options.allow_alias)throw Error("duplicate id "+t+" in "+this);this.values[e]=t}else this.valuesById[this.values[e]=t]=e;return this.comments[e]=r||null,this},s.prototype.remove=function(e){if(!o.isString(e))throw TypeError("name must be a string");var t=this.values[e];if(null==t)throw Error("name '"+e+"' does not exist in "+this);return delete this.valuesById[t],delete this.values[e],delete this.comments[e],this},s.prototype.isReservedId=function(e){return i.isReservedId(this.reserved,e)},s.prototype.isReservedName=function(e){return i.isReservedName(this.reserved,e)}},5652:function(e,t,r){"use strict";var n=r(9039);e.exports=n((function(){if("function"==typeof ArrayBuffer){var e=new ArrayBuffer(8);Object.isExtensible(e)&&Object.defineProperty(e,"a",{value:8})}}))},5732:function(e,t,r){"use strict";r.d(t,{Aj:function(){return h},GD:function(){return p},Xn:function(){return f},d2:function(){return m},fg:function(){return v}}),r(2675),r(9463),r(2259),r(8706),r(3792),r(6099),r(3362),r(7764),r(2953);var n=r(4269),i=r(3603),o=r(7968),s=r(229),a=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function s(e){try{u(n.next(e))}catch(e){o(e)}}function a(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}u((n=n.apply(e,t||[])).next())}))},u=function(e,t){var r,n,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;s;)try{if(r=1,n&&(i=2&o[0]?n.return:o[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,o[1])).done)return i;switch(n=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,n=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],n=0}finally{r=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}},c=204800,l=1048576;function d(e){return new Promise((function(t,r){if("undefined"!=typeof FileReader){var n=new FileReader;n.onload=function(){return t(n.result)},n.onerror=function(){return r(n.error||new Error("Failed to read file"))},n.readAsArrayBuffer(e)}else r(new Error("FileReader is not available"))}))}function f(e,t,r){return"img"===t?e>("original"===r?c:l):e>l}function h(e){return a(this,void 0,void 0,(function(){var t;return u(this,(function(r){switch(r.label){case 0:return[4,d(e)];case 1:return t=r.sent(),[2,(0,s.K)(t)]}}))}))}function p(e){return"original"===e?"origin":"large"}function v(e,t,r,s){var c,l;return a(this,void 0,void 0,(function(){var a,d,f,h,v,m,_,g,E,y,O,T,R,I;return u(this,(function(u){switch(u.label){case 0:a=e.context,d=a.orgName,f=a.appName,h=a.accessToken,v="".concat(e.apiUrl,"/").concat(d,"/").concat(f,"/chatfiles/exists?md5=").concat(t),"img"===r&&s&&(v+="&imageType=".concat(p(s))),u.label=1;case 1:return u.trys.push([1,3,,4]),[4,n.RD.call(e,{url:v,dataType:"json",type:"GET",headers:{Authorization:"Bearer "+h}},i.jz.SDK_INTERNAL)];case 2:return m=u.sent(),(_=null===(c=null==m?void 0:m.entities)||void 0===c?void 0:c[0])?(g=!0===_.exists,E=_.uuid||"",y=_["share-secret"]||"",S=null!==(l=_["exists-type"])&&void 0!==l?l:_.existsType,O="origin"===S||"original"===S?"original":"large"===S?"large":void 0,T=g&&!!E,R=s,"img"===r&&T&&("original"===O?R="original":"large"===O&&("original"===s?T=!1:R="large")),o.vF.debug("precheck result","exists: ".concat(g),"uuid: ".concat(E),"existsType: ".concat(O||""),"effectiveImageType: ".concat(R||""),"hit: ".concat(T)),[2,{exists:g,uuid:E,shareSecret:y,existsType:O,effectiveImageType:R,hit:T}]):[2,{exists:!1,hit:!1}];case 3:return I=u.sent(),o.vF.warn("precheck failed, proceeding with upload",I),[2,{exists:!1,hit:!1}];case 4:return[2]}var S}))}))}function m(e,t){var r="em-redirect=true".concat(t?"&share-secret=".concat(t):"");return{originalImageUrl:"".concat(e,"?").concat(r),bigImageUrl:"".concat(e,"?size=large&").concat(r)}}},5745:function(e,t,r){"use strict";var n=r(7629);e.exports=function(e,t){return n[e]||(n[e]=t||{})}},5749:function(e,t,r){"use strict";var n=r(788),i=TypeError;e.exports=function(e){if(n(e))throw new i("The method doesn't accept regular expressions");return e}},5806:function(e,t,r){"use strict";r(7764);var n,i=r(6518),o=r(3724),s=r(7416),a=r(4576),u=r(6080),c=r(9504),l=r(6840),d=r(2106),f=r(679),h=r(9297),p=r(4213),v=r(7916),m=r(7680),_=r(8183).codeAt,g=r(6098),E=r(655),y=r(687),O=r(2812),T=r(8406),R=r(1181),I=R.set,S=R.getterFor("URL"),C=T.URLSearchParams,b=T.getState,N=a.URL,A=a.TypeError,M=a.parseInt,w=Math.floor,L=Math.pow,U=c("".charAt),x=c(/./.exec),D=c([].join),P=c(1..toString),k=c([].pop),F=c([].push),H=c("".replace),B=c([].shift),G=c("".split),W=c("".slice),j=c("".toLowerCase),q=c([].unshift),K="Invalid scheme",z="Invalid host",V="Invalid port",J=/[a-z]/i,Y=/[\d+-.a-z]/i,X=/\d/,Q=/^0x/i,$=/^[0-7]+$/,Z=/^\d+$/,ee=/^[\da-f]+$/i,te=/[\0\t\n\r #%/:<>?@[\\\]^|]/,re=/[\0\t\n\r #/:<>?@[\\\]^|]/,ne=/^[\u0000-\u0020]+/,ie=/(^|[^\u0000-\u0020])[\u0000-\u0020]+$/,oe=/[\t\n\r]/g,se=function(e){var t,r,n,i;if("number"==typeof e){for(t=[],r=0;r<4;r++)q(t,e%256),e=w(e/256);return D(t,".")}if("object"==typeof e){for(t="",n=function(e){for(var t=null,r=1,n=null,i=0,o=0;o<8;o++)0!==e[o]?(i>r&&(t=n,r=i),n=null,i=0):(null===n&&(n=o),++i);return i>r?n:t}(e),r=0;r<8;r++)i&&0===e[r]||(i&&(i=!1),n===r?(t+=r?":":"::",i=!0):(t+=P(e[r],16),r<7&&(t+=":")));return"["+t+"]"}return e},ae={},ue=p({},ae,{" ":1,'"':1,"<":1,">":1,"`":1}),ce=p({},ue,{"#":1,"?":1,"{":1,"}":1}),le=p({},ce,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),de=function(e,t){var r=_(e,0);return r>32&&r<127&&!h(t,e)?e:encodeURIComponent(e)},fe={ftp:21,file:null,http:80,https:443,ws:80,wss:443},he=function(e,t){var r;return 2===e.length&&x(J,U(e,0))&&(":"===(r=U(e,1))||!t&&"|"===r)},pe=function(e){var t;return e.length>1&&he(W(e,0,2))&&(2===e.length||"/"===(t=U(e,2))||"\\"===t||"?"===t||"#"===t)},ve=function(e){return"."===e||"%2e"===j(e)},me={},_e={},ge={},Ee={},ye={},Oe={},Te={},Re={},Ie={},Se={},Ce={},be={},Ne={},Ae={},Me={},we={},Le={},Ue={},xe={},De={},Pe={},ke=function(e,t,r){var n,i,o,s=E(e);if(t){if(i=this.parse(s))throw new A(i);this.searchParams=null}else{if(void 0!==r&&(n=new ke(r,!0)),i=this.parse(s,null,n))throw new A(i);(o=b(new C)).bindURL(this),this.searchParams=o}};ke.prototype={type:"URL",parse:function(e,t,r){var i,o,s,a,u,c=this,l=t||me,d=0,f="",p=!1,_=!1,g=!1;for(e=E(e),t||(c.scheme="",c.username="",c.password="",c.host=null,c.port=null,c.path=[],c.query=null,c.fragment=null,c.cannotBeABaseURL=!1,e=H(e,ne,""),e=H(e,ie,"$1")),e=H(e,oe,""),i=v(e);d<=i.length;){switch(o=i[d],l){case me:if(!o||!x(J,o)){if(t)return K;l=ge;continue}f+=j(o),l=_e;break;case _e:if(o&&(x(Y,o)||"+"===o||"-"===o||"."===o))f+=j(o);else{if(":"!==o){if(t)return K;f="",l=ge,d=0;continue}if(t&&(c.isSpecial()!==h(fe,f)||"file"===f&&(c.includesCredentials()||null!==c.port)||"file"===c.scheme&&!c.host))return;if(c.scheme=f,t)return void(c.isSpecial()&&fe[c.scheme]===c.port&&(c.port=null));f="","file"===c.scheme?l=Ae:c.isSpecial()&&r&&r.scheme===c.scheme?l=Ee:c.isSpecial()?l=Re:"/"===i[d+1]?(l=ye,d++):(c.cannotBeABaseURL=!0,F(c.path,""),l=xe)}break;case ge:if(!r||r.cannotBeABaseURL&&"#"!==o)return K;if(r.cannotBeABaseURL&&"#"===o){c.scheme=r.scheme,c.path=m(r.path),c.query=r.query,c.fragment="",c.cannotBeABaseURL=!0,l=Pe;break}l="file"===r.scheme?Ae:Oe;continue;case Ee:if("/"!==o||"/"!==i[d+1]){l=Oe;continue}l=Ie,d++;break;case ye:if("/"===o){l=Se;break}l=Ue;continue;case Oe:if(c.scheme=r.scheme,o===n)c.username=r.username,c.password=r.password,c.host=r.host,c.port=r.port,c.path=m(r.path),c.query=r.query;else if("/"===o||"\\"===o&&c.isSpecial())l=Te;else if("?"===o)c.username=r.username,c.password=r.password,c.host=r.host,c.port=r.port,c.path=m(r.path),c.query="",l=De;else{if("#"!==o){c.username=r.username,c.password=r.password,c.host=r.host,c.port=r.port,c.path=m(r.path),c.path.length--,l=Ue;continue}c.username=r.username,c.password=r.password,c.host=r.host,c.port=r.port,c.path=m(r.path),c.query=r.query,c.fragment="",l=Pe}break;case Te:if(!c.isSpecial()||"/"!==o&&"\\"!==o){if("/"!==o){c.username=r.username,c.password=r.password,c.host=r.host,c.port=r.port,l=Ue;continue}l=Se}else l=Ie;break;case Re:if(l=Ie,"/"!==o||"/"!==U(f,d+1))continue;d++;break;case Ie:if("/"!==o&&"\\"!==o){l=Se;continue}break;case Se:if("@"===o){p&&(f="%40"+f),p=!0,s=v(f);for(var y=0;y<s.length;y++){var O=s[y];if(":"!==O||g){var T=de(O,le);g?c.password+=T:c.username+=T}else g=!0}f=""}else if(o===n||"/"===o||"?"===o||"#"===o||"\\"===o&&c.isSpecial()){if(p&&""===f)return"Invalid authority";d-=v(f).length+1,f="",l=Ce}else f+=o;break;case Ce:case be:if(t&&"file"===c.scheme){l=we;continue}if(":"!==o||_){if(o===n||"/"===o||"?"===o||"#"===o||"\\"===o&&c.isSpecial()){if(c.isSpecial()&&""===f)return z;if(t&&""===f&&(c.includesCredentials()||null!==c.port))return;if(a=c.parseHost(f))return a;if(f="",l=Le,t)return;continue}"["===o?_=!0:"]"===o&&(_=!1),f+=o}else{if(""===f)return z;if(a=c.parseHost(f))return a;if(f="",l=Ne,t===be)return}break;case Ne:if(!x(X,o)){if(o===n||"/"===o||"?"===o||"#"===o||"\\"===o&&c.isSpecial()||t){if(""!==f){var R=M(f,10);if(R>65535)return V;c.port=c.isSpecial()&&R===fe[c.scheme]?null:R,f=""}if(t)return;l=Le;continue}return V}f+=o;break;case Ae:if(c.scheme="file","/"===o||"\\"===o)l=Me;else{if(!r||"file"!==r.scheme){l=Ue;continue}switch(o){case n:c.host=r.host,c.path=m(r.path),c.query=r.query;break;case"?":c.host=r.host,c.path=m(r.path),c.query="",l=De;break;case"#":c.host=r.host,c.path=m(r.path),c.query=r.query,c.fragment="",l=Pe;break;default:pe(D(m(i,d),""))||(c.host=r.host,c.path=m(r.path),c.shortenPath()),l=Ue;continue}}break;case Me:if("/"===o||"\\"===o){l=we;break}r&&"file"===r.scheme&&!pe(D(m(i,d),""))&&(he(r.path[0],!0)?F(c.path,r.path[0]):c.host=r.host),l=Ue;continue;case we:if(o===n||"/"===o||"\\"===o||"?"===o||"#"===o){if(!t&&he(f))l=Ue;else if(""===f){if(c.host="",t)return;l=Le}else{if(a=c.parseHost(f))return a;if("localhost"===c.host&&(c.host=""),t)return;f="",l=Le}continue}f+=o;break;case Le:if(c.isSpecial()){if(l=Ue,"/"!==o&&"\\"!==o)continue}else if(t||"?"!==o)if(t||"#"!==o){if(o!==n&&(l=Ue,"/"!==o))continue}else c.fragment="",l=Pe;else c.query="",l=De;break;case Ue:if(o===n||"/"===o||"\\"===o&&c.isSpecial()||!t&&("?"===o||"#"===o)){if(".."===(u=j(u=f))||"%2e."===u||".%2e"===u||"%2e%2e"===u?(c.shortenPath(),"/"===o||"\\"===o&&c.isSpecial()||F(c.path,"")):ve(f)?"/"===o||"\\"===o&&c.isSpecial()||F(c.path,""):("file"===c.scheme&&!c.path.length&&he(f)&&(c.host&&(c.host=""),f=U(f,0)+":"),F(c.path,f)),f="","file"===c.scheme&&(o===n||"?"===o||"#"===o))for(;c.path.length>1&&""===c.path[0];)B(c.path);"?"===o?(c.query="",l=De):"#"===o&&(c.fragment="",l=Pe)}else f+=de(o,ce);break;case xe:"?"===o?(c.query="",l=De):"#"===o?(c.fragment="",l=Pe):o!==n&&(c.path[0]+=de(o,ae));break;case De:t||"#"!==o?o!==n&&("'"===o&&c.isSpecial()?c.query+="%27":c.query+="#"===o?"%23":de(o,ae)):(c.fragment="",l=Pe);break;case Pe:o!==n&&(c.fragment+=de(o,ue))}d++}},parseHost:function(e){var t,r,n;if("["===U(e,0)){if("]"!==U(e,e.length-1))return z;if(t=function(e){var t,r,n,i,o,s,a,u=[0,0,0,0,0,0,0,0],c=0,l=null,d=0,f=function(){return U(e,d)};if(":"===f()){if(":"!==U(e,1))return;d+=2,l=++c}for(;f();){if(8===c)return;if(":"!==f()){for(t=r=0;r<4&&x(ee,f());)t=16*t+M(f(),16),d++,r++;if("."===f()){if(0===r)return;if(d-=r,c>6)return;for(n=0;f();){if(i=null,n>0){if(!("."===f()&&n<4))return;d++}if(!x(X,f()))return;for(;x(X,f());){if(o=M(f(),10),null===i)i=o;else{if(0===i)return;i=10*i+o}if(i>255)return;d++}u[c]=256*u[c]+i,2!==++n&&4!==n||c++}if(4!==n)return;break}if(":"===f()){if(d++,!f())return}else if(f())return;u[c++]=t}else{if(null!==l)return;d++,l=++c}}if(null!==l)for(s=c-l,c=7;0!==c&&s>0;)a=u[c],u[c--]=u[l+s-1],u[l+--s]=a;else if(8!==c)return;return u}(W(e,1,-1)),!t)return z;this.host=t}else if(this.isSpecial()){if(e=g(e),x(te,e))return z;if(t=function(e){var t,r,n,i,o,s,a,u=G(e,".");if(u.length&&""===u[u.length-1]&&u.length--,(t=u.length)>4)return e;for(r=[],n=0;n<t;n++){if(""===(i=u[n]))return e;if(o=10,i.length>1&&"0"===U(i,0)&&(o=x(Q,i)?16:8,i=W(i,8===o?1:2)),""===i)s=0;else{if(!x(10===o?Z:8===o?$:ee,i))return e;s=M(i,o)}F(r,s)}for(n=0;n<t;n++)if(s=r[n],n===t-1){if(s>=L(256,5-t))return null}else if(s>255)return null;for(a=k(r),n=0;n<r.length;n++)a+=r[n]*L(256,3-n);return a}(e),null===t)return z;this.host=t}else{if(x(re,e))return z;for(t="",r=v(e),n=0;n<r.length;n++)t+=de(r[n],ae);this.host=t}},cannotHaveUsernamePasswordPort:function(){return!this.host||this.cannotBeABaseURL||"file"===this.scheme},includesCredentials:function(){return""!==this.username||""!==this.password},isSpecial:function(){return h(fe,this.scheme)},shortenPath:function(){var e=this.path,t=e.length;!t||"file"===this.scheme&&1===t&&he(e[0],!0)||e.length--},serialize:function(){var e=this,t=e.scheme,r=e.username,n=e.password,i=e.host,o=e.port,s=e.path,a=e.query,u=e.fragment,c=t+":";return null!==i?(c+="//",e.includesCredentials()&&(c+=r+(n?":"+n:"")+"@"),c+=se(i),null!==o&&(c+=":"+o)):"file"===t&&(c+="//"),c+=e.cannotBeABaseURL?s[0]:s.length?"/"+D(s,"/"):"",null!==a&&(c+="?"+a),null!==u&&(c+="#"+u),c},setHref:function(e){var t=this.parse(e);if(t)throw new A(t);this.searchParams.update()},getOrigin:function(){var e=this.scheme,t=this.port;if("blob"===e)try{return new Fe(e.path[0]).origin}catch(e){return"null"}return"file"!==e&&this.isSpecial()?e+"://"+se(this.host)+(null!==t?":"+t:""):"null"},getProtocol:function(){return this.scheme+":"},setProtocol:function(e){this.parse(E(e)+":",me)},getUsername:function(){return this.username},setUsername:function(e){var t=v(E(e));if(!this.cannotHaveUsernamePasswordPort()){this.username="";for(var r=0;r<t.length;r++)this.username+=de(t[r],le)}},getPassword:function(){return this.password},setPassword:function(e){var t=v(E(e));if(!this.cannotHaveUsernamePasswordPort()){this.password="";for(var r=0;r<t.length;r++)this.password+=de(t[r],le)}},getHost:function(){var e=this.host,t=this.port;return null===e?"":null===t?se(e):se(e)+":"+t},setHost:function(e){this.cannotBeABaseURL||this.parse(e,Ce)},getHostname:function(){var e=this.host;return null===e?"":se(e)},setHostname:function(e){this.cannotBeABaseURL||this.parse(e,be)},getPort:function(){var e=this.port;return null===e?"":E(e)},setPort:function(e){this.cannotHaveUsernamePasswordPort()||(""===(e=E(e))?this.port=null:this.parse(e,Ne))},getPathname:function(){var e=this.path;return this.cannotBeABaseURL?e[0]:e.length?"/"+D(e,"/"):""},setPathname:function(e){this.cannotBeABaseURL||(this.path=[],this.parse(e,Le))},getSearch:function(){var e=this.query;return e?"?"+e:""},setSearch:function(e){""===(e=E(e))?this.query=null:("?"===U(e,0)&&(e=W(e,1)),this.query="",this.parse(e,De)),this.searchParams.update()},getSearchParams:function(){return this.searchParams.facade},getHash:function(){var e=this.fragment;return e?"#"+e:""},setHash:function(e){""!==(e=E(e))?("#"===U(e,0)&&(e=W(e,1)),this.fragment="",this.parse(e,Pe)):this.fragment=null},update:function(){this.query=this.searchParams.serialize()||null}};var Fe=function(e){var t=f(this,He),r=O(arguments.length,1)>1?arguments[1]:void 0,n=I(t,new ke(e,!1,r));o||(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())},He=Fe.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(o&&(d(He,"href",Be("serialize","setHref")),d(He,"origin",Be("getOrigin")),d(He,"protocol",Be("getProtocol","setProtocol")),d(He,"username",Be("getUsername","setUsername")),d(He,"password",Be("getPassword","setPassword")),d(He,"host",Be("getHost","setHost")),d(He,"hostname",Be("getHostname","setHostname")),d(He,"port",Be("getPort","setPort")),d(He,"pathname",Be("getPathname","setPathname")),d(He,"search",Be("getSearch","setSearch")),d(He,"searchParams",Be("getSearchParams")),d(He,"hash",Be("getHash","setHash"))),l(He,"toJSON",(function(){return S(this).serialize()}),{enumerable:!0}),l(He,"toString",(function(){return S(this).serialize()}),{enumerable:!0}),N){var Ge=N.createObjectURL,We=N.revokeObjectURL;Ge&&l(Fe,"createObjectURL",u(Ge,N)),We&&l(Fe,"revokeObjectURL",u(We,N))}y(Fe,"URL"),i({global:!0,constructor:!0,forced:!s,sham:!o},{URL:Fe})},5823:function(e,t,r){"use strict";var n=r(6518),i=r(4576),o=r(9565),s=r(3724),a=r(2805),u=r(4644),c=r(6346),l=r(679),d=r(6980),f=r(6699),h=r(2087),p=r(8014),v=r(7696),m=r(8229),_=r(8319),g=r(6969),E=r(9297),y=r(6955),O=r(34),T=r(757),R=r(2360),I=r(1625),S=r(2967),C=r(8480).f,b=r(3251),N=r(9213).forEach,A=r(7633),M=r(2106),w=r(4913),L=r(7347),U=r(5370),x=r(1181),D=r(3167),P=x.get,k=x.set,F=x.enforce,H=w.f,B=L.f,G=i.RangeError,W=c.ArrayBuffer,j=W.prototype,q=c.DataView,K=u.NATIVE_ARRAY_BUFFER_VIEWS,z=u.TYPED_ARRAY_TAG,V=u.TypedArray,J=u.TypedArrayPrototype,Y=u.isTypedArray,X="BYTES_PER_ELEMENT",Q="Wrong length",$=function(e,t){M(e,t,{configurable:!0,get:function(){return P(this)[t]}})},Z=function(e){var t;return I(j,e)||"ArrayBuffer"===(t=y(e))||"SharedArrayBuffer"===t},ee=function(e,t){return Y(e)&&!T(t)&&t in e&&h(+t)&&t>=0},te=function(e,t){return t=g(t),ee(e,t)?d(2,e[t]):B(e,t)},re=function(e,t,r){return t=g(t),!(ee(e,t)&&O(r)&&E(r,"value"))||E(r,"get")||E(r,"set")||r.configurable||E(r,"writable")&&!r.writable||E(r,"enumerable")&&!r.enumerable?H(e,t,r):(e[t]=r.value,e)};s?(K||(L.f=te,w.f=re,$(J,"buffer"),$(J,"byteOffset"),$(J,"byteLength"),$(J,"length")),n({target:"Object",stat:!0,forced:!K},{getOwnPropertyDescriptor:te,defineProperty:re}),e.exports=function(e,t,r){var s=e.match(/\d+/)[0]/8,u=e+(r?"Clamped":"")+"Array",c="get"+e,d="set"+e,h=i[u],g=h,E=g&&g.prototype,y={},T=function(e,t){H(e,t,{get:function(){return function(e,t){var r=P(e);return r.view[c](t*s+r.byteOffset,!0)}(this,t)},set:function(e){return function(e,t,n){var i=P(e);i.view[d](t*s+i.byteOffset,r?_(n):n,!0)}(this,t,e)},enumerable:!0})};K?a&&(g=t((function(e,t,r,n){return l(e,E),D(O(t)?Z(t)?void 0!==n?new h(t,m(r,s),n):void 0!==r?new h(t,m(r,s)):new h(t):Y(t)?U(g,t):o(b,g,t):new h(v(t)),e,g)})),S&&S(g,V),N(C(h),(function(e){e in g||f(g,e,h[e])})),g.prototype=E):(g=t((function(e,t,r,n){l(e,E);var i,a,u,c=0,d=0;if(O(t)){if(!Z(t))return Y(t)?U(g,t):o(b,g,t);i=t,d=m(r,s);var f=t.byteLength;if(void 0===n){if(f%s)throw new G(Q);if((a=f-d)<0)throw new G(Q)}else if((a=p(n)*s)+d>f)throw new G(Q);u=a/s}else u=v(t),i=new W(a=u*s);for(k(e,{buffer:i,byteOffset:d,byteLength:a,length:u,view:new q(i)});c<u;)T(e,c++)})),S&&S(g,V),E=g.prototype=R(J)),E.constructor!==g&&f(E,"constructor",g),F(E).TypedArrayConstructor=g,z&&f(E,z,u);var I=g!==h;y[u]=g,n({global:!0,constructor:!0,forced:I,sham:!K},y),X in g||f(g,X,s),X in E||f(E,X,s),A(u)}):e.exports=function(){}},5854:function(e,t,r){"use strict";var n=r(2777),i=TypeError;e.exports=function(e){var t=n(e,"number");if("number"==typeof t)throw new i("Can't convert number to bigint");return BigInt(t)}},5917:function(e,t,r){"use strict";var n=r(3724),i=r(9039),o=r(4055);e.exports=!n&&!i((function(){return 7!==Object.defineProperty(o("div"),"a",{get:function(){return 7}}).a}))},5966:function(e,t,r){"use strict";var n=r(9306),i=r(4117);e.exports=function(e,t){var r=e[t];return i(r)?void 0:n(r)}},6031:function(e,t,r){"use strict";r(5575),r(4599)},6033:function(e,t,r){"use strict";r(8523)},6043:function(e,t,r){"use strict";var n=r(9306),i=TypeError,o=function(e){var t,r;this.promise=new e((function(e,n){if(void 0!==t||void 0!==r)throw new i("Bad Promise constructor");t=e,r=n})),this.resolve=n(t),this.reject=n(r)};e.exports.f=function(e){return new o(e)}},6072:function(e,t,r){"use strict";var n=r(4644),i=r(926).right,o=n.aTypedArray;(0,n.exportTypedArrayMethod)("reduceRight",(function(e){var t=arguments.length;return i(o(this),e,t,t>1?arguments[1]:void 0)}))},6080:function(e,t,r){"use strict";var n=r(7476),i=r(9306),o=r(616),s=n(n.bind);e.exports=function(e,t){return i(e),void 0===t?e:o?s(e,t):function(){return e.apply(t,arguments)}}},6098:function(e,t,r){"use strict";var n=r(9504),i=2147483647,o=/[^\0-\u007E]/,s=/[.\u3002\uFF0E\uFF61]/g,a="Overflow: input needs wider integers to process",u=RangeError,c=n(s.exec),l=Math.floor,d=String.fromCharCode,f=n("".charCodeAt),h=n([].join),p=n([].push),v=n("".replace),m=n("".split),_=n("".toLowerCase),g=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))},y=function(e){var t=[];e=function(e){for(var t=[],r=0,n=e.length;r<n;){var i=f(e,r++);if(i>=55296&&i<=56319&&r<n){var o=f(e,r++);56320==(64512&o)?p(t,((1023&i)<<10)+(1023&o)+65536):(p(t,i),r--)}else p(t,i)}return t}(e);var r,n,o=e.length,s=128,c=0,v=72;for(r=0;r<e.length;r++)(n=e[r])<128&&p(t,d(n));var m=t.length,_=m;for(m&&p(t,"-");_<o;){var y=i;for(r=0;r<e.length;r++)(n=e[r])>=s&&n<y&&(y=n);var O=_+1;if(y-s>l((i-c)/O))throw new u(a);for(c+=(y-s)*O,s=y,r=0;r<e.length;r++){if((n=e[r])<s&&++c>i)throw new u(a);if(n===s){for(var T=c,R=36;;){var I=R<=v?1:R>=v+26?26:R-v;if(T<I)break;var S=T-I,C=36-I;p(t,d(g(I+S%C))),T=l(S/C),R+=36}p(t,d(g(T))),v=E(c,O,_===m),c=0,_++}}c++,s++}return h(t,"")};e.exports=function(e){var t,r,n=[],i=m(v(_(e),s,"."),".");for(t=0;t<i.length;t++)r=i[t],p(n,c(o,r)?"xn--"+y(r):r);return h(n,".")}},6099:function(e,t,r){"use strict";var n=r(2140),i=r(6840),o=r(3179);n||i(Object.prototype,"toString",o,{unsafe:!0})},6119:function(e,t,r){"use strict";var n=r(5745),i=r(3392),o=n("keys");e.exports=function(e){return o[e]||(o[e]=i(e))}},6193:function(e,t,r){"use strict";var n=r(4215);e.exports="NODE"===n},6198:function(e,t,r){"use strict";var n=r(8014);e.exports=function(e){return n(e.length)}},6237:function(e,t,r){"use strict";e.exports=u;var n,i=r(3610),o=i.LongBits,s=i.utf8;function a(e,t){return RangeError("index out of range: "+e.pos+" + "+(t||1)+" > "+e.len)}function u(e){this.buf=e,this.pos=0,this.len=e.length}var c,l="undefined"!=typeof Uint8Array?function(e){if(e instanceof Uint8Array||Array.isArray(e))return new u(e);throw Error("illegal buffer")}:function(e){if(Array.isArray(e))return new u(e);throw Error("illegal buffer")},d=function(){return i.Buffer?function(e){return(u.create=function(e){return i.Buffer.isBuffer(e)?new n(e):l(e)})(e)}:l};function f(){var e=new o(0,0),t=0;if(!(this.len-this.pos>4)){for(;t<3;++t){if(this.pos>=this.len)throw a(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 a(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 p(){if(this.pos+8>this.len)throw a(this,8);return new o(h(this.buf,this.pos+=4),h(this.buf,this.pos+=4))}u.create=d(),u.prototype._slice=i.Array.prototype.subarray||i.Array.prototype.slice,u.prototype.uint32=(c=4294967295,function(){if(c=(127&this.buf[this.pos])>>>0,this.buf[this.pos++]<128)return c;if(c=(c|(127&this.buf[this.pos])<<7)>>>0,this.buf[this.pos++]<128)return c;if(c=(c|(127&this.buf[this.pos])<<14)>>>0,this.buf[this.pos++]<128)return c;if(c=(c|(127&this.buf[this.pos])<<21)>>>0,this.buf[this.pos++]<128)return c;if(c=(c|(15&this.buf[this.pos])<<28)>>>0,this.buf[this.pos++]<128)return c;if((this.pos+=5)>this.len)throw this.pos=this.len,a(this,10);return c}),u.prototype.int32=function(){return 0|this.uint32()},u.prototype.sint32=function(){var e=this.uint32();return e>>>1^-(1&e)},u.prototype.bool=function(){return 0!==this.uint32()},u.prototype.fixed32=function(){if(this.pos+4>this.len)throw a(this,4);return h(this.buf,this.pos+=4)},u.prototype.sfixed32=function(){if(this.pos+4>this.len)throw a(this,4);return 0|h(this.buf,this.pos+=4)},u.prototype.float=function(){if(this.pos+4>this.len)throw a(this,4);var e=i.float.readFloatLE(this.buf,this.pos);return this.pos+=4,e},u.prototype.double=function(){if(this.pos+8>this.len)throw a(this,4);var e=i.float.readDoubleLE(this.buf,this.pos);return this.pos+=8,e},u.prototype.bytes=function(){var e=this.uint32(),t=this.pos,r=this.pos+e;if(r>this.len)throw a(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)},u.prototype.string=function(){var e=this.bytes();return s.read(e,0,e.length)},u.prototype.skip=function(e){if("number"==typeof e){if(this.pos+e>this.len)throw a(this,e);this.pos+=e}else do{if(this.pos>=this.len)throw a(this)}while(128&this.buf[this.pos++]);return this},u.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},u._configure=function(e){n=e,u.create=d(),n._configure();var t=i.Long?"toLong":"toNumber";i.merge(u.prototype,{int64:function(){return f.call(this)[t](!1)},uint64:function(){return f.call(this)[t](!0)},sint64:function(){return f.call(this).zzDecode()[t](!1)},fixed64:function(){return p.call(this)[t](!0)},sfixed64:function(){return p.call(this)[t](!1)}})}},6269:function(e){"use strict";e.exports={}},6279:function(e,t,r){"use strict";var n=r(6840);e.exports=function(e,t,r){for(var i in t)n(e,i,t[i],r);return e}},6319:function(e,t,r){"use strict";var n=r(8551),i=r(9539);e.exports=function(e,t,r,o){try{return o?t(n(r)[0],r[1]):t(r)}catch(t){i(e,"throw",t)}}},6346:function(e,t,r){"use strict";var n=r(4576),i=r(9504),o=r(3724),s=r(7811),a=r(350),u=r(6699),c=r(2106),l=r(6279),d=r(9039),f=r(679),h=r(1291),p=r(8014),v=r(7696),m=r(5617),_=r(8490),g=r(2787),E=r(2967),y=r(4373),O=r(7680),T=r(3167),R=r(7740),I=r(687),S=r(1181),C=a.PROPER,b=a.CONFIGURABLE,N="ArrayBuffer",A="DataView",M="prototype",w="Wrong index",L=S.getterFor(N),U=S.getterFor(A),x=S.set,D=n[N],P=D,k=P&&P[M],F=n[A],H=F&&F[M],B=Object.prototype,G=n.Array,W=n.RangeError,j=i(y),q=i([].reverse),K=_.pack,z=_.unpack,V=function(e){return[255&e]},J=function(e){return[255&e,e>>8&255]},Y=function(e){return[255&e,e>>8&255,e>>16&255,e>>24&255]},X=function(e){return e[3]<<24|e[2]<<16|e[1]<<8|e[0]},Q=function(e){return K(m(e),23,4)},$=function(e){return K(e,52,8)},Z=function(e,t,r){c(e[M],t,{configurable:!0,get:function(){return r(this)[t]}})},ee=function(e,t,r,n){var i=U(e),o=v(r),s=!!n;if(o+t>i.byteLength)throw new W(w);var a=i.bytes,u=o+i.byteOffset,c=O(a,u,u+t);return s?c:q(c)},te=function(e,t,r,n,i,o){var s=U(e),a=v(r),u=n(+i),c=!!o;if(a+t>s.byteLength)throw new W(w);for(var l=s.bytes,d=a+s.byteOffset,f=0;f<t;f++)l[d+f]=u[c?f:t-f-1]};if(s){var re=C&&D.name!==N;d((function(){D(1)}))&&d((function(){new D(-1)}))&&!d((function(){return new D,new D(1.5),new D(NaN),1!==D.length||re&&!b}))?re&&b&&u(D,"name",N):((P=function(e){return f(this,k),T(new D(v(e)),this,P)})[M]=k,k.constructor=P,R(P,D)),E&&g(H)!==B&&E(H,B);var ne=new F(new P(2)),ie=i(H.setInt8);ne.setInt8(0,2147483648),ne.setInt8(1,2147483649),!ne.getInt8(0)&&ne.getInt8(1)||l(H,{setInt8:function(e,t){ie(this,e,t<<24>>24)},setUint8:function(e,t){ie(this,e,t<<24>>24)}},{unsafe:!0})}else k=(P=function(e){f(this,k);var t=v(e);x(this,{type:N,bytes:j(G(t),0),byteLength:t}),o||(this.byteLength=t,this.detached=!1)})[M],H=(F=function(e,t,r){f(this,H),f(e,k);var n=L(e),i=n.byteLength,s=h(t);if(s<0||s>i)throw new W("Wrong offset");if(s+(r=void 0===r?i-s:p(r))>i)throw new W("Wrong length");x(this,{type:A,buffer:e,byteLength:r,byteOffset:s,bytes:n.bytes}),o||(this.buffer=e,this.byteLength=r,this.byteOffset=s)})[M],o&&(Z(P,"byteLength",L),Z(F,"buffer",U),Z(F,"byteLength",U),Z(F,"byteOffset",U)),l(H,{getInt8:function(e){return ee(this,1,e)[0]<<24>>24},getUint8:function(e){return ee(this,1,e)[0]},getInt16:function(e){var t=ee(this,2,e,arguments.length>1&&arguments[1]);return(t[1]<<8|t[0])<<16>>16},getUint16:function(e){var t=ee(this,2,e,arguments.length>1&&arguments[1]);return t[1]<<8|t[0]},getInt32:function(e){return X(ee(this,4,e,arguments.length>1&&arguments[1]))},getUint32:function(e){return X(ee(this,4,e,arguments.length>1&&arguments[1]))>>>0},getFloat32:function(e){return z(ee(this,4,e,arguments.length>1&&arguments[1]),23)},getFloat64:function(e){return z(ee(this,8,e,arguments.length>1&&arguments[1]),52)},setInt8:function(e,t){te(this,1,e,V,t)},setUint8:function(e,t){te(this,1,e,V,t)},setInt16:function(e,t){te(this,2,e,J,t,arguments.length>2&&arguments[2])},setUint16:function(e,t){te(this,2,e,J,t,arguments.length>2&&arguments[2])},setInt32:function(e,t){te(this,4,e,Y,t,arguments.length>2&&arguments[2])},setUint32:function(e,t){te(this,4,e,Y,t,arguments.length>2&&arguments[2])},setFloat32:function(e,t){te(this,4,e,Q,t,arguments.length>2&&arguments[2])},setFloat64:function(e,t){te(this,8,e,$,t,arguments.length>2&&arguments[2])}});I(P,N),I(F,A),e.exports={ArrayBuffer:P,DataView:F}},6395:function(e){"use strict";e.exports=!1},6434:function(e,t,r){"use strict";var n=t,i=r(2551);n[".google.protobuf.Any"]={fromObject:function(e){if(e&&e["@type"]){var t=e["@type"].substring(e["@type"].lastIndexOf("/")+1),r=this.lookup(t);if(r){var n="."===e["@type"].charAt(0)?e["@type"].substr(1):e["@type"];return-1===n.indexOf("/")&&(n="/"+n),this.create({type_url:n,value:r.encode(r.fromObject(e)).finish()})}}return this.fromObject(e)},toObject:function(e,t){var r="",n="";if(t&&t.json&&e.type_url&&e.value){n=e.type_url.substring(e.type_url.lastIndexOf("/")+1),r=e.type_url.substring(0,e.type_url.lastIndexOf("/")+1);var o=this.lookup(n);o&&(e=o.decode(e.value))}if(!(e instanceof this.ctor)&&e instanceof i){var s=e.$type.toObject(e,t);return""===r&&(r="type.googleapis.com/"),n=r+("."===e.$type.fullName[0]?e.$type.fullName.substr(1):e.$type.fullName),s["@type"]=n,s}return this.toObject(e,t)}}},6448:function(e,t,r){"use strict";r.d(t,{C:function(){return i}}),r(9089);var n=r(4269),i=function(){function e(e){var t=e.type,r=e.id;this.id=r,this.type=t}return e.prototype.set=function(e){e.file=e.file||e.fileInputId&&n.Wp.getFileUrl(e.fileInputId),this.body={id:this.id,chatType:e.chatType||"singleChat",type:"video",file:e.file,filename:e.filename,length:e.length,file_length:e.file_length,fileInputId:e.fileInputId,to:e.to,from:e.from,roomType:e.roomType,success:e.success,fail:e.fail,ext:e.ext,time:Date.now(),apiUrl:e.apiUrl,onFileUploadError:e.onFileUploadError,onFileUploadComplete:e.onFileUploadComplete,onFileUploadProgress:e.onFileUploadProgress,body:e.body,isChatThread:e.isChatThread}},e.prototype.setChatType=function(e){return!!this.body&&(this.body.chatType=e,!0)},e.prototype.setGroup=function(e){return!!this.body&&(this.body.group=e,!0)},e.create=function(e){return{id:n.Wp.getUniqueId(),chatType:e.chatType||"singleChat",type:"video",file:e.file,filename:e.filename,length:e.length,file_length:e.file_length,fileInputId:e.fileInputId,to:e.to,from:e.from||"",ext:e.ext,time:Date.now(),onFileUploadError:e.onFileUploadError,onFileUploadComplete:e.onFileUploadComplete,onFileUploadProgress:e.onFileUploadProgress,body:e.body,msgConfig:e.msgConfig,isChatThread:e.isChatThread,priority:e.priority,deliverOnlineOnly:e.deliverOnlineOnly,receiverList:e.receiverList,webhookEnv:e.webhookEnv}},e}()},6468:function(e,t,r){"use strict";var n=r(6518),i=r(4576),o=r(9504),s=r(2796),a=r(6840),u=r(3451),c=r(2652),l=r(679),d=r(4901),f=r(4117),h=r(34),p=r(9039),v=r(4428),m=r(687),_=r(3167);e.exports=function(e,t,r){var g=-1!==e.indexOf("Map"),E=-1!==e.indexOf("Weak"),y=g?"set":"add",O=i[e],T=O&&O.prototype,R=O,I={},S=function(e){var t=o(T[e]);a(T,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(s(e,!d(O)||!(E||T.forEach&&!p((function(){(new O).entries().next()})))))R=r.getConstructor(t,e,g,y),u.enable();else if(s(e,!0)){var C=new R,b=C[y](E?{}:-0,1)!==C,N=p((function(){C.has(1)})),A=v((function(e){new O(e)})),M=!E&&p((function(){for(var e=new O,t=5;t--;)e[y](t,t);return!e.has(-0)}));A||((R=t((function(e,t){l(e,T);var r=_(new O,e,R);return f(t)||c(t,r[y],{that:r,AS_ENTRIES:g}),r}))).prototype=T,T.constructor=R),(N||M)&&(S("delete"),S("has"),g&&S("get")),(M||b)&&S(y),E&&T.clear&&delete T.clear}return I[e]=R,n({global:!0,constructor:!0,forced:R!==O},I),m(R,e),E||r.setStrong(R,e,g),R}},6469:function(e,t,r){"use strict";var n=r(8227),i=r(2360),o=r(4913).f,s=n("unscopables"),a=Array.prototype;void 0===a[s]&&o(a,s,{configurable:!0,value:i(null)}),e.exports=function(e){a[s][e]=!0}},6496:function(e,t,r){"use strict";r.d(t,{E:function(){return i}}),r(4346),r(9089);var n=r(4269),i=function(){function e(e){var t=e.type,r=e.id||n.Wp.getUniqueId();this.id=r,this.type=t,this.value=""}return e.prototype.set=function(e){this.body={id:this.id,chatType:e.chatType||"singleChat",type:"txt",to:e.to,msg:e.msg,from:e.from,roomType:e.roomType,success:e.success,fail:e.fail,ext:e.ext,time:Date.now(),isChatThread:e.isChatThread},this.value=e.msg},e.prototype.setChatType=function(e){return!!this.body&&(this.body.chatType=e,!0)},e.prototype.setGroup=function(e){return!!this.body&&(this.body.group=e,!0)},e.create=function(e){var t,r;return(null===(t=e.msgConfig)||void 0===t?void 0:t.languages)&&Array.isArray(null===(r=e.msgConfig)||void 0===r?void 0:r.languages),{type:"txt",id:n.Wp.getUniqueId(),msg:e.msg,to:e.to,from:e.from||"",chatType:e.chatType,ext:e.ext,time:Date.now(),msgConfig:e.msgConfig,isChatThread:e.isChatThread,priority:e.priority,deliverOnlineOnly:e.deliverOnlineOnly,receiverList:e.receiverList,webhookEnv:e.webhookEnv}},e}()},6499:function(e,t,r){"use strict";var n=r(6518),i=r(9565),o=r(9306),s=r(6043),a=r(1103),u=r(2652);n({target:"Promise",stat:!0,forced:r(537)},{all:function(e){var t=this,r=s.f(t),n=r.resolve,c=r.reject,l=a((function(){var r=o(t.resolve),s=[],a=0,l=1;u(e,(function(e){var o=a++,u=!1;l++,i(r,t,e).then((function(e){u||(u=!0,s[o]=e,--l||n(s))}),c)})),--l||n(s)}));return l.error&&c(l.value),r.promise}})},6518:function(e,t,r){"use strict";var n=r(4576),i=r(7347).f,o=r(6699),s=r(6840),a=r(9433),u=r(7740),c=r(2796);e.exports=function(e,t){var r,l,d,f,h,p=e.target,v=e.global,m=e.stat;if(r=v?n:m?n[p]||a(p,{}):n[p]&&n[p].prototype)for(l in t){if(f=t[l],d=e.dontCallGetSet?(h=i(r,l))&&h.value:r[l],!c(v?l:p+(m?".":"#")+l,e.forced)&&void 0!==d){if(typeof f==typeof d)continue;u(f,d)}(e.sham||d&&d.sham)&&o(f,"sham",!0),s(r,l,f,e)}}},6602:function(e,t,r){"use strict";r.d(t,{QR:function(){return s},Rp:function(){return a},b6:function(){return u}}),r(3792),r(4743),r(1745),r(8309),r(6099),r(1489),r(1630),r(2170),r(5044),r(1920),r(1694),r(9955),r(3206),r(4496),r(6651),r(2887),r(9369),r(6812),r(8995),r(1575),r(6072),r(8747),r(8845),r(9423),r(7301),r(373),r(6614),r(1405),r(3684);var n=r(2566),i=r.n(n),o=268435455;function s(e){var t=e;return i().buf(t)>>>0}function a(e){if(e<0)throw new Error("encodeLength: Length must be non-negative");if(e>o)throw new Error("encodeLength: Length exceeds maximum: ".concat(o));if(0===e)return new Uint8Array([0]);for(var t=[],r=e;r>0;){var n=127&r;(r>>>=7)>0&&(n|=128),t.push(n)}return new Uint8Array(t)}function u(e,t){if(t.offset>=e.length)throw new Error("decodeLength: No data to decode: offset beyond data length");for(var r=0,n=0;t.offset<e.length;){var i=e[t.offset];if(t.offset++,r|=(127&i)<<n,!(128&i))return r>>>0;if((n+=7)>=28)throw new Error("decodeLength: Invalid length encoding: exceeds 4 bytes")}throw new Error("decodeLength: Incomplete length encoding: missing terminator byte")}},6614:function(e,t,r){"use strict";var n=r(4644),i=r(8014),o=r(5610),s=n.aTypedArray,a=n.getTypedArrayConstructor;(0,n.exportTypedArrayMethod)("subarray",(function(e,t){var r=s(this),n=r.length,u=o(e,n);return new(a(r))(r.buffer,r.byteOffset+u*r.BYTES_PER_ELEMENT,i((void 0===t?n:o(t,n))-u))}))},6646:function(e,t,r){"use strict";r.d(t,{up:function(){return b},xz:function(){return N}}),r(2675),r(9463),r(2259),r(8706),r(2008),r(113),r(8980),r(1629),r(3418),r(4423),r(5276),r(4346),r(3792),r(2062),r(2712),r(4782),r(5086),r(4554),r(4743),r(1745),r(8309),r(9089),r(739),r(3288),r(4170),r(2010),r(6033),r(2892),r(2637),r(150),r(9085),r(9432),r(6099),r(3362),r(7495),r(8781),r(1699),r(7764),r(1489),r(1630),r(2170),r(5044),r(1920),r(1694),r(9955),r(3206),r(8345),r(4496),r(6651),r(2887),r(9369),r(6812),r(8995),r(1575),r(6072),r(8747),r(8845),r(9423),r(7301),r(373),r(6614),r(1405),r(3684),r(3500),r(2953),r(6031),r(3296),r(7208),r(8408);var n=r(3887),i=r.n(n),o=r(8570),s=r.n(o),a=r(8093),u=r(6834),c=r(1274),l=r(9254),d=r(7120),f=r(7468),h=r(6981),p=r(8579),v=r(4269),m=r(3484),_=r(7968),g=r(9061),E=r(3603),y=r(4331),O=r(4467),T=r(8021),R=r(589),I=r(686),S=r(5732);function C(e){return C="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},C(e)}var b,N,A,M,w=function(){return w=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},w.apply(this,arguments)},L=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function s(e){try{u(n.next(e))}catch(e){o(e)}}function a(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}u((n=n.apply(e,t||[])).next())}))},U=function(e,t){var r,n,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;s;)try{if(r=1,n&&(i=2&o[0]?n.return:o[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,o[1])).done)return i;switch(n=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,n=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],n=0}finally{r=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}},x=new T.A;!function(e){e[e.NORMAL=0]="NORMAL",e[e.SINGLECHAT=1]="SINGLECHAT",e[e.GROUPCHAT=2]="GROUPCHAT",e[e.CHATROOM=3]="CHATROOM",e[e.READ_ACK=4]="READ_ACK",e[e.DELIVER_ACK=5]="DELIVER_ACK",e[e.RECALL=6]="RECALL",e[e.CHANNEL_ACK=7]="CHANNEL_ACK",e[e.EDIT=8]="EDIT"}(b||(b={})),function(e){e[e.BODY=1]="BODY",e[e.BODY_AND_EXT=2]="BODY_AND_EXT"}(N||(N={})),function(e){e[e.APNs=0]="APNs",e[e.FCM=1]="FCM",e[e.HMSPUSH=2]="HMSPUSH",e[e.MIPUSH=3]="MIPUSH",e[e.MEIZUPUSH=4]="MEIZUPUSH",e[e.VIVOPUSH=5]="VIVOPUSH",e[e.OPPOPUSH=6]="OPPOPUSH",e[e.HONORPUSH=7]="HONORPUSH"}(A||(A={})),function(e){e[e.OK=0]="OK",e[e.FAIL=1]="FAIL",e[e.UNAUTHORIZED=2]="UNAUTHORIZED",e[e.MISSING_PARAMETER=3]="MISSING_PARAMETER",e[e.WRONG_PARAMETER=4]="WRONG_PARAMETER",e[e.REDIRECT=5]="REDIRECT",e[e.TOKEN_EXPIRED=6]="TOKEN_EXPIRED",e[e.PERMISSION_DENIED=7]="PERMISSION_DENIED",e[e.NO_ROUTE=8]="NO_ROUTE",e[e.UNKNOWN_COMMAND=9]="UNKNOWN_COMMAND",e[e.PB_PARSER_ERROR=10]="PB_PARSER_ERROR",e[e.BIND_ANOTHER_DEVICE=11]="BIND_ANOTHER_DEVICE",e[e.IM_FORBIDDEN=12]="IM_FORBIDDEN",e[e.TOO_MANY_DEVICES=13]="TOO_MANY_DEVICES",e[e.PLATFORM_LIMIT=14]="PLATFORM_LIMIT",e[e.USER_MUTED=15]="USER_MUTED",e[e.ENCRYPT_DISABLE=16]="ENCRYPT_DISABLE",e[e.ENCRYPT_ENABLE=17]="ENCRYPT_ENABLE",e[e.DECRYPT_FAILURE=18]="DECRYPT_FAILURE",e[e.PERMISSION_DENIED_EXTERNAL=19]="PERMISSION_DENIED_EXTERNAL",e[e.RESOURCE_CHANGED=20]="RESOURCE_CHANGED"}(M||(M={}));var D=["txt","img","video","audio","file","loc","custom","cmd","combine"],P=v.Wp.getEnvInfo();function k(){var e="webim",t="",r="",n=(new Date).valueOf(),i=v.Wp.getDevicePlatform(P);if(this.isFixedDeviceId){var o=v.Wp.getLocalDeviceInfo();if(o){var s=JSON.parse(o);e=s.deviceId,t=s.deviceName,r=s.deviceUuid,void 0!==this.customOSPlatform&&(t=this.deviceId,e="custom".concat(this.customOSPlatform,"_").concat(r))}else"webim"===this.deviceId?(r="".concat(i,"_").concat(n.toString()),e="".concat(this.deviceId,"_").concat(r),t=this.deviceId,void 0!==this.customOSPlatform&&(e="custom".concat(this.customOSPlatform,"_").concat(r))):(e=t=r="webim_".concat(i,"_").concat(this.deviceId),void 0!==this.customOSPlatform&&(r="".concat(i,"_").concat(n.toString()),t=this.deviceId,e="custom".concat(this.customOSPlatform,"_").concat(r))),v.Wp.setLocalDeviceInfo(JSON.stringify({deviceId:e,deviceName:t,deviceUuid:r}))}else"webim"===this.deviceId?(r="random_".concat(i,"_").concat(n.toString()),e="".concat(this.deviceId,"_").concat(r),t=this.deviceId):e=t=r="webim_".concat(i,"_").concat(this.deviceId),void 0!==this.customOSPlatform&&(r="random_".concat(i,"_").concat(n.toString()),t=this.deviceId,e="custom".concat(this.customOSPlatform,"_").concat(r));return{deviceId:e,deviceName:t,deviceUuid:r,devicePlatform:i}}function F(){var e,t,r,n,i=k.call(this),o=i.deviceId,s=i.deviceName,a=i.deviceUuid,u=i.devicePlatform,c=[];this.context.jid&&(this.context.jid.clientResource=o),this._compressor&&(0,O.Dz)(this._compressor,O.eB.NONE);var l=this.root.lookup("easemob.pb.Provision"),d=u===v.i9.UNI,f=!this.logOut,h=l.decode(c);if(void 0!==this.customOSPlatform&&(h.osCustomValue=this.customOSPlatform,this.osType=5),h.compressType=this.compressType,h.encryptType=this.encryptType,h.osType=this.osType,h.version=this.version,h.deviceName=s,h.resource=o,h.deviceUuid=a,h.authToken='{"token":"$t$'+this.token+'"}',h.sessionId=Date.now().toString()+":",d){var p=!this.isAutoLogin;f&&(p=!1),_.vF.debug("isManualLogin",p),h.isManualLogin=p}var m=this._compressorFailureCount>=1?[]:[O.dc.COMPRESS_LZ4];h.protocolCompressType=m,this.sessionId=h.sessionId,this.loginInfoCustomExt&&(h.reason=this.loginInfoCustomExt),_.vF.info("provision info",{version:this.version,resource:o,isFixedDeviceId:this.isFixedDeviceId,loginInfoCustomExt:!!this.loginInfoCustomExt,token:(null===(t=null===(e=this.token)||void 0===e?void 0:e.slice)||void 0===t?void 0:t.call(e,0,10))+"...",userId:null===(n=null===(r=this.context)||void 0===r?void 0:r.jid)||void 0===n?void 0:n.name}),h.actionVersion="v5.2",h=l.encode(h).finish();var g=this.root.lookup("easemob.pb.MSync"),E=g.decode(c);return E.version=this.version,E.guid=this.context.jid,E.command=3,E.deviceId=s,E.serviceId=this.dataReport.getServiceId(),E.encryptType=this.encryptType,E.payload=h,E.traceId=x.gen(),g.encode(E).finish()}function H(e){var t=[],r=this.root.lookup("easemob.pb.Logout"),n=r.decode(t);n.sessionId=this.sessionId,n.reason=e,n=r.encode(n).finish();var i=this.root.lookup("easemob.pb.MSync"),o=i.decode(t);return o.version=this.version,o.guid=this.context.jid,o.auth="$t$"+this.token,o.command=4,o.deviceId=this.deviceId||"webim",o.serviceId=this.dataReport.getServiceId(),o.encryptType=this.encryptType,o.payload=n,o.traceId=x.gen(),_.vF.debug("traceId",o.traceId),i.encode(o).finish()}function B(e,t){var r=this,n=v.Wp.getEnvInfo();if("zfb"===n.platform||"dd"===n.platform){for(var o="",s=0;s<e.length;s++)o+=String.fromCharCode(e[s]);return{data:o=i().btoa(o),isBuffer:!1,complete:function(){},fail:function(e){"sendSocketMessage:fail taskID not exist"!==e.errMsg&&"SocketTast.send:fail SocketTask.readyState is not OPEN"!==e.errMsg||(_.vF.error("send message fail and reconnect"),r.reconnecting||r.reconnect()),t&&r._msgHash&&r._msgHash[t]&&r._msgHash[t].fail({id:t})}}}var a=e;return{data:a.buffer.slice(a.byteOffset,a.byteOffset+a.byteLength),fail:function(e){"sendSocketMessage:fail taskID not exist"!==e.errMsg&&"SocketTast.send:fail SocketTask.readyState is not OPEN"!==e.errMsg||r.reconnecting||r.reconnect(),t&&r._msgHash&&r._msgHash[t]&&r._msgHash[t].fail({id:t})}}}function G(e,t){var r;return L(this,void 0,void 0,(function(){var n,i,o,a,c;return U(this,(function(l){switch(l.label){case 0:for(_.vF.debug("metas length: ",e.length),n=[],i=0;i<e.length;i++)switch(o=e[i],new(s())(o.id.low,o.id.high,o.id.unsigned).toString(),o.ns){case 0:u.$b.call(this,o);break;case 1:n.push(u.yH.call(this,o,t,!1,!0,!0));break;case 2:u.PM.call(this,o);break;case 3:u.u0.handleRosterMsg.call(this,o);break;case 4:this.registerConfrIQHandler&&this.registerConfrIQHandler(o,t,this);break;case 5:u.CD.call(this,o);break;default:_.vF.error("distributeMeta",o)}return[4,Promise.all(n)];case 1:return a=l.sent(),(c=a.filter((function(e){return e&&"cmd"!==e.type}))).length>0&&(null===(r=this.eventHandler)||void 0===r||r.dispatch("onMessage",c)),[2]}}))}))}function W(e,t){G.call(this,e,t)}function j(e){var t,r=this;de.clear(),this._offlineMessagePullState===f.P.SYNC_INIT&&(this._offlineMessagePullState=f.P.SYNC_START,this._offlineMessagePullQueue=e.unread.reduce((function(e,t,n){return e.find((function(e){return e.name===t.queue.name}))||e.push(t),r.pullOfflineMessageInfo.pullCount+=t.n,e}),[]),this.pullOfflineMessageInfo.startTime=Date.now(),this._offlineMessageRpt=this.dataReport.geOperateFun({operationName:E.jz.MSYNC_SYNCOFFLINEMESSAGE}),null===(t=this.eventHandler)||void 0===t||t.dispatch("onOfflineMessageSyncStart"))}function q(e){var t;if(this._offlineMessagePullState===f.P.SYNC_START){var r=this._offlineMessagePullQueue.findIndex((function(t){return t.queue.name===e.queue.name}));if(r>-1){this._offlineMessagePullQueue.splice(r,1);var n=de.get(e.queue.name)||0;n>0&&this._offlineMessageRpt({isEndApi:!1,data:{isSuccess:1,requestName:E.jz.MSYNC_SYNCOFFLINEMESSAGE,requestMethod:"WEBSOCKET",requestUrl:this.url,code:E.G8.success,resultCount:n,requestElapse:Date.now()-this.pullOfflineMessageInfo.startTime}})}0===this._offlineMessagePullQueue.length&&(this._offlineMessagePullState=f.P.SYNC_FINISH,null===(t=this.eventHandler)||void 0===t||t.dispatch("onOfflineMessageSyncFinish"),this._offlineMessageRpt({data:{isLastApi:1,isSuccess:1,requestName:E.jz.MSYNC_SYNCOFFLINEMESSAGE,requestMethod:"WEBSOCKET",requestUrl:this.url,code:E.G8.success,resultCount:this.pullOfflineMessageInfo.pullCount}}),de.clear())}}function K(e){var t=this.root.lookup("easemob.pb.CommUnreadDL");t=t.decode(e.payload);var r=new(s())(t.timestamp.low,t.timestamp.high,t.timestamp.unsigned).toString();if(this.expirationTime&&this.compareTokenExpireTime(Number(r),this.expirationTime),0===t.unread.length)re.call(this);else{j.call(this,t),_.vF.debug("pull unread message",t.unread);for(var n=0;n<t.unread.length;n++)J.call(this,t.unread[n].queue)}re.call(this)}function z(){var e=[],t=this.root.lookup("easemob.pb.StatisticsBody"),r=t.decode(e);r.operation=0,r=t.encode(r).finish();var n=this.root.lookup("easemob.pb.Meta").decode(e);n.id=(new Date).valueOf(),n.ns=0,n.payload=r;var i=this.root.lookup("easemob.pb.CommSyncUL"),o=i.decode(e);o.meta=n,o=i.encode(o).finish();var s=this.root.lookup("easemob.pb.MSync"),a=s.decode(e);return a.version=this.version,a.encryptType=[0],a.command=0,a.payload=o,a.traceId=x.gen(),_.vF.debug("traceId",a.traceId),s.encode(a).finish()}function V(e){var t=[],r=this.root.lookup("easemob.pb.CommSyncUL"),n=r.decode(t);n.queue=e,n=r.encode(n).finish();var i=this.root.lookup("easemob.pb.MSync"),o=i.decode(t);return o.version=this.version,o.encryptType=this.encryptType,o.command=0,o.payload=n,o.traceId=x.gen(),_.vF.debug("traceId",o.traceId),i.encode(o).finish()}function J(e){_.vF.debug("sendBackqueue",e);var t=V.call(this,e);Oe.call(this,t)}function Y(e,t){var r=[],n=this.root.lookup("easemob.pb.CommSyncUL"),i=n.decode(r);i.queue=t,i.key=new(s())(e.low,e.high,e.unsigned).toString(),i=n.encode(i).finish();var o=this.root.lookup("easemob.pb.MSync"),a=o.decode(r);return a.version=this.version,a.encryptType=this.encryptType,a.command=0,a.payload=i,a.traceId=x.gen(),_.vF.debug("traceId",a.traceId),o.encode(a).finish()}function X(){var e=this;this.uniPush&&!1===this.isRegisterPush&&(this.isRegisterPush=!0,this.uniPush.onRegister((function(t){_.vF.debug("push token onRegister");var r=e.uniPushConfig||{},n=r.APNsCertificateName,i=void 0===n?"":n,o=r.HMSCertificateName,s=void 0===o?"":o,a=r.HONORCertificateName,u=void 0===a?"":a,c=r.MEIZUCertificateName,l=void 0===c?"":c,d=r.MICertificateName,f=void 0===d?"":d,p=r.OPPOCertificateName,v=void 0===p?"":p,m=r.VIVOCertificateName,g=void 0===m?"":m,E=r.FCMCertificateName,y=void 0===E?"":E;switch(t.push_type){case A.APNs:e.pushCertificateName=i;break;case A.FCM:e.pushCertificateName=y;break;case A.HMSPUSH:e.pushCertificateName=s;break;case A.HONORPUSH:e.pushCertificateName=u;break;case A.MEIZUPUSH:e.pushCertificateName=l;break;case A.MIPUSH:e.pushCertificateName=f;break;case A.OPPOPUSH:e.pushCertificateName=v;break;case A.VIVOPUSH:e.pushCertificateName=g;break;default:_.vF.error("unexpected push type",t.push_type)}e.pushCertificateName&&t.push_token&&h.B.call(e,{deviceId:e.clientResource,deviceToken:t.push_token,notifierName:e.pushCertificateName}).then((function(){_.vF.debug("uploadPushToken success")})).catch((function(e){_.vF.debug("uploadPushToken failed",e)}))})))}function Q(){var e;this._offlineMessagePullState=f.P.SYNC_INIT,this._offlineMessagePullQueue=[],this.times=1,this.autoReconnectNumTotal=0,this.onOpened&&this.onOpened(),X.call(this),null===(e=this.eventHandler)||void 0===e||e.dispatch("onConnected"),te.call(this),ie.call(this),ne.call(this),re.call(this),this.pullOfflineMessageInfo={pullCount:0,startTime:0}}function $(e,t){_.vF.debug("sendLastSession",e);var r=Y.call(this,e,t);Oe.call(this,r)}function Z(e){var t,r,n,i,o,s,u,c,f,h,p,v,g,E,y,T,R,I,S=this,C=this.root.lookup("easemob.pb.Provision").decode(e.payload);if(this.context.jid&&(this.context.jid.clientResource=C.resource),this.clientResource=C.resource,this.provisionTimer&&clearTimeout(this.provisionTimer),_.vF.debug("provision status",C.status),this._isLogging=!1,C.status.errorCode===M.OK){if(this.disconnectedReason=void 0,C.authToken){var b=JSON.parse(C.authToken).expires_in;if(!this.tokenExpiredTimer&&!this.tokenWillExpireTimer){var N=Date.now();this.expirationTime=b;var A=this.expirationTime-N;this.expiresIn=A<0?0:A,this.tokenExpireTimeCountDown(this.expiresIn)}}var x=C.protocolCompressType,D=C.protocolCompressDirection;if(_.vF.debug("protocol compress types",x),_.vF.debug("protocol compress direction",D),x.length>0&&x[0]===O.dc.COMPRESS_LZ4){var P=null!=D?D:O.eB.NONE;this._compressor?(0,O.Dz)(this._compressor,P):this._compressor=(0,O.kO)(P)}this.reconnecting=!1,this.logOut=!1,this.needSetReadyState&&(this.sock=w(w({},this.sock),{close:this.sock.close,send:this.sock.send,readyState:1})),this._localCache?(null===(t=this._localCache)||void 0===t?void 0:t.getInstance())?Q.call(this):this._localCache&&new this._localCache({user:this.user,dbName:"cache_".concat(Math.abs((0,l.s5)(this.appKey||this.appId)),"_").concat(this.user),version:d.G,onInit:function(){return L(S,void 0,void 0,(function(){return U(this,(function(e){return _.vF.debug("localCache init success"),Q.call(this),[2]}))}))}}):Q.call(this),null===(r=this.connectionResolve)||void 0===r||r.call(this)}else{var k=void 0,F=C.status,H=F.reason,B=F.errorCode;switch(_.vF.error("provision errorCode: ",B),_.vF.error("provision reason: ",H),B){case M.FAIL:k="Sorry, user register limit"===H?m.A.create({type:a.C.MAX_LIMIT,message:"Sorry, the number of user registrations limit has been reached"}):"Sorry, user register rate limit"===H?m.A.create({type:a.C.MAX_LIMIT,message:"Sorry, user register rate limit"}):"Sorry, token expired"===H?m.A.create({type:a.C.WEBIM_TOKEN_EXPIRED,message:"Sorry, token expired"}):"Sorry, token or password does not match login info"===H?m.A.create({type:a.C.WEBIM_CONNCTION_TOKEN_NOT_ASSIGN_ERROR,message:"INVALID_TOKEN"}):"Sorry, user not found"===H?m.A.create({type:a.C.USER_NOT_FOUND,message:"User not found"}):m.A.create({type:a.C.WEBIM_CONNCTION_AUTH_ERROR,message:"Auth failed"}),null===(n=this.connectionReject)||void 0===n||n.call(this,k),null===(i=this.eventHandler)||void 0===i||i.dispatch("onError",k);break;case M.WRONG_PARAMETER:k=m.A.create({type:a.C.REQUEST_PARAMETER_ERROR,message:"Invalid parameter"}),null===(o=this.connectionReject)||void 0===o||o.call(this,k),null===(s=this.eventHandler)||void 0===s||s.dispatch("onError",k);break;case M.UNAUTHORIZED:k=m.A.create({type:a.C.WEBIM_CONNCTION_AUTH_ERROR,message:"Auth failed"}),null===(u=this.connectionReject)||void 0===u||u.call(this,k),null===(c=this.eventHandler)||void 0===c||c.dispatch("onError",k);break;case M.IM_FORBIDDEN:k=m.A.create({type:a.C.WEBIM_SERVER_SERVING_DISABLED,message:"Server serving disabled."}),null===(f=this.connectionReject)||void 0===f||f.call(this,k),null===(h=this.eventHandler)||void 0===h||h.dispatch("onError",k);break;case M.PERMISSION_DENIED:k="Sorry, the app month live count limit"===H?m.A.create({type:a.C.MAX_LIMIT,message:"Sorry, the monthly active user limit for this app has been reached"}):"Sorry, the app day live count limit"===H?m.A.create({type:a.C.MAX_LIMIT,message:"Sorry, the daily active user limit for this app has been reached"}):"Sorry, the app online count limit"===H?m.A.create({type:a.C.MAX_LIMIT,message:"Sorry, the maximum number limit of online users for this app has been reached"}):m.A.create({type:a.C.WEBIM_CONNCTION_AUTH_ERROR,message:"Auth failed"}),null===(p=this.connectionReject)||void 0===p||p.call(this,k),null===(v=this.eventHandler)||void 0===v||v.dispatch("onError",k);break;case M.TOO_MANY_DEVICES:k=m.A.create({type:a.C.USER_LOGIN_TOO_MANY_DEVICES,message:"the number of devices the user is logged in to exceeds the limit"}),null===(g=this.connectionReject)||void 0===g||g.call(this,k),null===(E=this.eventHandler)||void 0===E||E.dispatch("onError",k);break;case M.RESOURCE_CHANGED:k=m.A.create({type:a.C.USER_DEVICE_CHANGED,message:"user device is changed"}),null===(y=this.connectionReject)||void 0===y||y.call(this,k),null===(T=this.eventHandler)||void 0===T||T.dispatch("onError",k);break;default:k=m.A.create({type:a.C.WEBIM_CONNCTION_AUTH_ERROR,message:H}),null===(R=this.connectionReject)||void 0===R||R.call(this,k),null===(I=this.eventHandler)||void 0===I||I.dispatch("onError",k)}this.disconnectedReason=k}}function ee(e){var t=this.root.lookup("easemob.pb.Logout").decode(e.payload);_.vF.debug("receiveLogoutResult",t)}function te(){var e,t;if((null===(e=this.unMSyncSendMsgMap)||void 0===e?void 0:e.size)>0){for(var r=Array.from(this.unMSyncSendMsgMap.keys()),n=0;n<r.length;n++){var i=this.unMSyncSendMsgMap.get(r[n]);Oe.call(this,i,r[n])}null===(t=this.unMSyncSendMsgMap)||void 0===t||t.clear()}}function re(){var e=z.call(this);Oe.call(this,e)}function ne(){_.vF.debug("sendUnreadDeal");var e=se.call(this);Oe.call(this,e)}function ie(){var e=this;oe.call(this),this.heartBeatID=setInterval((function(){(Date.now()-e.lastHeartbeat)/1e3>=30&&(_.vF.debug("send heart beat"),ne.call(e),e.lastHeartbeat=Date.now())}),this.heartBeatWait)}function oe(){clearInterval(this.heartBeatID)}function se(){var e=this.root.lookup("easemob.pb.MSync"),t=e.decode([]);return t.version=this.version,t.encryptType=this.encryptType,t.command=1,t.traceId=x.gen(),_.vF.debug("traceId",t.traceId),e.encode(t).finish()}function ae(e,t){return e.some((function(e){return e.name===t.name}))}function ue(e){var t=this.root.lookup("easemob.pb.CommNotice").decode(e.payload),r=ae(this._queues,t.queue);_.vF.debug("receive notice",t.queue,r),r||this.clientResource===t.queue.clientResource&&t.queue.name===this.context.userId||(this._queues.push(t.queue),1===this._queues.length&&J.call(this,t.queue))}function ce(e){return L(this,void 0,void 0,(function(){var t,r,n,o,s,a,u,c,l;return U(this,(function(d){t=v.Wp.getEnvInfo(),r=this.root.lookup("easemob.pb.MSync"),n=e,"zfb"!==t.platform&&"dd"!==t.platform||(o=i().atob(e.data),s=Array.from(o,(function(e,t){return o.charCodeAt(t)})),n=w(w({},e),{data:new Uint8Array(s)}));try{return a=R.V.call(this,n),u=a[0],a[1]?(c="miniCore"===this.name||"web"===t.platform,l=c?new Uint8Array(u.data):u.data,[2,r.decode(l)]):[2,void 0]}catch(e){throw new Error("decode message fail.")}}))}))}function le(e){var t=this;this.lastHeartbeat=Date.now(),this.probingTimer&&clearTimeout(this.probingTimer),e.then((function(e){if(e)switch(e.command){case 0:fe.call(t,e);break;case 1:K.call(t,e);break;case 2:ue.call(t,e);break;case 3:Z.call(t,e);break;case 4:ee.call(t,e);break;default:_.vF.error("unexpected msync command: ".concat(e.command))}else _.vF.error("unexpected msync result: ".concat(e))}))}var de=new Map;function fe(e){var t,r,n,i,o,l,d,h,y,O,T,R,I,S,C,b,N,A,M,x,D,P,k,F,H,B,G,j,K,z,V,Y,X,Q,Z,ee,te,re,ne,ie,oe,se,ae,ue,ce,le,fe,he,pe,ve,me,_e,ge,Ee,ye,Oe,Te;return L(this,void 0,void 0,(function(){var L,Re,Ie,Se,Ce,be,Ne,Ae,Me,we,Le,Ue,xe,De,Pe,ke,Fe,He,Be,Ge,We,je,qe,Ke,ze,Ve,Je,Ye,Xe,Qe,$e,Ze,et,tt,rt,nt,it,ot,st,at,ut,ct,lt,dt,ft,ht,pt,vt=this;return U(this,(function(U){switch(U.label){case 0:if(L=(L=this.root.lookup("easemob.pb.CommSyncDL")).decode(e.payload),Re=new(s())(L.serverId.low,L.serverId.high,L.serverId.unsigned).toString(),Ie=new(s())(L.metaId.low,L.metaId.high,L.metaId.unsigned).toString(),!(Number(Ie)>0))return[3,23];if(clearTimeout(null===(t=this._msgHash[Ie])||void 0===t?void 0:t.messageTimer),!L.status)return[3,22];if(0!==L.status.errorCode)return[3,21];if(null==(Se=this._msgHash[Ie])?void 0:Se.isHandleChatroom){try{if(Ce="join"===(null===(r=this._msgHash[Ie])||void 0===r?void 0:r.operation)){be={};try{L.metas.length>0&&(Ne=this.root.lookup("easemob.pb.MUCBody"),Ae=Ne.decode(L.metas[0].payload),(Me=JSON.parse(Ae.status.chatroomInfo||"{}")[this.user])&&(be={isAllMembersMuted:Me.is_all_mute,createTimestamp:Me.create_timestamp,isInAllowlist:Me.is_in_white_list,memberCount:Me.member_count,muteExpireTimestamp:Me.mute_duration?Me.mute_duration:-1}))}catch(e){_.vF.error("decode chat room info error",e)}(null===(n=this._msgHash[Ie])||void 0===n?void 0:n.resolve)instanceof Function&&this._msgHash[Ie].resolve({type:0,data:{action:"apply",id:this._msgHash[Ie].roomId,result:!0,user:this.context.userId,info:be}}),(null===(i=this._msgHash[Ie])||void 0===i?void 0:i.success)instanceof Function&&this._msgHash[Ie].success({type:0,data:{action:"apply",id:this._msgHash[Ie].roomId,result:!0,user:this.context.userId,info:be}})}(null===(o=this._msgHash[Ie])||void 0===o?void 0:o.resolve)instanceof Function&&!Ce&&this._msgHash[Ie].resolve({type:0,data:{result:!0}}),(null===(l=this._msgHash[Ie])||void 0===l?void 0:l.success)instanceof Function&&!Ce&&this._msgHash[Ie].success({type:0,data:{result:!0}}),g.Xp.has(Ie)&&(we=g.Xp.get(Ie),st=we.rpt,at=we.requestName,st({isEndApi:!0,data:{isSuccess:1,requestName:at,requestMethod:"WEBSOCKET",requestUrl:this.url,code:E.G8.success}}),g.Xp.delete(Ie))}catch(e){g.Xp.has(Ie)&&(Le=g.Xp.get(Ie),st=Le.rpt,at=Le.requestName,st({isEndApi:!0,data:{isSuccess:0,requestName:at,requestMethod:"WEBSOCKET",requestUrl:this.url,code:E.G8.failed,codeDesc:"when executing success function error"}}),g.Xp.delete(Ie)),ct=m.A.create({type:a.C.WEBIM_CONNCTION_CALLBACK_INNER_ERROR,message:"when executing success function error",data:e}),this.onError&&this.onError(ct),null===(d=this.eventHandler)||void 0===d||d.dispatch("onError",ct)}delete this._msgHash[Ie]}return!Se||Se.isHandleChatroom?[3,20]:(Ue=null,xe="",De=0,Pe="",ke=null,this._msgHash[Ie].thirdMessage?(this._msgHash[Ie].thirdMessage.id=L.serverId,this._msgHash[Ie].thirdMessage.timestamp=L.timestamp,[4,u.yH.call(this,this._msgHash[Ie].thirdMessage,L.status,!0,!0)]):[3,2]);case 1:ke=U.sent(),U.label=2;case 2:if(0===L.metas.length)return[3,13];U.label=3;case 3:switch(U.trys.push([3,12,,13]),Fe=L.metas[0],He=L.status,Fe.ns){case 1:return[3,4];case 5:return[3,9]}return[3,10];case 4:return this.useReplacedMessageContents?[4,u.yH.call(this,Fe,He,!0,!0)]:[3,8];case 5:return ke=U.sent(),[4,null===(y=null===(h=this._localCache)||void 0===h?void 0:h.getInstance())||void 0===y?void 0:y.getMessageByServerMsgId(Ie)];case 6:return(Be=U.sent())?[4,null===(T=null===(O=this._localCache)||void 0===O?void 0:O.getInstance())||void 0===T?void 0:T.putMessageToDB(w(w(w({},Be),ke),{id:Ie}))]:[3,8];case 7:U.sent(),U.label=8;case 8:return[3,11];case 9:return(Ge=v.Wp.parseNotify(L.metas[0].payload)).edit_msg&&(We=Ge.edit_msg,je=We.count,qe=We.operator,Ke=We.edit_time,ze=We.sender,Ve=We.send_time,Je=We.chat_type,Ue={operationTime:Ke,operatorId:qe,operationCount:je},xe=ze,De=Number(Ve),Pe=p.Q[Je]),[3,11];case 10:return _.vF.error("decode local meta error",Fe),[3,11];case 11:return[3,13];case 12:return Ye=U.sent(),ct=m.A.create({type:a.C.WEBIM_LOAD_MSG_ERROR,message:"decode local meta message error",data:Ye}),this.onError&&this.onError(ct),null===(R=this.eventHandler)||void 0===R||R.dispatch("onError",ct),[3,13];case 13:g.nf.has(Ie)&&(g.nf.get(Ie).rpt({isEndApi:!0,data:{isSuccess:1,requestMethod:"WEBSOCKET",requestUrl:this.url,code:E.G8.success,msgId:Re,messageType:null!==(I=E.He[null==ke?void 0:ke.chatType])&&void 0!==I?I:E.He.singleChat}}),g.nf.delete(Ie)),U.label=14;case 14:return U.trys.push([14,18,,19]),Xe={localMsgId:Ie,serverMsgId:Re},Ue&&(Qe=this._msgHash[Ie],$e=Qe.editMessageId,Ze=Qe.ext,et=Qe.customExts,tt=Qe.customEvent,ke.modifiedInfo=Ue,ke.from=xe,ke.time=Number(De),ke.chatType=Pe,ke.id=$e,null===(b=null===(C=null===(S=this._localCache)||void 0===S?void 0:S.getInstance())||void 0===C?void 0:C.getMessageByServerMsgId($e))||void 0===b||b.then((function(e){var t,r,n,i,o,s;e&&("txt"===e.type?null===(r=null===(t=vt._localCache)||void 0===t?void 0:t.getInstance())||void 0===r||r.putMessageToDB(w(w({},e),{msg:ke.msg,modifiedInfo:ke.modifiedInfo,translations:ke.translations,ext:Ze?ke.ext:e.ext})):"custom"===e.type?null===(i=null===(n=vt._localCache)||void 0===n?void 0:n.getInstance())||void 0===i||i.putMessageToDB(w(w({},e),{ext:Ze?ke.ext:e.ext,customExts:et,customEvent:tt,modifiedInfo:ke.modifiedInfo})):null===(s=null===(o=vt._localCache)||void 0===o?void 0:o.getInstance())||void 0===s||s.putMessageToDB(w(w({},e),{ext:Ze?ke.ext:e.ext,modifiedInfo:ke.modifiedInfo})))}))),ke&&(Ue?("txt"===ke.type&&(Xe.message=ke),Xe.modifiedInfo=Ue):Xe.message=ke),[4,null===(A=null===(N=this._localCache)||void 0===N?void 0:N.getInstance())||void 0===A?void 0:A.updateLocalMessage(Ie,{serverMsgId:Re,status:c.q.SUCCESS})];case 15:return U.sent(),(null===(M=this._msgHash[Ie])||void 0===M?void 0:M.success)instanceof Function?[4,this._msgHash[Ie].success(Ie,Re)]:[3,17];case 16:U.sent(),U.label=17;case 17:return(null===(x=this._msgHash[Ie])||void 0===x?void 0:x.resolve)instanceof Function&&this._msgHash[Ie].resolve(Xe),[3,19];case 18:return rt=U.sent(),ct=m.A.create({type:a.C.WEBIM_CONNCTION_CALLBACK_INNER_ERROR,message:"when executing success function error",data:rt}),this.onError&&this.onError(ct),null===(D=this.eventHandler)||void 0===D||D.dispatch("onError",ct),[3,19];case 19:this.onReceivedMessage&&this.onReceivedMessage({id:Ie,mid:Re,to:this._msgHash[Ie].to,time:0}),null===(P=this.eventHandler)||void 0===P||P.dispatch("onReceivedMessage",{id:Ie,mid:Re,to:this._msgHash[Ie].to}),delete this._msgHash[Ie],U.label=20;case 20:return[3,22];case 21:if(15===L.status.errorCode)(null===(k=this._msgHash[Ie])||void 0===k?void 0:k.fail)instanceof Function&&this._msgHash[Ie].fail({type:a.C.SERVICE_NOT_ALLOW_MESSAGING_MUTE,reason:"you were muted"}),this._msgHash[Ie].reject instanceof Function&&this._msgHash[Ie].reject({type:a.C.SERVICE_NOT_ALLOW_MESSAGING_MUTE,reason:"you were muted"}),null===(H=null===(F=this._localCache)||void 0===F?void 0:F.getInstance())||void 0===H||H.updateLocalMessage(Ie,{serverMsgId:Re,status:c.q.FAIL});else if(1===L.status.errorCode){switch(nt=void 0,L.status.reason){case"blocked":nt=a.C.PERMISSION_DENIED;break;case"group not found":nt=a.C.GROUP_NOT_EXIST;break;case"not in group or chatroom":nt=a.C.GROUP_NOT_JOINED;break;case"exceed recall time limit":nt=a.C.MESSAGE_RECALL_TIME_LIMIT;break;case"message recall disabled":nt=a.C.SERVICE_NOT_ENABLED;break;case"not in group or chatroom white list":nt=a.C.SERVICE_NOT_ALLOW_MESSAGING;break;case"nonroster":nt=a.C.USER_NOT_FRIEND,L.status.reason="not contact";break;case"group is disabled":nt=a.C.GROUP_IS_DISABLED,L.status.reason="group is disabled";break;case"limit directed users":nt=a.C.MAX_LIMIT;break;case"Sorry, edit limit reached":nt=a.C.MAX_LIMIT,L.status.reason="Modify message limit reached";break;case"Sorry, message does not exist":nt=a.C.MODIFY_MESSAGE_NOT_EXIST,L.status.reason="The message does not exist.";break;case"Sorry, You do not have permission":nt=a.C.PERMISSION_DENIED,L.status.reason="You do not have the modified permission.";break;case"Sorry, format is incorrect":nt=a.C.MODIFY_MESSAGE_FORMAT_ERROR,L.status.reason="The modify messaged format error.";break;case"Sorry, edit is not available":nt=a.C.SERVICE_NOT_ENABLED,L.status.reason="The message modify function is not activated.";break;case"Sorry, edit fail":nt=a.C.MODIFY_MESSAGE_FAILED,L.status.reason="Modify message failed.";break;default:L.status.reason.includes("grpID")&&L.status.reason.includes("does not exist!")?(nt=a.C.CHATROOM_NOT_EXIST,L.status.reason="The chat room dose not exist."):L.status.reason.includes("username")&&L.status.reason.includes("doesn't exist!")?nt=a.C.USER_NOT_FOUND:"group member list is full!"===L.status.reason?nt=a.C.CHATROOM_MEMBERS_FULL:L.status.reason.includes("can not join this group")&&L.status.reason.includes("is in the blacklist")?(nt=a.C.PERMISSION_DENIED,L.status.reason="permission denied"):"can not operate this group, reason: group is disabled"===L.status.reason?nt=a.C.GROUP_IS_DISABLED:L.status.reason.includes("moderation")?nt=a.C.MESSAGE_MODERATION_BLOCKED:L.status.reason.includes("group ID illegal, please check it")?(nt=a.C.REQUEST_PARAMETER_ERROR,L.status.reason="Invalid parameter"):nt=L.status.reason.includes("has create too many chatrooms")||L.status.reason.includes("has joined too many chatrooms")?a.C.MAX_LIMIT:L.status.reason.includes("auto create failed")?a.C.SERVER_BUSY:a.C.SERVER_UNKNOWN_ERROR}this._msgHash[Ie]&&((null===(B=this._msgHash[Ie])||void 0===B?void 0:B.isHandleChatroom)?(ut=m.A.create({type:nt,message:L.status.reason||"",data:""}),this._msgHash[Ie].reject instanceof Function&&this._msgHash[Ie].reject(ut),this._msgHash[Ie].error instanceof Function&&this._msgHash[Ie].error(ut),g.Xp.has(Ie)&&(it=E.G8.failed,nt===a.C.CHATROOM_NOT_EXIST?it=E.G8.notFound:nt===a.C.CHATROOM_MEMBERS_FULL&&(it=E.G8.reachLimit),ot=g.Xp.get(Ie),st=ot.rpt,at=ot.requestName,st({isEndApi:!0,data:{isSuccess:0,requestName:at,requestMethod:"WEBSOCKET",requestUrl:this.url,code:it,codeDesc:L.status.reason}}),g.Xp.delete(Ie))):(ut=m.A.create({type:nt,message:L.status.reason||"",data:{id:Ie,mid:Re}}),this._msgHash[Ie].reject instanceof Function&&this._msgHash[Ie].reject(ut),this._msgHash[Ie].fail instanceof Function&&this._msgHash[Ie].fail({type:nt,reason:L.status.reason?L.status.reason:"",data:{id:Ie,mid:Re}}),null===(j=null===(G=this._localCache)||void 0===G?void 0:G.getInstance())||void 0===j||j.updateLocalMessage(Ie,{serverMsgId:Re,status:c.q.FAIL})),delete this._msgHash[Ie])}else if(7===L.status.errorCode)"sensitive words"===L.status.reason&&this._msgHash[Ie]?(ut=m.A.create({type:a.C.MESSAGE_INCLUDE_ILLEGAL_CONTENT,message:"sensitive words",data:{id:Ie,mid:Re}}),this._msgHash[Ie].reject instanceof Function&&this._msgHash[Ie].reject(ut),this._msgHash[Ie].fail instanceof Function&&this._msgHash[Ie].fail({type:a.C.MESSAGE_INCLUDE_ILLEGAL_CONTENT,data:{id:Ie,mid:Re,reason:"sensitive words"}}),null===(z=null===(K=this._localCache)||void 0===K?void 0:K.getInstance())||void 0===z||z.updateLocalMessage(Ie,{serverMsgId:Re,status:c.q.FAIL})):"blocked by mod_antispam"===L.status.reason&&this._msgHash[Ie]?(ut=m.A.create({type:a.C.MESSAGE_INCLUDE_ILLEGAL_CONTENT,message:"blocked by mod_antispam",data:{id:Ie,mid:Re}}),this._msgHash[Ie].reject instanceof Function&&this._msgHash[Ie].reject(ut),this._msgHash[Ie].fail instanceof Function&&this._msgHash[Ie].fail({type:a.C.MESSAGE_INCLUDE_ILLEGAL_CONTENT,data:{id:Ie,mid:Re,reason:"blocked by mod_antispam"}}),null===(Y=null===(V=this._localCache)||void 0===V?void 0:V.getInstance())||void 0===Y||Y.updateLocalMessage(Ie,{serverMsgId:Re,status:c.q.FAIL})):"user is mute"===L.status.reason&&this._msgHash[Ie]?(ut=m.A.create({type:a.C.USER_MUTED_BY_ADMIN,message:"user is mute",data:{id:Ie,mid:Re}}),this._msgHash[Ie].reject instanceof Function&&this._msgHash[Ie].reject(ut),this._msgHash[Ie].fail instanceof Function&&this._msgHash[Ie].fail(ut),null===(Q=null===(X=this._localCache)||void 0===X?void 0:X.getInstance())||void 0===Q||Q.updateLocalMessage(Ie,{serverMsgId:Re,status:c.q.FAIL})):"traffic limit"===L.status.reason&&this._msgHash[Ie]?(ut=m.A.create({type:a.C.MESSAGE_CURRENT_LIMITING,message:"traffic limit",data:{id:Ie,mid:Re}}),this._msgHash[Ie].reject instanceof Function&&this._msgHash[Ie].reject(ut),this._msgHash[Ie].fail instanceof Function&&this._msgHash[Ie].fail(ut),null===(ee=null===(Z=this._localCache)||void 0===Z?void 0:Z.getInstance())||void 0===ee||ee.updateLocalMessage(Ie,{serverMsgId:Re,status:c.q.FAIL})):"Sorry, data is too large"===L.status.reason&&this._msgHash[Ie]&&(ut=m.A.create({type:a.C.MESSAGE_SIZE_LIMIT,message:"Sorry, data is too large",data:{id:Ie,mid:Re}}),this._msgHash[Ie].reject instanceof Function&&this._msgHash[Ie].reject(ut),this._msgHash[Ie].fail instanceof Function&&this._msgHash[Ie].fail(ut),null===(re=null===(te=this._localCache)||void 0===te?void 0:te.getInstance())||void 0===re||re.updateLocalMessage(Ie,{serverMsgId:Re,status:c.q.FAIL}));else if(19===L.status.errorCode)this._msgHash[Ie]&&(g.nf.has(Ie)&&(g.nf.get(Ie).rpt({isEndApi:!0,data:{isSuccess:0,requestMethod:"WEBSOCKET",requestUrl:this.url,code:a.C.MESSAGE_EXTERNAL_LOGIC_BLOCKED,codeDesc:L.status.reason||"",msgId:Re,messageType:null!==(ie=E.He[null===(ne=this._msgHash[Ie])||void 0===ne?void 0:ne.chatType])&&void 0!==ie?ie:E.He.singleChat}}),g.nf.delete(Ie)),ut=m.A.create({type:a.C.MESSAGE_EXTERNAL_LOGIC_BLOCKED,message:L.status.reason||"",data:{id:Ie,mid:Re}}),this._msgHash[Ie].reject instanceof Function&&this._msgHash[Ie].reject(ut),this._msgHash[Ie].fail instanceof Function&&this._msgHash[Ie].fail({type:a.C.MESSAGE_EXTERNAL_LOGIC_BLOCKED,data:{id:Ie,mid:Re,reason:L.status.reason}}),null===(se=null===(oe=this._localCache)||void 0===oe?void 0:oe.getInstance())||void 0===se||se.updateLocalMessage(Ie,{serverMsgId:Re,status:c.q.FAIL}));else if(this._msgHash[Ie]){g.nf.has(Ie)&&(g.nf.get(Ie).rpt({isEndApi:!0,data:{isSuccess:0,requestMethod:"WEBSOCKET",requestUrl:this.url,code:a.C.WEBIM_LOAD_MSG_ERROR,codeDesc:(null===(ae=L.status)||void 0===ae?void 0:ae.reason)||"",msgId:Re,messageType:null!==(ce=E.He[null===(ue=this._msgHash[Ie])||void 0===ue?void 0:ue.chatType])&&void 0!==ce?ce:E.He.singleChat}}),g.nf.delete(Ie));try{ut=m.A.create({type:a.C.WEBIM_LOAD_MSG_ERROR,message:(null===(le=L.status)||void 0===le?void 0:le.reason)||"",data:{id:Ie,mid:Re,reason:L.status&&L.status.reason}}),this._msgHash[Ie].reject instanceof Function&&this._msgHash[Ie].reject(ut),null===(he=null===(fe=this._localCache)||void 0===fe?void 0:fe.getInstance())||void 0===he||he.updateLocalMessage(Ie,{serverMsgId:Re,status:c.q.FAIL}),this._msgHash[Ie].fail instanceof Function&&this._msgHash[Ie].fail({type:a.C.WEBIM_LOAD_MSG_ERROR,data:{errorCode:L.status&&L.status.errorCode,reason:L.status&&L.status.reason}})}catch(e){ct=m.A.create({type:a.C.WEBIM_CONNCTION_CALLBACK_INNER_ERROR,message:"when executing fail function error",data:e}),this.onError&&this.onError(ct),null===(pe=this.eventHandler)||void 0===pe||pe.dispatch("onError",ct)}delete this._msgHash[Ie]}else g.nf.has(Ie)&&(g.nf.get(Ie).rpt({isEndApi:!0,data:{isSuccess:0,requestMethod:"WEBSOCKET",requestUrl:this.url,code:a.C.WEBIM_CONNCTION_CALLBACK_INNER_ERROR,codeDesc:"on message error",msgId:Re,messageType:null!==(me=E.He[null===(ve=this._msgHash[Ie])||void 0===ve?void 0:ve.chatType])&&void 0!==me?me:E.He.singleChat}}),g.nf.delete(Ie)),ct=m.A.create({type:a.C.WEBIM_CONNCTION_CALLBACK_INNER_ERROR,message:"on message error"}),this.onError&&this.onError(ct),null===(_e=this.eventHandler)||void 0===_e||_e.dispatch("onError",ct);U.label=22;case 22:return[2];case 23:if(L.metas&&0!==L.metas.length){this._offlineMessagePullState!==f.P.SYNC_FINISH&&de.set(L.queue.name,L.metas.length);try{W.call(this,L.metas,L.status)}catch(e){ct=m.A.create({type:a.C.WEBIM_LOAD_MSG_ERROR,message:"decode message error",data:e}),_.vF.error("decode message error",e),this.onError&&this.onError(ct),null===(ge=this.eventHandler)||void 0===ge||ge.dispatch("onError",ct)}finally{L.isLast?(_.vF.debug("DLMessage isLast",L.isLast),lt=-1,this._queues.some((function(e,t){return e.name===L.name&&(lt=t,!0)}))&<>0&&this._queues.splice(lt,1),this._queues.length>0&&J.call(this,this._queues[0]),q.call(this,L)):L.nextKey&&(ht=new(s())(L.nextKey.low,L.nextKey.high,L.nextKey.unsigned).toString(),_.vF.debug("nexKey:",ht,"this.nextKey:",this.nexKey),ht!==this.nexKey||(null===(Ee=L.queue)||void 0===Ee?void 0:Ee.name)!==this.currentQueue?(this.nexKey=ht,this.currentQueue=null===(ye=L.queue)||void 0===ye?void 0:ye.name,$.call(this,L.nextKey,L.queue)):(_.vF.debug("nexKey and queue are same, delete it"),dt=-1,this._queues.some((function(e,t){return e.name===L.queue.name&&(dt=t,!0)}))&&this._queues.splice(dt,1),this._queues.length>0&&J.call(this,this._queues[0])))}}else L.isLast?(_.vF.debug("isLast",L.isLast),ft=-1,this._queues.some((function(e,t){return e.name===L.queue.name&&(ft=t,!0)}))&&this._queues.splice(ft,1),this._queues.length>0&&J.call(this,this._queues[0]),q.call(this,L)):L.nextKey&&(ht=new(s())(L.nextKey.low,L.nextKey.high,L.nextKey.unsigned).toString(),_.vF.debug("nexKey:",ht,"this.nextKey:",this.nexKey),ht!==this.nexKey||(null===(Oe=L.queue)||void 0===Oe?void 0:Oe.name)!==this.currentQueue?(this.nexKey=ht,this.currentQueue=null===(Te=L.queue)||void 0===Te?void 0:Te.name,$.call(this,L.nextKey,L.queue)):(_.vF.debug("nexKey and queue are same, delete it"),pt=-1,this._queues.some((function(e,t){return e.name===L.queue.name&&(pt=t,!0)}))&&this._queues.splice(pt,1),this._queues.length>0&&J.call(this,this._queues[0])));return[2]}}))}))}function he(e){var t=[],r=this.root.lookup("easemob.pb.KeyValue"),n=[];for(var i in e){var o=r.decode(t);if(o.key=i,void 0!==e[i]){if("object"===C(e[i]))o.type=8,o.stringValue=JSON.stringify(e[i]);else if("string"==typeof e[i])o.type=7,o.stringValue=e[i];else if("boolean"==typeof e[i])o.type=1,o.varintValue=!0===e[i]?1:0;else if(Number.isInteger(e[i]))o.type=2,o.varintValue=e[i];else if("bigint"==typeof e[i]||"symbol"===C(e[i])||"function"==typeof e[i]||Number.isNaN(e[i]))o.type=7,o.stringValue=e[i].toString();else{if("number"!=typeof e[i]||Number.isInteger(e[i]))continue;o.type=6,o.doubleValue=e[i]}n.push(o)}}return n}function pe(e){var t,r,n,i=[];if(this.root){var o,u=this.root.lookup("easemob.pb.MessageBody.Content").decode(i);switch(o=!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":u.type=0,u.text=e.msg;break;case"img":u.type=1,e.body?(u.displayName=e.body.filename,u.remotePath=e.body.url,u.secretKey=e.body.secret,u.fileLength=e.body.file_length,u.size=e.body.size,u.thumbnailDisplayName=e.body.filename):e.file?(u.displayName=e.file.filename,u.remotePath=e.file.url,u.secretKey=e.file.secret,u.fileLength=e.file.file_length,u.size=e.file.size,u.thumbnailDisplayName=e.file.filename):(u.displayName=e.filename,u.remotePath=e.url,u.secretKey=e.secret,u.fileLength=e.file_length,u.size=e.size,u.thumbnailDisplayName=e.filename),e.isBuildCombinedMsg&&(u.remotePath=e.url,u.secretKey=e.secret,u.size={height:e.height,width:e.width}),e.isGif&&(u.subType=1);var c=e.imageType,l=e.isGif||!0===e.isOriginalImage||"original"===c;u.imageType=l?1:2;break;case"video":u.type=2,e.body?(u.displayName=e.body.filename,u.remotePath=e.body.url,u.secretKey=e.body.secret,u.fileLength=e.body.file_length,u.duration=e.body.length,u.thumbnailDisplayName=e.body.filename,u.thumbnailRemotePath=this.useOwnUploadFun?"":"".concat(e.body.url,"?vframe=true"),u.thumbnailSecretKey=this.useOwnUploadFun?"":e.body.secret):e.isBuildCombinedMsg&&(u.displayName=e.filename,u.remotePath=e.url,u.secretKey=e.secret,u.fileLength=e.file_length,u.duration=e.length,u.thumbnailDisplayName=e.filename,u.thumbnailRemotePath=e.thumb,u.thumbnailSecretKey=e.thumb_secret);break;case"loc":u.type=3,u.latitude=e.lat,u.longitude=e.lng,u.address=e.addr,u.buildingName=e.buildingName,u.latitude=e.lat;break;case"audio":u.type=4,e.body?(u.displayName=e.body.filename,u.remotePath=e.body.url,u.secretKey=e.body.secret,u.fileLength=e.body.file_length,u.duration=e.body.length,u.thumbnailDisplayName=e.body.filename):e.isBuildCombinedMsg&&(u.displayName=e.filename,u.remotePath=e.url,u.secretKey=e.secret,u.fileLength=e.file_length,u.duration=e.length,u.thumbnailDisplayName=e.filename);break;case"file":u.type=5,e.body?(u.displayName=e.body.filename,u.remotePath=e.body.url,u.secretKey=e.body.secret,u.fileLength=e.body.file_length,u.thumbnailDisplayName=e.body.filename):e.isBuildCombinedMsg&&(u.displayName=e.filename,u.remotePath=e.url,u.secretKey=e.secret,u.fileLength=e.file_length,u.thumbnailDisplayName=e.filename);break;case"cmd":u.type=6,u.action=e.action;break;case"custom":u.type=7,u.customEvent=e.customEvent,u.customExts=he.call(this,e.customExts);break;case"combine":u.type=0,u.subType=0,u.text=e.compatibleText,u.displayName=e.filename,u.remotePath=e.url,u.secretKey=e.secret,u.fileLength=e.file_length,u.title=e.title,u.summary=e.summary,u.combineLevel=e.combineLevel}var d=[];e.ext&&(d=he.call(this,e.ext));var f=this.root.lookup("easemob.pb.MessageBody"),h=f.decode(i),p=e.from||this.context.jid.name;h.from={name:e.isBuildCombinedMsg?p:this.context.jid.name};var v=e.to.indexOf("/"),m=v>-1?e.to.substring(0,v):e.to;if(h.to={name:m},"channel"===e.type)h.type=b.CHANNEL_ACK,e.mid&&(h.ackMessageId=e.mid);else if("recall"===e.type)h.type=b.RECALL,h.ackMessageId=e.ackId;else if("delivery"===e.type)h.type=b.DELIVER_ACK,h.ackMessageId=e.ackId;else if("read"===e.type)h.type=b.READ_ACK,h.ackMessageId=e.ackId,"groupChat"===o&&(h.msgConfig={allowGroupAck:!0},h.ackContent=e.ackContent);else if("chatRoom"===o)h.type=b.CHATROOM;else if("groupChat"===o){if(h.type=b.GROUPCHAT,e.msgConfig){var g=e.msgConfig.allowGroupAck;h.msgConfig={allowGroupAck:!!g}}}else"singleChat"===o&&(h.type=b.SINGLECHAT);e.editMessageId&&(h.type=b.EDIT,h.editMessageId=e.editMessageId,h.editScope=N.BODY,e.ext&&(h.editScope=N.BODY_AND_EXT)),h.contents=[u],h.ext=d;var E=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);E&&(h.meta=E),h=f.encode(h).finish();var y=this.root.lookup("easemob.pb.Meta"),O=y.decode(i);O.id=e.id;var T="easemob.com";if("chatRoom"!==o&&"groupChat"!==o||(T="conference.easemob.com"),O.to={appKey:this.appKey,name:m,domain:T},v>-1&&(O.to.clientResource=e.to.substring(v+1,e.to.length)),"chatRoom"===o&&(O.ext=he.call(this,function(e){return{chatroom_msg_tag:"high"===e.priority?0:"low"===e.priority?2:1}}(e))),"recall"===e.type&&e.metaExt&&(O.ext=he.call(this,{recallMessageExtensionInfo:e.metaExt})),O.ns=1,O.payload=h,O.routetype=e.deliverOnlineOnly?1:0,"singleChat"!==o&&Array.isArray(e.receiverList)&&(null===(n=e.receiverList)||void 0===n?void 0:n.length)>0&&(O.directedUsers=e.receiverList,O.routetype=2),"delivery"!==e.type&&void 0!==e.webhookEnv){if("string"!=typeof e.webhookEnv)throw Error('Invalid parameter: "webhookEnv"');O.env=e.webhookEnv}if(e.isBuildCombinedMsg)return O.timestamp=s().fromValue(e.time),y.encode(O).finish();var R=this.root.lookup("easemob.pb.CommSyncUL"),I=R.decode(i);I.meta=O,!e.isPing&&me.call(this,e,O),I=R.encode(I).finish();var S=this.root.lookup("easemob.pb.MSync"),C=S.decode(i);return C.version=this.version,C.encryptType=this.encryptType,C.command=0,C.payload=I,C.traceId=x.gen(),_.vF.debug("traceId",C.traceId),S.encode(C).finish()}e.fail&&e.fail({type:a.C.WEBIM_CONNCTION_CLIENT_OFFLINE,message:"Not logged in"})}function ve(e){var t,r,n,i,o,s,u,l,d,f=this,h=w({},e);if(h.editMessageId){var p=pe.call(this,h);Oe.call(this,p)}else{if(e.file||"img"===e.type&&e._filePath){if(h.accessToken=this.token,h.appKey=this.appKey,h.apiUrl=this.apiUrl,h.body&&h.body.url)return pe.call(this,h);var m=(null===(r=null===(t=h.file)||void 0===t?void 0:t.data)||void 0===r?void 0:r.type)||(null===(n=h.file)||void 0===n?void 0:n.filetype)||h.filetype||"";if(h.isGif&&m&&"image/gif"!==m)return void this._msgHash[h.id].reject({type:a.C.MESSAGE_INCLUDE_ILLEGAL_CONTENT,message:"The file type is not gif."});var y=null!==(s=null===(o=null===(i=h.file)||void 0===i?void 0:i.data)||void 0===o?void 0:o.size)&&void 0!==s?s:h.file_length;if("number"==typeof y&&y<=0){var O={type:a.C.WEBIM_UPLOADFILE_ERROR,message:"fileSize must be greater than 0"};return h.onFileUploadError instanceof Function&&h.onFileUploadError(O),void(null===(u=this._msgHash[h.id])||void 0===u||u.reject(O))}return new Promise((function(t,r){var n=h.onFileUploadComplete,i=h.onFileUploadError,o=function(e,t){var r,n={type:a.C.WEBIM_UPLOADFILE_ERROR,message:e,data:t};i instanceof Function&&i(n),null===(r=f._msgHash[h.id])||void 0===r||r.reject(n)},s=function(e){var t=(null==e?void 0:e.message)||"";return/missing .*capability|requires file path string/i.test(t)},u=function(t){var r,i,o,s,u,l,d,p,v,m,_,y,O;if(t.entities){if(t.entities[0]["file-metadata"]){var T=t.entities[0]["file-metadata"]["content-length"];h.file_length=T,h.filetype=t.entities[0]["file-metadata"]["content-type"],T>204800&&(h.thumbnail=!0)}var R=(null===(i=h.file)||void 0===i?void 0:i.filename)||h.filename||(null===(o=h.body)||void 0===o?void 0:o.filename)||"image",I=h.filetype||(null===(s=h.file)||void 0===s?void 0:s.filetype)||(null===(u=t.entities[0]["file-metadata"])||void 0===u?void 0:u["content-type"])||"",C=null!==(_=null!==(v=null!==(p=null===(d=null===(l=h.file)||void 0===l?void 0:l.data)||void 0===d?void 0:d.size)&&void 0!==p?p:h.file_length)&&void 0!==v?v:null===(m=t.entities[0]["file-metadata"])||void 0===m?void 0:m["content-length"])&&void 0!==_?_:0,b="".concat(f.getChatFilesUrl(),"/").concat(t.entities[0].uuid);if(h.body={type:h.type||"file",secret:t.entities[0]["share-secret"],filename:R,url:b,length:h.length||0,filetype:I,file_length:C,size:{width:h.width||0,height:h.height||0}},h.file&&(h.file.url=t.uri),e.secret=t.entities[0]["share-secret"],t.url=e.url="".concat(b,"?em-redirect=true&share-secret=").concat(t.entities[0]["share-secret"]),e.file_length=h.file_length=C,"img"===h.type){var N=(0,S.d2)(b,t.entities[0]["share-secret"]),A="".concat(e.url,"&thumbnail=true");e.thumb=A,t.thumb="".concat(t.url,"&thumbnail=true"),e.originalImageUrl=N.originalImageUrl,e.bigImageUrl=N.bigImageUrl,t.originalImageUrl=N.originalImageUrl,t.bigImageUrl=N.bigImageUrl}"video"===h.type&&(e.thumb="".concat(e.url,"&vframe=true"),e.thumb_secret=t.entities[0]["share-secret"],t.thumb="".concat(t.url,"&vframe=true")),n instanceof Function&&n(t,h.id);var M=pe.call(f,h);g.nf.size<=g.Po&&g.nf.set(h.id,{rpt:f.dataReport.geOperateFun({operationName:E.jz.SEND_MSG})}),null===(O=null===(y=f._localCache)||void 0===y?void 0:y.getInstance())||void 0===O||O.storeMessage(e,c.q.INPROGRESS),Oe.call(f,M)}else null===(r=f._msgHash[h.id])||void 0===r||r.reject({type:a.C.WEBIM_UPLOADFILE_ERROR,message:"Failed to upload the file",data:t})};h.onFileUploadComplete=u,h.onFileUploadError=function(e){var t;i instanceof Function&&i(e),null===(t=f._msgHash[h.id])||void 0===t||t.reject({type:a.C.WEBIM_UPLOADFILE_ERROR,message:e.message||"Failed to upload the file",data:e})},L(f,void 0,void 0,(function(){var e,t,r,n,i,a,c,l,d,f,p,m,g,y,O,T,R,C,b,N,A,M,L,x,D,P,k,F,H,B,G,W,j,q,K,z,V,J,Y,X,Q,$,Z,ee,te,re,ne;return U(this,(function(U){switch(U.label){case 0:if(U.trys.push([0,26,,27]),"img"!==h.type)return[3,25];if(e=this._imageProcessor,t=null===(q=h.file)||void 0===q?void 0:q.data,r=h._filePath,n=null!==(z=null!==(K=null==t?void 0:t.size)&&void 0!==K?K:h.file_length)&&void 0!==z?z:0,i=(null==t?void 0:t.type)||(null===(V=h.file)||void 0===V?void 0:V.filetype)||h.filetype||"",a=h.imageType,c=h.isGif||!0===h.isOriginalImage||"original"===a,l=void 0,!r||!e)return[3,4];U.label=1;case 1:return U.trys.push([1,3,,4]),[4,e.getImageInfo(r)];case 2:return(l=U.sent()).path&&l.path!==r&&(_.vF.debug("Miniapp image message file path normalized",r,l.path),r=l.path,h._filePath=l.path),[3,4];case 3:return d=U.sent(),_.vF.warn("Failed to normalize miniapp image path",d),[3,4];case 4:if(h.width&&h.height||!t&&!r)return[3,12];U.label=5;case 5:return U.trys.push([5,11,,12]),e?(p=l)?[3,7]:[4,e.getImageInfo(r||t)]:[3,8];case 6:p=U.sent(),U.label=7;case 7:return f=p,r&&f.path&&f.path!==r&&(r=f.path,h._filePath=f.path),h.width||(h.width=f.width),h.height||(h.height=f.height),[3,10];case 8:return"undefined"==typeof Image||"undefined"==typeof URL?[3,10]:[4,new Promise((function(e,r){var n=new Image,i=URL.createObjectURL(t);n.onload=function(){URL.revokeObjectURL(i),e({w:n.width,h:n.height})},n.onerror=function(){URL.revokeObjectURL(i),r(new Error("load failed"))},n.src=i}))];case 9:m=U.sent(),h.width||(h.width=m.w),h.height||(h.height=m.h),U.label=10;case 10:return[3,12];case 11:return g=U.sent(),r&&s(g)?(o("Failed to read image info on mini program platform",g),[2]):(_.vF.warn("Failed to read image info",g),[3,12]);case 12:if(r&&(!h.width||!h.height)&&!e)return o("Mini program platform is missing image info capability"),[2];if(y=h.width,O=h.height,T=r||t,!c&&!h.isGif&&r&&!e)return o("Mini program platform is missing image compression capability"),[2];if(c||h.isGif||!e)return[3,16];if(!(R=r||t))return[3,16];U.label=13;case 13:return U.trys.push([13,15,,16]),[4,e.generateBigImage(R,{maxShortEdge:I.Qv,quality:I.tx})];case 14:return(C=U.sent())&&(C.file&&(h.file=w(w({},h.file),{data:C.file})),C.path&&(h._filePath=C.path,r=C.path),h.file_length=C.size,h.filetype=C.type,h.file&&(h.file.filetype=C.type),h.width=C.width,h.height=C.height,_.vF.debug("Image compressed for large send","".concat(C.width,"x").concat(C.height,", size: ").concat(C.size))),[3,16];case 15:return b=U.sent(),r&&s(b)?(o("Mini program platform is missing image compression capability",b),[2]):(_.vF.warn("Big image generation failed, falling back to original",b),h.isOriginalImage=!0,c=!0,[3,16]);case 16:return H=null!==(Q=null!==(X=null===(Y=null===(J=h.file)||void 0===J?void 0:J.data)||void 0===Y?void 0:Y.size)&&void 0!==X?X:h.file_length)&&void 0!==Q?Q:0,N=c?"original":"large",this.enableMd5Check?(h._uploadMd5=void 0,B="",e&&T?[3,17]:(_.vF.warn("Image MD5 capability or source is missing, proceeding without MD5"),[3,20])):[3,24];case 17:return U.trys.push([17,19,,20]),[4,e.computeMd5(T)];case 18:return B=U.sent(),h._uploadMd5=B,[3,20];case 19:return A=U.sent(),_.vF.warn("Failed to compute image MD5, proceeding without MD5",A),[3,20];case 20:if(!B||!(0,S.Xn)(H,"img",N))return[3,24];U.label=21;case 21:return U.trys.push([21,23,,24]),[4,(0,S.fg)(this,B,"img",N)];case 22:return(W=U.sent()).hit&&W.uuid?("original"===(M=W.effectiveImageType||N)&&(h.isOriginalImage=!0,c=!0,h.width=y,h.height=O),_.vF.debug("Precheck hit, skipping upload","uuid: ".concat(W.uuid),"effectiveImageType: ".concat(M)),L="original"===M?n:H,x="original"===M?i||(null===($=h.file)||void 0===$?void 0:$.filetype)||"image/jpeg":(null===(Z=h.file)||void 0===Z?void 0:Z.filetype)||h.filetype||"image/jpeg",D={entities:[{uuid:W.uuid,"share-secret":W.shareSecret||"","file-metadata":{"content-length":L,"content-type":x}}],uri:"".concat(this.getChatFilesUrl(),"/").concat(W.uuid)},u(D),[2]):[3,24];case 23:return P=U.sent(),_.vF.warn("Precheck error, proceeding with upload",P),[3,24];case 24:h._uploadImageType=(0,S.GD)(N),U.label=25;case 25:return[3,27];case 26:return k=U.sent(),_.vF.warn("Image preprocessing failed, proceeding with normal upload",k),[3,27];case 27:return this.enableMd5Check&&"img"!==h.type?(F=null===(ee=h.file)||void 0===ee?void 0:ee.data,H=null!==(re=null!==(te=null==F?void 0:F.size)&&void 0!==te?te:h.file_length)&&void 0!==re?re:0,h._uploadMd5=void 0,B="",F?[3,28]:(_.vF.warn("Attachment source is unavailable, proceeding without MD5"),[3,31])):[3,35];case 28:return U.trys.push([28,30,,31]),[4,(0,S.Aj)(F)];case 29:return B=U.sent(),h._uploadMd5=B,[3,31];case 30:return G=U.sent(),_.vF.warn("Failed to compute attachment MD5, proceeding without MD5",G),[3,31];case 31:if(!B||!(0,S.Xn)(H,h.type))return[3,35];U.label=32;case 32:return U.trys.push([32,34,,35]),[4,(0,S.fg)(this,B,h.type)];case 33:return(W=U.sent()).hit&&W.uuid?(_.vF.debug("Attachment precheck hit, skipping upload","uuid: ".concat(W.uuid),"type: ".concat(h.type)),u({entities:[{uuid:W.uuid,"share-secret":W.shareSecret||"","file-metadata":{"content-length":H,"content-type":F.type||h.filetype||(null===(ne=h.file)||void 0===ne?void 0:ne.filetype)||""}}],uri:"".concat(this.getChatFilesUrl(),"/").concat(W.uuid)}),[2]):[3,35];case 34:return j=U.sent(),_.vF.warn("Attachment precheck failed, proceeding with upload",j),[3,35];case 35:return v.Wp.uploadFile.call(this,h,E.jz.UPLOAD_MSG_ATTACH),[2]}}))}))}))}if("combine"===e.type){h.accessToken=this.token,h.appKey=this.appKey,h.apiUrl=this.apiUrl;var T=h.onFileUploadComplete,R=h.onFileUploadError;return new Promise((function(t,r){var n,i,o,s;if((null===(n=e.messageList)||void 0===n?void 0:n.length)>300||0===(null===(i=e.messageList)||void 0===i?void 0:i.length))return f._msgHash[h.id].reject({type:a.C.MAX_LIMIT,message:"The number of combined messages exceeded the limit."});var u=function(e,t,r){if(r||2===arguments.length)for(var n,i=0,o=t.length;i<o;i++)!n&&i in t||(n||(n=Array.prototype.slice.call(t,0,i)),n[i]=t[i]);return e.concat(n||Array.prototype.slice.call(t))}([],e.messageList,!0),l=0;if(u.forEach((function(e){(null==e?void 0:e.combineLevel)>l&&(l=null==e?void 0:e.combineLevel)})),h.combineLevel=l+1,h.combineLevel>10)return f._msgHash[h.id].reject({type:a.C.MAX_LIMIT,message:"The level of the merged message exceeded the limit."});var d=_e.call(f,u),p=function(t,r){var n,i,o,s,a,u,l="".concat(f.getChatFilesUrl(),"/").concat(t.entities[0].uuid),d=null===(n=t.entities[0])||void 0===n?void 0:n["share-secret"],p="".concat(l,"?em-redirect=true");d&&(p="".concat(p,"&share-secret=").concat(d)),T instanceof Function&&T({url:p,secret:d}),e.url=p,e.secret=d,h.url=p,h.secret=t.entities[0]["share-secret"],h.filename=(null===(i=h.file)||void 0===i?void 0:i.filename)||(null==r?void 0:r.fileName),h.file_length=(null===(s=null===(o=h.file)||void 0===o?void 0:o.data)||void 0===s?void 0:s.size)||(null==r?void 0:r.fileLength)||0,null===(u=null===(a=f._localCache)||void 0===a?void 0:a.getInstance())||void 0===u||u.storeMessage(e,c.q.INPROGRESS);var v=pe.call(f,h);Oe.call(f,v)},m=v.Wp.getEnvInfo();if("web"!==m.platform&&"node"!==m.platform&&"quick_app"!==m.platform&&(null===(s=null===(o=m.global)||void 0===o?void 0:o.canIUse)||void 0===s?void 0:s.call(o,"getFileSystemManager"))){var g=m.global.getFileSystemManager(),y=f.getChatFilesUrl();g.writeFile({filePath:"".concat(m.global.env.USER_DATA_PATH,"/combine"),data:d.buffer,encoding:"binary",success:function(e){m.global.uploadFile({url:y,filePath:"".concat(m.global.env.USER_DATA_PATH,"/combine"),name:"file",header:{"Content-Type":"multipart/form-data",Authorization:"Bearer "+h.accessToken},success:function(e){if(200===e.statusCode){_.vF.debug("upload success");var t=JSON.parse(e.data);p(t,{fileName:"combine",fileLength:d.length})}else _.vF.error("upload fail"),h.onFileUploadError instanceof Function&&h.onFileUploadError(e),this._msgHash[h.id].reject({type:a.C.WEBIM_UPLOADFILE_ERROR,message:"Failed to upload the merge message.Please try again",data:e})},fail:function(t){_.vF.error("upload fail"),h.onFileUploadError instanceof Function&&h.onFileUploadError(e),this._msgHash[h.id].reject({type:a.C.WEBIM_UPLOADFILE_ERROR,message:"Failed to upload the merge message.Please try again",data:t})}})},fail:function(e){_.vF.error("write file fail",e),this._msgHash[h.id].reject({type:a.C.WEBIM_UPLOADFILE_ERROR,message:"Failed to upload the merge message.Please try again",data:e})}})}else{var O=new File([d],"combine",{type:"application/octet-stream"}),I={url:URL.createObjectURL(O),filename:h.id,data:O};h.file=I,h.onFileUploadComplete=function(e){p(e)},h.onFileUploadError=function(e){R instanceof Function&&R(e),f._msgHash[h.id].reject({type:a.C.WEBIM_UPLOADFILE_ERROR,message:"Failed to upload the merge message.Please try again",data:e})},v.Wp.uploadFile.call(f,h,E.jz.UPLOAD_MSG_ATTACH)}}))}"img"===e.type&&(h.body||(h.body=w(w({},h),{size:{width:h.width||0,height:h.height||0}}))),null===(d=null===(l=this._localCache)||void 0===l?void 0:l.getInstance())||void 0===d||d.storeMessage(e,c.q.INPROGRESS),p=pe.call(this,h),Oe.call(this,p)}}function me(e,t){if(e.editMessageId)return t.ignoreCallback=!0,void(this._msgHash[e.id].thirdMessage=t);D.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<e.length;r++){for(var n=e[r],i=w(w({},n),{isBuildCombinedMsg:!0}),o=this.mSync.encodeChatMsg.call(this,i),s=o.length,a=new Uint8Array(4),u=0;u<4;u++)a[u]=s>>8*(3-u)&255;var c=new Uint8Array(t.length+a.length+o.length);c.set(t),c.set(a,t.length),c.set(o,t.length+a.length),t=c}var l=new Uint8Array(t.length+1),d=0;for(r=2;r<t.length;r++)r%2==1&&(d^=t[r]);return l.set(t),_.vF.debug("checkResult:",d),l[t.length]=d,l}function ge(e,t,r){var n=[],i=this.root.lookup("easemob.pb.MUCBody"),o=e.roomId,s=e.ext,a=void 0===s?"":s,u=e.leaveOtherRooms,c=void 0!==u&&u,l=i.decode(n);l.mucId={appKey:this.appKey,name:o,domain:"conference.easemob.com"},l.operation="join"===r?2:3,l.from={name:this.context.userId},l.isChatroom=!0,"join"===r&&(l.ext=a,l.leaveOtherRooms=c),l=i.encode(l).finish();var d=this.root.lookup("easemob.pb.Meta").decode(n);d.id=t,d.from={appKey:this.appKey,name:this.context.userId,domain:"easemob.com",client_resource:this.context.jid.clientResource},d.to={domain:"easemob.com"},d.ns=2,d.payload=l;var f=this.root.lookup("easemob.pb.CommSyncUL"),h=f.decode(n);h.meta=d,h=f.encode(h).finish();var p=this.root.lookup("easemob.pb.MSync"),v=p.decode(n);return v.version=this.version,v.encryptType=this.encryptType,v.command=0,v.payload=h,v.traceId=x.gen(),_.vF.debug("traceId",v.traceId),p.encode(v).finish()}function Ee(e,t){var r=v.Wp.getUniqueId(),n=ge.call(this,e,r,t),i="join"===t?E.jz.JOIN_CHATROOM:E.jz.QUIT_CHATROOM,o=this.dataReport.geOperateFun({operationName:i});return g.Xp.size<=g.Po&&g.Xp.set(r,{rpt:o,requestName:i}),Oe.call(this,w(w({},e),{isHandleChatroom:!0,joinMsg:n,id:r,operation:t}),r)}function ye(e){var t=this;return new Promise((function(r,n){var i,o,s,u,l,d;if(_.vF.debug("call send"),t.logOut)return _.vF.error("send message failed",a.C.WEBIM_CONNECTION_CLOSED),n({type:a.C.WEBIM_CONNECTION_CLOSED,message:"not login"});if(!e.id||"string"!=typeof e.id||""===e.id)return n({type:a.C.MESSAGE_PARAMETER_ERROR,message:'Missing required parameter: "id"'});if(!e.to||"string"!=typeof e.to||""===e.to)return n({type:a.C.MESSAGE_PARAMETER_ERROR,message:'Missing required parameter: "to"'});var f="file"===e.type||"img"===e.type||"audio"===e.type||"video"===e.type,h="delivery"===e.type||"read"===e.type||"channel"===e.type,p="cmd"===e.type,v="recall"===e.type,m=null==e?void 0:e.editMessageId,y=!(h||v||p||m);if(e.id){if(!f&&!h||f&&t.useOwnUploadFun){var O="recall"===e.type?E.jz.SEND_RECALL_MSG:E.jz.SEND_MSG;m&&(O=E.jz.MODIFY_MESSAGE),g.nf.size<=g.Po&&g.nf.set(e.id,{rpt:t.dataReport.geOperateFun({operationName:O})})}y&&(null===(o=null===(i=t._localCache)||void 0===i?void 0:i.getInstance())||void 0===o||o.storeMessage(e,c.q.CREATE)),t._msgHash[e.id]=w(w({},e),{resolve:r,reject:n})}if(f||"combine"===e.type)return ve.call(t,e);if("txt"===e.type&&(null===(s=e.msgConfig)||void 0===s?void 0:s.languages)&&Array.isArray(null===(u=e.msgConfig)||void 0===u?void 0:u.languages)&&e.msgConfig.languages.length>0){var T=t.translateMessage||t.translation.translateMessage;if(!T)throw new Error("there is no method to translate message");T.call(t,{text:e.msg,languages:e.msgConfig.languages}).then((function(r){var n,i,o,s=null===(n=r.data[0])||void 0===n?void 0:n.translations;s=s.map((function(e){return{code:e.to,text:e.text}})),e.translations=s,t._msgHash[e.id].translations=s,null===(o=null===(i=t._localCache)||void 0===i?void 0:i.getInstance())||void 0===o||o.storeMessage(e,c.q.INPROGRESS);var a=pe.call(t,e);Oe.call(t,a,e.id)})).catch((function(e){n(e)}))}else{y&&(null===(d=null===(l=t._localCache)||void 0===l?void 0:l.getInstance())||void 0===d||d.storeMessage(e,c.q.INPROGRESS));var R=pe.call(t,e);Oe.call(t,R,e.id)}}))}function Oe(e,t){var r,n,i,o,s=this;if(e.isHandleChatroom){if(!this.isOpened()){var u={data:"",type:a.C.WEBIM_CONNCTION_DISCONNECTED,message:"websocket has been disconnected"};if(g.Xp.has(e.id)){var c=g.Xp.get(e.id);(0,c.rpt)({isEndApi:!0,data:{isSuccess:0,requestName:c.requestName,requestMethod:"WEBSOCKET",requestUrl:this.url,code:E.G8.disconnect,codeDesc:"websocket has been disconnected"}}),g.Xp.delete(e.id)}return Promise.reject(u)}return new Promise((function(r,n){var i,o;s._msgHash[e.id]=w(w({},e),{resolve:r,reject:n});var u=R.v.call(s,e.joinMsg),c=u[0];if(!u[1]){var l={type:a.C.SDK_RUNTIME_ERROR,message:"compress message failed"};return null===(o=null===(i=s._msgHash[e.id])||void 0===i?void 0:i.reject)||void 0===o||o.call(i,l),void delete s._msgHash[e.id]}var d=s._getSock?B.call(s,c,t):c;if(t){var f=setTimeout((function(){var t,r=s._msgHash[e.id];if(r){var n={type:a.C.REQUEST_TIMEOUT,message:"request timeout"};null===(t=r.reject)||void 0===t||t.call(r,n),clearTimeout(r.messageTimer),delete s._msgHash[e.id],s.reconnecting||s.reconnect(!0)}}),y.Ez);s._msgHash[e.id].messageTimer=f}s.sock.send(d)}))}if(!this.isOpened())return null===(r=this.unMSyncSendMsgMap)||void 0===r||r.set(t,e),!this.logOut&&this.autoReconnectNumTotal<this.autoReconnectNumMax&&(_.vF.info("need to reconnect",this.autoReconnectNumTotal,this.autoReconnectNumMax),this.offLineSendConnecting=!0,this.reconnecting||this.reconnect()),void(this.onError&&this.onError({type:a.C.WEBIM_CONNCTION_DISCONNECTED,message:"websocket has been disconnected"}));var l=t&&setTimeout((function(){var e,r,n;if(s._msgHash[null!=t?t:""]){var i={type:a.C.MESSAGE_SEND_TIMEOUT,message:"send message timeout"};null===(r=(e=s._msgHash[null!=t?t:""]).reject)||void 0===r||r.call(e,i),clearTimeout(null===(n=s._msgHash[null!=t?t:""])||void 0===n?void 0:n.messageTimer),delete s._msgHash[null!=t?t:""],s.reconnecting||s.reconnect(!0)}}),y.Ez);this._msgHash[null!=t?t:""]&&(this._msgHash[null!=t?t:""].messageTimer=l);var d=R.v.call(this,e),f=d[0];if(!d[1])return u={type:a.C.SDK_RUNTIME_ERROR,message:"compress message failed"},null===(i=null===(n=this._msgHash[null!=t?t:""])||void 0===n?void 0:n.reject)||void 0===i||i.call(n,u),clearTimeout(null===(o=this._msgHash[null!=t?t:""])||void 0===o?void 0:o.messageTimer),void delete this._msgHash[null!=t?t:""];var h=this._getSock?B.call(this,f,t):f;this.sock.send(h)}t.Ay=function(e,t){return e.send=ye,e.sendMsg=ye,_.vF.info("init Msync by ".concat(e.name)),{generateProvision:F.bind(e),generateLogout:H.bind(e),base64transform:B.bind(e),distributeMeta:G.bind(e),decodeMeta:W.bind(e),decodeUnreadDL:K.bind(e),_rebuild:z.bind(e),_lastsession:Y.bind(e),receiveProvision:Z.bind(e),isInQueue:ae.bind(e),decodeNotice:ue.bind(e),decodeMSync:ce.bind(e),distributeMSync:le.bind(e),encodeChatMsg:pe.bind(e),upLoadFile:ve.bind(e),send:ye.bind(e),stopHeartBeat:oe.bind(e),handleChatRoom:Ee.bind(e),sendUnreadDeal:ne.bind(e)}}},6651:function(e,t,r){"use strict";var n=r(4644),i=r(9617).indexOf,o=n.aTypedArray;(0,n.exportTypedArrayMethod)("indexOf",(function(e){return i(o(this),e,arguments.length>1?arguments[1]:void 0)}))},6682:function(e,t,r){"use strict";var n=r(9565),i=r(8551),o=r(4901),s=r(2195),a=r(7323),u=TypeError;e.exports=function(e,t){var r=e.exec;if(o(r)){var c=n(r,e,t);return null!==c&&i(c),c}if("RegExp"===s(e))return n(a,e,t);throw new u("RegExp#exec called on incompatible receiver")}},6699:function(e,t,r){"use strict";var n=r(3724),i=r(4913),o=r(6980);e.exports=n?function(e,t,r){return i.f(e,t,o(1,r))}:function(e,t,r){return e[t]=r,e}},6706:function(e,t,r){"use strict";var n=r(9504),i=r(9306);e.exports=function(e,t,r){try{return n(i(Object.getOwnPropertyDescriptor(e,t)[r]))}catch(e){}}},6761:function(e,t,r){"use strict";var n=r(6518),i=r(4576),o=r(9565),s=r(9504),a=r(6395),u=r(3724),c=r(4495),l=r(9039),d=r(9297),f=r(1625),h=r(8551),p=r(5397),v=r(6969),m=r(655),_=r(6980),g=r(2360),E=r(1072),y=r(8480),O=r(298),T=r(3717),R=r(7347),I=r(4913),S=r(6801),C=r(8773),b=r(6840),N=r(2106),A=r(5745),M=r(6119),w=r(421),L=r(3392),U=r(8227),x=r(1951),D=r(511),P=r(8242),k=r(687),F=r(1181),H=r(9213).forEach,B=M("hidden"),G="Symbol",W="prototype",j=F.set,q=F.getterFor(G),K=Object[W],z=i.Symbol,V=z&&z[W],J=i.RangeError,Y=i.TypeError,X=i.QObject,Q=R.f,$=I.f,Z=O.f,ee=C.f,te=s([].push),re=A("symbols"),ne=A("op-symbols"),ie=A("wks"),oe=!X||!X[W]||!X[W].findChild,se=function(e,t,r){var n=Q(K,t);n&&delete K[t],$(e,t,r),n&&e!==K&&$(K,t,n)},ae=u&&l((function(){return 7!==g($({},"a",{get:function(){return $(this,"a",{value:7}).a}})).a}))?se:$,ue=function(e,t){var r=re[e]=g(V);return j(r,{type:G,tag:e,description:t}),u||(r.description=t),r},ce=function(e,t,r){e===K&&ce(ne,t,r),h(e);var n=v(t);return h(r),d(re,n)?(r.enumerable?(d(e,B)&&e[B][n]&&(e[B][n]=!1),r=g(r,{enumerable:_(0,!1)})):(d(e,B)||$(e,B,_(1,g(null))),e[B][n]=!0),ae(e,n,r)):$(e,n,r)},le=function(e,t){h(e);var r=p(t),n=E(r).concat(pe(r));return H(n,(function(t){u&&!o(de,r,t)||ce(e,t,r[t])})),e},de=function(e){var t=v(e),r=o(ee,this,t);return!(this===K&&d(re,t)&&!d(ne,t))&&(!(r||!d(this,t)||!d(re,t)||d(this,B)&&this[B][t])||r)},fe=function(e,t){var r=p(e),n=v(t);if(r!==K||!d(re,n)||d(ne,n)){var i=Q(r,n);return!i||!d(re,n)||d(r,B)&&r[B][n]||(i.enumerable=!0),i}},he=function(e){var t=Z(p(e)),r=[];return H(t,(function(e){d(re,e)||d(w,e)||te(r,e)})),r},pe=function(e){var t=e===K,r=Z(t?ne:p(e)),n=[];return H(r,(function(e){!d(re,e)||t&&!d(K,e)||te(n,re[e])})),n};c||(z=function(){if(f(V,this))throw new Y("Symbol is not a constructor");var e=arguments.length&&void 0!==arguments[0]?m(arguments[0]):void 0,t=L(e),r=function(e){var n=void 0===this?i:this;n===K&&o(r,ne,e),d(n,B)&&d(n[B],t)&&(n[B][t]=!1);var s=_(1,e);try{ae(n,t,s)}catch(e){if(!(e instanceof J))throw e;se(n,t,s)}};return u&&oe&&ae(K,t,{configurable:!0,set:r}),ue(t,e)},b(V=z[W],"toString",(function(){return q(this).tag})),b(z,"withoutSetter",(function(e){return ue(L(e),e)})),C.f=de,I.f=ce,S.f=le,R.f=fe,y.f=O.f=he,T.f=pe,x.f=function(e){return ue(U(e),e)},u&&(N(V,"description",{configurable:!0,get:function(){return q(this).description}}),a||b(K,"propertyIsEnumerable",de,{unsafe:!0}))),n({global:!0,constructor:!0,wrap:!0,forced:!c,sham:!c},{Symbol:z}),H(E(ie),(function(e){D(e)})),n({target:G,stat:!0,forced:!c},{useSetter:function(){oe=!0},useSimple:function(){oe=!1}}),n({target:"Object",stat:!0,forced:!c,sham:!u},{create:function(e,t){return void 0===t?g(e):le(g(e),t)},defineProperty:ce,defineProperties:le,getOwnPropertyDescriptor:fe}),n({target:"Object",stat:!0,forced:!c},{getOwnPropertyNames:he}),P(),k(z,G),w[B]=!0},6801:function(e,t,r){"use strict";var n=r(3724),i=r(8686),o=r(4913),s=r(8551),a=r(5397),u=r(1072);t.f=n&&!i?Object.defineProperties:function(e,t){s(e);for(var r,n=a(t),i=u(t),c=i.length,l=0;c>l;)o.f(e,r=i[l++],n[r]);return e}},6812:function(e,t,r){"use strict";var n=r(4644),i=r(8745),o=r(8379),s=n.aTypedArray;(0,n.exportTypedArrayMethod)("lastIndexOf",(function(e){var t=arguments.length;return i(o,s(this),t>1?[e,arguments[1]]:[e])}))},6823:function(e){"use strict";var t=String;e.exports=function(e){try{return t(e)}catch(e){return"Object"}}},6834:function(e,t,r){"use strict";r.d(t,{$b:function(){return s.A},CD:function(){return a.A},PM:function(){return i.A},u0:function(){return o.A},yH:function(){return n.Ay}});var n=r(8579),i=r(1408),o=r(1672),s=r(7725),a=r(2055)},6837:function(e){"use strict";var t=TypeError;e.exports=function(e){if(e>9007199254740991)throw t("Maximum allowed index exceeded");return e}},6840:function(e,t,r){"use strict";var n=r(4901),i=r(4913),o=r(283),s=r(9433);e.exports=function(e,t,r,a){a||(a={});var u=a.enumerable,c=void 0!==a.name?a.name:t;if(n(r)&&o(r,c,a),a.global)u?e[t]=r:s(t,r);else{try{a.unsafe?e[t]&&(u=!0):delete e[t]}catch(e){}u?e[t]=r:i.f(e,t,{value:r,enumerable:!1,configurable:!a.nonConfigurable,writable:!a.nonWritable})}return e}},6910:function(e,t,r){"use strict";var n=r(6518),i=r(9504),o=r(9306),s=r(8981),a=r(6198),u=r(4606),c=r(655),l=r(9039),d=r(4488),f=r(4598),h=r(3709),p=r(3763),v=r(9519),m=r(3607),_=[],g=i(_.sort),E=i(_.push),y=l((function(){_.sort(void 0)})),O=l((function(){_.sort(null)})),T=f("sort"),R=!l((function(){if(v)return v<70;if(!(h&&h>3)){if(p)return!0;if(m)return m<603;var e,t,r,n,i="";for(e=65;e<76;e++){switch(t=String.fromCharCode(e),e){case 66:case 69:case 70:case 72:r=3;break;case 68:case 71:r=4;break;default:r=2}for(n=0;n<47;n++)_.push({k:t+n,v:r})}for(_.sort((function(e,t){return t.v-e.v})),n=0;n<_.length;n++)t=_[n].k.charAt(0),i.charAt(i.length-1)!==t&&(i+=t);return"DGBEFHACIJK"!==i}}));n({target:"Array",proto:!0,forced:y||!O||!T||!R},{sort:function(e){void 0!==e&&o(e);var t=s(this);if(R)return void 0===e?g(t):g(t,e);var r,n,i=[],l=a(t);for(n=0;n<l;n++)n in t&&E(i,t[n]);for(d(i,function(e){return function(t,r){return void 0===r?-1:void 0===t?1:void 0!==e?+e(t,r)||0:c(t)>c(r)?1:-1}}(e)),r=a(i),n=0;n<r;)t[n]=i[n++];for(;n<l;)u(t,n++);return t}})},6933:function(e,t,r){"use strict";var n=r(9504),i=r(4376),o=r(4901),s=r(2195),a=r(655),u=n([].push);e.exports=function(e){if(o(e))return e;if(i(e)){for(var t=e.length,r=[],n=0;n<t;n++){var c=e[n];"string"==typeof c?u(r,c):"number"!=typeof c&&"Number"!==s(c)&&"String"!==s(c)||u(r,a(c))}var l=r.length,d=!0;return function(e,t){if(d)return d=!1,t;if(i(this))return t;for(var n=0;n<l;n++)if(r[n]===e)return t}}}},6938:function(e,t,r){"use strict";var n=r(2360),i=r(2106),o=r(6279),s=r(6080),a=r(679),u=r(4117),c=r(2652),l=r(1088),d=r(2529),f=r(7633),h=r(3724),p=r(3451).fastKey,v=r(1181),m=v.set,_=v.getterFor;e.exports={getConstructor:function(e,t,r,l){var d=e((function(e,i){a(e,f),m(e,{type:t,index:n(null),first:null,last:null,size:0}),h||(e.size=0),u(i)||c(i,e[l],{that:e,AS_ENTRIES:r})})),f=d.prototype,v=_(t),g=function(e,t,r){var n,i,o=v(e),s=E(e,t);return s?s.value=r:(o.last=s={index:i=p(t,!0),key:t,value:r,previous:n=o.last,next:null,removed:!1},o.first||(o.first=s),n&&(n.next=s),h?o.size++:e.size++,"F"!==i&&(o.index[i]=s)),e},E=function(e,t){var r,n=v(e),i=p(t);if("F"!==i)return n.index[i];for(r=n.first;r;r=r.next)if(r.key===t)return r};return o(f,{clear:function(){for(var e=v(this),t=e.first;t;)t.removed=!0,t.previous&&(t.previous=t.previous.next=null),t=t.next;e.first=e.last=null,e.index=n(null),h?e.size=0:this.size=0},delete:function(e){var t=this,r=v(t),n=E(t,e);if(n){var i=n.next,o=n.previous;delete r.index[n.index],n.removed=!0,o&&(o.next=i),i&&(i.previous=o),r.first===n&&(r.first=i),r.last===n&&(r.last=o),h?r.size--:t.size--}return!!n},forEach:function(e){for(var t,r=v(this),n=s(e,arguments.length>1?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)}}),o(f,r?{get:function(e){var t=E(this,e);return t&&t.value},set:function(e,t){return g(this,0===e?0:e,t)}}:{add:function(e){return g(this,e=0===e?0:e,e)}}),h&&i(f,"size",{configurable:!0,get:function(){return v(this).size}}),d},setStrong:function(e,t,r){var n=t+" Iterator",i=_(t),o=_(n);l(e,t,(function(e,t){m(this,{type:n,target:e,state:i(e),kind:t,last:null})}),(function(){for(var e=o(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)?d("keys"===t?r.key:"values"===t?r.value:[r.key,r.value],!1):(e.target=null,d(void 0,!0))}),r?"entries":"values",!r,!0),f(t)}}},6955:function(e,t,r){"use strict";var n=r(2140),i=r(4901),o=r(2195),s=r(8227)("toStringTag"),a=Object,u="Arguments"===o(function(){return arguments}());e.exports=n?o:function(e){var t,r,n;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(r=function(e,t){try{return e[t]}catch(e){}}(t=a(e),s))?r:u?o(t):"Object"===(n=o(t))&&i(t.callee)?"Arguments":n}},6969:function(e,t,r){"use strict";var n=r(2777),i=r(757);e.exports=function(e){var t=n(e,"string");return i(t)?t:t+""}},6980:function(e){"use strict";e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},6981:function(e,t,r){"use strict";r.d(t,{B:function(){return a}}),r(8706),r(739),r(4170),r(6099),r(3362);var n=r(1156),i=r(4269),o=r(7968),s=r(3603);function a(e){if("string"!=typeof e.deviceId||""===e.deviceId)throw Error('Invalid parameter: "deviceId"');var t=n.dO.call(this).error;if(t)return Promise.reject(t);var r=this.context,a=r.orgName,u=r.appName,c=r.accessToken,l={url:"".concat(this.apiUrl,"/").concat(a,"/").concat(u,"/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 "+c,"Content-Type":"application/json"},success:e.success,error:e.error};o.vF.debug("Call uploadPushTokenToServer",e);var d=i.RD.bind(this,l,s.jz.UPLOAD_PUSH_TOKEN);return i.Wp.retryPromise(d).then((function(e){var t=e.entities[0]||{};return{type:e.type,data:t}}))}},7029:function(e,t,r){"use strict";var n=r(8981),i=r(5610),o=r(6198),s=r(4606),a=Math.min;e.exports=[].copyWithin||function(e,t){var r=n(this),u=o(r),c=i(e,u),l=i(t,u),d=arguments.length>2?arguments[2]:void 0,f=a((void 0===d?u:i(d,u))-l,u-c),h=1;for(l<c&&c<l+f&&(h=-1,l+=f-1,c+=f-1);f-- >0;)l in r?r[c]=r[l]:s(r,c),c+=h,l+=h;return r}},7040:function(e,t,r){"use strict";var n=r(4495);e.exports=n&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},7055:function(e,t,r){"use strict";var n=r(9504),i=r(9039),o=r(2195),s=Object,a=n("".split);e.exports=i((function(){return!s("z").propertyIsEnumerable(0)}))?function(e){return"String"===o(e)?a(e,""):s(e)}:s},7087:function(e,t,r){"use strict";r.d(t,{Z:function(){return i}}),r(9089),r(9449);var n=r(4269);function i(e){var t,r="image/gif"===e.file.filetype||(null===(t=e.file.filename)||void 0===t?void 0:t.toLowerCase().endsWith(".gif")),i=r||!!e.isOriginalImage;return{id:n.Wp.getUniqueId(),chatType:e.chatType,type:"img",to:e.to,from:e.from||"",file:{url:"",filename:e.file.filename,filetype:e.file.filetype||"",data:e.file.data||void 0},filename:e.file.filename,filetype:e.file.filetype||"",width:e.width,height:e.height,file_length:e.file.size,ext:e.ext,time:Date.now(),msgConfig:e.msgConfig,onFileUploadError:e.onFileUploadError,onFileUploadComplete:e.onFileUploadComplete,onFileUploadProgress:e.onFileUploadProgress,isChatThread:e.isChatThread,priority:e.priority,deliverOnlineOnly:e.deliverOnlineOnly,receiverList:e.receiverList,isGif:r,isOriginalImage:i,_useInternalUpload:!!e.file.path||void 0,_filePath:e.file.path}}},7120:function(e,t,r){"use strict";r.d(t,{G:function(){return n}});var n=2},7208:function(e,t,r){"use strict";var n=r(6518),i=r(9565);n({target:"URL",proto:!0,enumerable:!0},{toJSON:function(){return i(URL.prototype.toString,this)}})},7209:function(e,t,r){"use strict";e.exports=o,o.className="ReflectionObject";var n,i=r(3262);function o(e,t){if(!i.isString(e))throw TypeError("name must be a string");if(t&&!i.isObject(t))throw TypeError("options must be an object");this.options=t,this.parsedOptions=null,this.name=e,this.parent=null,this.resolved=!1,this.comment=null,this.filename=null}Object.defineProperties(o.prototype,{root:{get:function(){for(var e=this;null!==e.parent;)e=e.parent;return e}},fullName:{get:function(){for(var e=[this.name],t=this.parent;t;)e.unshift(t.name),t=t.parent;return e.join(".")}}}),o.prototype.toJSON=function(){throw Error()},o.prototype.onAdd=function(e){this.parent&&this.parent!==e&&this.parent.remove(this),this.parent=e,this.resolved=!1;var t=e.root;t instanceof n&&t._handleAdd(this)},o.prototype.onRemove=function(e){var t=e.root;t instanceof n&&t._handleRemove(this),this.parent=null,this.resolved=!1},o.prototype.resolve=function(){return this.resolved||this.root instanceof n&&(this.resolved=!0),this},o.prototype.getOption=function(e){if(this.options)return this.options[e]},o.prototype.setOption=function(e,t,r){return r&&this.options&&void 0!==this.options[e]||((this.options||(this.options={}))[e]=t),this},o.prototype.setParsedOption=function(e,t,r){this.parsedOptions||(this.parsedOptions=[]);var n=this.parsedOptions;if(r){var o=n.find((function(t){return Object.prototype.hasOwnProperty.call(t,e)}));if(o){var s=o[e];i.setProperty(s,r,t)}else(o={})[e]=i.setProperty({},r,t),n.push(o)}else{var a={};a[e]=t,n.push(a)}return this},o.prototype.setOptions=function(e,t){if(e)for(var r=Object.keys(e),n=0;n<r.length;++n)this.setOption(r[n],e[r[n]],t);return this},o.prototype.toString=function(){var e=this.constructor.className,t=this.fullName;return t.length?e+" "+t:e},o._configure=function(e){n=e}},7301:function(e,t,r){"use strict";var n=r(4644),i=r(9213).some,o=n.aTypedArray;(0,n.exportTypedArrayMethod)("some",(function(e){return i(o(this),e,arguments.length>1?arguments[1]:void 0)}))},7323:function(e,t,r){"use strict";var n,i,o=r(9565),s=r(9504),a=r(655),u=r(7979),c=r(8429),l=r(5745),d=r(2360),f=r(1181).get,h=r(3635),p=r(8814),v=l("native-string-replace",String.prototype.replace),m=RegExp.prototype.exec,_=m,g=s("".charAt),E=s("".indexOf),y=s("".replace),O=s("".slice),T=(i=/b*/g,o(m,n=/a/,"a"),o(m,i,"a"),0!==n.lastIndex||0!==i.lastIndex),R=c.BROKEN_CARET,I=void 0!==/()??/.exec("")[1];(T||I||R||h||p)&&(_=function(e){var t,r,n,i,s,c,l,h=this,p=f(h),S=a(e),C=p.raw;if(C)return C.lastIndex=h.lastIndex,t=o(_,C,S),h.lastIndex=C.lastIndex,t;var b=p.groups,N=R&&h.sticky,A=o(u,h),M=h.source,w=0,L=S;if(N&&(A=y(A,"y",""),-1===E(A,"g")&&(A+="g"),L=O(S,h.lastIndex),h.lastIndex>0&&(!h.multiline||h.multiline&&"\n"!==g(S,h.lastIndex-1))&&(M="(?: "+M+")",L=" "+L,w++),r=new RegExp("^(?:"+M+")",A)),I&&(r=new RegExp("^"+M+"$(?!\\s)",A)),T&&(n=h.lastIndex),i=o(m,N?r:h,L),N?i?(i.input=O(i.input,w),i[0]=O(i[0],w),i.index=h.lastIndex,h.lastIndex+=i[0].length):h.lastIndex=0:T&&i&&(h.lastIndex=h.global?i.index+i[0].length:n),I&&i&&i.length>1&&o(v,i[0],r,(function(){for(s=1;s<arguments.length-2;s++)void 0===arguments[s]&&(i[s]=void 0)})),i&&b)for(i.groups=c=d(null),s=0;s<b.length;s++)c[(l=b[s])[0]]=i[l[1]];return i}),e.exports=_},7337:function(e,t,r){"use strict";var n=r(6518),i=r(9504),o=r(5610),s=RangeError,a=String.fromCharCode,u=String.fromCodePoint,c=i([].join);n({target:"String",stat:!0,arity:1,forced:!!u&&1!==u.length},{fromCodePoint:function(e){for(var t,r=[],n=arguments.length,i=0;n>i;){if(t=+arguments[i++],o(t,1114111)!==t)throw new s(t+" is not a valid code point");r[i]=t<65536?a(t):a(55296+((t-=65536)>>10),t%1024+56320)}return c(r,"")}})},7347:function(e,t,r){"use strict";var n=r(3724),i=r(9565),o=r(8773),s=r(6980),a=r(5397),u=r(6969),c=r(9297),l=r(5917),d=Object.getOwnPropertyDescriptor;t.f=n?d:function(e,t){if(e=a(e),t=u(t),l)try{return d(e,t)}catch(e){}if(c(e,t))return s(!i(o.f,e,t),e[t])}},7400:function(e){"use strict";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}},7416:function(e,t,r){"use strict";var n=r(9039),i=r(8227),o=r(3724),s=r(6395),a=i("iterator");e.exports=!n((function(){var e=new URL("b?a=1&b=2&c=3","https://a"),t=e.searchParams,r=new URLSearchParams("a=1&a=2&b=3"),n="";return e.pathname="c%20d",t.forEach((function(e,r){t.delete("b"),n+=r+e})),r.delete("a",2),r.delete("b",void 0),s&&(!e.toJSON||!r.has("a",1)||r.has("a",2)||!r.has("a",void 0)||r.has("b"))||!t.size&&(s||!o)||!t.sort||"https://a/c%20d?a=1&c=3"!==e.href||"3"!==t.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!t[a]||"a"!==new URL("https://a@b").username||"b"!==new URLSearchParams(new URLSearchParams("a=b")).get("a")||"xn--e1aybc"!==new URL("https://тест").host||"#%D0%B1"!==new URL("https://a#б").hash||"a1c3"!==n||"x"!==new URL("https://x",void 0).host}))},7433:function(e,t,r){"use strict";var n=r(4376),i=r(3517),o=r(34),s=r(8227)("species"),a=Array;e.exports=function(e){var t;return n(e)&&(t=e.constructor,(i(t)&&(t===a||n(t.prototype))||o(t)&&null===(t=t[s]))&&(t=void 0)),void 0===t?a:t}},7452:function(e){"use strict";e.exports="\t\n\v\f\r \u2028\u2029\ufeff"},7468:function(e,t,r){"use strict";var n;r.d(t,{P:function(){return n}}),r(3484),function(e){e[e.SYNC_INIT=0]="SYNC_INIT",e[e.SYNC_START=1]="SYNC_START",e[e.SYNC_FINISH=2]="SYNC_FINISH"}(n||(n={}))},7476:function(e,t,r){"use strict";var n=r(2195),i=r(9504);e.exports=function(e){if("Function"===n(e))return i(e)}},7495:function(e,t,r){"use strict";var n=r(6518),i=r(7323);n({target:"RegExp",proto:!0,forced:/./.exec!==i},{exec:i})},7507:function(e,t,r){"use strict";r.d(t,{Hc:function(){return h},iK:function(){return f},mr:function(){return d},v7:function(){return l}}),r(8706),r(3288),r(9085),r(9432),r(6099),r(3362);var n=r(8093),i=r(7968),o=r(4269),s=r(3603),a=r(4331),u=r(8288),c=function(){return c=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},c.apply(this,arguments)};function l(){var e=this.context,t=e.orgName,r=e.appName,n=e.accessToken,a={url:"".concat(this.apiUrl,"/").concat(t,"/").concat(r,"/sdk/chatfiles/part-upload"),dataType:"json",type:"POST",headers:{Authorization:"Bearer "+n}};return i.vF.debug("Call multipartInit"),o.RD.call(this,a,s.jz.SDK_INTERNAL).then((function(e){var t=e.entities[0];return{data:{fileMaxSize:t.file_upper_limit,partMinSize:t.part_lower_limit,uuid:t.uuid},extraInfo:e.extraInfo,type:e.type}}))}function d(e){var t=this;return new Promise((function(r,o){var s,u,l=(new Date).getTime(),d=t.context,f=d.orgName,h=d.appName,p=d.accessToken,v=e.uuid,m=e.partNumber,_=e.part,g=e.onProgress,E="".concat(t.apiUrl,"/").concat(f,"/").concat(h,"/sdk/chatfiles/part-upload/").concat(v),y=new XMLHttpRequest;i.vF.debug("Call multipartUpload"),y.upload&&(null===(u=(s=y.upload).addEventListener)||void 0===u||u.call(s,"progress",(function(e){null==g||g(e)}),!1)),y.addEventListener("abort",(function(){o({type:n.C.REQUEST_ABORT,message:"Request Abort",errorType:"onabort",xhr:y,extraInfo:{elapse:(new Date).getTime()-l,httpCode:y.status||-1,errDesc:"Request Abort",url:E}})}),!1),y.addEventListener("error",(function(){o({type:n.C.WEBIM_UPLOADFILE_ERROR,data:y,extraInfo:{elapse:(new Date).getTime()-l,httpCode:y.status||-1,errDesc:"request error",url:E}})}),!1),y.addEventListener("load",(function(){try{var e=JSON.parse(y.responseText);if(200!==y.status)return o({type:n.C.WEBIM_UPLOADFILE_ERROR,data:e,extraInfo:{elapse:(new Date).getTime()-l,httpCode:y.status||-1,errDesc:"part upload failed",url:E}}),!1;try{r(c(c({},e),{extraInfo:{elapse:(new Date).getTime()-l,httpCode:y.status||-1,url:E}}))}catch(e){o({type:n.C.WEBIM_CONNCTION_CALLBACK_INNER_ERROR,data:e,extraInfo:{elapse:(new Date).getTime()-l,httpCode:y.status||-1,errDesc:"part upload failed",url:E}})}}catch(e){o({type:n.C.WEBIM_UPLOADFILE_ERROR,data:y.responseText,extraInfo:{elapse:(new Date).getTime()-l,httpCode:y.status||-1,errDesc:"part upload failed",url:E}})}}),!1),y.addEventListener("timeout",(function(){o({type:n.C.REQUEST_TIMEOUT,message:"request timeout",extraInfo:{elapse:(new Date).getTime()-l,httpCode:y.status||-1,errDesc:"request timeout",url:E}})}),!1);var O=new FormData;O.append("part_file",_),O.append("part_number",m),y.timeout=a.Gc,y.open("PUT",E),y.setRequestHeader("restrict-access","true"),y.setRequestHeader("Accept","*/*"),y.setRequestHeader("Authorization","Bearer "+p),y.send(O)}))}function f(e){var t=e.uuid,r=e.thumbnailHeight,n=e.thumbnailWidth,a=e.conversationInfo,c=e.uploadMd5,l=e.uploadImageType,d=e.imageWidth,f=e.imageHeight,h=a.conversationId,p=a.conversationType,v=u.Z2[p],m=this.context,_=m.orgName,g=m.appName,E=m.accessToken,y="".concat(this.apiUrl,"/").concat(_,"/").concat(g,"/sdk/chatfiles/part-upload/").concat(t,"?restrict-access=true&chat-type=").concat(v,"&chat-target=").concat(h);n&&(y+="&thumbnail-width=".concat(n)),r&&(y+="&thumbnail-height=".concat(r)),c&&(y+="&md5=".concat(encodeURIComponent(c))),l&&(y+="&imagetype=".concat(l),"number"==typeof d&&d>0&&(y+="&width=".concat(d)),"number"==typeof f&&f>0&&(y+="&height=".concat(f)));var O={url:y,dataType:"json",type:"POST",headers:{Authorization:"Bearer "+E}};return i.vF.debug("Call multipartComplete"),o.RD.call(this,O,s.jz.SDK_INTERNAL)}function h(e){var t=e.uuid,r=this.context,n=r.orgName,a=r.appName,u=r.accessToken,c={url:"".concat(this.apiUrl,"/").concat(n,"/").concat(a,"/sdk/chatfiles/part-upload/").concat(t),dataType:"json",type:"DELETE",headers:{Authorization:"Bearer "+u}};return i.vF.debug("Call multipartAbort"),o.RD.call(this,c,s.jz.SDK_INTERNAL)}},7535:function(e,t,r){"use strict";r.d(t,{Q:function(){return _}});var n=r(4269),i=r(4035),o=r(707),s=r(9532),a=r(6496),u=r(8307),c=r(3312),l=r(859),d=r(208),f=r(810),h=r(6448),p=r(4917),v=r(7087),m=r(4478),_=function(){function e(t,r){return this.type=t,this.id=r||n.Wp.getUniqueId(),e.createOldMsg({type:t,id:this.id})}return e.createOldMsg=function(e){switch(e.type){case"read":return new i.Z({type:"read",id:e.id});case"delivery":return new o.r({type:"delivery",id:e.id});case"channel":return new s.c({type:"channel",id:e.id});case"txt":return new a.E({type:"txt",id:e.id});case"cmd":return new u.z({type:"cmd",id:e.id});case"custom":return new c.S({type:"custom",id:e.id});case"loc":return new l.a({type:"loc",id:e.id});case"img":return new d.E({type:"img",id:e.id});case"audio":return new f.f({type:"audio",id:e.id});case"video":return new h.C({type:"video",id:e.id});case"file":return new p.i({type:"file",id:e.id})}},e.create=function(e){return"txt"!==(t=e).type||"version"in t?function(e){return"img"===e.type&&!("version"in e)}(e)?d.E.create(e):function(e){return"cmd"===e.type&&!("version"in e)}(e)?u.z.create(e):function(e){return"file"===e.type&&!("version"in e)}(e)?p.i.create(e):function(e){return"audio"===e.type&&!("version"in e)}(e)?f.f.create(e):function(e){return"video"===e.type&&!("version"in e)}(e)?h.C.create(e):function(e){return"custom"===e.type&&!("version"in e)}(e)?c.S.create(e):function(e){return"loc"===e.type&&!("version"in e)}(e)?l.a.create(e):function(e){return"channel"===e.type&&!("version"in e)}(e)?s.c.create(e):function(e){return"delivery"===e.type&&!("version"in e)}(e)?o.r.create(e):function(e){return"read"===e.type&&!("version"in e)}(e)?i.Z.create(e):function(e){return"combine"===e.type&&!("version"in e)}(e)?m.I.create(e):{}:a.E.create(e);var t},e.prototype.set=function(e){},e.getFileUrl=n.Wp.getFileUrl,e.createImageMessage=function(e){return(0,v.Z)(e)},e.download=n.Wp.download,e.parseDownloadResponse=n.Wp.parseDownloadResponse,e}()},7595:function(e,t,r){"use strict";e.exports=i;var n=r(3610);function i(e,t,r){if("function"!=typeof e)throw TypeError("rpcImpl must be a function");n.EventEmitter.call(this),this.rpcImpl=e,this.requestDelimited=Boolean(t),this.responseDelimited=Boolean(r)}(i.prototype=Object.create(n.EventEmitter.prototype)).constructor=i,i.prototype.rpcCall=function e(t,r,i,o,s){if(!o)throw TypeError("request must be specified");var a=this;if(!s)return n.asPromise(e,a,t,r,i,o);if(a.rpcImpl)try{return a.rpcImpl(t,r[a.requestDelimited?"encodeDelimited":"encode"](o).finish(),(function(e,r){if(e)return a.emit("error",e,t),s(e);if(null!==r){if(!(r instanceof i))try{r=i[a.responseDelimited?"decodeDelimited":"decode"](r)}catch(e){return a.emit("error",e,t),s(e)}return a.emit("data",r,t),s(null,r)}a.end(!0)}))}catch(e){return a.emit("error",e,t),void setTimeout((function(){s(e)}),0)}else setTimeout((function(){s(Error("already ended"))}),0)},i.prototype.end=function(e){return this.rpcImpl&&(e||this.rpcImpl(null,null,null),this.rpcImpl=null,this.emit("end").off()),this}},7629:function(e,t,r){"use strict";var n=r(6395),i=r(4576),o=r(9433),s="__core-js_shared__",a=e.exports=i[s]||o(s,{});(a.versions||(a.versions=[])).push({version:"3.42.0",mode:n?"pure":"global",copyright:"© 2014-2025 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.42.0/LICENSE",source:"https://github.com/zloirock/core-js"})},7633:function(e,t,r){"use strict";var n=r(7751),i=r(2106),o=r(8227),s=r(3724),a=o("species");e.exports=function(e){var t=n(e);s&&t&&!t[a]&&i(t,a,{configurable:!0,get:function(){return this}})}},7657:function(e,t,r){"use strict";var n,i,o,s=r(9039),a=r(4901),u=r(34),c=r(2360),l=r(2787),d=r(6840),f=r(8227),h=r(6395),p=f("iterator"),v=!1;[].keys&&("next"in(o=[].keys())?(i=l(l(o)))!==Object.prototype&&(n=i):v=!0),!u(n)||s((function(){var e={};return n[p].call(e)!==e}))?n={}:h&&(n=c(n)),a(n[p])||d(n,p,(function(){return this})),e.exports={IteratorPrototype:n,BUGGY_SAFARI_ITERATORS:v}},7680:function(e,t,r){"use strict";var n=r(9504);e.exports=n([].slice)},7696:function(e,t,r){"use strict";var n=r(1291),i=r(8014),o=RangeError;e.exports=function(e){if(void 0===e)return 0;var t=n(e),r=i(t);if(t!==r)throw new o("Wrong length or index");return r}},7725:function(e,t,r){"use strict";var n=r(8093),i=r(3484),o=r(7968),s=r(3850);t.A=function(e){var t,r,a,u,c,l,d=this.root.lookup("easemob.pb.StatisticsBody").decode(e.payload),f=d.operation,h=d.reason;switch(f){case 0:this.onStatisticMessage&&this.onStatisticMessage(d),null===(t=this.eventHandler)||void 0===t||t.dispatch("onStatisticMessage",d);break;case 1:l=i.A.create({type:n.C.WEBIM_CONNCTION_USER_REMOVED,message:"user has been removed"}),this.disconnectedReason=l,this.logOut=!0,this.onError&&this.onError(l),null===(r=this.eventHandler)||void 0===r||r.dispatch("onError",l),s.P.clearAll();break;case 2:l=i.A.create({type:n.C.WEBIM_CONNCTION_USER_LOGIN_ANOTHER_DEVICE,message:"the user is already logged on another device"}),h&&(l.data={loginInfoCustomExt:d.reason}),this.disconnectedReason=l,this.logOut=!0,this.onError&&this.onError(l),null===(a=this.eventHandler)||void 0===a||a.dispatch("onError",l),s.P.clearAll();break;case 3:l=i.A.create({type:n.C.WEBIM_CONNCTION_USER_KICKED_BY_CHANGE_PASSWORD,message:"the user was kicked by changing password"}),this.disconnectedReason=l,this.logOut=!0,this.onError&&this.onError(l),null===(u=this.eventHandler)||void 0===u||u.dispatch("onError",l),s.P.clearAll();break;case 4:l=i.A.create({type:n.C.WEBIM_CONNCTION_USER_KICKED_BY_OTHER_DEVICE,message:"the user was kicked by other device"}),this.disconnectedReason=l,this.logOut=!0,this.onError&&this.onError(l),null===(c=this.eventHandler)||void 0===c||c.dispatch("onError",l),s.P.clearAll();break;default:o.vF.error("handleStatisticsMsg:",d)}}},7728:function(e,t,r){"use strict";e.exports=function(e){var t=o.codegen(["r","l"],e.name+"$decode")("if(!(r instanceof Reader))")("r=Reader.create(r)")("var c=l===undefined?r.len:r.pos+l,m=new this.ctor"+(e.fieldsArray.filter((function(e){return e.map})).length?",k,value":""))("while(r.pos<c){")("var t=r.uint32()");e.group&&t("if((t&7)===4)")("break"),t("switch(t>>>3){");for(var r=0;r<e.fieldsArray.length;++r){var a=e._fieldsArray[r].resolve(),u=a.resolvedType instanceof n?"int32":a.type,c="m"+o.safeProp(a.name);t("case %i:",a.id),a.map?(t("if(%s===util.emptyObject)",c)("%s={}",c)("var c2 = r.uint32()+r.pos"),void 0!==i.defaults[a.keyType]?t("k=%j",i.defaults[a.keyType]):t("k=null"),void 0!==i.defaults[u]?t("value=%j",i.defaults[u]):t("value=null"),t("while(r.pos<c2){")("var tag2=r.uint32()")("switch(tag2>>>3){")("case 1: k=r.%s(); break",a.keyType)("case 2:"),void 0===i.basic[u]?t("value=types[%i].decode(r,r.uint32())",r):t("value=r.%s()",u),t("break")("default:")("r.skipType(tag2&7)")("break")("}")("}"),void 0!==i.long[a.keyType]?t('%s[typeof k==="object"?util.longToHash(k):k]=value',c):t("%s[k]=value",c)):a.repeated?(t("if(!(%s&&%s.length))",c,c)("%s=[]",c),void 0!==i.packed[u]&&t("if((t&7)===2){")("var c2=r.uint32()+r.pos")("while(r.pos<c2)")("%s.push(r.%s())",c,u)("}else"),void 0===i.basic[u]?t(a.resolvedType.group?"%s.push(types[%i].decode(r))":"%s.push(types[%i].decode(r,r.uint32()))",c,r):t("%s.push(r.%s())",c,u)):void 0===i.basic[u]?t(a.resolvedType.group?"%s=types[%i].decode(r)":"%s=types[%i].decode(r,r.uint32())",c,r):t("%s=r.%s()",c,u),t("break")}for(t("default:")("r.skipType(t&7)")("break")("}")("}"),r=0;r<e._fieldsArray.length;++r){var l=e._fieldsArray[r];l.required&&t("if(!m.hasOwnProperty(%j))",l.name)("throw util.ProtocolError(%j,{instance:m})",s(l))}return t("return m")};var n=r(5643),i=r(361),o=r(3262);function s(e){return"missing required '"+e.name+"'"}},7740:function(e,t,r){"use strict";var n=r(9297),i=r(5031),o=r(7347),s=r(4913);e.exports=function(e,t,r){for(var a=i(t),u=s.f,c=o.f,l=0;l<a.length;l++){var d=a[l];n(e,d)||r&&n(r,d)||u(e,d,c(t,d))}}},7743:function(e,t,r){"use strict";var n=r(6518),i=r(9565),o=r(9306),s=r(6043),a=r(1103),u=r(2652);n({target:"Promise",stat:!0,forced:r(537)},{race:function(e){var t=this,r=s.f(t),n=r.reject,c=a((function(){var s=o(t.resolve);u(e,(function(e){i(s,t,e).then(r.resolve,n)}))}));return c.error&&n(c.value),r.promise}})},7750:function(e,t,r){"use strict";var n=r(4117),i=TypeError;e.exports=function(e){if(n(e))throw new i("Can't call method on "+e);return e}},7751:function(e,t,r){"use strict";var n=r(4576),i=r(4901);e.exports=function(e,t){return arguments.length<2?(r=n[e],i(r)?r:void 0):n[e]&&n[e][t];var r}},7764:function(e,t,r){"use strict";var n=r(8183).charAt,i=r(655),o=r(1181),s=r(1088),a=r(2529),u="String Iterator",c=o.set,l=o.getterFor(u);s(String,"String",(function(e){c(this,{type:u,string:i(e),index:0})}),(function(){var e,t=l(this),r=t.string,i=t.index;return i>=r.length?a(void 0,!0):(e=n(r,i),t.index+=e.length,a(e,!1))}))},7782:function(e){"use strict";e.exports=Math.sign||function(e){var t=+e;return 0===t||t!=t?t:t<0?-1:1}},7811:function(e){"use strict";e.exports="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView},7812:function(e,t,r){"use strict";var n=r(6518),i=r(9297),o=r(757),s=r(6823),a=r(5745),u=r(1296),c=a("symbol-to-string-registry");n({target:"Symbol",stat:!0,forced:!u},{keyFor:function(e){if(!o(e))throw new TypeError(s(e)+" is not a symbol");if(i(c,e))return c[e]}})},7829:function(e,t,r){"use strict";var n=r(8183).charAt;e.exports=function(e,t,r){return t+(r?n(e,t).length:1)}},7860:function(e,t,r){"use strict";var n=r(2839);e.exports=/web0s(?!.*chrome)/i.test(n)},7882:function(e,t,r){"use strict";e.exports=g;var n=r(8923);((g.prototype=Object.create(n.prototype)).constructor=g).className="Type";var i=r(5643),o=r(1457),s=r(1344),a=r(8252),u=r(9687),c=r(2551),l=r(6237),d=r(3449),f=r(3262),h=r(1080),p=r(7728),v=r(420),m=r(744),_=r(6434);function g(e,t){n.call(this,e,t),this.fields={},this.oneofs=void 0,this.extensions=void 0,this.reserved=void 0,this.group=void 0,this._fieldsById=null,this._fieldsArray=null,this._oneofsArray=null,this._ctor=null}function E(e){return e._fieldsById=e._fieldsArray=e._oneofsArray=null,delete e.encode,delete e.decode,delete e.verify,e}Object.defineProperties(g.prototype,{fieldsById:{get:function(){if(this._fieldsById)return this._fieldsById;this._fieldsById={};for(var e=Object.keys(this.fields),t=0;t<e.length;++t){var r=this.fields[e[t]],n=r.id;if(this._fieldsById[n])throw Error("duplicate id "+n+" in "+this);this._fieldsById[n]=r}return this._fieldsById}},fieldsArray:{get:function(){return this._fieldsArray||(this._fieldsArray=f.toArray(this.fields))}},oneofsArray:{get:function(){return this._oneofsArray||(this._oneofsArray=f.toArray(this.oneofs))}},ctor:{get:function(){return this._ctor||(this.ctor=g.generateConstructor(this)())},set:function(e){var t=e.prototype;t instanceof c||((e.prototype=new c).constructor=e,f.merge(e.prototype,t)),e.$type=e.prototype.$type=this,f.merge(e,c,!0),this._ctor=e;for(var r=0;r<this.fieldsArray.length;++r)this._fieldsArray[r].resolve();var n={};for(r=0;r<this.oneofsArray.length;++r)n[this._oneofsArray[r].resolve().name]={get:f.oneOfGetter(this._oneofsArray[r].oneof),set:f.oneOfSetter(this._oneofsArray[r].oneof)};r&&Object.defineProperties(e.prototype,n)}}}),g.generateConstructor=function(e){for(var t,r=f.codegen(["p"],e.name),n=0;n<e.fieldsArray.length;++n)(t=e._fieldsArray[n]).map?r("this%s={}",f.safeProp(t.name)):t.repeated&&r("this%s=[]",f.safeProp(t.name));return r("if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)")("this[ks[i]]=p[ks[i]]")},g.fromJSON=function(e,t){var r=new g(e,t.options);r.extensions=t.extensions,r.reserved=t.reserved;for(var c=Object.keys(t.fields),l=0;l<c.length;++l)r.add((void 0!==t.fields[c[l]].keyType?a.fromJSON:s.fromJSON)(c[l],t.fields[c[l]]));if(t.oneofs)for(c=Object.keys(t.oneofs),l=0;l<c.length;++l)r.add(o.fromJSON(c[l],t.oneofs[c[l]]));if(t.nested)for(c=Object.keys(t.nested),l=0;l<c.length;++l){var d=t.nested[c[l]];r.add((void 0!==d.id?s.fromJSON:void 0!==d.fields?g.fromJSON:void 0!==d.values?i.fromJSON:void 0!==d.methods?u.fromJSON:n.fromJSON)(c[l],d))}return t.extensions&&t.extensions.length&&(r.extensions=t.extensions),t.reserved&&t.reserved.length&&(r.reserved=t.reserved),t.group&&(r.group=!0),t.comment&&(r.comment=t.comment),r},g.prototype.toJSON=function(e){var t=n.prototype.toJSON.call(this,e),r=!!e&&Boolean(e.keepComments);return f.toObject(["options",t&&t.options||void 0,"oneofs",n.arrayToJSON(this.oneofsArray,e),"fields",n.arrayToJSON(this.fieldsArray.filter((function(e){return!e.declaringField})),e)||{},"extensions",this.extensions&&this.extensions.length?this.extensions:void 0,"reserved",this.reserved&&this.reserved.length?this.reserved:void 0,"group",this.group||void 0,"nested",t&&t.nested||void 0,"comment",r?this.comment:void 0])},g.prototype.resolveAll=function(){for(var e=this.fieldsArray,t=0;t<e.length;)e[t++].resolve();var r=this.oneofsArray;for(t=0;t<r.length;)r[t++].resolve();return n.prototype.resolveAll.call(this)},g.prototype.get=function(e){return this.fields[e]||this.oneofs&&this.oneofs[e]||this.nested&&this.nested[e]||null},g.prototype.add=function(e){if(this.get(e.name))throw Error("duplicate name '"+e.name+"' in "+this);if(e instanceof s&&void 0===e.extend){if(this._fieldsById?this._fieldsById[e.id]:this.fieldsById[e.id])throw Error("duplicate id "+e.id+" in "+this);if(this.isReservedId(e.id))throw Error("id "+e.id+" is reserved in "+this);if(this.isReservedName(e.name))throw Error("name '"+e.name+"' is reserved in "+this);return e.parent&&e.parent.remove(e),this.fields[e.name]=e,e.message=this,e.onAdd(this),E(this)}return e instanceof o?(this.oneofs||(this.oneofs={}),this.oneofs[e.name]=e,e.onAdd(this),E(this)):n.prototype.add.call(this,e)},g.prototype.remove=function(e){if(e instanceof s&&void 0===e.extend){if(!this.fields||this.fields[e.name]!==e)throw Error(e+" is not a member of "+this);return delete this.fields[e.name],e.parent=null,e.onRemove(this),E(this)}if(e instanceof o){if(!this.oneofs||this.oneofs[e.name]!==e)throw Error(e+" is not a member of "+this);return delete this.oneofs[e.name],e.parent=null,e.onRemove(this),E(this)}return n.prototype.remove.call(this,e)},g.prototype.isReservedId=function(e){return n.isReservedId(this.reserved,e)},g.prototype.isReservedName=function(e){return n.isReservedName(this.reserved,e)},g.prototype.create=function(e){return new this.ctor(e)},g.prototype.setup=function(){for(var e=this.fullName,t=[],r=0;r<this.fieldsArray.length;++r)t.push(this._fieldsArray[r].resolve().resolvedType);this.encode=h(this)({Writer:d,types:t,util:f}),this.decode=p(this)({Reader:l,types:t,util:f}),this.verify=v(this)({types:t,util:f}),this.fromObject=m.fromObject(this)({types:t,util:f}),this.toObject=m.toObject(this)({types:t,util:f});var n=_[e];if(n){var i=Object.create(this);i.fromObject=this.fromObject,this.fromObject=n.fromObject.bind(i),i.toObject=this.toObject,this.toObject=n.toObject.bind(i)}return this},g.prototype.encode=function(e,t){return this.setup().encode(e,t)},g.prototype.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},g.prototype.decode=function(e,t){return this.setup().decode(e,t)},g.prototype.decodeDelimited=function(e){return e instanceof l||(e=l.create(e)),this.decode(e,e.uint32())},g.prototype.verify=function(e){return this.setup().verify(e)},g.prototype.fromObject=function(e){return this.setup().fromObject(e)},g.prototype.toObject=function(e,t){return this.setup().toObject(e,t)},g.d=function(e){return function(t){f.decorateType(t,e)}}},7916:function(e,t,r){"use strict";var n=r(6080),i=r(9565),o=r(8981),s=r(6319),a=r(4209),u=r(3517),c=r(6198),l=r(4659),d=r(81),f=r(851),h=Array;e.exports=function(e){var t=o(e),r=u(this),p=arguments.length,v=p>1?arguments[1]:void 0,m=void 0!==v;m&&(v=n(v,p>2?arguments[2]:void 0));var _,g,E,y,O,T,R=f(t),I=0;if(!R||this===h&&a(R))for(_=c(t),g=r?new this(_):h(_);_>I;I++)T=m?v(t[I],I):t[I],l(g,I,T);else for(g=r?new this:[],O=(y=d(t,R)).next;!(E=i(O,y)).done;I++)T=m?s(y,v,[E.value,I],!0):E.value,l(g,I,T);return g.length=I,g}},7968:function(e,t,r){"use strict";r.d(t,{vF:function(){return p}}),r(2675),r(9463),r(2259),r(8706),r(1629),r(5276),r(3792),r(8598),r(4782),r(9089),r(739),r(3288),r(4170),r(2010),r(6099),r(3362),r(7495),r(7764),r(2953),r(6031),r(3296),r(7208),r(8408);var n=r(4494),i=r(4269);function o(e){return o="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},o(e)}var s,a=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function s(e){try{u(n.next(e))}catch(e){o(e)}}function a(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}u((n=n.apply(e,t||[])).next())}))},u=function(e,t){var r,n,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;s;)try{if(r=1,n&&(i=2&o[0]?n.return:o[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,o[1])).done)return i;switch(n=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,n=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],n=0}finally{r=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}},c=function(){},l={};!function(e){e[e.TRACE=0]="TRACE",e[e.DEBUG=1]="DEBUG",e[e.INFO=2]="INFO",e[e.WARN=3]="WARN",e[e.ERROR=4]="ERROR",e[e.SILENT=5]="SILENT"}(s||(s={}));var d=function(){function e(e,t,r){this.name=e||"defaultLogger",this.currentLevel=0,this.useCookiePersist=!1,this.storageLogLevelKey="loglevel",this.levels=s,this.consoleLogVisibility=!0,this.logMethods=["trace","debug","info","warn","error"],this.methodFactory=r||this.defaultMethodFactory,this.report=!1;var n=this._getPersistedLevel();null==n&&(n=null===t?"WARN":t),this.logs=[],this.reportLogs=[],this.reportInterval=3e5,this.timer=null,this.config={useCache:!1,maxCache:3145728,color:"",background:""},this.logBytes=0,this.setLevel(n,!1,"")}return e.prototype.reportLog=function(){var e,t,r;return a(this,void 0,void 0,(function(){var n,o,s,a,c,l,d,f;return u(this,(function(u){switch(u.label){case 0:if(0===(null===(e=this.reportLogs)||void 0===e?void 0:e.length))return[2];for(n=2097152,o=this.reportLogs.join("\n")+"\n",s=o.length,a=[];s>n;)a.push(o.substring(0,n)),s-=n,o=o.substring(n);a.push(o),c=0,l=a,u.label=1;case 1:if(!(c<l.length))return[3,8];if(d=l[c],this.reportLogs=[],!(null===(r=null===(t=this.connection)||void 0===t?void 0:t.context)||void 0===r?void 0:r.accessToken))return[2];u.label=2;case 2:return u.trys.push([2,4,,5]),[4,this.reportData(d)];case 3:return"ok"!==(null==(f=u.sent())?void 0:f.status)&&this.reportLogs.unshift(d),[3,5];case 4:return u.sent(),this.reportLogs.unshift(d),[3,5];case 5:return[4,i.Wp.delay(3e3)];case 6:u.sent(),u.label=7;case 7:return c++,[3,1];case 8:return[2]}}))}))},e.prototype.reportData=function(e){var t,r=this;if(this.connection){var n=this.connection.context||{},o=n.orgName,s=n.appName,a=n.accessToken,u=n.userId;if(o&&s){var c={url:"".concat(null===(t=this.connection)||void 0===t?void 0:t.apiUrl,"/").concat(o,"/").concat(s,"/sdk/users/").concat(u,"/client/logs"),type:"POST",data:JSON.stringify({resource:this.connection.clientResource||"random_".concat(Date.now()),logContent:e}),dataType:"json",headers:{Authorization:"Bearer "+a,"Content-Type":"application/json"}};return i.RD.call(this.connection,c).then((function(e){return r.log("report log success",e),e})).catch((function(e){r.error("report log error",e)}))}}else this.error("report log error","connection is null")},e.prototype._regularlyReportLogs=function(){var e,t=this;this.timer&&clearInterval(this.timer),(null!==(e=this.reportInterval)&&void 0!==e?e:0)<6e4&&(this.reportInterval=6e4),this.timer=setInterval((function(){t.reportLog()}),this.reportInterval||3e5)},e.prototype._stopReportLogs=function(){return a(this,void 0,void 0,(function(){return u(this,(function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),[4,this.reportLog()];case 1:return e.sent(),[3,3];case 2:return e.sent(),this.error("report log error when stopping upload"),[3,3];case 3:return this.reportLogs=[],clearInterval(this.timer),[2]}}))}))},e.prototype.setConfig=function(e){this.config=e},e.prototype.getLevel=function(){return this.currentLevel},e.prototype.setLevel=function(e,t,r){if("string"==typeof e&&(e=s[e]),void 0===e&&(e=0),!("number"==typeof e&&e>=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<s.SILENT)throw Error("No console available for logging")},e.prototype.setDefaultLevel=function(e){this._getPersistedLevel()||this.setLevel(e,!1,"")},e.prototype.enableAll=function(e){this.setLevel(this.levels.TRACE,!0,"")},e.prototype.disableAll=function(e){this.setLevel(this.levels.SILENT,!0,"")},e.prototype.getLogs=function(){return this.logs},e.prototype.download=function(){if("undefined"!=typeof window&&"undefined"!=typeof document){var e=this.getLogs().join("\n"),t=new Blob([e],{type:"text/plain;charset=UTF-8"}),r=window.URL.createObjectURL(t),n=document.createElement("a");n.style.display="none",n.href=r,n.setAttribute("download","sdklog"),document.body.appendChild(n),n.click()}},e.prototype.setConsoleLogVisibility=function(e){this.consoleLogVisibility=e},e.prototype._bindMethod=function(e,t,r){var n=this,i=e[t],o=this.getTime();if(r)return this._cacheLog;if("function"==typeof i.bind)return function(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];var s=n.getTime();n.consoleLogVisibility&&i.call.apply(i,function(e,t,r){if(r||2===arguments.length)for(var n,i=0,o=t.length;i<o;i++)!n&&i in t||(n||(n=Array.prototype.slice.call(t,0,i)),n[i]=t[i]);return e.concat(n||Array.prototype.slice.call(t))}([e,"".concat(s," IM SDK [").concat("log"===t?"debug":t,"]: ")],r,!1)),n.onLog&&n.onLog({time:s,level:"log"===t?"debug":t,logs:r}),n._cacheReportLogs.apply(n,r)};try{return Function.prototype.bind.call(i,e,"".concat(o," IM SDK [").concat("log"===t?"debug":t,"]: "))}catch(t){return function(){return Function.prototype.apply.apply(i,[e,arguments])}}},e.prototype.getTime=function(){var e=new Date;return e.toTimeString().split(" ")[0]+":"+e.getMilliseconds()},e.prototype._cacheLog=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=(new Date).toLocaleString()+": ",n="";e.forEach((function(e){"object"===o(e)?n+=JSON.stringify(e)+" ":n+=e+" "})),this._cacheLogCall(r+n),this._cacheReportLogs.apply(this,e)},e.prototype._cacheLogCall=function(e){var t=e.length,r=this.logBytes+t,n=this.config.maxCache;if(!(t>=n)){if(r<n)this.logBytes+=t;else for(var i=r-n,o=0;o<i;){var s=this.logs.shift();void 0!==s&&(o+=s.length)}this.logs.push(e)}},e.prototype._cacheReportLogs=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(this.report){var r=(new Date).toLocaleString()+": ",n="";e.forEach((function(e){"object"===o(e)?n+=JSON.stringify(e)+" ":n+=e+" "})),this.reportLogs.push(r+n)}},e.prototype._getPersistedLevel=function(){var e;if("undefined"==typeof window)return 5;if("undefined"===(e=window&&window.localStorage&&window.localStorage[this.storageLogLevelKey])){var t=window.document.cookie,r=t.indexOf(encodeURIComponent(this.storageLogLevelKey));-1!==r&&(e=/^([^;]+)/.exec(t.slice(r))[1])}return e||5},e.prototype._persistLevel=function(e){var t=this.logMethods[e]||"SILENT";if("undefined"!=typeof window){if(window.localStorage)try{window.localStorage[this.storageLogLevelKey]=t}catch(e){console.log(e)}this.useCookiePersist&&(window.document.cookie=encodeURIComponent(this.storageLogLevelKey)+"="+t+";")}},e.prototype.replaceLoggingMethods=function(e,t){for(var r=this,n=0;n<this.logMethods.length;n++){var i=this.logMethods[n];this[i]=n<e?function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];r.report&&r._cacheReportLogs.apply(r,e)}:this.methodFactory(i,e,t)}this.log=this.debug},e.prototype.defaultMethodFactory=function(e,t,r){return this.realMethod(e)||this.enableLoggingWhenConsoleArrives.apply(this,[e,t,r])},e.prototype.realMethod=function(e){return"debug"===e&&(e="log"),"undefined"!=typeof console&&("trace"===e&&n.l?n.n:void 0!==console[e]?this._bindMethod(console,e,this.config.useCache):void 0!==console.log?this._bindMethod(console,"log",this.config.useCache):c)},e.prototype.enableLoggingWhenConsoleArrives=function(e,t,r){return function(){"undefined"!=typeof console&&(this.replaceLoggingMethods.call(this,t,r),this[e].apply(this,arguments))}.bind(this)},e}(),f=new d;f.getLogger=function(e){if("string"!=typeof e||""===e)throw new TypeError("You must supply a name when creating a logger.");return this};var h="undefined"!=typeof window?window.log:void 0;f.noConflict=function(){return"undefined"!=typeof window&&window.log===f&&(window.log=h),f},f.getLoggers=function(){return l},f.initReport=function(e){var t=e.report,r=e.reportInterval,n=e.connection;f.report=t,f.reportInterval=r,f.connection=n,t&&f._regularlyReportLogs()};var p=f},7979:function(e,t,r){"use strict";var n=r(8551);e.exports=function(){var e=n(this),t="";return e.hasIndices&&(t+="d"),e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.unicodeSets&&(t+="v"),e.sticky&&(t+="y"),t}},8014:function(e,t,r){"use strict";var n=r(1291),i=Math.min;e.exports=function(e){var t=n(e);return t>0?i(t,9007199254740991):0}},8021:function(e,t,r){"use strict";r(9089),r(3288),r(6099),r(8940),r(8781);var n=r(4706),i=function(){function e(e){e=e||{},this.seq=0,this.mid=(e.mid||1)%1023,this.timeOffset=e.timeOffset||0,this.lastTime=0}return e.prototype.gen=function(){var e=Date.now();if(this.lastTime==e){if(this.seq++,this.seq>4095){for(this.seq=0;Date.now()<=e;);e=Date.now()}}else this.seq=0;this.lastTime=e;for(var t=(e-this.timeOffset).toString(2),r=this.seq.toString(2),i=this.mid.toString(2);r.length<12;)r="0"+r;for(;i.length<10;)i="0"+i;for(var o=t+i+r,s="",a=o.length;a>0;a-=4)s=parseInt(o.substring(a-4,a),2).toString(16)+s;return(0,n.x)(s)},e}();t.A=i},8045:function(e){"use strict";e.exports=function(e,t){for(var r=new Array(arguments.length-1),n=0,i=2,o=!0;i<arguments.length;)r[n++]=arguments[i++];return new Promise((function(i,s){r[n]=function(e){if(o)if(o=!1,e)s(e);else{for(var t=new Array(arguments.length-1),r=0;r<t.length;)t[r++]=arguments[r];i.apply(null,t)}};try{e.apply(t||null,r)}catch(e){o&&(o=!1,s(e))}}))}},8093:function(e,t,r){"use strict";var n;r.d(t,{C:function(){return n}}),function(e){e[e.REQUEST_SUCCESS=0]="REQUEST_SUCCESS",e[e.REQUEST_TIMEOUT=-1]="REQUEST_TIMEOUT",e[e.REQUEST_UNKNOWN=-2]="REQUEST_UNKNOWN",e[e.REQUEST_PARAMETER_ERROR=-3]="REQUEST_PARAMETER_ERROR",e[e.REQUEST_ABORT=-4]="REQUEST_ABORT",e[e.WEBIM_CONNCTION_USER_NOT_ASSIGN_ERROR=0]="WEBIM_CONNCTION_USER_NOT_ASSIGN_ERROR",e[e.WEBIM_CONNCTION_OPEN_ERROR=1]="WEBIM_CONNCTION_OPEN_ERROR",e[e.WEBIM_CONNCTION_AUTH_ERROR=2]="WEBIM_CONNCTION_AUTH_ERROR",e[e.WEBIM_CONNCTION_OPEN_USERGRID_ERROR=3]="WEBIM_CONNCTION_OPEN_USERGRID_ERROR",e[e.WEBIM_CONNCTION_ATTACH_ERROR=4]="WEBIM_CONNCTION_ATTACH_ERROR",e[e.WEBIM_CONNCTION_ATTACH_USERGRID_ERROR=5]="WEBIM_CONNCTION_ATTACH_USERGRID_ERROR",e[e.WEBIM_CONNCTION_REOPEN_ERROR=6]="WEBIM_CONNCTION_REOPEN_ERROR",e[e.WEBIM_CONNCTION_SERVER_CLOSE_ERROR=7]="WEBIM_CONNCTION_SERVER_CLOSE_ERROR",e[e.WEBIM_CONNCTION_SERVER_ERROR=8]="WEBIM_CONNCTION_SERVER_ERROR",e[e.WEBIM_CONNCTION_IQ_ERROR=9]="WEBIM_CONNCTION_IQ_ERROR",e[e.WEBIM_CONNCTION_PING_ERROR=10]="WEBIM_CONNCTION_PING_ERROR",e[e.WEBIM_CONNCTION_NOTIFYVERSION_ERROR=11]="WEBIM_CONNCTION_NOTIFYVERSION_ERROR",e[e.WEBIM_CONNCTION_GETROSTER_ERROR=12]="WEBIM_CONNCTION_GETROSTER_ERROR",e[e.WEBIM_CONNCTION_CROSSDOMAIN_ERROR=13]="WEBIM_CONNCTION_CROSSDOMAIN_ERROR",e[e.WEBIM_CONNCTION_LISTENING_OUTOF_MAXRETRIES=14]="WEBIM_CONNCTION_LISTENING_OUTOF_MAXRETRIES",e[e.WEBIM_CONNCTION_RECEIVEMSG_CONTENTERROR=15]="WEBIM_CONNCTION_RECEIVEMSG_CONTENTERROR",e[e.WEBIM_CONNCTION_DISCONNECTED=16]="WEBIM_CONNCTION_DISCONNECTED",e[e.WEBIM_CONNCTION_AJAX_ERROR=17]="WEBIM_CONNCTION_AJAX_ERROR",e[e.WEBIM_CONNCTION_JOINROOM_ERROR=18]="WEBIM_CONNCTION_JOINROOM_ERROR",e[e.WEBIM_CONNCTION_GETROOM_ERROR=19]="WEBIM_CONNCTION_GETROOM_ERROR",e[e.WEBIM_CONNCTION_GETROOMINFO_ERROR=20]="WEBIM_CONNCTION_GETROOMINFO_ERROR",e[e.WEBIM_CONNCTION_GETROOMMEMBER_ERROR=21]="WEBIM_CONNCTION_GETROOMMEMBER_ERROR",e[e.WEBIM_CONNCTION_GETROOMOCCUPANTS_ERROR=22]="WEBIM_CONNCTION_GETROOMOCCUPANTS_ERROR",e[e.WEBIM_CONNCTION_LOAD_CHATROOM_ERROR=23]="WEBIM_CONNCTION_LOAD_CHATROOM_ERROR",e[e.WEBIM_CONNCTION_NOT_SUPPORT_CHATROOM_ERROR=24]="WEBIM_CONNCTION_NOT_SUPPORT_CHATROOM_ERROR",e[e.WEBIM_CONNCTION_JOINCHATROOM_ERROR=25]="WEBIM_CONNCTION_JOINCHATROOM_ERROR",e[e.WEBIM_CONNCTION_QUITCHATROOM_ERROR=26]="WEBIM_CONNCTION_QUITCHATROOM_ERROR",e[e.WEBIM_CONNCTION_APPKEY_NOT_ASSIGN_ERROR=27]="WEBIM_CONNCTION_APPKEY_NOT_ASSIGN_ERROR",e[e.WEBIM_CONNCTION_TOKEN_NOT_ASSIGN_ERROR=28]="WEBIM_CONNCTION_TOKEN_NOT_ASSIGN_ERROR",e[e.WEBIM_CONNCTION_SESSIONID_NOT_ASSIGN_ERROR=29]="WEBIM_CONNCTION_SESSIONID_NOT_ASSIGN_ERROR",e[e.WEBIM_CONNCTION_RID_NOT_ASSIGN_ERROR=30]="WEBIM_CONNCTION_RID_NOT_ASSIGN_ERROR",e[e.WEBIM_CONNCTION_CALLBACK_INNER_ERROR=31]="WEBIM_CONNCTION_CALLBACK_INNER_ERROR",e[e.WEBIM_CONNCTION_CLIENT_OFFLINE=32]="WEBIM_CONNCTION_CLIENT_OFFLINE",e[e.WEBIM_CONNCTION_CLIENT_LOGOUT=33]="WEBIM_CONNCTION_CLIENT_LOGOUT",e[e.WEBIM_CONNCTION_CLIENT_TOO_MUCH_ERROR=34]="WEBIM_CONNCTION_CLIENT_TOO_MUCH_ERROR",e[e.WEBIM_CONNECTION_ACCEPT_INVITATION_FROM_GROUP=35]="WEBIM_CONNECTION_ACCEPT_INVITATION_FROM_GROUP",e[e.WEBIM_CONNECTION_DECLINE_INVITATION_FROM_GROUP=36]="WEBIM_CONNECTION_DECLINE_INVITATION_FROM_GROUP",e[e.WEBIM_CONNECTION_ACCEPT_JOIN_GROUP=37]="WEBIM_CONNECTION_ACCEPT_JOIN_GROUP",e[e.WEBIM_CONNECTION_DECLINE_JOIN_GROUP=38]="WEBIM_CONNECTION_DECLINE_JOIN_GROUP",e[e.WEBIM_CONNECTION_CLOSED=39]="WEBIM_CONNECTION_CLOSED",e[e.WEBIM_CONNECTION_ERROR=40]="WEBIM_CONNECTION_ERROR",e[e.MAX_LIMIT=50]="MAX_LIMIT",e[e.MESSAGE_NOT_FOUND=51]="MESSAGE_NOT_FOUND",e[e.NO_PERMISSION=52]="NO_PERMISSION",e[e.OPERATION_UNSUPPORTED=53]="OPERATION_UNSUPPORTED",e[e.OPERATION_NOT_ALLOWED=54]="OPERATION_NOT_ALLOWED",e[e.WEBIM_TOKEN_EXPIRED=56]="WEBIM_TOKEN_EXPIRED",e[e.WEBIM_SERVER_SERVING_DISABLED=57]="WEBIM_SERVER_SERVING_DISABLED",e[e.WEBIM_UPLOADFILE_BROWSER_ERROR=100]="WEBIM_UPLOADFILE_BROWSER_ERROR",e[e.WEBIM_UPLOADFILE_ERROR=101]="WEBIM_UPLOADFILE_ERROR",e[e.WEBIM_UPLOADFILE_NO_LOGIN=102]="WEBIM_UPLOADFILE_NO_LOGIN",e[e.WEBIM_UPLOADFILE_NO_FILE=103]="WEBIM_UPLOADFILE_NO_FILE",e[e.WEBIM_DOWNLOADFILE_ERROR=200]="WEBIM_DOWNLOADFILE_ERROR",e[e.WEBIM_DOWNLOADFILE_NO_LOGIN=201]="WEBIM_DOWNLOADFILE_NO_LOGIN",e[e.WEBIM_DOWNLOADFILE_BROWSER_ERROR=202]="WEBIM_DOWNLOADFILE_BROWSER_ERROR",e[e.PARSE_FILE_ERROR=203]="PARSE_FILE_ERROR",e[e.USER_NOT_FOUND=204]="USER_NOT_FOUND",e[e.MESSAGE_PARAMETER_ERROR=205]="MESSAGE_PARAMETER_ERROR",e[e.WEBIM_CONNCTION_USER_LOGIN_ANOTHER_DEVICE=206]="WEBIM_CONNCTION_USER_LOGIN_ANOTHER_DEVICE",e[e.WEBIM_CONNCTION_USER_REMOVED=207]="WEBIM_CONNCTION_USER_REMOVED",e[e.WEBIM_USER_ALREADY_LOGIN=208]="WEBIM_USER_ALREADY_LOGIN",e[e.USER_LOGIN_TOO_MANY_DEVICES=214]="USER_LOGIN_TOO_MANY_DEVICES",e[e.WEBIM_CONNCTION_USER_KICKED_BY_CHANGE_PASSWORD=216]="WEBIM_CONNCTION_USER_KICKED_BY_CHANGE_PASSWORD",e[e.WEBIM_CONNCTION_USER_KICKED_BY_OTHER_DEVICE=217]="WEBIM_CONNCTION_USER_KICKED_BY_OTHER_DEVICE",e[e.USER_MUTED_BY_ADMIN=219]="USER_MUTED_BY_ADMIN",e[e.USER_DEVICE_CHANGED=220]="USER_DEVICE_CHANGED",e[e.USER_NOT_FRIEND=221]="USER_NOT_FRIEND",e[e.WEBIM_DOWNLOADFILE_ERROR_NO_PERMISSION=222]="WEBIM_DOWNLOADFILE_ERROR_NO_PERMISSION",e[e.WEBIM_DOWNLOADFILE_ERROR_EXPIRED=223]="WEBIM_DOWNLOADFILE_ERROR_EXPIRED",e[e.WEBIM_MESSAGE_REC_TEXT=300]="WEBIM_MESSAGE_REC_TEXT",e[e.WEBIM_MESSAGE_REC_TEXT_ERROR=301]="WEBIM_MESSAGE_REC_TEXT_ERROR",e[e.WEBIM_MESSAGE_REC_EMOTION=302]="WEBIM_MESSAGE_REC_EMOTION",e[e.WEBIM_MESSAGE_REC_PHOTO=303]="WEBIM_MESSAGE_REC_PHOTO",e[e.SERVER_GET_DNSLIST_FAILED=304]="SERVER_GET_DNSLIST_FAILED",e[e.WEBIM_MESSAGE_REC_AUDIO_FILE=305]="WEBIM_MESSAGE_REC_AUDIO_FILE",e[e.WEBIM_MESSAGE_REC_VEDIO=306]="WEBIM_MESSAGE_REC_VEDIO",e[e.WEBIM_MESSAGE_REC_VEDIO_FILE=307]="WEBIM_MESSAGE_REC_VEDIO_FILE",e[e.WEBIM_MESSAGE_REC_FILE=308]="WEBIM_MESSAGE_REC_FILE",e[e.WEBIM_MESSAGE_SED_TEXT=309]="WEBIM_MESSAGE_SED_TEXT",e[e.WEBIM_MESSAGE_SED_EMOTION=310]="WEBIM_MESSAGE_SED_EMOTION",e[e.WEBIM_MESSAGE_SED_PHOTO=311]="WEBIM_MESSAGE_SED_PHOTO",e[e.WEBIM_MESSAGE_SED_AUDIO=312]="WEBIM_MESSAGE_SED_AUDIO",e[e.WEBIM_MESSAGE_SED_AUDIO_FILE=313]="WEBIM_MESSAGE_SED_AUDIO_FILE",e[e.WEBIM_MESSAGE_SED_VEDIO=314]="WEBIM_MESSAGE_SED_VEDIO",e[e.WEBIM_MESSAGE_SED_VEDIO_FILE=315]="WEBIM_MESSAGE_SED_VEDIO_FILE",e[e.WEBIM_MESSAGE_SED_FILE=316]="WEBIM_MESSAGE_SED_FILE",e[e.WEBIM_MESSAGE_SED_ERROR=317]="WEBIM_MESSAGE_SED_ERROR",e[e.STATUS_INIT=400]="STATUS_INIT",e[e.STATUS_DOLOGIN_USERGRID=401]="STATUS_DOLOGIN_USERGRID",e[e.STATUS_DOLOGIN_IM=402]="STATUS_DOLOGIN_IM",e[e.STATUS_OPENED=403]="STATUS_OPENED",e[e.STATUS_CLOSING=404]="STATUS_CLOSING",e[e.STATUS_CLOSED=405]="STATUS_CLOSED",e[e.STATUS_ERROR=406]="STATUS_ERROR",e[e.FILE_INVALID=407]="FILE_INVALID",e[e.FILE_DURATION_TOO_LONG=408]="FILE_DURATION_TOO_LONG",e[e.FILE_VOICE_TO_TEXT_FAILED=409]="FILE_VOICE_TO_TEXT_FAILED",e[e.FILE_NOT_FOUND=410]="FILE_NOT_FOUND",e[e.FILE_TOO_LARGE=411]="FILE_TOO_LARGE",e[e.SERVER_BUSY=500]="SERVER_BUSY",e[e.MESSAGE_INCLUDE_ILLEGAL_CONTENT=501]="MESSAGE_INCLUDE_ILLEGAL_CONTENT",e[e.MESSAGE_EXTERNAL_LOGIC_BLOCKED=502]="MESSAGE_EXTERNAL_LOGIC_BLOCKED",e[e.SERVER_UNKNOWN_ERROR=503]="SERVER_UNKNOWN_ERROR",e[e.MESSAGE_RECALL_TIME_LIMIT=504]="MESSAGE_RECALL_TIME_LIMIT",e[e.SERVICE_NOT_ENABLED=505]="SERVICE_NOT_ENABLED",e[e.SERVICE_NOT_ALLOW_MESSAGING=506]="SERVICE_NOT_ALLOW_MESSAGING",e[e.SERVICE_NOT_ALLOW_MESSAGING_MUTE=507]="SERVICE_NOT_ALLOW_MESSAGING_MUTE",e[e.MESSAGE_MODERATION_BLOCKED=508]="MESSAGE_MODERATION_BLOCKED",e[e.MESSAGE_CURRENT_LIMITING=509]="MESSAGE_CURRENT_LIMITING",e[e.MESSAGE_WEBSOCKET_DISCONNECTED=510]="MESSAGE_WEBSOCKET_DISCONNECTED",e[e.MESSAGE_SIZE_LIMIT=511]="MESSAGE_SIZE_LIMIT",e[e.MESSAGE_SEND_TIMEOUT=512]="MESSAGE_SEND_TIMEOUT",e[e.MESSAGE_STREAM_INTERVAL_TIMEOUT=513]="MESSAGE_STREAM_INTERVAL_TIMEOUT",e[e.MESSAGE_STREAM_TIMEOUT=514]="MESSAGE_STREAM_TIMEOUT",e[e.GROUP_NOT_EXIST=605]="GROUP_NOT_EXIST",e[e.GROUP_NOT_JOINED=602]="GROUP_NOT_JOINED",e[e.GROUP_MEMBERS_FULL=606]="GROUP_MEMBERS_FULL",e[e.PERMISSION_DENIED=603]="PERMISSION_DENIED",e[e.WEBIM_LOAD_MSG_ERROR=604]="WEBIM_LOAD_MSG_ERROR",e[e.GROUP_ALREADY_JOINED=601]="GROUP_ALREADY_JOINED",e[e.GROUP_MEMBERS_LIMIT=607]="GROUP_MEMBERS_LIMIT",e[e.GROUP_IS_DISABLED=608]="GROUP_IS_DISABLED",e[e.GROUP_MEMBER_ATTRIBUTES_SET_FAILED=609]="GROUP_MEMBER_ATTRIBUTES_SET_FAILED",e[e.REST_PARAMS_STATUS=700]="REST_PARAMS_STATUS",e[e.CHATROOM_NOT_JOINED=702]="CHATROOM_NOT_JOINED",e[e.CHATROOM_MEMBERS_FULL=704]="CHATROOM_MEMBERS_FULL",e[e.CHATROOM_NOT_EXIST=705]="CHATROOM_NOT_EXIST",e[e.LOCAL_DB_OPERATION_FAILED=800]="LOCAL_DB_OPERATION_FAILED",e[e.SDK_RUNTIME_ERROR=999]="SDK_RUNTIME_ERROR",e[e.PRESENCE_PARAM_EXCEED=1100]="PRESENCE_PARAM_EXCEED",e[e.REACTION_ALREADY_ADDED=1101]="REACTION_ALREADY_ADDED",e[e.REACTION_CREATING=1102]="REACTION_CREATING",e[e.REACTION_OPERATION_IS_ILLEGAL=1103]="REACTION_OPERATION_IS_ILLEGAL",e[e.TRANSLATION_NOT_VALID=1200]="TRANSLATION_NOT_VALID",e[e.TRANSLATION_TEXT_TOO_LONG=1201]="TRANSLATION_TEXT_TOO_LONG",e[e.TRANSLATION_FAILED=1204]="TRANSLATION_FAILED",e[e.THREAD_NOT_EXIST=1300]="THREAD_NOT_EXIST",e[e.THREAD_ALREADY_EXIST=1301]="THREAD_ALREADY_EXIST",e[e.MODIFY_MESSAGE_NOT_EXIST=1302]="MODIFY_MESSAGE_NOT_EXIST",e[e.MODIFY_MESSAGE_FORMAT_ERROR=1303]="MODIFY_MESSAGE_FORMAT_ERROR",e[e.MODIFY_MESSAGE_FAILED=1304]="MODIFY_MESSAGE_FAILED",e[e.CONVERSATION_NOT_EXIST=1400]="CONVERSATION_NOT_EXIST"}(n||(n={}))},8183:function(e,t,r){"use strict";var n=r(9504),i=r(1291),o=r(655),s=r(7750),a=n("".charAt),u=n("".charCodeAt),c=n("".slice),l=function(e){return function(t,r){var n,l,d=o(s(t)),f=i(r),h=d.length;return f<0||f>=h?e?"":void 0:(n=u(d,f))<55296||n>56319||f+1===h||(l=u(d,f+1))<56320||l>57343?e?a(d,f):n:e?c(d,f,f+2):l-56320+(n-55296<<10)+65536}};e.exports={codeAt:l(!1),charAt:l(!0)}},8211:function(e,t,r){"use strict";r.d(t,{h:function(){return l},p:function(){return c}}),r(5276),r(2062),r(9085),r(6099);var n=r(7968),i=r(8579),o=r(4269),s=r(666),a=r(8093),u=function(){return u=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},u.apply(this,arguments)},c={chat:"singleChat",chatroom:"chatRoom",groupchat:"groupChat",singleChat:"singleChat",chatRoom:"chatRoom",groupChat:"groupChat"};function l(e,t){var r,l,d,f=t||{},h=f.formatCustomExts,p=void 0===h||h,v=f.formatChatType,m=void 0!==v&&v,_=e.id,g=e.payload,E=e.timestamp,y=e.to,O=g.bodies&&g.bodies.length>0?g.bodies[0]:{},T={},R={},I=g.type?g.type:y.indexOf("@conference.easemob.com")>-1?"groupChat":"singleChat";I="chat"===I?"singleChat":I,m&&g.type&&(I=c[g.type]);var S="";switch(O.type){case"txt":if(Object.prototype.hasOwnProperty.call(O,"subType")&&"sub_combine"===O.subType)S=i.zK.call(this,{remotePath:null==O?void 0:O.url,secret:null==O?void 0:O.secret}),T={id:_,type:"combine",chatType:I,to:g.to,from:g.from,ext:g.ext,time:E,title:O.title||"",summary:O.summary||"",url:S||"",secret:O.secret||"",file_length:O.file_length||0,filename:O.filename||"",compatibleText:O.msg,combineLevel:O.combineLevel||0};else if(T={id:_,type:"txt",chatType:I,msg:O.msg||"",to:g.to||"",from:g.from,time:E,ext:g.ext},Object.prototype.hasOwnProperty.call(O,"subType")&&"sub_stream"===O.subType&&g.stream){var C=0;switch(g.stream.stream_status){case"stream_start":C=s.J.START;break;case"stream_start_completed":C=s.J.START_AND_COMPLETED;break;case"stream_in_progress":C=s.J.IN_PROGRESS;break;case"stream_completed":case"stream_full":C=s.J.COMPLETED;break;default:C=0}var b=0;512===g.stream.stream_error?b=a.C.MESSAGE_STREAM_INTERVAL_TIMEOUT:513===g.stream.stream_error&&(b=a.C.MESSAGE_STREAM_TIMEOUT),T.stream={customType:g.stream.stream_type,status:C,errorType:b,text:O.msg,finishReason:g.stream.stream_finish_reason}}break;case"img":S=this.useOwnUploadFun?null==O?void 0:O.url:i.zK.call(this,{remotePath:null==O?void 0:O.url,secret:null==O?void 0:O.secret}),T={id:_,type:"img",chatType:I,to:g.to,from:g.from,time:E,ext:g.ext,width:(null===(r=O.size)||void 0===r?void 0:r.width)||0,height:(null===(l=O.size)||void 0===l?void 0:l.height)||0,thumb:this.useOwnUploadFun?"":"".concat(S,"&thumbnail=true"),thumb_secret:O.secret,secret:O.secret||"",url:S||"",file_length:O.file_length||0,file:{},isGif:"sub_gif"===O.subType};break;case"video":S=this.useOwnUploadFun?null==O?void 0:O.url:i.zK.call(this,{remotePath:null==O?void 0:O.url,secret:null==O?void 0:O.secret}),T={id:_,type:"video",chatType:I,from:g.from,to:g.to,thumb:o.Wp.formatAttachUrl.call(this,O.thumb),thumb_secret:O.thumb_secret||"",url:S||"",secret:O.secret||"",filename:O.filename,length:O.length||0,file:{},file_length:O.file_length||0,filetype:g.ext.file_type||"",ext:g.ext,time:E};break;case"loc":T={id:_,type:"loc",chatType:I,from:g.from,to:g.to,buildingName:O.buildingName||"",addr:O.addr,lat:O.lat,lng:O.lng,ext:g.ext,time:E};break;case"audio":S=this.useOwnUploadFun?null==O?void 0:O.url:i.zK.call(this,{remotePath:null==O?void 0:O.url,secret:null==O?void 0:O.secret}),T={id:_,type:"audio",chatType:I,from:g.from,to:g.to,secret:O.secret||"",ext:g.ext,time:E,url:S||"",file:{},filename:O.filename,length:O.length||0,file_length:O.file_length||0,filetype:g.ext.file_type||""};break;case"file":S=this.useOwnUploadFun?null==O?void 0:O.url:i.zK.call(this,{remotePath:null==O?void 0:O.url,secret:null==O?void 0:O.secret}),T={id:_,type:"file",chatType:I,from:g.from,to:g.to,ext:g.ext,time:E,url:S||"",secret:O.secret||"",file:{},filename:O.filename||"",file_length:O.file_length||0,filetype:g.ext.file_type||""};break;case"cmd":T={id:_,type:"cmd",chatType:I,from:g.from,to:g.to,ext:g.ext,time:E,action:O.action||""};break;case"custom":var N=O.customExts||{};p&&O.customExts&&(N={},O.customExts.map((function(e){N=u(u({},N),e)}))),T={id:_,type:"custom",chatType:I,from:g.from,to:g.to,ext:g.ext,time:E,customEvent:O.customEvent||"",customExts:N};break;case"combine":S=i.zK.call(this,{remotePath:null==O?void 0:O.url,secret:null==O?void 0:O.secret}),T={id:_,type:"combine",chatType:I,msg:O.msg||"",to:g.to||"",from:g.from,time:E,ext:g.ext,title:O.title||"",summary:O.summary||"",url:S||"",compatibleText:O.text,combineLevel:O.combineLevel||0,secret:O.secret||"",filename:O.filename||"",file_length:O.file_length||0};break;default:n.vF.error("unexpected message: ".concat(e))}if(g.msgConfig&&(R.msgConfig=g.msgConfig),null==g?void 0:g.meta){var A=g.meta;A.thread&&(R.chatThread={messageId:A.thread.msg_parent_id,parentId:A.thread.muc_parent_id,chatThreadName:A.thread.thread_name}),A.reaction&&(R.reactions=A.reaction),A.translations&&(R.translations=A.translations)}var M=null===(d=null==g?void 0:g.meta)||void 0===d?void 0:d.edit_msg;if(M){var w=M.edit_time,L=M.operator,U=M.count;T.modifiedInfo={operationTime:w,operatorId:L,operationCount:U}}return u(u({},T),R)}},8227:function(e,t,r){"use strict";var n=r(4576),i=r(5745),o=r(9297),s=r(3392),a=r(4495),u=r(7040),c=n.Symbol,l=i("wks"),d=u?c.for||c:c&&c.withoutSetter||s;e.exports=function(e){return o(l,e)||(l[e]=a&&o(c,e)?c[e]:d("Symbol."+e)),l[e]}},8229:function(e,t,r){"use strict";var n=r(9590),i=RangeError;e.exports=function(e,t){var r=n(e);if(r%t)throw new i("Wrong offset");return r}},8242:function(e,t,r){"use strict";var n=r(9565),i=r(7751),o=r(8227),s=r(6840);e.exports=function(){var e=i("Symbol"),t=e&&e.prototype,r=t&&t.valueOf,a=o("toPrimitive");t&&!t[a]&&s(t,a,(function(e){return n(r,this)}),{arity:1})}},8252:function(e,t,r){"use strict";e.exports=s;var n=r(1344);((s.prototype=Object.create(n.prototype)).constructor=s).className="MapField";var i=r(361),o=r(3262);function s(e,t,r,i,s,a){if(n.call(this,e,t,i,void 0,void 0,s,a),!o.isString(r))throw TypeError("keyType must be a string");this.keyType=r,this.resolvedKeyType=null,this.map=!0}s.fromJSON=function(e,t){return new s(e,t.id,t.keyType,t.type,t.options,t.comment)},s.prototype.toJSON=function(e){var t=!!e&&Boolean(e.keepComments);return o.toObject(["keyType",this.keyType,"type",this.type,"id",this.id,"extend",this.extend,"options",this.options,"comment",t?this.comment:void 0])},s.prototype.resolve=function(){if(this.resolved)return this;if(void 0===i.mapKey[this.keyType])throw Error("invalid key type: "+this.keyType);return n.prototype.resolve.call(this)},s.d=function(e,t,r){return"function"==typeof r?r=o.decorateType(r).name:r&&"object"==typeof r&&(r=o.decorateEnum(r).name),function(n,i){o.decorateType(n.constructor).add(new s(i,e,t,r))}}},8265:function(e){"use strict";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},8288:function(e,t,r){"use strict";r.d(t,{El:function(){return i},UJ:function(){return n},Z2:function(){return a},aI:function(){return s},tz:function(){return o}});var n=4,i=5242880,o=5242880,s={size:0},a={singleChat:"CHAT",groupChat:"GROUP",chatRoom:"ROOM"}},8307:function(e,t,r){"use strict";r.d(t,{z:function(){return i}}),r(9089);var n=r(4269),i=function(){function e(e){var t=e.type,r=e.id;this.id=r||n.Wp.getUniqueId(),this.type=t}return e.prototype.set=function(e){this.body={id:this.id,chatType:e.chatType||"singleChat",type:"cmd",to:e.to,action:e.action,from:e.from,roomType:e.roomType,success:e.success,fail:e.fail,ext:e.ext,time:Date.now()}},e.prototype.setChatType=function(e){return!!this.body&&(this.body.chatType=e,!0)},e.prototype.setGroup=function(e){return!!this.body&&(this.body.group=e,!0)},e.create=function(e){return{id:n.Wp.getUniqueId(),type:"cmd",to:e.to,from:e.from||"",chatType:e.chatType||"singleChat",action:e.action,time:Date.now(),ext:e.ext,msgConfig:e.msgConfig,isChatThread:e.isChatThread,priority:e.priority,deliverOnlineOnly:e.deliverOnlineOnly,receiverList:e.receiverList,webhookEnv:e.webhookEnv}},e}()},8309:function(e,t,r){"use strict";r(4359)},8319:function(e){"use strict";var t=Math.round;e.exports=function(e){var r=t(e);return r<0?0:r>255?255:255&r}},8345:function(e,t,r){"use strict";var n=r(2805);(0,r(4644).exportTypedArrayStaticMethod)("from",r(3251),n)},8379:function(e,t,r){"use strict";var n=r(8745),i=r(5397),o=r(1291),s=r(6198),a=r(4598),u=Math.min,c=[].lastIndexOf,l=!!c&&1/[1].lastIndexOf(1,-0)<0,d=a("lastIndexOf"),f=l||!d;e.exports=f?function(e){if(l)return n(c,this,arguments)||0;var t=i(this),r=s(t);if(0===r)return-1;var a=r-1;for(arguments.length>1&&(a=u(a,o(arguments[1]))),a<0&&(a=r+a);a>=0;a--)if(a in t&&t[a]===e)return a||0;return-1}:c},8406:function(e,t,r){"use strict";r(3792),r(7337);var n=r(6518),i=r(4576),o=r(3389),s=r(7751),a=r(9565),u=r(9504),c=r(3724),l=r(7416),d=r(6840),f=r(2106),h=r(6279),p=r(687),v=r(3994),m=r(1181),_=r(679),g=r(4901),E=r(9297),y=r(6080),O=r(6955),T=r(8551),R=r(34),I=r(655),S=r(2360),C=r(6980),b=r(81),N=r(851),A=r(2529),M=r(2812),w=r(8227),L=r(4488),U=w("iterator"),x="URLSearchParams",D=x+"Iterator",P=m.set,k=m.getterFor(x),F=m.getterFor(D),H=o("fetch"),B=o("Request"),G=o("Headers"),W=B&&B.prototype,j=G&&G.prototype,q=i.TypeError,K=i.encodeURIComponent,z=String.fromCharCode,V=s("String","fromCodePoint"),J=parseInt,Y=u("".charAt),X=u([].join),Q=u([].push),$=u("".replace),Z=u([].shift),ee=u([].splice),te=u("".split),re=u("".slice),ne=u(/./.exec),ie=/\+/g,oe=/^[0-9a-f]+$/i,se=function(e,t){var r=re(e,t,t+2);return ne(oe,r)?J(r,16):NaN},ae=function(e){for(var t=0,r=128;r>0&&0!==(e&r);r>>=1)t++;return t},ue=function(e){var t=null;switch(e.length){case 1:t=e[0];break;case 2:t=(31&e[0])<<6|63&e[1];break;case 3:t=(15&e[0])<<12|(63&e[1])<<6|63&e[2];break;case 4:t=(7&e[0])<<18|(63&e[1])<<12|(63&e[2])<<6|63&e[3]}return t>1114111?null:t},ce=function(e){for(var t=(e=$(e,ie," ")).length,r="",n=0;n<t;){var i=Y(e,n);if("%"===i){if("%"===Y(e,n+1)||n+3>t){r+="%",n++;continue}var o=se(e,n+1);if(o!=o){r+=i,n++;continue}n+=2;var s=ae(o);if(0===s)i=z(o);else{if(1===s||s>4){r+="�",n++;continue}for(var a=[o],u=1;u<s&&!(3+ ++n>t||"%"!==Y(e,n));){var c=se(e,n+1);if(c!=c){n+=3;break}if(c>191||c<128)break;Q(a,c),n+=2,u++}if(a.length!==s){r+="�";continue}var l=ue(a);null===l?r+="�":i=V(l)}}r+=i,n++}return r},le=/[!'()~]|%20/g,de={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},fe=function(e){return de[e]},he=function(e){return $(K(e),le,fe)},pe=v((function(e,t){P(this,{type:D,target:k(e).entries,index:0,kind:t})}),x,(function(){var e=F(this),t=e.target,r=e.index++;if(!t||r>=t.length)return e.target=null,A(void 0,!0);var n=t[r];switch(e.kind){case"keys":return A(n.key,!1);case"values":return A(n.value,!1)}return A([n.key,n.value],!1)}),!0),ve=function(e){this.entries=[],this.url=null,void 0!==e&&(R(e)?this.parseObject(e):this.parseQuery("string"==typeof e?"?"===Y(e,0)?re(e,1):e:I(e)))};ve.prototype={type:x,bindURL:function(e){this.url=e,this.update()},parseObject:function(e){var t,r,n,i,o,s,u,c=this.entries,l=N(e);if(l)for(r=(t=b(e,l)).next;!(n=a(r,t)).done;){if(o=(i=b(T(n.value))).next,(s=a(o,i)).done||(u=a(o,i)).done||!a(o,i).done)throw new q("Expected sequence with length 2");Q(c,{key:I(s.value),value:I(u.value)})}else for(var d in e)E(e,d)&&Q(c,{key:d,value:I(e[d])})},parseQuery:function(e){if(e)for(var t,r,n=this.entries,i=te(e,"&"),o=0;o<i.length;)(t=i[o++]).length&&(r=te(t,"="),Q(n,{key:ce(Z(r)),value:ce(X(r,"="))}))},serialize:function(){for(var e,t=this.entries,r=[],n=0;n<t.length;)e=t[n++],Q(r,he(e.key)+"="+he(e.value));return X(r,"&")},update:function(){this.entries.length=0,this.parseQuery(this.url.query)},updateURL:function(){this.url&&this.url.update()}};var me=function(){_(this,_e);var e=P(this,new ve(arguments.length>0?arguments[0]:void 0));c||(this.size=e.entries.length)},_e=me.prototype;if(h(_e,{append:function(e,t){var r=k(this);M(arguments.length,2),Q(r.entries,{key:I(e),value:I(t)}),c||this.length++,r.updateURL()},delete:function(e){for(var t=k(this),r=M(arguments.length,1),n=t.entries,i=I(e),o=r<2?void 0:arguments[1],s=void 0===o?o:I(o),a=0;a<n.length;){var u=n[a];if(u.key!==i||void 0!==s&&u.value!==s)a++;else if(ee(n,a,1),void 0!==s)break}c||(this.size=n.length),t.updateURL()},get:function(e){var t=k(this).entries;M(arguments.length,1);for(var r=I(e),n=0;n<t.length;n++)if(t[n].key===r)return t[n].value;return null},getAll:function(e){var t=k(this).entries;M(arguments.length,1);for(var r=I(e),n=[],i=0;i<t.length;i++)t[i].key===r&&Q(n,t[i].value);return n},has:function(e){for(var t=k(this).entries,r=M(arguments.length,1),n=I(e),i=r<2?void 0:arguments[1],o=void 0===i?i:I(i),s=0;s<t.length;){var a=t[s++];if(a.key===n&&(void 0===o||a.value===o))return!0}return!1},set:function(e,t){var r=k(this);M(arguments.length,1);for(var n,i=r.entries,o=!1,s=I(e),a=I(t),u=0;u<i.length;u++)(n=i[u]).key===s&&(o?ee(i,u--,1):(o=!0,n.value=a));o||Q(i,{key:s,value:a}),c||(this.size=i.length),r.updateURL()},sort:function(){var e=k(this);L(e.entries,(function(e,t){return e.key>t.key?1:-1})),e.updateURL()},forEach:function(e){for(var t,r=k(this).entries,n=y(e,arguments.length>1?arguments[1]:void 0),i=0;i<r.length;)n((t=r[i++]).value,t.key,this)},keys:function(){return new pe(this,"keys")},values:function(){return new pe(this,"values")},entries:function(){return new pe(this,"entries")}},{enumerable:!0}),d(_e,U,_e.entries,{name:"entries"}),d(_e,"toString",(function(){return k(this).serialize()}),{enumerable:!0}),c&&f(_e,"size",{get:function(){return k(this).entries.length},configurable:!0,enumerable:!0}),p(me,x),n({global:!0,constructor:!0,forced:!l},{URLSearchParams:me}),!l&&g(G)){var ge=u(j.has),Ee=u(j.set),ye=function(e){if(R(e)){var t,r=e.body;if(O(r)===x)return t=e.headers?new G(e.headers):new G,ge(t,"content-type")||Ee(t,"content-type","application/x-www-form-urlencoded;charset=UTF-8"),S(e,{body:C(0,I(r)),headers:C(0,t)})}return e};if(g(H)&&n({global:!0,enumerable:!0,dontCallGetSet:!0,forced:!0},{fetch:function(e){return H(e,arguments.length>1?ye(arguments[1]):{})}}),g(B)){var Oe=function(e){return _(this,W),new B(e,arguments.length>1?ye(arguments[1]):{})};W.constructor=Oe,Oe.prototype=W,n({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:Oe})}}e.exports={URLSearchParams:me,getState:k}},8408:function(e,t,r){"use strict";r(8406)},8429:function(e,t,r){"use strict";var n=r(9039),i=r(4576).RegExp,o=n((function(){var e=i("a","y");return e.lastIndex=2,null!==e.exec("abcd")})),s=o||n((function(){return!i("a","y").sticky})),a=o||n((function(){var e=i("^r","gy");return e.lastIndex=2,null!==e.exec("str")}));e.exports={BROKEN_CARET:a,MISSED_STICKY:s,UNSUPPORTED_Y:o}},8480:function(e,t,r){"use strict";var n=r(1828),i=r(8727).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return n(e,i)}},8490:function(e){"use strict";var t=Array,r=Math.abs,n=Math.pow,i=Math.floor,o=Math.log,s=Math.LN2;e.exports={pack:function(e,a,u){var c,l,d,f=t(u),h=8*u-a-1,p=(1<<h)-1,v=p>>1,m=23===a?n(2,-24)-n(2,-77):0,_=e<0||0===e&&1/e<0?1:0,g=0;for((e=r(e))!=e||e===1/0?(l=e!=e?1:0,c=p):(c=i(o(e)/s),e*(d=n(2,-c))<1&&(c--,d*=2),(e+=c+v>=1?m/d:m*n(2,1-v))*d>=2&&(c++,d/=2),c+v>=p?(l=0,c=p):c+v>=1?(l=(e*d-1)*n(2,a),c+=v):(l=e*n(2,v-1)*n(2,a),c=0));a>=8;)f[g++]=255&l,l/=256,a-=8;for(c=c<<a|l,h+=a;h>0;)f[g++]=255&c,c/=256,h-=8;return f[g-1]|=128*_,f},unpack:function(e,t){var r,i=e.length,o=8*i-t-1,s=(1<<o)-1,a=s>>1,u=o-7,c=i-1,l=e[c--],d=127&l;for(l>>=7;u>0;)d=256*d+e[c--],u-=8;for(r=d&(1<<-u)-1,d>>=-u,u+=t;u>0;)r=256*r+e[c--],u-=8;if(0===d)d=1-a;else{if(d===s)return r?NaN:l?-1/0:1/0;r+=n(2,t),d-=a}return(l?-1:1)*r*n(2,d-t)}}},8523:function(e,t,r){"use strict";r(6468)("Map",(function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}}),r(6938))},8551:function(e,t,r){"use strict";var n=r(34),i=String,o=TypeError;e.exports=function(e){if(n(e))return e;throw new o(i(e)+" is not an object")}},8561:function(e){"use strict";function t(e,r){"string"==typeof e&&(r=e,e=void 0);var n=[];function i(e){if("string"!=typeof e){var r=o();if(t.verbose&&console.log("codegen: "+r),r="return "+r,e){for(var s=Object.keys(e),a=new Array(s.length+1),u=new Array(s.length),c=0;c<s.length;)a[c]=s[c],u[c]=e[s[c++]];return a[c]=r,Function.apply(null,a).apply(null,u)}return Function(r)()}for(var l=new Array(arguments.length-1),d=0;d<l.length;)l[d]=arguments[++d];if(d=0,e=e.replace(/%([%dfijs])/g,(function(e,t){var r=l[d++];switch(t){case"d":case"f":return String(Number(r));case"i":return String(Math.floor(r));case"j":return JSON.stringify(r);case"s":return String(r)}return"%"})),d!==l.length)throw Error("parameter count mismatch");return n.push(e),i}function o(t){return"function "+(t||r||"")+"("+(e&&e.join(",")||"")+"){\n "+n.join("\n ")+"\n}"}return i.toString=o,i}e.exports=t,t.verbose=!1},8570: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 i={},o={};function s(e,t){var r,n,s;return t?(s=0<=(e>>>=0)&&e<256)&&(n=o[e])?n:(r=u(e,(0|e)<0?-1:0,!0),s&&(o[e]=r),r):(s=-128<=(e|=0)&&e<128)&&(n=i[e])?n:(r=u(e,e<0?-1:0,!1),s&&(i[e]=r),r)}function a(e,t){if(isNaN(e))return t?_:m;if(t){if(e<0)return _;if(e>=h)return T}else{if(e<=-p)return R;if(e+1>=p)return O}return e<0?a(-e,t).neg():u(e%f|0,e/f|0,t)}function u(e,t,n){return new r(e,t,n)}r.fromInt=s,r.fromNumber=a,r.fromBits=u;var c=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 m;if("number"==typeof t?(r=t,t=!1):t=!!t,(r=r||10)<2||36<r)throw RangeError("radix");var n;if((n=e.indexOf("-"))>0)throw Error("interior hyphen");if(0===n)return l(e.substring(1),t,r).neg();for(var i=a(c(r,8)),o=m,s=0;s<e.length;s+=8){var u=Math.min(8,e.length-s),d=parseInt(e.substring(s,s+u),r);if(u<8){var f=a(c(r,u));o=o.mul(f).add(a(d))}else o=(o=o.mul(i)).add(a(d))}return o.unsigned=t,o}function d(e,t){return"number"==typeof e?a(e,t):"string"==typeof e?l(e,t):u(e.low,e.high,"boolean"==typeof t?t:e.unsigned)}r.fromString=l,r.fromValue=d;var f=4294967296,h=f*f,p=h/2,v=s(1<<24),m=s(0);r.ZERO=m;var _=s(0,!0);r.UZERO=_;var g=s(1);r.ONE=g;var E=s(1,!0);r.UONE=E;var y=s(-1);r.NEG_ONE=y;var O=u(-1,2147483647,!1);r.MAX_VALUE=O;var T=u(-1,-1,!0);r.MAX_UNSIGNED_VALUE=T;var R=u(0,-2147483648,!1);r.MIN_VALUE=R;var I=r.prototype;I.toInt=function(){return this.unsigned?this.low>>>0:this.low},I.toNumber=function(){return this.unsigned?(this.high>>>0)*f+(this.low>>>0):this.high*f+(this.low>>>0)},I.toString=function(e){if((e=e||10)<2||36<e)throw RangeError("radix");if(this.isZero())return"0";if(this.isNegative()){if(this.eq(R)){var t=a(e),r=this.div(t),n=r.mul(t).sub(this);return r.toString(e)+n.toInt().toString(e)}return"-"+this.neg().toString(e)}for(var i=a(c(e,6),this.unsigned),o=this,s="";;){var u=o.div(i),l=(o.sub(u.mul(i)).toInt()>>>0).toString(e);if((o=u).isZero())return l+s;for(;l.length<6;)l="0"+l;s=""+l+s}},I.getHighBits=function(){return this.high},I.getHighBitsUnsigned=function(){return this.high>>>0},I.getLowBits=function(){return this.low},I.getLowBitsUnsigned=function(){return this.low>>>0},I.getNumBitsAbs=function(){if(this.isNegative())return this.eq(R)?64:this.neg().getNumBitsAbs();for(var e=0!=this.high?this.high:this.low,t=31;t>0&&!(e&1<<t);t--);return 0!=this.high?t+33:t+1},I.isZero=function(){return 0===this.high&&0===this.low},I.eqz=I.isZero,I.isNegative=function(){return!this.unsigned&&this.high<0},I.isPositive=function(){return this.unsigned||this.high>=0},I.isOdd=function(){return!(1&~this.low)},I.isEven=function(){return!(1&this.low)},I.equals=function(e){return n(e)||(e=d(e)),(this.unsigned===e.unsigned||this.high>>>31!=1||e.high>>>31!=1)&&this.high===e.high&&this.low===e.low},I.eq=I.equals,I.notEquals=function(e){return!this.eq(e)},I.neq=I.notEquals,I.ne=I.notEquals,I.lessThan=function(e){return this.comp(e)<0},I.lt=I.lessThan,I.lessThanOrEqual=function(e){return this.comp(e)<=0},I.lte=I.lessThanOrEqual,I.le=I.lessThanOrEqual,I.greaterThan=function(e){return this.comp(e)>0},I.gt=I.greaterThan,I.greaterThanOrEqual=function(e){return this.comp(e)>=0},I.gte=I.greaterThanOrEqual,I.ge=I.greaterThanOrEqual,I.compare=function(e){if(n(e)||(e=d(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},I.comp=I.compare,I.negate=function(){return!this.unsigned&&this.eq(R)?R:this.not().add(g)},I.neg=I.negate,I.add=function(e){n(e)||(e=d(e));var t=this.high>>>16,r=65535&this.high,i=this.low>>>16,o=65535&this.low,s=e.high>>>16,a=65535&e.high,c=e.low>>>16,l=0,f=0,h=0,p=0;return h+=(p+=o+(65535&e.low))>>>16,f+=(h+=i+c)>>>16,l+=(f+=r+a)>>>16,l+=t+s,u((h&=65535)<<16|(p&=65535),(l&=65535)<<16|(f&=65535),this.unsigned)},I.subtract=function(e){return n(e)||(e=d(e)),this.add(e.neg())},I.sub=I.subtract,I.multiply=function(e){if(this.isZero())return m;if(n(e)||(e=d(e)),t)return u(t.mul(this.low,this.high,e.low,e.high),t.get_high(),this.unsigned);if(e.isZero())return m;if(this.eq(R))return e.isOdd()?R:m;if(e.eq(R))return this.isOdd()?R:m;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(v)&&e.lt(v))return a(this.toNumber()*e.toNumber(),this.unsigned);var r=this.high>>>16,i=65535&this.high,o=this.low>>>16,s=65535&this.low,c=e.high>>>16,l=65535&e.high,f=e.low>>>16,h=65535&e.low,p=0,_=0,g=0,E=0;return g+=(E+=s*h)>>>16,_+=(g+=o*h)>>>16,g&=65535,_+=(g+=s*f)>>>16,p+=(_+=i*h)>>>16,_&=65535,p+=(_+=o*f)>>>16,_&=65535,p+=(_+=s*l)>>>16,p+=r*h+i*f+o*l+s*c,u((g&=65535)<<16|(E&=65535),(p&=65535)<<16|(_&=65535),this.unsigned)},I.mul=I.multiply,I.divide=function(e){if(n(e)||(e=d(e)),e.isZero())throw Error("division by zero");var r,i,o;if(t)return this.unsigned||-2147483648!==this.high||-1!==e.low||-1!==e.high?u((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?_:m;if(this.unsigned){if(e.unsigned||(e=e.toUnsigned()),e.gt(this))return _;if(e.gt(this.shru(1)))return E;o=_}else{if(this.eq(R))return e.eq(g)||e.eq(y)?R:e.eq(R)?g:(r=this.shr(1).div(e).shl(1)).eq(m)?e.isNegative()?g:y:(i=this.sub(e.mul(r)),o=r.add(i.div(e)));if(e.eq(R))return this.unsigned?_:m;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();o=m}for(i=this;i.gte(e);){r=Math.max(1,Math.floor(i.toNumber()/e.toNumber()));for(var s=Math.ceil(Math.log(r)/Math.LN2),l=s<=48?1:c(2,s-48),f=a(r),h=f.mul(e);h.isNegative()||h.gt(i);)h=(f=a(r-=l,this.unsigned)).mul(e);f.isZero()&&(f=g),o=o.add(f),i=i.sub(h)}return o},I.div=I.divide,I.modulo=function(e){return n(e)||(e=d(e)),t?u((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))},I.mod=I.modulo,I.rem=I.modulo,I.not=function(){return u(~this.low,~this.high,this.unsigned)},I.and=function(e){return n(e)||(e=d(e)),u(this.low&e.low,this.high&e.high,this.unsigned)},I.or=function(e){return n(e)||(e=d(e)),u(this.low|e.low,this.high|e.high,this.unsigned)},I.xor=function(e){return n(e)||(e=d(e)),u(this.low^e.low,this.high^e.high,this.unsigned)},I.shiftLeft=function(e){return n(e)&&(e=e.toInt()),0==(e&=63)?this:e<32?u(this.low<<e,this.high<<e|this.low>>>32-e,this.unsigned):u(0,this.low<<e-32,this.unsigned)},I.shl=I.shiftLeft,I.shiftRight=function(e){return n(e)&&(e=e.toInt()),0==(e&=63)?this:e<32?u(this.low>>>e|this.high<<32-e,this.high>>e,this.unsigned):u(this.high>>e-32,this.high>=0?0:-1,this.unsigned)},I.shr=I.shiftRight,I.shiftRightUnsigned=function(e){if(n(e)&&(e=e.toInt()),0==(e&=63))return this;var t=this.high;return e<32?u(this.low>>>e|t<<32-e,t>>>e,this.unsigned):u(32===e?t:t>>>e-32,0,this.unsigned)},I.shru=I.shiftRightUnsigned,I.shr_u=I.shiftRightUnsigned,I.toSigned=function(){return this.unsigned?u(this.low,this.high,!1):this},I.toUnsigned=function(){return this.unsigned?this:u(this.low,this.high,!0)},I.toBytes=function(e){return e?this.toBytesLE():this.toBytesBE()},I.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]},I.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)}},8579:function(e,t,r){"use strict";r.d(t,{Q:function(){return n},zK:function(){return E}}),r(2675),r(9463),r(2259),r(8706),r(1629),r(4423),r(5276),r(3792),r(8598),r(4782),r(5086),r(739),r(3288),r(2010),r(2892),r(9085),r(9432),r(6099),r(3362),r(8781),r(1699),r(7764),r(3500),r(2953);var n,i=r(8570),o=r.n(i),s=r(8211),a=r(4269),u=r(6646),c=r(9254),l=r(3850),d=r(7968),f=r(7535),h=r(1274),p=function(){return p=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},p.apply(this,arguments)},v=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function s(e){try{u(n.next(e))}catch(e){o(e)}}function a(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}u((n=n.apply(e,t||[])).next())}))},m=function(e,t){var r,n,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;s;)try{if(r=1,n&&(i=2&o[0]?n.return:o[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,o[1])).done)return i;switch(n=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,n=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],n=0}finally{r=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}};!function(e){e["chat:user"]="singleChat",e["chat:group"]="groupChat",e["chat:room"]="chatRoom"}(n||(n={}));var _={0:"TEXT",1:"IMAGE",2:"VIDEO",3:"LOCATION",4:"VOICE",5:"FILE",6:"COMMAND",7:"CUSTOM",8:"COMBINE"};function g(e){for(var t={},r=0;r<e.length;r++)if(8===e[r].type)t[e[r].key]=JSON.parse(e[r].stringValue);else if(7===e[r].type)t[e[r].key]=e[r].stringValue;else if(6===e[r].type)t[e[r].key]=e[r].doubleValue;else if(5===e[r].type)t[e[r].key]=e[r].floatValue;else if(1===e[r].type){var n=e[r].varintValue,i=new(o())(n.low,n.high,n.unsigned).toString();t[e[r].key]=0!==Number(i)}else 2!==e[r].type&&3!==e[r].type&&4!==e[r].type||(n=e[r].varintValue,i=new(o())(n.low,n.high,n.unsigned).toString(),t[e[r].key]=Number(i));return t}function E(e){var t="";return e.remotePath&&(t=a.Wp.formatAttachUrl.call(this,e.remotePath),e.remotePath.includes("?em-redirect")||(t="".concat(t,"?em-redirect=true"),e.secretKey&&(t="".concat(t,"&share-secret=").concat(e.secretKey)))),t}function y(e,t,r){var n=a.Wp.formatAttachUrl.call(this,e),i=n.indexOf("#"),o=i>=0?n.slice(0,i):n,s=i>=0?n.slice(i):"",u=o.indexOf("?"),c=u>=0?o.slice(0,u):o,l=u>=0?o.slice(u+1):"",d=l?l.split("&"):[],f=function(e){return d.some((function(t){return t.split("=")[0]===e}))};return r&&!f("size")&&d.push("size=".concat(r)),f("em-redirect")||d.push("em-redirect=true"),t&&!f("share-secret")&&d.push("share-secret=".concat(t)),"".concat(c).concat(d.length?"?".concat(d.join("&")):"").concat(s)}function O(e,t){var r,n,i=t.from&&t.from.name;if(i===this.context.userId){var o=null===(r=null==e?void 0:e.from)||void 0===r?void 0:r.clientResource;i===(null===(n=null==t?void 0:t.to)||void 0===n?void 0:n.name)&&o&&o!==this.clientResource&&(i="".concat(i,"/").concat(o))}return i}function T(e,t){var r,n=t.to&&t.to.name;return(null===(r=null==e?void 0:e.to)||void 0===r?void 0:r.clientResource)&&(n="".concat(n,"/").concat(e.to.clientResource)),n}function R(e){var t,r,n,i,o,u,c,f,p,O,T,R,I,S,C,b,N,A,M,w,L,U,x,D,P,k,F;return v(this,void 0,void 0,(function(){var v,H,B,G,W,j,q,K,z,V,J,Y,X,Q,$,Z,ee,te,re,ne,ie,oe,se,ae,ue,ce,le,de,fe,he,pe,ve,me,_e,ge,Ee,ye,Oe,Te,Re,Ie,Se,Ce,be,Ne,Ae,Me,we,Le,Ue,xe,De;return m(this,(function(m){switch(m.label){case 0:switch(v=e.status,H=e.thirdMessage,B=e.msgBody,G=e.msgId,W=e.type,j=e.from,q=e.to,K=e.time,z=e.onlineState,V=e.chatType,J=e.ignoreCallback,Y=e.priority,X=e.format,Q=e.broadcast,$=void 0!==Q&&Q,Z=e.isContentReplaced,ee=void 0!==Z&&Z,te=e.meta,re={},ne={},ie=v.errorCode>0,oe=v.errorCode,se=v.reason,ae={},ue=[],ce=[],le={},de=null,fe=null,pe=!1,ve=!1,H.ext&&(ae=g(H.ext)),H.meta&&"string"==typeof H.meta&&((me=JSON.parse(H.meta)).reaction&&(ue=me.reaction).forEach((function(e){e.isAddedBySelf=e.state,delete e.state})),me.translations&&(ce=me.translations),me.edit_msg&&(_e=me.edit_msg,ge=_e.count,Ee=_e.operator,ye=_e.edit_time,le={operationTime:ye,operatorId:Ee,operationCount:ge}),me.thread&&"{}"!==JSON.stringify(me.thread)&&(de={messageId:me.thread.msg_parent_id,parentId:me.thread.muc_parent_id,chatThreadName:me.thread.thread_name}),me.thread_overview&&"{}"!==JSON.stringify(me.thread_overview)&&(fe={id:me.thread_overview.id,parentId:me.thread_overview.muc_parent_id,name:me.thread_overview.name,lastMessage:me.thread_overview.last_message&&"{}"!==JSON.stringify(me.thread_overview.last_message)?s.h.call(this,me.thread_overview.last_message):null,createTimestamp:me.thread_overview.create_timestamp,updateTimestamp:me.thread_overview.update_timestamp,messageCount:me.thread_overview.message_count||0}),me.isDelivered&&(pe=!0),me.isRead&&(ve=!0)),B.type){case 0:return[3,1];case 1:return[3,8];case 2:return[3,11];case 3:return[3,14];case 4:return[3,17];case 5:return[3,20];case 6:return[3,23];case 7:return[3,24];case 8:return[3,27]}return[3,28];case 1:return Object.prototype.hasOwnProperty.call(B,"subType")&&0===B.subType?(he=E.call(this,B),Oe={id:G,type:"combine",chatType:V,to:q,from:j,ext:ae,time:Number(K),onlineState:z,title:B.title||"",summary:B.summary||"",url:he||"",secret:B.secretKey||"",file_length:B.fileLength||0,filename:B.displayName||"",compatibleText:B.text,combineLevel:B.combineLevel||0},re.msgConfig&&(Oe.msgConfig=re.msgConfig),ue.length>0&&(Oe.reactions=ue),de&&(Oe.chatThread=de),fe&&(Oe.chatThreadOverview=fe),"chatRoom"===V&&(Oe.priority=Y,Oe.broadcast=$),le.operationCount>0&&(Oe.modifiedInfo=le),ee&&(Oe.isContentReplaced=ee),ve&&(Oe.isRead=!0),pe&&(Oe.isDelivered=!0),ne=Oe,J?[3,3]:[4,null===(r=null===(t=this._localCache)||void 0===t?void 0:t.getInstance())||void 0===r?void 0:r.storeMessage(Oe,h.q.SUCCESS)]):[3,4];case 2:m.sent(),null===(n=this.eventHandler)||void 0===n||n.dispatch("onCombineMessage",Oe),m.label=3;case 3:return[3,29];case 4:return Object.prototype.hasOwnProperty.call(B,"subType")&&10===B.subType&&H.stream?(Te=l.A.call(this,B,H,te,G,j,q,K,V,z,ae,ue,ce,le,de,fe,ee,ve,pe,null!=J&&J),ne=Te,[3,29]):[3,5];case 5:return!(re={id:G,type:W,contentsType:_[B.type],from:j,to:q,data:B.text,ext:ae,sourceMsg:B.text,time:K,msgConfig:H.msgConfig,onlineState:z}).msgConfig&&delete H.msgConfig,re.error=ie,re.errorText=se,re.errorCode=oe,!J&&this.onTextMessage&&this.onTextMessage(re),Re={id:G,type:"txt",chatType:V,msg:B.text,to:q,from:j,ext:ae,time:Number(K),onlineState:z},re.msgConfig&&(Re.msgConfig=re.msgConfig),ue.length>0&&(Re.reactions=ue),de&&(Re.chatThread=de),fe&&(Re.chatThreadOverview=fe),ce.length>0&&(Re.translations=ce),le.operationCount>0&&(Re.modifiedInfo=le),"chatRoom"===V&&(Re.priority=Y,Re.broadcast=$),ee&&(Re.isContentReplaced=ee),ve&&(Re.isRead=!0),pe&&(Re.isDelivered=!0),ne=Re,J?[3,7]:[4,null===(o=null===(i=this._localCache)||void 0===i?void 0:i.getInstance())||void 0===o?void 0:o.storeMessage(Re,h.q.SUCCESS)];case 6:m.sent(),null===(u=this.eventHandler)||void 0===u||u.dispatch("onTextMessage",Re),m.label=7;case 7:return[3,29];case 8:return Ie=(null===(c=null==B?void 0:B.size)||void 0===c?void 0:c.width)||0,Se=(null===(f=null==B?void 0:B.size)||void 0===f?void 0:f.height)||0,he=this.useOwnUploadFun?B.remotePath:E.call(this,B),!(re={id:G,type:W,contentsType:_[B.type],from:j,to:q,url:he,secret:B.secretKey,filename:B.displayName,thumb:this.useOwnUploadFun?"":"".concat(he,"&thumbnail=true"),thumb_secret:B.secretKey,file_length:B.fileLength||"",width:Ie,height:Se,filetype:B.filetype||"",accessToken:this.token,ext:ae,time:K,msgConfig:H.msgConfig,onlineState:z}).delay&&delete re.delay,!re.msgConfig&&delete H.msgConfig,re.error=ie,re.errorText=se,re.errorCode=oe,!J&&this.onPictureMessage&&this.onPictureMessage(re),Ce={id:G,type:"img",chatType:V,from:j,to:q,url:he||"",width:Ie,height:Se,secret:B.secretKey||"",thumb:this.useOwnUploadFun?"":"".concat(he,"&thumbnail=true"),thumb_secret:B.secretKey,file_length:B.fileLength||0,ext:ae,time:Number(K),onlineState:z},re.msgConfig&&(Ce.msgConfig=re.msgConfig),ue.length>0&&(Ce.reactions=ue),de&&(Ce.chatThread=de),fe&&(Ce.chatThreadOverview=fe),"chatRoom"===V&&(Ce.priority=Y,Ce.broadcast=$),le.operationCount>0&&(Ce.modifiedInfo=le),ee&&(Ce.isContentReplaced=ee),ve&&(Ce.isRead=!0),pe&&(Ce.isDelivered=!0),Object.prototype.hasOwnProperty.call(B,"subType")&&1===B.subType&&(Ce.isGif=!0),Ce.isOriginalImage=!(2===B.imageType&&!Ce.isGif),B.remotePath&&!this.useOwnUploadFun?(Ce.originalImageUrl=y.call(this,B.remotePath,B.secretKey),Ce.bigImageUrl=y.call(this,B.remotePath,B.secretKey,"large"),Ce.thumb="".concat(he,"&thumbnail=true")):B.remotePath&&this.useOwnUploadFun&&(Ce.originalImageUrl=B.remotePath),ne=Ce,J?[3,10]:[4,null===(O=null===(p=this._localCache)||void 0===p?void 0:p.getInstance())||void 0===O?void 0:O.storeMessage(Ce,h.q.SUCCESS)];case 9:m.sent(),null===(T=this.eventHandler)||void 0===T||T.dispatch("onImageMessage",Ce),m.label=10;case 10:return[3,29];case 11:return he=this.useOwnUploadFun?B.remotePath:E.call(this,B),!(re={id:G,type:W,contentsType:_[B.type],from:j,to:q,url:he,secret:B.secretKey,filename:B.displayName,length:B.duration||"",file_length:B.fileLength||"",filetype:B.filetype||"",accessToken:this.token||"",ext:ae,time:K,msgConfig:H.msgConfig,onlineState:z}).delay&&delete re.delay,!re.msgConfig&&delete H.msgConfig,re.error=ie,re.errorText=se,re.errorCode=oe,!J&&this.onVideoMessage&&this.onVideoMessage(re),be={id:G,type:"video",chatType:V,from:j,to:q,url:he,secret:B.secretKey,thumb:a.Wp.formatAttachUrl.call(this,B.thumbnailRemotePath),thumb_secret:B.thumbnailSecretKey,filename:B.displayName,length:B.duration||0,file:{},file_length:B.fileLength||0,filetype:B.filetype||"",accessToken:this.token||"",ext:ae,time:Number(K),onlineState:z},re.msgConfig&&(be.msgConfig=re.msgConfig),ue.length>0&&(be.reactions=ue),de&&(be.chatThread=de),fe&&(be.chatThreadOverview=fe),"chatRoom"===V&&(be.priority=Y,be.broadcast=$),le.operationCount>0&&(be.modifiedInfo=le),ee&&(be.isContentReplaced=ee),ve&&(be.isRead=!0),pe&&(be.isDelivered=!0),ne=be,J?[3,13]:[4,null===(I=null===(R=this._localCache)||void 0===R?void 0:R.getInstance())||void 0===I?void 0:I.storeMessage(be,h.q.SUCCESS)];case 12:m.sent(),null===(S=this.eventHandler)||void 0===S||S.dispatch("onVideoMessage",be),m.label=13;case 13:return[3,29];case 14:return!(re={id:G,type:W,contentsType:_[B.type],from:j,to:q,addr:B.address,buildingName:B.buildingName,lat:B.latitude,lng:B.longitude,ext:ae,time:K,msgConfig:H.msgConfig,onlineState:z}).delay&&delete re.delay,!re.msgConfig&&delete H.msgConfig,re.error=ie,re.errorText=se,re.errorCode=oe,!J&&this.onLocationMessage&&this.onLocationMessage(re),Ne={id:G,type:"loc",chatType:V,from:j,to:q,buildingName:B.buildingName,addr:B.address,lat:B.latitude,lng:B.longitude,ext:ae,time:Number(K),onlineState:z},re.msgConfig&&(Ne.msgConfig=re.msgConfig),ue.length>0&&(Ne.reactions=ue),de&&(Ne.chatThread=de),fe&&(Ne.chatThreadOverview=fe),"chatRoom"===V&&(Ne.priority=Y,Ne.broadcast=$),le.operationCount>0&&(Ne.modifiedInfo=le),ee&&(Ne.isContentReplaced=ee),ve&&(Ne.isRead=!0),pe&&(Ne.isDelivered=!0),ne=Ne,J?[3,16]:[4,null===(b=null===(C=this._localCache)||void 0===C?void 0:C.getInstance())||void 0===b?void 0:b.storeMessage(Ne,h.q.SUCCESS)];case 15:m.sent(),null===(N=this.eventHandler)||void 0===N||N.dispatch("onLocationMessage",Ne),m.label=16;case 16:return[3,29];case 17:return he=this.useOwnUploadFun?B.remotePath:E.call(this,B),!(re={id:G,type:W,contentsType:_[B.type],from:j,to:q,url:he,secret:B.secretKey,filename:B.displayName,file_length:B.fileLength||"",accessToken:this.token||"",ext:ae,length:B.duration,time:K,msgConfig:H.msgConfig,onlineState:z}).delay&&delete re.delay,!re.msgConfig&&delete H.msgConfig,re.error=ie,re.errorText=se,re.errorCode=oe,!J&&this.onAudioMessage&&this.onAudioMessage(re),Ae={id:G,type:"audio",chatType:V,from:j,to:q,url:he,secret:B.secretKey,file:{},filename:B.displayName,length:B.duration||0,file_length:B.fileLength||0,filetype:B.filetype||"",accessToken:this.token||"",ext:ae,time:Number(K),onlineState:z},re.msgConfig&&(Ae.msgConfig=re.msgConfig),ue.length>0&&(Ae.reactions=ue),de&&(Ae.chatThread=de),fe&&(Ae.chatThreadOverview=fe),"chatRoom"===V&&(Ae.priority=Y,Ae.broadcast=$),le.operationCount>0&&(Ae.modifiedInfo=le),ee&&(Ae.isContentReplaced=ee),ve&&(Ae.isRead=!0),pe&&(Ae.isDelivered=!0),ne=Ae,J?[3,19]:[4,null===(M=null===(A=this._localCache)||void 0===A?void 0:A.getInstance())||void 0===M?void 0:M.storeMessage(Ae,h.q.SUCCESS)];case 18:m.sent(),null===(w=this.eventHandler)||void 0===w||w.dispatch("onAudioMessage",Ae),m.label=19;case 19:return[3,29];case 20:return he=this.useOwnUploadFun?B.remotePath:E.call(this,B),!(re={id:G,type:W,contentsType:_[B.type],from:j,to:q,url:he,secret:B.secretKey,filename:B.displayName,file_length:B.fileLength,accessToken:this.token||"",ext:ae,time:K,msgConfig:H.msgConfig,onlineState:z}).delay&&delete re.delay,!re.msgConfig&&delete H.msgConfig,re.error=ie,re.errorText=se,re.errorCode=oe,!J&&this.onFileMessage&&this.onFileMessage(re),Me={id:G,type:"file",chatType:V,from:j,to:q,url:he,secret:B.secretKey,file:{},filename:B.displayName,length:B.duration||0,file_length:B.fileLength||0,filetype:B.filetype||"",accessToken:this.token||"",ext:ae,time:Number(K),onlineState:z},re.msgConfig&&(Me.msgConfig=re.msgConfig),ue.length>0&&(Me.reactions=ue),de&&(Me.chatThread=de),fe&&(Me.chatThreadOverview=fe),"chatRoom"===V&&(Me.priority=Y,Me.broadcast=$),le.operationCount>0&&(Me.modifiedInfo=le),ee&&(Me.isContentReplaced=ee),ve&&(Me.isRead=!0),pe&&(Me.isDelivered=!0),ne=Me,J?[3,22]:[4,null===(U=null===(L=this._localCache)||void 0===L?void 0:L.getInstance())||void 0===U?void 0:U.storeMessage(Me,h.q.SUCCESS)];case 21:m.sent(),null===(x=this.eventHandler)||void 0===x||x.dispatch("onFileMessage",Me),m.label=22;case 22:return[3,29];case 23:return!(re={id:G,type:W,contentsType:_[B.type],from:j,to:q,action:B.action,ext:ae,time:K,msgConfig:H.msgConfig,onlineState:z}).msgConfig&&delete H.msgConfig,re.error=ie,re.errorText=se,re.errorCode=oe,!J&&this.onCmdMessage&&this.onCmdMessage(re),we={id:G,type:"cmd",chatType:V,from:j,to:q,action:B.action,ext:ae,time:Number(K),onlineState:z},re.msgConfig&&(we.msgConfig=re.msgConfig),ue.length>0&&(we.reactions=ue),de&&(we.chatThread=de),fe&&(we.chatThreadOverview=fe),"chatRoom"===V&&(we.priority=Y,we.broadcast=$),le.operationCount>0&&(we.modifiedInfo=le),ee&&(we.isContentReplaced=ee),ve&&(we.isRead=!0),pe&&(we.isDelivered=!0),ne=we,J||null===(D=this.eventHandler)||void 0===D||D.dispatch("onCmdMessage",we),[3,29];case 24:return Le={},Ue={},H.contents[0].customExts&&(Le=g(H.contents[0].customExts)),H.contents[0].params&&(Ue=g(H.contents[0].params)),re={id:G,type:W,contentsType:_[B.type],from:j,to:q,customEvent:B.customEvent,params:Ue,customExts:Le,ext:ae,time:K,onlineState:z},!J&&this.onCustomMessage&&this.onCustomMessage(re),xe={id:G,type:"custom",chatType:V,from:j,to:q,customEvent:B.customEvent,params:Ue,customExts:Le,ext:ae,time:Number(K),onlineState:z},re.msgConfig&&(xe.msgConfig=re.msgConfig),ue.length>0&&(xe.reactions=ue),de&&(xe.chatThread=de),fe&&(xe.chatThreadOverview=fe),le.operationCount>0&&(xe.modifiedInfo=le),"chatRoom"===V&&(xe.priority=Y,xe.broadcast=$),ee&&(xe.isContentReplaced=ee),ve&&(xe.isRead=!0),pe&&(xe.isDelivered=!0),ne=xe,J?[3,26]:[4,null===(k=null===(P=this._localCache)||void 0===P?void 0:P.getInstance())||void 0===k?void 0:k.storeMessage(xe,h.q.SUCCESS)];case 25:m.sent(),null===(F=this.eventHandler)||void 0===F||F.dispatch("onCustomMessage",xe),m.label=26;case 26:return[3,29];case 27:return he=E.call(this,B),De={id:G,type:"combine",chatType:V,to:q,from:j,ext:ae,time:Number(K),onlineState:z,title:B.title||"",summary:B.summary||"",url:he||"",secret:B.secretKey||"",file_length:B.fileLength||0,filename:B.displayName||"",compatibleText:B.text,combineLevel:B.combineLevel||0},re.msgConfig&&(De.msgConfig=re.msgConfig),ue.length>0&&(De.reactions=ue),de&&(De.chatThread=de),fe&&(De.chatThreadOverview=fe),"chatRoom"===V&&(De.priority=Y,De.broadcast=$),le.operationCount>0&&(De.modifiedInfo=le),ee&&(De.isContentReplaced=ee),ve&&(De.isRead=!0),pe&&(De.isDelivered=!0),ne=De,!J&&this.eventHandler&&this.eventHandler.dispatch("onCombineMessage",De),[3,29];case 28:return d.vF.error("Unknow message type, message:",B),[3,29];case 29:return X?[2,ne]:[2,re]}}))}))}function I(e,t,r){if(this.delivery&&e!==t){var n=this.getUniqueId(),i=new f.Q("delivery",n);i.set({ackId:r,to:e}),d.vF.debug("send delivery ack"),this.send(i.body)}}t.Ay=function(e,t,r,i,s){var l,f,h,_,E,y,S,C,b,N,A,M,w,L,U,x,D,P,k,F,H,B,G,W,j,q,K,z,V,J;return v(this,void 0,void 0,(function(){var v,Y,X,Q,$,Z,ee,te,re,ne,ie,oe,se,ae,ue,ce,le,de,fe,he,pe,ve,me,_e,ge,Ee,ye,Oe,Te,Re,Ie,Se,Ce,be,Ne,Ae,Me,we,Le,Ue,xe,De,Pe,ke,Fe;return m(this,(function(m){switch(m.label){case 0:if(v=new(o())(e.timestamp.low,e.timestamp.high,e.timestamp.unsigned).toString(),Y=this.root.lookup("easemob.pb.MessageBody"),X=Y.decode(e.payload),Q=3,$=!1,Z=new(o())(e.id.low,e.id.high,e.id.unsigned).toString(),s&&e.from&&e.from.name===this.context.userId&&e.from.clientResource===this.clientResource&&X.type===u.up.CHATROOM)return[2,d.vF.debug("Discard your own chat room message:",Z)];if(ee=(null===(l=e.from)||void 0===l?void 0:l.name)||"",te=e.to?e.to.name:"",re=!!e.to&&-1!==e.to.domain.indexOf("conference"),this._load_msg_cache.some((function(e){return e.msgId===Z}))&&10!==X.contents[0].subType&&!r)return[2,d.vF.debug("Discard message in cache:",Z)];if(this._load_msg_cache.length<=this.max_cache_length||this._load_msg_cache.shift(),this._load_msg_cache.push({msgId:Z,from:ee,to:te,isGroup:re}),e.meta&&e.meta.length){if(ne=a.Wp.parseNotify(e.meta),ie=ne.is_online,oe=ne.callback_replace,this.useReplacedMessageContents&&oe&&($=!0),ie||0===ie)switch(ie){case 0:Q=0;break;case 1:Q=1;break;default:Q=2}}else Q=3;switch(se=X.ackMessageId?new(o())(X.ackMessageId.low,X.ackMessageId.high,X.ackMessageId.unsigned).toString():"",ae="",ue=O.call(this,e,X),ce=T.call(this,e,X),d.vF.debug("received message:",{metaId:Z,metaNs:e.ns,type:X.type,from:ue,to:ce,contentType:null===(h=null===(f=X.contents)||void 0===f?void 0:f[0])||void 0===h?void 0:h.type,contentLen:null===(_=X.contents)||void 0===_?void 0:_.length}),X.type){case u.up.SINGLECHAT:return[3,1];case u.up.GROUPCHAT:return[3,2];case u.up.CHATROOM:return[3,3];case u.up.READ_ACK:return[3,4];case u.up.DELIVER_ACK:return[3,5];case u.up.RECALL:return[3,6];case u.up.CHANNEL_ACK:return[3,15];case u.up.EDIT:return[3,16]}return[3,20];case 1:return ae="chat","agoraToken"===this.grantType&&(ae="singleChat"),this.delivery&&!r&&ue!==this.context.userId&&10!==(null===(E=X.contents[0])||void 0===E?void 0:E.subType)&&I.call(this,ue,ce,Z),[3,21];case 2:return ae="groupchat","agoraToken"===this.grantType&&(ae="groupChat"),[3,21];case 3:return ae="chatroom","agoraToken"===this.grantType&&(ae="chatRoom"),Q=1,[3,21];case 4:return ae="read_ack",le=void 0,X.ext[0]&&JSON.parse(X.ext[0].stringValue)?(le={id:Z,type:"read",from:ue,to:ce,mid:se,groupReadCount:X.ext[0]&&JSON.parse(X.ext[0].stringValue),ackContent:X.ackContent,onlineState:Q},this.onReadMessage&&this.onReadMessage(le),null===(y=this.eventHandler)||void 0===y||y.dispatch("onReadMessage",le),[2]):(le={id:Z,type:"read",from:ue,to:ce,mid:se,onlineState:Q},this.onReadMessage&&this.onReadMessage(le),null===(S=this.eventHandler)||void 0===S||S.dispatch("onReadMessage",le),[2]);case 5:return ae="deliver_ack",this.onDeliveredMessage&&this.onDeliveredMessage({id:Z,type:"delivery",from:ue,to:ce,mid:se,onlineState:Q}),de={id:Z,type:"delivery",from:ue,to:ce,mid:se,onlineState:Q},null===(C=this.eventHandler)||void 0===C||C.dispatch("onDeliveredMessage",de),[2];case 6:return ae="recall",fe="",e.ext&&(fe=(null===(b=g(e.ext))||void 0===b?void 0:b.recallMessageExtensionInfo)||""),he={id:Z,from:ue||"admin",to:ce,mid:se,ext:fe,onlineState:Q},pe=ce===this.user?ue:ce,[4,null===(A=null===(N=this._localCache)||void 0===N?void 0:N.getInstance())||void 0===A?void 0:A.getMessageByServerMsgId(he.mid)];case 7:return(ve=m.sent())?[4,null===(w=null===(M=this._localCache)||void 0===M?void 0:M.getInstance())||void 0===w?void 0:w.removeMsgByServerMsgId(he.mid)]:[3,9];case 8:m.sent(),m.label=9;case 9:return"singleChat"!==(null==ve?void 0:ve.chatType)&&"groupChat"!==(null==ve?void 0:ve.chatType)?[3,14]:(me=(null==ve?void 0:ve.from)===this.user||""===(null==ve?void 0:ve.from),[4,null===(U=null===(L=this._localCache)||void 0===L?void 0:L.getInstance())||void 0===U?void 0:U.getConversationLastMessage(pe,ve.chatType)]);case 10:return _e=m.sent(),[4,null===(D=null===(x=this._localCache)||void 0===x?void 0:x.getInstance())||void 0===D?void 0:D.getConversationBySessionId((0,c.u0)({conversationId:pe,conversationType:ve.chatType}))];case 11:return(ge=m.sent())?[4,null===(k=null===(P=this._localCache)||void 0===P?void 0:P.getInstance())||void 0===k?void 0:k.updateLocalConversation((0,c.u0)({conversationId:pe,conversationType:ve.chatType}),{lastMessageId:null==_e?void 0:_e.serverMsgId,unReadCount:(0,c.rH)({conversation:ge,isRecallSelfMsg:me,recalledMsgTime:ve.time})})]:[3,13];case 12:m.sent(),m.label=13;case 13:m.label=14;case 14:return this.onRecallMessage&&this.onRecallMessage(he),null===(F=this.eventHandler)||void 0===F||F.dispatch("onRecallMessage",he),[2];case 15:return this.onChannelMessage&&this.onChannelMessage({id:Z,mid:se,type:"channel",chatType:"singleChat",from:ue,to:ce,time:Number(v),onlineState:Q}),Ee={id:Z,mid:se,type:"channel",chatType:"singleChat",from:ue,to:ce,time:Number(v),onlineState:Q},null===(H=this.eventHandler)||void 0===H||H.dispatch("onChannelMessage",Ee),[2];case 16:return ye={errorCode:0,reason:""},Oe="",Te=0,Re="",X.meta&&"string"==typeof X.meta&&(Ie=JSON.parse(X.meta)).edit_msg&&(Se=Ie.edit_msg,Ce=Se.sender,be=Se.send_time,Ne=Se.chat_type,Oe=Ce,Te=be,Re=n[Ne]),Ae=X.editMessageId&&new(o())(X.editMessageId.low,X.editMessageId.high,X.editMessageId.unsigned).toString(),Me=X.editScope,[4,R.call(this,{status:ye,thirdMessage:X,msgBody:X.contents[0],msgId:Ae,type:ae,from:Oe,to:ce,time:Te,onlineState:Q,ignoreCallback:!0,format:!0,isContentReplaced:$})];case 17:return(we=m.sent()).chatType=Re,e.ignoreCallback?[2,we]:we?[4,null===(G=null===(B=this._localCache)||void 0===B?void 0:B.getInstance())||void 0===G?void 0:G.getMessageByServerMsgId(we.id)]:[3,19];case 18:(Le=m.sent())&&(Ue=Le.ext||{},(Me===u.xz.BODY_AND_EXT||Object.keys(we.ext||{}).length>0)&&(Ue=we.ext),"txt"===we.type&&"txt"===Le.type?null===(j=null===(W=this._localCache)||void 0===W?void 0:W.getInstance())||void 0===j||j.putMessageToDB(p(p({},Le),{msg:we.msg,modifiedInfo:we.modifiedInfo,translations:we.translations,ext:Ue})):"custom"===we.type&&"custom"===Le.type?null===(K=null===(q=this._localCache)||void 0===q?void 0:q.getInstance())||void 0===K||K.putMessageToDB(p(p({},Le),{ext:Ue,customExts:we.customExts,customEvent:we.customEvent,modifiedInfo:we.modifiedInfo})):null===(V=null===(z=this._localCache)||void 0===z?void 0:z.getInstance())||void 0===V||V.putMessageToDB(p(p({},Le),{ext:Ue,modifiedInfo:we.modifiedInfo}))),m.label=19;case 19:return null===(J=this.eventHandler)||void 0===J||J.dispatch("onModifiedMessage",we),[2];case 20:return d.vF.error("unexpected message type: ".concat(X.type)),[2];case 21:xe="normal",Pe=!1,"chat"===ae.toLowerCase()||"singleChat"===ae?De="singleChat":"groupchat"===ae.toLowerCase()||"groupChat"===ae?De="groupChat":(De="chatRoom",Q=1,e.ext&&(ke=g(e.ext),Pe=!!(null==ke?void 0:ke.is_broadcast),xe=0===ke.chatroom_msg_tag?"high":2===ke.chatroom_msg_tag?"low":"normal")),Fe=0,m.label=22;case 22:return Fe<X.contents.length?[4,R.call(this,{status:t,thirdMessage:X,msgBody:X.contents[Fe],msgId:Z,type:ae,from:ue,to:ce,time:v,onlineState:Q,chatType:De,ignoreCallback:r,priority:xe,format:i,broadcast:Pe,isContentReplaced:$,meta:e})]:[3,25];case 23:return[2,m.sent()];case 24:return Fe++,[3,22];case 25:return[2]}}))}))}},8598:function(e,t,r){"use strict";var n=r(6518),i=r(9504),o=r(7055),s=r(5397),a=r(4598),u=i([].join);n({target:"Array",proto:!0,forced:o!==Object||!a("join",",")},{join:function(e){return u(s(this),void 0===e?",":e)}})},8622:function(e,t,r){"use strict";var n=r(4576),i=r(4901),o=n.WeakMap;e.exports=i(o)&&/native code/.test(String(o))},8686:function(e,t,r){"use strict";var n=r(3724),i=r(9039);e.exports=n&&i((function(){return 42!==Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype}))},8706:function(e,t,r){"use strict";var n=r(6518),i=r(9039),o=r(4376),s=r(34),a=r(8981),u=r(6198),c=r(6837),l=r(4659),d=r(1469),f=r(597),h=r(8227),p=r(9519),v=h("isConcatSpreadable"),m=p>=51||!i((function(){var e=[];return e[v]=!1,e.concat()[0]!==e})),_=function(e){if(!s(e))return!1;var t=e[v];return void 0!==t?!!t:o(e)};n({target:"Array",proto:!0,arity:1,forced:!m||!f("concat")},{concat:function(e){var t,r,n,i,o,s=a(this),f=d(s,0),h=0;for(t=-1,n=arguments.length;t<n;t++)if(_(o=-1===t?s:arguments[t]))for(i=u(o),c(h+i),r=0;r<i;r++,h++)r in o&&l(f,h,o[r]);else c(h+1),l(f,h++,o);return f.length=h,f}})},8727:function(e){"use strict";e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},8745:function(e,t,r){"use strict";var n=r(616),i=Function.prototype,o=i.apply,s=i.call;e.exports="object"==typeof Reflect&&Reflect.apply||(n?s.bind(o):function(){return s.apply(o,arguments)})},8747:function(e,t,r){"use strict";var n=r(4644),i=n.aTypedArray,o=n.exportTypedArrayMethod,s=Math.floor;o("reverse",(function(){for(var e,t=this,r=i(t).length,n=s(r/2),o=0;o<n;)e=t[o],t[o++]=t[--r],t[r]=e;return t}))},8773:function(e,t){"use strict";var r={}.propertyIsEnumerable,n=Object.getOwnPropertyDescriptor,i=n&&!r.call({1:2},1);t.f=i?function(e){var t=n(this,e);return!!t&&t.enumerable}:r},8781:function(e,t,r){"use strict";var n=r(350).PROPER,i=r(6840),o=r(8551),s=r(655),a=r(9039),u=r(1034),c="toString",l=RegExp.prototype,d=l[c],f=a((function(){return"/a/b"!==d.call({source:"a",flags:"b"})})),h=n&&d.name!==c;(f||h)&&i(l,c,(function(){var e=o(this);return"/"+s(e.source)+"/"+s(u(e))}),{unsafe:!0})},8811:function(e,t,r){"use strict";e.exports=o;var n=r(7209);((o.prototype=Object.create(n.prototype)).constructor=o).className="Method";var i=r(3262);function o(e,t,r,o,s,a,u,c,l){if(i.isObject(s)?(u=s,s=a=void 0):i.isObject(a)&&(u=a,a=void 0),void 0!==t&&!i.isString(t))throw TypeError("type must be a string");if(!i.isString(r))throw TypeError("requestType must be a string");if(!i.isString(o))throw TypeError("responseType must be a string");n.call(this,e,u),this.type=t||"rpc",this.requestType=r,this.requestStream=!!s||void 0,this.responseType=o,this.responseStream=!!a||void 0,this.resolvedRequestType=null,this.resolvedResponseType=null,this.comment=c,this.parsedOptions=l}o.fromJSON=function(e,t){return new o(e,t.type,t.requestType,t.responseType,t.requestStream,t.responseStream,t.options,t.comment,t.parsedOptions)},o.prototype.toJSON=function(e){var t=!!e&&Boolean(e.keepComments);return i.toObject(["type","rpc"!==this.type&&this.type||void 0,"requestType",this.requestType,"requestStream",this.requestStream,"responseType",this.responseType,"responseStream",this.responseStream,"options",this.options,"comment",t?this.comment:void 0,"parsedOptions",this.parsedOptions])},o.prototype.resolve=function(){return this.resolved?this:(this.resolvedRequestType=this.parent.lookupType(this.requestType),this.resolvedResponseType=this.parent.lookupType(this.responseType),n.prototype.resolve.call(this))}},8814:function(e,t,r){"use strict";var n=r(9039),i=r(4576).RegExp;e.exports=n((function(){var e=i("(?<a>b)","g");return"b"!==e.exec("b").groups.a||"bc"!=="b".replace(e,"$<a>c")}))},8839:function(e,t){"use strict";var r=t;r.length=function(e){var t=e.length;if(!t)return 0;for(var r=0;--t%4>1&&"="===e.charAt(t);)++r;return Math.ceil(3*e.length)/4-r};for(var n=new Array(64),i=new Array(123),o=0;o<64;)i[n[o]=o<26?o+65:o<52?o+71:o<62?o-4:o-59|43]=o++;r.encode=function(e,t,r){for(var i,o=null,s=[],a=0,u=0;t<r;){var c=e[t++];switch(u){case 0:s[a++]=n[c>>2],i=(3&c)<<4,u=1;break;case 1:s[a++]=n[i|c>>4],i=(15&c)<<2,u=2;break;case 2:s[a++]=n[i|c>>6],s[a++]=n[63&c],u=0}a>8191&&((o||(o=[])).push(String.fromCharCode.apply(String,s)),a=0)}return u&&(s[a++]=n[i],s[a++]=61,1===u&&(s[a++]=61)),o?(a&&o.push(String.fromCharCode.apply(String,s.slice(0,a))),o.join("")):String.fromCharCode.apply(String,s.slice(0,a))};var s="invalid encoding";r.decode=function(e,t,r){for(var n,o=r,a=0,u=0;u<e.length;){var c=e.charCodeAt(u++);if(61===c&&a>1)break;if(void 0===(c=i[c]))throw Error(s);switch(a){case 0:n=c,a=1;break;case 1:t[r++]=n<<2|(48&c)>>4,n=c,a=2;break;case 2:t[r++]=(15&n)<<4|(60&c)>>2,n=c,a=3;break;case 3:t[r++]=(3&n)<<6|c,a=0}}if(1===a)throw Error(s);return r-o},r.test=function(e){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(e)}},8845:function(e,t,r){"use strict";var n=r(4576),i=r(9565),o=r(4644),s=r(6198),a=r(8229),u=r(8981),c=r(9039),l=n.RangeError,d=n.Int8Array,f=d&&d.prototype,h=f&&f.set,p=o.aTypedArray,v=o.exportTypedArrayMethod,m=!c((function(){var e=new Uint8ClampedArray(2);return i(h,e,{length:1,0:3},1),3!==e[1]})),_=m&&o.NATIVE_ARRAY_BUFFER_VIEWS&&c((function(){var e=new d(2);return e.set(1),e.set("2",1),0!==e[0]||2!==e[1]}));v("set",(function(e){p(this);var t=a(arguments.length>1?arguments[1]:void 0,1),r=u(e);if(m)return i(h,this,r,t);var n=this.length,o=s(r),c=0;if(o+t>n)throw new l("Wrong length");for(;c<o;)this[t+c]=r[c++]}),!m||_)},8921:function(e,t,r){"use strict";var n=r(6518),i=r(8379);n({target:"Array",proto:!0,forced:i!==[].lastIndexOf},{lastIndexOf:i})},8923:function(e,t,r){"use strict";e.exports=d;var n=r(7209);((d.prototype=Object.create(n.prototype)).constructor=d).className="Namespace";var i,o,s,a=r(1344),u=r(1457),c=r(3262);function l(e,t){if(e&&e.length){for(var r={},n=0;n<e.length;++n)r[e[n].name]=e[n].toJSON(t);return r}}function d(e,t){n.call(this,e,t),this.nested=void 0,this._nestedArray=null}function f(e){return e._nestedArray=null,e}d.fromJSON=function(e,t){return new d(e,t.options).addJSON(t.nested)},d.arrayToJSON=l,d.isReservedId=function(e,t){if(e)for(var r=0;r<e.length;++r)if("string"!=typeof e[r]&&e[r][0]<=t&&e[r][1]>t)return!0;return!1},d.isReservedName=function(e,t){if(e)for(var r=0;r<e.length;++r)if(e[r]===t)return!0;return!1},Object.defineProperty(d.prototype,"nestedArray",{get:function(){return this._nestedArray||(this._nestedArray=c.toArray(this.nested))}}),d.prototype.toJSON=function(e){return c.toObject(["options",this.options,"nested",l(this.nestedArray,e)])},d.prototype.addJSON=function(e){if(e)for(var t,r=Object.keys(e),n=0;n<r.length;++n)t=e[r[n]],this.add((void 0!==t.fields?i.fromJSON:void 0!==t.values?s.fromJSON:void 0!==t.methods?o.fromJSON:void 0!==t.id?a.fromJSON:d.fromJSON)(r[n],t));return this},d.prototype.get=function(e){return this.nested&&this.nested[e]||null},d.prototype.getEnum=function(e){if(this.nested&&this.nested[e]instanceof s)return this.nested[e].values;throw Error("no such enum: "+e)},d.prototype.add=function(e){if(!(e instanceof a&&void 0!==e.extend||e instanceof i||e instanceof s||e instanceof o||e instanceof d||e instanceof u))throw TypeError("object must be a valid nested object");if(this.nested){var t=this.get(e.name);if(t){if(!(t instanceof d&&e instanceof d)||t instanceof i||t instanceof o)throw Error("duplicate name '"+e.name+"' in "+this);for(var r=t.nestedArray,n=0;n<r.length;++n)e.add(r[n]);this.remove(t),this.nested||(this.nested={}),e.setOptions(t.options,!0)}}else this.nested={};return this.nested[e.name]=e,e.onAdd(this),f(this)},d.prototype.remove=function(e){if(!(e instanceof n))throw TypeError("object must be a ReflectionObject");if(e.parent!==this)throw Error(e+" is not a member of "+this);return delete this.nested[e.name],Object.keys(this.nested).length||(this.nested=void 0),e.onRemove(this),f(this)},d.prototype.define=function(e,t){if(c.isString(e))e=e.split(".");else if(!Array.isArray(e))throw TypeError("illegal path");if(e&&e.length&&""===e[0])throw Error("path must be relative");for(var r=this;e.length>0;){var n=e.shift();if(r.nested&&r.nested[n]){if(!((r=r.nested[n])instanceof d))throw Error("path conflicts with non-namespace objects")}else r.add(r=new d(n))}return t&&r.addJSON(t),r},d.prototype.resolveAll=function(){for(var e=this.nestedArray,t=0;t<e.length;)e[t]instanceof d?e[t++].resolveAll():e[t++].resolve();return this.resolve()},d.prototype.lookup=function(e,t,r){if("boolean"==typeof t?(r=t,t=void 0):t&&!Array.isArray(t)&&(t=[t]),c.isString(e)&&e.length){if("."===e)return this.root;e=e.split(".")}else if(!e.length)return this;if(""===e[0])return this.root.lookup(e.slice(1),t);var n=this.get(e[0]);if(n){if(1===e.length){if(!t||t.indexOf(n.constructor)>-1)return n}else if(n instanceof d&&(n=n.lookup(e.slice(1),t,!0)))return n}else for(var i=0;i<this.nestedArray.length;++i)if(this._nestedArray[i]instanceof d&&(n=this._nestedArray[i].lookup(e,t,!0)))return n;return null===this.parent||r?null:this.parent.lookup(e,t)},d.prototype.lookupType=function(e){var t=this.lookup(e,[i]);if(!t)throw Error("no such type: "+e);return t},d.prototype.lookupEnum=function(e){var t=this.lookup(e,[s]);if(!t)throw Error("no such Enum '"+e+"' in "+this);return t},d.prototype.lookupTypeOrEnum=function(e){var t=this.lookup(e,[i,s]);if(!t)throw Error("no such Type or Enum '"+e+"' in "+this);return t},d.prototype.lookupService=function(e){var t=this.lookup(e,[o]);if(!t)throw Error("no such Service '"+e+"' in "+this);return t},d._configure=function(e,t,r){i=e,o=t,s=r}},8940:function(e,t,r){"use strict";var n=r(6518),i=r(2703);n({global:!0,forced:parseInt!==i},{parseInt:i})},8980:function(e,t,r){"use strict";var n=r(6518),i=r(9213).findIndex,o=r(6469),s="findIndex",a=!0;s in[]&&Array(1)[s]((function(){a=!1})),n({target:"Array",proto:!0,forced:a},{findIndex:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}}),o(s)},8981:function(e,t,r){"use strict";var n=r(7750),i=Object;e.exports=function(e){return i(n(e))}},8995:function(e,t,r){"use strict";var n=r(4644),i=r(9213).map,o=n.aTypedArray,s=n.getTypedArrayConstructor;(0,n.exportTypedArrayMethod)("map",(function(e){return i(o(this),e,arguments.length>1?arguments[1]:void 0,(function(e,t){return new(s(e))(t)}))}))},9039:function(e){"use strict";e.exports=function(e){try{return!!e()}catch(e){return!0}}},9061:function(e,t,r){"use strict";r.d(t,{Jz:function(){return n},KU:function(){return o},Po:function(){return u},XI:function(){return d},Xp:function(){return s},ey:function(){return a},lM:function(){return l},nf:function(){return i},uN:function(){return c}}),r(3792),r(6033),r(6099),r(7764),r(2953);var n=7,i=new Map,o="im",s=new Map,a="32f24ab2ddb74f508aa9286c356cec84",u=1e3,c={INIT:9674,API:9675},l="direct",d=-1},9085:function(e,t,r){"use strict";var n=r(6518),i=r(4213);n({target:"Object",stat:!0,arity:2,forced:Object.assign!==i},{assign:i})},9089:function(e,t,r){"use strict";var n=r(6518),i=r(9504),o=Date,s=i(o.prototype.getTime);n({target:"Date",stat:!0},{now:function(){return s(new o)}})},9100:function(e,t,r){"use strict";var n=e.exports=r(5325);n.build="full",n.tokenize=r(527),n.parse=r(4863),n.common=r(5095),n.Root._configure(n.Type,n.parse,n.common)},9167:function(e,t,r){"use strict";var n=r(4576);e.exports=n},9207:function(e,t){"use strict";var r=t,n=r.isAbsolute=function(e){return/^(?:\/|\w+:)/.test(e)},i=r.normalize=function(e){var t=(e=e.replace(/\\/g,"/").replace(/\/{2,}/g,"/")).split("/"),r=n(e),i="";r&&(i=t.shift()+"/");for(var o=0;o<t.length;)".."===t[o]?o>0&&".."!==t[o-1]?t.splice(--o,2):r?t.splice(o,1):++o:"."===t[o]?t.splice(o,1):++o;return i+t.join("/")};r.resolve=function(e,t,r){return r||(t=i(t)),n(t)?t:(r||(e=i(e)),(e=e.replace(/(?:\/|^)[^/]+$/,"")).length?i(e+"/"+t):t)}},9213:function(e,t,r){"use strict";var n=r(6080),i=r(9504),o=r(7055),s=r(8981),a=r(6198),u=r(1469),c=i([].push),l=function(e){var t=1===e,r=2===e,i=3===e,l=4===e,d=6===e,f=7===e,h=5===e||d;return function(p,v,m,_){for(var g,E,y=s(p),O=o(y),T=a(O),R=n(v,m),I=0,S=_||u,C=t?S(p,T):r||f?S(p,0):void 0;T>I;I++)if((h||I in O)&&(E=R(g=O[I],I,y),e))if(t)C[I]=E;else if(E)switch(e){case 3:return!0;case 5:return g;case 6:return I;case 2:c(C,g)}else switch(e){case 4:return!1;case 7:c(C,g)}return d?-1:i||l?l:C}};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)}},9225:function(e,t,r){"use strict";var n,i,o,s,a=r(4576),u=r(8745),c=r(6080),l=r(4901),d=r(9297),f=r(9039),h=r(397),p=r(7680),v=r(4055),m=r(2812),_=r(9544),g=r(6193),E=a.setImmediate,y=a.clearImmediate,O=a.process,T=a.Dispatch,R=a.Function,I=a.MessageChannel,S=a.String,C=0,b={},N="onreadystatechange";f((function(){n=a.location}));var A=function(e){if(d(b,e)){var t=b[e];delete b[e],t()}},M=function(e){return function(){A(e)}},w=function(e){A(e.data)},L=function(e){a.postMessage(S(e),n.protocol+"//"+n.host)};E&&y||(E=function(e){m(arguments.length,1);var t=l(e)?e:R(e),r=p(arguments,1);return b[++C]=function(){u(t,void 0,r)},i(C),C},y=function(e){delete b[e]},g?i=function(e){O.nextTick(M(e))}:T&&T.now?i=function(e){T.now(M(e))}:I&&!_?(s=(o=new I).port2,o.port1.onmessage=w,i=c(s.postMessage,s)):a.addEventListener&&l(a.postMessage)&&!a.importScripts&&n&&"file:"!==n.protocol&&!f(L)?(i=L,a.addEventListener("message",w,!1)):i=N in v("script")?function(e){h.appendChild(v("script"))[N]=function(){h.removeChild(this),A(e)}}:function(e){setTimeout(M(e),0)}),e.exports={set:E,clear:y}},9228:function(e,t,r){"use strict";r(7495);var n=r(9565),i=r(6840),o=r(7323),s=r(9039),a=r(8227),u=r(6699),c=a("species"),l=RegExp.prototype;e.exports=function(e,t,r,d){var f=a(e),h=!s((function(){var t={};return t[f]=function(){return 7},7!==""[e](t)})),p=h&&!s((function(){var t=!1,r=/a/;return"split"===e&&((r={}).constructor={},r.constructor[c]=function(){return r},r.flags="",r[f]=/./[f]),r.exec=function(){return t=!0,null},r[f](""),!t}));if(!h||!p||r){var v=/./[f],m=t(f,""[e],(function(e,t,r,i,s){var a=t.exec;return a===o||a===l.exec?h&&!s?{done:!0,value:n(v,t,r,i)}:{done:!0,value:n(e,r,t,i)}:{done:!1}}));i(String.prototype,e,m[0]),i(l,f,m[1])}d&&u(l[f],"sham",!0)}},9254:function(e,t,r){"use strict";r.d(t,{rH:function(){return i},s5:function(){return o},u0:function(){return n}}),r(8706);var n=function(e){return"".concat(e.conversationType,"-").concat(e.conversationId)},i=function(e){var t=e.isRecallSelfMsg,r=e.conversation,n=e.recalledMsgTime,i=r.unReadCount,o=void 0===i?0:i,s=r.unreadCountClearTimestamp;return t||(void 0===s?0:s)>n?o:o&&o>0?o-1:0},o=function(e){var t,r=0;if(0===e.length)return r;for(t=0;t<e.length;t++)r=(r<<5)-r+e.charCodeAt(t),r|=0;return r}},9296:function(e,t,r){"use strict";var n=r(4055)("span").classList,i=n&&n.constructor&&n.constructor.prototype;e.exports=i===Object.prototype?void 0:i},9297:function(e,t,r){"use strict";var n=r(9504),i=r(8981),o=n({}.hasOwnProperty);e.exports=Object.hasOwn||function(e,t){return o(i(e),t)}},9306:function(e,t,r){"use strict";var n=r(4901),i=r(6823),o=TypeError;e.exports=function(e){if(n(e))return e;throw new o(i(e)+" is not a function")}},9369:function(e,t,r){"use strict";var n=r(4644),i=r(9504),o=n.aTypedArray,s=n.exportTypedArrayMethod,a=i([].join);s("join",(function(e){return a(o(this),e)}))},9390:function(e){"use strict";e.exports=function(e,t,r){var n=r||8192,i=n>>>1,o=null,s=n;return function(r){if(r<1||r>i)return e(r);s+r>n&&(o=e(n),s=0);var a=t.call(o,s,s+=r);return 7&s&&(s=1+(7|s)),a}}},9410:function(e){"use strict";function t(e){return"undefined"!=typeof Float32Array?function(){var t=new Float32Array([-0]),r=new Uint8Array(t.buffer),n=128===r[3];function i(e,n,i){t[0]=e,n[i]=r[0],n[i+1]=r[1],n[i+2]=r[2],n[i+3]=r[3]}function o(e,n,i){t[0]=e,n[i]=r[3],n[i+1]=r[2],n[i+2]=r[1],n[i+3]=r[0]}function s(e,n){return r[0]=e[n],r[1]=e[n+1],r[2]=e[n+2],r[3]=e[n+3],t[0]}function a(e,n){return r[3]=e[n],r[2]=e[n+1],r[1]=e[n+2],r[0]=e[n+3],t[0]}e.writeFloatLE=n?i:o,e.writeFloatBE=n?o:i,e.readFloatLE=n?s:a,e.readFloatBE=n?a:s}():function(){function t(e,t,r,n){var i=t<0?1:0;if(i&&(t=-t),0===t)e(1/t>0?0:2147483648,r,n);else if(isNaN(t))e(2143289344,r,n);else if(t>34028234663852886e22)e((i<<31|2139095040)>>>0,r,n);else if(t<11754943508222875e-54)e((i<<31|Math.round(t/1401298464324817e-60))>>>0,r,n);else{var o=Math.floor(Math.log(t)/Math.LN2);e((i<<31|o+127<<23|8388607&Math.round(t*Math.pow(2,-o)*8388608))>>>0,r,n)}}function s(e,t,r){var n=e(t,r),i=2*(n>>31)+1,o=n>>>23&255,s=8388607&n;return 255===o?s?NaN:i*(1/0):0===o?1401298464324817e-60*i*s:i*Math.pow(2,o-150)*(s+8388608)}e.writeFloatLE=t.bind(null,r),e.writeFloatBE=t.bind(null,n),e.readFloatLE=s.bind(null,i),e.readFloatBE=s.bind(null,o)}(),"undefined"!=typeof Float64Array?function(){var t=new Float64Array([-0]),r=new Uint8Array(t.buffer),n=128===r[7];function i(e,n,i){t[0]=e,n[i]=r[0],n[i+1]=r[1],n[i+2]=r[2],n[i+3]=r[3],n[i+4]=r[4],n[i+5]=r[5],n[i+6]=r[6],n[i+7]=r[7]}function o(e,n,i){t[0]=e,n[i]=r[7],n[i+1]=r[6],n[i+2]=r[5],n[i+3]=r[4],n[i+4]=r[3],n[i+5]=r[2],n[i+6]=r[1],n[i+7]=r[0]}function s(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 a(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?i:o,e.writeDoubleBE=n?o:i,e.readDoubleLE=n?s:a,e.readDoubleBE=n?a:s}():function(){function t(e,t,r,n,i,o){var s=n<0?1:0;if(s&&(n=-n),0===n)e(0,i,o+t),e(1/n>0?0:2147483648,i,o+r);else if(isNaN(n))e(0,i,o+t),e(2146959360,i,o+r);else if(n>17976931348623157e292)e(0,i,o+t),e((s<<31|2146435072)>>>0,i,o+r);else{var a;if(n<22250738585072014e-324)e((a=n/5e-324)>>>0,i,o+t),e((s<<31|a/4294967296)>>>0,i,o+r);else{var u=Math.floor(Math.log(n)/Math.LN2);1024===u&&(u=1023),e(4503599627370496*(a=n*Math.pow(2,-u))>>>0,i,o+t),e((s<<31|u+1023<<20|1048576*a&1048575)>>>0,i,o+r)}}}function s(e,t,r,n,i){var o=e(n,i+t),s=e(n,i+r),a=2*(s>>31)+1,u=s>>>20&2047,c=4294967296*(1048575&s)+o;return 2047===u?c?NaN:a*(1/0):0===u?5e-324*a*c:a*Math.pow(2,u-1075)*(c+4503599627370496)}e.writeDoubleLE=t.bind(null,r,0,4),e.writeDoubleBE=t.bind(null,n,4,0),e.readDoubleLE=s.bind(null,i,0,4),e.readDoubleBE=s.bind(null,o,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 i(e,t){return(e[t]|e[t+1]<<8|e[t+2]<<16|e[t+3]<<24)>>>0}function o(e,t){return(e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3])>>>0}e.exports=t(t)},9423:function(e,t,r){"use strict";var n=r(4644),i=r(9039),o=r(7680),s=n.aTypedArray,a=n.getTypedArrayConstructor;(0,n.exportTypedArrayMethod)("slice",(function(e,t){for(var r=o(s(this),e,t),n=a(this),i=0,u=r.length,c=new n(u);u>i;)c[i]=r[i++];return c}),i((function(){new Int8Array(1).slice()})))},9432:function(e,t,r){"use strict";var n=r(6518),i=r(8981),o=r(1072);n({target:"Object",stat:!0,forced:r(9039)((function(){o(1)}))},{keys:function(e){return o(i(e))}})},9433:function(e,t,r){"use strict";var n=r(4576),i=Object.defineProperty;e.exports=function(e,t){try{i(n,e,{value:t,configurable:!0,writable:!0})}catch(r){n[e]=t}return t}},9449:function(e,t,r){"use strict";var n,i=r(6518),o=r(7476),s=r(7347).f,a=r(8014),u=r(655),c=r(5749),l=r(7750),d=r(1436),f=r(6395),h=o("".slice),p=Math.min,v=d("endsWith");i({target:"String",proto:!0,forced:!(!f&&!v&&(n=s(String.prototype,"endsWith"),n&&!n.writable)||v)},{endsWith:function(e){var t=u(l(this));c(e);var r=arguments.length>1?arguments[1]:void 0,n=t.length,i=void 0===r?n:p(a(r),n),o=u(e);return h(t,i-o.length,i)===o}})},9463:function(e,t,r){"use strict";var n=r(6518),i=r(3724),o=r(4576),s=r(9504),a=r(9297),u=r(4901),c=r(1625),l=r(655),d=r(2106),f=r(7740),h=o.Symbol,p=h&&h.prototype;if(i&&u(h)&&(!("description"in p)||void 0!==h().description)){var v={},m=function(){var e=arguments.length<1||void 0===arguments[0]?void 0:l(arguments[0]),t=c(p,this)?new h(e):void 0===e?h():h(e);return""===e&&(v[t]=!0),t};f(m,h),m.prototype=p,p.constructor=m;var _="Symbol(description detection)"===String(h("description detection")),g=s(p.valueOf),E=s(p.toString),y=/^Symbol\((.*)\)[^)]+$/,O=s("".replace),T=s("".slice);d(p,"description",{configurable:!0,get:function(){var e=g(this);if(a(v,e))return"";var t=E(e),r=_?T(t,7,-1):O(t,y,"$1");return""===r?void 0:r}}),n({global:!0,constructor:!0,forced:!0},{Symbol:m})}},9472:function(e,t,r){"use strict";var n,i=r(4576),o=r(8745),s=r(4901),a=r(4215),u=r(2839),c=r(7680),l=r(2812),d=i.Function,f=/MSIE .\./.test(u)||"BUN"===a&&((n=i.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 f?function(n,i){var a=l(arguments.length,1)>r,u=s(n)?n:d(n),f=a?c(arguments,r):[],h=a?function(){o(u,this,f)}:u;return t?e(h,i):e(h)}:e}},9504:function(e,t,r){"use strict";var n=r(616),i=Function.prototype,o=i.call,s=n&&i.bind.bind(o,o);e.exports=n?s:function(e){return function(){return o.apply(e,arguments)}}},9519:function(e,t,r){"use strict";var n,i,o=r(4576),s=r(2839),a=o.process,u=o.Deno,c=a&&a.versions||u&&u.version,l=c&&c.v8;l&&(i=(n=l.split("."))[0]>0&&n[0]<4?1:+(n[0]+n[1])),!i&&s&&(!(n=s.match(/Edge\/(\d+)/))||n[1]>=74)&&(n=s.match(/Chrome\/(\d+)/))&&(i=+n[1]),e.exports=i},9532:function(e,t,r){"use strict";r.d(t,{c:function(){return i}}),r(9089);var n=r(4269),i=function(){function e(e){var t=e.type,r=e.id;this.id=r,this.type=t}return e.prototype.set=function(e){this.body={id:this.id,chatType:e.chatType||"singleChat",type:"channel",to:e.to,from:e.from||"",time:Date.now()}},e.prototype.setChatType=function(e){return!!this.body&&(this.body.chatType=e,!0)},e.prototype.setGroup=function(e){return!!this.body&&(this.body.group=e,!0)},e.create=function(e){return{id:n.Wp.getUniqueId(),mid:e.mid,type:"channel",chatType:e.chatType||"singleChat",to:e.to,from:e.from||"",time:Date.now(),isChatThread:e.isChatThread,priority:e.priority,deliverOnlineOnly:e.deliverOnlineOnly}},e}()},9539:function(e,t,r){"use strict";var n=r(9565),i=r(8551),o=r(5966);e.exports=function(e,t,r){var s,a;i(e);try{if(!(s=o(e,"return"))){if("throw"===t)throw r;return r}s=n(s,e)}catch(e){a=!0,s=e}if("throw"===t)throw r;if(a)throw s;return i(s),r}},9544:function(e,t,r){"use strict";var n=r(2839);e.exports=/(?:ipad|iphone|ipod).*applewebkit/i.test(n)},9565:function(e,t,r){"use strict";var n=r(616),i=Function.prototype.call;e.exports=n?i.bind(i):function(){return i.apply(i,arguments)}},9590:function(e,t,r){"use strict";var n=r(1291),i=RangeError;e.exports=function(e){var t=n(e);if(t<0)throw new i("The argument can't be less than 0");return t}},9617:function(e,t,r){"use strict";var n=r(5397),i=r(5610),o=r(6198),s=function(e){return function(t,r,s){var a=n(t),u=o(a);if(0===u)return!e&&-1;var c,l=i(s,u);if(e&&r!=r){for(;u>l;)if((c=a[l++])!=c)return!0}else for(;u>l;l++)if((e||l in a)&&a[l]===r)return e||l||0;return!e&&-1}};e.exports={includes:s(!0),indexOf:s(!1)}},9638:function(e){"use strict";var t=4096,r=65547,n=15,i=2113929216,o=65536,s=65536,a=10485760,u={MANUAL:0,AUTO_IMMEDIATE:1,AUTO_THRESHOLD:2},c={SUCCESS:0,FAILED:-1,NOT_INITIALIZED:-2,INITIALIZED_FAILED:-3,COMPRESS_FAILED:-4,DECOMPRESS_FAILED:-5,PARAM_ERROR:-6,BUFFER_RESIZE_FAILED:-7};function l(e){if(!(e>0))return s;if(e<=s)return s;if(e>1073741823)return e;for(var t=s;t<e;)t*=2;return t}var d={byU16:0,byU32:1};function f(e,t){return(e[t]|e[t+1]<<8|e[t+2]<<16|e[t+3]<<24)>>>0}var h="fast";function p(e){return 2654435761*(e>>>0)>>>20&4095}function v(e){return 2654435761*(e>>>0)>>>19&8191}function m(e,t,r){if("fast"===h){var n=f(e,t);return r===d.byU16?v(n):p(n)}throw new Error("Unsupported hash strategy: "+h)}function _(e,t,r,n,i){r[t]=e-i}function g(e,t,r,n,i){_(t,m(e,t,n),r,0,i)}function E(e,t,r,n){return t[e]+n}function y(e,t,r,n,i){return E(m(e,t,n),r,0,i)}function O(e,t,r,n){for(var i=t;t<n-3;){if(f(e,t)!==f(e,r)){for(;t<n&&e[t]===e[r];)t++,r++;return t-i}t+=4,r+=4}for(;t<n&&e[t]===e[r];)t++,r++;return t-i}function T(e,t,o,s,a,u,c,l,f,h){var p,v,T,C,b,N,A=e.hashTable,M=s,w=M-e.dictSize,L=e.dictionary,U=e.dictionaryStart,x=U+e.dictSize,D=e.dictSize>0?x-s:0,P=s,k=s+a,F=k-12,H=k-5,B=0,G=u>0?u:o.length,W=0;if(a>i)return 0;switch(f){case 0:default:p=s,v=s;break;case 1:p=s-e.currentOffset,v=s-e.dictSize;break;case 2:p=s-e.currentOffset,v=s}if(l===d.byU16&&a>=r)return 0;if(a<13)return S(t,o,P,k,B,G,c);g(t,M,A,l,p),T=m(t,++M,l);e:for(;;){var j,q,K=M,z=1,V=64;do{var J=T;if(M=K,K+=z,z=V++>>>6,K>F)return S(t,o,P,k,B,G,c);j=E(J,A,0,p),2===f&&(j<s?(W=D,v=U):(W=0,v=s)),T=m(t,K,l),_(M,J,A,0,p)}while(1===h&&j<w||l!==d.byU16&&j+65535<M||!R(t,L,M,j,W,f,s));for(;M>P&&j+W>v;){var Y=j+W-1;if(t[M-1]!==(2===f&&j<s?L[Y-U+e.dictionaryStart]:t[Y]))break;M--,j--}var X=M-P;if(q=B++,c&&B+X+8+Math.floor(X/255)>G)return 0;if(X>=n){var Q=X-n;for(o[q]=240;Q>=255;)o[B++]=255,Q-=255;o[B++]=Q}else o[q]=X<<4;if(X>=16&&o.set&&t.subarray)o.set(t.subarray(P,P+X),B),B+=X;else for(var $=0;$<X;$++)o[B++]=t[P+$];t:for(;;){var Z;if(N=M-j,(C=o)[b=B]=255&N,C[b+1]=N>>>8&255,B+=2,2===f&&j<s){var ee=M+(x-(j+W));if(ee>H&&(ee=H),(M+=4+(Z=I(t,L,M+4,j+W+4-U+e.dictionaryStart,ee,x-U)))===ee&&ee<H){var te=O(t,M,s,H);Z+=te,M+=te}}else M+=4+(Z=O(t,M+4,j+4,H));if(c&&B+6+(Z>>>8)>G)return 0;if(Z>=15){for(o[q]+=15,Z-=15;Z>=510;)o[B++]=255,o[B++]=255,Z-=510;Z>=255&&(Z-=255,o[B++]=255),o[B++]=Z}else o[q]+=Z;if(P=M,M>F)break e;if(g(t,M-2,A,l,p),j=y(t,M,A,l,p),2===f&&(j<s?(W=D,v=U):(W=0,v=s)),g(t,M,A,l,p),!((1!==h||j>=w)&&j+65535>=M&&R(t,L,M,j,W,f,s)))break t;o[q=B++]=0}T=m(t,++M,l)}return S(t,o,P,k,B,G,c)}function R(e,t,r,n,i,o,s){return f(e,r)===f(2===o&&n+i<s?t:e,n+i)}function I(e,t,r,n,i,o,s){for(var a=r;n<o&&r<i&&t[n]===e[r];)n++,r++;return r-a}function S(e,t,r,i,o,s,a){var u=i-r;if(a&&o+u+1+Math.floor((u+255-n)/255)>s)return 0;if(u>=n){for(t[o++]=240,u-=n;u>=255;)t[o++]=255,u-=255;t[o++]=u}else t[o++]=u<<4;var c=r,l=i,d=l-c;if(d>=16&&t.set&&e.subarray)t.set(e.subarray(c,l),o),o+=d;else for(var f=c;f<l;f++)t[o++]=e[f];return o}function C(e,t,r,n){var i,o=0;if(n&&t.ip>=r)return-1;do{if(o+=i=e[t.ip++],t.ip>r)return-1;if(o>2147483647)return-1}while(255===i);return o}function b(e,t,r,i,o,s,a,u,c,l,d,f,h){if(null==e)return-1;if(s<0)return-1;var p,v,m=r,_=r+i,g=o,E=o+s,y=o+c,O=d-h,T=f+h,R=h<65536;if(u&&y>E-12&&(y=E-12),0===s)return u||1===i&&0===e[m]?0:-1;if(0===i)return-1;for(;;){var I,S,b,N;if(m>=_)return-(m-r)-1;if((S=(I=e[m++])>>>4)===n){var A=C(e,L={ip:m},_-n,!0);if(m=L.ip,-1===A)return-(m-r)-1;if(g+(S+=A)<g)return-(m-r)-1;if(m+S<m)return-(m-r)-1}if(b=g+S,a&&(b>(u?y:E-12)||m+S>_-8)||!a&&b>E-8){if(u)m+S>_&&(b=g+(S=_-m)),b>E&&(b=E,S=E-g);else{if(!a&&b!==E)return-(m-r)-1;if(a&&(m+S!==_||b>E))return-(m-r)-1}if(S>=16&&t.set&&e.subarray)t.set(e.subarray(m,m+S),g);else for(var M=0;M<S;M++)t[g+M]=e[m+M];if(m+=S,g+=S,!u||b===E||m>=_-2)break;if(!u)break}if(S>=16&&t.set&&e.subarray)t.set(e.subarray(m,m+S),g);else for(M=0;M<S;M++)t[g+M]=e[m+M];if(g=b,(m+=S)+2>_)return-(m-r)-1;var w=(p=e)[v=m]|p[v+1]<<8;if(m+=2,N=b-w,R&&N+h<d)return-(m-r)-1;if(0===w)return-(m-r)-1;if(15==(S=15&I)){var L;if(A=C(e,L={ip:m},_-5+1,!1),m=L.ip,-1===A)return-(m-r)-1;if(g+(S+=A)<g)return-(m-r)-1}if(S+=4,2===l&&N<d){if(g+S>E-5){if(!u)return-(m-r)-1;S=Math.min(S,E-g)}if(S<=d-N){var U=T-(d-N);for(M=0;M<S;M++)t[g+M]=t[U+M];g+=S}else{var x=d-N;for(U=T-x,M=0;M<x;M++)t[g+M]=t[U+M];var D=S-x;if(D>(g+=x)-d)for(var P=d,k=g+D;g<k;)t[g++]=t[P++];else{for(M=0;M<D;M++)t[g+M]=t[d+M];g+=D}}}else{if(N<O)return-(m-r)-1;if(b=g+S,u&&b>E-12){var F=Math.min(S,E-g),H=g+F;if(N+F>g)for(;g<H;)t[g++]=t[N++];else{for(M=0;M<F;M++)t[g+M]=t[N+M];g=H}if(g===E)break}else if(g-N<8)for(t[g]=t[N],t[g+1]=t[N+1],t[g+2]=t[N+2],t[g+3]=t[N+3],g+=4,N+=4;g<b;)t[g++]=t[N++];else for(;g<b;)t[g++]=t[N++]}}return a?g-o:m-r}function N(){return{hashTable:new Uint32Array(t),currentOffset:0,initCheck:0,dictionary:null,dictionaryStart:0,dictSize:0,bufferStart:null}}function A(e){e.hashTable.fill(0),e.currentOffset=0,e.initCheck=0,e.dictionary=null,e.dictionaryStart=0,e.dictSize=0,e.bufferStart=null}function M(e,t,r,n,i,o,s,a){n=n||0,o=o||0;var u=e.dictionaryStart+e.dictSize,c=n;if(e.initCheck)return 0;e.dictSize>0&&c>u&&(c=u),function(e){if(e.currentOffset>2147483648){for(var t=e.currentOffset-65536,r=e.dictionaryStart+e.dictSize,n=0;n<e.hashTable.length;n++)e.hashTable[n]<t?e.hashTable[n]=0:e.hashTable[n]-=t;e.currentOffset=65536,e.dictSize>65536&&(e.dictSize=65536),e.dictionaryStart=r-e.dictSize}}(e);var l,f=n+i;e.dictionary&&f>e.dictionaryStart&&f<u&&(e.dictSize=u-f,e.dictSize>65536&&(e.dictSize=65536),e.dictSize<4&&(e.dictSize=0),e.dictionaryStart=u-e.dictSize);var h=e.dictSize<65536&&e.dictSize<e.currentOffset?1:0;return e.dictionary&&u===n?(l=T(e,t,r,n,i,s||0,a||!1,d.byU32,1,h),e.dictSize+=i,e.currentOffset+=i,l):(l=T(e,t,r,n,i,s||0,a||!1,d.byU32,2,h),e.dictionary=t,e.dictionaryStart=n,e.dictSize=i,e.currentOffset+=i,l)}function w(e,t,r,n){var i=e.dictionaryStart+e.dictSize;n>65536&&(n=65536),n>e.dictSize&&(n=e.dictSize);var o=i-n;if(t.set&&e.dictionary.subarray)t.set(e.dictionary.subarray(o,o+n),r);else for(var s=0;s<n;s++)t[r+s]=e.dictionary[o+s];return e.dictionary=t,e.dictionaryStart=r,e.dictSize=n,n}function L(e,t,r,n){return e.prefixSize=n,e.prefixEnd=r+n,e.externalDict=null,e.extDictStart=0,e.extDictSize=0,1}function U(e,t,r,n,i,o,s){var a;if(e.prefixEnd===o){if((a=b(t,r,n,i,o,s,!0,!1,0,2,e.prefixEnd-e.prefixSize,e.extDictStart,e.extDictSize))<=0)return a;e.prefixSize+=a,e.prefixEnd+=a}else{if(e.extDictSize=e.prefixSize,e.extDictStart=e.prefixEnd-e.extDictSize,(a=b(t,r,n,i,o,s,!0,!1,0,2,o,e.extDictStart,e.extDictSize))<=0)return a;e.prefixSize=a,e.prefixEnd=o+a}return a}function x(e){var t=(e=e||{}).minWorkArea||s,r=e.maxWorkArea||a,n=e.shrinkThreshold||t;t<s&&(t=s),r<t&&(r=t),n<t&&(n=t),n>r&&(n=r),this.minBufferSize=o+t,this.maxBufferSize=o+r,this.shrinkThreshold=o+n,this.ringBufferSize=this.minBufferSize,this.shrinkMode=void 0!==e.shrinkMode?e.shrinkMode:u.MANUAL,this.ringBuffer=new Uint8Array(this.ringBufferSize),this.offset=0,this.stream=N()}function D(e){var t=(e=e||{}).minWorkArea||s,r=e.maxWorkArea||a,n=e.shrinkThreshold||t;t<s&&(t=s),r<t&&(r=t),n<t&&(n=t),n>r&&(n=r),this.minBufferSize=o+t,this.maxBufferSize=o+r,this.shrinkThreshold=o+n,this.ringBufferSize=this.minBufferSize,this.shrinkMode=void 0!==e.shrinkMode?e.shrinkMode:u.MANUAL,this.ringBuffer=new Uint8Array(this.ringBufferSize),this.offset=0,this.streamDecode={externalDict:null,extDictStart:0,extDictSize:0,prefixEnd:0,prefixSize:0}}x.prototype._resizeBuffer=function(e){var t=new Uint8Array(e),r=0;if(this.offset>0){var n=this.offset<o?this.offset:o,i=this.offset>o?this.offset-o:0;t.set(this.ringBuffer.subarray(i,i+n),0),w(this.stream,t,0,n),r=n}return this.ringBuffer=t,this.ringBufferSize=e,this.offset=r,!0},x.prototype.compress=function(e,t){var r=e.length;if(r<=0)return c.PARAM_ERROR;if(r>this.maxBufferSize-o)return c.PARAM_ERROR;if(r>this.ringBufferSize-o){var n=l(r),i=o+n;if(i>this.maxBufferSize&&(i=this.maxBufferSize),!this._resizeBuffer(i))return c.BUFFER_RESIZE_FAILED}this.offset+r>this.ringBufferSize&&(w(this.stream,this.ringBuffer,0,o),this.offset=o);var s=this.offset;this.ringBuffer.set(e,s);var a=M(this.stream,this.ringBuffer,t,s,r,0,t.length,!0);return a<=0?c.COMPRESS_FAILED:(this.offset+=r,this._tryAutoShrink(),a)},x.prototype.reset=function(){this.offset=0,A(this.stream)},x.prototype.shrink=function(){this.ringBufferSize>this.minBufferSize&&this._resizeBuffer(this.minBufferSize)},x.prototype._tryAutoShrink=function(){this.shrinkMode!==u.MANUAL&&(this.ringBufferSize<=this.minBufferSize||(this.shrinkMode===u.AUTO_IMMEDIATE||this.shrinkMode===u.AUTO_THRESHOLD&&this.ringBufferSize>this.shrinkThreshold)&&this.shrink())},x.prototype.getWorkArea=function(){return this.ringBufferSize-o},x.prototype.getRingBufferSize=function(){return this.ringBufferSize},x.prototype.getBaseBufferSize=function(){return this.minBufferSize},x.prototype.getMaxBufferSize=function(){return this.maxBufferSize},x.prototype.getCurrentOffset=function(){return this.offset},x.prototype.getShrinkMode=function(){return this.shrinkMode},x.prototype.setShrinkMode=function(e){this.shrinkMode=e},x.prototype.getShrinkThreshold=function(){return this.shrinkThreshold},x.prototype.setShrinkThreshold=function(e){var t=this.minBufferSize-o,r=this.maxBufferSize-o;if(e<t||e>r)return c.PARAM_ERROR;this.shrinkThreshold=o+e},D.prototype._resizeBuffer=function(e){var t=new Uint8Array(e),r=0;if(this.offset>0){var n=this.offset<o?this.offset:o,i=this.offset>o?this.offset-o:0;t.set(this.ringBuffer.subarray(i,i+n),0),r=n,L(this.streamDecode,0,0,n)}return this.ringBuffer=t,this.ringBufferSize=e,this.offset=r,!0},D.prototype.decompress=function(e,t,r){var n=e.length;if(n<=0||r<=0)return c.PARAM_ERROR;if(r>this.maxBufferSize-o)return c.PARAM_ERROR;if(r>this.ringBufferSize-o){var i=l(r),s=o+i;if(s>this.maxBufferSize&&(s=this.maxBufferSize),!this._resizeBuffer(s))return c.BUFFER_RESIZE_FAILED}if(this.offset+r>this.ringBufferSize){var a=this.offset-o;a>0&&this.ringBuffer.set(this.ringBuffer.subarray(a,a+o),0),L(this.streamDecode,this.ringBuffer,0,o),this.offset=o}var u=U(this.streamDecode,e,this.ringBuffer,0,n,this.offset,r);return u<=0?c.DECOMPRESS_FAILED:(t.set(this.ringBuffer.subarray(this.offset,this.offset+u),0),this.offset+=u,this._tryAutoShrink(),u)},D.prototype.reset=function(){this.offset=0,this.streamDecode={externalDict:null,extDictStart:0,extDictSize:0,prefixEnd:0,prefixSize:0}},D.prototype.shrink=function(){this.ringBufferSize>this.minBufferSize&&this._resizeBuffer(this.minBufferSize)},D.prototype._tryAutoShrink=function(){this.shrinkMode!==u.MANUAL&&(this.ringBufferSize<=this.minBufferSize||(this.shrinkMode===u.AUTO_IMMEDIATE||this.shrinkMode===u.AUTO_THRESHOLD&&this.ringBufferSize>this.shrinkThreshold)&&this.shrink())},D.prototype.getWorkArea=function(){return this.ringBufferSize-o},D.prototype.getRingBufferSize=function(){return this.ringBufferSize},D.prototype.getBaseBufferSize=function(){return this.minBufferSize},D.prototype.getMaxBufferSize=function(){return this.maxBufferSize},D.prototype.getCurrentOffset=function(){return this.offset},D.prototype.getShrinkMode=function(){return this.shrinkMode},D.prototype.setShrinkMode=function(e){this.shrinkMode=e},D.prototype.getShrinkThreshold=function(){return this.shrinkThreshold},D.prototype.setShrinkThreshold=function(e){var t=this.minBufferSize-o,r=this.maxBufferSize-o;if(e<t||e>r)return c.PARAM_ERROR;this.shrinkThreshold=o+e},e.exports={LZ4_MAX_INPUT_SIZE:i,BLOCK_MAX_SIZE:65536,DICT_SIZE:o,DEFAULT_WORK_AREA:s,DEFAULT_MAX_WORK:a,SHRINK_MODE:u,LZ4_ERROR:c,alignToPowerOf2:l,calcDefaultBufferSize:function(){return 131072},calcDefaultMaxBufferSize:function(){return 10551296},setHashStrategy:function(e){if("fast"!==e&&"compatible"!==e)throw new Error("Invalid hash strategy: "+e+'. Use "fast" or "compatible".');h=e},getHashStrategy:function(){return h},compress:function(e,n,o,s,a){if(null==e)return 0;if(null==n)return 0;if(o=o||0,s=void 0===s?e.length:s,a=a||0,o<0||a<0)return 0;if(s<0)return 0;if(o+s>e.length)return 0;if(s>i)return 0;if(0===s)return n.length>a?(n[a]=0,1):0;var u=s<r?d.byU16:d.byU32;return T({hashTable:new Uint32Array(u===d.byU16?8192:t),currentOffset:0,dictSize:0,dictionary:null,dictionaryStart:0},e,n,o,s,0,!1,u,0,0)},compressLimited:function(e,n,o,s,a,u){if(null==e)return 0;if(null==n)return 0;if(o=o||0,s=void 0===s?e.length:s,a=a||0,o<0||a<0)return 0;if(s<0||u<0)return 0;if(o+s>e.length)return 0;if(s>i)return 0;if(u<1)return 0;if(0===s)return n[a]=0,1;var c=s<r?d.byU16:d.byU32;return T({hashTable:new Uint32Array(c===d.byU16?8192:t),currentOffset:0,dictSize:0,dictionary:null,dictionaryStart:0},e,n,o,s,u,!0,c,0,0)},compressBound:function(e){return e<0||e>i?0:e+Math.floor(e/255)+16},decompressSafe:function(e,t,r,n,i,o){return null==e||null==t?-1:(i=i||0,(r=r||0)<0||i<0||n<0||o<0||r+n>e.length||i+o>t.length?-1:b(e,t,r,n,i,o,!0,!1,0,0,i,null,0))},decompressFast:function(e,t,r,n,i){return b(e,t,r=r||0,0,n=n||0,i,!1,!1,0,1,n-65536,0,65536)},createStream:N,resetStream:A,loadDict:function(e,t,r,n){if(e.initCheck&&A(e),n<4)return e.dictionary=null,e.dictSize=0,0;n>65536&&(r=r+n-65536,n=65536);var i=r-e.currentOffset;e.dictionary=t,e.dictionaryStart=r,e.dictSize=n,e.currentOffset+=n;for(var o=r,s=r+n;o<=s-4;)g(t,o,e.hashTable,d.byU32,i),o+=3;return n},compressContinue:M,saveDict:w,createStreamDecode:function(){return{externalDict:null,extDictStart:0,extDictSize:0,prefixEnd:0,prefixSize:0}},setStreamDecode:L,decompressSafeContinue:U,RingBufferEncoder:x,RingBufferDecoder:D,_hashU16:v,_hashU32:p,_TABLE_TYPE:d}},9687:function(e,t,r){"use strict";e.exports=a;var n=r(8923);((a.prototype=Object.create(n.prototype)).constructor=a).className="Service";var i=r(8811),o=r(3262),s=r(5047);function a(e,t){n.call(this,e,t),this.methods={},this._methodsArray=null}function u(e){return e._methodsArray=null,e}a.fromJSON=function(e,t){var r=new a(e,t.options);if(t.methods)for(var n=Object.keys(t.methods),o=0;o<n.length;++o)r.add(i.fromJSON(n[o],t.methods[n[o]]));return t.nested&&r.addJSON(t.nested),r.comment=t.comment,r},a.prototype.toJSON=function(e){var t=n.prototype.toJSON.call(this,e),r=!!e&&Boolean(e.keepComments);return o.toObject(["options",t&&t.options||void 0,"methods",n.arrayToJSON(this.methodsArray,e)||{},"nested",t&&t.nested||void 0,"comment",r?this.comment:void 0])},Object.defineProperty(a.prototype,"methodsArray",{get:function(){return this._methodsArray||(this._methodsArray=o.toArray(this.methods))}}),a.prototype.get=function(e){return this.methods[e]||n.prototype.get.call(this,e)},a.prototype.resolveAll=function(){for(var e=this.methodsArray,t=0;t<e.length;++t)e[t].resolve();return n.prototype.resolve.call(this)},a.prototype.add=function(e){if(this.get(e.name))throw Error("duplicate name '"+e.name+"' in "+this);return e instanceof i?(this.methods[e.name]=e,e.parent=this,u(this)):n.prototype.add.call(this,e)},a.prototype.remove=function(e){if(e instanceof i){if(this.methods[e.name]!==e)throw Error(e+" is not a member of "+this);return delete this.methods[e.name],e.parent=null,u(this)}return n.prototype.remove.call(this,e)},a.prototype.create=function(e,t,r){for(var n,i=new s.Service(e,t,r),a=0;a<this.methodsArray.length;++a){var u=o.lcFirst((n=this._methodsArray[a]).resolve().name).replace(/[^$\w_]/g,"");i[u]=o.codegen(["r","c"],o.isReserved(u)?u+"_":u)("return this.rpcCall(m,q,s,r,c)")({m:n,q:n.resolvedRequestType.ctor,s:n.resolvedResponseType.ctor})}return i}},9773:function(e,t,r){"use strict";var n=r(6518),i=r(4495),o=r(9039),s=r(3717),a=r(8981);n({target:"Object",stat:!0,forced:!i||o((function(){s.f(1)}))},{getOwnPropertySymbols:function(e){var t=s.f;return t?t(a(e)):[]}})},9868:function(e,t,r){"use strict";var n=r(6518),i=r(9504),o=r(1291),s=r(1240),a=r(2333),u=r(9039),c=RangeError,l=String,d=Math.floor,f=i(a),h=i("".slice),p=i(1..toFixed),v=function(e,t,r){return 0===t?r:t%2==1?v(e,t-1,r*e):v(e*e,t/2,r)},m=function(e,t,r){for(var n=-1,i=r;++n<6;)i+=t*e[n],e[n]=i%1e7,i=d(i/1e7)},_=function(e,t){for(var r=6,n=0;--r>=0;)n+=e[r],e[r]=d(n/t),n=n%t*1e7},g=function(e){for(var t=6,r="";--t>=0;)if(""!==r||0===t||0!==e[t]){var n=l(e[t]);r=""===r?n:r+f("0",7-n.length)+n}return r};n({target:"Number",proto:!0,forced:u((function(){return"0.000"!==p(8e-5,3)||"1"!==p(.9,0)||"1.25"!==p(1.255,2)||"1000000000000000128"!==p(0xde0b6b3a7640080,0)}))||!u((function(){p({})}))},{toFixed:function(e){var t,r,n,i,a=s(this),u=o(e),d=[0,0,0,0,0,0],p="",E="0";if(u<0||u>20)throw new c("Incorrect fraction digits");if(a!=a)return"NaN";if(a<=-1e21||a>=1e21)return l(a);if(a<0&&(p="-",a=-a),a>1e-21)if(r=(t=function(e){for(var t=0,r=e;r>=4096;)t+=12,r/=4096;for(;r>=2;)t+=1,r/=2;return t}(a*v(2,69,1))-69)<0?a*v(2,-t,1):a/v(2,t,1),r*=4503599627370496,(t=52-t)>0){for(m(d,0,r),n=u;n>=7;)m(d,1e7,0),n-=7;for(m(d,v(10,n,1),0),n=t-1;n>=23;)_(d,1<<23),n-=23;_(d,1<<n),m(d,1,1),_(d,2),E=g(d)}else m(d,0,r),m(d,1<<-t,0),E=g(d)+f("0",u);return u>0?p+((i=E.length)<=u?"0."+f("0",u-i)+E:h(E,0,i-u)+"."+h(E,i-u)):p+E}})},9948:function(e,t,r){"use strict";var n=r(5370),i=r(4644).getTypedArrayConstructor;e.exports=function(e,t){return n(i(e),t)}},9955:function(e,t,r){"use strict";var n=r(4644),i=r(9213).findIndex,o=n.aTypedArray;(0,n.exportTypedArrayMethod)("findIndex",(function(e){return i(o(this),e,arguments.length>1?arguments[1]:void 0)}))}},__webpack_module_cache__={},deferred;function __webpack_require__(e){var t=__webpack_module_cache__[e];if(void 0!==t)return t.exports;var r=__webpack_module_cache__[e]={exports:{}};return __webpack_modules__[e].call(r.exports,r,r.exports,__webpack_require__),r.exports}__webpack_require__.m=__webpack_modules__,__webpack_require__.amdO={},deferred=[],__webpack_require__.O=function(e,t,r,n){if(!t){var i=1/0;for(u=0;u<deferred.length;u++){t=deferred[u][0],r=deferred[u][1],n=deferred[u][2];for(var o=!0,s=0;s<t.length;s++)(!1&n||i>=n)&&Object.keys(__webpack_require__.O).every((function(e){return __webpack_require__.O[e](t[s])}))?t.splice(s--,1):(o=!1,n<i&&(i=n));if(o){deferred.splice(u--,1);var a=r();void 0!==a&&(e=a)}}return e}n=n||0;for(var u=deferred.length;u>0&&deferred[u-1][2]>n;u--)deferred[u]=deferred[u-1];deferred[u]=[t,r,n]},__webpack_require__.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return __webpack_require__.d(t,{a:t}),t},__webpack_require__.d=function(e,t){for(var r in t)__webpack_require__.o(t,r)&&!__webpack_require__.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},__webpack_require__.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),__webpack_require__.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},__webpack_require__.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},function(){var e={891:0};__webpack_require__.O.j=function(t){return 0===e[t]};var t=function(t,r){var n,i,o=r[0],s=r[1],a=r[2],u=0;if(o.some((function(t){return 0!==e[t]}))){for(n in s)__webpack_require__.o(s,n)&&(__webpack_require__.m[n]=s[n]);if(a)var c=a(__webpack_require__)}for(t&&t(r);u<o.length;u++)i=o[u],__webpack_require__.o(e,i)&&e[i]&&e[i][0](),e[i]=0;return __webpack_require__.O(c)},r=self.webpackChunkwebsdk=self.webpackChunkwebsdk||[];r.forEach(t.bind(null,0)),r.push=t.bind(null,r.push.bind(r))}();var __webpack_exports__={};return function(){"use strict";__webpack_require__.d(__webpack_exports__,{default:function(){return Z}}),__webpack_require__(2675),__webpack_require__(9463),__webpack_require__(2259),__webpack_require__(8706),__webpack_require__(2008),__webpack_require__(1629),__webpack_require__(4423),__webpack_require__(3792),__webpack_require__(2712),__webpack_require__(4743),__webpack_require__(1745),__webpack_require__(8309),__webpack_require__(9089),__webpack_require__(739),__webpack_require__(3288),__webpack_require__(4170),__webpack_require__(2010),__webpack_require__(6033),__webpack_require__(2892),__webpack_require__(9085),__webpack_require__(9432),__webpack_require__(6099),__webpack_require__(3362),__webpack_require__(1699),__webpack_require__(7764),__webpack_require__(1392),__webpack_require__(1489),__webpack_require__(1630),__webpack_require__(2170),__webpack_require__(5044),__webpack_require__(1920),__webpack_require__(1694),__webpack_require__(9955),__webpack_require__(3206),__webpack_require__(4496),__webpack_require__(6651),__webpack_require__(2887),__webpack_require__(9369),__webpack_require__(6812),__webpack_require__(8995),__webpack_require__(1575),__webpack_require__(6072),__webpack_require__(8747),__webpack_require__(8845),__webpack_require__(9423),__webpack_require__(7301),__webpack_require__(373),__webpack_require__(6614),__webpack_require__(1405),__webpack_require__(3684),__webpack_require__(3500),__webpack_require__(2953),__webpack_require__(6031);var e=__webpack_require__(2549),t=__webpack_require__.n(e),r=__webpack_require__(8570),n=__webpack_require__.n(r),i=__webpack_require__(7535),o=__webpack_require__(4269),s=__webpack_require__(7968),a=__webpack_require__(6646),u=["onTextMessage","onFileMessage","onAudioMessage","onVideoMessage","onImageMessage","onLocationMessage","onCustomMessage","onCMDMessage","onStreamMessage"],c=function(){function e(e,t,r){this.handlerData={},this.handlerData={},e.addEventHandler=this.addEventHandler.bind(this),e.removeEventHandler=this.removeEventHandler.bind(this)}return e.prototype.addEventHandler=function(e,t){this.handlerData[e]=t},e.prototype.removeEventHandler=function(e){delete this.handlerData[e]},e.prototype.dispatch=function(e,t){for(var r in u.includes(e)&&t?s.vF.debug("dispatch event: "+e,{id:t.id,type:t.type,time:t.time,from:t.from,to:t.to,chatType:t.chatType}):"onMessage"===e?s.vF.debug("dispatch event: "+e,null==t?void 0:t.length):s.vF.debug("dispatch event: "+e,t||""),this.handlerData){var n=this.handlerData[r][e];n&&n(t)}},e}(),l=(__webpack_require__(5276),{biz:"",debug:!1,token:""}),d="https://data-reporting.rtnsvc.com/report",f="https://data-reporting.realtimemesh.com/report",h=__webpack_require__(9061),p=__webpack_require__(3603),v=function(e){var t=Number(p.S5[e]);return t===p.S5.USER_LOGIN?"MANUALLOGIN":t===p.S5.MSYNC_SENDMESSAGE?"SENDMESSAGE":t>p.S5.UNKNOWOPERATION&&t<p.S5.REST_OPERATE?"REST":t>p.S5.REST_OPERATE&&t<p.S5.MSYNC_OPERATE?"MESSAGE":t>p.S5.MSYNC_OPERATE&&t<p.S5.ROSTER_OPERATE?"ROSTER":t>p.S5.ROSTER_OPERATE&&t<p.S5.USER_OPERATE?"USER":t>p.S5.USER_OPERATE&&t<p.S5.GROUP_OPERATE?"GROUP":t>p.S5.GROUP_OPERATE&&t<p.S5.CHATROOM_OPERATE?"CHATROOM":"OPERATION"},m=function(){return(new Date).getTime()},_=function(e){return[o.i9.BAIDU,o.i9.WX,o.i9.DD,o.i9.ZFB,o.i9.TT,o.i9.QUICK_APP,o.i9.UNI].includes(e.platform)},g=function(){return e=1,t=99999,e=Math.ceil(e),t=Math.floor(t),Math.floor(Math.random()*(t-e))+e;var e,t},E=__webpack_require__(4331),y={},O=(__webpack_require__(2062),__webpack_require__(4554),function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]])}return r}),T=1e3,R=function(){function e(e){this.eventQueue=[],this.stock=T,this.config=e,this.governor()}return e.prototype.add=function(e){this.stock<=0?console.warn("Event Report limit ".concat(T," per minute")):(this.eventQueue.push(e),this.consume(),this.stock-=1)},e.prototype.consume=function(){var e=this;0!==this.eventQueue.length&&(this.timer&&this.eventQueue.length<=10&&clearTimeout(this.timer),this.timer=setTimeout((function(){var t,r=e.eventQueue.splice(0,10),n=r.filter((function(e){return e.appId===r[0].appId})),i=r.filter((function(e){return e.appId!==r[0].appId}));(t=e.eventQueue).unshift.apply(t,i),e.batchSend(n)}),1e3))},e.prototype.governor=function(){var e=this,t=setInterval((function(){e.stock=T}),6e4);"undefined"!=typeof addEventListener&&addEventListener("beforeunload",(function(){clearInterval(t)}))},e.prototype.batchSend=function(e){var t,r;if(void 0===e&&(e=[]),0!==e.length)try{var n=e.map((function(e){e.biz,e.appId;var t=e.eventId,r=O(e,["biz","appId","eventId"]);return{eventId:Number(t),body:r}}));!function(e,t){try{var r=t.biz,n=t.appId,i=t.data,s=t.debug,a=t.onSuccess;if(!r)throw new Error("biz is not defined");y.global||(y=o.Wp.getEnvInfo());var u=y;if(_(u)){var c={url:s?f:d,data:i,method:"POST",timeout:E.Gc,success:function(){null==a||a()},fail:function(){},complete:function(){}},l={token:e,appid:null!=n?n:"",sendts:"".concat(Math.floor((new Date).getTime()/1e3)),biz:r,debug:"".concat(s)};if("zfb"===u.platform||"dd"===u.platform?c.headers=l:c.header=l,"dd"===u.platform)return u.global.httpRequest(c);u.global.request(c)}else{var h=new XMLHttpRequest;h.onreadystatechange=function(){2===h.readyState&&(null==a||a())},h.open("POST",s?f:d),h.setRequestHeader("Content-Type","application/json"),h.setRequestHeader("token",e),h.setRequestHeader("appid",null!=n?n:""),h.setRequestHeader("sendts","".concat(Math.floor((new Date).getTime()/1e3))),h.setRequestHeader("biz",r),h.setRequestHeader("debug","".concat(s)),h.send(JSON.stringify(i))}}catch(e){console.error(e)}}(this.config.token,{biz:null===(t=e[0])||void 0===t?void 0:t.biz,appId:null===(r=e[0])||void 0===r?void 0:r.appId,data:n,debug:this.config.debug,onSuccess:this.consume.bind(this)})}catch(e){console.error(e)}},e}(),I=function(){return I=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},I.apply(this,arguments)},S=new(function(){function e(e){this.inited=!1,this.appId="",this.biz="",this.eventQueue={},this.config=l,e&&this.init(e)}return e.prototype.init=function(e){var t;if(void 0===e&&(e={}),!e.biz||!e.token)throw new Error("Event Report: biz or token is not defined");try{this.appId=null!==(t=e.appId)&&void 0!==t?t:"",this.biz=e.biz,this.config=I(I({},l),e),this.eventQueue=new R(this.config),this.log(e),this.inited=!0}catch(e){console.error(e)}},e.prototype.updateAppId=function(e){this.appId=e},e.prototype.send=function(e,t,r){var n;if(void 0===t&&(t={}),this.inited){var i=I(I({},t),{eventId:Number(e),biz:this.biz,appId:null!==(n=null==r?void 0:r.appId)&&void 0!==n?n:this.appId});this.eventQueue.add(i),this.log(i)}else console.error("Event Report: init is not called")},e.prototype.log=function(e){try{if(this.config.debug){var t=e.payload,r=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]])}return r}(e,["payload"]);console.log("%c Event Report: ".concat(this.config.biz," "),"background: #8A97FC; color: #fff"),console.table(r),t&&(console.info("payload:"),console.table(t))}}catch(e){console.error(e)}},e}()),C=function(){return C=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},C.apply(this,arguments)},b={requestName:"",subrequestid:"1",requestMethod:"GET",requestUrl:"",requestElapse:0,code:0,codeDesc:"",isLastApi:0,isSuccess:1},N=function(){function e(e){this.platform=o.Wp.getEnvInfo(),this.isReportDt=e.isReport||!1,this.isCollectDt=!0,_(this.platform)&&!this.isReportDt&&(this.isCollectDt=!1),this.eventQueue=[],this.accessChannel=h.lM,this.options=function(e,t){t.platform||(t=o.Wp.getEnvInfo());var r=e.org,n=e.appkey,i=e.deviceId,s=e.sdkVersion,a=e.uikitVersion,u="undefined"!=typeof navigator?null===navigator||void 0===navigator?void 0:navigator.userAgent:"".concat(t.platform,"_mini_program");return{org:r,appkey:n,deviceId:i,sdkServiceId:"sid_".concat(o.Wp.getUniqueId(),"_").concat(g()),did:u,sdkVersion:s,os:h.Jz,sdkProduct:p.Wz.web,uikitVersion:a}}(e,this.platform),this.sid=this.options.sdkServiceId,this.init(e)}return e.getInstance=function(t){return e.instance||(e.instance=new e(t)),e.instance},e.prototype.getServiceId=function(){return this.sid||"sid_0"},e.prototype.setIsReportDt=function(e){this.isReportDt=e,e&&this.rptEventQueue()},e.prototype.setIsCollectDt=function(e){this.isCollectDt=e,e||(this.eventQueue=[])},e.prototype.rptEventQueue=function(){var e=this;this.eventQueue.length&&this.eventQueue.forEach((function(t,r){S.send(t.eventId,t.dt),r>=e.eventQueue.length-1&&(e.eventQueue=[])}))},e.prototype.init=function(t){e.instance||(e.instance=this,S.init({biz:h.KU,token:h.ey,appId:t.appkey,debug:!1}),this.reportInit())},e.prototype.updateAppKey=function(e){this.options.appkey=e,this.eventQueue.forEach((function(t){"default#appkey"===t.dt.appkey&&(t.dt.appkey=e)}))},e.prototype.reportInit=function(){if(this.isCollectDt){var e=this.options,t=e.did,r=e.os,n=e.sdkVersion,i=e.deviceId;this.reportData(h.uN.INIT,{did:t,os:r,sdkVersion:n,deviceId:i})}},e.prototype.geOperateFun=function(e){var t=this;if(!this.isCollectDt)return function(){};var r=1,n=0,i="",s=m(),a=e.uid,u=e.operationName;a&&(this.uid=a);var c={uid:this.uid,operationId:"opr_".concat(o.Wp.getUniqueId(),"_").concat(g()),requestid:"req_".concat(o.Wp.getUniqueId(),"_").concat(g()),operationName:u};return function(e){var a,l,d,f;if(e.data.isSuccess?(n=0,i=""):(0===e.data.code&&(e.data.code=h.XI),n=null!==(a=e.data.code)&&void 0!==a?a:n,i=null!==(l=e.data.codeDesc)&&void 0!==l?l:i),(null===(d=e.data)||void 0===d?void 0:d.accessChannel)&&(t.accessChannel=null===(f=e.data)||void 0===f?void 0:f.accessChannel),e.isRetry?(r++,e.data.subrequestid="".concat(r)):(c.requestid="req_".concat(o.Wp.getUniqueId(),"_").concat(g()),r=1),e.data.isLastApi){var p=m();e.data.requestElapse=p-s,e.data.requestMethod="",e.data.subrequestid="0",e.data.code=200===n?0:n,e.data.codeDesc=i}else e.data.requestName||(e.data.requestName=u);e.data.requestElapse||(e.data.requestElapse=m()-s),t.reportData.call(t,h.uN.API,C(C(C(C({},b),c),e.data),{accessChannel:t.accessChannel,operationType:v(u)})),e.isEndApi&&t.reportData.call(t,h.uN.API,C(C(C({},c),b),{isSuccess:e.data.isSuccess,isLastApi:1,subrequestid:"0",requestMethod:"",code:200===n?0:n,codeDesc:i,requestElapse:e.data.requestElapse,accessChannel:t.accessChannel,operationType:v(u)}))}},e.prototype.reportData=function(e,t){return r=this,n=void 0,s=function(){var r,n,i,s,a,u,c,l,d;return function(e,t){var r,n,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;s;)try{if(r=1,n&&(i=2&o[0]?n.return:o[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,o[1])).done)return i;switch(n=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,n=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],n=0}finally{r=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}}(this,(function(f){switch(f.label){case 0:return f.trys.push([0,3,,4]),r=m(),n=0,e!==h.uN.API?[3,2]:[4,(v=this.platform,new Promise((function(e){var t;v.platform||(v=o.Wp.getEnvInfo());var r="";if(v.platform===o.i9.WEB){var n=navigator.connection;(null==n?void 0:n.type)?(null==n||n.type,r=p.z1.WIFI):(null==n?void 0:n.effectiveType)&&(r=p.z1[n.effectiveType.toLocaleUpperCase()]),e(r)}else v.platform===o.i9.NODE?(r=p.z1.UNKNOWN,e(r)):null===(t=v.global)||void 0===t||t.getNetworkType({success:function(t){r=p.z1[t.networkType.toLocaleUpperCase()],e(r)}})})))];case 1:n=f.sent(),f.label=2;case 2:return i=this.options,s=i.appkey,a=i.sdkServiceId,u=i.sdkProduct,c=i.uikitVersion,l=C({lts:r,net:n,appkey:s,sdkServiceId:a,sdkProduct:u,uikitVersion:c},t),this.isReportDt?S.send(e,l):this.isCollectDt&&this.eventQueue.push({eventId:e,dt:l}),[3,4];case 3:return d=f.sent(),console.warn(d),[3,4];case 4:return[2]}var v}))},new((i=void 0)||(i=Promise))((function(e,t){function o(e){try{u(s.next(e))}catch(e){t(e)}}function a(e){try{u(s.throw(e))}catch(e){t(e)}}function u(t){var r;t.done?e(t.value):(r=t.value,r instanceof i?r:new i((function(e){e(r)}))).then(o,a)}u((s=s.apply(r,n||[])).next())}));var r,n,i,s},e}(),A=__webpack_require__(3484),M=__webpack_require__(8093),w=__webpack_require__(7468),L=__webpack_require__(8579),U=__webpack_require__(1274),x=__webpack_require__(589),D=__webpack_require__(3850),P=(__webpack_require__(2480),__webpack_require__(3296),__webpack_require__(7208),__webpack_require__(8408),__webpack_require__(686)),k=__webpack_require__(229),F=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function s(e){try{u(n.next(e))}catch(e){o(e)}}function a(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}u((n=n.apply(e,t||[])).next())}))},H=function(e,t){var r,n,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;s;)try{if(r=1,n&&(i=2&o[0]?n.return:o[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,o[1])).done)return i;switch(n=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,n=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],n=0}finally{r=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}};function B(e){return F(this,void 0,void 0,(function(){return H(this,(function(t){return[2,(0,k.K)(e)]}))}))}var G=new(function(){function e(){}return e.prototype.getImageInfo=function(e){return F(this,void 0,void 0,(function(){return H(this,(function(t){return"string"==typeof e?[2,this._getImageInfoFromUrl(e)]:[2,this._getImageInfoFromFile(e)]}))}))},e.prototype._getImageInfoFromFile=function(e){return new Promise((function(t,r){var n=URL.createObjectURL(e),i=new Image;i.onload=function(){URL.revokeObjectURL(n),t({width:i.width,height:i.height,type:e.type})},i.onerror=function(){URL.revokeObjectURL(n),r(new Error("Failed to load image"))},i.src=n}))},e.prototype._getImageInfoFromUrl=function(e){return new Promise((function(t,r){var n=new Image;n.onload=function(){return t({width:n.width,height:n.height})},n.onerror=function(){return r(new Error("Failed to load image from URL"))},n.src=e}))},e.prototype.generateBigImage=function(e,t){return F(this,void 0,void 0,(function(){var r,n,i,o,s,a,u,c,l;return H(this,(function(d){switch(d.label){case 0:if("string"==typeof e)throw new Error("Web image processor requires File input for compression");return[4,this.getImageInfo(e)];case 1:return r=d.sent(),(n=(0,P.s$)(r.width,r.height,t.maxShortEdge)).width===r.width&&n.height===r.height?[2,null]:"function"!=typeof createImageBitmap?[3,3]:[4,createImageBitmap(e)];case 2:return o=d.sent(),[3,5];case 3:return[4,this._loadImage(e)];case 4:o=d.sent(),d.label=5;case 5:if(i=o,s=void 0!==globalThis.OffscreenCanvas?new globalThis.OffscreenCanvas(n.width,n.height):this._createCanvas(n.width,n.height),!(a=s.getContext("2d")))throw new Error("Failed to get canvas context");return a.drawImage(i,0,0,n.width,n.height),u="image/png"===e.type?"image/png":"image/webp"===e.type?"image/webp":"image/jpeg",[4,this._canvasToBlob(s,u,t.quality)];case 6:return c=d.sent(),[2,{file:l=new File([c],e.name||"compressed.jpg",{type:u}),width:n.width,height:n.height,size:l.size,type:u}]}}))}))},e.prototype.computeMd5=function(e){return F(this,void 0,void 0,(function(){return H(this,(function(t){switch(t.label){case 0:if("string"==typeof e)throw new Error("Web image processor requires File input for MD5");return[4,e.arrayBuffer()];case 1:return[2,B(t.sent())]}}))}))},e.prototype._loadImage=function(e){return new Promise((function(t,r){var n=URL.createObjectURL(e),i=new Image;i.onload=function(){URL.revokeObjectURL(n),t(i)},i.onerror=function(){URL.revokeObjectURL(n),r(new Error("Failed to load image"))},i.src=n}))},e.prototype._createCanvas=function(e,t){var r=document.createElement("canvas");return r.width=e,r.height=t,r},e.prototype._canvasToBlob=function(e,t,r){return"convertToBlob"in e?e.convertToBlob({type:t,quality:r}):new Promise((function(n,i){e.toBlob((function(e){return e?n(e):i(new Error("toBlob failed"))}),t,r)}))},e}());function W(e){return W="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},W(e)}__webpack_require__(4782),__webpack_require__(7495),__webpack_require__(8781),__webpack_require__(1761);var j=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function s(e){try{u(n.next(e))}catch(e){o(e)}}function a(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}u((n=n.apply(e,t||[])).next())}))},q=function(e,t){var r,n,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;s;)try{if(r=1,n&&(i=2&o[0]?n.return:o[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,o[1])).done)return i;switch(n=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,n=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],n=0}finally{r=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}},K=function(){function e(e){this._pathCache=new Map,this.runtime=e}return e.prototype.getImageInfo=function(e){return"string"!=typeof e?Promise.reject(new Error("MiniApp image processor requires file path string")):this._loadImageInfo(e)},e.prototype.generateBigImage=function(e,t){return j(this,void 0,void 0,(function(){var r,n,i,o,a,u,c;return q(this,(function(l){switch(l.label){case 0:return"string"!=typeof e?[2,Promise.reject(new Error("MiniApp image processor requires file path string"))]:this.runtime.compressImage?[4,this._loadImageInfo(e)]:[2,Promise.reject(new Error("Platform missing compressImage capability"))];case 1:return r=l.sent(),(n=r.path||e)!==e&&s.vF.debug("Miniapp image path normalized before compress",e,n),(i=(0,P.s$)(r.width,r.height,t.maxShortEdge)).width===r.width&&i.height===r.height?[2,null]:(o=this.runtime.compressImage,[4,new Promise((function(e,r){o({src:n,quality:Math.round(100*t.quality),compressedWidth:i.width,compressedHeight:i.height,success:function(t){return e(t.tempFilePath)},fail:r})}))]);case 2:return a=l.sent(),s.vF.debug("Miniapp compressImage temp path",a),[4,this._normalizeLocalPath(a)];case 3:return u=l.sent(),[4,this._getFileSize(u)];case 4:return c=l.sent(),[2,{path:u,width:i.width,height:i.height,size:c,type:"image/jpeg"}]}}))}))},e.prototype.computeMd5=function(e){var t,r;return j(this,void 0,void 0,(function(){var n,i,o;return q(this,(function(s){switch(s.label){case 0:return"string"!=typeof e?[2,Promise.reject(new Error("MiniApp image processor requires file path string"))]:(n=null===(r=(t=this.runtime).getFileSystemManager)||void 0===r?void 0:r.call(t))?[4,this._normalizeLocalPath(e)]:[2,Promise.reject(new Error("Platform missing getFileSystemManager capability"))];case 1:return i=s.sent(),[4,new Promise((function(e,t){n.readFile({filePath:i,success:function(t){return e(t.data)},fail:t})}))];case 2:return o=s.sent(),[2,(0,k.K)(o)]}}))}))},e.prototype._getFileSize=function(e){var t,r;return j(this,void 0,void 0,(function(){var n,i,o,a,u,c,l,d,f,h;return q(this,(function(p){switch(p.label){case 0:return(n=null===(r=(t=this.runtime).getFileSystemManager)||void 0===r?void 0:r.call(t))?[4,this._normalizeLocalPath(e)]:(s.vF.warn("Miniapp getFileSize: no FileSystemManager available"),[2,0]);case 1:i=p.sent(),s.vF.debug("Miniapp getFileSize paths","original: ".concat(e),"normalized: ".concat(i)),o=function(e){var t,r;return q(this,(function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),[4,new Promise((function(t,r){n.getFileInfo({filePath:e,success:function(e){return t(e.size)},fail:r})}))];case 1:return(t=i.sent())>0?(s.vF.debug("Miniapp getFileSize success via getFileInfo","path: ".concat(e,", size: ").concat(t)),[2,{value:t}]):[3,3];case 2:return r=i.sent(),s.vF.debug("Miniapp getFileInfo failed for path",e,r),[3,3];case 3:return[2]}}))},a=0,u=i!==e?[i,e]:[e],p.label=2;case 2:return a<u.length?(c=u[a],[5,o(c)]):[3,5];case 3:if("object"===W(l=p.sent()))return[2,l.value];p.label=4;case 4:return a++,[3,2];case 5:return p.trys.push([5,7,,8]),[4,new Promise((function(e,t){n.readFile({filePath:i,success:function(t){return e(t.data)},fail:t})}))];case 6:return d=p.sent(),f=d.byteLength,s.vF.debug("Miniapp getFileSize fallback via readFile","size: ".concat(f)),[2,f];case 7:return h=p.sent(),s.vF.warn("Miniapp getFileSize: all methods failed","path: ".concat(e),h),[2,0];case 8:return[2]}}))}))},e.prototype._loadImageInfo=function(e){var t=this;return new Promise((function(r,n){t.runtime.getImageInfo({src:e,success:function(e){return r({width:e.width,height:e.height,type:e.type,path:e.path})},fail:n})}))},e.prototype._normalizeLocalPath=function(e){return j(this,void 0,void 0,(function(){var t,r,n;return q(this,(function(i){switch(i.label){case 0:return/^https?:\/\/tmp\//i.test(e)?(t=this._pathCache.get(e))?[2,t]:[4,this._loadImageInfo(e)]:[2,e];case 1:return r=i.sent(),n=r.path||e,/^https?:\/\/tmp\//i.test(n)?[4,this._materializeTempPath(n)]:[3,3];case 2:n=i.sent(),i.label=3;case 3:return this._pathCache.set(e,n),s.vF.debug("Miniapp image path normalization result",e,n),[2,n]}}))}))},e.prototype._materializeTempPath=function(e){var t,r,n;return j(this,void 0,void 0,(function(){var i,o,a,u,c,l;return q(this,(function(d){switch(d.label){case 0:if(!(null==(i=null===(r=(t=this.runtime).getFileSystemManager)||void 0===r?void 0:r.call(t))?void 0:i.saveFile)||!(null===(n=this.runtime.env)||void 0===n?void 0:n.USER_DATA_PATH))return[2,e];o=e.match(/(\.[a-zA-Z0-9]+)(?:\?.*)?$/),a=o?o[1]:"",u="".concat(this.runtime.env.USER_DATA_PATH,"/em-image-").concat(Date.now(),"-").concat(Math.random().toString(36).slice(2)).concat(a),d.label=1;case 1:return d.trys.push([1,3,,4]),[4,new Promise((function(t,r){var n;null===(n=i.saveFile)||void 0===n||n.call(i,{tempFilePath:e,filePath:u,success:function(e){return t(e.savedFilePath||u)},fail:r})}))];case 2:return c=d.sent(),s.vF.debug("Miniapp temp image materialized to user data path",e,c),[2,c];case 3:return l=d.sent(),s.vF.warn("Miniapp saveFile failed while materializing temp image path",l),[2,e];case 4:return[2]}}))}))},e}();function z(e){return z="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},z(e)}var V=function(){return V=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},V.apply(this,arguments)},J=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function s(e){try{u(n.next(e))}catch(e){o(e)}}function a(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}u((n=n.apply(e,t||[])).next())}))},Y=function(e,t){var r,n,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;s;)try{if(r=1,n&&(i=2&o[0]?n.return:o[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,o[1])).done)return i;switch(n=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,n=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],n=0}finally{r=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}};t().util.Long=n(),t().configure();var X=t().Root.fromJSON({nested:{easemob:{nested:{pb:{nested:{MessageBody:{fields:{type:{type:"Type",id:1},from:{type:"JID",id:2},to:{type:"JID",id:3},contents:{rule:"repeated",type:"Content",id:4},ext:{rule:"repeated",type:"KeyValue",id:5},ackMessageId:{type:"uint64",id:6},msgConfig:{type:"MessageConfig",id:7},ackContent:{type:"string",id:8},meta:{type:"string",id:9},editMessageId:{type:"uint64",id:11},editScope:{type:"EditScope",id:12},stream:{type:"Stream",id:13}},nested:{Content:{fields:{type:{type:"Type",id:1},text:{type:"string",id:2},latitude:{type:"double",id:3},longitude:{type:"double",id:4},address:{type:"string",id:5},displayName:{type:"string",id:6},remotePath:{type:"string",id:7},secretKey:{type:"string",id:8},fileLength:{type:"int32",id:9},action:{type:"string",id:10},params:{rule:"repeated",type:"KeyValue",id:11},duration:{type:"int32",id:12},size:{type:"Size",id:13},thumbnailRemotePath:{type:"string",id:14},thumbnailSecretKey:{type:"string",id:15},thumbnailDisplayName:{type:"string",id:16},thumbnailFileLength:{type:"int32",id:17},thumbnailSize:{type:"Size",id:18},customEvent:{type:"string",id:19},customExts:{rule:"repeated",type:"KeyValue",id:20},buildingName:{type:"string",id:21},subType:{type:"SubType",id:22},title:{type:"string",id:23},summary:{type:"string",id:24},combineLevel:{type:"int32",id:25},imageType:{type:"int32",id:26}},nested:{Type:{values:{TEXT:0,IMAGE:1,VIDEO:2,LOCATION:3,VOICE:4,FILE:5,COMMAND:6,CUSTOM:7,COMBINE:8}},Size:{fields:{width:{type:"double",id:1},height:{type:"double",id:2}}},SubType:{values:{COMBINE:0,GIF:1,SUB_STREAM:10}}}},Type:{values:{NORMAL:0,CHAT:1,GROUPCHAT:2,CHATROOM:3,READ_ACK:4,DELIVER_ACK:5,RECALL:6,CHANNEL_ACK:7,EDIT:8}},EditScope:{values:{BODY:1,BODY_AND_EXT:2}},MessageConfig:{fields:{allowGroupAck:{type:"bool",id:1}}},Stream:{fields:{streamType:{type:"string",id:1},streamSeq:{type:"uint64",id:2},streamStatus:{type:"StreamStatus",id:3},streamError:{type:"uint32",id:4},streamFinishReason:{type:"int32",id:5}},nested:{StreamStatus:{values:{STREAM_START:0,STREAM_IN_PROGRESS:1,STREAM_COMPLETED:2,STREAM_FULL:3}}}}}},KeyValue:{oneofs:{value:{oneof:["varintValue","floatValue","doubleValue","stringValue"]}},fields:{key:{type:"string",id:1},type:{type:"ValueType",id:2},varintValue:{type:"int64",id:3},floatValue:{type:"float",id:4},doubleValue:{type:"double",id:5},stringValue:{type:"string",id:6}},nested:{ValueType:{values:{BOOL:1,INT:2,UINT:3,LLINT:4,FLOAT:5,DOUBLE:6,STRING:7,JSON_STRING:8}}}},JID:{fields:{appKey:{type:"string",id:1},name:{type:"string",id:2},domain:{type:"string",id:3},clientResource:{type:"string",id:4}}},ConferenceBody:{fields:{sessionId:{type:"string",id:1},operation:{type:"Operation",id:2},conferenceId:{type:"string",id:3},type:{type:"Type",id:4},content:{type:"string",id:5},network:{type:"string",id:6},version:{type:"string",id:7},identity:{type:"Identity",id:8},duration:{type:"string",id:9},peerName:{type:"string",id:10},endReason:{type:"EndReason",id:11},status:{type:"Status",id:12},isDirect:{type:"bool",id:13},controlType:{type:"StreamControlType",id:14},routeFlag:{type:"int32",id:15},routeKey:{type:"string",id:16}},nested:{Status:{fields:{errorCode:{type:"int32",id:1}}},Operation:{values:{JOIN:0,INITIATE:1,ACCEPT_INITIATE:2,ANSWER:3,TERMINATE:4,REMOVE:5,STREAM_CONTROL:6,MEDIA_REQUEST:7}},Type:{values:{VOICE:0,VIDEO:1}},Identity:{values:{CALLER:0,CALLEE:1}},EndReason:{values:{HANGUP:0,NORESPONSE:1,REJECT:2,BUSY:3,FAIL:4,UNSUPPORTED:5,OFFLINE:6}},StreamControlType:{values:{PAUSE_VOICE:0,RESUME_VOICE:1,PAUSE_VIDEO:2,RESUME_VIDEO:3}}}},MSync:{fields:{version:{type:"Version",id:1,options:{default:"MSYNC_V1"}},guid:{type:"JID",id:2},auth:{type:"string",id:3},compressAlgorimth:{type:"uint32",id:4},crypto:{type:"uint32",id:5},userAgent:{type:"string",id:6},pov:{type:"uint64",id:7},command:{type:"Command",id:8},deviceId:{type:"uint32",id:10},encryptType:{rule:"repeated",type:"EncryptType",id:11,options:{packed:!1}},encryptKey:{type:"string",id:12},payload:{type:"bytes",id:9},traceId:{type:"uint64",id:20}},nested:{Version:{values:{MSYNC_V1:0,MSYNC_V2:1}},Command:{values:{SYNC:0,UNREAD:1,NOTICE:2,PROVISION:3,LOGOUT:4}}}},EncryptType:{values:{ENCRYPT_NONE:0,ENCRYPT_AES_128_CBC:1,ENCRYPT_AES_256_CBC:2}},CommSyncUL:{fields:{meta:{type:"Meta",id:1},key:{type:"uint64",id:2},queue:{type:"JID",id:3},isRoam:{type:"bool",id:4},lastFullRoamKey:{type:"uint64",id:5}}},CommSyncDL:{fields:{status:{type:"Status",id:1},metaId:{type:"uint64",id:2},serverId:{type:"uint64",id:3},metas:{rule:"repeated",type:"Meta",id:4},nextKey:{type:"uint64",id:5},queue:{type:"JID",id:6},isLast:{type:"bool",id:7},timestamp:{type:"uint64",id:8},isRoam:{type:"bool",id:9}}},CommNotice:{fields:{queue:{type:"JID",id:1}}},CommUnreadUL:{fields:{}},CommUnreadDL:{fields:{status:{type:"Status",id:1},unread:{rule:"repeated",type:"MetaQueue",id:2},timestamp:{type:"uint64",id:3}}},MetaQueue:{fields:{queue:{type:"JID",id:1},n:{type:"uint32",id:2}}},Meta:{fields:{id:{type:"uint64",id:1},from:{type:"JID",id:2},to:{type:"JID",id:3},timestamp:{type:"uint64",id:4},ns:{type:"NameSpace",id:5},payload:{type:"bytes",id:6},routetype:{type:"RouteType",id:7},ext:{rule:"repeated",type:"KeyValue",id:8},meta:{type:"bytes",id:9},directedUsers:{rule:"repeated",type:"string",id:10},env:{type:"string",id:13}},nested:{NameSpace:{values:{STATISTIC:0,CHAT:1,MUC:2,ROSTER:3,CONFERENCE:4,NOTIFY:5,QUERY:6}},RouteType:{values:{ROUTE_ALL:0,ROUTE_ONLINE:1,ROUTE_DIRECT:2}}}},Status:{fields:{errorCode:{type:"ErrorCode",id:1},reason:{type:"string",id:2},redirectInfo:{rule:"repeated",type:"RedirectInfo",id:3}},nested:{ErrorCode:{values:{OK:0,FAIL:1,UNAUTHORIZED:2,MISSING_PARAMETER:3,WRONG_PARAMETER:4,REDIRECT:5,TOKEN_EXPIRED:6,PERMISSION_DENIED:7,NO_ROUTE:8,UNKNOWN_COMMAND:9,PB_PARSER_ERROR:10,BIND_ANOTHER_DEVICE:11,IM_FORBIDDEN:12,TOO_MANY_DEVICES:13,PLATFORM_LIMIT:14,USER_MUTED:15,ENCRYPT_DISABLE:16,ENCRYPT_ENABLE:17,DECRYPT_FAILURE:18,PERMISSION_DENIED_EXTERNAL:19}}}},RedirectInfo:{fields:{host:{type:"string",id:1},port:{type:"uint32",id:2}}},Provision:{fields:{osType:{type:"OsType",id:1},version:{type:"string",id:2},networkType:{type:"NetworkType",id:3},appSign:{type:"string",id:4},compressType:{rule:"repeated",type:"CompressType",id:5,options:{packed:!1}},encryptType:{rule:"repeated",type:"EncryptType",id:6,options:{packed:!1}},encryptKey:{type:"string",id:7},status:{type:"Status",id:8},deviceUuid:{type:"string",id:9},isManualLogin:{type:"bool",id:10},password:{type:"string",id:11},deviceName:{type:"string",id:12},resource:{type:"string",id:13},auth:{type:"string",id:14},serviceId:{type:"string",id:16},actionVersion:{type:"string",id:17},authToken:{type:"string",id:18},osCustomValue:{type:"uint32",id:19},sessionId:{type:"string",id:20},reason:{type:"string",id:21},protocolCompressType:{rule:"repeated",type:"CompressType",id:22},protocolCompressDirection:{type:"CompressDirection",id:23}},nested:{OsType:{values:{OS_IOS:0,OS_ANDROID:1,OS_LINUX:2,OS_OSX:3,OS_WIN:4,OS_CUSTOM:5,OS_OTHER:16}},NetworkType:{values:{NETWORK_NONE:0,NETWORK_WIFI:1,NETWORK_4G:2,NETWORK_3G:3,NETWORK_2G:4,NETWORK_WIRE:5}},CompressType:{values:{COMPRESS_NONE:0,COMPRESS_ZLIB:1,COMPRESS_LZ4:2}},CompressDirection:{values:{ONLY_UP:0,ONLY_DOWN:1,BI:2}}}},Logout:{fields:{sessionId:{type:"string",id:1},reason:{type:"string",id:2},status:{type:"Status",id:3}}},MUCBody:{fields:{mucId:{type:"JID",id:1},operation:{type:"Operation",id:2},from:{type:"JID",id:3},to:{rule:"repeated",type:"JID",id:4},setting:{type:"Setting",id:5},reason:{type:"string",id:6},isChatroom:{type:"bool",id:7},status:{type:"Status",id:8},isThread:{type:"bool",id:9},mucParentId:{type:"JID",id:10},mucName:{type:"string",id:11},eventInfo:{type:"EventInfo",id:12},mucMemberCount:{type:"int32",id:13},ext:{type:"string",id:14},leaveOtherRooms:{type:"bool",id:15},members:{rule:"repeated",type:"string",id:16}},nested:{Operation:{values:{CREATE:0,DESTROY:1,JOIN:2,LEAVE:3,APPLY:4,APPLY_ACCEPT:5,APPLY_DECLINE:6,INVITE:7,INVITE_ACCEPT:8,INVITE_DECLINE:9,KICK:10,GET_BLACKLIST:11,BAN:12,ALLOW:13,UPDATE:14,BLOCK:15,UNBLOCK:16,PRESENCE:17,ABSENCE:18,DIRECT_JOINED:19,ASSIGN_OWNER:20,ADD_ADMIN:21,REMOVE_ADMIN:22,ADD_MUTE:23,REMOVE_MUTE:24,UPDATE_ANNOUNCEMENT:25,DELETE_ANNOUNCEMENT:26,UPLOAD_FILE:27,DELETE_FILE:28,ADD_USER_WHITE_LIST:29,REMOVE_USER_WHITE_LIST:30,BAN_GROUP:31,REMOVE_BAN_GROUP:32,THREAD_CREATE:33,THREAD_DESTROY:34,THREAD_JOIN:35,THREAD_LEAVE:36,THREAD_KICK:37,THREAD_UPDATE:38,THREAD_PRESENCE:39,THREAD_ABSENCE:40,DISABLE_GROUP:41,ABLE_GROUP:42,SET_METADATA:43,DELETE_METADATA:44,GROUP_MEMBER_METADATA_UPDATE:45}},Setting:{fields:{name:{type:"string",id:1},desc:{type:"string",id:2},type:{type:"Type",id:3},maxUsers:{type:"int32",id:4},owner:{type:"string",id:5}},nested:{Type:{values:{PRIVATE_OWNER_INVITE:0,PRIVATE_MEMBER_INVITE:1,PUBLIC_JOIN_APPROVAL:2,PUBLIC_JOIN_OPEN:3,PUBLIC_ANONYMOUS:4}}}},Status:{fields:{errorCode:{type:"ErrorCode",id:1},description:{type:"string",id:2},chatroomInfo:{type:"string",id:3}},nested:{ErrorCode:{values:{OK:0,PERMISSION_DENIED:1,WRONG_PARAMETER:2,MUC_NOT_EXIST:3,USER_NOT_EXIST:4,UNKNOWN:5}}}},EventInfo:{fields:{eventType:{type:"EventType",id:1,options:{default:"EVENT_NONE"}},ext:{type:"string",id:2}},nested:{EventType:{values:{EVENT_NONE:0,CIRCLE_CHANNEL:1}}}}}},RosterBody:{fields:{operation:{type:"Operation",id:1},status:{type:"Status",id:2},from:{type:"JID",id:3},to:{rule:"repeated",type:"JID",id:4},reason:{type:"string",id:5},rosterVer:{type:"string",id:6},biDirection:{type:"bool",id:7}},nested:{Operation:{values:{GET_ROSTER:0,GET_BLACKLIST:1,ADD:2,REMOVE:3,ACCEPT:4,DECLINE:5,BAN:6,ALLOW:7,REMOTE_ACCEPT:8,REMOTE_DECLINE:9}},Status:{fields:{errorCode:{type:"ErrorCode",id:1},description:{type:"string",id:2}},nested:{ErrorCode:{values:{OK:0,USER_NOT_EXIST:1,USER_ALREADY_FRIEND:2,USER_ALREADY_BLACKLIST:3}}}}}},StatisticsBody:{fields:{operation:{type:"Operation",id:1},os:{type:"OsType",id:2},version:{type:"string",id:3},network:{type:"NetworkType",id:4},imTime:{type:"uint32",id:5},chatTime:{type:"uint32",id:6},location:{type:"string",id:7},reason:{type:"string",id:10}},nested:{Operation:{values:{INFORMATION:0,USER_REMOVED:1,USER_LOGIN_ANOTHER_DEVICE:2,USER_KICKED_BY_CHANGE_PASSWORD:3,USER_KICKED_BY_OTHER_DEVICE:4}},OsType:{values:{OS_IOS:0,OS_ANDROID:1,OS_LINUX:2,OS_OSX:3,OS_WIN:4,OS_CUSTOM:5,OS_OTHER:16}},NetworkType:{values:{NETWORK_NONE:0,NETWORK_WIFI:1,NETWORK_4G:2,NETWORK_3G:3,NETWORK_2G:4,NETWORK_WIRE:5}}}}}}}}}}),Q=function(){function e(e){var t,r,n,u,l=this;this.name="miniCore",this.appKey="",this.heartBeatWait=E.HJ,this._compressorFailureCount=0,this.Message=i.Q,this.Code=M.C,this.getUniqueId=o.LP,this._queues=[],this._load_msg_cache=[],this.max_cache_length=100,this.isReport=!1,this.dnsIndex=0,this.autoReconnectNumTotal=0,this.times=1,this._reportLogs=!1,this._reportInterval=E.Rk,this._isLogging=!1,this._initWithAppId=!1,this.lastHeartbeat=Date.now(),this.logger=this.getLogger(),this.url=null!==(t=e.url)&&void 0!==t?t:"",this.apiUrl=null!==(r=e.apiUrl)&&void 0!==r?r:"",this.isHttpDNS=!!e.isHttpDNS,this.uploadPartEnable=!0,this.enableMd5Check=null!==(n=e.enableMd5Check)&&void 0!==n&&n,this.root=X,this.mr_cache={},this.isHttpDNS=void 0===e.isHttpDNS||e.isHttpDNS,this.https=o.Wp.isUseHttps(),this.delivery=e.delivery||!1,this.restIndex=0,this.hostIndex=0,this.autoReconnectNumMax=e.autoReconnectNumMax||E.WR,this.refreshDNSIntervals=this.autoReconnectNumMax<5?this.autoReconnectNumMax:5,this.useReplacedMessageContents=e.useReplacedMessageContents||!1,this.unMSyncSendMsgMap=new Map,this.socketHost=[],this.reconnecting=!1,this._offlineMessagePullState=w.P.SYNC_INIT,this._offlineMessagePullQueue=[],this.dnsArr=["https://rs.easemob.com","https://rs.chat.rtnsvc.com","https://rs.chat.realtimemesh.com"].filter((function(e){return e.startsWith(l.https?"https":"")})),this.dnsTotal=this.dnsArr.length,this.version="".concat("4.24.3",".1")||0,this.deviceId=e.deviceId||"webim",this.isFixedDeviceId=null===(u=e.isFixedDeviceId)||void 0===u||u,this.logOut=!0,this.osType=16,this.useOwnUploadFun=e.useOwnUploadFun||!1;var d=o.Wp.getEnvInfo(),f=d.global;if(this._imageProcessor="web"===d.platform?G:(null==f?void 0:f.getImageInfo)?function(e){return new K(e)}(f):null,this.compressType=[0],this.encryptType=[0],this._msgHash={},this.disconnectedReason=void 0,this.loginInfoCustomExt=void 0,this.appName="",this.orgName="",this._compressor=null,this.context={jid:{appKey:"",clientResource:"",domain:"easemob.com",name:""},userId:"",appKey:"",status:0,restTokenData:"",appName:"",orgName:"",root:{},accessToken:""},this.dnsTotal=this.dnsArr.length,"appKey"in e&&(this.appKey=e.appKey),"appId"in e&&(this.appId=e.appId,this._initWithAppId=!0),this.mSync=this.usePlugin(a.Ay),this.eventHandler=this.usePlugin(c),void 0!==e.customOSPlatform){if("number"!=typeof e.customOSPlatform||e.customOSPlatform<1||e.customOSPlatform>100)throw Error("Invalid customOSPlatform: ".concat(e.customOSPlatform));this.customOSPlatform=e.customOSPlatform,this.deviceId=e.customDeviceName||this.deviceId}if(this._initWithAppId){if(this.appKey="","string"!=typeof this.appId||!this.appId)throw Error("Invalid appId: ".concat(this.appId))}else{if("string"!=typeof this.appKey||2!==this.appKey.split("#").length)throw Error("Invalid appKey: ".concat(this.appKey));this.devInfos=this.appKey.split("#"),this.orgName=this.devInfos[0],this.appName=this.devInfos[1]}if(this.dataReport=new N({appkey:this.appKey||"default#appkey",org:this.orgName,sdkVersion:this.version,deviceId:this.deviceId,isReport:this.isReport,uikitVersion:e.uikitVersion||""}),this.isFixedDeviceId){var h=o.Wp.getLocalDeviceInfo();h&&(this.clientResource=JSON.parse(h).deviceId)}s.vF.debug("init SDK: miniCore ".concat(this.version))}return e.prototype.addEventHandler=function(e,t){},e.prototype.removeEventHandler=function(e){},e.prototype.usePlugin=function(e,t){var r=this;if("function"==typeof e){if(!t)return new e(this);this[t]=new e(this)}else"object"===z(e)&&(t?(this[t]={},e.LocalCache&&(this._localCache=e.LocalCache,e=e.LocalCacheApi),Object.keys(e).forEach((function(n){var i,o;r[t][n]=null===(o=null===(i=e[n])||void 0===i?void 0:i.bind)||void 0===o?void 0:o.call(i,r)}))):Object.assign(this,e))},e.prototype.isOpened=function(){return this.sock&&1===this.sock.readyState||!1},e.prototype._validateOpenParams=function(e){if("object"!==z(e)||null===e)return A.A.create({type:M.C.WEBIM_CONNCTION_OPEN_ERROR,message:"the param is illegal"});if(!e.username||"string"!=typeof e.username){var t=A.A.create({type:M.C.WEBIM_CONNCTION_USER_NOT_ASSIGN_ERROR,message:"the username cannot be empty"});return s.vF.error("open params error",t),t}return!("agoraToken"in e)||e.agoraToken&&"string"==typeof e.agoraToken?!("accessToken"in e)||e.accessToken&&"string"==typeof e.accessToken?"accessToken"in e||"agoraToken"in e||e.password?void 0:(t=A.A.create({type:M.C.WEBIM_CONNCTION_OPEN_ERROR,message:"the accessToken or password is illegal"}),s.vF.error("open params error",t),t):(t=A.A.create({type:M.C.WEBIM_CONNCTION_OPEN_ERROR,message:"the accessToken is illegal"}),s.vF.error("open params error",t),t):(t=A.A.create({type:M.C.WEBIM_CONNCTION_OPEN_ERROR,message:"the agoraToken is illegal"}),s.vF.error("open params error",t),console.warn("agoraToken is deprecated, please use accessToken instead"),t)},e.prototype.open=function(e){var t;return J(this,void 0,void 0,(function(){var r,n,i,a,u,c;return Y(this,(function(l){switch(l.label){case 0:if(s.vF.debug("open",e.username),this._isLogging)throw A.A.create({type:M.C.WEBIM_CONNCTION_OPEN_ERROR,message:"Currently logging in, please wait."});if(!this.logOut)throw A.A.create({type:M.C.WEBIM_USER_ALREADY_LOGIN,message:"The user has logged in."});if(this.retryConnectTimes=0,this._isLogging=!0,r=this._validateOpenParams(e))throw r;n=o.Wp.getEnvInfo(),l.label=1;case 1:if(l.trys.push([1,4,5,6]),"web"===n.platform&&(i=o.Wp.detectBrowser(),s.vF.info("browser",i)),s.vF.debug("socket readyState",null===(t=this.sock)||void 0===t?void 0:t.readyState),this.isOpened.call(this))throw A.A.create({type:M.C.WEBIM_CONNCTION_OPEN_ERROR,message:"You are already logged in"});return a=this.dataReport.geOperateFun({uid:e.username,operationName:p.jz.LOGIN}),[4,this._open(e,!1,a)];case 2:return u=l.sent(),s.vF.initReport({report:this._reportLogs,reportInterval:this._reportInterval,connection:this}),[4,this.retryConnectMSync(a)];case 3:return l.sent(),[2,u];case 4:throw c=l.sent(),this._isLogging=!1,c;case 5:return s.vF.reportLog(),[7];case 6:return[2]}}))}))},e.prototype._open=function(e,t,r){return void 0===t&&(t=!1),J(this,void 0,void 0,(function(){var n,i,a,u,c,l,d,f,h,v,m,_,g;return Y(this,(function(E){switch(E.label){case 0:return this.setContext(e),!this.isHttpDNS||t?[3,2]:(this.dnsIndex=0,[4,this.getDNS({rpt:r,isRetry:!!t})]);case 1:E.sent(),E.label=2;case 2:return this.setContext(e),n=this.apiUrl+"/"+this.orgName+"/"+this.appName+"/token",e.agoraToken?(s.vF.info("login with agoraToken"),this.grantType="agoraToken",this.token=e.agoraToken,this.context.accessToken=e.agoraToken,this.context.restTokenData=e.agoraToken,this.user=e.username,[2,{accessToken:e.agoraToken}]):[3,3];case 3:return e.accessToken?(s.vF.info("login with accessToken"),this.grantType="accessToken",this.token=e.accessToken,this.context.accessToken=e.accessToken,this.context.restTokenData=e.accessToken,this.user=e.username,[2,{accessToken:e.accessToken}]):[3,4];case 4:return s.vF.info("login with password"),i={headers:{"Content-type":"application/json"},url:n,dataType:"json",data:JSON.stringify({grant_type:"password",username:e.username,password:e.password,timestamp:+new Date})},[4,$(o.Wp.ajax(i,p.jz.SDK_INTERNAL))];case 5:return a=E.sent(),u=a[0],c=a[1],u?(l=A.A.create({type:M.C.WEBIM_CONNCTION_OPEN_ERROR,message:u.error_description||u.message,data:u}),d=(null==u?void 0:u.extraInfo)||{},_=d.elapse,m=d.httpCode,f=d.errDesc,h={requestName:p.TT.LOGIN_BY_PWD,requestElapse:_,requestUrl:n,isSuccess:0,code:m,codeDesc:f},r&&r({isRetry:!1,data:h}),"invalid password"!==u.message&&"user not found"!==u.message&&this.isHttpDNS&&this.restIndex+1<this.restTotal?(this.restIndex++,this.setRestUrl(),[4,this._open(e,!0,r)]):[3,7]):[3,8];case 6:return[2,E.sent()];case 7:throw r&&r({data:{isLastApi:1,isSuccess:0}}),this.clear(),delete u.extraInfo,l;case 8:if(!c)throw new Error("get token fail.");return this.expiresIn=c.expires_in,this.grantType="password",this.token=c.access_token,this.user=e.username,this.context.accessToken=c.access_token,c.extraInfo&&(v=c.extraInfo,m=v.httpCode,_=v.elapse,g={requestName:p.TT.LOGIN_BY_PWD,requestElapse:_,requestUrl:n,isSuccess:1,code:m},r&&r({isRetry:!1,data:g})),[2,{accessToken:c.access_token,duration:c.expires_in}]}}))}))},e.prototype.retryConnectMSync=function(e){var t,r,n;return J(this,void 0,void 0,(function(){var i,o,a,u;return Y(this,(function(c){switch(c.label){case 0:i=(new Date).getTime(),c.label=1;case 1:return c.trys.push([1,3,,7]),[4,this.connectMSync.call(this,e)];case 2:return o=c.sent(),e&&e({data:{isLastApi:1,isSuccess:1,accessChannel:null===(t=this.socketHost[this.hostIndex])||void 0===t?void 0:t.channel}}),[2,o];case 3:if(a=c.sent(),s.vF.error("connect to msync failed times:",this.retryConnectTimes+1,a),E.Ec.includes(a.type))throw e&&e({data:{isLastApi:1,isSuccess:0,accessChannel:null===(r=this.socketHost[this.hostIndex])||void 0===r?void 0:r.channel,codeDesc:this.disconnectedReason&&JSON.stringify(this.disconnectedReason)||a.message}}),a;return this.retryConnectTimes++,this.retryConnectTimes<E.rO?(this.isHttpDNS&&(this.hostIndex<this.socketHost.length-1?this.hostIndex++:this.hostIndex=this.socketHost.length-1,this.setSocketUrl()),a.type===M.C.REQUEST_TIMEOUT&&"provision timeout"===a.message||(u=(new Date).getTime()-i,null==e||e({isRetry:1!==this.retryConnectTimes,data:{requestUrl:this.url,requestName:p.TT.CONNECT_WEBSOCKET,isSuccess:0,code:p.G8.closed,requestElapse:u,codeDesc:this.disconnectedReason&&JSON.stringify(this.disconnectedReason)||"websocket close"}})),[4,this.retryConnectMSync(e)]):[3,5];case 4:return c.sent(),[3,6];case 5:throw s.vF.error("connect to msync failed",a),e&&e({data:{isLastApi:1,isSuccess:0,accessChannel:null===(n=this.socketHost[this.hostIndex])||void 0===n?void 0:n.channel,codeDesc:this.disconnectedReason&&JSON.stringify(this.disconnectedReason)||a.message}}),a;case 6:return[3,7];case 7:return[2]}}))}))},e.prototype.connectMSync=function(e){var t=this,r="pending",n=(new Date).getTime();return new Promise((function(i,a){t.connectionResolve=i,t.connectionReject=a;var u=new WebSocket(t.url);u.binaryType="arraybuffer",t.sock=u,t.connectionTimer&&clearTimeout(t.connectionTimer),t.connectionTimer=setTimeout((function(){t.disconnectedReason={type:M.C.REQUEST_TIMEOUT,message:"connection timeout"},u.close(),null==a||a(t.disconnectedReason)}),E.x0),u.onopen=function(){if(t.connectionTimer&&clearTimeout(t.connectionTimer),e){var r=(new Date).getTime()-n;e({isRetry:0!==t.retryConnectTimes,data:{requestUrl:t.url,requestName:p.TT.CONNECT_WEBSOCKET,isSuccess:1,code:p.G8.success,requestElapse:r}})}(0,o.En)(t.online.bind(t),t.offline.bind(t)),(0,o.X0)((function(){s.vF.debug("visibility true")}),(function(){s.vF.debug("visibility false")}));var i=t.mSync.generateProvision();t.provisionTimer&&clearTimeout(t.provisionTimer),t.provisionTimer=setTimeout((function(){s.vF.error("provision timeout"),t.disconnectedReason=A.A.create({type:M.C.REQUEST_TIMEOUT,message:"provision timeout"}),u.close(),null==a||a(t.disconnectedReason)}),E.Qb),u.send(i)},u.onclose=function(e){var n,i,o,u,c,l,d;if(t.connectionTimer&&clearTimeout(t.connectionTimer),s.vF.info("websocket onclose, isLogging:",t._isLogging),t._isLogging)return null==a||a({type:M.C.WEBIM_CONNCTION_DISCONNECTED,message:"websocket has been disconnected"}),void(r="rejected");"rejected"!==r?(r="rejected",t.logOut?(t.clear(),null===(i=null===(n=null==t?void 0:t._localCache)||void 0===n?void 0:n.getInstance())||void 0===i||i.close(),null===(o=t.eventHandler)||void 0===o||o.dispatch("onDisconnected",t.disconnectedReason),t.resetConnState(),null==a||a({type:M.C.WEBIM_CONNCTION_DISCONNECTED,message:"logout"})):t.autoReconnectNumTotal<t.autoReconnectNumMax?(t.reconnect(),t.autoReconnectNumTotal%t.refreshDNSIntervals===0&&t.isHttpDNS&&(s.vF.debug("refresh dns config when websocket close"),t.getDNS({isRetry:!1}).catch((function(e){s.vF.error("get dns error",e)})))):(t.disconnectedReason=A.A.create({type:M.C.WEBIM_CONNCTION_DISCONNECTED,message:"reconnection failed"}),null===(u=t.unMSyncSendMsgMap)||void 0===u||u.clear(),t.rejectMessage(),null===(l=null===(c=null==t?void 0:t._localCache)||void 0===c?void 0:c.getInstance())||void 0===l||l.close(),null===(d=t.eventHandler)||void 0===d||d.dispatch("onDisconnected",t.disconnectedReason),t.resetConnState(),t.reconnecting=!1,null==a||a(t.disconnectedReason),s.vF.info("reconnect fail"))):s.vF.debug("onclose reject is null")},u.onmessage=function(e){var r=t.mSync,n=r.decodeMSync,i=r.distributeMSync;o.Wp.flow([n,i])(e,!1)},u.onerror=function(n){var i,o,u,c;if(t.connectionTimer&&clearTimeout(t.connectionTimer),s.vF.info("websocket onerror, isLogging:",t._isLogging),t._isLogging)return null==a||a({type:M.C.WEBIM_CONNCTION_DISCONNECTED,message:"websocket has been disconnected"}),void(r="rejected");"rejected"!==r?(r="rejected",t.logOut||(t.autoReconnectNumTotal<t.autoReconnectNumMax?(s.vF.debug("sock.onError reconnect",t.autoReconnectNumTotal,t.autoReconnectNumMax),t.reconnect(),t.autoReconnectNumTotal%t.refreshDNSIntervals===0&&t.isHttpDNS&&(s.vF.debug("refresh dns config when websocket error"),t.getDNS({rpt:e,isRetry:!1}).catch((function(e){s.vF.error("get dns error",e)})))):(t.disconnectedReason=A.A.create({type:M.C.WEBIM_CONNCTION_DISCONNECTED,message:"reconnection failed"}),null===(i=t.unMSyncSendMsgMap)||void 0===i||i.clear(),t.rejectMessage(),null===(u=null===(o=null==t?void 0:t._localCache)||void 0===o?void 0:o.getInstance())||void 0===u||u.close(),null===(c=t.eventHandler)||void 0===c||c.dispatch("onDisconnected",t.disconnectedReason),t.resetConnState(),t.reconnecting=!1,s.vF.debug("reconnect fail"),null==a||a(t.disconnectedReason)))):s.vF.debug("onerror reject is null")}}))},e.prototype.close=function(e){var t,r,n,i;void 0===e&&(e="inner:logout"),s.vF.debug("call close"),s.vF._stopReportLogs(),this.logOut=!0,this.disconnectedReason=void 0,this.reconnecting=!1,this.context.status=M.C.STATUS_CLOSING,e&&(null==e?void 0:e.startsWith("inner"))&&this.sendLogout(e),this.sock&&this.sock.close(),null===(t=this.unMSyncSendMsgMap)||void 0===t||t.clear(),this.stopHeartBeat(),this.rejectMessage(),this.context.status=M.C.STATUS_CLOSED,this._load_msg_cache=[],this._queues=[],this._msgHash={},this.mr_cache={},this.token="",this.context.accessToken="",this.clearTokenTimeout(),null===(n=null===(r=this._localCache)||void 0===r?void 0:r.getInstance())||void 0===n||n.close(),this.connectionTimer&&clearTimeout(this.connectionTimer),this.provisionTimer&&clearTimeout(this.provisionTimer),this.probingTimer&&clearTimeout(this.probingTimer),null===(i=this._compressor)||void 0===i||i.shrink(),this._compressorFailureCount=0,this._compressor=null,D.P.clearAll()},e.prototype.sendLogout=function(e){void 0===e&&(e="logout");var t=this.mSync.generateLogout(e),r=x.v.call(this,t),n=r[0],i=r[1];try{i&&this.sock&&1===this.sock.readyState&&this.sock.send(n)}catch(e){s.vF.error("sendLogout failed",e)}},e.prototype.registerUser=function(e){return J(this,void 0,void 0,(function(){var t,r,n,i,s,a,u,c,l,d,f,h,v,m;return Y(this,(function(_){switch(_.label){case 0:return t=this.dataReport.geOperateFun({uid:e.username,operationName:p.jz.REGISTER}),this.isHttpDNS?(this.dnsIndex=0,[4,this.getDNS({rpt:t,isRetry:!1})]):[3,2];case 1:_.sent(),_.label=2;case 2:return r=this.apiUrl,n=r+"/"+this.orgName+"/"+this.appName+"/users",i=JSON.stringify({username:e.username,password:e.password,nickname:e.nickname||""}),s={headers:{"Content-type":"application/json"},url:n,dataType:"json",data:i},[4,$(o.Wp.ajax(s,p.jz.SDK_INTERNAL))];case 3:return a=_.sent(),u=a[0],c=a[1],l={requestName:p.TT.RESISTER,requestUrl:n},u?(d=u.extraInfo||{},v=d.httpCode,m=d.elapse,f=d.errDesc,t({isRetry:!1,data:V(V({},{requestElapse:m,isSuccess:0,code:v,codeDesc:f}),l)}),!(u.message.includes("Open registration doesn't allow")||u.message.includes("username be unique")||u.message.includes("is not legal"))&&this.isHttpDNS&&this.restIndex+1<this.restTotal?(this.restIndex++,this.setRestUrl(),[4,this.registerUser(e)]):[3,5]):[3,7];case 4:return[2,_.sent()];case 5:throw t({data:{isLastApi:1,isSuccess:0}}),delete u.extraInfo,u;case 6:return[3,8];case 7:if(!c)throw new Error("register user fail.");return h=c.extraInfo||{},v=h.httpCode,m=h.elapse,t({isEndApi:!0,isRetry:!1,data:V(V({},{requestElapse:m,isSuccess:1,code:v}),l)}),[2,{data:null==c?void 0:c.entities[0],type:0}];case 8:return[2]}}))}))},e.prototype.renewToken=function(e){var t=this,r=this.isOpened();return s.vF.debug("isOpened",r),r?this.getTokenExpireTimestamp(e).then((function(r){var n=r.expire_timestamp,i=Date.now();return t.expirationTime=n,t.expiresIn=n-i,t.token=e,t.context.accessToken=e,t.clearTokenTimeout(),t.tokenExpireTimeCountDown(t.expiresIn),{status:!0,token:e,expire:r.expire_timestamp}})):Promise.reject({status:!1})},e.prototype.send=function(e){return Promise.resolve(null)},e.prototype.getTokenExpireTimestamp=function(e){if("string"!=typeof e||""===e)throw Error('Invalid parameter: "token"');var t=this.context,r=t.orgName,n=t.appName,i={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 s.vF.debug("Call getTokenExpireTimestamp"),o.Wp.ajax(i,p.jz.SDK_INTERNAL)},e.prototype.clearTokenTimeout=function(){s.vF.debug("clearTokenTimeout"),this.tokenWillExpireTimer&&clearTimeout(this.tokenWillExpireTimer),this.tokenExpiredTimer&&clearTimeout(this.tokenExpiredTimer),this.tokenWillExpireTimer=null,this.tokenExpiredTimer=null},e.prototype.compareTokenExpireTime=function(e,t){var r,n=Number(t)-Number(e);s.vF.debug("compareTokenExpireTime",n),n<=this.expiresIn/5&&n>0?(null===(r=this.eventHandler)||void 0===r||r.dispatch("onTokenWillExpire"),s.vF.info("onTokenWillExpire",n)):n<=0&&(this.closeByTokenExpired(),s.vF.info("closeByTokenExpired",n))},e.prototype.closeByTokenExpired=function(){var e;s.vF.info("closed By TokenExpired"),null===(e=this.eventHandler)||void 0===e||e.dispatch("onTokenExpired"),this.close("inner:token expired")},e.prototype.tokenExpireTimeCountDown=function(e){var t=this;e>Math.pow(2,31)-1&&(e=Math.pow(2,31)-1),this.tokenWillExpireTimer=setTimeout((function(){var r;null===(r=t.eventHandler)||void 0===r||r.dispatch("onTokenWillExpire"),s.vF.info("onTokenWillExpire",Math.floor(e-e/5))}),e-e/5),this.tokenExpiredTimer=setTimeout((function(){var e;s.vF.info("onTokenExpired",0),null===(e=t.eventHandler)||void 0===e||e.dispatch("onTokenExpired"),t.close("inner:token expired")}),e)},e.prototype.stopHeartBeat=function(){clearInterval(this.heartBeatID)},e.prototype.setContext=function(e){this.context.jid={appKey:this.appKey,name:e.username,domain:this.context.jid.domain,clientResource:this.clientResource},this.context.root=this.root,this.context.userId=e.username,this.context.appKey=this.appKey,this.context.appName=this.appName,this.context.orgName=this.orgName},e.prototype.getDNS=function(e){var t;return J(this,void 0,void 0,(function(){var r,n,i,a,u,c,l,d,f,h,v,m,_,g,y,O,T,R,I,S,C,b;return Y(this,(function(N){switch(N.label){case 0:return r=e.rpt,n=e.isRetry,i=this.dnsIndex<this.dnsTotal?this.dnsIndex:0,a="".concat(this.dnsArr[i],"/easemob/server.json"),u={url:a,dataType:"json",type:"GET",data:{}},this._initWithAppId?u.data={app_id:this.appId,sdk_version:"4.10.0",file_version:"1"}:u.data={app_key:encodeURIComponent(this.appKey)},[4,$(o.Wp.ajax(u,p.jz.SDK_INTERNAL))];case 1:return c=N.sent(),l=c[0],d=c[1],l?(f=l.extraInfo||{},h=f.elapse,v=f.httpCode,m=f.errDesc,_={requestUrl:a,requestName:p.TT.GET_DNS,isSuccess:0,code:v,codeDesc:m,requestElapse:h},r&&r({isRetry:n,data:_}),s.vF.debug("getHttpDNS failed: "+this.dnsIndex),this.dnsIndex++,this.dnsIndex<this.dnsTotal?[4,this.getDNS({rpt:r,isRetry:!0})]:[3,3]):[3,4];case 2:return N.sent(),[2];case 3:throw A.A.create({type:M.C.SERVER_GET_DNSLIST_FAILED,message:"get DNS failed",data:l});case 4:if(!d||!(null===(t=d.rest)||void 0===t?void 0:t.hosts)||!d["msync-wx"])throw A.A.create({type:M.C.SERVER_GET_DNSLIST_FAILED,message:"DNS hosts resolution failed",data:d});if(s.vF.debug("getHttpDNS success: "+this.dnsIndex),g=d.extraInfo||{},y=g.elapse,O=g.httpCode,this._reportLogs="true"===d.enableReportLogs,this._reportInterval=Number(d.reportInterval||E.Rk),T={requestUrl:a,requestName:p.TT.GET_DNS,requestElapse:y,isSuccess:1,code:O},r&&r({isRetry:n,data:T}),R=d.rest.hosts,I=this.https?"https":"http",this._initWithAppId){if(!d.app_key)throw A.A.create({type:M.C.SERVER_GET_DNSLIST_FAILED,message:"get DNS failed"});this.appKey=d.app_key,this.context.appKey=this.appKey,this.devInfos=this.appKey.split("#"),this.orgName=this.devInfos[0],this.appName=this.devInfos[1],this.dataReport.updateAppKey(this.appKey)}return S=R.filter((function(e){if(e.protocol===I)return e})),this.restHosts=S,this.restTotal=this.restHosts.length,C=d["msync-wx"].hosts,b=C.filter((function(e){if(e.protocol===I)return e})),this.socketHost=b,"true"===(null==d?void 0:d.enableDataReport)?(this.dataReport.setIsCollectDt(!0),this.dataReport.setIsReportDt(!0)):(this.dataReport.setIsReportDt(!1),this.dataReport.setIsCollectDt(!1)),"false"===(null==d?void 0:d.uploadinparts_enable)&&(this.uploadPartEnable=!1),void 0!==(null==d?void 0:d.enableMd5Check)&&(this.enableMd5Check="true"===d.enableMd5Check),this.setRestUrl(),this.setSocketUrl(),[2]}}))}))},e.prototype.setRestUrl=function(){var e,t;if(this.restIndex>this.restHosts.length)return s.vF.debug("restIndex > restTotal"),"";var r="",n=this.restHosts[this.restIndex],i=n.domain,o=n.ip,a=n.port,u=this.https?"https:":"http:";return o&&"undefined"!=typeof window&&"http:"===(null===(e=null===window||void 0===window?void 0:window.location)||void 0===e?void 0:e.protocol)?r=u+"//"+o+":"+a:(r=u+"//"+i,a&&"80"!==a&&"443"!==a&&(r+=":".concat(a)),"undefined"==typeof window||window.location||(r="https://"+i),"undefined"!=typeof window&&window.location&&"file:"===(null===(t=window.location)||void 0===t?void 0:t.protocol)&&(r="https://"+i)),"undefined"==typeof window&&(r=u+"//"+i),this.apiUrl=r,r},e.prototype.setSocketUrl=function(){var e=this.socketHost[this.hostIndex],t=e.domain,r=e.ip,n=e.port,i="";i=t||r,n&&"80"!==n&&"443"!==n&&(i+=":"+n),i&&(this.url="//"+i+"/websocket");var o=this.https?"wss:":"ws:";this.url=o+this.url},e.prototype.online=function(){var e;s.vF.debug("online"),null===(e=this.eventHandler)||void 0===e||e.dispatch("onOnline"),this.sock&&1!==this.sock.readyState&&(s.vF.debug("sock.readyState:",this.sock.readyState),this.logOut||this.reconnecting||this.reconnect())},e.prototype.offline=function(){var e,t;s.vF.debug("offline"),null===(e=this.sock)||void 0===e||e.close(),null===(t=this.eventHandler)||void 0===t||t.dispatch("onOffline")},e.prototype.getLogger=function(){var e=s.vF.getLogger("defaultLogger");return e.setConfig({useCache:!1,maxCache:3145728,color:"",background:""}),e.enableAll(),e},e.prototype.rejectMessage=function(){var e=this,t=Object.keys(this._msgHash);if(t.length>0){var r=A.A.create({type:M.C.MESSAGE_WEBSOCKET_DISCONNECTED,message:"websocket disconnected"});t.forEach((function(t){var n,i,o;(null===(n=e.unMSyncSendMsgMap)||void 0===n?void 0:n.has(t))||(e._msgHash[t].reject instanceof Function&&e._msgHash[t].reject(r),null===(o=null===(i=e._localCache)||void 0===i?void 0:i.getInstance())||void 0===o||o.updateLocalMessage(t,{serverMsgId:t,status:U.q.FAIL}),e._msgHash[t].fail instanceof Function&&e._msgHash[t].fail(r),e._msgHash[t].messageTimer&&clearTimeout(e._msgHash[t].messageTimer),delete e._msgHash[t])}))}},e.prototype.resetConnState=function(){this.mSync.stopHeartBeat(),this.times=1,this.autoReconnectNumTotal=0,this.hostIndex=0},e.prototype.reconnect=function(e){var t,r=this;if(this.logout)return s.vF.warn("The user has already logged out when reconnecting");if(s.vF.debug("socket reconnect readyState",this.sock.readyState),0!==this.sock.readyState&&1!==this.sock.readyState||e){!1===this.reconnecting&&(this.reconnecting=!0),null===(t=this.eventHandler)||void 0===t||t.dispatch("onReconnecting"),s.vF.info("reconnect times: ",this.times),s.vF.info("reconnect sock.readyState: ",this.sock.readyState),this.rejectMessage(),this.isHttpDNS&&(this.hostIndex<this.socketHost.length-1?this.hostIndex++:this.hostIndex=this.socketHost.length-1);var n=1e3*o.Wp.getRetryDelay(this.times);s.vF.info("reconnect delay: ",n),setTimeout((function(){(1!==r.sock.readyState||e)&&(s.vF.info("login sock.readyState: ",r.sock.readyState),r.sock.close(),r.connectMSync(),r.times++)}),n),this.autoReconnectNumTotal++}},e.prototype.clear=function(){this.restTotal=0,this.restIndex=0,this.hostIndex=0,this.hostTotal=0},e.prototype.onShow=function(){var e=this;s.vF.debug("execute onshow callback"),!this.logOut&&!this.reconnecting&&Date.now()-this.lastHeartbeat>2e3&&(s.vF.debug("send ping"),this.mSync.sendUnreadDeal(),this.probingTimer&&clearTimeout(this.probingTimer),this.probingTimer=setTimeout((function(){s.vF.error("Websocket connection timeout"),e.logOut||e.reconnecting||e.reconnect(!0)}),E.oi))},e.prototype.downloadAndParseCombineMessage=function(e){var t=this,r=e.url,n=e.secret;return new Promise((function(e,i){var a,u,c=o.Wp.getEnvInfo(),l="web"!==c.platform&&"node"!==c.platform&&"quick_app"!==c.platform&&(null===(u=null===(a=c.global)||void 0===a?void 0:a.canIUse)||void 0===u?void 0:u.call(a,"getFileSystemManager")),d=function(r){var n=function(e){i({message:"Read file failed",data:e})},a=function(r){return J(t,void 0,void 0,(function(){var t,n,a,u,c,d,f,h,p,v,m,_,g;return Y(this,(function(E){switch(E.label){case 0:for(t=l?new Uint8Array(r.data):new Uint8Array(r.target.result),n=0,a=0,u=2,c=t.subarray(n,n+u),d=o.Wp.Uint8ArrayToString(c),a+=u,f=0,h=2;h<t.length-1;h++)h%2==1&&(f^=t[h]);if(p=t.subarray(t.length-1,t.length),s.vF.debug("checkResult:",f,p[0]===f),p[0]!==f)return[2,i({message:"File verification failed"})];if("cm"!==d)return[3,7];E.label=1;case 1:E.trys.push([1,5,,6]),v=[],m=function(){var e,r,i,o;return Y(this,(function(s){switch(s.label){case 0:return n+=u,a+=u=4,e=t.subarray(n,n+u),n+=u,u=e.reduce((function(t,r,n){return t+(r<<8*(e.length-n-1))}),0),a+=u,r=t.subarray(n,n+u),i=(i=_.root.lookup("easemob.pb.Meta")).decode(r),[4,L.Ay.call(_,i,0,!0,!0)];case 1:return o=s.sent(),v.push(o),[2]}}))},_=this,E.label=2;case 2:return a<t.length-1?[5,m()]:[3,4];case 3:return E.sent(),[3,2];case 4:return[2,e(v)];case 5:return g=E.sent(),i({message:"Parse file failed",data:g}),[3,6];case 6:return[3,8];case 7:return[2,i({message:"File verification failed"})];case 8:return[2]}}))}))};if(l){var u=c.global.getFileSystemManager(),d=r.tempFilePath;u.readFile({filePath:d,success:a,fail:n})}else if(r instanceof Blob){var f=new FileReader;f.readAsArrayBuffer(r),f.onerror=n,f.onload=a}},f=function(e){i({type:M.C.WEBIM_DOWNLOADFILE_ERROR,message:"Download failed, please try again",data:e})};l?c.global.downloadFile({url:r,success:d,fail:f}):o.Wp.download.call(t,{url:r,headers:{Accept:"application/json"},onFileDownloadComplete:d,onFileDownloadError:f,secret:n,accessToken:t.context.accessToken})}))},e.prototype.getChatFilesUrl=function(){return"".concat(this.apiUrl,"/").concat(this.orgName,"/").concat(this.appName,"/chatfiles")},e.prototype.setLoginInfoCustomExt=function(e){if(s.vF.debug("setLoginInfoCustomExt","params:",e),e){if("string"!=typeof e)throw new Error("ext must be a string");if(e.length>1024)throw new Error("ext length must be less than 1024")}this.loginInfoCustomExt=e},e}(),$=function(e){return e.then((function(e){return[null,e]})).catch((function(e){return[e,null]}))},Z=Q}(),__webpack_exports__=__webpack_require__.O(__webpack_exports__),__webpack_exports__=__webpack_exports__.default,__webpack_exports__}()}));
|