"+i.substring(20)),QH("d2optinfo",'Installeer Google Authenticator of een compatibele toepassing, gebruik deze link of voer hieronder het geheim in. Voer vervolgens het huidige 6-cijferige token in om 2-staps aanmelding te activeren.
'+i+'
Token:
'),QV("idx_dlgOkButton",!0),QE("idx_dlgOkButton",!1),Q("d2otpauthinput").focus()}break;case"otpauth-setup":if(xxdialogMode)return;setDialogMode(2,"Verificatie-app",1,null,t.success?"Tweestapsverificatie successvol. U hebt nu een geldig token nodig om opnieuw in te loggen.":"Tweestapsverificatie mislukt. Wis het geheim van de applicatie en probeer het opnieuw. Je hebt maar een paar minuten om de juiste code in te voeren.");break;case"otpauth-clear":if(xxdialogMode)return;setDialogMode(2,"Verificatie-app",1,null,t.success?"Tweestapsverificatie verwijderd. Je kan deze functie ten allen tijde weer inschakelen.":"Tweestapsverificatie verwijdering mislukt. Probeer het opnieuw.");break;case"otpauth-getpasswords":if(xxdialogMode)return;var a="Eenmalige tokens kunnen worden gebruikt als secundaire authenticatie. Genereer een set, druk ze af en bewaar ze op een veilige plaats.";if(a+="
",t.passwords){var s=0;for(var l in t.passwords){++s%2&&(a+="
","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,c=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,c!=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&¤tMesh==meshes[t.event.meshid]&&go(2),delete meshes[t.event.meshid];var u=[];for(var l in nodes)nodes[l].meshid!=t.event.meshid&&u.push(nodes[l]);nodes=u,10<=xxcurrentView&&xxcurrentView<20&¤tNode&¤tNode.meshid==t.event.meshid&&(setDialogMode(0),go(2))}}updateMeshes(),updateDevices(),meshserver.send({action:"files"}),20==xxcurrentView&¤tMesh._id==t.event.meshid&&p20updateMesh();break;case"deletemesh":meshes[t.event.meshid]&&(delete meshes[t.event.meshid],updateMeshes(),meshserver.send({action:"files"}));u=[];for(var l in nodes)nodes[l].meshid!=t.event.meshid&&u.push(nodes[l]);nodes=u,updateDevices(),20<=xxcurrentView&&xxcurrentView<30&¤tMesh._id==t.event.meshid&&(setDialogMode(0),go(2)),10<=xxcurrentView&&xxcurrentView<20&¤tNode&¤tNode.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 g=-1;for(var l in nodes)if(nodes[l]._id==t.event.nodeid){g=l;break}if(-1!=g){m=nodes[g];currentNode==m&&(10<=xxcurrentView&&xxcurrentView<20&&(setDialogMode(0),go(2)),currentNode=null),nodes.splice(g,1),updateDevices()}break;case"changenode":g=-1;for(var l in nodes)if(nodes[l]._id==t.event.nodeid){g=l;break}if(-1!=g)(m=nodes[g]).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":g=-1;for(var l in nodes)if(nodes[l]._id==t.event.nodeid){g=l;break}if(-1!=g){m=nodes[g];null==meshes[t.event.newMeshId]?(currentNode==m&&(10<=xxcurrentView&&xxcurrentView<20&&(setDialogMode(0),go(2)),currentNode=null),nodes.splice(g,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":g=-1;for(var l in nodes)if(nodes[l]._id==t.event.nodeid){g=l;break}if(-1!=g)(m=nodes[g]).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'+e[o].n,n=e[o].n;QH("footerMenu","
","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,"Verificatie-app",3,function(){meshserver.send({action:"otpauth-clear"})},"Bevestig de verwijdering van de Tweestapsverificatie applicatie?")}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,"email verificatie",3,account_showVerifyEmailEx,"Klik op OK om een verificatiebericht te sturen naar:
"+EscapeHtml(userinfo.email)+"
Wacht enkele minuten om de verificatie te ontvangen.")}function account_showVerifyEmailEx(){meshserver.send({action:"verifyemail",email:userinfo.email})}function account_showChangeEmail(){xxdialogMode||(setDialogMode(2,"Email Adres wijzigen",3,account_changeEmail,addHtmlValue("Email","")),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=""),account_validateDeleteAccount(),Q("apassword1").focus()}}function account_showChangePassword(){if(xxdialogMode)return!1;var e="
";if(e+="
"+nobreak("Oud wachtwoord:")+"
",e+="
"+nobreak("Nieuw wachtwoord:")+"
",e+="
"+nobreak("Nieuw wachtwoord:")+"
",65536&features&&(e+="
wachtwoord hint:
"),e+="
",passRequirements){var t=[],n=0;for(var o in passRequirements)"reset"!=o&&"hint"!=o&&(t.push(o+":"+passRequirements[o]),n++);0"+format("Vereisten: {0}.",t.join(", "))+"")}return setDialogMode(2,"Verander wachtwoord",3,account_showChangePasswordEx,e+=" "),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");e+=addHtmlValue("Typen",""),setDialogMode(2,"Apparaatgroep aanmaken",3,account_createMeshEx,e+=addHtmlValue("Omschrijving","")),account_validateMeshCreate(),Q("dp3meshname").focus()}else setDialogMode(2,"Gebruikersaccount beveiliging",1,null,'Geen toegang tot een apparaat totdat tweefactorauthenticatie is ingeschakeld. Dit is vereist voor extra beveiliging. Ga naar de "Mijn account" en bekijk het gedeelte "Accountbeveiliging".');else setDialogMode(2,"Gebruikersaccount beveiliging",1,null,'Geen toegang tot een apparaat totdat een e-mailadres is geverifieerd. Dit is vereist voor wachtwoordherstel. Ga naar de "Mijn account" om een e-mailadres te wijzigen en te verifiëren.');else setDialogMode(2,"Nieuwe apparaatgroep",1,null,"Dit account heeft niet de rechten om een nieuwe apparaatgroep te maken.")}function account_validateMeshCreate(){QE("idx_dlgOkButton",0Strong":60<=n?"●":"●"}else{0==checkPasswordRequirements(Q("apassword1").value,passRequirements)&&(t=!1,e="Beleid")}QH("dxPassWarn",e),QE("idx_dlgOkButton",t)}function checkPasswordStrength(e){var t=0,n={},o=0,i={digits:/\d/.test(e),lower:/[a-z]/.test(e),upper:/[A-Z]/.test(e),nonWords:/\W/.test(e)};if(!e)return 0;for(var a=0;at.max)return!1;for(var n=0,o=0,i=0,a=0,s=0;s",e+='',e+='
',e+="
"+EscapeHtml(meshes[i].name)+"
"+o+"
",e+="
"}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="",n="",o="Root",i="Root",a=filetree,s=1,l=[],r=filetreelinkpath,d=[],p=document.getElementsByName("fc"),c=0;c"+(null!=(a=a.f[filetreelocation[c]]).n?a.n:filetreelocation[c])+"",s++}filetreelocation=l;var m=i.toLowerCase().startsWith("root / "+userinfo._id+" / public"),g=p5sort_files(a.f);for(var c in g){var h,v=g[c],f=v.n;h=40<(h=f).length?EscapeHtml(f.substring(0,40))+"...":EscapeHtml(f),f=EscapeHtml(f);var k="";null!=v.s&&(k=getFileSizeStr(v.s));var b="";if(v.t<3||4==v.t){b="
",deviceHeaderTotal++,void 0===deviceHeaderCount[nodes[a].state]?deviceHeaderCount[nodes[a].state]=1:deviceHeaderCount[nodes[a].state]++}}if(0==sort)for(var a in meshes){var u=meshes[a],m=u.links[userinfo._id];if(null!=m){m.rights;null==i[u._id]&&(""!=n&&""!=e&&(e+=""),e+="
",e+=''+EscapeHtml(u.name)+"
",1==u.mtype&&(e+="
Geen Intel® AMT-apparaten in deze groep"),2==u.mtype&&(e+="
Geen apparaten in deze groep"),e+=".
",n=u._id,o++)}}for(var a in 0==o?QH("xdevices",'
Geen apparaten
Gebruik de desktopversie van deze website om apparaten toe te voegen.
'):QH("xdevices",e),deviceHeaderSet(),deviceHeaders)QH(a,deviceHeaders[a]);for(var a in deviceHeadersTitles)Q(a).title=deviceHeadersTitles[a]}var powerStatetable=["","ingeschakeld","Slaap","Slaap","Slaap","Slaapstand","Uitzetten","Aanwezig"],powerStateStrings=["","ingeschakeld","Slapen","Slapen","Slaapstand","Slaapstand","softwarematig uit","Aanwezig"],powerStateStrings2=["","Apparaat is ingeschakeld","Apparaat bevindt zich in slaapstand (S1)","Apparaat bevindt zich in slaapstand (S2)","Apparaat bevindt zich in diepe slaapstand (S3)","Apparaat is in slaapstand (S4)","Apparaat is uitgeschakeld (S5)","Apparaat is aanwezig, maar de status kan niet worden bepaald"],powerColorTable=["#00000000","black","blue","blue","lightblue","blueviolet","darkgreen","lightseagreen","lightseagreen"];function NodeStateStr(e){var t=[];return 0Agent"),0!=(2&e.conn)?t.push("CIRA"):0!=(4&e.conn)&&t.push("Intel® AMT"),0!=(8&e.conn)&&t.push("Relay"),0!=(16&e.conn)&&t.push("MQTT")),null!=e.pwr&&0!=e.pwr&&t.push(powerStateStrings[e.pwr]),t.join(", ")}function PowerStateStr(e){return et.meshnamel?1:e.meshnamelt.rnamel?1:e.rnamelt.namel?1:e.namelt.rnamel?1:e.rnamelt.namel?1:e.namelt.namel?1:e.namelt.rnamel?1:e.rnamelGeen"),0!=(4&a)&&(s=""+s+""),QH("p10deviceName",s);var l="
",QH("p10html3",l);var k=PowerStateStr(o.state);0!=(1&g)&&(0Mesh Agent"),0!=(2&g)?(0Intel® AMT verbonden"):0!=(4&g)&&(0Intel® AMT gedetecteerd"),0!=(16&g)&&(0"),k+="MQTT-kanaal verbonden"),QH("MainComputerState",k),QH("MainComputerImage",''),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,"Gebruikersaccount beveiliging",1,null,'Geen toegang tot een apparaat totdat tweefactorauthenticatie is ingeschakeld. Dit is vereist voor extra beveiliging. Ga naar de "Mijn account" en bekijk het gedeelte "Accountbeveiliging".');else setDialogMode(2,"Gebruikersaccount beveiliging",1,null,'Geen toegang tot een apparaat totdat een e-mailadres is geverifieerd. Dit is vereist voor wachtwoordherstel. Ga naar de "Mijn account" om een e-mailadres te wijzigen en te verifiëren.')}function deviceToastFunction(){xxdialogMode||setDialogMode(2,"Device Toast",3,deviceToastFunctionEx,"")}function deviceToastFunctionEx(){meshserver.send({action:"toast",nodeids:[currentNode._id],title:"MeshCentral",msg:Q("d2devToast").value})}function setupDeviceMenu(e,t){var n=0;currentNode&&(n=meshes[currentNode.meshid].links[userinfo._id].rights),null!=e&&(currentDevicePanel=e),QV("p10general",0==currentDevicePanel),QV("p10desktop",1==currentDevicePanel),QV("p10files",2==currentDevicePanel);var o=[];0!=currentDevicePanel&&o.push({n:"General",f:"setupDeviceMenu(0)"}),1!=currentDevicePanel&&null!=currentNode&&(8&n||256&n)&&(1==meshes[currentNode.meshid].mtype&&("number"!=typeof currentNode.intelamt.sku||0!=(8¤tNode.intelamt.sku))||currentNode.agent&&1¤tNode.agent.caps)&&o.push({n:"Desktop",f:"setupDeviceMenu(1)"}),2!=currentDevicePanel&&null!=currentNode&&8&n&&(4294967295==n||0==(1024&n))&&2==currentNode.mtype&&4¤tNode.agent.caps&&o.push({n:"Files",f:"setupDeviceMenu(2)"}),updateFooterMenu(o)}function deviceActionFunction(){if(!xxdialogMode){var e=meshes[currentNode.meshid].links[userinfo._id].rights,t="Selecteer een bewerking die u op dit apparaat wilt uitvoeren.
",n=""))}}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&¤tNode._id==powerTimelineNode&&powerTimelineUpdatea+1&&(l=e[a+1]),o.push([i,i+l,s]),i+=l}}var r="",d=1,p=new Date,c=Q("masthead").offsetWidth-122;p.setHours(0,0,0,0);for(a=0;a<7;a++){var u="",m=p.getTime(),g=m+864e5;for(var h in o){var v=o[h];if(1==isTimeBlockInside(m,g,v[0],v[1])){var f=Math.max(m,v[0]),k=Math.min(Math.min(g,v[1]),t),b=Math.round((k-f)*c/864e5);0
");QH("DeskToolsProcesses",i)}}}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,n,o){var i=Q("termdisplays").value;if(0"+t[s]+"";QH("termdisplays",a)}QV("termdisplays",0Root",i=p13filetree.path.split("\\");for(var a in p13filetreelocation=[],i)""!=i[a]&&p13filetreelocation.push(i[a]);for(var a in p13filetreelocation)o+=" / "+p13filetreelocation[a]+"";var s=p13filetreelocation.join("/"),l=p13sort_files(p13filetree.dir);for(var a in l){var r,d=l[a],p=d.n;r=70<(r=p).length?EscapeHtml(p.substring(0,70))+"...":EscapeHtml(p),p=EscapeHtml(p);var c="";null!=d.s&&(c=getFileSizeStr(d.s));var u="";if(d.t<3){u="
';var i=1,a=[];for(var s in currentMesh.links)a.push({id:s,name:s.split("/")[2],rights:currentMesh.links[s].rights});for(var s in a.sort(function(e,t){return e.name>t.name?1:e.name'),n+='
"),QH("p20info",n)}}function p20showDeleteMeshDialog(){if(xxdialogMode)return!1;var e=format("Weet je zeker dat je groep {0} wilt verwijderen? Als u de apparaatgroep verwijdert, wordt ook alle informatie over apparaten binnen deze groep verwijderd.",EscapeHtml(currentMesh.name))+"