Jelajahi Sumber

[bugfix] reset input height after submit

B Thibault 8 tahun lalu
induk
melakukan
2e0063d061
3 mengubah file dengan 82 tambahan dan 78 penghapusan
  1. 10 7
      cli/msgInput.js
  2. 2 1
      cli/ui.js
  3. 70 70
      srv/public/mimouchat.min.js

+ 10 - 7
cli/msgInput.js

@@ -225,17 +225,20 @@ function focusInput() {
     document.getElementById(R.id.message.input).focus();
 }
 
+function updateInputRowCount(input) {
+    var nbRows = 1;
+    for (var i =0, nbChars = input.value.length; i < nbChars; i++)
+        if (input.value[i] === '\n')
+            nbRows++;
+    input.rows = Math.min(5, nbRows);
+    while (input.rows < 5 && input.scrollHeight > input.clientHeight) // FIXME very very ugly
+        input.rows++;
+}
+
 function initMsgInput() {
     var lastKeyDown = 0,
         input = document.getElementById(R.id.message.input);
 
-    function updateInputRowCount(input) {
-        var nbRows = 1;
-        for (var i =0, nbChars = input.value.length; i < nbChars; i++)
-            if (input.value[i] === '\n')
-                nbRows++;
-        input.rows = Math.min(5, nbRows);
-    }
     input.addEventListener('input', function() {
         if (SELECTED_ROOM) {
             var now = Date.now();

+ 2 - 1
cli/ui.js

@@ -685,7 +685,7 @@ document.addEventListener('DOMContentLoaded', function() {
 });
 
 function onMsgFormSubmit() {
-    var input =document.getElementById(R.id.message.input);
+    var input = document.getElementById(R.id.message.input);
     if (SELECTED_ROOM && input.value) {
         if (onTextEntered(input.value)) {
             input.value = "";
@@ -698,6 +698,7 @@ function onMsgFormSubmit() {
                 onReplyingToUpdated();
             }
             document.getElementById(R.id.message.slashComplete).textContent = '';
+            updateInputRowCount(input);
         }
     }
     focusInput();

+ 70 - 70
srv/public/mimouchat.min.js

@@ -42,104 +42,104 @@ Ba:k,oa:"custom"}))}d.length&&(c.dataset.cursor=JSON.stringify([f,h]))}}if(!d.le
 d.length;g<a;g++)if(e=d[g],e instanceof ga){if(!m){var m=!0;l.appendChild(Va(J.ma))}b=document.createElement("span");b.className="chat-command-userIcon";b.style.backgroundImage='url("'+pa(e)+'")';l.appendChild(Wa("@"+e.getName(),b))}else e instanceof v?(m||(m=!0,l.appendChild(Va(J.j))),l.appendChild(Wa("#"+e.name))):e.Ba?(m!==e.oa&&(m=e.oa,l.appendChild(Va(e.oa))),l.appendChild(Wa(e.name,e.Ba))):(m!==e.W&&(m=e.W,l.appendChild(Va(e.W))),l.appendChild(Wa(e)));c.appendChild(l)}}
 function ab(a){if(R)return O(new K("PUT","api/msg?room="+Q.id+"&ts="+R.id+"&text="+encodeURIComponent(a))),!0;if("/"===a[0]){var b=a.indexOf(" "),c=a.substr(0,-1===b?void 0:b);a=-1===b?"":a.substr(b);var b=P,d=$a.Ya(c);if(d)return a=a.trim(),d.exec(b,Q,a),!0;if(b&&(c=b.h.data[c])){if("/me"===c.name)bb(Q,a,!0);else if("/msg"===c.name){a=a.trim();var b=/(\S+)\s+(.*)/.exec(a);a:{var e=b[1],d=P,f=e,h=[];"#"===f[0]&&(f=f.substr(1));for(var k in d.j)d.j[k].name===f&&h.push(d.j[k]);if(h.length)var g=h[0];
 else{k=[];"@"===e[0]&&(e=e.substr(1));for(g in d.i)d.i[g].getName()===e&&k.push(d.j[g]);if(k.length)for(g=0,d=k.length;g<d;g++)if(k[g].O){g=k[g].O;break a}g=null}}g&&bb(g,b[2],!1)}O(new K("POST","api/cmd?room="+Q.id+"&cmd="+encodeURIComponent(c.name.substr(1))+"&args="+encodeURIComponent(a)));return!0}return!1}g=bb(Q,a,!1);cb(Q,a,g,S);return!0}function T(){document.getElementById("msgInput").focus()}
-function db(){function a(a){for(var b=1,c=0,d=a.value.length;c<d;c++)"\n"===a.value[c]&&b++;a.rows=Math.min(5,b)}var b=0,c=document.getElementById("msgInput");c.addEventListener("input",function(){if(Q){var c=Date.now();b+3E3<c&&(P.self.N||Q instanceof t)&&(O(new K("POST","api/typing?room="+Q.id)),b=c);Xa(this);a(this)}});c.addEventListener("keydown",function(b){if(9===b.keyCode)return b.preventDefault(),!1;if(13===b.keyCode)return b.preventDefault(),b.shiftKey||b.altKey||b.ctrlKey?(b=this.selectionStart,
-this.value=this.value.substr(0,b)+"\n"+this.value.substr(this.selectionEnd),a(this),this.selectionStart=this.selectionEnd=b+1):eb(),!1});document.getElementById("slashList").addEventListener("click",function(a){if(Q){var b=a.target;if(a=this.dataset.cursor)for(a=JSON.parse(a);b&&b!==this;){if(b.dataset.input){var c=document.getElementById("msgInput"),b=b.dataset.input;c.value.length<=a[1]&&(b+=" ");c.value=c.value.substr(0,a[0])+b+c.value.substr(a[1]);c.selectionStart=c.selectionEnd=a[0]+b.length;
-Xa(c);c.focus();break}b=b.parentElement}}})};var fb=[],gb=0;
-function hb(){var a=document.createDocumentFragment(),b=xa(function(a){return!a.fa&&!1!==a.ba}),c=[],d=[],e=[],f=[],h={};b.sort(function(a,b){if(a[0]!==b[0])return a[0]-b[0];var c=D(C.context,a),d=D(C.context,b);a=c.j[a];b=d.j[b];return a.name===b.name?(h[a.id]=J.Aa(c.a.name,a.name),h[b.id]=J.Aa(d.a.name,b.name),c.a.name.localeCompare(d.a.name)):a.name.localeCompare(b.name)});b.forEach(function(a){a=wa(a);if(a instanceof t){var b;if(b=!a.a.Va){var k=h[a.id];b=document.createElement("li");var p=document.createElement("a");
-b.id="room_"+a.id;p.href="#"+a.id;b.className="chat-context-room chat-ims presence-indicator";p.textContent=k||a.a.getName();b.appendChild(ib());b.appendChild(p);a.a.N||b.classList.add("presence-away");Q===a&&b.classList.add("selected");a.I!==a.C&&void 0!==a.I&&(b.classList.add("unread"),b.classList.add("unreadHi"));b=k=b}b&&(a.A?c.push(k):f.push(k))}else if(k=h[a.id],b=document.createElement("li"),p=document.createElement("a"),b.id="room_"+a.id,p.href="#"+a.id,a.h?(b.className="chat-context-room chat-group",
-b.dataset.count=Object.keys(a.i||{}).length):b.className="chat-context-room chat-channel",Q===a&&b.classList.add("selected"),p.textContent=k||a.name,b.appendChild(ib()),b.appendChild(p),a.I!==a.C&&void 0!==a.I&&(b.classList.add("unread"),0<=U.indexOf(a)&&b.classList.add("unreadHi")),k=b)a.A?c.push(k):a.h?e.push(k):d.push(k)});c.length&&a.appendChild(jb(J.A));c.forEach(function(b){a.appendChild(b)});d.length&&a.appendChild(jb(J.j));d.forEach(function(b){a.appendChild(b)});e.forEach(function(b){a.appendChild(b)});
-f.length&&a.appendChild(jb(J.hb));f.forEach(function(b){a.appendChild(b)});document.getElementById("chanList").textContent="";document.getElementById("chanList").appendChild(a);kb.apply(document.getElementById("chanSearch"));lb();mb();P&&nb(P.a.id,P.i,function(a){document.getElementById("chatCtx").style.backgroundImage="url("+a+")"})}
-function ob(){va(function(a){var b=a.u,c;for(c in a.self.j)if(!a.self.j[c].fa){var d=document.getElementById("room_"+c);b[c]?d.classList.add("chat-context-typing"):d.classList.remove("chat-context-typing")}for(var e in a.i)(c=a.i[e].O)&&!c.fa&&(d=document.getElementById("room_"+c.id))&&(b[c.id]?d.classList.add("chat-context-typing"):d.classList.remove("chat-context-typing"))});pb()}
-function pb(){var a;document.getElementById("whoistyping").textContent="";if(P&&Q&&(a=P.u[Q.id])){var b=document.createDocumentFragment(),c=!1,d;for(d in a)(a=F(d))?b.appendChild(qb(a)):c=!0;c&&(C.b=0);document.getElementById("whoistyping").appendChild(b)}}function rb(a){a?document.body.classList.remove("no-network"):document.body.classList.add("no-network");mb()}
-function sb(){var a=Q.name||(Q.a?Q.a.getName():void 0);if(!a){console.error("No name provided for ",Q);var a=[],b;for(b in Q.i)a.push(Q.i[b].getName());a=a.join(", ")}document.getElementById("currentRoomTitle").textContent=a;tb();T();document.getElementById("fileUploadContainer").classList.add("hidden");ub();S&&(S=null,V());R&&(R=null,V());mb();pb()}
+function db(a){for(var b=1,c=0,d=a.value.length;c<d;c++)"\n"===a.value[c]&&b++;for(a.rows=Math.min(5,b);5>a.rows&&a.scrollHeight>a.clientHeight;)a.rows++}
+function eb(){var a=0,b=document.getElementById("msgInput");b.addEventListener("input",function(){if(Q){var b=Date.now();a+3E3<b&&(P.self.N||Q instanceof t)&&(O(new K("POST","api/typing?room="+Q.id)),a=b);Xa(this);db(this)}});b.addEventListener("keydown",function(a){if(9===a.keyCode)return a.preventDefault(),!1;if(13===a.keyCode)return a.preventDefault(),a.shiftKey||a.altKey||a.ctrlKey?(a=this.selectionStart,this.value=this.value.substr(0,a)+"\n"+this.value.substr(this.selectionEnd),db(this),this.selectionStart=
+this.selectionEnd=a+1):fb(),!1});document.getElementById("slashList").addEventListener("click",function(a){if(Q){var b=a.target;if(a=this.dataset.cursor)for(a=JSON.parse(a);b&&b!==this;){if(b.dataset.input){var c=document.getElementById("msgInput"),b=b.dataset.input;c.value.length<=a[1]&&(b+=" ");c.value=c.value.substr(0,a[0])+b+c.value.substr(a[1]);c.selectionStart=c.selectionEnd=a[0]+b.length;Xa(c);c.focus();break}b=b.parentElement}}})};var gb=[],hb=0;
+function ib(){var a=document.createDocumentFragment(),b=xa(function(a){return!a.fa&&!1!==a.ba}),c=[],d=[],e=[],f=[],h={};b.sort(function(a,b){if(a[0]!==b[0])return a[0]-b[0];var c=D(C.context,a),d=D(C.context,b);a=c.j[a];b=d.j[b];return a.name===b.name?(h[a.id]=J.Aa(c.a.name,a.name),h[b.id]=J.Aa(d.a.name,b.name),c.a.name.localeCompare(d.a.name)):a.name.localeCompare(b.name)});b.forEach(function(a){a=wa(a);if(a instanceof t){var b;if(b=!a.a.Va){var k=h[a.id];b=document.createElement("li");var p=document.createElement("a");
+b.id="room_"+a.id;p.href="#"+a.id;b.className="chat-context-room chat-ims presence-indicator";p.textContent=k||a.a.getName();b.appendChild(jb());b.appendChild(p);a.a.N||b.classList.add("presence-away");Q===a&&b.classList.add("selected");a.I!==a.C&&void 0!==a.I&&(b.classList.add("unread"),b.classList.add("unreadHi"));b=k=b}b&&(a.A?c.push(k):f.push(k))}else if(k=h[a.id],b=document.createElement("li"),p=document.createElement("a"),b.id="room_"+a.id,p.href="#"+a.id,a.h?(b.className="chat-context-room chat-group",
+b.dataset.count=Object.keys(a.i||{}).length):b.className="chat-context-room chat-channel",Q===a&&b.classList.add("selected"),p.textContent=k||a.name,b.appendChild(jb()),b.appendChild(p),a.I!==a.C&&void 0!==a.I&&(b.classList.add("unread"),0<=U.indexOf(a)&&b.classList.add("unreadHi")),k=b)a.A?c.push(k):a.h?e.push(k):d.push(k)});c.length&&a.appendChild(kb(J.A));c.forEach(function(b){a.appendChild(b)});d.length&&a.appendChild(kb(J.j));d.forEach(function(b){a.appendChild(b)});e.forEach(function(b){a.appendChild(b)});
+f.length&&a.appendChild(kb(J.hb));f.forEach(function(b){a.appendChild(b)});document.getElementById("chanList").textContent="";document.getElementById("chanList").appendChild(a);lb.apply(document.getElementById("chanSearch"));mb();nb();P&&ob(P.a.id,P.i,function(a){document.getElementById("chatCtx").style.backgroundImage="url("+a+")"})}
+function pb(){va(function(a){var b=a.u,c;for(c in a.self.j)if(!a.self.j[c].fa){var d=document.getElementById("room_"+c);b[c]?d.classList.add("chat-context-typing"):d.classList.remove("chat-context-typing")}for(var e in a.i)(c=a.i[e].O)&&!c.fa&&(d=document.getElementById("room_"+c.id))&&(b[c.id]?d.classList.add("chat-context-typing"):d.classList.remove("chat-context-typing"))});qb()}
+function qb(){var a;document.getElementById("whoistyping").textContent="";if(P&&Q&&(a=P.u[Q.id])){var b=document.createDocumentFragment(),c=!1,d;for(d in a)(a=F(d))?b.appendChild(rb(a)):c=!0;c&&(C.b=0);document.getElementById("whoistyping").appendChild(b)}}function sb(a){a?document.body.classList.remove("no-network"):document.body.classList.add("no-network");nb()}
+function tb(){var a=Q.name||(Q.a?Q.a.getName():void 0);if(!a){console.error("No name provided for ",Q);var a=[],b;for(b in Q.i)a.push(Q.i[b].getName());a=a.join(", ")}document.getElementById("currentRoomTitle").textContent=a;ub();T();document.getElementById("fileUploadContainer").classList.add("hidden");vb();S&&(S=null,V());R&&(R=null,V());nb();qb()}
 function V(){if(S){document.body.classList.add("replyingTo");var a=document.getElementById("replyToContainer"),b=document.createElement("a");b.addEventListener("click",function(){S=null;V()});b.className="replyto-close";b.textContent="x";a.textContent="";a.appendChild(b);a.appendChild(S.L())}else document.body.classList.remove("replyingTo"),document.getElementById("replyToContainer").textContent="";T()}
