diff --git a/unauthenticated/js/bundle.min.js b/unauthenticated/js/bundle.min.js index f72773b74..55bfb549a 100644 --- a/unauthenticated/js/bundle.min.js +++ b/unauthenticated/js/bundle.min.js @@ -165,4 +165,4 @@ if(typeof jQuery==="undefined"){throw new Error("Bootstrap's JavaScript requires * 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,cache:{}};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},arrPrepend:function(e,t){var n=t.slice();n.unshift(e);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");n=n.replaceAll("&","&");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&&d=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+" "+c[d]}};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,a){$.ajax({type:"POST",url:v___location_prefix+e,data:false,dataType:"text",success:function(e){if(!session.status(e)){return}var i=$(e).find("form.ui_form");$.each(n,function(e,t){var n=i.find('[name="'+e+'"]'),a=n.filter(":checked").val(),s=t==="+!"?+!parseInt(a):t;n.val(s)});setTimeout(function(){var e=$(i).serializeArray(),n=[];e.map(function(t,a){if(n.includes(t.name)){e.splice(a,1)}n.push(t.name)});e=Convert.json_to_query(Convert.serialized_to_json($.param(e)));$.ajax({type:"POST",url:v___location_prefix+t+(a?(t.includes(".cgi?")?"&":"?")+e:String()),data:a?false:e,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,c=80,d=86,f=140,u=176,_=parseInt(settings_sysinfo_cpu_fans_base_rpm),g=_,p=_*2;t=parseInt(t);if(e==="temperature"){if(n){return t<=o?i:t>o&&t<=l?i:t>l&&t<=c?s:t>c?r:""}else{return t<=d?i:t>d&&t<=f?i:t>f&&t<=u?s:t>u?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(session.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__,opts){var execute_load=function($script,$css,callBack,callBackCalledNoEval,opts){var head=$("head"),initial_name=$script,opts_local={};if(!opts){opts={}}opts_local.sourceType="."+v___source_type;opts_local.cssPath=v___server_css_path;opts_local.jsPath=v___server_js_path;opts_local={...opts_local,...opts};callBack=typeof callBack=="object"?callBack:false;var css=(!$css?0:$css===1?$script:$css)+opts_local.sourceType+".css",js=$script+opts_local.sourceType+".js";if(css||js){if(css.toString().includes(":min")){css=css.replace(":min"+opts_local.sourceType,".min")}if(js.toString().includes(":min")){js=js.replace(":min"+opts_local.sourceType,".min")}}if(!Test.strContains(initial_name,v___server_extensions_path)&&!Test.strContains(initial_name,v___server_js_path)){css=opts_local.cssPath+"/"+css;js=opts_local.jsPath+"/"+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)).done(function(){processCallbacks(callBack,callBackCalledNoEval)}).fail(function(e){if(e.statusText!=="canceled"&&e.statusText!=="abort"){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__,opts)}else{execute_load(e,$css__,0,0,opts)}})}else{execute_load($scripts__,$css__,callBack__,callBackCalledNoEval__,opts)}},css:{_linkBuild:function(e){return e&&!e.startsWith("/")&&(e=`${v___server_css_path}/${e}.${v___source_type}.css?${parseInt(theme.version().replace(".",""))}`)},_styleExists:function(e){return document.head.querySelector('link[href^="'+e+'"]')},add:function(e,t,n){const a=[];(typeof e==="string"?[e]:e).forEach(async i=>{i=this._linkBuild(i);if(!this._styleExists(i)){const s=()=>{return new Promise(e=>{const t=document.createElement("link");t.type="text/css";t.rel="stylesheet";t.onload=(()=>{e(true)});t.href=i;if(!this._styleExists(i)){$(document.head).append(t)}})};const r=await s();r&&a.push(i);if(e.length===a.length){if(t){t.apply(this,n);return a}}}})},remove:function(e){e=this._linkBuild(e,true);const t=this._styleExists(e);if(t){t.remove()}}}};const page={handle:{content:{offset:function(e){var t=core.curModuleFile("mailbox","",1)||core.curModuleFile("mailbox","index.cgi",1);is_offset=core.curModuleFileQuery("logviewer","view_log.cgi","view=")||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",c=e===-2?l:0,d=HTML.template.page_content_preloader(o,c,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(d);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",c="dataTable-mirror",d="filter_mirror_clear",f="filter-value",u="btn-filter-top-right",_="btn-accordion-filter",g="btn-toggle-accordions",p=$("body"),h="."+u+" span, ."+_+" span",m="."+u+" i, ."+_+" i",v="ui_form_elements_wrapper_search",b=function(){return $("form:visible ."+v+"").length?$("form:visible ."+v+""):$("."+v+"")},y=function(){return b().length},x=function(){if(y()){var e=b().find('[type="text"]');e.val("");$("#"+e.attr("form")).submit()}},k=function(){if(y()){var e=$("."+u),t=b().find('[type="text"]'),n=t.val();$("."+u+" ."+c).val(n);if($.trim(n).length>0){$(h).removeClass("text-lighter");$(m).addClass("text-danger");e.addClass("opened");e.find("label").show()}else{$(h).addClass("text-lighter");$(m).removeClass("text-danger");e.removeClass("opened");e.find("label").removeAttr("style")}if(y){e.show()}else{e.hide()}}};if(r.length||o.length||y){setTimeout(function(){if(!$("."+u+"").length&&!$("."+_+"").length){$("#headln2r .btn-group a").addClass("pull-left").attr("style","");$("#headln2r .btn-group").prepend(''+""+''+""+(e?'':"")+"")}$(".btn-filter-gl").data("title",theme_language(y()?"global_search":"datatable_filter")).attr("aria-label",theme_language(y()?"global_search":"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){let t='a[data-toggle="tab"]',a="hide.bs.tab",s="shown.bs.tab";if(e){p.undelegate(t,a);p.on(a,t,function(e){n.clear()})}p.undelegate(t,s);p.on(s,t,function(e){var t=$(e.target).parent(".active");if(t.data(f)){$("."+c+"").val(t.data(f)).trigger("input")}else{$("."+c+"").val("").trigger("input")}n.visibility(u,_,g,i);k()})}var t="shown.bs.collapse.config hidden.bs.collapse.config";p.undelegate(l,t);p.on(t,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 r=$("."+g+"");if(!e){var v=$("."+s+"");v.hide()}else{$(o).find('a[data-toggle="collapse"]').on("click",function(e){$.trim($("."+c).val()).length&&page.render.content.filter.clear();e.originalEvent&&$("."+g+"").find("i").removeClass("fa-toggle-switch text-light")})}$("."+d+"").mousedown(function(e){if($(e.target).is("."+d+"")){n.clear();x()}});$("."+u+", ."+_+"").click(function(e){$(this).addClass("opened");!$(e.target).is("input")&&$(this).find("label").slideToggle(0,function(){$(this).find("input").focus()})});r.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&&$("."+_+" input").val().length){n.clear()}});function w(t){var n=t.val(),a=$(".__page .panel-filter:visible");if(!e){var o="."+s+" input";if($("."+i+"").length){$(".nav-tabs li.active").data(f,n);$(".active "+o).val(n).trigger("input")}else{$(o).val(n).trigger("input")}}else{if(n){$.support.transition&&($.support.transition=false);r.find(".fa-toggle-switch-off:not(.fa-toggle-switch)").trigger("click");a.find(".panel tr:not([data-empty-row]):not(.hidden-skip)").addClass("hidden-forged");var c=a.find('.panel tbody tr:contains("'+n+'")');c.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 d=$(".__page .panel-filter:visible");$.each(d.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",""+n+"")+""):$(this).find("tbody").find("var[data-query-str]").text(n)}else{t.remove()}})}else{r.find(".fa-toggle-switch").trigger("click");a.find(".panel tr").removeClass("hidden-forged");a.find(".panel tr[data-empty-row]").remove();!$.support.transition&&($.support.transition={end:"webkitTransitionEnd"})}}if($.trim(n).length>0){$(h).removeClass("text-lighter");$(m).addClass("text-danger")}else{$(h).addClass("text-lighter");$(m).removeClass("text-danger")}}var C;var T=200;$("."+c+"").keydown(function(e){var t=e.originalEvent!==undefined?T:0;if(e.keyCode==76&&e.ctrlKey||e.keyCode==27){e.preventDefault();e.stopPropagation();if(t){setTimeout(function(){n.clear();x()},t)}else{n.clear();x()}}else{t&&clearTimeout(C)}}).on("input keyup",function(e){$(".btn-filter-gl").tooltip("hide");if(y()){var t=e.keyCode?e.keyCode:e.which;if(t===13){var n=b().find('[type="text"]');n.val($(this).val());$("#"+n.attr("form")).submit()}}else{var a=$(this),i=e.originalEvent!==undefined?T:0;if(i){clearTimeout(C);C=setTimeout(function(){w(a)},i)}else{w(a)}}});$("."+u+" input, ."+_+" input").blur(function(e){$(this).parent("label").slideToggle(0);$(this).closest(".opened").removeClass("opened")});n.visibility(u,_,g,i);k()},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"||v___module==="logviewer"){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,c="bottom_progress_horizontal";if(!$(i.body).find("."+s+"es").length){$(i.body).append('
')}var d=$(i.body).find("."+s+"es");if(!d.find('div[data-progress-id="'+e+'"]').length){d.append(HTML.bottom_progress(e,t,a));if(a||d.find("."+c+"").length){d=$(i.body).find("."+s+"es");var f=d.find("."+s+':not(".'+c+'")').addClass("no-animation").detach();d.prepend(f)}d.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(d.find("div[data-progress-id]").length===0){d.remove()}},10*l);window["progress_id_ref_"+t].abort();if(a){window["progress_id_ref_"+t+"_tracker"].abort()}})}var u=d.find('div[data-progress-id="'+e+'"]');u.find(r).css("height",n+"%");if(a){var _=u.find("."+s+"_overlay"),g=".bottom_progress_";u.find(g+"filename").html(''+(!a[0]?"unknown-file-name":Convert.htmlEscape(Convert.textTruncate(Convert.htmlDecode(a[0]),24)))).attr("title",Convert.htmlEscape(a[0]));_.find(g+"data").text($(Convert.htmlDecode(a[1])).text());_.find(g+"percent").text(a[2]+"%")}else{u.find("."+s+"_overlay").text(n+"%")}if(n==l){u.find(o).remove();setTimeout(function(){u.remove();if(d.find("div[data-progress-id]").length===0){d.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,c='',d=$(a).find("._logo_welcome > img").attr("src"),f=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();if(session.server.data("terminal")==1){plugins.terminal.close()}else if(session.server.data("shell")==1){plugins.shell.unlock();plugins.shell.close()}if(d){$("."+t).append("")}setTimeout(function(){f().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(session.server.data("user"))}var s=$(a).find("form").append(c),o=s.attr("action"),l=$("."+t).find("form").serialize(),d=$("."+t).find("[data-submit]"),u=$("."+t+"-header-icon i"),_=$("."+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):f();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");u.removeClass("fa-lock").addClass("fa-unlock fa-rotate-180 fa-flip-horizontal");_.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()),u=d.serialize();$.ajax({type:"GET",url:o,data:u,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}},server:{data:function(e,t,n){var a=$("html"),i=$("body"),s="data-"+e,r=e.replace("data-","");if(typeof n!="undefined"){if(e.startsWith("data-")){a.removeAttr(e);a.removeData(r)}else{a.removeAttr(s);a.removeData(e)}if(e==="data-uri"){i.removeAttr(e)}}else if(typeof t=="undefined"){if(e.startsWith("data-")){return a.attr(e)}else{return a.data(e)}}else{if(e.startsWith("data-")){a.attr(e,t).data(r,t)}else{a.data(e,t).attr(s)}if(e==="data-uri"||e==="data-module"){i.attr(e,t);if(e==="data-module"){i.removeClass().addClass(t)}}}}},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.toString().indexOf(a)>-1){return true}}}return false},str_contains_multi_regex:function(e,t,n){if(e){for(var a in n){var i=n[a],s=t.toString();s=new RegExp(s.replace("::M::",i));if(s.test(e)){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||$(document.activeElement).is("textarea")||$(document.activeElement).is("input")}};const theme={api:{version:function(e,t){return theme.version(e,t)},page:{refresh:function(){return plugins.pjax.page.refresh()},refreshForce:function(){return plugins.pjax.page.refresh(true,true)},headers:{getAll:function(){return plugins.pjax.headers.getAll()}}},event:{on:{page:{error:function(e,t){$(document).on("pjax:error",function(n,a,i){try{e.call(this,t,n,a,i)}catch(e){console.warn("Error executing custom function on page load error event",e)}})},beforeSend:function(e,t){$(document).on("ready pjax:beforeSend",function(n,a,i){try{e.call(this,t,n,a,i)}catch(e){console.warn("Error executing custom function on page load beforeSend event",e)}})},start:function(e,t){$(document).on("pjax:start",function(n,a,i){try{e.call(this,t,n,a,i)}catch(e){console.warn("Error executing custom function on page load start event",e)}})},complete:function(e,t){$(document).on("pjax:complete",function(n,a,i){try{e.call(this,t,n,a,i)}catch(e){console.warn("Error executing custom function on page load complete event",e)}})},success:function(e,t){$(document).on("pjax:success",function(n,a,i){try{e.call(this,t,n,a,i)}catch(e){console.warn("Error executing custom function on page load success event",e)}})},beforeReplace:function(e,t){$(document).on("pjax:beforeReplace",function(n,a,i){try{e.call(this,t,n,a,i)}catch(e){console.warn("Error executing custom function on page load beforeReplace content event",e)}})},afterReplace:function(e,t){$(document).on(vars.h.event.page.end,function(n,a){try{e.call(this,t,n,a)}catch(e){console.warn("Error executing custom function on page afterReplace content event",e)}})},popstate:function(e,t){$(document).on("pjax:popstate",function(n){try{e.call(this,t,n)}catch(e){console.warn("Error executing custom function on page popstate event",e)}})}}},one:{document:{init:null,ready:null},page:{reset:function(){return plugins.pjax.page.events.reset()},beforeSend:function(e){return plugins.pjax.page.events.beforeSend.set(e)},start:function(e){return plugins.pjax.page.events.start.set(e)},complete:function(e){return plugins.pjax.page.events.complete.set(e)},success:function(e){return plugins.pjax.page.events.success.set(e)},beforeReplace:function(e){return plugins.pjax.page.events.beforeReplace.set(e)},afterReplace:function(e){return plugins.pjax.page.events.end.set(e)}}}}},help:{_selector:"hotkeys-help",show:function(){const e=this;if(e._loading){return}e._loading=1;progress.start();$.ajax({type:"POST",url:v___location_prefix+"/xhr.cgi?type=data&subtype=theme&action=list-hotkeys",dataType:"JSON",complete:function(){e._loading=0;progress.end()},success:function(t){const n=theme_shortcuts_modifier_name(),a=hotkey_variation=settings_hotkey_open_module_config_privileged==="dot"?".":settings_hotkey_open_module_config_privileged==="comma"?",":settings_hotkey_open_module_config_privileged;let i="Ctrl",s="Alt",r="Shift",o="Meta",l=" + ",c=String();if(platform.detect()==="mac"){i="⌃";s="⌥";r="⇧";o="⌘";l=" "}let d=[];t["hotkeys-global"].forEach(function(e){let t=String();if(e.key&&e.key.includes("hotkey_custom")){return}if(session.server.data("product")!=="usermin"&&(e.key==="settings_hotkey_toggle_key_usermin"||e.key==="settings_hotkey_toggle_key_webmail")){return}if(session.server.data("product")==="usermin"&&(e.key==="settings_hotkey_toggle_key_webmin"||e.key==="settings_hotkey_toggle_key_virtualmin"||e.key==="settings_hotkey_toggle_key_cloudmin")){return}c+='
'+e.title+""+n+l+(t||window[e.key]).toUpperCase()+"
";let a=parseInt(e.section.replace(/\D+/g,String()));if(!d.includes(a)){d.push(a)}});let f='
'+theme_language("hotkey_open_new")+""+i+l+s+l+" D"+"
";f+='
'+theme_language("hotkey_clear_cache")+""+i+l+s+l+r+l+o+l+" R"+"
";f+='
'+theme_language("hotkey_open_module_config_privileged")+""+n+l+a.toUpperCase()+"
";f+='
'+theme_language("hotkey_open_theme_config")+""+n+l+r+l+a.toUpperCase()+"
";f+='
'+theme_language("hotkey_list_table")+""+s+l+"⏴, "+s+l+"⏵"+"
";c+='
'+theme_language("hotkey_copy_to_clipboard")+""+o+l+s+l+" "+theme_language("hotkey_copy_to_clipboard_click")+"
";d=d.sort((e,t)=>e-t);let u=d[0];let _=String(),g=t["hotkeys-file-manager"];if(g){g.forEach(function(e){let t=String();if(!_){_='
'+theme_language("hotkeys_help_title_fm")+"
"}_+='
'+e.title+""+theme_modifiers_replace_for_mac(e.key.replaceAll("

",", ").replaceAll("
",", "),"Ctrl","Meta")+"
"})}let p=String(),h=t["hotkeys-editor"];if(h){h.forEach(function(e){let t=String();if(!p){p='
'+theme_language("hotkeys_help_title_edit")+"
"}p+='
'+e.title+""+theme_modifiers_replace_for_mac(e.key,"Ctrl","Meta")+"
"})}const m=''+'   '+theme_language("hotkeys_help_title")+''+""+'
"+'
'+'   '+theme_language("hotkeys_help_title_docs")+""+''+""+'"+""+"
"+'

'+'   '+theme_language("theme_xhred_global_community")+""+''+""+'"+""+"
",v='",b=$(v).appendTo($("body"));b.modal("show");b.on("hide.bs.modal",function(){$(".popover.module-help .close").trigger("click")});b.on("hidden.bs.modal",function(){$(".modal."+e._selector+"").remove()})},error:function(e){session.status(e.responseText);plugins.messenger.post({type:"error",icon:"fa fa-exclamation-triangle fa-lg fa-fw",id:"hotkeysHelp",title:theme_language("global_error"),message:theme_language("hotkeys_server_error"),layout:1,displayMode:1,position:"bottomCenter",cancel:true,close:true,timeout:false,progressBar:false})}})},config:function(e){const t=$(".modal."+this._selector+"");t.modal("hide");t.remove();get_pjax_content($(e).attr("data-href"))},print:function(){$("."+this._selector).printThis({importStyle:true,pageTitle:theme_language("hotkey_print_title")})}},errors:{onload:function(){var e=$(".container-fluid > .panel > .panel-body > [data-fatal-error-text]").length||$("body.err-body > .err-head").length;return e}},download:function(e,t,n,a){var i=true;if(a===undefined||a==1||a===true){i=false}if(e&&t){t=typeof t=="string"?t:$.param(t);var s=document.createElement("form");s.method=n||"POST";s.action=e;if(i){s.target="_blank"}$.each(t.split("&"),function(){var e=this.split("=");if(e[1]){try{e[1]=Convert.uriDecodeComponent(e[1])}catch(e){}}var t=document.createElement("input");t.type="hidden";t.name=e[0];t.value=e[1];s.appendChild(t)});$(s).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)){var t=function(){progress.start();vars.cache.theme_updating=true;theme.veiled(true,false,"bg-filter-grayscale-opacity50");$.ajax({type:"POST",url:v___location_prefix+"/index.cgi/?xhr-theme_clear_cache=1",data:false,dataType:"text",complete:function(){location.reload()}})};plugins.messenger.post({id:e,class:"theme-refresh-to-update",position:"bottomLeft",timeout:false,close:false,message:theme_language("theme_update_available"),icon:"exclamation-circle",buttons:plugins.messenger.toast.construct.button(theme_language("filemanager_context_refresh").toUpperCase(),t),layout:1})}},restart_message:function(e){var t=0,n=0;if(e&&e.toString().includes("systemctl")){e+=" restart webmin";t=4500}else{e+="/restart"}var a="webmin_restart_notice",i=function(){return $("."+a+"").find(".bootbox-body")};if(i().length){return}var s=bootbox.alert({message:"

"+"  "+theme_language("global_warning")+"!

"+theme_language("webmin_requires_restart").replace("$1",e),className:""+a+" bootbox-centered font-medium warning"});s.init(function(){var e=i(),a="data-p-restart",r="data-p-cancel";e.append("

"+"
"+""+""+"
");e=i();var o=e.find("["+a+"]"),l=e.find("["+r+"]");o.one("click",function(){n=1;e.append(theme_countdown_animated(false,7));theme_countdown_animated(e,7);progress.start();spinnerfy_buttons(o);l.off("click").addClass("pointer-events-none");despinnerfy_buttons=function(){};vars.page.locked=1;$.ajax({type:"POST",url:v___location_prefix+"/xhr.cgi?type=cmd&action=restart",data:false,dataType:"text",complete:function(){setTimeout(function(){location.reload()},t)}})});l.one("click",function(){vars.cache.norestart=true;s.modal("hide")})});s.on("escape.close.bb",function(e){e.preventDefault();e.stopPropagation();e.stopImmediatePropagation();n&&theme.veiled(1)})},version:function(e,t){ver=session.server.data("theme-version-data");if(!ver){return String()}ver=Convert.uriDecodeComponent(ver);if(!ver.startsWith("{")||!ver.endsWith("}")){console.warn("Error parsing theme version data object");return"19.99"}ver=JSON.parse(ver);!theme.version.current&&(theme.version.current=ver.versionfull.toString());if(e){return ver.timestamped.toString()}if(t){return ver.versionfull.toString()}return ver.version.toString()},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.meta=false;vars.events.keypressed.ctrl=false;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(e){var t=core.get_global_vars(e||["config_portable","settings"]);$.ajax({type:"POST",url:v___location_prefix+"/index.cgi?xhr-manage-config=1&save=1&"+Convert.json_to_query(t),dataType:"text",success:function(e){if(!session.status(e)){return}plugins.page.format.columns(true)},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, 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=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"),c=e.next("tr").find("td").first().find("b");l.append(' ('+theme_language("global_installed_version").toLowerCase()+" "+theme.version(0,1)+')"+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,c=$("[data-text-installed]"),d=$("."+n),f=$("em["+r+"]"),u=$("span["+s+"]"),_=5;if(t){t=t.toString();var g=t.match(/([\d\.]+)/);if(g){_=g[1].length}}if(o){o=o.toString();var p=o.match(/([\d\.]+)/);if(p){_=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<=_&&o&&o.length<=_&&o.toString()!=t.toString()){f.addClass("text-danger")}if(a&&!a.length){c.text(theme_language("global_installed_and_latest_version").toLowerCase());f.addClass("text-success")}u.replaceWith(a);d.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_hold_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_shell","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_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(){session.server.data("data-theme",e);n.remove();session.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"]:not(.tconfig-popover)').popover({sanitize:false});var o=$('[action="tconfig.cgi"] sup.tconfig-popover');o.popover({sanitize:false,container:$('[action="tconfig.cgi"] .col_value').first()}).on("shown.bs.popover",function(){$(this).parent().parent().parent().addClass("popover-active")}).on("hidden.bs.popover",function(){$(this).parent().parent().parent().removeClass("popover-active")});var l=$('[name="settings_sysinfo_hidden_panels_user"]');l.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 c=$('textarea[name="settings_leftmenu_custom_links"]'),d=c.val();c.length&&c.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(get_access_level()===0){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);$(window).trigger("resize")})}(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""}})}})}})();(function(){var e=theme.config._.form.tconfig(),t=e.find("div > table > tbody"),n=e.find("#atsave");t.on("keydown",function(e){var t=e.keyCode?e.keyCode:e.which;if(t===13){n.not(".disabled").trigger("click")}})})();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.terminal=function(){var e={},t={},a=function(e){if(typeof t==="function"){t(e)}},i=function(a,i){if(!i){i={};i.container_id="terminal"}if(typeof a==="object"&&!$.isEmptyObject(a)&&a.files&&a.cols&&a.rows&&a.socket_url&&a.port){const o=a;if(o.files.js){const a=o.files.js,r=session.server.data("webprefix"),c=r+"/xterm",d="WebglAddon",f="CanvasAddon",p=detectWebGLContext()?d:f;if(p===d){a.splice(3,1)}else if(p===f){a.splice(4,1)}$.each(a,function(r,f){f=f.replace(/(.*?)\.(js|css)\?.*/,"$1");load.bundle(f,+!r,a.length-1===r?[function(){var a=setInterval(function(){if(typeof Terminal==="function"&&typeof AttachAddon==="object"&&typeof FitAddon==="object"&&typeof window[p]==="object"){clearInterval(a);const f=new WebSocket(""+o.socket_url+"","binary"),u=function(a){if(!$.isEmptyObject(e)){for(const t in e){try{if(t!==a){e[t].onclose=function(){};e[t].readyState===1&&e[t].send("exit\r");setTimeout(function(){e[t].close();delete e[t]},300)}}catch(e){}}}if(a===null){t={}}},g=function(){return document.getElementById(i.container_id)};var r={},c;f.onerror=function(){_(i.container_id,"socket_conn_sock_error");c&&c.disconnect();n=false};f.onclose=function(){if(core.curModule("xterm",1)||i.dropdown){setTimeout(function(){var e="Connection to "+(session.server.data("host")||"localhost")+" closed.";if(!$.isEmptyObject(r)){var t=i.dropdown?"xxs":"tiny",a=i.dropdown?"plugins.terminal.reconnect":"page_refresh";r.writeln(e);$(g()).find(".xterm-viewport").css("overflow","hidden");$(g()).find(".xterm-rows").html(""+e+"
"+''+theme_language("socket_conn_lost_reconnect")+"")}},1e3)}c&&c.disconnect();n=false};f.onopen=function(){if(!i.detached){t=u;u(o.port);e[o.port]=f}var a={cols:o.cols,rows:o.rows,fontFamily:"Roboto Mono Local",letterSpacing:1,fontSize:12,lineHeight:1.1,screenReaderMode:o.conf.screen_reader==="true"?true:false,theme:{background:"#00000000"}};if(i.terminal){a={...a,...i.terminal}}try{let e=config_portable_module_xterm_options;e=JSON.parse(e.replace(/'/g,'"'));if(!$.isEmptyObject(e)){a={...a,...e}}}catch(e){}var n=new Terminal(a),_=g(),m=new AttachAddon.AttachAddon(this),h=new FitAddon.FitAddon,v=p===d?new WebglAddon.WebglAddon:new CanvasAddon.CanvasAddon;call_default_cmds=function(e){if(i.cmd){if(i.cmd.startsWith("!")){i.cmd=i.cmd.replace(/^!/,"")}setTimeout(function(){e.send(i.cmd);setTimeout(function(){e.send("\r")},420)},40)}};n.loadAddon(m);n.loadAddon(h);if(config_portable_module_xterm_render_addon){n.loadAddon(v)}n.open(_);n.focus();setTimeout(function(){c=new ResizeObserver(function(){h.fit()});c.observe(_);if(config_portable_module_xterm_render_addon&&typeof WebglAddon==="object"){v.onContextLoss(function(){v.dispose()})}n.onResize(function(e){f.send("\\033[8;("+e.rows+");("+e.cols+")t")});setTimeout(function(){h.fit()},2)},1);call_default_cmds(this);r=n;if(i.dropdown){s={term:n,sock:this}}if(i.detached){r.onKey(function(e){if(e.key===""&&(vars.events.keypressed.ctrl||vars.events.keypressed.shift||vars.events.keypressed.meta)){l()}})}if(!i.detached){window.xterm_argv={}}}}},0)}]:0,1,{sourceType:String(),cssPath:c,jsPath:c})})}}else{if(core.curModule("xterm",1)&&!i.dropdown){_(i.container_id,"socket_conn_parse_error")}else{console.warn(theme_language("socket_conn_parse_error"))}}},n=false,s={},o=function(e){if(session.server.data("terminal")==1){var t="-shell-port-",a="terminal-dd",s=function(e){plugins.messenger.post({type:e,icon:"fa2 fa2-terminal fa-lg fa-fw",id:"xtermErr",title:theme_language("xterm_error_title"),message:theme_language("xterm_error"),layout:1,displayMode:1,position:"bottomCenter",cancel:true,close:false,timeout:false,progressBar:false,buttons:plugins.messenger.toast.construct.button(theme_language("global_open").toUpperCase(),function(){get_pjax_content(v___location_prefix+"/xterm")})})};$(function(){var e=$("."+t+"container"),i=e.find('[data-output="true"]'),n=$("#"+a);e.find("."+t+"cmd").remove();if(n.length){n.empty()}else{i.replaceWith('
')}});$.ajax({type:"GET",url:session.server.data("webprefix")+"/xterm/",dataType:"text",error:function(){n=false;console.warn("Cannot load the terminal");setTimeout(function(){l();s("error")},1e3)},success:function(t){if(!session.status(t)){return}if(t){var o=t.match(/xterm_argv\s*=\s({.*})/);if(o&&o[0]&&o[1]){var r=JSON.parse(o[1]);i(r,{dropdown:true,container_id:a,detached:true,cmd:e})}else{n=false;console.warn("Cannot start the terminal");setTimeout(function(){l();s("warning")},1e3)}}else{n=false;console.warn("Cannot start the terminal");setTimeout(function(){l();s("warning")},1e3)}}})}},r=function(e){if(!n){n=true;o(e)}else{if(typeof s.term==="object"&&typeof s.term.focus==="function"){if(typeof e==="string"){if(e.startsWith("!")){e=e.replace(/^!/,"")}setTimeout(function(){s.sock.send(" "+e);setTimeout(function(){s.sock.send("\r")},420)},40)}setTimeout(function(){s.term.focus()},40)}}setTimeout(function(){c().css("bottom","0vh").addClass("opened")},20)},l=function(){c().css("bottom","100vh").removeClass("opened")},c=function(){return $("body").find(".-shell-port-")},_=function(e,t){if($("[data-fatal-error-text]").length){return}var a="
"+'

'+theme_language(t)+"

"+"
"+" "+''+'  '+""+theme_language("socket_conn_lost_try")+""+"";$(document.getElementById(e)).closest(".panel-body").html(a);$("#headln2c .favorites").hide()};return{new:i,reconnect:o,clean:a,open:r,close:l}}();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}},n=function(){if(!g()){$(".user-link.ported-console").addClass("hidden")}else{if(settings_show_terminal_link!==false||settings_show_terminal_link2!==false){$(".user-link.ported-console").removeClass("hidden")}}},s=function(){vars.shell.processing=0;$('.-shell-port- input[data-command="true"]').removeAttr("readonly")},o=function(e,t,a,i){return'"},r=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}if(!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();u();_(t);a.scrollTop(a[0].scrollHeight);setTimeout(function(){vars.shell.processing=0;vars.shell.history=0;t.removeAttr("readonly").focus()},100)},c=function(e){var t="TERM environment variable not set.\n";if(e==="
\n"+t+"
"||e.endsWith(t)){e=e.replace(t,"Cannot run interactive commands in this shell.\n")}return e},_=function(e){e.val("");e.focus()},d=function(e){var t=$("body").find(".-shell-port-"),a=e&&e.startsWith("!")?e.replace(/^!/,""):false,i=t.find("input"),n="data-shell-host",s=t.find(".-shell-port-pwd").attr("data-pwd"),o=t.find("["+n+"]"),l=o.attr(n);if($t_uri_cloudmin){var c=$('aside [name="sid"] option:selected');current_host_name=c.attr("title")||c.text();o.text(current_host_name)}else{o.text(l)}r(false);if(a){i.val(a);var _=$.Event("keydown");_.which=13;i.trigger(_)}t.css("bottom","0vh").addClass("opened");h();u();setTimeout(function(){if(!a){focus();i.focus()}},20)},f=function(){var e=$("body").find(".-shell-port-"),t="command-shell-editor-spinner";e.css("bottom","100vh").removeClass("opened");$("."+t).remove();h(true)},p=function(e){var t=$(".-shell-port-container .-shell-port-cmd"),a="invisible";if(e){t.addClass(a)}else{t.removeClass(a)}},u=function(){if(core.moduleAvailable("shell")==1&&session.server.data("terminal")==="0"){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")}},g=function(){var e=t();if(core.moduleAvailable("shell")==1||e||session.server.data("terminal")==1){return 1}else{return 0}},m=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 n=e&&e.endsWith("/")?e.slice(0,-1):e,s=n.split("/").pop();if(!s){s="/";e="/"}if(get_access_level()==2){e=get_user_home()+e}if(e===i){s="~"}e=Convert.htmlEscape(e);a.attr("data-pwd",e).attr("title",e).text(s)}},h=function(n){var s=$(document.body).find(".-shell-port-"),g='[data-command="true"]',m=s.find("input"+g+""),h=s.find("div[data-output]"),b=s.find(".-shell-port-container"),y=s.data("autocomplete"),x=$(window),k=".plugin-shell";if(n){x.off("keydown"+k+"");x.off("keyup"+k+"");b.off("click"+k+"");return}x.on("keydown"+k+"",function(t){var a=this,i=e(),n=$(".modal-shell-config:visible").length,o=String.fromCharCode(t.which).toLowerCase();if(t[settings_hotkey_toggle_modifier]&&o==settings_hotkey_shell2&&theme_shortcuts_modifier_unique(t)){t.preventDefault();if(i){f()}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(o==="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}var r=platform.detect()==="mac",l=r?t.metaKey:t.ctrlKey,c=r?t.ctrlKey:t.metaKey;if(this.searching||o==="r"&&l&&!t.shiftKey&&!t.altKey&&!c){t.preventDefault();if(typeof a.shell_request==="object"&&a.shell_request.state()==="pending"){return}var _=$(".-shell-port-type"),d=$('.-shell-port- input[data-command="true"]'),p="reverse-i-search",g="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(o==="c"){cancel_search(1);return}if(o!=="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 n=this.searching_shell_str_replaced.find("span["+g+"]"),s=n.text();var r=localStorage.getItem(v___server_hostname+"-"+"shell_command_last");if(!a.pre_searched&&r){if(r==="undefined"){r=String()}a.pre_searched=r}if(!s&&a.pre_searched){n.text(a.pre_searched);var l=run_search(a.pre_searched);update_search(l,0);return}if(!s||!e.length){failed_search();return}else{success_search()}if(e){d.val(Convert.htmlUnEscape(e[this.used_index]))}u()},failed_search=function(){var e=a.searching_shell_str_replaced.html();if(!e.includes("failed reverse")){a.searching_shell_str_replaced.html(e.replace(p,"failed "+p+""))}u();var t=new Audio("data:audio/ogg; codecs=opus;base64,T2dnUwACAAAAAAAAAAArS957AAAAAAff6O0BHgF2b3JiaXMAAAAAAkSsAAAAAAAAAO4CAAAAAAC4AU9nZ1MAAAAAAAAAAAAAK0veewEAAABiry0KEC3//////////////////3EDdm9yYmlzHQAAAFhpcGguT3JnIGxpYlZvcmJpcyBJIDIwMDcwNjIyAAAAAAEFdm9yYmlzK0JDVgEACAAAADFMIMWA0JBVAAAQAABgJCkOk2ZJKaWUoSh5mJRISSmllMUwiZiUicUYY4wxxhhjjDHGGGOMIDRkFQAABACAKAmOo+ZJas45ZxgnjnKgOWlOOKcgB4pR4DkJwvUmY26mtKZrbs4pJQgNWQUAAAIAQEghhRRSSCGFFGKIIYYYYoghhxxyyCGnnHIKKqigggoyyCCDTDLppJNOOumoo4466ii00EILLbTSSkwx1VZjrr0GXXxzzjnnnHPOOeecc84JQkNWAQAgAAAEQgYZZBBCCCGFFFKIKaaYcgoyyIDQkFUAACAAgAAAAABHkRRJsRTLsRzN0SRP8ixREzXRM0VTVE1VVVVVdV1XdmXXdnXXdn1ZmIVbuH1ZuIVb2IVd94VhGIZhGIZhGIZh+H3f933f930gNGQVACABAKAjOZbjKaIiGqLiOaIDhIasAgBkAAAEACAJkiIpkqNJpmZqrmmbtmirtm3LsizLsgyEhqwCAAABAAQAAAAAAKBpmqZpmqZpmqZpmqZpmqZpmqZpmmZZlmVZlmVZlmVZlmVZlmVZlmVZlmVZlmVZlmVZlmVZlmVZlmVZQGjIKgBAAgBAx3Ecx3EkRVIkx3IsBwgNWQUAyAAACABAUizFcjRHczTHczzHczxHdETJlEzN9EwPCA1ZBQAAAgAIAAAAAABAMRzFcRzJ0SRPUi3TcjVXcz3Xc03XdV1XVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVYHQkFUAAAQAACGdZpZqgAgzkGEgNGQVAIAAAAAYoQhDDAgNWQUAAAQAAIih5CCa0JrzzTkOmuWgqRSb08GJVJsnuamYm3POOeecbM4Z45xzzinKmcWgmdCac85JDJqloJnQmnPOeRKbB62p0ppzzhnnnA7GGWGcc85p0poHqdlYm3POWdCa5qi5FJtzzomUmye1uVSbc84555xzzjnnnHPOqV6czsE54Zxzzonam2u5CV2cc875ZJzuzQnhnHPOOeecc84555xzzglCQ1YBAEAAAARh2BjGnYIgfY4GYhQhpiGTHnSPDpOgMcgppB6NjkZKqYNQUhknpXSC0JBVAAAgAACEEFJIIYUUUkghhRRSSCGGGGKIIaeccgoqqKSSiirKKLPMMssss8wyy6zDzjrrsMMQQwwxtNJKLDXVVmONteaec645SGultdZaK6WUUkoppSA0ZBUAAAIAQCBkkEEGGYUUUkghhphyyimnoIIKCA1ZBQAAAgAIAAAA8CTPER3RER3RER3RER3RER3P8RxREiVREiXRMi1TMz1VVFVXdm1Zl3Xbt4Vd2HXf133f141fF4ZlWZZlWZZlWZZlWZZlWZZlCUJDVgEAIAAAAEIIIYQUUkghhZRijDHHnINOQgmB0JBVAAAgAIAAAAAAR3EUx5EcyZEkS7IkTdIszfI0T/M00RNFUTRNUxVd0RV10xZlUzZd0zVl01Vl1XZl2bZlW7d9WbZ93/d93/d93/d93/d939d1IDRkFQAgAQCgIzmSIimSIjmO40iSBISGrAIAZAAABACgKI7iOI4jSZIkWZImeZZniZqpmZ7pqaIKhIasAgAAAQAEAAAAAACgaIqnmIqniIrniI4oiZZpiZqquaJsyq7ruq7ruq7ruq7ruq7ruq7ruq7ruq7ruq7ruq7ruq7ruq7rukBoyCoAQAIAQEdyJEdyJEVSJEVyJAcIDVkFAMgAAAgAwDEcQ1Ikx7IsTfM0T/M00RM90TM9VXRFFwgNWQUAAAIACAAAAAAAwJAMS7EczdEkUVIt1VI11VItVVQ9VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV1TRN0zSB0JCVAAAZAAACKcWahFCSQU5K7EVpxiAHrQblKYQYk9iL6ZhCyFFQKmQMGeRAydQxhhDzYmOnFELMi/Glc4xBL8a4UkIowQhCQ1YEAFEAAAZJIkkkSfI0okj0JM0jijwRgCR6PI/nSZ7I83geAEkUeR7Pk0SR5/E8AQAAAQ4AAAEWQqEhKwKAOAEAiyR5HknyPJLkeTRNFCGKkqaJIs8zTZ5mikxTVaGqkqaJIs8zTZonmkxTVaGqniiqKlV1XarpumTbtmHLniiqKlV1XabqumzZtiHbAAAAJE9TTZpmmjTNNImiakJVJc0zVZpmmjTNNImiqUJVPVN0XabpukzTdbmuLEOWPdF0XaapukzTdbmuLEOWAQAASJ6nqjTNNGmaaRJFU4VqSp6nqjTNNGmaaRJFVYWpeqbpukzTdZmm63JlWYYte6bpukzTdZmm65JdWYYsAwAA0EzTlomi7BJF12WargvX1UxTtomiKxNF12WargvXFVXVlqmmLVNVWea6sgxZFlVVtpmqbFNVWea6sgxZBgAAAAAAAAAAgKiqtk1VZZlqyjLXlWXIsqiqtk1VZZmpyjLXtWXIsgAAgAEHAIAAE8pAoSErAYAoAACH4liWpokix7EsTRNNjmNZmmaKJEnTPM80oVmeZ5rQNFFUVWiaKKoqAAACAAAKHAAAAmzQlFgcoNCQlQBASACAw3EsS9M8z/NEUTRNk+NYlueJoiiapmmqKsexLM8TRVE0TdNUVZalaZ4niqJomqqqqtA0zxNFUTRNVVVVaJoomqZpqqqqui40TRRN0zRVVVVdF5rmeaJomqrquq4LPE8UTVNVXdd1AQAAAAAAAAAAAAAAAAAAAAAEAAAcOAAABBhBJxlVFmGjCRcegEJDVgQAUQAAgDGIMcWYUQpCKSU0SkEJJZQKQmmppJRJSK211jIpqbXWWiWltJZay6Ck1lprmYTWWmutAACwAwcAsAMLodCQlQBAHgAAgoxSjDnnHDVGKcacc44aoxRjzjlHlVLKOecgpJQqxZxzDlJKGXPOOecopYw555xzlFLnnHPOOUqplM455xylVErnnHOOUiolY845JwAAqMABACDARpHNCUaCCg1ZCQCkAgAYHMeyPM/zTNE0LUnSNFEURdNUVUuSNE0UTVE1VZVlaZoomqaqui5N0zRRNE1VdV2q6nmmqaqu67pUV/RMU1VdV5YBAAAAAAAAAAAAAQDgCQ4AQAU2rI5wUjQWWGjISgAgAwAAMQYhZAxCyBiEFEIIKaUQEgAAMOAAABBgQhkoNGQlAJAKAAAYo5RzzklJpUKIMecglNJShRBjzkEopaWoMcYglJJSa1FjjEEoJaXWomshlJJSSq1F10IoJaXWWotSqlRKaq3FGKVUqZTWWosxSqlzSq3FGGOUUveUWoux1iildDLGGGOtzTnnZIwxxloLAEBocAAAO7BhdYSTorHAQkNWAgB5AAAIQkoxxhhjECGlGGPMMYeQUowxxhhUijHGHGMOQsgYY4wxByFkjDHnnIMQMsYYY85BCJ1zjjHnIITQOceYcxBC55xjzDkIoXOMMeacAACgAgcAgAAbRTYnGAkqNGQlABAOAAAYw5hzjDkGnYQKIecgdA5CKqlUCDkHoXMQSkmpeA46KSGUUkoqxXMQSgmhlJRaKy6GUkoopaTUUpExhFJKKSWl1ooxpoSQUkqptVaMMaGEVFJKKbZijI2lpNRaa60VY2wsJZXWWmutGGOMaym1FmOsxRhjXEuppRhrLMYY43tqLcZYYzHGGJ9baimmXAsAMHlwAIBKsHGGlaSzwtHgQkNWAgC5AQAIQkoxxphjzjnnnHPOSaUYc8455yCEEEIIIZRKMeacc85BByGEEEIoGXPOOQchhBBCCCGEUFLqmHMOQgghhBBCCCGl1DnnIIQQQgghhBBCSqlzzkEIIYQQQgghhJRSCCGEEEIIIYQQQggppZRCCCGEEEIIIZQSUkophRBCCCWEEkoIJaSUUgohhBBCKaWEUkJJKaUUQgillFBKKaGUkFJKKaUQQiillFBKKSWllFJKJZRSSikllFBKSimllEoooZRQSimllJRSSimVUkopJZRSSgkppZRSSqmUUkoppZRSUkoppZRSKaWUUkoppaSUUkoppVJKKaWUEkpJKaWUUkqllFBKKaWUUlJKKaWUSgqllFJKKaUAAKADBwCAACMqLcROM648AkcUMkxAhYasBABSAQAAQiillFJKKTWMUUoppZRSihyklFJKKaWUUkoppZRSSimVUkoppZRSSimllFJKKaWUUkoppZRSSimllFJKKaWUUkoppZRSSimllFJKKaWUUkoppZRSSimllFJKKaWUUkoppZRSSimllFJKAcDdFw6APhM2rI5wUjQWWGjISgAgFQAAMIYxxphyzjmllHPOOQadlEgp5yB0TkopPYQQQgidhJR6ByGEEEIpKfUYQyghlJRS67GGTjoIpbTUaw8hhJRaaqn3HjKoKKWSUu89tVBSainG3ntLJbPSWmu9595LKinG2nrvObeSUkwtFgBgEuEAgLhgw+oIJ0VjgYWGrAIAYgAACEMMQkgppZRSSinGGGOMMcYYY4wxxhhjjDHGGGOMMQEAgAkOAAABVrArs7Rqo7ipk7zog8AndMRmZMilVMzkRNAjNdRiJdihFdzgBWChISsBADIAAMRRrDXGXitiGISSaiwNQYxBibllxijlJObWKaWUk1hTyJRSzFmKJXRMKUYpphJCxpSkGGOMKXTSWs49t1RKCwAAgCAAwECEzAQCBVBgIAMADhASpACAwgJDx3AREJBLyCgwKBwTzkmnDQBAECIzRCJiMUhMqAaKiukAYHGBIR8AMjQ20i4uoMsAF3Rx14EQghCEIBYHUEACDk644Yk3POEGJ+gUlToQAAAAAAAIAHgAAEg2gIhoZuY4Ojw+QEJERkhKTE5QUlQEAAAAAAAQAD4AAJIVICKamTmODo8PkBCREZISkxOUFJUAAEAAAQAAAAAQQAACAgIAAAAAAAEAAAACAk9nZ1MAAEAUAAAAAAAAK0veewIAAABnj+O9HJeVV1dTVZqZlJWTVZOLl//3WFxXYJeV//8Y/+Tc/UxIYKVFdYLOWPcLKpEsrrEHETnXiqysLLNdS6y95/ef+7Vi79Z9zVZ919e44pxH0T+fHGONcSbr+Qza425fEvs1zysffUT9+zQaHgrT7V/01BzsuyrXpCXz0qMP4mSLYZ2iYZT7dVnREnYkX1fr+76Ya2rOIWxZqt/+8fu7dPBeNIMvH50Ln/UwOVyC7df/vwOSxAYAnB1ByNXUFeZiWLQlkZiQm/UrEE59c0TW7pJx5T1in2f5ufWtNeqfPh5UhKJ5rdkW3euzR5Bnxl6ZzVEj9x8jle81vvdbX+QF7AwF9aGXl0vbqWO385cr/4ltd2sspXI3JZbe9d13usNKvuGcrs55V9wupuJlY2SjF3pHn3vGm7VOUVPVZ8767T912a/rarz46AM0sASMAUWc62z2vGvAFJAwodfkUjqDTLGzVPSOi9SKWYilemD7LM7PZDfiZ1+7Wd9jc3HC0/tMv7uMv+Oc0Otg3fEj4k2cmQf4d5xhlz5+lH9zf9pbh576EAJ09fQ8F1hhUuCwmTShJhOPShKBifF//C2oGLikd4xiSI4XPjMvcC/fz6+Y/NSLZJ949nOVksu7IHcbrNCJ7jqvFvahjonXr/Z5SS6ZyX96/29uk57eKQOU8TwkAAINXFDOfChOgCQRgSE25x89VUuxy5tRsMqCWWx3Cft8rdllSMbllX0bvbfFfosLI3sPree1B0v9TTQ7+jL2841/MKsdSr507La/nkbdBYzxfDJhDtLNyW4bkMIJJCCnyDDlv/RQX4SoeaMobphUZvcB8vmn/K3t5z2X7sj+XX1JmOxl07wOHVdzgCU7/dclLZ806G8sziRsKGVPB9v+1wbZmgGc/TBJJAABVw8riiaxOplhpajhMd+fXbRlhCYzzmLvec4vr6tsmj35n+/XQzM352aNu+e0RpP7tawxRql5rht79+81u/Jz/vuUY01kENkbGLKS5UTaS6Va3/++pPF1Xr9O0bz3GvvHouGXQ5J7zb2GKsn9v9VK4nl64fFb0yekKdnWf8P31ynuiHxEwzj+eyudorVr7ed53cwB1A09yjNcLxdb7GCfM+pYEFodXu7nmv79yoNZu7rU36bw6+1r5r37+9mw9dentyvZd5i+WLfGXe/fx7WbEbTu+bNikUDTOz9t12eXvXHf3S0Xr56ufnpbeuS7LSqIHUseattE6vKT8vcDl399cvnIjOLhZVX8/P795f31Ydb/J3H8e3HM7Z9u9TZq58odu57+hutTjjvoDZcwBEa9MNiNz/7Ix0ic6kNwyIbxR20/4uzp+JHIcej6xV4Zo82535pzx/65rWuPZmp2j8yj0ryPj0hXwFUf7Oaz8vPKeS+/OGuFJMOpeO6rx59Vqw4/lVTbffsixD6Gq7eXQ/9X177EP51Hm2rPIlr3q9Ztc7XS3v9sDrHm5/y1lv4Me6165m8OO9NwP87y/acOWh0LABRaRZtYF/+L4LqLWeASZv8aDUXgrdeoqGxf7Vno0uhKTrPz9j7HfK/Rc32P++ftHOO2Wr5iTPb/qNyYvXJk7Ht8nn7jrVlkWK/arnPYU6Lw8PXlE5GdX/MeNaf/C7spMYwCI3LH0KN+tyzb/ancv1y/ePfoOTkXF4g1Z1dM/58v7/0OXeG3l+819X0kMCo+t//wh0kAtGH1IxciZPnRX18fVrpcoMc+jYeed+43PgCN5kLMzu9nxvpJM2dhFiOLa/ZsHk1sWJHd0ytwHSWpl52utUZc3z12TquTYTTviwy6tvIrpesF9lQpoj4Mt5D16Y9/92pXBjZ0ee92bmE7m5du1YT+1oa76ndJvEL6vFN1IbLTCv6+X9/JiivLYm7vHrftvL5+PgEA/EX1IZeObBdctRf12FzJau7WCJVw0kTZprqtCDKop3ifxDvfiaVfd5377OHy3v0Us1Xe/NvK4uf/jzjn0hjvvmoeKtnUjLdPQvCyiDNm8fvLrbUmAARScQ7CfBpJDZp7VbEnzO86Mojtrl5X3zU9Qugxe91zvP1KiJVfZ3+4Z2M4V2aP5hxTWJlxW5+59qYrtB923ztvflqf2YHcepBwsXLILn65YTJ0C+o/yav4U49aXvSnD/c1RI/AF0/dvx7auZM39VHYvumRHtxFN/vf36FKN8V36azKWplP9G3dxdXsSCETskQDAORBCZ0rznlH2jn6poDkikd7BYS72r9VFu2OaDLXyD/dfc/NRuuKa7vrZUSNbFU7W3GO+PWXzZ7H5hGZJLBeLfnHPbzAzFrXoN5Zq0y8QOEdlO1f9O51qhOBuPu+R2rlVnTvoH9IvyKOZnsuvkf87oHOtZ06/69D8W2sfnzveExRd36D3e3McN0JKQC0SXUmMSN87QvKw0LDr6uiPFezdj11Es/zLrHGdGIh1vdntezxaOw+Vv99jH3/bKuv1Tr4QDxlaSYR1RZ7/m69ptWIVr9HjiDDoPnSzh6NX9J5t1CmZ1x/CKvTNa5hCh8Wt3m+iR7ulbabrz8lOa9txqPm1L2dXPwvVOLJd/r2Wnqn1tU3/ex66lu3/s/L9znGc9teLgAAcufkZfE73M4sm1rDr3r+1pqBbl7/dYjrNtas5Dilf+638lzfX93+/D++TR+1zYv9cP7wNXu01LO3Yk+vV1/kmO157N4A3DzFdRcrJfPaAADAj3KvHMeMrLq8OO/Cm4Vm8u+7rXmlh8Sh97fy44euqzcHY/m4mH1tO3/81OsZudgez3e4PWWaQ1tb0wQRpy+6h1NXOTXbrXDtT1leSxuzbyXoul7f15/9fb1752X7xlNtwlw6x8fj8Ls84rfn1sWci5vhsfl+t/PtoXtdOgk3Om+XwMpd3lP7zs2691IP8JBRjNHwPMX8aJPVGd97Z8+RzO7/+9NAhqjpHMUzjtZO8h3O+K1ecoplrYpWl/V83WH2Pjvu2O5uubrOjZvOca73h6q4zq/z6yuNzXzynM7Xw/5Q3cbV/u+ZQh18pohPyJJyW+/uwGAurL0ssIuszAjUH+IoRiksphmNYqkrMorVvZd60ZTVEpbaRm51aS2ap37ueWd6UVs8hPU/ZTJZayFMPRrqlxKsBCABqrV9DFWbsTOFKDA3J6+Hslbecp/eng26l/cby43G4qRpIJdJZzDd7wwY3IEk+od/a/1hdbszvan+cn8JwGvomufx7p7NJUNXTlzp3zQXXaqWOhQfdCnB23pzyWgmZ7hMfN6AcQb2MwavchM4AHQ1r50Se44/Hsa8avmatYGCiLYqyFHgt/zd94qtLNUoghdG8aftHPetsqKvrQOmUwt8mZzyoO9xoplpbgyrXzjvh2fO27KjkptUmXkp78XeDfnYzcPEzwCEHV9/enrUVLhcSdgx5WuePT1FuCNeafR41ldr3hdCCbwpxVIJkZv2rvtSKp61qSkn8WK99H0Xw9T5xf6dMaul7VsaYlNJ6ZoT5pZnJ3b029bX8UpP0vu5x79fAZQpX/9k270+CFwYm4A/fvHs2YkMgTLgrfZWzL4geEMG9UahK891+aRnUhIWqpuO6ys+8OV+7G9LjH3Ztrv4TSa1SoyTTpqaCeM3sSX+dM+wRVZsm6dHAqQxf/DysHM45sDJFa8L+qMfHuOKSwTwX/FeI90L9MSHqEkKsy5ylhvYlPlnZquC3V3/OpfO+/m/Ph8l8Zwy/hZZbpv7fS4f2o3147IRS0lSfvE+L0EeTYx8L2ciPvS8AZxRX//xhnx66HvCjKu+9nuk3FzYDvl+9e67/iZWq2K1ucYaaz2v+xjn+VuuVTdltEkpf8fQmOK0V1ypeCWrGlPh1fdcP/xzv/x083bdX7mmxV9KE1Uvq2LnU1+MW/+f3a3972857cnp+eyNTlrsduzq5ylZP7ef/vfmT/t6esfNLO6R6euW/p7eof2zT49tc+mXbl3hvQKkUV/7Dnv7cfDVrTbpq98GeflYEd915pMZ50crWMG9NmmHte+N2PEJMZ5tK1Grc3qufNJzNdNee/Yb8VVQZIOxdS3YzncMMXJ/GRTSf+/96gzTIvfLxu/Z1Q9Vz6U3eql47z8t32Qmg7S/nUYcrL08VMzWEuldnpx35OvoOUfHt/7Y2vatI1unvs6tU6ddJXzL3N7dCzpG3Mz1S8ABUDf97feQvc3D8FbD55dw08SH0K/bzSMFiBjeauj81yFyXU/1tdeOGPb++u2yp3ld+sAbuaL11OxgaQLmrt6AuvQCMHquK0mxhR2bRJIAzu/tCPlZ4V4xjQ5WF88td97erBgaq0GP+2gpiDdm41R7c9X5FtrZ0q+Wfao9CcY4f+tQbLu6k9IkiWUwSa9Vxav8Px+HbVOnzPXxS1dHxscP5uX2YXO5XvamuzVPd3KvrllzXYnD9aN260vlcibOvy1mujgzjand6qpaRiLrS6WLSq/lxW8T/cNCAmBh6T/DkUHMOe85evrYKWz3z9WsX79c4ppaPvVEFnvt+5CdkcXIZFpk/fq6f08TpqyDHMz9q0xXl3Vc53o0PvnpnIsuKbT3i6y2yh81v533U78uG6ZPTEbGZpT9IQnjeK3XyopF/eJf2nAuFvd9FRZtO9+UxVQCK+z+nCD3CePyW+IM35aGnn+0W/yWuFynSXuo8XtssfSC+l/1PzNd2kzCfgZWMVk/LD1e8euHe4jclkz+bEFpERv78XepH3Cbit8XMdm07dP8T2QczzsHLpJ+Kz5tzLmTb9Eqhizfx+VzAB6eOxbm+mt2+r3Ihb2/Ii+kyi34F5zNp2v+MDgqdoGxnxFfgew1c/bvT++jTVt9Ul757I/Ur/L1Gc3z1u8CfDZVwrUyMjK/XKB4Q21PlyYttwIJAH4V3Eh5qV440zVkyXLGuwoOK3dhH/hDL+uUDbf/ydnuo7eMW675bJxuP59ZebtEmgYvMM5fN3MkVNfUG4DnbQDOOaMmxHZyEQAAGNWWw9TaU9go20s5zr3/B4I4bQctWRG951dK5aNP8LU0z8bIgB09k6p5JBPUjqDY1KwxVp4+LYCHazhrfHjfx1kV54nPzvWKs9SmRcjqsMZbhPouSphMdumV42pkYb/vt5isZ7qoFFaPUk8vSmB68axdvNNVHo4cuF+brNdtbxk2F7dG6aUnsm3UdvlcJmuD825wKvVMfd7Xy+eSc3+pv5/7c4vKy33u0+/fNGHBdJx9tl0sPu8T+79/DkEum0XWJ0eMvryPxfnfDSiWYXQ/L9DE+fkmuoai7InztpFbl5ds813gv9cfZ35x9s9k++zfJe39h+8yQHnQnNn9QHx2htsxffyx4DUyIzW/CeXUpZx/+kE5FXTJwv39Ur2Nxbtl1HLGGxoiietr7YICeHNWvstOd03plLV6tGQXP7Ct+lX21wvsWuapzvnc99/unoY4kQD5/+2egDAN0AOw83322WeigBAjZUUNi3yffd5nMnqGh1/cCvW/zYsF9nlH8N9zn+gBpk1z8r68KGO8e9YMvTvJijVTFzwBAE9nZ1MABAcYAAAAAAAAK0veewMAAAD63TjdAv/mPjWE51OfDSVdk9Eu11E1xM/X++JzOgLu0t2GOOH1n1Ws15//P+eIvXbQx7tjr+el59oLl11Wgw2g4nryAWpMvErF6MYxEgAAAEwJPe9Xlt/pk++eZK/lHE9KfcTQ6+D852DtPkt3soWb7tNULn++n+/rOr38+vT5burg9vnpWHko+qXJvaGl+9vP93o7FLq5ua6Rw/j9PtDT+7w/77Pvz31xvP6Sy5d3J5yrcSkf0LVnPSvpkkuZpHTZwWTtI/nhR95ZHU1YL+UqYkfz8Zvvz6VUl+ulY8GcfSaul+vlPLXrvHz7t2n66YGpX24Xx50YKRUtDrd/70H9f49u1ktNvfQ+0xlnlPu359vTPX0iAyC13P+/f2etbH3lS5uk/92ltLqWdVkj4/patxUt4/j4XOAfSxhbsS8e/b/jm/zha1MBM8nfAr8vym/++MeV5himtKKsn853EtfX16WAXl97b76q5Mgun32iLMqAaaQvvrIAnpHmkqVjWCz0tg7H1F9e7tzNNBkZ9u37PaZf7OVnnsmKI/AuP7odx7ulcTweA84yr8uzDz3LXO6dyTPnqS2yd0bu34a/ns5WAniVgWZ5zWXcp425/7a1pQIA3pSGHse7tGdraQCoPAFuBOXJC0/88nTUywU=");t.play()},success_search=function(){var e=a.searching_shell_str_replaced.html();a.searching_shell_str_replaced.html(e.replace("failed "+p+"",p));u()},cancel_search=function(e){_.html(a.searching_shell_str);a.searching_shell_str=0;a.searching_shell_str_replaced=0;a.searching=0;if(e){d.val(String())}u()};if(!this.searching_shell_str){this.searching_shell_str=_.html()}if(!this.searching_shell_str_replaced){this.searching_shell_str_replaced=_.html("("+p+")`': ");u()}else{var x=this.searching_shell_str_replaced.find("span["+g+"]"),k=x.text();if(t.key&&t.key.length===1){var w=t.ctrlKey||t.altKey||t.metaKey?String():t.key,A=k+w;A&&(a.pre_searched=A,localStorage.setItem(v___server_hostname+"-"+"shell_command_last",A));x.text(A);var C=run_search(x.text());update_search(C,w)}}if(t.keyCode===8){var S=this.searching_shell_str_replaced.find("span["+g+"]"),I=S.text(),T=I.slice(0,-1);I&&(a.pre_searched=T,localStorage.setItem(v___server_hostname+"-"+"shell_command_last",A));S.text(T);var V=run_search(S.text());update_search(V,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&&!n){f();return}if(i&&t.keyCode===38){t.preventDefault()}if(i&&t.keyCode===9&&m.is(":focus")){t.preventDefault();if(!y){return}var E=":"+":"+":"+":",j=m.val().trim().split(/\s+(?!-)/),O=j.length,z=j[0]&&j[0].indexOf("-")===-1?0:1,M=j[1]&&j[1].indexOf(":")===-1?0:1,q=m.val().endsWith(" "),U=$.trim(j[0])==="service",Z=$.trim(j[0])==="systemctl",J=$.trim(j[0])&&$.trim(j[0]).startsWith("chown"),K=j.length===1&&m.val().length&&!z&&!q?"commands":U||Z?"services":J?"permissions":"lists";if(!$.trim(m.val()).length){return}var W=m.val(),R=s.find(".-shell-port-pwd"),D=R.attr("data-pwd");if(K==="services"){K=U?"service":"systemctl";if(K==="systemctl"&&j.length!==3){return}W=K=="service"?$.trim(j[1]):$.trim(j[2]);if($.trim(j[0])==="service"&&(j.length===2&&q||j.length===3)){if(j.length===3){W=E+$.trim(j[1])+E+$.trim(j[2])}else{W=E+$.trim(j[1])}}}if(J){if(O===1&&!q){m.val($.trim(j[0])+" ");return}if(!M||!$.trim(j[1])){K="users";W=$.trim(j[1])}else if(!q&&!j[2]){K="groups";W=$.trim($.trim(j[1]).split(":")[1])}else{K="lists";W=D+"/"+E+$.trim(j[2])}}if(K==="lists"&&!J){W=D+"/"+E+$.trim(j[1])+E+$.trim(j[0])+E+$.trim(j[2])}$.ajax({type:"POST",url:v___location_prefix+"/index.cgi?xhr-get_autocompletes=1&xhr-get_autocomplete_type="+K+"&xhr-get_autocomplete_string="+W+"",data:false,dataType:"json",success:function(e){var t=e.length;if(t===1){if(K==="service"||K==="systemctl"||K==="lists"){var a=$.trim(j[0]),i=$.trim(j[0])+" "+$.trim(j[1]);if(K==="lists"){if(a==="cd"&&e[0].endsWith("/")||a!=="cd"){if(a==="cd"||a==="cat"){m.val(a+" "+e[0])}else{if($.trim(j[2])){m.val(i+" "+e[0]+"")}else{m.val(a+" "+e[0]+"")}}}}else{if(a==="service"&&(j.length===2||j.length===3)){if(j.length===2){m.val(a+" "+e[0]+" ")}else if(j.length===3){m.val($.trim(j[0])+" "+$.trim(j[1])+" "+e[0])}}else if(a==="systemctl"&&j.length===3){m.val(a+" "+$.trim(j[1])+" "+e[0])}}}else{if(J){if(!M){m.val($.trim(j[0])+" "+e[0]+":")}else if(!q&&!j[2]){m.val($.trim(j[0])+" "+$.trim($.trim(j[1]).split(":")[0])+":"+e[0]+" ")}else{m.val($.trim(j[0])+" "+$.trim(j[1])+" "+e[0]+"")}}else{m.val(e[0]+" ")}}}else if(t>1){var n=""+v()+" "+Convert.htmlEscape(m.val())+""+"\n";h.find("pre").append(n);h.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"+k+"",function(n){var g=this,b=e(),y=$(".modal-shell-config:visible").length;if(b&&!y){var x=0,k=0,w=0,A=$(".form-control.sidebar-search"),C=t(),S=$('select[name="sid"]').val(),I=0;var T=a();if(!T){return}if(b||A.is(":focus")){if(n.keyCode===8){vars.shell.history=0}}if(b){x=$.trim(m.val());k=1;w=1}else{x=A.val();k=typeof A.val()!="undefined";w=0}if((w||k&&(!x.trim()||x.trim().startsWith("!")))&&(n.keyCode==38||n.keyCode==40)){n.preventDefault();n.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")),E=V?V.length:0;if(vars.shell.history===0&&!x&&n.keyCode==40){return}else if(vars.shell.history===0&&x&&n.keyCode==38){I=1;return}else{vars.shell.history=n.keyCode==40?++vars.shell.history:--vars.shell.history}if(vars.shell.history<0&&n.keyCode===38){vars.shell.history=E-1}else if(vars.shell.history>E){vars.shell.history=0}if(V&&V[vars.shell.history%E]){if(!$.isEmptyObject(V)&&(vars.shell.history==E&&n.keyCode===38||vars.shell.history==E&&n.keyCode===40||I)){if(b){m.val("").focus()}else{A.val("").focus()}vars.shell.history=0;return}if(b){var j=V[vars.shell.history%E].replace(/^!/,"");m.val(Convert.htmlUnEscape(j)).focus()}}return}else if(k&&x.trim().startsWith("!")&&n.keyCode==27){n.preventDefault();n.stopPropagation();A.val("").focus();return}if(k&&x.trim().startsWith("!")&&n.keyCode==13){A.addClass("_shell_form_");n.preventDefault();n.stopPropagation();if(core.moduleAvailable("shell")==1||C){m.val(x.trim().substring(1)).focus();d();var O=$.Event("keyup");O.keyCode=13;m.trigger(O)}}var z=s.find(".-shell-port-container"),M=s.find(".-shell-port-pwd"),q=M.attr("data-pwd"),U=$.trim(m.val()),Z=0,J=n.keyCode?n.keyCode:n.which,K=(n.altKey||n.ctrlKey)&&String.fromCharCode(n.which).toLowerCase()=="l";if(!m.is(":focus")&&!check_selected_text()){if(!n.ctrlKey&&!n.altKey&&!n.shiftKey&&!n.metaKey){m.val(m.val()+String.fromCharCode(n.which).toLowerCase())}m.focus()}if(U&&J===13||K){if(z.find("[data-searching]").length){return}if(core.moduleAvailable("shell")||C){if(vars.shell.processing===1){return}vars.shell.processing=1;if(U==="clear"||U==="reset"||U==="exit"||K){h.find("pre").html("");_(m);if(U=="exit"){f()}}if(U==="cd ~"){Z=U;U="cd "+M.attr("data-home")}var W=false;if(U==="cd /"){W="/"}if(U==="history -c"){localStorage.setItem(v___server_hostname+"-"+"shell_commands",JSON.stringify({}));var R=""+v()+" "+Convert.htmlEscape(U)+""+"\n";h.find("pre").append(R);_(m);z.scrollTop(z[0].scrollHeight);var D=o(T,C,null,q),P=new FormData($(D)[0]);$.ajax({type:"POST",url:T+"?fetch-content=1",data:P,dataType:"text",cache:false,contentType:false,processData:false,success:function(e){if(!session.status(e)){return}r(U);vars.shell.processing=0},error:function(e){}});return}else if($.trim(U).startsWith("history -d")){var N=U.split(" "),Q=N[2];if(Q&&Q.length&&Test.numeric(Q)){$.ajax({type:"POST",url:v___location_prefix+"/index.cgi/?xhr-shell-pop="+Q+"&xhr-shell-cms="+C+"&xhr-shell-cmsid="+S,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(Q)-1})))}r(U)},error:function(e){}})}_(m);vars.shell.processing=0;return}else if(U.startsWith("history")){_(m);var L=JSON.parse(localStorage.getItem(v___server_hostname+"-"+"shell_commands")),X=L?L.length:0,G=X?X.toString().length:0,R=""+v()+" "+Convert.htmlEscape(U)+""+"\n";$.each($(L),function(e,t){var a=e.toString().length,n="";for(i=0;i"+v()+" "+Convert.htmlEscape(m.val()),ae=B==="view"?1:0,ie=ae?"viewer":"editor";var ne=get_access_level();if(ne==2||ne==3){var se=new RegExp("^"+get_user_home(),"");q=q.replace(se,"");if(!q){q="/"}}if(Y.endsWith("/")||Y.includes("../")||F&&F[1].includes("/")&&!F[1].startsWith("/")){ee.append(te+" \nCan not open file "+ie+". Unsupported path expression.\n");l(_e,m,z);return}edit_file(F[1],q,[{call:"plugins.shell.toggle"},{call:"plugins.shell.done",params:[_e,m,z]},{call:"plugins.shell.close"}],ae,0,0,ae?1:0);ee.append(te+" \nRedirected for opening in internal file "+ie+". "+theme_spinner_small(undefined,"white command-shell-editor-spinner smaller2")+"\n");p(1);z.scrollTop(z[0].scrollHeight);r(U);return}if($.trim(U)==="clear"||$.trim(U)==="reset"||$.trim(U)==="exit"||K){vars.shell.processing=0;vars.shell.history=0;u();m.focus();!K&&r(U);return}var oe=o(T,C,U,q),re=new FormData($(oe)[0]);m.attr("readonly","true");var le=0,ce=0,_e=".-shell-port-cmd",de=".-shell-port-container",fe=false,pe=0;g.shell_request=$.ajax({xhr:function(){var e=new window.XMLHttpRequest;e.addEventListener("progress",function(e){var t=e.target.responseText;if(!session.status(t)){g.shell_request.abort();return}if(t&&t.length&&/[\x1B]/.test(t)){pe=1;g.shell_request.abort();return}t?ce++:false;if(ce>=1&&!le){if(t){$(_e).after("
");le++;$(de).addClass("progressing")}}else if(le){var a=extract_content(t,"
","
",1);if(a){a=a.replace(/<(b)[^>]*>[^<]*(<\/b>)/i,"");a=c(a);fe=a;$(_e).next("pre").replaceWith(a)}z.scrollTop(z[0].scrollHeight)}},false);return e},type:"POST",url:T+"?fetch-content=1",data:re,dataType:"text",cache:false,contentType:false,processData:false,complete:function(e){$(de).removeClass("progressing");var t=e.status;e=e.responseText;if(!session.status(e)){return}var a=$.trim(U)==="reboot",i=$.trim(U)==="shutdown -h now";if(pe||t!==200||get_access_level()!==3&&(a||i)){var n=theme_language("shell_aborted");if(a){n="The system is rebooting.."}else if(i){n="The system has been powered off!"}var s=t!==200?extract_content(fe,"
","
",0)+(g.shell_request_interrupted?"\n^C":String()):n;if(fe===false){s="Cannot establish connection to the host."}h.find("pre").append(""+v()+" "+Convert.htmlEscape(m.val())+" \n"+s+"\n");r(U);l(_e,m,z);return}var o=v(),_=$(e).find("pre").length?$(e).find("pre"):$(e).filter("pre"),d=_.html().replace(/>>/g,">"+o+""),f=$(e).find('input[name="previous"][type="hidden"]').map(function(){return Convert.htmlEscape($(this).val())}).get();localStorage.setItem(v___server_hostname+"-"+"shell_commands",JSON.stringify(f));var p=$(e).find('input[name="pwd"]').val();newPwd=p||q;d=c(d);if(!p){d+="\n"}h.find("pre").append(Z?d.replace(new RegExp(U,"g"),Z):d);M.text(W?W:newPwd==M.attr("data-home")?"~":newPwd.split("/").filter(function(e){return $.trim(e)}).slice(-1)[0]).attr("data-pwd",Convert.htmlEscape(W?W:newPwd)).attr("title",Convert.htmlEscape(W?W:newPwd));if(U==="cd .."&&newPwd==="/"){M.text("/")}l(_e,m,z)},error:function(e){}})}}}})},v=function(){return Convert.htmlEscape($(".-shell-port-type").text())};return{type:t,init:h,status:e,link:n,unlock:s,open:d,close:f,toggle:p,done:l,available:g,adjust:u,set:m}}();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=session.server.data("access-level"),i="right-side-tabs",n="body ."+i+"",s=""+i+"-fixed",o="data-slider-fixed";if(a!="0"){return}if(e){$(n+"-toggler").addClass("hidden");$(n).css("right","0px").addClass(s);if(settings_side_slider_enabled){session.server.data(o,"1")}}else{if(settings_side_slider_enabled){if(!t){$(n+"-toggler").removeClass("hidden opened").css("right","0")}else{$(n+"-toggler").removeClass("hidden").addClass("opened").css("right","300px")}}if(!t){$(n).css("right","-302px")}else{$(n).css("right","0px")}$(n).removeClass(s);session.server.data(o,"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",n="i.fa-bell",s="span.badge",o="hidden hidden-force",r=$("."+e+" .list-group-item:not(.no-notifications, .opacity-0_3)").length;plugins.favicon.set(r);if(r>0){$("."+e+"-"+i+" "+s+"").removeClass(o).text(r);$("#"+e+" ."+t+"").removeClass(o).text(r)}else{$("."+e+"-"+i+" "+s+"").addClass(o).text(0);$("#"+e+" ."+t+"").addClass(o).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),n=i.title,s=i.time,o=i.timestamp,r=i.message,l=i.readStatus,c=i.type,_=i.link;var d=s+"_"+n;if(c==="csf_deny"){d=s+"_"+n.replace(/\W/g,"")+r.replace(/\W/g,"")}$current_localData_notifications[d]=JSON.stringify({id:a,title:n,time:s,timestamp:o,message:r,readStatus:l,type:c,link:_});if($('.list-group-item[id="'+a+'"][data-type="'+c+'"]').length){$('.list-group-item[id="'+a+'"][data-type="'+c+'"] .list-group-item-heading small').text(dayjs.unix(s).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 n=JSON.parse(localStorage.getItem(v___server_hostname+"-"+"notifications_"+e+"_"+t));if(n){localStorage.setItem(v___server_hostname+"-"+"notifications_"+e+"_"+t,JSON.stringify({title:n.title,time:n.time,timestamp:n.timestamp,message:n.message,readStatus:a,type:n.type,link:n.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,n,s,o,r){var l=r&&(r.includes("http://")||r.includes("https://")||r.includes("ftp://")||r.includes("ftps://"))?' data-target="external"':"",c=l?"data-href":"href";$(".right-side-tabs .list-group").prepend('
'+t+" "+dayjs.unix(a).fromNow()+"
"+n+"
");$(".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"},vars.navigation.animation_speed,function(){})};if($(".right-side-tabs .list-group-item").length===0){if(e){setTimeout(function(){a()},2)}else{a()}}setTimeout(function(){display_badges()},vars.navigation.animation_speed+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(session.server.data("webprefix")&&!t.link.includes("!edit")&&!t.link.includes("!view")){t.link=session.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(){var e=this;if(e.running){return}e.running=1;if($("body .modal:not(.user_motd_data).in").length){return}if(!t){var t=session.server.data("webprefix")}if(v___user_level==0){var a=$("body").find("#system-status"),i=a.length?a[0]:0;var n=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"')+"",n=localStorage.getItem(v___server_hostname+"-sysinfo_package_message");var s=vars.local_storage?String():" hidden",o=$(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(n())}var s=$("#system-status, #extended_sysinfo-1"),o=$(".right-side-tabs-dismiss .fa-reload, ._sync_sysinfo_.fa-reload");o.addClass("fa-spin-fast cursor-na");s.addClass("updating");$.ajax({type:"GET",url:t+"/index.cgi/?xhr-info=1",dataType:"json",complete:function(){e.running=0;o.removeClass("fa-spin-fast cursor-na");s.removeClass("updating")},success:function(e){$.each(e[0],function(e,a){var n=$('#right-side-tabs [data-data="'+e+'"]'),s="hidden hidden-force";n=n.add(n.prev("br"));n=n.add(n.prev("strong"));if(a!=null){n.removeClass(s)}else{n.addClass(s)}if(e=="cpu_percent"||e=="mem_percent"||e=="virt_percent"||e=="disk_percent"){if(Test.numeric(a)){localStorage.setItem(v___server_hostname+"-"+"sysinfo_"+e+"_stats",a)}else{localStorage.setItem(v___server_hostname+"-"+"sysinfo_"+e+"_stats","")}}if(i){$(i).find('span[data-id="sysinfo_'+e+'"]').html(a);if(e=="local_time"||e=="uptime"||e=="proc"){var o=$(i).find('span[data-id="sysinfo_'+e+'"]'),r=o.find("a").length?o.find("a"):o.find("span"),l=r,c=$(i).find('span[data-id="sysinfo_'+e+'"]').text();if(e=="local_time"){snippets.datetime.tictac(1)}else{l&&l.length&&o.html(l.html(c))}}page_sysinfo_sensor_update_label();if($(i).find('.piechart[data-charts="sysinfo_'+e+'"]').length){var _=$("body").find('.piechart[data-charts="sysinfo_'+e+'"]');if(_.length&&!isNaN(parseInt(a))){_.data("easyPieChart")&&_.data("easyPieChart").update(a)}}if(e=="cpu_percent"||e=="mem_percent"||e=="virt_percent"||e=="disk_percent"){localStorage.setItem(v___server_hostname+"-"+"sysinfo_"+e+"_seen",a)}$(i).find(".modal-backdrop").remove()}$__id__=dayjs().unix();if(e=="cpu_percent"||e=="mem_percent"||e=="virt_percent"||e=="disk_percent"||e=="csf_title"||e=="csf_remote_version"||e=="authentic_remote_version"||e=="package_message"){if(!localStorage.getItem(v___server_hostname+"-"+"sysinfo_"+e)){localStorage.setItem(v___server_hostname+"-"+"sysinfo_"+e,a)}}else{if(!a||a==null||a==NaN){localStorage.setItem(v___server_hostname+"-"+"sysinfo_"+e,"")}else{localStorage.setItem(v___server_hostname+"-"+"sysinfo_"+e,a)}}if(!localStorage.getItem(v___server_hostname+"-"+"sysinfo_package_message_initial")){localStorage.setItem(v___server_hostname+"-"+"sysinfo_package_message_initial",1)}if(e=="authentic_theme_version"){if(!localStorage.getItem(v___server_hostname+"-"+"sysinfo_theme_current_version")&&a){var d=$.trim(a),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(e=="csf_data"){if(!localStorage.getItem(v___server_hostname+"-"+"sysinfo_csf_current_version")&&a&&a.match(/>\s*([\d\.]+)\s*|( )+<\//)){localStorage.setItem(v___server_hostname+"-"+"sysinfo_csf_current_version",a.match(/>\s*([\d\.]+)\s*|( )+<\//)[1])}}if(e=="csf_title"||e=="csf_data"||e=="csf_remote_version"||e=="authentic_remote_version"||e=="authentic_theme_version"||e=="package_message"){if(e==="package_message"){if(!core.curModuleFile("package-updates","update.cgi")){if((localStorage.getItem(v___server_hostname+"-"+"sysinfo_"+e)!=a||localStorage.getItem(v___server_hostname+"-"+"sysinfo_package_message_initial")==1)&&a&&a.indexOf("badge-danger")>-1){var p=theme_language("notifications_packages_updates"),u=$(a).html().replace(/badge-danger/g,"badge-success"),g=t+"/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:e,link:g}));plugins.slider.notifications.dismiss("package_message");localStorage.setItem(v___server_hostname+"-"+"sysinfo_"+e,a);localStorage.setItem(v___server_hostname+"-"+"sysinfo_package_message_initial",0);notifications(p,u,e,g)}else if(e==="package_message"){localStorage.setItem(v___server_hostname+"-"+"sysinfo_"+e,a)}if(!$(a).find("i.badge:first-child").length){plugins.slider.notifications.dismiss("package_message")}}}if(e=="authentic_remote_version"&&settings_sysinfo_theme_updates){var m="sysinfo_theme_current_version",h="sysinfo_"+e+"",v=localStorage.getItem(v___server_hostname+"-"+m),b=function(){return localStorage.getItem(v___server_hostname+"-"+h)},y=0;if(b()=="0"){localStorage.removeItem(v___server_hostname+"-"+h);y++}if(v&&(b()||y)){if(compareVersionNumbers(a,v)>0&&a!="0"&&a!="0.00"&&a!=null){if(a!=theme.version()){var x=theme_language("notifications_theme_update"),k=theme_language("notifications_theme_update_message").replace("%v",a),g=t+"/sysinfo.cgi";localStorage.setItem(v___server_hostname+"-"+"notifications_"+$__id__+"_"+e+"",JSON.stringify({title:x,time:$__id__,timestamp:$__id__,message:k,readStatus:0,type:e,link:g}));localStorage.setItem(v___server_hostname+"-"+h,a);localStorage.setItem(v___server_hostname+"-"+m,a);notifications(x,k,e,g)}}}}if(e==="authentic_theme_version"&&!Test.strContains(a,"CHANGELOG.md")){plugins.slider.notifications.dismiss("authentic_remote_version")}if(settings_sysinfo_csf_updates){var w=localStorage.getItem(v___server_hostname+"-"+"sysinfo_csf_current_version");if(w&&w!=null&&localStorage.getItem(v___server_hostname+"-"+"sysinfo_csf_remote_version")){if(e=="csf_remote_version"&&w-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",dayjs.unix($__id__).format(config_portable_theme_locale_format_long)),g=t+"/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:e,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(a&&a.indexOf("label-danger")===-1){plugins.slider.notifications.dismiss("csf_title");localStorage.removeItem(v___server_hostname+"-"+"sysinfo_csf_not_running")}}}if(e==="local_motd"&&a){$.each(a,function(t,a){a.forEach(function(a){var i=a.time.substring(0,10),n=a.msg,s=i+""+t.replace(/[_]+/g,"--"),o=function(t){return v___server_hostname+"-"+""+t+"_"+s+"_"+e};if(session.server.data("user")===t&&config_portable_notifications_self===false){return true}if(!localStorage.getItem(o(e))){var r=theme_language("notifications_motd"),l=theme_language("notifications_motd_says").replace("$1",' '+t+"")+":  ",c=l+n,_=theme_language("notifications_motd_says").replace("$1",t)+": "+n,d="",f=n.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("//"))){c=c+' '}else if(d){c=c+' '}c=c.replace(//gi," ");c=c.replace(/<\/a>/gi," ")}localStorage.setItem(o("notifications"),JSON.stringify({title:r,time:parseInt(i),timestamp:parseInt(i),message:c,readStatus:0,type:e,link:d}));localStorage.setItem(o(e),1);notifications(r,_,e,d)}})})}else if(e=="csf_deny"){var T=JSON.parse(a);$.each(T,function(a,i){i=i.split("|");var n=i[0],s=i[1],o=i[2],r=i[3],l=i[4],c=i[5],_=i[6],d=i[7];d=d.replace("*Port Scan*",o&&r?'Port '+r+" scan":"Port scan");if(!localStorage.getItem(v___server_hostname+"-"+"allowed_trigger_"+(n+s.replace(/\./g,"0"))+"_csf_deny")){var f=theme_language("notifications_firewall_warning"),p=d+(o&&r?" ("+o+":"+r+")":""),u=t+"/csf/index.cgi?action=temp";localStorage.setItem(v___server_hostname+"-"+"notifications_"+(n+s.replace(/\./g,"0"))+"_csf_deny",JSON.stringify({title:f,time:$__id__,timestamp:$__id__,message:p,readStatus:0,type:e,link:u}));localStorage.setItem(v___server_hostname+"-"+"allowed_trigger_"+(n+s.replace(/\./g,"0"))+"_csf_deny",1);notifications(f,p,e,u)}})}else if(e=="cpu_percent"||e=="mem_percent"||e=="virt_percent"||e=="disk_percent"){var V=$("#right-side-tabs .graph-container-fw."+e+""),E="hidden-force";V=V.add(V.next("br"));if(a!=null){V.removeClass(E)}else{V.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 j=!localStorage.getItem(v___server_hostname+"-"+"sysinfo_"+e+"_stats"),O=$(".info-container .graph-container."+e+"");j?O.addClass("hidden").next("br").addClass("hidden"):O.removeClass("hidden").next("br").removeClass("hidden");if(e=="cpu_percent"){var z=localStorage.getItem(v___server_hostname+"-"+"sysinfo_cpu"),M=z?"("+z+")":String();$("#right-side-tabs-sysinfo .graph-container."+e+" .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")+"% "+M+"");$("#right-side-tabs-sysinfo .graph-container."+e+" .bar").attr("style","width:"+localStorage.getItem(v___server_hostname+"-"+"sysinfo_cpu_percent_stats")+"%")}if(e=="mem_percent"){var q=localStorage.getItem(v___server_hostname+"-"+"sysinfo_mem"),U=q?"("+q+")":String();$("#right-side-tabs-sysinfo .graph-container."+e+" .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."+e+" .bar").attr("style","width:"+localStorage.getItem(v___server_hostname+"-"+"sysinfo_mem_percent_stats")+"%")}if(e=="virt_percent"){var Z=localStorage.getItem(v___server_hostname+"-"+"sysinfo_virt"),J=Z?"("+Z+")":String();$("#right-side-tabs-sysinfo .graph-container."+e+" .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."+e+" .bar").attr("style","width:"+localStorage.getItem(v___server_hostname+"-"+"sysinfo_virt_percent_stats")+"%")}if(e=="disk_percent"){var K=localStorage.getItem(v___server_hostname+"-"+"sysinfo_disk"),W=K?"("+K+")":String();$("#right-side-tabs-sysinfo .graph-container."+e+" .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."+e+" .bar").attr("style","width:"+localStorage.getItem(v___server_hostname+"-"+"sysinfo_disk_percent_stats")+"%")}}}$('#right-side-tabs .info-container .info-list-data span[data-data="'+e+'"]').html(a);if(e=="package_message"&&core.moduleAvailable("package-updates")){var R=a;R&&$('#right-side-tabs .info-container .info-list-data span[data-data="'+e+'"]').html($(R).html($(R).html().split(",")[0])[0].outerHTML)}if(e=="local_time"){var D=$('#right-side-tabs .info-container .info-list-data span[data-data="'+e+'"]'),P=D.find("a").length?D.find("a"):D.find("span");if(P&&P.length){P.html(P.next("span").detach())}if(settings_theme_make_date){snippets.datetime.tictac(1)}else{D.html(a)}}if(e=="cpu_temperature"||e=="cpu_fans"){var N=0,Q="strong",L=e==="cpu_fans"?true:false,X="#right-side-tabs .info-container .badge-drivestatus.badge",G=L?"cpufans":"cpustatus",H=L?"fans":"cpu",F='.info-container [data-stats="'+H+'"]',B=".badge-"+G+"";$.each($(a).filter(B),function(e,t){var i="",n=$(this).text(),s=n.split(":"),o=s[1]||s[0],r=o;if(L){i=HTML.label.textMaxLevels("rpm",r)}else{i=HTML.label.textMaxLevels("temperature",o)}if(i=="bg-warning"||i=="bg-danger"){N=1}if(!$(""+X+"-"+G+"").length){$(""+Q+'[data-stats="'+H+'"] + br[data-stats="'+H+'"]').after(a.replace(/
| /gi,""))}$($(""+X+"-"+G+"")[e]).html($(this).text()).removeClass(function(e,t){return(t.match(/(^|\s)bg-\S+/g)||[]).join(" ")}).addClass(i+"-dark")}).promise().done(function(){var e=$(F).filter(Q),t=$(F).filter(B).length,i=G=L?"cpufan":"cputemp",n=t===1?i:i+"s";e.text(theme_language("body_"+n+""));if(N||a&&settings_sysinfo_cpu_and_fans_side_slider_always_show){$(F).removeClass("hidden")}else{$(F).addClass("hidden")}})}if(e=="hdd_temperature"){var Y=0;$.each($(a).filter(".badge-drivestatus:not(.badge-cpustatus)"),function(e,t){var i="",n=$(this).text(),s=n.split(":"),o=s[1]||s[0];i=HTML.label.textMaxLevels("temperature",o);if(i=="bg-warning"||i=="bg-danger"){Y=1}if(!$("#right-side-tabs .info-container .badge-drivestatus:not(.badge-cpustatus)").length){$('strong[data-stats="drive"] + br[data-stats="drive"]').after(a.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(i+"-dark")}).promise().done(function(){if(Y||a&&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(e=="warning_si"){var ee=$("#right-side-tabs .info-container .warning-list-data"),te=a.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(a==="
"){ee.empty()}plugins.dashboard.update.alerts(a);plugins.dashboard.update.alertsHTML()}if(e=="extended_si"){var ee=$("#right-side-tabs .info-container .extended-list-data");var ae=a.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");if(v___location_file==="sysinfo.cgi"){var ie="extended_sysinfo",ne="data-referrer",se="panel",oe=""+se+"-body",re=$($.parseHTML(a)).filter("#"+ie+"");if(re[0]){var le=$("#"+ie+"-1");if(le.length){$.each($(re[0]).find("."+se),function(){var e=$(this).attr(ne);if(e==="live_stats"){return}var t=$(this).find("."+oe).html();if(t){var a=le.find("."+se+"["+ne+'="'+e+'"]').find("."+oe);if(a.length){a.html(t);var i=a.find("table"),n=a.find('[data-toggle="tooltip"]');if(i.length){$.each(i,function(){var e=$(this);if(e.find("thead").length){try{table_data_init(e)}catch(e){}}})}if(n.length){n.tooltip({placement:"auto bottom",container:a,trigger:"hover",html:true,delay:{show:vars.plugins.tooltip.delay.show,hide:vars.plugins.tooltip.delay.hide}})}}}}).promise().done(function(){snippets.page.render_links_dashboard()})}}}}catch(e){}}if(e=="collect_interval"){if(Test.numeric(a)){settings_side_slider_background_refresh_time=parseFloat(a)}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);setTimeout(function(){plugins.dashboard.update.formsURLs()},100);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"){var r=settings_side_slider_background_refresh_time,l=r+2;if(settings_side_slider_background_refresh_time>0){iupdateTimer=setInterval(function(){sysinfo_update()},l*6e4)}}}}},status_right_pane=function(){const e=$("body > .right-side-tabs-toggler");if(!e.is(":visible")){return false}return e.hasClass("opened")},open_right_pane=function(){const e=$("body > .right-side-tabs-toggler");if(!e.is(":visible")){return false}if(!status_right_pane()){e.trigger("click")}},close_right_pane=function(){const e=$("body > .right-side-tabs-toggler");if(!e.is(":visible")){return false}if(status_right_pane()){e.trigger("click")}};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=$("#system-status, #extended_sysinfo-1"),a=$(".right-side-tabs-dismiss .fa-reload, ._sync_sysinfo_.fa-reload");a.addClass("fa-spin-fast cursor-na");t.addClass("updating");$.ajax({type:"POST",url:v___location_prefix+"/index.cgi/?xhr-theme_clear_cache=1",dataType:"JSON",complete:function(t){$.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")}},complete:function(e){a.removeClass("fa-spin-fast cursor-na")},error:function(e){plugins.messenger.post(''+theme_language("sysinfo_update_failed"),20,"error","sysinfoRecollect")}})}})});if(v___user_level==0&&$.support.spa&&!theme.errors.onload()){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 n=String(),s=document.querySelector("aside");if(s&&s.style&&s.style.filter&&settings_side_slider_palette==="nav"){n="filter: "+s.style.filter}var o='"+'"+"";if(browser.detect.safari(1)){setTimeout(function(){$(document.body).append(o);test_visibility()})}else{$(document.body).append(o);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=session.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",n;if(i=="cpu"&&t){n=v___location_prefix+"/proc/index_cpu.cgi"}else if((i=="mem"||i=="virt")&&t){n=v___location_prefix+"/proc/index_size.cgi"}else if(i=="disk"&&core.moduleAvailable("disk-usage")){n=v___location_prefix+"/disk-usage"}else if(i=="disk"&&core.moduleAvailable("quota")){n=v___location_prefix+"/quota/list_users.cgi?dir=%2F"}n&&get_pjax_content(n);$(".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(vars.navigation.animation_speed*1.33));$(".right-side-tabs").animate({right:"0"},parseInt(vars.navigation.animation_speed*1.33))}});$(".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"},vars.navigation.animation_speed,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=session.server.data("user"),a=function(){return $(document.body).find(".modal.user_motd_data")},i=function(){return a().find(".user-motd-content")},n=function(e,t){var a=t||i().find(".form-group-sm").length+1,n=e.time?e.time:dayjs().unix()+""+parseInt(Math.random()*1e4);var s='
';s+='';var o=["all","adm"];if(session.server.data("pro-vm")==1){o.push("res")}if(core.moduleAvailable("virtual-server")){o.push("vm")}if(core.moduleAvailable("server-manager")){o.push("cm")}if(core.moduleAvailable("usermin")){o.push("um")}if(o.length>2){s+=""}s+='';s+="
";return s},s="";$.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(!s){s='
'}s+=n(e,t+1);if(t===i){s+="
"}})})}$("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"),s=a.length,o="";if(!s){o='
'}o+=n({msg:"",time:""});if(!s){o+="
"}if(!s){t.append(o).find('[data-motd]:last-child > input[type="text"]').focus()}else{a.append(o).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"),n=i.length?i.val():"all";if(t){a.push({msg:t,time:e,target:n})}});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"},vars.navigation.animation_speed,function(){$(this).remove();remove_all_notifications();mark_no_notifications()})});$(".right-side-tabs .tab-pane").mCustomScrollbar({axis:"y",theme:"minimal",scrollInertia:250,scrollButtons:false});mark_no_notifications();check_notifications()}else{session.server.data("data-slider-fixed","0");$(".right-side-tabs-toggler").addClass("hidden")}});return{test:test_visibility,state:set_visibility,open:open_right_pane,close:close_right_pane,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(/(?:])|(?:])/),n=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+" "+n('',a,true)+""}else if(a){e=e+" "+n('',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:5,a=(t+2)*6e4;clearInterval(this._pull_timer);a&&(e._pull_timer=setInterval(function(){e.get()},a))},_show:function(t){if(!$.isEmptyObject(t.motd)){var a=session.server.data("user"),i=function(e){var t=v___server_hostname+"-"+a+"-"+c+"_"+e;t=t.replace(/[^0-9a-z]/gi,"");return t};for(var n in t.motd){for(var s in t.motd[n]){var o=t.motd[n][s],r=o.msg,l=theme_language("notifications_motd2"),c="user_motd",_=o.time.substring(0,10),d=o.time+"-"+n,f=i(d),p=e.format_links(r,true),u=p.link;r=p.msg;if(!localStorage.getItem(f)){var g=plugins.messenger.post({icon:"fa2 fa2-message fa-1_25x",title:l+'  '+dayjs.unix(_).fromNow()+"

",message:r,type:"success",id:f,position:"bottomRight",close:false,timeout:false,progressBar:false,buttons:plugins.messenger.toast.construct.button(theme_language("global_hide").toUpperCase(),function(e){localStorage.setItem(e.id.replace("toastid_-_",""),"1")}),layout:2,balloon:true});var m=g.find("x-a");if(m.length){m.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,r,c,u,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",n=function(){localStorage.removeItem(v___server_hostname+"-"+v___server_username+"-"+i)},s=function(){return v___location_path&&v___location_path.indexOf("/sysinfo.cgi")>-1},o=function(){if(s()){var a=localStorage.getItem(v___server_hostname+"-"+v___server_username+"-"+i);if(a!=null){a=Object.entries(JSON.parse(a));for(var n=0;n"?0:1,a=$("#system-status > .panel-body > .table.table-hover");if(a.length){a.nextAll().remove();if(t){a.after(e)}}},l=function(){$.each(["system-status","right-side-tabs-sysinfo"],function(e,t){const a=$("#"+t+' .alert > [action*="webmin/upgrade.cgi"] [data-entry], #'+t+' .alert > [action*="webmin/fix_repo.cgi"] [data-entry]'),i=a.parents("form").attr("action");if(a.length){const e=a.parent(".btn");let t="fa-update";if(i&&i.toString().includes("fix_repo")){t="fa-git-pull"}if(e.length){if(!e.find(".fa").length){e.removeClass("btn-default").addClass("btn-warning").prepend('')}}}})},c=function(){$.each($("#system-status form:visible, #right-side-tabs form:visible"),function(){var e=$(this).attr("action"),t="?";if(e&&!e.includes("licence.cgi")){if(e.includes("?")){t="&"}$(this).attr("action",e+t+"pass-query-string=1&no-cache=1&no-query=string")}})},_=function(e,t){var a="#content #system-status ",i="table > tbody > tr > td ",n=function(e){return"+ .panel-group > .panel > #"+e+"-virtual-server-1-collapse "},s="System Information",o="Account Information",r="Software Versions",l="Virtualmin Counts",c="Virtualmin License",_=v___user_level==3?o:s,d=function(e){return e&&/(webmin|virtualmin|cloudmin|usermin|authentic)/i.test(e)},f=[],p=[],u=false,g=[],m=[],h=[],v=[],b="",y="",x=function(){if(!e){var a;$.each($(v),function(e,t){if(typeof t==="string"){a=t;b+=(e!==0?"\n":"")+t+"\n"}else{var i=Object.keys(t),n=Object.values(t);if(u&&a===_&&d(i)){return true}b+=$.trim(i[0])+": "+$.trim(n[0])+"\n"}})}else{var i=" ",n=v.length-1,a;$.each($(v),function(e,s){if(typeof s==="string"){a=s;var o=i.repeat(_.length-a.length+(a===_?3:a===r?4:5)+2);b+=(e!==0?"\n|":"|")+s.toUpperCase()+o+"| |\n|---|---|\n"}else{var l=Object.keys(s),c=Object.values(s);if(u&&a===_&&d(l)){return true}b+="| "+$.trim(l[0])+" | "+$.trim(c[0])+" |\n"}if(n===e){!t&&(b+="\n\n\n")}})}};$.each($(""+a+" > .panel-body > "+i+""),function(){var e=$(this)[0].outerText;f.push(e);if(d(e)){p.push(e);p.push($(this).next()[0].outerText)}}).promise().done(function(){$.each($(f),function(e,t){if(e===0){v.push(_)}if(e&1){v.push({[f[e-1]]:t})}}).promise().done(function(){$.each($(""+a+n("sysinfo")+i+""),function(){g.push($(this)[0].outerText)}).promise().done(function(){if(g.length&&p.length){g=p.concat(g);u=true}$.each($(g),function(e,t){if(e===0){v.push(r)}if(e&1&&e!==1+p.length){v.push({[g[e-1]]:t})}}).promise().done(function(){$.each($(""+a+n("ftypes")+i+""),function(){m.push($(this)[0].outerText)}).promise().done(function(){$.each($(m),function(e,t){if(e===0){v.push(l)}if(e&1){v.push({[m[e-1]]:t})}}).promise().done(function(){if(t){$.each($(""+a+n("serial")+i+""),function(){h.push($(this)[0].outerText)}).promise().done(function(){$.each($(h),function(e,t){if(e===0){v.push(c)}if(e&1){v.push({[h[e-1]]:t})}}).promise().done(function(){x()})})}else{x()}})})})})})});return b},d=function(e,t,a){if(!s()){return}if(e==="reset"){t="keyup";a={holdModifer:~~!false}}if(e==="reset"||e==="support-header-icon"){var i=$("#content #system-status ._support_ticket_cnt ._support_ticket_"),n="fa2-life-ring-solid";a.holdModifer&&i.toggleClass(n,t==="keydown")}if(e==="reset"||e==="copy/paste-header-icon"){var i=$("#content #system-status ._clipboard_sysinfo_cnt ._clipboard_sysinfo_"),n="fa2-clipboard-text";a.holdModifer&&i.toggleClass(n,t==="keydown")}};document.addEventListener("DOMContentLoaded",function(){$(document.body).on("shown.bs.collapse hidden.bs.collapse",""+e+"",function(){var n=$(""+e+""),s={};$.each(n,function(){$target=$(this).find("."+t+""),id=$target.attr("id"),state=$target.next("."+a).hasClass("in");s[id]=state});localStorage.setItem(v___server_hostname+"-"+v___server_username+"-"+i,JSON.stringify(s))})});return{restore:o,reset:n,update:{alerts:r,alertsHTML:l,formsURLs:c},system_info:_,events:d}}();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(session.server.data("webprefix")&&!a.includes("!edit")&&!a.includes("!view")){favorite.link=link_type_convert(a.replace(session.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")},n=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")}},s=function(t,a,i){var n="favorites-menu .favorites-menu-content";if(e()===0){$("#"+n+" li.favorites-no-message").addClass("hidden");$("#"+n+" .favorites-title sup a").removeClass("hidden")}var s;s='class="wbm-'+i+""+(i=="virtualmin"?"":"")+' wbm-sm"';$("#"+n+" li.favorites-title").after('')},o=function(e,t){var a=snippets.parser.fileviewer.getSuffix(false,1),s=a[0],o=a[1],r=a[2],l=a[3],c=a[4],_=a[5],d=a[6],f=a[7],p=a[8];var u=e.replace(/["\\]/g,"\\$&"),g=function(){var e="",t=[u,u+s+_+f,u+o+_+d+f,u+r+_+p,u+l+_+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){n();i()}},r=function(e){var t=$("#favorites-menu li a.menu-exclude-link"),a=e,s=$('aside select option[value="'+a+'"]').attr("title");if(t&&t.length){$.each(t,function(t,a){var i=$(a),n=i.attr("href"),r=i.find("span").text();if(n){if(n.includes(e)||r&&$.trim(r).startsWith(s)){o(n,1)}}}).promise().done(function(){setTimeout(function(){n();i()},300)})}},l=function(e,t){n();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,s,o,r=0,l="!edit ";if(e){o=e.find(".favorites-editor");if(o.hasClass("viewer")){l="!view ";r=1}}else{o=$("#headln2c > .favorites, .xcustom-favorites");i=link_type_convert(URI(v___location).resource(),1);if(i.includes("index.cgi")){s=i.replace("index.cgi","")}else{s=i+"index.cgi"}}if(t){t=t.replace(/\/\//g,"/")}if(r){t=t+snippets.parser.fileviewer.getSuffix(o)}if(i&&$.inArray(i,a)>-1||s&&$.inArray(s,a)>-1||a.includes(l+t)){var c=theme_language("favorites_remove");o.addClass("fa-star").removeClass("fa-star-o").attr("aria-label",c);o.attr("data-original-title",c).tooltip("fixTitle")}else{var _=theme_language("favorites_add");o.removeClass("fa-star").addClass("fa-star-o").attr("aria-label",_);o.attr("data-original-title",_).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,n=Test.strContains(e,"gparent")?"gparent":i,s=URI.parseQuery(URI(e).query())[n],o=i==="dom"?"virtualmin":i==="id"?"cloudmin":"webmin",r=$('.switch-toggle input:not([id="open_'+o+'"]):checked').length;if(i){setTimeout(function(){if($("aside select").val()!=s){if(i==="dom"){plugins.navigation.get.virtualmin(s)}else if(i==="id"){plugins.navigation.get.cloudmin(s)}}},300)}else{if(!t&&!a&&r){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),n=snippets.parser.fileviewer.getOpts(a),r=n[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],c=t[2];c=c.replace(/\/\//g,"/");return c},d=function(e){return _(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"+(r?".viewer":"")+"").not(a);if(a.hasClass("fa-star-o")){p(a);if(l||r){$.each(g,function(){if(r&&!$(this).hasClass("viewer")){return true}if(!r&&$(this).hasClass("viewer")){return true}if(_($(this))===_(a)&&!r){p($(this))}if(r&&d($(this))===f(_(a))){p($(this))}});c=_(a);var m=Convert.htmlEscape(a.prev("[data-file-container]").attr("title")||c);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(),"");c=c.replace(h,"");m=m.replace(v,"(")}var b="!edit ";if(r){c=f(c);b="!view "}c&&s(b+c,""+theme_language(r?"file_viewer":"file_editor")+" - "+m,r?"x wbm2-viewer":"editor")}else{var y=" ⇾ ",x=theme.config._.form.tconfig(),k=v___location_file==="tconfig.cgi"&&x.length,w=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",A=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()!==A.trim(),T="",V="";if(($t_uri_virtualmin||$t_uri_cloudmin)&&!w){T=Convert.htmlEscape($("aside .ui_select option:selected").text())}if($('body[class^="'+v___module_file_manager+'"]').length){if(typeof fm_get_current_path==="function"){V=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(!V){V=E("/");V="["+V+"]"}else{V="["+Convert.htmlEscape(E(Convert.uriDecodeComponent(V)))+"]"}}}if(w){if(!k){var j=v___location_file.match(/(.*?)\./),O=j?j[1]:parseInt(Math.random()*1e4);x=$('.container-fluid form[action*="'+O+'_save.cgi"]');var z=Convert.htmlEscape($("#headln2c > span[data-sub_title] span").text().trim());C=C?C+y+z:z;S=A}else{S=A}A=$.trim(x.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("logviewer")&&!core.curModule("syslog")){T=""}}var M=(C.length?C+y:"")+(S.length?S+(A.length&&I?": ":""):"")+(I?A:"")+(V.length?" "+V:"");if(vars.events.keypressed.alt&&!vars.events.keypressed.shift&&vars.events.keypressed.ctrl&&!vars.events.keypressed.meta){theme_copy_to_clipboard(M);console.warn("Copied to clipboard:");console.log(M);u(a);setTimeout(function(){plugins.messenger.post({type:"success",icon:"fa fa-exclamation-circle fa-lg fa-fw",id:"copiedToClipboardSuccess",title:theme_language("global_success"),message:theme_language("filemanager_copying_successful").replace(".",String()),layout:1,displayMode:1,position:"bottomCenter",cancel:true,close:true,timeout:3e3,progressBar:true})},22)}else{s(t,M,w&&k?"theme":$t_uri_virtualmin?"virtualmin":$t_uri_cloudmin?"cloudmin":"webmin")}}i()}else{u(a);if(l||r){$.each(g,function(){if(r&&!$(this).hasClass("viewer")){return true}if(!r&&$(this).hasClass("viewer")){return true}if(_($(this))===_(a)&&!r){u($(this))}if(r&&d($(this))===f(_(a))){u($(this))}});c=_(a);var b="!edit ";if(r){c=f(c);b="!view "}c&&o(b+c)}else{o(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();o($(this).parents("a").attr("href"))})})();a()});return{detect:l,fetch:t,remove:r}}();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(),n=e.find(".versionSeparator").length,s=theme.version(),o=i+" ... "+s;var r=false,l=i.match(/([\d]+\.[\d]+)/),c=s.match(/([\d]+\.[\d]+)/);if(l&&c){l=l[1];c=c[1]}$(this).addClass("update_notice_subvers");var _=e.find(".versionSeparator"),d=theme_language("global_development_version");$.each(_,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(n){f.replaceText(u,""+o+"");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());var h=p.text(),v=h.split("..."),b=0,y=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+"")}}})};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=r(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("")}})},n=function(e){return e.replace(/&file.*&chroot/,"&file="+Convert.uriEncodeComponent(($v__mpp__g_ol+"/").replace(/\/\/+/g,"/").replace(/:\//g,"://"))+"&chroot")},s=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},o=function(t,i,n){e&&(a=t);if(n){if($(".refInputData").is("textarea")){var s=$(".refInputData");if(s.val()){s.val(s.val()+"\n"+t.replace(/\/\/+/g,"/").replace(/:\//g,"://"))}else{s.val(t.replace(/\/\/+/g,"/").replace(/:\//g,"://"))}}else{$(".refInputData").val(t.replace(/\/\/+/g,"/").replace(/:\//g,"://"))}var o=$(".refInputData").parent("td").prev("td").find('input[type="radio"]'),r=$(".refInputData").parent("span").prev("span").find('input[type="radio"]'),l=$(".refInputData").prev("span").find('input[type="radio"]'),c=$(".refInputData").prev("select").find('option[value="*"]');if(r.length){r.trigger("click")}else if(l.length){l.trigger("click")}else if(c.length){c.parent("select").val("*").trigger("change")}else{o.trigger("click")}}if(i){$("body .mppopup").modal("hide")}},r=function(e){e=$.url(e).attr("path").replace(/\/$/g,"").split("/");var t="",a="/",i=a,n=get_access_level()==2||get_access_level()==3,s=get_user_home();if(n){i=s}$.each(e,function(e,o){if(o===""){var r="onclick=\"parentdir('"+i+"'); return false\"";if(n){r=String()}t+=""+(get_access_level()==0?'':'')+""+"\n"}else{a+=o+"/";var r="onclick=\"parentdir('"+a+"'); return false\"";if(n&&!a.includes(s)){r=String()}t+=""+o+""+"\n"}});var o='";return o+''},l=function(t){var i=String();!t&&(t={});if(t.file){i=t.file}var n='";$("body").append(n);$(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){o($v__mpp__g_ol,0,0)}else{var e=n($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=n($v__mpp__g_op);i(a)}else{o($v__mpp__g_ol,1,1)}}}).on("click",".mppopup button[data-mppopup_confirm]",function(){var e=$data_mppopup_value.val();o(e,1,1);if(core.curModule("custom")){refInput.trigger("input")}}).on("show.bs.modal",".mppopup",function(){setTimeout(function(){$("body").addClass("mppopup-open")},120);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("hide.bs.modal",".mppopup",function(){var e=$(".modal.in");e.removeClass("in");$("body").removeClass("mppopup-open");setTimeout(function(){e.addClass("in")},150)}).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");setTimeout(function(){if($(".modal.in").length){$("body").addClass("modal-open")}})}).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"),n=$(".mppopup .breadcrumbx").length;if(n){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 s=$(".mppopup .mppopup_multi_done:visible");if(s.length){setTimeout(function(){s.trigger("click")},240)}}if(!$(".mppopup table tbody tr.noresults").length){$(".mppopup table tbody").append(''+theme_language("global_no_results_found")+"")}var o=$(".mppopup table tbody tr:visible:not(.noresults)"),r=$(".mppopup table tbody tr.noresults");if(o.length){r.addClass("hidden")}else{r.removeClass("hidden")}}).on("click","button[data-mmclick]:not(.disabled), input[data-mmclick]:not(.disabled)",function(i){i.preventDefault();i.stopPropagation();refInput=s($(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 n=$(this),o=refInput.val(),l=encodeURIComponent(o),c=$(this).attr("data-mmclick"),_=c.match("window.open\\(['\"]*(.*?)(\\s*['\"]*,.*?)"),d=_[1].match(/(\w+\.[a-z]{3,4})/gi)[0],f=d.replace(".cgi",""),p=false,u=false;n.addClass("disabled").attr("disabled","disabled");if(_[1]){var g=_[1].replace("encodeURIComponent(ifield.value)","refInputCurrValSafe");g=g.replace('"+"',"").replace('"+',"").replace("refInputCurrValSafe",l);var m=function(t,a,i,n,s,r,l,c,_,d,p){var u;if(!r){r=String()}if(!l){l=String()}if(s){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){var t=parseInt(session.server.data("webprefix-proxy")),a=String();if(t){a=v___location_prefix}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=a+"/"+e[1]}else{$v__mpp__g_op=a+e[1]}};var v=String(),b="cron_chooser",y='form[action*="backup_sched.cgi"], form[action*="save_newquotas.cgi"], form[action*="save_validate.cgi"]',x='[name="enabled_hidden"], [name="sched_hidden"], [name="when_hidden"]';y+=', form[action*="save_backup.cgi"], form[action*="save_vbackup.cgi"], form[action*="save_vsync.cgi"]';if(f===b){var k=$(y),w=k.find(x).val();v=""+b+".cgi?complex="+w+""}$.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 n=r(i),s=$(a).find("td").length;if(s===0&&a){a=a.replace("thead","tbody");a=a.replace("",''+theme_language("datatable_semptydirectory")+"")}t=n+''+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,n=$(i).filter("table").html();m(''+n+"
","",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:s,file:l}}();plugins.navigation=function(){document.addEventListener("DOMContentLoaded",function(){r();c();n();$("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*="server-manager/bwgraph.cgi"], a[href*="history.cgi"]',function(e){e.preventDefault();e.stopPropagation();window.open($(this).attr("href"),"_blank")}).on("contextmenu auxclick",".switch-toggle label",function(e){const t=this;e.preventDefault();if(t._processing){return}t._processing=true;setTimeout(function(){t._processing=false},99);var a=$(this).attr("for").replace("open_",""),i=$(this).prev("input").is(":checked");if(i){var n=v___location_href;set_server_theme_temp_data("goto",link_type_convert(n,1));setTimeout(function(){theme_open_new_tab(n)},200)}else if(a==="virtualmin"||a==="cloudmin"){var s;if(a==="cloudmin"){s="/server-manager/index.cgi"}else{s="/virtual-server/index.cgi"}var o=link_type_convert(s,2);set_server_theme_temp_data("goto",link_type_convert(o,1));setTimeout(function(){theme_open_new_tab(o)},200)}else if(a==="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}A($(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(){f("c",false)}).on("blur",".sidebar-search",function(){setTimeout(function(){f("c",true)},150)}).on("click",'.navigation a[target="page"], .user-links a[target="page"]',function(){l()}).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"),n=$(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((typeof settings_navigation_auto_fold_category=="undefined"||settings_navigation_auto_fold_category)&&!e.is(n)){e.removeClass("active");if(e.find("a").attr("href")!="#search"&&a){$(e.find("a").attr("href")).slideUp(vars.navigation.animation_speed)}}})).done(function(){n.hasClass("active")?n.removeClass("active"):a!="#hide"&&!i?n.addClass("active"):false;setTimeout(function(){if($(a).is(":visible")&&a!="#hide"&&!i){n.addClass("active")}else{n.removeClass("active")}$processing=false},2*vars.navigation.animation_speed>0?2*vars.navigation.animation_speed:1);$(a).slideToggle(vars.navigation.animation_speed)});if(a=="#search"){$('#sidebar input[name="search"]').focus()}}}).on("click",".navigation > li.has-sub",function(){page.load.happening()&&(plugins.navigation.detectAllowed=false)}).on("click",".navigation > li > ul.sub > li:not([data-link-inactive]):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){page.load.happening()&&(plugins.navigation.detectAllowed=false);$(".__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(),n=$("body").find(".-shell-port-");if(i&&e.keyCode===13){e.preventDefault();if(!i.startsWith("!")){$(this).find('input[name="title"]').remove();var s=z(1),o=theme_language("search_in_"+(s==="mailbox"?"usermin":s)+"");o=o?o:theme_language("filemanager_context_search");$("").attr({type:"hidden",name:"title",value:o}).appendTo($(this));var r=$(this).attr("action")+"?"+$(this).serialize();if(get_onbeforeunload_status()){get_onbeforeunload_message(false,{href:r})}else{get_pjax_content(r);a.val("")}}else{if(core.moduleAvailable("xterm")){var l=i.includes("!edit ")||i.includes("!editor "),c=i.includes("!view ")||i.includes("!viewer ");if(l||c){var _=i.replace("!edit ","").replace("!editor ","").replace("!view ","").replace("!viewer ",""),d=_.split("\\").pop().split("/").pop(),f=_.replace("/"+d,"");plugins.navigation.collapse();progress.start();if(c){edit_file(d,f||"/",false,1,0)}else{edit_file(d,f||"/")}}else{plugins.terminal.open(i)}}else if(core.moduleAvailable("shell")){plugins.shell.open(i)}}}}).on("click","[data-collapse-trigger]",function(e){e.stopImmediatePropagation();var t=session.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){session.server.data("data-navigation-collapsed",1);$(".mobile-menu-toggler").removeClass("visible-xs");l()}else{session.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()){if(session.server.data("terminal")==1){plugins.terminal.open()}else{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)}).on("click",".servers-index-link > a",function(e){e.preventDefault();e.stopPropagation();progress.start();location.href=this.href}).mCustomScrollbar({axis:"y",theme:"minimal",scrollInertia:250,scrollButtons:false,advanced:{autoScrollOnFocus: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")}}if($(".popover-servers-index:visible").length){$('aside [data-servers-index="popover"]').trigger("click")}}}});$("body").on("click",".popover-servers-index.in .popover-content a",function(e){e.preventDefault();progress.start();location.href=this.href})});var e=function(){var e=".navigation",t=typeof settings_navigation_auto_fold_category=="undefined"||settings_navigation_auto_fold_category;t&&$(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();t&&$(e+" > li.has-sub").removeClass("active");t&&$(e+" > li > ul.sub").hide();t&&$(e+" > li > a > i.fa.fa-folder-open-o").removeClass("fa-folder-open-o")},t=function(t,a){if(v___theme_pjax_call===0){return}if(Z()){return}var i=function(e){return e?e.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").replace("/save_domain.cgi","/edit_domain.cgi"):e};var n=false,s=function(){n=false;if(!plugins.navigation.detectAllowed){return}typeof t=="undefined"&&(n=true);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 s=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+)/),n=e.match(/.*?\.cgi/);if(i&&i[1]&&i[2]&&n){a='a[href*="'+n[0]+'"][href*="'+(i[1]+"="+i[2])+'"]'+t+""}}return a},o=v___location_path==="/"?t:v___location_path+(v___location_query?"?"+v___location_query:"");if(v___initial_load&&!o){return}if(!o){o="/"}$nearExactMatchStatus=1,$superExactMatchStatus=0,$nearExactMatch=$('.navigation a[href*="'+o+'"]:not([data-parent-hidden]):first'),$nearExactMatchPostSave=$(".navigation "+s(o.replace("save_","edit_"))),$nearExactMatchPostList=$(".navigation "+s(o.replace("edit_","list_"))),$nearExactMatchPostListSingular=$(".navigation "+s(o.replace("edit_","list_").replace(".cgi","s.cgi"))),$nearExactMatchPostListPlural=$(".navigation "+s(o.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||t,"cgi")&&$nearExactMatch.length){t=$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){t=v___location_resource;$superExactMatchStatus=1}else if($('.navigation a[href^="'+v___location_resource+'"]:not([data-parent-hidden]):first').length){t=v___location_resource;$nearExactMatchStatus=0}t=i(t);var r=v___location_file==="config.cgi"||v___location_file==="uconfig.cgi",l=v___location_file==="mconfig.cgi"&&uri_parse_param("module")===v___module_file_manager;if(r&&!l){if($t_uri_virtualmin&&!core.curModule("virtualmin-awstats")){t=v___location_prefix+"/config.cgi?virtual-server"}else if($t_uri_cloudmin){t=v___location_prefix+"/config.cgi?server-manager"}else if($t_uri_webmail){t=v___location_prefix+"/uconfig.cgi?mailbox"}else{t=v___location_prefix+"/"+v___location_query+"/"}}if(l){t=v___location_prefix+"/"+v___module_file_manager}var c=$t_uri_webmin||$t_uri_usermin;if(!t&&c){if(Test.strContains(v___location_file,".cgi")&&!Test.strContains(v___location_file,"sysinfo.cgi")){t=v___location_path.replace(v___location_file,"")}else if(!t){var _=new RegExp("^"+v___location_prefix,"i");t=session.server.data("data-uri").replace(_,"").split("/").filter(function(e){return e.length!==0})[0];t=v___location_prefix+"/"+t}}if($superExactMatchStatus){targeted_menu_link=$('.navigation a[href="'+t+'"]:not([data-parent-hidden]):first, .navigation a[href="'+link_type_convert(t,2)+'"]:not([data-parent-hidden]):first')}else{if(t&&(t.endsWith("/virtual-server/")||t.endsWith("/server-manager/"))){t+="index.cgi"}targeted_menu_link=$('.navigation a[href^="'+t+'"]:not([data-parent-hidden]):first')}if(targeted_menu_link.length){e()}}else{var d=".navigation a[href",f=":not([data-parent-hidden]):first";if(a==="progress"){t=i(t);targeted_menu_link=$(""+d+'*="'+t+'"]'+f+"")}else{targeted_menu_link=$(""+d+'^="'+t+'"]'+f+"")}if(targeted_menu_link.length){e()}}$("aside .navigation .fancytree-node.fancytree-active").removeClass("fancytree-active");if(t==="/"){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")};s();n&&setTimeout(s,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();c();n();bind_sameorigin(1);theme_to_new_tab();s()},n=function(){vars.navigation.servers_index_control=false;var e=$('aside [data-servers-index="popover"]'),t=e.parent(),a=t.data("http-webmin-servers");if(e.length){vars.navigation.servers_index_control=true;$.ajax({type:"GET",url:a+"index-json.cgi",dataType:"JSON",success:function(i){var n="",s=session.server.data("data-webprefix");if(i&&i.length>1){t.removeClass("hidden");$.each(i,function(){if(!s.endsWith(this.id)){n+=' '+Convert.htmlEscape(this.host)+(this.desc?" ("+Convert.htmlEscape(this.desc)+")":"")+"
"}});n&&e.popover({animation:"false",placement:"top",html:"true",container:"body",template:'
',trigger:"click",content:n});e.on("shown.bs.popover",function(){$(".popover-servers-index").removeClass("fade")})}}})}},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),n=i.pathname(),s="/"+a,o=n+"?path="+Convert.uriEncodeComponent(s);e.attr("href",o)}}},o=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"},vars.navigation.animation_speed*1.7)}})}},l=function(){var e=dayjs().unix()-vars.navigation.opened>=1,t="mobile-menu-toggler",a="__logo";if(typeof jQuery().transition=="function"&&($("."+t+":visible").length&&e)){if($("."+a+"")){$("."+a+"").transition({y:0},vars.navigation.animation_speed*1.7)}$("aside, ."+t+"").transition({x:0},0,function(){$("."+t+"").removeClass("selected");$("aside").addClass("hidden-xs")})}},c=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 n=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{I(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{T(t);get_pre_default_content(t)}}}});var s=".select2-dropdown.aside-select2",o=function(){$.each($(""+t+" select > option"),function(){if($(this).attr("style")&&$(this).attr("style").indexOf("italic")>-1){var e=$(this);setTimeout(function(){$(s).find('li[id$="'+e.attr("value")+'"]').addClass("text-danger")},0)}})};i.on(""+a+":opening",function(){o();setTimeout(function(){var e=""+s+" .select2-search__field",t="keydown.colorfilter";$(e).off(t);$(e).on(t,function(){o()})},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")}},d=function(){if(vars.navigation.select.back){var e=$("aside select");_(e.data("previous-value"),0);vars.navigation.select.back=false}},f=function(e,t){var i="aside .form-control.sidebar-search",n="aside .autocomplete-suggestions",s=function(e){return e&&(e.includes("http://")||e.includes("https://")||e.includes("ftp://")||e.includes("ftps://"))?1:0};if(e=="c"){$(n).remove();$(i).removeAttr("disabled");$(i).autocomplete("dispose");!get_onbeforeunload_status()&&$(i).val("");if(t){return}}var o={},r="li:not(.menu-exclude):not(.user-link)";$.each($(""+r+' > ul[id^="global_"].sub > '+r+' > 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=s(e),a=(e.substring(0,1)=="/"?"":"/")+e;if(t){a=e}o[a]=$.trim($(this).text())});$('li > a[target="page"][data-href="/virtual-server/index.cgi"], '+r+' > a[target="page"][data-href="/sysinfo.cgi"], '+r+' > a[target="page"][data-href="/virtual-server/pro/history.cgi"], '+r+' > a[target="page"][data-href="/server-manager/one_history.cgi"], '+r+' > a[target="page"][data-href="/server-manager/bwgraph.cgi"], '+r+' > a[target="page"][data-href="/server-manager/history.cgi"], '+r+' > a[target="page"][data-href="/mailbox/list_folders.cgi"], '+r+' > a[target="page"][data-href="/mailbox/list_ifolders.cgi"], '+r+' > a[target="page"][data-href="/mailbox/list_addresses.cgi"], '+r+' > a[target="page"][data-href="/filter/edit_forward.cgi"], '+r+' > a[target="page"][data-href="/filter/edit_auto.cgi"], '+r+' > a[target="page"][data-href="/filter/edit_auto.cgi"], '+r+' > a[target="page"][data-href="/filter/"], '+r+' > a[target="page"][data-href="/mailbox/edit_sig.cgi"]').each(function(){o[$(this).attr("data-href")]=$.trim($(this).text())});var c=function(e){var t="🔒",a=e&&e.includes(t);return a},d=$.map(o,function(e,t){if(t!="undefined"&&!c(e)){return{value:e,url:t,data:{category:O()}}}});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+"/logviewer/"||v___location_path==v___location_prefix+"/logviewer/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"||v___location_path==v___location_prefix+"/logviewer/"||v___location_path==v___location_prefix+"/logviewer/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($(""+r+' > ul.sub:not([id^="global_"]) > '+r+' > 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())});$(""+r+' > 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&&!v()){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()+"":O()}}}});var m={};$("aside select option").each(function(){m[$(this).val()+":::"+$(this).parent("select").attr("name")]=$.trim($(this).text())});var h=$.map(m,function(e,t){if(t!="undefined"){return{value:e,url:t,data:{category:$("aside select").data("autocomplete-title")}}}});var b=h.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=session.server.data("language"),n=settings_autocomplete_extra_associations_privileged[i]?settings_autocomplete_extra_associations_privileged[i]:settings_autocomplete_extra_associations_privileged.en;if(typeof n==="object"){for(const[i,s]of Object.entries(n)){if(typeof s==="object"){for(const[i,n]of Object.entries(s)){if(typeof n==="object"){for(const[s,o]of Object.entries(n)){if(t&&t.url&&t.url.includes(i+"/")&&t.url.includes(o[0]+".cgi")){t.value=t.value+"<"+e+">"+o[1]+"";b[a]=t}}}else{if(t&&t.url&&(t.url.endsWith("/"+i+"/")||t.url.endsWith("/"+i+"/index.cgi"))){t.value=t.value+"<"+e+">"+n+"";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,orientation:"auto",onSelect:function(e,t){var i=$.Autocomplete.externalEvent;if(!$.isEmptyObject(i)){var n=i.keyCode?i.keyCode:i.which;if(i.ctrlKey||i.shiftKey||i.altKey||i.metaKey||n===20||n===32||n===33||n===34||n===35||n===36||n===37||n===38||n===39||n===40||n===45||n===46||n===112||n===113||n===114||n===115||n===116||n===117||n===118||n===119||n===120||n===121||n===122||n===123||n===144||n===145){return}}if(v()===true&&$t_uri_dashboard&&get_access_level()!=2&&get_access_level()!=4){A("webmin")}$(this).val("").blur();l();var o=s(e.url);if(e.url.substring(0,1)=="/"||o){var r=e.url&&(o||e.url.includes("/file/")||e.url.includes("/cwaf/")||e.url.includes("virtual-server/pro/history.cgi")||e.url.includes("server-manager/bwgraph.cgi")||e.url.includes("server-manager/history.cgi")||e.url.includes("server-manager/one_history.cgi"));if(r){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"})},p=function(){var e="data-goto",t=$("aside").find("li["+e+"]"),a=t.attr(e);t.remove();return a},u=function(e,t){if(get_onbeforeunload_status()){return}var e=typeof e=="undefined"||e==-1||e==""?$("aside select").val():e,a=$t_uri_virtualmin?"virtualmin":$t_uri_cloudmin?"cloudmin":$t_uri_usermin?"usermin":$t_uri_webmin?"webmin":"mail";if(a=="webmin"){A("webmin");S("webmin",t)}else if(a=="virtualmin"){A("virtualmin");I(e,t)}else if(a=="cloudmin"){A("cloudmin");T(e,t)}else if(a=="usermin"){A("usermin");S("usermin",t)}else if(a=="mail"){A("webmail");S("webmail",t)}},g=function(e,t){if(!t){t=600}var i=e?" #open_"+e+"":' [id^="open_"]',n=$(".switch-toggle"+i+":checked");if(n.length){a();var s=0;if(!s){s++;setTimeout(function(){n.click()},t)}}},m=function(e){var t="aside",a="form",i=a+"s",n="select",s=$(t+" "+n),o=s.data(n+"2"),r=$(t+" .sidebar-search").val();if(r){return}if(!e){vars.navigation.select.obj=o&&o!="undefined"&&!e&&s.select2("isOpen")}if(!e){if(o){s.select2("destroy")}$.each($(t).find(a),function(){$(this).replaceTagName(i)})}else{$.each($(t).find(i),function(){$(this).replaceTagName(a)}).promise().done(function(){c(vars.navigation.select.obj)})}},h=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)}},v=function(){if(y("dashboard")=="1"){return true}else{return false}},y=function(e){if(e){e='[id="open_'+e+'"]'}else{e=String()}return $(".switch-toggle input"+e+"").length},x=function(){A("dashboard");e();get_pjax_content(v___location_prefix+"/sysinfo.cgi")},k=function(){if(Test.string(C)){A(C)}},w=function(){var e=$('aside .switch-toggle [name="product-switcher"]:checked').attr("id");if(typeof e==="string"){return e.replace("open_","")}return null},A=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)}});M()},C=setTimeout(w),S=function(n,s){if(get_onbeforeunload_status()){return}a();var o=n=="webmail"?"webmail":session.server.data("product");A(o);vars.ajax.processing.navMenu&&vars.ajax.processing.navMenu.abort();vars.ajax.processing.navMenu=$.ajax({type:"GET",url:v___location_prefix+"/xhr.cgi?type=nav&action=get&subtype="+o,dataType:"JSON",success:function(e){C=o;$("body ul.navigation").html(e.menu);plugins.shell.link();i();!session.server.data("loading")&&t();if(n==="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()"])}setTimeout(function(){if(typeof s==="function"){s.call()}},10)},error:function(t){session.status(t.responseText);i();e()}})},I=function(n,s){if(get_onbeforeunload_status()){return}a();A("virtualmin");vars.ajax.processing.navMenu&&vars.ajax.processing.navMenu.abort();vars.ajax.processing.navMenu=$.ajax({type:"GET",url:v___location_prefix+"/xhr.cgi?type=nav&action=get&subtype=virtualmin&dom="+n+"",dataType:"JSON",success:function(e){C="virtualmin";$("body ul.navigation").html(e.menu);plugins.shell.link();i();!session.server.data("loading")&&t();setTimeout(function(){if(typeof s==="function"){s.call()}},10)},error:function(t){session.status(t.responseText);i();e()}})},T=function(n,s){if(get_onbeforeunload_status()){return}a();A("cloudmin");vars.ajax.processing.navMenu&&vars.ajax.processing.navMenu.abort();vars.ajax.processing.navMenu=$.ajax({type:"GET",url:v___location_prefix+"/xhr.cgi?type=nav&action=get&subtype=cloudmin&sid="+n+"",dataType:"JSON",success:function(e){C="cloudmin";$("body ul.navigation").html(e.menu);plugins.shell.link();i();!session.server.data("loading")&&t();setTimeout(function(){if(typeof s==="function"){s.call()}},10)},error:function(t){session.status(t.responseText);i();e()}})},V=function(){const e=$("body > .mobile-menu-toggler");if(!e.is(":visible")){return true}return e.offset().left>1},E=function(){const e=$("body > .mobile-menu-toggler:visible");if(e.length&&!V()){e.trigger("click")}},j=function(){const e=$("body > .mobile-menu-toggler:visible");if(e.length&&V()){e.trigger("click")}},O=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")}},z=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"}},M=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},q=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){I(t)}},U=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){T(t)}},Z=function(){if(settings_mail_ui&&(v___location_file==="view_mail.cgi"||v___location_file==="send_mail.cgi"||v___location_file==="reply_mail.cgi")){return true}return false};return{reset:e,select:{set:_,back:d,load:c},detect:t,detectAllowed:true,load:{start:a,stop:i},collapse:l,reload:u,update:g,deform:m,lock:h,switch:{dashboard:{get:v,set:x},available:y,get:w,set:A,reset:k},get:{webmin:S,virtualmin:I,cloudmin:T},intersect:{virtualmin:q,cloudmin:U},state:{opened:V,close:j,open:E,title:O,module:z,update:M,loading:o,target:p}}}();plugins.messenger=function(){var e=function(e){e=e||"toastid_-_";return e+Date.now()+""+parseInt(Math.random()*1e6)},t=function(t,a,i,n,s,o,r){var l,c=function(e){return e==="info"||e==="success"||e==="warning"||e==="error"?e:"show"},_=c(i),d=function(e){var t=String();if(e&&e.includes("fa2")){t="2"}return"fa%pack fa%pack-%ico".replace(/%pack/g,t).replace(/%ico/,e)},f=function(e){return"placed-"+(e.position||"bottomCenter")+""+" type-"+e.type+""+" message-length-"+(e.message.length<=32?32:e.message.length<128?128:e.message.length<256?256:e.message.length<384?384:e.message.length<512?512:"1024")+""+" message-delay-"+(Test.numeric(e.timeout)&&parseInt(e.timeout)<=5?"short":"long")+" message-delay-timeout-"+parseInt(e.timeout)+""};if(typeof t==="object"&&!$.isEmptyObject(t)&&!$.isArray(t)){l=t;if(l.id){l.id="toastid_-_"+l.id+""}_=c(l.type);l.type=_;if(l.icon){l.icon=d(l.icon)}l.class=(l.class?l.class+" ":String())+f(l)}else{n=n?"toastid_-_"+n+"":null;s=typeof s=="undefined"?true:Boolean(s);o=$.isArray(o)&&o.length?o[1]?(o[1]=Convert.strUpFirst(o[1].toString()),o.join("")):o.join(""):"bottomCenter";var p=2;var u={};if(!$.isEmptyObject(r)){var g=r.cancel.label,m=r.cancel.action;u=plugins.messenger.toast.construct.button(g,m);p=1}var h=null,v=null,b;if($.isArray(t)){h=t[0]||"";v=t[1]}else if(typeof t==="string"&&t&&(b=t.match(/<*.?class=["'](.*?)["']><\/*.?>(.*)/))){h=b[1];v=b[2]}else{v=t}if(h){h=d(h)}if(!v){console.warn("Cannot post notification toast as message text is missing");return}var y=a=="0"?false:parseInt(a)||2;l={icon:h,title:String(),message:v,position:o,class:f({position:o,message:v,type:_,timeout:y}),id:n,close:s,buttons:u,layout:p,timeout:y?y*1e3:y}}if(!l.id){l.id=e()}if(!l.zindex){l.zindex=10010}if(typeof iziToast==="object"){iziToast[_](l);return $("#"+l.id)}else{console.warn("Cannot load iziToast notification plugin")}},a=function(t){defaults={timeout:2e4,close:false,overlay:true,zindex:999999999,displayMode:"once",id:e(),color:"yellow",position:"center",buttons:[["",function(e,t){e.hide({transitionOut:"fadeOut"},t,"yes")},true],["",function(e,t){e.hide({transitionOut:"fadeOut"},t,"no")}]],onClosing:function(e,a,i){if(i==="yes"&&t.onCloseCallback&&typeof t.onCloseCallback==="function"){setTimeout(function(){t.onCloseCallback.call()},101)}}};defaults=$.extend(defaults,t||{});iziToast.question(defaults);return $("#"+defaults.id)},i={get:function(e){var t=$(document).find("#toastid_-_"+e+"");return t.length?t:null},hide:function(e){var t=this.get(e);if(t&&t.length){iziToast.hide({},t[0])}},destroy:function(e){var t=this.get(e);if(t&&t.length){$("#toastid_-_"+e+"").parent(".iziToast-capsule").remove()}}},n=function(e,t,a){if(e==="reset"){t="keyup";a={holdModifer:~~!false}}if(e==="reset"||e==="message-user-select"){var i=$(".iziToast > .iziToast-body > .iziToast-texts > .iziToast-message");a.holdModifer&&i.toggleClass("user-select-all",t==="keydown")}};document.addEventListener("DOMContentLoaded",function(){iziToast.settings({timeout:2e3,drag:$.browser.mobile,transitionIn:"fadeIn",transitionOut:"fadeOut",animateInside:false,position:"bottomCenter",layout:2,displayMode:2})});return{post:t,ask:a,toast:{get:i.get,hide:i.hide,destroy:i.destroy,hideAll:iziToast.destroy,construct:{button:function(t,a){var i=e("toastBtnClose");return[["",function(e,t){e.hide({onClosing:function(e,t,n){if(n===i){if(typeof a==="function"){a.call(this,t)}}}},t,i)},true]]}}},events:n}}();plugins.upload=function(e){e.removeAttr("onsubmit");e.on("submit.fm",function(e){e.preventDefault();e.stopPropagation();e.stopImmediatePropagation();var t=dayjs().unix()+""+parseInt(Math.random()*1e5),a=$(this),i=a.find(".ui_form_end_submit"),n=a.find('input[type="file"]')[0],s=n.files.length,o=a.find('input[name="dir"]').val(),r=$(n.files).map(function(e,t){return t.name}).get(),l=r.join("\n"),c=function(){theme_restore_buttons_class();$.fn.bootstrapFileInputReset(a);despinnerfy_buttons(0,i);i.addClass("disabled")},_=function(){if(s>1){plugins.messenger.post(''+theme_language("upload_successful").replace("$1",""+s+"").replace("$2","`"+o+"`").replace("'+theme_language("upload_successful_single").replace("$1",""+s+"").replace("$2","`"+o+"`").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){c();if(d(e)){return}e.status===200&&_()},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,a=0;e.addEventListener("progress",function(e){var i=e.target.responseText,n=/.file\.value\s+=\s+"(.*)";/g,s=/.size\.value\s+=\s+"(.*)";/g,o=/.pc\.value\s+=\s+"(.*)";/g,r=regex.matches(i,n,0,1),l=regex.matches(i,s,0,1),_=regex.matches(i,o,0,1);if(l){if(f){f=0;c()}var _=_||a?parseInt((_.match(/|/g)||[]).length/50*100):0;if(!_){a++}if(_>100){_=100}progress_percent.control(t,"success",_,[r,l,_])}if(!session.status(i)){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?"":session.server.data("user-id"))+"",complete:function(e){if(f){f=0;c()}if(theme_message_exists("uploadError_"+t+"")){return}e.status===200&&_()}})})};plugins.filter={options:function(e){var t='body[data-uri*="/'+v___location_file+'"] form[action="'+v___location_file+'"]',a="autocomplete-suggestions",i=" .select2 + .end_submits",n=i+" > .btn-group > .dropdown-toggle",s=$(n).parent(),o=n+" + ul",r=o+" > li ",l=r+" > input";var c=function(){$(l).autocomplete({lookup:e&&e.data?e.data:config_quick_access,minChars:0,appendTo:$(r),onSearchComplete:function(){var e=$(this).next("."+a+"");width=e.outerWidth()-20;parseInt(width)>0&&$(this).width(width)},onSelect:function(a){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}}data_url_query=v___location_file+"?module="+($(t).find('input[name="module"]').val()||"")+"§ion=";if(e&&e.url){data_url_query=e.url}var o=data_url_query+a.section+"&search="+($(this).val()||"");$(this).val("").blur();$(n).parent().trigger("click");$(this).autocomplete("dispose");get_pjax_content(o)},groupBy:"category",showNoSuggestionNotice:true,noSuggestionNotice:theme_language("global_no_results_found")})};if(e&&e.unlock){s.removeClass("cursor-na").find(".dropdown-toggle").removeClass("pointer-events-none").find(".cspinner").remove()}s.attr("data-placement","auto top").data("placement","auto top").tooltip("fixTitle");if(e&&e.tooltip&&e.tooltip.title){s.attr("data-original-title",theme_language(e.tooltip.title)).data("original-title",theme_language(e.tooltip.title)).attr("data-title",theme_language(e.tooltip.title)).data("title",theme_language(e.tooltip.title)).tooltip("fixTitle")}$(n).parent().on("hidden.bs.dropdown",function(){$(l).val("").blur().trigger("input")});$(n).parent().on("shown.bs.dropdown",function(){var e=$(this);c();$(l).focus();$(l).on("keydown.configauto",function(e){if(!e.ctrlKey&&!e.altKey&&!e.shiftKey&&!e.metaKey){var t=$(this).next("."+a+"");if(t&&t.length){t[0].scrollTop=0}$(this).off("keydown.configauto")}});var t=$(i).prev().prev("select"),n=t.val();if(n){var s=t.find('option[value="'+n+'"]').text(),o=$(i).find("."+a+""),r=o.find("strong:contains("+s+")");if(r&&r.length){r[0].parentNode.parentNode.scrollTop=r[0].offsetTop}}$(l).off("keydown.cqa").on("keydown.cqa",function(t){if(t.keyCode==13){t.preventDefault()}if(t.keyCode==27){e.trigger("click")}})});var _=uri_parse_param("search");if(_){var d=$('.container-fluid td:contains("'+_+'")').last().parent();if(d&&d.length){d[0].scrollIntoView();setTimeout(function(){var e="vertical";d.find("td").first().addClass("faa-"+e+"-narrow animated animated-count-1");setTimeout(function(){var e=d.find("td").last().find('input:not([type="radio"]), input[type="radio"]:checked, textarea, select').first();if(e&&e.length){e[0].focus()}},740)},0)}}}};plugins.pjax=function(){var e={_:null,set:function(e){this._=e},get:function(e){return this._?this._.getResponseHeader(e):null},getAll:function(){if(this._){var e=this._.getAllResponseHeaders(),t=e.trim().split(/[\r\n]+/),a={};t.forEach(function(e){var t=e.split(": ");var i=t.shift();var n=t.join(": ");a[i]=n});return a}else{return null}},send:{data:{},set:function(e){this.data=e},get:function(){var e=this.data;this.data={};return e}}},t={refresh:function(e,t){this.modal=$(".modal.in").length;if(this.modal&&!t){console.warn("Cannot refresh the page with opened modal window");return}else if(t){$(".modal.in").modal("hide")}if(location.pathname&&location.pathname.includes("/xerror")){window.history.back();console.warn("Cannot refresh error page. Commanded the browser to move back one page in the session history");return}if(e){set_onbeforeunload_status(0,0)}if(get_onbeforeunload_status()){get_onbeforeunload_message(false,"get_pjax_content(v___location_resource, false, false)","ev")}else{var a=vars.previous_request,i=vars.source_request,n=unbuffered_header_processor_allow(a&&a.target?a.target.action:false);if(a.type==="submit"){if(Test.str_contains_multi(a.target.action,["new","delete","add","remove"])||Test.str_contains_multi_regex($(a.currentTarget).serialize(),"::M::=[^0&\\s]",["new","delete","add","remove"])){var s=$('.container-fluid form [data-entry="view_refresh"]');if(s&&s.length===1){s.trigger("click")}console.warn("Cannot refresh modifier page");return}get_pjax_action_submit(a,false)}else{if(n&&i.length){get_pjax_content(i,false,false)}else{get_pjax_content(v___location_resource,false,false)}}}},link:{alter:function(e){const t=function(e){var t=e,a=function(){var e=localStorage.getItem(v___server_hostname+"-"+v___server_username+"-"+"fm-last-visited-dir");return e},i=a();if(i&&(t&&typeof t==="string"&&t.includes("/"+v___module_file_manager))){if(!uri_parse_param2("path",e)){var n="path="+i;if(t.includes(".cgi")){if(t.includes(".cgi?")){t+="&"+n}else{t+="?"+n}}else{t+="/index.cgi?"+n}t.replace(/[\/]+/g,"/");return t}return e}return e};e=t(e);return e}},interaction:{set:function(e){this.last=e},get:function(e){this.now=Date.now();if(e){return[this.last,this.now]}else{return parseInt((this.now-(this.last||this.now))/1e3)}}},events:{reset:function(){this.beforeSend._=[];this.start._=[];this.success._=[];this.complete._=[];this.beforeReplace._=[];this.end._=[]},beforeSend:{_:[],set:function(e){typeof e==="function"&&this._.push(e)},get:function(){!$.isEmptyObject(this._)&&this._.forEach(function(e){e.call()});this._=[]}},start:{_:[],set:function(e){typeof e==="function"&&this._.push(e)},get:function(){!$.isEmptyObject(this._)&&this._.forEach(function(e){e.call()});this._=[]}},success:{_:[],set:function(e){typeof e==="function"&&this._.push(e)},get:function(){!$.isEmptyObject(this._)&&this._.forEach(function(e){e.call()});this._=[]}},complete:{_:[],set:function(e){typeof e==="function"&&this._.push(e)},get:function(){!$.isEmptyObject(this._)&&this._.forEach(function(e){e.call()});this._=[]}},beforeReplace:{_:[],set:function(e){typeof e==="function"&&this._.push(e)},get:function(){!$.isEmptyObject(this._)&&this._.forEach(function(e){e.call()});this._=[]}},end:{_:[],set:function(e){typeof e==="function"&&this._.push(e)},get:function(){!$.isEmptyObject(this._)&&this._.forEach(function(e){e.call()});this._=[]}}}};return{headers:{set:e.set,get:e.get,getAll:e.getAll,send:e.send},page:{refresh:t.refresh,link:t.link,interaction:{set:t.interaction.set,get:t.interaction.get},events:{reset:t.events.reset,beforeSend:{set:t.events.beforeSend.set,get:t.events.beforeSend.get},start:{set:t.events.start.set,get:t.events.start.get},success:{set:t.events.success.set,get:t.events.success.get},complete:{set:t.events.complete.set,get:t.events.complete.get},beforeReplace:{set:t.events.beforeReplace.set,get:t.events.beforeReplace.get},end:{set:t.events.end.set,get:t.events.end.get}}}}}();plugins.page=function(){const e={register:function(){(function(e){var t=plugins.pjax.headers.get("refresh");e.clear();if(Test.numeric(t)){t=parseInt(t);if(t>=1){e.refreshTimer=setInterval(function(){var e=$(quirks.active_element());if(!e.is('input[type="search"]')&&!e.is('input[type="text"]')&&(vars.page_interaction<=0||plugins.pjax.page.interaction.get()>4)){plugins.pjax.page.refresh()}},t*1e3)}}})(e.refresh)},refresh:{clear:function(){typeof this.refreshTimer==="number"&&clearInterval(this.refreshTimer)}},mousemove:function(){const e=$(document.body),t="mousemove.tracker",a="#content";e.off(t,a);if(!settings_auto_open_panels_on_proximity){return}if(matchMedia("(any-hover: hover)").matches&&(matchMedia("(max-width: 1080px)").matches||parseInt(session.server.data("data-navigation-collapsed")))){e.on(t,a,function(e){const t=$(window).width(),a=this;if(e.pageX<=15&&!a._leftA&&!a._leftAStart){a._leftAStart=true;setTimeout(function(){a._leftA=true},vars.navigation.animation_speed*1.7+3);plugins.navigation.state.open()}else if(e.pageX>15&&a._leftA){a._leftA=false;a._leftAStart=false;plugins.navigation.state.close()}if(e.pageX>=t-15&&a._rightA&&a._rightAStart){a._rightAStart=false;setTimeout(function(){a._rightA=false},vars.navigation.animation_speed*1.7+3);plugins.slider.open()}else if(e.pageX .panel > .panel-body [data-row-type="ui-table"]'),_=c.length,d=matchMedia("(max-width: 992px)").matches,f=function(e,t){const a=e.closest('[data-row-type="ui-table"]');a.attr("data-column-span","all");if(t){a.attr("data-column-locked","1")}},p=function(e){e.attr({"data-column-span":"all","data-column-separator":"1","data-column-locked":"1"})},u=function(e,t){e.attr({"data-column-span":"all"});if(t){e.attr("data-column-locked","1")}},g=function(e){e.not("[data-column-locked]").removeAttr("data-column-span");e.find("[data-content-separator]").remove()},m=function(){const e=['[data-tbody-type="ui-table"]'];e.forEach(function(e){const t=document.querySelectorAll(e);t.forEach(function(e){const t=$(e).find('input[name="all_mins"], input[name="all_hours"], input[name="all_days"], input[name="all_months"], input[name="all_weekdays"]');if(t.length===10){const e=t.first();f(e,true);u(e.closest('[data-row-type="ui-table"]').prev("tr"),true);const a=e.closest("table");if(a.hasClass("table-hardcoded")){a.removeClass().addClass("table table-striped table-condensed no-hover").parent("td").removeClass().addClass("col_value col_header").parent("tr").attr({"data-row-type":"ui-table","data-column-span":"all","data-column-locked":"1"})}}const a=[".ui_multi_select_row",".opener_table_cell_style_small",".vui_features_sorted_grid",".opener_table_style",".CodeMirror",".dnd_updown","table.no-hover",'textarea[name="extracas"]','[data-radio-table] textarea[name="paste"]','input[name="resources_mode"]','textarea[name="dns"]','textarea[name="namedconf"]','textarea[name="web"]','textarea[name="disabled_web"]','textarea[name="logrotate"]','textarea[name="logrotate_files"]','textarea[name="ftp"]','input[name="ftp_dir"]',".col_value > textarea:only-child","[data-table-backup-mode]",'textarea[name="settings_leftmenu_custom_links"]',"td:only-child > .ui_textarea:first-child",'td[colspan="3"] > .awradio:first-child ~ br ~ .ui_textarea:last-child',"#show_backup_destination",'input[name="what_nofiles"]',".table-cell-padded"];f($(e).find(a.join()).not("[name*='extra_']"),true);const i=$(e).find('[data-row-type="ui-table"]');if(i.length===1){i.attr("data-column-span","all")}p($(e).find("td.no-border").parents("tr").add($(e).find("hr[data-row-separator]").parents("td").parents("tr")));const n=$(e).parents(".sub_table_container").parent("td").parent("tr").addClass("bg-transparent");const s=n.find("> td").find("p, b");s.each(function(){if(!$.trim($(this).html())){$(this).remove()}});const o=$(e).find('> [data-row-type="ui-table"]'),r="column-overflow-x-auto",l="data-content-separator";o.each(function(){const e=$(this).find("> td.col_value"),t=e.innerWidth();g($(this));e.removeClass(r);if(Math.ceil($(this).outerWidth())=Math.ceil(t-12)){const t='input[type="text"], input[type="password"], textarea, select';e.find("> .awradio").each(function(){if($(this).index()>0&&!$(this).prev().is("br, ["+l+"]")&&!$(this).next().is("br, .awradio, table")&&($(this).next().is(t)||$(this).next().has(t).length)){$(this).before("
")}})}});if(browser.detect.firefox()){e.find(".ui_radio_table > tbody").find('tr:last-child:has(input[type="text"], select)').addClass("firefox__has_input_select")}});$(e).find("> tr").each(function(){if($(this).find("> td.col_value").children().length===1&&$(this).find("> td.col_value").children(".awobject").length===1){$(this).attr("data-row-subtype","narrow")}})})})},h="layout-columns",v="layout-width";$(document.documentElement).attr("data-"+h+"",config_portable_table_rows_to_columns_number);$(document.documentElement).attr("data-"+v+"",config_portable_table_rows_to_columns_width);r.removeAttr(l);if(_&&(s(d)||n())){r.attr(l,1),o=true}else{r.removeAttr(l)}if(_){m()}const b="ui-table-layout",y="data-"+b+"",x="a["+y+"]";$(x).remove();if(_&&settings_right_table_layout_control&&a()&&i()){const e=config_portable_table_rows_to_columns||d?true:false,t=config_portable_table_rows_to_columns_break?true:false,a=e?"on":"off",i=e?' checked="checked"':String(),n=!e?' checked="checked"':String(),s=t?' checked="checked"':String(),o=!t?' checked="checked"':String(),_=d?"disabled ":String(),f="layout-popover",p="layout-type",u="layout-break",g="layout-remove-control",k="data-layout-opts",w="data-layout-control-save",A="why-explanation",C="#headln2l .btn-group",S=$(C).length?$(C):$(C+"-vertical-small");S.first().append('');$(x).find("i").tooltip({container:"body",trigger:"hover",placement:"bottom",delay:{show:vars.plugins.tooltip.delay.show,hide:vars.plugins.tooltip.delay.hide}});const I=`\n
\n \n
\n \n \n \n   \n \n \n \n \n \n
\n
\n
\n \n
\n
\n \n \n ${config_portable_table_rows_to_columns_number}\n \n \n
\n
\n \n \n ${config_portable_table_rows_to_columns_width}px\n \n \n
\n \n
\n \n \n \n   \n \n \n \n \n
\n
\n
\n \n \n \n \n
\n
\n \n
\n `;$(x).popover({html:true,sanitize:false,container:"#content",title:function(){return theme_language("columns_layout_title")+'"},content:function(){return I},placement:window.matchMedia("(max-width: 767px)").matches?"left":"right"});$("."+f).remove();$(x).on("inserted.bs.popover",function(){const e=$(this).attr("aria-describedby"),t=$("#"+e),a=t.find(".close"),i=t.find("["+k+"]"),n=t.find('input[name="'+p+'"]'),s=t.find('input[name="'+h+'"]'),o=t.find('input[name="'+v+'"]'),_=t.find('input[name="'+u+'"]'),d=t.find('input[name="'+g+'"]'),y=t.find('[type="button"]').last();t.addClass("z-index-10001 "+f+"").find(".popover-content").addClass("overflow-hidden");n.on("input",function(e){const t=$(x),a=t.data(b),n=a==="on"?"off":"on",s=t.find(".fa2");if(a==="on"){r.removeAttr(l);config_portable_table_rows_to_columns=false;i.addClass("hidden");$.each(c,function(){snippets.page.render_table_labels(c)})}else{r.attr(l,1);config_portable_table_rows_to_columns=true;i.removeClass("hidden");c.find(".col_label").removeClass().addClass("col_label").find("b").removeClass();m()}t.data(b,n);s.removeClass("fa2-grid-"+a+"").addClass("fa2-grid-"+n+"");$(x).popover("reposition")});a.on("click",function(){$(x).trigger("click");plugins.page.format.columns(true)});s[0].addEventListener("input",function(e){$(document.documentElement).attr("data-"+h+"",e.target.value);$(e.target).prev().text(e.target.value);config_portable_table_rows_to_columns_number=parseInt(e.target.value);m()});o[0].addEventListener("input",function(e){$(document.documentElement).attr("data-"+v+"",e.target.value);$(e.target).prev().text(e.target.value+"px");config_portable_table_rows_to_columns_width=parseInt(e.target.value);m()});_.on("input",function(e){const t=$(x);config_portable_table_rows_to_columns_break=!!parseInt(this.value);m()});d[0].addEventListener("input",function(e){y.toggleClass("btn-grey",e.target.checked);y.find("span").text(theme_language(e.target.checked?"columns_layout_remove_button":"global_save"))});y[0].addEventListener("click",function(e){settings_right_table_layout_control=d.is(":checked")?false:true;spinnerfy_button_tiny($(this));theme.config.save(["settings_right_table_layout_control","config_portable_table_rows_to_columns"]);setTimeout(function(){if(!settings_right_table_layout_control){$("."+f).remove()}},vars.event.double_click_delay)});t.find("."+A).tooltip({container:"body",trigger:"hover",placement:"bottom",delay:{show:0,hide:vars.plugins.tooltip.delay.hide}})})}}};return{format:{columns:t.columns},events:{register:e.register,mousemove:e.mousemove,refresh:{clear:e.refresh.clear},pjax:{start:e.pjax.start,before:e.pjax.before}}}}();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()}).appendTo(r)}).promise().done(function(){r.submit()});return}var l=e.attr("name")?e.attr("name"):e.attr("id"),o=$.trim(e.val());var s=r;if(r.parents(".alert").length&&r.find(".ui_form_end_buttons .end_submits").length){s=r.find(".ui_form_end_buttons .end_submits")}$('').attr({type:"hidden",class:"hidden hidden-force",name:l,value:o}).appendTo(s);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="ui_form_elements_wrapper",l=".btn-group.end_submits:visible button.ui_form_end_submit",o='form:not([data-tester="1"]):not(#webmin_search_form)';if(e){return $(l).hasClass(a)}$(document).on(t,o,function(e){if(e.originalEvent===undefined||e.originalEvent&&!e.originalEvent.inputType){return}if($(e.target).parent().is("."+r)){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,s=$(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")||(s&&s.includes("edit_tmpl.cgi")||s&&s.includes("config.cgi"))||$(".modal.in.mppopup").length){t.attr(n,1);return}var _=$(e.target).is('input[type="checkbox"], input[type="radio"]'),c=$(e.target).parents("tr"),d=_&&c&&c.length&&c.attr("class")&&c.attr("class").includes("ui_checked");if(d){return}theme_restore_buttons_class();var f=t.find(l),p=f.first(),u=String("btn-xclass"),h=f.data(i)===1;if(p[0]&&p[0].classList){var g=p[0].classList.value.match(/.*(btn-\S+)/);if(g){u=g[1];p.attr("data-class-restore",u)}}if(f&&f.length){set_onbeforeunload_status(1);if(!h){f.data(i,1);p.removeClass(u).addClass(a);t.attr(n,1);f.one("click",function(){f.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(p.hasClass(a)){e.preventDefault();p.trigger("click")}else{set_onbeforeunload_status(0)}}})}}})};snippets.inject_extra_option=function(e,t,i,a,n,r){if(e==="tr/yes:no"){var l=$("body"),o=t.parents("form");t.parents("td.col_value").parent("tr").after(""+''+a+""+''+''+''+'"+''+'"+""+""+"");var s="submit."+i+"";l.off(s);l.one(s,o,function(){var e=Test.true($("[name="+i+"]:checked").val());window[i]=e;theme.config.save()})}if(e&&e.includes("checkbox:")){var _=parseInt(Math.random(11)*100),c=n&&n.checked?"checked ":String(),d=n&&n.extraClass&&n.extraClass.main?" "+n.extraClass.main:String(),f,p=''+"'+" '+'"+""+''+"";if(n){if(n.getHtml){return p}if(n.style){f=$(p).css(n.style)}}if(e==="checkbox:after"){t.after(f||p)}if(e==="checkbox:before"){t.before(f||p)}if(r){r.call()}}};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 dayjs!=="undefined"){var r=n.data(a);if(r){var l=r+1;n.data(a,l);n.text(dayjs(l*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(){var e="x",t="-",i="md",a="d",n="t",r=e+t+i+t,l=function(e,i){var l=e.tagName.endsWith((t+a).toUpperCase())?1:0,o=e.tagName.includes(r+n)?0:1,s=e.outerHTML.indexOf(";1")>-1?1:0,_=e.outerHTML.indexOf(";2")>-1?1:0,c=e.outerHTML.indexOf(";-1")>-1?1:0,d=core.curModule("proc")?1:0,f=$(e).text(),p=l?f.split(";")[0]:f,u=config_portable_theme_locale_format_short||"L",h=config_portable_theme_locale_format_long||"LL",g=config_portable_theme_locale_format_time||"LT",m=dayjs.unix(p).format("l");m=m.indexOf("/")>-1?"/":m.indexOf("-")>-1?"-":".";var v=dayjs.unix(p).utcOffset(get_utc_offset()).format(g),b=_?dayjs.unix(p).utcOffset(get_utc_offset()).format("YYYY["+m+"]MM["+m+"]DD")+" "+(o?String():v):dayjs.unix(p).utcOffset(get_utc_offset()).format(!s?u:h);if(d){c=1;if(e&&typeof e.outerHTML==="string"&&e.outerHTML.includes(r+n)){$(e).remove()}}if(c){if(!isNaN(p)){p*=1e3}var x=dayjs(p).fromNow(),y=parseInt((dayjs().unix()-dayjs(p).unix())/(60*60*24)),w=dayjs(p).format("LT"),k=dayjs().format("YYYY"),C=dayjs(p).format("YYYY"),M=dayjs(p).format("ll"),F=dayjs(p).format(u);if(core.curModule("mailbox")){if(y===0){x=w}else if(k==C){x=M.replace(k,"").replace(",","")}else{x=F}}v=x;b=x}var j;if($(e).is("td")){j=$(e)}else{j=$(e).parent("td")}j.is("td")&&j.attr("data-order",p);if(i){return!l?v:b}else{$(e).replaceWith(!l?v:"-1?' data-placement="auto top" data-container="body" data-toggle="tooltip" data-title="'+(c?dayjs(p).calendar(null,{sameElse:"LLL"}):dayjs.unix(p).fromNow())+'"':"")+">"+b+"")}};$.each($(r+a).add(r+n).add($("td:contains("+(r+a)+")")).add($("td:contains("+(r+n)+")")).add("option:contains("+(r+a)+")").add("option:contains("+(r+n)+")"),function(a,n){var o=!n.tagName.startsWith(r.toUpperCase());if(o){var s=$(n).text(),_=Convert.htmlUnEscape(s);var c="";$.each($(_),function(a,n){var r=$(n)[0].tagName&&$(n)[0].tagName.startsWith((e+t+i).toUpperCase());if(r){c+=l($(n)[0],1)+" "}}).promise().done(function(){$(n).text(c)})}else{l(n,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(){var e=theme.version(false,true);if(theme.version.current&&e&&e!==theme.version.current&&!vars.cache.theme_updating){!theme_message_exists("theme_update_refresh")&&theme.update_message()}},300)}).ajaxError(function(e,t,i){if(t.statusText!=="canceled"&&t.statusText!=="abort"){connection_error(t,0,false,i)}});$.ajaxSetup({complete:function(e,t){var i="container session_login";if(Test.strContains(e.responseText,i)||e&&(e.getResponseHeader("Auth-type")==="auth-required=1"||e.responseText&&(e.responseText.indexOf("reset-fonts-grids-base")>-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);set_ajax_send_headers(e,t)}})};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}if(e.target.target==="_blank"){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){plugins.pjax.page.events.reset();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){plugins.pjax.page.events.start.get();plugins.page.events.refresh.clear();vars.pjax.replace_contents=1;vars.pjax.event.end=1;vars.pjax.progressing=1;plugins.navigation.detectAllowed=true;if(t){session.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){plugins.pjax.page.events.beforeReplace.get();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;mail_page_check()}}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()}}plugins.page.events.pjax.before()});$(document).on("ready pjax:beforeSend",function(e,t,i){plugins.pjax.page.events.beforeSend.get();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_blob(i)){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()}plugins.page.format.columns(true);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}}}i.url=plugins.pjax.page.link.alter(i.url);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])]}}plugins.page.events.pjax.before();v___theme_pjax_call+=1});$(document).on("pjax:success",function(event,data,status,xhr,options){plugins.pjax.page.events.success.get();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){plugins.page.events.refresh.clear();vars.pjax.initial_load=1;vars.allow_ui_features=1;vars.pjax.progressing=0;plugins.pjax.page.events.complete.get();if(v___theme_reload){theme_reload()}progress.end();session.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());setTimeout(function(){plugins.navigation.detectAllowed=true},1e3)});$(document).on(vars.h.event.page.end,function(e,t){vars.pjax.cache.set("enable");plugins.pjax.page.events.end.get();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);vars.pjax.popstate&&plugins.page.format.columns(true);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;vars.pjax.popstate=true;setTimeout(function(){vars.pjax.popstate=false},10);set_pjax_send_headers(e.state.url,e);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()}};var i=session.server.data("webprefix");if(i&&e){e=e.toString();if(!e.startsWith(i)){e=i+(e.startsWith("/")?e:"/"+e)}}if(!e){t();return}var a=unbuffered_header_processor_allow,n=!a(e),r=function(e){var t=URI(e).directory();if(t&&t!="/"&&t!=v___location_prefix){return t}else{return false}};if(a(e,1)){n=0;var l=r(e);if(l){get_pjax_content(l+"/");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|delete_domain).*\.cgi.*/g)||e.match(/.*(newkey|savekey|save_ipkey|newcsr).*\.cgi.*/g)||e.includes("index.cgi?action=upgrade")||e.includes("shell/index.cgi"))){var o=r(e);if(o){get_pjax_content(o);return}}var s=session.server.data("initial-wizard");if(e&&n){if(Test.strContains(e,v___module_file_manager+"/config.cgi")){get_pjax_content(v___location_prefix+"/"+v___module_file_manager);return}if(s!="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);if(document.hasFocus()||document.visibilityState!=="hidden"){e&&get_pjax_content(e)}else{page.branding.process(true);e&&get_pjax_content(e)}}};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:n||$("[data-fbplacement]").length?"auto bottom":"auto 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"], .servers-index-link .popover-trigger',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();plugins.page.format.columns(true);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}});if(platform.detect()==="mac"){a=a.replaceAll("Ctrl +","⌘ +");a=a.replaceAll("Alt +","⌥ +")}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],l=n[1],o=n[2];if(!l){return}var s=t.attr("href").indexOf("/file-manager")>-1,_='',c=t.attr("href").indexOf("showpass.cgi")>-1,d=t.attr("href").indexOf("/locale")>-1||s;if(c){_=""}r=_+""+r+"";t.data("title",r);t.data("content",o);var f=String(),p=t.hasClass("btn-link");if(o&&(o.length>1024||o.includes("

")||o.includes("
    ")||o.includes(""))){f=" popover_extra_width"}var u=function(){return matchMedia("(max-width: 767px)").matches},h=u()||d?"bottom":"auto right";if(a&&a.includes("strftime")){h="top"}if(s){h="auto right";if(window.matchMedia("(max-width: 767px)").matches){h="bottom"}}if(t.hasClass("place-top")){h="top"}t.data("placement",h);var g=t.parent(),m=".container-fluid";if(t.parents(".opener_table_style")&&t.parents(".wrapped-accordion")){g=t.parents(".wrapped-accordion").parent();if(!g.length){g=m}}t.popover({html:true,sanitize:false,container:p||c||d?m:g,template:'',title:function(){return r},content:function(){return o},placement:h});t.popover("show");var v="shown.bs.popover";t.off(v);t.on(v,function(){var e=$(this),t=e.next(".popover.module-help"),a=t.hasClass("right")?" right":"",n=function(){var t=".popover.module-help",i=e.next(t);return i.length?i:$(".container-fluid > .popover.module-help:last-child")};$(this).addClass("activated"+a+"");n().find(".popover:visible").addClass("module-help");$('body[class*="'+v___module_file_manager+'"]').find(".popover:visible").addClass("file-manager-help");!window.matchMedia("(max-width: 992px)").matches&&$(this).closest("tr").addClass("popover-active");var r=".popover.module-help",l=n(),o="click.tmpclkpopover";l.undelegate(o);l.find("a").addClass("allowed");l.on(o,"a",function(e){e.stopPropagation();e.stopImmediatePropagation();var t=$(this),a=t.attr("href"),n=t.parents(r),l=n.find(".popover-title > span"),o=n.find(".popover-content");if(a&&a.startsWith("http")){t.attr("target","_blank")}else{e.preventDefault();var s=v___location_prefix+"/help.cgi/"+v___module+"/"+a;$.ajax({type:"POST",url:s,dataType:"text",success:function(e){if(!session.status(e)){return}var t=i(e),a=t[0],r=t[1];l.text(a);o.html(r);n.find("a").addClass("allowed")}})}});setTimeout(function(){var e=$(".popover.module-help"),t=e.length;$.each(e,function(e){if(t===e+1){popover_visibility_position($(this))}}).promise().done(function(){var e=n();if(e.length){e.trigger("click")}})},10)});var b="hidden.bs.popover";t.on(b,function(){$(this).closest("tr").removeClass("popover-active");$(this).removeClass("activated right");t.off(v)})}})})};snippets.page.render_links_dashboard=function(){theme_buttonify(["/sysinfo.cgi"],".container-fluid table td[data-td-e]",'a[href*="webminlog/"]',"btn btn-info btn-xxs f__lnk_t_btn-el vertical-align-top margined-top-1 ---forced",0,"","","","|");theme_buttonify(["/sysinfo.cgi"],".container-fluid table td[data-td-e]",'a[href*="delete_session.cgi"]',"btn btn-danger f__lnk_t_btn-el btn-xxs vertical-align-top margined-left--1 margined-top-1 ---forced","fa-unplugged");theme_buttonify(["/sysinfo.cgi"],".container-fluid table td[data-td-e]",'a[href*="list_sessions.cgi"]',"btn btn-link-bordered f__lnk_t_btn-el btn-xxs vertical-align-top margined-left--1 margined-top-1 ---forced","fa-cog no-btn-text");theme_buttonify(["/sysinfo.cgi"],".container-fluid",'a[href*="acl/list_sessions.cgi"]',"btn btn-default","fa-group-o","users","","","|");theme_buttonify(["/sysinfo.cgi"],".container-fluid",'a[href*="virtual-server/search.cgi"]',"btn btn-info btn-xxs f__lnk_t_btn-el vertical-align-top margined-top-1 margined-left-4 ---forced",0,"","","","|");theme_buttonify(["/sysinfo.cgi","/virtual-server/edit_newchangelog.cgi","/server-manager/edit_newchangelog.cgi"],".container-fluid #newfeatures-virtual-server-1-collapse dt, .container-fluid #newfeatures-server-manager-1-collapse dt, .container-fluid .table td dt","a","btn btn-link btn-link-bordered btn-xxs btn-dnwo f__lnk_t_btn-el margined-left-3 vertical-align-top margined-top-1","fa-eye","|","")};snippets.page.render_links=function(e){theme_buttonify(["/syslog-ng/list_destinations.cgi"],".container-fluid .table tbody tr td:last-child",'a[href*="view_log.cgi"]',"btn btn-transparent btn-link-bordered btn-xxs vertical-align-top margined-top-1","");theme_buttonify(["/virtual-server/edit_newmysqls.cgi"],".container-fluid .table tbody tr td:last-child","a.ui_link","btn btn-transparent btn-link-bordered btn-xxs vertical-align-top margined-top-1","fa-cog");theme_buttonify(["/cluster-cron/","/cluster-cron/index.cgi","/cluster-copy/","/cluster-copy/index.cgi"],".container-fluid .table tbody tr td:last-child","a.ui_link","btn btn-transparent btn-link-bordered btn-xxs vertical-align-top margined-top-1","fa-play");theme_buttonify(["/virtualmin-git/","/virtualmin-git/index.cgi"],".container-fluid table td[data-td-e]",'a[href*="delete.cgi"]',"btn btn-danger btn-xxs vertical-align-top margined-top-1 ---forced","fa-times-circle","","","","|");theme_buttonify(["/virtualmin-git/","/virtualmin-git/index.cgi"],".container-fluid table td[data-td-e]",'a[href*="//"]',"btn btn-transparent btn-link-bordered btn-xxs vertical-align-top margined-left--2 margined-top-1 ---forced","");theme_buttonify(["/virtualmin-git/","/virtualmin-git/index.cgi"],".container-fluid table td[data-td-e]",'a[href*="help.cgi"]',"btn btn-info btn-xxs vertical-align-top margined-left--2 margined-top-1 ---forced","");theme_buttonify(["/webalizer/","/webalizer/index.cgi"],".container-fluid .table tbody tr td:last-child","a.ui_link","btn btn-transparent btn-link-bordered btn-xxs vertical-align-top margined-top-1",0);theme_buttonify(["/cpan/edit_mod.cgi"],".container-fluid .table tbody tr td","a.ui_link","btn btn-transparent btn-link-bordered btn-xxs vertical-align-top margined-top-3 margined-right--1 btn-dnwo ---forced","","","","","|");theme_buttonify(["/forward/index.cgi","/forward/"],".container-fluid",'.panel-body > a:first[href*="simple"]',"btn btn-default _btn-links-top btn-xs vertical-align-top margined-top-1 margined-left-3",0,"","","","|");theme_buttonify(["/forward/index.cgi","/forward/"],".container-fluid",".panel-body > span[data-unckecked]","btn btn-info _btn-links-top btn-xs vertical-align-top margined-top-1 margined-left-3",0,"","","","|");theme_buttonify(["/acl/list_sessions.cgi"],".container-fluid table td[data-td-e]",'a[href*="webminlog/"]',"btn btn-info btn-xxs vertical-align-top margined-top-1 ---forced",0,"","","","|");theme_buttonify(["/acl/list_sessions.cgi"],".container-fluid table td[data-td-e]",'a[href*="delete_session.cgi"]',"btn btn-danger btn-xxs vertical-align-top margined-left--2 margined-top-1 ---forced","fa-unplugged");snippets.page.render_links_dashboard();theme_buttonify(["/virtual-server/","/virtual-server/index.cgi","/virtual-server/edit_plan.cgi","/virtual-server/search.cgi"],".container-fluid form table tbody td",'a[href*="list_users.cgi?"], a[href*="list_aliases.cgi?"]',"btn btn-link btn-link-bordered btn-xxs btn-hover-hide vertical-align-top margined-top-1",0,"(~)"," ~ ","");theme_buttonify(["/server-manager/","/server-manager/index.cgi"],".container-fluid form table tbody td",'a[href*="mass_update_form.cgi?"]',"btn btn-link btn-link-bordered btn-xxs btn-transparent btn-link-bordered vertical-align-top margined-left-3 margined-top-1",0,"","","","-");theme_buttonify(["/quota/","/quota/index.cgi"],".container-fluid .table tbody td[data-td-e]",'a[href*="activate.cgi"][href*="&active=3"]',"btn btn-warning btn-xxs vertical-align-top margined-top-1","fa-ban");theme_buttonify(["/quota/","/quota/index.cgi"],".container-fluid .table tbody td[data-td-e]",'a[href*="activate.cgi"][href*="&active=0"]',"btn btn-success btn-xxs vertical-align-top margined-top-1","fa-check-circle-o");theme_buttonify(["/virtualmin-google-analytics/","/virtualmin-google-analytics/index.cgi"],".container-fluid .table tbody td[data-td-e]",'a[href*="edit.cgi"]',"btn btn-warning btn-xxs vertical-align-top margined-top-1","fa-pencil-square");theme_buttonify(["/apache/","/apache/index.cgi"],".container-fluid .table tbody tr td:last-child","a.ui_link","btn btn-transparent btn-link-bordered btn-xxs vertical-align-top margined-top-1","fa-external-link");theme_buttonify(["/ldap-server/edit_schema.cgi"],".container-fluid table tr.ui_checked_columns td",'a[href*="view_sfile.cgi"]',"btn btn-info btn-xxs vertical-align-top margined-top-1 ---forced",0,"","","","|");theme_buttonify(["/ldap-server/edit_schema.cgi"],".container-fluid table tr.ui_checked_columns td",'a[href*="edit_sfile.cgi"]',"btn btn-warning btn-xxs vertical-align-top margined-left--2 margined-top-1 ---forced","fa-pencil-square-o");theme_buttonify(["/virtualmin-awstats/generate.cgi"],".container-fluid .panel-body",'a[href*="view.cgi?config="]',"btn btn-link-bordered btn-xxs vertical-align-top margined-top-2","fa-eye","","");theme_buttonify(["/mailbox/list_addresses.cgi"],".container-fluid",'a[href^="list_addresses.cgi"][href*="add="]',"btn btn-default btn-block btn margined-top-10","fa-plus-circle");theme_buttonify(["/mailbox/list_addresses.cgi"],".container-fluid table td",'a[href^="list_addresses.cgi"][href*="edit="]',"btn btn-primary btn-xxs btn-hover-hide vertical-align-top margined-top-1 margined-left--2 ---forced pull-right","fa-pencil-square-o");theme_buttonify(["/mailbox/list_addresses.cgi"],".container-fluid table td",'a[href^="save_address.cgi"],a[href^="save_group.cgi"][href*="gdelete="]',"btn btn-danger btn-xxs btn-hover-hide vertical-align-top margined-top-1 margined-left--2 ---forced pull-left","fa-times-circle");theme_buttonify(["/mailbox/list_addresses.cgi"],".container-fluid table td",'a[href="list_addresses.cgi?mode=users"],a[href="list_addresses.cgi?mode=groups"]',"btn btn-default btn-xxs btn-xxs--g-edit vertical-align-top margined-top-1 margined-left--2 pull-right btn-dnwo","fa-times-circle-o");theme_buttonify(["/cron/","/cron/index.cgi"],".container-fluid .table tbody tr td",'a.ui_link[href*="exec_cron.cgi"]',"btn btn-success btn-link-bordered btn-xxs vertical-align-top margined-top-1","fa-play");theme_buttonify(["/cron/","/cron/index.cgi"],".container-fluid .table tbody tr td",'a.ui_link[href*="kill_cron.cgi"]',"btn btn-danger btn-link-bordered btn-xxs vertical-align-top margined-top-1","fa-stop fa-0_75x no-vt-al fa-fw margined-right-1 faa-flash animated");theme_buttonify(["/at/","/at/edit_job.cgi"],".container-fluid .table tbody tr td",'a.ui_link[href*="edit_job.cgi?full=1"]',"btn btn-default btn-xxs btn-tiny btn-dnwo ui_link_replaced pull-right margined-top-2");theme_buttonify(["/phpini/","/phpini/index.cgi"],".container-fluid .table tbody tr td",'a[href*="list_ini.cgi"]',"btn btn-success btn-xxs btn-xxs f__lnk_t_btn-el vertical-align-baseline","fa-cog","","","","|");theme_buttonify(["/phpini/","/phpini/index.cgi"],".container-fluid .table tbody tr td",'a[href*="edit_manual.cgi"]',"btn btn-primary btn-xxs btn-xxs f__lnk_t_btn-el vertical-align-baseline ---forced","fa-pencil");theme_buttonify(["/virtualmin-awstats/","/virtualmin-awstats/index.cgi"],".container-fluid .table tbody tr td",'a[href*="view.cgi"]',"btn btn-success btn-xxs btn-xxs f__lnk_t_btn-el vertical-align-baseline","fa-eye","","","","|");theme_buttonify(["/virtualmin-awstats/","/virtualmin-awstats/index.cgi"],".container-fluid .table tbody tr td",'a[href*="config.cgi"]',"btn btn-grey btn-xxs btn-xxs f__lnk_t_btn-el vertical-align-baseline ---forced","fa-cog");var t=$(".container-fluid .ui_links_row"),i="ui_link_empty";if(core.curModule("firewall",1)||core.curModule("firewall6",1)){t.first().find("."+i+"").addClass("btn-warning").removeClass("btn-success")}if($('body[class*="status"]').length&&v___location_file=="edit_mon.cgi"||v___location_path==v___location_prefix+"/virtual-server/list_sched.cgi"||v___location_path==v___location_prefix+"/software/list_pack.cgi"||v___location_path==v___location_prefix+"/mailboxes/view_mail.cgi"||v___location_path==v___location_prefix+"/mailbox/view_mail.cgi"||v___location_path==v___location_prefix+"/mailboxes/reply_mail.cgi"||v___location_path==v___location_prefix+"/mailbox/reply_mail.cgi"||v___location_path==v___location_prefix+"/mailbox/list_folders.cgi"||v___location_path==v___location_prefix+"/mailbox/list_ifolders.cgi"||v___location_path==v___location_prefix+"/fsdump/"||v___location_path==v___location_prefix+"/fsdump/index.cgi"||v___location_path==v___location_prefix+"/fdisk/"||v___location_path==v___location_prefix+"/fdisk/index.cgi"||v___location_path==v___location_prefix+"/logviewer/"||v___location_path==v___location_prefix+"/logviewer/index.cgi"||v___location_path==v___location_prefix+"/syslog/"||v___location_path==v___location_prefix+"/syslog/index.cgi"){$.each($('tr td:last-child > .ui_links_row, tr td:last-child:contains("|")'),function(){var e=$(this).parent(),t="ui_link btn-inverse btn-tiny";if(v___location_path==v___location_prefix+"/virtual-server/list_sched.cgi"){e.find('a[href^="backup_form.cgi"]').html(""+e.find('a[href^="backup_form.cgi"]').text().replace(/\.\.$/," ")+"").addClass("ui_link_replaced btn btn-success btn-xxs margined-top--2 f__lnk_t_btn-el").removeClass(t).prepend('  ');e.find('a[href^="restore_form.cgi"]').html(""+e.find('a[href^="restore_form.cgi"]').text().replace(/\.\.$/," ")+"").addClass("ui_link_replaced btn btn-primary btn-xxs margined-top--2 f__lnk_t_btn-el").removeClass(t).prepend('  ');e.find('a[href^="backuplog.cgi"]').html(""+e.find('a[href^="backuplog.cgi"]').text().replace(/\.\.$/," ")+"").addClass("ui_link_replaced btn btn-info btn-xxs margined-top--2 f__lnk_t_btn-el").removeClass(t).prepend('  ')}if(v___location_path==v___location_prefix+"/fdisk/"||v___location_path==v___location_prefix+"/fdisk/index.cgi"){e.find('a[href^="edit_hdparm.cgi"]').html(""+e.find('a[href^="edit_hdparm.cgi"]').text().replace(/\.\.$/," ")+"").addClass("ui_link_replaced btn btn-success btn-xxs f__lnk_t_btn-el").removeClass("heighter-34").removeClass(t);e.find('a[href*="smart-status/index.cgi"]').html(""+e.find('a[href*="smart-status/index.cgi"]').text().replace(/\.\.$/," ")+"").addClass("ui_link_replaced btn btn-info btn-xxs f__lnk_t_btn-el").removeClass("heighter-34").removeClass(t);e.find('a[href^="blink.cgi"]').html(""+e.find('a[href^="blink.cgi"]').text().replace(/\.\.$/," ")+"").addClass("ui_link_replaced btn btn-warning btn-xxs f__lnk_t_btn-el").removeClass("heighter-34").removeClass(t)}if(v___location_path==v___location_prefix+"/mailbox/list_folders.cgi"||v___location_path==v___location_prefix+"/mailbox/list_ifolders.cgi"){e.find('a[href^="index.cgi"]').html(""+e.find('a[href^="index.cgi"]').text().replace(/\.\.$/," ")+"").addClass("ui_link_replaced btn btn-success btn-xxs").removeClass("heighter-34").removeClass(t).removeClass(t).prepend('  ');e.find('a[href^="edit_auto.cgi"]').html(""+e.find('a[href^="edit_auto.cgi"]').text().replace(/\.\.$/," ")+"").addClass("ui_link_replaced btn btn-info btn-xxs").removeClass("heighter-34").removeClass(t).removeClass(t).prepend('  ');e.find('a[href^="copy_form.cgi"]').html(""+e.find('a[href^="copy_form.cgi"]').text().replace(/\.\.$/," ")+"").addClass("ui_link_replaced btn btn-warning btn-xxs").removeClass("heighter-34").removeClass(t).removeClass(t).prepend('  ')}if(v___location_path==v___location_prefix+"/mailboxes/view_mail.cgi"||v___location_path==v___location_prefix+"/mailbox/view_mail.cgi"||v___location_path==v___location_prefix+"/mailboxes/reply_mail.cgi"||v___location_path==v___location_prefix+"/mailbox/reply_mail.cgi"){e.find('a[href^="detach.cgi"]:not([href*="&save=1"]):not([target="_blank"])').html(""+e.find('a[href^="detach.cgi"]:not([href*="&save=1"]):not([target="_blank"])').text().replace(/\.\.$/," ")+"").addClass("ui_link_replaced btn btn-primary btn-xxs").removeClass("heighter-34").removeClass(t).removeClass(t).prepend('  ');e.find('a[href*="detach.cgi"][target="_blank"]').html(""+e.find('a[href*="detach.cgi"][target="_blank"]').text().replace(/\.\.$/," ")+"").addClass("ui_link_replaced btn btn-success btn-xxs").removeClass("heighter-34").removeClass(t).prepend('  ');e.find('a[href*="&save=1"]:not([target="_blank"])').html(""+e.find('a[href*="&save=1"]:not([target="_blank"])').text().replace(/\.\.$/," ")+"").addClass("ui_link_replaced btn btn-warning btn-xxs").removeClass("heighter-34").removeClass(t).prepend('  ');e.find('a[href*="view_mail.cgi?"]:not([target="_blank"])').addClass("ui_link_replaced btn btn-default btn-xxs").removeClass("heighter-34").removeClass(t);e.find('a[href*="view_mail.cgi?"][target="_blank"]').addClass("ui_link_replaced btn btn-success btn-xxs").removeClass("heighter-34").removeClass(t).prepend('  ')}}).promise().done(function(){if($(this).is(".ui_links_row")){$(this).contents().unwrap()}else{$('tr td:last-child:contains("|")').replaceText(/\s*/gi,"").replaceText(/\|/gi,"")}});if($('body[class*="status"]').length&&v___location_file=="edit_mon.cgi"){$('#content a[href*="edit_mon.cgi?id"]').addClass("ui_link_replaced btn btn-default btn-xxs margined-bottom-2").removeClass("heighter-34").removeClass("ui_link");$('#content a[href*="edit_mon.cgi?id"]').last().css("margin-left","-1px");$('tr td:last-child:contains("|")').replaceText(/\|/gi,"")}else{$('tr td:last-child:contains("|")').contents().filter(function(){return this.nodeType==3}).remove()}if(v___location_path==v___location_prefix+"/fdisk/"||v___location_path==v___location_prefix+"/fdisk/index.cgi"){$("body").find('a[href^="blink.cgi"]:not(.ui_link_replaced)').html(""+$("body").find('a[href^="blink.cgi"]:not(.ui_link_replaced)').text().replace(/\.\.$/," ")+"").addClass("ui_link_replaced btn btn-warning btn-xxs f__lnk_t_btn-el").removeClass("heighter-34").removeClass("ui_link")}if(v___location_path==v___location_prefix+"/fsdump/"||v___location_path==v___location_prefix+"/fsdump/index.cgi"){$.each($("tr td:last-child"),function(){$(this).find('a[href^="backup.cgi"]').html(""+$(this).find('a[href^="backup.cgi"]').text().replace(/\.\.$/," ")+"").addClass("ui_link_replaced btn btn-success btn-xxs margined-top--2 f__lnk_t_btn-el").removeClass("heighter-34").removeClass("ui_link").prepend('  ');$(this).find('a[href^="kill.cgi"]').html(""+$(this).find('a[href^="kill.cgi"]').text().replace(/\.\.$/," ")+"").addClass("ui_link_replaced btn btn-danger btn-xxs margined-top-1 f__lnk_t_btn-el").removeClass("heighter-34").removeClass("ui_link").prepend('  ')})}if(v___location_path==v___location_prefix+"/syslog/"||v___location_path==v___location_prefix+"/syslog/index.cgi"||v___location_path==v___location_prefix+"/logviewer/"||v___location_path==v___location_prefix+"/logviewer/index.cgi"){$.each($("tr td:last-child"),function(){$(this).find('a[href*="save_log.cgi"][href*="view=1"], a[href*="view_log.cgi"][href*="view=1"]').html(""+$(this).find('a[href*="save_log.cgi"][href*="view=1"], a[href*="view_log.cgi"][href*="view=1"]').text().replace(/\.\.$/," ")+"").addClass("ui_link_replaced btn btn-primary btn-xxs f__lnk_t_btn-el").removeClass("heighter-34").removeClass("ui_link")})}if(v___location_path==v___location_prefix+"/software/list_pack.cgi"){var a='td a.ui_link[href*="view.cgi"]';$(a).html('').addClass("ui_link_replaced btn btn-default btn-xxs f__lnk_t_btn-el").removeClass("heighter-34").attr("style","margin-top: 2px !important; margin-bottom: 0 !important; margin-right: 15px").removeClass("ui_link").prepend('')}}if(v___location_directory_unslashed_trail_slashed==v___location_prefix_unslashed_trail_slashed+"proc/"||v___location_path_lead_unslashed==v___location_prefix_unslashed_trail_slashed+"proc/index.cgi"){if(v___location_directory_unslashed_trail_slashed==v___location_prefix_unslashed_trail_slashed+"proc/"&&v___location_file&&v___location_file.indexOf("index_")>-1||v___location_path_lead_unslashed==v___location_prefix_unslashed_trail_slashed+"proc/index.cgi"||v___location_path===v___location_prefix+"/proc/"){$("a.ui_link + b").addClass("btn").css("margin-left","3px");$("b + a.ui_link").addClass("btn").css("margin-left","3px");if($('.panel-body > b:first-child:contains(":")').length>0){$(".panel-body > b:first-child").remove()}$(".panel-body > b").addClass("btn btn-success")}$(".panel-body").contents().filter(function(){return this.nodeType==3}).remove();$(".panel-body > a.ui_link").addClass("btn").css("margin-left","3px")}if(!e){if(v___location_directory_unslashed_trail_slashed==v___location_prefix_unslashed_trail_slashed+"fdisk/"||v___location_directory_unslashed_trail_slashed==v___location_prefix_unslashed_trail_slashed+"postfix/"||v___location_directory_unslashed_trail_slashed==v___location_prefix_unslashed_trail_slashed+"pam/"||v___location_directory_unslashed_trail_slashed==v___location_prefix_unslashed_trail_slashed+"logviewer/"||v___location_directory_unslashed_trail_slashed==v___location_prefix_unslashed_trail_slashed+"syslog/"){$("p > a[href], table + a[href], div.panel-body > a.ui_link").each(function(e,t){$(this).text($(this).text().replace(/\.$/,""))})}var n=".container-fluid .panel-body";$(""+n+" a.select_all,"+""+n+" a.select_invert,"+""+n+" a.select_invert ~ .ui_link,"+""+n+" .ui_links_row > *:not(.ui_link_empty, .ui_link_replaced),"+""+n+" .ui_link:not(.ui_link_empty)").each(function(){if(core.error.get()){return}if(v___location_path&&v___location_path.indexOf("/sysinfo.cgi")>-1){return}if(core.curModuleFile("acl")){if(this.href&&this.href.includes("edit_user.cgi?user")){return}}if($(this).parent("td").length||$(this).parent("label").length||$(this).parent("tt").length||$(this).parent("th").length||$(this).parents("b").length||$(this).parent("pre").length||core.curModuleFile("virtual-server","cert_form.cgi")&&$(this).attr("href")&&$(this).attr("href").includes("edit_domain.cgi")||$(this).parents('[data-dcontainer="1"]').length&&unbuffered_header_processor_allow(v___location_path)||v___location_path==v___location_prefix+"/webmin_search.cgi"){return}if(!core.curModuleFile("virtual-server","history.cgi")&&!core.curModuleFile("server-manager","bwgraph.cgi")&&!core.curModuleFile("server-manager","one_history.cgi")&&!core.curModule("proc")&&v___location_directory_unslashed_trail_slashed!=v___location_prefix_unslashed_trail_slashed+"passwd/"&&$(this).text()&&v___location_path!=v___location_prefix+"/mailboxes/"&&v___location_path!=v___location_prefix+"/mailboxes/index.cgi"&&v___location_path!=v___location_prefix+"/usermin/list_configs.cgi"&&!$(this).hasClass("help_popup")||core.curModule("procmail")){$(this).addClass("btn btn-inverse btn-tiny ui_link_replaced");$(this).html(""+$(this).text().replace(/\.$/,"")+"");var e=$(this).parent().contents().filter(function(){return this.nodeType==3});if(e){$.each(e,function(){if($(this).text()&&$(this).text().length<=3){$(this).remove()}})}if($(this).hasClass("select_all")){$(this).html(' '+$(this).text()+"")}if($(this).hasClass("select_invert")){$(this).html(' '+$(this).text()+"")}if((core.curModuleFile("server-manager","index.cgi")||core.curModuleFile("server-manager",""))&&($(this).parent('form[action="mass.cgi"]').length||$(this).parent(".ui_links_row").parent('form[action="mass.cgi"]').length)){if($(this).is(":nth-child(1)")||$(this).is(":nth-child(6)")){$(this).html(' '+$(this).text()+"")}if($(this).is(":nth-child(2)")||$(this).is(":nth-child(7)")){$(this).html(' '+$(this).text()+"")}if($(this).is(":nth-child(3)")||$(this).is(":nth-child(8)")){$(this).html(' '+$(this).text()+"")}}if(core.curModuleFile("mount","index.cgi")||core.curModuleFile("mount","")){var t=$(this).attr("href");if(t){$(this).html(' '+$(this).text()+"")}}if($(this).attr("href")&&($(this).attr("href").indexOf("edit")===0&&$(this).attr("href").indexOf("edit_allow")!==0||$(this).attr("href").indexOf("master_form")===0||$(this).attr("href").indexOf("slave_form")===0||$(this).attr("href").indexOf("stub_form")===0||$(this).attr("href").indexOf("forward_form")===0||$(this).attr("href").indexOf("delegation_form")===0||$(this).attr("href").indexOf("mass_form")===0||$(this).attr("href").indexOf("newdb_form")===0)){$(this).html(' '+$(this).html())}else{if($(this).attr("href")&&$(this).attr("href").indexOf("edit_allow")===0){$(this).html(' '+$(this).text()+"")}else{if($(this).attr("href")&&$(this).attr("href").indexOf("mass_ucreate")===0){$(this).html(' '+$(this).text()+"")}if($(this).attr("href")&&$(this).attr("href").indexOf("grace_form")>-1){$(this).html(' '+$(this).text()+"")}}}if($(this).attr("href")&&$(this).attr("href").indexOf("edit_manual")>-1){$(this).html(' '+$(this).text()+"")}if(core.curModule("custom")){if($(this).attr("href")&&$(this).attr("href").indexOf("edit_cmd.cgi?new")===0){$(this).html(' '+$(this).text()+"")}if($(this).attr("href")&&$(this).attr("href").indexOf("edit_file.cgi?new")===0){$(this).html(' '+$(this).text()+"")}if($(this).attr("href")&&$(this).attr("href").indexOf("edit_sql.cgi?new")===0){$(this).html(' '+$(this).text()+"")}}if(!$(this).attr("href")){$(this).remove()}}});var r="btn-tiny",l="ui_link_replaced";$.each($(".btn-group.ui_links_row > .ui_link_empty"),function(){if($(this).prev("."+r+"."+l+"").length||$(this).next("."+r+"."+l+"").length){$(this).addClass(""+r+" "+l+"")}});$.each($("."+r+"."+l+""),function(){if($(this).prev('[class="table table-striped table-condensed"]').length&&$(this).next(':not(".ui_link_replaced")').length){$(this).removeClass("btn-tiny ui_link_replaced").addClass("ui_link_re-replaced")}});$("a.ui_link_replaced").each(function(){if($(this).prev().is("b")){$(this).prev("b").addClass("btn btn-success btn-tiny")}if($(this).next().is("b")){$(this).next("b").addClass("btn btn-success btn-tiny")}if(core.curModule("htaccess-htpasswd")){$("table tr.ui_checked_columns .ui_links_row > a").addClass("btn-link btn-link-bordered btn-xxs btn-hover-hide").removeClass("btn-tiny btn-inverse")}});if(v___location_directory_unslashed_trail_slashed==v___location_prefix_unslashed_trail_slashed+"fetchmail/"){$("#content a.ui_link").each(function(){$(this).addClass("btn btn-inverse btn-tiny ui_link_replaced").css("margin-bottom","3px").css("margin-top","-3px");$(this).html(""+$(this).text().replace(/\.$/,"")+"");$(this).parent().contents().filter(function(){return this.nodeType==3}).remove();var e=function(e){return' '};if($(this).attr("href").indexOf("edit_poll")>-1){$(this).prepend(e("plus-square-o"))}if($(this).attr("href").indexOf("edit_global")>-1){$(this).prepend(e("pencil-square-o"))}if($(this).attr("href").indexOf("check")>-1){$(this).prepend(e("check-square-o"))}})}if(v___location_directory_unslashed_trail_slashed==v___location_prefix_unslashed_trail_slashed+"filter/"){$("#content a.ui_link").each(function(){function e(e){return' '}if($(this).attr("href").indexOf("edit_auto")>-1){$(this).find("i").replaceWith(e("reply"))}if($(this).attr("href").indexOf("edit_forward")>-1){$(this).find("i").replaceWith(e("reply-all"))}})}}if(v___location_path==v___location_prefix+"/virtual-server/domain_form.cgi"||v___location_path==v___location_prefix+"/server-manager/list_images.cgi"||v___location_path==v___location_prefix+"/virtual-server/bwgraph.cgi"||v___location_path==v___location_prefix+"/server-manager/bwgraph.cgi"){$(".panel-body > .ui_links_row > ").each(function(){$(this).addClass("btn btn-inverse btn-tiny ui_link_replaced").removeClass("ui_link");$(this).html(""+$(this).text().replace(/\.$/,"")+"");if($(this).hasClass("btn-success")){$(this).removeClass("btn-inverse")}});$.each($(".panel-body > .ui_links_row > .ui_link_empty"),function(){if($(this).text().replace(/[\t\n]+/g," ").length<4){$(this).remove()}else{$(this).html(""+$(this).text().replace("|","").replace("|","").replace(/(?:\r\n|\r|\n)/g,"")+"");if($(this).prev().is("img")){$(this).removeClass().addClass("margined-left-3")}}});$(".panel-body > b").css("margin-right","7px");if(v___location_path==v___location_prefix+"/virtual-server/domain_form.cgi"){$.each($(".panel-body > .ui_links_row > .btn"),function(e,t){if(e==0){$(this).html(' '+$(this).text()+"")}if(e==1){$(this).html(' '+$(this).text()+"")}if(e==2){$(this).html(' '+$(this).text()+"")}if(e==3){$(this).html(' '+$(this).text()+"")}})}if(v___location_path==v___location_prefix+"/server-manager/bwgraph.cgi"){var o=".container-fluid .panel-body",s=$(o+" .btn-info"),_=$(o+' [name="ago"]');s.removeClass("btn-info").addClass("btn-default heighter-28 margined-left--4");s.find(".fa").remove();_.next(".btn-default").addClass("margined-left--7");_.prev("b").addClass("font-weight-normal")}}if(v___location_path==v___location_prefix+"/server-manager/edit_serv.cgi"||v___location_path==v___location_prefix+"/server-manager/edit_owner.cgi"){$('.table-striped .col_value a[href^="edit_serv.cgi"], .table-striped .col_value a[href^="edit_owner.cgi"]').each(function(){$(this).addClass("btn btn-inverse btn-xxs ui_link_replaced margined-right--2").removeClass("btn-tiny ui_link");$(this).html(""+$(this).text().replace(/\.$/,"")+"");if($(this).hasClass("btn-success")){$(this).removeClass("btn-inverse")}});$.each($(".table-striped .col_value .ui_links_row > .ui_link_empty"),function(){$(this).addClass("btn-xxs ui_link_replaced").removeClass("btn-tiny ui_link");if($(this).text().length<4){$(this).remove()}else{$(this).html(""+$(this).text().replace("|","").replace("|","").replace(/(?:\r\n|\r|\n)/g,"")+"")}})}$("a.ui_link, .btn").each(function(){if($(this).text().substr(-1)=="."&&!$(this).parent().is("label")){var e=$(this).text().substr(-1)=="."&&$(this).text().substr(-2)==".."?2:1;$(this).html(""+$(this).text().substr(0,$(this).text().length-e)+"")}})};snippets.page.render_table_labels=function(e){if(plugins.page.format.columns()||matchMedia("(max-width: 992px)").matches){return}var t="vertical-align-top",i="no-vr-al-tp";e.find("td.col_label:not(."+t+"):visible").each(function(){var e=$(this).next(".col_value"),a=$(this).find("b"),n="inline-block margined-top-",r=browser.detect.firefox(),l=$(this).parent("tr"),o=l.parent().hasClass("td-counter")?0:l.children("td").length;if(o>2){l.parent().addClass("td-counter td-count-"+o+"")}if(this.clientHeight>=30){$(this).addClass(t);var s="table",_="input",c="select",d="textarea",f="upload",p="el-wp-chooser",u="ui_",h="password",g="textbox",m="hidden",v="opener_shown",b="br",x="t-password-complexity-meter-wrapper-cont",y="heighter",w="force",k="ds-bl-fs",C=$(e.find(""+_+":not(."+u+""+m+'):not([type="'+m+'"]), '+c+", "+d+"")[0]),M=C.is("."+u+""+g+""),F=C.is("."+u+""+c+", ."+u+""+f+"")?C:false,j=C.is("."+u+""+d+""),T=C.parent().is("."+p+""),q=e.find(""+s+":visible"),O=q.find("tr").first().find("td").first().outerHeight(),z=q.length;if(T){if($(e.children()[0]).is("."+p+"")){j=true}}var S=a.parents("."+v+"").length,A=S?3:2,I=e.children(),H=I.filter(""+b+", ."+k+"").index(),W=H===-1?I:I.slice(0,H),L=I[0],E=0;if(e.find("."+u+""+c+"").length||e.find(c).length||e.find("."+p+"").length||e.find("."+u+""+g+"").length||e.find("."+u+d).length||e.find("."+u+"opt_"+g+"").length||e.find(""+_+'[type="text"]').length||e.find("."+u+h).length||e.find(""+_+'[type="'+h+'"]').length||z||M||F||j){if(S&&this.clientHeight>=32){A=5}var P=0;W.filter(function(){var e=this.clientHeight;if(!e){e=parseInt($(this).find(""+_+", "+d+", "+c+"").first().css("height"))}if(P=32){R="6"}}if(this.clientHeight<48||P<=20||D||N){a.addClass(n+R+"")}return}else if(P<=20){A=-1}else if(W.filter("."+p+"").length||H===-1&&I.last().is("."+p+"")){var U=I.filter("."+p+"").find("."+u+"opt_"+g+", ."+u+g+", ."+u+d+", "+_+"").outerHeight(true);if(U<=28){E=1;A+=1}else if(U>64){A=0}else if(U==30){A=4}else{A+=3}if(j&&!U>=32){A=-2}}else if(I&&I[0]){if($(L).hasClass(k)||$(L).is(b)){A-=2}else if(M){A+=S?1:2}else if(F){if(e.find(""+c+"[multiple]").length){A=-1}}else if(j){A=-1}else if(e.find("."+x+"").length){var Q="4";a.addClass(n+Q+"");return}}if(!E&&(A==3||A==2)){A=4}a.addClass(n+A+"")}}else if(this.clientHeight<=22){var Y=e.find(".graph-container")[0];if(e.find(".awobject").length){if(this.clientHeight<=20&&!r||this.clientHeight===22&&r){var B=0;if(r){B=1}$(this).addClass(i);a.addClass(n+B+"")}}else if(Y){var V=-4;$(this).addClass(i);a.addClass(n+V+"")}else if(this.clientHeight===18){var J=-1;$(this).addClass(i);a.addClass(n+J+"")}}}).promise().done(function(){var e=$(this)[0],t="hover",i="table",a=""+i+"-"+t+"";if(e){$(e).parents("."+i+"").removeClass(""+a+" "+a+"-force").addClass("no-"+t+"")}})};snippets.page.render=function(pjax_popstate){vars.page_interaction=v___initial_load?-1:0;page_control_header();if(!settings_sysinfo_expand_all_accordions&&settings_sysinfo_remember_accordions){plugins.dashboard.restore()}quirks.clean();plugins.navigation.state.update();var needs_restart_from=session.server.data("needs-restart");if(needs_restart_from&&!vars.cache.norestart&&!vars.ajax.progressing&&!v___initial_load&&session.server.data("product")==="webmin"){theme.restart_message(needs_restart_from)}if(pjax_popstate){$(".popover.in").remove()}else{(function(){var e=$('.container-fluid > .panel > .panel-heading a[href*="config.cgi"]');if(e.length){var t=" "+theme_shortcuts_generate("conf"),i=e.text();e.text(i+t)}})()}if(pjax_popstate&&typeof __cm_editor_static!="undefined"){__cm_editor_static.toTextArea();$('button[data-form="submitter"]').unwrap();$('.CodeMirror, button[data-form="submitter"] + button, .-helper.__helper, .-helper.soft_wt').remove()}(function e(){var t=$("body");t.off("mousedown.cm1 keydown.cm1");t.undelegate('button[type="submit"]:not(.disabled)',"click.cm");t.undelegate('button[data-form="submitter"]:not(.disabled)',"click.cm")})();table_proc_size_columns();$("body").attr("style",session.server.data("style"));$.each($('select[onchange="form.submit()"]'),function(){$(this).removeAttr("onchange").addClass("onchange_form_submit_triggger")});page.handle.content.offset(true);if(editor_init_check()){var select_for_edited_file=$('select[name="file"]:first, select[name="manual"]:first');select_for_edited_file.addClass("onchange_form_submit_triggger");select_for_edited_file.next("button.ui_form_end_submit").addClass("hidden")}snippets.datetime.locale();if(get_access_level()==3&&core.curModule("quota")){var $_table_quota=$(".container-fluid .panel-body .table"),$_table_quota_empty_label=$_table_quota.find("thead:first-child").add($_table_quota.find("thead:first-child").next("tbody")).remove()}if($.support.spa&&core.curModule("tunnel")){$("#content .container-fluid form.ui_form[action]").on("submit",function(e){var t=$(quirks.active_element());e.preventDefault();e.stopPropagation();progress.start();$.ajax({type:$(this).attr("method")?"GET":"POST",url:v___location_prefix+"/"+v___module+"/"+$(this).attr("action"),data:get_form_data($(this)),dataType:"text",complete:function(e){if(!session.status(e)){return}theme_open_new_tab(this.url);t.removeClass("disabled").find("i").removeClass("invisible").next(".cspinner_container").remove();progress.end()}})})}if(core.curModule("tunnel")){var $tunnel_form=$('.ui_form[action="seturl.cgi"]'),$input=$tunnel_form.find("input"),$btn=$tunnel_form.find("button"),$b=$tunnel_form.find("b"),b_text=$b.text().replace(/:$/,"");$b.remove();$input.attr("placeholder",b_text).css({width:"100%",height:"32px",minHeight:"32px"});$btn.addClass("btn-block margined-top--1")}if(check_location_resource("/config.cgi?tunnel")){$('table table[width="100%"] tr:first-child').addClass("hidden")}$.each($('tr td:last-child a:contains("..")'),function(){if(v___location_path==v___location_prefix+"/virtual-server/list_databases.cgi"){if($(this).attr("href")&&$(this).attr("href").includes("showpass.cgi")){return true}$(this).html($(this).text().replace(/\.\.$/," ")).addClass("ui_link_replaced btn f__lnk_t_btn-el btn-transparent btn-link-bordered btn-xxs margined-top--3").removeClass("ui_link")}});if($.support.spa&&!pjax_popstate){var is_error_page=$(".container-fluid .panel > .panel-body > [data-fatal-error-text]").length;if(v___location_file&&v___location_file.includes("error")&&!v___location_file.includes("edit_")){is_error_page=1}!is_error_page&&$("#headln2c").prepend(" ')}plugins.favorites.detect();if(v___location_directory_unslashed_trail_slashed==v___location_prefix_unslashed_trail_slashed+"init/"){$("table.table tbody tr").addClass("ui_checked_columns")}page_table_rows_control();!pjax_popstate&&page_radios_evolve();var on_load_checkbox_sel_str='.container-fluid .ui_checked_columns td.ui_checked_checkbox input[type="checkbox"]:checked';$(on_load_checkbox_sel_str).parents("tr.ui_checked_columns").addClass("hl-aw");$(""+on_load_checkbox_sel_str+"[disabled]").parents("tr.ui_checked_columns").addClass("hl-aw-chk");if($("body").hasClass("servers")){if(core.curModuleFile("servers","index.cgi")||core.curModuleFile("servers","")){vars.pjax.cache.set("disable")}var form_selector='form[action="delete_servs.cgi"]',servers_selector_str=$(form_selector).length?""+form_selector+" a.icon_link, "+form_selector+" a.ui_link, "+form_selector+" .col-xs-1":'.container-fluid > .panel > .panel-body > .row a[href*="link.cgi/"]',$form_logouts_a=$(form_selector).find('a[href^="logout.cgi"]'),form_logouts_a_title=$form_logouts_a.length?$form_logouts_a.first().text():String();setTimeout(function(){if($form_logouts_a.length){$form_logouts_a.each(function(){var e=form_logouts_a_title;if(e){e=$.trim(Convert.strUpFirst(e.replace(/[\(\)]/g,"")))}$(this).addClass("gl-icon-logout").attr("title",e).attr("aria-label",e).html('');var t=$(this).parent(),i=$(this).detach();t.before(i)})}},1);$(servers_selector_str).on("click",function(e){if($(e.target).is(".gl-icon-select")){$.support.spa?$(this).trigger("contextmenu"):$(this).parents(".gl-icon-container").trigger("contextmenu");return}var t=v___location_href+$(this).attr("href"),i=$(this).attr("href");if(i&&i.indexOf("edit_serv.cgi")>-1||i&&i.indexOf("logout.cgi")>-1){if(e.originalEvent!==undefined){$.pjax.click(e,{timeout:0,push:get_pjax_push(),type:get_pjax_type(),container:"[data-dcontainer]",fragment:"[data-dcontainer]"})}}else{var a=vars.events.keypressed.ctrl;if(i&&i.indexOf("://")===-1){var n=link_type_convert(t,1),r="/index.cgi",l="link.cgi/",o=r+l;if(n&&n.includes(o)){n=n.replace(o,"/"+l)}if(a){open(n)}else{progress.start();location.href=n}}else{if(a){open(i)}else{progress.start();location.href=i}}}e.preventDefault();e.stopPropagation()})}if(!pjax_popstate){if($(".opener_container").length){$.each($(".opener_container"),function(){if($(this).find(".opener_shown").is(":visible")){$(this).parent("tr").prev("tr").find("td a:nth-child(1)").addClass("opener_container_opened").removeClass("opener_container_closed")}})}if($(".opener_shown, .opener_hidden").length>0){if($(".opener_trigger").length>0){$(".panel-body .ui_form .table tbody tr").removeClass("thead");$(".opener_trigger").parents("table.table").addClass("opener_table_style");$(".opener_trigger").parents("tr").addClass("_c__op_r").attr("style","border: 0 !important");$(".opener_trigger").parent("td").addClass("_c__op_d");$(".opener_trigger").parent("td").find("a").addClass("link_hover_effect link_hover_effect_style_extra")}}var target_restore_selector='a[id*="opener"][id$="_restore"]';if($(target_restore_selector).parent().is("p")){$(target_restore_selector).next("a").parent("p").replaceTagName("div");$(target_restore_selector).next("a").removeClass().addClass("opener_extra_container_a_style link_hover_effect").parent("div").addClass("opener_extra_container opener_extra_container_style margined-top-10");$(target_restore_selector).remove()}var $hidden_opener_trigger=$('a[href^="javascript:hidden_opener"]:not(".opener_trigger")');if($hidden_opener_trigger.length>0){$hidden_opener_trigger.each(function(e,t){var i=v___location_path==v___location_prefix+"/virtual-server/backup_form.cgi"&&v___location_href&&v___location_href.indexOf("?sched=")>-1?true:false;$(this).find("img").length>0?$(this).remove():false;$(this).css("border-bottom","0");$(this).parent("td:not('.col_label'):not('.col_value'), td.col_header").addClass("opener_table_cell_style_small");if(!i){$(this).parent("td:not('.col_label'):not('.col_value'), td.col_header").addClass("opener_table_cell_style_small opener_table_cell_style_small_exclusion_border_top");$(this).parent("td:not('.col_label'):not('.col_value'), td.col_header").parent("tr").parent("tbody").parent("table").parent("div.opener_hidden").addClass("opener_shown_inner").parent(".opener_container").addClass("has_sub_inner")}$(this).parent("td:not('.col_label'):not('.col_value'), td.col_header").find("a").addClass("link_hover_effect link_hover_effect_style");if($(this).parent().is(".panel-body")||$(this).parent().is(".ui_form")||$(this).parent().is("p")){var a=$(this),n=a.parent().is(".panel-body")?".panel-body":a.parent().is("p")?"p":".ui_form";var r=a.parent(n).find('a[href^="javascript:hidden_opener"]'),l='
    ';if(core.curModuleFile("bind8","edit_zonekey.cgi")){r.eq(1).wrapAll(l);r.eq(e+1).wrapAll(l)}else{r.eq(e+1).wrapAll(l)}a.parent('.panel-body > a[href^="javascript:hidden_opener"]:first-child').remove();var o=a.parent(n).find(".opener_extra_container");$(o).next("br").remove();$(o).addClass("opener_extra_container_style");$(o).find("a").addClass("opener_extra_container_a_style link_hover_effect");$(o).next(".opener_hidden").attr("style","padding:8px")}});$.each($(".opener_hidden"),function(){$(this).css("display","none")})}$("a.opener_trigger").each(function(){$(this).parent("td").css("text-align","left")});$('form[action*="seen_newfeatures.cgi"]').each(function(){$(this).parents("table.table-striped").next(".ui_form_end_buttons").css("margin-top","14px")});$("#tall_0").before("
    ");$(".opener_container").each(function(e,t){if($(this).find("div").hasClass("opener_hidden")){$(this).hide()}else{$(this).show()}});$.each($("div.barchart"),function(){var e=$(this).find('img[src*="red.gif"]'),t=$(this).parent("td").contents().filter(function(){return this.nodeType==3}).text();if(e&&e.attr("width")){$(this).parent("td").html('
    '+t+'
    '+e.attr("width")+"
    ")}});$('.panel-body > form > table > tbody > tr > td:has(input[type="submit"])').parents("table.table-hardcoded > tbody > tr").css("border","none").parents("table").css("margin-top","20px");$('.panel-body > form > table > tbody > tr > td:has(input[type="submit"])').parents("table.table-hardcoded > tbody").css("border","none");$('.ui_grid_table > tbody > tr.ui_grid_row > td:has(button[type="submit"])').parents("table.ui_grid_table").css("border","none");$("form.ui_form > table label.radio, form.ui_form > table label.checkbox").each(function(){var e=$(this),t=e.find("i.fa"),i=e.find("i.fa").text().trim(),a=e.text().trim();if(i.length===0&&a.length===0){t.parent("label").remove()}})}theme.config.events(pjax_popstate);$("#system-status > div.panel-body > table > tbody > tr > td").on("mouseover",function(){$(this).find(".btn-hidden").removeClass("hidden")}).on("mouseout",function(){$(this).find(".btn-hidden").addClass("hidden")});if(core.curModule("bind8")){var $table_data_recursive_tree=$(".container-fluid table[data-recursive_tree]");if($table_data_recursive_tree.length){$table_data_recursive_tree.removeClass().addClass("table table-hover");$.each($table_data_recursive_tree.find('img[src*="images/"]'),function(e,t){var i=$(this);if(Test.strContains(i.attr("src"),"close")){i.replaceWith('')}if(Test.strContains(i.attr("src"),"open")){i.replaceWith('')}if(Test.strContains(i.attr("src"),"smallicon")){i.replaceWith('')}})}}if(core.curModule("software")&&(Test.strContains(v___location_file,"tree.cgi")||Test.strContains(v___location_file,"ipkg-tree.cgi"))||core.curModuleFile("cluster-software","edit_host.cgi")){$('img[src*="images/"]').each(function(e,t){var i=$(this);i.next("a").removeClass();if(Test.strContains(i.attr("src"),"close")){i.replaceWith('')}if(Test.strContains(i.attr("src"),"open")){i.replaceWith('')}if(Test.strContains(i.attr("src"),"pack")){i.replaceWith('')}});if(Test.strContains(v___location_file,"ipkg-tree.cgi")){$('form[action*="ipkg-tree.cgi"] + script + p > a, form[action*="ipkg-tree.cgi"] + script + p + table +p > a').addClass("margined-top-10")}}if(core.curModule("mysql")||core.curModule("postgresql")){$('a > img[src*="images/left.gif"]').each(function(e,t){var i=$(this);i.replaceWith('')});$('a > img[src*="images/right.gif"]').each(function(e,t){var i=$(this);i.replaceWith('')})}if(core.curModuleFile("virtual-server","list_scripts.cgi")){$('td > a > img[src*="images/staroff.gif"]').each(function(e,t){var i=$(this);$(t).attr("src",""+v___location_prefix+"/images/staroff.gif")});$('td > a > img[src*="images/staron.gif"]').each(function(e,t){var i=$(this);$(t).attr("src",""+v___location_prefix+"/images/staron.gif")})}if(v___location_directory_unslashed_trail_slashed==v___location_prefix_unslashed_trail_slashed+"status/"){$("td img").each(function(e,t){var i=t.src;if(i){var a=i.match(/images\/(.*)\./),n=a&&a[0]&&a[1]?a[1]:String(),r="fa fa-fw fa-1_15x fa-check text-success";if(n==="down"){r="fa fa-fw fa-1_15x fa-times-circle text-danger"}else if(n==="timed"){r="fa fa-fw fa-clock text-warning fa-1_15x"}else if(n==="webmin"){r="fa fa-fw fa-webmin fa-1_15x text-warning"}else if(n==="skip"){r="fa2 fa-fw fa2-minus fa-1_15x text-semi-dark vertical-align-middle"}else if(n==="not"){r="fa2 fa-fw fa2-not-interested fa-1_15x text-semi-dark"}else if(n==="quest"){r="fa fa-fw fa-question-circle fa-1_15x text-semi-dark"}if(n){$(t).replaceWith('')}}})}if(core.curModule("proc")||core.curModule("firewall")||core.curModule("firewall6")||core.curModule("shorewall")||core.curModule("shorewall6")||core.curModuleFile("pam","edit_pam.cgi")||core.curModule("filter")){$("td a img[src], td label a img[src]").parents("td").addClass("text-center").attr("data-arrange",1);$('td img[src*="images/gap.gif"]').replaceWith('');$('td a img[src*="images/down.gif"]').replaceWith('');$('td a img[src*="images/up.gif"]').replaceWith('');$('td a img[src*="images/after.gif"]').replaceWith('');$('td a img[src*="images/before.gif"]').replaceWith('')}if(core.curModule("squid")||core.curModule("cron")){$('td a img[src*="images/movedown.gif"]').replaceWith('');$('td a img[src*="images/moveup.gif"]').replaceWith('')}if(core.curModule("cron")){$('td a img[src*="images/bottom.gif"]').replaceWith('');$('td a img[src*="images/top.gif"]').replaceWith('')}$("input").each(function(e,t){if($(this).attr("src")=="images/ok.gif"){$(t).attr("src",""+v___location_prefix+"/"+$(this).attr("src"));$(this).parents("td").attr("style","white-space: nowrap")}});core.curModule("commands")&&$("body").addClass("custom");if(!pjax_popstate){if(core.curModuleFile("custom","view.cgi")){var $_t_title=$('form[action="save.cgi"]').find(".table-title"),$_tt=$_t_title.find("tt").detach();$("#headln2c").find("[data-main_title]").after("
    "+$_tt[0].outerHTML+"
    ");$_t_title.remove()}$.each($(".container-fluid .panel-body table tr:empty"),function(){$(this).remove()});$.each($("span > input"),function(){var e=$(this).parent("span").next(".chooser_button"),t=$(this).parent("span").next('input[type="button"][onclick]'),i=$(this).parent("span").next("select");if(e){e.attr("style","display: inline; width:40px; height: 28px; margin-right:0 !important; margin-top:4px !important;").find("i.fa-files-o").css("margin-top","0").addClass("vertical-align-middle")}if($(this).parents(".tab-content")){e.css("margin-top","4px")}if(t){t.attr("style","display: inline; width:40px; height: 28px; margin-right:0 !important; vertical-align: middle").next("i.fa-files-o").css("margin-top","11px").addClass("vertical-align-middle");t.attr("style","display: inline; width:40px; height: 28px; margin-right:0 !important; vertical-align: middle").next("i.fa-calendar").attr("style","margin-top: 21px !important; font-size: 11px; margin-left: -27px; pointer-events: none;")}});$.each($('input[type="button"][onclick^="ifield"]'),function(e,t){$(this).css("margin-left","0").css("width","40px").css("height","28px")});$('.ui_form[action="switch.cgi"] > input.form-control.ui_textbox').next('input[type="button"][onclick^="ifield"]').attr("style","margin-top: 2px !important; margin-bottom: 2px !important; margin-left: 0 !important");setTimeout(function(){$('.ui_form[action="switch.cgi"] .file_chooser_button_attached').attr("style","font-size: 11px; pointer-events: none; margin-top: 14px !important;")},10);if(v___location_directory_unslashed_trail_slashed==v___location_prefix_unslashed_trail_slashed+"cshrc/"){$("textarea").each(function(e,t){$(this).attr("style","height: 20em !important")})}if(v___location_path==v___location_prefix+"/acl/"||v___location_path==v___location_prefix+"/acl/edit_user.cgi"){$('.ui_grid_table.table-hardcoded .ui_grid_row .ui_grid_cell input[type="checkbox"], .table-hardcoded .col_value input[type="checkbox"]').each(function(e,t){$(this).attr("style","vertical-align: bottom !important")})}if(core.curModule("custom")||core.curModule("commands")){$(".panel-body > .ui_grid_table.table-hardcoded").each(function(e,t){$(this).attr("style","margin-top: 3px !important")});$(".panel-body td > .ui_form").each(function(){$(this).attr("style","padding-top: 0 !important")});$(".panel-body > a.ui_link").each(function(e,t){$(this).addClass("btn btn-inverse btn-tiny ui_link_replaced").removeClass("ui_link");$(this).text($(this).text().replace(/\.$/,""));$(this).parent().contents().filter(function(){return this.nodeType==3}).remove();if($(this).attr("href").indexOf("edit_cmd.cgi?new")===0){$(this).html(' '+$(this).text()+"")}if($(this).attr("href").indexOf("edit_file.cgi?new")===0){$(this).html(' '+$(this).text()+"")}if($(this).attr("href").indexOf("edit_sql.cgi?new")===0){$(this).html(' '+$(this).text()+"")}});$.each($("td[data-td-e] > .ui_links_row"),function(){var e=$(this).parent();e.find('a[href^="edit_"]').addClass("ui_link_replaced btn btn-xxs btn-transparent btn-link-bordered f__lnk_t_btn-el").css("margin-right","3px").removeClass("ui_link").prepend(' ');e.parents("table").find("thead > tr > th:eq(2)").addClass("pointer-events-none")}).promise().done(function(){if($(this).is(".ui_links_row")){$(this).contents().unwrap()}});$.each($("td.col_value.col_header > .ui_links_row"),function(){}).promise().done(function(){if($(this).is(".ui_links_row")){$(this).contents().unwrap()}});theme_buttonify(["/custom/","/custom/index.cgi","/commands/","/commands/index.cgi"],".container-fluid table td[data-td-e]:nth-child(3)",'a[href^="form.cgi"]',"btn btn-primary btn-xxs vertical-align-top margined-top-1 margined-left--2 ---forced","fa-cog","","","","|");theme_buttonify(["/custom/","/custom/index.cgi","/commands/","/commands/index.cgi"],".container-fluid table td[data-td-e]:nth-child(3)",'a[href^="run.cgi"], a[href^="sql.cgi"]',"btn btn-success btn-xxs vertical-align-top margined-top-1 margined-left--2 ---forced","fa-play fa-0_85x","","","","|");theme_buttonify(["/custom/","/custom/index.cgi","/commands/","/commands/index.cgi"],".container-fluid table td[data-td-e]:nth-child(3)",'a[href^="view.cgi"]',"btn btn-info btn-xxs vertical-align-top margined-top-1 margined-left--2 ---forced","fa-pencil-square-o","","","","|");theme_buttonify(["/custom/","/custom/index.cgi","/commands/","/commands/index.cgi"],".container-fluid table td[data-td-e]:nth-child(3)",'a[href^="sqlform.cgi"]',"btn btn-info btn-xxs vertical-align-top margined-top-1 margined-left--2 ---forced","fa-cog","","","","|");theme_buttonify(["/custom/","/custom/index.cgi","/commands/","/commands/index.cgi"],".container-fluid table.ui_grid_table td:last-child",'a[href^="edit_"]',"btn btn-default btn-transparent btn-transparent-link btn-xxs vertical-align-top margined-top-1 margined-right-5 pull-right btn-dnwo ---forced","fa-pencil","","","","|");$('body[class*="custom"] table.ui_grid_table tr td > form .table-responsive table tr:first-child td.col_header button.ui_submit').prepend('');$.fn.eW=function(e,t){if(!$.fn.eW.fakeEl){$.fn.eW.fakeEl=$("").hide().appendTo(document.body)}$.fn.eW.fakeEl.text(e||this.val()||this.text()||this.attr("placeholder")).css("font",t||this.css("font"));return $.fn.eW.fakeEl.width()+2};$('table.ui_grid_table td input[type="text"], table.ui_grid_table td input[type="password"], table.ui_grid_table td textarea').on("input",function(){var e=$(this).eW()+15;if($(this).attr("type")==="password"){}$(this).css({width:e})}).trigger("input");var is_two_columns=$(".sub_table_container").first().find('td[colspan="4"]').length?0:1;var $empty_cells=$("table.ui_grid_table tbody tr.ui_grid_row td.ui_grid_cell");$.each($empty_cells,function(){var e=$(this).html();if(e=="
    "||e.length<10){$(this).remove()}if(is_two_columns){$(this).addClass("no-contents");$(this).parent("tr").addClass("no-contents")}})}if(check_current_file("config.cgi")&&v___location_query&&v___location_query.includes("custom")||check_current_file("edit_configs.cgi")&&v___location_query&&v___location_query.includes("mod=commands")){$('[name="width_def"], [name="height_def"], [name="wrap"]').parent().parent("td").parent("tr").addClass("hidden")}snippets.page.render_links(pjax_popstate);if(core.curModuleFile("fdisk","edit_disk.cgi")){$.each($(".panel-body > table.table.table-striped tbody tr"),function(){var e=$(this).find("td:nth-child(3)");if(e.find('img[src*="images/use"], img[src*="images/gap"]').length){e.addClass("extent-graphs")}})}if(v___location_path==v___location_prefix+"/virtual-server/edit_link.cgi"){$(".table-hardcoded").find('input[name="open"]').parent("td").parent("tr").remove()}if(v___location_directory_unslashed_trail_slashed==v___location_prefix_unslashed_trail_slashed+"init/"){$('.table.table-striped.table-condensed tr.tr_tag td[data-td-e] input[type="checkbox"]').each(function(e,t){$(this).attr("style","vertical-align: middle !important")})}if(v___location_path_lead_unslashed==v___location_prefix_unslashed_trail_slashed+"proc/edit_proc.cgi"){$("#signal").attr("style","margin-bottom: 0 !important;")}if(v___location_directory_unslashed_trail_slashed==v___location_prefix_unslashed_trail_slashed+"procmail/"){$(".panel-body p:first-child").next("p").contents().filter(function(){return this.nodeType==3}).remove();$(".panel-body p:last-child").prev("a.ui_link").remove()}if(v___location_directory_unslashed_trail_slashed==v___location_prefix_unslashed_trail_slashed+"cron/"||v___location_path_lead_unslashed==v___location_prefix_unslashed_trail_slashed+"cron/index.cgi"){$('.panel-body form.ui_form[action="index.cgi"]').next("script").next("b").next("p").contents().filter(function(){return this.nodeType==3}).remove()}if(v___location_directory_unslashed_trail_slashed==v___location_prefix_unslashed_trail_slashed+"filter/"){$(".panel-body > b").next("p").contents().filter(function(){return this.nodeType==3}).remove()}if(v___location_directory_unslashed_trail_slashed==v___location_prefix_unslashed_trail_slashed+"dhcpd/"){var $dhcp_target=$(".panel-body > p");if(!$dhcp_target.find('a[href*="../software"]').length){$dhcp_target.contents().filter(function(){return this.nodeType==3}).remove()}}if(v___location_directory_unslashed_trail_slashed==v___location_prefix_unslashed_trail_slashed+"htaccess-htpasswd/"||v___location_directory_unslashed_trail_slashed==v___location_prefix_unslashed_trail_slashed+"forward/"){$("td table.table-hardcoded.table.table-subtable").removeClass("table-striped")}$(".ui_buttons_hr > td > table.table-hardcoded > tbody > tr > td[nowrap]").each(function(){$(this).parents("table").attr("style","margin-bottom: 15px !important")});var textarea_fm_ctl_ui_textarea="textarea.form-control.ui_textarea",btn_type_button_def='button[type="button"].btn-default',text_area_class_to_set="-ta-fn-fx -ta-fn-fx-small margined-bottom--6",btn_styling="width:100% !important; padding-top: 0; height:28px !important; ";$(textarea_fm_ctl_ui_textarea).next(btn_type_button_def).each(function(){$(this).prev("textarea").addClass(""+text_area_class_to_set+" margined-bottom--f25");$(this).attr("style",btn_styling)});$(textarea_fm_ctl_ui_textarea).next("br").next(btn_type_button_def).each(function(){$(this).prev("br").prev("textarea").addClass(text_area_class_to_set);$(this).attr("style",btn_styling)});$(".table-hardcoded > tbody > tr > td > input.form-control.ui_textbox").next('button[type="button"].ui_button').each(function(){$(this).attr("style","margin-top: 2px !important")});$(".table-hardcoded > tbody > tr > td.col_label b a, .ui_table_row td a").each(function(e,t){if(!$(this).attr("href")){$(this).attr("style","color: #191919; text-decoration: none; cursor:default")}});$('input[name="all_weekdays"], .ui_grid_cell > table.table-condensed, table.table-hardcoded table.table-condensed, select[multiple][name="days"]').each(function(){$(this).parent("td").attr("style","vertical-align: top !important; padding-left:2px; padding-right:2px;")});$('input[type="submit"]').each(function(){$(this).addClass("btn btn-default")});$("table tr th").each(function(){if($(this).text()){$(this).attr("style","width: auto")}});$("table thead th:not(.table-title)").each(function(){$(this).css("border-top","none");$(this).css("border-bottom","none")});if($("body").attr("class")&&$("body").attr("class").indexOf(v___module_file_manager)>-1){!$("body").hasClass("file-manager")&&$("body").addClass("file-manager");$("#headln2l").prepend("')}var $table_header_links=$(".panel-heading > .header > div a");$.each($table_header_links,function(){var e=0,t=$(this).attr("href");if(!t){return}if(t.indexOf("config.cgi")>-1||t.indexOf("man/search.cgi")>-1||t.indexOf("/index.cgi")>-1||t==v___location_directory_trail_slashed||t.indexOf("index.cgi")>-1&&v___location_directory_unslashed_trail_slashed==v___location_prefix_unslashed_trail_slashed+"openvpn/"||t.indexOf("index.cgi?")>-1&&v___location_directory_unslashed_trail_slashed==v___location_prefix_unslashed_trail_slashed+"spam/"||t.indexOf("restart_zone.cgi")>-1||t.indexOf("restart.cgi")>-1||t.indexOf("restart_progressive.cgi")>-1||t.indexOf("apply.cgi")>-1||t.indexOf("apply_progressive.cgi")>-1||t.indexOf("start.cgi")>-1||t.indexOf("start_progressive.cgi")>-1||t.indexOf("stop.cgi")>-1||t.indexOf("stop_progressive.cgi")>-1||t=="//"&&(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")||t.indexOf("delete_")>-1||t.indexOf("list_mail.cgi")>-1||t.indexOf("/virtual-")>-1||t.indexOf("/virtualmin-")>-1||t.indexOf("/server-")>-1||t.indexOf("help.cgi")>-1){$.each($(this).next("br"),function(){$(this).remove()});$.each($(this).prev("br"),function(){$(this).remove()});if(t.indexOf("help.cgi")>-1){var i=$(this),a=$(this).parent("div");$(this).remove();a.append(i)}if(t.indexOf("/index.cgi")>-1||t==v___location_directory_trail_slashed||t.indexOf("/virtual-")>-1||t.indexOf("/virtualmin-")>-1||t.indexOf("/server-")>-1){$iconized_class="fa-arrow-left";$(this).data("title","").data("back",1)}else{if(t=="//"&&(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")){$iconized_class="fa-arrow-left";$(this).attr("href",v___location_prefix+"/tconfig.cgi").data("title","").data("back",1)}else{if(t.indexOf("config.cgi")>-1){$iconized_class="fa-cog";$(this).data("title","")}else{if(t.indexOf("restart.cgi")>-1||t.indexOf("restart_progressive.cgi")>-1||t.indexOf("apply.cgi")>-1||t.indexOf("apply_progressive.cgi")>-1){$iconized_class="fa-refresh";e=$(this).find("b").detach()}else{if(t.indexOf("restart_zone.cgi")>-1){$iconized_class="fa-retweet"}else{if(t.indexOf("start.cgi")>-1||t.indexOf("start_progressive.cgi")>-1){$iconized_class="fa-play"}else{if(t.indexOf("stop.cgi")>-1||t.indexOf("stop_progressive.cgi")>-1){$iconized_class="fa-square"}else{if(t.indexOf("man/search.cgi")>-1){$iconized_class=" fa2 fa2-book"}else{if(t.indexOf("delete_")>-1){$iconized_class="fa-trash-o"}else{if(t.indexOf("list_mail.cgi")>-1){$iconized_class="fa-inbox"}else{if(t.indexOf("index.cgi")>-1&&v___location_directory_unslashed_trail_slashed==v___location_prefix_unslashed_trail_slashed+"openvpn/"){$iconized_class="fa-cogs"}else{if(t.indexOf("index.cgi?")>-1&&v___location_directory_unslashed_trail_slashed==v___location_prefix_unslashed_trail_slashed+"spam/"){$iconized_class="fa-arrow-left";$(this).data("back",1)}}}}}}}}}}}}var n=t.indexOf("help.cgi")>-1;if(n){$iconized_class="fa-question-circle";$(this).data("title","")}var r=Convert.strUpInitial(n?theme_language("global_help"):$(this).data("back")===1?!core.curModule(v___module_file_manager)?theme_language("global_return_to_module_index"):"":$(this).text()),l=e?"  "+e.text():"";$(this).data("toggle","tooltip").data("title",r).attr("data-container","body").addClass(vars.h.class.button.tableHeader).removeClass("ui_link").append(''+l+"");$(this).attr("aria-label",r);$(this).contents().filter(function(){return this.nodeType==3}).remove();var o=$(this);o.tooltip({container:"body",placement:o.is(":last-child")?"auto right":"auto top",trigger:"hover",delay:{show:vars.plugins.tooltip.delay.show,hide:vars.plugins.tooltip.delay.hide}});if((v___location_directory_unslashed_trail_slashed==v___location_prefix_unslashed_trail_slashed+"apache/"||v___location_directory_unslashed_trail_slashed==v___location_prefix_unslashed_trail_slashed+"proftpd/")&&(t.indexOf("restart.cgi")>-1||t.indexOf("apply.cgi")>-1)||$(this).parent("div").find("a")&&$(this).parent("div").find("a").length==1||t.indexOf("man/search.cgi")>-1||t.indexOf("config.cgi")>-1||t.indexOf("/index.cgi")>-1||t.indexOf("/index.cgi")>-1||t.indexOf("/virtual-")>-1||t.indexOf("/virtualmin-")>-1||t.indexOf("/server-")>-1){if((t.indexOf("/index.cgi")>-1||t.indexOf("config.cgi")>-1)&&$("body").attr("class")&&$("body").attr("class").indexOf(v___module_file_manager)>-1){$(this).attr("style","margin-right: 0 !important; padding: 6px 12px")}else{$(this).attr("style","margin-right: 0 !important")}}}$("#headln2l").removeClass("invisible")});$.each($('td.ui_grid_cell:contains("|")'),function(){$(this).contents().filter(function(){return this.nodeType==3}).remove()});$('a[href*="help.cgi"][onclick], a[href*="help.cgi/"], a[href*="showpass.cgi?"][onclick]').attr("onclick","").unbind("click").addClass("help_popup");$(".help_popup").each(function(){var e=$(this).find("b"),t=e.length?e:$(this),i=$.trim(t.html());if(i){t.html(i.replace(/\?$/,""))}})}if(!pjax_popstate){$('select.ui_select[name="days"]').each(function(){$(this).parent("td").attr("style","vertical-align: top !important")});if(v___location_directory_unslashed_trail_slashed==v___location_prefix_unslashed_trail_slashed+"mailboxes/"||v___location_path==v___location_prefix+"/mailboxes/index.cgi"||v___location_directory_unslashed_trail_slashed==v___location_prefix_unslashed_trail_slashed+"mailbox/"||v___location_path==v___location_prefix+"/postfix/view_mailq.cgi"){if(core.curModuleFile("mailboxes","reply_mail.cgi")||core.curModuleFile("mailbox","reply_mail.cgi")){var $x=$('.container-fluid .table-subtable a[href^="reply_mail.cgi"][href*="html="]'),$x_th2=$x.parent(".ui_links_row").parent("th");$x_th1=$x_th2.prev();$x.addClass("pull-right margined-top-2 margined-right-2");$x.detach().prependTo($x_th1);$x_th2.remove();var $that_last_attach_row=$('.mailboxes[data-uri*="reply_mail.cgi"] #content form .col_value.col_header .ui_links_row:empty').parent();if($that_last_attach_row.text()==="\n"){$that_last_attach_row.parent("tr").remove()}}if(core.curModuleFile("mailboxes","view_mail.cgi")||core.curModuleFile("mailbox","view_mail.cgi")){var $del_mail_obj2=$('.container-fluid form[action="reply_mail.cgi"]');$del_mail_obj2.contents().filter(function(){return this.nodeType==3}).remove()}if(core.curModuleFile("mailboxes","list_mail.cgi")||core.curModuleFile("mailboxes","mail_search.cgi")||core.curModuleFile("mailboxes","view_mail.cgi")||core.curModuleFile("mailbox","mail_search.cgi")||core.curModuleFile("mailbox","view_mail.cgi")){if(core.curModule("mailboxes")){$(".container-fluid").find('[name="mark1"], [name="mark2"], [name="move1"], [name="move2"], [name="copy1"], [name="copy2"]').each(function(){$(this).val($(this).val().replace(/:$/,""))})}if(core.curModuleFile("mailboxes","list_mail.cgi")||core.curModuleFile("mailboxes","mail_search.cgi")){var $del_mail_obj_form=$('.container-fluid form[action="delete_mail.cgi"]'),$last_links_row=$del_mail_obj_form.find('input[type="hidden"]:first-child ~ [type="submit"] ~ .ui_links_row').last();if($last_links_row.length){$last_links_row.nextUntil("hr").addBack().remove();$del_mail_obj_form.next("script").next("center").remove();$del_mail_obj_form.contents().filter(function(){return this.nodeType==3}).remove()}else{setTimeout(function(){$del_mail_obj_form.find(".ui_links_row").last().addClass("margined-bottom-8").removeClass("margined-bottom--2")})}}if(core.curModuleFile("mailboxes","view_mail.cgi")||core.curModuleFile("mailbox","view_mail.cgi")){var $del_mail_obj_form2=$('.container-fluid form[action="reply_mail.cgi"]'),$last_links_row2=$del_mail_obj_form2.find('input[type="hidden"]:first-child ~ [type="submit"]').nextAll(".table-responsive").last();if($last_links_row2.length){$last_links_row2.nextAll().filter(".ui_form_end_submit, .ui_form_end_submit + .hidden, .ui_form_end_submit + .hidden + br, .ui_form_end_submit + .hidden + select").remove()}else{$del_mail_obj_form2.find(".table-responsive").last().addClass("margined-bottom-5")}}}if(core.curModuleFile("mailbox","mail_search.cgi")||core.curModuleFile("mailbox","view_mail.cgi")){$(".container-fluid").find('[name="mark1"], [name="mark2"], [name="move1"], [name="move2"], [name="copy1"], [name="copy2"]').each(function(){if($(this).is("button")){$(this).text($(this).text().replace(/:/,""))}else{$(this).val($(this).val().replace(/:$/,""))}})}if(core.curModuleFile("mailboxes","list_mail.cgi")||core.curModuleFile("mailboxes","mail_search.cgi")||core.curModuleFile("mailbox","mail_search.cgi")||core.curModuleFile("mailbox","view_mail.cgi")){$.each($(".container-fluid .ui_form img"),function(){var e=$(this).attr("src");if(e){if(e.includes("images/special.gif")){$(this).replaceWith('')}if(e.includes("images/replied.gif")){$(this).replaceWith('')}if(e.includes("images/search.gif")){$(this).remove()}if(e.includes("images/attach.gif")){$(this).replaceWith('')}}})}if(core.curModuleFile("mailboxes","list_mail.cgi")||core.curModuleFile("mailboxes","mail_search.cgi")||core.curModuleFile("mailboxes","view_mail.cgi")||core.curModuleFile("mailbox","mail_search.cgi")||core.curModuleFile("mailbox","view_mail.cgi")){$(".container-fluid").find('[name="delete"]').addClass("btn-danger").removeClass("btn-default");$(".container-fluid").find('[name="reply"]').addClass("btn-info").removeClass("btn-default");$(".container-fluid").find('[name="new"]').addClass("btn-success").removeClass("btn-default");$(".container-fluid").find('[name="razor"]').addClass("btn-warning").removeClass("btn-default")}if(!v___location_file){$(".ui_form_end_submit").css("margin-top","0");$("input#user").addClass("heighter-34 vertical-align-top")}else if(v___location_file=="list_mail.cgi"||v___location_file=="mail_search.cgi"){$('.container-fluid input:not([type="checkbox"]), .container-fluid .ui_form_end_submit, .container-fluid select').addClass("heighter-34").removeClass("heighter-28").css("margin-bottom","-1px");var $del_mail_obj=$('.container-fluid form[action="delete_mail.cgi"]');$del_mail_obj.addClass("margined-top-7");$del_mail_obj.find(".ui_links_row").first().addClass("margined-top-7");$del_mail_obj.find(".ui_links_row").last().addClass("margined-bottom--2");$del_mail_obj.nextAll(".ui_page_flipper").addClass("margined-top-7");$del_mail_obj.find('[name="delete"], [name="new"]').removeAttr("style")}$("body").find("form").removeAttr("onsubmit");var $header_tables=$("body").find('input[name="from"]').parents(".tab-pane").parent("td");$header_tables.children("table").hide();$.each($header_tables.find("input, textarea, select"),function(){if(!$(this).hasClass("ui_select")&&!$(this).attr("onclick")&&$(this).attr("type")!="checkbox"&&$(this).attr("type")!="submit"){$(this).attr("style","width: 60%").addClass("inline-block")}if($(this).attr("onclick")){$(this).addClass("inline-block")}});onbeforeunload=null;if($("body").find('input.ui_hidden[name="html_edit"]').val()==1){$(".table-responsive").eq(1).removeClass()}$("body").find('input[name="from"]').parents(".tab-pane").prev("table").remove();$("body").find('input[name="from"]').parents(".tab-pane ").parent("td").find("div, table").each(function(e,t){$(this).find(".col_label").css("width","20%");$(this).find('input[name="subject"]').parent("td").prev("td").find("b").attr("style","font-size: 13px !important");$(this).find('input[name="subject"]').parents("table").show();$(this).find('input[name="subject"]').parent("td").find(".submitter").remove()});var $editor_mode_link_container=$("body").find('textarea[id="body"]').parents("table").find("thead > tr > th:last-child");$editor_mode_link=$editor_mode_link_container.find("a").addClass("editor_mode_link");$editor_mode_link_container.parent("tr").find("th:first-child").append($editor_mode_link);$editor_mode_link_container.remove();var $editor_mode_link_button=$("body").find('textarea[id="body"]').parents("table").find(".editor_mode_link");$editor_mode_link_button_state=$editor_mode_link_button.attr("href")?$editor_mode_link_button.attr("href").indexOf("html=0"):false;$editor_mode_link_button.attr("title",$editor_mode_link_button.text()).addClass("editor_mode_link_button pull-right btn btn-sm "+($editor_mode_link_button_state==-1?"btn-success":"btn-primary")).html(' ');$(".editor_mode_link_button").tooltip();var $fileinput_add_another_attachment=$("body").find('a[onclick="return add_attachment()"]');$fileinput_add_another_attachment.addClass("btn btn-default ui_link_replaced btn-xxs margined-top-1 margined-left-2 margined-bottom-2");$fileinput_add_another_attachment.text($fileinput_add_another_attachment.text().replace(/\.$/,""));var $fileinput_add_another_servattachment=$("body").find('a[onclick="return add_ss_attachment()"]');$fileinput_add_another_servattachment.attr("onclick","return theme_add_ss_attachment()");$fileinput_add_another_servattachment.addClass("btn btn-default ui_link_replaced btn-xxs margined-top-1 margined-left-3 margined-bottom-2");$fileinput_add_another_servattachment.text($fileinput_add_another_servattachment.text().replace(/\.$/,""));if(v___location_path.indexOf("reply_mail.cgi")>-1){let e=$(".ui_form").find("div.table-responsive").first().next("div.table-responsive").find("th:last-child");e.find("a").addClass("table_title_links pull-right btn btn-tiny margined-top-3 margined-right-3 pull-right-force")}if(v___location_path.indexOf("view_mail.cgi")>-1||v___location_path.indexOf("view_mailq.cgi")>-1){let e=$(".ui_form").find("div.table-responsive"),t=e.first().find(".table-title");$table_title_links_container=t.next();$table_title_links_container.contents().filter(function(){return this.nodeType==3}).remove();e.find('[name="detach"]').addClass("heighter-28 btn-xs");$table_title_links_container.find("a").removeClass("btn-inverse").parent(".ui_links_row").contents().unwrap();$table_title_links_container.find("a").addClass("table_title_links pull-right btn btn-tiny margined-top-3 margined-right-3 pull-right-force");$table_title_links=$table_title_links_container.html();t.append($table_title_links);$table_title_links_container.remove();$table_title_second_container=$(".ui_form").find("div.table-responsive").first().next("div.table-responsive").find("table:first-child");t=$(".ui_form").find("div.table-responsive").first().next("div.table-responsive").find("th:first-child");$table_title_links_container=$(".ui_form").find("div.table-responsive").first().next("div.table-responsive").find("th:last-child");if($(".ui_form").find("div.table-responsive").first().next("div.table-responsive").find("th").length==2){$table_title_links_container.remove()}else{}$table_title_links_container.find("a").addClass("table_title_links pull-right btn btn-tiny margined-top-3 margined-right-3 pull-right-force");$table_title_links_container.find("a").removeClass("btn-inverse").parent(".ui_links_row").contents().unwrap();$table_title_links=$table_title_links_container.html();t.append($table_title_links);setTimeout(function(){if($(".ui_form").find("div.table-responsive").first().find("table:first-child").outerWidth()!=$(".ui_form").find("div.table-responsive").first().next("div.table-responsive").find("table:first-child").outerWidth()){var e=parseInt($(".ui_form").find("div.table-responsive").first().find("table:first-child").width()/2);$table_title_second_container.find(".pull-right").removeClass("pull-right").addClass("pull-left")}$.each($table_title_second_container.find("table"),function(){$(this).removeClass().addClass("clear-formatting");$.each($(this).find("td.col_value"),function(){$(this).addClass("col_value_transparent")})})},30);if(t.find("b")&&t.find("b").length>1){if(t.find("b:first-child").text()==t.find("b:last-child").text()){t.find("b:last-child").remove()}}$('.container-fluid center > a > img[src*="images/left.gif"]').each(function(){$(this).replaceWith('')});$('.container-fluid center > a > img[src*="images/right.gif"]').each(function(){$(this).replaceWith('')})}$("td > a").on("click",function(){if($(this).attr("onclick")=="return add_attachment()"){}$("input[type=file]").each(function(){if(!$(this).parent("a").hasClass("file-input-wrapper")){$(this).bootstrapFileInput()}})});if(settings_mailbox_slash_delimiter){$('.container-fluid select.ui_select[name="id"] > option').each(function(e,t){$(t).text($(t).text().replace(/\./g,"/").replace(/\/\//g,"/"))})}$.each($('table td[align="right"], table td[align="left"]'),function(e,t){$(this).attr("style","border: 0 !important;");$(this).parents("tbody").attr("style","border: 0 !important;");$(this).parents("table.table-hardcoded.table.table-striped.table-condensed.table-subtable").removeClass("table-hardcoded table table-striped table-condensed table-subtable")});$(".ui_form > .table-responsive:first-of-type > .table-striped.table-condensed > tbody").removeAttr("style");$.each($("div.table-responsive > table tbody tr td > table.table-hardcoded"),function(e,t){$(this).find("tr > td.col_label > b").removeAttr("style");$(this).removeClass("table table-condensed")});$.each($("div.table-responsive > table tbody tr td > div.tab-pane"),function(e,t){$(this).find("table").removeClass("table");$(this).parents("div.table-responsive").find("table").removeClass("table-striped table-subtable")});$.each($('div.table-responsive > table tbody tr td > div.tab-pane .col_value > input[type="button"][onclick^="ifield"]'),function(e,t){$(this).attr("style","margin-left: 0; margin-top: 0 !important; vertical-align: top;")})}$.each($(".barchart"),function(){$(this).find("img").attr("height",4)});$("a").each(function(){if(!$(this).attr("href")){$(this).addClass("no_effect")}});$.each($(".container-fluid input:not(.ui_upload)"),function(){if($(this).css("height")=="28px"){$(this).prev("input").addClass("heighter-28")}});if(core.curModule("logviewer")||core.curModule("syslog")||core.curModule("phpini")){$(".container-fluid .chooser_button + .ui_form_end_submit").addClass("heighter-28")}if(core.curModuleFile("gnupg","edit_key.cgi")){$(".container-fluid .sub_table_container .table-condensed .btn-success").addClass("heighter-28").removeClass("btn-success").addClass("btn-default")}if(core.curModuleFile("virtual-server","backuplog.cgi")){$('.container-fluid input[name="search"]').addClass("margined-top--1")}if(core.curModuleFile("usermin","list_sessions.cgi")){$('.container-fluid input[name="user"] + button + button').addClass("heighter-34-force")}$.each($(".container-fluid select"),function(){if($(this).next("input").outerHeight()>=32){$(this).addClass("heighter-34")}});$.each($(".container-fluid .ui_buttons_row input, .container-fluid .ui_buttons_row select"),function(){$(this).addClass("heighter-34")});if(core.curModuleFile("gnupg","list_keys.cgi")){$('.container-fluid input[id="id"]').addClass("heighter-34")}if(core.curModuleFile("virtual-server","edit_script.cgi")){var x1z1x1c41=$('input[name="version"]');x1z1x1c41.length&&x1z1x1c41.attr("style",x1z1x1c41.attr("style").replace("n: middle","n: bottom !important")).addClass("heighter-34")}$.each($("tr > .ui_form"),function(){if($(this).next().next("td").find("input.submitter")){$(this).next().next("td").find("input.submitter").addClass("heighter-34")}});$.each($("input.heighter-34").next(".chooser_button"),function(){$(this).addClass("heighter-34");$(this).find(".fa.fa-files-o").css("margin-top","0").addClass("vertical-align-middle")});setTimeout(function(){$.each($(".container-fluid select"),function(){if($(this).next("input").outerHeight()>=32||$(this).prev("input").outerHeight()>=32){$(this).add($(this).nextAll(":visible")).addClass("heighter-34").removeClass("heighter-28")}else{if($(this).next("input").outerHeight()==28||$(this).prev("input").outerHeight()==28){$(this).addClass("heighter-28").removeClass("heighter-34")}}})},1);if(core.curModule("term")||core.curModuleFile("server-manager","login.cgi")){var tmp__is__m__term=$("iframe");if(tmp__is__m__term.length){var $this=tmp__is__m__term;$this.on("load",function(){$this.contents().find("#term").css("width","99.3%").css("height","96vh").css("margin-top","1px")});$(this).next("br").remove().next('input[type="button"]').remove();$(this).next('input[type="button"]').remove();$(this).next("p").remove()}}$.each($(".chooser_button"),function(){if($(this).prev("input").attr("style")&&$(this).prev("input").attr("style").indexOf("max-width: 100%")>-1){$(this).prev("input").css("max-width","93%")}});if(v___location_path_lead_unslashed==v___location_prefix_unslashed_trail_slashed+"sysinfo.cgi"&&settings_sysinfo_link_mini==true){$(".navigation > li:not('.has-sub')").removeClass("sub_active").find("span.current-large").remove()}$.each($('input[value="..."], input[value=" ..."], input[value=" ..."], input[value="... "], input[value="... "], input[value=" ... "], input[value=" ... "]'),function(){$(this).after('');$(this).attr("value","").addClass("file_chooser_button_attached_input")});$.each($(".chooser_button"),function(){$(this).prev("input").css("margin-top","2px").css("margin-bottom","2px")});$.each($(".file_chooser_button_attached"),function(){$(this).prev('input[type="button"]').prev("input").css("margin-top","2px").css("margin-bottom","2px");if(!$(this).parents(".ui_buttons_label").length&&!$(this).parents(".table-subtable").length){$(this).css("margin-top","11px")}});$.each($(".container-fluid .ui_form > .file_chooser_button_attached"),function(){if($(this).prev(".heighter-34")&&$(this).prev(".heighter-34").length||$(this).next(".heighter-34")&&$(this).next(".heighter-34").length){$(this).css("margin-top","16px");$(this).prev("input[onclick]").css("width","40px")}});$.each($('.container-fluid .ui_form[action="init_cache.cgi"] > .file_chooser_button_attached'),function(){if($(this).prev(".heighter-34")&&$(this).prev(".heighter-34").length||$(this).next(".heighter-34")&&$(this).next(".heighter-34").length){$(this).css("margin-top","14px")}});$.each($(".col_value > .file_chooser_button_attached"),function(){$(this).prev("input[onclick]").css("width","40px").css("margin-left","0")});if(v___location_path==v___location_prefix+"/virtualmin-mailman/"||v___location_path==v___location_prefix+"/virtualmin-mailman/index.cgi"){$("input[name^=reset_]").addClass("heighter-28")}if(v___location_path==v___location_prefix+"/software/edit_pack.cgi"||v___location_path==v___location_prefix+"/apache/show.cgi"||v___location_path==v___location_prefix+"/proc/index_search.cgi"){$.each($(".container-fluid .panel-body .btn:not(.chooser_button)"),function(){$(this).removeClass("heighter-28").addClass("heighter-34")})}if(v___location_path==v___location_prefix+"/virtualmin-svn/"||v___location_path==v___location_prefix+"/virtualmin-svn/index.cgi"){$.each($("tr > td[data-td-e] > button"),function(){$(this).addClass("btn-hover-wash_off-in-row bhw-sm heighter-28 heighter-28-force margined-top-2 margined-bottom-2");if($(this).find(".fa-backup").length){$(this).removeClass("heighter-28-force")}})}if(v___location_path==v___location_prefix+"/virtualmin-init/"||v___location_path==v___location_prefix+"/virtualmin-dav/list_shares.cgi"||v___location_path==v___location_prefix+"/squid/edit_acl.cgi"||v___location_path==v___location_prefix+"/virtualmin-nginx/"||v___location_path==v___location_prefix+"/fdisk/edit_disk.cgi"||v___location_path==v___location_prefix+"/server-manager/edit_newlinks.cgi"||v___location_directory_unslashed_trail_slashed==v___location_prefix_unslashed_trail_slashed+"backup-config/"){$.each($(".container-fluid .panel-body .ui_link_re-replaced"),function(){$(this).addClass("btn-tiny").removeClass("heighter-34")})}if(v___location_path==v___location_prefix+"/pam/"){$(".panel-body > a.ui_link").addClass("btn-tiny")}if(v___location_path==v___location_prefix+"/software/"||v___location_path==v___location_prefix+"/software/index.cgi"){$(".container-fluid input#search").addClass("heighter-34 vertical-align-top");$('form[action="file_info.cgi"] > .ui_form_end_submit').addClass("heighter-28 heighter-28-force margined-top-0")}if(v___location_path==v___location_prefix+"/software/tree.cgi"){$(".ui_link").addClass("margined-top-10")}if(v___location_path==v___location_prefix+"/syslog/save_log.cgi"||v___location_path==v___location_prefix+"/logviewer/view_log.cgi"){$.each($(".container-fluid .heighter-34"),function(){$(this).removeClass("heighter-34").addClass("heighter-28")});$("form:first").next("script").next("br").remove();$("form:last").css("margin-top","5px")}if(v___location_path==v___location_prefix+"/status/edit_mon.cgi"){$('td.col_value > table[cellspacing="1"] tbody').attr("style","border: 0 !important;");$(".opener_trigger:last-child").css("font-size","16px");$.each($("table.sub_table_container td > font"),function(){$(this).parents("tbody");$(this).contents().unwrap().wrap(' ')})}if(v___location_path==v___location_prefix+"/shell/"||v___location_path==v___location_prefix+"/shell/index.cgi"||v___location_path==v___location_prefix+"/server-manager/shell.cgi"||v___location_path==v___location_prefix+"/server-manager/massshell.cgi"){$.each($(".container-fluid .btn:not(.btn-link), .container-fluid select, .container-fluid input"),function(){$(this).removeClass("heighter-28").addClass("heighter-34");if($(this).is('input[type="button"]')){$($(this).addClass("submitter"))}if($(".form-control.sidebar-search").val()&&$(".form-control.sidebar-search").val().trim().startsWith("!")){$(".form-control.sidebar-search").val("")}$(".ui_form").find("input.btn.btn-default:first").addClass("btn-success")});$(".container-fluid input#cmd").focus();setTimeout(function(){var e=$("#content");var t=e.find(v___page_container).outerHeight();e.scrollTop(t)})}$.each($("input"),function(){if($(this).outerHeight()==28&&$(this).next("input").outerHeight()!=28){if($(this).is(':not([type="hidden"])')){$(this).next("input").addClass("heighter-28")}}});$.each($(".container-fluid select"),function(){if($(this).outerHeight()>=32&&$(this).next("select").outerHeight()!=32){$(this).next("select").addClass("heighter-34")}});if(v___location_path==v___location_prefix+"/cluster-passwd/edit_passwd.cgi"){$.each($("input + button"),function(e,t){if($(this).css("height")=="28px"){$(this).addClass("heighter-28").css("line-height","12px").css("margin-top","2px")}})}if(v___location_path==v___location_prefix+"/cluster-shell/"||v___location_path==v___location_prefix+"/cluster-shell/index.cgi"){var $__btn_to_rep=$('button[onclick*="run.cgi?clear"]');if($__btn_to_rep.length){var btn_txt=$__btn_to_rep.text();$__btn_to_rep.replaceWith('")}}if(v___location.pathname==v___location_prefix+"/virtual-server/pro/history.cgi"||v___location.pathname==v___location_prefix+"/server-manager/bwgraph.cgi"||v___location.pathname==v___location_prefix+"/server-manager/history.cgi"||v___location.pathname==v___location_prefix+"/server-manager/one_history.cgi"){$("body").find("table.ui_form_end_buttons .btn.btn-default.submitter.ui_submit").addClass("btn-success");$(".panel-body > table tr td .ui_link_empty").each(function(e,t){$(this).addClass("btn-tiny ui_link_replaced")});$(".panel-body > table a").each(function(e,t){$(this).addClass("btn btn-inverse btn-tiny ui_link_replaced").removeClass("ui_link");$(this).text($(this).text().replace(/\.$/,""));if($(this).text()&&$(this).text().indexOf("<<")>-1){$(this).text($(this).text().replace(/\<\ '+$(this).text()+"")}if($(this).text()&&$(this).text().indexOf(">>")>-1){$(this).text($(this).text().replace(/\>\>/,""));$(this).html($(this).text()+' ')}$(this).parent().contents().filter(function(){return this.nodeType==3}).remove();if($(this).attr("href").indexOf("edit_cmd.cgi?new")===0){$(this).html(' '+$(this).text()+"")}if($(this).attr("href").indexOf("edit_file.cgi?new")===0){$(this).html(' '+$(this).text()+"")}if($(this).attr("href").indexOf("edit_sql.cgi?new")===0){$(this).html(' '+$(this).text()+"")}$(this).parents("table").css("margin-bottom","3px")});if($("#history").next("table.ui_grid_table").next("a").length){$("#history").next("table").next("a").addClass("btn btn-info btn-tiny ui_link_replaced").attr("style","margin-top: 4px !important; margin-bottom: 2px !important").attr("target","_blank");$("#history").next("table").next("a").text($("#history").next("table").next("a").text().replace(/\.\.$/,""));$("#history").next("table").next("a").html(' '+$("#history").next("table").next("a").text())}else{$("#history").next("a").addClass("btn btn-info btn-tiny ui_link_replaced").attr("style","margin-top: 4px !important; margin-bottom: 2px !important").attr("target","_blank");$("#history").next("a").text($("#history").next("a").text().replace(/\.\.$/,""));$("#history").next("a").html(' '+$("#history").next("a").text())}$(".panel-body > hr + b").attr("style","font-size: 16px; font-weight: normal;");$(".panel-body > hr + b").text($(".panel-body > hr + b").text().replace(/\:$/,""));try{onLoad()}catch(e){}}$.each($('tr > td[valign="top"][width="50%"]'),function(){var e=$(this).attr("style");$(this).attr("style","vertical-align: top !important; "+(e?e:""))});$("body table").each(function(e,t){var i=$(this);if(!$(t).hasClass("table")&&!$(t).hasClass("header")&&!$(t).hasClass("ui_form_end_buttons")&&!$(t).hasClass("ui_table")){$(t).addClass("table-hardcoded");if($t_uri_usermin){$(t).addClass("table-subtable");if($(t).find("tr.thead").length||$(t).hasClass("sub_table_container table-hardcoded table-subtable")){}}}});if(v___location_path==v___location_prefix+"/virtual-server/list_scripts.cgi"){table_data_init($("#att_existing > form > table.table.table-striped.table-condensed, #att_new > form > table.table.table-striped.table-condensed"));page.render.content.filter.init();$('[action="list_scripts.cgi"]').replaceWith("

    "+theme_language("virtual_server_scripts_desc")+"

    ")}if(v___location_path==v___location_prefix+"/virtual-server/edit_newscripts.cgi"){table_data_init($("#att_summary > table.table.table-striped.table-condensed"))}if(v___location_path==v___location_prefix+"/server-manager/index.cgi"||v___location_path==v___location_prefix+"/virtualmin-htpasswd/index.cgi"){table_data_init($("body form > table.table.table-striped.table-condensed"))}if($('body[class*="status"]').length&&!v___location_file&&!$('body[class*="smart-status"]').length||v___location_path==v___location_prefix+"/servers/"||v___location_path==v___location_prefix+"/servers/index.cgi"||v___location_path==v___location_prefix+"/webminlog/search.cgi"){table_data_init($("table.table-striped.table-condensed"))}if(core.curModule("smart-status")){$('select[name="drive"]').addClass("heighter-34");$('select[name="drive"] + .ui_form_end_submit').addClass("heighter-34")}if($('body[class*="ldap-useradmin"]').length){table_data_init($("form > table.table.table-striped.table-condensed"))}if(v___location_path==v___location_prefix+"/virtual-server/list_sched.cgi"){table_data_init($(".table.table-striped.table-hover.table-condensed"),false,false,{orderable:false,targets:[0,-1]})}if(v___location_path==v___location_prefix+"/servers/"||v___location_path==v___location_prefix+"/servers/index.cgi"){$(".ui_checked_columns td table tr td").find('a.ui_link[href*="edit_serv.cgi"]').addClass("margined-left-4 label label-sm label-primary hidden").html('');$(".ui_checked_columns").hover(function(){$(this).find("td table tr a.ui_link.label.hidden").removeClass("hidden")},function(){$(this).find("td table tr a.ui_link.label").addClass("hidden")})}$.each($('table.table.table-striped.table-condensed.dataTable.no-footer > thead > tr[role="row"]:first-child'),function(e,t){$(this).attr("style","border-top: 4px solid #f2f2f2 !important")});$.each($('button[onclick^="ifield"].btn.btn-default.ui_button'),function(){$(this).addClass("file_chooser_button_emulate")});$.each($(".file_chooser_button_emulate"),function(){if(!$(this).find(".fa-files-o").length){$(this).append('')}if($(this).prev("input").css("height")=="28px"){$(this).addClass("heighter-28")}});$.each($("label > img"),function(e,t){$(this).attr("style","vertical-align: baseline !important")});$.each($('select[multiple][name="weekdays"]'),function(){$(this).parents('td[valign="top"], td[data-td-e]').attr("style","vertical-align: top !important");$(this).parents('table[width="100%"]').parents(".ui_radio_table.table-hardcoded").css("width","100%")});$.each($("label").find("br"),function(){$(this).parent("label").prev(".aradio, .acheckbox").attr("style","margin-left: 0 !important;");$(this).parent("label").next(".aradio, .acheckbox").attr("style","margin-left: 0 !important;")});$.each($(".table-responsive + .table-responsive + .table-hardcoded td"),function(){if($(this).find(".heighter-34").length){$.each($(".table-responsive + .table-responsive + .table-hardcoded td"),function(){$(this).find(".btn").addClass("heighter-34")})}});if(v___location_path==v___location_prefix+"/cpan/edit_mod.cgi"){$('.container-fluid form[action="download.cgi"]').next().next().next().find(".submitter.ui_submit").addClass("heighter-34")}if(core.curModuleFile("virtual-server","edit_script.cgi")){$('.container-fluid .ui_form button[name="stop"], .container-fluid .ui_form button[name="start"], .container-fluid .ui_form button[name="restart"]').addClass("heighter-34-force margined-right--4");$('.container-fluid .ui_form button[name="upgrade"]').addClass("margined-right--5")}if(v___location_path==v___location_prefix+"/cpan/"||v___location_path==v___location_prefix+"/cpan/index.cgi"){var cpan_button=$('input[name="cpan"]').next("button");if(cpan_button.length){cpan_button.html('').attr("style","width: 40px; height: 28px; vertical-align:middle !important; margin-top:2px; margin-bottom:2px;");cpan_button.attr("onclick",cpan_button.attr("onclick").replace("document.forms[0]","document.forms[1]"))}}if($("form").find(".icons-row:not(.inline-row)").length){$("form").find(".icons-row").addClass("_processed_"+(settings_right_table_links_type=="1"?" small":"")+"").css("border-top","1px solid #efefef").css("border-bottom","1px solid #efefef").find(".icons-container").addClass("icons-container-stretched")}if($(".ui_subheading + .ui_links_row ~ .icons-row:not(.inline-row)").length){$(".ui_subheading + .ui_links_row ~ .icons-row:not(.inline-row)").addClass("_processed_"+(settings_right_table_links_type=="1"?" small":"")+"").css("border-top","1px solid #efefef").css("border-bottom","1px solid #efefef").find(".icons-container").addClass("icons-container-stretched")}function __m_ico_row_tb(){$("body").find(".icons-row:not(._processed_):not(.inline-row)").css({"padding-top":"8px","padding-bottom":"8px"});$("body").find(".icons-row:not(._processed_):not(.inline-row)").css("border-top","1px solid #efefef").css("border-bottom","1px solid #efefef")}function __m_ico_row_t(){$("body").find(".icons-row:not(._processed_):not(.inline-row)").css({"padding-top":"18px"});$("body").find(".icons-row:not(._processed_):not(.inline-row)").css("border-top","1px solid #efefef")}if(v___location_path==v___location_prefix+"/lvm/"||v___location_path==v___location_prefix+"/lvm/index.cgi"||v___location_path==v___location_prefix+"/proftpd/virt_index.cgi"||v___location_path==v___location_prefix+"/dhcpd/"||v___location_path==v___location_prefix+"/dhcpd/index.cgi"||v___location_path==v___location_prefix+"/cluster-usermin/"||v___location_path==v___location_prefix+"/cluster-usermin/index.cgi"||v___location_path==v___location_prefix+"/bind8/"||v___location_path==v___location_prefix+"/bind8/index.cgi"||v___location_path==v___location_prefix+"/grub/"||v___location_path==v___location_prefix+"/grub/index.cgi"||v___location_path==v___location_prefix+"/cluster-software/"||v___location_path==v___location_prefix+"/cluster-software/index.cgi"||v___location_path==v___location_prefix+"/cluster-useradmin/edit_user.cgi"||v___location_path==v___location_prefix+"/cluster-useradmin/edit_group.cgi"||v___location_path==v___location_prefix+"/cluster-webmin/edit_mod.cgi"||v___location_path==v___location_prefix+"/cluster-usermin/edit_mod.cgi"||v___location_path==v___location_prefix+"/cluster-software/edit_pack.cgi"||v___location_path==v___location_prefix+"/cluster-useradmin/"||v___location_path==v___location_prefix+"/cluster-useradmin/index.cgi"||v___location_path==v___location_prefix+"/cluster-usermin/"||v___location_path==v___location_prefix+"/cluster-usermin/index.cgi"||v___location_path==v___location_prefix+"/cluster-webmin/"||v___location_path==v___location_prefix+"/cluster-webmin/index.cgi"){__m_ico_row_tb()}if(v___location_path==v___location_prefix+"/proftpd/"||v___location_path==v___location_prefix+"/proftpd/index.cgi"||v___location_path==v___location_prefix+"/mysql/"||v___location_path==v___location_prefix+"/mysql/index.cgi"||v___location_path==v___location_prefix+"/postgresql/"||v___location_path==v___location_prefix+"/postgresql/index.cgi"||v___location_path==v___location_prefix+"/bacula-backup/"||v___location_path==v___location_prefix+"/bacula-backup/index.cgi"){__m_ico_row_t()}$.each($(".row.icons-row.inline-row"),function(){$(this).find("a.icon_link").contents().filter(function(){return this.nodeType==3}).remove()});$.each($(".row.icons-row:not(.inline-row) .icons-container"),function(){$(this).removeAttr("data-title").removeAttr("data-toggle").removeAttr("data-placement").removeAttr("data-container")});if($("body").find(".icons-row > div.icons-container").length||$("body").find(".icons-row > div.small-icons-container").length){$.each($(".icons-row .hidden-forged-6"),function(){if($(this).find("input").is(":checked")){$(this).parents('div[class*="icons-container"]').addClass("highlighted")}});$.each($(".hidden-forged-7 > a"),function(){$(this).removeClass();if($(this).parents(".hidden-forged-7").hasClass("hidden-forged-7-small")){$(this).html(' ');$(this).parent().parent().prepend('')}else{$(this).html(' ');$(this).parent().parent().prepend('')}})}if(v___location_directory_unslashed_trail_slashed==v___location_prefix_unslashed_trail_slashed+"virtualmin-registrar/"){$.each($("td > input "),function(){if($(this).parents("table.table-hardcoded").find('form[action="edit.cgi"]').length){$(this).css("margin-left","5px");$(this).parent("td").prev("td").find("select").css("margin-left","5px")}})}if(v___location_path==v___location_prefix+"/virtual-server/list_scripts.cgi"||v___location_path==v___location_prefix+"/virtual-server/edit_newscripts.cgi"){$('form[action="disable_scripts.cgi"] thead + thead tr th, form[action="disable_scripts.cgi"] tbody + thead tr th, form[action="script_form.cgi"] thead + thead tr th, form[action="script_form.cgi"] tbody + thead tr th').attr("colspan","5")}$.each($(".file_chooser_button_attached"),function(e,t){if($(this).prev('input[onclick*=".cgi"]')){$(this).prev('input[onclick*=".cgi"]').css("width","40px")}});if($t_uri_cloudmin&&(v___location_path==v___location_prefix+"/server-manager/add_form.cgi"||v___location_path==v___location_prefix+"/server-manager/scan_form.cgi")){$.each($("label"),function(){$(this).find("br").remove()})}if((v___location_path==v___location_prefix+"/mysql/view_table.cgi"||v___location_path==v___location_prefix+"/postgresql/view_table.cgi")&&$("td[data-td-e] > table.table-hardcoded")){var $tables=$(".container-fluid form .table.table-striped.table-hover.table-condensed");$tables.addClass("table-resizable").resizeableTableColumns(uri_parse_param("table",vars.source_request)||uri_parse_param("table",vars.source_request)||uri_parse_param("table",v___location_file+"?"+$(vars.previous_request.target).serialize()));if($tables.find(".ui_checked_checkbox").length){$tables.find("thead tr th:first-child").addClass("nonresizable")}var $___colspan=$(".container-fluid td[data-td-e] > table.table-hardcoded").parents("table").find("thead").find("tr").find("th").length;$(".container-fluid td[data-td-e] > table.table-hardcoded").parent("td[data-td-e]").attr("colspan",$___colspan).attr("style","padding: 1px !important;")}if(v___location_path==v___location_prefix+"/virtual-server/backup_form.cgi"&&v___location_href&&v___location_href.indexOf("?sched=")>-1){setTimeout(function(){var e=$("a[href=\"javascript:hidden_opener('hiddendiv_adddest', 'hiddenopener_adddest')\"]");e.next().attr("style","").addClass("btn btn-tiny btn-default margined-bottom-10");e.one("click",function(t){e.next("br").replaceWith('
     
    ');$(this).add(e).remove()})},10)}$.each($('form[action="save_global.cgi"], form[action="save_iptables.cgi"], form[action="save_domain.cgi"],form[action="domain_setup.cgi"],form[action="mass_create.cgi"],form[action="save_roundrobin.cgi"],form[action="save_alert.cgi"], body.time form[action="apply.cgi"]'),function(){$(this).find(".col_header").removeClass("col_header")});if(check_location_resource("/virtual-server/edit_newchangelog.cgi")||check_location_resource("/server-manager/edit_newchangelog.cgi")||check_location_resource("/shell/")||check_location_resource("/shell/index.cgi")||check_location_resource("/server-manager/shell.cgi")){$("td.col_value.col_value").removeClass("col_header")}if(check_location_resource("/ldap-server/edit_ldif.cgi")){$("span > input.ui_opt_textbox").unwrap()}if(v___location_path==v___location_prefix+"/server-manager/gvnc.cgi"){$("body.server-manager p > ").css("height","100%").parent("p").attr("style","display: block; height: "+parseInt($(window).outerHeight()/1.4)+"px")}if(v___location_path==v___location_prefix+"/spam/edit_simple.cgi"||v___location_path==v___location_prefix+"/spam/edit_header.cgi"){var target=$(".ui_form .table-responsive table.table.table-striped.table-condensed.table-subtable > thead tr th:first-child"),container=$(".ui_form .table-responsive table.table.table-striped.table-condensed.table-subtable > thead tr th:last-child"),link=container.find("a");target.append(link);container.remove();target.find("a").addClass("table_title_links pull-right btn btn-xs btn-link btn-link-bordered btn-transparent").attr("style","position: absolute; right: 23px; margin-top: 5px !important;")}if(v___location_path==v___location_prefix+"/server-manager/edit_pass.cgi"&&$('form[action="save_pass.cgi"]').find('a[href*="edit_pass.cgi?"]:not(.btn)').length){var target=$(".ui_form .table-responsive table.table.table-striped.table-condensed.table-subtable > thead tr th:first-child"),container=$(".ui_form .table-responsive table.table.table-striped.table-condensed.table-subtable > thead tr th:last-child"),link=container.find("a");target.append(link);container.remove();target.find("a").addClass("table_title_links pull-right btn btn-info btn-tiny").attr("style","position: absolute; right: 20px; margin-top: 3px !important;")}$('.panel-default + a[href="/virtual-server/"]').attr("href",v___location_prefix+"/virtual-server/index.cgi");$('.panel-default + a[href="/server-manager/"]').attr("href",v___location_prefix+"/server-manager/index.cgi");if(v___location_directory_unslashed_trail_slashed==v___location_prefix_unslashed_trail_slashed+"acl/"){$("body.acl > div > div > div.panel-body > form > div > table > tbody > tr > td > table > tbody > tr:nth-child(1) > td > table > tbody").attr("style","border: 0 !important");var $t__acl_title=$("br").next(".ui_grid_table.table-hardcoded").find("tbody").addClass("border-global-color").parent("table").prev("br").prev("b");$("br").next(".ui_grid_table.table-hardcoded").css("margin-bottom","3px");$.each($t__acl_title,function(e,t){if($(this).text()==""){$(this).next("br").remove();$(this).remove()}});$t__acl_title.attr("style","margin-bottom: -3px !important").next("br").remove()}if($('body[class*="bandwidth"]').length){$(".fa.fa-calendar.file_chooser_button_attached").attr("style","font-size: 11px; margin-top: 9px !important; pointer-events: none; margin-left: -27px !important;")}if(v___location_path==v___location_prefix+"/mysql/exec_form.cgi"||v___location_path==v___location_prefix+"/postgresql/exec_form.cgi"){$('select[name="old"], input[name="clear"], select[name="charset"]').removeClass("heighter-34").addClass("heighter-28");$('input[name="clear"]').attr("style","margin-bottom: 3px !important;");$('select[name="old"]').attr("style","margin-bottom: 3px !important; margin-right: 0 !important;")}if((v___location_file=="config.cgi"||v___location_file=="uconfig.cgi")&&(v___location_query=="mysql"||v___location_query=="postgresql")){$('input[name="style"]').parents("td.col_value").parent("tr").after(' '+theme_language("xsql_fit_content_screen_height")+' '+''+''+'"+''+'"+" ")}}if(core.curModuleFile("mailboxes","reply_mail.cgi")||core.curModuleFile("mailbox","reply_mail.cgi")){if($("body").find('input.ui_hidden[name="html_edit"]').val()==1){let e="fn_mailboxes_html_editor_init";if(typeof fn_mailbox_html_editor_init==="function"){e="fn_mailbox_html_editor_init"}var textarea_selector='form[action^="send_mail.cgi"] textarea[name="body"]',editor_mode=$(textarea_selector).data("html-mode")||"advanced",bundles=["quill:min"];if(editor_mode==="advanced"){bundles=Convert.arrPrepend("highlight/highlight:min",bundles)}load.bundle(bundles,1,['quill_editor_html_init("'+textarea_selector.replace(/"/g,'\\"')+'", "'+e+'")']);$('textarea[name="body"]').parents(".sub_table_container").addClass("xcontent-force-no-styling")}}if(core.curModuleFile("mailboxes","view_mail.cgi")||core.curModuleFile("mailbox","view_mail.cgi")){var $del_mail_obj3=$('.container-fluid form[action="reply_mail.cgi"]'),$print_mail_btn=$del_mail_obj3.find('[name="print"]');$print_mail_btn.removeAttr("onclick");$print_mail_btn.on("click",function(e){e.preventDefault();e.stopPropagation();var t=$del_mail_obj3.find(".table-responsive").first(),i=t.find(".sub_table_container"),a=t.next(".table-responsive").find(".clear-formatting");var n=i.parent().html()||String(),r=a.parent().html()||String();if(n){n=n.replace(/�/g,"")}if(r){r=r.replace(/�/g,"")}progress.start();$("body").append('
    '+n+"




    "+r+"
    ");$($(".printer-container:last").printThis()).promise().done(function(){setTimeout(function(){progress.end()},600);$(".printer-container").remove()})})}if(v___location_path&&v___location_path.indexOf("/sysinfo.cgi")>-1){if(!pjax_popstate){var status_id="#system-status",$status_panel_content=$(""+status_id+" .panel-body");!$status_panel_content.text().trim()&&$status_panel_content.parent(status_id).remove();$("td img, #status_services-status-1-collapse .tr_tag [data-td-e] > img").each(function(e,t){var i=t.src;if(i){var a=i.match(/images\/(.*)\./),n=a&&a[0]&&a[1]?a[1]:String(),r="fa fa-fw fa-1_15x fa-check text-success";if(n==="down"){r="fa fa-fw fa-1_15x fa-times-circle text-danger"}else if(n==="timed"){r="fa fa-fw fa-clock text-warning fa-1_15x"}else if(n==="webmin"){r="fa fa-fw fa-webmin fa-1_15x text-warning"}else if(n==="skip"){r="fa2 fa-fw fa2-minus fa-1_15x text-semi-dark vertical-align-middle"}else if(n==="not"){r="fa2 fa-fw fa2-not-interested fa-1_15x text-semi-dark"}else if(n==="quest"){r="fa fa-fw fa-question-circle fa-1_15x text-semi-dark"}if(n){$(t).replaceWith('')}}});$.each($(".piechart"),function(){if(isNaN($(this).data("percent"))){$(this).parents(".text-center").remove()}}).promise().done(function(){var e=$("span[data-charts]"),t='div[class^="col-md-"]',i=e.parents(".row").find(t).length,a=12/i,n=i===2?"3":i==="1"?"6":"",a=n?n:a;$.each(e.parents(".row"),function(e,n){$(this).find(t).removeClass().addClass("col-md-"+(i===2?6:a)+" col-md-"+a*1.5+" col-xs-"+a*1.5+" col-xs-"+a*2+" text-center xx");if(i===3){var r="col-xs-";$(this).find(t).last().removeClass(r+"6"+" "+(r+"8")).addClass(r+"12")}})});try{theme_panels_sort("dashboard")}catch(e){}$('span[data-entry="nf_seen"]').parent("button").on("click",function(e){e.preventDefault();var t=$(this),i=$('form[action*="seen_newfeatures.cgi"]');$.ajax({type:"GET",url:i.attr("action"),data:false,statusCode:{200:function(){t.parents(".panel.panel-default").remove()}}})});plugins.dashboard.update.formsURLs();var aria_label_attr="aria-label";$.each($(".__page [data-title]:not(["+aria_label_attr+"]), .__page [title]:not(["+aria_label_attr+"])"),function(e,t){$(this).attr(aria_label_attr,$(t).attr("data-title")||$(t).attr("title"))})}snippets.datetime.tictac(1);setTimeout(theme_title_generate);$("#live_stats-collapse").on("shown.bs.collapse",function(){if(stats&&stats.general){var e=[];Object.keys(stats.general).forEach(function(t){if(t.startsWith("chart_")){e.push(t)}});e.forEach(function(e){var t=stats.general[e];if(typeof t.resizeListener==="function"){t.resizeListener()}})}})}if(!pjax_popstate){if(v___location_path==v___location_prefix+"/virtual-server/edit_phpmode.cgi"){$("#hiddendiv_phpinfo table tbody tr").css("border","1px solid #"+(v___theme_night_mode_enabled?"393b3f":"eee")+"")}var $showpass_target=$('a[href*="showpass.cgi?"][onclick]'),show_pass_key='';$.each($showpass_target,function(){$(this).html(show_pass_key);$(this).next(".awobject").addClass("margined-left-4");var e=$(this).parent().parent(".awobject");if(e.length){e.after($(this).detach())}});$showpass_target.addClass("badge badge-transparent badge-circle");if(v___location_path==v___location_prefix+"/webmin/edit_startpage.cgi"){$('select[name="deftab"]').parents("td.col_value").parent("tr").hide();$('select[name="gotomodule"] option').each(function(){($(this).val()=="virtual-server"||$(this).val()=="server-manager")&&$(this).remove()})}if(v___location_path==v___location_prefix+"/webmin/edit_ui.cgi"||v___location_path==v___location_prefix+"/usermin/edit_ui.cgi"){$('select[name*="sysinfo"], select[name*="dateformat"], input[name*="showlogin"], input[name*="showhost"], input[name*="sizefile_def"], input[name*="sizeuser_def"], input[name*="sizemodule_def"], input[name*="sizeusers_def"], input[name*="sizemodules_w"], input[name*="cs_link_def"], input[name*="cs_header_def"], input[name*="cs_table_def"], input[name*="cs_text_def"], input[name*="cs_page_def"], input[name*="width_def"], input[name*="height_def"], input[name*="sizedate_def"], input[name*="texttitles"]').parents("td.col_value").parent("tr").addClass("hidden");$(".sub_table_container tr td.no-border").parent("tr").addClass("hidden");var $container_ui_interface=$(".container-fluid .panel-body");$container_ui_interface.contents().filter(function(){return this.nodeType==3}).remove();$container_ui_interface.find("p").first().remove()}if(v___location_path===v___location_prefix+"/uconfig.cgi"&&v___location_query&&v___location_query.toString().includes("mailbox")||v___location_path===v___location_prefix+"/config.cgi"&&v___location_query&&v___location_query.toString().includes("mailboxes")){$('[name="open_mode"][value="0"]').click();$('[name="open_mode"]').parents("td.col_value").parent("tr").addClass("hidden")}if(check_location_resource("/config.cgi?virtual-server")||check_location_resource("/config.cgi?server-manager")){$('input[name="theme_image"], input[name="theme_link"], input[name="theme_alt"]').parents("td.col_value").parent("tr").hide();$('input[name="show_sysinfo"]:checked').length===0&&$('input[name="show_sysinfo"][value="1"]').attr("checked","checked")}if(v___location_path==v___location_prefix+"/virtual-server/edit_resel.cgi"){$('input[name="logo"][id="logo"], input[name="link"]').parents("td.col_value").parent("tr").hide()}if(v___location_path==v___location_prefix+"/virtual-server/edit_newfeatures.cgi"){$('.container-fluid tr td:last-child label:contains("|")').replaceText(/\|/gi,"");var $targets_features_and_plugins_links=$(".container-fluid td a.ui_link");$targets_features_and_plugins_links.addClass("ui_link_replaced btn btn-transparent btn-link-bordered f__lnk_t_btn-el margined-left--2 btn-xxs").removeClass("heighter-34").removeClass("ui_link btn-inverse btn-tiny").prepend('');$.each($targets_features_and_plugins_links,function(){var e=$(this).parent();if(e.is(".ui_links_row")){if(e.parent().is("label")){e.parent().contents().unwrap()}e.contents().unwrap()}$(this).parents("td.cursor-pointer").attr("data-td-e",1)})}if($("#headln2l .btn .fa-arrow-left").length){if($("body").attr("class")&&$("body").attr("class").indexOf(v___module_file_manager)>-1){}else{$("#headln2l .btn .fa-arrow-left").parent("a").attr("href",$("#headln2l .btn .fa-arrow-left").parent("a").attr("href").replace("index.cgi",""))}var v___URI=URI(v___location);v___location_file=v___URI.filename()}$("#headln2r, #headln2l").prepend('
    ').append("
    ");$("#headln2r a").detach().appendTo("#headln2r .btn-group");$("#headln2l a").detach().appendTo("#headln2l .btn-group");if(!$.support.spa&&!$("body").hasClass("file-manager")){$("#headln2l .btn-group").prepend('')}if(!$.support.spa&&!$("body").hasClass("file-manager")){session.server.data("data-slider-fixed",0)}if(core.curModule("virtual-server","list_records.cgi")){$.each($('form[action="delete_records.cgi"] table td > label > [data-type][data-text]'),function(){$(this).replaceWith('')})}$.each($(".ui_form_end_submit"),function(){if(v___location_path_lead_unslashed==v___location_prefix_unslashed_trail_slashed+"proc/edit_proc.cgi"||v___location_path_lead_unslashed==v___location_prefix_unslashed_trail_slashed+"proc/kill_proc.cgi"||v___location_path_lead_unslashed==v___location_prefix_unslashed_trail_slashed+"proc/renice_proc.cgi"||v___location_file=="edit_dbase.cgi"||v___location_file=="edit_pam.cgi"||v___location_file=="list_records.cgi"||core.curModule("mailbox")||core.curModuleFile("virtual-server","edit_script.cgi")||core.curModule("mailboxes")){return}var e=$(this).parent().find(".ui_form_end_submit");if(!e.parents(".btn-group").length&&e.length>1){$(this).parent().find(".ui_form_end_submit, .ui_form_end_submit + input").wrapAll('
    ')}}).promise().done(function(){$.each($(".end_submits"),function(){if($(this).prev(".heighter-28").length||$(this).prev("input, select").css("height")=="28px"){$(this).find(".ui_form_end_submit").addClass("heighter-28")}var e=$('select[name*="parentuser"]').first();if(core.curModule("virtual-server")&&e.length===1){var t=e.addClass("heighter-34 pull-left").attr("style","margin-top: -1px !important; margin-right: -1px;").detach(),i=$('button[name="add1"] + input');i.after(t)}})});$.each($(".btn-group").find("span"),function(){$(this).not("[class]").length&&!$.trim($(this).text()).length&&$(this).remove()});if($(".panel-default").nextAll("a.btn.btn-primary").length===2){$(".panel-default").next("a.btn.btn-primary").find(".fa.fa-arrow-left").removeClass("fa-arrow-left").addClass("fa-arrow-circle-o-left")}if($(".panel-default").nextAll("a.btn.btn-primary").length===3){$(".panel-default").next("a.btn.btn-primary").next("a.btn.btn-primary").find(".fa.fa-arrow-left").removeClass("fa-arrow-left").addClass("fa-arrow-circle-left");$(".panel-default").next("a.btn.btn-primary").find(".fa.fa-arrow-left").removeClass("fa-arrow-left").addClass("fa-arrow-circle-o-left")}if(v___location_path==v___location_prefix+"/init/reboot.cgi"){$("input.btn-success").removeClass("btn-success").addClass("btn-warning")}if(v___location_path==v___location_prefix+"/init/shutdown.cgi"){$("input.btn-success").removeClass("btn-success").addClass("btn-danger")}if(!$.support.spa){page_display()}$("table tr.thead td").addClass("tdhead");var dynamic_switch_off_on=$(".fa-toggle-switch-off").parent("button.btn-default");if(dynamic_switch_off_on.length===1){var dynamic_switch__val=dynamic_switch_off_on.parent("td").find('input[type="radio"]:checked').val();if(dynamic_switch__val=="1"){dynamic_switch_off_on.find(".fa-toggle-switch-off").addClass("fa-toggle-switch").removeClass("fa-toggle-switch-off")}}var my_editor_page=$('form[action*="manual"] > select[name="file"], form[action*="manual.cgi"] > select[name="manual"], form[action*="edit_"] > select[name="file"]');if(my_editor_page.length){my_editor_page.addClass("heighter-34");$('form[action*="manual"], form[action*="edit_"]').css("margin-bottom","4px")}if(core.curModule("firewalld")){$("select#zone").addClass("heighter-34");$('form[action="save_ifaces.cgi"] > .btn').addClass("btn-tiny f__lnk_t_btn-el")}$('body[class*="proftpd"] .table-hardcoded tr td > input + input.btn.btn-default').removeClass("heighter-28").addClass("heighter-34").prev("input").addClass("heighter-34");$('body[class*="proftpd"] form[action="find_ftpaccess.cgi"] > input:first-child').removeClass("heighter-34").addClass("heighter-28");if(v___location_file=="edit_simple.cgi"&&$('body[class*="spam"]').length){$("tr td").contents().filter(function(){return this.nodeType==3}).remove()}if(v___location_file=="edit_awl.cgi"&&$('body[class*="spam"]').length){$('input[name="user"]').next("input").addBack().addClass("heighter-34")}if(core.curModuleFile("usermin","list_sessions.cgi")){$('.container-fluid #user, .container-fluid input[type="button"]').addClass("heighter-34")}if(core.curModuleFile("htaccess-htpasswd","")||core.curModuleFile("htaccess-htpasswd","index.cgi")){$("#search, .chooser_button").addClass("heighter-34").css("margin-bottom","-1px");$("#search").css("margin-top","1px");$('form[action*="search.cgi"] .ui_form_end_submit').css("margin-top","2px").css("margin-right","-4px")}if(core.curModuleFile("mailboxes","")||core.curModuleFile("mailboxes","index.cgi")){$("#user").addClass("heighter-34 vertical-align-middle margined-bottom-1");$(".chooser_button").addClass("margined-top-2 margined-bottom-2")}if(core.curModuleFile("mailboxes","list_mail.cgi")||core.curModuleFile("mailboxes","mail_search.cgi")){$("#mfolder1, #mfolder2").addClass("heighter-34").css("margin-bottom","-1px").css("margin-top","-1px")}if(core.curModuleFile("quota","list_users.cgi")){$("#user, #user + input").addClass("heighter-34")}if(core.curModuleFile("quota","list_groups.cgi")){$("#group, #group + input").addClass("heighter-34")}if(core.curModuleFile("apache","htaccess.cgi")||core.curModuleFile("virtualmin-registrar","index.cgi")||core.curModuleFile("virtualmin-registrar","")){$(".ui_form_end_submit").addClass("heighter-28-force")}var attempt_make_all_elem=$('form:not([action="save_log.cgi"], [action="view_log.cgi"]) .table-responsive .table .sub_table_container .table tbody tr td > select, form:not([action="save_log.cgi"], [action="view_log.cgi"], [action="save_net.cgi"]) .table-responsive .table .sub_table_container .table tbody tr td > input, form:not([action="save_user.cgi"], [action="save_group.cgi"]) .table td.opener_container td.col_value table tbody tr td > select, form:not([action="save_user.cgi"], [action="save_group.cgi"]) .table td.opener_container td.col_value table tbody tr td > input, form[action="save_newglobal.cgi"] > table tbody tr td input, form[action="save_newfields.cgi"] > table tbody tr td input, form[action="save_newfields.cgi"] > table tbody tr td select, form[action="save_newshells.cgi"] > table tbody tr td select, form[action="save_newshells.cgi"] > table tbody tr td input, form[action="save_linkcats.cgi"] > table tbody tr td input, form[action="save_gen.cgi"] > table tbody tr td input ');$.each(attempt_make_all_elem,function(e,t){if($(this).parent().find("input[data-mmclick]").length||$(this).parent().find("button[data-mmclick]").length||$(this).parent().find('input[onclick*="window.open"]').length||$(this).parent().find('button[onclick*="window.open"]').length){return}if($(this).prev(".awobject").length){$(this).css("width","auto");return}if($(this).parent().find('input:not([type="checkbox"], [type="radio"]), select').length==1){$(this).css("width","100%").css("min-width","100%")}else if($(this).parent().find('input:not([type="checkbox"], [type="radio"]), select').length==2){$(this).parent().find("input, select").first().css("width","39%");$(this).parent().find("input, select").last().css("width","60%").css("float","right")}});var $edit_new_style_target=$('a[onclick^="window.open(\\"thumb_style.cgi?"]');if(core.curModuleFile("virtual-server","edit_newstyles.cgi")){$edit_new_style_target.html('').addClass("btn btn-transparent btn-link-bordered btn-xxs margined-top--3")}else if(core.curModule("virtual-server")){$edit_new_style_target.html('').addClass("btn btn-transparent btn-link-bordered heighter-28-force")}$edit_new_style_target.on("click",function(e){e.stopPropagation()});if(core.curModuleFile("virtual-server","edit_html.cgi")){$('.ui_form_end_submit:not([name="create"], [name="cancel"], [name="save"], [name="delete"])').addClass("heighter-28-force");var is_html_mode_edit_web_pages=v___location_query.indexOf("editok")!==-1||v___location_query.indexOf("createok")!==-1?true:false,is_text_mode_edit_web_pages=v___location_query.indexOf("textok")!==-1?true:false;if(is_html_mode_edit_web_pages&&$("#body").length){$("#editok").removeClass("btn-default").addClass("btn-grey");$("#body").css("display","none");$("hr + b").addClass("hidden");$("#body").after('
    ');editor_html_init(["body",2,true,"edit_web"])}else if(is_text_mode_edit_web_pages){$("#textok").removeClass("btn-default").addClass("btn-grey");editor_init_check()&&editor_init($(".container-fluid > .panel > .panel-body textarea"),false,false,"static",false,true,false,pjax_popstate)}$(".ui_form_end_submit").click(function(){set_onbeforeunload_status(0,0)});$("input:file").change(function(){var e=$(this);setTimeout(function(){$('form[action*="upload_html.cgi"]').append(e)},500)})}var $magic_button_selector=' body button[onclick*="window.open"][onclick*="choose"][onclick*="chooser.cgi"]:not([onclick*="_chooser.cgi"]), body input[onclick*="window.open"][onclick*="choose"][onclick*="chooser.cgi"]:not([onclick*="_chooser.cgi"]), body button[onclick*="window.open"][onclick*="choose"][onclick*="cron_chooser.cgi"], body input[onclick*="window.open"][onclick*="choose"][onclick*="cron_chooser.cgi"], body button[onclick*="window.open"][onclick*="choose"][onclick*="standard_chooser.cgi"], body input[onclick*="window.open"][onclick*="choose"][onclick*="standard_chooser.cgi"], body button[onclick*="window.open"][onclick*="choose"][onclick*="third_chooser.cgi"], body input[onclick*="window.open"][onclick*="choose"][onclick*="third_chooser.cgi"], body button[onclick*="window.open"][onclick*="choose"][onclick*="user_chooser.cgi"], body input[onclick*="window.open"][onclick*="choose"][onclick*="user_chooser.cgi"], body button[onclick*="window.open"][onclick*="choose"][onclick*="group_chooser.cgi"], body input[onclick*="window.open"][onclick*="choose"][onclick*="group_chooser.cgi"], body button[onclick*="window.open"][onclick*="choose"][onclick*="my_group_chooser.cgi"], body input[onclick*="window.open"][onclick*="choose"][onclick*="my_group_chooser.cgi"], body button[onclick*="window.open"][onclick*="choose"][onclick*="interface_chooser.cgi"], body input[onclick*="window.open"][onclick*="choose"][onclick*="interface_chooser.cgi"], body button[onclick*="window.open"][onclick*="choose"][onclick*="module_chooser.cgi"], body input[onclick*="window.open"][onclick*="choose"][onclick*="module_chooser.cgi"] ';if($($magic_button_selector).length){$($magic_button_selector).each(function(){$(this).attr("data-mmclick",$(this).attr("onclick")).removeAttr("onclick");plugins.chooser.target($(this),0)})}if(core.curModuleFile("virtualmin-nginx","")||core.curModuleFile("virtualmin-awstats","")||core.curModuleFile("fdisk","edit_disk.cgi")||core.curModuleFile("virtual-server","edit_newlinks.cgi")||core.curModuleFile("virtualmin-dav","list_shares.cgi")||v___location_directory_unslashed_trail_slashed==v___location_prefix_unslashed_trail_slashed+"pam/"&&!v___location_file||v___location_directory_unslashed_trail_slashed==v___location_prefix_unslashed_trail_slashed+"logviewer/"&&(!v___location_file||v___location_file==="index.cgi")||v___location_directory_unslashed_trail_slashed==v___location_prefix_unslashed_trail_slashed+"syslog/"&&(!v___location_file||v___location_file==="index.cgi")||v___location_path==v___location_prefix+"/postfix/master.cgi"){var obj=$('.panel-body > .ui_link, .panel-body > .ui_link_replaced, body[data-uri*="virtualmin-awstats"] .panel-body > form > .ui_link_replaced, body[data-uri*="edit_disk.cgi"] .panel-body p > a.ui_link_replaced, body[data-uri*="edit_newlinks.cgi"] .panel-body > form > .ui_link_replaced, body[data-uri*="edit_newlinks.cgi"] .panel-body > .ui_emptymsg + p > .ui_link_replaced'),text=$.trim(obj.first().text()),href=obj.first().attr("href");if(typeof settings_hidden_force_table_header_links!="undefined"){if(href){$("#headln2r .btn-group a").addClass("pull-left").attr("style","");$("#headln2r .btn-group").prepend(' ');obj.next("br").remove();obj.remove()}}else{obj.addClass("btn btn-inverse btn-tiny ui_link_replaced");if(!obj.find(".fa").length){obj.prepend(' ')}}}if(v___theme_night_mode_enabled||v___theme_night_mode){if($(".opener_shown").length>0){var __tmp_ui_grinTable=$(".opener_container, .opener_container:hidden").find(".ui_grid_table, .ui_grid_table:hidden");if(__tmp_ui_grinTable.length){$.each(__tmp_ui_grinTable,function(e,t){$(this).parent("td").attr("style","padding: 0 !important")})}}if($(".opener_table_style_small").length>0){var __tmp_ui_hardTable=$(".opener_table_style_small, .opener_table_style_small:hidden").find(".sub_table_container.table-hardcoded, .sub_table_container.table-hardcoded:hidden");if(__tmp_ui_hardTable.length){$.each(__tmp_ui_hardTable,function(e,t){$(this).parent("td").attr("style","padding: 0 !important");$(this).find("tbody tr td").attr("style","padding-left: 3px !important; padding-right: 3px !important")})}}}$('html[data-script-name*="webmin/edit_assignment.cgi"] table table tbody tr td, html[data-script-name*="usermin/edit_assignment.cgi"] table table tbody tr td').hover(function(){if($(this).is("td:nth-child(1)")||$(this).is("td:nth-child(3)")){$(this).addClass("hl-ow").next("td").addClass("hl-ow")}else if($(this).is("td:nth-child(2)")||$(this).is("td:nth-child(4)")){$(this).addClass("hl-ow").prev("td").addClass("hl-ow")}},function(){$(this).removeClass("hl-ow").next("td").removeClass("hl-ow");$(this).removeClass("hl-ow").prev("td").removeClass("hl-ow")});if(core.curModuleFile("server-manager","edit_pass.cgi")&&!v___location_query.includes("force=1")||core.curModuleFileQuery("virtualmin-registrar","edit.cgi","registrar=")||core.curModuleFileQuery("htaccess-htpasswd","edit_user.cgi","new=")||core.curModuleFile("useradmin","edit_group.cgi")||core.curModuleFile("useradmin","edit_user.cgi")){setTimeout(function(){$("#headln2r .btn-group a").addClass("pull-left").attr("style","");$("#headln2r .btn-group").prepend(' ')},0)}if(v___user_level==0){}else{settings_side_slider_enabled=false;settings_side_slider_enabled=false;session.server.data("data-slider-fixed","0");$("#right-side-tabs, .right-side-tabs-toggler").addClass("hidden")}if(core.curModuleFile("bind8","edit_zonekey.cgi")){var $taxtarea_name_ds=$('textarea[name="ds"]');if($taxtarea_name_ds.val()&&!$taxtarea_name_ds.val().includes("\n")){g__text_breaker($taxtarea_name_ds,$("#headln2c").find("span[data-sub_title]").text())}}if(core.curModuleFile("virtual-server","transfer_form.cgi")){$('input[name="newttl"]').addClass("heighter-34")}if(core.curModule("passwd")){$('.container-fluid .panel-body input[name="user"]').addClass("heighter-34")}$.each($(".gl-icon-container"),function(e,t){if(!$(this).find("a:first").find("i.fa-edit").length){$(this).find("a:first").prepend('');$(this).find("a:first").prepend('')}});if(v___location_path==v___location_prefix+"/proc/index_search.cgi"){$(".col_header").removeClass("col_header")}var $file_upload_inputs=$('input[type="file"]:not([name="upfiles"])');if(core.curModule("updown")||core.curModuleFile("updown","index.cgi")){init_dnd_uploads()}else{$file_upload_inputs.bootstrapFileInput()}}else{reset_dnd_uploads();init_dnd_uploads()}function reset_dnd_uploads(){if(core.curModule("updown")||core.curModuleFile("updown","index.cgi")){var e=$('form.ui_form[action*="upload.cgi"]'),t=e.find(".ui_submit.ui_form_end_submit"),i=e.find(".file-input-wrapper");theme_restore_buttons_class();$.fn.bootstrapFileInputReset(e);despinnerfy_buttons(0,t);i.find("span").remove();i.contents().unwrap()}}function init_dnd_uploads(){if(core.curModule("updown")||core.curModuleFile("updown","index.cgi")){var e=$('input[type="file"]:not([name="upfiles"])'),t='form.ui_form[action*="upload.cgi"]',i=$(""+t+" .ui_submit.ui_form_end_submit"),a='name="upload0"';$(""+t+' input[name^="upload"]:not(['+a+"])").remove();e.bootstrapFileInput(["dnd dnd_updown",i]);i.addClass("disabled");plugins.upload($("#att_upload .ui_form"));init_dnd_form($(t))}}function init_dnd_form(e){e.on("drag dragstart dragend dragover dragenter dragleave drop",function(e){e.preventDefault();e.stopPropagation()}).on("drop",function(e){droppedFiles=e.originalEvent.dataTransfer.files;$(this).trigger("input").find('input[type="file"]').prop("files",droppedFiles).trigger("change.fiw")});e.find(".file-input-wrapper").on("dragover dragenter",function(){$(this).addClass("pulse")}).on("dragleave dragend drop",function(){$(this).removeClass("pulse")})}if(core.curModuleFile("virtual-server","index.cgi")||core.curModuleFile("virtual-server","")){var ui_checked_columns="ui_checked_columns",class_sel="."+ui_checked_columns+"",$checked_columns=v___page_container.find(class_sel),extra_selector=$checked_columns.length?class_sel:'a[href*="edit_domain.cgi"]';var cllv=0;$('a[href*="list_users.cgi"], a[href*="list_aliases.cgi"], '+extra_selector+"").on("click",function(e){if(!$(e.target).is('input[type="checkbox"]')&&!$(e.target).is(".lawobject")&&!$(e.target).is(".ui_checked_checkbox")){var t=$(this);if(t.is(class_sel)){t=$(this).find("a").first()}if(!cllv&&(t&&t.length)){cllv++;t.off("click");plugins.navigation.intersect.virtualmin(t)}}})}if(core.curModuleFile("server-manager","index.cgi")||core.curModuleFile("server-manager","")||vars.requested_page&&vars.requested_page.includes("/server-manager/index.cgi")){var cllc=0;$('a[href*="mass_update_form.cgi"], .ui_checked_columns').on("click",function(e){if(!$(e.target).is('input[type="checkbox"]')){if(!$(e.target).is('input[type="checkbox"]')&&!$(e.target).is(".lawobject")&&!$(e.target).is(".ui_checked_checkbox")){var t=$(this);t=$(this).find("a").first()}if(!cllc&&(t&&t.length)){cllc++;t.off("click");plugins.navigation.intersect.cloudmin(t)}}})}var codemirror_target_cnt=".container-fluid > .panel > .panel-body";editor_init_check()&&editor_init($(codemirror_target_cnt+" textarea"),false,false,"static",false,true,false,pjax_popstate);if(core.curModule("cshrc")||core.curModule("plan")||core.curModuleFile("virtual-server","mass_aedit_form.cgi")){var cshrc1=$(""+codemirror_target_cnt+" form:eq(0) > textarea:visible"),cshrc2=$(""+codemirror_target_cnt+" form:eq(1) > textarea:visible");pjax_popstate&&page_refresh(1);if(cshrc2.length){editor_init(cshrc1,false,false,"static1",true,false,false,pjax_popstate,.36);editor_init(cshrc2,false,false,"static2",true,false,false,pjax_popstate,.36)}else{editor_init(cshrc1,false,false,"static1",true,false,false,pjax_popstate,.51)}}viewer_init_check()&&viewer_init();if(settings_sysinfo_easypie_charts&&v___location_path==v___location_prefix+"/sysinfo.cgi"){var isNR=v___theme_night_mode_enabled||v___theme_night_mode?1:0;$("body").find("#system-status").find(".piechart").easyPieChart({barColor:function(e){return e<50?isNR?"#269373":"#5cb85c":e<85?isNR?"#c38d40":"#f0ad4e":"#cb3935"},trackColor:isNR?"#3b424b":"#f8f8f8",scaleColor:isNR?"#3b424b":"#dfe0e0",size:parseInt(settings_sysinfo_easypie_charts_size),scaleLength:parseInt(settings_sysinfo_easypie_charts_scale),trackWidth:parseInt(settings_sysinfo_easypie_charts_width),lineWidth:0,lineCap:"square",onStep:function(e,t,i){$(this.el).find(".percent").text(Math.round(i))}});if(v___user_level!=0&&v___user_level!=3){fetch(v___location_prefix+"/index.cgi/?xhr-info=1")}}if((v___location_path.indexOf(".cgi")===-1||v___location_path.indexOf("link.cgi")!==-1||v___location_path==v___location_prefix+"/proc/open_files.cgi"||v___location_path==v___location_prefix+"/webmin/edit_webmincron.cgi"||v___location_path==v___location_prefix+"/postfix/mailq.cgi"||v___location_path==v___location_prefix+"/webmin_search.cgi"||v___location_path==v___location_prefix+"/useradmin/index.cgi"||v___location_path==v___location_prefix+"/quota/list_users.cgi"||v___location_path==v___location_prefix+"/quota/list_groups.cgi"||v___location_path==v___location_prefix+"/init/index.cgi")&&(v___location_directory_unslashed_trail_slashed==v___location_prefix_unslashed_trail_slashed+"webmin/"&&v___location_prefix.indexOf("servers/link.cgi")===-1||v___location_directory_unslashed_trail_slashed==v___location_prefix_unslashed_trail_slashed+"proc/"||v___location_path_lead_unslashed==v___location_prefix_unslashed_trail_slashed+"webmin_search.cgi"||v___location_directory_unslashed_trail_slashed==v___location_prefix_unslashed_trail_slashed+"postfix/"||v___location_directory_unslashed_trail_slashed==v___location_prefix_unslashed_trail_slashed+"virtual-server/"||v___location_directory_unslashed_trail_slashed==v___location_prefix_unslashed_trail_slashed+"init/"||v___location_directory_unslashed_trail_slashed==v___location_prefix_unslashed_trail_slashed+"xinetd/"||v___location_directory_unslashed_trail_slashed==v___location_prefix_unslashed_trail_slashed+"mount/"||core.curModule("custom")||v___location_directory_unslashed_trail_slashed==v___location_prefix_unslashed_trail_slashed+"quota/"||v___location_directory_unslashed_trail_slashed==v___location_prefix_unslashed_trail_slashed+"php-pear/"||v___location_directory_unslashed_trail_slashed==v___location_prefix_unslashed_trail_slashed+"fsdump/"||v___location_directory_unslashed_trail_slashed==v___location_prefix_unslashed_trail_slashed+"inittab/"||v___location_directory_unslashed_trail_slashed==v___location_prefix_unslashed_trail_slashed+"logrotate/"||v___location_directory_unslashed_trail_slashed==v___location_prefix_unslashed_trail_slashed+"mailcap/"||v___location_directory_unslashed_trail_slashed==v___location_prefix_unslashed_trail_slashed+"cron/"||v___location_directory_unslashed_trail_slashed==v___location_prefix_unslashed_trail_slashed+"software/"||v___location_directory_unslashed_trail_slashed==v___location_prefix_unslashed_trail_slashed+"useradmin/"||v___location_directory_unslashed_trail_slashed==v___location_prefix_unslashed_trail_slashed+"apache/"||v___location_directory_unslashed_trail_slashed==v___location_prefix_unslashed_trail_slashed+"webalizer/"||v___location_directory_unslashed_trail_slashed==v___location_prefix_unslashed_trail_slashed+"cpan/"||v___location_directory_unslashed_trail_slashed==v___location_prefix_unslashed_trail_slashed+"htaccess-htpasswd/"||v___location_directory_unslashed_trail_slashed==v___location_prefix_unslashed_trail_slashed+"fdisk/")||core.curModuleFile("mailboxes","list_mail.cgi")||core.curModuleFile("mailboxes","mail_search.cgi")||core.curModuleFile("mailboxes","")||core.curModuleFile("mailboxes","index.cgi")||core.curModuleFile("mysql","index.cgi")||core.curModuleFile("mysql","list_vars.cgi")||core.curModuleFile("postgresql","index.cgi")||core.curModuleFile("custom","index.cgi")||core.curModuleFile("cron","index.cgi")||core.curModuleFile("logviewer","")||core.curModuleFile("logviewer","index.cgi")||core.curModuleFile("syslog","")||core.curModuleFile("syslog","index.cgi")||core.curModuleFile("cluster-cron","")||core.curModuleFile("cluster-cron","index.cgi")||core.curModuleFile("cluster-copy","")||core.curModuleFile("cluster-copy","index.cgi")||core.curModuleFile("virtual-server","postgrey.cgi")||core.curModuleFile("virtual-server","list_balancers.cgi")||core.curModuleFile("virtualmin-dav","list_shares.cgi")||core.curModuleFile("virtual-server","list_aliases.cgi")||core.curModuleFile("ruby-gems","index.cgi")||core.curModuleFile("postfix","master.cgi")||core.curModuleFile("postfix","virtual.cgi")||core.curModuleFile("postfix","sni.cgi")||core.curModuleFile("postfix","aliases.cgi")||core.curModuleFile("fail2ban","list_filters.cgi")||core.curModuleFile("fail2ban","list_actions.cgi")||core.curModuleFile("fail2ban","list_jails.cgi")||core.curModuleFile("fail2ban","list_status.cgi")||core.curModuleFile("fail2ban","jail_blocks.cgi")||core.curModuleFile("virtual-server","list_databases.cgi")||core.curModuleFile("virtual-server","connectivity.cgi")||core.curModuleFile("virtual-server","list_buckets.cgi")||core.curModuleFile("virtual-server","list_clouds.cgi")||core.curModuleFile("fdisk","edit_disk.cgi")||core.curModuleFile("virtualmin-git","")||core.curModuleFile("virtualmin-git","index.cgi")||core.curModuleFile("virtualmin-svn","")||core.curModuleFile("virtualmin-svn","index.cgi")||core.curModuleFile("help","search.cgi")||core.curModuleFile("server-manager","edit_domains.cgi")||core.curModuleFile("net","list_ifcs.cgi")||core.curModuleFile("net","list_hosts.cgi")||core.curModuleFile("bind8","edit_recs.cgi")||core.curModuleFile("bind8","index.cgi")||core.curModuleFile("bind8","")||core.curModuleFile("virtual-server","edit_newresels.cgi")||core.curModuleFile("cpan","index.cgi")||core.curModuleFile("virtual-server","list_records.cgi")||core.curModule("firewall")||core.curModule("firewall6")||core.curModule("ruby-gems")||v___location_path==v___location_prefix+"/at/"||v___location_path==v___location_prefix+"/at/index.cgi"||v___location_path==v___location_prefix+"/useradmin/list_logins.cgi"||v___location_path==v___location_prefix+"/man/search.cgi"||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_search.cgi"||v___location_path==v___location_prefix+"/software/search.cgi"||v___location_path==v___location_prefix+"/software/file_info.cgi"||v___location_path==v___location_prefix+"/software/list_pack.cgi"||v___location_path==v___location_prefix+"/cluster-software/list_pack.cgi"||v___location_path==v___location_prefix+"/virtual-server/index.cgi"||v___location_path==v___location_prefix+"/virtual-server/list_users.cgi"||v___location_path==v___location_prefix+"/virtual-server/edit_newplan.cgi"||v___location_path==v___location_prefix+"/virtual-server/edit_newfeatures.cgi"||v___location_path==v___location_prefix+"/virtual-server/edit_newtmpl.cgi"||v___location_path==v___location_prefix+"/virtual-server/backuplog.cgi"||v___location_path==v___location_prefix+"/package-updates/"||v___location_path==v___location_prefix+"/package-updates/index.cgi"||v___location_path==v___location_prefix+"/package-updates/update.cgi"||v___location_path==v___location_prefix+"/security-updates/index.cgi"||v___location_path==v___location_prefix+"/virtual-server/usage.cgi"||v___location_path==v___location_prefix+"/virtual-server/search.cgi"||v___location_path==v___location_prefix+"/filter/"){var $page_table_table=$(".__page table.table");$page_table_table.each(function(){try{table_data_init($(this))}catch(e){}}).promise().done(function(){if($page_table_table.length){page.render.content.filter.init()}})}else{var ui_paginations_str="ui_form_elements_wrapper_search",$ui_paginations=$("form:visible ."+ui_paginations_str+"").length?$("form:visible ."+ui_paginations_str+""):$("."+ui_paginations_str+"");if($ui_paginations.length){page.render.content.filter.init()}}var $cont_fl_tbl_sortable=$(".container-fluid table.dtable-sortable");$cont_fl_tbl_sortable.each(function(){table_data_init($(this))}).promise().done(function(){if($cont_fl_tbl_sortable.length){page.render.content.filter.init()}});$(".select_all").on("click",function(){var e=$(this).parents("form");if(e.find('.icons-row div[class*="icons-container"]').length){$.each(e.find(".icons-row .hidden-forged-6"),function(){$(this).parents('div[class*="icons-container"]').addClass("highlighted").find(".fa-select").removeClass("fa-select").addClass("fa-selected")})}});$(".select_invert").on("click",function(){var e=$(this).parents("form");$.each(e.find(".icons-row .hidden-forged-6"),function(){var e=$(this).parents('div[class*="icons-container"]');if($(this).find("input").is(":checked")){e.addClass("highlighted").find(".fa-select, .fa-selected").removeClass("fa-select").addClass("fa-selected")}else{e.removeClass("highlighted").find(".fa-select, .fa-selected").removeClass("fa-selected").addClass("fa-select")}})});$('.icons-row div[class*="icons-container"]').on("mouseover",function(e){$(this).find(".hidden-forged-7").removeClass("hidden-forged")}).on("mouseout",function(e){$(this).find(".hidden-forged-7").addClass("hidden-forged")});if(v___location.search!="?dashboard"&&plugins.navigation.switch.dashboard.get()==true){if(v___location_file=="sysinfo.cgi"){plugins.navigation.switch.set("dashboard");plugins.navigation.reset()}else if(!v___initial_load){if($("#open_webmin").length>0&&$(".switch-toggle input:checked").attr("id")!="open_webmin"){plugins.navigation.switch.set("webmin")}else{if($("#open_virtualmin").length>0&&$(".switch-toggle input:checked").attr("id")!="open_virtualmin"){plugins.navigation.switch.set("virtualmin")}else{if($("#open_cloudmin").length>0&&$(".switch-toggle input:checked").attr("id")!="open_cloudmin"){plugins.navigation.switch.set("cloudmin")}else{if($("#open_usermin").length>0&&$(".switch-toggle input:checked").attr("id")!="open_usermin"){plugins.navigation.switch.set("usermin")}}}}}}$('form[action="bootup.cgi"]').on("submit",function(e){if($("#starting").length>0){$("#starting").remove();$(this).append('')}else{if($("#table").length>0){$(this).append('')}else{if($('input[name="boot"][type="hidden"]').length>0){$('input[name="boot"][type="hidden"]').remove();$(this).append('')}}}});$('input[name="config_portable_module_xsql_fit_content_screen_height"]').on("change",function(){var e=$(this).attr("name"),t=$(this).val()=="true"?true:false;window[e]=t;theme.config.save()});if($.support.spa&&v___location_file==="mconfig.cgi"&&uri_parse_param("module")===v___module_file_manager){var file_manager_config_form_func=function(){return $('.container-fluid form[action*="mconfig_save.cgi"]')},file_manager_config_save_btn_func=function(){return file_manager_config_form_func().find('[name="save"].ui_form_end_submit')},$file_manager_config_form=file_manager_config_form_func();$file_manager_config_form.keydown(function(e){if(e.keyCode===13){e.preventDefault();e.stopImmediatePropagation();file_manager_config_save_btn_func().trigger("focus").trigger("click");return false}});$file_manager_config_form.on("submit",function(e){if(!e.originalEvent||e.originalEvent.submitter&&e.originalEvent.submitter.name!=="save_next"){e.preventDefault();e.stopImmediatePropagation()}var t=$file_manager_config_form.find('select[name="per_page"]');if(t.length){config_portable_module_filemanager_records_per_page=parseInt(t.val())}theme.config.apply($file_manager_config_form,1)});var $fm_size_checkbox=$file_manager_config_form.find('input[name="columns"][value="size"]');if($fm_size_checkbox.length&&!$fm_size_checkbox.is(":checked")){$fm_size_checkbox.prop("checked",true)}$fm_size_checkbox.parent().hide();var $fm_def_sort=$file_manager_config_form.find('select[name="config_portable_module_filemanager_default_sort"]');if($fm_def_sort.length){var $empty_options=$fm_def_sort.find('option[value="0"], option[value="-1"]'),$empty_option_1=$($empty_options[0]),$empty_option_2=$($empty_options[1]);$empty_option_1.after('");$empty_option_2.text(theme_language("filemanager_sorting_desc")).attr("data-label","").prop("disabled","disabled").removeAttr("value")}var $fm_columns=$file_manager_config_form.find('input[name="columns"]:not([value="size"])');$fm_columns.on("input",function(){var e=this.value,t=this.checked;$fm_def_sort.find("option[value]").map(function(){if(this.value&&this.value.includes(e)){if(!t&&$(this).is(":selected")){$fm_def_sort.val(0)}return $(this).prop("disabled",!t)}})}).trigger("input");var $save_btn=$file_manager_config_form.find('[name="save"]'),get_file_manager_link=function(){return $('aside .navigation a[href*="'+v___module_file_manager+'"]').attr("href")};$save_btn.on("click",function(e){e.preventDefault();e.stopPropagation();vars.pjax.cache.set("disable");if($(this).hasClass("disabled")){return}var t=$(this),i=session.server.data("webprefix");t.attr("name","save_next");var a=$("").attr({type:"hidden",name:"section_curr",value:$file_manager_config_form.find('[name="section"]').val()}).appendTo($file_manager_config_form);set_onbeforeunload_status(0);$file_manager_config_form.submit();despinnerfy_buttons();spinnerfy_buttons(t);progress.start();$.ajax({type:"POST",url:$file_manager_config_form.attr("action")+"?noredirect=1",data:$file_manager_config_form.serialize(),complete:function(){theme_open_new_inner_link(i+"/"+v___module_file_manager+"/index.cgi")}});setTimeout(function(){a.remove();t.attr("name","save")},1)});var deps={config_portable_module_filemanager_hide_tree_view:["config_portable_module_filemanager_tree_expand_search","config_portable_module_filemanager_tree_view_depth","config_portable_module_filemanager_tree_exclude_on_first_load"],config_portable_module_filemanager_hide_toolbar:["config_portable_module_filemanager_hovered_toolbar"]};for(const e in deps){theme.config._.funcs.dependent_radios(e,deps[e],false,$file_manager_config_form)}["selinux","acls"].forEach(function(e){var t=$file_manager_config_form.find('[name="columns"][value="'+e+'"]'),i="filemanager_mconfig_columns_"+e+"_disabled",a=window["theme_server_data_available_"+e+""];t.prop("disabled",!a);var n=t.parent();if(!a){if(t.is(":checked")){t.prop("checked",false)}n.attr("data-target-tooltip-callback",i);theme_inject_tooltip(i,false,false,false,false,false,true,"click",true,1)}});if(v___location_path===v___location_prefix+"/mconfig.cgi"){var $files_safe_mode_input_obj=$('.container-fluid input[name="config_portable_module_filemanager_files_safe_mode"]');if(!pjax_popstate&&$files_safe_mode_input_obj.length){snippets.inject_extra_option("checkbox:after",$files_safe_mode_input_obj.closest(".awobject").last(),"config_portable_module_filemanager_files_mode_ask",theme_language("filemanager_files_mode_ask"),{style:{marginLeft:6,verticalAlign:"1%"},checked:config_portable_module_filemanager_files_mode_ask?true:false})}var $files_auto_per_page_mode_input_obj=$('.container-fluid select[name="per_page"]');if($files_auto_per_page_mode_input_obj.length){if(!pjax_popstate){snippets.inject_extra_option("checkbox:after",$files_auto_per_page_mode_input_obj,"config_portable_module_filemanager_auto_per_page",theme_language("global_automatic"),{style:{marginLeft:8,verticalAlign:"1%"},checked:config_portable_module_filemanager_auto_per_page?true:false},function(){var e=$('input[name="config_portable_module_filemanager_auto_per_page"]');$('form[action="mconfig_save.cgi"]').on("change",e,function(){var t=e.get(0);$files_auto_per_page_mode_input_obj.toggleClass("disabled",t.value=="true"?true:false)}).trigger("change")})}}}}$('.ui_form_end_submit[onclick^="window.open"]').click(function(){var e=$(this);setTimeout(function(){e.removeClass("disabled");plugins.navigation.load.stop()},100)});if(v___location_path&&v___location_path.indexOf("/sysinfo.cgi")>-1){sysinfo_replace_dismiss_buttons();$("body").undelegate(".piechart canvas","mouseover mouseleave");$("body").on("mouseover",".piechart canvas",function(){var e=$(this).parent("span").attr("data-charts").split("_")[1];if((e=="cpu"||e=="mem"||e=="virt")&&!core.moduleAvailable("proc")){return}else if(e=="disk"&&!core.moduleAvailable("disk-usage")&&!core.moduleAvailable("quota")){return}$(this).addClass("cursor-alias")});$("body").undelegate(".piechart canvas","click");$("body").on("click",".piechart canvas",function(e){e.preventDefault();var t=$(this).parent("span").attr("data-charts").split("_")[1],i;if(t=="cpu"&&core.moduleAvailable("proc")){i=v___location_prefix+"/proc/index_cpu.cgi"}else if((t=="mem"||t=="virt")&&core.moduleAvailable("proc")){i=v___location_prefix+"/proc/index_size.cgi"}else if(t=="disk"&&core.moduleAvailable("disk-usage")){i=v___location_prefix+"/disk-usage"}else if(t=="disk"&&core.moduleAvailable("quota")){i=v___location_prefix+"/quota/list_users.cgi?dir=%2F"}if(i&&i.length){get_pjax_content(i)}});page_sysinfo_sensor_update_label();if(v___user_level=="0"){plugins.slider.data.fetch()}var chart_size_def_value=172;if(settings_sysinfo_easypie_charts_size!=chart_size_def_value){var diff=parseInt(settings_sysinfo_easypie_charts_size-chart_size_def_value),position_diff_label=diff*.9,position_diff_percent=diff*.2,font_diff_label=settings_sysinfo_easypie_charts_size'+(theme_language("global_warning")+": "+theme_language("dashboard_panels_disabled_explain")),45,"warning","dashboard_panel_removed",1,["bottom","center"]);var l=$("["+r+"]").parent().prev(".messenger-close");l.one("click",function(e){localStorage.setItem(v___server_hostname+"-"+"dashboard_panel_removed_explained",1)})}});var panels_container_sel=".container-fluid #"+extended_sysinfo_str+"-1";sortable(panels_container_sel,{forcePlaceholderSize:true}).on("sortupdate",function(){settings_sysinfo_panels_order={};dashboard_panels().each(function(e,t){settings_sysinfo_panels_order[$(t).attr(data_referrer_str)]=String.fromCharCode(97+e).toUpperCase()}).promise().done(function(){settings_sysinfo_panels_order=JSON.stringify(settings_sysinfo_panels_order);theme.config.save();setTimeout(function(){try{theme_panels_sort("slider")}catch(e){}},100)})});plugins.dashboard.update.alertsHTML()}if($t_uri_virtualmin&&core.curModuleFileQuery("syslog","save_log.cgi","view=1")||$t_uri_virtualmin&&core.curModuleFileQuery("logviewer","view_log.cgi","view=1")){$('select[name="idx"] option').filter(function(){return this.text==$.trim($("span[data-sub_title] tt").text())}).attr("selected",true);$('select[name="idx"]').addClass("hidden")}if(core.curModuleFileQuery("logviewer","view_log.cgi","view=1")||core.curModuleFileQuery("syslog","save_log.cgi","view=1")||core.curModuleFileQuery("syslog","save_log.cgi","new=")){var target=".panel-body .fa-refresh-fi",current_refresh_timer=localStorage.getItem(v___server_hostname+"-"+"option_"+v___module+"_refresh"),current_icon_class_str=".fa-refresh-fi",refresh_timer_str=".refresh-timer-timeout",btn_str=""+target+", .panel-body "+refresh_timer_str+"",timeout_box=''+(current_refresh_timer?current_refresh_timer:"0")+" ";$.each($(target+":not([data-processed])").parent("button"),function(e,t){$(this).addClass("btn-xxs btntimer").find("i").attr("data-processed",1);$(this).wrap('
    ');$(this).after(""+'"+'");if(current_refresh_timer&¤t_refresh_timer!="0"){var i=$(btn_str);$(this).find("i").before(timeout_box);$(this).find("i").remove();var a=current_refresh_timer;typeof refreshTimer==="number"&&clearInterval(refreshTimer);refreshTimer=setInterval(function(){--a;$(refresh_timer_str).text(a);if(a<=0){$(i[0]).parent().trigger("click");clearInterval(refreshTimer)}},1e3)}}).promise().done(function(){$(".refresh-timer-select li").click(function(){typeof refreshTimer==="number"&&clearInterval(refreshTimer);var e='',t=''+(current_refresh_timer?current_refresh_timer:"0")+" ";localStorage.setItem(v___server_hostname+"-"+"option_"+v___module+"_refresh",$(this).find("a").data("timeout"));current_refresh_timer=localStorage.getItem(v___server_hostname+"-"+"option_"+v___module+"_refresh");var i=$(btn_str),a=i.parent();if(current_refresh_timer&¤t_refresh_timer!="0"){if(!a.find(refresh_timer_str).length){a.prepend(t)}a.find(refresh_timer_str).html(current_refresh_timer+" ");$(current_icon_class_str).remove();var n=current_refresh_timer;refreshTimer=setInterval(function(){--n;$(refresh_timer_str).text(n);if(n<=0){var e=$(btn_str);$(e[0]).parent().trigger("click");clearInterval(refreshTimer)}},1e3)}else{$(refresh_timer_str).remove();!a.find(current_icon_class_str).length&&a.prepend(e)}})});$.each($('form[action*="save_log.cgi"] select[name="idx"], form[action*="view_log.cgi"] select[name="idx"]'),function(){$(this).on("change",function(){var e=$("button.ui_submit.ui_form_end_submit");$(this).next().next('[name="filter"]').val("");e.first().trigger("click");e.addClass("disabled")})})}if(core.curModuleFile("virtual-server","summary_domain.cgi")){$(".__page #headln2l .btn-group, .__page .page_footer_submit").remove();var $a_targ_dom_file=$("a[data-dom-file]"),a_targ_dom_file_path=Convert.quoteEscape($a_targ_dom_file.data("dom-file")),a_targ_dom_file_view_link="!view "+a_targ_dom_file_path+"/M=1/V=1/H=1",a_targ_dom_file_edit_link="!edit "+a_targ_dom_file_path;$a_targ_dom_file.data("view-link",a_targ_dom_file_view_link).data("edit-link",a_targ_dom_file_edit_link).attr("href",a_targ_dom_file_view_link)}if(settings_side_slider_enabled){if(core.curModule("package-updates")){plugins.slider.notifications.dismiss("package_message")}if(core.curModule("csf")){plugins.slider.notifications.dismiss("csf_remote_version");plugins.slider.notifications.dismiss("csf_title")}}vars.plugins.tooltip.delay.show=600;vars.plugins.tooltip.delay.hide=50;snippets.tooltips(true);if($.support.spa&&(window.matchMedia("(max-width: 1080px)").matches||$("html").attr("data-navigation-collapsed")=="1"&&!vars.navigation.pinned)){plugins.navigation.lock()}if($.support.spa&&(window.matchMedia("(max-width: 1365px)").matches||$("html").attr("data-navigation-collapsed")=="1"&&!vars.navigation.pinned)){plugins.slider.state()}if($("body").hasClass("session_login")){setTimeout(function(){page_display()},200)}theme_to_new_tab();if(core.curModuleFile("acl","save_twofactor.cgi")){setTimeout(function(){var e=$("p > img"),t=e.attr("src");e.attr("src",t.replace(v___location_prefix+"/"+v___module+"/",""))},0)}if(v___location_path_lead_unslashed==v___location_prefix_unslashed_trail_slashed+"proc/edit_proc.cgi"||v___location_path_lead_unslashed==v___location_prefix_unslashed_trail_slashed+"proc/kill_proc.cgi"||v___location_path_lead_unslashed==v___location_prefix_unslashed_trail_slashed+"proc/renice_proc.cgi"){var proc_nice_level='form[action*="renice_proc.cgi"]',proc_nice_pid=$(proc_nice_level).next('input[name="pid"]'),proc_target=$('.col_value select[name="nice"]').parent("td"),proc_target_content=proc_target.html();$(proc_nice_level).append(proc_nice_pid.detach(),proc_target_content);$(proc_nice_level).find('[type="button"]').addClass("heighter-28");proc_target.html($(proc_nice_level).detach());$('.proc form[action*="kill_proc.cgi"]').on("submit",function(){var e=quirks.active_element(),t=$(this).find("input").filter(function(){return this.name!="pid"&&this.name!="signal"&&this.name!=e.name});t.attr("disabled","disabled");setTimeout(function(){t},1);return true});if($('.proc form[action*="kill_proc.cgi"]').length){var sig_sel_sel_str='[name="signal"]',$sig_sel_btns=$(""+sig_sel_sel_str+" ~ .btn");$sig_sel_btns.removeClass("heighter-28");$(sig_sel_sel_str).prev().prev(".btn").find(".fa-search").removeClass("fa-search").addClass("fa-play")}}setTimeout(function(){v___blocked_navigation=0},10);var date_chooser_button=$(".date_chooser_button");if(date_chooser_button.length){$.each(date_chooser_button,function(){var e=$(this).parent('td:contains("/")');var t=e.find("select"),i=t.prev("input");$year=t.next("input"),cls="margined-left--10";t.addClass(cls);$year.addClass(cls).attr("size",3);i.attr("size",1)})}$.each($(".date_chooser_button"),function(){var e="input",t="select",i=$(e+'[name="'+$(this).data("year")+'"]'),a=$(t+'[name="'+$(this).data("month")+'"]'),n=$(e+'[name="'+$(this).data("day")+'"]'),r=$(a).find("option:eq(0)").val()==1?0:1;$(this).datepicker({format:" yyyy-m-d",language:session.server.data("language"),todayHighlight:true,autoclose:true}).on("changeDate",function(e){var t=(e.date.getFullYear()+"-"+(e.date.getMonth()+1)+"-"+e.date.getDate()).split("-");if(t){$(n).val(parseInt(t[2]));$(a).val(parseInt(t[1])-r);$(i).val(parseInt(t[0]))}}).on("show",function(e){var t=$(this),l=parseInt($(n).val()),o=$(a).val()?parseInt($(a).val())+r:false,s=$(i).val();if(l&&o&&s){t.datepicker("update",""+s+"-"+o+"-"+l+"")}else{}})});if(core.curModule("mailbox")){$.each($('[onclick*="document.forms"]'),function(){var e=$(this),t=e.attr("onclick"),i=$("aside form").length;e.attr("onclick",t.replace(/document\.forms\[0\]/g,"document.forms["+i+"]"));e.attr("onclick",t.replace(/document\.forms\[1\]/g,"document.forms["+(i+1)+"]"))});$("#print").on("click",function(e){e.preventDefault();e.stopPropagation()})}if(core.curModuleFile("forward","edit_alias.cgi")){$.each($('[onchange*="document.forms"]'),function(){var e=$(this),t=e.attr("onchange"),i=$("aside form").length;e.attr("onchange",t.replace("document.forms[0]","document.forms["+i+"]"))})}if(core.curModuleFile("schedule","edit.cgi")||core.curModule("mailbox")){$.each($('[onclick*="address_chooser"]'),function(e,t){$(this).attr("onclick",$(this).attr("onclick").replace(".forms[0]",".forms[1]"));$(this).next(".file_chooser_button_attached").removeClass("fa-files-o").addClass("fa-address-book-o")})}var add_clock_icon=function(e){e.removeClass("fa-files-o").addClass("fa-clock").css("font-size","12px").css("line-height","10px")};if(core.curModuleFile("virtual-server","backup_form.cgi")){add_clock_icon($('[name="enabled_complex"] + input + .file_chooser_button_attached'))}if(core.curModuleFile("virtual-server","edit_newquotas.cgi")||core.curModuleFile("virtual-server","edit_newvalidate.cgi")){add_clock_icon($('[name="sched_complex"] + input + .file_chooser_button_attached'))}if(core.curModuleFile("server-manager","edit_backup.cgi")||core.curModuleFile("server-manager","edit_vbackup.cgi")||core.curModuleFile("server-manager","edit_vsync.cgi")){add_clock_icon($('[name$="_complex"] + input + .file_chooser_button_attached'))}if(core.curModuleFile("server-manager","index.cgi")||core.curModuleFile("server-manager","")){$.each($('[onclick*="document.forms"]'),function(){var e=$(this),t=e.attr("onclick"),i=$("aside form").length,a=$(".container-fluid .panel-body > form").length-1;e.attr("onclick",t.replace(/document\.forms\[\d*\]/g,"document.forms["+(i+a)+"]"))})}var selectStr="select",mod_status_edit_mon_select='[action="edit_mon.cgi"] '+selectStr+'[name="type"]',select_for=$(""+selectStr+'.ui_select[name="module"], '+selectStr+'.ui_select[name="user"], '+selectStr+'.ui_select[name="nuser"], '+selectStr+'.ui_select[name="zone"], '+selectStr+'.ui_select[name="serv"], '+selectStr+'.ui_select[name="mod"], '+selectStr+".onchange_form_submit_triggger, "+mod_status_edit_mon_select+", "+selectStr+'[name="idx"], '+selectStr+'[name="file"]:first, '+selectStr+'[name="manual"]:first'),originalSelectAddedHiddenClass=""+selectStr+"2-hidden-accessible",select2Class=""+selectStr+"2",select2ContentTriggerClass=""+selectStr+"2-content",select2ContentContainerTriggerClass=select2ContentTriggerClass+"-"+"container",heighterStr="heighter",heighterType="34",heighterTypeForce="-force",v___page_hadEditor=0;if(pjax_popstate){$.each($(".container-fluid ."+originalSelectAddedHiddenClass+" + ."+select2Class+""),function(){v___page_hadEditor=1;$(this).prev("."+originalSelectAddedHiddenClass+"").removeClass(originalSelectAddedHiddenClass);$(this).remove()})}if(core.curModuleFile("webminlog","")||core.curModuleFile("webminlog","index.cgi")||core.curModuleFile("time","")||core.curModuleFile("time","index.cgi")||core.curModuleFile("firewalld","edit_serv.cgi")||core.curModuleFile("php-pear","")||core.curModuleFile("php-pear","index.cgi")||core.curModuleFile("mysql","")||core.curModuleFile("mysql","index.cgi")||core.curModuleFile("mysql","edit_dbase.cgi")||core.curModuleFile("fail2ban","edit_manual.cgi")||core.curModuleFile("mailboxes","list_mail.cgi")||core.curModuleFile("mailboxes","mail_search.cgi")||core.curModuleFile("postgresql","")||core.curModuleFile("postgresql","index.cgi")||core.curModuleFile("postgresql","edit_dbase.cgi")||core.curModuleFile("status","")||core.curModuleFile("status","index.cgi")||(core.curModuleFile("virtual-server","edit_tmpl.cgi")||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")||core.curModuleFileQuery("logviewer","view_log.cgi","view=1")||core.curModuleFileQuery("syslog","save_log.cgi","view=1")||core.curModuleFileQuery("syslog","save_log.cgi","new=")||v___page_hasEditor||v___page_hadEditor){var force_small_select=false;if((select_for.hasClass(""+heighterStr+"-28")||select_for.outerHeight()<=28||force_small_select)&&!select_for.hasClass(heighterStr+"-"+heighterType+heighterTypeForce)){heighterType="28"}if(!$(mod_status_edit_mon_select).length){editor_config_label(v___location_file==="edit_keys.cgi")}else{if($(mod_status_edit_mon_select).length){$(mod_status_edit_mon_select).each(function(){filter_out_objects_inner_chars($(this).prev(),":");$(this).prev().addClass("elm-rel-z "+heighterStr+"-"+heighterType+heighterTypeForce)})}}select_for.select2({minimumResultsForSearch:6,containerCssClass:""+select2ContentTriggerClass+" "+heighterStr+"-"+heighterType+"",dropdownCssClass:""+select2ContentTriggerClass+" h"+heighterType+""});select_for.addClass(heighterStr+"-"+heighterType+heighterTypeForce);select_for.next("."+select2Class+"").addClass(select2ContentContainerTriggerClass);select_for.next("."+select2Class+"").next(".ui_form_end_submit").addClass(""+heighterStr+"-"+heighterType+"");select_for.on("select2:open",function(){$("body").find(".select2-container, "+v___class_select2_leak).removeClass("select2-aside");setTimeout(function(){var e=document.querySelector(".select2-search__field");e&&e.focus()})});select_for.on("select2:select",function(e){$(this).parents("form").trigger("input")});setTimeout(function(){bind_sameorigin(0)},100)}if(v___location_file==="install_mod.cgi"){var prev_req=vars.previous_request,$prev_req_file=$(prev_req.target).find('[name="file"]');if(prev_req.type==="submit"&&Test.strContains($(prev_req.target).attr("action"),v___location_file)&&$prev_req_file&&$prev_req_file.val()){if(Test.strContains($prev_req_file.val(),"csfwebmin")){$('.container-fluid a[href*="csf"]').on("click",function(e){e.preventDefault();$('aside a[href*="csf/index.cgi"]').trigger("click")});plugins.navigation.reload();$.ajax({type:"POST",url:v___location_prefix+"/index.cgi",success:function(e){},error:function(e){}})}}}if(!pjax_popstate&&v___location_path_lead_unslashed==v___location_prefix_unslashed_trail_slashed+"settings-editor_read.cgi"){$('form[action*="settings-editor_write.cgi"] .btn-group.end_submits button.btn').on("click",function(){var custom_styles=$("[data-custom-style]"),custom_script=$("[data-custom-script]"),data=$('[name="data"]').val();if(Test.strContains($('[name="file"]').val(),"styles.css")){custom_styles.remove();$("head").append("")}if(Test.strContains($('[name="file"]').val(),"scripts.js")){custom_script.remove();eval(data)}})}var $bottom_js_back=$('.btn-lg.page_footer_submit[href*="javascript:history.back"]'),$topBackButton=$("#headln2l a i.fa.fa-arrow-left").parent("a");if($bottom_js_back&&$bottom_js_back.length){$topBackButton.attr("title",theme_language("global_prev_page")).tooltip("fixTitle").attr("href","javascript:history.back()");$topBackButton.one("click",function(e){e.preventDefault();e.stopPropagation();$bottom_js_back[0].click()})}else if(v___module!==v___module_file_manager){$topBackButton.find("i").addClass("fa-return").parent("a").addClass("btn-squiare-headln2 text-lighter-slight")}if(core.curModule("backup-config")){var $fetch_form=$($('.container-fluid form[action*=".cgi"].ui_form')[0]);$fetch_form.on("submit",function(e){if($fetch_form.find('input[name="dest_mode"]:checked').val()=="4"){e.preventDefault();e.stopPropagation();theme_download_form($(this))}});var $submit=$fetch_form.find('.ui_submit[name="backup"]'),$mods=$fetch_form.find('select[name="mods"]');$mods.length&&!$mods.val().length&&$submit.addClass("disabled");$fetch_form.on("change",function(e){var t=$mods.val().length;if(t){$submit.removeClass("disabled")}else{$submit.addClass("disabled")}})}if(core.curModuleFile("webmin","edit_mods.cgi")||core.curModuleFile("usermin","edit_mods.cgi")){var $fetch_form=$($('.container-fluid form[action*=".cgi"].ui_form')[3]);$fetch_form.on("submit",function(e){if($fetch_form.find('input[name="to"]:checked').val()=="0"){e.preventDefault();e.stopPropagation();theme_download_form($(this),"download_is_being_prepared")}});var $submit=$fetch_form.find('.ui_submit[name="ok"]');$submit.addClass("disabled");$fetch_form.on("change",function(e){var t=$fetch_form.find('select[name="mod"]').val()&&$fetch_form.find('select[name="mod"]').val().length;if(t){$submit.removeClass("disabled")}else{$submit.addClass("disabled")}})}if(core.curModuleFile("gnupg","edit_sign.cgi")||core.curModuleFile("gnupg","edit_decrypt.cgi")||core.curModuleFile("gnupg","edit_encrypt.cgi")){var $gnupg_forms=$('.container-fluid form[action="sign.cgi/signed.txt"].ui_form, '+'.container-fluid form[action="decrypt.cgi/output.txt"].ui_form,'+'.container-fluid form[action="encrypt.cgi/output.gpg"].ui_form');$gnupg_forms.attr("target","_blank")}if(core.curModuleFile("server-manager","transfer_form.cgi")){var $fetch_form=$('.container-fluid form[action*="download.cgi"].ui_form');$fetch_form.on("submit",function(e){if($fetch_form.find('input[name="dest"]:checked').val()=="0"){e.preventDefault();e.stopPropagation();theme_open_new_tab(v___location_prefix+"/server-manager/"+$(this).attr("action")+"?"+$(this).serialize());setTimeout(despinnerfy_buttons,300)}})}if((core.curModuleFile("mysql","backup_form.cgi")||core.curModuleFile("postgresql","backup_form.cgi"))&&v___location_query&&v___location_query.includes("db=")){var $backup_form=$('.container-fluid form[action*=".cgi"].ui_form');$backup_form.on("submit",function(e){if($backup_form.find('input[name="dest"]:checked').val()=="1"){e.preventDefault();e.stopPropagation();theme_download_form($(this))}})}if(core.curModuleFile("mysql","csv_form.cgi")){var $backup_form=$('.container-fluid form[action*=".cgi"].ui_form');$backup_form.on("submit",function(e){if($backup_form.find('input[name="dest"]:checked').val()=="0"){e.preventDefault();e.stopPropagation();theme_download_form($(this))}});var $submit=$backup_form.find('.ui_submit[name="ok"]');var $select_for_dbs_or_tables=$backup_form.find('select[name="cols"]');$backup_form.on("change",function(e){var t=$select_for_dbs_or_tables.val().length;if(t){$submit.removeClass("disabled")}else{$submit.addClass("disabled")}});$backup_form.trigger("change")}if(core.curModuleFile("virtual-server","backup_form.cgi")){var $vm_backup_form=$('form[action*="backup.cgi/backup"]'),$vm_backup_form_sched=$('form[action*="backup_sched.cgi"]');$vm_backup_form.find('select[name^="dest0_"]').on("change",function(){var e='input[name="fmt"]',t=$("form").find(""+e+'[value="0"]'),i=$("form").find(""+e+'[value="1"], '+e+'[value="2"]');if($(this).val()=="44"){i.prop("disabled",true);t.prop("checked",true).trigger("change");t.closest("tr").toggleClass("hidden",true)}else{i.prop("disabled",false);t.closest("tr").toggleClass("hidden",false)}});var $vm_backup_form_target=$vm_backup_form.length?$vm_backup_form:$vm_backup_form_sched;$vm_backup_form_target.find('input[type="radio"][name="compression"]').on("change",function(){var e=$vm_backup_form_target.find('input[type="radio"][name="increment"][value="0"]'),t=e.closest("tr");if($(this).val()=="3"){e.trigger("click");t.hide()}else{t.show()}});var $sched_backup_form=$('form[action*="backup_sched.cgi"]');if($sched_backup_form.length){var $sched_backup_form_purge=$sched_backup_form.find('[name^="purge"].ui_opt_textbox');if($sched_backup_form_purge.length){$sched_backup_form_purge.closest(".ui_grid_cell").prev("td").attr("style","vertical-align: middle !important; width: 10%; padding-left: 2px !important; padding-right: 10px !important")}}}$.each($(".container-fluid a.ui_link_replaced"),function(){if(this.href.includes("webminlog.csv")){$(this).removeClass().addClass("btn btn-default ui_submit heighter-34").prepend(' ')}});if(core.curModuleFile("virtual-server","edit_user.cgi")){$('.ui_form > table.opener_table_style > tbody > tr > td.opener_container > div[class^="opener_"] > .table-hardcoded:first-child').each(function(e,t){var i=$(t).find("tbody > tr > td");if(!i.length){$(t).parents(".opener_table_style").remove()}});var $showpass=$('form[action="save_user.cgi"] a[href^="showpass.cgi"]');if($showpass.length){$showpass.prev(".awradio").addClass("vertical-align-text-top").find(".lawobject").css({maxHeight:"25px"})}}if(core.curModuleFile("virtual-server","delete_domain.cgi")){$('form[action*="delete_domain.cgi"]').on("submit",function(){var e=URI.parseQuery(URI(location.href).query()).dom;plugins.favorites.remove(e)})}if(core.curModuleFile("server-manager","mass.cgi")){$('form[action*="mass.cgi"]').on("submit",function(){var e=$(this).find('input[name="d"][type="hidden"]').map(function(e,t){return $(t).val()}).get(),t=$(this).find('input[name="dereg"][type="hidden"][value="1"]').length;$.each(e,function(e,i){if(t&&i&&i.length>3){plugins.favorites.remove(i)}})})}if(core.curModuleFile("server-manager","mass_domains.cgi")){$('form[action*="mass_domains.cgi"]').on("submit",function(){var e=$(this).find('input[name="d"][type="hidden"]').map(function(e,t){return $(t).val()}).get(),t=$(this).find('input[name="delete"][type="hidden"][value="1"]').length;$.each(e,function(e,i){if(t&&i&&i.length>3){if(i&&i.includes("/")){i=i.split("/")[1];plugins.favorites.remove(i)}}})})}if(core.curModule("help")){$('.ui_form_end_submit ~ [type="reset"]').addClass("heighter-34")}var $multi_select=$(".ui_multi_select");if($multi_select.length){$multi_select.find('[onclick^="multi_select_move"]').text("...")}check_reboot(1);if(v___location_path&&v___location_path.length&&v___location_path.includes("webalizer/view_log.cgi")){if(!pjax_popstate){var $link_targets=document.querySelectorAll(".container-fluid .panel-body center p small a");$link_targets.forEach(function(e,t){e.innerHTML=e.innerHTML.slice(1,-1);e.classList.add("btn","btn-transparent","btn-link-bordered","btn-xxs")});var title_target_cnt=document.querySelector(".container-fluid #headln2c");title_target=title_target_cnt.querySelector("span"),title_target_fav=title_target_cnt.querySelector("button"),title_target_text=title_target.innerHTML;title_target_text=title_target_text.substr(0,title_target_text.lastIndexOf("-")).trim(),title_target_main=title_target_text.substr(0,title_target_text.lastIndexOf(" ")),title_target_sub=title_target_text.substr(title_target_text.lastIndexOf(" ")+1);title_target_cnt.innerHTML=title_target_fav.outerHTML+" "+title_target_main+'
    '+title_target_sub+"
    ";var $table_broken=$(".container-fluid .panel-body table"),$table_broken_delims=$table_broken.find('[height="4"]');$table_broken.removeClass("table-hardcoded").addClass("table-bordered").find('td[bgcolor="#c0c0c0"], th[bgcolor="#c0c0c0"]').attr("bgcolor","#f5f5f5");$table_broken_delims.remove();$.each($table_broken_delims,function(){$(this).parent("tr").remove()})}}if(core.curModuleFile("acl","edit_user.cgi")||core.curModule("changepass")||core.curModuleFile("virtual-server","clone_form.cgi")||core.curModuleFile("virtual-server","edit_user.cgi")||core.curModuleFile("virtual-server","list_databases.cgi")||core.curModuleFile("virtual-server","edit_domain.cgi")||core.curModuleFile("virtual-server","domain_form.cgi")||core.curModuleFile("virtual-server","edit_pass.cgi")||core.curModuleFile("samba","edit_euser.cgi")||core.curModuleFile("samba","ask_epass.cgi")||core.curModuleFileQuery("postgresql","edit_user.cgi","new=")||core.curModuleFileQuery("mysql","edit_user.cgi","new=")||core.curModuleFileQuery("passwd","edit_passwd.cgi","user=")||core.curModuleFile("mailbox","inbox_login_error.cgi")||core.curModuleFile("server-manager","edit_pass.cgi")&&v___location_query.includes("force=1")){if(core.curModuleFile("virtual-server","edit_domain.cgi")){$('.container-fluid .panel-body input[type="text"][name="passwd"]').addClass("t-password-complexity-meter-inputter-obj")}$('.container-fluid .panel-body input[type="password"]:not([data-password-again]), '+'.container-fluid .panel-body input[type="text"][name="passwd"]:not([data-password-again]), '+".container-fluid .panel-body input.t-password-complexity-meter-inputter-obj, "+'[data-uri*="/virtual-server/edit_user.cgi"] .container-fluid .panel-body input[name="mailpass"]').passwordComplexityMeter();var class_to_remove="badge badge-transparent badge-circle";if(core.curModuleFile("virtual-server","list_databases.cgi")){var $view_pass_button=$('a[href^="showpass.cgi?dom="]');$view_pass_button.each(function(){$(this).addClass("btn btn-default heighter-28 margined-left--1");$(this).parents(".ui_radio_table").find(".t-password-complexity-meter-wrapper-cont > .btn-group").append($(this).detach());$(this).removeClass(class_to_remove)})}if(core.curModuleFile("server-manager","edit_pass.cgi")){var $view_pass_button2=$('.t-password-complexity-meter-wrapper-cont + a[href^="showpass.cgi?"]');$view_pass_button2.addClass("btn btn-default heighter-28 margined-left--1");$view_pass_button2.removeClass(class_to_remove);var $fg_targ=$('form[action="save_pass.cgi"] .t-password-complexity-meter-wrapper-cont > .btn-group');$fg_targ.append($view_pass_button2.detach());$fg_targ.find("i.fa2-account-key").addClass("pd-tp-3");var $view_pass_button3=$('input[type="password"] + a[href^="showpass.cgi?"]');$view_pass_button3.addClass("btn btn-default heighter-28 margined-left--4").find("i.fa2-account-key").addClass("pd-tp-3");$view_pass_button3.removeClass(class_to_remove)}}var input_warning_caps="input_warning_caps",input_password_targets=document.querySelectorAll('input[type="password"]');$(".container-fluid ."+input_warning_caps+"").remove();for(i=0,length=input_password_targets.length;i30?1:0;span.classList.add(input_warning_caps);span.setAttribute("title","Caps Lock");isLargePassInput&&span.classList.add("large");input_password_targets[i].classList.add("use_"+input_warning_caps+"");input_password_targets[i].parentNode.insertBefore(span,input_password_targets[i].nextSibling);input_password_targets[i].addEventListener("blur",function(){this.nextSibling.classList.remove("visible")});input_password_targets[i].addEventListener("keydown",function(e){if(typeof e.getModifierState!=="function"){return}state=e.keyCode===20?!e.getModifierState("CapsLock"):e.getModifierState("CapsLock");if(state){this.nextSibling.classList.add("visible")}else{this.nextSibling.classList.remove("visible")}})}$.each($(".container-fluid select:visible"),function(){if($(this).css("height")==="28px"){$(this).nextAll(".btn").addClass("heighter-28")}});if(pjax_popstate&&(core.curModule("mysql")||core.curModule("postgresql"))){typeof f__ex__mysql_runner_update==="function"&&f__ex__mysql_runner_update()}$(".container-fluid select").on("change",function(){if(this.multiple){var e=$(this).val();$(this.options).removeAttr("selected");$(this.options).removeAttr("selected");for(var t=0,i=this.options.length;t
    ');e.find(""+table_str+"."+table_hover_str+"").first().removeClass(table_hover_str);e.find("."+opener_hidden_str+" > "+table_str+"").removeClass(table_hover_force).find("tbody > tr > td > "+table_str+"."+table_hover_str+"").addClass(table_hover_force)}})}}if(v___location_path==v___location_prefix+"/shell/"||v___location_path==v___location_prefix+"/shell/index.cgi"||v___location_path==v___location_prefix+"/server-manager/shell.cgi"){var shell_header_sel="#headln2r .btn-group",path_to_shell_class="path-to-shell",shell_title=$("aside .user-link.ported-console").attr("data-title"),shell_title_inject=String();if(!pjax_popstate){if(shell_title){shell_title_inject=theme_inject_tooltip(shell_title,"#headln2r",false,false,false,"(")}if(session.server.data("terminal")==="0"){$(shell_header_sel).append("')}}$(shell_header_sel).find("."+path_to_shell_class+"").on("click",function(e){e.preventDefault();plugins.shell.open()})}if(core.error.get()){if(v___initial_load||v___module===v___module_file_manager||vars.requested_page&&vars.requested_page.includes("/"+v___module_file_manager+"")){core.error.clean()}}if(core.curModuleFile("server-manager","list_ifaces.cgi")||core.curModuleFile("server-manager","list_ips.cgi")){var ui_links_row_str="ui_links_row",$empty_table_check=$(".container-fluid ."+ui_links_row_str+" ~ .table-condensed, #att_ranges .table-striped");var $safe_target=$empty_table_check.find("thead + tbody").html();if($safe_target&&$safe_target.length===1){$empty_table_check.add($empty_table_check.next("."+ui_links_row_str+"")).add($empty_table_check.next("."+ui_links_row_str+"").nextAll("br")).remove()}}$("textarea").on("click",function(){if(!$(this).attr("readonly")||$(this).hasClass("disabled")){return}var e=$(this).val();if(e){this.select();theme_copy_to_clipboard(e);plugins.messenger.post(''+theme_language("textarea_to_clipboard")+":
    "+e+"
    ",5,"success","textarea_to_clipboard")}});if(core.curModuleFile("mailbox","list_addresses.cgi")){$('.container-fluid textarea[name="members"] ~ .btn.btn-success.ui_form_end_submit').removeClass("btn-success").addClass("btn-default btn-block margined-top--5 btn--save-grp").find(".fa").remove()}if(core.curModule("custom")){var custom_file_edit_mode=core.curModuleFile("custom","view.cgi");if(!pjax_popstate){var custom_cmd_main_container_main=".ui_grid_row > .ui_grid_cell > .ui_form > .table-responsive > .table-subtable > tbody > tr > td > .sub_table_container",custom_cmd_main_container=""+custom_cmd_main_container_main+" > tbody";$(""+custom_cmd_main_container+' > tr:nth-child(1) > td[colspan="2"]').each(function(){if(!$(this).find(".ui_form_end_submit").length){$(this).addClass("no-contents padded-a-3").parent("tr").addClass("no-contents")}});var $has_icon=$(".sub_table_container td:last-child.col_value.col_header > .ui_form_end_submit");if(!$has_icon.find("i.fa").length&&!$has_icon.parents(".ui_grid_cell").length){$has_icon.addClass("heighter-28")}var custom_sub_table=".custom table.ui_grid_table .ui_grid_row .sub_table_container";var $col_head=$(""+custom_sub_table+" tr");$.each($col_head,function(){if(!$(this).find(".ui_form_end_submit").length){$(this).find(".col_header.col_value").removeClass()}});$.each($(custom_sub_table),function(){var e=$(this).find("tr"),t=e.find("input:not(:hidden):not(.hidden), textarea, select").length;if(t>=1){$(this).addClass("dense");e.find("td.col_label").addClass("w-auto");e.find('td.col_value:not([colspan="2"])').find("button.ui_form_end_submit").addClass("btn-tiny").parent("td").prev("td.col_label").addClass("vertical-align-middle");e.addClass("no-contents")}});if(v___location_file==="form.cgi"){$(".sub_table_container").find(".ui_form_end_submit").addClass("heighter-28").prepend(' ').parent("td").prev("td.col_label").addClass("vertical-align-middle")}if(custom_file_edit_mode){var detach_button_html=''+''+"";$("#headln2l .btn-group").append(detach_button_html)}}if(custom_file_edit_mode){$("#headln2l .btn-group [data-external-detach-custom-file]").on("click",function(e){e.preventDefault();var t=$("#headln2c").find("[data-main_title] + [data-sub_title] > tt").text();t&&edit_file_from_full_path(t)})}}if(!pjax_popstate){$(".chooser_button").each(function(){var e=$(this).prev("input[name], textarea");if(!e.length){e=$(this).prev("span").find(".ui_opt_textbox");if(e.length){e=e.unwrap()}}else{if(!e.attr("class")&&e.outerHeight(true)>=32){e.css({marginTop:1,marginBottom:1})}}$(this).add(e).wrapAll('')})}var vs_str_="virtual-server",sm_str_="server-manager",vm_nginx_="virtualmin-nginx";if(core.curModuleFile(vs_str_,"edit_newchroot.cgi")||core.curModuleFile(vs_str_,"edit_newglobal.cgi")||core.curModuleFile(vs_str_,"edit_newlinks.cgi")||core.curModuleFile(vs_str_,"edit_newshells.cgi")||core.curModuleFile(vs_str_,"view_backuplog.cgi")||core.curModuleFile(vm_nginx_,"edit_logs.cgi")||core.curModuleFile(vm_nginx_,"edit_srewrite.cgi")||core.curModuleFile(vm_nginx_,"edit_saccess.cgi")||core.curModuleFile(vm_nginx_,"edit_sproxy.cgi")||core.curModuleFile(vm_nginx_,"edit_fcgi.cgi")||core.curModuleFile(vs_str_,"edit_phpver.cgi")||core.curModuleFile(vs_str_,"edit_spf.cgi")||core.curModuleFile(vs_str_,"ratelimit.cgi")||core.curModuleFile(vs_str_,"edit_newfields.cgi")||core.curModuleFile(sm_str_,"edit_docker.cgi")||core.curModuleFile(sm_str_,"edit_vserver.cgi")||core.curModuleFile(sm_str_,"edit_zone.cgi")||core.curModuleFile(sm_str_,"edit_openvz.cgi")||core.curModuleFile(sm_str_,"list_locations.cgi")||core.curModuleFile(sm_str_,"edit_lxc.cgi")||core.curModuleFile(sm_str_,"list_ips.cgi")||core.curModuleFile("acl","edit_unix.cgi")||core.curModuleFile("squid","edit_cachemgr.cgi")||core.curModuleFile("spam","edit_white.cgi")||core.curModuleFile("fsdump","edit_dump.cgi")||core.curModuleFile("mysql","backup_form.cgi")||core.curModuleFile("mysql","table_form.cgi")||core.curModuleFile("postgresql","backup_form.cgi")||core.curModuleFile("webmin","edit_bind.cgi")||core.curModuleFile("usermin","edit_bind.cgi")||core.curModuleFile("procmail","edit_recipe.cgi")||core.curModuleFile("usermin","edit_logout.cgi")||core.curModuleFile("net","list_routes.cgi")||core.curModuleFile("cron","edit_cron.cgi")||core.curModuleFile("cluster-copy","edit.cgi")||core.curModuleFile("cluster-cron","edit.cgi")||core.curModuleFile("webalizer","edit_log.cgi")||core.curModuleFile("apache","edit_global.cgi")||core.curModuleFile("logrotate","edit_sched.cgi")||core.curModuleFile("fetchmail","edit_cron.cgi")||core.curModuleFile(vs_str_,"edit_bucket.cgi")||core.curModuleFile("sshd","edit_net.cgi")||core.curModuleFile("fail2ban","edit_jail.cgi")||core.curModuleFile("webmin","edit_advanced.cgi")||core.curModuleFile("webmin","edit_web.cgi")||core.curModuleFile("usermin","edit_web.cgi")||core.curModuleFile("webmin","edit_os.cgi")||core.curModuleFile("usermin","edit_os.cgi")||core.curModuleFile("webmin","edit_descs.cgi")||core.curModuleFile("usermin","edit_descs.cgi")||core.curModuleFile("virtualmin-init","edit_tmpl.cgi")||core.curModuleFile("ssh","edit_host.cgi")||core.curModuleFile("syslog","edit_log.cgi")||core.curModuleFile("mysql","newdb_form.cgi")||core.curModuleFile("ldap-server","acl_form.cgi")||core.curModuleFile("ldap-client","edit_server.cgi")||core.curModuleFile("squid","edit_ports.cgi")||core.curModuleFile("squid","edit_logs.cgi")||core.curModuleFile("squid","edit_cache.cgi")||core.curModuleFile("virtualmin-nginx","edit_server.cgi")||core.curModuleFile("spam","edit_simple.cgi")||core.curModuleFile("spam","edit_report.cgi")||core.curModule("virtual-server")&&v___location_file=="edit_resel.cgi"||core.curModule("virtual-server")&&v___location_file=="edit_tmpl.cgi"||core.curModuleFile("cpan","download.cgi")||core.curModuleFile("virtual-server","edit_phpmode.cgi")||core.curModuleFile("net","edit_bifc.cgi")||core.curModuleFile("net","edit_aifc.cgi")||check_location_resource("/config.cgi?phpini")||$('body[class*="bind8"]').length&&v___location_file||$('body[class*="status"]').length&&v___location_file=="edit_mon.cgi"||$('body[class*="custom"]').length&&v___location_file=="edit_sql.cgi"||$('body[class*="custom"]').length&&v___location_file=="edit_cmd.cgi"||$('body[class*="custom"]').length&&v___location_file=="edit_file.cgi"){$(".table:not(.opener_table_style):not(.dataTable)").removeClass("table-hover").addClass("no-hover");if(core.curModule("virtual-server")&&v___location_file=="edit_tmpl.cgi"){$(".table:not(.opener_table_style):not(.dataTable) > tbody > tr > td > table > tbody > tr > td > table").addClass("w-100p-f")}}theme_ui_opt_select(3);if(core.curModuleFile("apache","edit_mods.cgi")){var mpm_targets='.iawobject[value^="mpm_"]';$(mpm_targets).on("click",function(){$(mpm_targets+":checked").not(this).trigger("click")})}snippets.page.render_table_labels($(".container-fluid > .panel > .panel-body"));$(".ui_grid_cell:first-child > .btn-group.ui_links_row").parent().addClass("ui_grid_cell_auto");$(".ui_radio_table > tbody > tr > td > textarea").each(function(){$(this).parent("td").prev("td").addClass("vertical-align-middle")});if(core.curModuleFile("acl","edit_user.cgi")){$('.container-fluid form[action="save_user.cgi"] input[name="twofactor"]').prev().removeClass().addClass("btn btn-xxs btn-success margined-left-5 pd-bt-2").attr("type","submit")}if(!pjax_popstate&&v___location_path===v___location_prefix+"/virtual-server/edit_tmpl.cgi"){embed_table_header_icon();var server_template_filter_dropdown_spinner=theme_spinner_small(false,!v___theme_night_mode?"dark smaller2":" "),server_template_filter_dropdown_tooltip_text=theme_language("tooltip_virtualmin_templates_filter_generating"),server_template_filter_dropdown_tooltip_data_toggle_str='data-toggle="tooltip"',server_template_filter_dropdown_html=""+"";var server_template_filter_dropdown_selector_str='[action="edit_tmpl.cgi"] > [name="editmode"] ~ .end_submits';$(server_template_filter_dropdown_selector_str).prepend(server_template_filter_dropdown_html);$(server_template_filter_dropdown_selector_str).find("["+server_template_filter_dropdown_tooltip_data_toggle_str+"]").attr("data-placement","auto top").data("placement","auto top").tooltip("fixTitle")}if(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"){embed_table_header_icon();setTimeout(plugins.filter.options,101)}$("#content > .container-fluid > .panel > div.panel-body > p:last-child").each(function(){var e=$(this).text();if(e&&e.length){e=$.trim(e);if(!e){$(this).empty()}}});if(core.curModule("virtualmin-nginx")&&v___location_file=="edit_mime.cgi"&&v___location_query&&v___location_query.indexOf("search=")>=0){var $vm_nginx_scroll_to_add_new=$('#content .ui_checked_columns [name="name"]');if($vm_nginx_scroll_to_add_new.length){vars.page_user_inactive=0;setTimeout(function(){$vm_nginx_scroll_to_add_new[0].scrollIntoView({behavior:"auto",block:"center"});$vm_nginx_scroll_to_add_new[0].focus()},300)}}if(core.curModuleFile("virtual-server","edit_phpmode.cgi")){var cnt_str=".container-fluid",modes_sel_str=""+cnt_str+' [name="mode"]',curr_mode=$(""+modes_sel_str+":checked").val(),$modes=$(modes_sel_str);if(curr_mode&&$modes&&$modes.length){var $php_ver_select_row=$(""+cnt_str+' [name^="ver_"]').parents("td.col_value").parent(),$php_ver_select_row_all_used_for_none=$modes.closest(".col_value").parent("tr").nextAll("tr");$php_ver_select_row_all_used_for_none=$php_ver_select_row_all_used_for_none.add($php_ver_select_row_all_used_for_none.closest("form").find("table.opener_table_style:last"));$modes.on("change",function(){var e=$(this).val();if(curr_mode==="none"||e==="none"){$php_ver_select_row_all_used_for_none.hide()}else{$php_ver_select_row_all_used_for_none.show()}if(curr_mode.replace("fcgid","cgi")!==e.replace("fcgid","cgi")){$php_ver_select_row.hide()}else{$php_ver_select_row.show()}var t=$(""+cnt_str+" .ui_text_color");if(t.length){var i=t.parent("td").parent("tr");if(e==="fpm"){i.hide()}else{i.show()}}})}$(".container-fluid sup.ui_help > i").removeClass("fa-question-circle fa-0_80x").addClass("fa2 fa2-php fa-1_50x")}var cnt_tbl_body="container-fluid .panel-body",ui_links_row="ui_links_row",not_data_table=":not(.dataTable)",only_child=":only-child",tbl_hardcoded="table-hardcoded:not(.ui_table_end_submit_right):not(.ui_buttons_table)",form_elem="form",table_cls_str="table:not([data-recursive_tree])",icn_row="icons-row",long_tbl_pref="long-table-";if(!core.curModuleFile("bind8","")&&!core.curModuleFile("bind8","index.cgi")&&!core.curModuleFile("postfix","sni.cgi")&&!core.curModuleFile("postfix","virtual.cgi")&&!core.curModuleFile("postfix","aliases.cgi")){tbl_hardcoded+=":not(.ui_grid_table):not(.ui_radio_table)"}var theTableToWrap=$("."+cnt_tbl_body+" > "+form_elem+" > ."+ui_links_row+" ~ ."+table_cls_str+""+not_data_table+","+"."+cnt_tbl_body+" > "+form_elem+" > ."+tbl_hardcoded+","+"."+cnt_tbl_body+" > ."+table_cls_str+""+only_child+","+"."+cnt_tbl_body+" > ."+icn_row+" ~ ."+tbl_hardcoded+","+"."+cnt_tbl_body+" > "+form_elem+" ~ ."+tbl_hardcoded+","+"."+cnt_tbl_body+" > ."+ui_links_row+" ~ ."+table_cls_str+""+not_data_table+"");if(theTableToWrap.length&&session.server.data("product")!=="usermin"){theTableToWrap.wrap('
    ')}if(typeof vars.requested_page==="string"&&vars.requested_page&&vars.requested_page.includes("webmin/fix_os")){v___title_initial=session.server.data("title-initial");theme_title_generate();$(".info-container").find('form[action*="webmin/fix_os.cgi"]').parents(".alert").remove()}if(typeof vars.requested_page==="string"&&vars.requested_page&&vars.requested_page.includes("init/reboot")){despinnerfy_buttons()}if(core.curModuleFile("virtual-server","manual_records.cgi")||core.curModuleFile("bind8","edit_text.cgi")){$(".container-fluid").find("form").find('[name="validate"], [name="soa"]').parent(".awcheckbox").addClass("solid")}$(".container-fluid .ui_checked_columns td:not(.ui_checked_checkbox) .awcheckbox").parent("td:not(:first-child)").addClass("awcheckbox_cont");$.each($(".container-fluid select:not([multiple])"),function(){if($(this).outerHeight()<30){$(this).addClass("heighter-28")}});$.each($(".container-fluid .tr_tag > td[data-td-e]:last-child"),function(){var e=$(this).find(".f__lnk_t_btn-el");if(e.length){$(this).wrapInner('
    ');e.removeAttr("style");$(this).attr("data-btns",1)}});if(core.curModule("virtualmin-support")&&!pjax_popstate){var submit_ticket_btn=document.querySelector("[data-submit-ticket]");$(submit_ticket_btn).removeClass().addClass("btn btn-lg btn-primary").prepend('')}if(v___location_query&&v___location_query.includes("refresh-navigation=1")){if(!v___initial_load){plugins.navigation.reload(undefined,function(){plugins.navigation.detect(v___location_path,1)})}else{plugins.navigation.detect(v___location_path,1)}}if(core.curModuleFile("webminlog","view.cgi")){var webminlog_module_no_command_escapes_sel_str="webminlog_module_no_command_escapes",webminlog_module_no_command_escapes__icon_cls_str="fa2-code",webminlog_module_no_command_escapes__icon_active_cls_str="text-danger",webminlog_module_no_command_escapes_icon_obj_func=function(){return $("."+webminlog_module_no_command_escapes_sel_str).find("."+webminlog_module_no_command_escapes__icon_cls_str)},wb_log_no_code_btn_item_name=v___server_hostname+"-"+webminlog_module_no_command_escapes_sel_str,wb_log_no_status_func=function(){return localStorage.getItem(wb_log_no_code_btn_item_name)=="0"},wb_log_no_status_remove_backslashes_func=function(){webminlog_module_no_command_escapes_icon_obj_func().addClass(webminlog_module_no_command_escapes__icon_active_cls_str);$.each($(".webminlog .opener_container td > pre"),function(){$(this).html().length&&$(this).html($(this).html().replace(/[\\]+/g,""))})};if(!pjax_popstate){$("#headln2r .btn-group").prepend(""+"'+'')}$("."+webminlog_module_no_command_escapes_sel_str).on("click",function(e){e.preventDefault();localStorage.setItem(wb_log_no_code_btn_item_name,wb_log_no_status_func()?"1":"0");if(wb_log_no_status_func()){localStorage.setItem(wb_log_no_code_btn_item_name,"0");wb_log_no_status_remove_backslashes_func()}else{localStorage.setItem(wb_log_no_code_btn_item_name,"1");page_refresh()}});if(wb_log_no_status_func()){wb_log_no_status_remove_backslashes_func()}}$("#content form > .table.opener_table_style").each(function(){var e="long-table-";$(this).wrap('
    ')});(function(){var e="virtual-server",t="edit_tmpl.cgi";if(core.curModuleFile(e,t)){var i=session.server.data("user"),a=uri_parse_param("id"),n=uri_parse_param("new"),r=[],l=[],o=(e+"_"+"templates_"+a+"_"+i).replace(/-/g,"_"),s=o+"_status",_=v___location_prefix+"/xhr.cgi?type=file&action=cache&module="+e+"&submodule=server-templates&server-template-id="+a+"&subaction=",c=function(t){return v___location_prefix+"/"+e+"/edit_tmpl.cgi?id="+a+(t?"&editmode="+t+"&nnext=1":"")},d=c()+"&editmode=",f=function(e){return e==uri_parse_param("id")},p=function(e,t,i){if(f(i)){plugins.filter.options({data:e,url:t,unlock:1,tooltip:{title:"tooltip_virtualmin_templates_filter"}})}};if(!n){if(vars.cache[o]){p(vars.cache[o],d,a)}else{$.ajax({type:"POST",url:_+"get",data:false,dataType:"JSON",success:function(e){if(e&&e.cached){vars.cache[o]=e.cached;p(e.cached,d,a)}else{if(vars.cache[s]){console.warn("Cache for this template is already being generated");return true}var t=function(e){vars.cache[s]=true;$.ajax({type:"POST",url:c(e),data:false,dataType:"text",success:function(i){if(i&&i.length){var n=$.parseHTML(i);if(n&&n.length){var c=$(n),f=c.find('select[name="editmode"]'),u=f.val();if(!u){console.warn("Cannot detect fetched template category");return true}var h=c.find(".table-responsive"),g=$.trim(h.find(".table-title").text()),m=h.find(".col_label");if(!m.length){m=h.find("tr.tr_tag > td[data-td-e]:first-child")}m.map(function(){var e=$.trim(this.innerText);if(g&&e){l.push({data:{category:g},section:u,value:e})}});if(!e){if($.isEmptyObject(r)){f.find("option").map(function(){r.push(this.value)});r.pop()}}var v=r.shift();if(v){t(v)}if(!v&&$.isEmptyObject(r)){vars.cache[s]=false;vars.cache[o]=l;p(l,d,a);$.ajax({type:"POST",url:_+"put&data="+JSON.stringify(l)+"",dataType:"JSON",error:function(){console.warn("Cannot store template cache")}})}}}}})};t()}}})}}}})();(function(){if(core.curModuleFile("virtual-server","backup.tgz")){var e=".container-fluid .panel-body",t='a[href*="download_backup.cgi"]';theme_buttonify([null],e,t,"btn btn-transparent btn-link-bordered btn-xxs margined-top-10 margined-bottom--10","");$(e).find(t).on("click",function(e){var t="cursor-na";if($(this).hasClass(t)){e.preventDefault();e.stopPropagation();return false}$(this).addClass(t).closest("b").addClass(""+t+" filter-grayscale filter-invert")})}})();(function(){if(core.curModuleFile("virtual-server","wizard.cgi")){var e=$('[data-radio-table="mysize"] span[data-wizard_myrec]');if(e.length){filter_out_objects_inner_chars(e,"(");filter_out_objects_inner_chars(e,")");e.addClass("label label-info label-sm")}var t=$('[name="mypass"]'),i=$('[name="mypass_def"]'),a=$('[name="parse"]');t.on("input",function(){a.toggleClass("disabled",!$(this).val())});i.on("change",function(){if($(this).val()=="0"){t.trigger("input")}else{a.removeClass("disabled")}});var n=$('[name="defdom"]'),r=n.closest("tr").nextAll("tr");n.on("change",function(){r.toggleClass("hidden",$(this).val()=="0")});var l='.container-fluid form[action="wizard.cgi"]',o=$(l),s=$(""+l+' button[name="parse"]');o.on("keydown",".table-responsive .table-subtable",function(e){if(e.keyCode===13){e.preventDefault();e.stopPropagation();s.trigger("click")}})}})();(function(){if(core.curModuleFile("mysql","edit_dbase.cgi")){$('[name="addview"]').addClass("heighter-34 heighter-34-force")}if(core.curModuleFile("virtual-server","save_cloud.cgi")){$(".btn-tiny.ui_link_replaced").addClass("heighter-34 margined-top-8").prepend('')}})();(function(){var e='body[class*="tikimanager"] .col_value > form',t=".btn.ui_submit",i='[name="dom"] + '+t+"";if(core.curModuleFile("virtualmin-tikimanager","index.cgi")||core.curModuleFile("virtualmin-tikimanager","")){$(e+" "+t).addClass("heighter-28");$(".col_value > "+t).addClass("heighter-28");var a=$(e+" "+i);a.removeClass("heighter-28 btn-success btn-default").addClass("btn-grey btn-xxs margined-top--2").find("span").css("font-size","100%")}})();(function(){if(core.curModuleFile("apache","")||core.curModuleFile("apache","index.cgi")){$('.container-fluid .ui_form .table td a.btn[href^="http"]:has(.fa-external-link)').attr("target","_blank").addClass("cursor-alias").parent().removeClass("cursor-pointer")}})();(function(){var e="#content > .container-fluid > .panel > div.panel-body",t="font-weight-normal",i=$(""+e+" > *").length,a=$(""+e+" > p").length,n=$(""+e+" > b").length,r=$(""+e+" > b ~ b").length>0,l=$(""+e+" > b + p:empty:last-child"),o=$(""+e+" > p + p:empty:last-child"),s=l.prev("b"),_=o.prev("p");if(i===a||i===2&&a===1&&n===1){if(_.length||s.length){var c=s.length?s:_.length?_:[];if(c.length){c.css("margin-bottom",0).addClass(t).find("b").addClass(t)}}}var d=$(""+e+" > b:first-child"),f=$(""+e+" > .ui_subheading + b:nth-child(2)");var p=d.length?d:f.length?f:[];if(p.length&&!r){p.addClass(t);var u=p.next("p");if(u.find(".ui_link").length){u.addClass("margined-top-6")}}var h=$(""+e+" > .ui_form > br + textarea");if(h.length){h.before('

    ')}})();(function(){if($.support.spa&&core.curModule("server-manager")){var e=$('.container-fluid .panel-body [action="bwgraph.cgi"]');e.attr("target","_blank");e.on("submit",function(e){e.stopPropagation()})}})();(function(){if(typeof v___location_file==="string"){if(v___location_file.includes("tconfig.cgi")){var e=$('.container-fluid select[name="settings_sysinfo_hidden_panels_user"]');e.after('
     '+theme_language("settings_sysinfo_hidden_panels_user_desc_"+(platform.detect()==="mac"?"mac":"pc")+"")+"
    ");e.closest("td").prev("td").addClass("vertical-align-top").find("b").addClass("margined-top-3");var t=$('.container-fluid select[name="settings_hotkey_toggle_hold_modifier"] option, .container-fluid select[name="settings_hotkey_toggle_modifier"] option, .container-fluid .table-cell-padded code');t.each(function(){var e=$(this).text();if(e&&platform.detect()==="mac"){e=e.replaceAll("Ctrl","Control");e=e.replaceAll("Alt","Option");e=e.replaceAll("Meta","Command");$(this).text(e)}})}}})();(function(){$.each($("[data-ui-buttons-row-form-container]"),function(){var e=$(this).prev("tr");if(e.find("td > hr").length){e.addClass("ui-pre-buttons-hr-row")}})})();(function(){$.each($('[onclick="form.target = \\"_blank\\""]'),function(){$(this).removeAttr("onclick");$(this).on("click",function(e){e.preventDefault();e.stopPropagation();var t=$(this).closest("form");t[0]&&theme_open_new_tab(t[0].action+"?"+$(this).attr("name")+"="+Convert.uriEncodeComponent(t.find('[name="'+$(this).attr("name")+'"][value]').val()||1)+"&"+t.serialize())})})})();(function(){var e="container-fluid",t="heighter-28 heighter-28-force",i="heighter-34",a='.sub_table_container select[name="attach"]',n='form[action="reply_mail.cgi"]';if(core.curModuleFile("mailboxes","view_mail.cgi")||core.curModuleFile("mailboxes","mail_search.cgi")||core.curModuleFile("mailboxes","list_mail.cgi")||core.curModuleFile("mailbox","view_mail.cgi")||core.curModuleFile("mailbox","mail_search.cgi")){$("."+e+" ."+i+"").addClass(t).removeClass(i);$("."+e+" "+n+" > .btn, "+n+" > select").addClass(t).removeClass(i);$("."+e+" "+n+" "+a+"").next("b").replaceTagName("span");var r=$("."+e+" "+n+" "+a+"").next("span");r.text(r.text().replace(/:/,""));r.next(".el-wp-chooser").find("input").addClass("w-33p").css("width",String()).removeAttr("size")}})();(function(){if($.support.spa){if(core.curModule("xterm",1)&&typeof xterm_argv==="object"&&!$.isEmptyObject(xterm_argv)){vars.pjax.cache.set("disable");plugins.terminal.new(xterm_argv);var e="#headln2r .btn-group",t="path-to-shell",i=$("aside .user-link.ported-console").attr("data-title"),a=theme_inject_tooltip(i,"#headln2r",false,false,false,"(");$(e).append("');$(e).find("."+t+"").on("click",function(e){e.preventDefault();plugins.terminal.open()})}else{plugins.terminal.clean(null)}}})();(function(){try{if(core.curModuleFile("virtual-server","domain_form.cgi")||core.curModuleFile("virtual-server","clone_form.cgi")||core.curModuleFile("virtual-server","import_form.cgi")||core.curModuleFile("virtual-server","rename_form.cgi")){domain_change=function(){};var e="autocomplete-suggestions-container",t=$('aside select[name="dom"] option'),i=$('.container-fluid .ui_form[action="domain_setup.cgi"] input[name="dom"], '+'.container-fluid .ui_form[action="clone.cgi"] input[name="newdomain"], '+'.container-fluid .ui_form[action="import.cgi"] input[name="dom"], '+'.container-fluid .ui_form[action="rename.cgi"] input[name="new"]'),a=[],n=function(t,i){t.parent().find("."+e+"").remove();t.autocomplete({lookup:i,width:t.outerWidth(),appendTo:t.parent()[0],containerClass:"autocomplete-suggestions highlighted wwidth "+e+"",showNoSuggestionNotice:false,minChars:0,triggerSelectOnValidInput:false,tabDisabled:true});theme.api.event.one.page.beforeReplace(function(){t.autocomplete("dispose")})},r=function(e){var t=[],i=[];e.forEach(function(e){if(!i.includes(e.value)){t.push(e);i.push(e.value)}});return t};$.each(t,function(e,t){var i=$.trim($(t).text()),n=String();if(i){var r=i.match(/^[A-Za-zÀ-ž\u0370-\u9FCC\.\-_\d\-]+$/);if(r&&r[0]){i=r[0]}var l=i.match(/\.([A-Za-zÀ-ž\u0370-\u9FCC\.\-_\d\-]+\.[A-Za-zÀ-ž\u0370-\u9FCC\.\-_\d\-]+$)/);if(l&&l[0]&&l[1]){n=l[1]}if(n&&n!=i){a.push({value:n,data:{category:0}})}try{i=i.replace(/↴\s+/,String()).replace(/↱\s+/,String())}catch(e){}a.push({value:i,data:{category:0}})}});if(a.length){n(i,a);i.on("input",function(e){var t=[],l=i.val(),o=String.fromCharCode(e.keyCode?e.keyCode:e.which).toLowerCase();if(l&&l.toString().split(".").length>=2){i.autocomplete("dispose");return}$.each($(a),function(e,i){var a={...i};if(l.toString().endsWith(".")){l=l.slice(0,-1)}if(l){a.value=l+"."+a.value;t.push(a)}}).promise().done(function(){var e=a.slice(),l=t.slice(),o=$.merge(e,l);o=r(o);i.autocomplete("dispose");n(i,o);i.trigger("blur").trigger("focus")})})}}}catch(e){console.warn("Error: Cannot retrieve list of domains")}})();if(core.curModuleFile("virtual-server","edit_redirect.cgi")){vars.pjax.cache.set("disable")}(function(){var e="ui_form_elements_wrapper",t="ui_link_pagination";$.each($("."+e+" ."+t+"_left, ."+e+" ."+t+"_right"),function(){var i="⏴";if($(this).hasClass(t+"_right")){i="⏵"}$(this).attr("data-title",theme_modifiers_replace_for_mac("Alt + "+i+""));$(this).tooltip({sanitize:false,container:$("."+e).parents("form"),html:true,delay:{show:vars.plugins.tooltip.delay.show,hide:vars.plugins.tooltip.delay.hide}})})})();(function(){if(core.curModuleFile("mailboxes","view_mail.cgi")||core.curModuleFile("mailbox","view_mail.cgi")){var e="#mail-iframe",t="load.mailiframe",i=$("#mail-iframe-spinner"),a=i.length,n=$('tr[data-contents="email"]');if(a){var r=n.parent("tbody").parent("table").parent("td").parent("tr");r.hide();$(e).one(t,function(){r.show()})}i.parents("tbody").prev("thead").find(".table-title > b").after(i.detach())}if(core.curModuleFile("mailboxes","view_mail.cgi")||core.curModuleFile("mailbox","view_mail.cgi")||core.curModuleFile("mailboxes","reply_mail.cgi")||core.curModuleFile("mailbox","reply_mail.cgi")){$("iframe").one("load",function(e){theme_page_iframes(this)})}})();(function(){if(core.curModuleFile("fsdump","")){$('form[action="edit_dump.cgi"] [type="submit"].btn-default').addClass("heighter-28 margined-right-1")}if(core.curModuleFile("quota","")){$('form[action="user_filesys.cgi"] button.btn-default:not(.chooser_button), form[action="group_filesys.cgi"] button.btn-default:not(.chooser_button)').addClass("margined-right-0")}$("html[data-script-name*='virtual-server/edit_tmpl.cgi'] #content [data-table-name='template-script'] table td br").remove()})();(function(){if(settings_right_table_wrap_inside_scrolled_container){$(".dt-table-hscroll").addClass("mode-wrap")}!pjax_popstate&&plugins.page.format.columns(true)})();(function(){const e=function(e,t,i){const a=$(e).find("a");a.addClass("btn "+i+" btn-xxs bhw-sm vertical-align-baseline");a.prepend('  ');$(e).prev(".ui_text_wrap").addClass("label label-default label-sm pd-rt-3 margined-left-1 margined-right-3 vertical-align-text-top");$(e).replaceWith(a)};if(core.curModuleFile("net","edit_bifc.cgi")||core.curModuleFile("net","edit_aifc.cgi")){const t=$(".container-fluid > .panel > .panel-body .ui_element_inline");if(t.length){t.each(function(){e(this,"fa2-plus-network","btn-grey")})}}})()};snippets.page.events=function(e,t){if(e==="reset"){e="keyup";t={holdModifer:~~!false}}if(core.curModuleFile("virtual-server","summary_domain.cgi")){var i=$("a[data-dom-file][href]");i.attr("data-no-randomized",1);t.holdModifer&&i.attr("href",function(){if(e==="keydown"){return $(this).data("edit-link")}else{return $(this).data("view-link")}})}};snippets.parser.fileviewer={getOpts:function(e){var t=e.hasClass("viewer-1"),i=e.hasClass("viewer-2"),a=e.hasClass("viewer-3"),n=e.hasClass("viewer-4"),r=e.hasClass("viewer-5"),l=e.hasClass("viewer"),o=e.hasClass("viewer-reverse"),s=e.hasClass("viewer-head"),_=e.hasClass("viewer-tail");return[t,i,a,n,r,l,o,s,_]},getSuffix:function(e,t){var i="/M=1",a="/M=2",n="/M=3",r="/M=4",l="/M=5",o="/V=1",s="/R=1",_="/H=1",c="/T=1";if(t){return[i,a,n,r,l,o,s,_,c]}var d=this.getOpts(e);return(d[0]?i:"")+(d[1]?a:"")+(d[2]?n:"")+(d[3]?r:"")+(d[4]?l:"")+(d[5]?o:"")+(d[6]?s:"")+(d[7]?_:"")+(d[8]?c:"")}};const events={};events.window=function(){window.document.addEventListener("visibilitychange",function(){if(document.visibilityState!=="hidden"){theme_post_event_window_state_activated("visibilitychange")}else{theme_post_event_window_state_deactivated("visibilitychange")}});window.addEventListener("focus",function(){theme_post_event_window_state_activated("focus")});window.addEventListener("blur",function(){theme_post_event_window_state_deactivated("blur")});window.addEventListener("popstate",function(){$('[data-trigger-injected="1"]').remove()});var e=document.querySelector("#content");if(e){e.addEventListener("scroll",function(e){if(!vars.pjax.post_page_fetch){vars.events.scrolled=e.target.scrollTop;plugins.pjax.page.interaction.set(Date.now())}})}$(document.body).on("keydown",function(e){if(e.keyCode===17){vars.events.keypressed.meta=true}if(e.keyCode===91){vars.events.keypressed.ctrl=true}if(e.keyCode===16){vars.events.keypressed.shift=true}if(e.keyCode===18){vars.events.keypressed.alt=true}theme_post_event_handler("keydown",{_isKeyCombo:e.originalEvent!==undefined&&e.key&&e.key!=="Alt"&&e.key!=="Shift"&&e.key!=="Control"&&e.key!=="Meta"&&(e.altKey||e.shiftKey||e.ctrlKey||e.metaKey),_keyCode:e.keyCode,_isHuman:e.originalEvent!==undefined,meta:e.keyCode===17,metaPressed:vars.events.keypressed.meta,ctrl:e.keyCode===91,ctrlPressed:vars.events.keypressed.ctrl,shift:e.keyCode===16,shiftPressed:vars.events.keypressed.shift,alt:e.keyCode===18,altPressed:vars.events.keypressed.alt,holdModifer:event_hold_modifer_pressed()})}).on("keyup",function(e){if(e.keyCode===17){vars.events.keypressed.meta=false}if(e.keyCode===91){vars.events.keypressed.ctrl=false}if(e.keyCode===16){vars.events.keypressed.shift=false}if(e.keyCode===18){vars.events.keypressed.alt=false}theme_post_event_handler("keyup",{_isKeyCombo:e.originalEvent!==undefined&&e.key&&e.key!=="Alt"&&e.key!=="Shift"&&e.key!=="Control"&&e.key!=="Meta"&&(e.altKey||e.shiftKey||e.ctrlKey||e.metaKey),_keyCode:e.keyCode,_isHuman:e.originalEvent!==undefined,meta:e.keyCode===17,metaPressed:vars.events.keypressed.meta,ctrl:e.keyCode===91,ctrlPressed:vars.events.keypressed.ctrl,shift:e.keyCode===16,shiftPressed:vars.events.keypressed.shift,alt:e.keyCode===18,altPressed:vars.events.keypressed.alt,holdModifer:~~!false})});$(window).on("keydown",function(e){var t=plugins.shell.status();if(!t&&session.alive){theme_shortcuts(e)}}).on("resize",function(){page_resized();plugins.shell.adjust();page_control_header();plugins.page.format.columns(true);plugins.page.events.mousemove()});var t=$(document.body).find(".-shell-port-"),n=t.find(".-shell-port-container");n.on("click",".-shell-port-close",function(){if(plugins.shell.available()){if(session.server.data("terminal")==1){plugins.terminal.close()}else if(session.server.data("shell")==1){plugins.shell.close()}}})};events.body=function(){const e=this;$(document.body).on("mousedown tap keydown",function(){setTimeout(function(){if(!vars.events.keypressed.shift){vars.page_interaction=1}});plugins.pjax.page.interaction.set(Date.now())}).on("click",function(e){if(vars.events.keypressed.alt&&vars.events.keypressed.ctrl&&!vars.events.keypressed.meta){let t=$(e.target).parents(".select2-container").prev("select"),n="copiedToClipboardSuccess";if(!t.length){t=$(e.target)}if(t.length){plugins.messenger.toast.destroy(n);let a=t.parents("button, a"),i=t.prev("button"),s=t.attr("href"),r=s?s:t.parents("a").attr("href"),o=t.attr("name")||r,l=t.parents("button").val()||t.parents("button").attr("value"),c=t.val()||t.attr("value")||l;if(typeof o!="undefined"){let s=o+(typeof c!="undefined"?"="+c:String());if(vars.events.keypressed.shift){s=typeof c!="undefined"?c:String()}if(!t.is("input.dynamic")){e.preventDefault()}e.stopPropagation();e.stopImmediatePropagation();console.warn("Copied to clipboard:");console.log(s);theme_copy_to_clipboard(s);setTimeout(function(){despinnerfy_button(a.length?a:i.length?i:t);plugins.messenger.post({type:"success",icon:"fa fa-exclamation-circle fa-lg fa-fw",id:n,title:theme_language("global_success"),message:theme_language("filemanager_copying_successful").replace(".",String()),layout:1,displayMode:1,position:"bottomCenter",cancel:true,close:true,timeout:3e3,progressBar:true})},22)}}}var t=".showpass-popover";if($(t).length){if(!$(t).is(e.target)&&$(t).has(e.target).length===0&&$(".popover").has(e.target).length===0){$(t).popover("hide")}}var n=function(t){if(vars.navigation.servers_index_control){if(e.originalEvent!==undefined||t){var n="servers-index",a=":visible",i=$("[data-"+n+"]");if(i.is(a)){var s=$(".popover-"+n+"");if(s.is(a)){if(!$(e.target).is(i)){if(!s.find(e.target).length){i.trigger("click")}}}}}}};var a="mobile-menu-toggler";if($("."+a+"").is(":visible")){if(!$(e.target).is('[data-servers-index="popover"], .mCustomScrollBox, .wbm-sm, .fa-stack, input[name="product-switcher"], label[for*="open_"], span, .sidebar-search, .select2-search, .select2-search__field, .select2-selection__rendered, .select2-selection')){n(true);plugins.navigation.collapse()}}$(".tooltip").tooltip("hide");n();var i="right-side-tabs",s=document.querySelector("."+i+""),r=s&&s.style.right==="0px"?true:false;if(r){if(!$(".right-side-tabs-toggler").hasClass("hidden")&&$(".right-side-tabs-toggler").hasClass("opened")&&!$(e.target).parents("#right-side-tabs").is("#right-side-tabs")&&!$(e.target).is(".fa-bell")&&!$(e.target).is(".fa-trash-o")&&!$(e.target).is(".badge.badge-danger")){$(".right-side-tabs-toggler:not(.hidden) .btn-menu-toggler").trigger("click")}}var o=window.navigator.platform==="MacIntel"?1:0;if((!o&&e.ctrlKey||o&&e.metaKey)&&!e.altKey){if($(e.target).closest("a").data("no-randomized")){return}var l=link_type_convert($(e.target).attr("href"),1),c=$(e.target).find("a").attr("href")||$(e.target).parents("a").attr("href"),d=link_type_convert(c,1),f=$(e.target).find("a").length?$(e.target).find("a"):$(e.target).parents("a"),p=Math.floor(Math.random()*1e5);if(l&&!Test.strContains(l,"javascript")||d&&!Test.strContains(d,"javascript")){if(l){$(e.target).attr("href",link_type_convert(l+(Test.strContains(l,"?")?"&":"?")+"randomized="+p+"",2));setTimeout(function(){$(e.target).attr("href",link_type_convert(l,2))})}else if(d){f.attr("href",link_type_convert(d+(Test.strContains(d,"?")?"&":"?")+"randomized="+p+"",2));setTimeout(function(){f.attr("href",link_type_convert(d,2))})}}}}).on("keydown",function(e){var t=e.keyCode?e.keyCode:e.which,n=String.fromCharCode(t).toLowerCase(),a=this;if(typeof a.timedOut==="number"){clearTimeout(a.timedOut)}if(n&&t!==8){if(a.preValue){a.preValue+=n}else{a.preValue=n}}var i=function(){var n=a.preValue;a.preValue=null;if(Test.editing()||$("input").is(":focus")||$("select").is(":focus")||$("textarea").is(":focus")||$(".modal.in").length||vars.events.blocked||$(".-shell-port-").hasClass("opened")||!session.alive){return}if(v___location_path==v___location_prefix+"/server-manager/gvnc.cgi"||v___location_path==v___location_prefix+"/server-manager/login.cgi"||v___location_path==v___location_prefix+"/telnet/"||v___location_path==v___location_prefix+"/telnet/index.cgi"||v___location_path==v___location_prefix+"/stunnel/"||v___location_path==v___location_prefix+"/stunnel/index.cgi"){return}if((core.curModuleFile("virtual-server","edit_tmpl.cgi")||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")&&n&&RegExp(/^[A-Za-zÀ-ž\u0370-\u9FCC\.\-_\d\-]/).test(n)&&t!==112&&t!==113&&t!==114&&t!==115&&t!==116&&t!==117&&t!==118&&t!==119&&t!==120&&t!==121&&t!==122&&t!==123&&!e.ctrlKey&&!e.altKey&&!e.shiftKey&&!e.metaKey){var i=".container-fluid .config-search",s=""+i+" > .dropdown-toggle",r=i+' input[name="search"]';if($(i).length){$(s).trigger("click.bs.dropdown");$(r).val(n).trigger("input");return}}if(n&&RegExp(/^[A-Za-zÀ-ž\u0370-\u9FCC\.\-_\d\-]/).test(n)&&!e.ctrlKey&&!e.altKey&&!e.metaKey&&t!==106&&t!==107&&t!==109&&t!==112&&t!==113&&t!==114&&t!==115&&t!==116&&t!==117&&t!==118&&t!==119&&t!==120&&t!==121&&t!==122&&t!==123){if(!$(".dataTables_filter label input").length&&!$(".btn-accordion-filter").length){setTimeout(function(){var t=$('aside input[name="search"]');if(e.shiftKey&&n=="1"){t.focus().val("!")}else{if(!Test.editing()){t.focus().val(n).trigger("change")}}},1)}else{$(".btn-filter-top-right, .btn-accordion-filter").trigger("click");$(".btn-filter-top-right .dataTable-mirror, .btn-accordion-filter .dataTable-mirror").focus().val(n).trigger("keyup")}}};this.timedOut=setTimeout(i,vars.event.stopped_typing_delay)}).on("click","#quota-virtual-server-collapse a.ui_link, #quota-virtual-server-1-collapse a.ui_link, #bw-virtual-server-collapse a.ui_link, #bw-virtual-server-1-collapse a.ui_link, .container-fluid > #system-status > .panel-body > .alert a, .right-side-tabs .info-container .alert a",function(){var e=URI.parseQuery(URI($(this).attr("href")).query())["dom"],t="virtualmin",n=$('.switch-toggle input:not([id="open_'+t+'"]):checked').length;if(n){plugins.navigation.switch.set(t)}else{}setTimeout(function(){$("aside select").val()!=e&&plugins.navigation.get.virtualmin(e)},300)}).on("click",".file-input-wrapper",function(e){e.stopPropagation();var t=$(this).prev('input[type="radio"]').add($(this).parent("td").prev("td").find('input[type="radio"]'));t.length===1&&t.prop("checked",true)}).on("click",".--to-new-tab",function(){$(this).attr("target","_blank")}).on("click",'[data-target="external"]',function(e){e.preventDefault();e.stopPropagation();e.stopImmediatePropagation();$(this).attr("data-href")&&theme_open_new_tab($(this).attr("data-href"),1)}).on("auxclick",function(e){if(e.button===1){const t=$(e.target).is("a")?$(e.target):$(e.target).find("a").first().length?$(e.target).find("a").first():$(e.target).closest("a").first().length?$(e.target).closest("a").first():null;if(t&&t.attr("href")&&(!t.attr("href").startsWith("#")&&!t.attr("href").startsWith("javascript"))){e.preventDefault();e.stopPropagation();e.stopImmediatePropagation();theme_open_new_tab(link_type_convert(t.attr("href"),2),1)}}}).on("click",".mobile-menu-toggler",function(e){var t=$(this),n="opened",a="__logo",i="aside";if(!$(this).data(n)){$(this).data(n,1);plugins.navigation.update("webmail")}if($(i).hasClass("hidden-xs")){vars.navigation.opened=dayjs().unix();$(this).addClass("selected").find("button").addClass("btn-primary").removeClass("btn-default");if($("."+a+"")){$("."+a+"").css("transform","translate(0px, 0px)");setTimeout(function(){$("."+a+"").transition({y:"-140px"},vars.navigation.animation_speed*1.7)},1100)}t.css("transform","translate(0px, 0px)");$(i).css("transform","translate(0px, 0px)");$(i).removeClass("hidden-xs");$(""+i+", .mobile-menu-toggler").transition({x:settings_leftmenu_width},vars.navigation.animation_speed*1.7)}else{plugins.navigation.collapse()}}).on("click",'a[data-id^="csf_"], a[data-type^="csf_"]',function(e){get_bundle_csf()}).on("click",'a[href*="mysql"], a[href*="postgresql"]',function(e){get_bundle_sql()}).on("shown.bs.modal",".modal.in",function(){$(this).focus()}).on("click",".module-help",function(){popover_visibility_position($(this))}).on("click",".close-popover-trigger",function(e){$(e.target).parent().parent().not(this).popover("hide")}).on("change",'.ui_checked_columns:visible input[type="checkbox"], .ui_checked_columns:visible input[type="radio"]',function(e){var t=$(this).parents("tr.ui_checked_columns:visible");if(t.length&&t.find("input:first").is($(this))){if($(this).is(":checked")){t.addClass("hl-aw")}else{t.removeClass("hl-aw hl-aw-chk")}if(typeof v____timeout_cb_ck_row!=="undefined"&&typeof v____timeout_cb_ck_row==="number"){clearTimeout(v____timeout_cb_ck_row)}v____timeout_cb_ck_row=setTimeout(function(){typeof __r____changed==="function"&&__r____changed()},1)}}).on("click",".authentic_update:not(.disabled)",function(e){e.preventDefault();e.stopPropagation();var t=$(this),n=!tconfig_beta_updates?1:0,a=t.data("force")=="1"?1:0,i;var s=t.attr("data-stable");if(s&&s.length){n=s=="1"?1:0}var r=t.attr("data-version");i=r?r:false;theme.update(n,a,i)}).on("mousemove.tconf","#force_update_menu_cnt .dropdown-submenu.clickable.prelocked > a",function(e){var t="locked",n=$(this).parent(),a=n.parent().offset().left,i=n.width(),s=parseInt(e.pageX-a-i);if(s>-24){n.removeClass(t)}else{n.addClass(t)}}).on("click",".csf-submit",function(e){e.preventDefault();var t=$(this).data("id"),n="disabled";$("#"+t).submit();$(this).addClass(n).attr(n,n);spinnerfy_button_tiny($(this))}).on("change",".onchange_form_submit_triggger",function(e){e.preventDefault();if(get_onbeforeunload_status()){get_onbeforeunload_message(this,"$($eventData).parent('form').submit()","ev")}else{$(this).parent("form").submit()}}).on("click",".generate-password-key-g",function(){var e=$(this);(async function(){var t=await theme_password_generator(e);theme_copy_to_clipboard(t);plugins.messenger.post(''+theme_language("password_generator_new_success").replace("%password",' '+Convert.htmlEscape(t)+" "),10,"success","newGeneratedPassword")})()}).on("click",".messenger-message .messenger-message-inner tt",function(){if(check_selected_text()){return}theme_copy_to_clipboard($(this).text());plugins.messenger.post(''+theme_language("filemanager_copying_successful"),2,"success","newClipboardCopied")}).on("keydown",'form[action*="save_log.cgi"] input[name="filter"], form[action*="save_log.cgi"] input[name="lines"], form[action*="view_log.cgi"] input[name="filter"], form[action*="view_log.cgi"] input[name="lines"]',function(e){if(e.keyCode==13){e.preventDefault();var t=$("button.ui_submit.ui_form_end_submit");t.first().trigger("click");t.addClass("disabled")}}).on("click",'button, input[type="submit"], a',function(e){v___page_activeElement=this}).on("click","._c__op_d",function(e){if($(e.target).is(this)){var t=$(this).find(".opener_trigger").first()[0];t&&t.click()}}).on("click",'form[action*="save_user.cgi"] button[name="but_switch"], a[href*="virtual-server/switch_user.cgi"]',function(){v___theme_reload=1}).on("click",'[href*="javascript:history"]',function(e){if(v___theme_content_history){e.preventDefault();e.stopPropagation();v___theme_content_history=0;get_pjax_content(v___location_directory)}}).on("click",".ui_multi_select_row select[multiple] option",function(e){var t=$(this).parent("select"),n=t.parent("td"),a=n.parent("tr"),i=n.index(),s="onclick",r="["+s+'*="multi_select_move"]';if(!e.ctrlKey&&!e.metaKey&&!e.shiftKey&&!e.altKey&&(i===0||i===2)){a.find("td:eq(1)").find(""+r+"["+s+'*="'+(i?0:1)+'"]').trigger("click")}}).on("click",'.container-fluid a[href], .container-fluid button, .container-fluid input[type="button"], .right-side-tabs a[href], .right-side-tabs button, .right-side-tabs input[type="button"], .right-side-tabs .info-container .graph-container-fw, .right-side-tabs-dismiss i, .favorites-menu li a',function(){v___blocked_navigation=0;plugins.navigation.detectAllowed=true}).on("click","#content #system-status .panel-heading ._support_ticket_cnt",function(){var e=plugins.dashboard.system_info("markdown","allow-private-data"),t=function(e){var t="\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\x3c!---\n",n=session.server.data("hostname"),a=n?""+n+" system information":"System information";t+="BELOW TEXT CONTAINS YOUR SYSTEM INFORMATION AND SHOULD BE LEFT INTACT\n";t+="--\x3e\n";t+="\n
    \n\n---\n
    \n
    \n";t+=""+a+"\n\n";t+=e;t+="\n
    \n";t+="
    ";t+="\n\x3c!---\n";t+="SCROLL TO THE VERY TOP OF THE PAGE TO FILL YOUR TICKET\n";t+="--\x3e\n";return"https://forum.virtualmin.com/new-message?groupname=staff&"+"body="+Convert.uriEncodeComponent(t)+"%0A%0A%0A%0A"};var n=t(e);theme_copy_to_clipboard(n,true);!event_hold_modifer_pressed()&&theme_open_new_external_link(n)}).on("click","#content #system-status .panel-heading ._clipboard_sysinfo_cnt",function(){var e=plugins.dashboard.system_info(!event_hold_modifer_pressed()),t=session.server.data("hostname"),n=t?""+t+" system information":"System information",a="\n\n\x3c!---\n";a+="BELOW TEXT CONTAINS YOUR SYSTEM INFORMATION AND SHOULD BE EITHER LEFT INTACT OR EDITED WITH CARE\n";a+="--\x3e\n";a+="\n
    \n\n---\n
    \n
    \n";a+=""+n+"\n\n\n\n";a+=e;a+="
    \n";a+="
    ";a+="\n\x3c!---\n";a+="SCROLL TO THE VERY TOP OF THE PAGE TO FILL YOUR TICKET\n";a+="--\x3e\n";if(!vars.events.keypressed.shift){var i=function(e){return $('[data-id^="sysinfo_'+e+'"]').text()},s=i("webmin"),r=i("usermin"),o=i("virtualmin"),l=i("cloudmin"),c=i("authentic_theme"),d=i("os"),f=i("package_");a="| SYSTEM INFORMATION||\n";a+="|----------------------|---------------------------|\n";if(d){a+="| OS type and version | "+d+" |\n"}if(s){a+="| Webmin version | "+s+" |\n"}if(r){a+="| Usermin version | "+r+" |\n"}if(o){a+="| Virtualmin version | "+o+" |\n"}if(l){a+="| Cloudmin version | "+l+" |\n"}if(c){a+="| Theme version | "+c+" |\n"}if(f){a+="| Package updates | "+f+" |\n"}}theme_copy_to_clipboard(!event_hold_modifer_pressed()?a:e)}).on("click",'#extended_sysinfo-1 .panel-collapse[aria-labelledby="status-virtual-server-1"] a:not(.ui_link)',function(e){e.preventDefault();var t=$(this),n=t.attr("href"),a=t.parents(".panel").first();a.addClass("updating");if(t.hasClass("disabled")){return}t.addClass("disabled opacity-0_4");var i=t.find(".fa-refresh");if(i){i.addClass("fa-spin")}progress.start();$.ajax({type:"GET",url:n,data:false,statusCode:{200:function(){$.ajax({type:"GET",url:v___location_prefix+"/sysinfo.cgi?no-cache=1&no-query=string",complete:function(){a.removeClass("updating")},success:function(e){var t="#status-virtual-server-1-collapse",n=$(e).find(t).find(".panel-body");$('[data-dcontainer="1"]').find(t).find(".panel-body").replaceWith(n);progress.end()}})}}})}).on("mouseenter mouseleave","#extended_sysinfo-1 .panel.panel-default.ui-sortable-handle .panel-collapse > .panel-body",function(e){var t="#extended_sysinfo-1 .panel",n="draggable",a="data-"+n+"",i="true";if(e.type==="mouseenter"){$(""+t+"["+n+'="'+i+'"]').removeAttr(n).attr(a,i)}else{$(""+t+"["+a+'="'+i+'"]').removeAttr(a).attr(n,i)}}).on("click","[data-href-background]",function(e){e.preventDefault();var t=$(this).attr("data-href-background");progress.start();$.post(t,function(){plugins.slider.data.fetch();if(v___location_path&&v___location_path.indexOf("/sysinfo.cgi")>-1){page_refresh()}})}).on("click","#jsPanel-replacement-container > .jsPanel-replacement > .jsPanel-hdr",function(e){e.preventDefault();$(this).find(".jsPanel-btn-normalize").trigger("click")}).on("shown.bs.tab",'.nav.nav-tabs > li > a[data-toggle="tab"]',function(e){if(v___module===v___module_file_manager){return}$($.fn.dataTable.tables(true)).css("width","100%");$($.fn.dataTable.tables(true)).DataTable().columns.adjust();var t=$(e.target).attr("href");if(t){snippets.page.render_table_labels($(".tab-pane"+t+""))}plugins.page.format.columns(true)}).on("shown.bs.collapse",".panel > .panel-collapse",function(){snippets.page.render_table_labels($(this))});plugins.page.events.mousemove()};(function e(){if(session.server.data("navigation")&&browser.detect.internet_explorer()>5&&browser.detect.internet_explorer()<=11){setTimeout(function(){var e="

    "+theme_language("browser_warning")+"

    ";theme_alert(theme_language("global_warning"),e,false,"md","danger",false,"10 modal-ie-warning",0)},2e3);if(!String.prototype.endsWith){String.prototype.endsWith=function(e,t){var i=this.toString();if(typeof t!=="number"||!isFinite(t)||Math.floor(t)!==t||t>i.length){t=i.length}t-=e.length;var n=i.lastIndexOf(e,t);return n!==-1&&n===t}}if(!String.prototype.startsWith){if(!String.prototype.startsWith){String.prototype.startsWith=function(e,t){t=t||0;return this.indexOf(e,t)===t}}}}})();function addmodule(e){adduser(e);return false}function addgroup(e){adduser(e);return false}function adduser(e){$v__mpp__g_olt=0;$('.mppopup input[data-role="tagsinput"]').tagsinput("add",e);setTimeout(function(){if(!v__mpp__ml_t__e){$(".mppopup_filter_input").val("");$(".mppopup_filter_input").focus().trigger("keyup")}v__mpp__ml_t__e=0},440);return false}function addinterface(e){adduser(e);return false}function parentdir(e){if(e&&e.length>1&&e.endsWith("/")){e=e.replace(/\/$/,"")}fileclick(e,"1");$v__mpp__g_gp=1}function fileclick(e,t){$v__mpp__g_ol=e;$v__mpp__g_olt=t}function select(e,t){$data_mppopup_value.val(e);return false}function filter_match(e,t,i){t="";i=i||false;var n=function(e){e=e||false;var n=$(".mppopup table tbody tr");if(n.length>0){for(var a=0;a0){for(var s=0;s]*>/gi,"");if(_!==""){_=_.toLowerCase();if(_.match(e.toLowerCase())){a[s].style.display=""}}}}}}else{n(true)}}function tab_action(e,t){if(document.forms[0]&&document.forms[0][e]){document.forms[0][e].value=t}}function hidden_opener(e,t){if($("#"+e).parent(".opener_container").length===0){$("#"+e).wrapAll('
    ')}if($("#"+e).hasClass("opener_shown")){$("#"+e).parent(".opener_container").prev(".opener_extra_container.opener_extra_container_style").find(".opener_extra_container_a_style").removeClass("opener_container_opened").addClass("opener_container_closed");$("#"+e).parent(".opener_container").prev("p").find(".opener_extra_container_a_style").removeClass("opener_container_opened").addClass("opener_container_closed");$("#"+e).parent(".opener_container").parent("tr").prev("tr").find("td a:nth-child(1)").removeClass("opener_container_opened").addClass("opener_container_closed");$("#"+e).parent(".opener_container").show().find("#"+e).slideUp(0,function(){$("#"+e).removeClass("opener_shown").addClass("opener_hidden").parent('.opener_container:not(".opener_sub_container")').hide();$("#"+e).parent(".opener_sub_container").removeClass("margined-top -cnt-opened");$("#"+e).parents(".opener_table_style_small:first").removeClass("-tcnt-opened")})}else{var i=$("#"+e);i.parent(".opener_container").prev(".opener_extra_container.opener_extra_container_style").find(".opener_extra_container_a_style").addClass("opener_container_opened").removeClass("opener_container_closed");i.parent(".opener_container").prev("p").find(".opener_extra_container_a_style").addClass("opener_container_opened").removeClass("opener_container_closed");i.parent(".opener_container").parent("tr").prev("tr").find("td a:nth-child(1)").addClass("opener_container_opened").removeClass("opener_container_closed");i.slideUp(0).removeClass("opener_hidden").addClass("opener_shown").parent(".opener_container").slideDown(0).find(".opener_shown").slideDown(0,function(){plugins.page.format.columns(true)});i.parent(".opener_sub_container").addClass("margined-top -cnt-closed");i.parents(".opener_table_style_small:first").addClass("-tcnt-opened");snippets.page.render_table_labels(i)}}function select_mode(e){var t=$("aside form").length;for(i=0;i"),r=t.length;if(!s){var o=new RegExp(""+t+"(.*?>)"),l=e.match(o);if(l&&l[0]&&l[1]){r+=l[1].length}}var _=s?t.length:r,c=n?0:_,d=n&&i?i.length:0,f=e.indexOf(t);if(f===-1){return a}var u=e.indexOf(i,f),g=u===-1?e.length:u;if(!i){g=-1}var p=$.trim(e.slice(f+c,g+d));return p}function get_user_home(){var e=session.server.data("user-home"),t=e.match(/\/.*?\/[0-9]*\/\.(.*)/);if(t&&t[1]){e=t[1]}if(!e){if(typeof fm_user_data!=="undefined"){if(fm_user_data&&fm_user_data.home){e=fm_user_data.home}}}return e}function get_form_data(e){var t=e.attr("enctype")&&e.attr("enctype").indexOf("form-data")>-1?0:1;return t?e.serialize():new FormData(e[0])}function page_extended(){return v___location_file==="settings-logos.cgi"||v___location_file==="settings-logos_save.cgi"||v___location_file==="settings-backgrounds.cgi"||v___location_file==="settings-backgrounds_save.cgi"||v___location_file==="settings-editor_read.cgi"||v___location_file==="settings-editor_write.cgi"||v___location_file==="settings-favorites_save.cgi"?1:0}function check_bundle(e){if(Test.strContains(e,"/mysql/")||Test.strContains(e,"/postgresql/")){get_bundle_sql()}if(Test.strContains(e,"/"+v___module_file_manager+"/")){get_bundle_file_manager()}if(Test.strContains(e,"/csf/")){get_bundle_csf()}}function get_bundle_csf(e){load.bundle(v___server_extensions_path+"/csf/csf",1,e?["csf_init()"]:false,0)}function get_bundle_file_manager(e){load.bundle(v___server_extensions_path+"/file-manager/file-manager",0,e?["___f__tw()"]:false,0)}function get_bundle_sql(){load.bundle(v___server_extensions_path+"/sql",0)}function theme_open_new_external_link(e){var t="theme_open_new_link_ext";$("body").append('');$("#"+t).simulateUserClick().remove()}function theme_open_new_inner_link(e){var t="theme_open_new_link";$("body").append('');$("#"+t).simulateUserClick().remove()}function theme_open_new_tab(e,t){var i="theme_open_new_tab";if(t!==1){e=Test.strContains(e,v___location_origin)?e:v___location_origin+(e.startsWith("/")?e:"/"+e)}$("body").append('');$("#"+i).simulateUserClick().remove()}function theme_to_new_tab(){$.each($('a[href*="virtualmin-awstats/view.cgi?config="], .virtualmin-awstats a[href*="view.cgi?config="] '),function(){$(this).addClass("--to-new-tab")})}function theme_restore_buttons_class(){var e="data-class-restore";$.each($(".container-fluid ["+e+"]"),function(){var t="btn-xclass",i=$(this).attr(e);if($(this)[0]&&$(this)[0].classList){var n=$(this)[0].classList.value.match(/.*(btn-\S+)/);if(n){t=n[1];$(this).removeAttr(e);$(this).removeClass(t).addClass(i)}}})}function theme_reload(e){if(e){window.location.href=link_type_convert(v___location_resource,2)}else{window.location.href=location.origin+v___location_prefix}}function theme_update_notice(e){$.ajax({type:"POST",url:v___location_prefix+"/index.cgi?xhr-get_update_notice=1",complete:function(){e&&e.classList.remove("disabled")},success:function(e){if(!session.status(e)){return}var t=$(e).appendTo($("body"));t.modal("show")},error:function(e){}})}function theme_inject_tooltip(e,t,i,n,a,s,r,o,l,_){var c=v___initial_load?3e3:0,d=e;if(_){c=_}e=theme_language(e)||e;if(!t){t="body"}if(!i){i="auto top"}if(!n){n="tooltip"}if(!o){o="hover"}if(!a){a=vars.plugins.tooltip.delay.show}if(c){setTimeout(function(){var e=$('[data-target-tooltip-callback="'+d+'"]');e.attr("data-title",theme_language(d));e.attr("data-delay",'{"show":'+vars.plugins.tooltip.delay.show+', "hide":'+vars.plugins.tooltip.delay.hide+"}");e.tooltip({container:t,placement:i,sanitize:false,trigger:o,html:r?true:false,delay:{show:a,hide:vars.plugins.tooltip.delay.hide}})},c)}var f=String();if(s){var u=new RegExp("(?=\\"+s+")");e=e.split(u);e=e.join("
    ")}if(s||r){f=' data-html="true" '}a='{"show":"'+a+'", "hide":"'+vars.plugins.tooltip.delay.hide+'"}';if(l){return{container:t,placement:i,delay:a,toggle:n,title:e,html:f?true:false}}return' data-container="'+t+'" data-placement="'+i+"\" data-delay='"+a+"' data-toggle=\""+n+'" data-title="'+e+'" '+f+""}function theme_title_generate(e,t){var i=plugins.navigation.state.loading(),n=session.server.data("loading")==1?1:0;if(vars.page.locked){return}if((i||n)&&!vars.h.selector.content.get().hasClass("progressing")){setTimeout(theme_title_generate,100);return}if(!$.support.spa){return}var a=$("#headln2c").data("current-module-name"),s=$("#headln2c span[data-main_title]").text()||$('.panel-heading font[size="+2"]').text(),r=String(),o=r,l=$("aside select option:checked").text(),_=session.server.data("product")!=="webmin"?theme_language("theme_xhred_titles_um"):theme_language("theme_xhred_titles_wm"),c=Convert.strUpFirst(session.server.data("product")),d=v___title_initial;if(typeof d==="string"){d=d.replace(c,_)}var f=d?" — "+d:r,u=d?d+" — ":r,g=session.server.data("hostname"),p=session.server.data("user"),m=theme_language("titles_dashboard"),h=v___location_path_lead_unslashed==v___location_prefix_unslashed_trail_slashed+"sysinfo.cgi",v=$(".container-fluid > .error_40x");if(a&&a!==s&&!$t_uri_virtualmin&&!$t_uri_cloudmin){s=a+"/"+s}if(v___module==="csf"){s=theme_language("csf")}if(h){s=m}if(v.length){s=v.find("strong").text()}if(t){s=t}var b=" - "+s;if(settings_document_title==1){u=String()}if(settings_document_title==2){f=String()}if(settings_document_title==3){u=String();f=String()}if(settings_document_title==5){u=g+" - "+d+" — ";f=String()}if(settings_document_title==6){u=p+"@"+g+" - "+d+" — ";f=String()}if(settings_document_title==7){u=String();f=" — "+_}if(settings_document_title==8){u=g+" — ";f=String()}if(settings_document_title==9){u=p+"@"+g+" — ";f=String()}if(settings_document_title==4){if(e){return o}else{document.title=d}}else{if($('li.sub_active a[href*="'+v___module_file_manager+'"]').length){var x=v___module_file_manager;var y=$('body[class*="'+x+'"] .active form input#path').val();if(y){o=u+Convert.uriDecodeComponent(y)+" - "+$("li.sub_active a").text()+f;if(e){return o}else{document.title=o}}else{o=u+$("li.sub_active a").text()+f;if(e){return o}else{document.title=o}}}else if(($t_uri_virtualmin||$t_uri_cloudmin)&&l&&l.length&&!v.length){if(h){o=u+m+f;if(e){return o}else{document.title=o}}else if(s&&s.length){o=u+l+b+f;if(e){return o}else{document.title=o}}else{o=u+plugins.navigation.state.title()+f;if(e){return o}else{document.title=o}}}else{if(s&&s.length){o=u+s+f;if(e){return o}else{document.title=o}}else{o=d;if(e){return o}else{document.title=o}}}}var w=$(".right-side-tabs .list-group-item:not(.no-notifications, .opacity-0_3)").length;if(settings_side_slider_enabled&&settings_side_slider_notifications_enabled){titlenotifier.set(w)}else{titlenotifier.set(0)}}function link_type_convert(e,t){if(typeof e==="undefined"){return}if(e){e=e.replace(/([?&])(_pjax|_)=[^&]*/g,"")}if(t===1){e=e.replace("?"+$__theme_navigation+"","").replace("&"+$__theme_navigation+"","").replace("&"+$__theme_navigation+"","")}if(t===2){if(!Test.strContains(e,$__theme_navigation)){e=Test.strContains(e,"?")?e+"&"+$__theme_navigation:e+"?"+$__theme_navigation}}return e}function get_page_title_subtitle(e){var t=$("[data-sub_title]").text(),i=$('[data-main_title=""]').text(),n=i+(t?": "+t:String());return e?i:n}function get_pjax_push(){return true}function get_pjax_type(e){var t=String();if(e&&e.href){t=e.href.match(/([^\/]*)\/*$/)[1]}if(Test.string(e)){var i=e.replace(v___location_origin+v___location_prefix,""),n=i.replace(v___module,"").replace(/^\/+/g,""),a=$('form[action*="'+i+'"]:visible'),a=a.length?a:$('form[action="'+n+'"]:visible'),s=i.match(/\w+.cgi/gi),a=a.length||!s?a:$('form[action*="'+s[0]+'"]:visible'),r=a.attr("method"),o=a.attr("enctype");if(o==="multipart/form-data"){return"post"}else if(r){return r}else if(!r){var r=$('form[action="'+i+'"]').attr("method"),r=r?r:$('form[action="'+URI(i).filename()+'"]').attr("method"),l=$('form[action="'+i+'"]').attr("enctype");if(r||l){if(l==="multipart/form-data"){return"post"}else{return r}}else{return"get"}}}else if(typeof e=="object"&&$(e).is("form")){var _=e,c=_.attr("method");if(c){return c}else{return"get"}}return v___module==="csf"&&!$('.csf-container textarea[name="formdata"]').length||(t==="shell"||e===v___location_prefix+"/shell/"||e&&Test.strContains(e,".cgi?")&&!Test.strContains(e,"config.cgi?"))?"GET":"POST"}function get_default_send_headers(){return{"x-no-links":1,"x-client-paginate":theme_get_client_paginate(),"x-client-paginate-no-script":1,"x-color-palette-file":"quote-dark"}}function set_ajax_send_headers(e,t){for(const[t,i]of Object.entries(get_default_send_headers())){e.setRequestHeader(t,i)}}function set_pjax_send_headers(e,t){let i=get_default_send_headers();if(v___theme_night_mode_enabled||v___theme_night_mode){const e={"x-color-palette":"dark"};i={...i,...e}}const n={"x-navigation-type":typeof t==="object"&&t.type==="pjax:popstate"?"back_forward":typeof t==="object"&&t.originalEvent&&t.originalEvent.isTrusted?"navigate":"reload"};i={...i,...n};plugins.pjax.headers.send.set(i)}function get_pjax_content(e,t,i){plugins.navigation.detectAllowed=true;var n=typeof i=="undefined"||i===true||i==1?true:false;if(v___initial_load){n=false;if(e){window.history.replaceState(null,document.title,link_type_convert(e,2))}}if(get_onbeforeunload_status()){get_onbeforeunload_message(false,{href:e});return}set_pjax_send_headers(e);if(e&&unbuffered_header_processor_allow(e)){unbuffered_header_processor(e,0);return}t=typeof t=="object"?t:function(){},$type=$.isArray(t)?$("",{href:e})[0]:false;e=link_type_convert(e,1);$.pjax({url:e,timeout:0,push:n,type:get_pjax_type($type?$type:e),container:"[data-dcontainer]",fragment:"[data-dcontainer]",callback:t})}function get_pjax_event_end(e,t,i){if(!session.alive){return}if(t!=null){if(t.status){var n=$('div[data-dcontainer="1"]'),a=t.status.toString().startsWith("40"),s=t.status.toString().startsWith("50");if(a||s){$.pjax.cache(false,false,[n,link_type_convert(v___location_prefix+"/xerror",2),get_page_title_subtitle(1)]);vars.allow_ui_features=0;setTimeout(function(){vars.allow_ui_features=1},200);if(a){var r=extract_content(t.responseText,'
    ',"
    ",0);if(r){n.html(r)}}else if(s){var o=$(t.responseText).filter("h1").text(),l=$(t.responseText).filter("p").text(),_;_='
    ';_+=' '+t.status+" - "+o+"
    "+l+"\n";_+="
    ";n.html(_)}theme_title_generate();return}}}if(t==null||typeof t.responseText=="undefined"){return}var c=t.getResponseHeader("Content-Disposition");if(c&&c.toLowerCase().indexOf("attachment")!==-1){return}var d=t.responseText.match(""),f;if(d&&d[0]){f=(new DOMParser).parseFromString(d[0],"text/html");f=f.querySelector("html").attributes}else{return}f&&$(f).each(function(e,t){if(this.nodeName!=="id"){if($.support.spa&&this.nodeName==="data-redirect"&&this.nodeValue&&this.nodeValue.length>0&&this.nodeValue!="/"&&this.nodeValue!="/?"+$__theme_navigation&&this.nodeValue!=location.origin+v___location_prefix+"/"&&this.nodeValue!=location.origin+v___location_prefix+"/?"+$__theme_navigation&&(!Test.strContains(this.nodeValue,"://")||Test.strContains(this.nodeValue,location.host))){vars.previous_request=String();vars.source_request=String();mail_page_check(this)}if(this.nodeName==="data-language"){var i=session.server.data("uri"),n=session.server.data("language"),a=this.nodeValue;if(a&&n&&n!==a){if(i&&i.match(/change-user|webmin\/edit_lang|\/language\//)){$.post(v___location_prefix+"/index.cgi/?xhr-theme_clear_cache=1");setTimeout(function(){plugins.navigation.reload()},300)}}}if(this.nodeName==="data-locale"){var s=session.server.data("uri"),r=session_server_data_locale(),o=this.nodeValue;if(o&&r&&r!==o){if(s&&s.match(/change-user|webmin\/edit_lang|\/language\//)){dayjs.locale(this.nodeValue)}}}if(this.nodeName!="data-level"&&this.nodeName!="data-access-level"){session.server.data(this.nodeName,this.nodeValue)}if(this.nodeName==="data-slider-fixed"){if(vars.slider.pinned!==-1){session.server.data(this.nodeName,vars.slider.pinned)}}if(this.nodeName==="data-navigation-collapsed"){if(vars.navigation.pinned!==-1){session.server.data(this.nodeName,vars.navigation.pinned)}}}}).promise().done(function(){plugins.pjax.headers.set(t);if(!core.curModule("mailboxes")&&uri_parse("directory",session.server.data("data-uri")).indexOf("/mailbox")>-1&&(!uri_parse("file",session.server.data("data-uri"))||uri_parse("file",session.server.data("data-uri")).indexOf("index.cgi")>-1)){mail_load(session.server.data("data-uri"));page_init();return false}plugins.page.events.register();get_pjax_event_end_funcs(1,false,i);$.each($(".container-fluid img"),function(){var e=$(this),t=e.attr("src");if(t&&!Test.strContains(t,"//")&&!t.startsWith("/")){e.attr("src",v___location_directory_trail_slashed+t)}});unbuffered_header_post(t);if(e){var n=$(e.relatedTarget),a=n.attr("href"),s=n.parent().is("[data-linked], .favorites-dcontainer, .menu-exclude.ui-sortable-handle");if(s&&(Test.strContains(a,"/mysql/")||Test.strContains(a,"/postgresql/"))||(Test.strContains(v___module,"mysql")||Test.strContains(v___module,"postgresql"))){typeof f__ex__mysql_runner==="function"&&f__ex__mysql_runner()}if(s&&Test.strContains(a,"/csf/")||Test.strContains(v___module,"csf")){if(typeof csf_init==="function"){csf_init()}else{get_bundle_csf("init")}}}})}function get_pjax_event_end_funcs(e,t,i){page_init();var n=function(){if(e&&v___module===v___module_file_manager&&v___location_file!=="config.cgi"&&v___location_file!=="mconfig.cgi"){page.handle.content.preloader.show()}if(v___module_file_manager){if(get_access_level()!=0){plugins.slider.state(0)}}if(!e){session.server.data("data-script-name",v___location_path);session.server.data("data-uri",v___location_resource);var t=new RegExp("^"+v___location_prefix,"i");v___module=session.server.data("data-uri").replace(t,"").split("/").filter(function(e){return e.length!==0})[0];session.server.data("data-module",v___module);setTimeout(function(){session.server.data("data-title-initial",$("#headln2c span[data-main_title]").text());snippets.page.render(1);despinnerfy_buttons();if($t_uri_virtualmin){plugins.navigation.intersect.virtualmin(location.href)}else if($t_uri_cloudmin){plugins.navigation.intersect.cloudmin(location.href)}},0)}};if(t){var a=function(){if(session.server.data("loading")){setTimeout(a,100)}else{n();plugins.navigation.detect()}};setTimeout(a,0);return}else{n()}if(!i&&e&&Test.strContains(v___location_directory,v___module_file_manager)){if(typeof ___f__tw==="function"){if(v___location_file==="config.cgi"||v___location_file==="mconfig.cgi"){___f__tw()}else{setTimeout(function(){___f__tw()},100)}}else{get_bundle_file_manager(1)}}if(!core.curModule("csf")){session.server.data("post",0,1)}e&&snippets.page.render(0);$(".tooltip").tooltip("hide");$(".popover").popover("hide");theme_title_generate();plugins.navigation.detect();e&&vars.h.selector.content.get().scrollTop(0);setTimeout(function(){var e=v___page_container.find("form:visible:first"),t=e.find('input:visible:not([readonly]):not([disabled]):not([type="radio"]):not([type="checkbox"]), textarea:visible:not([readonly]):not([disabled])');if(t.length&&!t.parents(".ui_buttons_table").length&&v___location_file!=="config.cgi"&&v___location_file!=="uconfig.cgi"&&v___location_file!=="tconfig.cgi"){if(vars.page_user_inactive&&(v___location_file==="domain_form.cgi"||Test.strContains(v___location_query,"new=")||e&&e.length&&(e.attr("action").startsWith("create")||e.attr("action").startsWith("add")||e.attr("action").startsWith("new")))){if(t&&t.val().length===0){try{isElemInView(t[0])&&t[0].focus()}catch(e){}}}}},400);if(e&&!core.curModule(v___module_file_manager)&&!core.curModule("csf")&&v___location_file!=="tconfig.cgi"){page.handle.content.preloader.hide()}}function get_pjax_action_submit(e,t){var i=typeof t=="undefined"||t===true||t==1?true:false;if(get_onbeforeunload_status()){return}vars.previous_request_progressive=e;if(e&&e.target&&e.target.action&&unbuffered_header_processor_allow(e.target.action)){unbuffered_header_processor(e,1);return}var n=$(e.currentTarget),a=Test.strContains(n.attr("enctype"),"multipart/form-data"),s=String(),r=String(),o=!a?n.serialize():String(),l=n.find('[type="submit"]'),_=$(quirks.active_element()),c=_.is('[type="submit"]')?_:l.length===1?l:false;if(c&&!a){s=c.attr("name");r=c.val()||$.trim(c.text());o=s&&o&&o.includes(s+"=")?true:false;if(s&&r&&!o){$('').attr({type:"hidden",class:"hidden-force",name:s,value:r}).appendTo(n)}}vars.previous_request=e;vars.source_request=v___location_resource;vars.previous_request_progressive=String();v___theme_connection_triggered_origin=1;set_pjax_send_headers(e.target.action,e);$.pjax.submit(e,"[data-dcontainer]",{timeout:0,push:i,type:get_pjax_type(e.target.action),fragment:"[data-dcontainer]"})}function get_pjax_action_click(e,t,i){var n=typeof i=="undefined"||i===true||i==1?true:false;if($(t).attr("href")==undefined){return}var a=$(t).attr("href");if(a&&(a.includes("!edit")||a.includes("!view"))){e.preventDefault();var s=snippets.parser.fileviewer.getSuffix(false,1),r=s[0],o=s[1],l=s[2],_=s[3],c=s[4],d=s[5],f=s[6],u=s[7],g=s[8],p=a.includes(d),m=a.includes(f);isHead=a.includes(u);isTail=a.includes(g);if(p){a=a.replace(r,"").replace(o,"").replace(l,"").replace(_,"").replace(c,"").replace(d,"").replace(f,"").replace(u,"").replace(g,"")}var h=a.replace("!edit ","").replace("!view ",""),v=h.split("\\").pop().split("/").pop(),b=h.replace("/"+v,"");progress.start();if(p){edit_file(v,b||"/",false,1,0,m,isHead,isTail)}else{edit_file(v,b||"/")}return}if($(e.target).is(".gl-icon-select")){e.preventDefault();$(t).trigger("contextmenu");return}set_pjax_send_headers(t.href,e);vars.previous_request_progressive=t.href;if(t&&t.href&&unbuffered_header_processor_allow(t.href)){e.preventDefault();unbuffered_header_processor(t.href,0);return}if(e&&!e.shiftKey&&!e.ctrlKey&&!e.metaKey){$(t).attr("href",link_type_convert($(t).attr("href"),1))}if(e&&(e.shiftKey||e.ctrlKey||e.altKey||e.metaKey)){setTimeout(function(){despinnerfy_buttons()},400)}v___theme_connection_triggered_origin=1;if(e.target.href&&$(e.target).hasClass("page_footer_submit")&&e.target.href.includes(".cgi/")&&!e.target.href.includes("/link.cgi/")){var x=URI(e.target.href),y=x.directory();if(y&&y.includes(".cgi")){var w=y.split("/");w=w.filter(function(e){return!e.includes(".cgi")});w=w.join("/");e.target.href=e.target.href.replace(y,w)}}$.pjax.click(e,{timeout:0,push:n,type:get_pjax_type(t),container:"[data-dcontainer]",fragment:"[data-dcontainer]"});vars.previous_request=e;vars.previous_request_progressive=String()}function get_onbeforeunload_message($eventData,$thisData,$justEval){var popovers=$(".popover.in"),are_there_popovers=popovers.length,delay=are_there_popovers?120:0,before_onload_class_prompt="bootbox-o__f_m-beforeclose-prompt";if(are_there_popovers){popovers.popover("hide")}setTimeout(function(){if($("."+before_onload_class_prompt+"").length){return}var save_prompt=bootbox.dialog({message:""+theme_language("global_unbeforeunload_message")+"",title:'   '+theme_language("global_unbeforeunload_title")+"",buttons:{main:{label:'   '+theme_language("global_cancel")+"  ",className:"btn-default vertical-align-top margined-left--2",callback:function(){despinnerfy_buttons();plugins.navigation.detect();plugins.navigation.select.back()}},danger:{label:'   '+theme_language("global_continue")+"  ",className:"btn-danger vertical-align-top margined-left--2",callback:function(){set_onbeforeunload_status(0,0);set_onbeforeunload_status(0,1);if(vars.ajax.progressing){progressive_request.abort()}try{if(typeof v___location_file==="string"){if(v___location_file.includes("tconfig.cgi")){theme.config.current.reset()}}}catch(e){}if($justEval==="ev"){eval($thisData);return}else{$.each($justEval,function(func,params){var caller=func.includes(".")?eval(func):window[func];caller.apply(null,params)})}var switchStr="::switch::";if($thisData&&$thisData.href&&Test.strContains($thisData.href,switchStr)){$('.switch-toggle input[id="'+$thisData.href.replace(""+switchStr+"","")+'"]').trigger("click");return}var $is_form=$($thisData).is("form");if(!$is_form){if($thisData.href&&$thisData.href.length){get_pjax_content($thisData.href,false)}}else if($is_form){get_pjax_action_submit($eventData)}}}},onEscape:function(){despinnerfy_buttons();plugins.navigation.detect()}});save_prompt.on("shown.bs.modal",function(){var e=$(this);setTimeout(function(){e.find('[data-bb-handler="danger"]').focus()},0)})},delay)}function get_onbeforeunload_status(){return $('.container-fluid > .panel > .panel-body[data-unload-warning="1"]').length||$('html[data-unload-warning="1"]').length}function set_onbeforeunload_status(e,t){var i=t?"html":".container-fluid > .panel > .panel-body",n="data-unload-warning";if(e){$(i).attr(n,"1")}else{$(i).removeAttr(n)}}function set_onbeforeunload_status_native(e){var t="html",i="data-unload-error";if(e){$(t).attr(i,"1")}else{$(t).removeAttr(i)}}function get_onbeforeunload_status_native(){return $('html[data-unload-error="1"]').length}function theme_panels_sort(e){var t,i;if(e==="slider"){t="#right-side-tabs .extended-list-data > .panel-group#extended_sysinfo";i=""+t+" > .panel"}else if(e==="dashboard"){t="#extended_sysinfo-1.panel-group";i=""+t+" > .panel.panel-default"}else{return}if(!$(t).length){return}if(typeof settings_sysinfo_panels_order==="string"){if(settings_sysinfo_panels_order==="[object Object]"){settings_sysinfo_panels_order={}}else{settings_sysinfo_panels_order=settings_sysinfo_panels_order.replace(/'/g,'"');settings_sysinfo_panels_order=JSON.parse(settings_sysinfo_panels_order)}}if(!$.isEmptyObject(settings_sysinfo_panels_order)){for(var n in settings_sysinfo_panels_order){$(t).find('.panel[data-referrer="'+n+'"]').attr("data-sorter",settings_sysinfo_panels_order[n])}}settings_sysinfo_panels_order=JSON.stringify(settings_sysinfo_panels_order);var a=$(i).sort(function(e,t){return $(e).attr("data-sorter")>$(t).attr("data-sorter")?1:-1}).appendTo(t)}function theme_cache_clear(e){theme.veiled(1);plugins.messenger.post(''+theme_language("clear_cache_initiated")+" "+theme_language("global_please_wait")+'   ',0,"info","themeUpgrade",0);typeof stats!=="undefined"&&stats.general.disable();$.post(v___location_prefix+"/index.cgi/?xhr-theme_clear_cache=1");set_onbeforeunload_status(0,0);localStorage.clear();$(".right-side-tabs-dismiss .fa-trash, .right-side-tabs-dismiss .fa-refresh").trigger("click");e&&spinnerfy_buttons($(e),[1.5,-33,"small",1e3]);setTimeout(function(){theme_reload()},1e3)}async function theme_password_generator(e){var t=e.find(".fa"),i=e.outerHeight()<=28?"fa-0_90x line-height-11 margined-left--1 margined-right-0":"fa-0_90x line-height-11 margined-right--2",n="fa fa-spin fa-reload fa-spin-fast";e.find(n.replace(/fa/g,".fa").replace(/\s+/g,"")).remove();var a=$('').appendTo(e),s="pointer-events-none";t.addClass(s);t.hide();const r=await $.ajax({type:"POST",url:v___location_prefix+"/index.cgi?xhr-gennewpass=get",data:false,dataType:"text"});a.remove();t.show();t.removeClass(s);if(!r){var o="15|a-z,A-Z,0-9,#",l=o.split("|")[1].split(","),_=parseInt(o.split("|")[0]),c="",d="";if($.inArray("a-z",l)>=0){c+="abcdefghijklmnopqrstuvwxyz"}if($.inArray("A-Z",l)>=0){c+="ABCDEFGHIJKLMNOPQRSTUVWXYZ"}if($.inArray("0-9",l)>=0){c+="0123456789"}if($.inArray("#",l)>=0){c+="![]{}()%&*$#^<>~@|"}for(var f=0;f<_;f++){d+=c.charAt(Math.floor(Math.random()*c.length))}return d}return r}function get_cookie(e){var t=e+"=";var i=document.cookie.split(";");for(var n=0;n-1){o=o.split("~");e=o[0];s=o[1]}$.each($(t).find(i),function(){var r=$(t).find(i).parents(".btn-group.ui_links_row");if(r.length){r.contents().unwrap()}if($(this).parents(t).hasClass("f__lnk_t_btn")&&!Test.strContains(n,"---forced")){return}if(l){var o=new RegExp(RegExp.quote(l),"g");$(this).parent().replaceText(o,_?_:"")}if(n&&n.indexOf("__center__")>-1){$(i).parent().addClass("text-center").addClass("f__lnk_t_btn-el")}var c=" vertical-align-baseline",d=false;if(a&&a.includes("no-vt-al")){c=""}if(a&&a.includes("no-btn-text")){d=true}$(this).html(e+(""+$(this).text().replace(/\.\.$/,"")+"
    ")+s).addClass(n).addClass("f__lnk_t_btn-el").removeClass("ui_link").prepend(a?''+(d?"":"  ")+"":"");$(this).parent(t).addClass("f__lnk_t_btn");$(this).parent("label").addClass("f__lnk_label_cnt").parent("td").addClass("f__lnk_td_cnt")})})}})}function theme_toggle_night_mode(){var e=$("body .user-link.palette-toggle"),t=e.find(".fa-sun").length?0:1,i=session.server.data("data-night-mode"),n=session.server.data("data-default-theme"),a="gainsboro",s=$("input, textarea").is(":focus");if($.support.spa&&s){return}if(!$.support.spa){return}if($("body").find(".modal.in:visible").length){return}var r=function(){var e=v___location_path_lead_unslashed==v___location_prefix_unslashed_trail_slashed+"sysinfo.cgi"&&$(".__page .piechart").length;if(e){$.each($(".piechart"),function(){$(this).addClass("bg-filter-blur-grayscale-invert-opacity75").data("easyPieChart").update(0)});setTimeout(function(){get_pjax_content(v___location_prefix+"/sysinfo.cgi")},100)}theme.config.save()};if(t===1){e.find(".fa-moon").removeClass("fa-moon").addClass("fa-sun");progress.start();$(document).find(".settings_navigation_color_toggle").addClass("hidden");var o=$("html").find('head link[href*="palettes"][data-palette]');var l=document.styleSheets.length+1;$("html").find("head").append('');$("html").find("head").append('');var _=function(e){var t=function(){session.server.data("data-theme","gunmetal");o.remove();session.server.data("data-bgs","nightRider");session.server.data("data-night-mode",1);v___theme_night_mode_enabled=1;v___theme_night_mode=1;settings_force_night_mode=v___theme_night_mode;if(!(v___location_path_lead_unslashed==v___location_prefix_unslashed_trail_slashed+"sysinfo.cgi"&&$(".__page .piechart").length)){setTimeout(function(){progress.end()},201)}r()};var i=document.styleSheets;try{if(!i[e]||!i[e].cssRules[0]){setTimeout(function(){_(e)},200);return}}catch(e){if(e.name!=="SecurityError"){setTimeout(function(){t()},800);return}return}t()};_(l)}else{$("body").find(".settings_navigation_color_toggle").removeClass("hidden");e.find(".fa-sun").removeClass("fa-sun").addClass("fa-moon");var c=$("html").find('head link[href*="gunmetal"]');session.server.data("data-default-theme")!="blue"&&$("html").find("head").append('');session.server.data("data-theme",n);c.remove();session.server.data("data-bgs",a);session.server.data("data-night-mode",0);$("html").find('head link[href*="nightrider"]').remove();v___theme_night_mode_enabled=0;v___theme_night_mode=0;settings_force_night_mode=v___theme_night_mode;r()}if(typeof CKEDITOR=="object"&&CKEDITOR.instances){for(var d in CKEDITOR.instances){setTimeout(function(){editor_html_palette(CKEDITOR.instances[d].document,t)})}}setTimeout(function(){theme_page_iframes(null,t)},t?200:0)}function theme_spinner_small(e,t,i){e=e||"in-btn-md";t=t||"dark";i=i||"width:12px; height:12px; margin-right: 7px;";return''}function despinnerfy_buttons(){var e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:0,t=arguments.length>0&&arguments[1]!==undefined?arguments[1]:0,i=t?t:$(".btn.disabled");$.each(i,function(){var t=$(this),i=t.find(".cspinner_container, .cspinner_custom"),n=i.prev("i.invisible, i.hidden-force");!e&&t.removeClass("disabled");n.removeClass("invisible hidden-force");i.remove()})}function despinnerfy_button(e){var t=e.find(".cspinner_container, .cspinner_custom"),i=t.prev("i.invisible, i.hidden-force");e.removeClass("disabled");i.removeClass("invisible hidden-force");t.remove()}function spinnerfy_buttons(e,t,i,n,a){var s=e.attr("onclick")&&e.attr("onclick").indexOf("blank")!==-1||e.parents("form").attr("target")&&e.parents("form").attr("target").indexOf("blank")!==-1?true:false,r=e.hasClass("heighter-28"),o=e.css("height")=="28px",l=e.hasClass("btn-tiny"),_=e.hasClass("btn-lg")||e.css("height")=="35px",c=e.outerHeight(),d=parseInt(c/(l?5:r||o?4.4:_?3.6:4))+(browser.detect.firefox()?0:0);d+=r||o?.5:0;var f=e.find(".fa, .fa2").first().outerWidth(),u=parseInt(f/(l?1.6:r||o?1.15:_?1.4:1.3))-.5,g=e.find(".fa"),p='span class="cspinner_container" style="position: absolute; top: '+d+"px; left: "+u+'px;">',x="<"+p+'>';if(l){b="<"+p+'>',x="<"+p+'>'}setTimeout(function(){!s&&e.addClass("disabled")},10);if(g.length&&!s){var y=function(){if(e.hasClass("btn-default")){g.addClass("invisible").after(x)}else{g.addClass("invisible").after(b)}};if(a){e.addClass("disabled");y()}else{setTimeout(function(){y()},10)}}typeof i==undefined?i=false:false;typeof n==undefined?n=false:false;if(v[3]||i){setTimeout(function(){e.removeClass("disabled");g.removeClass("invisible");e.find(".cspinner_container").remove()},i?i:v[3])}if(n){setTimeout(function(){progress.end()},400)}}function spinnerfy_button_tiny(e){var t=theme_spinner_small("margined-top--1 cspinner_custom","white","width: 8px; height: 8px; margin-right: 5px; border-width: 1px;");e.find(".fa").first().addClass("hidden-force").after(t)}function theme_language(e,t){typeof t=="undefined"?t=false:false;var i="theme_xhred_"+e,n=v___theme_language;if(t){var a=Convert.arrFlip(n);return a[$.trim(i)]||a[$.trim(e)]}else{var s=n[i]||n[e];if(s&&platform.detect()==="mac"){s=s.toString();s=s.replaceAll("Ctrl +","⌘ +");s=s.replaceAll("Alt +","⌥ +");s=s.replaceAll("Ctrl+","⌘+");s=s.replaceAll("Alt+","⌥+");s=s.replaceAll("Shift+","⇧+");s=s.replaceAll("+Shift","+⇧")}return s}}function theme_copy_to_clipboard(e,t){var i=function(e){var t="tmp-clipboard-obj";$("body").append('');var i=new ClipboardJS("."+t+"");$("."+t+"").trigger("click").remove();i.destroy()};if(t){i(e)}else{try{navigator.clipboard.writeText(e)}catch(t){i(e)}}}function theme_post_event_handler(e,t){if(!t._isKeyCombo&&t._isHuman){var i=$(quirks.active_element());if(i&&i.length&&i.is('input[type="text"], .ui_textbox, textarea, .ui_textarea')){return}plugins.dashboard.events("support-header-icon",e,t);plugins.dashboard.events("copy/paste-header-icon",e,t);plugins.messenger.events("message-user-select",e,t);snippets.page.events(e,t)}}function theme_post_event_window_state_activated(e){theme.visibility.set(true);e==="focus"&&theme_window_focused();plugins.dashboard.events("reset");snippets.page.events("reset")}function theme_post_event_window_state_deactivated(e){theme.visibility.set(false)}function get_utc_offset(){return session.server.data("time-offset")}function check_reboot(){if(core.curModuleFile("init","reboot.cgi")&&!document.querySelector('.container-fluid [action="reboot.cgi"]')){setTimeout(function(){connection_error({status:0,reboot:1},1,{body:theme_language("connection_reboot_details"),title:theme_language("connection_reboot"),icon:"refresh-mdi"});vars.pjax.post_reboot=true},1e3)}}function xhr_response_text_to_html(e){var t=null;if(typeof e==="object"){var i=e.responseText;if(typeof i==="string"&&i){try{var n=new DOMParser,a=n.parseFromString(i,"text/html"),s=$($(a).find("body"));if(s&&s.length){var r=s[0].childNodes;if(r&&r.length){t=$(r).add(s);return t.length?t:null}}}catch(e){}}}return t}function connection_error(e,t,i,n){var a=function(e){var t=vars.previous_request,i=typeof t==="object"&&t.currentTarget&&t.currentTarget.action&&t.currentTarget.action.toString().includes(e);return i};if(core.curModule("webmin")&&a("/change")||core.curModuleFile("acl","list_sessions.cgi")){return}if(theme_error_connection_reset(e)){return}var s=vars.previous_request_progressive;if(typeof s==="object"){s=$(s.target).serialize();if(v___location_file==="update.cgi"&&s.includes("mode=updates")&&s.includes("u=webmin")){return}}if(e&&e.status===500&&vars.ajax.progressing||n&&n.url&&n.url.includes("/stats")&&a("/wizard")){return}var r=function(e,t){var i=String(),n=xhr_response_text_to_html(e);if(n&&(n.filter("p").length||t&&n.find("[data-fatal-error-text]").length)){var a=$.trim(n.filter("p").html())||$.trim(n.find("[data-fatal-error-text]").html());if(a){var s=a.replace(/\n/g," ").match(/(.*)\sat\s\/|(.*)/);if(s){i=" – "+Convert.htmlStrip(s[2]||s[1])}}}return i};var o=r(e);if(e.status===502&&o&&o.includes("tree.cgi")){return}progress.end();v___theme_ajax_error=1;if((v___theme_connection_triggered_origin===1||t)&&(e.status===0||e.status===400||e.status===404||e.status===500||e.status===502||e.status===503)){var l="modal-connection-warning",_="hidden.bs.modal",c=e;if(vars.pjax.post_reboot){vars.pjax.post_reboot=false}if(!$("."+l).length&&!this.called){this.called=1;$.ajax({context:this,type:"GET",url:v___location_prefix+"/index.cgi/?xhr-error=1",data:false,dataType:"text",timeout:3e3,success:function(){this.called=0},error:function(){var e=theme_language("connection_error_details").replace("%server",location.host+v___location_prefix),t=theme_language("connection_lost"),n="unplugged",a="danger";var s="virtual-server",r="_domain.cgi",o="_form.cgi",d=core.curModuleFile(s,"wizard.cgi"),f=$('.container-fluid form[action*="wizard.cgi"]'),u="wizardinputdefdommanual",g=f.find('input[type="radio"][name="defdom"], input[type="text"][name="defhost"]').length===3||f.find("#"+u+"").length,p=core.curModuleFile(s,"edit"+r+"")||core.curModuleFile(s,"save"+r+"")||core.curModuleFile(s,"delete"+r+"")||core.curModuleFile(s,"cert"+o+"")||core.curModuleFile(s,"rename"+o+"")||core.curModuleFile(s,"rename.cgi")||core.curModuleFile(s,"domain"+o+"")||core.curModuleFile(s,"domain_setup.cgi")||core.curModuleFile(s,"letsencrypt.cgi")||d;if(p){var m=theme_language("theme_xhred_connection_error_details_ssl");m=m.replace("",'');var h="[data-ssl-warning-fixer]",v="click.sslwarn";$("body").off(v,h).on(v,h,function(e){e.preventDefault();var t=560,i=300;window.open(""+(location.origin+v___location_prefix)+"/?xnavigation=ERR_CERT_AUTHORITY_INVALID","net::ERR_CERT_AUTHORITY_INVALID","menubar=no,location=no,resizable=no,scrollbars=no,status=no,width="+t+"px,height="+i+"px").focus()});e=e.replace("
      ","
      • "+m+"
      • ");if(g){if(d){f.find('input:not([type="submit"]):not([name="step"])').removeAttr("name").removeAttr("id");$("").attr({type:"hidden",name:"defdom",id:u,value:0}).appendTo(f)}}}if(i){e=i.body;t=i.title;n=i.icon;l+=" modal-reboot",a="warning"}var b="loading-dots",x=new Date;x=dayjs(x.toISOString()).format(config_portable_theme_locale_format_full);var y='"+x)+'">';if(c.reboot){y=String()}theme_alert(t+''+y,e,false,"md",a,""+n+" fa-lg","7 "+l+"",0);setTimeout(function(){$("."+l+" ."+b+" + .fa").tooltip({placement:"auto bottom",trigger:"hover",html:true,delay:{show:vars.plugins.tooltip.delay.show,hide:vars.plugins.tooltip.delay.hide}})},150);setTimeout(function(){if(v___theme_connection_reestablish===0){connection_reestablish();v___theme_connection_reestablish=1;this.called=0;$("."+l).on(_,function(){v___theme_connection_reestablish=0;progress.end();if(g){var e=f.find('input[name="parse"]').prev('button[name="parse"]');e.length&&e.trigger("click")}if(p){plugins.navigation.reload()}})}},1);setTimeout(function(){plugins.navigation.load.stop();plugins.navigation.detect();plugins.navigation.switch.reset();despinnerfy_buttons();plugins.shell.unlock()},100)}})}}else{var d=r(e,true),f=String();if(e.status===413){var u=theme_wiki_link("global_error_more_details_online","https://github.com/authentic-theme/authentic-theme/wiki/Error:--413---Request-Entity-Too-Large");if(u){f=".
        "+u}}var g=String();if(n&&n.url){g="  — "+n.url+""}if(e.status!==200){e.status&&plugins.messenger.post(''+(theme_language("global_error")+":  "+e.status+" - "+e.statusText+""+d+f+g),10,"error","ajaxError");setTimeout(despinnerfy_buttons,400)}else if(d){theme_error_disk_quota_exceeded(d)}}}function theme_error_connection_reset(e){if(e.status===0&&e.readyState===4&&e._errConnectionReset===true){plugins.messenger.post({type:"error",icon:"fa fa-plug",id:"connection_error_200_reset",title:theme_language("connection_reset_title"),message:theme_language("connection_reset_message"),layout:1,displayMode:1,position:"bottomCenter",cancel:true,timeout:0});return true}return false}function theme_error_disk_quota_exceeded(e){if(e&&(e.toString().toLowerCase().includes("no space left on")||e.toString().toLowerCase().includes(": disk quota exceeded"))){plugins.messenger.post({type:"error",icon:"fa2 fa2-disk fa-1_25x",id:"connection_error_200_disk_quota_error",title:theme_language("disk_quota_error_title"),message:theme_language("disk_quota_error_message"),layout:1,displayMode:1,position:"bottomCenter",cancel:true,timeout:0});return true}return false}function theme_wiki_link(e,t){var i=theme_language(e),n=i.match(/%1(.*)%1/);if(n){var a=new RegExp(n[1],"g");i=i.replace(/%1/g,String()).replace(a,'
        '+n[1]+"");return i}else{return String()}}function connection_modal_close(){var e="modal-connection-warning";$("."+e).modal("hide");v___theme_connection_reestablish=0}function connection_reestablish(){var e="modal-connection-warning";$("."+e).length&&$.ajax({type:"GET",url:v___location_prefix+"/index.cgi/?xhr-check=1",data:false,timeout:1e3,dataType:"text",success:function(){$("."+e).removeClass("modal-reboot");$("."+e).find(".modal-header").removeClass().addClass("modal-header background-success background--bordered").find("h4").html('   '+theme_language("connection_success"));$("."+e).find(".modal-body").html("

        "+theme_language("connection_success_details")+"

        ");if(vars.pjax.post_reboot){get_pjax_content(v___location_prefix+"/sysinfo.cgi",["success",connection_modal_close]);vars.pjax.post_reboot=false;vars.previous_request=String()}else{setTimeout(function(){connection_modal_close()},300)}},error:function(){v___theme_connection_reestablish&&setTimeout(function(){connection_reestablish()},1e3)}})}function control_server_theme_temp_data(e,t,i,n,a,s){return $.ajax({type:"POST",url:v___location_prefix+"/index.cgi/?xhr-theme_temp_data=1&xhr-theme_temp_data_action="+e+"&xhr-theme_temp_data_name="+t+"&xhr-theme_temp_data_value="+(i?Convert.uriEncodeComponent(i):i)+"&xhr-theme_temp_data_keep="+n+"",data:false,dataType:"text",success:function(e){if(!session.status(e)){return}if(typeof a==="function"&&(!e.length||e.length&&s===1)){a()}},error:function(e){}})}function get_server_theme_temp_data(e,t,i,n){return control_server_theme_temp_data("get",e,false,t,i,n)}function set_server_theme_temp_data(e,t,i,n,a){control_server_theme_temp_data("set",e,t,i,n,a)}function page_control_header(){var e=".header",t="#headln2l",i="#headln2c",n=$(""+e+" "+t+""),a=$(""+e+" "+i+"");if(matchMedia("(max-width: 767px)").matches){if(n.next().is(i)){var s=a.detach();n.before(s)}}else{if(a.next().is(t)){var s=a.detach();n.after(s)}}}function page_display(){var e=$("body"),t=$("body").find(".container-fluid"),i=$("head");t.css({opacity:1,"pointer-events":"auto"});e.css("overflow","auto");i.find("#__tmp_no_overflow").remove()}function page_remove_progress(){var e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:0;despinnerfy_buttons(e);setTimeout(function(){get_server_theme_temp_data("redirected",0)},100);setTimeout(function(){progress.end()},600)}function page_adjust(e,t){if(typeof $.injectCSS=="function"){$("style[data-persist]").remove();t?t="translate("+t+"px, 0px) !important":t=false;$.injectCSS({"#sidebar":{left:-e+"px",width:e+"px",transform:t},".switch-toggle":{width:e+"px"},".__page":{"margin-left":e+"px !important"},".autocomplete-suggestions":{"min-width":e-23+"px !important"},".__logo":{width:e+"px","max-width":e+"px"},"#jsPanel-replacement-container":{left:($.support.spa?settings_leftmenu_width-1:-2)+"px"}});if($("aside select").length&&core.curModuleFile("webmin","edit_themes.cgi")&&!$.browser.mobile){$("aside select[data-autocomplete-title]").attr("style","width:"+(e-24)+"px; margin-top: 0 !important");plugins.navigation.select.load()}}}function theme_modal_dismiss(){$(".modal.in").find("[data-dismiss]").trigger("click")}function theme_shortcut_check(e){if(!e.endsWith("/")){e+="/"}if(!e.startsWith("/")){e="/"+e}if(core.moduleAvailable(URI(e).directory().replace(/\//g,""))){return true}else{return false}}function theme_shortcuts_generate(e){var t,i=theme_shortcuts_modifier_name();if(e==="conf"){var n=settings_hotkey_open_module_config_privileged,a=n==="dot"?".":n==="comma"?",":n;t="("+i+" + "+a.toString().toUpperCase()+")"}else{t="("+i+" + "+e.toString().toUpperCase()+")"}return t}function theme_shortcuts_modifier_name(e){var t,i=e||settings_hotkey_toggle_modifier,n=platform.detect()==="mac";if(n){if(i==="ctrlKey"){t="⌃"}else if(i==="altKey"){t="⌥"}else if(i==="shiftKey"){t="⇧"}else if(i==="metaKey"){t="⌘"}}else{if(i==="ctrlKey"){t="Ctrl"}else if(i==="altKey"){t="Alt"}else if(i==="shiftKey"){t="⇧"}else if(i==="metaKey"){t="Meta"}}return t}function theme_shortcuts_modifier_unique(e){var t=["ctrlKey","altKey","shiftKey","metaKey"],i=t.indexOf(settings_hotkey_toggle_modifier),n=false;t.splice(i,1);t.map(function(t){if(e[t]&&!n){n=true}});return!n}function theme_modifiers_replace_for_mac(e,t,i){if(e&&platform.detect()==="mac"){if(t&&i){e=e.replaceAll(t,i)}e=e.replaceAll("Ctrl","⌃");e=e.replaceAll("Alt","⌥");e=e.replaceAll("Meta","⌘");e=e.replaceAll(" + "," ")}return e}function theme_shortcuts(e){var t=e.keyCode?e.keyCode:e.which,i=String.fromCharCode(e.which).toLowerCase(),n=String.fromCharCode(e.which);if(!settings_hotkeys_active){return}if(e.ctrlKey&&e.altKey&&i===settings_hotkey_duplicate_window_privileged){set_server_theme_temp_data("goto",link_type_convert(v___location_href,1),0,function(){theme_open_new_tab(v___location_href)},1)}if(Test.editing()||$(".modal-backdrop.in").length||$(".__page").hasClass("single-page")){return}if(e.altKey){if(e.which===37||e.which===39){let t="ui_link_pagination",i="disabled",n=$("."+t+"_left:not(."+i+"):visible"),a=$("."+t+"_right:not(."+i+"):visible");if(e.which===37&&n.length){n.click()}else if(e.which===39&&a.length){a.click()}}}if(e.which===settings_hotkey_theme_help_keycode){theme.help.show();e.preventDefault();return}if(vars.page_interaction===0){if(t===8&&e.shiftKey){window.history.forward();return}else if(t===8){window.history.back();return}}if(settings_hotkeys_active){var a=theme_shortcuts_modifier_unique(e);if(e.ctrlKey&&e.altKey&&e.metaKey&&e.shiftKey&&n=="R"){!theme.veiled(-1)&&theme_cache_clear()}if(get_access_level()===0&&e.ctrlKey&&e.altKey&&e.shiftKey&&e.metaKey&&n=="U"){!theme.veiled(-1)&&theme.update(0)}if(i==settings_hotkey_open_module_config_privileged||settings_hotkey_open_module_config_privileged==="dot"&&e.which===190||settings_hotkey_open_module_config_privileged==="comma"&&e.which===188){e.preventDefault();if(vars.events.keypressed.shift){$('aside .user-links a[href*="config.cgi"]').trigger("click")}else{$('.container-fluid > .panel > .panel-heading a[href*="config.cgi"]').trigger("click")}}if(!a){return true}if(!session.alive){e.preventDefault();return}if(e[settings_hotkey_toggle_modifier]){if((e.which===37||e.which===39)&&v___location_file&&(v___location_file.toString().includes("config.cgi")||v___location_file.toString().includes("edit_tmpl.cgi"))){var s=$('.container-fluid .ui_form[action*="config.cgi"], .container-fluid .ui_form[action*="edit_tmpl.cgi"]'),r=function(e){return'button[name="'+e+'"]:not(.disabled)'};s.find(e.which===37?r("nprev"):r("nnext")).trigger("click")}if(n=="1"&&settings_hotkey_custom_1_user){e.preventDefault();theme_shortcut_check(settings_hotkey_custom_1_user)&&get_pjax_content(v___location_prefix+settings_hotkey_custom_1_user)}if(n=="2"&&settings_hotkey_custom_2_user){e.preventDefault();theme_shortcut_check(settings_hotkey_custom_2_user)&&get_pjax_content(v___location_prefix+settings_hotkey_custom_2_user)}if(n=="3"&&settings_hotkey_custom_3_user){e.preventDefault();theme_shortcut_check(settings_hotkey_custom_3_user)&&get_pjax_content(v___location_prefix+settings_hotkey_custom_3_user)}if(n=="4"&&settings_hotkey_custom_4_user){e.preventDefault();theme_shortcut_check(settings_hotkey_custom_4_user)&&get_pjax_content(v___location_prefix+settings_hotkey_custom_4_user)}if(n=="5"&&settings_hotkey_custom_5_user){e.preventDefault();theme_shortcut_check(settings_hotkey_custom_5_user)&&get_pjax_content(v___location_prefix+settings_hotkey_custom_5_user)}if(n=="6"&&settings_hotkey_custom_6_user){e.preventDefault();theme_shortcut_check(settings_hotkey_custom_6_user)&&get_pjax_content(v___location_prefix+settings_hotkey_custom_6_user)}if(n=="7"&&settings_hotkey_custom_7_user){e.preventDefault();theme_shortcut_check(settings_hotkey_custom_7_user)&&get_pjax_content(v___location_prefix+settings_hotkey_custom_7_user)}if(n=="8"&&settings_hotkey_custom_8_user){e.preventDefault();theme_shortcut_check(settings_hotkey_custom_8_user)&&get_pjax_content(v___location_prefix+settings_hotkey_custom_8_user)}if(n=="9"&&settings_hotkey_custom_9_user){e.preventDefault();theme_shortcut_check(settings_hotkey_custom_9_user)&&get_pjax_content(v___location_prefix+settings_hotkey_custom_9_user)}if(i==settings_hotkey_focus_search){e.preventDefault();$(".form-control.sidebar-search").focus()}if(i==settings_hotkey_toggle_key_webmin){e.preventDefault();$('.switch-toggle input[id="open_webmin"]').trigger("click")}if(i==settings_hotkey_toggle_key_virtualmin){e.preventDefault();$('.switch-toggle input[id="open_virtualmin"]').trigger("click")}if(i==settings_hotkey_toggle_key_cloudmin){e.preventDefault();$('.switch-toggle input[id="open_cloudmin"]').trigger("click")}if(i==settings_hotkey_toggle_key_usermin){e.preventDefault();$('.switch-toggle input[id="open_usermin"]').trigger("click")}if(i==settings_hotkey_toggle_key_webmail){e.preventDefault();$('.switch-toggle input[id="open_webmail"]').trigger("click")}if(i==settings_hotkey_toggle_key_night_mode){e.preventDefault();theme_toggle_night_mode()}if(i==settings_hotkey_navigation&&window.matchMedia("(min-width: 1080px)").matches){e.preventDefault();$('aside [data-collapse-trigger="1"]').addClass("m").trigger("click")}else if(i==settings_hotkey_navigation){$(".mobile-menu-toggler:visible").trigger("click")}if(i==settings_hotkey_slider&&window.matchMedia("(min-width: 1366px)").matches){e.preventDefault();$('[data-trigger="side_slider_pinned"]').trigger("click")}else if(i==settings_hotkey_slider){$(".right-side-tabs-toggler:visible").trigger("click")}if(i==settings_hotkey_toggle_slider){e.preventDefault();$(".right-side-tabs-toggler:not(.hidden) .btn-menu-toggler").trigger("click")}if(i==settings_hotkey_reload&&$('.user-links a[data-refresh="true"]')){e.preventDefault();page_refresh()}if((i==settings_hotkey_shell||i==settings_hotkey_shell2)&&theme_shortcuts_modifier_unique(e)&&plugins.shell.available()){e.preventDefault();if(session.server.data("terminal")==1){if(plugins.shell.status()){plugins.terminal.close()}else{plugins.terminal.open()}}else{if(plugins.shell.status()){plugins.shell.close()}else{plugins.shell.open()}}return}if(i==settings_hotkey_sysinfo){e.preventDefault();if(plugins.navigation.switch.dashboard.get()==true){plugins.navigation.switch.dashboard.set()}else{get_pjax_content(v___location_prefix+"/sysinfo.cgi")}}if(i==settings_hotkey_favorites){e.preventDefault();if($(".favorites-menu-outer").css("left")!="0px"){$(".user-link.favorites").trigger("click")}else{$(".favorites-menu-outer").removeClass("hover")}}}else{if(e.keyCode===191){e.preventDefault();$(".form-control.sidebar-search").focus()}}return false}}function sysinfo_replace_dismiss_buttons(){var e=$('#system-status [onclick*="webmin/hide.cgi?id"], #right-side-tabs [onclick*="webmin/hide.cgi?id"], [data-referrer^="announce"] [onclick*="webmin/hide.cgi?id"]');$.each(e,function(){var e=$(this).attr("onclick"),t=$(this).text();if($(this).is("input")){t=$(this).val()}$(this).before(' '+t+"");$(this).remove()});var t=$('#system-status [onclick*="window.open"][onclick*="_new"], #right-side-tabs [onclick*="window.open"][onclick*="_new"], [data-referrer^="announce"] [onclick*="window.open"][onclick*="_new"]');$.each(t,function(){var e=$(this).attr("onclick"),t=$(this).text();if($(this).is("input")){t=$(this).val()}var i="btn-primary",n=e.split('"')[1],a="fa fa-fw fa-external-link";if(n.includes("pa"+"t"+"r"+"eo"+"n")){a="fa2 fa-fw fa2-kiss-wink-heart-bold";i="btn-success"}$(this).before(' '+t+"");$(this).remove()})}function get_access_level(){if(vars.level!=""&&vars.level!==-1){return parseInt(vars.level)}else{return parseInt(session.server.data("level"))}}function theme_updating(){return theme_message_exists("themeUpgrade")}function theme_message_exists(e){return plugins.messenger.toast.get(e)}function theme_message_dismiss(e){return plugins.messenger.toast.hide(e)}function theme_message_and_unlock(e,t){var i=arguments.length>2&&arguments[2]!==undefined?arguments[2]:1;var n=arguments.length>3&&arguments[3]!==undefined?arguments[3]:String();var a=arguments.length>4&&arguments[4]!==undefined?arguments[4]:"info";var s=arguments.length>5&&arguments[5]!==undefined?arguments[5]:3;var r=arguments.length>6&&arguments[6]!==undefined?arguments[6]:0;plugins.messenger.post(''+theme_language(""+t)+" ",s,a,n,r);setTimeout(function(){page_remove_progress(i)},600)}function theme_alert(e,t,i,n,a,s,r,o){typeof i==="undefined"||i==false?i=false:false;typeof n==="undefined"||n==false?n="md":false;typeof a==="undefined"||a==false?a="danger":false;typeof s==="undefined"||s==false?s="exclamation-triangle":false;typeof r==="undefined"||r==false?r="7":false;typeof o==="undefined"||o==false?o=false:false;var l=$.isArray(i)?i:[false,false],_="modal-global-notification",c=""+'"+"";setTimeout(function(){if(!$("body").hasClass("modal-open")){$("body").append(c);$("."+_).modal("show");$("."+_).on("click",".modal-body a.label",function(e){$("."+_).modal("hide")});$("."+_).on("hidden.bs.modal",function(e){$("."+_).remove()})}},o)}function get_module_title(){$_right_menu_title=$("#headln2c");if($_right_menu_title.find("span[data-main_title]").text().length){return $_right_menu_title.find("span[data-main_title]").text()}else{if($_right_menu_title.text().length){return $_right_menu_title.text().text()}else{return"->"}}}function editor_background_save(e,t){if($('.container-fluid textarea[name="data"],'+'.container-fluid textarea[name="text"],'+'.container-fluid textarea[name="directives"],'+'.container-fluid textarea[name="manual"]').length===1&&$('.container-fluid textarea[name="data"],'+'.container-fluid textarea[name="text"],'+'.container-fluid textarea[name="directives"],'+'.container-fluid textarea[name="manual"]').parents("form").find('input[type="submit"]').length===1){if(!$(".CodeMirror").length){return}function i(){if(typeof __cm_editor_static!="undefined"){$(".container-fluid > .panel > .panel-body").attr("data-cm-line",""+__cm_editor_static.getCursor().line+","+__cm_editor_static.getCursor().ch+"").attr("data-cm-state",$('[data-form="submitter"]').hasClass("btn-warning")&&!$('[data-form="submitter"]').next("button").hasClass("disabled"))}}var n=$(document.body),a=".container-fluid > .panel > .panel-body",s=$(""+a+' textarea[name="data"], '+a+' textarea[name="text"], '+a+' textarea[name="directives"], '+a+' textarea[name="manual"]').parents("form"),r=s.find('button[type="button"]').length?s.find('button[type="button"]'):s.find('input[type="submit"]'),o='  ',l=$(""+a+' textarea[name="directives"]').length?"-12px":"0",_=$(""+a+" select").val()?$(""+a+" select").val():$(".container-fluid .table-title").text()?$(".container-fluid .table-title").text():$(".container-fluid .panel-body tt:first").text()?$(".container-fluid .panel-body tt:first").text():$(".container-fluid #headln2c tt:first").text()?$(".container-fluid #headln2c tt:first").text():"";$(a+" .ui_reset").remove();$(a).addClass("magic-editor-container");r.parents("table.ui_form_end_buttons").prev("br").remove();r.parents("table.ui_form_end_buttons").prev("div.table-responsive").attr("style","margin-bottom: -4px !important");r.replaceWith(' ");var c=$(""+a+' button[type="button"]:not(.ui_form_end_submit)'),d=$(""+a+' button[type="submit"]:not(.ui_form_end_submit)'),f=window["__cm_editor_static"],u='button[type="submit"]:not(.disabled)',g='button[data-form="submitter"]:not(.disabled)';f.on("change",function(e,t){__cm_editor_static.save();c.addClass("btn-warning").removeClass("btn-success").attr("data-form-onbeforeunload",1);i()});n.off("mousedown.cm1").on("mousedown.cm1",""+a+" .CodeMirror",function(e){i()}).off("keydown.cm1").on("keydown.cm1",function(e){var t=e.keyCode?e.keyCode:e.which,i=$(""+a+' button[type="button"]:not(.ui_form_end_submit)'),n=i.not(".disabled"),s=$(""+a+' button[type="submit"]:not(.ui_form_end_submit)'),r=s.not(".disabled");if(i.find(".cspinner_container").length||s.find(".cspinner_container").length){e.preventDefault();return}if((t==13||t==83)&&f&&f.hasFocus()){if(t==83){var o=platform.detect()==="mac"?e.metaKey:e.ctrlKey;if(!e.shiftKey&&o){e.preventDefault();if(n.length){n.trigger("click")}}else if(e.altKey&&o&&e.shiftKey&&r.length){e.preventDefault();r.trigger("click")}}else{if(o&&e.shiftKey&&r.length){r.trigger("click")}else{if(o&&n.length){n.trigger("click")}}}}}).undelegate(u,"click.cm").on("click.cm",u,function(e){set_onbeforeunload_status(0,0);$(this).addClass("disabled").find(".fa.fa-arrow-circle-o-left").addClass("invisible");spinnerfy_buttons($(this));c.attr("data-form-onbeforeunload",0)}).undelegate(g,"click.cm").on("click.cm",g,function(e){e.preventDefault();var t=$(this),i=t.parents("form"),n=i.attr("enctype")&&i.attr("enctype").indexOf("form-data")>-1?0:1,r=n?i.serialize():new FormData(i[0]);$(this).addClass("disabled").find(".fa.fa-floppy-o").addClass("invisible");spinnerfy_buttons($(this));theme_message_dismiss("magic_save_error");theme_message_dismiss("magic_save_success");setTimeout(function(){$.ajax({type:"POST",url:s.attr("action"),data:r,dataType:"text",cache:false,contentType:false,processData:false,success:function(e){if(!session.status(e)){return}c.removeClass("btn-warning").addClass("btn-success").attr("data-form-onbeforeunload",0);$("button").removeClass("disabled").find(".fa").removeClass("invisible").parent().find(".cspinner_container").remove();$(a).attr("data-cm-state","false");set_onbeforeunload_status(0,0);if($(e).find(".panel-body > hr + h3").length&&!$(e).find(".panel-body .table").length&&!$(e).find(".panel-body form[action]").length){plugins.messenger.post(''+$(e).find(".panel-body hr + h3").html(),60,"error","magic_save_error");c.removeClass("btn-success").addClass("btn-warning").attr("data-form-onbeforeunload",1);$(a).attr("data-cm-state","true");return}plugins.messenger.post(''+theme_language("filemanager_file_saved").replace("%value",_),3,"success","magic_save_success")},error:function(e){}})},300)});editor_config_search(t)}}function filter_out_objects_inner_chars(e,t,i){i=i?i:"";if(e.is("input")){var n=e.val();if(n){e.val(e.val().replace(t,i))}}else{var a=e.html(),s=e.text();if($.trim(a).length&&$.trim(a).length!==$.trim(s).length){var r=String(),o=a.match(/(.*?<.*?>.*?)(.*?)(<\/.*?>.*?)/gm);if(o&&o.length){$.each($(o),function(e,n){if(typeof n==="string"&&n&&n.length){var a=n.match(/(.*?<.*?>.*?)(.*?)(<\/.*?>.*?)/);if(a&&a[0]&&a[1]&&a[3]){r+=a[1]+(!a[2]?"":a[2].replace(t,i).replace(/\s/g," "))+a[3]}}});e.html(r)}}else if(s&&s.length){e.html(s.replace(t,i).replace(/\s/g," "))}}}function editor_config_label(e){var t=".panel-body form select",i=$(t),n=i.prev("b"),a=n.text(),s=i.prev('input[type="submit"]'),r=theme_language("editing_config_file"),o=function(e){if(e){e=e.replace(":","")}return e};if(e){if(s.length){a=o(s.val())}else{a=o(a)}r=a}var l=""+r+":  ";if(n.length){n.replaceWith(l)}else if(s.length&&s.index()===0){s.replaceWith(l)}}function editor_config_search(e){var t="dropdown-editor_config_search",i="data-search-in-files-button",n="["+i+"]",a="data-clear-search",s="["+a+"]",r="search-in-files",o='[data-name="'+r+'"]',l="data-search-in-results",_="data-search-in-results-container",c="."+t,d="data-external-detach",f="."+t+" + ["+d+"]",u=".panel-body form .select2",g="data-search-in-files-icon-find",p=theme_spinner_small(),m="data-no-results-initial",h="data-search-stats",v=0;editor_config_label();setTimeout(function(){var e=$(u),d=e.prev("select"),b=d.attr("name"),x=e.parents("form").attr("action");e.addClass("z-index-10001");if(d.find("option").length<=1){return}e.parents("form").addClass("text-nowrap");if(!$(c).length){e.after('
        ');setTimeout(function(){var e=uri_parse_param("editor_search");if(e){$(o).val(e).trigger("keydown");setTimeout(function(){$(n).removeClass("disabled").trigger("click")})}})}function y(){$("["+m+"]").removeClass("showing-results");$(c).find("span.fa").removeClass("text-warning")}function w(){$("["+m+"]").addClass("showing-results");$(c).find("span.fa").addClass("text-warning")}function k(e){if(e){$("["+h+"]").addClass("hidden")}else{$("["+h+"]").removeClass("hidden")}}$(f).on("click",function(e){e.preventDefault();var t="disabled";if($(this).hasClass(t)){return}$(this).addClass(t);var i=$(this).parents("form").find("select").val();i&&edit_file_from_full_path(i)});var C=$("["+_+"]");C.find("a").on("click",function(e){e.preventDefault();var t=$(this).attr("data-href")+C[0].scrollTop;if(get_onbeforeunload_status()){get_onbeforeunload_message(false,{href:t})}else{get_pjax_content(t)}});$(c).find("li").on("click",function(e){e.stopPropagation()});$(c).on("show.bs.dropdown",function(){var e=$(u).prev("select").prev('input[type="submit"]'),t=-1,i=$(u).width();if(i<360){t+=$(u)[0].offsetLeft-(e.length?14:11)}var n=t+i+$(c).width();$(this).find(".dropdown-menu").css("min-width",n).css("max-width",n).css("width",n);var a=$(this).parents("form").outerWidth(),s=$(this)[0].offsetLeft;if(s"+'Line: '+i[1][1]+""+''+i[0]+""+""+i[1][0].replace(a,""+$.trim(e)+"")+""+""}).promise().done(function(){i.append(n);i[0].scrollTop=0;i.find("a").on("click",function(e){e.preventDefault();var t=$(this).attr("data-href")+i[0].scrollTop;if(get_onbeforeunload_status()){get_onbeforeunload_message(false,{href:t})}else{get_pjax_content(t)}});var t=jQuery.unique(s).length;var a;if(s.length===1&&r===1){a=theme_language("find_in_config_files_result_found_single")}else if(s.length===1&&r>1){a=theme_language("find_in_config_files_result_found_multi")}else{a=theme_language("find_in_config_files_results_found")}a=a.replace("$1",r).replace("$2",t).replace("$3",""+e+"");$("["+h+"]").html(a)})}else{i.append(""+theme_language("filemanager_search_no_matches").replace(".","")+"");k(1);$(c).find("span.fa").removeClass("text-warning")}},complete:function(){$("["+g+"]").removeClass("hidden")},error:function(e){session.status(e.responseText)}})})})}function page_resized(){plugins.navigation.lock();if(!$(".mobile-menu-toggler").hasClass("selected")&&$("html").attr("data-navigation-collapsed")!="1"){$("aside").addClass("hidden-xs");$("aside").css("transform","translate("+settings_leftmenu_width+"px, 0px)");if(typeof jQuery().transition=="function"&&($(".__logo")&&!$(".mobile-menu-toggler:visible").length)){$(".__logo").transition({y:"-140px"},700,function(){})}else{if($(".__logo")){$(".__logo").css("transform","translate(0px, 0px)")}}}plugins.slider.test()}function theme_config_controls(e){var t=$("#atsave, #save_user");if(e){set_onbeforeunload_status(1,0);t.addClass("btn-warning")}else{set_onbeforeunload_status(0,0);t.removeClass("btn-warning")}}function theme_select_adjust_width(e){var t=parseInt(Math.random()*1e6),i=e.find("option:selected").text(),n=$("","",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 n=r(i),s=$(a).find("td").length;if(s===0&&a){a=a.replace("thead","tbody");a=a.replace("",''+theme_language("datatable_semptydirectory")+"")}t=n+''+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,n=$(i).filter("table").html();m(''+n+"
        ","",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:s,file:l}}();plugins.navigation=function(){document.addEventListener("DOMContentLoaded",function(){r();c();n();$("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*="server-manager/bwgraph.cgi"], a[href*="history.cgi"]',function(e){e.preventDefault();e.stopPropagation();window.open($(this).attr("href"),"_blank")}).on("contextmenu auxclick",".switch-toggle label",function(e){const t=this;e.preventDefault();if(t._processing){return}t._processing=true;setTimeout(function(){t._processing=false},99);var a=$(this).attr("for").replace("open_",""),i=$(this).prev("input").is(":checked");if(i){var n=v___location_href;set_server_theme_temp_data("goto",link_type_convert(n,1));setTimeout(function(){theme_open_new_tab(n)},200)}else if(a==="virtualmin"||a==="cloudmin"){var s;if(a==="cloudmin"){s="/server-manager/index.cgi"}else{s="/virtual-server/index.cgi"}var o=link_type_convert(s,2);set_server_theme_temp_data("goto",link_type_convert(o,1));setTimeout(function(){theme_open_new_tab(o)},200)}else if(a==="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}A($(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(){f("c",false)}).on("blur",".sidebar-search",function(){setTimeout(function(){f("c",true)},150)}).on("click",'.navigation a[target="page"], .user-links a[target="page"]',function(){l()}).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"),n=$(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((typeof settings_navigation_auto_fold_category=="undefined"||settings_navigation_auto_fold_category)&&!e.is(n)){e.removeClass("active");if(e.find("a").attr("href")!="#search"&&a){$(e.find("a").attr("href")).slideUp(vars.navigation.animation_speed)}}})).done(function(){n.hasClass("active")?n.removeClass("active"):a!="#hide"&&!i?n.addClass("active"):false;setTimeout(function(){if($(a).is(":visible")&&a!="#hide"&&!i){n.addClass("active")}else{n.removeClass("active")}$processing=false},2*vars.navigation.animation_speed>0?2*vars.navigation.animation_speed:1);$(a).slideToggle(vars.navigation.animation_speed)});if(a=="#search"){$('#sidebar input[name="search"]').focus()}}}).on("click",".navigation > li.has-sub",function(){page.load.happening()&&(plugins.navigation.detectAllowed=false)}).on("click",".navigation > li > ul.sub > li:not([data-link-inactive]):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){page.load.happening()&&(plugins.navigation.detectAllowed=false);$(".__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(),n=$("body").find(".-shell-port-");if(i&&e.keyCode===13){e.preventDefault();if(!i.startsWith("!")){$(this).find('input[name="title"]').remove();var s=z(1),o=theme_language("search_in_"+(s==="mailbox"?"usermin":s)+"");o=o?o:theme_language("filemanager_context_search");$("").attr({type:"hidden",name:"title",value:o}).appendTo($(this));var r=$(this).attr("action")+"?"+$(this).serialize();if(get_onbeforeunload_status()){get_onbeforeunload_message(false,{href:r})}else{get_pjax_content(r);a.val("")}}else{if(core.moduleAvailable("xterm")){var l=i.includes("!edit ")||i.includes("!editor "),c=i.includes("!view ")||i.includes("!viewer ");if(l||c){var _=i.replace("!edit ","").replace("!editor ","").replace("!view ","").replace("!viewer ",""),d=_.split("\\").pop().split("/").pop(),f=_.replace("/"+d,"");plugins.navigation.collapse();progress.start();if(c){edit_file(d,f||"/",false,1,0)}else{edit_file(d,f||"/")}}else{plugins.terminal.open(i)}}else if(core.moduleAvailable("shell")){plugins.shell.open(i)}}}}).on("click","[data-collapse-trigger]",function(e){e.stopImmediatePropagation();var t=session.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){session.server.data("data-navigation-collapsed",1);$(".mobile-menu-toggler").removeClass("visible-xs");l()}else{session.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()){if(session.server.data("terminal")==1){plugins.terminal.open()}else{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)}).on("click",".servers-index-link > a",function(e){e.preventDefault();e.stopPropagation();progress.start();location.href=this.href}).mCustomScrollbar({axis:"y",theme:"minimal",scrollInertia:250,scrollButtons:false,advanced:{autoScrollOnFocus: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")}}if($(".popover-servers-index:visible").length){$('aside [data-servers-index="popover"]').trigger("click")}}}});$("body").on("click",".popover-servers-index.in .popover-content a",function(e){e.preventDefault();progress.start();location.href=this.href})});var e=function(){var e=".navigation",t=typeof settings_navigation_auto_fold_category=="undefined"||settings_navigation_auto_fold_category;t&&$(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();t&&$(e+" > li.has-sub").removeClass("active");t&&$(e+" > li > ul.sub").hide();t&&$(e+" > li > a > i.fa.fa-folder-open-o").removeClass("fa-folder-open-o")},t=function(t,a){if(v___theme_pjax_call===0){return}if(Z()){return}var i=function(e){return e?e.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").replace("/save_domain.cgi","/edit_domain.cgi"):e};var n=false,s=function(){n=false;if(!plugins.navigation.detectAllowed){return}typeof t=="undefined"&&(n=true);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 s=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+)/),n=e.match(/.*?\.cgi/);if(i&&i[1]&&i[2]&&n){a='a[href*="'+n[0]+'"][href*="'+(i[1]+"="+i[2])+'"]'+t+""}}return a},o=v___location_path==="/"?t:v___location_path+(v___location_query?"?"+v___location_query:"");if(v___initial_load&&!o){return}if(!o){o="/"}$nearExactMatchStatus=1,$superExactMatchStatus=0,$nearExactMatch=$('.navigation a[href*="'+o+'"]:not([data-parent-hidden]):first'),$nearExactMatchPostSave=$(".navigation "+s(o.replace("save_","edit_"))),$nearExactMatchPostList=$(".navigation "+s(o.replace("edit_","list_"))),$nearExactMatchPostListSingular=$(".navigation "+s(o.replace("edit_","list_").replace(".cgi","s.cgi"))),$nearExactMatchPostListPlural=$(".navigation "+s(o.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||t,"cgi")&&$nearExactMatch.length){t=$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){t=v___location_resource;$superExactMatchStatus=1}else if($('.navigation a[href^="'+v___location_resource+'"]:not([data-parent-hidden]):first').length){t=v___location_resource;$nearExactMatchStatus=0}t=i(t);var r=v___location_file==="config.cgi"||v___location_file==="uconfig.cgi",l=v___location_file==="mconfig.cgi"&&uri_parse_param("module")===v___module_file_manager;if(r&&!l){if($t_uri_virtualmin&&!core.curModule("virtualmin-awstats")){t=v___location_prefix+"/config.cgi?virtual-server"}else if($t_uri_cloudmin){t=v___location_prefix+"/config.cgi?server-manager"}else if($t_uri_webmail){t=v___location_prefix+"/uconfig.cgi?mailbox"}else{t=v___location_prefix+"/"+v___location_query+"/"}}if(l){t=v___location_prefix+"/"+v___module_file_manager}var c=$t_uri_webmin||$t_uri_usermin;if(!t&&c){if(Test.strContains(v___location_file,".cgi")&&!Test.strContains(v___location_file,"sysinfo.cgi")){t=v___location_path.replace(v___location_file,"")}else if(!t){var _=new RegExp("^"+v___location_prefix,"i");t=session.server.data("data-uri").replace(_,"").split("/").filter(function(e){return e.length!==0})[0];t=v___location_prefix+"/"+t}}if($superExactMatchStatus){targeted_menu_link=$('.navigation a[href="'+t+'"]:not([data-parent-hidden]):first, .navigation a[href="'+link_type_convert(t,2)+'"]:not([data-parent-hidden]):first')}else{if(t&&(t.endsWith("/virtual-server/")||t.endsWith("/server-manager/"))){t+="index.cgi"}targeted_menu_link=$('.navigation a[href^="'+t+'"]:not([data-parent-hidden]):first')}if(targeted_menu_link.length){e()}}else{var d=".navigation a[href",f=":not([data-parent-hidden]):first";if(a==="progress"){t=i(t);targeted_menu_link=$(""+d+'*="'+t+'"]'+f+"")}else{targeted_menu_link=$(""+d+'^="'+t+'"]'+f+"")}if(targeted_menu_link.length){e()}}$("aside .navigation .fancytree-node.fancytree-active").removeClass("fancytree-active");if(t==="/"){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")};s();n&&setTimeout(s,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();c();n();bind_sameorigin(1);theme_to_new_tab();s()},n=function(){vars.navigation.servers_index_control=false;var e=$('aside [data-servers-index="popover"]'),t=e.parent(),a=t.data("http-webmin-servers");if(e.length){vars.navigation.servers_index_control=true;$.ajax({type:"GET",url:a+"index-json.cgi",dataType:"JSON",success:function(i){var n="",s=session.server.data("data-webprefix");if(i&&i.length>1){t.removeClass("hidden");$.each(i,function(){if(!s.endsWith(this.id)){n+=' '+Convert.htmlEscape(this.host)+(this.desc?" ("+Convert.htmlEscape(this.desc)+")":"")+"
        "}});n&&e.popover({animation:"false",placement:"top",html:"true",container:"body",template:'
        ',trigger:"click",content:n});e.on("shown.bs.popover",function(){$(".popover-servers-index").removeClass("fade")})}}})}},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),n=i.pathname(),s="/"+a,o=n+"?path="+Convert.uriEncodeComponent(s);e.attr("href",o)}}},o=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"},vars.navigation.animation_speed*1.7)}})}},l=function(){var e=dayjs().unix()-vars.navigation.opened>=1,t="mobile-menu-toggler",a="__logo";if(typeof jQuery().transition=="function"&&($("."+t+":visible").length&&e)){if($("."+a+"")){$("."+a+"").transition({y:0},vars.navigation.animation_speed*1.7)}$("aside, ."+t+"").transition({x:0},0,function(){$("."+t+"").removeClass("selected");$("aside").addClass("hidden-xs")})}},c=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 n=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{I(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{T(t);get_pre_default_content(t)}}}});var s=".select2-dropdown.aside-select2",o=function(){$.each($(""+t+" select > option"),function(){if($(this).attr("style")&&$(this).attr("style").indexOf("italic")>-1){var e=$(this);setTimeout(function(){$(s).find('li[id$="'+e.attr("value")+'"]').addClass("text-danger")},0)}})};i.on(""+a+":opening",function(){o();setTimeout(function(){var e=""+s+" .select2-search__field",t="keydown.colorfilter";$(e).off(t);$(e).on(t,function(){o()})},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")}},d=function(){if(vars.navigation.select.back){var e=$("aside select");_(e.data("previous-value"),0);vars.navigation.select.back=false}},f=function(e,t){var i="aside .form-control.sidebar-search",n="aside .autocomplete-suggestions",s=function(e){return e&&(e.includes("http://")||e.includes("https://")||e.includes("ftp://")||e.includes("ftps://"))?1:0};if(e=="c"){$(n).remove();$(i).removeAttr("disabled");$(i).autocomplete("dispose");!get_onbeforeunload_status()&&$(i).val("");if(t){return}}var o={},r="li:not(.menu-exclude):not(.user-link)";$.each($(""+r+' > ul[id^="global_"].sub > '+r+' > 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=s(e),a=(e.substring(0,1)=="/"?"":"/")+e;if(t){a=e}o[a]=$.trim($(this).text())});$('li > a[target="page"][data-href="/virtual-server/index.cgi"], '+r+' > a[target="page"][data-href="/sysinfo.cgi"], '+r+' > a[target="page"][data-href="/virtual-server/pro/history.cgi"], '+r+' > a[target="page"][data-href="/server-manager/one_history.cgi"], '+r+' > a[target="page"][data-href="/server-manager/bwgraph.cgi"], '+r+' > a[target="page"][data-href="/server-manager/history.cgi"], '+r+' > a[target="page"][data-href="/mailbox/list_folders.cgi"], '+r+' > a[target="page"][data-href="/mailbox/list_ifolders.cgi"], '+r+' > a[target="page"][data-href="/mailbox/list_addresses.cgi"], '+r+' > a[target="page"][data-href="/filter/edit_forward.cgi"], '+r+' > a[target="page"][data-href="/filter/edit_auto.cgi"], '+r+' > a[target="page"][data-href="/filter/edit_auto.cgi"], '+r+' > a[target="page"][data-href="/filter/"], '+r+' > a[target="page"][data-href="/mailbox/edit_sig.cgi"]').each(function(){o[$(this).attr("data-href")]=$.trim($(this).text())});var c=function(e){var t="🔒",a=e&&e.includes(t);return a},d=$.map(o,function(e,t){if(t!="undefined"&&!c(e)){return{value:e,url:t,data:{category:O()}}}});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+"/logviewer/"||v___location_path==v___location_prefix+"/logviewer/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"||v___location_path==v___location_prefix+"/logviewer/"||v___location_path==v___location_prefix+"/logviewer/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($(""+r+' > ul.sub:not([id^="global_"]) > '+r+' > 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())});$(""+r+' > 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&&!v()){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()+"":O()}}}});var m={};$("aside select option").each(function(){m[$(this).val()+":::"+$(this).parent("select").attr("name")]=$.trim($(this).text())});var h=$.map(m,function(e,t){if(t!="undefined"){return{value:e,url:t,data:{category:$("aside select").data("autocomplete-title")}}}});var b=h.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=session.server.data("language"),n=settings_autocomplete_extra_associations_privileged[i]?settings_autocomplete_extra_associations_privileged[i]:settings_autocomplete_extra_associations_privileged.en;if(typeof n==="object"){for(const[i,s]of Object.entries(n)){if(typeof s==="object"){for(const[i,n]of Object.entries(s)){if(typeof n==="object"){for(const[s,o]of Object.entries(n)){if(t&&t.url&&t.url.includes(i+"/")&&t.url.includes(o[0]+".cgi")){t.value=t.value+"<"+e+">"+o[1]+"";b[a]=t}}}else{if(t&&t.url&&(t.url.endsWith("/"+i+"/")||t.url.endsWith("/"+i+"/index.cgi"))){t.value=t.value+"<"+e+">"+n+"";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,orientation:"auto",onSelect:function(e,t){var i=$.Autocomplete.externalEvent;if(!$.isEmptyObject(i)){var n=i.keyCode?i.keyCode:i.which;if(i.ctrlKey||i.shiftKey||i.altKey||i.metaKey||n===20||n===32||n===33||n===34||n===35||n===36||n===37||n===38||n===39||n===40||n===45||n===46||n===112||n===113||n===114||n===115||n===116||n===117||n===118||n===119||n===120||n===121||n===122||n===123||n===144||n===145){return}}if(v()===true&&$t_uri_dashboard&&get_access_level()!=2&&get_access_level()!=4){A("webmin")}$(this).val("").blur();l();var o=s(e.url);if(e.url.substring(0,1)=="/"||o){var r=e.url&&(o||e.url.includes("/file/")||e.url.includes("/cwaf/")||e.url.includes("virtual-server/pro/history.cgi")||e.url.includes("server-manager/bwgraph.cgi")||e.url.includes("server-manager/history.cgi")||e.url.includes("server-manager/one_history.cgi"));if(r){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"})},p=function(){var e="data-goto",t=$("aside").find("li["+e+"]"),a=t.attr(e);t.remove();return a},u=function(e,t){if(get_onbeforeunload_status()){return}var e=typeof e=="undefined"||e==-1||e==""?$("aside select").val():e,a=$t_uri_virtualmin?"virtualmin":$t_uri_cloudmin?"cloudmin":$t_uri_usermin?"usermin":$t_uri_webmin?"webmin":"mail";if(a=="webmin"){A("webmin");S("webmin",t)}else if(a=="virtualmin"){A("virtualmin");I(e,t)}else if(a=="cloudmin"){A("cloudmin");T(e,t)}else if(a=="usermin"){A("usermin");S("usermin",t)}else if(a=="mail"){A("webmail");S("webmail",t)}},g=function(e,t){if(!t){t=600}var i=e?" #open_"+e+"":' [id^="open_"]',n=$(".switch-toggle"+i+":checked");if(n.length){a();var s=0;if(!s){s++;setTimeout(function(){n.click()},t)}}},m=function(e){var t="aside",a="form",i=a+"s",n="select",s=$(t+" "+n),o=s.data(n+"2"),r=$(t+" .sidebar-search").val();if(r){return}if(!e){vars.navigation.select.obj=o&&o!="undefined"&&!e&&s.select2("isOpen")}if(!e){if(o){s.select2("destroy")}$.each($(t).find(a),function(){$(this).replaceTagName(i)})}else{$.each($(t).find(i),function(){$(this).replaceTagName(a)}).promise().done(function(){c(vars.navigation.select.obj)})}},h=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)}},v=function(){if(y("dashboard")=="1"){return true}else{return false}},y=function(e){if(e){e='[id="open_'+e+'"]'}else{e=String()}return $(".switch-toggle input"+e+"").length},x=function(){A("dashboard");e();get_pjax_content(v___location_prefix+"/sysinfo.cgi")},k=function(){if(Test.string(C)){A(C)}},w=function(){var e=$('aside .switch-toggle [name="product-switcher"]:checked').attr("id");if(typeof e==="string"){return e.replace("open_","")}return null},A=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)}});M()},C=setTimeout(w),S=function(n,s){if(get_onbeforeunload_status()){return}a();var o=n=="webmail"?"webmail":session.server.data("product");A(o);vars.ajax.processing.navMenu&&vars.ajax.processing.navMenu.abort();vars.ajax.processing.navMenu=$.ajax({type:"GET",url:v___location_prefix+"/xhr.cgi?type=nav&action=get&subtype="+o,dataType:"JSON",success:function(e){C=o;$("body ul.navigation").html(e.menu);plugins.shell.link();i();!session.server.data("loading")&&t();if(n==="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()"])}setTimeout(function(){if(typeof s==="function"){s.call()}},10)},error:function(t){session.status(t.responseText);i();e()}})},I=function(n,s){if(get_onbeforeunload_status()){return}a();A("virtualmin");vars.ajax.processing.navMenu&&vars.ajax.processing.navMenu.abort();vars.ajax.processing.navMenu=$.ajax({type:"GET",url:v___location_prefix+"/xhr.cgi?type=nav&action=get&subtype=virtualmin&dom="+n+"",dataType:"JSON",success:function(e){C="virtualmin";$("body ul.navigation").html(e.menu);plugins.shell.link();i();!session.server.data("loading")&&t();setTimeout(function(){if(typeof s==="function"){s.call()}},10)},error:function(t){session.status(t.responseText);i();e()}})},T=function(n,s){if(get_onbeforeunload_status()){return}a();A("cloudmin");vars.ajax.processing.navMenu&&vars.ajax.processing.navMenu.abort();vars.ajax.processing.navMenu=$.ajax({type:"GET",url:v___location_prefix+"/xhr.cgi?type=nav&action=get&subtype=cloudmin&sid="+n+"",dataType:"JSON",success:function(e){C="cloudmin";$("body ul.navigation").html(e.menu);plugins.shell.link();i();!session.server.data("loading")&&t();setTimeout(function(){if(typeof s==="function"){s.call()}},10)},error:function(t){session.status(t.responseText);i();e()}})},V=function(){const e=$("body > .mobile-menu-toggler");if(!e.is(":visible")){return true}return e.offset().left>1},E=function(){const e=$("body > .mobile-menu-toggler:visible");if(e.length&&!V()){e.trigger("click")}},j=function(){const e=$("body > .mobile-menu-toggler:visible");if(e.length&&V()){e.trigger("click")}},O=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")}},z=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"}},M=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},q=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){I(t)}},U=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){T(t)}},Z=function(){if(settings_mail_ui&&(v___location_file==="view_mail.cgi"||v___location_file==="send_mail.cgi"||v___location_file==="reply_mail.cgi")){return true}return false};return{reset:e,select:{set:_,back:d,load:c},detect:t,detectAllowed:true,load:{start:a,stop:i},collapse:l,reload:u,update:g,deform:m,lock:h,switch:{dashboard:{get:v,set:x},available:y,get:w,set:A,reset:k},get:{webmin:S,virtualmin:I,cloudmin:T},intersect:{virtualmin:q,cloudmin:U},state:{opened:V,close:j,open:E,title:O,module:z,update:M,loading:o,target:p}}}();plugins.messenger=function(){var e=function(e){e=e||"toastid_-_";return e+Date.now()+""+parseInt(Math.random()*1e6)},t=function(t,a,i,n,s,o,r){var l,c=function(e){return e==="info"||e==="success"||e==="warning"||e==="error"?e:"show"},_=c(i),d=function(e){var t=String();if(e&&e.includes("fa2")){t="2"}return"fa%pack fa%pack-%ico".replace(/%pack/g,t).replace(/%ico/,e)},f=function(e){return"placed-"+(e.position||"bottomCenter")+""+" type-"+e.type+""+" message-length-"+(e.message.length<=32?32:e.message.length<128?128:e.message.length<256?256:e.message.length<384?384:e.message.length<512?512:"1024")+""+" message-delay-"+(Test.numeric(e.timeout)&&parseInt(e.timeout)<=5?"short":"long")+" message-delay-timeout-"+parseInt(e.timeout)+""};if(typeof t==="object"&&!$.isEmptyObject(t)&&!$.isArray(t)){l=t;if(l.id){l.id="toastid_-_"+l.id+""}_=c(l.type);l.type=_;if(l.icon){l.icon=d(l.icon)}l.class=(l.class?l.class+" ":String())+f(l)}else{n=n?"toastid_-_"+n+"":null;s=typeof s=="undefined"?true:Boolean(s);o=$.isArray(o)&&o.length?o[1]?(o[1]=Convert.strUpFirst(o[1].toString()),o.join("")):o.join(""):"bottomCenter";var p=2;var u={};if(!$.isEmptyObject(r)){var g=r.cancel.label,m=r.cancel.action;u=plugins.messenger.toast.construct.button(g,m);p=1}var h=null,v=null,b;if($.isArray(t)){h=t[0]||"";v=t[1]}else if(typeof t==="string"&&t&&(b=t.match(/<*.?class=["'](.*?)["']><\/*.?>(.*)/))){h=b[1];v=b[2]}else{v=t}if(h){h=d(h)}if(!v){console.warn("Cannot post notification toast as message text is missing");return}var y=a=="0"?false:parseInt(a)||2;l={icon:h,title:String(),message:v,position:o,class:f({position:o,message:v,type:_,timeout:y}),id:n,close:s,buttons:u,layout:p,timeout:y?y*1e3:y}}if(!l.id){l.id=e()}if(!l.zindex){l.zindex=10010}if(typeof iziToast==="object"){iziToast[_](l);return $("#"+l.id)}else{console.warn("Cannot load iziToast notification plugin")}},a=function(t){defaults={timeout:2e4,close:false,overlay:true,zindex:999999999,displayMode:"once",id:e(),color:"yellow",position:"center",buttons:[["",function(e,t){e.hide({transitionOut:"fadeOut"},t,"yes")},true],["",function(e,t){e.hide({transitionOut:"fadeOut"},t,"no")}]],onClosing:function(e,a,i){if(i==="yes"&&t.onCloseCallback&&typeof t.onCloseCallback==="function"){setTimeout(function(){t.onCloseCallback.call()},101)}}};defaults=$.extend(defaults,t||{});iziToast.question(defaults);return $("#"+defaults.id)},i={get:function(e){var t=$(document).find("#toastid_-_"+e+"");return t.length?t:null},hide:function(e){var t=this.get(e);if(t&&t.length){iziToast.hide({},t[0])}},destroy:function(e){var t=this.get(e);if(t&&t.length){$("#toastid_-_"+e+"").parent(".iziToast-capsule").remove()}}},n=function(e,t,a){if(e==="reset"){t="keyup";a={holdModifer:~~!false}}if(e==="reset"||e==="message-user-select"){var i=$(".iziToast > .iziToast-body > .iziToast-texts > .iziToast-message");a.holdModifer&&i.toggleClass("user-select-all",t==="keydown")}};document.addEventListener("DOMContentLoaded",function(){iziToast.settings({timeout:2e3,drag:$.browser.mobile,transitionIn:"fadeIn",transitionOut:"fadeOut",animateInside:false,position:"bottomCenter",layout:2,displayMode:2})});return{post:t,ask:a,toast:{get:i.get,hide:i.hide,destroy:i.destroy,hideAll:iziToast.destroy,construct:{button:function(t,a){var i=e("toastBtnClose");return[["",function(e,t){e.hide({onClosing:function(e,t,n){if(n===i){if(typeof a==="function"){a.call(this,t)}}}},t,i)},true]]}}},events:n}}();plugins.upload=function(e){e.removeAttr("onsubmit");e.on("submit.fm",function(e){e.preventDefault();e.stopPropagation();e.stopImmediatePropagation();var t=dayjs().unix()+""+parseInt(Math.random()*1e5),a=$(this),i=a.find(".ui_form_end_submit"),n=a.find('input[type="file"]')[0],s=n.files.length,o=a.find('input[name="dir"]').val(),r=$(n.files).map(function(e,t){return t.name}).get(),l=r.join("\n"),c=function(){theme_restore_buttons_class();$.fn.bootstrapFileInputReset(a);despinnerfy_buttons(0,i);i.addClass("disabled")},_=function(){if(s>1){plugins.messenger.post(''+theme_language("upload_successful").replace("$1",""+s+"").replace("$2","`"+o+"`").replace("'+theme_language("upload_successful_single").replace("$1",""+s+"").replace("$2","`"+o+"`").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){c();if(d(e)){return}e.status===200&&_()},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,a=0;e.addEventListener("progress",function(e){var i=e.target.responseText,n=/.file\.value\s+=\s+"(.*)";/g,s=/.size\.value\s+=\s+"(.*)";/g,o=/.pc\.value\s+=\s+"(.*)";/g,r=regex.matches(i,n,0,1),l=regex.matches(i,s,0,1),_=regex.matches(i,o,0,1);if(l){if(f){f=0;c()}var _=_||a?parseInt((_.match(/|/g)||[]).length/50*100):0;if(!_){a++}if(_>100){_=100}progress_percent.control(t,"success",_,[r,l,_])}if(!session.status(i)){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?"":session.server.data("user-id"))+"",complete:function(e){if(f){f=0;c()}if(theme_message_exists("uploadError_"+t+"")){return}e.status===200&&_()}})})};plugins.filter={options:function(e){var t='body[data-uri*="/'+v___location_file+'"] form[action="'+v___location_file+'"]',a="autocomplete-suggestions",i=" .select2 + .end_submits",n=i+" > .btn-group > .dropdown-toggle",s=$(n).parent(),o=n+" + ul",r=o+" > li ",l=r+" > input";var c=function(){$(l).autocomplete({lookup:e&&e.data?e.data:config_quick_access,minChars:0,appendTo:$(r),onSearchComplete:function(){var e=$(this).next("."+a+"");width=e.outerWidth()-20;parseInt(width)>0&&$(this).width(width)},onSelect:function(a){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}}data_url_query=v___location_file+"?module="+($(t).find('input[name="module"]').val()||"")+"§ion=";if(e&&e.url){data_url_query=e.url}var o=data_url_query+a.section+"&search="+($(this).val()||"");$(this).val("").blur();$(n).parent().trigger("click");$(this).autocomplete("dispose");get_pjax_content(o)},groupBy:"category",showNoSuggestionNotice:true,noSuggestionNotice:theme_language("global_no_results_found")})};if(e&&e.unlock){s.removeClass("cursor-na").find(".dropdown-toggle").removeClass("pointer-events-none").find(".cspinner").remove()}s.attr("data-placement","auto top").data("placement","auto top").tooltip("fixTitle");if(e&&e.tooltip&&e.tooltip.title){s.attr("data-original-title",theme_language(e.tooltip.title)).data("original-title",theme_language(e.tooltip.title)).attr("data-title",theme_language(e.tooltip.title)).data("title",theme_language(e.tooltip.title)).tooltip("fixTitle")}$(n).parent().on("hidden.bs.dropdown",function(){$(l).val("").blur().trigger("input")});$(n).parent().on("shown.bs.dropdown",function(){var e=$(this);c();$(l).focus();$(l).on("keydown.configauto",function(e){if(!e.ctrlKey&&!e.altKey&&!e.shiftKey&&!e.metaKey){var t=$(this).next("."+a+"");if(t&&t.length){t[0].scrollTop=0}$(this).off("keydown.configauto")}});var t=$(i).prev().prev("select"),n=t.val();if(n){var s=t.find('option[value="'+n+'"]').text(),o=$(i).find("."+a+""),r=o.find("strong:contains("+s+")");if(r&&r.length){r[0].parentNode.parentNode.scrollTop=r[0].offsetTop}}$(l).off("keydown.cqa").on("keydown.cqa",function(t){if(t.keyCode==13){t.preventDefault()}if(t.keyCode==27){e.trigger("click")}})});var _=uri_parse_param("search");if(_){var d=$('.container-fluid td:contains("'+_+'")').last().parent();if(d&&d.length){d[0].scrollIntoView();setTimeout(function(){var e="vertical";d.find("td").first().addClass("faa-"+e+"-narrow animated animated-count-1");setTimeout(function(){var e=d.find("td").last().find('input:not([type="radio"]), input[type="radio"]:checked, textarea, select').first();if(e&&e.length){e[0].focus()}},740)},0)}}}};plugins.pjax=function(){var e={_:null,set:function(e){this._=e},get:function(e){return this._?this._.getResponseHeader(e):null},getAll:function(){if(this._){var e=this._.getAllResponseHeaders(),t=e.trim().split(/[\r\n]+/),a={};t.forEach(function(e){var t=e.split(": ");var i=t.shift();var n=t.join(": ");a[i]=n});return a}else{return null}},send:{data:{},set:function(e){this.data=e},get:function(){var e=this.data;this.data={};return e}}},t={refresh:function(e,t){this.modal=$(".modal.in").length;if(this.modal&&!t){console.warn("Cannot refresh the page with opened modal window");return}else if(t){$(".modal.in").modal("hide")}if(location.pathname&&location.pathname.includes("/xerror")){window.history.back();console.warn("Cannot refresh error page. Commanded the browser to move back one page in the session history");return}if(e){set_onbeforeunload_status(0,0)}if(get_onbeforeunload_status()){get_onbeforeunload_message(false,"get_pjax_content(v___location_resource, false, false)","ev")}else{var a=vars.previous_request,i=vars.source_request,n=unbuffered_header_processor_allow(a&&a.target?a.target.action:false);if(a.type==="submit"){if(Test.str_contains_multi(a.target.action,["new","delete","add","remove"])||Test.str_contains_multi_regex($(a.currentTarget).serialize(),"::M::=[^0&\\s]",["new","delete","add","remove"])){var s=$('.container-fluid form [data-entry="view_refresh"]');if(s&&s.length===1){s.trigger("click")}console.warn("Cannot refresh modifier page");return}get_pjax_action_submit(a,false)}else{if(n&&i.length){get_pjax_content(i,false,false)}else{get_pjax_content(v___location_resource,false,false)}}}},link:{alter:function(e){const t=function(e){var t=e,a=function(){var e=localStorage.getItem(v___server_hostname+"-"+v___server_username+"-"+"fm-last-visited-dir");return e},i=a();if(i&&(t&&typeof t==="string"&&t.includes("/"+v___module_file_manager))){if(!uri_parse_param2("path",e)){var n="path="+i;if(t.includes(".cgi")){if(t.includes(".cgi?")){t+="&"+n}else{t+="?"+n}}else{t+="/index.cgi?"+n}t.replace(/[\/]+/g,"/");return t}return e}return e};e=t(e);return e}},interaction:{set:function(e){this.last=e},get:function(e){this.now=Date.now();if(e){return[this.last,this.now]}else{return parseInt((this.now-(this.last||this.now))/1e3)}}},events:{reset:function(){this.beforeSend._=[];this.start._=[];this.success._=[];this.complete._=[];this.beforeReplace._=[];this.end._=[]},beforeSend:{_:[],set:function(e){typeof e==="function"&&this._.push(e)},get:function(){!$.isEmptyObject(this._)&&this._.forEach(function(e){e.call()});this._=[]}},start:{_:[],set:function(e){typeof e==="function"&&this._.push(e)},get:function(){!$.isEmptyObject(this._)&&this._.forEach(function(e){e.call()});this._=[]}},success:{_:[],set:function(e){typeof e==="function"&&this._.push(e)},get:function(){!$.isEmptyObject(this._)&&this._.forEach(function(e){e.call()});this._=[]}},complete:{_:[],set:function(e){typeof e==="function"&&this._.push(e)},get:function(){!$.isEmptyObject(this._)&&this._.forEach(function(e){e.call()});this._=[]}},beforeReplace:{_:[],set:function(e){typeof e==="function"&&this._.push(e)},get:function(){!$.isEmptyObject(this._)&&this._.forEach(function(e){e.call()});this._=[]}},end:{_:[],set:function(e){typeof e==="function"&&this._.push(e)},get:function(){!$.isEmptyObject(this._)&&this._.forEach(function(e){e.call()});this._=[]}}}};return{headers:{set:e.set,get:e.get,getAll:e.getAll,send:e.send},page:{refresh:t.refresh,link:t.link,interaction:{set:t.interaction.set,get:t.interaction.get},events:{reset:t.events.reset,beforeSend:{set:t.events.beforeSend.set,get:t.events.beforeSend.get},start:{set:t.events.start.set,get:t.events.start.get},success:{set:t.events.success.set,get:t.events.success.get},complete:{set:t.events.complete.set,get:t.events.complete.get},beforeReplace:{set:t.events.beforeReplace.set,get:t.events.beforeReplace.get},end:{set:t.events.end.set,get:t.events.end.get}}}}}();plugins.page=function(){const e={register:function(){(function(e){var t=plugins.pjax.headers.get("refresh");e.clear();if(Test.numeric(t)){t=parseInt(t);if(t>=1){e.refreshTimer=setInterval(function(){var e=$(quirks.active_element());if(!e.is('input[type="search"]')&&!e.is('input[type="text"]')&&(vars.page_interaction<=0||plugins.pjax.page.interaction.get()>4)){plugins.pjax.page.refresh()}},t*1e3)}}})(e.refresh)},refresh:{clear:function(){typeof this.refreshTimer==="number"&&clearInterval(this.refreshTimer)}},mousemove:function(){const e=$(document.body),t="mousemove.tracker",a="#content";e.off(t,a);if(!settings_auto_open_panels_on_proximity){return}if(matchMedia("(any-hover: hover)").matches&&(matchMedia("(max-width: 1080px)").matches||parseInt(session.server.data("data-navigation-collapsed")))){e.on(t,a,function(e){const t=$(window).width(),a=this;if(e.pageX<=15&&!a._leftA&&!a._leftAStart){a._leftAStart=true;setTimeout(function(){a._leftA=true},vars.navigation.animation_speed*1.7+3);plugins.navigation.state.open()}else if(e.pageX>15&&a._leftA){a._leftA=false;a._leftAStart=false;plugins.navigation.state.close()}if(e.pageX>=t-15&&a._rightA&&a._rightAStart){a._rightAStart=false;setTimeout(function(){a._rightA=false},vars.navigation.animation_speed*1.7+3);plugins.slider.open()}else if(e.pageX .panel > .panel-body [data-row-type="ui-table"]'),_=c.length,d=matchMedia("(max-width: 992px)").matches,f=function(e,t){const a=e.closest('[data-row-type="ui-table"]');a.attr("data-column-span","all");if(t){a.attr("data-column-locked","1")}},p=function(e){e.attr({"data-column-span":"all","data-column-separator":"1","data-column-locked":"1"})},u=function(e,t){e.attr({"data-column-span":"all"});if(t){e.attr("data-column-locked","1")}},g=function(e){e.not("[data-column-locked]").removeAttr("data-column-span");e.find("[data-content-separator]").remove()},m=function(){const e=['[data-tbody-type="ui-table"]'];e.forEach(function(e){const t=document.querySelectorAll(e);t.forEach(function(e){const t=$(e).find('input[name="all_mins"], input[name="all_hours"], input[name="all_days"], input[name="all_months"], input[name="all_weekdays"]');if(t.length===10){const e=t.first();f(e,true);u(e.closest('[data-row-type="ui-table"]').prev("tr"),true);const a=e.closest("table");if(a.hasClass("table-hardcoded")){a.removeClass().addClass("table table-striped table-condensed no-hover").parent("td").removeClass().addClass("col_value col_header").parent("tr").attr({"data-row-type":"ui-table","data-column-span":"all","data-column-locked":"1"})}}const a=[".ui_multi_select_row",".opener_table_cell_style_small",".vui_features_sorted_grid",".opener_table_style",".CodeMirror",".dnd_updown","table.no-hover",'textarea[name="extracas"]','[data-radio-table] textarea[name="paste"]','input[name="resources_mode"]','textarea[name="dns"]','textarea[name="namedconf"]','textarea[name="web"]','textarea[name="disabled_web"]','textarea[name="logrotate"]','textarea[name="logrotate_files"]','textarea[name="ftp"]','input[name="ftp_dir"]',".col_value > textarea:only-child","[data-table-backup-mode]",'textarea[name="settings_leftmenu_custom_links"]',"td:only-child > .ui_textarea:first-child",'td[colspan="3"] > .awradio:first-child ~ br ~ .ui_textarea:last-child',"#show_backup_destination",'input[name="what_nofiles"]',".table-cell-padded"];f($(e).find(a.join()).not("[name*='extra_']"),true);const i=$(e).find('[data-row-type="ui-table"]');if(i.length===1){i.attr("data-column-span","all")}p($(e).find("td.no-border").parents("tr").add($(e).find("hr[data-row-separator]").parents("td").parents("tr")));const n=$(e).parents(".sub_table_container").parent("td").parent("tr").addClass("bg-transparent");const s=n.find("> td").find("p, b");s.each(function(){if(!$.trim($(this).html())){$(this).remove()}});const o=$(e).find('> [data-row-type="ui-table"]'),r="column-overflow-x-auto",l="data-content-separator";o.each(function(){const e=$(this).find("> td.col_value"),t=e.innerWidth();g($(this));e.removeClass(r);if(Math.ceil($(this).outerWidth())=Math.ceil(t-12)){const t='input[type="text"], input[type="password"], textarea, select';e.find("> .awradio").each(function(){if($(this).index()>0&&!$(this).prev().is("br, ["+l+"]")&&!$(this).next().is("br, .awradio, table")&&($(this).next().is(t)||$(this).next().has(t).length)){$(this).before("
        ")}})}});if(browser.detect.firefox()){e.find(".ui_radio_table > tbody").find('tr:last-child:has(input[type="text"], select)').addClass("firefox__has_input_select")}});$(e).find("> tr").each(function(){if($(this).find("> td.col_value").children().length===1&&$(this).find("> td.col_value").children(".awobject").length===1){$(this).attr("data-row-subtype","narrow")}})})})},h="layout-columns",v="layout-width";$(document.documentElement).attr("data-"+h+"",config_portable_table_rows_to_columns_number);$(document.documentElement).attr("data-"+v+"",config_portable_table_rows_to_columns_width);r.removeAttr(l);if(_&&(s(d)||n())){r.attr(l,1),o=true}else{r.removeAttr(l)}if(_){m()}const b="ui-table-layout",y="data-"+b+"",x="a["+y+"]";$(x).remove();if(_&&settings_right_table_layout_control&&a()&&i()){const e=config_portable_table_rows_to_columns||d?true:false,t=config_portable_table_rows_to_columns_break?true:false,a=e?"on":"off",i=e?' checked="checked"':String(),n=!e?' checked="checked"':String(),s=t?' checked="checked"':String(),o=!t?' checked="checked"':String(),_=d?"disabled ":String(),f="layout-popover",p="layout-type",u="layout-break",g="layout-remove-control",k="data-layout-opts",w="data-layout-control-save",A="why-explanation",C="#headln2l .btn-group",S=$(C).length?$(C):$(C+"-vertical-small");S.first().append('');$(x).find("i").tooltip({container:"body",trigger:"hover",placement:"bottom",delay:{show:vars.plugins.tooltip.delay.show,hide:vars.plugins.tooltip.delay.hide}});const I=`\n
        \n \n
        \n \n \n \n   \n \n \n \n \n \n
        \n
        \n
        \n \n
        \n
        \n \n \n ${config_portable_table_rows_to_columns_number}\n \n \n
        \n
        \n \n \n ${config_portable_table_rows_to_columns_width}px\n \n \n
        \n \n
        \n \n \n \n   \n \n \n \n \n
        \n
        \n
        \n \n \n \n \n
        \n
        \n \n
        \n `;$(x).popover({html:true,sanitize:false,container:"#content",title:function(){return theme_language("columns_layout_title")+'"},content:function(){return I},placement:window.matchMedia("(max-width: 767px)").matches?"left":"right"});$("."+f).remove();$(x).on("inserted.bs.popover",function(){const e=$(this).attr("aria-describedby"),t=$("#"+e),a=t.find(".close"),i=t.find("["+k+"]"),n=t.find('input[name="'+p+'"]'),s=t.find('input[name="'+h+'"]'),o=t.find('input[name="'+v+'"]'),_=t.find('input[name="'+u+'"]'),d=t.find('input[name="'+g+'"]'),y=t.find('[type="button"]').last();t.addClass("z-index-10001 "+f+"").find(".popover-content").addClass("overflow-hidden");n.on("input",function(e){const t=$(x),a=t.data(b),n=a==="on"?"off":"on",s=t.find(".fa2");if(a==="on"){r.removeAttr(l);config_portable_table_rows_to_columns=false;i.addClass("hidden");$.each(c,function(){snippets.page.render_table_labels(c)})}else{r.attr(l,1);config_portable_table_rows_to_columns=true;i.removeClass("hidden");c.find(".col_label").removeClass().addClass("col_label").find("b").removeClass();m()}t.data(b,n);s.removeClass("fa2-grid-"+a+"").addClass("fa2-grid-"+n+"");$(x).popover("reposition")});a.on("click",function(){$(x).trigger("click");plugins.page.format.columns(true)});s[0].addEventListener("input",function(e){$(document.documentElement).attr("data-"+h+"",e.target.value);$(e.target).prev().text(e.target.value);config_portable_table_rows_to_columns_number=parseInt(e.target.value);m()});o[0].addEventListener("input",function(e){$(document.documentElement).attr("data-"+v+"",e.target.value);$(e.target).prev().text(e.target.value+"px");config_portable_table_rows_to_columns_width=parseInt(e.target.value);m()});_.on("input",function(e){const t=$(x);config_portable_table_rows_to_columns_break=!!parseInt(this.value);m()});d[0].addEventListener("input",function(e){y.toggleClass("btn-grey",e.target.checked);y.find("span").text(theme_language(e.target.checked?"columns_layout_remove_button":"global_save"))});y[0].addEventListener("click",function(e){settings_right_table_layout_control=d.is(":checked")?false:true;spinnerfy_button_tiny($(this));theme.config.save(["settings_right_table_layout_control","config_portable_table_rows_to_columns"]);setTimeout(function(){if(!settings_right_table_layout_control){$("."+f).remove()}},vars.event.double_click_delay)});t.find("."+A).tooltip({container:"body",trigger:"hover",placement:"bottom",delay:{show:0,hide:vars.plugins.tooltip.delay.hide}})})}}};return{format:{columns:t.columns},events:{register:e.register,mousemove:e.mousemove,refresh:{clear:e.refresh.clear},pjax:{start:e.pjax.start,before:e.pjax.before}}}}();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()}).appendTo(r)}).promise().done(function(){r.submit()});return}var l=e.attr("name")?e.attr("name"):e.attr("id"),o=$.trim(e.val());var s=r;if(r.parents(".alert").length&&r.find(".ui_form_end_buttons .end_submits").length){s=r.find(".ui_form_end_buttons .end_submits")}$('').attr({type:"hidden",class:"hidden hidden-force",name:l,value:o}).appendTo(s);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="ui_form_elements_wrapper",l=".btn-group.end_submits:visible button.ui_form_end_submit",o='form:not([data-tester="1"]):not(#webmin_search_form)';if(e){return $(l).hasClass(a)}$(document).on(t,o,function(e){if(e.originalEvent===undefined||e.originalEvent&&!e.originalEvent.inputType){return}if($(e.target).parent().is("."+r)){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,s=$(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")||(s&&s.includes("edit_tmpl.cgi")||s&&s.includes("config.cgi"))||$(".modal.in.mppopup").length){t.attr(n,1);return}var _=$(e.target).is('input[type="checkbox"], input[type="radio"]'),c=$(e.target).parents("tr"),d=_&&c&&c.length&&c.attr("class")&&c.attr("class").includes("ui_checked");if(d){return}theme_restore_buttons_class();var f=t.find(l),p=f.first(),u=String("btn-xclass"),h=f.data(i)===1;if(p[0]&&p[0].classList){var g=p[0].classList.value.match(/.*(btn-\S+)/);if(g){u=g[1];p.attr("data-class-restore",u)}}if(f&&f.length){set_onbeforeunload_status(1);if(!h){f.data(i,1);p.removeClass(u).addClass(a);t.attr(n,1);f.one("click",function(){f.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(p.hasClass(a)){e.preventDefault();p.trigger("click")}else{set_onbeforeunload_status(0)}}})}}})};snippets.inject_extra_option=function(e,t,i,a,n,r){if(e==="tr/yes:no"){var l=$("body"),o=t.parents("form");t.parents("td.col_value").parent("tr").after(""+''+a+""+''+''+''+'"+''+'"+""+""+"");var s="submit."+i+"";l.off(s);l.one(s,o,function(){var e=Test.true($("[name="+i+"]:checked").val());window[i]=e;theme.config.save()})}if(e&&e.includes("checkbox:")){var _=parseInt(Math.random(11)*100),c=n&&n.checked?"checked ":String(),d=n&&n.extraClass&&n.extraClass.main?" "+n.extraClass.main:String(),f,p=''+"'+" '+'"+""+''+"";if(n){if(n.getHtml){return p}if(n.style){f=$(p).css(n.style)}}if(e==="checkbox:after"){t.after(f||p)}if(e==="checkbox:before"){t.before(f||p)}if(r){r.call()}}};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 dayjs!=="undefined"){var r=n.data(a);if(r){var l=r+1;n.data(a,l);n.text(dayjs(l*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(){var e="x",t="-",i="md",a="d",n="t",r=e+t+i+t,l=function(e,i){var l=e.tagName.endsWith((t+a).toUpperCase())?1:0,o=e.tagName.includes(r+n)?0:1,s=e.outerHTML.indexOf(";1")>-1?1:0,_=e.outerHTML.indexOf(";2")>-1?1:0,c=e.outerHTML.indexOf(";-1")>-1?1:0,d=core.curModule("proc")?1:0,f=$(e).text(),p=l?f.split(";")[0]:f,u=config_portable_theme_locale_format_short||"L",h=config_portable_theme_locale_format_long||"LL",g=config_portable_theme_locale_format_time||"LT",m=dayjs.unix(p).format("l");m=m.indexOf("/")>-1?"/":m.indexOf("-")>-1?"-":".";var v=dayjs.unix(p).utcOffset(get_utc_offset()).format(g),b=_?dayjs.unix(p).utcOffset(get_utc_offset()).format("YYYY["+m+"]MM["+m+"]DD")+" "+(o?String():v):dayjs.unix(p).utcOffset(get_utc_offset()).format(!s?u:h);if(d){c=1;if(e&&typeof e.outerHTML==="string"&&e.outerHTML.includes(r+n)){$(e).remove()}}if(c){if(!isNaN(p)){p*=1e3}var x=dayjs(p).fromNow(),y=parseInt((dayjs().unix()-dayjs(p).unix())/(60*60*24)),w=dayjs(p).format("LT"),k=dayjs().format("YYYY"),C=dayjs(p).format("YYYY"),M=dayjs(p).format("ll"),F=dayjs(p).format(u);if(core.curModule("mailbox")){if(y===0){x=w}else if(k==C){x=M.replace(k,"").replace(",","")}else{x=F}}v=x;b=x}var j;if($(e).is("td")){j=$(e)}else{j=$(e).parent("td")}j.is("td")&&j.attr("data-order",p);if(i){return!l?v:b}else{$(e).replaceWith(!l?v:"-1?' data-placement="auto top" data-container="body" data-toggle="tooltip" data-title="'+(c?dayjs(p).calendar(null,{sameElse:"LLL"}):dayjs.unix(p).fromNow())+'"':"")+">"+b+"")}};$.each($(r+a).add(r+n).add($("td:contains("+(r+a)+")")).add($("td:contains("+(r+n)+")")).add("option:contains("+(r+a)+")").add("option:contains("+(r+n)+")"),function(a,n){var o=!n.tagName.startsWith(r.toUpperCase());if(o){var s=$(n).text(),_=Convert.htmlUnEscape(s);var c="";$.each($(_),function(a,n){var r=$(n)[0].tagName&&$(n)[0].tagName.startsWith((e+t+i).toUpperCase());if(r){c+=l($(n)[0],1)+" "}}).promise().done(function(){$(n).text(c)})}else{l(n,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(){var e=theme.version(false,true);if(theme.version.current&&e&&e!==theme.version.current&&!vars.cache.theme_updating){!theme_message_exists("theme_update_refresh")&&theme.update_message()}},300)}).ajaxError(function(e,t,i){if(t.statusText!=="canceled"&&t.statusText!=="abort"){connection_error(t,0,false,i)}});$.ajaxSetup({complete:function(e,t){var i="container session_login";if(Test.strContains(e.responseText,i)||e&&(e.getResponseHeader("Auth-type")==="auth-required=1"||e.responseText&&(e.responseText.indexOf("reset-fonts-grids-base")>-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);set_ajax_send_headers(e,t)}})};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}if(e.target.target==="_blank"){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){plugins.pjax.page.events.reset();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){plugins.pjax.page.events.start.get();plugins.page.events.refresh.clear();vars.pjax.replace_contents=1;vars.pjax.event.end=1;vars.pjax.progressing=1;plugins.navigation.detectAllowed=true;if(t){session.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){plugins.pjax.page.events.beforeReplace.get();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;mail_page_check()}}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()}}plugins.page.events.pjax.before()});$(document).on("ready pjax:beforeSend",function(e,t,i){plugins.pjax.page.events.beforeSend.get();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_blob(i)){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()}plugins.page.format.columns(true);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}}}i.url=plugins.pjax.page.link.alter(i.url);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])]}}plugins.page.events.pjax.before();v___theme_pjax_call+=1});$(document).on("pjax:success",function(event,data,status,xhr,options){plugins.pjax.page.events.success.get();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){plugins.page.events.refresh.clear();vars.pjax.initial_load=1;vars.allow_ui_features=1;vars.pjax.progressing=0;plugins.pjax.page.events.complete.get();if(v___theme_reload){theme_reload()}progress.end();session.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());setTimeout(function(){plugins.navigation.detectAllowed=true},1e3)});$(document).on(vars.h.event.page.end,function(e,t){vars.pjax.cache.set("enable");plugins.pjax.page.events.end.get();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);vars.pjax.popstate&&plugins.page.format.columns(true);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;vars.pjax.popstate=true;setTimeout(function(){vars.pjax.popstate=false},10);set_pjax_send_headers(e.state.url,e);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()}};var i=session.server.data("webprefix");if(i&&e){e=e.toString();if(!e.startsWith(i)){e=i+(e.startsWith("/")?e:"/"+e)}}if(!e){t();return}var a=unbuffered_header_processor_allow,n=!a(e),r=function(e){var t=URI(e).directory();if(t&&t!="/"&&t!=v___location_prefix){return t}else{return false}};if(a(e,1)){n=0;var l=r(e);if(l){get_pjax_content(l+"/");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|delete_domain).*\.cgi.*/g)||e.match(/.*(newkey|savekey|save_ipkey|newcsr).*\.cgi.*/g)||e.includes("index.cgi?action=upgrade")||e.includes("shell/index.cgi"))){var o=r(e);if(o){get_pjax_content(o);return}}var s=session.server.data("initial-wizard");if(e&&n){if(Test.strContains(e,v___module_file_manager+"/config.cgi")){get_pjax_content(v___location_prefix+"/"+v___module_file_manager);return}if(s!="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);if(document.hasFocus()||document.visibilityState!=="hidden"){e&&get_pjax_content(e)}else{page.branding.process(true);e&&get_pjax_content(e)}}};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:n||$("[data-fbplacement]").length?"auto bottom":"auto 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"], .servers-index-link .popover-trigger',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();plugins.page.format.columns(true);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}});if(platform.detect()==="mac"){a=a.replaceAll("Ctrl +","⌘ +");a=a.replaceAll("Alt +","⌥ +")}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],l=n[1],o=n[2];if(!l){return}var s=t.attr("href").indexOf("/file-manager")>-1,_='',c=t.attr("href").indexOf("showpass.cgi")>-1,d=t.attr("href").indexOf("/locale")>-1||s;if(c){_=""}r=_+""+r+"";t.data("title",r);t.data("content",o);var f=String(),p=t.hasClass("btn-link");if(o&&(o.length>1024||o.includes("

        ")||o.includes("
          ")||o.includes(""))){f=" popover_extra_width"}var u=function(){return matchMedia("(max-width: 767px)").matches},h=u()||d?"bottom":"auto right";if(a&&a.includes("strftime")){h="top"}if(s){h="auto right";if(window.matchMedia("(max-width: 767px)").matches){h="bottom"}}if(t.hasClass("place-top")){h="top"}t.data("placement",h);var g=t.parent(),m=".container-fluid";if(t.parents(".opener_table_style")&&t.parents(".wrapped-accordion")){g=t.parents(".wrapped-accordion").parent();if(!g.length){g=m}}t.popover({html:true,sanitize:false,container:p||c||d?m:g,template:'',title:function(){return r},content:function(){return o},placement:h});t.popover("show");var v="shown.bs.popover";t.off(v);t.on(v,function(){var e=$(this),t=e.next(".popover.module-help"),a=t.hasClass("right")?" right":"",n=function(){var t=".popover.module-help",i=e.next(t);return i.length?i:$(".container-fluid > .popover.module-help:last-child")};$(this).addClass("activated"+a+"");n().find(".popover:visible").addClass("module-help");$('body[class*="'+v___module_file_manager+'"]').find(".popover:visible").addClass("file-manager-help");!window.matchMedia("(max-width: 992px)").matches&&$(this).closest("tr").addClass("popover-active");var r=".popover.module-help",l=n(),o="click.tmpclkpopover";l.undelegate(o);l.find("a").addClass("allowed");l.on(o,"a",function(e){e.stopPropagation();e.stopImmediatePropagation();var t=$(this),a=t.attr("href"),n=t.parents(r),l=n.find(".popover-title > span"),o=n.find(".popover-content");if(a&&a.startsWith("http")){t.attr("target","_blank")}else{e.preventDefault();var s=v___location_prefix+"/help.cgi/"+v___module+"/"+a;$.ajax({type:"POST",url:s,dataType:"text",success:function(e){if(!session.status(e)){return}var t=i(e),a=t[0],r=t[1];l.text(a);o.html(r);n.find("a").addClass("allowed")}})}});setTimeout(function(){var e=$(".popover.module-help"),t=e.length;$.each(e,function(e){if(t===e+1){popover_visibility_position($(this))}}).promise().done(function(){var e=n();if(e.length){e.trigger("click")}})},10)});var b="hidden.bs.popover";t.on(b,function(){$(this).closest("tr").removeClass("popover-active");$(this).removeClass("activated right");t.off(v)})}})})};snippets.page.render_links_dashboard=function(){theme_buttonify(["/sysinfo.cgi"],".container-fluid table td[data-td-e]",'a[href*="webminlog/"]',"btn btn-info btn-xxs f__lnk_t_btn-el vertical-align-top margined-top-1 ---forced",0,"","","","|");theme_buttonify(["/sysinfo.cgi"],".container-fluid table td[data-td-e]",'a[href*="delete_session.cgi"]',"btn btn-danger f__lnk_t_btn-el btn-xxs vertical-align-top margined-left--1 margined-top-1 ---forced","fa-unplugged");theme_buttonify(["/sysinfo.cgi"],".container-fluid table td[data-td-e]",'a[href*="list_sessions.cgi"]',"btn btn-link-bordered f__lnk_t_btn-el btn-xxs vertical-align-top margined-left--1 margined-top-1 ---forced","fa-cog no-btn-text");theme_buttonify(["/sysinfo.cgi"],".container-fluid",'a[href*="acl/list_sessions.cgi"]',"btn btn-default","fa-group-o","users","","","|");theme_buttonify(["/sysinfo.cgi"],".container-fluid",'a[href*="virtual-server/search.cgi"]',"btn btn-info btn-xxs f__lnk_t_btn-el vertical-align-top margined-top-1 margined-left-4 ---forced",0,"","","","|");theme_buttonify(["/sysinfo.cgi","/virtual-server/edit_newchangelog.cgi","/server-manager/edit_newchangelog.cgi"],".container-fluid #newfeatures-virtual-server-1-collapse dt, .container-fluid #newfeatures-server-manager-1-collapse dt, .container-fluid .table td dt","a","btn btn-link btn-link-bordered btn-xxs btn-dnwo f__lnk_t_btn-el margined-left-3 vertical-align-top margined-top-1","fa-eye","|","")};snippets.page.render_links=function(e){theme_buttonify(["/syslog-ng/list_destinations.cgi"],".container-fluid .table tbody tr td:last-child",'a[href*="view_log.cgi"]',"btn btn-transparent btn-link-bordered btn-xxs vertical-align-top margined-top-1","");theme_buttonify(["/virtual-server/edit_newmysqls.cgi"],".container-fluid .table tbody tr td:last-child","a.ui_link","btn btn-transparent btn-link-bordered btn-xxs vertical-align-top margined-top-1","fa-cog");theme_buttonify(["/cluster-cron/","/cluster-cron/index.cgi","/cluster-copy/","/cluster-copy/index.cgi"],".container-fluid .table tbody tr td:last-child","a.ui_link","btn btn-transparent btn-link-bordered btn-xxs vertical-align-top margined-top-1","fa-play");theme_buttonify(["/virtualmin-git/","/virtualmin-git/index.cgi"],".container-fluid table td[data-td-e]",'a[href*="delete.cgi"]',"btn btn-danger btn-xxs vertical-align-top margined-top-1 ---forced","fa-times-circle","","","","|");theme_buttonify(["/virtualmin-git/","/virtualmin-git/index.cgi"],".container-fluid table td[data-td-e]",'a[href*="//"]',"btn btn-transparent btn-link-bordered btn-xxs vertical-align-top margined-left--2 margined-top-1 ---forced","");theme_buttonify(["/virtualmin-git/","/virtualmin-git/index.cgi"],".container-fluid table td[data-td-e]",'a[href*="help.cgi"]',"btn btn-info btn-xxs vertical-align-top margined-left--2 margined-top-1 ---forced","");theme_buttonify(["/webalizer/","/webalizer/index.cgi"],".container-fluid .table tbody tr td:last-child","a.ui_link","btn btn-transparent btn-link-bordered btn-xxs vertical-align-top margined-top-1",0);theme_buttonify(["/cpan/edit_mod.cgi"],".container-fluid .table tbody tr td","a.ui_link","btn btn-transparent btn-link-bordered btn-xxs vertical-align-top margined-top-3 margined-right--1 btn-dnwo ---forced","","","","","|");theme_buttonify(["/forward/index.cgi","/forward/"],".container-fluid",'.panel-body > a:first[href*="simple"]',"btn btn-default _btn-links-top btn-xs vertical-align-top margined-top-1 margined-left-3",0,"","","","|");theme_buttonify(["/forward/index.cgi","/forward/"],".container-fluid",".panel-body > span[data-unckecked]","btn btn-info _btn-links-top btn-xs vertical-align-top margined-top-1 margined-left-3",0,"","","","|");theme_buttonify(["/acl/list_sessions.cgi"],".container-fluid table td[data-td-e]",'a[href*="webminlog/"]',"btn btn-info btn-xxs vertical-align-top margined-top-1 ---forced",0,"","","","|");theme_buttonify(["/acl/list_sessions.cgi"],".container-fluid table td[data-td-e]",'a[href*="delete_session.cgi"]',"btn btn-danger btn-xxs vertical-align-top margined-left--2 margined-top-1 ---forced","fa-unplugged");snippets.page.render_links_dashboard();theme_buttonify(["/virtual-server/","/virtual-server/index.cgi","/virtual-server/edit_plan.cgi","/virtual-server/search.cgi"],".container-fluid form table tbody td",'a[href*="list_users.cgi?"], a[href*="list_aliases.cgi?"]',"btn btn-link btn-link-bordered btn-xxs btn-hover-hide vertical-align-top margined-top-1",0,"(~)"," ~ ","");theme_buttonify(["/server-manager/","/server-manager/index.cgi"],".container-fluid form table tbody td",'a[href*="mass_update_form.cgi?"]',"btn btn-link btn-link-bordered btn-xxs btn-transparent btn-link-bordered vertical-align-top margined-left-3 margined-top-1",0,"","","","-");theme_buttonify(["/quota/","/quota/index.cgi"],".container-fluid .table tbody td[data-td-e]",'a[href*="activate.cgi"][href*="&active=3"]',"btn btn-warning btn-xxs vertical-align-top margined-top-1","fa-ban");theme_buttonify(["/quota/","/quota/index.cgi"],".container-fluid .table tbody td[data-td-e]",'a[href*="activate.cgi"][href*="&active=0"]',"btn btn-success btn-xxs vertical-align-top margined-top-1","fa-check-circle-o");theme_buttonify(["/virtualmin-google-analytics/","/virtualmin-google-analytics/index.cgi"],".container-fluid .table tbody td[data-td-e]",'a[href*="edit.cgi"]',"btn btn-warning btn-xxs vertical-align-top margined-top-1","fa-pencil-square");theme_buttonify(["/apache/","/apache/index.cgi"],".container-fluid .table tbody tr td:last-child","a.ui_link","btn btn-transparent btn-link-bordered btn-xxs vertical-align-top margined-top-1","fa-external-link");theme_buttonify(["/ldap-server/edit_schema.cgi"],".container-fluid table tr.ui_checked_columns td",'a[href*="view_sfile.cgi"]',"btn btn-info btn-xxs vertical-align-top margined-top-1 ---forced",0,"","","","|");theme_buttonify(["/ldap-server/edit_schema.cgi"],".container-fluid table tr.ui_checked_columns td",'a[href*="edit_sfile.cgi"]',"btn btn-warning btn-xxs vertical-align-top margined-left--2 margined-top-1 ---forced","fa-pencil-square-o");theme_buttonify(["/virtualmin-awstats/generate.cgi"],".container-fluid .panel-body",'a[href*="view.cgi?config="]',"btn btn-link-bordered btn-xxs vertical-align-top margined-top-2","fa-eye","","");theme_buttonify(["/mailbox/list_addresses.cgi"],".container-fluid",'a[href^="list_addresses.cgi"][href*="add="]',"btn btn-default btn-block btn margined-top-10","fa-plus-circle");theme_buttonify(["/mailbox/list_addresses.cgi"],".container-fluid table td",'a[href^="list_addresses.cgi"][href*="edit="]',"btn btn-primary btn-xxs btn-hover-hide vertical-align-top margined-top-1 margined-left--2 ---forced pull-right","fa-pencil-square-o");theme_buttonify(["/mailbox/list_addresses.cgi"],".container-fluid table td",'a[href^="save_address.cgi"],a[href^="save_group.cgi"][href*="gdelete="]',"btn btn-danger btn-xxs btn-hover-hide vertical-align-top margined-top-1 margined-left--2 ---forced pull-left","fa-times-circle");theme_buttonify(["/mailbox/list_addresses.cgi"],".container-fluid table td",'a[href="list_addresses.cgi?mode=users"],a[href="list_addresses.cgi?mode=groups"]',"btn btn-default btn-xxs btn-xxs--g-edit vertical-align-top margined-top-1 margined-left--2 pull-right btn-dnwo","fa-times-circle-o");theme_buttonify(["/cron/","/cron/index.cgi"],".container-fluid .table tbody tr td",'a.ui_link[href*="exec_cron.cgi"]',"btn btn-success btn-link-bordered btn-xxs vertical-align-top margined-top-1","fa-play");theme_buttonify(["/cron/","/cron/index.cgi"],".container-fluid .table tbody tr td",'a.ui_link[href*="kill_cron.cgi"]',"btn btn-danger btn-link-bordered btn-xxs vertical-align-top margined-top-1","fa-stop fa-0_75x no-vt-al fa-fw margined-right-1 faa-flash animated");theme_buttonify(["/at/","/at/edit_job.cgi"],".container-fluid .table tbody tr td",'a.ui_link[href*="edit_job.cgi?full=1"]',"btn btn-default btn-xxs btn-tiny btn-dnwo ui_link_replaced pull-right margined-top-2");theme_buttonify(["/phpini/","/phpini/index.cgi"],".container-fluid .table tbody tr td",'a[href*="list_ini.cgi"]',"btn btn-success btn-xxs btn-xxs f__lnk_t_btn-el vertical-align-baseline","fa-cog","","","","|");theme_buttonify(["/phpini/","/phpini/index.cgi"],".container-fluid .table tbody tr td",'a[href*="edit_manual.cgi"]',"btn btn-primary btn-xxs btn-xxs f__lnk_t_btn-el vertical-align-baseline ---forced","fa-pencil");theme_buttonify(["/virtualmin-awstats/","/virtualmin-awstats/index.cgi"],".container-fluid .table tbody tr td",'a[href*="view.cgi"]',"btn btn-success btn-xxs btn-xxs f__lnk_t_btn-el vertical-align-baseline","fa-eye","","","","|");theme_buttonify(["/virtualmin-awstats/","/virtualmin-awstats/index.cgi"],".container-fluid .table tbody tr td",'a[href*="config.cgi"]',"btn btn-grey btn-xxs btn-xxs f__lnk_t_btn-el vertical-align-baseline ---forced","fa-cog");var t=$(".container-fluid .ui_links_row"),i="ui_link_empty";if(core.curModule("firewall",1)||core.curModule("firewall6",1)){t.first().find("."+i+"").addClass("btn-warning").removeClass("btn-success")}if($('body[class*="status"]').length&&v___location_file=="edit_mon.cgi"||v___location_path==v___location_prefix+"/virtual-server/list_sched.cgi"||v___location_path==v___location_prefix+"/software/list_pack.cgi"||v___location_path==v___location_prefix+"/mailboxes/view_mail.cgi"||v___location_path==v___location_prefix+"/mailbox/view_mail.cgi"||v___location_path==v___location_prefix+"/mailboxes/reply_mail.cgi"||v___location_path==v___location_prefix+"/mailbox/reply_mail.cgi"||v___location_path==v___location_prefix+"/mailbox/list_folders.cgi"||v___location_path==v___location_prefix+"/mailbox/list_ifolders.cgi"||v___location_path==v___location_prefix+"/fsdump/"||v___location_path==v___location_prefix+"/fsdump/index.cgi"||v___location_path==v___location_prefix+"/fdisk/"||v___location_path==v___location_prefix+"/fdisk/index.cgi"||v___location_path==v___location_prefix+"/logviewer/"||v___location_path==v___location_prefix+"/logviewer/index.cgi"||v___location_path==v___location_prefix+"/syslog/"||v___location_path==v___location_prefix+"/syslog/index.cgi"){$.each($('tr td:last-child > .ui_links_row, tr td:last-child:contains("|")'),function(){var e=$(this).parent(),t="ui_link btn-inverse btn-tiny";if(v___location_path==v___location_prefix+"/virtual-server/list_sched.cgi"){e.find('a[href^="backup_form.cgi"]').html(""+e.find('a[href^="backup_form.cgi"]').text().replace(/\.\.$/," ")+"").addClass("ui_link_replaced btn btn-success btn-xxs margined-top--2 f__lnk_t_btn-el").removeClass(t).prepend('  ');e.find('a[href^="restore_form.cgi"]').html(""+e.find('a[href^="restore_form.cgi"]').text().replace(/\.\.$/," ")+"").addClass("ui_link_replaced btn btn-primary btn-xxs margined-top--2 f__lnk_t_btn-el").removeClass(t).prepend('  ');e.find('a[href^="backuplog.cgi"]').html(""+e.find('a[href^="backuplog.cgi"]').text().replace(/\.\.$/," ")+"").addClass("ui_link_replaced btn btn-info btn-xxs margined-top--2 f__lnk_t_btn-el").removeClass(t).prepend('  ')}if(v___location_path==v___location_prefix+"/fdisk/"||v___location_path==v___location_prefix+"/fdisk/index.cgi"){e.find('a[href^="edit_hdparm.cgi"]').html(""+e.find('a[href^="edit_hdparm.cgi"]').text().replace(/\.\.$/," ")+"").addClass("ui_link_replaced btn btn-success btn-xxs f__lnk_t_btn-el").removeClass("heighter-34").removeClass(t);e.find('a[href*="smart-status/index.cgi"]').html(""+e.find('a[href*="smart-status/index.cgi"]').text().replace(/\.\.$/," ")+"").addClass("ui_link_replaced btn btn-info btn-xxs f__lnk_t_btn-el").removeClass("heighter-34").removeClass(t);e.find('a[href^="blink.cgi"]').html(""+e.find('a[href^="blink.cgi"]').text().replace(/\.\.$/," ")+"").addClass("ui_link_replaced btn btn-warning btn-xxs f__lnk_t_btn-el").removeClass("heighter-34").removeClass(t)}if(v___location_path==v___location_prefix+"/mailbox/list_folders.cgi"||v___location_path==v___location_prefix+"/mailbox/list_ifolders.cgi"){e.find('a[href^="index.cgi"]').html(""+e.find('a[href^="index.cgi"]').text().replace(/\.\.$/," ")+"").addClass("ui_link_replaced btn btn-success btn-xxs").removeClass("heighter-34").removeClass(t).removeClass(t).prepend('  ');e.find('a[href^="edit_auto.cgi"]').html(""+e.find('a[href^="edit_auto.cgi"]').text().replace(/\.\.$/," ")+"").addClass("ui_link_replaced btn btn-info btn-xxs").removeClass("heighter-34").removeClass(t).removeClass(t).prepend('  ');e.find('a[href^="copy_form.cgi"]').html(""+e.find('a[href^="copy_form.cgi"]').text().replace(/\.\.$/," ")+"").addClass("ui_link_replaced btn btn-warning btn-xxs").removeClass("heighter-34").removeClass(t).removeClass(t).prepend('  ')}if(v___location_path==v___location_prefix+"/mailboxes/view_mail.cgi"||v___location_path==v___location_prefix+"/mailbox/view_mail.cgi"||v___location_path==v___location_prefix+"/mailboxes/reply_mail.cgi"||v___location_path==v___location_prefix+"/mailbox/reply_mail.cgi"){e.find('a[href^="detach.cgi"]:not([href*="&save=1"]):not([target="_blank"])').html(""+e.find('a[href^="detach.cgi"]:not([href*="&save=1"]):not([target="_blank"])').text().replace(/\.\.$/," ")+"").addClass("ui_link_replaced btn btn-primary btn-xxs").removeClass("heighter-34").removeClass(t).removeClass(t).prepend('  ');e.find('a[href*="detach.cgi"][target="_blank"]').html(""+e.find('a[href*="detach.cgi"][target="_blank"]').text().replace(/\.\.$/," ")+"").addClass("ui_link_replaced btn btn-success btn-xxs").removeClass("heighter-34").removeClass(t).prepend('  ');e.find('a[href*="&save=1"]:not([target="_blank"])').html(""+e.find('a[href*="&save=1"]:not([target="_blank"])').text().replace(/\.\.$/," ")+"").addClass("ui_link_replaced btn btn-warning btn-xxs").removeClass("heighter-34").removeClass(t).prepend('  ');e.find('a[href*="view_mail.cgi?"]:not([target="_blank"])').addClass("ui_link_replaced btn btn-default btn-xxs").removeClass("heighter-34").removeClass(t);e.find('a[href*="view_mail.cgi?"][target="_blank"]').addClass("ui_link_replaced btn btn-success btn-xxs").removeClass("heighter-34").removeClass(t).prepend('  ')}}).promise().done(function(){if($(this).is(".ui_links_row")){$(this).contents().unwrap()}else{$('tr td:last-child:contains("|")').replaceText(/\s*/gi,"").replaceText(/\|/gi,"")}});if($('body[class*="status"]').length&&v___location_file=="edit_mon.cgi"){$('#content a[href*="edit_mon.cgi?id"]').addClass("ui_link_replaced btn btn-default btn-xxs margined-bottom-2").removeClass("heighter-34").removeClass("ui_link");$('#content a[href*="edit_mon.cgi?id"]').last().css("margin-left","-1px");$('tr td:last-child:contains("|")').replaceText(/\|/gi,"")}else{$('tr td:last-child:contains("|")').contents().filter(function(){return this.nodeType==3}).remove()}if(v___location_path==v___location_prefix+"/fdisk/"||v___location_path==v___location_prefix+"/fdisk/index.cgi"){$("body").find('a[href^="blink.cgi"]:not(.ui_link_replaced)').html(""+$("body").find('a[href^="blink.cgi"]:not(.ui_link_replaced)').text().replace(/\.\.$/," ")+"").addClass("ui_link_replaced btn btn-warning btn-xxs f__lnk_t_btn-el").removeClass("heighter-34").removeClass("ui_link")}if(v___location_path==v___location_prefix+"/fsdump/"||v___location_path==v___location_prefix+"/fsdump/index.cgi"){$.each($("tr td:last-child"),function(){$(this).find('a[href^="backup.cgi"]').html(""+$(this).find('a[href^="backup.cgi"]').text().replace(/\.\.$/," ")+"").addClass("ui_link_replaced btn btn-success btn-xxs margined-top--2 f__lnk_t_btn-el").removeClass("heighter-34").removeClass("ui_link").prepend('  ');$(this).find('a[href^="kill.cgi"]').html(""+$(this).find('a[href^="kill.cgi"]').text().replace(/\.\.$/," ")+"").addClass("ui_link_replaced btn btn-danger btn-xxs margined-top-1 f__lnk_t_btn-el").removeClass("heighter-34").removeClass("ui_link").prepend('  ')})}if(v___location_path==v___location_prefix+"/syslog/"||v___location_path==v___location_prefix+"/syslog/index.cgi"||v___location_path==v___location_prefix+"/logviewer/"||v___location_path==v___location_prefix+"/logviewer/index.cgi"){$.each($("tr td:last-child"),function(){$(this).find('a[href*="save_log.cgi"][href*="view=1"], a[href*="view_log.cgi"][href*="view=1"]').html(""+$(this).find('a[href*="save_log.cgi"][href*="view=1"], a[href*="view_log.cgi"][href*="view=1"]').text().replace(/\.\.$/," ")+"").addClass("ui_link_replaced btn btn-primary btn-xxs f__lnk_t_btn-el").removeClass("heighter-34").removeClass("ui_link")})}if(v___location_path==v___location_prefix+"/software/list_pack.cgi"){var a='td a.ui_link[href*="view.cgi"]';$(a).html('').addClass("ui_link_replaced btn btn-default btn-xxs f__lnk_t_btn-el").removeClass("heighter-34").attr("style","margin-top: 2px !important; margin-bottom: 0 !important; margin-right: 15px").removeClass("ui_link").prepend('')}}if(v___location_directory_unslashed_trail_slashed==v___location_prefix_unslashed_trail_slashed+"proc/"||v___location_path_lead_unslashed==v___location_prefix_unslashed_trail_slashed+"proc/index.cgi"){if(v___location_directory_unslashed_trail_slashed==v___location_prefix_unslashed_trail_slashed+"proc/"&&v___location_file&&v___location_file.indexOf("index_")>-1||v___location_path_lead_unslashed==v___location_prefix_unslashed_trail_slashed+"proc/index.cgi"||v___location_path===v___location_prefix+"/proc/"){$("a.ui_link + b").addClass("btn").css("margin-left","3px");$("b + a.ui_link").addClass("btn").css("margin-left","3px");if($('.panel-body > b:first-child:contains(":")').length>0){$(".panel-body > b:first-child").remove()}$(".panel-body > b").addClass("btn btn-success")}$(".panel-body").contents().filter(function(){return this.nodeType==3}).remove();$(".panel-body > a.ui_link").addClass("btn").css("margin-left","3px")}if(!e){if(v___location_directory_unslashed_trail_slashed==v___location_prefix_unslashed_trail_slashed+"fdisk/"||v___location_directory_unslashed_trail_slashed==v___location_prefix_unslashed_trail_slashed+"postfix/"||v___location_directory_unslashed_trail_slashed==v___location_prefix_unslashed_trail_slashed+"pam/"||v___location_directory_unslashed_trail_slashed==v___location_prefix_unslashed_trail_slashed+"logviewer/"||v___location_directory_unslashed_trail_slashed==v___location_prefix_unslashed_trail_slashed+"syslog/"){$("p > a[href], table + a[href], div.panel-body > a.ui_link").each(function(e,t){$(this).text($(this).text().replace(/\.$/,""))})}var n=".container-fluid .panel-body";$(""+n+" a.select_all,"+""+n+" a.select_invert,"+""+n+" a.select_invert ~ .ui_link,"+""+n+" .ui_links_row > *:not(.ui_link_empty, .ui_link_replaced),"+""+n+" .ui_link:not(.ui_link_empty)").each(function(){if(core.error.get()){return}if(v___location_path&&v___location_path.indexOf("/sysinfo.cgi")>-1){return}if(core.curModuleFile("acl")){if(this.href&&this.href.includes("edit_user.cgi?user")){return}}if($(this).parent("td").length||$(this).parent("label").length||$(this).parent("tt").length||$(this).parent("th").length||$(this).parents("b").length||$(this).parent("pre").length||core.curModuleFile("virtual-server","cert_form.cgi")&&$(this).attr("href")&&$(this).attr("href").includes("edit_domain.cgi")||$(this).parents('[data-dcontainer="1"]').length&&unbuffered_header_processor_allow(v___location_path)||v___location_path==v___location_prefix+"/webmin_search.cgi"){return}if(!core.curModuleFile("virtual-server","history.cgi")&&!core.curModuleFile("server-manager","bwgraph.cgi")&&!core.curModuleFile("server-manager","one_history.cgi")&&!core.curModule("proc")&&v___location_directory_unslashed_trail_slashed!=v___location_prefix_unslashed_trail_slashed+"passwd/"&&$(this).text()&&v___location_path!=v___location_prefix+"/mailboxes/"&&v___location_path!=v___location_prefix+"/mailboxes/index.cgi"&&v___location_path!=v___location_prefix+"/usermin/list_configs.cgi"&&!$(this).hasClass("help_popup")||core.curModule("procmail")){$(this).addClass("btn btn-inverse btn-tiny ui_link_replaced");$(this).html(""+$(this).text().replace(/\.$/,"")+"");var e=$(this).parent().contents().filter(function(){return this.nodeType==3});if(e){$.each(e,function(){if($(this).text()&&$(this).text().length<=3){$(this).remove()}})}if($(this).hasClass("select_all")){$(this).html(' '+$(this).text()+"")}if($(this).hasClass("select_invert")){$(this).html(' '+$(this).text()+"")}if((core.curModuleFile("server-manager","index.cgi")||core.curModuleFile("server-manager",""))&&($(this).parent('form[action="mass.cgi"]').length||$(this).parent(".ui_links_row").parent('form[action="mass.cgi"]').length)){if($(this).is(":nth-child(1)")||$(this).is(":nth-child(6)")){$(this).html(' '+$(this).text()+"")}if($(this).is(":nth-child(2)")||$(this).is(":nth-child(7)")){$(this).html(' '+$(this).text()+"")}if($(this).is(":nth-child(3)")||$(this).is(":nth-child(8)")){$(this).html(' '+$(this).text()+"")}}if(core.curModuleFile("mount","index.cgi")||core.curModuleFile("mount","")){var t=$(this).attr("href");if(t){$(this).html(' '+$(this).text()+"")}}if($(this).attr("href")&&($(this).attr("href").indexOf("edit")===0&&$(this).attr("href").indexOf("edit_allow")!==0||$(this).attr("href").indexOf("master_form")===0||$(this).attr("href").indexOf("slave_form")===0||$(this).attr("href").indexOf("stub_form")===0||$(this).attr("href").indexOf("forward_form")===0||$(this).attr("href").indexOf("delegation_form")===0||$(this).attr("href").indexOf("mass_form")===0||$(this).attr("href").indexOf("newdb_form")===0)){$(this).html(' '+$(this).html())}else{if($(this).attr("href")&&$(this).attr("href").indexOf("edit_allow")===0){$(this).html(' '+$(this).text()+"")}else{if($(this).attr("href")&&$(this).attr("href").indexOf("mass_ucreate")===0){$(this).html(' '+$(this).text()+"")}if($(this).attr("href")&&$(this).attr("href").indexOf("grace_form")>-1){$(this).html(' '+$(this).text()+"")}}}if($(this).attr("href")&&$(this).attr("href").indexOf("edit_manual")>-1){$(this).html(' '+$(this).text()+"")}if(core.curModule("custom")){if($(this).attr("href")&&$(this).attr("href").indexOf("edit_cmd.cgi?new")===0){$(this).html(' '+$(this).text()+"")}if($(this).attr("href")&&$(this).attr("href").indexOf("edit_file.cgi?new")===0){$(this).html(' '+$(this).text()+"")}if($(this).attr("href")&&$(this).attr("href").indexOf("edit_sql.cgi?new")===0){$(this).html(' '+$(this).text()+"")}}if(!$(this).attr("href")){$(this).remove()}}});var r="btn-tiny",l="ui_link_replaced";$.each($(".btn-group.ui_links_row > .ui_link_empty"),function(){if($(this).prev("."+r+"."+l+"").length||$(this).next("."+r+"."+l+"").length){$(this).addClass(""+r+" "+l+"")}});$.each($("."+r+"."+l+""),function(){if($(this).prev('[class="table table-striped table-condensed"]').length&&$(this).next(':not(".ui_link_replaced")').length){$(this).removeClass("btn-tiny ui_link_replaced").addClass("ui_link_re-replaced")}});$("a.ui_link_replaced").each(function(){if($(this).prev().is("b")){$(this).prev("b").addClass("btn btn-success btn-tiny")}if($(this).next().is("b")){$(this).next("b").addClass("btn btn-success btn-tiny")}if(core.curModule("htaccess-htpasswd")){$("table tr.ui_checked_columns .ui_links_row > a").addClass("btn-link btn-link-bordered btn-xxs btn-hover-hide").removeClass("btn-tiny btn-inverse")}});if(v___location_directory_unslashed_trail_slashed==v___location_prefix_unslashed_trail_slashed+"fetchmail/"){$("#content a.ui_link").each(function(){$(this).addClass("btn btn-inverse btn-tiny ui_link_replaced").css("margin-bottom","3px").css("margin-top","-3px");$(this).html(""+$(this).text().replace(/\.$/,"")+"");$(this).parent().contents().filter(function(){return this.nodeType==3}).remove();var e=function(e){return' '};if($(this).attr("href").indexOf("edit_poll")>-1){$(this).prepend(e("plus-square-o"))}if($(this).attr("href").indexOf("edit_global")>-1){$(this).prepend(e("pencil-square-o"))}if($(this).attr("href").indexOf("check")>-1){$(this).prepend(e("check-square-o"))}})}if(v___location_directory_unslashed_trail_slashed==v___location_prefix_unslashed_trail_slashed+"filter/"){$("#content a.ui_link").each(function(){function e(e){return' '}if($(this).attr("href").indexOf("edit_auto")>-1){$(this).find("i").replaceWith(e("reply"))}if($(this).attr("href").indexOf("edit_forward")>-1){$(this).find("i").replaceWith(e("reply-all"))}})}}if(v___location_path==v___location_prefix+"/virtual-server/domain_form.cgi"||v___location_path==v___location_prefix+"/server-manager/list_images.cgi"||v___location_path==v___location_prefix+"/virtual-server/bwgraph.cgi"||v___location_path==v___location_prefix+"/server-manager/bwgraph.cgi"){$(".panel-body > .ui_links_row > ").each(function(){$(this).addClass("btn btn-inverse btn-tiny ui_link_replaced").removeClass("ui_link");$(this).html(""+$(this).text().replace(/\.$/,"")+"");if($(this).hasClass("btn-success")){$(this).removeClass("btn-inverse")}});$.each($(".panel-body > .ui_links_row > .ui_link_empty"),function(){if($(this).text().replace(/[\t\n]+/g," ").length<4){$(this).remove()}else{$(this).html(""+$(this).text().replace("|","").replace("|","").replace(/(?:\r\n|\r|\n)/g,"")+"");if($(this).prev().is("img")){$(this).removeClass().addClass("margined-left-3")}}});$(".panel-body > b").css("margin-right","7px");if(v___location_path==v___location_prefix+"/virtual-server/domain_form.cgi"){$.each($(".panel-body > .ui_links_row > .btn"),function(e,t){if(e==0){$(this).html(' '+$(this).text()+"")}if(e==1){$(this).html(' '+$(this).text()+"")}if(e==2){$(this).html(' '+$(this).text()+"")}if(e==3){$(this).html(' '+$(this).text()+"")}})}if(v___location_path==v___location_prefix+"/server-manager/bwgraph.cgi"){var o=".container-fluid .panel-body",s=$(o+" .btn-info"),_=$(o+' [name="ago"]');s.removeClass("btn-info").addClass("btn-default heighter-28 margined-left--4");s.find(".fa").remove();_.next(".btn-default").addClass("margined-left--7");_.prev("b").addClass("font-weight-normal")}}if(v___location_path==v___location_prefix+"/server-manager/edit_serv.cgi"||v___location_path==v___location_prefix+"/server-manager/edit_owner.cgi"){$('.table-striped .col_value a[href^="edit_serv.cgi"], .table-striped .col_value a[href^="edit_owner.cgi"]').each(function(){$(this).addClass("btn btn-inverse btn-xxs ui_link_replaced margined-right--2").removeClass("btn-tiny ui_link");$(this).html(""+$(this).text().replace(/\.$/,"")+"");if($(this).hasClass("btn-success")){$(this).removeClass("btn-inverse")}});$.each($(".table-striped .col_value .ui_links_row > .ui_link_empty"),function(){$(this).addClass("btn-xxs ui_link_replaced").removeClass("btn-tiny ui_link");if($(this).text().length<4){$(this).remove()}else{$(this).html(""+$(this).text().replace("|","").replace("|","").replace(/(?:\r\n|\r|\n)/g,"")+"")}})}$("a.ui_link, .btn").each(function(){if($(this).text().substr(-1)=="."&&!$(this).parent().is("label")){var e=$(this).text().substr(-1)=="."&&$(this).text().substr(-2)==".."?2:1;$(this).html(""+$(this).text().substr(0,$(this).text().length-e)+"")}})};snippets.page.render_table_labels=function(e){if(plugins.page.format.columns()||matchMedia("(max-width: 992px)").matches){return}var t="vertical-align-top",i="no-vr-al-tp";e.find("td.col_label:not(."+t+"):visible").each(function(){var e=$(this).next(".col_value"),a=$(this).find("b"),n="inline-block margined-top-",r=browser.detect.firefox(),l=$(this).parent("tr"),o=l.parent().hasClass("td-counter")?0:l.children("td").length;if(o>2){l.parent().addClass("td-counter td-count-"+o+"")}if(Math.round(this.clientHeight)>=30){$(this).addClass(t);var s="table",_="input",c="select",d="textarea",f="upload",p="el-wp-chooser",u="ui_",h="password",g="textbox",m="hidden",v="opener_shown",b="br",x="t-password-complexity-meter-wrapper-cont",y="heighter",w="force",k="ds-bl-fs",C=$(e.find(""+_+":not(."+u+""+m+'):not([type="'+m+'"]), '+c+", "+d+"")[0]),M=C.is("."+u+""+g+""),F=C.is("."+u+""+c+", ."+u+""+f+"")?C:false,j=C.is("."+u+""+d+""),T=C.parent().is("."+p+""),q=e.find(""+s+":visible"),O=q.find("tr").first().find("td").first().outerHeight(),z=q.length;if(T){if($(e.children()[0]).is("."+p+"")){j=true}}var S=a.parents("."+v+"").length,A=S?3:2,I=e.children(),H=I.filter(""+b+", ."+k+"").index(),W=H===-1?I:I.slice(0,H),L=I[0],E=0;if(e.find("."+u+""+c+"").length||e.find(c).length||e.find("."+p+"").length||e.find("."+u+""+g+"").length||e.find("."+u+d).length||e.find("."+u+"opt_"+g+"").length||e.find(""+_+'[type="text"]').length||e.find("."+u+h).length||e.find(""+_+'[type="'+h+'"]').length||z||M||F||j){if(S&&this.clientHeight>=32){A=5}var P=0;W.filter(function(){var e=this.clientHeight;if(!e){e=parseInt($(this).find(""+_+", "+d+", "+c+"").first().css("height"))}if(P=32){R="6"}}if(this.clientHeight<48||P<=20||D||N){a.addClass(n+R+"")}return}else if(P<=20){A=-1}else if(W.filter("."+p+"").length||H===-1&&I.last().is("."+p+"")){var U=I.filter("."+p+"").find("."+u+"opt_"+g+", ."+u+g+", ."+u+d+", "+_+"").outerHeight(true);if(U<=28){E=1;A+=1}else if(U>64){A=0}else if(U==30){A=4}else{A+=3}if(j&&!U>=32){A=-2}}else if(I&&I[0]){if($(L).hasClass(k)||$(L).is(b)){A-=2}else if(M){A+=S?1:2}else if(F){if(e.find(""+c+"[multiple]").length){A=-1}}else if(j){A=-1}else if(e.find("."+x+"").length){var Q="4";a.addClass(n+Q+"");return}}if(!E&&(A==3||A==2)){A=4}a.addClass(n+A+"")}}else if(this.clientHeight<=22){var Y=e.find(".graph-container")[0];if(e.find(".awobject").length){if(this.clientHeight<=20&&!r||this.clientHeight===22&&r){var B=0;if(r){B=1}$(this).addClass(i);a.addClass(n+B+"")}}else if(Y){var V=-4;$(this).addClass(i);a.addClass(n+V+"")}else if(this.clientHeight===18){var J=-1;$(this).addClass(i);a.addClass(n+J+"")}}}).promise().done(function(){var e=$(this)[0],t="hover",i="table",a=""+i+"-"+t+"";if(e){$(e).parents("."+i+"").removeClass(""+a+" "+a+"-force").addClass("no-"+t+"")}})};snippets.page.render=function(pjax_popstate){vars.page_interaction=v___initial_load?-1:0;page_control_header();if(!settings_sysinfo_expand_all_accordions&&settings_sysinfo_remember_accordions){plugins.dashboard.restore()}quirks.clean();plugins.navigation.state.update();var needs_restart_from=session.server.data("needs-restart");if(needs_restart_from&&!vars.cache.norestart&&!vars.ajax.progressing&&!v___initial_load&&session.server.data("product")==="webmin"){theme.restart_message(needs_restart_from)}if(pjax_popstate){$(".popover.in").remove()}else{(function(){var e=$('.container-fluid > .panel > .panel-heading a[href*="config.cgi"]');if(e.length){var t=" "+theme_shortcuts_generate("conf"),i=e.text();e.text(i+t)}})()}if(pjax_popstate&&typeof __cm_editor_static!="undefined"){__cm_editor_static.toTextArea();$('button[data-form="submitter"]').unwrap();$('.CodeMirror, button[data-form="submitter"] + button, .-helper.__helper, .-helper.soft_wt').remove()}(function e(){var t=$("body");t.off("mousedown.cm1 keydown.cm1");t.undelegate('button[type="submit"]:not(.disabled)',"click.cm");t.undelegate('button[data-form="submitter"]:not(.disabled)',"click.cm")})();table_proc_size_columns();$("body").attr("style",session.server.data("style"));$.each($('select[onchange="form.submit()"]'),function(){$(this).removeAttr("onchange").addClass("onchange_form_submit_triggger")});page.handle.content.offset(true);if(editor_init_check()){var select_for_edited_file=$('select[name="file"]:first, select[name="manual"]:first');select_for_edited_file.addClass("onchange_form_submit_triggger");select_for_edited_file.next("button.ui_form_end_submit").addClass("hidden")}snippets.datetime.locale();if(get_access_level()==3&&core.curModule("quota")){var $_table_quota=$(".container-fluid .panel-body .table"),$_table_quota_empty_label=$_table_quota.find("thead:first-child").add($_table_quota.find("thead:first-child").next("tbody")).remove()}if($.support.spa&&core.curModule("tunnel")){$("#content .container-fluid form.ui_form[action]").on("submit",function(e){var t=$(quirks.active_element());e.preventDefault();e.stopPropagation();progress.start();$.ajax({type:$(this).attr("method")?"GET":"POST",url:v___location_prefix+"/"+v___module+"/"+$(this).attr("action"),data:get_form_data($(this)),dataType:"text",complete:function(e){if(!session.status(e)){return}theme_open_new_tab(this.url);t.removeClass("disabled").find("i").removeClass("invisible").next(".cspinner_container").remove();progress.end()}})})}if(core.curModule("tunnel")){var $tunnel_form=$('.ui_form[action="seturl.cgi"]'),$input=$tunnel_form.find("input"),$btn=$tunnel_form.find("button"),$b=$tunnel_form.find("b"),b_text=$b.text().replace(/:$/,"");$b.remove();$input.attr("placeholder",b_text).css({width:"100%",height:"32px",minHeight:"32px"});$btn.addClass("btn-block margined-top--1")}if(check_location_resource("/config.cgi?tunnel")){$('table table[width="100%"] tr:first-child').addClass("hidden")}$.each($('tr td:last-child a:contains("..")'),function(){if(v___location_path==v___location_prefix+"/virtual-server/list_databases.cgi"){if($(this).attr("href")&&$(this).attr("href").includes("showpass.cgi")){return true}$(this).html($(this).text().replace(/\.\.$/," ")).addClass("ui_link_replaced btn f__lnk_t_btn-el btn-transparent btn-link-bordered btn-xxs margined-top--3").removeClass("ui_link")}});if($.support.spa&&!pjax_popstate){var is_error_page=$(".container-fluid .panel > .panel-body > [data-fatal-error-text]").length;if(v___location_file&&v___location_file.includes("error")&&!v___location_file.includes("edit_")){is_error_page=1}!is_error_page&&$("#headln2c").prepend(" ')}plugins.favorites.detect();if(v___location_directory_unslashed_trail_slashed==v___location_prefix_unslashed_trail_slashed+"init/"){$("table.table tbody tr").addClass("ui_checked_columns")}page_table_rows_control();!pjax_popstate&&page_radios_evolve();var on_load_checkbox_sel_str='.container-fluid .ui_checked_columns td.ui_checked_checkbox input[type="checkbox"]:checked';$(on_load_checkbox_sel_str).parents("tr.ui_checked_columns").addClass("hl-aw");$(""+on_load_checkbox_sel_str+"[disabled]").parents("tr.ui_checked_columns").addClass("hl-aw-chk");if($("body").hasClass("servers")){if(core.curModuleFile("servers","index.cgi")||core.curModuleFile("servers","")){vars.pjax.cache.set("disable")}var form_selector='form[action="delete_servs.cgi"]',servers_selector_str=$(form_selector).length?""+form_selector+" a.icon_link, "+form_selector+" a.ui_link, "+form_selector+" .col-xs-1":'.container-fluid > .panel > .panel-body > .row a[href*="link.cgi/"]',$form_logouts_a=$(form_selector).find('a[href^="logout.cgi"]'),form_logouts_a_title=$form_logouts_a.length?$form_logouts_a.first().text():String();setTimeout(function(){if($form_logouts_a.length){$form_logouts_a.each(function(){var e=form_logouts_a_title;if(e){e=$.trim(Convert.strUpFirst(e.replace(/[\(\)]/g,"")))}$(this).addClass("gl-icon-logout").attr("title",e).attr("aria-label",e).html('');var t=$(this).parent(),i=$(this).detach();t.before(i)})}},1);$(servers_selector_str).on("click",function(e){if($(e.target).is(".gl-icon-select")){$.support.spa?$(this).trigger("contextmenu"):$(this).parents(".gl-icon-container").trigger("contextmenu");return}var t=v___location_href+$(this).attr("href"),i=$(this).attr("href");if(i&&i.indexOf("edit_serv.cgi")>-1||i&&i.indexOf("logout.cgi")>-1){if(e.originalEvent!==undefined){$.pjax.click(e,{timeout:0,push:get_pjax_push(),type:get_pjax_type(),container:"[data-dcontainer]",fragment:"[data-dcontainer]"})}}else{var a=vars.events.keypressed.ctrl;if(i&&i.indexOf("://")===-1){var n=link_type_convert(t,1),r="/index.cgi",l="link.cgi/",o=r+l;if(n&&n.includes(o)){n=n.replace(o,"/"+l)}if(a){open(n)}else{progress.start();location.href=n}}else{if(a){open(i)}else{progress.start();location.href=i}}}e.preventDefault();e.stopPropagation()})}if(!pjax_popstate){if($(".opener_container").length){$.each($(".opener_container"),function(){if($(this).find(".opener_shown").is(":visible")){$(this).parent("tr").prev("tr").find("td a:nth-child(1)").addClass("opener_container_opened").removeClass("opener_container_closed")}})}if($(".opener_shown, .opener_hidden").length>0){if($(".opener_trigger").length>0){$(".panel-body .ui_form .table tbody tr").removeClass("thead");$(".opener_trigger").parents("table.table").addClass("opener_table_style");$(".opener_trigger").parents("tr").addClass("_c__op_r").attr("style","border: 0 !important");$(".opener_trigger").parent("td").addClass("_c__op_d");$(".opener_trigger").parent("td").find("a").addClass("link_hover_effect link_hover_effect_style_extra")}}var target_restore_selector='a[id*="opener"][id$="_restore"]';if($(target_restore_selector).parent().is("p")){$(target_restore_selector).next("a").parent("p").replaceTagName("div");$(target_restore_selector).next("a").removeClass().addClass("opener_extra_container_a_style link_hover_effect").parent("div").addClass("opener_extra_container opener_extra_container_style margined-top-10");$(target_restore_selector).remove()}var $hidden_opener_trigger=$('a[href^="javascript:hidden_opener"]:not(".opener_trigger")');if($hidden_opener_trigger.length>0){$hidden_opener_trigger.each(function(e,t){var i=v___location_path==v___location_prefix+"/virtual-server/backup_form.cgi"&&v___location_href&&v___location_href.indexOf("?sched=")>-1?true:false;$(this).find("img").length>0?$(this).remove():false;$(this).css("border-bottom","0");$(this).parent("td:not('.col_label'):not('.col_value'), td.col_header").addClass("opener_table_cell_style_small");if(!i){$(this).parent("td:not('.col_label'):not('.col_value'), td.col_header").addClass("opener_table_cell_style_small opener_table_cell_style_small_exclusion_border_top");$(this).parent("td:not('.col_label'):not('.col_value'), td.col_header").parent("tr").parent("tbody").parent("table").parent("div.opener_hidden").addClass("opener_shown_inner").parent(".opener_container").addClass("has_sub_inner")}$(this).parent("td:not('.col_label'):not('.col_value'), td.col_header").find("a").addClass("link_hover_effect link_hover_effect_style");if($(this).parent().is(".panel-body")||$(this).parent().is(".ui_form")||$(this).parent().is("p")){var a=$(this),n=a.parent().is(".panel-body")?".panel-body":a.parent().is("p")?"p":".ui_form";var r=a.parent(n).find('a[href^="javascript:hidden_opener"]'),l='
          ';if(core.curModuleFile("bind8","edit_zonekey.cgi")){r.eq(1).wrapAll(l);r.eq(e+1).wrapAll(l)}else{r.eq(e+1).wrapAll(l)}a.parent('.panel-body > a[href^="javascript:hidden_opener"]:first-child').remove();var o=a.parent(n).find(".opener_extra_container");$(o).next("br").remove();$(o).addClass("opener_extra_container_style");$(o).find("a").addClass("opener_extra_container_a_style link_hover_effect");$(o).next(".opener_hidden").attr("style","padding:8px")}});$.each($(".opener_hidden"),function(){$(this).css("display","none")})}$("a.opener_trigger").each(function(){$(this).parent("td").css("text-align","left")});$('form[action*="seen_newfeatures.cgi"]').each(function(){$(this).parents("table.table-striped").next(".ui_form_end_buttons").css("margin-top","14px")});$("#tall_0").before("
          ");$(".opener_container").each(function(e,t){if($(this).find("div").hasClass("opener_hidden")){$(this).hide()}else{$(this).show()}});$.each($("div.barchart"),function(){var e=$(this).find('img[src*="red.gif"]'),t=$(this).parent("td").contents().filter(function(){return this.nodeType==3}).text();if(e&&e.attr("width")){$(this).parent("td").html('
          '+t+'
          '+e.attr("width")+"
          ")}});$('.panel-body > form > table > tbody > tr > td:has(input[type="submit"])').parents("table.table-hardcoded > tbody > tr").css("border","none").parents("table").css("margin-top","20px");$('.panel-body > form > table > tbody > tr > td:has(input[type="submit"])').parents("table.table-hardcoded > tbody").css("border","none");$('.ui_grid_table > tbody > tr.ui_grid_row > td:has(button[type="submit"])').parents("table.ui_grid_table").css("border","none");$("form.ui_form > table label.radio, form.ui_form > table label.checkbox").each(function(){var e=$(this),t=e.find("i.fa"),i=e.find("i.fa").text().trim(),a=e.text().trim();if(i.length===0&&a.length===0){t.parent("label").remove()}})}theme.config.events(pjax_popstate);$("#system-status > div.panel-body > table > tbody > tr > td").on("mouseover",function(){$(this).find(".btn-hidden").removeClass("hidden")}).on("mouseout",function(){$(this).find(".btn-hidden").addClass("hidden")});if(core.curModule("bind8")){var $table_data_recursive_tree=$(".container-fluid table[data-recursive_tree]");if($table_data_recursive_tree.length){$table_data_recursive_tree.removeClass().addClass("table table-hover");$.each($table_data_recursive_tree.find('img[src*="images/"]'),function(e,t){var i=$(this);if(Test.strContains(i.attr("src"),"close")){i.replaceWith('')}if(Test.strContains(i.attr("src"),"open")){i.replaceWith('')}if(Test.strContains(i.attr("src"),"smallicon")){i.replaceWith('')}})}}if(core.curModule("software")&&(Test.strContains(v___location_file,"tree.cgi")||Test.strContains(v___location_file,"ipkg-tree.cgi"))||core.curModuleFile("cluster-software","edit_host.cgi")){$('img[src*="images/"]').each(function(e,t){var i=$(this);i.next("a").removeClass();if(Test.strContains(i.attr("src"),"close")){i.replaceWith('')}if(Test.strContains(i.attr("src"),"open")){i.replaceWith('')}if(Test.strContains(i.attr("src"),"pack")){i.replaceWith('')}});if(Test.strContains(v___location_file,"ipkg-tree.cgi")){$('form[action*="ipkg-tree.cgi"] + script + p > a, form[action*="ipkg-tree.cgi"] + script + p + table +p > a').addClass("margined-top-10")}}if(core.curModule("mysql")||core.curModule("postgresql")){$('a > img[src*="images/left.gif"]').each(function(e,t){var i=$(this);i.replaceWith('')});$('a > img[src*="images/right.gif"]').each(function(e,t){var i=$(this);i.replaceWith('')})}if(core.curModuleFile("virtual-server","list_scripts.cgi")){$('td > a > img[src*="images/staroff.gif"]').each(function(e,t){var i=$(this);$(t).attr("src",""+v___location_prefix+"/images/staroff.gif")});$('td > a > img[src*="images/staron.gif"]').each(function(e,t){var i=$(this);$(t).attr("src",""+v___location_prefix+"/images/staron.gif")})}if(v___location_directory_unslashed_trail_slashed==v___location_prefix_unslashed_trail_slashed+"status/"){$("td img").each(function(e,t){var i=t.src;if(i){var a=i.match(/images\/(.*)\./),n=a&&a[0]&&a[1]?a[1]:String(),r="fa fa-fw fa-1_15x fa-check text-success";if(n==="down"){r="fa fa-fw fa-1_15x fa-times-circle text-danger"}else if(n==="timed"){r="fa fa-fw fa-clock text-warning fa-1_15x"}else if(n==="webmin"){r="fa fa-fw fa-webmin fa-1_15x text-warning"}else if(n==="skip"){r="fa2 fa-fw fa2-minus fa-1_15x text-semi-dark vertical-align-middle"}else if(n==="not"){r="fa2 fa-fw fa2-not-interested fa-1_15x text-semi-dark"}else if(n==="quest"){r="fa fa-fw fa-question-circle fa-1_15x text-semi-dark"}if(n){$(t).replaceWith('')}}})}if(core.curModule("proc")||core.curModule("firewall")||core.curModule("firewall6")||core.curModule("shorewall")||core.curModule("shorewall6")||core.curModuleFile("pam","edit_pam.cgi")||core.curModule("filter")){$("td a img[src], td label a img[src]").parents("td").addClass("text-center").attr("data-arrange",1);$('td img[src*="images/gap.gif"]').replaceWith('');$('td a img[src*="images/down.gif"]').replaceWith('');$('td a img[src*="images/up.gif"]').replaceWith('');$('td a img[src*="images/after.gif"]').replaceWith('');$('td a img[src*="images/before.gif"]').replaceWith('')}if(core.curModule("squid")||core.curModule("cron")){$('td a img[src*="images/movedown.gif"]').replaceWith('');$('td a img[src*="images/moveup.gif"]').replaceWith('')}if(core.curModule("cron")){$('td a img[src*="images/bottom.gif"]').replaceWith('');$('td a img[src*="images/top.gif"]').replaceWith('')}$("input").each(function(e,t){if($(this).attr("src")=="images/ok.gif"){$(t).attr("src",""+v___location_prefix+"/"+$(this).attr("src"));$(this).parents("td").attr("style","white-space: nowrap")}});core.curModule("commands")&&$("body").addClass("custom");if(!pjax_popstate){if(core.curModuleFile("custom","view.cgi")){var $_t_title=$('form[action="save.cgi"]').find(".table-title"),$_tt=$_t_title.find("tt").detach();$("#headln2c").find("[data-main_title]").after("
          "+$_tt[0].outerHTML+"
          ");$_t_title.remove()}$.each($(".container-fluid .panel-body table tr:empty"),function(){$(this).remove()});$.each($("span > input"),function(){var e=$(this).parent("span").next(".chooser_button"),t=$(this).parent("span").next('input[type="button"][onclick]'),i=$(this).parent("span").next("select");if(e){e.attr("style","display: inline; width:40px; height: 28px; margin-right:0 !important; margin-top:4px !important;").find("i.fa-files-o").css("margin-top","0").addClass("vertical-align-middle")}if($(this).parents(".tab-content")){e.css("margin-top","4px")}if(t){t.attr("style","display: inline; width:40px; height: 28px; margin-right:0 !important; vertical-align: middle").next("i.fa-files-o").css("margin-top","11px").addClass("vertical-align-middle");t.attr("style","display: inline; width:40px; height: 28px; margin-right:0 !important; vertical-align: middle").next("i.fa-calendar").attr("style","margin-top: 21px !important; font-size: 11px; margin-left: -27px; pointer-events: none;")}});$.each($('input[type="button"][onclick^="ifield"]'),function(e,t){$(this).css("margin-left","0").css("width","40px").css("height","28px")});$('.ui_form[action="switch.cgi"] > input.form-control.ui_textbox').next('input[type="button"][onclick^="ifield"]').attr("style","margin-top: 2px !important; margin-bottom: 2px !important; margin-left: 0 !important");setTimeout(function(){$('.ui_form[action="switch.cgi"] .file_chooser_button_attached').attr("style","font-size: 11px; pointer-events: none; margin-top: 14px !important;")},10);if(v___location_directory_unslashed_trail_slashed==v___location_prefix_unslashed_trail_slashed+"cshrc/"){$("textarea").each(function(e,t){$(this).attr("style","height: 20em !important")})}if(v___location_path==v___location_prefix+"/acl/"||v___location_path==v___location_prefix+"/acl/edit_user.cgi"){$('.ui_grid_table.table-hardcoded .ui_grid_row .ui_grid_cell input[type="checkbox"], .table-hardcoded .col_value input[type="checkbox"]').each(function(e,t){$(this).attr("style","vertical-align: bottom !important")})}if(core.curModule("custom")||core.curModule("commands")){$(".panel-body > .ui_grid_table.table-hardcoded").each(function(e,t){$(this).attr("style","margin-top: 3px !important")});$(".panel-body td > .ui_form").each(function(){$(this).attr("style","padding-top: 0 !important")});$(".panel-body > a.ui_link").each(function(e,t){$(this).addClass("btn btn-inverse btn-tiny ui_link_replaced").removeClass("ui_link");$(this).text($(this).text().replace(/\.$/,""));$(this).parent().contents().filter(function(){return this.nodeType==3}).remove();if($(this).attr("href").indexOf("edit_cmd.cgi?new")===0){$(this).html(' '+$(this).text()+"")}if($(this).attr("href").indexOf("edit_file.cgi?new")===0){$(this).html(' '+$(this).text()+"")}if($(this).attr("href").indexOf("edit_sql.cgi?new")===0){$(this).html(' '+$(this).text()+"")}});$.each($("td[data-td-e] > .ui_links_row"),function(){var e=$(this).parent();e.find('a[href^="edit_"]').addClass("ui_link_replaced btn btn-xxs btn-transparent btn-link-bordered f__lnk_t_btn-el").css("margin-right","3px").removeClass("ui_link").prepend(' ');e.parents("table").find("thead > tr > th:eq(2)").addClass("pointer-events-none")}).promise().done(function(){if($(this).is(".ui_links_row")){$(this).contents().unwrap()}});$.each($("td.col_value.col_header > .ui_links_row"),function(){}).promise().done(function(){if($(this).is(".ui_links_row")){$(this).contents().unwrap()}});theme_buttonify(["/custom/","/custom/index.cgi","/commands/","/commands/index.cgi"],".container-fluid table td[data-td-e]:nth-child(3)",'a[href^="form.cgi"]',"btn btn-primary btn-xxs vertical-align-top margined-top-1 margined-left--2 ---forced","fa-cog","","","","|");theme_buttonify(["/custom/","/custom/index.cgi","/commands/","/commands/index.cgi"],".container-fluid table td[data-td-e]:nth-child(3)",'a[href^="run.cgi"], a[href^="sql.cgi"]',"btn btn-success btn-xxs vertical-align-top margined-top-1 margined-left--2 ---forced","fa-play fa-0_85x","","","","|");theme_buttonify(["/custom/","/custom/index.cgi","/commands/","/commands/index.cgi"],".container-fluid table td[data-td-e]:nth-child(3)",'a[href^="view.cgi"]',"btn btn-info btn-xxs vertical-align-top margined-top-1 margined-left--2 ---forced","fa-pencil-square-o","","","","|");theme_buttonify(["/custom/","/custom/index.cgi","/commands/","/commands/index.cgi"],".container-fluid table td[data-td-e]:nth-child(3)",'a[href^="sqlform.cgi"]',"btn btn-info btn-xxs vertical-align-top margined-top-1 margined-left--2 ---forced","fa-cog","","","","|");theme_buttonify(["/custom/","/custom/index.cgi","/commands/","/commands/index.cgi"],".container-fluid table.ui_grid_table td:last-child",'a[href^="edit_"]',"btn btn-default btn-transparent btn-transparent-link btn-xxs vertical-align-top margined-top-1 margined-right-5 pull-right btn-dnwo ---forced","fa-pencil","","","","|");$('body[class*="custom"] table.ui_grid_table tr td > form .table-responsive table tr:first-child td.col_header button.ui_submit').prepend('');$.fn.eW=function(e,t){if(!$.fn.eW.fakeEl){$.fn.eW.fakeEl=$("").hide().appendTo(document.body)}$.fn.eW.fakeEl.text(e||this.val()||this.text()||this.attr("placeholder")).css("font",t||this.css("font"));return $.fn.eW.fakeEl.width()+2};$('table.ui_grid_table td input[type="text"], table.ui_grid_table td input[type="password"], table.ui_grid_table td textarea').on("input",function(){var e=$(this).eW()+15;if($(this).attr("type")==="password"){}$(this).css({width:e})}).trigger("input");var is_two_columns=$(".sub_table_container").first().find('td[colspan="4"]').length?0:1;var $empty_cells=$("table.ui_grid_table tbody tr.ui_grid_row td.ui_grid_cell");$.each($empty_cells,function(){var e=$(this).html();if(e=="
          "||e.length<10){$(this).remove()}if(is_two_columns){$(this).addClass("no-contents");$(this).parent("tr").addClass("no-contents")}})}if(check_current_file("config.cgi")&&v___location_query&&v___location_query.includes("custom")||check_current_file("edit_configs.cgi")&&v___location_query&&v___location_query.includes("mod=commands")){$('[name="width_def"], [name="height_def"], [name="wrap"]').parent().parent("td").parent("tr").addClass("hidden")}snippets.page.render_links(pjax_popstate);if(core.curModuleFile("fdisk","edit_disk.cgi")){$.each($(".panel-body > table.table.table-striped tbody tr"),function(){var e=$(this).find("td:nth-child(3)");if(e.find('img[src*="images/use"], img[src*="images/gap"]').length){e.addClass("extent-graphs")}})}if(v___location_path==v___location_prefix+"/virtual-server/edit_link.cgi"){$(".table-hardcoded").find('input[name="open"]').parent("td").parent("tr").remove()}if(v___location_directory_unslashed_trail_slashed==v___location_prefix_unslashed_trail_slashed+"init/"){$('.table.table-striped.table-condensed tr.tr_tag td[data-td-e] input[type="checkbox"]').each(function(e,t){$(this).attr("style","vertical-align: middle !important")})}if(v___location_path_lead_unslashed==v___location_prefix_unslashed_trail_slashed+"proc/edit_proc.cgi"){$("#signal").attr("style","margin-bottom: 0 !important;")}if(v___location_directory_unslashed_trail_slashed==v___location_prefix_unslashed_trail_slashed+"procmail/"){$(".panel-body p:first-child").next("p").contents().filter(function(){return this.nodeType==3}).remove();$(".panel-body p:last-child").prev("a.ui_link").remove()}if(v___location_directory_unslashed_trail_slashed==v___location_prefix_unslashed_trail_slashed+"cron/"||v___location_path_lead_unslashed==v___location_prefix_unslashed_trail_slashed+"cron/index.cgi"){$('.panel-body form.ui_form[action="index.cgi"]').next("script").next("b").next("p").contents().filter(function(){return this.nodeType==3}).remove()}if(v___location_directory_unslashed_trail_slashed==v___location_prefix_unslashed_trail_slashed+"filter/"){$(".panel-body > b").next("p").contents().filter(function(){return this.nodeType==3}).remove()}if(v___location_directory_unslashed_trail_slashed==v___location_prefix_unslashed_trail_slashed+"dhcpd/"){var $dhcp_target=$(".panel-body > p");if(!$dhcp_target.find('a[href*="../software"]').length){$dhcp_target.contents().filter(function(){return this.nodeType==3}).remove()}}if(v___location_directory_unslashed_trail_slashed==v___location_prefix_unslashed_trail_slashed+"htaccess-htpasswd/"||v___location_directory_unslashed_trail_slashed==v___location_prefix_unslashed_trail_slashed+"forward/"){$("td table.table-hardcoded.table.table-subtable").removeClass("table-striped")}$(".ui_buttons_hr > td > table.table-hardcoded > tbody > tr > td[nowrap]").each(function(){$(this).parents("table").attr("style","margin-bottom: 15px !important")});var textarea_fm_ctl_ui_textarea="textarea.form-control.ui_textarea",btn_type_button_def='button[type="button"].btn-default',text_area_class_to_set="-ta-fn-fx -ta-fn-fx-small margined-bottom--6",btn_styling="width:100% !important; padding-top: 0; height:28px !important; ";$(textarea_fm_ctl_ui_textarea).next(btn_type_button_def).each(function(){$(this).prev("textarea").addClass(""+text_area_class_to_set+" margined-bottom--f25");$(this).attr("style",btn_styling)});$(textarea_fm_ctl_ui_textarea).next("br").next(btn_type_button_def).each(function(){$(this).prev("br").prev("textarea").addClass(text_area_class_to_set);$(this).attr("style",btn_styling)});$(".table-hardcoded > tbody > tr > td > input.form-control.ui_textbox").next('button[type="button"].ui_button').each(function(){$(this).attr("style","margin-top: 2px !important")});$(".table-hardcoded > tbody > tr > td.col_label b a, .ui_table_row td a").each(function(e,t){if(!$(this).attr("href")){$(this).attr("style","color: #191919; text-decoration: none; cursor:default")}});$('input[name="all_weekdays"], .ui_grid_cell > table.table-condensed, table.table-hardcoded table.table-condensed, select[multiple][name="days"]').each(function(){$(this).parent("td").attr("style","vertical-align: top !important; padding-left:2px; padding-right:2px;")});$('input[type="submit"]').each(function(){$(this).addClass("btn btn-default")});$("table tr th").each(function(){if($(this).text()){$(this).attr("style","width: auto")}});$("table thead th:not(.table-title)").each(function(){$(this).css("border-top","none");$(this).css("border-bottom","none")});if($("body").attr("class")&&$("body").attr("class").indexOf(v___module_file_manager)>-1){!$("body").hasClass("file-manager")&&$("body").addClass("file-manager");$("#headln2l").prepend("')}var $table_header_links=$(".panel-heading > .header > div a");$.each($table_header_links,function(){var e=0,t=$(this).attr("href");if(!t){return}if(t.indexOf("config.cgi")>-1||t.indexOf("man/search.cgi")>-1||t.indexOf("/index.cgi")>-1||t==v___location_directory_trail_slashed||t.indexOf("index.cgi")>-1&&v___location_directory_unslashed_trail_slashed==v___location_prefix_unslashed_trail_slashed+"openvpn/"||t.indexOf("index.cgi?")>-1&&v___location_directory_unslashed_trail_slashed==v___location_prefix_unslashed_trail_slashed+"spam/"||t.indexOf("restart_zone.cgi")>-1||t.indexOf("restart.cgi")>-1||t.indexOf("restart_progressive.cgi")>-1||t.indexOf("apply.cgi")>-1||t.indexOf("apply_progressive.cgi")>-1||t.indexOf("start.cgi")>-1||t.indexOf("start_progressive.cgi")>-1||t.indexOf("stop.cgi")>-1||t.indexOf("stop_progressive.cgi")>-1||t=="//"&&(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")||t.indexOf("delete_")>-1||t.indexOf("list_mail.cgi")>-1||t.indexOf("/virtual-")>-1||t.indexOf("/virtualmin-")>-1||t.indexOf("/server-")>-1||t.indexOf("help.cgi")>-1){$.each($(this).next("br"),function(){$(this).remove()});$.each($(this).prev("br"),function(){$(this).remove()});if(t.indexOf("help.cgi")>-1){var i=$(this),a=$(this).parent("div");$(this).remove();a.append(i)}if(t.indexOf("/index.cgi")>-1||t==v___location_directory_trail_slashed||t.indexOf("/virtual-")>-1||t.indexOf("/virtualmin-")>-1||t.indexOf("/server-")>-1){$iconized_class="fa-arrow-left";$(this).data("title","").data("back",1)}else{if(t=="//"&&(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")){$iconized_class="fa-arrow-left";$(this).attr("href",v___location_prefix+"/tconfig.cgi").data("title","").data("back",1)}else{if(t.indexOf("config.cgi")>-1){$iconized_class="fa-cog";$(this).data("title","")}else{if(t.indexOf("restart.cgi")>-1||t.indexOf("restart_progressive.cgi")>-1||t.indexOf("apply.cgi")>-1||t.indexOf("apply_progressive.cgi")>-1){$iconized_class="fa-refresh";e=$(this).find("b").detach()}else{if(t.indexOf("restart_zone.cgi")>-1){$iconized_class="fa-retweet"}else{if(t.indexOf("start.cgi")>-1||t.indexOf("start_progressive.cgi")>-1){$iconized_class="fa-play"}else{if(t.indexOf("stop.cgi")>-1||t.indexOf("stop_progressive.cgi")>-1){$iconized_class="fa-square"}else{if(t.indexOf("man/search.cgi")>-1){$iconized_class=" fa2 fa2-book"}else{if(t.indexOf("delete_")>-1){$iconized_class="fa-trash-o"}else{if(t.indexOf("list_mail.cgi")>-1){$iconized_class="fa-inbox"}else{if(t.indexOf("index.cgi")>-1&&v___location_directory_unslashed_trail_slashed==v___location_prefix_unslashed_trail_slashed+"openvpn/"){$iconized_class="fa-cogs"}else{if(t.indexOf("index.cgi?")>-1&&v___location_directory_unslashed_trail_slashed==v___location_prefix_unslashed_trail_slashed+"spam/"){$iconized_class="fa-arrow-left";$(this).data("back",1)}}}}}}}}}}}}var n=t.indexOf("help.cgi")>-1;if(n){$iconized_class="fa-question-circle";$(this).data("title","")}var r=Convert.strUpInitial(n?theme_language("global_help"):$(this).data("back")===1?!core.curModule(v___module_file_manager)?theme_language("global_return_to_module_index"):"":$(this).text()),l=e?"  "+e.text():"";$(this).data("toggle","tooltip").data("title",r).attr("data-container","body").addClass(vars.h.class.button.tableHeader).removeClass("ui_link").append(''+l+"");$(this).attr("aria-label",r);$(this).contents().filter(function(){return this.nodeType==3}).remove();var o=$(this);o.tooltip({container:"body",placement:o.is(":last-child")?"auto right":"auto top",trigger:"hover",delay:{show:vars.plugins.tooltip.delay.show,hide:vars.plugins.tooltip.delay.hide}});if((v___location_directory_unslashed_trail_slashed==v___location_prefix_unslashed_trail_slashed+"apache/"||v___location_directory_unslashed_trail_slashed==v___location_prefix_unslashed_trail_slashed+"proftpd/")&&(t.indexOf("restart.cgi")>-1||t.indexOf("apply.cgi")>-1)||$(this).parent("div").find("a")&&$(this).parent("div").find("a").length==1||t.indexOf("man/search.cgi")>-1||t.indexOf("config.cgi")>-1||t.indexOf("/index.cgi")>-1||t.indexOf("/index.cgi")>-1||t.indexOf("/virtual-")>-1||t.indexOf("/virtualmin-")>-1||t.indexOf("/server-")>-1){if((t.indexOf("/index.cgi")>-1||t.indexOf("config.cgi")>-1)&&$("body").attr("class")&&$("body").attr("class").indexOf(v___module_file_manager)>-1){$(this).attr("style","margin-right: 0 !important; padding: 6px 12px")}else{$(this).attr("style","margin-right: 0 !important")}}}$("#headln2l").removeClass("invisible")});$.each($('td.ui_grid_cell:contains("|")'),function(){$(this).contents().filter(function(){return this.nodeType==3}).remove()});$('a[href*="help.cgi"][onclick], a[href*="help.cgi/"], a[href*="showpass.cgi?"][onclick]').attr("onclick","").unbind("click").addClass("help_popup");$(".help_popup").each(function(){var e=$(this).find("b"),t=e.length?e:$(this),i=$.trim(t.html());if(i){t.html(i.replace(/\?$/,""))}})}if(!pjax_popstate){$('select.ui_select[name="days"]').each(function(){$(this).parent("td").attr("style","vertical-align: top !important")});if(v___location_directory_unslashed_trail_slashed==v___location_prefix_unslashed_trail_slashed+"mailboxes/"||v___location_path==v___location_prefix+"/mailboxes/index.cgi"||v___location_directory_unslashed_trail_slashed==v___location_prefix_unslashed_trail_slashed+"mailbox/"||v___location_path==v___location_prefix+"/postfix/view_mailq.cgi"){if(core.curModuleFile("mailboxes","reply_mail.cgi")||core.curModuleFile("mailbox","reply_mail.cgi")){var $x=$('.container-fluid .table-subtable a[href^="reply_mail.cgi"][href*="html="]'),$x_th2=$x.parent(".ui_links_row").parent("th");$x_th1=$x_th2.prev();$x.addClass("pull-right margined-top-2 margined-right-2");$x.detach().prependTo($x_th1);$x_th2.remove();var $that_last_attach_row=$('.mailboxes[data-uri*="reply_mail.cgi"] #content form .col_value.col_header .ui_links_row:empty').parent();if($that_last_attach_row.text()==="\n"){$that_last_attach_row.parent("tr").remove()}}if(core.curModuleFile("mailboxes","view_mail.cgi")||core.curModuleFile("mailbox","view_mail.cgi")){var $del_mail_obj2=$('.container-fluid form[action="reply_mail.cgi"]');$del_mail_obj2.contents().filter(function(){return this.nodeType==3}).remove()}if(core.curModuleFile("mailboxes","list_mail.cgi")||core.curModuleFile("mailboxes","mail_search.cgi")||core.curModuleFile("mailboxes","view_mail.cgi")||core.curModuleFile("mailbox","mail_search.cgi")||core.curModuleFile("mailbox","view_mail.cgi")){if(core.curModule("mailboxes")){$(".container-fluid").find('[name="mark1"], [name="mark2"], [name="move1"], [name="move2"], [name="copy1"], [name="copy2"]').each(function(){$(this).val($(this).val().replace(/:$/,""))})}if(core.curModuleFile("mailboxes","list_mail.cgi")||core.curModuleFile("mailboxes","mail_search.cgi")){var $del_mail_obj_form=$('.container-fluid form[action="delete_mail.cgi"]'),$last_links_row=$del_mail_obj_form.find('input[type="hidden"]:first-child ~ [type="submit"] ~ .ui_links_row').last();if($last_links_row.length){$last_links_row.nextUntil("hr").addBack().remove();$del_mail_obj_form.next("script").next("center").remove();$del_mail_obj_form.contents().filter(function(){return this.nodeType==3}).remove()}else{setTimeout(function(){$del_mail_obj_form.find(".ui_links_row").last().addClass("margined-bottom-8").removeClass("margined-bottom--2")})}}if(core.curModuleFile("mailboxes","view_mail.cgi")||core.curModuleFile("mailbox","view_mail.cgi")){var $del_mail_obj_form2=$('.container-fluid form[action="reply_mail.cgi"]'),$last_links_row2=$del_mail_obj_form2.find('input[type="hidden"]:first-child ~ [type="submit"]').nextAll(".table-responsive").last();if($last_links_row2.length){$last_links_row2.nextAll().filter(".ui_form_end_submit, .ui_form_end_submit + .hidden, .ui_form_end_submit + .hidden + br, .ui_form_end_submit + .hidden + select").remove()}else{$del_mail_obj_form2.find(".table-responsive").last().addClass("margined-bottom-5")}}}if(core.curModuleFile("mailbox","mail_search.cgi")||core.curModuleFile("mailbox","view_mail.cgi")){$(".container-fluid").find('[name="mark1"], [name="mark2"], [name="move1"], [name="move2"], [name="copy1"], [name="copy2"]').each(function(){if($(this).is("button")){$(this).text($(this).text().replace(/:/,""))}else{$(this).val($(this).val().replace(/:$/,""))}})}if(core.curModuleFile("mailboxes","list_mail.cgi")||core.curModuleFile("mailboxes","mail_search.cgi")||core.curModuleFile("mailbox","mail_search.cgi")||core.curModuleFile("mailbox","view_mail.cgi")){$.each($(".container-fluid .ui_form img"),function(){var e=$(this).attr("src");if(e){if(e.includes("images/special.gif")){$(this).replaceWith('')}if(e.includes("images/replied.gif")){$(this).replaceWith('')}if(e.includes("images/search.gif")){$(this).remove()}if(e.includes("images/attach.gif")){$(this).replaceWith('')}}})}if(core.curModuleFile("mailboxes","list_mail.cgi")||core.curModuleFile("mailboxes","mail_search.cgi")||core.curModuleFile("mailboxes","view_mail.cgi")||core.curModuleFile("mailbox","mail_search.cgi")||core.curModuleFile("mailbox","view_mail.cgi")){$(".container-fluid").find('[name="delete"]').addClass("btn-danger").removeClass("btn-default");$(".container-fluid").find('[name="reply"]').addClass("btn-info").removeClass("btn-default");$(".container-fluid").find('[name="new"]').addClass("btn-success").removeClass("btn-default");$(".container-fluid").find('[name="razor"]').addClass("btn-warning").removeClass("btn-default")}if(!v___location_file){$(".ui_form_end_submit").css("margin-top","0");$("input#user").addClass("heighter-34 vertical-align-top")}else if(v___location_file=="list_mail.cgi"||v___location_file=="mail_search.cgi"){$('.container-fluid input:not([type="checkbox"]), .container-fluid .ui_form_end_submit, .container-fluid select').addClass("heighter-34").removeClass("heighter-28").css("margin-bottom","-1px");var $del_mail_obj=$('.container-fluid form[action="delete_mail.cgi"]');$del_mail_obj.addClass("margined-top-7");$del_mail_obj.find(".ui_links_row").first().addClass("margined-top-7");$del_mail_obj.find(".ui_links_row").last().addClass("margined-bottom--2");$del_mail_obj.nextAll(".ui_page_flipper").addClass("margined-top-7");$del_mail_obj.find('[name="delete"], [name="new"]').removeAttr("style")}$("body").find("form").removeAttr("onsubmit");var $header_tables=$("body").find('input[name="from"]').parents(".tab-pane").parent("td");$header_tables.children("table").hide();$.each($header_tables.find("input, textarea, select"),function(){if(!$(this).hasClass("ui_select")&&!$(this).attr("onclick")&&$(this).attr("type")!="checkbox"&&$(this).attr("type")!="submit"){$(this).attr("style","width: 60%").addClass("inline-block")}if($(this).attr("onclick")){$(this).addClass("inline-block")}});onbeforeunload=null;if($("body").find('input.ui_hidden[name="html_edit"]').val()==1){$(".table-responsive").eq(1).removeClass()}$("body").find('input[name="from"]').parents(".tab-pane").prev("table").remove();$("body").find('input[name="from"]').parents(".tab-pane ").parent("td").find("div, table").each(function(e,t){$(this).find(".col_label").css("width","20%");$(this).find('input[name="subject"]').parent("td").prev("td").find("b").attr("style","font-size: 13px !important");$(this).find('input[name="subject"]').parents("table").show();$(this).find('input[name="subject"]').parent("td").find(".submitter").remove()});var $editor_mode_link_container=$("body").find('textarea[id="body"]').parents("table").find("thead > tr > th:last-child");$editor_mode_link=$editor_mode_link_container.find("a").addClass("editor_mode_link");$editor_mode_link_container.parent("tr").find("th:first-child").append($editor_mode_link);$editor_mode_link_container.remove();var $editor_mode_link_button=$("body").find('textarea[id="body"]').parents("table").find(".editor_mode_link");$editor_mode_link_button_state=$editor_mode_link_button.attr("href")?$editor_mode_link_button.attr("href").indexOf("html=0"):false;$editor_mode_link_button.attr("title",$editor_mode_link_button.text()).addClass("editor_mode_link_button pull-right btn btn-sm "+($editor_mode_link_button_state==-1?"btn-success":"btn-primary")).html(' ');$(".editor_mode_link_button").tooltip();var $fileinput_add_another_attachment=$("body").find('a[onclick="return add_attachment()"]');$fileinput_add_another_attachment.addClass("btn btn-default ui_link_replaced btn-xxs margined-top-1 margined-left-2 margined-bottom-2");$fileinput_add_another_attachment.text($fileinput_add_another_attachment.text().replace(/\.$/,""));var $fileinput_add_another_servattachment=$("body").find('a[onclick="return add_ss_attachment()"]');$fileinput_add_another_servattachment.attr("onclick","return theme_add_ss_attachment()");$fileinput_add_another_servattachment.addClass("btn btn-default ui_link_replaced btn-xxs margined-top-1 margined-left-3 margined-bottom-2");$fileinput_add_another_servattachment.text($fileinput_add_another_servattachment.text().replace(/\.$/,""));if(v___location_path.indexOf("reply_mail.cgi")>-1){let e=$(".ui_form").find("div.table-responsive").first().next("div.table-responsive").find("th:last-child");e.find("a").addClass("table_title_links pull-right btn btn-tiny margined-top-3 margined-right-3 pull-right-force")}if(v___location_path.indexOf("view_mail.cgi")>-1||v___location_path.indexOf("view_mailq.cgi")>-1){let e=$(".ui_form").find("div.table-responsive"),t=e.first().find(".table-title");$table_title_links_container=t.next();$table_title_links_container.contents().filter(function(){return this.nodeType==3}).remove();e.find('[name="detach"]').addClass("heighter-28 btn-xs");$table_title_links_container.find("a").removeClass("btn-inverse").parent(".ui_links_row").contents().unwrap();$table_title_links_container.find("a").addClass("table_title_links pull-right btn btn-tiny margined-top-3 margined-right-3 pull-right-force");$table_title_links=$table_title_links_container.html();t.append($table_title_links);$table_title_links_container.remove();$table_title_second_container=$(".ui_form").find("div.table-responsive").first().next("div.table-responsive").find("table:first-child");t=$(".ui_form").find("div.table-responsive").first().next("div.table-responsive").find("th:first-child");$table_title_links_container=$(".ui_form").find("div.table-responsive").first().next("div.table-responsive").find("th:last-child");if($(".ui_form").find("div.table-responsive").first().next("div.table-responsive").find("th").length==2){$table_title_links_container.remove()}else{}$table_title_links_container.find("a").addClass("table_title_links pull-right btn btn-tiny margined-top-3 margined-right-3 pull-right-force");$table_title_links_container.find("a").removeClass("btn-inverse").parent(".ui_links_row").contents().unwrap();$table_title_links=$table_title_links_container.html();t.append($table_title_links);setTimeout(function(){if($(".ui_form").find("div.table-responsive").first().find("table:first-child").outerWidth()!=$(".ui_form").find("div.table-responsive").first().next("div.table-responsive").find("table:first-child").outerWidth()){var e=parseInt($(".ui_form").find("div.table-responsive").first().find("table:first-child").width()/2);$table_title_second_container.find(".pull-right").removeClass("pull-right").addClass("pull-left")}$.each($table_title_second_container.find("table"),function(){$(this).removeClass().addClass("clear-formatting");$.each($(this).find("td.col_value"),function(){$(this).addClass("col_value_transparent")})})},30);if(t.find("b")&&t.find("b").length>1){if(t.find("b:first-child").text()==t.find("b:last-child").text()){t.find("b:last-child").remove()}}$('.container-fluid center > a > img[src*="images/left.gif"]').each(function(){$(this).replaceWith('')});$('.container-fluid center > a > img[src*="images/right.gif"]').each(function(){$(this).replaceWith('')})}$("td > a").on("click",function(){if($(this).attr("onclick")=="return add_attachment()"){}$("input[type=file]").each(function(){if(!$(this).parent("a").hasClass("file-input-wrapper")){$(this).bootstrapFileInput()}})});if(settings_mailbox_slash_delimiter){$('.container-fluid select.ui_select[name="id"] > option').each(function(e,t){$(t).text($(t).text().replace(/\./g,"/").replace(/\/\//g,"/"))})}$.each($('table td[align="right"], table td[align="left"]'),function(e,t){$(this).attr("style","border: 0 !important;");$(this).parents("tbody").attr("style","border: 0 !important;");$(this).parents("table.table-hardcoded.table.table-striped.table-condensed.table-subtable").removeClass("table-hardcoded table table-striped table-condensed table-subtable")});$(".ui_form > .table-responsive:first-of-type > .table-striped.table-condensed > tbody").removeAttr("style");$.each($("div.table-responsive > table tbody tr td > table.table-hardcoded"),function(e,t){$(this).find("tr > td.col_label > b").removeAttr("style");$(this).removeClass("table table-condensed")});$.each($("div.table-responsive > table tbody tr td > div.tab-pane"),function(e,t){$(this).find("table").removeClass("table");$(this).parents("div.table-responsive").find("table").removeClass("table-striped table-subtable")});$.each($('div.table-responsive > table tbody tr td > div.tab-pane .col_value > input[type="button"][onclick^="ifield"]'),function(e,t){$(this).attr("style","margin-left: 0; margin-top: 0 !important; vertical-align: top;")})}$.each($(".barchart"),function(){$(this).find("img").attr("height",4)});$("a").each(function(){if(!$(this).attr("href")){$(this).addClass("no_effect")}});$.each($(".container-fluid input:not(.ui_upload)"),function(){if($(this).css("height")=="28px"){$(this).prev("input").addClass("heighter-28")}});if(core.curModule("logviewer")||core.curModule("syslog")||core.curModule("phpini")){$(".container-fluid .chooser_button + .ui_form_end_submit").addClass("heighter-28")}if(core.curModuleFile("gnupg","edit_key.cgi")){$(".container-fluid .sub_table_container .table-condensed .btn-success").addClass("heighter-28").removeClass("btn-success").addClass("btn-default")}if(core.curModuleFile("virtual-server","backuplog.cgi")){$('.container-fluid input[name="search"]').addClass("margined-top--1")}if(core.curModuleFile("usermin","list_sessions.cgi")){$('.container-fluid input[name="user"] + button + button').addClass("heighter-34-force")}$.each($(".container-fluid select"),function(){if($(this).next("input").outerHeight()>=32){$(this).addClass("heighter-34")}});$.each($(".container-fluid .ui_buttons_row input, .container-fluid .ui_buttons_row select"),function(){$(this).addClass("heighter-34")});if(core.curModuleFile("gnupg","list_keys.cgi")){$('.container-fluid input[id="id"]').addClass("heighter-34")}if(core.curModuleFile("virtual-server","edit_script.cgi")){var x1z1x1c41=$('input[name="version"]');x1z1x1c41.length&&x1z1x1c41.attr("style",x1z1x1c41.attr("style").replace("n: middle","n: bottom !important")).addClass("heighter-34")}$.each($("tr > .ui_form"),function(){if($(this).next().next("td").find("input.submitter")){$(this).next().next("td").find("input.submitter").addClass("heighter-34")}});$.each($("input.heighter-34").next(".chooser_button"),function(){$(this).addClass("heighter-34");$(this).find(".fa.fa-files-o").css("margin-top","0").addClass("vertical-align-middle")});setTimeout(function(){$.each($(".container-fluid select"),function(){if($(this).next("input").outerHeight()>=32||$(this).prev("input").outerHeight()>=32){$(this).add($(this).nextAll(":visible")).addClass("heighter-34").removeClass("heighter-28")}else{if(Math.round($(this).next("input").outerHeight())==28||Math.round($(this).prev("input").outerHeight())==28){$(this).addClass("heighter-28").removeClass("heighter-34")}}})},1);if(core.curModule("term")||core.curModuleFile("server-manager","login.cgi")){var tmp__is__m__term=$("iframe");if(tmp__is__m__term.length){var $this=tmp__is__m__term;$this.on("load",function(){$this.contents().find("#term").css("width","99.3%").css("height","96vh").css("margin-top","1px")});$(this).next("br").remove().next('input[type="button"]').remove();$(this).next('input[type="button"]').remove();$(this).next("p").remove()}}$.each($(".chooser_button"),function(){if($(this).prev("input").attr("style")&&$(this).prev("input").attr("style").indexOf("max-width: 100%")>-1){$(this).prev("input").css("max-width","93%")}});if(v___location_path_lead_unslashed==v___location_prefix_unslashed_trail_slashed+"sysinfo.cgi"&&settings_sysinfo_link_mini==true){$(".navigation > li:not('.has-sub')").removeClass("sub_active").find("span.current-large").remove()}$.each($('input[value="..."], input[value=" ..."], input[value=" ..."], input[value="... "], input[value="... "], input[value=" ... "], input[value=" ... "]'),function(){$(this).after('');$(this).attr("value","").addClass("file_chooser_button_attached_input")});$.each($(".chooser_button"),function(){$(this).prev("input").css("margin-top","2px").css("margin-bottom","2px")});$.each($(".file_chooser_button_attached"),function(){$(this).prev('input[type="button"]').prev("input").css("margin-top","2px").css("margin-bottom","2px");if(!$(this).parents(".ui_buttons_label").length&&!$(this).parents(".table-subtable").length){$(this).css("margin-top","11px")}});$.each($(".container-fluid .ui_form > .file_chooser_button_attached"),function(){if($(this).prev(".heighter-34")&&$(this).prev(".heighter-34").length||$(this).next(".heighter-34")&&$(this).next(".heighter-34").length){$(this).css("margin-top","16px");$(this).prev("input[onclick]").css("width","40px")}});$.each($('.container-fluid .ui_form[action="init_cache.cgi"] > .file_chooser_button_attached'),function(){if($(this).prev(".heighter-34")&&$(this).prev(".heighter-34").length||$(this).next(".heighter-34")&&$(this).next(".heighter-34").length){$(this).css("margin-top","14px")}});$.each($(".col_value > .file_chooser_button_attached"),function(){$(this).prev("input[onclick]").css("width","40px").css("margin-left","0")});if(v___location_path==v___location_prefix+"/virtualmin-mailman/"||v___location_path==v___location_prefix+"/virtualmin-mailman/index.cgi"){$("input[name^=reset_]").addClass("heighter-28")}if(v___location_path==v___location_prefix+"/software/edit_pack.cgi"||v___location_path==v___location_prefix+"/apache/show.cgi"||v___location_path==v___location_prefix+"/proc/index_search.cgi"){$.each($(".container-fluid .panel-body .btn:not(.chooser_button)"),function(){$(this).removeClass("heighter-28").addClass("heighter-34")})}if(v___location_path==v___location_prefix+"/virtualmin-svn/"||v___location_path==v___location_prefix+"/virtualmin-svn/index.cgi"){$.each($("tr > td[data-td-e] > button"),function(){$(this).addClass("btn-hover-wash_off-in-row bhw-sm heighter-28 heighter-28-force margined-top-2 margined-bottom-2");if($(this).find(".fa-backup").length){$(this).removeClass("heighter-28-force")}})}if(v___location_path==v___location_prefix+"/virtualmin-init/"||v___location_path==v___location_prefix+"/virtualmin-dav/list_shares.cgi"||v___location_path==v___location_prefix+"/squid/edit_acl.cgi"||v___location_path==v___location_prefix+"/virtualmin-nginx/"||v___location_path==v___location_prefix+"/fdisk/edit_disk.cgi"||v___location_path==v___location_prefix+"/server-manager/edit_newlinks.cgi"||v___location_directory_unslashed_trail_slashed==v___location_prefix_unslashed_trail_slashed+"backup-config/"){$.each($(".container-fluid .panel-body .ui_link_re-replaced"),function(){$(this).addClass("btn-tiny").removeClass("heighter-34")})}if(v___location_path==v___location_prefix+"/pam/"){$(".panel-body > a.ui_link").addClass("btn-tiny")}if(v___location_path==v___location_prefix+"/software/"||v___location_path==v___location_prefix+"/software/index.cgi"){$(".container-fluid input#search").addClass("heighter-34 vertical-align-top");$('form[action="file_info.cgi"] > .ui_form_end_submit').addClass("heighter-28 heighter-28-force margined-top-0")}if(v___location_path==v___location_prefix+"/software/tree.cgi"){$(".ui_link").addClass("margined-top-10")}if(v___location_path==v___location_prefix+"/syslog/save_log.cgi"||v___location_path==v___location_prefix+"/logviewer/view_log.cgi"){$.each($(".container-fluid .heighter-34"),function(){$(this).removeClass("heighter-34").addClass("heighter-28")});$("form:first").next("script").next("br").remove();$("form:last").css("margin-top","5px")}if(v___location_path==v___location_prefix+"/status/edit_mon.cgi"){$('td.col_value > table[cellspacing="1"] tbody').attr("style","border: 0 !important;");$(".opener_trigger:last-child").css("font-size","16px");$.each($("table.sub_table_container td > font"),function(){$(this).parents("tbody");$(this).contents().unwrap().wrap(' ')})}if(v___location_path==v___location_prefix+"/shell/"||v___location_path==v___location_prefix+"/shell/index.cgi"||v___location_path==v___location_prefix+"/server-manager/shell.cgi"||v___location_path==v___location_prefix+"/server-manager/massshell.cgi"){$.each($(".container-fluid .btn:not(.btn-link), .container-fluid select, .container-fluid input"),function(){$(this).removeClass("heighter-28").addClass("heighter-34");if($(this).is('input[type="button"]')){$($(this).addClass("submitter"))}if($(".form-control.sidebar-search").val()&&$(".form-control.sidebar-search").val().trim().startsWith("!")){$(".form-control.sidebar-search").val("")}$(".ui_form").find("input.btn.btn-default:first").addClass("btn-success")});$(".container-fluid input#cmd").focus();setTimeout(function(){var e=$("#content");var t=e.find(v___page_container).outerHeight();e.scrollTop(t)})}$.each($("input"),function(){if(Math.round($(this).outerHeight())==28&&Math.round($(this).next("input").outerHeight())!=28){if($(this).is(':not([type="hidden"])')){$(this).next("input").addClass("heighter-28")}}});$.each($(".container-fluid select"),function(){if(Math.round($(this).outerHeight())>=32&&Math.round($(this).next("select").outerHeight())!=32){$(this).next("select").addClass("heighter-34")}});if(v___location_path==v___location_prefix+"/cluster-passwd/edit_passwd.cgi"){$.each($("input + button"),function(e,t){if($(this).css("height")=="28px"){$(this).addClass("heighter-28").css("line-height","12px").css("margin-top","2px")}})}if(v___location_path==v___location_prefix+"/cluster-shell/"||v___location_path==v___location_prefix+"/cluster-shell/index.cgi"){var $__btn_to_rep=$('button[onclick*="run.cgi?clear"]');if($__btn_to_rep.length){var btn_txt=$__btn_to_rep.text();$__btn_to_rep.replaceWith('")}}if(v___location.pathname==v___location_prefix+"/virtual-server/pro/history.cgi"||v___location.pathname==v___location_prefix+"/server-manager/bwgraph.cgi"||v___location.pathname==v___location_prefix+"/server-manager/history.cgi"||v___location.pathname==v___location_prefix+"/server-manager/one_history.cgi"){$("body").find("table.ui_form_end_buttons .btn.btn-default.submitter.ui_submit").addClass("btn-success");$(".panel-body > table tr td .ui_link_empty").each(function(e,t){$(this).addClass("btn-tiny ui_link_replaced")});$(".panel-body > table a").each(function(e,t){$(this).addClass("btn btn-inverse btn-tiny ui_link_replaced").removeClass("ui_link");$(this).text($(this).text().replace(/\.$/,""));if($(this).text()&&$(this).text().indexOf("<<")>-1){$(this).text($(this).text().replace(/\<\ '+$(this).text()+"")}if($(this).text()&&$(this).text().indexOf(">>")>-1){$(this).text($(this).text().replace(/\>\>/,""));$(this).html($(this).text()+' ')}$(this).parent().contents().filter(function(){return this.nodeType==3}).remove();if($(this).attr("href").indexOf("edit_cmd.cgi?new")===0){$(this).html(' '+$(this).text()+"")}if($(this).attr("href").indexOf("edit_file.cgi?new")===0){$(this).html(' '+$(this).text()+"")}if($(this).attr("href").indexOf("edit_sql.cgi?new")===0){$(this).html(' '+$(this).text()+"")}$(this).parents("table").css("margin-bottom","3px")});if($("#history").next("table.ui_grid_table").next("a").length){$("#history").next("table").next("a").addClass("btn btn-info btn-tiny ui_link_replaced").attr("style","margin-top: 4px !important; margin-bottom: 2px !important").attr("target","_blank");$("#history").next("table").next("a").text($("#history").next("table").next("a").text().replace(/\.\.$/,""));$("#history").next("table").next("a").html(' '+$("#history").next("table").next("a").text())}else{$("#history").next("a").addClass("btn btn-info btn-tiny ui_link_replaced").attr("style","margin-top: 4px !important; margin-bottom: 2px !important").attr("target","_blank");$("#history").next("a").text($("#history").next("a").text().replace(/\.\.$/,""));$("#history").next("a").html(' '+$("#history").next("a").text())}$(".panel-body > hr + b").attr("style","font-size: 16px; font-weight: normal;");$(".panel-body > hr + b").text($(".panel-body > hr + b").text().replace(/\:$/,""));try{onLoad()}catch(e){}}$.each($('tr > td[valign="top"][width="50%"]'),function(){var e=$(this).attr("style");$(this).attr("style","vertical-align: top !important; "+(e?e:""))});$("body table").each(function(e,t){var i=$(this);if(!$(t).hasClass("table")&&!$(t).hasClass("header")&&!$(t).hasClass("ui_form_end_buttons")&&!$(t).hasClass("ui_table")){$(t).addClass("table-hardcoded");if($t_uri_usermin){$(t).addClass("table-subtable");if($(t).find("tr.thead").length||$(t).hasClass("sub_table_container table-hardcoded table-subtable")){}}}});if(v___location_path==v___location_prefix+"/virtual-server/list_scripts.cgi"){table_data_init($("#att_existing > form > table.table.table-striped.table-condensed, #att_new > form > table.table.table-striped.table-condensed"));page.render.content.filter.init();$('[action="list_scripts.cgi"]').replaceWith("

          "+theme_language("virtual_server_scripts_desc")+"

          ")}if(v___location_path==v___location_prefix+"/virtual-server/edit_newscripts.cgi"){table_data_init($("#att_summary > table.table.table-striped.table-condensed"))}if(v___location_path==v___location_prefix+"/server-manager/index.cgi"||v___location_path==v___location_prefix+"/virtualmin-htpasswd/index.cgi"){table_data_init($("body form > table.table.table-striped.table-condensed"))}if($('body[class*="status"]').length&&!v___location_file&&!$('body[class*="smart-status"]').length||v___location_path==v___location_prefix+"/servers/"||v___location_path==v___location_prefix+"/servers/index.cgi"||v___location_path==v___location_prefix+"/webminlog/search.cgi"){table_data_init($("table.table-striped.table-condensed"))}if(core.curModule("smart-status")){$('select[name="drive"]').addClass("heighter-34");$('select[name="drive"] + .ui_form_end_submit').addClass("heighter-34")}if($('body[class*="ldap-useradmin"]').length){table_data_init($("form > table.table.table-striped.table-condensed"))}if(v___location_path==v___location_prefix+"/virtual-server/list_sched.cgi"){table_data_init($(".table.table-striped.table-hover.table-condensed"),false,false,{orderable:false,targets:[0,-1]})}if(v___location_path==v___location_prefix+"/servers/"||v___location_path==v___location_prefix+"/servers/index.cgi"){$(".ui_checked_columns td table tr td").find('a.ui_link[href*="edit_serv.cgi"]').addClass("margined-left-4 label label-sm label-primary hidden").html('');$(".ui_checked_columns").hover(function(){$(this).find("td table tr a.ui_link.label.hidden").removeClass("hidden")},function(){$(this).find("td table tr a.ui_link.label").addClass("hidden")})}$.each($('table.table.table-striped.table-condensed.dataTable.no-footer > thead > tr[role="row"]:first-child'),function(e,t){$(this).attr("style","border-top: 4px solid #f2f2f2 !important")});$.each($('button[onclick^="ifield"].btn.btn-default.ui_button'),function(){$(this).addClass("file_chooser_button_emulate")});$.each($(".file_chooser_button_emulate"),function(){if(!$(this).find(".fa-files-o").length){$(this).append('')}if($(this).prev("input").css("height")=="28px"){$(this).addClass("heighter-28")}});$.each($("label > img"),function(e,t){$(this).attr("style","vertical-align: baseline !important")});$.each($('select[multiple][name="weekdays"]'),function(){$(this).parents('td[valign="top"], td[data-td-e]').attr("style","vertical-align: top !important");$(this).parents('table[width="100%"]').parents(".ui_radio_table.table-hardcoded").css("width","100%")});$.each($("label").find("br"),function(){$(this).parent("label").prev(".aradio, .acheckbox").attr("style","margin-left: 0 !important;");$(this).parent("label").next(".aradio, .acheckbox").attr("style","margin-left: 0 !important;")});$.each($(".table-responsive + .table-responsive + .table-hardcoded td"),function(){if($(this).find(".heighter-34").length){$.each($(".table-responsive + .table-responsive + .table-hardcoded td"),function(){$(this).find(".btn").addClass("heighter-34")})}});if(v___location_path==v___location_prefix+"/cpan/edit_mod.cgi"){$('.container-fluid form[action="download.cgi"]').next().next().next().find(".submitter.ui_submit").addClass("heighter-34")}if(core.curModuleFile("virtual-server","edit_script.cgi")){$('.container-fluid .ui_form button[name="stop"], .container-fluid .ui_form button[name="start"], .container-fluid .ui_form button[name="restart"]').addClass("heighter-34-force margined-right--4");$('.container-fluid .ui_form button[name="upgrade"]').addClass("margined-right--5")}if(v___location_path==v___location_prefix+"/cpan/"||v___location_path==v___location_prefix+"/cpan/index.cgi"){var cpan_button=$('input[name="cpan"]').next("button");if(cpan_button.length){cpan_button.html('').attr("style","width: 40px; height: 28px; vertical-align:middle !important; margin-top:2px; margin-bottom:2px;");cpan_button.attr("onclick",cpan_button.attr("onclick").replace("document.forms[0]","document.forms[1]"))}}if($("form").find(".icons-row:not(.inline-row)").length){$("form").find(".icons-row").addClass("_processed_"+(settings_right_table_links_type=="1"?" small":"")+"").css("border-top","1px solid #efefef").css("border-bottom","1px solid #efefef").find(".icons-container").addClass("icons-container-stretched")}if($(".ui_subheading + .ui_links_row ~ .icons-row:not(.inline-row)").length){$(".ui_subheading + .ui_links_row ~ .icons-row:not(.inline-row)").addClass("_processed_"+(settings_right_table_links_type=="1"?" small":"")+"").css("border-top","1px solid #efefef").css("border-bottom","1px solid #efefef").find(".icons-container").addClass("icons-container-stretched")}function __m_ico_row_tb(){$("body").find(".icons-row:not(._processed_):not(.inline-row)").css({"padding-top":"8px","padding-bottom":"8px"});$("body").find(".icons-row:not(._processed_):not(.inline-row)").css("border-top","1px solid #efefef").css("border-bottom","1px solid #efefef")}function __m_ico_row_t(){$("body").find(".icons-row:not(._processed_):not(.inline-row)").css({"padding-top":"18px"});$("body").find(".icons-row:not(._processed_):not(.inline-row)").css("border-top","1px solid #efefef")}if(v___location_path==v___location_prefix+"/lvm/"||v___location_path==v___location_prefix+"/lvm/index.cgi"||v___location_path==v___location_prefix+"/proftpd/virt_index.cgi"||v___location_path==v___location_prefix+"/dhcpd/"||v___location_path==v___location_prefix+"/dhcpd/index.cgi"||v___location_path==v___location_prefix+"/cluster-usermin/"||v___location_path==v___location_prefix+"/cluster-usermin/index.cgi"||v___location_path==v___location_prefix+"/bind8/"||v___location_path==v___location_prefix+"/bind8/index.cgi"||v___location_path==v___location_prefix+"/grub/"||v___location_path==v___location_prefix+"/grub/index.cgi"||v___location_path==v___location_prefix+"/cluster-software/"||v___location_path==v___location_prefix+"/cluster-software/index.cgi"||v___location_path==v___location_prefix+"/cluster-useradmin/edit_user.cgi"||v___location_path==v___location_prefix+"/cluster-useradmin/edit_group.cgi"||v___location_path==v___location_prefix+"/cluster-webmin/edit_mod.cgi"||v___location_path==v___location_prefix+"/cluster-usermin/edit_mod.cgi"||v___location_path==v___location_prefix+"/cluster-software/edit_pack.cgi"||v___location_path==v___location_prefix+"/cluster-useradmin/"||v___location_path==v___location_prefix+"/cluster-useradmin/index.cgi"||v___location_path==v___location_prefix+"/cluster-usermin/"||v___location_path==v___location_prefix+"/cluster-usermin/index.cgi"||v___location_path==v___location_prefix+"/cluster-webmin/"||v___location_path==v___location_prefix+"/cluster-webmin/index.cgi"){__m_ico_row_tb()}if(v___location_path==v___location_prefix+"/proftpd/"||v___location_path==v___location_prefix+"/proftpd/index.cgi"||v___location_path==v___location_prefix+"/mysql/"||v___location_path==v___location_prefix+"/mysql/index.cgi"||v___location_path==v___location_prefix+"/postgresql/"||v___location_path==v___location_prefix+"/postgresql/index.cgi"||v___location_path==v___location_prefix+"/bacula-backup/"||v___location_path==v___location_prefix+"/bacula-backup/index.cgi"){__m_ico_row_t()}$.each($(".row.icons-row.inline-row"),function(){$(this).find("a.icon_link").contents().filter(function(){return this.nodeType==3}).remove()});$.each($(".row.icons-row:not(.inline-row) .icons-container"),function(){$(this).removeAttr("data-title").removeAttr("data-toggle").removeAttr("data-placement").removeAttr("data-container")});if($("body").find(".icons-row > div.icons-container").length||$("body").find(".icons-row > div.small-icons-container").length){$.each($(".icons-row .hidden-forged-6"),function(){if($(this).find("input").is(":checked")){$(this).parents('div[class*="icons-container"]').addClass("highlighted")}});$.each($(".hidden-forged-7 > a"),function(){$(this).removeClass();if($(this).parents(".hidden-forged-7").hasClass("hidden-forged-7-small")){$(this).html(' ');$(this).parent().parent().prepend('')}else{$(this).html(' ');$(this).parent().parent().prepend('')}})}if(v___location_directory_unslashed_trail_slashed==v___location_prefix_unslashed_trail_slashed+"virtualmin-registrar/"){$.each($("td > input "),function(){if($(this).parents("table.table-hardcoded").find('form[action="edit.cgi"]').length){$(this).css("margin-left","5px");$(this).parent("td").prev("td").find("select").css("margin-left","5px")}})}if(v___location_path==v___location_prefix+"/virtual-server/list_scripts.cgi"||v___location_path==v___location_prefix+"/virtual-server/edit_newscripts.cgi"){$('form[action="disable_scripts.cgi"] thead + thead tr th, form[action="disable_scripts.cgi"] tbody + thead tr th, form[action="script_form.cgi"] thead + thead tr th, form[action="script_form.cgi"] tbody + thead tr th').attr("colspan","5")}$.each($(".file_chooser_button_attached"),function(e,t){if($(this).prev('input[onclick*=".cgi"]')){$(this).prev('input[onclick*=".cgi"]').css("width","40px")}});if($t_uri_cloudmin&&(v___location_path==v___location_prefix+"/server-manager/add_form.cgi"||v___location_path==v___location_prefix+"/server-manager/scan_form.cgi")){$.each($("label"),function(){$(this).find("br").remove()})}if((v___location_path==v___location_prefix+"/mysql/view_table.cgi"||v___location_path==v___location_prefix+"/postgresql/view_table.cgi")&&$("td[data-td-e] > table.table-hardcoded")){var $tables=$(".container-fluid form .table.table-striped.table-hover.table-condensed");$tables.addClass("table-resizable").resizeableTableColumns(uri_parse_param("table",vars.source_request)||uri_parse_param("table",vars.source_request)||uri_parse_param("table",v___location_file+"?"+$(vars.previous_request.target).serialize()));if($tables.find(".ui_checked_checkbox").length){$tables.find("thead tr th:first-child").addClass("nonresizable")}var $___colspan=$(".container-fluid td[data-td-e] > table.table-hardcoded").parents("table").find("thead").find("tr").find("th").length;$(".container-fluid td[data-td-e] > table.table-hardcoded").parent("td[data-td-e]").attr("colspan",$___colspan).attr("style","padding: 1px !important;")}if(v___location_path==v___location_prefix+"/virtual-server/backup_form.cgi"&&v___location_href&&v___location_href.indexOf("?sched=")>-1){setTimeout(function(){var e=$("a[href=\"javascript:hidden_opener('hiddendiv_adddest', 'hiddenopener_adddest')\"]");e.next().attr("style","").addClass("btn btn-tiny btn-default margined-bottom-10");e.one("click",function(t){e.next("br").replaceWith('
           
          ');$(this).add(e).remove()})},10)}$.each($('form[action="save_global.cgi"], form[action="save_iptables.cgi"], form[action="save_domain.cgi"],form[action="domain_setup.cgi"],form[action="mass_create.cgi"],form[action="save_roundrobin.cgi"],form[action="save_alert.cgi"], body.time form[action="apply.cgi"]'),function(){$(this).find(".col_header").removeClass("col_header")});if(check_location_resource("/virtual-server/edit_newchangelog.cgi")||check_location_resource("/server-manager/edit_newchangelog.cgi")||check_location_resource("/shell/")||check_location_resource("/shell/index.cgi")||check_location_resource("/server-manager/shell.cgi")){$("td.col_value.col_value").removeClass("col_header")}if(check_location_resource("/ldap-server/edit_ldif.cgi")){$("span > input.ui_opt_textbox").unwrap()}if(v___location_path==v___location_prefix+"/server-manager/gvnc.cgi"){$("body.server-manager p > ").css("height","100%").parent("p").attr("style","display: block; height: "+parseInt($(window).outerHeight()/1.4)+"px")}if(v___location_path==v___location_prefix+"/spam/edit_simple.cgi"||v___location_path==v___location_prefix+"/spam/edit_header.cgi"){var target=$(".ui_form .table-responsive table.table.table-striped.table-condensed.table-subtable > thead tr th:first-child"),container=$(".ui_form .table-responsive table.table.table-striped.table-condensed.table-subtable > thead tr th:last-child"),link=container.find("a");target.append(link);container.remove();target.find("a").addClass("table_title_links pull-right btn btn-xs btn-link btn-link-bordered btn-transparent").attr("style","position: absolute; right: 23px; margin-top: 5px !important;")}if(v___location_path==v___location_prefix+"/server-manager/edit_pass.cgi"&&$('form[action="save_pass.cgi"]').find('a[href*="edit_pass.cgi?"]:not(.btn)').length){var target=$(".ui_form .table-responsive table.table.table-striped.table-condensed.table-subtable > thead tr th:first-child"),container=$(".ui_form .table-responsive table.table.table-striped.table-condensed.table-subtable > thead tr th:last-child"),link=container.find("a");target.append(link);container.remove();target.find("a").addClass("table_title_links pull-right btn btn-info btn-tiny").attr("style","position: absolute; right: 20px; margin-top: 3px !important;")}$('.panel-default + a[href="/virtual-server/"]').attr("href",v___location_prefix+"/virtual-server/index.cgi");$('.panel-default + a[href="/server-manager/"]').attr("href",v___location_prefix+"/server-manager/index.cgi");if(v___location_directory_unslashed_trail_slashed==v___location_prefix_unslashed_trail_slashed+"acl/"){$("body.acl > div > div > div.panel-body > form > div > table > tbody > tr > td > table > tbody > tr:nth-child(1) > td > table > tbody").attr("style","border: 0 !important");var $t__acl_title=$("br").next(".ui_grid_table.table-hardcoded").find("tbody").addClass("border-global-color").parent("table").prev("br").prev("b");$("br").next(".ui_grid_table.table-hardcoded").css("margin-bottom","3px");$.each($t__acl_title,function(e,t){if($(this).text()==""){$(this).next("br").remove();$(this).remove()}});$t__acl_title.attr("style","margin-bottom: -3px !important").next("br").remove()}if($('body[class*="bandwidth"]').length){$(".fa.fa-calendar.file_chooser_button_attached").attr("style","font-size: 11px; margin-top: 9px !important; pointer-events: none; margin-left: -27px !important;")}if(v___location_path==v___location_prefix+"/mysql/exec_form.cgi"||v___location_path==v___location_prefix+"/postgresql/exec_form.cgi"){$('select[name="old"], input[name="clear"], select[name="charset"]').removeClass("heighter-34").addClass("heighter-28");$('input[name="clear"]').attr("style","margin-bottom: 3px !important;");$('select[name="old"]').attr("style","margin-bottom: 3px !important; margin-right: 0 !important;")}if((v___location_file=="config.cgi"||v___location_file=="uconfig.cgi")&&(v___location_query=="mysql"||v___location_query=="postgresql")){$('input[name="style"]').parents("td.col_value").parent("tr").after(' '+theme_language("xsql_fit_content_screen_height")+' '+''+''+'"+''+'"+" ")}}if(core.curModuleFile("mailboxes","reply_mail.cgi")||core.curModuleFile("mailbox","reply_mail.cgi")){if($("body").find('input.ui_hidden[name="html_edit"]').val()==1){let e="fn_mailboxes_html_editor_init";if(typeof fn_mailbox_html_editor_init==="function"){e="fn_mailbox_html_editor_init"}var textarea_selector='form[action^="send_mail.cgi"] textarea[name="body"]',editor_mode=$(textarea_selector).data("html-mode")||"advanced",bundles=["quill:min"];if(editor_mode==="advanced"){bundles=Convert.arrPrepend("highlight/highlight:min",bundles)}load.bundle(bundles,1,['quill_editor_html_init("'+textarea_selector.replace(/"/g,'\\"')+'", "'+e+'")']);$('textarea[name="body"]').parents(".sub_table_container").addClass("xcontent-force-no-styling")}}if(core.curModuleFile("mailboxes","view_mail.cgi")||core.curModuleFile("mailbox","view_mail.cgi")){var $del_mail_obj3=$('.container-fluid form[action="reply_mail.cgi"]'),$print_mail_btn=$del_mail_obj3.find('[name="print"]');$print_mail_btn.removeAttr("onclick");$print_mail_btn.on("click",function(e){e.preventDefault();e.stopPropagation();var t=$del_mail_obj3.find(".table-responsive").first(),i=t.find(".sub_table_container"),a=t.next(".table-responsive").find(".clear-formatting");var n=i.parent().html()||String(),r=a.parent().html()||String();if(n){n=n.replace(/�/g,"")}if(r){r=r.replace(/�/g,"")}progress.start();$("body").append('
          '+n+"




          "+r+"
          ");$($(".printer-container:last").printThis()).promise().done(function(){setTimeout(function(){progress.end()},600);$(".printer-container").remove()})})}if(v___location_path&&v___location_path.indexOf("/sysinfo.cgi")>-1){if(!pjax_popstate){var status_id="#system-status",$status_panel_content=$(""+status_id+" .panel-body");!$status_panel_content.text().trim()&&$status_panel_content.parent(status_id).remove();$("td img, #status_services-status-1-collapse .tr_tag [data-td-e] > img").each(function(e,t){var i=t.src;if(i){var a=i.match(/images\/(.*)\./),n=a&&a[0]&&a[1]?a[1]:String(),r="fa fa-fw fa-1_15x fa-check text-success";if(n==="down"){r="fa fa-fw fa-1_15x fa-times-circle text-danger"}else if(n==="timed"){r="fa fa-fw fa-clock text-warning fa-1_15x"}else if(n==="webmin"){r="fa fa-fw fa-webmin fa-1_15x text-warning"}else if(n==="skip"){r="fa2 fa-fw fa2-minus fa-1_15x text-semi-dark vertical-align-middle"}else if(n==="not"){r="fa2 fa-fw fa2-not-interested fa-1_15x text-semi-dark"}else if(n==="quest"){r="fa fa-fw fa-question-circle fa-1_15x text-semi-dark"}if(n){$(t).replaceWith('')}}});$.each($(".piechart"),function(){if(isNaN($(this).data("percent"))){$(this).parents(".text-center").remove()}}).promise().done(function(){var e=$("span[data-charts]"),t='div[class^="col-md-"]',i=e.parents(".row").find(t).length,a=12/i,n=i===2?"3":i==="1"?"6":"",a=n?n:a;$.each(e.parents(".row"),function(e,n){$(this).find(t).removeClass().addClass("col-md-"+(i===2?6:a)+" col-md-"+a*1.5+" col-xs-"+a*1.5+" col-xs-"+a*2+" text-center xx");if(i===3){var r="col-xs-";$(this).find(t).last().removeClass(r+"6"+" "+(r+"8")).addClass(r+"12")}})});try{theme_panels_sort("dashboard")}catch(e){}$('span[data-entry="nf_seen"]').parent("button").on("click",function(e){e.preventDefault();var t=$(this),i=$('form[action*="seen_newfeatures.cgi"]');$.ajax({type:"GET",url:i.attr("action"),data:false,statusCode:{200:function(){t.parents(".panel.panel-default").remove()}}})});plugins.dashboard.update.formsURLs();var aria_label_attr="aria-label";$.each($(".__page [data-title]:not(["+aria_label_attr+"]), .__page [title]:not(["+aria_label_attr+"])"),function(e,t){$(this).attr(aria_label_attr,$(t).attr("data-title")||$(t).attr("title"))})}snippets.datetime.tictac(1);setTimeout(theme_title_generate);$("#live_stats-collapse").on("shown.bs.collapse",function(){if(stats&&stats.general){var e=[];Object.keys(stats.general).forEach(function(t){if(t.startsWith("chart_")){e.push(t)}});e.forEach(function(e){var t=stats.general[e];if(typeof t.resizeListener==="function"){t.resizeListener()}})}})}if(!pjax_popstate){if(v___location_path==v___location_prefix+"/virtual-server/edit_phpmode.cgi"){$("#hiddendiv_phpinfo table tbody tr").css("border","1px solid #"+(v___theme_night_mode_enabled?"393b3f":"eee")+"")}var $showpass_target=$('a[href*="showpass.cgi?"][onclick]'),show_pass_key='';$.each($showpass_target,function(){$(this).html(show_pass_key);$(this).next(".awobject").addClass("margined-left-4");var e=$(this).parent().parent(".awobject");if(e.length){e.after($(this).detach())}});$showpass_target.addClass("badge badge-transparent badge-circle");if(v___location_path==v___location_prefix+"/webmin/edit_startpage.cgi"){$('select[name="deftab"]').parents("td.col_value").parent("tr").hide();$('select[name="gotomodule"] option').each(function(){($(this).val()=="virtual-server"||$(this).val()=="server-manager")&&$(this).remove()})}if(v___location_path==v___location_prefix+"/webmin/edit_ui.cgi"||v___location_path==v___location_prefix+"/usermin/edit_ui.cgi"){$('select[name*="sysinfo"], select[name*="dateformat"], input[name*="showlogin"], input[name*="showhost"], input[name*="sizefile_def"], input[name*="sizeuser_def"], input[name*="sizemodule_def"], input[name*="sizeusers_def"], input[name*="sizemodules_w"], input[name*="cs_link_def"], input[name*="cs_header_def"], input[name*="cs_table_def"], input[name*="cs_text_def"], input[name*="cs_page_def"], input[name*="width_def"], input[name*="height_def"], input[name*="sizedate_def"], input[name*="texttitles"]').parents("td.col_value").parent("tr").addClass("hidden");$(".sub_table_container tr td.no-border").parent("tr").addClass("hidden");var $container_ui_interface=$(".container-fluid .panel-body");$container_ui_interface.contents().filter(function(){return this.nodeType==3}).remove();$container_ui_interface.find("p").first().remove()}if(v___location_path===v___location_prefix+"/uconfig.cgi"&&v___location_query&&v___location_query.toString().includes("mailbox")||v___location_path===v___location_prefix+"/config.cgi"&&v___location_query&&v___location_query.toString().includes("mailboxes")){$('[name="open_mode"][value="0"]').click();$('[name="open_mode"]').parents("td.col_value").parent("tr").addClass("hidden")}if(check_location_resource("/config.cgi?virtual-server")||check_location_resource("/config.cgi?server-manager")){$('input[name="theme_image"], input[name="theme_link"], input[name="theme_alt"]').parents("td.col_value").parent("tr").hide();$('input[name="show_sysinfo"]:checked').length===0&&$('input[name="show_sysinfo"][value="1"]').attr("checked","checked")}if(v___location_path==v___location_prefix+"/virtual-server/edit_resel.cgi"){$('input[name="logo"][id="logo"], input[name="link"]').parents("td.col_value").parent("tr").hide()}if(v___location_path==v___location_prefix+"/virtual-server/edit_newfeatures.cgi"){$('.container-fluid tr td:last-child label:contains("|")').replaceText(/\|/gi,"");var $targets_features_and_plugins_links=$(".container-fluid td a.ui_link");$targets_features_and_plugins_links.addClass("ui_link_replaced btn btn-transparent btn-link-bordered f__lnk_t_btn-el margined-left--2 btn-xxs").removeClass("heighter-34").removeClass("ui_link btn-inverse btn-tiny").prepend('');$.each($targets_features_and_plugins_links,function(){var e=$(this).parent();if(e.is(".ui_links_row")){if(e.parent().is("label")){e.parent().contents().unwrap()}e.contents().unwrap()}$(this).parents("td.cursor-pointer").attr("data-td-e",1)})}if($("#headln2l .btn .fa-arrow-left").length){if($("body").attr("class")&&$("body").attr("class").indexOf(v___module_file_manager)>-1){}else{$("#headln2l .btn .fa-arrow-left").parent("a").attr("href",$("#headln2l .btn .fa-arrow-left").parent("a").attr("href").replace("index.cgi",""))}var v___URI=URI(v___location);v___location_file=v___URI.filename()}$("#headln2r, #headln2l").prepend('
          ').append("
          ");$("#headln2r a").detach().appendTo("#headln2r .btn-group");$("#headln2l a").detach().appendTo("#headln2l .btn-group");if(!$.support.spa&&!$("body").hasClass("file-manager")){$("#headln2l .btn-group").prepend('')}if(!$.support.spa&&!$("body").hasClass("file-manager")){session.server.data("data-slider-fixed",0)}if(core.curModule("virtual-server","list_records.cgi")){$.each($('form[action="delete_records.cgi"] table td > label > [data-type][data-text]'),function(){$(this).replaceWith('')})}$.each($(".ui_form_end_submit"),function(){if(v___location_path_lead_unslashed==v___location_prefix_unslashed_trail_slashed+"proc/edit_proc.cgi"||v___location_path_lead_unslashed==v___location_prefix_unslashed_trail_slashed+"proc/kill_proc.cgi"||v___location_path_lead_unslashed==v___location_prefix_unslashed_trail_slashed+"proc/renice_proc.cgi"||v___location_file=="edit_dbase.cgi"||v___location_file=="edit_pam.cgi"||v___location_file=="list_records.cgi"||core.curModule("mailbox")||core.curModuleFile("virtual-server","edit_script.cgi")||core.curModule("mailboxes")){return}var e=$(this).parent().find(".ui_form_end_submit");if(!e.parents(".btn-group").length&&e.length>1){$(this).parent().find(".ui_form_end_submit, .ui_form_end_submit + input").wrapAll('
          ')}}).promise().done(function(){$.each($(".end_submits"),function(){if($(this).prev(".heighter-28").length||$(this).prev("input, select").css("height")=="28px"){$(this).find(".ui_form_end_submit").addClass("heighter-28")}var e=$('select[name*="parentuser"]').first();if(core.curModule("virtual-server")&&e.length===1){var t=e.addClass("heighter-34 pull-left").attr("style","margin-top: -1px !important; margin-right: -1px;").detach(),i=$('button[name="add1"] + input');i.after(t)}})});$.each($(".btn-group").find("span"),function(){$(this).not("[class]").length&&!$.trim($(this).text()).length&&$(this).remove()});if($(".panel-default").nextAll("a.btn.btn-primary").length===2){$(".panel-default").next("a.btn.btn-primary").find(".fa.fa-arrow-left").removeClass("fa-arrow-left").addClass("fa-arrow-circle-o-left")}if($(".panel-default").nextAll("a.btn.btn-primary").length===3){$(".panel-default").next("a.btn.btn-primary").next("a.btn.btn-primary").find(".fa.fa-arrow-left").removeClass("fa-arrow-left").addClass("fa-arrow-circle-left");$(".panel-default").next("a.btn.btn-primary").find(".fa.fa-arrow-left").removeClass("fa-arrow-left").addClass("fa-arrow-circle-o-left")}if(v___location_path==v___location_prefix+"/init/reboot.cgi"){$("input.btn-success").removeClass("btn-success").addClass("btn-warning")}if(v___location_path==v___location_prefix+"/init/shutdown.cgi"){$("input.btn-success").removeClass("btn-success").addClass("btn-danger")}if(!$.support.spa){page_display()}$("table tr.thead td").addClass("tdhead");var dynamic_switch_off_on=$(".fa-toggle-switch-off").parent("button.btn-default");if(dynamic_switch_off_on.length===1){var dynamic_switch__val=dynamic_switch_off_on.parent("td").find('input[type="radio"]:checked').val();if(dynamic_switch__val=="1"){dynamic_switch_off_on.find(".fa-toggle-switch-off").addClass("fa-toggle-switch").removeClass("fa-toggle-switch-off")}}var my_editor_page=$('form[action*="manual"] > select[name="file"], form[action*="manual.cgi"] > select[name="manual"], form[action*="edit_"] > select[name="file"]');if(my_editor_page.length){my_editor_page.addClass("heighter-34");$('form[action*="manual"], form[action*="edit_"]').css("margin-bottom","4px")}if(core.curModule("firewalld")){$("select#zone").addClass("heighter-34");$('form[action="save_ifaces.cgi"] > .btn').addClass("btn-tiny f__lnk_t_btn-el")}$('body[class*="proftpd"] .table-hardcoded tr td > input + input.btn.btn-default').removeClass("heighter-28").addClass("heighter-34").prev("input").addClass("heighter-34");$('body[class*="proftpd"] form[action="find_ftpaccess.cgi"] > input:first-child').removeClass("heighter-34").addClass("heighter-28");if(v___location_file=="edit_simple.cgi"&&$('body[class*="spam"]').length){$("tr td").contents().filter(function(){return this.nodeType==3}).remove()}if(v___location_file=="edit_awl.cgi"&&$('body[class*="spam"]').length){$('input[name="user"]').next("input").addBack().addClass("heighter-34")}if(core.curModuleFile("usermin","list_sessions.cgi")){$('.container-fluid #user, .container-fluid input[type="button"]').addClass("heighter-34")}if(core.curModuleFile("htaccess-htpasswd","")||core.curModuleFile("htaccess-htpasswd","index.cgi")){$("#search, .chooser_button").addClass("heighter-34").css("margin-bottom","-1px");$("#search").css("margin-top","1px");$('form[action*="search.cgi"] .ui_form_end_submit').css("margin-top","2px").css("margin-right","-4px")}if(core.curModuleFile("mailboxes","")||core.curModuleFile("mailboxes","index.cgi")){$("#user").addClass("heighter-34 vertical-align-middle margined-bottom-1");$(".chooser_button").addClass("margined-top-2 margined-bottom-2")}if(core.curModuleFile("mailboxes","list_mail.cgi")||core.curModuleFile("mailboxes","mail_search.cgi")){$("#mfolder1, #mfolder2").addClass("heighter-34").css("margin-bottom","-1px").css("margin-top","-1px")}if(core.curModuleFile("quota","list_users.cgi")){$("#user, #user + input").addClass("heighter-34")}if(core.curModuleFile("quota","list_groups.cgi")){$("#group, #group + input").addClass("heighter-34")}if(core.curModuleFile("apache","htaccess.cgi")||core.curModuleFile("virtualmin-registrar","index.cgi")||core.curModuleFile("virtualmin-registrar","")){$(".ui_form_end_submit").addClass("heighter-28-force")}var attempt_make_all_elem=$('form:not([action="save_log.cgi"], [action="view_log.cgi"]) .table-responsive .table .sub_table_container .table tbody tr td > select, form:not([action="save_log.cgi"], [action="view_log.cgi"], [action="save_net.cgi"]) .table-responsive .table .sub_table_container .table tbody tr td > input, form:not([action="save_user.cgi"], [action="save_group.cgi"]) .table td.opener_container td.col_value table tbody tr td > select, form:not([action="save_user.cgi"], [action="save_group.cgi"]) .table td.opener_container td.col_value table tbody tr td > input, form[action="save_newglobal.cgi"] > table tbody tr td input, form[action="save_newfields.cgi"] > table tbody tr td input, form[action="save_newfields.cgi"] > table tbody tr td select, form[action="save_newshells.cgi"] > table tbody tr td select, form[action="save_newshells.cgi"] > table tbody tr td input, form[action="save_linkcats.cgi"] > table tbody tr td input, form[action="save_gen.cgi"] > table tbody tr td input ');$.each(attempt_make_all_elem,function(e,t){if($(this).parent().find("input[data-mmclick]").length||$(this).parent().find("button[data-mmclick]").length||$(this).parent().find('input[onclick*="window.open"]').length||$(this).parent().find('button[onclick*="window.open"]').length){return}if($(this).prev(".awobject").length){$(this).css("width","auto");return}if($(this).parent().find('input:not([type="checkbox"], [type="radio"]), select').length==1){$(this).css("width","100%").css("min-width","100%")}else if($(this).parent().find('input:not([type="checkbox"], [type="radio"]), select').length==2){$(this).parent().find("input, select").first().css("width","39%");$(this).parent().find("input, select").last().css("width","60%").css("float","right")}});var $edit_new_style_target=$('a[onclick^="window.open(\\"thumb_style.cgi?"]');if(core.curModuleFile("virtual-server","edit_newstyles.cgi")){$edit_new_style_target.html('').addClass("btn btn-transparent btn-link-bordered btn-xxs margined-top--3")}else if(core.curModule("virtual-server")){$edit_new_style_target.html('').addClass("btn btn-transparent btn-link-bordered heighter-28-force")}$edit_new_style_target.on("click",function(e){e.stopPropagation()});if(core.curModuleFile("virtual-server","edit_html.cgi")){$('.ui_form_end_submit:not([name="create"], [name="cancel"], [name="save"], [name="delete"])').addClass("heighter-28-force");var is_html_mode_edit_web_pages=v___location_query.indexOf("editok")!==-1||v___location_query.indexOf("createok")!==-1?true:false,is_text_mode_edit_web_pages=v___location_query.indexOf("textok")!==-1?true:false;if(is_html_mode_edit_web_pages&&$("#body").length){$("#editok").removeClass("btn-default").addClass("btn-grey");$("#body").css("display","none");$("hr + b").addClass("hidden");$("#body").after('
          ');editor_html_init(["body",2,true,"edit_web"])}else if(is_text_mode_edit_web_pages){$("#textok").removeClass("btn-default").addClass("btn-grey");editor_init_check()&&editor_init($(".container-fluid > .panel > .panel-body textarea"),false,false,"static",false,true,false,pjax_popstate)}$(".ui_form_end_submit").click(function(){set_onbeforeunload_status(0,0)});$("input:file").change(function(){var e=$(this);setTimeout(function(){$('form[action*="upload_html.cgi"]').append(e)},500)})}var $magic_button_selector=' body button[onclick*="window.open"][onclick*="choose"][onclick*="chooser.cgi"]:not([onclick*="_chooser.cgi"]), body input[onclick*="window.open"][onclick*="choose"][onclick*="chooser.cgi"]:not([onclick*="_chooser.cgi"]), body button[onclick*="window.open"][onclick*="choose"][onclick*="cron_chooser.cgi"], body input[onclick*="window.open"][onclick*="choose"][onclick*="cron_chooser.cgi"], body button[onclick*="window.open"][onclick*="choose"][onclick*="standard_chooser.cgi"], body input[onclick*="window.open"][onclick*="choose"][onclick*="standard_chooser.cgi"], body button[onclick*="window.open"][onclick*="choose"][onclick*="third_chooser.cgi"], body input[onclick*="window.open"][onclick*="choose"][onclick*="third_chooser.cgi"], body button[onclick*="window.open"][onclick*="choose"][onclick*="user_chooser.cgi"], body input[onclick*="window.open"][onclick*="choose"][onclick*="user_chooser.cgi"], body button[onclick*="window.open"][onclick*="choose"][onclick*="group_chooser.cgi"], body input[onclick*="window.open"][onclick*="choose"][onclick*="group_chooser.cgi"], body button[onclick*="window.open"][onclick*="choose"][onclick*="my_group_chooser.cgi"], body input[onclick*="window.open"][onclick*="choose"][onclick*="my_group_chooser.cgi"], body button[onclick*="window.open"][onclick*="choose"][onclick*="interface_chooser.cgi"], body input[onclick*="window.open"][onclick*="choose"][onclick*="interface_chooser.cgi"], body button[onclick*="window.open"][onclick*="choose"][onclick*="module_chooser.cgi"], body input[onclick*="window.open"][onclick*="choose"][onclick*="module_chooser.cgi"] ';if($($magic_button_selector).length){$($magic_button_selector).each(function(){$(this).attr("data-mmclick",$(this).attr("onclick")).removeAttr("onclick");plugins.chooser.target($(this),0)})}if(core.curModuleFile("virtualmin-nginx","")||core.curModuleFile("virtualmin-awstats","")||core.curModuleFile("fdisk","edit_disk.cgi")||core.curModuleFile("virtual-server","edit_newlinks.cgi")||core.curModuleFile("virtualmin-dav","list_shares.cgi")||v___location_directory_unslashed_trail_slashed==v___location_prefix_unslashed_trail_slashed+"pam/"&&!v___location_file||v___location_directory_unslashed_trail_slashed==v___location_prefix_unslashed_trail_slashed+"logviewer/"&&(!v___location_file||v___location_file==="index.cgi")||v___location_directory_unslashed_trail_slashed==v___location_prefix_unslashed_trail_slashed+"syslog/"&&(!v___location_file||v___location_file==="index.cgi")||v___location_path==v___location_prefix+"/postfix/master.cgi"){var obj=$('.panel-body > .ui_link, .panel-body > .ui_link_replaced, body[data-uri*="virtualmin-awstats"] .panel-body > form > .ui_link_replaced, body[data-uri*="edit_disk.cgi"] .panel-body p > a.ui_link_replaced, body[data-uri*="edit_newlinks.cgi"] .panel-body > form > .ui_link_replaced, body[data-uri*="edit_newlinks.cgi"] .panel-body > .ui_emptymsg + p > .ui_link_replaced'),text=$.trim(obj.first().text()),href=obj.first().attr("href");if(typeof settings_hidden_force_table_header_links!="undefined"){if(href){$("#headln2r .btn-group a").addClass("pull-left").attr("style","");$("#headln2r .btn-group").prepend(' ');obj.next("br").remove();obj.remove()}}else{obj.addClass("btn btn-inverse btn-tiny ui_link_replaced");if(!obj.find(".fa").length){obj.prepend(' ')}}}if(v___theme_night_mode_enabled||v___theme_night_mode){if($(".opener_shown").length>0){var __tmp_ui_grinTable=$(".opener_container, .opener_container:hidden").find(".ui_grid_table, .ui_grid_table:hidden");if(__tmp_ui_grinTable.length){$.each(__tmp_ui_grinTable,function(e,t){$(this).parent("td").attr("style","padding: 0 !important")})}}if($(".opener_table_style_small").length>0){var __tmp_ui_hardTable=$(".opener_table_style_small, .opener_table_style_small:hidden").find(".sub_table_container.table-hardcoded, .sub_table_container.table-hardcoded:hidden");if(__tmp_ui_hardTable.length){$.each(__tmp_ui_hardTable,function(e,t){$(this).parent("td").attr("style","padding: 0 !important");$(this).find("tbody tr td").attr("style","padding-left: 3px !important; padding-right: 3px !important")})}}}$('html[data-script-name*="webmin/edit_assignment.cgi"] table table tbody tr td, html[data-script-name*="usermin/edit_assignment.cgi"] table table tbody tr td').hover(function(){if($(this).is("td:nth-child(1)")||$(this).is("td:nth-child(3)")){$(this).addClass("hl-ow").next("td").addClass("hl-ow")}else if($(this).is("td:nth-child(2)")||$(this).is("td:nth-child(4)")){$(this).addClass("hl-ow").prev("td").addClass("hl-ow")}},function(){$(this).removeClass("hl-ow").next("td").removeClass("hl-ow");$(this).removeClass("hl-ow").prev("td").removeClass("hl-ow")});if(core.curModuleFile("server-manager","edit_pass.cgi")&&!v___location_query.includes("force=1")||core.curModuleFileQuery("virtualmin-registrar","edit.cgi","registrar=")||core.curModuleFileQuery("htaccess-htpasswd","edit_user.cgi","new=")||core.curModuleFile("useradmin","edit_group.cgi")||core.curModuleFile("useradmin","edit_user.cgi")){setTimeout(function(){$("#headln2r .btn-group a").addClass("pull-left").attr("style","");$("#headln2r .btn-group").prepend(' ')},0)}if(v___user_level==0){}else{settings_side_slider_enabled=false;settings_side_slider_enabled=false;session.server.data("data-slider-fixed","0");$("#right-side-tabs, .right-side-tabs-toggler").addClass("hidden")}if(core.curModuleFile("bind8","edit_zonekey.cgi")){var $taxtarea_name_ds=$('textarea[name="ds"]');if($taxtarea_name_ds.val()&&!$taxtarea_name_ds.val().includes("\n")){g__text_breaker($taxtarea_name_ds,$("#headln2c").find("span[data-sub_title]").text())}}if(core.curModuleFile("virtual-server","transfer_form.cgi")){$('input[name="newttl"]').addClass("heighter-34")}if(core.curModule("passwd")){$('.container-fluid .panel-body input[name="user"]').addClass("heighter-34")}$.each($(".gl-icon-container"),function(e,t){if(!$(this).find("a:first").find("i.fa-edit").length){$(this).find("a:first").prepend('');$(this).find("a:first").prepend('')}});if(v___location_path==v___location_prefix+"/proc/index_search.cgi"){$(".col_header").removeClass("col_header")}var $file_upload_inputs=$('input[type="file"]:not([name="upfiles"])');if(core.curModule("updown")||core.curModuleFile("updown","index.cgi")){init_dnd_uploads()}else{$file_upload_inputs.bootstrapFileInput()}}else{reset_dnd_uploads();init_dnd_uploads()}function reset_dnd_uploads(){if(core.curModule("updown")||core.curModuleFile("updown","index.cgi")){var e=$('form.ui_form[action*="upload.cgi"]'),t=e.find(".ui_submit.ui_form_end_submit"),i=e.find(".file-input-wrapper");theme_restore_buttons_class();$.fn.bootstrapFileInputReset(e);despinnerfy_buttons(0,t);i.find("span").remove();i.contents().unwrap()}}function init_dnd_uploads(){if(core.curModule("updown")||core.curModuleFile("updown","index.cgi")){var e=$('input[type="file"]:not([name="upfiles"])'),t='form.ui_form[action*="upload.cgi"]',i=$(""+t+" .ui_submit.ui_form_end_submit"),a='name="upload0"';$(""+t+' input[name^="upload"]:not(['+a+"])").remove();e.bootstrapFileInput(["dnd dnd_updown",i]);i.addClass("disabled");plugins.upload($("#att_upload .ui_form"));init_dnd_form($(t))}}function init_dnd_form(e){e.on("drag dragstart dragend dragover dragenter dragleave drop",function(e){e.preventDefault();e.stopPropagation()}).on("drop",function(e){droppedFiles=e.originalEvent.dataTransfer.files;$(this).trigger("input").find('input[type="file"]').prop("files",droppedFiles).trigger("change.fiw")});e.find(".file-input-wrapper").on("dragover dragenter",function(){$(this).addClass("pulse")}).on("dragleave dragend drop",function(){$(this).removeClass("pulse")})}if(core.curModuleFile("virtual-server","index.cgi")||core.curModuleFile("virtual-server","")){var ui_checked_columns="ui_checked_columns",class_sel="."+ui_checked_columns+"",$checked_columns=v___page_container.find(class_sel),extra_selector=$checked_columns.length?class_sel:'a[href*="edit_domain.cgi"]';var cllv=0;$('a[href*="list_users.cgi"], a[href*="list_aliases.cgi"], '+extra_selector+"").on("click",function(e){if(!$(e.target).is('input[type="checkbox"]')&&!$(e.target).is(".lawobject")&&!$(e.target).is(".ui_checked_checkbox")){var t=$(this);if(t.is(class_sel)){t=$(this).find("a").first()}if(!cllv&&(t&&t.length)){cllv++;t.off("click");plugins.navigation.intersect.virtualmin(t)}}})}if(core.curModuleFile("server-manager","index.cgi")||core.curModuleFile("server-manager","")||vars.requested_page&&vars.requested_page.includes("/server-manager/index.cgi")){var cllc=0;$('a[href*="mass_update_form.cgi"], .ui_checked_columns').on("click",function(e){if(!$(e.target).is('input[type="checkbox"]')){if(!$(e.target).is('input[type="checkbox"]')&&!$(e.target).is(".lawobject")&&!$(e.target).is(".ui_checked_checkbox")){var t=$(this);t=$(this).find("a").first()}if(!cllc&&(t&&t.length)){cllc++;t.off("click");plugins.navigation.intersect.cloudmin(t)}}})}var codemirror_target_cnt=".container-fluid > .panel > .panel-body";editor_init_check()&&editor_init($(codemirror_target_cnt+" textarea"),false,false,"static",false,true,false,pjax_popstate);if(core.curModule("cshrc")||core.curModule("plan")||core.curModuleFile("virtual-server","mass_aedit_form.cgi")){var cshrc1=$(""+codemirror_target_cnt+" form:eq(0) > textarea:visible"),cshrc2=$(""+codemirror_target_cnt+" form:eq(1) > textarea:visible");pjax_popstate&&page_refresh(1);if(cshrc2.length){editor_init(cshrc1,false,false,"static1",true,false,false,pjax_popstate,.36);editor_init(cshrc2,false,false,"static2",true,false,false,pjax_popstate,.36)}else{editor_init(cshrc1,false,false,"static1",true,false,false,pjax_popstate,.51)}}viewer_init_check()&&viewer_init();if(settings_sysinfo_easypie_charts&&v___location_path==v___location_prefix+"/sysinfo.cgi"){var isNR=v___theme_night_mode_enabled||v___theme_night_mode?1:0;$("body").find("#system-status").find(".piechart").easyPieChart({barColor:function(e){return e<50?isNR?"#269373":"#5cb85c":e<85?isNR?"#c38d40":"#f0ad4e":"#cb3935"},trackColor:isNR?"#3b424b":"#f8f8f8",scaleColor:isNR?"#3b424b":"#dfe0e0",size:parseInt(settings_sysinfo_easypie_charts_size),scaleLength:parseInt(settings_sysinfo_easypie_charts_scale),trackWidth:parseInt(settings_sysinfo_easypie_charts_width),lineWidth:0,lineCap:"square",onStep:function(e,t,i){$(this.el).find(".percent").text(Math.round(i))}});if(v___user_level!=0&&v___user_level!=3){fetch(v___location_prefix+"/index.cgi/?xhr-info=1")}}if((v___location_path.indexOf(".cgi")===-1||v___location_path.indexOf("link.cgi")!==-1||v___location_path==v___location_prefix+"/proc/open_files.cgi"||v___location_path==v___location_prefix+"/webmin/edit_webmincron.cgi"||v___location_path==v___location_prefix+"/postfix/mailq.cgi"||v___location_path==v___location_prefix+"/webmin_search.cgi"||v___location_path==v___location_prefix+"/useradmin/index.cgi"||v___location_path==v___location_prefix+"/quota/list_users.cgi"||v___location_path==v___location_prefix+"/quota/list_groups.cgi"||v___location_path==v___location_prefix+"/init/index.cgi")&&(v___location_directory_unslashed_trail_slashed==v___location_prefix_unslashed_trail_slashed+"webmin/"&&v___location_prefix.indexOf("servers/link.cgi")===-1||v___location_directory_unslashed_trail_slashed==v___location_prefix_unslashed_trail_slashed+"proc/"||v___location_path_lead_unslashed==v___location_prefix_unslashed_trail_slashed+"webmin_search.cgi"||v___location_directory_unslashed_trail_slashed==v___location_prefix_unslashed_trail_slashed+"postfix/"||v___location_directory_unslashed_trail_slashed==v___location_prefix_unslashed_trail_slashed+"virtual-server/"||v___location_directory_unslashed_trail_slashed==v___location_prefix_unslashed_trail_slashed+"init/"||v___location_directory_unslashed_trail_slashed==v___location_prefix_unslashed_trail_slashed+"xinetd/"||v___location_directory_unslashed_trail_slashed==v___location_prefix_unslashed_trail_slashed+"mount/"||core.curModule("custom")||v___location_directory_unslashed_trail_slashed==v___location_prefix_unslashed_trail_slashed+"quota/"||v___location_directory_unslashed_trail_slashed==v___location_prefix_unslashed_trail_slashed+"php-pear/"||v___location_directory_unslashed_trail_slashed==v___location_prefix_unslashed_trail_slashed+"fsdump/"||v___location_directory_unslashed_trail_slashed==v___location_prefix_unslashed_trail_slashed+"inittab/"||v___location_directory_unslashed_trail_slashed==v___location_prefix_unslashed_trail_slashed+"logrotate/"||v___location_directory_unslashed_trail_slashed==v___location_prefix_unslashed_trail_slashed+"mailcap/"||v___location_directory_unslashed_trail_slashed==v___location_prefix_unslashed_trail_slashed+"cron/"||v___location_directory_unslashed_trail_slashed==v___location_prefix_unslashed_trail_slashed+"software/"||v___location_directory_unslashed_trail_slashed==v___location_prefix_unslashed_trail_slashed+"useradmin/"||v___location_directory_unslashed_trail_slashed==v___location_prefix_unslashed_trail_slashed+"apache/"||v___location_directory_unslashed_trail_slashed==v___location_prefix_unslashed_trail_slashed+"webalizer/"||v___location_directory_unslashed_trail_slashed==v___location_prefix_unslashed_trail_slashed+"cpan/"||v___location_directory_unslashed_trail_slashed==v___location_prefix_unslashed_trail_slashed+"htaccess-htpasswd/"||v___location_directory_unslashed_trail_slashed==v___location_prefix_unslashed_trail_slashed+"fdisk/")||core.curModuleFile("mailboxes","list_mail.cgi")||core.curModuleFile("mailboxes","mail_search.cgi")||core.curModuleFile("mailboxes","")||core.curModuleFile("mailboxes","index.cgi")||core.curModuleFile("mysql","index.cgi")||core.curModuleFile("mysql","list_vars.cgi")||core.curModuleFile("postgresql","index.cgi")||core.curModuleFile("custom","index.cgi")||core.curModuleFile("cron","index.cgi")||core.curModuleFile("logviewer","")||core.curModuleFile("logviewer","index.cgi")||core.curModuleFile("syslog","")||core.curModuleFile("syslog","index.cgi")||core.curModuleFile("cluster-cron","")||core.curModuleFile("cluster-cron","index.cgi")||core.curModuleFile("cluster-copy","")||core.curModuleFile("cluster-copy","index.cgi")||core.curModuleFile("virtual-server","postgrey.cgi")||core.curModuleFile("virtual-server","list_balancers.cgi")||core.curModuleFile("virtualmin-dav","list_shares.cgi")||core.curModuleFile("virtual-server","list_aliases.cgi")||core.curModuleFile("ruby-gems","index.cgi")||core.curModuleFile("postfix","master.cgi")||core.curModuleFile("postfix","virtual.cgi")||core.curModuleFile("postfix","sni.cgi")||core.curModuleFile("postfix","aliases.cgi")||core.curModuleFile("fail2ban","list_filters.cgi")||core.curModuleFile("fail2ban","list_actions.cgi")||core.curModuleFile("fail2ban","list_jails.cgi")||core.curModuleFile("fail2ban","list_status.cgi")||core.curModuleFile("fail2ban","jail_blocks.cgi")||core.curModuleFile("virtual-server","list_databases.cgi")||core.curModuleFile("virtual-server","connectivity.cgi")||core.curModuleFile("virtual-server","list_buckets.cgi")||core.curModuleFile("virtual-server","list_clouds.cgi")||core.curModuleFile("fdisk","edit_disk.cgi")||core.curModuleFile("virtualmin-git","")||core.curModuleFile("virtualmin-git","index.cgi")||core.curModuleFile("virtualmin-svn","")||core.curModuleFile("virtualmin-svn","index.cgi")||core.curModuleFile("help","search.cgi")||core.curModuleFile("server-manager","edit_domains.cgi")||core.curModuleFile("net","list_ifcs.cgi")||core.curModuleFile("net","list_hosts.cgi")||core.curModuleFile("bind8","edit_recs.cgi")||core.curModuleFile("bind8","index.cgi")||core.curModuleFile("bind8","")||core.curModuleFile("virtual-server","edit_newresels.cgi")||core.curModuleFile("cpan","index.cgi")||core.curModuleFile("virtual-server","list_records.cgi")||core.curModule("firewall")||core.curModule("firewall6")||core.curModule("ruby-gems")||v___location_path==v___location_prefix+"/at/"||v___location_path==v___location_prefix+"/at/index.cgi"||v___location_path==v___location_prefix+"/useradmin/list_logins.cgi"||v___location_path==v___location_prefix+"/man/search.cgi"||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_search.cgi"||v___location_path==v___location_prefix+"/software/search.cgi"||v___location_path==v___location_prefix+"/software/file_info.cgi"||v___location_path==v___location_prefix+"/software/list_pack.cgi"||v___location_path==v___location_prefix+"/cluster-software/list_pack.cgi"||v___location_path==v___location_prefix+"/virtual-server/index.cgi"||v___location_path==v___location_prefix+"/virtual-server/list_users.cgi"||v___location_path==v___location_prefix+"/virtual-server/edit_newplan.cgi"||v___location_path==v___location_prefix+"/virtual-server/edit_newfeatures.cgi"||v___location_path==v___location_prefix+"/virtual-server/edit_newtmpl.cgi"||v___location_path==v___location_prefix+"/virtual-server/backuplog.cgi"||v___location_path==v___location_prefix+"/package-updates/"||v___location_path==v___location_prefix+"/package-updates/index.cgi"||v___location_path==v___location_prefix+"/package-updates/update.cgi"||v___location_path==v___location_prefix+"/security-updates/index.cgi"||v___location_path==v___location_prefix+"/virtual-server/usage.cgi"||v___location_path==v___location_prefix+"/virtual-server/search.cgi"||v___location_path==v___location_prefix+"/filter/"){var $page_table_table=$(".__page table.table");$page_table_table.each(function(){try{table_data_init($(this))}catch(e){}}).promise().done(function(){if($page_table_table.length){page.render.content.filter.init()}})}else{var ui_paginations_str="ui_form_elements_wrapper_search",$ui_paginations=$("form:visible ."+ui_paginations_str+"").length?$("form:visible ."+ui_paginations_str+""):$("."+ui_paginations_str+"");if($ui_paginations.length){page.render.content.filter.init()}}var $cont_fl_tbl_sortable=$(".container-fluid table.dtable-sortable");$cont_fl_tbl_sortable.each(function(){table_data_init($(this))}).promise().done(function(){if($cont_fl_tbl_sortable.length){page.render.content.filter.init()}});$(".select_all").on("click",function(){var e=$(this).parents("form");if(e.find('.icons-row div[class*="icons-container"]').length){$.each(e.find(".icons-row .hidden-forged-6"),function(){$(this).parents('div[class*="icons-container"]').addClass("highlighted").find(".fa-select").removeClass("fa-select").addClass("fa-selected")})}});$(".select_invert").on("click",function(){var e=$(this).parents("form");$.each(e.find(".icons-row .hidden-forged-6"),function(){var e=$(this).parents('div[class*="icons-container"]');if($(this).find("input").is(":checked")){e.addClass("highlighted").find(".fa-select, .fa-selected").removeClass("fa-select").addClass("fa-selected")}else{e.removeClass("highlighted").find(".fa-select, .fa-selected").removeClass("fa-selected").addClass("fa-select")}})});$('.icons-row div[class*="icons-container"]').on("mouseover",function(e){$(this).find(".hidden-forged-7").removeClass("hidden-forged")}).on("mouseout",function(e){$(this).find(".hidden-forged-7").addClass("hidden-forged")});if(v___location.search!="?dashboard"&&plugins.navigation.switch.dashboard.get()==true){if(v___location_file=="sysinfo.cgi"){plugins.navigation.switch.set("dashboard");plugins.navigation.reset()}else if(!v___initial_load){if($("#open_webmin").length>0&&$(".switch-toggle input:checked").attr("id")!="open_webmin"){plugins.navigation.switch.set("webmin")}else{if($("#open_virtualmin").length>0&&$(".switch-toggle input:checked").attr("id")!="open_virtualmin"){plugins.navigation.switch.set("virtualmin")}else{if($("#open_cloudmin").length>0&&$(".switch-toggle input:checked").attr("id")!="open_cloudmin"){plugins.navigation.switch.set("cloudmin")}else{if($("#open_usermin").length>0&&$(".switch-toggle input:checked").attr("id")!="open_usermin"){plugins.navigation.switch.set("usermin")}}}}}}$('form[action="bootup.cgi"]').on("submit",function(e){if($("#starting").length>0){$("#starting").remove();$(this).append('')}else{if($("#table").length>0){$(this).append('')}else{if($('input[name="boot"][type="hidden"]').length>0){$('input[name="boot"][type="hidden"]').remove();$(this).append('')}}}});$('input[name="config_portable_module_xsql_fit_content_screen_height"]').on("change",function(){var e=$(this).attr("name"),t=$(this).val()=="true"?true:false;window[e]=t;theme.config.save()});if($.support.spa&&v___location_file==="mconfig.cgi"&&uri_parse_param("module")===v___module_file_manager){var file_manager_config_form_func=function(){return $('.container-fluid form[action*="mconfig_save.cgi"]')},file_manager_config_save_btn_func=function(){return file_manager_config_form_func().find('[name="save"].ui_form_end_submit')},$file_manager_config_form=file_manager_config_form_func();$file_manager_config_form.keydown(function(e){if(e.keyCode===13){e.preventDefault();e.stopImmediatePropagation();file_manager_config_save_btn_func().trigger("focus").trigger("click");return false}});$file_manager_config_form.on("submit",function(e){if(!e.originalEvent||e.originalEvent.submitter&&e.originalEvent.submitter.name!=="save_next"){e.preventDefault();e.stopImmediatePropagation()}var t=$file_manager_config_form.find('select[name="per_page"]');if(t.length){config_portable_module_filemanager_records_per_page=parseInt(t.val())}theme.config.apply($file_manager_config_form,1)});var $fm_size_checkbox=$file_manager_config_form.find('input[name="columns"][value="size"]');if($fm_size_checkbox.length&&!$fm_size_checkbox.is(":checked")){$fm_size_checkbox.prop("checked",true)}$fm_size_checkbox.parent().hide();var $fm_def_sort=$file_manager_config_form.find('select[name="config_portable_module_filemanager_default_sort"]');if($fm_def_sort.length){var $empty_options=$fm_def_sort.find('option[value="0"], option[value="-1"]'),$empty_option_1=$($empty_options[0]),$empty_option_2=$($empty_options[1]);$empty_option_1.after('");$empty_option_2.text(theme_language("filemanager_sorting_desc")).attr("data-label","").prop("disabled","disabled").removeAttr("value")}var $fm_columns=$file_manager_config_form.find('input[name="columns"]:not([value="size"])');$fm_columns.on("input",function(){var e=this.value,t=this.checked;$fm_def_sort.find("option[value]").map(function(){if(this.value&&this.value.includes(e)){if(!t&&$(this).is(":selected")){$fm_def_sort.val(0)}return $(this).prop("disabled",!t)}})}).trigger("input");var $save_btn=$file_manager_config_form.find('[name="save"]'),get_file_manager_link=function(){return $('aside .navigation a[href*="'+v___module_file_manager+'"]').attr("href")};$save_btn.on("click",function(e){e.preventDefault();e.stopPropagation();vars.pjax.cache.set("disable");if($(this).hasClass("disabled")){return}var t=$(this),i=session.server.data("webprefix");t.attr("name","save_next");var a=$("").attr({type:"hidden",name:"section_curr",value:$file_manager_config_form.find('[name="section"]').val()}).appendTo($file_manager_config_form);set_onbeforeunload_status(0);$file_manager_config_form.submit();despinnerfy_buttons();spinnerfy_buttons(t);progress.start();$.ajax({type:"POST",url:$file_manager_config_form.attr("action")+"?noredirect=1",data:$file_manager_config_form.serialize(),complete:function(){theme_open_new_inner_link(i+"/"+v___module_file_manager+"/index.cgi")}});setTimeout(function(){a.remove();t.attr("name","save")},1)});var deps={config_portable_module_filemanager_hide_tree_view:["config_portable_module_filemanager_tree_expand_search","config_portable_module_filemanager_tree_view_depth","config_portable_module_filemanager_tree_exclude_on_first_load"],config_portable_module_filemanager_hide_toolbar:["config_portable_module_filemanager_hovered_toolbar"]};for(const e in deps){theme.config._.funcs.dependent_radios(e,deps[e],false,$file_manager_config_form)}["selinux","acls"].forEach(function(e){var t=$file_manager_config_form.find('[name="columns"][value="'+e+'"]'),i="filemanager_mconfig_columns_"+e+"_disabled",a=window["theme_server_data_available_"+e+""];t.prop("disabled",!a);var n=t.parent();if(!a){if(t.is(":checked")){t.prop("checked",false)}n.attr("data-target-tooltip-callback",i);theme_inject_tooltip(i,false,false,false,false,false,true,"click",true,1)}});if(v___location_path===v___location_prefix+"/mconfig.cgi"){var $files_safe_mode_input_obj=$('.container-fluid input[name="config_portable_module_filemanager_files_safe_mode"]');if(!pjax_popstate&&$files_safe_mode_input_obj.length){snippets.inject_extra_option("checkbox:after",$files_safe_mode_input_obj.closest(".awobject").last(),"config_portable_module_filemanager_files_mode_ask",theme_language("filemanager_files_mode_ask"),{style:{marginLeft:6,verticalAlign:"1%"},checked:config_portable_module_filemanager_files_mode_ask?true:false})}var $files_auto_per_page_mode_input_obj=$('.container-fluid select[name="per_page"]');if($files_auto_per_page_mode_input_obj.length){if(!pjax_popstate){snippets.inject_extra_option("checkbox:after",$files_auto_per_page_mode_input_obj,"config_portable_module_filemanager_auto_per_page",theme_language("global_automatic"),{style:{marginLeft:8,verticalAlign:"1%"},checked:config_portable_module_filemanager_auto_per_page?true:false},function(){var e=$('input[name="config_portable_module_filemanager_auto_per_page"]');$('form[action="mconfig_save.cgi"]').on("change",e,function(){var t=e.get(0);$files_auto_per_page_mode_input_obj.toggleClass("disabled",t.value=="true"?true:false)}).trigger("change")})}}}}$('.ui_form_end_submit[onclick^="window.open"]').click(function(){var e=$(this);setTimeout(function(){e.removeClass("disabled");plugins.navigation.load.stop()},100)});if(v___location_path&&v___location_path.indexOf("/sysinfo.cgi")>-1){sysinfo_replace_dismiss_buttons();$("body").undelegate(".piechart canvas","mouseover mouseleave");$("body").on("mouseover",".piechart canvas",function(){var e=$(this).parent("span").attr("data-charts").split("_")[1];if((e=="cpu"||e=="mem"||e=="virt")&&!core.moduleAvailable("proc")){return}else if(e=="disk"&&!core.moduleAvailable("disk-usage")&&!core.moduleAvailable("quota")){return}$(this).addClass("cursor-alias")});$("body").undelegate(".piechart canvas","click");$("body").on("click",".piechart canvas",function(e){e.preventDefault();var t=$(this).parent("span").attr("data-charts").split("_")[1],i;if(t=="cpu"&&core.moduleAvailable("proc")){i=v___location_prefix+"/proc/index_cpu.cgi"}else if((t=="mem"||t=="virt")&&core.moduleAvailable("proc")){i=v___location_prefix+"/proc/index_size.cgi"}else if(t=="disk"&&core.moduleAvailable("disk-usage")){i=v___location_prefix+"/disk-usage"}else if(t=="disk"&&core.moduleAvailable("quota")){i=v___location_prefix+"/quota/list_users.cgi?dir=%2F"}if(i&&i.length){get_pjax_content(i)}});page_sysinfo_sensor_update_label();if(v___user_level=="0"){plugins.slider.data.fetch()}var chart_size_def_value=172;if(settings_sysinfo_easypie_charts_size!=chart_size_def_value){var diff=parseInt(settings_sysinfo_easypie_charts_size-chart_size_def_value),position_diff_label=diff*.9,position_diff_percent=diff*.2,font_diff_label=settings_sysinfo_easypie_charts_size'+(theme_language("global_warning")+": "+theme_language("dashboard_panels_disabled_explain")),45,"warning","dashboard_panel_removed",1,["bottom","center"]);var l=$("["+r+"]").parent().prev(".messenger-close");l.one("click",function(e){localStorage.setItem(v___server_hostname+"-"+"dashboard_panel_removed_explained",1)})}});var panels_container_sel=".container-fluid #"+extended_sysinfo_str+"-1";sortable(panels_container_sel,{forcePlaceholderSize:true}).on("sortupdate",function(){settings_sysinfo_panels_order={};dashboard_panels().each(function(e,t){settings_sysinfo_panels_order[$(t).attr(data_referrer_str)]=String.fromCharCode(97+e).toUpperCase()}).promise().done(function(){settings_sysinfo_panels_order=JSON.stringify(settings_sysinfo_panels_order);theme.config.save();setTimeout(function(){try{theme_panels_sort("slider")}catch(e){}},100)})});plugins.dashboard.update.alertsHTML()}if($t_uri_virtualmin&&core.curModuleFileQuery("syslog","save_log.cgi","view=1")||$t_uri_virtualmin&&core.curModuleFileQuery("logviewer","view_log.cgi","view=1")){$('select[name="idx"] option').filter(function(){return this.text==$.trim($("span[data-sub_title] tt").text())}).attr("selected",true);$('select[name="idx"]').addClass("hidden")}if(core.curModuleFileQuery("logviewer","view_log.cgi","view=1")||core.curModuleFileQuery("syslog","save_log.cgi","view=1")||core.curModuleFileQuery("syslog","save_log.cgi","new=")){var target=".panel-body .fa-refresh-fi",current_refresh_timer=localStorage.getItem(v___server_hostname+"-"+"option_"+v___module+"_refresh"),current_icon_class_str=".fa-refresh-fi",refresh_timer_str=".refresh-timer-timeout",btn_str=""+target+", .panel-body "+refresh_timer_str+"",timeout_box=''+(current_refresh_timer?current_refresh_timer:"0")+" ";$.each($(target+":not([data-processed])").parent("button"),function(e,t){$(this).addClass("btn-xxs btntimer").find("i").attr("data-processed",1);$(this).wrap('
          ');$(this).after(""+'"+'");if(current_refresh_timer&¤t_refresh_timer!="0"){var i=$(btn_str);$(this).find("i").before(timeout_box);$(this).find("i").remove();var a=current_refresh_timer;typeof refreshTimer==="number"&&clearInterval(refreshTimer);refreshTimer=setInterval(function(){--a;$(refresh_timer_str).text(a);if(a<=0){$(i[0]).parent().trigger("click");clearInterval(refreshTimer)}},1e3)}}).promise().done(function(){$(".refresh-timer-select li").click(function(){typeof refreshTimer==="number"&&clearInterval(refreshTimer);var e='',t=''+(current_refresh_timer?current_refresh_timer:"0")+" ";localStorage.setItem(v___server_hostname+"-"+"option_"+v___module+"_refresh",$(this).find("a").data("timeout"));current_refresh_timer=localStorage.getItem(v___server_hostname+"-"+"option_"+v___module+"_refresh");var i=$(btn_str),a=i.parent();if(current_refresh_timer&¤t_refresh_timer!="0"){if(!a.find(refresh_timer_str).length){a.prepend(t)}a.find(refresh_timer_str).html(current_refresh_timer+" ");$(current_icon_class_str).remove();var n=current_refresh_timer;refreshTimer=setInterval(function(){--n;$(refresh_timer_str).text(n);if(n<=0){var e=$(btn_str);$(e[0]).parent().trigger("click");clearInterval(refreshTimer)}},1e3)}else{$(refresh_timer_str).remove();!a.find(current_icon_class_str).length&&a.prepend(e)}})});$.each($('form[action*="save_log.cgi"] select[name="idx"], form[action*="view_log.cgi"] select[name="idx"]'),function(){$(this).on("change",function(){var e=$("button.ui_submit.ui_form_end_submit");$(this).next().next('[name="filter"]').val("");e.first().trigger("click");e.addClass("disabled")})})}if(core.curModuleFile("virtual-server","summary_domain.cgi")){$(".__page #headln2l .btn-group, .__page .page_footer_submit").remove();var $a_targ_dom_file=$("a[data-dom-file]"),a_targ_dom_file_path=Convert.quoteEscape($a_targ_dom_file.data("dom-file")),a_targ_dom_file_view_link="!view "+a_targ_dom_file_path+"/M=1/V=1/H=1",a_targ_dom_file_edit_link="!edit "+a_targ_dom_file_path;$a_targ_dom_file.data("view-link",a_targ_dom_file_view_link).data("edit-link",a_targ_dom_file_edit_link).attr("href",a_targ_dom_file_view_link)}if(settings_side_slider_enabled){if(core.curModule("package-updates")){plugins.slider.notifications.dismiss("package_message")}if(core.curModule("csf")){plugins.slider.notifications.dismiss("csf_remote_version");plugins.slider.notifications.dismiss("csf_title")}}vars.plugins.tooltip.delay.show=600;vars.plugins.tooltip.delay.hide=50;snippets.tooltips(true);if($.support.spa&&(window.matchMedia("(max-width: 1080px)").matches||$("html").attr("data-navigation-collapsed")=="1"&&!vars.navigation.pinned)){plugins.navigation.lock()}if($.support.spa&&(window.matchMedia("(max-width: 1365px)").matches||$("html").attr("data-navigation-collapsed")=="1"&&!vars.navigation.pinned)){plugins.slider.state()}if($("body").hasClass("session_login")){setTimeout(function(){page_display()},200)}theme_to_new_tab();if(core.curModuleFile("acl","save_twofactor.cgi")){setTimeout(function(){var e=$("p > img"),t=e.attr("src");e.attr("src",t.replace(v___location_prefix+"/"+v___module+"/",""))},0)}if(v___location_path_lead_unslashed==v___location_prefix_unslashed_trail_slashed+"proc/edit_proc.cgi"||v___location_path_lead_unslashed==v___location_prefix_unslashed_trail_slashed+"proc/kill_proc.cgi"||v___location_path_lead_unslashed==v___location_prefix_unslashed_trail_slashed+"proc/renice_proc.cgi"){var proc_nice_level='form[action*="renice_proc.cgi"]',proc_nice_pid=$(proc_nice_level).next('input[name="pid"]'),proc_target=$('.col_value select[name="nice"]').parent("td"),proc_target_content=proc_target.html();$(proc_nice_level).append(proc_nice_pid.detach(),proc_target_content);$(proc_nice_level).find('[type="button"]').addClass("heighter-28");proc_target.html($(proc_nice_level).detach());$('.proc form[action*="kill_proc.cgi"]').on("submit",function(){var e=quirks.active_element(),t=$(this).find("input").filter(function(){return this.name!="pid"&&this.name!="signal"&&this.name!=e.name});t.attr("disabled","disabled");setTimeout(function(){t},1);return true});if($('.proc form[action*="kill_proc.cgi"]').length){var sig_sel_sel_str='[name="signal"]',$sig_sel_btns=$(""+sig_sel_sel_str+" ~ .btn");$sig_sel_btns.removeClass("heighter-28");$(sig_sel_sel_str).prev().prev(".btn").find(".fa-search").removeClass("fa-search").addClass("fa-play")}}setTimeout(function(){v___blocked_navigation=0},10);var date_chooser_button=$(".date_chooser_button");if(date_chooser_button.length){$.each(date_chooser_button,function(){var e=$(this).parent('td:contains("/")');var t=e.find("select"),i=t.prev("input");$year=t.next("input"),cls="margined-left--10";t.addClass(cls);$year.addClass(cls).attr("size",3);i.attr("size",1)})}$.each($(".date_chooser_button"),function(){var e="input",t="select",i=$(e+'[name="'+$(this).data("year")+'"]'),a=$(t+'[name="'+$(this).data("month")+'"]'),n=$(e+'[name="'+$(this).data("day")+'"]'),r=$(a).find("option:eq(0)").val()==1?0:1;$(this).datepicker({format:" yyyy-m-d",language:session.server.data("language"),todayHighlight:true,autoclose:true}).on("changeDate",function(e){var t=(e.date.getFullYear()+"-"+(e.date.getMonth()+1)+"-"+e.date.getDate()).split("-");if(t){$(n).val(parseInt(t[2]));$(a).val(parseInt(t[1])-r);$(i).val(parseInt(t[0]))}}).on("show",function(e){var t=$(this),l=parseInt($(n).val()),o=$(a).val()?parseInt($(a).val())+r:false,s=$(i).val();if(l&&o&&s){t.datepicker("update",""+s+"-"+o+"-"+l+"")}else{}})});if(core.curModule("mailbox")){$.each($('[onclick*="document.forms"]'),function(){var e=$(this),t=e.attr("onclick"),i=$("aside form").length;e.attr("onclick",t.replace(/document\.forms\[0\]/g,"document.forms["+i+"]"));e.attr("onclick",t.replace(/document\.forms\[1\]/g,"document.forms["+(i+1)+"]"))});$("#print").on("click",function(e){e.preventDefault();e.stopPropagation()})}if(core.curModuleFile("forward","edit_alias.cgi")){$.each($('[onchange*="document.forms"]'),function(){var e=$(this),t=e.attr("onchange"),i=$("aside form").length;e.attr("onchange",t.replace("document.forms[0]","document.forms["+i+"]"))})}if(core.curModuleFile("schedule","edit.cgi")||core.curModule("mailbox")){$.each($('[onclick*="address_chooser"]'),function(e,t){$(this).attr("onclick",$(this).attr("onclick").replace(".forms[0]",".forms[1]"));$(this).next(".file_chooser_button_attached").removeClass("fa-files-o").addClass("fa-address-book-o")})}var add_clock_icon=function(e){e.removeClass("fa-files-o").addClass("fa-clock").css("font-size","12px").css("line-height","10px")};if(core.curModuleFile("virtual-server","backup_form.cgi")){add_clock_icon($('[name="enabled_complex"] + input + .file_chooser_button_attached'))}if(core.curModuleFile("virtual-server","edit_newquotas.cgi")||core.curModuleFile("virtual-server","edit_newvalidate.cgi")){add_clock_icon($('[name="sched_complex"] + input + .file_chooser_button_attached'))}if(core.curModuleFile("server-manager","edit_backup.cgi")||core.curModuleFile("server-manager","edit_vbackup.cgi")||core.curModuleFile("server-manager","edit_vsync.cgi")){add_clock_icon($('[name$="_complex"] + input + .file_chooser_button_attached'))}if(core.curModuleFile("server-manager","index.cgi")||core.curModuleFile("server-manager","")){$.each($('[onclick*="document.forms"]'),function(){var e=$(this),t=e.attr("onclick"),i=$("aside form").length,a=$(".container-fluid .panel-body > form").length-1;e.attr("onclick",t.replace(/document\.forms\[\d*\]/g,"document.forms["+(i+a)+"]"))})}var selectStr="select",mod_status_edit_mon_select='[action="edit_mon.cgi"] '+selectStr+'[name="type"]',select_for=$(""+selectStr+'.ui_select[name="module"], '+selectStr+'.ui_select[name="user"], '+selectStr+'.ui_select[name="nuser"], '+selectStr+'.ui_select[name="zone"], '+selectStr+'.ui_select[name="serv"], '+selectStr+'.ui_select[name="mod"], '+selectStr+".onchange_form_submit_triggger, "+mod_status_edit_mon_select+", "+selectStr+'[name="idx"], '+selectStr+'[name="file"]:first, '+selectStr+'[name="manual"]:first'),originalSelectAddedHiddenClass=""+selectStr+"2-hidden-accessible",select2Class=""+selectStr+"2",select2ContentTriggerClass=""+selectStr+"2-content",select2ContentContainerTriggerClass=select2ContentTriggerClass+"-"+"container",heighterStr="heighter",heighterType="34",heighterTypeForce="-force",v___page_hadEditor=0;if(pjax_popstate){$.each($(".container-fluid ."+originalSelectAddedHiddenClass+" + ."+select2Class+""),function(){v___page_hadEditor=1;$(this).prev("."+originalSelectAddedHiddenClass+"").removeClass(originalSelectAddedHiddenClass);$(this).remove()})}if(core.curModuleFile("webminlog","")||core.curModuleFile("webminlog","index.cgi")||core.curModuleFile("time","")||core.curModuleFile("time","index.cgi")||core.curModuleFile("firewalld","edit_serv.cgi")||core.curModuleFile("php-pear","")||core.curModuleFile("php-pear","index.cgi")||core.curModuleFile("mysql","")||core.curModuleFile("mysql","index.cgi")||core.curModuleFile("mysql","edit_dbase.cgi")||core.curModuleFile("fail2ban","edit_manual.cgi")||core.curModuleFile("mailboxes","list_mail.cgi")||core.curModuleFile("mailboxes","mail_search.cgi")||core.curModuleFile("postgresql","")||core.curModuleFile("postgresql","index.cgi")||core.curModuleFile("postgresql","edit_dbase.cgi")||core.curModuleFile("status","")||core.curModuleFile("status","index.cgi")||(core.curModuleFile("virtual-server","edit_tmpl.cgi")||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")||core.curModuleFileQuery("logviewer","view_log.cgi","view=1")||core.curModuleFileQuery("syslog","save_log.cgi","view=1")||core.curModuleFileQuery("syslog","save_log.cgi","new=")||v___page_hasEditor||v___page_hadEditor){var force_small_select=false;if((select_for.hasClass(""+heighterStr+"-28")||select_for.outerHeight()<=28||force_small_select)&&!select_for.hasClass(heighterStr+"-"+heighterType+heighterTypeForce)){heighterType="28"}if(!$(mod_status_edit_mon_select).length){editor_config_label(v___location_file==="edit_keys.cgi")}else{if($(mod_status_edit_mon_select).length){$(mod_status_edit_mon_select).each(function(){filter_out_objects_inner_chars($(this).prev(),":");$(this).prev().addClass("elm-rel-z "+heighterStr+"-"+heighterType+heighterTypeForce)})}}select_for.select2({minimumResultsForSearch:6,containerCssClass:""+select2ContentTriggerClass+" "+heighterStr+"-"+heighterType+"",dropdownCssClass:""+select2ContentTriggerClass+" h"+heighterType+""});select_for.addClass(heighterStr+"-"+heighterType+heighterTypeForce);select_for.next("."+select2Class+"").addClass(select2ContentContainerTriggerClass);select_for.next("."+select2Class+"").next(".ui_form_end_submit").addClass(""+heighterStr+"-"+heighterType+"");select_for.on("select2:open",function(){$("body").find(".select2-container, "+v___class_select2_leak).removeClass("select2-aside");setTimeout(function(){var e=document.querySelector(".select2-search__field");e&&e.focus()})});select_for.on("select2:select",function(e){$(this).parents("form").trigger("input")});setTimeout(function(){bind_sameorigin(0)},100)}if(v___location_file==="install_mod.cgi"){var prev_req=vars.previous_request,$prev_req_file=$(prev_req.target).find('[name="file"]');if(prev_req.type==="submit"&&Test.strContains($(prev_req.target).attr("action"),v___location_file)&&$prev_req_file&&$prev_req_file.val()){if(Test.strContains($prev_req_file.val(),"csfwebmin")){$('.container-fluid a[href*="csf"]').on("click",function(e){e.preventDefault();$('aside a[href*="csf/index.cgi"]').trigger("click")});plugins.navigation.reload();$.ajax({type:"POST",url:v___location_prefix+"/index.cgi",success:function(e){},error:function(e){}})}}}if(!pjax_popstate&&v___location_path_lead_unslashed==v___location_prefix_unslashed_trail_slashed+"settings-editor_read.cgi"){$('form[action*="settings-editor_write.cgi"] .btn-group.end_submits button.btn').on("click",function(){var custom_styles=$("[data-custom-style]"),custom_script=$("[data-custom-script]"),data=$('[name="data"]').val();if(Test.strContains($('[name="file"]').val(),"styles.css")){custom_styles.remove();$("head").append("")}if(Test.strContains($('[name="file"]').val(),"scripts.js")){custom_script.remove();eval(data)}})}var $bottom_js_back=$('.btn-lg.page_footer_submit[href*="javascript:history.back"]'),$topBackButton=$("#headln2l a i.fa.fa-arrow-left").parent("a");if($bottom_js_back&&$bottom_js_back.length){$topBackButton.attr("title",theme_language("global_prev_page")).tooltip("fixTitle").attr("href","javascript:history.back()");$topBackButton.one("click",function(e){e.preventDefault();e.stopPropagation();$bottom_js_back[0].click()})}else if(v___module!==v___module_file_manager){$topBackButton.find("i").addClass("fa-return").parent("a").addClass("btn-squiare-headln2 text-lighter-slight")}if(core.curModule("backup-config")){var $fetch_form=$($('.container-fluid form[action*=".cgi"].ui_form')[0]);$fetch_form.on("submit",function(e){if($fetch_form.find('input[name="dest_mode"]:checked').val()=="4"){e.preventDefault();e.stopPropagation();theme_download_form($(this))}});var $submit=$fetch_form.find('.ui_submit[name="backup"]'),$mods=$fetch_form.find('select[name="mods"]');$mods.length&&!$mods.val().length&&$submit.addClass("disabled");$fetch_form.on("change",function(e){var t=$mods.val().length;if(t){$submit.removeClass("disabled")}else{$submit.addClass("disabled")}})}if(core.curModuleFile("webmin","edit_mods.cgi")||core.curModuleFile("usermin","edit_mods.cgi")){var $fetch_form=$($('.container-fluid form[action*=".cgi"].ui_form')[3]);$fetch_form.on("submit",function(e){if($fetch_form.find('input[name="to"]:checked').val()=="0"){e.preventDefault();e.stopPropagation();theme_download_form($(this),"download_is_being_prepared")}});var $submit=$fetch_form.find('.ui_submit[name="ok"]');$submit.addClass("disabled");$fetch_form.on("change",function(e){var t=$fetch_form.find('select[name="mod"]').val()&&$fetch_form.find('select[name="mod"]').val().length;if(t){$submit.removeClass("disabled")}else{$submit.addClass("disabled")}})}if(core.curModuleFile("gnupg","edit_sign.cgi")||core.curModuleFile("gnupg","edit_decrypt.cgi")||core.curModuleFile("gnupg","edit_encrypt.cgi")){var $gnupg_forms=$('.container-fluid form[action="sign.cgi/signed.txt"].ui_form, '+'.container-fluid form[action="decrypt.cgi/output.txt"].ui_form,'+'.container-fluid form[action="encrypt.cgi/output.gpg"].ui_form');$gnupg_forms.attr("target","_blank")}if(core.curModuleFile("server-manager","transfer_form.cgi")){var $fetch_form=$('.container-fluid form[action*="download.cgi"].ui_form');$fetch_form.on("submit",function(e){if($fetch_form.find('input[name="dest"]:checked').val()=="0"){e.preventDefault();e.stopPropagation();theme_open_new_tab(v___location_prefix+"/server-manager/"+$(this).attr("action")+"?"+$(this).serialize());setTimeout(despinnerfy_buttons,300)}})}if((core.curModuleFile("mysql","backup_form.cgi")||core.curModuleFile("postgresql","backup_form.cgi"))&&v___location_query&&v___location_query.includes("db=")){var $backup_form=$('.container-fluid form[action*=".cgi"].ui_form');$backup_form.on("submit",function(e){if($backup_form.find('input[name="dest"]:checked').val()=="1"){e.preventDefault();e.stopPropagation();theme_download_form($(this))}})}if(core.curModuleFile("mysql","csv_form.cgi")){var $backup_form=$('.container-fluid form[action*=".cgi"].ui_form');$backup_form.on("submit",function(e){if($backup_form.find('input[name="dest"]:checked').val()=="0"){e.preventDefault();e.stopPropagation();theme_download_form($(this))}});var $submit=$backup_form.find('.ui_submit[name="ok"]');var $select_for_dbs_or_tables=$backup_form.find('select[name="cols"]');$backup_form.on("change",function(e){var t=$select_for_dbs_or_tables.val().length;if(t){$submit.removeClass("disabled")}else{$submit.addClass("disabled")}});$backup_form.trigger("change")}if(core.curModuleFile("virtual-server","backup_form.cgi")){var $vm_backup_form=$('form[action*="backup.cgi/backup"]'),$vm_backup_form_sched=$('form[action*="backup_sched.cgi"]');$vm_backup_form.find('select[name^="dest0_"]').on("change",function(){var e='input[name="fmt"]',t=$("form").find(""+e+'[value="0"]'),i=$("form").find(""+e+'[value="1"], '+e+'[value="2"]');if($(this).val()=="44"){i.prop("disabled",true);t.prop("checked",true).trigger("change");t.closest("tr").toggleClass("hidden",true)}else{i.prop("disabled",false);t.closest("tr").toggleClass("hidden",false)}});var $vm_backup_form_target=$vm_backup_form.length?$vm_backup_form:$vm_backup_form_sched;$vm_backup_form_target.find('input[type="radio"][name="compression"]').on("change",function(){var e=$vm_backup_form_target.find('input[type="radio"][name="increment"][value="0"]'),t=e.closest("tr");if($(this).val()=="3"){e.trigger("click");t.hide()}else{t.show()}});var $sched_backup_form=$('form[action*="backup_sched.cgi"]');if($sched_backup_form.length){var $sched_backup_form_purge=$sched_backup_form.find('[name^="purge"].ui_opt_textbox');if($sched_backup_form_purge.length){$sched_backup_form_purge.closest(".ui_grid_cell").prev("td").attr("style","vertical-align: middle !important; width: 10%; padding-left: 2px !important; padding-right: 10px !important")}}}$.each($(".container-fluid a.ui_link_replaced"),function(){if(this.href.includes("webminlog.csv")){$(this).removeClass().addClass("btn btn-default ui_submit heighter-34").prepend(' ')}});if(core.curModuleFile("virtual-server","edit_user.cgi")){$('.ui_form > table.opener_table_style > tbody > tr > td.opener_container > div[class^="opener_"] > .table-hardcoded:first-child').each(function(e,t){var i=$(t).find("tbody > tr > td");if(!i.length){$(t).parents(".opener_table_style").remove()}});var $showpass=$('form[action="save_user.cgi"] a[href^="showpass.cgi"]');if($showpass.length){$showpass.prev(".awradio").addClass("vertical-align-text-top").find(".lawobject").css({maxHeight:"25px"})}}if(core.curModuleFile("virtual-server","delete_domain.cgi")){$('form[action*="delete_domain.cgi"]').on("submit",function(){var e=URI.parseQuery(URI(location.href).query()).dom;plugins.favorites.remove(e)})}if(core.curModuleFile("server-manager","mass.cgi")){$('form[action*="mass.cgi"]').on("submit",function(){var e=$(this).find('input[name="d"][type="hidden"]').map(function(e,t){return $(t).val()}).get(),t=$(this).find('input[name="dereg"][type="hidden"][value="1"]').length;$.each(e,function(e,i){if(t&&i&&i.length>3){plugins.favorites.remove(i)}})})}if(core.curModuleFile("server-manager","mass_domains.cgi")){$('form[action*="mass_domains.cgi"]').on("submit",function(){var e=$(this).find('input[name="d"][type="hidden"]').map(function(e,t){return $(t).val()}).get(),t=$(this).find('input[name="delete"][type="hidden"][value="1"]').length;$.each(e,function(e,i){if(t&&i&&i.length>3){if(i&&i.includes("/")){i=i.split("/")[1];plugins.favorites.remove(i)}}})})}if(core.curModule("help")){$('.ui_form_end_submit ~ [type="reset"]').addClass("heighter-34")}var $multi_select=$(".ui_multi_select");if($multi_select.length){$multi_select.find('[onclick^="multi_select_move"]').text("...")}check_reboot(1);if(v___location_path&&v___location_path.length&&v___location_path.includes("webalizer/view_log.cgi")){if(!pjax_popstate){var $link_targets=document.querySelectorAll(".container-fluid .panel-body center p small a");$link_targets.forEach(function(e,t){e.innerHTML=e.innerHTML.slice(1,-1);e.classList.add("btn","btn-transparent","btn-link-bordered","btn-xxs")});var title_target_cnt=document.querySelector(".container-fluid #headln2c");title_target=title_target_cnt.querySelector("span"),title_target_fav=title_target_cnt.querySelector("button"),title_target_text=title_target.innerHTML;title_target_text=title_target_text.substr(0,title_target_text.lastIndexOf("-")).trim(),title_target_main=title_target_text.substr(0,title_target_text.lastIndexOf(" ")),title_target_sub=title_target_text.substr(title_target_text.lastIndexOf(" ")+1);title_target_cnt.innerHTML=title_target_fav.outerHTML+" "+title_target_main+'
          '+title_target_sub+"
          ";var $table_broken=$(".container-fluid .panel-body table"),$table_broken_delims=$table_broken.find('[height="4"]');$table_broken.removeClass("table-hardcoded").addClass("table-bordered").find('td[bgcolor="#c0c0c0"], th[bgcolor="#c0c0c0"]').attr("bgcolor","#f5f5f5");$table_broken_delims.remove();$.each($table_broken_delims,function(){$(this).parent("tr").remove()})}}if(core.curModuleFile("acl","edit_user.cgi")||core.curModule("changepass")||core.curModuleFile("virtual-server","clone_form.cgi")||core.curModuleFile("virtual-server","edit_user.cgi")||core.curModuleFile("virtual-server","list_databases.cgi")||core.curModuleFile("virtual-server","edit_domain.cgi")||core.curModuleFile("virtual-server","domain_form.cgi")||core.curModuleFile("virtual-server","edit_pass.cgi")||core.curModuleFile("samba","edit_euser.cgi")||core.curModuleFile("samba","ask_epass.cgi")||core.curModuleFileQuery("postgresql","edit_user.cgi","new=")||core.curModuleFileQuery("mysql","edit_user.cgi","new=")||core.curModuleFileQuery("passwd","edit_passwd.cgi","user=")||core.curModuleFile("mailbox","inbox_login_error.cgi")||core.curModuleFile("server-manager","edit_pass.cgi")&&v___location_query.includes("force=1")){if(core.curModuleFile("virtual-server","edit_domain.cgi")){$('.container-fluid .panel-body input[type="text"][name="passwd"]').addClass("t-password-complexity-meter-inputter-obj")}$('.container-fluid .panel-body input[type="password"]:not([data-password-again]), '+'.container-fluid .panel-body input[type="text"][name="passwd"]:not([data-password-again]), '+".container-fluid .panel-body input.t-password-complexity-meter-inputter-obj, "+'[data-uri*="/virtual-server/edit_user.cgi"] .container-fluid .panel-body input[name="mailpass"]').passwordComplexityMeter();var class_to_remove="badge badge-transparent badge-circle";if(core.curModuleFile("virtual-server","list_databases.cgi")){var $view_pass_button=$('a[href^="showpass.cgi?dom="]');$view_pass_button.each(function(){$(this).addClass("btn btn-default heighter-28 margined-left--1");$(this).parents(".ui_radio_table").find(".t-password-complexity-meter-wrapper-cont > .btn-group").append($(this).detach());$(this).removeClass(class_to_remove)})}if(core.curModuleFile("server-manager","edit_pass.cgi")){var $view_pass_button2=$('.t-password-complexity-meter-wrapper-cont + a[href^="showpass.cgi?"]');$view_pass_button2.addClass("btn btn-default heighter-28 margined-left--1");$view_pass_button2.removeClass(class_to_remove);var $fg_targ=$('form[action="save_pass.cgi"] .t-password-complexity-meter-wrapper-cont > .btn-group');$fg_targ.append($view_pass_button2.detach());$fg_targ.find("i.fa2-account-key").addClass("pd-tp-3");var $view_pass_button3=$('input[type="password"] + a[href^="showpass.cgi?"]');$view_pass_button3.addClass("btn btn-default heighter-28 margined-left--4").find("i.fa2-account-key").addClass("pd-tp-3");$view_pass_button3.removeClass(class_to_remove)}}var input_warning_caps="input_warning_caps",input_password_targets=document.querySelectorAll('input[type="password"]');$(".container-fluid ."+input_warning_caps+"").remove();for(i=0,length=input_password_targets.length;i30?1:0;span.classList.add(input_warning_caps);span.setAttribute("title","Caps Lock");isLargePassInput&&span.classList.add("large");input_password_targets[i].classList.add("use_"+input_warning_caps+"");input_password_targets[i].parentNode.insertBefore(span,input_password_targets[i].nextSibling);input_password_targets[i].addEventListener("blur",function(){this.nextSibling.classList.remove("visible")});input_password_targets[i].addEventListener("keydown",function(e){if(typeof e.getModifierState!=="function"){return}state=e.keyCode===20?!e.getModifierState("CapsLock"):e.getModifierState("CapsLock");if(state){this.nextSibling.classList.add("visible")}else{this.nextSibling.classList.remove("visible")}})}$.each($(".container-fluid select:visible"),function(){if($(this).css("height")==="28px"){$(this).nextAll(".btn").addClass("heighter-28")}});if(pjax_popstate&&(core.curModule("mysql")||core.curModule("postgresql"))){typeof f__ex__mysql_runner_update==="function"&&f__ex__mysql_runner_update()}$(".container-fluid select").on("change",function(){if(this.multiple){var e=$(this).val();$(this.options).removeAttr("selected");$(this.options).removeAttr("selected");for(var t=0,i=this.options.length;t
          ');e.find(""+table_str+"."+table_hover_str+"").first().removeClass(table_hover_str);e.find("."+opener_hidden_str+" > "+table_str+"").removeClass(table_hover_force).find("tbody > tr > td > "+table_str+"."+table_hover_str+"").addClass(table_hover_force)}})}}if(v___location_path==v___location_prefix+"/shell/"||v___location_path==v___location_prefix+"/shell/index.cgi"||v___location_path==v___location_prefix+"/server-manager/shell.cgi"){var shell_header_sel="#headln2r .btn-group",path_to_shell_class="path-to-shell",shell_title=$("aside .user-link.ported-console").attr("data-title"),shell_title_inject=String();if(!pjax_popstate){if(shell_title){shell_title_inject=theme_inject_tooltip(shell_title,"#headln2r",false,false,false,"(")}if(session.server.data("terminal")==="0"){$(shell_header_sel).append("')}}$(shell_header_sel).find("."+path_to_shell_class+"").on("click",function(e){e.preventDefault();plugins.shell.open()})}if(core.error.get()){if(v___initial_load||v___module===v___module_file_manager||vars.requested_page&&vars.requested_page.includes("/"+v___module_file_manager+"")){core.error.clean()}}if(core.curModuleFile("server-manager","list_ifaces.cgi")||core.curModuleFile("server-manager","list_ips.cgi")){var ui_links_row_str="ui_links_row",$empty_table_check=$(".container-fluid ."+ui_links_row_str+" ~ .table-condensed, #att_ranges .table-striped");var $safe_target=$empty_table_check.find("thead + tbody").html();if($safe_target&&$safe_target.length===1){$empty_table_check.add($empty_table_check.next("."+ui_links_row_str+"")).add($empty_table_check.next("."+ui_links_row_str+"").nextAll("br")).remove()}}$("textarea").on("click",function(){if(!$(this).attr("readonly")||$(this).hasClass("disabled")){return}var e=$(this).val();if(e){this.select();theme_copy_to_clipboard(e);plugins.messenger.post(''+theme_language("textarea_to_clipboard")+":
          "+e+"
          ",5,"success","textarea_to_clipboard")}});if(core.curModuleFile("mailbox","list_addresses.cgi")){$('.container-fluid textarea[name="members"] ~ .btn.btn-success.ui_form_end_submit').removeClass("btn-success").addClass("btn-default btn-block margined-top--5 btn--save-grp").find(".fa").remove()}if(core.curModule("custom")){var custom_file_edit_mode=core.curModuleFile("custom","view.cgi");if(!pjax_popstate){var custom_cmd_main_container_main=".ui_grid_row > .ui_grid_cell > .ui_form > .table-responsive > .table-subtable > tbody > tr > td > .sub_table_container",custom_cmd_main_container=""+custom_cmd_main_container_main+" > tbody";$(""+custom_cmd_main_container+' > tr:nth-child(1) > td[colspan="2"]').each(function(){if(!$(this).find(".ui_form_end_submit").length){$(this).addClass("no-contents padded-a-3").parent("tr").addClass("no-contents")}});var $has_icon=$(".sub_table_container td:last-child.col_value.col_header > .ui_form_end_submit");if(!$has_icon.find("i.fa").length&&!$has_icon.parents(".ui_grid_cell").length){$has_icon.addClass("heighter-28")}var custom_sub_table=".custom table.ui_grid_table .ui_grid_row .sub_table_container";var $col_head=$(""+custom_sub_table+" tr");$.each($col_head,function(){if(!$(this).find(".ui_form_end_submit").length){$(this).find(".col_header.col_value").removeClass()}});$.each($(custom_sub_table),function(){var e=$(this).find("tr"),t=e.find("input:not(:hidden):not(.hidden), textarea, select").length;if(t>=1){$(this).addClass("dense");e.find("td.col_label").addClass("w-auto");e.find('td.col_value:not([colspan="2"])').find("button.ui_form_end_submit").addClass("btn-tiny").parent("td").prev("td.col_label").addClass("vertical-align-middle");e.addClass("no-contents")}});if(v___location_file==="form.cgi"){$(".sub_table_container").find(".ui_form_end_submit").addClass("heighter-28").prepend(' ').parent("td").prev("td.col_label").addClass("vertical-align-middle")}if(custom_file_edit_mode){var detach_button_html=''+''+"";$("#headln2l .btn-group").append(detach_button_html)}}if(custom_file_edit_mode){$("#headln2l .btn-group [data-external-detach-custom-file]").on("click",function(e){e.preventDefault();var t=$("#headln2c").find("[data-main_title] + [data-sub_title] > tt").text();t&&edit_file_from_full_path(t)})}}if(!pjax_popstate){$(".chooser_button").each(function(){var e=$(this).prev("input[name], textarea");if(!e.length){e=$(this).prev("span").find(".ui_opt_textbox");if(e.length){e=e.unwrap()}}else{if(!e.attr("class")&&Math.round(e.outerHeight(true))>=32){e.css({marginTop:1,marginBottom:1})}}$(this).add(e).wrapAll('')})}var vs_str_="virtual-server",sm_str_="server-manager",vm_nginx_="virtualmin-nginx";if(core.curModuleFile(vs_str_,"edit_newchroot.cgi")||core.curModuleFile(vs_str_,"edit_newglobal.cgi")||core.curModuleFile(vs_str_,"edit_newlinks.cgi")||core.curModuleFile(vs_str_,"edit_newshells.cgi")||core.curModuleFile(vs_str_,"view_backuplog.cgi")||core.curModuleFile(vm_nginx_,"edit_logs.cgi")||core.curModuleFile(vm_nginx_,"edit_srewrite.cgi")||core.curModuleFile(vm_nginx_,"edit_saccess.cgi")||core.curModuleFile(vm_nginx_,"edit_sproxy.cgi")||core.curModuleFile(vm_nginx_,"edit_fcgi.cgi")||core.curModuleFile(vs_str_,"edit_phpver.cgi")||core.curModuleFile(vs_str_,"edit_spf.cgi")||core.curModuleFile(vs_str_,"ratelimit.cgi")||core.curModuleFile(vs_str_,"edit_newfields.cgi")||core.curModuleFile(sm_str_,"edit_docker.cgi")||core.curModuleFile(sm_str_,"edit_vserver.cgi")||core.curModuleFile(sm_str_,"edit_zone.cgi")||core.curModuleFile(sm_str_,"edit_openvz.cgi")||core.curModuleFile(sm_str_,"list_locations.cgi")||core.curModuleFile(sm_str_,"edit_lxc.cgi")||core.curModuleFile(sm_str_,"list_ips.cgi")||core.curModuleFile("acl","edit_unix.cgi")||core.curModuleFile("squid","edit_cachemgr.cgi")||core.curModuleFile("spam","edit_white.cgi")||core.curModuleFile("fsdump","edit_dump.cgi")||core.curModuleFile("mysql","backup_form.cgi")||core.curModuleFile("mysql","table_form.cgi")||core.curModuleFile("postgresql","backup_form.cgi")||core.curModuleFile("webmin","edit_bind.cgi")||core.curModuleFile("usermin","edit_bind.cgi")||core.curModuleFile("procmail","edit_recipe.cgi")||core.curModuleFile("usermin","edit_logout.cgi")||core.curModuleFile("net","list_routes.cgi")||core.curModuleFile("cron","edit_cron.cgi")||core.curModuleFile("cluster-copy","edit.cgi")||core.curModuleFile("cluster-cron","edit.cgi")||core.curModuleFile("webalizer","edit_log.cgi")||core.curModuleFile("apache","edit_global.cgi")||core.curModuleFile("logrotate","edit_sched.cgi")||core.curModuleFile("fetchmail","edit_cron.cgi")||core.curModuleFile(vs_str_,"edit_bucket.cgi")||core.curModuleFile("sshd","edit_net.cgi")||core.curModuleFile("fail2ban","edit_jail.cgi")||core.curModuleFile("webmin","edit_advanced.cgi")||core.curModuleFile("webmin","edit_web.cgi")||core.curModuleFile("usermin","edit_web.cgi")||core.curModuleFile("webmin","edit_os.cgi")||core.curModuleFile("usermin","edit_os.cgi")||core.curModuleFile("webmin","edit_descs.cgi")||core.curModuleFile("usermin","edit_descs.cgi")||core.curModuleFile("virtualmin-init","edit_tmpl.cgi")||core.curModuleFile("ssh","edit_host.cgi")||core.curModuleFile("syslog","edit_log.cgi")||core.curModuleFile("mysql","newdb_form.cgi")||core.curModuleFile("ldap-server","acl_form.cgi")||core.curModuleFile("ldap-client","edit_server.cgi")||core.curModuleFile("squid","edit_ports.cgi")||core.curModuleFile("squid","edit_logs.cgi")||core.curModuleFile("squid","edit_cache.cgi")||core.curModuleFile("virtualmin-nginx","edit_server.cgi")||core.curModuleFile("spam","edit_simple.cgi")||core.curModuleFile("spam","edit_report.cgi")||core.curModule("virtual-server")&&v___location_file=="edit_resel.cgi"||core.curModule("virtual-server")&&v___location_file=="edit_tmpl.cgi"||core.curModuleFile("cpan","download.cgi")||core.curModuleFile("virtual-server","edit_phpmode.cgi")||core.curModuleFile("net","edit_bifc.cgi")||core.curModuleFile("net","edit_aifc.cgi")||check_location_resource("/config.cgi?phpini")||$('body[class*="bind8"]').length&&v___location_file||$('body[class*="status"]').length&&v___location_file=="edit_mon.cgi"||$('body[class*="custom"]').length&&v___location_file=="edit_sql.cgi"||$('body[class*="custom"]').length&&v___location_file=="edit_cmd.cgi"||$('body[class*="custom"]').length&&v___location_file=="edit_file.cgi"){$(".table:not(.opener_table_style):not(.dataTable)").removeClass("table-hover").addClass("no-hover");if(core.curModule("virtual-server")&&v___location_file=="edit_tmpl.cgi"){$(".table:not(.opener_table_style):not(.dataTable) > tbody > tr > td > table > tbody > tr > td > table").addClass("w-100p-f")}}theme_ui_opt_select(3);if(core.curModuleFile("apache","edit_mods.cgi")){var mpm_targets='.iawobject[value^="mpm_"]';$(mpm_targets).on("click",function(){$(mpm_targets+":checked").not(this).trigger("click")})}snippets.page.render_table_labels($(".container-fluid > .panel > .panel-body"));$(".ui_grid_cell:first-child > .btn-group.ui_links_row").parent().addClass("ui_grid_cell_auto");$(".ui_radio_table > tbody > tr > td > textarea").each(function(){$(this).parent("td").prev("td").addClass("vertical-align-middle")});if(core.curModuleFile("acl","edit_user.cgi")){$('.container-fluid form[action="save_user.cgi"] input[name="twofactor"]').prev().removeClass().addClass("btn btn-xxs btn-success margined-left-5 pd-bt-2").attr("type","submit")}if(!pjax_popstate&&v___location_path===v___location_prefix+"/virtual-server/edit_tmpl.cgi"){embed_table_header_icon();var server_template_filter_dropdown_spinner=theme_spinner_small(false,!v___theme_night_mode?"dark smaller2":" "),server_template_filter_dropdown_tooltip_text=theme_language("tooltip_virtualmin_templates_filter_generating"),server_template_filter_dropdown_tooltip_data_toggle_str='data-toggle="tooltip"',server_template_filter_dropdown_html=""+"";var server_template_filter_dropdown_selector_str='[action="edit_tmpl.cgi"] > [name="editmode"] ~ .end_submits';$(server_template_filter_dropdown_selector_str).prepend(server_template_filter_dropdown_html);$(server_template_filter_dropdown_selector_str).find("["+server_template_filter_dropdown_tooltip_data_toggle_str+"]").attr("data-placement","auto top").data("placement","auto top").tooltip("fixTitle")}if(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"){embed_table_header_icon();setTimeout(plugins.filter.options,101)}$("#content > .container-fluid > .panel > div.panel-body > p:last-child").each(function(){var e=$(this).text();if(e&&e.length){e=$.trim(e);if(!e){$(this).empty()}}});if(core.curModule("virtualmin-nginx")&&v___location_file=="edit_mime.cgi"&&v___location_query&&v___location_query.indexOf("search=")>=0){var $vm_nginx_scroll_to_add_new=$('#content .ui_checked_columns [name="name"]');if($vm_nginx_scroll_to_add_new.length){vars.page_user_inactive=0;setTimeout(function(){$vm_nginx_scroll_to_add_new[0].scrollIntoView({behavior:"auto",block:"center"});$vm_nginx_scroll_to_add_new[0].focus()},300)}}if(core.curModuleFile("virtual-server","edit_phpmode.cgi")){var cnt_str=".container-fluid",modes_sel_str=""+cnt_str+' [name="mode"]',curr_mode=$(""+modes_sel_str+":checked").val(),$modes=$(modes_sel_str);if(curr_mode&&$modes&&$modes.length){var $php_ver_select_row=$(""+cnt_str+' [name^="ver_"]').parents("td.col_value").parent(),$php_ver_select_row_all_used_for_none=$modes.closest(".col_value").parent("tr").nextAll("tr");$php_ver_select_row_all_used_for_none=$php_ver_select_row_all_used_for_none.add($php_ver_select_row_all_used_for_none.closest("form").find("table.opener_table_style:last"));$modes.on("change",function(){var e=$(this).val();if(curr_mode==="none"||e==="none"){$php_ver_select_row_all_used_for_none.hide()}else{$php_ver_select_row_all_used_for_none.show()}if(curr_mode.replace("fcgid","cgi")!==e.replace("fcgid","cgi")){$php_ver_select_row.hide()}else{$php_ver_select_row.show()}var t=$(""+cnt_str+" .ui_text_color");if(t.length){var i=t.parent("td").parent("tr");if(e==="fpm"){i.hide()}else{i.show()}}})}$(".container-fluid sup.ui_help > i").removeClass("fa-question-circle fa-0_80x").addClass("fa2 fa2-php fa-1_50x")}var cnt_tbl_body="container-fluid .panel-body",ui_links_row="ui_links_row",not_data_table=":not(.dataTable)",only_child=":only-child",tbl_hardcoded="table-hardcoded:not(.ui_table_end_submit_right):not(.ui_buttons_table)",form_elem="form",table_cls_str="table:not([data-recursive_tree])",icn_row="icons-row",long_tbl_pref="long-table-";if(!core.curModuleFile("bind8","")&&!core.curModuleFile("bind8","index.cgi")&&!core.curModuleFile("postfix","sni.cgi")&&!core.curModuleFile("postfix","virtual.cgi")&&!core.curModuleFile("postfix","aliases.cgi")){tbl_hardcoded+=":not(.ui_grid_table):not(.ui_radio_table)"}var theTableToWrap=$("."+cnt_tbl_body+" > "+form_elem+" > ."+ui_links_row+" ~ ."+table_cls_str+""+not_data_table+","+"."+cnt_tbl_body+" > "+form_elem+" > ."+tbl_hardcoded+","+"."+cnt_tbl_body+" > ."+table_cls_str+""+only_child+","+"."+cnt_tbl_body+" > ."+icn_row+" ~ ."+tbl_hardcoded+","+"."+cnt_tbl_body+" > "+form_elem+" ~ ."+tbl_hardcoded+","+"."+cnt_tbl_body+" > ."+ui_links_row+" ~ ."+table_cls_str+""+not_data_table+"");if(theTableToWrap.length&&session.server.data("product")!=="usermin"){theTableToWrap.wrap('
          ')}if(typeof vars.requested_page==="string"&&vars.requested_page&&vars.requested_page.includes("webmin/fix_os")){v___title_initial=session.server.data("title-initial");theme_title_generate();$(".info-container").find('form[action*="webmin/fix_os.cgi"]').parents(".alert").remove()}if(typeof vars.requested_page==="string"&&vars.requested_page&&vars.requested_page.includes("init/reboot")){despinnerfy_buttons()}if(core.curModuleFile("virtual-server","manual_records.cgi")||core.curModuleFile("bind8","edit_text.cgi")){$(".container-fluid").find("form").find('[name="validate"], [name="soa"]').parent(".awcheckbox").addClass("solid")}$(".container-fluid .ui_checked_columns td:not(.ui_checked_checkbox) .awcheckbox").parent("td:not(:first-child)").addClass("awcheckbox_cont");$.each($(".container-fluid select:not([multiple])"),function(){if($(this).outerHeight()<30){$(this).addClass("heighter-28")}});$.each($(".container-fluid .tr_tag > td[data-td-e]:last-child"),function(){var e=$(this).find(".f__lnk_t_btn-el");if(e.length){$(this).wrapInner('
          ');e.removeAttr("style");$(this).attr("data-btns",1)}});if(core.curModule("virtualmin-support")&&!pjax_popstate){var submit_ticket_btn=document.querySelector("[data-submit-ticket]");$(submit_ticket_btn).removeClass().addClass("btn btn-lg btn-primary").prepend('')}if(v___location_query&&v___location_query.includes("refresh-navigation=1")){if(!v___initial_load){plugins.navigation.reload(undefined,function(){plugins.navigation.detect(v___location_path,1)})}else{plugins.navigation.detect(v___location_path,1)}}if(core.curModuleFile("webminlog","view.cgi")){var webminlog_module_no_command_escapes_sel_str="webminlog_module_no_command_escapes",webminlog_module_no_command_escapes__icon_cls_str="fa2-code",webminlog_module_no_command_escapes__icon_active_cls_str="text-danger",webminlog_module_no_command_escapes_icon_obj_func=function(){return $("."+webminlog_module_no_command_escapes_sel_str).find("."+webminlog_module_no_command_escapes__icon_cls_str)},wb_log_no_code_btn_item_name=v___server_hostname+"-"+webminlog_module_no_command_escapes_sel_str,wb_log_no_status_func=function(){return localStorage.getItem(wb_log_no_code_btn_item_name)=="0"},wb_log_no_status_remove_backslashes_func=function(){webminlog_module_no_command_escapes_icon_obj_func().addClass(webminlog_module_no_command_escapes__icon_active_cls_str);$.each($(".webminlog .opener_container td > pre"),function(){$(this).html().length&&$(this).html($(this).html().replace(/[\\]+/g,""))})};if(!pjax_popstate){$("#headln2r .btn-group").prepend(""+"'+'')}$("."+webminlog_module_no_command_escapes_sel_str).on("click",function(e){e.preventDefault();localStorage.setItem(wb_log_no_code_btn_item_name,wb_log_no_status_func()?"1":"0");if(wb_log_no_status_func()){localStorage.setItem(wb_log_no_code_btn_item_name,"0");wb_log_no_status_remove_backslashes_func()}else{localStorage.setItem(wb_log_no_code_btn_item_name,"1");page_refresh()}});if(wb_log_no_status_func()){wb_log_no_status_remove_backslashes_func()}}$("#content form > .table.opener_table_style").each(function(){var e="long-table-";$(this).wrap('
          ')});(function(){var e="virtual-server",t="edit_tmpl.cgi";if(core.curModuleFile(e,t)){var i=session.server.data("user"),a=uri_parse_param("id"),n=uri_parse_param("new"),r=[],l=[],o=(e+"_"+"templates_"+a+"_"+i).replace(/-/g,"_"),s=o+"_status",_=v___location_prefix+"/xhr.cgi?type=file&action=cache&module="+e+"&submodule=server-templates&server-template-id="+a+"&subaction=",c=function(t){return v___location_prefix+"/"+e+"/edit_tmpl.cgi?id="+a+(t?"&editmode="+t+"&nnext=1":"")},d=c()+"&editmode=",f=function(e){return e==uri_parse_param("id")},p=function(e,t,i){if(f(i)){plugins.filter.options({data:e,url:t,unlock:1,tooltip:{title:"tooltip_virtualmin_templates_filter"}})}};if(!n){if(vars.cache[o]){p(vars.cache[o],d,a)}else{$.ajax({type:"POST",url:_+"get",data:false,dataType:"JSON",success:function(e){if(e&&e.cached){vars.cache[o]=e.cached;p(e.cached,d,a)}else{if(vars.cache[s]){console.warn("Cache for this template is already being generated");return true}var t=function(e){vars.cache[s]=true;$.ajax({type:"POST",url:c(e),data:false,dataType:"text",success:function(i){if(i&&i.length){var n=$.parseHTML(i);if(n&&n.length){var c=$(n),f=c.find('select[name="editmode"]'),u=f.val();if(!u){console.warn("Cannot detect fetched template category");return true}var h=c.find(".table-responsive"),g=$.trim(h.find(".table-title").text()),m=h.find(".col_label");if(!m.length){m=h.find("tr.tr_tag > td[data-td-e]:first-child")}m.map(function(){var e=$.trim(this.innerText);if(g&&e){l.push({data:{category:g},section:u,value:e})}});if(!e){if($.isEmptyObject(r)){f.find("option").map(function(){r.push(this.value)});r.pop()}}var v=r.shift();if(v){t(v)}if(!v&&$.isEmptyObject(r)){vars.cache[s]=false;vars.cache[o]=l;p(l,d,a);$.ajax({type:"POST",url:_+"put&data="+JSON.stringify(l)+"",dataType:"JSON",error:function(){console.warn("Cannot store template cache")}})}}}}})};t()}}})}}}})();(function(){if(core.curModuleFile("virtual-server","backup.tgz")){var e=".container-fluid .panel-body",t='a[href*="download_backup.cgi"]';theme_buttonify([null],e,t,"btn btn-transparent btn-link-bordered btn-xxs margined-top-10 margined-bottom--10","");$(e).find(t).on("click",function(e){var t="cursor-na";if($(this).hasClass(t)){e.preventDefault();e.stopPropagation();return false}$(this).addClass(t).closest("b").addClass(""+t+" filter-grayscale filter-invert")})}})();(function(){if(core.curModuleFile("virtual-server","wizard.cgi")){var e=$('[data-radio-table="mysize"] span[data-wizard_myrec]');if(e.length){filter_out_objects_inner_chars(e,"(");filter_out_objects_inner_chars(e,")");e.addClass("label label-info label-sm")}var t=$('[name="mypass"]'),i=$('[name="mypass_def"]'),a=$('[name="parse"]');t.on("input",function(){a.toggleClass("disabled",!$(this).val())});i.on("change",function(){if($(this).val()=="0"){t.trigger("input")}else{a.removeClass("disabled")}});var n=$('[name="defdom"]'),r=n.closest("tr").nextAll("tr");n.on("change",function(){r.toggleClass("hidden",$(this).val()=="0")});var l='.container-fluid form[action="wizard.cgi"]',o=$(l),s=$(""+l+' button[name="parse"]');o.on("keydown",".table-responsive .table-subtable",function(e){if(e.keyCode===13){e.preventDefault();e.stopPropagation();s.trigger("click")}})}})();(function(){if(core.curModuleFile("mysql","edit_dbase.cgi")){$('[name="addview"]').addClass("heighter-34 heighter-34-force")}if(core.curModuleFile("virtual-server","save_cloud.cgi")){$(".btn-tiny.ui_link_replaced").addClass("heighter-34 margined-top-8").prepend('')}})();(function(){var e='body[class*="tikimanager"] .col_value > form',t=".btn.ui_submit",i='[name="dom"] + '+t+"";if(core.curModuleFile("virtualmin-tikimanager","index.cgi")||core.curModuleFile("virtualmin-tikimanager","")){$(e+" "+t).addClass("heighter-28");$(".col_value > "+t).addClass("heighter-28");var a=$(e+" "+i);a.removeClass("heighter-28 btn-success btn-default").addClass("btn-grey btn-xxs margined-top--2").find("span").css("font-size","100%")}})();(function(){if(core.curModuleFile("apache","")||core.curModuleFile("apache","index.cgi")){$('.container-fluid .ui_form .table td a.btn[href^="http"]:has(.fa-external-link)').attr("target","_blank").addClass("cursor-alias").parent().removeClass("cursor-pointer")}})();(function(){var e="#content > .container-fluid > .panel > div.panel-body",t="font-weight-normal",i=$(""+e+" > *").length,a=$(""+e+" > p").length,n=$(""+e+" > b").length,r=$(""+e+" > b ~ b").length>0,l=$(""+e+" > b + p:empty:last-child"),o=$(""+e+" > p + p:empty:last-child"),s=l.prev("b"),_=o.prev("p");if(i===a||i===2&&a===1&&n===1){if(_.length||s.length){var c=s.length?s:_.length?_:[];if(c.length){c.css("margin-bottom",0).addClass(t).find("b").addClass(t)}}}var d=$(""+e+" > b:first-child"),f=$(""+e+" > .ui_subheading + b:nth-child(2)");var p=d.length?d:f.length?f:[];if(p.length&&!r){p.addClass(t);var u=p.next("p");if(u.find(".ui_link").length){u.addClass("margined-top-6")}}var h=$(""+e+" > .ui_form > br + textarea");if(h.length){h.before('

          ')}})();(function(){if($.support.spa&&core.curModule("server-manager")){var e=$('.container-fluid .panel-body [action="bwgraph.cgi"]');e.attr("target","_blank");e.on("submit",function(e){e.stopPropagation()})}})();(function(){if(typeof v___location_file==="string"){if(v___location_file.includes("tconfig.cgi")){var e=$('.container-fluid select[name="settings_sysinfo_hidden_panels_user"]');e.after('
           '+theme_language("settings_sysinfo_hidden_panels_user_desc_"+(platform.detect()==="mac"?"mac":"pc")+"")+"
          ");e.closest("td").prev("td").addClass("vertical-align-top").find("b").addClass("margined-top-3");var t=$('.container-fluid select[name="settings_hotkey_toggle_hold_modifier"] option, .container-fluid select[name="settings_hotkey_toggle_modifier"] option, .container-fluid .table-cell-padded code');t.each(function(){var e=$(this).text();if(e&&platform.detect()==="mac"){e=e.replaceAll("Ctrl","Control");e=e.replaceAll("Alt","Option");e=e.replaceAll("Meta","Command");$(this).text(e)}})}}})();(function(){$.each($("[data-ui-buttons-row-form-container]"),function(){var e=$(this).prev("tr");if(e.find("td > hr").length){e.addClass("ui-pre-buttons-hr-row")}})})();(function(){$.each($('[onclick="form.target = \\"_blank\\""]'),function(){$(this).removeAttr("onclick");$(this).on("click",function(e){e.preventDefault();e.stopPropagation();var t=$(this).closest("form");t[0]&&theme_open_new_tab(t[0].action+"?"+$(this).attr("name")+"="+Convert.uriEncodeComponent(t.find('[name="'+$(this).attr("name")+'"][value]').val()||1)+"&"+t.serialize())})})})();(function(){var e="container-fluid",t="heighter-28 heighter-28-force",i="heighter-34",a='.sub_table_container select[name="attach"]',n='form[action="reply_mail.cgi"]';if(core.curModuleFile("mailboxes","view_mail.cgi")||core.curModuleFile("mailboxes","mail_search.cgi")||core.curModuleFile("mailboxes","list_mail.cgi")||core.curModuleFile("mailbox","view_mail.cgi")||core.curModuleFile("mailbox","mail_search.cgi")){$("."+e+" ."+i+"").addClass(t).removeClass(i);$("."+e+" "+n+" > .btn, "+n+" > select").addClass(t).removeClass(i);$("."+e+" "+n+" "+a+"").next("b").replaceTagName("span");var r=$("."+e+" "+n+" "+a+"").next("span");r.text(r.text().replace(/:/,""));r.next(".el-wp-chooser").find("input").addClass("w-33p").css("width",String()).removeAttr("size")}})();(function(){if($.support.spa){if(core.curModule("xterm",1)&&typeof xterm_argv==="object"&&!$.isEmptyObject(xterm_argv)){vars.pjax.cache.set("disable");plugins.terminal.new(xterm_argv);var e="#headln2r .btn-group",t="path-to-shell",i=$("aside .user-link.ported-console").attr("data-title"),a=theme_inject_tooltip(i,"#headln2r",false,false,false,"(");$(e).append("');$(e).find("."+t+"").on("click",function(e){e.preventDefault();plugins.terminal.open()})}else{plugins.terminal.clean(null)}}})();(function(){try{if(core.curModuleFile("virtual-server","domain_form.cgi")||core.curModuleFile("virtual-server","clone_form.cgi")||core.curModuleFile("virtual-server","import_form.cgi")||core.curModuleFile("virtual-server","rename_form.cgi")){domain_change=function(){};var e="autocomplete-suggestions-container",t=$('aside select[name="dom"] option'),i=$('.container-fluid .ui_form[action="domain_setup.cgi"] input[name="dom"], '+'.container-fluid .ui_form[action="clone.cgi"] input[name="newdomain"], '+'.container-fluid .ui_form[action="import.cgi"] input[name="dom"], '+'.container-fluid .ui_form[action="rename.cgi"] input[name="new"]'),a=[],n=function(t,i){t.parent().find("."+e+"").remove();t.autocomplete({lookup:i,width:t.outerWidth(),appendTo:t.parent()[0],containerClass:"autocomplete-suggestions highlighted wwidth "+e+"",showNoSuggestionNotice:false,minChars:0,triggerSelectOnValidInput:false,tabDisabled:true});theme.api.event.one.page.beforeReplace(function(){t.autocomplete("dispose")})},r=function(e){var t=[],i=[];e.forEach(function(e){if(!i.includes(e.value)){t.push(e);i.push(e.value)}});return t};$.each(t,function(e,t){var i=$.trim($(t).text()),n=String();if(i){var r=i.match(/^[A-Za-zÀ-ž\u0370-\u9FCC\.\-_\d\-]+$/);if(r&&r[0]){i=r[0]}var l=i.match(/\.([A-Za-zÀ-ž\u0370-\u9FCC\.\-_\d\-]+\.[A-Za-zÀ-ž\u0370-\u9FCC\.\-_\d\-]+$)/);if(l&&l[0]&&l[1]){n=l[1]}if(n&&n!=i){a.push({value:n,data:{category:0}})}try{i=i.replace(/↴\s+/,String()).replace(/↱\s+/,String())}catch(e){}a.push({value:i,data:{category:0}})}});if(a.length){n(i,a);i.on("input",function(e){var t=[],l=i.val(),o=String.fromCharCode(e.keyCode?e.keyCode:e.which).toLowerCase();if(l&&l.toString().split(".").length>=2){i.autocomplete("dispose");return}$.each($(a),function(e,i){var a={...i};if(l.toString().endsWith(".")){l=l.slice(0,-1)}if(l){a.value=l+"."+a.value;t.push(a)}}).promise().done(function(){var e=a.slice(),l=t.slice(),o=$.merge(e,l);o=r(o);i.autocomplete("dispose");n(i,o);i.trigger("blur").trigger("focus")})})}}}catch(e){console.warn("Error: Cannot retrieve list of domains")}})();if(core.curModuleFile("virtual-server","edit_redirect.cgi")){vars.pjax.cache.set("disable")}(function(){var e="ui_form_elements_wrapper",t="ui_link_pagination";$.each($("."+e+" ."+t+"_left, ."+e+" ."+t+"_right"),function(){var i="⏴";if($(this).hasClass(t+"_right")){i="⏵"}$(this).attr("data-title",theme_modifiers_replace_for_mac("Alt + "+i+""));$(this).tooltip({sanitize:false,container:$("."+e).parents("form"),html:true,delay:{show:vars.plugins.tooltip.delay.show,hide:vars.plugins.tooltip.delay.hide}})})})();(function(){if(core.curModuleFile("mailboxes","view_mail.cgi")||core.curModuleFile("mailbox","view_mail.cgi")){var e="#mail-iframe",t="load.mailiframe",i=$("#mail-iframe-spinner"),a=i.length,n=$('tr[data-contents="email"]');if(a){var r=n.parent("tbody").parent("table").parent("td").parent("tr");r.hide();$(e).one(t,function(){r.show()})}i.parents("tbody").prev("thead").find(".table-title > b").after(i.detach())}if(core.curModuleFile("mailboxes","view_mail.cgi")||core.curModuleFile("mailbox","view_mail.cgi")||core.curModuleFile("mailboxes","reply_mail.cgi")||core.curModuleFile("mailbox","reply_mail.cgi")){$("iframe").one("load",function(e){theme_page_iframes(this)})}})();(function(){if(core.curModuleFile("fsdump","")){$('form[action="edit_dump.cgi"] [type="submit"].btn-default').addClass("heighter-28 margined-right-1")}if(core.curModuleFile("quota","")){$('form[action="user_filesys.cgi"] button.btn-default:not(.chooser_button), form[action="group_filesys.cgi"] button.btn-default:not(.chooser_button)').addClass("margined-right-0")}$("html[data-script-name*='virtual-server/edit_tmpl.cgi'] #content [data-table-name='template-script'] table td br").remove()})();(function(){if(settings_right_table_wrap_inside_scrolled_container){$(".dt-table-hscroll").addClass("mode-wrap")}!pjax_popstate&&plugins.page.format.columns(true)})();(function(){const e=function(e,t,i){const a=$(e).find("a");a.addClass("btn "+i+" btn-xxs bhw-sm vertical-align-baseline");a.prepend('  ');$(e).prev(".ui_text_wrap").addClass("label label-default label-sm pd-rt-3 margined-left-1 margined-right-3 vertical-align-text-top");$(e).replaceWith(a)};if(core.curModuleFile("net","edit_bifc.cgi")||core.curModuleFile("net","edit_aifc.cgi")){const t=$(".container-fluid > .panel > .panel-body .ui_element_inline");if(t.length){t.each(function(){e(this,"fa2-plus-network","btn-grey")})}}})()};snippets.page.events=function(e,t){if(e==="reset"){e="keyup";t={holdModifer:~~!false}}if(core.curModuleFile("virtual-server","summary_domain.cgi")){var i=$("a[data-dom-file][href]");i.attr("data-no-randomized",1);t.holdModifer&&i.attr("href",function(){if(e==="keydown"){return $(this).data("edit-link")}else{return $(this).data("view-link")}})}};snippets.parser.fileviewer={getOpts:function(e){var t=e.hasClass("viewer-1"),i=e.hasClass("viewer-2"),a=e.hasClass("viewer-3"),n=e.hasClass("viewer-4"),r=e.hasClass("viewer-5"),l=e.hasClass("viewer"),o=e.hasClass("viewer-reverse"),s=e.hasClass("viewer-head"),_=e.hasClass("viewer-tail");return[t,i,a,n,r,l,o,s,_]},getSuffix:function(e,t){var i="/M=1",a="/M=2",n="/M=3",r="/M=4",l="/M=5",o="/V=1",s="/R=1",_="/H=1",c="/T=1";if(t){return[i,a,n,r,l,o,s,_,c]}var d=this.getOpts(e);return(d[0]?i:"")+(d[1]?a:"")+(d[2]?n:"")+(d[3]?r:"")+(d[4]?l:"")+(d[5]?o:"")+(d[6]?s:"")+(d[7]?_:"")+(d[8]?c:"")}};const events={};events.window=function(){window.document.addEventListener("visibilitychange",function(){if(document.visibilityState!=="hidden"){theme_post_event_window_state_activated("visibilitychange")}else{theme_post_event_window_state_deactivated("visibilitychange")}});window.addEventListener("focus",function(){theme_post_event_window_state_activated("focus")});window.addEventListener("blur",function(){theme_post_event_window_state_deactivated("blur")});window.addEventListener("popstate",function(){$('[data-trigger-injected="1"]').remove()});var e=document.querySelector("#content");if(e){e.addEventListener("scroll",function(e){if(!vars.pjax.post_page_fetch){vars.events.scrolled=e.target.scrollTop;plugins.pjax.page.interaction.set(Date.now())}})}$(document.body).on("keydown",function(e){if(e.keyCode===17){vars.events.keypressed.meta=true}if(e.keyCode===91){vars.events.keypressed.ctrl=true}if(e.keyCode===16){vars.events.keypressed.shift=true}if(e.keyCode===18){vars.events.keypressed.alt=true}theme_post_event_handler("keydown",{_isKeyCombo:e.originalEvent!==undefined&&e.key&&e.key!=="Alt"&&e.key!=="Shift"&&e.key!=="Control"&&e.key!=="Meta"&&(e.altKey||e.shiftKey||e.ctrlKey||e.metaKey),_keyCode:e.keyCode,_isHuman:e.originalEvent!==undefined,meta:e.keyCode===17,metaPressed:vars.events.keypressed.meta,ctrl:e.keyCode===91,ctrlPressed:vars.events.keypressed.ctrl,shift:e.keyCode===16,shiftPressed:vars.events.keypressed.shift,alt:e.keyCode===18,altPressed:vars.events.keypressed.alt,holdModifer:event_hold_modifer_pressed()})}).on("keyup",function(e){if(e.keyCode===17){vars.events.keypressed.meta=false}if(e.keyCode===91){vars.events.keypressed.ctrl=false}if(e.keyCode===16){vars.events.keypressed.shift=false}if(e.keyCode===18){vars.events.keypressed.alt=false}theme_post_event_handler("keyup",{_isKeyCombo:e.originalEvent!==undefined&&e.key&&e.key!=="Alt"&&e.key!=="Shift"&&e.key!=="Control"&&e.key!=="Meta"&&(e.altKey||e.shiftKey||e.ctrlKey||e.metaKey),_keyCode:e.keyCode,_isHuman:e.originalEvent!==undefined,meta:e.keyCode===17,metaPressed:vars.events.keypressed.meta,ctrl:e.keyCode===91,ctrlPressed:vars.events.keypressed.ctrl,shift:e.keyCode===16,shiftPressed:vars.events.keypressed.shift,alt:e.keyCode===18,altPressed:vars.events.keypressed.alt,holdModifer:~~!false})});$(window).on("keydown",function(e){var t=plugins.shell.status();if(!t&&session.alive){theme_shortcuts(e)}}).on("resize",function(){page_resized();plugins.shell.adjust();page_control_header();plugins.page.format.columns(true);plugins.page.events.mousemove()});var t=$(document.body).find(".-shell-port-"),n=t.find(".-shell-port-container");n.on("click",".-shell-port-close",function(){if(plugins.shell.available()){if(session.server.data("terminal")==1){plugins.terminal.close()}else if(session.server.data("shell")==1){plugins.shell.close()}}})};events.body=function(){const e=this;$(document.body).on("mousedown tap keydown",function(){setTimeout(function(){if(!vars.events.keypressed.shift){vars.page_interaction=1}});plugins.pjax.page.interaction.set(Date.now())}).on("click",function(e){if(vars.events.keypressed.alt&&vars.events.keypressed.ctrl&&!vars.events.keypressed.meta){let t=$(e.target).parents(".select2-container").prev("select"),n="copiedToClipboardSuccess";if(!t.length){t=$(e.target)}if(t.length){plugins.messenger.toast.destroy(n);let a=t.parents("button, a"),i=t.prev("button"),s=t.attr("href"),r=s?s:t.parents("a").attr("href"),o=t.attr("name")||r,l=t.parents("button").val()||t.parents("button").attr("value"),c=t.val()||t.attr("value")||l;if(typeof o!="undefined"){let s=o+(typeof c!="undefined"?"="+c:String());if(vars.events.keypressed.shift){s=typeof c!="undefined"?c:String()}if(!t.is("input.dynamic")){e.preventDefault()}e.stopPropagation();e.stopImmediatePropagation();console.warn("Copied to clipboard:");console.log(s);theme_copy_to_clipboard(s);setTimeout(function(){despinnerfy_button(a.length?a:i.length?i:t);plugins.messenger.post({type:"success",icon:"fa fa-exclamation-circle fa-lg fa-fw",id:n,title:theme_language("global_success"),message:theme_language("filemanager_copying_successful").replace(".",String()),layout:1,displayMode:1,position:"bottomCenter",cancel:true,close:true,timeout:3e3,progressBar:true})},22)}}}var t=".showpass-popover";if($(t).length){if(!$(t).is(e.target)&&$(t).has(e.target).length===0&&$(".popover").has(e.target).length===0){$(t).popover("hide")}}var n=function(t){if(vars.navigation.servers_index_control){if(e.originalEvent!==undefined||t){var n="servers-index",a=":visible",i=$("[data-"+n+"]");if(i.is(a)){var s=$(".popover-"+n+"");if(s.is(a)){if(!$(e.target).is(i)){if(!s.find(e.target).length){i.trigger("click")}}}}}}};var a="mobile-menu-toggler";if($("."+a+"").is(":visible")){if(!$(e.target).is('[data-servers-index="popover"], .mCustomScrollBox, .wbm-sm, .fa-stack, input[name="product-switcher"], label[for*="open_"], span, .sidebar-search, .select2-search, .select2-search__field, .select2-selection__rendered, .select2-selection')){n(true);plugins.navigation.collapse()}}$(".tooltip").tooltip("hide");n();var i="right-side-tabs",s=document.querySelector("."+i+""),r=s&&s.style.right==="0px"?true:false;if(r){if(!$(".right-side-tabs-toggler").hasClass("hidden")&&$(".right-side-tabs-toggler").hasClass("opened")&&!$(e.target).parents("#right-side-tabs").is("#right-side-tabs")&&!$(e.target).is(".fa-bell")&&!$(e.target).is(".fa-trash-o")&&!$(e.target).is(".badge.badge-danger")){$(".right-side-tabs-toggler:not(.hidden) .btn-menu-toggler").trigger("click")}}var o=window.navigator.platform==="MacIntel"?1:0;if((!o&&e.ctrlKey||o&&e.metaKey)&&!e.altKey){if($(e.target).closest("a").data("no-randomized")){return}var l=link_type_convert($(e.target).attr("href"),1),c=$(e.target).find("a").attr("href")||$(e.target).parents("a").attr("href"),d=link_type_convert(c,1),f=$(e.target).find("a").length?$(e.target).find("a"):$(e.target).parents("a"),p=Math.floor(Math.random()*1e5);if(l&&!Test.strContains(l,"javascript")||d&&!Test.strContains(d,"javascript")){if(l){$(e.target).attr("href",link_type_convert(l+(Test.strContains(l,"?")?"&":"?")+"randomized="+p+"",2));setTimeout(function(){$(e.target).attr("href",link_type_convert(l,2))})}else if(d){f.attr("href",link_type_convert(d+(Test.strContains(d,"?")?"&":"?")+"randomized="+p+"",2));setTimeout(function(){f.attr("href",link_type_convert(d,2))})}}}}).on("keydown",function(e){var t=e.keyCode?e.keyCode:e.which,n=String.fromCharCode(t).toLowerCase(),a=this;if(typeof a.timedOut==="number"){clearTimeout(a.timedOut)}if(n&&t!==8){if(a.preValue){a.preValue+=n}else{a.preValue=n}}var i=function(){var n=a.preValue;a.preValue=null;if(Test.editing()||$("input").is(":focus")||$("select").is(":focus")||$("textarea").is(":focus")||$(".modal.in").length||vars.events.blocked||$(".-shell-port-").hasClass("opened")||!session.alive){return}if(v___location_path==v___location_prefix+"/server-manager/gvnc.cgi"||v___location_path==v___location_prefix+"/server-manager/login.cgi"||v___location_path==v___location_prefix+"/telnet/"||v___location_path==v___location_prefix+"/telnet/index.cgi"||v___location_path==v___location_prefix+"/stunnel/"||v___location_path==v___location_prefix+"/stunnel/index.cgi"){return}if((core.curModuleFile("virtual-server","edit_tmpl.cgi")||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")&&n&&RegExp(/^[A-Za-zÀ-ž\u0370-\u9FCC\.\-_\d\-]/).test(n)&&t!==112&&t!==113&&t!==114&&t!==115&&t!==116&&t!==117&&t!==118&&t!==119&&t!==120&&t!==121&&t!==122&&t!==123&&!e.ctrlKey&&!e.altKey&&!e.shiftKey&&!e.metaKey){var i=".container-fluid .config-search",s=""+i+" > .dropdown-toggle",r=i+' input[name="search"]';if($(i).length){$(s).trigger("click.bs.dropdown");$(r).val(n).trigger("input");return}}if(n&&RegExp(/^[A-Za-zÀ-ž\u0370-\u9FCC\.\-_\d\-]/).test(n)&&!e.ctrlKey&&!e.altKey&&!e.metaKey&&t!==106&&t!==107&&t!==109&&t!==112&&t!==113&&t!==114&&t!==115&&t!==116&&t!==117&&t!==118&&t!==119&&t!==120&&t!==121&&t!==122&&t!==123){if(!$(".dataTables_filter label input").length&&!$(".btn-accordion-filter").length){setTimeout(function(){var t=$('aside input[name="search"]');if(e.shiftKey&&n=="1"){t.focus().val("!")}else{if(!Test.editing()){t.focus().val(n).trigger("change")}}},1)}else{$(".btn-filter-top-right, .btn-accordion-filter").trigger("click");$(".btn-filter-top-right .dataTable-mirror, .btn-accordion-filter .dataTable-mirror").focus().val(n).trigger("keyup")}}};this.timedOut=setTimeout(i,vars.event.stopped_typing_delay)}).on("click","#quota-virtual-server-collapse a.ui_link, #quota-virtual-server-1-collapse a.ui_link, #bw-virtual-server-collapse a.ui_link, #bw-virtual-server-1-collapse a.ui_link, .container-fluid > #system-status > .panel-body > .alert a, .right-side-tabs .info-container .alert a",function(){var e=URI.parseQuery(URI($(this).attr("href")).query())["dom"],t="virtualmin",n=$('.switch-toggle input:not([id="open_'+t+'"]):checked').length;if(n){plugins.navigation.switch.set(t)}else{}setTimeout(function(){$("aside select").val()!=e&&plugins.navigation.get.virtualmin(e)},300)}).on("click",".file-input-wrapper",function(e){e.stopPropagation();var t=$(this).prev('input[type="radio"]').add($(this).parent("td").prev("td").find('input[type="radio"]'));t.length===1&&t.prop("checked",true)}).on("click",".--to-new-tab",function(){$(this).attr("target","_blank")}).on("click",'[data-target="external"]',function(e){e.preventDefault();e.stopPropagation();e.stopImmediatePropagation();$(this).attr("data-href")&&theme_open_new_tab($(this).attr("data-href"),1)}).on("auxclick",function(e){if(e.button===1){const t=$(e.target).is("a")?$(e.target):$(e.target).find("a").first().length?$(e.target).find("a").first():$(e.target).closest("a").first().length?$(e.target).closest("a").first():null;if(t&&t.attr("href")&&(!t.attr("href").startsWith("#")&&!t.attr("href").startsWith("javascript"))){e.preventDefault();e.stopPropagation();e.stopImmediatePropagation();theme_open_new_tab(link_type_convert(t.attr("href"),2),1)}}}).on("click",".mobile-menu-toggler",function(e){var t=$(this),n="opened",a="__logo",i="aside";if(!$(this).data(n)){$(this).data(n,1);plugins.navigation.update("webmail")}if($(i).hasClass("hidden-xs")){vars.navigation.opened=dayjs().unix();$(this).addClass("selected").find("button").addClass("btn-primary").removeClass("btn-default");if($("."+a+"")){$("."+a+"").css("transform","translate(0px, 0px)");setTimeout(function(){$("."+a+"").transition({y:"-140px"},vars.navigation.animation_speed*1.7)},1100)}t.css("transform","translate(0px, 0px)");$(i).css("transform","translate(0px, 0px)");$(i).removeClass("hidden-xs");$(""+i+", .mobile-menu-toggler").transition({x:settings_leftmenu_width},vars.navigation.animation_speed*1.7)}else{plugins.navigation.collapse()}}).on("click",'a[data-id^="csf_"], a[data-type^="csf_"]',function(e){get_bundle_csf()}).on("click",'a[href*="mysql"], a[href*="postgresql"]',function(e){get_bundle_sql()}).on("shown.bs.modal",".modal.in",function(){$(this).focus()}).on("click",".module-help",function(){popover_visibility_position($(this))}).on("click",".close-popover-trigger",function(e){$(e.target).parent().parent().not(this).popover("hide")}).on("change",'.ui_checked_columns:visible input[type="checkbox"], .ui_checked_columns:visible input[type="radio"]',function(e){var t=$(this).parents("tr.ui_checked_columns:visible");if(t.length&&t.find("input:first").is($(this))){if($(this).is(":checked")){t.addClass("hl-aw")}else{t.removeClass("hl-aw hl-aw-chk")}if(typeof v____timeout_cb_ck_row!=="undefined"&&typeof v____timeout_cb_ck_row==="number"){clearTimeout(v____timeout_cb_ck_row)}v____timeout_cb_ck_row=setTimeout(function(){typeof __r____changed==="function"&&__r____changed()},1)}}).on("click",".authentic_update:not(.disabled)",function(e){e.preventDefault();e.stopPropagation();var t=$(this),n=!tconfig_beta_updates?1:0,a=t.data("force")=="1"?1:0,i;var s=t.attr("data-stable");if(s&&s.length){n=s=="1"?1:0}var r=t.attr("data-version");i=r?r:false;theme.update(n,a,i)}).on("mousemove.tconf","#force_update_menu_cnt .dropdown-submenu.clickable.prelocked > a",function(e){var t="locked",n=$(this).parent(),a=n.parent().offset().left,i=n.width(),s=parseInt(e.pageX-a-i);if(s>-24){n.removeClass(t)}else{n.addClass(t)}}).on("click",".csf-submit",function(e){e.preventDefault();var t=$(this).data("id"),n="disabled";$("#"+t).submit();$(this).addClass(n).attr(n,n);spinnerfy_button_tiny($(this))}).on("change",".onchange_form_submit_triggger",function(e){e.preventDefault();if(get_onbeforeunload_status()){get_onbeforeunload_message(this,"$($eventData).parent('form').submit()","ev")}else{$(this).parent("form").submit()}}).on("click",".generate-password-key-g",function(){var e=$(this);(async function(){var t=await theme_password_generator(e);theme_copy_to_clipboard(t);plugins.messenger.post(''+theme_language("password_generator_new_success").replace("%password",' '+Convert.htmlEscape(t)+" "),10,"success","newGeneratedPassword")})()}).on("click",".messenger-message .messenger-message-inner tt",function(){if(check_selected_text()){return}theme_copy_to_clipboard($(this).text());plugins.messenger.post(''+theme_language("filemanager_copying_successful"),2,"success","newClipboardCopied")}).on("keydown",'form[action*="save_log.cgi"] input[name="filter"], form[action*="save_log.cgi"] input[name="lines"], form[action*="view_log.cgi"] input[name="filter"], form[action*="view_log.cgi"] input[name="lines"]',function(e){if(e.keyCode==13){e.preventDefault();var t=$("button.ui_submit.ui_form_end_submit");t.first().trigger("click");t.addClass("disabled")}}).on("click",'button, input[type="submit"], a',function(e){v___page_activeElement=this}).on("click","._c__op_d",function(e){if($(e.target).is(this)){var t=$(this).find(".opener_trigger").first()[0];t&&t.click()}}).on("click",'form[action*="save_user.cgi"] button[name="but_switch"], a[href*="virtual-server/switch_user.cgi"]',function(){v___theme_reload=1}).on("click",'[href*="javascript:history"]',function(e){if(v___theme_content_history){e.preventDefault();e.stopPropagation();v___theme_content_history=0;get_pjax_content(v___location_directory)}}).on("click",".ui_multi_select_row select[multiple] option",function(e){var t=$(this).parent("select"),n=t.parent("td"),a=n.parent("tr"),i=n.index(),s="onclick",r="["+s+'*="multi_select_move"]';if(!e.ctrlKey&&!e.metaKey&&!e.shiftKey&&!e.altKey&&(i===0||i===2)){a.find("td:eq(1)").find(""+r+"["+s+'*="'+(i?0:1)+'"]').trigger("click")}}).on("click",'.container-fluid a[href], .container-fluid button, .container-fluid input[type="button"], .right-side-tabs a[href], .right-side-tabs button, .right-side-tabs input[type="button"], .right-side-tabs .info-container .graph-container-fw, .right-side-tabs-dismiss i, .favorites-menu li a',function(){v___blocked_navigation=0;plugins.navigation.detectAllowed=true}).on("click","#content #system-status .panel-heading ._support_ticket_cnt",function(){var e=plugins.dashboard.system_info("markdown","allow-private-data"),t=function(e){var t="\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\x3c!---\n",n=session.server.data("hostname"),a=n?""+n+" system information":"System information";t+="BELOW TEXT CONTAINS YOUR SYSTEM INFORMATION AND SHOULD BE LEFT INTACT\n";t+="--\x3e\n";t+="\n
          \n\n---\n
          \n
          \n";t+=""+a+"\n\n";t+=e;t+="\n
          \n";t+="
          ";t+="\n\x3c!---\n";t+="SCROLL TO THE VERY TOP OF THE PAGE TO FILL YOUR TICKET\n";t+="--\x3e\n";return"https://forum.virtualmin.com/new-message?groupname=staff&"+"body="+Convert.uriEncodeComponent(t)+"%0A%0A%0A%0A"};var n=t(e);theme_copy_to_clipboard(n,true);!event_hold_modifer_pressed()&&theme_open_new_external_link(n)}).on("click","#content #system-status .panel-heading ._clipboard_sysinfo_cnt",function(){var e=plugins.dashboard.system_info(!event_hold_modifer_pressed()),t=session.server.data("hostname"),n=t?""+t+" system information":"System information",a="\n\n\x3c!---\n";a+="BELOW TEXT CONTAINS YOUR SYSTEM INFORMATION AND SHOULD BE EITHER LEFT INTACT OR EDITED WITH CARE\n";a+="--\x3e\n";a+="\n
          \n\n---\n
          \n
          \n";a+=""+n+"\n\n\n\n";a+=e;a+="
          \n";a+="
          ";a+="\n\x3c!---\n";a+="SCROLL TO THE VERY TOP OF THE PAGE TO FILL YOUR TICKET\n";a+="--\x3e\n";if(!vars.events.keypressed.shift){var i=function(e){return $('[data-id^="sysinfo_'+e+'"]').text()},s=i("webmin"),r=i("usermin"),o=i("virtualmin"),l=i("cloudmin"),c=i("authentic_theme"),d=i("os"),f=i("package_");a="| SYSTEM INFORMATION||\n";a+="|----------------------|---------------------------|\n";if(d){a+="| OS type and version | "+d+" |\n"}if(s){a+="| Webmin version | "+s+" |\n"}if(r){a+="| Usermin version | "+r+" |\n"}if(o){a+="| Virtualmin version | "+o+" |\n"}if(l){a+="| Cloudmin version | "+l+" |\n"}if(c){a+="| Theme version | "+c+" |\n"}if(f){a+="| Package updates | "+f+" |\n"}}theme_copy_to_clipboard(!event_hold_modifer_pressed()?a:e)}).on("click",'#extended_sysinfo-1 .panel-collapse[aria-labelledby="status-virtual-server-1"] a:not(.ui_link)',function(e){e.preventDefault();var t=$(this),n=t.attr("href"),a=t.parents(".panel").first();a.addClass("updating");if(t.hasClass("disabled")){return}t.addClass("disabled opacity-0_4");var i=t.find(".fa-refresh");if(i){i.addClass("fa-spin")}progress.start();$.ajax({type:"GET",url:n,data:false,statusCode:{200:function(){$.ajax({type:"GET",url:v___location_prefix+"/sysinfo.cgi?no-cache=1&no-query=string",complete:function(){a.removeClass("updating")},success:function(e){var t="#status-virtual-server-1-collapse",n=$(e).find(t).find(".panel-body");$('[data-dcontainer="1"]').find(t).find(".panel-body").replaceWith(n);progress.end()}})}}})}).on("mouseenter mouseleave","#extended_sysinfo-1 .panel.panel-default.ui-sortable-handle .panel-collapse > .panel-body",function(e){var t="#extended_sysinfo-1 .panel",n="draggable",a="data-"+n+"",i="true";if(e.type==="mouseenter"){$(""+t+"["+n+'="'+i+'"]').removeAttr(n).attr(a,i)}else{$(""+t+"["+a+'="'+i+'"]').removeAttr(a).attr(n,i)}}).on("click","[data-href-background]",function(e){e.preventDefault();var t=$(this).attr("data-href-background");progress.start();$.post(t,function(){plugins.slider.data.fetch();if(v___location_path&&v___location_path.indexOf("/sysinfo.cgi")>-1){page_refresh()}})}).on("click","#jsPanel-replacement-container > .jsPanel-replacement > .jsPanel-hdr",function(e){e.preventDefault();$(this).find(".jsPanel-btn-normalize").trigger("click")}).on("shown.bs.tab",'.nav.nav-tabs > li > a[data-toggle="tab"]',function(e){if(v___module===v___module_file_manager){return}$($.fn.dataTable.tables(true)).css("width","100%");$($.fn.dataTable.tables(true)).DataTable().columns.adjust();var t=$(e.target).attr("href");if(t){snippets.page.render_table_labels($(".tab-pane"+t+""))}plugins.page.format.columns(true)}).on("shown.bs.collapse",".panel > .panel-collapse",function(){snippets.page.render_table_labels($(this))});plugins.page.events.mousemove()};(function e(){if(session.server.data("navigation")&&browser.detect.internet_explorer()>5&&browser.detect.internet_explorer()<=11){setTimeout(function(){var e="

          "+theme_language("browser_warning")+"

          ";theme_alert(theme_language("global_warning"),e,false,"md","danger",false,"10 modal-ie-warning",0)},2e3);if(!String.prototype.endsWith){String.prototype.endsWith=function(e,t){var i=this.toString();if(typeof t!=="number"||!isFinite(t)||Math.floor(t)!==t||t>i.length){t=i.length}t-=e.length;var n=i.lastIndexOf(e,t);return n!==-1&&n===t}}if(!String.prototype.startsWith){if(!String.prototype.startsWith){String.prototype.startsWith=function(e,t){t=t||0;return this.indexOf(e,t)===t}}}}})();function addmodule(e){adduser(e);return false}function addgroup(e){adduser(e);return false}function adduser(e){$v__mpp__g_olt=0;$('.mppopup input[data-role="tagsinput"]').tagsinput("add",e);setTimeout(function(){if(!v__mpp__ml_t__e){$(".mppopup_filter_input").val("");$(".mppopup_filter_input").focus().trigger("keyup")}v__mpp__ml_t__e=0},440);return false}function addinterface(e){adduser(e);return false}function parentdir(e){if(e&&e.length>1&&e.endsWith("/")){e=e.replace(/\/$/,"")}fileclick(e,"1");$v__mpp__g_gp=1}function fileclick(e,t){$v__mpp__g_ol=e;$v__mpp__g_olt=t}function select(e,t){$data_mppopup_value.val(e);return false}function filter_match(e,t,i){t="";i=i||false;var n=function(e){e=e||false;var n=$(".mppopup table tbody tr");if(n.length>0){for(var a=0;a0){for(var s=0;s]*>/gi,"");if(_!==""){_=_.toLowerCase();if(_.match(e.toLowerCase())){a[s].style.display=""}}}}}}else{n(true)}}function tab_action(e,t){if(document.forms[0]&&document.forms[0][e]){document.forms[0][e].value=t}}function hidden_opener(e,t){if($("#"+e).parent(".opener_container").length===0){$("#"+e).wrapAll('
          ')}if($("#"+e).hasClass("opener_shown")){$("#"+e).parent(".opener_container").prev(".opener_extra_container.opener_extra_container_style").find(".opener_extra_container_a_style").removeClass("opener_container_opened").addClass("opener_container_closed");$("#"+e).parent(".opener_container").prev("p").find(".opener_extra_container_a_style").removeClass("opener_container_opened").addClass("opener_container_closed");$("#"+e).parent(".opener_container").parent("tr").prev("tr").find("td a:nth-child(1)").removeClass("opener_container_opened").addClass("opener_container_closed");$("#"+e).parent(".opener_container").show().find("#"+e).slideUp(0,function(){$("#"+e).removeClass("opener_shown").addClass("opener_hidden").parent('.opener_container:not(".opener_sub_container")').hide();$("#"+e).parent(".opener_sub_container").removeClass("margined-top -cnt-opened");$("#"+e).parents(".opener_table_style_small:first").removeClass("-tcnt-opened")})}else{var i=$("#"+e);i.parent(".opener_container").prev(".opener_extra_container.opener_extra_container_style").find(".opener_extra_container_a_style").addClass("opener_container_opened").removeClass("opener_container_closed");i.parent(".opener_container").prev("p").find(".opener_extra_container_a_style").addClass("opener_container_opened").removeClass("opener_container_closed");i.parent(".opener_container").parent("tr").prev("tr").find("td a:nth-child(1)").addClass("opener_container_opened").removeClass("opener_container_closed");i.slideUp(0).removeClass("opener_hidden").addClass("opener_shown").parent(".opener_container").slideDown(0).find(".opener_shown").slideDown(0,function(){plugins.page.format.columns(true)});i.parent(".opener_sub_container").addClass("margined-top -cnt-closed");i.parents(".opener_table_style_small:first").addClass("-tcnt-opened");snippets.page.render_table_labels(i)}}function select_mode(e){var t=$("aside form").length;for(i=0;i"),r=t.length;if(!s){var o=new RegExp(""+t+"(.*?>)"),l=e.match(o);if(l&&l[0]&&l[1]){r+=l[1].length}}var _=s?t.length:r,c=n?0:_,d=n&&i?i.length:0,f=e.indexOf(t);if(f===-1){return a}var u=e.indexOf(i,f),g=u===-1?e.length:u;if(!i){g=-1}var p=$.trim(e.slice(f+c,g+d));return p}function get_user_home(){var e=session.server.data("user-home"),t=e.match(/\/.*?\/[0-9]*\/\.(.*)/);if(t&&t[1]){e=t[1]}if(!e){if(typeof fm_user_data!=="undefined"){if(fm_user_data&&fm_user_data.home){e=fm_user_data.home}}}return e}function get_form_data(e){var t=e.attr("enctype")&&e.attr("enctype").indexOf("form-data")>-1?0:1;return t?e.serialize():new FormData(e[0])}function page_extended(){return v___location_file==="settings-logos.cgi"||v___location_file==="settings-logos_save.cgi"||v___location_file==="settings-backgrounds.cgi"||v___location_file==="settings-backgrounds_save.cgi"||v___location_file==="settings-editor_read.cgi"||v___location_file==="settings-editor_write.cgi"||v___location_file==="settings-favorites_save.cgi"?1:0}function check_bundle(e){if(Test.strContains(e,"/mysql/")||Test.strContains(e,"/postgresql/")){get_bundle_sql()}if(Test.strContains(e,"/"+v___module_file_manager+"/")){get_bundle_file_manager()}if(Test.strContains(e,"/csf/")){get_bundle_csf()}}function get_bundle_csf(e){load.bundle(v___server_extensions_path+"/csf/csf",1,e?["csf_init()"]:false,0)}function get_bundle_file_manager(e){load.bundle(v___server_extensions_path+"/file-manager/file-manager",0,e?["___f__tw()"]:false,0)}function get_bundle_sql(){load.bundle(v___server_extensions_path+"/sql",0)}function theme_open_new_external_link(e){var t="theme_open_new_link_ext";$("body").append('');$("#"+t).simulateUserClick().remove()}function theme_open_new_inner_link(e){var t="theme_open_new_link";$("body").append('');$("#"+t).simulateUserClick().remove()}function theme_open_new_tab(e,t){var i="theme_open_new_tab";if(t!==1){e=Test.strContains(e,v___location_origin)?e:v___location_origin+(e.startsWith("/")?e:"/"+e)}$("body").append('');$("#"+i).simulateUserClick().remove()}function theme_to_new_tab(){$.each($('a[href*="virtualmin-awstats/view.cgi?config="], .virtualmin-awstats a[href*="view.cgi?config="] '),function(){$(this).addClass("--to-new-tab")})}function theme_restore_buttons_class(){var e="data-class-restore";$.each($(".container-fluid ["+e+"]"),function(){var t="btn-xclass",i=$(this).attr(e);if($(this)[0]&&$(this)[0].classList){var n=$(this)[0].classList.value.match(/.*(btn-\S+)/);if(n){t=n[1];$(this).removeAttr(e);$(this).removeClass(t).addClass(i)}}})}function theme_reload(e){if(e){window.location.href=link_type_convert(v___location_resource,2)}else{window.location.href=location.origin+v___location_prefix}}function theme_update_notice(e){$.ajax({type:"POST",url:v___location_prefix+"/index.cgi?xhr-get_update_notice=1",complete:function(){e&&e.classList.remove("disabled")},success:function(e){if(!session.status(e)){return}var t=$(e).appendTo($("body"));t.modal("show")},error:function(e){}})}function theme_inject_tooltip(e,t,i,n,a,s,r,o,l,_){var c=v___initial_load?3e3:0,d=e;if(_){c=_}e=theme_language(e)||e;if(!t){t="body"}if(!i){i="auto top"}if(!n){n="tooltip"}if(!o){o="hover"}if(!a){a=vars.plugins.tooltip.delay.show}if(c){setTimeout(function(){var e=$('[data-target-tooltip-callback="'+d+'"]');e.attr("data-title",theme_language(d));e.attr("data-delay",'{"show":'+vars.plugins.tooltip.delay.show+', "hide":'+vars.plugins.tooltip.delay.hide+"}");e.tooltip({container:t,placement:i,sanitize:false,trigger:o,html:r?true:false,delay:{show:a,hide:vars.plugins.tooltip.delay.hide}})},c)}var f=String();if(s){var u=new RegExp("(?=\\"+s+")");e=e.split(u);e=e.join("
          ")}if(s||r){f=' data-html="true" '}a='{"show":"'+a+'", "hide":"'+vars.plugins.tooltip.delay.hide+'"}';if(l){return{container:t,placement:i,delay:a,toggle:n,title:e,html:f?true:false}}return' data-container="'+t+'" data-placement="'+i+"\" data-delay='"+a+"' data-toggle=\""+n+'" data-title="'+e+'" '+f+""}function theme_title_generate(e,t){var i=plugins.navigation.state.loading(),n=session.server.data("loading")==1?1:0;if(vars.page.locked){return}if((i||n)&&!vars.h.selector.content.get().hasClass("progressing")){setTimeout(theme_title_generate,100);return}if(!$.support.spa){return}var a=$("#headln2c").data("current-module-name"),s=$("#headln2c span[data-main_title]").text()||$('.panel-heading font[size="+2"]').text(),r=String(),o=r,l=$("aside select option:checked").text(),_=session.server.data("product")!=="webmin"?theme_language("theme_xhred_titles_um"):theme_language("theme_xhred_titles_wm"),c=Convert.strUpFirst(session.server.data("product")),d=v___title_initial;if(typeof d==="string"){d=d.replace(c,_)}var f=d?" — "+d:r,u=d?d+" — ":r,g=session.server.data("hostname"),p=session.server.data("user"),m=theme_language("titles_dashboard"),h=v___location_path_lead_unslashed==v___location_prefix_unslashed_trail_slashed+"sysinfo.cgi",v=$(".container-fluid > .error_40x");if(a&&a!==s&&!$t_uri_virtualmin&&!$t_uri_cloudmin){s=a+"/"+s}if(v___module==="csf"){s=theme_language("csf")}if(h){s=m}if(v.length){s=v.find("strong").text()}if(t){s=t}var b=" - "+s;if(settings_document_title==1){u=String()}if(settings_document_title==2){f=String()}if(settings_document_title==3){u=String();f=String()}if(settings_document_title==5){u=g+" - "+d+" — ";f=String()}if(settings_document_title==6){u=p+"@"+g+" - "+d+" — ";f=String()}if(settings_document_title==7){u=String();f=" — "+_}if(settings_document_title==8){u=g+" — ";f=String()}if(settings_document_title==9){u=p+"@"+g+" — ";f=String()}if(settings_document_title==4){if(e){return o}else{document.title=d}}else{if($('li.sub_active a[href*="'+v___module_file_manager+'"]').length){var x=v___module_file_manager;var y=$('body[class*="'+x+'"] .active form input#path').val();if(y){o=u+Convert.uriDecodeComponent(y)+" - "+$("li.sub_active a").text()+f;if(e){return o}else{document.title=o}}else{o=u+$("li.sub_active a").text()+f;if(e){return o}else{document.title=o}}}else if(($t_uri_virtualmin||$t_uri_cloudmin)&&l&&l.length&&!v.length){if(h){o=u+m+f;if(e){return o}else{document.title=o}}else if(s&&s.length){o=u+l+b+f;if(e){return o}else{document.title=o}}else{o=u+plugins.navigation.state.title()+f;if(e){return o}else{document.title=o}}}else{if(s&&s.length){o=u+s+f;if(e){return o}else{document.title=o}}else{o=d;if(e){return o}else{document.title=o}}}}var w=$(".right-side-tabs .list-group-item:not(.no-notifications, .opacity-0_3)").length;if(settings_side_slider_enabled&&settings_side_slider_notifications_enabled){titlenotifier.set(w)}else{titlenotifier.set(0)}}function link_type_convert(e,t){if(typeof e==="undefined"){return}if(e){e=e.replace(/([?&])(_pjax|_)=[^&]*/g,"")}if(t===1){e=e.replace("?"+$__theme_navigation+"","").replace("&"+$__theme_navigation+"","").replace("&"+$__theme_navigation+"","")}if(t===2){if(!Test.strContains(e,$__theme_navigation)){e=Test.strContains(e,"?")?e+"&"+$__theme_navigation:e+"?"+$__theme_navigation}}return e}function get_page_title_subtitle(e){var t=$("[data-sub_title]").text(),i=$('[data-main_title=""]').text(),n=i+(t?": "+t:String());return e?i:n}function get_pjax_push(){return true}function get_pjax_type(e){var t=String();if(e&&e.href){t=e.href.match(/([^\/]*)\/*$/)[1]}if(Test.string(e)){var i=e.replace(v___location_origin+v___location_prefix,""),n=i.replace(v___module,"").replace(/^\/+/g,""),a=$('form[action*="'+i+'"]:visible'),a=a.length?a:$('form[action="'+n+'"]:visible'),s=i.match(/\w+.cgi/gi),a=a.length||!s?a:$('form[action*="'+s[0]+'"]:visible'),r=a.attr("method"),o=a.attr("enctype");if(o==="multipart/form-data"){return"post"}else if(r){return r}else if(!r){var r=$('form[action="'+i+'"]').attr("method"),r=r?r:$('form[action="'+URI(i).filename()+'"]').attr("method"),l=$('form[action="'+i+'"]').attr("enctype");if(r||l){if(l==="multipart/form-data"){return"post"}else{return r}}else{return"get"}}}else if(typeof e=="object"&&$(e).is("form")){var _=e,c=_.attr("method");if(c){return c}else{return"get"}}return v___module==="csf"&&!$('.csf-container textarea[name="formdata"]').length||(t==="shell"||e===v___location_prefix+"/shell/"||e&&Test.strContains(e,".cgi?")&&!Test.strContains(e,"config.cgi?"))?"GET":"POST"}function get_default_send_headers(){return{"x-no-links":1,"x-client-paginate":theme_get_client_paginate(),"x-client-paginate-no-script":1,"x-color-palette-file":"quote-dark"}}function set_ajax_send_headers(e,t){for(const[t,i]of Object.entries(get_default_send_headers())){e.setRequestHeader(t,i)}}function set_pjax_send_headers(e,t){let i=get_default_send_headers();if(v___theme_night_mode_enabled||v___theme_night_mode){const e={"x-color-palette":"dark"};i={...i,...e}}const n={"x-navigation-type":typeof t==="object"&&t.type==="pjax:popstate"?"back_forward":typeof t==="object"&&t.originalEvent&&t.originalEvent.isTrusted?"navigate":"reload"};i={...i,...n};plugins.pjax.headers.send.set(i)}function get_pjax_content(e,t,i){plugins.navigation.detectAllowed=true;var n=typeof i=="undefined"||i===true||i==1?true:false;if(v___initial_load){n=false;if(e){window.history.replaceState(null,document.title,link_type_convert(e,2))}}if(get_onbeforeunload_status()){get_onbeforeunload_message(false,{href:e});return}set_pjax_send_headers(e);if(e&&unbuffered_header_processor_allow(e)){unbuffered_header_processor(e,0);return}t=typeof t=="object"?t:function(){},$type=$.isArray(t)?$("",{href:e})[0]:false;e=link_type_convert(e,1);$.pjax({url:e,timeout:0,push:n,type:get_pjax_type($type?$type:e),container:"[data-dcontainer]",fragment:"[data-dcontainer]",callback:t})}function get_pjax_event_end(e,t,i){if(!session.alive){return}if(t!=null){if(t.status){var n=$('div[data-dcontainer="1"]'),a=t.status.toString().startsWith("40"),s=t.status.toString().startsWith("50");if(a||s){$.pjax.cache(false,false,[n,link_type_convert(v___location_prefix+"/xerror",2),get_page_title_subtitle(1)]);vars.allow_ui_features=0;setTimeout(function(){vars.allow_ui_features=1},200);if(a){var r=extract_content(t.responseText,'
          ',"
          ",0);if(r){n.html(r)}}else if(s){var o=$(t.responseText).filter("h1").text(),l=$(t.responseText).filter("p").text(),_;_='
          ';_+=' '+t.status+" - "+o+"
          "+l+"\n";_+="
          ";n.html(_)}theme_title_generate();return}}}if(t==null||typeof t.responseText=="undefined"){return}var c=t.getResponseHeader("Content-Disposition");if(c&&c.toLowerCase().indexOf("attachment")!==-1){return}var d=t.responseText.match(""),f;if(d&&d[0]){f=(new DOMParser).parseFromString(d[0],"text/html");f=f.querySelector("html").attributes}else{return}f&&$(f).each(function(e,t){if(this.nodeName!=="id"){if($.support.spa&&this.nodeName==="data-redirect"&&this.nodeValue&&this.nodeValue.length>0&&this.nodeValue!="/"&&this.nodeValue!="/?"+$__theme_navigation&&this.nodeValue!=location.origin+v___location_prefix+"/"&&this.nodeValue!=location.origin+v___location_prefix+"/?"+$__theme_navigation&&(!Test.strContains(this.nodeValue,"://")||Test.strContains(this.nodeValue,location.host))){vars.previous_request=String();vars.source_request=String();mail_page_check(this)}if(this.nodeName==="data-language"){var i=session.server.data("uri"),n=session.server.data("language"),a=this.nodeValue;if(a&&n&&n!==a){if(i&&i.match(/change-user|webmin\/edit_lang|\/language\//)){$.post(v___location_prefix+"/index.cgi/?xhr-theme_clear_cache=1");setTimeout(function(){plugins.navigation.reload()},300)}}}if(this.nodeName==="data-locale"){var s=session.server.data("uri"),r=session_server_data_locale(),o=this.nodeValue;if(o&&r&&r!==o){if(s&&s.match(/change-user|webmin\/edit_lang|\/language\//)){dayjs.locale(this.nodeValue)}}}if(this.nodeName!="data-level"&&this.nodeName!="data-access-level"){session.server.data(this.nodeName,this.nodeValue)}if(this.nodeName==="data-slider-fixed"){if(vars.slider.pinned!==-1){session.server.data(this.nodeName,vars.slider.pinned)}}if(this.nodeName==="data-navigation-collapsed"){if(vars.navigation.pinned!==-1){session.server.data(this.nodeName,vars.navigation.pinned)}}}}).promise().done(function(){plugins.pjax.headers.set(t);if(!core.curModule("mailboxes")&&uri_parse("directory",session.server.data("data-uri")).indexOf("/mailbox")>-1&&(!uri_parse("file",session.server.data("data-uri"))||uri_parse("file",session.server.data("data-uri")).indexOf("index.cgi")>-1)){mail_load(session.server.data("data-uri"));page_init();return false}plugins.page.events.register();get_pjax_event_end_funcs(1,false,i);$.each($(".container-fluid img"),function(){var e=$(this),t=e.attr("src");if(t&&!Test.strContains(t,"//")&&!t.startsWith("/")){e.attr("src",v___location_directory_trail_slashed+t)}});unbuffered_header_post(t);if(e){var n=$(e.relatedTarget),a=n.attr("href"),s=n.parent().is("[data-linked], .favorites-dcontainer, .menu-exclude.ui-sortable-handle");if(s&&(Test.strContains(a,"/mysql/")||Test.strContains(a,"/postgresql/"))||(Test.strContains(v___module,"mysql")||Test.strContains(v___module,"postgresql"))){typeof f__ex__mysql_runner==="function"&&f__ex__mysql_runner()}if(s&&Test.strContains(a,"/csf/")||Test.strContains(v___module,"csf")){if(typeof csf_init==="function"){csf_init()}else{get_bundle_csf("init")}}}})}function get_pjax_event_end_funcs(e,t,i){page_init();var n=function(){if(e&&v___module===v___module_file_manager&&v___location_file!=="config.cgi"&&v___location_file!=="mconfig.cgi"){page.handle.content.preloader.show()}if(v___module_file_manager){if(get_access_level()!=0){plugins.slider.state(0)}}if(!e){session.server.data("data-script-name",v___location_path);session.server.data("data-uri",v___location_resource);var t=new RegExp("^"+v___location_prefix,"i");v___module=session.server.data("data-uri").replace(t,"").split("/").filter(function(e){return e.length!==0})[0];session.server.data("data-module",v___module);setTimeout(function(){session.server.data("data-title-initial",$("#headln2c span[data-main_title]").text());snippets.page.render(1);despinnerfy_buttons();if($t_uri_virtualmin){plugins.navigation.intersect.virtualmin(location.href)}else if($t_uri_cloudmin){plugins.navigation.intersect.cloudmin(location.href)}},0)}};if(t){var a=function(){if(session.server.data("loading")){setTimeout(a,100)}else{n();plugins.navigation.detect()}};setTimeout(a,0);return}else{n()}if(!i&&e&&Test.strContains(v___location_directory,v___module_file_manager)){if(typeof ___f__tw==="function"){if(v___location_file==="config.cgi"||v___location_file==="mconfig.cgi"){___f__tw()}else{setTimeout(function(){___f__tw()},100)}}else{get_bundle_file_manager(1)}}if(!core.curModule("csf")){session.server.data("post",0,1)}e&&snippets.page.render(0);$(".tooltip").tooltip("hide");$(".popover").popover("hide");theme_title_generate();plugins.navigation.detect();e&&vars.h.selector.content.get().scrollTop(0);setTimeout(function(){var e=v___page_container.find("form:visible:first"),t=e.find('input:visible:not([readonly]):not([disabled]):not([type="radio"]):not([type="checkbox"]), textarea:visible:not([readonly]):not([disabled])');if(t.length&&!t.parents(".ui_buttons_table").length&&v___location_file!=="config.cgi"&&v___location_file!=="uconfig.cgi"&&v___location_file!=="tconfig.cgi"){if(vars.page_user_inactive&&(v___location_file==="domain_form.cgi"||Test.strContains(v___location_query,"new=")||e&&e.length&&(e.attr("action").startsWith("create")||e.attr("action").startsWith("add")||e.attr("action").startsWith("new")))){if(t&&t.val().length===0){try{isElemInView(t[0])&&t[0].focus()}catch(e){}}}}},400);if(e&&!core.curModule(v___module_file_manager)&&!core.curModule("csf")&&v___location_file!=="tconfig.cgi"){page.handle.content.preloader.hide()}}function get_pjax_action_submit(e,t){var i=typeof t=="undefined"||t===true||t==1?true:false;if(get_onbeforeunload_status()){return}vars.previous_request_progressive=e;if(e&&e.target&&e.target.action&&unbuffered_header_processor_allow(e.target.action)){unbuffered_header_processor(e,1);return}var n=$(e.currentTarget),a=Test.strContains(n.attr("enctype"),"multipart/form-data"),s=String(),r=String(),o=!a?n.serialize():String(),l=n.find('[type="submit"]'),_=$(quirks.active_element()),c=_.is('[type="submit"]')?_:l.length===1?l:false;if(c&&!a){s=c.attr("name");r=c.val()||$.trim(c.text());o=s&&o&&o.includes(s+"=")?true:false;if(s&&r&&!o){$('').attr({type:"hidden",class:"hidden-force",name:s,value:r}).appendTo(n)}}vars.previous_request=e;vars.source_request=v___location_resource;vars.previous_request_progressive=String();v___theme_connection_triggered_origin=1;set_pjax_send_headers(e.target.action,e);$.pjax.submit(e,"[data-dcontainer]",{timeout:0,push:i,type:get_pjax_type(e.target.action),fragment:"[data-dcontainer]"})}function get_pjax_action_click(e,t,i){var n=typeof i=="undefined"||i===true||i==1?true:false;if($(t).attr("href")==undefined){return}var a=$(t).attr("href");if(a&&(a.includes("!edit")||a.includes("!view"))){e.preventDefault();var s=snippets.parser.fileviewer.getSuffix(false,1),r=s[0],o=s[1],l=s[2],_=s[3],c=s[4],d=s[5],f=s[6],u=s[7],g=s[8],p=a.includes(d),m=a.includes(f);isHead=a.includes(u);isTail=a.includes(g);if(p){a=a.replace(r,"").replace(o,"").replace(l,"").replace(_,"").replace(c,"").replace(d,"").replace(f,"").replace(u,"").replace(g,"")}var h=a.replace("!edit ","").replace("!view ",""),v=h.split("\\").pop().split("/").pop(),b=h.replace("/"+v,"");progress.start();if(p){edit_file(v,b||"/",false,1,0,m,isHead,isTail)}else{edit_file(v,b||"/")}return}if($(e.target).is(".gl-icon-select")){e.preventDefault();$(t).trigger("contextmenu");return}set_pjax_send_headers(t.href,e);vars.previous_request_progressive=t.href;if(t&&t.href&&unbuffered_header_processor_allow(t.href)){e.preventDefault();unbuffered_header_processor(t.href,0);return}if(e&&!e.shiftKey&&!e.ctrlKey&&!e.metaKey){$(t).attr("href",link_type_convert($(t).attr("href"),1))}if(e&&(e.shiftKey||e.ctrlKey||e.altKey||e.metaKey)){setTimeout(function(){despinnerfy_buttons()},400)}v___theme_connection_triggered_origin=1;if(e.target.href&&$(e.target).hasClass("page_footer_submit")&&e.target.href.includes(".cgi/")&&!e.target.href.includes("/link.cgi/")){var x=URI(e.target.href),y=x.directory();if(y&&y.includes(".cgi")){var w=y.split("/");w=w.filter(function(e){return!e.includes(".cgi")});w=w.join("/");e.target.href=e.target.href.replace(y,w)}}$.pjax.click(e,{timeout:0,push:n,type:get_pjax_type(t),container:"[data-dcontainer]",fragment:"[data-dcontainer]"});vars.previous_request=e;vars.previous_request_progressive=String()}function get_onbeforeunload_message($eventData,$thisData,$justEval){var popovers=$(".popover.in"),are_there_popovers=popovers.length,delay=are_there_popovers?120:0,before_onload_class_prompt="bootbox-o__f_m-beforeclose-prompt";if(are_there_popovers){popovers.popover("hide")}setTimeout(function(){if($("."+before_onload_class_prompt+"").length){return}var save_prompt=bootbox.dialog({message:""+theme_language("global_unbeforeunload_message")+"",title:'   '+theme_language("global_unbeforeunload_title")+"",buttons:{main:{label:'   '+theme_language("global_cancel")+"  ",className:"btn-default vertical-align-top margined-left--2",callback:function(){despinnerfy_buttons();plugins.navigation.detect();plugins.navigation.select.back()}},danger:{label:'   '+theme_language("global_continue")+"  ",className:"btn-danger vertical-align-top margined-left--2",callback:function(){set_onbeforeunload_status(0,0);set_onbeforeunload_status(0,1);if(vars.ajax.progressing){progressive_request.abort()}try{if(typeof v___location_file==="string"){if(v___location_file.includes("tconfig.cgi")){theme.config.current.reset()}}}catch(e){}if($justEval==="ev"){eval($thisData);return}else{$.each($justEval,function(func,params){var caller=func.includes(".")?eval(func):window[func];caller.apply(null,params)})}var switchStr="::switch::";if($thisData&&$thisData.href&&Test.strContains($thisData.href,switchStr)){$('.switch-toggle input[id="'+$thisData.href.replace(""+switchStr+"","")+'"]').trigger("click");return}var $is_form=$($thisData).is("form");if(!$is_form){if($thisData.href&&$thisData.href.length){get_pjax_content($thisData.href,false)}}else if($is_form){get_pjax_action_submit($eventData)}}}},onEscape:function(){despinnerfy_buttons();plugins.navigation.detect()}});save_prompt.on("shown.bs.modal",function(){var e=$(this);setTimeout(function(){e.find('[data-bb-handler="danger"]').focus()},0)})},delay)}function get_onbeforeunload_status(){return $('.container-fluid > .panel > .panel-body[data-unload-warning="1"]').length||$('html[data-unload-warning="1"]').length}function set_onbeforeunload_status(e,t){var i=t?"html":".container-fluid > .panel > .panel-body",n="data-unload-warning";if(e){$(i).attr(n,"1")}else{$(i).removeAttr(n)}}function set_onbeforeunload_status_native(e){var t="html",i="data-unload-error";if(e){$(t).attr(i,"1")}else{$(t).removeAttr(i)}}function get_onbeforeunload_status_native(){return $('html[data-unload-error="1"]').length}function theme_panels_sort(e){var t,i;if(e==="slider"){t="#right-side-tabs .extended-list-data > .panel-group#extended_sysinfo";i=""+t+" > .panel"}else if(e==="dashboard"){t="#extended_sysinfo-1.panel-group";i=""+t+" > .panel.panel-default"}else{return}if(!$(t).length){return}if(typeof settings_sysinfo_panels_order==="string"){if(settings_sysinfo_panels_order==="[object Object]"){settings_sysinfo_panels_order={}}else{settings_sysinfo_panels_order=settings_sysinfo_panels_order.replace(/'/g,'"');settings_sysinfo_panels_order=JSON.parse(settings_sysinfo_panels_order)}}if(!$.isEmptyObject(settings_sysinfo_panels_order)){for(var n in settings_sysinfo_panels_order){$(t).find('.panel[data-referrer="'+n+'"]').attr("data-sorter",settings_sysinfo_panels_order[n])}}settings_sysinfo_panels_order=JSON.stringify(settings_sysinfo_panels_order);var a=$(i).sort(function(e,t){return $(e).attr("data-sorter")>$(t).attr("data-sorter")?1:-1}).appendTo(t)}function theme_cache_clear(e){theme.veiled(1);plugins.messenger.post(''+theme_language("clear_cache_initiated")+" "+theme_language("global_please_wait")+'   ',0,"info","themeUpgrade",0);typeof stats!=="undefined"&&stats.general.disable();$.post(v___location_prefix+"/index.cgi/?xhr-theme_clear_cache=1");set_onbeforeunload_status(0,0);localStorage.clear();$(".right-side-tabs-dismiss .fa-trash, .right-side-tabs-dismiss .fa-refresh").trigger("click");e&&spinnerfy_buttons($(e),[1.5,-33,"small",1e3]);setTimeout(function(){theme_reload()},1e3)}async function theme_password_generator(e){var t=e.find(".fa"),i=e.outerHeight()<=28?"fa-0_90x line-height-11 margined-left--1 margined-right-0":"fa-0_90x line-height-11 margined-right--2",n="fa fa-spin fa-reload fa-spin-fast";e.find(n.replace(/fa/g,".fa").replace(/\s+/g,"")).remove();var a=$('').appendTo(e),s="pointer-events-none";t.addClass(s);t.hide();const r=await $.ajax({type:"POST",url:v___location_prefix+"/index.cgi?xhr-gennewpass=get",data:false,dataType:"text"});a.remove();t.show();t.removeClass(s);if(!r){var o="15|a-z,A-Z,0-9,#",l=o.split("|")[1].split(","),_=parseInt(o.split("|")[0]),c="",d="";if($.inArray("a-z",l)>=0){c+="abcdefghijklmnopqrstuvwxyz"}if($.inArray("A-Z",l)>=0){c+="ABCDEFGHIJKLMNOPQRSTUVWXYZ"}if($.inArray("0-9",l)>=0){c+="0123456789"}if($.inArray("#",l)>=0){c+="![]{}()%&*$#^<>~@|"}for(var f=0;f<_;f++){d+=c.charAt(Math.floor(Math.random()*c.length))}return d}return r}function get_cookie(e){var t=e+"=";var i=document.cookie.split(";");for(var n=0;n-1){o=o.split("~");e=o[0];s=o[1]}$.each($(t).find(i),function(){var r=$(t).find(i).parents(".btn-group.ui_links_row");if(r.length){r.contents().unwrap()}if($(this).parents(t).hasClass("f__lnk_t_btn")&&!Test.strContains(n,"---forced")){return}if(l){var o=new RegExp(RegExp.quote(l),"g");$(this).parent().replaceText(o,_?_:"")}if(n&&n.indexOf("__center__")>-1){$(i).parent().addClass("text-center").addClass("f__lnk_t_btn-el")}var c=" vertical-align-baseline",d=false;if(a&&a.includes("no-vt-al")){c=""}if(a&&a.includes("no-btn-text")){d=true}$(this).html(e+(""+$(this).text().replace(/\.\.$/,"")+"
          ")+s).addClass(n).addClass("f__lnk_t_btn-el").removeClass("ui_link").prepend(a?''+(d?"":"  ")+"":"");$(this).parent(t).addClass("f__lnk_t_btn");$(this).parent("label").addClass("f__lnk_label_cnt").parent("td").addClass("f__lnk_td_cnt")})})}})}function theme_toggle_night_mode(){var e=$("body .user-link.palette-toggle"),t=e.find(".fa-sun").length?0:1,i=session.server.data("data-night-mode"),n=session.server.data("data-default-theme"),a="gainsboro",s=$("input, textarea").is(":focus");if($.support.spa&&s){return}if(!$.support.spa){return}if($("body").find(".modal.in:visible").length){return}var r=function(){var e=v___location_path_lead_unslashed==v___location_prefix_unslashed_trail_slashed+"sysinfo.cgi"&&$(".__page .piechart").length;if(e){$.each($(".piechart"),function(){$(this).addClass("bg-filter-blur-grayscale-invert-opacity75").data("easyPieChart").update(0)});setTimeout(function(){get_pjax_content(v___location_prefix+"/sysinfo.cgi")},100)}theme.config.save()};if(t===1){e.find(".fa-moon").removeClass("fa-moon").addClass("fa-sun");progress.start();$(document).find(".settings_navigation_color_toggle").addClass("hidden");var o=$("html").find('head link[href*="palettes"][data-palette]');var l=document.styleSheets.length+1;$("html").find("head").append('');$("html").find("head").append('');var _=function(e){var t=function(){session.server.data("data-theme","gunmetal");o.remove();session.server.data("data-bgs","nightRider");session.server.data("data-night-mode",1);v___theme_night_mode_enabled=1;v___theme_night_mode=1;settings_force_night_mode=v___theme_night_mode;if(!(v___location_path_lead_unslashed==v___location_prefix_unslashed_trail_slashed+"sysinfo.cgi"&&$(".__page .piechart").length)){setTimeout(function(){progress.end()},201)}r()};var i=document.styleSheets;try{if(!i[e]||!i[e].cssRules[0]){setTimeout(function(){_(e)},200);return}}catch(e){if(e.name!=="SecurityError"){setTimeout(function(){t()},800);return}return}t()};_(l)}else{$("body").find(".settings_navigation_color_toggle").removeClass("hidden");e.find(".fa-sun").removeClass("fa-sun").addClass("fa-moon");var c=$("html").find('head link[href*="gunmetal"]');session.server.data("data-default-theme")!="blue"&&$("html").find("head").append('');session.server.data("data-theme",n);c.remove();session.server.data("data-bgs",a);session.server.data("data-night-mode",0);$("html").find('head link[href*="nightrider"]').remove();v___theme_night_mode_enabled=0;v___theme_night_mode=0;settings_force_night_mode=v___theme_night_mode;r()}if(typeof CKEDITOR=="object"&&CKEDITOR.instances){for(var d in CKEDITOR.instances){setTimeout(function(){editor_html_palette(CKEDITOR.instances[d].document,t)})}}setTimeout(function(){theme_page_iframes(null,t)},t?200:0)}function theme_spinner_small(e,t,i){e=e||"in-btn-md";t=t||"dark";i=i||"width:12px; height:12px; margin-right: 7px;";return''}function despinnerfy_buttons(){var e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:0,t=arguments.length>0&&arguments[1]!==undefined?arguments[1]:0,i=t?t:$(".btn.disabled");$.each(i,function(){var t=$(this),i=t.find(".cspinner_container, .cspinner_custom"),n=i.prev("i.invisible, i.hidden-force");!e&&t.removeClass("disabled");n.removeClass("invisible hidden-force");i.remove()})}function despinnerfy_button(e){var t=e.find(".cspinner_container, .cspinner_custom"),i=t.prev("i.invisible, i.hidden-force");e.removeClass("disabled");i.removeClass("invisible hidden-force");t.remove()}function spinnerfy_buttons(e,t,i,n,a){var s=e.attr("onclick")&&e.attr("onclick").indexOf("blank")!==-1||e.parents("form").attr("target")&&e.parents("form").attr("target").indexOf("blank")!==-1?true:false,r=e.hasClass("heighter-28"),o=e.css("height")=="28px",l=e.hasClass("btn-tiny"),_=e.hasClass("btn-lg")||e.css("height")=="35px",c=e.outerHeight(),d=parseInt(c/(l?5:r||o?4.4:_?3.6:4))+(browser.detect.firefox()?0:0);d+=r||o?.5:0;var f=e.find(".fa, .fa2").first().outerWidth(),u=parseInt(f/(l?1.6:r||o?1.15:_?1.4:1.3))-.5,g=e.find(".fa"),p='span class="cspinner_container" style="position: absolute; top: '+d+"px; left: "+u+'px;">',x="<"+p+'>';if(l){b="<"+p+'>',x="<"+p+'>'}setTimeout(function(){!s&&e.addClass("disabled")},10);if(g.length&&!s){var y=function(){if(e.hasClass("btn-default")){g.addClass("invisible").after(x)}else{g.addClass("invisible").after(b)}};if(a){e.addClass("disabled");y()}else{setTimeout(function(){y()},10)}}typeof i==undefined?i=false:false;typeof n==undefined?n=false:false;if(v[3]||i){setTimeout(function(){e.removeClass("disabled");g.removeClass("invisible");e.find(".cspinner_container").remove()},i?i:v[3])}if(n){setTimeout(function(){progress.end()},400)}}function spinnerfy_button_tiny(e){var t=theme_spinner_small("margined-top--1 cspinner_custom","white","width: 8px; height: 8px; margin-right: 5px; border-width: 1px;");e.find(".fa").first().addClass("hidden-force").after(t)}function theme_language(e,t){typeof t=="undefined"?t=false:false;var i="theme_xhred_"+e,n=v___theme_language;if(t){var a=Convert.arrFlip(n);return a[$.trim(i)]||a[$.trim(e)]}else{var s=n[i]||n[e];if(s&&platform.detect()==="mac"){s=s.toString();s=s.replaceAll("Ctrl +","⌘ +");s=s.replaceAll("Alt +","⌥ +");s=s.replaceAll("Ctrl+","⌘+");s=s.replaceAll("Alt+","⌥+");s=s.replaceAll("Shift+","⇧+");s=s.replaceAll("+Shift","+⇧")}return s}}function theme_copy_to_clipboard(e,t){var i=function(e){var t="tmp-clipboard-obj";$("body").append('');var i=new ClipboardJS("."+t+"");$("."+t+"").trigger("click").remove();i.destroy()};if(t){i(e)}else{try{navigator.clipboard.writeText(e)}catch(t){i(e)}}}function theme_post_event_handler(e,t){if(!t._isKeyCombo&&t._isHuman){var i=$(quirks.active_element());if(i&&i.length&&i.is('input[type="text"], .ui_textbox, textarea, .ui_textarea')){return}plugins.dashboard.events("support-header-icon",e,t);plugins.dashboard.events("copy/paste-header-icon",e,t);plugins.messenger.events("message-user-select",e,t);snippets.page.events(e,t)}}function theme_post_event_window_state_activated(e){theme.visibility.set(true);e==="focus"&&theme_window_focused();plugins.dashboard.events("reset");snippets.page.events("reset")}function theme_post_event_window_state_deactivated(e){theme.visibility.set(false)}function get_utc_offset(){return session.server.data("time-offset")}function check_reboot(){if(core.curModuleFile("init","reboot.cgi")&&!document.querySelector('.container-fluid [action="reboot.cgi"]')){setTimeout(function(){connection_error({status:0,reboot:1},1,{body:theme_language("connection_reboot_details"),title:theme_language("connection_reboot"),icon:"refresh-mdi"});vars.pjax.post_reboot=true},1e3)}}function xhr_response_text_to_html(e){var t=null;if(typeof e==="object"){var i=e.responseText;if(typeof i==="string"&&i){try{var n=new DOMParser,a=n.parseFromString(i,"text/html"),s=$($(a).find("body"));if(s&&s.length){var r=s[0].childNodes;if(r&&r.length){t=$(r).add(s);return t.length?t:null}}}catch(e){}}}return t}function connection_error(e,t,i,n){var a=function(e){var t=vars.previous_request,i=typeof t==="object"&&t.currentTarget&&t.currentTarget.action&&t.currentTarget.action.toString().includes(e);return i};if(core.curModule("webmin")&&a("/change")||core.curModuleFile("acl","list_sessions.cgi")){return}if(theme_error_connection_reset(e)){return}var s=vars.previous_request_progressive;if(typeof s==="object"){s=$(s.target).serialize();if(v___location_file==="update.cgi"&&s.includes("mode=updates")&&s.includes("u=webmin")){return}}if(e&&e.status===500&&vars.ajax.progressing||n&&n.url&&n.url.includes("/stats")&&a("/wizard")){return}var r=function(e,t){var i=String(),n=xhr_response_text_to_html(e);if(n&&(n.filter("p").length||t&&n.find("[data-fatal-error-text]").length)){var a=$.trim(n.filter("p").html())||$.trim(n.find("[data-fatal-error-text]").html());if(a){var s=a.replace(/\n/g," ").match(/(.*)\sat\s\/|(.*)/);if(s){i=" – "+Convert.htmlStrip(s[2]||s[1])}}}return i};var o=r(e);if(e.status===502&&o&&o.includes("tree.cgi")){return}progress.end();v___theme_ajax_error=1;if((v___theme_connection_triggered_origin===1||t)&&(e.status===0||e.status===400||e.status===404||e.status===500||e.status===502||e.status===503)){var l="modal-connection-warning",_="hidden.bs.modal",c=e;if(vars.pjax.post_reboot){vars.pjax.post_reboot=false}if(!$("."+l).length&&!this.called){this.called=1;$.ajax({context:this,type:"GET",url:v___location_prefix+"/index.cgi/?xhr-error=1",data:false,dataType:"text",timeout:3e3,success:function(){this.called=0},error:function(){var e=theme_language("connection_error_details").replace("%server",location.host+v___location_prefix),t=theme_language("connection_lost"),n="unplugged",a="danger";var s="virtual-server",r="_domain.cgi",o="_form.cgi",d=core.curModuleFile(s,"wizard.cgi"),f=$('.container-fluid form[action*="wizard.cgi"]'),u="wizardinputdefdommanual",g=f.find('input[type="radio"][name="defdom"], input[type="text"][name="defhost"]').length===3||f.find("#"+u+"").length,p=core.curModuleFile(s,"edit"+r+"")||core.curModuleFile(s,"save"+r+"")||core.curModuleFile(s,"delete"+r+"")||core.curModuleFile(s,"cert"+o+"")||core.curModuleFile(s,"rename"+o+"")||core.curModuleFile(s,"rename.cgi")||core.curModuleFile(s,"domain"+o+"")||core.curModuleFile(s,"domain_setup.cgi")||core.curModuleFile(s,"letsencrypt.cgi")||d;if(p){var m=theme_language("theme_xhred_connection_error_details_ssl");m=m.replace("",'');var h="[data-ssl-warning-fixer]",v="click.sslwarn";$("body").off(v,h).on(v,h,function(e){e.preventDefault();var t=560,i=300;window.open(""+(location.origin+v___location_prefix)+"/?xnavigation=ERR_CERT_AUTHORITY_INVALID","net::ERR_CERT_AUTHORITY_INVALID","menubar=no,location=no,resizable=no,scrollbars=no,status=no,width="+t+"px,height="+i+"px").focus()});e=e.replace("
            ","
            • "+m+"
            • ");if(g){if(d){f.find('input:not([type="submit"]):not([name="step"])').removeAttr("name").removeAttr("id");$("").attr({type:"hidden",name:"defdom",id:u,value:0}).appendTo(f)}}}if(i){e=i.body;t=i.title;n=i.icon;l+=" modal-reboot",a="warning"}var b="loading-dots",x=new Date;x=dayjs(x.toISOString()).format(config_portable_theme_locale_format_full);var y='"+x)+'">';if(c.reboot){y=String()}theme_alert(t+''+y,e,false,"md",a,""+n+" fa-lg","7 "+l+"",0);setTimeout(function(){$("."+l+" ."+b+" + .fa").tooltip({placement:"auto bottom",trigger:"hover",html:true,delay:{show:vars.plugins.tooltip.delay.show,hide:vars.plugins.tooltip.delay.hide}})},150);setTimeout(function(){if(v___theme_connection_reestablish===0){connection_reestablish();v___theme_connection_reestablish=1;this.called=0;$("."+l).on(_,function(){v___theme_connection_reestablish=0;progress.end();if(g){var e=f.find('input[name="parse"]').prev('button[name="parse"]');e.length&&e.trigger("click")}if(p){plugins.navigation.reload()}})}},1);setTimeout(function(){plugins.navigation.load.stop();plugins.navigation.detect();plugins.navigation.switch.reset();despinnerfy_buttons();plugins.shell.unlock()},100)}})}}else{var d=r(e,true),f=String();if(e.status===413){var u=theme_wiki_link("global_error_more_details_online","https://github.com/authentic-theme/authentic-theme/wiki/Error:--413---Request-Entity-Too-Large");if(u){f=".
              "+u}}var g=String();if(n&&n.url){g="  — "+n.url+""}if(e.status!==200){e.status&&plugins.messenger.post(''+(theme_language("global_error")+":  "+e.status+" - "+e.statusText+""+d+f+g),10,"error","ajaxError");setTimeout(despinnerfy_buttons,400)}else if(d){theme_error_disk_quota_exceeded(d)}}}function theme_error_connection_reset(e){if(e.status===0&&e.readyState===4&&e._errConnectionReset===true){plugins.messenger.post({type:"error",icon:"fa fa-plug",id:"connection_error_200_reset",title:theme_language("connection_reset_title"),message:theme_language("connection_reset_message"),layout:1,displayMode:1,position:"bottomCenter",cancel:true,timeout:0});return true}return false}function theme_error_disk_quota_exceeded(e){if(e&&(e.toString().toLowerCase().includes("no space left on")||e.toString().toLowerCase().includes(": disk quota exceeded"))){plugins.messenger.post({type:"error",icon:"fa2 fa2-disk fa-1_25x",id:"connection_error_200_disk_quota_error",title:theme_language("disk_quota_error_title"),message:theme_language("disk_quota_error_message"),layout:1,displayMode:1,position:"bottomCenter",cancel:true,timeout:0});return true}return false}function theme_wiki_link(e,t){var i=theme_language(e),n=i.match(/%1(.*)%1/);if(n){var a=new RegExp(n[1],"g");i=i.replace(/%1/g,String()).replace(a,'
              '+n[1]+"");return i}else{return String()}}function connection_modal_close(){var e="modal-connection-warning";$("."+e).modal("hide");v___theme_connection_reestablish=0}function connection_reestablish(){var e="modal-connection-warning";$("."+e).length&&$.ajax({type:"GET",url:v___location_prefix+"/index.cgi/?xhr-check=1",data:false,timeout:1e3,dataType:"text",success:function(){$("."+e).removeClass("modal-reboot");$("."+e).find(".modal-header").removeClass().addClass("modal-header background-success background--bordered").find("h4").html('   '+theme_language("connection_success"));$("."+e).find(".modal-body").html("

              "+theme_language("connection_success_details")+"

              ");if(vars.pjax.post_reboot){get_pjax_content(v___location_prefix+"/sysinfo.cgi",["success",connection_modal_close]);vars.pjax.post_reboot=false;vars.previous_request=String()}else{setTimeout(function(){connection_modal_close()},300)}},error:function(){v___theme_connection_reestablish&&setTimeout(function(){connection_reestablish()},1e3)}})}function control_server_theme_temp_data(e,t,i,n,a,s){return $.ajax({type:"POST",url:v___location_prefix+"/index.cgi/?xhr-theme_temp_data=1&xhr-theme_temp_data_action="+e+"&xhr-theme_temp_data_name="+t+"&xhr-theme_temp_data_value="+(i?Convert.uriEncodeComponent(i):i)+"&xhr-theme_temp_data_keep="+n+"",data:false,dataType:"text",success:function(e){if(!session.status(e)){return}if(typeof a==="function"&&(!e.length||e.length&&s===1)){a()}},error:function(e){}})}function get_server_theme_temp_data(e,t,i,n){return control_server_theme_temp_data("get",e,false,t,i,n)}function set_server_theme_temp_data(e,t,i,n,a){control_server_theme_temp_data("set",e,t,i,n,a)}function page_control_header(){var e=".header",t="#headln2l",i="#headln2c",n=$(""+e+" "+t+""),a=$(""+e+" "+i+"");if(matchMedia("(max-width: 767px)").matches){if(n.next().is(i)){var s=a.detach();n.before(s)}}else{if(a.next().is(t)){var s=a.detach();n.after(s)}}}function page_display(){var e=$("body"),t=$("body").find(".container-fluid"),i=$("head");t.css({opacity:1,"pointer-events":"auto"});e.css("overflow","auto");i.find("#__tmp_no_overflow").remove()}function page_remove_progress(){var e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:0;despinnerfy_buttons(e);setTimeout(function(){get_server_theme_temp_data("redirected",0)},100);setTimeout(function(){progress.end()},600)}function page_adjust(e,t){if(typeof $.injectCSS=="function"){$("style[data-persist]").remove();t?t="translate("+t+"px, 0px) !important":t=false;$.injectCSS({"#sidebar":{left:-e+"px",width:e+"px",transform:t},".switch-toggle":{width:e+"px"},".__page":{"margin-left":e+"px !important"},".autocomplete-suggestions":{"min-width":e-23+"px !important"},".__logo":{width:e+"px","max-width":e+"px"},"#jsPanel-replacement-container":{left:($.support.spa?settings_leftmenu_width-1:-2)+"px"}});if($("aside select").length&&core.curModuleFile("webmin","edit_themes.cgi")&&!$.browser.mobile){$("aside select[data-autocomplete-title]").attr("style","width:"+(e-24)+"px; margin-top: 0 !important");plugins.navigation.select.load()}}}function theme_modal_dismiss(){$(".modal.in").find("[data-dismiss]").trigger("click")}function theme_shortcut_check(e){if(!e.endsWith("/")){e+="/"}if(!e.startsWith("/")){e="/"+e}if(core.moduleAvailable(URI(e).directory().replace(/\//g,""))){return true}else{return false}}function theme_shortcuts_generate(e){var t,i=theme_shortcuts_modifier_name();if(e==="conf"){var n=settings_hotkey_open_module_config_privileged,a=n==="dot"?".":n==="comma"?",":n;t="("+i+" + "+a.toString().toUpperCase()+")"}else{t="("+i+" + "+e.toString().toUpperCase()+")"}return t}function theme_shortcuts_modifier_name(e){var t,i=e||settings_hotkey_toggle_modifier,n=platform.detect()==="mac";if(n){if(i==="ctrlKey"){t="⌃"}else if(i==="altKey"){t="⌥"}else if(i==="shiftKey"){t="⇧"}else if(i==="metaKey"){t="⌘"}}else{if(i==="ctrlKey"){t="Ctrl"}else if(i==="altKey"){t="Alt"}else if(i==="shiftKey"){t="⇧"}else if(i==="metaKey"){t="Meta"}}return t}function theme_shortcuts_modifier_unique(e){var t=["ctrlKey","altKey","shiftKey","metaKey"],i=t.indexOf(settings_hotkey_toggle_modifier),n=false;t.splice(i,1);t.map(function(t){if(e[t]&&!n){n=true}});return!n}function theme_modifiers_replace_for_mac(e,t,i){if(e&&platform.detect()==="mac"){if(t&&i){e=e.replaceAll(t,i)}e=e.replaceAll("Ctrl","⌃");e=e.replaceAll("Alt","⌥");e=e.replaceAll("Meta","⌘");e=e.replaceAll(" + "," ")}return e}function theme_shortcuts(e){var t=e.keyCode?e.keyCode:e.which,i=String.fromCharCode(e.which).toLowerCase(),n=String.fromCharCode(e.which);if(!settings_hotkeys_active){return}if(e.ctrlKey&&e.altKey&&i===settings_hotkey_duplicate_window_privileged){set_server_theme_temp_data("goto",link_type_convert(v___location_href,1),0,function(){theme_open_new_tab(v___location_href)},1)}if(Test.editing()||$(".modal-backdrop.in").length||$(".__page").hasClass("single-page")){return}if(e.altKey){if(e.which===37||e.which===39){let t="ui_link_pagination",i="disabled",n=$("."+t+"_left:not(."+i+"):visible"),a=$("."+t+"_right:not(."+i+"):visible");if(e.which===37&&n.length){n.click()}else if(e.which===39&&a.length){a.click()}}}if(e.which===settings_hotkey_theme_help_keycode){theme.help.show();e.preventDefault();return}if(vars.page_interaction===0){if(t===8&&e.shiftKey){window.history.forward();return}else if(t===8){window.history.back();return}}if(settings_hotkeys_active){var a=theme_shortcuts_modifier_unique(e);if(e.ctrlKey&&e.altKey&&e.metaKey&&e.shiftKey&&n=="R"){!theme.veiled(-1)&&theme_cache_clear()}if(get_access_level()===0&&e.ctrlKey&&e.altKey&&e.shiftKey&&e.metaKey&&n=="U"){!theme.veiled(-1)&&theme.update(0)}if(i==settings_hotkey_open_module_config_privileged||settings_hotkey_open_module_config_privileged==="dot"&&e.which===190||settings_hotkey_open_module_config_privileged==="comma"&&e.which===188){e.preventDefault();if(vars.events.keypressed.shift){$('aside .user-links a[href*="config.cgi"]').trigger("click")}else{$('.container-fluid > .panel > .panel-heading a[href*="config.cgi"]').trigger("click")}}if(!a){return true}if(!session.alive){e.preventDefault();return}if(e[settings_hotkey_toggle_modifier]){if((e.which===37||e.which===39)&&v___location_file&&(v___location_file.toString().includes("config.cgi")||v___location_file.toString().includes("edit_tmpl.cgi"))){var s=$('.container-fluid .ui_form[action*="config.cgi"], .container-fluid .ui_form[action*="edit_tmpl.cgi"]'),r=function(e){return'button[name="'+e+'"]:not(.disabled)'};s.find(e.which===37?r("nprev"):r("nnext")).trigger("click")}if(n=="1"&&settings_hotkey_custom_1_user){e.preventDefault();theme_shortcut_check(settings_hotkey_custom_1_user)&&get_pjax_content(v___location_prefix+settings_hotkey_custom_1_user)}if(n=="2"&&settings_hotkey_custom_2_user){e.preventDefault();theme_shortcut_check(settings_hotkey_custom_2_user)&&get_pjax_content(v___location_prefix+settings_hotkey_custom_2_user)}if(n=="3"&&settings_hotkey_custom_3_user){e.preventDefault();theme_shortcut_check(settings_hotkey_custom_3_user)&&get_pjax_content(v___location_prefix+settings_hotkey_custom_3_user)}if(n=="4"&&settings_hotkey_custom_4_user){e.preventDefault();theme_shortcut_check(settings_hotkey_custom_4_user)&&get_pjax_content(v___location_prefix+settings_hotkey_custom_4_user)}if(n=="5"&&settings_hotkey_custom_5_user){e.preventDefault();theme_shortcut_check(settings_hotkey_custom_5_user)&&get_pjax_content(v___location_prefix+settings_hotkey_custom_5_user)}if(n=="6"&&settings_hotkey_custom_6_user){e.preventDefault();theme_shortcut_check(settings_hotkey_custom_6_user)&&get_pjax_content(v___location_prefix+settings_hotkey_custom_6_user)}if(n=="7"&&settings_hotkey_custom_7_user){e.preventDefault();theme_shortcut_check(settings_hotkey_custom_7_user)&&get_pjax_content(v___location_prefix+settings_hotkey_custom_7_user)}if(n=="8"&&settings_hotkey_custom_8_user){e.preventDefault();theme_shortcut_check(settings_hotkey_custom_8_user)&&get_pjax_content(v___location_prefix+settings_hotkey_custom_8_user)}if(n=="9"&&settings_hotkey_custom_9_user){e.preventDefault();theme_shortcut_check(settings_hotkey_custom_9_user)&&get_pjax_content(v___location_prefix+settings_hotkey_custom_9_user)}if(i==settings_hotkey_focus_search){e.preventDefault();$(".form-control.sidebar-search").focus()}if(i==settings_hotkey_toggle_key_webmin){e.preventDefault();$('.switch-toggle input[id="open_webmin"]').trigger("click")}if(i==settings_hotkey_toggle_key_virtualmin){e.preventDefault();$('.switch-toggle input[id="open_virtualmin"]').trigger("click")}if(i==settings_hotkey_toggle_key_cloudmin){e.preventDefault();$('.switch-toggle input[id="open_cloudmin"]').trigger("click")}if(i==settings_hotkey_toggle_key_usermin){e.preventDefault();$('.switch-toggle input[id="open_usermin"]').trigger("click")}if(i==settings_hotkey_toggle_key_webmail){e.preventDefault();$('.switch-toggle input[id="open_webmail"]').trigger("click")}if(i==settings_hotkey_toggle_key_night_mode){e.preventDefault();theme_toggle_night_mode()}if(i==settings_hotkey_navigation&&window.matchMedia("(min-width: 1080px)").matches){e.preventDefault();$('aside [data-collapse-trigger="1"]').addClass("m").trigger("click")}else if(i==settings_hotkey_navigation){$(".mobile-menu-toggler:visible").trigger("click")}if(i==settings_hotkey_slider&&window.matchMedia("(min-width: 1366px)").matches){e.preventDefault();$('[data-trigger="side_slider_pinned"]').trigger("click")}else if(i==settings_hotkey_slider){$(".right-side-tabs-toggler:visible").trigger("click")}if(i==settings_hotkey_toggle_slider){e.preventDefault();$(".right-side-tabs-toggler:not(.hidden) .btn-menu-toggler").trigger("click")}if(i==settings_hotkey_reload&&$('.user-links a[data-refresh="true"]')){e.preventDefault();page_refresh()}if((i==settings_hotkey_shell||i==settings_hotkey_shell2)&&theme_shortcuts_modifier_unique(e)&&plugins.shell.available()){e.preventDefault();if(session.server.data("terminal")==1){if(plugins.shell.status()){plugins.terminal.close()}else{plugins.terminal.open()}}else{if(plugins.shell.status()){plugins.shell.close()}else{plugins.shell.open()}}return}if(i==settings_hotkey_sysinfo){e.preventDefault();if(plugins.navigation.switch.dashboard.get()==true){plugins.navigation.switch.dashboard.set()}else{get_pjax_content(v___location_prefix+"/sysinfo.cgi")}}if(i==settings_hotkey_favorites){e.preventDefault();if($(".favorites-menu-outer").css("left")!="0px"){$(".user-link.favorites").trigger("click")}else{$(".favorites-menu-outer").removeClass("hover")}}}else{if(e.keyCode===191){e.preventDefault();$(".form-control.sidebar-search").focus()}}return false}}function sysinfo_replace_dismiss_buttons(){var e=$('#system-status [onclick*="webmin/hide.cgi?id"], #right-side-tabs [onclick*="webmin/hide.cgi?id"], [data-referrer^="announce"] [onclick*="webmin/hide.cgi?id"]');$.each(e,function(){var e=$(this).attr("onclick"),t=$(this).text();if($(this).is("input")){t=$(this).val()}$(this).before(' '+t+"");$(this).remove()});var t=$('#system-status [onclick*="window.open"][onclick*="_new"], #right-side-tabs [onclick*="window.open"][onclick*="_new"], [data-referrer^="announce"] [onclick*="window.open"][onclick*="_new"]');$.each(t,function(){var e=$(this).attr("onclick"),t=$(this).text();if($(this).is("input")){t=$(this).val()}var i="btn-primary",n=e.split('"')[1],a="fa fa-fw fa-external-link";if(n.includes("pa"+"t"+"r"+"eo"+"n")){a="fa2 fa-fw fa2-kiss-wink-heart-bold";i="btn-success"}$(this).before(' '+t+"");$(this).remove()})}function get_access_level(){if(vars.level!=""&&vars.level!==-1){return parseInt(vars.level)}else{return parseInt(session.server.data("level"))}}function theme_updating(){return theme_message_exists("themeUpgrade")}function theme_message_exists(e){return plugins.messenger.toast.get(e)}function theme_message_dismiss(e){return plugins.messenger.toast.hide(e)}function theme_message_and_unlock(e,t){var i=arguments.length>2&&arguments[2]!==undefined?arguments[2]:1;var n=arguments.length>3&&arguments[3]!==undefined?arguments[3]:String();var a=arguments.length>4&&arguments[4]!==undefined?arguments[4]:"info";var s=arguments.length>5&&arguments[5]!==undefined?arguments[5]:3;var r=arguments.length>6&&arguments[6]!==undefined?arguments[6]:0;plugins.messenger.post(''+theme_language(""+t)+" ",s,a,n,r);setTimeout(function(){page_remove_progress(i)},600)}function theme_alert(e,t,i,n,a,s,r,o){typeof i==="undefined"||i==false?i=false:false;typeof n==="undefined"||n==false?n="md":false;typeof a==="undefined"||a==false?a="danger":false;typeof s==="undefined"||s==false?s="exclamation-triangle":false;typeof r==="undefined"||r==false?r="7":false;typeof o==="undefined"||o==false?o=false:false;var l=$.isArray(i)?i:[false,false],_="modal-global-notification",c=""+'"+"";setTimeout(function(){if(!$("body").hasClass("modal-open")){$("body").append(c);$("."+_).modal("show");$("."+_).on("click",".modal-body a.label",function(e){$("."+_).modal("hide")});$("."+_).on("hidden.bs.modal",function(e){$("."+_).remove()})}},o)}function get_module_title(){$_right_menu_title=$("#headln2c");if($_right_menu_title.find("span[data-main_title]").text().length){return $_right_menu_title.find("span[data-main_title]").text()}else{if($_right_menu_title.text().length){return $_right_menu_title.text().text()}else{return"->"}}}function editor_background_save(e,t){if($('.container-fluid textarea[name="data"],'+'.container-fluid textarea[name="text"],'+'.container-fluid textarea[name="directives"],'+'.container-fluid textarea[name="manual"]').length===1&&$('.container-fluid textarea[name="data"],'+'.container-fluid textarea[name="text"],'+'.container-fluid textarea[name="directives"],'+'.container-fluid textarea[name="manual"]').parents("form").find('input[type="submit"]').length===1){if(!$(".CodeMirror").length){return}function i(){if(typeof __cm_editor_static!="undefined"){$(".container-fluid > .panel > .panel-body").attr("data-cm-line",""+__cm_editor_static.getCursor().line+","+__cm_editor_static.getCursor().ch+"").attr("data-cm-state",$('[data-form="submitter"]').hasClass("btn-warning")&&!$('[data-form="submitter"]').next("button").hasClass("disabled"))}}var n=$(document.body),a=".container-fluid > .panel > .panel-body",s=$(""+a+' textarea[name="data"], '+a+' textarea[name="text"], '+a+' textarea[name="directives"], '+a+' textarea[name="manual"]').parents("form"),r=s.find('button[type="button"]').length?s.find('button[type="button"]'):s.find('input[type="submit"]'),o='  ',l=$(""+a+' textarea[name="directives"]').length?"-12px":"0",_=$(""+a+" select").val()?$(""+a+" select").val():$(".container-fluid .table-title").text()?$(".container-fluid .table-title").text():$(".container-fluid .panel-body tt:first").text()?$(".container-fluid .panel-body tt:first").text():$(".container-fluid #headln2c tt:first").text()?$(".container-fluid #headln2c tt:first").text():"";$(a+" .ui_reset").remove();$(a).addClass("magic-editor-container");r.parents("table.ui_form_end_buttons").prev("br").remove();r.parents("table.ui_form_end_buttons").prev("div.table-responsive").attr("style","margin-bottom: -4px !important");r.replaceWith(' ");var c=$(""+a+' button[type="button"]:not(.ui_form_end_submit)'),d=$(""+a+' button[type="submit"]:not(.ui_form_end_submit)'),f=window["__cm_editor_static"],u='button[type="submit"]:not(.disabled)',g='button[data-form="submitter"]:not(.disabled)';f.on("change",function(e,t){__cm_editor_static.save();c.addClass("btn-warning").removeClass("btn-success").attr("data-form-onbeforeunload",1);i()});n.off("mousedown.cm1").on("mousedown.cm1",""+a+" .CodeMirror",function(e){i()}).off("keydown.cm1").on("keydown.cm1",function(e){var t=e.keyCode?e.keyCode:e.which,i=$(""+a+' button[type="button"]:not(.ui_form_end_submit)'),n=i.not(".disabled"),s=$(""+a+' button[type="submit"]:not(.ui_form_end_submit)'),r=s.not(".disabled");if(i.find(".cspinner_container").length||s.find(".cspinner_container").length){e.preventDefault();return}if((t==13||t==83)&&f&&f.hasFocus()){if(t==83){var o=platform.detect()==="mac"?e.metaKey:e.ctrlKey;if(!e.shiftKey&&o){e.preventDefault();if(n.length){n.trigger("click")}}else if(e.altKey&&o&&e.shiftKey&&r.length){e.preventDefault();r.trigger("click")}}else{if(o&&e.shiftKey&&r.length){r.trigger("click")}else{if(o&&n.length){n.trigger("click")}}}}}).undelegate(u,"click.cm").on("click.cm",u,function(e){set_onbeforeunload_status(0,0);$(this).addClass("disabled").find(".fa.fa-arrow-circle-o-left").addClass("invisible");spinnerfy_buttons($(this));c.attr("data-form-onbeforeunload",0)}).undelegate(g,"click.cm").on("click.cm",g,function(e){e.preventDefault();var t=$(this),i=t.parents("form"),n=i.attr("enctype")&&i.attr("enctype").indexOf("form-data")>-1?0:1,r=n?i.serialize():new FormData(i[0]);$(this).addClass("disabled").find(".fa.fa-floppy-o").addClass("invisible");spinnerfy_buttons($(this));theme_message_dismiss("magic_save_error");theme_message_dismiss("magic_save_success");setTimeout(function(){$.ajax({type:"POST",url:s.attr("action"),data:r,dataType:"text",cache:false,contentType:false,processData:false,success:function(e){if(!session.status(e)){return}c.removeClass("btn-warning").addClass("btn-success").attr("data-form-onbeforeunload",0);$("button").removeClass("disabled").find(".fa").removeClass("invisible").parent().find(".cspinner_container").remove();$(a).attr("data-cm-state","false");set_onbeforeunload_status(0,0);if($(e).find(".panel-body > hr + h3").length&&!$(e).find(".panel-body .table").length&&!$(e).find(".panel-body form[action]").length){plugins.messenger.post(''+$(e).find(".panel-body hr + h3").html(),60,"error","magic_save_error");c.removeClass("btn-success").addClass("btn-warning").attr("data-form-onbeforeunload",1);$(a).attr("data-cm-state","true");return}plugins.messenger.post(''+theme_language("filemanager_file_saved").replace("%value",_),3,"success","magic_save_success")},error:function(e){}})},300)});editor_config_search(t)}}function filter_out_objects_inner_chars(e,t,i){i=i?i:"";if(e.is("input")){var n=e.val();if(n){e.val(e.val().replace(t,i))}}else{var a=e.html(),s=e.text();if($.trim(a).length&&$.trim(a).length!==$.trim(s).length){var r=String(),o=a.match(/(.*?<.*?>.*?)(.*?)(<\/.*?>.*?)/gm);if(o&&o.length){$.each($(o),function(e,n){if(typeof n==="string"&&n&&n.length){var a=n.match(/(.*?<.*?>.*?)(.*?)(<\/.*?>.*?)/);if(a&&a[0]&&a[1]&&a[3]){r+=a[1]+(!a[2]?"":a[2].replace(t,i).replace(/\s/g," "))+a[3]}}});e.html(r)}}else if(s&&s.length){e.html(s.replace(t,i).replace(/\s/g," "))}}}function editor_config_label(e){var t=".panel-body form select",i=$(t),n=i.prev("b"),a=n.text(),s=i.prev('input[type="submit"]'),r=theme_language("editing_config_file"),o=function(e){if(e){e=e.replace(":","")}return e};if(e){if(s.length){a=o(s.val())}else{a=o(a)}r=a}var l=""+r+":  ";if(n.length){n.replaceWith(l)}else if(s.length&&s.index()===0){s.replaceWith(l)}}function editor_config_search(e){var t="dropdown-editor_config_search",i="data-search-in-files-button",n="["+i+"]",a="data-clear-search",s="["+a+"]",r="search-in-files",o='[data-name="'+r+'"]',l="data-search-in-results",_="data-search-in-results-container",c="."+t,d="data-external-detach",f="."+t+" + ["+d+"]",u=".panel-body form .select2",g="data-search-in-files-icon-find",p=theme_spinner_small(),m="data-no-results-initial",h="data-search-stats",v=0;editor_config_label();setTimeout(function(){var e=$(u),d=e.prev("select"),b=d.attr("name"),x=e.parents("form").attr("action");e.addClass("z-index-10001");if(d.find("option").length<=1){return}e.parents("form").addClass("text-nowrap");if(!$(c).length){e.after('
              ');setTimeout(function(){var e=uri_parse_param("editor_search");if(e){$(o).val(e).trigger("keydown");setTimeout(function(){$(n).removeClass("disabled").trigger("click")})}})}function y(){$("["+m+"]").removeClass("showing-results");$(c).find("span.fa").removeClass("text-warning")}function w(){$("["+m+"]").addClass("showing-results");$(c).find("span.fa").addClass("text-warning")}function k(e){if(e){$("["+h+"]").addClass("hidden")}else{$("["+h+"]").removeClass("hidden")}}$(f).on("click",function(e){e.preventDefault();var t="disabled";if($(this).hasClass(t)){return}$(this).addClass(t);var i=$(this).parents("form").find("select").val();i&&edit_file_from_full_path(i)});var C=$("["+_+"]");C.find("a").on("click",function(e){e.preventDefault();var t=$(this).attr("data-href")+C[0].scrollTop;if(get_onbeforeunload_status()){get_onbeforeunload_message(false,{href:t})}else{get_pjax_content(t)}});$(c).find("li").on("click",function(e){e.stopPropagation()});$(c).on("show.bs.dropdown",function(){var e=$(u).prev("select").prev('input[type="submit"]'),t=-1,i=$(u).width();if(i<360){t+=$(u)[0].offsetLeft-(e.length?14:11)}var n=t+i+$(c).width();$(this).find(".dropdown-menu").css("min-width",n).css("max-width",n).css("width",n);var a=$(this).parents("form").outerWidth(),s=$(this)[0].offsetLeft;if(s"+'Line: '+i[1][1]+""+''+i[0]+""+""+i[1][0].replace(a,""+$.trim(e)+"")+""+""}).promise().done(function(){i.append(n);i[0].scrollTop=0;i.find("a").on("click",function(e){e.preventDefault();var t=$(this).attr("data-href")+i[0].scrollTop;if(get_onbeforeunload_status()){get_onbeforeunload_message(false,{href:t})}else{get_pjax_content(t)}});var t=jQuery.unique(s).length;var a;if(s.length===1&&r===1){a=theme_language("find_in_config_files_result_found_single")}else if(s.length===1&&r>1){a=theme_language("find_in_config_files_result_found_multi")}else{a=theme_language("find_in_config_files_results_found")}a=a.replace("$1",r).replace("$2",t).replace("$3",""+e+"");$("["+h+"]").html(a)})}else{i.append(""+theme_language("filemanager_search_no_matches").replace(".","")+"");k(1);$(c).find("span.fa").removeClass("text-warning")}},complete:function(){$("["+g+"]").removeClass("hidden")},error:function(e){session.status(e.responseText)}})})})}function page_resized(){plugins.navigation.lock();if(!$(".mobile-menu-toggler").hasClass("selected")&&$("html").attr("data-navigation-collapsed")!="1"){$("aside").addClass("hidden-xs");$("aside").css("transform","translate("+settings_leftmenu_width+"px, 0px)");if(typeof jQuery().transition=="function"&&($(".__logo")&&!$(".mobile-menu-toggler:visible").length)){$(".__logo").transition({y:"-140px"},700,function(){})}else{if($(".__logo")){$(".__logo").css("transform","translate(0px, 0px)")}}}plugins.slider.test()}function theme_config_controls(e){var t=$("#atsave, #save_user");if(e){set_onbeforeunload_status(1,0);t.addClass("btn-warning")}else{set_onbeforeunload_status(0,0);t.removeClass("btn-warning")}}function theme_select_adjust_width(e){var t=parseInt(Math.random()*1e6),i=e.find("option:selected").text(),n=$("