Forráskód Böngészése

[bugfix] restored good path after mv
[add] settings navigation

B Thibault 8 éve
szülő
commit
af83686a1c

+ 6 - 0
cli/resources.js

@@ -23,6 +23,12 @@ var R = {
             },
             emoji: "emojiButton"
         },
+        settings: {
+            wrapper: "settings",
+            menu: {
+                list: "settingMenuItems"
+            }
+        },
         favicon: "linkFavicon"
     },
     klass: {

+ 30 - 3
cli/uiSettings.js

@@ -1,25 +1,52 @@
 
 var Settings = (function() {
     var displayed = false,
+        currentPage = null,
 
     pages = {
-        services: {}
+        services: "services",
+        display: "display",
+        privacy: "privacy"
     },
 
     spawn = function() {
+        document.getElementById(R.id.settings.wrapper).classList.remove(R.klass.hidden);
+        displayed = true;
     },
 
-    updatePage = function(page) {
+    setVisiblePage = function(page) {
+        if (currentPage) {
+            document.getElementById(R.id.settings.wrapper).classList.remove("display-" +currentPage);
+            document.getElementById("setting-menu-" +currentPage).classList.remove(R.klass.selected);
+        }
+        document.getElementById(R.id.settings.wrapper).classList.add("display-" +page);
+        document.getElementById("setting-menu-" +page).classList.add(R.klass.selected);
+        currentPage = page;
     };
 
+    document.getElementById(R.id.settings.menu.list).addEventListener("click", function(e) {
+        for (var target = e.target; e.currentTarget !== target && target; target = target.parentNode) {
+            if (target.dataset && target.dataset["target"]) {
+                for (var i in pages) {
+                    if (pages[i] === target.dataset["target"]) {
+                        setVisiblePage(pages[i]);
+                        return;
+                    }
+                }
+            }
+        }
+    });
+
     return {
+        /** @type {function(string=)} */
         display: function(page) {
             if (!displayed)
                 spawn();
-            updatePage(page);
+            setVisiblePage(page || pages.services);
             return this;
         },
 
+        /** @type {function(boolean)} */
         setClosable: function(closable) {
             return this;
         },

+ 19 - 18
srv/public/slack.min.js

@@ -8,20 +8,20 @@ f;f.l[this.id]=this}this.version=Math.max(this.version,c)};function r(a,b){u.cal
 y.prototype.update=function(a,b){if(a){if(this.text=a.text||"",a.attachments&&(this.o=a.attachments),this.J=!!a.is_starred,this.C=void 0===a.edited?!1:a.edited,this.i=!!a.removed,a.reactions){var c={};a.reactions.forEach(function(a){c[a.name]=[];a.users.forEach(function(b){c[a.name].push(b)})});this.B=c}}else this.i=!0;this.version=b};function D(a,b,c,d){this.id="string"===typeof a?a:a.id;this.a=[];this.Oa=0;this.i=b;c&&ia(this,c,d)}
 function ia(a,b,c){var d=0;b.forEach(function(a){d=Math.max(this.push(a,c),d)}.bind(a));ja(a)}D.prototype.b=function(a,b){return!0===a.isMeMessage?new A(a,b):!0===a.isNotice?new C(a,b):new y(a,b)};D.prototype.push=function(a,b){for(var c,d=!1,e,g=0,f=this.a.length;g<f;g++)if(c=this.a[g],c.id===a.id){e=c.update(a,b);d=!0;break}d||(c=this.b(a,b),this.a.push(c),e=c.j);for(;this.a.length>this.i;)this.a.shift();return e||0};function ka(a){return a.a[a.a.length-1]}
 function la(a,b){for(var c=0,d=a.a.length;c<d;c++)if(a.a[c].id==b)return a.a[c];return null}function ja(a){a.a.sort(function(a,c){return a.j-c.j})}A.prototype=Object.create(y.prototype);A.prototype.constructor=A;C.prototype=Object.create(y.prototype);C.prototype.constructor=C;"undefined"!==typeof module&&(module.H={ib:y,hb:A,kb:C,nb:D});function ha(a){this.id=a;this.l={};this.oa=this.O=null;this.version=0}ha.prototype.update=function(a,b){void 0!==a.name&&(this.name=a.name);void 0!==a.deleted&&(this.Ea=a.deleted);void 0!==a.status&&(this.status=a.status);void 0!==a.presence&&(this.a="away"!==a.presence);void 0!==a.isPresent&&(this.a=a.isPresent);a.isBot&&(this.Ua=a.isBot);this.version=Math.max(this.version,b)};"undefined"!==typeof module&&(module.H.fb=ha);function ma(){this.a=[]}ma.prototype.push=function(a){this.a.push(a)};function na(a,b){for(var c=0,d=a.a.length;c<d;c++)if(b===oa(a.a[c]))return a.a[c];return null}function pa(a,b){for(var c=0,d=a.a.length;c<d;c++){var e=a.a[c],g;for(g in e.l)if(!0===b(e.l[g],g))return}}function qa(a){for(var b=E.context,c=0,d=b.a.length;c<d&&!0!==a(b.a[c]);c++);}function H(a,b){for(var c=0,d=a.a.length;c<d;c++)if(a.a[c].l[b])return a.a[c];return null}
-function I(a){for(var b=E.context,c=0,d=b.a.length;c<d;c++){var e=b.a[c].l[a];if(e)return e}return null}function ra(a){for(var b=E.context,c=[],d=0,e=b.a.length;d<e;d++){var g=b.a[d].l,f;for(f in g)a&&!a(g[f],b.a[d],f)||c.push(f)}return c}function J(a){for(var b=E.context,c=0,d=b.a.length;c<d;c++){var e=b.a[c].m[a];if(e)return e}return null}function sa(a){for(var b=E.context,c=0,d=b.a.length;c<d;c++)if(b.a[c].self.id===a)return!0;return!1}"undefined"!==typeof module&&(module.H.jb=ma);var K={},L,ta=[];function ua(){if(!c){for(var a=0,b=navigator.languages.length;a<b;a++)if(K.hasOwnProperty(navigator.languages[a])){var c=navigator.languages[a];break}c||(c="en")}L=K[c];console.log("Loading language pack: "+c);if(L.c)for(var d in L.c)if(c=document.getElementById(d))c.textContent=L.c[d];ta.forEach(function(a){a()})};K.fr={bb:"Utilisateur inconnu",ab:"Channel inconnu",Ja:"Nouveau message",message:"Message",Ia:"Reseau",Ka:"(visible seulement par vous)",J:"Favoris",l:"Discutions",Ma:"Discutions priv\u00e9es",Na:"Partage sa position GPS",ok:"Ok",Fa:"Annuler",W:function(a){"string"!==typeof a&&(a=parseFloat(a));var b=new Date,c=new Date;a=new Date(a);b.setHours(0,0,0,0);c.setTime(b.getTime());c.setDate(c.getDate()-1);return a.getTime()>b.getTime()?a.toLocaleTimeString():a.getTime()>c.getTime()?"hier, "+a.toLocaleTimeString():
-a.toLocaleString()},c:{fileUploadCancel:"Annuler",neterror:"Impossible de se connecter au chat !"}};K.fr.C=function(a){return"(edit&eacute; "+K.fr.W(a)+")"};K.en={bb:"Unknown member",ab:"Unknown channel",Ja:"New message",message:"Message",Ia:"Network",Ka:"(only visible to you)",J:"Starred",l:"Channels",Ma:"Direct messages",Na:"Share your GPS location",ok:"Ok",Fa:"Cancel",W:function(a){"string"!==typeof a&&(a=parseFloat(a));var b=new Date,c=new Date;a=new Date(a);b.setHours(0,0,0,0);c.setTime(b.getTime());c.setDate(c.getDate()-1);return a.getTime()>b.getTime()?a.toLocaleTimeString():a.getTime()>c.getTime()?"yesterday, "+a.toLocaleTimeString():a.toLocaleString()},
-c:{fileUploadCancel:"Cancel",neterror:"Cannot connect to chat !"}};K.en.C=function(a){return"(edited "+K.en.W(a)+")"};var va=function(){function a(a){this.text="";this.g=a}function b(b,c,d){this.T=c;this.f=null;this.h=[];this.a=d||"";this.ea="<"===this.a;this.pa="*"===this.a;this.da="_"===this.a;this.fa="~"===this.a||"-"===this.a;this.i=">"===this.a||"&gt;"===this.a;this.X=":"===this.a;this.ra="`"===this.a;this.Ca="```"===this.a;this.sa="\n"===this.a;this.ca=void 0!==d&&-1!==m.w.indexOf(d);this.g=b;this.ga=null;this.b=this.sa||this.ca?c+d.length-1:!1;this.ca&&(this.f=new a(this),this.h.push(this.f),this.f.text=d)}
+function I(a){for(var b=E.context,c=0,d=b.a.length;c<d;c++){var e=b.a[c].l[a];if(e)return e}return null}function ra(a){for(var b=E.context,c=[],d=0,e=b.a.length;d<e;d++){var g=b.a[d].l,f;for(f in g)a&&!a(g[f],b.a[d],f)||c.push(f)}return c}function J(a){for(var b=E.context,c=0,d=b.a.length;c<d;c++){var e=b.a[c].m[a];if(e)return e}return null}function sa(a){for(var b=E.context,c=0,d=b.a.length;c<d;c++)if(b.a[c].self.id===a)return!0;return!1}"undefined"!==typeof module&&(module.H.jb=ma);var K={},L,ta=[];function ua(){if(!c){for(var a=0,b=navigator.languages.length;a<b;a++)if(K.hasOwnProperty(navigator.languages[a])){var c=navigator.languages[a];break}c||(c="en")}L=K[c];console.log("Loading language pack: "+c);if(L.c)for(var d in L.c)if(c=document.getElementById(d))c.textContent=L.c[d];ta.forEach(function(a){a()})};K.fr={bb:"Utilisateur inconnu",ab:"Channel inconnu",Ja:"Nouveau message",message:"Message",Ia:"Reseau",Ka:"(visible seulement par vous)",J:"Favoris",l:"Discutions",Ma:"Discutions priv\u00e9es",Na:"Partage sa position GPS",ok:"Ok",Fa:"Annuler",X:function(a){"string"!==typeof a&&(a=parseFloat(a));var b=new Date,c=new Date;a=new Date(a);b.setHours(0,0,0,0);c.setTime(b.getTime());c.setDate(c.getDate()-1);return a.getTime()>b.getTime()?a.toLocaleTimeString():a.getTime()>c.getTime()?"hier, "+a.toLocaleTimeString():
+a.toLocaleString()},c:{fileUploadCancel:"Annuler",neterror:"Impossible de se connecter au chat !"}};K.fr.C=function(a){return"(edit&eacute; "+K.fr.X(a)+")"};K.en={bb:"Unknown member",ab:"Unknown channel",Ja:"New message",message:"Message",Ia:"Network",Ka:"(only visible to you)",J:"Starred",l:"Channels",Ma:"Direct messages",Na:"Share your GPS location",ok:"Ok",Fa:"Cancel",X:function(a){"string"!==typeof a&&(a=parseFloat(a));var b=new Date,c=new Date;a=new Date(a);b.setHours(0,0,0,0);c.setTime(b.getTime());c.setDate(c.getDate()-1);return a.getTime()>b.getTime()?a.toLocaleTimeString():a.getTime()>c.getTime()?"yesterday, "+a.toLocaleTimeString():a.toLocaleString()},
+c:{fileUploadCancel:"Cancel",neterror:"Cannot connect to chat !"}};K.en.C=function(a){return"(edited "+K.en.X(a)+")"};var va=function(){function a(a){this.text="";this.g=a}function b(b,c,d){this.U=c;this.f=null;this.h=[];this.a=d||"";this.ea="<"===this.a;this.pa="*"===this.a;this.da="_"===this.a;this.fa="~"===this.a||"-"===this.a;this.i=">"===this.a||"&gt;"===this.a;this.Y=":"===this.a;this.ra="`"===this.a;this.Ca="```"===this.a;this.sa="\n"===this.a;this.ca=void 0!==d&&-1!==m.w.indexOf(d);this.g=b;this.ga=null;this.b=this.sa||this.ca?c+d.length-1:!1;this.ca&&(this.f=new a(this),this.h.push(this.f),this.f.text=d)}
 function c(a){return"A"<=a&&"Z">=a||"a"<=a&&"z">=a||"0"<=a&&"9">=a||-1!=="\u00e0\u00e8\u00ec\u00f2\u00f9\u00c0\u00c8\u00cc\u00d2\u00d9\u00e1\u00e9\u00ed\u00f3\u00fa\u00fd\u00c1\u00c9\u00cd\u00d3\u00da\u00dd\u00e2\u00ea\u00ee\u00f4\u00fb\u00c2\u00ca\u00ce\u00d4\u00db\u00e3\u00f1\u00f5\u00c3\u00d1\u00d5\u00e4\u00eb\u00ef\u00f6\u00fc\u00ff\u00c4\u00cb\u00cf\u00d6\u00dc\u0178\u00e7\u00c7\u00df\u00d8\u00f8\u00c5\u00e5\u00c6\u00e6\u0153".indexOf(a)}function d(a){a=a||h;for(var c=0,e=a.h.length;c<e;c++){var l=
-a.h[c];if(l instanceof b)if(l.b){if(l=d(l))return l}else return l}return null}function e(a,c){a.g instanceof b&&(a.g.h.splice(a.g.h.indexOf(a)+(c?1:0)),a.g.f=a.g.h[a.g.h.length-1],e(a.g,!0))}function g(a){return a}function f(a){return{link:a,text:a,Ha:!1}}var n,h,m={w:[],V:g,ba:g,$:f};b.prototype.ua=function(){return this.pa&&!!this.b||this.g instanceof b&&this.g.ua()};b.prototype.xa=function(){return this.da&&!!this.b||this.g instanceof b&&this.g.xa()};b.prototype.ya=function(){return this.fa&&!!this.b||
-this.g instanceof b&&this.g.ya()};b.prototype.ma=function(){return this.X&&!!this.b||this.g instanceof b&&this.g.ma()};b.prototype.wa=function(){return this.ca&&!!this.b||this.g instanceof b&&this.g.wa()};b.prototype.va=function(){return this.ra&&!!this.b||this.g instanceof b&&this.g.va()};b.prototype.la=function(){return this.Ca&&!!this.b||this.g instanceof b&&this.g.la()};b.prototype.za=function(){for(var a=0,c=this.h.length;a<c;a++)if(this.h[a]instanceof b&&(!this.h[a].b||this.h[a].za()))return!0;
-return!1};b.prototype.Aa=function(a){if("<"===this.a&&">"===n[a])return!0;var b=c(n[a-1]);if(!this.i&&n.substr(a,this.a.length)===this.a){if(!b&&(this.pa||this.da||this.fa))return!1;if(this.f&&this.za())return this.f.Da();if(this.Pa())return!0}return"\n"===n[a]&&this.i?!0:!1};b.prototype.Pa=function(){for(var a=this;a;){for(var c=0,d=a.h.length;c<d;c++)if(a.h[c]instanceof b||a.h[c].text.length)return!0;a=a.ga}return!1};b.prototype.Da=function(){var a=new b(this.g,this.T,this.a);a.ga=this;this.f&&
-this.f instanceof b&&(a.f=this.f.Da(),a.h=[a.f]);return a};b.prototype.Qa=function(a){return this.X&&(" "===n[a]||"\t"===n[a])||(this.X||this.ea||this.pa||this.da||this.fa||this.ra)&&"\n"===n[a]?!1:!0};b.prototype.Ra=function(b){if(this.ra||this.X||this.Ca||this.ea)return null;if(!this.f||this.f.b||this.f instanceof a){var d=c(n[b-1]),e=c(n[b+1]);if("```"===n.substr(b,3))return"```";var f=h.na();if(void 0===f||f){if("&gt;"===n.substr(b,4))return"&gt;";if(">"===n[b])return n[b]}if("`"===n[b]&&!d||
+a.h[c];if(l instanceof b)if(l.b){if(l=d(l))return l}else return l}return null}function e(a,c){a.g instanceof b&&(a.g.h.splice(a.g.h.indexOf(a)+(c?1:0)),a.g.f=a.g.h[a.g.h.length-1],e(a.g,!0))}function g(a){return a}function f(a){return{link:a,text:a,Ha:!1}}var n,h,m={w:[],W:g,ba:g,$:f};b.prototype.ua=function(){return this.pa&&!!this.b||this.g instanceof b&&this.g.ua()};b.prototype.xa=function(){return this.da&&!!this.b||this.g instanceof b&&this.g.xa()};b.prototype.ya=function(){return this.fa&&!!this.b||
+this.g instanceof b&&this.g.ya()};b.prototype.ma=function(){return this.Y&&!!this.b||this.g instanceof b&&this.g.ma()};b.prototype.wa=function(){return this.ca&&!!this.b||this.g instanceof b&&this.g.wa()};b.prototype.va=function(){return this.ra&&!!this.b||this.g instanceof b&&this.g.va()};b.prototype.la=function(){return this.Ca&&!!this.b||this.g instanceof b&&this.g.la()};b.prototype.za=function(){for(var a=0,c=this.h.length;a<c;a++)if(this.h[a]instanceof b&&(!this.h[a].b||this.h[a].za()))return!0;
+return!1};b.prototype.Aa=function(a){if("<"===this.a&&">"===n[a])return!0;var b=c(n[a-1]);if(!this.i&&n.substr(a,this.a.length)===this.a){if(!b&&(this.pa||this.da||this.fa))return!1;if(this.f&&this.za())return this.f.Da();if(this.Pa())return!0}return"\n"===n[a]&&this.i?!0:!1};b.prototype.Pa=function(){for(var a=this;a;){for(var c=0,d=a.h.length;c<d;c++)if(a.h[c]instanceof b||a.h[c].text.length)return!0;a=a.ga}return!1};b.prototype.Da=function(){var a=new b(this.g,this.U,this.a);a.ga=this;this.f&&
+this.f instanceof b&&(a.f=this.f.Da(),a.h=[a.f]);return a};b.prototype.Qa=function(a){return this.Y&&(" "===n[a]||"\t"===n[a])||(this.Y||this.ea||this.pa||this.da||this.fa||this.ra)&&"\n"===n[a]?!1:!0};b.prototype.Ra=function(b){if(this.ra||this.Y||this.Ca||this.ea)return null;if(!this.f||this.f.b||this.f instanceof a){var d=c(n[b-1]),e=c(n[b+1]);if("```"===n.substr(b,3))return"```";var f=h.na();if(void 0===f||f){if("&gt;"===n.substr(b,4))return"&gt;";if(">"===n[b])return n[b]}if("`"===n[b]&&!d||
 "\n"===n[b]||!(-1===["*","~","-","_"].indexOf(n[b])||!e&&void 0!==n[b+1]&&-1==="*~-_<&".split("").indexOf(n[b+1])||d&&void 0!==n[b-1]&&-1==="*~-_<&".split("").indexOf(n[b-1]))||-1!==[":"].indexOf(n[b])&&e||-1!==["<"].indexOf(n[b]))return n[b];d=0;for(e=m.w.length;d<e;d++)if(f=m.w[d],n.substr(b,f.length)===f)return f}return null};a.prototype.na=function(){if(""!==this.text.trim())return!1};b.prototype.na=function(){for(var a=this.h.length-1;0<=a;a--){var b=this.h[a].na();if(void 0!==b)return b}if(this.sa||
-this.i)return!0};a.prototype.D=function(a){this.text+=n[a];return 1};b.prototype.D=function(c){var d=this.f&&!this.f.b&&this.f.Aa?this.f.Aa(c):null;if(d){var e=this.f.a.length;this.f.ta(c);d instanceof b&&(this.f=d,this.h.push(d));return e}if(!this.f||this.f.b||this.f instanceof a||this.f.Qa(c)){if(d=this.Ra(c))return this.f=new b(this,c,d),this.h.push(this.f),this.f.a.length;if(!this.f||this.f.b)this.f=new a(this),this.h.push(this.f);return this.f.D(c)}d=this.f.T+1;h.ka(this.f.T);this.f=new a(this);
-this.f.D(d-1);this.h.pop();this.h.push(this.f);return d-c};b.prototype.ta=function(a){for(var b=this;b;)b.b=a,b=b.ga};b.prototype.ka=function(a){this.b&&this.b>=a&&(this.b=!1);this.h.forEach(function(c){c instanceof b&&c.ka(a)})};a.prototype.innerHTML=function(){if(this.g.ma()){for(var a=this.g;a&&!a.X;)a=a.g;if(a){var a=a.a+this.text+a.a,b=m.V(a);return b?b:a}return(a=m.V(this.text))?a:this.text}if(this.g.la()){if("undefined"!==typeof hljs)try{return a=this.text.match(/^\w+/),hljs.configure({useBR:!0,
+this.i)return!0};a.prototype.D=function(a){this.text+=n[a];return 1};b.prototype.D=function(c){var d=this.f&&!this.f.b&&this.f.Aa?this.f.Aa(c):null;if(d){var e=this.f.a.length;this.f.ta(c);d instanceof b&&(this.f=d,this.h.push(d));return e}if(!this.f||this.f.b||this.f instanceof a||this.f.Qa(c)){if(d=this.Ra(c))return this.f=new b(this,c,d),this.h.push(this.f),this.f.a.length;if(!this.f||this.f.b)this.f=new a(this),this.h.push(this.f);return this.f.D(c)}d=this.f.U+1;h.ka(this.f.U);this.f=new a(this);
+this.f.D(d-1);this.h.pop();this.h.push(this.f);return d-c};b.prototype.ta=function(a){for(var b=this;b;)b.b=a,b=b.ga};b.prototype.ka=function(a){this.b&&this.b>=a&&(this.b=!1);this.h.forEach(function(c){c instanceof b&&c.ka(a)})};a.prototype.innerHTML=function(){if(this.g.ma()){for(var a=this.g;a&&!a.Y;)a=a.g;if(a){var a=a.a+this.text+a.a,b=m.W(a);return b?b:a}return(a=m.W(this.text))?a:this.text}if(this.g.la()){if("undefined"!==typeof hljs)try{return a=this.text.match(/^\w+/),hljs.configure({useBR:!0,
 tabReplace:"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"}),a&&hljs.getLanguage(a[0])?hljs.fixMarkup(hljs.highlight(a[0],this.text.substr(a[0].length)).value):hljs.fixMarkup(hljs.highlightAuto(this.text).value)}catch(p){console.error(p)}return this.text.replace(/\n/g,"<br/>")}return m.ba(this.text)};a.prototype.outerHTML=function(){var a="span",b=[],c="";if(this.g.la()){a="pre";b.push("codeblock");var d=this.innerHTML()}else this.g.va()?(b.push("code"),d=this.innerHTML()):(this.g.ea&&(d=m.$(this.text))?(a=
 "a",c=' href="'+d.link+'"',d.Ha||(c+=' target="_blank"'),d=m.ba(d.text)):d=this.innerHTML(),this.g.ua()&&b.push("bold"),this.g.xa()&&b.push("italic"),this.g.ya()&&b.push("strike"),this.g.ma()&&b.push("emoji"),this.g.wa()&&b.push("highlight"));return"<"+a+c+(b.length?' class="'+b.join(" ")+'"':"")+">"+d+"</"+a+">"};b.prototype.outerHTML=function(){var a="";this.i&&(a+='<span class="quote">');this.sa&&(a+="<br/>");this.h.forEach(function(b){a+=b.outerHTML()});this.i&&(a+="</span>");return a};b.prototype.Ba=
-function(a){this.i&&!this.b&&this.ta(a);this.h.forEach(function(c){c instanceof b&&c.Ba(a)})};return function(c,k){k||(k={});m.w=k.w||[];m.V=k.V||g;m.ba=k.ba||g;m.$=k.$||f;n=c;h=new b(this,0);k=0;c=n.length;do{for(;k<c;)k+=h.D(k);h.Ba(n.length);if(k=d()){e(k,!1);h.ka(k.T);var l=new a(k.g);l.D(k.T);k.g.h.push(l);k.g.f=l;k=k.T+1}else k=void 0}while(void 0!==k);return h.outerHTML()}}();"undefined"!==typeof module&&(module.H.u=va);function wa(a,b){this.i=a;this.content=b;this.c=xa(this);this.b=ya(this);this.a=[];this.D=[]}
+function(a){this.i&&!this.b&&this.ta(a);this.h.forEach(function(c){c instanceof b&&c.Ba(a)})};return function(c,k){k||(k={});m.w=k.w||[];m.W=k.W||g;m.ba=k.ba||g;m.$=k.$||f;n=c;h=new b(this,0);k=0;c=n.length;do{for(;k<c;)k+=h.D(k);h.Ba(n.length);if(k=d()){e(k,!1);h.ka(k.U);var l=new a(k.g);l.D(k.U);k.g.h.push(l);k.g.f=l;k=k.U+1}else k=void 0}while(void 0!==k);return h.outerHTML()}}();"undefined"!==typeof module&&(module.H.u=va);function wa(a,b){this.i=a;this.content=b;this.c=xa(this);this.b=ya(this);this.a=[];this.D=[]}
 function xa(a){var b=document.createElement("div"),c=document.createElement("header"),d=document.createElement("span"),e=document.createElement("span"),g=document.createElement("div"),f=document.createElement("footer");b.a=document.createElement("span");b.b=document.createElement("span");d.textContent=a.i;"string"==typeof a.content?g.innerHTML=a.content:g.appendChild(a.content);c.className=za;d.className=Aa;e.className=Ba;e.textContent="x";c.appendChild(d);c.appendChild(e);b.appendChild(c);g.className=
 Ca;b.appendChild(g);b.b.className=Da;b.b.textContent=L.Fa;b.b.addEventListener("click",function(){M(a,!1)});e.addEventListener("click",function(){M(a,!1)});b.a.addEventListener("click",function(){M(a,!0)});f.appendChild(b.b);b.a.className=Da;b.a.textContent=L.ok;f.appendChild(b.a);f.className=Ea+" "+Fa;b.appendChild(f);b.className=Ga;return b}function M(a,b){(b?a.a:a.D).forEach(function(a){a()});a.close()}
 function ya(a){var b=document.createElement("div");b.className=Ha;b.addEventListener("click",function(){M(this,!1)}.bind(a));return b}function Ia(a,b,c){a.c.a.textContent=b;a.c.b.textContent=c;return a}wa.prototype.aa=function(a){a=a||document.body;a.appendChild(this.b);a.appendChild(this.c);return this};wa.prototype.close=function(){this.c.remove();this.b.remove();return this};function Ja(a,b){a.a.push(b);return a};var Da="button",Ea="button-container",Ga="dialog",Ha="dialog-overlay",za="dialog-title",Aa="dialog-title-label",Ba="dialog-title-close",Ca="dialog-body",Fa="dialog-footer";var Ka=[],La=0;
@@ -38,19 +38,20 @@ function Za(a){a:{var b={};if(Q){var c;for(c=Q;!b[a];){if(c=c.a.data[a])if("alia
 function P(){var a=O.length,b="";if(X)b="!"+L.Ia+" - ",document.getElementById("linkFavicon").href="favicon_err.png";else if(a)b="(!"+a+") - ",$a(a,a);else{var c=0;pa(E.context,function(a){a.I>a.A&&c++});c&&(b="("+c+") - ");$a(0,c)}E.context.b&&(b+=E.context.b.name);document.title=b}
 function ab(){if("Notification"in window)if("granted"===Notification.permission){var a=Date.now();if(La+3E4<a){var b=new Notification(L.Ja);La=a;setTimeout(function(){b.close()},5E3)}}else"denied"!==Notification.permission&&Notification.requestPermission()}
 function Wa(){var a=document.createDocumentFragment(),b=N.id,c=null,d=0,e=null,g;Ka=[];E.a[b]&&E.a[b].a.forEach(function(b){if(b.i)b.S();else{var f=b.M(),h=!1;c&&c.G===b.G&&b.G?30>Math.abs(d-b.j)&&!(b instanceof A)?e.classList.add("slackmsg-same-ts"):d=b.j:(d=b.j,h=!0);(!c||c.j<=N.A)&&b.j>N.A?f.classList.add("slackmsg-first-unread"):f.classList.remove("slackmsg-first-unread");if(b instanceof A)e=c=null,d=0,a.appendChild(f),g=null;else{if(h||!g){var h=J(b.G),m=b.username,l=document.createElement("div"),
-k=document.createElement("div"),p=document.createElement("span");l.U=document.createElement("img");l.U.className="slackmsg-author-img";p.className="slackmsg-author-name";h?(p.textContent=h.name,l.U.src="api/avatar?user="+h.id):(p.textContent=m||"?",l.U.src="");k.appendChild(l.U);k.appendChild(p);k.className="slackmsg-author";l.className="slackmsg-authorGroup";l.appendChild(k);l.content=document.createElement("div");l.content.className="slackmsg-author-messages";l.appendChild(l.content);g=l;Ka.push(g);
+k=document.createElement("div"),p=document.createElement("span");l.V=document.createElement("img");l.V.className="slackmsg-author-img";p.className="slackmsg-author-name";h?(p.textContent=h.name,l.V.src="api/avatar?user="+h.id):(p.textContent=m||"?",l.V.src="");k.appendChild(l.V);k.appendChild(p);k.className="slackmsg-author";l.className="slackmsg-authorGroup";l.appendChild(k);l.content=document.createElement("div");l.content.className="slackmsg-author-messages";l.appendChild(l.content);g=l;Ka.push(g);
 a.appendChild(g)}c=b;e=f;g.content.appendChild(f)}}});b=document.getElementById("chatWindow");b.textContent="";b.appendChild(a);b.scrollTop=b.scrollHeight-b.clientHeight;window.hasFocus&&Xa()}
 function bb(a,b){a.classList.contains("slackmsg-hover-reply")?(V&&(V=null,W()),T!==b&&(T=b,U())):a.classList.contains("slackmsg-hover-reaction")?cb.aa(document.body,{Za:N.id,Wa:b.id},function(a){a&&Ya(this.Za,this.Wa,a)}):a.classList.contains("slackmsg-hover-edit")?(T&&(T=null,U()),V!==b&&(V=b,W())):a.classList.contains("slackmsg-hover-remove")&&(T&&(T=null,U()),V&&(V=null,W()),db(b))}
 function eb(a){function b(a,b){for(b=b||a.target;b!==a.currentTarget&&b;){if(b.id&&b.classList.contains("slackmsg-item"))return b.id;b=b.parentElement}}for(var c=a.target;c!==a.currentTarget&&c&&!c.classList.contains("slackmsg-hover");){var d;if(c.parentElement&&c.classList.contains("slackmsg-attachment-actions-item")){var e=c.dataset.attachmentIndex,g=c.dataset.actionIndex;if((d=b(a,c))&&void 0!==e&&void 0!==g){d=d.substr(d.lastIndexOf("_")+1);(a=la(E.a[N.id],d))&&a.o[e]&&a.o[e].actions&&a.o[e].actions[g]&&
 fb(a,a.o[e],a.o[e].actions[g]);break}}if(c.parentElement&&c.parentElement.classList.contains("slackmsg-hover")){if(d=b(a,c))d=d.substr(d.lastIndexOf("_")+1),(a=la(E.a[N.id],d))&&bb(c,a);break}c=c.parentElement}}
 function fb(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 C,message_ts:a.id},f=new XMLHttpRequest;f.open("POST","api/attachmentAction?serviceId="+a.G);f.send(JSON.stringify(d))}var e=N.id;c.confirm?Ja(Ia(new wa(c.confirm.title,c.confirm.text),c.confirm.ok_text,c.confirm.dismiss_text),d).aa():d()}function R(){document.getElementById("msgInput").focus()}
-function Pa(){var a=document.location.hash.substr(1),b=I(a);b&&b!==N?gb(b):(a=J(a))&&a.b&&gb(a.b)}function hb(){var a=document.getElementById("chatWindow").getBoundingClientRect().top;Ka.forEach(function(b){var c=b.U,d=c.clientHeight;b=b.getBoundingClientRect();c.style.top=Math.max(0,Math.min(a-b.top,b.height-d-d/2))+"px"})}
+function Pa(){var a=document.location.hash.substr(1),b=I(a);b&&b!==N?gb(b):(a=J(a))&&a.b&&gb(a.b)}function hb(){var a=document.getElementById("chatWindow").getBoundingClientRect().top;Ka.forEach(function(b){var c=b.V,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(){ua();ib();document.getElementById("chatWindow").addEventListener("click",eb);window.addEventListener("hashchange",function(){document.location.hash&&"#"===document.location.hash[0]&&Pa()});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("fileUploadForm").addEventListener("submit",function(a){a.preventDefault();a=document.getElementById("fileUploadInput");var b=a.value;b&&(b=b.substr(b.lastIndexOf("\\")+1),jb(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();N&&document.getElementById("fileUploadContainer").classList.remove("hidden");return!1});document.getElementById("msgForm").addEventListener("submit",function(a){a.preventDefault();a=document.getElementById("msgInput");N&&a.value&&kb(a.value)&&(a.value="",T&&(T=null,U()),V&&(V=null,U()),document.getElementById("slashList").textContent="");R();return!1});window.addEventListener("blur",function(){window.hasFocus=
 !1});window.addEventListener("focus",function(){window.hasFocus=!0;La=0;N&&Xa();R()});document.getElementById("chatWindow").addEventListener("scroll",hb);var a=0;document.getElementById("msgInput").addEventListener("input",function(){if(N){var b=Date.now();a+3E3<b&&(Q.self.a||N instanceof r)&&(lb(),a=b);var b=[],c=this.value;if("/"===this.value[0]){var d=c.indexOf(" "),e=-1!==d,d=-1===d?c.length:d,c=c.substr(0,d);if(e){var g=mb.Ga(c);g&&b.push(g)}else b=mb.Sa(c);var g=Q?Q.i.data:{};for(n in g){var f=
 g[n];(!e&&f.name.substr(0,d)===c||e&&f.name===c)&&b.push(f)}}b.sort(function(a,b){return a.R.localeCompare(b.R)||a.name.localeCompare(b.name)});var n=document.getElementById("slashList");var d=document.createDocumentFragment();n.textContent="";e=0;for(c=b.length;e<c;e++){g=b[e];if(h!==g.R){var h=g.R;d.appendChild(nb(g.R))}d.appendChild(ob(g))}n.appendChild(d)}});window.hasFocus=!0;(function(){var a=document.getElementById("emojiButton");if("makeEmoji"in window){var c=window.makeEmoji("smile");c?a.innerHTML=
-"<span class='emoji-small'>"+c.outerHTML+"</span>":a.style.backgroundImage='url("smile.svg")';(c=window.makeEmoji("paperclip"))?document.getElementById("attachFile").innerHTML="<span class='emoji-small'>"+c.outerHTML+"</span>":document.getElementById("attachFile").style.backgroundImage='url("public/paperclip.svg")';a.addEventListener("click",function(){Q&&cb.aa(document.body,Q,function(a){a&&(document.getElementById("msgInput").value+=":"+a+":");R()})})}else a.classList.add("hidden")})();pb()});var qb={display:function(){return this},$a:function(){return this},Xa:{Y:{}}};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.N=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");
+"<span class='emoji-small'>"+c.outerHTML+"</span>":a.style.backgroundImage='url("smile.svg")';(c=window.makeEmoji("paperclip"))?document.getElementById("attachFile").innerHTML="<span class='emoji-small'>"+c.outerHTML+"</span>":document.getElementById("attachFile").style.backgroundImage='url("public/paperclip.svg")';a.addEventListener("click",function(){Q&&cb.aa(document.body,Q,function(a){a&&(document.getElementById("msgInput").value+=":"+a+":");R()})})}else a.classList.add("hidden")})();pb()});var qb=function(){function a(a){c&&(document.getElementById("settings").classList.remove("display-"+c),document.getElementById("setting-menu-"+c).classList.remove("selected"));document.getElementById("settings").classList.add("display-"+a);document.getElementById("setting-menu-"+a).classList.add("selected");c=a}var b=!1,c=null,d={T:"services",display:"display",ob:"privacy"};document.getElementById("settingMenuItems").addEventListener("click",function(b){for(var c=b.target;b.currentTarget!==c&&c;c=
+c.parentNode)if(c.dataset&&c.dataset.target)for(var e in d)if(d[e]===c.dataset.target){a(d[e]);return}});return{display:function(c){b||(document.getElementById("settings").classList.remove("hidden"),b=!0);a(c||d.T);return this},$a:function(){return this},Xa:d}}();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.N=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 g=d.getContext("2d"),f=e.getContext("2d"),n=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)))},h=function(a,d,e,h){f.fillStyle="#808080";f.fillRect(0,0,300,300);g.fillStyle="#808080";g.fillRect(0,0,300,300);var k=Math.pow(2,a),l=(e+180)/360*k,m=(1-Math.log(Math.tan(d*Math.PI/180)+1/Math.cos(d*Math.PI/180))/Math.PI)/2*k,F=Math.floor(l),ba=Math.floor(m),
 ca=h?100*h/n(180/Math.PI*Math.atan(.5*(Math.exp(Math.PI-2*Math.PI*ba/k)-Math.exp(-(Math.PI-2*Math.PI*ba/k)))),F/k*360-180,(F+1)/k*360-180):0;d=b;for(e=0;3>e;e++)for(h=0;3>h;h++)c(a,F+e-1,ba+h-1,{Ta:e,Va:h,Oa:d}).then(function(a){if(a.Oa===b){f.drawImage(a.N,100*a.Ta,100*a.Va,100,100);a=l-F;var c=m-ba;a=100*a+100;c=100*c+100;g.putImageData(f.getImageData(0,0,300,300),0,0);void 0!==ca&&(g.beginPath(),g.arc(a,c,Math.max(ca,10),0,2*Math.PI,!1),g.lineWidth=2,g.fillStyle="rgba(244, 146, 66, 0.4)",g.strokeStyle=
 "rgba(244, 146, 66, 0.8)",g.stroke(),g.fill());if(void 0===ca||25<ca)g.strokeStyle="rgba(244, 146, 66, 1)",g.beginPath(),g.moveTo(a-5,c-5),g.lineTo(a+5,c+5),g.stroke(),g.moveTo(a+5,c-5),g.lineTo(a-5,c+5),g.stroke()}})},m,l=function(c){c=Math.max(4,Math.min(19,c));m!==c&&(b++,m=c,h(m,Number(a.latitude),Number(a.longitude),Number(a.accuracy)))};l(12);var e=document.createElement("div"),k=document.createElement("div"),p=document.createElement("button"),t=document.createElement("button");e.className=
@@ -63,7 +64,7 @@ function tb(a){var b={good:"#2fa44f",warning:"#de9e31",danger:"#d50200"};if(a){i
 function ub(a,b,c){var d=document.createElement("li"),e=document.createElement("div"),g=document.createElement("div"),f=document.createElement("a"),n=document.createElement("div"),h=document.createElement("img"),m=document.createElement("a"),l=document.createElement("div"),k=document.createElement("div"),p=document.createElement("div"),t=document.createElement("img"),v=document.createElement("div");d.className="slackmsg-attachment";e.style.borderColor=tb(b.color||"");e.className="slackmsg-attachment-block";
 g.className="slackmsg-attachment-pretext";b.pretext?g.innerHTML=a.u(b.pretext):g.classList.add("hidden");f.target="_blank";b.title?(f.innerHTML=a.u(b.title),b.title_link&&(f.href=b.title_link),f.className="slackmsg-attachment-title"):f.className="hidden slackmsg-attachment-title";m.target="_blank";n.className="slackmsg-author";b.author_name&&(m.innerHTML=a.u(b.author_name),m.href=b.author_link||"",m.className="slackmsg-author-name",h.className="slackmsg-author-img",b.author_icon&&(h.src=b.author_icon,
 n.appendChild(h)),n.appendChild(m));p.className="slackmsg-attachment-thumb";b.thumb_url?(h=document.createElement("img"),h.src=b.thumb_url,p.appendChild(h),e.classList.add("has-thumb"),b.video_html&&(p.dataset.video=b.video_html)):p.classList.add("hidden");l.className="slackmsg-attachment-content";h=a.u(b.text||"");k.className="slackmsg-attachment-text";h&&""!=h?k.innerHTML=h:k.classList.add("hidden");l.appendChild(p);l.appendChild(k);b.geo&&(k=rb(b.geo))&&l.appendChild(k);t.className="slackmsg-attachment-img";
-b.image_url?t.src=b.image_url:t.classList.add("hidden");v.className="slackmsg-attachment-footer";b.footer&&(k=document.createElement("span"),k.className="slackmsg-attachment-footer-text",k.innerHTML=a.u(b.footer),b.footer_icon&&(p=document.createElement("img"),p.src=b.footer_icon,p.className="slackmsg-attachment-footer-icon",v.appendChild(p)),v.appendChild(k));b.ts&&(k=document.createElement("span"),k.className="slackmsg-ts",k.innerHTML=L.W(b.ts),v.appendChild(k));e.appendChild(f);e.appendChild(n);
+b.image_url?t.src=b.image_url:t.classList.add("hidden");v.className="slackmsg-attachment-footer";b.footer&&(k=document.createElement("span"),k.className="slackmsg-attachment-footer-text",k.innerHTML=a.u(b.footer),b.footer_icon&&(p=document.createElement("img"),p.src=b.footer_icon,p.className="slackmsg-attachment-footer-icon",v.appendChild(p)),v.appendChild(k));b.ts&&(k=document.createElement("span"),k.className="slackmsg-ts",k.innerHTML=L.X(b.ts),v.appendChild(k));e.appendChild(f);e.appendChild(n);
 e.appendChild(l);e.appendChild(t);if(b.fields&&b.fields.length){var w=document.createElement("ul");e.appendChild(w);w.className="slackmsg-attachment-fields";b.fields.forEach(function(b){var c=b.title||"",d=b.value||"";b=!!b["short"];var e=document.createElement("li"),g=document.createElement("div"),f=document.createElement("div");e.className="field";b||e.classList.add("field-long");g.className="field-title";g.textContent=c;f.className="field-text";f.innerHTML=a.u(d);e.appendChild(g);e.appendChild(f);
 e&&w.appendChild(e)})}if(b.actions&&b.actions.length)for(f=document.createElement("ul"),f.className="slackmsg-attachment-actions "+Ea,e.appendChild(f),n=0,l=b.actions.length;n<l;n++)(t=b.actions[n])&&(t=vb(c,n,t))&&f.appendChild(t);e.appendChild(v);d.appendChild(g);d.appendChild(e);return d}
 function vb(a,b,c){var d=document.createElement("li"),e=tb(c.style);d.textContent=c.text;e!==tb()&&(d.style.color=e);d.style.borderColor=e;d.dataset.attachmentIndex=a;d.dataset.actionIndex=b;d.className="slackmsg-attachment-actions-item "+Da;return d}function Ta(a){var b=document.createElement("li"),c=document.createElement("span");c.textContent=a.name;b.appendChild(Na());b.appendChild(c);return b}
@@ -76,7 +77,7 @@ v={},w={},x=document.createElement("div"),B=document.createElement("span"),z=doc
 x.appendChild(B);x.appendChild(z);l.appendChild(f(window.emojiProviderHeader));l.appendChild(k);l.appendChild(f("emojicustom.png"));l.appendChild(p);h.appendChild(l);h.appendChild(x);h.appendChild(t);t.addEventListener("keyup",function(){d()});h.addEventListener("mousemove",function(b){a(b,function(a){var b=a?v[a]||w[a]:null;b?(B.innerHTML=b.c.outerHTML,z.textContent=":"+a+":"):(B.textContent="",z.textContent="")})});h.addEventListener("click",function(b){a(b,function(a){a&&c()&&G&&G(a)})});return{isSupported:n,
 aa:function(a,b,c){return n()?(S=b,G=c,a.appendChild(m),a.appendChild(h),t.value="",d(),t.focus(),!0):!1},search:d,close:b}}();var E,O=[];function wb(){fa.call(this)}wb.prototype=Object.create(fa.prototype);wb.prototype.constructor=wb;function oa(a){return a.b?a.b.id:null}function xb(){this.b=0;this.context=new ma;this.a={}}
 xb.prototype.update=function(a){var b=Date.now();a.v&&(this.b=a.v);if(a["static"])for(e in a["static"]){var c=na(this.context,e);c||(c=new wb,this.context.push(c));ga(c,a["static"][e],b)}pa(this.context,function(a){a.I===a.A&&(a=O.indexOf(a),-1!==a&&O.splice(a,1))});if(a.live){for(e in a.live)(c=this.a[e])?ia(c,a.live[e],b):c=this.a[e]=new Y(e,250,a.live[e],b);for(var d in a.live){var e=H(this.context,d);(c=e.l[d])?(this.a[d].a.length&&(c.I=Math.max(c.I,ka(this.a[d]).j)),c.Z||(yb(e,c,a.live[d]),N&&
-a.live[N.id]&&Wa())):E.b=0}}a["static"]&&Ma();var g=!1;a.typing&&this.context.a.forEach(function(c){var d=g,e=a.typing,f=!1;if(c.s)for(var l in c.s)e[l]||(delete c.s[l],f=!0);if(e)for(l in e)if(c.l[l]){c.s[l]||(c.s[l]={});for(var k in e[l])c.s[l][k]||(f=!0),c.s[l][k]=b}g=d|f},this);(a["static"]||g)&&Ra();a.config&&(zb=new Ab(a.config),zb.Y.length||qb.$a(!1).display(qb.Xa.Y))};
+a.live[N.id]&&Wa())):E.b=0}}a["static"]&&Ma();var g=!1;a.typing&&this.context.a.forEach(function(c){var d=g,e=a.typing,f=!1;if(c.s)for(var l in c.s)e[l]||(delete c.s[l],f=!0);if(e)for(l in e)if(c.l[l]){c.s[l]||(c.s[l]={});for(var k in e[l])c.s[l][k]||(f=!0),c.s[l][k]=b}g=d|f},this);(a["static"]||g)&&Ra();a.config&&(zb=new Ab(a.config),zb.T.length||qb.$a(!1).display(qb.Xa.T))};
 setInterval(function(){var a=!1,b=Date.now();qa(function(c){var d=!1,e;for(e in c.s){var g=!0,f;for(f in c.s[e])c.s[e][f]+3E3<b?(delete c.s[e][f],d=!0):g=!1;g&&(delete c.s[e],d=!0)}d&&(a=!0)});a&&Ra()},1E3);
 function yb(a,b,c){if(b!==N||!window.hasFocus){var d=new RegExp("<@"+a.self.id),e=!1,g=!1,f=!1;c.forEach(function(c){if(!(parseFloat(c.ts)<=b.A)){g=!0;var h;if(!(h=b instanceof r)&&(h=c.text)&&!(h=c.text.match(d)))a:{h=a.self.O.w;for(var m=0,l=h.length;m<l;m++)if(-1!==c.text.indexOf(h[m])){h=!0;break a}h=!1}h&&(-1===O.indexOf(b)&&(f=!0,O.push(b)),e=!0)}});if(g){P();if(c=document.getElementById("room_"+b.id))c.classList.add("unread"),e&&c.classList.add("unreadHi");f&&!window.hasFocus&&ab()}}}
 function Xa(){var a=N,b=O.indexOf(a);if(a.I>a.A){var c=E.a[a.id];if(c&&(c=c.a[c.a.length-1])){var d=new XMLHttpRequest;d.open("POST","api/markread?room="+a.id+"&id="+c.id+"&ts="+c.j,!0);d.send(null);a.A=c.j}}0<=b&&(O.splice(b,1),P());a=document.getElementById("room_"+a.id);a.classList.remove("unread");a.classList.remove("unreadHi")}E=new xb;var Qa=function(){function a(a,c){c.sort(function(){return Math.random()-.5});for(var d=0,e=20;e<m-40;e+=k)for(var g=0;g+k<=l;g+=k)f(a,c[d],e,g),d++,d===c.length&&(c.sort(b),d=0)}function b(a,b){return a.N?b.N?Math.random()-.5:-1:1}function c(a,b){for(var e=0,g=a.length;e<g;e++)if(void 0===a[e].N){d(a[e].src,function(d){a[e].N=d;c(a,b)});return}var f=[];a.forEach(function(a){a.N&&f.push(a.N)});b(f)}function d(a,b){var c=new XMLHttpRequest;c.responseType="blob";c.onreadystatechange=function(){if(4===
@@ -90,14 +91,14 @@ function jb(a,b,c){var d=N;new FileReader;var e=new FormData,g=new XMLHttpReques
 function Eb(a,b,c){var d=new XMLHttpRequest;b="api/msg?room="+a.id+"&text="+encodeURIComponent(b);c&&(b+="&attachments="+encodeURIComponent(JSON.stringify([{fallback:c.text,author_name:J(c.G).name,text:c.text,footer:a.b?L.message:a.name,ts:c.j}])));d.open("POST",b,!0);d.send(null)}
 function kb(a){if(V){var b=new XMLHttpRequest;b.open("PUT","api/msg?room="+N.id+"&ts="+V.id+"&text="+encodeURIComponent(a),!0);b.send(null);return!0}if("/"===a[0]){var c=a.indexOf(" "),b=a.substr(0,-1===c?void 0:c);a=-1===c?"":a.substr(c);var c=Q,d=mb.Ga(b);return d?(d.exec(c,N,a.trim()),!0):c&&(b=c.i.data[b])?(c=new XMLHttpRequest,c.open("POST","api/cmd?room="+N.id+"&cmd="+encodeURIComponent(b.name.substr(1))+"&args="+encodeURIComponent(a.trim()),!0),c.send(null),!0):!1}Eb(N,a,T);return!0}
 function db(a){var b=new XMLHttpRequest;b.open("DELETE","api/msg?room="+N.id+"&ts="+a.id,!0);b.send(null)}function Ya(a,b,c){var d=new XMLHttpRequest;d.open("POST","api/reaction?room="+a+"&msg="+b+"&reaction="+encodeURIComponent(c),!0);d.send(null)};function Y(a,b,c,d){D.call(this,a,b,c,d)}Y.prototype=Object.create(D.prototype);Y.prototype.constructor=Y;Y.prototype.b=function(a,b){return!0===a.isMeMessage?new Fb(this.id,a,b):!0===a.isNotice?new Gb(this.id,a,b):new Hb(this.id,a,b)};
-var Z=function(){function a(a,d){return va(d,{w:a.context.self.O.w,V: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},$:function(c){return b(a,c)}})}function b(a,b){var c=b.indexOf("|");if(-1===c)var d=b;else{d=b.substr(0,c);var f=b.substr(c+1)}if("@"===d[0])if(d=oa(a.context)+"|"+d.substr(1),f=J(d))a=!0,d="#"+f.oa.id,f="@"+f.name;else return null;else if("#"===
-d[0])if(d=oa(a.context)+"|"+d.substr(1),f=I(d))a=!0,d="#"+d,f="#"+f.name;else return null;else{if(!d.match(/^(https?|mailto):\/\//i))return null;a=!1}return{link:d,text:f||d,Ha:a}}return{F:function(a){a.P=!0;return a},S:function(a){a.c&&a.c.parentElement&&(a.c.remove(),delete a.c);return a},M:function(a){a.c?a.P&&(a.P=!1,a.K()):a.ha().K();return a.c},K:function(b){var c=J(b.G);b.c.j.innerHTML=L.W(b.j);b.c.qa.innerHTML=a(b,b.text);b.c.ia.textContent=c?c.name:b.username||"?";for(var c=document.createDocumentFragment(),
+var Z=function(){function a(a,d){return va(d,{w:a.context.self.O.w,W: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},$:function(c){return b(a,c)}})}function b(a,b){var c=b.indexOf("|");if(-1===c)var d=b;else{d=b.substr(0,c);var f=b.substr(c+1)}if("@"===d[0])if(d=oa(a.context)+"|"+d.substr(1),f=J(d))a=!0,d="#"+f.oa.id,f="@"+f.name;else return null;else if("#"===
+d[0])if(d=oa(a.context)+"|"+d.substr(1),f=I(d))a=!0,d="#"+d,f="#"+f.name;else return null;else{if(!d.match(/^(https?|mailto):\/\//i))return null;a=!1}return{link:d,text:f||d,Ha:a}}return{F:function(a){a.P=!0;return a},S:function(a){a.c&&a.c.parentElement&&(a.c.remove(),delete a.c);return a},M:function(a){a.c?a.P&&(a.P=!1,a.K()):a.ha().K();return a.c},K:function(b){var c=J(b.G);b.c.j.innerHTML=L.X(b.j);b.c.qa.innerHTML=a(b,b.text);b.c.ia.textContent=c?c.name:b.username||"?";for(var c=document.createDocumentFragment(),
 e=0,g=b.o.length;e<g;e++){var f=b.o[e];f&&(f=ub(b,f,e))&&c.appendChild(f)}b.c.o.textContent="";b.c.o.appendChild(c);c=b.b;e=document.createDocumentFragment();if(b.B)for(var n in b.B){var g=c,f=b.id,h=n,m=b.B[n],l=Za(h);if(l){for(var k=document.createElement("li"),p=document.createElement("a"),t=document.createElement("span"),v=document.createElement("span"),w=[],x=0,B=m.length;x<B;x++){var z=J(m[x]);z&&w.push(z.name)}w.sort();v.textContent=w.join(", ");t.appendChild(l);t.className="emoji-small";p.href=
 "javascript:toggleReaction('"+g+"', '"+f+"', '"+h+"')";p.appendChild(t);p.appendChild(v);k.className="slackmsg-reaction-item";k.appendChild(p);g=k}else console.warn("Reaction id not found: "+h),g=null;g&&e.appendChild(g)}b.c.B.textContent="";b.c.B.appendChild(e);b.C&&(b.c.C.innerHTML=L.C(b.C),b.c.classList.add("edited"));return b},L:function(a){return a.c.cloneNode(!0)},u:function(b,d){return a(b,d)}}}();
 function Fb(a,b,c){y.call(this,b,c);this.context=H(E.context,a);this.b=a;this.c=Z.c;this.P=Z.P}Fb.prototype=Object.create(A.prototype);q=Fb.prototype;q.constructor=Fb;q.F=function(){return Z.F(this)};q.u=function(a){return Z.u(this,a)};q.S=function(){return Z.S(this)};q.M=function(){return Z.M(this)};q.ha=function(){this.c=sb(this);this.c.classList.add("slackmsg-me_message");return this};q.L=function(){return Z.L(this)};q.K=function(){Z.K(this);return this};
 q.update=function(a,b){A.prototype.update.call(this,a,b);this.F()};function Hb(a,b,c){y.call(this,b,c);this.context=H(E.context,a);this.b=a;this.c=Z.c;this.P=Z.P}Hb.prototype=Object.create(y.prototype);q=Hb.prototype;q.constructor=Hb;q.F=function(){return Z.F(this)};q.u=function(a){return Z.u(this,a)};q.S=function(){return Z.S(this)};q.M=function(){return Z.M(this)};q.ha=function(){this.c=sb(this);return this};q.L=function(){return Z.L(this)};q.K=function(){Z.K(this);return this};
 q.update=function(a,b){y.prototype.update.call(this,a,b);this.F();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.o.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 Gb(a,b,c){y.call(this,b,c);this.context=H(E.context,a);this.b=a;this.a=null;this.P=!0}Gb.prototype=Object.create(C.prototype);q=Gb.prototype;q.constructor=Gb;q.F=function(){return Z.F(this)};q.u=function(a){return Z.u(this,a)};q.S=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.ha=function(){this.c=sb(this);this.a=document.createElement("span");this.c.classList.add("slackmsg-notice");this.a.className="slackmsg-notice";this.a.textContent=L.Ka;this.a.appendChild(this.c);return this};q.K=function(){Z.K(this);return this};q.update=function(a,b){C.prototype.update.call(this,a,b);this.F()};var zb;function Ab(a){this.Y=[];for(var b=0,c=a.length;b<c;b++)null===a[b].service&&null===a[b].device&&Ib(this,JSON.parse(a[b].config))}function Ib(a,b){b.services&&b.services.forEach(function(a){-1===this.Y.indexOf(a)&&this.Y.push(a)},a)};var mb=function(){var a=[];return{Ga:function(b){for(var c=0,d=a.length;c<d;c++)if(-1!==a[c].names.indexOf(b))return a[c];return null},Sa:function(b){var c=[];a.forEach(function(a){for(var d=0,g=a.names.length;d<g;d++)if(a.names[d].substr(0,b.length)===b){c.push(a);break}});return c},Ya:function(b){b.R="client";b.exec=b.exec.bind(b);a.push(b)}}}();function Jb(){return new Promise(function(a,b){"geolocation"in window.navigator?navigator.geolocation.getCurrentPosition(function(c){c?a(c):b("denied")}):b("geolocation not available")})}
+q.ha=function(){this.c=sb(this);this.a=document.createElement("span");this.c.classList.add("slackmsg-notice");this.a.className="slackmsg-notice";this.a.textContent=L.Ka;this.a.appendChild(this.c);return this};q.K=function(){Z.K(this);return this};q.update=function(a,b){C.prototype.update.call(this,a,b);this.F()};var zb;function Ab(a){this.T=[];for(var b=0,c=a.length;b<c;b++)null===a[b].service&&null===a[b].device&&Ib(this,JSON.parse(a[b].config))}function Ib(a,b){b.services&&b.services.forEach(function(a){-1===this.T.indexOf(a)&&this.T.push(a)},a)};var mb=function(){var a=[];return{Ga:function(b){for(var c=0,d=a.length;c<d;c++)if(-1!==a[c].names.indexOf(b))return a[c];return null},Sa:function(b){var c=[];a.forEach(function(a){for(var d=0,g=a.names.length;d<g;d++)if(a.names[d].substr(0,b.length)===b){c.push(a);break}});return c},Ya:function(b){b.R="client";b.exec=b.exec.bind(b);a.push(b)}}}();function Jb(){return new Promise(function(a,b){"geolocation"in window.navigator?navigator.geolocation.getCurrentPosition(function(c){c?a(c):b("denied")}):b("geolocation not available")})}
 ta.push(function(){mb.Ya({name:"/sherlock",names:["/sherlock","/sharelock"],usage:"",description:L.Na,exec:function(a,b){Jb().then(function(a){var c=a.coords.latitude,e=a.coords.longitude;Eb(b,"https://www.openstreetmap.org/?mlat="+c+"&mlon="+e+"&macc="+a.coords.accuracy+"#map=17/"+c+"/"+e)}).catch(function(a){console.error("Error: ",a)})}})});
 })();

+ 5 - 0
srv/public/style.css

@@ -194,6 +194,11 @@ body { display: flex; margin: 0; padding: 0; font-family: Lato, sans-serif; heig
 .maci-content { margin: 15px; }
 .maci-content footer { text-align: right; }
 
+.settingContent > section { display: none; }
+.maci-setting.display-services .settings-services { display: block; }
+.maci-setting.display-display .settings-display { display: block; }
+.maci-setting.display-privacy .settings-privacy { display: block; }
+
 @media screen and (max-width: 500px) {
     .maci-wrapper { position: fixed; z-index: 5000; top: 50%; left: 0; width: 100%; transform: translate(0, -50%); }
 }

+ 1 - 1
srv/src/template/_templates.js

@@ -1,5 +1,5 @@
 
-const config = require('./../config.js');
+const config = require('../../config.js');
 
 module.exports = {
     header: function(title, cssFiles, moreHeader) {

+ 15 - 1
srv/src/template/index.js

@@ -1,6 +1,6 @@
 
 const templates = require('./_templates.js'),
-        config = require('../config.js');
+        config = require('../../config.js');
 
 module.exports.exec = function(req, res) {
     if (!req.account.cguReadAndAccepted) {
@@ -36,8 +36,22 @@ module.exports.exec = function(req, res) {
               </header>
               <div>
                   <aside class="settingNav">
+                      <ul id="settingMenuItems">
+                          <li id="setting-menu-services" data-target="services"></li>
+                          <li id="setting-menu-display" data-target="display"></li>
+                          <li id="setting-menu-privacy" data-target="privacy"></li>
+                      </ul>
                   </aside>
                   <div class="settingContent">
+                      <section class="settings-services">
+                          <h1>Services</h1>
+                      </section>
+                      <section class="settings-display">
+                          <h1>Display</h1>
+                      </section>
+                      <section class="settings-privacy">
+                          <h1>Privacy</h1>
+                      </section>
                   </div>
               </div>
               <footer class="settingFooter">

+ 8 - 8
srv/src/template/login.js

@@ -1,12 +1,12 @@
 
-const config = require("../config.js")
-    ,Slack = require("../src/slack.js").Slack
-    ,GoogleOAuth = require("../src/googleOAuth.js").GoogleOAuth
-    ,FacebookOAuth = require("../src/facebookOAuth.js").FacebookOAuth
-    ,slackManager = require("../src/slackManager.js").SlackManager
-    ,accountManager = require("../src/models/accounts.js").accountManager
-    ,accountConfigManager = require("../src/models/accountConfig.js").accountConfigManager
-    ,sessionManager = require("../src/session.js").SessionManager
+const config = require("../../config.js")
+    ,Slack = require("../slack.js").Slack
+    ,GoogleOAuth = require("../googleOAuth.js").GoogleOAuth
+    ,FacebookOAuth = require("../facebookOAuth.js").FacebookOAuth
+    ,slackManager = require("../slackManager.js").SlackManager
+    ,accountManager = require("../models/accounts.js").accountManager
+    ,accountConfigManager = require("../models/accountConfig.js").accountConfigManager
+    ,sessionManager = require("../session.js").SessionManager
     ,templates = require('./_templates.js');
 
 function checkTokens(service, req, cb) {

+ 0 - 0
srv/src/template/register.js