From 0ff11017e15957c4daba2042e1db93c211df35cf Mon Sep 17 00:00:00 2001 From: Chupurnov Valeriy Date: Tue, 1 Aug 2017 14:53:01 +0500 Subject: [PATCH] New version 3.0.3. Read more http://xdsoft.net/jodit/#3.0.3 --- dist/jodit.css | 2 +- dist/jodit.js | 4 ++-- package.json | 5 +++-- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/dist/jodit.css b/dist/jodit.css index 0f0e6ad78..f4c7a6f3b 100644 --- a/dist/jodit.css +++ b/dist/jodit.css @@ -2,7 +2,7 @@ * * jodit - Jodit is awesome and usefully wysiwyg editor with filebrowser * Author: Chupurnov (http://xdsoft.net/) - * Version: v3.0.2 + * Version: v3.0.3 * Url: http://xdsoft.net/jodit/ * License(s): SEE LICENSE IN * diff --git a/dist/jodit.js b/dist/jodit.js index a8dce249a..d9e5c31f6 100644 --- a/dist/jodit.js +++ b/dist/jodit.js @@ -2,9 +2,9 @@ * * jodit - Jodit is awesome and usefully wysiwyg editor with filebrowser * Author: Chupurnov (http://xdsoft.net/) - * Version: v3.0.2 + * Version: v3.0.3 * Url: http://xdsoft.net/jodit/ * License(s): SEE LICENSE IN * */ -!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.Jodit=t():e.Jodit=t()}(this,function(){return function(e){function t(i){if(o[i])return o[i].exports;var n=o[i]={i:i,l:!1,exports:{}};return e[i].call(n.exports,n,n.exports,t),n.l=!0,n.exports}var o={};return t.m=e,t.c=o,t.i=function(e){return e},t.d=function(e,o,i){t.o(e,o)||Object.defineProperty(e,o,{configurable:!1,enumerable:!0,get:i})},t.n=function(e){var o=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(o,"a",o),o},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="/dist/",t(t.s=28)}([function(e,t,o){"use strict";var i=this;t.__esModule=!0;var n=o(3),r={},a=r.toString,s=r.hasOwnProperty;t.isIE=function(){return-1!=navigator.userAgent.indexOf("MSIE")||/rv:11.0/i.test(navigator.userAgent)};var l=1;t.$$=function(e,o){var i;if(!/:scope/.test(e)||!t.isIE()||"undefined"!=typeof HTMLDocument&&o instanceof HTMLDocument)i=o.querySelectorAll(e);else{var n=o.id,r=n||"_selector_id_"+(""+Math.random()).slice(2)+l++;e=e.replace(/:scope/g,"#"+r),!n&&o.setAttribute("id",r),i=o.parentNode.querySelectorAll(e),n||o.removeAttribute("id")}return[].slice.call(i)},t.isWindow=function(e){return null!==e&&e===e.window},t.type=function(e){return null===e?"null":"object"==typeof e||"function"==typeof e?r[a.call(e)]||"object":typeof e},t.each=function(e,t){var o,i,n;if(Array.isArray(e)){for(o=e.length,n=0;o>n;n+=1)if(!1===t.call(e[n],n,e[n]))return!1}else for(i=Object.keys(e),n=0;i.length>n;n+=1)if(!1===t.call(e[i[n]],i[n],e[i[n]]))return!1;return e},t.each(["Boolean","Number","String","Function","Array","Date","RegExp","Object","Error","Symbol","HTMLDocument","Window","HTMLElement","HTMLBodyElement","Text","DocumentFragment"],function(e,t){r["[object "+t+"]"]=t.toLowerCase()}),t.inArray=function(e,t){return-1!==t.indexOf(e)},t.isPlainObject=function(e){return!("object"!=typeof e||e.nodeType||t.isWindow(e)||e.constructor&&!s.call(e.constructor.prototype,"isPrototypeOf"))},t.extend=function(){for(var e=[],o=0;arguments.length>o;o++)e[o]=arguments[o];var n,r,a,s,l,d,c,u,p=e[0]||{},f=1,h=e.length,g=!1;for("boolean"==typeof p&&(g=p,p=e[f]||{},f+=1),"object"!=typeof p&&"function"===t.type(p)&&(p={}),f===h&&(p=i,f+=1),f;h>f;f+=1)if(null!==(n=e[f])&&void 0!==n)for(u=Object.keys(n),c=0;u.length>c;c+=1)r=u[c],a=p[r],s=n[r],p!==s&&(g&&s&&(t.isPlainObject(s)||Array.isArray(s))?(l=Array.isArray(s),l?(l=!1,d=a&&Array.isArray(a)?a:[]):d=a&&t.isPlainObject(a)?a:{},p[r]=t.extend(g,d,s)):void 0!==s&&(p[r]=s));return p},t.trim=function(e){return e.replace(n.SPACE_REG_EXP_START,"").replace(n.SPACE_REG_EXP_END,"")},t.colorToHex=function(e){if("rgba(0, 0, 0, 0)"===e||""===e)return!1;if(!e)return"#000000";if("#"===e.substr(0,1))return e;var t,o,i,n,r,a=/([\s\n\t\r]*?)rgb\((\d+), (\d+), (\d+)\)/.exec(e)||/([\s\n\t\r]*?)rgba\((\d+), (\d+), (\d+), ([\d.]+)\)/.exec(e);if(!a)return"#000000";for(o=parseInt(a[2],10),i=parseInt(a[3],10),n=parseInt(a[4],10),r=n|i<<8|o<<16,t=r.toString(16).toUpperCase();6>t.length;)t="0"+t;return a[1]+"#"+t},t.normalizeColor=function(e){var o,i=["#"],n=t.colorToHex(e);if(!n)return!1;if(n=t.trim(n.toUpperCase()),n=n.substr(1),3===n.length){for(o=0;3>o;o+=1)i.push(n[o]),i.push(n[o]);return i.join("")}return n.length>6&&(n=n.substr(0,6)),"#"+n},t.normalizeSize=function(e){return/^[0-9]+$/.test(""+e)?e+"px":""+e},t.getContentWidth=function(e,t){var o=function(e){return parseInt(e,10)},i=t.getComputedStyle(e);return e.offsetWidth-o(i.getPropertyValue("padding-left")||"0")-o(i.getPropertyValue("padding-right")||"0")},t.ctrlKey=function(e){if(-1!==navigator.userAgent.indexOf("Mac OS X")){if(e.metaKey&&!e.altKey)return!0}else if(e.ctrlKey&&!e.altKey)return!0;return!1};var d=function(e){return"file:"===window.location.protocol&&/^\/\//.test(e)&&(e="https:"+e),e};t.appendScript=function(e,t,o){void 0===o&&(o="");var i=document.createElement("script");i.className=o,i.type="text/javascript",i.charset="utf-8",i.src=d(e),void 0!==t&&(i.onload=t),document.body.appendChild(i)},t.dom=function(e,t){if(void 0===t&&(t=document),e instanceof HTMLElement)return e;var o=t.createElement("div");return o.innerHTML=e,o.firstChild!==o.lastChild?o:o.firstChild},t.hexToRgb=function(e){e=e.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i,function(e,t,o,i){return t+t+o+o+i+i});var t=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);return t?{r:parseInt(t[1],16),g:parseInt(t[2],16),b:parseInt(t[3],16)}:null},t.clear=function(e,o){return void 0===o&&(o=!1),e=t.trim(e).replace(n.INVISIBLE_SPACE_REG_EXP,"").replace(/[\s]*class=""/g,""),o&&(e=e.replace(/]*>[\s\n\r\t]*( |
|)?[\s\n\r\t]*<\/p>[\n\r]*/g,"")),e},t.htmlentities=function(e){return e.replace(//gi,">").replace(/"/gi,""").replace(/'/gi,"'")},t.cleanFromWord=function(e){return e=e.replace(/\s*<\/o:p>/g,""),e=e.replace(/.*?<\/o:p>/g," "),e=e.replace(/\s*mso-[^:]+:[^;"]+;?/gi,""),e=e.replace(/\s*MARGIN: 0cm 0cm 0pt\s*;/gi,""),e=e.replace(/\s*MARGIN: 0cm 0cm 0pt\s*"/gi,'"'),e=e.replace(/\s*TEXT-INDENT: 0cm\s*;/gi,""),e=e.replace(/\s*TEXT-INDENT: 0cm\s*"/gi,'"'),e=e.replace(/\s*TEXT-ALIGN: [^\s;]+;?"/gi,'"'),e=e.replace(/\s*PAGE-BREAK-BEFORE: [^\s;]+;?"/gi,'"'),e=e.replace(/\s*FONT-VARIANT: [^\s;]+;?"/gi,'"'),e=e.replace(/\s*tab-stops:[^;"]*;?/gi,""),e=e.replace(/\s*tab-stops:[^"]*/gi,""),e=e.replace(/\s*face="[^"]*"/gi,""),e=e.replace(/\s*face=[^ >]*/gi,""),e=e.replace(/\s*FONT-FAMILY:[^;"]*;?/gi,""),e=e.replace(/<(\w[^>]*) class=([^ |>]*)([^>]*)/gi,"<$1$3"),e=e.replace(/<(\w[^>]*) style="([^"]*)"([^>]*)/gi,"<$1$3"),e=e.replace(/\s*style="\s*"/gi,""),e=e.replace(/]*>\s* \s*<\/SPAN>/gi," "),e=e.replace(/]*><\/SPAN>/gi,""),e=e.replace(/<(\w[^>]*) lang=([^ |>]*)([^>]*)/gi,"<$1$3"),e=e.replace(/(.*?)<\/SPAN>/gi,"$1"),e=e.replace(/(.*?)<\/FONT>/gi,"$1"),e=e.replace(/<\\?\?xml[^>]*>/gi,""),e=e.replace(/<\/?\w+:[^>]*>/gi,""),e=e.replace(/\s*<\/H\d>/gi,""),e=e.replace(/]*)>/gi,""),e=e.replace(/]*)>/gi,""),e=e.replace(/]*)>/gi,""),e=e.replace(/]*)>/gi,""),e=e.replace(/]*)>/gi,""),e=e.replace(/]*)>/gi,""),e=e.replace(/<\/H\d>/gi,"
"),e=e.replace(/<(U|I|STRIKE)> <\/\1>/g," "),e=e.replace(/<(b)> <\/\b>/gi,""),e=e.replace(/<([^\s>]+)[^>]*>\s*<\/\1>/g,""),e=e.replace(/<([^\s>]+)[^>]*>\s*<\/\1>/g,""),e=e.replace(/<([^\s>]+)[^>]*>\s*<\/\1>/g,""),e=e.replace(RegExp("(]*>.*?)(

)","gi"),""),e=e.replace(/(]*>.*?)(<\/FONT>|<\/font>)/gi,""),e=e.replace(/size|SIZE = ([\d])/g,"")},t.isURL=function(e){return RegExp("^(https?:\\/\\/)((([a-z\\d]([a-z\\d-]*[a-z\\d])*)\\.?)+[a-z]{2,}|((\\d{1,3}\\.){3}\\d{1,3}))(\\:\\d+)?(\\/[-a-z\\d%_.~+]*)*(\\?[;&a-z\\d%_.~+=-]*)?(\\#[-a-z\\d_]*)?$","i").test(e)},t.pathNormalize=function(e){return e.replace(/([^:])[\\\/]+/g,"$1/")},t.urlNormalize=function(e){return e.replace(/([^:])[\\\/]+/g,"$1/")},t.isHTML=function(e){return/<([A-Za-z][A-Za-z0-9]*)\b[^>]*>(.*?)<\/\1>/m.test(e)},t.humanSizeToBytes=function(e){if(/^[0-9.]+$/.test(""+e))return e;var t=e.substr(-2,2).toUpperCase(),o=["KB","MB","GB","TB"],i=e.substr(0,e.length-2);return-1!==o.indexOf(t)?i*Math.pow(1024,o.indexOf(t)+1):parseInt(e,10)},t.parseQuery=function(e){var t,o,i={},n=e.substr(1).split("&");for(t=0;n.length>t;t+=1)o=n[t].split("="),i[decodeURIComponent(o[0])]=decodeURIComponent(o[1]||"");return i},t.convertMediaURLToVideoEmbed=function(e,o,i){if(void 0===o&&(o=400),void 0===i&&(i=345),!t.isURL(e))return e;var n,r=document.createElement("a"),a=/(?:http?s?:\/\/)?(?:www\.)?(?:vimeo\.com)\/?(.+)/g;switch(r.href=e,o||(o=400),i||(i=345),r.hostname){case"www.vimeo.com":case"vimeo.com":return a.test(e)?e.replace(a,''):e;case"youtube.com":case"www.youtube.com":case"youtu.be":case"www.youtu.be":return n=r.search?t.parseQuery(r.search):{v:r.pathname.substr(1)},n.v?'':e}return e},t.browser=function(e){var t=navigator.userAgent.toLowerCase(),o=/(firefox)[\s\/]([\w.]+)/.exec(t)||/(chrome)[\s\/]([\w.]+)/.exec(t)||/(webkit)[\s\/]([\w.]+)/.exec(t)||/(opera)(?:.*version)[\s\/]([\w.]+)/.exec(t)||/(msie)[\s]([\w.]+)/.exec(t)||/(trident)\/([\w.]+)/.exec(t)||0>t.indexOf("compatible")||[];return"version"===e?o[2]:"webkit"===e?"chrome"===o[1]||"webkit"===o[1]:"ff"===e?"firefox"===o[1]:"msie"===e?"trident"===o[1]||"msie"===o[1]:o[1]===e},t.offset=function(e){var t=e.getBoundingClientRect(),o=e.ownerDocument,i=o.body,n=o.documentElement,r=o.defaultView||o.parentWindow,a=r.pageYOffset||n.scrollTop||i.scrollTop,s=r.pageXOffset||n.scrollLeft||i.scrollLeft,l=n.clientTop||i.clientTop||0,d=n.clientLeft||i.clientLeft||0,c=t.top+a-l,u=t.left+s-d;return{top:Math.round(c),left:Math.round(u)}},t.camelCase=function(e){return e.replace(/-(.)/g,function(e,t){return t.toUpperCase()})},t.fromCamelCase=function(e){return e.replace(/([A-Z]+)/g,function(e,t){return"-"+t.toLowerCase()})},t.htmlspecialchars=function(e){var t=document.createElement("div");return t.innerText=e,t.innerHTML},t.debounce=function(e,t,o,i){3===arguments.length&&"boolean"!=typeof o&&(i=o,o=!1);var n;return function(){var r=arguments;i=i||this,o&&!n&&e.apply(i,r),clearTimeout(n),t&&(n=setTimeout(function(){o||e.apply(i,r),n=null},t))}},t.throttle=function(e,t,o){var i,n,r,a;return function(){n=arguments,r=!0,o=o||this,i||(a=function(){r?(e.apply(o,n),r=!1,i=setTimeout(a,t)):i=null})()}},t.css=function(e,o,n){var r=/^left|top|bottom|right|width|min|max|height|margin|padding/i;if(t.isPlainObject(o)||void 0!==n){var a=function(e,t,o){void 0!==o&&null!==o&&r.test(t)&&/^[\-+]?[0-9.]+$/.test(""+o)&&(o=parseInt(o,10)+"px"),e.style[t]=o};if(t.isPlainObject(o)){var s=Object.keys(o),l=void 0;for(l=0;s.length>l;l+=1)a(e,t.camelCase(s[l]),o[s[l]])}else a(e,t.camelCase(o),n);return i}var d=t.fromCamelCase(o),c=e.ownerDocument,u=c.defaultView||c.parentWindow,p=void 0!==e.style[o]&&""!==e.style[o]?e.style[o]:u.getComputedStyle(e).getPropertyValue(d);return r.test(o)&&/^[\-+]?[0-9]+px$/.test(""+p)&&(p=parseInt(p,10)),p},t.asArray=function(e){return Array.isArray(e)?e:[e]},t.sprintf=function(){for(var e=[],t=0;arguments.length>t;t++)e[t]=arguments[t];var o=/%%|%(\d+\$)?([-+#0 ]*)(\*\d+\$|\*|\d+)?(\.(\*\d+\$|\*|\d+))?([scboxXuidfegEG])/g,i=e,n=0,r=i[n++],a=function(e,t,o,i){var n=t>e.length?Array(1+t-e.length>>>0).join(o):"";return i?e+n:n+e},s=function(e,t,o,i,n){var r=i-e.length;return r>0&&(e=o||!n?a(e,i," ",o):e.slice(0,t.length)+a("",r,"0",!0)+e.slice(t.length)),e},l=function(e,t,o,i,n,r,l){var d=e>>>0;return o=o&&d&&{2:"0b",8:"0",16:"0x"}[t]||"",e=o+a(d.toString(t),r||0,"0",!1),s(e,o,i,n,l)},d=function(e,t,o,i,n){return null!=i&&(e=e.slice(0,i)),s(e,"",t,o,n)};return r.replace(o,function(e,t,o,r,c,u,p){if("%%"==e)return"%";for(var f=!1,h="",g=!1,v=!1,m=0;o&&o.length>m;m++)switch(o.charAt(m)){case" ":h=" ";break;case"+":h="+";break;case"-":f=!0;break;case"0":g=!0;break;case"#":v=!0}if(r=r?"*"===r?+i[n++]:"*"===r.charAt(0)?+i[r.slice(1,-1)]:+r:0,0>r&&(r=-r,f=!0),!isFinite(r))throw Error("sprintf: (minimum-)width must be finite");u=u?"*"===u?+i[n++]:"*"===u[0]?+i[u.slice(1,-1)]:+u:"fFeE".indexOf(p)>-1?6:"d"==p?0:void 0;var _=t?i[t.slice(0,-1)]:i[n++];switch(p){case"s":return d(_+"",f,r,u,g);case"c":return d(String.fromCharCode(+_),f,r,u,g);case"b":return l(_,2,v,f,r,u,g);case"o":return l(_,8,v,f,r,u,g);case"x":return l(_,16,v,f,r,u,g);case"X":return l(_,16,v,f,r,u,g).toUpperCase();case"u":return l(_,10,v,f,r,u,g);case"i":case"d":var b=parseInt(""+_,10),y=0>b?"-":h;return _=y+a(Math.abs(b)+"",u,"0",!1),s(_,y,f,r,g);case"e":case"E":case"f":case"F":case"g":case"G":var b=+_,y=0>b?"-":h,w=["toExponential","toFixed","toPrecision"]["efg".indexOf(p.toLowerCase())],q=["toString","toUpperCase"]["eEfFgG".indexOf(p)%2];return _=y+Math.abs(b)[w](u),s(_,y,f,r,g)[q]();default:return e}})},t.val=function(e,t,o){var i=e.querySelector(t);return i?(o&&(i.value=o),i.value):""},t.defaultLanguage=function(e){return"auto"===e||void 0===e?document.documentElement.lang||navigator.language&&navigator.language.substr(0,2)||navigator.browserLanguage&&navigator.browserLanguage.substr(0,2)||"en":e}},function(e,t,o){"use strict";var i=this&&this.__extends||function(){var e=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])};return function(t,o){function i(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(i.prototype=o.prototype,new i)}}();t.__esModule=!0;var n=o(5),r=o(6),a=o(11),s=o(3),l=o(0),d=o(0),c=o(4),u=function(e){function t(o,i){var n=e.call(this)||this;n.version="3.0.2",n.components=[],n.__modulesInstances={},n.__plugins={},n.__defaultStyleDisplayKey="data-jodit-default-style-display",n.mode=s.MODE_WYSIWYG,n.getVersion=function(){return n.version};var a=function(){};if(a.prototype=t.defaultOptions,n.options=new a,void 0!==i&&"object"==typeof i&&Object.keys(i).forEach(function(e){n.options[e]="object"!=typeof t.defaultOptions[e]||Array.isArray(t.defaultOptions[e])?i[e]:l.extend(!0,{},t.defaultOptions[e],i[e])}),void 0===(n.element="string"==typeof o?document.querySelector(o):o)||!(n.element instanceof HTMLElement))throw Error('Element "'+o+'" should be string or HTMLElement');n.container=l.dom('
'),n.container.classList.add("jodit_"+(n.options.theme||"default")+"_theme"),n.options.zIndex&&(n.container.style.zIndex=""+parseInt(""+n.options.zIndex,10)),n.workplace=l.dom('
'),n.progress_bar=l.dom('
'),n.selection=n.getInstance("Selection"),n.uploader=n.getInstance("Uploader"),n.events=n.getInstance("Events"),n.toolbar=new r.default(n),n.toolbar.build(n.options.buttons,n.container),n.__createEditor(),n.helper=d,n.setElementValue(),n.initPlugines(),n.options.events&&l.each(n.options.events,function(e,t){n.events.on(e,t)}),n.id=n.element.getAttribute("id")||""+(new Date).getTime(),t.instances[n.id]=n;try{n.doc.execCommand("enableObjectResizing",!1,!1),n.doc.execCommand("enableInlineTableEditing",!1,!1)}catch(e){}return n.setMode(n.options.defaultMode),n.events.fire("afterInit"),n}return i(t,e),t.prototype.getInstance=function(e,o){if(void 0===t.modules[e])throw Error("Need real module name");return void 0===this.__modulesInstances[e]&&(this.__modulesInstances[e]=new t.modules[e](this,o)),this.__modulesInstances[e]},t.prototype.initPlugines=function(){var e,o=Object.keys(t.plugins);for(e=0;o.length>e;e+=1)this.__plugins[o[e]]=new t.plugins[o[e]](this)},t.prototype.__createEditor=function(){var e=this;this.editor=l.dom('
'),l.css(this.editor,{width:this.options.width,height:this.options.height,minHeight:this.options.minHeight}),["keydown","keyup","keypress","mousedown","mouseup","mousepress","paste","resize"].forEach(function(t){e.editor.addEventListener(t,function(o){if(!1===e.events.fire(t,[o]))return o.preventDefault(),!1;e.setEditorValue()})}),this.options.spellcheck&&this.editor.setAttribute("spellcheck","true"),this.options.direction&&(this.editor.style.direction="rtl"===this.options.direction.toLowerCase()?"rtl":"ltr"),this.workplace.appendChild(document.createTextNode("\n")),this.workplace.appendChild(this.editor),this.workplace.appendChild(document.createTextNode("\n")),this.container.appendChild(this.workplace),this.workplace.appendChild(this.progress_bar),this.element.parentNode.insertBefore(this.container,this.element),this.element.style.display&&this.element.setAttribute(this.__defaultStyleDisplayKey,this.element.style.display),this.element.style.display="none"},t.prototype.destruct=function(){var e=this;!1!==this.events.fire("beforeDestruct")&&this.editor&&(this.element.hasAttribute(this.__defaultStyleDisplayKey)?(this.element.style.display=this.element.getAttribute(this.__defaultStyleDisplayKey),this.element.removeAttribute(this.__defaultStyleDisplayKey)):this.element.style.display="",this.element.hasAttribute("style")&&!this.element.getAttribute("style")&&this.element.removeAttribute("style"),delete this.selection,this.events.off(),delete this.events,Object.keys(this.__plugins).forEach(function(t){void 0!==e.__plugins[t].destruct&&"function"==typeof e.__plugins[t].destruct&&e.__plugins[t].destruct(),delete e.__plugins[t]}),this.components.forEach(function(e){void 0!==e.destruct&&"function"==typeof e.destruct&&e.destruct()}),this.container.parentNode.removeChild(this.container),delete this.container,delete this.editor,delete this.workplace,delete t.instances[this.id])},t.prototype.getElementValue=function(){return this.element.value},t.prototype.getEditorValue=function(){var e;if(void 0!==(e=this.events.fire("beforeGetValueFromEditor")))return e;"
"===(e=this.editor.innerHTML.replace(s.INVISIBLE_SPACE_REG_EXP,""))&&(e="");var t={value:e};return this.events.fire("afterGetValueFromEditor",[t]),t.value},t.prototype.setElementValue=function(e){if("string"!=typeof e&&void 0!==e)throw Error("value must be string");void 0!==e&&(this.element.value=e),this.getElementValue()!==this.getEditorValue()&&this.setEditorValue(this.getElementValue())},t.prototype.setEditorValue=function(e){if("string"!=typeof e&&void 0!==e)throw Error("value must be string");void 0!==e&&(this.editor.innerHTML=e);var t=this.getElementValue();t!==this.getEditorValue()&&(this.setElementValue(this.getEditorValue()),this.events.fire("change",[t,this.getEditorValue()]))},t.prototype.execCommand=function(e,t,o){void 0===t&&(t=!1),void 0===o&&(o=null);var i;if(e=e.toLowerCase(),!1!==this.events.fire("beforeCommand",[e,t,o]))switch(this.selection.focus(),e){case"selectall":this.selection.select(this.editor,!0);break;default:try{i=this.doc.execCommand(e,t,o)}catch(e){}}return this.events.fire("afterCommand",[e,t,o]),this.setEditorValue(),i},t.prototype.startDrag=function(){this.editor.classList.add("jodit_disabled")},t.prototype.endDrag=function(){this.editor.classList.remove("jodit_disabled")},t.prototype.getMode=function(){return this.mode},t.prototype.getRealMode=function(){return this.mode!==s.MODE_SPLIT?this.mode:document.activeElement&&"TEXTAREA"===document.activeElement.tagName?s.MODE_SOURCE:s.MODE_WYSIWYG},t.prototype.setMode=function(e){var t=this,o={mode:e},i=["jodit_wysiwyg_mode","jodit_source_mode","jodit_split_mode"];!1!==this.events.fire("beforeSetMode",[o])&&(this.mode=l.inArray(o.mode,[s.MODE_SOURCE,s.MODE_WYSIWYG,s.MODE_SPLIT])?o.mode:s.MODE_WYSIWYG,this.options.saveModeInCookie&&a.default.set("jodit_default_mode",this.mode,31),i.forEach(function(e){t.container.classList.remove(e)}),this.container.classList.add(i[this.mode-1]),this.events.fire("afterSetMode"))},t.prototype.toggleMode=function(){var e=this.getMode();l.inArray(e+1,[s.MODE_SOURCE,s.MODE_WYSIWYG,this.options.useSplitMode?s.MODE_SPLIT:9])?e+=1:e=s.MODE_WYSIWYG,this.setMode(e)},t.prototype.i18n=function(e){for(var o=this,i=[],n=1;arguments.length>n;n++)i[n-1]=arguments[n];if(this.options.debugLanguage)return"{"+e+"}";var r;return r=void 0!==this.options&&void 0!==t.lang[l.defaultLanguage(this.options.language)]?t.lang[l.defaultLanguage(this.options.language)]:void 0!==t.lang[l.defaultLanguage(t.defaultOptions.language)]?t.lang[l.defaultLanguage(t.defaultOptions.language)]:t.lang.en,function(e){return l.sprintf.apply(o,[e].concat(i))}(void 0!==this.options&&void 0!==this.options.i18n[l.defaultLanguage(this.options.language)]&&this.options.i18n[l.defaultLanguage(this.options.language)][e]?this.options.i18n[l.defaultLanguage(this.options.language)][e]:"string"==typeof r[e]&&r[e]?r[e]:"string"==typeof t.lang.en[e]&&t.lang.en[e]?t.lang.en[e]:e)},t.plugins={},t.modules={},t.instances={},t.lang={},t}(n.default);t.default=u,u.defaultOptions=new c.Config},function(e,t,o){"use strict";t.__esModule=!0;var i=o(3),n=o(0);t.default=function(){function e(){}return e.unwrap=function(e){for(var t=e.parentNode,o=e;o.firstChild;)t.insertBefore(o.firstChild,o);t.removeChild(o)},e.each=function(t,o){var i=t;do{(i=e.next(i,function(e){return!!e},t))&&o.call(i,i)}while(i)},e.create=function(e,t,o){var i;return e=e.toLowerCase(),"text"===e?i=o.createTextNode("string"==typeof t?t:""):(i=o.createElement(e),void 0!==t&&(i.innerHTML=t)),i},e.replace=function(t,o,i,r,a){void 0===i&&(i=!1),void 0===r&&(r=!1);var s="string"==typeof o?e.create(o,"",a):o;if(!r)for(;t.firstChild;)s.appendChild(t.firstChild);return i&&n.each(t.attributes,function(e,t){s.setAttribute(t.name,t.nodeValue)}),t.parentNode.replaceChild(s,t),s},e.isBlock=function(e){return e&&e.tagName&&i.IS_BLOCK.test(e.tagName)},e.canSplitBlock=function(e){return e&&e instanceof HTMLElement&&this.isBlock(e)&&!/^(TD|TH|CAPTION|FORM)$/.test(e.nodeName)&&void 0!==e.style&&!/^(fixed|absolute)/i.test(e.style.position)},e.prev=function(t,o,i,n){return void 0===n&&(n=!0),e.find(t,o,i,!1,"previousSibling",!!n&&"lastChild")},e.next=function(t,o,i,n){return void 0===n&&(n=!0),e.find(t,o,i,void 0,void 0,n?"firstChild":"")},e.find=function(t,o,i,n,r,a){if(void 0===n&&(n=!1),void 0===r&&(r="nextSibling"),void 0===a&&(a="firstChild"),n&&o(t))return t;var s,l=t;do{if(s=l[r],o(s))return s;if(a&&s&&s[a]){var d=e.find(s[a],o,s,!0,r,a);if(d)return d}s||(s=l.parentNode),l=s}while(l&&l!==i);return!1},e.isEmptyTextNode=function(e){return e&&e.nodeType===Node.TEXT_NODE&&0===e.nodeValue.replace(i.INVISIBLE_SPACE_REG_EXP,"").length},e.isNode=function(e){return"object"==typeof Node?e instanceof Node:"object"==typeof e&&"number"==typeof e.nodeType&&"string"==typeof e.nodeName},e.up=function(e,t,o){var i=e;if(!e)return!1;do{if(t(i))return i;if(i===o)break;i=i.parentNode}while(i&&i!==o);return!1},e.closest=function(t,o,i){var n;return n="function"==typeof o?o:o instanceof RegExp?function(e){return o.test(e.tagName)}:function(e){return RegExp("^("+o+")$","i").test(e.tagName)},e.up(t,n,i)},e.after=function(e,t){var o=e.parentNode;o.lastChild===e?o.appendChild(t):o.insertBefore(t,e.nextSibling)},e.all=function(t,o){var i=t,n=i.childNodes?Array.prototype.slice.call(i.childNodes):[];if(o(i))return i;n.forEach(function(t){e.all(t,o)})},e.wrap=function(t,o,i){var n,r=t,a=t,s=i.selection.save();do{(n=e.prev(r,function(t){return t&&!e.isBlock(t)},i.editor,!1))&&(r=n)}while(n);do{(n=e.next(a,function(t){return t&&!e.isBlock(t)},i.editor,!1))&&(a=n)}while(n);var l="string"==typeof o?e.create(o,"",i.doc):o;r.parentNode.insertBefore(l,r);for(var d=r;d&&(d=r.nextSibling,l.appendChild(r),r!==a);)r=d;return i.selection.restore(s),l},e.contains=function(e,t){for(;t.parentNode;){if(t.parentNode===e)return!0;t=t.parentNode}return!1},e.isOrContains=function(t,o){return t===o||e.contains(t,o)},e.apply=function(t,o,i){var r,a,s=function(e){return e.nodeType===Node.ELEMENT_NODE&&!1!==n.each(t.css,function(t,o){return-1!==o.indexOf(n.css(e,t).toLowerCase())})},l=[];i.selection.eachSelection(function(d){var c,u=i.win.getSelection(),p=u.getRangeAt(0);if(!(c=e.closest(d,function(e){return s(e)},i.editor))||!l.reduce(function(e,t){return e||t===c},!1)){if(void 0===a&&(a=c?0:1),c){if(p.collapsed)return i.selection.cursorInTheEdge(!0,c)?i.selection.setCursorBefore(c):i.selection.setCursorAfter(c),!1;var f=i.selection.cursorInTheEdge(!0,c),h=i.selection.cursorInTheEdge(!1,c);if(r=i.selection.save(),!1===f||!1===h){var g=i.doc.createRange();if(f){g.setStart(p.endContainer,p.endOffset),g.setEndAfter(c);var v=g.extractContents();e.after(c,v)}else if(h){g.setStartBefore(c),g.setEnd(p.startContainer,p.startOffset);var v=g.extractContents();c.parentNode.insertBefore(v,c)}else{var m=p.cloneRange();g.setStartBefore(c),g.setEnd(m.startContainer,m.startOffset);var v=g.extractContents();c.parentNode.insertBefore(v,c),g.setStart(m.endContainer,m.endOffset),g.setEndAfter(c),v=g.extractContents(),e.after(c,v)}}if(t.tagRegExp&&c.tagName.toLowerCase().match(t.tagRegExp)){for(;c.firstChild;)c.parentNode.insertBefore(c.firstChild,c);i.selection.restore(r),c.parentNode.removeChild(c)}else n.each(t.css,function(e){c.style.removeProperty(e)}),c.getAttribute("style")||c.removeAttribute("style"),c.normalize(),i.selection.restore(r);return i.setEditorValue(),!1}1===a&&(c=o(t),c.normalize()),c&&l.push(c)}})},e}()},function(e,t,o){"use strict";t.__esModule=!0;var i=o(0);t.INVISIBLE_SPACE="\ufeff",t.INVISIBLE_SPACE_REG_EXP=/[\uFEFF]/g,t.INVISIBLE_SPACE_REG_EXP_START=/^[\uFEFF]+/g,t.SPACE_REG_EXP=/[\s\n\t\r\uFEFF\u200b]+/g,t.SPACE_REG_EXP_START=/^[\s\n\t\r\uFEFF\u200b]+/g,t.SPACE_REG_EXP_END=/[\s\n\t\r\uFEFF\u200b]+$/g,t.IS_BLOCK=/^(PRE|DIV|P|TD|TH|LI|H[1-6]|TABLE|BLOCKQUOTE)$/i,t.KEY_ENTER=13,t.KEY_BACKSPACE=8,t.KEY_DELETE=46,t.KEY_TAB=9,t.KEY_LEFT=37,t.KEY_TOP=38,t.KEY_RIGHT=39,t.KEY_BOTTOM=40,t.KEY_Z=90,t.KEY_Y=89,t.NEARBY=5,t.ACCURACY=10,t.PARAGRAPH="P",t.MODE_WYSIWYG=1,t.MODE_SOURCE=2,t.MODE_SPLIT=3,t.TEXT_PLAIN=i.isIE()?"text":"text/plain"},function(e,t,o){"use strict";t.__esModule=!0;var i=o(3),n=o(0),r=o(2),a=o(9),s=a.Widget.ColorPickerWidget,l=a.Widget.TabsWidget,d=a.Widget.ImageSelectorWidget;t.Config=function(){function e(){this.zIndex=0,this.theme="default",this.saveModeInCookie=!1,this.spellcheck=!0,this.iframeStyle='html{margin: 0px;}body{padding:10px;background:transparent;color:#000;position:relative;z-index: 2;user-select:auto;margin:0px;overflow:auto;}body:after{content:"";clear:both;display:block}table{width:100%;border-collapse:collapse} th,td{border:1px solid #ccc;-webkit-user-select:text;-moz-user-select:text;-ms-user-select:text;user-select:text}td.jodit_focused_cell,th.jodit_focused_cell{border: 1px double blue}p{margin-top:0;}.jodit_editor .jodit_iframe_wrapper{display: block;clear: both;user-select: none;position: relative;}.jodit_editor .jodit_iframe_wrapper:after {position:absolute;content:"";z-index:1;top:0;left:0;right: 0;bottom: 0;cursor: pointer;display: block;background: rgba(0, 0, 0, 0);}',this.iframeCSSLinks=[],this.width="auto",this.height="auto",this.minHeight=100,this.direction="",this.language="auto",this.debugLanguage=!1,this.i18n="en",this.tabIndex=-1,this.autofocus=!1,this.toolbar=!0,this.enter=i.PARAGRAPH,this.defaultMode=i.MODE_WYSIWYG,this.useSplitMode=!1,this.colors={greyscale:["#000000","#434343","#666666","#999999","#B7B7B7","#CCCCCC","#D9D9D9","#EFEFEF","#F3F3F3","#FFFFFF"],palette:["#980000","#FF0000","#FF9900","#FFFF00","#00F0F0","#00FFFF","#4A86E8","#0000FF","#9900FF","#FF00FF"],full:["#E6B8AF","#F4CCCC","#FCE5CD","#FFF2CC","#D9EAD3","#D0E0E3","#C9DAF8","#CFE2F3","#D9D2E9","#EAD1DC","#DD7E6B","#EA9999","#F9CB9C","#FFE599","#B6D7A8","#A2C4C9","#A4C2F4","#9FC5E8","#B4A7D6","#D5A6BD","#CC4125","#E06666","#F6B26B","#FFD966","#93C47D","#76A5AF","#6D9EEB","#6FA8DC","#8E7CC3","#C27BA0","#A61C00","#CC0000","#E69138","#F1C232","#6AA84F","#45818E","#3C78D8","#3D85C6","#674EA7","#A64D79","#85200C","#990000","#B45F06","#BF9000","#38761D","#134F5C","#1155CC","#0B5394","#351C75","#733554","#5B0F00","#660000","#783F04","#7F6000","#274E13","#0C343D","#1C4587","#073763","#20124D","#4C1130"]},this.colorPickerDefaultTab="background",this.imageDefaultWidth=300,this.removeButtons=[],this.buttons=["source","|","bold","italic","|","ul","ol","|","font","fontsize","brush","paragraph","|","image","video","table","link","|","align","|","undo","redo","|","hr","eraser","fullsize","about"],this.controls={about:{exec:function(e){var t=new(o(7).default)(e);t.setTitle(e.i18n("About Jodit")),t.setContent('
'+e.i18n("Jodit Editor")+" v."+e.getVersion()+" "+e.i18n("Free Non-commercial Version")+'
'+e.i18n("Jodit User's Guide")+" "+e.i18n("contains detailed help for using")+"
"+e.i18n("For information about the license, please go to our website:")+'
"+e.i18n("Copyright © XDSoft.net - Chupurnov Valeriy. All rights reserved.")+"
"),t.open()},tooltip:"About Jodit",mode:i.MODE_SOURCE+i.MODE_WYSIWYG},fullsize:{exec:function(e){e.events.fire("toggleFullsize")},tooltip:"Open editor in fullsize",mode:i.MODE_SOURCE+i.MODE_WYSIWYG},eraser:{command:"removeFormat",tooltip:"Clear Formatting"},brush:{css:{backgroundColor:function(e){var t=e.editor,o=e.color,i=function(e){var t,r;if("object"==typeof e){for(r=Object.keys(e),t=0;r.length>t;t+=1)if(i(e[r[t]]))return!0}else if(Array.isArray(e))return-1!==e.indexOf(n.normalizeColor(o));return!1};return i(t.options.colors)}},popup:function(e){var t,o,i="",n="",r=e.win.getSelection(),a=function(){if(t&&(!t.hasAttribute("style")||!t.getAttribute("style").length)){for(var o=e.selection.save();t.firstChild;)t.parentNode.insertBefore(t.firstChild,t);t.parentNode.removeChild(t),t=null,e.selection.restore(o)}},d=function(){r&&r.anchorNode&&[r.anchorNode,r.anchorNode.parentNode].forEach(function(o){o&&o.hasAttribute&&o.hasAttribute("style")&&-1!==o.getAttribute("style").indexOf("background")&&o.style.backgroundColor&&(t=o,n=e.win.getComputedStyle(t).getPropertyValue("background-color")),o&&o.hasAttribute&&o.hasAttribute("style")&&-1!==o.getAttribute("style").indexOf("color")&&o.style.color&&(t=o,i=t.style.color)})};d();var c=s(e,function(o){t?t.style.backgroundColor=o:(e.execCommand("background",!1,o),d()),a()},n),u=s(e,function(o){t?t.style.color=o:(e.execCommand("forecolor",!1,o),d()),a()},i);return o="background"===e.options.colorPickerDefaultTab?{Background:c,Text:u}:{Text:u,Background:c},l(e,o)},tooltip:"Fill color or set the text color"},redo:{mode:i.MODE_SPLIT,tooltip:"Redo"},undo:{mode:i.MODE_SPLIT,tooltip:"Undo"},bold:{tagRegExp:/^(strong|b)$/i,tags:["strong","b"],css:{"font-weight":["bold","700"]},tooltip:"Bold"},italic:{tagRegExp:/^(em|i)$/i,tags:["em","i"],css:{"font-style":"italic"},tooltip:"Italic"},underline:{tagRegExp:/^(u)$/i,tags:["u"],css:{"text-decoration":"underline"},tooltip:"Underline"},strikethrough:{tagRegExp:/^(s)$/i,tags:["s"],css:{"text-decoration":"line-through"},tooltip:"Strike through"},ul:{command:"insertUnorderedList",controlName:"ul",tags:["ul"],tooltip:"Insert Unordered List"},ol:{command:"insertOrderedList",controlName:"ol",tags:["ol"],tooltip:"Insert Ordered List"},align:{tags:["p","div","span","td","th","img"],name:"left",tooltip:"Align",list:["center","left","right","justify"]},center:{command:"justifyCenter",tags:["center"],css:{"text-align":"center"},tooltip:"Align Center"},justify:{command:"justifyFull",css:{"text-align":"justify"},tooltip:"Align Justify"},left:{command:"justifyLeft",css:{"text-align":"left"},tooltip:"Align Left"},right:{command:"justifyRight",css:{"text-align":"right"},tooltip:"Align Right"},hr:{command:"insertHorizontalRule",tags:["hr"],tooltip:"Insert Horizontal Line"},image:{popup:function(e,t,o,i){var r,a=function(t){e.selection.insertNode(n.dom('',e.doc))};return t&&t.nodeType!==Node.TEXT_NODE&&("IMG"===t.tagName||n.$$("img",t).length)&&(r="IMG"===t.tagName?t:n.$$("img",t)[0]),d(e,{filebrowser:function(e){if(e.files&&e.files.length){var t=void 0;for(t=0;e.files.length>t;t+=1)a(e.baseurl+e.files[t])}i()},upload:function(e){var t;if(e.files&&e.files.length)for(t=0;e.files.length>t;t+=1)a(e.baseurl+e.files[t]);i()},url:function(t,o){var a=r||n.dom("",e.doc);a.setAttribute("src",t),a.setAttribute("alt",o),r||e.selection.insertNode(a),i()}},r)},tags:["img"],tooltip:"Insert Image"},link:{popup:function(e,t,o,i){var a=e.win.getSelection(),s=n.dom('
  
");t=!(!t||!r.default.closest(t,"A",e.editor))&&r.default.closest(t,"A",e.editor),t?(n.val(s,"input[name=url]",t.getAttribute("href")),n.val(s,"input[name=text]",t.innerText),s.querySelector("input[name=target]").checked="_blank"===t.getAttribute("target"),s.querySelector("input[name=nofollow]").checked="nofollow"===t.getAttribute("rel")):(s.querySelector(".jodit_unlink_button").style.display="none",n.val(s,"input[name=text]",""+a));var l=e.selection.save();return s.querySelector(".jodit_unlink_button").addEventListener("mousedown",function(){t&&r.default.unwrap(t),i()}),s.addEventListener("submit",function(o){o.preventDefault(),e.selection.restore(l);var a=t||r.default.create("a","",e.doc);return n.val(s,"input[name=url]")?(a.setAttribute("href",n.val(s,"input[name=url]")),a.innerText=n.val(s,"input[name=text]"),s.querySelector("input[name=target]").checked?a.setAttribute("target","_blank"):a.removeAttribute("target"),s.querySelector("input[name=nofollow]").checked?a.setAttribute("rel","nofollow"):a.removeAttribute("rel"),t||e.selection.insertNode(a),i(),!1):(s.querySelector("input[name=url]").focus(),s.querySelector("input[name=url]").classList.add("jodit_error"),!1)}),s},tags:["a"],tooltip:"Insert link"},video:{popup:function(e){var t=n.dom('\n \n \n
"),i=n.dom('
\n \'\n \'\n '
"),r={},a=e.selection.save(),s=function(t){e.selection.restore(a),e.selection.insertHTML(t)};return r[o(6).default.getIcon("link")+" "+e.i18n("Link")]=t,r[o(6).default.getIcon("source")+" "+e.i18n("Code")]=i,i.addEventListener("submit",function(e){return e.preventDefault(),n.trim(n.val(i,"textarea[name=code]"))?(s(n.val(i,"textarea[name=code]")),!1):(i.querySelector("textarea[name=code]").focus(),i.querySelector("textarea[name=code]").classList.add("jodit_error"),!1)}),t.addEventListener("submit",function(e){return e.preventDefault(),n.isURL(n.val(t,"input[name=code]"))?(s(n.convertMediaURLToVideoEmbed(n.val(t,"input[name=code]"))),!1):(t.querySelector("input[name=code]").focus(),t.querySelector("input[name=code]").classList.add("jodit_error"),!1)}),l(e,r)},tags:["iframe"],tooltip:"Insert youtube/vimeo video"},fontsize:{command:"fontSize",list:["8","9","10","11","12","14","18","24","30","36","48","60","72","96"],template:function(e,t,o){return o},tooltip:"Font size"},font:{command:"fontname",exec:function(e,t,o){e.execCommand(o.command,!1,o.args[0])},list:{"Helvetica,sans-serif":"Helvetica","Arial,Helvetica,sans-serif":"Arial","Georgia,serif":"Georgia","Impact,Charcoal,sans-serif":"Impact","Tahoma,Geneva,sans-serif":"Tahoma","'Times New Roman',Times,serif":"Times New Roman","Verdana,Geneva,sans-serif":"Verdana"},template:function(e,t,o){return''+o+""},tooltip:"Font family"},paragraph:{command:"formatBlock",exec:function(e,t,o){e.execCommand(o.command,!1,o.args[0])},list:{p:"Normal",h1:"Heading 1",h2:"Heading 2",h3:"Heading 3",h4:"Heading 4",blockquote:"Quote",pre:"Code"},template:function(e,t,o){return"<"+t+' class="jodit_list_element">'+e.i18n(o)+""},tooltip:"Insert format block"},table:{cols:10,popup:function(e,t,o,i){var r,a,s,l,d=1,c=1,u=o.cols,p=n.dom('
'),f=p.querySelectorAll("span")[0],h=p.querySelectorAll("span")[1],g=[],v=function(e){var t=(e+1)*u;if(g.length>t){for(r=t;g.length>r;r+=1)p.removeChild(g[r]),delete g[r];g.length=t}for(r=0;t>r;r+=1)g[r]||(l=document.createElement("div"),l.setAttribute("data-index",""+r),g.push(l));g.forEach(function(e){p.appendChild(e)}),p.style.width=g[0].offsetWidth*u+"px"};v(1),g[0].className="hovered";var m=function(e,t){var o=e.target;if("DIV"===o.tagName){if(s=isNaN(t)?parseInt(o.getAttribute("data-index"),10):t,d=Math.ceil((s+1)/u),c=s%u+1,v(d),c===u||u-1>c&&u>10)return u=c===u?u+1:u-1,m(e,c+(d-1)*u-1);for(r=0;g.length>r;r+=1)g[r].className=r%u+1>c||d=r;r+=1){for(l=e.doc.createElement("tr"),a=1;c>=a;a+=1)p=e.doc.createElement("td"),p.style.width=g+"%",n||(n=p),f=e.doc.createElement("br"),p.appendChild(f),l.appendChild(e.doc.createTextNode("\n")),l.appendChild(e.doc.createTextNode("\t")),l.appendChild(p);h.appendChild(e.doc.createTextNode("\n")),h.appendChild(l)}e.selection.insertNode(e.doc.createTextNode("\n")),e.selection.insertNode(h),e.selection.setCursorIn(n),i()}}),p},tags:["table"],tooltip:"Insert table"},source:{mode:i.MODE_SPLIT,exec:function(e){e.toggleMode()},tooltip:"Change mode"}},this.events={},this.textIcons=!0}return e}()},function(e,t,o){"use strict";t.__esModule=!0,t.default=function(){function e(e){this.__scope=[],this.__scopeNamespace={},this.classSeparator=/[\s]+/,this.parent=e,this.doc=document,this.win=window,e&&e.components&&e.components.push(this)}return e.prototype.__fire=function(e,t){var o=this.doc.createEvent("HTMLEvents");o.initEvent(t,!0,!0),e.dispatchEvent(o)},e.prototype.__off=function(e,t){if(void 0===e&&(e=!1),void 0===t&&(t=!1),t&&/^\./.test(t)){var o=t.replace(/^\./,"");return this.__scopeNamespace[o]&&this.__scopeNamespace[o].forEach(function(t){(Array.isArray(e)?e:[e]).forEach(function(e){t.element&&t.element.removeEventListener&&(!1===e||e===t.element)&&t.element.removeEventListener(t.event,t.callback)})}),this}return this.__scope.forEach(function(o){(Array.isArray(e)?e:[e]).forEach(function(e){!o.element||!o.element.removeEventListener||!1!==e&&e!==o.element||!1!==t&&t!==o.event||o.element.removeEventListener(o.event,o.callback)})}),this},e.prototype.__on=function(e,t,o,i){var n=this;"function"==typeof o&&(i=o,o=!1);var r=t?t.split(this.classSeparator):[],a=i;return r.forEach(function(t){var r="";/\./.test(t)&&(l=t.split("."),t=l[0],r=l[1]),o&&(a=function(e){for(var t=e.target;t&&t!==this;){if(t.matches(o)){if(!1===i.call(t,e))return e.preventDefault(),!1;return}t=t.parentNode}}),(Array.isArray(e)?e:[e]).forEach(function(e){e.addEventListener(t,a,!1)});var s={element:e,event:t,callback:a};void 0===n.__scopeNamespace[r]&&(n.__scopeNamespace[r]=[]),n.__scopeNamespace[r].push(s),n.__scope.push(s);var l}),this},e.prototype.destruct=function(){this.__off()},e}()},function(e,t,o){"use strict";var i=this&&this.__extends||function(){var e=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])};return function(t,o){function i(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(i.prototype=o.prototype,new i)}}();t.__esModule=!0;var n=o(5),r=o(0),a=o(3),s=o(2);t.default=function(e){function t(t){var o=e.call(this,t)||this;return o.__popapOpened=!1,o.__listOpened=!1,o.closeAll=function(){o.list.innerHTML="",o.popup.innerHTML="",o.popup.style.display="none",o.list.style.display="none",r.$$(".jodit_dropdown_open, .jodit_popap_open",o.container).forEach(function(e){e.classList.remove("jodit_dropdown_open","jodit_popap_open")}),o.__popapOpened&&o.parent.selection&&o.parent.selection.clear(),o.__popapOpened=!1,o.__listOpened=!1},o.defaultControl={template:function(e,t,i){return o.parent.i18n(i)}},o.buttonList=[],o.initEvents=function(){o.popup.addEventListener("mousedown",function(e){e.stopPropagation()}),o.list.addEventListener("mousedown",function(e){e.stopPropagation()}),o.__on(window,"mousedown",function(){(o.__popapOpened||o.__listOpened)&&o.closeAll()}),o.parent.events.on("mousedown keydown change afterSetMode",function(){var e=function(){o.parent.selection&&o.checkActiveButtons(o.parent.selection.current())};o.parent.options.observer.timeout?setTimeout(e,o.parent.options.observer.timeout):e()})},o.container=r.dom('
'),o.popup=r.dom('
'),o.list=r.dom('
    '),o.initEvents(),o}return i(t,e),t.getIcon=function(e,o){return void 0===o&&(o=""),void 0!==t.icons[e]?t.icons[e]:o},t.prototype.openPopup=function(e,t,o){void 0===o&&(o=!1),this.closeAll(),t&&(e.classList.add("jodit_popup_open"),e.appendChild(this.popup),this.__popapOpened=!0,this.popup.innerHTML="",this.popup.appendChild(t),this.popup.style.display="block",this.popup.classList.toggle("jodit_right",o))},t.prototype.openList=function(e){e.classList.add("jodit_dropdown_open"),this.closeAll(),this.__listOpened=!0,this.list.style.display="block"},t.__toggleButton=function(e,t){e.classList.toggle("jodit_disabled",!t),t?e.hasAttribute("disabled")&&e.removeAttribute("disabled"):e.hasAttribute("disabled")||e.setAttribute("disabled","disabled")},t.prototype.checkActiveButtons=function(e){var o=this;this.buttonList.forEach(function(i){var n=i.control,r=i.btn;r.classList.remove("jodit_active");var l=void 0===n||void 0===n.mode?a.MODE_WYSIWYG:n.mode;if(t.__toggleButton(r,l===a.MODE_SPLIT||l===o.parent.getRealMode()),e){var d,c,u,p=function(e,t){return""+o.parent.win.getComputedStyle(e).getPropertyValue(t)},f=function(e,t){var i=0,n=0;Object.keys(e).forEach(function(r){var a=e[r];"function"==typeof a?a({editor:o.parent,value:p(t,r).toLowerCase()})&&(i+=1):-1!==a.indexOf(p(t,r).toLowerCase())&&(i+=1),n+=1}),n===i&&r.classList.add("jodit_active")};(n.tags||n.options&&n.options.tags)&&(d=n.tags||n.options&&n.options.tags,c=e,s.default.up(c,function(e){if(-1!==d.indexOf(e.nodeName.toLowerCase()))return r.classList.add("jodit_active"),!0},o.parent.editor)),(n.css||n.options&&n.options.css)&&(u=n.css||n.options&&n.options.css,c=e,s.default.up(c,function(e){e&&e.nodeType!==Node.TEXT_NODE&&!e.classList.contains("jodit_active")&&f(u,e)},o.parent.editor))}})},t.prototype.addButton=function(e,o,i,n){var a=this,s=r.extend(!0,{},o,this.defaultControl),l=r.dom('
  • '),d="string"==typeof e?e:e.name||"empty",c=l.querySelector("a"),u=t.getIcon(d,!1);!1===u&&(u=t.getIcon("string"==typeof s.name?s.name:"empty"));var p=d.replace(/[^a-zA-Z0-9]/g,"_");l.classList.add("jodit_toolbar_btn"),l.classList.add("jodit_toolbar_btn-"+p),this.parent.events.on(r.camelCase("can-"+p),function(e){t.__toggleButton(l,e)});var f=r.dom(u);return f.classList.add("jodit_icon","jodit_icon_"+p),c.appendChild(f),void 0!==s&&"object"==typeof s||(s={command:d}),void 0!==i&&""!==i&&(c.innerHTML=i),s.list&&(l.classList.add("jodit_with_dropdownlist"),c.appendChild(r.dom(''))),s.iconURL&&(c.style.backgroundImage="url("+s.iconURL+")"),s.tooltip?l.querySelector(".jodit_tooltip").innerHTML=this.parent.i18n(s.tooltip):l.removeChild(l.querySelector(".jodit_tooltip")),l.addEventListener("mousedown",function(e){if(e.stopImmediatePropagation(),e.preventDefault(),l.classList.contains("jodit_disabled"))return!1;s.list?(a.openList(l),r.each(s.list,function(e,t){var o;o=void 0!==a.parent.options.controls[t]?a.addButton(t,a.parent.options.controls[t],"",n):void 0!==a.parent.options.controls[e]?a.addButton(e,r.extend({},a.parent.options.controls[e],t),"",n):a.addButton(e,{exec:s.exec,command:s.command,args:[s.args&&s.args[0]||e,s.args&&s.args[1]||t]},s.template&&s.template(a.parent,e,t),n),a.list.appendChild(o)}),l.appendChild(a.list)):void 0!==s.exec&&"function"==typeof s.exec?(s.exec(a.parent,n||a.parent.selection.current(),s,e,l),a.parent.setEditorValue(),a.parent.events.fire("hidePopup"),a.closeAll()):void 0!==s.popup&&"function"==typeof s.popup?a.openPopup(l,s.popup(a.parent,n||a.parent.selection.current(),s,a.closeAll)):(s.command||d)&&(a.parent.execCommand(s.command||d,s.args&&s.args[0]||!1,s.args&&s.args[1]||null),a.closeAll())}),this.buttonList.push({control:s,btn:l,name:d}),l},t.prototype.build=function(e,t,o){var i=this,n=!1;this.container.innerHTML="",e.forEach(function(e){var t="string"==typeof e?e:e.name;if(-1===i.parent.options.removeButtons.indexOf(t))switch(t){case"\n":i.container.appendChild(r.dom('
  • '));break;case"|":n||(n=!0,i.container.appendChild(r.dom('
  • ')));break;default:var a=e;if(n=!1,"object"!=typeof a&&void 0!==i.parent.options.controls[a]&&(a=i.parent.options.controls[a]),"object"!=typeof a)throw Error("Need ControlType "+a);i.container.appendChild(i.addButton(e,a,"",o))}}),t.appendChild(this.container)},t.icons={},t}(n.default)},function(e,t,o){"use strict";var i=this&&this.__extends||function(){var e=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])};return function(t,o){function i(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(i.prototype=o.prototype,new i)}}(),n=this&&this.__assign||Object.assign||function(e){for(var t,o=1,i=arguments.length;i>o;o++){t=arguments[o];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e};t.__esModule=!0;var r=o(1),a=o(5),s=o(4),l=o(0),d=o(6);s.Config.prototype.dialog={zIndex:100002,resizable:!0,draggable:!0,fullsize:!1,fullsizeButton:!1};var c=function(e){function t(t,o){void 0===o&&(o={});var i=e.call(this,t)||this;return i.destinition=document.body,i.destroyAfterClose=!1,i.moved=!1,i.iSetMaximization=!1,i.resizeble=!1,i.draggable=!1,i.startPoint={x:0,y:0,w:0,h:0},i.close=function(e){e&&(e.stopImmediatePropagation(),e.preventDefault()),i.parent&&i.parent.events&&i.parent.events.fire(i,"beforeClose"),i.dialogbox.classList.remove("active"),i.iSetMaximization&&i.maximization(!1),i.destroyAfterClose&&i.destruct(),i.parent&&i.parent.events.fire(i,"afterClose")},i.options=t&&t.options?t.options.dialog:s.Config.prototype.dialog,i.options=n({},i.options,o),i.dialogbox=l.dom('"),i.dialogbox.__jodit_dialog=i,i.dialog=i.dialogbox.querySelector(".jodit_dialog"),i.resizer=i.dialogbox.querySelector(".jodit_dialog_resizer"),i.parent&&i.parent.options&&i.parent.options.textIcons&&i.dialogbox.classList.add("jodit_text_icons"),i.dialogbox_header=i.dialogbox.querySelector(".jodit_dialog_header>h4"),i.dialogbox_content=i.dialogbox.querySelector(".jodit_dialog_content"),i.dialogbox_footer=i.dialogbox.querySelector(".jodit_dialog_footer"),i.dialogbox_close=i.dialogbox.querySelector(".jodit_dialog_header>a.jodit_close"),i.dialogbox_fullsize=l.dom(''+(r.default.modules.Toolbar.getIcon?r.default.modules.Toolbar.getIcon(o.fullsize?"fullsize":"shrink"):"")+""),i.destinition.appendChild(i.dialogbox),i.dialogbox.addEventListener("close_dialog",i.close),i.dialogbox_close.addEventListener("mousedown",i.close),i.dialogbox_fullsize.addEventListener("click",function(){var e=i.maximization();r.default.modules.Toolbar&&(i.dialogbox_fullsize.innerHTML=r.default.modules.Toolbar.getIcon(e?"shrink":"fullsize"))}),i.__on(window,"mousemove",i.onMouseMove.bind(i)).__on(window,"mouseup",i.onMouseUp.bind(i)).__on(window,"keydown",i.onKeyDown.bind(i)).__on(window,"resize",i.onResize.bind(i)),i.dialogbox.querySelector(".jodit_dialog_header").addEventListener("mousedown",i.onHeaderMouseDown.bind(i)),i.options.resizable&&i.resizer.addEventListener("mousedown",i.onResizerMouseDown.bind(i)),i}return i(t,e),t.prototype.setSize=function(e,t){e&&l.css(this.dialog,"width",e),t&&l.css(this.dialog,"height",t)},t.prototype.setPosition=function(e,t){var o=window.innerWidth,i=window.innerHeight,n=o/2-this.dialog.offsetWidth/2,r=i/2-this.dialog.offsetHeight/2;void 0!==e&&void 0!==t&&(this.offsetX=e,this.offsetY=t,this.moved=Math.abs(e-n)>100||Math.abs(t-r)>100),this.dialog.style.left=(e||n)+"px",this.dialog.style.top=(t||r)+"px"},t.prototype.setElements=function(e,t){var o=[];l.asArray(t).forEach(function(t){var i=l.dom(t);o.push(i),i.parentNode!==e&&e.appendChild(i)}),[].slice.call(e.childNodes).forEach(function(t){-1===o.indexOf(t)&&e.removeChild(t)})},t.prototype.setTitle=function(e){this.setElements(this.dialogbox_header,e)},t.prototype.setContent=function(e){this.setElements(this.dialogbox_content,e)},t.prototype.setFooter=function(e){this.setElements(this.dialogbox_footer,e),this.dialog.classList.toggle("with_footer",!!e)},t.prototype.getMaxZIndexDialog=function(){var e,t,o=0,i=this;return l.$$(".jodit_dialog_box",document.body).forEach(function(n){e=n.__jodit_dialog,t=parseInt(l.css(n,"zIndex"),10),e.isOpened()&&!isNaN(t)&&t>o&&(i=e,o=t)}),i},t.prototype.setMaxZIndex=function(){var e=0,t=0;l.$$(".jodit_dialog_box",document.body).forEach(function(o){t=parseInt(l.css(o,"zIndex"),10),e=Math.max(isNaN(t)?0:t,e)}),this.dialogbox.style.zIndex=""+(e+1)},t.prototype.maximization=function(e){return"boolean"!=typeof e&&(e=!this.dialogbox.classList.contains("jodit_dialog_box-fullsize")),this.dialogbox.classList.toggle("jodit_dialog_box-fullsize",e),[document.body,document.body.parentNode].forEach(function(t){t.classList.toggle("jodit_fullsize_box",e)}),this.iSetMaximization=e,e},t.prototype.open=function(e,t,o,i){this.parent&&this.parent.events&&!1===this.parent.events.fire(this,"beforeOpen")||(this.destroyAfterClose=!0===o,this.options.fullsizeButton&&this.dialogbox_close.parentNode.appendChild(this.dialogbox_fullsize),void 0!==t&&this.setTitle(t),e&&this.setContent(e),this.dialogbox.classList.add("active"),i&&this.dialogbox.classList.add("jodit_modal"),this.setPosition(this.offsetX,this.offsetY),this.setMaxZIndex(),this.options.fullsize&&this.maximization(!0),this.parent&&this.parent.events&&this.parent.events.fire(this,"afterOpen"))},t.prototype.isOpened=function(){return this.dialogbox.classList.contains("active")},t.prototype.onMouseUp=function(){(this.draggable||this.resizeble)&&(this.draggable=!1,this.resizeble=!1,this.parent&&this.parent.events&&this.parent.events.fire(this,"endResize endMove"))},t.prototype.onHeaderMouseDown=function(e){this.options.draggable&&(this.draggable=!0,this.startX=e.clientX,this.startY=e.clientY,this.startPoint.x=l.css(this.dialog,"left"),this.startPoint.y=l.css(this.dialog,"top"),this.setMaxZIndex(),e.preventDefault(),this.parent&&this.parent.events&&this.parent.events.fire(this,"startMove"))},t.prototype.onMouseMove=function(e){this.draggable&&this.options.draggable&&(this.setPosition(this.startPoint.x+e.clientX-this.startX,this.startPoint.y+e.clientY-this.startY),this.parent&&this.parent.events&&this.parent.events.fire(this,"move",[e.clientX-this.startX,e.clientY-this.startY]),e.stopImmediatePropagation(),e.preventDefault()),this.resizeble&&this.options.resizable&&(this.setSize(this.startPoint.w+e.clientX-this.startX,this.startPoint.h+e.clientY-this.startY),this.parent&&this.parent.events&&this.parent.events.fire(this,"resizeDialog",[e.clientX-this.startX,e.clientY-this.startY]),e.stopImmediatePropagation(),e.preventDefault())},t.prototype.onKeyDown=function(e){if(this.isOpened()&&27===e.which){var t=this.getMaxZIndexDialog();t?t.close():this.close(),e.stopImmediatePropagation()}},t.prototype.onResize=function(){!this.options.resizable||this.moved||!this.isOpened()||this.offsetX||this.offsetY||this.setPosition()},t.prototype.destruct=function(){this.dialogbox.parentNode.removeChild(this.dialogbox),delete this.dialogbox,e.prototype.destruct.call(this)},t.prototype.onResizerMouseDown=function(e){this.resizeble=!0,this.startX=e.clientX,this.startY=e.clientY,this.startPoint.w=this.dialog.offsetWidth,this.startPoint.h=this.dialog.offsetHeight,this.parent.events&&this.parent.events.fire(this,"startResize")},t}(a.default);t.default=c,t.Alert=function(e,t,o){"function"==typeof t&&(o=t,t=void 0);var i=new c,n=l.dom('
    '),a=l.dom(''+d.default.getIcon("cancel")+""+r.default.prototype.i18n("Ok")+"");n.innerHTML=e,a.addEventListener("click",function(){o&&"function"==typeof o&&!1===o(i)||i.close()}),i.setFooter([a]),i.open(n,t||" ",!0,!0),a.focus()},r.default.Alert=t.Alert,t.Promt=function(e,t,o,i){var n=new c,a=l.dom(''+d.default.getIcon("cancel")+""+r.default.prototype.i18n("Cancel")+""),s=l.dom(''+d.default.getIcon("check")+""+r.default.prototype.i18n("Ok")+""),u=l.dom('
    '),p=l.dom(''),f=l.dom("");"function"==typeof t&&(o=t,t=void 0),i&&p.setAttribute("placeholder",i),f.innerHTML=e,u.appendChild(f),u.appendChild(p),a.addEventListener("click",n.close,!1);var h=function(){o&&"function"==typeof o&&!1===o(p.value)||n.close()};s.addEventListener("click",h),u.addEventListener("submit",function(){return h(),!1}),n.setFooter([s,a]),n.open(u,t||" ",!0,!0),p.focus()},r.default.Promt=t.Promt,t.Confirm=function(e,t,o){var i,n,a=new c,s=l.dom('
    '),u=l.dom("");"function"==typeof t&&(o=t,t=void 0),u.innerHTML=e,s.appendChild(u),i=l.dom(''+d.default.getIcon("cancel")+""+r.default.prototype.i18n("Cancel")+""),i.addEventListener("click",function(){o&&o(!1),a.close()});var p=function(){o&&o(!0),a.close()};n=l.dom(''+d.default.getIcon("check")+""+r.default.prototype.i18n("Yes")+""),n.addEventListener("click",p),s.addEventListener("submit",function(){return p(),!1}),a.setFooter([n,i]),a.open(s,t||" ",!0,!0),n.focus()},r.default.Confirm=t.Confirm},function(e,t,o){"use strict";var i=this&&this.__extends||function(){var e=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])};return function(t,o){function i(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(i.prototype=o.prototype,new i)}}();t.__esModule=!0;var n=o(5),r=o(0),a=o(3),s=o(2);t.JODIT_SELECTED_CELL_MARKER="data-jodit-selected-cell";var l=function(e){function o(){return null!==e&&e.apply(this,arguments)||this}return i(o,e),o.addSelected=function(e){e.setAttribute(t.JODIT_SELECTED_CELL_MARKER,"1")},o.restoreSelection=function(e){e.removeAttribute(t.JODIT_SELECTED_CELL_MARKER)},o.getAllSelectedCells=function(e){return r.$$("td["+t.JODIT_SELECTED_CELL_MARKER+"],th["+t.JODIT_SELECTED_CELL_MARKER+"]",e)},o.getRowsCount=function(e){return e.rows.length},o.getColumnsCount=function(e){return o.formalMatrix(e).reduce(function(e,t){return Math.max(e,t.length)},0)},o.formalMatrix=function(e,t){for(var o=[[]],i=Array.prototype.slice.call(e.rows),n=0,r=void 0;i.length>n;n+=1){var a=Array.prototype.slice.call(i[n].cells);for(r=0;a.length>r;r+=1)if(!1===function(e,i){void 0===o[i]&&(o[i]=[]);for(var n,r,a=e.colSpan,s=e.rowSpan,l=0;o[i][l];)l+=1;for(r=0;s>r;r+=1)for(n=0;a>n;n+=1){if(void 0===o[i+r]&&(o[i+r]=[]),t&&!1===t(e,i+r,l+n,a,s))return!1;o[i+r][l+n]=e}}(a[r],n))return o}return o},o.formalCoordinate=function(e,t,i){void 0===i&&(i=!1);var n=0,r=0,a=1,s=1;return o.formalMatrix(e,function(e,o,l,d,c){if(t===e)return n=o,r=l,a=d,s=c,i&&(r+=d-1,n+=c-1),!1}),[n,r,a,s]},o.appendRow=function(e,t,i){void 0===t&&(t=!1),void 0===i&&(i=!0);var n,a=o.getColumnsCount(e),l=s.default.create("tr","",e.ownerDocument);for(n=0;a>n;n+=1)l.appendChild(s.default.create("td","",e.ownerDocument));i&&t&&t.nextSibling?t.parentNode.insertBefore(l,t.nextSibling):!i&&t?t.parentNode.insertBefore(l,t):(r.$$(":scope>tbody",e)[0]||e).appendChild(l)},o.removeRow=function(e,t){var i,n=o.formalMatrix(e),a=e.rows[t];r.each(n[t],function(e,o){if(i=!1,0>t-1||n[t-1][e]!==o)if(n[t+1]&&n[t+1][e]===o){if(o.parentNode===a&&o.parentNode.nextSibling){i=!0;for(var r=e+1;n[t+1][r]===o;)r+=1;n[t+1][r]?o.parentNode.nextSibling.insertBefore(o,n[t+1][r]):o.parentNode.nextSibling.appendChild(o)}}else o.parentNode&&o.parentNode.removeChild(o);else i=!0;if(i&&(o.parentNode===a||o!==n[t][e-1])){var s=o.rowSpan;s-1>1?o.setAttribute("rowspan",""+(s-1)):o.removeAttribute("rowspan")}}),a&&a.parentNode.removeChild(a)},o.appendColumn=function(e,t,i){void 0===i&&(i=!0);var n,r=o.formalMatrix(e);for(void 0===t&&(t=o.getColumnsCount(e)-1),n=0;r.length>n;n+=1){var a=s.default.create("td","",e.ownerDocument),l=!1;i?r[n].length>t+1&&r[n][t]===r[n][t+1]||(r[n][t].nextSibling?r[n][t].parentNode.insertBefore(a,r[n][t].nextSibling):r[n][t].parentNode.appendChild(a),l=!0):(0>t-1||r[n][t]!==r[n][t-1])&&(r[n][t].parentNode.insertBefore(a,r[n][t]),l=!0),l||r[n][t].setAttribute("colspan",""+(parseInt(r[n][t].getAttribute("colspan"),10)+1))}},o.removeColumn=function(e,t){var i,n=o.formalMatrix(e);r.each(n,function(e,o){if(i=!1,0>t-1||n[e][t-1]!==o[t]?o.length>t+1&&n[e][t+1]===o[t]?i=!0:o[t].parentNode&&o[t].parentNode.removeChild(o[t]):i=!0,i&&(0>e-1||o[t]!==n[e-1][t])){var r=o[t].colSpan;r-1>1?o[t].setAttribute("colspan",""+(r-1)):o[t].removeAttribute("colspan")}})},o.getSelectedBound=function(e,t){var i,n,r,a=[[1/0,1/0],[0,0]],s=o.formalMatrix(e);for(i=0;s.length>i;i+=1)for(n=0;s[i].length>n;n+=1)-1!==t.indexOf(s[i][n])&&(a[0][0]=Math.min(i,a[0][0]),a[0][1]=Math.min(n,a[0][1]),a[1][0]=Math.max(i,a[1][0]),a[1][1]=Math.max(n,a[1][1]));for(i=a[0][0];a[1][0]>=i;i+=1)for(r=1,n=a[0][1];a[1][1]>=n;n+=1){for(;s[i][n-r]&&s[i][n]===s[i][n-r];)a[0][1]=Math.min(n-r,a[0][1]),a[1][1]=Math.max(n-r,a[1][1]),r+=1;for(r=1;s[i][n+r]&&s[i][n]===s[i][n+r];)a[0][1]=Math.min(n+r,a[0][1]),a[1][1]=Math.max(n+r,a[1][1]),r+=1;for(r=1;s[i-r]&&s[i][n]===s[i-r][n];)a[0][0]=Math.min(i-r,a[0][0]),a[1][0]=Math.max(i-r,a[1][0]),r+=1;for(r=1;s[i+r]&&s[i][n]===s[i+r][n];)a[0][0]=Math.min(i+r,a[0][0]),a[1][0]=Math.max(i+r,a[1][0]),r+=1}return a},o.normalizeTable=function(e){var t,i,n,r,a=[],s=o.formalMatrix(e);for(i=0;s[0].length>i;i+=1){for(n=1e6,r=!1,t=0;s.length>t;t+=1)if(void 0!==s[t][i]){if(2>s[t][i].colSpan){r=!0;break}n=Math.min(n,s[t][i].colSpan)}if(!r)for(t=0;s.length>t;t+=1)void 0!==s[t][i]&&o.__mark(s[t][i],"colspan",s[t][i].colSpan-n+1,a)}for(t=0;s.length>t;t+=1){for(n=1e6,r=!1,i=0;s[t].length>i;i+=1)if(void 0!==s[t][i]){if(2>s[t][i].rowSpan){r=!0;break}n=Math.min(n,s[t][i].rowSpan)}if(!r)for(i=0;s[t].length>i;i+=1)void 0!==s[t][i]&&o.__mark(s[t][i],"rowspan",s[t][i].rowSpan-n+1,a)}for(t=0;s.length>t;t+=1)for(i=0;s[t].length>i;i+=1)void 0!==s[t][i]&&(s[t][i].hasAttribute("rowspan")&&1===s[t][i].rowSpan&&s[t][i].removeAttribute("rowspan"),s[t][i].hasAttribute("colspan")&&1===s[t][i].colSpan&&s[t][i].removeAttribute("colspan"),s[t][i].hasAttribute("class")&&!s[t][i].getAttribute("class")&&s[t][i].removeAttribute("class"));o.__unmark(a)},o.mergeSelected=function(e){var t,i,n,s=o.getSelectedBound(e,o.getAllSelectedCells(e)),l=0,d=[],c=0,u=0,p=[];s&&(s[0][0]-s[1][0]||s[0][1]-s[1][1])&&(o.formalMatrix(e,function(e,a,f,h,g){if(!(s[0][0]>a||a>s[1][0]||s[0][1]>f||f>s[1][1])){if(n=e,n.__i_am_already_was)return;n.__i_am_already_was=!0,a===s[0][0]&&n.style.width&&(l+=parseInt(n.offsetWidth,10)),""!==r.trim(e.innerHTML.replace(//g,""))&&d.push(e.innerHTML),h>1&&(c+=h-1),g>1&&(u+=g-1),t?o.__mark(n,"remove",1,p):(t=e,i=f)}}),c=s[1][1]-s[0][1]+1,u=s[1][0]-s[0][0]+1,t&&(c>1&&o.__mark(t,"colspan",c,p),u>1&&o.__mark(t,"rowspan",u,p),l&&(o.__mark(t,"width",(l/e.offsetWidth*100).toFixed(a.ACCURACY)+"%",p),i&&o.setColumnWidthByDelta(e,i,0,!0,p)),delete t.__i_am_already_was,t.innerHTML=d.join("
    "),o.__unmark(p),o.normalizeTable(e),r.each([].slice.call(e.rows),function(e,t){t.cells.length||t.parentNode.removeChild(t)})))},o.splitHorizontal=function(e){var t,i,n,r,a,l=[];o.getAllSelectedCells(e).forEach(function(d){i=s.default.create("td","",e.ownerDocument),i.appendChild(s.default.create("br","",e.ownerDocument)),n=s.default.create("tr","",e.ownerDocument),t=o.formalCoordinate(e,d),2>d.rowSpan?(o.formalMatrix(e,function(e,i,n){t[0]===i&&t[1]!==n&&e!==d&&o.__mark(e,"rowspan",e.rowSpan+1,l)}),s.default.after(s.default.closest(d,"tr",e),n),n.appendChild(i)):(o.__mark(d,"rowspan",d.rowSpan-1,l),o.formalMatrix(e,function(o,i,n){i>t[0]&&t[0]+d.rowSpan>i&&t[1]>n&&o.parentNode.rowIndex===i&&(a=o),i>t[0]&&o===d&&(r=e.rows[i])}),a?s.default.after(a,i):r.insertBefore(i,r.firstChild)),d.colSpan>1&&o.__mark(i,"colspan",d.colSpan,l),o.__unmark(l),o.restoreSelection(d)}),this.normalizeTable(e)},o.splitVertical=function(e){var t,i,n,r=[];o.getAllSelectedCells(e).forEach(function(l){t=o.formalCoordinate(e,l),2>l.colSpan?o.formalMatrix(e,function(e,i,n){t[1]===n&&t[0]!==i&&e!==l&&o.__mark(e,"colspan",e.colSpan+1,r)}):o.__mark(l,"colspan",l.colSpan-1,r),i=s.default.create("td","",e.ownerDocument),i.appendChild(s.default.create("br","",e.ownerDocument)),l.rowSpan>1&&o.__mark(i,"rowspan",l.rowSpan,r);var d=l.offsetWidth;s.default.after(l,i),n=d/e.offsetWidth/2,o.__mark(l,"width",(100*n).toFixed(a.ACCURACY)+"%",r),o.__mark(i,"width",(100*n).toFixed(a.ACCURACY)+"%",r),o.__unmark(r),o.restoreSelection(l)}),o.normalizeTable(e)},o.__mark=function(e,t,o,i){i.push(e),e.__marked_value||(e.__marked_value={}),e.__marked_value[t]=void 0===o?1:o},o.__unmark=function(e){e.forEach(function(e){e.__marked_value&&(r.each(e.__marked_value,function(t,o){switch(t){case"remove":e.parentNode.removeChild(e);break;case"rowspan":o>1?e.setAttribute("rowspan",o):e.removeAttribute("rowspan");break;case"colspan":o>1?e.setAttribute("colspan",o):e.removeAttribute("colspan");break;case"width":e.style.width=o}delete e.__marked_value[t]}),delete e.__marked_value)})},o.setColumnWidthByDelta=function(e,t,i,n,r){var s,l,d,c=o.formalMatrix(e);for(s=0;c.length>s;s+=1)l=c[s][t].offsetWidth,d=(l+i)/e.offsetWidth*100,o.__mark(c[s][t],"width",d.toFixed(a.ACCURACY)+"%",r);n||o.__unmark(r)},o}(n.default);t.default=l},function(e,t,o){"use strict";t.__esModule=!0;var i=o(1),n=o(0),r=o(2);!function(e){e.ColorPickerWidget=function(e,t,o){var a=n.normalizeColor(o),s=n.dom('
    '),l=function(e){var t=[];return n.isPlainObject(e)?Object.keys(e).forEach(function(o){t.push('
    '),t.push(l(e[o])),t.push("
    ")}):Array.isArray(e)&&e.forEach(function(e){t.push("'+(a===e?i.default.modules.Toolbar.getIcon("eye"):"")+"")}),t.join("")};return s.appendChild(n.dom("
    "+l(e.options.colors)+"
    ")),s.appendChild(n.dom(''+i.default.modules.Toolbar.getIcon("eraser")+"")),s.addEventListener("mousedown",function(e){e.stopPropagation()}),s.addEventListener("mousedown",function(o){var a=o.target;if("SVG"!==a.tagName.toUpperCase()&&"PATH"!==a.tagName.toUpperCase()||(a=r.default.closest(a.parentNode,"A",e.editor)),"A"===a.tagName.toUpperCase()){var l=s.querySelector("a.active");l&&(l.classList.remove("active"),l.innerHTML="");var d=a.getAttribute("data-color")||"";if(d){a.innerHTML=i.default.modules.Toolbar.getIcon("eye"),a.classList.add("active");var c=n.hexToRgb(d);a.firstChild.style.fill="rgb("+(255-c.r)+","+(255-c.g)+","+(255-c.b)+")"}return t&&"function"==typeof t&&t(d),!1}}),s},e.TabsWidget=function(e,t){var o=n.dom('
    '),i=n.dom('
    '),r=n.dom('
    '),a=0;if(o.appendChild(r),o.appendChild(i),n.each(t,function(t,o){var s=n.dom('
    '),l=n.dom('');l.innerHTML=e.i18n(t),r.appendChild(l),s.appendChild(n.dom("function"!=typeof o?o:'
    ')),i.appendChild(s),l.addEventListener("mousedown",function(t){return n.$$("a",r).forEach(function(e){e.classList.remove("active")}),n.$$(".jodit_tab",i).forEach(function(e){e.classList.remove("active")}),l.classList.add("active"),s.classList.add("active"),"function"==typeof o&&o.call(e),t.stopPropagation(),!1}),a+=1}),a)return n.$$("a",r).forEach(function(e){e.style.width=(100/a).toFixed(10)+"%"}),r.querySelector("a:first-child").classList.add("active"),i.querySelector(".jodit_tab:first-child").classList.add("active"),o},e.ImageSelectorWidget=function(t,o,r){var a,s={};if(o.upload&&t.options.uploader&&t.options.uploader.url){var l=n.dom('
    '+t.i18n("Drop image")+"
    "+t.i18n("or click")+'
    ');t.getInstance("Uploader").bind(l,function(e){"function"==typeof o.upload&&o.upload.call(t,{baseurl:e.baseurl,files:e.files})},function(e){t.events.fire("errorMessage",[e.message])}),s[i.default.modules.Toolbar.getIcon("upload")+t.i18n("Upload")]=l}if(o.filebrowser&&(t.options.filebrowser.ajax.url||t.options.filebrowser.items.url)&&(s[i.default.modules.Toolbar.getIcon("folder")+t.i18n("Browse")]=function(){t.getInstance("FileBrowser").open(o.filebrowser)}),o.url){var d=n.dom('
    ");a=null,r&&r.nodeType!==Node.TEXT_NODE&&("IMG"===r.tagName||n.$$("img",r).length)&&(a="IMG"===r.tagName?r:n.$$("img",r)[0],n.val(d,"input[name=url]",a.getAttribute("src")),n.val(d,"input[name=text]",a.getAttribute("alt")),d.querySelector("button").innerText=t.i18n("Update")),d.addEventListener("submit",function(e){return e.preventDefault(),e.stopPropagation(),n.val(d,"input[name=url]")?("function"==typeof o.url&&o.url.call(t,n.val(d,"input[name=url]"),n.val(d,"input[name=text]")),!1):(d.querySelector("input[name=url]").focus(),d.querySelector("input[name=url]").classList.add("jodit_error"),!1)},!1),s[i.default.modules.Toolbar.getIcon("link")+" URL"]=d}return e.TabsWidget(t,s)}}(t.Widget||(t.Widget={}))},function(e,t,o){"use strict";var i=this&&this.__extends||function(){var e=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])};return function(t,o){function i(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(i.prototype=o.prototype,new i)}}();t.__esModule=!0;var n=o(4),r=o(0),a=o(15),s=o(5);n.Config.prototype.defaultAjaxOptions={dataType:"json",method:"GET",url:"",async:!0,data:null,contentType:"application/x-www-form-urlencoded; charset=UTF-8",headers:{"X-REQUESTED-WITH":"XMLHttpRequest"},withCredentials:!0,xhr:function(){return new("undefined"==typeof XDomainRequest?XMLHttpRequest:XDomainRequest)}},t.default=function(e){function t(t,o){var i=e.call(this,t)||this;return i.options=r.extend(!0,{},n.Config.prototype.defaultAjaxOptions,o),i.xhr=i.options.xhr(),i}return i(t,e),t.prototype.__buildParams=function(e,t){if("string"==typeof e||window.FormData&&e instanceof window.FormData)return e;var o,i,n,r=[];for(o in e)e.hasOwnProperty(o)&&(i=t?t+"["+o+"]":o,n=e[o],r.push("object"==typeof n?this.__buildParams(n,i):encodeURIComponent(i)+"="+encodeURIComponent(n)));return r.join("&")},t.prototype.abort=function(){return this.xhr.abort(),this},t.prototype.send=function(){var e=this;return new a.default(function(t,o){var i=function(t){switch(e.options.dataType){case"json":try{t=JSON.parse(t)}catch(t){return void o.call(e.xhr,t)}}return t};e.xhr.onabort=function(){o(Error(e.xhr.statusText))},e.xhr.onerror=function(){o(Error(e.xhr.statusText))},e.xhr.ontimeout=function(){o(Error(e.xhr.statusText))},e.xhr.onload=function(){e.response=e.xhr.responseText,e.status=e.xhr.status,t.call(e.xhr,i(e.response))},e.xhr.onreadystatechange=function(){if(e.xhr.readyState===XMLHttpRequest.DONE){var n=e.xhr.responseText;e.response=n,e.status=e.xhr.status,200===e.xhr.status?t.call(e.xhr,i(n)):o.call(e.xhr,Error(e.xhr.statusText||e.parent.i18n("Connection error!")))}},e.xhr.withCredentials=e.options.withCredentials,e.xhr.open(e.options.method,e.options.url,e.options.async),e.options.contentType&&e.xhr.setRequestHeader&&e.xhr.setRequestHeader("Content-type",e.options.contentType),e.options.headers&&e.xhr.setRequestHeader&&r.each(e.options.headers,function(t,o){e.xhr.setRequestHeader(t,o)}),setTimeout(function(){e.xhr.send(e.options.data?e.__buildParams(e.options.data):void 0)},0)})},t}(s.default)},function(e,t,o){"use strict";var i=this&&this.__extends||function(){var e=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])};return function(t,o){function i(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(i.prototype=o.prototype,new i)}}();t.__esModule=!0;var n=o(5);t.default=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.set=function(e,t,o){var i,n;o?(n=new Date,n.setTime(n.getTime()+24*o*60*60*1e3),i="; expires="+n.toGMTString()):i="",document.cookie=e+"="+t+i+"; path=/"},t.get=function(e){var t,o,i=e+"=",n=document.cookie.split(";");for(t=0;n.length>t;t+=1){for(o=n[t];" "===o.charAt(0);)o=o.substring(1,o.length);if(0===o.indexOf(i))return o.substring(i.length,o.length)}return null},t.remove=function(e){t.set(e,"",-1)},t}(n.default)},function(e,t,o){"use strict";t.__esModule=!0;var i=o(1),n=o(3),r=o(2);t.wrapAndSelect=function(e,t,o,i){void 0===i&&(i=!0),e.selection.focus();var a,s=e.win.getSelection(),l=s.getRangeAt(0),d=e.selection.current();if(i&&!1!==d&&r.default.closest(d,o,e.editor))return r.default.closest(d,o,e.editor);var c=e.selection.isCollapsed();c?(a=r.default.create("text",n.INVISIBLE_SPACE,e.doc),t.appendChild(a)):t.appendChild(l.extractContents()),l.collapse(!0),l.insertNode(t);var u=e.doc.createRange();return c?(u.setStartAfter(a),u.collapse(!0)):u.selectNodeContents(t),s.removeAllRanges(),s.addRange(u),t},i.default.plugins.bold=function(e){e.events.on("beforeCommand",function(o){if(-1!==["bold","italic","underline","strikethrough"].indexOf(o))return r.default.apply(i.default.defaultOptions.controls[o],function(o){return t.wrapAndSelect(e,r.default.create(o.tags[0],"",e.doc),o.tagRegExp)},e),e.setEditorValue(),!1})}},function(e,t,o){"use strict";var i=this&&this.__extends||function(){var e=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])};return function(t,o){function i(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(i.prototype=o.prototype,new i)}}();t.__esModule=!0;var n=o(5),r=o(0),a=o(6);t.default=function(e){function t(t){var o=e.call(this,t)||this;return o.hide=function(){o.context.classList.remove("jodit_context_menu-show"),window.removeEventListener("mouseup",o.hide)},o.context=r.dom('
    '),document.body.appendChild(o.context),o}return i(t,e),t.prototype.show=function(e,t,o){var i=this;Array.isArray(o)&&(this.context.innerHTML="",o.forEach(function(e){if(e){var t=r.dom(''+(e.icon?a.default.getIcon(e.icon):"")+"");t.addEventListener("click",function(t){return e.exec.call(i,t),i.hide(),!1}),t.querySelector("span").innerText=i.parent.i18n(e.title),i.context.appendChild(t)}}),r.css(i.context,{left:e,top:t}),window.addEventListener("mouseup",i.hide),this.context.classList.add("jodit_context_menu-show"))},t}(n.default)},function(e,t,o){"use strict";var i=this&&this.__extends||function(){var e=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])};return function(t,o){function i(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(i.prototype=o.prototype,new i)}}();t.__esModule=!0;var n=o(4),r=o(5),a=o(16),s=o(3),l=o(17);n.Config.prototype.observer={timeout:100};var d=function(){function e(e,t,o){this.parent=o,this.oldValue=e,this.newValue=t}return e.prototype.execute=function(){},e.prototype.undo=function(){this.parent.block(!0),this.parent.snapshot.restore(this.oldValue)},e.prototype.redo=function(){this.parent.block(!0),this.parent.snapshot.restore(this.newValue)},e}();t.default=function(e){function t(t){var o=e.call(this,t)||this;return o.__blocked=!1,o.__timeouts=[],o.block=function(e){void 0===e&&(e=1),!0===e||!1===e?this.__blocked=e:1===e?(this.oldblock=this.__blocked,this.__blocked=!0):0===e&&(this.__blocked=void 0!==this.oldblock&&this.oldblock)},o.changed=function(){this.parent.getMode()===s.MODE_WYSIWYG&&(this.parent.events.fire("canRedo",[this.stack.canRedo()]),this.parent.events.fire("canUndo",[this.stack.canUndo()]))},o.stack=new l.Stack,o.stack.changed=function(){o.changed()},o.snapshot=new a.default(t),o.__startValue=o.snapshot.make(),o.stack.changed(),t.events.on("change afterCommand",function(e){"undo"!==e&&"redo"!==e&&o.__changeHandler()}),o}return i(t,e),t.prototype.__onChange=function(){this.__newValue=this.snapshot.make(),a.default.equal(this.__newValue,this.__startValue)||(this.stack.execute(new d(this.__startValue,this.__newValue,this)),this.__startValue=this.__newValue)},t.prototype.__changeHandler=function(){if(this.__blocked)return void this.block(!1);this.parent.options.observer.timeout?(clearTimeout(this.__timer),this.__timer=setTimeout(this.__onChange.bind(this),this.parent.options.observer.timeout),this.__timeouts[this.__timeouts.length]=this.__timer):this.__onChange()},t.prototype.destruct=function(){this.__timeouts.forEach(function(e){clearTimeout(e)})},t.prototype.redo=function(){this.stack.redo()},t.prototype.undo=function(){this.stack.undo()},t}(r.default)},function(e,t,o){"use strict";t.__esModule=!0;var i=0,n=1;t.default=function(){function e(e){this.handlers={0:[],1:[]},this.isFulfilled=null,this.currentParameter=null,this.currentContext=null;var t=this,o=function(e,o){null===t.isFulfilled&&(t.isFulfilled=e,t.currentParameter=o,t.currentContext=this,t.__fire_handlers(e))};try{e(function(e){o.call(this,n,e)},function(e){o.call(this,i,e)})}catch(e){o.call(this,i,e)}}return e.prototype.__fire_handlers=function(e){if(e===this.isFulfilled&&this.handlers[e].length)do{var t=this.handlers[e].shift(),o=void 0;try{o=t.call(this.currentContext,this.currentParameter)}catch(e){return o=e,this.__fire_handlers(i)}void 0!==o&&(this.currentParameter=o)}while(this.handlers[e].length)},e.prototype.then=function(e,t){return e&&this.handlers[n].push(e),t&&this.catch(t),this.__fire_handlers(n),this},e.prototype.catch=function(e){return this.handlers[i].push(e),this.__fire_handlers(i),this},e}()},function(e,t,o){"use strict";var i=this&&this.__extends||function(){var e=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])};return function(t,o){function i(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(i.prototype=o.prototype,new i)}}();t.__esModule=!0;var n=o(5);t.default=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.__countElementsBefore=function(e){if(!e.parentNode)return 0;var t,o,i=e.parentNode.childNodes,n=0;for(o=0;i.length>o;o+=1){if(!t||i[o].nodeType===Node.TEXT_NODE&&""===i[o].textContent||t.nodeType===Node.TEXT_NODE&&i[o].nodeType===Node.TEXT_NODE||(n+=1),i[o]===e)return n;t=i[o]}},t.prototype.__decomposeHierarchyNodes=function(e){var o=[];if(!e.parentNode)return[];for(;e&&e!==this.parent.editor;)o.push(t.__countElementsBefore(e)),e=e.parentNode;return o.reverse()},t.__strokeOffset=function(e,t){for(;e&&e.nodeType===Node.TEXT_NODE;)(e=e.previousSibling)&&e.nodeType===Node.TEXT_NODE&&(t+=e.textContent.length);return t},t.prototype.make=function(){var e={html:"",range:{startContainer:[],startOffset:0,endContainer:[],endOffset:0}};e.html=this.parent.getEditorValue();var o=this.parent.win.getSelection();if(o.rangeCount){var i=o.getRangeAt(0);e.range={startContainer:this.__decomposeHierarchyNodes(i.startContainer),startOffset:t.__strokeOffset(i.startContainer,i.startOffset),endContainer:this.__decomposeHierarchyNodes(i.endContainer),endOffset:t.__strokeOffset(i.endContainer,i.endOffset)}}return e},t.prototype.__restoreElementByLadder=function(e){var t,o=this.parent.editor;for(t=0;o&&e.length>t;t+=1)o=o.childNodes[e[t]];return o},t.equal=function(e,t){return e.html===t.html&&JSON.stringify(e.range)===JSON.stringify(t.range)},t.prototype.restore=function(e){this.parent.setEditorValue(e.html);try{if(e.range){var t=this.win.getSelection(),o=this.doc.createRange();o.setStart(this.__restoreElementByLadder(e.range.startContainer),e.range.startOffset),o.setEnd(this.__restoreElementByLadder(e.range.endContainer),e.range.endOffset),t.removeAllRanges(),t.addRange(o)}}catch(e){}},t}(n.default)},function(e,t,o){"use strict";t.__esModule=!0,t.Stack=function(){function e(){this.commands=[],this.stackPosition=-1,this.savePosition=-1}return e.prototype.execute=function(e){this.__clearRedo(),e.execute(),this.commands.push(e),this.stackPosition+=1,this.changed()},e.prototype.undo=function(){this.commands[this.stackPosition]&&this.commands[this.stackPosition].undo(),this.stackPosition-=1,this.changed()},e.prototype.canUndo=function(){return this.stackPosition>=0},e.prototype.redo=function(){this.stackPosition+=1,this.commands[this.stackPosition]&&this.commands[this.stackPosition].redo(),this.changed()},e.prototype.canRedo=function(){return this.commands.length-1>this.stackPosition},e.prototype.save=function(){this.savePosition=this.stackPosition,this.changed()},e.prototype.__clearRedo=function(){this.commands.length=this.stackPosition+1},e.prototype.changed=function(){},e}()},function(e,t,o){"use strict";var i=this&&this.__extends||function(){var e=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])};return function(t,o){function i(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(i.prototype=o.prototype,new i)}}();t.__esModule=!0;var n=o(5),r=o(10),a=o(4),s=o(0),l=o(3),d=o(2);a.Config.prototype.enableDragAndDropFileToEditor=!0,a.Config.prototype.uploader={url:"",headers:null,data:null,format:"json",prepareData:function(e){return e},isSuccess:function(e){return e.success},getMessage:function(e){return void 0!==e.data.messages&&Array.isArray(e.data.messages)?e.data.messages.join(" "):""},process:function(e){return{files:e.data.files||[],path:e.data.path||"",baseurl:e.data.baseurl||""}},error:function(e){this.parent.events.fire("errorMessage",[e.message,"error",4e3])},defaultHandlerSuccess:function(e){var t=this;e.files&&e.files.length&&e.files.forEach(function(o){t.parent.selection.insertImage(e.baseurl+o)})},defaultHandlerError:function(e){this.parent.events.fire("errorMessage",[e.message])}},t.default=function(e){function t(t,o){var i=e.call(this,t)||this;return i.path="",i.source="default",i.options=s.extend(!0,{},a.Config.prototype.uploader,i.parent.options.uploader,o),i.parent.editor&&i.parent.options.enableDragAndDropFileToEditor&&i.parent.options.uploader&&i.parent.options.uploader.url&&i.bind(i.parent.editor),i}return i(t,e),t.prototype.buildData=function(e){if(void 0!==window.FormData){if(e instanceof FormData)return e;if("string"==typeof e)return e;var t=new FormData;return Object.keys(e).forEach(function(o){t.append(o,e[o])}),t}return e},t.prototype.send=function(e,t){var o=this;this.__ajax=new r.default(this.parent,{xhr:function(){var e=new XMLHttpRequest;return void 0!==window.FormData?e.upload.addEventListener("progress",function(e){if(e.lengthComputable){var t=e.loaded/e.total;t*=100,o.parent.progress_bar.style.display="block",o.parent.progress_bar.style.width=t+"%",100===t&&(o.parent.progress_bar.style.display="none")}},!1):o.parent.progress_bar.style.display="none",e},type:"POST",data:this.buildData(e),url:this.options.url,headers:this.options.headers,contentType:(void 0===window.FormData||"string"==typeof e)&&"application/x-www-form-urlencoded; charset=UTF-8",dataType:this.options.format||"json"}),this.__ajax.send().then(t).catch(function(e){o.options.error.call(o,e)})},t.prototype.sendFiles=function(e,t,o,i){var n,r,a,l,d=this,c=e.length,u=this;if(!c)return!1;for(r=new FormData,r.append("path",u.path),r.append("source",u.source),n=0;c>n;n+=1)a=e[n].type.match(/\/([a-z0-9]+)/i)[1].toLowerCase(),r.append("files["+n+"]",e[n],e[n].name||(""+Math.random()).replace(".","")+"."+a);if(u.options.prepareData(r),i&&i(r),u.options.data&&s.isPlainObject(u.options.data))for(l=Object.keys(u.options.data),n=0;l.length>n;n+=1)r.append(l[n],u.options.data[l[n]]);u.send(r,function(e){if(!d.options.isSuccess.call(u,e))return void(o||u.options.defaultHandlerError).call(u,Error(u.options.getMessage(e)));"function"==typeof(t||u.options.defaultHandlerSuccess)&&(t||u.options.defaultHandlerSuccess).call(u,u.options.process.call(u,e))})},t.prototype.setPath=function(e){this.path=e},t.prototype.setSource=function(e){this.source=e},t.dataURItoBlob=function(e){var t,o=atob(e.split(",")[1]),i=e.split(",")[0].split(":")[1].split(";")[0],n=new ArrayBuffer(o.length),r=new Uint8Array(n);for(t=0;o.length>t;t+=1)r[t]=o.charCodeAt(t);return new Blob([r],{type:i})},t.prototype.bind=function(e,o,i){var n=this,r=this;r.__on(e,"paste",function(e){var n,a,c,u,p=this,f=function(e){e.append("extension",c),e.append("mimetype",a.type)};if(e.clipboardData&&e.clipboardData.files&&e.clipboardData.files.length)return r.sendFiles(e.clipboardData.files,o,i),!1;if(s.browser("ff"))return void(e.clipboardData.types.length||e.clipboardData.types[0]===l.TEXT_PLAIN||(u=d.default.create("div","",this.parent.doc),r.parent.selection.insertNode(u),u.focus(),setTimeout(function(){if(u.firstChild&&u.firstChild.hasAttribute("src")){var e=u.firstChild.getAttribute("src");u.parentNode.removeChild(u),p.sendFiles([t.dataURItoBlob(e)],o,i)}},200)));if(e.clipboardData&&e.clipboardData.items&&e.clipboardData.items.length)for(n=0;e.clipboardData.items.length>n;n+=1)if("file"===e.clipboardData.items[n].kind&&"image/png"===e.clipboardData.items[n].type){a=e.clipboardData.items[n].getAsFile(),c=a.type.match(/\/([a-z0-9]+)/i)[1].toLowerCase(),r.sendFiles([a],o,i,f),e.preventDefault();break}}).__on(e,"dragover",function(t){e.classList.add("draghover"),t.preventDefault()}).__on(e,"dragleave dragend",function(t){e.classList.remove("draghover"),t.preventDefault()}).__on(e,"drop",function(t){if(e.classList.remove("draghover"),t.dataTransfer&&t.dataTransfer.files&&t.dataTransfer.files.length)t.preventDefault(),n.sendFiles(t.dataTransfer.files,o,i);else if(t.dataTransfer&&t.dataTransfer.getData(l.TEXT_PLAIN)&&"-"!==t.dataTransfer.getData(l.TEXT_PLAIN)&&e===r.parent.editor){if(t.preventDefault(),t.stopPropagation(),!n.parent.selection.insertCursorAtPoint(t.clientX,t.clientY))return!1;if(o||n.options.defaultHandlerSuccess){var a={baseurl:"",files:[]};a.files=[t.dataTransfer.getData(l.TEXT_PLAIN)],(o||n.options.defaultHandlerSuccess).call(n,a)}t.preventDefault()}}),e.querySelector("input[type=file]")&&r.__on(e.querySelector("input[type=file]"),"change",function(){r.sendFiles(this.files,o,i)})},t.prototype.uploadRemoteImage=function(e,t,o){var i=this,n=this;n.send({action:"uploadremote",url:e},function(e){if(n.options.isSuccess.call(n,e))"function"==typeof t?t.call(n,i.options.process(e)):i.options.defaultHandlerSuccess.call(n,i.options.process(e));else if("function"==typeof(o||n.options.defaultHandlerError))return void(o||i.options.defaultHandlerError).call(n,Error(n.options.getMessage(e)))})},t}(n.default)},function(e,t,o){"use strict";t.__esModule=!0,o(60),function(e){e.matches||(e.matches=void 0!==e.matchesSelector?e.matchesSelector:function(e){var t=document.querySelectorAll(e),o=this;return Array.prototype.some.call(t,function(e){return e===o})})}(Element.prototype)},function(e,t){},function(e,t,o){function i(e){return o(n(e))}function n(e){var t=r[e];if(!(t+1))throw Error("Cannot find module '"+e+"'.");return t}var r={"./de.ts":29,"./en.ts":30,"./ru.ts":31};i.keys=function(){return Object.keys(r)},i.resolve=n,e.exports=i,i.id=21},function(e,t,o){function i(e){return o(n(e))}function n(e){var t=r[e];if(!(t+1))throw Error("Cannot find module '"+e+"'.");return t}var r={"./Ajax.ts":10,"./Component.ts":5,"./ContextMenu.ts":13,"./Cookie.ts":11,"./Dialog.ts":7,"./Dom.ts":2,"./Events.ts":32,"./FileBrowser.ts":33,"./Helpers.ts":0,"./ImageEditor.ts":34,"./Observer.ts":14,"./PseudoPromise.ts":15,"./Selection.ts":35,"./Snapshot.ts":16,"./Table.ts":8,"./Toolbar.ts":6,"./Undo.ts":17,"./Uploader.ts":18,"./Widget.ts":9};i.keys=function(){return Object.keys(r)},i.resolve=n,e.exports=i,i.id=22},function(e,t,o){function i(e){return o(n(e))}function n(e){var t=r[e];if(!(t+1))throw Error("Cannot find module '"+e+"'.");return t}var r={"./Fullsize.ts":36,"./autofocus.ts":37,"./backspace.ts":38,"./bold.ts":12,"./cleanHTML.ts":39,"./color.ts":40,"./enter.ts":41,"./errorMessages.ts":42,"./font.ts":43,"./formatblock.ts":44,"./imageInlineToolbar.ts":45,"./imageProcessor.ts":46,"./imageProperties.ts":47,"./inlinePopup.ts":48,"./justify.ts":49,"./link.ts":50,"./orderedlist.ts":51,"./paste.ts":52,"./placeholder.ts":53,"./redoundo.ts":54,"./removeoldtags.ts":55,"./resizer.ts":56,"./source.ts":57,"./table.ts":58,"./tableKeyboardNavigation.ts":59};i.keys=function(){return Object.keys(r)},i.resolve=n,e.exports=i,i.id=23},function(e,t,o){function i(e){return o(n(e))}function n(e){var t=r[e];if(!(t+1))throw Error("Cannot find module '"+e+"'.");return t}var r={"./about.svg":86,"./addcolumn.svg":87,"./addrow.svg":88,"./angle-left.svg":89,"./angle-right.svg":90,"./arrows-alt.svg":91,"./arrows-h.svg":92,"./attachment.svg":93,"./bin.svg":94,"./bold.svg":95,"./brush.svg":96,"./cancel.svg":97,"./center.svg":98,"./chain-broken.svg":99,"./check-square.svg":100,"./check.svg":101,"./crop.svg":102,"./dedent.svg":103,"./eraser.svg":104,"./eye.svg":105,"./folder.svg":106,"./font.svg":107,"./fontsize.svg":108,"./fullsize.svg":109,"./hr.svg":110,"./image.svg":111,"./info-circle.svg":112,"./italic.svg":113,"./justify.svg":114,"./left.svg":115,"./link.svg":116,"./lock.svg":117,"./menu.svg":118,"./merge.svg":119,"./ol.svg":120,"./paragraph.svg":121,"./pencil.svg":122,"./plus.svg":123,"./redo.svg":124,"./resize.svg":125,"./resizer.svg":126,"./right.svg":127,"./save.svg":128,"./shrink.svg":129,"./source.svg":130,"./splitg.svg":131,"./splitv.svg":132,"./strikethrough.svg":133,"./table.svg":134,"./th-list.svg":135,"./th.svg":136,"./ul.svg":137,"./underline.svg":138,"./undo.svg":139,"./unlink.svg":140,"./unlock.svg":141,"./update.svg":142,"./upload.svg":143,"./valign.svg":144,"./video.svg":145};i.keys=function(){return Object.keys(r)},i.resolve=n,e.exports=i,i.id=24},function(e,t,o){function i(e){return o(n(e))}function n(e){var t=r[e];if(!(t+1))throw Error("Cannot find module '"+e+"'.");return t}var r={"./btn.less":61,"./btn_group.less":62,"./context_menu.less":63,"./dialog.less":64,"./dropdownlist.less":65,"./filebrowser.less":66,"./grid.less":67,"./icon.less":68,"./image_editor.less":69,"./properties.less":70,"./toolbar.less":71,"./uploader.less":72};i.keys=function(){return Object.keys(r)},i.resolve=n,e.exports=i,i.id=25},function(e,t,o){function i(e){return o(n(e))}function n(e){var t=r[e];if(!(t+1))throw Error("Cannot find module '"+e+"'.");return t}var r={"./errorsMessages.less":73,"./fullsize.less":74,"./placeholder.less":75,"./popupInline.less":76,"./resizer.less":77,"./source.less":78,"./table.less":79,"./widget.less":80};i.keys=function(){return Object.keys(r)},i.resolve=n,e.exports=i,i.id=26},function(e,t,o){function i(e){return o(n(e))}function n(e){var t=r[e];if(!(t+1))throw Error("Cannot find module '"+e+"'.");return t}var r={"./about.less":81,"./colorpicker.less":82,"./form.less":83,"./progressbar.less":84,"./tabs.less":85};i.keys=function(){return Object.keys(r)},i.resolve=n,e.exports=i,i.id=27},function(e,t,o){"use strict";t.__esModule=!0,o(20);var i=o(3);o(19);var n=o(6);e.exports=o(1).default,window.Jodit=e.exports,o(4),Object.keys(i).forEach(function(t){e.exports[t]=i[t]});var r=function(e){e.keys().forEach(e)};r(o(23)),r(o(25)),r(o(27)),r(o(26));var a=o(24);a.keys().forEach(function(e){n.default.icons[e.replace(".svg","").replace("./","")]=a.apply(this,arguments)});var s=o(22);s.keys().forEach(function(t){e.exports.modules[t.replace(".ts","").replace("./","")]=s.apply(this,arguments).default});var l=o(21);l.keys().forEach(function(t){e.exports.lang[t.replace(".ts","").replace("./","")]=l.apply(this,arguments).default})},function(e,t,o){"use strict";t.__esModule=!0,t.default={"Type something":"Schreibe etwas","About Jodit":"Über Jodi","Jodit Editor":"Jodit Editor","Free Non-commercial Version":"Freie Nicht-kommerzielle Version","Jodit User's Guide":"Jodit Benutzerhandbuch","contains detailed help for using":"ausführliche Hilfe enthält für die Verwendung von","For information about the license, please go to our website:":"Für Informationen über die Lizenz, gehen Sie bitte auf unsere Webseite:","Buy full version":"Vollversion kaufen","Copyright © XDSoft.net - Chupurnov Valeriy. All rights reserved.":"Copyright © XDSoft.net - Chupurnov Valeriy. Alle Rechte vorbehalten.",Anchor:"Anker","Open in new tab":"In neuer Registerkarte öffnen","Open editor in fullsize":"Editor öffnen in voller Größe","Clear Formatting":"Formatierung löschen","Fill color or set the text color":"Füllen Sie Farbe oder stellen Sie die Textfarbe",Redo:"Redo",Undo:"Rückgängig machen",Bold:"Fett gedruckt",Italic:"Kursiv","Insert Unordered List":"Ungeordnete Liste einfügen","Insert Ordered List":"Legen Sie Sortierte Liste","Justify Center":"einmitten","Justify Full":"Begründen Voll","Justify Left":"Begründen links","Justify Right":"Begründen Rechts","Insert Horizontal Line":"Legen Horizontale Linie","Insert Image":"Bild einfügen","Insert link":"Link einfügen","Font size":"Schriftgröße","Font family":"Schriftfamilie","Insert format block":"Insert Format Block",Normal:"Normal","Heading 1":"Überschrift 1","Heading 2":"Überschrift 2","Heading 3":"Überschrift 3","Heading 4":"Überschrift 4",Quote:"Zitat",Code:"Code",Insert:"Einfügen","Insert table":"Tabelle einfügen","Change mode":"Änderungsmodus",Margins:"Die Margen",top:"oben",right:"Recht",bottom:"Boden",left:"links",Styles:"Styles",Classes:"Klassen",Align:"Ausrichten",Right:"Recht",Center:"Center",Left:"Links","--Not Set--":"--Nicht eingestellt--",Src:"src",Title:"Titel",Alternative:"Alternative (alt)",Link:"Link","Open link in new tab":"Link in neuem Tab öffnen",Image:"Image",Advansed:"Erweiterte","Image properties":"Bildeigenschaften",Cancel:"Stornieren",Ok:"OK","File Browser":"Dateibrowser","Error on load list":"Fehler beim Ladeliste","Error on load folders":"Fehler beim Laden Ordner","Are you shure?":"Bist du sicher?","Enter Directory name":"Geben Sie Verzeichnisname","Create directory":"Verzeichnis erstellen","type name":"Modellname","Drop image":"Bild Tropfen","or click":"oder klicken Sie auf","Alternative text":"Alternativer Text",Browse:"Blättern",Upload:"Hochladen",Background:"Hintergrund",Text:"Text",Top:"Oben",Middle:"Mitte",Bottom:"Boden","Insert column before":"Spalte einfügen vor","Insert column after":"Spalte einfügen nach","Insert row above":"Zeile einfügen oben","Insert row below":"Zeile unterhalb einfügen","Delete table":"Tabelle löschen","Delete row":"Zeile löschen","Delete column":"Spalte löschen","Empty cell":"Leere Zelle"}},function(e,t,o){"use strict";t.__esModule=!0,t.default={"Type something":"Start writing...","About Jodit":"","Jodit Editor":"","Free Non-commercial Version":"","Jodit User's Guide":"","contains detailed help for using":"","For information about the license, please go to our website:":"","Buy full version":"","Copyright � XDSoft.net - Chupurnov Valeriy. All rights reserved.":"",Anchor:"","Open editor in fullsize":"","Clear Formatting":"","Fill color or set the text color":"",Redo:"",Undo:"",Bold:"",Italic:"","Insert Unordered List":"","Insert Ordered List":"","Justify Center":"","Justify Full":"","Justify Left":"","Justify Right":"","Insert Horizontal Line":"","Insert Image":"","Insert link":"","Font size":"","Font family":"","Insert format block":"",Normal:"","Heading 1":"","Heading 2":"","Heading 3":"","Heading 4":"",Quote:"",Code:"","Insert table":"","Change mode":"",Margins:"",top:"",right:"",bottom:"",left:"",Styles:"",Classes:"",Align:"",Right:"",Center:"",Left:"","--Not Set--":"",Src:"",Title:"",Alternative:"",Link:"","Open link in new tab":"",Image:"",Advansed:"","Image properties":"",Cancel:"",Ok:"","File Browser":"","Error on load list":"","Error on load folders":"","Are you shure?":"","Enter Directory name":"","Create directory":"","type name":"","Drop image":"","or click":"","Alternative text":"",Browse:"",Background:"",Text:"",Top:"",Middle:"",Bottom:"","Insert column before":"","Insert column after":"","Insert row above":"","Insert row below":"","Delete table":"","Delete row":"","Delete column":"","Empty cell":""}},function(e,t,o){"use strict";t.__esModule=!0,t.default={"Type something":"Напишите что-либо","About Jodit":"О Jodit","Jodit Editor":"Редактор Jodit","Free Non-commercial Version":"Версия для не коммерческого использования","Jodit User's Guide":"Jodit Руководство пользователя","contains detailed help for using":"содержит детальную информацию по использованию","For information about the license, please go to our website:":"Для получения сведений о лицензии , пожалуйста, перейдите на наш сайт:","Buy full version":"Купить полную версию","Copyright © XDSoft.net - Chupurnov Valeriy. All rights reserved.":"Авторские права © XDSoft.net - Чупурнов Валерий. Все права защищены.",Anchor:"Анкор","Open in new tab":"Открывать ссылку в новой вкладке","Open editor in fullsize":"Открыть редактор в полном размере","Clear Formatting":"Очистить форматирование","Fill color or set the text color":"Цвет заливки или цвет текста",Redo:"Повтор",Undo:"Отмена",Bold:"Жирный",Italic:"Наклонный","Insert Unordered List":"Вставка маркированного списка","Insert Ordered List":"Вставить нумерованный список","Justify Center":"Выровнять по центру","Justify Full":"Выровнять по ширине","Justify Left":"Выровнять по левому краю","Justify Right":"Выровнять по правому краю","Insert Horizontal Line":"Вставить горизонтальную линию","Insert Image":"Вставить изображение","Insert link":"Вставить ссылку","Font size":"Размер шрифта","Font family":"Шрифт","Insert format block":"Вставить блочный элемент",Normal:"Нормальный текст","Heading 1":"Заголовок 1","Heading 2":"Заголовок 2","Heading 3":"Заголовок 3","Heading 4":"Заголовок 4",Quote:"Цитата",Code:"Код",Insert:"Вставить","Insert table":"Вставить таблицу","Change mode":"Источник",Margins:"Отступы",top:"сверху",right:"справа",bottom:"снизу",left:"слева",Styles:"Стили",Classes:"Классы",Align:"Выравнивание",Right:"По правому краю",Center:"По центру",Left:"По левому краю","--Not Set--":"--не устанавливать--",Src:"src",Title:"Заголовок",Alternative:"Альтернативный текст (alt)",Link:"Ссылка","Open link in new tab":"Открывать ссылку в новом окне",Image:"Изображение",Advansed:"Расширенные","Image properties":"Свойства изображения",Cancel:"Отмена",Ok:"Ok","Your code is similar to HTML. Paste as HTML?":"Ваш текст, который вы пытаетесь вставить похож на HTML. Вставить его как HTML?","Paste as HTML":"Вставить как HTML?","File Browser":"Браузер файлов","Error on load list":"Ошибка при загрузке списка изображений","Error on load folders":"Ошибка при загрузке списка директорий","Are you shure?":"Вы уверены?","Enter Directory name":"Введите название директории","Create directory":"Создать директорию","type name":"введите название","Drop image":"Перетащите сюда изображение","or click":"или нажмите","Alternative text":"Альтернативный текст",Browse:"Сервер",Upload:"Загрузка",Background:"Фон",Text:"Текст",Top:" К верху",Middle:"По середине",Bottom:"К низу","Insert column before":"Вставить столбец до","Insert column after":"Вставить столбец после","Insert row above":"Вставить ряд выше","Insert row below":"Вставить ряд ниже","Delete table":"Удалить таблицу","Delete row":"Удалять ряд","Delete column":"Удалить столбец","Empty cell":"Отчистить ячейку"}},function(e,t,o){"use strict";var i=this&&this.__extends||function(){var e=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])};return function(t,o){function i(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(i.prototype=o.prototype,new i)}}();t.__esModule=!0;var n=o(5);t.default=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.stack=[],t}return i(t,e),t.prototype.off=function(e,t,o){if(0===arguments.length)return this.parent.handlers={},this;var i,n;if("string"==typeof e&&(o=t,t=e,e=this.parent),void 0===e.handlers)return this;var r=t.split(/[\s,]+/);for(i=0;r.length>i;i+=1)if(void 0!==e.handlers[r[i]])if(void 0!==o)for(n=0;e.handlers[r[i]].length>n;n+=1)e.handlers[r[i]][n]===o&&e.handlers[r[i]].splice(n,1);else delete e.handlers[r[i]];return this},t.prototype.on=function(e,t,o,i){void 0===i&&(i=!1);var n;"string"==typeof e&&(o=t,t=e,e=this.parent),"string"!=typeof t&&Error("Parameter list must be string");var r=t.split(/[\s,]+/);for(n=0;r.length>n;n+=1)void 0===e.handlers&&(e.handlers={}),void 0===e.handlers[r[n]]&&(e.handlers[r[n]]=[]),i?e.handlers[r[n]].unshift(o):e.handlers[r[n]].push(o);return this},t.prototype.fire=function(e,t,o){var i,n,r,a;if("string"==typeof e&&(o=t,t=e,e=this.parent),void 0!==e.handlers){for(t=t.split(/[\s,]+/),i=0;t.length>i;i+=1)if(void 0!==e.handlers[t[i]]){for(this.stack.push(t[i]),n=0;e.handlers[t[i]].length>n;n+=1)this.current=t[i],void 0!==(a=e.handlers[t[i]][n].apply(e,o||[]))&&(r=a);this.stack.pop()}return r}},t}(n.default)},function(e,t,o){"use strict";var i=this&&this.__extends||function(){var e=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])};return function(t,o){function i(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(i.prototype=o.prototype,new i)}}(),n=this&&this.__assign||Object.assign||function(e){for(var t,o=1,i=arguments.length;i>o;o++){t=arguments[o];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e};t.__esModule=!0;var r=o(1),a=o(5),s=o(7),l=o(4),d=o(0),c=o(6),u=o(13),p=o(18),f=o(10),h=o(3),g=o(11);l.Config.prototype.filebrowser={filter:function(e,t){return t=t.toLowerCase(),"string"==typeof e?-1!==e.toLowerCase().indexOf(t):"string"==typeof e.name?-1!==e.name.toLowerCase().indexOf(t):"string"!=typeof e.file||-1!==e.file.toLowerCase().indexOf(t)},sortBy:"changed",sort:function(e,t,o){var i,n=function(e,t){return t>e?-1:e>t?1:0};if("string"==typeof e)return n(e.toLowerCase(),t.toLowerCase());if(void 0===e[o]||"name"===o)return"string"==typeof e.name?n(e.name.toLowerCase(),t.name.toLowerCase()):"string"==typeof e.file?n(e.file.toLowerCase(),t.file.toLowerCase()):0;switch(o){case"changed":return i=new Date(e.changed),new Date(t.changed)-i;case"size":return d.humanSizeToBytes(e.size)-d.humanSizeToBytes(t.size)}},editImage:!0,preview:!0,showPreviewNavigation:!0,showSelectButtonInPreview:!0,contextMenu:!0,howLongShowMsg:3e3,createNewFolder:!0,deleteFolder:!0,moveFolder:!0,moveFile:!0,showFoldersPanel:!0,width:763,height:400,buttons:["upload","remove","update","select","edit","tiles","list","filter","sort"],view:"tiles",isSuccess:function(e){return e.success},getMessage:function(e){return void 0!==e.data.messages&&Array.isArray(e.data.messages)?e.data.messages.join(" "):""},showFileName:!0,showFileSize:!0,showFileChangeTime:!0,getThumbTemplate:function(e,t,o){var i,n,r,a=""+(new Date).getTime();return"string"==typeof e?(i=e,n=e):(void 0!==e.file&&(i=e.file,n=e.file),e.thumb&&(n=e.thumb)),r='
    \n '+(this.options.showFileName?''+i+"":"")+"\n "+(this.options.showFileSize&&e.size?""+e.size+"":"")+"\n "+(this.options.showFileChangeTime&&e.changed?''+e.changed+"":"")+"\n
    ",'\n '+i+'\n '+(this.options.showFileName||this.options.showFileSize&&e.size||this.options.showFileChangeTime&&e.changed?r:"")+"\n "},ajax:{url:"",async:!0,data:{},cache:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",method:"POST",processData:!0,dataType:"json",headers:{},prepareData:function(e){return e},process:function(e){return e}},create:{data:{action:"create"}},getlocalfilebyurl:{data:{action:"getlocalfilebyurl"}},resize:{data:{action:"resize"}},crop:{data:{action:"crop"}},move:{data:{action:"move"}},remove:{data:{action:"remove"}},items:{data:{action:"files"}},folder:{data:{action:"folders"}},uploader:null};var v="default",m="jodit_filebrowser_files_item";t.default=function(e){function t(t){var o=e.call(this,t)||this;o.currentPath="",o.currentSource=v,o.currentBaseUrl="",o.view="tiles",o.sortBy="changed",o.dragger=!1,o.filterWord="",o.getPathByUrl=function(e,t,i){var n=o;o.options.getlocalfilebyurl.data.url=e,o.send("getlocalfilebyurl",function(e){n.options.isSuccess(e)?t(e.data.path,e.data.name,e.data.source):i(n.options.getMessage(e))},function(e){i(n.options.getMessage(e))})},o.loadItems=function(e,t){var i=o;i.options.items.data.path=e,i.options.items.data.source=t,i.options.items.url&&(i.files.classList.add("active"),i.files.appendChild(i.loader.cloneNode(!0)),i.__ajax2&&i.__ajax2.abort&&i.__ajax2.abort(),i.__ajax2=i.send("items",function(e){var t=i.options.items.process.call(i,e);i.generateItemsBox(t.data.sources),i.someSelectedWasChanged()},function(){i.status(i.parent.i18n("Error on load list"))}))},o.create=function(e,t,i){o.options.create.data.source=i,o.options.create.data.path=t,o.options.create.data.name=e,o.send("create",function(e){o.options.isSuccess(e)?(o.currentPath=t,o.currentSource=i,o.loadTree(t,i)):o.status(o.options.getMessage(e))},function(e){o.status(e)})},o.move=function(e,t,i){o.options.move.data.from=e,o.options.move.data.path=t,o.options.move.data.source=i,o.send("move",function(e){o.options.isSuccess(e)?o.loadTree(t,i):o.status(o.options.getMessage(e))},function(e){o.status(e)})},o.close=function(){o.dialog.close()},o.open=function(e){if(o.options.items.url){o.__off(o.files,"dblclick").__on(o.files,"dblclick","a",o.onSelect(e)),o.__off(o.buttons.select,"click").__on(o.buttons.select,"click",o.onSelect(e)),o.loadTree(o.currentPath,o.currentSource);var t=[d.dom(''+o.parent.i18n("File Browser")+"      ")],i=void 0,n=void 0;for(i=0;o.options.buttons.length>i;i+=1){var a=o.options.buttons[i];"string"==typeof a&&void 0!==o.buttons[a]&&(o.options.editImage&&void 0!==r.default.modules.ImageEditor||"edit"!==a)?t.push(o.buttons[a]):"function"==typeof a?t.push(a.call(o)):d.isPlainObject(a)&&a.exec&&a.name&&(n=d.dom('
    '+c.default.getIcon(a.icon||a.name)+"
    "),t.push(n),n.addEventListener("click",a.exec))}o.dialog.open(o.browser,t)}},o.errorHandler=function(e){o.status(o.options.getMessage(e))},o.uploadHandler=function(){o.loadItems(o.currentPath,o.currentSource)},o.openImageEditor=function(e,t,i,n,r,a){o.parent.getInstance("ImageEditor").open(e,function(e,s,l,d){void 0===o.options[s.action]&&(o.options[s.action]={}),void 0===o.options[s.action].data&&(o.options[s.action].data={action:s.action}),o.options[s.action].data.newname=e,o.options[s.action].data.box=s.box,o.options[s.action].data.path=i,o.options[s.action].data.name=t,o.options[s.action].data.source=n,o.send(s.action,function(e){o.options.isSuccess(e)?(o.loadTree(o.currentPath,o.currentSource),l(),r&&r()):(d(o.options.getMessage(e)),a&&a(o.options.getMessage(e)))},function(e){d(o.options.getMessage(e)),a&&a(o.options.getMessage(e))})})},o.draggable=!1,o.start={top:0,left:0},o.client={x:0,y:0};var i=o;i.options=d.extend(!0,{},l.Config.prototype.filebrowser,i.parent.options.filebrowser),i.dialog=new s.default(t,{fullsizeButton:!0}),i.loader=d.dom('
    '),i.browser=d.dom('
    '+(i.options.showFoldersPanel?'
    ':"")+'
    '),i.status_line=i.browser.querySelector(".jodit_filebrowser_status"),i.buttons={upload:d.dom('
    '+c.default.getIcon("plus")+'
    '),remove:d.dom('
    '+c.default.getIcon("bin")+"
    "),update:d.dom('
    '+c.default.getIcon("update")+"
    "),select:d.dom('
    '+c.default.getIcon("check")+"
    "),edit:d.dom('
    '+c.default.getIcon("pencil")+"
    "),tiles:d.dom('
    '+c.default.getIcon("th")+"
    "),list:d.dom('
    '+c.default.getIcon("th-list")+"
    "),filter:d.dom(''),sort:d.dom('")},i.tree=i.browser.querySelector(".jodit_filebrowser_tree"),i.files=i.browser.querySelector(".jodit_filebrowser_files"),i.__on([i.buttons.tiles,i.buttons.list],"click",function(e){var t=e.currentTarget;t.classList.contains("jodit_button_tiles")?(i.view="tiles",i.buttons.list.classList.add("disabled")):(i.view="list",i.buttons.tiles.classList.add("disabled")),t.classList.remove("disabled"),i.files.classList.remove("jodit_filebrowser_files_view-tiles"),i.files.classList.remove("jodit_filebrowser_files_view-list"),i.files.classList.add("jodit_filebrowser_files_view-"+i.view),g.default.set("jodit_filebrowser_view",i.view,31)}),i.__on(i.buttons.sort,"change",function(){i.sortBy=i.buttons.sort.value,g.default.set("jodit_filebrowser_sortby",i.sortBy,31),i.loadItems(i.currentPath,i.currentSource)}),i.__on(i.buttons.sort,"click mousedown",function(e){e.stopPropagation()}),i.__on(i.buttons.filter,"click mousedown",function(e){e.stopPropagation()}).__on(i.buttons.filter,"keydown",d.debounce(function(){i.filterWord=i.buttons.filter.value,i.loadItems(i.currentPath,i.currentSource)},300)),i.__on(i.buttons.remove,"click",function(){o.__getActiveElements().length&&s.Confirm(t.i18n("Are you shure?"),"",function(e){e&&(o.__getActiveElements().forEach(function(e){i.remove(i.currentPath,e.getAttribute("data-name"),e.getAttribute("data-source"))}),i.someSelectedWasChanged(),i.loadTree(i.currentPath,i.currentSource))})}),i.__on(i.buttons.edit,"click",function(){var e=o.__getActiveElements();1===e.length&&i.openImageEditor(e[0].getAttribute("href"),e[0].getAttribute("data-name"),e[0].getAttribute("data-path"),e[0].getAttribute("data-source"))}),i.__on(i.buttons.update,"click",function(){i.loadTree(o.currentPath,o.currentSource)}),i.__on(i.tree,"click","a>i.remove",function(e){var o=this.parentNode,n=o.getAttribute("data-path");return s.Confirm(t.i18n("Are you shure?"),"",function(e){e&&(i.remove(n,o.getAttribute("data-name"),o.getAttribute("data-source")),i.loadTree(i.currentPath,i.currentSource))}),e.stopImmediatePropagation(),!1}).__on(i.tree,"click","a",function(){var e=this;this.classList.contains("addfolder")?s.Promt(i.parent.i18n("Enter Directory name"),i.parent.i18n("Create directory"),function(t){i.create(t,e.getAttribute("data-path"),e.getAttribute("data-source"))},i.parent.i18n("type name")):(i.currentPath=this.getAttribute("data-path"),i.currentSource=this.getAttribute("data-source"),i.loadTree(this.getAttribute("data-path"),this.getAttribute("data-source")))}).__on(o.tree,"dragstart","a",function(){i.dragger=this}).__on(o.tree,"drop","a",function(){if(i.options.moveFolder&&i.dragger){var e=i.dragger.getAttribute("data-path");if(!i.options.moveFolder&&i.dragger.classList.contains("jodit_filebrowser_tree_item"))return!1;if(i.dragger.classList.contains(m)&&(e+=i.dragger.getAttribute("data-name"),!i.options.moveFile))return!1;i.move(e,this.getAttribute("data-path"),this.getAttribute("data-source"))}});var a=new u.default(o.parent);return i.__on(i.files,"mousedown","a>img",function(e){i.client.x=e.clientX,i.client.y=e.clientY,i.start=d.offset(this),i.draggable=this.cloneNode(!0),d.css(i.draggable,{"z-index":1e14,position:"fixed",display:"none",left:i.start.left,top:i.start.top,width:this.offsetWidth,height:this.offsetHeight}),document.body.appendChild(i.draggable)}).__on(i.files,"dragstart","a",function(e){i.dragger=this,e.dataTransfer.setData(h.TEXT_PLAIN,this.getAttribute("href")),e.stopPropagation()}).__on(i.files,"contextmenu","a",function(e){var t=this;if(i.options.contextMenu){var o=this;return a.show(e.pageX,e.pageY,[!!i.options.editImage&&{icon:"pencil",title:"Edit",exec:function(){i.openImageEditor(o.getAttribute("href"),o.getAttribute("data-name"),o.getAttribute("data-path"),o.getAttribute("data-source"))}},{icon:"bin",title:"Delete",exec:function(){i.remove(i.currentPath,o.getAttribute("data-name"),o.getAttribute("data-source")),i.someSelectedWasChanged(),i.loadTree(i.currentPath,i.currentSource)}},!!i.options.preview&&{icon:"eye",title:"Preview",exec:function(){var e=new s.default(i.parent),n=d.dom('
    '),r=o.getAttribute("href"),a=i.buttons.select.cloneNode(!0),l=document.createElement("img"),u=function(){var a=function(){if(t.removeEventListener("load",a),n.innerHTML="",i.options.showPreviewNavigation){var s=d.dom(''+c.default.getIcon("angle-right")+""),p=d.dom(''+c.default.getIcon("angle-left")+"");o.previousSibling&&o.previousSibling.classList&&o.previousSibling.classList.contains(m)&&n.appendChild(p),o.nextSibling&&o.nextSibling.classList&&o.nextSibling.classList.contains(m)&&n.appendChild(s),i.__on([s,p],"click",function(){o=this.classList.contains("jodit_filebrowser_preview_navigation-next")?o.nextSibling:o.previousSibling,n.innerHTML='',r=o.getAttribute("href"),l.setAttribute("src",r),u()})}n.appendChild(l),e.setPosition()};l.addEventListener("load",a),l.complete&&a.call(l)};u(),l.setAttribute("src",r),e.setContent(n),i.options.showSelectButtonInPreview&&(a.removeAttribute("disabled"),e.setTitle(a),a.addEventListener("click",function(){i.files.querySelector("a.active").classList.add("active"),o.classList.add("active"),i.__fire(i.buttons.select,"click"),e.close()})),e.open()}},{icon:"upload",title:"Download",exec:function(){window.open(o.getAttribute("href"))}}]),e.stopPropagation(),e.preventDefault(),!1}}).__on(i.files,"click",function(e){d.ctrlKey(e)||(o.__getActiveElements().forEach(function(e){e.classList.remove("active")}),i.someSelectedWasChanged())}).__on(i.files,"click","a",function(e){return d.ctrlKey(e)||i.__getActiveElements().forEach(function(e){e.classList.remove("active")}),this.classList.toggle("active"),i.someSelectedWasChanged(),e.stopPropagation(),!1}).__on(document,"dragover",function(e){i.isOpened()&&i.draggable&&void 0!==e.clientX&&d.css(i.draggable,{left:e.clientX+20,top:e.clientY+20,display:"block"})}).__on(window,"keydown",function(e){i.isOpened()&&46===e.which&&i.__fire(i.buttons.remove,"click")}).__on(window,"mouseup dragend",function(){i.draggable&&(i.draggable.parentNode.removeChild(i.draggable),i.draggable=!1)}),o.dialog.setSize(o.options.width,o.options.height),o.options.getlocalfilebyurl=d.extend(!0,{},o.options.ajax,o.options.getlocalfilebyurl),o.options.crop=d.extend(!0,{},o.options.ajax,o.options.crop),o.options.resize=d.extend(!0,{},o.options.ajax,o.options.resize),o.options.create=d.extend(!0,{},o.options.ajax,o.options.create),o.options.move=d.extend(!0,{},o.options.ajax,o.options.move),o.options.remove=d.extend(!0,{},o.options.ajax,o.options.remove),o.options.folder=d.extend(!0,{},o.options.ajax,o.options.folder),o.options.items=d.extend(!0,{},o.options.ajax,o.options.items),o.view="list"===o.options.view?"list":"tiles",g.default.get("jodit_filebrowser_view")&&(o.view="list"===g.default.get("jodit_filebrowser_view")?"list":"tiles"),o.buttons[o.view].classList.remove("disabled"),o.files.classList.add("jodit_filebrowser_files_view-"+o.view),o.sortBy=-1!==["changed","name","size"].indexOf(o.options.sortBy)?o.options.sortBy:"changed",g.default.get("jodit_filebrowser_sortby")&&(o.sortBy=-1!==["changed","name","size"].indexOf(g.default.get("jodit_filebrowser_sortby"))?g.default.get("jodit_filebrowser_sortby"):"changed"),o.buttons.sort.value=o.sortBy,o.currentBaseUrl=d.$$("base",o.parent.doc).length?d.$$("base",o.parent.doc)[0].getAttribute("href"):location.protocol+"//"+location.host,void 0!==r.default.modules.Uploader&&(o.uploader=new p.default(o.parent,n({},o.parent.options.uploader,o.options.uploader)),o.uploader.setPath(o.currentPath),o.uploader.setSource(o.currentSource),o.uploader.bind(o.browser,o.uploadHandler,o.errorHandler),o.uploader.bind(o.buttons.upload,o.uploadHandler,o.errorHandler)),o}return i(t,e),t.prototype.isOpened=function(){return this.dialog.isOpened()&&"none"!==this.browser.style.display},t.prototype.status=function(e,t){var o=this;clearTimeout(this.statustimer),this.status_line.classList.remove("success"),this.status_line.classList.add("active"),this.status_line.innerHTML=e,t&&this.status_line.classList.add("success"),this.statustimer=setTimeout(function(){o.status_line.classList.remove("active")},this.options.howLongShowMsg)},t.prototype.generateFolderTree=function(e){var t=this,o=[];d.each(e,function(e,i){e&&e!==v&&o.push('
    '+e+"
    "),i.folders.forEach(function(n){var r=''+n+"";t.options.deleteFolder&&".."!==n&&"."!==n&&(r+='×'),r+="",o.push(r)}),t.options.createNewFolder&&o.push(''+c.default.getIcon("plus")+" "+t.parent.i18n("Add folder")+"")}),this.tree.innerHTML=o.join("")},t.prototype.generateItemsBox=function(e){var t=this,o=[];d.each(e,function(e,i){e&&e!==v&&o.push('
    '+e+(i.path?" - "+i.path:"")+"
    "),i.files&&i.files.length?("function"==typeof t.options.sort&&i.files.sort(function(e,o){return t.options.sort(e,o,t.sortBy,t.parent)}),i.files.forEach(function(n){(void 0===t.options.filter||t.options.filter(n,t.filterWord))&&o.push(t.options.getThumbTemplate.call(t,n,i,e))})):o.push("
    "+t.parent.i18n("There are no files")+"
    ")}),this.files.innerHTML=o.join("")},t.prototype.__getActiveElements=function(){return d.$$(":scope>a.active",this.files)},t.prototype.someSelectedWasChanged=function(){var e=this.__getActiveElements();this.buttons.remove.classList.toggle("disabled",!e.length),this.buttons.select.classList.toggle("disabled",!e.length),this.buttons.edit.classList.toggle("disabled",1!==e.length)},t.prototype.send=function(e,t,o){var i,n=d.extend(!0,{},this.options.ajax,void 0!==this.options[e]?this.options[e]:this.options.ajax);return n.data=n.prepareData.call(this,n.data),i=new f.default(this.parent,n),i.send().then(t).catch(o),i},t.prototype.loadTree=function(e,t){var o=this;o.options.folder.data.path=e,o.options.folder.data.source=t,o.uploader&&(o.uploader.setPath(e),o.uploader.setSource(t)),o.options.showFoldersPanel&&(o.options.folder.url?(o.tree.classList.add("active"),o.tree.innerHTML="",o.tree.appendChild(o.loader.cloneNode(!0)),o.__ajax&&o.__ajax.abort&&o.__ajax.abort(),o.__ajax=this.send("folder",function(e){var t=o.options.folder.process.call(o,e);o.generateFolderTree(t.data.sources)},function(){o.status(o.parent.i18n("Error on load folders"))})):o.tree.classList.remove("active")),this.loadItems(e,t)},t.prototype.remove=function(e,t,o){var i=this;this.options.remove.data.path=e,this.options.remove.data.name=t,this.options.remove.data.source=o,this.send("remove",function(e){e=i.options.remove.process.call(i,e),i.options.isSuccess(e)?(i.someSelectedWasChanged(),i.status(i.options.getMessage(e),!0)):i.status(i.options.getMessage(e))},function(e){i.status(e)})},t.prototype.onSelect=function(e){var t=this;return function(){var o=t.__getActiveElements();if(o.length){var i=[];o.forEach(function(e){i.push(e.getAttribute("data-url"))}),t.close(),"function"==typeof e&&e({baseurl:"",files:i})}return!1}},t}(a.default)},function(e,t,o){"use strict";var i=this&&this.__extends||function(){var e=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])};return function(t,o){function i(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(i.prototype=o.prototype,new i)}}();t.__esModule=!0;var n=o(5),r=o(4),a=o(0),s=o(6),l=o(7);r.Config.prototype.imageeditor={closeAfterSave:!1,width:"85%",height:"85%",crop:!0,resize:!0,resizeUseRatio:!0,resizeMinWidth:20,resizeMinHeight:20,cropUseRatio:!0,cropDefaultWidth:"70%",cropDefaultHeight:"70%"},t.default=function(e){function t(t){var o=e.call(this,t)||this;return o.resizeUseRatio=!0,o.cropUseRatio=!0,o.clicked=!1,o.activeTab="resize",o.hide=function(){o.dialog.close()},o.calcValueByPercent=function(e,t){var o,i=""+t,n=parseFloat(""+e);return(o=/^[\-+]?[0-9]+(px)?$/.exec(i))?parseInt(i,10):(o=/^([\-+]?[0-9.]+)%$/.exec(i),o?Math.round(n*(parseFloat(o[1])/100)):n||0)},o.calcCropBox=function(){var e=.8*o.crop_box.parentNode.offsetWidth,t=.8*o.crop_box.parentNode.offsetHeight,i=e,n=t;e>o.naturalWidth&&t>o.naturalHeight?(i=o.naturalWidth,n=o.naturalHeight):o.ratio>e/t?(i=e,n=o.naturalHeight*(e/o.naturalWidth)):(i=o.naturalWidth*(t/o.naturalHeight),n=t),a.css(o.crop_box,{width:i,height:n})},o.showCrop=function(){o.cropImage&&(o.calcCropBox(),o.new_w=o.calcValueByPercent(o.cropImage.offsetWidth||o.image.offsetWidth,o.options.cropDefaultWidth),o.new_h=o.cropUseRatio?o.new_w/o.ratio:o.calcValueByPercent(o.cropImage.offsetHeight||o.image.offsetHeight,o.options.cropDefaultHeight),a.css(o.cropHandler,{backgroundImage:"url("+o.cropImage.getAttribute("src")+")",width:o.new_w,height:o.new_h,left:(o.cropImage.offsetWidth||o.image.offsetWidth)/2-o.new_w/2,top:(o.cropImage.offsetHeight||o.image.offsetHeight)/2-o.new_h/2}),o.parent.events.fire(o.cropHandler,"updatesize"))},o.cropBox={x:0,y:0,w:0,h:0},o.updateCropBox=function(){if(o.cropImage){var e=o.cropImage.offsetWidth/o.naturalWidth,t=o.cropImage.offsetHeight/o.naturalHeight;o.cropBox.x=a.css(o.cropHandler,"left")/e,o.cropBox.y=a.css(o.cropHandler,"top")/t,o.cropBox.w=o.cropHandler.offsetWidth/e,o.cropBox.h=o.cropHandler.offsetHeight/t,o.sizes.innerText=o.cropBox.w.toFixed(0)+"x"+o.cropBox.h.toFixed(0)}},o.resizeBox={w:0,h:0},o.updateResizeBox=function(){o.resizeBox.w=o.image.offsetWidth||o.naturalWidth,o.resizeBox.h=o.image.offsetHeight||o.naturalHeight},o.open=function(e,t){var i=(new Date).getTime();o.image=document.createElement("img"),a.$$("img,.jodit_icon-loader",o.resize_box).forEach(function(e){e.parentNode.removeChild(e)}),a.$$("img,.jodit_icon-loader",o.crop_box).forEach(function(e){e.parentNode.removeChild(e)}),a.css(o.cropHandler,"background","transparent"),o.onSave=t,o.resize_box.appendChild(a.dom('')),o.crop_box.appendChild(a.dom('')),/\?/.test(e)?e+="&_tst="+i:e+="?_tst="+i,o.image.setAttribute("src",e),o.dialog.open();var n=function(){o.image.removeEventListener("load",n),o.naturalWidth=o.image.naturalWidth,o.naturalHeight=o.image.naturalHeight,o.widthInput.value=""+o.naturalWidth,o.heightInput.value=""+o.naturalHeight,o.ratio=o.naturalWidth/o.naturalHeight,o.resize_box.appendChild(o.image),o.cropImage=o.image.cloneNode(),o.crop_box.appendChild(o.cropImage),a.$$(".jodit_icon-loader",o.editor).forEach(function(e){e.parentNode.removeChild(e)}),"crop"===o.activeTab&&o.showCrop(),o.parent.events.fire(o.resizeHandler,"updatesize"),o.parent.events.fire(o.cropHandler,"updatesize"),o.dialog.setPosition()};o.image.addEventListener("load",n),o.image.complete&&n()},o.setHandlers=function(){var e=o;e.__on([e.editor.querySelector(".jodit_bottomright"),e.cropHandler],"mousedown",function(t){e.target=t.target||t.srcElement,t.preventDefault(),t.stopImmediatePropagation(),e.clicked=!0,e.start_x=parseInt(t.clientX,10),e.start_y=parseInt(t.clientY,10),"crop"===e.activeTab?(e.top_x=a.css(e.cropHandler,"left"),e.top_y=a.css(e.cropHandler,"top"),e.width=e.cropHandler.offsetWidth,e.height=e.cropHandler.offsetHeight):(e.width=e.image.offsetWidth,e.height=e.image.offsetHeight)}),e.__off(window,".jodit_image_editor"+e.parent.id).__on(window,"mousemove.jodit_image_editor"+e.parent.id,a.throttle(function(t){e.clicked&&(e.diff_x=parseInt(t.clientX,10)-e.start_x,e.diff_y=parseInt(t.clientY,10)-e.start_y,"resize"===e.activeTab&&e.resizeUseRatio||"crop"===e.activeTab&&e.cropUseRatio?e.diff_x?(e.new_w=e.width+e.diff_x,e.new_h=Math.round(e.new_w/e.ratio)):(e.new_h=e.height+e.diff_y,e.new_w=Math.round(e.new_h*e.ratio)):(e.new_w=e.width+e.diff_x,e.new_h=e.height+e.diff_y),"resize"===e.activeTab?(e.new_w>e.options.resizeMinWidth&&(a.css(e.image,"width",e.new_w+"px"),e.widthInput.value=""+e.new_w),e.new_h>e.options.resizeMinHeight&&(a.css(e.image,"height",e.new_h+"px"),e.heightInput.value=""+e.new_h),o.parent.events.fire(e.resizeHandler,"updatesize")):(e.target!==e.cropHandler?(e.top_x+e.new_w>e.cropImage.offsetWidth&&(e.new_w=e.cropImage.offsetWidth-e.top_x),e.top_y+e.new_h>e.cropImage.offsetHeight&&(e.new_h=e.cropImage.offsetHeight-e.top_y),a.css(e.cropHandler,{width:e.new_w,height:e.new_h})):(e.top_x+e.diff_x+e.cropHandler.offsetWidth>e.cropImage.offsetWidth&&(e.diff_x=e.cropImage.offsetWidth-e.top_x-e.cropHandler.offsetWidth),a.css(e.cropHandler,"left",e.top_x+e.diff_x),e.top_y+e.diff_y+e.cropHandler.offsetHeight>e.cropImage.offsetHeight&&(e.diff_y=e.cropImage.offsetHeight-e.top_y-e.cropHandler.offsetHeight),a.css(e.cropHandler,"top",e.top_y+e.diff_y)),o.parent.events.fire(e.cropHandler,"updatesize")),t.stopImmediatePropagation())},30)).__on(window,"resize.jodit_image_editor"+e.parent.id,function(){o.parent.events.fire(e.resizeHandler,"updatesize"),e.showCrop(),o.parent.events.fire(e.cropHandler,"updatesize")}).__on(window,"mouseup.jodit_image_editor"+e.parent.id+" keydown.jodit_image_editor"+e.parent.id,function(t){e.clicked&&(e.clicked=!1,t.stopImmediatePropagation())}),a.$$(".jodit_btn_group",e.editor).forEach(function(t){var o=t.querySelector("input");e.__on(t,"click change","button",function(){var i=this;a.$$("button",t).forEach(function(e){return e.classList.remove("active")}),i.classList.add("active"),o.checked=!!i.getAttribute("data-yes"),e.__fire(o,"change")})}),e.__on(o.editor,"click",".jodit_image_editor_slider-title",function(){a.$$(".jodit_image_editor_slider,.jodit_image_editor_area",e.editor).forEach(function(e){return e.classList.remove("active")});var t=this.parentNode;t.classList.add("active"),e.activeTab=t.getAttribute("data-area"),e.editor.querySelector(".jodit_image_editor_area.jodit_image_editor_area_"+e.activeTab).classList.add("active"),"crop"===e.activeTab&&e.showCrop()}),e.__on(e.widthInput,"change mousedown keydown",a.debounce(function(){var t,i=parseInt(e.widthInput.value,10);i>e.parent.options.resizer.min_width&&(a.css(e.image,"width",i+"px"),e.resizeUseRatio&&(t=Math.round(i/e.ratio))>e.parent.options.resizer.min_height&&(a.css(e.image,"height",t+"px"),e.heightInput.value=t)),o.parent.events.fire(e.resizeHandler,"updatesize")},200)),e.__on(e.heightInput,"change mousedown keydown",a.debounce(function(){var t,i=parseInt(e.heightInput.value,10);i>e.parent.options.resizer.min_height&&(a.css(e.image,"height",i+"px"),e.resizeUseRatio&&(t=Math.round(i*e.ratio))>e.parent.options.resizer.min_width&&(a.css(e.image,"width",t+"px"),e.widthInput.value=t)),o.parent.events.fire(e.resizeHandler,"updatesize")},200)),e.editor.querySelector(".jodit_image_editor_keep_spect_ratio").addEventListener("change",function(){e.resizeUseRatio=this.checked}),e.editor.querySelector(".jodit_image_editor_keep_spect_ratio_crop").addEventListener("change",function(){e.cropUseRatio=this.checked}),e.parent.events.on(e.resizeHandler,"updatesize",function(){a.css(e.resizeHandler,{top:0,left:0,width:(e.image.offsetWidth||e.naturalWidth)+"px",height:(e.image.offsetHeight||e.naturalHeight)+"px"}),o.updateResizeBox()}),e.parent.events.on(e.cropHandler,"updatesize",function(){var t=a.css(e.cropHandler,"left"),o=a.css(e.cropHandler,"top"),i=e.cropHandler.offsetWidth,n=e.cropHandler.offsetHeight;0>t&&(t=0),0>o&&(o=0),t+i>e.cropImage.offsetWidth&&(i=e.cropImage.offsetWidth-t,e.cropUseRatio&&(n=i/e.ratio)),o+n>e.cropImage.offsetHeight&&(n=e.cropImage.offsetHeight-o,e.cropUseRatio&&(i=n*e.ratio)),a.css(e.cropHandler,{width:i,height:n,left:t,top:o,backgroundPosition:-t+"px "+-o+"px",backgroundSize:e.cropImage.offsetWidth+"px "+e.cropImage.offsetHeight+"px"}),e.updateCropBox()}),e.buttons.forEach(function(t){t.addEventListener("mousedown",function(e){e.stopImmediatePropagation()}),t.addEventListener("click",function(){var o={action:e.activeTab,box:"resize"===e.activeTab?e.resizeBox:e.cropBox};switch(t.getAttribute("data-action")){case"saveas":l.Promt(e.parent.i18n("Enter new name"),e.parent.i18n("Save in new file"),function(t){if(!a.trim(t))return l.Alert(e.parent.i18n("The name should not be empty")),!1;e.onSave(t,o,e.hide,function(e){l.Alert(e)})});break;case"save":e.onSave(void 0,o,e.hide,function(e){l.Alert(e)});break;case"reset":"resize"===e.activeTab?(a.css(e.image,{width:null,height:null}),e.widthInput.value=""+e.naturalWidth,e.heightInput.value=""+e.naturalHeight,e.parent.events.fire(e.resizeHandler,"updatesize")):e.showCrop()}})})},o.options=t.options.imageeditor,o.resizeUseRatio=o.options.resizeUseRatio,o.cropUseRatio=o.options.cropUseRatio,o.buttons=[a.dom('"),a.dom('"),a.dom('")],o.activeTab=o.options.resize?"resize":"crop",o.editor=a.dom('
    '+(o.options.resize?'
    ':"")+(o.options.crop?'
    ':"")+'
    '+(o.options.resize?'
    '+s.default.getIcon("resize")+t.i18n("Resize")+'
    ":"")+(o.options.crop?'
    '+s.default.getIcon("crop")+t.i18n("Crop")+'
    ":"")+"
    "),o.widthInput=o.editor.querySelector(".jodit_image_editor_width"),o.heightInput=o.editor.querySelector(".jodit_image_editor_height"),o.resize_box=o.editor.querySelector(".jodit_image_editor_area.jodit_image_editor_area_resize .jodit_image_editor_box"),o.crop_box=o.editor.querySelector(".jodit_image_editor_area.jodit_image_editor_area_crop .jodit_image_editor_box"),o.sizes=o.editor.querySelector(".jodit_image_editor_area.jodit_image_editor_area_crop .jodit_sizes"),o.resizeHandler=o.editor.querySelector(".jodit_image_editor_resizer"),o.cropHandler=o.editor.querySelector(".jodit_image_editor_croper"),o.dialog=new l.default(t),o.dialog.setContent(o.editor),o.dialog.setSize(o.options.width,o.options.height),o.dialog.setTitle(o.buttons),o.setHandlers(),o}return i(t,e),t}(n.default)},function(e,t,o){"use strict";var i=this&&this.__extends||function(){var e=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])};return function(t,o){function i(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(i.prototype=o.prototype,new i)}}();t.__esModule=!0;var n=o(3),r=o(5),a=o(0),s=o(2);t.default=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.focus=function(){t.isFocused()||(t.win.focus(),t.parent.editor.focus())},t.eachSelection=function(e){var o=t.win.getSelection();if(o.rangeCount){var i=o.getRangeAt(0),n=[],r=i.endContainer===t.parent.editor?t.parent.editor.childNodes[i.endOffset-1]:i.endContainer;s.default.find(i.startContainer===t.parent.editor?t.parent.editor.childNodes[i.startOffset]:i.startContainer,function(e){if(!e||s.default.isEmptyTextNode(e)||e instanceof HTMLElement&&e.classList.contains("jodit_selection_marker")||n.push(e),e===r)return!0},t.parent.editor,!0,"nextSibling",!1),n.forEach(function(t){e(t)})}},t}return i(t,e),t.prototype.__normalizeSelection=function(e,t){var o=this;this.cursorInTheEdge(!t,function(e){return e&&e.nodeType!==Node.TEXT_NODE&&e!==o.parent.editor},!0)&&(t?e.setStartAfter(e.startContainer):e.setEndBefore(e.endContainer))},t.prototype.insertCursorAtPoint=function(e,t){var o;this.clear();try{var i=null;if(this.doc.caretPositionFromPoint?(o=this.doc.caretPositionFromPoint(e,t),i=this.doc.createRange(),i.setStart(o.offsetNode,o.offset)):this.doc.caretRangeFromPoint&&(o=this.doc.caretRangeFromPoint(e,t),i=this.doc.createRange(),i.setStart(o.startContainer,o.startOffset)),null!==i&&void 0!==window.getSelection){i.collapse(!0);var n=this.win.getSelection();n.removeAllRanges(),n.addRange(i)}else if(void 0!==this.doc.body.createTextRange){var r=this.doc.body.createTextRange();r.moveToPoint(e,t),r.select()}return!0}catch(e){}return!1},t.prototype.clear=function(){a.$$(".jodit_selection_marker",this.parent.editor).forEach(function(e){e.parentNode.removeChild(e)})},t.prototype.restore=function(e){var t=this;if(void 0===e&&(e=[]),Array.isArray(e)){var o=this.win.getSelection();o.removeAllRanges(),a.each(e,function(e,i){var n=t.doc.createRange(),r=t.doc.getElementById(i.endId),a=t.doc.getElementById(i.startId);if(a){if(i.collapsed||!r){var s=a.previousSibling;s&&s.nodeType==Node.TEXT_NODE?n.setStart(s,s.nodeValue.length):n.setStartBefore(a),a.parentNode.removeChild(a),n.collapse(!0)}else n.setStartAfter(a),a.parentNode.removeChild(a),n.setEndBefore(r),r.parentNode.removeChild(r);o.addRange(n),t.__normalizeSelection(n,!0),t.__normalizeSelection(n,!1)}})}},t.prototype.save=function(){var e=this,t=this.win.getSelection();if(!t.rangeCount)return null;var o,i,r,a=function(t,o){void 0===o&&(o=!1);var i=t.cloneRange();i.collapse(o);var r=e.doc.createElement("span");return r.id="jodit_selection_marker_"+ +new Date+"_"+(""+Math.random()).slice(2),r.style.lineHeight="0",r.style.display="none",r.className="jodit_selection_marker jodit_selection_marker-"+(o?"start":"end"),r.appendChild(e.doc.createTextNode(n.INVISIBLE_SPACE)),i.insertNode(r),r},s=[],l=t.rangeCount,d=[];for(o=0;l>o;o+=1)d[o]=t.getRangeAt(o),d[o].collapsed?(i=a(d[o]),s[o]={startId:i.id,collapsed:!0}):(i=a(d[o],!0),r=a(d[o],!1),s[o]={startId:i.id,endId:r.id,collapsed:!1});for(t.removeAllRanges(),o=l-1;o>=0;--o){s[o].collapsed?(d[o].setStartAfter(this.doc.getElementById(s[o].startId)),d[o].collapse(!0)):(d[o].setStartAfter(this.doc.getElementById(s[o].startId)),d[o].setEndBefore(this.doc.getElementById(s[o].endId)));try{t.addRange(d[o].cloneRange())}catch(e){}}return s},t.prototype.isCollapsed=function(){var e,t=this.win.getSelection();for(e=0;t.rangeCount>e;e+=1)if(!t.getRangeAt(e).collapsed)return!1;return!0},t.prototype.isFocused=function(){return this.doc.hasFocus&&this.doc.hasFocus()&&this.parent.editor===this.doc.activeElement},t.prototype.current=function(){if(void 0!==this.win.getSelection){var e=this.win.getSelection();if(e.rangeCount>0){var t=e.getRangeAt(0),o=t.startContainer;if(t.startContainer.nodeType!==Node.TEXT_NODE&&t.startContainer===t.endContainer&&t.startOffset!==t.endOffset&&(o=t.startContainer.childNodes[t.startOffset]),s.default.contains(this.parent.editor,o))return o}}return!1},t.prototype.insertNode=function(e,t){if(void 0===t&&(t=!0),!(e instanceof Node))throw Error("Parameter node most be instance of Node");var o,i;this.focus(),this.win.getSelection?(o=this.win.getSelection(),this.isCollapsed()||this.parent.execCommand("Delete"),o.getRangeAt&&o.rangeCount&&(i=o.getRangeAt(0),function(e,t){for(var o=t;o;){if(o===e)return!0;o=o.parentNode}return!1}(this.parent.editor,i.commonAncestorContainer)?(i.deleteContents(),i.insertNode(e)):this.parent.editor.appendChild(e),t&&this.setCursorAfter(e))):Error("Jodit does'n support this browser"),this.parent.setEditorValue()},t.prototype.insertHTML=function(e){var t,o,i=this.doc.createElement("DIV"),n=this.doc.createDocumentFragment();for(this.isFocused()||this.parent.editor.focus(),"string"==typeof e?i.innerHTML=e:s.default.isNode(e)&&i.appendChild(e),t=i.lastChild;i.firstChild;)t=i.firstChild,n.appendChild(i.firstChild);for(this.insertNode(n,!1),this.setCursorAfter(t),o=this.parent.editor.lastChild;o&&o.nodeType===Node.TEXT_NODE&&o.previousSibling&&/^\s*$/.test(o.data);)o=o.previousSibling;t&&(o&&t===o&&1===t.nodeType&&this.parent.editor.appendChild(this.doc.createElement("br")),this.setCursorAfter(t))},t.prototype.insertImage=function(e,t){void 0===t&&(t={});var o,i="string"==typeof e?a.dom("",this.doc):a.dom(e,this.doc);this.isCollapsed()||this.parent.execCommand("Delete"),"string"==typeof e&&i.setAttribute("src",e),o=""+this.parent.options.imageDefaultWidth,o&&"auto"!==o&&0>(o+"").indexOf("px")&&0>(o+"").indexOf("%")&&(o+="px"),t.width=o,t&&"object"==typeof t&&a.each(t,function(e,t){i.style[t]=e});var n=function(){(i.offsetHeight>i.naturalHeight||i.offsetWidth>i.naturalWidth)&&(i.style.width="",i.style.height=""),i.removeEventListener("load",n)};i.addEventListener("load",n),i.complete&&n(),this.insertNode(i),this.parent.events.fire("afterInsertImage",[i])},t.prototype.setCursorAfter=function(e){var t=this;if(!(e instanceof Node))throw Error("Parameter node most be instance of Node");if(!s.default.up(e,function(e){return e===t.parent.editor||e.parentNode===t.parent.editor},this.parent.editor))throw Error("Node element must be in editor");var o=this.win.getSelection(),i=this.doc.createRange(),r=this.doc.createTextNode(n.INVISIBLE_SPACE);return e.nodeType!==Node.TEXT_NODE?(i.setStartAfter(e),i.insertNode(r),i.setStartAfter(r)):i.setStart(e,e.nodeValue.length),i.collapse(!0),o.removeAllRanges(),o.addRange(i),r},t.prototype.cursorInTheEdge=function(e,t,o){void 0===e&&(e=!1),void 0===t&&(t=!1),void 0===o&&(o=!1);var i=this.win.getSelection();if(!i.rangeCount)return!1;var r,l,d,c=i.getRangeAt(0),u=function(){return!1===o?e:!e},p=u()?c.startContainer:c.endContainer,f=!1,h=u()?c.startOffset:c.endOffset;if(!1===t)t=s.default.up(p,s.default.isBlock,this.parent.editor);else if("function"==typeof t)t=s.default.up(p,t,this.parent.editor);else if(!s.default.isOrContains(t,p))return null;if(!p)return!1;if(p.nodeType===Node.ELEMENT_NODE&&p.hasChildNodes()&&(f=h>p.childNodes.length-1,p=p.childNodes[Math.min(h,p.childNodes.length-1)]||p,h=f&&p.nodeType===Node.TEXT_NODE?p.nodeValue.length:0),p.nodeType===Node.TEXT_NODE&&(d=l=p.nodeValue,n.SPACE_REG_EXP_START.test(l)&&h&&(d=l.replace(n.INVISIBLE_SPACE_REG_EXP_START,""),h-=l.length-d.length),l=d,n.SPACE_REG_EXP_END.test(l)&&h&&(d=a.trim(l),h>d.length&&(h=d.length)),0>h&&(h=0)),p.nodeType===Node.TEXT_NODE&&(e?h>0:d.length>h))return!1;if(e&&p.nodeType===Node.ELEMENT_NODE&&(t&&p===t.firstChild||p===this.parent.editor.firstChild))return!0;if(!e&&p.nodeType===Node.ELEMENT_NODE&&(t&&p===t.lastChild||p===this.parent.editor.lastChild))return!0;if("TABLE"===p.nodeName||p.previousSibling&&"TABLE"===p.previousSibling.nodeName)return f&&!e||!f&&e;for(r=p,p.nodeType===Node.TEXT_NODE&&(e&&0===h?r=s.default.find(r,function(e){return!!e},t,!1,"previousSibling","lastChild"):e||h!==d.length||(r=s.default.next(r,function(e){return!!e},t)));r;){if(r.nodeType===Node.ELEMENT_NODE){if("BR"!==r.nodeName)return!1}else if(r.nodeType===Node.TEXT_NODE&&!/^[ \t\r\n]*$/.test(r.nodeValue)&&!s.default.isEmptyTextNode(r))return!1;r=e?s.default.find(r,function(e){return!!e},t,!1,"previousSibling","lastChild"):s.default.next(r,function(e){return!!e},t)}return!0},t.prototype.setCursorBefore=function(e){var t=this;if(!(e instanceof Node))throw Error("Parameter node most be instance of Node");if(!s.default.up(e,function(e){return e===t.parent.editor||e.parentNode===t.parent.editor},this.parent.editor))throw Error("Node element must be in editor");var o=this.win.getSelection(),i=this.doc.createRange(),r=this.doc.createTextNode(n.INVISIBLE_SPACE);return e.nodeType!==Node.TEXT_NODE?(i.setStartBefore(e),i.insertNode(r),i.selectNode(r)):i.setStart(e,e.nodeValue.length),i.collapse(!0),o.removeAllRanges(),o.addRange(i),r},t.prototype.setCursorIn=function(e,t){var o=this;if(void 0===t&&(t=!1),!(e instanceof Node))throw Error("Parameter node most be instance of Node");if(!s.default.up(e,function(e){return e===o.parent.editor||e.parentNode===o.parent.editor},this.parent.editor))throw Error("Node element must be in editor");var i=this.win.getSelection(),n=this.doc.createRange(),r=e,a=e;do{if(r.nodeType===Node.TEXT_NODE)break;a=r,r=r[t?"firstChild":"lastChild"]}while(r);n.selectNodeContents(r||a),n.collapse(t),i.removeAllRanges(),i.addRange(n)},t.prototype.select=function(e,t){var o=this;if(void 0===t&&(t=!1),!(e instanceof Node))throw Error("Parameter node most be instance of Node");if(!s.default.up(e,function(e){return e===o.parent.editor||e.parentNode===o.parent.editor},this.parent.editor))throw Error("Node element must be in editor");var i=this.win.getSelection(),n=this.doc.createRange();n[t?"selectNodeContents":"selectNode"](e),i.removeAllRanges(),i.addRange(n)},t}(r.default)},function(e,t,o){"use strict";t.__esModule=!0;var i=o(1),n=o(4),r=o(0),a=o(6);n.Config.prototype.fullsize=!1,n.Config.prototype.globalFullsize=!0,i.default.plugins.fullsize=function(e){var t=!1,o=function(){t?r.css(e.container,{height:window.innerHeight,width:window.innerWidth}):r.css(e.container,{height:null,width:null})},i=function(i){if(void 0===i&&(i=!e.container.classList.contains("jodit_fullsize")),t=i,e.container.classList.toggle("jodit_fullsize",i),e.toolbar){r.css(e.toolbar.container,"width","auto");var n=r.dom(a.default.getIcon(i?"shrink":"fullsize")),s=e.toolbar.container.querySelector(".jodit_toolbar_btn-fullsize a");n.classList.add("jodit_icon"),s.innerHTML="",s.appendChild(n)}if(e.options.globalFullsize){for(var l=e.container.parentNode;l&&!(l instanceof Document);)l.classList.toggle("jodit_fullsize_box",i),l=l.parentNode;o()}e.events.fire("afterResize")};e.options.fullsize&&i(!0),e.options.globalFullsize&&e.__on(window,"resize",o),e.events.on("toggleFullsize",i),e.events.on("beforeDestruct",function(){i(!1)})}},function(e,t,o){"use strict";t.__esModule=!0,o(1).default.plugins.AutoFocus=function(e){var t;e.events.on("afterInit",function(){e.options.autofocus&&(t=setTimeout(e.selection.focus,300))}).on("beforeDestruct",function(){clearTimeout(t)})}},function(e,t,o){"use strict";t.__esModule=!0;var i=o(1),n=o(3),r=o(0),a=o(2);i.default.plugins.backspace=function(e){e.events.on("afterCommand",function(t){if("delete"===t){var o=e.selection.current();o&&o.firstChild&&"BR"===o.firstChild.tagName&&o.removeChild(o.firstChild),r.trim(e.editor.innerText)||e.editor.querySelector("img")||(e.editor.innerHTML="",e.selection.setCursorIn(e.editor))}}),e.events.on("keydown",function(t){if(t.which===n.KEY_BACKSPACE||t.keyCode===n.KEY_DELETE){if(!e.selection.isCollapsed())return e.execCommand("Delete"),!1;var o=e.win.getSelection(),i=!!o.rangeCount&&o.getRangeAt(0);if(i&&0!==i.startOffset&&i.startContainer.nodeType===Node.TEXT_NODE){for(var r=i.startContainer,s=r.nodeValue,l=i.startOffset;l>=0&&s[l-1]===n.INVISIBLE_SPACE;)l-=1;if(l!==i.startOffset){var d=i.startOffset;if(s=s.substr(0,l)+s.substr(d),r.nodeValue=s,s)return void i.setStart(r,l)}if(!r.previousSibling&&0===l){var c=a.default.prev(r,a.default.isBlock,e.editor);if(c){e.selection.setCursorIn(c,!1);var u=a.default.up(r,a.default.isBlock,e.editor);return u.innerHTML||u.parentNode.removeChild(u),!1}}}}})}},function(e,t,o){"use strict";t.__esModule=!0;var i=o(1),n=o(4),r=o(3),a=o(0),s=o(2);n.Config.prototype.cleanHTML={replaceNBSP:!0,cleanOnPaste:!0,allowTags:!1},i.default.plugins.cleanHTML=function(e){if(e.options.cleanHTML.cleanOnPaste&&e.events.on("processPaste",function(e,t){return a.cleanFromWord(t)}),e.options.cleanHTML.allowTags){var t=/([^\[]*)\[([^\]]+)]/,o=/[\s]*,[\s]*/,i=/^(.*)[\s]*=[\s]*(.*)$/,n={};"string"==typeof e.options.cleanHTML.allowTags?e.options.cleanHTML.allowTags.split(o).map(function(e){e=a.trim(e);var r=t.exec(e),s={},l=function(e){e=a.trim(e);var t=i.exec(e);t?s[t[1]]=t[2]:s[e]=!0};if(r){var d=r[2].split(o);r[1]&&(d.map(l),n[r[1].toUpperCase()]=s)}else n[e.toUpperCase()]=!0}):n=e.options.cleanHTML.allowTags,e.events.on("beforeSetElementValue",function(t){if(e.getMode()===r.MODE_WYSIWYG){var o=s.default.create("div","",e.doc),i=void 0,a=[],l=void 0,d=void 0;for(o.innerHTML=t.value,i=o.firstChild;i;){if(i.tagName){if(!n[i.tagName]){a.push(i),i=s.default.next(i,function(e){return!!e},o,!0);continue}if(!0!==n[i.tagName]&&i.attributes&&i.attributes.length){for(l=[],d=0;i.attributes.length>d;d+=1)(!n[i.tagName][i.attributes[d].name]||!0!==n[i.tagName][i.attributes[d].name]&&n[i.tagName][i.attributes[d].name]!==i.attributes[d].value)&&l.push(i.attributes[d].name);for(d=0;l.length>=d;d+=1)i.removeAttribute(l[d])}}i=s.default.next(i,function(e){return!!e},o,!0)}for(d=0;a.length>d;d+=1)a[d].parentNode&&a[d].parentNode.removeChild(a[d]);t.value=o.innerHTML}})}e.events.on("afterCommand",function(t){var o,i,n,a=e.selection;switch(t){case"insertHorizontalRule":(o=e.editor.querySelector("hr[id=null]"))&&(i=s.default.next(o,s.default.isBlock,e.editor,!1),i||(i=s.default.create(e.options.enter,"",e.doc),s.default.after(o,i)),a.setCursorIn(i));break;case"removeFormat":if(i=a.current(),n=function(t){return t.nodeType===Node.ELEMENT_NODE?(t.hasAttribute("style")&&t.removeAttribute("style"),"FONT"===t.tagName&&(s.default.each(t,n),t=s.default.replace(t,"span",!1,!1,e.doc)),t.normalize&&t.normalize()):e.options.cleanHTML.replaceNBSP&&t.nodeType===Node.TEXT_NODE&&t.nodeValue.match(r.SPACE_REG_EXP)&&(t.nodeValue=t.nodeValue.replace(r.SPACE_REG_EXP," ")),t},a.isCollapsed())for(;i&&i.nodeType!==Node.ELEMENT_NODE&&i!==e.editor;)i=n(i),i=i.parentNode;else e.win.getSelection().removeAllRanges()}})}},function(e,t,o){"use strict";t.__esModule=!0;var i=o(1),n=o(12),r=o(0),a=o(2);i.default.plugins.color=function(e){e.events.on("beforeCommand",function(t,o,i){if(/forecolor|background/.test(t)){var s=n.wrapAndSelect(e,a.default.create("span","",e.doc),"span|strong|i|em"),l=r.normalizeColor(i);switch(t){case"background":s.style.backgroundColor=l||"transparent";break;case"forecolor":s.style.color=l||"transparent"}return e.setEditorValue(),!1}})}},function(e,t,o){"use strict";t.__esModule=!0;var i=o(1),n=o(0),r=o(3),a=o(2);t.insertParagraph=function(e,t,o){o||(o=e.options.enter);var i=e.doc.createElement(o);return i.appendChild(e.doc.createTextNode(r.INVISIBLE_SPACE)),e.selection.insertNode(i,!1),e.selection.setCursorIn(i),t&&t.parentNode&&t.parentNode.removeChild(t),i},i.default.plugins.enter=function(e){e.events.on("keyup",function(){var t=e.selection.current();if(!1!==t){var o=a.default.up(t,function(t){return t.tagName===e.options.enter.toUpperCase()},e.editor);o&&a.default.all(o,function(o){o.nodeType===Node.TEXT_NODE&&r.INVISIBLE_SPACE_REG_EXP.test(o.nodeValue)&&0!==o.nodeValue.replace(r.INVISIBLE_SPACE_REG_EXP,"").length&&(o.nodeValue=o.nodeValue.replace(r.INVISIBLE_SPACE_REG_EXP,""),o===t&&e.selection.setCursorAfter(o))})}}),e.events.on("keydown",function(o){if(o.which===r.KEY_ENTER||o.keyCode===r.KEY_ENTER){e.selection.isCollapsed()||e.execCommand("Delete"),e.selection.focus();var i=e.selection.current(),s=e.win.getSelection(),l=s.rangeCount?s.getRangeAt(0):e.doc.createRange();i||(i=a.default.create("text",r.INVISIBLE_SPACE,e.doc),e.editor.appendChild(i),l.selectNode(i),s.removeAllRanges(),s.addRange(l));var d=void 0,c=!!i&&a.default.up(i,a.default.isBlock,e.editor);if(!c&&i&&(c=a.default.wrap(i,e.options.enter,e),s=e.win.getSelection(),l=s.rangeCount?s.getRangeAt(0):e.doc.createRange()),c){if(!a.default.canSplitBlock(c)){var u=e.doc.createElement("br");return e.selection.insertNode(u,!1),e.selection.setCursorAfter(u),!1}if("LI"===c.nodeName&&0===n.trim(c.textContent||c.innerText).length){var p=a.default.closest(c,"ol|ul",e.editor);if(a.default.prev(c,function(e){return e&&"LI"===e.tagName},p))if(a.default.next(c,function(e){return e&&"LI"===e.tagName},p)){var f=e.doc.createRange();f.setStartBefore(p),f.setEndAfter(c);var h=f.extractContents();p.parentNode.insertBefore(h,p),d=e.selection.setCursorBefore(p)}else d=e.selection.setCursorAfter(p);else d=e.selection.setCursorBefore(p);return c.parentNode.removeChild(c),t.insertParagraph(e,d),n.$$("li",p).length||p.parentNode.removeChild(p),!1}if(e.selection.cursorInTheEdge(!0))d=e.selection.setCursorBefore(c),t.insertParagraph(e,d,"LI"===c.nodeName?"li":e.options.enter),e.selection.setCursorIn(c,!0);else if(e.selection.cursorInTheEdge(!1))d=e.selection.setCursorAfter(c),t.insertParagraph(e,d,"LI"===c.nodeName?"li":e.options.enter);else{var f=e.doc.createRange();f.setStartBefore(c),f.setEnd(l.startContainer,l.startOffset);var h=f.extractContents();c.parentNode.insertBefore(h,c),e.selection.setCursorIn(c,!0)}}else t.insertParagraph(e);return!1}})}},function(e,t,o){"use strict";t.__esModule=!0;var i=o(1),n=o(4),r=o(0);n.Config.prototype.showMessageErrors=!0,n.Config.prototype.showMessageErrorTime=3e3,n.Config.prototype.showMessageErrorOffsetPx=3,i.default.plugins.errorMessages=function(e){if(e.options.showMessageErrors){var t,o=r.dom('
    '),i=function(){t=5,[].slice.call(o.childNodes).forEach(function(i){r.css(o,"bottom",t+"px"),t+=i.offsetWidth+e.options.showMessageErrorOffsetPx})};e.workplace.appendChild(o),e.events.on("errorMessage",function(t,n,a){var s=r.dom('
    '+t+"
    ");o.appendChild(s),i(),setTimeout(function(){s.classList.remove("active"),setTimeout(function(){o.removeChild(s),i()},300)},a||e.options.showMessageErrorTime)})}}},function(e,t,o){"use strict";t.__esModule=!0;var i=o(1),n=o(12),r=o(0),a=o(2);i.default.plugins.font=function(e){e.events.on("beforeCommand",function(t,o,i){if(/font/.test(t)){var s=n.wrapAndSelect(e,a.default.create("span","",e.doc),"span|strong|i|em");switch(t){case"fontsize":s.style.fontSize=r.normalizeSize(i);break;case"fontname":s.style.fontFamily=i}return e.setEditorValue(),!1}})}},function(e,t,o){"use strict";t.__esModule=!0;var i=o(1),n=o(2);i.default.plugins.formatblock=function(e){e.events.on("beforeCommand",function(t,o,i){if("formatblock"===t){e.selection.focus();var r=e.selection.save();return e.selection.eachSelection(function(t){var o=!!t&&n.default.up(t,n.default.isBlock,e.editor);if(!o&&t&&(o=n.default.wrap(t,e.options.enter,e)),!o)return!1;n.default.replace(o,i,!0,!1,e.doc)}),e.selection.restore(r),e.setEditorValue(),!1}})}},function(e,t,o){"use strict";t.__esModule=!0,o(1).default.plugins.imageInlineToolbar=function(e){e.events.on("click",function(e){e.target&&"IMG"===e.target.tagName&&alert(1)})}},function(e,t,o){"use strict";t.__esModule=!0;var i=o(1),n=o(0);i.default.plugins.imageProcessor=function(e){var t,o=function(o){e.__off(o,".imageProcessor").__on(o,"dragstart.imageProcessor",function(e){t=o,e.preventDefault()}).__on(o,"mousedown.imageProcessor",function(){t=o})};e.__on(e.editor,"mousemove",n.throttle(function(o){t&&e.selection.insertCursorAtPoint(o.clientX,o.clientY)},e.options.observer.timeout)).__on(window,"mouseup",function(){t=!1}).__on(e.editor,"mouseup",function(o){var i,n=t;if(n&&o.target!==n){if(!1===e.selection.insertCursorAtPoint(o.clientX,o.clientY))return!1;i=n.parentNode&&"A"===n.parentNode.tagName&&!n.parentNode.textContent.length?n.parentNode:n,i.parentNode.removeChild(i),e.selection.insertImage(i),e.selection.select(i)}}),e.events.on("change afterInit",n.debounce(function(){n.$$("img",e.editor).forEach(function(e){e.__jodit_imageprocessor_binded||(e.__jodit_imageprocessor_binded=!0,o(e))})},e.options.observer.timeout))}},function(e,t,o){"use strict";t.__esModule=!0;var i=o(1),n=o(4),r=o(0),a=o(7),s=o(6),l=o(2),d=o(9),c=d.Widget.TabsWidget,u=d.Widget.ImageSelectorWidget;n.Config.prototype.image={openOnDblClick:!0,editSrc:!0,useImageEditor:!0,editTitle:!0,editAlt:!0,editLink:!0,editSize:!0,editMargins:!0,editClass:!0,editStyle:!0,editId:!0,editAlign:!0,showPreview:!0,selectImageAfterClose:!0},i.default.plugins.imageProperties=function(e){var t=function(t){var o,n=this,d=new a.default(e),p=r.dom(''+s.default.getIcon("cancel")+""+e.i18n("Cancel")+""),f=r.dom(''+s.default.getIcon("check")+""+e.i18n("Ok")+""),h={remove:r.dom(''+s.default.getIcon("bin")+" "+e.i18n("Delete")+"")},g=r.dom('
    '),v=r.dom('
    "),m=r.dom('
    '+(e.options.filebrowser.ajax.url||e.options.uploader.url?'
    '+(e.options.filebrowser.ajax.url||e.options.uploader.url?''+s.default.getIcon("image")+"":"")+(e.options.image.useImageEditor&&void 0!==i.default.modules.ImageEditor&&e.options.filebrowser.ajax.url?''+s.default.getIcon("crop")+"":"")+"
    ":"")+'
    '+e.i18n("Open link in new tab")+"
    "),_=n.naturalWidth/n.naturalHeight||1,b=g.querySelector("#imageWidth"),y=g.querySelector("#imageHeight"),w=function(){n.style.cssFloat&&-1!==["left","right"].indexOf(n.style.cssFloat.toLowerCase())?r.val(g,"#align",r.css(n,"float")):"block"===r.css(n,"display")&&"auto"===n.style.marginLeft&&"auto"===n.style.marginRight&&r.val(g,"#align","center")},q=function(){r.val(g,"#id",n.getAttribute("id"))},x=function(){r.val(g,"#style",n.getAttribute("style"))},E=function(){r.val(g,"#classes",(n.getAttribute("class")||"").replace(/jodit_focused_image[\s]*/,""))},C=function(){if(e.options.image.editMargins){var t=!1;r.$$(".margins",g).forEach(function(e){var o=n.style[e.id];o&&((/^[0-9]+$/.test(o)||/^[0-9]+px$/i.test(o))&&(o=parseInt(o,10)),e.value=""+o||"",t||"marginTop"===e.id||e.value===r.val(g,"#marginTop")||(g.querySelector(".jodit_lock_margin").innerHTML=s.default.getIcon("unlock"),r.$$(".margins",g).forEach(function(e){return e.classList.remove("disabled")}),t=!0))})}},T=function(){b.value=""+n.offsetWidth,y.value=""+n.offsetHeight},A=function(){n.hasAttribute("title")&&r.val(g,"#imageTitle",n.getAttribute("title")),n.hasAttribute("alt")&&r.val(g,"#imageAlt",n.getAttribute("alt")),l.default.closest(n,"a",e.editor)&&(r.val(g,"#imageLink",l.default.closest(n,"a",e.editor).getAttribute("href")),g.querySelector("#imageLinkOpenInNewTab").checked="_blank"===l.default.closest(n,"a",e.editor).getAttribute("target"))},z=function(){r.val(g,"#imageSrc",n.getAttribute("src")),g.querySelector("#imageViewSrc").setAttribute("src",n.getAttribute("src"))},L=function(){z(),A(),T(),C(),E(),q(),w(),x()},j=!0,S=!0,k={};return k[e.i18n("Image")]=m,k[e.i18n("Advansed")]=v,g.querySelector("#tabsbox").appendChild(c(e,k)),L(),e.events.on(d,"afterClose",function(){d.destruct(),n.parentNode&&e.options.image.selectImageAfterClose&&e.selection.select(n)}),h.remove.addEventListener("click",function(){n.parentNode.removeChild(n),d.close()}),r.$$(".jodit_use_image_editor",m).forEach(function(t){t.addEventListener("mousedown",function(){if(e.options.image.useImageEditor){var t=n.getAttribute("src"),o=document.createElement("a"),i=function(){if(o.host!==location.host)return void a.Confirm(e.i18n("You can only edit your own images. Download this image on the host?"),function(t){t&&e.uploader&&e.uploader.uploadRemoteImage(""+o.href,function(t){a.Alert(e.i18n("The image has been successfully uploaded to the host!"),function(){"string"==typeof t.newfilename&&(n.setAttribute("src",t.baseurl+t.newfilename),z())})},function(t){a.Alert(e.i18n("There was an error loading %s",t.message))})})};o.href=t,e.getInstance("FileBrowser").getPathByUrl(""+o.href,function(i,r,s){e.getInstance("FileBrowser").openImageEditor(o.href,r,i,s,function(){var e=(new Date).getTime();n.setAttribute("src",t+(-1!==t.indexOf("?")?"":"?")+"&_tmp="+e),z()},a.Alert)},function(e){a.Alert(e,i)})}})}),r.$$(".jodit_rechange",m).forEach(function(t){t.addEventListener("mousedown",function(o){t.classList.toggle("active"),e.toolbar.openPopup(t,u(e,{upload:function(t){t.files&&t.files.length&&n.setAttribute("src",t.baseurl+t.files[0]),L(),e.toolbar.closeAll()},filebrowser:function(t){t&&t.files&&Array.isArray(t.files)&&t.files.length&&(n.setAttribute("src",t.files[0]),e.toolbar.closeAll(),L())}},n),!0),o.stopPropagation()})}),g.querySelector(".jodit_lock_helper.jodit_lock_size").addEventListener("click",function(){j=!j,this.innerHTML=s.default.getIcon(j?"lock":"unlock"),e.__fire(b,"change")}),g.querySelector(".jodit_lock_helper.jodit_lock_margin").addEventListener("click",function(){S=!S,this.innerHTML=s.default.getIcon(S?"lock":"unlock"),S?r.$$(".margins",g).forEach(function(e){e.matches("#marginTop")||e.setAttribute("disabled","true")}):r.$$(".margins",g).forEach(function(e){e.matches("#marginTop")||e.removeAttribute("disabled")})}),e.__on(r.$$("#imageWidth,#imageHeight",g),"change keydown mousedown paste",function(e){j&&(clearTimeout(o),o=setTimeout(function(){var t=parseInt(b.value,10),o=parseInt(y.value,10);"imageWidth"===e.target.getAttribute("id")?y.value=""+Math.round(t/_):b.value=""+Math.round(o*_)},100))}),d.setTitle([e.i18n("Image properties"),h.remove]),d.setContent(g),p.addEventListener("click",function(){d.close()}),f.addEventListener("click",function(){var t;if(e.options.image.editStyle&&(r.val(g,"#style")?n.setAttribute("style",r.val(g,"#style")):n.removeAttribute("style")),!r.val(g,"#imageSrc"))return n.parentNode.removeChild(n),void d.close();n.setAttribute("src",r.val(g,"#imageSrc")),r.val(g,"#imageTitle")?n.setAttribute("title",r.val(g,"#imageTitle")):n.removeAttribute("title"),r.val(g,"#imageAlt")?n.setAttribute("alt",r.val(g,"#imageAlt")):n.removeAttribute("alt"),r.val(g,"#imageLink")?(l.default.closest(n,"a",e.editor)||l.default.wrap(n,"a",e),t=l.default.closest(n,"a",e.editor),t.setAttribute("href",r.val(g,"#imageLink")),g.querySelector("#imageLinkOpenInNewTab").checked?t.setAttribute("target","_blank"):t.removeAttribute("target")):l.default.closest(n,"a",e.editor)&&(t=l.default.closest(n,"a",e.editor),t.parentNode.replaceChild(n,t));var o=function(e){return e=r.trim(e),/^[0-9]+$/.test(e)?e+"px":e};r.css(n,{width:r.trim(b.value)?o(b.value):null,height:r.trim(y.value)?o(y.value):null}),e.options.image.editMargins&&(g.querySelector(".jodit_lock_margin").firstChild.classList.contains("jodit_icon_unlock")?r.$$(".margins",g).forEach(function(){r.css(n,this.id,o(this.value))}):r.css(n,"margin",o(r.val(g,"#marginTop")))),e.options.image.editClass&&(r.val(g,"#classes")?n.setAttribute("class",r.val(g,"#classes")):n.removeAttribute("class")),e.options.image.editId&&(r.val(g,"#id")?n.setAttribute("id",r.val(g,"#id")):n.removeAttribute("id"));var i=function(){"block"===r.css(n,"display")&&r.css(n,"display",""),"auto"===n.style.marginLeft&&"auto"===n.style.marginRight&&(n.style.marginLeft="",n.style.marginRight="")};e.options.image.editAlign&&(r.val(g,"#align")?-1!==["right","left"].indexOf(r.val(g,"#align").toLowerCase())?(r.css(n,"float",r.val(g,"#align")),i()):(r.css(n,"float",""),r.css(n,{display:"block","margin-left":"auto","margin-right":"auto"})):(r.css(n,"float")&&-1!==["right","left"].indexOf(r.css(n,"float").toLowerCase())&&r.css(n,"float",""),i())),n.getAttribute("style")||n.removeAttribute("style"),d.close()}),d.setFooter([f,p]),d.setSize(500),d.open(),t&&t.preventDefault(),!1};e.options.image.openOnDblClick?e.__on(e.editor,"dblclick","img",t):e.__on(e.editor,"dblclick","img",function(){e.selection.select(this)}),e.events.on(e,"openImageProperties",function(e){t.call(e)})}},function(e,t,o){"use strict";t.__esModule=!0;var i=o(1),n=o(6),r=o(4),a=o(0),s=o(2),l=o(8),d=o(9),c=d.Widget.ColorPickerWidget,u=d.Widget.TabsWidget;r.Config.prototype.popup={img:[{name:"bin",tooltip:"Delete",exec:function(e,t){t.parentNode.removeChild(t)}},{name:"pencil",exec:function(e,t){"img"===t.tagName.toLowerCase()&&e.events.fire(e,"openImageProperties",[t])},tooltip:"Edit"},{name:"valign",list:["Top","Middle","Bottom"],tooltip:"Vertical align",exec:function(e,t,o){if("img"===t.tagName.toLowerCase()){var i=o.args[1].toLowerCase();a.css(t,"vertical-align",i)}}},{name:"left",list:["Left","Right","Center","Normal"],exec:function(e,t,o){if("img"===t.tagName.toLowerCase()){var i=function(){"block"===a.css(t,"display")&&a.css(t,"display",""),"auto"===t.style.marginLeft&&"auto"===t.style.marginRight&&(t.style.marginLeft="",t.style.marginRight="")},n=o.args[1].toLowerCase();"normal"!==n?-1!==["right","left"].indexOf(n)?(a.css(t,"float",n),i()):(a.css(t,"float",""),a.css(t,{display:"block","margin-left":"auto","margin-right":"auto"})):(a.css(t,"float")&&-1!==["right","left"].indexOf(a.css(t,"float").toLowerCase())&&a.css(t,"float",""),i())}},tooltip:"Horizontal align"}],table:[{name:"brush",popup:function(e,t,o,i){var n,r,s,d,p=l.default.getAllSelectedCells(t);return!!p.length&&(s=a.css(p[0],"color"),d=a.css(p[0],"background-color"),n=c(e,function(e){p.forEach(function(t){a.css(t,"background-color",e)}),i()},d),r=c(e,function(e){p.forEach(function(t){a.css(t,"color",e)}),i()},s),u(e,{Background:n,Text:r}))},tooltip:"Background"},{name:"valign",list:["Top","Middle","Bottom"],exec:function(e,t,o){var i=o.args[1].toLowerCase();l.default.getAllSelectedCells(t).forEach(function(e){a.css(e,"vertical-align",i)})},tooltip:"Vertical align"},{name:"splitv",command:"tablesplitv",tooltip:"Split vertical"},{name:"splitg",command:"tablesplitg",tooltip:"Split horizontal"},"\n",{name:"merge",command:"tablemerge",tooltip:"Merge"},{name:"addcolumn",list:{tableaddcolumnbefore:"Insert column before",tableaddcolumnafter:"Insert column after"},exec:function(e,t,o){e.execCommand(o.args[0].toLowerCase(),!1,t)},tooltip:"Add column"},{name:"addrow",list:{tableaddrowbefore:"Insert row above",tableaddrowafter:"Insert row below"},exec:function(e,t,o){e.execCommand(o.args[0].toLowerCase(),!1,t)},tooltip:"Add row"},{name:"bin",list:{tablebin:"Delete table",tablebinrow:"Delete row",tablebincolumn:"Delete column",tableempty:"Empty cell"},exec:function(e,t,o){e.execCommand(o.args[0].toLowerCase(),!1,t)},tooltip:"Delete"}]},i.default.plugins.Popup=function(e){var t,o=new n.default(e),i=a.dom('
    '),r=function(){i.classList.remove("active")},l=function(t,n,r){var s=t.tagName.toLowerCase();void 0!==e.options.popup[s]&&(i.innerHTML="",o.build(e.options.popup[s],i,t),i.classList.add("active"),a.css(i,{left:n+"px",top:r+"px",marginLeft:-Math.round(i.offsetWidth/2)+"px"}))},d=function(o,i,n){clearTimeout(t),e.options.observer.timeout?t=setTimeout(l.bind(e,o,i,n),e.options.observer.timeout):l(o,i,n)};e.container.appendChild(i),e.events.on("hidePopup afterCommand keydown",r),e.events.on("showPopap",d),e.events.on("beforeDestruct",function(){clearTimeout(t)}),e.__on(i,"mouseup",function(e){e.stopPropagation()});var c=!1;e.__on(e.editor,"mousedown",function(t){if("IMG"===t.target.tagName||s.default.closest(t.target,"table",e.editor)){var o="IMG"===t.target.tagName?t.target:s.default.closest(t.target,"table",e.editor),i=a.offset(o);d(o,Math.round(i.left+o.offsetWidth/2),Math.round(i.top+o.offsetHeight)),c=!0}else c=!1}),e.__on(window,"mouseup",function(e){c||r(),c=!1})}},function(e,t,o){"use strict";t.__esModule=!0;var i=o(1),n=o(0),r=o(2);i.default.plugins.justify=function(e){e.events.on("beforeCommand",function(t){if(/justify/.test(t)){var o=function(e){if(e instanceof HTMLElement)switch(t){case"justifyfull":e.style.textAlign="justify";break;case"justifyright":e.style.textAlign="right";break;case"justifyleft":e.style.textAlign="left";break;case"justifycenter":e.style.textAlign="center"}};return e.selection.focus(),e.selection.eachSelection(function(t){if(!t&&e.editor.querySelector(".jodit_selected_cell"))return n.$$(".jodit_selected_cell",e.editor).forEach(o),!1;if(t instanceof Node){var i=!!t&&r.default.up(t,r.default.isBlock,e.editor);!i&&t&&(i=r.default.wrap(t,e.options.enter,e)),o(i)}}),!1}})}},function(e,t,o){"use strict";t.__esModule=!0;var i=o(1),n=o(4),r=o(0),a=o(2);n.Config.prototype.link={processVideoLink:!0,processPastedLink:!0,openLinkDialogAfterPost:!0,removeLinkAfterFormat:!0},i.default.plugins.link=function(e){e.options.link.processPastedLink&&e.events.on("processPaste",function(t,o){if(r.isURL(o)){var i=void 0;return r.convertMediaURLToVideoEmbed(o)!==o?i=r.convertMediaURLToVideoEmbed(o):(i=e.doc.createElement("a"),i.setAttribute("href",o),i.innerText=o,e.options.link.openLinkDialogAfterPost&&setTimeout(function(){},100)),i}}),e.options.link.removeLinkAfterFormat&&e.events.on("afterCommand",function(t){var o,i,n=e.selection;"removeFormat"===t&&(i=n.current(),i&&"A"!==i.tagName&&(i=a.default.closest(i,"A",e.editor)),i&&"A"===i.tagName&&(o=i.innerHTML===i.innerText?a.default.create("text",i.innerText,e.doc):a.default.create("span",i.innerHTML,e.doc),i.parentNode.replaceChild(o,i),e.selection.setCursorIn(o,!0)))})}},function(e,t,o){"use strict";t.__esModule=!0;var i=o(1),n=o(2);i.default.plugins.orderedlist=function(e){e.events.on("afterCommand",function(t){if(/insert(un)?orderedlist/i.test(t)){var o=n.default.up(e.selection.current(),function(e){return/^UL|OL$/i.test(e.tagName)},e.editor);if(o&&o.parentNode&&"P"===o.parentNode.tagName){var i=e.selection.save();n.default.unwrap(o.parentNode),[].slice.call(o.childNodes).forEach(function(e){e.lastChild&&e.lastChild.nodeType===Node.ELEMENT_NODE&&"BR"===e.lastChild.tagName&&e.removeChild(e.lastChild)}),e.selection.restore(i)}e.setEditorValue()}})}},function(e,t,o){"use strict";t.__esModule=!0;var i=o(1),n=o(7),r=o(0),a=o(4),s=o(3);a.Config.prototype.askBeforePasteHTML=!0,i.default.plugins.paste=function(e){e.editor.addEventListener("paste",function(t){if(!1===e.events.fire("beforePaste",[t]))return t.preventDefault(),!1;if(t&&t.clipboardData&&t.clipboardData.getData){var o=void 0,i=t.clipboardData.types,n="",a="";if(Array.isArray(i))for(o=0;i.length>o;o+=1)n+=i[o]+";";else n=i;/text\/html/.test(n)?a=t.clipboardData.getData("text/html"):/text\/rtf/.test(n)&&r.browser("safari")?a=t.clipboardData.getData("text/rtf"):/text\/plain/.test(n)&&!r.browser("mozilla")&&(a=r.htmlentities(t.clipboardData.getData(s.TEXT_PLAIN)).replace(/\n/g,"
    ")),(""!==a||a instanceof Node)&&(a=e.events.fire("processPaste",[t,a]),("string"==typeof a||a instanceof Node)&&e.selection.insertHTML(a),t.preventDefault(),t.stopPropagation())}return!1!==e.events.fire("afterPaste",[t])&&void 0}),e.options.askBeforePasteHTML&&e.events.on("beforePaste",function(t){if(t&&t.clipboardData&&t.clipboardData.getData&&t.clipboardData.types[0]===s.TEXT_PLAIN){var o=t.clipboardData.getData(s.TEXT_PLAIN);if(r.isHTML(o))return n.Confirm(e.i18n("Your code is similar to HTML. Paste as HTML?"),e.i18n("Paste as HTML"),function(t){e.selection.insertHTML(t?o:r.htmlspecialchars(o)),e.setEditorValue()}),!1}})}},function(e,t,o){"use strict";t.__esModule=!0;var i=o(1),n=o(4),r=o(3),a=o(0);n.Config.prototype.showPlaceholder=!0,n.Config.prototype.useInputsPlaceholder=!0,n.Config.prototype.placeholder="Type something",i.default.plugins.placeholder=function(e){var t,o;if(e.options.showPlaceholder){this.destruct=function(){t.parentNode.removeChild(t),clearTimeout(o)};var i=function(){var o=0,i=0,n=e.win.getComputedStyle(e.editor);if(e.editor.firstChild&&e.editor.firstChild.nodeType===Node.ELEMENT_NODE){var r=e.win.getComputedStyle(e.editor.firstChild);o=parseInt(r.getPropertyValue("margin-top"),10),i=parseInt(r.getPropertyValue("margin-left"),10),t.style.fontSize=parseInt(r.getPropertyValue("font-size"),10)+"px",t.style.lineHeight=r.getPropertyValue("line-height")}else t.style.fontSize=parseInt(n.getPropertyValue("font-size"),10)+"px",t.style.lineHeight=n.getPropertyValue("line-height");a.each({display:"block",marginTop:Math.max(parseInt(n.getPropertyValue("margin-top"),10),o),marginLeft:Math.max(parseInt(n.getPropertyValue("margin-left"),10),i)},function(e,o){t.style[e]=o})},n=function(){t.style.display="none"},s=function(){if(e.editor)return e.getMode()!==r.MODE_WYSIWYG?n():void(e.getEditorValue()?n():i())};t=a.dom(''+e.i18n(e.options.placeholder)+""),e.options.useInputsPlaceholder&&e.element.hasAttribute("placeholder")&&(t.innerHTML=e.element.getAttribute("placeholder")),e.workplace.appendChild(t),i(),e.events.on("change keyup mouseup keydown mousedown afterSetMode",function(){s(),o=setTimeout(s,1)})}}},function(e,t,o){"use strict";t.__esModule=!0;var i=o(1),n=o(14),r=o(3),a=o(0);i.default.plugins.redoundo=function(e){var t=function(){e.events.fire("canRedo",[o.stack.canRedo()]),e.events.fire("canUndo",[o.stack.canUndo()])};e.events.on("keydown",function(t){if(a.ctrlKey(t)&&(t.which===r.KEY_Z||t.which===r.KEY_Y))return e.execCommand(t.which===r.KEY_Z?"Undo":"Redo"),t.preventDefault(),t.stopImmediatePropagation(),!1},null,!0);var o=new n.default(e);e.events.on("afterSetMode",function(){e.getMode()===r.MODE_WYSIWYG&&t()}),e.events.on("beforeCommand",function(i){if("redo"===i||"undo"===i)return e.getMode()===r.MODE_WYSIWYG&&(o.stack["can"+i.substr(0,1).toUpperCase()+i.substr(1)]()&&o.stack[i](),t()),!1}),this.destruct=function(){o.destruct()}}},function(e,t){},function(e,t,o){"use strict";t.__esModule=!0;var i=o(1),n=o(4),r=o(0),a=o(2);n.Config.prototype.useIframeResizer=!0,n.Config.prototype.useTableResizer=!0,n.Config.prototype.useImageResizer=!0,n.Config.prototype.resizer={min_width:10,min_height:10},i.default.plugins.Resizer=function(e){var t,o,i,n,s,l,d,c,u,p,f,h=!1,g=!1,v=r.dom(''),m=function(){h=!1,g=!1,o=null,v.style.display="none"},_=function(){if(g){var t=r.offset(o);v.style.top=t.top-1+"px",v.style.left=t.left-1+"px",v.style.width=o.offsetWidth+"px",v.style.height=o.offsetHeight+"px",e.events.fire(o,"changesize")}},b=function(){g=!0,v.style.display="block",_()},y=function(t){var i;if("IFRAME"===t.tagName)if(t.parentNode&&t.parentNode.classList.contains("jodit_iframe_wrapper"))t=t.parentNode;else{i=r.dom('
    '),i.style.display="inline-block"===t.style.display?"inline-block":"block",i.style.width=t.offsetWidth+"px",i.style.height=t.offsetHeight+"px",a.default.wrap(t,i,e);var n=t;e.events.on(i,"changesize",function(){n.setAttribute("width",i.offsetWidth+"px"),n.setAttribute("height",i.offsetHeight+"px")}),t=i}e.__on(t,"dragstart",m).__on(t,"click",function(){o=t,b(),"IMG"!==o.tagName||o.complete||o.addEventListener("load",function e(){_(),o.removeEventListener("load",e)})})};r.$$("i",v).forEach(function(r){e.__on(r,"mousedown",function(e){if(!o||!o.parentNode)return m(),!1;t=r,e.preventDefault(),e.stopImmediatePropagation(),s=o.offsetWidth,l=o.offsetHeight,d=s/l,h=!0,i=e.clientX,n=e.clientY})}),e.__on(e.win,"mousemove.jodit-resizer"+e.id,function(r){h&&(p=r.clientX-i,f=r.clientY-n,"IMG"===o.tagName?p?(u=s+(t.className.match(/left/)?-1:1)*p,c=Math.round(u/d)):(c=l+(t.className.match(/top/)?-1:1)*f,u=Math.round(c*d)):(u=s+(t.className.match(/left/)?-1:1)*p,c=l+(t.className.match(/top/)?-1:1)*f),u>e.options.resizer.min_width&&(o.style.width=v.parentNode.offsetWidth>u?u+"px":"100%"),c>e.options.resizer.min_height&&(o.style.height=c+"px"),_(),r.stopImmediatePropagation())}).__on(e.win,"resize.jodit-resizer"+e.id+" updateresizer.jodit-resizer",function(){g&&_()}).__on(e.win,"mouseup.jodit-resizer"+e.id+" keydown.jodit-resizer",function(e){g&&(h?(h=!1,e.stopImmediatePropagation()):m())}),e.__on(e.editor,"scroll.jodit-resizer"+e.id,function(){g&&m()}),e.events.on("change afterInit afterSetMode",function(){!g||o&&o.parentNode||m(),r.$$("img, table, iframe",e.editor).forEach(function(t){(!t.__jodit_resizer_binded&&"IFRAME"===t.tagName&&e.options.useIframeResizer||"IMG"===t.tagName&&e.options.useImageResizer||"TABLE"===t.tagName&&e.options.useTableResizer)&&(t.__jodit_resizer_binded=!0,y(t))})}),e.container.appendChild(v)}},function(e,t,o){"use strict";t.__esModule=!0;var i=o(1),n=o(4),r=o(3),a=o(0);n.Config.prototype.useAceEditor=!0,n.Config.prototype.sourceEditorNativeOptions={theme:"ace/theme/textmate",mode:"ace/mode/html",highlightActiveLine:!0},n.Config.prototype.sourceEditorCDNUrlsJS=["//cdnjs.cloudflare.com/ajax/libs/ace/1.2.6/ace.js","//cdnjs.cloudflare.com/ajax/libs/ace/1.2.6/ext-emmet.js","//cdnjs.cloudflare.com/ajax/libs/js-beautify/1.6.12/beautify.min.js","//cdnjs.cloudflare.com/ajax/libs/js-beautify/1.6.12/beautify-html.min.js"],i.default.plugins.source=function(e){var t=a.dom('
    '),o=a.dom('\n \'\n '"),r={},a=e.selection.save(),s=function(t){e.selection.restore(a),e.selection.insertHTML(t)};return r[o(6).default.getIcon("link")+" "+e.i18n("Link")]=t,r[o(6).default.getIcon("source")+" "+e.i18n("Code")]=i,i.addEventListener("submit",function(e){return e.preventDefault(),n.trim(n.val(i,"textarea[name=code]"))?(s(n.val(i,"textarea[name=code]")),!1):(i.querySelector("textarea[name=code]").focus(),i.querySelector("textarea[name=code]").classList.add("jodit_error"),!1)}),t.addEventListener("submit",function(e){return e.preventDefault(),n.isURL(n.val(t,"input[name=code]"))?(s(n.convertMediaURLToVideoEmbed(n.val(t,"input[name=code]"))),!1):(t.querySelector("input[name=code]").focus(),t.querySelector("input[name=code]").classList.add("jodit_error"),!1)}),l(e,r)},tags:["iframe"],tooltip:"Insert youtube/vimeo video"},fontsize:{command:"fontSize",list:["8","9","10","11","12","14","18","24","30","36","48","60","72","96"],template:function(e,t,o){return o},tooltip:"Font size"},font:{command:"fontname",exec:function(e,t,o){e.execCommand(o.command,!1,o.args[0])},list:{"Helvetica,sans-serif":"Helvetica","Arial,Helvetica,sans-serif":"Arial","Georgia,serif":"Georgia","Impact,Charcoal,sans-serif":"Impact","Tahoma,Geneva,sans-serif":"Tahoma","'Times New Roman',Times,serif":"Times New Roman","Verdana,Geneva,sans-serif":"Verdana"},template:function(e,t,o){return''+o+""},tooltip:"Font family"},paragraph:{command:"formatBlock",exec:function(e,t,o){e.execCommand(o.command,!1,o.args[0])},list:{p:"Normal",h1:"Heading 1",h2:"Heading 2",h3:"Heading 3",h4:"Heading 4",blockquote:"Quote",pre:"Code"},template:function(e,t,o){return"<"+t+' class="jodit_list_element">'+e.i18n(o)+""},tooltip:"Insert format block"},table:{cols:10,popup:function(e,t,o,i){var r,a,s,l,d=1,c=1,u=o.cols,p=n.dom('
    '),f=p.querySelectorAll("span")[0],h=p.querySelectorAll("span")[1],g=[],v=function(e){var t=(e+1)*u;if(g.length>t){for(r=t;g.length>r;r+=1)p.removeChild(g[r]),delete g[r];g.length=t}for(r=0;t>r;r+=1)g[r]||(l=document.createElement("div"),l.setAttribute("data-index",""+r),g.push(l));g.forEach(function(e){p.appendChild(e)}),p.style.width=g[0].offsetWidth*u+"px"};v(1),g[0].className="hovered";var m=function(e,t){var o=e.target;if("DIV"===o.tagName){if(s=isNaN(t)?parseInt(o.getAttribute("data-index"),10):t,d=Math.ceil((s+1)/u),c=s%u+1,v(d),c===u||u-1>c&&u>10)return u=c===u?u+1:u-1,m(e,c+(d-1)*u-1);for(r=0;g.length>r;r+=1)g[r].className=r%u+1>c||d=r;r+=1){for(l=e.doc.createElement("tr"),a=1;c>=a;a+=1)p=e.doc.createElement("td"),p.style.width=g+"%",n||(n=p),f=e.doc.createElement("br"),p.appendChild(f),l.appendChild(e.doc.createTextNode("\n")),l.appendChild(e.doc.createTextNode("\t")),l.appendChild(p);h.appendChild(e.doc.createTextNode("\n")),h.appendChild(l)}e.selection.insertNode(e.doc.createTextNode("\n")),e.selection.insertNode(h),e.selection.setCursorIn(n),i()}}),p},tags:["table"],tooltip:"Insert table"},source:{mode:i.MODE_SPLIT,exec:function(e){e.toggleMode()},tooltip:"Change mode"}},this.events={},this.textIcons=!0}return e}()},function(e,t,o){"use strict";t.__esModule=!0,t.default=function(){function e(e){this.__scope=[],this.__scopeNamespace={},this.classSeparator=/[\s]+/,this.parent=e,this.doc=document,this.win=window,e&&e.components&&e.components.push(this)}return e.prototype.__fire=function(e,t){var o=this.doc.createEvent("HTMLEvents");o.initEvent(t,!0,!0),e.dispatchEvent(o)},e.prototype.__off=function(e,t){if(void 0===e&&(e=!1),void 0===t&&(t=!1),t&&/^\./.test(t)){var o=t.replace(/^\./,"");return this.__scopeNamespace[o]&&this.__scopeNamespace[o].forEach(function(t){(Array.isArray(e)?e:[e]).forEach(function(e){t.element&&t.element.removeEventListener&&(!1===e||e===t.element)&&t.element.removeEventListener(t.event,t.callback)})}),this}return this.__scope.forEach(function(o){(Array.isArray(e)?e:[e]).forEach(function(e){!o.element||!o.element.removeEventListener||!1!==e&&e!==o.element||!1!==t&&t!==o.event||o.element.removeEventListener(o.event,o.callback)})}),this},e.prototype.__on=function(e,t,o,i){var n=this;"function"==typeof o&&(i=o,o=!1);var r=t?t.split(this.classSeparator):[],a=i;return r.forEach(function(t){var r="";/\./.test(t)&&(l=t.split("."),t=l[0],r=l[1]),o&&(a=function(e){for(var t=e.target;t&&t!==this;){if(t.matches(o)){if(!1===i.call(t,e))return e.preventDefault(),!1;return}t=t.parentNode}}),(Array.isArray(e)?e:[e]).forEach(function(e){e.addEventListener(t,a,!1)});var s={element:e,event:t,callback:a};void 0===n.__scopeNamespace[r]&&(n.__scopeNamespace[r]=[]),n.__scopeNamespace[r].push(s),n.__scope.push(s);var l}),this},e.prototype.destruct=function(){this.__off()},e}()},function(e,t,o){"use strict";var i=this&&this.__extends||function(){var e=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])};return function(t,o){function i(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(i.prototype=o.prototype,new i)}}();t.__esModule=!0;var n=o(5),r=o(0),a=o(3),s=o(2);t.default=function(e){function t(t){var o=e.call(this,t)||this;return o.__popapOpened=!1,o.__listOpened=!1,o.closeAll=function(){o.list.innerHTML="",o.popup.innerHTML="",o.popup.style.display="none",o.list.style.display="none",r.$$(".jodit_dropdown_open, .jodit_popap_open",o.container).forEach(function(e){e.classList.remove("jodit_dropdown_open","jodit_popap_open")}),o.__popapOpened&&o.parent.selection&&o.parent.selection.clear(),o.__popapOpened=!1,o.__listOpened=!1},o.defaultControl={template:function(e,t,i){return o.parent.i18n(i)}},o.buttonList=[],o.initEvents=function(){o.popup.addEventListener("mousedown",function(e){e.stopPropagation()}),o.list.addEventListener("mousedown",function(e){e.stopPropagation()}),o.__on(window,"mousedown",function(){(o.__popapOpened||o.__listOpened)&&o.closeAll()}),o.parent.events.on("mousedown keydown change afterSetMode",function(){var e=function(){o.parent.selection&&o.checkActiveButtons(o.parent.selection.current())};o.parent.options.observer.timeout?setTimeout(e,o.parent.options.observer.timeout):e()})},o.container=r.dom('
    '),o.popup=r.dom('
    '),o.list=r.dom('
      '),o.initEvents(),o}return i(t,e),t.getIcon=function(e,o){return void 0===o&&(o=""),void 0!==t.icons[e]?t.icons[e]:o},t.prototype.openPopup=function(e,t,o){void 0===o&&(o=!1),this.closeAll(),t&&(e.classList.add("jodit_popup_open"),e.appendChild(this.popup),this.__popapOpened=!0,this.popup.innerHTML="",this.popup.appendChild(t),this.popup.style.display="block",this.popup.classList.toggle("jodit_right",o))},t.prototype.openList=function(e){e.classList.add("jodit_dropdown_open"),this.closeAll(),this.__listOpened=!0,this.list.style.display="block"},t.__toggleButton=function(e,t){e.classList.toggle("jodit_disabled",!t),t?e.hasAttribute("disabled")&&e.removeAttribute("disabled"):e.hasAttribute("disabled")||e.setAttribute("disabled","disabled")},t.prototype.checkActiveButtons=function(e){var o=this;this.buttonList.forEach(function(i){var n=i.control,r=i.btn;r.classList.remove("jodit_active");var l=void 0===n||void 0===n.mode?a.MODE_WYSIWYG:n.mode;if(t.__toggleButton(r,l===a.MODE_SPLIT||l===o.parent.getRealMode()),e){var d,c,u,p=function(e,t){return""+o.parent.win.getComputedStyle(e).getPropertyValue(t)},f=function(e,t){var i=0,n=0;Object.keys(e).forEach(function(r){var a=e[r];"function"==typeof a?a({editor:o.parent,value:p(t,r).toLowerCase()})&&(i+=1):-1!==a.indexOf(p(t,r).toLowerCase())&&(i+=1),n+=1}),n===i&&r.classList.add("jodit_active")};(n.tags||n.options&&n.options.tags)&&(d=n.tags||n.options&&n.options.tags,c=e,s.default.up(c,function(e){if(-1!==d.indexOf(e.nodeName.toLowerCase()))return r.classList.add("jodit_active"),!0},o.parent.editor)),(n.css||n.options&&n.options.css)&&(u=n.css||n.options&&n.options.css,c=e,s.default.up(c,function(e){e&&e.nodeType!==Node.TEXT_NODE&&!e.classList.contains("jodit_active")&&f(u,e)},o.parent.editor))}})},t.prototype.addButton=function(e,o,i,n){var a=this,s=r.extend(!0,{},o,this.defaultControl),l=r.dom('
    • '),d="string"==typeof e?e:e.name||"empty",c=l.querySelector("a"),u=t.getIcon(d,!1);!1===u&&(u=t.getIcon("string"==typeof s.name?s.name:"empty"));var p=d.replace(/[^a-zA-Z0-9]/g,"_");l.classList.add("jodit_toolbar_btn"),l.classList.add("jodit_toolbar_btn-"+p),this.parent.events.on(r.camelCase("can-"+p),function(e){t.__toggleButton(l,e)});var f=r.dom(u);return f.classList.add("jodit_icon","jodit_icon_"+p),c.appendChild(f),void 0!==s&&"object"==typeof s||(s={command:d}),void 0!==i&&""!==i&&(c.innerHTML=i),s.list&&(l.classList.add("jodit_with_dropdownlist"),c.appendChild(r.dom(''))),s.iconURL&&(c.style.backgroundImage="url("+s.iconURL+")"),s.tooltip?l.querySelector(".jodit_tooltip").innerHTML=this.parent.i18n(s.tooltip):l.removeChild(l.querySelector(".jodit_tooltip")),l.addEventListener("mousedown",function(e){if(e.stopImmediatePropagation(),e.preventDefault(),l.classList.contains("jodit_disabled"))return!1;s.list?(a.openList(l),r.each(s.list,function(e,t){var o;o=void 0!==a.parent.options.controls[t]?a.addButton(t,a.parent.options.controls[t],"",n):void 0!==a.parent.options.controls[e]?a.addButton(e,r.extend({},a.parent.options.controls[e],t),"",n):a.addButton(e,{exec:s.exec,command:s.command,args:[s.args&&s.args[0]||e,s.args&&s.args[1]||t]},s.template&&s.template(a.parent,e,t),n),a.list.appendChild(o)}),l.appendChild(a.list)):void 0!==s.exec&&"function"==typeof s.exec?(s.exec(a.parent,n||a.parent.selection.current(),s,e,l),a.parent.setEditorValue(),a.parent.events.fire("hidePopup"),a.closeAll()):void 0!==s.popup&&"function"==typeof s.popup?a.openPopup(l,s.popup(a.parent,n||a.parent.selection.current(),s,a.closeAll)):(s.command||d)&&(a.parent.execCommand(s.command||d,s.args&&s.args[0]||!1,s.args&&s.args[1]||null),a.closeAll())}),this.buttonList.push({control:s,btn:l,name:d}),l},t.prototype.build=function(e,t,o){var i=this,n=!1;this.container.innerHTML="",e.forEach(function(e){var t="string"==typeof e?e:e.name;if(-1===i.parent.options.removeButtons.indexOf(t))switch(t){case"\n":i.container.appendChild(r.dom('
    • '));break;case"|":n||(n=!0,i.container.appendChild(r.dom('
    • ')));break;default:var a=e;if(n=!1,"object"!=typeof a&&void 0!==i.parent.options.controls[a]&&(a=i.parent.options.controls[a]),"object"!=typeof a)throw Error("Need ControlType "+a);i.container.appendChild(i.addButton(e,a,"",o))}}),t.appendChild(this.container)},t.icons={},t}(n.default)},function(e,t,o){"use strict";var i=this&&this.__extends||function(){var e=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])};return function(t,o){function i(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(i.prototype=o.prototype,new i)}}(),n=this&&this.__assign||Object.assign||function(e){for(var t,o=1,i=arguments.length;i>o;o++){t=arguments[o];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e};t.__esModule=!0;var r=o(1),a=o(5),s=o(4),l=o(0),d=o(6);s.Config.prototype.dialog={zIndex:100002,resizable:!0,draggable:!0,fullsize:!1,fullsizeButton:!1};var c=function(e){function t(t,o){void 0===o&&(o={});var i=e.call(this,t)||this;return i.destinition=document.body,i.destroyAfterClose=!1,i.moved=!1,i.iSetMaximization=!1,i.resizeble=!1,i.draggable=!1,i.startPoint={x:0,y:0,w:0,h:0},i.close=function(e){e&&(e.stopImmediatePropagation(),e.preventDefault()),i.parent&&i.parent.events&&i.parent.events.fire(i,"beforeClose"),i.dialogbox.classList.remove("active"),i.iSetMaximization&&i.maximization(!1),i.destroyAfterClose&&i.destruct(),i.parent&&i.parent.events.fire(i,"afterClose")},i.options=t&&t.options?t.options.dialog:s.Config.prototype.dialog,i.options=n({},i.options,o),i.dialogbox=l.dom('"),i.dialogbox.__jodit_dialog=i,i.dialog=i.dialogbox.querySelector(".jodit_dialog"),i.resizer=i.dialogbox.querySelector(".jodit_dialog_resizer"),i.parent&&i.parent.options&&i.parent.options.textIcons&&i.dialogbox.classList.add("jodit_text_icons"),i.dialogbox_header=i.dialogbox.querySelector(".jodit_dialog_header>h4"),i.dialogbox_content=i.dialogbox.querySelector(".jodit_dialog_content"),i.dialogbox_footer=i.dialogbox.querySelector(".jodit_dialog_footer"),i.dialogbox_close=i.dialogbox.querySelector(".jodit_dialog_header>a.jodit_close"),i.dialogbox_fullsize=l.dom(''+(r.default.modules.Toolbar.getIcon?r.default.modules.Toolbar.getIcon(o.fullsize?"fullsize":"shrink"):"")+""),i.destinition.appendChild(i.dialogbox),i.dialogbox.addEventListener("close_dialog",i.close),i.dialogbox_close.addEventListener("mousedown",i.close),i.dialogbox_fullsize.addEventListener("click",function(){var e=i.maximization();r.default.modules.Toolbar&&(i.dialogbox_fullsize.innerHTML=r.default.modules.Toolbar.getIcon(e?"shrink":"fullsize"))}),i.__on(window,"mousemove",i.onMouseMove.bind(i)).__on(window,"mouseup",i.onMouseUp.bind(i)).__on(window,"keydown",i.onKeyDown.bind(i)).__on(window,"resize",i.onResize.bind(i)),i.dialogbox.querySelector(".jodit_dialog_header").addEventListener("mousedown",i.onHeaderMouseDown.bind(i)),i.options.resizable&&i.resizer.addEventListener("mousedown",i.onResizerMouseDown.bind(i)),i}return i(t,e),t.prototype.setSize=function(e,t){e&&l.css(this.dialog,"width",e),t&&l.css(this.dialog,"height",t)},t.prototype.setPosition=function(e,t){var o=window.innerWidth,i=window.innerHeight,n=o/2-this.dialog.offsetWidth/2,r=i/2-this.dialog.offsetHeight/2;void 0!==e&&void 0!==t&&(this.offsetX=e,this.offsetY=t,this.moved=Math.abs(e-n)>100||Math.abs(t-r)>100),this.dialog.style.left=(e||n)+"px",this.dialog.style.top=(t||r)+"px"},t.prototype.setElements=function(e,t){var o=[];l.asArray(t).forEach(function(t){var i=l.dom(t);o.push(i),i.parentNode!==e&&e.appendChild(i)}),[].slice.call(e.childNodes).forEach(function(t){-1===o.indexOf(t)&&e.removeChild(t)})},t.prototype.setTitle=function(e){this.setElements(this.dialogbox_header,e)},t.prototype.setContent=function(e){this.setElements(this.dialogbox_content,e)},t.prototype.setFooter=function(e){this.setElements(this.dialogbox_footer,e),this.dialog.classList.toggle("with_footer",!!e)},t.prototype.getMaxZIndexDialog=function(){var e,t,o=0,i=this;return l.$$(".jodit_dialog_box",document.body).forEach(function(n){e=n.__jodit_dialog,t=parseInt(l.css(n,"zIndex"),10),e.isOpened()&&!isNaN(t)&&t>o&&(i=e,o=t)}),i},t.prototype.setMaxZIndex=function(){var e=0,t=0;l.$$(".jodit_dialog_box",document.body).forEach(function(o){t=parseInt(l.css(o,"zIndex"),10),e=Math.max(isNaN(t)?0:t,e)}),this.dialogbox.style.zIndex=""+(e+1)},t.prototype.maximization=function(e){return"boolean"!=typeof e&&(e=!this.dialogbox.classList.contains("jodit_dialog_box-fullsize")),this.dialogbox.classList.toggle("jodit_dialog_box-fullsize",e),[document.body,document.body.parentNode].forEach(function(t){t.classList.toggle("jodit_fullsize_box",e)}),this.iSetMaximization=e,e},t.prototype.open=function(e,t,o,i){this.parent&&this.parent.events&&!1===this.parent.events.fire(this,"beforeOpen")||(this.destroyAfterClose=!0===o,this.options.fullsizeButton&&this.dialogbox_close.parentNode.appendChild(this.dialogbox_fullsize),void 0!==t&&this.setTitle(t),e&&this.setContent(e),this.dialogbox.classList.add("active"),i&&this.dialogbox.classList.add("jodit_modal"),this.setPosition(this.offsetX,this.offsetY),this.setMaxZIndex(),this.options.fullsize&&this.maximization(!0),this.parent&&this.parent.events&&this.parent.events.fire(this,"afterOpen"))},t.prototype.isOpened=function(){return this.dialogbox.classList.contains("active")},t.prototype.onMouseUp=function(){(this.draggable||this.resizeble)&&(this.draggable=!1,this.resizeble=!1,this.parent&&this.parent.events&&this.parent.events.fire(this,"endResize endMove"))},t.prototype.onHeaderMouseDown=function(e){this.options.draggable&&(this.draggable=!0,this.startX=e.clientX,this.startY=e.clientY,this.startPoint.x=l.css(this.dialog,"left"),this.startPoint.y=l.css(this.dialog,"top"),this.setMaxZIndex(),e.preventDefault(),this.parent&&this.parent.events&&this.parent.events.fire(this,"startMove"))},t.prototype.onMouseMove=function(e){this.draggable&&this.options.draggable&&(this.setPosition(this.startPoint.x+e.clientX-this.startX,this.startPoint.y+e.clientY-this.startY),this.parent&&this.parent.events&&this.parent.events.fire(this,"move",[e.clientX-this.startX,e.clientY-this.startY]),e.stopImmediatePropagation(),e.preventDefault()),this.resizeble&&this.options.resizable&&(this.setSize(this.startPoint.w+e.clientX-this.startX,this.startPoint.h+e.clientY-this.startY),this.parent&&this.parent.events&&this.parent.events.fire(this,"resizeDialog",[e.clientX-this.startX,e.clientY-this.startY]),e.stopImmediatePropagation(),e.preventDefault())},t.prototype.onKeyDown=function(e){if(this.isOpened()&&27===e.which){var t=this.getMaxZIndexDialog();t?t.close():this.close(),e.stopImmediatePropagation()}},t.prototype.onResize=function(){!this.options.resizable||this.moved||!this.isOpened()||this.offsetX||this.offsetY||this.setPosition()},t.prototype.destruct=function(){this.dialogbox.parentNode.removeChild(this.dialogbox),delete this.dialogbox,e.prototype.destruct.call(this)},t.prototype.onResizerMouseDown=function(e){this.resizeble=!0,this.startX=e.clientX,this.startY=e.clientY,this.startPoint.w=this.dialog.offsetWidth,this.startPoint.h=this.dialog.offsetHeight,this.parent.events&&this.parent.events.fire(this,"startResize")},t}(a.default);t.default=c,t.Alert=function(e,t,o){"function"==typeof t&&(o=t,t=void 0);var i=new c,n=l.dom('
      '),a=l.dom(''+d.default.getIcon("cancel")+""+r.default.prototype.i18n("Ok")+"");n.innerHTML=e,a.addEventListener("click",function(){o&&"function"==typeof o&&!1===o(i)||i.close()}),i.setFooter([a]),i.open(n,t||" ",!0,!0),a.focus()},r.default.Alert=t.Alert,t.Promt=function(e,t,o,i){var n=new c,a=l.dom(''+d.default.getIcon("cancel")+""+r.default.prototype.i18n("Cancel")+""),s=l.dom(''+d.default.getIcon("check")+""+r.default.prototype.i18n("Ok")+""),u=l.dom('
      '),p=l.dom(''),f=l.dom("");"function"==typeof t&&(o=t,t=void 0),i&&p.setAttribute("placeholder",i),f.innerHTML=e,u.appendChild(f),u.appendChild(p),a.addEventListener("click",n.close,!1);var h=function(){o&&"function"==typeof o&&!1===o(p.value)||n.close()};s.addEventListener("click",h),u.addEventListener("submit",function(){return h(),!1}),n.setFooter([s,a]),n.open(u,t||" ",!0,!0),p.focus()},r.default.Promt=t.Promt,t.Confirm=function(e,t,o){var i,n,a=new c,s=l.dom('
      '),u=l.dom("");"function"==typeof t&&(o=t,t=void 0),u.innerHTML=e,s.appendChild(u),i=l.dom(''+d.default.getIcon("cancel")+""+r.default.prototype.i18n("Cancel")+""),i.addEventListener("click",function(){o&&o(!1),a.close()});var p=function(){o&&o(!0),a.close()};n=l.dom(''+d.default.getIcon("check")+""+r.default.prototype.i18n("Yes")+""),n.addEventListener("click",p),s.addEventListener("submit",function(){return p(),!1}),a.setFooter([n,i]),a.open(s,t||" ",!0,!0),n.focus()},r.default.Confirm=t.Confirm},function(e,t,o){"use strict";var i=this&&this.__extends||function(){var e=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])};return function(t,o){function i(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(i.prototype=o.prototype,new i)}}();t.__esModule=!0;var n=o(5),r=o(0),a=o(3),s=o(2);t.JODIT_SELECTED_CELL_MARKER="data-jodit-selected-cell";var l=function(e){function o(){return null!==e&&e.apply(this,arguments)||this}return i(o,e),o.addSelected=function(e){e.setAttribute(t.JODIT_SELECTED_CELL_MARKER,"1")},o.restoreSelection=function(e){e.removeAttribute(t.JODIT_SELECTED_CELL_MARKER)},o.getAllSelectedCells=function(e){return r.$$("td["+t.JODIT_SELECTED_CELL_MARKER+"],th["+t.JODIT_SELECTED_CELL_MARKER+"]",e)},o.getRowsCount=function(e){return e.rows.length},o.getColumnsCount=function(e){return o.formalMatrix(e).reduce(function(e,t){return Math.max(e,t.length)},0)},o.formalMatrix=function(e,t){for(var o=[[]],i=Array.prototype.slice.call(e.rows),n=0,r=void 0;i.length>n;n+=1){var a=Array.prototype.slice.call(i[n].cells);for(r=0;a.length>r;r+=1)if(!1===function(e,i){void 0===o[i]&&(o[i]=[]);for(var n,r,a=e.colSpan,s=e.rowSpan,l=0;o[i][l];)l+=1;for(r=0;s>r;r+=1)for(n=0;a>n;n+=1){if(void 0===o[i+r]&&(o[i+r]=[]),t&&!1===t(e,i+r,l+n,a,s))return!1;o[i+r][l+n]=e}}(a[r],n))return o}return o},o.formalCoordinate=function(e,t,i){void 0===i&&(i=!1);var n=0,r=0,a=1,s=1;return o.formalMatrix(e,function(e,o,l,d,c){if(t===e)return n=o,r=l,a=d,s=c,i&&(r+=d-1,n+=c-1),!1}),[n,r,a,s]},o.appendRow=function(e,t,i){void 0===t&&(t=!1),void 0===i&&(i=!0);var n,a=o.getColumnsCount(e),l=s.default.create("tr","",e.ownerDocument);for(n=0;a>n;n+=1)l.appendChild(s.default.create("td","",e.ownerDocument));i&&t&&t.nextSibling?t.parentNode.insertBefore(l,t.nextSibling):!i&&t?t.parentNode.insertBefore(l,t):(r.$$(":scope>tbody",e)[0]||e).appendChild(l)},o.removeRow=function(e,t){var i,n=o.formalMatrix(e),a=e.rows[t];r.each(n[t],function(e,o){if(i=!1,0>t-1||n[t-1][e]!==o)if(n[t+1]&&n[t+1][e]===o){if(o.parentNode===a&&o.parentNode.nextSibling){i=!0;for(var r=e+1;n[t+1][r]===o;)r+=1;n[t+1][r]?o.parentNode.nextSibling.insertBefore(o,n[t+1][r]):o.parentNode.nextSibling.appendChild(o)}}else o.parentNode&&o.parentNode.removeChild(o);else i=!0;if(i&&(o.parentNode===a||o!==n[t][e-1])){var s=o.rowSpan;s-1>1?o.setAttribute("rowspan",""+(s-1)):o.removeAttribute("rowspan")}}),a&&a.parentNode.removeChild(a)},o.appendColumn=function(e,t,i){void 0===i&&(i=!0);var n,r=o.formalMatrix(e);for(void 0===t&&(t=o.getColumnsCount(e)-1),n=0;r.length>n;n+=1){var a=s.default.create("td","",e.ownerDocument),l=!1;i?r[n].length>t+1&&r[n][t]===r[n][t+1]||(r[n][t].nextSibling?r[n][t].parentNode.insertBefore(a,r[n][t].nextSibling):r[n][t].parentNode.appendChild(a),l=!0):(0>t-1||r[n][t]!==r[n][t-1])&&(r[n][t].parentNode.insertBefore(a,r[n][t]),l=!0),l||r[n][t].setAttribute("colspan",""+(parseInt(r[n][t].getAttribute("colspan"),10)+1))}},o.removeColumn=function(e,t){var i,n=o.formalMatrix(e);r.each(n,function(e,o){if(i=!1,0>t-1||n[e][t-1]!==o[t]?o.length>t+1&&n[e][t+1]===o[t]?i=!0:o[t].parentNode&&o[t].parentNode.removeChild(o[t]):i=!0,i&&(0>e-1||o[t]!==n[e-1][t])){var r=o[t].colSpan;r-1>1?o[t].setAttribute("colspan",""+(r-1)):o[t].removeAttribute("colspan")}})},o.getSelectedBound=function(e,t){var i,n,r,a=[[1/0,1/0],[0,0]],s=o.formalMatrix(e);for(i=0;s.length>i;i+=1)for(n=0;s[i].length>n;n+=1)-1!==t.indexOf(s[i][n])&&(a[0][0]=Math.min(i,a[0][0]),a[0][1]=Math.min(n,a[0][1]),a[1][0]=Math.max(i,a[1][0]),a[1][1]=Math.max(n,a[1][1]));for(i=a[0][0];a[1][0]>=i;i+=1)for(r=1,n=a[0][1];a[1][1]>=n;n+=1){for(;s[i][n-r]&&s[i][n]===s[i][n-r];)a[0][1]=Math.min(n-r,a[0][1]),a[1][1]=Math.max(n-r,a[1][1]),r+=1;for(r=1;s[i][n+r]&&s[i][n]===s[i][n+r];)a[0][1]=Math.min(n+r,a[0][1]),a[1][1]=Math.max(n+r,a[1][1]),r+=1;for(r=1;s[i-r]&&s[i][n]===s[i-r][n];)a[0][0]=Math.min(i-r,a[0][0]),a[1][0]=Math.max(i-r,a[1][0]),r+=1;for(r=1;s[i+r]&&s[i][n]===s[i+r][n];)a[0][0]=Math.min(i+r,a[0][0]),a[1][0]=Math.max(i+r,a[1][0]),r+=1}return a},o.normalizeTable=function(e){var t,i,n,r,a=[],s=o.formalMatrix(e);for(i=0;s[0].length>i;i+=1){for(n=1e6,r=!1,t=0;s.length>t;t+=1)if(void 0!==s[t][i]){if(2>s[t][i].colSpan){r=!0;break}n=Math.min(n,s[t][i].colSpan)}if(!r)for(t=0;s.length>t;t+=1)void 0!==s[t][i]&&o.__mark(s[t][i],"colspan",s[t][i].colSpan-n+1,a)}for(t=0;s.length>t;t+=1){for(n=1e6,r=!1,i=0;s[t].length>i;i+=1)if(void 0!==s[t][i]){if(2>s[t][i].rowSpan){r=!0;break}n=Math.min(n,s[t][i].rowSpan)}if(!r)for(i=0;s[t].length>i;i+=1)void 0!==s[t][i]&&o.__mark(s[t][i],"rowspan",s[t][i].rowSpan-n+1,a)}for(t=0;s.length>t;t+=1)for(i=0;s[t].length>i;i+=1)void 0!==s[t][i]&&(s[t][i].hasAttribute("rowspan")&&1===s[t][i].rowSpan&&s[t][i].removeAttribute("rowspan"),s[t][i].hasAttribute("colspan")&&1===s[t][i].colSpan&&s[t][i].removeAttribute("colspan"),s[t][i].hasAttribute("class")&&!s[t][i].getAttribute("class")&&s[t][i].removeAttribute("class"));o.__unmark(a)},o.mergeSelected=function(e){var t,i,n,s=o.getSelectedBound(e,o.getAllSelectedCells(e)),l=0,d=[],c=0,u=0,p=[];s&&(s[0][0]-s[1][0]||s[0][1]-s[1][1])&&(o.formalMatrix(e,function(e,a,f,h,g){if(!(s[0][0]>a||a>s[1][0]||s[0][1]>f||f>s[1][1])){if(n=e,n.__i_am_already_was)return;n.__i_am_already_was=!0,a===s[0][0]&&n.style.width&&(l+=parseInt(n.offsetWidth,10)),""!==r.trim(e.innerHTML.replace(//g,""))&&d.push(e.innerHTML),h>1&&(c+=h-1),g>1&&(u+=g-1),t?o.__mark(n,"remove",1,p):(t=e,i=f)}}),c=s[1][1]-s[0][1]+1,u=s[1][0]-s[0][0]+1,t&&(c>1&&o.__mark(t,"colspan",c,p),u>1&&o.__mark(t,"rowspan",u,p),l&&(o.__mark(t,"width",(l/e.offsetWidth*100).toFixed(a.ACCURACY)+"%",p),i&&o.setColumnWidthByDelta(e,i,0,!0,p)),delete t.__i_am_already_was,t.innerHTML=d.join("
      "),o.__unmark(p),o.normalizeTable(e),r.each([].slice.call(e.rows),function(e,t){t.cells.length||t.parentNode.removeChild(t)})))},o.splitHorizontal=function(e){var t,i,n,r,a,l=[];o.getAllSelectedCells(e).forEach(function(d){i=s.default.create("td","",e.ownerDocument),i.appendChild(s.default.create("br","",e.ownerDocument)),n=s.default.create("tr","",e.ownerDocument),t=o.formalCoordinate(e,d),2>d.rowSpan?(o.formalMatrix(e,function(e,i,n){t[0]===i&&t[1]!==n&&e!==d&&o.__mark(e,"rowspan",e.rowSpan+1,l)}),s.default.after(s.default.closest(d,"tr",e),n),n.appendChild(i)):(o.__mark(d,"rowspan",d.rowSpan-1,l),o.formalMatrix(e,function(o,i,n){i>t[0]&&t[0]+d.rowSpan>i&&t[1]>n&&o.parentNode.rowIndex===i&&(a=o),i>t[0]&&o===d&&(r=e.rows[i])}),a?s.default.after(a,i):r.insertBefore(i,r.firstChild)),d.colSpan>1&&o.__mark(i,"colspan",d.colSpan,l),o.__unmark(l),o.restoreSelection(d)}),this.normalizeTable(e)},o.splitVertical=function(e){var t,i,n,r=[];o.getAllSelectedCells(e).forEach(function(l){t=o.formalCoordinate(e,l),2>l.colSpan?o.formalMatrix(e,function(e,i,n){t[1]===n&&t[0]!==i&&e!==l&&o.__mark(e,"colspan",e.colSpan+1,r)}):o.__mark(l,"colspan",l.colSpan-1,r),i=s.default.create("td","",e.ownerDocument),i.appendChild(s.default.create("br","",e.ownerDocument)),l.rowSpan>1&&o.__mark(i,"rowspan",l.rowSpan,r);var d=l.offsetWidth;s.default.after(l,i),n=d/e.offsetWidth/2,o.__mark(l,"width",(100*n).toFixed(a.ACCURACY)+"%",r),o.__mark(i,"width",(100*n).toFixed(a.ACCURACY)+"%",r),o.__unmark(r),o.restoreSelection(l)}),o.normalizeTable(e)},o.__mark=function(e,t,o,i){i.push(e),e.__marked_value||(e.__marked_value={}),e.__marked_value[t]=void 0===o?1:o},o.__unmark=function(e){e.forEach(function(e){e.__marked_value&&(r.each(e.__marked_value,function(t,o){switch(t){case"remove":e.parentNode.removeChild(e);break;case"rowspan":o>1?e.setAttribute("rowspan",o):e.removeAttribute("rowspan");break;case"colspan":o>1?e.setAttribute("colspan",o):e.removeAttribute("colspan");break;case"width":e.style.width=o}delete e.__marked_value[t]}),delete e.__marked_value)})},o.setColumnWidthByDelta=function(e,t,i,n,r){var s,l,d,c=o.formalMatrix(e);for(s=0;c.length>s;s+=1)l=c[s][t].offsetWidth,d=(l+i)/e.offsetWidth*100,o.__mark(c[s][t],"width",d.toFixed(a.ACCURACY)+"%",r);n||o.__unmark(r)},o}(n.default);t.default=l},function(e,t,o){"use strict";t.__esModule=!0;var i=o(1),n=o(0),r=o(2);!function(e){e.ColorPickerWidget=function(e,t,o){var a=n.normalizeColor(o),s=n.dom('
      '),l=function(e){var t=[];return n.isPlainObject(e)?Object.keys(e).forEach(function(o){t.push('
      '),t.push(l(e[o])),t.push("
      ")}):Array.isArray(e)&&e.forEach(function(e){t.push("'+(a===e?i.default.modules.Toolbar.getIcon("eye"):"")+"")}),t.join("")};return s.appendChild(n.dom("
      "+l(e.options.colors)+"
      ")),s.appendChild(n.dom(''+i.default.modules.Toolbar.getIcon("eraser")+"")),s.addEventListener("mousedown",function(e){e.stopPropagation()}),s.addEventListener("mousedown",function(o){var a=o.target;if("SVG"!==a.tagName.toUpperCase()&&"PATH"!==a.tagName.toUpperCase()||(a=r.default.closest(a.parentNode,"A",e.editor)),"A"===a.tagName.toUpperCase()){var l=s.querySelector("a.active");l&&(l.classList.remove("active"),l.innerHTML="");var d=a.getAttribute("data-color")||"";if(d){a.innerHTML=i.default.modules.Toolbar.getIcon("eye"),a.classList.add("active");var c=n.hexToRgb(d);a.firstChild.style.fill="rgb("+(255-c.r)+","+(255-c.g)+","+(255-c.b)+")"}return t&&"function"==typeof t&&t(d),!1}}),s},e.TabsWidget=function(e,t){var o=n.dom('
      '),i=n.dom('
      '),r=n.dom('
      '),a=0;if(o.appendChild(r),o.appendChild(i),n.each(t,function(t,o){var s=n.dom('
      '),l=n.dom('');l.innerHTML=e.i18n(t),r.appendChild(l),s.appendChild(n.dom("function"!=typeof o?o:'
      ')),i.appendChild(s),l.addEventListener("mousedown",function(t){return n.$$("a",r).forEach(function(e){e.classList.remove("active")}),n.$$(".jodit_tab",i).forEach(function(e){e.classList.remove("active")}),l.classList.add("active"),s.classList.add("active"),"function"==typeof o&&o.call(e),t.stopPropagation(),!1}),a+=1}),a)return n.$$("a",r).forEach(function(e){e.style.width=(100/a).toFixed(10)+"%"}),r.querySelector("a:first-child").classList.add("active"),i.querySelector(".jodit_tab:first-child").classList.add("active"),o},e.ImageSelectorWidget=function(t,o,r){var a,s={};if(o.upload&&t.options.uploader&&t.options.uploader.url){var l=n.dom('
      '+t.i18n("Drop image")+"
      "+t.i18n("or click")+'
      ');t.getInstance("Uploader").bind(l,function(e){"function"==typeof o.upload&&o.upload.call(t,{baseurl:e.baseurl,files:e.files})},function(e){t.events.fire("errorMessage",[e.message])}),s[i.default.modules.Toolbar.getIcon("upload")+t.i18n("Upload")]=l}if(o.filebrowser&&(t.options.filebrowser.ajax.url||t.options.filebrowser.items.url)&&(s[i.default.modules.Toolbar.getIcon("folder")+t.i18n("Browse")]=function(){t.getInstance("FileBrowser").open(o.filebrowser)}),o.url){var d=n.dom('
      ");a=null,r&&r.nodeType!==Node.TEXT_NODE&&("IMG"===r.tagName||n.$$("img",r).length)&&(a="IMG"===r.tagName?r:n.$$("img",r)[0],n.val(d,"input[name=url]",a.getAttribute("src")),n.val(d,"input[name=text]",a.getAttribute("alt")),d.querySelector("button").innerText=t.i18n("Update")),d.addEventListener("submit",function(e){return e.preventDefault(),e.stopPropagation(),n.val(d,"input[name=url]")?("function"==typeof o.url&&o.url.call(t,n.val(d,"input[name=url]"),n.val(d,"input[name=text]")),!1):(d.querySelector("input[name=url]").focus(),d.querySelector("input[name=url]").classList.add("jodit_error"),!1)},!1),s[i.default.modules.Toolbar.getIcon("link")+" URL"]=d}return e.TabsWidget(t,s)}}(t.Widget||(t.Widget={}))},function(e,t,o){"use strict";var i=this&&this.__extends||function(){var e=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])};return function(t,o){function i(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(i.prototype=o.prototype,new i)}}();t.__esModule=!0;var n=o(4),r=o(0),a=o(15),s=o(5);n.Config.prototype.defaultAjaxOptions={dataType:"json",method:"GET",url:"",async:!0,data:null,contentType:"application/x-www-form-urlencoded; charset=UTF-8",headers:{"X-REQUESTED-WITH":"XMLHttpRequest"},withCredentials:!0,xhr:function(){return new("undefined"==typeof XDomainRequest?XMLHttpRequest:XDomainRequest)}},t.default=function(e){function t(t,o){var i=e.call(this,t)||this;return i.options=r.extend(!0,{},n.Config.prototype.defaultAjaxOptions,o),i.xhr=i.options.xhr(),i}return i(t,e),t.prototype.__buildParams=function(e,t){if("string"==typeof e||window.FormData&&e instanceof window.FormData)return e;var o,i,n,r=[];for(o in e)e.hasOwnProperty(o)&&(i=t?t+"["+o+"]":o,n=e[o],r.push("object"==typeof n?this.__buildParams(n,i):encodeURIComponent(i)+"="+encodeURIComponent(n)));return r.join("&")},t.prototype.abort=function(){return this.xhr.abort(),this},t.prototype.send=function(){var e=this;return new a.default(function(t,o){var i=function(t){switch(e.options.dataType){case"json":try{t=JSON.parse(t)}catch(t){return void o.call(e.xhr,t)}}return t};e.xhr.onabort=function(){o(Error(e.xhr.statusText))},e.xhr.onerror=function(){o(Error(e.xhr.statusText))},e.xhr.ontimeout=function(){o(Error(e.xhr.statusText))},e.xhr.onload=function(){e.response=e.xhr.responseText,e.status=e.xhr.status,t.call(e.xhr,i(e.response))},e.xhr.onreadystatechange=function(){if(e.xhr.readyState===XMLHttpRequest.DONE){var n=e.xhr.responseText;e.response=n,e.status=e.xhr.status,200===e.xhr.status?t.call(e.xhr,i(n)):o.call(e.xhr,Error(e.xhr.statusText||e.parent.i18n("Connection error!")))}},e.xhr.withCredentials=e.options.withCredentials,e.xhr.open(e.options.method,e.options.url,e.options.async),e.options.contentType&&e.xhr.setRequestHeader&&e.xhr.setRequestHeader("Content-type",e.options.contentType),e.options.headers&&e.xhr.setRequestHeader&&r.each(e.options.headers,function(t,o){e.xhr.setRequestHeader(t,o)}),setTimeout(function(){e.xhr.send(e.options.data?e.__buildParams(e.options.data):void 0)},0)})},t}(s.default)},function(e,t,o){"use strict";var i=this&&this.__extends||function(){var e=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])};return function(t,o){function i(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(i.prototype=o.prototype,new i)}}();t.__esModule=!0;var n=o(5);t.default=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.set=function(e,t,o){var i,n;o?(n=new Date,n.setTime(n.getTime()+24*o*60*60*1e3),i="; expires="+n.toGMTString()):i="",document.cookie=e+"="+t+i+"; path=/"},t.get=function(e){var t,o,i=e+"=",n=document.cookie.split(";");for(t=0;n.length>t;t+=1){for(o=n[t];" "===o.charAt(0);)o=o.substring(1,o.length);if(0===o.indexOf(i))return o.substring(i.length,o.length)}return null},t.remove=function(e){t.set(e,"",-1)},t}(n.default)},function(e,t,o){"use strict";t.__esModule=!0;var i=o(1),n=o(3),r=o(2);t.wrapAndSelect=function(e,t,o,i){void 0===i&&(i=!0),e.selection.focus();var a,s=e.win.getSelection(),l=s.getRangeAt(0),d=e.selection.current();if(i&&!1!==d&&r.default.closest(d,o,e.editor))return r.default.closest(d,o,e.editor);var c=e.selection.isCollapsed();c?(a=r.default.create("text",n.INVISIBLE_SPACE,e.doc),t.appendChild(a)):t.appendChild(l.extractContents()),l.collapse(!0),l.insertNode(t);var u=e.doc.createRange();return c?(u.setStartAfter(a),u.collapse(!0)):u.selectNodeContents(t),s.removeAllRanges(),s.addRange(u),t},i.default.plugins.bold=function(e){e.events.on("beforeCommand",function(o){if(-1!==["bold","italic","underline","strikethrough"].indexOf(o))return r.default.apply(i.default.defaultOptions.controls[o],function(o){return t.wrapAndSelect(e,r.default.create(o.tags[0],"",e.doc),o.tagRegExp)},e),e.setEditorValue(),!1})}},function(e,t,o){"use strict";var i=this&&this.__extends||function(){var e=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])};return function(t,o){function i(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(i.prototype=o.prototype,new i)}}();t.__esModule=!0;var n=o(5),r=o(0),a=o(6);t.default=function(e){function t(t){var o=e.call(this,t)||this;return o.hide=function(){o.context.classList.remove("jodit_context_menu-show"),window.removeEventListener("mouseup",o.hide)},o.context=r.dom('
      '),document.body.appendChild(o.context),o}return i(t,e),t.prototype.show=function(e,t,o){var i=this;Array.isArray(o)&&(this.context.innerHTML="",o.forEach(function(e){if(e){var t=r.dom(''+(e.icon?a.default.getIcon(e.icon):"")+"");t.addEventListener("click",function(t){return e.exec.call(i,t),i.hide(),!1}),t.querySelector("span").innerText=i.parent.i18n(e.title),i.context.appendChild(t)}}),r.css(i.context,{left:e,top:t}),window.addEventListener("mouseup",i.hide),this.context.classList.add("jodit_context_menu-show"))},t}(n.default)},function(e,t,o){"use strict";var i=this&&this.__extends||function(){var e=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])};return function(t,o){function i(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(i.prototype=o.prototype,new i)}}();t.__esModule=!0;var n=o(4),r=o(5),a=o(16),s=o(3),l=o(17);n.Config.prototype.observer={timeout:100};var d=function(){function e(e,t,o){this.parent=o,this.oldValue=e,this.newValue=t}return e.prototype.execute=function(){},e.prototype.undo=function(){this.parent.block(!0),this.parent.snapshot.restore(this.oldValue)},e.prototype.redo=function(){this.parent.block(!0),this.parent.snapshot.restore(this.newValue)},e}();t.default=function(e){function t(t){var o=e.call(this,t)||this;return o.__blocked=!1,o.__timeouts=[],o.block=function(e){void 0===e&&(e=1),!0===e||!1===e?this.__blocked=e:1===e?(this.oldblock=this.__blocked,this.__blocked=!0):0===e&&(this.__blocked=void 0!==this.oldblock&&this.oldblock)},o.changed=function(){this.parent.getMode()===s.MODE_WYSIWYG&&(this.parent.events.fire("canRedo",[this.stack.canRedo()]),this.parent.events.fire("canUndo",[this.stack.canUndo()]))},o.stack=new l.Stack,o.stack.changed=function(){o.changed()},o.snapshot=new a.default(t),o.__startValue=o.snapshot.make(),o.stack.changed(),t.events.on("change afterCommand",function(e){"undo"!==e&&"redo"!==e&&o.__changeHandler()}),o}return i(t,e),t.prototype.__onChange=function(){this.__newValue=this.snapshot.make(),a.default.equal(this.__newValue,this.__startValue)||(this.stack.execute(new d(this.__startValue,this.__newValue,this)),this.__startValue=this.__newValue)},t.prototype.__changeHandler=function(){if(this.__blocked)return void this.block(!1);this.parent.options.observer.timeout?(clearTimeout(this.__timer),this.__timer=setTimeout(this.__onChange.bind(this),this.parent.options.observer.timeout),this.__timeouts[this.__timeouts.length]=this.__timer):this.__onChange()},t.prototype.destruct=function(){this.__timeouts.forEach(function(e){clearTimeout(e)})},t.prototype.redo=function(){this.stack.redo()},t.prototype.undo=function(){this.stack.undo()},t}(r.default)},function(e,t,o){"use strict";t.__esModule=!0;var i=0,n=1;t.default=function(){function e(e){this.handlers={0:[],1:[]},this.isFulfilled=null,this.currentParameter=null,this.currentContext=null;var t=this,o=function(e,o){null===t.isFulfilled&&(t.isFulfilled=e,t.currentParameter=o,t.currentContext=this,t.__fire_handlers(e))};try{e(function(e){o.call(this,n,e)},function(e){o.call(this,i,e)})}catch(e){o.call(this,i,e)}}return e.prototype.__fire_handlers=function(e){if(e===this.isFulfilled&&this.handlers[e].length)do{var t=this.handlers[e].shift(),o=void 0;try{o=t.call(this.currentContext,this.currentParameter)}catch(e){return o=e,this.__fire_handlers(i)}void 0!==o&&(this.currentParameter=o)}while(this.handlers[e].length)},e.prototype.then=function(e,t){return e&&this.handlers[n].push(e),t&&this.catch(t),this.__fire_handlers(n),this},e.prototype.catch=function(e){return this.handlers[i].push(e),this.__fire_handlers(i),this},e}()},function(e,t,o){"use strict";var i=this&&this.__extends||function(){var e=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])};return function(t,o){function i(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(i.prototype=o.prototype,new i)}}();t.__esModule=!0;var n=o(5);t.default=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.__countElementsBefore=function(e){if(!e.parentNode)return 0;var t,o,i=e.parentNode.childNodes,n=0;for(o=0;i.length>o;o+=1){if(!t||i[o].nodeType===Node.TEXT_NODE&&""===i[o].textContent||t.nodeType===Node.TEXT_NODE&&i[o].nodeType===Node.TEXT_NODE||(n+=1),i[o]===e)return n;t=i[o]}},t.prototype.__decomposeHierarchyNodes=function(e){var o=[];if(!e.parentNode)return[];for(;e&&e!==this.parent.editor;)o.push(t.__countElementsBefore(e)),e=e.parentNode;return o.reverse()},t.__strokeOffset=function(e,t){for(;e&&e.nodeType===Node.TEXT_NODE;)(e=e.previousSibling)&&e.nodeType===Node.TEXT_NODE&&(t+=e.textContent.length);return t},t.prototype.make=function(){var e={html:"",range:{startContainer:[],startOffset:0,endContainer:[],endOffset:0}};e.html=this.parent.getEditorValue();var o=this.parent.win.getSelection();if(o.rangeCount){var i=o.getRangeAt(0);e.range={startContainer:this.__decomposeHierarchyNodes(i.startContainer),startOffset:t.__strokeOffset(i.startContainer,i.startOffset),endContainer:this.__decomposeHierarchyNodes(i.endContainer),endOffset:t.__strokeOffset(i.endContainer,i.endOffset)}}return e},t.prototype.__restoreElementByLadder=function(e){var t,o=this.parent.editor;for(t=0;o&&e.length>t;t+=1)o=o.childNodes[e[t]];return o},t.equal=function(e,t){return e.html===t.html&&JSON.stringify(e.range)===JSON.stringify(t.range)},t.prototype.restore=function(e){this.parent.setEditorValue(e.html);try{if(e.range){var t=this.win.getSelection(),o=this.doc.createRange();o.setStart(this.__restoreElementByLadder(e.range.startContainer),e.range.startOffset),o.setEnd(this.__restoreElementByLadder(e.range.endContainer),e.range.endOffset),t.removeAllRanges(),t.addRange(o)}}catch(e){}},t}(n.default)},function(e,t,o){"use strict";t.__esModule=!0,t.Stack=function(){function e(){this.commands=[],this.stackPosition=-1,this.savePosition=-1}return e.prototype.execute=function(e){this.__clearRedo(),e.execute(),this.commands.push(e),this.stackPosition+=1,this.changed()},e.prototype.undo=function(){this.commands[this.stackPosition]&&this.commands[this.stackPosition].undo(),this.stackPosition-=1,this.changed()},e.prototype.canUndo=function(){return this.stackPosition>=0},e.prototype.redo=function(){this.stackPosition+=1,this.commands[this.stackPosition]&&this.commands[this.stackPosition].redo(),this.changed()},e.prototype.canRedo=function(){return this.commands.length-1>this.stackPosition},e.prototype.save=function(){this.savePosition=this.stackPosition,this.changed()},e.prototype.__clearRedo=function(){this.commands.length=this.stackPosition+1},e.prototype.changed=function(){},e}()},function(e,t,o){"use strict";var i=this&&this.__extends||function(){var e=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])};return function(t,o){function i(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(i.prototype=o.prototype,new i)}}();t.__esModule=!0;var n=o(5),r=o(10),a=o(4),s=o(0),l=o(3),d=o(2);a.Config.prototype.enableDragAndDropFileToEditor=!0,a.Config.prototype.uploader={url:"",headers:null,data:null,format:"json",prepareData:function(e){return e},isSuccess:function(e){return e.success},getMessage:function(e){return void 0!==e.data.messages&&Array.isArray(e.data.messages)?e.data.messages.join(" "):""},process:function(e){return{files:e.data.files||[],path:e.data.path||"",baseurl:e.data.baseurl||""}},error:function(e){this.parent.events.fire("errorMessage",[e.message,"error",4e3])},defaultHandlerSuccess:function(e){var t=this;e.files&&e.files.length&&e.files.forEach(function(o){t.parent.selection.insertImage(e.baseurl+o)})},defaultHandlerError:function(e){this.parent.events.fire("errorMessage",[e.message])}},t.default=function(e){function t(t,o){var i=e.call(this,t)||this;return i.path="",i.source="default",i.options=s.extend(!0,{},a.Config.prototype.uploader,i.parent.options.uploader,o),i.parent.editor&&i.parent.options.enableDragAndDropFileToEditor&&i.parent.options.uploader&&i.parent.options.uploader.url&&i.bind(i.parent.editor),i}return i(t,e),t.prototype.buildData=function(e){if(void 0!==window.FormData){if(e instanceof FormData)return e;if("string"==typeof e)return e;var t=new FormData;return Object.keys(e).forEach(function(o){t.append(o,e[o])}),t}return e},t.prototype.send=function(e,t){var o=this;this.__ajax=new r.default(this.parent,{xhr:function(){var e=new XMLHttpRequest;return void 0!==window.FormData?e.upload.addEventListener("progress",function(e){if(e.lengthComputable){var t=e.loaded/e.total;t*=100,o.parent.progress_bar.style.display="block",o.parent.progress_bar.style.width=t+"%",100===t&&(o.parent.progress_bar.style.display="none")}},!1):o.parent.progress_bar.style.display="none",e},type:"POST",data:this.buildData(e),url:this.options.url,headers:this.options.headers,contentType:(void 0===window.FormData||"string"==typeof e)&&"application/x-www-form-urlencoded; charset=UTF-8",dataType:this.options.format||"json"}),this.__ajax.send().then(t).catch(function(e){o.options.error.call(o,e)})},t.prototype.sendFiles=function(e,t,o,i){var n,r,a,l,d=this,c=e.length,u=this;if(!c)return!1;for(r=new FormData,r.append("path",u.path),r.append("source",u.source),n=0;c>n;n+=1)a=e[n].type.match(/\/([a-z0-9]+)/i)[1].toLowerCase(),r.append("files["+n+"]",e[n],e[n].name||(""+Math.random()).replace(".","")+"."+a);if(u.options.prepareData(r),i&&i(r),u.options.data&&s.isPlainObject(u.options.data))for(l=Object.keys(u.options.data),n=0;l.length>n;n+=1)r.append(l[n],u.options.data[l[n]]);u.send(r,function(e){if(!d.options.isSuccess.call(u,e))return void(o||u.options.defaultHandlerError).call(u,Error(u.options.getMessage(e)));"function"==typeof(t||u.options.defaultHandlerSuccess)&&(t||u.options.defaultHandlerSuccess).call(u,u.options.process.call(u,e))})},t.prototype.setPath=function(e){this.path=e},t.prototype.setSource=function(e){this.source=e},t.dataURItoBlob=function(e){var t,o=atob(e.split(",")[1]),i=e.split(",")[0].split(":")[1].split(";")[0],n=new ArrayBuffer(o.length),r=new Uint8Array(n);for(t=0;o.length>t;t+=1)r[t]=o.charCodeAt(t);return new Blob([r],{type:i})},t.prototype.bind=function(e,o,i){var n=this,r=this;r.__on(e,"paste",function(e){var n,a,c,u,p=this,f=function(e){e.append("extension",c),e.append("mimetype",a.type)};if(e.clipboardData&&e.clipboardData.files&&e.clipboardData.files.length)return r.sendFiles(e.clipboardData.files,o,i),!1;if(s.browser("ff"))return void(e.clipboardData.types.length||e.clipboardData.types[0]===l.TEXT_PLAIN||(u=d.default.create("div","",this.parent.doc),r.parent.selection.insertNode(u),u.focus(),setTimeout(function(){if(u.firstChild&&u.firstChild.hasAttribute("src")){var e=u.firstChild.getAttribute("src");u.parentNode.removeChild(u),p.sendFiles([t.dataURItoBlob(e)],o,i)}},200)));if(e.clipboardData&&e.clipboardData.items&&e.clipboardData.items.length)for(n=0;e.clipboardData.items.length>n;n+=1)if("file"===e.clipboardData.items[n].kind&&"image/png"===e.clipboardData.items[n].type){a=e.clipboardData.items[n].getAsFile(),c=a.type.match(/\/([a-z0-9]+)/i)[1].toLowerCase(),r.sendFiles([a],o,i,f),e.preventDefault();break}}).__on(e,"dragover",function(t){e.classList.add("draghover"),t.preventDefault()}).__on(e,"dragleave dragend",function(t){e.classList.remove("draghover"),t.preventDefault()}).__on(e,"drop",function(t){if(e.classList.remove("draghover"),t.dataTransfer&&t.dataTransfer.files&&t.dataTransfer.files.length)t.preventDefault(),n.sendFiles(t.dataTransfer.files,o,i);else if(t.dataTransfer&&t.dataTransfer.getData(l.TEXT_PLAIN)&&"-"!==t.dataTransfer.getData(l.TEXT_PLAIN)&&e===r.parent.editor){if(t.preventDefault(),t.stopPropagation(),!n.parent.selection.insertCursorAtPoint(t.clientX,t.clientY))return!1;if(o||n.options.defaultHandlerSuccess){var a={baseurl:"",files:[]};a.files=[t.dataTransfer.getData(l.TEXT_PLAIN)],(o||n.options.defaultHandlerSuccess).call(n,a)}t.preventDefault()}}),e.querySelector("input[type=file]")&&r.__on(e.querySelector("input[type=file]"),"change",function(){r.sendFiles(this.files,o,i)})},t.prototype.uploadRemoteImage=function(e,t,o){var i=this,n=this;n.send({action:"uploadremote",url:e},function(e){if(n.options.isSuccess.call(n,e))"function"==typeof t?t.call(n,i.options.process(e)):i.options.defaultHandlerSuccess.call(n,i.options.process(e));else if("function"==typeof(o||n.options.defaultHandlerError))return void(o||i.options.defaultHandlerError).call(n,Error(n.options.getMessage(e)))})},t}(n.default)},function(e,t,o){"use strict";t.__esModule=!0,o(60),function(e){e.matches||(e.matches=void 0!==e.matchesSelector?e.matchesSelector:function(e){var t=document.querySelectorAll(e),o=this;return Array.prototype.some.call(t,function(e){return e===o})})}(Element.prototype)},function(e,t){},function(e,t,o){function i(e){return o(n(e))}function n(e){var t=r[e];if(!(t+1))throw Error("Cannot find module '"+e+"'.");return t}var r={"./de.ts":29,"./en.ts":30,"./ru.ts":31};i.keys=function(){return Object.keys(r)},i.resolve=n,e.exports=i,i.id=21},function(e,t,o){function i(e){return o(n(e))}function n(e){var t=r[e];if(!(t+1))throw Error("Cannot find module '"+e+"'.");return t}var r={"./Ajax.ts":10,"./Component.ts":5,"./ContextMenu.ts":13,"./Cookie.ts":11,"./Dialog.ts":7,"./Dom.ts":2,"./Events.ts":32,"./FileBrowser.ts":33,"./Helpers.ts":0,"./ImageEditor.ts":34,"./Observer.ts":14,"./PseudoPromise.ts":15,"./Selection.ts":35,"./Snapshot.ts":16,"./Table.ts":8,"./Toolbar.ts":6,"./Undo.ts":17,"./Uploader.ts":18,"./Widget.ts":9};i.keys=function(){return Object.keys(r)},i.resolve=n,e.exports=i,i.id=22},function(e,t,o){function i(e){return o(n(e))}function n(e){var t=r[e];if(!(t+1))throw Error("Cannot find module '"+e+"'.");return t}var r={"./Fullsize.ts":36,"./autofocus.ts":37,"./backspace.ts":38,"./bold.ts":12,"./cleanHTML.ts":39,"./color.ts":40,"./enter.ts":41,"./errorMessages.ts":42,"./font.ts":43,"./formatblock.ts":44,"./imageInlineToolbar.ts":45,"./imageProcessor.ts":46,"./imageProperties.ts":47,"./inlinePopup.ts":48,"./justify.ts":49,"./link.ts":50,"./orderedlist.ts":51,"./paste.ts":52,"./placeholder.ts":53,"./redoundo.ts":54,"./removeoldtags.ts":55,"./resizer.ts":56,"./source.ts":57,"./table.ts":58,"./tableKeyboardNavigation.ts":59};i.keys=function(){return Object.keys(r)},i.resolve=n,e.exports=i,i.id=23},function(e,t,o){function i(e){return o(n(e))}function n(e){var t=r[e];if(!(t+1))throw Error("Cannot find module '"+e+"'.");return t}var r={"./about.svg":86,"./addcolumn.svg":87,"./addrow.svg":88,"./angle-left.svg":89,"./angle-right.svg":90,"./arrows-alt.svg":91,"./arrows-h.svg":92,"./attachment.svg":93,"./bin.svg":94,"./bold.svg":95,"./brush.svg":96,"./cancel.svg":97,"./center.svg":98,"./chain-broken.svg":99,"./check-square.svg":100,"./check.svg":101,"./crop.svg":102,"./dedent.svg":103,"./eraser.svg":104,"./eye.svg":105,"./folder.svg":106,"./font.svg":107,"./fontsize.svg":108,"./fullsize.svg":109,"./hr.svg":110,"./image.svg":111,"./info-circle.svg":112,"./italic.svg":113,"./justify.svg":114,"./left.svg":115,"./link.svg":116,"./lock.svg":117,"./menu.svg":118,"./merge.svg":119,"./ol.svg":120,"./paragraph.svg":121,"./pencil.svg":122,"./plus.svg":123,"./redo.svg":124,"./resize.svg":125,"./resizer.svg":126,"./right.svg":127,"./save.svg":128,"./shrink.svg":129,"./source.svg":130,"./splitg.svg":131,"./splitv.svg":132,"./strikethrough.svg":133,"./table.svg":134,"./th-list.svg":135,"./th.svg":136,"./ul.svg":137,"./underline.svg":138,"./undo.svg":139,"./unlink.svg":140,"./unlock.svg":141,"./update.svg":142,"./upload.svg":143,"./valign.svg":144,"./video.svg":145};i.keys=function(){return Object.keys(r)},i.resolve=n,e.exports=i,i.id=24},function(e,t,o){function i(e){return o(n(e))}function n(e){var t=r[e];if(!(t+1))throw Error("Cannot find module '"+e+"'.");return t}var r={"./btn.less":61,"./btn_group.less":62,"./context_menu.less":63,"./dialog.less":64,"./dropdownlist.less":65,"./filebrowser.less":66,"./grid.less":67,"./icon.less":68,"./image_editor.less":69,"./properties.less":70,"./toolbar.less":71,"./uploader.less":72};i.keys=function(){return Object.keys(r)},i.resolve=n,e.exports=i,i.id=25},function(e,t,o){function i(e){return o(n(e))}function n(e){var t=r[e];if(!(t+1))throw Error("Cannot find module '"+e+"'.");return t}var r={"./errorsMessages.less":73,"./fullsize.less":74,"./placeholder.less":75,"./popupInline.less":76,"./resizer.less":77,"./source.less":78,"./table.less":79,"./widget.less":80};i.keys=function(){return Object.keys(r)},i.resolve=n,e.exports=i,i.id=26},function(e,t,o){function i(e){return o(n(e))}function n(e){var t=r[e];if(!(t+1))throw Error("Cannot find module '"+e+"'.");return t}var r={"./about.less":81,"./colorpicker.less":82,"./form.less":83,"./progressbar.less":84,"./tabs.less":85};i.keys=function(){return Object.keys(r)},i.resolve=n,e.exports=i,i.id=27},function(e,t,o){"use strict";t.__esModule=!0,o(20);var i=o(3);o(19);var n=o(6);e.exports=o(1).default,window.Jodit=e.exports,o(4),Object.keys(i).forEach(function(t){e.exports[t]=i[t]});var r=function(e){e.keys().forEach(e)};r(o(23)),r(o(25)),r(o(27)),r(o(26));var a=o(24);a.keys().forEach(function(e){n.default.icons[e.replace(".svg","").replace("./","")]=a.apply(this,arguments)});var s=o(22);s.keys().forEach(function(t){e.exports.modules[t.replace(".ts","").replace("./","")]=s.apply(this,arguments).default});var l=o(21);l.keys().forEach(function(t){e.exports.lang[t.replace(".ts","").replace("./","")]=l.apply(this,arguments).default})},function(e,t,o){"use strict";t.__esModule=!0,t.default={"Type something":"Schreibe etwas","About Jodit":"Über Jodi","Jodit Editor":"Jodit Editor","Free Non-commercial Version":"Freie Nicht-kommerzielle Version","Jodit User's Guide":"Jodit Benutzerhandbuch","contains detailed help for using":"ausführliche Hilfe enthält für die Verwendung von","For information about the license, please go to our website:":"Für Informationen über die Lizenz, gehen Sie bitte auf unsere Webseite:","Buy full version":"Vollversion kaufen","Copyright © XDSoft.net - Chupurnov Valeriy. All rights reserved.":"Copyright © XDSoft.net - Chupurnov Valeriy. Alle Rechte vorbehalten.",Anchor:"Anker","Open in new tab":"In neuer Registerkarte öffnen","Open editor in fullsize":"Editor öffnen in voller Größe","Clear Formatting":"Formatierung löschen","Fill color or set the text color":"Füllen Sie Farbe oder stellen Sie die Textfarbe",Redo:"Redo",Undo:"Rückgängig machen",Bold:"Fett gedruckt",Italic:"Kursiv","Insert Unordered List":"Ungeordnete Liste einfügen","Insert Ordered List":"Legen Sie Sortierte Liste","Justify Center":"einmitten","Justify Full":"Begründen Voll","Justify Left":"Begründen links","Justify Right":"Begründen Rechts","Insert Horizontal Line":"Legen Horizontale Linie","Insert Image":"Bild einfügen","Insert link":"Link einfügen","Font size":"Schriftgröße","Font family":"Schriftfamilie","Insert format block":"Insert Format Block",Normal:"Normal","Heading 1":"Überschrift 1","Heading 2":"Überschrift 2","Heading 3":"Überschrift 3","Heading 4":"Überschrift 4",Quote:"Zitat",Code:"Code",Insert:"Einfügen","Insert table":"Tabelle einfügen","Change mode":"Änderungsmodus",Margins:"Die Margen",top:"oben",right:"Recht",bottom:"Boden",left:"links",Styles:"Styles",Classes:"Klassen",Align:"Ausrichten",Right:"Recht",Center:"Center",Left:"Links","--Not Set--":"--Nicht eingestellt--",Src:"src",Title:"Titel",Alternative:"Alternative (alt)",Link:"Link","Open link in new tab":"Link in neuem Tab öffnen",Image:"Image",Advansed:"Erweiterte","Image properties":"Bildeigenschaften",Cancel:"Stornieren",Ok:"OK","File Browser":"Dateibrowser","Error on load list":"Fehler beim Ladeliste","Error on load folders":"Fehler beim Laden Ordner","Are you shure?":"Bist du sicher?","Enter Directory name":"Geben Sie Verzeichnisname","Create directory":"Verzeichnis erstellen","type name":"Modellname","Drop image":"Bild Tropfen","or click":"oder klicken Sie auf","Alternative text":"Alternativer Text",Browse:"Blättern",Upload:"Hochladen",Background:"Hintergrund",Text:"Text",Top:"Oben",Middle:"Mitte",Bottom:"Boden","Insert column before":"Spalte einfügen vor","Insert column after":"Spalte einfügen nach","Insert row above":"Zeile einfügen oben","Insert row below":"Zeile unterhalb einfügen","Delete table":"Tabelle löschen","Delete row":"Zeile löschen","Delete column":"Spalte löschen","Empty cell":"Leere Zelle"}},function(e,t,o){"use strict";t.__esModule=!0,t.default={"Type something":"Start writing...","About Jodit":"","Jodit Editor":"","Free Non-commercial Version":"","Jodit User's Guide":"","contains detailed help for using":"","For information about the license, please go to our website:":"","Buy full version":"","Copyright � XDSoft.net - Chupurnov Valeriy. All rights reserved.":"",Anchor:"","Open editor in fullsize":"","Clear Formatting":"","Fill color or set the text color":"",Redo:"",Undo:"",Bold:"",Italic:"","Insert Unordered List":"","Insert Ordered List":"","Justify Center":"","Justify Full":"","Justify Left":"","Justify Right":"","Insert Horizontal Line":"","Insert Image":"","Insert link":"","Font size":"","Font family":"","Insert format block":"",Normal:"","Heading 1":"","Heading 2":"","Heading 3":"","Heading 4":"",Quote:"",Code:"","Insert table":"","Change mode":"",Margins:"",top:"",right:"",bottom:"",left:"",Styles:"",Classes:"",Align:"",Right:"",Center:"",Left:"","--Not Set--":"",Src:"",Title:"",Alternative:"",Link:"","Open link in new tab":"",Image:"",Advansed:"","Image properties":"",Cancel:"",Ok:"","File Browser":"","Error on load list":"","Error on load folders":"","Are you shure?":"","Enter Directory name":"","Create directory":"","type name":"","Drop image":"","or click":"","Alternative text":"",Browse:"",Background:"",Text:"",Top:"",Middle:"",Bottom:"","Insert column before":"","Insert column after":"","Insert row above":"","Insert row below":"","Delete table":"","Delete row":"","Delete column":"","Empty cell":""}},function(e,t,o){"use strict";t.__esModule=!0,t.default={"Type something":"Напишите что-либо","About Jodit":"О Jodit","Jodit Editor":"Редактор Jodit","Free Non-commercial Version":"Версия для не коммерческого использования","Jodit User's Guide":"Jodit Руководство пользователя","contains detailed help for using":"содержит детальную информацию по использованию","For information about the license, please go to our website:":"Для получения сведений о лицензии , пожалуйста, перейдите на наш сайт:","Buy full version":"Купить полную версию","Copyright © XDSoft.net - Chupurnov Valeriy. All rights reserved.":"Авторские права © XDSoft.net - Чупурнов Валерий. Все права защищены.",Anchor:"Анкор","Open in new tab":"Открывать ссылку в новой вкладке","Open editor in fullsize":"Открыть редактор в полном размере","Clear Formatting":"Очистить форматирование","Fill color or set the text color":"Цвет заливки или цвет текста",Redo:"Повтор",Undo:"Отмена",Bold:"Жирный",Italic:"Наклонный","Insert Unordered List":"Вставка маркированного списка","Insert Ordered List":"Вставить нумерованный список","Justify Center":"Выровнять по центру","Justify Full":"Выровнять по ширине","Justify Left":"Выровнять по левому краю","Justify Right":"Выровнять по правому краю","Insert Horizontal Line":"Вставить горизонтальную линию","Insert Image":"Вставить изображение","Insert link":"Вставить ссылку","Font size":"Размер шрифта","Font family":"Шрифт","Insert format block":"Вставить блочный элемент",Normal:"Нормальный текст","Heading 1":"Заголовок 1","Heading 2":"Заголовок 2","Heading 3":"Заголовок 3","Heading 4":"Заголовок 4",Quote:"Цитата",Code:"Код",Insert:"Вставить","Insert table":"Вставить таблицу","Change mode":"Источник",Margins:"Отступы",top:"сверху",right:"справа",bottom:"снизу",left:"слева",Styles:"Стили",Classes:"Классы",Align:"Выравнивание",Right:"По правому краю",Center:"По центру",Left:"По левому краю","--Not Set--":"--не устанавливать--",Src:"src",Title:"Заголовок",Alternative:"Альтернативный текст (alt)",Link:"Ссылка","Open link in new tab":"Открывать ссылку в новом окне",Image:"Изображение",Advansed:"Расширенные","Image properties":"Свойства изображения",Cancel:"Отмена",Ok:"Ok","Your code is similar to HTML. Paste as HTML?":"Ваш текст, который вы пытаетесь вставить похож на HTML. Вставить его как HTML?","Paste as HTML":"Вставить как HTML?","File Browser":"Браузер файлов","Error on load list":"Ошибка при загрузке списка изображений","Error on load folders":"Ошибка при загрузке списка директорий","Are you shure?":"Вы уверены?","Enter Directory name":"Введите название директории","Create directory":"Создать директорию","type name":"введите название","Drop image":"Перетащите сюда изображение","or click":"или нажмите","Alternative text":"Альтернативный текст",Browse:"Сервер",Upload:"Загрузка",Background:"Фон",Text:"Текст",Top:" К верху",Middle:"По середине",Bottom:"К низу","Insert column before":"Вставить столбец до","Insert column after":"Вставить столбец после","Insert row above":"Вставить ряд выше","Insert row below":"Вставить ряд ниже","Delete table":"Удалить таблицу","Delete row":"Удалять ряд","Delete column":"Удалить столбец","Empty cell":"Отчистить ячейку"}},function(e,t,o){"use strict";var i=this&&this.__extends||function(){var e=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])};return function(t,o){function i(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(i.prototype=o.prototype,new i)}}();t.__esModule=!0;var n=o(5);t.default=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.stack=[],t}return i(t,e),t.prototype.off=function(e,t,o){if(0===arguments.length)return this.parent.handlers={},this;var i,n;if("string"==typeof e&&(o=t,t=e,e=this.parent),void 0===e.handlers)return this;var r=t.split(/[\s,]+/);for(i=0;r.length>i;i+=1)if(void 0!==e.handlers[r[i]])if(void 0!==o)for(n=0;e.handlers[r[i]].length>n;n+=1)e.handlers[r[i]][n]===o&&e.handlers[r[i]].splice(n,1);else delete e.handlers[r[i]];return this},t.prototype.on=function(e,t,o,i){void 0===i&&(i=!1);var n;"string"==typeof e&&(o=t,t=e,e=this.parent),"string"!=typeof t&&Error("Parameter list must be string");var r=t.split(/[\s,]+/);for(n=0;r.length>n;n+=1)void 0===e.handlers&&(e.handlers={}),void 0===e.handlers[r[n]]&&(e.handlers[r[n]]=[]),i?e.handlers[r[n]].unshift(o):e.handlers[r[n]].push(o);return this},t.prototype.fire=function(e,t,o){var i,n,r,a;if("string"==typeof e&&(o=t,t=e,e=this.parent),void 0!==e.handlers){for(t=t.split(/[\s,]+/),i=0;t.length>i;i+=1)if(void 0!==e.handlers[t[i]]){for(this.stack.push(t[i]),n=0;e.handlers[t[i]].length>n;n+=1)this.current=t[i],void 0!==(a=e.handlers[t[i]][n].apply(e,o||[]))&&(r=a);this.stack.pop()}return r}},t}(n.default)},function(e,t,o){"use strict";var i=this&&this.__extends||function(){var e=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])};return function(t,o){function i(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(i.prototype=o.prototype,new i)}}(),n=this&&this.__assign||Object.assign||function(e){for(var t,o=1,i=arguments.length;i>o;o++){t=arguments[o];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e};t.__esModule=!0;var r=o(1),a=o(5),s=o(7),l=o(4),d=o(0),c=o(6),u=o(13),p=o(18),f=o(10),h=o(3),g=o(11);l.Config.prototype.filebrowser={filter:function(e,t){return t=t.toLowerCase(),"string"==typeof e?-1!==e.toLowerCase().indexOf(t):"string"==typeof e.name?-1!==e.name.toLowerCase().indexOf(t):"string"!=typeof e.file||-1!==e.file.toLowerCase().indexOf(t)},sortBy:"changed",sort:function(e,t,o){var i,n=function(e,t){return t>e?-1:e>t?1:0};if("string"==typeof e)return n(e.toLowerCase(),t.toLowerCase());if(void 0===e[o]||"name"===o)return"string"==typeof e.name?n(e.name.toLowerCase(),t.name.toLowerCase()):"string"==typeof e.file?n(e.file.toLowerCase(),t.file.toLowerCase()):0;switch(o){case"changed":return i=new Date(e.changed),new Date(t.changed)-i;case"size":return d.humanSizeToBytes(e.size)-d.humanSizeToBytes(t.size)}},editImage:!0,preview:!0,showPreviewNavigation:!0,showSelectButtonInPreview:!0,contextMenu:!0,howLongShowMsg:3e3,createNewFolder:!0,deleteFolder:!0,moveFolder:!0,moveFile:!0,showFoldersPanel:!0,width:763,height:400,buttons:["upload","remove","update","select","edit","tiles","list","filter","sort"],view:"tiles",isSuccess:function(e){return e.success},getMessage:function(e){return void 0!==e.data.messages&&Array.isArray(e.data.messages)?e.data.messages.join(" "):""},showFileName:!0,showFileSize:!0,showFileChangeTime:!0,getThumbTemplate:function(e,t,o){var i,n,r,a=""+(new Date).getTime();return"string"==typeof e?(i=e,n=e):(void 0!==e.file&&(i=e.file,n=e.file),e.thumb&&(n=e.thumb)),r='
      \n '+(this.options.showFileName?''+i+"":"")+"\n "+(this.options.showFileSize&&e.size?""+e.size+"":"")+"\n "+(this.options.showFileChangeTime&&e.changed?''+e.changed+"":"")+"\n
      ",'\n '+i+'\n '+(this.options.showFileName||this.options.showFileSize&&e.size||this.options.showFileChangeTime&&e.changed?r:"")+"\n "},ajax:{url:"",async:!0,data:{},cache:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",method:"POST",processData:!0,dataType:"json",headers:{},prepareData:function(e){return e},process:function(e){return e}},create:{data:{action:"create"}},getlocalfilebyurl:{data:{action:"getlocalfilebyurl"}},resize:{data:{action:"resize"}},crop:{data:{action:"crop"}},move:{data:{action:"move"}},remove:{data:{action:"remove"}},items:{data:{action:"files"}},folder:{data:{action:"folders"}},uploader:null};var v="default",m="jodit_filebrowser_files_item";t.default=function(e){function t(t){var o=e.call(this,t)||this;o.currentPath="",o.currentSource=v,o.currentBaseUrl="",o.view="tiles",o.sortBy="changed",o.dragger=!1,o.filterWord="",o.getPathByUrl=function(e,t,i){var n=o;o.options.getlocalfilebyurl.data.url=e,o.send("getlocalfilebyurl",function(e){n.options.isSuccess(e)?t(e.data.path,e.data.name,e.data.source):i(n.options.getMessage(e))},function(e){i(n.options.getMessage(e))})},o.loadItems=function(e,t){var i=o;i.options.items.data.path=e,i.options.items.data.source=t,i.options.items.url&&(i.files.classList.add("active"),i.files.appendChild(i.loader.cloneNode(!0)),i.__ajax2&&i.__ajax2.abort&&i.__ajax2.abort(),i.__ajax2=i.send("items",function(e){var t=i.options.items.process.call(i,e);i.generateItemsBox(t.data.sources),i.someSelectedWasChanged()},function(){i.status(i.parent.i18n("Error on load list"))}))},o.create=function(e,t,i){o.options.create.data.source=i,o.options.create.data.path=t,o.options.create.data.name=e,o.send("create",function(e){o.options.isSuccess(e)?(o.currentPath=t,o.currentSource=i,o.loadTree(t,i)):o.status(o.options.getMessage(e))},function(e){o.status(e)})},o.move=function(e,t,i){o.options.move.data.from=e,o.options.move.data.path=t,o.options.move.data.source=i,o.send("move",function(e){o.options.isSuccess(e)?o.loadTree(t,i):o.status(o.options.getMessage(e))},function(e){o.status(e)})},o.close=function(){o.dialog.close()},o.open=function(e){if(o.options.items.url){o.__off(o.files,"dblclick").__on(o.files,"dblclick","a",o.onSelect(e)),o.__off(o.buttons.select,"click").__on(o.buttons.select,"click",o.onSelect(e)),o.loadTree(o.currentPath,o.currentSource);var t=[d.dom(''+o.parent.i18n("File Browser")+"      ")],i=void 0,n=void 0;for(i=0;o.options.buttons.length>i;i+=1){var a=o.options.buttons[i];"string"==typeof a&&void 0!==o.buttons[a]&&(o.options.editImage&&void 0!==r.default.modules.ImageEditor||"edit"!==a)?t.push(o.buttons[a]):"function"==typeof a?t.push(a.call(o)):d.isPlainObject(a)&&a.exec&&a.name&&(n=d.dom('
      '+c.default.getIcon(a.icon||a.name)+"
      "),t.push(n),n.addEventListener("click",a.exec))}o.dialog.open(o.browser,t)}},o.errorHandler=function(e){o.status(o.options.getMessage(e))},o.uploadHandler=function(){o.loadItems(o.currentPath,o.currentSource)},o.openImageEditor=function(e,t,i,n,r,a){o.parent.getInstance("ImageEditor").open(e,function(e,s,l,d){void 0===o.options[s.action]&&(o.options[s.action]={}),void 0===o.options[s.action].data&&(o.options[s.action].data={action:s.action}),o.options[s.action].data.newname=e,o.options[s.action].data.box=s.box,o.options[s.action].data.path=i,o.options[s.action].data.name=t,o.options[s.action].data.source=n,o.send(s.action,function(e){o.options.isSuccess(e)?(o.loadTree(o.currentPath,o.currentSource),l(),r&&r()):(d(o.options.getMessage(e)),a&&a(o.options.getMessage(e)))},function(e){d(o.options.getMessage(e)),a&&a(o.options.getMessage(e))})})},o.draggable=!1,o.start={top:0,left:0},o.client={x:0,y:0};var i=o;i.options=d.extend(!0,{},l.Config.prototype.filebrowser,i.parent.options.filebrowser),i.dialog=new s.default(t,{fullsizeButton:!0}),i.loader=d.dom('
      '),i.browser=d.dom('
      '+(i.options.showFoldersPanel?'
      ':"")+'
      '),i.status_line=i.browser.querySelector(".jodit_filebrowser_status"),i.buttons={upload:d.dom('
      '+c.default.getIcon("plus")+'
      '),remove:d.dom('
      '+c.default.getIcon("bin")+"
      "),update:d.dom('
      '+c.default.getIcon("update")+"
      "),select:d.dom('
      '+c.default.getIcon("check")+"
      "),edit:d.dom('
      '+c.default.getIcon("pencil")+"
      "),tiles:d.dom('
      '+c.default.getIcon("th")+"
      "),list:d.dom('
      '+c.default.getIcon("th-list")+"
      "),filter:d.dom(''),sort:d.dom('")},i.tree=i.browser.querySelector(".jodit_filebrowser_tree"),i.files=i.browser.querySelector(".jodit_filebrowser_files"),i.__on([i.buttons.tiles,i.buttons.list],"click",function(e){var t=e.currentTarget;t.classList.contains("jodit_button_tiles")?(i.view="tiles",i.buttons.list.classList.add("disabled")):(i.view="list",i.buttons.tiles.classList.add("disabled")),t.classList.remove("disabled"),i.files.classList.remove("jodit_filebrowser_files_view-tiles"),i.files.classList.remove("jodit_filebrowser_files_view-list"),i.files.classList.add("jodit_filebrowser_files_view-"+i.view),g.default.set("jodit_filebrowser_view",i.view,31)}),i.__on(i.buttons.sort,"change",function(){i.sortBy=i.buttons.sort.value,g.default.set("jodit_filebrowser_sortby",i.sortBy,31),i.loadItems(i.currentPath,i.currentSource)}),i.__on(i.buttons.sort,"click mousedown",function(e){e.stopPropagation()}),i.__on(i.buttons.filter,"click mousedown",function(e){e.stopPropagation()}).__on(i.buttons.filter,"keydown",d.debounce(function(){i.filterWord=i.buttons.filter.value,i.loadItems(i.currentPath,i.currentSource)},300)),i.__on(i.buttons.remove,"click",function(){o.__getActiveElements().length&&s.Confirm(t.i18n("Are you shure?"),"",function(e){e&&(o.__getActiveElements().forEach(function(e){i.remove(i.currentPath,e.getAttribute("data-name"),e.getAttribute("data-source"))}),i.someSelectedWasChanged(),i.loadTree(i.currentPath,i.currentSource))})}),i.__on(i.buttons.edit,"click",function(){var e=o.__getActiveElements();1===e.length&&i.openImageEditor(e[0].getAttribute("href"),e[0].getAttribute("data-name"),e[0].getAttribute("data-path"),e[0].getAttribute("data-source"))}),i.__on(i.buttons.update,"click",function(){i.loadTree(o.currentPath,o.currentSource)}),i.__on(i.tree,"click","a>i.remove",function(e){var o=this.parentNode,n=o.getAttribute("data-path");return s.Confirm(t.i18n("Are you shure?"),"",function(e){e&&(i.remove(n,o.getAttribute("data-name"),o.getAttribute("data-source")),i.loadTree(i.currentPath,i.currentSource))}),e.stopImmediatePropagation(),!1}).__on(i.tree,"click","a",function(){var e=this;this.classList.contains("addfolder")?s.Promt(i.parent.i18n("Enter Directory name"),i.parent.i18n("Create directory"),function(t){i.create(t,e.getAttribute("data-path"),e.getAttribute("data-source"))},i.parent.i18n("type name")):(i.currentPath=this.getAttribute("data-path"),i.currentSource=this.getAttribute("data-source"),i.loadTree(this.getAttribute("data-path"),this.getAttribute("data-source")))}).__on(o.tree,"dragstart","a",function(){i.dragger=this}).__on(o.tree,"drop","a",function(){if(i.options.moveFolder&&i.dragger){var e=i.dragger.getAttribute("data-path");if(!i.options.moveFolder&&i.dragger.classList.contains("jodit_filebrowser_tree_item"))return!1;if(i.dragger.classList.contains(m)&&(e+=i.dragger.getAttribute("data-name"),!i.options.moveFile))return!1;i.move(e,this.getAttribute("data-path"),this.getAttribute("data-source"))}});var a=new u.default(o.parent);return i.__on(i.files,"mousedown","a>img",function(e){i.client.x=e.clientX,i.client.y=e.clientY,i.start=d.offset(this),i.draggable=this.cloneNode(!0),d.css(i.draggable,{"z-index":1e14,position:"fixed",display:"none",left:i.start.left,top:i.start.top,width:this.offsetWidth,height:this.offsetHeight}),document.body.appendChild(i.draggable)}).__on(i.files,"dragstart","a",function(e){i.dragger=this,e.dataTransfer.setData(h.TEXT_PLAIN,this.getAttribute("href")),e.stopPropagation()}).__on(i.files,"contextmenu","a",function(e){var t=this;if(i.options.contextMenu){var o=this;return a.show(e.pageX,e.pageY,[!!i.options.editImage&&{icon:"pencil",title:"Edit",exec:function(){i.openImageEditor(o.getAttribute("href"),o.getAttribute("data-name"),o.getAttribute("data-path"),o.getAttribute("data-source"))}},{icon:"bin",title:"Delete",exec:function(){i.remove(i.currentPath,o.getAttribute("data-name"),o.getAttribute("data-source")),i.someSelectedWasChanged(),i.loadTree(i.currentPath,i.currentSource)}},!!i.options.preview&&{icon:"eye",title:"Preview",exec:function(){var e=new s.default(i.parent),n=d.dom('
      '),r=o.getAttribute("href"),a=i.buttons.select.cloneNode(!0),l=document.createElement("img"),u=function(){var a=function(){if(t.removeEventListener("load",a),n.innerHTML="",i.options.showPreviewNavigation){var s=d.dom(''+c.default.getIcon("angle-right")+""),p=d.dom(''+c.default.getIcon("angle-left")+"");o.previousSibling&&o.previousSibling.classList&&o.previousSibling.classList.contains(m)&&n.appendChild(p),o.nextSibling&&o.nextSibling.classList&&o.nextSibling.classList.contains(m)&&n.appendChild(s),i.__on([s,p],"click",function(){o=this.classList.contains("jodit_filebrowser_preview_navigation-next")?o.nextSibling:o.previousSibling,n.innerHTML='',r=o.getAttribute("href"),l.setAttribute("src",r),u()})}n.appendChild(l),e.setPosition()};l.addEventListener("load",a),l.complete&&a.call(l)};u(),l.setAttribute("src",r),e.setContent(n),i.options.showSelectButtonInPreview&&(a.removeAttribute("disabled"),e.setTitle(a),a.addEventListener("click",function(){i.files.querySelector("a.active").classList.add("active"),o.classList.add("active"),i.__fire(i.buttons.select,"click"),e.close()})),e.open()}},{icon:"upload",title:"Download",exec:function(){window.open(o.getAttribute("href"))}}]),e.stopPropagation(),e.preventDefault(),!1}}).__on(i.files,"click",function(e){d.ctrlKey(e)||(o.__getActiveElements().forEach(function(e){e.classList.remove("active")}),i.someSelectedWasChanged())}).__on(i.files,"click","a",function(e){return d.ctrlKey(e)||i.__getActiveElements().forEach(function(e){e.classList.remove("active")}),this.classList.toggle("active"),i.someSelectedWasChanged(),e.stopPropagation(),!1}).__on(document,"dragover",function(e){i.isOpened()&&i.draggable&&void 0!==e.clientX&&d.css(i.draggable,{left:e.clientX+20,top:e.clientY+20,display:"block"})}).__on(window,"keydown",function(e){i.isOpened()&&46===e.which&&i.__fire(i.buttons.remove,"click")}).__on(window,"mouseup dragend",function(){i.draggable&&(i.draggable.parentNode.removeChild(i.draggable),i.draggable=!1)}),o.dialog.setSize(o.options.width,o.options.height),o.options.getlocalfilebyurl=d.extend(!0,{},o.options.ajax,o.options.getlocalfilebyurl),o.options.crop=d.extend(!0,{},o.options.ajax,o.options.crop),o.options.resize=d.extend(!0,{},o.options.ajax,o.options.resize),o.options.create=d.extend(!0,{},o.options.ajax,o.options.create),o.options.move=d.extend(!0,{},o.options.ajax,o.options.move),o.options.remove=d.extend(!0,{},o.options.ajax,o.options.remove),o.options.folder=d.extend(!0,{},o.options.ajax,o.options.folder),o.options.items=d.extend(!0,{},o.options.ajax,o.options.items),o.view="list"===o.options.view?"list":"tiles",g.default.get("jodit_filebrowser_view")&&(o.view="list"===g.default.get("jodit_filebrowser_view")?"list":"tiles"),o.buttons[o.view].classList.remove("disabled"),o.files.classList.add("jodit_filebrowser_files_view-"+o.view),o.sortBy=-1!==["changed","name","size"].indexOf(o.options.sortBy)?o.options.sortBy:"changed",g.default.get("jodit_filebrowser_sortby")&&(o.sortBy=-1!==["changed","name","size"].indexOf(g.default.get("jodit_filebrowser_sortby"))?g.default.get("jodit_filebrowser_sortby"):"changed"),o.buttons.sort.value=o.sortBy,o.currentBaseUrl=d.$$("base",o.parent.doc).length?d.$$("base",o.parent.doc)[0].getAttribute("href"):location.protocol+"//"+location.host,void 0!==r.default.modules.Uploader&&(o.uploader=new p.default(o.parent,n({},o.parent.options.uploader,o.options.uploader)),o.uploader.setPath(o.currentPath),o.uploader.setSource(o.currentSource),o.uploader.bind(o.browser,o.uploadHandler,o.errorHandler),o.uploader.bind(o.buttons.upload,o.uploadHandler,o.errorHandler)),o}return i(t,e),t.prototype.isOpened=function(){return this.dialog.isOpened()&&"none"!==this.browser.style.display},t.prototype.status=function(e,t){var o=this;clearTimeout(this.statustimer),this.status_line.classList.remove("success"),this.status_line.classList.add("active"),this.status_line.innerHTML=e,t&&this.status_line.classList.add("success"),this.statustimer=setTimeout(function(){o.status_line.classList.remove("active")},this.options.howLongShowMsg)},t.prototype.generateFolderTree=function(e){var t=this,o=[];d.each(e,function(e,i){e&&e!==v&&o.push('
      '+e+"
      "),i.folders.forEach(function(n){var r=''+n+"";t.options.deleteFolder&&".."!==n&&"."!==n&&(r+='×'),r+="",o.push(r)}),t.options.createNewFolder&&o.push(''+c.default.getIcon("plus")+" "+t.parent.i18n("Add folder")+"")}),this.tree.innerHTML=o.join("")},t.prototype.generateItemsBox=function(e){var t=this,o=[];d.each(e,function(e,i){e&&e!==v&&o.push('
      '+e+(i.path?" - "+i.path:"")+"
      "),i.files&&i.files.length?("function"==typeof t.options.sort&&i.files.sort(function(e,o){return t.options.sort(e,o,t.sortBy,t.parent)}),i.files.forEach(function(n){(void 0===t.options.filter||t.options.filter(n,t.filterWord))&&o.push(t.options.getThumbTemplate.call(t,n,i,e))})):o.push("
      "+t.parent.i18n("There are no files")+"
      ")}),this.files.innerHTML=o.join("")},t.prototype.__getActiveElements=function(){return d.$$(":scope>a.active",this.files)},t.prototype.someSelectedWasChanged=function(){var e=this.__getActiveElements();this.buttons.remove.classList.toggle("disabled",!e.length),this.buttons.select.classList.toggle("disabled",!e.length),this.buttons.edit.classList.toggle("disabled",1!==e.length)},t.prototype.send=function(e,t,o){var i,n=d.extend(!0,{},this.options.ajax,void 0!==this.options[e]?this.options[e]:this.options.ajax);return n.data=n.prepareData.call(this,n.data),i=new f.default(this.parent,n),i.send().then(t).catch(o),i},t.prototype.loadTree=function(e,t){var o=this;o.options.folder.data.path=e,o.options.folder.data.source=t,o.uploader&&(o.uploader.setPath(e),o.uploader.setSource(t)),o.options.showFoldersPanel&&(o.options.folder.url?(o.tree.classList.add("active"),o.tree.innerHTML="",o.tree.appendChild(o.loader.cloneNode(!0)),o.__ajax&&o.__ajax.abort&&o.__ajax.abort(),o.__ajax=this.send("folder",function(e){var t=o.options.folder.process.call(o,e);o.generateFolderTree(t.data.sources)},function(){o.status(o.parent.i18n("Error on load folders"))})):o.tree.classList.remove("active")),this.loadItems(e,t)},t.prototype.remove=function(e,t,o){var i=this;this.options.remove.data.path=e,this.options.remove.data.name=t,this.options.remove.data.source=o,this.send("remove",function(e){e=i.options.remove.process.call(i,e),i.options.isSuccess(e)?(i.someSelectedWasChanged(),i.status(i.options.getMessage(e),!0)):i.status(i.options.getMessage(e))},function(e){i.status(e)})},t.prototype.onSelect=function(e){var t=this;return function(){var o=t.__getActiveElements();if(o.length){var i=[];o.forEach(function(e){i.push(e.getAttribute("data-url"))}),t.close(),"function"==typeof e&&e({baseurl:"",files:i})}return!1}},t}(a.default)},function(e,t,o){"use strict";var i=this&&this.__extends||function(){var e=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])};return function(t,o){function i(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(i.prototype=o.prototype,new i)}}();t.__esModule=!0;var n=o(5),r=o(4),a=o(0),s=o(6),l=o(7);r.Config.prototype.imageeditor={closeAfterSave:!1,width:"85%",height:"85%",crop:!0,resize:!0,resizeUseRatio:!0,resizeMinWidth:20,resizeMinHeight:20,cropUseRatio:!0,cropDefaultWidth:"70%",cropDefaultHeight:"70%"},t.default=function(e){function t(t){var o=e.call(this,t)||this;return o.resizeUseRatio=!0,o.cropUseRatio=!0,o.clicked=!1,o.activeTab="resize",o.hide=function(){o.dialog.close()},o.calcValueByPercent=function(e,t){var o,i=""+t,n=parseFloat(""+e);return(o=/^[\-+]?[0-9]+(px)?$/.exec(i))?parseInt(i,10):(o=/^([\-+]?[0-9.]+)%$/.exec(i),o?Math.round(n*(parseFloat(o[1])/100)):n||0)},o.calcCropBox=function(){var e=.8*o.crop_box.parentNode.offsetWidth,t=.8*o.crop_box.parentNode.offsetHeight,i=e,n=t;e>o.naturalWidth&&t>o.naturalHeight?(i=o.naturalWidth,n=o.naturalHeight):o.ratio>e/t?(i=e,n=o.naturalHeight*(e/o.naturalWidth)):(i=o.naturalWidth*(t/o.naturalHeight),n=t),a.css(o.crop_box,{width:i,height:n})},o.showCrop=function(){o.cropImage&&(o.calcCropBox(),o.new_w=o.calcValueByPercent(o.cropImage.offsetWidth||o.image.offsetWidth,o.options.cropDefaultWidth),o.new_h=o.cropUseRatio?o.new_w/o.ratio:o.calcValueByPercent(o.cropImage.offsetHeight||o.image.offsetHeight,o.options.cropDefaultHeight),a.css(o.cropHandler,{backgroundImage:"url("+o.cropImage.getAttribute("src")+")",width:o.new_w,height:o.new_h,left:(o.cropImage.offsetWidth||o.image.offsetWidth)/2-o.new_w/2,top:(o.cropImage.offsetHeight||o.image.offsetHeight)/2-o.new_h/2}),o.parent.events.fire(o.cropHandler,"updatesize"))},o.cropBox={x:0,y:0,w:0,h:0},o.updateCropBox=function(){if(o.cropImage){var e=o.cropImage.offsetWidth/o.naturalWidth,t=o.cropImage.offsetHeight/o.naturalHeight;o.cropBox.x=a.css(o.cropHandler,"left")/e,o.cropBox.y=a.css(o.cropHandler,"top")/t,o.cropBox.w=o.cropHandler.offsetWidth/e,o.cropBox.h=o.cropHandler.offsetHeight/t,o.sizes.innerText=o.cropBox.w.toFixed(0)+"x"+o.cropBox.h.toFixed(0)}},o.resizeBox={w:0,h:0},o.updateResizeBox=function(){o.resizeBox.w=o.image.offsetWidth||o.naturalWidth,o.resizeBox.h=o.image.offsetHeight||o.naturalHeight},o.open=function(e,t){var i=(new Date).getTime();o.image=document.createElement("img"),a.$$("img,.jodit_icon-loader",o.resize_box).forEach(function(e){e.parentNode.removeChild(e)}),a.$$("img,.jodit_icon-loader",o.crop_box).forEach(function(e){e.parentNode.removeChild(e)}),a.css(o.cropHandler,"background","transparent"),o.onSave=t,o.resize_box.appendChild(a.dom('')),o.crop_box.appendChild(a.dom('')),/\?/.test(e)?e+="&_tst="+i:e+="?_tst="+i,o.image.setAttribute("src",e),o.dialog.open();var n=function(){o.image.removeEventListener("load",n),o.naturalWidth=o.image.naturalWidth,o.naturalHeight=o.image.naturalHeight,o.widthInput.value=""+o.naturalWidth,o.heightInput.value=""+o.naturalHeight,o.ratio=o.naturalWidth/o.naturalHeight,o.resize_box.appendChild(o.image),o.cropImage=o.image.cloneNode(),o.crop_box.appendChild(o.cropImage),a.$$(".jodit_icon-loader",o.editor).forEach(function(e){e.parentNode.removeChild(e)}),"crop"===o.activeTab&&o.showCrop(),o.parent.events.fire(o.resizeHandler,"updatesize"),o.parent.events.fire(o.cropHandler,"updatesize"),o.dialog.setPosition()};o.image.addEventListener("load",n),o.image.complete&&n()},o.setHandlers=function(){var e=o;e.__on([e.editor.querySelector(".jodit_bottomright"),e.cropHandler],"mousedown",function(t){e.target=t.target||t.srcElement,t.preventDefault(),t.stopImmediatePropagation(),e.clicked=!0,e.start_x=parseInt(t.clientX,10),e.start_y=parseInt(t.clientY,10),"crop"===e.activeTab?(e.top_x=a.css(e.cropHandler,"left"),e.top_y=a.css(e.cropHandler,"top"),e.width=e.cropHandler.offsetWidth,e.height=e.cropHandler.offsetHeight):(e.width=e.image.offsetWidth,e.height=e.image.offsetHeight)}),e.__off(window,".jodit_image_editor"+e.parent.id).__on(window,"mousemove.jodit_image_editor"+e.parent.id,a.throttle(function(t){e.clicked&&(e.diff_x=parseInt(t.clientX,10)-e.start_x,e.diff_y=parseInt(t.clientY,10)-e.start_y,"resize"===e.activeTab&&e.resizeUseRatio||"crop"===e.activeTab&&e.cropUseRatio?e.diff_x?(e.new_w=e.width+e.diff_x,e.new_h=Math.round(e.new_w/e.ratio)):(e.new_h=e.height+e.diff_y,e.new_w=Math.round(e.new_h*e.ratio)):(e.new_w=e.width+e.diff_x,e.new_h=e.height+e.diff_y),"resize"===e.activeTab?(e.new_w>e.options.resizeMinWidth&&(a.css(e.image,"width",e.new_w+"px"),e.widthInput.value=""+e.new_w),e.new_h>e.options.resizeMinHeight&&(a.css(e.image,"height",e.new_h+"px"),e.heightInput.value=""+e.new_h),o.parent.events.fire(e.resizeHandler,"updatesize")):(e.target!==e.cropHandler?(e.top_x+e.new_w>e.cropImage.offsetWidth&&(e.new_w=e.cropImage.offsetWidth-e.top_x),e.top_y+e.new_h>e.cropImage.offsetHeight&&(e.new_h=e.cropImage.offsetHeight-e.top_y),a.css(e.cropHandler,{width:e.new_w,height:e.new_h})):(e.top_x+e.diff_x+e.cropHandler.offsetWidth>e.cropImage.offsetWidth&&(e.diff_x=e.cropImage.offsetWidth-e.top_x-e.cropHandler.offsetWidth),a.css(e.cropHandler,"left",e.top_x+e.diff_x),e.top_y+e.diff_y+e.cropHandler.offsetHeight>e.cropImage.offsetHeight&&(e.diff_y=e.cropImage.offsetHeight-e.top_y-e.cropHandler.offsetHeight),a.css(e.cropHandler,"top",e.top_y+e.diff_y)),o.parent.events.fire(e.cropHandler,"updatesize")),t.stopImmediatePropagation())},30)).__on(window,"resize.jodit_image_editor"+e.parent.id,function(){o.parent.events.fire(e.resizeHandler,"updatesize"),e.showCrop(),o.parent.events.fire(e.cropHandler,"updatesize")}).__on(window,"mouseup.jodit_image_editor"+e.parent.id+" keydown.jodit_image_editor"+e.parent.id,function(t){e.clicked&&(e.clicked=!1,t.stopImmediatePropagation())}),a.$$(".jodit_btn_group",e.editor).forEach(function(t){var o=t.querySelector("input");e.__on(t,"click change","button",function(){var i=this;a.$$("button",t).forEach(function(e){return e.classList.remove("active")}),i.classList.add("active"),o.checked=!!i.getAttribute("data-yes"),e.__fire(o,"change")})}),e.__on(o.editor,"click",".jodit_image_editor_slider-title",function(){a.$$(".jodit_image_editor_slider,.jodit_image_editor_area",e.editor).forEach(function(e){return e.classList.remove("active")});var t=this.parentNode;t.classList.add("active"),e.activeTab=t.getAttribute("data-area"),e.editor.querySelector(".jodit_image_editor_area.jodit_image_editor_area_"+e.activeTab).classList.add("active"),"crop"===e.activeTab&&e.showCrop()}),e.__on(e.widthInput,"change mousedown keydown",a.debounce(function(){var t,i=parseInt(e.widthInput.value,10);i>e.parent.options.resizer.min_width&&(a.css(e.image,"width",i+"px"),e.resizeUseRatio&&(t=Math.round(i/e.ratio))>e.parent.options.resizer.min_height&&(a.css(e.image,"height",t+"px"),e.heightInput.value=t)),o.parent.events.fire(e.resizeHandler,"updatesize")},200)),e.__on(e.heightInput,"change mousedown keydown",a.debounce(function(){var t,i=parseInt(e.heightInput.value,10);i>e.parent.options.resizer.min_height&&(a.css(e.image,"height",i+"px"),e.resizeUseRatio&&(t=Math.round(i*e.ratio))>e.parent.options.resizer.min_width&&(a.css(e.image,"width",t+"px"),e.widthInput.value=t)),o.parent.events.fire(e.resizeHandler,"updatesize")},200)),e.editor.querySelector(".jodit_image_editor_keep_spect_ratio").addEventListener("change",function(){e.resizeUseRatio=this.checked}),e.editor.querySelector(".jodit_image_editor_keep_spect_ratio_crop").addEventListener("change",function(){e.cropUseRatio=this.checked}),e.parent.events.on(e.resizeHandler,"updatesize",function(){a.css(e.resizeHandler,{top:0,left:0,width:(e.image.offsetWidth||e.naturalWidth)+"px",height:(e.image.offsetHeight||e.naturalHeight)+"px"}),o.updateResizeBox()}),e.parent.events.on(e.cropHandler,"updatesize",function(){var t=a.css(e.cropHandler,"left"),o=a.css(e.cropHandler,"top"),i=e.cropHandler.offsetWidth,n=e.cropHandler.offsetHeight;0>t&&(t=0),0>o&&(o=0),t+i>e.cropImage.offsetWidth&&(i=e.cropImage.offsetWidth-t,e.cropUseRatio&&(n=i/e.ratio)),o+n>e.cropImage.offsetHeight&&(n=e.cropImage.offsetHeight-o,e.cropUseRatio&&(i=n*e.ratio)),a.css(e.cropHandler,{width:i,height:n,left:t,top:o,backgroundPosition:-t+"px "+-o+"px",backgroundSize:e.cropImage.offsetWidth+"px "+e.cropImage.offsetHeight+"px"}),e.updateCropBox()}),e.buttons.forEach(function(t){t.addEventListener("mousedown",function(e){e.stopImmediatePropagation()}),t.addEventListener("click",function(){var o={action:e.activeTab,box:"resize"===e.activeTab?e.resizeBox:e.cropBox};switch(t.getAttribute("data-action")){case"saveas":l.Promt(e.parent.i18n("Enter new name"),e.parent.i18n("Save in new file"),function(t){if(!a.trim(t))return l.Alert(e.parent.i18n("The name should not be empty")),!1;e.onSave(t,o,e.hide,function(e){l.Alert(e)})});break;case"save":e.onSave(void 0,o,e.hide,function(e){l.Alert(e)});break;case"reset":"resize"===e.activeTab?(a.css(e.image,{width:null,height:null}),e.widthInput.value=""+e.naturalWidth,e.heightInput.value=""+e.naturalHeight,e.parent.events.fire(e.resizeHandler,"updatesize")):e.showCrop()}})})},o.options=t.options.imageeditor,o.resizeUseRatio=o.options.resizeUseRatio,o.cropUseRatio=o.options.cropUseRatio,o.buttons=[a.dom('"),a.dom('"),a.dom('")],o.activeTab=o.options.resize?"resize":"crop",o.editor=a.dom('
      '+(o.options.resize?'
      ':"")+(o.options.crop?'
      ':"")+'
      '+(o.options.resize?'
      '+s.default.getIcon("resize")+t.i18n("Resize")+'
      ":"")+(o.options.crop?'
      '+s.default.getIcon("crop")+t.i18n("Crop")+'
      ":"")+"
      "),o.widthInput=o.editor.querySelector(".jodit_image_editor_width"),o.heightInput=o.editor.querySelector(".jodit_image_editor_height"),o.resize_box=o.editor.querySelector(".jodit_image_editor_area.jodit_image_editor_area_resize .jodit_image_editor_box"),o.crop_box=o.editor.querySelector(".jodit_image_editor_area.jodit_image_editor_area_crop .jodit_image_editor_box"),o.sizes=o.editor.querySelector(".jodit_image_editor_area.jodit_image_editor_area_crop .jodit_sizes"),o.resizeHandler=o.editor.querySelector(".jodit_image_editor_resizer"),o.cropHandler=o.editor.querySelector(".jodit_image_editor_croper"),o.dialog=new l.default(t),o.dialog.setContent(o.editor),o.dialog.setSize(o.options.width,o.options.height),o.dialog.setTitle(o.buttons),o.setHandlers(),o}return i(t,e),t}(n.default)},function(e,t,o){"use strict";var i=this&&this.__extends||function(){var e=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])};return function(t,o){function i(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(i.prototype=o.prototype,new i)}}();t.__esModule=!0;var n=o(3),r=o(5),a=o(0),s=o(2);t.default=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.focus=function(){t.isFocused()||(t.win.focus(),t.parent.editor.focus())},t.eachSelection=function(e){var o=t.win.getSelection();if(o.rangeCount){var i=o.getRangeAt(0),n=[],r=i.endContainer===t.parent.editor?t.parent.editor.childNodes[i.endOffset-1]:i.endContainer;s.default.find(i.startContainer===t.parent.editor?t.parent.editor.childNodes[i.startOffset]:i.startContainer,function(e){if(!e||s.default.isEmptyTextNode(e)||e instanceof HTMLElement&&e.classList.contains("jodit_selection_marker")||n.push(e),e===r)return!0},t.parent.editor,!0,"nextSibling",!1),n.forEach(function(t){e(t)})}},t}return i(t,e),t.prototype.__normalizeSelection=function(e,t){var o=this;this.cursorInTheEdge(!t,function(e){return e&&e.nodeType!==Node.TEXT_NODE&&e!==o.parent.editor},!0)&&(t?e.setStartAfter(e.startContainer):e.setEndBefore(e.endContainer))},t.prototype.insertCursorAtPoint=function(e,t){var o;this.clear();try{var i=null;if(this.doc.caretPositionFromPoint?(o=this.doc.caretPositionFromPoint(e,t),i=this.doc.createRange(),i.setStart(o.offsetNode,o.offset)):this.doc.caretRangeFromPoint&&(o=this.doc.caretRangeFromPoint(e,t),i=this.doc.createRange(),i.setStart(o.startContainer,o.startOffset)),null!==i&&void 0!==window.getSelection){i.collapse(!0);var n=this.win.getSelection();n.removeAllRanges(),n.addRange(i)}else if(void 0!==this.doc.body.createTextRange){var r=this.doc.body.createTextRange();r.moveToPoint(e,t),r.select()}return!0}catch(e){}return!1},t.prototype.clear=function(){a.$$(".jodit_selection_marker",this.parent.editor).forEach(function(e){e.parentNode.removeChild(e)})},t.prototype.restore=function(e){var t=this;if(void 0===e&&(e=[]),Array.isArray(e)){var o=this.win.getSelection();o.removeAllRanges(),a.each(e,function(e,i){var n=t.doc.createRange(),r=t.doc.getElementById(i.endId),a=t.doc.getElementById(i.startId);if(a){if(i.collapsed||!r){var s=a.previousSibling;s&&s.nodeType==Node.TEXT_NODE?n.setStart(s,s.nodeValue.length):n.setStartBefore(a),a.parentNode.removeChild(a),n.collapse(!0)}else n.setStartAfter(a),a.parentNode.removeChild(a),n.setEndBefore(r),r.parentNode.removeChild(r);o.addRange(n),t.__normalizeSelection(n,!0),t.__normalizeSelection(n,!1)}})}},t.prototype.save=function(){var e=this,t=this.win.getSelection();if(!t.rangeCount)return null;var o,i,r,a=function(t,o){void 0===o&&(o=!1);var i=t.cloneRange();i.collapse(o);var r=e.doc.createElement("span");return r.id="jodit_selection_marker_"+ +new Date+"_"+(""+Math.random()).slice(2),r.style.lineHeight="0",r.style.display="none",r.className="jodit_selection_marker jodit_selection_marker-"+(o?"start":"end"),r.appendChild(e.doc.createTextNode(n.INVISIBLE_SPACE)),i.insertNode(r),r},s=[],l=t.rangeCount,d=[];for(o=0;l>o;o+=1)d[o]=t.getRangeAt(o),d[o].collapsed?(i=a(d[o]),s[o]={startId:i.id,collapsed:!0}):(i=a(d[o],!0),r=a(d[o],!1),s[o]={startId:i.id,endId:r.id,collapsed:!1});for(t.removeAllRanges(),o=l-1;o>=0;--o){s[o].collapsed?(d[o].setStartAfter(this.doc.getElementById(s[o].startId)),d[o].collapse(!0)):(d[o].setStartAfter(this.doc.getElementById(s[o].startId)),d[o].setEndBefore(this.doc.getElementById(s[o].endId)));try{t.addRange(d[o].cloneRange())}catch(e){}}return s},t.prototype.isCollapsed=function(){var e,t=this.win.getSelection();for(e=0;t.rangeCount>e;e+=1)if(!t.getRangeAt(e).collapsed)return!1;return!0},t.prototype.isFocused=function(){return this.doc.hasFocus&&this.doc.hasFocus()&&this.parent.editor===this.doc.activeElement},t.prototype.current=function(){if(void 0!==this.win.getSelection){var e=this.win.getSelection();if(e.rangeCount>0){var t=e.getRangeAt(0),o=t.startContainer;if(t.startContainer.nodeType!==Node.TEXT_NODE&&t.startContainer===t.endContainer&&t.startOffset!==t.endOffset&&(o=t.startContainer.childNodes[t.startOffset]),s.default.contains(this.parent.editor,o))return o}}return!1},t.prototype.insertNode=function(e,t){if(void 0===t&&(t=!0),!(e instanceof Node))throw Error("Parameter node most be instance of Node");var o,i;this.focus(),this.win.getSelection?(o=this.win.getSelection(),this.isCollapsed()||this.parent.execCommand("Delete"),o.getRangeAt&&o.rangeCount&&(i=o.getRangeAt(0),function(e,t){for(var o=t;o;){if(o===e)return!0;o=o.parentNode}return!1}(this.parent.editor,i.commonAncestorContainer)?(i.deleteContents(),i.insertNode(e)):this.parent.editor.appendChild(e),t&&this.setCursorAfter(e))):Error("Jodit does'n support this browser"),this.parent.setEditorValue()},t.prototype.insertHTML=function(e){var t,o,i=this.doc.createElement("DIV"),n=this.doc.createDocumentFragment();for(this.isFocused()||this.parent.editor.focus(),"string"==typeof e?i.innerHTML=e:s.default.isNode(e)&&i.appendChild(e),t=i.lastChild;i.firstChild;)t=i.firstChild,n.appendChild(i.firstChild);for(this.insertNode(n,!1),this.setCursorAfter(t),o=this.parent.editor.lastChild;o&&o.nodeType===Node.TEXT_NODE&&o.previousSibling&&/^\s*$/.test(o.data);)o=o.previousSibling;t&&(o&&t===o&&1===t.nodeType&&this.parent.editor.appendChild(this.doc.createElement("br")),this.setCursorAfter(t))},t.prototype.insertImage=function(e,t){void 0===t&&(t={});var o,i="string"==typeof e?a.dom("",this.doc):a.dom(e,this.doc);this.isCollapsed()||this.parent.execCommand("Delete"),"string"==typeof e&&i.setAttribute("src",e),o=""+this.parent.options.imageDefaultWidth,o&&"auto"!==o&&0>(o+"").indexOf("px")&&0>(o+"").indexOf("%")&&(o+="px"),t.width=o,t&&"object"==typeof t&&a.each(t,function(e,t){i.style[t]=e});var n=function(){(i.offsetHeight>i.naturalHeight||i.offsetWidth>i.naturalWidth)&&(i.style.width="",i.style.height=""),i.removeEventListener("load",n)};i.addEventListener("load",n),i.complete&&n(),this.insertNode(i),this.parent.events.fire("afterInsertImage",[i])},t.prototype.setCursorAfter=function(e){var t=this;if(!(e instanceof Node))throw Error("Parameter node most be instance of Node");if(!s.default.up(e,function(e){return e===t.parent.editor||e.parentNode===t.parent.editor},this.parent.editor))throw Error("Node element must be in editor");var o=this.win.getSelection(),i=this.doc.createRange(),r=this.doc.createTextNode(n.INVISIBLE_SPACE);return e.nodeType!==Node.TEXT_NODE?(i.setStartAfter(e),i.insertNode(r),i.setStartAfter(r)):i.setStart(e,e.nodeValue.length),i.collapse(!0),o.removeAllRanges(),o.addRange(i),r},t.prototype.cursorInTheEdge=function(e,t,o){void 0===e&&(e=!1),void 0===t&&(t=!1),void 0===o&&(o=!1);var i=this.win.getSelection();if(!i.rangeCount)return!1;var r,l,d,c=i.getRangeAt(0),u=function(){return!1===o?e:!e},p=u()?c.startContainer:c.endContainer,f=!1,h=u()?c.startOffset:c.endOffset;if(!1===t)t=s.default.up(p,s.default.isBlock,this.parent.editor);else if("function"==typeof t)t=s.default.up(p,t,this.parent.editor);else if(!s.default.isOrContains(t,p))return null;if(!p)return!1;if(p.nodeType===Node.ELEMENT_NODE&&p.hasChildNodes()&&(f=h>p.childNodes.length-1,p=p.childNodes[Math.min(h,p.childNodes.length-1)]||p,h=f&&p.nodeType===Node.TEXT_NODE?p.nodeValue.length:0),p.nodeType===Node.TEXT_NODE&&(d=l=p.nodeValue,n.SPACE_REG_EXP_START.test(l)&&h&&(d=l.replace(n.INVISIBLE_SPACE_REG_EXP_START,""),h-=l.length-d.length),l=d,n.SPACE_REG_EXP_END.test(l)&&h&&(d=a.trim(l),h>d.length&&(h=d.length)),0>h&&(h=0)),p.nodeType===Node.TEXT_NODE&&(e?h>0:d.length>h))return!1;if(e&&p.nodeType===Node.ELEMENT_NODE&&(t&&p===t.firstChild||p===this.parent.editor.firstChild))return!0;if(!e&&p.nodeType===Node.ELEMENT_NODE&&(t&&p===t.lastChild||p===this.parent.editor.lastChild))return!0;if("TABLE"===p.nodeName||p.previousSibling&&"TABLE"===p.previousSibling.nodeName)return f&&!e||!f&&e;for(r=p,p.nodeType===Node.TEXT_NODE&&(e&&0===h?r=s.default.find(r,function(e){return!!e},t,!1,"previousSibling","lastChild"):e||h!==d.length||(r=s.default.next(r,function(e){return!!e},t)));r;){if(r.nodeType===Node.ELEMENT_NODE){if("BR"!==r.nodeName)return!1}else if(r.nodeType===Node.TEXT_NODE&&!/^[ \t\r\n]*$/.test(r.nodeValue)&&!s.default.isEmptyTextNode(r))return!1;r=e?s.default.find(r,function(e){return!!e},t,!1,"previousSibling","lastChild"):s.default.next(r,function(e){return!!e},t)}return!0},t.prototype.setCursorBefore=function(e){var t=this;if(!(e instanceof Node))throw Error("Parameter node most be instance of Node");if(!s.default.up(e,function(e){return e===t.parent.editor||e.parentNode===t.parent.editor},this.parent.editor))throw Error("Node element must be in editor");var o=this.win.getSelection(),i=this.doc.createRange(),r=this.doc.createTextNode(n.INVISIBLE_SPACE);return e.nodeType!==Node.TEXT_NODE?(i.setStartBefore(e),i.insertNode(r),i.selectNode(r)):i.setStart(e,e.nodeValue.length),i.collapse(!0),o.removeAllRanges(),o.addRange(i),r},t.prototype.setCursorIn=function(e,t){var o=this;if(void 0===t&&(t=!1),!(e instanceof Node))throw Error("Parameter node most be instance of Node");if(!s.default.up(e,function(e){return e===o.parent.editor||e.parentNode===o.parent.editor},this.parent.editor))throw Error("Node element must be in editor");var i=this.win.getSelection(),n=this.doc.createRange(),r=e,a=e;do{if(r.nodeType===Node.TEXT_NODE)break;a=r,r=r[t?"firstChild":"lastChild"]}while(r);n.selectNodeContents(r||a),n.collapse(t),i.removeAllRanges(),i.addRange(n)},t.prototype.select=function(e,t){var o=this;if(void 0===t&&(t=!1),!(e instanceof Node))throw Error("Parameter node most be instance of Node");if(!s.default.up(e,function(e){return e===o.parent.editor||e.parentNode===o.parent.editor},this.parent.editor))throw Error("Node element must be in editor");var i=this.win.getSelection(),n=this.doc.createRange();n[t?"selectNodeContents":"selectNode"](e),i.removeAllRanges(),i.addRange(n)},t}(r.default)},function(e,t,o){"use strict";t.__esModule=!0;var i=o(1),n=o(4),r=o(0),a=o(6);n.Config.prototype.fullsize=!1,n.Config.prototype.globalFullsize=!0,i.default.plugins.fullsize=function(e){var t=!1,o=function(){t?r.css(e.container,{height:window.innerHeight,width:window.innerWidth}):r.css(e.container,{height:null,width:null})},i=function(i){if(void 0===i&&(i=!e.container.classList.contains("jodit_fullsize")),t=i,e.container.classList.toggle("jodit_fullsize",i),e.toolbar){r.css(e.toolbar.container,"width","auto");var n=r.dom(a.default.getIcon(i?"shrink":"fullsize")),s=e.toolbar.container.querySelector(".jodit_toolbar_btn-fullsize a");n.classList.add("jodit_icon"),s.innerHTML="",s.appendChild(n)}if(e.options.globalFullsize){for(var l=e.container.parentNode;l&&!(l instanceof Document);)l.classList.toggle("jodit_fullsize_box",i),l=l.parentNode;o()}e.events.fire("afterResize")};e.options.fullsize&&i(!0),e.options.globalFullsize&&e.__on(window,"resize",o),e.events.on("toggleFullsize",i),e.events.on("beforeDestruct",function(){i(!1)})}},function(e,t,o){"use strict";t.__esModule=!0,o(1).default.plugins.AutoFocus=function(e){var t;e.events.on("afterInit",function(){e.options.autofocus&&(t=setTimeout(e.selection.focus,300))}).on("beforeDestruct",function(){clearTimeout(t)})}},function(e,t,o){"use strict";t.__esModule=!0;var i=o(1),n=o(3),r=o(0),a=o(2);i.default.plugins.backspace=function(e){e.events.on("afterCommand",function(t){if("delete"===t){var o=e.selection.current();o&&o.firstChild&&"BR"===o.firstChild.tagName&&o.removeChild(o.firstChild),r.trim(e.editor.innerText)||e.editor.querySelector("img")||(e.editor.innerHTML="",e.selection.setCursorIn(e.editor))}}),e.events.on("keydown",function(t){if(t.which===n.KEY_BACKSPACE||t.keyCode===n.KEY_DELETE){if(!e.selection.isCollapsed())return e.execCommand("Delete"),!1;var o=e.win.getSelection(),i=!!o.rangeCount&&o.getRangeAt(0);if(i&&0!==i.startOffset&&i.startContainer.nodeType===Node.TEXT_NODE){for(var r=i.startContainer,s=r.nodeValue,l=i.startOffset;l>=0&&s[l-1]===n.INVISIBLE_SPACE;)l-=1;if(l!==i.startOffset){var d=i.startOffset;if(s=s.substr(0,l)+s.substr(d),r.nodeValue=s,s)return void i.setStart(r,l)}if(!r.previousSibling&&0===l){var c=a.default.prev(r,a.default.isBlock,e.editor);if(c){e.selection.setCursorIn(c,!1);var u=a.default.up(r,a.default.isBlock,e.editor);return u.innerHTML||u.parentNode.removeChild(u),!1}}}}})}},function(e,t,o){"use strict";t.__esModule=!0;var i=o(1),n=o(4),r=o(3),a=o(0),s=o(2);n.Config.prototype.cleanHTML={replaceNBSP:!0,cleanOnPaste:!0,allowTags:!1},i.default.plugins.cleanHTML=function(e){if(e.options.cleanHTML.cleanOnPaste&&e.events.on("processPaste",function(e,t){return a.cleanFromWord(t)}),e.options.cleanHTML.allowTags){var t=/([^\[]*)\[([^\]]+)]/,o=/[\s]*,[\s]*/,i=/^(.*)[\s]*=[\s]*(.*)$/,n={};"string"==typeof e.options.cleanHTML.allowTags?e.options.cleanHTML.allowTags.split(o).map(function(e){e=a.trim(e);var r=t.exec(e),s={},l=function(e){e=a.trim(e);var t=i.exec(e);t?s[t[1]]=t[2]:s[e]=!0};if(r){var d=r[2].split(o);r[1]&&(d.map(l),n[r[1].toUpperCase()]=s)}else n[e.toUpperCase()]=!0}):n=e.options.cleanHTML.allowTags,e.events.on("beforeSetElementValue",function(t){if(e.getMode()===r.MODE_WYSIWYG){var o=s.default.create("div","",e.doc),i=void 0,a=[],l=void 0,d=void 0;for(o.innerHTML=t.value,i=o.firstChild;i;){if(i.tagName){if(!n[i.tagName]){a.push(i),i=s.default.next(i,function(e){return!!e},o,!0);continue}if(!0!==n[i.tagName]&&i.attributes&&i.attributes.length){for(l=[],d=0;i.attributes.length>d;d+=1)(!n[i.tagName][i.attributes[d].name]||!0!==n[i.tagName][i.attributes[d].name]&&n[i.tagName][i.attributes[d].name]!==i.attributes[d].value)&&l.push(i.attributes[d].name);for(d=0;l.length>=d;d+=1)i.removeAttribute(l[d])}}i=s.default.next(i,function(e){return!!e},o,!0)}for(d=0;a.length>d;d+=1)a[d].parentNode&&a[d].parentNode.removeChild(a[d]);t.value=o.innerHTML}})}e.events.on("afterCommand",function(t){var o,i,n,a=e.selection;switch(t){case"insertHorizontalRule":(o=e.editor.querySelector("hr[id=null]"))&&(i=s.default.next(o,s.default.isBlock,e.editor,!1),i||(i=s.default.create(e.options.enter,"",e.doc),s.default.after(o,i)),a.setCursorIn(i));break;case"removeFormat":if(i=a.current(),n=function(t){return t.nodeType===Node.ELEMENT_NODE?(t.hasAttribute("style")&&t.removeAttribute("style"),"FONT"===t.tagName&&(s.default.each(t,n),t=s.default.replace(t,"span",!1,!1,e.doc)),t.normalize&&t.normalize()):e.options.cleanHTML.replaceNBSP&&t.nodeType===Node.TEXT_NODE&&t.nodeValue.match(r.SPACE_REG_EXP)&&(t.nodeValue=t.nodeValue.replace(r.SPACE_REG_EXP," ")),t},a.isCollapsed())for(;i&&i.nodeType!==Node.ELEMENT_NODE&&i!==e.editor;)i=n(i),i=i.parentNode;else e.win.getSelection().removeAllRanges()}})}},function(e,t,o){"use strict";t.__esModule=!0;var i=o(1),n=o(12),r=o(0),a=o(2);i.default.plugins.color=function(e){e.events.on("beforeCommand",function(t,o,i){if(/forecolor|background/.test(t)){var s=n.wrapAndSelect(e,a.default.create("span","",e.doc),"span|strong|i|em"),l=r.normalizeColor(i);switch(t){case"background":s.style.backgroundColor=l||"transparent";break;case"forecolor":s.style.color=l||"transparent"}return e.setEditorValue(),!1}})}},function(e,t,o){"use strict";t.__esModule=!0;var i=o(1),n=o(0),r=o(3),a=o(2);t.insertParagraph=function(e,t,o){o||(o=e.options.enter);var i=e.doc.createElement(o);return i.appendChild(e.doc.createTextNode(r.INVISIBLE_SPACE)),e.selection.insertNode(i,!1),e.selection.setCursorIn(i),t&&t.parentNode&&t.parentNode.removeChild(t),i},i.default.plugins.enter=function(e){e.events.on("keyup",function(){var t=e.selection.current();if(!1!==t){var o=a.default.up(t,function(t){return t.tagName===e.options.enter.toUpperCase()},e.editor);o&&a.default.all(o,function(o){o.nodeType===Node.TEXT_NODE&&r.INVISIBLE_SPACE_REG_EXP.test(o.nodeValue)&&0!==o.nodeValue.replace(r.INVISIBLE_SPACE_REG_EXP,"").length&&(o.nodeValue=o.nodeValue.replace(r.INVISIBLE_SPACE_REG_EXP,""),o===t&&e.selection.setCursorAfter(o))})}}),e.events.on("keydown",function(o){if(o.which===r.KEY_ENTER||o.keyCode===r.KEY_ENTER){e.selection.isCollapsed()||e.execCommand("Delete"),e.selection.focus();var i=e.selection.current(),s=e.win.getSelection(),l=s.rangeCount?s.getRangeAt(0):e.doc.createRange();i||(i=a.default.create("text",r.INVISIBLE_SPACE,e.doc),e.editor.appendChild(i),l.selectNode(i),s.removeAllRanges(),s.addRange(l));var d=void 0,c=!!i&&a.default.up(i,a.default.isBlock,e.editor);if(!c&&i&&(c=a.default.wrap(i,e.options.enter,e),s=e.win.getSelection(),l=s.rangeCount?s.getRangeAt(0):e.doc.createRange()),c){if(!a.default.canSplitBlock(c)){var u=e.doc.createElement("br");return e.selection.insertNode(u,!1),e.selection.setCursorAfter(u),!1}if("LI"===c.nodeName&&0===n.trim(c.textContent||c.innerText).length){var p=a.default.closest(c,"ol|ul",e.editor);if(a.default.prev(c,function(e){return e&&"LI"===e.tagName},p))if(a.default.next(c,function(e){return e&&"LI"===e.tagName},p)){var f=e.doc.createRange();f.setStartBefore(p),f.setEndAfter(c);var h=f.extractContents();p.parentNode.insertBefore(h,p),d=e.selection.setCursorBefore(p)}else d=e.selection.setCursorAfter(p);else d=e.selection.setCursorBefore(p);return c.parentNode.removeChild(c),t.insertParagraph(e,d),n.$$("li",p).length||p.parentNode.removeChild(p),!1}if(e.selection.cursorInTheEdge(!0))d=e.selection.setCursorBefore(c),t.insertParagraph(e,d,"LI"===c.nodeName?"li":e.options.enter),e.selection.setCursorIn(c,!0);else if(e.selection.cursorInTheEdge(!1))d=e.selection.setCursorAfter(c),t.insertParagraph(e,d,"LI"===c.nodeName?"li":e.options.enter);else{var f=e.doc.createRange();f.setStartBefore(c),f.setEnd(l.startContainer,l.startOffset);var h=f.extractContents();c.parentNode.insertBefore(h,c),e.selection.setCursorIn(c,!0)}}else t.insertParagraph(e);return!1}})}},function(e,t,o){"use strict";t.__esModule=!0;var i=o(1),n=o(4),r=o(0);n.Config.prototype.showMessageErrors=!0,n.Config.prototype.showMessageErrorTime=3e3,n.Config.prototype.showMessageErrorOffsetPx=3,i.default.plugins.errorMessages=function(e){if(e.options.showMessageErrors){var t,o=r.dom('
      '),i=function(){t=5,[].slice.call(o.childNodes).forEach(function(i){r.css(o,"bottom",t+"px"),t+=i.offsetWidth+e.options.showMessageErrorOffsetPx})};e.workplace.appendChild(o),e.events.on("errorMessage",function(t,n,a){var s=r.dom('
      '+t+"
      ");o.appendChild(s),i(),setTimeout(function(){s.classList.remove("active"),setTimeout(function(){o.removeChild(s),i()},300)},a||e.options.showMessageErrorTime)})}}},function(e,t,o){"use strict";t.__esModule=!0;var i=o(1),n=o(12),r=o(0),a=o(2);i.default.plugins.font=function(e){e.events.on("beforeCommand",function(t,o,i){if(/font/.test(t)){var s=n.wrapAndSelect(e,a.default.create("span","",e.doc),"span|strong|i|em");switch(t){case"fontsize":s.style.fontSize=r.normalizeSize(i);break;case"fontname":s.style.fontFamily=i}return e.setEditorValue(),!1}})}},function(e,t,o){"use strict";t.__esModule=!0;var i=o(1),n=o(2);i.default.plugins.formatblock=function(e){e.events.on("beforeCommand",function(t,o,i){if("formatblock"===t){e.selection.focus();var r=e.selection.save();return e.selection.eachSelection(function(t){var o=!!t&&n.default.up(t,n.default.isBlock,e.editor);if(!o&&t&&(o=n.default.wrap(t,e.options.enter,e)),!o)return!1;n.default.replace(o,i,!0,!1,e.doc)}),e.selection.restore(r),e.setEditorValue(),!1}})}},function(e,t,o){"use strict";t.__esModule=!0,o(1).default.plugins.imageInlineToolbar=function(e){e.events.on("click",function(e){e.target&&"IMG"===e.target.tagName&&alert(1)})}},function(e,t,o){"use strict";t.__esModule=!0;var i=o(1),n=o(0);i.default.plugins.imageProcessor=function(e){var t,o=function(o){e.__off(o,".imageProcessor").__on(o,"dragstart.imageProcessor",function(e){t=o,e.preventDefault()}).__on(o,"mousedown.imageProcessor",function(){t=o})};e.__on(e.editor,"mousemove",n.throttle(function(o){t&&e.selection.insertCursorAtPoint(o.clientX,o.clientY)},e.options.observer.timeout)).__on(window,"mouseup",function(){t=!1}).__on(e.editor,"mouseup",function(o){var i,n=t;if(n&&o.target!==n){if(!1===e.selection.insertCursorAtPoint(o.clientX,o.clientY))return!1;i=n.parentNode&&"A"===n.parentNode.tagName&&!n.parentNode.textContent.length?n.parentNode:n,i.parentNode.removeChild(i),e.selection.insertImage(i),e.selection.select(i)}}),e.events.on("change afterInit",n.debounce(function(){n.$$("img",e.editor).forEach(function(e){e.__jodit_imageprocessor_binded||(e.__jodit_imageprocessor_binded=!0,o(e))})},e.options.observer.timeout))}},function(e,t,o){"use strict";t.__esModule=!0;var i=o(1),n=o(4),r=o(0),a=o(7),s=o(6),l=o(2),d=o(9),c=d.Widget.TabsWidget,u=d.Widget.ImageSelectorWidget;n.Config.prototype.image={openOnDblClick:!0,editSrc:!0,useImageEditor:!0,editTitle:!0,editAlt:!0,editLink:!0,editSize:!0,editMargins:!0,editClass:!0,editStyle:!0,editId:!0,editAlign:!0,showPreview:!0,selectImageAfterClose:!0},i.default.plugins.imageProperties=function(e){var t=function(t){var o,n=this,d=new a.default(e),p=r.dom(''+s.default.getIcon("cancel")+""+e.i18n("Cancel")+""),f=r.dom(''+s.default.getIcon("check")+""+e.i18n("Ok")+""),h={remove:r.dom(''+s.default.getIcon("bin")+" "+e.i18n("Delete")+"")},g=r.dom('
      '),v=r.dom('
      "),m=r.dom('
      '+(e.options.filebrowser.ajax.url||e.options.uploader.url?'
      '+(e.options.filebrowser.ajax.url||e.options.uploader.url?''+s.default.getIcon("image")+"":"")+(e.options.image.useImageEditor&&void 0!==i.default.modules.ImageEditor&&e.options.filebrowser.ajax.url?''+s.default.getIcon("crop")+"":"")+"
      ":"")+'
      '+e.i18n("Open link in new tab")+"
      "),_=n.naturalWidth/n.naturalHeight||1,b=g.querySelector("#imageWidth"),y=g.querySelector("#imageHeight"),w=function(){n.style.cssFloat&&-1!==["left","right"].indexOf(n.style.cssFloat.toLowerCase())?r.val(g,"#align",r.css(n,"float")):"block"===r.css(n,"display")&&"auto"===n.style.marginLeft&&"auto"===n.style.marginRight&&r.val(g,"#align","center")},q=function(){r.val(g,"#id",n.getAttribute("id"))},x=function(){r.val(g,"#style",n.getAttribute("style"))},E=function(){r.val(g,"#classes",(n.getAttribute("class")||"").replace(/jodit_focused_image[\s]*/,""))},C=function(){if(e.options.image.editMargins){var t=!1;r.$$(".margins",g).forEach(function(e){var o=n.style[e.id];o&&((/^[0-9]+$/.test(o)||/^[0-9]+px$/i.test(o))&&(o=parseInt(o,10)),e.value=""+o||"",t||"marginTop"===e.id||e.value===r.val(g,"#marginTop")||(g.querySelector(".jodit_lock_margin").innerHTML=s.default.getIcon("unlock"),r.$$(".margins",g).forEach(function(e){return e.classList.remove("disabled")}),t=!0))})}},T=function(){b.value=""+n.offsetWidth,y.value=""+n.offsetHeight},A=function(){n.hasAttribute("title")&&r.val(g,"#imageTitle",n.getAttribute("title")),n.hasAttribute("alt")&&r.val(g,"#imageAlt",n.getAttribute("alt")),l.default.closest(n,"a",e.editor)&&(r.val(g,"#imageLink",l.default.closest(n,"a",e.editor).getAttribute("href")),g.querySelector("#imageLinkOpenInNewTab").checked="_blank"===l.default.closest(n,"a",e.editor).getAttribute("target"))},z=function(){r.val(g,"#imageSrc",n.getAttribute("src")),g.querySelector("#imageViewSrc").setAttribute("src",n.getAttribute("src"))},L=function(){z(),A(),T(),C(),E(),q(),w(),x()},j=!0,S=!0,k={};return k[e.i18n("Image")]=m,k[e.i18n("Advansed")]=v,g.querySelector("#tabsbox").appendChild(c(e,k)),L(),e.events.on(d,"afterClose",function(){d.destruct(),n.parentNode&&e.options.image.selectImageAfterClose&&e.selection.select(n)}),h.remove.addEventListener("click",function(){n.parentNode.removeChild(n),d.close()}),r.$$(".jodit_use_image_editor",m).forEach(function(t){t.addEventListener("mousedown",function(){if(e.options.image.useImageEditor){var t=n.getAttribute("src"),o=document.createElement("a"),i=function(){if(o.host!==location.host)return void a.Confirm(e.i18n("You can only edit your own images. Download this image on the host?"),function(t){t&&e.uploader&&e.uploader.uploadRemoteImage(""+o.href,function(t){a.Alert(e.i18n("The image has been successfully uploaded to the host!"),function(){"string"==typeof t.newfilename&&(n.setAttribute("src",t.baseurl+t.newfilename),z())})},function(t){a.Alert(e.i18n("There was an error loading %s",t.message))})})};o.href=t,e.getInstance("FileBrowser").getPathByUrl(""+o.href,function(i,r,s){e.getInstance("FileBrowser").openImageEditor(o.href,r,i,s,function(){var e=(new Date).getTime();n.setAttribute("src",t+(-1!==t.indexOf("?")?"":"?")+"&_tmp="+e),z()},a.Alert)},function(e){a.Alert(e,i)})}})}),r.$$(".jodit_rechange",m).forEach(function(t){t.addEventListener("mousedown",function(o){t.classList.toggle("active"),e.toolbar.openPopup(t,u(e,{upload:function(t){t.files&&t.files.length&&n.setAttribute("src",t.baseurl+t.files[0]),L(),e.toolbar.closeAll()},filebrowser:function(t){t&&t.files&&Array.isArray(t.files)&&t.files.length&&(n.setAttribute("src",t.files[0]),e.toolbar.closeAll(),L())}},n),!0),o.stopPropagation()})}),g.querySelector(".jodit_lock_helper.jodit_lock_size").addEventListener("click",function(){j=!j,this.innerHTML=s.default.getIcon(j?"lock":"unlock"),e.__fire(b,"change")}),g.querySelector(".jodit_lock_helper.jodit_lock_margin").addEventListener("click",function(){S=!S,this.innerHTML=s.default.getIcon(S?"lock":"unlock"),S?r.$$(".margins",g).forEach(function(e){e.matches("#marginTop")||e.setAttribute("disabled","true")}):r.$$(".margins",g).forEach(function(e){e.matches("#marginTop")||e.removeAttribute("disabled")})}),e.__on(r.$$("#imageWidth,#imageHeight",g),"change keydown mousedown paste",function(e){j&&(clearTimeout(o),o=setTimeout(function(){var t=parseInt(b.value,10),o=parseInt(y.value,10);"imageWidth"===e.target.getAttribute("id")?y.value=""+Math.round(t/_):b.value=""+Math.round(o*_)},100))}),d.setTitle([e.i18n("Image properties"),h.remove]),d.setContent(g),p.addEventListener("click",function(){d.close()}),f.addEventListener("click",function(){var t;if(e.options.image.editStyle&&(r.val(g,"#style")?n.setAttribute("style",r.val(g,"#style")):n.removeAttribute("style")),!r.val(g,"#imageSrc"))return n.parentNode.removeChild(n),void d.close();n.setAttribute("src",r.val(g,"#imageSrc")),r.val(g,"#imageTitle")?n.setAttribute("title",r.val(g,"#imageTitle")):n.removeAttribute("title"),r.val(g,"#imageAlt")?n.setAttribute("alt",r.val(g,"#imageAlt")):n.removeAttribute("alt"),r.val(g,"#imageLink")?(l.default.closest(n,"a",e.editor)||l.default.wrap(n,"a",e),t=l.default.closest(n,"a",e.editor),t.setAttribute("href",r.val(g,"#imageLink")),g.querySelector("#imageLinkOpenInNewTab").checked?t.setAttribute("target","_blank"):t.removeAttribute("target")):l.default.closest(n,"a",e.editor)&&(t=l.default.closest(n,"a",e.editor),t.parentNode.replaceChild(n,t));var o=function(e){return e=r.trim(e),/^[0-9]+$/.test(e)?e+"px":e};r.css(n,{width:r.trim(b.value)?o(b.value):null,height:r.trim(y.value)?o(y.value):null}),e.options.image.editMargins&&(g.querySelector(".jodit_lock_margin").firstChild.classList.contains("jodit_icon_unlock")?r.$$(".margins",g).forEach(function(){r.css(n,this.id,o(this.value))}):r.css(n,"margin",o(r.val(g,"#marginTop")))),e.options.image.editClass&&(r.val(g,"#classes")?n.setAttribute("class",r.val(g,"#classes")):n.removeAttribute("class")),e.options.image.editId&&(r.val(g,"#id")?n.setAttribute("id",r.val(g,"#id")):n.removeAttribute("id"));var i=function(){"block"===r.css(n,"display")&&r.css(n,"display",""),"auto"===n.style.marginLeft&&"auto"===n.style.marginRight&&(n.style.marginLeft="",n.style.marginRight="")};e.options.image.editAlign&&(r.val(g,"#align")?-1!==["right","left"].indexOf(r.val(g,"#align").toLowerCase())?(r.css(n,"float",r.val(g,"#align")),i()):(r.css(n,"float",""),r.css(n,{display:"block","margin-left":"auto","margin-right":"auto"})):(r.css(n,"float")&&-1!==["right","left"].indexOf(r.css(n,"float").toLowerCase())&&r.css(n,"float",""),i())),n.getAttribute("style")||n.removeAttribute("style"),d.close()}),d.setFooter([f,p]),d.setSize(500),d.open(),t&&t.preventDefault(),!1};e.options.image.openOnDblClick?e.__on(e.editor,"dblclick","img",t):e.__on(e.editor,"dblclick","img",function(){e.selection.select(this)}),e.events.on(e,"openImageProperties",function(e){t.call(e)})}},function(e,t,o){"use strict";t.__esModule=!0;var i=o(1),n=o(6),r=o(4),a=o(0),s=o(2),l=o(8),d=o(9),c=d.Widget.ColorPickerWidget,u=d.Widget.TabsWidget;r.Config.prototype.popup={img:[{name:"bin",tooltip:"Delete",exec:function(e,t){t.parentNode.removeChild(t)}},{name:"pencil",exec:function(e,t){"img"===t.tagName.toLowerCase()&&e.events.fire(e,"openImageProperties",[t])},tooltip:"Edit"},{name:"valign",list:["Top","Middle","Bottom"],tooltip:"Vertical align",exec:function(e,t,o){if("img"===t.tagName.toLowerCase()){var i=o.args[1].toLowerCase();a.css(t,"vertical-align",i)}}},{name:"left",list:["Left","Right","Center","Normal"],exec:function(e,t,o){if("img"===t.tagName.toLowerCase()){var i=function(){"block"===a.css(t,"display")&&a.css(t,"display",""),"auto"===t.style.marginLeft&&"auto"===t.style.marginRight&&(t.style.marginLeft="",t.style.marginRight="")},n=o.args[1].toLowerCase();"normal"!==n?-1!==["right","left"].indexOf(n)?(a.css(t,"float",n),i()):(a.css(t,"float",""),a.css(t,{display:"block","margin-left":"auto","margin-right":"auto"})):(a.css(t,"float")&&-1!==["right","left"].indexOf(a.css(t,"float").toLowerCase())&&a.css(t,"float",""),i())}},tooltip:"Horizontal align"}],table:[{name:"brush",popup:function(e,t,o,i){var n,r,s,d,p=l.default.getAllSelectedCells(t);return!!p.length&&(s=a.css(p[0],"color"),d=a.css(p[0],"background-color"),n=c(e,function(e){p.forEach(function(t){a.css(t,"background-color",e)}),i()},d),r=c(e,function(e){p.forEach(function(t){a.css(t,"color",e)}),i()},s),u(e,{Background:n,Text:r}))},tooltip:"Background"},{name:"valign",list:["Top","Middle","Bottom"],exec:function(e,t,o){var i=o.args[1].toLowerCase();l.default.getAllSelectedCells(t).forEach(function(e){a.css(e,"vertical-align",i)})},tooltip:"Vertical align"},{name:"splitv",command:"tablesplitv",tooltip:"Split vertical"},{name:"splitg",command:"tablesplitg",tooltip:"Split horizontal"},"\n",{name:"merge",command:"tablemerge",tooltip:"Merge"},{name:"addcolumn",list:{tableaddcolumnbefore:"Insert column before",tableaddcolumnafter:"Insert column after"},exec:function(e,t,o){e.execCommand(o.args[0].toLowerCase(),!1,t)},tooltip:"Add column"},{name:"addrow",list:{tableaddrowbefore:"Insert row above",tableaddrowafter:"Insert row below"},exec:function(e,t,o){e.execCommand(o.args[0].toLowerCase(),!1,t)},tooltip:"Add row"},{name:"bin",list:{tablebin:"Delete table",tablebinrow:"Delete row",tablebincolumn:"Delete column",tableempty:"Empty cell"},exec:function(e,t,o){e.execCommand(o.args[0].toLowerCase(),!1,t)},tooltip:"Delete"}]},i.default.plugins.Popup=function(e){var t,o=new n.default(e),i=a.dom('
      '),r=function(){i.classList.remove("active")},l=function(t,n,r){var s=t.tagName.toLowerCase();void 0!==e.options.popup[s]&&(i.innerHTML="",o.build(e.options.popup[s],i,t),i.classList.add("active"),a.css(i,{left:n+"px",top:r+"px",marginLeft:-Math.round(i.offsetWidth/2)+"px"}))},d=function(o,i,n){clearTimeout(t),e.options.observer.timeout?t=setTimeout(l.bind(e,o,i,n),e.options.observer.timeout):l(o,i,n)};e.container.appendChild(i),e.events.on("hidePopup afterCommand keydown",r),e.events.on("showPopap",d),e.events.on("beforeDestruct",function(){clearTimeout(t)}),e.__on(i,"mouseup",function(e){e.stopPropagation()});var c=!1;e.__on(e.editor,"mousedown",function(t){if("IMG"===t.target.tagName||s.default.closest(t.target,"table",e.editor)){var o="IMG"===t.target.tagName?t.target:s.default.closest(t.target,"table",e.editor),i=a.offset(o);d(o,Math.round(i.left+o.offsetWidth/2),Math.round(i.top+o.offsetHeight)),c=!0}else c=!1}),e.__on(window,"mouseup",function(e){c||r(),c=!1})}},function(e,t,o){"use strict";t.__esModule=!0;var i=o(1),n=o(0),r=o(2);i.default.plugins.justify=function(e){e.events.on("beforeCommand",function(t){if(/justify/.test(t)){var o=function(e){if(e instanceof HTMLElement)switch(t){case"justifyfull":e.style.textAlign="justify";break;case"justifyright":e.style.textAlign="right";break;case"justifyleft":e.style.textAlign="left";break;case"justifycenter":e.style.textAlign="center"}};return e.selection.focus(),e.selection.eachSelection(function(t){if(!t&&e.editor.querySelector(".jodit_selected_cell"))return n.$$(".jodit_selected_cell",e.editor).forEach(o),!1;if(t instanceof Node){var i=!!t&&r.default.up(t,r.default.isBlock,e.editor);!i&&t&&(i=r.default.wrap(t,e.options.enter,e)),o(i)}}),!1}})}},function(e,t,o){"use strict";t.__esModule=!0;var i=o(1),n=o(4),r=o(0),a=o(2);n.Config.prototype.link={processVideoLink:!0,processPastedLink:!0,openLinkDialogAfterPost:!0,removeLinkAfterFormat:!0},i.default.plugins.link=function(e){e.options.link.processPastedLink&&e.events.on("processPaste",function(t,o){if(r.isURL(o)){var i=void 0;return r.convertMediaURLToVideoEmbed(o)!==o?i=r.convertMediaURLToVideoEmbed(o):(i=e.doc.createElement("a"),i.setAttribute("href",o),i.innerText=o,e.options.link.openLinkDialogAfterPost&&setTimeout(function(){},100)),i}}),e.options.link.removeLinkAfterFormat&&e.events.on("afterCommand",function(t){var o,i,n=e.selection;"removeFormat"===t&&(i=n.current(),i&&"A"!==i.tagName&&(i=a.default.closest(i,"A",e.editor)),i&&"A"===i.tagName&&(o=i.innerHTML===i.innerText?a.default.create("text",i.innerText,e.doc):a.default.create("span",i.innerHTML,e.doc),i.parentNode.replaceChild(o,i),e.selection.setCursorIn(o,!0)))})}},function(e,t,o){"use strict";t.__esModule=!0;var i=o(1),n=o(2);i.default.plugins.orderedlist=function(e){e.events.on("afterCommand",function(t){if(/insert(un)?orderedlist/i.test(t)){var o=n.default.up(e.selection.current(),function(e){return/^UL|OL$/i.test(e.tagName)},e.editor);if(o&&o.parentNode&&"P"===o.parentNode.tagName){var i=e.selection.save();n.default.unwrap(o.parentNode),[].slice.call(o.childNodes).forEach(function(e){e.lastChild&&e.lastChild.nodeType===Node.ELEMENT_NODE&&"BR"===e.lastChild.tagName&&e.removeChild(e.lastChild)}),e.selection.restore(i)}e.setEditorValue()}})}},function(e,t,o){"use strict";t.__esModule=!0;var i=o(1),n=o(7),r=o(0),a=o(4),s=o(3);a.Config.prototype.askBeforePasteHTML=!0,i.default.plugins.paste=function(e){e.editor.addEventListener("paste",function(t){if(!1===e.events.fire("beforePaste",[t]))return t.preventDefault(),!1;if(t&&t.clipboardData&&t.clipboardData.getData){var o=void 0,i=t.clipboardData.types,n="",a="";if(Array.isArray(i))for(o=0;i.length>o;o+=1)n+=i[o]+";";else n=i;/text\/html/.test(n)?a=t.clipboardData.getData("text/html"):/text\/rtf/.test(n)&&r.browser("safari")?a=t.clipboardData.getData("text/rtf"):/text\/plain/.test(n)&&!r.browser("mozilla")&&(a=r.htmlentities(t.clipboardData.getData(s.TEXT_PLAIN)).replace(/\n/g,"
      ")),(""!==a||a instanceof Node)&&(a=e.events.fire("processPaste",[t,a]),("string"==typeof a||a instanceof Node)&&e.selection.insertHTML(a),t.preventDefault(),t.stopPropagation())}return!1!==e.events.fire("afterPaste",[t])&&void 0}),e.options.askBeforePasteHTML&&e.events.on("beforePaste",function(t){if(t&&t.clipboardData&&t.clipboardData.getData&&t.clipboardData.types[0]===s.TEXT_PLAIN){var o=t.clipboardData.getData(s.TEXT_PLAIN);if(r.isHTML(o))return n.Confirm(e.i18n("Your code is similar to HTML. Paste as HTML?"),e.i18n("Paste as HTML"),function(t){e.selection.insertHTML(t?o:r.htmlspecialchars(o)),e.setEditorValue()}),!1}})}},function(e,t,o){"use strict";t.__esModule=!0;var i=o(1),n=o(4),r=o(3),a=o(0);n.Config.prototype.showPlaceholder=!0,n.Config.prototype.useInputsPlaceholder=!0,n.Config.prototype.placeholder="Type something",i.default.plugins.placeholder=function(e){var t,o;if(e.options.showPlaceholder){this.destruct=function(){t.parentNode.removeChild(t),clearTimeout(o)};var i=function(){var o=0,i=0,n=e.win.getComputedStyle(e.editor);if(e.editor.firstChild&&e.editor.firstChild.nodeType===Node.ELEMENT_NODE){var r=e.win.getComputedStyle(e.editor.firstChild);o=parseInt(r.getPropertyValue("margin-top"),10),i=parseInt(r.getPropertyValue("margin-left"),10),t.style.fontSize=parseInt(r.getPropertyValue("font-size"),10)+"px",t.style.lineHeight=r.getPropertyValue("line-height")}else t.style.fontSize=parseInt(n.getPropertyValue("font-size"),10)+"px",t.style.lineHeight=n.getPropertyValue("line-height");a.each({display:"block",marginTop:Math.max(parseInt(n.getPropertyValue("margin-top"),10),o),marginLeft:Math.max(parseInt(n.getPropertyValue("margin-left"),10),i)},function(e,o){t.style[e]=o})},n=function(){t.style.display="none"},s=function(){if(e.editor)return e.getMode()!==r.MODE_WYSIWYG?n():void(e.getEditorValue()?n():i())};t=a.dom(''+e.i18n(e.options.placeholder)+""),e.options.useInputsPlaceholder&&e.element.hasAttribute("placeholder")&&(t.innerHTML=e.element.getAttribute("placeholder")),e.workplace.appendChild(t),i(),e.events.on("change keyup mouseup keydown mousedown afterSetMode",function(){s(),o=setTimeout(s,1)})}}},function(e,t,o){"use strict";t.__esModule=!0;var i=o(1),n=o(14),r=o(3),a=o(0);i.default.plugins.redoundo=function(e){var t=function(){e.events.fire("canRedo",[o.stack.canRedo()]),e.events.fire("canUndo",[o.stack.canUndo()])};e.events.on("keydown",function(t){if(a.ctrlKey(t)&&(t.which===r.KEY_Z||t.which===r.KEY_Y))return e.execCommand(t.which===r.KEY_Z?"Undo":"Redo"),t.preventDefault(),t.stopImmediatePropagation(),!1},null,!0);var o=new n.default(e);e.events.on("afterSetMode",function(){e.getMode()===r.MODE_WYSIWYG&&t()}),e.events.on("beforeCommand",function(i){if("redo"===i||"undo"===i)return e.getMode()===r.MODE_WYSIWYG&&(o.stack["can"+i.substr(0,1).toUpperCase()+i.substr(1)]()&&o.stack[i](),t()),!1}),this.destruct=function(){o.destruct()}}},function(e,t){},function(e,t,o){"use strict";t.__esModule=!0;var i=o(1),n=o(4),r=o(0),a=o(2);n.Config.prototype.useIframeResizer=!0,n.Config.prototype.useTableResizer=!0,n.Config.prototype.useImageResizer=!0,n.Config.prototype.resizer={min_width:10,min_height:10},i.default.plugins.Resizer=function(e){var t,o,i,n,s,l,d,c,u,p,f,h=!1,g=!1,v=r.dom(''),m=function(){h=!1,g=!1,o=null,v.style.display="none"},_=function(){if(g){var t=r.offset(o);v.style.top=t.top-1+"px",v.style.left=t.left-1+"px",v.style.width=o.offsetWidth+"px",v.style.height=o.offsetHeight+"px",e.events.fire(o,"changesize")}},b=function(){g=!0,v.style.display="block",_()},y=function(t){var i;if("IFRAME"===t.tagName)if(t.parentNode&&t.parentNode.classList.contains("jodit_iframe_wrapper"))t=t.parentNode;else{i=r.dom('
      '),i.style.display="inline-block"===t.style.display?"inline-block":"block",i.style.width=t.offsetWidth+"px",i.style.height=t.offsetHeight+"px",a.default.wrap(t,i,e);var n=t;e.events.on(i,"changesize",function(){n.setAttribute("width",i.offsetWidth+"px"),n.setAttribute("height",i.offsetHeight+"px")}),t=i}e.__on(t,"dragstart",m).__on(t,"click",function(){o=t,b(),"IMG"!==o.tagName||o.complete||o.addEventListener("load",function e(){_(),o.removeEventListener("load",e)})})};r.$$("i",v).forEach(function(r){e.__on(r,"mousedown",function(e){if(!o||!o.parentNode)return m(),!1;t=r,e.preventDefault(),e.stopImmediatePropagation(),s=o.offsetWidth,l=o.offsetHeight,d=s/l,h=!0,i=e.clientX,n=e.clientY})}),e.__on(e.win,"mousemove.jodit-resizer"+e.id,function(r){h&&(p=r.clientX-i,f=r.clientY-n,"IMG"===o.tagName?p?(u=s+(t.className.match(/left/)?-1:1)*p,c=Math.round(u/d)):(c=l+(t.className.match(/top/)?-1:1)*f,u=Math.round(c*d)):(u=s+(t.className.match(/left/)?-1:1)*p,c=l+(t.className.match(/top/)?-1:1)*f),u>e.options.resizer.min_width&&(o.style.width=v.parentNode.offsetWidth>u?u+"px":"100%"),c>e.options.resizer.min_height&&(o.style.height=c+"px"),_(),r.stopImmediatePropagation())}).__on(e.win,"resize.jodit-resizer"+e.id+" updateresizer.jodit-resizer",function(){g&&_()}).__on(e.win,"mouseup.jodit-resizer"+e.id+" keydown.jodit-resizer",function(e){g&&(h?(h=!1,e.stopImmediatePropagation()):m())}),e.__on(e.editor,"scroll.jodit-resizer"+e.id,function(){g&&m()}),e.events.on("change afterInit afterSetMode",function(){!g||o&&o.parentNode||m(),r.$$("img, table, iframe",e.editor).forEach(function(t){(!t.__jodit_resizer_binded&&"IFRAME"===t.tagName&&e.options.useIframeResizer||"IMG"===t.tagName&&e.options.useImageResizer||"TABLE"===t.tagName&&e.options.useTableResizer)&&(t.__jodit_resizer_binded=!0,y(t))})}),e.container.appendChild(v)}},function(e,t,o){"use strict";t.__esModule=!0;var i=o(1),n=o(4),r=o(3),a=o(0);n.Config.prototype.useAceEditor=!0,n.Config.prototype.sourceEditorNativeOptions={theme:"ace/theme/textmate",mode:"ace/mode/html",highlightActiveLine:!0},n.Config.prototype.sourceEditorCDNUrlsJS=["//cdnjs.cloudflare.com/ajax/libs/ace/1.2.6/ace.js","//cdnjs.cloudflare.com/ajax/libs/ace/1.2.6/ext-emmet.js","//cdnjs.cloudflare.com/ajax/libs/js-beautify/1.6.12/beautify.min.js","//cdnjs.cloudflare.com/ajax/libs/js-beautify/1.6.12/beautify-html.min.js"],i.default.plugins.source=function(e){var t=a.dom('
      '),o=a.dom('