MeshCentral/views/translations/default-mobile-min_cs.handl...

1 line
116 KiB
Handlebars

<!doctypehtml><html dir=ltr xmlns=http://www.w3.org/1999/xhtml><meta http-equiv=X-UA-Compatible content="IE=edge"><meta content="text/html; charset=utf-8"http-equiv=Content-Type><meta name=viewport content="user-scalable=1,initial-scale=1,minimum-scale=1,maximum-scale=1"><meta name=apple-mobile-web-app-capable content=yes><meta name=format-detection content="telephone=no"><link rel="shortcut icon"type=image/x-icon href={{{domainurl}}}favicon.ico><script src=scripts/common-0.0.1.js></script><script src=scripts/meshcentral.js></script><script src=scripts/agent-redir-ws-0.1.1.js></script><script src=scripts/agent-desktop-0.0.2.js></script><script src=scripts/amt-0.2.0.js></script><script src=scripts/amt-redir-ws-0.1.0.js></script><script src=scripts/amt-desktop-0.0.2.js></script><script src=scripts/zlib.js></script><script src=scripts/zlib-inflate.js></script><script src=scripts/zlib-adler32.js></script><script src=scripts/zlib-crc32.js></script><script keeplink=1 src=scripts/filesaver.js></script><title>{{{title}}}</title><style>a{color:#036;text-decoration:underline}#footer a{color:#fff;text-decoration:underline}#footer a:hover{color:#fff;text-decoration:none}.i1{background:url(../images/icons50.png) 0 0;height:50px;width:50px;border:none}.i2{background:url(../images/icons50.png) -50px 0;height:50px;width:50px;border:none}.i3{background:url(../images/icons50.png) -100px 0;height:50px;width:50px;border:none}.i4{background:url(../images/icons50.png) -150px 0;height:50px;width:50px;border:none}.i5{background:url(../images/icons50.png) -200px 0;height:50px;width:50px;border:none}.i6{background:url(../images/icons50.png) -250px 0;height:50px;width:50px;border:none}.m0{background:url(../images/images16.png) -32px 0;height:16px;width:16px;border:none;float:left}.m1{background:url(../images/images16.png) -16px 0;height:16px;width:16px;border:none;float:left}.m2{background:url(../images/images16.png) -96px 0;height:16px;width:16px;border:none;float:left}.m3{background:url(../images/images16.png) -112px 0;height:16px;width:16px;border:none;float:left}.gray{filter:gray;-webkit-filter:grayscale(100%) opacity(60%)}.DevSt{padding-left:5px;border-bottom-style:solid;border-bottom-width:1px;border-bottom-color:#ddd}.noselect{-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.fileIcon1{background:url(data:image/gif;base64,R0lGODlhEAAQAJEDAPb49Y2Sj9LT2f///yH5BAEAAAMALAAAAAAQABAAAAImnI+py+1vhJwyUYAzHTL4D3qdlJWaIFJqmKod607sDKIiDUP63hQAOw==);height:16px;width:16px;cursor:pointer;border:none;float:left;margin-top:1px}.fileIcon2{background:url(data:image/gif;base64,R0lGODlhEAAQAJEDAM2xV/Xur+XPgP///yH5BAEAAAMALAAAAAAQABAAAAJD3ISZIGHWUGihznesYDYATFVM+D2hJ4lgN1olxALAtAlmPCJvuMmJd6PJckDYwicrHhTD5o7plJmg0Uc0asNMkphHAQA7);height:16px;width:16px;cursor:pointer;border:none;float:left;margin-top:1px}.fileIcon3{background:url(data:image/gif;base64,R0lGODlhEAAQAJEDAPb19IGBgbq6uv///yH5BAEAAAMALAAAAAAQABAAAAIy3ISpxgcPH2ouQgFEw1YmxnUXKEaaEZZnVWZk66JwzKpvuwZzwOgwb/C1gIOA8Yg8DgoAOw==);height:16px;width:16px;cursor:pointer;border:none;float:left;margin-top:1px}.fileIcon4{background:url(../images/meshicon16.png);height:16px;width:16px;cursor:pointer;border:none;float:left;margin-top:1px}.filelist{-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none;cursor:default;-khtml-user-drag:element;background-color:#fff;clear:both}</style><body onload='"undefined"!=typeof startup&&startup()'style="overflow-y:hidden;margin:0;padding:0;border:0;color:#000;font-size:13px;font-family:\'Trebuchet MS\',Arial,Helvetica,sans-serif"><div id=container><div id=mastheadx></div><div id=masthead style="background:url(logo.png) 0 0;background-size:341px 50px;background-color:#036;background-repeat:no-repeat;height:50px;width:100%;overflow:hidden"><div style="width:calc(100% - 50px);overflow:hidden"><div style=float:left;height:66px;color:#c8c8c8;padding-left:10px;padding-top:6px><strong><font style=font-size:36px;font-family:Arial,Helvetica,sans-serif>{{{title}}}</font></strong></div><div style=float:left;height:66px;color:#c8c8c8;padding-left:5px;padding-top:10px><strong><font style=font-size:12px;font-family:Arial,Helvetica,sans-serif>{{{title2}}}</font></strong></div></div><img id=topMenuIcon class=noselect style=position:absolute;right:0;top:10px;bottom:50px;color:#c8c8c8;font-size:44px;margin-right:8px;cursor:pointer;display:none onclick=topMenu() src=/images/3bars-30.png width=30 height=30></div><div id=page_content style=overflow-y:scroll;position:absolute;bottom:32px;top:50px;width:100%><div id=column_l style=width:100%;padding:0;position:absolute;bottom:0;top:0><div id=p0 style=display:none;width:100%;height:100%><div style=display:flex;align-items:center;width:100%;height:100%><div id=p0message style=text-align:center;width:100%><span id=p0span>Server odpojen</span>,<href onclick=reload() style=cursor:pointer><u>klikni pro opětovné připojení</u></href>.</div></div></div><div id=p1 style=display:none;width:100%;height:100%><div style=display:flex;align-items:center;width:100%;height:100%><div id=p1message style=text-align:center;width:100%></div></div></div><div id=p2 style=display:none><div id=xdevices></div></div><div id=p3 style=display:none;position:absolute;bottom:0;top:0;width:100%><table cellspacing=0 style=margin:0;padding:0;border-spacing:0;border:0><tr style=padding:0><td style=padding:0;color:#c8c8c8;text-align:center;cursor:pointer width=60px valign=top onclick=goBack()><div style=padding:0;background-color:#036;width:10px;height:10px;float:right;border:0><div style="background-color:#fff;width:10px;height:10px;border-radius:10px 0 0 0;border-right:1px solid #fff;border-bottom:1px solid #fff"></div></div><div style="padding:0;font-size:25px;background-color:#036;width:50px;border-radius:0 0 10px 0;height:36px">◀</div><td><img src=/images/user-50.png width=50 height=50><td><div style=margin-left:5px><strong style=font-size:large><span id=p3userName></span></strong><br></div></table><div id=p3info style=overflow-y:scroll;position:absolute;top:55px;bottom:0;width:100%><div style=margin-left:8px><div id=p3AccountActions><p><strong>Nastavení bezpečnosti</strong><div style=margin-left:9px;margin-bottom:8px><div id=manageAuthApp style=margin-top:5px;display:none><a onclick=account_manageAuthApp() style=cursor:pointer>Spravovat autentizační aplikace</a></div><div id=manageOtp style=margin-top:5px;display:none><a onclick=account_manageOtp(0) style=cursor:pointer>Spravovat záložní kódy</a></div></div><p><strong>Akce účtu</strong><div style=margin-left:9px;margin-bottom:8px><div style=margin-top:5px><span id=verifyEmailId style=display:none><a onclick=account_showVerifyEmail() style=cursor:pointer>Ověřit email</a></span></div><div style=margin-top:5px><span id=changeEmailId style=display:none><a onclick=account_showChangeEmail() style=cursor:pointer>Změnit emailovou adresu</a></span></div><div style=margin-top:5px><a onclick=account_showChangePassword() style=cursor:pointer>Změnit heslo</a><span id=p2nextPasswordUpdateTime></span></div><div style=margin-top:5px><a onclick=account_showDeleteAccount() style=cursor:pointer>Smazat účet</a></div></div><br style=clear:both></div><strong>Skupiny zařízení</strong> <span id=p3createMeshLink1>( <a onclick=account_createMesh() style=cursor:pointer><img src=images/icon-addnew.png width=12 height=12 border=0> Vytvořit</a> )</span><br><br><div id=p3meshes></div><div id=p3noMeshFound style=margin-left:9px;display:none>Žádná skupina zařízení.<span id=p3createMeshLink2> <a onclick=account_createMesh() style=cursor:pointer><strong>Začněte zde!</strong></a></span></div><br style=clear:both></div></div></div><div id=p5 style=display:none><table cellspacing=0 style=margin:0;padding:0;border-spacing:0;border:0><tr style=padding:0><td style=padding:0;color:#c8c8c8;text-align:center;cursor:pointer width=60px valign=top onclick=goBack()><div style=padding:0;background-color:#036;width:10px;height:10px;float:right;border:0><div style="background-color:#fff;width:10px;height:10px;border-radius:10px 0 0 0;border-right:1px solid #fff;border-bottom:1px solid #fff"></div></div><div style="padding:0;font-size:25px;background-color:#036;width:50px;border-radius:0 0 10px 0;height:36px">◀</div><td><img src=/images/user-50.png width=50 height=50><td><div style=margin-left:5px><strong style=font-size:large>Moje soubory</strong><br></div></table><div id=p5myfiles style=overflow-y:scroll;position:absolute;top:55px;bottom:0;width:100%><table id=p5toolbar style=width:100%;height:78px cellpadding=0 cellspacing=0><tr><td style=width:100%;background-color:#d3d9d6;text-align:left;padding:4px valign=bottom><div style=width:100%;text-align:center><input type=button style="width:calc(100%/5 - 5px)"id=p5FolderUp disabled onclick=p5folderup() value=Nahoru> <input type=button style="width:calc(100%/5 - 5px)"id=p5SelectAllButton disabled onclick=p5selectallfile() value="Vybrat vše"onkeypress=return!1 onkeydown=return!1> <input type=button style="width:calc(100%/5 - 5px)"id=p5RenameFileButton disabled value=Přejmenovat onclick=p5renamefile() onkeypress=return!1 onkeydown=return!1> <input type=button style="width:calc(100%/5 - 5px)"id=p5DeleteFileButton disabled value=Smazat onclick=p5deletefile() onkeypress=return!1 onkeydown=return!1> <input type=button style="width:calc(100%/5 - 5px)"id=p5NewFolderButton disabled value=Adresář onclick=p5createfolder() onkeypress=return!1 onkeydown=return!1></div><div style=width:100%;text-align:center><input type=button style="width:calc(100%/5 - 5px)"id=p5UploadButton disabled value=Nahrát onclick=p5uploadFile() onkeypress=return!1 onkeydown=return!1> <input type=button style="width:calc(100%/5 - 5px)"id=p5CutButton disabled value=Vyjmout onclick=p5copyFile(1) onkeypress=return!1 onkeydown=return!1> <input type=button style="width:calc(100%/5 - 5px)"id=p5CopyButton disabled value=Kopírovat onclick=p5copyFile(0) onkeypress=return!1 onkeydown=return!1> <input type=button style="width:calc(100%/5 - 5px)"id=p5PasteButton disabled value=Vložit onclick=p5pasteFile() onkeypress=return!1 onkeydown=return!1> <input type=button style="width:calc(100%/5 - 5px)"id=p5RefreshButton value=Obnovit onclick=p5refreshFiles() onkeypress=return!1 onkeydown=return!1></div><tr><td style=background-color:#e4e9e7;height:28px><table style=width:100%><tr><td id=p5currentpath style=overflow:hidden;padding-left:4px;padding-top:2px><td style=text-align:right;padding-right:4px><select id=p5sortdropdown onchange=updateFiles()><option value=1 selected>Třídit podle jména<option value=2>Třídit podle velikosti<option value=3>STřídit podle datumu<option value=4>Sestupně podle jména<option value=5>Sestupně podle velikosti<option value=6>Sestupně podle datumu</select></table></table><div id=p5filetable style="width:100%;height:calc(100% - 133px);overflow:auto;-webkit-user-select:none"><span id=p5files></span></div><table id=p5toolbarBottom style=width:100%;height:22px;position:absolute;bottom:0;background-color:#d3d9d6 cellpadding=0 cellspacing=0><tr><td style=text-align:left;padding:3px>&nbsp;<span id=p5bottomstatus></span><td id=p5rightOfButtons style=text-align:right;padding:3px></table></div></div><div id=p10 style=display:none;position:absolute;bottom:0;top:0;width:100%;overflow:hidden><table cellspacing=0 style=margin:0;padding:0;border-spacing:0;border:0;position:absolute;top:0><tr style=padding:0><td style=padding:0;color:#c8c8c8;text-align:center;cursor:pointer width=60px valign=top onclick=goBack()><div style=padding:0;background-color:#036;width:10px;height:10px;float:right;border:0><div style="background-color:#fff;width:10px;height:10px;border-radius:10px 0 0 0;border-right:1px solid #fff;border-bottom:1px solid #fff"></div></div><div style="padding:0;font-size:25px;background-color:#036;width:50px;border-radius:0 0 10px 0;height:36px">◀</div><td><a id=MainComputerImage style=cursor:pointer onclick=p10showiconselector()></a><td><div style=margin-left:5px><strong><span id=p10deviceName></span></strong><br><span id=MainComputerState></span></div></table><div id=p10general style=overflow-y:scroll;position:absolute;top:55px;bottom:0;width:100%><div id=p10html style=margin-left:8px;margin-right:8px></div><div id=p10html2></div><div id=p10html3></div></div><div id=p10desktop style=overflow:hidden;position:absolute;top:55px;bottom:0;width:100%;display:none><div id=deskarea1 style=position:absolute;top:0;width:100%;height:25px><div style=padding-top:2px;padding-bottom:2px;background:silver><div style=float:right;text-align:right><span id=p14power></span>&nbsp; <input id=DeskSoftInput style=width:25px;display:none;opacity:.2 onblur=toggleSoftKeys(0) onkeypress="return ondeskkeypress(event)"onkeydown="return ondeskkeydown(event)"onkeyup="return ondeskkeyup(event)"></div><div style=margin-left:3px><input type=button id=connectbutton1 value=Připojit onclick=connectDesktop(event,1) onkeypress=return!1 onkeydown=return!1 disabled> <input type=button id=connectbutton1h value="HW připojení"onclick=connectDesktop(event,2) onkeypress=return!1 onkeydown=return!1 disabled> <input type=button id=disconnectbutton1 value=Odpojit onclick=connectDesktop(event,0) onkeypress=return!1 onkeydown=return!1> <span id=deskstatus>Odpojeno</span></div></div></div><div id=deskarea3 style="position:absolute;top:25px;width:100%;height:calc(100% - 50px)"><div id=deskarea3x style=background:#000;text-align:center;height:100%;position:relative><div id=DeskParent style=height:100%><canvas id=Desk width=640 height=200 style=width:100%;-ms-touch-action:none;margin-left:0 oncontextmenu=return!1 onmousedown=dmousedown(event) onmouseup=dmouseup(event) onmousemove=dmousemove(event) onmousewheel=dmousewheel(event)></canvas></div><div id=DeskTools style="position:absolute;width:400px;height:100%;background-color:gray;top:0;right:0;border-left:2px solid #d3d3d3;display:none"><a id=DeskToolsRefreshButton style=float:right;padding:3px;cursor:pointer onclick=refreshDeskTools()>Obnovit</a><div id=DeskToolsBar style="position:absolute;padding:3px;border-radius:3px 3px 0 0;top:5px;left:4px;bottom:26px;background-color:#d3d3d3;cursor:pointer">Procesy</div><div style=position:absolute;top:26px;left:4px;right:4px;bottom:4px;background-color:#d3d3d3;text-align:left><div style="border-bottom:1px solid #a9a9a9;padding:3px"><a style=width:50px;padding-right:5px;float:left;cursor:pointer onclick=sortProcess(0)>PID</a><a style=cursor:pointer onclick=sortProcess(1)>Jméno</a></div><div id=DeskToolsProcesses style=overflow-y:scroll;position:absolute;top:24px;bottom:0;width:100%></div></div></div></div></div><div id=deskarea4 style=position:absolute;bottom:0;width:100%;height:25px><div style=padding-top:2px;padding-bottom:2px;background:silver><div style=float:right;text-align:right><select id=termdisplays style=display:none onchange=deskSetDisplay(event) onclick=deskGetDisplayNumbers(event)></select>&nbsp; <span id=DeskToastButton><img src=images/icon-notify.png onclick=deviceToastFunction() height=16 width=16 style=padding-top:2px></span>&nbsp;</div><div><input id=deskActionsBtn type=button style=margin-left:3px onkeypress=return!1 onkeydown=return!1 value=Akce onclick=deviceActionFunction()> <input type=button value=Nastavení onkeypress=return!1 onkeydown=return!1 onclick=showDesktopSettings()> <input type=button onkeypress=return!1 onkeydown=return!1 value="Akce napájení"onclick=showPowerActionDlg() style=display:none> <input id=DeskSpecialKeys type=button value="Speciální klíče"onkeypress=return!1 onkeydown=return!1 onclick=sendSpecialKeys()> <input id=DeskSoftKeys type=button value=Klávesnice onkeypress=return!1 onkeydown=return!1 onclick=toggleSoftKeys(1)> <label><span id=DeskControlSpan style=display:none><input id=DeskControl type=checkbox onkeypress=return!1 onkeydown=return!1>Vstup</span></label></div></div></div></div><div id=p10files style=overflow-y:scroll;position:absolute;top:55px;bottom:0;width:100%;display:none><table id=p13toolbar style=width:100%;height:111px cellpadding=0 cellspacing=0><tr><td style="background-color:silver;border-bottom:2px solid #000;padding:2px"><div style=float:right;text-align:right><input id=filesActionsBtn type=button onkeypress=return!1 onkeydown=return!1 value=Akce onclick=deviceActionFunction() style=margin-right:2px></div><div style=margin-left:2px><input id=p13AutoConnect value="Automatické připojení"onclick=autoConnectFiles(event) onkeypress=return!1 onkeydown=return!1 type=button style=display:none> <input id=p13Connect value=Připojit onclick=connectFiles(event) onkeypress=return!1 onkeydown=return!1 type=button> <span id=p13Status>Odpojeno</span></div><tr><td style=width:100%;background-color:#d3d9d6;text-align:left;padding:4px valign=bottom><div style=width:100%;text-align:center><input type=button style="width:calc(100%/5 - 5px)"id=p13FolderUp disabled onclick=p13folderup() value=Nahoru> <input type=button style="width:calc(100%/5 - 5px)"id=p13SelectAllButton disabled onclick=p13selectallfile() value="Vybrat vše"onkeypress=return!1 onkeydown=return!1> <input type=button style="width:calc(100%/5 - 5px)"id=p13RenameFileButton disabled value=Přejmenovat onclick=p13renamefile() onkeypress=return!1 onkeydown=return!1> <input type=button style="width:calc(100%/5 - 5px)"id=p13DeleteFileButton disabled value=Smazat onclick=p13deletefile() onkeypress=return!1 onkeydown=return!1> <input type=button style="width:calc(100%/5 - 5px)"id=p13NewFolderButton disabled value=Adresář onclick=p13createfolder() onkeypress=return!1 onkeydown=return!1></div><div style=width:100%;text-align:center><input type=button style="width:calc(100%/5 - 5px)"id=p13UploadButton disabled value=Nahrát onclick=p13uploadFile() onkeypress=return!1 onkeydown=return!1> <input type=button style="width:calc(100%/5 - 5px)"id=p13CutButton disabled value=Vyjmout onclick=p13copyFile(1) onkeypress=return!1 onkeydown=return!1> <input type=button style="width:calc(100%/5 - 5px)"id=p13CopyButton disabled value=Kopírovat onclick=p13copyFile(0) onkeypress=return!1 onkeydown=return!1> <input type=button style="width:calc(100%/5 - 5px)"id=p13PasteButton disabled value=Vložit onclick=p13pasteFile() onkeypress=return!1 onkeydown=return!1> <input type=button style="width:calc(100%/5 - 5px)"id=p13RefreshButton disabled value=Obnovit onclick=p13folderup(9999) onkeypress=return!1 onkeydown=return!1></div><tr><td style=background-color:#e4e9e7;height:28px><table style=width:100%><tr><td id=p13currentpath style=overflow:hidden;padding-left:4px;padding-top:2px><td style=text-align:right;padding-right:4px><select id=p13sortdropdown onchange=p13updateFiles()><option value=1 selected>Třídit podle jména<option value=2>Třídit podle velikosti<option value=3>STřídit podle datumu<option value=4>Sestupně podle jména<option value=5>Sestupně podle velikosti<option value=6>Sestupně podle datumu</select></table></table><div id=p13filetable style="width:100%;height:calc(100% - 133px);overflow:auto;-webkit-user-select:none"><span id=p13files></span></div><table id=p13toolbarBottom style=width:100%;height:22px;position:absolute;bottom:0 cellpadding=0 cellspacing=0><tr><td style=text-align:left;padding:3px;text-align:center;background-color:#d3d9d6>&nbsp;<span id=p13bottomstatus></span></table></div></div><div id=p20 style=display:none;position:absolute;bottom:0;top:0;width:100%><table cellspacing=0 style=margin:0;padding:0;border-spacing:0;border:0><tr style=padding:0><td style=padding:0;color:#c8c8c8;text-align:center;cursor:pointer width=60px valign=top onclick=goBack()><div style=padding:0;background-color:#036;width:10px;height:10px;float:right;border:0><div style="background-color:#fff;width:10px;height:10px;border-radius:10px 0 0 0;border-right:1px solid #fff;border-bottom:1px solid #fff"></div></div><div style="padding:0;font-size:25px;background-color:#036;width:50px;border-radius:0 0 10px 0;height:36px">◀</div><td onclick=p20editmesh(1)><img src=/images/meshicon50.png width=50 height=50><td onclick=p20editmesh(1)><div style=margin-left:5px><strong style=font-size:large><span id=p20meshName></span></strong><br></div></table><div id=p20info style=margin-left:8px;margin-right:8px></div></div></div></div><div id=footer style=height:32px;width:100%;text-align:center;background-color:#113962;position:absolute;bottom:0><table id=footerMenu cellpadding=0 cellspacing=0 style=height:32px;width:100%;color:#fff;cursor:pointer;table-layout:fixed></table></div></div><div id=dialog style="z-index:1000;background-color:#eee;box-shadow:0 0 15px #666;font-family:Arial,Helvetica,sans-serif;border-radius:5px;position:fixed;top:90px;width:300px;display:none"><div style="width:100%;background-color:#036;color:#fff;border-radius:5px 5px 0 0"><div id=id_dialogclose style=float:right;padding:5px;cursor:pointer onclick=setDialogMode()><b>X</b></div><div id=id_dialogtitle style=padding:5px></div><div style=width:100%;margin:6px></div></div><div style=margin-right:16px;margin-left:8px><div id=dialog1 style=margin:auto;text-align:center;margin:3px><div id=id_dialogMessage style=padding:10px></div></div><div id=dialog2 style=margin:auto;margin:3px><div id=id_dialogOptions></div></div><div id=dialog3 style=margin:auto;margin:3px><select id=deskkeys style=width:100%><option value=10>Ctrl+Alt+Del<option value=11>Tab<option value=5>Win<option value=0>Win+Down<option value=1>Win+Up<option value=2>Win+L<option value=3>Win+M<option value=4>Shift+Win+M<option value=6>Win+R<option value=7>Alt-F4<option value=8>Ctrl-W<option value=9>Alt-Tab</select></div><div id=dialog7 style=margin:auto;margin:3px><div id=d7meshkvm><h4 style="width:100%;border-bottom:1px solid gray">Agent vzdálené plochy</h4><div style="margin:3px 0 3px 0"><select id=d7bitmapquality style=float:right;width:200px;height:20px dir=rtl></select><div style=height:20px>Kvalita</div></div><div style="margin:3px 0 3px 0"><select id=d7bitmapscaling style=float:right;width:200px;height:20px dir=rtl><option selected value=1024>100%<option value=896>87.5%<option value=768>75%<option value=640>62.5%<option value=512>50%<option value=384>37.5%<option value=256>25%<option value=128>12.5%</select><div style=height:20px>Škálování</div></div><div style="margin:3px 0 3px 0"><select id=d7framelimiter style=float:right;width:200px;height:20px dir=rtl><option selected value=50>Rychle<option value=100>Středně<option value=400>Pomalu<option value=1000>Velmi pomalu</select><div style=height:20px>Hodnocení</div></div></div><div id=d7amtkvm><h4 style="width:100%;border-bottom:1px solid gray">Intel® AMT Hardware KVM</h4><div style=height:26px><select id=d7desktopmode style=float:right;width:200px><option value=1>RLE8, Rychlejší<option value=2>RLE16, doporučeno<option value=3>RAW8, pomalé<option value=4>RAW16, hodně pomalé</select><div>Kódování</div></div><div style=height:60px><div style="float:right;border:1px solid #666;width:200px;height:60px;overflow-y:scroll;background-color:#fff"><label><input type=checkbox id=d7showfocus>Zobrazit nástroj pro zaměření</label><br><label><input type=checkbox id=d7showcursor>Zobrazit lokální kurzor myši</label><br></div><div>Ostatní</div></div></div></div></div><div id=idx_dlgButtonBar style=padding:10px;margin-bottom:20px><input id=idx_dlgCancelButton type=button value=Zrušit style=float:right;width:80px;margin-left:5px onclick=dialogclose(0)> <input id=idx_dlgOkButton type=button value=OK style=float:right;width:80px onclick=dialogclose(1)></div></div><div id=topMenu style="z-index:1000;background-color:#eee;box-shadow:0 0 15px #666;font-family:Arial,Helvetica,sans-serif;border-radius:0 0 5px 5px;position:fixed;top:50px;right:5px;width:170px;display:none"><div style="padding:12px;border-top:1px solid gray;color:#000;cursor:pointer"onclick=topMenu(2)>Moje soubory</div><div style="padding:12px;border-top:1px solid gray;color:#000;cursor:pointer"onclick=topMenu(1)>Můj účet</div><div id=logoutMenuOption><a href=/logout><div style="padding:12px;border-top:1px solid gray;color:#000;cursor:pointer">Odhlásit</div></a></div></div><iframe name=fileUploadFrame style=display:none></iframe><script>"use strict";var webState="{{{webstate}}}";for(var i in""!=webState&&(webState=JSON.parse(decodeURIComponent(webState))),webState)localStorage.setItem(i,webState[i]);webState.loctag||localStorage.removeItem("loctag");var files,args=parseUriArgs(),debugLevel=parseInt("{{{debuglevel}}}"),features=parseInt("{{{features}}}"),sessionTime=parseInt("{{{sessiontime}}}"),domain="{{{domain}}}",domainUrl="{{{domainurl}}}",authCookie="{{{authCookie}}}",authRelayCookie="{{{authRelayCookie}}}",authCookieRenewTimer=null,meshserver=null,xdr=null,serverinfo=null,nodes=[],meshes={},filetree={},userinfo=null,users=(serverinfo=null,null),nodeShortIdent=0,serverPublicNamePort="{{{serverDnsName}}}:{{{serverPublicPort}}}",debugmode=!1,attemptWebRTC=0!=(128&features),StatusStrs=["Odpojeno","Připojování...","Nastavení...","Připojeno","Intel&reg; AMT připojeno"],passRequirements="{{{passRequirements}}}";""!=passRequirements&&(passRequirements=JSON.parse(decodeURIComponent(passRequirements)));var sessionActivity=Date.now();function startup(){if(0==(32&features)){var e=null;try{e=top.location.toString().toLowerCase()}catch(e){}if(top!=self&&(null==e||0==top.active))return void(top.location=self.location)}if(!args.locale){var t=getstore("loctag",0);null!=t&&"*"!=t&&(args.locale=t)}(window.onresize=center)(),QV("changeEmailId",0==(2097152&features)),QH("p1message","Připojování..."),go(1),(meshserver=MeshServerCreateControl(domainUrl,authCookie)).onStateChanged=onStateChanged,meshserver.onMessage=onMessage,meshserver.Start();var o=localStorage.getItem("desktopsettings");null!=o&&(desktopsettings=JSON.parse(o)),applyDesktopSettings()}function onStateChanged(e,t,o,n){if(0==t){if(setDialogMode(0),go(0),"noauth"==n)return void QH("p0span","Unable to perform authentication");2==o?setTimeout(serverPoll,5e3):QH("p0span","Nelze se připojit k web socketu"),null!=authCookieRenewTimer&&(clearInterval(authCookieRenewTimer),authCookieRenewTimer=null)}else 2==t&&(meshserver.send({action:"meshes"}),meshserver.send({action:"nodes"}),meshserver.send({action:"files"}),xxcurrentView<2&&go(2),authCookieRenewTimer=setInterval(function(){meshserver.send({action:"authcookie"})},18e5));QV("topMenuIcon",2==t)}function serverPoll(){xdr=null;try{xdr=new XDomainRequest}catch(e){}(xdr=xdr||new XMLHttpRequest).open("HEAD",window.location.href),xdr.timeout=15e3,xdr.onload=function(){reload()},xdr.onerror=xdr.ontimeout=function(){setTimeout(serverPoll,1e4)},xdr.send()}function updateSelf(){if(QV("verifyEmailId",!0!==userinfo.emailVerified&&null!=userinfo.email&&1==serverinfo.emailcheck),QV("manageAuthApp",4096&features),QV("manageOtp",0!=(4096&features)&&(1==userinfo.otpsecret||0<userinfo.otphkeys)),QV("p3createMeshLink1",!1),QV("p3createMeshLink2",!1),"number"==typeof userinfo.passchange)if(-1==userinfo.passchange)QH("p2nextPasswordUpdateTime"," - Reset při příštím přihlášení.");else if(null!=passRequirements&&"number"==typeof passRequirements.reset){var e=userinfo.passchange+86400*passRequirements.reset-Math.floor(Date.now()/1e3);e<0?QH("p2nextPasswordUpdateTime"," - Reset při příštím přihlášení."):e<3600?QH("p2nextPasswordUpdateTime",format(" - Reset v {0} minut{1}.",Math.floor(e/60),addLetterS(Math.floor(e/60)))):e<86400?QH("p2nextPasswordUpdateTime",format(" - Reset v {0} hodin{1}.",Math.floor(e/3600),addLetterS(Math.floor(e/3600)))):QH("p2nextPasswordUpdateTime",format(" - Reset v {0} den{1}."),Math.floor(e/86400),addLetterS(Math.floor(e/86400)))}}function addLetterS(e){return 1<e?"s":""}function setSessionActivity(){sessionActivity=Date.now()}function checkIdleSessionTimeout(){Date.now()-sessionActivity>serverinfo.timeout&&(window.location.href="logout")}function onMessage(e,t){switch(t.action){case"serverinfo":(serverinfo=t.serverinfo).timeout&&(setInterval(checkIdleSessionTimeout,1e4),checkIdleSessionTimeout()),QV("p3AccountActions",0==(4&features)&&0==serverinfo.domainauth),QV("logoutMenuOption",0==(4&features)&&0==serverinfo.domainauth);break;case"authcookie":authCookie=t.cookie,authRelayCookie=t.rcookie;break;case"userinfo":userinfo=t.userinfo,QH("p3userName",userinfo.name),updateSelf();break;case"users":for(var o in users={},t.users)users[t.users[o]._id]=t.users[o];updateUsers();break;case"wssessioncount":wssessions=t.wssessions,updateUsers();break;case"meshes":for(var o in meshes={},t.meshes)meshes[t.meshes[o]._id]=t.meshes[o];updateMeshes(),updateDevices();break;case"files":filetree=setupBackPointers(t.filetree),updateFiles();break;case"nodes":for(var o in nodes=[],t.nodes)for(var n in t.nodes[o])meshes[o]?(t.nodes[o][n].namel=t.nodes[o][n].name.toLowerCase(),t.nodes[o][n].rname?t.nodes[o][n].rnamel=t.nodes[o][n].rname.toLowerCase():t.nodes[o][n].rnamel=t.nodes[o][n].namel,t.nodes[o][n].meshnamel=meshes[o].name.toLowerCase(),t.nodes[o][n].meshid=o,t.nodes[o][n].state=t.nodes[o][n].state?t.nodes[o][n].state:0,t.nodes[o][n].desc=t.nodes[o][n].desc,t.nodes[o][n].icon||(t.nodes[o][n].icon=1),t.nodes[o][n].ident=++nodeShortIdent,nodes.push(t.nodes[o][n])):console.log("Invalid mesh (1): "+o);updateDevices(),0==xxcurrentView&&go(parseInt("{{viewmode}}")),gotoDevice("{{currentNode}}",parseInt("{{viewmode}}"));break;case"powertimeline":if(t.nodeid!=powerTimelineReq)break;powerTimelineNode=t.nodeid,powerTimeline=t.timeline,powerTimelineUpdate=Date.now()+3e5,currentNode._id==t.nodeid&&drawDeviceTimeline();break;case"otpauth-request":if(2==xxdialogMode&&"otpauth-request"==xxdialogTag){var a=t.secret;52==a.length?a=a.split(/(.............)/).filter(Boolean).join(" "):32==a.length&&(a=(a=a.split(/(....)/).filter(Boolean).join(" ")).substring(0,20)+"<br/>"+a.substring(20)),QH("d2optinfo",'Nainstalujte si <a href="https://play.google.com/store/apps/details?id=com.google.android.apps.authenticator2" rel="noreferrer noopener" target=_blank>Google Authenticator</a> nebo kompatibilní aplikaci, použijte <a href="\' + message.url + \'" rel="noreferrer noopener" target=_blank> tento odkaz</a> nebo vložte secret. Pak vložte aktuální 6 číselný token pro aktivaci 2-faktorového přihlašování.<br /><br /><div style=width:100%;text-align:center><tt id=d2optsecret secret="'+t.secret+'" style=font-size:15px>'+a+'</tt><br /><br />Token: <input type=text onkeypress="return (event.keyCode == 8) || (event.charCode >= 48 && event.charCode <= 57)" onkeyup=account_addOtpCheck(event) onkeydown=account_addOtpCheck() maxlength=6 id=d2otpauthinput type=text></div>'),QV("idx_dlgOkButton",!0),QE("idx_dlgOkButton",!1),Q("d2otpauthinput").focus()}break;case"otpauth-setup":if(xxdialogMode)return;setDialogMode(2,"Aplikace pro autentizaci",1,null,t.success?"<b style=color:green>2-faktorová autentizace zapnuta</b>. Je třeba platný token k přihlášení.":"<b style=color:red>2-faktorové přihlášení selhalo</b>. Je třeba smazat tajemství z aplikace a zkusit znovu. Na toto máte již jen pár minut.");break;case"otpauth-clear":if(xxdialogMode)return;setDialogMode(2,"Aplikace pro autentizaci",1,null,t.success?"<b style=color:green>2-faktorové přihlášení odstraněno</b>. Lze znovu kdykoliv zapnout.":"<b style=color:red>Odstranění 2-faktorového přihlášení selhalo</b>. Zkuste znovu.");break;case"otpauth-getpasswords":if(xxdialogMode)return;var i="Jednorázové tokeny lze použít jako sekundární autentizaci. Vytvořte sadu, vytiskněte je a uložte na bezpečném místě.";if(i+="<div style='border-radius:6px;border: 2px dashed #888;width:100%;margin-top:8px'><div style='padding:8px;font-family:Arial, Helvetica, sans-serif;font-size:20px;font-weight:bold'><table style=width:100%;text-align:center>",t.passwords){var s=0;for(var l in t.passwords){++s%2&&(i+="<tr>");for(var r=""+t.passwords[l].p;r.length<8;)r="0"+r;!0===t.passwords[l].u?i+="<td>"+r.substring(0,4)+"&nbsp;"+r.substring(4):i+="<td><strike style=color:#BBB>"+r.substring(0,4)+"&nbsp;"+r.substring(4)}}else i+="<tr><td>Žádné aktivní tokeny";i+="</table></div></div><br />",i+="<div><input type=button value='Zavřít' onclick=setDialogMode(0) style=float:right></input>",i+="<input type=button value='Nové tokeny' onclick='account_manageOtp(1);'></input>",null!=t.passwords&&(i+="<input type=button value='Vymazat' onclick='account_manageOtp(2);'></input>"),setDialogMode(2,"Spravovat záložní kódy",8,null,i+="</div><br />","otpauth-manage");break;case"event":if(t.event.noact)break;switch(t.event.action){case"userWebState":if(null!=localStorage){var d=JSON.parse(t.event.state);for(var l in d)localStorage.setItem(l,d[l]);null!=d.loctag&&d.loctag!=oldLoctag&&(null!=d.loctag?args.locale=d.loctag:delete args.locale,updateDevices(),updateMeshes())}break;case"accountchange":if(userinfo.name==t.event.account.name){var p=t.event.account.siteadmin?t.event.account.siteadmin:0,u=userinfo.siteadmin?userinfo.siteadmin:0;(t.event.account.quota!=userinfo.quota||0==(8&userinfo.siteadmin)&&0!=(8&t.event.account.siteadmin))&&meshserver.send({action:"files"}),userinfo=t.event.account,u!=p&&updateSiteAdmin(),updateSelf()}break;case"createmesh":null!=t.event.links[userinfo._id]&&(meshes[t.event.meshid]={_id:t.event.meshid,name:t.event.name,mtype:t.event.mtype,desc:t.event.desc,links:t.event.links},updateMeshes(),updateDevices(),meshserver.send({action:"files"}));break;case"meshchange":if(null==meshes[t.event.meshid])meshes[t.event.meshid]={_id:t.event.meshid,name:t.event.name,mtype:t.event.mtype,desc:t.event.desc,links:t.event.links},meshserver.send({action:"nodes"});else{if(meshes[t.event.meshid].name!=t.event.name)for(var l in meshes[t.event.meshid].name=t.event.name,nodes)nodes[l].meshid==t.event.meshid&&(nodes[l].meshnamel=t.event.name.toLowerCase());if(meshes[t.event.meshid].desc=t.event.desc,meshes[t.event.meshid].links=t.event.links,null==meshes[t.event.meshid].links[userinfo._id]){20==xxcurrentView&&currentMesh==meshes[t.event.meshid]&&go(2),delete meshes[t.event.meshid];var c=[];for(var l in nodes)nodes[l].meshid!=t.event.meshid&&c.push(nodes[l]);nodes=c,10<=xxcurrentView&&xxcurrentView<20&&currentNode&&currentNode.meshid==t.event.meshid&&(setDialogMode(0),go(2))}}updateMeshes(),updateDevices(),meshserver.send({action:"files"}),20==xxcurrentView&&currentMesh._id==t.event.meshid&&p20updateMesh();break;case"deletemesh":meshes[t.event.meshid]&&(delete meshes[t.event.meshid],updateMeshes(),meshserver.send({action:"files"}));c=[];for(var l in nodes)nodes[l].meshid!=t.event.meshid&&c.push(nodes[l]);nodes=c,updateDevices(),20<=xxcurrentView&&xxcurrentView<30&&currentMesh._id==t.event.meshid&&(setDialogMode(0),go(2)),10<=xxcurrentView&&xxcurrentView<20&&currentNode&&currentNode.meshid==t.event.meshid&&(setDialogMode(0),go(2));break;case"addnode":var m=t.event.node;if(!meshes[m.meshid])break;if(null!=getNodeFromId(m._id))break;m.namel=m.name.toLowerCase(),m.rname?m.rnamel=m.rname.toLowerCase():m.rnamel=m.namel,m.meshnamel=meshes[m.meshid].name.toLowerCase(),m.state=0,m.icon||(m.icon=1),m.ident=++nodeShortIdent,nodes.push(m),updateDevices();break;case"removenode":var v=-1;for(var l in nodes)if(nodes[l]._id==t.event.nodeid){v=l;break}if(-1!=v){m=nodes[v];currentNode==m&&(10<=xxcurrentView&&xxcurrentView<20&&(setDialogMode(0),go(2)),currentNode=null),nodes.splice(v,1),updateDevices()}break;case"changenode":v=-1;for(var l in nodes)if(nodes[l]._id==t.event.nodeid){v=l;break}if(-1!=v)(m=nodes[v]).name=t.event.node.name,m.rname=t.event.node.rname,m.host=t.event.node.host,m.desc=t.event.node.desc,m.publicip=t.event.node.publicip,m.iploc=t.event.node.iploc,m.wifiloc=t.event.node.wifiloc,m.gpsloc=t.event.node.gpsloc,m.tags=t.event.node.tags,m.userloc=t.event.node.userloc,null!=t.event.node.agent&&(null==m.agent&&(m.agent={}),null!=t.event.node.agent.ver&&(m.agent.ver=t.event.node.agent.ver),null!=t.event.node.agent.id&&(m.agent.id=t.event.node.agent.id),null!=t.event.node.agent.caps&&(m.agent.caps=t.event.node.agent.caps),null!=t.event.node.agent.core?m.agent.core=t.event.node.agent.core:m.agent.core&&delete m.agent.core,m.agent.tag=t.event.node.agent.tag),null!=t.event.node.intelamt&&(null==m.intelamt&&(m.intelamt={}),null!=t.event.node.intelamt.state&&(m.intelamt.state=t.event.node.intelamt.state),null!=t.event.node.intelamt.host&&(m.intelamt.user=t.event.node.intelamt.host),null!=t.event.node.intelamt.user&&(m.intelamt.user=t.event.node.intelamt.user),null!=t.event.node.intelamt.tls&&(m.intelamt.tls=t.event.node.intelamt.tls),null!=t.event.node.intelamt.ver&&(m.intelamt.ver=t.event.node.intelamt.ver),null!=t.event.node.intelamt.tag&&(m.intelamt.tag=t.event.node.intelamt.tag),null!=t.event.node.intelamt.uuid&&(m.intelamt.uuid=t.event.node.intelamt.uuid),null!=t.event.node.intelamt.realm&&(m.intelamt.realm=t.event.node.intelamt.realm)),m.namel=m.name.toLowerCase(),m.rname?m.rnamel=m.rname.toLowerCase():m.rnamel=m.namel,t.event.node.icon&&(m.icon=t.event.node.icon),refreshDevice(m._id),updateDevices();break;case"nodemeshchange":v=-1;for(var l in nodes)if(nodes[l]._id==t.event.nodeid){v=l;break}if(-1!=v){m=nodes[v];null==meshes[t.event.newMeshId]?(currentNode==m&&(10<=xxcurrentView&&xxcurrentView<20&&(setDialogMode(0),go(2)),currentNode=null),nodes.splice(v,1)):(m.meshid=t.event.newMeshId,m.meshnamel=meshes[t.event.newMeshId].name.toLowerCase()),updateDevices(),refreshDevice(t.event.nodeid)}else{m=t.event.node;if(!meshes[m.meshid])break;m.namel=m.name.toLowerCase(),m.rname?m.rnamel=m.rname.toLowerCase():m.rnamel=m.namel,m.meshnamel=meshes[m.meshid].name.toLowerCase(),m.state=0,m.icon||(m.icon=1),m.ident=++nodeShortIdent,nodes.push(m),updateDevices()}break;case"nodeconnect":v=-1;for(var l in nodes)if(nodes[l]._id==t.event.nodeid){v=l;break}if(-1!=v)(m=nodes[v]).conn=t.event.conn,m.pwr=t.event.pwr,updateDevices();break;case"login":null!=users&&users["user/"+domain+"/"+t.event.username.toLowerCase()]&&(users["user/"+domain+"/"+t.event.username.toLowerCase()].login=t.event.time)}}}function topMenu(e){null!=xxdialogMode&&0!=xxdialogMode&&999!=xxdialogMode||(void 0===e?1==("none"==QS("topMenu").display)?0!=xxdialogMode&&null!=xxdialogMode||(QV("topMenu",!0),xxdialogMode=999):(QV("topMenu",!1),xxdialogMode=0):(QV("topMenu",!1),xxdialogMode=0,1==e&&3!=xxcurrentView&&goForward("account"),2==e&&5!=xxcurrentView&&goForward("files")))}var filetreelinkpath,backStack=[];function goBack(){xxdialogMode||(0<backStack.length&&backStack.pop(),goStack())}function goForward(e){xxdialogMode||(backStack.push(e),goStack())}function goStack(){if(0!=backStack.length){var e=backStack[backStack.length-1],t=e.split("/")[0];"node"==t&&(setupDeviceMenu(0),gotoDevice(e)),"mesh"==t&&gotoMesh(e),"account"==t&&go(3),"devices"==t&&go(2),"files"==t&&go(5)}else go(2)}function updateFooterMenu(e){for(;null!=e&&e.length<3;)e.push({n:""});var t="",o="";if(null!=e)for(var n in e)t+='<td style="cursor:pointer'+(""==o?"":";border-left:solid 1px white")+'" onclick="'+e[n].f+'">'+e[n].n,o=e[n].n;QH("footerMenu","<tr>"+t)}function account_manageAuthApp(){xxdialogMode||0==(4096&features)||(1==userinfo.otpsecret?account_removeOtp():account_addOtp())}function account_addOtp(){xxdialogMode||1==userinfo.otpsecret||0==(4096&features)||(setDialogMode(2,"Aplikace pro autentizaci",2,function(){meshserver.send({action:"otpauth-setup",secret:Q("d2optsecret").attributes.secret.value,token:Q("d2otpauthinput").value})},"<div id=d2optinfo>Nahrávání...</div>","otpauth-request"),meshserver.send({action:"otpauth-request"}))}function account_addOtpCheck(e){var t=6==Q("d2otpauthinput").value.length;QE("idx_dlgOkButton",t),e&&13==e.keyCode&&t&&dialogclose(1)}function account_removeOtp(){xxdialogMode||1!=userinfo.otpsecret||0==(4096&features)||setDialogMode(2,"Aplikace pro autentizaci",3,function(){meshserver.send({action:"otpauth-clear"})},"Potvrdit odstranění autentizační aplikace pro 2-faktorové přihlašování?")}function account_manageOtp(e){2==xxdialogMode&&"otpauth-manage"==xxdialogTag&&dialogclose(0),xxdialogMode||1!=userinfo.otpsecret||0==(4096&features)||meshserver.send({action:"otpauth-getpasswords",subaction:e})}function account_showVerifyEmail(){xxdialogMode||1==userinfo.emailVerified||1!=serverinfo.emailcheck||setDialogMode(2,"Ověření emailu",3,account_showVerifyEmailEx,"Klikni na OK pro zaslání verifikačního emailu na:<br /><div style=padding:8px><b>"+EscapeHtml(userinfo.email)+"</b></div>Prosím počkejte pár minut než dojde k verifikaci.")}function account_showVerifyEmailEx(){meshserver.send({action:"verifyemail",email:userinfo.email})}function account_showChangeEmail(){xxdialogMode||(setDialogMode(2,"Změna emailové adresy",3,account_changeEmail,addHtmlValue("Email","<input id=dp3email style=width:170px maxlength=256 onchange=account_validateEmail() onkeyup=account_validateEmail(event) />")),null!=userinfo.email&&(Q("dp3email").value=userinfo.email),account_validateEmail(),Q("dp3email").focus())}function account_validateEmail(e,t){QE("idx_dlgOkButton",validateEmail(Q("dp3email").value)&&Q("dp3email").value!=userinfo.email),null!=e&&13==e.keyCode&&dialogclose(1)}function account_changeEmail(){meshserver.send({action:"changeemail",email:Q("dp3email").value})}function account_showDeleteAccount(){if(!xxdialogMode){var e="<form method=post><table style=margin-left:10px><input type=hidden name=action value=deleteaccount /><input type=hidden name=authcookie value="+authCookie+" /><tr>";e+="<td align=right>Heslo:</td><td><input id=apassword1 type=password name=apassword1 autocomplete=off onchange=account_validateDeleteAccount() onkeyup=account_validateDeleteAccount() /></td>",e+="</tr><tr><td align=right>Heslo:</td><td><input id=apassword2 type=password name=apassword2 autocomplete=off onchange=account_validateDeleteAccount() onkeyup=account_validateDeleteAccount() /></td>",e+="</tr></table><div style=padding:10px;margin-bottom:4px>",e+='<input id=account_dlgCancelButton type=button value="Zrušit" style=float:right;width:80px;margin-left:5px onclick=dialogclose(0)>',e+='<input id=account_dlgOkButton type=submit value="OK" style="float:right;width:80px" onclick=dialogclose(1)>',setDialogMode(2,"Smazat účet",0,null,e+="</div><br /></form>"),account_validateDeleteAccount(),Q("apassword1").focus()}}function account_showChangePassword(){if(xxdialogMode)return!1;var e="<table style=margin-left:10px>";if(e+="<tr><td align=right>"+nobreak("Staré heslo:")+"</td><td><input id=apassword0 type=password name=apassword0 autocomplete=off onchange=account_validateNewPassword() onkeyup=account_validateNewPassword() onkeydown=account_validateNewPassword() /> <b></b></td></tr>",e+="<tr><td align=right>"+nobreak("Nové heslo:")+"</td><td><input id=apassword1 type=password name=apassword1 autocomplete=off onchange=account_validateNewPassword() onkeyup=account_validateNewPassword() onkeydown=account_validateNewPassword() /> <b><span id=dxPassWarn></span></b></td></tr>",e+="<tr><td align=right>"+nobreak("Nové heslo:")+"</td><td><input id=apassword2 type=password name=apassword2 autocomplete=off onchange=account_validateNewPassword() onkeyup=account_validateNewPassword() onkeydown=account_validateNewPassword() /></td></tr>",65536&features&&(e+="<tr><td align=right>Nápověda k heslu:</td><td><input id=apasswordhint name=apasswordhint maxlength=250 type=text autocomplete=off onchange=account_validateNewPassword() onkeyup=account_validateNewPassword() onkeydown=account_validateNewPassword() /></td></tr>"),e+="</table>",passRequirements){var t=[],o=0;for(var n in passRequirements)"reset"!=n&&"hint"!=n&&(t.push(n+":"+passRequirements[n]),o++);0<o&&(e+="<br /><span style=font-size:x-small>"+format("Požadavky: {0}.",t.join(", "))+"</span>")}return setDialogMode(2,"Změnit heslo",3,account_showChangePasswordEx,e+="<br />"),Q("apassword0").focus(),account_validateNewPassword(),!1}function account_showChangePasswordEx(){if(Q("apassword1").value==Q("apassword2").value){var e={action:"changepassword",oldpass:Q("apassword0").value,newpass:Q("apassword1").value};65536&features&&(e.hint=Q("apasswordhint").value),meshserver.send(e)}}function account_createMesh(){if(!xxdialogMode)if(4294967295==userinfo.siteadmin||0==(64&userinfo.siteadmin))if(!0===userinfo.emailVerified||1!=serverinfo.emailcheck||4294967295==userinfo.siteadmin)if(!(262144&features)||1==userinfo.otpsecret||0<userinfo.otphkeys||0<userinfo.otpkeys){var e=addHtmlValue("Jméno","<input id=dp3meshname style=width:170px maxlength=64 onchange=account_validateMeshCreate() onkeyup=account_validateMeshCreate() />");e+=addHtmlValue("Typ","<div style=width:170px;margin:0;padding:0><select id=dp3meshtype style=width:100% onchange=account_validateMeshCreate() ><option value=2>Skupina Software Agent</option><option value=1>Intel&reg; AMT pouze</option></select></div>"),setDialogMode(2,"Vytvořit skupinu zařízení",3,account_createMeshEx,e+=addHtmlValue("Popis","<div style=width:170px;margin:0;padding:0><textarea id=dp3meshdesc maxlength=1024 style=width:100%;resize:none></textarea></div>")),account_validateMeshCreate(),Q("dp3meshname").focus()}else setDialogMode(2,"Nastavení bezpečnosti",1,null,'Nelze získat přístup k zařízení, dokud je 2-faktorová autentizace zapnuta. Toto je pro extra bezpečnost. Jdi do "Můj účet" a podívej se do sekce"Nastavení bezpečnosti".');else setDialogMode(2,"Nastavení bezpečnosti",1,null,'Nelze získat přístup k zařízení, dokud nebude ověřena e-mailová adresa. To je vyžadováno pro obnovení hesla. Jdi do "Můj účet" pro změnu a ověření emailu..');else setDialogMode(2,"Nová skupina zařízení",1,null,"Tento účet nemá práva k vytvoření nové skupiny zařízení.")}function account_validateMeshCreate(){QE("idx_dlgOkButton",0<Q("dp3meshname").value.length)}function account_createMeshEx(e,t){meshserver.send({action:"createmesh",meshname:Q("dp3meshname").value,meshtype:Q("dp3meshtype").value,desc:Q("dp3meshdesc").value})}function account_validateDeleteAccount(){QE("account_dlgOkButton",0<Q("apassword1").value.length&&Q("apassword1").value==Q("apassword2").value)}function account_validateNewPassword(){var e="",t=0<Q("apassword0").value.length&&0<Q("apassword1").value.length&&Q("apassword1").value==Q("apassword2").value&&Q("apassword0").value!=Q("apassword1").value;if(65536&features&&Q("apasswordhint").value==Q("apassword1").value&&(t=!1),""!=Q("apassword1").value)if(null==passRequirements||""==passRequirements){var o=checkPasswordStrength(Q("apassword1").value);e=80<=o?"<span style=color:green>Strong<span>":60<=o?"<span style=color:blue>&#9679;<span>":"<span style=color:red>&#9679;<span>"}else{0==checkPasswordRequirements(Q("apassword1").value,passRequirements)&&(t=!1,e="<span style=color:red>Politika<span>")}QH("dxPassWarn",e),QE("idx_dlgOkButton",t)}function checkPasswordStrength(e){var t=0,o={},n=0,a={digits:/\d/.test(e),lower:/[a-z]/.test(e),upper:/[A-Z]/.test(e),nonWords:/\W/.test(e)};if(!e)return 0;for(var i=0;i<e.length;i++)o[e[i]]=(o[e[i]]||0)+1,t+=5/o[e[i]];for(var s in a)n+=1==a[s]?1:0;return parseInt(t+10*(n-1))}function checkPasswordRequirements(e,t){if(null==t||""==t||"object"!=typeof t)return!0;if(t.min&&e.length<t.min)return!1;if(t.max&&e.length>t.max)return!1;for(var o=0,n=0,a=0,i=0,s=0;s<e.length;s++)/\d/.test(e[s])&&o++,/[a-z]/.test(e[s])&&n++,/[A-Z]/.test(e[s])&&a++,/\W/.test(e[s])&&i++;return!(t.num&&o<t.num)&&(!(t.lower&&n<t.lower)&&(!(t.upper&&a<t.upper)&&!(t.nonalpha&&i<t.nonalpha)))}function updateMeshes(){var e="",t=0;for(i in meshes){t++;var o=meshes[i].links[userinfo._id].rights,n="Částečné práva";4294967295==o?n="Hlavní administrátor":0==o&&(n="Žádná práva"),e+="<div style=cursor:pointer onclick=goForward('"+i+"')>",e+='<div style="float:left;margin-left:4px"><img src="/images/meshicon50.png" width=50 height=50 /></div>',e+='<div style="width:auto;height:40px;background-color:lightgray;margin-top:5px;margin-bottom:5px;margin-left:60px;padding-top:5px;padding-bottom:5px;border-radius:8px 0px 0px 8px">',e+="<div><div style=padding-left:12px;padding-top:2px><b>"+EscapeHtml(meshes[i].name)+"</b></div><div style=padding-left:12px;padding-top:3px;color:gray>"+n+"</div></div>",e+="</div></div>"}QH("p3meshes",e),QV("p3noMeshFound",0==t)}function gotoMesh(e){null==(currentMesh=meshes[e])&&goBack(),p20updateMesh(),go(20)}var sortorder,filetreelocation=[];function p5refreshFiles(){meshserver.send({action:"files"})}function updateFiles(){if(QV("MainMenuMyFiles",0==(8&features)),0==(8&features)){for(var e,t="",o="",n="<a style=cursor:pointer onclick=p5folderup(0)>Root</a>",a="Root",i=filetree,s=1,l=[],r=filetreelinkpath,d=[],p=document.getElementsByName("fc"),u=0;u<p.length;u++)p[u].checked&&d.push(p[u].value);for(var u in filetreelinkpath="",filetreelocation){if(null==i.f||null==i.f[filetreelocation[u]])break;if(l.push(filetreelocation[u]),a+=" / "+filetreelocation[u],1==s){var c=filetreelocation[u].split("/");e=window.location+c[0]+"files/"+c[2],filetreelinkpath+=filetreelocation[u]}else""!=filetreelinkpath&&(filetreelinkpath+="/"+filetreelocation[u],2<s&&(e+="/"+filetreelocation[u]));n+=" / <a style=cursor:pointer onclick=p5folderup("+s+")>"+(null!=(i=i.f[filetreelocation[u]]).n?i.n:filetreelocation[u])+"</a>",s++}filetreelocation=l;var m=a.toLowerCase().startsWith("root / "+userinfo._id+" / public"),v=p5sort_files(i.f);for(var u in v){var h,f=v[u],g=f.n;h=40<(h=g).length?EscapeHtml(g.substring(0,40))+"...":EscapeHtml(g),g=EscapeHtml(g);var k="";null!=f.s&&(k=getFileSizeStr(f.s));var y="";if(f.t<3||4==f.t){y="<div class=filelist file=999><input file=999 style=float:left name=fc class=fcb type=checkbox onchange=p5setActions() value='"+g+"'>&nbsp;<span style=float:right;padding-right:4px>"+(1==f.t||4==f.t?p5getQuotabar(f):"")+"</span><span><div class=fileIcon"+f.t+'></div><a style=cursor:pointer onclick=p5folderset("'+encodeURIComponent(f.nx)+'")>'+h+"</a></span></div>"}else{var b=h,x="";m&&(x=" (<a style=cursor:pointer onclick='p5showPublicLink(\""+e+"/"+f.nx+"\")'>Odkaz</a>)"),0<f.s&&(b='<a rel="noreferrer noopener" target="_blank" href="downloadfile.ashx?link='+encodeURIComponent(filetreelinkpath+"/"+f.nx)+'">'+h+"</a>"+x),y="<div class=filelist file=3><input file=3 style=float:left name=fc class=fcb type=checkbox onchange=p5setActions() value='"+f.nx+"'>&nbsp;<span style=float:right;padding-right:4px>"+k+"</span><span><div class=fileIcon"+f.t+"></div>"+b+"</span></div>"}f.t<3?t+=y:o+=y}if(QH("p5rightOfButtons",p5getQuotabar(i)),QH("p5files",t+o),QH("p5currentpath",n),QE("p5FolderUp",0!=filetreelocation.length),QV("p5PublicShare",m),r==filetreelinkpath){p=document.getElementsByName("fc");for(u=0;u<p.length;u++)p[u].checked=0<=d.indexOf(p[u].value)}p5setActions()}}function getNiceSize(e){return e<=0?"Uložiště plné":e<2048?format("{0}b zbývá",e):e<2097152?format("{0}k zbývá",Math.round(e/1024)):e<2147483648?format("{0}m zbývá",Math.round(e/1024/1024)):format("{0}g zbývá",Math.round(e/1024/1024/1024))}function p5getQuotabar(e){for(;1<e.t&&4!=e.t;)e=e.parent;return 1!=e.t&&4!=e.t||null==e.maxbytes?"":getNiceSize(e.maxbytes-e.s)+" <progress style=height:10px;width:100px value="+e.s+" max="+e.maxbytes+" />"}function p5showPublicLink(e){setDialogMode(2,"Veřejný odkaz",1,null,'<input type=text style=width:100% value="'+e+'" readonly />')}function p5sort_filename(e,t){return e.ln>t.ln?1*sortorder:e.ln<t.ln?-1*sortorder:0}function p5sort_timestamp(e,t){return e.d>t.d?1*sortorder:e.d<t.d?-1*sortorder:0}function p5sort_bysize(e,t){return e.s==t.s?p5sort_filename(e,t):(e.s-t.s)*sortorder}function p5sort_files(e){var t=[],o=Q("p5sortdropdown").value;for(var n in e)e[n].nx=n,null==e[n].n&&(e[n].n=n),e[n].ln=e[n].n.toLowerCase(),t.push(e[n]);return sortorder=1,3<o&&(sortorder=-1,o-=3),1==o?t.sort(p5sort_filename):2==o?t.sort(p5sort_bysize):3==o&&t.sort(p5sort_timestamp),t}function p5setActions(){var e=getFileSelCount(),t=getFileCount(),o=getFileSelCount(!1);QE("p5DeleteFileButton",0<e&&0<filetreelocation.length),QE("p5NewFolderButton",0<filetreelocation.length),QE("p5UploadButton",0<filetreelocation.length),QE("p5RenameFileButton",1==e&&0<filetreelocation.length),QE("p5SelectAllButton",0<t),Q("p5SelectAllButton").value=0<e?"Nic":"Vše",QE("p5CutButton",0<o&&e==o),QE("p5CopyButton",0<o&&e==o),QE("p5PasteButton",null!=p5clipboard&&0<p5clipboard.length&&0<filetreelocation.length)}function getFileSelCount(e){for(var t=0,o=document.getElementsByName("fc"),n=0;n<o.length;n++)!o[n].checked||0==e&&"3"!=o[n].attributes.file.value||t++;return t}function getFileSelDirCount(){for(var e=0,t=document.getElementsByName("fc"),o=0;o<t.length;o++)t[o].checked&&"999"==t[o].attributes.file.value&&e++;return e}function getFileCount(){return document.getElementsByName("fc").length}function p5selectallfile(){for(var e=0==getFileSelCount(),t=document.getElementsByName("fc"),o=0;o<t.length;o++)t[o].checked=e;p5setActions()}function setupBackPointers(e){if(null!=e.f){var t=0,o=0;for(var n in e.f)setupBackPointers(e.f[n]),(e.f[n].parent=e).f[n].s&&(t+=e.f[n].s),e.f[n].c&&(o+=e.f[n].c),3==e.f[n].t&&o++;e.s=t,e.c=o}return e}function getFileSizeStr(e){return 1==e?"1 byte":format("{0} bytů",e)}function p5folderup(e){if(null==e)filetreelocation.pop();else for(;filetreelocation.length>e;)filetreelocation.pop();return updateFiles(),!1}function p5folderset(e){return filetreelocation.push(decodeURIComponent(e)),updateFiles(),!1}function p5createfolder(){setDialogMode(2,"Nový adresář",3,p5createfolderEx,"<input type=text id=p5renameinput maxlength=64 onkeyup=p5fileNameCheck(event) style=width:100% />"),focusTextBox("p5renameinput"),p5fileNameCheck()}function p5createfolderEx(){meshserver.send({action:"fileoperation",fileop:"createfolder",path:filetreelocation,newfolder:Q("p5renameinput").value})}function p5deletefile(){var e=getFileSelCount(),t=0<getFileSelDirCount()?"<br /><br /><label><input type=checkbox id=p5recdeleteinput>Rekurzivní mazání</label><br>":"<input type=checkbox id=p5recdeleteinput style='display:none'>";setDialogMode(2,"Smazat",3,p5deletefileEx,1<e?format("Smazat {0} vybrané prvky?",e)+t:"Smazat vybraný prvek?"+t)}function p5deletefileEx(){for(var e=[],t=document.getElementsByName("fc"),o=0;o<t.length;o++)t[o].checked&&e.push(t[o].value);meshserver.send({action:"fileoperation",fileop:"delete",path:filetreelocation,delfiles:e,rec:Q("p5recdeleteinput").checked})}function p5renamefile(){for(var e,t=document.getElementsByName("fc"),o=0;o<t.length;o++)t[o].checked&&(e=t[o].value);setDialogMode(2,"Přejmenovat",3,p5renamefileEx,'<input type=text id=p5renameinput maxlength=64 onkeyup=p5fileNameCheck(event) style=width:100% value="'+e+'" />',{action:"fileoperation",fileop:"rename",path:filetreelocation,oldname:e}),focusTextBox("p5renameinput"),p5fileNameCheck()}function p5renamefileEx(e,t){t.newname=Q("p5renameinput").value,meshserver.send(t)}function p5fileNameCheck(e){var t=isFilenameValid(Q("p5renameinput").value);QE("idx_dlgOkButton",t),1==t&&e&&13==e.keyCode&&dialogclose(1)}var isFilenameValid=function(){var t=/^[^\\/:\*\?"<>\|]+$/,o=/^\./,n=/^(nul|prn|con|lpt[0-9]|com[0-9])(\.|$)/i;return function(e){return t.test(e)&&!o.test(e)&&!n.test(e)&&"."!=e[0]}}();function p5uploadFile(){setDialogMode(2,"Nahrát soubor",3,p5uploadFileEx,'<form method=post enctype=multipart/form-data action=uploadfile.ashx target=fileUploadFrame><input type=text name=link style=display:none id=p5uploadpath value="'+encodeURIComponent(filetreelinkpath)+'" /><input type=file name=files id=p5uploadinput style=width:100% multiple=multiple onchange="updateUploadDialogOk(\'p5uploadinput\')" /><input type=hidden name=authCookie value='+authCookie+" /><input type=submit id=p5loginSubmit style=display:none /></form>"),updateUploadDialogOk("p5uploadinput")}function p5uploadFileEx(){Q("p5loginSubmit").click()}function updateUploadDialogOk(e){QE("idx_dlgOkButton",""!=Q(e).value)}var p5clipboard=null,p5clipboardFolder=null,p5clipboardCut=0;function p5copyFile(e){var t=document.getElementsByName("fc");p5clipboard=[],p5clipboardCut=e,p5clipboardFolder=Clone(filetreelocation);for(var o=0;o<t.length;o++)t[o].checked&&"3"==t[o].attributes.file.value&&p5clipboard.push(t[o].value);p5updateClipview()}function p5pasteFile(){var e="";null!=p5clipboard&&0<p5clipboard.length&&(e=format("Potvrdit {0} z {1} záznam{2} do tohoto umístění?",0==p5clipboardCut?"copy":"move",p5clipboard.length,1<p5clipboard.length?"s":"")),setDialogMode(2,"Vložit",3,p5pasteFileEx,e)}function p5pasteFileEx(){meshserver.send({action:"fileoperation",fileop:0==p5clipboardCut?"copy":"move",scpath:p5clipboardFolder,path:filetreelocation,names:p5clipboard}),p5folderup(999),1==p5clipboardCut&&(p5clipboardFolder=p5clipboard=null,p5clipboardCut=0,p5updateClipview())}function p5updateClipview(){var e="";null!=p5clipboard&&0<p5clipboard.length&&(e=format("Držím {0} zaznamů{1} pro {2}",p5clipboard.length,1<p5clipboard.length?"s":"",0==p5clipboardCut?"kopírovat":"přesun")+', <a href=# onclick="return p5clearClip()" style=cursor:pointer>Vymazat</a>.'),QH("p5bottomstatus",e),p5setActions()}function p5clearClip(){return p5clipboardFolder=p5clipboard=null,p5clipboardCut=0,p5updateClipview(),!1}function p5fileDragDrop(e){if(haltEvent(e),QV("bigfail",!1),QV("bigok",!1),null!=e.dataTransfer&&0!=e.dataTransfer.files.length&&0!=filetreelocation.length)for(var t=[],o=[],n=[],a=[],i=e.dataTransfer.files.length,s=0;s<e.dataTransfer.files.length;s++){var l=new FileReader,r=e.dataTransfer.files[s];t.push(r.name),o.push(r.size),n.push(r.type),l.onload=function(e){a.push(e.target.result),0==--i&&(Q("p5fileDragName").value=t.join("*"),Q("p5fileDragSize").value=o.join("*"),Q("p5fileDragType").value=n.join("*"),Q("p5fileDragData").value=a.join("*"),Q("p5fileDragLink").value=encodeURIComponent(filetreelinkpath),Q("p5loginSubmit2").click())},l.readAsDataURL(r)}}var p5dragtimer=null;function p5fileDragOver(e){haltEvent(e),null!=p5dragtimer&&(clearTimeout(p5dragtimer),p5dragtimer=null);var t=!0;0==filetreelocation.length&&(t=!1),QV("bigok",t),QV("bigfail",!t)}function p5fileDragLeave(e){haltEvent(e),"p5filetable"!=e.target.id?(QV("bigfail",!1),QV("bigok",!1)):p5dragtimer=setTimeout("QV('bigfail',false);QV('bigok',false);p5dragtimer=null;",200)}function ondeskkeypress(e){if(toggleSoftKeys(0),Q("DeskSoftInput").value="",setSessionActivity(),desktop&&!xxdialogMode&&10==xxcurrentView){if(null!=currentNode){var t=meshes[currentNode.meshid].links[userinfo._id].rights;if(0==(4294967295==t||0!=(8&t)&&0==(256&t)))return!1;if(1==(4294967295!=t&&0!=(8&t)&&0==(256&t)&&0!=(4096&t))&&(1==e.altKey||1==e.ctrlKey||e.keyCode<32&&8!=e.keyCode&&13!=e.keyCode||90<e.keyCode))return!1}return desktop.m.handleKeys(e)}}function ondeskkeydown(e){if(toggleSoftKeys(0),Q("DeskSoftInput").value="",setSessionActivity(),desktop&&!xxdialogMode&&10==xxcurrentView){if(null!=currentNode){var t=meshes[currentNode.meshid].links[userinfo._id].rights;if(0==(4294967295==t||0!=(8&t)&&0==(256&t)))return!1;if(1==(4294967295!=t&&0!=(8&t)&&0==(256&t)&&0!=(4096&t))&&(1==e.altKey||1==e.ctrlKey||e.keyCode<32&&8!=e.keyCode&&13!=e.keyCode||90<e.keyCode))return!1}return desktop.m.handleKeyDown(e)}}function ondeskkeyup(e){if(toggleSoftKeys(0),Q("DeskSoftInput").value="",setSessionActivity(),desktop&&!xxdialogMode&&10==xxcurrentView){if(null!=currentNode){var t=meshes[currentNode.meshid].links[userinfo._id].rights;if(0==(4294967295==t||0!=(8&t)&&0==(256&t)))return!1;if(1==(4294967295!=t&&0!=(8&t)&&0==(256&t)&&0!=(4096&t))&&(1==e.altKey||1==e.ctrlKey||e.keyCode<32&&8!=e.keyCode&&13!=e.keyCode||90<e.keyCode))return!1}return desktop.m.handleKeyUp(e)}}var updateDevicesTimer=null;function updateDevices(){null==updateDevicesTimer&&(updateDevicesTimer=setTimeout(updateDevicesEx,200))}var deviceHeaderCount,sort=0,deviceHeaderId=0,deviceHeaders={},showRealNames=!1,deviceHeaderTotal=0,deviceHeadersTitles=(deviceHeaders={},{});function updateDevicesEx(){null!=updateDevicesTimer&&(clearTimeout(updateDevicesTimer),updateDevicesTimer=null);var e="",t=0,o=null,n=0,a={};for(var i in deviceHeaderCount={},deviceHeaders={},deviceHeadersTitles={},(deviceHeaderTotal=deviceHeaderId=0)==sort?nodes.sort(meshSort):1==sort?nodes.sort(powerSort):2==sort&&(1==showRealNames?nodes.sort(deviceHostSort):nodes.sort(deviceSort)),nodes)if(0!=nodes[i].v){var s=meshes[nodes[i].meshid].links[userinfo._id];if(null!=s){s.rights;if(0==sort){if(nodes.sort(meshSort),nodes[i].meshid!=o){deviceHeaderSet();var l="";1==meshes[nodes[i].meshid].mtype&&(l="<span style=color:lightgray>, Intel&reg; AMT pouze</span>"),null!=o&&(2==t&&(e+="<td><div style=width:301px></div></td>"),""!=e&&(e+="</tr></table>")),e+="<div class=DevSt style=padding-top:4px><span style=float:right>",e+='</span><span id=MxMESH style=cursor:pointer onclick=goForward("'+nodes[i].meshid+'")>'+EscapeHtml(meshes[nodes[i].meshid].name)+"</span>"+l+"<span id=DevxHeader"+deviceHeaderId+" style=color:lightgray></span></div>",a[o=nodes[i].meshid]=1,t=0}}else 1==sort?nodes[i].pwr!==o&&(deviceHeaderSet(),null!==o&&(2==t&&(e+="<td><div style=width:301px></div></td>"),""!=e&&(e+="</tr></table>")),e+="<div class=DevSt style=width:100%;padding-top:4px><span>"+PowerStateStr2(nodes[i].pwr)+"</span><span id=DevxHeader"+deviceHeaderId+" style=color:lightgray></span></div>",o=nodes[i].pwr,t=0):2==sort&&null==o&&(o="1");n++;var r=EscapeHtml(nodes[i].name);0==r.length&&(r="<i>Nic</i>"),null!=nodes[i].rname&&0<nodes[i].rname.length&&(r+=" / "+EscapeHtml(nodes[i].rname));var d=EscapeHtml(nodes[i].name);1==showRealNames&&null!=nodes[i].rname&&(d=EscapeHtml(nodes[i].rname)),0==d.length&&(d="<i>Nic</i>");var p=nodes[i].icon,u=NodeStateStr(nodes[i]);nodes[i].conn&&0!=nodes[i].conn||(p+=" gray"),e+="<div style=cursor:pointer onclick=goForward('"+nodes[i]._id+"')>",e+='<div class="i'+p+'" style="float:left;margin-left:4px"></div>',e+='<div style="width:auto;height:40px;background-color:lightgray;margin-top:5px;margin-bottom:5px;margin-left:60px;padding-top:5px;padding-bottom:5px;border-radius:8px 0px 0px 8px">',e+="<div><div style=padding-left:12px;padding-top:2px><b>"+d+"</b></div><div style=padding-left:12px;padding-top:3px;color:gray>"+u+"</div></div>",e+="</div></div>",deviceHeaderTotal++,void 0===deviceHeaderCount[nodes[i].state]?deviceHeaderCount[nodes[i].state]=1:deviceHeaderCount[nodes[i].state]++}}if(0==sort)for(var i in meshes){var c=meshes[i],m=c.links[userinfo._id];if(null!=m){m.rights;null==a[c._id]&&(""!=o&&""!=e&&(e+="</tr></table>"),e+="<div><div colspan=3 class=DevSt><span style=float:right>",e+='</span><span id=MxMESH style=cursor:pointer onclick=goForward("'+c._id+'")>'+EscapeHtml(c.name)+"</span></div>",1==c.mtype&&(e+="<div style=padding:10px><i>Žádné Intel&reg; AMT zařízení v této skupině"),2==c.mtype&&(e+="<div style=padding:10px><i>Žádné zařízení v této skupině"),e+=".</i></div></div>",o=c._id,n++)}}for(var i in 0==n?QH("xdevices",'<div style="margin-top:50px;text-align:center"><span style="font-size:30px">Žádné zařízení</span><br /><br />Pro přidání zařízení použijte desktop verzi těchto stránek.</div>'):QH("xdevices",e),deviceHeaderSet(),deviceHeaders)QH(i,deviceHeaders[i]);for(var i in deviceHeadersTitles)Q(i).title=deviceHeadersTitles[i]}var powerStatetable=["","Zapnuto","Spánek","Spánek","Spánek","Hibernuji","Vypnout","Současnost"],powerStateStrings=["","Zapnuto","Spí","Spí","Hluboký spánek","Hibernuji","Soft-Off","Současnost"],powerStateStrings2=["","Zařízení je zapnuto","Zařízení je ve stavu spánku (S1)","Zařízení je ve stavu spánku (S2)","Zařízení je v hlubokém spánku (S3)","Zařízení je hibernováno (S4)","Zařízení je ve stavu soft-off (S5)","Zařízení je přítomno, ale nelze získat stav napájení"],powerColorTable=["#00000000","black","blue","blue","lightblue","blueviolet","darkgreen","lightseagreen","lightseagreen"];function NodeStateStr(e){var t=[];return 0<e.state&&e.state<powerStatetable.length&&state.push(powerStatetable[e.state]),e.conn&&(0!=(1&e.conn)&&t.push("<span>Agent</span>"),0!=(2&e.conn)?t.push("<span>CIRA</span>"):0!=(4&e.conn)&&t.push("<span>Intel&reg; AMT</span>"),0!=(8&e.conn)&&t.push("<span>Přesměrování</span>"),0!=(16&e.conn)&&t.push("<span>MQTT</span>")),null!=e.pwr&&0!=e.pwr&&t.push(powerStateStrings[e.pwr]),t.join(", ")}function PowerStateStr(e){return e<powerStatetable.length?powerStatetable[e]:""}function PowerStateStr2(e){return 0!=e&&e<powerStatetable.length?powerStatetable[e]:"Neznámý"}function onSortSelectChange(e){sort=document.getElementById("sortselect").selectedIndex,e||putstore("sort",sort),updateDevicesEx()}function deviceHeaderSet(){if(0!=deviceHeaderId){deviceHeaders["DevxHeader"+deviceHeaderId]=", "+deviceHeaderTotal+(1==deviceHeaderTotal?" nód":" nódy");var e="";for(var t in deviceHeaderCount)0<e.length&&(e+=", "),e+=deviceHeaderCount[t]+" "+PowerStateStr2(t);deviceHeadersTitles["DevxHeader"+deviceHeaderId]=e,deviceHeaderId++,deviceHeaderCount={},deviceHeaderTotal=0}else deviceHeaderId=1}function meshSort(e,t){return e.meshnamel>t.meshnamel?1:e.meshnamel<t.meshnamel?-1:e.meshid==t.meshid?1==showRealNames?e.rnamel>t.rnamel?1:e.rnamel<t.rnamel?-1:0:e.namel>t.namel?1:e.namel<t.namel?-1:0:0}function powerSort(e,t){var o=e.pwr?e.pwr:0,n=t.pwr?t.pwr:0;return o==n?1==showRealNames?e.rnamel>t.rnamel?1:e.rnamel<t.rnamel?-1:0:e.namel>t.namel?1:e.namel<t.namel?-1:0:n<o?1:o<n?-1:0}function deviceSort(e,t){return e.namel>t.namel?1:e.namel<t.namel?-1:0}function deviceHostSort(e,t){return e.rnamel>t.rnamel?1:e.rnamel<t.rnamel?-1:0}function refreshDevice(e){currentNode&&currentNode._id==e&&gotoDevice(e,xxcurrentView,!0)}function getNodeRights(e){var t=getNodeFromId(e);return meshes[t.meshid].links[userinfo._id].rights}var currentNode,currentDevicePanel=0,powerTimelineNode=null,powerTimelineReq=null,powerTimelineUpdate=null,powerTimeline=null;function getCurrentNode(){return currentNode}function gotoDevice(e,t,o){if(!0===userinfo.emailVerified||1!=serverinfo.emailcheck||4294967295==userinfo.siteadmin)if(!(262144&features)||1==userinfo.otpsecret||0<userinfo.otphkeys||0<userinfo.otpkeys){var n=getNodeFromId(e);if(null!=n){var a=meshes[n.meshid];if(null!=a){var i=a.links[userinfo._id].rights;if(!currentNode||currentNode._id!=n._id||1==o){currentNode=n;var s=EscapeHtml(n.name);0==s.length&&(s="<i>Nic</i>"),0!=(4&i)&&(s="<span onclick=showEditNodeValueDialog(0) style=cursor:pointer>"+s+"</span>"),QH("p10deviceName",s);var l="<table style=width:100%>";l+=addDeviceAttribute("<span>Skupina</span>",'<a onclick=goForward("'+n.meshid+'") style=cursor:pointer>'+EscapeHtml(meshes[n.meshid].name)+"</a>"),null!=n.rname&&(l+=addDeviceAttribute("<span>Jméno</span>","<span>"+EscapeHtml(n.rname)+"</span>")),1!=a.mtype&&n.name==n.host||(0!=(4&i)?n.host?l+=addDeviceAttribute("Hostname","<span onclick=showEditNodeValueDialog(1) style=cursor:pointer>"+EscapeHtml(n.host)+"</span>"):l+=addDeviceAttribute("Hostname","<span onclick=showEditNodeValueDialog(1) style=cursor:pointer><i>Nic</i></span>"):l+=addDeviceAttribute("Hostname",EscapeHtml(n.host)));var r=n.desc?EscapeHtml(n.desc):"<i>Nic</i>";l+=addDeviceAttribute("Popis",0!=(4&i)?"<span onclick=showEditNodeValueDialog(2) style=cursor:pointer>"+r+"</span>":r);var d=["Neznámý","Windows 32bit konzole","Windows 64bit konzole","Windows 32bit služba","Windows 64bit služba","Linux 32bit","Linux 64bit","MIPS","XENx86","Android ARM","Linux ARM","MacOS 32bit","Android x86","PogoPlug ARM","Android APK","Linux Poky x86-32bit","MacOS 64bit","ChromeOS","Linux Poky x86-64bit","Linux NoKVM x86-32bit","Linux NoKVM x86-64bit","Windows MinCore konzole","Windows MinCore služba","NodeJS","ARM-Linaro","ARMv6l / ARMv7l","ARMv8 64bit","ARMv6l / ARMv7l / NoKVM","Neznámý","Neznámý","FreeBSD x86-64"];if(null!=n.agent&&null!=n.agent.id&&null!=n.agent.ver){var p="";p=n.agent.id<=d.length?d[n.agent.id]:d[0],0!=n.agent.ver&&(p+=" v"+n.agent.ver),l+=addDeviceAttribute("Agent",p)}if(null!=n.intelamt){p="";var u={0:nobreak("Neaktivováno (před)"),1:nobreak("Neaktivováno"),2:nobreak("Aktivováno")};null!=n.intelamt.ver&&null==n.intelamt.state?p+="<i>"+nobreak("Neznámý stav")+"</i>, v"+n.intelamt.ver:null==n.intelamt.ver&&2==n.intelamt.state?p+="<i>Aktivováno</i>":null==n.intelamt.ver||null==n.intelamt.state?p+="<i>Neznámý stav & verze</i>":(p+=u[n.intelamt.state],n.intelamt.flags&&(2&n.intelamt.flags?p=" <span>CCM</span>":4&n.intelamt.flags&&(p=" <span>ACM</span>")),p+=", v"+n.intelamt.ver),1==n.intelamt.tls&&(p+=", <span>TLS</span>"),2==n.intelamt.state&&(null!=n.intelamt.user&&""!=n.intelamt.user||(p+=0!=(4&i)?', <i style=color:#FF0000;cursor:pointer onclick=editDeviceAmtSettings("'+n._id+'")>'+nobreak("Žádné přihlašovací údaje")+"</i>":", <i style=color:#FF0000>Žádné přihlašovací údaje</i>"),p+=" ",0!=(4&i)&&(p+='<img src=images/link4.png height=10 width=10 style=cursor:pointer onclick=editDeviceAmtSettings("'+n._id+'")>'));var c="Intel&reg; ME";"number"==typeof n.intelamt.sku&&(0!=(8&n.intelamt.sku)?c="Intel&reg; AMT":0!=(16&n.intelamt.sku)&&(c="Intel&reg; SM")),l+=addDeviceAttribute(c,p)}if(null!=n.agent&&null!=n.agent.tag&&"mailto:"!=n.agent.tag){var m=EscapeHtml(n.agent.tag);m.startsWith("mailto:")&&(m='<a href="'+m+'">'+m.substring(7)+"</a>"),l+=addDeviceAttribute("Značka agenta",m)}var v=n.conn;if(v&&1<v){var h=[];0!=(1&n.conn)&&h.push("<span>Agent</span>"),0!=(2&n.conn)?h.push("<span>Intel&reg; AMT CIRA</span>"):0!=(4&n.conn)&&h.push("<span>Intel&reg; AMT</span>"),0!=(8&n.conn)&&h.push("<span>Agent Relay (přesměrování)</span>"),0!=(16&n.conn)&&h.push("<span>MQTT</span>"),l+=addDeviceAttribute("Konektivita",h.join(", "))}var f="<i>Nic</i>";if(null!=n.tags)for(var g in f="",n.tags)f+='<span style="background-color:lightgray;padding:3px;margin-right:4px;border-radius:5px">'+n.tags[g]+"</span>";l+=addDeviceAttribute("Tagy",0!=(4&i)?"<span onclick=showEditNodeValueDialog(3) style=cursor:pointer>"+f+"</span>":f),l+="</table><br />",0!=(76&i)&&(l+="<input type=button value=Actions onclick=deviceActionFunction() />"),QH("p10html",l),setupFiles(),l="<div style=float:right;font-size:x-small;margin-right:10px>",0!=(4&i)&&(l+='<a style=cursor:pointer onclick=p10showDeleteNodeDialog("'+n._id+'")>Smazat zařízení</a>'),l+="</div><div style=font-size:x-small>",l+="</div><br>",QH("p10html3",l);var k=PowerStateStr(n.state);0!=(1&v)&&(0<k.length&&(k+=", "),k+="<span style=font-size:10px>Mesh Agent</span>"),0!=(2&v)?(0<k.length&&(k+=", "),k+="<span style=font-size:10px>Intel&reg; AMT připojeno</span>"):0!=(4&v)&&(0<k.length&&(k+=", "),k+="<span style=font-size:10px>Intel&reg; AMT detekováno</span>"),0!=(16&v)&&(0<k.length&&(k+="<br/>"),k+="<span style=font-size:12px>MQTT kanál připojen</span>"),QH("MainComputerState",k),QH("MainComputerImage",'<div class="i'+n.icon+'"></div>'),powerTimelineNode!=currentNode._id&&powerTimelineReq!=currentNode._id&&(QH("p10html2",""),powerTimelineReq=currentNode._id,meshserver.send({action:"powertimeline",nodeid:currentNode._id}))}setupDesktop(),go(t=t||10),setupDeviceMenu()}else goBack()}else goBack()}else setDialogMode(2,"Nastavení bezpečnosti",1,null,'Nelze získat přístup k zařízení, dokud je 2-faktorová autentizace zapnuta. Toto je pro extra bezpečnost. Jdi do "Můj účet" a podívej se do sekce"Nastavení bezpečnosti".');else setDialogMode(2,"Nastavení bezpečnosti",1,null,'Nelze získat přístup k zařízení, dokud nebude ověřena e-mailová adresa. To je vyžadováno pro obnovení hesla. Jdi do "Můj účet" pro změnu a ověření emailu..')}function deviceToastFunction(){xxdialogMode||setDialogMode(2,"Device Toast",3,deviceToastFunctionEx,"<textarea id=d2devToast style=width:100%;height:80px;resize:none;overflow-y:scroll></textarea>")}function deviceToastFunctionEx(){meshserver.send({action:"toast",nodeids:[currentNode._id],title:"MeshCentral",msg:Q("d2devToast").value})}function setupDeviceMenu(e,t){var o=0;currentNode&&(o=meshes[currentNode.meshid].links[userinfo._id].rights),null!=e&&(currentDevicePanel=e),QV("p10general",0==currentDevicePanel),QV("p10desktop",1==currentDevicePanel),QV("p10files",2==currentDevicePanel);var n=[];0!=currentDevicePanel&&n.push({n:"General",f:"setupDeviceMenu(0)"}),1!=currentDevicePanel&&null!=currentNode&&(8&o||256&o)&&(1==meshes[currentNode.meshid].mtype&&("number"!=typeof currentNode.intelamt.sku||0!=(8&currentNode.intelamt.sku))||currentNode.agent&&1&currentNode.agent.caps)&&n.push({n:"Desktop",f:"setupDeviceMenu(1)"}),2!=currentDevicePanel&&null!=currentNode&&8&o&&(4294967295==o||0==(1024&o))&&2==currentNode.mtype&&4&currentNode.agent.caps&&n.push({n:"Files",f:"setupDeviceMenu(2)"}),updateFooterMenu(n)}function deviceActionFunction(){if(!xxdialogMode){var e=meshes[currentNode.meshid].links[userinfo._id].rights,t="Vyber operaci na tomto zařízení.<br /><br />",o="<select id=d2deviceop style=float:right;width:170px>";0!=(64&e)&&(o+="<option value=100>Probudit</option>"),0!=(8&e)&&(o+="<option value=4>Spánek</option><option value=3>Reset</option><option value=2>Vypnout</option>"),setDialogMode(2,"Akce zařízení",3,deviceActionFunctionEx,t+=addHtmlValue("Operace",o+="</select>"))}}function deviceActionFunctionEx(){var e=Q("d2deviceop").value;100==e?meshserver.send({action:"wakedevices",nodeids:[currentNode._id]}):meshserver.send({action:"poweraction",nodeids:[currentNode._id],actiontype:e})}function updateDeviceTimeline(){2==meshserver.State&&null!=powerTimelineNode&&null!=powerTimelineUpdate&&null!=currentNode&&powerTimelineNode==powerTimelineReq&&currentNode._id==powerTimelineNode&&powerTimelineUpdate<Date.now()&&(powerTimelineUpdate=null,meshserver.send({action:"powertimeline",nodeid:currentNode._id}))}function drawDeviceTimeline(){var e=null,t=Date.now();currentNode._id==powerTimelineNode&&(e=powerTimeline);var o=new Date;o.setHours(0,0,0,0);(o=new Date(o.getTime()-5184e5)).getTime();var n=[];if(null!=e&&1<e.length){n.push([0,e[1],e[0]]);for(var a=e[1],i=2;i<e.length;i+=2){var s=e[i],l=t;e.length>i+1&&(l=e[i+1]),n.push([a,a+l,s]),a+=l}}var r="",d=1,p=new Date,u=Q("masthead").offsetWidth-122;p.setHours(0,0,0,0);for(i=0;i<7;i++){var c="",m=p.getTime(),v=m+864e5;for(var h in n){var f=n[h];if(1==isTimeBlockInside(m,v,f[0],f[1])){var g=Math.max(m,f[0]),k=Math.min(Math.min(v,f[1]),t),y=Math.round((k-g)*u/864e5);0<y&&(c+="<div style=display:table-cell;width:"+y+"px;background-color:"+powerColor(f[2])+";height:16px></div>")}}r+="<tr style="+(d%2==0?"background-color:#DDD":"")+"><td><div>&nbsp;"+printDate(p)+"<div></div></div></td><td><div>"+c+"</div></td></tr>",++d,p=new Date(p.getTime()-864e5)}QH("p10html2",'<table style="color:black;background-color:#EEE;border-color:#AAA;border-width:1px;border-style:solid;border-collapse:collapse;width:calc(100% - 18px);margin:9px" border=0 cellpadding=2 cellspacing=0><tbody><tr style=background-color:#AAAAAA;font-weight:bold><th scope=col style=text-align:center;width:90px>Day</th><th scope=col style=text-align:center>Power State</th></tr>'+r+"</tbody></table>")}function powerColor(e){return e<powerColorTable.length?powerColorTable[e]:"yellow"}function isTimeBlockInside(e,t,o,n){return o<e&&t<n||(e<o&&o<t||e<n&&n<t)}function addDeviceAttribute(e,t){return"<tr><td style=width:100px;color:gray>"+e+"</td><td style=overflow:hidden>"+t+"</td></tr>"}function editDeviceAmtSettings(e,t){if(!xxdialogMode){var o="",n=getNodeFromId(e),a=3;0!=(4&getNodeRights(e))&&(o+=addHtmlValue("Uživatel",'<input id=dp10username style=width:170px maxlength=32 autocomplete=nope placeholder="admin" onchange=validateDeviceAmtSettings() onkeyup=validateDeviceAmtSettings() />'),o+=addHtmlValue("Heslo","<input id=dp10password type=password style=width:170px autocomplete=nope maxlength=32 onchange=validateDeviceAmtSettings() onkeyup=validateDeviceAmtSettings() />"),o+=addHtmlValue("Bezpečnost","<select id=dp10tls style=width:176px><option value=0>Žádné TLS</option><option value=1>TLS vyžadováno</option></select>"),null!=n.intelamt.user&&""!=n.intelamt.user&&(a=7),setDialogMode(2,"Upravit Intel&reg; AMT pověření",a,editDeviceAmtSettingsEx,o,{node:n,func:t}),null!=n.intelamt.user&&""!=n.intelamt.user?Q("dp10username").value=n.intelamt.user:Q("dp10username").value="admin",Q("dp10tls").value=n.intelamt.tls,validateDeviceAmtSettings())}}function validateDeviceAmtSettings(){QE("idx_dlgOkButton",passwordcheck(Q("dp10password").value))}function editDeviceAmtSettingsEx(e,t){if(2==e)meshserver.send({action:"changedevice",nodeid:t.node._id,intelamt:{user:"",pass:""}});else{var o=Q("dp10username").value;""==o&&(o="admin");var n=Q("dp10password").value;""==n&&(o=""),meshserver.send({action:"changedevice",nodeid:t.node._id,intelamt:{user:o,pass:n,tls:Q("dp10tls").value}}),t.node.intelamt.user=o,t.node.intelamt.tls=Q("dp10tls").value,t.func&&setTimeout(t.func,300)}}function p10showDeleteNodeDialog(e){xxdialogMode||(setDialogMode(2,"Smazat nod",3,p10showDeleteNodeDialogEx,format("Smazat {0}?",EscapeHtml(currentNode.name))+"<br /><br /><input id=p10check type=checkbox onchange=p10validateDeleteNodeDialog() />Potvrdit",e),p10validateDeleteNodeDialog())}function p10validateDeleteNodeDialog(){QE("idx_dlgOkButton",Q("p10check").checked)}function p10showDeleteNodeDialogEx(e,t){meshserver.send({action:"removedevices",nodeids:[t]})}function p10showiconselector(){if(!xxdialogMode&&0!=(4&meshes[currentNode.meshid].links[userinfo._id].rights)){"<div style=display:inline-block class=i1 onclick=p10setIcon(1)></div>","<div style=display:inline-block class=i2 onclick=p10setIcon(2)></div>","<div style=display:inline-block class=i3 onclick=p10setIcon(3)></div><br>","<div style=display:inline-block class=i4 onclick=p10setIcon(4)></div>","<div style=display:inline-block class=i5 onclick=p10setIcon(5)></div>","<div style=display:inline-block class=i6 onclick=p10setIcon(6)></div></table>",setDialogMode(2,"Výběr ikony",0,null,"<table align=center><td><div style=display:inline-block class=i1 onclick=p10setIcon(1)></div><div style=display:inline-block class=i2 onclick=p10setIcon(2)></div><div style=display:inline-block class=i3 onclick=p10setIcon(3)></div><br><div style=display:inline-block class=i4 onclick=p10setIcon(4)></div><div style=display:inline-block class=i5 onclick=p10setIcon(5)></div><div style=display:inline-block class=i6 onclick=p10setIcon(6)></div></table>"),QV("id_dialogclose",!0)}}function p10setIcon(e){setDialogMode(0),meshserver.send({action:"changedevice",nodeid:currentNode._id,icon:e})}var desktop,desktopNode,showEditNodeValueDialog_modes=["Název zařízení","Hostname","Popis","Tagy"],showEditNodeValueDialog_modes2=["name","host","desc","tags"],showEditNodeValueDialog_modes3=["","","","Skupina1, Skupina2, Skupina3"];function showEditNodeValueDialog(e){if(!xxdialogMode){setDialogMode(2,"Upravit zařízení",3,showEditNodeValueDialogEx,addHtmlValue(showEditNodeValueDialog_modes[e],'<input id=dp10devicevalue style=width:170px maxlength=64 placeholder="'+showEditNodeValueDialog_modes3[e]+'" onchange=p10editdevicevalueValidate('+e+",event) onkeyup=p10editdevicevalueValidate("+e+",event) />"),e);var t=currentNode[showEditNodeValueDialog_modes2[e]];null==t&&(t=""),Array.isArray(t)&&(t=t.join(", ")),Q("dp10devicevalue").value=t,p10editdevicevalueValidate(),Q("dp10devicevalue").focus()}}function showEditNodeValueDialogEx(e,t){var o={action:"changedevice",nodeid:currentNode._id};o[showEditNodeValueDialog_modes2[t]]=Q("dp10devicevalue").value,meshserver.send(o)}function p10editdevicevalueValidate(e,t){var o=1<e||0<Q("dp10devicevalue").value.length;QE("idx_dlgOkButton",o),null!=t&&1==o&&13==t.keyCode&&dialogclose(1)}var desktopsettings={encoding:2,showfocus:!1,showmouse:!0,showcad:!0,quality:40,scaling:1024,framerate:50};function setupDesktop(){desktopNode!=currentNode&&null!=desktop&&(desktop.Stop(),desktop=desktopNode=null),desktopNode==currentNode&&null!=desktop||(QH("DeskParent",'<canvas id=Desk width=640 height=200 style="width:100%;-ms-touch-action:none;margin-left:0px" oncontextmenu="return false" onmousedown=dmousedown(event) onmouseup=dmouseup(event) onmousemove=dmousemove(event)></canvas>'),desktopNode=currentNode,Q("Desk").addEventListener("DOMMouseScroll",function(e){return dmousewheel(e)}),Q("Desk").addEventListener("mousewheel",function(e){return dmousewheel(e)})),desktopNode=currentNode,updateDesktopButtons(),Q("Desk").toBlob||QV("deskSaveBtn",!1)}function updateDesktopButtons(){var e=meshes[currentNode.meshid],t=0;null!=desktop&&(t=desktop.State);var o=e.links[userinfo._id].rights;QV("disconnectbutton1",0!=t),QV("connectbutton1",0==t&&2==e.mtype&&(8&o||256&o)),QV("connectbutton1h",0==t&&8&o&&(1==e.mtype||null!=currentNode.intelamt&&2==currentNode.intelamt.state&&null!=currentNode.intelamt.ver&&"number"==typeof currentNode.intelamt.sku&&0!=(8&currentNode.intelamt.sku))),QV("d7amtkvm",!(null==currentNode.intelamt||null==currentNode.intelamt.ver&&1!=e.mtype||0!=t&&2!=desktop.contype)),QV("d7meshkvm",2==e.mtype&&(0==t||1==desktop.contype));var n=0!=(1&currentNode.conn);QE("connectbutton1",n);var a=0!=(6&currentNode.conn);QE("connectbutton1h",a),QV("DeskToastButton",0!=(16384&o)&&currentNode.agent&&currentNode.agent.id<5&&8&o),QV("deskActionsBtn",8&o),Q("DeskControl").checked=0!=(8&o),0==n&&QV("DeskTools",!1)}function connectDesktop(e,t){if(setSessionActivity(),null==desktop)if(desktopNode=currentNode,2==t){if(null==desktopNode.intelamt.user||""==desktopNode.intelamt.user)return void editDeviceAmtSettings(desktopNode._id,connectDesktop);(desktop=CreateAmtRedirect(CreateAmtRemoteDesktop("Desk"),authCookie)).debugmode=debugmode,desktop.onStateChanged=onDesktopStateChange,desktop.m.bpp=1==desktopsettings.encoding||3==desktopsettings.encoding?1:2,desktop.m.useZRLE=desktopsettings.encoding<3,desktop.m.showmouse=desktopsettings.showmouse,desktop.m.onScreenSizeChange=deskAdjust,desktop.Start(desktopNode._id,16994,"*","*",0),desktop.contype=2}else(desktop=CreateAgentRedirect(meshserver,CreateAgentRemoteDesktop("Desk"),serverPublicNamePort,authCookie,authRelayCookie,domainUrl)).debugmode=debugmode,desktop.m.debugmode=debugmode,desktop.attemptWebRTC=attemptWebRTC,desktop.onStateChanged=onDesktopStateChange,desktop.m.CompressionLevel=desktopsettings.quality,desktop.m.ScalingLevel=desktopsettings.scaling,desktop.m.FrameRateTimer=desktopsettings.framerate,desktop.m.onDisplayinfo=deskDisplayInfo,desktop.m.onScreenSizeChange=deskAdjust,desktop.Start(desktopNode._id),desktop.contype=1;else desktop.Stop(),desktopNode=desktop=null}function onDesktopStateChange(e,t){var o=t;3==o&&2==e.contype&&o++;var n=StatusStrs[o];switch(null!=desktop&&1==desktop.webRtcActive&&(n+=", WebRTC"),QH("deskstatus",n),t){case 0:desktop.Stop(),desktopNode=desktop=null,QV("termdisplays",!1),1==fullscreen&&deskToggleFull()}updateDesktopButtons(),deskAdjust(),setTimeout(deskAdjust,50)}function showDesktopSettings(){xxdialogMode||(applyDesktopSettings(),updateDesktopButtons(),setDialogMode(7,"Nastavení vzdálené plochy",3,showDesktopSettingsChanged))}function showDesktopSettingsChanged(){desktopsettings.encoding=d7desktopmode.value,desktopsettings.showfocus=d7showfocus.checked,desktopsettings.showmouse=d7showcursor.checked,desktopsettings.quality=d7bitmapquality.value,desktopsettings.scaling=d7bitmapscaling.value,desktopsettings.framerate=d7framelimiter.value,localStorage.setItem("desktopsettings",JSON.stringify(desktopsettings)),applyDesktopSettings(),desktop&&(1==desktop.contype&&0!=desktop.State&&desktop.m.SendCompressionLevel(1,desktopsettings.quality,desktopsettings.scaling,desktopsettings.framerate),2==desktop.contype&&0!=desktop.State&&(desktop.Stop(),setTimeout(function(){connectDesktop(null,2)},50)))}function applyDesktopSettings(){var e="",t=512&features?[90,70,50,40,30,20,10,5,1]:[50,40,30,20,10,5,1];for(var o in t)e+="<option value="+t[o]+">"+t[o]+"%</option>";QH("d7bitmapquality",e),d7desktopmode.value=desktopsettings.encoding,d7showfocus.checked=desktopsettings.showfocus,d7showcursor.checked=desktopsettings.showmouse,d7bitmapquality.value=40,0<=t.indexOf(parseInt(desktopsettings.quality))&&(d7bitmapquality.value=desktopsettings.quality),d7bitmapscaling.value=desktopsettings.scaling,desktopsettings.framerate&&(d7framelimiter.value=desktopsettings.framerate)}var fullscreen=!1;function deskAdjust(){var e=(Q("DeskParent").clientHeight-Q("Desk").clientHeight)/2;if(e<0){var t=Q("DeskParent").clientHeight,o=9999;desktop&&(o=desktop.m.width/desktop.m.height*t),QS("Desk")["max-height"]=t+"px",QS("Desk")["max-width"]=o+"px",e=0}else QS("Desk")["max-height"]=null,QS("Desk")["max-width"]=null;QS("Desk")["margin-top"]=e+"px",QS("Desk")["margin-bottom"]=e+"px"}function deskSendKeys(){if(!xxdialogMode&&null!=desktop&&3==desktop.State){var e=Q("deskkeys").value;0==e?2==desktop.contype?desktop.m.sendkey([[65511,1],[65364,1],[65364,0],[65511,0]]):desktop.m.SendKeyMsgKC([[desktop.m.KeyAction.EXDOWN,91],[desktop.m.KeyAction.DOWN,40],[desktop.m.KeyAction.UP,40],[desktop.m.KeyAction.EXUP,91]]):1==e?2==desktop.contype?desktop.m.sendkey([[65511,1],[65362,1],[65362,0],[65511,0]]):desktop.m.SendKeyMsgKC([[desktop.m.KeyAction.EXDOWN,91],[desktop.m.KeyAction.DOWN,38],[desktop.m.KeyAction.UP,38],[desktop.m.KeyAction.EXUP,91]]):2==e?2==desktop.contype?desktop.m.sendkey([[65511,1],[108,1],[108,0],[65511,0]]):desktop.sendCtrlMsg('{"action":"lock"}'):3==e?2==desktop.contype?desktop.m.sendkey([[65511,1],[109,1],[109,0],[65511,0]]):desktop.m.SendKeyMsgKC([[desktop.m.KeyAction.EXDOWN,91],[desktop.m.KeyAction.DOWN,77],[desktop.m.KeyAction.UP,77],[desktop.m.KeyAction.EXUP,91]]):4==e?2==desktop.contype?desktop.m.sendkey([[65505,1],[65511,1],[109,1],[109,0],[65511,0],[65505,0]]):desktop.m.SendKeyMsgKC([[desktop.m.KeyAction.DOWN,16],[desktop.m.KeyAction.EXDOWN,91],[desktop.m.KeyAction.DOWN,77],[desktop.m.KeyAction.UP,77],[desktop.m.KeyAction.EXUP,91],[desktop.m.KeyAction.UP,16]]):5==e?2==desktop.contype?desktop.m.sendkey([[65511,1],[65511,0]]):desktop.m.SendKeyMsgKC([[desktop.m.KeyAction.EXDOWN,91],[desktop.m.KeyAction.EXUP,91]]):6==e?2==desktop.contype?desktop.m.sendkey([[65511,1],[114,1],[114,0],[65511,0]]):desktop.m.SendKeyMsgKC([[desktop.m.KeyAction.EXDOWN,91],[desktop.m.KeyAction.DOWN,82],[desktop.m.KeyAction.UP,82],[desktop.m.KeyAction.EXUP,91]]):7==e?2==desktop.contype?desktop.m.sendkey([[65513,1],[65473,1],[65473,0],[65513,0]]):desktop.m.SendKeyMsgKC([[desktop.m.KeyAction.EXDOWN,18],[desktop.m.KeyAction.DOWN,115],[desktop.m.KeyAction.UP,115],[desktop.m.KeyAction.EXUP,18]]):8==e?2==desktop.contype?desktop.m.sendkey([[65507,1],[119,1],[119,0],[65507,0]]):desktop.m.SendKeyMsgKC([[desktop.m.KeyAction.EXDOWN,17],[desktop.m.KeyAction.DOWN,87],[desktop.m.KeyAction.UP,87],[desktop.m.KeyAction.EXUP,17]]):9==e?2==desktop.contype?desktop.m.sendkey([[65513,1],[65289,1],[65289,0],[65513,0]]):desktop.m.SendKeyMsgKC([[desktop.m.KeyAction.EXDOWN,18],[desktop.m.KeyAction.DOWN,9],[desktop.m.KeyAction.UP,9],[desktop.m.KeyAction.EXUP,18]]):10==e?desktop.m.sendcad():11==e&&(2==desktop.contype?desktop.m.sendkey([[65289,1],[65289,0]]):desktop.m.SendKeyMsgKC([[desktop.m.KeyAction.DOWN,9],[desktop.m.KeyAction.UP,9]]))}}function sendSpecialKeys(){xxdialogMode||null==desktop||3!=desktop.State||setDialogMode(3,"Speciální klíče",3,deskSendKeys)}function toggleSoftKeys(e){QV("DeskSoftInput",1==e),1==e&&Q("DeskSoftInput").focus()}function toggleDeskTools(){setSessionActivity(),xxdialogMode||("none"==QS("DeskTools").display?(QV("DeskTools",!0),Q("DeskTools").nodeid=currentNode._id,refreshDeskTools()):QV("DeskTools",!1))}function refreshDeskTools(){setSessionActivity(),QV("DeskToolsRefreshButton",!1),setTimeout(refreshDeskToolsEx,500),meshserver.send({action:"msg",type:"ps",nodeid:currentNode._id})}function refreshDeskToolsEx(){QV("DeskToolsRefreshButton",!0)}var filesNode,deskTools={sort:1,msg:null};function sortProcess(e){deskTools.sort=e,showDeskToolsProcesses(deskTools.msg)}function sortProcessPid(e,t){return e.p>t.p?1:e.p<t.p?-1:0}function sortProcessName(e,t){return e.d>t.d?1:e.d<t.d?-1:0}function showDeskToolsProcesses(e){if(null!=(deskTools.msg=e)){if(Q("DeskTools").nodeid==e.nodeid){var t=[],o=null;try{o=JSON.parse(e.value)}catch(e){}if(console.log(o),null!=o){for(var n in o)t.push({p:parseInt(n),c:o[n].cmd,d:o[n].cmd.toLowerCase(),u:o[n].user});0==deskTools.sort?t.sort(sortProcessPid):1==deskTools.sort&&t.sort(sortProcessName);var a="";for(var i in t)0!=t[i].p&&(a+="<div class=deskToolsBar><div style=width:50px;float:left;text-align:right;padding-right:5px>"+t[i].p+"</div><a style=float:right;padding-right:5px;cursor:pointer onclick=stopProcess("+t[i].p+',"'+t[i].c+'")><img width=10 height=10 src="images/trash.png"></a><div style=float:right;padding-right:5px>'+(t[i].u?t[i].u:"")+"</div><div>"+t[i].c+"</div></div>");QH("DeskToolsProcesses",a)}}}else QH("DeskToolsProcesses","")}function deskSaveImage(){if(setSessionActivity(),!xxdialogMode&&null!=desktop&&3==desktop.State){var e=new Date,t="Desktop-"+currentNode.name+"-"+e.getFullYear()+"-"+("0"+(e.getMonth()+1)).slice(-2)+"-"+("0"+e.getDate()).slice(-2)+"-"+("0"+e.getHours()).slice(-2)+"-"+("0"+e.getMinutes()).slice(-2);Q("Desk").toBlob(function(e){saveAs(e,t+".jpg")})}}function deskDisplayInfo(e,t,o,n){var a=Q("termdisplays").value;if(0<t.length){var i="";for(var s in t)i+="<option"+(a==t[s]?" selected":"")+">"+t[s]+"</option>";QH("termdisplays",i)}QV("termdisplays",0<t.length)}function deskGetDisplayNumbers(e){desktop.m.GetDisplayNumbers()}function deskSetDisplay(e){setSessionActivity();var t=0,o=Q("termdisplays").value;t="Všechny displeje"==o?65535:parseInt(o.substring(8)),desktop.m.SetDisplay(t)}function dmousedown(e){setSessionActivity(),xxdialogMode||null==desktop||desktop.m.mousedown(e)}function dmouseup(e){setSessionActivity(),xxdialogMode||null==desktop||desktop.m.mouseup(e)}function dmousemove(e){setSessionActivity(),xxdialogMode||null==desktop||desktop.m.mousemove(e)}function dmousewheel(e){return setSessionActivity(),!(xxdialogMode||null==desktop||!desktop.m.mousewheel)&&(desktop.m.mousewheel(e),haltEvent(e),!0)}function drotate(e){xxdialogMode||null==desktop||(desktop.m.setRotation(desktop.m.rotation+e),deskAdjust(),deskAdjust())}function stopProcess(e,t){return setDialogMode(2,"Správa procesů",3,stopProcessEx,format('Ukončit proces #{0} "{1}"?',e,t),e),!1}function stopProcessEx(e,t){meshserver.send({action:"msg",type:"pskill",nodeid:currentNode._id,value:t}),setTimeout(refreshDeskTools,300)}function setupFiles(){var e=filesNode==currentNode,t=0!=(1&(filesNode=currentNode).conn);QE("p13Connect",t),0!=e&&0!=t||!files||(files.Stop(),files=null)}function onFilesStateChange(e,t){setSessionActivity(),p13Connect.value=0==t?"Připojit":"Odpojit";var o=StatusStrs[t];switch(1==files.webRtcActive&&(o+=", WebRTC"),Q("p13Status").textContent=o,t){case 0:QH("p13files",""),p13filetree=null,p13filetreelocation=[],QH("p13currentpath",""),QE("p13FolderUp",!1),p13setActions(),null!=files&&(files.Stop(),files=null);break;case 3:p13targetpath="",files.sendText({action:"ls",reqid:1,path:""})}}function CreateRemoteFiles(e){var t={protocol:5};return t.onFileUpdate=e,t.xxStateChange=function(e){},t.ProcessData=function(e){t.onFileUpdate(e)},t}var autoConnectFilesTimer=null;function autoConnectFiles(e){autoConnectFilesTimer=null==autoConnectFilesTimer?setInterval(connectFiles,100):(clearInterval(autoConnectFilesTimer),null)}function connectFiles(e){files?(files.Stop(),files=null):((files=CreateAgentRedirect(meshserver,CreateRemoteFiles(p13gotFiles),serverPublicNamePort,authCookie,authRelayCookie,domainUrl)).attemptWebRTC=attemptWebRTC,files.onStateChanged=onFilesStateChange,files.Start(filesNode._id)),p13clipboard=p13clipboardFolder=null,p13clipboardCut=0,p13updateClipview()}var p13sortorder,p13filetree=null,p13targetpath=null,p13filetreelocation=[];function p13gotFiles(e){if(setSessionActivity(),0<e.length&&123!=e.charCodeAt(0))p13gotDownloadBinaryData(e);else if("download"!=(e=JSON.parse(decode_utf8(e))).action)if(e.path=e.path.replace(/\//g,"\\"),null!=p13filetree&&e.path==p13filetree.path){var t=p13getCheckedNames();p13filetree=e,p13updateFiles(t)}else{for(var o=e.path.replace(/\//g,"\\"),n=p13targetpath.replace(/\//g,"\\");0<o.length&&"\\"==o[0];)o=o.substring(1);for(;0<n.length&&"\\"==n[0];)n=n.substring(1);(o==n||"\\"==e.path&&""==p13targetpath)&&(p13filetree=e,p13updateFiles())}else p13gotDownloadCommand(e)}function p13getCheckedNames(){for(var e=[],t=document.getElementsByName("fd"),o=0;o<t.length;o++)t[o].checked&&e.push(p13filetree.dir[t[o].value].n);return e}function p13updateFiles(e){var t="",o="",n="<a style=cursor:pointer onclick=p13folderup(0)>Root</a>",a=p13filetree.path.split("\\");for(var i in p13filetreelocation=[],a)""!=a[i]&&p13filetreelocation.push(a[i]);for(var i in p13filetreelocation)n+=" / <a style=cursor:pointer onclick=p13folderup("+(parseInt(i)+1)+")>"+p13filetreelocation[i]+"</a>";var s=p13filetreelocation.join("/"),l=p13sort_files(p13filetree.dir);for(var i in l){var r,d=l[i],p=d.n;r=70<(r=p).length?EscapeHtml(p.substring(0,70))+"...":EscapeHtml(p),p=EscapeHtml(p);var u="";null!=d.s&&(u=getFileSizeStr(d.s));var c="";if(d.t<3){c="<div class=filelist file=999><input file=999 style=float:left name=fd class=fcb type=checkbox onchange=p13setActions() value='"+d.nx+"'>&nbsp;<span style=float:right></span><span><div class=fileIcon"+d.t+'></div><a style=cursor:pointer onclick=p13folderset("'+encodeURIComponent(d.nx)+'")>'+r+"</a></span></div>"}else{var m=r;0<d.s&&(m='<a rel="noreferrer noopener" target="_blank" style=cursor:pointer onclick="p13downloadfile(\''+encodeURIComponent(s+"/"+p)+"','"+encodeURIComponent(p)+"',"+d.s+')">'+r+"</a>"),c="<div class=filelist file=3><input file=3 style=float:left name=fd class=fcb type=checkbox onchange=p13setActions() value='"+d.nx+"'>&nbsp;<span style=float:right;padding-right:4px>"+u+"</span><span><div class=fileIcon"+d.t+"></div>"+m+"</span></div>"}d.t<3?t+=c:o+=c}if(QH("p13files",t+o),QH("p13currentpath",n),QE("p13FolderUp",0!=p13filetreelocation.length),null!=e){var v=document.getElementsByName("fd");for(i=0;i<v.length;i++)0<=e.indexOf(p13filetree.dir[v[i].value].n)&&(v[i].checked=!0)}p13setActions()}function p13folderset(e){p13targetpath=joinPaths(p13filetree.path,p13filetree.dir[e].n).split("\\").join("/"),files.sendText({action:"ls",reqid:1,path:p13targetpath})}function p13folderup(e){if(null==e)p13filetreelocation.pop();else for(;p13filetreelocation.length>e;)p13filetreelocation.pop();p13targetpath=p13filetreelocation.join("/"),files.sendText({action:"ls",reqid:1,path:p13targetpath})}function p13sort_filename(e,t){return e.ln>t.ln?1*p13sortorder:e.ln<t.ln?-1*p13sortorder:0}function p13sort_timestamp(e,t){return e.d>t.d?1*p13sortorder:e.d<t.d?-1*p13sortorder:0}function p13sort_bysize(e,t){return e.s==t.s?p13sort_filename(e,t):(e.s-t.s)*p13sortorder}function p13sort_files(e){var t=[],o=Q("p13sortdropdown").value;for(var n in e)e[n].nx=n,null==e[n].s&&(e[n].s=0),null==e[n].n&&(e[n].n=n),e[n].ln=e[n].n.toLowerCase(),t.push(e[n]);return p13sortorder=1,3<o&&(p13sortorder=-1,o-=3),1==o?t.sort(p13sort_filename):2==o?t.sort(p13sort_bysize):3==o&&t.sort(p13sort_timestamp),t}function p13setActions(){if(null==p13filetree)QE("p13DeleteFileButton",!1),QE("p13NewFolderButton",!1),QE("p13UploadButton",!1),QE("p13RenameFileButton",!1),QE("p13SelectAllButton",!1),Q("p13SelectAllButton").value="Vše",QE("p13RefreshButton",!1),QE("p13CutButton",!1),QE("p13CopyButton",!1),QE("p13PasteButton",!1);else{var e=p13getFileSelCount(),t=p13getFileCount(),o=p13getFileSelCount(!1),n=0<currentNode.agent.id&&currentNode.agent.id<5;QE("p13DeleteFileButton",0<e&&(0<p13filetreelocation.length||0==n)),QE("p13NewFolderButton",0<p13filetreelocation.length||0==n),QE("p13UploadButton",0<p13filetreelocation.length||0==n),QE("p13RenameFileButton",1==e&&(0<p13filetreelocation.length||0==n)),QE("p13SelectAllButton",0<t),Q("p13SelectAllButton").value=0<e?"Nic":"Vše",QE("p13RefreshButton",!0),QE("p13CutButton",0<e&&e==o&&(0<p13filetreelocation.length||0==n)),QE("p13CopyButton",0<e&&e==o&&(0<p13filetreelocation.length||0==n)),QE("p13PasteButton",(0<p13filetreelocation.length||0==n)&&null!=p13clipboard&&0<p13clipboard.length)}}function p13getFileSelCount(e){for(var t=0,o=document.getElementsByName("fd"),n=0;n<o.length;n++)!o[n].checked||0==e&&"3"!=o[n].attributes.file.value||t++;return t}function p13getFileSelDirCount(){for(var e=0,t=document.getElementsByName("fd"),o=0;o<t.length;o++)t[o].checked&&"999"==t[o].attributes.file.value&&e++;return e}function p13getFileCount(){return document.getElementsByName("fd").length}function p13selectallfile(){for(var e=0==p13getFileSelCount(),t=document.getElementsByName("fd"),o=0;o<t.length;o++)t[o].checked=e;p13setActions()}function p13createfolder(){setDialogMode(2,"Nový adresář",3,p13createfolderEx,"<input type=text id=p13renameinput maxlength=64 onkeyup=p13fileNameCheck(event) style=width:100% />"),focusTextBox("p13renameinput"),p13fileNameCheck()}function p13createfolderEx(){files.sendText({action:"mkdir",reqid:1,path:p13filetreelocation.join("/")+"/"+Q("p13renameinput").value}),p13folderup(999)}function p13deletefile(){var e=p13getFileSelCount(),t=0<p13getFileSelDirCount()?"<br /><br /><label><input type=checkbox id=p13recdeleteinput>Rekurzivní mazání</label><br>":"<input type=checkbox id=p13recdeleteinput style='display:none'>";setDialogMode(2,"Smazat",3,p13deletefileEx,1<e?format("Smazat {0} vybrané prvky?",e)+t:"Smazat vybraný prvek?"+t)}function p13deletefileEx(){for(var e=[],t=document.getElementsByName("fd"),o=0;o<t.length;o++)t[o].checked&&e.push(p13filetree.dir[t[o].value].n);files.sendText({action:"rm",reqid:1,path:p13filetreelocation.join("/"),delfiles:e,rec:Q("p13recdeleteinput").checked}),p13folderup(999)}function p13renamefile(){for(var e,t=document.getElementsByName("fd"),o=0;o<t.length;o++)t[o].checked&&(e=p13filetree.dir[t[o].value].n);setDialogMode(2,"Přejmenovat",3,p13renamefileEx,'<input type=text id=p13renameinput maxlength=64 onkeyup=p13fileNameCheck(event) style=width:100% value="'+e+'" />',{action:"rename",path:p13filetreelocation.join("/"),oldname:e}),focusTextBox("p13renameinput"),p13fileNameCheck()}function p13renamefileEx(e,t){t.newname=Q("p13renameinput").value,files.sendText(t),p13folderup(999)}function p13fileNameCheck(e){var t=isFilenameValid(Q("p13renameinput").value);QE("idx_dlgOkButton",t),1==t&&null!=e&&13==e.keyCode&&dialogclose(1)}function p13uploadFile(){setDialogMode(2,"Nahrát soubor",3,p13uploadFileEx,"<input type=file name=files id=p13uploadinput style=width:100% multiple=multiple onchange=\"updateUploadDialogOk('p13uploadinput')\" />"),updateUploadDialogOk("p13uploadinput")}function p13uploadFileEx(){p13doUploadFiles(Q("p13uploadinput").files)}function p13viewfile(){for(var e=document.getElementsByName("fd"),t=0;t<e.length;t++)if(e[t].checked){p13filetree.dir[e[t].value].s<=204800?p13downloadfile(encodeURIComponent(p13filetreelocation.join("/")+"/"+p13filetree.dir[e[t].value].n),encodeURIComponent(p13filetree.dir[e[t].value].n),p13filetree.dir[e[t].value].s,"viewer"):messagebox("Editor souborů","Jen soubory menší než 200k mohou být editovány.");break}}var downloadFile,uploadFile,currentMesh,p13clipboard=null,p13clipboardFolder=null,p13clipboardCut=0;function p13copyFile(e){var t=document.getElementsByName("fd");p13clipboard=[],p13clipboardCut=e,p13clipboardFolder=p13targetpath;for(var o=0;o<t.length;o++)t[o].checked&&"3"==t[o].attributes.file.value&&p13clipboard.push(p13filetree.dir[t[o].value].n);p13updateClipview()}function p13pasteFile(){var e="";null!=p13clipboard&&0<p13clipboard.length&&(e=0==p13clipboardCut?1<p13clipboard.length?format("Potvrdit kopírování {0} zaznámů do tohoto umístění?",p13clipboard.length):format("Potvrdit kopírování jednoho záznamu do tohoto umístění?"):1<p13clipboard.length?format("Potvrdit přesun {0} záznamů do tohoto umístění?",p13clipboard.length):format("Potvrdit přesun jednoho záznamu do tohoto umístění?")),setDialogMode(2,"Vložit",3,p13pasteFileEx,e)}function p13pasteFileEx(){files.sendText({action:0==p13clipboardCut?"copy":"move",reqid:1,scpath:p13clipboardFolder,dspath:p13targetpath,names:p13clipboard}),p13folderup(999),1==p13clipboardCut&&(p13clipboardFolder=p13clipboard=null,p13clipboardCut=0,p13updateClipview())}function p13updateClipview(){var e="";null!=p13clipboard&&0<p13clipboard.length&&(e=0==p13clipboardCut?1<p13clipboard.length?format('Držím {0} záznamů pro kopii, <a href=# onclick="return p13clearClip()" style=cursor:pointer>Vymazat</a>.',p13clipboard.length):format('Držím jeden záznam pro kopii, <a href=# onclick="return p13clearClip()" style=cursor:pointer>Vymazat</a>.'):1<p13clipboard.length?format('Držím {0} zaznamů pro přesun, <a href=# onclick="return p13clearClip()" style=cursor:pointer>Vymazat</a>.',p13clipboard.length):format('Držím jeden záznam pro přesun, <a href=# onclick="return p13clearClip()" style=cursor:pointer>Vymazat</a>.')),QH("p13bottomstatus",e),p13setActions()}function p13clearClip(){return p13clipboardFolder=p13clipboard=null,p13clipboardCut=0,p13updateClipview(),!1}function updateUploadDialogOk(e){QE("idx_dlgOkButton",""!=Q(e).value)}function getFileSelCount(e){for(var t=0,o=document.getElementsByName("fc"),n=0;n<o.length;n++)!o[n].checked||0==e&&"3"!=o[n].attributes.file.value||t++;return t}function getFileCount(){return document.getElementsByName("fc").length}function p13downloadfile(e,t,o){xxdialogMode||downloadFile||!files||(downloadFile={path:decodeURIComponent(e),file:decodeURIComponent(t),size:o,tsize:0,data:"",state:0,id:Math.random()},files.sendText({action:"download",sub:"start",id:downloadFile.id,path:downloadFile.path}),setDialogMode(2,"Stáhnout soubor",10,p13downloadFileCancel,"<div>"+downloadFile.file+"</div><br /><progress id=d2progressBar style=width:100% value=0 max="+o+" />"))}function p13downloadFileCancel(){setDialogMode(0),files.sendText({action:"download",sub:"cancel",id:downloadFile.id}),downloadFile=null}function p13gotDownloadCommand(e){null!=downloadFile&&e.id==downloadFile.id&&("start"==e.sub?(downloadFile.state=1,files.sendText({action:"download",sub:"startack",id:downloadFile.id})):"cancel"==e.sub&&(downloadFile=null,setDialogMode(0)))}function p13gotDownloadBinaryData(e){downloadFile&&0!=downloadFile.state&&(4<e.length&&(downloadFile.tsize+=e.length-4,downloadFile.data+=e.substring(4),Q("d2progressBar").value=downloadFile.tsize),0!=(1&ReadInt(e,0))?(saveAs(data2blob(downloadFile.data),downloadFile.file),downloadFile=null,setDialogMode(0)):files.sendText({action:"download",sub:"ack",id:downloadFile.id}))}function p13doUploadFiles(e){xxdialogMode||((uploadFile={}).xpath=p13filetreelocation.join("/"),uploadFile.xfiles=e,uploadFile.xfilePtr=-1,setDialogMode(2,"Nahrát soubor",10,p13uploadFileCancel,"<div id=p13dfileName>Připojování...</div><br /><progress id=d2progressBar style=width:100% value=0 max=0 />"),p13uploadReconnect())}function onFileUploadStateChange(e,t){switch(t){case 0:p13folderup(9999);break;case 3:p13uploadNextFile();break;default:console.log("Unknown onFileUploadStateChange state",t)}}function p13uploadReconnect(){uploadFile.ws=CreateAgentRedirect(meshserver,CreateRemoteFiles(p13gotUploadData),serverPublicNamePort,authCookie,authRelayCookie,domainUrl),uploadFile.ws.attemptWebRTC=!1,uploadFile.ws.ctrlMsgAllowed=!1,uploadFile.ws.onStateChanged=onFileUploadStateChange,uploadFile.ws.Start(filesNode._id)}function p13uploadNextFile(){if(uploadFile.xfilePtr++,uploadFile.xfiles.length>uploadFile.xfilePtr){uploadFile.xptr=0;var e=uploadFile.xfiles[uploadFile.xfilePtr];QH("p13dfileName",e.name),Q("d2progressBar").max=e.size,Q("d2progressBar").value=0,uploadFile.xreader=new FileReader,uploadFile.xreader.onload=function(){uploadFile.xdata=uploadFile.xreader.result,uploadFile.ws.sendText({action:"upload",reqid:uploadFile.xfilePtr,path:uploadFile.xpath,name:e.name,size:uploadFile.xdata.byteLength})},uploadFile.xreader.readAsArrayBuffer(e)}else p13uploadFileCancel()}function p13uploadFileCancel(e,t){null!=uploadFile&&(null!=uploadFile.ws&&(uploadFile.ws.Stop(),uploadFile.ws=null),uploadFile=null),setDialogMode(0)}function p13gotUploadData(e){var t=JSON.parse(e);if(null!=uploadFile&&parseInt(uploadFile.xfilePtr)==parseInt(t.reqid))if("uploadstart"==t.action){p13uploadNextPart(!1);for(var o=0;o<8;o++)p13uploadNextPart(!0)}else"uploadack"==t.action?p13uploadNextPart(!1):"uploaderror"==t.action&&p13uploadFileCancel()}function p13uploadNextPart(e){var t=uploadFile.xdata,o=uploadFile.xptr,n=uploadFile.xptr+4096;if(n>t.byteLength){if(1==e)return;n=t.byteLength}if(o==t.byteLength)null!=uploadFile.ws&&(uploadFile.ws.Stop(),uploadFile.ws=null),uploadFile.xfiles.length>uploadFile.xfilePtr+1?p13uploadReconnect():p13uploadFileCancel();else{var a=t.slice(o,n);uploadFile.ws.send(a),uploadFile.xptr=n,Q("d2progressBar").value=n}}function p20updateMesh(){if(null!=currentMesh){QH("p20meshName",EscapeHtml(currentMesh.name));var e=format("Neznámý #{0}",currentMesh.mtype),t=currentMesh.links[userinfo._id].rights;1==currentMesh.mtype&&(e="Intel&reg; AMT pouze, bez agenta"),2==currentMesh.mtype&&(e="Spravovat pomocí softwarového aenta");var o="";o+=addHtmlValue("Jméno",addLinkConditional(EscapeHtml(currentMesh.name),"p20editmesh(1)",0!=(1&t))),o+=addHtmlValue("Popis",addLinkConditional(currentMesh.desc&&""!=currentMesh.desc?EscapeHtml(currentMesh.desc):"<i>Nic</i>","p20editmesh(2)",0!=(1&t))),o+=addHtmlValue("Typ",e),o+="<br style=clear:both><br>";var n=currentMesh.links[userinfo._id];n&&0!=(2&n.rights)&&(o+="<div style=margin-bottom:6px><a onclick=p20showAddMeshUserDialog() style=cursor:pointer><img src=images/icon-addnew.png border=0 height=12 width=12> Přidat uživatele</a></div>"),o+='<table style="color:black;background-color:#EEE;border-color:#AAA;border-width:1px;border-style:solid;border-collapse:collapse" border=0 cellpadding=2 cellspacing=0 width=100%><tbody><tr style=background-color:#AAAAAA;font-weight:bold><th scope=col style=text-align:left;width:430px>Uživatelská oprávnění</th></tr>';var a=1,i=[];for(var s in currentMesh.links)i.push({id:s,name:s.split("/")[2],rights:currentMesh.links[s].rights});for(var s in i.sort(function(e,t){return e.name>t.name?1:e.name<t.name?-1:0}),i){var l="",r="Částečné práva",d=i[s].rights;4294967295==d?r="Hlavní administrátor":0==d&&(r="Žádná práva"),s==userinfo._id||4294967295!=t&&0==(2&t)||(l='<a onclick=p20deleteUser(event,"'+encodeURIComponent(i[s].id)+'") style=cursor:pointer><img src=images/trash.png border=0 height=10 width=10></a>'),o+='<tr onclick=p20viewuser("'+encodeURIComponent(i[s].id)+'") style=height:32px;cursor:pointer'+(a%2==0?";background-color:#DDD":"")+"><td>",o+="<div style=float:right>"+l+"</div><div style=float:right;padding-right:4px>"+r+"</div><div class=m2></div><div>&nbsp;"+EscapeHtml(decodeURIComponent(i[s].name))+"<div></div></div>",o+="</td></tr>",++a}o+="</tbody></table>",4294967295==t&&(o+="<div style=font-size:small;text-align:right;margin-top:6px><span><a onclick=p20showDeleteMeshDialog() style=cursor:pointer>Smazat skupinu</a></span></div>"),QH("p20info",o)}}function p20showDeleteMeshDialog(){if(xxdialogMode)return!1;var e=format("Opravdu smazat skupinu {0}? Smazáním skupiny se smažou všechny informace o zařízeních v této skupině.",EscapeHtml(currentMesh.name))+"<br /><br />";return setDialogMode(2,"Smazat skupinu",3,p20showDeleteMeshDialogEx,e+="<label><input id=p20check type=checkbox onchange=p20validateDeleteMeshDialog() />Potvrdit</label>"),p20validateDeleteMeshDialog(),!1}function p20validateDeleteMeshDialog(){QE("idx_dlgOkButton",Q("p20check").checked)}function p20showDeleteMeshDialogEx(e,t){meshserver.send({action:"deletemesh",meshid:currentMesh._id,meshname:currentMesh.name})}function p20editmesh(e){if(!xxdialogMode){var t=addHtmlValue("Jméno","<input id=dp20meshname style=width:170px maxlength=32 onchange=p20editmeshValidate() onkeyup=p20editmeshValidate() />");setDialogMode(2,"Upravit skupinu zařízení",3,p20editmeshEx,t+=addHtmlValue("Popis","<input id=dp20meshdesc style=width:170px maxlength=1024 onkeyup=p20editmeshValidate() />")),Q("dp20meshname").value=currentMesh.name,currentMesh.desc&&(Q("dp20meshdesc").value=currentMesh.desc),p20editmeshValidate(),2==e?Q("dp20meshdesc").focus():Q("dp20meshname").focus()}}function p20editmeshEx(){meshserver.send({action:"editmesh",meshid:currentMesh._id,meshname:Q("dp20meshname").value,desc:Q("dp20meshdesc").value})}function p20editmeshValidate(){QE("idx_dlgOkButton",0<Q("dp20meshname").value.length)}function p20showAddMeshUserDialog(){if(!xxdialogMode){var e=addHtmlValue("User","<input id=dp20username style=width:170px maxlength=32 onchange=p20validateAddMeshUserDialog() onkeyup=p20validateAddMeshUserDialog() />");e+='<div style="border:2px groove gray;background-color:white;max-height:120px;overflow-y:scroll">',e+="<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20fulladmin>Hlavní administrátor</label><br>",e+="<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20editmesh>Upravit skupinu zařízení</label><br>",e+="<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20manageusers>Spravovat uživatele pro skupinu zařízení</label><br>",e+="<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20managecomputers>Správa skupin zařízení</label><br>",e+="<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20remotecontrol>Vzdálené ovládání</label><br>",e+="<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20remoteview style=margin-left:12px>Pouze vzdálené prohlížení</label><br>",e+="<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20remotelimitedinput style=margin-left:12px>Pouze omezené vstupy</label><br>",e+="<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20noterminal style=margin-left:12px>Žádný přístup k terminálu</label><br>",e+="<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20nofiles style=margin-left:12px>Žádný přístup k souborům</label><br>",e+="<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20noamt style=margin-left:12px>Žádné Intel&reg; AMT</label><br>",e+="<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20meshagentconsole>Konzole agenta</label><br>",e+="<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20meshserverfiles>Soubory serveru</label><br>",e+="<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20wakedevices>Probudit zařízení</label><br>",e+="<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20editnotes>Upravit popis zařízení</label><br>",e+="<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20limitevents>Zobrazit pouze vlastní události</label><br>",e+="<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20chatnotify>Chat & Upozornění</label><br>",e+="<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20uninstall>Odinstalovat agenta</label><br>",setDialogMode(2,"Přidat uživatele do skupiny",3,p20showAddMeshUserDialogEx,e+="</div>"),p20validateAddMeshUserDialog(),Q("dp20username").focus()}}function p20validateAddMeshUserDialog(){var e=currentMesh.links[userinfo._id].rights,t=!Q("p20fulladmin").checked;QE("p20fulladmin",4294967295==e),QE("p20editmesh",t&&4294967295==e),QE("p20manageusers",t),QE("p20managecomputers",t),QE("p20remotecontrol",t),QE("p20meshagentconsole",t),QE("p20meshserverfiles",t),QE("p20wakedevices",t),QE("p20editnotes",t),QE("p20limitevents",t),QE("p20remoteview",t&&Q("p20remotecontrol").checked),QE("p20remotelimitedinput",t&&Q("p20remotecontrol").checked&&!Q("p20remoteview").checked),QE("p20noterminal",t&&Q("p20remotecontrol").checked),QE("p20nofiles",t&&Q("p20remotecontrol").checked),QE("p20noamt",t&&Q("p20remotecontrol").checked),QE("p20chatnotify",t),QE("p20uninstall",t)}function p20showAddMeshUserDialogEx(){var e=0;1==Q("p20fulladmin").checked?e=4294967295:(1==Q("p20editmesh").checked&&(e+=1),1==Q("p20manageusers").checked&&(e+=2),1==Q("p20managecomputers").checked&&(e+=4),1==Q("p20remotecontrol").checked&&(e+=8),1==Q("p20meshagentconsole").checked&&(e+=16),1==Q("p20meshserverfiles").checked&&(e+=32),1==Q("p20wakedevices").checked&&(e+=64),1==Q("p20editnotes").checked&&(e+=128),1==Q("p20remoteview").checked&&(e+=256),1==Q("p20noterminal").checked&&(e+=512),1==Q("p20nofiles").checked&&(e+=1024),1==Q("p20noamt").checked&&(e+=2048),1==Q("p20remotelimitedinput").checked&&(e+=4096),1==Q("p20limitevents").checked&&(e+=8192),1==Q("p20chatnotify").checked&&(e+=16384),1==Q("p20uninstall").checked&&(e+=32768));var t=Q("dp20username").value.split(","),o=[];for(var n in t)o.push(t[n].trim());meshserver.send({action:"addmeshuser",meshid:currentMesh._id,meshname:currentMesh.name,usernames:o,meshadmin:e})}function p20viewuser(e){if(!xxdialogMode){e=decodeURIComponent(e);var t=[],o=currentMesh.links[userinfo._id].rights,n=currentMesh.links[e].rights;4294967295==n?t.push("Hlavní administrátor"):(0!=(1&n)&&t.push("Upravit skupinu zařízení"),0!=(2&n)&&t.push("Spravovat uživatele pro skupinu zařízení"),0!=(4&n)&&t.push("Správa skupin zařízení"),0!=(8&n)&&t.push("Vzdálené ovládání"),0!=(16&n)&&t.push("Konzole agenta"),0!=(32&n)&&t.push("Soubory serveru"),0!=(64&n)&&t.push("Probudit zařízení"),0!=(128&n)&&t.push("Upravit poznámky"),0!=(256&n)&&t.push("Pouze vzdálené prohlížení"),0!=(512&n)&&t.push("Žádný terminál"),0!=(1024&n)&&t.push("Žádné soubory"),0!=(2048&n)&&t.push("Žádné Intel&reg; AMT"),0!=(8&n)&&0!=(4096&n)&&0==(256&n)&&t.push("Omezené vstupy"),0!=(8192&n)&&t.push("Pouze vlastní události"),0!=(16384&n)&&t.push("Chat & Upozornění"),0!=(32768&n)&&t.push("Odinstalace")),0==t.length&&t.push("Žádná práva");var a=1,i=addHtmlValue("Uživatel",EscapeHtml(decodeURIComponent(e.split("/")[2])));i+=addHtmlValue("Práva",t.join(", ")),userinfo._id!=e&&(4294967295==o||0!=(2&o)&&4294967295!=n)&&(a+=4),setDialogMode(2,"Uživatelé této skupiny zařízení",a,p20viewuserEx,i,e)}}function p20viewuserEx(e,t){2==e&&setDialogMode(2,"Vzdálený uživatel",3,p20viewuserEx2,format("Potvrdit odstranění uživatele {0}?",t.split("/")[2]),t)}function p20deleteUser(e,t){haltEvent(e),p20viewuserEx(2,decodeURIComponent(t))}function p20viewuserEx2(e,t){meshserver.send({action:"removemeshuser",meshid:currentMesh._id,meshname:currentMesh.name,userid:t})}var xxdialogMode,xxdialogFunc,xxdialogButtons,xxdialogTag,xxcurrentView=-1;function go(e){if(setSessionActivity(),!xxdialogMode&&xxcurrentView!=e){updateFooterMenu(),setDialogMode(0);for(var t=0;t<32;t++)QV("p"+t,t==e);xxcurrentView=e}}function setDialogMode(e,t,o,n,a,i){setSessionActivity(),xxdialogMode=e,xxdialogFunc=n,xxdialogButtons=o,xxdialogTag=i,QE("idx_dlgOkButton",!0),QV("idx_dlgOkButton",1&o),QV("idx_dlgCancelButton",2&o),QV("id_dialogclose",2&o||8&o),QV("idx_dlgButtonBar",7&o),t&&QH("id_dialogtitle",t);for(var s=1;s<24;s++)QV("dialog"+s,s==e);QV("dialog",e),a&&(2==e?QH("id_dialogOptions",a):QH("id_dialogMessage",a))}function dialogclose(e){setSessionActivity();var t=xxdialogFunc,o=xxdialogButtons,n=xxdialogTag;setDialogMode(),(8&o||e)&&t&&t(e,n)}function putstore(e,t){try{if("undefined"==typeof localStorage||localStorage.getItem(e)==t)return;null==t?localStorage.removeItem(e):localStorage.setItem(e,t)}catch(e){}if("_"!=e[0]){for(var o={},n=0,a=localStorage.length;n<a;++n){var i=localStorage.key(n);"_"!=i[0]&&(o[i]=localStorage.getItem(i))}meshserver.send({action:"userWebState",state:JSON.stringify(o)})}}function getstore(e,t){try{if("undefined"==typeof localStorage)return t;var o=localStorage.getItem(e);return null==o||null==o?t:o}catch(e){return t}}function center(){QS("dialog").left=(getDocWidth()-300)/2+"px",deskAdjust(),deskAdjust()}function messagebox(e,t){QH("id_dialogMessage",t),setDialogMode(1,e,1)}function statusbox(e,t){QH("id_dialogMessage",t),setDialogMode(1,e)}function getDocWidth(){return window.innerWidth?window.innerWidth:document.documentElement&&document.documentElement.clientWidth&&0!=document.documentElement.clientWidth?document.documentElement.clientWidth:document.getElementsByTagName("body")[0].clientWidth}function haltEvent(e){return e.preventDefault&&e.preventDefault(),e.stopPropagation&&e.stopPropagation(),!1}function haltReturn(e){13==e.keyCode&&haltEvent(e)}function validateEmail(e){return/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(e)}function reload(){window.location.href=window.location.href}function getNodeFromId(e){for(var t in nodes)if(nodes[t]._id==e)return nodes[t];return null}function addHtmlValue(e,t){return"<table><td style=width:120px>"+e+"<td><b>"+t+"</b></table>"}function addHtmlValue2(e,t){return"<div><div style=display:inline-block;float:right>"+t+"</div><div style=display:inline-block>"+e+"</div></div>"}function addLink(e,t){return"<a style=cursor:pointer;color:darkblue;text-decoration:none onclick='"+t+"'>&diams; "+e+"</a>"}function addLinkConditional(e,t,o){return o?addLink(e,t):e}function passwordcheck(e){return/(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[!@#$%^&*()]).{8,}/.test(e)}function getFileSizeStr(e){return 1==e?"1 byte":format("{0} bytes",e)}function joinPaths(){var e=[];for(var t in arguments){var o=arguments[t];if(null!=o&&""!=o){for(;o.endsWith("/")||o.endsWith("\\");)o=o.substring(0,o.length-1);for(;o.startsWith("/")||o.startsWith("\\");)o=o.substring(1);e.push(o)}}return e.join("/")}function focusTextBox(e){setTimeout(function(){Q(e).selectionStart=Q(e).selectionEnd=65535,Q(e).focus()},0)}isFilenameValid=function(){var t=/^[^\\/:\*\?"<>\|]+$/,o=/^\./,n=/^(nul|prn|con|lpt[0-9]|com[0-9])(\.|$)/i;return function(e){return t.test(e)&&!o.test(e)&&!n.test(e)&&"."!=e[0]}}();function parseUriArgs(){var e,t={},o=window.document.location.href.split(/[\?&|\=]/);for(n in o.splice(0,1),o)switch(n%2){case 0:e=decodeURIComponent(o[n]);break;case 1:t[e]=decodeURIComponent(o[n]);var n=parseInt(t[e]);n==t[e]&&(t[e]=n)}return t}function printDate(e){return e.toLocaleDateString(args.locale)}function printTime(e){return e.toLocaleTimeString(args.locale)}function printDateTime(e){return e.toLocaleString(args.locale)}function format(e){var o=Array.prototype.slice.call(arguments,1);return e.replace(/{(\d+)}/g,function(e,t){return void 0!==o[t]?o[t]:e})}function nobreak(e){return e.split(" ").join("&nbsp;")}</script>