UNPKG

jodit

Version:

Jodit is awesome and usefully wysiwyg editor with filebrowser

10 lines (8 loc) 443 kB
/*! * jodit - Jodit is awesome and usefully wysiwyg editor with filebrowser * Author: Chupurnov <chupurnov@gmail.com> (https://xdsoft.net/) * Version: v3.4.14 * Url: https://xdsoft.net/jodit/ * License(s): MIT */ ((e,t)=>{if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var i=t();for(var s in i)("object"==typeof exports?exports:e)[s]=i[s]}})(window,(function(){return(e=>{var t={};function i(s){if(t[s])return t[s].exports;var o=t[s]={i:s,l:!1,exports:{}};return e[s].call(o.exports,o,o.exports,i),o.l=!0,o.exports}return i.m=e,i.c=t,i.d=(e,t,s)=>{i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:s})},i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=(e,t)=>{if(1&t&&(e=i(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var s=Object.create(null);if(i.r(s),Object.defineProperty(s,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)i.d(s,o,(t=>e[t]).bind(null,o));return s},i.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return i.d(t,"a",t),t},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.p="/build/",i(i.s=128)})([(e,t,i)=>{"use strict";i.r(t),i.d(t,"cns",()=>s.c),i.d(t,"markDeprecated",()=>s.g),i.d(t,"call",()=>s.b),i.d(t,"attr",()=>s.a),i.d(t,"markOwner",()=>s.h),i.d(t,"get",()=>s.d),i.d(t,"keepNames",()=>s.f),i.d(t,"getClassName",()=>s.e),i.d(t,"asArray",()=>r),i.d(t,"splitArray",()=>a),i.d(t,"setTimeout",()=>n),i.d(t,"clearTimeout",()=>l),i.d(t,"extend",()=>c.a),i.d(t,"hasBrowserColorPicker",()=>o.a),i.d(t,"isArray",()=>o.c),i.d(t,"isEqual",()=>o.f),i.d(t,"isFastEqual",()=>o.g),i.d(t,"isBoolean",()=>o.d),i.d(t,"isFunction",()=>o.h),i.d(t,"isHTML",()=>o.i),i.d(t,"isHtmlFromWord",()=>o.j),i.d(t,"isInitable",()=>o.k),i.d(t,"isDestructable",()=>o.e),i.d(t,"hasContainer",()=>o.b),i.d(t,"isInt",()=>o.l),i.d(t,"isJoditObject",()=>o.m),i.d(t,"isViewObject",()=>o.v),i.d(t,"isLicense",()=>o.n),i.d(t,"isNumber",()=>o.o),i.d(t,"isNumeric",()=>o.p),i.d(t,"isPlainObject",()=>o.q),i.d(t,"isString",()=>o.s),i.d(t,"isURL",()=>o.t),i.d(t,"isValidName",()=>o.u),i.d(t,"isVoid",()=>o.w),i.d(t,"isWindow",()=>o.x),i.d(t,"isPromise",()=>o.r),i.d(t,"colorToHex",()=>d.a),i.d(t,"applyStyles",()=>k),i.d(t,"cleanFromWord",()=>O),i.d(t,"htmlspecialchars",()=>C),i.d(t,"stripTags",()=>S),i.d(t,"nl2br",()=>x),i.d(t,"normalizeKeyAliases",()=>E.c),i.d(t,"normalizeLicense",()=>E.d),i.d(t,"normalizeNode",()=>E.e),i.d(t,"normalizePath",()=>E.f),i.d(t,"normalizeRelativePath",()=>E.g),i.d(t,"normalizeSize",()=>E.h),i.d(t,"normalizeUrl",()=>E.i),i.d(t,"normalizeCssValue",()=>E.b),i.d(t,"normalizeColor",()=>E.a),i.d(t,"getContentWidth",()=>_),i.d(t,"innerWidth",()=>z),i.d(t,"offset",()=>T),i.d(t,"position",()=>I),i.d(t,"camelCase",()=>f.a),i.d(t,"stringify",()=>f.e),i.d(t,"kebabCase",()=>f.c),i.d(t,"trim",()=>f.f),i.d(t,"trimInv",()=>f.g),i.d(t,"ucfirst",()=>f.h),i.d(t,"sprintf",()=>f.d),i.d(t,"i18n",()=>f.b),i.d(t,"appendScript",()=>A),i.d(t,"appendScriptAsync",()=>R),i.d(t,"appendStyleAsync",()=>P),i.d(t,"loadNext",()=>N),i.d(t,"browser",()=>B),i.d(t,"convertMediaUrlToVideoEmbed",()=>H),i.d(t,"css",()=>F),i.d(t,"clearCenterAlign",()=>V),i.d(t,"ctrlKey",()=>W),i.d(t,"dataBind",()=>Y),i.d(t,"defaultLanguage",()=>K.a),i.d(t,"each",()=>G),i.d(t,"completeUrl",()=>L),i.d(t,"humanSizeToBytes",()=>X),i.d(t,"JoditArray",()=>J.a),i.d(t,"JoditObject",()=>Z.a),i.d(t,"parseQuery",()=>D),i.d(t,"buildQuery",()=>Q),i.d(t,"inView",()=>ee),i.d(t,"scrollIntoView",()=>te),i.d(t,"$$",()=>g),i.d(t,"getXPathByElement",()=>b),i.d(t,"refs",()=>v),i.d(t,"cssPath",()=>j),i.d(t,"resolveElement",()=>w),i.d(t,"hasOwn",()=>p.b),i.d(t,"type",()=>p.c),i.d(t,"error",()=>p.a),i.d(t,"val",()=>ie);var s=i(10),o=i(5);const r=e=>Object(o.c)(e)?e:[e];function a(e){return Object(o.s)(e)?e.split(/[,\s]+/):e}function n(e,t,...i){return t?window.setTimeout(e,t,...i):(e.call(null,...i),0)}function l(e){window.clearTimeout(e)}var c=i(24),d=i(25),h=i(1),u=i(2),p=i(21),f=i(11);let m=1;function g(e,t){let i;if(!/:scope/.test(e)||!u.IS_IE||t&&t.nodeType===Node.DOCUMENT_NODE)i=t.querySelectorAll(e);else{const s=t.id,o=s||"_selector_id_"+(""+Math.random()).slice(2)+(m++,m);e=e.replace(/:scope/g,"#"+o),!s&&t.setAttribute("id",o),i=t.parentNode.querySelectorAll(e),s||t.removeAttribute("id")}return[].slice.call(i)}const b=(e,t)=>{if(!e||e.nodeType!==Node.ELEMENT_NODE)return"";if(!e.parentNode||t===e)return"";if(e.id)return"//*[@id='"+e.id+"']";const i=[].filter.call(e.parentNode.childNodes,t=>t.nodeName===e.nodeName);return b(e.parentNode,t)+"/"+e.nodeName.toLowerCase()+(i.length>1?"["+(Array.from(i).indexOf(e)+1)+"]":"")},v=e=>g("[ref],[data-ref]",e).reduce((e,t)=>{const i=Object(s.a)(t,"-ref");return i&&Object(o.s)(i)&&(e[Object(f.a)(i)]=t,e[i]=t),e},{}),j=e=>{if(!h.a.isElement(e))return null;const t=[];let i=e;for(;i&&i.nodeType===Node.ELEMENT_NODE;){let e=i.nodeName.toLowerCase();if(i.id){e+="#"+i.id,t.unshift(e);break}{let t=i,s=1;do{t=t.previousElementSibling,t&&t.nodeName.toLowerCase()===e&&s++}while(t);e+=":nth-of-type("+s+")"}t.unshift(e),i=i.parentNode}return t.join(" > ")};function w(e,t){let i=e;if(Object(o.s)(e))try{i=t.querySelector(e)}catch(t){throw Object(p.a)('String "'+e+'" should be valid HTML selector')}if(!i||"object"!=typeof i||!h.a.isElement(i)||!i.cloneNode)throw Object(p.a)('Element "'+e+'" should be string or HTMLElement instance');return i}function y(e){return e.replace(/mso-[a-z-]+:[\s]*[^;]+;/gi,"").replace(/mso-[a-z-]+:[\s]*[^";]+$/gi,"").replace(/border[a-z-]*:[\s]*[^;]+;/gi,"").replace(/([0-9.]+)(pt|cm)/gi,(e,t,i)=>{switch(i.toLowerCase()){case"pt":return(1.328*parseFloat(t)).toFixed(0)+"px";case"cm":return(.02645833*parseFloat(t)).toFixed(0)+"px"}return e})}function k(e){if(-1===e.indexOf("<html "))return e;e=(e=e.substring(e.indexOf("<html "),e.length)).substring(0,e.lastIndexOf("</html>")+7);const t=document.createElement("iframe");t.style.display="none",document.body.appendChild(t);let i="",s=[],o=[];try{const r=t.contentDocument||(t.contentWindow?t.contentWindow.document:null);if(r){r.open(),r.write(e),r.close(),r.styleSheets.length&&(o=r.styleSheets[r.styleSheets.length-1].cssRules);for(let e=0;o.length>e;e+=1)""!==o[e].selectorText&&(s=g(o[e].selectorText,r.body),s.forEach(t=>{t.style.cssText=y(o[e].style.cssText+";"+t.style.cssText)}));h.a.each(r.body,e=>{if(h.a.isElement(e)){const t=e,i=t.style.cssText;i&&(t.style.cssText=y(i)),t.hasAttribute("lang")&&t.removeAttribute("lang")}}),i=r.firstChild?Object(f.f)(r.body.innerHTML):""}}catch(e){}finally{h.a.safeRemove(t)}return i&&(e=i),Object(f.f)(e.replace(/<(\/)?(html|colgroup|col|o:p)[^>]*>/g,"").replace(/<!--[^>]*>/g,""))}function O(e){-1!==e.indexOf("<html ")&&(e=(e=e.substring(e.indexOf("<html "),e.length)).substring(0,e.lastIndexOf("</html>")+7));let t="";try{const i=document.createElement("div");i.innerHTML=e;const s=[];i.firstChild&&h.a.all(i,e=>{if(e)switch(e.nodeType){case Node.ELEMENT_NODE:switch(e.nodeName){case"STYLE":case"LINK":case"META":s.push(e);break;case"W:SDT":case"W:SDTPR":case"FONT":h.a.unwrap(e);break;default:Array.from(e.attributes).forEach(t=>{-1===["src","href","rel","content"].indexOf(t.name.toLowerCase())&&e.removeAttribute(t.name)})}break;case Node.TEXT_NODE:break;default:s.push(e)}}),s.forEach(h.a.safeRemove),t=i.innerHTML}catch(e){}return t&&(e=t),(e=e.split(/(\n)/).filter(f.f).join("\n")).replace(/<(\/)?(html|colgroup|col|o:p)[^>]*>/g,"").replace(/<!--[^>]*>/g,"")}function C(e){const t=document.createElement("div");return t.textContent=e,t.innerHTML}function S(e,t=document){const i=t.createElement("div");return Object(o.s)(e)?i.innerHTML=e:i.appendChild(e),g("DIV, P, BR, H1, H2, H3, H4, H5, H6, HR",i).forEach(e=>{const i=e.parentNode;if(!i)return;const s=e.nextSibling;h.a.isText(s)&&/^\s/.test(s.nodeValue||"")||s&&i.insertBefore(t.createTextNode(" "),s)}),Object(f.f)(i.innerText)||""}function x(e){return e.replace(/([^>])([\n\r]+)/g,"$1<br/>$2")}var E=i(20);const _=(e,t)=>{const i=e=>parseInt(e,10),s=t.getComputedStyle(e);return e.offsetWidth-i(s.getPropertyValue("padding-left")||"0")-i(s.getPropertyValue("padding-right")||"0")},z=(e,t)=>{const i=t.getComputedStyle(e);let s=e.clientWidth;return s-=parseFloat(i.paddingLeft||"0")+parseFloat(i.paddingRight||"0"),s},T=(e,t,i,s=!1)=>{let o;try{o=e.getBoundingClientRect()}catch(e){o={top:0,bottom:0,left:0,right:0,width:0,height:0}}const r=i.body,a=i.documentElement||{clientTop:0,clientLeft:0,scrollTop:0,scrollLeft:0},n=i.defaultView||i.parentWindow,l=n.pageYOffset||a.scrollTop||r.scrollTop,c=n.pageXOffset||a.scrollLeft||r.scrollLeft,d=a.clientTop||r.clientTop||0,h=a.clientLeft||r.clientLeft||0;let u,p;const f=t.iframe;if(!s&&t&&t.options&&t.o.iframe&&f){const{top:e,left:i}=T(f,t,t.od,!0);u=o.top+e,p=o.left+i}else u=o.top+l-d,p=o.left+c-h;return{top:Math.round(u),left:Math.round(p),width:o.width,height:o.height}};function I(e,t,i=!1){const s=e.getBoundingClientRect();let r=s.left,a=s.top;if(Object(o.m)(t)&&t.iframe&&!i){const{left:e,top:i}=I(t.iframe,t,!0);r+=e,a+=i}return{left:Math.round(r),top:Math.round(a),width:Math.round(e.offsetWidth),height:Math.round(e.offsetHeight)}}const L=e=>("file:"===window.location.protocol&&/^\/\//.test(e)&&(e="https:"+e),e),q=new Map,M=e=>async(t,i)=>{if(q.has(i))return q.get(i);const s=e(t,i);return q.set(i,s),s},A=(e,t,i)=>{const s=e.c.element("script");return s.type="text/javascript",Object(o.h)(i)&&!e.isInDestruct&&e.e.on(s,"load",i),s.src||(s.src=L(t)),e.od.body.appendChild(s),{callback:i,element:s}},R=M((e,t)=>new Promise((i,s)=>{const{element:o}=A(e,t,i);!e.isInDestruct&&e.e.on(o,"error",s)})),P=M((e,t)=>new Promise((i,s)=>{const o=e.c.element("link");o.rel="stylesheet",o.media="all",o.crossOrigin="anonymous",!e.isInDestruct&&e.e.on(o,"load",()=>i(o)).on(o,"error",s),o.href=L(t),e.o.shadowRoot?e.o.shadowRoot.appendChild(o):e.od.body.appendChild(o)})),N=(e,t,i=0)=>Object(o.s)(t[i])?R(e,t[i]).then(()=>N(e,t,i+1)):Promise.resolve(),B=e=>{const t=navigator.userAgent.toLowerCase(),i=/(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?i[2]:"webkit"===e?"chrome"===i[1]||"webkit"===i[1]:"ff"===e?"firefox"===i[1]:"msie"===e?"trident"===i[1]||"msie"===i[1]:i[1]===e},D=e=>{const t={},i=e.substr(1).split("&");for(let e=0;i.length>e;e+=1){const s=i[e].split("=");t[decodeURIComponent(s[0])]=decodeURIComponent(s[1]||"")}return t},H=(e,t=400,i=345)=>{if(!Object(o.t)(e))return e;const s=document.createElement("a"),r=/(?:http?s?:\/\/)?(?:www\.)?(?:vimeo\.com)\/?(.+)/g;s.href=e,t||(t=400),i||(i=345);const a=s.protocol||"";switch(s.hostname){case"www.vimeo.com":case"vimeo.com":return r.test(e)?e.replace(r,'<iframe width="'+t+'" height="'+i+'" src="'+a+'//player.vimeo.com/video/$1" frameborder="0" allowfullscreen></iframe>'):e;case"youtube.com":case"www.youtube.com":case"youtu.be":case"www.youtu.be":{const o=s.search?D(s.search):{v:s.pathname.substr(1)};return o.v?'<iframe width="'+t+'" height="'+i+'" src="'+a+"//www.youtube.com/embed/"+o.v+'" frameborder="0" allowfullscreen></iframe>':e}}return e},F=(e,t,i,s=!1)=>{const r=/^left|top|bottom|right|width|min|max|height|margin|padding|fontsize|font-size/i;if(Object(o.q)(t)||void 0!==i){const s=(e,t,i)=>{!Object(o.w)(i)&&r.test(t)&&Object(o.p)(""+i)&&(i=parseInt(""+i,10)+"px"),Object(o.w)(i)||F(e,t,void 0,!0)===Object(E.b)(t,i)||(e.style[t]=i)};if(Object(o.q)(t)){const i=Object.keys(t);for(let o=0;i.length>o;o+=1)s(e,Object(f.a)(i[o]),t[i[o]])}else s(e,Object(f.a)(t),i);return""}const a=Object(f.c)(t),n=e.ownerDocument||document,l=!!n&&(n.defaultView||n.parentWindow),c=e.style[t];let d="";return void 0!==c&&""!==c?d=c:l&&!s&&(d=l.getComputedStyle(e).getPropertyValue(a)),r.test(t)&&/^[-+]?[0-9.]+px$/.test(""+d)&&(d=parseInt(""+d,10)),Object(E.b)(t,d)},V=e=>{"block"===F(e,"display")&&F(e,"display",""),"auto"===e.style.marginLeft&&"auto"===e.style.marginRight&&(e.style.marginLeft="",e.style.marginRight="")},W=e=>{if("undefined"!=typeof navigator&&-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 $=i(8);const U=new WeakMap,Y=(e,t,i)=>{let s=U.get(e);if(!s){s={},U.set(e,s);let t=null;e instanceof $.c&&(t=e.j.e),Object(o.v)(e)&&(t=e.e),t&&t.on("beforeDestruct",()=>{U.delete(e)})}return void 0===i?s[t]:(s[t]=i,i)};var K=i(26);function G(e,t){let i,s,r;if(Object(o.c)(e)){for(i=e.length,r=0;i>r;r+=1)if(!1===t.call(e[r],r,e[r]))return!1}else for(s=Object.keys(e),r=0;s.length>r;r+=1)if(!1===t.call(e[s[r]],s[r],e[s[r]]))return!1;return!0}const X=e=>{if(/^[0-9.]+$/.test(""+e))return parseFloat(e);const t=e.substr(-2,2).toUpperCase(),i=["KB","MB","GB","TB"],s=parseFloat(e.substr(0,e.length-2));return-1!==i.indexOf(t)?s*Math.pow(1024,i.indexOf(t)+1):parseInt(e,10)};var J=i(23),Z=i(27);const Q=(e,t)=>{const i=[],s=encodeURIComponent;for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)){const a=t?t+"["+r+"]":r,n=e[r];i.push(Object(o.q)(n)?Q(n,a):s(a)+"="+s(n))}return i.join("&")},ee=(e,t,i)=>{let s=e.getBoundingClientRect(),o=e;const r=s.top,a=s.height;do{if(o&&o.parentNode){if(o=o.parentNode,s=o.getBoundingClientRect(),r>s.bottom)return!1;if(s.top>=r+a)return!1}}while(o&&o!==t&&o.parentNode);return(i.documentElement&&i.documentElement.clientHeight||0)>=r},te=(e,t,i)=>{ee(e,t,i)||(t.clientHeight!==t.scrollHeight&&(t.scrollTop=e.offsetTop),ee(e,t,i)||e.scrollIntoView())},ie=(e,t,i)=>{const s=e.querySelector(t);return s?(i&&(s.value=i),s.value):""}},function(e,t,i){"use strict";i.d(t,"a",()=>a);var s=i(2),o=i(0),r=i(16);class a{static detach(e){for(;e.firstChild;)e.removeChild(e.firstChild)}static wrapInline(e,t,i){let s,r=e,n=e;const l=i.s.save();let c=!1;do{c=!1,s=r.previousSibling,s&&!a.isBlock(s,i.ew)&&(c=!0,r=s)}while(c);do{c=!1,s=n.nextSibling,s&&!a.isBlock(s,i.ew)&&(c=!0,n=s)}while(c);const d=Object(o.isString)(t)?i.createInside.element(t):t;r.parentNode&&r.parentNode.insertBefore(d,r);let h=r;for(;h&&(h=r.nextSibling,d.appendChild(r),r!==n&&h);)r=h;return i.s.restore(l),d}static wrap(e,t,i){const s=i.s.save(),r=Object(o.isString)(t)?i.createInside.element(t):t;return e.parentNode?(e.parentNode.insertBefore(r,e),r.appendChild(e),i.s.restore(s),r):null}static unwrap(e){const t=e.parentNode;if(t){for(;e.firstChild;)t.insertBefore(e.firstChild,e);a.safeRemove(e)}}static each(e,t){let i=e.firstChild;if(i)for(;i;){const s=a.next(i,Boolean,e);if(!1===t(i))return!1;if(i.parentNode&&!a.each(i,t))return!1;i=s}return!0}static replace(e,t,i,s=!1,r=!1){const a=Object(o.isString)(t)?i.element(t):t;if(!r)for(;e.firstChild;)a.appendChild(e.firstChild);return s&&Array.from(e.attributes).forEach(e=>{a.setAttribute(e.name,e.value)}),e.parentNode&&e.parentNode.replaceChild(a,e),a}static isEmptyTextNode(e){return a.isText(e)&&(!e.nodeValue||0===e.nodeValue.replace(s.INVISIBLE_SPACE_REG_EXP(),"").length)}static isEmpty(e,t=/^(img|svg|canvas|input|textarea|form)$/){return!e||(a.isText(e)?null===e.nodeValue||0===Object(o.trim)(e.nodeValue).length:!t.test(e.nodeName.toLowerCase())&&a.each(e,e=>{if(a.isText(e)&&null!==e.nodeValue&&0!==Object(o.trim)(e.nodeValue).length||a.isElement(e)&&t.test(e.nodeName.toLowerCase()))return!1}))}static isNode(e,t){return!!e&&!("object"!=typeof t||!t||"function"!=typeof t.Node&&"object"!=typeof t.Node)&&e instanceof t.Node}static isCell(e,t){return a.isNode(e,t)&&/^(td|th)$/i.test(e.nodeName)}static isImage(e,t){return a.isNode(e,t)&&/^(img|svg|picture|canvas)$/i.test(e.nodeName)}static isBlock(e,t){return e&&"object"==typeof e&&a.isNode(e,t)&&s.IS_BLOCK.test(e.nodeName)}static isText(e){return!(!e||e.nodeType!==Node.TEXT_NODE)}static isElement(e){return!(!e||e.nodeType!==Node.ELEMENT_NODE)}static isHTMLElement(e,t){return a.isNode(e,t)&&e instanceof t.HTMLElement}static isInlineBlock(e){return a.isElement(e)&&!/^(BR|HR)$/i.test(e.tagName)&&-1!==["inline","inline-block"].indexOf(""+Object(o.css)(e,"display"))}static canSplitBlock(e,t){return e&&e instanceof t.HTMLElement&&a.isBlock(e,t)&&!/^(TD|TH|CAPTION|FORM)$/.test(e.nodeName)&&void 0!==e.style&&!/^(fixed|absolute)/i.test(e.style.position)}static prev(e,t,i,s=!0){return a.find(e,t,i,!1,"previousSibling",!!s&&"lastChild")}static next(e,t,i,s=!0){return a.find(e,t,i,void 0,void 0,!!s&&"firstChild")}static prevWithClass(e,t){return a.prev(e,e=>a.isElement(e)&&e.classList.contains(t),e.parentNode)}static nextWithClass(e,t){return a.next(e,e=>a.isElement(e)&&e.classList.contains(t),e.parentNode)}static find(e,t,i,s=!1,o="nextSibling",r="firstChild"){if(s&&t(e))return e;let n,l=e;do{if(n=l[o],t(n))return n||null;if(r&&n&&n[r]){const e=a.find(n[r],t,n,!0,o,r);if(e)return e}n||(n=l.parentNode),l=n}while(l&&l!==i);return null}static findWithCurrent(e,t,i,s="nextSibling",o="firstChild"){let r=e;do{if(t(r))return r||null;if(o&&r&&r[o]){const e=a.findWithCurrent(r[o],t,r,s,o);if(e)return e}for(;r&&!r[s]&&r!==i;)r=r.parentNode;r&&r[s]&&r!==i&&(r=r[s])}while(r&&r!==i);return null}static getNormalSibling(e,t=!0,i=(e=>!a.isEmptyTextNode(e))){let s=Object(r.c)(e,t);for(;s&&!i(s);)s=Object(r.c)(s,t);return s&&i(s)?s:null}static up(e,t,i,s=!1){let o=e;if(!e)return null;do{if(t(o))return o;if(o===i||!o.parentNode)break;o=o.parentNode}while(o&&o!==i);return o===i&&s&&t(o)?o:null}static closest(e,t,i){let s;return s=Object(o.isFunction)(t)?t:Object(o.isArray)(t)?e=>e&&t.includes(e.nodeName.toLowerCase()):e=>e&&t===e.nodeName.toLowerCase(),a.up(e,s,i)}static appendChildFirst(e,t){const i=e.firstChild;i?i!==t&&e.insertBefore(t,i):e.appendChild(t)}static after(e,t){const{parentNode:i}=e;i&&(i.lastChild===e?i.appendChild(t):i.insertBefore(t,e.nextSibling))}static before(e,t){const{parentNode:i}=e;i&&i.insertBefore(t,e)}static prepend(e,t){e.insertBefore(t,e.firstChild)}static append(e,t){e.appendChild(t)}static moveContent(e,t,i=!1){const s=(e.ownerDocument||document).createDocumentFragment();Array.from(e.childNodes).forEach(e=>{s.appendChild(e)}),i&&t.firstChild?t.insertBefore(s,t.firstChild):t.appendChild(s)}static all(e,t,i=!1){let s=e.childNodes?Array.from(e.childNodes):[];return t(e)?e:(i&&(s=s.reverse()),s.forEach(e=>{a.all(e,t,i)}),null)}static isOrContains(e,t,i=!1){return e===t?!i:!!(t&&e&&this.up(t,t=>t===e,e,!0))}static safeRemove(e){e&&e.parentNode&&e.parentNode.removeChild(e)}static hide(e){e&&(Object(o.dataBind)(e,"__old_display",e.style.display),e.style.display="none")}static show(e){if(!e)return;const t=Object(o.dataBind)(e,"__old_display");"none"===e.style.display&&(e.style.display=t||"")}static isTag(e,t){const i=Object(o.asArray)(t).map(String);for(let t=0;i.length>t;t+=1)if(this.isElement(e)&&e.tagName.toLowerCase()===i[t].toLowerCase())return!0;return!1}}a.findInline=(e,t,i)=>{let s=e,o=null;do{if(!s)break;if(o=t?s.previousSibling:s.nextSibling,o||!s.parentNode||s.parentNode===i||!a.isInlineBlock(s.parentNode))break;s=s.parentNode}while(!o);for(;o&&a.isInlineBlock(o)&&(t?o.lastChild:o.firstChild);)o=t?o.lastChild:o.firstChild;return o}},(e,t,i)=>{"use strict";i.r(t),i.d(t,"INVISIBLE_SPACE",()=>s),i.d(t,"INVISIBLE_SPACE_REG_EXP",()=>o),i.d(t,"INVISIBLE_SPACE_REG_EXP_END",()=>r),i.d(t,"INVISIBLE_SPACE_REG_EXP_START",()=>a),i.d(t,"SPACE_REG_EXP",()=>n),i.d(t,"SPACE_REG_EXP_START",()=>l),i.d(t,"SPACE_REG_EXP_END",()=>c),i.d(t,"IS_BLOCK",()=>d),i.d(t,"IS_INLINE",()=>h),i.d(t,"INSEPARABLE_TAGS",()=>u),i.d(t,"MAY_BE_REMOVED_WITH_KEY",()=>p),i.d(t,"KEY_BACKSPACE",()=>f),i.d(t,"KEY_TAB",()=>m),i.d(t,"KEY_ENTER",()=>g),i.d(t,"KEY_ESC",()=>b),i.d(t,"KEY_LEFT",()=>v),i.d(t,"KEY_UP",()=>j),i.d(t,"KEY_RIGHT",()=>w),i.d(t,"KEY_DOWN",()=>y),i.d(t,"KEY_DELETE",()=>k),i.d(t,"KEY_F3",()=>O),i.d(t,"NEARBY",()=>C),i.d(t,"ACCURACY",()=>S),i.d(t,"COMMAND_KEYS",()=>x),i.d(t,"BR",()=>E),i.d(t,"PARAGRAPH",()=>_),i.d(t,"MODE_WYSIWYG",()=>z),i.d(t,"MODE_SOURCE",()=>T),i.d(t,"MODE_SPLIT",()=>I),i.d(t,"IS_IE",()=>L),i.d(t,"URL_LIST",()=>q),i.d(t,"TEXT_PLAIN",()=>M),i.d(t,"TEXT_HTML",()=>A),i.d(t,"MARKER_CLASS",()=>R),i.d(t,"EMULATE_DBLCLICK_TIMEOUT",()=>P),i.d(t,"INSERT_AS_HTML",()=>N),i.d(t,"INSERT_CLEAR_HTML",()=>B),i.d(t,"INSERT_AS_TEXT",()=>D),i.d(t,"INSERT_ONLY_TEXT",()=>H),i.d(t,"SAFE_COUNT_CHANGE_CALL",()=>F),i.d(t,"IS_MAC",()=>V),i.d(t,"KEY_ALIASES",()=>W),i.d(t,"BASE_PATH",()=>$);const s="\ufeff",o=()=>/[\uFEFF]/g,r=()=>/[\uFEFF]+$/g,a=()=>/^[\uFEFF]+/g,n=()=>/[\s\n\t\r\uFEFF\u200b]+/g,l=()=>/^[\s\n\t\r\uFEFF\u200b]+/g,c=()=>/[\s\n\t\r\uFEFF\u200b]+$/g,d=/^(SCRIPT|IFRAME|JODIT|JODIT-MEDIA|PRE|DIV|P|LI|UL|OL|H[1-6]|BLOCKQUOTE|TD|TH|TABLE|BODY|HTML|FIGCAPTION|FIGURE|DT|DD)$/i,h=/^(STRONG|SPAN|I|EM|B|SUP|SUB)$/i,u=["img","br","iframe","script","input","textarea","hr","jodit","jodit-media"],p=RegExp(`^${u.join("|")}$`,"i"),f="Backspace",m="Tab",g="Enter",b="Escape",v="ArrowLeft",j="ArrowUp",w="ArrowRight",y="ArrowDown",k="Delete",O="F3",C=5,S=10,x=[f,k,j,y,w,v,g,b,O,m],E="br",_="p",z=1,T=2,I=3,L="undefined"!=typeof navigator&&(-1!==navigator.userAgent.indexOf("MSIE")||/rv:11.0/i.test(navigator.userAgent)),q=L?"url":"text/uri-list",M=L?"text":"text/plain",A=L?"text":"text/html",R="jodit-selection_marker",P=300,N="insert_as_html",B="insert_clear_html",D="insert_as_text",H="insert_only_text",F=10,V="undefined"!=typeof window&&/Mac|iPod|iPhone|iPad/.test(window.navigator.platform),W={add:"+",break:"pause",cmd:"meta",command:"meta",ctl:"control",ctrl:"control",del:"delete",down:"arrowdown",esc:"escape",ins:"insert",left:"arrowleft",mod:V?"meta":"control",opt:"alt",option:"alt",return:"enter",right:"arrowright",space:" ",spacebar:" ",up:"arrowup",win:"meta",windows:"meta"},$=(()=>{if("undefined"==typeof document)return"";const e=document.currentScript,t=e=>e.replace(/\/[^/]+.js$/,"/");if(e)return t(e.src);const i=document.querySelectorAll("script[src]");return i&&i.length?t(i[i.length-1].src):window.location.href})()},function(e,t,i){"use strict";i.d(t,"a",()=>n),i.d(t,"b",()=>l),i.d(t,"c",()=>c);var s=i(2),o=i(1),r=i(0),a=i(14);class n{constructor(){this.iframe=!1,this.license="",this.preset="custom",this.presets={inline:{inline:!0,toolbar:!1,toolbarInline:!0,toolbarInlineForSelection:!0,showXPathInStatusbar:!1,showCharsCounter:!1,showWordsCounter:!1,showPlaceholder:!1}},this.ownerDocument="undefined"!=typeof document?document:null,this.ownerWindow="undefined"!=typeof window?window:null,this.shadowRoot=null,this.zIndex=0,this.readonly=!1,this.disabled=!1,this.activeButtonsInReadOnly=["source","fullsize","print","about","dots","selectall"],this.toolbarButtonSize="middle",this.allowTabNavigation=!1,this.inline=!1,this.theme="default",this.saveModeInStorage=!1,this.saveHeightInStorage=!1,this.spellcheck=!0,this.editorCssClass=!1,this.style=!1,this.triggerChangeEvent=!0,this.width="auto",this.minWidth="200px",this.maxWidth="100%",this.height="auto",this.minHeight=200,this.direction="",this.language="auto",this.debugLanguage=!1,this.i18n=!1,this.tabIndex=-1,this.toolbar=!0,this.showTooltip=!0,this.showTooltipDelay=1e3,this.useNativeTooltip=!1,this.enter=s.PARAGRAPH,this.enterBlock="br"!==this.enter?this.enter:s.PARAGRAPH,this.defaultMode=s.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.disablePlugins=[],this.extraPlugins=[],this.extraButtons=[],this.createAttributes={},this.sizeLG=900,this.sizeMD=700,this.sizeSM=400,this.buttons=["source","|","bold","strikethrough","underline","italic","eraser","|","superscript","subscript","|","ul","ol","|","outdent","indent","|","font","fontsize","brush","paragraph","|","image","file","video","table","link","|","align","undo","redo","\n","selectall","cut","copy","paste","copyformat","|","hr","symbol","fullsize","print","about"],this.buttonsMD=["source","|","bold","italic","|","ul","ol","eraser","|","font","fontsize","brush","paragraph","|","image","table","link","|","align","\n","undo","redo","|","hr","copyformat","fullsize","dots"],this.buttonsSM=["source","|","bold","italic","|","ul","ol","eraser","|","fontsize","brush","paragraph","|","image","table","\n","link","|","align","|","undo","redo","|","copyformat","fullsize","dots"],this.buttonsXS=["bold","image","|","brush","paragraph","eraser","\n","align","|","undo","redo","|","dots"],this.events={},this.textIcons=!1,this.showBrowserColorPicker=!0}static get defaultOptions(){return n.__defaultOptions||(n.__defaultOptions=new n),n.__defaultOptions}}const l=function(e,t=n.defaultOptions){const i=this;if(i.plainOptions=e,void 0!==e&&"object"==typeof e){const s=(e,o)=>{if("preset"===o&&void 0!==t.presets[e.preset]){const i=t.presets[e.preset];Object.keys(i).forEach(s.bind(this,i))}const a=t[o];i[o]="object"!=typeof a||null===a||["ownerWindow","ownerDocument"].includes(o)||Object(r.isArray)(a)?e[o]:Object(r.extend)(!0,{},a,e[o])};Object.keys(e).forEach(s.bind(this,e))}};function c(e){return new l(e)}n.prototype.controls={print:{exec(e){const t=window.open("","PRINT");t&&(e.o.iframe?(e.e.fire("generateDocumentStructure.iframe",t.document,e),t.document.body.innerHTML=e.value):(t.document.write('<!doctype html><html lang="'+Object(r.defaultLanguage)(e.o.language)+'"><head><title></title></head><body>'+e.value+"</body></html>"),t.document.close()),t.focus(),t.print(),t.close())},mode:s.MODE_SOURCE+s.MODE_WYSIWYG,tooltip:"Print"},hr:{command:"insertHorizontalRule",tags:["hr"],tooltip:"Insert Horizontal Line"},image:{popup(e,t,i,s){let n=null;t&&!o.a.isText(t)&&o.a.isHTMLElement(t,e.ew)&&(o.a.isTag(t,"img")||Object(r.$$)("img",t).length)&&(n=o.a.isTag(t,"img")?t:Object(r.$$)("img",t)[0]);const l=e.s.save();return Object(a.b)(e,{filebrowser(t){e.s.restore(l),t.files&&t.files.forEach(i=>e.s.insertImage(t.baseurl+i,null,e.o.imageDefaultWidth)),s()},upload:!0,async url(t,i){e.s.restore(l);const o=n||e.createInside.element("img");o.setAttribute("src",t),o.setAttribute("alt",i),n||await e.s.insertImage(o,null,e.o.imageDefaultWidth),s()}},n,s)},tags:["img"],tooltip:"Insert Image"},file:{popup(e,t,i,s){const r=(t,i="")=>{e.s.insertNode(e.createInside.fromHTML(`<a href="${t}" title="${i}">${i||t}</a>`))};let n=null;return t&&(o.a.isTag(t,"a")||o.a.closest(t,"a",e.editor))&&(n=o.a.isTag(t,"a")?t:o.a.closest(t,"a",e.editor)),Object(a.b)(e,{filebrowser(e){e.files&&e.files.forEach(t=>r(e.baseurl+t)),s()},upload:!0,url(e,t){n?(n.setAttribute("href",e),n.setAttribute("title",t)):r(e,t),s()}},n,s,!1)},tags:["a"],tooltip:"Insert file"},video:{popup(e,t,i,s){const o=e.c.fromHTML(`<form class="jodit-form">\n\t\t\t\t\t<div class="jodit jodit-form__group">\n\t\t\t\t\t\t<input class="jodit-input" required name="code" placeholder="http://" type="url"/>\n\t\t\t\t\t\t<button class="jodit-button" type="submit">${e.i18n("Insert")}</button>\n\t\t\t\t\t</div>\n\t\t\t\t</form>`),n=e.c.fromHTML(`<form class="jodit-form">\n\t\t\t\t\t\t\t\t\t<div class="jodit-form__group">\n\t\t\t\t\t\t\t\t\t\t<textarea class="jodit-textarea" required name="code" placeholder="${e.i18n("Embed code")}"></textarea>\n\t\t\t\t\t\t\t\t\t\t<button class="jodit-button" type="submit">${e.i18n("Insert")}</button>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</form>`),l=[],c=e.s.save(),d=t=>{e.s.restore(c),e.s.insertHTML(t),s()};return l.push({icon:"link",name:"Link",content:o},{icon:"source",name:"Code",content:n}),e.e.on(n,"submit",e=>(e.preventDefault(),Object(r.trim)(Object(r.val)(n,"textarea[name=code]"))?(d(Object(r.val)(n,"textarea[name=code]")),!1):(n.querySelector("textarea[name=code]").focus(),n.querySelector("textarea[name=code]").classList.add("jodit_error"),!1))),e.e.on(o,"submit",e=>(e.preventDefault(),Object(r.isURL)(Object(r.val)(o,"input[name=code]"))?(d(Object(r.convertMediaUrlToVideoEmbed)(Object(r.val)(o,"input[name=code]"))),!1):(o.querySelector("input[name=code]").focus(),o.querySelector("input[name=code]").classList.add("jodit_error"),!1))),Object(a.c)(e,l)},tags:["iframe"],tooltip:"Insert youtube/vimeo video"}}},(e,t,i)=>{"use strict";function s(e,t,i,s){var o,r=arguments.length,a=3>r?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,s);else for(var n=e.length-1;n>=0;n--)(o=e[n])&&(a=(3>r?o(a):r>3?o(t,i,a):o(t,i))||a);return r>3&&a&&Object.defineProperty(t,i,a),a}i.d(t,"a",()=>s)},(e,t,i)=>{"use strict";function s(){let e=!0;try{const t=document.createElement("input");t.type="color",e="color"===t.type&&"number"!=typeof t.selectionStart}catch(t){e=!1}return e}i.d(t,"a",()=>s),i.d(t,"c",()=>r),i.d(t,"f",()=>n),i.d(t,"g",()=>l),i.d(t,"d",()=>c),i.d(t,"h",()=>d),i.d(t,"i",()=>h),i.d(t,"j",()=>u),i.d(t,"k",()=>f),i.d(t,"e",()=>m),i.d(t,"b",()=>g),i.d(t,"l",()=>j),i.d(t,"m",()=>y),i.d(t,"v",()=>k),i.d(t,"n",()=>O),i.d(t,"o",()=>C),i.d(t,"p",()=>v),i.d(t,"q",()=>E),i.d(t,"s",()=>b),i.d(t,"t",()=>_),i.d(t,"u",()=>z),i.d(t,"w",()=>T),i.d(t,"x",()=>S),i.d(t,"r",()=>I);var o=i(23);function r(e){return Array.isArray(e)||e instanceof o.a}var a=i(11);function n(e,t){return e===t||Object(a.e)(e)===Object(a.e)(t)}function l(e,t){return e===t}function c(e){return"boolean"==typeof e}function d(e){return"function"==typeof e}const h=e=>/<([A-Za-z][A-Za-z0-9]*)\b[^>]*>(.*?)<\/\1>/m.test(e);function u(e){return-1!==e.search(/<meta.*?Microsoft Excel\s[\d].*?>/)||-1!==e.search(/<meta.*?Microsoft Word\s[\d].*?>/)||-1!==e.search(/style="[^"]*mso-/)&&-1!==e.search(/<font/)}var p=i(1);function f(e){return e&&d(e.init)}function m(e){return e&&d(e.destruct)}function g(e){return e&&p.a.isElement(e.container)}function b(e){return"string"==typeof e}function v(e){if(b(e)){if(!e.match(/^([+-])?[0-9]+(\.?)([0-9]+)?(e[0-9]+)?$/))return!1;e=parseFloat(e)}return"number"==typeof e&&!isNaN(e)&&isFinite(e)}function j(e){return b(e)&&v(e)&&(e=parseFloat(e)),"number"==typeof e&&Number.isFinite(e)&&!(e%1)}var w=i(9);function y(e){return!!(e&&e instanceof Object&&d(e.constructor)&&("undefined"!=typeof Jodit&&e instanceof Jodit||e.isJodit))}function k(e){return!!(e&&e instanceof Object&&d(e.constructor)&&(e instanceof w.e.View||e.isView))}const O=e=>b(e)&&32===e.length&&/^[a-z0-9]+$/.test(e);function C(e){return"number"==typeof e&&!isNaN(e)&&isFinite(e)}function S(e){return null!==e&&e===e.window}var x=i(21);function E(e){return!(!e||"object"!=typeof e||e.nodeType||S(e)||e.constructor&&!x.b.call(e.constructor.prototype,"isPrototypeOf"))}function _(e){return/^(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)}function z(e){return!!e.length&&!/[^0-9A-Za-zа-яА-ЯЁё\w\-_.]/.test(e)}function T(e){return null==e}function I(e){return e&&"function"==typeof e.then}},function(e,t,i){"use strict";i.d(t,"e",()=>s.a),i.d(t,"d",()=>o.b),i.d(t,"a",()=>o.a),i.d(t,"c",()=>r.a),i.d(t,"h",()=>a),i.d(t,"f",()=>c),i.d(t,"g",()=>f),i.d(t,"b",()=>m.a);var s=i(19),o=i(13),r=i(18);class a extends s.a{}var n=i(4),l=(i(133),i(12));class c extends s.a{constructor(){super(...arguments),this.elements=[],this.buttonSize="middle"}update(){this.elements.forEach(e=>e.update()),this.setMod("size",this.buttonSize)}append(e){this.elements.push(e),this.container.appendChild(e.container),e.parentElement=this,e.update()}clear(){this.elements.forEach(e=>e.destruct()),this.elements.length=0}destruct(){return this.clear(),super.destruct()}}Object(n.a)([Object(l.watch)("buttonSize")],c.prototype,"update",null),i(134);var d=i(0),h=i(3),u=i(5),p=i(8);class f extends c{constructor(e){super(e),this.mode="horizontal",this.removeButtons=[],this.onChangeMode(),Object(d.getClassName)(this)===Object(d.getClassName)(f.prototype)&&this.setStatus(p.b.ready)}onChangeMode(){this.setMod("mode",this.mode)}addGroup(){const e=new c(this.jodit);return this.append(e),e}get buttons(){const e=t=>t.reduce((t,i)=>i instanceof c?t.concat(e(i.elements)):(i instanceof o.b&&t.push(i),t),[]);return e(this.elements)}getButtonsNames(){return this.buttons.map(e=>e instanceof o.b&&e.state.name||"").filter(e=>""!==e)}setRemoveButtons(e){return this.removeButtons=e||[],this}build(e,t=null){this.clear();let i=!1,s=this.addGroup();return((e,t)=>(Object(u.c)(e)?e:Object.keys(e).map(t=>({name:t,...e[t]||{}}))).map(e=>((e,t)=>{let i;if(Object(d.isString)(e)){const s=e.split(/\./);let o=t;s.length>1&&void 0!==t[s[0]]&&(o=t[s[0]],e=s[1]),i=void 0!==o[e]?{name:e,...o[e]}:{name:e,command:e,tooltip:e}}else i={name:"empty",...e},void 0!==t[i.name]&&(i={...t[i.name],...i});return i})(e,t||h.a.defaultOptions.controls)))(e,this.j.o.controls).filter(e=>!this.removeButtons.includes(e.name)).forEach(e=>{let o=null;switch(e.name){case"\n":s=this.addGroup();break;case"|":i||(i=!0,o=new a(this.j));break;default:i=!1,o=this.makeButton(e,t)}o&&s.append(o)}),this.update(),this}makeButton(e,t){return new o.b(this.j)}}Object(n.a)([Object(l.watch)("mode")],f.prototype,"onChangeMode",null);var m=i(29)},function(e,t,i){"use strict";function s(e){return(s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?e=>typeof e:e=>e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e)(e)}function o(e,t,i){var o=i.value;if("function"!=typeof o)throw new TypeError("@boundMethod decorator can only be applied to methods not: ".concat(s(o)));var r=!1;return{configurable:!0,get(){if(r||this===e.prototype||this.hasOwnProperty(t)||"function"!=typeof o)return o;var i=o.bind(this);return r=!0,Object.defineProperty(this,t,{configurable:!0,get(){return i},set(e){o=e,delete this[t]}}),r=!1,i},set(e){o=e}}}function r(e){var t;return"undefined"!=typeof Reflect&&"function"==typeof Reflect.ownKeys?t=Reflect.ownKeys(e.prototype):(t=Object.getOwnPropertyNames(e.prototype),"function"==typeof Object.getOwnPropertySymbols&&(t=t.concat(Object.getOwnPropertySymbols(e.prototype)))),t.forEach(t=>{if("constructor"!==t){var i=Object.getOwnPropertyDescriptor(e.prototype,t);"function"==typeof i.value&&Object.defineProperty(e.prototype,t,o(e,t,i))}}),e}function a(){return 1===arguments.length?r.apply(void 0,arguments):o.apply(void 0,arguments)}i.d(t,"a",()=>a)},function(e,t,i){"use strict";var s;i.d(t,"b",()=>s),i.d(t,"a",()=>a),i.d(t,"c",()=>n),(e=>{e.beforeInit="beforeInit",e.ready="ready",e.beforeDestruct="beforeDestruct",e.destructed="destructed"})(s||(s={}));var o=i(0),r=i(9);class a{constructor(){this.ownerWindow=window,this.__componentStatus=s.beforeInit,this.componentName="jodit-"+Object(o.kebabCase)(Object(o.getClassName)(this)),this.uid="jodit-uid-"+Object(r.g)()}get ownerDocument(){return this.ow.document}get od(){return this.ownerDocument}get ow(){return this.ownerWindow}get componentStatus(){return this.__componentStatus}set componentStatus(e){this.setStatus(e)}setStatus(e){if(e===this.__componentStatus)return;this.__componentStatus=e;const t=this.onStatusLst&&this.onStatusLst[e];t&&t.forEach(e=>e(this))}get(e,t){return Object(o.get)(e,t||this)}get isReady(){return this.componentStatus===s.ready}get isDestructed(){return this.componentStatus===s.destructed}get isInDestruct(){return s.beforeDestruct===this.componentStatus||s.destructed===this.componentStatus}bindDestruct(e){return e.e.on(s.beforeDestruct,()=>{!this.isInDestruct&&this.destruct()}),this}destruct(){this.setStatus(s.destructed)}hookStatus(e,t){this.onStatusLst||(this.onStatusLst={}),this.onStatusLst[e]||(this.onStatusLst[e]=[]),this.onStatusLst[e].push(t)}}a.STATUSES=s;class n extends a{constructor(e){super(),this.setParentView(e)}get defaultTimeout(){return this.j.defaultTimeout}get j(){return this.jodit}setParentView(e){return this.jodit=e,e.components.add(this),this}destruct(){return this.j.components.delete(this),super.destruct()}}},(e,t,i)=>{"use strict";i.d(t,"c",()=>n),i.d(t,"g",()=>c),i.d(t,"f",()=>d),i.d(t,"e",()=>h),i.d(t,"d",()=>u),i.d(t,"b",()=>f),i.d(t,"a",()=>m);var s=i(28),o=i(1),r=i(0),a=i(17);const n={};let l=1;function c(){return l+=10*(Math.random()+1),Math.round(l).toString(16)}const d=new s.a,h={},u={},p=new WeakMap;function f(e,t,i="div",s=!1){const a=Object(r.getClassName)(t.prototype),n=p.get(e)||{};if(!n[a]){const t=Object(r.isViewObject)(e)?e:e.j;let l=t.c,c=e.od.body;s&&Object(r.isJoditObject)(e)&&e.od!==e.ed&&(l=e.createInside,c="style"===i?e.ed.head:e.ed.body);const d=l.element(i,{className:`jodit jodit-${Object(r.kebabCase)(a)}-container jodit-box`});d.classList.add("jodit_theme_"+(t.o.theme||"default")),c.appendChild(d),n[a]=d,e.hookStatus("beforeDestruct",()=>{o.a.safeRemove(d),delete n[a],Object.keys(n).length&&p.delete(e)}),p.set(e,n)}return n[a]}const m=new a.b},(e,t,i)=>{"use strict";i.d(t,"c",()=>s),i.d(t,"g",()=>o),i.d(t,"b",()=>a),i.d(t,"a",()=>n),i.d(t,"h",()=>l),i.d(t,"d",()=>c),i.d(t,"f",()=>d),i.d(t,"e",()=>h);const s=console;function o(e,t=[""],i=null){return(...o)=>(s.warn(`Method "${t[0]}" deprecated.`+(t[1]?` Use "${t[1]}" instead`:"")),e.call(i,...o))}var r=i(5);function a(e,...t){return e(...t)}function n(e,t,i){if(!e||!Object(r.h)(e.getAttribute))return null;if(/^-/.test(t)){const i=n(e,"data"+t);if(i)return i;t=t.substr(1)}if(void 0!==i){if(null!==i)return e.setAttribute(t,""+i),""+i;e.hasAttribute(t)&&e.removeAttribute(t)}return e.getAttribute(t)}function l(e,t){n(t,"data-editor_id",e.id),!t.component&&Object.defineProperty(t,"jodit",{value:e})}function c(e,t){if(!Object(r.s)(e)||!e.length)return null;const i=e.split(".");let s=t;for(const e of i){if(Object(r.w)(s[e]))return null;s=s[e]}return Object(r.w)(s)?null:s}const d=new Map,h=e=>{if(d.has(e.constructor))return d.get(e.constructor);if(e.constructor.name)return e.constructor.name;const t=(""+e.constructor).match(/^\s*function\s*(\S*)\s*\(/);return t?t[1]:""}},(e,t,i)=>{"use strict";i.d(t,"a",()=>s),i.d(t,"e",()=>o),i.d(t,"c",()=>r),i.d(t,"f",()=>n),i.d(t,"g",()=>l),i.d(t,"h",()=>c),i.d(t,"d",()=>f),i.d(t,"b",()=>m);const s=e=>e.replace(/([-_])(.)/g,(e,t,i)=>i.toUpperCase());function o(e,t={}){if("object"!=typeof e)return e.toString?""+e:e;const i=new Set(t.excludeKeys),s=new WeakMap;return JSON.stringify(e,(e,t)=>{if(!i.has(e)){if("object"==typeof t&&null!==t){if(s.get(t))return"[refObject]";s.set(t,!0)}return t}},t.prettify)}const r=e=>e.replace(/([A-Z])([A-Z])([a-z])/g,"$1-$2$3").replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase();var a=i(2);function n(e){return e.replace(Object(a.SPACE_REG_EXP_END)(),"").replace(Object(a.SPACE_REG_EXP_START)(),"")}function l(e){return e.replace(Object(a.INVISIBLE_SPACE_REG_EXP_END)(),"").replace(Object(a.INVISIBLE_SPACE_REG_EXP_START)(),"")}const c=e=>e.length?e[0].toUpperCase()+e.substr(1):"";var d=i(3),h=i(26),u=i(0),p=i(9);const f=(e,t)=>{if(!t||!t.length)return e;const i=/%([sd])/g;let s=i.exec(e),o=e,r=0;for(;s&&void 0!==t[r];)o=o.replace(s[0],""+t[r]),r+=1,s=i.exec(e);return o},m=(e,t,i)=>{if(!Object(u.isString)(e))throw Object(u.error)("i18n: Need string in first argument");const s=!(void 0===i||!i.debugLanguage);let o;const r=e=>t&&t.length?f(e,t):e,a=Object(h.a)(d.a.defaultOptions.language,d.a.defaultOptions.language),n=Object(h.a)(null==i?void 0:i.language,a),l=t=>{if(!t)return;if(Object(u.isString)(t[e]))return r(t[e]);const i=e.toLowerCase();if(Object(u.isString)(t[i]))return r(t[i]);const s=Object(u.ucfirst)(e);return Object(u.isString)(t[s])?r(t[s]):void 0};o=void 0!==p.d[n]?p.d[n]:void 0!==p.d[a]?p.d[a]:p.d.en;const c=null==i?void 0:i.i18n;if(c&&c[n]){const e=l(c[n]);if(e)return e}return l(o)||(p.d.en&&Object(u.isString)(p.d.en[e])&&p.d.en[e]?r(p.d.en[e]):s?"{"+e+"}":r(e))}},function(e,t,i){"use strict";i.r(t),i.d(t,"getPropertyDescriptor",()=>s.b),i.d(t,"watch",()=>s.c),i.d(t,"debounce",()=>a),i.d(t,"cache",()=>n),i.d(t,"wait",()=>l),i.d(t,"hook",()=>c);var s=i(15),o=i(0),r=i(8);function a(e){return(t,i)=>{if(!Object(o.isFunction)(t[i]))throw Object(o.error)("Handler must be a Function");t.hookStatus(r.b.ready,t=>{const s=Object(o.isViewObject)(t)?t:t.j;t[i]=s.async.debounce(t[i].bind(t),(Object(o.isFunction)(e)?e(t):e)||s.defaultTimeout)})}}function n(e,t,i){const s=i.get;if(!s)throw Object(o.error)("Getter property descriptor expected");i.get=function(){const e=s.call(this);return Object.defineProperty(this,t,{configurable:i.configurable,enumerable:i.enumerable,writable:!1,value:e}),e}}function l(e){return(t,i)=>{if(!Object(o.isFunction)(t[i]))throw Object(o.error)("Handler must be a Function");t.hookStatus(r.b.ready,t=>{const s=Object(o.isViewObject)(t)?t.async:t.j.async,r=t[i];let a=0;t[i]=function i(...o){s.clearTimeout(a),e(t)?r.apply(t,o):a=s.setTimeout(()=>i(...o),10)}})}}function c(e){return(t,i)=>{if(!Object(o.isFunction)(t[i]))throw Object(o.error)("Handler must be a Function");t.hookStatus(e,e=>{t[i].call(e)})}}},(e,t,i)=>{"use strict";var s=i(22);i.d(t,"a",()=>s.a),i.d(t,"b",()=>s.b),i.d(t,"c",()=>s.c)},(e,t,i)=>{"use strict";i.d(t,"a",()=>a),i.d(t,"c",()=>n),i.d(t,"b",()=>l),i(130);var s=i(0),o=i(6),r=i(1);const a=(e,t,i)=>{const a=Object(s.normalizeColor)(i),n=e.c.div("jodit-color-picker"),l=e.o.textIcons?`<span>${e.i18n("palette")}</span>`:o.b.get("palette"),c=e=>{const t=[];return Object(s.isPlainObject)(e)?Object.keys(e).forEach(i=>{t.push('<div class="jodit-color-picker__group jodit-color-picker__group-'+i+'">'),t.push(c(e[i])),t.push("</div>")}):Object(s.isArray)(e)&&e.forEach(e=>{t.push("<a "+(a===e?' class="jodit_active" ':"")+' title="'+e+'" style="background-color:'+e+'" data-color="'+e+'" href="javascript:void(0)"></a>')}),t.join("")};n.appendChild(e.c.fromHTML('<div class="jodit-color-picker__groups">'+c(e.o.colors)+"</div>")),n.appendChild(e.c.fromHTML('<div data-ref="extra" class="jodit-color-picker__extra"></div>'));const{extra:d}=Object(s.refs)(n);return e.o.showBrowserColorPicker&&Object(s.hasBrowserColorPicker)()&&(d.appendChild(e.c.fromHTML('<div class="jodit-color-picker__native">'+l+'<input type="color" value=""/></div>')),e.e.on(n,"change",e=>{e.stopPropagation();const i=e.target;if(!i||!i.tagName||!r.a.isTag(i,"input"))return;const o=i.value||"";Object(s.isFunction)(t)&&t(o),e.preventDefault()})),e.e.on(n,"mousedown touchend",i=>{i.stopPropagation();let o=i.target;if(o&&o.tagName&&!r.a.isTag(o,"svg")&&!r.a.isTag(o,"path")||!o.parentNode||(o=r.a.closest(o.parentNode,"a",e.editor)),!r.a.isTag(o,"a"))return;const a=Object(s.attr)(o,"-color")||"";t&&"function"==typeof t&&t(a),i.preventDefault()}),e.e.fire("afterGenerateColorPicker",n,d),n};i(135);const n=(e,t,i)=>{const r=e.c.div("jodit-tabs"),a=e.c.div("jodit-tabs__wrapper"),n=e.c.div("jodit-tabs__buttons"),l={},c=[];let d="",h=0;if(r.appendChild(n),r.appendChild(a),t.forEach(({icon:r,name:u,content:p})=>{const f=e.c.div("jodit-tab"),m=Object(o.a)(e,r||u,u);d||(d=u),n.appendChild(m.container),c.push(m),m.container.classList.add("jodit-tabs__button","jodit-tabs__button_columns_"+t.length),Object(s.isFunction)(p)?f.appendChild(e.c.div("jodit-tab_empty")):f.appendChild(p),a.appendChild(f),m.onAction(()=>(c.forEach(e=>{e.state.activated=!1}),Object(s.$$)(".jodit-tab",a).forEach(e=>{e.classList.remove("jodit-tab_active")}),m.state.activated=!0,f.classList.add("jodit-tab_active"),Object(s.isFunction)(p)&&p.call(e),i&&(i.__activeTab=u),!1)),l[u]={button:m,tab:f},h+=1}),!h)return r;Object(s.$$)("a",n).forEach(e=>{e.style.width=(100/h).toFixed(10)+"%"});const u=i&&i.__activeTab&&l[i.__activeTab]?i.__activeTab:d;return l[u].button.state.activated=!0,l[u].tab.classList.add("jodit-tab_active"),r},l=(e,t,i,o,a=!0)=>{let l;const c=[];if(t.upload&&e.o.uploader&&(e.o.uploader.url||e.o.uploader.insertImageAsBase64URI)){const i=e.c.fromHTML(`<div class="jodit-drag-and-drop__file-box"><strong>${e.i18n(a?"Drop image":"Drop file")}</strong><span><br>${e.i18n("or click")}</span><input type="file" accept="${a?"image/*":"*"}" tabindex="-1" dir="auto" multiple=""/></div>`);e.uploader.bind(i,i=>{const o=Object(s.isFunction)(t.upload)?t.upload:e.o.uploader.defaultHandlerSuccess;Object(s.isFunction)(o)&&o.call(e.uploader,i),e.e.fire("closeAllPopups")},t=>{e.e.fire("errorMessage",t.message),e.e.fire("closeAllPopups")}),c.push({icon:"upload",name:"Upload",content:i})}if(t.filebrowser&&(e.o.filebrowser.ajax.url||e.o.filebrowser.items.url)&&c.push({icon:"folder",name:"Browse",content(){o&&o(),t.filebrowser&&e.filebrowser.open(t.filebrowser,a)}}),t.url){const o=e.c.fromHTML(`<form onsubmit="return false;" class="jodit-form">\n\t\t\t\t\t\t<div class="jodit-form__group">\n\t\t\t\t\t\t\t<input class="jodit-input" type="text" required name="url" placeholder="http://"/>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class="jodit-form__group">\n\t\t\t\t\t\t\t<input class="jodit-input" type="text" name="text" placeholder="${e.i18n("Alternative text")}"/>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div style="text-align: right"><button class="jodit-button">${e.i18n("Insert")}</button></div>\n\t\t\t\t\t</form>`),a=o.querySelector("button"),n=o.querySelector("input[name=url]");l=null,i&&!r.a.isText(i)&&(r.a.isTag(i,"img")||Object(s.$$)("img",i).length)&&(l="IMG"===i.tagName?i:Object(s.$$)("img",i)[0],Object(s.val)(o,"input[name=url]",Object(s.attr)(l,"src")),Object(s.val)(o,"input[name=text]",Object(s.attr)(l,"alt")),a.textContent=e.i18n("Update")),i&&r.a.isTag(i,"a")&&(Object(s.val)(o,"input[name=url]",Object(s.attr)(i,"href")),Object(s.val)(o,"input[name=text]",Object(s.attr)(i,"title")),a.textContent=e.i18n("Update")),o.addEventListener("submit",i=>(i.preventDefault(),i.stopPropagation(),Object(s.val)(o,"input[name=url]")?("function"==typeof t.url&&t.url.call(e,Object(s.val)(o,"input[name=url]"),Object(s.val)(o,"input[name=text]")),!1):(n.focus(),n.classList.add("jodit_error"),!1)),!1),c.push({icon:"link",name:"URL",content:o})}return n(e,c)}},(e,t,i)=>{"use strict";i.d(t,"b",()=>a),i.d(t,"c",()=>n);var s=i(0),o=i(17),r=i(8);function a(e,t){let i;do{i=Object.getOwnPropertyDescriptor(e,t),e=Object.getPrototypeOf(e)}while(!i&&e);return i}function n(e){return(t,i)=>{if(!Object(s.isFunction)(t[i]))throw Object(s.error)("Handler must be a Function");const n=r=>{const n=(e,...t)=>{r.isInDestruct||r[i](e,...t)};Object(s.splitArray)(e).forEach(e=>{const i=e.split("."),[l]=i;let c=r[l];if(c instanceof o.c)c.on("change."+e,n);else if(Object(s.isPlainObject)(c)&&i.length>1)r[l]=o.c.create(c,[l]),r[l].on("change."+e,n);else{const i=a(t,l);Object.defineProperty(r,l,{configurable:!0,set(t){const a=c;a!==t&&(c=t,i&&i.set&&i.set.call(r,t),Object(s.isPlainObject)(c)&&(c=o.c.create(c,[l]),c.on("change."+e,n)),n(l,a,c))},get:()=>i&&i.get?i.get.call(r):c})}})};Object(s.isFunction)(t.hookStatus)?t.hookStatus(r.b.ready,n):n(t)}}t.a=n},(e,t,i)=>{"use strict";i.d(t,"a",()=>n),i.d(t,"c",()=>l),i.d(t,"b",()=>c),i.d(t,"d",()=>d);var s=i(10),o=i(1),r=i(2),a=i(11);function n(e,t,i){return Object(s.b)(t?o.a.prev:o.a.next,e,e=>{var t;return!(!e||o.a.isText(e)&&!(null===(t=e.nodeValue)||void 0===t?void 0:t.length))},i)}function l(e,t){return t?e.previousSibling:e.nextSibling}function c(e,t){return o.a.getNormalSibling(e,t,e=>{var t;return!o.a.isEmptyTextNode(e)&&!!(!o.a.isText(e)||(null===(t=e.nodeValue)||void 0===t?void 0:t.length)&&Object(a.f)(e.nodeValue))})}function d(e,t){let i=o.a.getNormalSibling(e,t),s=o.a.getNormalSibling(e,!t);for(;o.a.isElement(i)&&!o.a.isTag(i,r.INSEPARABLE_TAGS)&&!s;)t||!i.firstChild?i.appendChild(e):o.a.before(i.firstChild,e),i=l(e,t),s=l(e,!t)}},function(e,t,i){"use strict";i.d(t,"b",()=>a),i.d(t,"c",()=>n),i.d(t,"d",()=>s),i.d(t,"a",()=>o);const s="JoditEventDefaultNamespace";class o{constructor(){this.__store={}}get(e,t){if(void 0!==this.__store[t])return this.__store[t][e]}indexOf(e,t,i){const s=this.get(e,t);if(s)for(let e=0;s.length>e;e+=1)if(s[e].originalCallback===i)return e;return!1}namespaces(e=!1){const t=Object.keys(this.__store);return e?t.filter(e=>e!==s):t}events(e){return this.__store[e]?Object.keys(this.__store[e]):[]}set(e,t,i,s=!1){void 0===this.__store[t]&&(this.__store[t]={}),void 0===this.__store[t][e]&&(this.__store[t][e]=[]),s?this.__store[t][e].unshift(i):this.__store[t][e].push(i)}clear(){delete this.__store,this.__store={}}}var r=i(0);class a{constructor(e){this.__key="__JoditEventsNativeNamespaces",this.doc=document,this.__stopped=[],this.prepareEvent=e=>{e.cancelBubble||(e.type.match(/^touch/)&&e.changedTouches&&e.changedTouches.length&&["clientX","clientY","pageX","pageY"].forEach(t=>{Object.defineProperty(e,t,{value:e.changedTouches[0][t],configurable:!0,enumerable:!0})}),e.originalEvent||(e.originalEvent=e),"paste"===e.type&&void 0===e.clipboardData&&this.doc.defaultView.clipboardData&&Object.defineProperty(e,"clipboardData",{get:()=>this.doc.defaultView.clipboardData,configurable:!0,enumerable:!0}))},this.currents=[],this.isDestructed=!1,e&&(this.doc=e),this.__key+=(new Date).getTime()}eachEvent(e,t){e.split(/[\s,]+/).forEach(e=>{const i=e.split(".");t.call(this,i[0],i[1]||s)})}getStore(e){if(!e)throw Object(r.error)("Need subject");if(void 0===e[this.__key]){const t=new o;Object.defineProperty(e,this.__key,{enumerable:!1,configurable:!0,value:t})}return e[this.__key]}clearStore(e){void 0!==e[this.__key]&&delete e[this.__key]}triggerNativeEvent(e,t){const i=this.doc.createEvent("HTMLEvents");"string"==typeof t?i.initEvent(t,!0,!0)