Файловый менеджер - Редактировать - /home/opticamezl/www/newok/531c5/plg_editors_codemirror.tar
Назад
js/joomla-editor-codemirror.min.js.gz 0000644 00000002145 15172570131 0013633 0 ustar 00 � �VKo�8��p�B Z�^m0Ak�v���M�-6�%GuE�}AIv��q������7�qf8��G3��4!�p� �0�{����ˋs%8l�wC��ʚXW(�X��Q:���G�#��qگr�D�]�Y�+@�Tt�j�/`��M�Q�d�` b��ύ�4�ن�"��t5�~@V�4��&^���M|��e������� ��[=yӲ6�D�FK���1�[�`�5B�� �up��W)�Hn�N�?m壏_�>����%�� �3���ȚN9T摵r�{VH�=��Υ������+��H����5��,�!��&��d�y y2��)�(܁`}�8�t�F��R�.ݩ\I�#SV> �}�lK�}�����PC��/e�-�,;jy�(�;j�[6���w:z�ˮ���k����PV���JbAn�aa|p�{G�8�����8}�5�[�%P��%�?<��Y��&�ƻC���5�/;kj8�+����wPH�|g?�wǸ�2����,��]{��WEE8�UeM?^ߏ�J��}����)[k�����Lj���#'���B���ҒC�}�lrX�@6�.e��Ѱc������#�dGeyPe����N=�4���n�AS�yR6M���t ��4�/L��ri���h��8��M��\� � Bqm!G_��WM��;_;m�rf 8� )�0����\�,��9���������,(l��)�ӣ�۶my!2�`�����d�,�X�r� ��H~�D�S�K���-6ug�[zF� (��a��hHcG�� 1.e�����? 6�Q�wf��#�w���</z!����r�Mȅ���J���W���b�=�u����iWn�hS�_T�ՙ���X�X�~�r���G�f� �LF�, ���# �2�g��{i��Fc!�t.�֩�;��+��� r�!�{��I'����Ua�:��rvM�9#Ϋ:D�$5�G�K+�~��wqs�o���X>�F���j�, �~�^�7�fe��Gk��mUїC+�ᑦ�{ḏp��;4�O�i6��_��ؚi js/joomla-editor-codemirror.js 0000644 00000011626 15172570131 0012436 0 ustar 00 class CodemirrorEditor extends HTMLElement { constructor() { super(); this.instance = ''; this.host = window.location.origin; this.element = this.querySelector('textarea'); this.refresh = this.refresh.bind(this); // Observer instance to refresh the Editor when it become visible, eg after Tab switching this.intersectionObserver = new IntersectionObserver(entries => { if (entries[0].isIntersecting && this.instance) { this.instance.refresh(); } }, { threshold: 0 }); } static get observedAttributes() { return ['options']; } get options() { return JSON.parse(this.getAttribute('options')); } set options(value) { this.setAttribute('options', value); } attributeChangedCallback(attr, oldValue, newValue) { switch (attr) { case 'options': if (oldValue && newValue !== oldValue) { this.refresh(this.element); } break; // Do nothing } } async connectedCallback() { const cmPath = this.getAttribute('editor'); const addonsPath = this.getAttribute('addons'); await import(`${this.host}/${cmPath}`); if (this.options.keyMapUrl) { await import(`${this.host}/${this.options.keyMapUrl}`); } await import(`${this.host}/${addonsPath}`); const that = this; // For mode autoloading. window.CodeMirror.modeURL = this.getAttribute('mod-path'); // Fire this function any time an editor is created. window.CodeMirror.defineInitHook(editor => { // Try to set up the mode const mode = window.CodeMirror.findModeByName(editor.options.mode || '') || window.CodeMirror.findModeByExtension(editor.options.mode || ''); window.CodeMirror.autoLoadMode(editor, typeof mode === 'object' ? mode.mode : editor.options.mode); if (mode && mode.mime) { // Fix the x-php error if (['text/x-php', 'application/x-httpd-php', 'application/x-httpd-php-open'].includes(mode.mime)) { editor.setOption('mode', 'php'); } else if (mode.mime === 'text/html') { editor.setOption('mode', mode.mode); } else { editor.setOption('mode', mode.mime); } } const toggleFullScreen = () => { that.instance.setOption('fullScreen', !that.instance.getOption('fullScreen')); const header = document.getElementById('subhead'); if (header) { const header1 = document.getElementById('header'); header1.classList.toggle('hidden'); header.classList.toggle('hidden'); that.instance.display.wrapper.style.top = `${header.getBoundingClientRect().height}px`; } }; const closeFullScreen = () => { that.instance.getOption('fullScreen'); that.instance.setOption('fullScreen', false); if (!that.instance.getOption('fullScreen')) { const header = document.getElementById('subhead'); if (header) { const header1 = document.getElementById('header'); header.classList.toggle('hidden'); header1.classList.toggle('hidden'); that.instance.display.wrapper.style.top = `${header.getBoundingClientRect().height}px`; } } }; const map = { 'Ctrl-Q': toggleFullScreen, [that.getAttribute('fs-combo')]: toggleFullScreen, Esc: closeFullScreen }; editor.addKeyMap(map); const makeMarker = () => { const marker = document.createElement('div'); marker.className = 'CodeMirror-markergutter-mark'; return marker; }; // Handle gutter clicks (place or remove a marker). editor.on('gutterClick', (ed, n, gutter) => { if (gutter !== 'CodeMirror-markergutter') { return; } const info = ed.lineInfo(n); const hasMarker = !!info.gutterMarkers && !!info.gutterMarkers['CodeMirror-markergutter']; ed.setGutterMarker(n, 'CodeMirror-markergutter', hasMarker ? null : makeMarker()); }); /* Some browsers do something weird with the fieldset which doesn't work well with CodeMirror. Fix it. */ if (that.parentNode.tagName.toLowerCase() === 'fieldset') { that.parentNode.style.minWidth = 0; } }); // Register Editor this.instance = window.CodeMirror.fromTextArea(this.element, this.options); this.instance.disable = disabled => this.setOption('readOnly', disabled ? 'nocursor' : false); Joomla.editors.instances[this.element.id] = this.instance; // Watch when the element in viewport, and refresh the editor this.intersectionObserver.observe(this); } disconnectedCallback() { // Remove from the Joomla API delete Joomla.editors.instances[this.element.id]; // Remove from observer this.intersectionObserver.unobserve(this); } refresh(element) { this.instance.fromTextArea(element, this.options); } } customElements.define('joomla-editor-codemirror', CodemirrorEditor); js/joomla-editor-codemirror-es5.min.js 0000644 00000027637 15172570131 0013723 0 ustar 00 (function(){"use strict";function R(){R=function(){return a};var i,a={},f=Object.prototype,n=f.hasOwnProperty,u=Object.defineProperty||function(e,t,r){e[t]=r.value},y=typeof Symbol=="function"?Symbol:{},p=y.iterator||"@@iterator",m=y.asyncIterator||"@@asyncIterator",v=y.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch{l=function(t,r,c){return t[r]=c}}function U(e,t,r,c){var o=t&&t.prototype instanceof A?t:A,s=Object.create(o.prototype),h=new K(c||[]);return u(s,"_invoke",{value:ot(e,r,h)}),s}function _(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(c){return{type:"throw",arg:c}}}a.wrap=U;var g="suspendedStart",S="suspendedYield",x="executing",P="completed",k={};function A(){}function N(){}function b(){}var d={};l(d,p,function(){return this});var E=Object.getPrototypeOf,M=E&&E(E(Y([])));M&&M!==f&&n.call(M,p)&&(d=M);var L=b.prototype=A.prototype=Object.create(d);function D(e){["next","throw","return"].forEach(function(t){l(e,t,function(r){return this._invoke(t,r)})})}function T(e,t){function r(o,s,h,w){var O=_(e[o],e,s);if(O.type!=="throw"){var I=O.arg,F=I.value;return F&&typeof F=="object"&&n.call(F,"__await")?t.resolve(F.__await).then(function(j){r("next",j,h,w)},function(j){r("throw",j,h,w)}):t.resolve(F).then(function(j){I.value=j,h(I)},function(j){return r("throw",j,h,w)})}w(O.arg)}var c;u(this,"_invoke",{value:function(o,s){function h(){return new t(function(w,O){r(o,s,w,O)})}return c=c?c.then(h,h):h()}})}function ot(e,t,r){var c=g;return function(o,s){if(c===x)throw new Error("Generator is already running");if(c===P){if(o==="throw")throw s;return{value:i,done:!0}}for(r.method=o,r.arg=s;;){var h=r.delegate;if(h){var w=H(h,r);if(w){if(w===k)continue;return w}}if(r.method==="next")r.sent=r._sent=r.arg;else if(r.method==="throw"){if(c===g)throw c=P,r.arg;r.dispatchException(r.arg)}else r.method==="return"&&r.abrupt("return",r.arg);c=x;var O=_(e,t,r);if(O.type==="normal"){if(c=r.done?P:S,O.arg===k)continue;return{value:O.arg,done:r.done}}O.type==="throw"&&(c=P,r.method="throw",r.arg=O.arg)}}}function H(e,t){var r=t.method,c=e.iterator[r];if(c===i)return t.delegate=null,r==="throw"&&e.iterator.return&&(t.method="return",t.arg=i,H(e,t),t.method==="throw")||r!=="return"&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),k;var o=_(c,e.iterator,t.arg);if(o.type==="throw")return t.method="throw",t.arg=o.arg,t.delegate=null,k;var s=o.arg;return s?s.done?(t[e.resultName]=s.value,t.next=e.nextLoc,t.method!=="return"&&(t.method="next",t.arg=i),t.delegate=null,k):s:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,k)}function it(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function W(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function K(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(it,this),this.reset(!0)}function Y(e){if(e||e===""){var t=e[p];if(t)return t.call(e);if(typeof e.next=="function")return e;if(!isNaN(e.length)){var r=-1,c=function o(){for(;++r<e.length;)if(n.call(e,r))return o.value=e[r],o.done=!1,o;return o.value=i,o.done=!0,o};return c.next=c}}throw new TypeError(typeof e+" is not iterable")}return N.prototype=b,u(L,"constructor",{value:b,configurable:!0}),u(b,"constructor",{value:N,configurable:!0}),N.displayName=l(b,v,"GeneratorFunction"),a.isGeneratorFunction=function(e){var t=typeof e=="function"&&e.constructor;return!!t&&(t===N||(t.displayName||t.name)==="GeneratorFunction")},a.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,b):(e.__proto__=b,l(e,v,"GeneratorFunction")),e.prototype=Object.create(L),e},a.awrap=function(e){return{__await:e}},D(T.prototype),l(T.prototype,m,function(){return this}),a.AsyncIterator=T,a.async=function(e,t,r,c,o){o===void 0&&(o=Promise);var s=new T(U(e,t,r,c),o);return a.isGeneratorFunction(t)?s:s.next().then(function(h){return h.done?h.value:s.next()})},D(L),l(L,v,"Generator"),l(L,p,function(){return this}),l(L,"toString",function(){return"[object Generator]"}),a.keys=function(e){var t=Object(e),r=[];for(var c in t)r.push(c);return r.reverse(),function o(){for(;r.length;){var s=r.pop();if(s in t)return o.value=s,o.done=!1,o}return o.done=!0,o}},a.values=Y,K.prototype={constructor:K,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=i,this.done=!1,this.delegate=null,this.method="next",this.arg=i,this.tryEntries.forEach(W),!e)for(var t in this)t.charAt(0)==="t"&&n.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=i)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if(e.type==="throw")throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function r(O,I){return s.type="throw",s.arg=e,t.next=O,I&&(t.method="next",t.arg=i),!!I}for(var c=this.tryEntries.length-1;c>=0;--c){var o=this.tryEntries[c],s=o.completion;if(o.tryLoc==="root")return r("end");if(o.tryLoc<=this.prev){var h=n.call(o,"catchLoc"),w=n.call(o,"finallyLoc");if(h&&w){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(h){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!w)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var c=this.tryEntries[r];if(c.tryLoc<=this.prev&&n.call(c,"finallyLoc")&&this.prev<c.finallyLoc){var o=c;break}}o&&(e==="break"||e==="continue")&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var s=o?o.completion:{};return s.type=e,s.arg=t,o?(this.method="next",this.next=o.finallyLoc,k):this.complete(s)},complete:function(e,t){if(e.type==="throw")throw e.arg;return e.type==="break"||e.type==="continue"?this.next=e.arg:e.type==="return"?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):e.type==="normal"&&t&&(this.next=t),k},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),W(r),k}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var c=r.completion;if(c.type==="throw"){var o=c.arg;W(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:Y(e),resultName:t,nextLoc:r},this.method==="next"&&(this.arg=i),k}},a}function q(i,a,f,n,u,y,p){try{var m=i[y](p),v=m.value}catch(l){f(l);return}m.done?a(v):Promise.resolve(v).then(n,u)}function Q(i){return function(){var a=this,f=arguments;return new Promise(function(n,u){var y=i.apply(a,f);function p(v){q(y,n,u,p,m,"next",v)}function m(v){q(y,n,u,p,m,"throw",v)}p(void 0)})}}function z(i,a){for(var f=0;f<a.length;f++){var n=a[f];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(i,rt(n.key),n)}}function $(i,a,f){return a&&z(i.prototype,a),f&&z(i,f),Object.defineProperty(i,"prototype",{writable:!1}),i}function X(i,a){i.prototype=Object.create(a.prototype),i.prototype.constructor=i,C(i,a)}function B(i){return B=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(f){return f.__proto__||Object.getPrototypeOf(f)},B(i)}function C(i,a){return C=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,u){return n.__proto__=u,n},C(i,a)}function Z(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function G(i,a,f){return Z()?G=Reflect.construct.bind():G=function(u,y,p){var m=[null];m.push.apply(m,y);var v=Function.bind.apply(u,m),l=new v;return p&&C(l,p.prototype),l},G.apply(null,arguments)}function V(i){return Function.toString.call(i).indexOf("[native code]")!==-1}function J(i){var a=typeof Map=="function"?new Map:void 0;return J=function(n){if(n===null||!V(n))return n;if(typeof n!="function")throw new TypeError("Super expression must either be null or a function");if(typeof a<"u"){if(a.has(n))return a.get(n);a.set(n,u)}function u(){return G(n,arguments,B(this).constructor)}return u.prototype=Object.create(n.prototype,{constructor:{value:u,enumerable:!1,writable:!0,configurable:!0}}),C(u,n)},J(i)}function tt(i){if(i===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i}function et(i,a){if(typeof i!="object"||i===null)return i;var f=i[Symbol.toPrimitive];if(f!==void 0){var n=f.call(i,a||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(a==="string"?String:Number)(i)}function rt(i){var a=et(i,"string");return typeof a=="symbol"?a:String(a)}var nt=function(i){X(a,i);function a(){var n;return n=i.call(this)||this,n.instance="",n.host=window.location.origin,n.element=n.querySelector("textarea"),n.refresh=n.refresh.bind(tt(n)),n.intersectionObserver=new IntersectionObserver(function(u){u[0].isIntersecting&&n.instance&&n.instance.refresh()},{threshold:0}),n}var f=a.prototype;return f.attributeChangedCallback=function(u,y,p){switch(u){case"options":y&&p!==y&&this.refresh(this.element);break}},f.connectedCallback=function(){var n=Q(R().mark(function y(){var p=this,m,v,l;return R().wrap(function(_){for(;;)switch(_.prev=_.next){case 0:return m=this.getAttribute("editor"),v=this.getAttribute("addons"),_.next=4,import(this.host+"/"+m);case 4:if(!this.options.keyMapUrl){_.next=7;break}return _.next=7,import(this.host+"/"+this.options.keyMapUrl);case 7:return _.next=9,import(this.host+"/"+v);case 9:l=this,window.CodeMirror.modeURL=this.getAttribute("mod-path"),window.CodeMirror.defineInitHook(function(g){var S,x=window.CodeMirror.findModeByName(g.options.mode||"")||window.CodeMirror.findModeByExtension(g.options.mode||"");window.CodeMirror.autoLoadMode(g,typeof x=="object"?x.mode:g.options.mode),x&&x.mime&&(["text/x-php","application/x-httpd-php","application/x-httpd-php-open"].includes(x.mime)?g.setOption("mode","php"):x.mime==="text/html"?g.setOption("mode",x.mode):g.setOption("mode",x.mime));var P=function(){l.instance.setOption("fullScreen",!l.instance.getOption("fullScreen"));var d=document.getElementById("subhead");if(d){var E=document.getElementById("header");E.classList.toggle("hidden"),d.classList.toggle("hidden"),l.instance.display.wrapper.style.top=d.getBoundingClientRect().height+"px"}},k=function(){if(l.instance.getOption("fullScreen"),l.instance.setOption("fullScreen",!1),!l.instance.getOption("fullScreen")){var d=document.getElementById("subhead");if(d){var E=document.getElementById("header");d.classList.toggle("hidden"),E.classList.toggle("hidden"),l.instance.display.wrapper.style.top=d.getBoundingClientRect().height+"px"}}},A=(S={"Ctrl-Q":P},S[l.getAttribute("fs-combo")]=P,S.Esc=k,S);g.addKeyMap(A);var N=function(){var d=document.createElement("div");return d.className="CodeMirror-markergutter-mark",d};g.on("gutterClick",function(b,d,E){if(E==="CodeMirror-markergutter"){var M=b.lineInfo(d),L=!!M.gutterMarkers&&!!M.gutterMarkers["CodeMirror-markergutter"];b.setGutterMarker(d,"CodeMirror-markergutter",L?null:N())}}),l.parentNode.tagName.toLowerCase()==="fieldset"&&(l.parentNode.style.minWidth=0)}),this.instance=window.CodeMirror.fromTextArea(this.element,this.options),this.instance.disable=function(g){return p.setOption("readOnly",g?"nocursor":!1)},Joomla.editors.instances[this.element.id]=this.instance,this.intersectionObserver.observe(this);case 16:case"end":return _.stop()}},y,this)}));function u(){return n.apply(this,arguments)}return u}(),f.disconnectedCallback=function(){delete Joomla.editors.instances[this.element.id],this.intersectionObserver.unobserve(this)},f.refresh=function(u){this.instance.fromTextArea(u,this.options)},$(a,[{key:"options",get:function(){return JSON.parse(this.getAttribute("options"))},set:function(u){this.setAttribute("options",u)}}],[{key:"observedAttributes",get:function(){return["options"]}}]),a}(J(HTMLElement));customElements.define("joomla-editor-codemirror",nt)})(); js/joomla-editor-codemirror-es5.js 0000644 00000055561 15172570131 0013136 0 ustar 00 (function () { 'use strict'; function _regeneratorRuntime() { _regeneratorRuntime = function () { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function (t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == typeof h && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function (t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw new Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(typeof e + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function (e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function () { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function (e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw new Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function (t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function (t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function (t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function (t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw new Error("illegal catch attempt"); }, delegateYield: function (e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; } function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } } function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; } function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } } function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); } function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } function _construct(Parent, args, Class) { if (_isNativeReflectConstruct()) { _construct = Reflect.construct.bind(); } else { _construct = function _construct(Parent, args, Class) { var a = [null]; a.push.apply(a, args); var Constructor = Function.bind.apply(Parent, a); var instance = new Constructor(); if (Class) _setPrototypeOf(instance, Class.prototype); return instance; }; } return _construct.apply(null, arguments); } function _isNativeFunction(fn) { return Function.toString.call(fn).indexOf("[native code]") !== -1; } function _wrapNativeSuper(Class) { var _cache = typeof Map === "function" ? new Map() : undefined; _wrapNativeSuper = function _wrapNativeSuper(Class) { if (Class === null || !_isNativeFunction(Class)) return Class; if (typeof Class !== "function") { throw new TypeError("Super expression must either be null or a function"); } if (typeof _cache !== "undefined") { if (_cache.has(Class)) return _cache.get(Class); _cache.set(Class, Wrapper); } function Wrapper() { return _construct(Class, arguments, _getPrototypeOf(this).constructor); } Wrapper.prototype = Object.create(Class.prototype, { constructor: { value: Wrapper, enumerable: false, writable: true, configurable: true } }); return _setPrototypeOf(Wrapper, Class); }; return _wrapNativeSuper(Class); } function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); } function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); } var CodemirrorEditor = /*#__PURE__*/function (_HTMLElement) { _inheritsLoose(CodemirrorEditor, _HTMLElement); function CodemirrorEditor() { var _this; _this = _HTMLElement.call(this) || this; _this.instance = ''; _this.host = window.location.origin; _this.element = _this.querySelector('textarea'); _this.refresh = _this.refresh.bind(_assertThisInitialized(_this)); // Observer instance to refresh the Editor when it become visible, eg after Tab switching _this.intersectionObserver = new IntersectionObserver(function (entries) { if (entries[0].isIntersecting && _this.instance) { _this.instance.refresh(); } }, { threshold: 0 }); return _this; } var _proto = CodemirrorEditor.prototype; _proto.attributeChangedCallback = function attributeChangedCallback(attr, oldValue, newValue) { switch (attr) { case 'options': if (oldValue && newValue !== oldValue) { this.refresh(this.element); } break; // Do nothing } }; _proto.connectedCallback = /*#__PURE__*/function () { var _connectedCallback = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() { var _this2 = this; var cmPath, addonsPath, that; return _regeneratorRuntime().wrap(function _callee$(_context) { while (1) switch (_context.prev = _context.next) { case 0: cmPath = this.getAttribute('editor'); addonsPath = this.getAttribute('addons'); _context.next = 4; return import(this.host + "/" + cmPath); case 4: if (!this.options.keyMapUrl) { _context.next = 7; break; } _context.next = 7; return import(this.host + "/" + this.options.keyMapUrl); case 7: _context.next = 9; return import(this.host + "/" + addonsPath); case 9: that = this; // For mode autoloading. window.CodeMirror.modeURL = this.getAttribute('mod-path'); // Fire this function any time an editor is created. window.CodeMirror.defineInitHook(function (editor) { var _map; // Try to set up the mode var mode = window.CodeMirror.findModeByName(editor.options.mode || '') || window.CodeMirror.findModeByExtension(editor.options.mode || ''); window.CodeMirror.autoLoadMode(editor, typeof mode === 'object' ? mode.mode : editor.options.mode); if (mode && mode.mime) { // Fix the x-php error if (['text/x-php', 'application/x-httpd-php', 'application/x-httpd-php-open'].includes(mode.mime)) { editor.setOption('mode', 'php'); } else if (mode.mime === 'text/html') { editor.setOption('mode', mode.mode); } else { editor.setOption('mode', mode.mime); } } var toggleFullScreen = function toggleFullScreen() { that.instance.setOption('fullScreen', !that.instance.getOption('fullScreen')); var header = document.getElementById('subhead'); if (header) { var header1 = document.getElementById('header'); header1.classList.toggle('hidden'); header.classList.toggle('hidden'); that.instance.display.wrapper.style.top = header.getBoundingClientRect().height + "px"; } }; var closeFullScreen = function closeFullScreen() { that.instance.getOption('fullScreen'); that.instance.setOption('fullScreen', false); if (!that.instance.getOption('fullScreen')) { var header = document.getElementById('subhead'); if (header) { var header1 = document.getElementById('header'); header.classList.toggle('hidden'); header1.classList.toggle('hidden'); that.instance.display.wrapper.style.top = header.getBoundingClientRect().height + "px"; } } }; var map = (_map = { 'Ctrl-Q': toggleFullScreen }, _map[that.getAttribute('fs-combo')] = toggleFullScreen, _map.Esc = closeFullScreen, _map); editor.addKeyMap(map); var makeMarker = function makeMarker() { var marker = document.createElement('div'); marker.className = 'CodeMirror-markergutter-mark'; return marker; }; // Handle gutter clicks (place or remove a marker). editor.on('gutterClick', function (ed, n, gutter) { if (gutter !== 'CodeMirror-markergutter') { return; } var info = ed.lineInfo(n); var hasMarker = !!info.gutterMarkers && !!info.gutterMarkers['CodeMirror-markergutter']; ed.setGutterMarker(n, 'CodeMirror-markergutter', hasMarker ? null : makeMarker()); }); /* Some browsers do something weird with the fieldset which doesn't work well with CodeMirror. Fix it. */ if (that.parentNode.tagName.toLowerCase() === 'fieldset') { that.parentNode.style.minWidth = 0; } }); // Register Editor this.instance = window.CodeMirror.fromTextArea(this.element, this.options); this.instance.disable = function (disabled) { return _this2.setOption('readOnly', disabled ? 'nocursor' : false); }; Joomla.editors.instances[this.element.id] = this.instance; // Watch when the element in viewport, and refresh the editor this.intersectionObserver.observe(this); case 16: case "end": return _context.stop(); } }, _callee, this); })); function connectedCallback() { return _connectedCallback.apply(this, arguments); } return connectedCallback; }(); _proto.disconnectedCallback = function disconnectedCallback() { // Remove from the Joomla API delete Joomla.editors.instances[this.element.id]; // Remove from observer this.intersectionObserver.unobserve(this); }; _proto.refresh = function refresh(element) { this.instance.fromTextArea(element, this.options); }; _createClass(CodemirrorEditor, [{ key: "options", get: function get() { return JSON.parse(this.getAttribute('options')); }, set: function set(value) { this.setAttribute('options', value); } }], [{ key: "observedAttributes", get: function get() { return ['options']; } }]); return CodemirrorEditor; }( /*#__PURE__*/_wrapNativeSuper(HTMLElement)); customElements.define('joomla-editor-codemirror', CodemirrorEditor); })(); js/joomla-editor-codemirror-es5.min.js.gz 0000644 00000010562 15172570131 0014327 0 ustar 00 � �Z�s㸑�~�Ji�2̵�ԥB ��8���kdz�lT*D�"��Aي�� ���s��ʕ?X�~��� aވTs) ڀ�fQ�O5�t��'�6�H@��n��h;YQqLɦ�9��a��+%���aA�ݳ�W�bJ�q�Qe,�u��mϞa�ڰ���hٰ��a(��a��˒�у7�lZ\�u�5STK�݂���{ xI�1��"���xEֱ�Zq��L�$xLRvbzSU��l���L4K��d���R�|���ϊk��E�(�j�ޔp�b P�R��r�� ���z�f$m�^������H=����5�1�����u�T1��1��9����t�&~��<r��Ot�J V�@-� �cg0����1� �Z�`� �SZ�F7�:�a��'ׅ�ώ:mۖ�ϊV�'�ꦮ��X���� ?C�pVf ��^X�h. ���eU2�2��Ȧ���͠�����<�E33�������[d����`��3�]�o��x|��/p:CMn��!�x,�9np��c�����琷��]fhP�o��������`�R]Ѵ�Cx����~D�({�;_��~��f��� J\�?�P�#��M�3\� ��]ld��rd�]L��'tQ�~<�X� �Ơ��{�3��+V�r��؏�XLz~A�Y�X![���˿EI��7/-���q����g����FT:i������I\.��3�T=�;��q��٢�ӥ$�H��.PR@ԆN���nX+Yt����0%�� ��]�J)� ����Ո�-��:R�f�Y������$����/��8��bc�KU�d���X��z2q�D�+قjf�(��3�X�e��τ�'�J��b�my>�'�ERq̈́&*~�ZLXY�h���`��«��{'�D��+�lW/)���r���Bf~w��*�s�TvC����e��)�aCY��zyTl�xq�<`m�L� �5��նW��x�Z^�.��G|8�;F\E���S��=U�..8갦w'MYb 0L��xu/Og+m�� �����[5 �0�J9&�?�+�C�s��N�(�����Q��g,��7�D��o"� ��&.?��;��ur�ȃ� $���m�V���.��ڹ�)3֔��.ٌ����M�f�]˴��k�q��͋�@I��FS�ft��0��"� ��[\��f���T�2M��l�N�#."fŶ�ĵL ������&炖�ڽ��̈�k���fی��Jh�YWM]@��>�}=���n7�D;����QC�����D0��%�N7��Ԡ�a�gn���^V�j���,�Ñ�m�6�@/�N�fS)��s������-Ύx}Ko!�K&�@�>?=�)� D�ߓ����� �C��V��+}"eS5���.�c9�{��gX����ɛ�퐙�x�:]�� ����6��渁��R�Z5�m<R�K��Ώ�!����k�I �x���77�1�Ƈ���N��Y+���F#m�r��B ���X�%C&T�H�b/�z�Y��w�܋����9J �����88n�٫��5��HEmCp(��W� k[�7�9�o��/_-�1�߆-#�l4#d��)�hcꚕ�Yt6CI�\�!�6$�Шa�wVG] 5����6ܯ<�^��|�GO�"����zǺ� ��נ�!�:��z�3`m���� u~�aE���A[d@�H9tM{c��b�f�C(Q=�l�YU\� Z�=�]��C4i����(��5���&�B�l�g��o�؊�9(�8���ѵO�'wÝ4�a'�١��k�\I����d�3�#�:�jk�t�T������o���F�G��%O<G��4�́G-���� �lh3�'��l�9��_�8�fa��ي�->���Z���1�x,,x= :�;������e_�8��e����bg4���������I�r69=Na��ΰ��v�#c��m`=G&2�B�7�����.�t%@�9�ǫ��w����˥a�a��\q�L��h�5Lſ���j&��;M��Q��fK&t��u!��T�� �n ��+ ��!�od^�r���}�^�Ћ��Lw5§��>���\1�Զr<�vk�g�˽��3�����jm3���.Mɋ0>�M_b�����X^����n�p��7���Q���=s�F�hz��^��A;9h|6�Z�!=�2�i��e����/��c�1��i��Z�s��b�z�~=������ދ+m�J�= !��ڛ\�5}�oz�*#b��.�O�أ�6��C�t��]�[�)���]SY�LZz(�Z�e�M�ڥX{ ���<�����P�_l��ωƾ_NT� ��Q�z�9�Y�Ж� 9�8�7x�+w@n�\>]�`��,�=�;/�&�eW�KW�Q�B�/1�ʕ�n�V�G�{5�DnV��[8'T-��I�5�g?������&<�UU�!�yp�\�� �V� /�G�U ��Ƨ�j+� hS�3�e�6�bN�&��U��ɉJ:�gw/$|�nG�X�aOf*@`� ��́����2:C��M�JCa ^�E(��{�;��_��E8�c8�9���WE�-�|X��*����=O@����K�g�.�w�����F<�"�h�a����n�N�9j�Yz� ֱ�$�F�y ���.������=��?�+Y\g���%K�_@�ۑl���uA��G�ʽ�/�#�*���pQ���dT�z��B�`9�'��,��Z����_%v���a/V� ��r��7凡����`kj���di�8 K�v�Ċt�e�_7x�pi;�U�7�x| K\���-������W��_��^��8�����]�TP�W,Je�f �9=�}o�y\t�������V���N���:�[Um���C�r� �(��c�Vࡩ���K�X][�lj1���9�� ���(X������^>�����P�o��E3�|�b0:~g �O�ͫ(�1��!Y�sU~^���_��@.�~*�6��9�L`�O,g�����Q#*h-��ќ1q�5�%�Y�F�1;D;&���ż�3큸7<�7��-���ٞO\�S�%C���Kn��VJ��W��5��9��-�XN�R�xZ�v4���r.�����~�z&�G!5�M��.��Jn��)���� d��M��օ��g�4q!u��B����? �<(1�/]D_�>j���V4"�>y `��䙋L>ǥL�� ���,bV�n���׆��3h#��h��X�\��4���Fmv�+jsneż��L��� ��ȋ��jЦ1G&����� ��nm�Z�х�)�,1Gˢu��7�Z+>o4�,�X�쒖圦O�^?sSu6h�Қi`j����jD��7�����u=)� H��cua�#��=V������K��e���6�������y��Yܣm���Y��/]k�`�mgX�ݩ���[�eFy�G�G̗�Tکm��|N�hb��cb-�;o7S#���'U����'o%/U7z��+��rJvy��8��'�s�:\���� 7�/e�~�t}�K��VT�P�`�+]? ���rp#\8/>�r8)�"��{g����H��sC��YW/���.s8ur8�6Z^Kjg���2|Nr�b�'��~�_�%_�kéło_N�����;���кʾ��TV�|z�EZ6���.&߹O����pB����Y���#wң�+��+���-X��ʛ�|Hc�Q@�8J�f$���ݕÂw�u3/�g������ -S M�ⴤu}�kk�X���g�Yg_{��,fTLŵ^�,ֲ"�Y��lD����L�O���B����-�-���"�7��&�n�C�������l��>� �Ԫ<�$�-~��{�ק�\�%@3r��:%O�M1Ͳ,·.o�3L`;W�z{@���P�x{�X0�ƩILL-��{ 8k'��8ʍ^�<} n��8�W6P�̮}��?ֺ!��K�!|MF��ؑ�X�z<>���u6����P��J��/LU��Bd>�e\Qń���5]s�7�����6Ψ��#���S���K.~�.�9�q�c}vѕ\~f/��bt���a���c"Ϟ΄���!�-g>A����2mT-HF�y�rY���w= ��y6#;kw�Vs�t?\ ���'��2��C�6�i��;�vp�(�m��K���&����\�c|�����f}��a#vt45^W��쮳v\��ſ�O7Ol��e&^�w��5���5�V��P����ue8���>Jn��v�K��z�ׄ��fm;C���{���k/MҦ�r�k_%A�ź�Թ��A,�N Xh�"�&��?٣*s�/ js/joomla-editor-codemirror.min.js 0000644 00000005551 15172570131 0013220 0 ustar 00 class CodemirrorEditor extends HTMLElement{constructor(){super(),this.instance="",this.host=window.location.origin,this.element=this.querySelector("textarea"),this.refresh=this.refresh.bind(this),this.intersectionObserver=new IntersectionObserver(s=>{s[0].isIntersecting&&this.instance&&this.instance.refresh()},{threshold:0})}static get observedAttributes(){return["options"]}get options(){return JSON.parse(this.getAttribute("options"))}set options(s){this.setAttribute("options",s)}attributeChangedCallback(s,r,t){switch(s){case"options":r&&t!==r&&this.refresh(this.element);break}}async connectedCallback(){const s=this.getAttribute("editor"),r=this.getAttribute("addons");await import(`${this.host}/${s}`),this.options.keyMapUrl&&await import(`${this.host}/${this.options.keyMapUrl}`),await import(`${this.host}/${r}`);const t=this;window.CodeMirror.modeURL=this.getAttribute("mod-path"),window.CodeMirror.defineInitHook(i=>{const o=window.CodeMirror.findModeByName(i.options.mode||"")||window.CodeMirror.findModeByExtension(i.options.mode||"");window.CodeMirror.autoLoadMode(i,typeof o=="object"?o.mode:i.options.mode),o&&o.mime&&(["text/x-php","application/x-httpd-php","application/x-httpd-php-open"].includes(o.mime)?i.setOption("mode","php"):o.mime==="text/html"?i.setOption("mode",o.mode):i.setOption("mode",o.mime));const a=()=>{t.instance.setOption("fullScreen",!t.instance.getOption("fullScreen"));const e=document.getElementById("subhead");e&&(document.getElementById("header").classList.toggle("hidden"),e.classList.toggle("hidden"),t.instance.display.wrapper.style.top=`${e.getBoundingClientRect().height}px`)},c=()=>{if(t.instance.getOption("fullScreen"),t.instance.setOption("fullScreen",!1),!t.instance.getOption("fullScreen")){const e=document.getElementById("subhead");if(e){const n=document.getElementById("header");e.classList.toggle("hidden"),n.classList.toggle("hidden"),t.instance.display.wrapper.style.top=`${e.getBoundingClientRect().height}px`}}},h={"Ctrl-Q":a,[t.getAttribute("fs-combo")]:a,Esc:c};i.addKeyMap(h);const l=()=>{const e=document.createElement("div");return e.className="CodeMirror-markergutter-mark",e};i.on("gutterClick",(e,n,m)=>{if(m!=="CodeMirror-markergutter")return;const d=e.lineInfo(n),p=!!d.gutterMarkers&&!!d.gutterMarkers["CodeMirror-markergutter"];e.setGutterMarker(n,"CodeMirror-markergutter",p?null:l())}),t.parentNode.tagName.toLowerCase()==="fieldset"&&(t.parentNode.style.minWidth=0)}),this.instance=window.CodeMirror.fromTextArea(this.element,this.options),this.instance.disable=i=>this.setOption("readOnly",i?"nocursor":!1),Joomla.editors.instances[this.element.id]=this.instance,this.intersectionObserver.observe(this)}disconnectedCallback(){delete Joomla.editors.instances[this.element.id],this.intersectionObserver.unobserve(this)}refresh(s){this.instance.fromTextArea(s,this.options)}}customElements.define("joomla-editor-codemirror",CodemirrorEditor); css/codemirror.min.css.gz 0000644 00000000460 15172570131 0011416 0 ustar 00 � }PAN�0�J���� �b_*!q�p�u���� �������4B*T�8�3���ح��(__�ĺ��Gr���cM�U� E���XXkuk��(jʙZU�w���$|B�ǃ��`P����5\kx<�g�&���E�hK�X-��:ÐE�G{)����5L}t�`-�\K=Wl�IU���8��Q������7-�w����L��y�k~B0N���,V�PL�s1��s�=��M�a<�WY�X��孪�+h�Wm��D�:��sUw�"��2��H1C̪���(����K css/codemirror.min.css 0000644 00000001022 15172570131 0010772 0 ustar 00 @charset "UTF-8";.CodeMirror{border:1px solid #ccc;margin-bottom:15px}.CodeMirror-fullscreen{z-index:1040}.CodeMirror-foldmarker{vertical-align:middle;color:#fff;text-shadow:none;background:#ff800080;border-radius:1em;padding:0 1em;font-family:serif;font-size:90%;box-shadow:inset 0 0 2px #ffffff80}.CodeMirror-foldgutter,.CodeMirror-markergutter{text-align:center;width:1.2em}.CodeMirror-markergutter{cursor:pointer}.CodeMirror-markergutter-mark{cursor:pointer;text-align:center}.CodeMirror-markergutter-mark:after{content:"●"} css/codemirror.css 0000644 00000001637 15172570131 0010224 0 ustar 00 /** * @copyright (C) 2009 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ .CodeMirror { margin-bottom: 15px; border: 1px solid #ccc; } /* In order to hide the Joomla menu */ .CodeMirror-fullscreen { z-index: 1040; } /* Make the fold marker a little more visible/nice */ .CodeMirror-foldmarker { background: rgb(255,128,0); background: rgba(255,128,0,.5); box-shadow: inset 0 0 2px rgba(255,255,255,.5); font-family: serif; font-size: 90%; border-radius: 1em; padding: 0 1em; vertical-align: middle; color: white; text-shadow: none; } .CodeMirror-foldgutter, .CodeMirror-markergutter { width: 1.2em; text-align: center; } .CodeMirror-markergutter { cursor: pointer; } .CodeMirror-markergutter-mark { cursor: pointer; text-align: center; } .CodeMirror-markergutter-mark:after { content: "\25CF"; }
| ver. 1.4 |
Github
|
.
| PHP 8.3.23 | Генерация страницы: 0 |
proxy
|
phpinfo
|
Настройка