Your IP : 216.73.216.224


Current Path : /var/www/html/media/com_akeebabackup/js/
Upload File :
Current File : /var/www/html/media/com_akeebabackup/js/Configuration.min.js

"use strict";if(void 0===akeebabackup)var akeebabackup={};function directftp_test_connection(){akeebabackup.Configuration.FtpTest.testConnection("engine.archiver.directftp.ftp_test","engine.archiver.directftp",0)}function postprocftp_test_connection(){akeebabackup.Configuration.FtpTest.testConnection("engine.postproc.ftp.ftp_test","engine.postproc.ftp",0)}function directftpcurl_test_connection(){akeebabackup.Configuration.FtpTest.testConnection("engine.archiver.directftpcurl.ftp_test","engine.archiver.directftpcurl",1)}function postprocftpcurl_test_connection(){akeebabackup.Configuration.FtpTest.testConnection("engine.postproc.ftpcurl.ftp_test","engine.postproc.ftpcurl",1)}function directsftp_test_connection(){akeebabackup.Configuration.SftpTest.testConnection("engine.archiver.directsftp.sftp_test","engine.archiver.directsftp",0)}function postprocsftp_test_connection(){akeebabackup.Configuration.SftpTest.testConnection("engine.postproc.sftp.sftp_test","engine.postproc.sftp",0)}function directsftpcurl_test_connection(){akeebabackup.Configuration.SftpTest.testConnection("engine.archiver.directsftpcurl.sftp_test","engine.archiver.directsftpcurl",1)}function postprocsftpcurl_test_connection(){akeebabackup.Configuration.SftpTest.testConnection("engine.postproc.sftpcurl.sftp_test","engine.postproc.sftpcurl",1)}function akconfig_dropbox_openoauth(){var e=akeebabackup.Configuration.URLs.dpeauthopen;-1==e.indexOf("?")?e+="?":e+="&",window.open(e+"engine=dropbox","akeeba_dropbox_window","width=1010,height=500,opener")}function akconfig_dropbox_gettoken(){akeebabackup.System.AjaxURL=akeebabackup.Configuration.URLs.dpecustomapi;akeebabackup.System.doAjax({engine:"dropbox",method:"getauth"},function(e){""!=e.error?alert("ERROR: Could not complete authentication; please retry"):(document.getElementById("var[engine.postproc.dropbox.token]").value=e.token.oauth_token,document.getElementById("var[engine.postproc.dropbox.token_secret]").value=e.token.oauth_token_secret,document.getElementById("var[engine.postproc.dropbox.uid]").value=e.token.uid,alert("Authentication successful!"))},function(e){alert("ERROR: Could not complete authentication; please retry\n"+e)},!1,15e3)}function akconfig_dropbox2_openoauth(){var e=akeebabackup.Configuration.URLs.dpeauthopen;-1==e.indexOf("?")?e+="?":e+="&",window.open(e+"engine=dropbox2","akeeba_dropbox2_window","width=1010,height=500,opener")}function akeeba_dropbox2_oauth_callback(e){document.getElementById("var[engine.postproc.dropbox2.access_token]").value=e.access_token,document.getElementById("var[engine.postproc.dropbox2.refresh_token]").value=e.refresh_token,window.open("","akeeba_dropbox2_window").close()}function akconfig_onedrive_openoauth(){var e=akeebabackup.Configuration.URLs.dpeauthopen;-1==e.indexOf("?")?e+="?":e+="&",window.open(e+"engine=onedrive","akeeba_onedrive_window","width=1010,height=500,opener")}function akeeba_onedrive_oauth_callback(e){document.getElementById("var[engine.postproc.onedrive.access_token]").value=e.access_token,document.getElementById("var[engine.postproc.onedrive.refresh_token]").value=e.refresh_token,window.open("","akeeba_onedrive_window").close()}function akconfig_onedrivebusiness_openoauth(){var e=akeebabackup.Configuration.URLs.dpeauthopen;-1==e.indexOf("?")?e+="?":e+="&",window.open(e+"engine=onedrivebusiness","akeeba_onedrivebusiness_window","width=1010,height=500,opener")}function akeeba_onedrivebusiness_oauth_callback(e){document.getElementById("var[engine.postproc.onedrivebusiness.access_token]").value=e.access_token,document.getElementById("var[engine.postproc.onedrivebusiness.refresh_token]").value=e.refresh_token,window.open("","akeeba_onedrivebusiness_window").close()}function akeeba_onedrivebusiness_refreshdrives(e){if("onedrivebusiness"===document.getElementById("var[akeeba.advanced.postproc_engine]").value){void 0===(e=e||{})["engine.postproc.onedrivebusiness.drive"]&&(e["engine.postproc.onedrivebusiness.drive"]={default:document.getElementById("var[engine.postproc.googledrive.team_drive]").value}),akeebabackup.System.AjaxURL=akeebabackup.Configuration.URLs.dpecustomapi;var t={engine:"onedrivebusiness",method:"getDrives",params:{"engine.postproc.onedrivebusiness.access_token":document.getElementById("var[engine.postproc.googledrive.access_token]").value,"engine.postproc.onedrivebusiness.refresh_token":document.getElementById("var[engine.postproc.googledrive.refresh_token]").value}};akeebabackup.System.doAjax(t,function(t){if(t?.list?.length){var n=document.getElementById("var[engine.postproc.onedrivebusiness.drive]");n.innerHTML="",t.list.forEach(t=>{var a=document.createElement("option");a.value=t[0],a.text=t[1],e["engine.postproc.onedrivebusiness.drive"].default===a.value&&(a.selected=!0),n.appendChild(a)})}else alert("ERROR: Could not retrieve list of OneDrive Drives.")},function(e){alert("ERROR: Could not retrieve list of OneDrive Drives. Error: \n"+e)},!1,15e3)}}function akconfig_onedriveapp_openoauth(){var e=akeebabackup.Configuration.URLs.dpeauthopen;-1==e.indexOf("?")?e+="?":e+="&",window.open(e+"engine=onedriveapp","akeeba_onedriveapp_window","width=1010,height=500,opener")}function akeeba_onedriveapp_oauth_callback(e){document.getElementById("var[engine.postproc.onedriveapp.access_token]").value=e.access_token,document.getElementById("var[engine.postproc.onedriveapp.refresh_token]").value=e.refresh_token,window.open("","akeeba_onedriveapp_window").close()}function akconfig_googledrive_openoauth(){var e=akeebabackup.Configuration.URLs.dpeauthopen;-1==e.indexOf("?")?e+="?":e+="&",window.open(e+"engine=googledrive","akeeba_googledrive_window","width=1010,height=500,opener")}function akeeba_googledrive_oauth_callback(e){document.getElementById("var[engine.postproc.googledrive.access_token]").value=e.access_token,document.getElementById("var[engine.postproc.googledrive.refresh_token]").value=e.refresh_token,window.open("","akeeba_googledrive_window").close(),akeeba_googledrive_refreshdrives()}function akeeba_googledrive_refreshdrives(e){if("googledrive"===document.getElementById("var[akeeba.advanced.postproc_engine]").value){void 0===(e=e||{})["engine.postproc.googledrive.team_drive"]&&(e["engine.postproc.googledrive.team_drive"]={default:document.getElementById("var[engine.postproc.googledrive.team_drive]").value}),akeebabackup.System.AjaxURL=akeebabackup.Configuration.URLs.dpecustomapi;var t={engine:"googledrive",method:"getDrives",params:{"engine.postproc.googledrive.access_token":document.getElementById("var[engine.postproc.googledrive.access_token]").value,"engine.postproc.googledrive.refresh_token":document.getElementById("var[engine.postproc.googledrive.refresh_token]").value}};akeebabackup.System.doAjax(t,function(t){if(console.log(t),t?.list?.length){var n=document.getElementById("var[engine.postproc.googledrive.team_drive]");n.innerHTML="",t.list.forEach(t=>{var a=document.createElement("option");a.value=t[0],a.text=t[1],e["engine.postproc.googledrive.team_drive"].default===a.value&&(a.selected=!0),n.appendChild(a)})}else alert("ERROR: Could not retrieve list of Google Drives.")},function(e){alert("ERROR: Could not retrieve list of Google Drives. Error: \n"+e)},!1,15e3)}}function akconfig_box_openoauth(){var e=akeebabackup.Configuration.URLs.dpeauthopen;-1==e.indexOf("?")?e+="?":e+="&",window.open(e+"engine=box","akeeba_box_window","width=1010,height=500,opener")}function akconfig_box_oauth_callback(e){document.getElementById("var[engine.postproc.box.access_token]").value=e.access_token,document.getElementById("var[engine.postproc.box.refresh_token]").value=e.refresh_token,window.open("","akeeba_box_window").close()}void 0===akeebabackup.Configuration&&(akeebabackup.Configuration={GUI:{renderOptionLabel:function(e,t,n){if(!(0!=(t.nolabel??0))&&"hidden"!==t.type&&"none"!==t.type){var a=document.createElement("label");a.className="col-sm-3 col-form-label",a.setAttribute("for",e),a.innerHTML=t.title,t.description&&(a.setAttribute("rel","popover"),a.setAttribute("title",t.title),a.setAttribute("data-bs-content",t.description)),t.bold&&(a.className+=" fw-bold"),n.appendChild(a)}},renderOptionTypeNone:function(e,t,n,a,o){},renderOptionTypeHidden:function(e,t,n,a,o){var i=document.createElement("input");i.id=e,i.setAttribute("type","hidden"),i.setAttribute("name",e),i.value=t.default,o.appendChild(i)},renderOptionTypeSeparator:function(e,t,n,a,o){const i=t.element??"div",r=t.content??null,s=document.createElement(i);r&&(s.innerHTML=r),o.appendChild(s)},renderOptionTypeInstaller:function(e,t,n,a,o){var i=document.createElement("select");for(var r in i.className="form-select akeeba-configuration-select-installer",i.id=e,i.setAttribute("name",e),akeebabackup.Configuration.installers)if(akeebabackup.Configuration.installers.hasOwnProperty(r)){var s=akeebabackup.Configuration.installers[r],c=document.createElement("option");c.value=r,c.innerHTML=s.name,t.default===r&&c.setAttribute("selected",1),i.appendChild(c)}n.appendChild(i),a.appendChild(n)},renderOptionTypeEngine:function(e,t,n,a,o){var i=t.subtype;if(null!=akeebabackup.Configuration.engines[i]){var r=e.substr(4,e.length-5),s=document.createElement("div");s.id=r+"_config",s.className="akeeba-engine-options";var c=document.createElement("select");c.className="form-select",c.id=e,c.setAttribute("name",e);var d=akeebabackup.Configuration.engines[i];for(var l in d)if(d.hasOwnProperty(l)){var u=d[l],p=document.createElement("option");p.value=l,p.innerHTML=u.information.title,t.default==l&&p.setAttribute("selected","selected"),c.appendChild(p)}akeebabackup.System.addEventListener(c,"change",function(e){for(var t={},n=[document.getElementById(r+"_config").querySelectorAll("input"),document.getElementById(r+"_config").querySelectorAll("select")],a=null,o=null,d=null,l=0;l<n.length;l++)if((a=n[l]).length)for(g=0;g<a.length;g++)t[d=(o=a[g]).id]=o.value,"checkbox"===o.getAttribute("type")||"radio"===o.getAttribute("type")?t[d]=o.checked:"select"===o.getAttribute("type")&&(t[d]=o.options[o.selectedIndex].value);var u=c.value,p=akeebabackup.Configuration.engines[i][u],m={};m[p.information.title]=p.parameters,akeebabackup.Configuration.parseGuiData(m,s);var b=s.querySelector("div.card-body");for(b instanceof Element&&b.insertAdjacentHTML("afterbegin",'<p class="alert alert-info">'+p.information.description+"</p>"),n=[document.getElementById(r+"_config").querySelectorAll("input"),document.getElementById(r+"_config").querySelectorAll("select")],l=0;l<n.length;l++)if((a=n[l]).length)for(var g=0;g<a.length;g++){var f=t[d=(o=a[g]).id];null!=f&&("checkbox"===o.getAttribute("type")||"radio"===o.getAttribute("type")?f?o.setAttribute("checked","checked"):o.removeAttribute("checked"):o.value=f,1===l&&akeebabackup.System.triggerEvent(o,"change"))}akeebabackup.Configuration.initialisePopovers(),void 0!==p.information.activation_callback&&window[p.information.activation_callback](p.parameters)});var m=document.createElement("button");m.className="btn btn-secondary btn-sm";var b=document.createElement("span");b.className="fa fa-wrench",m.appendChild(b);var g=document.createElement("span");g.innerHTML=Joomla.Text._("COM_AKEEBABACKUP_CONFIG_UI_CONFIG"),m.appendChild(g),akeebabackup.System.addEventListener(m,"click",function(e){e.preventDefault(),new bootstrap.Collapse(s).toggle()});var f=document.createElement("div");f.className="input-group",f.appendChild(c),n.appendChild(f),n.appendChild(s),a.appendChild(n),akeebabackup.System.triggerEvent(c,"change")}},renderOptionTypeBrowsedir:function(e,t,n,a,o){var i=document.createElement("input");i.className="form-control",i.setAttribute("type","text"),i.setAttribute("name",e),i.setAttribute("size","30"),i.id=e,i.value=t.default;var r=document.createElement("button");r.className="btn btn-secondary",r.setAttribute("title",Joomla.Text._("COM_AKEEBABACKUP_CONFIG_UI_BROWSE"));var s=document.createElement("span");s.className="fa fa-folder-open",r.appendChild(s),akeebabackup.System.addEventListener(r,"click",function(e){return e.preventDefault(),null!=akeebabackup.Configuration.onBrowser&&akeebabackup.Configuration.onBrowser(i.value,i),!1});var c=document.createElement("div");c.className="input-group",c.appendChild(i),c.appendChild(r),n.appendChild(c),a.appendChild(n)},renderOptionTypeEnum:function(e,t,n,a,o){var i=document.createElement("select");i.className="form-select akeeba-configuration-select-enum",i.id=e,i.setAttribute("name",e);for(var r=t.enumvalues.split("|"),s=t.enumkeys.split("|"),c=0;c<r.length;c++){var d=r[c],l=s[c],u=document.createElement("option");u.value=d,u.innerHTML=l,d===t.default&&u.setAttribute("selected","selected"),i.appendChild(u)}void 0!==t.onchange&&akeebabackup.System.addEventListener(i,"change",function(){(0,t.onchange)(i)}),n.appendChild(i),a.appendChild(n)},renderOptionTypeString:function(e,t,n,a,o){var i=document.createElement("input");i.className="form-control akeeba-configuration-string",i.setAttribute("type","text"),i.id=e,i.setAttribute("name",e),i.value=t.default,n.appendChild(i),a.appendChild(n)},renderOptionTypePassword:function(e,t,n,a,o){akeebabackup.Configuration.passwordFields[e]=t.default;var i=document.createElement("input");i.className="form-control akeeba-configuration-password",i.setAttribute("type","password"),i.id=e,i.setAttribute("name",e),i.setAttribute("size",40),i.value=t.default,i.setAttribute("autocomplete","off"),n.appendChild(i),a.appendChild(n)},renderOptionTypeInteger:function(e,t,n,a,o){var i=e.substr(4,e.length-5),r=document.createElement("input");r.id=i,r.setAttribute("name",e),r.setAttribute("type","hidden"),r.value=t.default;var s=t.min/t.scale,c=t.max/t.scale,d=1/t.scale;t.scale>1?(s=s.toFixed(2),c=c.toFixed(2),d=d.toFixed(2)):(s=Math.trunc(s),c=Math.trunc(c),d=Math.trunc(d));var l=document.createElement("input");l.className="form-control",l.setAttribute("type","number"),l.id=i+"_custom",l.style.display="none",l.setAttribute("min",s),l.setAttribute("max",c),l.setAttribute("step",d);var u=function(){var e=parseFloat(l.value);(e*=t.scale)<t.min?e=t.min:e>t.max&&(e=t.max),r.value=e;var n=e/t.scale;t.scale>1?l.value=n.toFixed(2):l.value=Math.trunc(n)};akeebabackup.System.addEventListener(l,"change",u),akeebabackup.System.addEventListener(l,"blur",u);var p=document.createElement("select");p.id=i+"_dropdown",p.setAttribute("name",i+"_dropdown"),p.className="form-select";for(var m=t.shortcuts.split("|"),b=t.scale,g=!1,f=0;f<m.length;f++){var v=m[f],k=v/b,_=document.createElement("option");_.value=v,_.innerHTML=b>1?k.toFixed(2):Math.trunc(k),v==t.default&&(_.setAttribute("selected","selected"),g=!0),p.appendChild(_)}var y=document.createElement("option");y.value=-1,y.innerHTML=Joomla.Text._("COM_AKEEBABACKUP_CONFIG_UI_CUSTOM"),g||(y.setAttribute("selected","selected"),l.value=(t.default/t.scale).toFixed(2),l.style.display="block"),p.appendChild(y),akeebabackup.System.addEventListener(p,"change",function(){var e=p.value;if("-1"===e)return l.value=(t.default/t.scale).toFixed(2),l.style.display="block",void akeebabackup.System.triggerEvent(l,"focus");r.value=e,l.style.display="none"});var h=document.createElement("div");h.className="input-group";var C=t.uom;if(h.appendChild(p),h.appendChild(l),"string"==typeof C&&0!==C.length){var E=document.createElement("span");E.className="input-group-text",E.textContent=C,h.appendChild(E)}n.appendChild(h),n.appendChild(r),a.appendChild(n)},renderOptionTypeBool:function(e,t,n,a,o){var i=e.match(/[a-z0-9]/gi).join(""),r=document.createElement("div");r.className="btn-group",r.setAttribute("role","group");var s=document.createElement("input");s.type="radio",s.className="btn-check",s.name=e,s.setAttribute("autocomplete","off"),s.id=i+"_1",s.value="1";var c=document.createElement("label");c.className="btn btn-outline-success",c.setAttribute("for",i+"_1"),c.innerText=Joomla.Text._("JYES");var d=document.createElement("input");d.type="radio",d.className="btn-check",d.name=e,d.setAttribute("autocomplete","off"),d.id=i+"_0",d.value=0;var l=document.createElement("label");l.className="btn btn-outline-danger",l.setAttribute("for",i+"_0"),l.innerText=Joomla.Text._("JNO"),0!=t.default?s.setAttribute("checked","checked"):d.setAttribute("checked","checked"),r.appendChild(s),r.appendChild(c),r.appendChild(d),r.appendChild(l),n.appendChild(r),a.appendChild(n)},renderOptionTypeButton:function(e,t,n,a,o){var i=a.querySelector("label"),r=t.hook,s=i.innerHTML,c=document.createElement("button");c.id=e,c.innerHTML=s,c.className="btn btn-secondary",i.innerHTML="&nbsp;",akeebabackup.System.addEventListener(c,"click",function(e){e.preventDefault();try{window[r]()}catch(e){}}),n.appendChild(c),a.appendChild(n)},renderOptionTypeUnknown:function(e,t,n,a,o){var i=e.substr(4,e.length-5),r="akeeba_render_"+t.type,s=window[r];if("function"==typeof s)s(i,t,label,a);else try{window[r](i,t,label,a)}catch(e){}}},engines:{},installers:{},URLs:{},FtpTest:{testConnection:function(e,t,n){var a=document.getElementById("var["+e+"]");if(akeebabackup.Configuration.FtpTest.buttonKey="var["+e+"]",null===a&&(a=document.getElementById(e),akeebabackup.Configuration.FtpTest.buttonKey=e),null!==a){a.setAttribute("disabled","disabled");var o={};try{var i="var["+t+".ftps]",r="var["+t+".passive_mode]";o={isCurl:n?1:0,host:document.getElementById("var["+t+".host]").value,port:document.getElementById("var["+t+".port]").value,user:document.getElementById("var["+t+".user]").value,pass:document.getElementById("var["+t+".pass]").value,initdir:document.getElementById("var["+t+".initial_directory]").value,usessl:document.querySelector('input[name="'+i+'"]:checked').value,passive:document.querySelector('input[name="'+r+'"]:checked').value,passive_mode_workaround:0}}catch(e){o={isCurl:n?1:0,host:document.getElementById(t+"_host").value,port:document.getElementById(t+"_port").value,user:document.getElementById(t+"_user").value,pass:document.getElementById(t+"_pass").value,initdir:document.getElementById(t+"_initial_directory").value,usessl:document.getElementById(t+"_ftps").checked,passive:document.getElementById(t+"_passive_mode").checked,passive_mode_workaround:0}}if(n)try{o.passive_mode_workaround=document.querySelector('input[name="var['+t+'.passive_mode_workaround]"]:checked').value}catch(e){o.passive_mode_workaround=document.getElementById(t+"_passive_mode_workaround").checked}akeebabackup.System.params.AjaxURL=akeebabackup.Configuration.URLs.testFtp,akeebabackup.System.doAjax(o,function(e){document.getElementById(akeebabackup.Configuration.FtpTest.buttonKey).removeAttribute("disabled");var t=document.getElementById("testFtpDialogBodyOk"),n=document.getElementById("testFtpDialogBodyFail"),a=document.getElementById("testFtpDialogLabel");t.style.display="none",n.style.display="none",!0===e?.status?(a.textContent=Joomla.Text._("COM_AKEEBABACKUP_CONFIG_DIRECTFTP_TEST_OK"),t.textContent=Joomla.Text._("COM_AKEEBABACKUP_CONFIG_DIRECTFTP_TEST_OK"),t.style.display="block",n.style.display="none"):(a.textContent=Joomla.Text._("COM_AKEEBABACKUP_CONFIG_DIRECTFTP_TEST_FAIL"),n.textContent=e?.status??"???",t.style.display="none",n.style.display="block"),new bootstrap.Modal(document.getElementById("testFtpDialog"),{keyboard:!0,backdrop:!0}).show()},null,!1,15e3)}else console.warn("Button "+akeebabackup.Configuration.FtpTest.buttonKey+" not found")}},SftpTest:{testConnection:function(e,t,n){var a=document.getElementById("var["+e+"]");akeebabackup.Configuration.SftpTest.buttonKey="var["+e+"]",a.setAttribute("disabled","disabled");var o={isCurl:n?1:0,host:document.getElementById("var["+t+".host]").value,port:document.getElementById("var["+t+".port]").value,user:document.getElementById("var["+t+".user]").value,pass:document.getElementById("var["+t+".pass]").value,initdir:document.getElementById("var["+t+".initial_directory]").value,privkey:document.getElementById("var["+t+".privkey]").value,pubkey:document.getElementById("var["+t+".pubkey]").value};akeebabackup.System.params.AjaxURL=akeebabackup.Configuration.URLs.testSftp,akeebabackup.System.doAjax(o,function(e){document.getElementById(akeebabackup.Configuration.SftpTest.buttonKey).removeAttribute("disabled");var t=document.getElementById("testFtpDialogBodyOk"),n=document.getElementById("testFtpDialogBodyFail"),a=document.getElementById("testFtpDialogLabel");t.style.display="none",n.style.display="none",!0===e?.status?(a.textContent=Joomla.Text._("COM_AKEEBABACKUP_CONFIG_DIRECTSFTP_TEST_OK"),t.textContent=Joomla.Text._("COM_AKEEBABACKUP_CONFIG_DIRECTSFTP_TEST_OK"),t.style.display="block",n.style.display="none"):(a.textContent=Joomla.Text._("COM_AKEEBABACKUP_CONFIG_DIRECTSFTP_TEST_FAIL"),n.textContent=e?.status??"???",t.style.display="none",n.style.display="block"),new bootstrap.Modal(document.getElementById("testFtpDialog"),{keyboard:!0,backdrop:!0}).show()},null,!1,15e3)}},FtpModal:null,passwordFields:{},fsBrowser:{params:{dialogId:"folderBrowserDialog",dialogBodyId:"folderBrowserDialogBody"},modalObject:null},parseConfigData:function(e){akeebabackup.Configuration.engines=e.engines,akeebabackup.Configuration.installers=e.installers,akeebabackup.Configuration.parseGuiData(e.gui)},restoreDefaultPasswords:function(){for(var e in akeebabackup.Configuration.passwordFields)if(akeebabackup.Configuration.passwordFields.hasOwnProperty(e)){var t=akeebabackup.Configuration.passwordFields[e],n=document.getElementById(e);n&&(n.value="WORKAROUND FOR NAUGHTY BROWSERS",n.value=t)}},onBrowser:function(e,t){akeebabackup.Configuration.onBrowserCallback=function(e){t.value=e,"object"==typeof akeebabackup.Configuration.fsBrowser.modalObject&&akeebabackup.Configuration.fsBrowser.modalObject.close?akeebabackup.Configuration.fsBrowser.modalObject.close():"object"==typeof akeebabackup.Configuration.fsBrowser.modalObject&&akeebabackup.Configuration.fsBrowser.modalObject.hide&&akeebabackup.Configuration.fsBrowser.modalObject.hide()};var n=akeebabackup.Configuration.URLs.browser+encodeURIComponent(e),a=document.getElementById(akeebabackup.Configuration.fsBrowser.params.dialogBodyId);a.innerHTML="";var o=document.createElement("iframe");o.setAttribute("src",n),o.setAttribute("width","100%"),o.setAttribute("height",400),o.setAttribute("frameborder",0),o.setAttribute("allowtransparency","true"),a.appendChild(o),akeebabackup.Configuration.fsBrowser.modalObject=new bootstrap.Modal(document.getElementById(akeebabackup.Configuration.fsBrowser.params.dialogId),{keyboard:!1,backdrop:"static"}),akeebabackup.Configuration.fsBrowser.modalObject.show()},parseGuiData:function(e,t){null==t&&(t=document.getElementById("akeebagui")),t.innerHTML="";var n=0;for(var a in e)if(e.hasOwnProperty(a)){var o=e[a];if(n++,o){var i=document.createElement("div");i.className="card mt-3 rounded-top",t.appendChild(i);var r=document.createElement("h3");r.className="card-header",r.innerHTML=a,r.id="auigrp_"+t.id+"_"+n,i.appendChild(r);var s=document.createElement("div");for(var c in s.className="card-body",i.appendChild(s),o)if(o.hasOwnProperty(c)){var d=o[c],l="var["+c+"]",u=d.showon??null,p=document.createElement("div");p.className="row mb-3",p.id="akconfigrow."+c,u&&(p.dataset.showon=JSON.stringify(u)),"hidden"!=d.type&&"none"!=d.type&&s.appendChild(p),akeebabackup.Configuration.GUI.renderOptionLabel(l,d,p);var m=document.createElement("div");m.className="col-sm-9";var b="renderOptionType"+(d.type[0].toUpperCase()+d.type.slice(1));"function"==typeof akeebabackup.Configuration.GUI[b]?akeebabackup.Configuration.GUI[b](l,d,m,p,s):akeebabackup.Configuration.GUI.renderOptionTypeUnknown(l,d,m,p,s)}}}Joomla.Showon.initialise(t)},onChangeScriptType:function(e){for(var t=e.options[e.selectedIndex].value,n="joomla"===t?"angie":"angie-"+t,a=document.getElementById("var[akeeba.advanced.embedded_installer]"),o=a.children,i=0;i<o.length;i++){if(o[i].value===n)return void(a.value=n)}},initialisePopovers:function(){var e=Joomla.getOptions("bootstrap.popover");"object"==typeof e&&null!==e&&Object.keys(e).forEach(function(t){var n=e[t],a={animation:!n.animation||n.animation,container:!!n.container&&n.container,delay:n.delay?n.delay:0,html:!!n.html&&n.html,placement:n.placement?n.placement:"top",selector:!!n.selector&&n.selector,trigger:n.trigger?n.trigger:"click",offset:n.offset?n.offset:0,fallbackPlacement:n.fallbackPlacement?n.fallbackPlacement:"flip",boundary:n.boundary?n.boundary:"scrollParent",customClass:n.customClass?n.customClass:"",sanitize:!n.sanitize||n.sanitize,sanitizeFn:n.sanitizeFn?n.sanitizeFn:null,popperConfig:n.popperConfig?n.popperConfig:null};n.template&&(a.template=n.template),n.allowList&&(a.allowList=n.allowList);var o=Array.from(document.querySelectorAll(t));o.length&&o.map(function(e){new window.bootstrap.Popover(e,a)})})},onFormSubmit:e=>{const t=document.getElementById("adminForm");if(!t||void 0===window.FormData||void 0===Object.fromEntries||void 0===JSON.stringify)return!0;e.preventDefault(),akeebabackup.Configuration.submitJsonForm(JSON.stringify(Object.fromEntries(new FormData(t))))},submitJsonForm:async function(e){const t=new FormData;t.set("jsonForm",e),t.set(Joomla.getOptions("csrf.token"),1),t.set("task",document.forms.adminForm.task.value);let n=null;try{const e=await fetch(document.forms.adminForm.action,{method:"POST",body:t});if(e.redirected&&(n=e.url),!e.ok)throw new Error("Error found in network response")}catch(e){return void location.reload()}n?window.location=n:location.reload()}}),akeebabackup.System.documentReady(function(){akeebabackup.Configuration.URLs=Joomla.getOptions("akeebabackup.Configuration.URLs",{}),void 0!==akeebabackup.Configuration.URLs.dpecustomapi&&(akeebabackup.System.params.AjaxURL=akeebabackup.Configuration.URLs.dpecustomapi),null!==Joomla.getOptions("akeebabackup.Configuration.GUIData",null)&&setTimeout(function(){setTimeout(akeebabackup.Configuration.restoreDefaultPasswords,1e3),akeebabackup.Configuration.parseConfigData(Joomla.getOptions("akeebabackup.Configuration.GUIData",{})),akeebabackup.Configuration.initialisePopovers(),akeeba_googledrive_refreshdrives(akeebabackup.Configuration.engines.postproc.googledrive.parameters),akeeba_onedrivebusiness_refreshdrives(akeebabackup.Configuration.engines.postproc.onedrivebusiness.parameters);const e=document.getElementById("adminForm");e&&e.addEventListener("submit",akeebabackup.Configuration.onFormSubmit)},10)});
//# sourceMappingURL=Configuration.min.js.map