-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path870.a95566a4a33ba393.js
1 lines (1 loc) · 48.2 KB
/
870.a95566a4a33ba393.js
1
"use strict";(self.webpackChunkWebConsoleClient=self.webpackChunkWebConsoleClient||[]).push([[870],{8870:(ge,T,p)=>{p.r(T),p.d(T,{ContentModule:()=>ue});var f=p(4375),b=p(9576),v=p(3466),I=p(8188),d=p(3897),e=p(5e3),w=p(8686),m=p(7040),_=p(9808),A=p(9444),i=p(3075),S=p(7232),E=p(2313);let k=(()=>{class n{constructor(t){this.sanitizer=t}transform(t){return this.sanitizer.bypassSecurityTrustHtml(t)}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(E.H7,16))},n.\u0275pipe=e.Yjl({name:"sanitize",type:n,pure:!0}),n})();const N=["consoleDiv"],q=["setPasswordModal"],U=["commandInput"];function F(n,a){if(1&n&&e._UZ(0,"fa-icon",30),2&n){const t=e.oxw(2);e.Q6J("icon",t.icons.faEye)}}function L(n,a){if(1&n&&e._UZ(0,"fa-icon",30),2&n){const t=e.oxw(2);e.Q6J("icon",t.icons.faEyeSlash)}}function D(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"button",28),e.NdJ("click",function(){e.CHM(t);const r=e.oxw();return r.showServerInfo=!r.showServerInfo}),e.YNc(1,F,1,1,"fa-icon",29),e.YNc(2,L,1,1,"fa-icon",29),e._uU(3),e.ALo(4,"translate"),e.qZA()}if(2&n){const t=e.oxw();e.xp6(1),e.Q6J("ngIf",!t.showServerInfo),e.xp6(1),e.Q6J("ngIf",t.showServerInfo),e.xp6(1),e.hij(" ",e.lcZ(4,3,"CONSOLE.ToggleServerInfo")," ")}}function O(n,a){1&n&&(e.TgZ(0,"span",31),e._uU(1),e.ALo(2,"translate"),e.qZA()),2&n&&(e.xp6(1),e.Oqu(e.lcZ(2,1,"CONSOLE.Connected")))}function M(n,a){1&n&&(e.TgZ(0,"span",32),e._uU(1),e.ALo(2,"translate"),e.qZA()),2&n&&(e.xp6(1),e.Oqu(e.lcZ(2,1,"CONSOLE.Disconnected")))}function J(n,a){if(1&n&&(e.TgZ(0,"span",33),e._uU(1),e.ALo(2,"translate"),e.qZA()),2&n){const t=e.oxw();e.xp6(1),e.lnq("",e.lcZ(2,3,"CONSOLE.LoggedInAs")," ",t.loggedInUsername," (",t.loggedInAs,")")}}function P(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"div",0)(1,"div",34)(2,"button",35),e.NdJ("click",function(){return e.CHM(t),e.oxw().requestPassword()}),e._UZ(3,"fa-icon",30),e._uU(4),e.ALo(5,"translate"),e.qZA()()()}if(2&n){const t=e.oxw();e.xp6(3),e.Q6J("icon",t.icons.faLock),e.xp6(1),e.hij(" ",e.lcZ(5,2,"CONSOLE.ClickToLogin")," ")}}function R(n,a){1&n&&(e.TgZ(0,"div",36)(1,"div",37)(2,"span",38),e._uU(3),e.ALo(4,"translate"),e.qZA()(),e.TgZ(5,"p"),e._uU(6),e.ALo(7,"translate"),e.qZA()()),2&n&&(e.xp6(3),e.Oqu(e.lcZ(4,2,"GENERAL.Loading")),e.xp6(3),e.Oqu(e.lcZ(7,4,"CONSOLE.Connecting")))}function G(n,a){if(1&n&&(e.TgZ(0,"div",36),e._UZ(1,"fa-icon",39),e.TgZ(2,"p",40),e._uU(3),e.ALo(4,"translate"),e.qZA(),e.TgZ(5,"p",40),e._uU(6),e.ALo(7,"translate"),e.TgZ(8,"a",41),e._uU(9),e.ALo(10,"translate"),e.qZA(),e._uU(11),e.ALo(12,"translate"),e.qZA()()),2&n){const t=e.oxw();e.xp6(1),e.Q6J("icon",t.icons.faXmark),e.xp6(2),e.Oqu(e.lcZ(4,5,"CONSOLE.CannotConnect")),e.xp6(3),e.hij("",e.lcZ(7,7,"CONSOLE.CannotConnectDescription1")," "),e.xp6(3),e.Oqu(e.lcZ(10,9,"CONSOLE.Tool")),e.xp6(2),e.hij(" ",e.lcZ(12,11,"CONSOLE.CannotConnectDescription2")," ")}}function Q(n,a){1&n&&(e.TgZ(0,"small",56),e._uU(1),e.ALo(2,"translate"),e.qZA()),2&n&&(e.xp6(1),e.Oqu(e.lcZ(2,1,"CONSOLE.WrongPassword")))}function H(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"div",42)(1,"h4",43),e._uU(2),e.ALo(3,"translate"),e.qZA(),e.TgZ(4,"button",44),e.NdJ("click",function(){return e.CHM(t).$implicit.dismiss("Cross click")}),e.qZA()(),e.TgZ(5,"div",45)(6,"form",46)(7,"div",34)(8,"input",47,48),e.NdJ("keyup.enter",function(){const s=e.CHM(t).$implicit,l=e.MAs(9),c=e.MAs(14);return e.oxw().setPassword(l.value,c.checked),s.close()}),e.qZA(),e.YNc(10,Q,3,3,"small",49),e.qZA(),e.TgZ(11,"div",34)(12,"div",50),e._UZ(13,"input",51,52),e.TgZ(15,"label",53),e._uU(16),e.ALo(17,"translate"),e.qZA()()()()(),e.TgZ(18,"div",54)(19,"button",55),e.NdJ("click",function(){const s=e.CHM(t).$implicit,l=e.MAs(9),c=e.MAs(14);return e.oxw().setPassword(l.value,c.checked),s.close()}),e._uU(20),e.ALo(21,"translate"),e.qZA()()}if(2&n){const t=e.oxw();e.xp6(2),e.Oqu(e.lcZ(3,4,"CONSOLE.PasswordRequested")),e.xp6(8),e.Q6J("ngIf",t.savedPasswordSent),e.xp6(6),e.hij(" ",e.lcZ(17,6,"CONSOLE.RememberPassword")," "),e.xp6(4),e.Oqu(e.lcZ(21,8,"CONSOLE.Connect"))}}let V=(()=>{class n{constructor(t,o,r,s,l){this.route=t,this.router=o,this.storageService=r,this.webConsoleService=s,this.modalService=l,this.icons=b.P,this.consoleHtml="",this.connectedPlayers=0,this.maxPlayers=0,this.cpuUsage=0,this.ramFree=0,this.ramUsed=0,this.ramMax=0,this.tps=0,this.keepScrollDown=!0,this.showServerInfo=!0,this.showConsole=!1,this.loggedInUsername="",this.loggedInAs="",this.savedPasswordSent=!1,this.browsingCommandHistoryIndex=-1}ngOnInit(){console.log("Init console component");const o=this.route.snapshot.paramMap.get("serverName");if(!o)throw this.router.navigate([""]),Error("Server name not provided");const r=this.storageService.getServer(o);if(!r)throw this.router.navigate([""]),Error("Server name invalid");this.server=r,this.activeConnection=this.webConsoleService.connect(this.server.serverName),this.showConsole=this.activeConnection.connectionStatus==I.O.Connected,this.activeConnection.receivedMessages.forEach(s=>this.processMessage(s)),this.insightsInverval||(this.insightsInverval=setInterval(()=>{this.requestServerInsights()},2500)),this.subscription=this.activeConnection.subject$.subscribe({next:s=>{this.showConsole=!0,this.processMessage(s)},complete:()=>{this.showServerInfo=!1}})}ngAfterViewInit(){setTimeout(()=>{var t;return this.consoleDiv.nativeElement.scrollTop=null===(t=this.consoleDiv)||void 0===t?void 0:t.nativeElement.scrollHeight})}ngOnDestroy(){clearInterval(this.insightsInverval),this.subscription.unsubscribe()}processMessage(t){let o;switch(t.status){case 10:o=t,this.writeToWebConsole(o.message,o.time);break;case 200:o=t,this.loggedInUsername=o.username,this.loggedInAs=o.as;break;case 400:o=t,console.log("400 Unknown Comamnd",o);break;case 401:o=t,this.activeConnection.isLoggedIn||(this.server.serverPassword&&!this.savedPasswordSent?(this.savedPasswordSent=!0,this.webConsoleService.sendMessage(this.server.serverName,v.X.Login,this.server.serverPassword)):this.requestPassword());break;case 1e3:o=t,this.connectedPlayers=o.connectedPlayers,this.maxPlayers=o.maxPlayers;break;case 1001:o=t,this.cpuUsage=o.usage;break;case 1002:o=t,this.ramFree=o.free,this.ramUsed=o.used,this.ramMax=o.max;break;case 1003:o=t,this.tps=o.tps;break;default:console.error("Unrecognised response:",t)}}writeToWebConsole(t,o){var r,s,l;this.keepScrollDown=(null===(r=this.consoleDiv)||void 0===r?void 0:r.nativeElement.scrollHeight)-(null===(s=this.consoleDiv)||void 0===s?void 0:s.nativeElement.scrollTop)===(null===(l=this.consoleDiv)||void 0===l?void 0:l.nativeElement.clientHeight),t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=t.replace(/</g,"<")).replace(/(?:\r\n|\r|\n)/g,"<br>")).replace(/\[0;30;22m/g,"<span style='color: #000000;'>")).replace(/\[0;34;22m/g,"<span style='color: #0000AA;'>")).replace(/\[0;32;22m/g,"<span style='color: #00AA00;'>")).replace(/\[0;36;22m/g,"<span style='color: #00AAAA;'>")).replace(/\[0;31;22m/g,"<span style='color: #AA0000;'>")).replace(/\[0;35;22m/g,"<span style='color: #AA00AA;'>")).replace(/\[0;33;22m/g,"<span style='color: #FFAA00;'>")).replace(/\[0;37;22m/g,"<span style='color: #AAAAAA;'>")).replace(/\[0;30;1m/g,"<span style='color: #555555;'>")).replace(/\[0;34;1m/g,"<span style='color: #5555FF;'>")).replace(/\[0;32;1m/g,"<span style='color: #55FF55;'>")).replace(/\[0;36;1m/g,"<span style='color: #55FFFF;'>")).replace(/\[0;31;1m/g,"<span style='color: #FF5555;'>")).replace(/\[0;35;1m/g,"<span style='color: #FF55FF;'>")).replace(/\[0;33;1m/g,"<span style='color: #FFFF55;'>")).replace(/\[0;37;1m/g,"<span style='color: #FFFFFF;'>")).replace(/\[m/g,"</span>")).replace(/\xa70/g,"<span style='color: #000000;'>")).replace(/\xa71/g,"<span style='color: #0000AA;'>")).replace(/\xa72/g,"<span style='color: #00AA00;'>")).replace(/\xa73/g,"<span style='color: #00AAAA;'>")).replace(/\xa74/g,"<span style='color: #AA0000;'>")).replace(/\xa75/g,"<span style='color: #AA00AA;'>")).replace(/\xa76/g,"<span style='color: #FFAA00;'>")).replace(/\xa77/g,"<span style='color: #AAAAAA;'>")).replace(/\xa78/g,"<span style='color: #555555;'>")).replace(/\xa79/g,"<span style='color: #5555FF;'>")).replace(/\xa7a/g,"<span style='color: #55FF55;'>")).replace(/\xa7b/g,"<span style='color: #55FFFF;'>")).replace(/\xa7c/g,"<span style='color: #FF5555;'>")).replace(/\xa7d/g,"<span style='color: #FF55FF;'>")).replace(/\xa7e/g,"<span style='color: #FFFF55;'>")).replace(/\xa7f/g,"<span style='color: #FFFFFF;'>")).replace(/\xa7l/g,"<span style='font-weight:bold;'>")).replace(/\xa7m/g,"<span style='text-decoration: line-through;'>")).replace(/\xa7n/g,"<span style='text-decoration: underline;'>")).replace(/\xa7o/g,"<span style='font-style: italic;'>")).replace(/\xa7r/g,"</span>")).replace(/\x7f0/g,"<span style='color: #000000;'>")).replace(/\x7f1/g,"<span style='color: #0000AA;'>")).replace(/\x7f2/g,"<span style='color: #00AA00;'>")).replace(/\x7f3/g,"<span style='color: #00AAAA;'>")).replace(/\x7f4/g,"<span style='color: #AA0000;'>")).replace(/\x7f5/g,"<span style='color: #AA00AA;'>")).replace(/\x7f6/g,"<span style='color: #FFAA00;'>")).replace(/\x7f7/g,"<span style='color: #AAAAAA;'>")).replace(/\x7f8/g,"<span style='color: #555555;'>")).replace(/\x7f9/g,"<span style='color: #5555FF;'>")).replace(/\x7fa/g,"<span style='color: #55FF55;'>")).replace(/\x7fb/g,"<span style='color: #55FFFF;'>")).replace(/\x7fc/g,"<span style='color: #FF5555;'>")).replace(/\x7fd/g,"<span style='color: #FF55FF;'>")).replace(/\x7fe/g,"<span style='color: #FFFF55;'>")).replace(/\x7ff/g,"<span style='color: #FFFFFF;'>")).replace(/\x7fl/g,"<span style='font-weight:bold;'>")).replace(/\x7fm/g,"<span style='text-decoration: line-through;'>")).replace(/\x7fn/g,"<span style='text-decoration: underline;'>")).replace(/\x7fo/g,"<span style='font-style: italic;'>")).replace(/\x7fr/g,"</span>"),this.storageService.getSetting(d.U.DateTimePrefix)&&(null!=o?t="["+o+"] "+t:void 0!==o&&null===o||(t="["+(new Date).toLocaleTimeString()+"] "+t));const c=(t.match(/<span /g)||[]).length,u=(t.match(/<\/span> /g)||[]).length;this.consoleHtml+=t+"</span>".repeat(c-u)+"<br>"}requestPassword(){this.modalService.open(this.passwordModal,{size:"md"})}setPassword(t,o){o&&this.storageService.saveServer(this.server.serverName,this.server.serverURI,t),setTimeout(()=>this.savedPasswordSent=!0,200),this.webConsoleService.sendMessage(this.server.serverName,v.X.Login,t)}sendCommand(){const t=this.commandInput.nativeElement.value;!t||(this.commandInput.nativeElement.value="",this.browsingCommandHistoryIndex=-1,this.webConsoleService.sendMessage(this.server.serverName,v.X.Exec,t))}onKeyUpCommandInput(t){var o,r;if("Enter"===t.code)this.sendCommand();else if("ArrowUp"===t.code){const s=this.activeConnection.sentCommands.filter(l=>l.command===v.X.Exec);if(0==s.length)return;this.browsingCommandHistoryIndex<=0&&(this.browsingCommandHistoryIndex=s.length),this.commandInput.nativeElement.value=null===(o=s[this.browsingCommandHistoryIndex-1])||void 0===o?void 0:o.params,this.browsingCommandHistoryIndex=this.browsingCommandHistoryIndex-1}else if("ArrowDown"===t.code){const s=this.activeConnection.sentCommands.filter(l=>l.command===v.X.Exec);-1!==this.browsingCommandHistoryIndex&&(this.browsingCommandHistoryIndex>=s.length-1&&(this.browsingCommandHistoryIndex=-1),this.commandInput.nativeElement.value=null===(r=s[this.browsingCommandHistoryIndex+1])||void 0===r?void 0:r.params,this.browsingCommandHistoryIndex=this.browsingCommandHistoryIndex+1)}}requestServerInsights(){this.showServerInfo&&this.showConsole&&this.activeConnection.connectionStatus==I.O.Connected&&this.activeConnection.isLoggedIn&&(this.webConsoleService.sendMessage(this.server.serverName,v.X.Players),this.webConsoleService.sendMessage(this.server.serverName,v.X.CpuUsage),this.webConsoleService.sendMessage(this.server.serverName,v.X.RamUsage),this.webConsoleService.sendMessage(this.server.serverName,v.X.Tps))}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(f.gz),e.Y36(f.F0),e.Y36(d.V),e.Y36(w.B),e.Y36(m.FF))},n.\u0275cmp=e.Xpm({type:n,selectors:[["app-console"]],viewQuery:function(t,o){if(1&t&&(e.Gf(N,5),e.Gf(q,5),e.Gf(U,5)),2&t){let r;e.iGM(r=e.CRH())&&(o.consoleDiv=r.first),e.iGM(r=e.CRH())&&(o.passwordModal=r.first),e.iGM(r=e.CRH())&&(o.commandInput=r.first)}},decls:68,vars:52,consts:[[1,"row"],[1,"col"],[1,"col-md-auto","d-flex","align-self-center"],["type","button","class","btn btn-outline-primary",3,"click",4,"ngIf"],["class","badge bg-success me-1",4,"ngIf"],["class","badge bg-danger mb-3",4,"ngIf"],["class","badge bg-secondary mb-3",4,"ngIf"],[3,"ngbCollapse","ngbCollapseChange"],["collapseGlobal","ngbCollapse"],[1,"row",3,"ngbCollapse","ngbCollapseChange"],["collapse","ngbCollapse"],[1,"col-lg-3"],[1,"card","mb-3"],[1,"card-body"],[1,"card-title"],[1,"card-text"],["type","secondary",3,"value","striped","animated"],[3,"type","value","striped","animated"],["class","row",4,"ngIf"],[1,"card","mt-3","mb-3"],[1,"card-body","overflow-auto","text-light","bg-dark","console",3,"innerHTML","scrollTop"],["consoleDiv",""],[1,"input-group","mb-3"],["type","text","aria-label","Command","aria-describedby","button-command",1,"form-control",3,"disabled","keyup"],["commandInput",""],["type","button","id","button-command",1,"btn","btn-secondary",3,"disabled","click"],["class","d-flex flex-column min-vh-100 align-items-center",4,"ngIf"],["setPasswordModal",""],["type","button",1,"btn","btn-outline-primary",3,"click"],[3,"icon",4,"ngIf"],[3,"icon"],[1,"badge","bg-success","me-1"],[1,"badge","bg-danger","mb-3"],[1,"badge","bg-secondary","mb-3"],[1,"col-12"],["type","button",1,"btn","btn-warning","w-100",3,"click"],[1,"d-flex","flex-column","min-vh-100","align-items-center"],["role","status",1,"spinner-border"],[1,"visually-hidden"],["size","3x",3,"icon"],[1,"mb-0"],["href","https://www.yougetsignal.com/tools/open-ports/","target","_blank"],[1,"modal-header"],["id","modal-basic-title",1,"modal-title"],["type","button","aria-label","Close",1,"btn-close",3,"click"],[1,"modal-body"],[1,"row","g-3"],["type","password",1,"form-control",3,"keyup.enter"],["passwordInput",""],["class","form-text text-danger",4,"ngIf"],[1,"form-check"],["type","checkbox","id","rememberCheck",1,"form-check-input"],["rememberInput",""],["for","rememberCheck",1,"form-check-label"],[1,"modal-footer"],["type","button",1,"btn","btn-primary",3,"click"],[1,"form-text","text-danger"]],template:function(t,o){if(1&t&&(e.TgZ(0,"div",0)(1,"div",1)(2,"h1"),e._uU(3),e.qZA()(),e.TgZ(4,"div",2),e.YNc(5,D,5,5,"button",3),e.qZA()(),e.YNc(6,O,3,3,"span",4),e.YNc(7,M,3,3,"span",5),e.YNc(8,J,3,5,"span",6),e.TgZ(9,"div",7,8),e.NdJ("ngbCollapseChange",function(s){return!(o.showConsole=s)}),e.TgZ(11,"div",9,10),e.NdJ("ngbCollapseChange",function(s){return!(o.showServerInfo=s)}),e.TgZ(13,"div",11)(14,"div",12)(15,"div",13)(16,"h5",14),e._uU(17),e.ALo(18,"translate"),e.qZA(),e.TgZ(19,"p",15),e._uU(20),e.qZA(),e.TgZ(21,"p",15),e._UZ(22,"ngb-progressbar",16),e.qZA()()()(),e.TgZ(23,"div",11)(24,"div",12)(25,"div",13)(26,"h5",14),e._uU(27),e.ALo(28,"translate"),e.qZA(),e.TgZ(29,"p",15),e._uU(30),e.qZA(),e.TgZ(31,"p",15),e._UZ(32,"ngb-progressbar",17),e.qZA()()()(),e.TgZ(33,"div",11)(34,"div",12)(35,"div",13)(36,"h5",14),e._uU(37),e.ALo(38,"translate"),e.qZA(),e.TgZ(39,"p",15),e._uU(40),e.qZA(),e.TgZ(41,"p",15),e._UZ(42,"ngb-progressbar",17),e.qZA()()()(),e.TgZ(43,"div",11)(44,"div",12)(45,"div",13)(46,"h5",14),e._uU(47),e.ALo(48,"translate"),e.qZA(),e.TgZ(49,"p",15),e._uU(50),e.qZA(),e.TgZ(51,"p",15),e._UZ(52,"ngb-progressbar",17),e.qZA()()()()(),e.YNc(53,P,6,4,"div",18),e.TgZ(54,"div",19),e._UZ(55,"div",20,21),e.ALo(57,"sanitize"),e.qZA(),e.TgZ(58,"div",22)(59,"input",23,24),e.NdJ("keyup",function(s){return o.onKeyUpCommandInput(s)}),e.qZA(),e.TgZ(61,"button",25),e.NdJ("click",function(){return o.sendCommand()}),e._uU(62),e.ALo(63,"translate"),e.qZA()()(),e.YNc(64,R,8,6,"div",26),e.YNc(65,G,13,13,"div",26),e.YNc(66,H,22,10,"ng-template",null,27,e.W1O)),2&t){const r=e.MAs(56);e.xp6(3),e.Oqu(o.server.serverName),e.xp6(2),e.Q6J("ngIf",o.showConsole),e.xp6(1),e.Q6J("ngIf",2==o.activeConnection.connectionStatus),e.xp6(1),e.Q6J("ngIf",3==o.activeConnection.connectionStatus&&o.showConsole),e.xp6(1),e.Q6J("ngIf",2==o.activeConnection.connectionStatus&&o.loggedInUsername),e.xp6(1),e.Q6J("ngbCollapse",!o.showConsole),e.xp6(2),e.Q6J("ngbCollapse",!o.showServerInfo),e.xp6(6),e.Oqu(e.lcZ(18,40,"CONSOLE.PlayersOnline")),e.xp6(3),e.AsE("",o.connectedPlayers," / ",o.maxPlayers,""),e.xp6(2),e.Q6J("value",100*o.connectedPlayers/o.maxPlayers)("striped",!0)("animated",!0),e.xp6(5),e.Oqu(e.lcZ(28,42,"CONSOLE.CpuUsage")),e.xp6(3),e.hij("",o.cpuUsage,"%"),e.xp6(2),e.Q6J("type",o.cpuUsage>80?"danger":"secondary")("value",o.cpuUsage)("striped",!0)("animated",!0),e.xp6(5),e.Oqu(e.lcZ(38,44,"CONSOLE.RamUsage")),e.xp6(3),e.AsE("",o.ramUsed," MB / ",o.ramMax," MB"),e.xp6(2),e.Q6J("type",100*o.ramUsed/o.ramMax>80?"danger":"secondary")("value",100*o.ramUsed/o.ramMax)("striped",!0)("animated",!0),e.xp6(5),e.Oqu(e.lcZ(48,46,"CONSOLE.Tps")),e.xp6(3),e.hij("",o.tps," / 20"),e.xp6(2),e.Q6J("type",100*o.tps/20>80?"success":"secondary")("value",100*o.tps/20)("striped",!0)("animated",!0),e.xp6(1),e.Q6J("ngIf",!o.activeConnection.isLoggedIn),e.xp6(2),e.Q6J("innerHTML",e.lcZ(57,48,o.consoleHtml),e.oJD)("scrollTop",o.keepScrollDown?r.scrollHeight:r.scrollTop),e.xp6(4),e.Q6J("disabled",2!=o.activeConnection.connectionStatus),e.xp6(2),e.Q6J("disabled",2!=o.activeConnection.connectionStatus),e.xp6(1),e.Oqu(e.lcZ(63,50,"CONSOLE.Send")),e.xp6(2),e.Q6J("ngIf",1==o.activeConnection.connectionStatus),e.xp6(1),e.Q6J("ngIf",3==o.activeConnection.connectionStatus&&!o.showConsole)}},directives:[_.O5,A.BN,m._D,m.Ly,i._Y,i.JL,i.F],pipes:[S.X$,k],styles:[".console[_ngcontent-%COMP%]{height:480px}"]}),n})();function Y(n,a){1&n&&(e.TgZ(0,"h1"),e._uU(1),e.ALo(2,"translate"),e.qZA()),2&n&&(e.xp6(1),e.Oqu(e.lcZ(2,1,"ADDEDITSERVER.AddNewServer")))}function j(n,a){1&n&&(e.TgZ(0,"div",20),e._uU(1),e.ALo(2,"translate"),e.qZA()),2&n&&(e.xp6(1),e.hij(" ",e.lcZ(2,1,"ADDEDITSERVER.ServerAlreadyExist")," "))}function $(n,a){1&n&&(e.TgZ(0,"p",21),e._uU(1),e.ALo(2,"translate"),e.qZA()),2&n&&(e.xp6(1),e.Oqu(e.lcZ(2,1,"ADDEDITSERVER.SslEnabledMandatory")))}function B(n,a){1&n&&(e.TgZ(0,"div",2)(1,"button",22),e._uU(2),e.ALo(3,"translate"),e.qZA()()),2&n&&(e.xp6(2),e.Oqu(e.lcZ(3,1,"ADDEDITSERVER.Add")))}let W=(()=>{class n{constructor(t){this.storageService=t,this.asModal=!1,this.isClientOverHttps="https:"==location.protocol,this.addServerFormGroup=new i.cw({serverNameControl:new i.NI("",[i.kI.required,i.kI.maxLength(50)]),serverIpControl:new i.NI("",[i.kI.required]),serverPortControl:new i.NI(8080,[i.kI.required,i.kI.min(0),i.kI.max(99999)]),serverPasswordControl:new i.NI(""),serverSslEnabledControl:new i.NI({value:"https:"==location.protocol,disabled:"https:"==location.protocol})}),this.serverAlreadyExists=!1}ngOnInit(){}saveServer(t){var o,r,s,l,c;if(!this.addServerFormGroup.valid)return void this.addServerFormGroup.markAllAsTouched();const u=null===(o=this.addServerFormGroup.get("serverNameControl"))||void 0===o?void 0:o.value.replace(/</g,"<").replace(/>/g,">").replace(/'/g,"").replace(/"/g,""),g=null===(r=this.addServerFormGroup.get("serverIpControl"))||void 0===r?void 0:r.value,C=null===(s=this.addServerFormGroup.get("serverPortControl"))||void 0===s?void 0:s.value,Z=(null===(l=this.addServerFormGroup.get("serverPasswordControl"))||void 0===l?void 0:l.value)||void 0,x=null===(c=this.addServerFormGroup.get("serverSslEnabledControl"))||void 0===c?void 0:c.value;if(this.serverAlreadyExists=null!=this.storageService.getAllServers().find(ve=>ve.serverName==u),this.serverAlreadyExists)return;let h;h=x?"wss://"+g+":"+C:"ws://"+g+":"+C,this.storageService.saveServer(u,h,Z),this.asModal&&(null==t||t.close("Save server"))}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(d.V))},n.\u0275cmp=e.Xpm({type:n,selectors:[["app-add-server"]],inputs:{asModal:"asModal"},decls:43,vars:46,consts:[[4,"ngIf"],[1,"row","g-3",3,"formGroup","ngSubmit"],[1,"col-12"],["for","inputName",1,"form-label"],["type","text","id","inputName","formControlName","serverNameControl",1,"form-control",3,"placeholder"],[1,"invalid-feedback"],["class","text-danger",4,"ngIf"],[1,"col-lg-10"],["for","inputIp",1,"form-label"],["type","text","id","inputIp","formControlName","serverIpControl",1,"form-control",3,"placeholder"],[1,"col-lg-2"],["for","inputPort",1,"form-label"],["type","number","id","inputPort","formControlName","serverPortControl",1,"form-control"],["for","inputPassword",1,"form-label"],["type","password","id","inputPassword","formControlName","serverPasswordControl",1,"form-control",3,"placeholder"],[1,"form-check"],["type","checkbox","id","sslCheck","formControlName","serverSslEnabledControl",1,"form-check-input"],["for","sslCheck",1,"form-check-label"],["class","text-warning",4,"ngIf"],["class","col-12",4,"ngIf"],[1,"text-danger"],[1,"text-warning"],["type","submit",1,"btn","btn-primary"]],template:function(t,o){if(1&t&&(e.YNc(0,Y,3,3,"h1",0),e.TgZ(1,"form",1),e.NdJ("ngSubmit",function(){return o.saveServer()}),e.TgZ(2,"div",2)(3,"label",3),e._uU(4),e.ALo(5,"translate"),e.qZA(),e._UZ(6,"input",4),e.ALo(7,"translate"),e.TgZ(8,"div",5),e._uU(9),e.ALo(10,"translate"),e.qZA(),e.YNc(11,j,3,3,"div",6),e.qZA(),e.TgZ(12,"div",7)(13,"label",8),e._uU(14),e.ALo(15,"translate"),e.qZA(),e._UZ(16,"input",9),e.ALo(17,"translate"),e.TgZ(18,"div",5),e._uU(19),e.ALo(20,"translate"),e.qZA()(),e.TgZ(21,"div",10)(22,"label",11),e._uU(23),e.ALo(24,"translate"),e.qZA(),e._UZ(25,"input",12),e.TgZ(26,"div",5),e._uU(27),e.ALo(28,"translate"),e.qZA()(),e.TgZ(29,"div",2)(30,"label",13),e._uU(31),e.ALo(32,"translate"),e.qZA(),e._UZ(33,"input",14),e.ALo(34,"translate"),e.qZA(),e.TgZ(35,"div",2)(36,"div",15),e._UZ(37,"input",16),e.TgZ(38,"label",17),e._uU(39),e.ALo(40,"translate"),e.qZA(),e.YNc(41,$,3,3,"p",18),e.qZA()(),e.YNc(42,B,4,3,"div",19),e.qZA()),2&t){let r,s,l,c;e.Q6J("ngIf",!o.asModal),e.xp6(1),e.Q6J("formGroup",o.addServerFormGroup),e.xp6(3),e.Oqu(e.lcZ(5,24,"ADDEDITSERVER.Name")),e.xp6(2),e.ekj("is-invalid",(null==(r=o.addServerFormGroup.get("serverNameControl"))?null:r.invalid)&&((null==(r=o.addServerFormGroup.get("serverNameControl"))?null:r.dirty)||(null==(r=o.addServerFormGroup.get("serverNameControl"))?null:r.touched))),e.s9C("placeholder",e.lcZ(7,26,"ADDEDITSERVER.NamePlaceholder")),e.xp6(3),e.hij(" ",e.lcZ(10,28,"ADDEDITSERVER.RequiredOrTooLongField")," "),e.xp6(2),e.Q6J("ngIf",o.serverAlreadyExists),e.xp6(3),e.Oqu(e.lcZ(15,30,"ADDEDITSERVER.Ip")),e.xp6(2),e.ekj("is-invalid",(null==(s=o.addServerFormGroup.get("serverIpControl"))?null:s.invalid)&&((null==(s=o.addServerFormGroup.get("serverIpControl"))?null:s.dirty)||(null==(s=o.addServerFormGroup.get("serverIpControl"))?null:s.touched))),e.s9C("placeholder",e.lcZ(17,32,"ADDEDITSERVER.IpPlaceholder")),e.xp6(3),e.hij(" ",e.lcZ(20,34,"ADDEDITSERVER.RequiredField")," "),e.xp6(4),e.Oqu(e.lcZ(24,36,"ADDEDITSERVER.Port")),e.xp6(2),e.ekj("is-invalid",(null==(l=o.addServerFormGroup.get("serverPortControl"))?null:l.invalid)&&((null==(l=o.addServerFormGroup.get("serverPortControl"))?null:l.dirty)||(null==(l=o.addServerFormGroup.get("serverPortControl"))?null:l.touched))),e.xp6(2),e.hij(" ",e.lcZ(28,38,"ADDEDITSERVER.InvalidPort")," "),e.xp6(4),e.Oqu(e.lcZ(32,40,"ADDEDITSERVER.Password")),e.xp6(2),e.ekj("is-invalid",(null==(c=o.addServerFormGroup.get("serverPasswordControl"))?null:c.invalid)&&((null==(c=o.addServerFormGroup.get("serverPasswordControl"))?null:c.dirty)||(null==(c=o.addServerFormGroup.get("serverPasswordControl"))?null:c.touched))),e.s9C("placeholder",e.lcZ(34,42,"ADDEDITSERVER.PasswordPlaceholder")),e.xp6(6),e.hij(" ",e.lcZ(40,44,"ADDEDITSERVER.SslEnabled")," "),e.xp6(2),e.Q6J("ngIf",o.isClientOverHttps),e.xp6(1),e.Q6J("ngIf",!o.asModal)}},directives:[_.O5,i._Y,i.JL,i.sg,i.Fj,i.JJ,i.u,i.wV,i.Wl],pipes:[S.X$],styles:[""]}),n})();function X(n,a){1&n&&(e.TgZ(0,"h1"),e._uU(1),e.ALo(2,"translate"),e.qZA()),2&n&&(e.xp6(1),e.Oqu(e.lcZ(2,1,"ADDEDITSERVER.EditServer")))}function z(n,a){1&n&&(e.TgZ(0,"p",23),e._uU(1),e.ALo(2,"translate"),e.qZA()),2&n&&(e.xp6(1),e.Oqu(e.lcZ(2,1,"ADDEDITSERVER.SslEnabledMandatory")))}function K(n,a){1&n&&(e.TgZ(0,"div",2)(1,"button",24),e._uU(2),e.ALo(3,"translate"),e.qZA()()),2&n&&(e.xp6(2),e.Oqu(e.lcZ(3,1,"ADDEDITSERVER.EditServer")))}let ee=(()=>{class n{constructor(t){this.storageService=t,this.asModal=!1,this.isClientOverHttps="https:"==location.protocol,this.editServerFormGroup=new i.cw({serverNameControl:new i.NI({value:"",disabled:!0},[i.kI.required,i.kI.maxLength(50)]),serverIpControl:new i.NI("",[i.kI.required]),serverPortControl:new i.NI(8080,[i.kI.required,i.kI.min(0),i.kI.max(99999)]),serverPasswordControl:new i.NI({value:"",disabled:!0}),serverSslEnabledControl:new i.NI({value:"https:"==location.protocol,disabled:"https:"==location.protocol}),keepServerPasswordControl:new i.NI(!0)})}ngOnInit(){var t,o,r,s,l;const c=this.storageService.getServer(this.serverNameBeingEdited);if(c){const u=c.serverURI.replace("wss://","").replace("ws://",""),g=u.slice(0,u.lastIndexOf(":")),C=u.slice(u.lastIndexOf(":")+1);null===(t=this.editServerFormGroup.get("serverNameControl"))||void 0===t||t.setValue(c.serverName),null===(o=this.editServerFormGroup.get("serverIpControl"))||void 0===o||o.setValue(g),null===(r=this.editServerFormGroup.get("serverPortControl"))||void 0===r||r.setValue(C),c.serverURI.startsWith("wss://")?null===(s=this.editServerFormGroup.get("serverSslEnabledControl"))||void 0===s||s.setValue(!0):null===(l=this.editServerFormGroup.get("serverSslEnabledControl"))||void 0===l||l.setValue(!1)}}onUpdatePasswordCheckboxChange(){var t,o,r,s;(null===(t=this.editServerFormGroup.get("keepServerPasswordControl"))||void 0===t?void 0:t.value)?(null===(o=this.editServerFormGroup.get("serverPasswordControl"))||void 0===o||o.disable(),null===(r=this.editServerFormGroup.get("serverPasswordControl"))||void 0===r||r.setValue("")):null===(s=this.editServerFormGroup.get("serverPasswordControl"))||void 0===s||s.enable()}saveServer(t){var o,r,s,l,c;if(!this.editServerFormGroup.valid)return void this.editServerFormGroup.markAllAsTouched();const u=null===(o=this.editServerFormGroup.get("serverNameControl"))||void 0===o?void 0:o.value.replace(/</g,"<").replace(/>/g,">").replace(/'/g,"").replace(/"/g,""),g=null===(r=this.editServerFormGroup.get("serverIpControl"))||void 0===r?void 0:r.value,C=null===(s=this.editServerFormGroup.get("serverPortControl"))||void 0===s?void 0:s.value,Z=(null===(l=this.editServerFormGroup.get("serverPasswordControl"))||void 0===l?void 0:l.value)||null;let h;h=(null===(c=this.editServerFormGroup.get("serverSslEnabledControl"))||void 0===c?void 0:c.value)?"wss://"+g+":"+C:"ws://"+g+":"+C,this.storageService.saveServer(u,h,Z),this.asModal&&(null==t||t.close("Save server"))}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(d.V))},n.\u0275cmp=e.Xpm({type:n,selectors:[["app-edit-server"]],inputs:{asModal:"asModal",serverNameBeingEdited:"serverNameBeingEdited"},decls:48,vars:46,consts:[[4,"ngIf"],[1,"row","g-3",3,"formGroup","ngSubmit"],[1,"col-12"],["for","inputName",1,"form-label"],["type","text","id","inputName","formControlName","serverNameControl",1,"form-control",3,"placeholder"],[1,"form-text","text-warning"],[1,"col-lg-10"],["for","inputIp",1,"form-label"],["type","text","id","inputIp","formControlName","serverIpControl",1,"form-control",3,"placeholder"],[1,"invalid-feedback"],[1,"col-lg-2"],["for","inputPort",1,"form-label"],["type","number","id","inputPort","formControlName","serverPortControl",1,"form-control"],["for","inputPassword",1,"form-label"],["type","password","id","inputPassword","formControlName","serverPasswordControl",1,"form-control",3,"placeholder"],[1,"col-md-6"],[1,"form-check"],["type","checkbox","id","updatePasswordCheck","formControlName","keepServerPasswordControl",1,"form-check-input",3,"change"],["for","updatePasswordCheck",1,"form-check-label"],["type","checkbox","id","sslCheck","formControlName","serverSslEnabledControl",1,"form-check-input"],["for","sslCheck",1,"form-check-label"],["class","text-warning",4,"ngIf"],["class","col-12",4,"ngIf"],[1,"text-warning"],["type","submit",1,"btn","btn-primary"]],template:function(t,o){if(1&t&&(e.YNc(0,X,3,3,"h1",0),e.TgZ(1,"form",1),e.NdJ("ngSubmit",function(){return o.saveServer()}),e.TgZ(2,"div",2)(3,"label",3),e._uU(4),e.ALo(5,"translate"),e.qZA(),e._UZ(6,"input",4),e.ALo(7,"translate"),e.TgZ(8,"small",5),e._uU(9),e.ALo(10,"translate"),e.qZA()(),e.TgZ(11,"div",6)(12,"label",7),e._uU(13),e.ALo(14,"translate"),e.qZA(),e._UZ(15,"input",8),e.ALo(16,"translate"),e.TgZ(17,"div",9),e._uU(18),e.ALo(19,"translate"),e.qZA()(),e.TgZ(20,"div",10)(21,"label",11),e._uU(22),e.ALo(23,"translate"),e.qZA(),e._UZ(24,"input",12),e.TgZ(25,"div",9),e._uU(26),e.ALo(27,"translate"),e.qZA()(),e.TgZ(28,"div",2)(29,"label",13),e._uU(30),e.ALo(31,"translate"),e.qZA(),e._UZ(32,"input",14),e.ALo(33,"translate"),e.qZA(),e.TgZ(34,"div",15)(35,"div",16)(36,"input",17),e.NdJ("change",function(){return o.onUpdatePasswordCheckboxChange()}),e.qZA(),e.TgZ(37,"label",18),e._uU(38),e.ALo(39,"translate"),e.qZA()()(),e.TgZ(40,"div",15)(41,"div",16),e._UZ(42,"input",19),e.TgZ(43,"label",20),e._uU(44),e.ALo(45,"translate"),e.qZA(),e.YNc(46,z,3,3,"p",21),e.qZA()(),e.YNc(47,K,4,3,"div",22),e.qZA()),2&t){let r,s,l;e.Q6J("ngIf",!o.asModal),e.xp6(1),e.Q6J("formGroup",o.editServerFormGroup),e.xp6(3),e.Oqu(e.lcZ(5,22,"ADDEDITSERVER.Name")),e.xp6(2),e.s9C("placeholder",e.lcZ(7,24,"ADDEDITSERVER.NamePlaceholder")),e.xp6(3),e.Oqu(e.lcZ(10,26,"ADDEDITSERVER.NameNotEditable")),e.xp6(4),e.Oqu(e.lcZ(14,28,"ADDEDITSERVER.Ip")),e.xp6(2),e.ekj("is-invalid",(null==(r=o.editServerFormGroup.get("serverIpControl"))?null:r.invalid)&&((null==(r=o.editServerFormGroup.get("serverIpControl"))?null:r.dirty)||(null==(r=o.editServerFormGroup.get("serverIpControl"))?null:r.touched))),e.s9C("placeholder",e.lcZ(16,30,"ADDEDITSERVER.IpPlaceholder")),e.xp6(3),e.hij(" ",e.lcZ(19,32,"ADDEDITSERVER.RequiredField")," "),e.xp6(4),e.Oqu(e.lcZ(23,34,"ADDEDITSERVER.Port")),e.xp6(2),e.ekj("is-invalid",(null==(s=o.editServerFormGroup.get("serverPortControl"))?null:s.invalid)&&((null==(s=o.editServerFormGroup.get("serverPortControl"))?null:s.dirty)||(null==(s=o.editServerFormGroup.get("serverPortControl"))?null:s.touched))),e.xp6(2),e.hij(" ",e.lcZ(27,36,"ADDEDITSERVER.InvalidPort")," "),e.xp6(4),e.Oqu(e.lcZ(31,38,"ADDEDITSERVER.Password")),e.xp6(2),e.ekj("is-invalid",(null==(l=o.editServerFormGroup.get("serverPasswordControl"))?null:l.invalid)&&((null==(l=o.editServerFormGroup.get("serverPasswordControl"))?null:l.dirty)||(null==(l=o.editServerFormGroup.get("serverPasswordControl"))?null:l.touched))),e.s9C("placeholder",e.lcZ(33,40,"ADDEDITSERVER.PasswordPlaceholder")),e.xp6(6),e.hij(" ",e.lcZ(39,42,"ADDEDITSERVER.KeepPasswordUnchanged")," "),e.xp6(6),e.hij(" ",e.lcZ(45,44,"ADDEDITSERVER.SslEnabled")," "),e.xp6(2),e.Q6J("ngIf",o.isClientOverHttps),e.xp6(1),e.Q6J("ngIf",!o.asModal)}},directives:[_.O5,i._Y,i.JL,i.sg,i.Fj,i.JJ,i.u,i.wV,i.Wl],pipes:[S.X$],styles:[""]}),n})();function te(n,a){1&n&&(e.TgZ(0,"p"),e._uU(1),e.ALo(2,"translate"),e.qZA()),2&n&&(e.xp6(1),e.Oqu(e.lcZ(2,1,"HOME.NoServersAdded")))}function oe(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"tr")(1,"td"),e._uU(2),e.qZA(),e.TgZ(3,"td",15),e._uU(4),e.qZA(),e.TgZ(5,"td",16)(6,"button",17),e.NdJ("click",function(){const s=e.CHM(t).$implicit;return e.oxw(2).connectServer(s.serverName)}),e.ALo(7,"translate"),e._UZ(8,"fa-icon",4),e.qZA(),e.TgZ(9,"button",18),e.NdJ("click",function(){const s=e.CHM(t).$implicit;return e.oxw(2).moveServerUp(s.serverName)}),e.ALo(10,"translate"),e._UZ(11,"fa-icon",4),e.qZA(),e.TgZ(12,"button",18),e.NdJ("click",function(){const s=e.CHM(t).$implicit;return e.oxw(2).moveServerDown(s.serverName)}),e.ALo(13,"translate"),e._UZ(14,"fa-icon",4),e.qZA(),e.TgZ(15,"button",19),e.NdJ("click",function(){const s=e.CHM(t).$implicit,l=e.oxw(2),c=e.MAs(15);return l.serverClicked=s,l.openModal(c)}),e.ALo(16,"translate"),e._UZ(17,"fa-icon",4),e.qZA(),e.TgZ(18,"button",20),e.NdJ("click",function(){const s=e.CHM(t).$implicit;return e.oxw(2).deleteServer(s.serverName)}),e.ALo(19,"translate"),e._UZ(20,"fa-icon",4),e.qZA()(),e.TgZ(21,"td",21)(22,"button",22),e.NdJ("click",function(){const s=e.CHM(t).$implicit,l=e.oxw(2),c=e.MAs(17);return l.serverClicked=s,l.openOffcanvas(c)}),e._UZ(23,"fa-icon",4),e.qZA()()()}if(2&n){const t=a.$implicit,o=e.oxw(2);e.xp6(2),e.Oqu(t.serverName),e.xp6(1),e.ekj("blurry-text",o.blurryUris),e.xp6(1),e.Oqu(t.serverURI),e.xp6(2),e.Q6J("ngbTooltip",e.lcZ(7,17,"HOME.Connect"))("ngClass",o.isConnectedTo(t.serverName)?"btn-success":"btn-primary"),e.xp6(2),e.Q6J("icon",o.icons.faTerminal),e.xp6(1),e.Q6J("ngbTooltip",e.lcZ(10,19,"HOME.MoveUp")),e.xp6(2),e.Q6J("icon",o.icons.faArrowUp),e.xp6(1),e.Q6J("ngbTooltip",e.lcZ(13,21,"HOME.MoveDown")),e.xp6(2),e.Q6J("icon",o.icons.faArrowDown),e.xp6(1),e.Q6J("ngbTooltip",e.lcZ(16,23,"HOME.Edit"))("disabled",o.isConnectedTo(t.serverName)),e.xp6(2),e.Q6J("icon",o.icons.faEdit),e.xp6(1),e.Q6J("ngbTooltip",e.lcZ(19,25,"HOME.Delete")),e.xp6(2),e.Q6J("icon",o.icons.faTrashCan),e.xp6(3),e.Q6J("icon",o.icons.faAnglesRight)}}function ne(n,a){if(1&n&&(e.TgZ(0,"div",10)(1,"table",11)(2,"thead")(3,"tr")(4,"th",12),e._uU(5),e.ALo(6,"translate"),e.qZA(),e.TgZ(7,"th",13),e._uU(8),e.ALo(9,"translate"),e.qZA(),e.TgZ(10,"th",12),e._uU(11),e.ALo(12,"translate"),e.qZA()()(),e.TgZ(13,"tbody"),e.YNc(14,oe,24,27,"tr",14),e.qZA()()()),2&n){const t=e.oxw();e.xp6(5),e.Oqu(e.lcZ(6,4,"GENERAL.Server")),e.xp6(3),e.Oqu(e.lcZ(9,6,"HOME.ServerUri")),e.xp6(3),e.Oqu(e.lcZ(12,8,"HOME.Actions")),e.xp6(3),e.Q6J("ngForOf",t.servers)}}function re(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"div",23)(1,"h4",24),e._uU(2),e.ALo(3,"translate"),e.qZA(),e.TgZ(4,"button",25),e.NdJ("click",function(){return e.CHM(t).$implicit.dismiss("Cross click")}),e.qZA()(),e.TgZ(5,"div",26),e._UZ(6,"app-add-server",27,28),e.qZA(),e.TgZ(8,"div",29)(9,"button",22),e.NdJ("click",function(){const s=e.CHM(t).$implicit;return e.MAs(7).saveServer(s)}),e._uU(10),e.ALo(11,"translate"),e.qZA()()}2&n&&(e.xp6(2),e.Oqu(e.lcZ(3,3,"ADDEDITSERVER.AddNewServer")),e.xp6(4),e.Q6J("asModal",!0),e.xp6(4),e.Oqu(e.lcZ(11,5,"ADDEDITSERVER.Add")))}function se(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"div",23)(1,"h4",24),e._uU(2),e.ALo(3,"translate"),e.qZA(),e.TgZ(4,"button",25),e.NdJ("click",function(){return e.CHM(t).$implicit.dismiss("Cross click")}),e.qZA()(),e.TgZ(5,"div",26),e._UZ(6,"app-edit-server",30,31),e.qZA(),e.TgZ(8,"div",29)(9,"button",22),e.NdJ("click",function(){const s=e.CHM(t).$implicit;return e.MAs(7).saveServer(s)}),e._uU(10),e.ALo(11,"translate"),e.qZA()()}if(2&n){const t=e.oxw();e.xp6(2),e.Oqu(e.lcZ(3,4,"ADDEDITSERVER.EditServer")),e.xp6(4),e.Q6J("asModal",!0)("serverNameBeingEdited",t.serverClicked.serverName),e.xp6(4),e.Oqu(e.lcZ(11,6,"ADDEDITSERVER.EditServer"))}}function le(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"div",32)(1,"h4",33),e._uU(2),e.ALo(3,"translate"),e.qZA(),e.TgZ(4,"button",25),e.NdJ("click",function(){return e.CHM(t).$implicit.dismiss("Cross click")}),e.qZA()(),e.TgZ(5,"div",34)(6,"p")(7,"strong"),e._uU(8),e.ALo(9,"translate"),e.qZA(),e._uU(10),e.qZA(),e.TgZ(11,"p")(12,"strong"),e._uU(13),e.ALo(14,"translate"),e.qZA(),e._uU(15),e.qZA(),e.TgZ(16,"p")(17,"strong"),e._uU(18),e.ALo(19,"translate"),e.qZA()(),e.TgZ(20,"p")(21,"button",35),e.NdJ("click",function(){const s=e.CHM(t).$implicit,l=e.oxw();return s.dismiss("Action"),l.connectServer(l.serverClicked.serverName)}),e._UZ(22,"fa-icon",4),e.qZA(),e.TgZ(23,"button",36),e.NdJ("click",function(){const s=e.CHM(t).$implicit,l=e.oxw();return s.dismiss("Action"),l.moveServerUp(l.serverClicked.serverName)}),e._UZ(24,"fa-icon",4),e.qZA(),e.TgZ(25,"button",36),e.NdJ("click",function(){const s=e.CHM(t).$implicit,l=e.oxw();return s.dismiss("Action"),l.moveServerDown(l.serverClicked.serverName)}),e._UZ(26,"fa-icon",4),e.qZA(),e.TgZ(27,"button",37),e.NdJ("click",function(){const s=e.CHM(t).$implicit,l=e.oxw(),c=e.MAs(15);return s.dismiss("Action"),l.openModal(c)}),e._UZ(28,"fa-icon",4),e.qZA(),e.TgZ(29,"button",38),e.NdJ("click",function(){const s=e.CHM(t).$implicit,l=e.oxw();return s.dismiss("Action"),l.deleteServer(l.serverClicked.serverName)}),e._UZ(30,"fa-icon",4),e.qZA()()()}if(2&n){const t=e.oxw();e.xp6(2),e.Oqu(e.lcZ(3,13,"HOME.ServerDetails")),e.xp6(6),e.hij("",e.lcZ(9,15,"GENERAL.Server"),":"),e.xp6(2),e.hij(" ",t.serverClicked.serverName,""),e.xp6(3),e.hij("",e.lcZ(14,17,"HOME.ServerUri"),":"),e.xp6(2),e.hij(" ",t.serverClicked.serverURI,""),e.xp6(3),e.Oqu(e.lcZ(19,19,"HOME.Actions")),e.xp6(3),e.Q6J("ngClass",t.isConnectedTo(t.serverClicked.serverName)?"btn-success":"btn-primary"),e.xp6(1),e.Q6J("icon",t.icons.faTerminal),e.xp6(2),e.Q6J("icon",t.icons.faArrowUp),e.xp6(2),e.Q6J("icon",t.icons.faArrowDown),e.xp6(1),e.Q6J("disabled",t.isConnectedTo(t.serverClicked.serverName)),e.xp6(1),e.Q6J("icon",t.icons.faEdit),e.xp6(2),e.Q6J("icon",t.icons.faTrashCan)}}let y=(()=>{class n{constructor(t,o,r,s,l){this.storageService=t,this.webConsoleService=o,this.modalService=r,this.offcanvasService=s,this.router=l,this.icons=b.P,this.blurryUris=!0,this.servers=[],this.currentlyConnectedServers=[]}ngOnInit(){this.blurryUris=this.storageService.getSetting(d.U.BlurryUri),this.refreshServerList(),this.currentlyConnectedServers=this.webConsoleService.getCurrentConnectedServers(),this.webConsoleService.getActiveConnectionsChangedSubject().subscribe({next:()=>this.currentlyConnectedServers=this.webConsoleService.getCurrentConnectedServers()})}refreshServerList(){this.servers=this.storageService.getAllServers()}isConnectedTo(t){return this.currentlyConnectedServers.includes(t)}openModal(t){this.modalService.open(t,{size:"lg"}).result.then(o=>{this.refreshServerList()},o=>{this.refreshServerList()})}openOffcanvas(t){this.offcanvasService.open(t,{ariaLabelledBy:"offcanvas-server-details",position:"end"}).result.then(o=>{},o=>{})}connectServer(t){this.router.navigate(["console",t])}moveServerUp(t){const o=this.servers.findIndex(r=>r.serverName==t);this.storageService.moveServerToIndex(t,o-1),this.refreshServerList()}moveServerDown(t){const o=this.servers.findIndex(r=>r.serverName==t);this.storageService.moveServerToIndex(t,o+1),this.refreshServerList()}deleteServer(t){this.webConsoleService.closeConnection(t),this.storageService.deleteServer(t),this.refreshServerList()}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(d.V),e.Y36(w.B),e.Y36(m.FF),e.Y36(m._B),e.Y36(f.F0))},n.\u0275cmp=e.Xpm({type:n,selectors:[["app-index"]],decls:18,vars:9,consts:[[1,"row","mb-3"],[1,"col"],[1,"col-md-auto","d-flex","align-self-center"],[1,"btn","btn-primary",3,"click"],[3,"icon"],[4,"ngIf"],["class","table-responsive",4,"ngIf"],["addModalContent",""],["editModalContent",""],["serverDetailsOffcanvas",""],[1,"table-responsive"],[1,"table","table-striped","table-hover","text-center"],["scope","col"],["scope","col",1,"d-none","d-lg-table-cell"],[4,"ngFor","ngForOf"],[1,"d-none","d-lg-table-cell"],[1,"d-none","d-lg-table-cell","w-25"],["type","button",1,"btn","btn-primary","me-1",3,"ngbTooltip","ngClass","click"],["type","button",1,"btn","btn-primary","me-1",3,"ngbTooltip","click"],["type","button",1,"btn","btn-primary","me-1",3,"ngbTooltip","disabled","click"],["type","button",1,"btn","btn-danger",3,"ngbTooltip","click"],[1,"d-lg-none","w-25"],["type","button",1,"btn","btn-primary",3,"click"],[1,"modal-header"],["id","modal-basic-title",1,"modal-title"],["type","button","aria-label","Close",1,"btn-close",3,"click"],[1,"modal-body"],[3,"asModal"],["addServer",""],[1,"modal-footer"],[3,"asModal","serverNameBeingEdited"],["editServer",""],[1,"offcanvas-header"],["id","offcanvas-basic-title",1,"offcanvas-title"],[1,"offcanvas-body"],["type","button",1,"btn","btn-primary","me-1",3,"ngClass","click"],["type","button",1,"btn","btn-primary","me-1",3,"click"],["type","button",1,"btn","btn-primary","me-1",3,"disabled","click"],["type","button",1,"btn","btn-danger",3,"click"]],template:function(t,o){if(1&t){const r=e.EpF();e.TgZ(0,"div",0)(1,"div",1)(2,"h1"),e._uU(3),e.ALo(4,"translate"),e.qZA()(),e.TgZ(5,"div",2)(6,"button",3),e.NdJ("click",function(){e.CHM(r);const l=e.MAs(13);return o.openModal(l)}),e._UZ(7,"fa-icon",4),e._uU(8),e.ALo(9,"translate"),e.qZA()()(),e.YNc(10,te,3,3,"p",5),e.YNc(11,ne,15,10,"div",6),e.YNc(12,re,12,7,"ng-template",null,7,e.W1O),e.YNc(14,se,12,8,"ng-template",null,8,e.W1O),e.YNc(16,le,31,21,"ng-template",null,9,e.W1O)}2&t&&(e.xp6(3),e.Oqu(e.lcZ(4,5,"HOME.YourServers")),e.xp6(4),e.Q6J("icon",o.icons.faAdd),e.xp6(1),e.hij(" ",e.lcZ(9,7,"ADDEDITSERVER.AddNewServer")," "),e.xp6(2),e.Q6J("ngIf",0==o.servers.length),e.xp6(1),e.Q6J("ngIf",o.servers.length>0))},directives:[A.BN,_.O5,_.sg,m._L,_.mk,W,ee],pipes:[S.X$],styles:[".blurry-text[_ngcontent-%COMP%]{text-shadow:0 0 8px black;color:transparent!important}"]}),n})();var ie=p(8543);function ae(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"button",30),e.NdJ("click",function(){return e.CHM(t),e.oxw().closeMigrateCollapse()}),e._UZ(1,"fa-icon",31),e.qZA()}if(2&n){const t=e.oxw();e.xp6(1),e.Q6J("icon",t.icons.faClose)}}const ce=[{path:"console/:serverName",component:V},{path:"settings",component:(()=>{class n{constructor(t,o){this.storageService=t,this.languageService=o,this.icons=b.P,this.exportContainerCollapsed=!0,this.exportString="",this.importContainerCollapsed=!0,this.importString="",this.errorOccuredImporting=null}ngOnInit(){this.isDateSwitchChecked=this.storageService.getSetting(d.U.DateTimePrefix),this.isLogFileSwitchChecked=this.storageService.getSetting(d.U.RetrieveLogFile),this.isBlurrySwitchChecked=this.storageService.getSetting(d.U.BlurryUri),this.isWiderSwitchChecked=this.storageService.getSetting(d.U.WiderViewport),this.savedLanguage=this.storageService.getLanguage()}onSwitchChanges(){this.storageService.setSetting(d.U.DateTimePrefix,this.isDateSwitchChecked),this.storageService.setSetting(d.U.RetrieveLogFile,this.isLogFileSwitchChecked),this.storageService.setSetting(d.U.BlurryUri,this.isBlurrySwitchChecked),this.storageService.setSetting(d.U.WiderViewport,this.isWiderSwitchChecked)}openExportCollapse(){this.exportString=this.storageService.getExportString(),this.exportContainerCollapsed=!1,this.importContainerCollapsed=!0}openImportCollapse(){this.exportContainerCollapsed=!0,this.importContainerCollapsed=!1}closeMigrateCollapse(){this.exportContainerCollapsed=!0,this.importContainerCollapsed=!0}onImportClick(){this.errorOccuredImporting=this.storageService.importSettings(this.importString)}onLanguageChanged(){console.log(`Change language to ${this.savedLanguage}`),this.languageService.setLanguage(this.savedLanguage)}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(d.V),e.Y36(ie.T))},n.\u0275cmp=e.Xpm({type:n,selectors:[["app-settings"]],decls:83,vars:67,consts:[[1,"mb-2"],[1,"form-check","form-switch"],["type","checkbox","id","showDateSettingsSwitch",1,"form-check-input",3,"ngModel","ngModelChange","change"],["for","showDateSettingsSwitch",1,"form-check-label"],["type","checkbox","id","readLogFileSwitch",1,"form-check-input",3,"ngModel","ngModelChange","change"],["for","readLogFileSwitch",1,"form-check-label"],["type","checkbox","id","showUriSwitch",1,"form-check-input",3,"ngModel","ngModelChange","change"],["for","showUriSwitch",1,"form-check-label"],["type","checkbox","id","widerSwitch",1,"form-check-input",3,"ngModel","ngModelChange","change"],["for","widerSwitch",1,"form-check-label"],["type","button","aria-controls","collapseExport",1,"btn","btn-outline-primary",3,"click"],["type","button","aria-controls","collapseImport",1,"btn","btn-outline-primary","ms-2",3,"click"],["type","button","class","btn btn-outline-primary ms-2",3,"click",4,"ngIf"],[3,"ngbCollapse","ngbCollapseChange"],["collapseExport","ngbCollapse"],[1,"card"],[1,"card-body"],[1,"card-subtitle","mb-2","text-muted"],[1,"card-text"],["collapseImport","ngbCollapse"],[1,"input-group","mb-3"],["type","text","aria-label","Paste import string...","aria-describedby","button-import",1,"form-control",3,"placeholder","ngModel","ngModelChange"],["type","button","id","button-import",1,"btn","btn-outline-primary",3,"click"],[1,"valid-feedback"],[1,"invalid-feedback"],["aria-label","Language selector",1,"form-select",3,"ngModel","ngModelChange","change"],["value","en"],["value","es"],["value","pl"],["value","zh"],["type","button",1,"btn","btn-outline-primary","ms-2",3,"click"],[3,"icon"]],template:function(t,o){1&t&&(e.TgZ(0,"h1"),e._uU(1),e.ALo(2,"translate"),e.qZA(),e.TgZ(3,"h2"),e._uU(4),e.ALo(5,"translate"),e.qZA(),e.TgZ(6,"div",0)(7,"div",1)(8,"input",2),e.NdJ("ngModelChange",function(s){return o.isDateSwitchChecked=s})("change",function(){return o.onSwitchChanges()}),e.qZA(),e.TgZ(9,"label",3),e._uU(10),e.ALo(11,"translate"),e.qZA()(),e.TgZ(12,"div",1)(13,"input",4),e.NdJ("ngModelChange",function(s){return o.isLogFileSwitchChecked=s})("change",function(){return o.onSwitchChanges()}),e.qZA(),e.TgZ(14,"label",5),e._uU(15),e.ALo(16,"translate"),e.qZA()(),e.TgZ(17,"div",1)(18,"input",6),e.NdJ("ngModelChange",function(s){return o.isBlurrySwitchChecked=s})("change",function(){return o.onSwitchChanges()}),e.qZA(),e.TgZ(19,"label",7),e._uU(20),e.ALo(21,"translate"),e.qZA()(),e.TgZ(22,"div",1)(23,"input",8),e.NdJ("ngModelChange",function(s){return o.isWiderSwitchChecked=s})("change",function(){return o.onSwitchChanges()}),e.qZA(),e.TgZ(24,"label",9),e._uU(25),e.ALo(26,"translate"),e.qZA()()(),e._UZ(27,"hr"),e.TgZ(28,"h2"),e._uU(29),e.ALo(30,"translate"),e.qZA(),e.TgZ(31,"p"),e._uU(32),e.ALo(33,"translate"),e.qZA(),e.TgZ(34,"div",0)(35,"p")(36,"button",10),e.NdJ("click",function(){return o.openExportCollapse()}),e._uU(37),e.ALo(38,"translate"),e.qZA(),e.TgZ(39,"button",11),e.NdJ("click",function(){return o.openImportCollapse()}),e._uU(40),e.ALo(41,"translate"),e.qZA(),e.YNc(42,ae,2,1,"button",12),e.qZA(),e.TgZ(43,"div",13,14),e.NdJ("ngbCollapseChange",function(s){return o.exportContainerCollapsed=s}),e.TgZ(45,"div",15)(46,"div",16)(47,"h6",17),e._uU(48),e.ALo(49,"translate"),e.qZA(),e.TgZ(50,"p",18),e._uU(51),e.qZA()()()(),e.TgZ(52,"div",13,19),e.NdJ("ngbCollapseChange",function(s){return o.importContainerCollapsed=s}),e.TgZ(54,"div",20)(55,"input",21),e.NdJ("ngModelChange",function(s){return o.importString=s}),e.ALo(56,"translate"),e.qZA(),e.TgZ(57,"button",22),e.NdJ("click",function(){return o.onImportClick()}),e._uU(58),e.ALo(59,"translate"),e.qZA()(),e.TgZ(60,"div",23),e._uU(61),e.ALo(62,"translate"),e.qZA(),e.TgZ(63,"div",24),e._uU(64),e.ALo(65,"translate"),e.qZA()()(),e._UZ(66,"hr"),e.TgZ(67,"h2"),e._uU(68),e.ALo(69,"translate"),e.qZA(),e.TgZ(70,"p"),e._uU(71),e.ALo(72,"translate"),e.qZA(),e.TgZ(73,"div",0)(74,"select",25),e.NdJ("ngModelChange",function(s){return o.savedLanguage=s})("change",function(){return o.onLanguageChanged()}),e.TgZ(75,"option",26),e._uU(76,"English"),e.qZA(),e.TgZ(77,"option",27),e._uU(78,"Espa\xf1ol"),e.qZA(),e.TgZ(79,"option",28),e._uU(80,"Polski"),e.qZA(),e.TgZ(81,"option",29),e._uU(82,"\u4e2d\u6587"),e.qZA()()()),2&t&&(e.xp6(1),e.Oqu(e.lcZ(2,33,"SETTINGS.WebConsoleClientSettings")),e.xp6(3),e.Oqu(e.lcZ(5,35,"SETTINGS.GeneralSettings")),e.xp6(4),e.Q6J("ngModel",o.isDateSwitchChecked),e.xp6(2),e.Oqu(e.lcZ(11,37,"SETTINGS.ShowTimeOnConsoleLine")),e.xp6(3),e.Q6J("ngModel",o.isLogFileSwitchChecked),e.xp6(2),e.Oqu(e.lcZ(16,39,"SETTINGS.RetrieveFullLogOnConnect")),e.xp6(3),e.Q6J("ngModel",o.isBlurrySwitchChecked),e.xp6(2),e.Oqu(e.lcZ(21,41,"SETTINGS.BlurryUriHomepage")),e.xp6(3),e.Q6J("ngModel",o.isWiderSwitchChecked),e.xp6(2),e.Oqu(e.lcZ(26,43,"SETTINGS.WiderViewport")),e.xp6(4),e.Oqu(e.lcZ(30,45,"SETTINGS.MigrateData")),e.xp6(3),e.Oqu(e.lcZ(33,47,"SETTINGS.MigrateDataDescription")),e.xp6(4),e.uIk("aria-expanded",!o.exportContainerCollapsed),e.xp6(1),e.hij(" ",e.lcZ(38,49,"SETTINGS.ExportData")," "),e.xp6(2),e.uIk("aria-expanded",!o.exportContainerCollapsed),e.xp6(1),e.hij(" ",e.lcZ(41,51,"SETTINGS.ImportData")," "),e.xp6(2),e.Q6J("ngIf",!o.exportContainerCollapsed||!o.importContainerCollapsed),e.xp6(1),e.Q6J("ngbCollapse",o.exportContainerCollapsed),e.xp6(5),e.Oqu(e.lcZ(49,53,"SETTINGS.CopyString")),e.xp6(3),e.Oqu(o.exportString),e.xp6(1),e.Q6J("ngbCollapse",o.importContainerCollapsed),e.xp6(2),e.ekj("is-valid",!0===o.errorOccuredImporting)("is-invalid",!1===o.errorOccuredImporting),e.xp6(1),e.s9C("placeholder",e.lcZ(56,55,"SETTINGS.PasteString")),e.Q6J("ngModel",o.importString),e.xp6(3),e.Oqu(e.lcZ(59,57,"SETTINGS.Import")),e.xp6(3),e.hij(" ",e.lcZ(62,59,"SETTINGS.ImportSuccessful")," "),e.xp6(3),e.hij(" ",e.lcZ(65,61,"SETTINGS.ImportFailed")," "),e.xp6(4),e.Oqu(e.lcZ(69,63,"SETTINGS.Language")),e.xp6(3),e.Oqu(e.lcZ(72,65,"SETTINGS.SelectLanguage")),e.xp6(3),e.Q6J("ngModel",o.savedLanguage))},directives:[i.Wl,i.JJ,i.On,_.O5,A.BN,m._D,i.Fj,i.EJ,i.YN,i.Kr],pipes:[S.X$],styles:[""]}),n})()},{path:"",component:y},{path:"**",component:y}];let pe=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=e.oAB({type:n}),n.\u0275inj=e.cJS({imports:[[f.Bz.forChild(ce)],f.Bz]}),n})();var de=p(4466);let ue=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=e.oAB({type:n}),n.\u0275inj=e.cJS({imports:[[pe,de.m]]}),n})()}}]);