/*! jodit - Jodit is awesome and usefully wysiwyg editor with filebrowser Author: Chupurnov (https://xdsoft.net/) Version: v3.2.54 Url: https://xdsoft.net/jodit/ License(s): GPL-2.0-or-later OR MIT OR Commercial */ !function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var o=t();for(var i in o)("object"==typeof exports?exports:e)[i]=o[i]}}(window,function(){return i={},n.m=o=[function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=o(2),i=o(4),r=o(9),a=(d.detach=function(e){for(;e.firstChild;)e.removeChild(e.firstChild)},d.unwrap=function(e){var t=e.parentNode,o=e;if(t){for(;o.firstChild;)t.insertBefore(o.firstChild,o);d.safeRemove(o)}},d.each=function(e,t){var o=e.firstChild;if(o)for(;o;){if(!1===t.call(o,o)||!d.each(o,t))return!1;o=d.next(o,function(e){return!!e},e)}return!0},d.replace=function(e,t,o,i,n){void 0===o&&(o=!1),void 0===i&&(i=!1);var r="string"==typeof t?n.createElement(t):t;if(!i)for(;e.firstChild;)r.appendChild(e.firstChild);return o&&Array.from(e.attributes).forEach(function(e){r.setAttribute(e.name,e.value)}),e.parentNode&&e.parentNode.replaceChild(r,e),r},d.isEmptyTextNode=function(e){return e&&e.nodeType===Node.TEXT_NODE&&(!e.nodeValue||0===e.nodeValue.replace(n.INVISIBLE_SPACE_REG_EXP,"").length)},d.isEmpty=function(e,t){return void 0===t&&(t=/^(img|svg|canvas|input|textarea|form)$/),!e||(e.nodeType===Node.TEXT_NODE?null===e.nodeValue||0===r.trim(e.nodeValue).length:!e.nodeName.toLowerCase().match(t)&&d.each(e,function(e){if(e&&e.nodeType===Node.TEXT_NODE&&null!==e.nodeValue&&0!==r.trim(e.nodeValue).length||e&&e.nodeType===Node.ELEMENT_NODE&&t.test(e.nodeName.toLowerCase()))return!1}))},d.isNode=function(e,t){return!("object"!=typeof t||!t||"function"!=typeof t.Node&&"object"!=typeof t.Node)&&e instanceof t.Node},d.isCell=function(e,t){return d.isNode(e,t)&&/^(td|th)$/i.test(e.nodeName)},d.isImage=function(e,t){return d.isNode(e,t)&&/^(img|svg|picture|canvas)$/i.test(e.nodeName)},d.isBlock=function(e,t){return e&&"object"==typeof e&&d.isNode(e,t)&&n.IS_BLOCK.test(e.nodeName)},d.isInlineBlock=function(e){return!!e&&e.nodeType===Node.ELEMENT_NODE&&!!~["inline","inline-block"].indexOf(""+i.css(e,"display"))},d.canSplitBlock=function(e,t){return e&&e instanceof t.HTMLElement&&this.isBlock(e,t)&&!/^(TD|TH|CAPTION|FORM)$/.test(e.nodeName)&&void 0!==e.style&&!/^(fixed|absolute)/i.test(e.style.position)},d.prev=function(e,t,o,i){return void 0===i&&(i=!0),d.find(e,t,o,!1,"previousSibling",!!i&&"lastChild")},d.next=function(e,t,o,i){return void 0===i&&(i=!0),d.find(e,t,o,void 0,void 0,i?"firstChild":"")},d.prevWithClass=function(e,t){return this.prev(e,function(e){return e&&e.nodeType===Node.ELEMENT_NODE&&e.classList.contains(t)},e.parentNode)},d.nextWithClass=function(e,t){return this.next(e,function(e){return e&&e.nodeType===Node.ELEMENT_NODE&&e.classList.contains(t)},e.parentNode)},d.find=function(e,t,o,i,n,r){if(void 0===i&&(i=!1),void 0===n&&(n="nextSibling"),void 0===r&&(r="firstChild"),i&&t(e))return e;var a,s=e;do{if(t(a=s[n]))return a||!1;if(r&&a&&a[r]){var l=d.find(a[r],t,a,!0,n,r);if(l)return l}s=a=a||s.parentNode}while(s&&s!==o);return!1},d.findWithCurrent=function(e,t,o,i,n){void 0===i&&(i="nextSibling"),void 0===n&&(n="firstChild");var r=e;do{if(t(r))return r||!1;if(n&&r&&r[n]){var a=d.findWithCurrent(r[n],t,r,i,n);if(a)return a}for(;r&&!r[i]&&r!==o;)r=r.parentNode;r&&r[i]&&r!==o&&(r=r[i])}while(r&&r!==o);return!1},d.up=function(e,t,o){var i=e;if(!e)return!1;do{if(t(i))return i;if(i===o||!i.parentNode)break;i=i.parentNode}while(i&&i!==o);return!1},d.closest=function(e,t,o){return d.up(e,"function"==typeof t?t:t instanceof RegExp?function(e){return e&&t.test(e.nodeName)}:function(e){return e&&RegExp("^("+t+")$","i").test(e.nodeName)},o)},d.after=function(e,t){var o=e.parentNode;o&&(o.lastChild===e?o.appendChild(t):o.insertBefore(t,e.nextSibling))},d.moveContent=function(e,t,o){void 0===o&&(o=!1);var i=(e.ownerDocument||document).createDocumentFragment();[].slice.call(e.childNodes).forEach(function(e){e.nodeType===Node.TEXT_NODE&&e.nodeValue===n.INVISIBLE_SPACE||i.appendChild(e)}),o&&t.firstChild?t.insertBefore(i,t.firstChild):t.appendChild(i)},d.all=function(e,t,o){void 0===o&&(o=!1);var i=e.childNodes?Array.prototype.slice.call(e.childNodes):[];if(t(e))return e;o&&(i=i.reverse()),i.forEach(function(e){d.all(e,t,o)})},d.safeRemove=function(e){e&&e.parentNode&&e.parentNode.removeChild(e)},d.wrapInline=function(e,t,o){for(var i,n=e,r=e,a=o.selection.save(),s=!1;s=!1,(i=n.previousSibling)&&!d.isBlock(i,o.editorWindow)&&(s=!0,n=i),s;);for(;s=!1,(i=r.nextSibling)&&!d.isBlock(i,o.editorWindow)&&(s=!0,r=i),s;);var l="string"==typeof t?o.create.inside.element(t):t;n.parentNode&&n.parentNode.insertBefore(l,n);for(var c=n;c&&(c=n.nextSibling,l.appendChild(n),n!==r&&c);)n=c;return o.selection.restore(a),l},d.wrap=function(e,t,o){var i=o.selection.save(),n="string"==typeof t?o.editorDocument.createElement(t):t;return e.parentNode?(e.parentNode.insertBefore(n,e),n.appendChild(e),o.selection.restore(i),n):null},d.findInline=function(e,t,o){var i=e,n=null;do{if(!i)break;if((n=t?i.previousSibling:i.nextSibling)||!i.parentNode||i.parentNode===o||!d.isInlineBlock(i.parentNode))break;i=i.parentNode}while(!n);for(;n&&d.isInlineBlock(n)&&(t?n.lastChild:n.firstChild);)n=t?n.lastChild:n.firstChild;return n},d.contains=function(e,t){for(;t.parentNode;){if(t.parentNode===e)return!0;t=t.parentNode}return!1},d.isOrContains=function(e,t,o){return void 0===o&&(o=!1),t&&e&&(e===t&&!o||d.contains(e,t))},d);function d(){}t.Dom=a},function(e,t,o){"use strict";o.r(t),o.d(t,"__extends",function(){return n}),o.d(t,"__assign",function(){return r}),o.d(t,"__rest",function(){return a}),o.d(t,"__decorate",function(){return s}),o.d(t,"__param",function(){return l}),o.d(t,"__metadata",function(){return c}),o.d(t,"__awaiter",function(){return d}),o.d(t,"__generator",function(){return u}),o.d(t,"__exportStar",function(){return f}),o.d(t,"__values",function(){return p}),o.d(t,"__read",function(){return h}),o.d(t,"__spread",function(){return v}),o.d(t,"__spreadArrays",function(){return m}),o.d(t,"__await",function(){return g}),o.d(t,"__asyncGenerator",function(){return _}),o.d(t,"__asyncDelegator",function(){return b}),o.d(t,"__asyncValues",function(){return y}),o.d(t,"__makeTemplateObject",function(){return w}),o.d(t,"__importStar",function(){return C}),o.d(t,"__importDefault",function(){return E});var i=function(e,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])})(e,t)};function n(e,t){function o(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}var r=function(){return(r=Object.assign||function(e){for(var t,o=1,i=arguments.length;o'+e.value+""),t.document.close()),t.focus(),t.print(),t.close())},mode:i.MODE_SOURCE+i.MODE_WYSIWYG},about:{exec:function(e){var t=e.getInstance("Dialog");t.setTitle(e.i18n("About Jodit")),t.setContent('
\t\t\t\t\t\t\t\t\t\t
'+e.i18n("Jodit Editor")+" v."+e.getVersion()+"
"+e.i18n("License: %s",u.isLicense(e.options.license)?u.normalizeLicense(e.options.license):e.i18n("GNU General Public License, version 2 or later"))+'
http://xdsoft.net/jodit/
'+e.i18n("Jodit User's Guide")+" "+e.i18n("contains detailed help for using")+"
"+e.i18n("Copyright © XDSoft.net - Chupurnov Valeriy. All rights reserved.")+"
"),t.open()},tooltip:"About Jodit",mode:i.MODE_SOURCE+i.MODE_WYSIWYG},hr:{command:"insertHorizontalRule",tags:["hr"],tooltip:"Insert Horizontal Line"},image:{popup:function(n,e,t,r){var a=null;return e&&e.nodeType!==Node.TEXT_NODE&&("IMG"===e.tagName||u.$$("img",e).length)&&(a="IMG"===e.tagName?e:u.$$("img",e)[0]),d(n,{filebrowser:function(o){return l.__awaiter(s,void 0,void 0,function(){var t;return l.__generator(this,function(e){switch(e.label){case 0:if(!o.files||!o.files.length)return[3,4];t=0,e.label=1;case 1:return t'+(t||e)+""))}var r=null;return e&&("A"===e.nodeName||a.Dom.closest(e,"A",o.editor))&&(r="A"===e.nodeName?e:a.Dom.closest(e,"A",o.editor)),d(o,{filebrowser:function(e){if(e.files&&e.files.length){var t=void 0;for(t=0;t\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t"),a=t.create.fromHTML('
\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t
"),s={},l=t.selection.save();return t.options.textIcons?(s[t.i18n("Link")]=r,s[t.i18n("Code")]=a):(s[f.ToolbarIcon.getIcon("link")+" "+t.i18n("Link")]=r,s[f.ToolbarIcon.getIcon("source")+" "+t.i18n("Code")]=a),a.addEventListener("submit",function(e){return e.preventDefault(),u.trim(u.val(a,"textarea[name=code]"))?n(u.val(a,"textarea[name=code]")):(a.querySelector("textarea[name=code]").focus(),a.querySelector("textarea[name=code]").classList.add("jodit_error")),!1}),r.addEventListener("submit",function(e){return e.preventDefault(),u.isURL(u.val(r,"input[name=code]"))?n(u.convertMediaURLToVideoEmbed(u.val(r,"input[name=code]"))):(r.querySelector("input[name=code]").focus(),r.querySelector("input[name=code]").classList.add("jodit_error")),!1}),c(t,s)},tags:["iframe"],tooltip:"Insert youtube/vimeo video"}}},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=o(1);i.__exportStar(o(29),t),i.__exportStar(o(5),t),i.__exportStar(o(14),t),i.__exportStar(o(43),t),i.__exportStar(o(82),t),i.__exportStar(o(46),t),i.__exportStar(o(19),t),i.__exportStar(o(23),t),i.__exportStar(o(9),t),i.__exportStar(o(50),t),i.__exportStar(o(101),t),i.__exportStar(o(102),t),i.__exportStar(o(10),t),i.__exportStar(o(53),t),i.__exportStar(o(103),t),i.__exportStar(o(54),t),i.__exportStar(o(24),t),i.__exportStar(o(51),t),i.__exportStar(o(104),t),i.__exportStar(o(31),t),i.__exportStar(o(30),t),i.__exportStar(o(52),t),i.__exportStar(o(105),t),i.__exportStar(o(11),t),i.__exportStar(o(32),t),i.__exportStar(o(106),t)},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=o(1);i.__exportStar(o(41),t),i.__exportStar(o(18),t),i.__exportStar(o(76),t)},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=(n.exists=function(e){return void 0!==n.icons[e]},n.getIcon=function(e,t){return void 0===t&&(t=""),n.icons[e]||n.icons[e.replace(/-/g,"_")]||n.icons[e.toLowerCase()]||t},n.icons={},n);function n(){}t.ToolbarIcon=i},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i,n=o(1),r=o(8),a=(n.__extends(s,i=r.Component),s);function s(e){var t=i.call(this,e)||this;return t.destruct=function(){t.isDestructed||(t.jodit.events&&t.jodit.events.off("beforeDestruct",t.destruct),t.beforeDestruct(t.jodit),i.prototype.destruct.call(t))},e.events.on("afterInit",t.afterInit.bind(t,e)).on("beforeDestruct",t.destruct),t}t.Plugin=a},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=o(15),n=(Object.defineProperty(r.prototype,"isDestructed",{get:function(){return this.__isDestructed},enumerable:!0,configurable:!0}),r.prototype.destruct=function(){this.jodit&&(this.jodit=void 0),this.__isDestructed=!0},r);function r(e){this.__isDestructed=!1,e&&e instanceof r&&i.isJoditObject(this.jodit=e)&&e.components.push(this)}t.Component=n},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=o(1);i.__exportStar(o(47),t),i.__exportStar(o(48),t),i.__exportStar(o(86),t),i.__exportStar(o(33),t)},function(e,p,t){"use strict";Object.defineProperty(p,"__esModule",{value:!0});var h=t(21),v=t(22),m=t(49),g=t(47),_=t(48);p.css=function(e,t,o,i){void 0===i&&(i=!1);var n=/^left|top|bottom|right|width|min|max|height|margin|padding|font-size/i;if(h.isPlainObject(t)||void 0!==o){var r=function(e,t,o){null!=o&&n.test(t)&&v.isNumeric(""+o)&&(o=parseInt(""+o,10)+"px"),void 0!==o&&p.css(e,t,void 0,!0)!==m.normilizeCSSValue(t,o)&&(e.style[t]=o)};if(h.isPlainObject(t))for(var a=Object.keys(t),s=0;s]+id="jodit_selection_marker_[^>]+><\/span>/g,"")),"
"===t&&(t="");var o={value:t};return this.events.fire("afterGetValueFromEditor",o),o.value},Jodit.prototype.getEditorText=function(){if(this.editor)return this.editor.innerText;var e=this.create.inside.div();return e.innerHTML=this.getElementValue(),e.innerText},Jodit.prototype.setElementValue=function(e){if("string"!=typeof e&&void 0!==e)throw Error("value must be string");void 0!==e?this.element!==this.container&&(void 0!==this.element.value?this.element.value=e:this.element.innerHTML=e):e=this.getElementValue(),e!==this.getEditorValue()&&this.setEditorValue(e)},Jodit.prototype.setEditorValue=function(e){var t=this.events.fire("beforeSetValueToEditor",e);if(!1!==t)if("string"==typeof t&&(e=t),this.editor){if("string"!=typeof e&&void 0!==e)throw Error("value must be string");void 0!==e&&this.editor.innerHTML!==e&&this.setNativeEditorValue(e);var o=this.getElementValue(),i=this.getEditorValue();if(o!==i&&this.__callChangeCount<10){this.setElementValue(i),this.__callChangeCount+=1;try{this.events.fire("change",i,o)}finally{this.__callChangeCount=0}}}else void 0!==e&&this.setElementValue(e)},Jodit.prototype.registerCommand=function(e,t){var o=e.toLowerCase();if(void 0===this.commands[o]&&(this.commands[o]=[]),this.commands[o].push(t),"function"!=typeof t){var i=this.options.commandToHotkeys[o]||this.options.commandToHotkeys[e]||t.hotkeys;i&&this.registerHotkeyToCommand(i,o)}return this},Jodit.prototype.registerHotkeyToCommand=function(e,t){var o=this,i=f.asArray(e).map(f.normalizeKeyAliases).map(function(e){return e+".hotkey"}).join(" ");this.events.off(i).on(i,function(){return o.execCommand(t)})},Jodit.prototype.execCommand=function(e,t,o){if(void 0===t&&(t=!1),void 0===o&&(o=null),!this.options.readonly||"selectall"===e){var i;if(e=e.toLowerCase(),!1!==(i=this.events.fire("beforeCommand",e,t,o))&&(i=this.execCustomCommands(e,t,o)),!1!==i)if(this.selection.focus(),"selectall"===e)this.selection.select(this.editor,!0);else try{i=this.editorDocument.execCommand(e,t,o)}catch(e){}return this.events.fire("afterCommand",e,t,o),this.setEditorValue(),i}},Jodit.prototype.execCustomCommands=function(e,t,o){var i,n;if(void 0===t&&(t=!1),void 0===o&&(o=null),e=e.toLowerCase(),void 0!==this.commands[e]){for(var r,a=0;a
'+(i.options.resizable?'
':"")+"
"),e&&e.id&&i.container.setAttribute("data-editor_id",e.id),Object.defineProperty(i.container,"__jodit_dialog",{value:i}),i.dialog=i.container.querySelector(".jodit_dialog"),i.resizer=i.container.querySelector(".jodit_dialog_resizer"),i.jodit&&i.jodit.options&&i.jodit.options.textIcons&&i.container.classList.add("jodit_text_icons"),i.dialogbox_header=i.container.querySelector(".jodit_dialog_header>.jodit_dialog_header-title"),i.dialogbox_content=i.container.querySelector(".jodit_dialog_content"),i.dialogbox_footer=i.container.querySelector(".jodit_dialog_footer"),i.dialogbox_toolbar=i.container.querySelector(".jodit_dialog_header>.jodit_dialog_header-toolbar"),i.destination.appendChild(i.container),i.container.addEventListener("close_dialog",i.close),i.toolbar=h.JoditToolbarCollection.makeCollection(i),i.toolbar.build(i.options.buttons,i.dialogbox_toolbar),i.events.on(o.window,"mousemove",i.onMouseMove).on(o.window,"mouseup",i.onMouseUp).on(o.window,"keydown",i.onKeyDown).on(o.window,"resize",i.onResize);var n=i.container.querySelector(".jodit_dialog_header");return n&&n.addEventListener("mousedown",i.onHeaderMouseDown.bind(i)),i.options.resizable&&i.resizer.addEventListener("mousedown",i.onResizerMouseDown.bind(i)),p.Jodit.plugins.fullsize(i),o}t.Dialog=u;var p=o(12),h=o(36)},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var u,d=o(0),f=o(4),p=o(6);(u=t.Widget||(t.Widget={})).ColorPickerWidget=function(n,r,e){function a(e,t){e.innerHTML=p.ToolbarIcon.getIcon("eye"),e.classList.add("active");var o=f.hexToRgb(t);o&&(e.firstChild.style.fill="rgb("+(255-o.r)+","+(255-o.g)+","+(255-o.b)+")")}var i=f.normalizeColor(e),s=n.create.div("jodit_colorpicker"),l=n.options.textIcons?"":p.ToolbarIcon.getIcon("eye"),t=n.options.textIcons?""+n.i18n("eraser")+"":p.ToolbarIcon.getIcon("eraser"),o=n.options.textIcons?""+n.i18n("palette")+"":p.ToolbarIcon.getIcon("palette"),c=function(t){var o=[];return f.isPlainObject(t)?Object.keys(t).forEach(function(e){o.push('
'),o.push(c(t[e])),o.push("
")}):Array.isArray(t)&&t.forEach(function(e){o.push("'+(i===e?l:"")+"")}),o.join("")};return s.appendChild(n.create.fromHTML("
"+c(n.options.colors)+"
")),s.appendChild(n.create.fromHTML("'+t+"")),n.options.showBrowserColorPicker&&f.hasBrowserColorPicker()&&(s.appendChild(n.create.fromHTML(""+o+'')),n.events.on(s,"change",function(e){e.stopPropagation();var t=e.target;if(t&&t.tagName&&"INPUT"==t.tagName.toUpperCase()){var o=t.value||"";o&&a(t,o),r&&"function"==typeof r&&r(o),e.preventDefault()}})),n.events.on(s,"mousedown touchend",function(e){e.stopPropagation();var t=e.target;if(t&&t.tagName&&"SVG"!=t.tagName.toUpperCase()&&"PATH"!=t.tagName.toUpperCase()||!t.parentNode||(t=d.Dom.closest(t.parentNode,"A",n.editor)),"A"==t.tagName.toUpperCase()){var o=s.querySelector("a.active");o&&(o.classList.remove("active"),o.innerHTML="");var i=t.getAttribute("data-color")||"";i&&a(t,i),r&&"function"==typeof r&&r(i),e.preventDefault()}}),s},u.TabsWidget=function(r,e,a){var t=r.create.div("jodit_tabs"),s=r.create.div("jodit_tabs_wrapper"),l=r.create.div("jodit_tabs_buttons"),c={},d="",u=0;return t.appendChild(l),t.appendChild(s),f.each(e,function(t,o){var i=r.create.div("jodit_tab"),n=r.create.element("a",{href:"javascript:void(0);"});d=d||""+t,n.innerHTML=/'+t.i18n(n?"Drop image":"Drop file")+"
"+t.i18n("or click")+'
');t.getInstance("Uploader").bind(s,function(e){"function"==typeof o.upload&&o.upload.call(t,{baseurl:e.baseurl,files:e.files})},function(e){t.events.fire("errorMessage",e.message)}),a[(t.options.textIcons?"":p.ToolbarIcon.getIcon("upload"))+t.i18n("Upload")]=s}if(o.filebrowser&&(t.options.filebrowser.ajax.url||t.options.filebrowser.items.url)&&(a[(t.options.textIcons?"":p.ToolbarIcon.getIcon("folder"))+t.i18n("Browse")]=function(){i&&i(),o.filebrowser&&t.getInstance("FileBrowser").open(o.filebrowser,n)}),o.url){var l=t.create.fromHTML('
"),c=l.querySelector("button"),d=l.querySelector("input[name=url]");r=null,e&&e.nodeType!==Node.TEXT_NODE&&("IMG"===e.tagName||f.$$("img",e).length)&&(r="IMG"===e.tagName?e:f.$$("img",e)[0],f.val(l,"input[name=url]",r.getAttribute("src")),f.val(l,"input[name=text]",r.getAttribute("alt")),c.innerText=t.i18n("Update")),e&&e.nodeType!==Node.TEXT_NODE&&"A"===e.nodeName&&(f.val(l,"input[name=url]",e.getAttribute("href")||""),f.val(l,"input[name=text]",e.getAttribute("title")||""),c.innerText=t.i18n("Update")),l.addEventListener("submit",function(e){return e.preventDefault(),e.stopPropagation(),f.val(l,"input[name=url]")?"function"==typeof o.url&&o.url.call(t,f.val(l,"input[name=url]"),f.val(l,"input[name=text]")):(d.focus(),d.classList.add("jodit_error")),!1},!1),a[(t.options.textIcons?"":p.ToolbarIcon.getIcon("link"))+" URL"]=l}return u.TabsWidget(t,a)}},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setTimeout=function(e,t,o,i,n){return t?window.setTimeout.call(window,e,t,o,i,n):(e.call(null,o,i,n),0)}},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=o(1);i.__exportStar(o(90),t),i.__exportStar(o(91),t),i.__exportStar(o(92),t),i.__exportStar(o(93),t),i.__exportStar(o(94),t),i.__exportStar(o(95),t),i.__exportStar(o(96),t),i.__exportStar(o(49),t),i.__exportStar(o(97),t)},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var s,i=o(1),n=o(35),a=o(0),l=o(10),r=o(2),c=o(15),d=(i.__extends(u,s=n.ToolbarCollection),u.prototype.buttonIsActive=function(e){var t=this,o=s.prototype.buttonIsActive.call(this,e);if(void 0!==o)return o;var i,n,r=!!this.jodit.selection&&this.jodit.selection.current();return!(!r||!((e.control.tags||e.control.options&&e.control.options.tags)&&(i=e.control.tags||e.control.options&&e.control.options.tags,a.Dom.up(r,function(e){if(e&&~i.indexOf(e.nodeName.toLowerCase()))return!0},this.jodit.editor))||(e.control.css||e.control.options&&e.control.options.css)&&(n=e.control.css||e.control.options&&e.control.options.css,a.Dom.up(r,function(e){if(e&&e.nodeType!==Node.TEXT_NODE)return t.checkActiveStatus(n,e)},this.jodit.editor))))},u.prototype.buttonIsDisabled=function(e){var t=s.prototype.buttonIsDisabled.call(this,e);if(void 0!==t)return t;var o=void 0===e.control||void 0===e.control.mode?r.MODE_WYSIWYG:e.control.mode;return!(o===r.MODE_SPLIT||o===this.jodit.getRealMode())},u.prototype.getTarget=function(e){return e.target||this.jodit.selection.current()||void 0},u.makeCollection=function(e){var t=c.isJoditObject(e)?new u(e):new n.ToolbarCollection(e);return e.options.textIcons&&t.container.classList.add("jodit_text_icons"),t},u);function u(){var a=null!==s&&s.apply(this,arguments)||this;return a.checkActiveStatus=function(o,i){var n=0,r=0;return Object.keys(o).forEach(function(e){var t=o[e];"function"==typeof t?t(a.jodit,""+l.css(i,e))&&(n+=1):~t.indexOf(""+l.css(i,e))&&(n+=1),r+=1}),r===n},a}t.JoditToolbarCollection=d},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=o(42),n=o(32);t.isPlainObject=function(e){return!("object"!=typeof e||e.nodeType||i.isWindow(e)||e.constructor&&!n.hasOwn.call(e.constructor.prototype,"isPrototypeOf"))}},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isNumeric=function(e){if("string"==typeof e){if(!e.match(/^([+\-])?[0-9]+(\.?)([0-9]+)?(e[0-9]+)?$/))return!1;e=parseFloat(e)}return!isNaN(e)&&isFinite(e)}},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=o(1);i.__exportStar(o(98),t),i.__exportStar(o(99),t),i.__exportStar(o(100),t)},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.each=function(e,t){var o,i,n;if(Array.isArray(e)){for(o=e.length,n=0;n'+this.jodit.i18n(t?t.name:e)+"");var i=this.jodit.events.fire("getIcon",o,t,e),n=void 0;return t&&t.iconURL&&void 0===i?(n=this.jodit.create.element("i")).style.backgroundImage="url("+t.iconURL+")":(void 0===i&&(i=s.ToolbarIcon.exists(o)?s.ToolbarIcon.getIcon(o):s.ToolbarIcon.getIcon("empty")),n="string"==typeof i?this.jodit.create.fromHTML(c.trim(i)):i),n.classList.add("jodit_icon","jodit_icon_"+e),n},u);function u(e,t,o){void 0===t&&(t="li"),void 0===o&&(o="jodit_toolbar_btn");var i=this;return e instanceof a.ToolbarCollection?(i=n.call(this,e.jodit)||this).parentToolbar=e:i=n.call(this,e)||this,i.container=i.jodit.create.element(t),i.container.classList.add(o),i}t.ToolbarElement=d},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var c,i=o(1),d=o(0),u=o(4),n=o(25),f=o(112),p=o(27),h=o(113),v=o(15),m=o(2),g=o(6),r=(i.__extends(a,c=n.ToolbarElement),Object.defineProperty(a.prototype,"disable",{get:function(){return this.__disabled},set:function(e){this.__disabled=e,this.container.classList.toggle("jodit_disabled",e),e?this.container.hasAttribute("disabled")||this.container.setAttribute("disabled","disabled"):this.container.hasAttribute("disabled")&&this.container.removeAttribute("disabled")},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"active",{get:function(){return this.__actived},set:function(e){this.__actived=e,this.container.classList.toggle("jodit_active",e)},enumerable:!0,configurable:!0}),a.prototype.isDisable=function(){return!(!this.parentToolbar||!this.parentToolbar.buttonIsDisabled(this))},a.prototype.isActive=function(){return!(!this.parentToolbar||!this.parentToolbar.buttonIsActive(this))},Object.defineProperty(a.prototype,"tooltipText",{get:function(){return this.control.tooltip?this.jodit.i18n(this.control.tooltip)+(this.control.hotkeys?"
"+u.asArray(this.control.hotkeys).join(" "):""):""},enumerable:!0,configurable:!0}),a.prototype.focus=function(){this.anchor.focus()},a.prototype.destruct=function(){this.isDestructed||(this.jodit&&this.jodit.events&&this.jodit.events.off(this.container),c.prototype.destruct.call(this),this.tooltip&&(this.tooltip.destruct(),delete this.tooltip))},a);function a(e,t,o){var a=c.call(this,e)||this;a.__disabled=!1,a.__actived=!1,a.onMouseDown=function(e){if("keydown"!==e.type||e.which===m.KEY_ENTER){if(e.stopImmediatePropagation(),e.preventDefault(),a.disable)return!1;var t=a.control,o=function(){return a.parentToolbar&&a.parentToolbar.getTarget(a)||a.target||!1};if(t.list){var i=new f.PopupList(a.jodit,a.container,a.target);i.open(t),a.jodit.events.fire("closeAllPopups",i.container),a.anchor.setAttribute("aria-expanded","true"),a.jodit.events.on(i,"afterClose",function(){a.anchor.setAttribute("aria-expanded","false")})}else if(void 0!==t.exec&&"function"==typeof t.exec)t.exec(a.jodit,o(),t,e,a.container),a.jodit.events.fire("synchro"),a.parentToolbar&&a.parentToolbar.immedateCheckActiveButtons(),a.jodit.events.fire("closeAllPopups afterExec");else if(void 0!==t.popup&&"function"==typeof t.popup){var n=new p.Popup(a.jodit,a.container,a.target);if(!1!==a.jodit.events.fire(u.camelCase("before-"+t.name+"-OpenPopup"),o(),t,n)){var r=t.popup(a.jodit,o(),t,n.close,a);r&&n.open(r)}a.jodit.events.fire(u.camelCase("after-"+t.name+"-OpenPopup")+" closeAllPopups",n.container)}else(t.command||t.name)&&(v.isJoditObject(a.jodit)?a.jodit.execCommand(t.command||t.name,t.args&&t.args[0]||!1,t.args&&t.args[1]||null):a.jodit.ownerDocument.execCommand(t.command||t.name,t.args&&t.args[0]||!1,t.args&&t.args[1]||null),a.jodit.events.fire("closeAllPopups"))}},a.control=t,a.target=o,a.anchor=a.jodit.create.element("a",{role:"button",href:"javascript:void(0)"});var i="-1";a.jodit.options.allowTabNavigation&&(i="0"),a.anchor.setAttribute("tabindex",i),a.container.appendChild(a.anchor),a.jodit.options.showTooltip&&t.tooltip&&(a.jodit.options.useNativeTooltip?a.anchor.setAttribute("title",a.tooltipText):a.tooltip=new h.ToolbarTooltip(a),a.anchor.setAttribute("aria-label",a.tooltipText)),a.textBox=a.jodit.create.span(),a.anchor.appendChild(a.textBox);var n=t.name.replace(/[^a-zA-Z0-9]/g,"_");if(t.getContent&&"function"==typeof t.getContent){d.Dom.detach(a.container);var r=t.getContent(a.jodit,t,a);a.container.appendChild("string"==typeof r?a.jodit.create.fromHTML(r):r)}else{if(t.list&&a.anchor){var s=a.jodit.create.fromHTML(g.ToolbarIcon.getIcon("dropdown-arrow"));s.classList.add("jodit_with_dropdownlist-trigger"),a.container.classList.add("jodit_with_dropdownlist"),a.anchor.appendChild(s)}a.textBox.appendChild(a.createIcon(n,t))}if(a.container.classList.add("jodit_toolbar_btn-"+n),a.jodit.options.direction){var l=a.jodit.options.direction.toLowerCase();a.container.style.direction="rtl"==l?"rtl":"ltr"}return t.isInput?a.container.classList.add("jodit_toolbar-input"):a.jodit.events.on(a.container,"mousedown touchend keydown",a.onMouseDown).on("click-"+n+"-btn",a.onMouseDown),a}t.ToolbarButton=r},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=o(1),a=o(0),s=o(4),n=o(8),l=(i.__extends(c,r=n.Component),c.prototype.calcPosition=function(){if(this.isOpened&&!this.isDestructed){var t=this.container,e=s.offset(this.jodit.container,this.jodit,this.jodit.ownerDocument,!0),o=s.offset(t,this.jodit,this.jodit.ownerDocument,!0),i=s.css(t,"marginLeft")||0;o.left-=i;var n=i,r="auto";if(n=o.left',this.container.appendChild(a.Dom.isNode(e,this.jodit.ownerWindow)?e:this.jodit.create.fromHTML(""+e)),this.container.style.display="block",this.container.style.marginLeft=null)},c.prototype.doClose=function(){},c.prototype.open=function(e,t,o){void 0===o&&(o=!1),d.Jodit.fireEach("beforeOpenPopup closeAllPopups",this,e),o||this.jodit.events.on("closeAllPopups",this.close),this.container.classList.add(this.className+"-open"),this.doOpen(e),this.target.appendChild(this.container),this.jodit.options.textIcons&&this.firstInFocus(),void 0!==t&&this.container.classList.toggle("jodit_right",t),!o&&this.container.parentNode&&this.jodit.events.fire(this.container.parentNode,"afterOpenPopup",this.container),this.isOpened=!0,o||this.calcPosition()},c.prototype.firstInFocus=function(){},c.prototype.destruct=function(){this.isDestructed||(this.jodit.events.off([this.jodit.ownerWindow,this.jodit.events],"resize",this.throttleCalcPosition),a.Dom.safeRemove(this.container),delete this.container,r.prototype.destruct.call(this))},c);function c(e,t,o,i){void 0===i&&(i="jodit_toolbar_popup");var n=r.call(this,e)||this;return n.target=t,n.current=o,n.className=i,n.throttleCalcPosition=s.throttle(n.calcPosition,n.jodit.defaultTimeout),n.isOpened=!1,n.close=function(e){(n.isOpened||n.isDestructed)&&(e&&a.Dom.isOrContains(n.container,e instanceof c?e.target:e)||(n.isOpened=!1,n.jodit.events.off("closeAllPopups",n.close),n.doClose(),a.Dom.safeRemove(n.container),n.jodit.events.fire("removeMarkers"),n.jodit.events.fire(n,"afterClose")))},n.container=n.jodit.create.div(i,{"data-editor_id":e.id}),n.jodit.events.on(n.container,"mousedown touchstart touchend",function(e){e.stopPropagation()}).on([n.jodit.ownerWindow,n.jodit.events],"resize",n.throttleCalcPosition),n}t.Popup=l;var d=o(12)},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var h=o(2),v=o(0),m=o(4),i=(g.addSelected=function(e){e.setAttribute(h.JODIT_SELECTED_CELL_MARKER,"1")},g.restoreSelection=function(e){e.removeAttribute(h.JODIT_SELECTED_CELL_MARKER)},g.getAllSelectedCells=function(e){return e?m.$$("td["+h.JODIT_SELECTED_CELL_MARKER+"],th["+h.JODIT_SELECTED_CELL_MARKER+"]",e):[]},g.getRowsCount=function(e){return e.rows.length},g.getColumnsCount=function(e){return g.formalMatrix(e).reduce(function(e,t){return Math.max(e,t.length)},0)},g.formalMatrix=function(e,s){for(var l=[[]],t=Array.prototype.slice.call(e.rows),o=function(e,t){void 0===l[t]&&(l[t]=[]);for(var o,i,n=e.colSpan,r=e.rowSpan,a=0;l[t][a];)a+=1;for(i=0;itbody",e)[0]||e).appendChild(r)},g.removeRow=function(r,a){var s,l=g.formalMatrix(r),c=r.rows[a];m.each(l[a],function(e,t){if(s=!1,a-1<0||l[a-1][e]!==t)if(l[a+1]&&l[a+1][e]===t){if(t.parentNode===c&&t.parentNode.nextSibling){s=!0;for(var o=e+1;l[a+1][o]===t;)o+=1;var i=v.Dom.next(t.parentNode,function(e){return e&&e.nodeType===Node.ELEMENT_NODE&&"TR"===e.nodeName},r);l[a+1][o]?i.insertBefore(t,l[a+1][o]):i.appendChild(t)}}else v.Dom.safeRemove(t);else s=!0;if(s&&(t.parentNode===c||t!==l[a][e-1])){var n=t.rowSpan;1/g,""))&&a.push(e.innerHTML),1"),delete c.__i_am_already_was,g.__unmark(p),g.normalizeTable(e),m.each(Array.from(e.rows),function(e,t){t.cells.length||v.Dom.safeRemove(t)})))},g.splitHorizontal=function(n){var r,e,t,a,s,l=[],o=n.ownerDocument||document;g.getAllSelectedCells(n).forEach(function(i){(e=o.createElement("td")).appendChild(o.createElement("br")),t=o.createElement("tr"),r=g.formalCoordinate(n,i),i.rowSpan<2?(g.formalMatrix(n,function(e,t,o){r[0]===t&&r[1]!==o&&e!==i&&g.__mark(e,"rowspan",e.rowSpan+1,l)}),v.Dom.after(v.Dom.closest(i,"tr",n),t),t.appendChild(e)):(g.__mark(i,"rowspan",i.rowSpan-1,l),g.formalMatrix(n,function(e,t,o){r[0]'+(t.icon?s.ToolbarIcon.getIcon(t.icon):"")+""),o=e.querySelector("span");e.addEventListener("click",function(e){return t.exec&&t.exec.call(r,e),r.hide(),!1}),o.innerText=r.jodit.i18n(t.title||""),r.context.appendChild(e)}}),a.css(r.context,{left:e,top:t}),this.jodit.events.on(this.jodit.ownerWindow,"mouseup jodit_close_dialog",r.hide),this.context.classList.add("jodit_context_menu-show"))},d.prototype.destruct=function(){l.Dom.safeRemove(this.context),delete this.context,this.jodit.events.off(this.jodit.ownerWindow,"mouseup",this.hide),i.prototype.destruct.call(this)},d);function d(e){var t=i.call(this,e)||this;return t.hide=function(){t.context.classList.remove("jodit_context_menu-show"),t.jodit.ownerWindow.removeEventListener("mouseup",t.hide)},t.context=e.create.div("jodit_context_menu",{"data-editor_id":t.jodit.id}),e.ownerDocument.body.appendChild(t.context),t}t.ContextMenu=c},function(e,u,t){"use strict";Object.defineProperty(u,"__esModule",{value:!0});var a=t(1),l=t(3),d=t(2),f=t(16),i=t(65),r=t(64),p=t(6),h=t(59),v=t(34),o=t(24),m=t(19),g=t(11),s=t(53),_=t(14),b=t(18),n=t(60);t(134);var y=t(0),w=t(5),c=t(13),C=t(135),E=t(136),j=t(137),T=t(138),S=t(139),x=t(140);u.F_CLASS="jodit_filebrowser",u.ITEM_CLASS=u.F_CLASS+"_files_item",u.ICON_LOADER='';var k,L=u.ITEM_CLASS+"-active-true",D=(a.__extends(z,k=n.ViewWithToolbar),Object.defineProperty(z.prototype,"defaultTimeout",{get:function(){return this.jodit&&this.jodit!==this?this.jodit.defaultTimeout:l.Config.defaultOptions.observer.timeout},enumerable:!0,configurable:!0}),z.prototype.loadItems=function(t,o){return void 0===t&&(t=this.dataProvider.currentPath),void 0===o&&(o=this.dataProvider.currentSource),a.__awaiter(this,void 0,void 0,function(){var i=this;return a.__generator(this,function(e){return this.files.classList.add("active"),this.files.appendChild(this.loader.cloneNode(!0)),[2,this.dataProvider.items(t,o).then(function(e){var t=i.options.items.process;if(t=t||i.options.ajax.process){var o=t.call(self,e);i.generateItemsList(o.data.sources),i.state.activeElements=[]}}).catch(function(e){c.Alert(e.message),i.errorHandler(e)})]})})},z.prototype.loadTree=function(){return a.__awaiter(this,void 0,void 0,function(){var t,o,i,n,r=this;return a.__generator(this,function(e){return t=this.dataProvider.currentPath,o=this.dataProvider.currentSource,this.uploader&&(this.uploader.setPath(t),this.uploader.setSource(o)),this.tree.classList.add("active"),y.Dom.detach(this.tree),this.tree.appendChild(this.loader.cloneNode(!0)),this.options.showFoldersPanel?(i=this.dataProvider.tree(t,o).then(function(e){var t=r.options.folder.process;if(t=t||r.options.ajax.process){var o=t.call(self,e);r.generateFolderTree(o.data.sources)}}).catch(function(){r.errorHandler(Error(r.jodit.i18n("Error on load folders")))}),n=this.loadItems(t,o),[2,Promise.all([i,n])]):(this.tree.classList.remove("active"),[2])})})},z.prototype.deleteFile=function(o,i){return a.__awaiter(this,void 0,void 0,function(){var t=this;return a.__generator(this,function(e){return[2,this.dataProvider.fileRemove(this.dataProvider.currentPath,o,i).then(function(e){if(t.options.remove&&t.options.remove.process&&(e=t.options.remove.process.call(t,e)),!t.options.isSuccess(e))throw Error(t.options.getMessage(e));t.status(t.options.getMessage(e)||t.i18n('File "%s" was deleted',o),!0)}).catch(this.status)]})})},z.prototype.generateFolderTree=function(e){var i=[];o.each(e,function(t,o){o.folders.forEach(function(e){i.push({name:e,source:o,sourceName:t})})}),this.state.folders=i},z.prototype.generateItemsList=function(e){var i=this,n=[],r=this.state;o.each(e,function(t,o){o.files&&o.files.length&&("function"==typeof i.options.sort&&o.files.sort(function(e,t){return i.options.sort(e,t,r.sortBy)}),o.files.forEach(function(e){r.filterWord.length&&void 0!==i.options.filter&&!i.options.filter(e,r.filterWord)||i.state.onlyImages&&void 0!==e.isImage&&!e.isImage||n.push(T.FileBrowserItem.create(a.__assign({},e,{sourceName:t,source:o})))}))}),this.state.elements=n},z.prototype.onSelect=function(e){var t=this;return function(){if(t.state.activeElements.length){var o=[];t.state.activeElements.forEach(function(e){var t=e.fileURL;t&&o.push(t)}),t.close(),"function"==typeof e&&e({baseurl:"",files:o})}return!1}},z.prototype.isOpened=function(){return this.dialog.isOpened()&&"none"!==this.browser.style.display},z.prototype.elementToItem=function(e){return this.elementsMap[e.dataset.key||""].item},z.prototype.stateToView=function(){var l=this,e=this.state,t=this.files,c=this.create,d=this.options;e.on("beforeChange.activeElements",function(){e.activeElements.forEach(function(e){var t=l.elementsMap[e.uniqueHashKey].elm;t&&t.classList.remove(L)})}).on("change.activeElements",function(){l.events.fire("changeSelection"),e.activeElements.forEach(function(e){var t=l.elementsMap[e.uniqueHashKey].elm;t&&t.classList.add(L)})}).on("change.view",function(){t.classList.remove(u.F_CLASS+"_files_view-tiles"),t.classList.remove(u.F_CLASS+"_files_view-list"),t.classList.add(u.F_CLASS+"_files_view-"+e.view),l.storage.set(u.F_CLASS+"_view",e.view)}).on("change.sortBy",function(){l.storage.set(u.F_CLASS+"_sortby",e.sortBy)}).on("change.elements",w.debounce(function(){y.Dom.detach(t),e.elements.length?e.elements.forEach(function(e){l.files.appendChild(function(e){var t=e.uniqueHashKey;if(l.elementsMap[t])return l.elementsMap[t].elm;var o=c.fromHTML(d.getThumbTemplate.call(l,e,e.source,""+e.sourceName));return l.elementsMap[o.dataset.key=t]={item:e,elm:o},l.elementsMap[t].elm}(e))}):t.appendChild(c.div(u.F_CLASS+"_no_files",l.i18n("There are no files")))},this.defaultTimeout)).on("change.folders",w.debounce(function(){function r(e,t,o){void 0===o&&(o=!1),e&&s&&(e!==s||o)&&d.createNewFolder&&l.dataProvider.canI("FolderCreate")&&(l.tree.appendChild(c.a("jodit_button addfolder",{href:"javascript:void(0)","data-path":m.normalizePath(e.path+"/"),"data-source":t},p.ToolbarIcon.getIcon("plus")+" "+l.i18n("Add folder"))),s=e)}y.Dom.detach(l.tree);var a="default",s=null;e.folders.forEach(function(e){var t=e.name,o=e.source,i=e.sourceName;i&&i!==a&&(l.tree.appendChild(c.div(u.F_CLASS+"_source_title",i)),a=i);var n=c.a(u.F_CLASS+"_tree_item",{draggable:"draggable",href:"javascript:void(0)","data-path":m.normalizePath(o.path,t+"/"),"data-name":t,"data-source":i,"data-source-path":o.path},c.span(u.F_CLASS+"_tree_item_title",t));r(o,i),s=o,l.tree.appendChild(n),".."!==t&&"."!==t&&(d.deleteFolder&&l.dataProvider.canI("FolderRename")&&n.appendChild(c.element("i",{class:"jodit_icon_folder jodit_icon_folder_rename",title:l.i18n("Rename")},p.ToolbarIcon.getIcon("pencil"))),d.deleteFolder&&l.dataProvider.canI("FolderRemove")&&n.appendChild(c.element("i",{class:"jodit_icon_folder jodit_icon_folder_remove",title:l.i18n("Delete")},p.ToolbarIcon.getIcon("cancel"))))}),r(s,a,!0)},this.defaultTimeout))},z.prototype.initEventsListeners=function(){var t=this,o=this.state,n=this;n.events.on("view.filebrowser",function(e){e!==o.view&&(o.view=e)}).on("sort.filebrowser",function(e){e!==o.sortBy&&(o.sortBy=e,n.loadItems())}).on("filter.filebrowser",function(e){e!==o.filterWord&&(o.filterWord=e,n.loadItems())}).on("fileRemove.filebrowser",function(){n.state.activeElements.length&&i.Confirm(n.i18n("Are you sure?"),"",function(e){if(e){var t=[];n.state.activeElements.forEach(function(e){t.push(n.deleteFile(e.file||e.name||"",e.sourceName))}),n.state.activeElements=[],Promise.all(t).then(function(){return n.loadTree()})}})}).on("edit.filebrowser",function(){if(1===n.state.activeElements.length){var e=t.state.activeElements[0];n.openImageEditor(e.fileURL,e.file||"",e.path,e.sourceName)}}).on("fileRename.filebrowser",function(t,o,i){1===n.state.activeElements.length&&r.Promt(n.i18n("Enter new name"),n.i18n("Rename"),function(e){if(!x.isValidName(e))return n.status(n.i18n("Enter new name")),!1;n.dataProvider.fileRename(o,t,e,i).then(function(e){if(n.options.fileRename&&n.options.fileRename.process&&(e=n.options.fileRename.process.call(n,e)),!n.options.isSuccess(e))throw Error(n.options.getMessage(e));n.state.activeElements=[],n.status(n.options.getMessage(e),!0),n.loadItems()}).catch(n.status)},n.i18n("type name"),t)}).on("update.filebrowser",function(){n.loadTree()})},z.prototype.initNativeEventsListeners=function(){var t=this,o=!1,n=this;n.events.on(n.tree,"click",function(e){var t=this.parentNode,o=t.getAttribute("data-path")||"";return i.Confirm(n.i18n("Are you sure?"),n.i18n("Delete"),function(e){e&&n.dataProvider.folderRemove(o,t.getAttribute("data-name")||"",t.getAttribute("data-source")||"").then(function(e){if(n.options.folderRemove&&n.options.folderRemove.process&&(e=n.options.folderRemove.process.call(n,e)),!n.options.isSuccess(e))throw Error(n.options.getMessage(e));n.state.activeElements=[],n.status(n.options.getMessage(e),!0),n.loadTree()}).catch(n.status)}),e.stopImmediatePropagation(),!1},"a>.jodit_icon_folder_remove").on(n.tree,"click",function(e){var t=this.parentNode,o=t.getAttribute("data-name")||"",i=t.getAttribute("data-source-path")||"";return r.Promt(n.i18n("Enter new name"),n.i18n("Rename"),function(e){if(!x.isValidName(e))return n.status(n.i18n("Enter new name")),!1;n.dataProvider.folderRename(i,t.getAttribute("data-name")||"",e,t.getAttribute("data-source")||"").then(function(e){if(n.options.folderRename&&n.options.folderRename.process&&(e=n.options.folderRename.process.call(n,e)),!n.options.isSuccess(e))throw Error(n.options.getMessage(e));n.state.activeElements=[],n.status(n.options.getMessage(e),!0),n.loadTree()}).catch(n.status)},n.i18n("type name"),o),e.stopImmediatePropagation(),!1},"a>.jodit_icon_folder_rename").on(n.tree,"click",function(){var t=this;this.classList.contains("addfolder")?r.Promt(n.i18n("Enter Directory name"),n.i18n("Create directory"),function(e){n.dataProvider.createFolder(e,t.getAttribute("data-path")||"",t.getAttribute("data-source")||"").then(function(e){return n.options.isSuccess(e)?n.loadTree():n.status(n.options.getMessage(e)),e},n.status)},n.i18n("type name")):(n.dataProvider.currentPath=this.getAttribute("data-path")||"",n.dataProvider.currentSource=this.getAttribute("data-source")||"",n.loadTree())},"a").on(n.tree,"dragstart",function(){n.options.moveFolder&&(o=this)},"a").on(n.tree,"drop",function(){if((n.options.moveFile||n.options.moveFolder)&&o){var e=o.getAttribute("data-path")||"";if(!n.options.moveFolder&&o.classList.contains(u.F_CLASS+"_tree_item"))return!1;if(o.classList.contains(u.ITEM_CLASS)&&(e+=o.getAttribute("data-name"),!n.options.moveFile))return!1;n.dataProvider.move(e,this.getAttribute("data-path")||"",this.getAttribute("data-source")||"",o.classList.contains(u.ITEM_CLASS)).then(function(e){n.options.isSuccess(e)?n.loadTree():n.status(n.options.getMessage(e))},n.status),o=!1}},"a").on(n.files,"contextmenu",E.default(n),"a").on(n.files,"click",function(e){s.ctrlKey(e)||(t.state.activeElements=[])}).on(n.files,"click",function(e){var t=n.elementToItem(this);if(t)return n.state.activeElements=s.ctrlKey(e)?n.state.activeElements.concat([t]):[t],e.stopPropagation(),!1},"a").on(n.files,"dragstart",function(){n.options.moveFile&&(o=this)},"a").on(n.dialog.container,"drop",function(e){return e.preventDefault()})},z.prototype.initUploader=function(e){function t(){o.loadItems()}var o=this,i=this,n=_.extend(!0,{},l.Config.defaultOptions.uploader,i.options.uploader,e&&e.options&&null!==e.options.uploader?a.__assign({},e.options.uploader):{});i.uploader=i.getInstance("Uploader",n),i.uploader.setPath(i.dataProvider.currentPath),i.uploader.setSource(i.dataProvider.currentSource),i.uploader.bind(i.browser,t,i.errorHandler),i.events.on("bindUploader.filebrowser",function(e){i.uploader.bind(e,t,i.errorHandler)})},z.prototype.destruct=function(){this.dialog.destruct(),delete this.dialog,this.events&&this.events.off(".filebrowser"),this.uploader&&this.uploader.destruct(),delete this.uploader,k.prototype.destruct.call(this)},z);function z(e,t){var c=k.call(this,e,t)||this;c.loader=c.create.div(u.F_CLASS+"_loader",u.ICON_LOADER),c.browser=c.create.div(u.F_CLASS+" non-selected"),c.status_line=c.create.div(u.F_CLASS+"_status"),c.tree=c.create.div(u.F_CLASS+"_tree"),c.files=c.create.div(u.F_CLASS+"_files"),c.state=j.ObserveObject.create({activeElements:[],elements:[],folders:[],view:"tiles",sortBy:"changed-desc",filterWord:"",onlyImages:!1}),c.errorHandler=function(e){c.status(e instanceof Error?c.i18n(e.message):c.options.getMessage(e))},c.status=function(e,t){"string"!=typeof e&&(e=e.message),clearTimeout(c.statusTimer),c.status_line.classList.remove("success"),c.status_line.classList.add("active");var o=c.create.div();o.textContent=e,c.status_line.appendChild(o),t&&c.status_line.classList.add("success"),c.statusTimer=b.setTimeout(function(){c.status_line.classList.remove("active"),y.Dom.detach(c.status_line)},c.options.howLongShowMsg)},c.close=function(){c.dialog.close()},c.open=function(i,e){return void 0===e&&(e=!1),c.state.onlyImages=e,new Promise(function(e){if(!c.options.items||!c.options.items.url)throw Error("Need set options.filebrowser.ajax.url");var t=0;c.events.off(c.files,"dblclick").on(c.files,"dblclick",c.onSelect(i),"a").on(c.files,"touchstart",function(){var e=(new Date).getTime();e-ta.length-a.replace(d.INVISIBLE_SPACE_REG_EXP_START,"").length)return!1;if(!o&&t.startOffset'+p.ToolbarIcon.getIcon("cancel")+""+h.Jodit.prototype.i18n("Cancel")+""),s=r.create.fromHTML(''+p.ToolbarIcon.getIcon("check")+""+h.Jodit.prototype.i18n("Ok")+""),l=r.create.element("form",{class:"jodit_promt"}),c=r.create.element("input",{autofocus:!0,class:"jodit_input"}),d=r.create.element("label");function u(){o&&"function"==typeof o&&!1===o(c.value)||r.close()}return"function"==typeof t&&(o=t,t=void 0),i&&c.setAttribute("placeholder",i),d.appendChild(r.create.text(e)),l.appendChild(d),l.appendChild(c),a.addEventListener("click",r.close,!1),s.addEventListener("click",u),l.addEventListener("submit",function(){return u(),!1}),r.setFooter([s,a]),r.open(l,t||" ",!0,!0),c.focus(),void 0!==n&&n.length&&(c.value=n,c.select()),r};var h=o(12)},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var c=o(16),d=o(6);t.Confirm=function(e,t,o){var i=new c.Dialog,n=i.create.fromHTML('
'),r=i.create.element("label");"function"==typeof t&&(o=t,t=void 0),r.appendChild(i.create.fromHTML(e)),n.appendChild(r);var a=i.create.fromHTML(''+d.ToolbarIcon.getIcon("cancel")+""+u.Jodit.prototype.i18n("Cancel")+"");function s(){o&&o(!0),i.close()}a.addEventListener("click",function(){o&&o(!1),i.close()});var l=i.create.fromHTML(''+d.ToolbarIcon.getIcon("check")+""+u.Jodit.prototype.i18n("Yes")+"");return l.addEventListener("click",s),n.addEventListener("submit",function(){return s(),!1}),i.setFooter([l,a]),i.open(n,t||" ",!0,!0),l.focus(),i};var u=o(12)},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),o(67),"undefined"!=typeof window&&o(68);var i=o(12),n=o(2),r=o(116),a=o(36),s=o(143),l=o(185),c=o(3),d=o(6);function u(e){return"__esModule"!==e}Object.keys(n).forEach(function(e){i.Jodit[e]=n[e]}),Object.keys(l).filter(u).forEach(function(e){d.ToolbarIcon.icons[e.replace("_","-")]=l[e]}),Object.keys(a).filter(u).forEach(function(e){i.Jodit.modules[e]=a[e]}),["Confirm","Alert","Promt"].forEach(function(e){i.Jodit[e]=a[e]}),Object.keys(s).filter(u).forEach(function(e){i.Jodit.plugins[e]=s[e]}),Object.keys(r).filter(u).forEach(function(e){i.Jodit.lang[e]=r[e]}),i.Jodit.defaultOptions=c.Config.defaultOptions,c.OptionsDefault.prototype=i.Jodit.defaultOptions,t.Jodit=i.Jodit,t.default=i.Jodit},function(e,t,o){},function(e,t,o){"use strict";var i;Object.defineProperty(t,"__esModule",{value:!0}),o(69),o(70),(i=Element.prototype).matches||(i.matches=void 0!==i.matchesSelector?i.matchesSelector:function(e){if(!this.ownerDocument)return[];var t=this.ownerDocument.querySelectorAll(e),o=this;return Array.prototype.some.call(t,function(e){return e===o})}),Array.from||(Array.from=function(e){return[].slice.call(e)})},function(e,t){"document"in window.self&&("classList"in document.createElement("_")&&(!document.createElementNS||"classList"in document.createElementNS("http://www.w3.org/2000/svg","g"))||function(e){"use strict";if("Element"in e){var t="classList",o="prototype",i=e.Element[o],n=Object,r=String[o].trim||function(){return this.replace(/^\s+|\s+$/g,"")},a=Array[o].indexOf||function(e){for(var t=0,o=this.length;t]*>(.*?)<\/\1>/m.test(e)}},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isHTMLFromWord=function(e){return-1!=e.search(//)||-1!=e.search(//)||-1!=e.search(/style="[^"]*mso-/)&&-1!=e.search(/"));var t=document.createElement("iframe");t.style.display="none",document.body.appendChild(t);var o="",i=[];try{var n=t.contentDocument||(t.contentWindow?t.contentWindow.document:null);if(n){n.open(),n.write(e),n.close(),n.styleSheets.length&&(i=n.styleSheets[n.styleSheets.length-1].cssRules);for(var r=function(t){if(""===i[t].selectorText)return"continue";l.$$(i[t].selectorText,n.body).forEach(function(e){e.style.cssText+=i[t].style.cssText.replace(/mso-[a-z\-]+:[\s]*[^;]+;/g,"").replace(/border[a-z\-]*:[\s]*[^;]+;/g,"")})},a=0;a]*>/g,"").replace(//i);-1!=t&&(e=e.substr(20+t));var o=e.search(//i);return-1!=o&&(e=e.substr(0,o)),e}var h="";d.events.on("copy cut",function(e){var t=d.selection.getHTML(),o=f(e)||f(d.editorWindow)||f(e.originalEvent);o&&(o.setData(v.TEXT_PLAIN,g.stripTags(t)),o.setData(v.TEXT_HTML,t)),h=t,"cut"===e.type&&(d.selection.remove(),d.selection.focus()),e.preventDefault(),d.events.fire("afterCopy",t)}).on("paste",function(e){if(!1===d.events.fire("beforePaste",e))return e.preventDefault(),!1;var t=f(e);if(e&&t){var o=t.types,i="",n="";if(Array.isArray(o)||"domstringlist"===g.type(o))for(var r=0;r])([\n\r]+)/g,"$1
$2")}},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=o(3),a=o(2),s=o(10),l=o(5),c=o(0);i.Config.prototype.showPlaceholder=!0,i.Config.prototype.useInputsPlaceholder=!0,i.Config.prototype.placeholder="Type something",t.placeholder=function(n){if(n.options.showPlaceholder){this.destruct=function(){c.Dom.safeRemove(r)};var t=function(){r.parentNode&&(r.style.display="none")},o=l.debounce(function(){if(null!==r.parentNode&&n.editor){if(n.getRealMode()!==a.MODE_WYSIWYG)return t();var e=n.getEditorValue();e&&!/^<(p|div|h[1-6])><\/\1>$/.test(e)?t():function(){if(r.parentNode&&!n.options.readonly){var e=0,t=0,o=n.editorWindow.getComputedStyle(n.editor);if(n.editor.firstChild&&n.editor.firstChild.nodeType===Node.ELEMENT_NODE){var i=n.editorWindow.getComputedStyle(n.editor.firstChild);e=parseInt(i.getPropertyValue("margin-top"),10),t=parseInt(i.getPropertyValue("margin-left"),10),r.style.fontSize=parseInt(i.getPropertyValue("font-size"),10)+"px",r.style.lineHeight=i.getPropertyValue("line-height")}else r.style.fontSize=parseInt(o.getPropertyValue("font-size"),10)+"px",r.style.lineHeight=o.getPropertyValue("line-height");s.css(r,{display:"block",marginTop:Math.max(parseInt(o.getPropertyValue("margin-top"),10),e),marginLeft:Math.max(parseInt(o.getPropertyValue("margin-left"),10),t)})}}()}},n.defaultTimeout/10),r=n.create.fromHTML('");"rtl"===n.options.direction&&(r.style.right="0px",r.style.direction="rtl"),n.options.useInputsPlaceholder&&n.element.hasAttribute("placeholder")&&(r.innerHTML=n.element.getAttribute("placeholder")||""),n.events.on("readonly",function(e){e?t():o()}).on("afterInit",function(){n.workplace.appendChild(r),o(),n.events.fire("placeholder",r.innerHTML),n.events.on("change keyup mouseup keydown mousedown afterSetMode",o).on(window,"load",o)})}}},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=o(1),n=o(3),r=o(2),a=o(7);n.Config.prototype.controls.redo={mode:r.MODE_SPLIT,isDisable:function(e){return!e.observer.stack.canRedo()},tooltip:"Redo"},n.Config.prototype.controls.undo={mode:r.MODE_SPLIT,isDisable:function(e){return!e.observer.stack.canUndo()},tooltip:"Undo"};var s,l=(i.__extends(c,s=a.Plugin),c.prototype.beforeDestruct=function(){},c.prototype.afterInit=function(t){function e(e){return t.getRealMode()===r.MODE_WYSIWYG&&t.observer[e](),!1}t.registerCommand("redo",{exec:e,hotkeys:["ctrl+y","ctrl+shift+z","cmd+y","cmd+shift+z"]}),t.registerCommand("undo",{exec:e,hotkeys:["ctrl+z","cmd+z"]})},c);function c(){return null!==s&&s.apply(this,arguments)||this}t.redoundo=l},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=o(3),T=o(2),S=o(2),x=o(0),k=o(11),L=o(5),D=o(23),z=o(4);i.Config.prototype.useIframeResizer=!0,i.Config.prototype.useTableResizer=!0,i.Config.prototype.useImageResizer=!0,i.Config.prototype.resizer={showSize:!0,hideSizeTimeout:1e3,min_width:10,min_height:10},t.resizer=function(r){function n(){w=y=!1,c=null,E.style.display="none"}function a(){j.style.opacity="0"}function s(){if(w&&c&&E){var e=D.offset(E.parentNode||r.ownerDocument.documentElement,r,r.ownerDocument,!0),t=D.offset(c,r,r.editorDocument),o=parseInt(E.style.left||"0",10),i=t.top-1-e.top,n=t.left-1-e.left;parseInt(E.style.top||"0",10)===i&&o===n&&E.offsetWidth===c.offsetWidth&&E.offsetHeight===c.offsetHeight||(E.style.top=i+"px",E.style.left=n+"px",E.style.width=c.offsetWidth+"px",E.style.height=c.offsetHeight+"px",r.events&&(r.events.fire(c,"changesize"),isNaN(o)||r.events.fire("resize")))}}var l,c,d,u,f,p,h,v,m,g,_,b=!1,y=!1,w=!1,C=0,E=r.create.fromHTML(''),j=E.getElementsByTagName("span")[0];k.$$("i",E).forEach(function(t){r.events.on(t,"mousedown touchstart",function(e){if(!c||!c.parentNode)return n(),!1;l=t,e.preventDefault(),e.stopImmediatePropagation(),h=(f=c.offsetWidth)/(p=c.offsetHeight),y=!0,d=e.clientX,u=e.clientY,r.events.fire("hidePopup"),r.lock("resizer")})}),r.events.on("readonly",function(e){e&&n()}).on("beforeDestruct",function(){x.Dom.safeRemove(E)}).on("afterInit",function(){r.events.on(r.editor,"keydown",function(e){w&&e.which===T.KEY_DELETE&&c&&"table"!=c.tagName.toLowerCase()&&("JODIT"!==c.tagName?r.selection.select(c):(x.Dom.safeRemove(c),n(),e.preventDefault()))}).on(r.ownerWindow,"mousemove touchmove",function(e){if(y){if(g=e.clientX-d,_=e.clientY-u,!c)return;var t=l.className;"IMG"===c.tagName?(g?(m=f+(t.match(/left/)?-1:1)*g,v=Math.round(m/h)):(v=p+(t.match(/top/)?-1:1)*_,m=Math.round(v*h)),m>D.innerWidth(r.editor,r.ownerWindow)&&(m=D.innerWidth(r.editor,r.ownerWindow),v=Math.round(m/h))):(m=f+(t.match(/left/)?-1:1)*g,v=p+(t.match(/top/)?-1:1)*_),r.options.resizer.min_width]+data-jodit_iframe_wrapper[^>]+>(.*?]+>[\s\n\r]*<\/iframe>.*?)<\/jodit>/gi;t.test(e.value)&&(e.value=e.value.replace(t,"$1"))}).on("hideResizer",n).on("change afterInit afterSetMode",L.debounce(function(){w&&(c&&c.parentNode?s():n()),r.isDestructed||k.$$("img, table, iframe",r.editor).forEach(function(e){r.getMode()!==T.MODE_SOURCE&&!e.__jodit_resizer_binded&&("IFRAME"===e.tagName&&r.options.useIframeResizer||"IMG"===e.tagName&&r.options.useImageResizer||"TABLE"===e.tagName&&r.options.useTableResizer)&&(e.__jodit_resizer_binded=!0,function(t){var e,o;if("IFRAME"===t.tagName){var i=t;t=t.parentNode&&t.parentNode.getAttribute("data-jodit_iframe_wrapper")?t.parentNode:((e=r.create.inside.fromHTML('')).style.display="inline-block"===t.style.display?"inline-block":"block",e.style.width=t.offsetWidth+"px",e.style.height=t.offsetHeight+"px",t.parentNode&&t.parentNode.insertBefore(e,t),e.appendChild(t),e),r.events.off(t,"mousedown.select touchstart.select").on(t,"mousedown.select touchstart.select",function(){r.selection.select(t)}),r.events.off(t,"changesize").on(t,"changesize",function(){i.setAttribute("width",t.offsetWidth+"px"),i.setAttribute("height",t.offsetHeight+"px")})}r.events.on(t,"dragstart",n).on(t,"mousedown",function(e){S.IS_IE&&"IMG"===t.nodeName&&e.preventDefault()}).on(t,"mousedown touchstart",function(){b||(b=!0,c=t,r.options.readonly||(E.parentNode||r.workplace.appendChild(E),w=!0,E.style.display="block",r.isFullSize()&&(E.style.zIndex=""+z.css(r.container,"zIndex")),s()),"IMG"!==c.tagName||c.complete||c.addEventListener("load",function e(){s(),c&&c.removeEventListener("load",e)}),clearTimeout(o)),o=L.setTimeout(function(){b=!1},400)})}(e))})},r.defaultTimeout))}},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=o(3),u=o(5),f=o(10);i.Config.prototype.allowResizeX=!1,i.Config.prototype.allowResizeY=!0,t.size=function(i){function o(e){f.css(i.container,"height",e),i.options.saveHeightInStorage&&i.storage.set("height",e)}function n(e){return f.css(i.container,"width",e)}function t(e){return f.css(i.workplace,"height",e)}if("auto"!==i.options.height&&(i.options.allowResizeX||i.options.allowResizeY)){var r=i.create.div("jodit_editor_resize",''),a={x:0,y:0,w:0,h:0},s=!1;i.events.on(r,"mousedown touchstart",function(e){s=!0,a.x=e.clientX,a.y=e.clientY,a.w=i.container.offsetWidth,a.h=i.container.offsetHeight,i.lock(),e.preventDefault()}).on(i.ownerWindow,"mousemove touchmove",u.throttle(function(e){s&&(i.options.allowResizeY&&o(a.h+e.clientY-a.y),i.options.allowResizeX&&n(a.w+e.clientX-a.x),c(),i.events.fire("resize"))},i.defaultTimeout/10)).on(i.ownerWindow,"mouseup touchsend",function(){s&&(s=!1,i.unlock())}).on("afterInit",function(){i.container.appendChild(r)}).on("toggleFullSize",function(e){r.style.display=e?"none":"block"})}function e(){return(i.options.toolbar?i.toolbar.container.offsetHeight:0)+(i.statusbar?i.statusbar.container.offsetHeight:0)}function l(){if(i.container&&i.container.parentNode){var o=f.css(i.container,"minHeight")-e();[i.workplace,i.iframe,i.editor].map(function(e){var t=e===i.editor?o-2:o;e&&f.css(e,"minHeight",t),i.events.fire("setMinHeight",t)})}}var c=function(){i&&!i.isDestructed&&i.options&&!i.options.inline&&(l(),i.container&&("auto"!==i.options.height||i.isFullSize())&&t(i.container.offsetHeight-e()))},d=u.debounce(c,i.defaultTimeout);i.events.on("toggleFullSize",function(e){e||"auto"!==i.options.height||(t("auto"),l())}).on("afterInit",function(){i.options.inline||(f.css(i.editor,{minHeight:"100%"}),f.css(i.container,{minHeight:i.options.minHeight,minWidth:i.options.minWidth,maxWidth:i.options.maxWidth}));var e=i.options.height;if(i.options.saveHeightInStorage&&"auto"!==e){var t=i.storage.get("height");t&&(e=t)}i.options.inline||(o(e),n(i.options.width)),c()},void 0,void 0,!0).on(window,"load",d).on("afterInit resize updateToolbar scroll afterResize",d)}},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=o(1),n=o(3),u=o(2),r=o(2),a=o(7),s=o(50),l=o(5),f=o(11),c=o(10),d=o(0);n.Config.prototype.beautifyHTML=!0,n.Config.prototype.useAceEditor=!0,n.Config.prototype.sourceEditorNativeOptions={showGutter:!0,theme:"ace/theme/idle_fingers",mode:"ace/mode/html",wrap:!0,highlightActiveLine:!0},n.Config.prototype.sourceEditorCDNUrlsJS=["https://cdnjs.cloudflare.com/ajax/libs/ace/1.4.5/ace.js"],n.Config.prototype.beautifyHTMLCDNUrlsJS=["https://cdnjs.cloudflare.com/ajax/libs/js-beautify/1.10.0/beautify.min.js","https://cdnjs.cloudflare.com/ajax/libs/js-beautify/1.10.0/beautify-html.min.js"],n.Config.prototype.controls.source={mode:u.MODE_SPLIT,exec:function(e){e.toggleMode()},isActive:function(e){return e.getRealMode()===u.MODE_SOURCE},tooltip:"Change mode"};var p,h=(i.__extends(v,p=a.Plugin),v.prototype.getMirrorValue=function(){return this.mirror.value},v.prototype.setMirrorValue=function(e){this.mirror.value=e},v.prototype.setFocusToMirror=function(){this.mirror.focus()},v.prototype.replaceMirrorToACE=function(){function t(){i&&c.getRealMode()===u.MODE_SOURCE&&(c.events.fire("canRedo",i.hasRedo()),c.events.fire("canUndo",i.hasUndo()))}function n(e){return s.session.getLine(e).length}function r(){for(var e=s.session.getLength(),t=[],o=0,i=0;i'),e(),this.onReadonlyReact(),t.events.on(this.mirror,"mousedown keydown touchstart input",l.debounce(this.toWYSIWYG,t.defaultTimeout)).on(this.mirror,"change keydown mousedown touchstart input",this.autosize).on("afterSetMode.source",this.autosize).on(this.mirror,"mousedown focus",function(e){t.events.fire(e.type,e)}),t.events.on("setMinHeight.source",function(e){o.mirror&&c.css(o.mirror,"minHeight",e)}).on("insertHTML.source",function(e){if(!t.options.readonly&&!o.jodit.isEditorMode())return o.insertHTML(e),!1}).on("aceInited",function(){o.onReadonlyReact(),e()},void 0,void 0,!0).on("readonly.source",this.onReadonlyReact).on("placeholder.source",function(e){o.mirror.setAttribute("placeholder",e)}).on("beforeCommand.source",this.onSelectAll).on("change.source",this.fromWYSIWYG),this.mirrorContainer.appendChild(this.mirror),t.workplace.appendChild(this.mirrorContainer),this.autosize();var i="beutyfy_html_jodit_helper";t.options.beautifyHTML&&void 0===t.ownerWindow.html_beautify&&!f.$$("script."+i,t.ownerDocument.body).length&&this.loadNext(0,t.options.beautifyHTMLCDNUrlsJS,!1,i),t.options.useAceEditor&&this.replaceMirrorToACE(),this.fromWYSIWYG()},v.prototype.beforeDestruct=function(e){d.Dom.safeRemove(this.mirrorContainer),d.Dom.safeRemove(this.mirror),e&&e.events&&e.events.off("aceInited.source"),this.aceEditor&&(this.setFocusToMirror=function(){},this.aceEditor.off("change",this.toWYSIWYG),this.aceEditor.off("focus",this.__proxyOnFocus),this.aceEditor.off("mousedown",this.__proxyOnMouseDown),this.aceEditor.destroy(),delete this.aceEditor),this.lastTuple&&this.lastTuple.element.removeEventListener("load",this.lastTuple.callback)},v);function v(){var a=null!==p&&p.apply(this,arguments)||this;return a.className="jodit_ace_editor",a.__lock=!1,a.__oldMirrorValue="",a.autosize=l.debounce(function(){a.mirror.style.height="auto",a.mirror.style.height=a.mirror.scrollHeight+"px"},a.jodit.defaultTimeout),a.tempMarkerStart="{start-jodit-selection}",a.tempMarkerStartReg=/{start-jodit-selection}/g,a.tempMarkerEnd="{end-jodit-selection}",a.tempMarkerEndReg=/{end-jodit-selection}/g,a.selInfo=[],a.lastTuple=null,a.loadNext=function(e,t,o,i){if(void 0===o&&(o="aceReady"),void 0===i&&(i=a.className),o&&void 0===t[e]&&!a.isDestructed)return a.jodit&&a.jodit.events&&a.jodit.events.fire(o),void(a.jodit&&a.jodit.events&&a.jodit.events.fire(a.jodit.ownerWindow,o));void 0!==t[e]&&(a.lastTuple&&a.lastTuple.element.removeEventListener("load",a.lastTuple.callback),a.lastTuple=s.appendScript(t[e],function(){a.isDestructed||a.loadNext(e+1,t,o,i)},i,a.jodit.ownerDocument))},a.insertHTML=function(e){if(a.mirror.selectionStart||0===a.mirror.selectionStart){var t=a.mirror.selectionEnd;a.mirror.value=a.mirror.value.substring(0,a.mirror.selectionStart)+e+a.mirror.value.substring(t,a.mirror.value.length)}else a.mirror.value+=a.mirror;a.toWYSIWYG()},a.fromWYSIWYG=function(e){if(void 0===e&&(e=!1),!a.__lock||!0===e){a.__lock=!0;var t=a.jodit.getEditorValue(!1);t!==a.getMirrorValue()&&a.setMirrorValue(t),a.__lock=!1}},a.toWYSIWYG=function(){if(!a.__lock){var e=a.getMirrorValue();e!==a.__oldMirrorValue&&(a.__lock=!0,a.jodit.setEditorValue(e),a.__lock=!1,a.__oldMirrorValue=e)}},a.getNormalPosition=function(e,t){for(var o=e;0"===t[o])return e}return e},a.__clear=function(e){return e.replace(u.INVISIBLE_SPACE_REG_EXP,"")},a.selectAll=function(){a.mirror.select()},a.onSelectAll=function(e){if("selectall"==e.toLowerCase()&&a.jodit.getRealMode()===r.MODE_SOURCE)return a.selectAll(),!1},a.getSelectionStart=function(){return a.mirror.selectionStart},a.getSelectionEnd=function(){return a.mirror.selectionEnd},a.saveSelection=function(){if(a.jodit.getRealMode()===u.MODE_WYSIWYG)a.selInfo=a.jodit.selection.save()||[],a.jodit.setEditorValue(),a.fromWYSIWYG(!0);else{a.selInfo.length=0;var e=a.getMirrorValue();if(a.getSelectionStart()===a.getSelectionEnd()){var t=a.jodit.selection.marker(!0);a.selInfo[0]={startId:t.id,collapsed:!0,startMarker:t.outerHTML};var o=a.getNormalPosition(a.getSelectionStart(),a.getMirrorValue());a.setMirrorValue(e.substr(0,o)+a.__clear(a.selInfo[0].startMarker)+e.substr(o))}else{var i=a.jodit.selection.marker(!0),n=a.jodit.selection.marker(!1);a.selInfo[0]={startId:i.id,endId:n.id,collapsed:!1,startMarker:a.__clear(i.outerHTML),endMarker:a.__clear(n.outerHTML)},o=a.getNormalPosition(a.getSelectionStart(),e);var r=a.getNormalPosition(a.getSelectionEnd(),e);a.setMirrorValue(e.substr(0,o)+a.selInfo[0].startMarker+e.substr(o,r-o)+a.selInfo[0].endMarker+e.substr(r))}a.toWYSIWYG()}},a.restoreSelection=function(){if(a.selInfo.length){if(a.jodit.getRealMode()===u.MODE_WYSIWYG)return a.__lock=!0,a.jodit.selection.restore(a.selInfo),void(a.__lock=!1);var e=a.getMirrorValue(),t=0,o=0;try{a.selInfo[0].startMarker&&(e=e.replace(/]+data-jodit_selection_marker="start"[^>]*>[<>]*?<\/span>/gim,a.tempMarkerStart)),a.selInfo[0].endMarker&&(e=e.replace(/]+data-jodit_selection_marker="end"[^>]*>[<>]*?<\/span>/gim,a.tempMarkerEnd)),a.jodit.ownerWindow.html_beautify&&a.jodit.options.beautifyHTML&&(e=a.jodit.ownerWindow.html_beautify(e)),o=t=e.indexOf(a.tempMarkerStart),e=e.replace(a.tempMarkerStartReg,""),a.selInfo[0].collapsed&&-1!==t||(o=e.indexOf(a.tempMarkerEnd),-1===t&&(t=o)),e=e.replace(a.tempMarkerEndReg,"")}finally{e=e.replace(a.tempMarkerEndReg,"").replace(a.tempMarkerStartReg,"")}a.setMirrorValue(e),a.setMirrorSelectionRange(t,o),a.toWYSIWYG(),a.setFocusToMirror()}},a.__proxyOnFocus=function(e){a.jodit.events.fire("focus",e)},a.__proxyOnMouseDown=function(e){a.jodit.events.fire("mousedown",e)},a.setMirrorSelectionRange=function(e,t){a.mirror.setSelectionRange(e,t)},a.onReadonlyReact=function(){var e=a.jodit.options.readonly;e?a.mirror.setAttribute("readonly","true"):a.mirror.removeAttribute("readonly"),a.aceEditor&&a.aceEditor.setReadOnly(e)},a}t.source=h},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=o(3),f=o(2),l=o(13);i.Config.prototype.usePopupForSpecialCharacters=!1,i.Config.prototype.specialCharacters=["!",""","#","$","%","&","'","(",")","*","+","-",".","/","0","1","2","3","4","5","6","7","8","9",":",";","<","=",">","?","@","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","[","]","^","_","`","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","{","|","}","~","€","‘","’","“","”","–","—","¡","¢","£","¤","¥","¦","§","¨","©","ª","«","»","¬","®","¯","°","²","³","´","µ","¶","·","¸","¹","º","¼","½","¾","¿","À","Á","Â","Ã","Ä","Å","Æ","Ç","È","É","Ê","Ë","Ì","Í","Î","Ï","Ð","Ñ","Ò","Ó","Ô","Õ","Ö","×","Ø","Ù","Ú","Û","Ü","Ý","Þ","ß","à","á","â","ã","ä","å","æ","ç","è","é","ê","ë","ì","í","î","ï","ð","ñ","ò","ó","ô","õ","ö","÷","ø","ù","ú","û","ü","ý","þ","ÿ","Œ","œ","Ŵ","Ŷ","ŵ","ŷ","‚","‛","„","…","™","►","•","→","⇒","⇔","♦","≈"],i.Config.prototype.controls.symbol={icon:"omega",hotkeys:["ctrl+shift+i","cmd+shift+i"],tooltip:"Insert Special Character",popup:function(e,t,o,i){var n=e.events.fire("generateSpecialCharactersTable.symbols");if(n){if(e.options.usePopupForSpecialCharacters){var r=e.ownerDocument.createElement("div");return r.classList.add("jodit_symbols"),r.appendChild(n),e.events.on(n,"close_dialog",i),r}var a=l.Alert(n,e.i18n("Select Special Character"),void 0,"jodit_symbols"),s=n.querySelector("a");s&&s.focus(),e.events.on("beforeDestruct",function(){a&&a.close()})}}},t.symbols=function(d){var u=this;this.countInRow=17,d.events.on("generateSpecialCharactersTable.symbols",function(){for(var e=d.create.fromHTML('
'),t=e.querySelector(".jodit_symbols-preview"),o=e.querySelector("table").tBodies[0],r=[],i=0;i'+d.options.specialCharacters[i]+"");r.push(l),s.appendChild(l),n.appendChild(s)}o.appendChild(n)}var c=u;return d.events.on(r,"focus",function(){t.innerHTML=this.innerHTML}).on(r,"mousedown",function(e){this&&"A"===this.nodeName&&(d.selection.focus(),d.selection.insertHTML(this.innerHTML),d.events.fire(this,"close_dialog"),e&&e.preventDefault(),e&&e.stopImmediatePropagation())}).on(r,"mouseenter",function(){this&&"A"===this.nodeName&&this.focus()}).on(r,"keydown",function(e){var t=e.target;if(t&&"A"===t.nodeName){var o=parseInt(t.getAttribute("data-index")||"0",10),i=parseInt(t.getAttribute("data-index-j")||"0",10),n=void 0;switch(e.which){case f.KEY_UP:case f.KEY_DOWN:void 0===r[n=e.which===f.KEY_UP?o-c.countInRow:o+c.countInRow]&&r.length-1<(n=e.which===f.KEY_UP?Math.floor(r.length/c.countInRow)*c.countInRow+i:i)&&(n-=c.countInRow),r[n]&&r[n].focus();break;case f.KEY_RIGHT:case f.KEY_LEFT:void 0===r[n=e.which===f.KEY_LEFT?o-1:o+1]&&(n=e.which===f.KEY_LEFT?r.length-1:0),r[n]&&r[n].focus();break;case f.KEY_ENTER:d.events.fire(t,"mousedown"),e.stopImmediatePropagation(),e.preventDefault()}}}),e})}},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=o(1),n=o(3),r=o(7),a=o(19);n.Config.prototype.commandToHotkeys={removeFormat:["ctrl+shift+m","cmd+shift+m"],insertOrderedList:["ctrl+shift+7","cmd+shift+7"],insertUnorderedList:["ctrl+shift+8, cmd+shift+8"],selectall:["ctrl+a","cmd+a"]};var s,l=(i.__extends(c,s=r.Plugin),c.prototype.afterInit=function(o){var i=this;Object.keys(o.options.commandToHotkeys).forEach(function(e){var t=o.options.commandToHotkeys[e];t&&o.registerHotkeyToCommand(t,e)});var n=!1;o.events.on("keydown.hotkeys",function(e){var t=i.onKeyPress(e);if(!1===i.jodit.events.fire(t+".hotkey",e.type))return n=!0,o.events.stopPropagation("keydown"),!1},void 0,void 0,!0).on("keyup.hotkeys",function(){if(n)return n=!1,o.events.stopPropagation("keyup"),!1},void 0,void 0,!0)},c.prototype.beforeDestruct=function(e){e.events&&e.events.off(".hotkeys")},c);function c(){var n=null!==s&&s.apply(this,arguments)||this;return n.onKeyPress=function(t){var o=n.specialKeys[t.which],e=(t.key||String.fromCharCode(t.which)).toLowerCase(),i=[o||e];return["alt","ctrl","shift","meta"].forEach(function(e){t[e+"Key"]&&o!==e&&i.push(e)}),a.normalizeKeyAliases(i.join("+"))},n.specialKeys={8:"backspace",9:"tab",10:"return",13:"return",16:"shift",17:"ctrl",18:"alt",19:"pause",20:"capslock",27:"esc",32:"space",33:"pageup",34:"pagedown",35:"end",36:"home",37:"left",38:"up",39:"right",40:"down",45:"insert",46:"del",59:";",61:"=",91:"meta",96:"0",97:"1",98:"2",99:"3",100:"4",101:"5",102:"6",103:"7",104:"8",105:"9",106:"*",107:"+",109:"-",110:".",111:"/",112:"f1",113:"f2",114:"f3",115:"f4",116:"f5",117:"f6",118:"f7",119:"f8",120:"f9",121:"f10",122:"f11",123:"f12",144:"numlock",145:"scroll",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},n}t.hotkeys=l},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=o(1),n=o(3),c=o(2),r=o(7),b=o(0),f=o(28),y=o(4),a=o(5);n.Config.prototype.useTableProcessor=!0,n.Config.prototype.useExtraClassesOptions=!0,n.Config.prototype.controls.table={data:{cols:10,rows:10,classList:{"table table-bordered":"Bootstrap Bordered","table table-striped":"Bootstrap Striped","table table-dark":"Bootstrap Dark"}},popup:function(v,e,i,m,t){var n=i.data&&i.data.rows?i.data.rows:10,g=i.data&&i.data.cols?i.data.cols:10,o=v.create.fromHTML('
'+function(){if(!v.options.useExtraClassesOptions)return"";var t=[];if(i.data){var o=i.data.classList;Object.keys(o).forEach(function(e){t.push('")})}return t.join("")}()+"
"),s=o.querySelectorAll("span")[0],l=o.querySelectorAll("span")[1],r=o.querySelector(".jodit_form-container"),a=o.querySelector(".jodit_form-table-creator-box"),_=o.querySelector(".jodit_form-options"),c=[];return r.addEventListener("mousemove",function(e,t){var o=e.target;if(o&&"DIV"===o.tagName){for(var i=void 0===t||isNaN(t)?parseInt(o.getAttribute("data-index")||"0",10):t||0,n=Math.ceil((i+1)/g),r=i%g+1,a=0;a
0/0
",f.isOpened=!1,f.selInfo=null,f.current=!1,f.eachMap=function(e,t,o){p.Dom.findWithCurrent(e,function(e){return!!e&&t(e)},f.jodit.editor,o?"nextSibling":"previousSibling",o?"firstChild":"lastChild")},f.updateCounters=function(){if(f.isOpened){f.counterBox.style.display=f.queryInput.value.length?"inline-block":"none";var e=f.calcCounts(f.queryInput.value,f.jodit.selection.range);f.counterBox.innerText=e.join("/")}},f.calcCounts=function(e,t){void 0===t&&(t=!1);for(var o=[],i=0,n=0,r=!1,a=f.jodit.editor.firstChild;a&&e.length;)if(r=f.find(a,e,!0,0,r||f.jodit.editorDocument.createRange())){if(f.boundAlreadyWas(r,o))break;o.push(r),a=r.startContainer,n+=1,t&&f.boundAlreadyWas(t,[r])&&(i=n)}else a=null;return[i,n]},f.findAndReplace=function(e,t){var o=f.find(e,t,!0,0,f.jodit.selection.range);if(o&&o.startContainer&&o.endContainer){var i=f.jodit.editorDocument.createRange();try{if(o&&o.startContainer&&o.endContainer){i.setStart(o.startContainer,o.startOffset),i.setEnd(o.endContainer,o.endOffset),i.deleteContents();var n=f.jodit.editorDocument.createTextNode(f.replaceInput.value);i.insertNode(n),f.jodit.selection.select(n),f.tryScrollToElement(n)}}catch(e){}return!0}return!1},f.findAndSelect=function(e,t,o){var i=f.find(e,t,o,0,f.jodit.selection.range);if(i&&i.startContainer&&i.endContainer){var n=f.jodit.editorDocument.createRange();try{n.setStart(i.startContainer,i.startOffset),n.setEnd(i.endContainer,i.endOffset),f.jodit.selection.selectRange(n)}catch(e){}return f.tryScrollToElement(i.startContainer),f.current=i.startContainer,f.updateCounters(),!0}return!1},f.find=function(e,a,s,l,c){if(e&&a.length){var d="",u={startContainer:null,startOffset:null,endContainer:null,endOffset:null};if(f.eachMap(e,function(e){if(e.nodeType===Node.TEXT_NODE&&null!==e.nodeValue&&e.nodeValue.length){var t=e.nodeValue;s||e!==c.startContainer?s&&e===c.endContainer&&(t=l?t.substr(0,c.startOffset):t.substr(c.endOffset)):t=l?t.substr(c.endOffset):t.substr(0,c.startOffset);var o=s?d+t:t+d,i=v.findSomePartOfString(a,o,s);if(!1!==i){var n=v.findSomePartOfString(a,t,s);!0===n?n=h.trim(a):!1===n&&!0===(n=v.findSomePartOfString(t,a,s))&&(n=h.trim(t));var r=v.getSomePartOfStringIndex(a,t,s)||0;if((s&&!l||!s&&l)&&0'+o+""),r=n.firstChild;return a.jodit.events.on(r,"click",a.onSelectPath.bind(a,e)).on(r,"contextmenu",a.onContext.bind(a,e)),n},a.removeSelectAll=function(){a.selectAllButton&&(a.selectAllButton.destruct(),delete a.selectAllButton)},a.appendSelectAll=function(){a.removeSelectAll(),a.selectAllButton=new u.ToolbarButton(a.jodit,i.__assign({name:"selectall"},a.jodit.options.controls.selectall)),a.container&&a.container.insertBefore(a.selectAllButton.container,a.container.firstChild)},a.calcPathImd=function(){if(!a.isDestructed){var t,o,i,e=a.jodit.selection.current();a.container&&(a.container.innerHTML=r.INVISIBLE_SPACE),e&&l.Dom.up(e,function(e){e&&a.jodit.editor!==e&&e.nodeType!==Node.TEXT_NODE&&(t=e.nodeName.toLowerCase(),o=d.getXPathByElement(e,a.jodit.editor).replace(/^\//,""),i=a.tpl(e,o,t,a.jodit.i18n("Select %s",t)),a.container&&a.container.insertBefore(i,a.container.firstChild))},a.jodit.editor),a.appendSelectAll()}},a.calcPath=c.debounce(a.calcPathImd,2*a.jodit.defaultTimeout),a.container=null,a.menu=null,a}t.xpath=p},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=o(1),n=o(3),r=o(4),a=o(7),s=o(0);n.Config.prototype.draggableTags=["img","a","jodit-media","jodit"];var l,c=(i.__extends(d,l=a.Plugin),d.prototype.afterInit=function(){this.dragList=this.jodit.options.draggableTags?r.splitArray(this.jodit.options.draggableTags).filter(function(e){return e}).map(function(e){return e.toLowerCase()}):[],this.dragList.length&&this.jodit.events.on(this.jodit.editor,"mousemove touchmove",this.onDrag).on(this.jodit.editor,"mousedown touchstart dragstart",this.onDragStart).on("mouseup touchend",this.onDrop).on(window,"mouseup touchend",this.onDragEnd)},d.prototype.beforeDestruct=function(){this.onDragEnd()},d);function d(){var i=null!==l&&l.apply(this,arguments)||this;return i.dragList=[],i.isCopyMode=!1,i.draggable=null,i.wasMoved=!1,i.timeout=0,i.onDrag=r.throttle(function(e){i.draggable&&(i.wasMoved=!0,i.jodit.events.fire("hidePopup hideResizer"),i.draggable.parentNode||i.jodit.ownerDocument.body.appendChild(i.draggable),r.css(i.draggable,{left:e.clientX+20,top:e.clientY+20}),i.jodit.selection.insertCursorAtPoint(e.clientX,e.clientY))},i.jodit.defaultTimeout),i.onDragStart=function(t){var e=t.target,o=null;if(i.dragList.length){for(;~i.dragList.indexOf(e.nodeName.toLowerCase())&&(o&&(e.firstChild!==o||e.lastChild!==o)||(o=e)),(e=e.parentNode)&&e!==i.jodit.editor;);o&&(i.isCopyMode=r.ctrlKey(t),i.onDragEnd(),i.timeout=r.setTimeout(function(e){e&&(i.draggable=e.cloneNode(!0),r.dataBind(i.draggable,"target",e),r.css(i.draggable,{"z-index":1e14,"pointer-events":"none",position:"fixed",display:"inlin-block",left:t.clientX,top:t.clientY,width:e.offsetWidth,height:e.offsetHeight}))},i.jodit.defaultTimeout,o),t.preventDefault())}},i.onDragEnd=function(){window.clearTimeout(i.timeout),i.draggable&&(s.Dom.safeRemove(i.draggable),i.draggable=null,i.wasMoved=!1)},i.onDrop=function(){if(i.draggable&&i.wasMoved){var e=r.dataBind(i.draggable,"target");i.onDragEnd(),i.isCopyMode&&(e=e.cloneNode(!0)),i.jodit.selection.insertNode(e,!0,!1),"IMG"===e.nodeName&&i.jodit.events&&i.jodit.events.fire("afterInsertImage",e),i.jodit.events.fire("synchro")}else i.onDragEnd()},i}t.DragAndDropElement=c},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i,n=o(1),r=o(2),a=o(0),l=o(4),s=o(7),c=(n.__extends(d,i=s.Plugin),d.prototype.afterInit=function(){this.jodit.events.on(window,"dragover",this.onDrag).on([window,this.jodit.editorDocument,this.jodit.editor],"dragstart",this.onDragStart).on("drop",this.onDrop).on(window,"dragend drop mouseup",this.onDragEnd)},d.prototype.beforeDestruct=function(){this.onDragEnd()},d);function d(){var s=null!==i&&i.apply(this,arguments)||this;return s.isFragmentFromEditor=!1,s.isCopyMode=!1,s.startDragPoint={x:0,y:0},s.draggable=null,s.bufferRange=null,s.onDragEnd=function(){s.draggable&&(a.Dom.safeRemove(s.draggable),s.draggable=null),s.isCopyMode=!1},s.onDrag=function(e){s.draggable&&(s.draggable.parentNode||s.jodit.ownerDocument.body.appendChild(s.draggable),s.jodit.events.fire("hidePopup"),l.css(s.draggable,{left:e.clientX+20,top:e.clientY+20}),s.jodit.selection.insertCursorAtPoint(e.clientX,e.clientY),e.preventDefault(),e.stopPropagation())},s.onDrop=function(e){if(!e.dataTransfer||!e.dataTransfer.files||!e.dataTransfer.files.length){if(!s.isFragmentFromEditor&&!s.draggable)return s.jodit.events.fire("paste",e),e.preventDefault(),e.stopPropagation(),!1;var t=s.jodit.selection.sel,o=s.bufferRange||(t&&t.rangeCount?t.getRangeAt(0):null),i=null;if(!s.draggable&&o)i=s.isCopyMode?o.cloneContents():o.extractContents();else if(s.draggable)if(s.isCopyMode){var n="1"===s.draggable.getAttribute("data-is-file")?["a","href"]:["img","src"],r=n[0],a=n[1];(i=s.jodit.editorDocument.createElement(r)).setAttribute(a,s.draggable.getAttribute("data-src")||s.draggable.getAttribute("src")||""),"a"===r&&(i.innerText=i.getAttribute(a)||"")}else i=l.dataBind(s.draggable,"target");else s.getText(e)&&(i=s.jodit.create.inside.fromHTML(s.getText(e)));t&&t.removeAllRanges(),s.jodit.selection.insertCursorAtPoint(e.clientX,e.clientY),i&&(s.jodit.selection.insertNode(i,!1,!1),o&&i.firstChild&&i.lastChild&&(o.setStartBefore(i.firstChild),o.setEndAfter(i.lastChild),s.jodit.selection.selectRange(o),s.jodit.events.fire("synchro")),"IMG"===i.nodeName&&s.jodit.events&&s.jodit.events.fire("afterInsertImage",i)),e.preventDefault(),e.stopPropagation()}s.isFragmentFromEditor=!1},s.onDragStart=function(e){var t=e.target;if(s.onDragEnd(),s.isFragmentFromEditor=a.Dom.isOrContains(s.jodit.editor,t,!0),s.isCopyMode=!s.isFragmentFromEditor||l.ctrlKey(e),s.isFragmentFromEditor){var o=s.jodit.selection.sel,i=o&&o.rangeCount?o.getRangeAt(0):null;i&&(s.bufferRange=i.cloneRange())}else s.bufferRange=null;s.startDragPoint.x=e.clientX,s.startDragPoint.y=e.clientY,t.nodeType===Node.ELEMENT_NODE&&t.matches(".jodit_filebrowser_files_item")&&(t=t.querySelector("img")),"IMG"===t.nodeName&&(s.draggable=t.cloneNode(!0),l.dataBind(s.draggable,"target",t),l.css(s.draggable,{"z-index":1e14,"pointer-events":"none",position:"fixed",display:"inlin-block",left:s.startDragPoint.x,top:s.startDragPoint.y,width:t.offsetWidth,height:t.offsetHeight}))},s.getDataTransfer=function(e){return e.dataTransfer||new DataTransfer},s.getText=function(e){var t=s.getDataTransfer(e);return t.getData(r.TEXT_HTML)||t.getData(r.TEXT_PLAIN)},s}t.DragAndDrop=c},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n,i=o(1),r=o(2),a=o(16),s=o(7),l=o(0),c=o(18),d=(i.__extends(u,n=s.Plugin),u.prototype.createDialog=function(){var o=this;this.dialog=new a.Dialog(this.jodit);var e=this.jodit.create.fromHTML(''+this.jodit.i18n("Paste")+"");e.addEventListener("click",this.paste);var t=this.jodit.create.fromHTML(''+this.jodit.i18n("Cancel")+"");t.addEventListener("click",this.dialog.close),this.container=this.jodit.ownerDocument.createElement("div"),this.container.classList.add("jodit_paste_storage"),this.listBox=this.jodit.ownerDocument.createElement("div"),this.previewBox=this.jodit.ownerDocument.createElement("div"),this.container.appendChild(this.listBox),this.container.appendChild(this.previewBox),this.dialog.setTitle(this.jodit.i18n("Choose Content to Paste")),this.dialog.setContent(this.container),this.dialog.setFooter([e,t]),this.jodit.events.on(this.listBox,"click dblclick",function(e){var t=e.target;return t&&"A"===t.nodeName&&t.hasAttribute("data-index")&&o.selectIndex(parseInt(t.getAttribute("data-index")||"0",10)),"dblclick"===e.type&&o.paste(),!1},"a")},u.prototype.afterInit=function(){var t=this;this.jodit.events.on("afterCopy",function(e){~t.list.indexOf(e)&&t.list.splice(t.list.indexOf(e),1),t.list.unshift(e),5\n\t\n\n'},function(e,t){e.exports='\n\n\t\n\t\t\n\t\t\n\t\t\n\t\n\n\n'},function(e,t){e.exports='\n\n\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\n\n\n'},function(e,t){e.exports='\n \n'},function(e,t){e.exports=''},function(e,t){e.exports=''},function(e,t){e.exports=''},function(e,t){e.exports=''},function(e,t){e.exports=''},function(e,t){e.exports=''},function(e,t){e.exports=''},function(e,t){e.exports=''},function(e,t){e.exports=''},function(e,t){e.exports='\n \n \n \n \n\n'},function(e,t){e.exports=''},function(e,t){e.exports=''},function(e,t){e.exports=''},function(e,t){e.exports=''},function(e,t){e.exports='\n'},function(e,t){e.exports='\n \n'},function(e,t){e.exports='\n \n'},function(e,t){e.exports=''},function(e,t){e.exports='\n \n \n \n'},function(e,t){e.exports='\n\t\n\n'},function(e,t){e.exports='\n \n \n \n'},function(e,t){e.exports=''},function(e,t){e.exports=''},function(e,t){e.exports='\n \n'},function(e,t){e.exports=''},function(e,t){e.exports=''},function(e,t){e.exports=''},function(e,t){e.exports='\n\t\n'},function(e,t){e.exports=''},function(e,t){e.exports=''},function(e,t){e.exports='\n \n'},function(e,t){e.exports=''},function(e,t){e.exports=''},function(e,t){e.exports=''},function(e,t){e.exports=''},function(e,t){e.exports=''},function(e,t){e.exports=''},function(e,t){e.exports=''},function(e,t){e.exports='\n \n \n \n \n \n \n\n'},function(e,t){e.exports='\n \n'},function(e,t){e.exports='\n\t\n'},function(e,t){e.exports='\n \n'},function(e,t){e.exports='\n\n\t\n\t\t\n\t\n\n\n'},function(e,t){e.exports=''},function(e,t){e.exports=''},function(e,t){e.exports=''},function(e,t){e.exports='\n \n'},function(e,t){e.exports='\n \n'},function(e,t){e.exports='\n \n \n \n \n \n \n'},function(e,t){e.exports='\n \n'},function(e,t){e.exports='\n \n'},function(e,t){e.exports='\n \n'},function(e,t){e.exports='\n \n \n \n \n \n \n \n'},function(e,t){e.exports='\n \n'},function(e,t){e.exports='\n \n'},function(e,t){e.exports='\n \n'},function(e,t){e.exports='\n \n \n'},function(e,t){e.exports=''},function(e,t){e.exports='\n \n'},function(e,t){e.exports='\n \n'},function(e,t){e.exports=''},function(e,t){e.exports=''},function(e,t){e.exports=''},function(e,t){e.exports=''},function(e,t){e.exports=''},function(e,t){e.exports=''},function(e,t){e.exports=''},function(e,t){e.exports=''},function(e,t){e.exports=''},function(e,t){e.exports=''},function(e,t){e.exports=''},function(e,t){e.exports=''}],n.c=i,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(o,i,function(e){return t[e]}.bind(null,i));return o},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/build/",n(n.s=66);function n(e){if(i[e])return i[e].exports;var t=i[e]={i:e,l:!1,exports:{}};return o[e].call(t.exports,t,t.exports,n),t.l=!0,t.exports}var o,i});