-function vb(){if(R){document.body.classList.add("replyingTo");var a=document.getElementById("replyToContainer"),b=document.createElement("a");b.addEventListener("click",function(){R=null;vb()});b.className="replyto-close";b.textContent="x";a.textContent="";a.appendChild(b);a.appendChild(R.L());document.getElementById("msgInput").value=R.text}else document.body.classList.remove("replyingTo"),document.getElementById("replyToContainer").textContent="";T()}
-window.toggleReaction=function(a,b,c){var d=C.a[a],e,f;(d=C.a[a])&&(e=oa(d,b))&&(f=D(C.context,a))&&(e.D[c]&&-1!==e.D[c].indexOf(f.self.id)?O(new K("DELETE","api/reaction?room="+a+"&msg="+b+"&reaction="+encodeURIComponent(c))):wb(a,b,c))};function xb(a,b){document.getElementById("linkFavicon").href=a||b?"favicon.png?h="+a+"&m="+b:"favicon_ok.png"}
-function mb(){var a=U.length,b="";if(W)b="!"+J.ab+" - Mimouchat",document.getElementById("linkFavicon").href="favicon_err.png";else if(a)b="(!"+a+")",xb(a,a);else{var c=0;ua(C.context,function(a){a.I>a.C&&c++});c&&(b="("+c+")");xb(0,c)}!b.length&&Q&&(b=Q.name);document.title=b.length?b:"Mimouchat"}
-function yb(){if("Notification"in window)if("granted"===Notification.permission){var a=Date.now();if(gb+3E4<a){var b=new Notification(J.bb);gb=a;setTimeout(function(){b.close()},5E3)}}else"denied"!==Notification.permission&&Notification.requestPermission()}
-function tb(){var a=document.createDocumentFragment(),b=Q.id,c=null,d=0,e=null,f;Q.A?document.getElementById("chatSystemContainer").classList.add("starred"):document.getElementById("chatSystemContainer").classList.remove("starred");fb=[];C.a[b]&&C.a[b].a.forEach(function(b){if(b.h)b.Y();else{var h=b.M(),k=!1;c&&c.K===b.K&&b.K?30>Math.abs(d-b.m)&&!(b instanceof z)?e.classList.add("chatmsg-same-ts"):d=b.m:(d=b.m,k=!0);(!c||c.m<=Q.C)&&b.m>Q.C?h.classList.add("chatmsg-first-unread"):h.classList.remove("chatmsg-first-unread");
-if(b instanceof z)e=c=null,d=0,a.appendChild(h),f=null;else{if(k||!f)f=zb(F(b.K),b.username),fb.push(f),a.appendChild(f);c=b;e=h;f.content.appendChild(h)}}});var h=!0;Ab.forEach(function(b){b.channel===Q.id&&(h&&(f=zb(P.self,""),a.appendChild(f),h=!1),f.content.appendChild(b.c))});b=document.getElementById("chatWindow");b.textContent="";b.appendChild(a);b.scrollTop=b.scrollHeight-b.clientHeight;Bb();window.hasFocus&&ub()}
-function Cb(a,b){if(a.classList.contains("chatmsg-hover-reply"))R&&(R=null,vb()),S!==b&&(S=b,V());else if(a.classList.contains("chatmsg-hover-reaction")){var c=Q.id,d=b.id;Db.qa(document.body,P,function(a){a&&wb(c,d,a)})}else a.classList.contains("chatmsg-hover-edit")?(S&&(S=null,V()),R!==b&&(R=b,vb())):a.classList.contains("chatmsg-hover-star")?b.A?O(new K("DELETE","api/starMsg?room="+Q.id+"&msgId="+b.id)):O(new K("POST","api/starMsg?room="+Q.id+"&msgId="+b.id)):a.classList.contains("chatmsg-hover-pin")?
-b.pinned?Eb(Q,b):O(new K("POST","api/pinMsg?room="+Q.id+"&msgId="+b.id)):a.classList.contains("chatmsg-hover-remove")&&(S&&(S=null,V()),R&&(R=null,vb()),O(new K("DELETE","api/msg?room="+Q.id+"&ts="+b.id)))}function bb(a,b,c){b={channel:a.id,text:b.trim(),Ca:c,c:Fb(b,c)};Ab.push(b);a===Q&&tb();return b}
-function Gb(a){function b(a,b){for(b=b||a.target;b!==a.currentTarget&&b;){if(b.id&&b.classList.contains("chatmsg-item"))return b.id;b=b.parentElement}}for(var c=a.target;c!==a.currentTarget&&c&&!c.classList.contains("chatmsg-hover");){var d;if(c.parentElement&&c.classList.contains("chatmsg-attachment-actions-item")){var e=c.dataset.attachmentIndex,f=c.dataset.actionIndex;if((d=b(a,c))&&void 0!==e&&void 0!==f){d=d.substr(d.lastIndexOf("_")+1);(a=oa(C.a[Q.id],d))&&a.s[e]&&a.s[e].actions&&a.s[e].actions[f]&&
-Hb(a,a.s[e],a.s[e].actions[f]);break}}if(c.parentElement&&c.parentElement.classList.contains("chatmsg-hover")){if(d=b(a,c))d=d.substr(d.lastIndexOf("_")+1),(a=oa(C.a[Q.id],d))&&Cb(c,a);break}c=c.parentElement}}
-function Hb(a,b,c){function d(){var d={actions:[c],attachment_id:b.id,callback_id:b.callback_id,channel_id:e,is_ephemeral:a instanceof B,message_ts:a.id},h=new K("POST","api/attachmentAction?serviceId="+a.K);O(h,JSON.stringify(d))}var e=Q.id;c.confirm?Ua(Ta(new Ga(c.confirm.title,c.confirm.text),c.confirm.ok_text,c.confirm.dismiss_text),d).qa():d()}
-function Bb(){if(!1!==X.a){var a=document.getElementById("chatWindow").getBoundingClientRect().top;fb.forEach(function(b){var c=b.ga,d=c.clientHeight;b=b.getBoundingClientRect();c.style.top=Math.max(0,Math.min(a-b.top,b.height-d-d/2))+"px"})}}
-document.addEventListener("DOMContentLoaded",function(){za();Ib();db();var a=document.getElementById("chanSearch");a.addEventListener("input",kb);a.addEventListener("blur",kb);document.getElementById("chatWindow").addEventListener("click",Gb);window.addEventListener("hashchange",function(){document.location.hash&&"#"===document.location.hash[0]&&lb()});document.addEventListener("mouseover",function(a){a=a.target;if(Jb.wb(a))Jb.$();else{for(;a&&a!==this;){if("A"===a.nodeName){var b=a.href,d=b.indexOf("#");
-if(0<=d){b=b.substr(d+1);if(d=D(C.context,b)){Jb.fb(d,d.j[b]).show(a);return}a:{for(var d=C.context,e=0,f=d.a.length;e<f;e++)if(d.a[e].i[b]){d=d.a[e];break a}d=null}if(d&&(b=d.i[b].O)){Jb.fb(d,b).show(a);return}}}a=a.parentElement}Jb.tb()}});document.getElementById("chatCtxButton").addEventListener("click",function(){var a=document.getElementById("chatCtx");a.classList.contains("opened")?a.classList.remove("opened"):a.classList.add("opened")});document.getElementById("currentRoomStar").addEventListener("click",
+function wb(){if(R){document.body.classList.add("replyingTo");var a=document.getElementById("replyToContainer"),b=document.createElement("a");b.addEventListener("click",function(){R=null;wb()});b.className="replyto-close";b.textContent="x";a.textContent="";a.appendChild(b);a.appendChild(R.L());document.getElementById("msgInput").value=R.text}else document.body.classList.remove("replyingTo"),document.getElementById("replyToContainer").textContent="";T()}
+window.toggleReaction=function(a,b,c){var d=C.a[a],e,f;(d=C.a[a])&&(e=oa(d,b))&&(f=D(C.context,a))&&(e.D[c]&&-1!==e.D[c].indexOf(f.self.id)?O(new K("DELETE","api/reaction?room="+a+"&msg="+b+"&reaction="+encodeURIComponent(c))):xb(a,b,c))};function yb(a,b){document.getElementById("linkFavicon").href=a||b?"favicon.png?h="+a+"&m="+b:"favicon_ok.png"}
+function nb(){var a=U.length,b="";if(W)b="!"+J.ab+" - Mimouchat",document.getElementById("linkFavicon").href="favicon_err.png";else if(a)b="(!"+a+")",yb(a,a);else{var c=0;ua(C.context,function(a){a.I>a.C&&c++});c&&(b="("+c+")");yb(0,c)}!b.length&&Q&&(b=Q.name);document.title=b.length?b:"Mimouchat"}
+function zb(){if("Notification"in window)if("granted"===Notification.permission){var a=Date.now();if(hb+3E4<a){var b=new Notification(J.bb);hb=a;setTimeout(function(){b.close()},5E3)}}else"denied"!==Notification.permission&&Notification.requestPermission()}
+function ub(){var a=document.createDocumentFragment(),b=Q.id,c=null,d=0,e=null,f;Q.A?document.getElementById("chatSystemContainer").classList.add("starred"):document.getElementById("chatSystemContainer").classList.remove("starred");gb=[];C.a[b]&&C.a[b].a.forEach(function(b){if(b.h)b.Y();else{var h=b.M(),k=!1;c&&c.K===b.K&&b.K?30>Math.abs(d-b.m)&&!(b instanceof z)?e.classList.add("chatmsg-same-ts"):d=b.m:(d=b.m,k=!0);(!c||c.m<=Q.C)&&b.m>Q.C?h.classList.add("chatmsg-first-unread"):h.classList.remove("chatmsg-first-unread");
+if(b instanceof z)e=c=null,d=0,a.appendChild(h),f=null;else{if(k||!f)f=Ab(F(b.K),b.username),gb.push(f),a.appendChild(f);c=b;e=h;f.content.appendChild(h)}}});var h=!0;Bb.forEach(function(b){b.channel===Q.id&&(h&&(f=Ab(P.self,""),a.appendChild(f),h=!1),f.content.appendChild(b.c))});b=document.getElementById("chatWindow");b.textContent="";b.appendChild(a);b.scrollTop=b.scrollHeight-b.clientHeight;Cb();window.hasFocus&&vb()}
+function Db(a,b){if(a.classList.contains("chatmsg-hover-reply"))R&&(R=null,wb()),S!==b&&(S=b,V());else if(a.classList.contains("chatmsg-hover-reaction")){var c=Q.id,d=b.id;Eb.qa(document.body,P,function(a){a&&xb(c,d,a)})}else a.classList.contains("chatmsg-hover-edit")?(S&&(S=null,V()),R!==b&&(R=b,wb())):a.classList.contains("chatmsg-hover-star")?b.A?O(new K("DELETE","api/starMsg?room="+Q.id+"&msgId="+b.id)):O(new K("POST","api/starMsg?room="+Q.id+"&msgId="+b.id)):a.classList.contains("chatmsg-hover-pin")?
+b.pinned?Fb(Q,b):O(new K("POST","api/pinMsg?room="+Q.id+"&msgId="+b.id)):a.classList.contains("chatmsg-hover-remove")&&(S&&(S=null,V()),R&&(R=null,wb()),O(new K("DELETE","api/msg?room="+Q.id+"&ts="+b.id)))}function bb(a,b,c){b={channel:a.id,text:b.trim(),Ca:c,c:Gb(b,c)};Bb.push(b);a===Q&&ub();return b}
+function Hb(a){function b(a,b){for(b=b||a.target;b!==a.currentTarget&&b;){if(b.id&&b.classList.contains("chatmsg-item"))return b.id;b=b.parentElement}}for(var c=a.target;c!==a.currentTarget&&c&&!c.classList.contains("chatmsg-hover");){var d;if(c.parentElement&&c.classList.contains("chatmsg-attachment-actions-item")){var e=c.dataset.attachmentIndex,f=c.dataset.actionIndex;if((d=b(a,c))&&void 0!==e&&void 0!==f){d=d.substr(d.lastIndexOf("_")+1);(a=oa(C.a[Q.id],d))&&a.s[e]&&a.s[e].actions&&a.s[e].actions[f]&&
+Ib(a,a.s[e],a.s[e].actions[f]);break}}if(c.parentElement&&c.parentElement.classList.contains("chatmsg-hover")){if(d=b(a,c))d=d.substr(d.lastIndexOf("_")+1),(a=oa(C.a[Q.id],d))&&Db(c,a);break}c=c.parentElement}}
+function Ib(a,b,c){function d(){var d={actions:[c],attachment_id:b.id,callback_id:b.callback_id,channel_id:e,is_ephemeral:a instanceof B,message_ts:a.id},h=new K("POST","api/attachmentAction?serviceId="+a.K);O(h,JSON.stringify(d))}var e=Q.id;c.confirm?Ua(Ta(new Ga(c.confirm.title,c.confirm.text),c.confirm.ok_text,c.confirm.dismiss_text),d).qa():d()}
+function Cb(){if(!1!==X.a){var a=document.getElementById("chatWindow").getBoundingClientRect().top;gb.forEach(function(b){var c=b.ga,d=c.clientHeight;b=b.getBoundingClientRect();c.style.top=Math.max(0,Math.min(a-b.top,b.height-d-d/2))+"px"})}}
+document.addEventListener("DOMContentLoaded",function(){za();Jb();eb();var a=document.getElementById("chanSearch");a.addEventListener("input",lb);a.addEventListener("blur",lb);document.getElementById("chatWindow").addEventListener("click",Hb);window.addEventListener("hashchange",function(){document.location.hash&&"#"===document.location.hash[0]&&mb()});document.addEventListener("mouseover",function(a){a=a.target;if(Kb.wb(a))Kb.$();else{for(;a&&a!==this;){if("A"===a.nodeName){var b=a.href,d=b.indexOf("#");
+if(0<=d){b=b.substr(d+1);if(d=D(C.context,b)){Kb.fb(d,d.j[b]).show(a);return}a:{for(var d=C.context,e=0,f=d.a.length;e<f;e++)if(d.a[e].i[b]){d=d.a[e];break a}d=null}if(d&&(b=d.i[b].O)){Kb.fb(d,b).show(a);return}}}a=a.parentElement}Kb.tb()}});document.getElementById("chatCtxButton").addEventListener("click",function(){var a=document.getElementById("chatCtx");a.classList.contains("opened")?a.classList.remove("opened"):a.classList.add("opened")});document.getElementById("currentRoomStar").addEventListener("click",
 function(a){a.preventDefault();Q&&(Q.A?O(new K("POST","api/unstarChannel?room="+Q.id)):O(new K("POST","api/starChannel?room="+Q.id)));return!1});document.getElementById("fileUploadCancel").addEventListener("click",function(a){a.preventDefault();document.getElementById("fileUploadError").classList.add("hidden");document.getElementById("fileUploadContainer").classList.add("hidden");document.getElementById("fileUploadInput").value="";return!1});document.getElementById("ctxMenuLogout").addEventListener("click",
-Kb);document.getElementById("ctxMenuSettings").addEventListener("click",function(a){a.preventDefault();Lb.display()});document.getElementById("fileUploadForm").addEventListener("submit",function(a){a.preventDefault();a=document.getElementById("fileUploadInput");var b=a.value;b&&(b=b.substr(b.lastIndexOf("\\")+1),Mb(b,a.files[0],function(a){var b=document.getElementById("fileUploadError");a?(b.textContent=a,b.classList.remove("hidden")):(b.classList.add("hidden"),document.getElementById("fileUploadInput").value=
-"",document.getElementById("fileUploadContainer").classList.add("hidden"))}));return!1});document.getElementById("attachFile").addEventListener("click",function(a){a.preventDefault();Q&&document.getElementById("fileUploadContainer").classList.remove("hidden");return!1});document.getElementById("msgFormSubmit").addEventListener("click",function(a){a.preventDefault();eb();return!1});document.getElementById("msgForm").addEventListener("submit",function(a){a.preventDefault();eb();return!1});window.addEventListener("blur",
-function(){window.hasFocus=!1});window.addEventListener("focus",function(){window.hasFocus=!0;gb=0;Q&&ub();T()});document.getElementById("chatWindow").addEventListener("scroll",Bb);window.hasFocus=!0;document.getElementById("emojiButton").addEventListener("click",function(){P&&Db.qa(document.body,P,function(a){a&&(document.getElementById("msgInput").value+=":"+a+":");T()})});Nb()});
-function eb(){var a=document.getElementById("msgInput");Q&&a.value&&ab(a.value)&&(a.value="",S&&(S=null,V()),R&&(R=null,V()),document.getElementById("slashList").textContent="");T()};var Lb=function(){function a(){document.getElementById("settings").classList.add("hidden");c=!1}function b(a){d&&(document.getElementById("settings").classList.remove("display-"+d),document.getElementById("setting-menu-"+d).classList.remove("selected"),document.getElementById("settings-serviceAddSection").classList.add("hidden"));document.getElementById("settings").classList.add("display-"+a);document.getElementById("setting-menu-"+a).classList.add("selected");d=a}var c=!1,d=null,e={U:"services",
+Lb);document.getElementById("ctxMenuSettings").addEventListener("click",function(a){a.preventDefault();Mb.display()});document.getElementById("fileUploadForm").addEventListener("submit",function(a){a.preventDefault();a=document.getElementById("fileUploadInput");var b=a.value;b&&(b=b.substr(b.lastIndexOf("\\")+1),Nb(b,a.files[0],function(a){var b=document.getElementById("fileUploadError");a?(b.textContent=a,b.classList.remove("hidden")):(b.classList.add("hidden"),document.getElementById("fileUploadInput").value=
+"",document.getElementById("fileUploadContainer").classList.add("hidden"))}));return!1});document.getElementById("attachFile").addEventListener("click",function(a){a.preventDefault();Q&&document.getElementById("fileUploadContainer").classList.remove("hidden");return!1});document.getElementById("msgFormSubmit").addEventListener("click",function(a){a.preventDefault();fb();return!1});document.getElementById("msgForm").addEventListener("submit",function(a){a.preventDefault();fb();return!1});window.addEventListener("blur",
+function(){window.hasFocus=!1});window.addEventListener("focus",function(){window.hasFocus=!0;hb=0;Q&&vb();T()});document.getElementById("chatWindow").addEventListener("scroll",Cb);window.hasFocus=!0;document.getElementById("emojiButton").addEventListener("click",function(){P&&Eb.qa(document.body,P,function(a){a&&(document.getElementById("msgInput").value+=":"+a+":");T()})});Ob()});
+function fb(){var a=document.getElementById("msgInput");Q&&a.value&&ab(a.value)&&(a.value="",S&&(S=null,V()),R&&(R=null,V()),document.getElementById("slashList").textContent="",db(a));T()};var Mb=function(){function a(){document.getElementById("settings").classList.add("hidden");c=!1}function b(a){d&&(document.getElementById("settings").classList.remove("display-"+d),document.getElementById("setting-menu-"+d).classList.remove("selected"),document.getElementById("settings-serviceAddSection").classList.add("hidden"));document.getElementById("settings").classList.add("display-"+a);document.getElementById("setting-menu-"+a).classList.add("selected");d=a}var c=!1,d=null,e={U:"services",
 display:"display",Qb:"privacy"};document.getElementById("settingMenuItems").addEventListener("click",function(a){for(var c=a.target;a.currentTarget!==c&&c;c=c.parentNode)if(c.dataset&&c.dataset.target)for(var d in e)if(e[d]===c.dataset.target){b(e[d]);return}});document.getElementById("settingDiscardClose").addEventListener("click",a);document.getElementById("settings-serviceAddButton").addEventListener("click",function(a){a.preventDefault();document.getElementById("settings-serviceAddSection").classList.remove("hidden");
 return!1});document.getElementById("settings-serviceAddConfirm").addEventListener("click",function(a){a.preventDefault();document.location.href=document.getElementById("settings-serviceAddServiceList").value;return!1});document.getElementById("settingCommit").addEventListener("click",function(){var b={};document.getElementById("settings-displayEmojiProvider").value!==X.h&&(b.emojiProvider=document.getElementById("settings-displayEmojiProvider").value);var c=!!document.getElementById("settings-displayDisplayAvatar").checked;
-c!==(!1!==X.a)&&(b.displayAvatar=c);c=!!document.getElementById("settings-displayColorfulNames").checked;c!==(!0===X.b)&&(b.colorfulNames=c);var c=X,d;for(d in b){Ob(c,b);Pb();O(new K("POST","api/settings?service=null&device=null"),JSON.stringify(b));break}a()});return{display:function(a){if(!c){document.getElementById("settings").classList.remove("hidden");var d=document.createDocumentFragment(),f=!1,g;for(g in X.U){var n=X.U[g];for(m in n){var f=document.createElement("li"),p=document.createElement("span"),
+c!==(!1!==X.a)&&(b.displayAvatar=c);c=!!document.getElementById("settings-displayColorfulNames").checked;c!==(!0===X.b)&&(b.colorfulNames=c);var c=X,d;for(d in b){Pb(c,b);Qb();O(new K("POST","api/settings?service=null&device=null"),JSON.stringify(b));break}a()});return{display:function(a){if(!c){document.getElementById("settings").classList.remove("hidden");var d=document.createDocumentFragment(),f=!1,g;for(g in X.U){var n=X.U[g];for(m in n){var f=document.createElement("li"),p=document.createElement("span"),
 l=document.createElement("span");p.textContent=g;l.textContent=n[m];f.className="settings-service-list-item";p.className="settings-service-list-item-provider";l.className="settings-service-list-item-service";f.appendChild(p);f.appendChild(l);d.appendChild(f);f=!0}}n=document.getElementById("settings-serviceList");n.textContent="";f?(document.getElementById("settings-serviceListEmpty").classList.remove("hidden"),n.appendChild(d)):document.getElementById("settings-serviceListEmpty").classList.add("hidden");
-d=document.createDocumentFragment();n=document.getElementById("settings-displayEmojiProvider");for(g in Qb){var m=document.createElement("option");m.value=g;m.textContent=Qb[g].name;Qb[g]===Ya&&(m.selected=!0);d.appendChild(m)}n.textContent="";n.appendChild(d);document.getElementById("settings-displayDisplayAvatar").checked=!1!==X.a;document.getElementById("settings-displayColorfulNames").checked=!0===X.b;c=!0}b(a||e.U);return this},Bb:function(){return this},yb:e}}();function Rb(a){if(void 0!==a.latitude&&void 0!==a.longitude&&-90<=a.latitude&&90>=a.latitude&&-180<=a.longitude&&180>=a.longitude){var b=0,c=function(a,b,c,d){return new Promise(function(e,f){var g=new Image;g.addEventListener("load",function(){d.S=g;e(d)});g.addEventListener("error",function(){console.warn("Error loading tile ",{zoom:a,x:b,y:c});f(g)});g.crossOrigin="anonymous";g.src="https://c.tile.openstreetmap.org/"+a+"/"+b+"/"+c+".png"})},d=document.createElement("canvas"),e=document.createElement("canvas");
+d=document.createDocumentFragment();n=document.getElementById("settings-displayEmojiProvider");for(g in Rb){var m=document.createElement("option");m.value=g;m.textContent=Rb[g].name;Rb[g]===Ya&&(m.selected=!0);d.appendChild(m)}n.textContent="";n.appendChild(d);document.getElementById("settings-displayDisplayAvatar").checked=!1!==X.a;document.getElementById("settings-displayColorfulNames").checked=!0===X.b;c=!0}b(a||e.U);return this},Bb:function(){return this},yb:e}}();function Sb(a){if(void 0!==a.latitude&&void 0!==a.longitude&&-90<=a.latitude&&90>=a.latitude&&-180<=a.longitude&&180>=a.longitude){var b=0,c=function(a,b,c,d){return new Promise(function(e,f){var g=new Image;g.addEventListener("load",function(){d.S=g;e(d)});g.addEventListener("error",function(){console.warn("Error loading tile ",{zoom:a,x:b,y:c});f(g)});g.crossOrigin="anonymous";g.src="https://c.tile.openstreetmap.org/"+a+"/"+b+"/"+c+".png"})},d=document.createElement("canvas"),e=document.createElement("canvas");
 d.height=d.width=e.height=e.width=300;var f=d.getContext("2d"),h=e.getContext("2d"),k=function(a,b,c){a=a*Math.PI/180;b=b*Math.PI/180;c=c*Math.PI/180;return Math.abs(6371E3*Math.acos(Math.pow(Math.sin(a),2)+Math.pow(Math.cos(a),2)*Math.cos(c-b)))},g=function(a,d,e,g){h.fillStyle="#808080";h.fillRect(0,0,300,300);f.fillStyle="#808080";f.fillRect(0,0,300,300);var p=Math.pow(2,a),m=(e+180)/360*p,n=(1-Math.log(Math.tan(d*Math.PI/180)+1/Math.cos(d*Math.PI/180))/Math.PI)/2*p,l=Math.floor(m),L=Math.floor(n),
 ra=g?100*g/k(180/Math.PI*Math.atan(.5*(Math.exp(Math.PI-2*Math.PI*L/p)-Math.exp(-(Math.PI-2*Math.PI*L/p)))),l/p*360-180,(l+1)/p*360-180):0;d=b;for(e=0;3>e;e++)for(g=0;3>g;g++)c(a,l+e-1,L+g-1,{ub:e,xb:g,lb:d}).then(function(a){if(a.lb===b){h.drawImage(a.S,100*a.ub,100*a.xb,100,100);a=m-l;var c=n-L;a=100*a+100;c=100*c+100;f.putImageData(h.getImageData(0,0,300,300),0,0);void 0!==ra&&(f.beginPath(),f.arc(a,c,Math.max(ra,10),0,2*Math.PI,!1),f.lineWidth=2,f.fillStyle="rgba(244, 146, 66, 0.4)",f.strokeStyle=
 "rgba(244, 146, 66, 0.8)",f.stroke(),f.fill());if(void 0===ra||25<ra)f.strokeStyle="rgba(244, 146, 66, 1)",f.beginPath(),f.moveTo(a-5,c-5),f.lineTo(a+5,c+5),f.stroke(),f.moveTo(a+5,c-5),f.lineTo(a-5,c+5),f.stroke()}})},n,p=function(c){c=Math.max(4,Math.min(19,c));n!==c&&(b++,n=c,g(n,Number(a.latitude),Number(a.longitude),Number(a.accuracy)))};p(12);var e=document.createElement("div"),l=document.createElement("div"),m=document.createElement("button"),u=document.createElement("button");e.className=
-"OSM-wrapper";d.className="OSM-canvas";l.className="OSM-controls";u.className="OSM-controls-zoomMin";m.className="OSM-controls-zoomPlus";u.addEventListener("click",function(){p(n-1)});m.addEventListener("click",function(){p(n+1)});l.appendChild(u);l.appendChild(m);e.appendChild(d);e.appendChild(l);return e}};function ib(){var a=document.createElement("span"),b=document.createElement("span"),c=document.createElement("span"),d=document.createElement("span");a.className="typing-container";b.className="typing-dot1";c.className="typing-dot2";d.className="typing-dot3";b.textContent=c.textContent=d.textContent=".";a.appendChild(b);a.appendChild(c);a.appendChild(d);return a}var jb=function(){var a={};return function(b){var c=a[b];c||(c=a[b]=document.createElement("header"),c.textContent=b);return c}}();
-function Sb(a){var b={},c=a;if(P)for(var d=P;!b[a];){var e=d.b.data[a];if(e)if("alias:"==e.substr(0,6))b[a]=!0,a=e.substr(6);else return a=document.createElement("span"),a.className="emoji-custom emoji",a.style.backgroundImage="url('"+e+"')",a.textContent=":"+c+":",a.title=c,a;else return a}return c}function Za(a){return"makeEmoji"in window?(a=Sb(a),"string"===typeof a&&(a=window.makeEmoji(a)),"string"===typeof a?null:a):null}
-function Tb(a){var b=document.createElement("div"),c=document.createElement("div");b.ca=document.createElement("ul");b.s=document.createElement("ul");b.D=document.createElement("ul");b.m=document.createElement("div");b.ra=document.createElement("div");b.ha=document.createElement("span");b.className="chatmsg-item";b.m.className="chatmsg-ts";b.ra.className="chatmsg-msg";b.ha.className="chatmsg-author-name";if(a){b.id=a.b+"_"+a.id;var d=b.ca,e=a.context.aa;a=C.context.Ca(a.K);if(e.replyToMsg){var f=
+"OSM-wrapper";d.className="OSM-canvas";l.className="OSM-controls";u.className="OSM-controls-zoomMin";m.className="OSM-controls-zoomPlus";u.addEventListener("click",function(){p(n-1)});m.addEventListener("click",function(){p(n+1)});l.appendChild(u);l.appendChild(m);e.appendChild(d);e.appendChild(l);return e}};function jb(){var a=document.createElement("span"),b=document.createElement("span"),c=document.createElement("span"),d=document.createElement("span");a.className="typing-container";b.className="typing-dot1";c.className="typing-dot2";d.className="typing-dot3";b.textContent=c.textContent=d.textContent=".";a.appendChild(b);a.appendChild(c);a.appendChild(d);return a}var kb=function(){var a={};return function(b){var c=a[b];c||(c=a[b]=document.createElement("header"),c.textContent=b);return c}}();
+function Tb(a){var b={},c=a;if(P)for(var d=P;!b[a];){var e=d.b.data[a];if(e)if("alias:"==e.substr(0,6))b[a]=!0,a=e.substr(6);else return a=document.createElement("span"),a.className="emoji-custom emoji",a.style.backgroundImage="url('"+e+"')",a.textContent=":"+c+":",a.title=c,a;else return a}return c}function Za(a){return"makeEmoji"in window?(a=Tb(a),"string"===typeof a&&(a=window.makeEmoji(a)),"string"===typeof a?null:a):null}
+function Ub(a){var b=document.createElement("div"),c=document.createElement("div");b.ca=document.createElement("ul");b.s=document.createElement("ul");b.D=document.createElement("ul");b.m=document.createElement("div");b.ra=document.createElement("div");b.ha=document.createElement("span");b.className="chatmsg-item";b.m.className="chatmsg-ts";b.ra.className="chatmsg-msg";b.ha.className="chatmsg-author-name";if(a){b.id=a.b+"_"+a.id;var d=b.ca,e=a.context.aa;a=C.context.Ca(a.K);if(e.replyToMsg){var f=
 document.createElement("li");f.className="chatmsg-hover-reply";f.style.backgroundImage='url("repl.svg")';d.appendChild(f)}e.reactMsg&&(f=document.createElement("li"),f.className="chatmsg-hover-reaction",f.style.backgroundImage='url("smile.svg")',d.appendChild(f));if(a&&e.editMsg||e.editOtherMsg)f=document.createElement("li"),f.className="chatmsg-hover-edit",f.style.backgroundImage='url("edit.svg")',d.appendChild(f);e.starMsg&&(d.ka=document.createElement("li"),d.ka.className="chatmsg-hover-star",
 d.appendChild(d.ka));e.pinMsg&&(f=document.createElement("li"),f.className="chatmsg-hover-pin",d.appendChild(f),f.style.backgroundImage='url("pin.svg")');if(a&&e.removeMsg||e.moderate)e=document.createElement("li"),e.className="chatmsg-hover-remove",e.style.backgroundImage='url("remove.svg")',d.appendChild(e);b.ca.className="chatmsg-hover"}c.appendChild(b.ha);c.appendChild(b.ra);c.appendChild(b.m);c.appendChild(b.s);b.F=document.createElement("div");b.F.className="chatmsg-edited";c.appendChild(b.F);
 c.appendChild(b.D);c.className="chatmsg-content";b.s.className="chatmsg-attachments";b.D.className="chatmsg-reactions";b.appendChild(c);b.appendChild(b.ca);return b}
-function Ub(a){if(!a.length)return"black";for(var b=0,c=0,c=[],d=0,e=0,f=0,h,k=0,g=a.length;k<g;k++)c[k]=a.charCodeAt(k),d+=c[k];h=d/a.length;c.forEach(function(a){var c=Math.abs(h-a);e+=c;f=Math.max(c,f);b=a+((b<<5)-b)});e/=a.length;b=Math.abs(b-60)%199*360/199;c=f?Math.round(Math.min(100,Math.max(75,e/f*25+75))):100;return"hsl("+b+", 100%, "+c+"%)"}
-function zb(a,b){var c=document.createElement("div"),d=document.createElement("div"),e=document.createElement("a"),f=document.createElement("img");c.ga=document.createElement("span");c.ga.className="chatmsg-author-img-wrapper";f.className="chatmsg-author-img";e.className="chatmsg-author-name";e.href="#"+a.id;a?(e.textContent=a.getName(),e.style.backgroundColor=Ub(a.getName()),f.src=pa(a)):(e.textContent=b||"?",f.src="");c.ga.appendChild(f);d.appendChild(c.ga);d.appendChild(e);d.className="chatmsg-author";
-c.className="chatmsg-authorGroup";c.appendChild(d);c.content=document.createElement("div");c.content.className="chatmsg-author-messages";c.appendChild(c.content);return c}function Vb(a){var b={good:"#2fa44f",warning:"#de9e31",danger:"#d50200"};if(a){if("#"===a[0])return a;if(b[a])return b[a]}return"#e3e4e6"}
-function Wb(a,b,c){var d=document.createElement("li"),e=document.createElement("div"),f=document.createElement("div"),h=document.createElement("a"),k=document.createElement("div"),g=document.createElement("img"),n=document.createElement("a"),p=document.createElement("div"),l=document.createElement("div"),m=document.createElement("div"),u=document.createElement("img"),A=document.createElement("div");d.className="chatmsg-attachment";e.style.borderColor=Vb(b.color||"");e.className="chatmsg-attachment-block";
+function Vb(a){if(!a.length)return"black";for(var b=0,c=0,c=[],d=0,e=0,f=0,h,k=0,g=a.length;k<g;k++)c[k]=a.charCodeAt(k),d+=c[k];h=d/a.length;c.forEach(function(a){var c=Math.abs(h-a);e+=c;f=Math.max(c,f);b=a+((b<<5)-b)});e/=a.length;b=Math.abs(b-60)%199*360/199;c=f?Math.round(Math.min(100,Math.max(75,e/f*25+75))):100;return"hsl("+b+", 100%, "+c+"%)"}
+function Ab(a,b){var c=document.createElement("div"),d=document.createElement("div"),e=document.createElement("a"),f=document.createElement("img");c.ga=document.createElement("span");c.ga.className="chatmsg-author-img-wrapper";f.className="chatmsg-author-img";e.className="chatmsg-author-name";e.href="#"+a.id;a?(e.textContent=a.getName(),e.style.backgroundColor=Vb(a.getName()),f.src=pa(a)):(e.textContent=b||"?",f.src="");c.ga.appendChild(f);d.appendChild(c.ga);d.appendChild(e);d.className="chatmsg-author";
+c.className="chatmsg-authorGroup";c.appendChild(d);c.content=document.createElement("div");c.content.className="chatmsg-author-messages";c.appendChild(c.content);return c}function Wb(a){var b={good:"#2fa44f",warning:"#de9e31",danger:"#d50200"};if(a){if("#"===a[0])return a;if(b[a])return b[a]}return"#e3e4e6"}
+function Xb(a,b,c){var d=document.createElement("li"),e=document.createElement("div"),f=document.createElement("div"),h=document.createElement("a"),k=document.createElement("div"),g=document.createElement("img"),n=document.createElement("a"),p=document.createElement("div"),l=document.createElement("div"),m=document.createElement("div"),u=document.createElement("img"),A=document.createElement("div");d.className="chatmsg-attachment";e.style.borderColor=Wb(b.color||"");e.className="chatmsg-attachment-block";
 f.className="chatmsg-attachment-pretext";b.pretext?f.innerHTML=a.w(b.pretext):f.classList.add("hidden");h.target="_blank";b.title?(h.innerHTML=a.w(b.title),b.title_link&&(h.href=b.title_link),h.className="chatmsg-attachment-title"):h.className="hidden chatmsg-attachment-title";n.target="_blank";k.className="chatmsg-author";b.author_name&&(n.innerHTML=a.w(b.author_name),n.href=b.author_link||"",n.className="chatmsg-author-name",g.className="chatmsg-author-img",b.author_icon&&(g.src=b.author_icon,k.appendChild(g)),
-k.appendChild(n));m.className="chatmsg-attachment-thumb";b.thumb_url?(g=document.createElement("img"),g.src=b.thumb_url,m.appendChild(g),e.classList.add("has-thumb"),b.video_html&&(m.dataset.video=b.video_html)):m.classList.add("hidden");p.className="chatmsg-attachment-content";g=a.w(b.text||"");l.className="chatmsg-attachment-text";g&&""!=g?l.innerHTML=g:l.classList.add("hidden");p.appendChild(m);p.appendChild(l);b.geo&&(l=Rb(b.geo))&&p.appendChild(l);u.className="chatmsg-attachment-img";b.image_url?
+k.appendChild(n));m.className="chatmsg-attachment-thumb";b.thumb_url?(g=document.createElement("img"),g.src=b.thumb_url,m.appendChild(g),e.classList.add("has-thumb"),b.video_html&&(m.dataset.video=b.video_html)):m.classList.add("hidden");p.className="chatmsg-attachment-content";g=a.w(b.text||"");l.className="chatmsg-attachment-text";g&&""!=g?l.innerHTML=g:l.classList.add("hidden");p.appendChild(m);p.appendChild(l);b.geo&&(l=Sb(b.geo))&&p.appendChild(l);u.className="chatmsg-attachment-img";b.image_url?
 u.src=b.image_url:u.classList.add("hidden");A.className="chatmsg-attachment-footer";b.footer&&(l=document.createElement("span"),l.className="chatmsg-attachment-footer-text",l.innerHTML=a.w(b.footer),b.footer_icon&&(m=document.createElement("img"),m.src=b.footer_icon,m.className="chatmsg-attachment-footer-icon",A.appendChild(m)),A.appendChild(l));b.ts&&(l=document.createElement("span"),l.className="chatmsg-ts",l.innerHTML=J.R(b.ts),A.appendChild(l));e.appendChild(h);e.appendChild(k);e.appendChild(p);
 e.appendChild(u);if(b.fields&&b.fields.length){var x=document.createElement("ul");e.appendChild(x);x.className="chatmsg-attachment-fields";b.fields.forEach(function(b){var c=b.title||"",d=b.value||"";b=!!b["short"];var e=document.createElement("li"),f=document.createElement("div"),g=document.createElement("div");e.className="field";b||e.classList.add("field-long");f.className="field-title";f.textContent=c;g.className="field-text";g.innerHTML=a.w(d);e.appendChild(f);e.appendChild(g);e&&x.appendChild(e)})}if(b.actions&&
-b.actions.length)for(h=document.createElement("ul"),h.className="chatmsg-attachment-actions "+Pa,e.appendChild(h),k=0,p=b.actions.length;k<p;k++)(u=b.actions[k])&&(u=Xb(c,k,u))&&h.appendChild(u);e.appendChild(A);d.appendChild(f);d.appendChild(e);return d}
-function Xb(a,b,c){var d=document.createElement("li"),e=Vb(c.style);d.textContent=c.text;e!==Vb()&&(d.style.color=e);d.style.borderColor=e;d.dataset.attachmentIndex=a;d.dataset.actionIndex=b;d.className="chatmsg-attachment-actions-item "+Na;return d}function qb(a){var b=document.createElement("li"),c=document.createElement("span");c.textContent=a.getName();b.appendChild(ib());b.appendChild(c);return b};var Db=function(){function a(a,b){for(a=a.target;a!==n&&a&&"LI"!==a.nodeName;)a=a.parentElement;a&&"LI"===a.nodeName&&a.id&&"emojibar-"===a.id.substr(0,9)?b(a.id.substr(9)):b(null)}function b(){x={};l.textContent="";window.emojiProviderHeader&&(l.appendChild(k(window.emojiProviderHeader)),m.textContent="",l.appendChild(m));l.appendChild(k("emojicustom.png"));l.appendChild(u)}function c(){if(!d())return!1;r&&r(null);return!0}function d(){return n.parentElement?(n.parentElement.removeChild(p),n.parentElement.removeChild(n),
+b.actions.length)for(h=document.createElement("ul"),h.className="chatmsg-attachment-actions "+Pa,e.appendChild(h),k=0,p=b.actions.length;k<p;k++)(u=b.actions[k])&&(u=Yb(c,k,u))&&h.appendChild(u);e.appendChild(A);d.appendChild(f);d.appendChild(e);return d}
+function Yb(a,b,c){var d=document.createElement("li"),e=Wb(c.style);d.textContent=c.text;e!==Wb()&&(d.style.color=e);d.style.borderColor=e;d.dataset.attachmentIndex=a;d.dataset.actionIndex=b;d.className="chatmsg-attachment-actions-item "+Na;return d}function rb(a){var b=document.createElement("li"),c=document.createElement("span");c.textContent=a.getName();b.appendChild(jb());b.appendChild(c);return b};var Eb=function(){function a(a,b){for(a=a.target;a!==n&&a&&"LI"!==a.nodeName;)a=a.parentElement;a&&"LI"===a.nodeName&&a.id&&"emojibar-"===a.id.substr(0,9)?b(a.id.substr(9)):b(null)}function b(){x={};l.textContent="";window.emojiProviderHeader&&(l.appendChild(k(window.emojiProviderHeader)),m.textContent="",l.appendChild(m));l.appendChild(k("emojicustom.png"));l.appendChild(u)}function c(){if(!d())return!1;r&&r(null);return!0}function d(){return n.parentElement?(n.parentElement.removeChild(p),n.parentElement.removeChild(n),
 !0):!1}function e(a){var b=0;a=void 0===a?A.value:a;if(g()){var c=0,d=window.searchEmojis(a),e=f(d,I?I.self.T.a:[]),p;for(k in x)x[k].visible&&(x[k].visible=!1,m.removeChild(x[k].c));var k=0;for(p=e.length;k<p;k++){var n=e[k].name,l=x[n];if(!l){var l=x,L=n;var r=n;var n=window.makeEmoji(d[n]),H=document.createElement("span");H.appendChild(n);H.className="emoji-medium";r=h(r,H);l=l[L]=r}l.visible||(l.visible=!0,m.appendChild(l.c));c++}b+=c}k=b;c=0;for(E in y)y[E].visible&&(y[E].visible=!1,u.removeChild(y[E].c));
 if(I){d=f(I.b.data,I?I.self.T.a:[]);var E=0;for(b=d.length;E<b;E++)L=d[E].name,""!==a&&L.substr(0,a.length)!==a||"alias:"===I.b.data[L].substr(0,6)||(e=y[L],e||(e=y,l=p=L,L=I.b.data[L],r=document.createElement("span"),n=document.createElement("span"),r.className="emoji emoji-custom",r.style.backgroundImage='url("'+L+'")',r.textContent=":"+l+":",r.title=l,n.appendChild(r),n.className="emoji-medium",l=h(l,n),e=e[p]=l),e.visible||(e.visible=!0,u.appendChild(e.c)),c++);E=c}else E=0;return k+E}function f(a,
 b){var c=[],d;for(d in a){var e={name:d,gb:0,count:0};if(a[d].names)for(var f=0,g=a[d].names.length;f<g;f++)e.count+=b[a[d].names[f]]||0;c.push(e)}return c=c.sort(function(a,b){var c=b.count-a.count;return c?c:a.gb-b.gb})}function h(a,b){var c=document.createElement("li");c.appendChild(b);c.className="emojibar-list-item";c.id="emojibar-"+a;return{visible:!1,c:c}}function k(a){var b=document.createElement("img"),c=document.createElement("div");b.src=a;c.appendChild(b);c.className="emojibar-header";
 return c}function g(){return"searchEmojis"in window}var n=document.createElement("div"),p=document.createElement("div"),l=document.createElement("div"),m=document.createElement("ul"),u=document.createElement("ul"),A=document.createElement("input"),x={},y={},M=document.createElement("div"),H=document.createElement("span"),E=document.createElement("span"),r,I;p.addEventListener("click",function(a){var b=n.getBoundingClientRect();(a.screenY<b.top||a.screenY>b.bottom||a.screenX<b.left||a.screenX>b.right)&&
 c()});p.className="emojibar-overlay";n.className="emojibar";l.className="emojibar-emojis";m.className=u.className="emojibar-list";A.className="emojibar-search";M.className="emojibar-detail";H.className="emojibar-detail-img";E.className="emojibar-detail-name";M.appendChild(H);M.appendChild(E);b();n.appendChild(l);n.appendChild(M);n.appendChild(A);A.addEventListener("keyup",function(){e()});n.addEventListener("mousemove",function(b){a(b,function(a){var b=a?x[a]||y[a]:null;b?(H.innerHTML=b.c.outerHTML,
-E.textContent=":"+a+":"):(H.textContent="",E.textContent="")})});n.addEventListener("click",function(b){a(b,function(a){a&&d()&&r&&r(a)})});return{isSupported:g,qa:function(a,b,c){return g()?(I=b,r=c,a.appendChild(p),a.appendChild(n),A.value="",e(),A.focus(),!0):!1},search:e,close:c,reset:function(){b();e()}}}();var C,U=[];function Yb(){da.call(this)}Yb.prototype=Object.create(da.prototype);Yb.prototype.constructor=Yb;function ta(a){return a.a?a.a.id:null}function Zb(){this.b=0;this.context=new qa;this.a={}}
-Zb.prototype.update=function(a){var b=Date.now();a.v&&(this.b=a.v);if(a["static"])for(g in a["static"]){var c=sa(this.context,g);c||(c=new Yb,this.context.push(c));var d={};a["static"][g].channels&&a["static"][g].channels.forEach(function(a){a.pins&&(d[a.id]=a.pins,a.pins=void 0)});fa(c,a["static"][g],b);for(var e in d){var f=[],h=this.a[e];h||(h=this.a[e]=new Y(e,250,null,b));d[e].forEach(function(a){f.push(h.b(a,b))});c.j[e].b=f}}ua(this.context,function(a){a.I===a.C&&(a=U.indexOf(a),-1!==a&&U.splice(a,
-1))});if(a.live){for(g in a.live)(c=this.a[g])?la(c,a.live[g],b):c=this.a[g]=new Y(g,250,a.live[g],b);for(var k in a.live){var g=D(this.context,k);(c=g.j[k])?(this.a[k].a.length&&ha(c,na(this.a[k]).m,b),c.fa||($b(g,c,a.live[k]),Q&&a.live[Q.id]&&tb())):C.b=0}}a["static"]&&hb();var n=!1;a.typing&&this.context.a.forEach(function(c){var d=n,e=a.typing,f=!1;if(c.u)for(var g in c.u)e&&!e[g]&&(delete c.u[g],f=!0);if(e)for(g in e)if(c.j[g]){c.u[g]||(c.u[g]={});for(var h in e[g])c.u[g][h]||(f=!0),c.u[g][h]=
-b}n=d|f},this);(a["static"]||n)&&ob();a.config&&(X=new ac(a.config),Pb());if(P&&Q&&a["static"]&&a["static"][P.a.id]&&a["static"][P.a.id].channels&&a["static"][P.a.id].channels)for(k=a["static"][P.a.id].channels,g=0,c=k.length;g<c;g++)if(k[g].id===Q.id){tb();break}};setInterval(function(){var a=!1,b=Date.now();va(function(c){var d=!1,e;for(e in c.u){var f=!0,h;for(h in c.u[e])c.u[e][h]+6500<b?(delete c.u[e][h],d=!0):f=!1;f&&(delete c.u[e],d=!0)}d&&(a=!0)});a&&ob()},1E3);
-function $b(a,b,c){var d;if(b!==Q||!window.hasFocus){var e=(d=a.self?a.self.id:null)?new RegExp("<@"+d):null,f=!1,h=!1,k=!1;c.forEach(function(c){if(!(parseFloat(c.ts)<=b.C)&&c.user!==a.self.id){h=!0;var d;if(!(d=b instanceof t)&&(d=c.text)&&!(d=e&&c.text.match(e)))a:{d=a.self.T.B;for(var g=0,m=d.length;g<m;g++)if(-1!==c.text.indexOf(d[g])){d=!0;break a}d=!1}d&&(-1===U.indexOf(b)&&(k=!0,U.push(b)),f=!0)}});if(h){mb();var g=document.getElementById("room_"+b.id);g&&(g.classList.add("unread"),f&&g.classList.add("unreadHi"));
-k&&!window.hasFocus&&yb()}}c.forEach(function(a){if(!d||d===a.K)for(var c=0,e=Ab.length;c<e;c++){var f=Ab[c];if(f.channel===b.id&&!!a.isMeMessage===f.Ca&&(a.pendingId===f.na&&f.na||!f.na&&a.text.trim()===f.text)){Ab.splice(c,1);break}}})}
-function ub(){var a=Q,b=U.indexOf(a);if(a.I>a.C){var c=C.a[a.id];c&&(c=na(c))&&(O(new K("POST","api/markread?room="+a.id+"&id="+c.id+"&ts="+c.m)),a.C=c.m)}0<=b&&(U.splice(b,1),mb());a=document.getElementById("room_"+a.id);a.classList.remove("unread");a.classList.remove("unreadHi")}C=new Zb;var nb=function(){function a(a,c){c.sort(function(){return Math.random()-.5});for(var d=0,e=20;e<n-40;e+=l)for(var f=0;f+l<=p;f+=l)h(a,c[d],e,f),d++,d===c.length&&(c.sort(b),d=0)}function b(a,b){return a.S?b.S?Math.random()-.5:-1:1}function c(a,b){for(var e=0,f=a.length;e<f;e++)if(void 0===a[e].S){d(a[e].src,function(d){a[e].S=d;c(a,b)});return}var g=[];a.forEach(function(a){a.S&&g.push(a.S)});b(g)}function d(a,b){O(Fa(Da(N(new K(a),function(a,c,d){if(d){var e=new Image;e.onload=function(){var a=
+E.textContent=":"+a+":"):(H.textContent="",E.textContent="")})});n.addEventListener("click",function(b){a(b,function(a){a&&d()&&r&&r(a)})});return{isSupported:g,qa:function(a,b,c){return g()?(I=b,r=c,a.appendChild(p),a.appendChild(n),A.value="",e(),A.focus(),!0):!1},search:e,close:c,reset:function(){b();e()}}}();var C,U=[];function Zb(){da.call(this)}Zb.prototype=Object.create(da.prototype);Zb.prototype.constructor=Zb;function ta(a){return a.a?a.a.id:null}function $b(){this.b=0;this.context=new qa;this.a={}}
+$b.prototype.update=function(a){var b=Date.now();a.v&&(this.b=a.v);if(a["static"])for(g in a["static"]){var c=sa(this.context,g);c||(c=new Zb,this.context.push(c));var d={};a["static"][g].channels&&a["static"][g].channels.forEach(function(a){a.pins&&(d[a.id]=a.pins,a.pins=void 0)});fa(c,a["static"][g],b);for(var e in d){var f=[],h=this.a[e];h||(h=this.a[e]=new Y(e,250,null,b));d[e].forEach(function(a){f.push(h.b(a,b))});c.j[e].b=f}}ua(this.context,function(a){a.I===a.C&&(a=U.indexOf(a),-1!==a&&U.splice(a,
+1))});if(a.live){for(g in a.live)(c=this.a[g])?la(c,a.live[g],b):c=this.a[g]=new Y(g,250,a.live[g],b);for(var k in a.live){var g=D(this.context,k);(c=g.j[k])?(this.a[k].a.length&&ha(c,na(this.a[k]).m,b),c.fa||(ac(g,c,a.live[k]),Q&&a.live[Q.id]&&ub())):C.b=0}}a["static"]&&ib();var n=!1;a.typing&&this.context.a.forEach(function(c){var d=n,e=a.typing,f=!1;if(c.u)for(var g in c.u)e&&!e[g]&&(delete c.u[g],f=!0);if(e)for(g in e)if(c.j[g]){c.u[g]||(c.u[g]={});for(var h in e[g])c.u[g][h]||(f=!0),c.u[g][h]=
+b}n=d|f},this);(a["static"]||n)&&pb();a.config&&(X=new bc(a.config),Qb());if(P&&Q&&a["static"]&&a["static"][P.a.id]&&a["static"][P.a.id].channels&&a["static"][P.a.id].channels)for(k=a["static"][P.a.id].channels,g=0,c=k.length;g<c;g++)if(k[g].id===Q.id){ub();break}};setInterval(function(){var a=!1,b=Date.now();va(function(c){var d=!1,e;for(e in c.u){var f=!0,h;for(h in c.u[e])c.u[e][h]+6500<b?(delete c.u[e][h],d=!0):f=!1;f&&(delete c.u[e],d=!0)}d&&(a=!0)});a&&pb()},1E3);
+function ac(a,b,c){var d;if(b!==Q||!window.hasFocus){var e=(d=a.self?a.self.id:null)?new RegExp("<@"+d):null,f=!1,h=!1,k=!1;c.forEach(function(c){if(!(parseFloat(c.ts)<=b.C)&&c.user!==a.self.id){h=!0;var d;if(!(d=b instanceof t)&&(d=c.text)&&!(d=e&&c.text.match(e)))a:{d=a.self.T.B;for(var g=0,m=d.length;g<m;g++)if(-1!==c.text.indexOf(d[g])){d=!0;break a}d=!1}d&&(-1===U.indexOf(b)&&(k=!0,U.push(b)),f=!0)}});if(h){nb();var g=document.getElementById("room_"+b.id);g&&(g.classList.add("unread"),f&&g.classList.add("unreadHi"));
+k&&!window.hasFocus&&zb()}}c.forEach(function(a){if(!d||d===a.K)for(var c=0,e=Bb.length;c<e;c++){var f=Bb[c];if(f.channel===b.id&&!!a.isMeMessage===f.Ca&&(a.pendingId===f.na&&f.na||!f.na&&a.text.trim()===f.text)){Bb.splice(c,1);break}}})}
+function vb(){var a=Q,b=U.indexOf(a);if(a.I>a.C){var c=C.a[a.id];c&&(c=na(c))&&(O(new K("POST","api/markread?room="+a.id+"&id="+c.id+"&ts="+c.m)),a.C=c.m)}0<=b&&(U.splice(b,1),nb());a=document.getElementById("room_"+a.id);a.classList.remove("unread");a.classList.remove("unreadHi")}C=new $b;var ob=function(){function a(a,c){c.sort(function(){return Math.random()-.5});for(var d=0,e=20;e<n-40;e+=l)for(var f=0;f+l<=p;f+=l)h(a,c[d],e,f),d++,d===c.length&&(c.sort(b),d=0)}function b(a,b){return a.S?b.S?Math.random()-.5:-1:1}function c(a,b){for(var e=0,f=a.length;e<f;e++)if(void 0===a[e].S){d(a[e].src,function(d){a[e].S=d;c(a,b)});return}var g=[];a.forEach(function(a){a.S&&g.push(a.S)});b(g)}function d(a,b){O(Fa(Da(N(new K(a),function(a,c,d){if(d){var e=new Image;e.onload=function(){var a=
 document.createElement("canvas");a.height=a.width=A;a=a.getContext("2d");a.drawImage(e,0,0,A,A);var a=a.getImageData(0,0,A,A),c=0,d;for(d=0;d<a.width*a.height*4;d+=4)a.data[d]=a.data[d+1]=a.data[d+2]=(a.data[d]+a.data[d+1]+a.data[d+2])/3,a.data[d+3]=50,c+=a.data[d];if(50>c/(a.height*a.width))for(d=0;d<a.width*a.height*4;d+=4)a.data[d]=a.data[d+1]=a.data[d+2]=255-a.data[d];b(a)};e.onerror=function(){b(null)};e.src=window.URL.createObjectURL(d)}else b(null)}),function(){b(null)}),"blob"))}function e(){var a=
 g.createLinearGradient(0,0,0,p);a.addColorStop(0,"#4D394B");a.addColorStop(1,"#201820");g.fillStyle=a;g.fillRect(0,0,n,p);return g.getImageData(0,0,n,p)}function f(a,b){for(var c=(a.height-b.height)/2,d=0;d<b.height;d++)for(var e=0;e<b.width;e++){var f=b.data[4*(d*b.width+e)]/255,g=4*((d+c)*a.width+e+c);a.data[g]*=f;a.data[g+1]*=f;a.data[g+2]*=f}return a}function h(a,b,c,d){var e=Math.floor(d);a=[a.data[e*n*4+0],a.data[e*n*4+1],a.data[e*n*4+2]];g.fillStyle="#"+(1.1*a[0]<<16|1.1*a[1]<<8|1.1*a[2]).toString(16);
 g.beginPath();g.moveTo(c+l/2,d+m);g.lineTo(c-m+l,d+l/2);g.lineTo(c+l/2,d-m+l);g.lineTo(c+m,d+l/2);g.closePath();g.fill();g.putImageData(f(g.getImageData(c+m,d+m,u,u),b),c+m,d+m)}var k=document.createElement("canvas"),g=k.getContext("2d"),n=k.width=250,p=k.height=290,l=(n-40)/3,m=.1*l,u=Math.floor(l-2*m),A=.5*u,x={},y={},M={};return function(b,d,f){if(x[b])f(x[b]);else if(M[b])y[b]?y[b].push(f):y[b]=[f];else{var g=e(),h=[];M[b]=!0;y[b]?y[b].push(f):y[b]=[f];for(var l in d)d[l].Va||d[l].vb||h.push({src:pa(d[l])});
-c(h,function(c){a(g,c);x[b]=k.toDataURL();y[b].forEach(function(a){a(x[b])})})}}}();var W=0,Q=null,P=null,S=null,R=null,Ab=[];function Ib(){O(Ea(Da(N(new K("highlight.pack.js"),function(a,b,c){a=document.createElement("script");b=document.createElement("link");a.innerHTML=c;a.language="text/javascript";b.href="hljs-androidstudio.css";b.rel="stylesheet";document.head.appendChild(b);document.body.appendChild(a)}),function(){console.error("Failure loading hljs required files")})))}
-function bc(){var a=Q;O(Ca(N(Fa(new K("api/hist?room="+a.id),"json"),function(b,c,d){if(d){b=C.a[a.id];var e=Date.now();b?c=!!la(b,d,e):(b=C.a[a.id]=new Y(a,100,d,e),c=!0);c&&(b.a.length&&ha(a,na(b).m,e),$b(D(C.context,a.id),a,d),a===Q&&tb())}}),function(){}))}function Pb(){a:{var a=X.U;for(var b in a)if(a.hasOwnProperty(b)){a=!1;break a}a=!0}a&&Lb.Bb(!1).display(Lb.yb.U);a=X.h;cc(a&&Qb[a]?Qb[a]:dc);document.getElementById("customsheet").innerHTML=ec()}
-function Nb(){var a=fc;O(Ea(Fa(Ca(new K("api?v="+C.b),function(b,c,d){(b=2===Math.floor(b/100))?W&&(W=0,rb(!0)):W?(W+=Math.floor((W||5)/2),W=Math.min(60,W)):(W=5,rb(!1));a(b,d)}),"json")))}function fc(a,b){a?(b&&C.update(b),Nb()):setTimeout(gc,1E3*W)}function gc(){Nb()}
-function hc(a){Q&&(document.getElementById("room_"+Q.id).classList.remove("selected"),document.getElementById("chatSystemContainer").classList.add("no-room-selected"));document.getElementById("room_"+a.id).classList.add("selected");document.body.classList.remove("no-room-selected");Q=a;P=D(C.context,a.id);sb();Jb.sb();nb(P.a.id,P.i,function(a){document.getElementById("chatCtx").style.backgroundImage="url("+a+")"});(!C.a[Q.id]||100>C.a[Q.id].a.length)&&bc();document.getElementById("chatSystemContainer").classList.remove("no-room-selected");
-document.getElementById("chatCtx").classList.remove("opened")}function lb(){var a=document.location.hash.substr(1),b=wa(a);b&&b!==Q?hc(b):(a=F(a))&&a.O&&hc(a.O)}function Mb(a,b,c){var d=Q;new FileReader;var e=new FormData;e.append("file",b);e.append("filename",a);O(Da(N(new K("POST","api/file?room="+d.id),function(){c(null)}),function(a,b){c(b)}),e)}
-function cb(a,b,c,d){b="api/msg?room="+a.id+"&text="+encodeURIComponent(b);d&&(b+="&attachments="+encodeURIComponent(JSON.stringify([{fallback:d.text,author_name:F(d.K).getName(),text:d.text,footer:a.h?J.message:a.name,ts:d.m}])));O(N(Fa(new K("POST",b),"json"),function(a,b,d){d&&void 0!==d.pendingId&&(c.na=d.pendingId)}))}function Eb(a,b){O(new K("DELETE","api/pinMsg?room="+a.id+"&msgId="+b.id))}
-function wb(a,b,c){O(new K("POST","api/reaction?room="+a+"&msg="+b+"&reaction="+encodeURIComponent(c)))}function Kb(){O(new K("POST","api/logout"));document.cookie="sessID=;Path=/;expires=Thu, 01 Jan 1970 00:00:01 GMT;";document.location.reload()}function kb(){var a={},b=[],c=this.value;ua(C.context,function(b){a[b.id]=ia(b,c)});for(var d in a){var e=document.getElementById("room_"+d);e&&(a[d].name+a[d].ma+a[d].ta+a[d].pa?(e.classList.remove("hidden"),b.push(d)):e.classList.add("hidden"))}};var Qb={noemoji:{Da:"noemoji.js",ia:null,name:"None"},emojione_v2_3:{Da:"emojione_v2.3.sprites.js",ia:"emojione_v2.3.sprites.css",name:"Emojione v2.3"},emojione_v3:{Da:"emojione_v3.sprites.js",ia:"emojione_v3.sprites.css",name:"Emojione v3"}},dc=Qb.emojione_v2_3,Ya;
-function cc(a){Ya!==a&&(console.log("Loading emoji pack "+a.name),O(Ea(N(new K(a.Da),function(b,c,d){b=document.createElement("script");b.innerHTML=d;b.language="text/javascript";document.body.appendChild(b);a.ia&&(d=document.createElement("link"),d.href=a.ia,d.rel="stylesheet",document.head.appendChild(d));d=document.getElementById("emojiButton");for(var e in C.a)ic(C.a[e]);Q&&tb();Db.reset();"makeEmoji"in window?(d.style.backgroundImage='url("smile.svg")',d.classList.remove("hidden")):d.classList.add("hidden")}))),
-Ya=a)};var Jb=function(){function a(){c();r instanceof t?(f.style.backgroundImage="url(api/avatar?size=l&user="+r.a.id+")",n.textContent=(r.a.ib||(r.a.Xa||"")+" "+r.a.$a).trim(),h.classList.add("presence-indicator"),r.a.N?h.classList.remove("presence-away"):h.classList.add("presence-away"),g.classList.remove("hidden"),l.classList.remove("hidden"),l.textContent=r.a.zb||"",u.textContent=r.a.rb||"",m.classList.remove("hidden"),e.classList.remove("roominfo-channel"),e.classList.add("roominfo-user")):b()}function b(){var a=
+c(h,function(c){a(g,c);x[b]=k.toDataURL();y[b].forEach(function(a){a(x[b])})})}}}();var W=0,Q=null,P=null,S=null,R=null,Bb=[];function Jb(){O(Ea(Da(N(new K("highlight.pack.js"),function(a,b,c){a=document.createElement("script");b=document.createElement("link");a.innerHTML=c;a.language="text/javascript";b.href="hljs-androidstudio.css";b.rel="stylesheet";document.head.appendChild(b);document.body.appendChild(a)}),function(){console.error("Failure loading hljs required files")})))}
+function cc(){var a=Q;O(Ca(N(Fa(new K("api/hist?room="+a.id),"json"),function(b,c,d){if(d){b=C.a[a.id];var e=Date.now();b?c=!!la(b,d,e):(b=C.a[a.id]=new Y(a,100,d,e),c=!0);c&&(b.a.length&&ha(a,na(b).m,e),ac(D(C.context,a.id),a,d),a===Q&&ub())}}),function(){}))}function Qb(){a:{var a=X.U;for(var b in a)if(a.hasOwnProperty(b)){a=!1;break a}a=!0}a&&Mb.Bb(!1).display(Mb.yb.U);a=X.h;dc(a&&Rb[a]?Rb[a]:ec);document.getElementById("customsheet").innerHTML=fc()}
+function Ob(){var a=gc;O(Ea(Fa(Ca(new K("api?v="+C.b),function(b,c,d){(b=2===Math.floor(b/100))?W&&(W=0,sb(!0)):W?(W+=Math.floor((W||5)/2),W=Math.min(60,W)):(W=5,sb(!1));a(b,d)}),"json")))}function gc(a,b){a?(b&&C.update(b),Ob()):setTimeout(hc,1E3*W)}function hc(){Ob()}
+function ic(a){Q&&(document.getElementById("room_"+Q.id).classList.remove("selected"),document.getElementById("chatSystemContainer").classList.add("no-room-selected"));document.getElementById("room_"+a.id).classList.add("selected");document.body.classList.remove("no-room-selected");Q=a;P=D(C.context,a.id);tb();Kb.sb();ob(P.a.id,P.i,function(a){document.getElementById("chatCtx").style.backgroundImage="url("+a+")"});(!C.a[Q.id]||100>C.a[Q.id].a.length)&&cc();document.getElementById("chatSystemContainer").classList.remove("no-room-selected");
+document.getElementById("chatCtx").classList.remove("opened")}function mb(){var a=document.location.hash.substr(1),b=wa(a);b&&b!==Q?ic(b):(a=F(a))&&a.O&&ic(a.O)}function Nb(a,b,c){var d=Q;new FileReader;var e=new FormData;e.append("file",b);e.append("filename",a);O(Da(N(new K("POST","api/file?room="+d.id),function(){c(null)}),function(a,b){c(b)}),e)}
+function cb(a,b,c,d){b="api/msg?room="+a.id+"&text="+encodeURIComponent(b);d&&(b+="&attachments="+encodeURIComponent(JSON.stringify([{fallback:d.text,author_name:F(d.K).getName(),text:d.text,footer:a.h?J.message:a.name,ts:d.m}])));O(N(Fa(new K("POST",b),"json"),function(a,b,d){d&&void 0!==d.pendingId&&(c.na=d.pendingId)}))}function Fb(a,b){O(new K("DELETE","api/pinMsg?room="+a.id+"&msgId="+b.id))}
+function xb(a,b,c){O(new K("POST","api/reaction?room="+a+"&msg="+b+"&reaction="+encodeURIComponent(c)))}function Lb(){O(new K("POST","api/logout"));document.cookie="sessID=;Path=/;expires=Thu, 01 Jan 1970 00:00:01 GMT;";document.location.reload()}function lb(){var a={},b=[],c=this.value;ua(C.context,function(b){a[b.id]=ia(b,c)});for(var d in a){var e=document.getElementById("room_"+d);e&&(a[d].name+a[d].ma+a[d].ta+a[d].pa?(e.classList.remove("hidden"),b.push(d)):e.classList.add("hidden"))}};var Rb={noemoji:{Da:"noemoji.js",ia:null,name:"None"},emojione_v2_3:{Da:"emojione_v2.3.sprites.js",ia:"emojione_v2.3.sprites.css",name:"Emojione v2.3"},emojione_v3:{Da:"emojione_v3.sprites.js",ia:"emojione_v3.sprites.css",name:"Emojione v3"}},ec=Rb.emojione_v2_3,Ya;
+function dc(a){Ya!==a&&(console.log("Loading emoji pack "+a.name),O(Ea(N(new K(a.Da),function(b,c,d){b=document.createElement("script");b.innerHTML=d;b.language="text/javascript";document.body.appendChild(b);a.ia&&(d=document.createElement("link"),d.href=a.ia,d.rel="stylesheet",document.head.appendChild(d));d=document.getElementById("emojiButton");for(var e in C.a)jc(C.a[e]);Q&&ub();Eb.reset();"makeEmoji"in window?(d.style.backgroundImage='url("smile.svg")',d.classList.remove("hidden")):d.classList.add("hidden")}))),
+Ya=a)};var Kb=function(){function a(){c();r instanceof t?(f.style.backgroundImage="url(api/avatar?size=l&user="+r.a.id+")",n.textContent=(r.a.ib||(r.a.Xa||"")+" "+r.a.$a).trim(),h.classList.add("presence-indicator"),r.a.N?h.classList.remove("presence-away"):h.classList.add("presence-away"),g.classList.remove("hidden"),l.classList.remove("hidden"),l.textContent=r.a.zb||"",u.textContent=r.a.rb||"",m.classList.remove("hidden"),e.classList.remove("roominfo-channel"),e.classList.add("roominfo-user")):b()}function b(){var a=
 E;a.aa.topic?(g.classList.remove("hidden"),n.textContent=r.ta||"",p.textContent=r.G?J.Ga(r.G,r.ea):""):g.classList.add("hidden");a.aa.purpose?(m.classList.remove("hidden"),u.textContent=r.pa||"",A.textContent=r.o?J.Ga(r.o,r.da):""):m.classList.add("hidden");f.style.backgroundImage="";h.classList.remove("presence-indicator");M.textContent=J.kb(r.i?Object.keys(r.i).length:0);a=[];if(r.i)for(var b in r.i)a.push(r.i[b]);a.sort(function(a,b){return a.N&&!b.N?-1:b.N&&!a.N?1:a.getName().localeCompare(b.getName())});
 var c=document.createDocumentFragment();a.forEach(function(a){var b=document.createElement("li"),d=document.createElement("a");d.href="#"+a.id;d.textContent=a.getName();b.appendChild(d);b.classList.add("presence-indicator");a.N||b.classList.add("presence-away");c.appendChild(b)});H.textContent="";H.appendChild(c);e.classList.add("roominfo-channel");e.classList.remove("roominfo-user")}function c(){h.textContent=r.name;if(r.b){x.textContent=J.eb(r.b.length);x.classList.remove("hidden");y.classList.remove("hidden");
-var a=document.createDocumentFragment();r.b.forEach(function(b){var c=document.createElement("li"),e=document.createElement("a");e.href="javascript:void(0)";e.dataset.msgId=b.id;e.addEventListener("click",d);e.className=Na+" roominfo-unpin";c.className="roominfo-pinlist-item";c.appendChild(b.L());c.appendChild(e);a.appendChild(c)});y.textContent="";y.appendChild(a)}else x.classList.add("hidden"),y.classList.add("hidden")}function d(){if(r.b)for(var a=0,b=r.b.length;a<b;a++)if(r.b[a].id===this.dataset.msgId){Eb(r,
+var a=document.createDocumentFragment();r.b.forEach(function(b){var c=document.createElement("li"),e=document.createElement("a");e.href="javascript:void(0)";e.dataset.msgId=b.id;e.addEventListener("click",d);e.className=Na+" roominfo-unpin";c.className="roominfo-pinlist-item";c.appendChild(b.L());c.appendChild(e);a.appendChild(c)});y.textContent="";y.appendChild(a)}else x.classList.add("hidden"),y.classList.add("hidden")}function d(){if(r.b)for(var a=0,b=r.b.length;a<b;a++)if(r.b[a].id===this.dataset.msgId){Fb(r,
 r.b[a]);break}}var e=document.createElement("div"),f=document.createElement("header"),h=document.createElement("h3"),k=document.createElement("div"),g=document.createElement("div"),n=document.createElement("span"),p=document.createElement("span"),l=document.createElement("div"),m=document.createElement("div"),u=document.createElement("span"),A=document.createElement("span"),x=document.createElement("div"),y=document.createElement("ul"),M=document.createElement("div"),H=document.createElement("ul"),
 E,r;e.className="chat-context-roominfo";f.className="roominfo-title";g.className="roominfo-topic";m.className="roominfo-purpose";l.className="roominfo-phone";x.className="roominfo-pincount";y.className="roominfo-pinlist";M.className="roominfo-usercount";H.className="roominfo-userlist";A.className=p.className="roominfo-author";f.appendChild(h);e.appendChild(f);e.appendChild(k);g.appendChild(n);g.appendChild(p);m.appendChild(u);m.appendChild(A);k.appendChild(g);k.appendChild(l);k.appendChild(m);k.appendChild(x);
 k.appendChild(y);k.appendChild(M);k.appendChild(H);var I=null;return{fb:function(b,c){this.$();E=b;r=c;a();return this},update:function(){this.$();a();return this},show:function(a){this.$();a.appendChild(e);e.classList.remove("hidden");return this},sb:function(){this.$();e.classList.add("hidden");return this},$:function(){I&&clearTimeout(I);I=null;return this},tb:function(){I||(I=setTimeout(function(){e.classList.add("hidden");I=null},300));return this},wb:function(a){for(;a;){if(a===e)return!0;a=
-a.parentNode}return!1}}}();function Y(a,b,c,d){ka.call(this,a,b,0,c,d)}Y.prototype=Object.create(ka.prototype);Y.prototype.constructor=Y;Y.prototype.b=function(a,b){return!0===a.isMeMessage?new jc(this.id,a,b):!0===a.isNotice?new kc(this.id,a,b):new lc(this.id,a,b)};function ic(a){a.a.forEach(function(a){a.H()})}
+a.parentNode}return!1}}}();function Y(a,b,c,d){ka.call(this,a,b,0,c,d)}Y.prototype=Object.create(ka.prototype);Y.prototype.constructor=Y;Y.prototype.b=function(a,b){return!0===a.isMeMessage?new kc(this.id,a,b):!0===a.isNotice?new lc(this.id,a,b):new mc(this.id,a,b)};function jc(a){a.a.forEach(function(a){a.H()})}
 var Z=function(){function a(a,d){return Aa(d,{B:a.context.self.T.B,X:function(a){":"===a[0]&&":"===a[a.length-1]&&(a=a.substr(1,a.length-2));if(a=Za(a)){var b=document.createElement("span");b.className="emoji-small";b.appendChild(a);return b.outerHTML}return null},la:function(c){return b(a,c)}})}function b(a,b){var c=b.indexOf("|"),d;if(-1===c)var h=b;else{h=b.substr(0,c);var k=b.substr(c+1)}if("@"===h[0])if(h=ta(a.context)+"|"+h.substr(1),d=F(h))a=!0,h="#"+d.O.id,k="@"+d.getName(),d="background-color:"+
-Ub(d.getName()),b=["chatmsg-link-user","chatmsg-link"];else return null;else if("#"===h[0])if(h=ta(a.context)+"|"+h.substr(1),k=wa(h))a=!0,h="#"+h,k="#"+k.name,b=["chatmsg-link-chan","chatmsg-link"];else return null;else{if(!h.match(/^(https?|mailto):\/\//i))return null;b=["chatmsg-link"];a=!1}return{link:h,text:k||h,style:d,Ua:b,Za:a}}return{H:function(a){a.V=!0;return a},Y:function(a){a.c&&a.c.parentElement&&(a.c.remove(),delete a.c);return a},M:function(a){a.c?a.V&&(a.V=!1,a.P()):a.za().P();return a.c},
-P:function(b){var c=F(b.K);b.c.m.innerHTML=J.R(b.m);b.c.ra.innerHTML=a(b,b.text);b.c.ha.textContent=c?c.getName():b.username||"?";for(var c=document.createDocumentFragment(),e=0,f=b.s.length;e<f;e++){var h=b.s[e];h&&(h=Wb(b,h,e))&&c.appendChild(h)}b.c.s.textContent="";b.c.s.appendChild(c);c=b.b;e=document.createDocumentFragment();if(b.D)for(var k in b.D){var f=c,h=b.id,g=k,n=b.D[k],p=Za(g);if(p){for(var l=document.createElement("li"),m=document.createElement("a"),u=document.createElement("span"),
+Vb(d.getName()),b=["chatmsg-link-user","chatmsg-link"];else return null;else if("#"===h[0])if(h=ta(a.context)+"|"+h.substr(1),k=wa(h))a=!0,h="#"+h,k="#"+k.name,b=["chatmsg-link-chan","chatmsg-link"];else return null;else{if(!h.match(/^(https?|mailto):\/\//i))return null;b=["chatmsg-link"];a=!1}return{link:h,text:k||h,style:d,Ua:b,Za:a}}return{H:function(a){a.V=!0;return a},Y:function(a){a.c&&a.c.parentElement&&(a.c.remove(),delete a.c);return a},M:function(a){a.c?a.V&&(a.V=!1,a.P()):a.za().P();return a.c},
+P:function(b){var c=F(b.K);b.c.m.innerHTML=J.R(b.m);b.c.ra.innerHTML=a(b,b.text);b.c.ha.textContent=c?c.getName():b.username||"?";for(var c=document.createDocumentFragment(),e=0,f=b.s.length;e<f;e++){var h=b.s[e];h&&(h=Xb(b,h,e))&&c.appendChild(h)}b.c.s.textContent="";b.c.s.appendChild(c);c=b.b;e=document.createDocumentFragment();if(b.D)for(var k in b.D){var f=c,h=b.id,g=k,n=b.D[k],p=Za(g);if(p){for(var l=document.createElement("li"),m=document.createElement("a"),u=document.createElement("span"),
 A=document.createElement("span"),x=[],y=0,M=n.length;y<M;y++){var H=F(n[y]);H&&x.push(H.getName())}x.sort();A.textContent=x.join(", ");u.appendChild(p);u.className="emoji-small";m.href="javascript:toggleReaction('"+f+"', '"+h+"', '"+g+"')";m.appendChild(u);m.appendChild(A);l.className="chatmsg-reaction-item";l.appendChild(m);f=l}else console.warn("Reaction id not found: "+g),f=null;f&&e.appendChild(f)}b.c.D.textContent="";b.c.D.appendChild(e);b.c.ca.ka&&(b.c.ca.ka.style.backgroundImage=b.A?'url("star_full.png")':
-'url("star_empty.png")');b.F&&(b.c.F.innerHTML=J.F(b.F),b.c.classList.add("edited"));return b},L:function(a){return a.M().cloneNode(!0)},w:function(b,d){return a(b,d)}}}();function jc(a,b,c){w.call(this,b,c);this.context=D(C.context,a);this.b=a;this.c=Z.c;this.V=Z.V}jc.prototype=Object.create(z.prototype);q=jc.prototype;q.constructor=jc;q.H=function(){return Z.H(this)};q.w=function(a){return Z.w(this,a)};q.Y=function(){return Z.Y(this)};q.M=function(){return Z.M(this)};
-q.za=function(){this.c=Tb(this);this.c.classList.add("chatmsg-me_message");return this};q.L=function(){return Z.L(this)};q.P=function(){Z.P(this);return this};q.update=function(a,b){z.prototype.update.call(this,a,b);this.H()};function lc(a,b,c){w.call(this,b,c);this.context=D(C.context,a);this.b=a;this.c=Z.c;this.V=Z.V}lc.prototype=Object.create(w.prototype);q=lc.prototype;q.constructor=lc;q.H=function(){return Z.H(this)};q.w=function(a){return Z.w(this,a)};q.Y=function(){return Z.Y(this)};q.M=function(){return Z.M(this)};
-q.za=function(){this.c=Tb(this);return this};q.L=function(){return Z.L(this)};q.P=function(){Z.P(this);return this};
+'url("star_empty.png")');b.F&&(b.c.F.innerHTML=J.F(b.F),b.c.classList.add("edited"));return b},L:function(a){return a.M().cloneNode(!0)},w:function(b,d){return a(b,d)}}}();function kc(a,b,c){w.call(this,b,c);this.context=D(C.context,a);this.b=a;this.c=Z.c;this.V=Z.V}kc.prototype=Object.create(z.prototype);q=kc.prototype;q.constructor=kc;q.H=function(){return Z.H(this)};q.w=function(a){return Z.w(this,a)};q.Y=function(){return Z.Y(this)};q.M=function(){return Z.M(this)};
+q.za=function(){this.c=Ub(this);this.c.classList.add("chatmsg-me_message");return this};q.L=function(){return Z.L(this)};q.P=function(){Z.P(this);return this};q.update=function(a,b){z.prototype.update.call(this,a,b);this.H()};function mc(a,b,c){w.call(this,b,c);this.context=D(C.context,a);this.b=a;this.c=Z.c;this.V=Z.V}mc.prototype=Object.create(w.prototype);q=mc.prototype;q.constructor=mc;q.H=function(){return Z.H(this)};q.w=function(a){return Z.w(this,a)};q.Y=function(){return Z.Y(this)};q.M=function(){return Z.M(this)};
+q.za=function(){this.c=Ub(this);return this};q.L=function(){return Z.L(this)};q.P=function(){Z.P(this);return this};
 q.update=function(a,b){w.prototype.update.call(this,a,b);this.H();if(a=this.text.match(/^<?https:\/\/www\.openstreetmap\.org\/\?mlat=(-?[0-9\.]+)(&amp;|&)mlon=(-?[0-9\.]+)(&amp;|&)macc=([0-9\.]+)[^\s]*/))this.text=this.text.substr(0,a.index)+this.text.substr(a.index+a[0].length).trim(),this.s.unshift({color:"#008000",text:a[0],footer:"Open Street Map",footer_icon:"https://www.openstreetmap.org/assets/favicon-32x32-36d06d8a01933075bc7093c9631cffd02d49b03b659f767340f256bb6839d990.png",geo:{latitude:a[1],
-longitude:a[3],accuracy:a[5]}})};function kc(a,b,c){w.call(this,b,c);this.context=D(C.context,a);this.b=a;this.a=null;this.V=!0}kc.prototype=Object.create(B.prototype);q=kc.prototype;q.constructor=kc;q.H=function(){return Z.H(this)};q.w=function(a){return Z.w(this,a)};q.Y=function(){this.a&&this.a.parentElement&&(this.a.remove(),delete this.a);this.c&&delete this.c;return this};q.M=function(){Z.M(this);return this.a};q.L=function(){return this.a.cloneNode(!0)};
-q.za=function(){this.c=Tb(this);this.a=document.createElement("span");this.c.classList.add("chatmsg-notice");this.a.className="chatmsg-notice";this.a.textContent=J.cb;this.a.appendChild(this.c);return this};q.P=function(){Z.P(this);return this};q.update=function(a,b){B.prototype.update.call(this,a,b);this.H()};
-function Fb(a,b){var c=Tb(null);c.classList.add("chatmsg-pending");b&&c.classList.add("chatmsg-me_message");c.ra.innerHTML=Aa(a,{X:function(a){":"===a[0]&&":"===a[a.length-1]&&(a=a.substr(1,a.length-2));if(a=Za(a)){var b=document.createElement("span");b.className="emoji-small";b.appendChild(a);return b.outerHTML}return null}});c.ha.textContent=P.self?P.self.getName():"";a=document.createElement("span");a.className="typing-dot1";a.textContent=".";c.m.appendChild(a);a=document.createElement("span");
-a.className="typing-dot2";a.textContent=".";c.m.appendChild(a);a=document.createElement("span");a.className="typing-dot3";a.textContent=".";c.m.appendChild(a);c.m.classList.add("typing-container");return c};var X;function ac(a){this.U={};for(var b=0,c=a.length;b<c;b++)null===a[b].service&&null===a[b].device&&Ob(this,JSON.parse(a[b].config))}function Ob(a,b){if(b.services)for(var c in b.services)a.U[c]=b.services[c];void 0!==b.emojiProvider&&(a.h=b.emojiProvider);void 0!==b.displayAvatar&&(a.a=b.displayAvatar);void 0!==b.colorfulNames&&(a.b=b.colorfulNames)}
-function ec(){var a=X,b={},c="";!1===a.a&&(b[".chatsystem-content .chatmsg-authorGroup .chatmsg-author-img-wrapper"]=["display: none"],b[".chatsystem-content .chatmsg-authorGroup"]=["display: flex"],b[".chatsystem-content .chatmsg-authorGroup .chatmsg-author"]=["position:initial","vertical-align:top","min-width:75px"],b[".chatsystem-content .chatmsg-authorGroup .chatmsg-author-messages"]=["padding-top:0","padding-left:0","display:inline-block","margin-top:-4px","flex:1"],b[".chatmsg-author-name::before"]=
-["content:'<'"],b[".chatmsg-author-name::after"]=["content:'>'"]);!0===a.b||(b[".chatmsg-authorGroup .chatmsg-item .chatmsg-link-user, .chatsystem-content a.chatmsg-author-name, .chatmsg-author-name"]=["background-color: transparent !important;"]);for(var d in b)c+=d+"{",b[d].forEach(function(a){c+=a+";"}),c+="}";return c}X=new ac([]);var $a=function(){var a=[];return{Ya:function(b){for(var c=0,d=a.length;c<d;c++)if(-1!==a[c].names.indexOf(b))return a[c];return null},qb:function(b){var c=[];a.forEach(function(a){for(var d=0,f=a.names.length;d<f;d++)if(a.names[d].substr(0,b.length)===b){c.push(a);break}});return c},Ab:function(b){b.W="client";b.exec=b.exec.bind(b);a.push(b)}}}();function mc(){return new Promise(function(a,b){"geolocation"in window.navigator?navigator.geolocation.getCurrentPosition(function(c){c?a(c):b("denied")}):b("geolocation not available")})}
-ya.push(function(){$a.Ab({name:"/sherlock",names:["/sherlock","/sharelock"],usage:"",description:J.jb,exec:function(a,b){mc().then(function(a){var c=a.coords.latitude,e=a.coords.longitude;cb(b,"https://www.openstreetmap.org/?mlat="+c+"&mlon="+e+"&macc="+a.coords.accuracy+"#map=17/"+c+"/"+e)}).catch(function(a){console.error("Error: ",a)})}})});
+longitude:a[3],accuracy:a[5]}})};function lc(a,b,c){w.call(this,b,c);this.context=D(C.context,a);this.b=a;this.a=null;this.V=!0}lc.prototype=Object.create(B.prototype);q=lc.prototype;q.constructor=lc;q.H=function(){return Z.H(this)};q.w=function(a){return Z.w(this,a)};q.Y=function(){this.a&&this.a.parentElement&&(this.a.remove(),delete this.a);this.c&&delete this.c;return this};q.M=function(){Z.M(this);return this.a};q.L=function(){return this.a.cloneNode(!0)};
+q.za=function(){this.c=Ub(this);this.a=document.createElement("span");this.c.classList.add("chatmsg-notice");this.a.className="chatmsg-notice";this.a.textContent=J.cb;this.a.appendChild(this.c);return this};q.P=function(){Z.P(this);return this};q.update=function(a,b){B.prototype.update.call(this,a,b);this.H()};
+function Gb(a,b){var c=Ub(null);c.classList.add("chatmsg-pending");b&&c.classList.add("chatmsg-me_message");c.ra.innerHTML=Aa(a,{X:function(a){":"===a[0]&&":"===a[a.length-1]&&(a=a.substr(1,a.length-2));if(a=Za(a)){var b=document.createElement("span");b.className="emoji-small";b.appendChild(a);return b.outerHTML}return null}});c.ha.textContent=P.self?P.self.getName():"";a=document.createElement("span");a.className="typing-dot1";a.textContent=".";c.m.appendChild(a);a=document.createElement("span");
+a.className="typing-dot2";a.textContent=".";c.m.appendChild(a);a=document.createElement("span");a.className="typing-dot3";a.textContent=".";c.m.appendChild(a);c.m.classList.add("typing-container");return c};var X;function bc(a){this.U={};for(var b=0,c=a.length;b<c;b++)null===a[b].service&&null===a[b].device&&Pb(this,JSON.parse(a[b].config))}function Pb(a,b){if(b.services)for(var c in b.services)a.U[c]=b.services[c];void 0!==b.emojiProvider&&(a.h=b.emojiProvider);void 0!==b.displayAvatar&&(a.a=b.displayAvatar);void 0!==b.colorfulNames&&(a.b=b.colorfulNames)}
+function fc(){var a=X,b={},c="";!1===a.a&&(b[".chatsystem-content .chatmsg-authorGroup .chatmsg-author-img-wrapper"]=["display: none"],b[".chatsystem-content .chatmsg-authorGroup"]=["display: flex"],b[".chatsystem-content .chatmsg-authorGroup .chatmsg-author"]=["position:initial","vertical-align:top","min-width:75px"],b[".chatsystem-content .chatmsg-authorGroup .chatmsg-author-messages"]=["padding-top:0","padding-left:0","display:inline-block","margin-top:-4px","flex:1"],b[".chatmsg-author-name::before"]=
+["content:'<'"],b[".chatmsg-author-name::after"]=["content:'>'"]);!0===a.b||(b[".chatmsg-authorGroup .chatmsg-item .chatmsg-link-user, .chatsystem-content a.chatmsg-author-name, .chatmsg-author-name"]=["background-color: transparent !important;"]);for(var d in b)c+=d+"{",b[d].forEach(function(a){c+=a+";"}),c+="}";return c}X=new bc([]);var $a=function(){var a=[];return{Ya:function(b){for(var c=0,d=a.length;c<d;c++)if(-1!==a[c].names.indexOf(b))return a[c];return null},qb:function(b){var c=[];a.forEach(function(a){for(var d=0,f=a.names.length;d<f;d++)if(a.names[d].substr(0,b.length)===b){c.push(a);break}});return c},Ab:function(b){b.W="client";b.exec=b.exec.bind(b);a.push(b)}}}();function nc(){return new Promise(function(a,b){"geolocation"in window.navigator?navigator.geolocation.getCurrentPosition(function(c){c?a(c):b("denied")}):b("geolocation not available")})}
+ya.push(function(){$a.Ab({name:"/sherlock",names:["/sherlock","/sharelock"],usage:"",description:J.jb,exec:function(a,b){nc().then(function(a){var c=a.coords.latitude,e=a.coords.longitude;cb(b,"https://www.openstreetmap.org/?mlat="+c+"&mlon="+e+"&macc="+a.coords.accuracy+"#map=17/"+c+"/"+e)}).catch(function(a){console.error("Error: ",a)})}})});
 })();