!function(e){vart={};functionn(r){if(t[r])returnt[r].exports;vari=t[r]={i:r,l:!1,exports:{}};returne[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeofSymbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)returne;if(4&t&&"object"==typeofe&&e&&e.__esModule)returne;varr=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeofe)for(variine)n.d(r,i,function(t){returne[t]}.bind(null,i));returnr},n.n=function(e){vart=e&&e.__esModule?function(){returne.default}:function(){returne};returnn.d(t,"a",t),t},n.o=function(e,t){returnObject.prototype.hasOwnProperty.call(e,t)},n.p="/",n(n.s=330)}([function(e,t,n){"use strict";e.exports=n(162)},function(e,t){e.exports=function(e,t,n){returntine?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},function(e,t){"function"==typeofObject.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;varn=function(){};n.prototype=t.prototype,e.prototype=newn,e.prototype.constructor=e}}},function(e,t,n){varr=n(11),i=r.Buffer;functiono(e,t){for(varnine)t[n]=e[n]}functions(e,t,n){returni(e,t,n)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?e.exports=r:(o(r,t),t.Buffer=s),s.prototype=Object.create(i.prototype),o(i,s),s.from=function(e,t,n){if("number"==typeofe)thrownewTypeError("Argument must not be a number");returni(e,t,n)},s.alloc=function(e,t,n){if("number"!=typeofe)thrownewTypeError("Argument must be a number");varr=i(e);returnvoid0!==t?"string"==typeofn?r.fill(t,n):r.fill(t):r.fill(0),r},s.allocUnsafe=function(e){if("number"!=typeofe)thrownewTypeError("Argument must be a number");returni(e)},s.allocUnsafeSlow=function(e){if("number"!=typeofe)thrownewTypeError("Argument must be a number");returnr.SlowBuffer(e)}},function(e,t){e.exports=function(e){if(void0===e)thrownewReferenceError("this hasn't been initialised - super() hasn't been called");returne}},function(e,t,n){"use strict";varr=n(16);Object.defineProperty(t,"__esModule",{value:!0}),t.logger=void0;vari=r(n(268));consto=i.default.getLogger("matrix");t.logger=o,o.setLevel(i.default.levels.DEBUG)},function(e,t){varn;n=function(){returnthis}();try{n=n||newFunction("return this")()}catch(e){"object"==typeofwindow&&(n=window)}e.exports=n},function(e,t,n){varr=n(87);functioni(){if("function"!=typeofWeakMap)returnnull;vare=newWeakMap;returni=function(){returne},e}e.exports=function(e){if(e&&e.__esModule)returne;if(null===e||"object"!==r(e)&&"function"!=typeofe)return{default:e};vart=i();if(t&&t.has(e))returnt.get(e);varn={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(varsine)if(Object.prototype.hasOwnProperty.call(e,s)){vara=o?Object.getOwnPropertyDescriptor(e,s):null;a&&(a.get||a.set)?Object.defineProperty(n,s,a):n[s]=e[s]}returnn.default=e,t&&t.set(e,n),n}},function(e,t,n){"use strict";varr=n(16);Object.defineProperty(t,"__esModule",{value:!0}),t.encodeParams=function(e){lett="";for(constnine)e.hasOwnProperty(n)&&(t+="&"+encodeURIComponent(n)+"="+encodeURIComponent(e[n]));returnt.substring(1)},t.encodeUri=function(e,t){for(constnint)t.hasOwnProperty(n)&&(e=e.replace(n,encodeURIComponent(t[n])));returne},t.map=function(e,t){constn=newArray(e.length);for(letr=0;r<e.length;r++)n[r]=t(e[r]);returnn},t.filter=function(e,t){constn=[];for(letr=0;r<e.length;r++)t(e[r],r,e)&&n.push(e[r]);returnn},t.keys=function(e){constt=[];for(constnine)e.hasOwnProperty(n)&&t.push(n);returnt},t.values=function(e){constt=[];for(constnine)e.hasOwnProperty(n)&&t.push(e[n]);returnt},t.forEach=function(e,t){for(letn=0;n<e.length;n++)t(e[n],n)},t.findElement=function(e,t,n){
varr=n(178),i=n(179),o=n(88);functions(){returnc.TYPED_ARRAY_SUPPORT?2147483647:1073741823}functiona(e,t){if(s()<t)thrownewRangeError("Invalid typed array length");returnc.TYPED_ARRAY_SUPPORT?(e=newUint8Array(t)).__proto__=c.prototype:(null===e&&(e=newc(t)),e.length=t),e}functionc(e,t,n){if(!(c.TYPED_ARRAY_SUPPORT||thisinstanceofc))returnnewc(e,t,n);if("number"==typeofe){if("string"==typeoft)thrownewError("If encoding is specified then the first argument must be a string");returnl(this,e)}returnf(this,e,t,n)}functionf(e,t,n,r){if("number"==typeoft)thrownewTypeError('"value" argument must not be a number');return"undefined"!=typeofArrayBuffer&&tinstanceofArrayBuffer?function(e,t,n,r){if(t.byteLength,n<0||t.byteLength<n)thrownewRangeError("'offset' is out of bounds");if(t.byteLength<n+(r||0))thrownewRangeError("'length' is out of bounds");t=void0===n&&void0===r?newUint8Array(t):void0===r?newUint8Array(t,n):newUint8Array(t,n,r);c.TYPED_ARRAY_SUPPORT?(e=t).__proto__=c.prototype:e=d(e,t);returne}(e,t,n,r):"string"==typeoft?function(e,t,n){"string"==typeofn&&""!==n||(n="utf8");if(!c.isEncoding(n))thrownewTypeError('"encoding" must be a valid string encoding');varr=0|p(t,n),i=(e=a(e,r)).write(t,n);i!==r&&(e=e.slice(0,i));returne}(e,t,n):function(e,t){if(c.isBuffer(t)){varn=0|h(t.length);return0===(e=a(e,n)).length?e:(t.copy(e,0,0,n),e)}if(t){if("undefined"!=typeofArrayBuffer&&t.bufferinstanceofArrayBuffer||"length"int)return"number"!=typeoft.length||(r=t.length)!=r?a(e,0):d(e,t);if("Buffer"===t.type&&o(t.data))returnd(e,t.data)}varr;thrownewTypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(e,t)}functionu(e){if("number"!=typeofe)thrownewTypeError('"size" argument must be a number');if(e<0)thrownewRangeError('"size" argument must not be negative')}functionl(e,t){if(u(t),e=a(e,t<0?0:0|h(t)),!c.TYPED_ARRAY_SUPPORT)for(varn=0;n<t;++n)e[n]=0;returne}functiond(e,t){varn=t.length<0?0:0|h(t.length);e=a(e,n);for(varr=0;r<n;r+=1)e[r]=255&t[r];returne}functionh(e){if(e>=s())thrownewRangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s().toString(16)+" bytes");return0|e}functionp(e,t){if(c.isBuffer(e))returne.length;if("undefined"!=typeofArrayBuffer&&"function"==typeofArrayBuffer.isView&&(ArrayBuffer.isView(e)||einstanceofArrayBuffer))returne.byteLength;"string"!=typeofe&&(e=""+e);varn=e.length;if(0===n)return0;for(varr=!1;;)switch(t){case"ascii":case"latin1":case"binary":returnn;case"utf8":case"utf-8":casevoid0:returnF(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return2*n;case"hex":returnn>>>1;case"base64":returnq(e).length;default:if(r)returnF(e).length;t=(""+t).toLowerCase(),r=!0}}functionm(e,t,n){varr=!1;if((void0===t||t<0)&&(t=0),t>this.length)return"";if((void0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":returnO(this,t,n);case"utf8":case"utf-8":returnI(this,t,n);case"ascii":returnT(this,t,n);case"latin1":case"binary":returnR(this,t,n);case"base64":returnS(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":returnx(this,t,n);default:if(r)thrownewTypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}functiong(e,t,n){varr=e[t];e[t]=e[n],e[n]=r}functiony(e,t,n,r,i){if(0===e.length)return-1;if("string"==typeofn?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=i?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(i)return-1;n=e.length-1}elseif(n<0){if(!i)return-1;n=0}if("string"==typeoft&&(t=c.from(t,r)),c.isBuffer(t))return0===t.length?-1:b(e,t,n,r,i);if("number"==typeoft)returnt&=255,c.TYPED_ARRAY_SUPPORT&&"function"==typeofUint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):b(e,[t],n,r,i);thrownewTypeError("val must be string, number or Buffer")}functionb(e,t,n,r,i){varo,s=1,a=e.length,c=t.length;if(void0!==r&&("ucs2"===(r=String(r).toLowerCase())|
!function(){vart;functionn(e,r){vari=thisinstanceofn?this:t;if(i.reset(r),"string"==typeofe&&e.length>0&&i.hash(e),i!==this)returni}n.prototype.hash=function(e){vart,n,r,i,o;switch(o=e.length,this.len+=o,n=this.k1,r=0,this.rem){case0:n^=o>r?65535&e.charCodeAt(r++):0;case1:n^=o>r?(65535&e.charCodeAt(r++))<<8:0;case2:n^=o>r?(65535&e.charCodeAt(r++))<<16:0;case3:n^=o>r?(255&e.charCodeAt(r))<<24:0,n^=o>r?(65280&e.charCodeAt(r++))>>8:0}if(this.rem=o+this.rem&3,(o-=this.rem)>0){for(t=this.h1;t=5*(t=(t^=n=13715*(n=(n=11601*n+3432906752*(65535&n)&4294967295)<<15|n>>>17)+461832192*(65535&n)&4294967295)<<13|t>>>19)+3864292196&4294967295,!(r>=o);)n=65535&e.charCodeAt(r++)^(65535&e.charCodeAt(r++))<<8^(65535&e.charCodeAt(r++))<<16,n^=(255&(i=e.charCodeAt(r++)))<<24^(65280&i)>>8;switch(n=0,this.rem){case3:n^=(65535&e.charCodeAt(r+2))<<16;case2:n^=(65535&e.charCodeAt(r+1))<<8;case1:n^=65535&e.charCodeAt(r)}this.h1=t}returnthis.k1=n,this},n.prototype.result=function(){vare,t;returne=this.k1,t=this.h1,e>0&&(t^=e=13715*(e=(e=11601*e+3432906752*(65535&e)&4294967295)<<15|e>>>17)+461832192*(65535&e)&4294967295),t^=this.len,t=51819*(t^=t>>>16)+2246770688*(65535&t)&4294967295,t=44597*(t^=t>>>13)+3266445312*(65535&t)&4294967295,(t^=t>>>16)>>>0},n.prototype.reset=function(e){returnthis.h1="number"==typeofe?e:0,this.rem=this.k1=this.len=0,this},t=newn,e.exports=n}()},function(e,t,n){"use strict";t.randomBytes=t.rng=t.pseudoRandomBytes=t.prng=n(23),t.createHash=t.Hash=n(30),t.createHmac=t.Hmac=n(97);varr=n(207),i=Object.keys(r),o=["sha1","sha224","sha256","sha384","sha512","md5","rmd160"].concat(i);t.getHashes=function(){returno};vars=n(100);t.pbkdf2=s.pbkdf2,t.pbkdf2Sync=s.pbkdf2Sync;vara=n(209);t.Cipher=a.Cipher,t.createCipher=a.createCipher,t.Cipheriv=a.Cipheriv,t.createCipheriv=a.createCipheriv,t.Decipher=a.Decipher,t.createDecipher=a.createDecipher,t.Decipheriv=a.Decipheriv,t.createDecipheriv=a.createDecipheriv,t.getCiphers=a.getCiphers,t.listCiphers=a.listCiphers;varc=n(224);t.DiffieHellmanGroup=c.DiffieHellmanGroup,t.createDiffieHellmanGroup=c.createDiffieHellmanGroup,t.getDiffieHellman=c.getDiffieHellman,t.createDiffieHellman=c.createDiffieHellman,t.DiffieHellman=c.DiffieHellman;varf=n(229);t.createSign=f.createSign,t.Sign=f.Sign,t.createVerify=f.createVerify,t.Verify=f.Verify,t.createECDH=n(263);varu=n(264);t.publicEncrypt=u.publicEncrypt,t.privateEncrypt=u.privateEncrypt,t.publicDecrypt=u.publicDecrypt,t.privateDecrypt=u.privateDecrypt;varl=n(267);t.randomFill=l.randomFill,t.randomFillSync=l.randomFillSync,t.createCredentials=function(){thrownewError(["sorry, createCredentials is not implemented yet","we accept pull requests","https://github.com/crypto-browserify/crypto-browserify"].join("\n"))},t.constants={DH_CHECK_P_NOT_SAFE_PRIME:2,DH_CHECK_P_NOT_PRIME:1,DH_UNABLE_TO_CHECK_GENERATOR:4,DH_NOT_SUITABLE_GENERATOR:8,NPN_ENABLED:1,ALPN_ENABLED:1,RSA_PKCS1_PADDING:1,RSA_SSLV23_PADDING:2,RSA_NO_PADDING:3,RSA_PKCS1_OAEP_PADDING:4,RSA_X931_PADDING:5,RSA_PKCS1_PSS_PADDING:6,POINT_CONVERSION_COMPRESSED:2,POINT_CONVERSION_UNCOMPRESSED:4,POINT_CONVERSION_HYBRID:6}},function(e,t,n){varr=n(2),i=n(24),o=n(3).Buffer,s=[1518500249,1859775393,-1894007588,-899497514],a=newArray(80);functionc(){this.init(),this._w=a,i.call(this,64,56)}functionf(e){returne<<30|e>>>2}functionu(e,t,n,r){return0===e?t&n|~t&r:2===e?t&n|t&r|n&r:t^n^r}r(c,i),c.prototype.init=function(){returnthis._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},c.prototype._update=function(e){for(vart,n=this._w,r=0|this._a,i=0|this._b,o=0|this._c,a=0|this._d,c=0|this._e,l=0;l<16;++l)n[l]=e.readInt32BE(4*l);for(;l<80;++l)n[l]=n[l-3]^n[l-8]^n[l-14]^n[l-16];for(vard=0;d<80;++d){varh=~~(d/20),p=0|((t=r)<<5|t>>>27)+u(h,i,o,a)+c+n[d]+s[h];c=a,a=o,o=f(i),i=r,r=p}this._a=r+this._a|0,this._b=i+this._b|0,this._c=o+this._c|0,this._d=a+this._d|0,this._e=c+this._e|0},c.prototype._hash=function(){vare=o.allocUnsafe(20);returne.writeInt32BE(0|this._a,0),e.writeInt32BE(0|this._b,4),e.writeInt32BE(0|this._c,8),e.writeInt
*/var r=/;*([!#$%&'*+.^_`|~0-9A-Za-z-]+) *= *("(?:[\u000b\u0020\u0021\u0023-\u005b\u005d-\u007e\u0080-\u00ff]|\\[\u000b\u0020-\u00ff])*"|[!#$%&'*+.^_`|~0-9A-Za-z-]+) */g,i=/^[\u000b\u0020-\u007e\u0080-\u00ff]+$/,o=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+$/,s=/\\([\u000b\u0020-\u00ff])/g,a=/([\\"])/g,c=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+\/[!#$%&'*+.^_`|~0-9A-Za-z-]+$/;functionf(e){vart=String(e);if(o.test(t))returnt;if(t.length>0&&!i.test(t))thrownewTypeError("invalid parameter value");return'"'+t.replace(a,"\\$1")+'"'}functionu(e){this.parameters=Object.create(null),this.type=e}t.format=function(e){if(!e||"object"!=typeofe)thrownewTypeError("argument obj is required");vart=e.parameters,n=e.type;if(!n||!c.test(n))thrownewTypeError("invalid type");varr=n;if(t&&"object"==typeoft)for(vari,s=Object.keys(t).sort(),a=0;a<s.length;a++){if(i=s[a],!o.test(i))thrownewTypeError("invalid parameter name");r+="; "+i+"="+f(t[i])}returnr},t.parse=function(e){if(!e)thrownewTypeError("argument string is required");vart="object"==typeofe?function(e){vart;"function"==typeofe.getHeader?t=e.getHeader("content-type"):"object"==typeofe.headers&&(t=e.headers&&e.headers["content-type"]);if("string"!=typeoft)thrownewTypeError("content-type header is missing from object");returnt}(e):e;if("string"!=typeoft)thrownewTypeError("argument string is required to be a string");varn=t.indexOf(";"),i=-1!==n?t.substr(0,n).trim():t.trim();if(!c.test(i))thrownewTypeError("invalid media type");varo=newu(i.toLowerCase());if(-1!==n){vara,f,l;for(r.lastIndex=n;f=r.exec(t);){if(f.index!==n)thrownewTypeError("invalid parameter format");n+=f[0].length,a=f[1].toLowerCase(),'"'===(l=f[2])[0]&&(l=l.substr(1,l.length-2).replace(s,"$1")),o.parameters[a]=l}if(n!==t.length)thrownewTypeError("invalid parameter format")}returno}},function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.setNow=function(e){a=e||Date.now},t.setTimeout=function(e,t){(t=t||0)<0&&(t=0);constn=Array.prototype.slice.call(arguments,2),r=a()+t,i=o++;constf={runAt:r,func:e,params:n,key:i},l=u(s,(function(e){returne.runAt-r}));returns.splice(l,0,f),c(),i},t.clearTimeout=function(e){if(0===s.length)return;lett;for(t=0;t<s.length;t++){if(s[t].key==e){s.splice(t,1);break}}0===t&&c()};varr=n(5);leti,o=0;consts=[];leta=Date.now;functionc(){i&&e.clearTimeout(i);constt=s[0];if(!t)return;constn=a(),r=Math.min(t.runAt-n,1e3);i=e.setTimeout(f,r)}functionf(){lett;constn=a(),i=[];for(;;){conste=s[0];if(!e||e.runAt>n)break;t=s.shift(),t.key,i.push(t)}c();for(letn=0;n<i.length;n++){t=i[n];try{t.func.apply(e,t.params)}catch(e){r.logger.error("Uncaught exception in callback function",e.stack||e)}}}functionu(e,t){letn=0,r=e.length;for(;n<r;){consti=n+r>>1;t(e[i])>0?r=i:n=i+1}returnn}}).call(this,n(6))},function(e,t,n){"use strict";functionr(e){this.filter_json=e,this.types=e.types||null,this.not_types=e.not_types||[],this.rooms=e.rooms||null,this.not_rooms=e.not_rooms||[],this.senders=e.senders||null,this.not_senders=e.not_senders||[],this.contains_url=e.contains_url||null}Object.defineProperty(t,"__esModule",{value:!0}),t.FilterComponent=r,r.prototype.check=function(e){returnthis._checkFields(e.getRoomId(),e.getSender(),e.getType(),!!e.getContent()&&void0!==e.getContent().url)},r.prototype._checkFields=function(e,t,n,r){consti={rooms:function(t){returne===t},senders:function(e){returnt===e},types:function(e){returnfunction(e,t){if(t.endsWith("*")){constn=t.slice(0,-1);returne.substr(0,n.length)===n}returne===t}(n,e)}},o=this;for(lete=0;e<Object.keys(i).length;e++){constt=Object.keys(i)[e],n=i[t];if(o["not_"+t].filter(n).length>0)return!1;constr=o[t];if(r&&!r.map(n))return!1}consts=this.filter_json.contains_url;returnvoid0===s||s===r},r.prototype.filter=function(e){returne.filter(this.check,this)},r.prototype.limit=function(){returnvoid0!==this.filter_json.limit?this.filter_json.limit:10}},function(e,t,n){"use strict";(function(e){varr=n(7);Object.defineProperty(t,"__esModule",{value:!0}),t.SyncApi=m;vari=n(47),o=n(13