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/System.min.js

"use strict";window.akeebabackup=window.akeebabackup||{},window.akeebabackup.Ajax=window.akeebabackup.Ajax||{xhrSuccessStatus:{0:200,1223:204},requestArray:[],processingQueue:!1,ajax:function(e,a){void 0===a&&(e=(a=e).url);var t=void 0===a.type?"POST":a.type;t=t.toUpperCase();var n=void 0===a.data?{}:a.data,r=null,o=void 0===a.success?null:a.success,s=void 0===a.error?null:a.error;if(!(void 0!==a.cache&&a.url)){var i=(new Date).getTime()/1e3,u=parseInt(i,10);n._cacheBustingJunk=Math.round(1e3*(i-u))/1e3}"POST"===t||"PUT"===t?r=this.interpolateParameters(n):(e+=-1===e.indexOf("?")?"?":"&",e+=this.interpolateParameters(n));var c=new XMLHttpRequest;c.open(t,e),"POST"!==t&&"PUT"!==t||c.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),c.onload=function(e){var a=akeebabackup.Ajax.xhrSuccessStatus[c.status]||c.status,t=c.statusText,n="text"!==(c.responseType||"text")||"string"!=typeof c.responseText?c.response:c.responseText;c.getAllResponseHeaders();200!==a?s&&akeebabackup.Ajax.triggerCallbacks(s,c,"error",null):null!=o&&akeebabackup.Ajax.triggerCallbacks(o,n,t,c)},c.onerror=function(e){s&&akeebabackup.Ajax.triggerCallbacks(s,c,"error",null)},window.attachEvent&&!window.addEventListener&&(c.onreadystatechange=function(){if(4===this.readyState){var e=akeebabackup.Ajax.xhrSuccessStatus[this.status]||this.status;e>=200&&e<400?c.onload():c.onerror()}}),c.ontimeout=function(){s&&akeebabackup.Ajax.triggerCallbacks(s,c,"timeout",null)},c.onabort=function(){s&&akeebabackup.Ajax.triggerCallbacks(s,c,"abort",null)};var b=void 0===a.timeout?6e5:a.timeout;b>0&&(c.timeout=b),void 0!==a.beforeSend&&!1===a.beforeSend(c,a)||c.send(r)},enqueue:function(e,a){void 0===a&&(e=(a=e).url),a.url=e,akeebabackup.Ajax.requestArray.push(a),akeebabackup.Ajax.processQueue()},interpolateParameters:function(e,a){a=a||"";var t="";for(var n in e)if(e.hasOwnProperty(n)){if(t.length>0&&(t+="&"),"object"!=typeof e[n]){t+=""===a?encodeURIComponent(n)+"="+encodeURIComponent(e[n]):encodeURIComponent(a)+"["+encodeURIComponent(n)+"]="+encodeURIComponent(e[n]);continue}t+=akeebabackup.Ajax.interpolateParameters(e[n],n)}return t},triggerCallbacks:function(){var e=Array.prototype.slice.call(arguments),a=e.shift();if("function"==typeof a)return a.apply(null,e);if(a instanceof Array)for(var t=0;t<a.length;t++){if(!1===a[t].apply(null,e))return!1}return null},processQueueHelper:function(){akeebabackup.Ajax.processingQueue=!1,setTimeout(akeebabackup.Ajax.processQueue,50)},processQueue:function(){if(akeebabackup.Ajax.requestArray.length){if(!akeebabackup.Ajax.processingQueue){var e=akeebabackup.Ajax.requestArray.shift(),a=e.url,t=void 0===e.success?[]:e.success,n=void 0===e.error?[]:e.error;"object"==typeof t&&t instanceof Array||(t=[t]),"object"==typeof n&&n instanceof Array||(n=[n]),t.unshift(akeebabackup.Ajax.processQueueHelper),n.unshift(akeebabackup.Ajax.processQueueHelper),e.success=t,e.error=n,akeebabackup.Ajax.processingQueue=!0,akeebabackup.Ajax.ajax(a,e)}}else akeebabackup.Ajax.processingQueue=!1}},void 0===akeebabackup.System&&(akeebabackup.System={notification:{hasDesktopNotification:!1,iconURL:"",askPermission:function(){Joomla.getOptions("akeebabackup.System.notification.hasDesktopNotification",akeebabackup.System.notification.hasDesktopNotification)&&void 0!==window.Notification&&"default"===window.Notification.permission&&window.Notification.requestPermission()},notify:function(e,a,t){if(void 0!==window.Notification&&"granted"===window.Notification.permission){void 0===t&&(t=5e3),void 0===a&&(a="");var n,r=new window.Notification(e,{body:a,icon:Joomla.getOptions("akeebabackup.System.notification.iconURL",akeebabackup.System.notification.iconURL)});t>0&&setTimeout((n=r,function(){n.close()}),t)}}},params:{AjaxURL:"",errorCallback:null,password:"",errorDialogId:"errorDialog",errorDialogMessageId:"errorDialogPre"},findElement:function(e){return null==e?null:("string"==typeof e&&(e=document.getElementById(e)),"object"!=typeof e?null:e instanceof Element?e:null)},defaultErrorHandler:function(e){null!=e&&void 0!==e&&alert("An error has occurred\n"+e)},modalErrorHandler:function(e){var a=Joomla.getOptions("akeebabackup.System.params.errorDialogId",akeebabackup.System.params.errorDialogId),t=Joomla.getOptions("akeebabackup.System.params.errorDialogMessageId",akeebabackup.System.params.errorDialogMessageId),n=document.getElementById(a);null!=n&&(document.getElementById(t).innerHTML=e,n.innerHTML);new window.bootstrap.Modal(n).show()},doAjax:function(e,a,t,n,r){null==n&&(n=!0);var o=(new Date).getTime()/1e3,s=parseInt(String(o),10);e._cacheBustingJunk=Math.round(1e3*(o-s))/1e3,null==r&&(r=6e5);var i=Joomla.getOptions("akeebabackup.System.params.AjaxURL",akeebabackup.System.params.AjaxURL);e.hasOwnProperty("ajaxURL")&&(i=e.ajaxURL,delete e.url);var u=!0;e.hasOwnProperty("useTripleHash")&&(u=e.useTripleHash,delete e.useTripleHash);e.hasOwnProperty("parseResponseAsJSON")&&(e.parseResponseAsJSON,delete e.parseResponseAsJSON),null==t&&(t=Joomla.getOptions("akeebabackup.System.params.errorCallback",akeebabackup.System.params.errorCallback||akeebabackup.System.modalErrorHandler)),null==t&&(t=akeebabackup.System.defaultErrorHandler);var c={type:"POST",url:i,cache:!1,data:e,timeout:r,success:function(e){var n="";if(u){var r=e.indexOf("###");if(-1===r)return e=akeebabackup.System.sanitizeErrorMessage(e),void t(e="Invalid AJAX data: "+e)}n=e,u&&(0!==r&&(n=e.substr(r)),r=(n=n.substr(3)).lastIndexOf("###"),n=n.substr(0,r));try{var o=JSON.parse(n)}catch(a){return n=akeebabackup.System.sanitizeErrorMessage(n),e=a.message+"\n<br/>\n<pre>\n"+n+"\n</pre>",void t(e)}a(o)},error:function(e,a,n){var r=e.responseText?e.responseText:"",o="<strong>AJAX Loading Error</strong><br/>HTTP Status: "+e.status+" ("+e.statusText+")<br/>";o=(o=(o=o+"Internal status: "+a+"<br/>")+"XHR ReadyState: "+e.readyState+"<br/>")+"Raw server response:<br/>"+akeebabackup.System.sanitizeErrorMessage(r),t(o)}};n?akeebabackup.Ajax.enqueue(c):akeebabackup.Ajax.ajax(c)},sanitizeErrorMessage:function(e){if(e.indexOf("<script")>-1)try{e=(new DOMParser).parseFromString(e??"","text/html").textContent}catch(a){e="(HTML containing script tags)"}return e},addEventListener:function(e,a,t){(e=akeebabackup.System.findElement(e))&&e.addEventListener(a,t)},removeEventListener:function(e,a,t){(e=akeebabackup.System.findElement(e))&&e.removeEventListener(a,t)},triggerEvent:function(e,a){if(e=akeebabackup.System.findElement(e)){var t=null;(t=document.createEvent("Event")).initEvent(a,!0,!0),e.dispatchEvent(t)}},documentReady:function(e,a){},iterateNodes:function(e,a,t){var n,r;if("function"==typeof a&&("string"==typeof e&&(e=document.querySelectorAll(e)),0!==e.length))for(n=0;n<e.length;n++)r=e[n],void 0===t?a(r):a(r,t)},assignDefaultErrorHandler:function(){akeebabackup.System.params.errorCallback=akeebabackup.System.modalErrorHandler;var e=Joomla.getOptions("akeebabackup.System.params.errorDialogId",akeebabackup.System.params.errorDialogId),a=Joomla.getOptions("akeebabackup.System.params.errorDialogMessageId",akeebabackup.System.params.errorDialogMessageId);if(""!==e&&null!==e&&""!==a&&null!==a){var t=document.getElementById(e),n=document.getElementById(a);null!==t&&null!==n||(akeebabackup.System.params.errorCallback=akeebabackup.System.defaultErrorHandler)}else akeebabackup.System.params.errorCallback=akeebabackup.System.defaultErrorHandler},escapeHTML:function(e){return e.split("&").join("&amp;").split("<").join("&lt;").split(">").join("&gt;")},CommonEvents:{onEventSubmit:function(e){var a=e.currentTarget.dataset.akeebasubmittarget??"",t=document.forms.adminForm?document.forms.adminForm:null;return""!==a&&(t=document.getElementById(a)),!t||(t.submit(),e.preventDefault(),!1)},onClickConfirm:function(e){var a=e.currentTarget.akeebaconfirmmessage??"";return""===a||(!!confirm(Joomla.Text._(a))||(e.preventDefault(),!1))},onEventOrderTable:function(e){e.currentTarget;return e.preventDefault(),Joomla.orderTable(),!1},init:function(){akeebabackup.System.iterateNodes(".akeebaCommonEventsOnChangeSubmit",function(e){akeebabackup.System.addEventListener(e,"change",akeebabackup.System.CommonEvents.onEventSubmit)}),akeebabackup.System.iterateNodes(".akeebaCommonEventsOnClickSubmit",function(e){akeebabackup.System.addEventListener(e,"click",akeebabackup.System.CommonEvents.onEventSubmit)}),akeebabackup.System.iterateNodes(".akeebaCommonEventsOnClickConfirm",function(e){akeebabackup.System.addEventListener(e,"click",akeebabackup.System.CommonEvents.onClickConfirm)}),akeebabackup.System.iterateNodes(".akeebaCommonEventsOnChangeOrderTable",function(e){akeebabackup.System.addEventListener(e,"change",akeebabackup.System.CommonEvents.onEventOrderTable)})}}}),Math.uuid=Math.uuid||function(){var e="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split("");return function(a,t){var n=e,r=[];if(t=t||n.length,a)for(var o=0;o<a;o++)r[o]=n[0|Math.random()*t];else{var s;r[8]=r[13]=r[18]=r[23]="-",r[14]="4";for(o=0;o<36;o++)r[o]||(s=0|16*Math.random(),r[o]=n[19===o?3&s|8:s])}return r.join("")}}(),function(e,a){e=e||"documentReady",a=a||akeebabackup.System;var t=[],n=!1,r=!1;function o(){if(!n){n=!0;for(var e=0;e<t.length;e++)t[e].fn.call(window,t[e].ctx);t=[]}}function s(){"complete"===document.readyState&&o()}a[e]=function(e,a){if(n)setTimeout(function(){e(a)},1);else if(t.push({fn:e,ctx:a}),"complete"===document.readyState||!document.attachEvent&&"interactive"===document.readyState)setTimeout(o,1);else if(!r){if(r=!0,document.addEventListener)return document.addEventListener("DOMContentLoaded",o,!1),void window.addEventListener("load",o,!1);document.attachEvent("onreadystatechange",s),window.attachEvent("onload",o)}}}("documentReady",akeebabackup.System),akeebabackup.System.documentReady(function(){akeebabackup.System.assignDefaultErrorHandler(),akeebabackup.System.iterateNodes(".akeebaGridViewCheckAll",function(e){akeebabackup.System.addEventListener(e,"click",function(){Joomla.checkAll(this)})}),akeebabackup.System.iterateNodes(".akeebaGridViewOrderTable",function(e){akeebabackup.System.addEventListener(e,"change",akeebabackup.System.orderTable)}),akeebabackup.System.iterateNodes(".akeebaGridViewAutoSubmitOnChange",function(e){akeebabackup.System.addEventListener(e,"change",function(){Joomla.submitForm()})}),akeebabackup.System.CommonEvents.init()});
//# sourceMappingURL=System.min.js.map