From 6045dc766d6c55db3b7f79648dd9c88481b5426b Mon Sep 17 00:00:00 2001 From: Ilia Rostovtsev Date: Fri, 10 Dec 2021 14:01:06 +0300 Subject: [PATCH] Fix sorting without item's calculated size in File Manager https://github.com/virtualmin/authentic-theme/issues/629#issuecomment-990445478 --- extensions/file-manager/file-manager-lib.pl | 3 ++- theme.info | 2 +- unauthenticated/js/bundle.min.js | 2 +- unauthenticated/js/bundle.min.js.gz | Bin 502533 -> 502506 bytes 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/extensions/file-manager/file-manager-lib.pl b/extensions/file-manager/file-manager-lib.pl index 83b226ef3..140dc30de 100644 --- a/extensions/file-manager/file-manager-lib.pl +++ b/extensions/file-manager/file-manager-lib.pl @@ -908,6 +908,7 @@ sub print_content unless (-e $request_uri{'module'} . '/' . $img) { $img = "images/icons/mime/unknown.png"; } + my $is_link = string_contains($type, 'symlink'); my $actions = "$rename_icon"; @@ -992,7 +993,7 @@ sub print_content ( "@{[nice_number($list[$count - 1][8])]}\">" . $size . ""); - push(@td_tags, 'class="col-size"'); + push(@td_tags, 'data-order="' . ($is_link ? 0 : $is_file ? $list[$count - 1][8] : -1) . '" class="col-size"'); } if ($userconfig{'columns'} =~ /owner_user/) { my $user; diff --git a/theme.info b/theme.info index 8d4da1160..6c65c2f79 100644 --- a/theme.info +++ b/theme.info @@ -1,7 +1,7 @@ desc=Authentic Theme longdesc=Webmin/Usermin/Virtualmin/Cloudmin theme based on Bootstrap and Font Awesome (https://github.com/authentic-theme/authentic-theme) version=19.84.6 -mversion=00 +mversion=01 depends=1.982 1.831 depends_reason=https://github.com/webmin/webmin/commit/ae6921a webmin=1 diff --git a/unauthenticated/js/bundle.min.js b/unauthenticated/js/bundle.min.js index a7cb3c5b3..80efc705f 100644 --- a/unauthenticated/js/bundle.min.js +++ b/unauthenticated/js/bundle.min.js @@ -180,4 +180,4 @@ var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.findInternal=function(t,e,n){t * Copyright Ilia Rostovtsev * Licensed under MIT (https://github.com/authentic-theme/authentic-theme/blob/master/LICENSE) */ -if(!Array.prototype.includes){Object.defineProperty(Array.prototype,"includes",{value:function(e,t){if(this==null){throw new TypeError('"this" is null or not defined')}var n=Object(this);var a=n.length>>>0;if(a===0){return false}var i=t|0;var s=Math.max(i>=0?i:a-Math.abs(i),0);function r(e,t){return e===t||typeof e==="number"&&typeof t==="number"&&isNaN(e)&&isNaN(t)}while(s>>0;for(var i=0;i input"}},event:{page:{end:"ready pjax:end"}}},level:-1};const browser={detect:{internet_explorer:function e(){var t=0,n=/MSIE (\d+\.\d+);/.test(navigator.userAgent),a=!!navigator.userAgent.match(/Trident\/7.0/),i=navigator.userAgent.indexOf("rv:11.0");return n&&(t=new Number(RegExp.$1)),-1!=navigator.appVersion.indexOf("MSIE 10")&&(t=10),a&&-1!=i&&(t=11),t},safari:function e(t){var n=window.navigator.userAgent,a=(!!n.match(/iPad/i)||!!n.match(/iPhone/i))&&!!n.match(/WebKit/i)&&!n.match(/CriOS/i)&&!n.match(/OPiOS/i),i=navigator.vendor&&navigator.vendor.indexOf("Apple")>-1&&navigator.userAgent&&!navigator.userAgent.match("CriOS");return t?a:i},firefox:function(){return/firefox/i.test(navigator.userAgent)}},storage:{size:function e(t){var n=String(),a=t?"MB":"KB";for(var i in window.localStorage){window.localStorage.hasOwnProperty(i)&&(n+=window.localStorage[i])}return n?((3+16*n.length/8192)/(t?1024:1)).toFixed(2)+" "+a:"Empty (0 "+a+")"}},set:function(){if(browser.detect.safari()){$(document.body).attr("data-browser","safari")}else if(browser.detect.firefox()){$(document.body).attr("data-browser","firefox")}}};const platform={detect:function(){var e=window.navigator.userAgent,t=window.navigator.platform,n=["Macintosh","MacIntel","MacPPC","Mac68K"],a=["Win32","Win64","Windows","WinCE"],i=["iPhone","iPad","iPod"],s=null;if(n.indexOf(t)!==-1){s="mac"}else if(i.indexOf(t)!==-1){s="ios"}else if(a.indexOf(t)!==-1){s="windows"}else if(/Android/.test(e)){s="android"}else if(!s&&/Linux/.test(t)){s="linux"}return s},set:function(){var e=this.detect();if(e){$(document.body).attr("data-platform",e)}}};const Convert={arrFlip:function(e){var t,n={};for(t in e){if(e.hasOwnProperty(t)){n[e[t]]=t}}return n},uriDecodeComponent:function(e,t){var n=String(),a,i=0,s,r;typeof t==="undefined"?t=0:0;a=e?e.split(/(%(?:d0|d1)%.{2})/):[];if($.isEmptyObject(a)){return e}for(s=a.length;i":">",'"':""","'":"'","=":"="};return String(e).replace(/[&<>"'=]/g,function(e){return t[e]})},htmlUnEscape:function(e){var t=[["amp","&"],["apos","'"],["#x27","'"],["#x2F","/"],["#39","'"],["#47","/"],["#61","="],["lt","<"],["gt",">"],["nbsp"," "],["quot",'"']];if(!!e){for(var n=0,a=t.length;n");e=e.replaceAll(t,n)});return e},htmlDecode:function(e){return e.replace(/\\x([0-9A-Fa-f]{2})/g,function(){return String.fromCharCode(parseInt(arguments[1],16))})},textTruncate:function(e,t,n){if(e.length<=t)return e;n=n||"...";var a=n.length,i=t-a,s=Math.ceil(i/2),r=Math.floor(i/2);return e.substr(0,s)+n+e.substr(e.length-r)},htmlStrip:function(e){var t=(new DOMParser).parseFromString(e,"text/html");return t.body.textContent||""},pathnamePopLast:function(e){var t=!!~e.indexOf("%2F")?"%2F":"/",n=e.split(t),a;n.pop();a=n.join(t);return a?a:"/"},strUpFirst:function(e){return e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()},strUpFirstEach:function(e){return e.replace(/\w\S*/g,function(e){return e.charAt(0).toUpperCase()+e.substr(1).toLowerCase()})},strUpInitial:function(e){return e.length?this.strUpFirst(e.toLowerCase()):e},json_to_query:function(e){if(typeof e!=="object"){return String()}return""+Object.entries(e).map(function(e){var t=e[0],n=e[1];return t+"="+encodeURIComponent(n)}).join("&")},json_to_string:function(e,t){var n="";for(var a in e){if(e.hasOwnProperty(a)){n+=a+": "+e[a]+(t?"
":"")}}return n},serialized_to_json:function(e){if(e.startsWith('"')||e.endsWith('"')){e=e.replace(/^"|"$/g,String())}var t={},n=(e[0]==="?"?e.substr(1):e).split("&");for(var a=0;a=n&&c=5&&f<=100){f=Math.round(f/5)*5}else if(f>100&&f<=1e3){f=Math.round(f/50)*50}else if(f>1e3&&f<=1e4){f=Math.round(f/100)*100}else if(f>1e4&&f<=1e5){f=Math.round(f/250)*250}else if(f>1e5){f=Math.round(f/500)*500}}return f+" "+d[c]}};const core={error:{get:function(){return $(".container-fluid .panel-body [data-fatal-error-text]").html()},clean:function(){$(".container-fluid [data-fatal-error-text] ~ .btn-primary.btn-lg.page_footer_submit").remove();$(".container-fluid [data-header-left] .btn-group").empty()}},get_global_vars:function(e,t){var n=t?{}:[],a=window;for(var i=0;i-1){return true}else{return false}},curModuleFileQuery:function(e,t,n){return $('body[class*="'+e+'"]').length&&v___location_file==t&&(v___location_query&&v___location_query.indexOf(n)!==-1)},curModuleFile:function(e,t,n){var a=v___location_file==t;if(!t){if(typeof t==="undefined"){t=""}a=v___location_file===t||v___location_file==="index.cgi"}var i=$('body[class*="'+e+'"]').length;if(n){i=$("body").hasClass(e)}return i&&a},curModule:function(e,t){var n=$('body[class*="'+e+'"]').length;if(t){n=$("body").hasClass(e)}return n},moduleFile:function(e,t,n){if(e.includes("/")&&e.includes(".cgi")){var a=e.split("/"),i,s,r;a.filter(function(e,t){if(e.includes(".cgi")){i=t}});s=a[i-1];r=a[i];if(s&&s.includes(t)&&r&&r.includes(n)){return 1}}return 0},updateModuleData:function(e,t,n){$.ajax({type:"POST",url:v___location_prefix+e,data:false,dataType:"text",success:function(e){if(!session.status(e)){return}var a=$(e).find("form.ui_form");$.each(n,function(e,t){a.find('[name="'+e+'"]').val(t)});setTimeout(function(){$.ajax({type:"POST",url:v___location_prefix+t,data:$(a).serialize(),dataType:"text",success:function(e){if(!session.status(e)){return}},error:function(){}})},100)},error:function(){}})},getModuleData:function(e){return $.ajax({type:"POST",url:v___location_prefix+e,data:false,dataType:"text",success:function(e){if(!session.status(e)){return}},error:function(){}})},setModuleData:function(e,t){this.getModuleData(e).then(function(e){return $(e).find("form.ui_form").serializeArray()}).done(function(e){var n={};$.each($(e),function(){n[this.name]=this.value}).promise().done(function(){$.each(t,function(e,t){var a=$('[name="'+t+'"]');a.val(n[t]);if(a.is("select")){a.find("[data-clear]").remove()}})})})}};const HTML={bottom_progress:function(e,t,n){return'
'+(n?'
':"")+'
'+(n?"":"1%")+""+(n?'':"")+'
'},label:{textMaxLevels:function(e,t,n){var a="bg-",i=a+"semi-transparent",s=a+"warning",r=a+"danger",n=t.indexOf("°C")>-1,o=30,l=60,d=80,c=86,f=140,_=176,u=parseInt(settings_sysinfo_cpu_fans_base_rpm),g=u,p=u*2;t=parseInt(t);if(e==="temperature"){if(n){return t<=o?i:t>o&&t<=l?i:t>l&&t<=d?s:t>d?r:""}else{return t<=c?i:t>c&&t<=f?i:t>f&&t<=_?s:t>_?r:""}}else if(e==="rpm"){return t<=g?i:t>=g+1&&t<=p?s:r}}},template:{accordion:function(e,t,n,a){var i='
';for(var s=0;s'+'"+'
'+'
'+n[s]+"
"+"
"}i+="";return i},page_content_preloader:function(e,t,n){return'
 '+e+'
'},reauthenticate:function(e){var t=Test.strContains(get_server_data("webprefix"),"servers/link.cgi")?1:0;return'
'+'
'+'
'+'
'+'
'+''+"
"+'
'+"

"+theme_language("session_expired")+"

"+""+theme_language("session_expired_details")+""+"
"+"
"+'
'+'
'+'
'+'"+'
'+'"+''+"
"+'"+""+"
"+"
"+"
"+"
"+"
"}}};const load={loaded:[],bundle:function($scripts__,$css__,callBack__,callBackCalledNoEval__){var execute_load=function($script,$css,callBack,callBackCalledNoEval){var head=$("head"),initial_name=$script;callBack=typeof callBack=="object"?callBack:false;var css=(!$css?0:$css===1?$script:$css)+"."+v___source_type+".css",js=$script+"."+v___source_type+".js";if(!Test.strContains(initial_name,v___server_extensions_path)&&!Test.strContains(initial_name,v___server_js_path)){css=v___server_css_path+"/"+css;js=v___server_js_path+"/"+js}var processCallbacks=function(_callBack,_callBackCalledNoEval){if(_callBack&&!_callBackCalledNoEval){$.each(_callBack,function(i2,v2){try{eval(v2)}catch(e){var attemp=0;var check_loaded_func=setInterval(function(){attemp++;if(attemp>1e3){clearInterval(check_loaded_func)}try{eval(v2);clearInterval(check_loaded_func)}catch(e){}},10)}})}else if(_callBack&&_callBackCalledNoEval&&_callBackCalledNoEval!==2&&_callBackCalledNoEval!==3){$.each(_callBack,function(e,t){t.call()})}else if(_callBack&&_callBackCalledNoEval&&(_callBackCalledNoEval===2||_callBackCalledNoEval===3)){$.each(_callBack,function(e,t){if(_callBackCalledNoEval===3){window[e].call(null,t)}else{window[e].apply(null,t)}})}};if(!load.loaded.includes(initial_name)){o___gotten_scripts.push(js);load.loaded.push(initial_name);var thecsslink='';$css&&(css.includes(v___server_extensions_path)?head.append(thecsslink):head.find('link[rel="stylesheet"]:first').before(thecsslink));$.getScript(js+"?"+theme.version(true,true)*10,function(){processCallbacks(callBack,callBackCalledNoEval)}).fail(function(e){if(e.statusText!=="canceled"){connection_error(e,1)}})}else if(callBack||callBackCalledNoEval){processCallbacks(callBack,callBackCalledNoEval)}};if($.isArray($scripts__)){$scripts__.forEach(function(e,t,n){if(Object.is(n.length-1,t)){execute_load(e,$css__,callBack__,callBackCalledNoEval__)}else{execute_load(e,$css__,0,0)}})}else{execute_load($scripts__,$css__,callBack__,callBackCalledNoEval__)}}};const page={handle:{content:{offset:function(e){var t=core.curModuleFile("mailbox","",1)||core.curModuleFile("mailbox","index.cgi",1);is_offset=core.curModuleFileQuery("syslog","save_log.cgi","view=")||core.curModuleFile("virtual-server","edit_html.cgi")||core.curModuleFile("mysql","view_table.cgi")||core.curModuleFile("postgresql","view_table.cgi")||t||core.curModule(v___module_file_manager)||v___page_hasEditor||!settings_enable_container_offset?0:1;if(t&&settings_mail_ui&&e){if(!$(".container-fluid > .panel-mail").length){return}}if(e){var n=$(".container-fluid");if(page.handle.content.offset()){n.addClass("col-lg-10 col-lg-offset-1").removeClass("margined-top-15")}else{n.removeClass("col-lg-10 col-lg-offset-1").addClass("margined-top-15")}}else{return is_offset}},preloader:{processing:function(){return $(".container-fluid-loading").length},hide:function(){if(page.handle.content.preloader.processing()){page.handle.content.preloader.show()}},show:function(e,t,n){var a=this,i=$("#content"),s=$(".container-fluid"),r=$(".container-fluid-loading"),o=t?t:$("span[data-main_title]").text(),l="container-fluid-loading-persistent",d=e===-2?l:0,c=HTML.template.page_content_preloader(o,d,n);if(e!==-2&&r.length&&r.hasClass(l)){r.removeClass(l);return}if(e===-1){return i.hasClass("progressing")}if(r.length){r.remove();s.removeClass("invisible");i.removeClass("progressing progressing-preloading");setTimeout(function(){if(progress.status()){progress.end()}},10)}else{if(!core.error.get()){i.addClass("progressing progressing-preloading").prepend(c);s.addClass("invisible")}}if(e&&e!==-2){setTimeout(function(){a.preloader()},e)}}}}},render:{content:{filter:{init:function(e,t){var n=this,a="container-fluid",i=""+a+" .nav.nav-tabs",s="dataTables_filter",r=$(".__page ."+s+""),o=$(".__page .panel-filter"),l=".panel-filter .panel.panel-default",d="dataTable-mirror",c="filter_mirror_clear",f="filter-value",_="btn-filter-top-right",u="btn-accordion-filter",g="btn-toggle-accordions",p=$("body");if(r.length||o.length){setTimeout(function(){if(!$("."+_+"").length&&!$("."+u+"").length){$("#headln2r .btn-group a").addClass("pull-left").attr("style","");$("#headln2r .btn-group").prepend(''+""+''+""+(e?'':"")+"")}$(".btn-filter-gl").data("title",theme_language("datatable_filter")).attr("aria-label",theme_language("datatable_filter"));$("."+g).data("title",theme_language("toggle_accordions")).attr("aria-label",theme_language("toggle_accordions"));$(".btn-group").tooltip({selector:'a[data-toggle="tooltip"][data-skip]',container:"body",trigger:"hover",delay:{show:vars.plugins.tooltip.delay.show,hide:vars.plugins.tooltip.delay.hide}});n.clear();if($("."+i+"").length){if(e){p.on("hide.bs.tab",'a[data-toggle="tab"]',function(e){n.clear()})}p.on("shown.bs.tab",'a[data-toggle="tab"]',function(e){var t=$(e.target).parent(".active");if(t.data(f)){$("."+d+"").val(t.data(f)).trigger("input")}else{$("."+d+"").val("").trigger("input")}n.visibility(_,u,g,i)})}p.undelegate(l,"shown.bs.collapse.config hidden.bs.collapse.config");p.on("shown.bs.collapse.config hidden.bs.collapse.config",l,function(e){var t=$("."+a+" .collapsing").length;if(t){return}setTimeout(function(){var e=$("."+a).find("."+g).find("i");if(o.find(".panel-collapse").length===o.find(".panel-collapse.in").length){e.addClass("fa-toggle-switch text-light")}else{e.removeClass("fa-toggle-switch text-light")}},0)});var t=$("."+g+"");if(!e){var r=$("."+s+"");r.hide()}else{$(o).find('a[data-toggle="collapse"]').on("click",function(e){$.trim($("."+d).val()).length&&page.render.content.filter.clear();e.originalEvent&&$("."+g+"").find("i").removeClass("fa-toggle-switch text-light")})}$("."+c+"").mousedown(function(e){if($(e.target).is("."+c+"")){n.clear()}});$("."+_+", ."+u+"").click(function(e){!$(e.target).is("input")&&$(this).find("label").slideToggle(300,function(){$(this).find("input").focus()})});t.click(function(e){e.stopImmediatePropagation();var t="fa-toggle-switch",a=$(this).find(".fa"),i=$(this).find("."+t).length?1:0,s=$(".__page .panel-filter:visible");if(i===0){if(s.find(".panel-collapse.in").length===s.find(".panel-collapse").length){}s.find(".panel-collapse:not(.in):not(.collapsing)").filter(function(){$(this).removeData("bs.collapse").collapse({parent:true,toggle:false}).collapse("show").removeData("bs.collapse")})}else{s.find(".panel-collapse.in:not(.collapsing)").filter(function(){$(this).attr("aria-static")!=="true"&&$(this).collapse("hide")})}a.toggleClass(t+" text-light");if(e.originalEvent!==undefined&&$("."+u+" input").val().length){n.clear()}});function h(n){var a=n.val(),r=$(".__page .panel-filter:visible");if(!e){var o="."+s+" input";if($("."+i+"").length){$(".nav-tabs li.active").data(f,a);$(".active "+o).val(a).trigger("input")}else{$(o).val(a).trigger("input")}}else{if(a){$.support.transition&&($.support.transition=false);t.find(".fa-toggle-switch-off:not(.fa-toggle-switch)").trigger("click");r.find(".panel tr:not([data-empty-row]):not(.hidden-skip)").addClass("hidden-forged");var d=r.find('.panel tbody tr:contains("'+a+'")');d.removeClass("hidden-forged");$.each($(l=" .hidden-dependent-skip"),function(e){if($(this).hasClass("hidden-forged")){$(this).nextAll(".hidden-skip").addClass("hidden-forged")}else{$(this).nextAll(".hidden-skip").removeClass("hidden-forged")}});var c=$(".__page .panel-filter:visible");$.each(c.find(".panel"),function(){var e=$(this).find("tr").first().find("td").length;rows=$(this).find("tbody").find("tr:not([data-empty-row])"),hidden_rows=$(this).find("tbody tr:not([data-empty-row]):hidden");var t=$(this).find("tbody tr[data-empty-row]");if(rows.length===hidden_rows.length){!t.length?$(this).find("tbody").append(''+theme_language("filter_content_no_matches_query").replace("%str",""+a+"")+""):$(this).find("tbody").find("var[data-query-str]").text(a)}else{t.remove()}})}else{t.find(".fa-toggle-switch").trigger("click");r.find(".panel tr").removeClass("hidden-forged");r.find(".panel tr[data-empty-row]").remove();!$.support.transition&&($.support.transition={end:"webkitTransitionEnd"})}}var g="."+_+" span, ."+u+" span",p="."+_+" i, ."+u+" i";if($.trim(a).length>0){$(g).removeClass("text-lighter");$(p).addClass("text-danger")}else{$(g).addClass("text-lighter");$(p).removeClass("text-danger")}}var v;var m=200;$("."+d+"").keydown(function(e){var t=e.originalEvent!==undefined?m:0;if(e.keyCode==76&&e.ctrlKey||e.keyCode==27){e.preventDefault();e.stopPropagation();if(t){setTimeout(function(){n.clear()},t)}else{n.clear()}}else{t&&clearTimeout(v)}}).on("input keyup",function(e){var t=$(this),n=e.originalEvent!==undefined?m:0;$(".btn-filter-gl").tooltip("hide");if(n){clearTimeout(v);v=setTimeout(function(){h(t)},n)}else{h(t)}});$("."+_+" input, ."+u+" input").blur(function(e){$(this).parent("label").slideToggle(0)});n.visibility(_,u,g,i)},0)}},visibility:function(e,t,n,a){var i=$("."+e+", ."+t+", ."+n+"");if($("."+a+"").length&&($(".active .dataTables_filter").length||$(".active #conf-_-gr").length)||!$("."+a+"").length&&($(".dataTables_filter").length||$("#conf-_-gr").length)){i.show()}else{i.hide()}},clear:function(){var e="btn-filter-top-right",t="dataTable-mirror",n="btn-accordion-filter",a=$("."+e+" ."+t+", ."+n+" ."+t+""),i=$("."+e+" input, ."+n+" input");a.val("").trigger("input");i.is(":visible")&&i.trigger("blur");$(".panel-filter").find("tr[data-empty-row]").remove();!$.support.transition&&($.support.transition={end:"webkitTransitionEnd"})}}}},branding:{selector:function(){return $("body").find(".branding-backdrop")},status:function(){return this.selector().length},process:function(e){var t=this,n=settings_product_branding_show_time_min_privileged,a=n>=1&&n<=10?n*1e3:1e3,i=settings_product_branding_show_time_max_privileged,s=i>=1&&i<=120?i*1e3:2e3,r=a/10,o="keydown.brand click.brand",l=function(){clearInterval(t.tiktok);t._stopped=1;vars.page.shown=1;var e=function(){setTimeout(function(){t.selector().off(o).remove();!page.load.happening()&&theme_title_generate();!page.load.happening()&&progress.end()},50)};vars.page.locked=0;e()};if(t._stopped){return}if(e){if(t._running2){clearInterval(t._tiktok);clearTimeout(t._exec);l()}}})}}}},load:{happening:function(){var e=vars.pjax.progressing,t=vars.ajax.progressing;if(e||t){return 1}else{return 0}}}};const pjax={clear:{modules:function(e){if(v___module==="csf"&&typeof __c_____undel==="function"){__c_____undel(e.url)}if(v___module===v___module_file_manager&&typeof __f_____undel==="function"&&typeof jsPanel==="object"&&typeof $v__fm__container_fluid==="string"){if(!Test.strContains(e.url,v___module_file_manager+"/config.cgi")&&!Test.strContains(e.url,v___module_file_manager+"/index.cgi")&&!Test.strContains(e.url,"save_config.cgi")){__f_____undel()}}if((v___module==="mysql"||v___module==="postgresql")&&typeof __sql_____undel==="function"){__sql_____undel()}if(v___module==="syslog"){typeof refreshTimer==="number"&&clearInterval(refreshTimer)}}}};const progress_percent={body:"body",control:function(e,t,n,a){var i=this,s="bottom_progress",r="."+s+"_level",o="."+s+"_cancel",l=100,d="bottom_progress_horizontal";if(!$(i.body).find("."+s+"es").length){$(i.body).append('
')}var c=$(i.body).find("."+s+"es");if(!c.find('div[data-progress-id="'+e+'"]').length){c.append(HTML.bottom_progress(e,t,a));if(a||c.find("."+d+"").length){c=$(i.body).find("."+s+"es");var f=c.find("."+s+':not(".'+d+'")').addClass("no-animation").detach();c.prepend(f)}c.find('div[data-progress-id="'+e+'"]').find(o).one("click",function(){var e=$(this).parent(),t=e.data("progress-id");e.find(r).removeClass("success").addClass("danger");$(this).remove();setTimeout(function(){e.remove();if(c.find("div[data-progress-id]").length===0){c.remove()}},10*l);window["progress_id_ref_"+t].abort();if(a){window["progress_id_ref_"+t+"_tracker"].abort()}})}var _=c.find('div[data-progress-id="'+e+'"]');_.find(r).css("height",n+"%");if(a){var u=_.find("."+s+"_overlay"),g=".bottom_progress_";_.find(g+"filename").html(''+Convert.htmlEscape(Convert.textTruncate(Convert.htmlDecode(a[0]),24))).attr("title",Convert.htmlEscape(a[0]));u.find(g+"data").text($(Convert.htmlDecode(a[1])).text());u.find(g+"percent").text(a[2]+"%")}else{_.find("."+s+"_overlay").text(n+"%")}if(n==l){_.find(o).remove();setTimeout(function(){_.remove();if(c.find("div[data-progress-id]").length===0){c.remove()}},10*l)}}};const progress={target:"body",element:"top-aprogress",blocked:function(){return vars.page.locked},status:function(){return!settings_hide_top_loader},start:function(){if(this.status()&&!$(this.target).find("."+this.element+"").length){!this.blocked()&&vars.allow_ui_features&&$(this.target).append('
')}},end:function(){!this.blocked()&&!page.load.happening()&&$(this.target).find("."+this.element+"").remove()}};const session={reauthenticate:{start:function(){var e=this,t=e.target;var n=0;!$("."+t).length&&$.ajax({type:"GET",url:v___location_prefix+"/index.cgi",data:false,dataType:"text",success:function(a){var i="container session_login",s="form-signin-banner",r=Test.strContains(a,i+" pam_");if(!Test.strContains(a,s)){var o=e.lock_targets,l=e.lock_type,d=$("body").find(".-shell-port-"),c='',f=$(a).find("._logo_welcome > img").attr("src"),_=function(){return $("."+t).find('input:not([name="user"]):not([name="twofactor"])')};$(o).addClass(l);var u=$("body").append(HTML.template.reauthenticate(t));u.find("."+t+"").find(".fa-times-thin").one("click",function(){session.reauthenticate.end()});plugins.navigation.load.stop();plugins.navigation.detect();plugins.navigation.switch.reset();despinnerfy_buttons();plugins.shell.unlock();plugins.shell.close(d);if(f){$("."+t).append("")}setTimeout(function(){_().trigger("focus")},1e3);$("."+t).find("form").on("submit",function(e){e.preventDefault();e.stopImmediatePropagation();if(r){var i=$("."+t).find('form input[name="user"]');i.attr("name","answer").val(get_server_data("user"))}var s=$(a).find("form").append(c),o=s.attr("action"),l=$("."+t).find("form").serialize(),d=$("."+t).find("[data-submit]"),f=$("."+t+"-header-icon i"),u=$("."+t+"-header-title h3"),g=$("."+t+"-header-title small"),p='input[name="twofactor"]';if(!r){if($("."+t).find(p).is(":visible")){n++}l+="&save=1&failed_twofactor_attempt="+n+""}if(d.hasClass("disabled")){return}g.text(theme_language("signing_in")+"").removeClass("text-danger").addClass("loading-dots");d.addClass("btn-grey disabled").removeClass("btn-success");function h(e,n,a,i,s){var r=function(e){if(!e.endsWith(".")){e=e+"."}e=e.replace(/\n/gm,"");return e};if(n){var o=theme_language(n,1)==="session_failed"?theme_language("session_failed_password"):n;o=r(o);g.text(o).addClass("text-danger").removeClass("loading-dots");d.removeClass("btn-grey disabled").addClass("btn-success");var l=s,c=l.length?$("."+t).find(p):_();c.addClass("faa-horizontal animated");c[0].focus();setTimeout(function(){c.removeClass("faa-horizontal animated");c[0].select()},1e3)}else if(s.length){$("."+t).find("[data-container-twofactor]").removeClass("hidden");var h=r(theme_language("login_message_2fa"));g.text(h).removeClass("loading-dots");d.removeClass("btn-grey disabled").addClass("btn-success");setTimeout(function(){$("."+t).find(p).trigger("focus")})}else if(e&&!a){g.text(theme_language("signing_success")).removeClass("text-danger").removeClass("loading-dots").addClass("text-success");f.removeClass("fa-lock").addClass("fa-unlock fa-rotate-180 fa-flip-horizontal");u.text(theme_language("session_unlocked"));session.alive=1;setTimeout(function(){session.reauthenticate.end()},1800)}}$.ajax({type:"GET",url:o,data:l,dataType:"text",success:function(e){var n=$(e).find(".switch-toggle").text().length,a=$(e).find(".alert span").text(),i=$(e).find(p),s=i.length,l=a.length;if(r){var d=$(e).find("form").append(c),f=d.find('input[name="answer"]').val($("."+t).find('input[type="password"]').val()),_=d.serialize();$.ajax({type:"GET",url:o,data:_,dataType:"text",success:function(e){n=$(e).find(".switch-toggle").text().length;a=$(e).find(".alert span").text();l=a.length;h(n,a,l,e)}})}else if(s){h(n,a,l,e,i)}else{h(n,a,l,e,i)}},error:function(){d.removeClass("btn-grey disabled").addClass("btn-success");g.text(theme_language("connection_error")).addClass("text-danger").addClass("loading-dots")}})})}}})},end:function(){session.alive=1;$("."+this.target).remove();$(this.lock_targets).removeClass(this.lock_type)},target:"session-reauthenticate",lock_targets:"aside, aside .navigation, .form-control.sidebar-search, .jsPanel, #jsPanel-replacement-container, .popover, .container-fluid, .right-side-tabs, .right-side-tabs-toggler",lock_type:"pointer-events-none bg-filter-blur3-grayscale100-opacity35-contrast1-2-brightness0-9 disabled"},status:function(e){if(e&&Test.strContains(e,"container session_login")){this.alive=0;return 0}else{return 1}},alive:1};const Test={true:function(e){return!/^(false|0)$/i.test(e)&&!!e},false:function(e){return/^(false|0)$/i.test(e)||!e},numeric:function(e){return Number(parseFloat(e))==e},string:function(e){return"string"===typeof e||e instanceof String?1:0},strContains:function(e,t){return"string"!==typeof e?!1:!!~e.indexOf(t)},str_contains_multi:function(e,t){if(e){for(var n in t){var a=t[n];if(e.indexOf(a)>-1){return true}}}return false},arrContains:function(e,t,n){typeof n=="undefined"?n=0:!1;e=$.inArray(t,e);return n?e:-1=a},occurrences:function(e,t,n){e+="";t+="";if(t.length<=0)return e.length+1;var a=0,i=0,s=n?1:t.length;while(true){i=e.indexOf(t,i);if(i>=0){++a;i+=s}else break}return a},editing:function(){return $("input:focus").length||$("textarea:focus").length||$('[contenteditable="true"]:focus').length||$('[contenteditable="true"]:focus').length}};const theme={download:function(e,t,n,a){if(a===undefined||a==1||a===true){a=String()}else{a='target="_blank"'}if(e&&t){t=typeof t=="string"?t:$.param(t);var i="";$.each(t.split("&"),function(){var e=this.split("=");i+=''});$("
'+i+"
").appendTo("body").submit().remove()}},veiled:function(e,t,n){var a=$(t||".container-fluid, .container-fluid-loading, .popover, .tooltip, .jsPanel, #jsPanel-replacement-container, aside, .mobile-menu-toggler, #right-side-tabs, .right-side-tabs-toggler"),i=n||"pointer-events-none bg-filter-blur-grayscale-opacity50";if(e===-1){return a.hasClass(i)}if(e){a.addClass(i)}else{a.removeClass(i)}},update:function(e,t,n){var a=e===1?"-release":"-beta",i=n?"&xhr-update-version="+n+"":String();theme.veiled(1);set_onbeforeunload_status(1,0);plugins.messenger.post(''+theme_language("git_patch_initiated")+" "+theme_language("global_please_wait")+'   ',1800,"info","themeUpgrade",0);$.ajax({type:"POST",url:v___location_prefix+"/index.cgi?xhr-update=1&xhr-update-type="+a+"&xhr-update-force="+t+""+i,data:false,dataType:"json",success:function(e){if(e[0]&&e[0].success){plugins.messenger.post(''+e[0].success,4,"success","themeUpgrade");plugins.slider.notifications.dismiss("authentic_remote_version");set_server_theme_temp_data("goto",v___location_prefix+"/sysinfo.cgi");setTimeout(function(){theme_reload()},2e3)}else if(e[0]&&e[0].no_connection){plugins.messenger.post(''+e[0].no_connection,40,"warning","themeUpgrade");theme.veiled(0)}else if(e[0]&&e[0].no_git){plugins.messenger.post(''+e[0].no_git,20,"warning","themeUpgrade");theme.veiled(0)}else if(e[0]&&e[0].incompatible){plugins.messenger.post(''+e[0].incompatible,120,"error","themeUpgrade");theme.veiled(0)}else{plugins.messenger.post(''+theme_language("git_patch_update"),20,"error","themeUpgrade");theme.veiled(0)}},error:function(e){session.status(e.responseText);plugins.messenger.post(''+theme_language("git_patch_update"),20,"error","themeUpgrade");theme.veiled(0)},complete:function(e){set_onbeforeunload_status(0,0)}})},update_message:function(){var e="theme_update_refresh";if(!theme_message_exists(e)){Messenger().hideAll();var t={cancel:{label:theme_language("filemanager_context_refresh").toUpperCase(),action:function(){var e="cursor-wait",t=$(this.$message),n=t.find("[data-action]"),a=n.find("a");if(a.hasClass(e)){return}a.addClass(e);t.addClass(e);$.ajax({type:"POST",url:v___location_prefix+"/index.cgi/?xhr-theme_clear_cache=1",data:false,dataType:"text",complete:function(n){location.reload();setTimeout(function(){a.removeClass(e);t.removeClass(e)},3e3)}})}}};plugins.messenger.post(["fa-lg fa-fw fa-exclamation-circle",theme_language("theme_update_available")],0,"default",e,0,["bottom","left"],t);$(window["Messenger_"+e].$el).parent().addClass("messenger-fit-content").find("a").addClass("x9")}},version:function(e,t){var n=get_server_data("theme-version").toString(),a=get_server_data("theme-mversion").toString(),i=Test.strContains(n,"alpha"),s=Test.strContains(n,"beta"),r=Test.strContains(n,"RC"),o=i||s||r,l=o?n.match(/.*?(\d+$)/)[1]:0,d=l?l<10?"0"+l:l:99;debug_ver=parseInt(get_server_data("debug"));if(e){return parseInt(n.replace(/\./g,"").replace(/-alpha.*/g,"").replace(/-beta.*/g,"").replace(/-RC.*/g,"")+(t?debug_ver||o?"9"+moment().unix()+""+a+"":"99999999999"+a:(i?1:s?2:r?3:9)+""+d+""+""+a+""))}!theme.version.current&&(theme.version.current=theme.version(true));return t?n+(parseInt(a)>1?"-"+parseInt(a):""):n},visibility:{set:function(e){var t=this;if(!t.calling&&settings_sysinfo_real_time_status!==2){if(e===true){typeof stats==="object"&&stats.general.enable()}else{typeof stats==="object"&&stats.general.disable()}t.calling=1;setTimeout(function(){t.calling=0},1)}vars.events.keypressed.shift=false;vars.events.keypressed.alt=false},get:function(){return document.hasFocus()}},config:{_:{form:{tconfig:function(){return $('body[data-uri*="tconfig.cgi"] form[action*="tconfig.cgi"]#settings_')}},funcs:{event:function(e){var t=e==="reset"?"evttcrs":"";return t},dependent_radios:function(e,t,n,a){var i=theme.config._.funcs.event("reset");if(!a){a=theme.config._.form.tconfig()}var s=function(e,t,n,a){var i=a.find('input[name="'+e+'"]:checked'),s=t,r=i.val()=="true"||parseInt(i.val())>0?true:false,o="disabled pointer-events-none";if(n){r=!r}$.each(s,function(e,t){a.find('[name="'+t+'"]:not(a)').toggleClass(""+o+" opacity-0_6",r);a.find('[name="'+t+'"]').parent(".awradio").toggleClass(o,r)})};a.find('input[name="'+e+'"]').on("change "+i+"",function(){s(e,t,n,a)}).trigger("change")}}},current:{_data:{},set:function(){this._data=core.get_global_vars(["config_portable","settings"])},get:function(){return this._data},reset:function(){var e=theme.config._.form.tconfig(),t=e[0],n=this.get();if(t){var a=t.elements,i=theme.config._.funcs.event("reset");for(var s=0,r;r=a[s++];){if(typeof n[r.name]!=="undefined"){window[r.name]=n[r.name];if(r.type==="radio"){e.find('[name="'+r.name+'"][value="'+n[r.name]+'"]').prop("checked",true).trigger(i)}else{e.find('[name="'+r.name+'"]').val(n[r.name]).trigger(i)}}}theme_config_controls(0);set_onbeforeunload_status(0,0)}}},format:function(e,t){var n;if(t=="true"||t=="false"){if(t=="true"){n=true}else{if(t=="false"){n=false}}}else{n=t}var a=Test.numeric(n)?n&&n.length>16?n:parseFloat(n):n;window[e]=a},apply:function(e,t){var n=this;if(!e){e=n._.form.tconfig()}$.each($(e.serializeArray()),function(e,t){if(t.name.endsWith("_user")||!t.name.startsWith("settings_")&&!t.name.startsWith("config_portable")){return true}n.format(t.name,t.value)}).promise().done(function(){if(t){n.save()}})},save:function(){var e=core.get_global_vars(["config_portable","settings"]);$.ajax({type:"POST",url:v___location_prefix+"/index.cgi?xhr-manage-config=1&save=1&"+Convert.json_to_query(e),dataType:"text",success:function(e){if(!session.status(e)){return}},error:function(){}});this.current.set()},events:function(e){var t=this,n=t._.funcs.event("reset");if(v___location_path_lead_unslashed==v___location_prefix_unslashed_trail_slashed+"tconfig.cgi"){var a=this._.form.tconfig(),i=a.find("select:not([multiple]), input"),s="body";t.apply();i.on("input",function(e){t.format($(this).attr("name"),$(this).val());if(e.originalEvent!==undefined){theme_config_controls(1)}});var r="resize.cnff";$(window).off(r);$(window).on(r,function(e){e.preventDefault();var n=t._.form.tconfig(),a=n.find(".ui_form_end_buttons"),i=a.length;if(!i){$(this).off()}else{var s=n.find('input[name="settings_leftmenu_width"]');$(".mobile-menu-toggler:visible").length?s.prop("disabled",true):s.prop("disabled",false);var r='input[name="settings_side_slider_fixed"]',o=settings_navigation_always_collapse||window.matchMedia("(max-width: 1365px)").matches?true:false,l=n.find('input[name="settings_side_slider_enabled"]:checked').val()!="false";if(o&&!$.browser.mobile){n.find('input[name="settings_side_slider_fixed"][value="false"]').trigger("click")}l&&n.find(r).prop("disabled",o)}}).trigger(r);(function(){var e=a.find("#atrestore:not(.disabled)");$(s).undelegate(e,"click");$(e).off("click.confirm");$(e).on("click",function(){var e=get_onbeforeunload_status(),t=2500;set_onbeforeunload_status(0);if(e){setTimeout(function(){set_onbeforeunload_status(e)},t)}});$(e).confirmation({classNameRemove:"btn-default"},function(){$(this).off();var e=$(this);if(!e.hasClass("btn-inverse")){setTimeout(function(){spinnerfy_buttons(e,[1.5,-33,"small",false]);$.ajax({type:"POST",url:v___location_prefix+"/index.cgi?xhr-settings=1&restore=1",success:function(e){if(!session.status(e)){return}theme_reload()},error:function(t){e.addClass("btn-danger").removeClass("btn-default btn-inverse opacity-0_5")}})},0)}})})();(function(){var e=a.find('input[name="settings_sysinfo_theme_updates"]').first().parents("td").parent("tr");if(e.length){var t=get_server_data("theme-version"),n="tmp_spinner_theme_version",i="data-theme-version-container",s="data-theme-versions",r="data-theme-stable-version",o=e.find("td").first(),l=o.find(".smaller"),d=e.next("tr").find("td").first().find("b");l.append(' ('+theme_language("global_installed_version").toLowerCase()+" "+t+')"+theme_spinner_small("in-btn-md "+n+""," ","width:10px; height:10px; margin-left: 5px;"));$.ajax({type:"POST",url:v___location_prefix+"/index.cgi/?xhr-theme_latest_version=1",data:false,dataType:"json",success:function(e){var a=String(),o=e[0],l=o!=e[1]?e[1]:false,d=$("[data-text-installed]"),c=$("."+n),f=$("em["+r+"]"),_=$("span["+s+"]"),u=5;if(t){t=t.toString();var g=t.match(/([\d\.]+)/);if(g){u=g[1].length}}if(o){o=o.toString();var p=o.match(/([\d\.]+)/);if(p){u=p[1].length}}if(l){l=l.toString()}if(o&&o!=t){a+=", "+theme_language("global_latest_stable").toLowerCase()+" '+o+""}if(l&&l!=t){a+=", "+theme_language("global_latest_beta").toLowerCase()+" '+l+""}if(t&&t.length<=u&&o&&o.length<=u&&o.toString()!=t.toString()){f.addClass("text-danger")}if(a&&!a.length){d.text(theme_language("global_installed_and_latest_version").toLowerCase());f.addClass("text-success")}_.replaceWith(a);c.remove()},error:function(){}})}})();this._.funcs.dependent_radios("settings_right_table_links_type",["settings_right_table_animate_icons","settings_right_table_grayscaled_icons"],true);this._.funcs.dependent_radios("settings_hotkeys_active",["settings_hotkey_custom_1_user","settings_hotkey_custom_2_user","settings_hotkey_custom_3_user","settings_hotkey_custom_4_user","settings_hotkey_custom_5_user","settings_hotkey_custom_6_user","settings_hotkey_custom_7_user","settings_hotkey_custom_8_user","settings_hotkey_custom_9_user","settings_hotkey_toggle_modifier","settings_hotkey_toggle_key_webmin","settings_hotkey_toggle_key_virtualmin","settings_hotkey_toggle_key_cloudmin","settings_hotkey_toggle_key_usermin","settings_hotkey_toggle_key_webmail","settings_hotkey_shell2","settings_hotkey_focus_search","settings_hotkey_navigation","settings_hotkey_slider","settings_hotkey_toggle_slider","settings_hotkey_reload","settings_hotkey_reload","settings_hotkey_toggle_key_night_mode","settings_hotkey_sysinfo","settings_hotkey_favorites"],true);this._.funcs.dependent_radios("settings_side_slider_enabled",["settings_side_slider_fixed","settings_side_slider_fixed_toggle","settings_side_slider_sysinfo_enabled","settings_side_slider_notifications_enabled","settings_side_slider_favorites_enabled"],true);this._.funcs.dependent_radios("settings_sysinfo_real_time_status",["settings_sysinfo_real_time_status_disk","settings_sysinfo_real_time_stored","settings_sysinfo_real_time_stored_length"],true);this._.funcs.dependent_radios("settings_sysinfo_real_time_stored",["settings_sysinfo_real_time_stored_length"],true);this._.funcs.dependent_radios("settings_sysinfo_easypie_charts",["settings_sysinfo_easypie_charts_size","settings_sysinfo_easypie_charts_width","settings_sysinfo_easypie_charts_scale"],true);this._.funcs.dependent_radios("settings_sysinfo_theme_updates",["settings_cache_interval"],true);if(plugins.navigation.switch.dashboard.get()){a.find('[name="settings_sysinfo_link_mini"]').parents("span").parent("td").parent("tr").remove()}(function(){var e=a.find('input[name="settings_table_init_datatables"]');e.on("input "+n+"",function(){var e=$(this).next("span"),t=parseFloat(this.value),n=t+" "+theme_language("theme_xhred_global_rows").toLowerCase();n=" ("+n+")";if(!e.is("span")){$(this).after('  '+n+"")}else{e.text(n)}});e.trigger("input")})();(function(){a.find('select[name="settings_navigation_color"]').on("keyup change "+n+"",function(){var e=$(this).val(),n=$("link[data-palette]"),a=e!="blue";if(a){$("head").append('')}setTimeout(function(){get_server_data("data-theme",e);n.remove();get_server_data("data-default-theme",e);$(s).find(".user-link.palette-toggle").find(".fa-sun").trigger("click");t.apply()},a?800:0)})})();(function(){a.find('input[name="settings_side_slider_enabled"]').on("change "+n+"",function(){var e="body .right-side-tabs",n=$(this).val()=="true"?true:false;$(""+e+"-toggler").toggleClass("hidden",!n);$(""+e+"").toggleClass("hidden",!n);if(n){$('input[name="settings_side_slider_sysinfo_enabled"][value="true"], input[name="settings_side_slider_notifications_enabled"][value="true"], input[name="settings_side_slider_favorites_enabled"][value="true"]').trigger("click")}t.apply();page_resized();settings_side_slider_fixed&&plugins.slider.state(~~n)});a.find('input[name="settings_side_slider_fixed"]').on("change "+n+"",function(){vars.slider.pinned=-1;var e=$(".right-side-tabs-dismiss .fa2-collapse-right"),n=$(this).val()=="true"?true:false;plugins.slider.state(n);e.toggleClass("fa-rotate-45",!n);t.apply()});a.find('input[name="settings_side_slider_sysinfo_enabled"], input[name="settings_side_slider_notifications_enabled"], input[name="settings_side_slider_favorites_enabled"]').on("change "+n+"",function(){var e="right-side-tabs-"+$(this).attr("name").split("_")[3],t=$(this).attr("name"),n=$(s).find("#"+e).hasClass("active"),a=$('input[name="settings_side_slider_sysinfo_enabled"][value="true"]:checked, input[name="settings_side_slider_notifications_enabled"][value="true"]:checked, input[name="settings_side_slider_favorites_enabled"][value="true"]:checked').length;if($(this).val()=="true"){$(s).find('a[href="#'+e+'"], #'+e+"").removeClass("hidden").parent().removeClass("hidden");if(t==="settings_side_slider_notifications_enabled"){$(".right-side-tab-notification-asterix").removeClass("invisible hidden hidden-forged");$(".right-side-tabs-toggler .badge.badge-danger").removeClass("invisible hidden hidden-forged");setTimeout(function(){if(typeof plugins.slider.badge==="function"){plugins.slider.badge()}},300)}}else{$(s).find('a[href="#'+e+'"], #'+e+"").addClass("hidden");if(n&&a){$("body #right-side-tabs").find("li:not(.active) a:not(.hidden)").first().trigger("click")}else if(a===0){$('input[name="settings_side_slider_enabled"][value="false"]').trigger("click")}if(t==="settings_side_slider_notifications_enabled"){$(".right-side-tab-notification-asterix").addClass("invisible hidden hidden-forged");$(".right-side-tabs-toggler .badge.badge-danger").addClass("invisible hidden hidden-forged");plugins.favicon.set(0)}}theme.config.apply()})})();(function(){a.find('select[name="settings_navigation_color"]').after(' ');var e=a.find(".settings_navigation_color_toggle");e.on("click",function(){a.find("."+$(this).attr("data-name")+"_reset, ."+$(this).attr("data-name")+"_rows").toggleClass("hidden");$(this).toggleClass("forced")});var i=a.find('input[name="settings_grayscale_level_navigation"], input[name="settings_sepia_level_navigation"], input[name="settings_saturation_level_navigation"], input[name="settings_hue_level_navigation"], input[name="settings_invert_level_navigation"], input[name="settings_brightness_level_navigation"], input[name="settings_contrast_level_navigation"]');a.find(".settings_navigation_color_reset").on("click",function(){var e="grayscale(0) sepia(0) saturate(1) hue-rotate(0deg) invert(0) brightness(1) contrast(1)",t="filter: "+e+";";$(".visible-xs.mobile-menu-toggler").attr("style","position: fixed;"+t);$("aside, .visible-xs.mobile-menu-toggler").attr("style","z-index: 10; overflow: visible; transform: translate("+settings_leftmenu_width+"px, 0px);"+t);settings_side_slider_palette==="nav"&&$("#right-side-tabs").add("#right-side-tabs + .right-side-tabs-toggler").css({filter:e});a.find('input[name="settings_grayscale_level_navigation"], input[name="settings_sepia_level_navigation"], input[name="settings_hue_level_navigation"], input[name="settings_invert_level_navigation"]').val(0);a.find('input[name="settings_saturation_level_navigation"], input[name="settings_brightness_level_navigation"], input[name="settings_contrast_level_navigation"]').val(1);i.each(function(){$('code[data-name="'+$(this).attr("name")+'"]').text($(this).val())})});i.on("input "+n+"",function(){var e="grayscale("+a.find('input[name="settings_grayscale_level_navigation"]').val()+") sepia("+a.find('input[name="settings_sepia_level_navigation"]').val()+") saturate("+a.find('input[name="settings_saturation_level_navigation"]').val()+") hue-rotate("+a.find('input[name="settings_hue_level_navigation"]').val()+"deg) invert("+a.find('input[name="settings_invert_level_navigation"]').val()+") brightness("+a.find('input[name="settings_brightness_level_navigation"]').val()+") contrast("+a.find('input[name="settings_contrast_level_navigation"]').val()+")";style="filter: "+e+";";$(".visible-xs.mobile-menu-toggler").attr("style","position: fixed;"+style);$("aside, .visible-xs.mobile-menu-toggler").attr("style","z-index: 10; overflow: visible; transform: translate("+settings_leftmenu_width+"px, 0px);"+style);settings_side_slider_palette==="nav"&&$("#right-side-tabs").add("#right-side-tabs + .right-side-tabs-toggler").css({filter:e});a.find('code[data-name="'+$(this).attr("name")+'"]').text($(this).val());theme.config.apply()});i.each(function(e){a.find('code[data-name="'+$(this).attr("name")+'"]').text($(this).val());$(this).parent().parent("td").parent("tr").addClass("hidden settings_navigation_color_rows hidden-skip");if(e===0){$(this).parent().parent("td").parent("tr").prev("tr").addClass("hidden-dependent-skip")}}).promise().done(function(){if(uri_parse_param("search")){e.trigger("click")}});setTimeout(function(){$(".mobile-menu-toggler:visible").length&&$('input[name="settings_leftmenu_width"]').prop("disabled",true)},100);var s=a.find('input[name="settings_leftmenu_width"]');s.on("click keyup change "+n+"",function(e){page_adjust($(this).val(),$(this).val());a.find('code[data-name="'+$(this).attr("name")+'"]').text($(this).val());theme.config.apply();vars.navigation.width_initial=parseInt($(this).val())});s.each(function(){a.find('code[data-name="'+$(this).attr("name")+'"]').text($(this).val());vars.navigation.width_initial=parseInt($(this).val())});(function(){t._.funcs.dependent_radios("settings_navigation_always_collapse",["settings_leftmenu_width"]);a.find('input[name="settings_navigation_always_collapse"]').on("change "+n+"",function(){if($(this).val()=="true"){$("html").attr("data-navigation-collapsed",1);$(".mobile-menu-toggler").removeClass("visible-xs");plugins.navigation.collapse()}else if($(this).val()=="false"){$("html").attr("data-navigation-collapsed",0);$(".mobile-menu-toggler").addClass("visible-xs")}page_resized()})})();a.find('input[name="settings_leftmenu_user_html"]').on("keyup "+n+"",function(){$("aside ul.user-html li.user-html-string").html($(this).val())});t._.funcs.dependent_radios("settings_leftmenu_netdata",["settings_leftmenu_netdata_link"],true);if(!$(".right-side-tabs-toggler").length){a.find('input[name="settings_side_slider_enabled"][value="false"]').trigger("click");a.find('input[name="settings_side_slider_enabled"]').attr("disabled","disabled")}page_resized()})();$('[data-toggle="popover"]').popover({sanitize:false});var o=$('[name="settings_sysinfo_hidden_panels_user"]');o.on("input "+n+"",function(){settings_sysinfo_hidden_panels_user={};var e=$(this),t=e.val();if(t&&t.length){t.forEach(function(t){var n=e.find('option[value="'+t+'"]').text();settings_sysinfo_hidden_panels_user[t]=n})}setTimeout(function(){if($.isEmptyObject(settings_sysinfo_hidden_panels_user)){settings_sysinfo_hidden_panels_user=""}else{settings_sysinfo_hidden_panels_user=JSON.stringify(settings_sysinfo_hidden_panels_user)}})});var l=$('textarea[name="settings_leftmenu_custom_links"]'),d=l.val();l.length&&l.val(Convert.htmlDecode(d).replace(///g,"/"));a.find("#atsave:not(.btn-inverse):not(.disabled)").on("click",function(e){e.preventDefault();var t=$(this);spinnerfy_buttons(t);set_onbeforeunload_status(0,0);var n="goto_webmin_default_module",i=a.find('select[name="'+n+'"]');if(i.length){var s=$.trim(i.val());if(get_access_level()===0){core.updateModuleData("/webmin/edit_startpage.cgi","/webmin/change_startpage.cgi",{gotomodule:s})}else{settings_webmin_default_module=s}}theme.config.apply();theme.config.save();setTimeout(function(){plugins.navigation.reload();theme_config_controls(0);despinnerfy_buttons(0,t);if(settings_sysinfo_real_time_status){if(typeof stats==="object"){stats.general.enable()}else{load.bundle(v___server_extensions_path+"/stats/stats",0,["stats.general.query()"])}}else{if(typeof stats==="object"){stats.general.disable()}}},600)})}(function(){var t=v___location_path_lead_unslashed==v___location_prefix_unslashed_trail_slashed+"tconfig.cgi"||v___location_path_lead_unslashed==v___location_prefix_unslashed_trail_slashed+"settings-editor_read.cgi"||v___location_path_lead_unslashed==v___location_prefix_unslashed_trail_slashed+"settings-logos.cgi"||v___location_path_lead_unslashed==v___location_prefix_unslashed_trail_slashed+"settings-backgrounds.cgi";if(!e&&t){plugins.navigation.reset()}if(!e&&t){if(check_location_resource("/settings-logos.cgi?saved=1")){$.each($(".file_chooser_button_preview:first"),function(){if(!$(this).hasClass("disabled")){if(!matchMedia("(max-width: 1080px)").matches){if($("aside + .__logo").length){$(".__logo img").attr("src",$("[data-image-lga]").attr("data-image"));$("aside + .__logo").attr("style","transform: translate(0px, 0px);");setTimeout(function(){$(".__logo").transition({y:"-140px"},1200)},400)}else{$("aside").after('');setTimeout(function(){$(".__logo").transition({y:"-140px"},1200)},400)}}}else{$("aside + .__logo").remove()}})}var n=$(".btn.authentic_update:not(.disabled), .page_footer_ajax_submit:not(.disabled)");n.on("click",function(){spinnerfy_buttons($(this),[1.5,-28,"small",false])});setTimeout(function(){if(v___location_path_lead_unslashed==v___location_prefix_unslashed_trail_slashed+"settings-editor_read.cgi"){$(".end_submits").parent("td").after('
'+theme_language("settings_right_theme_bgs")+' '+theme_language("settings_right_theme_logos")+" '+theme_language("global_save")+" ")}},1300)},10)}if(!e&&(v___location_path_lead_unslashed==v___location_prefix_unslashed_trail_slashed+"settings-logos.cgi"||v___location_path_lead_unslashed==v___location_prefix_unslashed_trail_slashed+"settings-backgrounds.cgi")){$(function(){var e=$('input[name="authenticated_logo"]:checked, input[name="authenticated_bg"]:checked'),t=e.val(),n=$('input[name="unauthenticated_logo"]:checked, input[name="unauthenticated_bg"]:checked'),a=n.val();function i(n){typeof n=="undefined"?n=e:false;var a=["authenticated_logo_file","authenticated_bg_file"];if(n.val()!="1"){$.each(a,function(e,t){$('input[name="'+t+'"]').parents(".file-input-wrapper").addClass("disabled").prev(".file_chooser_button_preview").addClass("disabled")})}else{$.each(a,function(e,n){$('input[name="'+n+'"]').parents(".file-input-wrapper").removeClass("disabled");if(t=="1"){$('input[name="'+n+'"]').parents(".file-input-wrapper").prev(".file_chooser_button_preview").removeClass("disabled")}})}}i();$('input[name="authenticated_logo"], input[name="authenticated_bg"]').on("change",function(){i($(this))});function s(e){typeof e=="undefined"?e=n:false;var t=["unauthenticated_logo_file","unauthenticated_bg_file"];if(e.val()!="1"){$.each(t,function(e,t){$('input[name="'+t+'"]').parents(".file-input-wrapper").addClass("disabled").prev(".file_chooser_button_preview").addClass("disabled")})}else{$.each(t,function(e,t){$('input[name="'+t+'"]').parents(".file-input-wrapper").removeClass("disabled");if(n=="1"){$('input[name="'+t+'"]').parents(".file-input-wrapper").prev(".file_chooser_button_preview").removeClass("disabled")}})}}s();$('input[name="unauthenticated_logo"], input[name="unauthenticated_bg"]').on("change",function(){s($(this))})});$(".file_chooser_button_preview").on("mouseout",function(e){$(this).css("background","white")}).on("mouseover",function(e){$(this).css("background","#eee")});$.each($(".file_chooser_button_preview"),function(){if($(this).data("image")){$(this).popover({trigger:"hover",sanitize:false,html:true,content:function(){return""}})}})}})();this.current.set()}}};const quirks={active_element:function(){if(document.activeElement&&$(document.activeElement).is("body")){return v___page_activeElement}else{return document.activeElement}},local_storage:{safari:function(){if(typeof localStorage=="object"){try{localStorage.setItem("d41d8cd98f00",1);localStorage.removeItem("d41d8cd98f00")}catch(e){Storage.prototype._setItem=Storage.prototype.setItem;Storage.prototype.setItem=function(){};vars.local_storage=0}}}},render:{apple:function(){browser.detect.safari(1)&&$("html").css("overflow","auto");var e=vars.h.selector.content.get();if(browser.detect.safari()){e.addClass("browser_safari")}if(navigator.userAgent.match(/(iPod|iPhone|iPad)/)){e.data("AppleMobileDev",true);e.attr("style","-webkit-overflow-scrolling: touch !important; overflow-y: scroll !important;")}}},clean:function(){$("style[data-err]").remove()},temporary:function(){setTimeout(function(){if(typeof settings_sysinfo_real_time_status==="boolean"){settings_sysinfo_real_time_status=~~settings_sysinfo_real_time_status;theme.config.save()}},2e3)}};const regex={matches:function(e,t,n,a){n||(n=1);var i=[];var s;while(s=t.exec(e)){i.push(s[n])}if(a){i=i.slice(-1)[0]}return i}};const XHR={headers:function(e){return[e.getAllResponseHeaders(),e.getResponseHeader("content-type"),e.getResponseHeader("content-disposition"),e.getResponseHeader("content-length")]}};const plugins={};plugins.shell=function(){var e=function(){return $("body").find(".-shell-port-").hasClass("opened")},t=function(){return $t_uri_cloudmin&&$('a[target="page"][href*="/server-manager/save_serv.cgi"][href*="shell=1"]').length},a=function(){var e=t();if(e){return v___location_prefix+"/server-manager/shell.cgi"}else if(core.moduleAvailable("shell")){return v___location_prefix+"/shell/index.cgi"}else{return 0}},s=function(){if(!u()){$(".user-link.ported-console").addClass("hidden")}else{if(settings_show_terminal_link2!=false){$(".user-link.ported-console").removeClass("hidden")}}},n=function(){vars.shell.processing=0;$('.-shell-port- input[data-command="true"]').removeAttr("readonly")},r=function(e,t,a,i){return'"},o=function(e){var a=t(),i=$('select[name="sid"]').val();if(!e){e=""}if(!i){i=0}$.ajax({type:"POST",url:v___location_prefix+"/index.cgi/?xhr-shell-insert=1&xhr-shell-inserted="+e+"&xhr-shell-cms="+a+"&xhr-shell-cmsid="+i,dataType:"text",complete:function(e){e=e.responseText;if(!session.status(e)){return}var t=JSON.parse(e);localStorage.setItem(v___server_hostname+"-"+"shell_commands",JSON.stringify(t))}})},l=function(e,t,a){$(e).next("pre").remove();p();_(t);a.scrollTop(a[0].scrollHeight);setTimeout(function(){vars.shell.processing=0;vars.shell.history=0;t.removeAttr("readonly").focus()},100)},_=function(e){e.val("");e.focus()},c=function(e){var t=$("body").find(".-shell-port-"),a=typeof e=="undefined"?a=false:a=e.startsWith("!")?e.substr(1):e,i=t.find("input"),s="data-shell-host",n=t.find(".-shell-port-pwd").attr("data-pwd"),r=t.find("["+s+"]"),l=r.attr(s);if($t_uri_cloudmin){var _=$('aside [name="sid"] option:selected');current_host_name=_.attr("title")||_.text();r.text(current_host_name)}else{r.text(l)}o(false);if(a){i.val(a);var c=$.Event("keydown");c.which=13;i.trigger(c)}t.css("bottom","0vh").addClass("opened");m();p();setTimeout(function(){if(!a){focus();i.focus()}},20)},d=function(){var e=$("body").find(".-shell-port-"),t="command-shell-editor-spinner";e.css("bottom","100vh").removeClass("opened");if(v___module==v___module_file_manager){typeof __f__state__changed==="function"&&__f__state__changed()}$("."+t).remove();m(true)},f=function(e){var t=$(".-shell-port-container .-shell-port-cmd"),a="invisible";if(e){t.addClass(a)}else{t.removeClass(a)}},p=function(){if(core.moduleAvailable("shell")==1){var e=parseInt($("body").find(".-shell-port-cmd").width()),t=parseInt($("body").find(".-shell-port-prompt").width());$("body").find('.-shell-port- input[data-command="true"]').css("width",e-t-50+"px")}},u=function(){var e=t();if(core.moduleAvailable("shell")==1||e){return 1}else{return 0}},g=function(e){var t=$("body").find(".-shell-port-"),a=t.find(".-shell-port-pwd"),i=a.attr("data-home");if(typeof e==="string"){e=Convert.uriDecodeComponent(e);var s=e&&e.endsWith("/")?e.slice(0,-1):e,n=s.split("/").pop();if(!n){n="/";e="/"}if(get_access_level()==2){e=get_user_home()+e}if(e===i){n="~"}e=Convert.htmlEscape(e);a.attr("data-pwd",e).attr("title",e).text(n)}},m=function(s){var n=$(document.body).find(".-shell-port-"),g='[data-command="true"]',m=n.find("input"+g+""),v=n.find("div[data-output]"),b=n.find(".-shell-port-container"),x=n.data("autocomplete"),y=$(window),A=".plugin-shell";if(s){y.off("keydown"+A+"");y.off("keyup"+A+"");b.off("click"+A+"");return}y.on("keydown"+A+"",function(t){var a=this,i=e(),s=$(".modal-shell-config:visible").length,r=String.fromCharCode(t.which).toLowerCase();if(t[settings_hotkey_toggle_modifier]&&r==settings_hotkey_shell2&&theme_shortcuts_modifier_unique(t)){t.preventDefault();if(i){d()}return}if((t.altKey||t.ctrlKey)&&String.fromCharCode(t.which).toLowerCase()=="l"){t.preventDefault()}if(typeof a.shell_request_interrupted==="undefined"){a.shell_request_interrupted=0}if(typeof this.last_pressed_times==="undefined"){this.last_pressed_times=0}else{this.last_pressed_times+=1}setTimeout(function(){a.last_pressed_times=0},vars.event.double_click_delay);if(r==="c"&&a.last_pressed_times>1&&t.ctrlKey&&!t.shiftKey&&!t.altKey&&!t.metaKey){a.shell_request_interrupted=1;typeof a.shell_request==="object"&&a.shell_request.state()==="pending"&&a.shell_request.abort();setTimeout(function(){a.shell_request_interrupted=0},1e3);return}if(this.searching||r==="r"&&t.ctrlKey&&!t.shiftKey&&!t.altKey&&!t.metaKey){t.preventDefault();if(typeof a.shell_request==="object"&&a.shell_request.state()==="pending"){return}var o=$(".-shell-port-type"),l=$('.-shell-port- input[data-command="true"]'),_="reverse-i-search",c="data-searching";b.scrollTop(b[0].scrollHeight);this.searching=1;run_search=function(e){var t=JSON.parse(localStorage.getItem(v___server_hostname+"-"+"shell_commands")),a=t.filter(function(t){return t.includes(e)});return $.unique(a).reverse()},update_search=function(e,i){if(!this.used_index||i){this.used_index=0}if(t.ctrlKey){if(r==="c"){cancel_search(1);return}if(r!=="r"){return}}if(JSON.stringify(e)==JSON.stringify(this.results)&&!i){if(t.shiftKey){--this.used_index}else{++this.used_index}}else{this.results=e}if(e.length<=this.used_index){this.used_index=0}if(this.used_index<0){this.used_index=e.length-this.used_index-2}var s=this.searching_shell_str_replaced.find("span["+c+"]"),n=s.text();var o=localStorage.getItem(v___server_hostname+"-"+"shell_command_last");if(!a.pre_searched&&o){if(o==="undefined"){o=String()}a.pre_searched=o}if(!n&&a.pre_searched){s.text(a.pre_searched);var _=run_search(a.pre_searched);update_search(_,0);return}if(!n||!e.length){failed_search();return}else{success_search()}if(e){l.val(Convert.htmlUnEscape(e[this.used_index]))}p()},failed_search=function(){var e=a.searching_shell_str_replaced.html();if(!e.includes("failed reverse")){a.searching_shell_str_replaced.html(e.replace(_,"failed "+_+""))}p();var t=new Audio("data:audio/ogg; codecs=opus;base64,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MsYYY85BCJ1zjjHnIITQOceYcxBC55xjzDkIoXOMMeacAACgAgcAgAAbRTYnGAkqNGQlABAOAAAYw5hzjDkGnYQKIecgdA5CKqlUCDkHoXMQSkmpeA46KSGUUkoqxXMQSgmhlJRaKy6GUkoopaTUUpExhFJKKSWl1ooxpoSQUkqptVaMMaGEVFJKKbZijI2lpNRaa60VY2wsJZXWWmutGGOMaym1FmOsxRhjXEuppRhrLMYY43tqLcZYYzHGGJ9baimmXAsAMHlwAIBKsHGGlaSzwtHgQkNWAgC5AQAIQkoxxphjzjnnnHPOSaUYc8455yCEEEIIIZRKMeacc85BByGEEEIoGXPOOQchhBBCCCGEUFLqmHMOQgghhBBCCCGl1DnnIIQQQgghhBBCSqlzzkEIIYQQQgghhJRSCCGEEEIIIYQQQggppZRCCCGEEEIIIZQSUkophRBCCCWEEkoIJaSUUgohhBBCKaWEUkJJKaUUQgillFBKKaGUkFJKKaUQQiillFBKKSWllFJKJZRSSikllFBKSimllEoooZRQSimllJRSSimVUkopJZRSSgkppZRSSqmUUkoppZRSUkoppZRSKaWUUkoppaSUUkoppVJKKaWUEkpJKaWUUkqllFBKKaWUUlJKKaWUSgqllFJKKaUAAKADBwCAACMqLcROM648AkcUMkxAhYasBABSAQAAQiillFJKKTWMUUoppZRSihyklFJKKaWUUkoppZRSSimVUkoppZRSSimllFJKKaWUUkoppZRSSimllFJKKaWUUkoppZRSSimllFJKKaWUUkoppZRSSimllFJKKaWUUkoppZRSSimllFJKAcDdFw6APhM2rI5wUjQWWGjISgAgFQAAMIYxxphyzjmllHPOOQadlEgp5yB0TkopPYQQQgidhJR6ByGEEEIpKfUYQyghlJRS67GGTjoIpbTUaw8hhJRaaqn3HjKoKKWSUu89tVBSainG3ntLJbPSWmu9595LKinG2nrvObeSUkwtFgBgEuEAgLhgw+oIJ0VjgYWGrAIAYgAACEMMQkgppZRSSinGGGOMMcYYY4wxxhhjjDHGGGOMMQEAgAkOAAABVrArs7Rqo7ipk7zog8AndMRmZMilVMzkRNAjNdRiJdihFdzgBWChISsBADIAAMRRrDXGXitiGISSaiwNQYxBibllxijlJObWKaWU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");t.play()},success_search=function(){var e=a.searching_shell_str_replaced.html();a.searching_shell_str_replaced.html(e.replace("failed "+_+"",_));p()},cancel_search=function(e){o.html(a.searching_shell_str);a.searching_shell_str=0;a.searching_shell_str_replaced=0;a.searching=0;if(e){l.val(String())}p()};if(!this.searching_shell_str){this.searching_shell_str=o.html()}if(!this.searching_shell_str_replaced){this.searching_shell_str_replaced=o.html("("+_+")`': ");p()}else{var f=this.searching_shell_str_replaced.find("span["+c+"]"),u=f.text();if(t.key&&t.key.length===1){var g=t.ctrlKey||t.altKey||t.metaKey?String():t.key,y=u+g;y&&(a.pre_searched=y,localStorage.setItem(v___server_hostname+"-"+"shell_command_last",y));f.text(y);var A=run_search(f.text());update_search(A,g)}}if(t.keyCode===8){var k=this.searching_shell_str_replaced.find("span["+c+"]"),w=k.text(),C=w.slice(0,-1);w&&(a.pre_searched=C,localStorage.setItem(v___server_hostname+"-"+"shell_command_last",y));k.text(C);var S=run_search(k.text());update_search(S,1);return}if(t.keyCode===9||t.keyCode===13||t.keyCode===27||t.keyCode===37||t.keyCode===38||t.keyCode===39||t.keyCode===40){cancel_search()}return}if(i&&t.keyCode===27&&!s){d();return}if(i&&t.keyCode===38){t.preventDefault()}if(i&&t.keyCode===9&&m.is(":focus")){t.preventDefault();if(!x){return}var I=":"+":"+":"+":",V=m.val().trim().split(/\s+(?!-)/),T=V.length,E=V[0]&&V[0].indexOf("-")===-1?0:1,O=V[1]&&V[1].indexOf(":")===-1?0:1,M=m.val().endsWith(" "),z=$.trim(V[0])==="service",q=$.trim(V[0])==="systemctl",Z=$.trim(V[0])&&$.trim(V[0]).startsWith("chown"),U=V.length===1&&m.val().length&&!E&&!M?"commands":z||q?"services":Z?"permissions":"lists";if(!$.trim(m.val()).length){return}var J=m.val(),j=n.find(".-shell-port-pwd"),K=j.attr("data-pwd");if(U==="services"){U=z?"service":"systemctl";if(U==="systemctl"&&V.length!==3){return}J=U=="service"?$.trim(V[1]):$.trim(V[2]);if($.trim(V[0])==="service"&&(V.length===2&&M||V.length===3)){if(V.length===3){J=I+$.trim(V[1])+I+$.trim(V[2])}else{J=I+$.trim(V[1])}}}if(Z){if(T===1&&!M){m.val($.trim(V[0])+" ");return}if(!O||!$.trim(V[1])){U="users";J=$.trim(V[1])}else if(!M&&!V[2]){U="groups";J=$.trim($.trim(V[1]).split(":")[1])}else{U="lists";J=K+"/"+I+$.trim(V[2])}}if(U==="lists"&&!Z){J=K+"/"+I+$.trim(V[1])+I+$.trim(V[0])+I+$.trim(V[2])}$.ajax({type:"POST",url:v___location_prefix+"/index.cgi?xhr-get_autocompletes=1&xhr-get_autocomplete_type="+U+"&xhr-get_autocomplete_string="+J+"",data:false,dataType:"json",success:function(e){var t=e.length;if(t===1){if(U==="service"||U==="systemctl"||U==="lists"){var a=$.trim(V[0]),i=$.trim(V[0])+" "+$.trim(V[1]);if(U==="lists"){if(a==="cd"&&e[0].endsWith("/")||a!=="cd"){if(a==="cd"||a==="cat"){m.val(a+" "+e[0])}else{if($.trim(V[2])){m.val(i+" "+e[0]+"")}else{m.val(a+" "+e[0]+"")}}}}else{if(a==="service"&&(V.length===2||V.length===3)){if(V.length===2){m.val(a+" "+e[0]+" ")}else if(V.length===3){m.val($.trim(V[0])+" "+$.trim(V[1])+" "+e[0])}}else if(a==="systemctl"&&V.length===3){m.val(a+" "+$.trim(V[1])+" "+e[0])}}}else{if(Z){if(!O){m.val($.trim(V[0])+" "+e[0]+":")}else if(!M&&!V[2]){m.val($.trim(V[0])+" "+$.trim($.trim(V[1]).split(":")[0])+":"+e[0]+" ")}else{m.val($.trim(V[0])+" "+$.trim(V[1])+" "+e[0]+"")}}else{m.val(e[0]+" ")}}}else if(t>1){var s=""+h()+" "+Convert.htmlEscape(m.val())+""+"\n";v.find("pre").append(s);v.find("pre").append(Convert.htmlEscape(e.join("\n")+"\n"));b.scrollTop(b[0].scrollHeight)}setTimeout(function(){m.focus().mousedown()},10)},error:function(e){session.status(e.responseText)}})}}).on("keyup"+A+"",function(s){var u=this,g=e(),b=$(".modal-shell-config:visible").length;if(g&&!b){var x=0,y=0,A=0,k=$(".form-control.sidebar-search"),w=t(),C=$('select[name="sid"]').val(),S=0;var I=a();if(!I){return}if(g||k.is(":focus")){if(s.keyCode===8){vars.shell.history=0}}if(g){x=$.trim(m.val());y=1;A=1}else{x=k.val();y=typeof k.val()!="undefined";A=0}if((A||y&&(!x.trim()||x.trim().startsWith("!")))&&(s.keyCode==38||s.keyCode==40)){s.preventDefault();s.stopPropagation();typeof localStorage.getItem(v___server_hostname+"-"+"shell_commands")=="undefined"?localStorage.setItem(v___server_hostname+"-"+"shell_commands",JSON.stringify({})):false;var V=JSON.parse(localStorage.getItem(v___server_hostname+"-"+"shell_commands")),T=V?V.length:0;if(vars.shell.history===0&&!x&&s.keyCode==40){return}else if(vars.shell.history===0&&x&&s.keyCode==38){S=1;return}else{vars.shell.history=s.keyCode==40?++vars.shell.history:--vars.shell.history}if(vars.shell.history<0&&s.keyCode===38){vars.shell.history=T-1}else if(vars.shell.history>T){vars.shell.history=0}if(V&&V[vars.shell.history%T]){if(!$.isEmptyObject(V)&&(vars.shell.history==T&&s.keyCode===38||vars.shell.history==T&&s.keyCode===40||S)){if(g){m.val("").focus()}else{k.val("").focus()}vars.shell.history=0;return}if(g){var E=V[vars.shell.history%T].replace(/^!/,"");m.val(Convert.htmlUnEscape(E)).focus()}}return}else if(y&&x.trim().startsWith("!")&&s.keyCode==27){s.preventDefault();s.stopPropagation();k.val("").focus();return}if(y&&x.trim().startsWith("!")&&s.keyCode==13){k.addClass("_shell_form_");s.preventDefault();s.stopPropagation();if(core.moduleAvailable("shell")==1||w){m.val(x.trim().substring(1)).focus();c();var O=$.Event("keyup");O.keyCode=13;m.trigger(O)}}var M=n.find(".-shell-port-container"),z=n.find(".-shell-port-pwd"),q=z.attr("data-pwd"),Z=$.trim(m.val()),U=0,J=s.keyCode?s.keyCode:s.which,j=(s.altKey||s.ctrlKey)&&String.fromCharCode(s.which).toLowerCase()=="l";if(!m.is(":focus")&&!check_selected_text()){if(!s.ctrlKey&&!s.altKey&&!s.shiftKey&&!s.metaKey){m.val(m.val()+String.fromCharCode(s.which).toLowerCase())}m.focus()}if(Z&&J===13||j){if(M.find("[data-searching]").length){return}if(core.moduleAvailable("shell")||w){if(vars.shell.processing===1){return}vars.shell.processing=1;if(Z==="clear"||Z==="reset"||Z==="exit"||j){v.find("pre").html("");_(m);if(Z=="exit"){d()}}if(Z==="cd ~"){U=Z;Z="cd "+z.attr("data-home")}var K=false;if(Z==="cd /"){K="/"}if(Z==="history -c"){localStorage.setItem(v___server_hostname+"-"+"shell_commands",JSON.stringify({}));var W=""+h()+" "+Convert.htmlEscape(Z)+""+"\n";v.find("pre").append(W);_(m);M.scrollTop(M[0].scrollHeight);var D=r(I,w,null,q),P=new FormData($(D)[0]);$.ajax({type:"POST",url:I+"?fetch-content=1",data:P,dataType:"text",cache:false,contentType:false,processData:false,success:function(e){if(!session.status(e)){return}o(Z);vars.shell.processing=0},error:function(e){}});return}else if($.trim(Z).startsWith("history -d")){var Q=Z.split(" "),R=Q[2];if(R&&R.length&&Test.numeric(R)){$.ajax({type:"POST",url:v___location_prefix+"/index.cgi/?xhr-shell-pop="+R+"&xhr-shell-cms="+w+"&xhr-shell-cmsid="+C,data:false,dataType:"text",cache:false,contentType:false,processData:false,success:function(e){if(e=="1"){var t=JSON.parse(localStorage.getItem(v___server_hostname+"-"+"shell_commands"));localStorage.setItem(v___server_hostname+"-"+"shell_commands",JSON.stringify(t.filter(function(e,t){return t!==parseInt(R)-1})))}o(Z)},error:function(e){}})}_(m);vars.shell.processing=0;return}else if(Z.startsWith("history")){_(m);var N=JSON.parse(localStorage.getItem(v___server_hostname+"-"+"shell_commands")),G=N?N.length:0,L=G?G.toString().length:0,W=""+h()+" "+Convert.htmlEscape(Z)+""+"\n";$.each($(N),function(e,t){var a=e.toString().length,s="";for(i=0;i"+h()+" "+Convert.htmlEscape(m.val()),te=F==="view"?1:0,ae=te?"viewer":"editor";var ie=get_access_level();if(ie==2||ie==3){var se=new RegExp("^"+get_user_home(),"");q=q.replace(se,"");if(!q){q="/"}}if(Y.endsWith("/")||Y.includes("../")||H&&H[1].includes("/")&&!H[1].startsWith("/")){B.append(ee+" \nCan not open file "+ae+". Unsupported path expression.\n");l(_e,m,M);return}edit_file(H[1],q,[{call:"plugins.shell.toggle"},{call:"plugins.shell.done",params:[_e,m,M]},{call:"plugins.shell.close"}],te,0,0,te?1:0);B.append(ee+" \nOpening internal file "+ae+". "+theme_spinner_small(undefined,"white command-shell-editor-spinner smaller2")+"\n");f(1);M.scrollTop(M[0].scrollHeight);o(Z);return}if($.trim(Z)==="clear"||$.trim(Z)==="reset"||$.trim(Z)==="exit"||j){vars.shell.processing=0;vars.shell.history=0;p();m.focus();!j&&o(Z);return}var ne=r(I,w,Z,q),re=new FormData($(ne)[0]);m.attr("readonly","true");var oe=0,le=0,_e=".-shell-port-cmd",ce=".-shell-port-container",de=false,fe=0;u.shell_request=$.ajax({xhr:function(){var e=new window.XMLHttpRequest;e.addEventListener("progress",function(e){var t=e.target.responseText;if(!session.status(t)){u.shell_request.abort();return}if(t&&t.length&&/[\x1B]/.test(t)){fe=1;u.shell_request.abort();return}t?le++:false;if(le>=1&&!oe){if(t){$(_e).after("
");oe++;$(ce).addClass("progressing")}}else if(oe){var a=extract_content(t,"
","
",1);if(a){a=a.replace(/<(b)[^>]*>[^<]*(<\/b>)/i,"");de=a;$(_e).next("pre").replaceWith(a)}M.scrollTop(M[0].scrollHeight)}},false);return e},type:"POST",url:I+"?fetch-content=1",data:re,dataType:"text",cache:false,contentType:false,processData:false,complete:function(e){$(ce).removeClass("progressing");var t=e.status;e=e.responseText;if(!session.status(e)){return}var a=$.trim(Z)==="reboot",i=$.trim(Z)==="shutdown -h now";if(fe||t!==200||get_access_level()!==3&&(a||i)){var s=theme_language("shell_aborted");if(a){s="The system is rebooting.."}else if(i){s="The system has been powered off!"}var n=t!==200?extract_content(de,"
","
",0)+(u.shell_request_interrupted?"\n^C":String()):s;if(de===false){n="Cannot establish connection to the host."}v.find("pre").append(""+h()+" "+Convert.htmlEscape(m.val())+" \n"+n+"\n");o(Z);l(_e,m,M);return}var r=h(),_=$(e).find("pre").length?$(e).find("pre"):$(e).filter("pre"),c=_.html().replace(/>>/g,">"+r+""),d=$(e).find('input[name="previous"][type="hidden"]').map(function(){return Convert.htmlEscape($(this).val())}).get();localStorage.setItem(v___server_hostname+"-"+"shell_commands",JSON.stringify(d));newPwd=$(e).find('input[name="pwd"]').val();v.find("pre").append(U?c.replace(new RegExp(Z,"g"),U):c);z.text(K?K:newPwd==z.attr("data-home")?"~":newPwd.split("/").filter(function(e){return $.trim(e)}).slice(-1)[0]).attr("data-pwd",Convert.htmlEscape(K?K:newPwd)).attr("title",Convert.htmlEscape(K?K:newPwd));if(Z==="cd .."&&newPwd==="/"){z.text("/")}l(_e,m,M)},error:function(e){}})}}}});b.on("click"+A+"","[data-shell-config]",function(){if(get_access_level()===3){return}$.ajax({type:"GET",url:v___location_prefix+"/"+"config.cgi"+"?shell",data:false,dataType:"text",success:function(e){if(!session.status(e)){return}var t=$(e).find(".ui_form"),a=t.find("table.sub_table_container"),i=v___location_prefix+"/"+"config_save.cgi";a.find("a").contents().unwrap();var s=a.find("tbody"),n=$(e).find("tr th.table-title b").text();theme_alert(n,'
'+s[0].outerHTML+'
",false,"md","primary","cogs",'10 modal-shell-config" data-keyboard="false" data-backdrop="static',0);setTimeout(function(){$("[data-save-shell-config]").on("click",function(e){e.preventDefault();var t=$(this);if(t.hasClass("disabled")){return}var a=$(".modal-shell-config"),s=a.find("form").serialize();t.addClass("disabled").find("i").replaceWith(theme_spinner_small(false," "));$.ajax({type:"POST",url:i,data:s,dataType:"text",success:function(e){if(!session.status(e)){return}a.find('[data-dismiss="modal"]').trigger("click")},error:function(){}})})},300)}})}).on("click"+A+"",".-shell-port-close",function(){if(u()){d()}})},h=function(){return Convert.htmlEscape($(".-shell-port-type").text())};return{type:t,init:m,status:e,link:s,unlock:n,open:c,close:d,toggle:f,done:l,available:u,adjust:p,set:g}}();plugins.favicon=function(){var e=function(e){a.badge(e);titlenotifier.set(e);a.lastNum=e};var t=0;if(typeof a==="object"&&a.lastNum){t=a.lastNum}var a=new Favico({animation:"none"});e(t);return{set:e}}();plugins.slider=function(){var test_visibility=function(){if(settings_side_slider_fixed!==true||$(".mobile-menu-toggler:visible").length&&!vars.navigation.pinned||!$.support.spa||settings_side_slider_fixed===true&&window.matchMedia("(max-width: 1365px)").matches){set_visibility(0)}else{set_visibility(1)}},set_visibility=function(e,t){if(vars.slider.pinned===1&&!e&&$(".right-side-tabs i.fa2-collapse-right:visible").length){return}var a=get_server_data("access-level"),i="right-side-tabs",s="body ."+i+"",n=""+i+"-fixed",r="data-slider-fixed";if(a!="0"){return}if(e){$(s+"-toggler").addClass("hidden");$(s).css("right","0px").addClass(n);if(settings_side_slider_enabled){get_server_data(r,"1")}}else{if(settings_side_slider_enabled){if(!t){$(s+"-toggler").removeClass("hidden opened").css("right","0")}else{$(s+"-toggler").removeClass("hidden").addClass("opened").css("right","300px")}}if(!t){$(s).css("right","-302px")}else{$(s).css("right","0px")}$(s).removeClass(n);get_server_data(r,"0")}},display_badges=function(){if(!settings_side_slider_enabled||!settings_side_slider_notifications_enabled){return}var e="right-side-tabs",t="right-side-tab-notification-asterix",a="faa-ring faa-slow animated-hover",i="toggler button",s="i.fa-bell",n="span.badge",r="hidden hidden-force",o=$("."+e+" .list-group-item:not(.no-notifications, .opacity-0_3)").length;plugins.favicon.set(o);if(o>0){$("."+e+"-"+i+" "+n+"").removeClass(r).text(o);$("#"+e+" ."+t+"").removeClass(r).text(o)}else{$("."+e+"-"+i+" "+n+"").addClass(r).text(0);$("#"+e+" ."+t+"").addClass(r).text(0)}},check_notifications=function(){var $current_localData_notifications={};$.each(localStorage,function(e,t){if(typeof e=="string"&&e.indexOf("notifications_")>-1&&e.indexOf(v___server_hostname)>-1){var a=e.split("_")[1],i=JSON.parse(t),s=i.title,n=i.time,r=i.timestamp,o=i.message,l=i.readStatus,_=i.type,c=i.link;var d=n+"_"+s;if(_==="csf_deny"){d=n+"_"+s.replace(/\W/g,"")+o.replace(/\W/g,"")}$current_localData_notifications[d]=JSON.stringify({id:a,title:s,time:n,timestamp:r,message:o,readStatus:l,type:_,link:c});if($('.list-group-item[id="'+a+'"][data-type="'+_+'"]').length){$('.list-group-item[id="'+a+'"][data-type="'+_+'"] .list-group-item-heading small').text(moment.unix(n).fromNow())}}});var package_message_num=Object.values($current_localData_notifications).filter(function(e){return e.indexOf("package_message")>-1}).length,csf_remote_version_num=Object.values($current_localData_notifications).filter(function(e){return e.indexOf("csf_remote_version")>-1}).length,authentic_remote_version_num=Object.values($current_localData_notifications).filter(function(e){return e.indexOf("authentic_remote_version")>-1}).length,csf_title_num=Object.values($current_localData_notifications).filter(function(e){return e.indexOf("csf_title")>-1}).length;var keys=[];for(var key in $current_localData_notifications){if($current_localData_notifications.hasOwnProperty(key)){keys.push(key)}}$.each(keys.sort(),function(i,v){var vx=$current_localData_notifications[v],vxData=Test.json(vx);if(!vxData){return true}var $__id__=vxData.id,$__data__title=vxData.title,$__data__time=vxData.time,$__data__timestamp=vxData.timestamp,$__data__message=vxData.message,$__data__readStatus=vxData.readStatus,$__data__type=vxData.type,$__data__link=vxData.link;if($__data__type=="package_message"||$__data__type=="csf_remote_version"||$__data__type=="authentic_remote_version"||$__data__type=="csf_title"){var $__num=eval($__data__type+"_num");if(i+1<$__num){$__data__readStatus=1}}if(!$('.list-group-item[id="'+$__id__+'"][data-type="'+$__data__type+'"]').length){add_notification($__id__,$__data__title,$__data__time,$__data__timestamp,$__data__message,$__data__readStatus,$__data__type,$__data__link)}})},remove_all_notifications=function(){$.each(localStorage,function(e,t){if(typeof e=="string"&&e.indexOf("notifications_")>-1&&e.indexOf(v___server_hostname)>-1){delete localStorage[e]}})},mark_notification_read=function(e,t,a,i){var s=JSON.parse(localStorage.getItem(v___server_hostname+"-"+"notifications_"+e+"_"+t));if(s){localStorage.setItem(v___server_hostname+"-"+"notifications_"+e+"_"+t,JSON.stringify({title:s.title,time:s.time,timestamp:s.timestamp,message:s.message,readStatus:a,type:s.type,link:s.link}))}i&&display_badges()},mark_group_notifications_read=function(e){var t="";if(e){t='[data-type="'+e+'"]'}$(".right-side-tabs .list-group-item"+t+":not(.no-notifications)").each(function(){$(this).addClass("opacity-0_3");mark_notification_read($(this).attr("id"),$(this).data("type"),1,0)}).promise().done(function(){display_badges()})},add_notification=function(e,t,a,i,s,n,r,o){var l=o&&(o.includes("http://")||o.includes("https://")||o.includes("ftp://")||o.includes("ftps://"))?' data-target="external"':"",_=l?"data-href":"href";$(".right-side-tabs .list-group").prepend('
'+t+" "+moment.unix(a).fromNow()+"
"+s+"
");$(".right-side-tabs-no-notifications").remove();display_badges();if(!v___initial_load){mark_no_notifications()}},mark_no_notifications=function(){var e=browser.detect.safari(1),t=e?2:0;var a=function(){var e=theme_language("notification_none");$(".right-side-tabs .list-group").prepend('
'+e.toUpperCase()+"
");$(".right-side-tabs-no-notifications").animate({opacity:"1"},175,function(){})};if($(".right-side-tabs .list-group-item").length===0){if(e){setTimeout(function(){a()},2)}else{a()}}setTimeout(function(){display_badges()},175+t)},update_right_pane_favorites=function(){if(typeof plugins.favorites.fetch!="function"){return}var e=plugins.favorites.fetch(),t=$("#right-side-tabs .no-favorites_data");$("#right-side-tabs .favorites-dcontainer .right_pane_favorites_link, #right-side-tabs .favorites-dcontainer .right_pane_favorites_num").remove();if(e.length){$.each(e,function(e,t){var a=$("#right-side-tabs .favorites-dcontainer");if(get_server_data("webprefix")&&!t.link.includes("!edit")&&!t.link.includes("!view")){t.link=get_server_data("webprefix")+t.link}var i=Convert.htmlEscape(t.title);a.append(''+(e+1)+'  '+i+"")});t.addClass("hidden")}else{t.removeClass("hidden")}},sysinfo_update=function(){if($("body .modal:not(.user_motd_data).in").length){return}if(!e){var e=get_server_data("webprefix")}if(v___user_level==0){var t=$("body").find("#system-status"),a=t.length?t[0]:0;var i=function(){$_____________got_rp__sys_dat=1;var e=core.moduleAvailable("package-updates"),t=core.moduleAvailable("proc")?"":" pointer-events-none",a=core.moduleAvailable("disk-usage")||core.moduleAvailable("quota")?"":" pointer-events-none",i=""+(e?"":' class="hidden"')+"",s=localStorage.getItem(v___server_hostname+"-sysinfo_package_message");var n=vars.local_storage?String():" hidden",r=$(localStorage.getItem(v___server_hostname+"-sysinfo_local_time")).attr("data-convertible-timestamp-full");return'
'+theme_language("notification_no_data").toUpperCase()+"
"};if(!$("#right-side-tabs-sysinfo .graph-container").length){$("#right-side-tabs .info-container").html(i())}var s=$(".right-side-tabs-dismiss .fa-reload");s.addClass("fa-spin-slow cursor-na");setTimeout(function(){s.removeClass("fa-spin-slow cursor-na")},3e3);$.ajax({type:"GET",url:e+"/index.cgi/?xhr-info=1",dataType:"json",success:function(t){$.each(t[0],function(t,i){var s=$('#right-side-tabs [data-data="'+t+'"]'),n="hidden hidden-force";s=s.add(s.prev("br"));s=s.add(s.prev("strong"));if(i!=null){s.removeClass(n)}else{s.addClass(n)}if(t=="cpu_percent"||t=="mem_percent"||t=="virt_percent"||t=="disk_percent"){if(Test.numeric(i)){localStorage.setItem(v___server_hostname+"-"+"sysinfo_"+t+"_stats",i)}else{localStorage.setItem(v___server_hostname+"-"+"sysinfo_"+t+"_stats","")}}if(a){$(a).find('span[data-id="sysinfo_'+t+'"]').html(i);if(t=="local_time"||t=="uptime"||t=="proc"){var r=$(a).find('span[data-id="sysinfo_'+t+'"]'),o=r.find("a").length?r.find("a"):r.find("span"),l=o,_=$(a).find('span[data-id="sysinfo_'+t+'"]').text();if(t=="local_time"){snippets.datetime.tictac(1)}else{l&&l.length&&r.html(l.html(_))}}page_sysinfo_sensor_update_label();if($(a).find('.piechart[data-charts="sysinfo_'+t+'"]').length){var c=$("body").find('.piechart[data-charts="sysinfo_'+t+'"]');if(c.length&&!isNaN(parseInt(i))){c.data("easyPieChart")&&c.data("easyPieChart").update(i)}}if(t=="cpu_percent"||t=="mem_percent"||t=="virt_percent"||t=="disk_percent"){localStorage.setItem(v___server_hostname+"-"+"sysinfo_"+t+"_seen",i)}$(a).find(".modal-backdrop").remove()}$__id__=moment().unix();if(t=="cpu_percent"||t=="mem_percent"||t=="virt_percent"||t=="disk_percent"||t=="csf_title"||t=="csf_remote_version"||t=="authentic_remote_version"||t=="package_message"){if(!localStorage.getItem(v___server_hostname+"-"+"sysinfo_"+t)){localStorage.setItem(v___server_hostname+"-"+"sysinfo_"+t,i)}}else{if(!i||i==null||i==NaN){localStorage.setItem(v___server_hostname+"-"+"sysinfo_"+t,"")}else{localStorage.setItem(v___server_hostname+"-"+"sysinfo_"+t,i)}}if(!localStorage.getItem(v___server_hostname+"-"+"sysinfo_package_message_initial")){localStorage.setItem(v___server_hostname+"-"+"sysinfo_package_message_initial",1)}if(t=="authentic_theme_version"){if(!localStorage.getItem(v___server_hostname+"-"+"sysinfo_theme_current_version")&&i){var d=$.trim(i),f=d.match(/^(\S+)/)[1];if(!f.match(/^\d/)){f=d.match(/a>\s*(\S+)/)[1];if(f.endsWith(".")){f=f.substring(0,f.length-1)}}localStorage.setItem(v___server_hostname+"-"+"sysinfo_theme_current_version",f)}}if(t=="csf_data"){if(!localStorage.getItem(v___server_hostname+"-"+"sysinfo_csf_current_version")&&i&&i.match(/>\s*([\d\.]+)\s*|( )+<\//)){localStorage.setItem(v___server_hostname+"-"+"sysinfo_csf_current_version",i.match(/>\s*([\d\.]+)\s*|( )+<\//)[1])}}if(t=="csf_title"||t=="csf_data"||t=="csf_remote_version"||t=="authentic_remote_version"||t=="authentic_theme_version"||t=="package_message"){if(t==="package_message"){if(!core.curModuleFile("package-updates","update.cgi")){if((localStorage.getItem(v___server_hostname+"-"+"sysinfo_"+t)!=i||localStorage.getItem(v___server_hostname+"-"+"sysinfo_package_message_initial")==1)&&i&&i.indexOf("badge-danger")>-1){var p=theme_language("notifications_packages_updates"),u=$(i).html().replace(/badge-danger/g,"badge-success"),g=e+"/package-updates/index.cgi?mode=updates";localStorage.setItem(v___server_hostname+"-"+"notifications_"+$__id__+"_package_message",JSON.stringify({title:p,time:$__id__,timestamp:$__id__,message:u,readStatus:0,type:t,link:g}));plugins.slider.notifications.dismiss("package_message");localStorage.setItem(v___server_hostname+"-"+"sysinfo_"+t,i);localStorage.setItem(v___server_hostname+"-"+"sysinfo_package_message_initial",0);notifications(p,u,t,g)}else if(t==="package_message"){localStorage.setItem(v___server_hostname+"-"+"sysinfo_"+t,i)}if(!$(i).find("i.badge:first-child").length){plugins.slider.notifications.dismiss("package_message")}}}if(t=="authentic_remote_version"&&settings_sysinfo_theme_updates){var m="sysinfo_theme_current_version",h="sysinfo_"+t+"",v=localStorage.getItem(v___server_hostname+"-"+m),b=function(){return localStorage.getItem(v___server_hostname+"-"+h)},x=0;if(b()=="0"){localStorage.removeItem(v___server_hostname+"-"+h);x++}if(v&&(b()||x)){if(compareVersionNumbers(i,v)>0&&i!="0"&&i!="0.00"&&i!=null){if(i!=theme.version(false,false)){var y=theme_language("notifications_theme_update"),A=theme_language("notifications_theme_update_message").replace("%v",i),g=e+"/sysinfo.cgi";localStorage.setItem(v___server_hostname+"-"+"notifications_"+$__id__+"_"+t+"",JSON.stringify({title:y,time:$__id__,timestamp:$__id__,message:A,readStatus:0,type:t,link:g}));localStorage.setItem(v___server_hostname+"-"+h,i);localStorage.setItem(v___server_hostname+"-"+m,i);notifications(y,A,t,g)}}}}if(t==="authentic_theme_version"&&!Test.strContains(i,"CHANGELOG.md")){plugins.slider.notifications.dismiss("authentic_remote_version")}if(settings_sysinfo_csf_updates){var k=localStorage.getItem(v___server_hostname+"-"+"sysinfo_csf_current_version");if(k&&k!=null&&localStorage.getItem(v___server_hostname+"-"+"sysinfo_csf_remote_version")){if(t=="csf_remote_version"&&k-1&&localStorage.getItem(v___server_hostname+"-"+"sysinfo_csf_not_running")!=1){var S=theme_language("notifications_firewall_danger"),I=theme_language("notifications_firewall_danger_message").replace("%v",moment.unix($__id__).format(config_portable_theme_locale_format_long)),g=e+"/csf/index.cgi?action=lfdstatus";localStorage.setItem(v___server_hostname+"-"+"notifications_"+$__id__+"_csf_title",JSON.stringify({title:S,time:$__id__,timestamp:$__id__,message:I,readStatus:0,type:t,link:g}));plugins.slider.notifications.dismiss("csf_title");localStorage.setItem(v___server_hostname+"-"+"sysinfo_csf_not_running",1);notifications(S,I,"csf_remote_version",g)}else if(i&&i.indexOf("label-danger")===-1){plugins.slider.notifications.dismiss("csf_title");localStorage.removeItem(v___server_hostname+"-"+"sysinfo_csf_not_running")}}}if(t==="local_motd"&&i){$.each(i,function(e,a){a.forEach(function(a){var i=a.time.substring(0,10),s=a.msg,n=i+""+e.replace(/[_]+/g,"--"),r=function(e){return v___server_hostname+"-"+""+e+"_"+n+"_"+t};if(get_server_data("user")===e&&config_portable_notifications_self===false){return true}if(!localStorage.getItem(r(t))){var o=theme_language("notifications_motd"),l=theme_language("notifications_motd_says").replace("$1",' '+e+"")+":  ",_=l+s,c=theme_language("notifications_motd_says").replace("$1",e)+": "+s,d="",f=s.match(/(?:])|(?:])/);if(f&&(f[1]||f[2])){d=f[1]||f[2];if(d&&(d.startsWith("http:")||d.startsWith("https:")||d.includes("ftp:")||d.includes("ftps:")||d.startsWith("//"))){_=_+' '}else if(d){_=_+' '}_=_.replace(//gi," ");_=_.replace(/<\/a>/gi," ")}localStorage.setItem(r("notifications"),JSON.stringify({title:o,time:parseInt(i),timestamp:parseInt(i),message:_,readStatus:0,type:t,link:d}));localStorage.setItem(r(t),1);notifications(o,c,t,d)}})})}else if(t=="csf_deny"){var V=JSON.parse(i);$.each(V,function(a,i){i=i.split("|");var s=i[0],n=i[1],r=i[2],o=i[3],l=i[4],_=i[5],c=i[6],d=i[7];d=d.replace("*Port Scan*",r&&o?'Port '+o+" scan":"Port scan");if(!localStorage.getItem(v___server_hostname+"-"+"allowed_trigger_"+(s+n.replace(/\./g,"0"))+"_csf_deny")){var f=theme_language("notifications_firewall_warning"),p=d+(r&&o?" ("+r+":"+o+")":""),u=e+"/csf/index.cgi?action=temp";localStorage.setItem(v___server_hostname+"-"+"notifications_"+(s+n.replace(/\./g,"0"))+"_csf_deny",JSON.stringify({title:f,time:$__id__,timestamp:$__id__,message:p,readStatus:0,type:t,link:u}));localStorage.setItem(v___server_hostname+"-"+"allowed_trigger_"+(s+n.replace(/\./g,"0"))+"_csf_deny",1);notifications(f,p,t,u)}})}else if(t=="cpu_percent"||t=="mem_percent"||t=="virt_percent"||t=="disk_percent"){var T=$("#right-side-tabs .graph-container-fw."+t+""),E="hidden-force";T=T.add(T.next("br"));if(i!=null){T.removeClass(E)}else{T.addClass(E)}}if(localStorage.getItem(v___server_hostname+"-"+"sysinfo_cpu_percent_stats")||localStorage.getItem(v___server_hostname+"-"+"sysinfo_mem_percent_stats")||localStorage.getItem(v___server_hostname+"-"+"sysinfo_virt_percent_stats")||localStorage.getItem(v___server_hostname+"-"+"sysinfo_disk_percent_stats")){if($("#right-side-tabs-sysinfo .graph-container").length){var O=!localStorage.getItem(v___server_hostname+"-"+"sysinfo_"+t+"_stats"),M=$(".info-container .graph-container."+t+"");O?M.addClass("hidden").next("br").addClass("hidden"):M.removeClass("hidden").next("br").removeClass("hidden");if(t=="cpu_percent"){var z=localStorage.getItem(v___server_hostname+"-"+"sysinfo_cpu"),q=z?"("+z+")":String();$("#right-side-tabs-sysinfo .graph-container."+t+" .description").attr("title",localStorage.getItem(v___server_hostname+"-"+"sysinfo_cpu")).text(""+theme_language("global_cpu_load")+": "+localStorage.getItem(v___server_hostname+"-"+"sysinfo_cpu_percent_stats")+"% "+q+"");$("#right-side-tabs-sysinfo .graph-container."+t+" .bar").attr("style","width:"+localStorage.getItem(v___server_hostname+"-"+"sysinfo_cpu_percent_stats")+"%")}if(t=="mem_percent"){var Z=localStorage.getItem(v___server_hostname+"-"+"sysinfo_mem"),U=Z?"("+Z+")":String();$("#right-side-tabs-sysinfo .graph-container."+t+" .description").attr("title",localStorage.getItem(v___server_hostname+"-"+"sysinfo_mem")).text(""+theme_language("body_real")+": "+localStorage.getItem(v___server_hostname+"-"+"sysinfo_mem_percent_stats")+"% "+U+"");$("#right-side-tabs-sysinfo .graph-container."+t+" .bar").attr("style","width:"+localStorage.getItem(v___server_hostname+"-"+"sysinfo_mem_percent_stats")+"%")}if(t=="virt_percent"){var J=localStorage.getItem(v___server_hostname+"-"+"sysinfo_virt"),j=J?"("+J+")":String();$("#right-side-tabs-sysinfo .graph-container."+t+" .description").attr("title",localStorage.getItem(v___server_hostname+"-"+"sysinfo_virt")).text(""+theme_language("body_virt")+": "+localStorage.getItem(v___server_hostname+"-"+"sysinfo_virt_percent_stats")+"% "+j+"");$("#right-side-tabs-sysinfo .graph-container."+t+" .bar").attr("style","width:"+localStorage.getItem(v___server_hostname+"-"+"sysinfo_virt_percent_stats")+"%")}if(t=="disk_percent"){var K=localStorage.getItem(v___server_hostname+"-"+"sysinfo_disk"),W=K?"("+K+")":String();$("#right-side-tabs-sysinfo .graph-container."+t+" .description").attr("title",localStorage.getItem(v___server_hostname+"-"+"sysinfo_disk")).text(""+theme_language("body_disk")+": "+localStorage.getItem(v___server_hostname+"-"+"sysinfo_disk_percent_stats")+"% "+W+"");$("#right-side-tabs-sysinfo .graph-container."+t+" .bar").attr("style","width:"+localStorage.getItem(v___server_hostname+"-"+"sysinfo_disk_percent_stats")+"%")}}}$('#right-side-tabs .info-container .info-list-data span[data-data="'+t+'"]').html(i);if(t=="package_message"&&core.moduleAvailable("package-updates")){var D=i;D&&$('#right-side-tabs .info-container .info-list-data span[data-data="'+t+'"]').html($(D).html($(D).html().split(",")[0])[0].outerHTML)}if(t=="local_time"){var P=$('#right-side-tabs .info-container .info-list-data span[data-data="'+t+'"]'),Q=P.find("a").length?P.find("a"):P.find("span");if(Q&&Q.length){Q.html(Q.next("span").detach())}if(settings_theme_make_date){snippets.datetime.tictac(1)}else{P.html(i)}}if(t=="cpu_temperature"||t=="cpu_fans"){var R=0,N="strong",G=t==="cpu_fans"?true:false,L="#right-side-tabs .info-container .badge-drivestatus.badge",X=G?"cpufans":"cpustatus",H=G?"fans":"cpu",F='.info-container [data-stats="'+H+'"]',Y=".badge-"+X+"";$.each($(i).filter(Y),function(e,t){var a="",s=$(this).text(),n=s.split(":"),r=n[1]||n[0],o=r;if(G){a=HTML.label.textMaxLevels("rpm",o)}else{a=HTML.label.textMaxLevels("temperature",r)}if(a=="bg-warning"||a=="bg-danger"){R=1}if(!$(""+L+"-"+X+"").length){$(""+N+'[data-stats="'+H+'"] + br[data-stats="'+H+'"]').after(i.replace(/
| /gi,""))}$($(""+L+"-"+X+"")[e]).html($(this).text()).removeClass(function(e,t){return(t.match(/(^|\s)bg-\S+/g)||[]).join(" ")}).addClass(a+"-dark")}).promise().done(function(){var e=$(F).filter(N),t=$(F).filter(Y).length,a=X=G?"cpufan":"cputemp",s=t===1?a:a+"s";e.text(theme_language("body_"+s+""));if(R||i&&settings_sysinfo_cpu_and_fans_side_slider_always_show){$(F).removeClass("hidden")}else{$(F).addClass("hidden")}})}if(t=="hdd_temperature"){var B=0;$.each($(i).filter(".badge-drivestatus:not(.badge-cpustatus)"),function(e,t){var a="",s=$(this).text(),n=s.split(":"),r=n[1]||n[0];a=HTML.label.textMaxLevels("temperature",r);if(a=="bg-warning"||a=="bg-danger"){B=1}if(!$("#right-side-tabs .info-container .badge-drivestatus:not(.badge-cpustatus)").length){$('strong[data-stats="drive"] + br[data-stats="drive"]').after(i.replace(/
| /gi,""))}$($("#right-side-tabs .info-container .badge-drivestatus:not(.badge-cpustatus)")[e]).html($(this).text()).removeClass(function(e,t){return(t.match(/(^|\s)bg-\S+/g)||[]).join(" ")}).addClass(a+"-dark")}).promise().done(function(){if(B||i&&settings_sysinfo_cpu_and_fans_side_slider_always_show){$('.info-container [data-stats="drive"]').removeClass("hidden")}else{$('.info-container [data-stats="drive"]').addClass("hidden")}})}if(t=="warning_si"){var ee=$("#right-side-tabs .info-container .warning-list-data"),te=i.replace(/<(script|link|meta)\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/(script|link|meta)>/gi,"").replace(/type='submit'/g,"formtarget='page' type='submit'").replace(/ui_form_end_submit" type="button"/g,'ui_form_end_submit" type="submit" formtarget="page"');ee.html(te);if(i==="
"){ee.empty()}plugins.dashboard.update.alerts(i)}if(t=="extended_si"){var ee=$("#right-side-tabs .info-container .extended-list-data");var ae=i.replace(/aria-expanded="true"/gi,'aria-expanded="false"').replace(/collapse in/gi,"collapse");opened_tabs=$("#extended_sysinfo .panel .in").map(function(){ae=ae.replace('data-toggle="collapse" href="#'+this.id+'" aria-expanded="false" aria-controls="'+this.id+'"','data-toggle="collapse" href="#'+this.id+'" aria-expanded="true" aria-controls="'+this.id+'"');ae=ae.replace('div id="'+this.id+'" class="panel-collapse collapse"','div id="'+this.id+'" class="panel-collapse collapse in"')}).promise().done(function(){ee.html('
'+ae);var e=$("#right-side-tabs .extended-list-data");e.find("div.panel-heading:not(#mount_disks_info-mount):not(#status_services-status):not(#status-virtual-server):not(#acl_logins-acl):not(#sysinfo-virtual-server):not(#quota-virtual-server):not(#bw-virtual-server)").parent().remove();$.each(e.find("div.panel-heading .panel-title"),function(){var e=$(this).find("a"),t=$(this).find("a").attr("aria-expanded")!="true"?1:0,a=t?"+":"—";$(this).append(''+a+"");e.text(Convert.strUpFirst($.trim(e.text())))});e.find(".panel.panel-default").detach().appendTo("#right-side-tabs #extended_sysinfo");e.find("div.panel-body").find("img").remove();e.find('input[type="submit"]').addClass("btn btn-default btn-xs");e.find('input[type="submit"]').parents("form").attr("formtarget","page");e.find('button[type="button"].ui_submit').addClass("btn btn-default btn-xs");e.find('button[type="button"].ui_submit').parents("form").attr("formtarget","page");var t=e.find('[data-referrer="acl_logins"] .panel-body > table:first-child'),a="table-responsive";t.removeClass().addClass("table table-striped table-hover");t.wrap('
');$("#extended_sysinfo .panel").on("show.bs.collapse",function(){$(this).find(".panel-title-status").removeClass("margined-right-2").text("—")}).on("hide.bs.collapse",function(){$(this).find(".panel-title-status").addClass("margined-right-2").text("+")})});try{theme_panels_sort("slider")}catch(e){}}if(t=="collect_interval"){if(Test.numeric(i)){settings_side_slider_background_refresh_time=parseFloat(i)}else{settings_side_slider_background_refresh_time=0}}if($.trim($(".info-list-data").text()).length){setTimeout(function(){$("#right-side-tabs .is-sysinfo_data").removeClass("hidden");$("#right-side-tabs .no-sysinfo_data").addClass("hidden")},100)}});sysinfo_replace_dismiss_buttons();setTimeout(function(){plugins.slider.notifications.check()},3e3);snippets.datetime.locale()},error:function(e){session.status(e.responseText)}});if(settings_side_slider_enabled){typeof iupdateTimer==="number"&&clearInterval(iupdateTimer);if(typeof settings_side_slider_background_refresh_time!="undefined"){if(settings_side_slider_background_refresh_time>0){iupdateTimer=setInterval(function(){sysinfo_update()},settings_side_slider_background_refresh_time*6e4)}}}}};document.addEventListener("DOMContentLoaded",function(){var e=".right-side-tabs-dismiss i.fa-reload, ._sync_sysinfo_.fa-reload";$(document.body).on("click",e,function(){if($(this).hasClass("cursor-na")){return}var e=core.moduleAvailable("virtual-server")?"virtual-server":"system-status";var t=$(this);t.addClass("fa-spin-slow cursor-na");$.ajax({type:"GET",url:v___location_prefix+"/"+e+"/recollect.cgi",data:false,dataType:"text",success:function(e){if(!session.status(e)){return}if(v___location_file==="sysinfo.cgi"){get_pjax_content(v___location_prefix+"/sysinfo.cgi")}sysinfo_update()},error:function(e){t.removeClass("fa-spin-slow cursor-na");plugins.messenger.post(''+theme_language("sysinfo_update_failed"),20,"error","sysinfoRecollect")}})});if(v___user_level==0&&$.support.spa){var t=localStorage.getItem(v___server_hostname+"-"+"right-side-tab")?localStorage.getItem(v___server_hostname+"-"+"right-side-tab"):"#right-side-tabs-sysinfo",a='
'+''+theme_language("notification_no_data").toUpperCase()+""+"
",i='
'+''+theme_language("notification_no_favorites").toUpperCase()+""+"
";var s=String(),n=document.querySelector("aside");if(n&&n.style&&n.style.filter&&settings_side_slider_palette==="nav"){s="filter: "+n.style.filter}var r='"+'"+"";if(browser.detect.safari(1)){setTimeout(function(){$(document.body).append(r);test_visibility()})}else{$(document.body).append(r);test_visibility()}if(!$('a[href="'+t+'"]:visible').length){$("#right-side-tabs ul.nav-tabs li a:visible").trigger("click")}$('#right-side-tabs .nav.nav-tabs a[data-toggle="tab"]').on("shown.bs.tab",function(e){var t=$(e.target).attr("href");localStorage.setItem(v___server_hostname+"-"+"right-side-tab",t)});$(document.body).on("click",'i[data-trigger="side_slider_pinned"]',function(e){e.stopImmediatePropagation();var t=get_server_data("data-slider-fixed")=="1"?0:1;vars.slider.pinned=t;settings_side_slider_fixed=!settings_side_slider_fixed;set_visibility(t,e.originalEvent!==undefined?1:0);$(".dropdown.open.obj-settings .dropdown-toggle").dropdown("toggle");$(window).resize()}).on("click",".right-side-tabs-favorites-ctl",function(e){if($(".favorites-menu-outer").hasClass("hover")){$(".favorites-menu-close").trigger("click")}else{$(".user-link.favorites").trigger("click")}}).on("click",'#right-side-tabs a:not([data-toggle="collapse"]):not([role="tab"]):not(.list-group-item)',function(e){$(".right-side-tabs-toggler:not(.hidden) .btn-menu-toggler").trigger("click")}).on("click","#right-side-tabs .info-container .graph-container-fw",function(e){var t=core.moduleAvailable("proc"),a=$(this).attr("class"),i=a.indexOf("cpu_")>-1?"cpu":a.indexOf("mem_")>-1?"mem":a.indexOf("virt_")>-1?"virt":"disk",s;if(i=="cpu"&&t){s=v___location_prefix+"/proc/index_cpu.cgi"}else if((i=="mem"||i=="virt")&&t){s=v___location_prefix+"/proc/index_size.cgi"}else if(i=="disk"&&core.moduleAvailable("disk-usage")){s=v___location_prefix+"/disk-usage"}else if(i=="disk"&&core.moduleAvailable("quota")){s=v___location_prefix+"/quota/list_users.cgi?dir=%2F"}s&&get_pjax_content(s);$(".right-side-tabs-toggler:not(.hidden) .btn-menu-toggler").trigger("click")}).on("click","#right-side-tabs .fa-dashboard",function(e){if(get_onbeforeunload_status()){this.href=v___location_prefix+"/sysinfo.cgi";get_onbeforeunload_message(e,this)}else{get_pjax_content(v___location_prefix+"/sysinfo.cgi")}$(".right-side-tabs-toggler:not(.hidden) .btn-menu-toggler").trigger("click")}).on("click","#right-side-tabs [data-click-about]",function(e){theme_update_notice()}).on("click",".right-side-tabs-toggler:not(.hidden)",function(e){if($(this).hasClass("opened")){$(this).removeClass("opened");$(this).animate({right:"0"},0);$(".right-side-tabs").animate({right:"-302"},0)}else{$(this).addClass("opened");$(this).animate({right:"300"},parseInt(175*1.7));$(".right-side-tabs").animate({right:"0"},parseInt(175*1.7))}});$(".right-side-tabs .tab-pane").each(function(){$(this).css("height",$(document.body).outerHeight()-13)});$(".right-side-tabs").on("mouseover",".list-group-item",function(e){$(this).find(".fa.fa-trash-o").removeClass("hidden");!$(this).hasClass("opacity-0_3")&&$(this).find(".fa-clear-all").removeClass("hidden")}).on("mouseout",".list-group-item",function(e){$(this).find(".fa.fa-trash-o").addClass("hidden");$(this).find(".fa-clear-all").addClass("hidden")});$(".right-side-tabs").on("click","[data-port-href]",function(e){e.preventDefault();e.stopPropagation();open($(this).data("port-href"))});$(".right-side-tabs").on("click",'a.list-group-item[data-type="csf_deny"]',function(e){e.preventDefault();e.stopPropagation();if($(e.target).is(".fa.fa-trash-o")||$(e.target).is(".fa-clear-all")||$(e.target).is("[data-port-href]")){return}get_bundle_csf();$(document.body).append('");$("form#csf_temporary_ip_entries").submit().remove();$(".right-side-tabs-toggler:not(.hidden) .btn-menu-toggler").trigger("click")});$(".right-side-tabs").on("click contextmenu","a.list-group-item",function(e){e.preventDefault();var t=$(e.target).is(".fa.fa-trash-o"),a=$(e.target).is(".fa-clear-all"),i=$(e.target).is("[data-port-href]");if(t||a||i){e.stopPropagation();e.stopImmediatePropagation()}if(e.type=="contextmenu"){$(this).find(".fa-clear-all").trigger("click");e.preventDefault();e.stopPropagation();return}if(!t&&!a&&!i){if($(this).attr("href")&&$(this).attr("href").length&&$(this).attr("href")!="undefined"&&$(this).attr("data-type")!="csf_deny"){$(this).addClass("opacity-0_3");$(this).find(".fa-clear-all").addClass("hidden");mark_notification_read($(this).attr("id"),$(this).data("type"),1,1);$(".right-side-tabs-toggler:not(.hidden) .btn-menu-toggler").trigger("click");get_pjax_content($(this).attr("href"))}else{$(this).addClass("opacity-0_3");mark_notification_read($(this).attr("id"),$(this).data("type"),1,1)}}else{if($(e.target).is(".fa-clear-all")){$(this).addClass("opacity-0_3");$(this).find(".fa-clear-all").addClass("hidden");mark_notification_read($(this).attr("id"),$(this).data("type"),1,1);return}$(this).animate({opacity:"0"},175,function(){$(this).remove();localStorage.removeItem(v___server_hostname+"-"+"notifications_"+$(this).attr("id")+"_"+$(this).data("type"));mark_no_notifications()})}});$(".right-side-tabs-dismiss i.fa2-message").on("click",function(e){var t=get_server_data("user"),a=function(){return $(document.body).find(".modal.user_motd_data")},i=function(){return a().find(".user-motd-content")},s=function(e,t){var a=t||i().find(".form-group-sm").length+1,s=e.time?e.time:moment().unix()+""+parseInt(Math.random()*1e4);var n='
';n+='';var r=["all","adm"];if(get_server_data("pro-vm")==1){r.push("res")}if(core.moduleAvailable("virtual-server")){r.push("vm")}if(core.moduleAvailable("server-manager")){r.push("cm")}if(core.moduleAvailable("usermin")){r.push("um")}if(r.length>2){n+=""}n+='';n+="
";return n},n="";$.ajax({type:"POST",url:v___location_prefix+"/xhr.cgi?type=file&action=motd&subtype=get",data:false,dataType:"JSON",success:function(e){if(!$.isEmptyObject(e.motd)){$.each($(e.motd),function(e,a){var i=a[t].length-1;a[t].forEach(function(e,t){if(!n){n='
'}n+=s(e,t+1);if(t===i){n+="
"}})})}$("body").click().append('");a().on("shown.bs.modal",function(){a().tooltip({selector:'button[data-toggle="tooltip"]',sanitize:false,container:"body",html:false,delay:{show:vars.plugins.tooltip.delay.show/3,hide:0}});a().find(".btn-user-motd-add").on("click",function(e){e.preventDefault();var t=i(),a=t.find(".form-flex"),n=a.length,r="";if(!n){r='
'}r+=s({msg:"",time:""});if(!n){r+="
"}if(!n){t.append(r).find('[data-motd]:last-child > input[type="text"]').focus()}else{a.append(r).find('[data-motd]:last-child > input[type="text"]').focus()}});a().find(".btn-user-motd-save").on("click",function(e){var t=$(this);e.preventDefault();if(t.hasClass("disabled")){return}var a=[];$.each(i().find("[data-motd]"),function(){var e=$(this).attr("data-motd"),t=$.trim($(this).find('[type="text"]').val()),i=$(this).find("select"),s=i.length?i.val():"all";if(t){a.push({msg:t,time:e,target:s})}});spinnerfy_buttons(t);$.ajax({type:"POST",url:v___location_prefix+"/xhr.cgi?type=file&action=motd&subtype=set&data="+JSON.stringify(a)+"",data:false,dataType:"JSON",complete:function(e){setTimeout(function(){despinnerfy_button(t)},300)},error:function(e){despinnerfy_button(t);session.status(e.responseText)}})})}).on("hidden.bs.modal",function(){a().remove()}).modal("show")},error:function(e){session.status(e.responseText)}})});$(".right-side-tabs-dismiss i.fa-clear-all").click(function(e){mark_group_notifications_read(false)});$(".right-side-tabs-dismiss i.fa-trash").click(function(e){$(".right-side-tabs .list-group-item:not(.no-notifications)").animate({opacity:"0"},175,function(){$(this).remove();remove_all_notifications();mark_no_notifications()})});$(".right-side-tabs .tab-pane").mCustomScrollbar({axis:"y",theme:"minimal",scrollInertia:100,scrollButtons:false});mark_no_notifications();check_notifications()}else{get_server_data("data-slider-fixed","0");$(".right-side-tabs-toggler").addClass("hidden")}});return{test:test_visibility,state:set_visibility,badge:display_badges,notifications:{check:check_notifications,dismiss:mark_group_notifications_read},update:{favorites:update_right_pane_favorites},data:{fetch:sysinfo_update}}}();plugins.notifications=function(){var e={format_links:function(e,t){var a="",i=e.match(/(?:])|(?:])/),s=function(e,a,i){if(t){return"'+e.replace(""}else{return e}};if(i&&(i[1]||i[2])){a=i[1]||i[2];if(a&&(a.startsWith("http:")||a.startsWith("https:")||a.includes("ftp:")||a.includes("ftps:")||a.startsWith("//"))){e=e+" "+s('',a,true)+""}else if(a){e=e+" "+s('',a,false)+""}e=e.replace(//gi," ");e=e.replace(/<\/a>/gi," ")}return{msg:e,link:a}}},t={get:function(){$.ajax({type:"POST",url:v___location_prefix+"/xhr.cgi?type=file&action=motd&subtype=receive",dataType:"JSON",success:function(e){t._pull();t._show(e)},error:function(e){session.status(e.responseText)}})},_pull_timer:1e10,_pull:function(){var e=this,t=typeof settings_side_slider_background_refresh_time=="undefined"?5:settings_side_slider_background_refresh_time>0?settings_side_slider_background_refresh_time:15,a=t*6e4;clearInterval(this._pull_timer);a&&(e._pull_timer=setInterval(function(){e.get()},a))},_show:function(t){if(!$.isEmptyObject(t.motd)){var a=0,i=get_server_data("user"),s=function(e){return v___server_hostname+"-"+i+"-"+c+"_"+e};for(var n in t.motd){for(var r in t.motd[n]){a++;var o=t.motd[n][r],l=o.msg,_=theme_language("notifications_motd2"),c="user_motd",d=o.time.substring(0,10),f=o.time+"-"+n,p=s(f),u=e.format_links(l,true),g=u.link;l=u.msg;if(!localStorage.getItem(p)){var m=plugins.messenger.post([" fa2 fa-1_25x fa2-message",_+' '+moment.unix(d).fromNow()+'
'+l+""],0,"success",f,0,["bottom","right"],{cancel:{label:theme_language("global_hide"),action:function(){this.hide();localStorage.setItem(s(this.options.id),"1")}}}),h=m.$message.find("x-a");if(h.length){h.on("click",function(e){e.preventDefault();var t=$(this).attr("href"),a=$(this).attr("target");if(a){window.open(t,a)}else{get_pjax_content(t)}})}notifications(_,l,c,g,1)}}}}}},a={get:function(){}},i={post:function(){}};return{user:t.get,administrator:a.get,desktop:i.post}}();plugins.dashboard=function(){var e=".container-fluid .panel-group .panel:not(#system-status)",t="panel-heading",a="panel-collapse",i="dashboard_panels",s=function(){localStorage.removeItem(v___server_hostname+"-"+v___server_username+"-"+i)},n=function(){if(v___location_path&&v___location_path.indexOf("/sysinfo.cgi")>-1){var a=localStorage.getItem(v___server_hostname+"-"+v___server_username+"-"+i);if(a!=null){a=Object.entries(JSON.parse(a));for(var s=0;s"?0:1,a=$("#system-status > .panel-body > .table.table-hover");if(a.length){a.nextAll().remove();if(t){a.after(e)}}};document.addEventListener("DOMContentLoaded",function(){$(document.body).on("shown.bs.collapse hidden.bs.collapse",""+e+"",function(){var s=$(""+e+""),n={};$.each(s,function(){$target=$(this).find("."+t+""),id=$target.attr("id"),state=$target.next("."+a).hasClass("in");n[id]=state});localStorage.setItem(v___server_hostname+"-"+v___server_username+"-"+i,JSON.stringify(n))})});return{restore:n,reset:s,update:{alerts:r}}}();plugins.favorites=function(){var e=function(){return $("#favorites-menu .favorites-menu-content li:not(.exclude)").length},t=function(){var e=[];$.each($("#favorites-menu .favorites-menu-content li:not(.exclude) a"),function(){var t=$(this).text(),a=$(this).attr("href"),i=$(this).find("[data-product]").attr("data-product");favorite={};if(get_server_data("webprefix")&&!a.includes("!edit")&&!a.includes("!view")){favorite.link=link_type_convert(a.replace(get_server_data("webprefix"),""),1)}else{favorite.link=link_type_convert(a,1)}favorite.title=t.trim();favorite.icon=i=="virtualmin"?i+"":i;e.push(favorite)});return e},a=function(){var e="#favorites-menu > div > nav > ul";if(typeof sortable!="function"||!$("#favorites-menu > div > nav > ul").length){return}sortable(e,{items:":not(.favorites-title)",forcePlaceholderSize:false}).on("sortupdate",function(){i()})},i=function(){$.ajax({type:"POST",url:v___location_prefix+"/settings-favorites_save.cgi",data:{favorites:'{"favorites":'+JSON.stringify(t(),null,4).replace(/\\n/g,"\\n").replace(/\\'/g,"\\'").replace(/\\"/g,'\\"').replace(/\\&/g,"\\&").replace(/\\r/g,"\\r").replace(/\\t/g,"\\t").replace(/\\b/g,"\\b").replace(/\\f/g,"\\f")+"}"},success:function(e){if(!session.status(e)){return}plugins.slider.update.favorites()},error:function(e){}});sortable("#favorites-menu > div > nav > ul")},s=function(){var t="favorites-menu .favorites-menu-content";if(e()===0){$("#"+t+" li.favorites-no-message").removeClass("hidden");$("#"+t+" .favorites-title sup a").addClass("hidden")}},n=function(t,a,i){var s="favorites-menu .favorites-menu-content";if(e()===0){$("#"+s+" li.favorites-no-message").addClass("hidden");$("#"+s+" .favorites-title sup a").removeClass("hidden")}var n;n='class="wbm-'+i+""+(i=="virtualmin"?"":"")+' wbm-sm"';$("#"+s+" li.favorites-title").after('')},r=function(e,t){var a=snippets.parser.fileviewer.getSuffix(false,1),n=a[0],r=a[1],o=a[2],l=a[3],_=a[4],c=a[5],d=a[6],f=a[7],p=a[8];var u=e.replace(/["\\]/g,"\\$&"),g=function(){var e="",t=[u,u+n+c+f,u+r+c+d+f,u+o+c+p,u+l+c+d+p,u+_+c],a="";$.each(t,function(t,i){if(e){a=", "}e+=""+a+'a[href="'+i+'"], a[href="'+link_type_convert(i,2)+'"]'});return e};$("#favorites-menu .favorites-menu-content").find(g()).parent("li").remove();!e.startsWith("!edit")&&!e.startsWith("!view")&&$("#headln2c > .favorites, .xcustom-favorites").addClass("fa-star-o").removeClass("fa-star text-warning");if(!t){s();i()}},o=function(e){var t=$("#favorites-menu li a.menu-exclude-link"),a=e,n=$('aside select option[value="'+a+'"]').attr("title");if(t&&t.length){$.each(t,function(t,a){var i=$(a),s=i.attr("href"),o=i.find("span").text();if(s){if(s.includes(e)||o&&$.trim(o).startsWith(n)){r(s,1)}}}).promise().done(function(){setTimeout(function(){s();i()},300)})}},l=function(e,t){s();var a=$("#favorites-menu .favorites-menu-content li:not(.exclude) a").map(function(e,t){return link_type_convert($(t).attr("href"),1)}).toArray(),i,n,r,o=0,l="!edit ";if(e){r=e.find(".favorites-editor");if(r.hasClass("viewer")){l="!view ";o=1}}else{r=$("#headln2c > .favorites, .xcustom-favorites");i=link_type_convert(URI(v___location).resource(),1);if(i.includes("index.cgi")){n=i.replace("index.cgi","")}else{n=i+"index.cgi"}}if(t){t=t.replace(/\/\//g,"/")}if(o){t=t+snippets.parser.fileviewer.getSuffix(r)}if(i&&$.inArray(i,a)>-1||n&&$.inArray(n,a)>-1||a.includes(l+t)){var _=theme_language("favorites_remove");r.addClass("fa-star").removeClass("fa-star-o").attr("aria-label",_);r.attr("data-original-title",_).tooltip("fixTitle")}else{var c=theme_language("favorites_add");r.removeClass("fa-star").addClass("fa-star-o").attr("aria-label",c);r.attr("data-original-title",c).tooltip("fixTitle")}};document.addEventListener("DOMContentLoaded",function(){(function(){$(document.body).on("click",'.favorites-menu a.menu-exclude-link, .right_pane_favorites_link:not([href^="!edit"]):not([href^="!view"])',function(){var e=$(this).attr("href"),t=e.startsWith("!edit"),a=e.startsWith("!view"),i=Test.strContains(e,"virtual-server/")?"dom":Test.strContains(e,"server-manager/")?"id":false,s=Test.strContains(e,"gparent")?"gparent":i,n=URI.parseQuery(URI(e).query())[s],r=i==="dom"?"virtualmin":i==="id"?"cloudmin":"webmin",o=$('.switch-toggle input:not([id="open_'+r+'"]):checked').length;if(i){setTimeout(function(){if($("aside select").val()!=n){if(i==="dom"){plugins.navigation.get.virtualmin(n)}else if(i==="id"){plugins.navigation.get.cloudmin(n)}}},300)}else{if(!t&&!a&&o){plugins.navigation.get.webmin()}}}).on("click","#headln2c > .favorites:not(.dummy), .xcustom-favorites:not(.dummy), button.favorites-editor",function(e){e.preventDefault();var t=URI(v___location).resource(),a=$(this),s=snippets.parser.fileviewer.getOpts(a),o=s[5],l=a.is(".favorites-editor"),_,c=function(e){var t=edit_file_parse_target(e.prev("strong"));file__name=t[0],file__path=t[1],_=t[2];_=_.replace(/\/\//g,"/");return _},d=function(e){return c(e)+snippets.parser.fileviewer.getSuffix(e)},f=function(e){var t=e+snippets.parser.fileviewer.getSuffix(a);return e!=t?t:""},p=function(e){var t=theme_language("favorites_remove");e.removeClass("fa-star-o").addClass("fa-star text-warning").attr("aria-label",t);e.attr("data-original-title",t).tooltip("fixTitle")},u=function(e){var t=theme_language("favorites_add");e.addClass("fa-star-o").removeClass("fa-star text-warning").attr("aria-label",t);e.attr("data-original-title",t).tooltip("fixTitle")},g=$(".jsPanel button.favorites-editor"+(o?".viewer":"")+"").not(a);if(a.hasClass("fa-star-o")){p(a);if(l||o){$.each(g,function(){if(o&&!$(this).hasClass("viewer")){return true}if(!o&&$(this).hasClass("viewer")){return true}if(c($(this))===c(a)&&!o){p($(this))}if(o&&d($(this))===f(c(a))){p($(this))}});_=c(a);var m=Convert.htmlEscape(a.prev("[data-file-container]").attr("title")||_);if(get_access_level()===2||get_access_level()===3||get_access_level()===4){var h=new RegExp("^"+get_user_home(),"");var v=new RegExp("\\("+get_user_home(),"");_=_.replace(h,"");m=m.replace(v,"(")}var b="!edit ";if(o){_=f(_);b="!view "}_&&n(b+_,""+theme_language(o?"file_viewer":"file_editor")+" - "+m,o?"x wbm2-viewer":"editor")}else{var x=" ⇾ ",y=theme.config._.form.tconfig(),A=v___location_file==="tconfig.cgi"&&y.length,k=v___location_path===v___location_prefix+"/config.cgi"||v___location_path===v___location_prefix+"/uconfig.cgi"||v___location_path===v___location_prefix+"/mconfig.cgi"||v___location_path===v___location_prefix+"/tconfig.cgi",w=Convert.htmlEscape($("#headln2c > span[data-main_title]").text().trim()),C=Convert.htmlEscape($(".has-sub.active").text().trim()),S=Convert.htmlEscape($(".sub_active").text().trim()),I=S.trim()!==w.trim(),V="",T="";if(($t_uri_virtualmin||$t_uri_cloudmin)&&!k){V=Convert.htmlEscape($("aside .ui_select option:selected").text())}if($('body[class^="'+v___module_file_manager+'"]').length){if(typeof fm_get_current_path==="function"){T=fm_get_current_path();var E=function(e){if(get_access_level()==2||get_access_level()==3){if(fm_user_data&&fm_user_data.allowed_paths&&fm_user_data.allowed_paths.length===1){e="~"+e}}return e};if(!T){T=E("/");T="["+T+"]"}else{T="["+Convert.htmlEscape(E(Convert.uriDecodeComponent(T)))+"]"}}}if(k){if(!A){var O=v___location_file.match(/(.*?)\./),M=O?O[1]:parseInt(Math.random()*1e4);y=$('.container-fluid form[action*="'+M+'_save.cgi"]');var z=Convert.htmlEscape($("#headln2c > span[data-sub_title] span").text().trim());C=C?C+x+z:z;S=w}else{S=w}w=$.trim(y.find(".table-title").text())}else{if(($t_uri_virtualmin||$t_uri_cloudmin)&&v___location_query&&($t_uri_virtualmin&&!v___location_query.includes("dom=")||$t_uri_cloudmin&&!v___location_query.includes("id="))&&!core.curModule(v___module_file_manager)&&!core.curModule("webminlog")&&!core.curModule("phpini")&&!core.curModule("apache")&&!core.curModule("syslog")){V=""}}var q=(V.length?V+" - ":"")+(C.length?C+x:"")+(S.length?S+(w.length&&I?": ":""):"")+(I?w:"")+(T.length?" "+T:"");if(vars.events.keypressed.alt){theme_copy_to_clipboard(q);u(a)}else{n(t,q,k&&A?"theme":$t_uri_virtualmin?"virtualmin":$t_uri_cloudmin?"cloudmin":"webmin")}}i()}else{u(a);if(l||o){$.each(g,function(){if(o&&!$(this).hasClass("viewer")){return true}if(!o&&$(this).hasClass("viewer")){return true}if(c($(this))===c(a)&&!o){u($(this))}if(o&&d($(this))===f(c(a))){u($(this))}});_=c(a);var b="!edit ";if(o){_=f(_);b="!view "}_&&r(b+_)}else{r(link_type_convert(t,1))}}}).on("click","#right-side-tabs .right_pane_favorites_link",function(e){$(".favorites-menu-outer.hover + .favorites-menu-close").trigger("click")}).on("click",".favorites-menu-close, nav.favorites-menu li a",function(){$(".favorites-menu-outer").removeClass("hover")}).on("keydown",function(e){if($(".favorites-menu-outer").css("left")=="0px"&&e.keyCode==27){$(".favorites-menu-outer").removeClass("hover")}});$("#favorites-menu .favorites-menu-content").on("mouseover","li:not(.exclude) span.f__c, li:not(.exclude) span.f__c small",function(){$(this).find("small").removeClass("hidden")}).on("mouseleave","li:not(.exclude) span.f__c, li:not(.exclude) span.f__c small",function(){$(this).find("small").addClass("hidden")});$("#favorites-menu .favorites-menu-content").on("mouseover","li:not(.exclude) small",function(){$(this).find(".fa-times").removeClass("fa-times").addClass("fa-times-circle");$(this).animate({"font-size":"0.7em","margin-top":"-2px","margin-left":"-1px"},0)}).on("mouseleave","li:not(.exclude) small",function(){$(this).find(".fa-times-circle").removeClass("fa-times-circle").addClass("fa-times");$(this).animate({"font-size":"0.6em","margin-top":"-1px","margin-left":"0"},0)});$("#favorites-menu .favorites-menu-content").on("click","li:not(.exclude) small .fa-times-circle",function(e){e.preventDefault();e.stopPropagation();r($(this).parents("a").attr("href"))})})();a()});return{detect:l,fetch:t,remove:o}}();plugins.update_notice=function(){$(document.body).on("hidden.bs.modal","#update_notice",function(){$(".modal#update_notice").remove()});$(document.body).on("show.bs.modal","#update_notice",function(){var e=$(this),t=e.find(".modal-body > h4:first-child"),a=t.text().split(/\s+/)[1],i=e.find(".versionSeparator:last").text(),s=e.find(".versionSeparator").length,n=theme.version(false,false),r=i+" ... "+n;var o=false,l=i.match(/([\d]+\.[\d]+)/),_=n.match(/([\d]+\.[\d]+)/);if(l&&_){l=l[1];_=_[1];if(l==_){$(this).addClass("update_notice_subvers")}}var c=e.find(".versionSeparator"),d=theme_language("global_development_version");$.each(c,function(){$(this).attr("target","_blank")});var f=$(this).find(".modal-body h4"),p=$(this).find(".modal-body h4:first");if(!$(this).find(".modal-body h4:first .diffctl").length){var u=new RegExp(RegExp.quote(a),"g");if(s){f.replaceText(u,""+r+"");f.replaceText(/Version/,"Versions")}var g=$(this).find('.modal-body h4:contains("alpha"), .modal-body h4:contains("beta"), .modal-body h4:contains("RC")').length;if(f.length&&g){var m=$(this).find('.modal-body a[href*="authentic-theme/releases"]:first').text().match(/-?(?:\d+(?:\.\d*)?|\.\d+)/);latest_release=parseFloat(m?m[0]:theme.version(false,false));var h=p.text(),v=h.split("..."),b=0,x=e.find('a.versionSeparator[href*="releases"]:not(:empty)').first().text();if(v[1]){b=v[0].replace("Versions ","");p.text(p.text())}p.append('');p.after(''+''+d+"")}else{p.append('').append(''+a+"")}}var y=[];$.each($(this).find('li:contains("Fix")'),function(){var e=$.trim($(this).text()),t="Fix bugs",a=t.replace(/\s/," other minor "),i="ul",n="li";if(e===t||e===a){var r=$(this).parent(i),o=r.find("li").length,l=r.find(""+n+":contains("+a+")").length;if(o===1||l){var _=".versionSeparator",c=r.prev("hr"),d=c.prev(_),f=d.prev(i).length,p=d.text();if(f){var u=r.next(_),g=u.next().next(i),m=u.text();if(m){m=m.split("-")[0];u.text(m+"-"+p.split("-").pop());d.remove();c.remove();r.remove();if(!l&&!g.find(""+n+":contains("+t+")").length){g.append("<"+n+"> "+t+"")}}}}}if(!$(this).find(".label").length){return}var h=$(this),v=$(this),b=v.parent("ul"),x=v.find("a:not(.bctl)"),A=x.length;if(s){y.push(x);if(b.find("li").length===1){b.prev("hr").prev("a").remove();b.prev("hr").remove();b.addClass("no-data");b.prev(".versionSeparator").addClass("hidden")}v.remove()}else{v.find("a:first").before('');v.find("a.bctl").click(function(e){x.toggleClass("hidden");v.find("a.bctl i").toggleClass("fa-minus-square-o")});x.addClass("obj-popup hidden")}}).promise().done(function(){if(s&&!$(".bctl").length&&y.length){$(".modal-body h4[data-development]").prev("hr").before(""+'
'+"
  • Fix bugs
");$(".modal-body span[data-bugs-container]").append(y);var e=function(e,t){return parseInt($(t).text().replace("#",""))');t.find("a.bctl").click(function(){i.toggleClass("hidden");t.find("a.bctl i").toggleClass("fa-minus-square-o")});i.addClass("obj-popup hidden");var r=$("div[data-bugs]"),o=r.find("a:not(.bctl)").length;!o&&r.prev(".hr-dashed").remove();!o&&r.remove()}var l=$(".modal#update_notice h4 span");if(Test.strContains(l.text(),"...")&&Test.strContains(l.text(),"patch")){var _=parseInt(l.text().split("...")[1].substr(-1,1));_&&$.each($(".versionSeparator:not(.version_dev)"),function(e,t){if(e+1!=_){$(this).addClass("hidden")}else{$(this).text($(this).text()+"-"+theme_language("global_release").toLowerCase())}})}})})};plugins.icons_row=function(){$(document.body).on("click",".inline-row input",function(e){if(!$(this).is(":checked")){$(this).parents(".gl-icon-container").removeClass("highlighted")}else{$(this).parents(".gl-icon-container").addClass("highlighted")}}).on("click contextmenu","div.icons-container, div.small-icons-container",function(e){var t=$(e.target).find("a[href]").first();if(e.type==="click"&&$(e.target).is($(this))&&t.length){t.trigger("click");return}if(e.type==="click"&&$(e.target).is(".gl-icon-select")&&!$.support.spa){e.preventDefault();$(this).trigger("contextmenu")}else if(e.type==="contextmenu"){e.preventDefault();if($(this).find("input").is(":checked")){$(this).find("input").prop("checked",false);$(this).removeClass("highlighted")}else{if($(this).find("input").length){$(this).find("input").prop("checked",true);$(this).addClass("highlighted")}}var a=$(e.target).is(".icon_link")?$(e.target).parent(".gl-icon-container").find(".fa-select, .fa-selected"):$(e.target).is(".gl-icon-select")?$(e.target):$(e.target).is("img")?$(e.target).parent("a").parent(".gl-icon-container").find(".fa-select, .fa-selected"):$(e.target).find(".fa-select, .fa-selected");a.hasClass("fa-select")?a.removeClass("fa-select").addClass("fa-selected"):a.removeClass("fa-selected").addClass("fa-select")}typeof db_check_selected==="function"&&db_check_selected()}).on("click",".row.icons-row .icons-container, .row.icons-row .small-icons-container",function(){if(!$(this).hasClass("forged-xx-skip")){return}})};plugins.chooser=function(){var e=false,t=false,a=false,i=function(e){$(".mppopup .cspinner.hidden").removeClass("hidden");$.ajax({type:"POST",url:e,data:false,dataType:"text",success:function(e){if(!session.status(e)){return}var t=e.replace(/<(!doctype|script|link|meta)\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/(script|link|meta)>/gi,"").replace(/<\/body>|<\/html>/gi,""),a=$(t).filter(".table").html(),i=$(t).filter(".table").prev("b").html();i=o(i);if(a){a=a.replace(//gm,'').replace(//gm,'')}$(".mppopup .modal-body").html(i+''+a+"
");$v__mpp__g_gp=0;$(".mppopup_filter_input").focus();$(".mppopup_filter_input").val("")}})},s=function(e){return e.replace(/&file.*&chroot/,"&file="+Convert.uriEncodeComponent(($v__mpp__g_ol+"/").replace(/\/\/+/g,"/").replace(/:\//g,"://"))+"&chroot")},n=function(e,t){var a=e.prev('input[type="text"], input[name]');if(!a.is("input")&&!e.prev("textarea").length&&!e.prev("br").prev("textarea").length){a=e.prev("span:not(.awradio)").find('input[type="text"]')}else if(!a.length&&!a.is("input")&&t){a=e.prev("textarea");if(!a.length){a=e.prev("br").prev("textarea")}}return a},r=function(t,i,s){e&&(a=t);if(s){if($(".refInputData").is("textarea")){var n=$(".refInputData");if(n.val()){n.val(n.val()+"\n"+t.replace(/\/\/+/g,"/").replace(/:\//g,"://"))}else{n.val(t.replace(/\/\/+/g,"/").replace(/:\//g,"://"))}}else{$(".refInputData").val(t.replace(/\/\/+/g,"/").replace(/:\//g,"://"))}var r=$(".refInputData").parent("td").prev("td").find('input[type="radio"]'),o=$(".refInputData").parent("span").prev("span").find('input[type="radio"]'),l=$(".refInputData").prev("span").find('input[type="radio"]'),_=$(".refInputData").prev("select").find('option[value="*"]');if(o.length){o.trigger("click")}else if(l.length){l.trigger("click")}else if(_.length){_.parent("select").val("*").trigger("change")}else{r.trigger("click")}}if(i){$("body .mppopup").modal("hide")}},o=function(e){e=$.url(e).attr("path").replace(/\/$/g,"").split("/");var t="",a="/",i=a,s=get_access_level()==2||get_access_level()==3,n=get_user_home();if(s){i=n}$.each(e,function(e,r){if(r===""){var o="onclick=\"parentdir('"+i+"'); return false\"";if(s){o=String()}t+=""+(get_access_level()==0?'':'')+""+"\n"}else{a+=r+"/";var o="onclick=\"parentdir('"+a+"'); return false\"";if(s&&!a.includes(n)){o=String()}t+=""+r+""+"\n"}});var r='";return r+''},l=function(t){var i=String();!t&&(t={});if(t.file){i=t.file}var s='";$("body").append(s);$(document).find("._xcustom_file_select button[data-custom-chooser]").trigger("click");if(t.resolve!==false){return new Promise(function(t){setTimeout(function(){var i=setInterval(function(){if(!e){clearInterval(i);t(a);a=false}},100)},10)})}};document.addEventListener("DOMContentLoaded",function(){(function(){var l=document.body;$(l).on("dblclick",'.mppopup a[onclick*="fileclick("], .mppopup a[onclick*="parentdir("]',function(e){e.preventDefault()}).on("dblclick",'.mppopup a[onclick*="select("]',function(){$(".mppopup button[data-mppopup_confirm]").trigger("click")}).on("click",'.mppopup a[onclick*="fileclick("], .mppopup a[onclick*="parentdir("]',function(e){e.preventDefault();e.stopPropagation();e.stopImmediatePropagation();var t=this;if(!t.clicks){t.clicks=0}if(!t.timer){t.timer=null}t.clicks++;$data_mppopup_value.val($v__mpp__g_ol);if(t.clicks===1){t.timer=setTimeout(function(){t.clicks=0;typeof $v__mpp__g_gp=="undefined"?$v__mpp__g_gp=0:0;if(!$v__mpp__g_gp){r($v__mpp__g_ol,0,0)}else{var e=s($v__mpp__g_op);i(e)}$v__mpp__g_gp=0},vars.event.double_click_delay)}else{clearTimeout(t.timer);t.clicks=0;if($v__mpp__g_olt){var a=s($v__mpp__g_op);i(a)}else{r($v__mpp__g_ol,1,1)}}}).on("click",".mppopup button[data-mppopup_confirm]",function(){var e=$data_mppopup_value.val();r(e,1,1);if(core.curModule("custom")){refInput.trigger("input")}}).on("show.bs.modal",".mppopup",function(){v__mpp__ml_t__e=0;$data_mppopup_value=$(".mppopup input[data-mppopup_value]");$('.mppopup input[data-role="tagsinput"]').tagsinput({onTagExists:function(e,t){t.hide().fadeIn();v__mpp__ml_t__e=1}})}).on("shown.bs.modal",".mppopup",function(){var e=$("body .mppopup").find(".modal-head"),t=$("body .mppopup").find(".modal-body"),a=$("body .mppopup").find(".modal-body table"),i=e.find(".mppopup_filter > input");setTimeout(function(){$(".mppopup_filter_input").animate({opacity:1},0);$(".mppopup_filter_input").focus()},0)}).on("hidden.bs.modal",".mppopup",function(){refInput.removeClass("refInputData");$('.mppopup input[data-role="tagsinput"]').tagsinput("destroy");$("body .mppopup").remove();$("button[data-mmclick].disabled, input[data-mmclick].disabled").removeClass("disabled").removeAttr("disabled")}).on("click",".mppopup_multi_done",function(){refInput.val($.trim($('.mppopup input[data-role="tagsinput"]').val().replace(/,/g," ")));$('.mppopup span[aria-hidden="true"]').trigger("click")}).on("keyup",".mppopup_filter_input",function(e){var t=e.which,a=$(".mppopup table tbody tr:visible"),i=a.find("td:first-child a"),s=$(".mppopup .breadcrumbx").length;if(s){return}if(t==13&&a.length===1&&!e.shiftKey){i.trigger("click")}else if(t==13&&a.length===1&&e.shiftKey){i.trigger("click").trigger("dblclick");var n=$(".mppopup .mppopup_multi_done:visible");if(n.length){setTimeout(function(){n.trigger("click")},240)}}if(!$(".mppopup table tbody tr.noresults").length){$(".mppopup table tbody").append(''+theme_language("global_no_results_found")+"")}var r=$(".mppopup table tbody tr:visible:not(.noresults)"),o=$(".mppopup table tbody tr.noresults");if(r.length){o.addClass("hidden")}else{o.removeClass("hidden")}}).on("click","button[data-mmclick]:not(.disabled), input[data-mmclick]:not(.disabled)",function(i){i.preventDefault();i.stopPropagation();refInput=n($(this),1);e=!!+$(this).parent("._xcustom_file_select").length,custom_window={shown:function(){a=false;t=true},hidden:function(){t=false;e=false;$("._xcustom_file_select").remove()}};var s=$(this),r=refInput.val(),l=encodeURIComponent(r),_=$(this).attr("data-mmclick"),c=_.match("window.open\\(['\"]*(.*?)(\\s*['\"]*,.*?)"),d=c[1].match(/(\w+\.[a-z]{3,4})/gi)[0],f=d.replace(".cgi",""),p=false,u=false;s.addClass("disabled").attr("disabled","disabled");if(c[1]){var g=c[1].replace("encodeURIComponent(ifield.value)","refInputCurrValSafe");g=g.replace('"+"',"").replace('"+',"").replace("refInputCurrValSafe",l);var m=function(t,a,i,s,n,o,l,_,c,d,p){var u;if(!o){o=String()}if(!l){l=String()}if(n){u='"}else{u='"}var g='";$(document.body).append(g);refInput.addClass("refInputData");$("body .mppopup").on("show.bs.modal",function(){if(p&&typeof p==="function"){p()}}).on("shown.bs.modal",function(){if(d&&typeof d==="function"){d()}e&&custom_window.shown()}).on("hidden.bs.modal",function(){e&&custom_window.hidden()}).modal("show")},h=function(e){if(core.curModule("cluster-useradmin")&&(e[1].startsWith("my_user_chooser")||e[1].startsWith("my_group_chooser"))){$v__mpp__g_op=v___location_prefix+"/useradmin/"+e[1]}else if(!e[1].startsWith("/")){$v__mpp__g_op="/"+e[1]}else{$v__mpp__g_op=e[1]}};var v=String(),b="cron_chooser",x='form[action*="backup_sched.cgi"], form[action*="save_newquotas.cgi"], form[action*="save_validate.cgi"]',y='[name="enabled_hidden"], [name="sched_hidden"], [name="when_hidden"]';x+=', form[action*="save_backup.cgi"], form[action*="save_vbackup.cgi"], form[action*="save_vsync.cgi"]';if(f===b){var A=$(x),k=A.find(y).val();v=""+b+".cgi?complex="+k+""}$.ajax({type:"POST",url:v||g,data:false,dataType:"text",success:function(e){if(!session.status(e)){return}var t=e;var a=e.match(''+i+"","",0,refInput,1,"modal-lg","modal-no-header",1,1,u,p)}else if($.isArray(a)&&a[1]&&a[1].indexOf("&multi=1")===-1){h(a);$.ajax({type:"POST",url:$v__mpp__g_op,data:false,dataType:"text",success:function(e){if(!session.status(e)){return}var t=e.replace(/<(!doctype|script|link|meta)\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/(script|link|meta)>/gi,"").replace(/<\/body>|<\/html>/gi,""),a=$(t).filter(".table").html(),i=$(t).filter(".table").prev("b").html();var s=o(i),n=$(a).find("td").length;if(n===0){a=a.replace("thead","tbody");a=a.replace("",''+theme_language("datatable_semptydirectory")+"")}t=s+''+a+"
";if(t){t=t.replace(//gm,'').replace(//gm,'')}m(t,"type1",0,refInput,0)}})}else if(!$.isArray(a)){if($.isArray(a)&&a[1].indexOf("&multi=1")===-1){return}var i=t,s=$(i).filter("table").html();m(''+s+"
","",1,refInput,0)}else{h(a);$.ajax({type:"POST",url:$v__mpp__g_op,data:false,dataType:"text",success:function(e){if(!session.status(e)){return}var t=e.replace(/<(!doctype|script|link|meta)\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/(script|link|meta)>/gi,"").replace(/<\/body>|<\/html>/gi,""),a=$(t).filter("table").html();t=''+a+"
";m(t,"type2",0,refInput,1)}})}}})}else{$(this).removeClass("disabled");$(this).attr("onclick",$(this).attr("data-mmclick")).removeAttr("data-mmclick");$(this).trigger("click")}})})()});return{target:n,file:l}}();plugins.navigation=function(){document.addEventListener("DOMContentLoaded",function(){r();l();$("aside").on("click",".select2-container .select2-selection__arrow b",function(e){e.preventDefault();e.stopPropagation()}).on("click",'a[href*="/cwaf/"], a[href*="/file/"], a[href*="history.cgi"]',function(e){e.preventDefault();e.stopPropagation();window.open($(this).attr("href"),"_blank")}).on("contextmenu",".switch-toggle label",function(e){e.preventDefault();var t=$(this).attr("for").replace("open_",""),a=$(this).prev("input").is(":checked");if(a){var i=v___location_href;set_server_theme_temp_data("goto",link_type_convert(i,1));setTimeout(function(){theme_open_new_tab(i)},200)}else if(t==="virtualmin"||t==="cloudmin"){var s;if(t==="cloudmin"){s="/server-manager/index.cgi"}else{s="/virtual-server/index.cgi"}var n=link_type_convert(s,2);set_server_theme_temp_data("goto",link_type_convert(n,1));setTimeout(function(){theme_open_new_tab(n)},200)}else if(t==="webmail"){var r=v___location_prefix+"/mailbox/index.cgi?"+$__theme_navigation;set_server_theme_temp_data("goto",link_type_convert(r,1));setTimeout(function(){theme_open_new_tab(r)},200)}else{var r=v___location_prefix+"/sysinfo.cgi?"+$__theme_navigation;set_server_theme_temp_data("goto",link_type_convert(r,1));setTimeout(function(){theme_open_new_tab(r)},200)}}).on("click",".switch-toggle input.dynamic",function(e){if(get_onbeforeunload_status()){e.preventDefault();var t=$(".switch-toggle input:checked").attr("id");get_onbeforeunload_message([],{href:"::switch::"+t});return}k($(this).attr("id").replace("open_",""));if($(this).attr("id")=="open_dashboard"){get_pjax_content(v___location_prefix+"/sysinfo.cgi");return}get_navigation_and_content($(this).attr("id").replace("open_",""))}).on("focus",".sidebar-search",function(){d("c",false)}).on("blur",".sidebar-search",function(){setTimeout(function(){d("c",true)},150)}).on("click",'.navigation a[target="page"], .user-links a[target="page"]',function(){o()}).on("click",".navigation > li .navigation_external_link",function(e){e.preventDefault();e.stopPropagation();b=$(this);window.open(b.attr("href"),"_blank")}).on("click",".navigation > li:not('.sub-wrapper'):not('.menu-container'):not('.navigation_external'):not([data-linked])",function(e){e.preventDefault();e.stopPropagation();var t=1;if(e.target&&e.target.classList&&e.target.classList.value&&(e.target.classList.value.includes("fancytree")||e.target.classList.value.includes("label-danger"))){t=0}v___blocked_navigation=t;typeof $processing=="undefined"?$processing=false:false;if(!$processing){$processing=true;var a=$("a",this).attr("href"),i=$("a",this).attr("target"),s=$(this);if(i){$(".navigation > li > ul.sub > li").each(function(){$(this).removeClass("sub_active").find("span.current").remove()})}$.when($("#sidebar .navigation > li").each(function(){var e=$(this),t=e.find("a"),a=t.is("[data-has-sub-link]");if(!e.is(s)){e.removeClass("active");if(e.find("a").attr("href")!="#search"&&a){$(e.find("a").attr("href")).slideUp(175)}}})).done(function(){s.hasClass("active")?s.removeClass("active"):a!="#hide"&&!i?s.addClass("active"):false;setTimeout(function(){if($(a).is(":visible")&&a!="#hide"&&!i){s.addClass("active")}else{s.removeClass("active")}$processing=false},2*175>0?2*175:1);$(a).slideToggle(175)});if(a=="#search"){$('#sidebar input[name="search"]').focus()}}}).on("click",".navigation > li > ul.sub > li:not('.menu-container')",function(e){if(e.target&&$(e.target).is("li")){return}var t=window.navigator.platform==="MacIntel"?1:0;if(!t&&e.ctrlKey||t&&e.metaKey){return}var a=$(this);$(".navigation > li:not('.has-sub')").removeClass("sub_active").find("span.current-large").remove();$(".navigation > li > ul.sub > li").each(function(){$(this).removeClass("sub_active").find("span.current").remove()});$("#webmin_search_form").find('input[name="search"]').val("");$("aside .navigation .fancytree-node.fancytree-active").removeClass("fancytree-active");a.addClass("sub_active").append('')}).on("click",'a[data-refresh="true"]',function(e){e.preventDefault();page_refresh()}).on("focus",".form-control.sidebar-search",function(e){$(".__logo").addClass("inited");e.preventDefault();e.stopPropagation();vars.shell.history=0}).on("keydown","#webmin_search_form",function(e){var t=$(this),a=t.find("input.sidebar-search"),i=a.val(),s=$("body").find(".-shell-port-");if(i&&e.keyCode===13){e.preventDefault();if(!i.startsWith("!")){$(this).find('input[name="mod"], input[name="title"]').remove();if(T()==="virtual-server"||T()==="server-manager"){$("").attr({type:"hidden",name:"mod",value:T()}).appendTo($(this))}var n=T(1),r=theme_language("search_in_"+(n==="mailbox"?"usermin":n)+"");r=r?r:theme_language("filemanager_context_search");$("").attr({type:"hidden",name:"title",value:r}).appendTo($(this));var o=$(this).attr("action")+"?"+$(this).serialize();if(get_onbeforeunload_status()){get_onbeforeunload_message(false,{href:o})}else{get_pjax_content(o);a.val("")}}else{core.moduleAvailable("shell")&&plugins.shell.open(i)}}}).on("click","[data-collapse-trigger]",function(e){e.stopImmediatePropagation();var t=get_server_data("data-navigation-collapsed")=="1"?0:1;vars.navigation.pinned=t;settings_navigation_always_collapse=!settings_navigation_always_collapse;if(settings_navigation_always_collapse){get_server_data("data-navigation-collapsed",1);$(".mobile-menu-toggler").removeClass("visible-xs");o(1,e.originalEvent!==undefined?1:0)}else{get_server_data("data-navigation-collapsed",0);$(".mobile-menu-toggler").addClass("visible-xs")}setTimeout(function(){page_resized()},0);$(window).resize()}).on("click",".user-links > li.favorites",function(){$(".favorites-menu-outer").addClass("hover")}).on("click",".user-link.palette-toggle",function(){theme_toggle_night_mode()}).on("click",".user-link.ported-console",function(){if(plugins.shell.available()){plugins.shell.open()}}).on("click",".user-links > li",function(e){if($(e.target).is($(this))){var t=$(this).find("a"),a=t&&t[0]&&t[0].hasAttribute("data-nref");if(a){location.href=t.attr("href")}else{$(this).find("a, [data-collapse-trigger]").trigger("click")}}}).on("click",".__logout-link",function(){progress.start();get_server_theme_temp_data("goto",0)}).mCustomScrollbar({axis:"y",theme:"minimal",scrollInertia:100,scrollButtons:false,callbacks:{onScroll:function(){if(!$(".mobile-menu-toggler").is(":visible")){$(".form-control.sidebar-search").blur();if($("aside select")&&$("aside select").length>0&&$("aside select").hasClass("select2-hidden-accessible")){$("aside select").select2("close")}}}}})});var e=function(){var e=".navigation";$(e+" li.has-sub").removeClass("sub_active");$(e+" > li:not('.has-sub')").removeClass("sub_active").find("span.current-large").remove();$(e+" > li > ul.sub > li").removeClass("sub_active").find("span.current").remove();$(e+" > li.has-sub").removeClass("active");$(e+" > li > ul.sub").hide();$(e+" > li > a > i.fa.fa-folder-open-o").removeClass("fa-folder-open-o")},t=function(t,a){setTimeout(function(){if(Test.arrContains(["webmin_search.cgi","tconfig.cgi","settings-editor_favorites_read.cgi"],v___location_file)||page_extended()){e();return}if(v___blocked_navigation){return}if(typeof a=="undefined"){var t=function(e){var t=":not([data-parent-hidden]):first",a='a[href*="'+e+'"]'+t+"";if(e&&e.includes("/virtual-server/")){var i=e.match(/.*(dom|gparent)=(\d+)/),s=e.match(/.*?\.cgi/);if(i&&i[1]&&i[2]&&s){a='a[href*="'+s[0]+'"][href*="'+(i[1]+"="+i[2])+'"]'+t+""}}return a},i=v___location_path==="/"?s:v___location_path+(v___location_query?"?"+v___location_query:"");if(v___initial_load&&!i){return}if(!i){i="/"}$nearExactMatchStatus=1,$superExactMatchStatus=0,$nearExactMatch=$('.navigation a[href*="'+i+'"]:not([data-parent-hidden]):first'),$nearExactMatchPostSave=$(".navigation "+t(i.replace("save_","edit_"))),$nearExactMatchPostList=$(".navigation "+t(i.replace("edit_","list_"))),$nearExactMatchPostListSingular=$(".navigation "+t(i.replace("edit_","list_").replace(".cgi","s.cgi"))),$nearExactMatchPostListPlural=$(".navigation "+t(i.replace("edit_","list_").replace(".cgi","es.cgi")));if(!$nearExactMatch.length){$nearExactMatch=$nearExactMatchPostSave;if(!$nearExactMatch.length){$nearExactMatch=$nearExactMatchPostList;if(!$nearExactMatch.length){$nearExactMatch=$nearExactMatchPostListSingular}if(!$nearExactMatch.length){$nearExactMatch=$nearExactMatchPostListPlural}}}if(Test.strContains(v___location_file||s,"cgi")&&$nearExactMatch.length){s=$nearExactMatch.attr("href");$nearExactMatchStatus=0}else if($('.navigation a[href="'+v___location_resource+'"]:not([data-parent-hidden]):first, .navigation a[href*="'+link_type_convert(v___location_path,2)+'"]:not([data-parent-hidden]):first').length){s=v___location_resource;$superExactMatchStatus=1}else if($('.navigation a[href^="'+v___location_resource+'"]:not([data-parent-hidden]):first').length){s=v___location_resource;$nearExactMatchStatus=0}var s=s?s.replace("/edit_users.cgi","/list_users.cgi").replace("/edit_user.cgi","/list_users.cgi").replace("/edit_alias.cgi","/list_aliases.cgi").replace("/edit_database.cgi","/list_databases.cgi").replace("/save_database.cgi","/list_databases.cgi").replace("/edit_script.cgi","/list_scripts.cgi").replace("/script_form.cgi","/list_scripts.cgi"):s;var n=v___location_file==="config.cgi"||v___location_file==="uconfig.cgi",r=v___location_file==="mconfig.cgi"&&uri_parse_param("module")===v___module_file_manager;if(n&&!r){if($t_uri_virtualmin&&!core.curModule("virtualmin-awstats")){s=v___location_prefix+"/config.cgi?virtual-server"}else if($t_uri_cloudmin){s=v___location_prefix+"/config.cgi?server-manager"}else if($t_uri_webmail){s=v___location_prefix+"/uconfig.cgi?mailbox"}else{s=v___location_prefix+"/"+v___location_query+"/"}}if(r){s=v___location_prefix+"/"+v___module_file_manager}var o=$t_uri_webmin||$t_uri_usermin;if(!s&&o){if(Test.strContains(v___location_file,".cgi")&&!Test.strContains(v___location_file,"sysinfo.cgi")){s=v___location_path.replace(v___location_file,"")}else if(!s){var l=new RegExp("^"+v___location_prefix,"i");s=get_server_data("data-uri").replace(l,"").split("/").filter(function(e){return e.length!==0})[0];s=v___location_prefix+"/"+s}}if($superExactMatchStatus){targeted_menu_link=$('.navigation a[href="'+s+'"]:not([data-parent-hidden]):first, .navigation a[href="'+link_type_convert(s,2)+'"]:not([data-parent-hidden]):first')}else{if(s&&(s.endsWith("/virtual-server/")||s.endsWith("/server-manager/"))){s+="index.cgi"}targeted_menu_link=$('.navigation a[href^="'+s+'"]:not([data-parent-hidden]):first')}if(targeted_menu_link.length){e()}}else{targeted_menu_link=$('.navigation a[href^="'+s+'"]:not([data-parent-hidden]):first');if(targeted_menu_link.length){e()}}$("aside .navigation .fancytree-node.fancytree-active").removeClass("fancytree-active");if(s==="/"){return}targeted_menu_link.parent("li:not(.menu-exclude):not(.user-link)").addClass("sub_active").append('').parent("ul.sub").show().parent("li:not(.menu-exclude):not(.user-link)").prev("li").addClass("active")},1)},a=function(){$(".mCSB_container, .mCSB_dragger").css("top","0");!$("#_menu_loader").length&&$("body ul.navigation").before('');$("body aside .mCSB_scrollTools, body ul.navigation, body ul.user-links").css("visibility","hidden");$("aside ul.user-html").addClass("invisible")},i=function(){$("aside ul.user-html").removeClass("invisible");$("body aside .mCSB_scrollTools, body ul.navigation, body ul.user-links").css("visibility","visible");$("#_menu_loader").remove();l();bind_sameorigin(1);theme_to_new_tab();s()},s=function(){var e=$('aside a[href*="'+v___module_file_manager+'"]');if(e&&e.length){var t=e.attr("href"),a=uri_parse_param("path",t);if(a&&!a.startsWith("/")&&!a.startsWith("%2F")){var i=new URI(t),s=i.pathname(),n="/"+a,r=s+"?path="+Convert.uriEncodeComponent(n);e.attr("href",r)}}},n=function(){return $("#_menu_loader").length},r=function(){if($("aside").css("transform")=="none"&&$("html").attr("data-navigation-collapsed")!="1"){$("aside").transition({x:settings_leftmenu_width},0,function(){if($(".__logo")&&$(".__logo").css("transform")=="none"&&!$(".mobile-menu-toggler:visible").length){$(".__logo").transition({y:"-140px"},175*1.5)}})}},o=function(e,t){var a="mobile-menu-toggler",i=$(quirks.active_element()).is('input[name="settings_navigation_always_collapse"]');i=1;if(e){}if(t){$("."+a+"").addClass("selected").find("button").addClass("btn-primary").removeClass("btn-default");$("."+a+"").css("transform","translate("+settings_leftmenu_width+"px, 0px)");return}if(typeof jQuery().transition=="function"&&($("."+a+":visible").length&&$("."+a+"").attr("style")&&$("."+a+"").attr("style").indexOf("ease")==-1)){if($(".__logo")){$(".__logo").transition({y:0},175*1.5)}$("aside, ."+a+"").transition({x:0},i?0:175,function(){$("."+a+"").removeClass("selected");$("aside").addClass("hidden-xs")})}},l=function(e){var t="body aside",a="select2";vars.navigation.select.back=false;if($(".form-control.sidebar-search").is(":focus")){return}$.each($(""+t+" select > option"),function(){var e=$(this).text().match(/^\s{0,4}/)[0].length,t=$(this).text();if(settings_leftmenu_vm_cm_dropdown_icons){if(e===4&&t.indexOf("↱")===-1){$(this).html("    ↱ "+t.replace(/\s/g,""))}else if(e===2&&t.indexOf("↴")===-1){$(this).html("  ↴ "+t.replace(/\s/g,""))}}}).promise().done(function(){var i=$(""+t+" select");i.removeAttr("id");if(i.length){i.removeAttr("onchange disabled");i.data(a)?i.select2("destroy"):false;i.unbind(""+a+":select");i.select2({minimumResultsForSearch:3,dropdownCssClass:"aside-select2"});var s=i.data(a);if(e){i.select2("open")}i.on(""+a+":selecting",function(){i.data("previous-value",$(this).val())});i.on(""+a+":select",function(e){var t=e.currentTarget.value;if(e.currentTarget.name==="dom"){if(get_onbeforeunload_status()){vars.navigation.select.back=true;get_onbeforeunload_message(e,this,{"plugins.navigation.get.virtualmin":[t],get_pre_default_content:[t]})}else{S(t);get_pre_default_content(t)}}else{if(e.currentTarget.name==="sid"){if(get_onbeforeunload_status()){vars.navigation.select.back=true;get_onbeforeunload_message(e,this,{"plugins.navigation.get.cloudmin":[t],get_pre_default_content:[t]})}else{I(t);get_pre_default_content(t)}}}});var n=".select2-dropdown.aside-select2",r=function(){$.each($(""+t+" select > option"),function(){if($(this).attr("style")&&$(this).attr("style").indexOf("italic")>-1){var e=$(this);setTimeout(function(){$(n).find('li[id$="'+e.attr("value")+'"]').addClass("text-danger")},0)}})};i.on(""+a+":opening",function(){r();setTimeout(function(){var e=""+n+" .select2-search__field",t="keydown.colorfilter";$(e).off(t);$(e).on(t,function(){r()})},0);$(t).find("."+a+"-container:not(."+a+"), "+v___class_select2_leak).addClass(""+a+"-aside")});i.on(""+a+":open",function(){setTimeout(function(){var e=document.querySelector(".select2-search__field");e&&e.focus()})});i.on(""+a+":closing",function(){$(t).find("."+a+"-container, "+v___class_select2_leak).removeClass(""+a+"-aside")});if($(""+t+" select option").length===1){$(t+" ."+a+" span").css("cursor","default");$(t+" ."+a+" ."+a+"-selection__arrow").remove();i.on(""+a+":open",function(){$(t+" ."+a+"-container ."+a+"-dropdown").css("opacity","0")})}$.each($(""+t+" select > option"),function(){if($(this).attr("style")&&$(this).attr("style").indexOf("italic")>-1){var e=$($("."+a+"-selection > ."+a+"-selection__rendered")[0]);if(e.text().trim()==$(this).text().trim()){e.addClass("text-danger")}}})}})},_=function(e,t){var a=$("aside select");a.val(e).trigger("change");if(t){a.trigger("select2:select")}},c=function(){if(vars.navigation.select.back){var e=$("aside select");_(e.data("previous-value"),0);vars.navigation.select.back=false}},d=function(e,t){var i="aside .form-control.sidebar-search",s="aside .autocomplete-suggestions",n=function(e){return e&&(e.includes("http://")||e.includes("https://")||e.includes("ftp://")||e.includes("ftps://"))?1:0};if(e=="c"){$(s).remove();$(i).removeAttr("disabled");$(i).autocomplete("dispose");!get_onbeforeunload_status()&&$(i).val("");if(t){return}}var r={},l="li:not(.menu-exclude):not(.user-link)";$.each($(""+l+' > ul[id^="global_"].sub > '+l+' > a, ul.navigation > [data-after] > a, ul.navigation > li > a[href*="virtual-server/index.cgi"], ul.navigation > li > a[href*="server-manager/index.cgi"]'),function(){var e=$(this).attr("href"),t=n(e),a=(e.substring(0,1)=="/"?"":"/")+e;if(t){a=e}r[a]=$.trim($(this).text())});$('li > a[target="page"][data-href="/virtual-server/index.cgi"], '+l+' > a[target="page"][data-href="/sysinfo.cgi"], '+l+' > a[target="page"][data-href="/virtual-server/pro/history.cgi"], '+l+' > a[target="page"][data-href="/server-manager/one_history.cgi"], '+l+' > a[target="page"][data-href="/server-manager/history.cgi"], '+l+' > a[target="page"][data-href="/mailbox/list_folders.cgi"], '+l+' > a[target="page"][data-href="/mailbox/list_ifolders.cgi"], '+l+' > a[target="page"][data-href="/mailbox/list_addresses.cgi"], '+l+' > a[target="page"][data-href="/filter/edit_forward.cgi"], '+l+' > a[target="page"][data-href="/filter/edit_auto.cgi"], '+l+' > a[target="page"][data-href="/filter/edit_auto.cgi"], '+l+' > a[target="page"][data-href="/filter/"], '+l+' > a[target="page"][data-href="/mailbox/edit_sig.cgi"]').each(function(){r[$(this).attr("data-href")]=$.trim($(this).text())});var c=function(e){var t="🔒",a=e&&e.includes(t);return a},d=$.map(r,function(e,t){if(t!="undefined"&&!c(e)){return{value:e,url:t,data:{category:V()}}}});var f={};if(core.curModule("custom")||v___location_path==v___location_prefix+"/backup-config/"||v___location_path==v___location_prefix+"/backup-config/index.cgi"||v___location_path==v___location_prefix+"/usermin/"||v___location_path==v___location_prefix+"/usermin/index.cgi"||v___location_path==v___location_prefix+"/webmin/"||v___location_path==v___location_prefix+"/webmin/index.cgi"||v___location_path==v___location_prefix+"/acl/"||v___location_path==v___location_prefix+"/acl/index.cgi"||v___location_path==v___location_prefix+"/init/"||v___location_path==v___location_prefix+"/init/index.cgi"||v___location_path==v___location_prefix+"/mount/"||v___location_path==v___location_prefix+"/mount/index.cgi"||v___location_path==v___location_prefix+"/quota/"||v___location_path==v___location_prefix+"/quota/index.cgi"||v___location_path==v___location_prefix+"/fsdump/"||v___location_path==v___location_prefix+"/fsdump/index.cgi"||v___location_path==v___location_prefix+"/inittab/"||v___location_path==v___location_prefix+"/inittab/index.cgi"||v___location_path==v___location_prefix+"/logrotate/"||v___location_path==v___location_prefix+"/logrotate/index.cgi"||v___location_path==v___location_prefix+"/mailcap/"||v___location_path==v___location_prefix+"/mailcap/index.cgi"||v___location_path==v___location_prefix+"/pam/"||v___location_path==v___location_prefix+"/pam/index.cgi"||v___location_path==v___location_prefix+"/proc/"||v___location_path==v___location_prefix+"/proc/index_tree.cgi"||v___location_path==v___location_prefix+"/proc/index_user.cgi"||v___location_path==v___location_prefix+"/proc/index_size.cgi"||v___location_path==v___location_prefix+"/proc/index_cpu.cgi"||v___location_path==v___location_prefix+"/proc/index_tree.cgi"||v___location_path==v___location_prefix+"/proc/index_search.cgi"||v___location_path==v___location_prefix+"/cron/"||v___location_path==v___location_prefix+"/cron/index.cgi"||v___location_path==v___location_prefix+"/syslog/"||v___location_path==v___location_prefix+"/syslog/index.cgi"||v___location_path==v___location_prefix+"/useradmin/"||v___location_path==v___location_prefix+"/useradmin/index.cgi"||v___location_path==v___location_prefix+"/apache/"||v___location_path==v___location_prefix+"/apache/index.cgi"||v___location_path==v___location_prefix+"/bind8/"||v___location_path==v___location_prefix+"/bind8/index.cgi"||v___location_path==v___location_prefix+"/dhcpd/"||v___location_path==v___location_prefix+"/dhcpd/index.cgi"||v___location_path==v___location_prefix+"/dovecot/"||v___location_path==v___location_prefix+"/dovecot/index.cgi"||v___location_path==v___location_prefix+"/ldap-server/"||v___location_path==v___location_prefix+"/ldap-server/index.cgi"||v___location_path==v___location_prefix+"/virtualmin-nginx/"||v___location_path==v___location_prefix+"/virtualmin-nginx/index.cgi"||v___location_path==v___location_prefix+"/fetchmail/"||v___location_path==v___location_prefix+"/fetchmail/index.cgi"||v___location_path==v___location_prefix+"/mysql/"||v___location_path==v___location_prefix+"/mysql/index.cgi"||v___location_path==v___location_prefix+"/mysql/edit_dbase.cgi"||v___location_path==v___location_prefix+"/postgresql/"||v___location_path==v___location_prefix+"/postgresql/index.cgi"||v___location_path==v___location_prefix+"/postgresql/edit_dbase.cgi"||v___location_path==v___location_prefix+"/postfix/"||v___location_path==v___location_prefix+"/postfix/index.cgi"||v___location_path==v___location_prefix+"/procmail/"||v___location_path==v___location_prefix+"/procmail/index.cgi"||v___location_path==v___location_prefix+"/proftpd/"||v___location_path==v___location_prefix+"/proftpd/index.cgi"||v___location_path==v___location_prefix+"/mailboxes/"||v___location_path==v___location_prefix+"/mailboxes/index.cgi"||v___location_path==v___location_prefix+"/mailboxes/list_mail.cgi"||v___location_path==v___location_prefix+"/mailbox/"||v___location_path==v___location_prefix+"/mailbox/index.cgi"||v___location_path==v___location_prefix+"/samba/"||v___location_path==v___location_prefix+"/samba/index.cgi"||v___location_path==v___location_prefix+"/spam/"||v___location_path==v___location_prefix+"/spam/index.cgi"||v___location_path==v___location_prefix+"/squid/"||v___location_path==v___location_prefix+"/squid/index.cgi"||v___location_path==v___location_prefix+"/sshd/"||v___location_path==v___location_prefix+"/sshd/index.cgi"||v___location_path==v___location_prefix+"/webalizer/"||v___location_path==v___location_prefix+"/webalizer/index.cgi"||v___location_path==v___location_prefix+"/cpan/"||v___location_path==v___location_prefix+"/cpan/index.cgi"||v___location_path==v___location_prefix+"/htaccess-htpasswd/"||v___location_path==v___location_prefix+"/htaccess-htpasswd/index.cgi"||v___location_path==v___location_prefix+"/status/"||v___location_path==v___location_prefix+"/status/index.cgi"||v___location_path==v___location_prefix+"/net/"||v___location_path==v___location_prefix+"/net/index.cgi"||v___location_path==v___location_prefix+"/tcpwrappers/"||v___location_path==v___location_prefix+"/tcpwrappers/index.cgi"||v___location_path==v___location_prefix+"/fdisk/"||v___location_path==v___location_prefix+"/fdisk/index.cgi"||v___location_path==v___location_prefix+"/fail2ban/"||v___location_path==v___location_prefix+"/fail2ban/index.cgi"||v___location_path==v___location_prefix+"/nis/"||v___location_path==v___location_prefix+"/nis/index.cgi"||v___location_path==v___location_prefix+"/passwd/"||v___location_path==v___location_prefix+"/passwd/index.cgi"){$($(".container-fluid .panel-body a[href]:not([href*='javascript'],[href*='list_users.cgi?dom'],[href*='edit_hdparm.cgi?disk'],[href*='blink.cgi?disk'],[href*='smart-status/index.cgi?drive'],[href*='help.cgi'],[href*='edit_user.cgi?new='],[href*='edit_user.cgi?idx='],[href*='edit_recipe.cgi'],[href*='up.cgi'],[href*='down.cgi'],[href*='virt_index.cgi'],[href*='save_log.cgi'],[href*='backup.cgi'],[href*='activate.cgi'],[href*='#'])")).each(function(){if(v___location_path==v___location_prefix+"/syslog/"||v___location_path==v___location_prefix+"/syslog/index.cgi"){f["/"+v___location_path_lead_unslashed+$(this).parent("td").next("td[data-td-e]").next("td[data-td-e]").next("td[data-td-e]").find("a").attr("href")]=$.trim($(this).text())}else{if(v___location_path==v___location_prefix+"/backup-config/"||v___location_path==v___location_prefix+"/backup-config/index.cgi"){$description=$.trim($(this).parent("td").next("td[data-td-e]").next("td[data-td-e]").text())}else{if(v___location_path==v___location_prefix+"/mount/"||v___location_path==v___location_prefix+"/mount/index.cgi"||v___location_path==v___location_prefix+"/quota/"||v___location_path==v___location_prefix+"/quota/index.cgi"){$description=$.trim($(this).parent("td").next("td[data-td-e]").next("td[data-td-e]").text())}else{if(v___location_path==v___location_prefix+"/fsdump/"||v___location_path==v___location_prefix+"/fsdump/index.cgi"){$description=$.trim($(this).parents("td").next("td").next("td").next("td").find("label").find("tt").find("tt").text())}else{if(v___location_path==v___location_prefix+"/proc/"||v___location_path==v___location_prefix+"/proc/index_tree.cgi"||v___location_path==v___location_prefix+"/proc/index_user.cgi"||v___location_path==v___location_prefix+"/proc/index_size.cgi"||v___location_path==v___location_prefix+"/proc/index_cpu.cgi"||v___location_path==v___location_prefix+"/proc/index_tree.cgi"||v___location_path==v___location_prefix+"/proc/index_search.cgi"){if(v___location_path==v___location_prefix+"/proc/index_size.cgi"||v___location_path==v___location_prefix+"/proc/index_cpu.cgi"){$description=$.trim($(this).parent("td").next("td[data-td-e]").text())+" — "+$.trim($(this).parent("td").next("td[data-td-e]").next("td[data-td-e]").text())+" - "+$.trim($(this).parents("td").next("td").next("td").next("td").text())}else{if(v___location_path==v___location_prefix+"/proc/index_search.cgi"){$description=$.trim($(this).parent("td").next("td[data-td-e]").text())+" — "+$.trim($(this).parent("td").next("td[data-td-e]").next("td[data-td-e]").text())+" - "+$.trim($(this).parents("td").next("td").next("td").next("td").next("td").text())}else{$description=$.trim($(this).parent("td").next("td[data-td-e]").text())+" — "+$.trim($(this).parents("td").next("td").next("td").next("td").text())}}}else{if(v___location_path==v___location_prefix+"/useradmin/"||v___location_path==v___location_prefix+"/useradmin/index.cgi"){$description=$.trim($(this).parents("td").next("td").find("label").text())+" — "+$(this).text()+":"+$.trim($(this).parents("td").next("td").next("td").find("label").text())+" - "+$.trim($(this).parents("td").next("td").next("td").next("td").next("td").find("label").text())+", "+$.trim($(this).parents("td").next("td").next("td").next("td").next("td").next("td").find("label").text())}else{if(v___location_path==v___location_prefix+"/mailboxes/list_mail.cgi"||v___location_path==v___location_prefix+"/mailbox/"||v___location_path==v___location_prefix+"/mailbox/index.cgi"){$description=$.trim($(this).parents("td").next("td").next("td").next("td").find("label").text())+" — "+$.trim($(this).parents("td").next("td").find("label").text())+" ["+$.trim($(this).parents("td").next("td").next("td").find("label").text())+"]"}else{if(v___location_path==v___location_prefix+"/cpan/"||v___location_path==v___location_prefix+"/cpan/index.cgi"){$description=$.trim($(this).parents("td").next("td").next("td").find("label").text())}else{if(v___location_path==v___location_prefix+"/fdisk/"||v___location_path==v___location_prefix+"/fdisk/index.cgi"){$description=$.trim($(this).parent("td").next("td[data-td-e]").text())+" - "+$.trim($(this).parent("td").next("td[data-td-e]").next("td[data-td-e]").text())}else{$description=$.trim($(this).parent("td").next("td[data-td-e]").text())}}}}}}}}$description?$_description=true:$_description=false;var e=$.trim($(this).text());if(core.curModule("bind8")){var t=$(this).parents("form").prev("br").prev("b").find("tt");if(t.length){var a=t.text(),i=!$(this).parent(".ui_links_row").length;if(i&&a){e=e+" ("+a+")"}}}f[($(this).attr("href").substring(0,1)=="/"?"":"/")+v___location_directory_unslashed_trail_slashed+$(this).attr("href")]=e+($_description?" (":"")+$description+($_description?")":"")}})}var p=$.map(f,function(e,t){if(t!="undefined"){return{value:e,url:t,data:{category:get_module_title()}}}});var u={};$.each($(""+l+' > ul.sub:not([id^="global_"]) > '+l+' > a, ul.navigation > [data-linked]:not([data-after]) > a:not([href*="virtual-server/index.cgi"]):not([href*="server-manager/index.cgi"])'),function(e,t){u[($(this).attr("href").substring(0,1)=="/"?"":"/")+$(this).attr("href")]=$.trim($(this).text())});$(""+l+' > a[target="page"]:not([data-href="/acl/edit_user.cgi"],[data-href="/virtual-server/index.cgi"],[data-href="/sysinfo.cgi"],[data-href="/virtual-server/pro/history.cgi"], [data-href="/mailbox/list_folders.cgi"], [data-href="/mailbox/list_ifolders.cgi"], [data-href="/mailbox/list_addresses.cgi"], [data-href="/filter/edit_forward.cgi"], [data-href="/filter/edit_auto.cgi"], [data-href="/filter/edit_auto.cgi"], [data-href="/filter/"], [data-href="/mailbox/edit_sig.cgi"])').each(function(e,t){if(!$t_uri_usermin&&!h()){u[$(this).attr("data-href")]=$.trim($(this).text())}});var g=$.map(u,function(e,t){if(t!="undefined"){var a=c(e);return{value:a?"":e,url:a?"":t,data:{category:$("aside .select2-selection__rendered").text()?''+$("aside .select2-selection__rendered").clone().children().remove().end().text()+"":V()}}}});var m={};$("aside select option").each(function(){m[$(this).val()+":::"+$(this).parent("select").attr("name")]=$.trim($(this).text())});var v=$.map(m,function(e,t){if(t!="undefined"){return{value:e,url:t,data:{category:$("aside select").data("autocomplete-title")}}}});var b=v.concat(p).concat(g).concat(d);try{const e="x-hidden";$.map(b,function(t,a){if(typeof settings_autocomplete_extra_associations_privileged==="object"){var i=get_server_data("language"),s=settings_autocomplete_extra_associations_privileged[i]?settings_autocomplete_extra_associations_privileged[i]:settings_autocomplete_extra_associations_privileged.en;if(typeof s==="object"){for(const[i,n]of Object.entries(s)){if(typeof n==="object"){for(const[i,s]of Object.entries(n)){if(typeof s==="object"){for(const[n,r]of Object.entries(s)){if(t&&t.url&&t.url.includes(i+"/")&&t.url.includes(r[0]+".cgi")){t.value=t.value+"<"+e+">"+r[1]+"";b[a]=t}}}else{if(t&&t.url&&(t.url.endsWith("/"+i+"/")||t.url.endsWith("/"+i+"/index.cgi"))){t.value=t.value+"<"+e+">"+s+"";b[a]=t}}}}}}}})}catch(e){}$(i).on("keydown",function(e){if(e.keyCode==34||e.keyCode==33||e.keyCode==20||e.keyCode==17||e.keyCode==16||e.keyCode==9){e.preventDefault();e.stopPropagation()}});$(i).autocomplete({lookup:b,onSelect:function(e,t){var i=$.Autocomplete.externalEvent;if(!$.isEmptyObject(i)){var s=i.keyCode?i.keyCode:i.which;if(i.ctrlKey||i.shiftKey||i.altKey||i.metaKey||s===20||s===32||s===33||s===34||s===35||s===36||s===37||s===38||s===39||s===40||s===45||s===46||s===112||s===113||s===114||s===115||s===116||s===117||s===118||s===119||s===120||s===121||s===122||s===123||s===144||s===145){return}}if(h()===true&&$t_uri_dashboard&&get_access_level()!=2&&get_access_level()!=4){k("webmin")}$(this).val("").blur();o();var r=n(e.url);if(e.url.substring(0,1)=="/"||r){var l=e.url&&(r||e.url.includes("/file/")||e.url.includes("/cwaf/")||e.url.includes("virtual-server/pro/history.cgi")||e.url.includes("server-manager/history.cgi")||e.url.includes("server-manager/one_history.cgi"));if(l){theme_open_new_tab(e.url,1);return}else{var c=e.url;if(v___location_prefix&&!c.startsWith(v___location_prefix)){c=v___location_prefix+c}if(Test.strContains(v___location_prefix,v___target_servers_index)&&c&&c.endsWith("/servers/")){return}if(c&&(c.includes("switch_user.cgi")||c.includes("/shell")||c.includes("shell=1"))){set_onbeforeunload_status(0,0);$('aside [data-linked] a[href="'+e.url+'"]').click();return}if(get_onbeforeunload_status()){if(t){t.preventDefault()}get_onbeforeunload_message([],{href:c})}else{get_pjax_content(c,["reference"])}}}else if(e.url&&e.url.indexOf(":::")>-1){var d=e.url.split(":::")[0];if(get_onbeforeunload_status()){get_onbeforeunload_message(g,this,{"plugins.navigation.select.set":[d,1]})}else{a();_(d,1)}}},groupBy:"category"})},f=function(){var e="data-goto",t=$("aside").find("li["+e+"]"),a=t.attr(e);t.remove();return a},p=function(e){if(get_onbeforeunload_status()){return}var e=typeof e=="undefined"||e==-1||e==""?$("aside select").val():e,t=$t_uri_virtualmin?"virtualmin":$t_uri_cloudmin?"cloudmin":$t_uri_usermin?"usermin":$t_uri_webmin?"webmin":"mail";if(t=="webmin"){k("webmin");C("webmin")}else if(t=="virtualmin"){k("virtualmin");S(e)}else if(t=="cloudmin"){k("cloudmin");I(e)}else if(t=="usermin"){k("usermin");C("usermin")}else if(t=="mail"){k("webmail");C("webmail")}},u=function(e,t){if(!t){t=600}var i=e?" #open_"+e+"":' [id^="open_"]',s=$(".switch-toggle"+i+":checked");if(s.length){a();var n=0;if(!n){n++;setTimeout(function(){s.click()},t)}}},g=function(e){var t="aside",a="form",i=a+"s",s="select",n=$(t+" "+s),r=n.data(s+"2"),o=$(t+" .sidebar-search").val();if(o){return}if(!e){vars.navigation.select.obj=r&&r!="undefined"&&!e&&n.select2("isOpen")}if(!e){if(r){n.select2("destroy")}$.each($(t).find(a),function(){$(this).replaceTagName(i)})}else{$.each($(t).find(i),function(){$(this).replaceTagName(a)}).promise().done(function(){l(vars.navigation.select.obj)})}},m=function(){if(vars.navigation.width_initial===false){vars.navigation.width_initial=settings_leftmenu_width}if(matchMedia("(max-width: 1080px)").matches||$("html").attr("data-navigation-collapsed")=="1"){settings_leftmenu_width=260;page_adjust(settings_leftmenu_width,0)}else{if(v___initial_load===1){return}settings_leftmenu_width=vars.navigation.width_initial;page_adjust(settings_leftmenu_width,settings_leftmenu_width)}},h=function(){if(v("dashboard")=="1"){return true}else{return false}},v=function(e){if(e){e='[id="open_'+e+'"]'}else{e=String()}return $(".switch-toggle input"+e+"").length},x=function(){k("dashboard");e();get_pjax_content(v___location_prefix+"/sysinfo.cgi")},y=function(){if(Test.string(w)){k(w)}},A=function(){var e=$('aside .switch-toggle [name="product-switcher"]:checked').attr("id");if(typeof e==="string"){return e.replace("open_","")}return null},k=function(e){if(get_onbeforeunload_status()){return}$('.switch-toggle input:not([id="open_'+e+'"])').each(function(){$(this).removeAttr("checked")}).promise().done(function(){var t=$("#open_"+e),a='.dynamic[name="product-switcher"]';if(!t.length){$(a).first().prop("checked",true)}else{$("#open_"+e).prop("checked",true)}});E()},w=setTimeout(A),C=function(s){if(get_onbeforeunload_status()){return}a();var n=s=="webmail"?"webmail":get_server_data("product");k(n);$.ajax({type:"GET",url:v___location_prefix+"/xhr.cgi?type=nav&action=get&subtype="+n,dataType:"JSON",success:function(e){w=n;$("body ul.navigation").html(e.menu);plugins.shell.link();i();!get_server_data("loading")&&t();if(s==="webmail"&&settings_mail_ui&&get_access_level()==3){typeof mail==="object"&&typeof mail.folders==="object"&&typeof mail.folders.get==="function"?mail.folders.get():load.bundle(v___server_extensions_path+"/mail/mail",1,["mail.folders.get()"])}},error:function(t){session.status(t.responseText);i();e()}})},S=function(s){if(get_onbeforeunload_status()){return}a();k("virtualmin");$.ajax({type:"GET",url:v___location_prefix+"/xhr.cgi?type=nav&action=get&subtype=virtualmin&dom="+s+"",dataType:"JSON",success:function(e){w="virtualmin";$("body ul.navigation").html(e.menu);plugins.shell.link();i();!get_server_data("loading")&&t()},error:function(t){session.status(t.responseText);i();e()}})},I=function(s){if(get_onbeforeunload_status()){return}a();k("cloudmin");$.ajax({type:"GET",url:v___location_prefix+"/xhr.cgi?type=nav&action=get&subtype=cloudmin&sid="+s+"",dataType:"JSON",success:function(e){w="cloudmin";$("body ul.navigation").html(e.menu);plugins.shell.link();i();!get_server_data("loading")&&t()},error:function(t){session.status(t.responseText);i();e()}})},V=function(){if($t_uri_webmin){return theme_language("titles_wm")}else if($t_uri_usermin){return theme_language("titles_um")}else if($t_uri_virtualmin){return theme_language("titles_vm")}else if($t_uri_cloudmin){return theme_language("titles_cm")}else if($t_uri_webmail){return theme_language("titles_mail")}else if($t_uri_dashboard){return theme_language("titles_dashboard")}},T=function(e,t){if($t_uri_webmin){return"webmin"}else if($t_uri_usermin){return"usermin"}else if($t_uri_dashboard){return"dashboard"}else if($t_uri_virtualmin){if(t){return"virtualmin"}else if(e){return"virtualserver"}else{return"virtual-server"}}else if($t_uri_cloudmin){if(t){return"cloudmin"}else if(e){return"servermanager"}else{return"server-manager"}}else if($t_uri_webmail){return"mailbox"}},E=function(){$t_uri_webmin=$('.switch-toggle input[id="open_webmin"]:checked').length?1:0;$t_uri_usermin=$('.switch-toggle input[id="open_usermin"]:checked').length?1:0;$t_uri_virtualmin=$('.switch-toggle input[id="open_virtualmin"]:checked').length?1:0;$t_uri_cloudmin=$('.switch-toggle input[id="open_cloudmin"]:checked').length?1:0;$t_uri_webmail=$('.switch-toggle input[id="open_webmail"]:checked').length?1:0;$t_uri_dashboard=$('.switch-toggle input[id="open_dashboard"]:checked').length?1:0},O=function(e){var e=typeof e==="object"?e.attr("href"):e,t=URI.parseQuery(URI(e).query())["dom"]||URI.parseQuery(URI(e).query())["gparent"],a=$('select[name="dom"]'),i=a.val();if(t&&t!=i){S(t)}},M=function(e){var e=typeof e==="object"?e.attr("href"):e,t=URI.parseQuery(URI(e).query())["id"],t=!t?URI.parseQuery(URI(e).query())["d"]:t,a=$('select[name="sid"]'),i=a.val();if(t&&t!=i){I(t)}};return{reset:e,select:{set:_,back:c,load:l},detect:t,load:{start:a,stop:i},collapse:o,reload:p,update:u,deform:g,lock:m,switch:{dashboard:{get:h,set:x},available:v,get:A,set:k,reset:y},get:{webmin:C,virtualmin:S,cloudmin:I},intersect:{virtualmin:O,cloudmin:M},state:{title:V,module:T,update:E,loading:n,target:f}}}();plugins.messenger=function(){var e=function(e,t,a,i,s,n,r){var o=typeof i=="undefined"?1:i,l=typeof s=="undefined"?true:s;n=typeof n=="undefined"?"":n;r=typeof r=="undefined"?{}:r;if(e==="hide-all"){Messenger().hideAll();return}var _="theme_update_refresh";if(theme_message_exists(_)){theme_message_dismiss(_)}if($.isArray(e)){e=' '+e[1]}if($.isArray(n)){var c=n;n="messenger-fixed ";n+="messenger-on-"+c.join(" messenger-on-")}else if(n.length){n="messenger-fixed messenger-on-"+n}else{n="messenger-fixed messenger-on-bottom"}if(typeof Messenger=="function"){Messenger.options={extraClasses:n,theme:"air"};return window["Messenger_"+o]=Messenger().post({message:e,extraClasses:n,hideAfter:t,showCloseButton:l,type:a,id:o,actions:r})}};document.addEventListener("DOMContentLoaded",function(){(function(){if(typeof Messenger.Message!="function"){return}var e,t,a,i={}.hasOwnProperty,s=function(e,t){for(var a in t){if(i.call(t,a)){e[a]=t[a]}}function s(){this.constructor=e}s.prototype=t.prototype;e.prototype=new s;e.__super__=t.prototype;return e};e=jQuery;a='
\n \n \n \n \n \n \n
';t=function(t){s(i,t);function i(){return i.__super__.constructor.apply(this,arguments)}i.prototype.template=function(t){var s;s=i.__super__.template.apply(this,arguments);s.append(e(a));return s};return i}(Messenger.Message);Messenger.themes.air={Message:t};Messenger.options={extraClasses:"messenger-fixed messenger-on-bottom",theme:"air"}}).call(this)});return{post:e}}();plugins.upload=function(e){e.removeAttr("onsubmit");e.on("submit.fm",function(e){e.preventDefault();e.stopPropagation();e.stopImmediatePropagation();var t=moment().unix()+""+parseInt(Math.random()*1e5),a=$(this),i=a.find(".ui_form_end_submit"),s=a.find('input[type="file"]')[0],n=s.files.length,r=a.find('input[name="dir"]').val(),o=$(s.files).map(function(e,t){return t.name}).get(),l=o.join("\n"),_=function(){theme_restore_buttons_class();$.fn.bootstrapFileInputReset(a);despinnerfy_buttons(0,i);i.addClass("disabled")},c=function(){if(n>1){plugins.messenger.post(''+theme_language("upload_successful").replace("$1",""+n+"").replace("$2","`"+r+"`").replace("'+theme_language("upload_successful_single").replace("$1",""+n+"").replace("$2","`"+r+"`").replace("'+theme_language("global_error")+": "+a.replace(/\s:\s/g," — "),15,"error","uploadError_"+t+"",0,["top","right"]);return 1}else{return 0}};spinnerfy_buttons(i);window["progress_id_ref_"+t]=$.ajax({type:"POST",url:"upload.cgi?id="+t+"",processData:false,contentType:false,data:new FormData(a[0]),complete:function(e){_();if(d(e)){return}e.status===200&&c()},error:function(){$("[data-progress-id="+t+"] .bottom_progress_cancel").trigger("click")}});theme_message_dismiss("upload_error");var f=1;window["progress_id_ref_"+t+"_tracker"]=$.ajax({xhr:function(){var e=new window.XMLHttpRequest;e.addEventListener("progress",function(e){var a=e.target.responseText,i=/.file\.value\s+=\s+"(.*)";/g,s=/.size\.value\s+=\s+"(.*)";/g,n=/.pc\.value\s+=\s+"(.*)";/g,r=regex.matches(a,i,0,1),o=regex.matches(a,s,0,1),l=regex.matches(a,n,0,1);if(r&&o&&l){if(f){f=0;_()}var l=parseInt((l.match(/|/g)||[]).length/50*100);if(l>100){l=100}progress_percent.control(t,"success",l,[r,o,l])}if(!session.status(a)){window["progress_id_ref_"+t].abort();window["progress_id_ref_"+t+"_tracker"].abort();return}},false);return e},type:a.attr("method"),url:v___location_prefix+"/uptracker.cgi?id="+t+"&uid="+(get_access_level()===0||get_access_level()===1?"":get_server_data("user-id"))+"",complete:function(e){if(f){f=0;_()}if(theme_message_exists("uploadError_"+t+"")){return}e.status===200&&c()}})})};const snippets={};snippets.datetime={};snippets.page={};snippets.patches={};snippets.parser={};snippets.initial=function(){snippets.get_goto();plugins.navigation.update("webmail");$(function(){plugins.slider.update.favorites()})};snippets.form_pre_submitter=function(){$("body").on("click",'button.ui_form_end_submit[type="button"]:not(.disabled)',function(){var e=$(this).next('input[type="submit"].hidden'),t=$(this).parent(".btn-group").next('input[type="submit"].hidden');if(!e.length){e=t}var i="form",a=e.parent(),n=a.parent("tr").find(i),r=e.parents(i);if(!r.length){r=e.closest(i);if(!r.length){r=a.prev(i)}if(!r.length){r=a.prev().prev(i)}if(!r.length){r=a.prev().prev().prev(i)}r.append(r.nextUntil(a));$.each(a.find("select, input"),function(){$('').attr({type:"hidden",class:"hidden-force",name:$(this).attr("name")?$(this).attr("name"):$(this).attr("id"),value:$(this).val()}).prependTo(r)}).promise().done(function(){r.submit()});return}var o=e.attr("name")?e.attr("name"):e.attr("id"),l=$.trim(e.val());$('').attr({type:"hidden",class:"hidden-force",name:o,value:l}).prependTo(r);e.trigger("click")});$("body").on("click",'.ui_form_end_submit:not(.disabled), .page_footer_submit:not(.disabled):not([href*="javascript:history"])',function(){var e=false,t=false,i=$(this);var a=0;$(".container-fluid > .panel > .panel-body form").each(function(){if(this&&typeof this.checkValidity==="function"&&this.checkValidity()==false){a++}}).promise().done(function(){if(!a){if(core.curModule("csf")){spinnerfy_buttons(i,[2,-29,"small",t])}else{spinnerfy_buttons(i,false,e,t)}}})})};snippets.form_input_tester=function(e){var t="input.tester",i="click-event",a="btn-warning dt-tester-btn",n="data-tester",r=".btn-group.end_submits:visible button.ui_form_end_submit";if(e){return $(r).hasClass(a)}$(document).on(t,'form:not([data-tester="1"]):not(#webmin_search_form)',function(e){if(e.originalEvent===undefined){return}if(vars.pjax.post_page_fetch){return}if(!v___location_file||v___location_file==="index.cgi"){return}var t=$(this);if(t.attr(n)==1){return}var o=t.find(".CodeMirror").length,l=$(this).attr("action");if(o&&!core.curModule("init")||(core.curModuleFile("mysql","")||core.curModuleFile("postgresql","")||core.curModuleFile("mysql","index.cgi")||core.curModuleFile("postgresql","index.cgi"))&&$(".ui_grid_table.table-hardcoded").length||core.curModuleFile("bind8","")||core.curModuleFile("bind8","index.cgi")||core.curModuleFile("mailbox","reply_mail.cgi")||core.curModuleFile("virtual-server","wizard.cgi")||core.curModuleFile("virtual-server","list_scripts.cgi")||core.curModuleFile("virtual-server","list_scripts.cgi")||core.curModuleFile("mysql","list_vars.cgi")||core.curModuleFile("ruby-gems","index.cgi")||(l&&l.includes("edit_tmpl.cgi")||l&&l.includes("config.cgi"))||$(".modal.in.mppopup").length){t.attr(n,1);return}var s=$(e.target).is('input[type="checkbox"], input[type="radio"]'),_=$(e.target).parents("tr"),c=s&&_&&_.length&&_.attr("class")&&_.attr("class").includes("ui_checked");if(c){return}theme_restore_buttons_class();var d=t.find(r),f=d.first(),p=String("btn-xclass"),u=d.data(i)===1;if(f[0]&&f[0].classList){var h=f[0].classList.value.match(/.*(btn-\S+)/);if(h){p=h[1];f.attr("data-class-restore",p)}}if(d&&d.length){set_onbeforeunload_status(1);if(!u){d.data(i,1);f.removeClass(p).addClass(a);t.attr(n,1);d.one("click",function(){d.data(i,0);t.attr(n,0);set_onbeforeunload_status(0)});t.on("keydown",function(e){var t=e.keyCode?e.keyCode:e.which;if(t===13&&!$(e.target).is("textarea")||t===13&&e.ctrlKey&&$(e.target).is("textarea")){if(f.hasClass(a)){e.preventDefault();f.trigger("click")}else{set_onbeforeunload_status(0)}}})}}})};snippets.inject_extra_option=function(e,t,i,a){if(e==="tr/yes:no"){var n=$("body"),r=t.parents("form");t.parents("td.col_value").parent("tr").after(""+''+a+""+''+''+''+'"+''+'"+""+""+"");var o="submit."+i+"";n.off(o);n.one(o,r,function(){var e=Test.true($("[name="+i+"]:checked").val());window[i]=e;theme.config.save()})}};snippets.datetime.tictac=function(e){var t="convertible-date-full",i="convertible-timestamp-full",a=i,n=$("[data-"+a+"]");n.parent().contents().filter(function(){return this.nodeType===3}).remove();if(typeof moment!=="undefined"){var r=n.data(a);if(r){var o=r+1;n.data(a,o);n.text(moment(o*1e3).utcOffset(get_utc_offset()).format(config_portable_theme_locale_format_full))}!e&&setInterval(snippets.datetime.tictac.bind(null,1),1e3)}};snippets.datetime.locale=function(e,t){if(e){var i=theme_language("title_language_locale"),a=core.curModule("language"),n=core.curModule("change-user"),r=core.curModuleFile("webmin","edit_lang.cgi"),o=$('.container-fluid form select[name="lang"]'),l=a?o.next(".awcheckbox").next(".ui_form_end_buttons").find("tbody"):o.parents("tr").first().parent("tbody"),s=l.parents("form").first(),_=a?l:l.find('select[name="lang"]').parents("tr").first();if(t&&(r||n||a)){return 1}if(e.type==="insert"){if(core.curModule("webmin")){var c=$('.icons-container a[href*="edit_lang.cgi"]'),d=$('.small-icons-container a[href*="edit_lang.cgi"]'),f=$('a[href*="edit_lang.cgi"] p > .fa-angle-right');if(c.length){var p=c.find("img").detach();c.text(i).prepend(p,"
")}else if(d.length){d.find(".hidden").text(i);d.parent().attr("title",i)}else if(f.length){f.parent().html('  '+i)}}if((r||n||a)&&!e.history){if(n){$('[name="overlay"]').parent("td").parent("tr").addClass("hidden")}if(!n){$("span[data-main_title]").text(i)}var u=' '+(n?theme_language("title_webmin_ui_locale"):theme_language("title_locale_config"))+(a?"   ":"")+' "+' "+'         '+theme_language("title_locale_lang_based")+'  
        '+theme_language("title_locale_full")+'  `LLLL`")+"

"+theme_language("global_output_example")+": "+moment().format(config_portable_theme_locale_format_full)+'

">
 

        '+theme_language("title_locale_long")+'  `LL`")+"

"+theme_language("global_output_example")+": "+moment().format(config_portable_theme_locale_format_long)+'

">
 

        '+theme_language("title_locale_short")+'  `L`")+"

"+theme_language("global_output_example")+": "+moment().format(config_portable_theme_locale_format_short)+'

">
 

        '+theme_language("title_locale_time_format")+'  `LTS`")+"

"+theme_language("global_output_example")+": "+moment().format(config_portable_theme_locale_format_time)+'

">
'+(!core.moduleAvailable("webmin")?"":'
        '+theme_language("title_locale_non_ui_config")+' 
')+" ";a?_.prepend(u):(_.after(u),core.setModuleData("/webmin/edit_ui.cgi",["dateformat"]))}return}if(e.type==="init"){if(r||n||a){var h='form[action="change.cgi"] ',g='select[name="lang"]',m='input[name="lang_def"][type="radio"]';if(r||a){h='form[action="change_lang.cgi"] '}$(""+h+" "+g+", "+h+" "+m+"").on("input click",function(e){var t=$(""+h+' [name="langauto"]').parent(".awcheckbox"),i=function(e){if(e){t.css("visibility","visible")}else{t.css("visibility","hidden")}};if(this.value==="en"||!r&&!a&&!$(m+'[value="0"]').is(":checked")&&$(e.target).is("select")){i()}else{i(true)}if($(e.target).is("select")&&$(m+'[value="1"]').is(":checked")&&e.originalEvent!==undefined){$(m+'[value="0"]').click()}if($(e.target).is('[name="lang_def"]')){if(this.value==="1"||$(h+" "+g).val()==="en"){i()}else{i(true)}}}).trigger("input");$(h+" "+m+":checked").trigger("click");theme_ui_opt_select(4);$.ajax({type:"GET",url:v___location_prefix+"/index.cgi/?xhr-get_theme_locale_languages=1",data:false,dataType:"text",async:$.support.spa,success:function(e){$('select[data-select="locales"]').replaceWith(e);var t='input[name^="config_portable_theme_locale_format_"]',i='input[id*="config_portable_theme_locale_language"], select[name="config_portable_theme_locale_languages"], '+t+"",a=$(i),r=[];$(a).on("change focus keyup mouseover",function(e){var i=$(this).attr("name"),a=$(this).parent(),n=a.data("title"),o=$('select[name="config_portable_theme_locale_languages"]'),l=o.val(),s=$(this).val();if(e.type==="focus"){$(t).parent().tooltip("hide")}if(e.type==="keyup"&&!$(e.target).is($(t))){return}if(e.type==="change"&&$(e.target).is(o)){r=[]}if(e.type==="mouseover"&&!$(e.target).is($(t))){return}else if(e.type==="mouseover"&&$(e.target).is($(t))){var _=$(this).attr("name");if(r.includes(_)){return}else{r.push(_)}}e.type!=="keyup"&&$(t).parent().tooltip("hide");if(!s){if(i.includes("short")){s="L"}else if(i.includes("long")){s="LL"}else if(i.includes("full")){s="LLLL"}else if(i.includes("time")){s="LTS"}}if(i.indexOf("theme_locale_format_")>-1){setTimeout(function(){$(t).parent().tooltip("hide");a.attr("title",n.replace(/g'>(.*)<\/i>/g,"g'>"+(l?moment().locale(l).format(s):moment().format(s))+"")).tooltip("fixTitle").tooltip("show")},e.type==="focus"?500:0)}var c=$("._locale_config");if(i==="config_portable_theme_locale_language"&&s!="1"){e.type!="focus"&&c.addClass("hidden")}else{e.type!="focus"&&c.removeClass("hidden")}});$(s).on("submit",function(){var e=$('[name="dateformat"]');if(e.length){core.updateModuleData("/webmin/edit_ui.cgi","/webmin/change_ui.cgi",{dateformat:$.trim(e.val())})}$.each($(i.replace('locale_language"]','locale_language"]:checked')),function(){var e=$(this).attr("name"),t=$(this).val();if(e==="config_portable_theme_locale_languages"&&t===""){t=get_server_data("language-full")}localStorage.setItem(v___server_hostname+"-"+e,t);window[e]=t}).promise().done(function(){var e=s.find('select[name="lang"]').val();if(e.indexOf(".")>-1){e=e.split(".")[0]}if(n&&s.find('[name="lang_def"]:checked').val()=="1"){var t=$('[name="lang_def"][value="1"]').next("label").text().match(/\(([^)]+)\)/);t=t&&t[0]&&t[1]?t[1]:get_server_data("language-full");if(t.indexOf(".")>-1){t=t.split(".")[0]}e=t}moment.locale(config_portable_theme_locale_language&&config_portable_theme_locale_language!="0"?config_portable_theme_locale_languages:e);theme.config.save();setTimeout(function(){plugins.navigation.reload()},2e3)})})}})}return}}var b="x",v="-",x="md",y="d",w="t",k=b+v+x+v,C=function(e,t){var i=e.tagName.endsWith((v+y).toUpperCase())?1:0,a=e.tagName.includes(k+w)?0:1,n=e.outerHTML.indexOf(";1")>-1?1:0,r=e.outerHTML.indexOf(";2")>-1?1:0,o=e.outerHTML.indexOf(";-1")>-1?1:0,l=core.curModule("proc")?1:0,s=$(e).text(),_=i?s.split(";")[0]:s,c=config_portable_theme_locale_format_short||"L",d=config_portable_theme_locale_format_long||"LL",f=config_portable_theme_locale_format_time||"LTS",p=moment.unix(_).format("l");p=p.indexOf("/")>-1?"/":p.indexOf("-")>-1?"-":".";var u=moment.unix(_).utcOffset(get_utc_offset()).format(f),h=r?moment.unix(_).utcOffset(get_utc_offset()).format("YYYY["+p+"]MM["+p+"]DD")+" "+(a?String():u):moment.unix(_).utcOffset(get_utc_offset()).format(!n?c:d);if(l){o=1;if(e&&typeof e.outerHTML==="string"&&e.outerHTML.includes(k+w)){$(e).remove()}}if(o){if(!isNaN(_)){_*=1e3}var g=moment(_).fromNow(),m=parseInt((moment().unix()-moment(_).unix())/(60*60*24)),b=moment(_).format("LT"),x=moment().format("YYYY"),C=moment(_).format("YYYY"),M=moment(_).format("ll"),F=moment(_).format(c);if(core.curModule("mailbox")){if(m===0){g=b}else if(x==C){g=M.replace(x,"").replace(",","")}else{g=F}}u=g;h=g}var q;if($(e).is("td")){q=$(e)}else{q=$(e).parent("td")}q.is("td")&&q.attr("data-order",_);var T={sameElse:"LLL"};if(t){return!i?u:h}else{$(e).replaceWith(!i?u:"-1?' data-placement="auto top" data-container="body" data-toggle="tooltip" data-title="'+(o?moment(_).calendar(null,T):moment.unix(_).fromNow())+'"':"")+">"+h+"")}};$.each($(k+y).add(k+w).add($("td:contains("+(k+y)+")")).add($("td:contains("+(k+w)+")")).add("option:contains("+(k+y)+")").add("option:contains("+(k+w)+")"),function(e,t){var i=!t.tagName.startsWith(k.toUpperCase());if(i){var a=$(t).text(),n=Convert.htmlUnEscape(a);var r="";$.each($(n),function(e,t){var i=$(t)[0].tagName&&$(t)[0].tagName.startsWith((b+v+x).toUpperCase());if(i){r+=C($(t)[0],1)+" "}}).promise().done(function(){$(t).text(r)})}else{C(t,0)}})};snippets.ajax=function(){$(document).ajaxStop(function(){setTimeout(function(){if(session.alive===0){session.reauthenticate.start()}},300)}).ajaxSuccess(function(){v___theme_ajax_error=0;if(typeof stats==="object"&&stats.general.error&&get_access_level()===0&&settings_sysinfo_real_time_status){stats.general.disable();stats.general.enable();stats.general.error=0}setTimeout(function(){if(theme.version.current){var e=theme.version(true);if(e&&e.toString().length===9&&theme.version.current&&theme.version.current.toString().length===9&&!isNaN(e)&&!isNaN(theme.version.current)){if(theme.version.current-1&&e.responseText.indexOf("window.top.location = window.location;")>-1))){session.reauthenticate.start()}},beforeSend:function(e,t){t.url=link_type_convert(t.url,1);e.setRequestHeader("X-no-links","1")}})};snippets.pjax=function(){$(document).on("submit","form",function(e){if(e.originalEvent!==undefined){v___theme_content_history=0}if($(this).attr("data-download")=="true"){return}else{}if(e.target.target==="_blank"){var t=$(this);setTimeout(function(){t.removeAttr("target");get_pjax_content(v___location_resource)},100);return}try{if(core.curModuleFile("virtual-server","edit_newfeatures.cgi")){page.render.content.filter.clear()}}catch(e){}e.preventDefault();if(get_onbeforeunload_status()){get_onbeforeunload_message(e,this)}else{get_pjax_action_submit(e)}});$(document).on("click","a"+$__theme_default_deselectors+"",function(e){if(e.originalEvent!==undefined){v___theme_content_history=0}if(get_onbeforeunload_status()&&$(quirks.active_element()).is("a"+$__theme_event_deselectors)&&(!this.href||this.href&&this.href.length>0&&(!this.href.includes("!edit")&&!this.href.includes("!view")))){e.preventDefault();var t=this.getAttribute("href");if(t===null){return}get_onbeforeunload_message(e,this)}else{get_pjax_action_click(e,this)}});$(document).on("pjax:error",function(e,t,i,a,n){if(i==="error"){var r=$.active;if(r){$.active=r-1}if(Test.strContains(n.url,"/csf/index.cgi")){theme_reload();return}}});$(document).on("pjax:start",function(e,t,i){vars.pjax.replace_contents=1;vars.pjax.event.end=1;vars.pjax.progressing=1;if(t){get_server_data("loading",1);$("body").addClass("loading-bg")}vars.page_user_inactive=1;vars.requested_page=i.url;if(typeof set_server_theme_temp_data_timeout==="number"){clearTimeout(set_server_theme_temp_data_timeout)}});$(document).on("pjax:beforeReplace",function(e,t,i){if(vars.ajax.progressing){vars.pjax.replace_contents=-1;vars.pjax.event.end=0;return}if(settings_mail_ui){if(uri_parse("directory",i.url).indexOf("/mailboxes")===-1&&uri_parse("directory",i.url).indexOf("/mailbox")>-1&&(!uri_parse("file",i.url)||uri_parse("file",i.url).indexOf("index.cgi")>-1)){vars.pjax.replace_contents=0}}plugins.navigation.deform(0);pjax.clear.modules(i);if(i.push===false){if(Test.strContains(i.url,"/config.cgi?")||Test.strContains(i.url,"/uconfig.cgi?")||Test.strContains(i.url,"/mconfig.cgi?")||Test.strContains(i.url,"/tconfig.cgi")){t.find(".btn-accordion-filter, .btn-toggle-accordions").remove()}}});$(document).on("ready pjax:beforeSend",function(e,t,i){if(vars.pjax.cancel===1){vars.pjax.cancel=0;return false}else if(e&&e.relatedTarget&&e.relatedTarget.dataset&&e.relatedTarget.dataset.pjax==="no"){return false}if(theme_download_link(i)){return false}if($t_uri_webmail&&settings_mail_ui){if(core.moduleAvailable("mailbox")){if(core.curModule(v___module_file_manager)||i.url&&!i.url.includes(v___location_file)&&v___location_file==="tconfig.cgi"){page.handle.content.preloader.show(false,false,true);plugins.navigation.reset()}if(typeof mail==="object"){if($("aside .fancytree-container").length===0){mail_load_folders()}}else{load.bundle(v___server_extensions_path+"/mail/mail",1,["mail.folders.get()"])}}}if(settings_mail_ui){if(core.curModule("mailbox")&&(core.curModuleFile("mailbox","")||core.curModuleFile("mailbox","index.cgi"))){if(uri_parse("directory",i.url).indexOf("/mailboxes")===-1&&uri_parse("directory",i.url).indexOf("/mailbox")>-1&&(!uri_parse("file",i.url)||uri_parse("file",i.url).indexOf("index.cgi")>-1)){mail_load(i.url);return false}}}progress.start();typeof v___theme_postponed_fetcher==="number"&&clearInterval(v___theme_postponed_fetcher);var a=$(e.relatedTarget),n=a.attr("href");n=n?n:i.url.replace(v___location_origin,""),clicked_in_nav_menu=a.parent().is("[data-linked], .favorites-dcontainer, .menu-exclude.ui-sortable-handle")||typeof i.callback==="object"&&i.callback[0]==="reference";if(clicked_in_nav_menu){check_bundle(n)}if(typeof i.callback==="object"&&i.callback[0]==="beforeSend"){if(i.callback[3]){setTimeout(function(){window[i.callback[1].apply(this,i.callback[2])]},i.callback[3])}else{window[i.callback[1].apply(this,i.callback[2])]}}v___theme_pjax_call+=1});$(document).on("pjax:success",function(event,data,status,xhr,options){theme_message_dismiss("ajaxError");if(typeof options.callback==="object"&&options.callback[0]==="success"){if(options.callback[3]){setTimeout(function(){if(typeof options.callback[1]==="string"){eval(options.callback[1])}else{window[options.callback[1].apply(this,options.callback[2])]}},options.callback[3])}else{if(typeof options.callback[1]==="string"){eval(options.callback[1])}else{window[options.callback[1].apply(this,options.callback[2])]}}}});$(document).on("pjax:complete",function(e,t,i){vars.pjax.initial_load=1;vars.allow_ui_features=1;vars.pjax.progressing=0;if(v___theme_reload){theme_reload()}progress.end();get_server_data("loading",0,1);$("body").removeClass("loading-bg");v___theme_connection_triggered_origin=0;typeof stats==="object"&&stats.general.error&&(stats.general.disable(),stats.general.enable())});$(document).on(vars.h.event.page.end,function(e,t){vars.pjax.cache.set("enable");if(!vars.pjax.event.end){return}if(session.alive===0||v___theme_reload===1){return}if(t!=undefined&&t.responseText&&t.responseText.includes("data-predownload")){return}plugins.navigation.deform(1);get_pjax_event_end(e,t);setTimeout(function(){var e=link_type_convert(location.hash,1).replace("#","");if(e&&e.length>0){var t=$('[name="'+e+'"]');if(t.length){t[0].scrollIntoView({duration:200,smooth:true,direction:"vertical",complete:function(){}})}}},200);v___page_container.find(".panel > .panel-body:first").one("click mousedown keypress",function(){vars.page_user_inactive=0});vars.pjax.post_page_fetch=true;setTimeout(function(){vars.pjax.post_page_fetch=false},100);if(settings_embed_product_branding_privileged){!vars.page.shown&&page.branding.process(true)}});$(document).on("pjax:popstate",function(e){var t=e.state;_history_page_back=1;setTimeout(function(){_history_page_back={}},0);var i=vars.pjax.page_cache&&!vars.pjax.cache.disabled(false,true);if(e.hasContents){get_pjax_event_end_funcs(0,!i)}vars.previous_request=String();vars.source_request=String()})};snippets.pjaxHooks=function(e,t){if(e&&t==="csf"){var i=e.substring(0,2048);var a=i.match(/.*(ConfigServer Security.*Firewall)/),n=i.match(/.*'+theme_language("notify_patching_module_style").replace("$1",""+theme_language("csf")+"")+" "+theme_language("global_please_wait")+'   ',300,"info","csf_patching");theme.veiled(1);$.post(v___location_prefix+"/index.cgi/?xhr-csf-unload=1",function(e){setTimeout(function(){v___module="csf";window.history.pushState({},false,link_type_convert(v___location_prefix+"/csf/index.cgi",2));theme_title_generate()},200);setTimeout(function(){location.reload()},3e3)});return 1}}};snippets.get_goto=function(){plugins.navigation.state.update();var e=plugins.navigation.state.target(),t=function(){if($t_uri_virtualmin){get_default_virtualmin_content(false)}else if($t_uri_cloudmin){get_default_cloudmin_content(false)}else{get_default_content()}};if(!e){t();return}var i=unbuffered_header_processor_allow,a=!i(e),n=function(e){var t=URI(e).directory();if(t&&t!="/"&&t!=v___location_prefix){return t}else{return false}};if(i(e,1)){a=0;var r=n(e);if(r){get_pjax_content(r+"/");return}}if(e&&(e.match(/.*(save|change|install|backup|fetch|upload|delete|modify|view_table|reboot|shutdown|copy|move).*\.cgi$/g)||e.match(/.*(enable_domain|disable_domain).*\.cgi.*/g)||e.includes("index.cgi?action=upgrade"))){var o=n(e);if(o){get_pjax_content(o);return}}var l=get_server_data("initial-wizard");if(e&&a){if(Test.strContains(e,v___module_file_manager+"/config.cgi")){get_pjax_content(v___location_prefix+"/"+v___module_file_manager);return}if(l!="1"&&$t_uri_virtualmin){get_pjax_content(v___location_prefix+"/virtual-server/wizard.cgi");return}if(URI(e).hostname()&&URI(e).hostname()!==URI(location.href).hostname()||Test.strContains(e,"/servers/link.cgi/")||Test.strContains(e,"/mailbox/view_mail.cgi")||Test.strContains(e,"/mailbox/reply_mail.cgi")||Test.strContains(e,"xerror")||e==="/"||e===v___location_prefix+"/"||e==="%2F"||Test.strContains(e,"config_save")||e==="/?"+$__theme_navigation){t();return}check_bundle(e);var s=function(){get_pjax_content(e,["success","v___theme_content_history = 1"])};if(document.hasFocus()||document.visibilityState!=="hidden"){s()}else{page.branding.process(true);$(window).one("focus",function(){s()})}}};snippets.tooltips=function(e){if(e){var t='[data-toggle="tooltip"]:not([data-skip]), [data-toggle="virtualmin-license"], .panel-body td a:not([data-skip]), .icons-container',i=vars.h.selector.content.get();try{i.tooltip("destroy")}catch(e){}var a="container-fluid",n=$("."+a+" .gl-icon-container").length||("."+a+" .small-icons-container").length;i.tooltip({selector:t,sanitize:false,placement:"auto "+(n||$("[data-fbplacement]").length?"bottom":"top")+"",trigger:"hover",html:true,delay:{show:n?vars.plugins.tooltip.delay.show/10:vars.plugins.tooltip.delay.show,hide:vars.plugins.tooltip.delay.hide}})}else{$("aside").tooltip({selector:'li[data-toggle="tooltip"], li > a[data-toggle="tooltip"].menu-exclude-link, label[data-toggle="tooltip"]',sanitize:false,container:"body",html:true,delay:{show:vars.plugins.tooltip.delay.show,hide:vars.plugins.tooltip.delay.hide}})}};snippets.progressive_button=function(e,t){var i=e.querySelector(".progressing");i&&(i.style.width=t+"%")};snippets.button_lock=function(e,t){if(t){e.setAttribute("disabled","disabled")}else{e.removeAttribute("disabled")}};snippets.help_popup=function(){var e=$("body");e.on("click",".help_popup",function(e){e.stopPropagation();e.preventDefault();var t=$(this),i=function(e){e=e.replace(/

[\n]+<\/p>/gi,"
");e=e.replace(/

[\n]+

/gi,"
");e=e.replace(/�/gi,"");var t=$(e).filter(".ui_subheading").first().text(),i=$.parseHTML(e),a="";i=i.filter(function(e){if(e.nodeName&&e.nodeName.toLowerCase()!=="meta"&&e.nodeName.toLowerCase()!=="link"&&e.nodeName.toLowerCase()!=="title"&&e.nodeName.toLowerCase()!=="hr"&&e.nodeName.toLowerCase()!=="style"&&(e.nodeName.toLowerCase()!=="h3"&&e.className!=="ui_subheading")){e.outerHTML?a+=e.outerHTML:a+=$.trim(e.textContent)?""+$.trim(e.textContent)+"":$.trim(e.textContent);return e}});return[t,i,a]};var a=t.attr("href").indexOf("showpass.cgi")>-1?v___location_directory_trail_slashed+t.attr("href"):t.attr("href");$.ajax({type:"POST",url:a,data:false,dataType:"text",success:function(e){if(!session.status(e)){return}var n=i(e),r=n[0],o=n[1],l=n[2];if(!o){return}var s='',_=t.attr("href").indexOf("showpass.cgi")>-1,c=t.attr("href").indexOf("/locale")>-1;if(_){s=""}r=s+""+r+"";t.data("title",r);t.data("content",l);var d=String(),f=t.hasClass("btn-link");if(l&&(l.length>1024||l.includes("

")||l.includes("