!function(){"use strict";function t(e){return t=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},t(e)}function e(t,n){return e=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},e(t,n)}function n(t,r,i){return n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}()?Reflect.construct.bind():function(t,n,r){var i=[null];i.push.apply(i,n);var o=new(Function.bind.apply(t,i));return r&&e(o,r.prototype),o},n.apply(null,arguments)}function r(i){var o="function"==typeof Map?new Map:void 0;return r=function(r){if(null===r||(i=r,-1===Function.toString.call(i).indexOf("[native code]")))return r;var i;if("function"!=typeof r)throw new TypeError("Super expression must either be null or a function");if(void 0!==o){if(o.has(r))return o.get(r);o.set(r,c)}function c(){return n(r,arguments,t(this).constructor)}return c.prototype=Object.create(r.prototype,{constructor:{value:c,enumerable:!1,writable:!0,configurable:!0}}),e(c,r)},r(i)}function i(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}window.customElements.define("joomla-editor-none",function(t){var n,r;function o(){var e;return(e=t.call(this)||this).editor="",e.unregisterEditor=e.unregisterEditor.bind(i(e)),e.registerEditor=e.registerEditor.bind(i(e)),e.childrenChange=e.childrenChange.bind(i(e)),e.getSelection=e.getSelection.bind(i(e)),new MutationObserver((function(){return e.childrenChange()})).observe(i(e),{childList:!0}),e}r=t,(n=o).prototype=Object.create(r.prototype),n.prototype.constructor=n,e(n,r);var c=o.prototype;return c.connectedCallback=function(){this.childrenChange()},c.disconnectedCallback=function(){this.unregisterEditor()},c.getSelection=function(){return document.selection?(this.editor.focus(),document.selection.createRange()):this.editor.selectionStart||0===this.editor.selectionStart?this.editor.value.substring(this.editor.selectionStart,this.editor.selectionEnd):this.editor.value},c.registerEditor=function(){var t=this;if(!window.Joomla||!window.Joomla.editors||"object"!=typeof window.Joomla.editors)throw new Error("The Joomla API is not correctly registered.");window.Joomla.editors.instances[this.editor.id]={id:function(){return t.editor.id},element:function(){return t.editor},getValue:function(){return t.editor.value},setValue:function(e){return t.editor.value=e},getSelection:function(){return t.getSelection()},disable:function(e){t.editor.disabled=e,t.editor.readOnly=e},replaceSelection:function(e){t.editor.selectionStart||0===t.editor.selectionStart?t.editor.value=t.editor.value.substring(0,t.editor.selectionStart)+e+t.editor.value.substring(t.editor.selectionEnd,t.editor.value.length):t.editor.value+=e},onSave:function(){}}},c.unregisterEditor=function(){this.editor&&delete window.Joomla.editors.instances[this.editor.id]},c.childrenChange=function(){this.firstElementChild&&this.firstElementChild.tagName&&"textarea"===this.firstElementChild.tagName.toLowerCase()&&this.firstElementChild.getAttribute("id")&&(this.editor=this.firstElementChild,this.unregisterEditor(),this.registerEditor())},o}(r(HTMLElement)))}();