|
|
@@ -1,103 +1,103 @@
|
|
|
"use strict";(function(){
|
|
|
-var q;function aa(a){this.id=a;this.version=0}aa.prototype.update=function(a,b){void 0!==a.name&&(this.name=a.name);this.version=Math.max(this.version,b)};function da(a){this.a=a.desc;this.name=a.name;this.type=a.type;this.usage=a.usage;this.R=a.category}function ea(){this.ia={};this.w=[];this.version=0}
|
|
|
-ea.prototype.update=function(a,b){a.emoji_use&&(this.ia=JSON.parse(a.emoji_use));a.highlight_words?this.w=(a.highlight_words||"").split(",").filter(function(a){return""!==a.trim()}):a.highlights&&(this.w=a.highlights);this.version=Math.max(this.version,b)};function fa(){this.b=null;this.l={};this.m={};this.self=null;this.a={version:0,data:{}};this.i={version:0,data:{}};this.s={};this.D=0}
|
|
|
+var q;function aa(a){this.id=a;this.version=0}aa.prototype.update=function(a,b){void 0!==a.name&&(this.name=a.name);this.version=Math.max(this.version,b)};function da(a){this.a=a.desc;this.name=a.name;this.type=a.type;this.usage=a.usage;this.R=a.category}function ea(){this.ja={};this.w=[];this.version=0}
|
|
|
+ea.prototype.update=function(a,b){a.emoji_use&&(this.ja=JSON.parse(a.emoji_use));a.highlight_words?this.w=(a.highlight_words||"").split(",").filter(function(a){return""!==a.trim()}):a.highlights&&(this.w=a.highlights);this.version=Math.max(this.version,b)};function fa(){this.b=null;this.l={};this.m={};this.self=null;this.a={version:0,data:{}};this.i={version:0,data:{}};this.s={};this.D=0}
|
|
|
function ga(a,b,c){var d=d||"";b.team&&(a.b||(a.b=new aa(b.team.id)),a.b.update(b.team,c));if(b.users)for(var e=0,g=b.users.length;e<g;e++){var f=a.m[d+b.users[e].id];f||(f=a.m[d+b.users[e].id]=new ha(b.users[e].id));f.update(b.users[e],c)}if(b.channels)for(e=0,g=b.channels.length;e<g;e++){f=a.l[d+b.channels[e].id];if(!f){var f=a.l,n=d+b.channels[e].id;var h=b.channels[e];h=h.pv?new r(h.id,a.m[h.user]):new u(h.id);f=f[n]=h}f.update(b.channels[e],a,c,d)}b.emojis&&(a.a.data=b.emojis,a.a.version=c);
|
|
|
-if(void 0!==b.commands){a.i.data={};for(e in b.commands)a.i.data[e]=new da(b.commands[e]);a.i.version=c}b.self&&(a.self=a.m[d+b.self.id]||null,b.self.prefs&&(a.self.O||(a.self.O=new ea),a.self.O.update(b.self.prefs,c)));a.D=Math.max(a.D,c)}"undefined"!==typeof module&&(module.H.$a=fa,module.H.ab=aa,module.H.cb=da);function u(a){this.id=a;this.J=!1;this.A=0;this.m={};this.version=0}
|
|
|
-u.prototype.update=function(a,b,c,d){d=d||"";void 0!==a.name&&(this.name=a.name);void 0!==a.is_archived&&(this.Y=a.is_archived);void 0!==a.is_member&&(this.i=a.is_member);void 0!==a.last_read&&(this.A=Math.max(parseFloat(a.last_read),this.A));void 0!==a.last_msg&&(this.I=parseFloat(a.last_msg));void 0!==a.is_private&&(this.b=a.is_private);void 0!==a.is_starred&&(this.J=a.is_starred);if(a.members&&(this.m={},a.members))for(var e=0,g=a.members.length;e<g;e++){var f=b.m[d+a.members[e]];this.m[f.id]=
|
|
|
-f;f.l[this.id]=this}this.version=Math.max(this.version,c)};function r(a,b){u.call(this,a);this.a=b;this.name=this.a.name;this.b=!0;b.na=this}r.prototype=Object.create(u.prototype);r.prototype.constructor=r;"undefined"!==typeof module&&(module.H.jb=u,module.H.ib=r);function y(a,b){this.G=a.user;this.username=a.username;this.id=a.id||a.ts;this.j=parseFloat(a.ts);this.text="";this.o=[];this.i=this.C=this.J=!1;this.B={};this.version=b;this.update(a,b)}function A(a,b){y.call(this,a,b)}function C(a,b){y.call(this,a,b)}
|
|
|
-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.Na=0;this.i=b;c&&ia(this,c,d)}
|
|
|
+if(void 0!==b.commands){a.i.data={};for(e in b.commands)a.i.data[e]=new da(b.commands[e]);a.i.version=c}b.self&&(a.self=a.m[d+b.self.id]||null,b.self.prefs&&(a.self.O||(a.self.O=new ea),a.self.O.update(b.self.prefs,c)));a.D=Math.max(a.D,c)}"undefined"!==typeof module&&(module.H.cb=fa,module.H.eb=aa,module.H.gb=da);function u(a){this.id=a;this.J=!1;this.A=0;this.m={};this.version=0}
|
|
|
+u.prototype.update=function(a,b,c,d){d=d||"";void 0!==a.name&&(this.name=a.name);void 0!==a.is_archived&&(this.Z=a.is_archived);void 0!==a.is_member&&(this.i=a.is_member);void 0!==a.last_read&&(this.A=Math.max(parseFloat(a.last_read),this.A));void 0!==a.last_msg&&(this.I=parseFloat(a.last_msg));void 0!==a.is_private&&(this.b=a.is_private);void 0!==a.is_starred&&(this.J=a.is_starred);if(a.members&&(this.m={},a.members))for(var e=0,g=a.members.length;e<g;e++){var f=b.m[d+a.members[e]];this.m[f.id]=
|
|
|
+f;f.l[this.id]=this}this.version=Math.max(this.version,c)};function r(a,b){u.call(this,a);this.a=b;this.name=this.a.name;this.b=!0;b.oa=this}r.prototype=Object.create(u.prototype);r.prototype.constructor=r;"undefined"!==typeof module&&(module.H.mb=u,module.H.lb=r);function y(a,b){this.G=a.user;this.username=a.username;this.id=a.id||a.ts;this.j=parseFloat(a.ts);this.text="";this.o=[];this.i=this.C=this.J=!1;this.B={};this.version=b;this.update(a,b)}function A(a,b){y.call(this,a,b)}function C(a,b){y.call(this,a,b)}
|
|
|
+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={fb:y,eb:A,hb:C,kb:D});function ha(a){this.id=a;this.l={};this.na=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.Da=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.Ta=a.isBot);this.version=Math.max(this.version,b)};"undefined"!==typeof module&&(module.H.bb=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.gb=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)document.getElementById(d).textContent=L.c[d];ta.forEach(function(a){a()})};K.fr={Za:"Utilisateur inconnu",Ya:"Channel inconnu",Ia:"Nouveau message",message:"Message",Ha:"Reseau",Ja:"(visible seulement par vous)",J:"Favoris",l:"Discutions",La:"Discutions priv\u00e9es",Ma:"Partage sa position GPS",ok:"Ok",Ea:"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é "+K.fr.W(a)+")"};K.en={Za:"Unknown member",Ya:"Unknown channel",Ia:"New message",message:"Message",Ha:"Network",Ja:"(only visible to you)",J:"Starred",l:"Channels",La:"Direct messages",Ma:"Share your GPS location",ok:"Ok",Ea:"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.da="<"===this.a;this.oa="*"===this.a;this.ca="_"===this.a;this.ea="~"===this.a||"-"===this.a;this.i=">"===this.a||">"===this.a;this.X=":"===this.a;this.qa="`"===this.a;this.Ba="```"===this.a;this.ra="\n"===this.a;this.ba=void 0!==d&&-1!==m.w.indexOf(d);this.g=b;this.fa=null;this.b=this.ra||this.ba?c+d.length-1:!1;this.ba&&(this.f=new a(this),this.h.push(this.f),this.f.text=d)}
|
|
|
+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é "+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||">"===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 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,Ga:!1}}var n,h,m={w:[],V:g,aa:g,Z:f};b.prototype.ta=function(){return this.oa&&!!this.b||this.g instanceof b&&this.g.ta()};b.prototype.wa=function(){return this.ca&&!!this.b||this.g instanceof b&&this.g.wa()};b.prototype.xa=function(){return this.ea&&!!this.b||
|
|
|
-this.g instanceof b&&this.g.xa()};b.prototype.la=function(){return this.X&&!!this.b||this.g instanceof b&&this.g.la()};b.prototype.va=function(){return this.ba&&!!this.b||this.g instanceof b&&this.g.va()};b.prototype.ua=function(){return this.qa&&!!this.b||this.g instanceof b&&this.g.ua()};b.prototype.ka=function(){return this.Ba&&!!this.b||this.g instanceof b&&this.g.ka()};b.prototype.ya=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].ya()))return!0;
|
|
|
-return!1};b.prototype.za=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.oa||this.ca||this.ea))return!1;if(this.f&&this.ya())return this.f.Ca();if(this.Oa())return!0}return"\n"===n[a]&&this.i?!0:!1};b.prototype.Oa=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.fa}return!1};b.prototype.Ca=function(){var a=new b(this.g,this.T,this.a);a.fa=this;this.f&&
|
|
|
-this.f instanceof b&&(a.f=this.f.Ca(),a.h=[a.f]);return a};b.prototype.Pa=function(a){return this.X&&(" "===n[a]||"\t"===n[a])||(this.X||this.da||this.oa||this.ca||this.ea||this.qa)&&"\n"===n[a]?!1:!0};b.prototype.Qa=function(b){if(this.qa||this.X||this.Ba||this.da)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.ma();if(void 0===f||f){if(">"===n.substr(b,4))return">";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.ma=function(){if(""!==this.text.trim())return!1};b.prototype.ma=function(){for(var a=this.h.length-1;0<=a;a--){var b=this.h[a].ma();if(void 0!==b)return b}if(this.ra||
|
|
|
-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.za?this.f.za(c):null;if(d){var e=this.f.a.length;this.f.sa(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.Pa(c)){if(d=this.Qa(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.ja(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.sa=function(a){for(var b=this;b;)b.b=a,b=b.fa};b.prototype.ja=function(a){this.b&&this.b>=a&&(this.b=!1);this.h.forEach(function(c){c instanceof b&&c.ja(a)})};a.prototype.innerHTML=function(){if(this.g.la()){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.ka()){if("undefined"!==typeof hljs)try{return a=this.text.match(/^\w+/),hljs.configure({useBR:!0,
|
|
|
-tabReplace:" "}),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.aa(this.text)};a.prototype.outerHTML=function(){var a="span",b=[],c="";if(this.g.ka()){a="pre";b.push("codeblock");var d=this.innerHTML()}else this.g.ua()?(b.push("code"),d=this.innerHTML()):(this.g.da&&(d=m.Z(this.text))?(a=
|
|
|
-"a",c=' href="'+d.link+'"',d.Ga||(c+=' target="_blank"'),d=m.aa(d.text)):d=this.innerHTML(),this.g.ta()&&b.push("bold"),this.g.wa()&&b.push("italic"),this.g.xa()&&b.push("strike"),this.g.la()&&b.push("emoji"),this.g.va()&&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.ra&&(a+="<br/>");this.h.forEach(function(b){a+=b.outerHTML()});this.i&&(a+="</span>");return a};b.prototype.Aa=
|
|
|
-function(a){this.i&&!this.b&&this.sa(a);this.h.forEach(function(c){c instanceof b&&c.Aa(a)})};return function(c,k){k||(k={});m.w=k.w||[];m.V=k.V||g;m.aa=k.aa||g;m.Z=k.Z||f;n=c;h=new b(this,0);k=0;c=n.length;do{for(;k<c;)k+=h.D(k);h.Aa(n.length);if(k=d()){e(k,!1);h.ja(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=[]}
|
|
|
+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(">"===n.substr(b,4))return">";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,
|
|
|
+tabReplace:" "}),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 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.Ea;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.$=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;
|
|
|
-function Ma(){var a=document.createDocumentFragment(),b=ra(function(a){return!a.Y&&!1!==a.i}),c=[],d=[],e=[],g=[];b.sort(function(a,b){return a[0]!==b[0]?a[0]-b[0]:I(a).name.localeCompare(I(b).name)});b.forEach(function(a){a=I(a);if(a instanceof r){var b;if(b=!a.a.Da){var f=document.createElement("li");b=document.createElement("a");f.id="room_"+a.id;b.href="#"+a.id;f.className="slack-context-room slack-ims";b.textContent=a.a.name;f.appendChild(Na());f.appendChild(b);a.a.a||f.classList.add("away");N===
|
|
|
+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;
|
|
|
+function Ma(){var a=document.createDocumentFragment(),b=ra(function(a){return!a.Z&&!1!==a.i}),c=[],d=[],e=[],g=[];b.sort(function(a,b){return a[0]!==b[0]?a[0]-b[0]:I(a).name.localeCompare(I(b).name)});b.forEach(function(a){a=I(a);if(a instanceof r){var b;if(b=!a.a.Ea){var f=document.createElement("li");b=document.createElement("a");f.id="room_"+a.id;b.href="#"+a.id;f.className="slack-context-room slack-ims";b.textContent=a.a.name;f.appendChild(Na());f.appendChild(b);a.a.a||f.classList.add("away");N===
|
|
|
a&&f.classList.add("selected");a.I>a.A&&(f.classList.add("unread"),f.classList.add("unreadHi"));b=f}b&&(a.J?c.push(f):g.push(f))}else f=document.createElement("li"),b=document.createElement("a"),f.id="room_"+a.id,b.href="#"+a.id,a.b?(f.className="slack-context-room slack-group",f.dataset.count=Object.keys(a.m||{}).length):f.className="slack-context-room slack-channel",N===a&&f.classList.add("selected"),b.textContent=a.name,f.appendChild(Na()),f.appendChild(b),a.I>a.A&&(f.classList.add("unread"),0<=
|
|
|
-O.indexOf(a)&&f.classList.add("unreadHi")),f&&(a.J?c.push(f):a.b?e.push(f):d.push(f))});c.length&&a.appendChild(Oa(L.J));c.forEach(function(b){a.appendChild(b)});d.length&&a.appendChild(Oa(L.l));d.forEach(function(b){a.appendChild(b)});e.forEach(function(b){a.appendChild(b)});g.length&&a.appendChild(Oa(L.La));g.forEach(function(b){a.appendChild(b)});document.getElementById("chanList").textContent="";document.getElementById("chanList").appendChild(a);Pa();P();Q&&Qa(Q.b.id,Q.m,function(a){document.getElementById("slackCtx").style.backgroundImage=
|
|
|
-"url("+a+")"})}function Ra(){qa(function(a){var b=a.s,c;for(c in a.self.l)if(!a.self.l[c].Y){var d=document.getElementById("room_"+c);b[c]?d.classList.add("slack-context-typing"):d.classList.remove("slack-context-typing")}for(var e in a.m)(c=a.m[e].na)&&!c.Y&&(d=document.getElementById("room_"+c.id))&&(b[c.id]?d.classList.add("slack-context-typing"):d.classList.remove("slack-context-typing"))});Sa()}
|
|
|
+O.indexOf(a)&&f.classList.add("unreadHi")),f&&(a.J?c.push(f):a.b?e.push(f):d.push(f))});c.length&&a.appendChild(Oa(L.J));c.forEach(function(b){a.appendChild(b)});d.length&&a.appendChild(Oa(L.l));d.forEach(function(b){a.appendChild(b)});e.forEach(function(b){a.appendChild(b)});g.length&&a.appendChild(Oa(L.Ma));g.forEach(function(b){a.appendChild(b)});document.getElementById("chanList").textContent="";document.getElementById("chanList").appendChild(a);Pa();P();Q&&Qa(Q.b.id,Q.m,function(a){document.getElementById("slackCtx").style.backgroundImage=
|
|
|
+"url("+a+")"})}function Ra(){qa(function(a){var b=a.s,c;for(c in a.self.l)if(!a.self.l[c].Z){var d=document.getElementById("room_"+c);b[c]?d.classList.add("slack-context-typing"):d.classList.remove("slack-context-typing")}for(var e in a.m)(c=a.m[e].oa)&&!c.Z&&(d=document.getElementById("room_"+c.id))&&(b[c.id]?d.classList.add("slack-context-typing"):d.classList.remove("slack-context-typing"))});Sa()}
|
|
|
function Sa(){var a;document.getElementById("whoistyping").textContent="";if(Q&&N&&(a=Q.s[N.id])){var b=document.createDocumentFragment(),c=!1,d;for(d in a)(a=J(d))?b.appendChild(Ta(a)):c=!0;c&&(E.b=0);document.getElementById("whoistyping").appendChild(b)}}function Ua(a){a?document.body.classList.remove("no-network"):document.body.classList.add("no-network");P()}
|
|
|
function Va(){var a=N.name||(N.a?N.a.name:void 0);if(!a){var b=[];N.m.forEach(function(a){b.push(a.name)});a=b.join(", ")}document.getElementById("currentRoomTitle").textContent=a;Wa();R();document.getElementById("fileUploadContainer").classList.add("hidden");Xa();T&&(T=null,U());V&&(V=null,U());Sa()}
|
|
|
function U(){if(T){document.body.classList.add("replyingTo");var a=document.getElementById("replyToContainer"),b=document.createElement("a");b.addEventListener("click",function(){T=null;U()});b.className="replyto-close";b.textContent="x";a.textContent="";a.appendChild(b);a.appendChild(T.L())}else document.body.classList.remove("replyingTo"),document.getElementById("replyToContainer").textContent="";R()}
|
|
|
function W(){if(V){document.body.classList.add("replyingTo");var a=document.getElementById("replyToContainer"),b=document.createElement("a");b.addEventListener("click",function(){V=null;W()});b.className="replyto-close";b.textContent="x";a.textContent="";a.appendChild(b);a.appendChild(V.L());document.getElementById("msgInput").value=V.text}else document.body.classList.remove("replyingTo"),document.getElementById("replyToContainer").textContent="";R()}
|
|
|
window.toggleReaction=function(a,b,c){var d=E.a[a],e,g;(d=E.a[a])&&(e=la(d,b))&&(g=H(E.context,a))&&(e.B[c]&&-1!==e.B[c].indexOf(g.self.id)?(d=new XMLHttpRequest,d.open("DELETE","api/reaction?room="+a+"&msg="+b+"&reaction="+encodeURIComponent(c),!0),d.send(null)):Ya(a,b,c))};
|
|
|
function Za(a){a:{var b={};if(Q){var c;for(c=Q;!b[a];){if(c=c.a.data[a])if("alias:"==c.substr(0,6))b[a]=!0,a=c.substr(6);else{a=document.createElement("span");a.className="emoji-custom emoji";a.style.backgroundImage="url('"+c+"')";break a}break}}}"string"===typeof a&&"makeEmoji"in window&&(a=window.makeEmoji(a));return"string"===typeof a?null:a}function $a(a,b){document.getElementById("linkFavicon").href=a||b?"favicon.png?h="+a+"&m="+b:"favicon_ok.png"}
|
|
|
-function P(){var a=O.length,b="";if(X)b="!"+L.Ha+" - ",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.Ia);La=a;setTimeout(function(){b.close()},5E3)}}else"denied"!==Notification.permission&&Notification.requestPermission()}
|
|
|
+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);
|
|
|
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.$(document.body,{Xa:N.id,Va:b.id},function(a){a&&Ya(this.Xa,this.Va,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 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).$():d()}function R(){document.getElementById("msgInput").focus()}
|
|
|
+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"})}
|
|
|
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.Fa(c);g&&b.push(g)}else b=mb.Ra(c);var g=Q?Q.i.data:{};for(n in g){var f=
|
|
|
+!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.$(document.body,Q,function(a){a&&(document.getElementById("msgInput").value+=":"+a+":");R()})})}else a.classList.add("hidden")})();pb()});function qb(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={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");
|
|
|
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,{Sa:e,Ua:h,Na:d}).then(function(a){if(a.Na===b){f.drawImage(a.N,100*a.Sa,100*a.Ua,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=
|
|
|
+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=
|
|
|
"OSM-wrapper";d.className="OSM-canvas";k.className="OSM-controls";t.className="OSM-controls-zoomMin";p.className="OSM-controls-zoomPlus";t.addEventListener("click",function(){l(m-1)});p.addEventListener("click",function(){l(m+1)});k.appendChild(t);k.appendChild(p);e.appendChild(d);e.appendChild(k);return e}};function Na(){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 Oa=function(){var a={};return function(b){var c=a[b];c||(c=a[b]=document.createElement("header"),c.textContent=b);return c}}();
|
|
|
-function rb(a){var b=a.b,c=document.createElement("div"),d=document.createElement("div"),e=document.createElement("ul"),g=document.createElement("li");c.o=document.createElement("ul");c.B=document.createElement("ul");c.j=document.createElement("div");c.pa=document.createElement("div");c.ha=document.createElement("span");c.id=b+"_"+a.id;c.className="slackmsg-item";c.j.className="slackmsg-ts";c.pa.className="slackmsg-msg";c.ha.className="slackmsg-author-name";e.className="slackmsg-hover";g.className=
|
|
|
+function sb(a){var b=a.b,c=document.createElement("div"),d=document.createElement("div"),e=document.createElement("ul"),g=document.createElement("li");c.o=document.createElement("ul");c.B=document.createElement("ul");c.j=document.createElement("div");c.qa=document.createElement("div");c.ia=document.createElement("span");c.id=b+"_"+a.id;c.className="slackmsg-item";c.j.className="slackmsg-ts";c.qa.className="slackmsg-msg";c.ia.className="slackmsg-author-name";e.className="slackmsg-hover";g.className=
|
|
|
"slackmsg-hover-reply";e.appendChild(g);if("makeEmoji"in window){var f=document.createElement("li"),n=window.makeEmoji("arrow_heading_down"),h=window.makeEmoji("smile"),m=window.makeEmoji("pencil2"),b=window.makeEmoji("x");f.className="slackmsg-hover-reaction";h?(f.classList.add("emoji-small"),f.appendChild(h)):f.style.backgroundImage='url("smile.svg")';n?(g.classList.add("emoji-small"),g.appendChild(n)):g.style.backgroundImage='url("repl.svg")';e.appendChild(f);sa(a.G)&&(a=document.createElement("li"),
|
|
|
a.className="slackmsg-hover-edit",m?a.classList.add("emoji-small"):a.style.backgroundImage='url("edit.svg")',a.appendChild(m),e.appendChild(a),a=document.createElement("li"),a.className="slackmsg-hover-remove",b?a.classList.add("emoji-small"):a.style.backgroundImage='url("remove.svg")',a.appendChild(b),e.appendChild(a))}else g.style.backgroundImage='url("repl.svg")',sa(a.G)&&(a=document.createElement("li"),a.className="slackmsg-hover-edit",a.style.backgroundImage='url("edit.svg")',e.appendChild(a),
|
|
|
-a=document.createElement("li"),a.className="slackmsg-hover-remove",a.style.backgroundImage='url("remove.svg")',e.appendChild(a));d.appendChild(c.ha);d.appendChild(c.pa);d.appendChild(c.j);d.appendChild(c.o);c.C=document.createElement("div");c.C.className="slackmsg-edited";d.appendChild(c.C);d.appendChild(c.B);d.className="slackmsg-content";c.o.className="slackmsg-attachments";c.B.className="slackmsg-reactions";c.appendChild(d);c.appendChild(e);return c}
|
|
|
-function sb(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 tb(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=sb(b.color||"");e.className="slackmsg-attachment-block";
|
|
|
+a=document.createElement("li"),a.className="slackmsg-hover-remove",a.style.backgroundImage='url("remove.svg")',e.appendChild(a));d.appendChild(c.ia);d.appendChild(c.qa);d.appendChild(c.j);d.appendChild(c.o);c.C=document.createElement("div");c.C.className="slackmsg-edited";d.appendChild(c.C);d.appendChild(c.B);d.className="slackmsg-content";c.o.className="slackmsg-attachments";c.B.className="slackmsg-reactions";c.appendChild(d);c.appendChild(e);return c}
|
|
|
+function tb(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 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=qb(b.geo))&&l.appendChild(k);t.className="slackmsg-attachment-img";
|
|
|
+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);
|
|
|
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=ub(c,n,t))&&f.appendChild(t);e.appendChild(v);d.appendChild(g);d.appendChild(e);return d}
|
|
|
-function ub(a,b,c){var d=document.createElement("li"),e=sb(c.style);d.textContent=c.text;e!==sb()&&(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}
|
|
|
+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}
|
|
|
function nb(a){var b=document.createElement("lh");b.textContent=a;b.className="slack-command-header";return b}
|
|
|
-function ob(a){var b=document.createElement("li"),c=document.createElement("span"),d=document.createElement("span"),e=document.createElement("span");c.textContent=a.name;d.textContent=a.usage;e.textContent=a.a;b.appendChild(c);b.appendChild(d);b.appendChild(e);b.className="slack-command-item";c.className="slack-command-name";d.className="slack-command-usage";e.className="slack-command-desc";return b};var cb=function(){function a(a,b){for(a=a.target;a!==h&&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(){if(!c())return!1;G&&G(null);return!0}function c(){return h.parentElement?(h.parentElement.removeChild(m),h.parentElement.removeChild(h),!0):!1}function d(a){var b=0;a=void 0===a?t.value:a;if(n()){var c=0,d=window.searchEmojis(a),f=e(d,S.self.O.ia),h;for(l in v)v[l].visible&&(v[l].visible=!1,k.removeChild(v[l].c));
|
|
|
-var l=0;for(h=f.length;l<h;l++){var m=f[l].name,z=v[m];if(!z){var z=v,F=m;var G=m;var m=window.makeEmoji(d[m]),x=document.createElement("span");x.appendChild(m);x.className="emoji-medium";G=g(G,x);z=z[F]=G}z.visible||(z.visible=!0,k.appendChild(z.c));c++}b+=c}l=b;var c=0;for(B in w)w[B].visible&&(w[B].visible=!1,p.removeChild(w[B].c));d=e(S.a.data,S.self.O.ia);var B=0;for(b=d.length;B<b;B++)F=d[B].name,""!==a&&F.substr(0,a.length)!==a||"alias:"===S.a.data[F].substr(0,6)||(f=w[F],f||(f=w,z=h=F,F=S.a.data[F],
|
|
|
-G=document.createElement("span"),m=document.createElement("span"),G.className="emoji emoji-custom",G.style.backgroundImage='url("'+F+'")',m.appendChild(G),m.className="emoji-medium",z=g(z,m),f=f[h]=z),f.visible||(f.visible=!0,p.appendChild(f.c)),c++);return l+c}function e(a,b){var c=[],d;for(d in a){var e={name:d,Ka: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.Ka-b.Ka})}function g(a,
|
|
|
+function ob(a){var b=document.createElement("li"),c=document.createElement("span"),d=document.createElement("span"),e=document.createElement("span");c.textContent=a.name;d.textContent=a.usage;e.textContent=a.a;b.appendChild(c);b.appendChild(d);b.appendChild(e);b.className="slack-command-item";c.className="slack-command-name";d.className="slack-command-usage";e.className="slack-command-desc";return b};var cb=function(){function a(a,b){for(a=a.target;a!==h&&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(){if(!c())return!1;G&&G(null);return!0}function c(){return h.parentElement?(h.parentElement.removeChild(m),h.parentElement.removeChild(h),!0):!1}function d(a){var b=0;a=void 0===a?t.value:a;if(n()){var c=0,d=window.searchEmojis(a),f=e(d,S.self.O.ja),h;for(l in v)v[l].visible&&(v[l].visible=!1,k.removeChild(v[l].c));
|
|
|
+var l=0;for(h=f.length;l<h;l++){var m=f[l].name,z=v[m];if(!z){var z=v,F=m;var G=m;var m=window.makeEmoji(d[m]),x=document.createElement("span");x.appendChild(m);x.className="emoji-medium";G=g(G,x);z=z[F]=G}z.visible||(z.visible=!0,k.appendChild(z.c));c++}b+=c}l=b;var c=0;for(B in w)w[B].visible&&(w[B].visible=!1,p.removeChild(w[B].c));d=e(S.a.data,S.self.O.ja);var B=0;for(b=d.length;B<b;B++)F=d[B].name,""!==a&&F.substr(0,a.length)!==a||"alias:"===S.a.data[F].substr(0,6)||(f=w[F],f||(f=w,z=h=F,F=S.a.data[F],
|
|
|
+G=document.createElement("span"),m=document.createElement("span"),G.className="emoji emoji-custom",G.style.backgroundImage='url("'+F+'")',m.appendChild(G),m.className="emoji-medium",z=g(z,m),f=f[h]=z),f.visible||(f.visible=!0,p.appendChild(f.c)),c++);return l+c}function e(a,b){var c=[],d;for(d in a){var e={name:d,La: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.La-b.La})}function g(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 f(a){var b=document.createElement("img"),c=document.createElement("div");b.src=a;c.appendChild(b);c.className="emojibar-header";return c}function n(){return"searchEmojis"in window}var h=document.createElement("div"),m=document.createElement("div"),l=document.createElement("div"),k=document.createElement("ul"),p=document.createElement("ul"),t=document.createElement("input"),
|
|
|
v={},w={},x=document.createElement("div"),B=document.createElement("span"),z=document.createElement("span"),G,S;m.addEventListener("click",function(a){var c=h.getBoundingClientRect();(a.screenY<c.top||a.screenY>c.bottom||a.screenX<c.left||a.screenX>c.right)&&b()});m.className="emojibar-overlay";h.className="emojibar";l.className="emojibar-emojis";x.className="emojibar-detail";B.className="emojibar-detail-img";z.className="emojibar-detail-name";k.className=p.className="emojibar-list";t.className="emojibar-search";
|
|
|
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,
|
|
|
-$: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 vb(){fa.call(this)}vb.prototype=Object.create(fa.prototype);vb.prototype.constructor=vb;function oa(a){return a.b?a.b.id:null}function wb(){this.b=0;this.context=new ma;this.a={}}
|
|
|
-wb.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 vb,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.Y||(xb(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()};
|
|
|
+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))};
|
|
|
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 xb(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 wb;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===
|
|
|
+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===
|
|
|
c.readyState)if(c.response){var a=new Image;a.onload=function(){var c=document.createElement("canvas");c.height=c.width=v;c=c.getContext("2d");c.drawImage(a,0,0,v,v);var c=c.getImageData(0,0,v,v),d=0,e;for(e=0;e<c.width*c.height*4;e+=4)c.data[e]=c.data[e+1]=c.data[e+2]=(c.data[e]+c.data[e+1]+c.data[e+2])/3,c.data[e+3]=50,d+=c.data[e];if(50>d/(c.height*c.width))for(e=0;e<c.width*c.height*4;e+=4)c.data[e]=c.data[e+1]=c.data[e+2]=255-c.data[e];b(c)};a.onerror=function(){b(null)};a.src=window.URL.createObjectURL(c.response)}else b(null)};
|
|
|
c.open("GET",a,!0);c.send(null)}function e(){var a=h.createLinearGradient(0,0,0,l);a.addColorStop(0,"#4D394B");a.addColorStop(1,"#201820");h.fillStyle=a;h.fillRect(0,0,m,l);return h.getImageData(0,0,m,l)}function g(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 g=b.data[4*(d*b.width+e)]/255,f=4*((d+c)*a.width+e+c);a.data[f]*=g;a.data[f+1]*=g;a.data[f+2]*=g}return a}function f(a,b,c,d){var e=Math.floor(d);a=[a.data[e*m*4+0],a.data[e*m*4+1],a.data[e*m*4+2]];h.fillStyle=
|
|
|
"#"+(1.1*a[0]<<16|1.1*a[1]<<8|1.1*a[2]).toString(16);h.beginPath();h.moveTo(c+k/2,d+p);h.lineTo(c-p+k,d+k/2);h.lineTo(c+k/2,d-p+k);h.lineTo(c+p,d+k/2);h.closePath();h.fill();h.putImageData(g(h.getImageData(c+p,d+p,t,t),b),c+p,d+p)}var n=document.createElement("canvas"),h=n.getContext("2d"),m=n.width=250,l=n.height=290,k=(m-40)/3,p=.1*k,t=Math.floor(k-2*p),v=.5*t,w={},x={},B={};return function(b,d,g){if(w[b])g(w[b]);else if(B[b])x[b]?x[b].push(g):x[b]=[g];else{var f=e(),h=[];B[b]=!0;x[b]?x[b].push(g):
|
|
|
-x[b]=[g];for(var k in d)d[k].Da||d[k].Ta||h.push({src:"api/avatar?user="+d[k].id});c(h,function(c){a(f,c);w[b]=n.toDataURL();x[b].forEach(function(a){a(w[b])})})}}}();var X=0,N=null,Q=null,T=null,V=null;function ib(){var a=new XMLHttpRequest;a.timeout=6E4;a.onreadystatechange=function(){if(4===a.readyState){var b=document.createElement("script");b.innerHTML=a.response;b.language="text/javascript";document.head.innerHTML+='<link href="hljs-androidstudio.css" rel="stylesheet"/>';document.body.appendChild(b)}};a.open("GET","highlight.pack.js",!0);a.send(null)}function yb(){var a=new XMLHttpRequest;a.open("GET","api/hist?room="+N.id,!0);a.send(null)}
|
|
|
-function zb(a){var b=new XMLHttpRequest;b.timeout=6E4;b.onreadystatechange=function(){if(4===b.readyState)if(b.status){var c=null,d=2===Math.floor(b.status/100);if(d){X&&(X=0,Ua(!0));c=b.response;try{c=JSON.parse(c)}catch(e){c=null}}else X?(X+=Math.floor((X||5)/2),X=Math.min(60,X)):(X=5,Ua(!1));a(d,c)}else X&&(X=0,Ua(!0)),zb(a)};b.open("GET","api?v="+E.b,!0);b.send(null)}function lb(){var a=new XMLHttpRequest;a.open("POST","api/typing?room="+N.id,!0);a.send(null)}
|
|
|
-function Ab(a,b){a?(b&&E.update(b),pb()):setTimeout(pb,1E3*X)}function pb(){zb(Ab)}function gb(a){N&&document.getElementById("room_"+N.id).classList.remove("selected");document.getElementById("room_"+a.id).classList.add("selected");document.body.classList.remove("no-room-selected");N=a;Q=H(E.context,a.id);Va();Qa(Q.b.id,Q.m,function(a){document.getElementById("slackCtx").style.backgroundImage="url("+a+")"});N.I&&!E.a[N.id]&&yb()}
|
|
|
+x[b]=[g];for(var k in d)d[k].Ea||d[k].Ua||h.push({src:"api/avatar?user="+d[k].id});c(h,function(c){a(f,c);w[b]=n.toDataURL();x[b].forEach(function(a){a(w[b])})})}}}();var X=0,N=null,Q=null,T=null,V=null;function ib(){var a=new XMLHttpRequest;a.timeout=6E4;a.onreadystatechange=function(){if(4===a.readyState){var b=document.createElement("script");b.innerHTML=a.response;b.language="text/javascript";document.head.innerHTML+='<link href="hljs-androidstudio.css" rel="stylesheet"/>';document.body.appendChild(b)}};a.open("GET","highlight.pack.js",!0);a.send(null)}function Bb(){var a=new XMLHttpRequest;a.open("GET","api/hist?room="+N.id,!0);a.send(null)}
|
|
|
+function Cb(a){var b=new XMLHttpRequest;b.timeout=6E4;b.onreadystatechange=function(){if(4===b.readyState)if(b.status){var c=null,d=2===Math.floor(b.status/100);if(d){X&&(X=0,Ua(!0));c=b.response;try{c=JSON.parse(c)}catch(e){c=null}}else X?(X+=Math.floor((X||5)/2),X=Math.min(60,X)):(X=5,Ua(!1));a(d,c)}else X&&(X=0,Ua(!0)),Cb(a)};b.open("GET","api?v="+E.b,!0);b.send(null)}function lb(){var a=new XMLHttpRequest;a.open("POST","api/typing?room="+N.id,!0);a.send(null)}
|
|
|
+function Db(a,b){a?(b&&E.update(b),pb()):setTimeout(pb,1E3*X)}function pb(){Cb(Db)}function gb(a){N&&document.getElementById("room_"+N.id).classList.remove("selected");document.getElementById("room_"+a.id).classList.add("selected");document.body.classList.remove("no-room-selected");N=a;Q=H(E.context,a.id);Va();Qa(Q.b.id,Q.m,function(a){document.getElementById("slackCtx").style.backgroundImage="url("+a+")"});N.I&&!E.a[N.id]&&Bb()}
|
|
|
function jb(a,b,c){var d=N;new FileReader;var e=new FormData,g=new XMLHttpRequest;e.append("file",b);e.append("filename",a);g.onreadystatechange=function(){4===g.readyState&&(204===g.status?c(null):c(g.statusText))};g.open("POST","api/file?room="+d.id);g.send(e)}
|
|
|
-function Bb(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.Fa(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}Bb(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 Cb(this.id,a,b):!0===a.isNotice?new Db(this.id,a,b):new Eb(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},Z: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.na.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,Ga: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.ga().K();return a.c},K:function(b){var c=J(b.G);b.c.j.innerHTML=L.W(b.j);b.c.pa.innerHTML=a(b,b.text);b.c.ha.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=tb(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=
|
|
|
+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(),
|
|
|
+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 Cb(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}Cb.prototype=Object.create(A.prototype);q=Cb.prototype;q.constructor=Cb;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.ga=function(){this.c=rb(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 Eb(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}Eb.prototype=Object.create(y.prototype);q=Eb.prototype;q.constructor=Eb;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.ga=function(){this.c=rb(this);return this};q.L=function(){return Z.L(this)};q.K=function(){Z.K(this);return this};
|
|
|
+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\.]+)(&|&)mlon=(-?[0-9\.]+)(&|&)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 Db(a,b,c){y.call(this,b,c);this.context=H(E.context,a);this.b=a;this.a=null;this.P=!0}Db.prototype=Object.create(C.prototype);q=Db.prototype;q.constructor=Db;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.ga=function(){this.c=rb(this);this.a=document.createElement("span");this.c.classList.add("slackmsg-notice");this.a.className="slackmsg-notice";this.a.textContent=L.Ja;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 mb=function(){var a=[];return{Fa:function(b){for(var c=0,d=a.length;c<d;c++)if(-1!==a[c].names.indexOf(b))return a[c];return null},Ra: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},Wa:function(b){b.R="client";b.exec=b.exec.bind(b);a.push(b)}}}();function Fb(){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.Wa({name:"/sherlock",names:["/sherlock","/sharelock"],usage:"",description:L.Ma,exec:function(a,b){Fb().then(function(a){var c=a.coords.latitude,e=a.coords.longitude;Bb(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 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")})}
|
|
|
+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)})}})});
|
|
|
})();
|