!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["sceyt-chat"]=t():e["sceyt-chat"]=t()}(this,(()=>(()=>{var __webpack_modules__={169:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o});var r=null;"undefined"!=typeof WebSocket?r=WebSocket:"undefined"!=typeof MozWebSocket?r=MozWebSocket:void 0!==n.g?r=n.g.WebSocket||n.g.MozWebSocket:"undefined"!=typeof window?r=window.WebSocket||window.MozWebSocket:"undefined"!=typeof self&&(r=self.WebSocket||self.MozWebSocket);const o=r},251:function(e,t,n){var r,o;r=function(e){"use strict";var t,n,r={template:"[%t] %l:",levelFormatter:function(e){return e.toUpperCase()},nameFormatter:function(e){return e||"root"},timestampFormatter:function(e){return e.toTimeString().replace(/.*(\d{2}:\d{2}:\d{2}).*/,"$1")},format:void 0},o={},i={reg:function(e){if(!e||!e.getLogger)throw new TypeError("Argument is not a root logger");t=e},apply:function(e,n){if(!e||!e.setLevel)throw new TypeError("Argument is not a logger");var i=e.methodFactory,s=e.name||"",a=o[s]||o[""]||r;return o[s]||(e.methodFactory=function(e,t,n){var r=i(e,t,n),a=o[n]||o[""],l=-1!==a.template.indexOf("%t"),c=-1!==a.template.indexOf("%l"),u=-1!==a.template.indexOf("%n");return function(){for(var t="",i=arguments.length,d=Array(i),p=0;p0&&o[o.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]{"use strict";var r=t,o=n(3262),i=["double","float","int32","uint32","sint32","fixed32","sfixed32","int64","uint64","sint64","fixed64","sfixed64","bool","string","bytes"];function s(e,t){var n=0,r={};for(t|=0;n{"use strict";e.exports=function(e){var t=o.codegen(["m"],e.name+"$verify")('if(typeof m!=="object"||m===null)')("return%j","object expected"),n={};e.oneofsArray.length&&t("var p={}");for(var r=0;r0&&o[o.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]0&&o[o.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]0&&o[o.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]50?50:e,o},o.reverse=function(e){o.reverseData=e},o.build=function(){return i(o,void 0,void 0,(function(){return s(this,(function(e){try{return[2,new a.MessageMarkerListQuery(this)]}catch(e){throw new a.SceytChatError(e.message,e.code)}return[2]}))}))},o.channelId=t,o.messageId=n,o.marker=r,o.reverseData=!1,o.count=20,o}return o(t,e),t}(a.QueryBuilder);t.MessageMarkerListQueryBuilder=l},527:e=>{"use strict";e.exports=d;var t=/[\s{}=;:[\],'"()<>]/g,n=/(?:"([^"\\]*(?:\\.[^"\\]*)*)")/g,r=/(?:'([^'\\]*(?:\\.[^'\\]*)*)')/g,o=/^ *[*/]+ */,i=/^\s*\*?\/*/,s=/\n/g,a=/\s/,l=/\\(.?)/g,c={0:"\0",r:"\r",n:"\n",t:"\t"};function u(e){return e.replace(l,(function(e,t){switch(t){case"\\":case"":return t;default:return c[t]||""}}))}function d(e,l){e=e.toString();var c=0,d=e.length,p=1,f=null,h=null,y=0,g=!1,m=!1,b=[],v=null;function O(e){return Error("illegal "+e+" (line "+p+")")}function w(t){return e.charAt(t)}function I(t,n,r){f=e.charAt(t++),y=p,g=!1,m=r;var a,c=t-(l?2:3);do{if(--c<0||"\n"===(a=e.charAt(c))){g=!0;break}}while(" "===a||"\t"===a);for(var u=e.substring(t,n).split(s),d=0;d0)return b.shift();if(v)return function(){var t="'"===v?r:n;t.lastIndex=c-1;var o=t.exec(e);if(!o)throw O("string");return c=t.lastIndex,A(v),v=null,u(o[1])}();var o,i,s,f,h,y=0===c;do{if(c===d)return null;for(o=!1;a.test(s=w(c));)if("\n"===s&&(y=!0,++p),++c===d)return null;if("/"===w(c)){if(++c===d)throw O("comment");if("/"===w(c))if(l){if(f=c,h=!1,P(c)){h=!0;do{if((c=S(c))===d)break;c++}while(P(c))}else c=Math.min(d,S(c)+1);h&&I(f,c,y),p++,o=!0}else{for(h="/"===w(f=c+1);"\n"!==w(++c);)if(c===d)return null;++c,h&&I(f,c-1,y),++p,o=!0}else{if("*"!==(s=w(c)))return"/";f=c+1,h=l||"*"===w(f);do{if("\n"===s&&++p,++c===d)throw O("comment");i=s,s=w(c)}while("*"!==i||"/"!==s);++c,h&&I(f,c-2,y),o=!0}}}while(o);var g=c;if(t.lastIndex=0,!t.test(w(g++)))for(;g{"use strict";var r=t,o=n(5643),i=n(3262);function s(e,t,n,r){if(t.resolvedType)if(t.resolvedType instanceof o){e("switch(d%s){",r);for(var i=t.resolvedType.values,s=Object.keys(i),a=0;a>>0",r,r);break;case"int32":case"sint32":case"sfixed32":e("m%s=d%s|0",r,r);break;case"uint64":l=!0;case"int64":case"sint64":case"fixed64":case"sfixed64":e("if(util.Long)")("(m%s=util.Long.fromValue(d%s)).unsigned=%j",r,r,l)('else if(typeof d%s==="string")',r)("m%s=parseInt(d%s,10)",r,r)('else if(typeof d%s==="number")',r)("m%s=d%s",r,r)('else if(typeof d%s==="object")',r)("m%s=new util.LongBits(d%s.low>>>0,d%s.high>>>0).toNumber(%s)",r,r,r,l?"true":"");break;case"bytes":e('if(typeof d%s==="string")',r)("util.base64.decode(d%s,m%s=util.newBuffer(util.base64.length(d%s)),0)",r,r,r)("else if(d%s.length)",r)("m%s=d%s",r,r);break;case"string":e("m%s=String(d%s)",r,r);break;case"bool":e("m%s=Boolean(d%s)",r,r)}}return e}function a(e,t,n,r){if(t.resolvedType)t.resolvedType instanceof o?e("d%s=o.enums===String?types[%i].values[m%s]:m%s",r,n,r,r):e("d%s=types[%i].toObject(m%s,o)",r,n,r);else{var i=!1;switch(t.type){case"double":case"float":e("d%s=o.json&&!isFinite(m%s)?String(m%s):m%s",r,r,r,r);break;case"uint64":i=!0;case"int64":case"sint64":case"fixed64":case"sfixed64":e('if(typeof m%s==="number")',r)("d%s=o.longs===String?String(m%s):m%s",r,r,r)("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",r,r,r,r,i?"true":"",r);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",r,r,r,r,r);break;default:e("d%s=m%s",r,r)}}return e}r.fromObject=function(e){var t=e.fieldsArray,n=i.codegen(["d"],e.name+"$fromObject")("if(d instanceof this.ctor)")("return d");if(!t.length)return n("return new this.ctor");n("var m=new this.ctor");for(var r=0;r{"use strict";e.exports=i;var r=n(3449);(i.prototype=Object.create(r.prototype)).constructor=i;var o=n(3610);function i(){r.call(this)}function s(e,t,n){e.length<40?o.utf8.write(e,t,n):t.utf8Write?t.utf8Write(e,n):t.write(e,n)}i._configure=function(){i.alloc=o._Buffer_allocUnsafe,i.writeBytesBuffer=o.Buffer&&o.Buffer.prototype instanceof Uint8Array&&"set"===o.Buffer.prototype.set.name?function(e,t,n){t.set(e,n)}:function(e,t,n){if(e.copy)e.copy(t,n,0,e.length);else for(var r=0;r>>0;return this.uint32(t),t&&this._push(i.writeBytesBuffer,t,e),this},i.prototype.string=function(e){var t=o.Buffer.byteLength(e);return this.uint32(t),t&&this._push(s,t,e),this},i._configure()},842:function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.Member=void 0;var i=function(e){function t(t){var n=e.call(this,t.user)||this;return n.role=t.role,n}return o(t,e),t}(n(4799).User);t.Member=i},984:function(e,t,n){"use strict";var r=this&&this.__assign||function(){return r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0&&o[o.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]0&&o[o.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]0,[2,{members:e.createMembersList(n),hasNext:this.hasNext}];case 2:return[2,{members:[],hasNext:this.hasNext}];case 3:return[3,5];case 4:throw new i.SceytChatError(i.clientErrors.QUERY_IN_PROGRESS.message,i.clientErrors.QUERY_IN_PROGRESS.code);case 5:return[2]}}))}))},this.channelId=e.channelId,this.count=e.count,this.hasNext=e.hasNext}return Object.defineProperty(e.prototype,"limit",{get:function(){return this.count},set:function(e){this.count=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"offset",{get:function(){return this.index},set:function(e){this.index=e},enumerable:!1,configurable:!0}),e}();t.BlockedMemberListQuery=s},1e3:function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function s(e){try{l(r.next(e))}catch(e){i(e)}}function a(e){try{l(r.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}l((r=r.apply(e,t||[])).next())}))},s=this&&this.__generator||function(e,t){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(a){return function(l){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,a[0]&&(s=0)),s;)try{if(n=1,r&&(o=2&a[0]?r.return:a[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,a[1])).done)return o;switch(r=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,r=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!((o=(o=s.trys).length>0&&o[o.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.QueryBuilder=void 0;t.QueryBuilder=function(){this.count=20}},1080:(e,t,n)=>{"use strict";e.exports=function(e){for(var t,n=i.codegen(["m","w"],e.name+"$encode")("if(!w)")("w=Writer.create()"),a=e.fieldsArray.slice().sort(i.compareFieldsById),l=0;l>>0,8|o.mapKey[c.keyType],c.keyType),void 0===p?n("types[%i].encode(%s[ks[i]],w.uint32(18).fork()).ldelim().ldelim()",u,t):n(".uint32(%i).%s(%s[ks[i]]).ldelim()",16|p,d,t),n("}")("}")):c.repeated?(n("if(%s!=null&&%s.length){",t,t),c.packed&&void 0!==o.packed[d]?n("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()"):(n("for(var i=0;i<%s.length;++i)",t),void 0===p?s(n,c,u,t+"[i]"):n("w.uint32(%i).%s(%s[i])",(c.id<<3|p)>>>0,d,t)),n("}")):(c.optional&&n("if(%s!=null&&Object.hasOwnProperty.call(m,%j))",t,c.name),void 0===p?s(n,c,u,t):n("w.uint32(%i).%s(%s)",(c.id<<3|p)>>>0,d,t))}return n("return w")};var r=n(5643),o=n(361),i=n(3262);function s(e,t,n,r){return t.resolvedType.group?e("types[%i].encode(%s,w.uint32(%i)).uint32(%i)",n,r,(t.id<<3|3)>>>0,(t.id<<3|4)>>>0):e("types[%i].encode(%s,w.uint32(%i).fork()).ldelim()",n,r,(t.id<<3|2)>>>0)}},1252:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function s(e){try{l(r.next(e))}catch(e){i(e)}}function a(e){try{l(r.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}l((r=r.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(a){return function(l){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,a[0]&&(s=0)),s;)try{if(n=1,r&&(o=2&a[0]?r.return:a[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,a[1])).done)return o;switch(r=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,r=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!((o=(o=s.trys).length>0&&o[o.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]=i&&(b=this.messagingQueue[m].callback,v={message:a.clientErrors.REQUEST_TIMEOUT.message,code:a.clientErrors.REQUEST_TIMEOUT.code},b(!0,v),delete this.messagingQueue[m]);return[2]}}))}))},this.createMessageId=function(){return(0,a.createUUID)()},this.socketClient=e,this.authHandler=t}return Object.defineProperty(e.prototype,"channelActionReceived",{get:function(){return this.onChannelActionReceived.expose()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"channelQueryReceived",{get:function(){return this.onChannelQueryReceived.expose()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"messageActionReceived",{get:function(){return this.onMessageActionReceived.expose()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"signalReceived",{get:function(){return this.onSignalReceived.expose()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"messageStatusReceived",{get:function(){return this.onMessageStatusReceived.expose()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"messageReceived",{get:function(){return this.onMessageReceived.expose()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"messageUnreadCountsReceived",{get:function(){return this.onMessageUnreadCountsReceived.expose()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"channelEventsReceived",{get:function(){return this.onChannelEventsReceived.expose()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"pinnedMessagesReceived",{get:function(){return this.onPinnedMessagesReceived.expose()},enumerable:!1,configurable:!0}),e}();t.MessagingClient=l},1344:(e,t,n)=>{"use strict";e.exports=c;var r=n(7209);((c.prototype=Object.create(r.prototype)).constructor=c).className="Field";var o,i=n(5643),s=n(361),a=n(3262),l=/^required|optional|repeated$/;function c(e,t,n,o,i,c,u){if(a.isObject(o)?(u=i,c=o,o=i=void 0):a.isObject(i)&&(u=c,c=i,i=void 0),r.call(this,e,c),!a.isInteger(t)||t<0)throw TypeError("id must be a non-negative integer");if(!a.isString(n))throw TypeError("type must be a string");if(void 0!==o&&!l.test(o=o.toString().toLowerCase()))throw TypeError("rule must be a string rule");if(void 0!==i&&!a.isString(i))throw TypeError("extend must be a string");"proto3_optional"===o&&(o="optional"),this.rule=o&&"optional"!==o?o:void 0,this.type=n,this.id=t,this.extend=i||void 0,this.required="required"===o,this.optional=!this.required,this.repeated="repeated"===o,this.map=!1,this.message=null,this.partOf=null,this.typeDefault=null,this.defaultValue=null,this.long=!!a.Long&&void 0!==s.long[n],this.bytes="bytes"===n,this.resolvedType=null,this.extensionField=null,this.declaringField=null,this._packed=null,this.comment=u}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,n){return"packed"===e&&(this._packed=null),r.prototype.setOption.call(this,e,t,n)},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 o?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 i&&"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 i)||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 o&&(this.parent.ctor.prototype[this.name]=this.defaultValue),r.prototype.resolve.call(this)},c.d=function(e,t,n,r){return"function"==typeof t?t=a.decorateType(t).name:t&&"object"==typeof t&&(t=a.decorateEnum(t).name),function(o,i){a.decorateType(o.constructor).add(new c(i,e,t,n,{default:r}))}},c._configure=function(e){o=e}},1376:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MarkerTotal=void 0;t.MarkerTotal=function(e){this.name=e.name,this.count=e.count}},1446:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Marker=void 0;var r=n(4799);t.Marker=function(e){this.name=e.name,this.createdAt=new Date(Number(e.createdAt)),this.messageId=e.messageId.toString(),this.user=e.user&&new r.User(e.user)}},1447:(e,t)=>{"use strict";var n=t;n.length=function(e){for(var t=0,n=0,r=0;r191&&r<224?i[s++]=(31&r)<<6|63&e[t++]:r>239&&r<365?(r=((7&r)<<18|(63&e[t++])<<12|(63&e[t++])<<6|63&e[t++])-65536,i[s++]=55296+(r>>10),i[s++]=56320+(1023&r)):i[s++]=(15&r)<<12|(63&e[t++])<<6|63&e[t++],s>8191&&((o||(o=[])).push(String.fromCharCode.apply(String,i)),s=0);return o?(s&&o.push(String.fromCharCode.apply(String,i.slice(0,s))),o.join("")):String.fromCharCode.apply(String,i.slice(0,s))},n.write=function(e,t,n){for(var r,o,i=n,s=0;s>6|192,t[n++]=63&r|128):55296==(64512&r)&&56320==(64512&(o=e.charCodeAt(s+1)))?(r=65536+((1023&r)<<10)+(1023&o),++s,t[n++]=r>>18|240,t[n++]=r>>12&63|128,t[n++]=r>>6&63|128,t[n++]=63&r|128):(t[n++]=r>>12|224,t[n++]=r>>6&63|128,t[n++]=63&r|128);return n-i}},1457:(e,t,n)=>{"use strict";e.exports=s;var r=n(7209);((s.prototype=Object.create(r.prototype)).constructor=s).className="OneOf";var o=n(1344),i=n(3262);function s(e,t,n,o){if(Array.isArray(t)||(n=t,t=void 0),r.call(this,e,n),void 0!==t&&!Array.isArray(t))throw TypeError("fieldNames must be an Array");this.oneof=t||[],this.fieldsArray=[],this.comment=o}function a(e){if(e.parent)for(var t=0;t-1&&this.oneof.splice(t,1),e.partOf=null,this},s.prototype.onAdd=function(e){r.prototype.onAdd.call(this,e);for(var t=0;t{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LiteEvent=void 0;t.LiteEvent=function(){var e=this;this.handlers=[],this.on=function(t){e.handlers.push(t)},this.off=function(t){e.handlers=e.handlers.filter((function(e){return e!==t}))},this.trigger=function(t){e.handlers.slice(0).forEach((function(e){return e(t)}))},this.expose=function(){return e}}},1559:function(e,t,n){"use strict";var r=this&&this.__assign||function(){return r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0&&o[o.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]0&&(this.messageRetentionPeriod=e.autoDeletePeriod.toNumber()),this.metadata=e.metadata||"",this.avatarUrl=e.avatar||"",this.uri=e.uri||"",this.members=e.members.length?e.members:[],this.typeOverride=e.typeOverride?{discoverable:e.typeOverride.discoverable||{value:!1},allowJoin:e.typeOverride.allowJoin||{value:!1},distinct:e.typeOverride.distinct||{value:!1},defaultMembershipRole:e.typeOverride.defaultMembershipRole||"participant",roleOverrides:e.typeOverride.roleOverrides||{}}:void 0}return e.create=function(e,t){return o(this,void 0,void 0,(function(){return i(this,(function(n){return[2,(t||l.InternalChannelHandler.getInstance()).createChannel(r({},e))]}))}))},e.joinChannelByInviteKey=function(e,t){return o(this,void 0,void 0,(function(){return i(this,(function(n){return[2,(t||l.InternalChannelHandler.getInstance()).joinChannelByInviteUrl(e)]}))}))},e.getChannelByInviteKey=function(e,t){return o(this,void 0,void 0,(function(){return i(this,(function(n){return[2,(t||l.InternalChannelHandler.getInstance()).getChannelByInviteKey(e)]}))}))},e}();t.Channel=c},1592:function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function s(e){try{l(r.next(e))}catch(e){i(e)}}function a(e){try{l(r.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}l((r=r.apply(e,t||[])).next())}))},s=this&&this.__generator||function(e,t){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(a){return function(l){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,a[0]&&(s=0)),s;)try{if(n=1,r&&(o=2&a[0]?r.return:a[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,a[1])).done)return o;switch(r=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,r=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!((o=(o=s.trys).length>0&&o[o.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Reaction=void 0;var r=n(4799);t.Reaction=function(e){this.id=e.id.toString(),this.key=e.key,this.score=e.score,this.reason=e.reason,this.createdAt=new Date(Number(e.createdAt)),this.updatedAt=new Date(Number(e.updatedAt)),this.messageId=e.messageId.toString(),this.user=new r.User(e.user)}},1853:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function s(e){try{l(r.next(e))}catch(e){i(e)}}function a(e){try{l(r.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}l((r=r.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(a){return function(l){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,a[0]&&(s=0)),s;)try{if(n=1,r&&(o=2&a[0]?r.return:a[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,a[1])).done)return o;switch(r=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,r=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!((o=(o=s.trys).length>0&&o[o.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]{"use strict";function t(e){this.message=e}t.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},t.prototype.__CANCEL__=!0,e.exports=t},2012:(e,t,n)=>{"use strict";var r=n(9516),o=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];e.exports=function(e){var t,n,i,s={};return e?(r.forEach(e.split("\n"),(function(e){if(i=e.indexOf(":"),t=r.trim(e.substr(0,i)).toLowerCase(),n=r.trim(e.substr(i+1)),t){if(s[t]&&o.indexOf(t)>=0)return;s[t]="set-cookie"===t?(s[t]?s[t]:[]).concat([n]):s[t]?s[t]+", "+n:n}})),s):s}},2239:(e,t,n)=>{"use strict";e.exports=o;var r=n(3610);function o(e,t){this.lo=e>>>0,this.hi=t>>>0}var i=o.zero=new o(0,0);i.toNumber=function(){return 0},i.zzEncode=i.zzDecode=function(){return this},i.length=function(){return 1};var s=o.zeroHash="\0\0\0\0\0\0\0\0";o.fromNumber=function(e){if(0===e)return i;var t=e<0;t&&(e=-e);var n=e>>>0,r=(e-n)/4294967296>>>0;return t&&(r=~r>>>0,n=~n>>>0,++n>4294967295&&(n=0,++r>4294967295&&(r=0))),new o(n,r)},o.from=function(e){if("number"==typeof e)return o.fromNumber(e);if(r.isString(e)){if(!r.Long)return o.fromNumber(parseInt(e,10));e=r.Long.fromString(e)}return e.low||e.high?new o(e.low>>>0,e.high>>>0):i},o.prototype.toNumber=function(e){if(!e&&this.hi>>>31){var t=1+~this.lo>>>0,n=~this.hi>>>0;return t||(n=n+1>>>0),-(t+4294967296*n)}return this.lo+4294967296*this.hi},o.prototype.toLong=function(e){return r.Long?new r.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;o.fromHash=function(e){return e===s?i:new o((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)},o.prototype.toHash=function(){return String.fromCharCode(255&this.lo,this.lo>>>8&255,this.lo>>>16&255,this.lo>>>24,255&this.hi,this.hi>>>8&255,this.hi>>>16&255,this.hi>>>24)},o.prototype.zzEncode=function(){var e=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^e)>>>0,this.lo=(this.lo<<1^e)>>>0,this},o.prototype.zzDecode=function(){var e=-(1&this.lo);return this.lo=((this.lo>>>1|this.hi<<31)^e)>>>0,this.hi=(this.hi>>>1^e)>>>0,this},o.prototype.length=function(){var e=this.lo,t=(this.lo>>>28|this.hi<<4)>>>0,n=this.hi>>>24;return 0===n?0===t?e<16384?e<128?1:2:e<2097152?3:4:t<16384?t<128?5:6:t<2097152?7:8:n<128?9:10}},2273:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Attachment=void 0;t.Attachment=function(e){this.id=e.id,e.tid&&(this.tid=e.tid),this.messageId=e.messageId||"",this.size=e.fileSize||"0",this.name=e.name||"",this.type=e.type,this.metadata=e.metadata||"",this.url=e.url||"",this.createdAt=e.createdAt||null,this.upload=e.upload||!1,e.user&&(this.user=e.user)}},2274:function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function s(e){try{l(r.next(e))}catch(e){i(e)}}function a(e){try{l(r.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}l((r=r.apply(e,t||[])).next())}))},s=this&&this.__generator||function(e,t){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(a){return function(l){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,a[0]&&(s=0)),s;)try{if(n=1,r&&(o=2&a[0]?r.return:a[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,a[1])).done)return o;switch(r=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,r=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!((o=(o=s.trys).length>0&&o[o.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]{e.exports=n(8015)},2549:(e,t,n)=>{"use strict";e.exports=n(9100)},2551:(e,t,n)=>{"use strict";e.exports=o;var r=n(3610);function o(e){if(e)for(var t=Object.keys(e),n=0;n0&&o[o.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]l._setting.uploadSizeLimit)throw new a.SceytChatError(a.clientErrors.TOO_LARGE_MESSAGE.message,a.clientErrors.TOO_LARGE_MESSAGE.code);var r=new FormData;r.append("files",e.data),l.authHandler.httpClient.uploadFile(r,l.authHandler.jwt,e.progress).then((function(e){t(e.data.url)})).catch((function(e){n(new a.SceytChatError(e.response))}))}))},this.channelReport=function(e,t,n,r){var o={channel_id:t,report:e,description:n,messages:r};return new Promise((function(e,t){l.authHandler.httpClient.channelReport(o,l.authHandler.jwt).then((function(t){e(t.data)})).catch((function(e){t(new a.SceytChatError(e.response?e.response.data.message:e,e.response?e.response.data.code:null))}))}))},this.messageReport=function(e,t,n,r){var o={channel_id:t,messages:n,report:e,description:r};return new Promise((function(e,t){l.authHandler.httpClient.messageReport(o,l.authHandler.jwt).then((function(t){e(t.data)})).catch((function(e){t(new a.SceytChatError(e.response?e.response.data.message:e,e.response?e.response.data.code:null))}))}))},this.userReport=function(e,t,n,r){var o={user_id:t,messages:n,report:e,description:r};return new Promise((function(e,t){l.authHandler.httpClient.userReport(o,l.authHandler.jwt).then((function(t){e(t.data)})).catch((function(e){t(new a.SceytChatError(e.response?e.response.data.message:e,e.response?e.response.data.code:null))}))}))},this.mute=function(e){return r(l,void 0,void 0,(function(){var t,n;return o(this,(function(r){switch(r.label){case 0:return t={mute_till:e,mute:!0},[4,this.authHandler.httpClient.mute(t,this._accessToken)];case 1:return n=r.sent().data,this._setting.muted=!0,this._setting.muteExpireDate=n.mute_till?new Date(Date.now()+n.mute_till):null,[2,this.settings]}}))}))},this.unmute=function(){return r(l,void 0,void 0,(function(){var e;return o(this,(function(t){switch(t.label){case 0:return e={mute_till:0,mute:!1},[4,this.authHandler.httpClient.mute(e,this._accessToken)];case 1:return t.sent(),this._setting.muted=!1,this._setting.muteExpireDate=null,[2,this.settings]}}))}))},this.updateSettings=function(e){return r(l,void 0,void 0,(function(){var t,n;return o(this,(function(r){switch(r.label){case 0:return t={},e.mute&&(t.muted=e.mute.muted,t.muted_till=e.mute.duration),e.uploadSizeLimit&&(t.upload_size_limit=e.uploadSizeLimit),e.presence&&(e.presence.status&&(t.presence_status=e.presence.status),e.presence.state&&(t.presence_state=e.presence.state)),e.privacySettings&&e.privacySettings.forEach((function(e){e.lastActiveAt&&(t.privacy_last_active_at=e.lastActiveAt),e.presenceState&&(t.privacy_presence_state=e.presenceState),e.presenceStatus&&(t.privacy_presence_status=e.presenceStatus),e.profilePhoto&&(t.privacy_profile_photo=e.profilePhoto),e.addToChannels&&(t.privacy_add_to_channels=e.addToChannels),e.forwardMessages&&(t.privacy_forward_messages=e.forwardMessages),e.readReceipts&&(t.privacy_read_receipts=e.readReceipts)})),[4,this.authHandler.httpClient.setSettings(t,this._accessToken)];case 1:return n=r.sent().data,s.default.info("updateSettings: ",n),[2]}}))}))},this.getAllContacts=function(){return new Promise((function(e,t){l.authHandler.httpClient.getContacts(l.authHandler.jwt).then((function(t){return r(l,void 0,void 0,(function(){var n,r,i,s=this;return o(this,(function(o){switch(o.label){case 0:return n=new Uint8Array(t.data),[4,a.PB.decodeContacts(n)];case 1:return(r=o.sent()).contacts&&r.contacts.length>0&&(i=r.contacts.map((function(e){return s.createContactInstance(e)})),e(i)),e([]),[2]}}))}))})).catch((function(e){t(new a.SceytChatError(e.response?e.response.data.message:e,e.response?e.response.data.code:null))}))}))},this.addContactDiscoveries=function(e){return new Promise((function(t,n){l.authHandler.httpClient.addContactDiscoveries(e,l.authHandler.jwt).then((function(e){return r(l,void 0,void 0,(function(){var n,r,i,s=this;return o(this,(function(o){switch(o.label){case 0:return n=new Uint8Array(e.data),[4,a.PB.decodeDiscoveries(n)];case 1:return(r=o.sent()).contacts&&r.contacts.length>0&&(i=r.contacts.map((function(e){return s.createContactInstance(e)})),t(i)),t([]),[2]}}))}))})).catch((function(e){n(new a.SceytChatError(e.response?e.response.data.message:e,e.response?e.response.data.code:null))}))}))},this.deleteAllContactDiscoveries=function(){return new Promise((function(e,t){l.authHandler.httpClient.deleteAllContactDiscoveries(l.authHandler.jwt).then((function(){e("")})).catch((function(e){t(new a.SceytChatError(e.response?e.response.data.message:e,e.response?e.response.data.code:null))}))}))},this.createContactInstance=function(e){return new a.Contact(e)},this.getRoles=function(){return r(l,void 0,void 0,(function(){return o(this,(function(e){switch(e.label){case 0:return[4,this.internalChannelHandler.getRoles()];case 1:return[2,e.sent().roles.map((function(e){return new a.Role(e)}))]}}))}))},this.getUsers=function(e){return l.internalUserHandler.getUsers(e)},this.getChannel=function(e,t){return void 0===t&&(t=!1),l.internalChannelHandler.getAndCreateChannelById(e,t)},this.setProfile=function(e){return l.internalUserHandler.updateUser(e)},this.blockUsers=function(e){return l.internalUserHandler.blockUsers(e)},this.unblockUsers=function(e){return l.internalUserHandler.unblockUsers(e)},this.sendDirectMessage=function(e,t){return l.internalChannelHandler.sendDirectMessage(e,t)},this.sendSignal=function(e,t){return l.internalUserHandler.sendSignal(e,t)},this.sendCallDetailsRecord=function(e){return l.internalUserHandler.sendCallDetailsRecord(e)},this.updatePrivacySettingsExclusions=function(e,t){return l.internalUserHandler.updatePrivacySettingsExclusions(e,t)},this.updatePrivacySettingsInclusions=function(e,t){return l.internalUserHandler.updatePrivacySettingsInclusions(e,t)},this.deletePrivacySettingsExclusions=function(e,t){return l.internalUserHandler.deletePrivacySettingsExclusions(e,t)},this.deletePrivacySettingsInclusions=function(e,t){return l.internalUserHandler.deletePrivacySettingsInclusions(e,t)},this.resetPrivacySettingsInclusions=function(e){return l.internalUserHandler.resetPrivacySettingsInclusions(e)},this.resetPrivacySettingsExclusions=function(e){return l.internalUserHandler.resetPrivacySettingsExclusions(e)},this._retryInterval=function(){var e=Math.min(500+2e3*l.consecutiveFailures,25e3),t=Math.min(Math.max(250,2e3*(l.consecutiveFailures-1)),25e3);return Math.floor(Math.random()*(e-t)+t)},this.onlineStatusChanged=function(e){s.default.info("Network connection: ",e.type),"offline"===e.type?(l.authHandler.setAuthStateIsDisconnected(),l.socketClient.connectionState===a.SOCKET_STATE.CLOSED&&l._connectionState===a.CLIENT_STATE.DISCONNECTED||l.closeSocket("NO_NETWORK")):"online"===e.type&&l._shouldReconnect&&l._reconnect(10),l.networkConnectStatus=e.type},this._listenForConnectionChanges=function(){"undefined"!=typeof window&&null!=window&&null!=window.addEventListener&&(window.addEventListener("offline",l.onlineStatusChanged),window.addEventListener("online",l.onlineStatusChanged))},s.default.info("Client is created with id: ",n),this._apiUrl=e,this.consecutiveFailures=0,this.networkConnectStatus="",this._connectionState=a.CLIENT_STATE.DISCONNECTED,this._appId=t,this._clientId=n,this._user=new a.User,this.socketClient=new a.SocketClient,this.authHandler=new a.AuthHandler(e,t,n,i,this.socketClient),this.messagingClient=new a.MessagingClient(this.socketClient,this.authHandler),this.internalChannelHandler=new a.InternalChannelHandler(this.authHandler,this.messagingClient,this.channelListeners,this._user),this.internalUserHandler=new a.InternalUserHandler(this.authHandler,this.messagingClient,this._user),this.socketClient.tokenWillExpire.on(this.handleTokenWillExpire),this.messagingClient.signalReceived.on(this.handleSignalReceived),this.socketClient.onClientDisconnected.on(this.clientDisconnected),this.authHandler.tokenExpired.on(this.handleTokenExpired),this.socketClient.tokenExpired.on(this.handleTokenExpired),this._listenForConnectionChanges(),this._requestTimeout=i,this._shouldReconnect=!0,s.default.setLevel("silent")}return Object.defineProperty(e.prototype,"ConnectionListener",{get:function(){return a.ConnectionListener},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"ChannelListener",{get:function(){return a.ChannelListener},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"apiUrl",{get:function(){return this._apiUrl},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"requestTimeout",{get:function(){return this._requestTimeout},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"appId",{get:function(){return this._appId},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"clientId",{get:function(){return this._clientId},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"user",{get:function(){return this._user},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"settings",{get:function(){return this._setting},set:function(e){this._setting.muted=e.muted,this._setting.muteExpireDate=e.muteExpireDate,this._setting.uploadSizeLimit=e.uploadSizeLimit},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"authState",{get:function(){return a.AuthState[this.authHandler.getAuthState]},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"connectionState",{get:function(){var e=a.CLIENT_STATE[this._connectionState];return a.CONNECTION_STATE[e]},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"accessToken",{get:function(){return this._accessToken},set:function(e){this._accessToken=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"enableAutoSendMessageStatusDelivered",{get:function(){return this._enableAutoSendMessageStatusDelivered},set:function(e){this._enableAutoSendMessageStatusDelivered=e,this.internalChannelHandler.autoSendMessageStatusDelivered=e},enumerable:!1,configurable:!0}),e.prototype._reconnect=function(e){return r(this,void 0,void 0,(function(){var t;return o(this,(function(n){switch(n.label){case 0:return e||(e=this._retryInterval()),[4,(0,a.sleep)(e)];case 1:return n.sent(),this.clearReconnectInterval(),this.authHandler.authSuccess.on(this.handleAuthSuccess),this.authHandler.authFailed.on(this.handleAuthFailed),t=this.socketClient.expDate-Date.now(),s.default.info("ConnectionStatus: Reconnecting","client id:",this.clientId),this._connectionState=a.CLIENT_STATE.RECONNECTING,this.triggerConnectionHandlerEvent(a.CONNECTION_EVENT_TYPES.onConnectionStateChanged,a.CONNECTION_STATE.RECONNECTING),t<=0?this.handleTokenExpired():this.socketClient.reconnect(),clearTimeout(this.socketClient.pingTimeout),this.consecutiveFailures+=1,[2]}}))}))},Object.defineProperty(e.prototype,"Channel",{get:function(){return a.Channel},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"ChannelListQueryBuilder",{get:function(){return a.ChannelListQueryBuilder},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"MemberListQueryBuilder",{get:function(){return a.MemberListQueryBuilder},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"BlockedMemberListQueryBuilder",{get:function(){return a.BlockedMemberListQueryBuilder},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"MessageListQueryBuilder",{get:function(){return a.MessageListQueryBuilder},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"MessageListSearchQueryBuilder",{get:function(){return a.MessageListSearchQueryBuilder},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"PollVotesQueryBuilder",{get:function(){return a.PollVotesQueryBuilder},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"AttachmentListQueryBuilder",{get:function(){return a.AttachmentListQueryBuilder},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"MessageLinkOGQueryBuilder",{get:function(){return a.MessageLinkOGQueryBuilder},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"MessageListByTypeQueryBuilder",{get:function(){return a.MessageListByTypeQueryBuilder},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"MessageMarkerListQueryBuilder",{get:function(){return a.MessageMarkerListQueryBuilder},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"ReactionListQueryBuilder",{get:function(){return a.ReactionListQueryBuilder},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"MentionsListQueryBuilder",{get:function(){return l.MentionsListQueryBuilder},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"UserListQueryBuilder",{get:function(){return a.UserListQueryBuilder},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"BlockedUserListQueryBuilder",{get:function(){return a.BlockedUserListQueryBuilder},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"BlockedChannelListQuery",{get:function(){return a.BlockedChannelListQueryBuilder},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"HiddenChannelListQueryBuilder",{get:function(){return a.HiddenChannelListQueryBuilder},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"PrivacySettingsQueryBuilder",{get:function(){return a.PrivacySettingsQueryBuilder},enumerable:!1,configurable:!0}),e}();t.SceytChat=c},2656:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MemberBuilder=void 0;var r=n(842);t.MemberBuilder=function(e){var t=this;this.setRole=function(e){return t.role=e||"participant",t},this.create=function(){return new r.Member({role:t.role,user:{id:t.id}})},this.id=e,this.role="participant"}},2685:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function s(e){try{l(r.next(e))}catch(e){i(e)}}function a(e){try{l(r.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}l((r=r.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(a){return function(l){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,a[0]&&(s=0)),s;)try{if(n=1,r&&(o=2&a[0]?r.return:a[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,a[1])).done)return o;switch(r=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,r=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!((o=(o=s.trys).length>0&&o[o.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]0,[2,{hiddenChannels:a,hasNext:this.hasNext}];case 2:return[2,{hiddenChannels:[],hasNext:this.hasNext}];case 3:return[3,5];case 4:throw new i.SceytChatError(i.clientErrors.QUERY_IN_PROGRESS.message,i.clientErrors.QUERY_IN_PROGRESS.code);case 5:return[2]}}))}))},this.count=e.count}return Object.defineProperty(e.prototype,"limit",{get:function(){return this.count},set:function(e){this.count=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"offset",{get:function(){return this.index},enumerable:!1,configurable:!0}),e}();t.HiddenChannelListQuery=s},2712:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BodyAttribute=void 0;t.BodyAttribute=function(e){this.type=e.type,this.metadata=e.metadata,this.offset=e.offset||0,this.length=e.length}},2814:function(e,t,n){"use strict";var r=this&&this.__assign||function(){return r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0&&o[o.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]1e8){if(r=!0,a.completion(a,new u.SceytChatError(u.clientErrors.TOO_LARGE_MESSAGE.message,u.clientErrors.TOO_LARGE_MESSAGE.code)),n++,t.length===n)throw new u.SceytChatError(u.clientErrors.TOO_LARGE_MESSAGE.message,u.clientErrors.TOO_LARGE_MESSAGE.code);return null}var c=p.createFormData(a.url,e);p.authHandler.httpClient.uploadFile(c,p.authHandler.jwt,a.progress).then((function(e){n++,l.default.info("File upload completed");var c={name:a.name,type:a.type,meta:a.metadata,size:a.url.size,data:e.data.url,tid:a.tid,upload:!1},d=new u.Attachment({id:"",tid:a.tid,name:a.name,type:a.type,metadata:a.metadata||"",fileSize:a.url.size,url:e.data.url,upload:!1});if(o.push(c),a.completion(d,null),n===t.length)return r&&s(new u.SceytChatError(u.clientErrors.TOO_LARGE_MESSAGE.message,u.clientErrors.TOO_LARGE_MESSAGE.code)),i(o)})).catch((function(e){var t=new u.SceytChatError(e.response?e.response.data.message:u.clientErrors.UNKNOWN_ERROR.message,e.response?e.response.data.code:u.clientErrors.UNKNOWN_ERROR.code);a.completion?a.completion(a,t):l.default.error("error in upload file",e.message)}))}))}))},this.sendMessageHandler=function(e,t){return o(p,void 0,void 0,(function(){var n,r,o,a;return i(this,(function(i){switch(i.label){case 0:return t.attachments&&t.attachments.length?(n=[],r=[],t.attachments.map((function(e){e.upload?r.push(e):n.push({name:e.name,type:e.type,meta:e.metadata,size:e.size,data:e.url,tid:e.tid})})),o=n,r.length?[4,this.uploadAttachment(e,r)]:[3,2]):[3,3];case 1:a=i.sent(),o=s(s([],n,!0),a,!0),i.label=2;case 2:return t.attachments=o,[2,this.sendMessage(e,t)];case 3:return[2,this.sendMessage(e,t)]}}))}))},this.sendMessage=function(e,t){var n=p.getChannelFullId(e);p.resetChannelUnreadCount(e);var o=p.formatMembers(t.requestedMentionUserIds),i=p.formatMessageProperties(t),s=p.messagingClient.createMessageId();return new Promise((function(a,l){var c=u.PB.create(u.BMP.Message,{message:r({cid:s,tid:t.tid,to:n,text:t.body,attachments:t.attachments,assignedReadCount:t.displayCount,bodyAttributes:t.bodyAttributes,disableMentionsCount:t.disableMentionsCount,mentions:o,metadata:t.metadata,date:t.createdAt,type:t.type,properties:i,forwardingDetails:{messageId:t.forwardingDetails&&t.forwardingDetails.messageId}},t.pollDetails&&{pollDetails:t.pollDetails}),parent:t.parentMessageId?{id:t.parentMessageId}:null});p.messagingClient.send(s,c,(function(n,o){if(n)return l(new u.SceytChatError(o.message,o.code,o.type,o.traceId));var i=o,s=i.message;if(s.createdAt=new Date(Number(s.createdAt)),s.text=s.text||t.body,s.type=s.type||t.type,s.metadata=s.metadata||t.metadata,s.silent=s.silent||t.silent,s.viewOnce=s.viewOnce||t.viewOnce,s.assignedReadCount=s.assignedReadCount||t.displayCount,s.chStatus!==u.MessageUpdateStatus.moderated&&(s.bodyAttributes=t.bodyAttributes),s.from=p.user,s.attachments&&s.attachments.length)if(t.attachments&&t.attachments.length){var c={};t.attachments.forEach((function(e){c[e.data]=e})),s.attachments=s.attachments.map((function(e){return r(r({},c[e.data]),{createdAt:e.createdAt,messageId:s.id,id:e.id,userId:s.from.id})}))}else s.attachments=s.attachments.map((function(e){return r(r({},e),{messageId:s.id,userId:s.from.id})}));var d=p.createMessageInstance({message:s,parent:i.parent,replyInThread:i.replyInThread});d.user=p.user,p.setChannelLastMessage(e,d),p.updateChannelLastReadAdnDelivery(e,s.id,!0),a(d)}))}))},this.sendDirectMessage=function(e,t){var n=p.formatMembers(e.requestedMentionUserIds);e.transient=!0;var o=p.formatMessageProperties(e);return new Promise((function(i,s){var a=u.PB.create(u.BMP.Message,{message:r({tid:e.tid,to:t,text:e.body,attachments:e.attachments,assignedReadCount:e.displayCount,disableMentionsCount:e.disableMentionsCount,mentions:n,metadata:e.metadata,date:e.createdAt,type:e.type,properties:o,forwardingDetails:{messageId:e.forwardingDetails&&e.forwardingDetails.messageId}},e.pollDetails&&{pollDetails:e.pollDetails}),parent:e.parentMessage?{id:e.parentMessage.id}:null,direct:!0});p.messagingClient.send(e.tid,a,(function(e,t){if(e)return s(new u.SceytChatError(t.message,t.code,t.type,t.traceId));var n=t,r=n.message;r.createdAt=new Date(Number(r.createdAt));var o=p.createMessageInstance({message:r,parent:n.parent,replyInThread:n.replyInThread});o.user=p.user,i(o)}))}))},this.markMessageAsDelivered=function(e,t){var n=p.getChannelFullId(e),r=(0,u.createTid)(),o=t.map((function(e){return c.default.fromString(e)}));return new Promise((function(t,i){var s=u.PB.create(u.BMP.MessageMarkerStatus,{ids:o,marker:"received",channelId:n,tid:r});p.messagingClient.send(r,s,(function(n,r){if(n)return i(new u.SceytChatError(r.message,r.code,r.type,r.traceId));var o=r,s=o.ids,a=o.from,l=o.time,c=o.channelId,d=s.map((function(e){return e.toNumber()})),f=Math.max(s),h=s[d.indexOf(f)];a.id!==p.user.id&&p.updateChannelLastMessage(e,{deliveryStatus:"received"}),p.updateChannelLastReadAdnDelivery(e,h,!1);var y=new u.MessageListMarker({channelId:c,from:a,marker:"received",ids:s,time:l});t(y)}),u.BMP.MessageMarkerStatus)}))},this.markMessageAsOpened=function(e,t){var n=p.getChannelFullId(e),r=(0,u.createTid)();return new Promise((function(o,i){var s=u.PB.create(u.BMP.MessageMarkerStatus,{ids:t,marker:u.MESSAGE_MARKER_NAME.OPENED,channelId:n,tid:r});p.messagingClient.send(r,s,(function(t,n){if(t)return i(new u.SceytChatError(n.message,n.code,n.type,n.traceId));var r=n,s=r.ids,a=r.from,l=r.time,c=r.channelId,d=s.map((function(e){return e.toNumber()})),f=Math.max(s),h=s[d.indexOf(f)];a.id!==p.user.id&&p.updateChannelLastMessage(e,{deliveryStatus:u.MESSAGE_MARKER_NAME.OPENED}),p.updateChannelLastReadAdnDelivery(e,h,!1);var y=new u.MessageListMarker({channelId:c,from:a,marker:u.MESSAGE_MARKER_NAME.OPENED,ids:s,time:l});o(y)}),u.BMP.MessageMarkerStatus)}))},this.markVoiceMessageAsPlayed=function(e,t){var n=p.getChannelFullId(e),r=(0,u.createTid)(),o=t.map((function(e){return c.default.fromString(e)}));return new Promise((function(t,i){var s=u.PB.create(u.BMP.MessageMarkerStatus,{ids:o,marker:u.MESSAGE_MARKER_NAME.PLAYED,channelId:n,tid:r});p.messagingClient.send(r,s,(function(n,r){if(n)return i(new u.SceytChatError(r.message,r.code,r.type,r.traceId));var o=r,s=o.ids,a=o.from,l=o.time,c=o.channelId,d=s.map((function(e){return e.toNumber()})),f=Math.max(s),h=s[d.indexOf(f)];a.id!==p.user.id&&p.updateChannelLastMessage(e,{deliveryStatus:u.MESSAGE_MARKER_NAME.PLAYED}),p.updateChannelLastReadAdnDelivery(e,h,!1);var y=new u.MessageListMarker({channelId:c,from:a,marker:u.MESSAGE_MARKER_NAME.PLAYED,ids:s,time:l});t(y)}),u.BMP.MessageMarkerStatus)}))},this.markMessageAsRead=function(e,t){var n=p.getChannelFullId(e),r=(0,u.createTid)();return new Promise((function(o,i){var s=u.PB.create(u.BMP.MessageMarkerStatus,{ids:t,marker:u.MESSAGE_MARKER_NAME.DISPLAYED,channelId:n,tid:r});p.messagingClient.send(r,s,(function(t,n){if(t)return i(new u.SceytChatError(n.message,n.code,n.type,n.traceId));var r=n,s=r.ids,a=r.from,l=r.time,c=r.channelId,d=s.map((function(e){return e.toNumber()})),f=Math.max.apply(Math,d),h=s[d.indexOf(f)];a.id!==p.user.id&&p.updateChannelLastMessage(e,{deliveryStatus:u.MESSAGE_MARKER_NAME.DISPLAYED}),p.updateChannelLastReadAdnDelivery(e,h,!0);var y=new u.MessageListMarker({channelId:c,from:a,marker:u.MESSAGE_MARKER_NAME.DISPLAYED,ids:s,time:l});o(y)}),u.BMP.MessageMarkerStatus)}))},this.messageMarkersQuery=function(e){var t=(0,u.createTid)(),n=c.default.fromString(e.messageId);return new Promise((function(r,o){var i=u.PB.create(u.BMP.MessageMarkerQuery,{id:t,messageId:n,marker:e.marker,limit:e.count,nextToken:e.nextToken});p.messagingClient.send(t,i,(function(e,t){if(e)return o(new u.SceytChatError(t.message,t.code,t.type,t.traceId));r(t)}),u.BMP.MessageMarkerQuery)}))},this.markChannelAs=function(e,t){var n=p.getChannelFullId(e);return new Promise((function(r,o){var i=p.messagingClient.createMessageId(),s=u.PB.create(u.BMP.ChannelQuery,{id:i,to:n,type:t?u.ChannelQueryType.MARK_AS_READ:u.ChannelQueryType.MARK_AS_UNREAD});p.messagingClient.send(i,s,(function(t,n){if(t)return o(new u.SceytChatError(n.message,n.code,n.type,n.traceId));var i=p.updateChannelProperties(e,n.channels.list[0]);r(i)}),u.BMP.MessageMarkerStatus)}))},this.muteChannel=function(e,t){var n=p.getChannelFullId(e);return new Promise((function(r,o){var i=p.messagingClient.createMessageId(),s=u.PB.create(u.BMP.ChannelQuery,{id:i,channels:{list:[{id:n,muteTill:t}]},type:u.ChannelQueryType.MUTE_CHANNELS});p.messagingClient.send(i,s,(function(t,n){if(t)return o(new u.SceytChatError(n.message,n.code,n.type,n.traceId));var i=p.updateChannelProperties(e,n.channel);r(i)}))}))},this.unmuteChannel=function(e){var t=p.getChannelFullId(e);return new Promise((function(n,r){var o=p.messagingClient.createMessageId(),i=u.PB.create(u.BMP.ChannelQuery,{id:o,channels:{list:[{id:t}]},type:u.ChannelQueryType.UNMUTE_CHANNELS});p.messagingClient.send(o,i,(function(t,o){if(t)return r(new u.SceytChatError(o.message,o.code,o.type,o.traceId));var i=p.updateChannelProperties(e,o.channel);n(i)}))}))},this.freezeChannel=function(e,t){var n=p.getChannelFullId(e);return new Promise((function(r,o){var i=p.messagingClient.createMessageId(),s=u.PB.create(u.BMP.ChannelQuery,{id:i,channels:{list:[{id:n,frozenTill:t}]},type:u.ChannelQueryType.FREEZE_CHANNEL});p.messagingClient.send(i,s,(function(t,n){if(t)return o(new u.SceytChatError(n.message,n.code,n.type,n.traceId));var i=p.updateChannelProperties(e,n.channel);r(i)}))}))},this.unfreezeChannel=function(e){var t=p.getChannelFullId(e);return new Promise((function(n,r){var o=p.messagingClient.createMessageId(),i=u.PB.create(u.BMP.ChannelQuery,{id:o,channels:{list:[{id:t}]},type:u.ChannelQueryType.UNFREEZE_CHANNEL});p.messagingClient.send(o,i,(function(t,o){if(t)return r(new u.SceytChatError(o.message,o.code,o.type,o.traceId));var i=p.updateChannelProperties(e,o.channel);n(i)}))}))},this.setMessageRetentionPeriod=function(e,t){var n=p.getChannelFullId(e);return new Promise((function(r,o){var i=p.messagingClient.createMessageId(),s=u.PB.create(u.BMP.ChannelQuery,{id:i,to:n,messageAutoDeletePeriod:t,type:u.ChannelQueryType.UPDATE});p.messagingClient.send(i,s,(function(t,n){if(t)return o(new u.SceytChatError(n.message,n.code,n.type,n.traceId));var i=p.updateChannelProperties(e,n.channel);r(i)}))}))},this.getTotalUnreads=function(){return{totalUnread:p.totalUnreadMessageCount,unreadChannels:p.totalUnreadChannelCount}},this.loadMessages=function(e){var t=e.channelId,n=p.getChannelFullId(t);return new Promise((function(t,r){var o=p.messagingClient.createMessageId(),i=u.PB.create(u.BMP.MessageQuery,{id:o,channelId:n,event:u.MessageEventType.Search,search:{count:e.count,timestamp:e.timestamp,msgId:e.msgId,direction:u.MessageQueryDirection[e.direction],type:e.messageType}});p.messagingClient.send(o,i,(function(e,n){if(e)return r(new u.SceytChatError(n.message,n.code,n.type,n.traceId));t(n)}))}))},this.getUnreadMentionedMessages=function(e){var t=e.channelId,n=p.getChannelFullId(t);return new Promise((function(t,r){var o=p.messagingClient.createMessageId(),i=u.PB.create(u.BMP.MessageQuery,{id:o,channelId:n,event:u.MessageEventType.Unread_mentions,search:{count:e.count,direction:e.direction}});p.messagingClient.send(o,i,(function(e,n){if(e)return r(new u.SceytChatError(n.message,n.code,n.type,n.traceId));t(n)}))}))},this.loadMessagesById=function(e,t){var n=p.getChannelFullId(e),r=t.map((function(e){return c.default.fromString(e)}));return new Promise((function(e,t){var o=p.messagingClient.createMessageId(),i=u.PB.create(u.BMP.MessageQuery,{id:o,channelId:n,event:u.MessageEventType.Get_messages_by_ids,messageIds:{list:r}});p.messagingClient.send(o,i,(function(n,r){if(n)return t(new u.SceytChatError(r.message,r.code,r.type,r.traceId));var o=r.messages.list.map((function(e){return p.createMessageInstance(e)}));e(o)}))}))},this.getAttachments=function(e){var t=e.channelId,n=p.getChannelFullId(t);return new Promise((function(t,r){var o=p.messagingClient.createMessageId(),i=u.PB.create(u.BMP.ChannelQuery,{id:o,type:u.ChannelQueryType.ATTACHMENTS,attachments:{channelId:n,search:{count:e.count,timestamp:e.timestamp,attachmentId:e.attachmentId,direction:u.MessageQueryDirection[e.direction],types:e.attachmentTypes}}});p.messagingClient.send(o,i,(function(e,n){if(e)return r(new u.SceytChatError(n.message,n.code,n.type,n.traceId));t(n)}))}))},this.getReactions=function(e,t){return new Promise((function(n,r){var o=p.messagingClient.createMessageId(),i=u.PB.create(u.BMP.ReactionSearchQuery,{id:o,messageId:e.messageId,nextToken:e.nextToken||"",limit:e.count,reactionKey:e.reactionKey,reactionId:t});p.messagingClient.send(o,i,(function(e,t){if(e)return r(new u.SceytChatError(t.message,t.code,t.type,t.traceId));var o=t.hasNext,i=t.list,s=t.nextToken,a=i.map((function(e){return new u.Reaction(e)}));n({reactions:a,hasNext:o,nextToken:s})}))}))},this.pinMessages=function(e,t,n,r){return p.requestPinnedMessages({channelId:e,messageIds:t,pinType:n,pinTill:r||0,type:u.PinnedMessageOperation.PIN},!0)},this.unpinMessages=function(e,t,n){return p.requestPinnedMessages({channelId:e,messageIds:t,pinType:n,type:u.PinnedMessageOperation.UNPIN},!0)},this.getPinnedMessages=function(e){return p.requestPinnedMessages(r(r({},e),{count:Math.max(1,Math.min(20,e.count||20)),type:u.PinnedMessageOperation.GET_LIST}),!1)},this.requestPinnedMessages=function(e,t){return new Promise((function(n,r){var s=p.messagingClient.createMessageId(),a=u.PB.create(u.BMP.PinnedMessagesQuery,{id:s,channelId:p.getChannelFullId(e.channelId),type:e.type,messageIds:e.messageIds||[],pinType:e.pinType,pinTill:e.pinTill||0,count:e.count||20,order:e.order,nextToken:e.nextToken||""});p.messagingClient.send(s,a,(function(e,s){return o(p,void 0,void 0,(function(){var o,a;return i(this,(function(i){switch(i.label){case 0:if(e)return[2,r(new u.SceytChatError(s.message,s.code,s.type,s.traceId))];i.label=1;case 1:return i.trys.push([1,3,,4]),[4,this.handlePinnedMessages(s)];case 2:return o=i.sent(),t||o.operation===u.PinnedMessageOperation.GET_LIST?(n(o),[3,4]):[2,n(o)];case 3:return a=i.sent(),r(a),[3,4];case 4:return[2]}}))}))}),u.BMP.PinnedMessagesQuery)}))},this.formatPollDetails=function(e){var t,n,o,i,s;return r(r({},e),{createdAt:e.createdAt instanceof c.default?e.createdAt.toNumber():e.createdAt,updatedAt:e.updatedAt instanceof c.default?e.updatedAt.toNumber():e.updatedAt,closedAt:e.closedAt instanceof c.default?e.closedAt.toNumber():e.closedAt,voteDetails:{votesPerOption:(null===(t=e.voteDetails)||void 0===t?void 0:t.votesPerOption)||{},votes:p.formatPollVotes((null===(n=e.voteDetails)||void 0===n?void 0:n.votes)||[]),ownVotes:p.formatPollVotes((null===(o=e.voteDetails)||void 0===o?void 0:o.ownVotes)||[])},changedVotes:{addedVotes:p.formatPollVotes((null===(i=e.changedVotes)||void 0===i?void 0:i.addedVotes)||[]),removedVotes:p.formatPollVotes((null===(s=e.changedVotes)||void 0===s?void 0:s.removedVotes)||[])}})},this.formatPollVotes=function(e){return e.map((function(e){return{optionId:e.optionId,createdAt:e.createdAt instanceof c.default?e.createdAt.toNumber():e.createdAt,user:e.user}}))},this.getPollVotes=function(e){return new Promise((function(t,n){var r=p.messagingClient.createMessageId(),o=u.PB.create(u.BMP.PollVotesRequest,{id:r,messageId:e.messageId,pollId:e.pollId,optionId:e.optionId||"",limit:e.count,nextToken:e.nextToken||""});p.messagingClient.send(r,o,(function(e,r){if(e)return n(new u.SceytChatError(r.message,r.code,r.type,r.traceId));var o=r,i=o.votes,s=o.nextToken,a=!!s;t({votes:p.formatPollVotes(i||[]),hasNext:a,nextToken:s||""})}))}))},this.startTyping=function(e){try{var t=p.getChannelFullId(e),n=p.messagingClient.createMessageId(),r=u.PB.create(u.BMP.ChannelEvent,{id:n,channelId:t,name:"start_typing",from:{id:p.user.id}});p.messagingClient.send(n,r)}catch(e){l.default.error("error in start typing",e)}},this.stopTyping=function(e){try{var t=p.getChannelFullId(e),n=p.messagingClient.createMessageId(),r=u.PB.create(u.BMP.ChannelEvent,{id:n,channelId:t,name:"stop_typing",from:{id:p.user.id}});p.messagingClient.send(n,r)}catch(e){l.default.error("error in stop typing",e)}},this.startRecording=function(e){var t=p.getChannelFullId(e),n=p.messagingClient.createMessageId(),r=u.PB.create(u.BMP.ChannelEvent,{id:n,channelId:t,name:"start_recording",from:{id:p.user.id}});p.messagingClient.send(n,r)},this.stopRecording=function(e){var t=p.getChannelFullId(e),n=p.messagingClient.createMessageId(),r=u.PB.create(u.BMP.ChannelEvent,{id:n,channelId:t,name:"stop_recording",from:{id:p.user.id}});p.messagingClient.send(n,r)},this.sendEvent=function(e,t){var n=p.getChannelFullId(e),r=p.messagingClient.createMessageId();try{var o=u.PB.create(u.BMP.ChannelEvent,{id:r,channelId:n,name:t,from:{id:p.user.id}});p.messagingClient.send(r,o)}catch(e){l.default.error("error in send channel event",e)}},this.resetChannelUnreadCount=function(e){p.channelsMap[e]&&(p.channelsMap[e].instance.newMessageCount>0&&(p.totalUnreadChannelCount-=1,p.channelsMap[e].instance.newMessageCount-=1),p.totalUnreadMessageCount-=p.channelsMap[e].instance.newMessageCount,p.channelsMap[e].instance.newMessageCount=0)},this.incrementChannelUnreadCount=function(e){p.channelsMap[e]&&(0===p.channelsMap[e].instance.newMessageCount&&(p.totalUnreadChannelCount+=1),p.totalUnreadMessageCount+=1,p.triggerChannelHandlerEvent("onTotalUnreadCountUpdated",p.totalUnreadChannelCount,p.totalUnreadMessageCount),p.channelsMap[e].instance.newMessageCount+=1)},this.incrementChannelUnreadMentionCount=function(e){return p.channelsMap[e]&&(p.channelsMap[e].instance.newMentionCount+=1)},this.setChannelLastMessage=function(e,t){return p.channelsMap[e]&&(p.channelsMap[e].instance.lastMessage=t)},this.updateChannelLastMessage=function(e,t){if(t){var n=p.channelsMap[e].instance.lastMessage;n&&(p.channelsMap[e].instance.lastMessage=r(r({},n),t))}else p.channelsMap[e].instance.lastMessage=null},this.updateChannelPeerStatus=function(e){Object.keys(p.channelsMap).forEach((function(t){var n=p.channelsMap[t].instance;n.members&&n.members.length&&(n.members=n.members.map((function(t){return e[t.id]?r(r({},t),{presence:e[t.id].presence}):t})))}))},this.updateChannelLastReadAdnDelivery=function(e,t,n){var r=p.channelsMap[e].instance;n?((!r.lastDisplayedMessageId||c.default.fromString(r.lastDisplayedMessageId)0&&(a=n.bodyAttributes.map((function(e){return new u.BodyAttribute(e)})));var l=p.formatMessageProperties(n,!0),c=l.transient,d=l.silent,f=l.viewOnce,h=s&&s.id!==p.user.id,y=s?s instanceof u.User?s:new u.User(s):null,g=n.mentions&&n.mentions.length?n.mentions.map((function(e){return new u.User(e.user)})):[];return new u.Message({message:r(r({channelId:n.to,attachments:n.attachments,from:y,metadata:n.metadata,text:n.text,type:n.type,date:new Date(Number(n.createdAt)),updatedAt:n.updatedAt&&n.updatedAt.toNumber()?new Date(Number(n.updatedAt)):null,autoDeleteAt:n.autoDeleteAt,id:n.id,tid:n.tid,markers:n.markers,selfMarkers:n.selfMarkers,userMarkers:n.userMarkers,chStatus:n.chStatus,status:n.status,reaction:n.reaction,bodyAttributes:a,replyCount:n.replyCount?n.replyCount.toNumber():null,forwardingDetails:e.message.forwardingDetails,assignedReadCount:n.assignedReadCount,silent:d,transient:c,mentions:g,isIncoming:h,disableMentionsCount:null==n?void 0:n.disableMentionsCount,viewOnce:f},e.message.pollDetails&&{pollDetails:p.formatPollDetails(e.message.pollDetails)}),e.message.pinDetails&&{pinDetails:e.message.pinDetails}),parent:o,replyInThread:i})},this.handleMessageStatus=function(e){return o(p,void 0,void 0,(function(){var t,n,o,s,a,l=this;return i(this,(function(i){switch(i.label){case 0:return t=e.channelId,n=e.marker,o="onReceivedMessageListMarker",s=new u.MessageListMarker(e),this.channelsMap[t]?[3,2]:[4,this.getAndCreateChannelById(t)];case 1:i.sent(),i.label=2;case 2:return this.triggerChannelHandlerEvent(o,e.channelId,s),"received"!==n&&"displayed"!==n||(a=this.channelsMap[t].instance,e.ids.forEach((function(e){a.lastMessage&&a.lastMessage.id===e.toString()&&l.updateChannelLastMessage(t,r(r({},a.lastMessage),{deliveryStatus:n}))}))),[2]}}))}))},this.handleMessageAction=function(e){return o(p,void 0,void 0,(function(){var t,n,r,o,s,a,c,d,p,f,h,y,g,m,b,v,O,w,I;return i(this,(function(i){switch(i.label){case 0:return t=e.messages,n=e.event,r=e.from,o=t[0],s=o.message.to,a=n===u.MessageEventType.Add_reaction?"onReactionAdded":n===u.MessageEventType.Delete_reaction?"onReactionDeleted":o.message.chStatus===u.MessageUpdateStatus.edited?"onMessageEdited":n===u.MessageEventType.Change_vote&&(null===(b=null===(m=null===(g=null===(y=o.message)||void 0===y?void 0:y.pollDetails)||void 0===g?void 0:g.changedVotes)||void 0===m?void 0:m.addedVotes)||void 0===b?void 0:b.length)?"onPollAdded":n===u.MessageEventType.Retract_vote?"onPollRetracted":n===u.MessageEventType.Change_vote&&(null===(I=null===(w=null===(O=null===(v=o.message)||void 0===v?void 0:v.pollDetails)||void 0===O?void 0:O.changedVotes)||void 0===w?void 0:w.removedVotes)||void 0===I?void 0:I.length)?"onPollDeleted":n===u.MessageEventType.Close_poll?"onPollClosed":"onMessageDeleted",this.channelsMap[s]?[3,2]:[4,this.getAndCreateChannelById(s)];case 1:i.sent(),i.label=2;case 2:return c=this.channelsMap[s].instance,d=this.createMessageInstance(o),this.isChannelLastMessage(s,d.id)&&this.updateChannelLastMessage(s,d),"onPollAdded"===a||"onPollRetracted"===a||"onPollDeleted"===a||"onPollClosed"===a?(h=new u.User(r),p=this.formatPollDetails(null==d?void 0:d.pollDetails),this.triggerChannelHandlerEvent(a,c,p,null==d?void 0:d.id)):"onReactionAdded"===a||"onReactionDeleted"===a?(r.id=this.clearUserId(r.id),h=new u.User(r),l.default.info("handle message : event type .. ",a,"user... ",this.user,"receivedMessage: ",o,"message: ",d,"channel: ",c),(f=o.message.reaction.reactionObjs[0]&&new u.Reaction(o.message.reaction.reactionObjs[0]))&&("onReactionAdded"===a?d.user&&d.user.id===this.user.id&&(c.newReactions=[f]):c.newReactions&&c.newReactions[0]&&c.newReactions[0].id===f.id&&(c.newReactions=[]),this.triggerChannelHandlerEvent(a,c,h,d,f))):(r.id=this.clearUserId(r.id),h=new u.User(r),this.triggerChannelHandlerEvent(a,c,h,d)),[2]}}))}))},this.handleUnreadCount=function(e){return o(p,void 0,void 0,(function(){var t,n,r,o,s,a,l;return i(this,(function(i){switch(i.label){case 0:return t=e.unreadCount,n=t.channelUnreadCount,r=t.channelUnreadMentions,o=t.channelUnreadReactions,s=e.from,a="onTotalUnreadCountUpdated",this.channelsMap[s]?[3,2]:[4,this.getAndCreateChannelById(s)];case 1:i.sent(),i.label=2;case 2:return 0===(l=this.channelsMap[s].instance).newMessageCount&&n>0?this.totalUnreadChannelCount+=1:l.newMessageCount>0&&0===n&&(this.totalUnreadChannelCount-=1),this.totalUnreadMessageCount+=n-l.newMessageCount,l.newMessageCount=n||0,l.newMentionCount=r||0,l.newReactedMessageCount=o||0,this.triggerChannelHandlerEvent(a,this.totalUnreadChannelCount,this.totalUnreadMessageCount,l,n,r,o),[2]}}))}))},this.setChannelReference=function(e,t){p.channelsMap[e]=t},this.removeChannelReference=function(e){delete p.channelsMap[e]},this.addMembersToChannelInstance=function(e,t,n,r,o){void 0===o&&(o=!1);var i=p.createMembersList(t),s=p.channelsMap[e].instance;return o?{addedMembers:i,instance:s}:Array.isArray(i)&&i.length>0?(s.memberCount=r,s.updatedAt=new Date(n),{addedMembers:i,instance:s}):{addedMembers:[],instance:s}},this.removeMembersFromChannelInstance=function(e,t,n,r,o){var i;void 0===o&&(o=!1);var s=p.createMembersList(t),a=p.channelsMap[e].instance;return o?{removedMembers:s,instance:a}:Array.isArray(s)&&s.length>0?(a.memberCount=r,a.updatedAt=new Date(n),a.members=null===(i=a.members)||void 0===i?void 0:i.filter((function(e){return!s.some((function(t){return t.id===e.id}))})),{removedMembers:s,instance:a}):{removedMembers:s,instance:a}},this.formatMembers=function(e){return Array.isArray(e)?"object"==typeof e[0]?e.map((function(e){return{role:e.role&&e.role.toLowerCase(),user:{id:e.id}}})):e.map((function(e){return{user:{id:e}}})):[]},this.createMembersList=function(e){return e.map((function(e){return new u.Member({role:e.role,user:e.user})}))},this.clearUserId=function(e){return e},this.getChannelFullId=function(e){return e},this.updateChannelProperties=function(e,t,n){var r;if(void 0===n&&(n=!1),n)return p.channelsMap[e];var o=p.channelsMap[e].instance;o.metadata=t.metadata,o.muted=t.muted;var i=t.muteTill&&t.muteTill.toNumber();o.mutedTill=i?new Date(Date.now()+i):null,o.frozen=t.frozen;var s=t.frozenTill&&t.frozenTill.toNumber();o.frozenTill=s?new Date(s):null,t.conv&&(o.unread=t.conv.channelUnread||!1,o.newMessageCount=t.conv.unread||0,o.newMentionCount=t.conv.unreadMentions?t.conv.unreadMentions.toNumber():0,o.lastDisplayedMessageId=t.conv.localDspld?t.conv.localDspld.toString():""),o.updatedAt=new Date(t.updatedAt),o.avatarUrl=""===t.avatar?"":t.avatar||o.avatarUrl,o.subject=t.subject||o.subject,o.uri=t.uri||o.uri,o.typeOverride=t.typeOverride||o.typeOverride;for(var a=0,l=["allowJoin","discoverable","distinct"];a-1;--i)o.push(r[i]);return o}return r},this.formatReceivedMessages=function(e,t){var n=[];if(t)for(var r=e.length-1;r>-1;--r)n.push(p.createMessageInstance(e[r]));else for(var o=0,i=e;o0&&(this.totalUnreadChannelCount+=1);return this.triggerChannelHandlerEvent("onTotalUnreadCountUpdated",this.totalUnreadChannelCount,this.totalUnreadMessageCount),r},e}();t.InternalChannelHandler=d},2881:(e,t,n)=>{"use strict";var r=n(9516),o=n(6987);e.exports=function(e,t,n){var i=this||o;return r.forEach(n,(function(n){e=n.call(i,e,t)})),e}},2934:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function s(e){try{l(r.next(e))}catch(e){i(e)}}function a(e){try{l(r.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}l((r=r.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(a){return function(l){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,a[0]&&(s=0)),s;)try{if(n=1,r&&(o=2&a[0]?r.return:a[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,a[1])).done)return o;switch(r=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,r=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!((o=(o=s.trys).length>0&&o[o.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MessageMarker=void 0;t.MessageMarker=function(e){this.messageId=e.msgId.toString(),this.user=e.user,this.name=e.name,this.createdAt=new Date(e.createdAt)}},2969:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function s(e){try{l(r.next(e))}catch(e){i(e)}}function a(e){try{l(r.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}l((r=r.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(a){return function(l){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,a[0]&&(s=0)),s;)try{if(n=1,r&&(o=2&a[0]?r.return:a[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,a[1])).done)return o;switch(r=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,r=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!((o=(o=s.trys).length>0&&o[o.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]0,[2,{blockedChannels:s,hasNext:this.hasNext}];case 3:return[2,{blockedChannels:[],hasNest:this.hasNext}];case 4:return[3,6];case 5:throw new i.SceytChatError(i.clientErrors.QUERY_IN_PROGRESS.message,i.clientErrors.QUERY_IN_PROGRESS.code);case 6:return[2]}}))}))},this.count=e.count}return Object.defineProperty(e.prototype,"limit",{get:function(){return this.count},set:function(e){this.count=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"offset",{get:function(){return this.index},enumerable:!1,configurable:!0}),e}();t.BlockedChannelListQuery=s},3018:function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function s(e){try{l(r.next(e))}catch(e){i(e)}}function a(e){try{l(r.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}l((r=r.apply(e,t||[])).next())}))},s=this&&this.__generator||function(e,t){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(a){return function(l){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,a[0]&&(s=0)),s;)try{if(n=1,r&&(o=2&a[0]?r.return:a[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,a[1])).done)return o;switch(r=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,r=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!((o=(o=s.trys).length>0&&o[o.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]=0&&t<=d.levels.SILENT)return t;throw new TypeError("log.setLevel() called with invalid level: "+e)}"string"==typeof e?p+=":"+e:"symbol"==typeof e&&(p=void 0),d.name=e,d.levels={TRACE:0,DEBUG:1,INFO:2,WARN:3,ERROR:4,SILENT:5},d.methodFactory=n||u,d.getLevel=function(){return null!=c?c:null!=a?a:s},d.setLevel=function(e,n){return c=h(e),!1!==n&&function(e){var n=(r[e]||"silent").toUpperCase();if(typeof window!==t&&p){try{return void(window.localStorage[p]=n)}catch(e){}try{window.document.cookie=encodeURIComponent(p)+"="+n+";"}catch(e){}}}(c),l.call(d)},d.setDefaultLevel=function(e){a=h(e),f()||d.setLevel(e,!1)},d.resetLevel=function(){c=null,function(){if(typeof window!==t&&p){try{window.localStorage.removeItem(p)}catch(e){}try{window.document.cookie=encodeURIComponent(p)+"=; expires=Thu, 01 Jan 1970 00:00:00 UTC"}catch(e){}}}(),l.call(d)},d.enableAll=function(e){d.setLevel(d.levels.TRACE,e)},d.disableAll=function(e){d.setLevel(d.levels.SILENT,e)},d.rebuild=function(){if(i!==d&&(s=h(i.getLevel())),l.call(d),i===d)for(var e in o)o[e].rebuild()},s=h(i?i.getLevel():"WARN");var y=f();null!=y&&(c=h(y)),l.call(d)}(i=new d).getLogger=function(e){if("symbol"!=typeof e&&"string"!=typeof e||""===e)throw new TypeError("You must supply a name when creating a logger.");var t=o[e];return t||(t=o[e]=new d(e,i.methodFactory)),t};var p=typeof window!==t?window.log:void 0;return i.noConflict=function(){return typeof window!==t&&window.log===i&&(window.log=p),i},i.getLoggers=function(){return o},i.default=i,i},void 0===(o=r.call(t,n,t,e))||(e.exports=o)}()},3158:(e,t,n)=>{"use strict";e.exports=i;var r=n(6237);(i.prototype=Object.create(r.prototype)).constructor=i;var o=n(3610);function i(e){r.call(this,e)}i._configure=function(){o.Buffer&&(i.prototype._slice=o.Buffer.prototype.slice)},i.prototype.string=function(){var e=this.uint32();return this.buf.utf8Slice?this.buf.utf8Slice(this.pos,this.pos=Math.min(this.pos+e,this.len)):this.buf.toString("utf-8",this.pos,this.pos=Math.min(this.pos+e,this.len))},i._configure()},3191:(e,t,n)=>{"use strict";var r=n(1928);function o(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise((function(e){t=e}));var n=this;e((function(e){n.reason||(n.reason=new r(e),t(n.reason))}))}o.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},o.source=function(){var e;return{token:new o((function(t){e=t})),cancel:e}},e.exports=o},3240:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function s(e){try{l(r.next(e))}catch(e){i(e)}}function a(e){try{l(r.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}l((r=r.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(a){return function(l){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,a[0]&&(s=0)),s;)try{if(n=1,r&&(o=2&a[0]?r.return:a[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,a[1])).done)return o;switch(r=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,r=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!((o=(o=s.trys).length>0&&o[o.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]{"use strict";var r,o,i=e.exports=n(3610),s=n(4529);i.codegen=n(8561),i.fetch=n(5212),i.path=n(9207),i.fs=i.inquire("fs"),i.toArray=function(e){if(e){for(var t=Object.keys(e),n=new Array(t.length),r=0;r0)t[o]=e(t[o]||{},n,r);else{var i=t[o];i&&(r=[].concat(i).concat(r)),t[o]=r}return t}(e,t=t.split("."),n)},Object.defineProperty(i,"decorateRoot",{get:function(){return s.decorated||(s.decorated=new(n(5330)))}})},3449:(e,t,n)=>{"use strict";e.exports=d;var r,o=n(3610),i=o.LongBits,s=o.base64,a=o.utf8;function l(e,t,n){this.fn=e,this.len=t,this.next=void 0,this.val=n}function c(){}function u(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 l(c,0,0),this.tail=this.head,this.states=null}var p=function(){return o.Buffer?function(){return(d.create=function(){return new r})()}:function(){return new d}};function f(e,t,n){t[n]=255&e}function h(e,t){this.len=e,this.next=void 0,this.val=t}function y(e,t,n){for(;e.hi;)t[n++]=127&e.lo|128,e.lo=(e.lo>>>7|e.hi<<25)>>>0,e.hi>>>=7;for(;e.lo>127;)t[n++]=127&e.lo|128,e.lo=e.lo>>>7;t[n++]=e.lo}function g(e,t,n){t[n]=255&e,t[n+1]=e>>>8&255,t[n+2]=e>>>16&255,t[n+3]=e>>>24}d.create=p(),d.alloc=function(e){return new o.Array(e)},o.Array!==Array&&(d.alloc=o.pool(d.alloc,o.Array.prototype.subarray)),d.prototype._push=function(e,t,n){return this.tail=this.tail.next=new l(e,t,n),this.len+=t,this},h.prototype=Object.create(l.prototype),h.prototype.fn=function(e,t,n){for(;e>127;)t[n++]=127&e|128,e>>>=7;t[n]=e},d.prototype.uint32=function(e){return this.len+=(this.tail=this.tail.next=new h((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(y,10,i.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=i.from(e);return this._push(y,t.length(),t)},d.prototype.int64=d.prototype.uint64,d.prototype.sint64=function(e){var t=i.from(e).zzEncode();return this._push(y,t.length(),t)},d.prototype.bool=function(e){return this._push(f,1,e?1:0)},d.prototype.fixed32=function(e){return this._push(g,4,e>>>0)},d.prototype.sfixed32=d.prototype.fixed32,d.prototype.fixed64=function(e){var t=i.from(e);return this._push(g,4,t.lo)._push(g,4,t.hi)},d.prototype.sfixed64=d.prototype.fixed64,d.prototype.float=function(e){return this._push(o.float.writeFloatLE,4,e)},d.prototype.double=function(e){return this._push(o.float.writeDoubleLE,8,e)};var m=o.Array.prototype.set?function(e,t,n){t.set(e,n)}:function(e,t,n){for(var r=0;r>>0;if(!t)return this._push(f,1,0);if(o.isString(e)){var n=d.alloc(t=s.length(e));s.decode(e,n,0),e=n}return this.uint32(t)._push(m,t,e)},d.prototype.string=function(e){var t=a.length(e);return t?this.uint32(t)._push(a.write,t,e):this._push(f,1,0)},d.prototype.fork=function(){return this.states=new u(this),this.head=this.tail=new l(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 l(c,0,0),this.len=0),this},d.prototype.ldelim=function(){var e=this.head,t=this.tail,n=this.len;return this.reset().uint32(n),n&&(this.tail.next=e.next,this.tail=t,this.len+=n),this},d.prototype.finish=function(){for(var e=this.head.next,t=this.constructor.alloc(this.len),n=0;e;)e.fn(e.val,t,n),n+=e.len,e=e.next;return t},d._configure=function(e){r=e,d.create=p(),r._configure()}},3471:(e,t,n)=>{"use strict";var r=n(9516);function o(){this.handlers=[]}o.prototype.use=function(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1},o.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},o.prototype.forEach=function(e){r.forEach(this.handlers,(function(t){null!==t&&e(t)}))},e.exports=o},3478:function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function s(e){try{l(r.next(e))}catch(e){i(e)}}function a(e){try{l(r.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}l((r=r.apply(e,t||[])).next())}))},s=this&&this.__generator||function(e,t){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(a){return function(l){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,a[0]&&(s=0)),s;)try{if(n=1,r&&(o=2&a[0]?r.return:a[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,a[1])).done)return o;switch(r=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,r=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!((o=(o=s.trys).length>0&&o[o.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]0)},r.Buffer=function(){try{var e=r.inquire("buffer").Buffer;return e.prototype.utf8Write?e:null}catch(e){return null}}(),r._Buffer_from=null,r._Buffer_allocUnsafe=null,r.newBuffer=function(e){return"number"==typeof e?r.Buffer?r._Buffer_allocUnsafe(e):new r.Array(e):r.Buffer?r._Buffer_from(e):"undefined"==typeof Uint8Array?e:new Uint8Array(e)},r.Array="undefined"!=typeof Uint8Array?Uint8Array:Array,r.Long=r.global.dcodeIO&&r.global.dcodeIO.Long||r.global.Long||r.inquire("long"),r.key2Re=/^true|false|0|1$/,r.key32Re=/^-?(?:0|[1-9][0-9]*)$/,r.key64Re=/^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/,r.longToHash=function(e){return e?r.LongBits.from(e).toHash():r.LongBits.zeroHash},r.longFromHash=function(e,t){var n=r.LongBits.fromHash(e);return r.Long?r.Long.fromBits(n.lo,n.hi,t):n.toNumber(Boolean(t))},r.merge=o,r.lcFirst=function(e){return e.charAt(0).toLowerCase()+e.substring(1)},r.newError=i,r.ProtocolError=i("ProtocolError"),r.oneOfGetter=function(e){for(var t={},n=0;n-1;--n)if(1===t[e[n]]&&void 0!==this[e[n]]&&null!==this[e[n]])return e[n]}},r.oneOfSetter=function(e){return function(t){for(var n=0;n{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Role=void 0;t.Role=function(e){this.name=e.name||"",this.permissions=e.permissions&&e.permissions.map((function(e){return e.name}))||[],this.priority=e.priority}},3862:(e,t,n)=>{"use strict";var r,o,i,s,a,l=n(6946),c=l.Reader,u=l.Writer,d=l.util,p=l.roots.default||(l.roots.default={});p.bin_proto=((i={}).Auth=function(){function e(e){if(e)for(var t=Object.keys(e),n=0;n>>3){case 1:r.username=e.string();break;case 2:r.jwt=e.string();break;case 3:r.domain=e.string();break;case 4:r.resource=e.string();break;case 5:r.presence=e.int32();break;default:e.skipType(7&o)}}return r},e.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},e.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.username&&e.hasOwnProperty("username")&&!d.isString(e.username)?"username: string expected":null!=e.jwt&&e.hasOwnProperty("jwt")&&!d.isString(e.jwt)?"jwt: string expected":null!=e.domain&&e.hasOwnProperty("domain")&&!d.isString(e.domain)?"domain: string expected":null!=e.resource&&e.hasOwnProperty("resource")&&!d.isString(e.resource)?"resource: string expected":null!=e.presence&&e.hasOwnProperty("presence")&&!d.isInteger(e.presence)?"presence: integer expected":null},e.fromObject=function(e){if(e instanceof p.bin_proto.Auth)return e;var t=new p.bin_proto.Auth;return null!=e.username&&(t.username=String(e.username)),null!=e.jwt&&(t.jwt=String(e.jwt)),null!=e.domain&&(t.domain=String(e.domain)),null!=e.resource&&(t.resource=String(e.resource)),null!=e.presence&&(t.presence=0|e.presence),t},e.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.username="",n.jwt="",n.domain="",n.resource="",n.presence=0),null!=e.username&&e.hasOwnProperty("username")&&(n.username=e.username),null!=e.jwt&&e.hasOwnProperty("jwt")&&(n.jwt=e.jwt),null!=e.domain&&e.hasOwnProperty("domain")&&(n.domain=e.domain),null!=e.resource&&e.hasOwnProperty("resource")&&(n.resource=e.resource),null!=e.presence&&e.hasOwnProperty("presence")&&(n.presence=e.presence),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,l.util.toJSONOptions)},e}(),i.AuthResult=function(){function e(e){if(e)for(var t=Object.keys(e),n=0;n>>3){case 1:r.code=e.int32();break;case 2:r.msg=e.string();break;case 3:r.user=p.bin_proto.User.decode(e,e.uint32());break;case 4:r.expireTime=e.int64();break;case 5:r.serverTime=e.int64();break;case 6:r.settings=p.bin_proto.Settings.decode(e,e.uint32());break;default:e.skipType(7&o)}}return r},e.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},e.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.code&&e.hasOwnProperty("code")&&!d.isInteger(e.code)?"code: integer expected":null!=e.msg&&e.hasOwnProperty("msg")&&!d.isString(e.msg)?"msg: string expected":null!=e.user&&e.hasOwnProperty("user")&&(t=p.bin_proto.User.verify(e.user))?"user."+t:null!=e.expireTime&&e.hasOwnProperty("expireTime")&&!(d.isInteger(e.expireTime)||e.expireTime&&d.isInteger(e.expireTime.low)&&d.isInteger(e.expireTime.high))?"expireTime: integer|Long expected":null!=e.serverTime&&e.hasOwnProperty("serverTime")&&!(d.isInteger(e.serverTime)||e.serverTime&&d.isInteger(e.serverTime.low)&&d.isInteger(e.serverTime.high))?"serverTime: integer|Long expected":null!=e.settings&&e.hasOwnProperty("settings")&&(t=p.bin_proto.Settings.verify(e.settings))?"settings."+t:null;var t},e.fromObject=function(e){if(e instanceof p.bin_proto.AuthResult)return e;var t=new p.bin_proto.AuthResult;if(null!=e.code&&(t.code=0|e.code),null!=e.msg&&(t.msg=String(e.msg)),null!=e.user){if("object"!=typeof e.user)throw TypeError(".bin_proto.AuthResult.user: object expected");t.user=p.bin_proto.User.fromObject(e.user)}if(null!=e.expireTime&&(d.Long?(t.expireTime=d.Long.fromValue(e.expireTime)).unsigned=!1:"string"==typeof e.expireTime?t.expireTime=parseInt(e.expireTime,10):"number"==typeof e.expireTime?t.expireTime=e.expireTime:"object"==typeof e.expireTime&&(t.expireTime=new d.LongBits(e.expireTime.low>>>0,e.expireTime.high>>>0).toNumber())),null!=e.serverTime&&(d.Long?(t.serverTime=d.Long.fromValue(e.serverTime)).unsigned=!1:"string"==typeof e.serverTime?t.serverTime=parseInt(e.serverTime,10):"number"==typeof e.serverTime?t.serverTime=e.serverTime:"object"==typeof e.serverTime&&(t.serverTime=new d.LongBits(e.serverTime.low>>>0,e.serverTime.high>>>0).toNumber())),null!=e.settings){if("object"!=typeof e.settings)throw TypeError(".bin_proto.AuthResult.settings: object expected");t.settings=p.bin_proto.Settings.fromObject(e.settings)}return t},e.toObject=function(e,t){t||(t={});var n={};if(t.defaults){if(n.code=0,n.msg="",n.user=null,d.Long){var r=new d.Long(0,0,!1);n.expireTime=t.longs===String?r.toString():t.longs===Number?r.toNumber():r}else n.expireTime=t.longs===String?"0":0;d.Long?(r=new d.Long(0,0,!1),n.serverTime=t.longs===String?r.toString():t.longs===Number?r.toNumber():r):n.serverTime=t.longs===String?"0":0,n.settings=null}return null!=e.code&&e.hasOwnProperty("code")&&(n.code=e.code),null!=e.msg&&e.hasOwnProperty("msg")&&(n.msg=e.msg),null!=e.user&&e.hasOwnProperty("user")&&(n.user=p.bin_proto.User.toObject(e.user,t)),null!=e.expireTime&&e.hasOwnProperty("expireTime")&&("number"==typeof e.expireTime?n.expireTime=t.longs===String?String(e.expireTime):e.expireTime:n.expireTime=t.longs===String?d.Long.prototype.toString.call(e.expireTime):t.longs===Number?new d.LongBits(e.expireTime.low>>>0,e.expireTime.high>>>0).toNumber():e.expireTime),null!=e.serverTime&&e.hasOwnProperty("serverTime")&&("number"==typeof e.serverTime?n.serverTime=t.longs===String?String(e.serverTime):e.serverTime:n.serverTime=t.longs===String?d.Long.prototype.toString.call(e.serverTime):t.longs===Number?new d.LongBits(e.serverTime.low>>>0,e.serverTime.high>>>0).toNumber():e.serverTime),null!=e.settings&&e.hasOwnProperty("settings")&&(n.settings=p.bin_proto.Settings.toObject(e.settings,t)),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,l.util.toJSONOptions)},e}(),i.Settings=function(){function e(e){if(this.privacySettings={},e)for(var t=Object.keys(e),n=0;n>>3){case 1:o.muted=e.bool();break;case 2:o.muteTill=e.int64();break;case 3:e.skip().pos++,o.privacySettings===d.emptyObject&&(o.privacySettings={}),n=e.string(),e.pos++,o.privacySettings[n]=e.string();break;case 4:o.maxPacketSize=e.int32();break;default:e.skipType(7&i)}}return o},e.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.muted&&e.hasOwnProperty("muted")&&"boolean"!=typeof e.muted)return"muted: boolean expected";if(null!=e.muteTill&&e.hasOwnProperty("muteTill")&&!(d.isInteger(e.muteTill)||e.muteTill&&d.isInteger(e.muteTill.low)&&d.isInteger(e.muteTill.high)))return"muteTill: integer|Long expected";if(null!=e.privacySettings&&e.hasOwnProperty("privacySettings")){if(!d.isObject(e.privacySettings))return"privacySettings: object expected";for(var t=Object.keys(e.privacySettings),n=0;n>>0,e.muteTill.high>>>0).toNumber())),e.privacySettings){if("object"!=typeof e.privacySettings)throw TypeError(".bin_proto.Settings.privacySettings: object expected");t.privacySettings={};for(var n=Object.keys(e.privacySettings),r=0;r>>0,e.muteTill.high>>>0).toNumber():e.muteTill),e.privacySettings&&(n=Object.keys(e.privacySettings)).length){r.privacySettings={};for(var i=0;i>>3){case 1:o.firstName=e.string();break;case 2:o.lastName=e.string();break;case 7:o.username=e.string();break;case 3:o.avatar=e.string();break;case 4:o.metadata=e.string();break;case 8:e.skip().pos++,o.metadataMap===d.emptyObject&&(o.metadataMap={}),n=e.string(),e.pos++,o.metadataMap[n]=e.string();break;case 5:o.createdAt=e.int64();break;case 6:o.updatedAt=e.int64();break;default:e.skipType(7&i)}}return o},e.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.firstName&&e.hasOwnProperty("firstName")&&!d.isString(e.firstName))return"firstName: string expected";if(null!=e.lastName&&e.hasOwnProperty("lastName")&&!d.isString(e.lastName))return"lastName: string expected";if(null!=e.username&&e.hasOwnProperty("username")&&!d.isString(e.username))return"username: string expected";if(null!=e.avatar&&e.hasOwnProperty("avatar")&&!d.isString(e.avatar))return"avatar: string expected";if(null!=e.metadata&&e.hasOwnProperty("metadata")&&!d.isString(e.metadata))return"metadata: string expected";if(null!=e.metadataMap&&e.hasOwnProperty("metadataMap")){if(!d.isObject(e.metadataMap))return"metadataMap: object expected";for(var t=Object.keys(e.metadataMap),n=0;n>>0,e.createdAt.high>>>0).toNumber())),null!=e.updatedAt&&(d.Long?(t.updatedAt=d.Long.fromValue(e.updatedAt)).unsigned=!1:"string"==typeof e.updatedAt?t.updatedAt=parseInt(e.updatedAt,10):"number"==typeof e.updatedAt?t.updatedAt=e.updatedAt:"object"==typeof e.updatedAt&&(t.updatedAt=new d.LongBits(e.updatedAt.low>>>0,e.updatedAt.high>>>0).toNumber())),t},e.toObject=function(e,t){t||(t={});var n,r={};if((t.objects||t.defaults)&&(r.metadataMap={}),t.defaults){if(r.firstName="",r.lastName="",r.avatar="",r.metadata="",d.Long){var o=new d.Long(0,0,!1);r.createdAt=t.longs===String?o.toString():t.longs===Number?o.toNumber():o}else r.createdAt=t.longs===String?"0":0;d.Long?(o=new d.Long(0,0,!1),r.updatedAt=t.longs===String?o.toString():t.longs===Number?o.toNumber():o):r.updatedAt=t.longs===String?"0":0,r.username=""}if(null!=e.firstName&&e.hasOwnProperty("firstName")&&(r.firstName=e.firstName),null!=e.lastName&&e.hasOwnProperty("lastName")&&(r.lastName=e.lastName),null!=e.avatar&&e.hasOwnProperty("avatar")&&(r.avatar=e.avatar),null!=e.metadata&&e.hasOwnProperty("metadata")&&(r.metadata=e.metadata),null!=e.createdAt&&e.hasOwnProperty("createdAt")&&("number"==typeof e.createdAt?r.createdAt=t.longs===String?String(e.createdAt):e.createdAt:r.createdAt=t.longs===String?d.Long.prototype.toString.call(e.createdAt):t.longs===Number?new d.LongBits(e.createdAt.low>>>0,e.createdAt.high>>>0).toNumber():e.createdAt),null!=e.updatedAt&&e.hasOwnProperty("updatedAt")&&("number"==typeof e.updatedAt?r.updatedAt=t.longs===String?String(e.updatedAt):e.updatedAt:r.updatedAt=t.longs===String?d.Long.prototype.toString.call(e.updatedAt):t.longs===Number?new d.LongBits(e.updatedAt.low>>>0,e.updatedAt.high>>>0).toNumber():e.updatedAt),null!=e.username&&e.hasOwnProperty("username")&&(r.username=e.username),e.metadataMap&&(n=Object.keys(e.metadataMap)).length){r.metadataMap={};for(var i=0;i>>3){case 1:r.state=e.int32();break;case 2:r.status=e.string();break;case 3:r.lastActiveAt=e.int64();break;default:e.skipType(7&o)}}return r},e.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.state&&e.hasOwnProperty("state"))switch(e.state){default:return"state: enum value expected";case 0:case 1:case 2:case 3:case 4:}return null!=e.status&&e.hasOwnProperty("status")&&!d.isString(e.status)?"status: string expected":null!=e.lastActiveAt&&e.hasOwnProperty("lastActiveAt")&&!(d.isInteger(e.lastActiveAt)||e.lastActiveAt&&d.isInteger(e.lastActiveAt.low)&&d.isInteger(e.lastActiveAt.high))?"lastActiveAt: integer|Long expected":null},e.fromObject=function(e){if(e instanceof p.bin_proto.Presence)return e;var t=new p.bin_proto.Presence;switch(e.state){case"OFFLINE":case 0:t.state=0;break;case"ONLINE":case 1:t.state=1;break;case"INVISIBLE":case 2:t.state=2;break;case"AWAY":case 3:t.state=3;break;case"DND":case 4:t.state=4}return null!=e.status&&(t.status=String(e.status)),null!=e.lastActiveAt&&(d.Long?(t.lastActiveAt=d.Long.fromValue(e.lastActiveAt)).unsigned=!1:"string"==typeof e.lastActiveAt?t.lastActiveAt=parseInt(e.lastActiveAt,10):"number"==typeof e.lastActiveAt?t.lastActiveAt=e.lastActiveAt:"object"==typeof e.lastActiveAt&&(t.lastActiveAt=new d.LongBits(e.lastActiveAt.low>>>0,e.lastActiveAt.high>>>0).toNumber())),t},e.toObject=function(e,t){t||(t={});var n={};if(t.defaults)if(n.state=t.enums===String?"OFFLINE":0,n.status="",d.Long){var r=new d.Long(0,0,!1);n.lastActiveAt=t.longs===String?r.toString():t.longs===Number?r.toNumber():r}else n.lastActiveAt=t.longs===String?"0":0;return null!=e.state&&e.hasOwnProperty("state")&&(n.state=t.enums===String?p.bin_proto.PresenceState[e.state]:e.state),null!=e.status&&e.hasOwnProperty("status")&&(n.status=e.status),null!=e.lastActiveAt&&e.hasOwnProperty("lastActiveAt")&&("number"==typeof e.lastActiveAt?n.lastActiveAt=t.longs===String?String(e.lastActiveAt):e.lastActiveAt:n.lastActiveAt=t.longs===String?d.Long.prototype.toString.call(e.lastActiveAt):t.longs===Number?new d.LongBits(e.lastActiveAt.low>>>0,e.lastActiveAt.high>>>0).toNumber():e.lastActiveAt),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,l.util.toJSONOptions)},e}(),i.User=function(){function e(e){if(e)for(var t=Object.keys(e),n=0;n>>3){case 1:r.id=e.string();break;case 2:r.profile=p.bin_proto.UserProfile.decode(e,e.uint32());break;case 3:r.presence=p.bin_proto.Presence.decode(e,e.uint32());break;case 4:r.blocked=e.bool();break;case 5:r.status=e.int32();break;case 7:r.isBot=e.bool();break;default:e.skipType(7&o)}}return r},e.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.id&&e.hasOwnProperty("id")&&!d.isString(e.id))return"id: string expected";var t;if(null!=e.profile&&e.hasOwnProperty("profile")&&(t=p.bin_proto.UserProfile.verify(e.profile)))return"profile."+t;if(null!=e.presence&&e.hasOwnProperty("presence")&&(t=p.bin_proto.Presence.verify(e.presence)))return"presence."+t;if(null!=e.blocked&&e.hasOwnProperty("blocked")&&"boolean"!=typeof e.blocked)return"blocked: boolean expected";if(null!=e.status&&e.hasOwnProperty("status"))switch(e.status){default:return"status: enum value expected";case 0:case 1:case 2:}return null!=e.isBot&&e.hasOwnProperty("isBot")&&"boolean"!=typeof e.isBot?"isBot: boolean expected":null},e.fromObject=function(e){if(e instanceof p.bin_proto.User)return e;var t=new p.bin_proto.User;if(null!=e.id&&(t.id=String(e.id)),null!=e.profile){if("object"!=typeof e.profile)throw TypeError(".bin_proto.User.profile: object expected");t.profile=p.bin_proto.UserProfile.fromObject(e.profile)}if(null!=e.presence){if("object"!=typeof e.presence)throw TypeError(".bin_proto.User.presence: object expected");t.presence=p.bin_proto.Presence.fromObject(e.presence)}switch(null!=e.blocked&&(t.blocked=Boolean(e.blocked)),e.status){case"NORMAL":case 0:t.status=0;break;case"INACTIVE":case 1:t.status=1;break;case"DELETED":case 2:t.status=2}return null!=e.isBot&&(t.isBot=Boolean(e.isBot)),t},e.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.id="",n.profile=null,n.presence=null,n.blocked=!1,n.status=t.enums===String?"NORMAL":0,n.isBot=!1),null!=e.id&&e.hasOwnProperty("id")&&(n.id=e.id),null!=e.profile&&e.hasOwnProperty("profile")&&(n.profile=p.bin_proto.UserProfile.toObject(e.profile,t)),null!=e.presence&&e.hasOwnProperty("presence")&&(n.presence=p.bin_proto.Presence.toObject(e.presence,t)),null!=e.blocked&&e.hasOwnProperty("blocked")&&(n.blocked=e.blocked),null!=e.status&&e.hasOwnProperty("status")&&(n.status=t.enums===String?p.bin_proto.User.Status[e.status]:e.status),null!=e.isBot&&e.hasOwnProperty("isBot")&&(n.isBot=e.isBot),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,l.util.toJSONOptions)},e.Status=function(){var e={},t=Object.create(e);return t[e[0]="NORMAL"]=0,t[e[1]="INACTIVE"]=1,t[e[2]="DELETED"]=2,t}(),e}(),i.UserAction=function(){function e(e){if(this.users=[],e)for(var t=Object.keys(e),n=0;n>>3){case 1:r.action=e.int32();break;case 2:r.users&&r.users.length||(r.users=[]),r.users.push(p.bin_proto.User.decode(e,e.uint32()));break;case 3:r.count=e.int32();break;case 4:r.hasNext=e.bool();break;default:e.skipType(7&o)}}return r},e.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.action&&e.hasOwnProperty("action"))switch(e.action){default:return"action: enum value expected";case 0:case 1:case 2:}if(null!=e.users&&e.hasOwnProperty("users")){if(!Array.isArray(e.users))return"users: array expected";for(var t=0;t>>3){case 1:r.users&&r.users.length||(r.users=[]),r.users.push(p.bin_proto.User.decode(e,e.uint32()));break;case 2:r.hasNext=e.bool();break;default:e.skipType(7&o)}}return r},e.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.users&&e.hasOwnProperty("users")){if(!Array.isArray(e.users))return"users: array expected";for(var t=0;t>>3){case 1:r.id=e.string();break;case 2:r.type=e.int32();break;case 3:r.stamp=e.int64();break;case 4:r.from=p.bin_proto.User.decode(e,e.uint32());break;case 5:r.presence=p.bin_proto.Presence.decode(e,e.uint32());break;default:e.skipType(7&o)}}return r},e.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.id&&e.hasOwnProperty("id")&&!d.isString(e.id))return"id: string expected";if(null!=e.type&&e.hasOwnProperty("type"))switch(e.type){default:return"type: enum value expected";case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:}return null!=e.stamp&&e.hasOwnProperty("stamp")&&!(d.isInteger(e.stamp)||e.stamp&&d.isInteger(e.stamp.low)&&d.isInteger(e.stamp.high))?"stamp: integer|Long expected":null!=e.from&&e.hasOwnProperty("from")&&(t=p.bin_proto.User.verify(e.from))?"from."+t:null!=e.presence&&e.hasOwnProperty("presence")&&(t=p.bin_proto.Presence.verify(e.presence))?"presence."+t:null;var t},e.fromObject=function(e){if(e instanceof p.bin_proto.PresenceMessage)return e;var t=new p.bin_proto.PresenceMessage;switch(null!=e.id&&(t.id=String(e.id)),e.type){case"NONE":case 0:t.type=0;break;case"ERROR":case 1:t.type=1;break;case"PROBE":case 2:t.type=2;break;case"SUBSCRIBE":case 3:t.type=3;break;case"SUBSCRIBED":case 4:t.type=4;break;case"AVAILABLE":case 5:t.type=5;break;case"UNAVAILABLE":case 6:t.type=6;break;case"UNSUBSCRIBE":case 7:t.type=7;break;case"UNSUBSCRIBED":case 8:t.type=8}if(null!=e.stamp&&(d.Long?(t.stamp=d.Long.fromValue(e.stamp)).unsigned=!1:"string"==typeof e.stamp?t.stamp=parseInt(e.stamp,10):"number"==typeof e.stamp?t.stamp=e.stamp:"object"==typeof e.stamp&&(t.stamp=new d.LongBits(e.stamp.low>>>0,e.stamp.high>>>0).toNumber())),null!=e.from){if("object"!=typeof e.from)throw TypeError(".bin_proto.PresenceMessage.from: object expected");t.from=p.bin_proto.User.fromObject(e.from)}if(null!=e.presence){if("object"!=typeof e.presence)throw TypeError(".bin_proto.PresenceMessage.presence: object expected");t.presence=p.bin_proto.Presence.fromObject(e.presence)}return t},e.toObject=function(e,t){t||(t={});var n={};if(t.defaults){if(n.id="",n.type=t.enums===String?"NONE":0,d.Long){var r=new d.Long(0,0,!1);n.stamp=t.longs===String?r.toString():t.longs===Number?r.toNumber():r}else n.stamp=t.longs===String?"0":0;n.from=null,n.presence=null}return null!=e.id&&e.hasOwnProperty("id")&&(n.id=e.id),null!=e.type&&e.hasOwnProperty("type")&&(n.type=t.enums===String?p.bin_proto.PresenceMessage.Type[e.type]:e.type),null!=e.stamp&&e.hasOwnProperty("stamp")&&("number"==typeof e.stamp?n.stamp=t.longs===String?String(e.stamp):e.stamp:n.stamp=t.longs===String?d.Long.prototype.toString.call(e.stamp):t.longs===Number?new d.LongBits(e.stamp.low>>>0,e.stamp.high>>>0).toNumber():e.stamp),null!=e.from&&e.hasOwnProperty("from")&&(n.from=p.bin_proto.User.toObject(e.from,t)),null!=e.presence&&e.hasOwnProperty("presence")&&(n.presence=p.bin_proto.Presence.toObject(e.presence,t)),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,l.util.toJSONOptions)},e.Type=function(){var e={},t=Object.create(e);return t[e[0]="NONE"]=0,t[e[1]="ERROR"]=1,t[e[2]="PROBE"]=2,t[e[3]="SUBSCRIBE"]=3,t[e[4]="SUBSCRIBED"]=4,t[e[5]="AVAILABLE"]=5,t[e[6]="UNAVAILABLE"]=6,t[e[7]="UNSUBSCRIBE"]=7,t[e[8]="UNSUBSCRIBED"]=8,t}(),e}(),i.UserSearch=function(){function e(e){if(e)for(var t=Object.keys(e),n=0;n>>3){case 1:r.limit=e.int32();break;case 2:r.offset=e.int32();break;case 3:r.order=e.int32();break;case 4:r.filter=e.int32();break;case 6:r.metaFilter=p.bin_proto.UserSearch.MetaFilter.decode(e,e.uint32());break;case 5:r.prefix=e.string();break;default:e.skipType(7&o)}}return r},e.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.limit&&e.hasOwnProperty("limit")&&!d.isInteger(e.limit))return"limit: integer expected";if(null!=e.offset&&e.hasOwnProperty("offset")&&!d.isInteger(e.offset))return"offset: integer expected";if(null!=e.order&&e.hasOwnProperty("order"))switch(e.order){default:return"order: enum value expected";case 0:case 1:case 2:}if(null!=e.filter&&e.hasOwnProperty("filter"))switch(e.filter){default:return"filter: enum value expected";case 0:case 1:case 2:case 3:}if(null!=e.metaFilter&&e.hasOwnProperty("metaFilter")){var t=p.bin_proto.UserSearch.MetaFilter.verify(e.metaFilter);if(t)return"metaFilter."+t}return null!=e.prefix&&e.hasOwnProperty("prefix")&&!d.isString(e.prefix)?"prefix: string expected":null},e.fromObject=function(e){if(e instanceof p.bin_proto.UserSearch)return e;var t=new p.bin_proto.UserSearch;switch(null!=e.limit&&(t.limit=0|e.limit),null!=e.offset&&(t.offset=0|e.offset),e.order){case"FIRST_NAME":case 0:t.order=0;break;case"LAST_NAME":case 1:t.order=1;break;case"USERNAME":case 2:t.order=2}switch(e.filter){case"BY_ALL":case 0:t.filter=0;break;case"BY_FIRST_NAME":case 1:t.filter=1;break;case"BY_LAST_NAME":case 2:t.filter=2;break;case"BY_USERNAME":case 3:t.filter=3}if(null!=e.metaFilter){if("object"!=typeof e.metaFilter)throw TypeError(".bin_proto.UserSearch.metaFilter: object expected");t.metaFilter=p.bin_proto.UserSearch.MetaFilter.fromObject(e.metaFilter)}return null!=e.prefix&&(t.prefix=String(e.prefix)),t},e.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.limit=0,n.offset=0,n.order=t.enums===String?"FIRST_NAME":0,n.filter=t.enums===String?"BY_ALL":0,n.prefix="",n.metaFilter=null),null!=e.limit&&e.hasOwnProperty("limit")&&(n.limit=e.limit),null!=e.offset&&e.hasOwnProperty("offset")&&(n.offset=e.offset),null!=e.order&&e.hasOwnProperty("order")&&(n.order=t.enums===String?p.bin_proto.UserSearch.Order[e.order]:e.order),null!=e.filter&&e.hasOwnProperty("filter")&&(n.filter=t.enums===String?p.bin_proto.UserSearch.Filter[e.filter]:e.filter),null!=e.prefix&&e.hasOwnProperty("prefix")&&(n.prefix=e.prefix),null!=e.metaFilter&&e.hasOwnProperty("metaFilter")&&(n.metaFilter=p.bin_proto.UserSearch.MetaFilter.toObject(e.metaFilter,t)),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,l.util.toJSONOptions)},e.Order=function(){var e={},t=Object.create(e);return t[e[0]="FIRST_NAME"]=0,t[e[1]="LAST_NAME"]=1,t[e[2]="USERNAME"]=2,t}(),e.Filter=function(){var e={},t=Object.create(e);return t[e[0]="BY_ALL"]=0,t[e[1]="BY_FIRST_NAME"]=1,t[e[2]="BY_LAST_NAME"]=2,t[e[3]="BY_USERNAME"]=3,t}(),e.MetaFilter=function(){function e(e){if(this.byMetaKey=[],e)for(var t=Object.keys(e),n=0;n>>3==1?(r.byMetaKey&&r.byMetaKey.length||(r.byMetaKey=[]),r.byMetaKey.push(e.string())):e.skipType(7&o)}return r},e.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.byMetaKey&&e.hasOwnProperty("byMetaKey")){if(!Array.isArray(e.byMetaKey))return"byMetaKey: array expected";for(var t=0;t>>3){case 1:r.list&&r.list.length||(r.list=[]),r.list.push(e.string());break;case 2:r.users&&r.users.length||(r.users=[]),r.users.push(p.bin_proto.User.decode(e,e.uint32()));break;default:e.skipType(7&o)}}return r},e.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.list&&e.hasOwnProperty("list")){if(!Array.isArray(e.list))return"list: array expected";for(var t=0;t>>3){case 1:r.id=e.string();break;case 2:r.to=e.string();break;case 3:r.user=p.bin_proto.User.decode(e,e.uint32());break;case 4:r.userAction=p.bin_proto.UserAction.decode(e,e.uint32());break;case 5:r.blockedList=p.bin_proto.UserSearch.decode(e,e.uint32());break;case 6:r.usersStatus=p.bin_proto.UsersList.decode(e,e.uint32());break;case 7:r.usersList=p.bin_proto.UsersList.decode(e,e.uint32());break;case 12:r.usersByUsername=p.bin_proto.UsersByUsername.decode(e,e.uint32());break;case 8:r.userSearch=p.bin_proto.UserSearch.decode(e,e.uint32());break;case 9:r.privacyExceptionQuery=p.bin_proto.PrivacyExceptionsQuery.decode(e,e.uint32());break;case 10:r.privacyExceptionList=p.bin_proto.PrivacyExceptionsList.decode(e,e.uint32());break;case 11:r.updatePrivacyExceptions=p.bin_proto.PrivacyExceptionsUpdate.decode(e,e.uint32());break;default:e.skipType(7&o)}}return r},e.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!=typeof e||null===e)return"object expected";var t={};if(null!=e.id&&e.hasOwnProperty("id")&&!d.isString(e.id))return"id: string expected";if(null!=e.to&&e.hasOwnProperty("to")&&!d.isString(e.to))return"to: string expected";if(null!=e.user&&e.hasOwnProperty("user")&&(t.update=1,n=p.bin_proto.User.verify(e.user)))return"user."+n;if(null!=e.userAction&&e.hasOwnProperty("userAction")){if(1===t.update)return"update: multiple values";if(t.update=1,n=p.bin_proto.UserAction.verify(e.userAction))return"userAction."+n}if(null!=e.blockedList&&e.hasOwnProperty("blockedList")){if(1===t.update)return"update: multiple values";if(t.update=1,n=p.bin_proto.UserSearch.verify(e.blockedList))return"blockedList."+n}if(null!=e.usersStatus&&e.hasOwnProperty("usersStatus")){if(1===t.update)return"update: multiple values";if(t.update=1,n=p.bin_proto.UsersList.verify(e.usersStatus))return"usersStatus."+n}if(null!=e.usersList&&e.hasOwnProperty("usersList")){if(1===t.update)return"update: multiple values";if(t.update=1,n=p.bin_proto.UsersList.verify(e.usersList))return"usersList."+n}if(null!=e.usersByUsername&&e.hasOwnProperty("usersByUsername")){if(1===t.update)return"update: multiple values";if(t.update=1,n=p.bin_proto.UsersByUsername.verify(e.usersByUsername))return"usersByUsername."+n}if(null!=e.userSearch&&e.hasOwnProperty("userSearch")){if(1===t.update)return"update: multiple values";if(t.update=1,n=p.bin_proto.UserSearch.verify(e.userSearch))return"userSearch."+n}if(null!=e.privacyExceptionQuery&&e.hasOwnProperty("privacyExceptionQuery")){if(1===t.update)return"update: multiple values";if(t.update=1,n=p.bin_proto.PrivacyExceptionsQuery.verify(e.privacyExceptionQuery))return"privacyExceptionQuery."+n}if(null!=e.privacyExceptionList&&e.hasOwnProperty("privacyExceptionList")){if(1===t.update)return"update: multiple values";if(t.update=1,n=p.bin_proto.PrivacyExceptionsList.verify(e.privacyExceptionList))return"privacyExceptionList."+n}if(null!=e.updatePrivacyExceptions&&e.hasOwnProperty("updatePrivacyExceptions")){if(1===t.update)return"update: multiple values";var n;if(t.update=1,n=p.bin_proto.PrivacyExceptionsUpdate.verify(e.updatePrivacyExceptions))return"updatePrivacyExceptions."+n}return null},e.fromObject=function(e){if(e instanceof p.bin_proto.UserQuery)return e;var t=new p.bin_proto.UserQuery;if(null!=e.id&&(t.id=String(e.id)),null!=e.to&&(t.to=String(e.to)),null!=e.user){if("object"!=typeof e.user)throw TypeError(".bin_proto.UserQuery.user: object expected");t.user=p.bin_proto.User.fromObject(e.user)}if(null!=e.userAction){if("object"!=typeof e.userAction)throw TypeError(".bin_proto.UserQuery.userAction: object expected");t.userAction=p.bin_proto.UserAction.fromObject(e.userAction)}if(null!=e.blockedList){if("object"!=typeof e.blockedList)throw TypeError(".bin_proto.UserQuery.blockedList: object expected");t.blockedList=p.bin_proto.UserSearch.fromObject(e.blockedList)}if(null!=e.usersStatus){if("object"!=typeof e.usersStatus)throw TypeError(".bin_proto.UserQuery.usersStatus: object expected");t.usersStatus=p.bin_proto.UsersList.fromObject(e.usersStatus)}if(null!=e.usersList){if("object"!=typeof e.usersList)throw TypeError(".bin_proto.UserQuery.usersList: object expected");t.usersList=p.bin_proto.UsersList.fromObject(e.usersList)}if(null!=e.usersByUsername){if("object"!=typeof e.usersByUsername)throw TypeError(".bin_proto.UserQuery.usersByUsername: object expected");t.usersByUsername=p.bin_proto.UsersByUsername.fromObject(e.usersByUsername)}if(null!=e.userSearch){if("object"!=typeof e.userSearch)throw TypeError(".bin_proto.UserQuery.userSearch: object expected");t.userSearch=p.bin_proto.UserSearch.fromObject(e.userSearch)}if(null!=e.privacyExceptionQuery){if("object"!=typeof e.privacyExceptionQuery)throw TypeError(".bin_proto.UserQuery.privacyExceptionQuery: object expected");t.privacyExceptionQuery=p.bin_proto.PrivacyExceptionsQuery.fromObject(e.privacyExceptionQuery)}if(null!=e.privacyExceptionList){if("object"!=typeof e.privacyExceptionList)throw TypeError(".bin_proto.UserQuery.privacyExceptionList: object expected");t.privacyExceptionList=p.bin_proto.PrivacyExceptionsList.fromObject(e.privacyExceptionList)}if(null!=e.updatePrivacyExceptions){if("object"!=typeof e.updatePrivacyExceptions)throw TypeError(".bin_proto.UserQuery.updatePrivacyExceptions: object expected");t.updatePrivacyExceptions=p.bin_proto.PrivacyExceptionsUpdate.fromObject(e.updatePrivacyExceptions)}return t},e.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.id="",n.to=""),null!=e.id&&e.hasOwnProperty("id")&&(n.id=e.id),null!=e.to&&e.hasOwnProperty("to")&&(n.to=e.to),null!=e.user&&e.hasOwnProperty("user")&&(n.user=p.bin_proto.User.toObject(e.user,t),t.oneofs&&(n.update="user")),null!=e.userAction&&e.hasOwnProperty("userAction")&&(n.userAction=p.bin_proto.UserAction.toObject(e.userAction,t),t.oneofs&&(n.update="userAction")),null!=e.blockedList&&e.hasOwnProperty("blockedList")&&(n.blockedList=p.bin_proto.UserSearch.toObject(e.blockedList,t),t.oneofs&&(n.update="blockedList")),null!=e.usersStatus&&e.hasOwnProperty("usersStatus")&&(n.usersStatus=p.bin_proto.UsersList.toObject(e.usersStatus,t),t.oneofs&&(n.update="usersStatus")),null!=e.usersList&&e.hasOwnProperty("usersList")&&(n.usersList=p.bin_proto.UsersList.toObject(e.usersList,t),t.oneofs&&(n.update="usersList")),null!=e.userSearch&&e.hasOwnProperty("userSearch")&&(n.userSearch=p.bin_proto.UserSearch.toObject(e.userSearch,t),t.oneofs&&(n.update="userSearch")),null!=e.privacyExceptionQuery&&e.hasOwnProperty("privacyExceptionQuery")&&(n.privacyExceptionQuery=p.bin_proto.PrivacyExceptionsQuery.toObject(e.privacyExceptionQuery,t),t.oneofs&&(n.update="privacyExceptionQuery")),null!=e.privacyExceptionList&&e.hasOwnProperty("privacyExceptionList")&&(n.privacyExceptionList=p.bin_proto.PrivacyExceptionsList.toObject(e.privacyExceptionList,t),t.oneofs&&(n.update="privacyExceptionList")),null!=e.updatePrivacyExceptions&&e.hasOwnProperty("updatePrivacyExceptions")&&(n.updatePrivacyExceptions=p.bin_proto.PrivacyExceptionsUpdate.toObject(e.updatePrivacyExceptions,t),t.oneofs&&(n.update="updatePrivacyExceptions")),null!=e.usersByUsername&&e.hasOwnProperty("usersByUsername")&&(n.usersByUsername=p.bin_proto.UsersByUsername.toObject(e.usersByUsername,t),t.oneofs&&(n.update="usersByUsername")),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,l.util.toJSONOptions)},e}(),i.PrivacyExceptionsQuery=function(){function e(e){if(e)for(var t=Object.keys(e),n=0;n>>3){case 1:r.privacyField=e.string();break;case 2:r.exceptionType=e.int32();break;case 3:r.count=e.int32();break;case 4:r.nextToken=e.string();break;default:e.skipType(7&o)}}return r},e.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.privacyField&&e.hasOwnProperty("privacyField")&&!d.isString(e.privacyField))return"privacyField: string expected";if(null!=e.exceptionType&&e.hasOwnProperty("exceptionType"))switch(e.exceptionType){default:return"exceptionType: enum value expected";case 0:case 1:}return null!=e.count&&e.hasOwnProperty("count")&&!d.isInteger(e.count)?"count: integer expected":null!=e.nextToken&&e.hasOwnProperty("nextToken")&&!d.isString(e.nextToken)?"nextToken: string expected":null},e.fromObject=function(e){if(e instanceof p.bin_proto.PrivacyExceptionsQuery)return e;var t=new p.bin_proto.PrivacyExceptionsQuery;switch(null!=e.privacyField&&(t.privacyField=String(e.privacyField)),e.exceptionType){case"INCLUSION":case 0:t.exceptionType=0;break;case"EXCLUSION":case 1:t.exceptionType=1}return null!=e.count&&(t.count=0|e.count),null!=e.nextToken&&(t.nextToken=String(e.nextToken)),t},e.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.privacyField="",n.exceptionType=t.enums===String?"INCLUSION":0,n.count=0,n.nextToken=""),null!=e.privacyField&&e.hasOwnProperty("privacyField")&&(n.privacyField=e.privacyField),null!=e.exceptionType&&e.hasOwnProperty("exceptionType")&&(n.exceptionType=t.enums===String?p.bin_proto.ExceptionType[e.exceptionType]:e.exceptionType),null!=e.count&&e.hasOwnProperty("count")&&(n.count=e.count),null!=e.nextToken&&e.hasOwnProperty("nextToken")&&(n.nextToken=e.nextToken),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,l.util.toJSONOptions)},e}(),i.PrivacyExceptionsList=function(){function e(e){if(this.list=[],e)for(var t=Object.keys(e),n=0;n>>3){case 1:r.list&&r.list.length||(r.list=[]),r.list.push(p.bin_proto.PrivacyException.decode(e,e.uint32()));break;case 2:r.hasNext=e.bool();break;case 3:r.nextToken=e.string();break;default:e.skipType(7&o)}}return r},e.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.list&&e.hasOwnProperty("list")){if(!Array.isArray(e.list))return"list: array expected";for(var t=0;t>>3){case 1:r.whom=e.string();break;case 2:r.privacyField=e.string();break;case 3:r.createdAt=e.int64();break;default:e.skipType(7&o)}}return r},e.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},e.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.whom&&e.hasOwnProperty("whom")&&!d.isString(e.whom)?"whom: string expected":null!=e.privacyField&&e.hasOwnProperty("privacyField")&&!d.isString(e.privacyField)?"privacyField: string expected":null!=e.createdAt&&e.hasOwnProperty("createdAt")&&!(d.isInteger(e.createdAt)||e.createdAt&&d.isInteger(e.createdAt.low)&&d.isInteger(e.createdAt.high))?"createdAt: integer|Long expected":null},e.fromObject=function(e){if(e instanceof p.bin_proto.PrivacyException)return e;var t=new p.bin_proto.PrivacyException;return null!=e.whom&&(t.whom=String(e.whom)),null!=e.privacyField&&(t.privacyField=String(e.privacyField)),null!=e.createdAt&&(d.Long?(t.createdAt=d.Long.fromValue(e.createdAt)).unsigned=!1:"string"==typeof e.createdAt?t.createdAt=parseInt(e.createdAt,10):"number"==typeof e.createdAt?t.createdAt=e.createdAt:"object"==typeof e.createdAt&&(t.createdAt=new d.LongBits(e.createdAt.low>>>0,e.createdAt.high>>>0).toNumber())),t},e.toObject=function(e,t){t||(t={});var n={};if(t.defaults)if(n.whom="",n.privacyField="",d.Long){var r=new d.Long(0,0,!1);n.createdAt=t.longs===String?r.toString():t.longs===Number?r.toNumber():r}else n.createdAt=t.longs===String?"0":0;return null!=e.whom&&e.hasOwnProperty("whom")&&(n.whom=e.whom),null!=e.privacyField&&e.hasOwnProperty("privacyField")&&(n.privacyField=e.privacyField),null!=e.createdAt&&e.hasOwnProperty("createdAt")&&("number"==typeof e.createdAt?n.createdAt=t.longs===String?String(e.createdAt):e.createdAt:n.createdAt=t.longs===String?d.Long.prototype.toString.call(e.createdAt):t.longs===Number?new d.LongBits(e.createdAt.low>>>0,e.createdAt.high>>>0).toNumber():e.createdAt),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,l.util.toJSONOptions)},e}(),i.PrivacyExceptionsUpdate=function(){function e(e){if(this.add=[],this.remove=[],e)for(var t=Object.keys(e),n=0;n>>3){case 1:r.exceptionType=e.int32();break;case 2:r.privacyField=e.string();break;case 3:r.reset=e.bool();break;case 4:r.add&&r.add.length||(r.add=[]),r.add.push(e.string());break;case 5:r.remove&&r.remove.length||(r.remove=[]),r.remove.push(e.string());break;default:e.skipType(7&o)}}return r},e.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.exceptionType&&e.hasOwnProperty("exceptionType"))switch(e.exceptionType){default:return"exceptionType: enum value expected";case 0:case 1:}if(null!=e.privacyField&&e.hasOwnProperty("privacyField")&&!d.isString(e.privacyField))return"privacyField: string expected";if(null!=e.reset&&e.hasOwnProperty("reset")&&"boolean"!=typeof e.reset)return"reset: boolean expected";if(null!=e.add&&e.hasOwnProperty("add")){if(!Array.isArray(e.add))return"add: array expected";for(var t=0;t>>3){case 1:o.id=e.string();break;case 2:e.skip().pos++,o.data===d.emptyObject&&(o.data={}),n=e.string(),e.pos++,o.data[n]=e.string();break;default:e.skipType(7&i)}}return o},e.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.id&&e.hasOwnProperty("id")&&!d.isString(e.id))return"id: string expected";if(null!=e.data&&e.hasOwnProperty("data")){if(!d.isObject(e.data))return"data: object expected";for(var t=Object.keys(e.data),n=0;n>>3){case 1:r.user=p.bin_proto.User.decode(e,e.uint32());break;case 2:r.role=e.string();break;default:e.skipType(7&o)}}return r},e.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.user&&e.hasOwnProperty("user")){var t=p.bin_proto.User.verify(e.user);if(t)return"user."+t}return null!=e.role&&e.hasOwnProperty("role")&&!d.isString(e.role)?"role: string expected":null},e.fromObject=function(e){if(e instanceof p.bin_proto.Member)return e;var t=new p.bin_proto.Member;if(null!=e.user){if("object"!=typeof e.user)throw TypeError(".bin_proto.Member.user: object expected");t.user=p.bin_proto.User.fromObject(e.user)}return null!=e.role&&(t.role=String(e.role)),t},e.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.user=null,n.role=""),null!=e.user&&e.hasOwnProperty("user")&&(n.user=p.bin_proto.User.toObject(e.user,t)),null!=e.role&&e.hasOwnProperty("role")&&(n.role=e.role),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,l.util.toJSONOptions)},e}(),i.Permission=function(){function e(e){if(e)for(var t=Object.keys(e),n=0;n>>3){case 1:r.id=e.int64();break;case 2:r.name=e.string();break;default:e.skipType(7&o)}}return r},e.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},e.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.id&&e.hasOwnProperty("id")&&!(d.isInteger(e.id)||e.id&&d.isInteger(e.id.low)&&d.isInteger(e.id.high))?"id: integer|Long expected":null!=e.name&&e.hasOwnProperty("name")&&!d.isString(e.name)?"name: string expected":null},e.fromObject=function(e){if(e instanceof p.bin_proto.Permission)return e;var t=new p.bin_proto.Permission;return null!=e.id&&(d.Long?(t.id=d.Long.fromValue(e.id)).unsigned=!1:"string"==typeof e.id?t.id=parseInt(e.id,10):"number"==typeof e.id?t.id=e.id:"object"==typeof e.id&&(t.id=new d.LongBits(e.id.low>>>0,e.id.high>>>0).toNumber())),null!=e.name&&(t.name=String(e.name)),t},e.toObject=function(e,t){t||(t={});var n={};if(t.defaults){if(d.Long){var r=new d.Long(0,0,!1);n.id=t.longs===String?r.toString():t.longs===Number?r.toNumber():r}else n.id=t.longs===String?"0":0;n.name=""}return null!=e.id&&e.hasOwnProperty("id")&&("number"==typeof e.id?n.id=t.longs===String?String(e.id):e.id:n.id=t.longs===String?d.Long.prototype.toString.call(e.id):t.longs===Number?new d.LongBits(e.id.low>>>0,e.id.high>>>0).toNumber():e.id),null!=e.name&&e.hasOwnProperty("name")&&(n.name=e.name),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,l.util.toJSONOptions)},e}(),i.Role=function(){function e(e){if(this.permissions=[],e)for(var t=Object.keys(e),n=0;n>>3){case 1:r.id=e.int64();break;case 2:r.name=e.string();break;case 3:r.description=e.string();break;case 4:r.priority=e.int32();break;case 5:r.access=e.int32();break;case 6:r.permissions&&r.permissions.length||(r.permissions=[]),r.permissions.push(p.bin_proto.Permission.decode(e,e.uint32()));break;default:e.skipType(7&o)}}return r},e.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.id&&e.hasOwnProperty("id")&&!(d.isInteger(e.id)||e.id&&d.isInteger(e.id.low)&&d.isInteger(e.id.high)))return"id: integer|Long expected";if(null!=e.name&&e.hasOwnProperty("name")&&!d.isString(e.name))return"name: string expected";if(null!=e.description&&e.hasOwnProperty("description")&&!d.isString(e.description))return"description: string expected";if(null!=e.priority&&e.hasOwnProperty("priority")&&!d.isInteger(e.priority))return"priority: integer expected";if(null!=e.access&&e.hasOwnProperty("access")&&!d.isInteger(e.access))return"access: integer expected";if(null!=e.permissions&&e.hasOwnProperty("permissions")){if(!Array.isArray(e.permissions))return"permissions: array expected";for(var t=0;t>>0,e.id.high>>>0).toNumber())),null!=e.name&&(t.name=String(e.name)),null!=e.description&&(t.description=String(e.description)),null!=e.priority&&(t.priority=0|e.priority),null!=e.access&&(t.access=0|e.access),e.permissions){if(!Array.isArray(e.permissions))throw TypeError(".bin_proto.Role.permissions: array expected");t.permissions=[];for(var n=0;n>>0,e.id.high>>>0).toNumber():e.id),null!=e.name&&e.hasOwnProperty("name")&&(n.name=e.name),null!=e.description&&e.hasOwnProperty("description")&&(n.description=e.description),null!=e.priority&&e.hasOwnProperty("priority")&&(n.priority=e.priority),null!=e.access&&e.hasOwnProperty("access")&&(n.access=e.access),e.permissions&&e.permissions.length){n.permissions=[];for(var o=0;o>>3==1?(r.roles&&r.roles.length||(r.roles=[]),r.roles.push(p.bin_proto.Role.decode(e,e.uint32()))):e.skipType(7&o)}return r},e.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.roles&&e.hasOwnProperty("roles")){if(!Array.isArray(e.roles))return"roles: array expected";for(var t=0;t>>3){case 1:r.unread=e.int32();break;case 2:r.msg=p.bin_proto.Message.decode(e,e.uint32());break;case 3:r.act=p.bin_proto.ChannelAction.decode(e,e.uint32());break;case 4:r.localRcvd=e.int64();break;case 5:r.localDspld=e.int64();break;case 6:r.remoteRcvd=e.int64();break;case 7:r.remoteDspld=e.int64();break;case 8:r.channelUnread=e.bool();break;case 9:r.unreadMentions=e.int64();break;case 10:r.unreadReactions=e.int64();break;case 11:r.messagesDeletionDate=e.int64();break;default:e.skipType(7&o)}}return r},e.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!=typeof e||null===e)return"object expected";var t={};if(null!=e.unread&&e.hasOwnProperty("unread")&&!d.isInteger(e.unread))return"unread: integer expected";if(null!=e.msg&&e.hasOwnProperty("msg")&&(t.LastMessage=1,n=p.bin_proto.Message.verify(e.msg)))return"msg."+n;if(null!=e.act&&e.hasOwnProperty("act")){if(1===t.LastMessage)return"LastMessage: multiple values";var n;if(t.LastMessage=1,n=p.bin_proto.ChannelAction.verify(e.act))return"act."+n}return null!=e.localRcvd&&e.hasOwnProperty("localRcvd")&&!(d.isInteger(e.localRcvd)||e.localRcvd&&d.isInteger(e.localRcvd.low)&&d.isInteger(e.localRcvd.high))?"localRcvd: integer|Long expected":null!=e.localDspld&&e.hasOwnProperty("localDspld")&&!(d.isInteger(e.localDspld)||e.localDspld&&d.isInteger(e.localDspld.low)&&d.isInteger(e.localDspld.high))?"localDspld: integer|Long expected":null!=e.remoteRcvd&&e.hasOwnProperty("remoteRcvd")&&!(d.isInteger(e.remoteRcvd)||e.remoteRcvd&&d.isInteger(e.remoteRcvd.low)&&d.isInteger(e.remoteRcvd.high))?"remoteRcvd: integer|Long expected":null!=e.remoteDspld&&e.hasOwnProperty("remoteDspld")&&!(d.isInteger(e.remoteDspld)||e.remoteDspld&&d.isInteger(e.remoteDspld.low)&&d.isInteger(e.remoteDspld.high))?"remoteDspld: integer|Long expected":null!=e.channelUnread&&e.hasOwnProperty("channelUnread")&&"boolean"!=typeof e.channelUnread?"channelUnread: boolean expected":null!=e.unreadMentions&&e.hasOwnProperty("unreadMentions")&&!(d.isInteger(e.unreadMentions)||e.unreadMentions&&d.isInteger(e.unreadMentions.low)&&d.isInteger(e.unreadMentions.high))?"unreadMentions: integer|Long expected":null!=e.unreadReactions&&e.hasOwnProperty("unreadReactions")&&!(d.isInteger(e.unreadReactions)||e.unreadReactions&&d.isInteger(e.unreadReactions.low)&&d.isInteger(e.unreadReactions.high))?"unreadReactions: integer|Long expected":null!=e.messagesDeletionDate&&e.hasOwnProperty("messagesDeletionDate")&&!(d.isInteger(e.messagesDeletionDate)||e.messagesDeletionDate&&d.isInteger(e.messagesDeletionDate.low)&&d.isInteger(e.messagesDeletionDate.high))?"messagesDeletionDate: integer|Long expected":null},e.fromObject=function(e){if(e instanceof p.bin_proto.Conversation)return e;var t=new p.bin_proto.Conversation;if(null!=e.unread&&(t.unread=0|e.unread),null!=e.msg){if("object"!=typeof e.msg)throw TypeError(".bin_proto.Conversation.msg: object expected");t.msg=p.bin_proto.Message.fromObject(e.msg)}if(null!=e.act){if("object"!=typeof e.act)throw TypeError(".bin_proto.Conversation.act: object expected");t.act=p.bin_proto.ChannelAction.fromObject(e.act)}return null!=e.localRcvd&&(d.Long?(t.localRcvd=d.Long.fromValue(e.localRcvd)).unsigned=!1:"string"==typeof e.localRcvd?t.localRcvd=parseInt(e.localRcvd,10):"number"==typeof e.localRcvd?t.localRcvd=e.localRcvd:"object"==typeof e.localRcvd&&(t.localRcvd=new d.LongBits(e.localRcvd.low>>>0,e.localRcvd.high>>>0).toNumber())),null!=e.localDspld&&(d.Long?(t.localDspld=d.Long.fromValue(e.localDspld)).unsigned=!1:"string"==typeof e.localDspld?t.localDspld=parseInt(e.localDspld,10):"number"==typeof e.localDspld?t.localDspld=e.localDspld:"object"==typeof e.localDspld&&(t.localDspld=new d.LongBits(e.localDspld.low>>>0,e.localDspld.high>>>0).toNumber())),null!=e.remoteRcvd&&(d.Long?(t.remoteRcvd=d.Long.fromValue(e.remoteRcvd)).unsigned=!1:"string"==typeof e.remoteRcvd?t.remoteRcvd=parseInt(e.remoteRcvd,10):"number"==typeof e.remoteRcvd?t.remoteRcvd=e.remoteRcvd:"object"==typeof e.remoteRcvd&&(t.remoteRcvd=new d.LongBits(e.remoteRcvd.low>>>0,e.remoteRcvd.high>>>0).toNumber())),null!=e.remoteDspld&&(d.Long?(t.remoteDspld=d.Long.fromValue(e.remoteDspld)).unsigned=!1:"string"==typeof e.remoteDspld?t.remoteDspld=parseInt(e.remoteDspld,10):"number"==typeof e.remoteDspld?t.remoteDspld=e.remoteDspld:"object"==typeof e.remoteDspld&&(t.remoteDspld=new d.LongBits(e.remoteDspld.low>>>0,e.remoteDspld.high>>>0).toNumber())),null!=e.channelUnread&&(t.channelUnread=Boolean(e.channelUnread)),null!=e.unreadMentions&&(d.Long?(t.unreadMentions=d.Long.fromValue(e.unreadMentions)).unsigned=!1:"string"==typeof e.unreadMentions?t.unreadMentions=parseInt(e.unreadMentions,10):"number"==typeof e.unreadMentions?t.unreadMentions=e.unreadMentions:"object"==typeof e.unreadMentions&&(t.unreadMentions=new d.LongBits(e.unreadMentions.low>>>0,e.unreadMentions.high>>>0).toNumber())),null!=e.unreadReactions&&(d.Long?(t.unreadReactions=d.Long.fromValue(e.unreadReactions)).unsigned=!1:"string"==typeof e.unreadReactions?t.unreadReactions=parseInt(e.unreadReactions,10):"number"==typeof e.unreadReactions?t.unreadReactions=e.unreadReactions:"object"==typeof e.unreadReactions&&(t.unreadReactions=new d.LongBits(e.unreadReactions.low>>>0,e.unreadReactions.high>>>0).toNumber())),null!=e.messagesDeletionDate&&(d.Long?(t.messagesDeletionDate=d.Long.fromValue(e.messagesDeletionDate)).unsigned=!1:"string"==typeof e.messagesDeletionDate?t.messagesDeletionDate=parseInt(e.messagesDeletionDate,10):"number"==typeof e.messagesDeletionDate?t.messagesDeletionDate=e.messagesDeletionDate:"object"==typeof e.messagesDeletionDate&&(t.messagesDeletionDate=new d.LongBits(e.messagesDeletionDate.low>>>0,e.messagesDeletionDate.high>>>0).toNumber())),t},e.toObject=function(e,t){t||(t={});var n={};if(t.defaults){if(n.unread=0,d.Long){var r=new d.Long(0,0,!1);n.localRcvd=t.longs===String?r.toString():t.longs===Number?r.toNumber():r}else n.localRcvd=t.longs===String?"0":0;d.Long?(r=new d.Long(0,0,!1),n.localDspld=t.longs===String?r.toString():t.longs===Number?r.toNumber():r):n.localDspld=t.longs===String?"0":0,d.Long?(r=new d.Long(0,0,!1),n.remoteRcvd=t.longs===String?r.toString():t.longs===Number?r.toNumber():r):n.remoteRcvd=t.longs===String?"0":0,d.Long?(r=new d.Long(0,0,!1),n.remoteDspld=t.longs===String?r.toString():t.longs===Number?r.toNumber():r):n.remoteDspld=t.longs===String?"0":0,n.channelUnread=!1,d.Long?(r=new d.Long(0,0,!1),n.unreadMentions=t.longs===String?r.toString():t.longs===Number?r.toNumber():r):n.unreadMentions=t.longs===String?"0":0,d.Long?(r=new d.Long(0,0,!1),n.unreadReactions=t.longs===String?r.toString():t.longs===Number?r.toNumber():r):n.unreadReactions=t.longs===String?"0":0,d.Long?(r=new d.Long(0,0,!1),n.messagesDeletionDate=t.longs===String?r.toString():t.longs===Number?r.toNumber():r):n.messagesDeletionDate=t.longs===String?"0":0}return null!=e.unread&&e.hasOwnProperty("unread")&&(n.unread=e.unread),null!=e.msg&&e.hasOwnProperty("msg")&&(n.msg=p.bin_proto.Message.toObject(e.msg,t),t.oneofs&&(n.LastMessage="msg")),null!=e.act&&e.hasOwnProperty("act")&&(n.act=p.bin_proto.ChannelAction.toObject(e.act,t),t.oneofs&&(n.LastMessage="act")),null!=e.localRcvd&&e.hasOwnProperty("localRcvd")&&("number"==typeof e.localRcvd?n.localRcvd=t.longs===String?String(e.localRcvd):e.localRcvd:n.localRcvd=t.longs===String?d.Long.prototype.toString.call(e.localRcvd):t.longs===Number?new d.LongBits(e.localRcvd.low>>>0,e.localRcvd.high>>>0).toNumber():e.localRcvd),null!=e.localDspld&&e.hasOwnProperty("localDspld")&&("number"==typeof e.localDspld?n.localDspld=t.longs===String?String(e.localDspld):e.localDspld:n.localDspld=t.longs===String?d.Long.prototype.toString.call(e.localDspld):t.longs===Number?new d.LongBits(e.localDspld.low>>>0,e.localDspld.high>>>0).toNumber():e.localDspld),null!=e.remoteRcvd&&e.hasOwnProperty("remoteRcvd")&&("number"==typeof e.remoteRcvd?n.remoteRcvd=t.longs===String?String(e.remoteRcvd):e.remoteRcvd:n.remoteRcvd=t.longs===String?d.Long.prototype.toString.call(e.remoteRcvd):t.longs===Number?new d.LongBits(e.remoteRcvd.low>>>0,e.remoteRcvd.high>>>0).toNumber():e.remoteRcvd),null!=e.remoteDspld&&e.hasOwnProperty("remoteDspld")&&("number"==typeof e.remoteDspld?n.remoteDspld=t.longs===String?String(e.remoteDspld):e.remoteDspld:n.remoteDspld=t.longs===String?d.Long.prototype.toString.call(e.remoteDspld):t.longs===Number?new d.LongBits(e.remoteDspld.low>>>0,e.remoteDspld.high>>>0).toNumber():e.remoteDspld),null!=e.channelUnread&&e.hasOwnProperty("channelUnread")&&(n.channelUnread=e.channelUnread),null!=e.unreadMentions&&e.hasOwnProperty("unreadMentions")&&("number"==typeof e.unreadMentions?n.unreadMentions=t.longs===String?String(e.unreadMentions):e.unreadMentions:n.unreadMentions=t.longs===String?d.Long.prototype.toString.call(e.unreadMentions):t.longs===Number?new d.LongBits(e.unreadMentions.low>>>0,e.unreadMentions.high>>>0).toNumber():e.unreadMentions),null!=e.unreadReactions&&e.hasOwnProperty("unreadReactions")&&("number"==typeof e.unreadReactions?n.unreadReactions=t.longs===String?String(e.unreadReactions):e.unreadReactions:n.unreadReactions=t.longs===String?d.Long.prototype.toString.call(e.unreadReactions):t.longs===Number?new d.LongBits(e.unreadReactions.low>>>0,e.unreadReactions.high>>>0).toNumber():e.unreadReactions),null!=e.messagesDeletionDate&&e.hasOwnProperty("messagesDeletionDate")&&("number"==typeof e.messagesDeletionDate?n.messagesDeletionDate=t.longs===String?String(e.messagesDeletionDate):e.messagesDeletionDate:n.messagesDeletionDate=t.longs===String?d.Long.prototype.toString.call(e.messagesDeletionDate):t.longs===Number?new d.LongBits(e.messagesDeletionDate.low>>>0,e.messagesDeletionDate.high>>>0).toNumber():e.messagesDeletionDate),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,l.util.toJSONOptions)},e}(),i.Config=function(){function e(e){if(e)for(var t=Object.keys(e),n=0;n>>3){case 1:r.distinct=e.bool();break;case 2:r.allowJoin=e.bool();break;case 3:r.discoverable=e.bool();break;default:e.skipType(7&o)}}return r},e.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},e.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.distinct&&e.hasOwnProperty("distinct")&&"boolean"!=typeof e.distinct?"distinct: boolean expected":null!=e.allowJoin&&e.hasOwnProperty("allowJoin")&&"boolean"!=typeof e.allowJoin?"allowJoin: boolean expected":null!=e.discoverable&&e.hasOwnProperty("discoverable")&&"boolean"!=typeof e.discoverable?"discoverable: boolean expected":null},e.fromObject=function(e){if(e instanceof p.bin_proto.Config)return e;var t=new p.bin_proto.Config;return null!=e.distinct&&(t.distinct=Boolean(e.distinct)),null!=e.allowJoin&&(t.allowJoin=Boolean(e.allowJoin)),null!=e.discoverable&&(t.discoverable=Boolean(e.discoverable)),t},e.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.distinct=!1,n.allowJoin=!1,n.discoverable=!1),null!=e.distinct&&e.hasOwnProperty("distinct")&&(n.distinct=e.distinct),null!=e.allowJoin&&e.hasOwnProperty("allowJoin")&&(n.allowJoin=e.allowJoin),null!=e.discoverable&&e.hasOwnProperty("discoverable")&&(n.discoverable=e.discoverable),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,l.util.toJSONOptions)},e}(),i.Channel=function(){function e(e){if(this.members=[],this.messages=[],this.userMessageReactions=[],e)for(var t=Object.keys(e),n=0;n>>3){case 1:r.id=e.string();break;case 2:r.type=e.string();break;case 3:r.subject=e.string();break;case 4:r.uri=e.string();break;case 5:r.avatar=e.string();break;case 6:r.label=e.string();break;case 7:r.metadata=e.string();break;case 8:r.createdAt=e.int64();break;case 9:r.updatedAt=e.int64();break;case 10:r.muted=e.bool();break;case 11:r.muteTill=e.int64();break;case 12:r.pinnedAt=e.int64();break;case 13:r.parentChannelId=e.string();break;case 14:r.autoDeletePeriod=e.int64();break;case 15:r.hidden=e.bool();break;case 16:r.archived=e.bool();break;case 17:r.membersTotalCount=e.int32();break;case 18:r.conv=p.bin_proto.Conversation.decode(e,e.uint32());break;case 19:r.config=p.bin_proto.Config.decode(e,e.uint32());break;case 20:r.members&&r.members.length||(r.members=[]),r.members.push(p.bin_proto.Member.decode(e,e.uint32()));break;case 21:r.messages&&r.messages.length||(r.messages=[]),r.messages.push(p.bin_proto.Message.decode(e,e.uint32()));break;case 22:r.userMessageReactions&&r.userMessageReactions.length||(r.userMessageReactions=[]),r.userMessageReactions.push(p.bin_proto.ReactionObj.decode(e,e.uint32()));break;case 23:r.createdBy=p.bin_proto.User.decode(e,e.uint32());break;case 24:r.role=e.string();break;case 25:r.frozen=e.bool();break;case 26:r.frozenTill=e.int64();break;case 27:r.typeOverride=p.bin_proto.TypeOverride.decode(e,e.uint32());break;default:e.skipType(7&o)}}return r},e.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.id&&e.hasOwnProperty("id")&&!d.isString(e.id))return"id: string expected";if(null!=e.type&&e.hasOwnProperty("type")&&!d.isString(e.type))return"type: string expected";if(null!=e.subject&&e.hasOwnProperty("subject")&&!d.isString(e.subject))return"subject: string expected";if(null!=e.uri&&e.hasOwnProperty("uri")&&!d.isString(e.uri))return"uri: string expected";if(null!=e.avatar&&e.hasOwnProperty("avatar")&&!d.isString(e.avatar))return"avatar: string expected";if(null!=e.label&&e.hasOwnProperty("label")&&!d.isString(e.label))return"label: string expected";if(null!=e.metadata&&e.hasOwnProperty("metadata")&&!d.isString(e.metadata))return"metadata: string expected";if(null!=e.createdAt&&e.hasOwnProperty("createdAt")&&!(d.isInteger(e.createdAt)||e.createdAt&&d.isInteger(e.createdAt.low)&&d.isInteger(e.createdAt.high)))return"createdAt: integer|Long expected";if(null!=e.updatedAt&&e.hasOwnProperty("updatedAt")&&!(d.isInteger(e.updatedAt)||e.updatedAt&&d.isInteger(e.updatedAt.low)&&d.isInteger(e.updatedAt.high)))return"updatedAt: integer|Long expected";if(null!=e.muted&&e.hasOwnProperty("muted")&&"boolean"!=typeof e.muted)return"muted: boolean expected";if(null!=e.muteTill&&e.hasOwnProperty("muteTill")&&!(d.isInteger(e.muteTill)||e.muteTill&&d.isInteger(e.muteTill.low)&&d.isInteger(e.muteTill.high)))return"muteTill: integer|Long expected";if(null!=e.pinnedAt&&e.hasOwnProperty("pinnedAt")&&!(d.isInteger(e.pinnedAt)||e.pinnedAt&&d.isInteger(e.pinnedAt.low)&&d.isInteger(e.pinnedAt.high)))return"pinnedAt: integer|Long expected";if(null!=e.parentChannelId&&e.hasOwnProperty("parentChannelId")&&!d.isString(e.parentChannelId))return"parentChannelId: string expected";if(null!=e.autoDeletePeriod&&e.hasOwnProperty("autoDeletePeriod")&&!(d.isInteger(e.autoDeletePeriod)||e.autoDeletePeriod&&d.isInteger(e.autoDeletePeriod.low)&&d.isInteger(e.autoDeletePeriod.high)))return"autoDeletePeriod: integer|Long expected";if(null!=e.hidden&&e.hasOwnProperty("hidden")&&"boolean"!=typeof e.hidden)return"hidden: boolean expected";if(null!=e.archived&&e.hasOwnProperty("archived")&&"boolean"!=typeof e.archived)return"archived: boolean expected";if(null!=e.membersTotalCount&&e.hasOwnProperty("membersTotalCount")&&!d.isInteger(e.membersTotalCount))return"membersTotalCount: integer expected";if(null!=e.conv&&e.hasOwnProperty("conv")&&(n=p.bin_proto.Conversation.verify(e.conv)))return"conv."+n;if(null!=e.config&&e.hasOwnProperty("config")&&(n=p.bin_proto.Config.verify(e.config)))return"config."+n;if(null!=e.members&&e.hasOwnProperty("members")){if(!Array.isArray(e.members))return"members: array expected";for(var t=0;t>>0,e.createdAt.high>>>0).toNumber())),null!=e.updatedAt&&(d.Long?(t.updatedAt=d.Long.fromValue(e.updatedAt)).unsigned=!1:"string"==typeof e.updatedAt?t.updatedAt=parseInt(e.updatedAt,10):"number"==typeof e.updatedAt?t.updatedAt=e.updatedAt:"object"==typeof e.updatedAt&&(t.updatedAt=new d.LongBits(e.updatedAt.low>>>0,e.updatedAt.high>>>0).toNumber())),null!=e.muted&&(t.muted=Boolean(e.muted)),null!=e.muteTill&&(d.Long?(t.muteTill=d.Long.fromValue(e.muteTill)).unsigned=!1:"string"==typeof e.muteTill?t.muteTill=parseInt(e.muteTill,10):"number"==typeof e.muteTill?t.muteTill=e.muteTill:"object"==typeof e.muteTill&&(t.muteTill=new d.LongBits(e.muteTill.low>>>0,e.muteTill.high>>>0).toNumber())),null!=e.pinnedAt&&(d.Long?(t.pinnedAt=d.Long.fromValue(e.pinnedAt)).unsigned=!1:"string"==typeof e.pinnedAt?t.pinnedAt=parseInt(e.pinnedAt,10):"number"==typeof e.pinnedAt?t.pinnedAt=e.pinnedAt:"object"==typeof e.pinnedAt&&(t.pinnedAt=new d.LongBits(e.pinnedAt.low>>>0,e.pinnedAt.high>>>0).toNumber())),null!=e.parentChannelId&&(t.parentChannelId=String(e.parentChannelId)),null!=e.autoDeletePeriod&&(d.Long?(t.autoDeletePeriod=d.Long.fromValue(e.autoDeletePeriod)).unsigned=!1:"string"==typeof e.autoDeletePeriod?t.autoDeletePeriod=parseInt(e.autoDeletePeriod,10):"number"==typeof e.autoDeletePeriod?t.autoDeletePeriod=e.autoDeletePeriod:"object"==typeof e.autoDeletePeriod&&(t.autoDeletePeriod=new d.LongBits(e.autoDeletePeriod.low>>>0,e.autoDeletePeriod.high>>>0).toNumber())),null!=e.hidden&&(t.hidden=Boolean(e.hidden)),null!=e.archived&&(t.archived=Boolean(e.archived)),null!=e.membersTotalCount&&(t.membersTotalCount=0|e.membersTotalCount),null!=e.conv){if("object"!=typeof e.conv)throw TypeError(".bin_proto.Channel.conv: object expected");t.conv=p.bin_proto.Conversation.fromObject(e.conv)}if(null!=e.config){if("object"!=typeof e.config)throw TypeError(".bin_proto.Channel.config: object expected");t.config=p.bin_proto.Config.fromObject(e.config)}if(e.members){if(!Array.isArray(e.members))throw TypeError(".bin_proto.Channel.members: array expected");t.members=[];for(var n=0;n>>0,e.frozenTill.high>>>0).toNumber())),null!=e.typeOverride){if("object"!=typeof e.typeOverride)throw TypeError(".bin_proto.Channel.typeOverride: object expected");t.typeOverride=p.bin_proto.TypeOverride.fromObject(e.typeOverride)}return t},e.toObject=function(e,t){t||(t={});var n={};if((t.arrays||t.defaults)&&(n.members=[],n.messages=[],n.userMessageReactions=[]),t.defaults){if(n.id="",n.type="",n.subject="",n.uri="",n.avatar="",n.label="",n.metadata="",d.Long){var r=new d.Long(0,0,!1);n.createdAt=t.longs===String?r.toString():t.longs===Number?r.toNumber():r}else n.createdAt=t.longs===String?"0":0;d.Long?(r=new d.Long(0,0,!1),n.updatedAt=t.longs===String?r.toString():t.longs===Number?r.toNumber():r):n.updatedAt=t.longs===String?"0":0,n.muted=!1,d.Long?(r=new d.Long(0,0,!1),n.muteTill=t.longs===String?r.toString():t.longs===Number?r.toNumber():r):n.muteTill=t.longs===String?"0":0,d.Long?(r=new d.Long(0,0,!1),n.pinnedAt=t.longs===String?r.toString():t.longs===Number?r.toNumber():r):n.pinnedAt=t.longs===String?"0":0,n.parentChannelId="",d.Long?(r=new d.Long(0,0,!1),n.autoDeletePeriod=t.longs===String?r.toString():t.longs===Number?r.toNumber():r):n.autoDeletePeriod=t.longs===String?"0":0,n.hidden=!1,n.archived=!1,n.membersTotalCount=0,n.conv=null,n.config=null,n.createdBy=null,n.role="",n.frozen=!1,d.Long?(r=new d.Long(0,0,!1),n.frozenTill=t.longs===String?r.toString():t.longs===Number?r.toNumber():r):n.frozenTill=t.longs===String?"0":0,n.typeOverride=null}if(null!=e.id&&e.hasOwnProperty("id")&&(n.id=e.id),null!=e.type&&e.hasOwnProperty("type")&&(n.type=e.type),null!=e.subject&&e.hasOwnProperty("subject")&&(n.subject=e.subject),null!=e.uri&&e.hasOwnProperty("uri")&&(n.uri=e.uri),null!=e.avatar&&e.hasOwnProperty("avatar")&&(n.avatar=e.avatar),null!=e.label&&e.hasOwnProperty("label")&&(n.label=e.label),null!=e.metadata&&e.hasOwnProperty("metadata")&&(n.metadata=e.metadata),null!=e.createdAt&&e.hasOwnProperty("createdAt")&&("number"==typeof e.createdAt?n.createdAt=t.longs===String?String(e.createdAt):e.createdAt:n.createdAt=t.longs===String?d.Long.prototype.toString.call(e.createdAt):t.longs===Number?new d.LongBits(e.createdAt.low>>>0,e.createdAt.high>>>0).toNumber():e.createdAt),null!=e.updatedAt&&e.hasOwnProperty("updatedAt")&&("number"==typeof e.updatedAt?n.updatedAt=t.longs===String?String(e.updatedAt):e.updatedAt:n.updatedAt=t.longs===String?d.Long.prototype.toString.call(e.updatedAt):t.longs===Number?new d.LongBits(e.updatedAt.low>>>0,e.updatedAt.high>>>0).toNumber():e.updatedAt),null!=e.muted&&e.hasOwnProperty("muted")&&(n.muted=e.muted),null!=e.muteTill&&e.hasOwnProperty("muteTill")&&("number"==typeof e.muteTill?n.muteTill=t.longs===String?String(e.muteTill):e.muteTill:n.muteTill=t.longs===String?d.Long.prototype.toString.call(e.muteTill):t.longs===Number?new d.LongBits(e.muteTill.low>>>0,e.muteTill.high>>>0).toNumber():e.muteTill),null!=e.pinnedAt&&e.hasOwnProperty("pinnedAt")&&("number"==typeof e.pinnedAt?n.pinnedAt=t.longs===String?String(e.pinnedAt):e.pinnedAt:n.pinnedAt=t.longs===String?d.Long.prototype.toString.call(e.pinnedAt):t.longs===Number?new d.LongBits(e.pinnedAt.low>>>0,e.pinnedAt.high>>>0).toNumber():e.pinnedAt),null!=e.parentChannelId&&e.hasOwnProperty("parentChannelId")&&(n.parentChannelId=e.parentChannelId),null!=e.autoDeletePeriod&&e.hasOwnProperty("autoDeletePeriod")&&("number"==typeof e.autoDeletePeriod?n.autoDeletePeriod=t.longs===String?String(e.autoDeletePeriod):e.autoDeletePeriod:n.autoDeletePeriod=t.longs===String?d.Long.prototype.toString.call(e.autoDeletePeriod):t.longs===Number?new d.LongBits(e.autoDeletePeriod.low>>>0,e.autoDeletePeriod.high>>>0).toNumber():e.autoDeletePeriod),null!=e.hidden&&e.hasOwnProperty("hidden")&&(n.hidden=e.hidden),null!=e.archived&&e.hasOwnProperty("archived")&&(n.archived=e.archived),null!=e.membersTotalCount&&e.hasOwnProperty("membersTotalCount")&&(n.membersTotalCount=e.membersTotalCount),null!=e.conv&&e.hasOwnProperty("conv")&&(n.conv=p.bin_proto.Conversation.toObject(e.conv,t)),null!=e.config&&e.hasOwnProperty("config")&&(n.config=p.bin_proto.Config.toObject(e.config,t)),e.members&&e.members.length){n.members=[];for(var o=0;o>>0,e.frozenTill.high>>>0).toNumber():e.frozenTill),null!=e.typeOverride&&e.hasOwnProperty("typeOverride")&&(n.typeOverride=p.bin_proto.TypeOverride.toObject(e.typeOverride,t)),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,l.util.toJSONOptions)},e}(),i.permissionList=function(){function e(e){if(this.permissions=[],e)for(var t=Object.keys(e),n=0;n>>3==1?(r.permissions&&r.permissions.length||(r.permissions=[]),r.permissions.push(e.string())):e.skipType(7&o)}return r},e.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.permissions&&e.hasOwnProperty("permissions")){if(!Array.isArray(e.permissions))return"permissions: array expected";for(var t=0;t>>3){case 1:o.discoverable=p.google.protobuf.BoolValue.decode(e,e.uint32());break;case 2:o.allowJoin=p.google.protobuf.BoolValue.decode(e,e.uint32());break;case 3:o.distinct=p.google.protobuf.BoolValue.decode(e,e.uint32());break;case 4:o.defaultMembershipRole=e.string();break;case 5:e.skip().pos++,o.roleOverrides===d.emptyObject&&(o.roleOverrides={}),n=e.string(),e.pos++,o.roleOverrides[n]=p.bin_proto.permissionList.decode(e,e.uint32());break;default:e.skipType(7&i)}}return o},e.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.discoverable&&e.hasOwnProperty("discoverable")&&(r=p.google.protobuf.BoolValue.verify(e.discoverable)))return"discoverable."+r;if(null!=e.allowJoin&&e.hasOwnProperty("allowJoin")&&(r=p.google.protobuf.BoolValue.verify(e.allowJoin)))return"allowJoin."+r;if(null!=e.distinct&&e.hasOwnProperty("distinct")&&(r=p.google.protobuf.BoolValue.verify(e.distinct)))return"distinct."+r;if(null!=e.defaultMembershipRole&&e.hasOwnProperty("defaultMembershipRole")&&!d.isString(e.defaultMembershipRole))return"defaultMembershipRole: string expected";if(null!=e.roleOverrides&&e.hasOwnProperty("roleOverrides")){if(!d.isObject(e.roleOverrides))return"roleOverrides: object expected";for(var t=Object.keys(e.roleOverrides),n=0;n>>3){case 1:r.iVal=e.int32();break;case 2:r.bVal=e.bool();break;case 3:r.sVal=e.string();break;default:e.skipType(7&o)}}return r},e.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!=typeof e||null===e)return"object expected";var t={};if(null!=e.iVal&&e.hasOwnProperty("iVal")&&(t.Data=1,!d.isInteger(e.iVal)))return"iVal: integer expected";if(null!=e.bVal&&e.hasOwnProperty("bVal")){if(1===t.Data)return"Data: multiple values";if(t.Data=1,"boolean"!=typeof e.bVal)return"bVal: boolean expected"}if(null!=e.sVal&&e.hasOwnProperty("sVal")){if(1===t.Data)return"Data: multiple values";if(t.Data=1,!d.isString(e.sVal))return"sVal: string expected"}return null},e.fromObject=function(e){if(e instanceof p.bin_proto.Any)return e;var t=new p.bin_proto.Any;return null!=e.iVal&&(t.iVal=0|e.iVal),null!=e.bVal&&(t.bVal=Boolean(e.bVal)),null!=e.sVal&&(t.sVal=String(e.sVal)),t},e.toObject=function(e,t){t||(t={});var n={};return null!=e.iVal&&e.hasOwnProperty("iVal")&&(n.iVal=e.iVal,t.oneofs&&(n.Data="iVal")),null!=e.bVal&&e.hasOwnProperty("bVal")&&(n.bVal=e.bVal,t.oneofs&&(n.Data="bVal")),null!=e.sVal&&e.hasOwnProperty("sVal")&&(n.sVal=e.sVal,t.oneofs&&(n.Data="sVal")),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,l.util.toJSONOptions)},e}(),i.ChannelQuery=function(){function e(e){if(this.reqParams={},e)for(var t=Object.keys(e),n=0;n>>3){case 1:o.id=e.string();break;case 2:o.type=e.int32();break;case 3:o.index=e.int32();break;case 4:o.count=e.int32();break;case 5:o.to=e.string();break;case 6:o.members=p.bin_proto.Members.decode(e,e.uint32());break;case 7:o.channels=p.bin_proto.Channels.decode(e,e.uint32());break;case 9:o.roles=p.bin_proto.Roles.decode(e,e.uint32());break;case 10:o.unreadCount=p.bin_proto.UnreadCount.decode(e,e.uint32());break;case 13:o.attachments=p.bin_proto.ChannelAttachments.decode(e,e.uint32());break;case 14:o.threadQuery=p.bin_proto.ThreadQuery.decode(e,e.uint32());break;case 15:o.messageAutoDeletePeriod=e.int64();break;case 18:o.inviteKeys=p.bin_proto.ChannelInviteKeys.decode(e,e.uint32());break;case 19:o.subscribeByIds=p.bin_proto.SubscribeChannelsByIds.decode(e,e.uint32());break;case 20:o.unsubscribeByIds=p.bin_proto.UnsubscribeChannelsByIds.decode(e,e.uint32());break;case 8:o.totalUnread=e.int32();break;case 11:o.unreadChannels=e.int32();break;case 12:o.accessPriorHistory=e.bool();break;case 16:o.nextToken=e.string();break;case 17:e.skip().pos++,o.reqParams===d.emptyObject&&(o.reqParams={}),n=e.int32(),e.pos++,o.reqParams[n]=p.bin_proto.Any.decode(e,e.uint32());break;default:e.skipType(7&i)}}return o},e.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!=typeof e||null===e)return"object expected";var t={};if(null!=e.id&&e.hasOwnProperty("id")&&!d.isString(e.id))return"id: string expected";if(null!=e.type&&e.hasOwnProperty("type"))switch(e.type){default:return"type: enum value expected";case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:case 9:case 10:case 11:case 12:case 13:case 14:case 15:case 16:case 17:case 18:case 19:case 20:case 21:case 22:case 23:case 24:case 25:case 26:case 27:case 28:case 29:case 30:case 31:case 32:case 33:case 34:case 35:case 36:case 37:case 38:case 39:case 40:case 41:case 42:case 43:case 44:case 45:}if(null!=e.index&&e.hasOwnProperty("index")&&!d.isInteger(e.index))return"index: integer expected";if(null!=e.count&&e.hasOwnProperty("count")&&!d.isInteger(e.count))return"count: integer expected";if(null!=e.to&&e.hasOwnProperty("to")&&!d.isString(e.to))return"to: string expected";if(null!=e.members&&e.hasOwnProperty("members")&&(t.Data=1,o=p.bin_proto.Members.verify(e.members)))return"members."+o;if(null!=e.channels&&e.hasOwnProperty("channels")){if(1===t.Data)return"Data: multiple values";if(t.Data=1,o=p.bin_proto.Channels.verify(e.channels))return"channels."+o}if(null!=e.roles&&e.hasOwnProperty("roles")){if(1===t.Data)return"Data: multiple values";if(t.Data=1,o=p.bin_proto.Roles.verify(e.roles))return"roles."+o}if(null!=e.unreadCount&&e.hasOwnProperty("unreadCount")){if(1===t.Data)return"Data: multiple values";if(t.Data=1,o=p.bin_proto.UnreadCount.verify(e.unreadCount))return"unreadCount."+o}if(null!=e.attachments&&e.hasOwnProperty("attachments")){if(1===t.Data)return"Data: multiple values";if(t.Data=1,o=p.bin_proto.ChannelAttachments.verify(e.attachments))return"attachments."+o}if(null!=e.threadQuery&&e.hasOwnProperty("threadQuery")){if(1===t.Data)return"Data: multiple values";if(t.Data=1,o=p.bin_proto.ThreadQuery.verify(e.threadQuery))return"threadQuery."+o}if(null!=e.messageAutoDeletePeriod&&e.hasOwnProperty("messageAutoDeletePeriod")){if(1===t.Data)return"Data: multiple values";if(t.Data=1,!(d.isInteger(e.messageAutoDeletePeriod)||e.messageAutoDeletePeriod&&d.isInteger(e.messageAutoDeletePeriod.low)&&d.isInteger(e.messageAutoDeletePeriod.high)))return"messageAutoDeletePeriod: integer|Long expected"}if(null!=e.inviteKeys&&e.hasOwnProperty("inviteKeys")){if(1===t.Data)return"Data: multiple values";if(t.Data=1,o=p.bin_proto.ChannelInviteKeys.verify(e.inviteKeys))return"inviteKeys."+o}if(null!=e.subscribeByIds&&e.hasOwnProperty("subscribeByIds")){if(1===t.Data)return"Data: multiple values";if(t.Data=1,o=p.bin_proto.SubscribeChannelsByIds.verify(e.subscribeByIds))return"subscribeByIds."+o}if(null!=e.unsubscribeByIds&&e.hasOwnProperty("unsubscribeByIds")){if(1===t.Data)return"Data: multiple values";if(t.Data=1,o=p.bin_proto.UnsubscribeChannelsByIds.verify(e.unsubscribeByIds))return"unsubscribeByIds."+o}if(null!=e.totalUnread&&e.hasOwnProperty("totalUnread")&&!d.isInteger(e.totalUnread))return"totalUnread: integer expected";if(null!=e.unreadChannels&&e.hasOwnProperty("unreadChannels")&&!d.isInteger(e.unreadChannels))return"unreadChannels: integer expected";if(null!=e.accessPriorHistory&&e.hasOwnProperty("accessPriorHistory")&&"boolean"!=typeof e.accessPriorHistory)return"accessPriorHistory: boolean expected";if(null!=e.nextToken&&e.hasOwnProperty("nextToken")&&!d.isString(e.nextToken))return"nextToken: string expected";if(null!=e.reqParams&&e.hasOwnProperty("reqParams")){if(!d.isObject(e.reqParams))return"reqParams: object expected";for(var n=Object.keys(e.reqParams),r=0;r>>0,e.messageAutoDeletePeriod.high>>>0).toNumber())),null!=e.inviteKeys){if("object"!=typeof e.inviteKeys)throw TypeError(".bin_proto.ChannelQuery.inviteKeys: object expected");t.inviteKeys=p.bin_proto.ChannelInviteKeys.fromObject(e.inviteKeys)}if(null!=e.subscribeByIds){if("object"!=typeof e.subscribeByIds)throw TypeError(".bin_proto.ChannelQuery.subscribeByIds: object expected");t.subscribeByIds=p.bin_proto.SubscribeChannelsByIds.fromObject(e.subscribeByIds)}if(null!=e.unsubscribeByIds){if("object"!=typeof e.unsubscribeByIds)throw TypeError(".bin_proto.ChannelQuery.unsubscribeByIds: object expected");t.unsubscribeByIds=p.bin_proto.UnsubscribeChannelsByIds.fromObject(e.unsubscribeByIds)}if(null!=e.totalUnread&&(t.totalUnread=0|e.totalUnread),null!=e.unreadChannels&&(t.unreadChannels=0|e.unreadChannels),null!=e.accessPriorHistory&&(t.accessPriorHistory=Boolean(e.accessPriorHistory)),null!=e.nextToken&&(t.nextToken=String(e.nextToken)),e.reqParams){if("object"!=typeof e.reqParams)throw TypeError(".bin_proto.ChannelQuery.reqParams: object expected");t.reqParams={};for(var n=Object.keys(e.reqParams),r=0;r>>0,e.messageAutoDeletePeriod.high>>>0).toNumber():e.messageAutoDeletePeriod,t.oneofs&&(r.Data="messageAutoDeletePeriod")),null!=e.nextToken&&e.hasOwnProperty("nextToken")&&(r.nextToken=e.nextToken),e.reqParams&&(n=Object.keys(e.reqParams)).length){r.reqParams={};for(var o=0;o>>3){case 1:r.id=e.string();break;case 2:r.from=e.string();break;case 3:r.channel=p.bin_proto.Channel.decode(e,e.uint32());break;case 4:r.type=e.int32();break;default:e.skipType(7&o)}}return r},e.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.id&&e.hasOwnProperty("id")&&!d.isString(e.id))return"id: string expected";if(null!=e.from&&e.hasOwnProperty("from")&&!d.isString(e.from))return"from: string expected";if(null!=e.channel&&e.hasOwnProperty("channel")){var t=p.bin_proto.Channel.verify(e.channel);if(t)return"channel."+t}if(null!=e.type&&e.hasOwnProperty("type"))switch(e.type){default:return"type: enum value expected";case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:case 9:case 10:case 11:case 12:case 13:case 14:case 15:case 16:case 17:case 18:case 19:case 20:case 21:case 22:case 23:case 24:case 25:case 26:case 27:case 28:case 29:case 30:case 31:case 32:case 33:case 34:case 35:case 36:case 37:case 38:case 39:case 40:case 41:case 42:case 43:case 44:case 45:}return null},e.fromObject=function(e){if(e instanceof p.bin_proto.ChannelAction)return e;var t=new p.bin_proto.ChannelAction;if(null!=e.id&&(t.id=String(e.id)),null!=e.from&&(t.from=String(e.from)),null!=e.channel){if("object"!=typeof e.channel)throw TypeError(".bin_proto.ChannelAction.channel: object expected");t.channel=p.bin_proto.Channel.fromObject(e.channel)}switch(e.type){case"NONE":case 0:t.type=0;break;case"CREATE":case 1:t.type=1;break;case"DELETE":case 2:t.type=2;break;case"LEAVE":case 3:t.type=3;break;case"JOIN":case 4:t.type=4;break;case"UPDATE":case 5:t.type=5;break;case"GET":case 6:t.type=6;break;case"GET_LIST":case 7:t.type=7;break;case"ADD_MEMBER":case 8:t.type=8;break;case"KICK_MEMBER":case 9:t.type=9;break;case"MEMBERS":case 10:t.type=10;break;case"BLOCK":case 11:t.type=11;break;case"UNBLOCK":case 12:t.type=12;break;case"GET_BLOCK_LIST":case 13:t.type=13;break;case"BLOCK_MEMBER":case 14:t.type=14;break;case"UNBLOCK_MEMBER":case 15:t.type=15;break;case"GET_BLOCKED_MEMBER_LIST":case 16:t.type=16;break;case"CHANGE_OWNER":case 17:t.type=17;break;case"CHANGE_ROLE":case 18:t.type=18;break;case"GET_ROLES":case 19:t.type=19;break;case"DELETE_MESSAGES_FOR_ME":case 20:t.type=20;break;case"HIDE_CHANNELS":case 21:t.type=21;break;case"UNHIDE_CHANNELS":case 22:t.type=22;break;case"ARCHIVE_CHANNELS":case 23:t.type=23;break;case"UNARCHIVE_CHANNELS":case 24:t.type=24;break;case"GET_ARCHIVED_CHANNELS":case 25:t.type=25;break;case"GET_HIDDEN_CHANNELS":case 26:t.type=26;break;case"MARK_AS_UNREAD":case 27:t.type=27;break;case"GET_UNREADS":case 28:t.type=28;break;case"MUTE_CHANNELS":case 29:t.type=29;break;case"UNMUTE_CHANNELS":case 30:t.type=30;break;case"GET_MUTED_CHANNELS":case 31:t.type=31;break;case"MARK_AS_READ":case 32:t.type=32;break;case"ATTACHMENTS":case 33:t.type=33;break;case"PIN_CHANNELS":case 34:t.type=34;break;case"UNPIN_CHANNELS":case 35:t.type=35;break;case"CREATE_THREAD":case 36:t.type=36;break;case"GET_THREADS":case 37:t.type=37;break;case"DELETE_MESSAGES_FOR_EVERYONE":case 38:t.type=38;break;case"MESSAGE_AUTO_DELETE_PERIOD":case 39:t.type=39;break;case"FREEZE_CHANNEL":case 40:t.type=40;break;case"UNFREEZE_CHANNEL":case 41:t.type=41;break;case"JOIN_BY_INVITE_KEY":case 42:t.type=42;break;case"GET_BY_INVITE_KEY":case 43:t.type=43;break;case"SUBSCRIBE_BY_IDS":case 44:t.type=44;break;case"UNSUBSCRIBE_BY_IDS":case 45:t.type=45}return t},e.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.id="",n.from="",n.channel=null,n.type=t.enums===String?"NONE":0),null!=e.id&&e.hasOwnProperty("id")&&(n.id=e.id),null!=e.from&&e.hasOwnProperty("from")&&(n.from=e.from),null!=e.channel&&e.hasOwnProperty("channel")&&(n.channel=p.bin_proto.Channel.toObject(e.channel,t)),null!=e.type&&e.hasOwnProperty("type")&&(n.type=t.enums===String?p.bin_proto.ChannelQuery.Type[e.type]:e.type),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,l.util.toJSONOptions)},e}(),i.Members=function(){function e(e){if(this.list=[],e)for(var t=Object.keys(e),n=0;n>>3){case 1:r.channelId=e.string();break;case 2:r.type=e.int32();break;case 3:r.order=e.int32();break;case 4:r.key=e.int32();break;case 5:r.list&&r.list.length||(r.list=[]),r.list.push(p.bin_proto.Member.decode(e,e.uint32()));break;case 6:r.filter=e.int32();break;case 7:r.filterData=e.string();break;case 8:r.hasNext=e.bool();break;default:e.skipType(7&o)}}return r},e.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.channelId&&e.hasOwnProperty("channelId")&&!d.isString(e.channelId))return"channelId: string expected";if(null!=e.type&&e.hasOwnProperty("type"))switch(e.type){default:return"type: enum value expected";case 0:case 1:}if(null!=e.order&&e.hasOwnProperty("order"))switch(e.order){default:return"order: enum value expected";case 0:case 1:case 2:}if(null!=e.key&&e.hasOwnProperty("key"))switch(e.key){default:return"key: enum value expected";case 0:case 1:case 2:}if(null!=e.list&&e.hasOwnProperty("list")){if(!Array.isArray(e.list))return"list: array expected";for(var t=0;t>>3){case 2:r.order=e.int32();break;case 3:r.list&&r.list.length||(r.list=[]),r.list.push(p.bin_proto.Channel.decode(e,e.uint32()));break;case 4:r.HasNext=e.bool();break;default:e.skipType(7&o)}}return r},e.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.order&&e.hasOwnProperty("order"))switch(e.order){default:return"order: enum value expected";case 0:case 1:}if(null!=e.list&&e.hasOwnProperty("list")){if(!Array.isArray(e.list))return"list: array expected";for(var t=0;t>>3==1?(r.list&&r.list.length||(r.list=[]),r.list.push(e.string())):e.skipType(7&o)}return r},e.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.list&&e.hasOwnProperty("list")){if(!Array.isArray(e.list))return"list: array expected";for(var t=0;t>>3==1?(r.channelIds&&r.channelIds.length||(r.channelIds=[]),r.channelIds.push(e.string())):e.skipType(7&o)}return r},e.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.channelIds&&e.hasOwnProperty("channelIds")){if(!Array.isArray(e.channelIds))return"channelIds: array expected";for(var t=0;t>>3==1?(r.channelIds&&r.channelIds.length||(r.channelIds=[]),r.channelIds.push(e.string())):e.skipType(7&o)}return r},e.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.channelIds&&e.hasOwnProperty("channelIds")){if(!Array.isArray(e.channelIds))return"channelIds: array expected";for(var t=0;t>>3){case 1:o.id=e.string();break;case 2:o.channelId=e.string();break;case 3:o.search=p.bin_proto.ChannelAttachments.SearchOpts.decode(e,e.uint32());break;case 4:o.list&&o.list.length||(o.list=[]),o.list.push(p.bin_proto.Attachment.decode(e,e.uint32()));break;case 5:o.hasNext=e.bool();break;case 6:o.TotalCount=e.int64();break;case 7:e.skip().pos++,o.users===d.emptyObject&&(o.users={}),n=e.string(),e.pos++,o.users[n]=p.bin_proto.User.decode(e,e.uint32());break;default:e.skipType(7&i)}}return o},e.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.id&&e.hasOwnProperty("id")&&!d.isString(e.id))return"id: string expected";if(null!=e.channelId&&e.hasOwnProperty("channelId")&&!d.isString(e.channelId))return"channelId: string expected";if(null!=e.search&&e.hasOwnProperty("search")&&(r=p.bin_proto.ChannelAttachments.SearchOpts.verify(e.search)))return"search."+r;if(null!=e.list&&e.hasOwnProperty("list")){if(!Array.isArray(e.list))return"list: array expected";for(var t=0;t>>0,e.TotalCount.high>>>0).toNumber())),e.users){if("object"!=typeof e.users)throw TypeError(".bin_proto.ChannelAttachments.users: object expected");t.users={};var r=Object.keys(e.users);for(n=0;n>>0,e.TotalCount.high>>>0).toNumber():e.TotalCount),e.users&&(n=Object.keys(e.users)).length)for(r.users={},i=0;i>>3){case 1:r.count=e.int32();break;case 2:r.direction=e.int32();break;case 4:r.attachmentId=e.uint64();break;case 5:r.timestamp=e.int64();break;case 6:r.types&&r.types.length||(r.types=[]),r.types.push(e.string());break;default:e.skipType(7&o)}}return r},e.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!=typeof e||null===e)return"object expected";var t={};if(null!=e.count&&e.hasOwnProperty("count")&&!d.isInteger(e.count))return"count: integer expected";if(null!=e.direction&&e.hasOwnProperty("direction"))switch(e.direction){default:return"direction: enum value expected";case 0:case 1:case 2:case 3:}if(null!=e.attachmentId&&e.hasOwnProperty("attachmentId")&&(t.sortby=1,!(d.isInteger(e.attachmentId)||e.attachmentId&&d.isInteger(e.attachmentId.low)&&d.isInteger(e.attachmentId.high))))return"attachmentId: integer|Long expected";if(null!=e.timestamp&&e.hasOwnProperty("timestamp")){if(1===t.sortby)return"sortby: multiple values";if(t.sortby=1,!(d.isInteger(e.timestamp)||e.timestamp&&d.isInteger(e.timestamp.low)&&d.isInteger(e.timestamp.high)))return"timestamp: integer|Long expected"}if(null!=e.types&&e.hasOwnProperty("types")){if(!Array.isArray(e.types))return"types: array expected";for(var n=0;n>>0,e.attachmentId.high>>>0).toNumber(!0))),null!=e.timestamp&&(d.Long?(t.timestamp=d.Long.fromValue(e.timestamp)).unsigned=!1:"string"==typeof e.timestamp?t.timestamp=parseInt(e.timestamp,10):"number"==typeof e.timestamp?t.timestamp=e.timestamp:"object"==typeof e.timestamp&&(t.timestamp=new d.LongBits(e.timestamp.low>>>0,e.timestamp.high>>>0).toNumber())),e.types){if(!Array.isArray(e.types))throw TypeError(".bin_proto.ChannelAttachments.SearchOpts.types: array expected");t.types=[];for(var n=0;n>>0,e.attachmentId.high>>>0).toNumber(!0):e.attachmentId,t.oneofs&&(n.sortby="attachmentId")),null!=e.timestamp&&e.hasOwnProperty("timestamp")&&("number"==typeof e.timestamp?n.timestamp=t.longs===String?String(e.timestamp):e.timestamp:n.timestamp=t.longs===String?d.Long.prototype.toString.call(e.timestamp):t.longs===Number?new d.LongBits(e.timestamp.low>>>0,e.timestamp.high>>>0).toNumber():e.timestamp,t.oneofs&&(n.sortby="timestamp")),e.types&&e.types.length){n.types=[];for(var r=0;r>>3){case 1:o.id=e.string();break;case 2:o.channelId=e.string();break;case 3:o.from=p.bin_proto.User.decode(e,e.uint32());break;case 4:o.name=e.string();break;case 5:e.skip().pos++,o.data===d.emptyObject&&(o.data={}),n=e.string(),e.pos++,o.data[n]=e.string();break;default:e.skipType(7&i)}}return o},e.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.id&&e.hasOwnProperty("id")&&!d.isString(e.id))return"id: string expected";if(null!=e.channelId&&e.hasOwnProperty("channelId")&&!d.isString(e.channelId))return"channelId: string expected";if(null!=e.from&&e.hasOwnProperty("from")){var t=p.bin_proto.User.verify(e.from);if(t)return"from."+t}if(null!=e.name&&e.hasOwnProperty("name")&&!d.isString(e.name))return"name: string expected";if(null!=e.data&&e.hasOwnProperty("data")){if(!d.isObject(e.data))return"data: object expected";for(var n=Object.keys(e.data),r=0;r>>3){case 3:r.parentChannelId=e.string();break;case 4:r.parentMessageId=e.int64();break;default:e.skipType(7&o)}}return r},e.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},e.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.parentChannelId&&e.hasOwnProperty("parentChannelId")&&!d.isString(e.parentChannelId)?"parentChannelId: string expected":null!=e.parentMessageId&&e.hasOwnProperty("parentMessageId")&&!(d.isInteger(e.parentMessageId)||e.parentMessageId&&d.isInteger(e.parentMessageId.low)&&d.isInteger(e.parentMessageId.high))?"parentMessageId: integer|Long expected":null},e.fromObject=function(e){if(e instanceof p.bin_proto.ThreadQuery)return e;var t=new p.bin_proto.ThreadQuery;return null!=e.parentChannelId&&(t.parentChannelId=String(e.parentChannelId)),null!=e.parentMessageId&&(d.Long?(t.parentMessageId=d.Long.fromValue(e.parentMessageId)).unsigned=!1:"string"==typeof e.parentMessageId?t.parentMessageId=parseInt(e.parentMessageId,10):"number"==typeof e.parentMessageId?t.parentMessageId=e.parentMessageId:"object"==typeof e.parentMessageId&&(t.parentMessageId=new d.LongBits(e.parentMessageId.low>>>0,e.parentMessageId.high>>>0).toNumber())),t},e.toObject=function(e,t){t||(t={});var n={};if(t.defaults)if(n.parentChannelId="",d.Long){var r=new d.Long(0,0,!1);n.parentMessageId=t.longs===String?r.toString():t.longs===Number?r.toNumber():r}else n.parentMessageId=t.longs===String?"0":0;return null!=e.parentChannelId&&e.hasOwnProperty("parentChannelId")&&(n.parentChannelId=e.parentChannelId),null!=e.parentMessageId&&e.hasOwnProperty("parentMessageId")&&("number"==typeof e.parentMessageId?n.parentMessageId=t.longs===String?String(e.parentMessageId):e.parentMessageId:n.parentMessageId=t.longs===String?d.Long.prototype.toString.call(e.parentMessageId):t.longs===Number?new d.LongBits(e.parentMessageId.low>>>0,e.parentMessageId.high>>>0).toNumber():e.parentMessageId),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,l.util.toJSONOptions)},e}(),i.PinnedMessagesQuery=function(){function e(e){if(this.messageIds=[],this.messages=[],this.pins=[],e)for(var t=Object.keys(e),n=0;n>>3){case 1:r.id=e.string();break;case 2:r.from=e.string();break;case 3:r.type=e.int32();break;case 4:r.channelId=e.string();break;case 5:r.pinTill=e.int64();break;case 6:r.messageIds&&r.messageIds.length||(r.messageIds=[]),r.messageIds.push(e.string());break;case 7:r.messages&&r.messages.length||(r.messages=[]),r.messages.push(p.bin_proto.Message.decode(e,e.uint32()));break;case 8:r.nextToken=e.string();break;case 9:r.order=e.int32();break;case 10:r.count=e.int32();break;case 11:r.pinType=e.int32();break;case 12:r.pins&&r.pins.length||(r.pins=[]),r.pins.push(p.bin_proto.PinnedMessage.decode(e,e.uint32()));break;case 13:r.changed=e.bool();break;default:e.skipType(7&o)}}return r},e.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.id&&e.hasOwnProperty("id")&&!d.isString(e.id))return"id: string expected";if(null!=e.from&&e.hasOwnProperty("from")&&!d.isString(e.from))return"from: string expected";if(null!=e.type&&e.hasOwnProperty("type"))switch(e.type){default:return"type: enum value expected";case 0:case 1:case 2:}if(null!=e.channelId&&e.hasOwnProperty("channelId")&&!d.isString(e.channelId))return"channelId: string expected";if(null!=e.pinTill&&e.hasOwnProperty("pinTill")&&!(d.isInteger(e.pinTill)||e.pinTill&&d.isInteger(e.pinTill.low)&&d.isInteger(e.pinTill.high)))return"pinTill: integer|Long expected";if(null!=e.messageIds&&e.hasOwnProperty("messageIds")){if(!Array.isArray(e.messageIds))return"messageIds: array expected";for(var t=0;t>>0,e.pinTill.high>>>0).toNumber())),e.messageIds){if(!Array.isArray(e.messageIds))throw TypeError(".bin_proto.PinnedMessagesQuery.messageIds: array expected");t.messageIds=[];for(var n=0;n>>0,e.pinTill.high>>>0).toNumber():e.pinTill),e.messageIds&&e.messageIds.length){n.messageIds=[];for(var o=0;o>>3){case 1:r.id=e.int64();break;case 2:r.pinnedBy=p.bin_proto.User.decode(e,e.uint32());break;case 3:r.message=p.bin_proto.Message.decode(e,e.uint32());break;default:e.skipType(7&o)}}return r},e.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},e.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.id&&e.hasOwnProperty("id")&&!(d.isInteger(e.id)||e.id&&d.isInteger(e.id.low)&&d.isInteger(e.id.high))?"id: integer|Long expected":null!=e.pinnedBy&&e.hasOwnProperty("pinnedBy")&&(t=p.bin_proto.User.verify(e.pinnedBy))?"pinnedBy."+t:null!=e.message&&e.hasOwnProperty("message")&&(t=p.bin_proto.Message.verify(e.message))?"message."+t:null;var t},e.fromObject=function(e){if(e instanceof p.bin_proto.PinnedMessage)return e;var t=new p.bin_proto.PinnedMessage;if(null!=e.id&&(d.Long?(t.id=d.Long.fromValue(e.id)).unsigned=!1:"string"==typeof e.id?t.id=parseInt(e.id,10):"number"==typeof e.id?t.id=e.id:"object"==typeof e.id&&(t.id=new d.LongBits(e.id.low>>>0,e.id.high>>>0).toNumber())),null!=e.pinnedBy){if("object"!=typeof e.pinnedBy)throw TypeError(".bin_proto.PinnedMessage.pinnedBy: object expected");t.pinnedBy=p.bin_proto.User.fromObject(e.pinnedBy)}if(null!=e.message){if("object"!=typeof e.message)throw TypeError(".bin_proto.PinnedMessage.message: object expected");t.message=p.bin_proto.Message.fromObject(e.message)}return t},e.toObject=function(e,t){t||(t={});var n={};if(t.defaults){if(d.Long){var r=new d.Long(0,0,!1);n.id=t.longs===String?r.toString():t.longs===Number?r.toNumber():r}else n.id=t.longs===String?"0":0;n.pinnedBy=null,n.message=null}return null!=e.id&&e.hasOwnProperty("id")&&("number"==typeof e.id?n.id=t.longs===String?String(e.id):e.id:n.id=t.longs===String?d.Long.prototype.toString.call(e.id):t.longs===Number?new d.LongBits(e.id.low>>>0,e.id.high>>>0).toNumber():e.id),null!=e.pinnedBy&&e.hasOwnProperty("pinnedBy")&&(n.pinnedBy=p.bin_proto.User.toObject(e.pinnedBy,t)),null!=e.message&&e.hasOwnProperty("message")&&(n.message=p.bin_proto.Message.toObject(e.message,t)),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,l.util.toJSONOptions)},e}(),i.Attachment=function(){function e(e){if(e)for(var t=Object.keys(e),n=0;n>>3){case 1:r.name=e.string();break;case 2:r.type=e.string();break;case 3:r.meta=e.string();break;case 4:r.data=e.string();break;case 5:r.size=e.int64();break;case 6:r.messageId=e.uint64();break;case 7:r.id=e.uint64();break;case 8:r.createdAt=e.int64();break;case 9:r.userId=e.string();break;default:e.skipType(7&o)}}return r},e.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},e.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.name&&e.hasOwnProperty("name")&&!d.isString(e.name)?"name: string expected":null!=e.type&&e.hasOwnProperty("type")&&!d.isString(e.type)?"type: string expected":null!=e.meta&&e.hasOwnProperty("meta")&&!d.isString(e.meta)?"meta: string expected":null!=e.data&&e.hasOwnProperty("data")&&!d.isString(e.data)?"data: string expected":null!=e.size&&e.hasOwnProperty("size")&&!(d.isInteger(e.size)||e.size&&d.isInteger(e.size.low)&&d.isInteger(e.size.high))?"size: integer|Long expected":null!=e.messageId&&e.hasOwnProperty("messageId")&&!(d.isInteger(e.messageId)||e.messageId&&d.isInteger(e.messageId.low)&&d.isInteger(e.messageId.high))?"messageId: integer|Long expected":null!=e.id&&e.hasOwnProperty("id")&&!(d.isInteger(e.id)||e.id&&d.isInteger(e.id.low)&&d.isInteger(e.id.high))?"id: integer|Long expected":null!=e.createdAt&&e.hasOwnProperty("createdAt")&&!(d.isInteger(e.createdAt)||e.createdAt&&d.isInteger(e.createdAt.low)&&d.isInteger(e.createdAt.high))?"createdAt: integer|Long expected":null!=e.userId&&e.hasOwnProperty("userId")&&!d.isString(e.userId)?"userId: string expected":null},e.fromObject=function(e){if(e instanceof p.bin_proto.Attachment)return e;var t=new p.bin_proto.Attachment;return null!=e.name&&(t.name=String(e.name)),null!=e.type&&(t.type=String(e.type)),null!=e.meta&&(t.meta=String(e.meta)),null!=e.data&&(t.data=String(e.data)),null!=e.size&&(d.Long?(t.size=d.Long.fromValue(e.size)).unsigned=!1:"string"==typeof e.size?t.size=parseInt(e.size,10):"number"==typeof e.size?t.size=e.size:"object"==typeof e.size&&(t.size=new d.LongBits(e.size.low>>>0,e.size.high>>>0).toNumber())),null!=e.messageId&&(d.Long?(t.messageId=d.Long.fromValue(e.messageId)).unsigned=!0:"string"==typeof e.messageId?t.messageId=parseInt(e.messageId,10):"number"==typeof e.messageId?t.messageId=e.messageId:"object"==typeof e.messageId&&(t.messageId=new d.LongBits(e.messageId.low>>>0,e.messageId.high>>>0).toNumber(!0))),null!=e.id&&(d.Long?(t.id=d.Long.fromValue(e.id)).unsigned=!0:"string"==typeof e.id?t.id=parseInt(e.id,10):"number"==typeof e.id?t.id=e.id:"object"==typeof e.id&&(t.id=new d.LongBits(e.id.low>>>0,e.id.high>>>0).toNumber(!0))),null!=e.createdAt&&(d.Long?(t.createdAt=d.Long.fromValue(e.createdAt)).unsigned=!1:"string"==typeof e.createdAt?t.createdAt=parseInt(e.createdAt,10):"number"==typeof e.createdAt?t.createdAt=e.createdAt:"object"==typeof e.createdAt&&(t.createdAt=new d.LongBits(e.createdAt.low>>>0,e.createdAt.high>>>0).toNumber())),null!=e.userId&&(t.userId=String(e.userId)),t},e.toObject=function(e,t){t||(t={});var n={};if(t.defaults){if(n.name="",n.type="",n.meta="",n.data="",d.Long){var r=new d.Long(0,0,!1);n.size=t.longs===String?r.toString():t.longs===Number?r.toNumber():r}else n.size=t.longs===String?"0":0;d.Long?(r=new d.Long(0,0,!0),n.messageId=t.longs===String?r.toString():t.longs===Number?r.toNumber():r):n.messageId=t.longs===String?"0":0,d.Long?(r=new d.Long(0,0,!0),n.id=t.longs===String?r.toString():t.longs===Number?r.toNumber():r):n.id=t.longs===String?"0":0,d.Long?(r=new d.Long(0,0,!1),n.createdAt=t.longs===String?r.toString():t.longs===Number?r.toNumber():r):n.createdAt=t.longs===String?"0":0,n.userId=""}return null!=e.name&&e.hasOwnProperty("name")&&(n.name=e.name),null!=e.type&&e.hasOwnProperty("type")&&(n.type=e.type),null!=e.meta&&e.hasOwnProperty("meta")&&(n.meta=e.meta),null!=e.data&&e.hasOwnProperty("data")&&(n.data=e.data),null!=e.size&&e.hasOwnProperty("size")&&("number"==typeof e.size?n.size=t.longs===String?String(e.size):e.size:n.size=t.longs===String?d.Long.prototype.toString.call(e.size):t.longs===Number?new d.LongBits(e.size.low>>>0,e.size.high>>>0).toNumber():e.size),null!=e.messageId&&e.hasOwnProperty("messageId")&&("number"==typeof e.messageId?n.messageId=t.longs===String?String(e.messageId):e.messageId:n.messageId=t.longs===String?d.Long.prototype.toString.call(e.messageId):t.longs===Number?new d.LongBits(e.messageId.low>>>0,e.messageId.high>>>0).toNumber(!0):e.messageId),null!=e.id&&e.hasOwnProperty("id")&&("number"==typeof e.id?n.id=t.longs===String?String(e.id):e.id:n.id=t.longs===String?d.Long.prototype.toString.call(e.id):t.longs===Number?new d.LongBits(e.id.low>>>0,e.id.high>>>0).toNumber(!0):e.id),null!=e.createdAt&&e.hasOwnProperty("createdAt")&&("number"==typeof e.createdAt?n.createdAt=t.longs===String?String(e.createdAt):e.createdAt:n.createdAt=t.longs===String?d.Long.prototype.toString.call(e.createdAt):t.longs===Number?new d.LongBits(e.createdAt.low>>>0,e.createdAt.high>>>0).toNumber():e.createdAt),null!=e.userId&&e.hasOwnProperty("userId")&&(n.userId=e.userId),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,l.util.toJSONOptions)},e}(),i.ReactionCount=function(){function e(e){if(e)for(var t=Object.keys(e),n=0;n>>3){case 1:r.key=e.string();break;case 2:r.count=e.int64();break;case 3:r.score=e.int64();break;default:e.skipType(7&o)}}return r},e.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},e.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.key&&e.hasOwnProperty("key")&&!d.isString(e.key)?"key: string expected":null!=e.count&&e.hasOwnProperty("count")&&!(d.isInteger(e.count)||e.count&&d.isInteger(e.count.low)&&d.isInteger(e.count.high))?"count: integer|Long expected":null!=e.score&&e.hasOwnProperty("score")&&!(d.isInteger(e.score)||e.score&&d.isInteger(e.score.low)&&d.isInteger(e.score.high))?"score: integer|Long expected":null},e.fromObject=function(e){if(e instanceof p.bin_proto.ReactionCount)return e;var t=new p.bin_proto.ReactionCount;return null!=e.key&&(t.key=String(e.key)),null!=e.count&&(d.Long?(t.count=d.Long.fromValue(e.count)).unsigned=!1:"string"==typeof e.count?t.count=parseInt(e.count,10):"number"==typeof e.count?t.count=e.count:"object"==typeof e.count&&(t.count=new d.LongBits(e.count.low>>>0,e.count.high>>>0).toNumber())),null!=e.score&&(d.Long?(t.score=d.Long.fromValue(e.score)).unsigned=!1:"string"==typeof e.score?t.score=parseInt(e.score,10):"number"==typeof e.score?t.score=e.score:"object"==typeof e.score&&(t.score=new d.LongBits(e.score.low>>>0,e.score.high>>>0).toNumber())),t},e.toObject=function(e,t){t||(t={});var n={};if(t.defaults){if(n.key="",d.Long){var r=new d.Long(0,0,!1);n.count=t.longs===String?r.toString():t.longs===Number?r.toNumber():r}else n.count=t.longs===String?"0":0;d.Long?(r=new d.Long(0,0,!1),n.score=t.longs===String?r.toString():t.longs===Number?r.toNumber():r):n.score=t.longs===String?"0":0}return null!=e.key&&e.hasOwnProperty("key")&&(n.key=e.key),null!=e.count&&e.hasOwnProperty("count")&&("number"==typeof e.count?n.count=t.longs===String?String(e.count):e.count:n.count=t.longs===String?d.Long.prototype.toString.call(e.count):t.longs===Number?new d.LongBits(e.count.low>>>0,e.count.high>>>0).toNumber():e.count),null!=e.score&&e.hasOwnProperty("score")&&("number"==typeof e.score?n.score=t.longs===String?String(e.score):e.score:n.score=t.longs===String?d.Long.prototype.toString.call(e.score):t.longs===Number?new d.LongBits(e.score.low>>>0,e.score.high>>>0).toNumber():e.score),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,l.util.toJSONOptions)},e}(),i.ReactionObj=function(){function e(e){if(e)for(var t=Object.keys(e),n=0;n>>3){case 1:r.key=e.string();break;case 2:r.score=e.int32();break;case 3:r.reason=e.string();break;case 4:r.user=p.bin_proto.User.decode(e,e.uint32());break;case 5:r.createdAt=e.int64();break;case 6:r.updatedAt=e.int64();break;case 7:r.properties=e.int32();break;case 8:r.id=e.int64();break;case 9:r.messageId=e.int64();break;default:e.skipType(7&o)}}return r},e.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.key&&e.hasOwnProperty("key")&&!d.isString(e.key))return"key: string expected";if(null!=e.score&&e.hasOwnProperty("score")&&!d.isInteger(e.score))return"score: integer expected";if(null!=e.reason&&e.hasOwnProperty("reason")&&!d.isString(e.reason))return"reason: string expected";if(null!=e.user&&e.hasOwnProperty("user")){var t=p.bin_proto.User.verify(e.user);if(t)return"user."+t}return null!=e.createdAt&&e.hasOwnProperty("createdAt")&&!(d.isInteger(e.createdAt)||e.createdAt&&d.isInteger(e.createdAt.low)&&d.isInteger(e.createdAt.high))?"createdAt: integer|Long expected":null!=e.updatedAt&&e.hasOwnProperty("updatedAt")&&!(d.isInteger(e.updatedAt)||e.updatedAt&&d.isInteger(e.updatedAt.low)&&d.isInteger(e.updatedAt.high))?"updatedAt: integer|Long expected":null!=e.properties&&e.hasOwnProperty("properties")&&!d.isInteger(e.properties)?"properties: integer expected":null!=e.id&&e.hasOwnProperty("id")&&!(d.isInteger(e.id)||e.id&&d.isInteger(e.id.low)&&d.isInteger(e.id.high))?"id: integer|Long expected":null!=e.messageId&&e.hasOwnProperty("messageId")&&!(d.isInteger(e.messageId)||e.messageId&&d.isInteger(e.messageId.low)&&d.isInteger(e.messageId.high))?"messageId: integer|Long expected":null},e.fromObject=function(e){if(e instanceof p.bin_proto.ReactionObj)return e;var t=new p.bin_proto.ReactionObj;if(null!=e.key&&(t.key=String(e.key)),null!=e.score&&(t.score=0|e.score),null!=e.reason&&(t.reason=String(e.reason)),null!=e.user){if("object"!=typeof e.user)throw TypeError(".bin_proto.ReactionObj.user: object expected");t.user=p.bin_proto.User.fromObject(e.user)}return null!=e.createdAt&&(d.Long?(t.createdAt=d.Long.fromValue(e.createdAt)).unsigned=!1:"string"==typeof e.createdAt?t.createdAt=parseInt(e.createdAt,10):"number"==typeof e.createdAt?t.createdAt=e.createdAt:"object"==typeof e.createdAt&&(t.createdAt=new d.LongBits(e.createdAt.low>>>0,e.createdAt.high>>>0).toNumber())),null!=e.updatedAt&&(d.Long?(t.updatedAt=d.Long.fromValue(e.updatedAt)).unsigned=!1:"string"==typeof e.updatedAt?t.updatedAt=parseInt(e.updatedAt,10):"number"==typeof e.updatedAt?t.updatedAt=e.updatedAt:"object"==typeof e.updatedAt&&(t.updatedAt=new d.LongBits(e.updatedAt.low>>>0,e.updatedAt.high>>>0).toNumber())),null!=e.properties&&(t.properties=0|e.properties),null!=e.id&&(d.Long?(t.id=d.Long.fromValue(e.id)).unsigned=!1:"string"==typeof e.id?t.id=parseInt(e.id,10):"number"==typeof e.id?t.id=e.id:"object"==typeof e.id&&(t.id=new d.LongBits(e.id.low>>>0,e.id.high>>>0).toNumber())),null!=e.messageId&&(d.Long?(t.messageId=d.Long.fromValue(e.messageId)).unsigned=!1:"string"==typeof e.messageId?t.messageId=parseInt(e.messageId,10):"number"==typeof e.messageId?t.messageId=e.messageId:"object"==typeof e.messageId&&(t.messageId=new d.LongBits(e.messageId.low>>>0,e.messageId.high>>>0).toNumber())),t},e.toObject=function(e,t){t||(t={});var n={};if(t.defaults){if(n.key="",n.score=0,n.reason="",n.user=null,d.Long){var r=new d.Long(0,0,!1);n.createdAt=t.longs===String?r.toString():t.longs===Number?r.toNumber():r}else n.createdAt=t.longs===String?"0":0;d.Long?(r=new d.Long(0,0,!1),n.updatedAt=t.longs===String?r.toString():t.longs===Number?r.toNumber():r):n.updatedAt=t.longs===String?"0":0,n.properties=0,d.Long?(r=new d.Long(0,0,!1),n.id=t.longs===String?r.toString():t.longs===Number?r.toNumber():r):n.id=t.longs===String?"0":0,d.Long?(r=new d.Long(0,0,!1),n.messageId=t.longs===String?r.toString():t.longs===Number?r.toNumber():r):n.messageId=t.longs===String?"0":0}return null!=e.key&&e.hasOwnProperty("key")&&(n.key=e.key),null!=e.score&&e.hasOwnProperty("score")&&(n.score=e.score),null!=e.reason&&e.hasOwnProperty("reason")&&(n.reason=e.reason),null!=e.user&&e.hasOwnProperty("user")&&(n.user=p.bin_proto.User.toObject(e.user,t)),null!=e.createdAt&&e.hasOwnProperty("createdAt")&&("number"==typeof e.createdAt?n.createdAt=t.longs===String?String(e.createdAt):e.createdAt:n.createdAt=t.longs===String?d.Long.prototype.toString.call(e.createdAt):t.longs===Number?new d.LongBits(e.createdAt.low>>>0,e.createdAt.high>>>0).toNumber():e.createdAt),null!=e.updatedAt&&e.hasOwnProperty("updatedAt")&&("number"==typeof e.updatedAt?n.updatedAt=t.longs===String?String(e.updatedAt):e.updatedAt:n.updatedAt=t.longs===String?d.Long.prototype.toString.call(e.updatedAt):t.longs===Number?new d.LongBits(e.updatedAt.low>>>0,e.updatedAt.high>>>0).toNumber():e.updatedAt),null!=e.properties&&e.hasOwnProperty("properties")&&(n.properties=e.properties),null!=e.id&&e.hasOwnProperty("id")&&("number"==typeof e.id?n.id=t.longs===String?String(e.id):e.id:n.id=t.longs===String?d.Long.prototype.toString.call(e.id):t.longs===Number?new d.LongBits(e.id.low>>>0,e.id.high>>>0).toNumber():e.id),null!=e.messageId&&e.hasOwnProperty("messageId")&&("number"==typeof e.messageId?n.messageId=t.longs===String?String(e.messageId):e.messageId:n.messageId=t.longs===String?d.Long.prototype.toString.call(e.messageId):t.longs===Number?new d.LongBits(e.messageId.low>>>0,e.messageId.high>>>0).toNumber():e.messageId),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,l.util.toJSONOptions)},e.PropertyMask=function(){var e={},t=Object.create(e);return t[e[0]="PROPERTY_MASK_NONE"]=0,t[e[1]="PROPERTY_MASK_SILENT"]=1,t}(),e}(),i.Reaction=function(){function e(e){if(this.countList=[],this.selfObjs=[],this.reactionObjs=[],e)for(var t=Object.keys(e),n=0;n>>3){case 1:r.messageId=e.uint64();break;case 2:r.isUnique=e.bool();break;case 3:r.countList&&r.countList.length||(r.countList=[]),r.countList.push(p.bin_proto.ReactionCount.decode(e,e.uint32()));break;case 5:r.selfObjs&&r.selfObjs.length||(r.selfObjs=[]),r.selfObjs.push(p.bin_proto.ReactionObj.decode(e,e.uint32()));break;case 6:r.reactionObjs&&r.reactionObjs.length||(r.reactionObjs=[]),r.reactionObjs.push(p.bin_proto.ReactionObj.decode(e,e.uint32()));break;default:e.skipType(7&o)}}return r},e.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.messageId&&e.hasOwnProperty("messageId")&&!(d.isInteger(e.messageId)||e.messageId&&d.isInteger(e.messageId.low)&&d.isInteger(e.messageId.high)))return"messageId: integer|Long expected";if(null!=e.isUnique&&e.hasOwnProperty("isUnique")&&"boolean"!=typeof e.isUnique)return"isUnique: boolean expected";if(null!=e.countList&&e.hasOwnProperty("countList")){if(!Array.isArray(e.countList))return"countList: array expected";for(var t=0;t>>0,e.messageId.high>>>0).toNumber(!0))),null!=e.isUnique&&(t.isUnique=Boolean(e.isUnique)),e.countList){if(!Array.isArray(e.countList))throw TypeError(".bin_proto.Reaction.countList: array expected");t.countList=[];for(var n=0;n>>0,e.messageId.high>>>0).toNumber(!0):e.messageId),null!=e.isUnique&&e.hasOwnProperty("isUnique")&&(n.isUnique=e.isUnique),e.countList&&e.countList.length){n.countList=[];for(var o=0;o>>3){case 1:r.id=e.string();break;case 3:r.messageId=e.uint64();break;case 5:r.list&&r.list.length||(r.list=[]),r.list.push(p.bin_proto.ReactionObj.decode(e,e.uint32()));break;case 6:r.hasNext=e.bool();break;case 7:r.nextToken=e.string();break;case 8:r.limit=e.int32();break;case 9:r.reactionId=e.int64();break;case 10:r.reactionKey=e.string();break;default:e.skipType(7&o)}}return r},e.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.id&&e.hasOwnProperty("id")&&!d.isString(e.id))return"id: string expected";if(null!=e.messageId&&e.hasOwnProperty("messageId")&&!(d.isInteger(e.messageId)||e.messageId&&d.isInteger(e.messageId.low)&&d.isInteger(e.messageId.high)))return"messageId: integer|Long expected";if(null!=e.list&&e.hasOwnProperty("list")){if(!Array.isArray(e.list))return"list: array expected";for(var t=0;t>>0,e.messageId.high>>>0).toNumber(!0))),e.list){if(!Array.isArray(e.list))throw TypeError(".bin_proto.ReactionSearchQuery.list: array expected");t.list=[];for(var n=0;n>>0,e.reactionId.high>>>0).toNumber())),null!=e.reactionKey&&(t.reactionKey=String(e.reactionKey)),t},e.toObject=function(e,t){t||(t={});var n={};if((t.arrays||t.defaults)&&(n.list=[]),t.defaults){if(n.id="",d.Long){var r=new d.Long(0,0,!0);n.messageId=t.longs===String?r.toString():t.longs===Number?r.toNumber():r}else n.messageId=t.longs===String?"0":0;n.hasNext=!1,n.nextToken="",n.limit=0,d.Long?(r=new d.Long(0,0,!1),n.reactionId=t.longs===String?r.toString():t.longs===Number?r.toNumber():r):n.reactionId=t.longs===String?"0":0,n.reactionKey=""}if(null!=e.id&&e.hasOwnProperty("id")&&(n.id=e.id),null!=e.messageId&&e.hasOwnProperty("messageId")&&("number"==typeof e.messageId?n.messageId=t.longs===String?String(e.messageId):e.messageId:n.messageId=t.longs===String?d.Long.prototype.toString.call(e.messageId):t.longs===Number?new d.LongBits(e.messageId.low>>>0,e.messageId.high>>>0).toNumber(!0):e.messageId),e.list&&e.list.length){n.list=[];for(var o=0;o>>0,e.reactionId.high>>>0).toNumber():e.reactionId),null!=e.reactionKey&&e.hasOwnProperty("reactionKey")&&(n.reactionKey=e.reactionKey),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,l.util.toJSONOptions)},e}(),i.Mention=function(){function e(e){if(e)for(var t=Object.keys(e),n=0;n>>3==1?r.user=p.bin_proto.User.decode(e,e.uint32()):e.skipType(7&o)}return r},e.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.user&&e.hasOwnProperty("user")){var t=p.bin_proto.User.verify(e.user);if(t)return"user."+t}return null},e.fromObject=function(e){if(e instanceof p.bin_proto.Mention)return e;var t=new p.bin_proto.Mention;if(null!=e.user){if("object"!=typeof e.user)throw TypeError(".bin_proto.Mention.user: object expected");t.user=p.bin_proto.User.fromObject(e.user)}return t},e.toObject=function(e,t){t||(t={});var n={};return null!=e.user&&e.hasOwnProperty("user")&&(n.user=p.bin_proto.User.toObject(e.user,t),t.oneofs&&(n.data="user")),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,l.util.toJSONOptions)},e}(),i.ForwardingDetails=function(){function e(e){if(e)for(var t=Object.keys(e),n=0;n>>3){case 1:r.messageId=e.uint64();break;case 2:r.channelId=e.string();break;case 3:r.user=p.bin_proto.User.decode(e,e.uint32());break;case 4:r.hops=e.int32();break;default:e.skipType(7&o)}}return r},e.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.messageId&&e.hasOwnProperty("messageId")&&!(d.isInteger(e.messageId)||e.messageId&&d.isInteger(e.messageId.low)&&d.isInteger(e.messageId.high)))return"messageId: integer|Long expected";if(null!=e.channelId&&e.hasOwnProperty("channelId")&&!d.isString(e.channelId))return"channelId: string expected";if(null!=e.user&&e.hasOwnProperty("user")){var t=p.bin_proto.User.verify(e.user);if(t)return"user."+t}return null!=e.hops&&e.hasOwnProperty("hops")&&!d.isInteger(e.hops)?"hops: integer expected":null},e.fromObject=function(e){if(e instanceof p.bin_proto.ForwardingDetails)return e;var t=new p.bin_proto.ForwardingDetails;if(null!=e.messageId&&(d.Long?(t.messageId=d.Long.fromValue(e.messageId)).unsigned=!0:"string"==typeof e.messageId?t.messageId=parseInt(e.messageId,10):"number"==typeof e.messageId?t.messageId=e.messageId:"object"==typeof e.messageId&&(t.messageId=new d.LongBits(e.messageId.low>>>0,e.messageId.high>>>0).toNumber(!0))),null!=e.channelId&&(t.channelId=String(e.channelId)),null!=e.user){if("object"!=typeof e.user)throw TypeError(".bin_proto.ForwardingDetails.user: object expected");t.user=p.bin_proto.User.fromObject(e.user)}return null!=e.hops&&(t.hops=0|e.hops),t},e.toObject=function(e,t){t||(t={});var n={};if(t.defaults){if(d.Long){var r=new d.Long(0,0,!0);n.messageId=t.longs===String?r.toString():t.longs===Number?r.toNumber():r}else n.messageId=t.longs===String?"0":0;n.channelId="",n.user=null,n.hops=0}return null!=e.messageId&&e.hasOwnProperty("messageId")&&("number"==typeof e.messageId?n.messageId=t.longs===String?String(e.messageId):e.messageId:n.messageId=t.longs===String?d.Long.prototype.toString.call(e.messageId):t.longs===Number?new d.LongBits(e.messageId.low>>>0,e.messageId.high>>>0).toNumber(!0):e.messageId),null!=e.channelId&&e.hasOwnProperty("channelId")&&(n.channelId=e.channelId),null!=e.user&&e.hasOwnProperty("user")&&(n.user=p.bin_proto.User.toObject(e.user,t)),null!=e.hops&&e.hasOwnProperty("hops")&&(n.hops=e.hops),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,l.util.toJSONOptions)},e}(),i.ReplyingDetails=function(){function e(e){if(e)for(var t=Object.keys(e),n=0;n>>3){case 1:r.replyInThreadCount=e.uint64();break;case 2:r.replyCount=e.uint64();break;case 3:r.threadId=e.uint64();break;default:e.skipType(7&o)}}return r},e.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},e.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.replyInThreadCount&&e.hasOwnProperty("replyInThreadCount")&&!(d.isInteger(e.replyInThreadCount)||e.replyInThreadCount&&d.isInteger(e.replyInThreadCount.low)&&d.isInteger(e.replyInThreadCount.high))?"replyInThreadCount: integer|Long expected":null!=e.replyCount&&e.hasOwnProperty("replyCount")&&!(d.isInteger(e.replyCount)||e.replyCount&&d.isInteger(e.replyCount.low)&&d.isInteger(e.replyCount.high))?"replyCount: integer|Long expected":null!=e.threadId&&e.hasOwnProperty("threadId")&&!(d.isInteger(e.threadId)||e.threadId&&d.isInteger(e.threadId.low)&&d.isInteger(e.threadId.high))?"threadId: integer|Long expected":null},e.fromObject=function(e){if(e instanceof p.bin_proto.ReplyingDetails)return e;var t=new p.bin_proto.ReplyingDetails;return null!=e.replyInThreadCount&&(d.Long?(t.replyInThreadCount=d.Long.fromValue(e.replyInThreadCount)).unsigned=!0:"string"==typeof e.replyInThreadCount?t.replyInThreadCount=parseInt(e.replyInThreadCount,10):"number"==typeof e.replyInThreadCount?t.replyInThreadCount=e.replyInThreadCount:"object"==typeof e.replyInThreadCount&&(t.replyInThreadCount=new d.LongBits(e.replyInThreadCount.low>>>0,e.replyInThreadCount.high>>>0).toNumber(!0))),null!=e.replyCount&&(d.Long?(t.replyCount=d.Long.fromValue(e.replyCount)).unsigned=!0:"string"==typeof e.replyCount?t.replyCount=parseInt(e.replyCount,10):"number"==typeof e.replyCount?t.replyCount=e.replyCount:"object"==typeof e.replyCount&&(t.replyCount=new d.LongBits(e.replyCount.low>>>0,e.replyCount.high>>>0).toNumber(!0))),null!=e.threadId&&(d.Long?(t.threadId=d.Long.fromValue(e.threadId)).unsigned=!0:"string"==typeof e.threadId?t.threadId=parseInt(e.threadId,10):"number"==typeof e.threadId?t.threadId=e.threadId:"object"==typeof e.threadId&&(t.threadId=new d.LongBits(e.threadId.low>>>0,e.threadId.high>>>0).toNumber(!0))),t},e.toObject=function(e,t){t||(t={});var n={};if(t.defaults){if(d.Long){var r=new d.Long(0,0,!0);n.replyInThreadCount=t.longs===String?r.toString():t.longs===Number?r.toNumber():r}else n.replyInThreadCount=t.longs===String?"0":0;d.Long?(r=new d.Long(0,0,!0),n.replyCount=t.longs===String?r.toString():t.longs===Number?r.toNumber():r):n.replyCount=t.longs===String?"0":0,d.Long?(r=new d.Long(0,0,!0),n.threadId=t.longs===String?r.toString():t.longs===Number?r.toNumber():r):n.threadId=t.longs===String?"0":0}return null!=e.replyInThreadCount&&e.hasOwnProperty("replyInThreadCount")&&("number"==typeof e.replyInThreadCount?n.replyInThreadCount=t.longs===String?String(e.replyInThreadCount):e.replyInThreadCount:n.replyInThreadCount=t.longs===String?d.Long.prototype.toString.call(e.replyInThreadCount):t.longs===Number?new d.LongBits(e.replyInThreadCount.low>>>0,e.replyInThreadCount.high>>>0).toNumber(!0):e.replyInThreadCount),null!=e.replyCount&&e.hasOwnProperty("replyCount")&&("number"==typeof e.replyCount?n.replyCount=t.longs===String?String(e.replyCount):e.replyCount:n.replyCount=t.longs===String?d.Long.prototype.toString.call(e.replyCount):t.longs===Number?new d.LongBits(e.replyCount.low>>>0,e.replyCount.high>>>0).toNumber(!0):e.replyCount),null!=e.threadId&&e.hasOwnProperty("threadId")&&("number"==typeof e.threadId?n.threadId=t.longs===String?String(e.threadId):e.threadId:n.threadId=t.longs===String?d.Long.prototype.toString.call(e.threadId):t.longs===Number?new d.LongBits(e.threadId.low>>>0,e.threadId.high>>>0).toNumber(!0):e.threadId),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,l.util.toJSONOptions)},e}(),i.Thread=function(){function e(e){if(this.messages=[],e)for(var t=Object.keys(e),n=0;n>>3){case 1:r.parent=p.bin_proto.MessageObj.decode(e,e.uint32());break;case 2:r.messages&&r.messages.length||(r.messages=[]),r.messages.push(p.bin_proto.MessageObj.decode(e,e.uint32()));break;default:e.skipType(7&o)}}return r},e.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.parent&&e.hasOwnProperty("parent")&&(n=p.bin_proto.MessageObj.verify(e.parent)))return"parent."+n;if(null!=e.messages&&e.hasOwnProperty("messages")){if(!Array.isArray(e.messages))return"messages: array expected";for(var t=0;t>>3==1?(r.list&&r.list.length||(r.list=[]),r.list.push(p.bin_proto.Thread.decode(e,e.uint32()))):e.skipType(7&o)}return r},e.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.list&&e.hasOwnProperty("list")){if(!Array.isArray(e.list))return"list: array expected";for(var t=0;t>>3){case 1:r.type=e.string();break;case 2:r.offset=e.int32();break;case 3:r.length=e.int32();break;case 4:r.metadata=e.string();break;default:e.skipType(7&o)}}return r},e.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},e.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.type&&e.hasOwnProperty("type")&&!d.isString(e.type)?"type: string expected":null!=e.offset&&e.hasOwnProperty("offset")&&!d.isInteger(e.offset)?"offset: integer expected":null!=e.length&&e.hasOwnProperty("length")&&!d.isInteger(e.length)?"length: integer expected":null!=e.metadata&&e.hasOwnProperty("metadata")&&!d.isString(e.metadata)?"metadata: string expected":null},e.fromObject=function(e){if(e instanceof p.bin_proto.BodyAttribute)return e;var t=new p.bin_proto.BodyAttribute;return null!=e.type&&(t.type=String(e.type)),null!=e.offset&&(t.offset=0|e.offset),null!=e.length&&(t.length=0|e.length),null!=e.metadata&&(t.metadata=String(e.metadata)),t},e.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.type="",n.offset=0,n.length=0,n.metadata=""),null!=e.type&&e.hasOwnProperty("type")&&(n.type=e.type),null!=e.offset&&e.hasOwnProperty("offset")&&(n.offset=e.offset),null!=e.length&&e.hasOwnProperty("length")&&(n.length=e.length),null!=e.metadata&&e.hasOwnProperty("metadata")&&(n.metadata=e.metadata),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,l.util.toJSONOptions)},e}(),i.BodyAttributes=function(){function e(e){if(this.list=[],e)for(var t=Object.keys(e),n=0;n>>3==1?(r.list&&r.list.length||(r.list=[]),r.list.push(p.bin_proto.BodyAttribute.decode(e,e.uint32()))):e.skipType(7&o)}return r},e.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.list&&e.hasOwnProperty("list")){if(!Array.isArray(e.list))return"list: array expected";for(var t=0;t>>3){case 1:o.id=e.uint64();break;case 2:o.from=p.bin_proto.User.decode(e,e.uint32());break;case 3:o.to=e.string();break;case 4:o.text=e.string();break;case 5:o.type=e.string();break;case 6:o.date=e.int64();break;case 7:o.tid=e.int64();break;case 8:o.receipt=e.bool();break;case 9:o.status=e.int32();break;case 10:o.chStatus=e.int32();break;case 11:o.attachments&&o.attachments.length||(o.attachments=[]),o.attachments.push(p.bin_proto.Attachment.decode(e,e.uint32()));break;case 12:o.metadata=e.string();break;case 13:o.reaction=p.bin_proto.Reaction.decode(e,e.uint32());break;case 14:o.mentions&&o.mentions.length||(o.mentions=[]),o.mentions.push(p.bin_proto.Mention.decode(e,e.uint32()));break;case 15:o.replyCount=e.int64();break;case 16:o.updatedAt=e.int64();break;case 17:o.properties=e.int32();break;case 18:e.skip().pos++,o.markers===d.emptyObject&&(o.markers={}),n=e.string(),e.pos++,o.markers[n]=e.uint64();break;case 19:o.cid=e.string();break;case 20:o.selfMarkers&&o.selfMarkers.length||(o.selfMarkers=[]),o.selfMarkers.push(e.string());break;case 21:o.assignedReadCount=e.int32();break;case 22:o.saved=e.bool();break;case 23:o.forwardingDetails=p.bin_proto.ForwardingDetails.decode(e,e.uint32());break;case 24:o.userMarkers&&o.userMarkers.length||(o.userMarkers=[]),o.userMarkers.push(p.bin_proto.MessageMarker.decode(e,e.uint32()));break;case 25:o.replyingDetails=p.bin_proto.ReplyingDetails.decode(e,e.uint32());break;case 26:o.createdAt=e.int64();break;case 27:o.bodyAttributes&&o.bodyAttributes.length||(o.bodyAttributes=[]),o.bodyAttributes.push(p.bin_proto.BodyAttribute.decode(e,e.uint32()));break;case 28:o.autoDeleteAt=e.int64();break;case 31:o.disableMentionsCount=e.bool();break;case 32:o.pollDetails=p.bin_proto.PollDetails.decode(e,e.uint32());break;case 33:o.pinDetails=p.bin_proto.PinDetails.decode(e,e.uint32());break;default:e.skipType(7&i)}}return o},e.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.id&&e.hasOwnProperty("id")&&!(d.isInteger(e.id)||e.id&&d.isInteger(e.id.low)&&d.isInteger(e.id.high)))return"id: integer|Long expected";if(null!=e.from&&e.hasOwnProperty("from")&&(r=p.bin_proto.User.verify(e.from)))return"from."+r;if(null!=e.to&&e.hasOwnProperty("to")&&!d.isString(e.to))return"to: string expected";if(null!=e.text&&e.hasOwnProperty("text")&&!d.isString(e.text))return"text: string expected";if(null!=e.type&&e.hasOwnProperty("type")&&!d.isString(e.type))return"type: string expected";if(null!=e.date&&e.hasOwnProperty("date")&&!(d.isInteger(e.date)||e.date&&d.isInteger(e.date.low)&&d.isInteger(e.date.high)))return"date: integer|Long expected";if(null!=e.tid&&e.hasOwnProperty("tid")&&!(d.isInteger(e.tid)||e.tid&&d.isInteger(e.tid.low)&&d.isInteger(e.tid.high)))return"tid: integer|Long expected";if(null!=e.receipt&&e.hasOwnProperty("receipt")&&"boolean"!=typeof e.receipt)return"receipt: boolean expected";if(null!=e.status&&e.hasOwnProperty("status"))switch(e.status){default:return"status: enum value expected";case 0:case 1:case 2:case 3:}if(null!=e.chStatus&&e.hasOwnProperty("chStatus"))switch(e.chStatus){default:return"chStatus: enum value expected";case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:}if(null!=e.attachments&&e.hasOwnProperty("attachments")){if(!Array.isArray(e.attachments))return"attachments: array expected";for(var t=0;t>>0,e.id.high>>>0).toNumber(!0))),null!=e.from){if("object"!=typeof e.from)throw TypeError(".bin_proto.MessageObj.from: object expected");t.from=p.bin_proto.User.fromObject(e.from)}switch(null!=e.to&&(t.to=String(e.to)),null!=e.text&&(t.text=String(e.text)),null!=e.type&&(t.type=String(e.type)),null!=e.date&&(d.Long?(t.date=d.Long.fromValue(e.date)).unsigned=!1:"string"==typeof e.date?t.date=parseInt(e.date,10):"number"==typeof e.date?t.date=e.date:"object"==typeof e.date&&(t.date=new d.LongBits(e.date.low>>>0,e.date.high>>>0).toNumber())),null!=e.tid&&(d.Long?(t.tid=d.Long.fromValue(e.tid)).unsigned=!1:"string"==typeof e.tid?t.tid=parseInt(e.tid,10):"number"==typeof e.tid?t.tid=e.tid:"object"==typeof e.tid&&(t.tid=new d.LongBits(e.tid.low>>>0,e.tid.high>>>0).toNumber())),null!=e.receipt&&(t.receipt=Boolean(e.receipt)),e.status){case"NONE":case 0:t.status=0;break;case"SERVER":case 1:t.status=1;break;case"DELIVERED":case 2:t.status=2;break;case"READ":case 3:t.status=3}switch(e.chStatus){case"NORMAL":case 0:t.chStatus=0;break;case"EDIT":case 1:t.chStatus=1;break;case"DELETE":case 2:t.chStatus=2;break;case"COMPOSING":case 3:t.chStatus=3;break;case"PAUSED":case 4:t.chStatus=4;break;case"DELETE_FOR_ME":case 5:t.chStatus=5;break;case"DELETE_HARD":case 6:t.chStatus=6;break;case"MODERATED":case 7:t.chStatus=7}if(e.attachments){if(!Array.isArray(e.attachments))throw TypeError(".bin_proto.MessageObj.attachments: array expected");t.attachments=[];for(var n=0;n>>0,e.replyCount.high>>>0).toNumber())),null!=e.updatedAt&&(d.Long?(t.updatedAt=d.Long.fromValue(e.updatedAt)).unsigned=!1:"string"==typeof e.updatedAt?t.updatedAt=parseInt(e.updatedAt,10):"number"==typeof e.updatedAt?t.updatedAt=e.updatedAt:"object"==typeof e.updatedAt&&(t.updatedAt=new d.LongBits(e.updatedAt.low>>>0,e.updatedAt.high>>>0).toNumber())),null!=e.properties&&(t.properties=0|e.properties),e.markers){if("object"!=typeof e.markers)throw TypeError(".bin_proto.MessageObj.markers: object expected");t.markers={};var r=Object.keys(e.markers);for(n=0;n>>0,e.markers[r[n]].high>>>0).toNumber(!0))}if(null!=e.cid&&(t.cid=String(e.cid)),e.selfMarkers){if(!Array.isArray(e.selfMarkers))throw TypeError(".bin_proto.MessageObj.selfMarkers: array expected");for(t.selfMarkers=[],n=0;n>>0,e.createdAt.high>>>0).toNumber())),e.bodyAttributes){if(!Array.isArray(e.bodyAttributes))throw TypeError(".bin_proto.MessageObj.bodyAttributes: array expected");for(t.bodyAttributes=[],n=0;n>>0,e.autoDeleteAt.high>>>0).toNumber())),null!=e.disableMentionsCount&&(t.disableMentionsCount=Boolean(e.disableMentionsCount)),null!=e.pollDetails){if("object"!=typeof e.pollDetails)throw TypeError(".bin_proto.MessageObj.pollDetails: object expected");t.pollDetails=p.bin_proto.PollDetails.fromObject(e.pollDetails)}if(null!=e.pinDetails){if("object"!=typeof e.pinDetails)throw TypeError(".bin_proto.MessageObj.pinDetails: object expected");t.pinDetails=p.bin_proto.PinDetails.fromObject(e.pinDetails)}return t},e.toObject=function(e,t){t||(t={});var n,r={};if((t.arrays||t.defaults)&&(r.attachments=[],r.mentions=[],r.selfMarkers=[],r.userMarkers=[],r.bodyAttributes=[]),(t.objects||t.defaults)&&(r.markers={}),t.defaults){if(d.Long){var o=new d.Long(0,0,!0);r.id=t.longs===String?o.toString():t.longs===Number?o.toNumber():o}else r.id=t.longs===String?"0":0;r.from=null,r.to="",r.text="",r.type="",d.Long?(o=new d.Long(0,0,!1),r.date=t.longs===String?o.toString():t.longs===Number?o.toNumber():o):r.date=t.longs===String?"0":0,d.Long?(o=new d.Long(0,0,!1),r.tid=t.longs===String?o.toString():t.longs===Number?o.toNumber():o):r.tid=t.longs===String?"0":0,r.receipt=!1,r.status=t.enums===String?"NONE":0,r.chStatus=t.enums===String?"NORMAL":0,r.metadata="",r.reaction=null,d.Long?(o=new d.Long(0,0,!1),r.replyCount=t.longs===String?o.toString():t.longs===Number?o.toNumber():o):r.replyCount=t.longs===String?"0":0,d.Long?(o=new d.Long(0,0,!1),r.updatedAt=t.longs===String?o.toString():t.longs===Number?o.toNumber():o):r.updatedAt=t.longs===String?"0":0,r.properties=0,r.cid="",r.assignedReadCount=0,r.saved=!1,r.forwardingDetails=null,r.replyingDetails=null,d.Long?(o=new d.Long(0,0,!1),r.createdAt=t.longs===String?o.toString():t.longs===Number?o.toNumber():o):r.createdAt=t.longs===String?"0":0,d.Long?(o=new d.Long(0,0,!1),r.autoDeleteAt=t.longs===String?o.toString():t.longs===Number?o.toNumber():o):r.autoDeleteAt=t.longs===String?"0":0,r.disableMentionsCount=!1,r.pollDetails=null,r.pinDetails=null}if(null!=e.id&&e.hasOwnProperty("id")&&("number"==typeof e.id?r.id=t.longs===String?String(e.id):e.id:r.id=t.longs===String?d.Long.prototype.toString.call(e.id):t.longs===Number?new d.LongBits(e.id.low>>>0,e.id.high>>>0).toNumber(!0):e.id),null!=e.from&&e.hasOwnProperty("from")&&(r.from=p.bin_proto.User.toObject(e.from,t)),null!=e.to&&e.hasOwnProperty("to")&&(r.to=e.to),null!=e.text&&e.hasOwnProperty("text")&&(r.text=e.text),null!=e.type&&e.hasOwnProperty("type")&&(r.type=e.type),null!=e.date&&e.hasOwnProperty("date")&&("number"==typeof e.date?r.date=t.longs===String?String(e.date):e.date:r.date=t.longs===String?d.Long.prototype.toString.call(e.date):t.longs===Number?new d.LongBits(e.date.low>>>0,e.date.high>>>0).toNumber():e.date),null!=e.tid&&e.hasOwnProperty("tid")&&("number"==typeof e.tid?r.tid=t.longs===String?String(e.tid):e.tid:r.tid=t.longs===String?d.Long.prototype.toString.call(e.tid):t.longs===Number?new d.LongBits(e.tid.low>>>0,e.tid.high>>>0).toNumber():e.tid),null!=e.receipt&&e.hasOwnProperty("receipt")&&(r.receipt=e.receipt),null!=e.status&&e.hasOwnProperty("status")&&(r.status=t.enums===String?p.bin_proto.MessageObj.DeliveryStatus[e.status]:e.status),null!=e.chStatus&&e.hasOwnProperty("chStatus")&&(r.chStatus=t.enums===String?p.bin_proto.MessageObj.UpdateStatus[e.chStatus]:e.chStatus),e.attachments&&e.attachments.length){r.attachments=[];for(var i=0;i>>0,e.replyCount.high>>>0).toNumber():e.replyCount),null!=e.updatedAt&&e.hasOwnProperty("updatedAt")&&("number"==typeof e.updatedAt?r.updatedAt=t.longs===String?String(e.updatedAt):e.updatedAt:r.updatedAt=t.longs===String?d.Long.prototype.toString.call(e.updatedAt):t.longs===Number?new d.LongBits(e.updatedAt.low>>>0,e.updatedAt.high>>>0).toNumber():e.updatedAt),null!=e.properties&&e.hasOwnProperty("properties")&&(r.properties=e.properties),e.markers&&(n=Object.keys(e.markers)).length)for(r.markers={},i=0;i>>0,e.markers[n[i]].high>>>0).toNumber(!0):e.markers[n[i]];if(null!=e.cid&&e.hasOwnProperty("cid")&&(r.cid=e.cid),e.selfMarkers&&e.selfMarkers.length)for(r.selfMarkers=[],i=0;i>>0,e.createdAt.high>>>0).toNumber():e.createdAt),e.bodyAttributes&&e.bodyAttributes.length)for(r.bodyAttributes=[],i=0;i>>0,e.autoDeleteAt.high>>>0).toNumber():e.autoDeleteAt),null!=e.disableMentionsCount&&e.hasOwnProperty("disableMentionsCount")&&(r.disableMentionsCount=e.disableMentionsCount),null!=e.pollDetails&&e.hasOwnProperty("pollDetails")&&(r.pollDetails=p.bin_proto.PollDetails.toObject(e.pollDetails,t)),null!=e.pinDetails&&e.hasOwnProperty("pinDetails")&&(r.pinDetails=p.bin_proto.PinDetails.toObject(e.pinDetails,t)),r},e.prototype.toJSON=function(){return this.constructor.toObject(this,l.util.toJSONOptions)},e.DeliveryStatus=function(){var e={},t=Object.create(e);return t[e[0]="NONE"]=0,t[e[1]="SERVER"]=1,t[e[2]="DELIVERED"]=2,t[e[3]="READ"]=3,t}(),e.UpdateStatus=function(){var e={},t=Object.create(e);return t[e[0]="NORMAL"]=0,t[e[1]="EDIT"]=1,t[e[2]="DELETE"]=2,t[e[3]="COMPOSING"]=3,t[e[4]="PAUSED"]=4,t[e[5]="DELETE_FOR_ME"]=5,t[e[6]="DELETE_HARD"]=6,t[e[7]="MODERATED"]=7,t}(),e.PropertyMask=function(){var e={},t=Object.create(e);return t[e[0]="PROPERTY_MASK_NONE"]=0,t[e[1]="PROPERTY_MASK_TRANSIENT"]=1,t[e[2]="PROPERTY_MASK_SILENT"]=2,t[e[4]="PROPERTY_MASK_VIEW_ONCE"]=4,t}(),e}(),i.Message=function(){function e(e){if(e)for(var t=Object.keys(e),n=0;n>>3){case 1:r.message=p.bin_proto.MessageObj.decode(e,e.uint32());break;case 2:r.parent=p.bin_proto.MessageObj.decode(e,e.uint32());break;case 3:r.replyInThread=e.bool();break;case 4:r.direct=e.bool();break;default:e.skipType(7&o)}}return r},e.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},e.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.message&&e.hasOwnProperty("message")&&(t=p.bin_proto.MessageObj.verify(e.message))?"message."+t:null!=e.parent&&e.hasOwnProperty("parent")&&(t=p.bin_proto.MessageObj.verify(e.parent))?"parent."+t:null!=e.replyInThread&&e.hasOwnProperty("replyInThread")&&"boolean"!=typeof e.replyInThread?"replyInThread: boolean expected":null!=e.direct&&e.hasOwnProperty("direct")&&"boolean"!=typeof e.direct?"direct: boolean expected":null;var t},e.fromObject=function(e){if(e instanceof p.bin_proto.Message)return e;var t=new p.bin_proto.Message;if(null!=e.message){if("object"!=typeof e.message)throw TypeError(".bin_proto.Message.message: object expected");t.message=p.bin_proto.MessageObj.fromObject(e.message)}if(null!=e.parent){if("object"!=typeof e.parent)throw TypeError(".bin_proto.Message.parent: object expected");t.parent=p.bin_proto.MessageObj.fromObject(e.parent)}return null!=e.replyInThread&&(t.replyInThread=Boolean(e.replyInThread)),null!=e.direct&&(t.direct=Boolean(e.direct)),t},e.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.message=null,n.parent=null,n.replyInThread=!1,n.direct=!1),null!=e.message&&e.hasOwnProperty("message")&&(n.message=p.bin_proto.MessageObj.toObject(e.message,t)),null!=e.parent&&e.hasOwnProperty("parent")&&(n.parent=p.bin_proto.MessageObj.toObject(e.parent,t)),null!=e.replyInThread&&e.hasOwnProperty("replyInThread")&&(n.replyInThread=e.replyInThread),null!=e.direct&&e.hasOwnProperty("direct")&&(n.direct=e.direct),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,l.util.toJSONOptions)},e}(),i.SystemMessage=function(){function e(e){if(e)for(var t=Object.keys(e),n=0;n>>3){case 1:r.id=e.uint64();break;case 2:r.from=e.string();break;case 3:r.to=e.string();break;case 4:r.text=e.string();break;case 5:r.date=e.int64();break;case 6:r.unreadCount=p.bin_proto.UnreadCount.decode(e,e.uint32());break;default:e.skipType(7&o)}}return r},e.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.id&&e.hasOwnProperty("id")&&!(d.isInteger(e.id)||e.id&&d.isInteger(e.id.low)&&d.isInteger(e.id.high)))return"id: integer|Long expected";if(null!=e.from&&e.hasOwnProperty("from")&&!d.isString(e.from))return"from: string expected";if(null!=e.to&&e.hasOwnProperty("to")&&!d.isString(e.to))return"to: string expected";if(null!=e.text&&e.hasOwnProperty("text")&&!d.isString(e.text))return"text: string expected";if(null!=e.date&&e.hasOwnProperty("date")&&!(d.isInteger(e.date)||e.date&&d.isInteger(e.date.low)&&d.isInteger(e.date.high)))return"date: integer|Long expected";if(null!=e.unreadCount&&e.hasOwnProperty("unreadCount")){var t=p.bin_proto.UnreadCount.verify(e.unreadCount);if(t)return"unreadCount."+t}return null},e.fromObject=function(e){if(e instanceof p.bin_proto.SystemMessage)return e;var t=new p.bin_proto.SystemMessage;if(null!=e.id&&(d.Long?(t.id=d.Long.fromValue(e.id)).unsigned=!0:"string"==typeof e.id?t.id=parseInt(e.id,10):"number"==typeof e.id?t.id=e.id:"object"==typeof e.id&&(t.id=new d.LongBits(e.id.low>>>0,e.id.high>>>0).toNumber(!0))),null!=e.from&&(t.from=String(e.from)),null!=e.to&&(t.to=String(e.to)),null!=e.text&&(t.text=String(e.text)),null!=e.date&&(d.Long?(t.date=d.Long.fromValue(e.date)).unsigned=!1:"string"==typeof e.date?t.date=parseInt(e.date,10):"number"==typeof e.date?t.date=e.date:"object"==typeof e.date&&(t.date=new d.LongBits(e.date.low>>>0,e.date.high>>>0).toNumber())),null!=e.unreadCount){if("object"!=typeof e.unreadCount)throw TypeError(".bin_proto.SystemMessage.unreadCount: object expected");t.unreadCount=p.bin_proto.UnreadCount.fromObject(e.unreadCount)}return t},e.toObject=function(e,t){t||(t={});var n={};if(t.defaults){if(d.Long){var r=new d.Long(0,0,!0);n.id=t.longs===String?r.toString():t.longs===Number?r.toNumber():r}else n.id=t.longs===String?"0":0;n.from="",n.to="",n.text="",d.Long?(r=new d.Long(0,0,!1),n.date=t.longs===String?r.toString():t.longs===Number?r.toNumber():r):n.date=t.longs===String?"0":0}return null!=e.id&&e.hasOwnProperty("id")&&("number"==typeof e.id?n.id=t.longs===String?String(e.id):e.id:n.id=t.longs===String?d.Long.prototype.toString.call(e.id):t.longs===Number?new d.LongBits(e.id.low>>>0,e.id.high>>>0).toNumber(!0):e.id),null!=e.from&&e.hasOwnProperty("from")&&(n.from=e.from),null!=e.to&&e.hasOwnProperty("to")&&(n.to=e.to),null!=e.text&&e.hasOwnProperty("text")&&(n.text=e.text),null!=e.date&&e.hasOwnProperty("date")&&("number"==typeof e.date?n.date=t.longs===String?String(e.date):e.date:n.date=t.longs===String?d.Long.prototype.toString.call(e.date):t.longs===Number?new d.LongBits(e.date.low>>>0,e.date.high>>>0).toNumber():e.date),null!=e.unreadCount&&e.hasOwnProperty("unreadCount")&&(n.unreadCount=p.bin_proto.UnreadCount.toObject(e.unreadCount,t),t.oneofs&&(n.data="unreadCount")),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,l.util.toJSONOptions)},e}(),i.UnreadCount=function(){function e(e){if(e)for(var t=Object.keys(e),n=0;n>>3){case 1:r.totalUnread=e.int32();break;case 2:r.channelUnreadCount=e.int32();break;case 3:r.unreadChannels=e.int32();break;case 4:r.channelUnreadFlag=e.bool();break;case 5:r.channelUnreadReactions=e.int32();break;case 6:r.channelUnreadMentions=e.int32();break;default:e.skipType(7&o)}}return r},e.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},e.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.totalUnread&&e.hasOwnProperty("totalUnread")&&!d.isInteger(e.totalUnread)?"totalUnread: integer expected":null!=e.channelUnreadCount&&e.hasOwnProperty("channelUnreadCount")&&!d.isInteger(e.channelUnreadCount)?"channelUnreadCount: integer expected":null!=e.unreadChannels&&e.hasOwnProperty("unreadChannels")&&!d.isInteger(e.unreadChannels)?"unreadChannels: integer expected":null!=e.channelUnreadFlag&&e.hasOwnProperty("channelUnreadFlag")&&"boolean"!=typeof e.channelUnreadFlag?"channelUnreadFlag: boolean expected":null!=e.channelUnreadReactions&&e.hasOwnProperty("channelUnreadReactions")&&!d.isInteger(e.channelUnreadReactions)?"channelUnreadReactions: integer expected":null!=e.channelUnreadMentions&&e.hasOwnProperty("channelUnreadMentions")&&!d.isInteger(e.channelUnreadMentions)?"channelUnreadMentions: integer expected":null},e.fromObject=function(e){if(e instanceof p.bin_proto.UnreadCount)return e;var t=new p.bin_proto.UnreadCount;return null!=e.totalUnread&&(t.totalUnread=0|e.totalUnread),null!=e.channelUnreadCount&&(t.channelUnreadCount=0|e.channelUnreadCount),null!=e.unreadChannels&&(t.unreadChannels=0|e.unreadChannels),null!=e.channelUnreadFlag&&(t.channelUnreadFlag=Boolean(e.channelUnreadFlag)),null!=e.channelUnreadReactions&&(t.channelUnreadReactions=0|e.channelUnreadReactions),null!=e.channelUnreadMentions&&(t.channelUnreadMentions=0|e.channelUnreadMentions),t},e.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.totalUnread=0,n.channelUnreadCount=0,n.unreadChannels=0,n.channelUnreadFlag=!1,n.channelUnreadReactions=0,n.channelUnreadMentions=0),null!=e.totalUnread&&e.hasOwnProperty("totalUnread")&&(n.totalUnread=e.totalUnread),null!=e.channelUnreadCount&&e.hasOwnProperty("channelUnreadCount")&&(n.channelUnreadCount=e.channelUnreadCount),null!=e.unreadChannels&&e.hasOwnProperty("unreadChannels")&&(n.unreadChannels=e.unreadChannels),null!=e.channelUnreadFlag&&e.hasOwnProperty("channelUnreadFlag")&&(n.channelUnreadFlag=e.channelUnreadFlag),null!=e.channelUnreadReactions&&e.hasOwnProperty("channelUnreadReactions")&&(n.channelUnreadReactions=e.channelUnreadReactions),null!=e.channelUnreadMentions&&e.hasOwnProperty("channelUnreadMentions")&&(n.channelUnreadMentions=e.channelUnreadMentions),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,l.util.toJSONOptions)},e}(),i.MessageMarkerStatus=function(){function e(e){if(this.ids=[],e)for(var t=Object.keys(e),n=0;n>>3){case 1:if(r.ids&&r.ids.length||(r.ids=[]),2==(7&o))for(var i=e.uint32()+e.pos;e.pos>>0,e.ids[n].high>>>0).toNumber(!0))}if(null!=e.marker&&(t.marker=String(e.marker)),null!=e.channelId&&(t.channelId=String(e.channelId)),null!=e.tid&&(d.Long?(t.tid=d.Long.fromValue(e.tid)).unsigned=!1:"string"==typeof e.tid?t.tid=parseInt(e.tid,10):"number"==typeof e.tid?t.tid=e.tid:"object"==typeof e.tid&&(t.tid=new d.LongBits(e.tid.low>>>0,e.tid.high>>>0).toNumber())),null!=e.from){if("object"!=typeof e.from)throw TypeError(".bin_proto.MessageMarkerStatus.from: object expected");t.from=p.bin_proto.User.fromObject(e.from)}return null!=e.time&&(d.Long?(t.time=d.Long.fromValue(e.time)).unsigned=!0:"string"==typeof e.time?t.time=parseInt(e.time,10):"number"==typeof e.time?t.time=e.time:"object"==typeof e.time&&(t.time=new d.LongBits(e.time.low>>>0,e.time.high>>>0).toNumber(!0))),t},e.toObject=function(e,t){t||(t={});var n={};if((t.arrays||t.defaults)&&(n.ids=[]),t.defaults){if(n.marker="",n.channelId="",d.Long){var r=new d.Long(0,0,!1);n.tid=t.longs===String?r.toString():t.longs===Number?r.toNumber():r}else n.tid=t.longs===String?"0":0;n.from=null,d.Long?(r=new d.Long(0,0,!0),n.time=t.longs===String?r.toString():t.longs===Number?r.toNumber():r):n.time=t.longs===String?"0":0}if(e.ids&&e.ids.length){n.ids=[];for(var o=0;o>>0,e.ids[o].high>>>0).toNumber(!0):e.ids[o]}return null!=e.marker&&e.hasOwnProperty("marker")&&(n.marker=e.marker),null!=e.channelId&&e.hasOwnProperty("channelId")&&(n.channelId=e.channelId),null!=e.tid&&e.hasOwnProperty("tid")&&("number"==typeof e.tid?n.tid=t.longs===String?String(e.tid):e.tid:n.tid=t.longs===String?d.Long.prototype.toString.call(e.tid):t.longs===Number?new d.LongBits(e.tid.low>>>0,e.tid.high>>>0).toNumber():e.tid),null!=e.from&&e.hasOwnProperty("from")&&(n.from=p.bin_proto.User.toObject(e.from,t)),null!=e.time&&e.hasOwnProperty("time")&&("number"==typeof e.time?n.time=t.longs===String?String(e.time):e.time:n.time=t.longs===String?d.Long.prototype.toString.call(e.time):t.longs===Number?new d.LongBits(e.time.low>>>0,e.time.high>>>0).toNumber(!0):e.time),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,l.util.toJSONOptions)},e}(),i.MessageMarkerStatusGroup=function(){function e(e){if(this.markersByUser={},e)for(var t=Object.keys(e),n=0;n>>3==1?(e.skip().pos++,o.markersByUser===d.emptyObject&&(o.markersByUser={}),n=e.string(),e.pos++,o.markersByUser[n]=p.bin_proto.MessageMarkersStatuses.decode(e,e.uint32())):e.skipType(7&i)}return o},e.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.markersByUser&&e.hasOwnProperty("markersByUser")){if(!d.isObject(e.markersByUser))return"markersByUser: object expected";for(var t=Object.keys(e.markersByUser),n=0;n>>3==1?(r.list&&r.list.length||(r.list=[]),r.list.push(p.bin_proto.MessageMarkerStatus.decode(e,e.uint32()))):e.skipType(7&o)}return r},e.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.list&&e.hasOwnProperty("list")){if(!Array.isArray(e.list))return"list: array expected";for(var t=0;t>>3==1?(r.list&&r.list.length||(r.list=[]),r.list.push(p.bin_proto.Message.decode(e,e.uint32()))):e.skipType(7&o)}return r},e.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.list&&e.hasOwnProperty("list")){if(!Array.isArray(e.list))return"list: array expected";for(var t=0;t>>3==1)if(r.list&&r.list.length||(r.list=[]),2==(7&o))for(var i=e.uint32()+e.pos;e.pos>>0,e.list[n].high>>>0).toNumber())}return t},e.toObject=function(e,t){t||(t={});var n={};if((t.arrays||t.defaults)&&(n.list=[]),e.list&&e.list.length){n.list=[];for(var r=0;r>>0,e.list[r].high>>>0).toNumber():e.list[r]}return n},e.prototype.toJSON=function(){return this.constructor.toObject(this,l.util.toJSONOptions)},e}(),i.Attachments=function(){function e(e){if(this.list=[],e)for(var t=Object.keys(e),n=0;n>>3==1?(r.list&&r.list.length||(r.list=[]),r.list.push(p.bin_proto.Attachment.decode(e,e.uint32()))):e.skipType(7&o)}return r},e.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.list&&e.hasOwnProperty("list")){if(!Array.isArray(e.list))return"list: array expected";for(var t=0;t>>3){case 1:r.id=e.string();break;case 2:r.event=e.int32();break;case 3:r.channelId=e.string();break;case 4:r.search=p.bin_proto.MessageQuery.SearchOpts.decode(e,e.uint32());break;case 5:r.messages=p.bin_proto.Messages.decode(e,e.uint32());break;case 6:r.attachments=p.bin_proto.Attachments.decode(e,e.uint32());break;case 7:r.threads=p.bin_proto.Threads.decode(e,e.uint32());break;case 8:r.messageIds=p.bin_proto.MessageIds.decode(e,e.uint32());break;case 9:r.pollVoteParams=p.bin_proto.PollVoteParams.decode(e,e.uint32());break;default:e.skipType(7&o)}}return r},e.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!=typeof e||null===e)return"object expected";var t={};if(null!=e.id&&e.hasOwnProperty("id")&&!d.isString(e.id))return"id: string expected";if(null!=e.event&&e.hasOwnProperty("event"))switch(e.event){default:return"event: enum value expected";case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:case 9:case 10:case 11:case 12:case 13:case 14:case 15:case 16:case 17:}if(null!=e.channelId&&e.hasOwnProperty("channelId")&&!d.isString(e.channelId))return"channelId: string expected";if(null!=e.search&&e.hasOwnProperty("search")&&(n=p.bin_proto.MessageQuery.SearchOpts.verify(e.search)))return"search."+n;if(null!=e.messages&&e.hasOwnProperty("messages")&&(t.data=1,n=p.bin_proto.Messages.verify(e.messages)))return"messages."+n;if(null!=e.attachments&&e.hasOwnProperty("attachments")){if(1===t.data)return"data: multiple values";if(t.data=1,n=p.bin_proto.Attachments.verify(e.attachments))return"attachments."+n}if(null!=e.threads&&e.hasOwnProperty("threads")){if(1===t.data)return"data: multiple values";if(t.data=1,n=p.bin_proto.Threads.verify(e.threads))return"threads."+n}if(null!=e.messageIds&&e.hasOwnProperty("messageIds")){if(1===t.data)return"data: multiple values";if(t.data=1,n=p.bin_proto.MessageIds.verify(e.messageIds))return"messageIds."+n}if(null!=e.pollVoteParams&&e.hasOwnProperty("pollVoteParams")){if(1===t.data)return"data: multiple values";var n;if(t.data=1,n=p.bin_proto.PollVoteParams.verify(e.pollVoteParams))return"pollVoteParams."+n}return null},e.fromObject=function(e){if(e instanceof p.bin_proto.MessageQuery)return e;var t=new p.bin_proto.MessageQuery;switch(null!=e.id&&(t.id=String(e.id)),e.event){case"SEARCH":case 0:t.event=0;break;case"UPDATE":case 1:t.event=1;break;case"ADD_REACTION":case 2:t.event=2;break;case"DELETE_REACTION":case 3:t.event=3;break;case"UPDATE_REACTION":case 4:t.event=4;break;case"ATTACHMENTS":case 5:t.event=5;break;case"REACTIONS":case 6:t.event=6;break;case"THREADS":case 7:t.event=7;break;case"SEARCH_IN_THREAD":case 8:t.event=8;break;case"SAVE":case 9:t.event=9;break;case"UN_SAVE":case 10:t.event=10;break;case"MARKERS":case 11:t.event=11;break;case"GET_MESSAGES_BY_IDS":case 12:t.event=12;break;case"UNREAD_MENTIONS":case 13:t.event=13;break;case"UNREAD_REACTIONS":case 14:t.event=14;break;case"CHANGE_VOTE":case 15:t.event=15;break;case"RETRACT_VOTE":case 16:t.event=16;break;case"CLOSE_POLL":case 17:t.event=17}if(null!=e.channelId&&(t.channelId=String(e.channelId)),null!=e.search){if("object"!=typeof e.search)throw TypeError(".bin_proto.MessageQuery.search: object expected");t.search=p.bin_proto.MessageQuery.SearchOpts.fromObject(e.search)}if(null!=e.messages){if("object"!=typeof e.messages)throw TypeError(".bin_proto.MessageQuery.messages: object expected");t.messages=p.bin_proto.Messages.fromObject(e.messages)}if(null!=e.attachments){if("object"!=typeof e.attachments)throw TypeError(".bin_proto.MessageQuery.attachments: object expected");t.attachments=p.bin_proto.Attachments.fromObject(e.attachments)}if(null!=e.threads){if("object"!=typeof e.threads)throw TypeError(".bin_proto.MessageQuery.threads: object expected");t.threads=p.bin_proto.Threads.fromObject(e.threads)}if(null!=e.messageIds){if("object"!=typeof e.messageIds)throw TypeError(".bin_proto.MessageQuery.messageIds: object expected");t.messageIds=p.bin_proto.MessageIds.fromObject(e.messageIds)}if(null!=e.pollVoteParams){if("object"!=typeof e.pollVoteParams)throw TypeError(".bin_proto.MessageQuery.pollVoteParams: object expected");t.pollVoteParams=p.bin_proto.PollVoteParams.fromObject(e.pollVoteParams)}return t},e.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.id="",n.event=t.enums===String?"SEARCH":0,n.channelId="",n.search=null),null!=e.id&&e.hasOwnProperty("id")&&(n.id=e.id),null!=e.event&&e.hasOwnProperty("event")&&(n.event=t.enums===String?p.bin_proto.MessageEvent[e.event]:e.event),null!=e.channelId&&e.hasOwnProperty("channelId")&&(n.channelId=e.channelId),null!=e.search&&e.hasOwnProperty("search")&&(n.search=p.bin_proto.MessageQuery.SearchOpts.toObject(e.search,t)),null!=e.messages&&e.hasOwnProperty("messages")&&(n.messages=p.bin_proto.Messages.toObject(e.messages,t),t.oneofs&&(n.data="messages")),null!=e.attachments&&e.hasOwnProperty("attachments")&&(n.attachments=p.bin_proto.Attachments.toObject(e.attachments,t),t.oneofs&&(n.data="attachments")),null!=e.threads&&e.hasOwnProperty("threads")&&(n.threads=p.bin_proto.Threads.toObject(e.threads,t),t.oneofs&&(n.data="threads")),null!=e.messageIds&&e.hasOwnProperty("messageIds")&&(n.messageIds=p.bin_proto.MessageIds.toObject(e.messageIds,t),t.oneofs&&(n.data="messageIds")),null!=e.pollVoteParams&&e.hasOwnProperty("pollVoteParams")&&(n.pollVoteParams=p.bin_proto.PollVoteParams.toObject(e.pollVoteParams,t),t.oneofs&&(n.data="pollVoteParams")),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,l.util.toJSONOptions)},e.Direction=function(){var e={},t=Object.create(e);return t[e[0]="NONE"]=0,t[e[1]="NEXT"]=1,t[e[2]="PREVIOUS"]=2,t[e[3]="NEAR"]=3,t}(),e.SearchOpts=function(){function e(e){if(e)for(var t=Object.keys(e),n=0;n>>3){case 1:r.count=e.int32();break;case 2:r.direction=e.int32();break;case 3:r.hasNext=e.bool();break;case 4:r.msgId=e.uint64();break;case 5:r.timestamp=e.int64();break;case 6:r.type=e.string();break;case 7:r.filter=p.bin_proto.MessageSearchQuery.decode(e,e.uint32());break;default:e.skipType(7&o)}}return r},e.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!=typeof e||null===e)return"object expected";var t={};if(null!=e.count&&e.hasOwnProperty("count")&&!d.isInteger(e.count))return"count: integer expected";if(null!=e.direction&&e.hasOwnProperty("direction"))switch(e.direction){default:return"direction: enum value expected";case 0:case 1:case 2:case 3:}if(null!=e.hasNext&&e.hasOwnProperty("hasNext")&&"boolean"!=typeof e.hasNext)return"hasNext: boolean expected";if(null!=e.msgId&&e.hasOwnProperty("msgId")&&(t.sortby=1,!(d.isInteger(e.msgId)||e.msgId&&d.isInteger(e.msgId.low)&&d.isInteger(e.msgId.high))))return"msgId: integer|Long expected";if(null!=e.timestamp&&e.hasOwnProperty("timestamp")){if(1===t.sortby)return"sortby: multiple values";if(t.sortby=1,!(d.isInteger(e.timestamp)||e.timestamp&&d.isInteger(e.timestamp.low)&&d.isInteger(e.timestamp.high)))return"timestamp: integer|Long expected"}if(null!=e.type&&e.hasOwnProperty("type")&&!d.isString(e.type))return"type: string expected";if(null!=e.filter&&e.hasOwnProperty("filter")){var n=p.bin_proto.MessageSearchQuery.verify(e.filter);if(n)return"filter."+n}return null},e.fromObject=function(e){if(e instanceof p.bin_proto.MessageQuery.SearchOpts)return e;var t=new p.bin_proto.MessageQuery.SearchOpts;switch(null!=e.count&&(t.count=0|e.count),e.direction){case"NONE":case 0:t.direction=0;break;case"NEXT":case 1:t.direction=1;break;case"PREVIOUS":case 2:t.direction=2;break;case"NEAR":case 3:t.direction=3}if(null!=e.hasNext&&(t.hasNext=Boolean(e.hasNext)),null!=e.msgId&&(d.Long?(t.msgId=d.Long.fromValue(e.msgId)).unsigned=!0:"string"==typeof e.msgId?t.msgId=parseInt(e.msgId,10):"number"==typeof e.msgId?t.msgId=e.msgId:"object"==typeof e.msgId&&(t.msgId=new d.LongBits(e.msgId.low>>>0,e.msgId.high>>>0).toNumber(!0))),null!=e.timestamp&&(d.Long?(t.timestamp=d.Long.fromValue(e.timestamp)).unsigned=!1:"string"==typeof e.timestamp?t.timestamp=parseInt(e.timestamp,10):"number"==typeof e.timestamp?t.timestamp=e.timestamp:"object"==typeof e.timestamp&&(t.timestamp=new d.LongBits(e.timestamp.low>>>0,e.timestamp.high>>>0).toNumber())),null!=e.type&&(t.type=String(e.type)),null!=e.filter){if("object"!=typeof e.filter)throw TypeError(".bin_proto.MessageQuery.SearchOpts.filter: object expected");t.filter=p.bin_proto.MessageSearchQuery.fromObject(e.filter)}return t},e.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.count=0,n.direction=t.enums===String?"NONE":0,n.hasNext=!1,n.type="",n.filter=null),null!=e.count&&e.hasOwnProperty("count")&&(n.count=e.count),null!=e.direction&&e.hasOwnProperty("direction")&&(n.direction=t.enums===String?p.bin_proto.MessageQuery.Direction[e.direction]:e.direction),null!=e.hasNext&&e.hasOwnProperty("hasNext")&&(n.hasNext=e.hasNext),null!=e.msgId&&e.hasOwnProperty("msgId")&&("number"==typeof e.msgId?n.msgId=t.longs===String?String(e.msgId):e.msgId:n.msgId=t.longs===String?d.Long.prototype.toString.call(e.msgId):t.longs===Number?new d.LongBits(e.msgId.low>>>0,e.msgId.high>>>0).toNumber(!0):e.msgId,t.oneofs&&(n.sortby="msgId")),null!=e.timestamp&&e.hasOwnProperty("timestamp")&&("number"==typeof e.timestamp?n.timestamp=t.longs===String?String(e.timestamp):e.timestamp:n.timestamp=t.longs===String?d.Long.prototype.toString.call(e.timestamp):t.longs===Number?new d.LongBits(e.timestamp.low>>>0,e.timestamp.high>>>0).toNumber():e.timestamp,t.oneofs&&(n.sortby="timestamp")),null!=e.type&&e.hasOwnProperty("type")&&(n.type=e.type),null!=e.filter&&e.hasOwnProperty("filter")&&(n.filter=p.bin_proto.MessageSearchQuery.toObject(e.filter,t)),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,l.util.toJSONOptions)},e}(),e}(),i.MessageAction=function(){function e(e){if(this.messages=[],e)for(var t=Object.keys(e),n=0;n>>3){case 1:r.id=e.string();break;case 2:r.from=p.bin_proto.User.decode(e,e.uint32());break;case 3:r.event=e.int32();break;case 4:r.messages&&r.messages.length||(r.messages=[]),r.messages.push(p.bin_proto.Message.decode(e,e.uint32()));break;default:e.skipType(7&o)}}return r},e.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.id&&e.hasOwnProperty("id")&&!d.isString(e.id))return"id: string expected";if(null!=e.from&&e.hasOwnProperty("from")&&(n=p.bin_proto.User.verify(e.from)))return"from."+n;if(null!=e.event&&e.hasOwnProperty("event"))switch(e.event){default:return"event: enum value expected";case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:case 9:case 10:case 11:case 12:case 13:case 14:case 15:case 16:case 17:}if(null!=e.messages&&e.hasOwnProperty("messages")){if(!Array.isArray(e.messages))return"messages: array expected";for(var t=0;t>>3){case 1:r.id=e.string();break;case 2:r.messageId=e.int64();break;case 3:r.marker=e.string();break;case 4:r.limit=e.int32();break;case 5:r.nextToken=e.string();break;case 6:r.result=p.bin_proto.MessageMarkerResult.decode(e,e.uint32());break;default:e.skipType(7&o)}}return r},e.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.id&&e.hasOwnProperty("id")&&!d.isString(e.id))return"id: string expected";if(null!=e.messageId&&e.hasOwnProperty("messageId")&&!(d.isInteger(e.messageId)||e.messageId&&d.isInteger(e.messageId.low)&&d.isInteger(e.messageId.high)))return"messageId: integer|Long expected";if(null!=e.marker&&e.hasOwnProperty("marker")&&!d.isString(e.marker))return"marker: string expected";if(null!=e.limit&&e.hasOwnProperty("limit")&&!d.isInteger(e.limit))return"limit: integer expected";if(null!=e.nextToken&&e.hasOwnProperty("nextToken")&&!d.isString(e.nextToken))return"nextToken: string expected";if(null!=e.result&&e.hasOwnProperty("result")){var t=p.bin_proto.MessageMarkerResult.verify(e.result);if(t)return"result."+t}return null},e.fromObject=function(e){if(e instanceof p.bin_proto.MessageMarkerQuery)return e;var t=new p.bin_proto.MessageMarkerQuery;if(null!=e.id&&(t.id=String(e.id)),null!=e.messageId&&(d.Long?(t.messageId=d.Long.fromValue(e.messageId)).unsigned=!1:"string"==typeof e.messageId?t.messageId=parseInt(e.messageId,10):"number"==typeof e.messageId?t.messageId=e.messageId:"object"==typeof e.messageId&&(t.messageId=new d.LongBits(e.messageId.low>>>0,e.messageId.high>>>0).toNumber())),null!=e.marker&&(t.marker=String(e.marker)),null!=e.limit&&(t.limit=0|e.limit),null!=e.nextToken&&(t.nextToken=String(e.nextToken)),null!=e.result){if("object"!=typeof e.result)throw TypeError(".bin_proto.MessageMarkerQuery.result: object expected");t.result=p.bin_proto.MessageMarkerResult.fromObject(e.result)}return t},e.toObject=function(e,t){t||(t={});var n={};if(t.defaults){if(n.id="",d.Long){var r=new d.Long(0,0,!1);n.messageId=t.longs===String?r.toString():t.longs===Number?r.toNumber():r}else n.messageId=t.longs===String?"0":0;n.marker="",n.limit=0,n.nextToken="",n.result=null}return null!=e.id&&e.hasOwnProperty("id")&&(n.id=e.id),null!=e.messageId&&e.hasOwnProperty("messageId")&&("number"==typeof e.messageId?n.messageId=t.longs===String?String(e.messageId):e.messageId:n.messageId=t.longs===String?d.Long.prototype.toString.call(e.messageId):t.longs===Number?new d.LongBits(e.messageId.low>>>0,e.messageId.high>>>0).toNumber():e.messageId),null!=e.marker&&e.hasOwnProperty("marker")&&(n.marker=e.marker),null!=e.limit&&e.hasOwnProperty("limit")&&(n.limit=e.limit),null!=e.nextToken&&e.hasOwnProperty("nextToken")&&(n.nextToken=e.nextToken),null!=e.result&&e.hasOwnProperty("result")&&(n.result=p.bin_proto.MessageMarkerResult.toObject(e.result,t)),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,l.util.toJSONOptions)},e}(),i.MessageMarkerResult=function(){function e(e){if(this.markers=[],e)for(var t=Object.keys(e),n=0;n>>3){case 1:r.id=e.string();break;case 2:r.hasNext=e.bool();break;case 3:r.markers&&r.markers.length||(r.markers=[]),r.markers.push(p.bin_proto.MessageMarker.decode(e,e.uint32()));break;case 4:r.nextToken=e.string();break;default:e.skipType(7&o)}}return r},e.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.id&&e.hasOwnProperty("id")&&!d.isString(e.id))return"id: string expected";if(null!=e.hasNext&&e.hasOwnProperty("hasNext")&&"boolean"!=typeof e.hasNext)return"hasNext: boolean expected";if(null!=e.markers&&e.hasOwnProperty("markers")){if(!Array.isArray(e.markers))return"markers: array expected";for(var t=0;t>>3){case 1:r.name=e.string();break;case 2:r.user=p.bin_proto.User.decode(e,e.uint32());break;case 3:r.time=e.uint64();break;case 4:r.messageId=e.uint64();break;default:e.skipType(7&o)}}return r},e.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.name&&e.hasOwnProperty("name")&&!d.isString(e.name))return"name: string expected";if(null!=e.user&&e.hasOwnProperty("user")){var t=p.bin_proto.User.verify(e.user);if(t)return"user."+t}return null!=e.time&&e.hasOwnProperty("time")&&!(d.isInteger(e.time)||e.time&&d.isInteger(e.time.low)&&d.isInteger(e.time.high))?"time: integer|Long expected":null!=e.messageId&&e.hasOwnProperty("messageId")&&!(d.isInteger(e.messageId)||e.messageId&&d.isInteger(e.messageId.low)&&d.isInteger(e.messageId.high))?"messageId: integer|Long expected":null},e.fromObject=function(e){if(e instanceof p.bin_proto.MessageMarker)return e;var t=new p.bin_proto.MessageMarker;if(null!=e.name&&(t.name=String(e.name)),null!=e.user){if("object"!=typeof e.user)throw TypeError(".bin_proto.MessageMarker.user: object expected");t.user=p.bin_proto.User.fromObject(e.user)}return null!=e.time&&(d.Long?(t.time=d.Long.fromValue(e.time)).unsigned=!0:"string"==typeof e.time?t.time=parseInt(e.time,10):"number"==typeof e.time?t.time=e.time:"object"==typeof e.time&&(t.time=new d.LongBits(e.time.low>>>0,e.time.high>>>0).toNumber(!0))),null!=e.messageId&&(d.Long?(t.messageId=d.Long.fromValue(e.messageId)).unsigned=!0:"string"==typeof e.messageId?t.messageId=parseInt(e.messageId,10):"number"==typeof e.messageId?t.messageId=e.messageId:"object"==typeof e.messageId&&(t.messageId=new d.LongBits(e.messageId.low>>>0,e.messageId.high>>>0).toNumber(!0))),t},e.toObject=function(e,t){t||(t={});var n={};if(t.defaults){if(n.name="",n.user=null,d.Long){var r=new d.Long(0,0,!0);n.time=t.longs===String?r.toString():t.longs===Number?r.toNumber():r}else n.time=t.longs===String?"0":0;d.Long?(r=new d.Long(0,0,!0),n.messageId=t.longs===String?r.toString():t.longs===Number?r.toNumber():r):n.messageId=t.longs===String?"0":0}return null!=e.name&&e.hasOwnProperty("name")&&(n.name=e.name),null!=e.user&&e.hasOwnProperty("user")&&(n.user=p.bin_proto.User.toObject(e.user,t)),null!=e.time&&e.hasOwnProperty("time")&&("number"==typeof e.time?n.time=t.longs===String?String(e.time):e.time:n.time=t.longs===String?d.Long.prototype.toString.call(e.time):t.longs===Number?new d.LongBits(e.time.low>>>0,e.time.high>>>0).toNumber(!0):e.time),null!=e.messageId&&e.hasOwnProperty("messageId")&&("number"==typeof e.messageId?n.messageId=t.longs===String?String(e.messageId):e.messageId:n.messageId=t.longs===String?d.Long.prototype.toString.call(e.messageId):t.longs===Number?new d.LongBits(e.messageId.low>>>0,e.messageId.high>>>0).toNumber(!0):e.messageId),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,l.util.toJSONOptions)},e}(),i.SavedMessageQuery=function(){function e(e){if(e)for(var t=Object.keys(e),n=0;n>>3){case 1:r.id=e.string();break;case 2:r.channelId=e.string();break;case 3:r.index=e.int32();break;case 4:r.count=e.int32();break;default:e.skipType(7&o)}}return r},e.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},e.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.id&&e.hasOwnProperty("id")&&!d.isString(e.id)?"id: string expected":null!=e.channelId&&e.hasOwnProperty("channelId")&&!d.isString(e.channelId)?"channelId: string expected":null!=e.index&&e.hasOwnProperty("index")&&!d.isInteger(e.index)?"index: integer expected":null!=e.count&&e.hasOwnProperty("count")&&!d.isInteger(e.count)?"count: integer expected":null},e.fromObject=function(e){if(e instanceof p.bin_proto.SavedMessageQuery)return e;var t=new p.bin_proto.SavedMessageQuery;return null!=e.id&&(t.id=String(e.id)),null!=e.channelId&&(t.channelId=String(e.channelId)),null!=e.index&&(t.index=0|e.index),null!=e.count&&(t.count=0|e.count),t},e.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.id="",n.channelId="",n.index=0,n.count=0),null!=e.id&&e.hasOwnProperty("id")&&(n.id=e.id),null!=e.channelId&&e.hasOwnProperty("channelId")&&(n.channelId=e.channelId),null!=e.index&&e.hasOwnProperty("index")&&(n.index=e.index),null!=e.count&&e.hasOwnProperty("count")&&(n.count=e.count),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,l.util.toJSONOptions)},e}(),i.SavedMessageQueryResult=function(){function e(e){if(this.messages=[],e)for(var t=Object.keys(e),n=0;n>>3){case 1:r.id=e.string();break;case 2:r.messages&&r.messages.length||(r.messages=[]),r.messages.push(p.bin_proto.Message.decode(e,e.uint32()));break;case 3:r.hasNext=e.bool();break;default:e.skipType(7&o)}}return r},e.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.id&&e.hasOwnProperty("id")&&!d.isString(e.id))return"id: string expected";if(null!=e.messages&&e.hasOwnProperty("messages")){if(!Array.isArray(e.messages))return"messages: array expected";for(var t=0;t>>3){case 1:r.id=e.string();break;case 2:r.url=e.string();break;case 3:r.og=p.bin_proto.OpenGraph.decode(e,e.uint32());break;default:e.skipType(7&o)}}return r},e.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.id&&e.hasOwnProperty("id")&&!d.isString(e.id))return"id: string expected";if(null!=e.url&&e.hasOwnProperty("url")&&!d.isString(e.url))return"url: string expected";if(null!=e.og&&e.hasOwnProperty("og")){var t=p.bin_proto.OpenGraph.verify(e.og);if(t)return"og."+t}return null},e.fromObject=function(e){if(e instanceof p.bin_proto.MessageLinkOGQuery)return e;var t=new p.bin_proto.MessageLinkOGQuery;if(null!=e.id&&(t.id=String(e.id)),null!=e.url&&(t.url=String(e.url)),null!=e.og){if("object"!=typeof e.og)throw TypeError(".bin_proto.MessageLinkOGQuery.og: object expected");t.og=p.bin_proto.OpenGraph.fromObject(e.og)}return t},e.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.id="",n.url="",n.og=null),null!=e.id&&e.hasOwnProperty("id")&&(n.id=e.id),null!=e.url&&e.hasOwnProperty("url")&&(n.url=e.url),null!=e.og&&e.hasOwnProperty("og")&&(n.og=p.bin_proto.OpenGraph.toObject(e.og,t)),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,l.util.toJSONOptions)},e}(),i.OpenGraph=function(){function e(e){if(this.image=[],this.audio=[],this.localeAlternate=[],this.video=[],e)for(var t=Object.keys(e),n=0;n>>3){case 1:r.title=e.string();break;case 2:r.type=e.string();break;case 3:r.image&&r.image.length||(r.image=[]),r.image.push(p.bin_proto.OGImage.decode(e,e.uint32()));break;case 4:r.url=e.string();break;case 5:r.audio&&r.audio.length||(r.audio=[]),r.audio.push(p.bin_proto.OGAudio.decode(e,e.uint32()));break;case 6:r.description=e.string();break;case 7:r.locale=e.string();break;case 8:r.localeAlternate&&r.localeAlternate.length||(r.localeAlternate=[]),r.localeAlternate.push(e.string());break;case 9:r.siteName=e.string();break;case 10:r.video&&r.video.length||(r.video=[]),r.video.push(p.bin_proto.OGVideo.decode(e,e.uint32()));break;case 11:r.favicon=p.bin_proto.OGFavicon.decode(e,e.uint32());break;default:e.skipType(7&o)}}return r},e.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.title&&e.hasOwnProperty("title")&&!d.isString(e.title))return"title: string expected";if(null!=e.type&&e.hasOwnProperty("type")&&!d.isString(e.type))return"type: string expected";if(null!=e.image&&e.hasOwnProperty("image")){if(!Array.isArray(e.image))return"image: array expected";for(var t=0;t>>3){case 1:r.url=e.string();break;case 2:r.secureUrl=e.string();break;case 3:r.type=e.string();break;case 4:r.width=e.int32();break;case 5:r.height=e.int32();break;default:e.skipType(7&o)}}return r},e.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},e.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.url&&e.hasOwnProperty("url")&&!d.isString(e.url)?"url: string expected":null!=e.secureUrl&&e.hasOwnProperty("secureUrl")&&!d.isString(e.secureUrl)?"secureUrl: string expected":null!=e.type&&e.hasOwnProperty("type")&&!d.isString(e.type)?"type: string expected":null!=e.width&&e.hasOwnProperty("width")&&!d.isInteger(e.width)?"width: integer expected":null!=e.height&&e.hasOwnProperty("height")&&!d.isInteger(e.height)?"height: integer expected":null},e.fromObject=function(e){if(e instanceof p.bin_proto.OGImage)return e;var t=new p.bin_proto.OGImage;return null!=e.url&&(t.url=String(e.url)),null!=e.secureUrl&&(t.secureUrl=String(e.secureUrl)),null!=e.type&&(t.type=String(e.type)),null!=e.width&&(t.width=0|e.width),null!=e.height&&(t.height=0|e.height),t},e.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.url="",n.secureUrl="",n.type="",n.width=0,n.height=0),null!=e.url&&e.hasOwnProperty("url")&&(n.url=e.url),null!=e.secureUrl&&e.hasOwnProperty("secureUrl")&&(n.secureUrl=e.secureUrl),null!=e.type&&e.hasOwnProperty("type")&&(n.type=e.type),null!=e.width&&e.hasOwnProperty("width")&&(n.width=e.width),null!=e.height&&e.hasOwnProperty("height")&&(n.height=e.height),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,l.util.toJSONOptions)},e}(),i.OGVideo=function(){function e(e){if(e)for(var t=Object.keys(e),n=0;n>>3){case 1:r.url=e.string();break;case 2:r.secureUrl=e.string();break;case 3:r.type=e.string();break;case 4:r.width=e.int32();break;case 5:r.height=e.int32();break;case 6:r.duration=e.int32();break;default:e.skipType(7&o)}}return r},e.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},e.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.url&&e.hasOwnProperty("url")&&!d.isString(e.url)?"url: string expected":null!=e.secureUrl&&e.hasOwnProperty("secureUrl")&&!d.isString(e.secureUrl)?"secureUrl: string expected":null!=e.type&&e.hasOwnProperty("type")&&!d.isString(e.type)?"type: string expected":null!=e.width&&e.hasOwnProperty("width")&&!d.isInteger(e.width)?"width: integer expected":null!=e.height&&e.hasOwnProperty("height")&&!d.isInteger(e.height)?"height: integer expected":null!=e.duration&&e.hasOwnProperty("duration")&&!d.isInteger(e.duration)?"duration: integer expected":null},e.fromObject=function(e){if(e instanceof p.bin_proto.OGVideo)return e;var t=new p.bin_proto.OGVideo;return null!=e.url&&(t.url=String(e.url)),null!=e.secureUrl&&(t.secureUrl=String(e.secureUrl)),null!=e.type&&(t.type=String(e.type)),null!=e.width&&(t.width=0|e.width),null!=e.height&&(t.height=0|e.height),null!=e.duration&&(t.duration=0|e.duration),t},e.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.url="",n.secureUrl="",n.type="",n.width=0,n.height=0,n.duration=0),null!=e.url&&e.hasOwnProperty("url")&&(n.url=e.url),null!=e.secureUrl&&e.hasOwnProperty("secureUrl")&&(n.secureUrl=e.secureUrl),null!=e.type&&e.hasOwnProperty("type")&&(n.type=e.type),null!=e.width&&e.hasOwnProperty("width")&&(n.width=e.width),null!=e.height&&e.hasOwnProperty("height")&&(n.height=e.height),null!=e.duration&&e.hasOwnProperty("duration")&&(n.duration=e.duration),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,l.util.toJSONOptions)},e}(),i.OGAudio=function(){function e(e){if(e)for(var t=Object.keys(e),n=0;n>>3){case 1:r.url=e.string();break;case 2:r.secureUrl=e.string();break;case 3:r.type=e.string();break;default:e.skipType(7&o)}}return r},e.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},e.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.url&&e.hasOwnProperty("url")&&!d.isString(e.url)?"url: string expected":null!=e.secureUrl&&e.hasOwnProperty("secureUrl")&&!d.isString(e.secureUrl)?"secureUrl: string expected":null!=e.type&&e.hasOwnProperty("type")&&!d.isString(e.type)?"type: string expected":null},e.fromObject=function(e){if(e instanceof p.bin_proto.OGAudio)return e;var t=new p.bin_proto.OGAudio;return null!=e.url&&(t.url=String(e.url)),null!=e.secureUrl&&(t.secureUrl=String(e.secureUrl)),null!=e.type&&(t.type=String(e.type)),t},e.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.url="",n.secureUrl="",n.type=""),null!=e.url&&e.hasOwnProperty("url")&&(n.url=e.url),null!=e.secureUrl&&e.hasOwnProperty("secureUrl")&&(n.secureUrl=e.secureUrl),null!=e.type&&e.hasOwnProperty("type")&&(n.type=e.type),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,l.util.toJSONOptions)},e}(),i.OGFavicon=function(){function e(e){if(e)for(var t=Object.keys(e),n=0;n>>3==1?r.url=e.string():e.skipType(7&o)}return r},e.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},e.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.url&&e.hasOwnProperty("url")&&!d.isString(e.url)?"url: string expected":null},e.fromObject=function(e){if(e instanceof p.bin_proto.OGFavicon)return e;var t=new p.bin_proto.OGFavicon;return null!=e.url&&(t.url=String(e.url)),t},e.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.url=""),null!=e.url&&e.hasOwnProperty("url")&&(n.url=e.url),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,l.util.toJSONOptions)},e}(),i.MessageFilter=function(){function e(e){if(e)for(var t=Object.keys(e),n=0;n>>3){case 1:r.word=e.string();break;case 2:r.op=e.int32();break;default:e.skipType(7&o)}}return r},e.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.word&&e.hasOwnProperty("word")&&!d.isString(e.word))return"word: string expected";if(null!=e.op&&e.hasOwnProperty("op"))switch(e.op){default:return"op: enum value expected";case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:case 9:}return null},e.fromObject=function(e){if(e instanceof p.bin_proto.MessageFilter)return e;var t=new p.bin_proto.MessageFilter;switch(null!=e.word&&(t.word=String(e.word)),e.op){case"NONE":case 0:t.op=0;break;case"CONTAINS":case 1:t.op=1;break;case"BEGINS":case 2:t.op=2;break;case"EQ":case 3:t.op=3;break;case"LT":case 4:t.op=4;break;case"LTE":case 5:t.op=5;break;case"GT":case 6:t.op=6;break;case"GTE":case 7:t.op=7;break;case"IN":case 8:t.op=8;break;case"BETWEEN":case 9:t.op=9}return t},e.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.word="",n.op=t.enums===String?"NONE":0),null!=e.word&&e.hasOwnProperty("word")&&(n.word=e.word),null!=e.op&&e.hasOwnProperty("op")&&(n.op=t.enums===String?p.bin_proto.MessageFilter.Operator[e.op]:e.op),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,l.util.toJSONOptions)},e.Operator=function(){var e={},t=Object.create(e);return t[e[0]="NONE"]=0,t[e[1]="CONTAINS"]=1,t[e[2]="BEGINS"]=2,t[e[3]="EQ"]=3,t[e[4]="LT"]=4,t[e[5]="LTE"]=5,t[e[6]="GT"]=6,t[e[7]="GTE"]=7,t[e[8]="IN"]=8,t[e[9]="BETWEEN"]=9,t}(),e}(),i.MessageSearchQuery=function(){function e(e){if(this.fields=[],e)for(var t=Object.keys(e),n=0;n>>3){case 1:r.id=e.string();break;case 2:r.channelId=e.string();break;case 3:r.fields&&r.fields.length||(r.fields=[]),r.fields.push(p.bin_proto.MessageSearchQuery.Fields.decode(e,e.uint32()));break;case 5:r.count=e.int32();break;case 9:r.nextToken=e.string();break;default:e.skipType(7&o)}}return r},e.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.id&&e.hasOwnProperty("id")&&!d.isString(e.id))return"id: string expected";if(null!=e.channelId&&e.hasOwnProperty("channelId")&&!d.isString(e.channelId))return"channelId: string expected";if(null!=e.fields&&e.hasOwnProperty("fields")){if(!Array.isArray(e.fields))return"fields: array expected";for(var t=0;t>>3){case 1:r.key=e.int32();break;case 2:r.value=p.bin_proto.MessageFilter.decode(e,e.uint32());break;default:e.skipType(7&o)}}return r},e.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.key&&e.hasOwnProperty("key"))switch(e.key){default:return"key: enum value expected";case 0:case 1:case 2:}if(null!=e.value&&e.hasOwnProperty("value")){var t=p.bin_proto.MessageFilter.verify(e.value);if(t)return"value."+t}return null},e.fromObject=function(e){if(e instanceof p.bin_proto.MessageSearchQuery.Fields)return e;var t=new p.bin_proto.MessageSearchQuery.Fields;switch(e.key){case"BODY":case 0:t.key=0;break;case"TYPE":case 1:t.key=1;break;case"ATTACHMENT_TYPE":case 2:t.key=2}if(null!=e.value){if("object"!=typeof e.value)throw TypeError(".bin_proto.MessageSearchQuery.Fields.value: object expected");t.value=p.bin_proto.MessageFilter.fromObject(e.value)}return t},e.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.key=t.enums===String?"BODY":0,n.value=null),null!=e.key&&e.hasOwnProperty("key")&&(n.key=t.enums===String?p.bin_proto.MessageSearchQuery.SearchQueryKey[e.key]:e.key),null!=e.value&&e.hasOwnProperty("value")&&(n.value=p.bin_proto.MessageFilter.toObject(e.value,t)),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,l.util.toJSONOptions)},e}(),e}(),i.PinDetails=function(){function e(e){if(e)for(var t=Object.keys(e),n=0;n>>3){case 1:r.pinned=e.bool();break;case 2:r.pinnedTill=e.int64();break;case 3:r.pinType=e.int32();break;default:e.skipType(7&o)}}return r},e.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.pinned&&e.hasOwnProperty("pinned")&&"boolean"!=typeof e.pinned)return"pinned: boolean expected";if(null!=e.pinnedTill&&e.hasOwnProperty("pinnedTill")&&!(d.isInteger(e.pinnedTill)||e.pinnedTill&&d.isInteger(e.pinnedTill.low)&&d.isInteger(e.pinnedTill.high)))return"pinnedTill: integer|Long expected";if(null!=e.pinType&&e.hasOwnProperty("pinType"))switch(e.pinType){default:return"pinType: enum value expected";case 0:case 1:}return null},e.fromObject=function(e){if(e instanceof p.bin_proto.PinDetails)return e;var t=new p.bin_proto.PinDetails;switch(null!=e.pinned&&(t.pinned=Boolean(e.pinned)),null!=e.pinnedTill&&(d.Long?(t.pinnedTill=d.Long.fromValue(e.pinnedTill)).unsigned=!1:"string"==typeof e.pinnedTill?t.pinnedTill=parseInt(e.pinnedTill,10):"number"==typeof e.pinnedTill?t.pinnedTill=e.pinnedTill:"object"==typeof e.pinnedTill&&(t.pinnedTill=new d.LongBits(e.pinnedTill.low>>>0,e.pinnedTill.high>>>0).toNumber())),e.pinType){case"SHARED":case 0:t.pinType=0;break;case"PERSONAL":case 1:t.pinType=1}return t},e.toObject=function(e,t){t||(t={});var n={};if(t.defaults){if(n.pinned=!1,d.Long){var r=new d.Long(0,0,!1);n.pinnedTill=t.longs===String?r.toString():t.longs===Number?r.toNumber():r}else n.pinnedTill=t.longs===String?"0":0;n.pinType=t.enums===String?"SHARED":0}return null!=e.pinned&&e.hasOwnProperty("pinned")&&(n.pinned=e.pinned),null!=e.pinnedTill&&e.hasOwnProperty("pinnedTill")&&("number"==typeof e.pinnedTill?n.pinnedTill=t.longs===String?String(e.pinnedTill):e.pinnedTill:n.pinnedTill=t.longs===String?d.Long.prototype.toString.call(e.pinnedTill):t.longs===Number?new d.LongBits(e.pinnedTill.low>>>0,e.pinnedTill.high>>>0).toNumber():e.pinnedTill),null!=e.pinType&&e.hasOwnProperty("pinType")&&(n.pinType=t.enums===String?p.bin_proto.PinDetails.PinType[e.pinType]:e.pinType),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,l.util.toJSONOptions)},e.PinType=function(){var e={},t=Object.create(e);return t[e[0]="SHARED"]=0,t[e[1]="PERSONAL"]=1,t}(),e}(),i.PollOption=function(){function e(e){if(e)for(var t=Object.keys(e),n=0;n>>3){case 1:r.id=e.string();break;case 2:r.name=e.string();break;default:e.skipType(7&o)}}return r},e.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},e.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.id&&e.hasOwnProperty("id")&&!d.isString(e.id)?"id: string expected":null!=e.name&&e.hasOwnProperty("name")&&!d.isString(e.name)?"name: string expected":null},e.fromObject=function(e){if(e instanceof p.bin_proto.PollOption)return e;var t=new p.bin_proto.PollOption;return null!=e.id&&(t.id=String(e.id)),null!=e.name&&(t.name=String(e.name)),t},e.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.id="",n.name=""),null!=e.id&&e.hasOwnProperty("id")&&(n.id=e.id),null!=e.name&&e.hasOwnProperty("name")&&(n.name=e.name),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,l.util.toJSONOptions)},e}(),i.PollVote=function(){function e(e){if(e)for(var t=Object.keys(e),n=0;n>>3){case 3:r.optionId=e.string();break;case 4:r.createdAt=e.int64();break;case 5:r.user=p.bin_proto.User.decode(e,e.uint32());break;default:e.skipType(7&o)}}return r},e.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.optionId&&e.hasOwnProperty("optionId")&&!d.isString(e.optionId))return"optionId: string expected";if(null!=e.createdAt&&e.hasOwnProperty("createdAt")&&!(d.isInteger(e.createdAt)||e.createdAt&&d.isInteger(e.createdAt.low)&&d.isInteger(e.createdAt.high)))return"createdAt: integer|Long expected";if(null!=e.user&&e.hasOwnProperty("user")){var t=p.bin_proto.User.verify(e.user);if(t)return"user."+t}return null},e.fromObject=function(e){if(e instanceof p.bin_proto.PollVote)return e;var t=new p.bin_proto.PollVote;if(null!=e.optionId&&(t.optionId=String(e.optionId)),null!=e.createdAt&&(d.Long?(t.createdAt=d.Long.fromValue(e.createdAt)).unsigned=!1:"string"==typeof e.createdAt?t.createdAt=parseInt(e.createdAt,10):"number"==typeof e.createdAt?t.createdAt=e.createdAt:"object"==typeof e.createdAt&&(t.createdAt=new d.LongBits(e.createdAt.low>>>0,e.createdAt.high>>>0).toNumber())),null!=e.user){if("object"!=typeof e.user)throw TypeError(".bin_proto.PollVote.user: object expected");t.user=p.bin_proto.User.fromObject(e.user)}return t},e.toObject=function(e,t){t||(t={});var n={};if(t.defaults){if(n.optionId="",d.Long){var r=new d.Long(0,0,!1);n.createdAt=t.longs===String?r.toString():t.longs===Number?r.toNumber():r}else n.createdAt=t.longs===String?"0":0;n.user=null}return null!=e.optionId&&e.hasOwnProperty("optionId")&&(n.optionId=e.optionId),null!=e.createdAt&&e.hasOwnProperty("createdAt")&&("number"==typeof e.createdAt?n.createdAt=t.longs===String?String(e.createdAt):e.createdAt:n.createdAt=t.longs===String?d.Long.prototype.toString.call(e.createdAt):t.longs===Number?new d.LongBits(e.createdAt.low>>>0,e.createdAt.high>>>0).toNumber():e.createdAt),null!=e.user&&e.hasOwnProperty("user")&&(n.user=p.bin_proto.User.toObject(e.user,t)),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,l.util.toJSONOptions)},e}(),i.PollDetails=function(){function e(e){if(this.options=[],e)for(var t=Object.keys(e),n=0;n>>3){case 1:r.id=e.string();break;case 2:r.name=e.string();break;case 3:r.description=e.string();break;case 4:r.options&&r.options.length||(r.options=[]),r.options.push(p.bin_proto.PollOption.decode(e,e.uint32()));break;case 5:r.anonymous=e.bool();break;case 6:r.allowMultipleVotes=e.bool();break;case 7:r.allowVoteRetract=e.bool();break;case 8:r.changedVotes=p.bin_proto.ChangedVotes.decode(e,e.uint32());break;case 9:r.voteDetails=p.bin_proto.VoteDetails.decode(e,e.uint32());break;case 10:r.createdAt=e.int64();break;case 11:r.updatedAt=e.int64();break;case 12:r.closedAt=e.int64();break;case 13:r.closed=e.bool();break;default:e.skipType(7&o)}}return r},e.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!=typeof e||null===e)return"object expected";var t={};if(null!=e.id&&e.hasOwnProperty("id")&&!d.isString(e.id))return"id: string expected";if(null!=e.name&&e.hasOwnProperty("name")&&!d.isString(e.name))return"name: string expected";if(null!=e.description&&e.hasOwnProperty("description")&&!d.isString(e.description))return"description: string expected";if(null!=e.options&&e.hasOwnProperty("options")){if(!Array.isArray(e.options))return"options: array expected";for(var n=0;n>>0,e.createdAt.high>>>0).toNumber())),null!=e.updatedAt&&(d.Long?(t.updatedAt=d.Long.fromValue(e.updatedAt)).unsigned=!1:"string"==typeof e.updatedAt?t.updatedAt=parseInt(e.updatedAt,10):"number"==typeof e.updatedAt?t.updatedAt=e.updatedAt:"object"==typeof e.updatedAt&&(t.updatedAt=new d.LongBits(e.updatedAt.low>>>0,e.updatedAt.high>>>0).toNumber())),null!=e.closedAt&&(d.Long?(t.closedAt=d.Long.fromValue(e.closedAt)).unsigned=!1:"string"==typeof e.closedAt?t.closedAt=parseInt(e.closedAt,10):"number"==typeof e.closedAt?t.closedAt=e.closedAt:"object"==typeof e.closedAt&&(t.closedAt=new d.LongBits(e.closedAt.low>>>0,e.closedAt.high>>>0).toNumber())),null!=e.closed&&(t.closed=Boolean(e.closed)),t},e.toObject=function(e,t){t||(t={});var n={};if((t.arrays||t.defaults)&&(n.options=[]),t.defaults){if(n.id="",n.name="",n.description="",n.anonymous=!1,n.allowMultipleVotes=!1,n.allowVoteRetract=!1,d.Long){var r=new d.Long(0,0,!1);n.createdAt=t.longs===String?r.toString():t.longs===Number?r.toNumber():r}else n.createdAt=t.longs===String?"0":0;d.Long?(r=new d.Long(0,0,!1),n.updatedAt=t.longs===String?r.toString():t.longs===Number?r.toNumber():r):n.updatedAt=t.longs===String?"0":0,d.Long?(r=new d.Long(0,0,!1),n.closedAt=t.longs===String?r.toString():t.longs===Number?r.toNumber():r):n.closedAt=t.longs===String?"0":0,n.closed=!1}if(null!=e.id&&e.hasOwnProperty("id")&&(n.id=e.id),null!=e.name&&e.hasOwnProperty("name")&&(n.name=e.name),null!=e.description&&e.hasOwnProperty("description")&&(n.description=e.description),e.options&&e.options.length){n.options=[];for(var o=0;o>>0,e.createdAt.high>>>0).toNumber():e.createdAt),null!=e.updatedAt&&e.hasOwnProperty("updatedAt")&&("number"==typeof e.updatedAt?n.updatedAt=t.longs===String?String(e.updatedAt):e.updatedAt:n.updatedAt=t.longs===String?d.Long.prototype.toString.call(e.updatedAt):t.longs===Number?new d.LongBits(e.updatedAt.low>>>0,e.updatedAt.high>>>0).toNumber():e.updatedAt),null!=e.closedAt&&e.hasOwnProperty("closedAt")&&("number"==typeof e.closedAt?n.closedAt=t.longs===String?String(e.closedAt):e.closedAt:n.closedAt=t.longs===String?d.Long.prototype.toString.call(e.closedAt):t.longs===Number?new d.LongBits(e.closedAt.low>>>0,e.closedAt.high>>>0).toNumber():e.closedAt),null!=e.closed&&e.hasOwnProperty("closed")&&(n.closed=e.closed),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,l.util.toJSONOptions)},e}(),i.ChangedVotes=function(){function e(e){if(this.addedVotes=[],this.removedVotes=[],e)for(var t=Object.keys(e),n=0;n>>3){case 1:r.addedVotes&&r.addedVotes.length||(r.addedVotes=[]),r.addedVotes.push(p.bin_proto.PollVote.decode(e,e.uint32()));break;case 2:r.removedVotes&&r.removedVotes.length||(r.removedVotes=[]),r.removedVotes.push(p.bin_proto.PollVote.decode(e,e.uint32()));break;default:e.skipType(7&o)}}return r},e.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.addedVotes&&e.hasOwnProperty("addedVotes")){if(!Array.isArray(e.addedVotes))return"addedVotes: array expected";for(var t=0;t>>3){case 1:e.skip().pos++,o.votesPerOption===d.emptyObject&&(o.votesPerOption={}),n=e.string(),e.pos++,o.votesPerOption[n]=e.int32();break;case 2:o.votes&&o.votes.length||(o.votes=[]),o.votes.push(p.bin_proto.PollVote.decode(e,e.uint32()));break;case 3:o.ownVotes&&o.ownVotes.length||(o.ownVotes=[]),o.ownVotes.push(p.bin_proto.PollVote.decode(e,e.uint32()));break;default:e.skipType(7&i)}}return o},e.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.votesPerOption&&e.hasOwnProperty("votesPerOption")){if(!d.isObject(e.votesPerOption))return"votesPerOption: object expected";for(var t=Object.keys(e.votesPerOption),n=0;n>>3){case 1:r.id=e.string();break;case 2:r.messageId=e.int64();break;case 3:r.pollId=e.string();break;case 4:r.votes&&r.votes.length||(r.votes=[]),r.votes.push(p.bin_proto.PollVote.decode(e,e.uint32()));break;case 5:r.nextToken=e.string();break;default:e.skipType(7&o)}}return r},e.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.id&&e.hasOwnProperty("id")&&!d.isString(e.id))return"id: string expected";if(null!=e.messageId&&e.hasOwnProperty("messageId")&&!(d.isInteger(e.messageId)||e.messageId&&d.isInteger(e.messageId.low)&&d.isInteger(e.messageId.high)))return"messageId: integer|Long expected";if(null!=e.pollId&&e.hasOwnProperty("pollId")&&!d.isString(e.pollId))return"pollId: string expected";if(null!=e.votes&&e.hasOwnProperty("votes")){if(!Array.isArray(e.votes))return"votes: array expected";for(var t=0;t>>0,e.messageId.high>>>0).toNumber())),null!=e.pollId&&(t.pollId=String(e.pollId)),e.votes){if(!Array.isArray(e.votes))throw TypeError(".bin_proto.PollVotesResponse.votes: array expected");t.votes=[];for(var n=0;n>>0,e.messageId.high>>>0).toNumber():e.messageId),null!=e.pollId&&e.hasOwnProperty("pollId")&&(n.pollId=e.pollId),e.votes&&e.votes.length){n.votes=[];for(var o=0;o>>3){case 1:r.id=e.string();break;case 2:r.messageId=e.int64();break;case 3:r.pollId=e.string();break;case 4:r.optionId=e.string();break;case 5:r.limit=e.int32();break;case 6:r.nextToken=e.string();break;default:e.skipType(7&o)}}return r},e.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},e.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.id&&e.hasOwnProperty("id")&&!d.isString(e.id)?"id: string expected":null!=e.messageId&&e.hasOwnProperty("messageId")&&!(d.isInteger(e.messageId)||e.messageId&&d.isInteger(e.messageId.low)&&d.isInteger(e.messageId.high))?"messageId: integer|Long expected":null!=e.pollId&&e.hasOwnProperty("pollId")&&!d.isString(e.pollId)?"pollId: string expected":null!=e.optionId&&e.hasOwnProperty("optionId")&&!d.isString(e.optionId)?"optionId: string expected":null!=e.limit&&e.hasOwnProperty("limit")&&!d.isInteger(e.limit)?"limit: integer expected":null!=e.nextToken&&e.hasOwnProperty("nextToken")&&!d.isString(e.nextToken)?"nextToken: string expected":null},e.fromObject=function(e){if(e instanceof p.bin_proto.PollVotesRequest)return e;var t=new p.bin_proto.PollVotesRequest;return null!=e.id&&(t.id=String(e.id)),null!=e.messageId&&(d.Long?(t.messageId=d.Long.fromValue(e.messageId)).unsigned=!1:"string"==typeof e.messageId?t.messageId=parseInt(e.messageId,10):"number"==typeof e.messageId?t.messageId=e.messageId:"object"==typeof e.messageId&&(t.messageId=new d.LongBits(e.messageId.low>>>0,e.messageId.high>>>0).toNumber())),null!=e.pollId&&(t.pollId=String(e.pollId)),null!=e.optionId&&(t.optionId=String(e.optionId)),null!=e.limit&&(t.limit=0|e.limit),null!=e.nextToken&&(t.nextToken=String(e.nextToken)),t},e.toObject=function(e,t){t||(t={});var n={};if(t.defaults){if(n.id="",d.Long){var r=new d.Long(0,0,!1);n.messageId=t.longs===String?r.toString():t.longs===Number?r.toNumber():r}else n.messageId=t.longs===String?"0":0;n.pollId="",n.optionId="",n.limit=0,n.nextToken=""}return null!=e.id&&e.hasOwnProperty("id")&&(n.id=e.id),null!=e.messageId&&e.hasOwnProperty("messageId")&&("number"==typeof e.messageId?n.messageId=t.longs===String?String(e.messageId):e.messageId:n.messageId=t.longs===String?d.Long.prototype.toString.call(e.messageId):t.longs===Number?new d.LongBits(e.messageId.low>>>0,e.messageId.high>>>0).toNumber():e.messageId),null!=e.pollId&&e.hasOwnProperty("pollId")&&(n.pollId=e.pollId),null!=e.optionId&&e.hasOwnProperty("optionId")&&(n.optionId=e.optionId),null!=e.limit&&e.hasOwnProperty("limit")&&(n.limit=e.limit),null!=e.nextToken&&e.hasOwnProperty("nextToken")&&(n.nextToken=e.nextToken),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,l.util.toJSONOptions)},e}(),i.PollVoteParams=function(){function e(e){if(this.addOptionId=[],this.removeOptionId=[],e)for(var t=Object.keys(e),n=0;n>>3){case 1:r.messageId=e.int64();break;case 2:r.pollId=e.string();break;case 3:r.addOptionId&&r.addOptionId.length||(r.addOptionId=[]),r.addOptionId.push(e.string());break;case 4:r.removeOptionId&&r.removeOptionId.length||(r.removeOptionId=[]),r.removeOptionId.push(e.string());break;default:e.skipType(7&o)}}return r},e.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.messageId&&e.hasOwnProperty("messageId")&&!(d.isInteger(e.messageId)||e.messageId&&d.isInteger(e.messageId.low)&&d.isInteger(e.messageId.high)))return"messageId: integer|Long expected";if(null!=e.pollId&&e.hasOwnProperty("pollId")&&!d.isString(e.pollId))return"pollId: string expected";if(null!=e.addOptionId&&e.hasOwnProperty("addOptionId")){if(!Array.isArray(e.addOptionId))return"addOptionId: array expected";for(var t=0;t>>0,e.messageId.high>>>0).toNumber())),null!=e.pollId&&(t.pollId=String(e.pollId)),e.addOptionId){if(!Array.isArray(e.addOptionId))throw TypeError(".bin_proto.PollVoteParams.addOptionId: array expected");t.addOptionId=[];for(var n=0;n>>0,e.messageId.high>>>0).toNumber():e.messageId),null!=e.pollId&&e.hasOwnProperty("pollId")&&(n.pollId=e.pollId),e.addOptionId&&e.addOptionId.length){n.addOptionId=[];for(var o=0;o>>3){case 1:r.codeV1=e.int32();break;case 2:r.messageV1=e.string();break;case 3:r.idV1=e.string();break;case 4:r.additionalDataV1=e.bytes();break;case 5:r.id=e.string();break;case 6:r.type=e.string();break;case 7:r.code=e.int32();break;case 8:r.message=e.string();break;case 9:r.traceId=e.string();break;default:e.skipType(7&o)}}return r},e.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},e.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.codeV1&&e.hasOwnProperty("codeV1")&&!d.isInteger(e.codeV1)?"codeV1: integer expected":null!=e.messageV1&&e.hasOwnProperty("messageV1")&&!d.isString(e.messageV1)?"messageV1: string expected":null!=e.idV1&&e.hasOwnProperty("idV1")&&!d.isString(e.idV1)?"idV1: string expected":null!=e.additionalDataV1&&e.hasOwnProperty("additionalDataV1")&&!(e.additionalDataV1&&"number"==typeof e.additionalDataV1.length||d.isString(e.additionalDataV1))?"additionalDataV1: buffer expected":null!=e.id&&e.hasOwnProperty("id")&&!d.isString(e.id)?"id: string expected":null!=e.type&&e.hasOwnProperty("type")&&!d.isString(e.type)?"type: string expected":null!=e.code&&e.hasOwnProperty("code")&&!d.isInteger(e.code)?"code: integer expected":null!=e.message&&e.hasOwnProperty("message")&&!d.isString(e.message)?"message: string expected":null!=e.traceId&&e.hasOwnProperty("traceId")&&!d.isString(e.traceId)?"traceId: string expected":null},e.fromObject=function(e){if(e instanceof p.bin_proto.Error)return e;var t=new p.bin_proto.Error;return null!=e.codeV1&&(t.codeV1=0|e.codeV1),null!=e.messageV1&&(t.messageV1=String(e.messageV1)),null!=e.idV1&&(t.idV1=String(e.idV1)),null!=e.additionalDataV1&&("string"==typeof e.additionalDataV1?d.base64.decode(e.additionalDataV1,t.additionalDataV1=d.newBuffer(d.base64.length(e.additionalDataV1)),0):e.additionalDataV1.length&&(t.additionalDataV1=e.additionalDataV1)),null!=e.id&&(t.id=String(e.id)),null!=e.type&&(t.type=String(e.type)),null!=e.code&&(t.code=0|e.code),null!=e.message&&(t.message=String(e.message)),null!=e.traceId&&(t.traceId=String(e.traceId)),t},e.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.codeV1=0,n.messageV1="",n.idV1="",t.bytes===String?n.additionalDataV1="":(n.additionalDataV1=[],t.bytes!==Array&&(n.additionalDataV1=d.newBuffer(n.additionalDataV1))),n.id="",n.type="",n.code=0,n.message="",n.traceId=""),null!=e.codeV1&&e.hasOwnProperty("codeV1")&&(n.codeV1=e.codeV1),null!=e.messageV1&&e.hasOwnProperty("messageV1")&&(n.messageV1=e.messageV1),null!=e.idV1&&e.hasOwnProperty("idV1")&&(n.idV1=e.idV1),null!=e.additionalDataV1&&e.hasOwnProperty("additionalDataV1")&&(n.additionalDataV1=t.bytes===String?d.base64.encode(e.additionalDataV1,0,e.additionalDataV1.length):t.bytes===Array?Array.prototype.slice.call(e.additionalDataV1):e.additionalDataV1),null!=e.id&&e.hasOwnProperty("id")&&(n.id=e.id),null!=e.type&&e.hasOwnProperty("type")&&(n.type=e.type),null!=e.code&&e.hasOwnProperty("code")&&(n.code=e.code),null!=e.message&&e.hasOwnProperty("message")&&(n.message=e.message),null!=e.traceId&&e.hasOwnProperty("traceId")&&(n.traceId=e.traceId),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,l.util.toJSONOptions)},e}(),i.SearchQuery=function(){function e(e){if(e)for(var t=Object.keys(e),n=0;n>>3){case 1:r.word=e.string();break;case 2:r.op=e.int32();break;default:e.skipType(7&o)}}return r},e.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.word&&e.hasOwnProperty("word")&&!d.isString(e.word))return"word: string expected";if(null!=e.op&&e.hasOwnProperty("op"))switch(e.op){default:return"op: enum value expected";case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:case 9:case 10:}return null},e.fromObject=function(e){if(e instanceof p.bin_proto.SearchQuery)return e;var t=new p.bin_proto.SearchQuery;switch(null!=e.word&&(t.word=String(e.word)),e.op){case"NONE":case 0:t.op=0;break;case"CONTAINS":case 1:t.op=1;break;case"BEGINS":case 2:t.op=2;break;case"EQ":case 3:t.op=3;break;case"LT":case 4:t.op=4;break;case"LTE":case 5:t.op=5;break;case"GT":case 6:t.op=6;break;case"GTE":case 7:t.op=7;break;case"IN":case 8:t.op=8;break;case"BETWEEN":case 9:t.op=9;break;case"NOT_IN":case 10:t.op=10}return t},e.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.word="",n.op=t.enums===String?"NONE":0),null!=e.word&&e.hasOwnProperty("word")&&(n.word=e.word),null!=e.op&&e.hasOwnProperty("op")&&(n.op=t.enums===String?p.bin_proto.SearchQuery.Operator[e.op]:e.op),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,l.util.toJSONOptions)},e.Operator=function(){var e={},t=Object.create(e);return t[e[0]="NONE"]=0,t[e[1]="CONTAINS"]=1,t[e[2]="BEGINS"]=2,t[e[3]="EQ"]=3,t[e[4]="LT"]=4,t[e[5]="LTE"]=5,t[e[6]="GT"]=6,t[e[7]="GTE"]=7,t[e[8]="IN"]=8,t[e[9]="BETWEEN"]=9,t[e[10]="NOT_IN"]=10,t}(),e}(),i.ChannelSearchQuery=function(){function e(e){if(this.fields=[],this.reqParams={},e)for(var t=Object.keys(e),n=0;n>>3){case 1:o.id=e.string();break;case 2:o.channelType=e.string();break;case 3:o.fields&&o.fields.length||(o.fields=[]),o.fields.push(p.bin_proto.ChannelSearchQuery.Fields.decode(e,e.uint32()));break;case 4:o.index=e.int32();break;case 5:o.count=e.int32();break;case 6:o.to=e.string();break;case 7:o.sort=e.int32();break;case 8:e.skip().pos++,o.reqParams===d.emptyObject&&(o.reqParams={}),n=e.int32(),e.pos++,o.reqParams[n]=p.bin_proto.Any.decode(e,e.uint32());break;case 9:o.nextToken=e.string();break;case 10:o.mutualWithUserId=e.string();break;default:e.skipType(7&i)}}return o},e.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.id&&e.hasOwnProperty("id")&&!d.isString(e.id))return"id: string expected";if(null!=e.channelType&&e.hasOwnProperty("channelType")&&!d.isString(e.channelType))return"channelType: string expected";if(null!=e.fields&&e.hasOwnProperty("fields")){if(!Array.isArray(e.fields))return"fields: array expected";for(var t=0;t>>3){case 1:r.key=e.int32();break;case 2:r.value=p.bin_proto.SearchQuery.decode(e,e.uint32());break;default:e.skipType(7&o)}}return r},e.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.key&&e.hasOwnProperty("key"))switch(e.key){default:return"key: enum value expected";case 0:case 1:case 2:case 3:case 4:case 5:case 6:}if(null!=e.value&&e.hasOwnProperty("value")){var t=p.bin_proto.SearchQuery.verify(e.value);if(t)return"value."+t}return null},e.fromObject=function(e){if(e instanceof p.bin_proto.ChannelSearchQuery.Fields)return e;var t=new p.bin_proto.ChannelSearchQuery.Fields;switch(e.key){case"SUBJECT":case 0:t.key=0;break;case"URI":case 1:t.key=1;break;case"LABEL":case 2:t.key=2;break;case"USER":case 3:t.key=3;break;case"STATE":case 4:t.key=4;break;case"TYPE":case 5:t.key=5;break;case"CREATED_AT":case 6:t.key=6}if(null!=e.value){if("object"!=typeof e.value)throw TypeError(".bin_proto.ChannelSearchQuery.Fields.value: object expected");t.value=p.bin_proto.SearchQuery.fromObject(e.value)}return t},e.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.key=t.enums===String?"SUBJECT":0,n.value=null),null!=e.key&&e.hasOwnProperty("key")&&(n.key=t.enums===String?p.bin_proto.ChannelSearchQuery.SearchQueryKey[e.key]:e.key),null!=e.value&&e.hasOwnProperty("value")&&(n.value=p.bin_proto.SearchQuery.toObject(e.value,t)),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,l.util.toJSONOptions)},e}(),e}(),i.TokenQuery=function(){function e(e){if(e)for(var t=Object.keys(e),n=0;n>>3){case 1:r.id=e.string();break;case 2:r.deviceToken=e.string();break;case 3:r.deviceType=e.string();break;default:e.skipType(7&o)}}return r},e.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},e.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.id&&e.hasOwnProperty("id")&&!d.isString(e.id)?"id: string expected":null!=e.deviceToken&&e.hasOwnProperty("deviceToken")&&!d.isString(e.deviceToken)?"deviceToken: string expected":null!=e.deviceType&&e.hasOwnProperty("deviceType")&&!d.isString(e.deviceType)?"deviceType: string expected":null},e.fromObject=function(e){if(e instanceof p.bin_proto.TokenQuery)return e;var t=new p.bin_proto.TokenQuery;return null!=e.id&&(t.id=String(e.id)),null!=e.deviceToken&&(t.deviceToken=String(e.deviceToken)),null!=e.deviceType&&(t.deviceType=String(e.deviceType)),t},e.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.id="",n.deviceToken="",n.deviceType=""),null!=e.id&&e.hasOwnProperty("id")&&(n.id=e.id),null!=e.deviceToken&&e.hasOwnProperty("deviceToken")&&(n.deviceToken=e.deviceToken),null!=e.deviceType&&e.hasOwnProperty("deviceType")&&(n.deviceType=e.deviceType),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,l.util.toJSONOptions)},e}(),i.Contact=function(){function e(e){if(this.keys=[],e)for(var t=Object.keys(e),n=0;n>>3){case 1:r.user=p.bin_proto.User.decode(e,e.uint32());break;case 2:r.keys&&r.keys.length||(r.keys=[]),r.keys.push(e.string());break;case 3:r.metadata=e.string();break;case 4:r.firstName=e.string();break;case 5:r.lastName=e.string();break;default:e.skipType(7&o)}}return r},e.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.user&&e.hasOwnProperty("user")){var t=p.bin_proto.User.verify(e.user);if(t)return"user."+t}if(null!=e.keys&&e.hasOwnProperty("keys")){if(!Array.isArray(e.keys))return"keys: array expected";for(var n=0;n>>3==1?(r.contacts&&r.contacts.length||(r.contacts=[]),r.contacts.push(p.bin_proto.Contact.decode(e,e.uint32()))):e.skipType(7&o)}return r},e.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.contacts&&e.hasOwnProperty("contacts")){if(!Array.isArray(e.contacts))return"contacts: array expected";for(var t=0;t>>3==1?(r.contacts&&r.contacts.length||(r.contacts=[]),r.contacts.push(p.bin_proto.Contact.decode(e,e.uint32()))):e.skipType(7&o)}return r},e.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.contacts&&e.hasOwnProperty("contacts")){if(!Array.isArray(e.contacts))return"contacts: array expected";for(var t=0;t>>3){case 1:r.key=e.string();break;case 2:r.metadata=e.string();break;case 3:r.firstName=e.string();break;case 4:r.lastName=e.string();break;default:e.skipType(7&o)}}return r},e.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},e.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.key&&e.hasOwnProperty("key")&&!d.isString(e.key)?"key: string expected":null!=e.metadata&&e.hasOwnProperty("metadata")&&!d.isString(e.metadata)?"metadata: string expected":null!=e.firstName&&e.hasOwnProperty("firstName")&&!d.isString(e.firstName)?"firstName: string expected":null!=e.lastName&&e.hasOwnProperty("lastName")&&!d.isString(e.lastName)?"lastName: string expected":null},e.fromObject=function(e){if(e instanceof p.bin_proto.ContactDiscovery)return e;var t=new p.bin_proto.ContactDiscovery;return null!=e.key&&(t.key=String(e.key)),null!=e.metadata&&(t.metadata=String(e.metadata)),null!=e.firstName&&(t.firstName=String(e.firstName)),null!=e.lastName&&(t.lastName=String(e.lastName)),t},e.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.key="",n.metadata="",n.firstName="",n.lastName=""),null!=e.key&&e.hasOwnProperty("key")&&(n.key=e.key),null!=e.metadata&&e.hasOwnProperty("metadata")&&(n.metadata=e.metadata),null!=e.firstName&&e.hasOwnProperty("firstName")&&(n.firstName=e.firstName),null!=e.lastName&&e.hasOwnProperty("lastName")&&(n.lastName=e.lastName),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,l.util.toJSONOptions)},e}(),i.ContactsDiscoveryRequest=function(){function e(e){if(this.discoveries=[],e)for(var t=Object.keys(e),n=0;n>>3==1?(r.discoveries&&r.discoveries.length||(r.discoveries=[]),r.discoveries.push(p.bin_proto.ContactDiscovery.decode(e,e.uint32()))):e.skipType(7&o)}return r},e.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.discoveries&&e.hasOwnProperty("discoveries")){if(!Array.isArray(e.discoveries))return"discoveries: array expected";for(var t=0;t>>3){case 1:r.discoveries&&r.discoveries.length||(r.discoveries=[]),r.discoveries.push(p.bin_proto.ContactDiscovery.decode(e,e.uint32()));break;case 2:r.contacts&&r.contacts.length||(r.contacts=[]),r.contacts.push(p.bin_proto.Contact.decode(e,e.uint32()));break;default:e.skipType(7&o)}}return r},e.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.discoveries&&e.hasOwnProperty("discoveries")){if(!Array.isArray(e.discoveries))return"discoveries: array expected";for(var t=0;t>>3){case 1:o.contactUsername=e.string();break;case 2:e.skip().pos++,o.userContact===d.emptyObject&&(o.userContact={}),n=e.string(),e.pos++,o.userContact[n]=p.bin_proto.Contact.decode(e,e.uint32());break;default:e.skipType(7&i)}}return o},e.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.contactUsername&&e.hasOwnProperty("contactUsername")&&!d.isString(e.contactUsername))return"contactUsername: string expected";if(null!=e.userContact&&e.hasOwnProperty("userContact")){if(!d.isObject(e.userContact))return"userContact: object expected";for(var t=Object.keys(e.userContact),n=0;n>>3){case 1:o.requestId=e.string();break;case 2:o.event=e.int32();break;case 3:o.callId=e.string();break;case 4:o.sessionId=e.string();break;case 5:o.mediaFlow=e.int32();break;case 6:o.from=e.string();break;case 7:o.to=e.string();break;case 8:o.calls&&o.calls.length||(o.calls=[]),o.calls.push(p.bin_proto.Call.decode(e,e.uint32()));break;case 9:o.participants&&o.participants.length||(o.participants=[]),o.participants.push(p.bin_proto.Participant.decode(e,e.uint32()));break;case 10:o.sdp=e.string();break;case 11:o.ice=p.bin_proto.Ice.decode(e,e.uint32());break;case 12:e.skip().pos++,o.metadata===d.emptyObject&&(o.metadata={}),n=e.string(),e.pos++,o.metadata[n]=e.string();break;case 13:o.turnServers&&o.turnServers.length||(o.turnServers=[]),o.turnServers.push(p.bin_proto.TurnServer.decode(e,e.uint32()));break;case 14:o.error=p.bin_proto.SignalError.decode(e,e.uint32());break;case 15:o.sessionData=p.bin_proto.SessionData.decode(e,e.uint32());break;case 16:o.callOptions=p.bin_proto.CallOptions.decode(e,e.uint32());break;case 17:o.joinOptions=p.bin_proto.JoinOptions.decode(e,e.uint32());break;default:e.skipType(7&i)}}return o},e.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.requestId&&e.hasOwnProperty("requestId")&&!d.isString(e.requestId))return"requestId: string expected";if(null!=e.event&&e.hasOwnProperty("event"))switch(e.event){default:return"event: enum value expected";case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:case 9:case 10:case 11:case 12:case 13:case 14:case 15:case 16:case 17:case 18:case 19:case 20:case 21:case 22:case 23:case 24:case 25:case 26:case 27:case 28:case 29:case 30:case 31:case 32:}if(null!=e.callId&&e.hasOwnProperty("callId")&&!d.isString(e.callId))return"callId: string expected";if(null!=e.sessionId&&e.hasOwnProperty("sessionId")&&!d.isString(e.sessionId))return"sessionId: string expected";if(null!=e.mediaFlow&&e.hasOwnProperty("mediaFlow"))switch(e.mediaFlow){default:return"mediaFlow: enum value expected";case 0:case 1:case 2:}if(null!=e.from&&e.hasOwnProperty("from")&&!d.isString(e.from))return"from: string expected";if(null!=e.to&&e.hasOwnProperty("to")&&!d.isString(e.to))return"to: string expected";if(null!=e.calls&&e.hasOwnProperty("calls")){if(!Array.isArray(e.calls))return"calls: array expected";for(var t=0;t>>3){case 1:r.id=e.string();break;case 2:r.version=e.string();break;case 3:r.sdp=e.string();break;case 4:r.sdpData=p.bin_proto.SDPData.decode(e,e.uint32());break;default:e.skipType(7&o)}}return r},e.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.id&&e.hasOwnProperty("id")&&!d.isString(e.id))return"id: string expected";if(null!=e.version&&e.hasOwnProperty("version")&&!d.isString(e.version))return"version: string expected";if(null!=e.sdp&&e.hasOwnProperty("sdp")&&!d.isString(e.sdp))return"sdp: string expected";if(null!=e.sdpData&&e.hasOwnProperty("sdpData")){var t=p.bin_proto.SDPData.verify(e.sdpData);if(t)return"sdpData."+t}return null},e.fromObject=function(e){if(e instanceof p.bin_proto.SessionData)return e;var t=new p.bin_proto.SessionData;if(null!=e.id&&(t.id=String(e.id)),null!=e.version&&(t.version=String(e.version)),null!=e.sdp&&(t.sdp=String(e.sdp)),null!=e.sdpData){if("object"!=typeof e.sdpData)throw TypeError(".bin_proto.SessionData.sdpData: object expected");t.sdpData=p.bin_proto.SDPData.fromObject(e.sdpData)}return t},e.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.id="",n.version="",n.sdp="",n.sdpData=null),null!=e.id&&e.hasOwnProperty("id")&&(n.id=e.id),null!=e.version&&e.hasOwnProperty("version")&&(n.version=e.version),null!=e.sdp&&e.hasOwnProperty("sdp")&&(n.sdp=e.sdp),null!=e.sdpData&&e.hasOwnProperty("sdpData")&&(n.sdpData=p.bin_proto.SDPData.toObject(e.sdpData,t)),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,l.util.toJSONOptions)},e}(),i.Ice=function(){function e(e){if(e)for(var t=Object.keys(e),n=0;n>>3){case 1:r.candidate=e.string();break;case 2:r.sdpMid=e.string();break;case 3:r.sdpMLineIndex=e.int32();break;default:e.skipType(7&o)}}return r},e.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},e.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.candidate&&e.hasOwnProperty("candidate")&&!d.isString(e.candidate)?"candidate: string expected":null!=e.sdpMid&&e.hasOwnProperty("sdpMid")&&!d.isString(e.sdpMid)?"sdpMid: string expected":null!=e.sdpMLineIndex&&e.hasOwnProperty("sdpMLineIndex")&&!d.isInteger(e.sdpMLineIndex)?"sdpMLineIndex: integer expected":null},e.fromObject=function(e){if(e instanceof p.bin_proto.Ice)return e;var t=new p.bin_proto.Ice;return null!=e.candidate&&(t.candidate=String(e.candidate)),null!=e.sdpMid&&(t.sdpMid=String(e.sdpMid)),null!=e.sdpMLineIndex&&(t.sdpMLineIndex=0|e.sdpMLineIndex),t},e.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.candidate="",n.sdpMid="",n.sdpMLineIndex=0),null!=e.candidate&&e.hasOwnProperty("candidate")&&(n.candidate=e.candidate),null!=e.sdpMid&&e.hasOwnProperty("sdpMid")&&(n.sdpMid=e.sdpMid),null!=e.sdpMLineIndex&&e.hasOwnProperty("sdpMLineIndex")&&(n.sdpMLineIndex=e.sdpMLineIndex),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,l.util.toJSONOptions)},e}(),i.TurnServer=function(){function e(e){if(e)for(var t=Object.keys(e),n=0;n>>3){case 1:r.url=e.string();break;case 2:r.username=e.string();break;case 3:r.password=e.string();break;default:e.skipType(7&o)}}return r},e.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},e.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.url&&e.hasOwnProperty("url")&&!d.isString(e.url)?"url: string expected":null!=e.username&&e.hasOwnProperty("username")&&!d.isString(e.username)?"username: string expected":null!=e.password&&e.hasOwnProperty("password")&&!d.isString(e.password)?"password: string expected":null},e.fromObject=function(e){if(e instanceof p.bin_proto.TurnServer)return e;var t=new p.bin_proto.TurnServer;return null!=e.url&&(t.url=String(e.url)),null!=e.username&&(t.username=String(e.username)),null!=e.password&&(t.password=String(e.password)),t},e.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.url="",n.username="",n.password=""),null!=e.url&&e.hasOwnProperty("url")&&(n.url=e.url),null!=e.username&&e.hasOwnProperty("username")&&(n.username=e.username),null!=e.password&&e.hasOwnProperty("password")&&(n.password=e.password),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,l.util.toJSONOptions)},e}(),i.SignalError=function(){function e(e){if(e)for(var t=Object.keys(e),n=0;n>>3){case 1:r.code=e.int32();break;case 2:r.message=e.string();break;default:e.skipType(7&o)}}return r},e.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},e.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.code&&e.hasOwnProperty("code")&&!d.isInteger(e.code)?"code: integer expected":null!=e.message&&e.hasOwnProperty("message")&&!d.isString(e.message)?"message: string expected":null},e.fromObject=function(e){if(e instanceof p.bin_proto.SignalError)return e;var t=new p.bin_proto.SignalError;return null!=e.code&&(t.code=0|e.code),null!=e.message&&(t.message=String(e.message)),t},e.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.code=0,n.message=""),null!=e.code&&e.hasOwnProperty("code")&&(n.code=e.code),null!=e.message&&e.hasOwnProperty("message")&&(n.message=e.message),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,l.util.toJSONOptions)},e}(),i.MediaType=function(){var e={},t=Object.create(e);return t[e[0]="AUDIO"]=0,t[e[1]="VIDEO"]=1,t}(),i.Direction=function(){var e={},t=Object.create(e);return t[e[0]="SENDRECV"]=0,t[e[1]="SENDONLY"]=1,t[e[2]="RECVONLY"]=2,t[e[3]="INACTIVE"]=3,t}(),i.DTLSSetup=function(){var e={},t=Object.create(e);return t[e[0]="ACTIVE"]=0,t[e[1]="PASSIVE"]=1,t[e[2]="ACTPASS"]=2,t}(),i.HashFunction=function(){var e={},t=Object.create(e);return t[e[0]="SHA256"]=0,t[e[1]="SHA1"]=1,t[e[2]="SHA384"]=2,t[e[3]="SHA512"]=3,t[e[4]="MD5"]=4,t}(),i.Fingerprint=function(){function e(e){if(e)for(var t=Object.keys(e),n=0;n>>3){case 1:r.hashFunc=e.int32();break;case 2:r.hashValue=e.bytes();break;default:e.skipType(7&o)}}return r},e.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.hashFunc&&e.hasOwnProperty("hashFunc"))switch(e.hashFunc){default:return"hashFunc: enum value expected";case 0:case 1:case 2:case 3:case 4:}return null!=e.hashValue&&e.hasOwnProperty("hashValue")&&!(e.hashValue&&"number"==typeof e.hashValue.length||d.isString(e.hashValue))?"hashValue: buffer expected":null},e.fromObject=function(e){if(e instanceof p.bin_proto.Fingerprint)return e;var t=new p.bin_proto.Fingerprint;switch(e.hashFunc){case"SHA256":case 0:t.hashFunc=0;break;case"SHA1":case 1:t.hashFunc=1;break;case"SHA384":case 2:t.hashFunc=2;break;case"SHA512":case 3:t.hashFunc=3;break;case"MD5":case 4:t.hashFunc=4}return null!=e.hashValue&&("string"==typeof e.hashValue?d.base64.decode(e.hashValue,t.hashValue=d.newBuffer(d.base64.length(e.hashValue)),0):e.hashValue.length&&(t.hashValue=e.hashValue)),t},e.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.hashFunc=t.enums===String?"SHA256":0,t.bytes===String?n.hashValue="":(n.hashValue=[],t.bytes!==Array&&(n.hashValue=d.newBuffer(n.hashValue)))),null!=e.hashFunc&&e.hasOwnProperty("hashFunc")&&(n.hashFunc=t.enums===String?p.bin_proto.HashFunction[e.hashFunc]:e.hashFunc),null!=e.hashValue&&e.hasOwnProperty("hashValue")&&(n.hashValue=t.bytes===String?d.base64.encode(e.hashValue,0,e.hashValue.length):t.bytes===Array?Array.prototype.slice.call(e.hashValue):e.hashValue),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,l.util.toJSONOptions)},e}(),i.FmtpParam=function(){function e(e){if(e)for(var t=Object.keys(e),n=0;n>>3){case 1:r.key=e.string();break;case 2:r.value=e.string();break;default:e.skipType(7&o)}}return r},e.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},e.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.key&&e.hasOwnProperty("key")&&!d.isString(e.key)?"key: string expected":null!=e.value&&e.hasOwnProperty("value")&&!d.isString(e.value)?"value: string expected":null},e.fromObject=function(e){if(e instanceof p.bin_proto.FmtpParam)return e;var t=new p.bin_proto.FmtpParam;return null!=e.key&&(t.key=String(e.key)),null!=e.value&&(t.value=String(e.value)),t},e.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.key="",n.value=""),null!=e.key&&e.hasOwnProperty("key")&&(n.key=e.key),null!=e.value&&e.hasOwnProperty("value")&&(n.value=e.value),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,l.util.toJSONOptions)},e}(),i.MappingEntry=function(){function e(e){if(e)for(var t=Object.keys(e),n=0;n>>3){case 1:r.id=e.uint32();break;case 2:r.mapKey=e.uint32();break;default:e.skipType(7&o)}}return r},e.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},e.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.id&&e.hasOwnProperty("id")&&!d.isInteger(e.id)?"id: integer expected":null!=e.mapKey&&e.hasOwnProperty("mapKey")&&!d.isInteger(e.mapKey)?"mapKey: integer expected":null},e.fromObject=function(e){if(e instanceof p.bin_proto.MappingEntry)return e;var t=new p.bin_proto.MappingEntry;return null!=e.id&&(t.id=e.id>>>0),null!=e.mapKey&&(t.mapKey=e.mapKey>>>0),t},e.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.id=0,n.mapKey=0),null!=e.id&&e.hasOwnProperty("id")&&(n.id=e.id),null!=e.mapKey&&e.hasOwnProperty("mapKey")&&(n.mapKey=e.mapKey),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,l.util.toJSONOptions)},e}(),i.Codec=function(){function e(e){if(this.fmtp=[],this.rtcpFeedbackIds=[],e)for(var t=Object.keys(e),n=0;n>>3){case 1:r.codecName=p.bin_proto.MappingEntry.decode(e,e.uint32());break;case 2:r.fmtp&&r.fmtp.length||(r.fmtp=[]),r.fmtp.push(p.bin_proto.FmtpParam.decode(e,e.uint32()));break;case 3:if(r.rtcpFeedbackIds&&r.rtcpFeedbackIds.length||(r.rtcpFeedbackIds=[]),2==(7&o))for(var i=e.uint32()+e.pos;e.pos>>0}return t},e.toObject=function(e,t){t||(t={});var n={};if((t.arrays||t.defaults)&&(n.fmtp=[],n.rtcpFeedbackIds=[]),t.defaults&&(n.codecName=null),null!=e.codecName&&e.hasOwnProperty("codecName")&&(n.codecName=p.bin_proto.MappingEntry.toObject(e.codecName,t)),e.fmtp&&e.fmtp.length){n.fmtp=[];for(var r=0;r>>3){case 1:r.id=e.uint32();break;case 2:r.cname=e.string();break;case 3:r.msid=e.string();break;default:e.skipType(7&o)}}return r},e.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},e.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.id&&e.hasOwnProperty("id")&&!d.isInteger(e.id)?"id: integer expected":null!=e.cname&&e.hasOwnProperty("cname")&&!d.isString(e.cname)?"cname: string expected":null!=e.msid&&e.hasOwnProperty("msid")&&!d.isString(e.msid)?"msid: string expected":null},e.fromObject=function(e){if(e instanceof p.bin_proto.Ssrc)return e;var t=new p.bin_proto.Ssrc;return null!=e.id&&(t.id=e.id>>>0),null!=e.cname&&(t.cname=String(e.cname)),null!=e.msid&&(t.msid=String(e.msid)),t},e.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.id=0,n.cname="",n.msid=""),null!=e.id&&e.hasOwnProperty("id")&&(n.id=e.id),null!=e.cname&&e.hasOwnProperty("cname")&&(n.cname=e.cname),null!=e.msid&&e.hasOwnProperty("msid")&&(n.msid=e.msid),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,l.util.toJSONOptions)},e}(),i.SsrcGroup=function(){function e(e){if(this.ssrcs=[],e)for(var t=Object.keys(e),n=0;n>>3){case 1:r.semantics=e.string();break;case 2:if(r.ssrcs&&r.ssrcs.length||(r.ssrcs=[]),2==(7&o))for(var i=e.uint32()+e.pos;e.pos>>0}return t},e.toObject=function(e,t){t||(t={});var n={};if((t.arrays||t.defaults)&&(n.ssrcs=[]),t.defaults&&(n.semantics=""),null!=e.semantics&&e.hasOwnProperty("semantics")&&(n.semantics=e.semantics),e.ssrcs&&e.ssrcs.length){n.ssrcs=[];for(var r=0;r>>3){case 1:r.foundation=e.uint32();break;case 2:r.component=e.uint32();break;case 3:r.protocol=e.int32();break;case 4:r.priority=e.uint32();break;case 5:r.ip=e.bytes();break;case 6:r.port=e.uint32();break;case 7:r.type=e.int32();break;case 8:r.raddr=e.bytes();break;case 9:r.rport=e.uint32();break;case 10:r.tcptype=e.int32();break;default:e.skipType(7&o)}}return r},e.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.foundation&&e.hasOwnProperty("foundation")&&!d.isInteger(e.foundation))return"foundation: integer expected";if(null!=e.component&&e.hasOwnProperty("component")&&!d.isInteger(e.component))return"component: integer expected";if(null!=e.protocol&&e.hasOwnProperty("protocol"))switch(e.protocol){default:return"protocol: enum value expected";case 0:case 1:}if(null!=e.priority&&e.hasOwnProperty("priority")&&!d.isInteger(e.priority))return"priority: integer expected";if(null!=e.ip&&e.hasOwnProperty("ip")&&!(e.ip&&"number"==typeof e.ip.length||d.isString(e.ip)))return"ip: buffer expected";if(null!=e.port&&e.hasOwnProperty("port")&&!d.isInteger(e.port))return"port: integer expected";if(null!=e.type&&e.hasOwnProperty("type"))switch(e.type){default:return"type: enum value expected";case 0:case 1:case 2:case 3:}if(null!=e.raddr&&e.hasOwnProperty("raddr")&&!(e.raddr&&"number"==typeof e.raddr.length||d.isString(e.raddr)))return"raddr: buffer expected";if(null!=e.rport&&e.hasOwnProperty("rport")&&!d.isInteger(e.rport))return"rport: integer expected";if(null!=e.tcptype&&e.hasOwnProperty("tcptype"))switch(e.tcptype){default:return"tcptype: enum value expected";case 0:case 1:case 2:}return null},e.fromObject=function(e){if(e instanceof p.bin_proto.IceCandidate)return e;var t=new p.bin_proto.IceCandidate;switch(null!=e.foundation&&(t.foundation=e.foundation>>>0),null!=e.component&&(t.component=e.component>>>0),e.protocol){case"UDP":case 0:t.protocol=0;break;case"TCP":case 1:t.protocol=1}switch(null!=e.priority&&(t.priority=e.priority>>>0),null!=e.ip&&("string"==typeof e.ip?d.base64.decode(e.ip,t.ip=d.newBuffer(d.base64.length(e.ip)),0):e.ip.length&&(t.ip=e.ip)),null!=e.port&&(t.port=e.port>>>0),e.type){case"HOST":case 0:t.type=0;break;case"SRFLX":case 1:t.type=1;break;case"PRFLX":case 2:t.type=2;break;case"RELAY":case 3:t.type=3}switch(null!=e.raddr&&("string"==typeof e.raddr?d.base64.decode(e.raddr,t.raddr=d.newBuffer(d.base64.length(e.raddr)),0):e.raddr.length&&(t.raddr=e.raddr)),null!=e.rport&&(t.rport=e.rport>>>0),e.tcptype){case"ACTIVE":case 0:t.tcptype=0;break;case"PASSIVE":case 1:t.tcptype=1;break;case"SO":case 2:t.tcptype=2}return t},e.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.foundation=0,n.component=0,n.protocol=t.enums===String?"UDP":0,n.priority=0,t.bytes===String?n.ip="":(n.ip=[],t.bytes!==Array&&(n.ip=d.newBuffer(n.ip))),n.port=0,n.type=t.enums===String?"HOST":0,t.bytes===String?n.raddr="":(n.raddr=[],t.bytes!==Array&&(n.raddr=d.newBuffer(n.raddr))),n.rport=0,n.tcptype=t.enums===String?"ACTIVE":0),null!=e.foundation&&e.hasOwnProperty("foundation")&&(n.foundation=e.foundation),null!=e.component&&e.hasOwnProperty("component")&&(n.component=e.component),null!=e.protocol&&e.hasOwnProperty("protocol")&&(n.protocol=t.enums===String?p.bin_proto.IceCandidate.Protocol[e.protocol]:e.protocol),null!=e.priority&&e.hasOwnProperty("priority")&&(n.priority=e.priority),null!=e.ip&&e.hasOwnProperty("ip")&&(n.ip=t.bytes===String?d.base64.encode(e.ip,0,e.ip.length):t.bytes===Array?Array.prototype.slice.call(e.ip):e.ip),null!=e.port&&e.hasOwnProperty("port")&&(n.port=e.port),null!=e.type&&e.hasOwnProperty("type")&&(n.type=t.enums===String?p.bin_proto.IceCandidate.CandidateType[e.type]:e.type),null!=e.raddr&&e.hasOwnProperty("raddr")&&(n.raddr=t.bytes===String?d.base64.encode(e.raddr,0,e.raddr.length):t.bytes===Array?Array.prototype.slice.call(e.raddr):e.raddr),null!=e.rport&&e.hasOwnProperty("rport")&&(n.rport=e.rport),null!=e.tcptype&&e.hasOwnProperty("tcptype")&&(n.tcptype=t.enums===String?p.bin_proto.IceCandidate.TcpType[e.tcptype]:e.tcptype),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,l.util.toJSONOptions)},e.Protocol=function(){var e={},t=Object.create(e);return t[e[0]="UDP"]=0,t[e[1]="TCP"]=1,t}(),e.CandidateType=function(){var e={},t=Object.create(e);return t[e[0]="HOST"]=0,t[e[1]="SRFLX"]=1,t[e[2]="PRFLX"]=2,t[e[3]="RELAY"]=3,t}(),e.TcpType=function(){var e={},t=Object.create(e);return t[e[0]="ACTIVE"]=0,t[e[1]="PASSIVE"]=1,t[e[2]="SO"]=2,t}(),e}(),i.Media=function(){function e(e){if(this.extmaps=[],this.codecs=[],this.ssrcGroups=[],this.ssrcs=[],this.candidates=[],this.iceOptions=[],e)for(var t=Object.keys(e),n=0;n>>3){case 1:r.type=e.int32();break;case 2:r.mid=e.string();break;case 3:r.direction=e.int32();break;case 4:r.msidStream=e.string();break;case 20:r.msidTrackLabel=e.string();break;case 21:r.msidTrackId=e.uint64();break;case 5:r.rtcpMux=e.bool();break;case 6:r.rtcpRsize=e.bool();break;case 7:r.extmaps&&r.extmaps.length||(r.extmaps=[]),r.extmaps.push(p.bin_proto.MappingEntry.decode(e,e.uint32()));break;case 8:r.codecs&&r.codecs.length||(r.codecs=[]),r.codecs.push(p.bin_proto.Codec.decode(e,e.uint32()));break;case 9:r.ssrcGroups&&r.ssrcGroups.length||(r.ssrcGroups=[]),r.ssrcGroups.push(p.bin_proto.SsrcGroup.decode(e,e.uint32()));break;case 10:r.ssrcs&&r.ssrcs.length||(r.ssrcs=[]),r.ssrcs.push(p.bin_proto.Ssrc.decode(e,e.uint32()));break;case 11:r.connectionAddress=e.string();break;case 12:r.candidates&&r.candidates.length||(r.candidates=[]),r.candidates.push(p.bin_proto.IceCandidate.decode(e,e.uint32()));break;case 13:r.endOfCandidates=e.bool();break;case 14:r.rtcpAddress=e.string();break;case 15:r.iceUfragRef=e.uint32();break;case 16:r.icePwdRef=e.uint32();break;case 17:r.iceOptions&&r.iceOptions.length||(r.iceOptions=[]),r.iceOptions.push(e.string());break;case 18:r.fingerprint=p.bin_proto.Fingerprint.decode(e,e.uint32());break;case 19:r.setup=e.int32();break;case 22:r.port=e.uint32();break;default:e.skipType(7&o)}}return r},e.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.type&&e.hasOwnProperty("type"))switch(e.type){default:return"type: enum value expected";case 0:case 1:}if(null!=e.mid&&e.hasOwnProperty("mid")&&!d.isString(e.mid))return"mid: string expected";if(null!=e.direction&&e.hasOwnProperty("direction"))switch(e.direction){default:return"direction: enum value expected";case 0:case 1:case 2:case 3:}if(null!=e.msidStream&&e.hasOwnProperty("msidStream")&&!d.isString(e.msidStream))return"msidStream: string expected";if(null!=e.msidTrackLabel&&e.hasOwnProperty("msidTrackLabel")&&!d.isString(e.msidTrackLabel))return"msidTrackLabel: string expected";if(null!=e.msidTrackId&&e.hasOwnProperty("msidTrackId")&&!(d.isInteger(e.msidTrackId)||e.msidTrackId&&d.isInteger(e.msidTrackId.low)&&d.isInteger(e.msidTrackId.high)))return"msidTrackId: integer|Long expected";if(null!=e.rtcpMux&&e.hasOwnProperty("rtcpMux")&&"boolean"!=typeof e.rtcpMux)return"rtcpMux: boolean expected";if(null!=e.rtcpRsize&&e.hasOwnProperty("rtcpRsize")&&"boolean"!=typeof e.rtcpRsize)return"rtcpRsize: boolean expected";if(null!=e.extmaps&&e.hasOwnProperty("extmaps")){if(!Array.isArray(e.extmaps))return"extmaps: array expected";for(var t=0;t>>0,e.msidTrackId.high>>>0).toNumber(!0))),null!=e.rtcpMux&&(t.rtcpMux=Boolean(e.rtcpMux)),null!=e.rtcpRsize&&(t.rtcpRsize=Boolean(e.rtcpRsize)),e.extmaps){if(!Array.isArray(e.extmaps))throw TypeError(".bin_proto.Media.extmaps: array expected");t.extmaps=[];for(var n=0;n>>0),null!=e.icePwdRef&&(t.icePwdRef=e.icePwdRef>>>0),e.iceOptions){if(!Array.isArray(e.iceOptions))throw TypeError(".bin_proto.Media.iceOptions: array expected");for(t.iceOptions=[],n=0;n>>0),t},e.toObject=function(e,t){t||(t={});var n={};if((t.arrays||t.defaults)&&(n.extmaps=[],n.codecs=[],n.ssrcGroups=[],n.ssrcs=[],n.candidates=[],n.iceOptions=[]),t.defaults){if(n.type=t.enums===String?"AUDIO":0,n.mid="",n.direction=t.enums===String?"SENDRECV":0,n.msidStream="",n.rtcpMux=!1,n.rtcpRsize=!1,n.connectionAddress="",n.endOfCandidates=!1,n.rtcpAddress="",n.iceUfragRef=0,n.icePwdRef=0,n.fingerprint=null,n.setup=t.enums===String?"ACTIVE":0,n.msidTrackLabel="",d.Long){var r=new d.Long(0,0,!0);n.msidTrackId=t.longs===String?r.toString():t.longs===Number?r.toNumber():r}else n.msidTrackId=t.longs===String?"0":0;n.port=0}if(null!=e.type&&e.hasOwnProperty("type")&&(n.type=t.enums===String?p.bin_proto.MediaType[e.type]:e.type),null!=e.mid&&e.hasOwnProperty("mid")&&(n.mid=e.mid),null!=e.direction&&e.hasOwnProperty("direction")&&(n.direction=t.enums===String?p.bin_proto.Direction[e.direction]:e.direction),null!=e.msidStream&&e.hasOwnProperty("msidStream")&&(n.msidStream=e.msidStream),null!=e.rtcpMux&&e.hasOwnProperty("rtcpMux")&&(n.rtcpMux=e.rtcpMux),null!=e.rtcpRsize&&e.hasOwnProperty("rtcpRsize")&&(n.rtcpRsize=e.rtcpRsize),e.extmaps&&e.extmaps.length){n.extmaps=[];for(var o=0;o>>0,e.msidTrackId.high>>>0).toNumber(!0):e.msidTrackId),null!=e.port&&e.hasOwnProperty("port")&&(n.port=e.port),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,l.util.toJSONOptions)},e}(),i.SDPData=function(){function e(e){if(this.bundleGroup=[],this.iceOptions=[],this.media=[],this.stringPool=[],e)for(var t=Object.keys(e),n=0;n>>3){case 1:r.sessionId=e.string();break;case 2:r.sessionVersion=e.uint32();break;case 3:if(r.bundleGroup&&r.bundleGroup.length||(r.bundleGroup=[]),2==(7&o))for(var i=e.uint32()+e.pos;e.pos>>0),e.bundleGroup){if(!Array.isArray(e.bundleGroup))throw TypeError(".bin_proto.SDPData.bundleGroup: array expected");t.bundleGroup=[];for(var n=0;n>>0}if(null!=e.iceUfrag&&(t.iceUfrag=String(e.iceUfrag)),null!=e.icePwd&&(t.icePwd=String(e.icePwd)),e.iceOptions){if(!Array.isArray(e.iceOptions))throw TypeError(".bin_proto.SDPData.iceOptions: array expected");for(t.iceOptions=[],n=0;n>>3){case 1:o.id=e.string();break;case 2:o.sessionId=e.string();break;case 3:o.mediaFlow=e.int32();break;case 4:o.createdBy=e.string();break;case 5:e.skip().pos++,o.metadata===d.emptyObject&&(o.metadata={}),n=e.string(),e.pos++,o.metadata[n]=e.string();break;case 6:o.participants&&o.participants.length||(o.participants=[]),o.participants.push(p.bin_proto.Participant.decode(e,e.uint32()));break;case 7:o.createdAt=e.int64();break;case 8:o.options=p.bin_proto.CallOptions.decode(e,e.uint32());break;default:e.skipType(7&i)}}return o},e.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.id&&e.hasOwnProperty("id")&&!d.isString(e.id))return"id: string expected";if(null!=e.sessionId&&e.hasOwnProperty("sessionId")&&!d.isString(e.sessionId))return"sessionId: string expected";if(null!=e.mediaFlow&&e.hasOwnProperty("mediaFlow"))switch(e.mediaFlow){default:return"mediaFlow: enum value expected";case 0:case 1:case 2:}if(null!=e.createdBy&&e.hasOwnProperty("createdBy")&&!d.isString(e.createdBy))return"createdBy: string expected";if(null!=e.metadata&&e.hasOwnProperty("metadata")){if(!d.isObject(e.metadata))return"metadata: object expected";for(var t=Object.keys(e.metadata),n=0;n>>0,e.createdAt.high>>>0).toNumber())),null!=e.options){if("object"!=typeof e.options)throw TypeError(".bin_proto.Call.options: object expected");t.options=p.bin_proto.CallOptions.fromObject(e.options)}return t},e.toObject=function(e,t){t||(t={});var n,r={};if((t.arrays||t.defaults)&&(r.participants=[]),(t.objects||t.defaults)&&(r.metadata={}),t.defaults){if(r.id="",r.sessionId="",r.mediaFlow=t.enums===String?"MediaFlowP2P":0,r.createdBy="",d.Long){var o=new d.Long(0,0,!1);r.createdAt=t.longs===String?o.toString():t.longs===Number?o.toNumber():o}else r.createdAt=t.longs===String?"0":0;r.options=null}if(null!=e.id&&e.hasOwnProperty("id")&&(r.id=e.id),null!=e.sessionId&&e.hasOwnProperty("sessionId")&&(r.sessionId=e.sessionId),null!=e.mediaFlow&&e.hasOwnProperty("mediaFlow")&&(r.mediaFlow=t.enums===String?p.bin_proto.MediaFlow[e.mediaFlow]:e.mediaFlow),null!=e.createdBy&&e.hasOwnProperty("createdBy")&&(r.createdBy=e.createdBy),e.metadata&&(n=Object.keys(e.metadata)).length){r.metadata={};for(var i=0;i>>0,e.createdAt.high>>>0).toNumber():e.createdAt),null!=e.options&&e.hasOwnProperty("options")&&(r.options=p.bin_proto.CallOptions.toObject(e.options,t)),r},e.prototype.toJSON=function(){return this.constructor.toObject(this,l.util.toJSONOptions)},e}(),i.MediaState=function(){function e(e){if(e)for(var t=Object.keys(e),n=0;n>>3){case 1:r.enabled=e.bool();break;case 2:r.changedBy=e.string();break;default:e.skipType(7&o)}}return r},e.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},e.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.enabled&&e.hasOwnProperty("enabled")&&"boolean"!=typeof e.enabled?"enabled: boolean expected":null!=e.changedBy&&e.hasOwnProperty("changedBy")&&!d.isString(e.changedBy)?"changedBy: string expected":null},e.fromObject=function(e){if(e instanceof p.bin_proto.MediaState)return e;var t=new p.bin_proto.MediaState;return null!=e.enabled&&(t.enabled=Boolean(e.enabled)),null!=e.changedBy&&(t.changedBy=String(e.changedBy)),t},e.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.enabled=!1,n.changedBy=""),null!=e.enabled&&e.hasOwnProperty("enabled")&&(n.enabled=e.enabled),null!=e.changedBy&&e.hasOwnProperty("changedBy")&&(n.changedBy=e.changedBy),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,l.util.toJSONOptions)},e}(),i.ParticipantMediaState=function(){function e(e){if(e)for(var t=Object.keys(e),n=0;n>>3){case 1:r.audio=p.bin_proto.MediaState.decode(e,e.uint32());break;case 2:r.video=p.bin_proto.MediaState.decode(e,e.uint32());break;case 3:r.screenShare=p.bin_proto.MediaState.decode(e,e.uint32());break;default:e.skipType(7&o)}}return r},e.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},e.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.audio&&e.hasOwnProperty("audio")&&(t=p.bin_proto.MediaState.verify(e.audio))?"audio."+t:null!=e.video&&e.hasOwnProperty("video")&&(t=p.bin_proto.MediaState.verify(e.video))?"video."+t:null!=e.screenShare&&e.hasOwnProperty("screenShare")&&(t=p.bin_proto.MediaState.verify(e.screenShare))?"screenShare."+t:null;var t},e.fromObject=function(e){if(e instanceof p.bin_proto.ParticipantMediaState)return e;var t=new p.bin_proto.ParticipantMediaState;if(null!=e.audio){if("object"!=typeof e.audio)throw TypeError(".bin_proto.ParticipantMediaState.audio: object expected");t.audio=p.bin_proto.MediaState.fromObject(e.audio)}if(null!=e.video){if("object"!=typeof e.video)throw TypeError(".bin_proto.ParticipantMediaState.video: object expected");t.video=p.bin_proto.MediaState.fromObject(e.video)}if(null!=e.screenShare){if("object"!=typeof e.screenShare)throw TypeError(".bin_proto.ParticipantMediaState.screenShare: object expected");t.screenShare=p.bin_proto.MediaState.fromObject(e.screenShare)}return t},e.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.audio=null,n.video=null,n.screenShare=null),null!=e.audio&&e.hasOwnProperty("audio")&&(n.audio=p.bin_proto.MediaState.toObject(e.audio,t)),null!=e.video&&e.hasOwnProperty("video")&&(n.video=p.bin_proto.MediaState.toObject(e.video,t)),null!=e.screenShare&&e.hasOwnProperty("screenShare")&&(n.screenShare=p.bin_proto.MediaState.toObject(e.screenShare,t)),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,l.util.toJSONOptions)},e}(),i.ParticipantPermissions=function(){function e(e){if(e)for(var t=Object.keys(e),n=0;n>>3){case 1:r.canPublishAudio=e.bool();break;case 2:r.canPublishVideo=e.bool();break;default:e.skipType(7&o)}}return r},e.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},e.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.canPublishAudio&&e.hasOwnProperty("canPublishAudio")&&"boolean"!=typeof e.canPublishAudio?"canPublishAudio: boolean expected":null!=e.canPublishVideo&&e.hasOwnProperty("canPublishVideo")&&"boolean"!=typeof e.canPublishVideo?"canPublishVideo: boolean expected":null},e.fromObject=function(e){if(e instanceof p.bin_proto.ParticipantPermissions)return e;var t=new p.bin_proto.ParticipantPermissions;return null!=e.canPublishAudio&&(t.canPublishAudio=Boolean(e.canPublishAudio)),null!=e.canPublishVideo&&(t.canPublishVideo=Boolean(e.canPublishVideo)),t},e.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.canPublishAudio=!1,n.canPublishVideo=!1),null!=e.canPublishAudio&&e.hasOwnProperty("canPublishAudio")&&(n.canPublishAudio=e.canPublishAudio),null!=e.canPublishVideo&&e.hasOwnProperty("canPublishVideo")&&(n.canPublishVideo=e.canPublishVideo),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,l.util.toJSONOptions)},e}(),i.Participant=function(){function e(e){if(e)for(var t=Object.keys(e),n=0;n>>3){case 1:r.id=e.string();break;case 2:r.clientId=e.string();break;case 3:r.presenter=e.bool();break;case 4:r.videoEnabled=e.bool();break;case 5:r.muted=e.bool();break;case 6:r.onHold=e.bool();break;case 7:r.screenSharing=e.bool();break;case 8:r.state=e.int32();break;case 9:r.connectionState=e.int32();break;case 10:r.isCallSilenced=e.bool();break;case 14:r.mediaState=p.bin_proto.ParticipantMediaState.decode(e,e.uint32());break;case 15:r.permissions=p.bin_proto.ParticipantPermissions.decode(e,e.uint32());break;case 16:r.joinedAt=e.int64();break;case 17:r.mediaConnectedAt=e.int64();break;default:e.skipType(7&o)}}return r},e.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.id&&e.hasOwnProperty("id")&&!d.isString(e.id))return"id: string expected";if(null!=e.clientId&&e.hasOwnProperty("clientId")&&!d.isString(e.clientId))return"clientId: string expected";if(null!=e.presenter&&e.hasOwnProperty("presenter")&&"boolean"!=typeof e.presenter)return"presenter: boolean expected";if(null!=e.videoEnabled&&e.hasOwnProperty("videoEnabled")&&"boolean"!=typeof e.videoEnabled)return"videoEnabled: boolean expected";if(null!=e.muted&&e.hasOwnProperty("muted")&&"boolean"!=typeof e.muted)return"muted: boolean expected";if(null!=e.onHold&&e.hasOwnProperty("onHold")&&"boolean"!=typeof e.onHold)return"onHold: boolean expected";if(null!=e.screenSharing&&e.hasOwnProperty("screenSharing")&&"boolean"!=typeof e.screenSharing)return"screenSharing: boolean expected";if(null!=e.state&&e.hasOwnProperty("state"))switch(e.state){default:return"state: enum value expected";case 0:case 1:case 2:case 3:case 4:case 5:case 6:}if(null!=e.connectionState&&e.hasOwnProperty("connectionState"))switch(e.connectionState){default:return"connectionState: enum value expected";case 0:case 1:case 2:case 3:case 4:}return null!=e.isCallSilenced&&e.hasOwnProperty("isCallSilenced")&&"boolean"!=typeof e.isCallSilenced?"isCallSilenced: boolean expected":null!=e.mediaState&&e.hasOwnProperty("mediaState")&&(t=p.bin_proto.ParticipantMediaState.verify(e.mediaState))?"mediaState."+t:null!=e.permissions&&e.hasOwnProperty("permissions")&&(t=p.bin_proto.ParticipantPermissions.verify(e.permissions))?"permissions."+t:null!=e.joinedAt&&e.hasOwnProperty("joinedAt")&&!(d.isInteger(e.joinedAt)||e.joinedAt&&d.isInteger(e.joinedAt.low)&&d.isInteger(e.joinedAt.high))?"joinedAt: integer|Long expected":null!=e.mediaConnectedAt&&e.hasOwnProperty("mediaConnectedAt")&&!(d.isInteger(e.mediaConnectedAt)||e.mediaConnectedAt&&d.isInteger(e.mediaConnectedAt.low)&&d.isInteger(e.mediaConnectedAt.high))?"mediaConnectedAt: integer|Long expected":null;var t},e.fromObject=function(e){if(e instanceof p.bin_proto.Participant)return e;var t=new p.bin_proto.Participant;switch(null!=e.id&&(t.id=String(e.id)),null!=e.clientId&&(t.clientId=String(e.clientId)),null!=e.presenter&&(t.presenter=Boolean(e.presenter)),null!=e.videoEnabled&&(t.videoEnabled=Boolean(e.videoEnabled)),null!=e.muted&&(t.muted=Boolean(e.muted)),null!=e.onHold&&(t.onHold=Boolean(e.onHold)),null!=e.screenSharing&&(t.screenSharing=Boolean(e.screenSharing)),e.state){case"ParticipantStateIdle":case 0:t.state=0;break;case"ParticipantStateRinging":case 1:t.state=1;break;case"ParticipantStateJoined":case 2:t.state=2;break;case"ParticipantStateLeft":case 3:t.state=3;break;case"ParticipantStateDeclined":case 4:t.state=4;break;case"ParticipantStateKicked":case 5:t.state=5;break;case"ParticipantStateNoAnswer":case 6:t.state=6}switch(e.connectionState){case"MediaConnectionStateIdle":case 0:t.connectionState=0;break;case"MediaConnectionStateConnecting":case 1:t.connectionState=1;break;case"MediaConnectionStateConnected":case 2:t.connectionState=2;break;case"MediaConnectionStateReconnecting":case 3:t.connectionState=3;break;case"MediaConnectionStateDisconnected":case 4:t.connectionState=4}if(null!=e.isCallSilenced&&(t.isCallSilenced=Boolean(e.isCallSilenced)),null!=e.mediaState){if("object"!=typeof e.mediaState)throw TypeError(".bin_proto.Participant.mediaState: object expected");t.mediaState=p.bin_proto.ParticipantMediaState.fromObject(e.mediaState)}if(null!=e.permissions){if("object"!=typeof e.permissions)throw TypeError(".bin_proto.Participant.permissions: object expected");t.permissions=p.bin_proto.ParticipantPermissions.fromObject(e.permissions)}return null!=e.joinedAt&&(d.Long?(t.joinedAt=d.Long.fromValue(e.joinedAt)).unsigned=!1:"string"==typeof e.joinedAt?t.joinedAt=parseInt(e.joinedAt,10):"number"==typeof e.joinedAt?t.joinedAt=e.joinedAt:"object"==typeof e.joinedAt&&(t.joinedAt=new d.LongBits(e.joinedAt.low>>>0,e.joinedAt.high>>>0).toNumber())),null!=e.mediaConnectedAt&&(d.Long?(t.mediaConnectedAt=d.Long.fromValue(e.mediaConnectedAt)).unsigned=!1:"string"==typeof e.mediaConnectedAt?t.mediaConnectedAt=parseInt(e.mediaConnectedAt,10):"number"==typeof e.mediaConnectedAt?t.mediaConnectedAt=e.mediaConnectedAt:"object"==typeof e.mediaConnectedAt&&(t.mediaConnectedAt=new d.LongBits(e.mediaConnectedAt.low>>>0,e.mediaConnectedAt.high>>>0).toNumber())),t},e.toObject=function(e,t){t||(t={});var n={};if(t.defaults){if(n.id="",n.clientId="",n.presenter=!1,n.videoEnabled=!1,n.muted=!1,n.onHold=!1,n.screenSharing=!1,n.state=t.enums===String?"ParticipantStateIdle":0,n.connectionState=t.enums===String?"MediaConnectionStateIdle":0,n.isCallSilenced=!1,n.mediaState=null,n.permissions=null,d.Long){var r=new d.Long(0,0,!1);n.joinedAt=t.longs===String?r.toString():t.longs===Number?r.toNumber():r}else n.joinedAt=t.longs===String?"0":0;d.Long?(r=new d.Long(0,0,!1),n.mediaConnectedAt=t.longs===String?r.toString():t.longs===Number?r.toNumber():r):n.mediaConnectedAt=t.longs===String?"0":0}return null!=e.id&&e.hasOwnProperty("id")&&(n.id=e.id),null!=e.clientId&&e.hasOwnProperty("clientId")&&(n.clientId=e.clientId),null!=e.presenter&&e.hasOwnProperty("presenter")&&(n.presenter=e.presenter),null!=e.videoEnabled&&e.hasOwnProperty("videoEnabled")&&(n.videoEnabled=e.videoEnabled),null!=e.muted&&e.hasOwnProperty("muted")&&(n.muted=e.muted),null!=e.onHold&&e.hasOwnProperty("onHold")&&(n.onHold=e.onHold),null!=e.screenSharing&&e.hasOwnProperty("screenSharing")&&(n.screenSharing=e.screenSharing),null!=e.state&&e.hasOwnProperty("state")&&(n.state=t.enums===String?p.bin_proto.ParticipantState[e.state]:e.state),null!=e.connectionState&&e.hasOwnProperty("connectionState")&&(n.connectionState=t.enums===String?p.bin_proto.MediaConnectionState[e.connectionState]:e.connectionState),null!=e.isCallSilenced&&e.hasOwnProperty("isCallSilenced")&&(n.isCallSilenced=e.isCallSilenced),null!=e.mediaState&&e.hasOwnProperty("mediaState")&&(n.mediaState=p.bin_proto.ParticipantMediaState.toObject(e.mediaState,t)),null!=e.permissions&&e.hasOwnProperty("permissions")&&(n.permissions=p.bin_proto.ParticipantPermissions.toObject(e.permissions,t)),null!=e.joinedAt&&e.hasOwnProperty("joinedAt")&&("number"==typeof e.joinedAt?n.joinedAt=t.longs===String?String(e.joinedAt):e.joinedAt:n.joinedAt=t.longs===String?d.Long.prototype.toString.call(e.joinedAt):t.longs===Number?new d.LongBits(e.joinedAt.low>>>0,e.joinedAt.high>>>0).toNumber():e.joinedAt),null!=e.mediaConnectedAt&&e.hasOwnProperty("mediaConnectedAt")&&("number"==typeof e.mediaConnectedAt?n.mediaConnectedAt=t.longs===String?String(e.mediaConnectedAt):e.mediaConnectedAt:n.mediaConnectedAt=t.longs===String?d.Long.prototype.toString.call(e.mediaConnectedAt):t.longs===Number?new d.LongBits(e.mediaConnectedAt.low>>>0,e.mediaConnectedAt.high>>>0).toNumber():e.mediaConnectedAt),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,l.util.toJSONOptions)},e}(),i.CallState=function(){var e={},t=Object.create(e);return t[e[0]="CallStateOngoing"]=0,t[e[1]="CallStateClosed"]=1,t}(),i.ParticipantState=function(){var e={},t=Object.create(e);return t[e[0]="ParticipantStateIdle"]=0,t[e[1]="ParticipantStateRinging"]=1,t[e[2]="ParticipantStateJoined"]=2,t[e[3]="ParticipantStateLeft"]=3,t[e[4]="ParticipantStateDeclined"]=4,t[e[5]="ParticipantStateKicked"]=5,t[e[6]="ParticipantStateNoAnswer"]=6,t}(),i.MediaConnectionState=function(){var e={},t=Object.create(e);return t[e[0]="MediaConnectionStateIdle"]=0,t[e[1]="MediaConnectionStateConnecting"]=1,t[e[2]="MediaConnectionStateConnected"]=2,t[e[3]="MediaConnectionStateReconnecting"]=3,t[e[4]="MediaConnectionStateDisconnected"]=4,t}(),i.MediaFlow=function(){var e={},t=Object.create(e);return t[e[0]="MediaFlowP2P"]=0,t[e[1]="MediaFlowSFU"]=1,t[e[2]="MediaFlowS2W"]=2,t}(),i.CallPermissions=function(){function e(e){if(e)for(var t=Object.keys(e),n=0;n>>3){case 1:r.audioPublishingDisabled=e.bool();break;case 2:r.videoPublishingDisabled=e.bool();break;default:e.skipType(7&o)}}return r},e.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},e.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.audioPublishingDisabled&&e.hasOwnProperty("audioPublishingDisabled")&&"boolean"!=typeof e.audioPublishingDisabled?"audioPublishingDisabled: boolean expected":null!=e.videoPublishingDisabled&&e.hasOwnProperty("videoPublishingDisabled")&&"boolean"!=typeof e.videoPublishingDisabled?"videoPublishingDisabled: boolean expected":null},e.fromObject=function(e){if(e instanceof p.bin_proto.CallPermissions)return e;var t=new p.bin_proto.CallPermissions;return null!=e.audioPublishingDisabled&&(t.audioPublishingDisabled=Boolean(e.audioPublishingDisabled)),null!=e.videoPublishingDisabled&&(t.videoPublishingDisabled=Boolean(e.videoPublishingDisabled)),t},e.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.audioPublishingDisabled=!1,n.videoPublishingDisabled=!1),null!=e.audioPublishingDisabled&&e.hasOwnProperty("audioPublishingDisabled")&&(n.audioPublishingDisabled=e.audioPublishingDisabled),null!=e.videoPublishingDisabled&&e.hasOwnProperty("videoPublishingDisabled")&&(n.videoPublishingDisabled=e.videoPublishingDisabled),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,l.util.toJSONOptions)},e}(),i.CallSettings=function(){function e(e){if(e)for(var t=Object.keys(e),n=0;n>>3){case 1:r.broadcastOptions=p.bin_proto.BroadcastOptions.decode(e,e.uint32());break;case 2:r.startsAt=e.int64();break;case 3:r.expiresAt=e.int64();break;case 4:r.persistent=e.bool();break;case 5:r.notifyOnParticipantJoin=e.bool();break;case 6:r.maxParticipantsCount=e.int32();break;case 7:r.permissions=p.bin_proto.CallPermissions.decode(e,e.uint32());break;default:e.skipType(7&o)}}return r},e.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},e.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.broadcastOptions&&e.hasOwnProperty("broadcastOptions")&&(t=p.bin_proto.BroadcastOptions.verify(e.broadcastOptions))?"broadcastOptions."+t:null!=e.startsAt&&e.hasOwnProperty("startsAt")&&!(d.isInteger(e.startsAt)||e.startsAt&&d.isInteger(e.startsAt.low)&&d.isInteger(e.startsAt.high))?"startsAt: integer|Long expected":null!=e.expiresAt&&e.hasOwnProperty("expiresAt")&&!(d.isInteger(e.expiresAt)||e.expiresAt&&d.isInteger(e.expiresAt.low)&&d.isInteger(e.expiresAt.high))?"expiresAt: integer|Long expected":null!=e.persistent&&e.hasOwnProperty("persistent")&&"boolean"!=typeof e.persistent?"persistent: boolean expected":null!=e.notifyOnParticipantJoin&&e.hasOwnProperty("notifyOnParticipantJoin")&&"boolean"!=typeof e.notifyOnParticipantJoin?"notifyOnParticipantJoin: boolean expected":null!=e.maxParticipantsCount&&e.hasOwnProperty("maxParticipantsCount")&&!d.isInteger(e.maxParticipantsCount)?"maxParticipantsCount: integer expected":null!=e.permissions&&e.hasOwnProperty("permissions")&&(t=p.bin_proto.CallPermissions.verify(e.permissions))?"permissions."+t:null;var t},e.fromObject=function(e){if(e instanceof p.bin_proto.CallSettings)return e;var t=new p.bin_proto.CallSettings;if(null!=e.broadcastOptions){if("object"!=typeof e.broadcastOptions)throw TypeError(".bin_proto.CallSettings.broadcastOptions: object expected");t.broadcastOptions=p.bin_proto.BroadcastOptions.fromObject(e.broadcastOptions)}if(null!=e.startsAt&&(d.Long?(t.startsAt=d.Long.fromValue(e.startsAt)).unsigned=!1:"string"==typeof e.startsAt?t.startsAt=parseInt(e.startsAt,10):"number"==typeof e.startsAt?t.startsAt=e.startsAt:"object"==typeof e.startsAt&&(t.startsAt=new d.LongBits(e.startsAt.low>>>0,e.startsAt.high>>>0).toNumber())),null!=e.expiresAt&&(d.Long?(t.expiresAt=d.Long.fromValue(e.expiresAt)).unsigned=!1:"string"==typeof e.expiresAt?t.expiresAt=parseInt(e.expiresAt,10):"number"==typeof e.expiresAt?t.expiresAt=e.expiresAt:"object"==typeof e.expiresAt&&(t.expiresAt=new d.LongBits(e.expiresAt.low>>>0,e.expiresAt.high>>>0).toNumber())),null!=e.persistent&&(t.persistent=Boolean(e.persistent)),null!=e.notifyOnParticipantJoin&&(t.notifyOnParticipantJoin=Boolean(e.notifyOnParticipantJoin)),null!=e.maxParticipantsCount&&(t.maxParticipantsCount=0|e.maxParticipantsCount),null!=e.permissions){if("object"!=typeof e.permissions)throw TypeError(".bin_proto.CallSettings.permissions: object expected");t.permissions=p.bin_proto.CallPermissions.fromObject(e.permissions)}return t},e.toObject=function(e,t){t||(t={});var n={};if(t.defaults){if(n.broadcastOptions=null,d.Long){var r=new d.Long(0,0,!1);n.startsAt=t.longs===String?r.toString():t.longs===Number?r.toNumber():r}else n.startsAt=t.longs===String?"0":0;d.Long?(r=new d.Long(0,0,!1),n.expiresAt=t.longs===String?r.toString():t.longs===Number?r.toNumber():r):n.expiresAt=t.longs===String?"0":0,n.persistent=!1,n.notifyOnParticipantJoin=!1,n.maxParticipantsCount=0,n.permissions=null}return null!=e.broadcastOptions&&e.hasOwnProperty("broadcastOptions")&&(n.broadcastOptions=p.bin_proto.BroadcastOptions.toObject(e.broadcastOptions,t)),null!=e.startsAt&&e.hasOwnProperty("startsAt")&&("number"==typeof e.startsAt?n.startsAt=t.longs===String?String(e.startsAt):e.startsAt:n.startsAt=t.longs===String?d.Long.prototype.toString.call(e.startsAt):t.longs===Number?new d.LongBits(e.startsAt.low>>>0,e.startsAt.high>>>0).toNumber():e.startsAt),null!=e.expiresAt&&e.hasOwnProperty("expiresAt")&&("number"==typeof e.expiresAt?n.expiresAt=t.longs===String?String(e.expiresAt):e.expiresAt:n.expiresAt=t.longs===String?d.Long.prototype.toString.call(e.expiresAt):t.longs===Number?new d.LongBits(e.expiresAt.low>>>0,e.expiresAt.high>>>0).toNumber():e.expiresAt),null!=e.persistent&&e.hasOwnProperty("persistent")&&(n.persistent=e.persistent),null!=e.notifyOnParticipantJoin&&e.hasOwnProperty("notifyOnParticipantJoin")&&(n.notifyOnParticipantJoin=e.notifyOnParticipantJoin),null!=e.maxParticipantsCount&&e.hasOwnProperty("maxParticipantsCount")&&(n.maxParticipantsCount=e.maxParticipantsCount),null!=e.permissions&&e.hasOwnProperty("permissions")&&(n.permissions=p.bin_proto.CallPermissions.toObject(e.permissions,t)),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,l.util.toJSONOptions)},e}(),i.CallOptions=function(){function e(e){if(e)for(var t=Object.keys(e),n=0;n>>3){case 1:r.settings=p.bin_proto.CallSettings.decode(e,e.uint32());break;case 2:r.callType=e.string();break;default:e.skipType(7&o)}}return r},e.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.settings&&e.hasOwnProperty("settings")){var t=p.bin_proto.CallSettings.verify(e.settings);if(t)return"settings."+t}return null!=e.callType&&e.hasOwnProperty("callType")&&!d.isString(e.callType)?"callType: string expected":null},e.fromObject=function(e){if(e instanceof p.bin_proto.CallOptions)return e;var t=new p.bin_proto.CallOptions;if(null!=e.settings){if("object"!=typeof e.settings)throw TypeError(".bin_proto.CallOptions.settings: object expected");t.settings=p.bin_proto.CallSettings.fromObject(e.settings)}return null!=e.callType&&(t.callType=String(e.callType)),t},e.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.settings=null,n.callType=""),null!=e.settings&&e.hasOwnProperty("settings")&&(n.settings=p.bin_proto.CallSettings.toObject(e.settings,t)),null!=e.callType&&e.hasOwnProperty("callType")&&(n.callType=e.callType),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,l.util.toJSONOptions)},e}(),i.JoinOptions=function(){function e(e){if(e)for(var t=Object.keys(e),n=0;n>>3){case 1:r.videoEnabled=e.bool();break;case 2:r.muted=e.bool();break;case 3:r.screenSharing=e.bool();break;default:e.skipType(7&o)}}return r},e.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},e.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.videoEnabled&&e.hasOwnProperty("videoEnabled")&&"boolean"!=typeof e.videoEnabled?"videoEnabled: boolean expected":null!=e.muted&&e.hasOwnProperty("muted")&&"boolean"!=typeof e.muted?"muted: boolean expected":null!=e.screenSharing&&e.hasOwnProperty("screenSharing")&&"boolean"!=typeof e.screenSharing?"screenSharing: boolean expected":null},e.fromObject=function(e){if(e instanceof p.bin_proto.JoinOptions)return e;var t=new p.bin_proto.JoinOptions;return null!=e.videoEnabled&&(t.videoEnabled=Boolean(e.videoEnabled)),null!=e.muted&&(t.muted=Boolean(e.muted)),null!=e.screenSharing&&(t.screenSharing=Boolean(e.screenSharing)),t},e.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.videoEnabled=!1,n.muted=!1,n.screenSharing=!1),null!=e.videoEnabled&&e.hasOwnProperty("videoEnabled")&&(n.videoEnabled=e.videoEnabled),null!=e.muted&&e.hasOwnProperty("muted")&&(n.muted=e.muted),null!=e.screenSharing&&e.hasOwnProperty("screenSharing")&&(n.screenSharing=e.screenSharing),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,l.util.toJSONOptions)},e}(),i.BroadcastOptions=function(){function e(e){if(e)for(var t=Object.keys(e),n=0;n>>3){case 1:r.enabled=e.bool();break;case 2:r.url=e.string();break;default:e.skipType(7&o)}}return r},e.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},e.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.enabled&&e.hasOwnProperty("enabled")&&"boolean"!=typeof e.enabled?"enabled: boolean expected":null!=e.url&&e.hasOwnProperty("url")&&!d.isString(e.url)?"url: string expected":null},e.fromObject=function(e){if(e instanceof p.bin_proto.BroadcastOptions)return e;var t=new p.bin_proto.BroadcastOptions;return null!=e.enabled&&(t.enabled=Boolean(e.enabled)),null!=e.url&&(t.url=String(e.url)),t},e.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.enabled=!1,n.url=""),null!=e.enabled&&e.hasOwnProperty("enabled")&&(n.enabled=e.enabled),null!=e.url&&e.hasOwnProperty("url")&&(n.url=e.url),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,l.util.toJSONOptions)},e}(),i.ApiManager=function(){function e(e,t,n){l.rpc.Service.call(this,e,t,n)}return(e.prototype=Object.create(l.rpc.Service.prototype)).constructor=e,e.create=function(e,t,n){return new this(e,t,n)},Object.defineProperty(e.prototype.checkCallPrivacy=function e(t,n){return this.rpcCall(e,p.bin_proto.PrivacyRequest,p.bin_proto.CallPrivacyResponse,t,n)},"name",{value:"CheckCallPrivacy"}),e}(),i.PrivacyRequest=function(){function e(e){if(e)for(var t=Object.keys(e),n=0;n>>3){case 1:r.from=e.string();break;case 2:r.to=e.string();break;default:e.skipType(7&o)}}return r},e.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},e.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.from&&e.hasOwnProperty("from")&&!d.isString(e.from)?"from: string expected":null!=e.to&&e.hasOwnProperty("to")&&!d.isString(e.to)?"to: string expected":null},e.fromObject=function(e){if(e instanceof p.bin_proto.PrivacyRequest)return e;var t=new p.bin_proto.PrivacyRequest;return null!=e.from&&(t.from=String(e.from)),null!=e.to&&(t.to=String(e.to)),t},e.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.from="",n.to=""),null!=e.from&&e.hasOwnProperty("from")&&(n.from=e.from),null!=e.to&&e.hasOwnProperty("to")&&(n.to=e.to),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,l.util.toJSONOptions)},e}(),i.CallPrivacyResponse=function(){function e(e){if(e)for(var t=Object.keys(e),n=0;n>>3==1?r.isCallAllowed=e.bool():e.skipType(7&o)}return r},e.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},e.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.isCallAllowed&&e.hasOwnProperty("isCallAllowed")&&"boolean"!=typeof e.isCallAllowed?"isCallAllowed: boolean expected":null},e.fromObject=function(e){if(e instanceof p.bin_proto.CallPrivacyResponse)return e;var t=new p.bin_proto.CallPrivacyResponse;return null!=e.isCallAllowed&&(t.isCallAllowed=Boolean(e.isCallAllowed)),t},e.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.isCallAllowed=!1),null!=e.isCallAllowed&&e.hasOwnProperty("isCallAllowed")&&(n.isCallAllowed=e.isCallAllowed),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,l.util.toJSONOptions)},e}(),i.CallManagementRequest=function(){function e(e){if(e)for(var t=Object.keys(e),n=0;n>>3){case 1:r.requestId=e.string();break;case 10:r.createCall=p.bin_proto.CreateCallRequest.decode(e,e.uint32());break;default:e.skipType(7&o)}}return r},e.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.requestId&&e.hasOwnProperty("requestId")&&!d.isString(e.requestId))return"requestId: string expected";if(null!=e.createCall&&e.hasOwnProperty("createCall")){var t=p.bin_proto.CreateCallRequest.verify(e.createCall);if(t)return"createCall."+t}return null},e.fromObject=function(e){if(e instanceof p.bin_proto.CallManagementRequest)return e;var t=new p.bin_proto.CallManagementRequest;if(null!=e.requestId&&(t.requestId=String(e.requestId)),null!=e.createCall){if("object"!=typeof e.createCall)throw TypeError(".bin_proto.CallManagementRequest.createCall: object expected");t.createCall=p.bin_proto.CreateCallRequest.fromObject(e.createCall)}return t},e.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.requestId=""),null!=e.requestId&&e.hasOwnProperty("requestId")&&(n.requestId=e.requestId),null!=e.createCall&&e.hasOwnProperty("createCall")&&(n.createCall=p.bin_proto.CreateCallRequest.toObject(e.createCall,t),t.oneofs&&(n.operation="createCall")),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,l.util.toJSONOptions)},e}(),i.CallManagementResponse=function(){function e(e){if(e)for(var t=Object.keys(e),n=0;n>>3){case 1:r.requestId=e.string();break;case 10:r.createCall=p.bin_proto.CreateCallResponse.decode(e,e.uint32());break;default:e.skipType(7&o)}}return r},e.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.requestId&&e.hasOwnProperty("requestId")&&!d.isString(e.requestId))return"requestId: string expected";if(null!=e.createCall&&e.hasOwnProperty("createCall")){var t=p.bin_proto.CreateCallResponse.verify(e.createCall);if(t)return"createCall."+t}return null},e.fromObject=function(e){if(e instanceof p.bin_proto.CallManagementResponse)return e;var t=new p.bin_proto.CallManagementResponse;if(null!=e.requestId&&(t.requestId=String(e.requestId)),null!=e.createCall){if("object"!=typeof e.createCall)throw TypeError(".bin_proto.CallManagementResponse.createCall: object expected");t.createCall=p.bin_proto.CreateCallResponse.fromObject(e.createCall)}return t},e.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.requestId=""),null!=e.requestId&&e.hasOwnProperty("requestId")&&(n.requestId=e.requestId),null!=e.createCall&&e.hasOwnProperty("createCall")&&(n.createCall=p.bin_proto.CreateCallResponse.toObject(e.createCall,t),t.oneofs&&(n.operation="createCall")),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,l.util.toJSONOptions)},e}(),i.CreateCallRequest=function(){function e(e){if(this.metadata={},e)for(var t=Object.keys(e),n=0;n>>3){case 1:o.callId=e.string();break;case 2:o.mediaFlow=e.int32();break;case 3:o.startsAt=e.int64();break;case 4:o.expiresAt=e.int64();break;case 5:e.skip().pos++,o.metadata===d.emptyObject&&(o.metadata={}),n=e.string(),e.pos++,o.metadata[n]=e.string();break;default:e.skipType(7&i)}}return o},e.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.callId&&e.hasOwnProperty("callId")&&!d.isString(e.callId))return"callId: string expected";if(null!=e.mediaFlow&&e.hasOwnProperty("mediaFlow"))switch(e.mediaFlow){default:return"mediaFlow: enum value expected";case 0:case 1:case 2:}if(null!=e.startsAt&&e.hasOwnProperty("startsAt")&&!(d.isInteger(e.startsAt)||e.startsAt&&d.isInteger(e.startsAt.low)&&d.isInteger(e.startsAt.high)))return"startsAt: integer|Long expected";if(null!=e.expiresAt&&e.hasOwnProperty("expiresAt")&&!(d.isInteger(e.expiresAt)||e.expiresAt&&d.isInteger(e.expiresAt.low)&&d.isInteger(e.expiresAt.high)))return"expiresAt: integer|Long expected";if(null!=e.metadata&&e.hasOwnProperty("metadata")){if(!d.isObject(e.metadata))return"metadata: object expected";for(var t=Object.keys(e.metadata),n=0;n>>0,e.startsAt.high>>>0).toNumber())),null!=e.expiresAt&&(d.Long?(t.expiresAt=d.Long.fromValue(e.expiresAt)).unsigned=!1:"string"==typeof e.expiresAt?t.expiresAt=parseInt(e.expiresAt,10):"number"==typeof e.expiresAt?t.expiresAt=e.expiresAt:"object"==typeof e.expiresAt&&(t.expiresAt=new d.LongBits(e.expiresAt.low>>>0,e.expiresAt.high>>>0).toNumber())),e.metadata){if("object"!=typeof e.metadata)throw TypeError(".bin_proto.CreateCallRequest.metadata: object expected");t.metadata={};for(var n=Object.keys(e.metadata),r=0;r>>0,e.startsAt.high>>>0).toNumber():e.startsAt),null!=e.expiresAt&&e.hasOwnProperty("expiresAt")&&("number"==typeof e.expiresAt?r.expiresAt=t.longs===String?String(e.expiresAt):e.expiresAt:r.expiresAt=t.longs===String?d.Long.prototype.toString.call(e.expiresAt):t.longs===Number?new d.LongBits(e.expiresAt.low>>>0,e.expiresAt.high>>>0).toNumber():e.expiresAt),e.metadata&&(n=Object.keys(e.metadata)).length){r.metadata={};for(var i=0;i>>3){case 1:o.callId=e.string();break;case 2:o.sessionId=e.string();break;case 3:o.mediaFlow=e.int32();break;case 4:o.joinLink=e.string();break;case 5:o.createdBy=e.string();break;case 6:o.createdAt=e.int64();break;case 7:e.skip().pos++,o.metadata===d.emptyObject&&(o.metadata={}),n=e.string(),e.pos++,o.metadata[n]=e.string();break;default:e.skipType(7&i)}}return o},e.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.callId&&e.hasOwnProperty("callId")&&!d.isString(e.callId))return"callId: string expected";if(null!=e.sessionId&&e.hasOwnProperty("sessionId")&&!d.isString(e.sessionId))return"sessionId: string expected";if(null!=e.mediaFlow&&e.hasOwnProperty("mediaFlow"))switch(e.mediaFlow){default:return"mediaFlow: enum value expected";case 0:case 1:case 2:}if(null!=e.joinLink&&e.hasOwnProperty("joinLink")&&!d.isString(e.joinLink))return"joinLink: string expected";if(null!=e.createdBy&&e.hasOwnProperty("createdBy")&&!d.isString(e.createdBy))return"createdBy: string expected";if(null!=e.createdAt&&e.hasOwnProperty("createdAt")&&!(d.isInteger(e.createdAt)||e.createdAt&&d.isInteger(e.createdAt.low)&&d.isInteger(e.createdAt.high)))return"createdAt: integer|Long expected";if(null!=e.metadata&&e.hasOwnProperty("metadata")){if(!d.isObject(e.metadata))return"metadata: object expected";for(var t=Object.keys(e.metadata),n=0;n>>0,e.createdAt.high>>>0).toNumber())),e.metadata){if("object"!=typeof e.metadata)throw TypeError(".bin_proto.CreateCallResponse.metadata: object expected");t.metadata={};for(var n=Object.keys(e.metadata),r=0;r>>0,e.createdAt.high>>>0).toNumber():e.createdAt),e.metadata&&(n=Object.keys(e.metadata)).length){r.metadata={};for(var i=0;i>>3){case 1:o.sessionId=e.int64();break;case 2:o.callId=e.string();break;case 3:o.originatorId=e.string();break;case 4:o.mediaFlow=e.int32();break;case 5:e.skip().pos++,o.metadata===d.emptyObject&&(o.metadata={}),n=e.string(),e.pos++,o.metadata[n]=e.string();break;case 6:o.startedAt=e.int64();break;case 7:o.endedAt=e.int64();break;case 8:o.state=e.int32();break;case 9:o.participants&&o.participants.length||(o.participants=[]),o.participants.push(p.bin_proto.CDRParticipant.decode(e,e.uint32()));break;case 10:o.callType=e.string();break;default:e.skipType(7&i)}}return o},e.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.sessionId&&e.hasOwnProperty("sessionId")&&!(d.isInteger(e.sessionId)||e.sessionId&&d.isInteger(e.sessionId.low)&&d.isInteger(e.sessionId.high)))return"sessionId: integer|Long expected";if(null!=e.callId&&e.hasOwnProperty("callId")&&!d.isString(e.callId))return"callId: string expected";if(null!=e.originatorId&&e.hasOwnProperty("originatorId")&&!d.isString(e.originatorId))return"originatorId: string expected";if(null!=e.mediaFlow&&e.hasOwnProperty("mediaFlow"))switch(e.mediaFlow){default:return"mediaFlow: enum value expected";case 0:case 1:case 2:}if(null!=e.metadata&&e.hasOwnProperty("metadata")){if(!d.isObject(e.metadata))return"metadata: object expected";for(var t=Object.keys(e.metadata),n=0;n>>0,e.sessionId.high>>>0).toNumber())),null!=e.callId&&(t.callId=String(e.callId)),null!=e.originatorId&&(t.originatorId=String(e.originatorId)),e.mediaFlow){case"MediaFlowP2P":case 0:t.mediaFlow=0;break;case"MediaFlowSFU":case 1:t.mediaFlow=1;break;case"MediaFlowS2W":case 2:t.mediaFlow=2}if(e.metadata){if("object"!=typeof e.metadata)throw TypeError(".bin_proto.CallDetailRecord.metadata: object expected");t.metadata={};for(var n=Object.keys(e.metadata),r=0;r>>0,e.startedAt.high>>>0).toNumber())),null!=e.endedAt&&(d.Long?(t.endedAt=d.Long.fromValue(e.endedAt)).unsigned=!1:"string"==typeof e.endedAt?t.endedAt=parseInt(e.endedAt,10):"number"==typeof e.endedAt?t.endedAt=e.endedAt:"object"==typeof e.endedAt&&(t.endedAt=new d.LongBits(e.endedAt.low>>>0,e.endedAt.high>>>0).toNumber())),e.state){case"CallStateOngoing":case 0:t.state=0;break;case"CallStateClosed":case 1:t.state=1}if(e.participants){if(!Array.isArray(e.participants))throw TypeError(".bin_proto.CallDetailRecord.participants: array expected");for(t.participants=[],r=0;r>>0,e.sessionId.high>>>0).toNumber():e.sessionId),null!=e.callId&&e.hasOwnProperty("callId")&&(r.callId=e.callId),null!=e.originatorId&&e.hasOwnProperty("originatorId")&&(r.originatorId=e.originatorId),null!=e.mediaFlow&&e.hasOwnProperty("mediaFlow")&&(r.mediaFlow=t.enums===String?p.bin_proto.MediaFlow[e.mediaFlow]:e.mediaFlow),e.metadata&&(n=Object.keys(e.metadata)).length){r.metadata={};for(var i=0;i>>0,e.startedAt.high>>>0).toNumber():e.startedAt),null!=e.endedAt&&e.hasOwnProperty("endedAt")&&("number"==typeof e.endedAt?r.endedAt=t.longs===String?String(e.endedAt):e.endedAt:r.endedAt=t.longs===String?d.Long.prototype.toString.call(e.endedAt):t.longs===Number?new d.LongBits(e.endedAt.low>>>0,e.endedAt.high>>>0).toNumber():e.endedAt),null!=e.state&&e.hasOwnProperty("state")&&(r.state=t.enums===String?p.bin_proto.CallState[e.state]:e.state),e.participants&&e.participants.length)for(r.participants=[],i=0;i>>3){case 1:r.user=p.bin_proto.User.decode(e,e.uint32());break;case 2:r.clientId=e.string();break;case 3:r.originator=e.bool();break;case 4:r.joinedAt=e.int64();break;case 5:r.leftAt=e.int64();break;case 6:r.mediaConnectedAt=e.int64();break;case 7:r.state=e.int32();break;case 8:r.isCallSilenced=e.bool();break;default:e.skipType(7&o)}}return r},e.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.user&&e.hasOwnProperty("user")){var t=p.bin_proto.User.verify(e.user);if(t)return"user."+t}if(null!=e.clientId&&e.hasOwnProperty("clientId")&&!d.isString(e.clientId))return"clientId: string expected";if(null!=e.originator&&e.hasOwnProperty("originator")&&"boolean"!=typeof e.originator)return"originator: boolean expected";if(null!=e.joinedAt&&e.hasOwnProperty("joinedAt")&&!(d.isInteger(e.joinedAt)||e.joinedAt&&d.isInteger(e.joinedAt.low)&&d.isInteger(e.joinedAt.high)))return"joinedAt: integer|Long expected";if(null!=e.leftAt&&e.hasOwnProperty("leftAt")&&!(d.isInteger(e.leftAt)||e.leftAt&&d.isInteger(e.leftAt.low)&&d.isInteger(e.leftAt.high)))return"leftAt: integer|Long expected";if(null!=e.mediaConnectedAt&&e.hasOwnProperty("mediaConnectedAt")&&!(d.isInteger(e.mediaConnectedAt)||e.mediaConnectedAt&&d.isInteger(e.mediaConnectedAt.low)&&d.isInteger(e.mediaConnectedAt.high)))return"mediaConnectedAt: integer|Long expected";if(null!=e.state&&e.hasOwnProperty("state"))switch(e.state){default:return"state: enum value expected";case 0:case 1:case 2:case 3:case 4:case 5:case 6:}return null!=e.isCallSilenced&&e.hasOwnProperty("isCallSilenced")&&"boolean"!=typeof e.isCallSilenced?"isCallSilenced: boolean expected":null},e.fromObject=function(e){if(e instanceof p.bin_proto.CDRParticipant)return e;var t=new p.bin_proto.CDRParticipant;if(null!=e.user){if("object"!=typeof e.user)throw TypeError(".bin_proto.CDRParticipant.user: object expected");t.user=p.bin_proto.User.fromObject(e.user)}switch(null!=e.clientId&&(t.clientId=String(e.clientId)),null!=e.originator&&(t.originator=Boolean(e.originator)),null!=e.joinedAt&&(d.Long?(t.joinedAt=d.Long.fromValue(e.joinedAt)).unsigned=!1:"string"==typeof e.joinedAt?t.joinedAt=parseInt(e.joinedAt,10):"number"==typeof e.joinedAt?t.joinedAt=e.joinedAt:"object"==typeof e.joinedAt&&(t.joinedAt=new d.LongBits(e.joinedAt.low>>>0,e.joinedAt.high>>>0).toNumber())),null!=e.leftAt&&(d.Long?(t.leftAt=d.Long.fromValue(e.leftAt)).unsigned=!1:"string"==typeof e.leftAt?t.leftAt=parseInt(e.leftAt,10):"number"==typeof e.leftAt?t.leftAt=e.leftAt:"object"==typeof e.leftAt&&(t.leftAt=new d.LongBits(e.leftAt.low>>>0,e.leftAt.high>>>0).toNumber())),null!=e.mediaConnectedAt&&(d.Long?(t.mediaConnectedAt=d.Long.fromValue(e.mediaConnectedAt)).unsigned=!1:"string"==typeof e.mediaConnectedAt?t.mediaConnectedAt=parseInt(e.mediaConnectedAt,10):"number"==typeof e.mediaConnectedAt?t.mediaConnectedAt=e.mediaConnectedAt:"object"==typeof e.mediaConnectedAt&&(t.mediaConnectedAt=new d.LongBits(e.mediaConnectedAt.low>>>0,e.mediaConnectedAt.high>>>0).toNumber())),e.state){case"ParticipantStateIdle":case 0:t.state=0;break;case"ParticipantStateRinging":case 1:t.state=1;break;case"ParticipantStateJoined":case 2:t.state=2;break;case"ParticipantStateLeft":case 3:t.state=3;break;case"ParticipantStateDeclined":case 4:t.state=4;break;case"ParticipantStateKicked":case 5:t.state=5;break;case"ParticipantStateNoAnswer":case 6:t.state=6}return null!=e.isCallSilenced&&(t.isCallSilenced=Boolean(e.isCallSilenced)),t},e.toObject=function(e,t){t||(t={});var n={};if(t.defaults){if(n.user=null,n.clientId="",n.originator=!1,d.Long){var r=new d.Long(0,0,!1);n.joinedAt=t.longs===String?r.toString():t.longs===Number?r.toNumber():r}else n.joinedAt=t.longs===String?"0":0;d.Long?(r=new d.Long(0,0,!1),n.leftAt=t.longs===String?r.toString():t.longs===Number?r.toNumber():r):n.leftAt=t.longs===String?"0":0,d.Long?(r=new d.Long(0,0,!1),n.mediaConnectedAt=t.longs===String?r.toString():t.longs===Number?r.toNumber():r):n.mediaConnectedAt=t.longs===String?"0":0,n.state=t.enums===String?"ParticipantStateIdle":0,n.isCallSilenced=!1}return null!=e.user&&e.hasOwnProperty("user")&&(n.user=p.bin_proto.User.toObject(e.user,t)),null!=e.clientId&&e.hasOwnProperty("clientId")&&(n.clientId=e.clientId),null!=e.originator&&e.hasOwnProperty("originator")&&(n.originator=e.originator),null!=e.joinedAt&&e.hasOwnProperty("joinedAt")&&("number"==typeof e.joinedAt?n.joinedAt=t.longs===String?String(e.joinedAt):e.joinedAt:n.joinedAt=t.longs===String?d.Long.prototype.toString.call(e.joinedAt):t.longs===Number?new d.LongBits(e.joinedAt.low>>>0,e.joinedAt.high>>>0).toNumber():e.joinedAt),null!=e.leftAt&&e.hasOwnProperty("leftAt")&&("number"==typeof e.leftAt?n.leftAt=t.longs===String?String(e.leftAt):e.leftAt:n.leftAt=t.longs===String?d.Long.prototype.toString.call(e.leftAt):t.longs===Number?new d.LongBits(e.leftAt.low>>>0,e.leftAt.high>>>0).toNumber():e.leftAt),null!=e.mediaConnectedAt&&e.hasOwnProperty("mediaConnectedAt")&&("number"==typeof e.mediaConnectedAt?n.mediaConnectedAt=t.longs===String?String(e.mediaConnectedAt):e.mediaConnectedAt:n.mediaConnectedAt=t.longs===String?d.Long.prototype.toString.call(e.mediaConnectedAt):t.longs===Number?new d.LongBits(e.mediaConnectedAt.low>>>0,e.mediaConnectedAt.high>>>0).toNumber():e.mediaConnectedAt),null!=e.state&&e.hasOwnProperty("state")&&(n.state=t.enums===String?p.bin_proto.ParticipantState[e.state]:e.state),null!=e.isCallSilenced&&e.hasOwnProperty("isCallSilenced")&&(n.isCallSilenced=e.isCallSilenced),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,l.util.toJSONOptions)},e}(),i.CDRRequestEvent=function(){var e={},t=Object.create(e);return t[e[0]="GET_RECENT_CALLS"]=0,t[e[1]="GET_CALLS_BY_SESSION_IDS"]=1,t[e[2]="DELETE_RECENT_CALLS"]=2,t}(),i.CDRRequest=function(){function e(e){if(e)for(var t=Object.keys(e),n=0;n>>3){case 1:r.event=e.int32();break;case 2:r.id=e.string();break;case 3:r.order=e.int32();break;case 4:r.limit=e.int32();break;case 5:r.participantCount=e.int32();break;case 6:r.position=p.bin_proto.Position.decode(e,e.uint32());break;case 7:r.sessionIdList=p.bin_proto.Int64List.decode(e,e.uint32());break;case 8:r.direction=e.int32();break;case 9:r.filter=p.bin_proto.CDRFilter.decode(e,e.uint32());break;default:e.skipType(7&o)}}return r},e.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!=typeof e||null===e)return"object expected";var t={};if(null!=e.event&&e.hasOwnProperty("event"))switch(e.event){default:return"event: enum value expected";case 0:case 1:case 2:}if(null!=e.id&&e.hasOwnProperty("id")&&!d.isString(e.id))return"id: string expected";if(null!=e.order&&e.hasOwnProperty("order"))switch(e.order){default:return"order: enum value expected";case 0:case 1:}if(null!=e.limit&&e.hasOwnProperty("limit")&&!d.isInteger(e.limit))return"limit: integer expected";if(null!=e.participantCount&&e.hasOwnProperty("participantCount")&&!d.isInteger(e.participantCount))return"participantCount: integer expected";if(null!=e.position&&e.hasOwnProperty("position")&&(t.InputParam=1,n=p.bin_proto.Position.verify(e.position)))return"position."+n;if(null!=e.sessionIdList&&e.hasOwnProperty("sessionIdList")){if(1===t.InputParam)return"InputParam: multiple values";var n;if(t.InputParam=1,n=p.bin_proto.Int64List.verify(e.sessionIdList))return"sessionIdList."+n}if(null!=e.direction&&e.hasOwnProperty("direction"))switch(e.direction){default:return"direction: enum value expected";case 0:case 1:}return null!=e.filter&&e.hasOwnProperty("filter")&&(n=p.bin_proto.CDRFilter.verify(e.filter))?"filter."+n:null},e.fromObject=function(e){if(e instanceof p.bin_proto.CDRRequest)return e;var t=new p.bin_proto.CDRRequest;switch(e.event){case"GET_RECENT_CALLS":case 0:t.event=0;break;case"GET_CALLS_BY_SESSION_IDS":case 1:t.event=1;break;case"DELETE_RECENT_CALLS":case 2:t.event=2}switch(null!=e.id&&(t.id=String(e.id)),e.order){case"ASC":case 0:t.order=0;break;case"DESC":case 1:t.order=1}if(null!=e.limit&&(t.limit=0|e.limit),null!=e.participantCount&&(t.participantCount=0|e.participantCount),null!=e.position){if("object"!=typeof e.position)throw TypeError(".bin_proto.CDRRequest.position: object expected");t.position=p.bin_proto.Position.fromObject(e.position)}if(null!=e.sessionIdList){if("object"!=typeof e.sessionIdList)throw TypeError(".bin_proto.CDRRequest.sessionIdList: object expected");t.sessionIdList=p.bin_proto.Int64List.fromObject(e.sessionIdList)}switch(e.direction){case"NEXT":case 0:t.direction=0;break;case"PREVIOUS":case 1:t.direction=1}if(null!=e.filter){if("object"!=typeof e.filter)throw TypeError(".bin_proto.CDRRequest.filter: object expected");t.filter=p.bin_proto.CDRFilter.fromObject(e.filter)}return t},e.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.event=t.enums===String?"GET_RECENT_CALLS":0,n.id="",n.order=t.enums===String?"ASC":0,n.limit=0,n.participantCount=0,n.direction=t.enums===String?"NEXT":0,n.filter=null),null!=e.event&&e.hasOwnProperty("event")&&(n.event=t.enums===String?p.bin_proto.CDRRequestEvent[e.event]:e.event),null!=e.id&&e.hasOwnProperty("id")&&(n.id=e.id),null!=e.order&&e.hasOwnProperty("order")&&(n.order=t.enums===String?p.bin_proto.CDRRequest.Order[e.order]:e.order),null!=e.limit&&e.hasOwnProperty("limit")&&(n.limit=e.limit),null!=e.participantCount&&e.hasOwnProperty("participantCount")&&(n.participantCount=e.participantCount),null!=e.position&&e.hasOwnProperty("position")&&(n.position=p.bin_proto.Position.toObject(e.position,t),t.oneofs&&(n.InputParam="position")),null!=e.sessionIdList&&e.hasOwnProperty("sessionIdList")&&(n.sessionIdList=p.bin_proto.Int64List.toObject(e.sessionIdList,t),t.oneofs&&(n.InputParam="sessionIdList")),null!=e.direction&&e.hasOwnProperty("direction")&&(n.direction=t.enums===String?p.bin_proto.CDRRequest.Direction[e.direction]:e.direction),null!=e.filter&&e.hasOwnProperty("filter")&&(n.filter=p.bin_proto.CDRFilter.toObject(e.filter,t)),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,l.util.toJSONOptions)},e.Order=function(){var e={},t=Object.create(e);return t[e[0]="ASC"]=0,t[e[1]="DESC"]=1,t}(),e.Direction=function(){var e={},t=Object.create(e);return t[e[0]="NEXT"]=0,t[e[1]="PREVIOUS"]=1,t}(),e}(),i.Position=function(){function e(e){if(e)for(var t=Object.keys(e),n=0;n>>3){case 6:r.nextToken=e.string();break;case 7:r.sessionId=e.int64();break;default:e.skipType(7&o)}}return r},e.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!=typeof e||null===e)return"object expected";var t={};if(null!=e.nextToken&&e.hasOwnProperty("nextToken")&&(t.Param=1,!d.isString(e.nextToken)))return"nextToken: string expected";if(null!=e.sessionId&&e.hasOwnProperty("sessionId")){if(1===t.Param)return"Param: multiple values";if(t.Param=1,!(d.isInteger(e.sessionId)||e.sessionId&&d.isInteger(e.sessionId.low)&&d.isInteger(e.sessionId.high)))return"sessionId: integer|Long expected"}return null},e.fromObject=function(e){if(e instanceof p.bin_proto.Position)return e;var t=new p.bin_proto.Position;return null!=e.nextToken&&(t.nextToken=String(e.nextToken)),null!=e.sessionId&&(d.Long?(t.sessionId=d.Long.fromValue(e.sessionId)).unsigned=!1:"string"==typeof e.sessionId?t.sessionId=parseInt(e.sessionId,10):"number"==typeof e.sessionId?t.sessionId=e.sessionId:"object"==typeof e.sessionId&&(t.sessionId=new d.LongBits(e.sessionId.low>>>0,e.sessionId.high>>>0).toNumber())),t},e.toObject=function(e,t){t||(t={});var n={};return null!=e.nextToken&&e.hasOwnProperty("nextToken")&&(n.nextToken=e.nextToken,t.oneofs&&(n.Param="nextToken")),null!=e.sessionId&&e.hasOwnProperty("sessionId")&&("number"==typeof e.sessionId?n.sessionId=t.longs===String?String(e.sessionId):e.sessionId:n.sessionId=t.longs===String?d.Long.prototype.toString.call(e.sessionId):t.longs===Number?new d.LongBits(e.sessionId.low>>>0,e.sessionId.high>>>0).toNumber():e.sessionId,t.oneofs&&(n.Param="sessionId")),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,l.util.toJSONOptions)},e}(),i.Int64List=function(){function e(e){if(this.items=[],e)for(var t=Object.keys(e),n=0;n>>3==1)if(r.items&&r.items.length||(r.items=[]),2==(7&o))for(var i=e.uint32()+e.pos;e.pos>>0,e.items[n].high>>>0).toNumber())}return t},e.toObject=function(e,t){t||(t={});var n={};if((t.arrays||t.defaults)&&(n.items=[]),e.items&&e.items.length){n.items=[];for(var r=0;r>>0,e.items[r].high>>>0).toNumber():e.items[r]}return n},e.prototype.toJSON=function(){return this.constructor.toObject(this,l.util.toJSONOptions)},e}(),i.CDRFilter=function(){function e(e){if(this.callTypes=[],e)for(var t=Object.keys(e),n=0;n>>3==1?(r.callTypes&&r.callTypes.length||(r.callTypes=[]),r.callTypes.push(e.string())):e.skipType(7&o)}return r},e.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.callTypes&&e.hasOwnProperty("callTypes")){if(!Array.isArray(e.callTypes))return"callTypes: array expected";for(var t=0;t>>3){case 1:r.event=e.int32();break;case 2:r.id=e.string();break;case 3:r.getRecentCallsResponse=p.bin_proto.GetRecentCallsResponse.decode(e,e.uint32());break;case 4:r.sessionIdList=p.bin_proto.Int64List.decode(e,e.uint32());break;default:e.skipType(7&o)}}return r},e.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!=typeof e||null===e)return"object expected";var t={};if(null!=e.event&&e.hasOwnProperty("event"))switch(e.event){default:return"event: enum value expected";case 0:case 1:case 2:}if(null!=e.id&&e.hasOwnProperty("id")&&!d.isString(e.id))return"id: string expected";if(null!=e.getRecentCallsResponse&&e.hasOwnProperty("getRecentCallsResponse")&&(t.Response=1,n=p.bin_proto.GetRecentCallsResponse.verify(e.getRecentCallsResponse)))return"getRecentCallsResponse."+n;if(null!=e.sessionIdList&&e.hasOwnProperty("sessionIdList")){if(1===t.Response)return"Response: multiple values";var n;if(t.Response=1,n=p.bin_proto.Int64List.verify(e.sessionIdList))return"sessionIdList."+n}return null},e.fromObject=function(e){if(e instanceof p.bin_proto.CDRResponse)return e;var t=new p.bin_proto.CDRResponse;switch(e.event){case"GET_RECENT_CALLS":case 0:t.event=0;break;case"GET_CALLS_BY_SESSION_IDS":case 1:t.event=1;break;case"DELETE_RECENT_CALLS":case 2:t.event=2}if(null!=e.id&&(t.id=String(e.id)),null!=e.getRecentCallsResponse){if("object"!=typeof e.getRecentCallsResponse)throw TypeError(".bin_proto.CDRResponse.getRecentCallsResponse: object expected");t.getRecentCallsResponse=p.bin_proto.GetRecentCallsResponse.fromObject(e.getRecentCallsResponse)}if(null!=e.sessionIdList){if("object"!=typeof e.sessionIdList)throw TypeError(".bin_proto.CDRResponse.sessionIdList: object expected");t.sessionIdList=p.bin_proto.Int64List.fromObject(e.sessionIdList)}return t},e.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.event=t.enums===String?"GET_RECENT_CALLS":0,n.id=""),null!=e.event&&e.hasOwnProperty("event")&&(n.event=t.enums===String?p.bin_proto.CDRRequestEvent[e.event]:e.event),null!=e.id&&e.hasOwnProperty("id")&&(n.id=e.id),null!=e.getRecentCallsResponse&&e.hasOwnProperty("getRecentCallsResponse")&&(n.getRecentCallsResponse=p.bin_proto.GetRecentCallsResponse.toObject(e.getRecentCallsResponse,t),t.oneofs&&(n.Response="getRecentCallsResponse")),null!=e.sessionIdList&&e.hasOwnProperty("sessionIdList")&&(n.sessionIdList=p.bin_proto.Int64List.toObject(e.sessionIdList,t),t.oneofs&&(n.Response="sessionIdList")),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,l.util.toJSONOptions)},e}(),i.GetRecentCallsResponse=function(){function e(e){if(this.records=[],e)for(var t=Object.keys(e),n=0;n>>3){case 1:r.nextToken=e.string();break;case 2:r.records&&r.records.length||(r.records=[]),r.records.push(p.bin_proto.CallDetailRecord.decode(e,e.uint32()));break;default:e.skipType(7&o)}}return r},e.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.nextToken&&e.hasOwnProperty("nextToken")&&!d.isString(e.nextToken))return"nextToken: string expected";if(null!=e.records&&e.hasOwnProperty("records")){if(!Array.isArray(e.records))return"records: array expected";for(var t=0;t>>3){case 1:r.event=e.int32();break;case 2:r.id=e.string();break;case 3:r.createParam=p.bin_proto.CreateChannelInviteKeyParam.decode(e,e.uint32());break;case 4:r.updateParam=p.bin_proto.UpdateChannelInviteKeyParam.decode(e,e.uint32());break;case 5:r.regenerate=p.bin_proto.RegenerateChannelInviteKeyParam.decode(e,e.uint32());break;case 6:r.getInviteKey=p.bin_proto.GetChannelInviteKeyParam.decode(e,e.uint32());break;case 7:r.getInviteKeys=p.bin_proto.GetChannelInviteKeysParam.decode(e,e.uint32());break;case 8:r.revokeParam=p.bin_proto.RevokeChannelInviteKeyParam.decode(e,e.uint32());break;case 9:r.deleteParam=p.bin_proto.DeleteRevokedChannelInviteKeyParam.decode(e,e.uint32());break;case 10:r.getRevokedParam=p.bin_proto.GetRevokedChannelInviteKeysParam.decode(e,e.uint32());break;default:e.skipType(7&o)}}return r},e.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!=typeof e||null===e)return"object expected";var t={};if(null!=e.event&&e.hasOwnProperty("event"))switch(e.event){default:return"event: enum value expected";case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:}if(null!=e.id&&e.hasOwnProperty("id")&&!d.isString(e.id))return"id: string expected";if(null!=e.createParam&&e.hasOwnProperty("createParam")&&(t.RequestParam=1,n=p.bin_proto.CreateChannelInviteKeyParam.verify(e.createParam)))return"createParam."+n;if(null!=e.updateParam&&e.hasOwnProperty("updateParam")){if(1===t.RequestParam)return"RequestParam: multiple values";if(t.RequestParam=1,n=p.bin_proto.UpdateChannelInviteKeyParam.verify(e.updateParam))return"updateParam."+n}if(null!=e.regenerate&&e.hasOwnProperty("regenerate")){if(1===t.RequestParam)return"RequestParam: multiple values";if(t.RequestParam=1,n=p.bin_proto.RegenerateChannelInviteKeyParam.verify(e.regenerate))return"regenerate."+n}if(null!=e.getInviteKey&&e.hasOwnProperty("getInviteKey")){if(1===t.RequestParam)return"RequestParam: multiple values";if(t.RequestParam=1,n=p.bin_proto.GetChannelInviteKeyParam.verify(e.getInviteKey))return"getInviteKey."+n}if(null!=e.getInviteKeys&&e.hasOwnProperty("getInviteKeys")){if(1===t.RequestParam)return"RequestParam: multiple values";if(t.RequestParam=1,n=p.bin_proto.GetChannelInviteKeysParam.verify(e.getInviteKeys))return"getInviteKeys."+n}if(null!=e.revokeParam&&e.hasOwnProperty("revokeParam")){if(1===t.RequestParam)return"RequestParam: multiple values";if(t.RequestParam=1,n=p.bin_proto.RevokeChannelInviteKeyParam.verify(e.revokeParam))return"revokeParam."+n}if(null!=e.deleteParam&&e.hasOwnProperty("deleteParam")){if(1===t.RequestParam)return"RequestParam: multiple values";if(t.RequestParam=1,n=p.bin_proto.DeleteRevokedChannelInviteKeyParam.verify(e.deleteParam))return"deleteParam."+n}if(null!=e.getRevokedParam&&e.hasOwnProperty("getRevokedParam")){if(1===t.RequestParam)return"RequestParam: multiple values";var n;if(t.RequestParam=1,n=p.bin_proto.GetRevokedChannelInviteKeysParam.verify(e.getRevokedParam))return"getRevokedParam."+n}return null},e.fromObject=function(e){if(e instanceof p.bin_proto.ChannelInviteKeyRequest)return e;var t=new p.bin_proto.ChannelInviteKeyRequest;switch(e.event){case"CREATE_CHANNEL_INVITE_KEY":case 0:t.event=0;break;case"UPDATE_CHANNEL_INVITE_KEY":case 1:t.event=1;break;case"GET_CHANNEL_INVITE_KEY":case 2:t.event=2;break;case"GET_CHANNEL_INVITE_KEYS":case 3:t.event=3;break;case"REGENERATE_CHANNEL_INVITE_KEY":case 4:t.event=4;break;case"REVOKE_CHANNEL_INVITE_KEY":case 5:t.event=5;break;case"DELETE_REVOKED_CHANNEL_INVITE_KEY":case 6:t.event=6;break;case"GET_REVOKED_CHANNEL_INVITE_KEYS":case 7:t.event=7}if(null!=e.id&&(t.id=String(e.id)),null!=e.createParam){if("object"!=typeof e.createParam)throw TypeError(".bin_proto.ChannelInviteKeyRequest.createParam: object expected");t.createParam=p.bin_proto.CreateChannelInviteKeyParam.fromObject(e.createParam)}if(null!=e.updateParam){if("object"!=typeof e.updateParam)throw TypeError(".bin_proto.ChannelInviteKeyRequest.updateParam: object expected");t.updateParam=p.bin_proto.UpdateChannelInviteKeyParam.fromObject(e.updateParam)}if(null!=e.regenerate){if("object"!=typeof e.regenerate)throw TypeError(".bin_proto.ChannelInviteKeyRequest.regenerate: object expected");t.regenerate=p.bin_proto.RegenerateChannelInviteKeyParam.fromObject(e.regenerate)}if(null!=e.getInviteKey){if("object"!=typeof e.getInviteKey)throw TypeError(".bin_proto.ChannelInviteKeyRequest.getInviteKey: object expected");t.getInviteKey=p.bin_proto.GetChannelInviteKeyParam.fromObject(e.getInviteKey)}if(null!=e.getInviteKeys){if("object"!=typeof e.getInviteKeys)throw TypeError(".bin_proto.ChannelInviteKeyRequest.getInviteKeys: object expected");t.getInviteKeys=p.bin_proto.GetChannelInviteKeysParam.fromObject(e.getInviteKeys)}if(null!=e.revokeParam){if("object"!=typeof e.revokeParam)throw TypeError(".bin_proto.ChannelInviteKeyRequest.revokeParam: object expected");t.revokeParam=p.bin_proto.RevokeChannelInviteKeyParam.fromObject(e.revokeParam)}if(null!=e.deleteParam){if("object"!=typeof e.deleteParam)throw TypeError(".bin_proto.ChannelInviteKeyRequest.deleteParam: object expected");t.deleteParam=p.bin_proto.DeleteRevokedChannelInviteKeyParam.fromObject(e.deleteParam)}if(null!=e.getRevokedParam){if("object"!=typeof e.getRevokedParam)throw TypeError(".bin_proto.ChannelInviteKeyRequest.getRevokedParam: object expected");t.getRevokedParam=p.bin_proto.GetRevokedChannelInviteKeysParam.fromObject(e.getRevokedParam)}return t},e.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.event=t.enums===String?"CREATE_CHANNEL_INVITE_KEY":0,n.id=""),null!=e.event&&e.hasOwnProperty("event")&&(n.event=t.enums===String?p.bin_proto.ChannelInviteKeyRequestEvent[e.event]:e.event),null!=e.id&&e.hasOwnProperty("id")&&(n.id=e.id),null!=e.createParam&&e.hasOwnProperty("createParam")&&(n.createParam=p.bin_proto.CreateChannelInviteKeyParam.toObject(e.createParam,t),t.oneofs&&(n.RequestParam="createParam")),null!=e.updateParam&&e.hasOwnProperty("updateParam")&&(n.updateParam=p.bin_proto.UpdateChannelInviteKeyParam.toObject(e.updateParam,t),t.oneofs&&(n.RequestParam="updateParam")),null!=e.regenerate&&e.hasOwnProperty("regenerate")&&(n.regenerate=p.bin_proto.RegenerateChannelInviteKeyParam.toObject(e.regenerate,t),t.oneofs&&(n.RequestParam="regenerate")),null!=e.getInviteKey&&e.hasOwnProperty("getInviteKey")&&(n.getInviteKey=p.bin_proto.GetChannelInviteKeyParam.toObject(e.getInviteKey,t),t.oneofs&&(n.RequestParam="getInviteKey")),null!=e.getInviteKeys&&e.hasOwnProperty("getInviteKeys")&&(n.getInviteKeys=p.bin_proto.GetChannelInviteKeysParam.toObject(e.getInviteKeys,t),t.oneofs&&(n.RequestParam="getInviteKeys")),null!=e.revokeParam&&e.hasOwnProperty("revokeParam")&&(n.revokeParam=p.bin_proto.RevokeChannelInviteKeyParam.toObject(e.revokeParam,t),t.oneofs&&(n.RequestParam="revokeParam")),null!=e.deleteParam&&e.hasOwnProperty("deleteParam")&&(n.deleteParam=p.bin_proto.DeleteRevokedChannelInviteKeyParam.toObject(e.deleteParam,t),t.oneofs&&(n.RequestParam="deleteParam")),null!=e.getRevokedParam&&e.hasOwnProperty("getRevokedParam")&&(n.getRevokedParam=p.bin_proto.GetRevokedChannelInviteKeysParam.toObject(e.getRevokedParam,t),t.oneofs&&(n.RequestParam="getRevokedParam")),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,l.util.toJSONOptions)},e}(),i.CreateChannelInviteKeyParam=function(){function e(e){if(e)for(var t=Object.keys(e),n=0;n>>3){case 1:r.channelId=e.string();break;case 2:r.maxUses=e.int32();break;case 3:r.expiresAt=e.int64();break;case 4:r.accessPriorHistory=e.bool();break;default:e.skipType(7&o)}}return r},e.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},e.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.channelId&&e.hasOwnProperty("channelId")&&!d.isString(e.channelId)?"channelId: string expected":null!=e.maxUses&&e.hasOwnProperty("maxUses")&&!d.isInteger(e.maxUses)?"maxUses: integer expected":null!=e.expiresAt&&e.hasOwnProperty("expiresAt")&&!(d.isInteger(e.expiresAt)||e.expiresAt&&d.isInteger(e.expiresAt.low)&&d.isInteger(e.expiresAt.high))?"expiresAt: integer|Long expected":null!=e.accessPriorHistory&&e.hasOwnProperty("accessPriorHistory")&&"boolean"!=typeof e.accessPriorHistory?"accessPriorHistory: boolean expected":null},e.fromObject=function(e){if(e instanceof p.bin_proto.CreateChannelInviteKeyParam)return e;var t=new p.bin_proto.CreateChannelInviteKeyParam;return null!=e.channelId&&(t.channelId=String(e.channelId)),null!=e.maxUses&&(t.maxUses=0|e.maxUses),null!=e.expiresAt&&(d.Long?(t.expiresAt=d.Long.fromValue(e.expiresAt)).unsigned=!1:"string"==typeof e.expiresAt?t.expiresAt=parseInt(e.expiresAt,10):"number"==typeof e.expiresAt?t.expiresAt=e.expiresAt:"object"==typeof e.expiresAt&&(t.expiresAt=new d.LongBits(e.expiresAt.low>>>0,e.expiresAt.high>>>0).toNumber())),null!=e.accessPriorHistory&&(t.accessPriorHistory=Boolean(e.accessPriorHistory)),t},e.toObject=function(e,t){t||(t={});var n={};if(t.defaults){if(n.channelId="",n.maxUses=0,d.Long){var r=new d.Long(0,0,!1);n.expiresAt=t.longs===String?r.toString():t.longs===Number?r.toNumber():r}else n.expiresAt=t.longs===String?"0":0;n.accessPriorHistory=!1}return null!=e.channelId&&e.hasOwnProperty("channelId")&&(n.channelId=e.channelId),null!=e.maxUses&&e.hasOwnProperty("maxUses")&&(n.maxUses=e.maxUses),null!=e.expiresAt&&e.hasOwnProperty("expiresAt")&&("number"==typeof e.expiresAt?n.expiresAt=t.longs===String?String(e.expiresAt):e.expiresAt:n.expiresAt=t.longs===String?d.Long.prototype.toString.call(e.expiresAt):t.longs===Number?new d.LongBits(e.expiresAt.low>>>0,e.expiresAt.high>>>0).toNumber():e.expiresAt),null!=e.accessPriorHistory&&e.hasOwnProperty("accessPriorHistory")&&(n.accessPriorHistory=e.accessPriorHistory),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,l.util.toJSONOptions)},e}(),i.UpdateChannelInviteKeyParam=function(){function e(e){if(e)for(var t=Object.keys(e),n=0;n>>3){case 1:r.channelId=e.string();break;case 2:r.key=e.string();break;case 3:r.maxUses=e.int32();break;case 4:r.expiresAt=e.int64();break;case 5:r.accessPriorHistory=e.bool();break;default:e.skipType(7&o)}}return r},e.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},e.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.channelId&&e.hasOwnProperty("channelId")&&!d.isString(e.channelId)?"channelId: string expected":null!=e.key&&e.hasOwnProperty("key")&&!d.isString(e.key)?"key: string expected":null!=e.maxUses&&e.hasOwnProperty("maxUses")&&!d.isInteger(e.maxUses)?"maxUses: integer expected":null!=e.expiresAt&&e.hasOwnProperty("expiresAt")&&!(d.isInteger(e.expiresAt)||e.expiresAt&&d.isInteger(e.expiresAt.low)&&d.isInteger(e.expiresAt.high))?"expiresAt: integer|Long expected":null!=e.accessPriorHistory&&e.hasOwnProperty("accessPriorHistory")&&"boolean"!=typeof e.accessPriorHistory?"accessPriorHistory: boolean expected":null},e.fromObject=function(e){if(e instanceof p.bin_proto.UpdateChannelInviteKeyParam)return e;var t=new p.bin_proto.UpdateChannelInviteKeyParam;return null!=e.channelId&&(t.channelId=String(e.channelId)),null!=e.key&&(t.key=String(e.key)),null!=e.maxUses&&(t.maxUses=0|e.maxUses),null!=e.expiresAt&&(d.Long?(t.expiresAt=d.Long.fromValue(e.expiresAt)).unsigned=!1:"string"==typeof e.expiresAt?t.expiresAt=parseInt(e.expiresAt,10):"number"==typeof e.expiresAt?t.expiresAt=e.expiresAt:"object"==typeof e.expiresAt&&(t.expiresAt=new d.LongBits(e.expiresAt.low>>>0,e.expiresAt.high>>>0).toNumber())),null!=e.accessPriorHistory&&(t.accessPriorHistory=Boolean(e.accessPriorHistory)),t},e.toObject=function(e,t){t||(t={});var n={};if(t.defaults){if(n.channelId="",n.key="",n.maxUses=0,d.Long){var r=new d.Long(0,0,!1);n.expiresAt=t.longs===String?r.toString():t.longs===Number?r.toNumber():r}else n.expiresAt=t.longs===String?"0":0;n.accessPriorHistory=!1}return null!=e.channelId&&e.hasOwnProperty("channelId")&&(n.channelId=e.channelId),null!=e.key&&e.hasOwnProperty("key")&&(n.key=e.key),null!=e.maxUses&&e.hasOwnProperty("maxUses")&&(n.maxUses=e.maxUses),null!=e.expiresAt&&e.hasOwnProperty("expiresAt")&&("number"==typeof e.expiresAt?n.expiresAt=t.longs===String?String(e.expiresAt):e.expiresAt:n.expiresAt=t.longs===String?d.Long.prototype.toString.call(e.expiresAt):t.longs===Number?new d.LongBits(e.expiresAt.low>>>0,e.expiresAt.high>>>0).toNumber():e.expiresAt),null!=e.accessPriorHistory&&e.hasOwnProperty("accessPriorHistory")&&(n.accessPriorHistory=e.accessPriorHistory),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,l.util.toJSONOptions)},e}(),i.RegenerateChannelInviteKeyParam=function(){function e(e){if(e)for(var t=Object.keys(e),n=0;n>>3){case 1:r.channelId=e.string();break;case 2:r.key=e.string();break;case 3:r.deletePermanently=e.bool();break;default:e.skipType(7&o)}}return r},e.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},e.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.channelId&&e.hasOwnProperty("channelId")&&!d.isString(e.channelId)?"channelId: string expected":null!=e.key&&e.hasOwnProperty("key")&&!d.isString(e.key)?"key: string expected":null!=e.deletePermanently&&e.hasOwnProperty("deletePermanently")&&"boolean"!=typeof e.deletePermanently?"deletePermanently: boolean expected":null},e.fromObject=function(e){if(e instanceof p.bin_proto.RegenerateChannelInviteKeyParam)return e;var t=new p.bin_proto.RegenerateChannelInviteKeyParam;return null!=e.channelId&&(t.channelId=String(e.channelId)),null!=e.key&&(t.key=String(e.key)),null!=e.deletePermanently&&(t.deletePermanently=Boolean(e.deletePermanently)),t},e.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.channelId="",n.key="",n.deletePermanently=!1),null!=e.channelId&&e.hasOwnProperty("channelId")&&(n.channelId=e.channelId),null!=e.key&&e.hasOwnProperty("key")&&(n.key=e.key),null!=e.deletePermanently&&e.hasOwnProperty("deletePermanently")&&(n.deletePermanently=e.deletePermanently),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,l.util.toJSONOptions)},e}(),i.GetChannelInviteKeysParam=function(){function e(e){if(e)for(var t=Object.keys(e),n=0;n>>3==1?r.channelId=e.string():e.skipType(7&o)}return r},e.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},e.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.channelId&&e.hasOwnProperty("channelId")&&!d.isString(e.channelId)?"channelId: string expected":null},e.fromObject=function(e){if(e instanceof p.bin_proto.GetChannelInviteKeysParam)return e;var t=new p.bin_proto.GetChannelInviteKeysParam;return null!=e.channelId&&(t.channelId=String(e.channelId)),t},e.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.channelId=""),null!=e.channelId&&e.hasOwnProperty("channelId")&&(n.channelId=e.channelId),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,l.util.toJSONOptions)},e}(),i.GetChannelInviteKeyParam=function(){function e(e){if(e)for(var t=Object.keys(e),n=0;n>>3){case 1:r.channelId=e.string();break;case 2:r.key=e.string();break;default:e.skipType(7&o)}}return r},e.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},e.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.channelId&&e.hasOwnProperty("channelId")&&!d.isString(e.channelId)?"channelId: string expected":null!=e.key&&e.hasOwnProperty("key")&&!d.isString(e.key)?"key: string expected":null},e.fromObject=function(e){if(e instanceof p.bin_proto.GetChannelInviteKeyParam)return e;var t=new p.bin_proto.GetChannelInviteKeyParam;return null!=e.channelId&&(t.channelId=String(e.channelId)),null!=e.key&&(t.key=String(e.key)),t},e.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.channelId="",n.key=""),null!=e.channelId&&e.hasOwnProperty("channelId")&&(n.channelId=e.channelId),null!=e.key&&e.hasOwnProperty("key")&&(n.key=e.key),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,l.util.toJSONOptions)},e}(),i.RevokeChannelInviteKeyParam=function(){function e(e){if(this.keys=[],e)for(var t=Object.keys(e),n=0;n>>3){case 1:r.channelId=e.string();break;case 2:r.keys&&r.keys.length||(r.keys=[]),r.keys.push(e.string());break;default:e.skipType(7&o)}}return r},e.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.channelId&&e.hasOwnProperty("channelId")&&!d.isString(e.channelId))return"channelId: string expected";if(null!=e.keys&&e.hasOwnProperty("keys")){if(!Array.isArray(e.keys))return"keys: array expected";for(var t=0;t>>3){case 1:r.channelId=e.string();break;case 2:r.keys&&r.keys.length||(r.keys=[]),r.keys.push(e.string());break;default:e.skipType(7&o)}}return r},e.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.channelId&&e.hasOwnProperty("channelId")&&!d.isString(e.channelId))return"channelId: string expected";if(null!=e.keys&&e.hasOwnProperty("keys")){if(!Array.isArray(e.keys))return"keys: array expected";for(var t=0;t>>3==1?r.channelId=e.string():e.skipType(7&o)}return r},e.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},e.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.channelId&&e.hasOwnProperty("channelId")&&!d.isString(e.channelId)?"channelId: string expected":null},e.fromObject=function(e){if(e instanceof p.bin_proto.GetRevokedChannelInviteKeysParam)return e;var t=new p.bin_proto.GetRevokedChannelInviteKeysParam;return null!=e.channelId&&(t.channelId=String(e.channelId)),t},e.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.channelId=""),null!=e.channelId&&e.hasOwnProperty("channelId")&&(n.channelId=e.channelId),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,l.util.toJSONOptions)},e}(),i.ChannelInviteKeyResponse=function(){function e(e){if(e)for(var t=Object.keys(e),n=0;n>>3){case 1:r.event=e.int32();break;case 2:r.id=e.string();break;case 3:r.createResponse=p.bin_proto.CreateChannelInviteKeyResponse.decode(e,e.uint32());break;case 4:r.getInviteKeyResponse=p.bin_proto.GetChannelInviteKeyResponse.decode(e,e.uint32());break;case 5:r.getInviteKeysResponse=p.bin_proto.GetChannelInviteKeysResponse.decode(e,e.uint32());break;case 6:r.getRevokedResponse=p.bin_proto.GetRevokedChannelInviteKeysResponse.decode(e,e.uint32());break;case 7:r.regenerateInviteKeyResponse=p.bin_proto.RegenerateChannelInviteKeyResponse.decode(e,e.uint32());break;default:e.skipType(7&o)}}return r},e.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!=typeof e||null===e)return"object expected";var t={};if(null!=e.event&&e.hasOwnProperty("event"))switch(e.event){default:return"event: enum value expected";case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:}if(null!=e.id&&e.hasOwnProperty("id")&&!d.isString(e.id))return"id: string expected";if(null!=e.createResponse&&e.hasOwnProperty("createResponse")&&(t.ResponseData=1,n=p.bin_proto.CreateChannelInviteKeyResponse.verify(e.createResponse)))return"createResponse."+n;if(null!=e.getInviteKeyResponse&&e.hasOwnProperty("getInviteKeyResponse")){if(1===t.ResponseData)return"ResponseData: multiple values";if(t.ResponseData=1,n=p.bin_proto.GetChannelInviteKeyResponse.verify(e.getInviteKeyResponse))return"getInviteKeyResponse."+n}if(null!=e.getInviteKeysResponse&&e.hasOwnProperty("getInviteKeysResponse")){if(1===t.ResponseData)return"ResponseData: multiple values";if(t.ResponseData=1,n=p.bin_proto.GetChannelInviteKeysResponse.verify(e.getInviteKeysResponse))return"getInviteKeysResponse."+n}if(null!=e.getRevokedResponse&&e.hasOwnProperty("getRevokedResponse")){if(1===t.ResponseData)return"ResponseData: multiple values";if(t.ResponseData=1,n=p.bin_proto.GetRevokedChannelInviteKeysResponse.verify(e.getRevokedResponse))return"getRevokedResponse."+n}if(null!=e.regenerateInviteKeyResponse&&e.hasOwnProperty("regenerateInviteKeyResponse")){if(1===t.ResponseData)return"ResponseData: multiple values";var n;if(t.ResponseData=1,n=p.bin_proto.RegenerateChannelInviteKeyResponse.verify(e.regenerateInviteKeyResponse))return"regenerateInviteKeyResponse."+n}return null},e.fromObject=function(e){if(e instanceof p.bin_proto.ChannelInviteKeyResponse)return e;var t=new p.bin_proto.ChannelInviteKeyResponse;switch(e.event){case"CREATE_CHANNEL_INVITE_KEY":case 0:t.event=0;break;case"UPDATE_CHANNEL_INVITE_KEY":case 1:t.event=1;break;case"GET_CHANNEL_INVITE_KEY":case 2:t.event=2;break;case"GET_CHANNEL_INVITE_KEYS":case 3:t.event=3;break;case"REGENERATE_CHANNEL_INVITE_KEY":case 4:t.event=4;break;case"REVOKE_CHANNEL_INVITE_KEY":case 5:t.event=5;break;case"DELETE_REVOKED_CHANNEL_INVITE_KEY":case 6:t.event=6;break;case"GET_REVOKED_CHANNEL_INVITE_KEYS":case 7:t.event=7}if(null!=e.id&&(t.id=String(e.id)),null!=e.createResponse){if("object"!=typeof e.createResponse)throw TypeError(".bin_proto.ChannelInviteKeyResponse.createResponse: object expected");t.createResponse=p.bin_proto.CreateChannelInviteKeyResponse.fromObject(e.createResponse)}if(null!=e.getInviteKeyResponse){if("object"!=typeof e.getInviteKeyResponse)throw TypeError(".bin_proto.ChannelInviteKeyResponse.getInviteKeyResponse: object expected");t.getInviteKeyResponse=p.bin_proto.GetChannelInviteKeyResponse.fromObject(e.getInviteKeyResponse)}if(null!=e.getInviteKeysResponse){if("object"!=typeof e.getInviteKeysResponse)throw TypeError(".bin_proto.ChannelInviteKeyResponse.getInviteKeysResponse: object expected");t.getInviteKeysResponse=p.bin_proto.GetChannelInviteKeysResponse.fromObject(e.getInviteKeysResponse)}if(null!=e.getRevokedResponse){if("object"!=typeof e.getRevokedResponse)throw TypeError(".bin_proto.ChannelInviteKeyResponse.getRevokedResponse: object expected");t.getRevokedResponse=p.bin_proto.GetRevokedChannelInviteKeysResponse.fromObject(e.getRevokedResponse)}if(null!=e.regenerateInviteKeyResponse){if("object"!=typeof e.regenerateInviteKeyResponse)throw TypeError(".bin_proto.ChannelInviteKeyResponse.regenerateInviteKeyResponse: object expected");t.regenerateInviteKeyResponse=p.bin_proto.RegenerateChannelInviteKeyResponse.fromObject(e.regenerateInviteKeyResponse)}return t},e.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.event=t.enums===String?"CREATE_CHANNEL_INVITE_KEY":0,n.id=""),null!=e.event&&e.hasOwnProperty("event")&&(n.event=t.enums===String?p.bin_proto.ChannelInviteKeyRequestEvent[e.event]:e.event),null!=e.id&&e.hasOwnProperty("id")&&(n.id=e.id),null!=e.createResponse&&e.hasOwnProperty("createResponse")&&(n.createResponse=p.bin_proto.CreateChannelInviteKeyResponse.toObject(e.createResponse,t),t.oneofs&&(n.ResponseData="createResponse")),null!=e.getInviteKeyResponse&&e.hasOwnProperty("getInviteKeyResponse")&&(n.getInviteKeyResponse=p.bin_proto.GetChannelInviteKeyResponse.toObject(e.getInviteKeyResponse,t),t.oneofs&&(n.ResponseData="getInviteKeyResponse")),null!=e.getInviteKeysResponse&&e.hasOwnProperty("getInviteKeysResponse")&&(n.getInviteKeysResponse=p.bin_proto.GetChannelInviteKeysResponse.toObject(e.getInviteKeysResponse,t),t.oneofs&&(n.ResponseData="getInviteKeysResponse")),null!=e.getRevokedResponse&&e.hasOwnProperty("getRevokedResponse")&&(n.getRevokedResponse=p.bin_proto.GetRevokedChannelInviteKeysResponse.toObject(e.getRevokedResponse,t),t.oneofs&&(n.ResponseData="getRevokedResponse")),null!=e.regenerateInviteKeyResponse&&e.hasOwnProperty("regenerateInviteKeyResponse")&&(n.regenerateInviteKeyResponse=p.bin_proto.RegenerateChannelInviteKeyResponse.toObject(e.regenerateInviteKeyResponse,t),t.oneofs&&(n.ResponseData="regenerateInviteKeyResponse")),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,l.util.toJSONOptions)},e}(),i.ChannelInviteKey=function(){function e(e){if(e)for(var t=Object.keys(e),n=0;n>>3){case 1:r.key=e.string();break;case 2:r.channelId=e.string();break;case 3:r.createdBy=p.bin_proto.Member.decode(e,e.uint32());break;case 4:r.maxUses=e.int32();break;case 5:r.expiresAt=e.int64();break;case 6:r.revoked=e.bool();break;case 7:r.revokedAt=e.int64();break;case 8:r.accessPriorHistory=e.bool();break;case 9:r.isPrimary=e.bool();break;default:e.skipType(7&o)}}return r},e.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.key&&e.hasOwnProperty("key")&&!d.isString(e.key))return"key: string expected";if(null!=e.channelId&&e.hasOwnProperty("channelId")&&!d.isString(e.channelId))return"channelId: string expected";if(null!=e.createdBy&&e.hasOwnProperty("createdBy")){var t=p.bin_proto.Member.verify(e.createdBy);if(t)return"createdBy."+t}return null!=e.maxUses&&e.hasOwnProperty("maxUses")&&!d.isInteger(e.maxUses)?"maxUses: integer expected":null!=e.expiresAt&&e.hasOwnProperty("expiresAt")&&!(d.isInteger(e.expiresAt)||e.expiresAt&&d.isInteger(e.expiresAt.low)&&d.isInteger(e.expiresAt.high))?"expiresAt: integer|Long expected":null!=e.revoked&&e.hasOwnProperty("revoked")&&"boolean"!=typeof e.revoked?"revoked: boolean expected":null!=e.revokedAt&&e.hasOwnProperty("revokedAt")&&!(d.isInteger(e.revokedAt)||e.revokedAt&&d.isInteger(e.revokedAt.low)&&d.isInteger(e.revokedAt.high))?"revokedAt: integer|Long expected":null!=e.accessPriorHistory&&e.hasOwnProperty("accessPriorHistory")&&"boolean"!=typeof e.accessPriorHistory?"accessPriorHistory: boolean expected":null!=e.isPrimary&&e.hasOwnProperty("isPrimary")&&"boolean"!=typeof e.isPrimary?"isPrimary: boolean expected":null},e.fromObject=function(e){if(e instanceof p.bin_proto.ChannelInviteKey)return e;var t=new p.bin_proto.ChannelInviteKey;if(null!=e.key&&(t.key=String(e.key)),null!=e.channelId&&(t.channelId=String(e.channelId)),null!=e.createdBy){if("object"!=typeof e.createdBy)throw TypeError(".bin_proto.ChannelInviteKey.createdBy: object expected");t.createdBy=p.bin_proto.Member.fromObject(e.createdBy)}return null!=e.maxUses&&(t.maxUses=0|e.maxUses),null!=e.expiresAt&&(d.Long?(t.expiresAt=d.Long.fromValue(e.expiresAt)).unsigned=!1:"string"==typeof e.expiresAt?t.expiresAt=parseInt(e.expiresAt,10):"number"==typeof e.expiresAt?t.expiresAt=e.expiresAt:"object"==typeof e.expiresAt&&(t.expiresAt=new d.LongBits(e.expiresAt.low>>>0,e.expiresAt.high>>>0).toNumber())),null!=e.revoked&&(t.revoked=Boolean(e.revoked)),null!=e.revokedAt&&(d.Long?(t.revokedAt=d.Long.fromValue(e.revokedAt)).unsigned=!1:"string"==typeof e.revokedAt?t.revokedAt=parseInt(e.revokedAt,10):"number"==typeof e.revokedAt?t.revokedAt=e.revokedAt:"object"==typeof e.revokedAt&&(t.revokedAt=new d.LongBits(e.revokedAt.low>>>0,e.revokedAt.high>>>0).toNumber())),null!=e.accessPriorHistory&&(t.accessPriorHistory=Boolean(e.accessPriorHistory)),null!=e.isPrimary&&(t.isPrimary=Boolean(e.isPrimary)),t},e.toObject=function(e,t){t||(t={});var n={};if(t.defaults){if(n.key="",n.channelId="",n.createdBy=null,n.maxUses=0,d.Long){var r=new d.Long(0,0,!1);n.expiresAt=t.longs===String?r.toString():t.longs===Number?r.toNumber():r}else n.expiresAt=t.longs===String?"0":0;n.revoked=!1,d.Long?(r=new d.Long(0,0,!1),n.revokedAt=t.longs===String?r.toString():t.longs===Number?r.toNumber():r):n.revokedAt=t.longs===String?"0":0,n.accessPriorHistory=!1,n.isPrimary=!1}return null!=e.key&&e.hasOwnProperty("key")&&(n.key=e.key),null!=e.channelId&&e.hasOwnProperty("channelId")&&(n.channelId=e.channelId),null!=e.createdBy&&e.hasOwnProperty("createdBy")&&(n.createdBy=p.bin_proto.Member.toObject(e.createdBy,t)),null!=e.maxUses&&e.hasOwnProperty("maxUses")&&(n.maxUses=e.maxUses),null!=e.expiresAt&&e.hasOwnProperty("expiresAt")&&("number"==typeof e.expiresAt?n.expiresAt=t.longs===String?String(e.expiresAt):e.expiresAt:n.expiresAt=t.longs===String?d.Long.prototype.toString.call(e.expiresAt):t.longs===Number?new d.LongBits(e.expiresAt.low>>>0,e.expiresAt.high>>>0).toNumber():e.expiresAt),null!=e.revoked&&e.hasOwnProperty("revoked")&&(n.revoked=e.revoked),null!=e.revokedAt&&e.hasOwnProperty("revokedAt")&&("number"==typeof e.revokedAt?n.revokedAt=t.longs===String?String(e.revokedAt):e.revokedAt:n.revokedAt=t.longs===String?d.Long.prototype.toString.call(e.revokedAt):t.longs===Number?new d.LongBits(e.revokedAt.low>>>0,e.revokedAt.high>>>0).toNumber():e.revokedAt),null!=e.accessPriorHistory&&e.hasOwnProperty("accessPriorHistory")&&(n.accessPriorHistory=e.accessPriorHistory),null!=e.isPrimary&&e.hasOwnProperty("isPrimary")&&(n.isPrimary=e.isPrimary),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,l.util.toJSONOptions)},e}(),i.CreateChannelInviteKeyResponse=function(){function e(e){if(e)for(var t=Object.keys(e),n=0;n>>3==1?r.inviteKey=p.bin_proto.ChannelInviteKey.decode(e,e.uint32()):e.skipType(7&o)}return r},e.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.inviteKey&&e.hasOwnProperty("inviteKey")){var t=p.bin_proto.ChannelInviteKey.verify(e.inviteKey);if(t)return"inviteKey."+t}return null},e.fromObject=function(e){if(e instanceof p.bin_proto.CreateChannelInviteKeyResponse)return e;var t=new p.bin_proto.CreateChannelInviteKeyResponse;if(null!=e.inviteKey){if("object"!=typeof e.inviteKey)throw TypeError(".bin_proto.CreateChannelInviteKeyResponse.inviteKey: object expected");t.inviteKey=p.bin_proto.ChannelInviteKey.fromObject(e.inviteKey)}return t},e.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.inviteKey=null),null!=e.inviteKey&&e.hasOwnProperty("inviteKey")&&(n.inviteKey=p.bin_proto.ChannelInviteKey.toObject(e.inviteKey,t)),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,l.util.toJSONOptions)},e}(),i.RegenerateChannelInviteKeyResponse=function(){function e(e){if(e)for(var t=Object.keys(e),n=0;n>>3==1?r.inviteKey=p.bin_proto.ChannelInviteKey.decode(e,e.uint32()):e.skipType(7&o)}return r},e.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.inviteKey&&e.hasOwnProperty("inviteKey")){var t=p.bin_proto.ChannelInviteKey.verify(e.inviteKey);if(t)return"inviteKey."+t}return null},e.fromObject=function(e){if(e instanceof p.bin_proto.RegenerateChannelInviteKeyResponse)return e;var t=new p.bin_proto.RegenerateChannelInviteKeyResponse;if(null!=e.inviteKey){if("object"!=typeof e.inviteKey)throw TypeError(".bin_proto.RegenerateChannelInviteKeyResponse.inviteKey: object expected");t.inviteKey=p.bin_proto.ChannelInviteKey.fromObject(e.inviteKey)}return t},e.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.inviteKey=null),null!=e.inviteKey&&e.hasOwnProperty("inviteKey")&&(n.inviteKey=p.bin_proto.ChannelInviteKey.toObject(e.inviteKey,t)),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,l.util.toJSONOptions)},e}(),i.GetChannelInviteKeyResponse=function(){function e(e){if(e)for(var t=Object.keys(e),n=0;n>>3==1?r.inviteKey=p.bin_proto.ChannelInviteKey.decode(e,e.uint32()):e.skipType(7&o)}return r},e.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.inviteKey&&e.hasOwnProperty("inviteKey")){var t=p.bin_proto.ChannelInviteKey.verify(e.inviteKey);if(t)return"inviteKey."+t}return null},e.fromObject=function(e){if(e instanceof p.bin_proto.GetChannelInviteKeyResponse)return e;var t=new p.bin_proto.GetChannelInviteKeyResponse;if(null!=e.inviteKey){if("object"!=typeof e.inviteKey)throw TypeError(".bin_proto.GetChannelInviteKeyResponse.inviteKey: object expected");t.inviteKey=p.bin_proto.ChannelInviteKey.fromObject(e.inviteKey)}return t},e.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.inviteKey=null),null!=e.inviteKey&&e.hasOwnProperty("inviteKey")&&(n.inviteKey=p.bin_proto.ChannelInviteKey.toObject(e.inviteKey,t)),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,l.util.toJSONOptions)},e}(),i.GetChannelInviteKeysResponse=function(){function e(e){if(this.inviteKeys=[],e)for(var t=Object.keys(e),n=0;n>>3==1?(r.inviteKeys&&r.inviteKeys.length||(r.inviteKeys=[]),r.inviteKeys.push(p.bin_proto.ChannelInviteKey.decode(e,e.uint32()))):e.skipType(7&o)}return r},e.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.inviteKeys&&e.hasOwnProperty("inviteKeys")){if(!Array.isArray(e.inviteKeys))return"inviteKeys: array expected";for(var t=0;t>>3==1?(r.inviteKeys&&r.inviteKeys.length||(r.inviteKeys=[]),r.inviteKeys.push(p.bin_proto.ChannelInviteKey.decode(e,e.uint32()))):e.skipType(7&o)}return r},e.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.inviteKeys&&e.hasOwnProperty("inviteKeys")){if(!Array.isArray(e.inviteKeys))return"inviteKeys: array expected";for(var t=0;t>>3==1?r.value=e.double():e.skipType(7&o)}return r},e.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},e.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.value&&e.hasOwnProperty("value")&&"number"!=typeof e.value?"value: number expected":null},e.fromObject=function(e){if(e instanceof p.google.protobuf.DoubleValue)return e;var t=new p.google.protobuf.DoubleValue;return null!=e.value&&(t.value=Number(e.value)),t},e.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.value=0),null!=e.value&&e.hasOwnProperty("value")&&(n.value=t.json&&!isFinite(e.value)?String(e.value):e.value),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,l.util.toJSONOptions)},e}(),s.FloatValue=function(){function e(e){if(e)for(var t=Object.keys(e),n=0;n>>3==1?r.value=e.float():e.skipType(7&o)}return r},e.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},e.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.value&&e.hasOwnProperty("value")&&"number"!=typeof e.value?"value: number expected":null},e.fromObject=function(e){if(e instanceof p.google.protobuf.FloatValue)return e;var t=new p.google.protobuf.FloatValue;return null!=e.value&&(t.value=Number(e.value)),t},e.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.value=0),null!=e.value&&e.hasOwnProperty("value")&&(n.value=t.json&&!isFinite(e.value)?String(e.value):e.value),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,l.util.toJSONOptions)},e}(),s.Int64Value=function(){function e(e){if(e)for(var t=Object.keys(e),n=0;n>>3==1?r.value=e.int64():e.skipType(7&o)}return r},e.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},e.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.value&&e.hasOwnProperty("value")&&!(d.isInteger(e.value)||e.value&&d.isInteger(e.value.low)&&d.isInteger(e.value.high))?"value: integer|Long expected":null},e.fromObject=function(e){if(e instanceof p.google.protobuf.Int64Value)return e;var t=new p.google.protobuf.Int64Value;return null!=e.value&&(d.Long?(t.value=d.Long.fromValue(e.value)).unsigned=!1:"string"==typeof e.value?t.value=parseInt(e.value,10):"number"==typeof e.value?t.value=e.value:"object"==typeof e.value&&(t.value=new d.LongBits(e.value.low>>>0,e.value.high>>>0).toNumber())),t},e.toObject=function(e,t){t||(t={});var n={};if(t.defaults)if(d.Long){var r=new d.Long(0,0,!1);n.value=t.longs===String?r.toString():t.longs===Number?r.toNumber():r}else n.value=t.longs===String?"0":0;return null!=e.value&&e.hasOwnProperty("value")&&("number"==typeof e.value?n.value=t.longs===String?String(e.value):e.value:n.value=t.longs===String?d.Long.prototype.toString.call(e.value):t.longs===Number?new d.LongBits(e.value.low>>>0,e.value.high>>>0).toNumber():e.value),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,l.util.toJSONOptions)},e}(),s.UInt64Value=function(){function e(e){if(e)for(var t=Object.keys(e),n=0;n>>3==1?r.value=e.uint64():e.skipType(7&o)}return r},e.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},e.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.value&&e.hasOwnProperty("value")&&!(d.isInteger(e.value)||e.value&&d.isInteger(e.value.low)&&d.isInteger(e.value.high))?"value: integer|Long expected":null},e.fromObject=function(e){if(e instanceof p.google.protobuf.UInt64Value)return e;var t=new p.google.protobuf.UInt64Value;return null!=e.value&&(d.Long?(t.value=d.Long.fromValue(e.value)).unsigned=!0:"string"==typeof e.value?t.value=parseInt(e.value,10):"number"==typeof e.value?t.value=e.value:"object"==typeof e.value&&(t.value=new d.LongBits(e.value.low>>>0,e.value.high>>>0).toNumber(!0))),t},e.toObject=function(e,t){t||(t={});var n={};if(t.defaults)if(d.Long){var r=new d.Long(0,0,!0);n.value=t.longs===String?r.toString():t.longs===Number?r.toNumber():r}else n.value=t.longs===String?"0":0;return null!=e.value&&e.hasOwnProperty("value")&&("number"==typeof e.value?n.value=t.longs===String?String(e.value):e.value:n.value=t.longs===String?d.Long.prototype.toString.call(e.value):t.longs===Number?new d.LongBits(e.value.low>>>0,e.value.high>>>0).toNumber(!0):e.value),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,l.util.toJSONOptions)},e}(),s.Int32Value=function(){function e(e){if(e)for(var t=Object.keys(e),n=0;n>>3==1?r.value=e.int32():e.skipType(7&o)}return r},e.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},e.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.value&&e.hasOwnProperty("value")&&!d.isInteger(e.value)?"value: integer expected":null},e.fromObject=function(e){if(e instanceof p.google.protobuf.Int32Value)return e;var t=new p.google.protobuf.Int32Value;return null!=e.value&&(t.value=0|e.value),t},e.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.value=0),null!=e.value&&e.hasOwnProperty("value")&&(n.value=e.value),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,l.util.toJSONOptions)},e}(),s.UInt32Value=function(){function e(e){if(e)for(var t=Object.keys(e),n=0;n>>3==1?r.value=e.uint32():e.skipType(7&o)}return r},e.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},e.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.value&&e.hasOwnProperty("value")&&!d.isInteger(e.value)?"value: integer expected":null},e.fromObject=function(e){if(e instanceof p.google.protobuf.UInt32Value)return e;var t=new p.google.protobuf.UInt32Value;return null!=e.value&&(t.value=e.value>>>0),t},e.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.value=0),null!=e.value&&e.hasOwnProperty("value")&&(n.value=e.value),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,l.util.toJSONOptions)},e}(),s.BoolValue=function(){function e(e){if(e)for(var t=Object.keys(e),n=0;n>>3==1?r.value=e.bool():e.skipType(7&o)}return r},e.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},e.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.value&&e.hasOwnProperty("value")&&"boolean"!=typeof e.value?"value: boolean expected":null},e.fromObject=function(e){if(e instanceof p.google.protobuf.BoolValue)return e;var t=new p.google.protobuf.BoolValue;return null!=e.value&&(t.value=Boolean(e.value)),t},e.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.value=!1),null!=e.value&&e.hasOwnProperty("value")&&(n.value=e.value),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,l.util.toJSONOptions)},e}(),s.StringValue=function(){function e(e){if(e)for(var t=Object.keys(e),n=0;n>>3==1?r.value=e.string():e.skipType(7&o)}return r},e.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},e.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.value&&e.hasOwnProperty("value")&&!d.isString(e.value)?"value: string expected":null},e.fromObject=function(e){if(e instanceof p.google.protobuf.StringValue)return e;var t=new p.google.protobuf.StringValue;return null!=e.value&&(t.value=String(e.value)),t},e.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.value=""),null!=e.value&&e.hasOwnProperty("value")&&(n.value=e.value),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,l.util.toJSONOptions)},e}(),s.BytesValue=function(){function e(e){if(e)for(var t=Object.keys(e),n=0;n>>3==1?r.value=e.bytes():e.skipType(7&o)}return r},e.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},e.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.value&&e.hasOwnProperty("value")&&!(e.value&&"number"==typeof e.value.length||d.isString(e.value))?"value: buffer expected":null},e.fromObject=function(e){if(e instanceof p.google.protobuf.BytesValue)return e;var t=new p.google.protobuf.BytesValue;return null!=e.value&&("string"==typeof e.value?d.base64.decode(e.value,t.value=d.newBuffer(d.base64.length(e.value)),0):e.value.length&&(t.value=e.value)),t},e.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(t.bytes===String?n.value="":(n.value=[],t.bytes!==Array&&(n.value=d.newBuffer(n.value)))),null!=e.value&&e.hasOwnProperty("value")&&(n.value=t.bytes===String?d.base64.encode(e.value,0,e.value.length):t.bytes===Array?Array.prototype.slice.call(e.value):e.value),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,l.util.toJSONOptions)},e}(),s),a),e.exports=p},3864:e=>{"use strict";e.exports=function(e){return!(!e||!e.__CANCEL__)}},3930:function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function s(e){try{l(r.next(e))}catch(e){i(e)}}function a(e){try{l(r.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}l((r=r.apply(e,t||[])).next())}))},s=this&&this.__generator||function(e,t){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(a){return function(l){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,a[0]&&(s=0)),s;)try{if(n=1,r&&(o=2&a[0]?r.return:a[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,a[1])).done)return o;switch(r=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,r=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!((o=(o=s.trys).length>0&&o[o.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]{"use strict";var r=n(9516);e.exports=r.isStandardBrowserEnv()?{write:function(e,t,n,o,i,s){var a=[];a.push(e+"="+encodeURIComponent(t)),r.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),r.isString(o)&&a.push("path="+o),r.isString(i)&&a.push("domain="+i),!0===s&&a.push("secure"),document.cookie=a.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},4091:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AttachmentBuilder=void 0;var r=n(2273);t.AttachmentBuilder=function(e,t){var n=this;this.id="",this.setName=function(e){return n.name=e,n},this.setMetadata=function(e){return n.metadata=e,n},this.setUpload=function(e){return n.upload=e,n},this.setFileSize=function(e){return n.fileSize=e,n},this.create=function(){return new r.Attachment(n)},this.url=e,this.type=t,this.upload=!1}},4153: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},4198:e=>{"use strict";e.exports=JSON.parse('{"name":"axios","version":"0.21.4","description":"Promise based HTTP client for the browser and node.js","main":"index.js","scripts":{"test":"grunt test","start":"node ./sandbox/server.js","build":"NODE_ENV=production grunt build","preversion":"npm test","version":"npm run build && grunt version && git add -A dist && git add CHANGELOG.md bower.json package.json","postversion":"git push && git push --tags","examples":"node ./examples/server.js","coveralls":"cat coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js","fix":"eslint --fix lib/**/*.js"},"repository":{"type":"git","url":"https://github.com/axios/axios.git"},"keywords":["xhr","http","ajax","promise","node"],"author":"Matt Zabriskie","license":"MIT","bugs":{"url":"https://github.com/axios/axios/issues"},"homepage":"https://axios-http.com","devDependencies":{"coveralls":"^3.0.0","es6-promise":"^4.2.4","grunt":"^1.3.0","grunt-banner":"^0.6.0","grunt-cli":"^1.2.0","grunt-contrib-clean":"^1.1.0","grunt-contrib-watch":"^1.0.0","grunt-eslint":"^23.0.0","grunt-karma":"^4.0.0","grunt-mocha-test":"^0.13.3","grunt-ts":"^6.0.0-beta.19","grunt-webpack":"^4.0.2","istanbul-instrumenter-loader":"^1.0.0","jasmine-core":"^2.4.1","karma":"^6.3.2","karma-chrome-launcher":"^3.1.0","karma-firefox-launcher":"^2.1.0","karma-jasmine":"^1.1.1","karma-jasmine-ajax":"^0.1.13","karma-safari-launcher":"^1.0.0","karma-sauce-launcher":"^4.3.6","karma-sinon":"^1.0.5","karma-sourcemap-loader":"^0.3.8","karma-webpack":"^4.0.2","load-grunt-tasks":"^3.5.2","minimist":"^1.2.0","mocha":"^8.2.1","sinon":"^4.5.0","terser-webpack-plugin":"^4.2.3","typescript":"^4.0.5","url-search-params":"^0.10.0","webpack":"^4.44.2","webpack-dev-server":"^3.11.0"},"browser":{"./lib/adapters/http.js":"./lib/adapters/xhr.js"},"jsdelivr":"dist/axios.min.js","unpkg":"dist/axios.min.js","typings":"./index.d.ts","dependencies":{"follow-redirects":"^1.14.0"},"bundlesize":[{"path":"./dist/axios.min.js","threshold":"5kB"}]}')},4202:(e,t,n)=>{"use strict";var r=n(9516);e.exports=r.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");function o(e){var r=e;return t&&(n.setAttribute("href",r),r=n.href),n.setAttribute("href",r),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:"/"===n.pathname.charAt(0)?n.pathname:"/"+n.pathname}}return e=o(window.location.href),function(t){var n=r.isString(t)?o(t):t;return n.protocol===e.protocol&&n.host===e.host}}():function(){return!0}},4358:e=>{"use strict";function t(){this._listeners={}}e.exports=t,t.prototype.on=function(e,t,n){return(this._listeners[e]||(this._listeners[e]=[])).push({fn:t,ctx:n||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 n=this._listeners[e],r=0;r0&&o[o.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ReactionTotal=void 0;t.ReactionTotal=function(e){this.key=e.key,this.score=e.score,this.count=e.count}},4394:(e,t,n)=>{"use strict";var r=t;function o(){r.util._configure(),r.Writer._configure(r.BufferWriter),r.Reader._configure(r.BufferReader)}r.build="minimal",r.Writer=n(3449),r.BufferWriter=n(818),r.Reader=n(6237),r.BufferReader=n(3158),r.util=n(3610),r.rpc=n(5047),r.roots=n(4529),r.configure=o,o()},4490:(e,t,n)=>{"use strict";var r=n(9516),o=n(2881),i=n(3864),s=n(6987);function a(e){e.cancelToken&&e.cancelToken.throwIfRequested()}e.exports=function(e){return a(e),e.headers=e.headers||{},e.data=o.call(e,e.data,e.headers,e.transformRequest),e.headers=r.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),r.forEach(["delete","get","head","post","put","patch","common"],(function(t){delete e.headers[t]})),(e.adapter||s.adapter)(e).then((function(t){return a(e),t.data=o.call(e,t.data,t.headers,e.transformResponse),t}),(function(t){return i(t)||(a(e),t&&t.response&&(t.response.data=o.call(e,t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)}))}},4522:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function s(e){try{l(r.next(e))}catch(e){i(e)}}function a(e){try{l(r.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}l((r=r.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(a){return function(l){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,a[0]&&(s=0)),s;)try{if(n=1,r&&(o=2&a[0]?r.return:a[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,a[1])).done)return o;switch(r=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,r=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!((o=(o=s.trys).length>0&&o[o.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]{"use strict";e.exports={}},4655:function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function s(e){try{l(r.next(e))}catch(e){i(e)}}function a(e){try{l(r.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}l((r=r.apply(e,t||[])).next())}))},s=this&&this.__generator||function(e,t){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(a){return function(l){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,a[0]&&(s=0)),s;)try{if(n=1,r&&(o=2&a[0]?r.return:a[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,a[1])).done)return o;switch(r=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,r=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!((o=(o=s.trys).length>0&&o[o.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]{"use strict";e.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},4744:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.PinnedMessage=void 0;var o=r(n(8570)),i=n(4799);t.PinnedMessage=function(e){var t,n,r,s,a;this.id=e.id,this.message=e.message,this.pinType=null!==(r=null!==(t=e.pinType)&&void 0!==t?t:null===(n=this.message.pinDetails)||void 0===n?void 0:n.pinType)&&void 0!==r?r:i.PinnedMessageType.ALL;var l=(null===(a=null===(s=this.message.pinDetails)||void 0===s?void 0:s.pinnedTill)||void 0===a?void 0:a.getTime())||(e.pinTill instanceof o.default?e.pinTill.toNumber():Number(e.pinTill||0));this.pinTill=l?new Date(l):null,this.pinnedBy=e.pinnedBy instanceof i.User?e.pinnedBy:e.pinnedBy?new i.User(e.pinnedBy):null}},4799:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),o(n(9730),t),o(n(7525),t),o(n(9965),t),o(n(6450),t),o(n(3862),t),o(n(5711),t),o(n(1853),t),o(n(7007),t),o(n(3582),t),o(n(1509),t),o(n(9155),t),o(n(6818),t),o(n(2814),t),o(n(5067),t),o(n(8420),t),o(n(1252),t),o(n(1559),t),o(n(7668),t),o(n(7573),t),o(n(9651),t),o(n(2934),t),o(n(5872),t),o(n(9353),t),o(n(8666),t),o(n(1050),t),o(n(5948),t),o(n(4522),t),o(n(2576),t),o(n(8077),t),o(n(1675),t),o(n(291),t),o(n(2969),t),o(n(463),t),o(n(2685),t),o(n(842),t),o(n(4655),t),o(n(5485),t),o(n(1e3),t),o(n(6690),t),o(n(987),t),o(n(9245),t),o(n(4818),t),o(n(2273),t),o(n(4091),t),o(n(2656),t),o(n(3664),t),o(n(1727),t),o(n(3478),t),o(n(8576),t),o(n(4376),t),o(n(2274),t),o(n(5646),t),o(n(1592),t),o(n(526),t),o(n(984),t),o(n(2948),t),o(n(8699),t),o(n(6920),t),o(n(3240),t),o(n(6254),t),o(n(2712),t),o(n(1376),t),o(n(1446),t),o(n(4383),t),o(n(431),t),o(n(7257),t),o(n(9286),t),o(n(5780),t),o(n(4744),t),o(n(5500),t),o(n(3018),t)},4818:function(e,t){"use strict";var n,r=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.SceytChatError=void 0;var o=function(e){function t(t,n,r,o){var i=e.call(this,t)||this;return i.type=r,i.code=n,i.traceId=o,i.name="SceytChatError",i}return r(t,e),t}(Error);t.SceytChatError=o},4841:(e,t,n)=>{"use strict";var r=n(4198),o={};["object","boolean","number","function","string","symbol"].forEach((function(e,t){o[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}}));var i={},s=r.version.split(".");function a(e,t){for(var n=t?t.split("."):s,r=e.split("."),o=0;o<3;o++){if(n[o]>r[o])return!0;if(n[o]0;){var i=r[o],s=t[i];if(s){var a=e[i],l=void 0===a||s(a,i,e);if(!0!==l)throw new TypeError("option "+i+" must be "+l)}else if(!0!==n)throw Error("Unknown option "+i)}},validators:o}},4863:(e,t,n)=>{"use strict";e.exports=S,S.filename=null,S.defaults={keepCase:!1};var r=n(527),o=n(5330),i=n(7882),s=n(1344),a=n(8252),l=n(1457),c=n(5643),u=n(9687),d=n(8811),p=n(361),f=n(3262),h=/^[1-9][0-9]*$/,y=/^-?[1-9][0-9]*$/,g=/^0[x][0-9a-fA-F]+$/,m=/^-?0[x][0-9a-fA-F]+$/,b=/^0[0-7]+$/,v=/^-?0[0-7]+$/,O=/^(?![eE])[0-9]*(?:\.[0-9]*)?(?:[eE][+-]?[0-9]+)?$/,w=/^[a-zA-Z_][a-zA-Z_0-9]*$/,I=/^(?:\.?[a-zA-Z_][a-zA-Z_0-9]*)(?:\.[a-zA-Z_][a-zA-Z_0-9]*)*$/,P=/^(?:\.[a-zA-Z_][a-zA-Z_0-9]*)+$/;function S(e,t,n){t instanceof o||(n=t,t=new o),n||(n=S.defaults);var _,A,k,j,E,C=n.preferTrailingComment||!1,x=r(e,n.alternateCommentMode||!1),T=x.next,N=x.push,M=x.peek,L=x.skip,R=x.cmnt,D=!0,B=!1,U=t,V=n.keepCase?function(e){return e}:f.camelCase;function K(e,t,n){var r=S.filename;return n||(S.filename=null),Error("illegal "+(t||"token")+" '"+e+"' ("+(r?r+", ":"")+"line "+x.line+")")}function Q(){var e,t=[];do{if('"'!==(e=T())&&"'"!==e)throw K(e);t.push(T()),L(e),e=M()}while('"'===e||"'"===e);return t.join("")}function H(e){var t=T();switch(t){case"'":case'"':return N(t),Q();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(h.test(e))return t*parseInt(e,10);if(g.test(e))return t*parseInt(e,16);if(b.test(e))return t*parseInt(e,8);if(O.test(e))return t*parseFloat(e);throw K(e,"number",!0)}(t)}catch(n){if(e&&I.test(t))return t;throw K(t,"value")}}function F(e,t){var n,r;do{!t||'"'!==(n=M())&&"'"!==n?e.push([r=G(T()),L("to",!0)?G(T()):r]):e.push(Q())}while(L(",",!0));L(";")}function G(e,t){switch(e){case"max":case"MAX":case"Max":return 536870911;case"0":return 0}if(!t&&"-"===e.charAt(0))throw K(e,"id");if(y.test(e))return parseInt(e,10);if(m.test(e))return parseInt(e,16);if(v.test(e))return parseInt(e,8);throw K(e,"id")}function J(){if(void 0!==_)throw K("package");if(_=T(),!I.test(_))throw K(_,"name");U=U.define(_),L(";")}function q(){var e,t=M();switch(t){case"weak":e=k||(k=[]),T();break;case"public":T();default:e=A||(A=[])}t=Q(),L(";"),e.push(t)}function Y(){if(L("="),j=Q(),!(B="proto3"===j)&&"proto2"!==j)throw K(j,"syntax");L(";")}function z(e,t){switch(t){case"option":return Z(e,t),L(";"),!0;case"message":return function(e,t){if(!w.test(t=T()))throw K(t,"type name");var n=new i(t);W(n,(function(e){if(!z(n,e))switch(e){case"map":!function(e){L("<");var t=T();if(void 0===p.mapKey[t])throw K(t,"type");L(",");var n=T();if(!I.test(n))throw K(n,"type");L(">");var r=T();if(!w.test(r))throw K(r,"name");L("=");var o=new a(V(r),G(T()),t,n);W(o,(function(e){if("option"!==e)throw K(e);Z(o,e),L(";")}),(function(){te(o)})),e.add(o)}(n);break;case"required":case"repeated":$(n,e);break;case"optional":$(n,B?"proto3_optional":"optional");break;case"oneof":!function(e,t){if(!w.test(t=T()))throw K(t,"name");var n=new l(V(t));W(n,(function(e){"option"===e?(Z(n,e),L(";")):(N(e),$(n,"optional"))})),e.add(n)}(n,e);break;case"extensions":F(n.extensions||(n.extensions=[]));break;case"reserved":F(n.reserved||(n.reserved=[]),!0);break;default:if(!B||!I.test(e))throw K(e);N(e),$(n,"optional")}})),e.add(n)}(e,t),!0;case"enum":return function(e,t){if(!w.test(t=T()))throw K(t,"name");var n=new c(t);W(n,(function(e){switch(e){case"option":Z(n,e),L(";");break;case"reserved":F(n.reserved||(n.reserved=[]),!0);break;default:!function(e,t){if(!w.test(t))throw K(t,"name");L("=");var n=G(T(),!0),r={};W(r,(function(e){if("option"!==e)throw K(e);Z(r,e),L(";")}),(function(){te(r)})),e.add(t,n,r.comment)}(n,e)}})),e.add(n)}(e,t),!0;case"service":return function(e,t){if(!w.test(t=T()))throw K(t,"service name");var n=new u(t);W(n,(function(e){if(!z(n,e)){if("rpc"!==e)throw K(e);!function(e,t){var n=R(),r=t;if(!w.test(t=T()))throw K(t,"name");var o,i,s,a,l=t;if(L("("),L("stream",!0)&&(i=!0),!I.test(t=T()))throw K(t);if(o=t,L(")"),L("returns"),L("("),L("stream",!0)&&(a=!0),!I.test(t=T()))throw K(t);s=t,L(")");var c=new d(l,r,o,s,i,a);c.comment=n,W(c,(function(e){if("option"!==e)throw K(e);Z(c,e),L(";")})),e.add(c)}(n,e)}})),e.add(n)}(e,t),!0;case"extend":return function(e,t){if(!I.test(t=T()))throw K(t,"reference");var n=t;W(null,(function(t){switch(t){case"required":case"repeated":$(e,t,n);break;case"optional":$(e,B?"proto3_optional":"optional",n);break;default:if(!B||!I.test(t))throw K(t);N(t),$(e,"optional",n)}}))}(e,t),!0}return!1}function W(e,t,n){var r=x.line;if(e&&("string"!=typeof e.comment&&(e.comment=R()),e.filename=S.filename),L("{",!0)){for(var o;"}"!==(o=T());)t(o);L(";",!0)}else n&&n(),L(";"),e&&("string"!=typeof e.comment||C)&&(e.comment=R(r)||e.comment)}function $(e,t,n){var r=T();if("group"!==r){if(!I.test(r))throw K(r,"type");var o=T();if(!w.test(o))throw K(o,"name");o=V(o),L("=");var a=new s(o,G(T()),r,t,n);if(W(a,(function(e){if("option"!==e)throw K(e);Z(a,e),L(";")}),(function(){te(a)})),"proto3_optional"===t){var c=new l("_"+o);a.setOption("proto3_optional",!0),c.add(a),e.add(c)}else e.add(a);B||!a.repeated||void 0===p.packed[r]&&void 0!==p.basic[r]||a.setOption("packed",!1,!0)}else!function(e,t){var n=T();if(!w.test(n))throw K(n,"name");var r=f.lcFirst(n);n===r&&(n=f.ucFirst(n)),L("=");var o=G(T()),a=new i(n);a.group=!0;var l=new s(r,o,n,t);l.filename=S.filename,W(a,(function(e){switch(e){case"option":Z(a,e),L(";");break;case"required":case"repeated":$(a,e);break;case"optional":$(a,B?"proto3_optional":"optional");break;default:throw K(e)}})),e.add(a).add(l)}(e,t)}function Z(e,t){var n=L("(",!0);if(!I.test(t=T()))throw K(t,"name");var r,o=t,i=o;n&&(L(")"),i=o="("+o+")",t=M(),P.test(t)&&(r=t.substr(1),o+=t,T())),L("="),function(e,t,n,r){e.setParsedOption&&e.setParsedOption(t,n,r)}(e,i,X(e,o),r)}function X(e,t){if(L("{",!0)){for(var n={};!L("}",!0);){if(!w.test(E=T()))throw K(E,"name");var r,o=E;"{"===M()?r=X(e,t+"."+E):(L(":"),"{"===M()?r=X(e,t+"."+E):(r=H(!0),ee(e,t+"."+E,r)));var i=n[o];i&&(r=[].concat(i).concat(r)),n[o]=r,L(",",!0)}return n}var s=H(!0);return ee(e,t,s),s}function ee(e,t,n){e.setOption&&e.setOption(t,n)}function te(e){if(L("[",!0)){do{Z(e,"option")}while(L(",",!0));L("]")}return e}for(;null!==(E=T());)switch(E){case"package":if(!D)throw K(E);J();break;case"import":if(!D)throw K(E);q();break;case"syntax":if(!D)throw K(E);Y();break;case"option":Z(U,E),L(";");break;default:if(z(U,E)){D=!1;continue}throw K(E)}return S.filename=null,{package:_,imports:A,weakImports:k,syntax:j,root:t}}},5019:e=>{"use strict";e.exports=function(e){return"object"==typeof e&&!0===e.isAxiosError}},5047:(e,t,n)=>{"use strict";t.Service=n(7595)},5067:function(e,t,n){"use strict";var r=this&&this.__assign||function(){return r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0&&o[o.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]{"use strict";e.exports=r;var t,n=/\/|\./;function r(e,t){n.test(e)||(e="google/protobuf/"+e+".proto",t={nested:{google:{nested:{protobuf:{nested:t}}}}}),r[e]=t}r("any",{Any:{fields:{type_url:{type:"string",id:1},value:{type:"bytes",id:2}}}}),r("duration",{Duration:t={fields:{seconds:{type:"int64",id:1},nanos:{type:"int32",id:2}}}}),r("timestamp",{Timestamp:t}),r("empty",{Empty:{fields:{}}}),r("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}}}}),r("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}}}}),r("field_mask",{FieldMask:{fields:{paths:{rule:"repeated",type:"string",id:1}}}}),r.get=function(e){return r[e]||null}},5155:(e,t,n)=>{"use strict";var r=n(9516),o=n(9106),i=n(3471),s=n(4490),a=n(5343),l=n(4841),c=l.validators;function u(e){this.defaults=e,this.interceptors={request:new i,response:new i}}u.prototype.request=function(e){"string"==typeof e?(e=arguments[1]||{}).url=arguments[0]:e=e||{},(e=a(this.defaults,e)).method?e.method=e.method.toLowerCase():this.defaults.method?e.method=this.defaults.method.toLowerCase():e.method="get";var t=e.transitional;void 0!==t&&l.assertOptions(t,{silentJSONParsing:c.transitional(c.boolean,"1.0.0"),forcedJSONParsing:c.transitional(c.boolean,"1.0.0"),clarifyTimeoutError:c.transitional(c.boolean,"1.0.0")},!1);var n=[],r=!0;this.interceptors.request.forEach((function(t){"function"==typeof t.runWhen&&!1===t.runWhen(e)||(r=r&&t.synchronous,n.unshift(t.fulfilled,t.rejected))}));var o,i=[];if(this.interceptors.response.forEach((function(e){i.push(e.fulfilled,e.rejected)})),!r){var u=[s,void 0];for(Array.prototype.unshift.apply(u,n),u=u.concat(i),o=Promise.resolve(e);u.length;)o=o.then(u.shift(),u.shift());return o}for(var d=e;n.length;){var p=n.shift(),f=n.shift();try{d=p(d)}catch(e){f(e);break}}try{o=s(d)}catch(e){return Promise.reject(e)}for(;i.length;)o=o.then(i.shift(),i.shift());return o},u.prototype.getUri=function(e){return e=a(this.defaults,e),o(e.url,e.params,e.paramsSerializer).replace(/^\?/,"")},r.forEach(["delete","get","head","options"],(function(e){u.prototype[e]=function(t,n){return this.request(a(n||{},{method:e,url:t,data:(n||{}).data}))}})),r.forEach(["post","put","patch"],(function(e){u.prototype[e]=function(t,n,r){return this.request(a(r||{},{method:e,url:t,data:n}))}})),e.exports=u},5212:(e,t,n)=>{"use strict";e.exports=i;var r=n(8045),o=n(4153)("fs");function i(e,t,n){return"function"==typeof t?(n=t,t={}):t||(t={}),n?!t.xhr&&o&&o.readFile?o.readFile(e,(function(r,o){return r&&"undefined"!=typeof XMLHttpRequest?i.xhr(e,t,n):r?n(r):n(null,t.binary?o:o.toString("utf8"))})):i.xhr(e,t,n):r(i,this,e,t)}i.xhr=function(e,t,n){var r=new XMLHttpRequest;r.onreadystatechange=function(){if(4===r.readyState){if(0!==r.status&&200!==r.status)return n(Error("status "+r.status));if(t.binary){var e=r.response;if(!e){e=[];for(var o=0;o{"use strict";var r=e.exports=n(4394);r.build="light",r.load=function(e,t,n){return"function"==typeof t?(n=t,t=new r.Root):t||(t=new r.Root),t.load(e,n)},r.loadSync=function(e,t){return t||(t=new r.Root),t.loadSync(e)},r.encoder=n(1080),r.decoder=n(7728),r.verifier=n(420),r.converter=n(744),r.ReflectionObject=n(7209),r.Namespace=n(8923),r.Root=n(5330),r.Enum=n(5643),r.Type=n(7882),r.Field=n(1344),r.OneOf=n(1457),r.MapField=n(8252),r.Service=n(9687),r.Method=n(8811),r.Message=n(2551),r.wrappers=n(6434),r.types=n(361),r.util=n(3262),r.ReflectionObject._configure(r.Root),r.Namespace._configure(r.Type,r.Service,r.Enum),r.Root._configure(r.Type),r.Field._configure(r.Type)},5330:(e,t,n)=>{"use strict";e.exports=d;var r=n(8923);((d.prototype=Object.create(r.prototype)).constructor=d).className="Root";var o,i,s,a=n(1344),l=n(5643),c=n(1457),u=n(3262);function d(e){r.call(this,"",e),this.deferred=[],this.files=[]}function p(){}d.fromJSON=function(e,t){return t||(t=new d),e.options&&t.setOptions(e.options),t.addJSON(e.nested)},d.prototype.resolvePath=u.path.resolve,d.prototype.fetch=u.fetch,d.prototype.load=function e(t,n,r){"function"==typeof n&&(r=n,n=void 0);var o=this;if(!r)return u.asPromise(e,o,t,n);var a=r===p;function l(e,t){if(r){var n=r;if(r=null,a)throw e;n(e,t)}}function c(e){var t=e.lastIndexOf("google/protobuf/");if(t>-1){var n=e.substring(t);if(n in s)return n}return null}function d(e,t){try{if(u.isString(t)&&"{"===t.charAt(0)&&(t=JSON.parse(t)),u.isString(t)){i.filename=e;var r,s=i(t,o,n),d=0;if(s.imports)for(;d-1))if(o.files.push(e),e in s)a?d(e,s[e]):(++h,setTimeout((function(){--h,d(e,s[e])})));else if(a){var n;try{n=u.fs.readFileSync(e).toString("utf8")}catch(e){return void(t||l(e))}d(e,n)}else++h,o.fetch(e,(function(n,i){--h,r&&(n?t?h||l(null,o):l(n):d(e,i))}))}var h=0;u.isString(t)&&(t=[t]);for(var y,g=0;g-1&&this.deferred.splice(t,1)}}else if(e instanceof l)f.test(e.name)&&delete e.parent[e.name];else if(e instanceof r){for(var n=0;n{"use strict";var r=n(9516);e.exports=function(e,t){t=t||{};var n={},o=["url","method","data"],i=["headers","auth","proxy","params"],s=["baseURL","transformRequest","transformResponse","paramsSerializer","timeout","timeoutMessage","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","decompress","maxContentLength","maxBodyLength","maxRedirects","transport","httpAgent","httpsAgent","cancelToken","socketPath","responseEncoding"],a=["validateStatus"];function l(e,t){return r.isPlainObject(e)&&r.isPlainObject(t)?r.merge(e,t):r.isPlainObject(t)?r.merge({},t):r.isArray(t)?t.slice():t}function c(o){r.isUndefined(t[o])?r.isUndefined(e[o])||(n[o]=l(void 0,e[o])):n[o]=l(e[o],t[o])}r.forEach(o,(function(e){r.isUndefined(t[e])||(n[e]=l(void 0,t[e]))})),r.forEach(i,c),r.forEach(s,(function(o){r.isUndefined(t[o])?r.isUndefined(e[o])||(n[o]=l(void 0,e[o])):n[o]=l(void 0,t[o])})),r.forEach(a,(function(r){r in t?n[r]=l(e[r],t[r]):r in e&&(n[r]=l(void 0,e[r]))}));var u=o.concat(i).concat(s).concat(a),d=Object.keys(e).concat(Object.keys(t)).filter((function(e){return-1===u.indexOf(e)}));return r.forEach(d,c),n}},5449:e=>{"use strict";e.exports=function(e,t,n,r,o){return e.config=t,n&&(e.code=n),e.request=r,e.response=o,e.isAxiosError=!0,e.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code}},e}},5485:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function s(e){try{l(r.next(e))}catch(e){i(e)}}function a(e){try{l(r.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}l((r=r.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(a){return function(l){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,a[0]&&(s=0)),s;)try{if(n=1,r&&(o=2&a[0]?r.return:a[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,a[1])).done)return o;switch(r=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,r=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!((o=(o=s.trys).length>0&&o[o.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]=r.length,[2,{users:r,hasNext:this.hasNext}];case 2:return[2,{users:[],hasNext:this.hasNext}];case 3:return[3,5];case 4:throw new i.SceytChatError(i.clientErrors.QUERY_IN_PROGRESS.message,i.clientErrors.QUERY_IN_PROGRESS.code);case 5:return[2]}}))}))},this.filter=e.filter,this.order=e.order,this.query=e.searchQuery,this.index=e.index,this.count=e.count,this.hasNext=e.hasNext}return Object.defineProperty(e.prototype,"limit",{get:function(){return this.count},set:function(e){this.count=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"offset",{get:function(){return this.index},set:function(e){this.index=e},enumerable:!1,configurable:!0}),e}();t.UsersQuery=s},5500:function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function s(e){try{l(r.next(e))}catch(e){i(e)}}function a(e){try{l(r.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}l((r=r.apply(e,t||[])).next())}))},s=this&&this.__generator||function(e,t){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(a){return function(l){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,a[0]&&(s=0)),s;)try{if(n=1,r&&(o=2&a[0]?r.return:a[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,a[1])).done)return o;switch(r=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,r=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!((o=(o=s.trys).length>0&&o[o.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]{"use strict";var r=n(9516),o=n(7522),i=n(3948),s=n(9106),a=n(9615),l=n(2012),c=n(4202),u=n(7763);e.exports=function(e){return new Promise((function(t,n){var d=e.data,p=e.headers,f=e.responseType;r.isFormData(d)&&delete p["Content-Type"];var h=new XMLHttpRequest;if(e.auth){var y=e.auth.username||"",g=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";p.Authorization="Basic "+btoa(y+":"+g)}var m=a(e.baseURL,e.url);function b(){if(h){var r="getAllResponseHeaders"in h?l(h.getAllResponseHeaders()):null,i={data:f&&"text"!==f&&"json"!==f?h.response:h.responseText,status:h.status,statusText:h.statusText,headers:r,config:e,request:h};o(t,n,i),h=null}}if(h.open(e.method.toUpperCase(),s(m,e.params,e.paramsSerializer),!0),h.timeout=e.timeout,"onloadend"in h?h.onloadend=b:h.onreadystatechange=function(){h&&4===h.readyState&&(0!==h.status||h.responseURL&&0===h.responseURL.indexOf("file:"))&&setTimeout(b)},h.onabort=function(){h&&(n(u("Request aborted",e,"ECONNABORTED",h)),h=null)},h.onerror=function(){n(u("Network Error",e,null,h)),h=null},h.ontimeout=function(){var t="timeout of "+e.timeout+"ms exceeded";e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),n(u(t,e,e.transitional&&e.transitional.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",h)),h=null},r.isStandardBrowserEnv()){var v=(e.withCredentials||c(m))&&e.xsrfCookieName?i.read(e.xsrfCookieName):void 0;v&&(p[e.xsrfHeaderName]=v)}"setRequestHeader"in h&&r.forEach(p,(function(e,t){void 0===d&&"content-type"===t.toLowerCase()?delete p[t]:h.setRequestHeader(t,e)})),r.isUndefined(e.withCredentials)||(h.withCredentials=!!e.withCredentials),f&&"json"!==f&&(h.responseType=e.responseType),"function"==typeof e.onDownloadProgress&&h.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&h.upload&&h.upload.addEventListener("progress",e.onUploadProgress),e.cancelToken&&e.cancelToken.promise.then((function(e){h&&(h.abort(),n(e),h=null)})),d||(d=null),h.send(d)}))}},5643:(e,t,n)=>{"use strict";e.exports=s;var r=n(7209);((s.prototype=Object.create(r.prototype)).constructor=s).className="Enum";var o=n(8923),i=n(3262);function s(e,t,n,o,i){if(r.call(this,e,n),t&&"object"!=typeof t)throw TypeError("values must be an object");if(this.valuesById={},this.values=Object.create(this.valuesById),this.comment=o,this.comments=i||{},this.reserved=void 0,t)for(var s=Object.keys(t),a=0;a0&&o[o.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]0&&o[o.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]0&&o[o.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]0?"!".concat(e.join()):"",t},t.filterKey=function(e){return e&&e.length>0&&e.forEach((function(e){if("subject"===e){var n=i.ChannelSearchQueryKey.SUBJECT;t.fieldsMap[n]={key:n,value:{word:t.queryStr,op:i.SearchQueryType.NONE}}}else"uri"===e?(n=i.ChannelSearchQueryKey.URI,t.fieldsMap[n]={key:n,value:{word:t.queryStr,op:i.SearchQueryType.NONE}}):"state"===e?(n=i.ChannelSearchQueryKey.STATE,t.fieldsMap[n]={key:n,value:{word:t.queryStr,op:i.SearchQueryType.NONE}}):"cratedAt"===e&&(n=i.ChannelSearchQueryKey.CREATED_AT,t.fieldsMap[n]={key:n,value:{word:t.queryStr,op:i.SearchQueryType.NONE}})})),t},t.searchOperator=function(e){return"contains"===e?Object.keys(t.fieldsMap).forEach((function(e){t.fieldsMap[e]={key:e,value:{word:t.queryStr,op:i.SearchQueryType.CONTAINS}}})):"beginsWith"===e?Object.keys(t.fieldsMap).forEach((function(e){t.fieldsMap[e]={key:e,value:{word:t.queryStr,op:i.SearchQueryType.BEGINS_WITH}}})):"equal"===e?Object.keys(t.fieldsMap).forEach((function(e){t.fieldsMap[e]={key:e,value:{word:t.queryStr,op:i.SearchQueryType.EQUAL}}})):"lowerThan"===e?Object.keys(t.fieldsMap).forEach((function(e){t.fieldsMap[e]={key:e,value:{word:t.queryStr,op:i.SearchQueryType.LT}}})):"lowerThanOrEqual"===e?Object.keys(t.fieldsMap).forEach((function(e){t.fieldsMap[e]={key:e,value:{word:t.queryStr,op:i.SearchQueryType.LTE}}})):"greaterThan"===e?Object.keys(t.fieldsMap).forEach((function(e){t.fieldsMap[e]={key:e,value:{word:t.queryStr,op:i.SearchQueryType.GT}}})):"greaterThanOrEqual"===e?Object.keys(t.fieldsMap).forEach((function(e){t.fieldsMap[e]={key:e,value:{word:t.queryStr,op:i.SearchQueryType.GTE}}})):"between"===e?Object.keys(t.fieldsMap).forEach((function(e){t.fieldsMap[e]={key:e,value:{word:t.queryStr,op:i.SearchQueryType.BETWEEN}}})):"notIn"===e&&Object.keys(t.fieldsMap).forEach((function(e){t.fieldsMap[e]={key:e,value:{word:t.queryStr,op:i.SearchQueryType.NOT_IN}}})),t},t.build=function(){t.fields=Object.values(t.fieldsMap);try{return new i.ChannelListQuery(t)}catch(e){throw new i.SceytChatError(e.message,e.code)}},t}return o(t,e),t}(n(1050).QueryBuilder);t.ChannelListQueryBuilder=s},5948:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Query=void 0;t.Query=function(){this.count=10,this.hasNext=!0,this.loading=!1}},6237:(e,t,n)=>{"use strict";e.exports=l;var r,o=n(3610),i=o.LongBits,s=o.utf8;function a(e,t){return RangeError("index out of range: "+e.pos+" + "+(t||1)+" > "+e.len)}function l(e){this.buf=e,this.pos=0,this.len=e.length}var c,u="undefined"!=typeof Uint8Array?function(e){if(e instanceof Uint8Array||Array.isArray(e))return new l(e);throw Error("illegal buffer")}:function(e){if(Array.isArray(e))return new l(e);throw Error("illegal buffer")},d=function(){return o.Buffer?function(e){return(l.create=function(e){return o.Buffer.isBuffer(e)?new r(e):u(e)})(e)}:u};function p(){var e=new i(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 f(e,t){return(e[t-4]|e[t-3]<<8|e[t-2]<<16|e[t-1]<<24)>>>0}function h(){if(this.pos+8>this.len)throw a(this,8);return new i(f(this.buf,this.pos+=4),f(this.buf,this.pos+=4))}l.create=d(),l.prototype._slice=o.Array.prototype.subarray||o.Array.prototype.slice,l.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}),l.prototype.int32=function(){return 0|this.uint32()},l.prototype.sint32=function(){var e=this.uint32();return e>>>1^-(1&e)},l.prototype.bool=function(){return 0!==this.uint32()},l.prototype.fixed32=function(){if(this.pos+4>this.len)throw a(this,4);return f(this.buf,this.pos+=4)},l.prototype.sfixed32=function(){if(this.pos+4>this.len)throw a(this,4);return 0|f(this.buf,this.pos+=4)},l.prototype.float=function(){if(this.pos+4>this.len)throw a(this,4);var e=o.float.readFloatLE(this.buf,this.pos);return this.pos+=4,e},l.prototype.double=function(){if(this.pos+8>this.len)throw a(this,4);var e=o.float.readDoubleLE(this.buf,this.pos);return this.pos+=8,e},l.prototype.bytes=function(){var e=this.uint32(),t=this.pos,n=this.pos+e;if(n>this.len)throw a(this,e);return this.pos+=e,Array.isArray(this.buf)?this.buf.slice(t,n):t===n?new this.buf.constructor(0):this._slice.call(this.buf,t,n)},l.prototype.string=function(){var e=this.bytes();return s.read(e,0,e.length)},l.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},l.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},l._configure=function(e){r=e,l.create=d(),r._configure();var t=o.Long?"toLong":"toNumber";o.merge(l.prototype,{int64:function(){return p.call(this)[t](!1)},uint64:function(){return p.call(this)[t](!0)},sint64:function(){return p.call(this).zzDecode()[t](!1)},fixed64:function(){return h.call(this)[t](!0)},sfixed64:function(){return h.call(this)[t](!1)}})}},6254:function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.AttachmentListQueryBuilder=void 0;var i=n(4799),s=function(e){function t(t,n){var r=e.call(this)||this;return r.searchThread=!1,r.reversed=!1,r.limit=function(e){return r.count=e,r},r.reverse=function(e){return r.reversed=e,r},r.searchInThread=function(){return r.searchThread=!0,r},r.build=function(){try{return new i.AttachmentListQuery(r)}catch(e){throw new i.SceytChatError(e.message,e.code)}},r.attachmentTypes=n,r.channelId=t,r}return o(t,e),t}(n(1050).QueryBuilder);t.AttachmentListQueryBuilder=s},6434:(e,t,n)=>{"use strict";var r=t,o=n(2551);r[".google.protobuf.Any"]={fromObject:function(e){if(e&&e["@type"]){var t=e["@type"].substring(e["@type"].lastIndexOf("/")+1),n=this.lookup(t);if(n){var r="."===e["@type"].charAt(0)?e["@type"].substr(1):e["@type"];return-1===r.indexOf("/")&&(r="/"+r),this.create({type_url:r,value:n.encode(n.fromObject(e)).finish()})}}return this.fromObject(e)},toObject:function(e,t){var n="",r="";if(t&&t.json&&e.type_url&&e.value){r=e.type_url.substring(e.type_url.lastIndexOf("/")+1),n=e.type_url.substring(0,e.type_url.lastIndexOf("/")+1);var i=this.lookup(r);i&&(e=i.decode(e.value))}if(!(e instanceof this.ctor)&&e instanceof o){var s=e.$type.toObject(e,t);return""===n&&(n="type.googleapis.com/"),r=n+("."===e.$type.fullName[0]?e.$type.fullName.substr(1):e.$type.fullName),s["@type"]=r,s}return this.toObject(e,t)}}},6450:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MESSAGE_MARKER_NAME=t.CONNECTION_STATE=t.REACTION_EVENT_TYPE=t.BIT22=t.EPOCH=t.REQUEST_TIMEOUT=t.RECONNECTION_TIMEOUT=t.PING_MESSAGE=t.CONNECTION_EVENT_TYPES=t.clientErrors=t.serverErrors=t.api=void 0,t.api={connect:"connect",attachments:"attachments",files:"files",settings:"settings",reports:"reports",contact:"contact"},t.serverErrors={BAD_REQUEST:4e4,TOO_LARGE_MESSAGE:1203,TOO_MANY_ATTEMPTS:40002,BAD_PARAM:40003,BAD_CHANNEL_TYPE:40004,BAD_USERNAME_IN_TOKEN:40005,CHANNEL_ALREADY_EXISTS:40006,MEMBER_EXISTS:40007,MEMBER_NOT_EXISTS:40008,MEMBERS_LIMIT_EXCEEDED:40009,BAD_MESSAGE_TYPE:40010,BAD_ATTACHMENT_TYPE:40011,UNDEFINED_ROLE:40012,TOO_LARGE_METADATA:40013,BLOCKED_CHANNEL:40014,USER_NOT_EXISTS:40015,INVALID_TOKEN:1021,EXPIRED_TOKEN:1020,TOKEN_NOT_ACTIVE:40103,UNAUTHORIZED:1302,NOT_ALLOWED:40105,ACCOUNT_SUSPENDED:40106,INVALID_CLIENT_ID:40107,DUPLICATE_CLIENT_ID:1305,INACTIVE_USER:40301,ITEM_NOT_FOUND:40400,CHANNEL_NOT_EXISTS:40401,TOO_MANY_REQUESTS:42900,INTERNAL_ERROR:50001,SERVICE_UNAVAILABLE:503,SESSION_NOT_FOUND:50004,TOO_MANY_FORWARDED:42901},t.clientErrors={UNKNOWN_ERROR:{code:9900,message:"Unknown error"},INVALID_INITIALIZATION:{code:9901,message:"Application is not configured. Try to setup ChatClient"},REQUEST_TIMEOUT:{code:9902,message:"Request timeout"},CONNECTION_REQUIRED:{code:9903,message:"Not connected, please connect first"},NETWORK_CONNECTION_ERROR:{code:9904,message:"Network connection error"},SERVICE_UNAVAILABLE:{code:503,message:"SERVICE UNAVAILABLE"},QUERY_IN_PROGRESS:{code:9908,message:"QUERY_IN_PROGRESS"},TOO_LARGE_MESSAGE:{code:1203,message:"The file size is too big"}},t.CONNECTION_EVENT_TYPES={onTokenWillExpire:"onTokenWillExpire",onTokenExpired:"onTokenExpired",onConnectionStateChanged:"onConnectionStateChanged"},t.PING_MESSAGE=126,t.RECONNECTION_TIMEOUT=5e3,t.REQUEST_TIMEOUT=1e4,t.EPOCH=1584611944111,t.BIT22=4194304,t.REACTION_EVENT_TYPE={ADD:"add",DELETE:"delete"},t.CONNECTION_STATE={CONNECTING:"Connecting",CONNECTED:"Connected",DISCONNECTED:"Disconnected",FAILED:"Failed",RECONNECTING:"Reconnecting"},t.MESSAGE_MARKER_NAME={RECEIVED:"received",DISPLAYED:"displayed",PLAYED:"played",OPENED:"opened"}},6690:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function s(e){try{l(r.next(e))}catch(e){i(e)}}function a(e){try{l(r.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}l((r=r.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(a){return function(l){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,a[0]&&(s=0)),s;)try{if(n=1,r&&(o=2&a[0]?r.return:a[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,a[1])).done)return o;switch(r=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,r=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!((o=(o=s.trys).length>0&&o[o.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ChannelListener=void 0;t.ChannelListener=function(){this.onMessageEdited=function(){},this.onMessageDeleted=function(){},this.onReactionAdded=function(){},this.onPollAdded=function(){},this.onPollRetracted=function(){},this.onPollDeleted=function(){},this.onPollClosed=function(){},this.onReactionDeleted=function(){},this.onMessage=function(){},this.onSignal=function(){},this.onMemberLeft=function(){},this.onBlocked=function(){},this.onUnblocked=function(){},this.onMemberJoined=function(){},this.onCreated=function(){},this.onUpdated=function(){},this.onDeleted=function(){},this.onMembersAdded=function(){},this.onMembersKicked=function(){},this.onMembersBlocked=function(){},this.onMembersUnblocked=function(){},this.onReceivedMessageListMarker=function(){},this.onTotalUnreadCountUpdated=function(){},this.onHidden=function(){},this.onShown=function(){},this.onMarkedAsUnread=function(){},this.onMarkedAsRead=function(){},this.onHistoryCleared=function(){},this.onDeletedAllMessages=function(){},this.onMembersRoleChanged=function(){},this.onOwnerChanged=function(){},this.onMuted=function(){},this.onUnmuted=function(){},this.onPined=function(){},this.onUnpined=function(){},this.onReceivedChannelEvent=function(){},this.onPinnedMessagesChanged=function(){},this.onChannelFrozen=function(){},this.onChannelUnfrozen=function(){}}},6920:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Contact=void 0;var r=n(4799);t.Contact=function(e){this.id=e.user.id,this.firstName=e.firstName,this.lastName=e.lastName,this.metadata=e.metadata,this.keys=e.keys,this.user=new r.User(e.user)}},6925:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var o=r(n(3065)),i=r(n(251)),s=o.default.noConflict(),a=i.default;a.reg(s),a.apply(s),i.default.apply(o.default,{timestampFormatter:function(e){return"".concat(e.getHours(),":").concat(e.getMinutes(),":").concat(e.getSeconds(),":").concat(e.getMilliseconds())}}),t.default=s},6946:(e,t,n)=>{"use strict";e.exports=n(4394)},6987:(e,t,n)=>{"use strict";var r=n(9516),o=n(7018),i=n(5449),s={"Content-Type":"application/x-www-form-urlencoded"};function a(e,t){!r.isUndefined(e)&&r.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var l,c={transitional:{silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},adapter:(("undefined"!=typeof XMLHttpRequest||"undefined"!=typeof process&&"[object process]"===Object.prototype.toString.call(process))&&(l=n(5592)),l),transformRequest:[function(e,t){return o(t,"Accept"),o(t,"Content-Type"),r.isFormData(e)||r.isArrayBuffer(e)||r.isBuffer(e)||r.isStream(e)||r.isFile(e)||r.isBlob(e)?e:r.isArrayBufferView(e)?e.buffer:r.isURLSearchParams(e)?(a(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):r.isObject(e)||t&&"application/json"===t["Content-Type"]?(a(t,"application/json"),function(e){if(r.isString(e))try{return(0,JSON.parse)(e),r.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(0,JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){var t=this.transitional,n=t&&t.silentJSONParsing,o=t&&t.forcedJSONParsing,s=!n&&"json"===this.responseType;if(s||o&&r.isString(e)&&e.length)try{return JSON.parse(e)}catch(e){if(s){if("SyntaxError"===e.name)throw i(e,this,"E_JSON_PARSE");throw e}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};r.forEach(["delete","get","head"],(function(e){c.headers[e]={}})),r.forEach(["post","put","patch"],(function(e){c.headers[e]=r.merge(s)})),e.exports=c},7007:function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function s(e){try{l(r.next(e))}catch(e){i(e)}}function a(e){try{l(r.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}l((r=r.apply(e,t||[])).next())}))},s=this&&this.__generator||function(e,t){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(a){return function(l){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,a[0]&&(s=0)),s;)try{if(n=1,r&&(o=2&a[0]?r.return:a[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,a[1])).done)return o;switch(r=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,r=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!((o=(o=s.trys).length>0&&o[o.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]50?50:e,t},t.privacyParameter=function(e){return t.privacyField=e,t},t.exceptionType=function(e){return t.type=e,t},t.build=function(){return i(t,void 0,void 0,(function(){return s(this,(function(e){try{return[2,new a.PrivacyListQuery(this)]}catch(e){throw new c.SceytChatError(e.message,e.code)}return[2]}))}))},t}return o(t,e),t}(l.QueryBuilder);t.PrivacySettingsQueryBuilder=u},7018:(e,t,n)=>{"use strict";var r=n(9516);e.exports=function(e,t){r.forEach(e,(function(n,r){r!==t&&r.toUpperCase()===t.toUpperCase()&&(e[t]=n,delete e[r])}))}},7209:(e,t,n)=>{"use strict";e.exports=i,i.className="ReflectionObject";var r,o=n(3262);function i(e,t){if(!o.isString(e))throw TypeError("name must be a string");if(t&&!o.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(i.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(".")}}}),i.prototype.toJSON=function(){throw Error()},i.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 r&&t._handleAdd(this)},i.prototype.onRemove=function(e){var t=e.root;t instanceof r&&t._handleRemove(this),this.parent=null,this.resolved=!1},i.prototype.resolve=function(){return this.resolved||this.root instanceof r&&(this.resolved=!0),this},i.prototype.getOption=function(e){if(this.options)return this.options[e]},i.prototype.setOption=function(e,t,n){return n&&this.options&&void 0!==this.options[e]||((this.options||(this.options={}))[e]=t),this},i.prototype.setParsedOption=function(e,t,n){this.parsedOptions||(this.parsedOptions=[]);var r=this.parsedOptions;if(n){var i=r.find((function(t){return Object.prototype.hasOwnProperty.call(t,e)}));if(i){var s=i[e];o.setProperty(s,n,t)}else(i={})[e]=o.setProperty({},n,t),r.push(i)}else{var a={};a[e]=t,r.push(a)}return this},i.prototype.setOptions=function(e,t){if(e)for(var n=Object.keys(e),r=0;r0&&o[o.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]50?50:e,this},t}(l.QueryBuilder);t.MessageListSearchQueryBuilder=u},7522:(e,t,n)=>{"use strict";var r=n(7763);e.exports=function(e,t,n){var o=n.config.validateStatus;n.status&&o&&!o(n.status)?t(r("Request failed with status code "+n.status,n.config,null,n.request,n)):e(n)}},7525:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.CDRRequestEvent=void 0,(n=t.CDRRequestEvent||(t.CDRRequestEvent={}))[n.GET_RECENT_CALLS=0]="GET_RECENT_CALLS",n[n.GET_CALLS_BY_SESSION_IDS=1]="GET_CALLS_BY_SESSION_IDS",n[n.DELETE_RECENT_CALLS=2]="DELETE_RECENT_CALLS"},7573:function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function s(e){try{l(r.next(e))}catch(e){i(e)}}function a(e){try{l(r.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}l((r=r.apply(e,t||[])).next())}))},s=this&&this.__generator||function(e,t){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(a){return function(l){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,a[0]&&(s=0)),s;)try{if(n=1,r&&(o=2&a[0]?r.return:a[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,a[1])).done)return o;switch(r=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,r=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!((o=(o=s.trys).length>0&&o[o.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]{"use strict";e.exports=o;var r=n(3610);function o(e,t,n){if("function"!=typeof e)throw TypeError("rpcImpl must be a function");r.EventEmitter.call(this),this.rpcImpl=e,this.requestDelimited=Boolean(t),this.responseDelimited=Boolean(n)}(o.prototype=Object.create(r.EventEmitter.prototype)).constructor=o,o.prototype.rpcCall=function e(t,n,o,i,s){if(!i)throw TypeError("request must be specified");var a=this;if(!s)return r.asPromise(e,a,t,n,o,i);if(a.rpcImpl)try{return a.rpcImpl(t,n[a.requestDelimited?"encodeDelimited":"encode"](i).finish(),(function(e,n){if(e)return a.emit("error",e,t),s(e);if(null!==n){if(!(n instanceof o))try{n=o[a.responseDelimited?"decodeDelimited":"decode"](n)}catch(e){return a.emit("error",e,t),s(e)}return a.emit("data",n,t),s(null,n)}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)},o.prototype.end=function(e){return this.rpcImpl&&(e||this.rpcImpl(null,null,null),this.rpcImpl=null,this.emit("end").off()),this}},7668:function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function s(e){try{l(r.next(e))}catch(e){i(e)}}function a(e){try{l(r.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}l((r=r.apply(e,t||[])).next())}))},s=this&&this.__generator||function(e,t){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(a){return function(l){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,a[0]&&(s=0)),s;)try{if(n=1,r&&(o=2&a[0]?r.return:a[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,a[1])).done)return o;switch(r=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,r=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!((o=(o=s.trys).length>0&&o[o.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]{"use strict";e.exports=function(e){var t=i.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>>3){");for(var n=0;n>>3){")("case 1: k=r.%s(); break",a.keyType)("case 2:"),void 0===o.basic[l]?t("value=types[%i].decode(r,r.uint32())",n):t("value=r.%s()",l),t("break")("default:")("r.skipType(tag2&7)")("break")("}")("}"),void 0!==o.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!==o.packed[l]&&t("if((t&7)===2){")("var c2=r.uint32()+r.pos")("while(r.pos{"use strict";var r=n(5449);e.exports=function(e,t,n,o,i){var s=new Error(e);return r(s,t,n,o,i)}},7882:(e,t,n)=>{"use strict";e.exports=b;var r=n(8923);((b.prototype=Object.create(r.prototype)).constructor=b).className="Type";var o=n(5643),i=n(1457),s=n(1344),a=n(8252),l=n(9687),c=n(2551),u=n(6237),d=n(3449),p=n(3262),f=n(1080),h=n(7728),y=n(420),g=n(744),m=n(6434);function b(e,t){r.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 v(e){return e._fieldsById=e._fieldsArray=e._oneofsArray=null,delete e.encode,delete e.decode,delete e.verify,e}Object.defineProperties(b.prototype,{fieldsById:{get:function(){if(this._fieldsById)return this._fieldsById;this._fieldsById={};for(var e=Object.keys(this.fields),t=0;t{"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}},8015:(e,t,n)=>{"use strict";var r=n(9516),o=n(9012),i=n(5155),s=n(5343);function a(e){var t=new i(e),n=o(i.prototype.request,t);return r.extend(n,i.prototype,t),r.extend(n,t),n}var l=a(n(6987));l.Axios=i,l.create=function(e){return a(s(l.defaults,e))},l.Cancel=n(1928),l.CancelToken=n(3191),l.isCancel=n(3864),l.all=function(e){return Promise.all(e)},l.spread=n(7980),l.isAxiosError=n(5019),e.exports=l,e.exports.default=l},8045:e=>{"use strict";e.exports=function(e,t){for(var n=new Array(arguments.length-1),r=0,o=2,i=!0;o{"use strict";e.exports=s;var r=n(1344);((s.prototype=Object.create(r.prototype)).constructor=s).className="MapField";var o=n(361),i=n(3262);function s(e,t,n,o,s,a){if(r.call(this,e,t,o,void 0,void 0,s,a),!i.isString(n))throw TypeError("keyType must be a string");this.keyType=n,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 i.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===o.mapKey[this.keyType])throw Error("invalid key type: "+this.keyType);return r.prototype.resolve.call(this)},s.d=function(e,t,n){return"function"==typeof n?n=i.decorateType(n).name:n&&"object"==typeof n&&(n=i.decorateEnum(n).name),function(r,o){i.decorateType(r.constructor).add(new s(o,e,t,n))}}},8420:function(e,t,n){"use strict";var r=this&&this.__assign||function(){return r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0&&o[o.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]{"use strict";function t(e,n){"string"==typeof e&&(n=e,e=void 0);var r=[];function o(e){if("string"!=typeof e){var n=i();if(t.verbose&&console.log("codegen: "+n),n="return "+n,e){for(var s=Object.keys(e),a=new Array(s.length+1),l=new Array(s.length),c=0;c{e.exports=n;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 n(e,t,n){this.low=0|e,this.high=0|t,this.unsigned=!!n}function r(e){return!0===(e&&e.__isLong__)}n.prototype.__isLong__,Object.defineProperty(n.prototype,"__isLong__",{value:!0}),n.isLong=r;var o={},i={};function s(e,t){var n,r,s;return t?(s=0<=(e>>>=0)&&e<256)&&(r=i[e])?r:(n=l(e,(0|e)<0?-1:0,!0),s&&(i[e]=n),n):(s=-128<=(e|=0)&&e<128)&&(r=o[e])?r:(n=l(e,e<0?-1:0,!1),s&&(o[e]=n),n)}function a(e,t){if(isNaN(e))return t?m:g;if(t){if(e<0)return m;if(e>=f)return I}else{if(e<=-h)return P;if(e+1>=h)return w}return e<0?a(-e,t).neg():l(e%p|0,e/p|0,t)}function l(e,t,r){return new n(e,t,r)}n.fromInt=s,n.fromNumber=a,n.fromBits=l;var c=Math.pow;function u(e,t,n){if(0===e.length)throw Error("empty string");if("NaN"===e||"Infinity"===e||"+Infinity"===e||"-Infinity"===e)return g;if("number"==typeof t?(n=t,t=!1):t=!!t,(n=n||10)<2||360)throw Error("interior hyphen");if(0===r)return u(e.substring(1),t,n).neg();for(var o=a(c(n,8)),i=g,s=0;s>>0:this.low},S.toNumber=function(){return this.unsigned?(this.high>>>0)*p+(this.low>>>0):this.high*p+(this.low>>>0)},S.toString=function(e){if((e=e||10)<2||36>>0).toString(e);if((i=l).isZero())return u+s;for(;u.length<6;)u="0"+u;s=""+u+s}},S.getHighBits=function(){return this.high},S.getHighBitsUnsigned=function(){return this.high>>>0},S.getLowBits=function(){return this.low},S.getLowBitsUnsigned=function(){return this.low>>>0},S.getNumBitsAbs=function(){if(this.isNegative())return this.eq(P)?64:this.neg().getNumBitsAbs();for(var e=0!=this.high?this.high:this.low,t=31;t>0&&!(e&1<=0},S.isOdd=function(){return!(1&~this.low)},S.isEven=function(){return!(1&this.low)},S.equals=function(e){return r(e)||(e=d(e)),(this.unsigned===e.unsigned||this.high>>>31!=1||e.high>>>31!=1)&&this.high===e.high&&this.low===e.low},S.eq=S.equals,S.notEquals=function(e){return!this.eq(e)},S.neq=S.notEquals,S.ne=S.notEquals,S.lessThan=function(e){return this.comp(e)<0},S.lt=S.lessThan,S.lessThanOrEqual=function(e){return this.comp(e)<=0},S.lte=S.lessThanOrEqual,S.le=S.lessThanOrEqual,S.greaterThan=function(e){return this.comp(e)>0},S.gt=S.greaterThan,S.greaterThanOrEqual=function(e){return this.comp(e)>=0},S.gte=S.greaterThanOrEqual,S.ge=S.greaterThanOrEqual,S.compare=function(e){if(r(e)||(e=d(e)),this.eq(e))return 0;var t=this.isNegative(),n=e.isNegative();return t&&!n?-1:!t&&n?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},S.comp=S.compare,S.negate=function(){return!this.unsigned&&this.eq(P)?P:this.not().add(b)},S.neg=S.negate,S.add=function(e){r(e)||(e=d(e));var t=this.high>>>16,n=65535&this.high,o=this.low>>>16,i=65535&this.low,s=e.high>>>16,a=65535&e.high,c=e.low>>>16,u=0,p=0,f=0,h=0;return f+=(h+=i+(65535&e.low))>>>16,p+=(f+=o+c)>>>16,u+=(p+=n+a)>>>16,u+=t+s,l((f&=65535)<<16|(h&=65535),(u&=65535)<<16|(p&=65535),this.unsigned)},S.subtract=function(e){return r(e)||(e=d(e)),this.add(e.neg())},S.sub=S.subtract,S.multiply=function(e){if(this.isZero())return g;if(r(e)||(e=d(e)),t)return l(t.mul(this.low,this.high,e.low,e.high),t.get_high(),this.unsigned);if(e.isZero())return g;if(this.eq(P))return e.isOdd()?P:g;if(e.eq(P))return this.isOdd()?P:g;if(this.isNegative())return e.isNegative()?this.neg().mul(e.neg()):this.neg().mul(e).neg();if(e.isNegative())return this.mul(e.neg()).neg();if(this.lt(y)&&e.lt(y))return a(this.toNumber()*e.toNumber(),this.unsigned);var n=this.high>>>16,o=65535&this.high,i=this.low>>>16,s=65535&this.low,c=e.high>>>16,u=65535&e.high,p=e.low>>>16,f=65535&e.low,h=0,m=0,b=0,v=0;return b+=(v+=s*f)>>>16,m+=(b+=i*f)>>>16,b&=65535,m+=(b+=s*p)>>>16,h+=(m+=o*f)>>>16,m&=65535,h+=(m+=i*p)>>>16,m&=65535,h+=(m+=s*u)>>>16,h+=n*f+o*p+i*u+s*c,l((b&=65535)<<16|(v&=65535),(h&=65535)<<16|(m&=65535),this.unsigned)},S.mul=S.multiply,S.divide=function(e){if(r(e)||(e=d(e)),e.isZero())throw Error("division by zero");var n,o,i;if(t)return this.unsigned||-2147483648!==this.high||-1!==e.low||-1!==e.high?l((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:g;if(this.unsigned){if(e.unsigned||(e=e.toUnsigned()),e.gt(this))return m;if(e.gt(this.shru(1)))return v;i=m}else{if(this.eq(P))return e.eq(b)||e.eq(O)?P:e.eq(P)?b:(n=this.shr(1).div(e).shl(1)).eq(g)?e.isNegative()?b:O:(o=this.sub(e.mul(n)),i=n.add(o.div(e)));if(e.eq(P))return this.unsigned?m:g;if(this.isNegative())return e.isNegative()?this.neg().div(e.neg()):this.neg().div(e).neg();if(e.isNegative())return this.div(e.neg()).neg();i=g}for(o=this;o.gte(e);){n=Math.max(1,Math.floor(o.toNumber()/e.toNumber()));for(var s=Math.ceil(Math.log(n)/Math.LN2),u=s<=48?1:c(2,s-48),p=a(n),f=p.mul(e);f.isNegative()||f.gt(o);)f=(p=a(n-=u,this.unsigned)).mul(e);p.isZero()&&(p=b),i=i.add(p),o=o.sub(f)}return i},S.div=S.divide,S.modulo=function(e){return r(e)||(e=d(e)),t?l((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))},S.mod=S.modulo,S.rem=S.modulo,S.not=function(){return l(~this.low,~this.high,this.unsigned)},S.and=function(e){return r(e)||(e=d(e)),l(this.low&e.low,this.high&e.high,this.unsigned)},S.or=function(e){return r(e)||(e=d(e)),l(this.low|e.low,this.high|e.high,this.unsigned)},S.xor=function(e){return r(e)||(e=d(e)),l(this.low^e.low,this.high^e.high,this.unsigned)},S.shiftLeft=function(e){return r(e)&&(e=e.toInt()),0==(e&=63)?this:e<32?l(this.low<>>32-e,this.unsigned):l(0,this.low<>>e|this.high<<32-e,this.high>>e,this.unsigned):l(this.high>>e-32,this.high>=0?0:-1,this.unsigned)},S.shr=S.shiftRight,S.shiftRightUnsigned=function(e){if(r(e)&&(e=e.toInt()),0==(e&=63))return this;var t=this.high;return e<32?l(this.low>>>e|t<<32-e,t>>>e,this.unsigned):l(32===e?t:t>>>e-32,0,this.unsigned)},S.shru=S.shiftRightUnsigned,S.shr_u=S.shiftRightUnsigned,S.toSigned=function(){return this.unsigned?l(this.low,this.high,!1):this},S.toUnsigned=function(){return this.unsigned?this:l(this.low,this.high,!0)},S.toBytes=function(e){return e?this.toBytesLE():this.toBytesBE()},S.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]},S.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]},n.fromBytes=function(e,t,r){return r?n.fromBytesLE(e,t):n.fromBytesBE(e,t)},n.fromBytesLE=function(e,t){return new n(e[0]|e[1]<<8|e[2]<<16|e[3]<<24,e[4]|e[5]<<8|e[6]<<16|e[7]<<24,t)},n.fromBytesBE=function(e,t){return new n(e[4]<<24|e[5]<<16|e[6]<<8|e[7],e[0]<<24|e[1]<<16|e[2]<<8|e[3],t)}},8576:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function s(e){try{l(r.next(e))}catch(e){i(e)}}function a(e){try{l(r.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}l((r=r.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(a){return function(l){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,a[0]&&(s=0)),s;)try{if(n=1,r&&(o=2&a[0]?r.return:a[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,a[1])).done)return o;switch(r=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,r=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!((o=(o=s.trys).length>0&&o[o.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]=n.length,[2,{users:n,hasNext:this.hasNext}];case 2:return[2,{users:[],hasNext:this.hasNext}];case 3:return[3,5];case 4:throw new i.SceytChatError(i.clientErrors.QUERY_IN_PROGRESS.message,i.clientErrors.QUERY_IN_PROGRESS.code);case 5:return[2]}}))}))},this.index=e.i,this.count=e.count,this.hasNext=e.hasNext}return Object.defineProperty(e.prototype,"limit",{get:function(){return this.count},set:function(e){this.count=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"offset",{get:function(){return this.index},set:function(e){this.index=e},enumerable:!1,configurable:!0}),e}();t.BlockedUserListQuery=s},8666:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function s(e){try{l(r.next(e))}catch(e){i(e)}}function a(e){try{l(r.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}l((r=r.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(a){return function(l){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,a[0]&&(s=0)),s;)try{if(n=1,r&&(o=2&a[0]?r.return:a[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,a[1])).done)return o;switch(r=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,r=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!((o=(o=s.trys).length>0&&o[o.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MessageListMarker=void 0;var r=n(4799);t.MessageListMarker=function(e){this.messageIds=e.ids.map((function(e){return e.toString()})),this.user=new r.User(e.from),this.name=e.marker,this.createdAt=new Date(e.time.toNumber())}},8811:(e,t,n)=>{"use strict";e.exports=i;var r=n(7209);((i.prototype=Object.create(r.prototype)).constructor=i).className="Method";var o=n(3262);function i(e,t,n,i,s,a,l,c,u){if(o.isObject(s)?(l=s,s=a=void 0):o.isObject(a)&&(l=a,a=void 0),void 0!==t&&!o.isString(t))throw TypeError("type must be a string");if(!o.isString(n))throw TypeError("requestType must be a string");if(!o.isString(i))throw TypeError("responseType must be a string");r.call(this,e,l),this.type=t||"rpc",this.requestType=n,this.requestStream=!!s||void 0,this.responseType=i,this.responseStream=!!a||void 0,this.resolvedRequestType=null,this.resolvedResponseType=null,this.comment=c,this.parsedOptions=u}i.fromJSON=function(e,t){return new i(e,t.type,t.requestType,t.responseType,t.requestStream,t.responseStream,t.options,t.comment,t.parsedOptions)},i.prototype.toJSON=function(e){var t=!!e&&Boolean(e.keepComments);return o.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])},i.prototype.resolve=function(){return this.resolved?this:(this.resolvedRequestType=this.parent.lookupType(this.requestType),this.resolvedResponseType=this.parent.lookupType(this.responseType),r.prototype.resolve.call(this))}},8839:(e,t)=>{"use strict";var n=t;n.length=function(e){var t=e.length;if(!t)return 0;for(var n=0;--t%4>1&&"="===e.charAt(t);)++n;return Math.ceil(3*e.length)/4-n};for(var r=new Array(64),o=new Array(123),i=0;i<64;)o[r[i]=i<26?i+65:i<52?i+71:i<62?i-4:i-59|43]=i++;n.encode=function(e,t,n){for(var o,i=null,s=[],a=0,l=0;t>2],o=(3&c)<<4,l=1;break;case 1:s[a++]=r[o|c>>4],o=(15&c)<<2,l=2;break;case 2:s[a++]=r[o|c>>6],s[a++]=r[63&c],l=0}a>8191&&((i||(i=[])).push(String.fromCharCode.apply(String,s)),a=0)}return l&&(s[a++]=r[o],s[a++]=61,1===l&&(s[a++]=61)),i?(a&&i.push(String.fromCharCode.apply(String,s.slice(0,a))),i.join("")):String.fromCharCode.apply(String,s.slice(0,a))};var s="invalid encoding";n.decode=function(e,t,n){for(var r,i=n,a=0,l=0;l1)break;if(void 0===(c=o[c]))throw Error(s);switch(a){case 0:r=c,a=1;break;case 1:t[n++]=r<<2|(48&c)>>4,r=c,a=2;break;case 2:t[n++]=(15&r)<<4|(60&c)>>2,r=c,a=3;break;case 3:t[n++]=(3&r)<<6|c,a=0}}if(1===a)throw Error(s);return n-i},n.test=function(e){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(e)}},8923:(e,t,n)=>{"use strict";e.exports=d;var r=n(7209);((d.prototype=Object.create(r.prototype)).constructor=d).className="Namespace";var o,i,s,a=n(1344),l=n(1457),c=n(3262);function u(e,t){if(e&&e.length){for(var n={},r=0;rt)return!0;return!1},d.isReservedName=function(e,t){if(e)for(var n=0;n0;){var r=e.shift();if(n.nested&&n.nested[r]){if(!((n=n.nested[r])instanceof d))throw Error("path conflicts with non-namespace objects")}else n.add(n=new d(r))}return t&&n.addJSON(t),n},d.prototype.resolveAll=function(){for(var e=this.nestedArray,t=0;t-1)return r}else if(r instanceof d&&(r=r.lookup(e.slice(1),t,!0)))return r}else for(var o=0;o{"use strict";e.exports=function(e,t){return function(){for(var n=new Array(arguments.length),r=0;r{"use strict";var r=e.exports=n(5325);r.build="full",r.tokenize=n(527),r.parse=n(4863),r.common=n(5095),r.Root._configure(r.Type,r.parse,r.common)},9106:(e,t,n)=>{"use strict";var r=n(9516);function o(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}e.exports=function(e,t,n){if(!t)return e;var i;if(n)i=n(t);else if(r.isURLSearchParams(t))i=t.toString();else{var s=[];r.forEach(t,(function(e,t){null!=e&&(r.isArray(e)?t+="[]":e=[e],r.forEach(e,(function(e){r.isDate(e)?e=e.toISOString():r.isObject(e)&&(e=JSON.stringify(e)),s.push(o(t)+"="+o(e))})))})),i=s.join("&")}if(i){var a=e.indexOf("#");-1!==a&&(e=e.slice(0,a)),e+=(-1===e.indexOf("?")?"?":"&")+i}return e}},9137:e=>{"use strict";e.exports=function(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)}},9155:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.SocketClient=void 0;var o=r(n(169)),i=r(n(3065)),s=n(4799),a=r(n(6925)),l=function(){function e(){var e=this;this.onTokenWillExpire=new s.LiteEvent,this.onTokenExpired=new s.LiteEvent,this.onClientDisconnected=new s.LiteEvent,this.disconnectTimeoutMs=1e4,this.pingTimeoutMs=15e3,this.willBeNotified=!0,this.close=function(t){var n=e.socket;i.default.info("WebSocket close: ws: ",n),e.onClientDisconnected.trigger(t),n&&(n.close&&n.readyState===n.OPEN&&"noPong"!==t||"DISCONNECT"===t)?(n.close(4004,"Manually closed connection by calling chatClient.disconnect()"),i.default.info("WebSocket destroy:"),e.removeHandlers()):n&&n.close(),clearTimeout(e.pingTimeout),clearTimeout(e.disconnectTimeout)},this.ping=function(){var t=e.connectionState,n=e.expDate-Date.now();n<=0?(e.onTokenExpired.trigger(),i.default.info("Token expired, close socket"),e.close()):(e.willBeNotified&&n<=3e5&&(e.willBeNotified=!1,e.onTokenWillExpire.trigger(n)),t===s.CLIENT_STATE.CONNECTED?(e.pingTimestamp=Date.now(),a.default.info("ping"),e.socket.send((0,s.concatTypedArrays)(new Uint8Array([129]),new Uint8Array([s.PING_MESSAGE]))),e.startDisconnectTimeout()):(i.default.info("[ping]: Socket is not connected, close socket"),e.close()))},i.default.info("Init SocketClient")}return Object.defineProperty(e.prototype,"tokenWillExpire",{get:function(){return this.onTokenWillExpire.expose()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"tokenExpired",{get:function(){return this.onTokenExpired.expose()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"disconnectClient",{get:function(){return this.onClientDisconnected.expose()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"connectionState",{get:function(){return this.socket?this.socket.readyState:s.SOCKET_STATE.CLOSED},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"host",{get:function(){return this._host},set:function(e){this._host=e},enumerable:!1,configurable:!0}),e.prototype.initSocket=function(){i.default.info("WebSocket init:"),this.socket=new o.default(this.host),this.socket.binaryType="arraybuffer"},e.prototype.attachHandlers=function(){this.socket.addEventListener("open",this.handlers.open),this.socket.addEventListener("close",this.handlers.close),this.socket.addEventListener("message",this.handlers.message),this.socket.addEventListener("error",this.handlers.error)},e.prototype.removeHandlers=function(){this.socket.removeEventListener("open",this.handlers.open),this.socket.removeEventListener("close",this.handlers.close),this.socket.removeEventListener("message",this.handlers.message),this.socket.removeEventListener("error",this.handlers.error)},e.prototype.sendMessage=function(e){this.socket.send(e)},e.prototype.connect=function(e){this.initSocket(),this.handlers=e,this.attachHandlers()},e.prototype.reconnect=function(){this.initSocket(),this.attachHandlers()},e.prototype.keepAlive=function(e){e&&(this.expDate=e,this.willBeNotified=!0),this.pingTimeout=setTimeout(this.ping,this.pingTimeoutMs)},e.prototype.startDisconnectTimeout=function(){this.disconnectTimeout=setTimeout(this.close.bind(this,"noPong"),this.disconnectTimeoutMs)},e.prototype.stopDisconnectTimeout=function(e){clearTimeout(this.disconnectTimeout),clearTimeout(this.pingTimeout),e||this.keepAlive()},e.prototype.handlePong=function(){this.stopDisconnectTimeout(),a.default.info("pong")},e.prototype.socketInitialized=function(){return!!this.socket},e}();t.SocketClient=l},9207:(e,t)=>{"use strict";var n=t,r=n.isAbsolute=function(e){return/^(?:\/|\w+:)/.test(e)},o=n.normalize=function(e){var t=(e=e.replace(/\\/g,"/").replace(/\/{2,}/g,"/")).split("/"),n=r(e),o="";n&&(o=t.shift()+"/");for(var i=0;i0&&".."!==t[i-1]?t.splice(--i,2):n?t.splice(i,1):++i:"."===t[i]?t.splice(i,1):++i;return o+t.join("/")};n.resolve=function(e,t,n){return n||(t=o(t)),r(t)?t:(n||(e=o(e)),(e=e.replace(/(?:\/|^)[^/]+$/,"")).length?o(e+"/"+t):t)}},9245:function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.BlockedMemberListQueryBuilder=void 0;var i=n(4799),s=function(e){function t(t){var n=e.call(this)||this;return n.limit=function(e){return n.count=e,n},n.build=function(){try{return new i.BlockedMemberListQuery(n)}catch(e){throw new i.SceytChatError(e.message,e.code)}},n.channelId=t,n.hasNext=!0,n}return o(t,e),t}(i.QueryBuilder);t.BlockedMemberListQueryBuilder=s},9286:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function s(e){try{l(r.next(e))}catch(e){i(e)}}function a(e){try{l(r.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}l((r=r.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(a){return function(l){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,a[0]&&(s=0)),s;)try{if(n=1,r&&(o=2&a[0]?r.return:a[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,a[1])).done)return o;switch(r=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,r=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!((o=(o=s.trys).length>0&&o[o.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ConnectionListener=void 0;t.ConnectionListener=function(){this.onTokenWillExpire=function(){},this.onTokenExpired=function(){},this.onConnectionStateChanged=function(){}}},9390:e=>{"use strict";e.exports=function(e,t,n){var r=n||8192,o=r>>>1,i=null,s=r;return function(n){if(n<1||n>o)return e(n);s+n>r&&(i=e(r),s=0);var a=t.call(i,s,s+=n);return 7&s&&(s=1+(7|s)),a}}},9410:e=>{"use strict";function t(e){return"undefined"!=typeof Float32Array?function(){var t=new Float32Array([-0]),n=new Uint8Array(t.buffer),r=128===n[3];function o(e,r,o){t[0]=e,r[o]=n[0],r[o+1]=n[1],r[o+2]=n[2],r[o+3]=n[3]}function i(e,r,o){t[0]=e,r[o]=n[3],r[o+1]=n[2],r[o+2]=n[1],r[o+3]=n[0]}function s(e,r){return n[0]=e[r],n[1]=e[r+1],n[2]=e[r+2],n[3]=e[r+3],t[0]}function a(e,r){return n[3]=e[r],n[2]=e[r+1],n[1]=e[r+2],n[0]=e[r+3],t[0]}e.writeFloatLE=r?o:i,e.writeFloatBE=r?i:o,e.readFloatLE=r?s:a,e.readFloatBE=r?a:s}():function(){function t(e,t,n,r){var o=t<0?1:0;if(o&&(t=-t),0===t)e(1/t>0?0:2147483648,n,r);else if(isNaN(t))e(2143289344,n,r);else if(t>34028234663852886e22)e((o<<31|2139095040)>>>0,n,r);else if(t<11754943508222875e-54)e((o<<31|Math.round(t/1401298464324817e-60))>>>0,n,r);else{var i=Math.floor(Math.log(t)/Math.LN2);e((o<<31|i+127<<23|8388607&Math.round(t*Math.pow(2,-i)*8388608))>>>0,n,r)}}function s(e,t,n){var r=e(t,n),o=2*(r>>31)+1,i=r>>>23&255,s=8388607&r;return 255===i?s?NaN:o*(1/0):0===i?1401298464324817e-60*o*s:o*Math.pow(2,i-150)*(s+8388608)}e.writeFloatLE=t.bind(null,n),e.writeFloatBE=t.bind(null,r),e.readFloatLE=s.bind(null,o),e.readFloatBE=s.bind(null,i)}(),"undefined"!=typeof Float64Array?function(){var t=new Float64Array([-0]),n=new Uint8Array(t.buffer),r=128===n[7];function o(e,r,o){t[0]=e,r[o]=n[0],r[o+1]=n[1],r[o+2]=n[2],r[o+3]=n[3],r[o+4]=n[4],r[o+5]=n[5],r[o+6]=n[6],r[o+7]=n[7]}function i(e,r,o){t[0]=e,r[o]=n[7],r[o+1]=n[6],r[o+2]=n[5],r[o+3]=n[4],r[o+4]=n[3],r[o+5]=n[2],r[o+6]=n[1],r[o+7]=n[0]}function s(e,r){return n[0]=e[r],n[1]=e[r+1],n[2]=e[r+2],n[3]=e[r+3],n[4]=e[r+4],n[5]=e[r+5],n[6]=e[r+6],n[7]=e[r+7],t[0]}function a(e,r){return n[7]=e[r],n[6]=e[r+1],n[5]=e[r+2],n[4]=e[r+3],n[3]=e[r+4],n[2]=e[r+5],n[1]=e[r+6],n[0]=e[r+7],t[0]}e.writeDoubleLE=r?o:i,e.writeDoubleBE=r?i:o,e.readDoubleLE=r?s:a,e.readDoubleBE=r?a:s}():function(){function t(e,t,n,r,o,i){var s=r<0?1:0;if(s&&(r=-r),0===r)e(0,o,i+t),e(1/r>0?0:2147483648,o,i+n);else if(isNaN(r))e(0,o,i+t),e(2146959360,o,i+n);else if(r>17976931348623157e292)e(0,o,i+t),e((s<<31|2146435072)>>>0,o,i+n);else{var a;if(r<22250738585072014e-324)e((a=r/5e-324)>>>0,o,i+t),e((s<<31|a/4294967296)>>>0,o,i+n);else{var l=Math.floor(Math.log(r)/Math.LN2);1024===l&&(l=1023),e(4503599627370496*(a=r*Math.pow(2,-l))>>>0,o,i+t),e((s<<31|l+1023<<20|1048576*a&1048575)>>>0,o,i+n)}}}function s(e,t,n,r,o){var i=e(r,o+t),s=e(r,o+n),a=2*(s>>31)+1,l=s>>>20&2047,c=4294967296*(1048575&s)+i;return 2047===l?c?NaN:a*(1/0):0===l?5e-324*a*c:a*Math.pow(2,l-1075)*(c+4503599627370496)}e.writeDoubleLE=t.bind(null,n,0,4),e.writeDoubleBE=t.bind(null,r,4,0),e.readDoubleLE=s.bind(null,o,0,4),e.readDoubleBE=s.bind(null,i,4,0)}(),e}function n(e,t,n){t[n]=255&e,t[n+1]=e>>>8&255,t[n+2]=e>>>16&255,t[n+3]=e>>>24}function r(e,t,n){t[n]=e>>>24,t[n+1]=e>>>16&255,t[n+2]=e>>>8&255,t[n+3]=255&e}function o(e,t){return(e[t]|e[t+1]<<8|e[t+2]<<16|e[t+3]<<24)>>>0}function i(e,t){return(e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3])>>>0}e.exports=t(t)},9516:(e,t,n)=>{"use strict";var r=n(9012),o=Object.prototype.toString;function i(e){return"[object Array]"===o.call(e)}function s(e){return void 0===e}function a(e){return null!==e&&"object"==typeof e}function l(e){if("[object Object]"!==o.call(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}function c(e){return"[object Function]"===o.call(e)}function u(e,t){if(null!=e)if("object"!=typeof e&&(e=[e]),i(e))for(var n=0,r=e.length;n{"use strict";var r=n(9137),o=n(4680);e.exports=function(e,t){return e&&!r(t)?o(e,t):t}},9651:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function s(e){try{l(r.next(e))}catch(e){i(e)}}function a(e){try{l(r.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}l((r=r.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(a){return function(l){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,a[0]&&(s=0)),s;)try{if(n=1,r&&(o=2&a[0]?r.return:a[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,a[1])).done)return o;switch(r=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,r=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!((o=(o=s.trys).length>0&&o[o.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]{"use strict";e.exports=a;var r=n(8923);((a.prototype=Object.create(r.prototype)).constructor=a).className="Service";var o=n(8811),i=n(3262),s=n(5047);function a(e,t){r.call(this,e,t),this.methods={},this._methodsArray=null}function l(e){return e._methodsArray=null,e}a.fromJSON=function(e,t){var n=new a(e,t.options);if(t.methods)for(var r=Object.keys(t.methods),i=0;i{"use strict";var n,r,o,i,s,a,l,c,u,d,p,f,h,y,g,m,b,v,O,w,I,P,S,_,A,k,j,E,C,x,T;Object.defineProperty(t,"__esModule",{value:!0}),t.CDRRequestDirection=t.CDRRequestOrder=t.MembersFilter=t.MembersOrderKey=t.MembersOrder=t.MembersType=t.ExceptionType=t.UserSearchFilter=t.UserSearchOrder=t.UserAction=t.KeyType=t.MessageEventType=t.MessageQueryDirection=t.MessageDeliveryStatus=t.MessageUpdateStatus=t.UserStatus=t.PresenceStatus=t.SearchQueryType=t.ChannelSearchQueryKey=t.MarkChannel=t.ChannelOrder=t.ChannelSearchQuerySortOptions=t.InviteKeyQueryType=t.ChannelQueryType=t.AuthState=t.PinnedMessageOperation=t.PinnedMessageOrder=t.PinnedMessageType=t.BMP=t.SOCKET_STATE=t.CLIENT_STATE=void 0,(T=t.CLIENT_STATE||(t.CLIENT_STATE={}))[T.CONNECTING=0]="CONNECTING",T[T.CONNECTED=1]="CONNECTED",T[T.DISCONNECTED=2]="DISCONNECTED",T[T.FAILED=3]="FAILED",T[T.RECONNECTING=4]="RECONNECTING",(x=t.SOCKET_STATE||(t.SOCKET_STATE={}))[x.CONNECTING=0]="CONNECTING",x[x.OPEN=1]="OPEN",x[x.CLOSING=2]="CLOSING",x[x.CLOSED=3]="CLOSED",(C=t.BMP||(t.BMP={}))[C.Error=0]="Error",C[C.Auth=1]="Auth",C[C.AuthResult=2]="AuthResult",C[C.Message=3]="Message",C[C.MessageMarkerStatus=4]="MessageMarkerStatus",C[C.PresenceMessage=5]="PresenceMessage",C[C.ChannelQueryV1=6]="ChannelQueryV1",C[C.ChannelActionV1=7]="ChannelActionV1",C[C.TokenQuery=8]="TokenQuery",C[C.MessageQuery=9]="MessageQuery",C[C.ChannelSearchQueryV1=10]="ChannelSearchQueryV1",C[C.UserQuery=11]="UserQuery",C[C.MessageAction=12]="MessageAction",C[C.SystemMessage=13]="SystemMessage",C[C.ReactionSearchQuery=14]="ReactionSearchQuery",C[C.MessageMarkerQuery=15]="MessageMarkerQuery",C[C.MessageMarkerResult=16]="MessageMarkerResult",C[C.TeamMessage=17]="TeamMessage",C[C.ForwardMessage=18]="ForwardMessage",C[C.ChannelEvent=19]="ChannelEvent",C[C.ProtoMessageReactionsQuery=20]="ProtoMessageReactionsQuery",C[C.PinnedMessagesQuery=21]="PinnedMessagesQuery",C[C.MessageLinkOGQuery=22]="MessageLinkOGQuery",C[C.ChannelInviteKeyRequest=23]="ChannelInviteKeyRequest",C[C.ChannelInviteKeyResponse=24]="ChannelInviteKeyResponse",C[C.PollVotesRequest=25]="PollVotesRequest",C[C.PollVotesResponse=26]="PollVotesResponse",C[C.ProtoUserEvent=27]="ProtoUserEvent",C[C.ChannelQuery=30]="ChannelQuery",C[C.ChannelSearchQuery=31]="ChannelSearchQuery",C[C.ChannelAction=32]="ChannelAction",C[C.Signal=100]="Signal",C[C.CDRRequest=101]="CDRRequest",C[C.CDRResponse=102]="CDRResponse",C[C.Pong=127]="Pong",(E=t.PinnedMessageType||(t.PinnedMessageType={}))[E.SHARED=0]="SHARED",E[E.PERSONAL=1]="PERSONAL",E[E.ALL=2]="ALL",(j=t.PinnedMessageOrder||(t.PinnedMessageOrder={}))[j.ASC=0]="ASC",j[j.DESC=1]="DESC",(k=t.PinnedMessageOperation||(t.PinnedMessageOperation={}))[k.PIN=0]="PIN",k[k.UNPIN=1]="UNPIN",k[k.GET_LIST=2]="GET_LIST",(A=t.AuthState||(t.AuthState={}))[A.NOT_AUTHENTICATED=0]="NOT_AUTHENTICATED",A[A.AUTH_FAILED=1]="AUTH_FAILED",A[A.AUTHENTICATING=2]="AUTHENTICATING",A[A.AUTHENTICATED=3]="AUTHENTICATED",A[A.CONNECTION_TIMEOUT=4]="CONNECTION_TIMEOUT",(_=t.ChannelQueryType||(t.ChannelQueryType={}))[_.NONE=0]="NONE",_[_.CREATE=1]="CREATE",_[_.DELETE=2]="DELETE",_[_.LEAVE=3]="LEAVE",_[_.JOIN=4]="JOIN",_[_.UPDATE=5]="UPDATE",_[_.GET=6]="GET",_[_.GET_LIST=7]="GET_LIST",_[_.ADD_MEMBER=8]="ADD_MEMBER",_[_.KICK_MEMBER=9]="KICK_MEMBER",_[_.MEMBERS=10]="MEMBERS",_[_.BLOCK=11]="BLOCK",_[_.UNBLOCK=12]="UNBLOCK",_[_.GET_BLOCK_LIST=13]="GET_BLOCK_LIST",_[_.BLOCK_MEMBER=14]="BLOCK_MEMBER",_[_.UNBLOCK_MEMBER=15]="UNBLOCK_MEMBER",_[_.GET_BLOCKED_MEMBER_LIST=16]="GET_BLOCKED_MEMBER_LIST",_[_.CHANGE_OWNER=17]="CHANGE_OWNER",_[_.CHANGE_ROLE=18]="CHANGE_ROLE",_[_.GET_ROLES=19]="GET_ROLES",_[_.DELETE_MESSAGES_FOR_ME=20]="DELETE_MESSAGES_FOR_ME",_[_.HIDE_CHANNELS=21]="HIDE_CHANNELS",_[_.UNHIDE_CHANNELS=22]="UNHIDE_CHANNELS",_[_.ARCHIVE_CHANNELS=23]="ARCHIVE_CHANNELS",_[_.UNARCHIVE_CHANNELS=24]="UNARCHIVE_CHANNELS",_[_.GET_ARCHIVED_CHANNELS=25]="GET_ARCHIVED_CHANNELS",_[_.GET_HIDDEN_CHANNELS=26]="GET_HIDDEN_CHANNELS",_[_.MARK_AS_UNREAD=27]="MARK_AS_UNREAD",_[_.GET_UNREADS=28]="GET_UNREADS",_[_.MUTE_CHANNELS=29]="MUTE_CHANNELS",_[_.UNMUTE_CHANNELS=30]="UNMUTE_CHANNELS",_[_.GET_MUTED_CHANNELS=31]="GET_MUTED_CHANNELS",_[_.MARK_AS_READ=32]="MARK_AS_READ",_[_.ATTACHMENTS=33]="ATTACHMENTS",_[_.PIN_CHANNELS=34]="PIN_CHANNELS",_[_.UNPIN_CHANNELS=35]="UNPIN_CHANNELS",_[_.CREATE_THREAD=36]="CREATE_THREAD",_[_.GET_THREADS=37]="GET_THREADS",_[_.DELETE_MESSAGES_FOR_EVERYONE=38]="DELETE_MESSAGES_FOR_EVERYONE",_[_.MESSAGE_AUTO_DELETE_PERIOD=39]="MESSAGE_AUTO_DELETE_PERIOD",_[_.FREEZE_CHANNEL=40]="FREEZE_CHANNEL",_[_.UNFREEZE_CHANNEL=41]="UNFREEZE_CHANNEL",_[_.JOIN_BY_INVITE_KEY=42]="JOIN_BY_INVITE_KEY",_[_.GET_BY_INVITE_KEY=43]="GET_BY_INVITE_KEY",(S=t.InviteKeyQueryType||(t.InviteKeyQueryType={}))[S.CREATE_CHANNEL_INVITE_KEY=0]="CREATE_CHANNEL_INVITE_KEY",S[S.UPDATE_CHANNEL_INVITE_KEY=1]="UPDATE_CHANNEL_INVITE_KEY",S[S.GET_CHANNEL_INVITE_KEY=2]="GET_CHANNEL_INVITE_KEY",S[S.GET_CHANNEL_INVITE_KEYS=3]="GET_CHANNEL_INVITE_KEYS",S[S.REGENERATE_CHANNEL_INVITE_KEY=4]="REGENERATE_CHANNEL_INVITE_KEY",S[S.REVOKE_CHANNEL_INVITE_KEY=5]="REVOKE_CHANNEL_INVITE_KEY",S[S.DELETE_REVOKED_CHANNEL_INVITE_KEY=6]="DELETE_REVOKED_CHANNEL_INVITE_KEY",S[S.GET_REVOKED_CHANNEL_INVITE_KEYS=7]="GET_REVOKED_CHANNEL_INVITE_KEYS",(P=t.ChannelSearchQuerySortOptions||(t.ChannelSearchQuerySortOptions={}))[P.Last_message=0]="Last_message",P[P.Created_at=1]="Created_at",(I=t.ChannelOrder||(t.ChannelOrder={}))[I.LAST_MESSAGE=0]="LAST_MESSAGE",I[I.CREATED_AT=1]="CREATED_AT",(w=t.MarkChannel||(t.MarkChannel={}))[w.AS_READ=0]="AS_READ",w[w.AS_UNREAD=1]="AS_UNREAD",(O=t.ChannelSearchQueryKey||(t.ChannelSearchQueryKey={}))[O.SUBJECT=0]="SUBJECT",O[O.URI=1]="URI",O[O.LABEL=2]="LABEL",O[O.USER=3]="USER",O[O.STATE=4]="STATE",O[O.TYPE=5]="TYPE",O[O.CREATED_AT=6]="CREATED_AT",(v=t.SearchQueryType||(t.SearchQueryType={}))[v.NONE=0]="NONE",v[v.CONTAINS=1]="CONTAINS",v[v.BEGINS_WITH=2]="BEGINS_WITH",v[v.EQUAL=3]="EQUAL",v[v.LT=4]="LT",v[v.LTE=5]="LTE",v[v.GT=6]="GT",v[v.GTE=7]="GTE",v[v.IN=8]="IN",v[v.BETWEEN=9]="BETWEEN",v[v.NOT_IN=10]="NOT_IN",(b=t.PresenceStatus||(t.PresenceStatus={}))[b.offline=0]="offline",b[b.online=1]="online",b[b.invisible=2]="invisible",b[b.away=3]="away",b[b.dnd=4]="dnd",(m=t.UserStatus||(t.UserStatus={}))[m.active=0]="active",m[m.inactive=1]="inactive",m[m.deleted=2]="deleted",(g=t.MessageUpdateStatus||(t.MessageUpdateStatus={}))[g.unmodified=0]="unmodified",g[g.edited=1]="edited",g[g.deleted=2]="deleted",g[g.composing=3]="composing",g[g.paused=4]="paused",g[g.deleteForMe=5]="deleteForMe",g[g.deleteHard=6]="deleteHard",g[g.moderated=7]="moderated",(y=t.MessageDeliveryStatus||(t.MessageDeliveryStatus={}))[y.pending=0]="pending",y[y.sent=1]="sent",y[y.received=2]="received",y[y.displayed=3]="displayed",(h=t.MessageQueryDirection||(t.MessageQueryDirection={}))[h.None=0]="None",h[h.Next=1]="Next",h[h.Previous=2]="Previous",h[h.Near=3]="Near",(f=t.MessageEventType||(t.MessageEventType={}))[f.Search=0]="Search",f[f.Update=1]="Update",f[f.Add_reaction=2]="Add_reaction",f[f.Delete_reaction=3]="Delete_reaction",f[f.Update_reaction=4]="Update_reaction",f[f.Attachments=5]="Attachments",f[f.Reactions=6]="Reactions",f[f.Threads=7]="Threads",f[f.Search_in_thread=8]="Search_in_thread",f[f.Save=9]="Save",f[f.Un_save=10]="Un_save",f[f.markers=11]="markers",f[f.Get_messages_by_ids=12]="Get_messages_by_ids",f[f.Unread_mentions=13]="Unread_mentions",f[f.Unread_reactions=14]="Unread_reactions",f[f.Change_vote=15]="Change_vote",f[f.Retract_vote=16]="Retract_vote",f[f.Close_poll=17]="Close_poll",(p=t.KeyType||(t.KeyType={}))[p.BODY=0]="BODY",p[p.TYPE=1]="TYPE",p[p.ATTACHMENT_TYPE=2]="ATTACHMENT_TYPE",(d=t.UserAction||(t.UserAction={}))[d.BLOCK=0]="BLOCK",d[d.UNBLOCK=1]="UNBLOCK",d[d.GET_BLOCK_LIST=2]="GET_BLOCK_LIST",(u=t.UserSearchOrder||(t.UserSearchOrder={}))[u.FIRST_NAME=0]="FIRST_NAME",u[u.LAST_NAME=1]="LAST_NAME",u[u.USERNAME=2]="USERNAME",(c=t.UserSearchFilter||(t.UserSearchFilter={}))[c.BY_ALL=0]="BY_ALL",c[c.BY_FIRST_NAME=1]="BY_FIRST_NAME",c[c.BY_LAST_NAME=2]="BY_LAST_NAME",c[c.BY_USERNAME=3]="BY_USERNAME",(l=t.ExceptionType||(t.ExceptionType={}))[l.INCLUSION=0]="INCLUSION",l[l.EXCLUSION=1]="EXCLUSION",(a=t.MembersType||(t.MembersType={}))[a.ALL=0]="ALL",a[a.PRIVILEGED=1]="PRIVILEGED",(s=t.MembersOrder||(t.MembersOrder={}))[s.AFFILATION=0]="AFFILATION",s[s.ASC=1]="ASC",s[s.DESC=2]="DESC",(i=t.MembersOrderKey||(t.MembersOrderKey={}))[i.USERNAME=0]="USERNAME",i[i.FIRSTNAME=1]="FIRSTNAME",i[i.LASTNAME=2]="LASTNAME",(o=t.MembersFilter||(t.MembersFilter={}))[o.NONE=0]="NONE",o[o.BY_ROLE=1]="BY_ROLE",(r=t.CDRRequestOrder||(t.CDRRequestOrder={}))[r.ASC=0]="ASC",r[r.DESC=1]="DESC",(n=t.CDRRequestDirection||(t.CDRRequestDirection={}))[n.NEXT=0]="NEXT",n[n.PREVIOUS=1]="PREVIOUS"}},__webpack_module_cache__={};function __webpack_require__(e){var t=__webpack_module_cache__[e];if(void 0!==t)return t.exports;var n=__webpack_module_cache__[e]={exports:{}};return __webpack_modules__[e].call(n.exports,n,n.exports,__webpack_require__),n.exports}__webpack_require__.d=(e,t)=>{for(var n in t)__webpack_require__.o(t,n)&&!__webpack_require__.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},__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=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),__webpack_require__.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var __webpack_exports__=__webpack_require__(8156);return __webpack_exports__})()));