CoreFiles by mySites.guru
core.min.js1 lines, 12,281 bytes, from Joomla_4.0.0-alpha9-Alpha-Full_Package.zip
Raw History Compare with 4.0.0-alpha8
md5
65aebe8bd09b03035945eb9480f08b19
sha1
a4cb6ce94fd4106e0097066a85639d73c16b2a88
sha256
9ac2bb7c9da4b2e6e2ede67e9d42d3fd969f27dc96ad06f8ddfb503436a13675
function _typeof(a){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&&"function"==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},_typeof(a)}(function(){if("function"==typeof window.CustomEvent)return!1;var a=function(a,b){var c=document.createEvent("CustomEvent"),d=b||{bubbles:!1,cancelable:!1,detail:void 0};return c.initCustomEvent(a,d.bubbles,d.cancelable,d.detail),c};return a.prototype=window.Event.prototype,window.CustomEvent=a,!0})(),window.Joomla=window.Joomla||{},window.Joomla.editors=window.Joomla.editors||{},window.Joomla.editors.instances=window.Joomla.editors.instances||{},window.Joomla.Modal=window.Joomla.Modal||{current:"",setCurrent:function setCurrent(a){window.Joomla.current=a},getCurrent:function getCurrent(){return window.Joomla.current}},function(a,b){'use strict';a.submitform=function(a,c,d){var e=c,f=a;e||(e=b.getElementById("adminForm")),f&&(e.task.value=f),e.noValidate=!d,d?e.hasAttribute("novalidate")&&e.removeAttribute("novalidate"):e.setAttribute("novalidate","");var g=b.createElement("input");g.style.display="none",g.type="submit",e.appendChild(g).click(),e.removeChild(g)},a.submitbutton=function(c,d,e){var f=b.querySelector(d||"form.form-validate"),g=e;if("string"==typeof d&&null===f&&(f=b.querySelector("#".concat(d))),f){if(void 0===g||null===g){var h=c.split("."),i=f.getAttribute("data-cancel-task");i||(i="".concat(h[0],".cancel")),g=c!==i}(!g||b.formvalidator.isValid(f))&&a.submitform(c,f)}else a.submitform(c)},a.Text={strings:{},_:function _(b,c){var d=b,e=c,f=a.getOptions("joomla.jtext");return f&&(a.Text.load(f),a.loadOptions({"joomla.jtext":null})),e=void 0===e?"":e,d=d.toUpperCase(),void 0===a.Text.strings[d]?e:a.Text.strings[d]},load:function load(b){return[].slice.call(Object.keys(b)).forEach(function(c){a.Text.strings[c.toUpperCase()]=b[c]}),a.Text}},a.JText=a.Text,a.optionsStorage=a.optionsStorage||null,a.getOptions=function(b,c){return a.optionsStorage||a.loadOptions(),void 0===a.optionsStorage[b]?c:a.optionsStorage[b]},a.loadOptions=function(c){if(!c){var d=[].slice.call(b.querySelectorAll(".joomla-script-options.new")),e=0;if(d.forEach(function(b){var c=b.text||b.textContent,d=JSON.parse(c);d&&(a.loadOptions(d),e+=1),b.className=b.className.replace(" new"," loaded")}),e)return}a.optionsStorage?c&&[].slice.call(Object.keys(c)).forEach(function(b){a.optionsStorage[b]=null!==c[b]&&"object"===_typeof(a.optionsStorage[b])&&"object"===_typeof(c[b])?a.extend(a.optionsStorage[b],c[b]):c[b]}):a.optionsStorage=c||{}},a.replaceTokens=function(a){if(/^[0-9A-F]{32}$/i.test(a)){var c=[].slice.call(b.getElementsByTagName("input"));c.forEach(function(b){"hidden"===b.type&&"1"===b.value&&32===b.name.length&&(b.name=a)})}},a.checkAll=function(b,c){if(!b.form)return!1;var d=[].slice.call(b.form.elements),e=0;return d.forEach(function(a){a.type===b.type&&0===a.id.indexOf(c||"cb")&&(a.checked=b.checked,e+=a.checked?1:0)}),b.form.boxchecked&&(b.form.boxchecked.value=e,a.Event.dispatch(b.form.boxchecked,"change")),!0},a.renderMessages=function(c,d,e,f){var g,h,i,j,k,l,m;g="undefined"==typeof d||d&&"#system-message-container"===d?b.getElementById("system-message-container"):b.querySelector(d),("undefined"==typeof e||e&&!1===e)&&a.removeMessages(g),[].slice.call(Object.keys(c)).forEach(function(d){if(h=c[d],"object"===_typeof(window.customElements)&&"function"==typeof window.customElements.get("joomla-alert"))i=b.createElement("joomla-alert"),-1<["notice","message","error","warning"].indexOf(d)?(m="notice"===d?"info":d,m="message"===d?"success":m,m="error"===d?"danger":m,m="warning"===d?"warning":m):m="info",i.setAttribute("type",m),i.setAttribute("dismiss","true"),f&&0<parseInt(f,10)&&i.setAttribute("autodismiss",f);else{i=b.createElement("div"),-1<["notice","message","error","warning"].indexOf(d)?(m="notice"===d?"info":d,m="message"===d?"success":m,m="error"===d?"danger":m,m="warning"===d?"warning":m):m="info",i.className="alert alert-".concat(m);var e=b.createElement("button");e.setAttribute("type","button"),e.setAttribute("data-dismiss","alert"),e.className="close",e.innerHTML="\xD7",i.appendChild(e)}j=a.Text._(d),"undefined"!=typeof j&&(k=b.createElement("h4"),k.className="alert-heading",k.innerHTML=a.Text._(d)?a.Text._(d):d,i.appendChild(k)),h.forEach(function(a){l=b.createElement("div"),l.innerHTML=a,i.appendChild(l)}),g.appendChild(i),"object"!==_typeof(window.customElements)&&"function"!=typeof window.customElements.get("joomla-alert")&&f&&0<parseInt(f,10)&&setTimeout(function(){a.removeMessages(g)},f)})},a.removeMessages=function(a){var c;if(c=a?a:b.getElementById("system-message-container"),"object"===_typeof(window.customElements)&&window.customElements.get("joomla-alert")){var d=[].slice.call(c.querySelectorAll("joomla-alert"));d.length&&d.forEach(function(a){a.close()})}else{for(;c.firstChild;)c.removeChild(c.firstChild);c.style.display="none",delete c.offsetHeight,c.style.display=""}},a.ajaxErrorsMessages=function(b,c){var d={};if("parsererror"===c){for(var e=[],f=b.responseText.trim(),g=f.length-1;0<=g;g--)e.unshift(["&#",f[g].charCodeAt(),";"].join(""));f=e.join(""),d.error=[a.Text._("JLIB_JS_AJAX_ERROR_PARSE").replace("%s",f)]}else d.error="nocontent"===c?[a.Text._("JLIB_JS_AJAX_ERROR_NO_CONTENT")]:"timeout"===c?[a.Text._("JLIB_JS_AJAX_ERROR_TIMEOUT")]:"abort"===c?[a.Text._("JLIB_JS_AJAX_ERROR_CONNECTION_ABORT")]:b.responseJSON&&b.responseJSON.message?["".concat(a.Text._("JLIB_JS_AJAX_ERROR_OTHER").replace("%s",b.status)," <em>").concat(b.responseJSON.message,"</em>")]:b.statusText?["".concat(a.Text._("JLIB_JS_AJAX_ERROR_OTHER").replace("%s",b.status)," <em>").concat(b.statusText,"</em>")]:[a.Text._("JLIB_JS_AJAX_ERROR_OTHER").replace("%s",b.status)];return d},a.isChecked=function(d,f){var g=f;if("undefined"==typeof g?g=b.getElementById("adminForm"):"string"==typeof f&&(g=b.getElementById(f)),g.boxchecked.value=d?parseInt(g.boxchecked.value,10)+1:parseInt(g.boxchecked.value,10)-1,a.Event.dispatch(g.boxchecked,"change"),!!g.elements["checkall-toggle"]){var h,j,k,l=!0;for(h=0,k=g.elements.length;h<k;h++)if(j=g.elements[h],"checkbox"===j.type&&"checkall-toggle"!==j.name&&!j.checked){l=!1;break}g.elements["checkall-toggle"].checked=l}},a.tableOrdering=function(c,d,e,f){var g=f;"undefined"==typeof g?g=b.getElementById("adminForm"):"string"==typeof f&&(g=b.getElementById(f)),g.filter_order.value=c,g.filter_order_Dir.value=d,a.submitform(e,g)},a.listItemTask=function(c,d){var e=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null,f=e;f=null===e?b.adminForm:b.getElementById(e);var g,h=f[c],j=0;if(!h)return!1;for(;g=f["cb".concat(j)],!!g;)g.checked=!1,j+=1;return h.checked=!0,f.boxchecked.value=1,a.submitform(d,f),!1},a.loadingLayer=function(c,d){var e=c||"show",f=d||b.body;if("load"===e){if(b.getElementById("loading-logo"))return!1;var g=a.getOptions("system.paths")||{},h=g.root||"",i=b.createElement("div");i.id="loading-logo",i.style.position="fixed",i.style.top="0",i.style.left="0",i.style.width="100%",i.style.height="100%",i.style.opacity="0.8",i.style.filter="alpha(opacity=80)",i.style.overflow="hidden",i.style["z-index"]="10000",i.style.display="none",i.style["background-color"]="#fff",i.style["background-image"]="url(\"".concat(h,"/media/system/images/ajax-loader.gif\")"),i.style["background-position"]="center",i.style["background-repeat"]="no-repeat",i.style["background-attachment"]="fixed",f.appendChild(i)}else b.getElementById("loading-logo")||a.loadingLayer("load",f),b.getElementById("loading-logo").style.display="show"===e?"block":"none";return b.getElementById("loading-logo")},a.extend=function(a,b){var c=a;return null===a&&(c={}),[].slice.call(Object.keys(b)).forEach(function(a){c[a]=b[a]}),a},a.request=function(b){var c,d=a.extend({url:"",method:"GET",data:null,perform:!0},b);try{if(c=new XMLHttpRequest,c.open(d.method,d.url,!0),c.setRequestHeader("X-Requested-With","XMLHttpRequest"),c.setRequestHeader("X-Ajax-Engine","Joomla!"),"GET"!==d.method){var e=a.getOptions("csrf.token","");e&&c.setRequestHeader("X-CSRF-Token",e),d.headers&&d.headers["Content-Type"]||c.setRequestHeader("Content-Type","application/x-www-form-urlencoded")}if(d.headers&&[].slice.call(Object.keys(d.headers)).forEach(function(a){"Content-Type"===a&&"false"===d.headers["Content-Type"]||c.setRequestHeader(a,d.headers[a])}),c.onreadystatechange=function(){4!==c.readyState||(200===c.status?d.onSuccess&&d.onSuccess.call(window,c.responseText,c):d.onError&&d.onError.call(window,c))},d.perform){if(d.onBefore&&!1===d.onBefore.call(window,c))return c;c.send(d.data)}}catch(a){return window.console?console.log(a):null,!1}return c},a.loadChangelog=function(c,d){a.request({url:"index.php?option=com_installer&task=manage.loadChangelog&eid=".concat(c,"&source=").concat(d,"&format=json"),onSuccess:function onSuccess(a){var d=JSON.parse(a);b.querySelectorAll("#changelogModal".concat(c," .modal-body"))[0].innerHTML=d.data}})},a.WebComponents=function(){var c=a.getOptions("webcomponents");if(c&&c.length){var d,e=!1,f=[],g=!1,h=function(){window.WebComponents.ready=!0,b.dispatchEvent(new CustomEvent("WebComponentsReady",{bubbles:!0})),n()},i=function(){window.customElements&&customElements.polyfillWrapFlushCallback&&customElements.polyfillWrapFlushCallback(function(a){d=a,g&&d()})},j=function(){i(),k()},k=function(){window.HTMLTemplateElement&&HTMLTemplateElement.bootstrap&&HTMLTemplateElement.bootstrap(window.document),e=!0,l().then(h)},l=function(){g=!1;var a=function(){g=!0,f.length=0,d&&d()};return Promise.all(f.map(function(a){return a instanceof Function?a():a})).then(function(){a()}).catch(function(a){console.error(a)})};window.WebComponents=window.WebComponents||{ready:!1,_batchCustomElements:i,waitFor:function waitFor(a){a&&(f.push(a),e&&l())}};var m=function(){try{return new Function("(a = 0) => a"),!0}catch(a){return!1}},n=function(){c&&c.length&&c.forEach(function(a){var c;if(a.match(/\.js/g))if(c=b.createElement("script"),!m()){var d;a.match(/\.min\.js/g)?d=a.replace(/\.min\.js/g,"-es5.min.js"):a.match(/\.js/g)&&(d=a.replace(/\.js/g,"-es5.js")),c.src=d}else c.src=a;c&&b.head.appendChild(c)})},o="core.min.js",p=b.querySelector("script[src*=\"".concat(o,"\"]"));if(p||(o="core.js",p=b.querySelector("script[src*=\"".concat(o,"\"]"))),!p)throw new Error("core(.min).js is not registered correctly!");var q=[];(!("attachShadow"in Element.prototype&&"getRootNode"in Element.prototype)||window.ShadyDOM&&window.ShadyDOM.force)&&q.push("sd"),(!window.customElements||window.customElements.forcePolyfill)&&q.push("ce");var r=function(){var a=b.createElement("template");if(!("content"in a))return!0;if(!(a.content.cloneNode()instanceof DocumentFragment))return!0;var c=b.createElement("template");c.content.appendChild(b.createElement("div")),a.content.appendChild(c);var d=a.cloneNode(!0);return 0===d.content.childNodes.length||0===d.content.firstChild.content.childNodes.length}();if(window.Promise&&Array.from&&window.URL&&window.Symbol&&!r||(q=["sd-ce-pf"]),q.length){var s=b.createElement("script"),t="media/vendor/webcomponentsjs/js/webcomponents-".concat(q.join("-"),".min.js"),u=p.src.match(/\?.*/),v=a.getOptions("system.paths");if(!v)throw new Error("core(.min).js is not registered correctly!");s.src=v.rootFull+t+(u?u[0]:""),"loading"===b.readyState?(s.setAttribute("onload","window.WebComponents._batchCustomElements()"),b.write(s.outerHTML),b.addEventListener("DOMContentLoaded",k)):(s.addEventListener("load",j),s.addEventListener("error",function(){throw new Error("Could not load polyfill bundle".concat(v.rootFull+t))}),b.head.appendChild(s))}else e=!0,"complete"===b.readyState?h():(window.addEventListener("load",k),window.addEventListener("DOMContentLoaded",function(){window.removeEventListener("load",k),k()}))}}}(Joomla,document),function(a,b){'use strict';b.Event||(b.Event={},b.Event.dispatch=function(b,c,d){var e=b,f=c,g=d;"string"==typeof b&&(g=c,f=b,e=a),g=g||{},e.dispatchEvent(new CustomEvent(f,{detail:g,bubbles:!0,cancelable:!0}))},b.Event.listenOnce=function(a,b,c){var d=function(e){return a.removeEventListener(b,d),c.call(a,e)};a.addEventListener(b,d)})}(window,Joomla),document.addEventListener("DOMContentLoaded",Joomla.WebComponents);

No other release has this exact content. See every version of this file.