diff --git a/build/jodit.css b/build/jodit.css index f2f1f9049..ae44036da 100644 --- a/build/jodit.css +++ b/build/jodit.css @@ -1,7 +1,7 @@ /*! jodit - Jodit is awesome and usefully wysiwyg editor with filebrowser Author: Chupurnov (https://xdsoft.net/) - Version: v3.3.1 + Version: v3.3.2 Url: https://xdsoft.net/jodit/ License(s): GPL-2.0-or-later OR MIT OR Commercial */ diff --git a/build/jodit.es2018.css b/build/jodit.es2018.css index f2f1f9049..ae44036da 100644 --- a/build/jodit.es2018.css +++ b/build/jodit.es2018.css @@ -1,7 +1,7 @@ /*! jodit - Jodit is awesome and usefully wysiwyg editor with filebrowser Author: Chupurnov (https://xdsoft.net/) - Version: v3.3.1 + Version: v3.3.2 Url: https://xdsoft.net/jodit/ License(s): GPL-2.0-or-later OR MIT OR Commercial */ diff --git a/build/jodit.es2018.js b/build/jodit.es2018.js index 566c4bd90..1cd4531f5 100644 --- a/build/jodit.es2018.js +++ b/build/jodit.es2018.js @@ -1,7 +1,7 @@ /*! jodit - Jodit is awesome and usefully wysiwyg editor with filebrowser Author: Chupurnov (https://xdsoft.net/) - Version: v3.3.1 + Version: v3.3.2 Url: https://xdsoft.net/jodit/ License(s): GPL-2.0-or-later OR MIT OR Commercial */ @@ -735,13 +735,11 @@ __webpack_require__.d(helpers_namespaceObject, "JoditObject", function() { retur __webpack_require__.d(helpers_namespaceObject, "asArray", function() { return asArray; }); __webpack_require__.d(helpers_namespaceObject, "inArray", function() { return inArray; }); __webpack_require__.d(helpers_namespaceObject, "splitArray", function() { return splitArray; }); -__webpack_require__.d(helpers_namespaceObject, "debounce", function() { return debounce; }); -__webpack_require__.d(helpers_namespaceObject, "setTimeout", function() { return setTimeout_setTimeout; }); __webpack_require__.d(helpers_namespaceObject, "isNumeric", function() { return isNumeric; }); __webpack_require__.d(helpers_namespaceObject, "isPlainObject", function() { return isPlainObject; }); __webpack_require__.d(helpers_namespaceObject, "isURL", function() { return isURL; }); __webpack_require__.d(helpers_namespaceObject, "isWindow", function() { return isWindow; }); -__webpack_require__.d(helpers_namespaceObject, "colorToHex", function() { return colorToHex; }); +__webpack_require__.d(helpers_namespaceObject, "normilizeCSSValue", function() { return normilizeCSSValue; }); __webpack_require__.d(helpers_namespaceObject, "camelCase", function() { return camelCase; }); __webpack_require__.d(helpers_namespaceObject, "fromCamelCase", function() { return fromCamelCase; }); __webpack_require__.d(helpers_namespaceObject, "appendScript", function() { return appendScript; }); @@ -764,6 +762,8 @@ __webpack_require__.d(helpers_namespaceObject, "getXPathByElement", function() { __webpack_require__.d(helpers_namespaceObject, "hasOwn", function() { return hasOwn; }); __webpack_require__.d(helpers_namespaceObject, "type", function() { return type_type; }); __webpack_require__.d(helpers_namespaceObject, "val", function() { return val_val; }); +__webpack_require__.d(helpers_namespaceObject, "debounce", function() { return debounce; }); +__webpack_require__.d(helpers_namespaceObject, "setTimeout", function() { return setTimeout_setTimeout; }); __webpack_require__.d(helpers_namespaceObject, "throttle", function() { return throttle; }); __webpack_require__.d(helpers_namespaceObject, "isHTML", function() { return isHTML; }); __webpack_require__.d(helpers_namespaceObject, "isHTMLFromWord", function() { return isHTMLFromWord; }); @@ -773,6 +773,7 @@ __webpack_require__.d(helpers_namespaceObject, "isString", function() { return i __webpack_require__.d(helpers_namespaceObject, "isFunction", function() { return isFunction; }); __webpack_require__.d(helpers_namespaceObject, "hasBrowserColorPicker", function() { return hasBrowserColorPicker; }); __webpack_require__.d(helpers_namespaceObject, "hexToRgb", function() { return hexToRgb; }); +__webpack_require__.d(helpers_namespaceObject, "colorToHex", function() { return colorToHex; }); __webpack_require__.d(helpers_namespaceObject, "applyStyles", function() { return applyStyles; }); __webpack_require__.d(helpers_namespaceObject, "cleanFromWord", function() { return cleanFromWord; }); __webpack_require__.d(helpers_namespaceObject, "clear", function() { return clear_clear; }); @@ -785,7 +786,6 @@ __webpack_require__.d(helpers_namespaceObject, "normalizePath", function() { ret __webpack_require__.d(helpers_namespaceObject, "normalizeRelativePath", function() { return normalizeRelativePath; }); __webpack_require__.d(helpers_namespaceObject, "normalizeSize", function() { return normalizeSize; }); __webpack_require__.d(helpers_namespaceObject, "normalizeURL", function() { return normalizeURL; }); -__webpack_require__.d(helpers_namespaceObject, "normilizeCSSValue", function() { return normilizeCSSValue; }); __webpack_require__.d(helpers_namespaceObject, "normalizeColor", function() { return normalizeColor; }); __webpack_require__.d(helpers_namespaceObject, "getContentWidth", function() { return getContentWidth; }); __webpack_require__.d(helpers_namespaceObject, "innerWidth", function() { return innerWidth_innerWidth; }); @@ -5842,7 +5842,7 @@ class panel_Panel extends Component_Component { class view_View extends panel_Panel { constructor(jodit, options) { super(jodit); - this.version = "3.3.1"; + this.version = "3.3.2"; this.__modulesInstances = {}; this.buffer = storage_Storage.makeStorage(); this.progress_bar = this.create.div('jodit_progress_bar', this.create.div()); diff --git a/build/jodit.es2018.min.css b/build/jodit.es2018.min.css index 62946006b..c8de17f1d 100644 --- a/build/jodit.es2018.min.css +++ b/build/jodit.es2018.min.css @@ -1,7 +1,7 @@ /*! jodit - Jodit is awesome and usefully wysiwyg editor with filebrowser Author: Chupurnov (https://xdsoft.net/) - Version: v3.3.1 + Version: v3.3.2 Url: https://xdsoft.net/jodit/ License(s): GPL-2.0-or-later OR MIT OR Commercial */ diff --git a/build/jodit.es2018.min.js b/build/jodit.es2018.min.js index c11b8c650..e7911cf67 100644 --- a/build/jodit.es2018.min.js +++ b/build/jodit.es2018.min.js @@ -1,9 +1,9 @@ /*! jodit - Jodit is awesome and usefully wysiwyg editor with filebrowser Author: Chupurnov (https://xdsoft.net/) - Version: v3.3.1 + Version: v3.3.2 Url: https://xdsoft.net/jodit/ License(s): GPL-2.0-or-later OR MIT OR Commercial */ -((t,e)=>{if("object"==typeof exports&&"object"==typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var i=e();for(var o in i)("object"==typeof exports?exports:t)[o]=i[o]}})(window,(function(){return(t=>{var e={};function i(o){if(e[o])return e[o].exports;var s=e[o]={i:o,l:!1,exports:{}};return t[o].call(s.exports,s,s.exports,i),s.l=!0,s.exports}return i.m=t,i.c=e,i.d=(t,e,o)=>{i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:o})},i.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=(t,e)=>{if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var o=Object.create(null);if(i.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var s in t)i.d(o,s,(e=>t[e]).bind(null,s));return o},i.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return i.d(e,"a",e),e},i.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),i.p="/build/",i(i.s=95)})([(t,e)=>{t.exports.default=["Type something","About Jodit","Jodit Editor","Free Non-commercial Version","GNU General Public License, version 2 or later","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 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","Align Center","Align Justify","Align Left","Align Right","Insert Horizontal Line","Insert Image","Insert file","Insert youtube/vimeo video","Insert link","Font size","Font family","Insert format block","Normal","Heading 1","Heading 2","Heading 3","Heading 4","Quote","Code","Insert","Insert table","Decrease Indent","Increase Indent","Select Special Character","Insert Special Character","Paint format","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","file","Advanced","Image properties","Cancel","Ok","File Browser","Error on load list","Error on load folders","Are you sure?","Enter Directory name","Create directory","type name","Drop image","Drop file","or click","Alternative text","Upload","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","Chars: %d","Words: %d","Strike through","Underline","superscript","subscript","Cut selection","Select all","Break","Search for","Replace with","Replace","Paste","Choose Content to Paste","source","bold","italic","brush","link","undo","redo","table","image","eraser","paragraph","fontsize","video","font","about","print","symbol","underline","strikethrough","indent","outdent","fullsize","shrink","copyformat","hr","ul","ol","cut","selectall","Embed code","Open link","Edit link","No follow","Unlink","Update","pencil","Eye"," URL","Edit","Horizontal align","Filter","Sort by changed","Sort by name","Sort by size","Add folder","Reset","Save","Save as ...","Resize","Crop","Width","Height","Keep Aspect Ratio","Yes","No","Remove","Select","Select %s","Vertical align","Split","Merge","Add column","Add row","License: %s","Delete","Split vertical","Split horizontal","Border","Your code is similar to HTML. Keep as HTML?","Paste as HTML","Keep","Insert as Text","Insert only Text","You can only edit your own images. Download this image on the host?","The image has been successfully uploaded to the host!","palette","There are no files","rename","Enter new name","preview","download","Paste from clipboard","Your browser doesn't support direct access to the clipboard.","Copy selection","copy","Border radius"]},(t,e)=>{t.exports='\n\t\n\n'},(t,e)=>{t.exports='\n\n\t\n\t\t\n\t\t\n\t\t\n\t\n\n\n'},(t,e)=>{t.exports='\n\n\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\n\n\n'},(t,e)=>{t.exports='\n \n'},(t,e)=>{t.exports=''},(t,e)=>{t.exports=''},(t,e)=>{t.exports=''},(t,e)=>{t.exports=''},(t,e)=>{t.exports=''},(t,e)=>{t.exports=''},(t,e)=>{t.exports=''},(t,e)=>{t.exports=''},(t,e)=>{t.exports=''},(t,e)=>{t.exports='\n \n \n \n \n\n'},(t,e)=>{t.exports=''},(t,e)=>{t.exports=''},(t,e)=>{t.exports=''},(t,e)=>{t.exports=''},(t,e)=>{t.exports='\n'},(t,e)=>{t.exports='\n \n'},(t,e)=>{t.exports='\n\t\n\t\n\t\n\t\n\n'},(t,e)=>{t.exports='\n \n'},(t,e)=>{t.exports=''},(t,e)=>{t.exports='\n \n \n \n'},(t,e)=>{t.exports='\n\t\n\n'},(t,e)=>{t.exports='\n \n \n \n'},(t,e)=>{t.exports=''},(t,e)=>{t.exports=''},(t,e)=>{t.exports='\n \n'},(t,e)=>{t.exports='\n\t\n\n'},(t,e)=>{t.exports=''},(t,e)=>{t.exports=''},(t,e)=>{t.exports='\n\t\n'},(t,e)=>{t.exports=''},(t,e)=>{t.exports=''},(t,e)=>{t.exports='\n \n'},(t,e)=>{t.exports=''},(t,e)=>{t.exports=''},(t,e)=>{t.exports=''},(t,e)=>{t.exports=''},(t,e)=>{t.exports=''},(t,e)=>{t.exports=''},(t,e)=>{t.exports=''},(t,e)=>{t.exports='\n \n \n \n \n \n \n\n'},(t,e)=>{t.exports='\n \n'},(t,e)=>{t.exports='\n\t\n'},(t,e)=>{t.exports='\n \n'},(t,e)=>{t.exports='\n\n\t\n\t\t\n\t\n\n\n'},(t,e)=>{t.exports=''},(t,e)=>{t.exports='\n\t\n\n'},(t,e)=>{t.exports=''},(t,e)=>{t.exports=''},(t,e)=>{t.exports='\n \n'},(t,e)=>{t.exports='\n \n'},(t,e)=>{t.exports='\n \n \n \n \n \n \n'},(t,e)=>{t.exports='\n \n'},(t,e)=>{t.exports='\n \n'},(t,e)=>{t.exports='\n \n'},(t,e)=>{t.exports='\n \n \n \n \n \n \n \n'},(t,e)=>{t.exports='\n \n'},(t,e)=>{t.exports='\n \n'},(t,e)=>{t.exports='\n \n'},(t,e)=>{t.exports='\n \n \n'},(t,e)=>{t.exports=''},(t,e)=>{t.exports='\n \n'},(t,e)=>{t.exports='\n \n'},(t,e)=>{t.exports=''},(t,e)=>{t.exports=''},(t,e)=>{t.exports=''},(t,e)=>{t.exports=''},(t,e)=>{t.exports=''},(t,e)=>{t.exports=''},(t,e)=>{t.exports=''},(t,e)=>{t.exports=''},(t,e)=>{t.exports=''},(t,e)=>{t.exports=''},(t,e)=>{t.exports=''},(t,e)=>{t.exports=''},(t,e)=>{t.exports.default=["إبدأ في الكتابة...","حول جوديت","محرر جوديت","الإصدار الغير تجاري مجاني","رخصة جنو العمومية العامة ، الإصدار الثاني أو الأحدث","دليل مستخدم جوديت","يحتوي على مساعدة مفصلة للاستخدام","للحصول على معلومات حول الترخيص، يرجى الذهاب لموقعنا:","شراء النسخة الكاملة","حقوق الطبع والنشر © XDSoft.net - Chupurnov Valeriy. كل الحقوق محفوظة.","مِرْساة","فتح في نافذة جديدة","فتح المحرر في الحجم الكامل","مسح التنسيق","ملء اللون أو تعيين لون النص","إعادة","تراجع","عريض","مائل","إدراج قائمة غير مرتبة","إدراج قائمة مرتبة","محاذاة للوسط","محاذاة مثبتة","محاذاة لليسار","محاذاة لليمين","إدراج خط أفقي","إدراج صورة","ادخال الملف","إدراج فيديو يوتيوب/فيميو ","إدراج رابط","حجم الخط","نوع الخط","إدراج كتلة تنسيق","عادي","عنوان 1","عنوان 2","عنوان 3","عنوان 4","إقتباس","كود","إدراج","إدراج جدول","تقليل المسافة البادئة","زيادة المسافة البادئة","تحديد أحرف خاصة","إدراج حرف خاص","تنسيق الرسم","تغيير الوضع","هوامش","أعلى","يمين","أسفل","يسار","الأنماط","الطبقات","محاذاة","اليمين","الوسط","اليسار","--غير مضبوط--","Src","العنوان","العنوان البديل","الرابط","افتح الرابط في نافذة جديدة","الصورة","ملف","متقدم","خصائص الصورة","إلغاء","حسنا","متصفح الملفات","حدث خطأ في تحميل القائمة ","حدث خطأ في تحميل المجلدات","هل أنت واثق؟","أدخل اسم المجلد","إنشاء مجلد","أكتب إسم","إسقاط صورة","إسقاط الملف","أو أنقر","النص البديل","رفع","تصفح","الخلفية","نص","أعلى","الوسط","الأسفل","إدراج عمود قبل","إدراج عمود بعد","إدراج صف أعلى","إدراج صف أسفل","حذف الجدول","حذف الصف","حذف العمود","خلية فارغة","%d حرف","%d كلام","اضرب من خلال","أكد","حرف فوقي","مخطوطة","قطع الاختيار","اختر الكل","استراحة","البحث عن","استبدل ب","يحل محل","معجون","اختر محتوى للصق","مصدر","بالخط العريض","مائل","شغل","صلة","إلغاء","كرر","طاولة","صورة","نظيف","فقرة","حجم الخط","فيديو","الخط","حول المحرر","طباعة","رمز","أكد","شطب","المسافة البادئة","نتوء","ملء الشاشة","الحجم التقليدي","نسخ التنسيق","الخط","قائمة","قائمة مرقمة","قطع","اختر الكل","قانون","فتح الرابط","تعديل الرابط","سمة Nofollow","إزالة الرابط","تحديث","لتحرير","مراجعة","URL","تحرير","محاذاة أفقية","فلتر","عن طريق التغيير","بالاسم","حسب الحجم","إضافة مجلد","إعادة","احتفظ","حفظ باسم","تغيير الحجم","حجم القطع","عرض","ارتفاع","حافظ على النسب","أن","لا","حذف","تميز","تميز %s","محاذاة عمودية","انشق، مزق","اذهب","أضف العمود","اضف سطر","رخصة %s","حذف","انقسام عمودي","تقسيم أفقي","الحدود","يشبه الكود الخاص بك HTML. تبقي كما HTML؟","الصق ك HTML","احتفظ","إدراج كنص","إدراج النص فقط","يمكنك فقط تحرير صورك الخاصة. تحميل هذه الصورة على المضيف؟","تم تحميل الصورة بنجاح على الخادم!","لوحة","لا توجد ملفات في هذا الدليل.","إعادة تسمية","أدخل اسم جديد","معاينة","تحميل","لصق من الحافظة","متصفحك لا يدعم إمكانية الوصول المباشر إلى الحافظة.","نسخ التحديد","نسخ","دائرة نصف قطرها الحدود"]},(t,e)=>{t.exports.default=["Napiš něco","O Jodit","Editor Jodit","Verze pro nekomerční použití","Licence GNU (GPL), verze 2 nebo vyšší","Jodit Uživatelská příručka","obsahuje detailní nápovědu","Pro informace o licenci, prosím, přejděte na naši stránku:","Koupit plnou verzi","Copyright © XDSoft.net - Chupurnov Valeriy. Všechna práva vyhrazena.","Anchor","Otevřít v nové záložce","Otevřít v celoobrazovkovém režimu","Vyčistit formátování","Barva výplně a písma","Vpřed","Zpět","Tučné","Kurzíva","Odrážky","Číslovaný seznam","Zarovnat na střed","Zarovnat do bloku","Zarovnat vlevo","Zarovnat vpravo","Vložit horizontální linku","Vložit obrázek","Vložit soubor","Vložit video (YT/Vimeo)","Vložit odkaz","Velikost písma","Typ písma","Formátovat blok","Normální text","Nadpis 1","Nadpis 2","Nadpis 3","Nadpis 4","Citát","Kód","Vložit","Vložit tabulku","Zmenšit odsazení","Zvětšit odsazení","Vybrat speciální symbol","Vložit speciální symbol","Použít formát","Změnit mód","Okraje","horní","pravý","spodní","levý","Styly","Třídy","Zarovnání","Vpravo","Na střed","Vlevo","--nenastaveno--","src","Titulek","Alternativní text (alt)","Link","Otevřít link v nové záložce","Obrázek","soubor","Rozšířené","Vlastnosti obrázku","Zpět","Ok","Prohlížeč souborů","Chyba při načítání seznamu souborů","Chyba při načítání složek","Jste si jistý(á)?","Název složky","Vytvořit složku","název","Přetáhněte sem obrázek","Přetáhněte sem soubor","nebo klikněte","Alternativní text","Nahrát","Server","Pozadí","Text","Nahoru","Na střed","Dolu","Vložit sloupec před","Vložit sloupec za","Vložit řádek nad","Vložit řádek pod","Vymazat tabulku","Vymazat řádku","Vymazat sloupec","Vyčistit buňku","Znaky: %d","Slova: %d","Přeškrtnuto","Podtrženo","Horní index","Dolní index","Vyjmout označené","Označit vše","Zalomení","Najdi","Nahradit za","Nahradit","Vložit","Vyber obsah pro vložení","HTML","tučně","kurzíva","štětec","odkaz","zpět","vpřed","tabulka","obrázek","guma","odstavec","velikost písma","video","písmo","о editoru","tisk","symbol","podtrženo","přeškrtnuto","zvětšit odsazení","zmenšit odsazení","celoobrazovkový režim","smrsknout","Kopírovat formát","Linka","Odrážka","Číslovaný seznam","Vyjmout","Označit vše","Kód","Otevřít odkaz","Upravit odkaz","Atribut no-follow","Odstranit odkaz","Aktualizovat","Chcete-li upravit","Zobrazit","URL","Editovat","Horizontální zarovnání","Filtr","Dle poslední změny","Dle názvu","Dle velikosti","Přidat složku","Reset","Uložit","Uložit jako...","Změnit rozměr","Ořezat","Šířka","Výška","Ponechat poměr","Ano","Ne","Vyjmout","Označit","Označit %s","Vertikální zarovnání","Rozdělit","Spojit","Přidat sloupec","Přidat řádek","Licence: %s","Vymazat","Rozdělit vertikálně","Rozdělit horizontálně","Okraj","Váš text se podobá HTML. Vložit ho jako HTML?","Vložit jako HTML","Ponechat originál","Vložit jako TEXT","Vložit pouze TEXT","Můžete upravovat pouze své obrázky. Načíst obrázek?","Obrázek byl úspěšně nahrán!","paleta","V tomto adresáři nejsou žádné soubory.","přejmenovat","Zadejte nový název","náhled","Stažení","Vložit ze schránky","Váš prohlížeč nepodporuje přímý přístup do schránky.","Kopírovat výběr","kopírování","Border radius"]},(t,e)=>{t.exports.default=["Bitte geben Sie einen Text ein","Über Jodit","Jodit Editor","Freie Nicht-kommerzielle Version","GNU General Public License, Version 2 oder höher","Das Jodit Benutzerhandbuch","beinhaltet ausführliche Informationen wie Sie den Editor verwenden können.","Für Lizenz-Informationen, besuchen Sie bitte unsere Webseite:","Vollversion kaufen","Copyright © XDSoft.net - Chupurnov Valeriy. Alle Rechte vorbehalten.","Anker","In neuer Registerkarte öffnen","Editor in voller Größe öffnen","Formatierung löschen","Füllfarbe oder Textfarbe ändern","Wiederholen","Rückgängig machen","Fett","Kursiv","Ungeordnete Liste einfügen","Sortierte Liste einfügen","Mittig ausrichten","Blocksatz","Links ausrichten","Rechts ausrichten","Horizontale Linie einfügen","Bild einfügen","Datei einfügen","Youtube/vimeo Video einfügen","Link einfügen","Schriftgröße","Schriftfamilie","Formatblock einfügen","Normal","Überschrift 1","Überschrift 2","Überschrift 3","Überschrift 4","Zitat","Code","Einfügen","Tabelle einfügen","Einzug verkleinern","Einzug vergrößern","Sonderzeichen auswählen","Sonderzeichen einfügen","Format kopieren","Änderungsmodus","Ränder","Oben","Rechts","Unten","Links","CSS Stiel","CSS Klassen","Ausrichten","Rechts","Zentriert","Links","Keine","Pfad","Titel","Alternativer Text","Link","Link in neuem Tab öffnen","Bild","Datei","Fortgeschritten","Bildeigenschaften","Abbrechen","OK","Dateibrowser","Fehler beim Laden der Liste","Fehler beim Laden der Ordner","Sind Sie sicher?","Geben Sie den Verzeichnisnamen ein","Verzeichnis erstellen","Typname","Bild hier hinziehen","Datei löschen","oder hier klicken","Alternativtext","Hochladen","Auswählen","Hintergrund","Text","Oben","Mittig","Unten","Spalte einfügen vor","Spalte einfügen nach","Zeile einfügen oberhalb","Zeile unterhalb einfügen","Tabelle löschen","Zeile löschen","Spalte löschen","Leere Zelle","Zeichen: %d","Wörter: %d","Durchschlagen","Unterstreichen","hochgestellt","Index","Auswahl ausschneid","Wählen Sie Alle aus","Pause","Suche nach","Ersetzen durch","Ersetzen","Einfügen","Wählen Sie Inhalt zum Einfügen","HTML","Fett gedruckt","kursiv","Bürste","Verknüpfung","rückgängig machen","wiederholen","Tabelle","Bild","Radiergummi","Absatz","Schriftgröße","Video","Schriftart","Über","drucken","Symbol","unterstreichen","durchgestrichen","Einzug","Aussenseiter","Vollgröße","schrumpfen","Format kopierenт","die Linie","Liste von","Nummerierte Liste","Schnitt","Wählen Sie Alle aus","Code einbetten","Link öffnen","Link bearbeiten","Nofollow-Attribut","Link entfernen","Aktualisieren","Bearbeiten","Ansehen","URL","Bearbeiten","Horizontale Ausrichtung","filter","Sortieren nach geändert","Nach Name sortieren","Nach Größe sortiert","Ordner hinzufügen","Wiederherstellen","Speichern","Speichern als","Ändern Sie die Größe","Größe anpassen","Breite","Höhe","Halten Sie Proportionen","Ja","Nein","Entfernen","Markieren","Markieren: %s","Vertikale Ausrichtung","Split","Verschmelzen","Spalte hinzufügen","Zeile hinzufügen",null,"Löschen","Split vertikal","Split horizontally","Rand","Es scheint als dass Sie HTML-Text einfügen möchten","Als HTML einfügen?","Original speichern","Als Text einfügen","Nur Text einfügen","Sie können nur Ihre eigenen Bilder bearbeiten. Laden Sie dieses Bild auf dem Host herunter?","Das Bild wurde erfolgreich auf den Server hochgeladen!null","Palette","In diesem Verzeichnis befinden sich keine Dateien.","umbenennen","Geben Sie einen neuen Namen ein","Vorschau","Herunterladen","Aus der Zwischenablage einfügen","Ihr browser unterstützt kein direkter Zugriff auf die Zwischenablage.","Auswahl kopieren","kopieren","Border-radius"]},(t,e)=>{t.exports.default=["Escriba algo...","Acerca de Jodit","Jodit Editor","Versión gratis no comercial","GNU General Public License, Versión 2 o posterior","Guía de usuario Jodit","contiene ayuda detallada para el uso.","Para información sobre la licencia, por favor visite nuestro sitio:","Compre la versión completa","Copyright © XDSoft.net - Chupurnov Valeriy. Todos los derechos reservados.","Anclar","Abrir en nueva pestaña","Abrir editor en pantalla completa","Limpiar formato","Color de relleno o de letra","Rehacer","Deshacer","Negrita","Cursiva","Insertar lista no ordenada","Insertar lista ordenada","Alinear Centrado","Alinear Justificado","Alinear Izquierda","Alinear Derecha","Insertar línea horizontal","Insertar imagen","Insertar archivo","Insertar video de Youtube/vimeo","Insertar vínculo","Tamaño de letra","Familia de letra","Insertar bloque","Normal","Encabezado 1","Encabezado 2","Encabezado 3","Encabezado 4","Cita","Código","Insertar","Insertar tabla","Disminuir sangría","Aumentar sangría","Seleccionar caracter especial","Insertar caracter especial","Copiar formato","Cambiar modo","Márgenes","arriba","derecha","abajo","izquierda","Estilos CSS","Clases CSS","Alinear","Derecha","Centrado","Izquierda","--No Establecido--","Fuente","Título","Texto Alternativo","Vínculo","Abrir vínculo en nueva pestaña","Imagen","Archivo","Avanzado","Propiedades de imagen","Cancelar","Aceptar","Buscar archivo","Error al cargar la lista","Error al cargar las carpetas","¿Está seguro?","Entre nombre de carpeta","Crear carpeta","Entre el nombre","Soltar imagen","Soltar archivo","o click","Texto alternativo","Subir","Buscar","Fondo","Texto","Arriba","Centro","Abajo","Insertar columna antes","Interar columna después","Insertar fila arriba","Insertar fila debajo","Borrar tabla","Borrar fila","Borrar columna","Vaciar celda","Caracteres: %d","Palabras: %d","Tachado","Subrayado","superíndice","subíndice","Cortar selección","Seleccionar todo","Pausa","Buscar","Reemplazar con","Reemplazar","Pegar","Seleccionar contenido para pegar","HTML","negrita","cursiva","Brocha","Vínculo","deshacer","rehacer","Tabla","Imagen","Borrar","Párrafo","Tamaño de letra","Video","Letra","Acerca de","Imprimir","Símbolo","subrayar","tachar","sangría","quitar sangría","Tamaño completo","encoger","Copiar formato","línea horizontal","lista sin ordenar","lista ordenada","Cortar","Seleccionar todo","Incluir código","Abrir vínculo","Editar vínculo","No seguir","Desvincular","Actualizar","Para editar","Ver","URL","Editar","Alineación horizontal","filtrar","Ordenar por fecha modificación","Ordenar por nombre","Ordenar por tamaño","Agregar carpeta","Resetear","Guardar","Guardar como...","Redimensionar","Recortar","Ancho","Alto","Mantener relación de aspecto","Si","No","Quitar","Seleccionar","Seleccionar: %s","Alineación vertical","Dividir","Mezclar","Agregar columna","Agregar fila",null,"Borrar","Dividir vertical","Dividir horizontal","Borde","El código es similar a HTML. ¿Mantener como HTML?","Pegar como HTML?","Mantener","Insertar como texto","Insertar solo texto","Solo puedes editar tus propias imágenes. ¿Descargar esta imagen en el servidor?","¡La imagen se ha subido correctamente al servidor!","paleta","No hay archivos en este directorio.","renombrar","Ingresa un nuevo nombre","avance","Descargar","Pegar desde el portapapeles","Su navegador no soporta el acceso directo en el portapapeles.","Selección de copia","copia","Radio frontera"]},(t,e)=>{t.exports.default=["Ecrivez ici","A propos de Jodit","Editeur Jodit","Version gratuite, non commerciale","GNU General Public License, version 2 ou ultérieure","Guide de l'utilisateur","Aide détaillée à l'utilisation","Consulter la licence sur notre site web:","Acheter la version complète","Copyright © XDSoft.net - Chupurnov Valeriy. Tous droits réservés.","Ancre","Ouvrir dans un nouvel onglet","Ouvrir l'éditeur en pleine page","Supprimer le formattage","Modifier la couleur du fond ou du texte","Refaire","Défaire","Gras","Italique","Liste non ordonnée","Liste ordonnée","Centrer","Justifier","Aligner à gauche ","Aligner à droite","Insérer une ligne horizontale","Insérer une image","Insérer un fichier","Insérer une vidéo","Insérer un lien","Taille des caractères","Famille des caractères","Bloc formatté","Normal","Titre 1","Titre 2","Titre 3","Titre 4","Citation","Code","Insérer","Insérer un tableau","Diminuer le retrait","Retrait plus","Sélectionnez un caractère spécial","Insérer un caractère spécial","Cloner le format","Mode wysiwyg <-> code html","Marges","haut","droite","Bas","gauche","Styles","Classes","Alignement","Droite","Centre","Gauche","--Non disponible--","Source","Titre","Alternative","Lien","Ouvrir le lien dans un nouvel onglet","Image","fichier","Avancé","Propriétés de l'image","Effacer","OK","Explorateur de fichiers","Erreur de liste de chargement","Erreur de dossier de chargement","Etes-vous sûrs ?","Entrer le non de dossier","Créer un dossier","type de fichier","Coller une image","Déposer un fichier","ou cliquer","Texte de remplacemement","Charger","Chercher","Arrière-plan","Texte","Haut","Milieu","Bas","Insérer une colonne avant","Insérer une colonne après","Insérer une ligne en dessus","Insérer une ligne en dessous","Supprimer le tableau","Supprimer la ligne","Supprimer la colonne","Vider la cellule","Symboles: %d","Mots: %d","Frapper à travers","Souligner","exposant","indice","Couper la sélection","Tout sélectionner","Pause","Rechercher","Remplacer par","Remplacer","Coller","Choisissez le contenu à coller","la source","graisseux","italique","verser","lien","abolir","prêt","graphique","Image","la gommen","clause","taille de police","Video","police","à propos de l'éditeur","impression","caractère","souligné","barré","indentation","indifférent","taille réelle","taille conventionnelle","Format de copie","la ligne","Liste des","Liste numérotée","Couper","Sélectionner tout",null,"Ouvrir le lien","Modifier le lien","Attribut Nofollow","Supprimer le lien","Mettre à jour","Pour éditer","Voir","URL",null,"Alignement horizontal","Filtre","Trier par modifié","Trier par nom","Classer par taille","Ajouter le dossier","Restaurer","Sauvegarder","Enregistrer sous","Changer la taille","Taille de garniture","Largeur","Hauteur","Garder les proportions","Oui","Non","Supprimer","Mettre en évidence","Mettre en évidence: %s","Alignement vertical","Split","aller","Ajouter une colonne","Ajouter une rangée",null,"Effacer","Split vertical","Split horizontal",null,"Votre texte que vous essayez de coller est similaire au HTML. Collez-le en HTML?","Coller en HTML?","Sauvegarder l'original","Coller en tant que texte","Coller le texte seulement","Vous ne pouvez éditer que vos propres images. Téléchargez cette image sur l'hôte?","L'image a été téléchargée avec succès sur le serveur!null","Palette","Il n'y a aucun fichier dans ce répertoire.","renommer","Entrez un nouveau nom","Aperçu","Télécharger","Coller à partir du presse-papiers","Votre navigateur ne prend pas en charge l'accès direct à la presse-papiers.","Copier la sélection","copie","Rayon des frontières"]},(t,e)=>{t.exports.default=["הקלד משהו...","About Jodit","Jodit Editor","Free Non-commercial Version","GNU General Public License, version 2 or later","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.","מקום עיגון","פתח בכרטיסיה חדשה","פתח את העורך בחלון חדש","נקה עיצוב","שנה צבע טקסט או רקע","בצע שוב","בטל","מודגש","נטוי","הכנס רשימת תבליטים","הכנס רשימה ממוספרת","מרכז","ישר ","ישר לשמאל","ישר לימין","הכנס קו אופקי","הכנס תמונה","הכנס קובץ","הכנס סרטון וידאו מYouTube/Vimeo","הכנס קישור","גודל גופן","גופן","מעוצב מראש","רגיל","כותרת 1","כותרת 2","כותרת 3","כותרת 4","ציטוט","קוד","הכנס","הכנס טבלה","הקטן כניסה","הגדל כניסה","בחר תו מיוחד","הכנס תו מיוחד","העתק עיצוב","החלף מצב","ריווח","עליון","ימין","תחתון","שמאל","עיצוב CSS","מחלקת CSS","יישור","ימין","מרכז","שמאל","--לא נקבע--","מקור","כותרת","כיתוב חלופי","קישור","פתח בכרטיסיה חדשה","תמונה","קובץ","מתקדם","מאפייני תמונה","ביטול","אישור","סייר הקבצים","שגיאה בזמן טעינת רשימה","שגיאה בזמן טעינת תקיות","האם אתה בטוח?","הכנס שם תקיה","צור תקיה","סוג הקובץ","הסר תמונה","הסר קובץ","או לחץ","כיתוב חלופי","העלה","סייר","רקע","טקסט","עליון","מרכז","תחתון","הכנס עמודה לפני","הכנס עמודה אחרי","הכנס שורה מעל","הכנס שורה מתחת","מחק טבלה","מחק שורה","מחק עמודה","רוקן תא","תווים: %d","מילים: %d","קו חוצה","קו תחתון","superscript","subscript","גזור בחירה","בחר הכל","שבירת שורה","חפש","החלף ב","החלף","הדבק","בחר תוכן להדבקה","HTML","מודגש","נטוי","מברשת","קישור","בטל","בצע שוב","טבלה","תמונה","מחק","פסקה","גודל גופן","וידאו","גופן","עלינו","הדפס","תו מיוחד","קו תחתון","קו חוצה","הגדל כניסה","הקטן כניסה","גודל מלא","כווץ","העתק עיצוב","קו אופקי","רשימת תבליטים","רשימה ממוספרת","חתוך","בחר הכל","הוסף קוד","פתח קישור","ערוך קישור","ללא מעקב","בטל קישור","עדכן","כדי לערוך","הצג","כתובת","ערוך","יישור אופקי","סנן","מין לפי שינוי","מיין לפי שם","מיין לפי גודל","הוסף תקייה","אפס","שמור","שמור בשם...","שנה גודל","חתוך","רוחב","גובה","שמור יחס","כן","לא","הסר","בחר","נבחר: %s","יישור אנכי","פיצול","מזג","הוסף עמודה","הוסף שורה",null,"מחק","פיצול אנכי","פיצול אופקי","מסגרת","הקוד דומה לHTML, האם להשאיר כHTML","הדבק כHTML","השאר","הכנס כטקסט","הכנס טקסט בלבד","רק קבצים המשוייכים שלך ניתנים לעריכה. האם להוריד את הקובץ?","התמונה עלתה בהצלחה!","לוח","אין קבצים בספריה זו.","הונגרית","הזן שם חדש","תצוגה מקדימה","הורד","להדביק מהלוח","הדפדפן שלך לא תומך גישה ישירה ללוח.","העתק בחירה","העתק","רדיוס הגבול"]},(t,e)=>{t.exports.default=["Írjon be valamit","Joditról","Jodit Editor","Ingyenes változat","GNU General Public License, Verzió 2 vagy későbbi","Jodit útmutató","további segítséget tartalmaz","További licence információkért látogassa meg a weboldalunkat:","Teljes verzió megvásárlása","Copyright © XDSoft.net - Chupurnov Valeriy. Minden jog fenntartva.","Horgony","Megnyitás új lapon","Megnyitás teljes méretben","Formázás törlése","Háttér/szöveg szín","Újra","Visszavon","Félkövér","Dőlt","Pontozott lista","Számozott lista","Középre zárt","Sorkizárt","Balra zárt","Jobbra zárt","Vízszintes vonal beszúrása","Kép beszúrás","Fájl beszúrás","Youtube videó beszúrása","Link beszúrás","Betűméret","Betűtípus","Formázott blokk beszúrása","Normál","Fejléc 1","Fejléc 2","Fejléc 3","Fejléc 4","Idézet","Kód","Beszúr","Táblázat beszúrása","Behúzás csökkentése","Behúzás növelése","Speciális karakter kiválasztása","Speciális karakter beszúrása","Kép formázása","Nézet váltása","Szegélyek","felső","jobb","alsó","bal","CSS stílusok","CSS osztályok","Igazítás","Jobbra","Középre","Balra","Nincs","Forrás","Cím","Helyettesítő szöveg","Link","Link megnyitása új lapon","Kép","Fájl","Haladó","Kép tulajdonságai","Mégsem","OK","Fájl tallózó","Hiba a lista betöltése közben","Hiba a mappák betöltése közben","Biztosan ezt szeretné?","Írjon be egy mappanevet","Mappa létrehozása","írjon be bevet","Húzza ide a képet","Húzza ide a fájlt","vagy kattintson","Helyettesítő szöveg","Feltölt","Tallóz","Háttér","Szöveg","Fent","Középen","Lent","Oszlop beszúrás elé","Oszlop beszúrás utána","Sor beszúrás fölé","Sor beszúrás alá","Táblázat törlése","Sor törlése","Oszlop törlése","Cella tartalmának törlése","Karakterek száma: %d","Szavak száma: %d","Áthúzott","Aláhúzott","Felső index","Alsó index","Kivágás","Összes kijelölése","Szünet","Keresés","Csere erre","Csere","Beillesztés","Válasszon tartalmat a beillesztéshez","HTML","Félkövér","Dőlt","Ecset","Link","Visszavon","Újra","Táblázat","Kép","Törlés","Paragráfus","Betűméret","Videó","Betű","Rólunk","Nyomtat","Szimbólum","Aláhúzott","Áthúzott","Behúzás","Aussenseiter","Teljes méret","Összenyom","Formátum másolás","Egyenes vonal","Lista","Számozott lista","Kivág","Összes kijelölése","Beágyazott kód","Link megnyitása","Link szerkesztése","Nincs követés","Link leválasztása","Frissít","Szerkesztés","felülvizsgálat","URL","Szerkeszt","Vízszintes igazítás","Szűrő","Rendezés módosítás szerint","Rendezés név szerint","Rendezés méret szerint","Mappa hozzáadás","Visszaállít","Mentés","Mentés másként...","Átméretezés","Kivág","Szélesség","Magasság","Képarány megtartása","Igen","Nem","Eltávolít","Kijelöl","Kijelöl: %s","Függőleges igazítás","Felosztás","Összevonás","Oszlop hozzáadás","Sor hozzáadás",null,"Törlés","Függőleges felosztás","Vízszintes felosztás","Szegély","A beillesztett szöveg HTML-nek tűnik. Megtartsuk HTML-ként?","Beszúrás HTML-ként","Megtartás","Beszúrás szövegként","Csak szöveg beillesztése","Csak a saját képeit tudja szerkeszteni. Letölti ezt a képet?","Kép sikeresen feltöltve!","Palette","Er zijn geen bestanden in deze map.","átnevezés","Adja meg az új nevet","előnézet","Letöltés","Illessze be a vágólap","A böngésző nem támogatja a közvetlen hozzáférést biztosít a vágólapra.","Másolás kiválasztása","másolás","Határ sugár"]},(t,e)=>{t.exports.default=["Ketik sesuatu","Tentang Jodit","Editor Jodit","Versi Bebas Non-komersil","Lisensi Publik Umum (GPL), versi 2 atau terbaru","Panduan Pengguna Jodit","mencakup detail bantuan penggunaan","Untuk informasi tentang lisensi, silakan kunjungi website:","Beli versi lengkap","Hak Cipta © XDSoft.net - Chupurnov Valeriy. Hak cipta dilindungi undang-undang.","Tautan","Buka di tab baru","Buka editor dalam ukuran penuh","Hapus Pemformatan","Isi warna atau atur warna teks","Ulangi","Batalkan","Tebal","Miring","Sisipkan Daftar Tidak Berurut","Sisipkan Daftar Berurut","Tengah","Penuh","Kiri","Kanan","Sisipkan Garis Horizontal","Sisipkan Gambar","Sisipkan Berkas","Sisipkan video youtube/vimeo","Sisipkan tautan","Ukuran font","Keluarga font","Sisipkan blok format","Normal","Heading 1","Heading 2","Heading 3","Heading 4","Kutip","Kode","Sisipkan","Sisipkan tabel","Kurangi Indentasi","Tambah Indentasi","Pilih Karakter Spesial","Sisipkan Karakter Spesial","Formar warna","Ubah mode","Batas","atas","kanan","bawah","kiri","Gaya","Class","Rata","Kanan","Tengah","Kiri","--Tidak diset--","Src","Judul","Teks alternatif","Tautan","Buka tautan di tab baru","Gambar","berkas","Lanjutan","Properti gambar","Batal","Ya","Penjelajah Berkas","Error ketika memuat list","Error ketika memuat folder","Apakah Anda yakin?","Masukkan nama Direktori","Buat direktori","ketik nama","Letakkan gambar","Letakkan berkas","atau klik","Teks alternatif","Unggah","Jelajahi","Latar Belakang","Teks","Atas","Tengah","Bawah","Sisipkan kolom sebelumnya","Sisipkan kolom setelahnya","Sisipkan baris di atasnya","Sisipkan baris di bawahnya","Hapus tabel","Hapus baris","Hapus kolom","Kosongkan cell","Karakter: %d","Kata: %d","Coret","Garis Bawah","Superskrip","Subskrip","Potong pilihan","Pilih semua","Berhenti","Mencari","Ganti dengan","Ganti","Paste","Pilih konten untuk dipaste","sumber","tebal","miring","sikat","tautan","batalkan","ulangi","tabel","gambar","penghapus","paragraf","ukuran font","video","font","tentang","cetak","simbol","garis bawah","coret","menjorok ke dalam","menjorok ke luar","ukuran penuh","menyusut","salin format","hr","ul","ol","potong","Pilih semua","Kode embed","Buka tautan","Edit tautan","No follow","Hapus tautan","Perbarui","pensil","Mata","URL","Edit","Perataan horizontal","Filter","Urutkan berdasarkan perubahan","Urutkan berdasarkan nama","Urutkan berdasarkan ukuran","Tambah folder","Reset","Simpan","Simpan sebagai...","Ubah ukuran","Crop","Lebar","Tinggi","Jaga aspek rasio","Ya","Tidak","Copot","Pilih","Pilih %s","Rata vertikal","Bagi","Gabungkan","Tambah kolom","tambah baris","Lisensi: %s","Hapus","Bagi secara vertikal","Bagi secara horizontal","Bingkai","Kode Anda cenderung ke HTML. Biarkan sebagai HTML?","Paste sebagai HTML","Jaga","Sisipkan sebagai teks","Sisipkan hanya teks","Anda hanya dapat mengedit gambar Anda sendiri. Unduh gambar ini di host?","Gambar telah sukses diunggah ke host!","palet","Tidak ada berkas","ganti nama","Masukkan nama baru","pratinjau","Unduh","Paste dari clipboard","Browser anda tidak mendukung akses langsung ke clipboard.","Copy seleksi","copy","Border radius"]},(t,e)=>{t.exports.default=["Scrivi qualcosa...","A proposito di Jodit","Jodit Editor","Versione gratuita non commerciale","Licenza pubblica generale GNU, versione 2 o successiva","Guida utente di Jodit","contiene una guida dettagliata per l'uso.","Per informazioni sulla licenza, si prega di visitare il nostro sito:","Acquista la versione completa","Copyright © XDSoft.net - Chupurnov Valeriy. Alle Rechte vorbehalten.","Ancora","Apri in una nuova scheda","Apri l'editor a schermo intero","Formato chiaro","Riempi colore o lettera","Ripristina","Annulla","Grassetto","Corsivo","Inserisci lista non ordinata","Inserisci l'elenco ordinato","Allinea Centra","Allineare Giustificato","Allinea a Sinistra","Allinea a Destra","Inserisci la linea orizzontale","Inserisci immagine","Inserisci un file","Inserisci video Youtube/Vimeo","Inserisci il link","Dimensione del carattere","Tipo di font","Inserisci blocco","Normale","Heading 1","Heading 2","Heading 3","Heading 4","Citazione","Codice","Inserisci","Inserisci tabella","Riduci il rientro","Aumenta il rientro","Seleziona una funzione speciale","Inserisci un carattere speciale","Copia formato","Cambia modo","Margini","su","destra","giù","sinistra","Stili CSS","Classi CSS","Allinea","Destra","Centro","Sinistra","--Non Impostato--","Fonte","Titolo","Testo Alternativo","Link","Apri il link in una nuova scheda","Immagine","Archivio","Avanzato","Proprietà dell'immagine","Annulla","Accetta","Cerca il file","Errore durante il caricamento dell'elenco","Errore durante il caricamento delle cartelle","Sei sicuro?","Inserisci il nome della cartella","Crea cartella","Entre el nombre","Rilascia l'immagine","Rilascia file","o click","Testo alternativo","Carica","Sfoglia","Sfondo","Testo","Su","Centro","Sotto","Inserisci prima la colonna","Inserisci colonna dopo","Inserisci la riga sopra","Inserisci la riga sotto","Elimina tabella","Elimina riga","Elimina colonna","Cella vuota","Caratteri: %d","Parole: %d","Barrato","Sottolineato","indice","deponente","Taglia la selezione","Seleziona tutto","Pausa","Cerca","Sostituisci con","Sostituisci","Incolla","Seleziona il contenuto da incollare","HTML","Grassetto","Corsivo","Pennello","Link","Annulla","Ripristina","Tabella","Immagine","Gomma","Paragrafo","Dimensione del carattere","Video","Font","Approposito di","Stampa","Simbolo","Sottolineato","Barrato","trattino","annulla rientro","A grandezza normale","comprimere","Copia il formato","linea orizzontale","lista non ordinata","lista ordinata","Taglia","Seleziona tutto","Includi codice","Apri link","Modifica link","Non seguire","Togli link","Aggiornare","Per modificare","Recensione"," URL","Modifica","Allineamento orizzontale","Filtro","Ordina per data di modifica","Ordina per nome","Ordina per dimensione","Aggiungi cartella","Reset","Salva","Salva con nome...","Ridimensiona","Tagliare","Larghezza","Altezza","Mantenere le proporzioni","Si","No","Rimuovere","Seleziona","Seleziona: %s","Allineamento verticala","Dividere","Fondi","Aggiungi colonna","Aggiungi riga",null,"Cancella","Dividere verticalmente","Diviso orizzontale","Bordo","Il codice è simile all'HTML. Mantieni come HTML?","Incolla come HTML?","Mantieni","Inserisci come testo","Inserisci solo il testo","Puoi modificare solo le tue immagini. Scarica questa immagine sul server?","L'immagine è stata caricata con successo sul server!","tavolozza","Non ci sono file in questa directory.","ungherese","Inserisci un nuovo nome","anteprima","Scaricare","Incolla dagli appunti","Il tuo browser non supporta l'accesso diretto agli appunti.","Selezione di copia","copia","Border radius"]},(t,e)=>{t.exports.default=["Begin met typen..","Over Jodit","Jodit Editor","Gratis niet-commerciële versie","GNU General Public License, versie 2 of hoger","Jodit gebruikershandleiding","bevat gedetailleerde informatie voor gebruik.","Voor informatie over de licentie, ga naar onze website:","Volledige versie kopen","Copyright © XDSoft.net - Chupurnov Valeriy. Alle rechten voorbehouden.","Anker","Open in nieuwe tab","Editor in volledig scherm openen","Opmaak verwijderen","Vulkleur of tekstkleur aanpassen","Opnieuw","Ongedaan maken","Vet","Cursief","Geordende list invoegen","Ongeordende lijst invoegen","Centreren","Uitlijnen op volledige breedte","Links uitlijnen","Rechts uitlijnen","Horizontale lijn invoegen","Afbeelding invoegen","Bestand invoegen","Youtube/Vimeo video invoegen","Link toevoegen","Tekstgrootte","Lettertype","Format blok invoegen","Normaal","Koptekst 1","Koptekst 2","Koptekst 3","Koptekst 4","Citaat","Code","Invoegen","Tabel invoegen","Inspringing verkleinen","Inspringing vergroten","Symbool selecteren","Symbool invoegen","Opmaak kopieren","Modus veranderen","Marges","Boven","Rechts","Onder","Links","CSS styles","CSS classes","Uitlijning","Rechts","Gecentreerd","Links","--Leeg--","Src","Titel","Alternatieve tekst","Link","Link in nieuwe tab openen","Afbeelding","Bestand","Geavanceerd","Afbeeldingseigenschappen","Annuleren","OK","Bestandsbrowser","Fout bij het laden van de lijst","Fout bij het laden van de mappenlijst","Weet je het zeker?","Geef de map een naam","Map aanmaken","Type naam","Sleep hier een afbeelding naartoe","Sleep hier een bestand naartoe","of klik","Alternatieve tekst","Uploaden","Bladeren","Achtergrond","Tekst","Boven","Midden","Onder","Kolom invoegen (voor)","Kolom invoegen (na)","Rij invoegen (boven)","Rij invoegen (onder)","Tabel verwijderen","Rij verwijderen","Kolom verwijderen","Cel leegmaken","Tekens: %d","Woorden: %d","Doorstrepen","Onderstrepen","Superscript","Subscript","Selectie knippen","Selecteer alles","Enter","Zoek naar","Vervangen door","Vervangen","Plakken","Kies content om te plakken","Broncode","vet","cursief","kwast","link","ongedaan maken","opnieuw","tabel","afbeelding","gum","paragraaf","lettergrootte","video","lettertype","over","afdrukken","symbool","onderstreept","doorgestreept","inspringen","minder inspringen","volledige grootte","kleiner maken","opmaak kopiëren","horizontale lijn","lijst","genummerde lijst","knip","alles selecteren","Embed code","link openen","link aanpassen","niet volgen","link verwijderen","Updaten","Om te bewerken","Recensie"," URL","Bewerken","Horizontaal uitlijnen","Filteren","Sorteren op wijzigingsdatum","Sorteren op naam","Sorteren op grootte","Map toevoegen","Herstellen","Opslaan","Opslaan als ...","Grootte aanpassen","Bijknippen","Breedte","Hoogte","Verhouding behouden","Ja","Nee","Verwijderen","Selecteren","Selecteer: %s","Verticaal uitlijnen","Splitsen","Samenvoegen","Kolom toevoegen","Rij toevoegen",null,"Verwijderen","Verticaal splitsen","Horizontaal splitsen","Rand","Deze code lijkt op HTML. Als HTML behouden?","Invoegen als HTML","Origineel behouden","Als tekst invoegen","Als onopgemaakte tekst invoegen","Je kunt alleen je eigen afbeeldingen aanpassen. Deze afbeelding downloaden?","De afbeelding is succesvol geüploadet!","Palette","Er zijn geen bestanden in deze map.","Hongaars","Voer een nieuwe naam in","voorvertoning","Download","Plakken van klembord","Uw browser ondersteunt geen directe toegang tot het klembord.","Selectie kopiëren","kopiëren","Border radius"]},(t,e)=>{t.exports.default=["Escreva algo...","Sobre o Jodit","Editor Jodit","Versão Gratuita não-comercial","Licença Pública GNU General, Versão 2 ou posterior","Guia de usuário Jodit","contém ajuda detalhada para o uso.","Para informação sobre a licença, por favor visite nosso site:","Compre a versão completa","Copyright © XDSoft.net - Chupurnov Valeriy. Todos os direitos reservados.","Link","Abrir em nova aba","Abrir editor em tela cheia","Limpar formatação","Cor de preenchimento ou cor do texto","Refazer","Desfazer","Negrito","Itálico","Inserir lista não ordenada","Inserir lista ordenada","Centralizar","Justificar","Alinhar à Esquerda","Alinhar à Direita","Inserir linha horizontal","Inserir imagem","Inserir arquivo","Inserir vídeo do Youtube/vimeo","Inserir link","Tamanho da letra","Fonte","Inserir bloco","Normal","Cabeçalho 1","Cabeçalho 2","Cabeçalho 3","Cabeçalho 4","Citação","Código","Inserir","Inserir tabela","Diminuir recuo","Aumentar recuo","Selecionar caractere especial","Inserir caractere especial","Copiar formato","Mudar modo","Margens","cima","direta","baixo","esquerda","Estilos CSS","Classes CSS","Alinhamento","Direita","Centro","Esquerda","--Não Estabelecido--","Fonte","Título","Texto Alternativo","Link","Abrir link em nova aba","Imagem","Arquivo","Avançado","Propriedades da imagem","Cancelar","Ok","Procurar arquivo","Erro ao carregar a lista","Erro ao carregar as pastas","Você tem certeza?","Escreva o nome da pasta","Criar pasta","Escreva seu nome","Soltar imagem","Soltar arquivo","ou clique","Texto alternativo","Upload","Explorar","Fundo","Texto","Cima","Meio","Baixo","Inserir coluna antes","Inserir coluna depois","Inserir linha acima","Inserir linha abaixo","Excluir tabela","Excluir linha","Excluir coluna","Limpar célula","Caracteres: %d","Palavras: %d","Tachado","Sublinhar","sobrescrito","subscrito","Cortar seleção","Selecionar tudo","Pausa","Procurar por","Substituir com","Substituir","Colar","Escolher conteúdo para colar","HTML","negrito","itálico","pincel","link","desfazer","refazer","tabela","imagem","apagar","parágrafo","tamanho da letra","vídeo","fonte","Sobre de","Imprimir","Símbolo","sublinhar","tachado","recuar","diminuir recuo","Tamanho completo","diminuir","Copiar formato","linha horizontal","lista não ordenada","lista ordenada","Cortar","Selecionar tudo","Incluir código","Abrir link","Editar link","Não siga","Remover link","Atualizar","Editar","Visualizar","URL","Editar","Alinhamento horizontal","filtrar","Ordenar por modificação","Ordenar por nome","Ordenar por tamanho","Adicionar pasta","Resetar","Salvar","Salvar como...","Redimensionar","Recortar","Largura","Altura","Manter a proporção","Sim","Não","Remover","Selecionar","Selecionar: %s","Alinhamento vertical","Dividir","Mesclar","Adicionar coluna","Adicionar linha",null,"Excluir","Dividir vertical","Dividir horizontal","Borda","Seu código é simular ao HTML. Manter como HTML?","Colar como HTML?","Manter","Inserir como Texto","Inserir somente o Texto","Você só pode editar suas próprias imagens. Baixar essa imagem pro servidor?","A imagem foi enviada com sucesso para o servidor!","Palette","Não há arquivos nesse diretório.","Húngara","Digite um novo nome","preview","Baixar","Colar da área de transferência","O seu navegador não oferece suporte a acesso direto para a área de transferência.","Selecção de cópia","cópia","Border radius"]},(t,e)=>{t.exports.default=["Напишите что-либо","О Jodit","Редактор Jodit","Версия для не коммерческого использования","Стандартная общественная лицензия GNU (GPL), версия 2 или выше","Jodit Руководство пользователя","содержит детальную информацию по использованию","Для получения сведений о лицензии , пожалуйста, перейдите на наш сайт:","Купить полную версию","Авторские права © XDSoft.net - Чупурнов Валерий. Все права защищены.","Анкор","Открывать ссылку в новой вкладке","Открыть редактор в полном размере","Очистить форматирование","Цвет заливки или цвет текста","Повтор","Отмена","Жирный","Наклонный","Вставка маркированного списка","Вставить нумерованный список","Выровнять по центру","Выровнять по ширине","Выровнять по левому краю","Выровнять по правому краю","Вставить горизонтальную линию","Вставить изображение","Вставить файл","Вставьте видео","Вставить ссылку","Размер шрифта","Шрифт","Вставить блочный элемент","Нормальный текст","Заголовок 1","Заголовок 2","Заголовок 3","Заголовок 4","Цитата","Код","Вставить","Вставить таблицу","Уменьшить отступ","Увеличить отступ","Выберите специальный символ","Вставить специальный символ","Формат краски","Источник","Отступы","сверху","справа","снизу","слева","Стили","Классы","Выравнивание","По правому краю","По центру","По левому краю","--не устанавливать--","src","Заголовок","Альтернативный текст (alt)","Ссылка","Открывать ссылку в новом окне",null,"Файл","Расширенные","Свойства изображения","Отмена","Ок","Браузер файлов","Ошибка при загрузке списка изображений","Ошибка при загрузке списка директорий","Вы уверены?","Введите название директории","Создать директорию","введите название","Перетащите сюда изображение","Перетащите сюда файл","или нажмите","Альтернативный текст","Загрузка","Сервер","Фон","Текст"," К верху","По середине","К низу","Вставить столбец до","Вставить столбец после","Вставить ряд выше","Вставить ряд ниже","Удалить таблицу","Удалять ряд","Удалить столбец","Отчистить ячейку","Символов: %d","Слов: %d","Перечеркнуть","Подчеркивание","верхний индекс","индекс","Вырезать","Выделить все","Разделитель","Найти","Заменить на","Заменить","Вставить","Выбрать контент для вставки","HTML","жирный","курсив","заливка","ссылка","отменить","повторить","таблица","Изображение","очистить","параграф","размер шрифта","видео","шрифт","о редакторе","печать","символ","подчеркнутый","перечеркнутый","отступ","выступ","во весь экран","обычный размер","Копировать формат","линия","Список","Нумерованный список","Вырезать","Выделить все","Код","Открыть ссылку","Редактировать ссылку","Атрибут nofollow","Убрать ссылку","Обновить","Редактировать","Просмотр","URL","Редактировать","Горизонтальное выравнивание","Фильтр","По изменению","По имени","По размеру","Добавить папку","Восстановить","Сохранить","Сохранить как","Изменить размер","Обрезать размер","Ширина","Высота","Сохранять пропорции","Да","Нет","Удалить","Выделить","Выделить: %s","Вертикальное выравнивание","Разделить","Объеденить в одну","Добавить столбец","Добавить строку","Лицензия: %s","Удалить","Разделить по вертикали","Разделить по горизонтали","Рамка","Ваш текст, который вы пытаетесь вставить похож на HTML. Вставить его как HTML?","Вставить как HTML?","Сохранить оригинал","Вставить как текст","Вставить только текст","Вы можете редактировать только свои собственные изображения. Загрузить это изображение на ваш сервер?","Изображение успешно загружено на сервер!","палитра","В данном каталоге нет файлов","Переименовать","Введите новое имя","Предпросмотр","Скачать","Вставить из буфера обмена","Ваш браузер не поддерживает прямой доступ к буферу обмена.","Скопировать выделенное","копия","Радиус границы"]},(t,e)=>{t.exports.default=["Bir şey yazın.","Jodit Hakkında","Jodit Editor","Ücretsiz, ticari olmayan versiyon","GNU General Public License, Versiyon 2 ve sonrası için","Jodit Kullanım Kılavuzu","kullanım için detaylı bilgiler içerir","Lisans hakkında bilgi için lütfen web sitemize gidin:","Tam versiyon satın al","Copyright © XDSoft.net - Chupurnov Valeriy. Tüm Hakları Saklıdır","Bağlantı","Yeni sekmede aç","Tam ekran editör","Stili temizle","Dolgu ve yazı rengi seç","İleri Al","Geri Al","Kalın","İtalik","Sırasız Liste Ekle","Sıralı Liste Ekle","Ortala","Kenarlara Yasla","Sola Yasla","Sağa Yasla","Yatay Çizgi Ekle","Resim Ekle","Dosya Ekle","Youtube/vimeo Videosu Ekle","Bağlantı Ekle","Font Boyutu","Font Ailesi","Blok Ekle","Normal","Başlık 1","Başlık 2","Başlık 3","Başlık 4","Alıntı","Code","Ekle","Tablo Ekle","Girintiyi Azalt","Girintiyi Arttır","Özel Karakter Seç","Özel Karakter Ekle","Resim Biçimi","Mod Değiştir","MEsafeler","Üst","Sağ","Alt","Sol","CSS Stilleri","CSS Sınıfları","Hizalama","Sağ","Ortalı","Sol","Belirlenmedi","Kaynak","Başlık","Alternatif Yazı","Link","Bağlantıyı yeni sekmede aç","Resim","Dosya","Gelişmiş","Resim özellikleri","İptal","Tamam","Dosya Gezgini","Liste yüklenirken hata oluştu","Klasörler yüklenirken hata oluştur","Emin misiniz?","Dizin yolu giriniz","Dizin oluştur","Typname","Resim bırak","Dosya bırak","veya tıkla","Alternatif yazı","Yükle","Ekle","Arka plan","Yazı","Üst","Orta","Aşağı","Öncesine kolon ekle","Sonrasına kolon ekle","Üstüne satır ekle","Altına satır ekle","Tabloyu sil","Satır sil","Kolon sil","Hücreyi boşalt","Harfler: %d","Kelimeler: %d","Durchschlagen","Alt çizgi","Üst yazı","Alt yazı","Seçilimi kes","Tümünü seç","Durdur","Ara","Şununla değiştir","Değiştir","Yapıştır","Yapıştırılacak içerik seç","Kaynak","Kalın","italik","Fırça","Bağlantı","Geri al","İleri al","Tablo","Resim","Silgi","Paragraf","Font boyutu","Video","Font","Hakkında","Yazdır","Sembol","Alt çizgi","Üstü çizili","Girinti","Çıkıntı","Tam ekran","Küçült","Kopyalama Biçimi","Ayraç","Sırasız liste","Sıralı liste","Kes","Tümünü seç","Kod ekle","Bağlantıyı aç","Bağlantıyı düzenle","Nofollow özelliği","Bağlantıyı kaldır","Güncelle","Düzenlemek için","Yorumu","URL","Düzenle","Yatay hizalama","Filtre","Değişime göre sırala","İsme göre sırala","Boyuta göre sırala","Klasör ekle","Sıfırla","Kaydet","Farklı kaydet","Boyutlandır","Kırp","Genişlik","Yükseklik","En boy oranını koru","Evet","Hayır","Sil","Seç","Seç: %s","Dikey hizalama","Ayır","Birleştir","Kolon ekle","Satır ekle",null,"Sil","Dikey ayır","Yatay ayır","Kenarlık","Kodunuz HTML koduna benziyor. HTML olarak devam etmek ister misiniz?","HTML olarak yapıştır","Sakla","Yazı olarak ekle","Nur Text einfügen","Sadece kendi resimlerinizi düzenleyebilirsiniz. Bu görseli kendi hostunuza indirmek ister misiniz?","Görsel başarıyla hostunuza yüklendi","Palette","Bu dizinde dosya yok.","Macarca","Yeni isim girin","Ön izleme","İndir","Panodan yapıştır ","Tarayıcınız pano doğrudan erişim desteklemiyor.","Kopya seçimi","kopya","Sınır yarıçapı"]},(t,e)=>{t.exports.default=["输入一些内容","关于Jodit","Jodit Editor","Free Non-commercial Version","GNU General Public License, version 2 or later","开发者指南","使用帮助","有关许可证的信息,请访问我们的网站:","购买完整版本","Copyright © XDSoft.net - Chupurnov Valeriy. All rights reserved.","Anchor","在新窗口打开","全屏编辑","清除样式","颜色","重做","撤销","粗体","斜体","符号列表","编号","居中","对齐文本","左对齐","右对齐","分割线","图片","文件","youtube/vimeo 视频","链接","字号","字体","格式块","文本","标题1","标题2","标题3","标题4","引用","代码","插入","表格","减少缩进","增加缩进","选择特殊符号","特殊符号","格式复制","改变模式","外边距(Margins)","top","right","bottom","left","样式","Classes","对齐方式","居右","居中","居左","无","Src","Title","Alternative","Link","在新窗口打开链接","图片","file","高级","图片属性","取消","确定","文件管理","加载list错误","加载folders错误","你确定吗?","输入路径","创建路径","type name","拖动图片到此","拖动文件到此","或点击","Alternative text","上传","浏览","背景色","文字","顶部","中间","底部","在之前插入列","在之后插入列","在之前插入行","在之后插入行","删除表格","删除行","删除列","清除内容","字符数: %d","单词数: %d","删除线","下划线","上标","下标","剪切","全选","Pause","查找","替换为","替换","粘贴","选择内容并粘贴","源码","粗体","斜体","颜色","链接","撤销","重做","表格","图片","橡皮擦","段落","字号","视频","字体","关于","打印","符号","下划线","上出现","增加缩进","减少缩进","全屏","收缩","复制格式","分割线","无序列表","顺序列表","剪切","全选","嵌入代码","打开链接","编辑链接","No follow","Unlink","更新","铅笔","回顧","URL",null,"水平对齐","筛选","修改时间排序","名称排序","大小排序","新建文件夹","重置","保存","保存为","调整大小","Crop","宽","高","保存长宽比","是","不","移除","选择","选择: %s","垂直对齐","拆分","合并","添加列","添加行",null,"删除","垂直拆分","水平拆分","边框","你粘贴的文本是一段html代码,是否保留源格式","html粘贴","保留源格式","把html代码视为普通文本","只保留文本","你只能编辑你自己的图片。Download this image on the host?","图片上传成功","调色板","此目录中沒有文件。","重命名","输入新名称","预览","下载","粘贴从剪贴板","你浏览器不支持直接访问的剪贴板。","复制的选择","复制","边界半径"]},(t,e)=>{t.exports.default=["輸入一些內容","關於Jodit","Jodit Editor","Free Non-commercial Version","GNU General Public License, version 2 or later","開發者指南","使用幫助","有關許可證的信息,請訪問我們的網站:","購買完整版本","Copyright © XDSoft.net - Chupurnov Valeriy. All rights reserved.","Anchor","在新窗口打開","全屏編輯","清除樣式","顏色","重做","撤銷","粗體","斜體","符號列表","編號","居中","對齊文本","左對齊","右對齊","分割線","圖片","文件","youtube/vimeo 影片","鏈接","字號","字體","格式塊","文本","標題1","標題2","標題3","標題4","引用","代碼","插入","表格","減少縮進","增加縮進","選擇特殊符號","特殊符號","格式複製","改變模式","外邊距(Margins)","top","right","bottom","left","樣式","Classes","對齊方式","居右","居中","居左","無","Src","Title","Alternative","Link","在新窗口打開鏈接","圖片","file","高級","圖片屬性","取消","確定","文件管理","加載list錯誤","加載folders錯誤","你確定嗎?","輸入路徑","創建路徑","type name","拖動圖片到此","拖動文件到此","或點擊","Alternative text","上傳","瀏覽","背景色","文字","頂部","中間","底部","在之前插入列","在之後插入列","在之前插入行","在之後插入行","刪除表格","刪除行","刪除列","清除內容","字符數: %d","單詞數: %d","刪除線","下劃線","上標","下標","剪切","全選","Pause","查找","替換為","替換","黏貼","選擇內容並黏貼","源碼","粗體","斜體","顏色","鏈接","撤銷","重做","表格","圖片","橡皮擦","段落","字號","影片","字體","關於","打印","符號","下劃線","上出現","增加縮進","減少縮進","全屏","收縮","複製格式","分割線","無序列表","順序列表","剪切","全選","嵌入代碼","打開鏈接","編輯鏈接","No follow","Unlink","更新","鉛筆","回顧","URL",null,"水平對齊","篩選","修改時間排序","名稱排序","大小排序","新建文件夾","重置","保存","保存為","調整大小","Crop","寬","高","保存長寬比","是","不","移除","選擇","選擇: %s","垂直對齊","拆分","合併","添加列","添加行",null,"刪除","垂直拆分","水平拆分","邊框","你黏貼的文本是一段html代碼,是否保留源格式","html黏貼","保留源格式","把html代碼視為普通文本","只保留文本","妳只能編輯妳自己的圖片。Download this image on the host?","圖片上傳成功","調色板","此目錄中沒有文件。","重命名","輸入新名稱","預覽","下載","วางจากคลิปบอร์ด","ของเบราว์เซอร์ไม่สนับสนุนโดยตรงเข้าไปยังคลิปบอร์ด","คัดลอกส่วนที่เลือก","คัดลอก","เส้นขอบรัศมี"]},(t,e,i)=>{},function(t,e,i){"use strict";i.r(e);var o={};i.r(o),i.d(o,"INVISIBLE_SPACE",()=>l),i.d(o,"INVISIBLE_SPACE_REG_EXP",()=>d),i.d(o,"INVISIBLE_SPACE_REG_EXP_END",()=>c),i.d(o,"INVISIBLE_SPACE_REG_EXP_START",()=>h),i.d(o,"SPACE_REG_EXP",()=>p),i.d(o,"SPACE_REG_EXP_START",()=>u),i.d(o,"SPACE_REG_EXP_END",()=>f),i.d(o,"IS_BLOCK",()=>m),i.d(o,"IS_INLINE",()=>g),i.d(o,"MAY_BE_REMOVED_WITH_KEY",()=>v),i.d(o,"KEY_BACKSPACE",()=>b),i.d(o,"KEY_TAB",()=>y),i.d(o,"KEY_ENTER",()=>_),i.d(o,"KEY_ESC",()=>w),i.d(o,"KEY_LEFT",()=>k),i.d(o,"KEY_UP",()=>x),i.d(o,"KEY_RIGHT",()=>C),i.d(o,"KEY_DOWN",()=>j),i.d(o,"KEY_DELETE",()=>T),i.d(o,"KEY_F",()=>E),i.d(o,"KEY_R",()=>z),i.d(o,"KEY_H",()=>q),i.d(o,"KEY_Y",()=>S),i.d(o,"KEY_V",()=>L),i.d(o,"KEY_Z",()=>N),i.d(o,"KEY_F3",()=>M),i.d(o,"NEARBY",()=>A),i.d(o,"ACCURACY",()=>I),i.d(o,"COMMAND_KEYS",()=>D),i.d(o,"BR",()=>R),i.d(o,"PARAGRAPH",()=>B),i.d(o,"MODE_WYSIWYG",()=>H),i.d(o,"MODE_SOURCE",()=>P),i.d(o,"MODE_SPLIT",()=>O),i.d(o,"IS_IE",()=>F),i.d(o,"URL_LIST",()=>V),i.d(o,"TEXT_PLAIN",()=>W),i.d(o,"TEXT_HTML",()=>$),i.d(o,"MARKER_CLASS",()=>U),i.d(o,"EMULATE_DBLCLICK_TIMEOUT",()=>K),i.d(o,"JODIT_SELECTED_CELL_MARKER",()=>X),i.d(o,"INSERT_AS_HTML",()=>Y),i.d(o,"INSERT_CLEAR_HTML",()=>G),i.d(o,"INSERT_AS_TEXT",()=>J),i.d(o,"INSERT_ONLY_TEXT",()=>Z),i.d(o,"IS_MAC",()=>Q),i.d(o,"KEY_ALIASES",()=>tt);var s={};i.r(s),i.d(s,"extend",()=>mt),i.d(s,"JoditArray",()=>lt),i.d(s,"JoditObject",()=>at),i.d(s,"asArray",()=>et),i.d(s,"inArray",()=>it),i.d(s,"splitArray",()=>ot),i.d(s,"debounce",()=>nt),i.d(s,"setTimeout",()=>st),i.d(s,"isNumeric",()=>bt),i.d(s,"isPlainObject",()=>ft),i.d(s,"isURL",()=>xt),i.d(s,"isWindow",()=>ut),i.d(s,"colorToHex",()=>Tt),i.d(s,"camelCase",()=>Lt),i.d(s,"fromCamelCase",()=>Nt),i.d(s,"appendScript",()=>ee),i.d(s,"browser",()=>ie),i.d(s,"convertMediaURLToVideoEmbed",()=>se),i.d(s,"css",()=>ne),i.d(s,"clearCenterAlign",()=>re),i.d(s,"ctrlKey",()=>ae),i.d(s,"dataBind",()=>le),i.d(s,"defaultLanguage",()=>It),i.d(s,"each",()=>de),i.d(s,"completeUrl",()=>te),i.d(s,"humanSizeToBytes",()=>ce),i.d(s,"parseQuery",()=>oe),i.d(s,"buildQuery",()=>he),i.d(s,"inView",()=>pe),i.d(s,"scrollIntoView",()=>ue),i.d(s,"$$",()=>zt),i.d(s,"getXPathByElement",()=>qt),i.d(s,"hasOwn",()=>ht),i.d(s,"type",()=>pt),i.d(s,"val",()=>fe),i.d(s,"throttle",()=>rt),i.d(s,"isHTML",()=>gt),i.d(s,"isHTMLFromWord",()=>vt),i.d(s,"isInt",()=>yt),i.d(s,"isLicense",()=>_t),i.d(s,"isString",()=>wt),i.d(s,"isFunction",()=>kt),i.d(s,"hasBrowserColorPicker",()=>Ct),i.d(s,"hexToRgb",()=>jt),i.d(s,"applyStyles",()=>St),i.d(s,"cleanFromWord",()=>Bt),i.d(s,"clear",()=>Ht),i.d(s,"htmlspecialchars",()=>Pt),i.d(s,"stripTags",()=>Ot),i.d(s,"normalizeKeyAliases",()=>Ft),i.d(s,"normalizeLicense",()=>Vt),i.d(s,"normalizeNode",()=>Wt),i.d(s,"normalizePath",()=>$t),i.d(s,"normalizeRelativePath",()=>Ut),i.d(s,"normalizeSize",()=>Kt),i.d(s,"normalizeURL",()=>Xt),i.d(s,"normilizeCSSValue",()=>Yt),i.d(s,"normalizeColor",()=>Gt),i.d(s,"getContentWidth",()=>Jt),i.d(s,"innerWidth",()=>Zt),i.d(s,"offset",()=>Qt),i.d(s,"trim",()=>Mt),i.d(s,"ucfirst",()=>At),i.d(s,"sprintf",()=>Dt),i.d(s,"i18n",()=>Rt);var n={};i.r(n),i.d(n,"Ajax",()=>Di),i.d(n,"EventsNative",()=>Be),i.d(n,"Component",()=>Ce),i.d(n,"ContextMenu",()=>Ri),i.d(n,"Alert",()=>Hi),i.d(n,"Confirm",()=>Oi),i.d(n,"Promt",()=>Pi),i.d(n,"Dialog",()=>Bi),i.d(n,"Dom",()=>me),i.d(n,"Plugin",()=>Fi),i.d(n,"Create",()=>He),i.d(n,"FileBrowser",()=>io),i.d(n,"Helpers",()=>s),i.d(n,"ImageEditor",()=>no),i.d(n,"Observer",()=>ze),i.d(n,"Select",()=>qe),i.d(n,"Storage",()=>Ie),i.d(n,"Snapshot",()=>je),i.d(n,"Table",()=>ro),i.d(n,"ToolbarIcon",()=>ge),i.d(n,"JoditToolbarCollection",()=>Ge),i.d(n,"ToolbarCollection",()=>Ye),i.d(n,"ToolbarButton",()=>Ke),i.d(n,"Stack",()=>Te),i.d(n,"Widget",()=>ve),i.d(n,"Uploader",()=>ao);var r={};i.r(r),i.d(r,"addNewLine",()=>lo),i.d(r,"autofocus",()=>co),i.d(r,"backspace",()=>ho),i.d(r,"bold",()=>po),i.d(r,"cleanHtml",()=>uo),i.d(r,"clipboard",()=>bo),i.d(r,"paste",()=>go),i.d(r,"pasteStorage",()=>yo),i.d(r,"color",()=>Co),i.d(r,"DragAndDrop",()=>jo),i.d(r,"DragAndDropElement",()=>To),i.d(r,"enter",()=>zo),i.d(r,"errorMessages",()=>qo),i.d(r,"font",()=>So),i.d(r,"formatBlock",()=>Lo),i.d(r,"fullsize",()=>No),i.d(r,"hotkeys",()=>Mo),i.d(r,"iframe",()=>Ao),i.d(r,"imageProcessor",()=>Do),i.d(r,"imageProperties",()=>Ho),i.d(r,"indent",()=>Po),i.d(r,"inlinePopup",()=>Vo),i.d(r,"justify",()=>Wo),i.d(r,"limit",()=>$o),i.d(r,"link",()=>Uo),i.d(r,"media",()=>Ko),i.d(r,"mobile",()=>Xo),i.d(r,"orderedlist",()=>Yo),i.d(r,"placeholder",()=>Go),i.d(r,"redoundo",()=>Jo),i.d(r,"resizer",()=>Zo),i.d(r,"search",()=>Qo),i.d(r,"size",()=>ts),i.d(r,"source",()=>es),i.d(r,"stat",()=>is),i.d(r,"sticky",()=>os),i.d(r,"symbols",()=>(class{constructor(t){this.countInRow=17,t.events.on("generateSpecialCharactersTable.symbols",()=>{const e=t.create.fromHTML('
'),i=e.querySelector(".jodit_symbols-preview"),o=e.querySelector("table").tBodies[0],s=[];for(let e=0;t.options.specialCharacters.length>e;){const i=t.create.element("tr");for(let o=0;this.countInRow>o&&t.options.specialCharacters.length>e;o+=1,e+=1){const n=t.create.element("td"),r=t.create.fromHTML(`${t.options.specialCharacters[e]}`);s.push(r),n.appendChild(r),i.appendChild(n)}o.appendChild(i)}const n=this;return t.events.on(s,"focus",(function(){i.innerHTML=this.innerHTML})).on(s,"mousedown",(function(e){this&&"A"===this.nodeName&&(t.selection.focus(),t.selection.insertHTML(this.innerHTML),t.events.fire(this,"close_dialog"),e&&e.preventDefault(),e&&e.stopImmediatePropagation())})).on(s,"mouseenter",(function(){this&&"A"===this.nodeName&&this.focus()})).on(s,"keydown",e=>{const i=e.target;if(i&&"A"===i.nodeName){const o=parseInt(i.getAttribute("data-index")||"0",10),r=parseInt(i.getAttribute("data-index-j")||"0",10);let a;switch(e.which){case x:case j:a=e.which===x?o-n.countInRow:o+n.countInRow,void 0===s[a]&&(a=e.which===x?Math.floor(s.length/n.countInRow)*n.countInRow+r:r,a>s.length-1&&(a-=n.countInRow)),s[a]&&s[a].focus();break;case C:case k:a=e.which===k?o-1:o+1,void 0===s[a]&&(a=e.which===k?s.length-1:0),s[a]&&s[a].focus();break;case _:t.events.fire(i,"mousedown"),e.stopImmediatePropagation(),e.preventDefault()}}}),e})}})),i.d(r,"tableKeyboardNavigation",()=>ss),i.d(r,"table",()=>ns),i.d(r,"xpath",()=>rs);var a={};i.r(a),i.d(a,"about",()=>as),i.d(a,"addcolumn",()=>ls),i.d(a,"addrow",()=>ds),i.d(a,"angle_down",()=>cs),i.d(a,"angle_left",()=>hs),i.d(a,"angle_right",()=>ps),i.d(a,"angle_up",()=>us),i.d(a,"arrows_alt",()=>fs),i.d(a,"arrows_h",()=>ms),i.d(a,"attachment",()=>gs),i.d(a,"bin",()=>vs),i.d(a,"bold",()=>bs),i.d(a,"brush",()=>ys),i.d(a,"cancel",()=>_s),i.d(a,"center",()=>ws),i.d(a,"chain_broken",()=>ks),i.d(a,"check",()=>xs),i.d(a,"check_square",()=>Cs),i.d(a,"copyformat",()=>js),i.d(a,"copy",()=>Es),i.d(a,"crop",()=>Ts),i.d(a,"cut",()=>zs),i.d(a,"dedent",()=>qs),i.d(a,"dots",()=>Ss),i.d(a,"dropdown_arrow",()=>Ls),i.d(a,"enter",()=>Ns),i.d(a,"eraser",()=>Ms),i.d(a,"eye",()=>As),i.d(a,"file",()=>Is),i.d(a,"folder",()=>Ds),i.d(a,"font",()=>Rs),i.d(a,"fontsize",()=>Bs),i.d(a,"fullsize",()=>Hs),i.d(a,"hr",()=>Ps),i.d(a,"image",()=>Os),i.d(a,"indent",()=>Fs),i.d(a,"info_circle",()=>Vs),i.d(a,"italic",()=>Ws),i.d(a,"justify",()=>$s),i.d(a,"left",()=>Us),i.d(a,"link",()=>Ks),i.d(a,"lock",()=>Xs),i.d(a,"menu",()=>Ys),i.d(a,"merge",()=>Gs),i.d(a,"ol",()=>Js),i.d(a,"omega",()=>Zs),i.d(a,"outdent",()=>Qs),i.d(a,"palette",()=>tn),i.d(a,"paragraph",()=>en),i.d(a,"paste",()=>on),i.d(a,"pencil",()=>sn),i.d(a,"plus",()=>nn),i.d(a,"print",()=>rn),i.d(a,"redo",()=>an),i.d(a,"resize",()=>ln),i.d(a,"resizer",()=>dn),i.d(a,"right",()=>cn),i.d(a,"save",()=>hn),i.d(a,"select_all",()=>pn),i.d(a,"shrink",()=>un),i.d(a,"source",()=>fn),i.d(a,"splitg",()=>mn),i.d(a,"splitv",()=>gn),i.d(a,"strikethrough",()=>vn),i.d(a,"subscript",()=>bn),i.d(a,"superscript",()=>yn),i.d(a,"table",()=>_n),i.d(a,"th",()=>wn),i.d(a,"th_list",()=>kn),i.d(a,"ul",()=>xn),i.d(a,"underline",()=>Cn),i.d(a,"undo",()=>jn),i.d(a,"unlink",()=>Tn),i.d(a,"unlock",()=>En),i.d(a,"update",()=>zn),i.d(a,"upload",()=>qn),i.d(a,"valign",()=>Sn),i.d(a,"video",()=>Ln),i(94);const l="\ufeff",d=/[\uFEFF]/g,c=/[\uFEFF]+$/g,h=/^[\uFEFF]+/g,p=/[\s\n\t\r\uFEFF\u200b]+/g,u=/^[\s\n\t\r\uFEFF\u200b]+/g,f=/[\s\n\t\r\uFEFF\u200b]+$/g,m=/^(PRE|DIV|P|LI|H[1-6]|BLOCKQUOTE|TD|TH|TABLE|BODY|HTML|FIGCAPTION|FIGURE|DT|DD)$/i,g=/^(STRONG|SPAN|I|EM|B|SUP|SUB)$/,v=/^(IMG|BR|IFRAME|SCRIPT|INPUT|TEXTAREA|HR|JODIT|JODIT-MEDIA)$/,b=8,y=9,_=13,w=27,k=37,x=38,C=39,j=40,T=46,E=70,z=82,q=72,S=89,L=86,N=90,M=114,A=5,I=10,D=[b,T,x,j,C,k,_,w,M,y],R="br",B="p",H=1,P=2,O=3,F="undefined"!=typeof navigator&&(-1!==navigator.userAgent.indexOf("MSIE")||/rv:11.0/i.test(navigator.userAgent)),V=F?"url":"text/uri-list",W=F?"text":"text/plain",$=F?"text":"text/html",U="jodit_selection_marker",K=300,X="data-jodit-selected-cell",Y="insert_as_html",G="insert_clear_html",J="insert_as_text",Z="insert_only_text",Q="undefined"!=typeof window&&/Mac|iPod|iPhone|iPad/.test(window.navigator.platform),tt={add:"+",break:"pause",cmd:"meta",command:"meta",ctl:"control",ctrl:"control",del:"delete",down:"arrowdown",esc:"escape",ins:"insert",left:"arrowleft",mod:Q?"meta":"control",opt:"alt",option:"alt",return:"enter",right:"arrowright",space:" ",spacebar:" ",up:"arrowup",win:"meta",windows:"meta"},et=t=>Array.isArray(t)?t:[t],it=(t,e)=>-1!==e.indexOf(t),ot=t=>"string"==typeof t?t.split(/[,\s]+/):t,st=(t,e,i,o,s)=>e?window.setTimeout.call(window,t,e,i,o,s):(t.call(null,i,o,s),0),nt=function(t,e,i,o){3===arguments.length&&"boolean"!=typeof i&&(o=i,i=!1);let s=0;return function(){const n=arguments,r=o||this;(i&&!s||!e)&&t.apply(r,n),e&&(clearTimeout(s),s=st(()=>{i||t.apply(r,n),s=0},e))}},rt=(t,e,i)=>{let o,s,n,r=null;return function(){o=arguments,s=!0;const a=i||this;e?r||(n=()=>{s?(t.apply(a,o),s=!1,r=st(n,e)):r=null},n()):t.apply(a,o)}};class at{constructor(t){mt(!0,this,t)}}class lt{constructor(t){this.length=0,mt(!0,this,t),this.length=t.length;const e=Array.prototype;["map","forEach","reduce","push","pop","shift","unshift","slice","splice"].forEach(t=>{this[t]=e[t]})}toString(){const t=[];for(let e=0;this.length>e;e+=1)t[e]=this[e];return""+t}}const dt={},ct=dt.toString,ht=dt.hasOwnProperty;["Boolean","Number","String","Function","Array","Date","RegExp","Object","Error","Symbol","HTMLDocument","Window","HTMLElement","HTMLBodyElement","Text","DocumentFragment","DOMStringList","HTMLCollection"].forEach(t=>{dt["[object "+t+"]"]=t.toLowerCase()});const pt=t=>null===t?"null":"object"==typeof t||"function"==typeof t?dt[ct.call(t)]||"object":typeof t,ut=t=>null!==t&&t===t.window,ft=t=>!("object"!=typeof t||t.nodeType||ut(t)||t.constructor&&!ht.call(t.constructor.prototype,"isPrototypeOf"));function mt(...t){const e=t.length;let i,o,s,n,r,a,l,d,c=t[0]||{},h=1,p=!1;for("boolean"==typeof c&&(p=c,c=t[h]||{},h+=1),"object"!=typeof c&&"function"===pt(c)&&(c={}),h===e&&(c=this,h+=1);e>h;h+=1)if(i=t[h],null!=i)for(d=Object.keys(i),l=0;d.length>l;l+=1)o=d[l],s=c[o],n=i[o],c!==n&&(p&&n&&(ft(n)&&!(n instanceof at)||Array.isArray(n)&&!(n instanceof lt))?(r=Array.isArray(n),r?(r=!1,a=s&&Array.isArray(s)?s:[]):a=s&&ft(s)?s:{},c[o]=mt(p,a,n)):void 0!==n&&(c[o]=n));return c}const gt=t=>/<([A-Za-z][A-Za-z0-9]*)\b[^>]*>(.*?)<\/\1>/m.test(t),vt=t=>-1!==t.search(//)||-1!==t.search(//)||-1!==t.search(/style="[^"]*mso-/)&&-1!==t.search(/{if("string"==typeof t){if(!t.match(/^([+\-])?[0-9]+(\.?)([0-9]+)?(e[0-9]+)?$/))return!1;t=parseFloat(t)}return!isNaN(t)&&isFinite(t)},yt=t=>("string"==typeof t&&bt(t)&&(t=parseFloat(t)),"number"==typeof t&&Number.isFinite(t)&&!(t%1)),_t=t=>"string"==typeof t&&32===t.length&&/^[a-z0-9]+$/.test(t),wt=t=>"string"==typeof t,kt=t=>"function"==typeof t,xt=t=>/^(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(t),Ct=()=>{let t=!0;try{const e=document.createElement("input");e.type="color",t="color"===e.type&&"number"!=typeof e.selectionStart}catch(e){t=!1}return t},jt=t=>{t=t.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i,(t,e,i,o)=>e+e+i+i+o+o);const e=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);return e?{r:parseInt(e[1],16),g:parseInt(e[2],16),b:parseInt(e[3],16)}:null},Tt=t=>{if("rgba(0, 0, 0, 0)"===t||""===t)return!1;if(!t)return"#000000";if("#"===t.substr(0,1))return t;const e=/([\s\n\t\r]*?)rgb\((\d+), (\d+), (\d+)\)/.exec(t)||/([\s\n\t\r]*?)rgba\((\d+), (\d+), (\d+), ([\d.]+)\)/.exec(t);let i,o,s,n,r;if(!e)return"#000000";for(o=parseInt(e[2],10),s=parseInt(e[3],10),n=parseInt(e[4],10),r=n|s<<8|o<<16,i=r.toString(16).toUpperCase();6>i.length;)i="0"+i;return e[1]+"#"+i};let Et=1;const zt=(t,e)=>{let i;if(!/:scope/.test(t)||!F||e&&e.nodeType===Node.DOCUMENT_NODE)i=e.querySelectorAll(t);else{const o=e.id,s=o||"_selector_id_"+(""+Math.random()).slice(2)+Et++;t=t.replace(/:scope/g,"#"+s),!o&&e.setAttribute("id",s),i=e.parentNode.querySelectorAll(t),o||e.removeAttribute("id")}return[].slice.call(i)},qt=(t,e)=>{if(!t||1!==t.nodeType)return"";if(!t.parentNode||e===t)return"";if(t.id)return"//*[@id='"+t.id+"']";const i=[].filter.call(t.parentNode.childNodes,e=>e.nodeName===t.nodeName);return qt(t.parentNode,e)+"/"+t.nodeName.toLowerCase()+(i.length>1?"["+(Array.from(i).indexOf(t)+1)+"]":"")},St=t=>{if(-1===t.indexOf("")+7);const e=document.createElement("iframe");e.style.display="none",document.body.appendChild(e);let i="",o=[],s=[];try{const n=e.contentDocument||(e.contentWindow?e.contentWindow.document:null);if(n){n.open(),n.write(t),n.close(),n.styleSheets.length&&(s=n.styleSheets[n.styleSheets.length-1].cssRules);for(let t=0;s.length>t;t+=1)""!==s[t].selectorText&&(o=zt(s[t].selectorText,n.body),o.forEach(e=>{e.style.cssText=s[t].style.cssText.replace(/mso-[a-z\-]+:[\s]*[^;]+;/g,"").replace(/border[a-z\-]*:[\s]*[^;]+;/g,"")+e.style.cssText}));i=n.firstChild?n.body.innerHTML:""}}catch(t){}finally{me.safeRemove(e)}return i&&(t=i),t.replace(/<(\/)?(html|colgroup|col|o:p)[^>]*>/g,"").replace(//i);-1!==e&&(t=t.substr(e+20));const i=t.search(//i);return-1!==i&&(t=t.substr(0,i)),t};t.events.on("paste",e=>{if(!1===t.events.fire("beforePaste",e))return e.preventDefault(),!1;const o=mo(e);if(e&&o){const n=o.types;let r="";if(Array.isArray(n)||"domstringlist"===pt(n))for(let t=0;n.length>t;t+=1)r+=n[t]+";";else r=n+";";let a=(()=>/text\/html/i.test(r)?o.getData("text/html"):/text\/rtf/i.test(r)&&ie("safari")?o.getData("text/rtf"):/text\/plain/i.test(r)&&!ie("mozilla")?o.getData(W):/text/i.test(r)&&F?o.getData(W):"")();(me.isNode(a,t.editorWindow)||""!==Mt(a))&&(a=s(a),t.buffer.get(vo)!==a&&(a=t.events.fire("processPaste",e,a,r)),("string"==typeof a||me.isNode(a,t.editorWindow))&&("drop"===e.type&&t.selection.insertCursorAtPoint(e.clientX,e.clientY),i(a,t.options.defaultActionOnPaste)),e.preventDefault(),e.stopPropagation())}return!1!==t.events.fire("afterPaste",e)&&void 0}),t.options.askBeforePasteHTML&&t.events.on("beforePaste",t=>{const e=mo(t);if(t&&e&&e.getData(W)){const i=e.getData(W);return o(i,t)}}),t.options.askBeforePasteFromWord&&t.events.on("beforePaste",i=>{const n=mo(i);if(i&&n&&n.getData&&n.getData($)){const r=n=>{const r=t.buffer.get(vo);if(gt(n)&&r!==s(n))return vt(n)?e(t.i18n("The pasted content is coming from a Microsoft Word/Excel document. Do you want to keep the format or clean it up?"),t.i18n("Word Paste Detected"),e=>{!0===e&&(n=St(n),t.options.beautifyHTML&&t.ownerWindow.html_beautify&&(n=t.ownerWindow.html_beautify(n))),!1===e&&(n=Bt(n)),0===e&&(n=Ot(Bt(n))),t.selection.insertHTML(n),t.setEditorValue()}):o(n,i),!1};if(n.types&&-1!==Array.from(n.types).indexOf("text/html")){const t=n.getData($);return r(t)}if("drop"!==i.type){const e=t.create.div("",{tabindex:-1,contenteditable:!0,style:{left:-9999,top:0,width:0,height:"100%",lineHeight:"140%",overflow:"hidden",position:"fixed",zIndex:2147483647,wordBreak:"break-all"}});t.container.appendChild(e);const i=t.selection.save();e.focus();let o=0;const s=()=>{me.safeRemove(e),t.selection&&t.selection.restore(i)},n=()=>{if(o+=1,e.childNodes&&e.childNodes.length>0){const i=e.innerHTML;return s(),void(!1!==r(i)&&t.selection.insertHTML(i))}5>o?st(n,20):s()};n()}}}),t.options.nl2brInPlainText&&t.events.on("processPaste",(t,e,i)=>{if(i===W+";"&&!gt(e))return fo(e)})}we.prototype.controls.paste={tooltip:"Paste from clipboard",async exec(t){t.selection.focus();let e="",i=!0;if(i&&(e=t.buffer.get(vo)||"",i=0===e.length),i&&navigator.clipboard){try{const t=await navigator.clipboard.read();if(t&&t.length){const i=await t[0].getType("text/plain");e=await new Response(i).text()}}catch(t){}if(i)try{e=await navigator.clipboard.readText(),i=!1}catch(t){}}if(i){const e=t.value;t.editorDocument.execCommand("paste"),i=e!==t.value}e?t.selection.insertHTML(e):i&&Hi(t.i18n("Your browser doesn't support direct access to the clipboard."),()=>{t.selection.focus()})}},we.prototype.controls.cut={command:"cut",isDisable:t=>t.selection.isCollapsed(),tooltip:"Cut selection"},we.prototype.controls.copy={command:"copy",isDisable:t=>t.selection.isCollapsed(),tooltip:"Copy selection"};const vo="clipboard";class bo extends Fi{afterInit(t){t.events.on(`copy.${vo} cut.${vo}`,e=>{var i,o;const s=t.selection.getHTML(),n=mo(e)||mo(t.editorWindow)||mo(e.originalEvent);n&&(n.setData(W,Ot(s)),n.setData($,s)),t.buffer.set(vo,s),"cut"===e.type&&(t.selection.remove(),t.selection.focus()),e.preventDefault(),null===(o=null===(i=t)||void 0===i?void 0:i.events)||void 0===o||o.fire("afterCopy",s)})}beforeDestruct(t){var e,i,o,s;null===(i=null===(e=t)||void 0===e?void 0:e.buffer)||void 0===i||i.set(vo,""),null===(s=null===(o=t)||void 0===o?void 0:o.events)||void 0===s||s.off("."+vo)}}class yo extends Fi{constructor(){super(...arguments),this.currentIndex=0,this.list=[],this.container=null,this.listBox=null,this.previewBox=null,this.dialog=null,this.paste=()=>{if(this.jodit.selection.focus(),this.jodit.selection.insertHTML(this.list[this.currentIndex]),0!==this.currentIndex){const t=this.list[0];this.list[0]=this.list[this.currentIndex],this.list[this.currentIndex]=t}this.dialog&&this.dialog.close(),this.jodit.setEditorValue()},this.onKeyDown=t=>{let e=this.currentIndex;-1!==[x,j,_].indexOf(t.which)&&(t.which===x&&(0===e?e=this.list.length-1:e-=1),t.which===j&&(e===this.list.length-1?e=0:e+=1),t.which!==_?(e!==this.currentIndex&&this.selectIndex(e),t.stopImmediatePropagation(),t.preventDefault()):this.paste())},this.selectIndex=t=>{this.listBox&&Array.from(this.listBox.childNodes).forEach((e,i)=>{e.classList.remove("jodit_active"),t===i&&this.previewBox&&(e.classList.add("jodit_active"),this.previewBox.innerHTML=this.list[t],e.focus())}),this.currentIndex=t},this.showDialog=()=>{2>this.list.length||(this.dialog||this.createDialog(),this.listBox&&(this.listBox.innerHTML=""),this.previewBox&&(this.previewBox.innerHTML=""),this.list.forEach((t,e)=>{const i=this.jodit.ownerDocument.createElement("a");i.textContent=e+1+". "+t.replace(p,""),i.addEventListener("keydown",this.onKeyDown),i.setAttribute("href","javascript:void(0)"),i.setAttribute("data-index",""+e),i.setAttribute("tab-index","-1"),this.listBox&&this.listBox.appendChild(i)}),this.dialog&&this.dialog.open(),st(()=>{this.selectIndex(0)},100))}}createDialog(){this.dialog=new Bi(this.jodit);const t=this.jodit.create.fromHTML(''+this.jodit.i18n("Paste")+"");t.addEventListener("click",this.paste);const e=this.jodit.create.fromHTML(''+this.jodit.i18n("Cancel")+"");e.addEventListener("click",this.dialog.close),this.container=this.jodit.ownerDocument.createElement("div"),this.container.classList.add("jodit_paste_storage"),this.listBox=this.jodit.ownerDocument.createElement("div"),this.previewBox=this.jodit.ownerDocument.createElement("div"),this.container.appendChild(this.listBox),this.container.appendChild(this.previewBox),this.dialog.setTitle(this.jodit.i18n("Choose Content to Paste")),this.dialog.setContent(this.container),this.dialog.setFooter([t,e]),this.jodit.events.on(this.listBox,"click dblclick",t=>{const e=t.target;return e&&"A"===e.nodeName&&e.hasAttribute("data-index")&&this.selectIndex(parseInt(e.getAttribute("data-index")||"0",10)),"dblclick"===t.type&&this.paste(),!1},"a")}afterInit(){this.jodit.events.on("afterCopy",t=>{-1!==this.list.indexOf(t)&&this.list.splice(this.list.indexOf(t),1),this.list.unshift(t),this.list.length>5&&(this.list.length=5)}),this.jodit.registerCommand("showPasteStorage",{exec:this.showDialog,hotkeys:["ctrl+shift+v","cmd+shift+v"]})}beforeDestruct(){this.dialog&&this.dialog.destruct(),me.safeRemove(this.previewBox),me.safeRemove(this.listBox),me.safeRemove(this.container),this.container=null,this.listBox=null,this.previewBox=null,this.dialog=null,this.list=[]}}const _o=["fontWeight","fontStyle","fontSize","color","margin","padding","borderWidth","borderStyle","borderColor","borderRadius","backgroundColor","textDecorationLine","fontFamily"],wo=(t,e,i,o)=>{let s=ne(i,e);return s===o[e]&&(s=i.parentNode&&i!==t.editor&&i.parentNode!==t.editor?wo(t,e,i.parentNode,o):void 0),s};we.prototype.controls.copyformat={exec(t,e){if(e)if(t.buffer.exists("copyformat"))t.buffer.set("copyformat",!1),t.events.off(t.editor,"mouseup.copyformat");else{const i={},o=me.up(e,t=>t&&t.nodeType!==Node.TEXT_NODE,t.editor)||t.editor,s=t.create.inside.span();t.editor.appendChild(s),_o.forEach(t=>{i[t]=ne(s,t)}),s!==t.editor&&me.safeRemove(s);const n=((t,e,i)=>{const o={};return e&&_o.forEach(s=>{o[s]=wo(t,s,e,i),s.match(/border(Style|Color)/)&&!o.borderWidth&&(o[s]=void 0)}),o})(t,o,i),r=()=>{t.buffer.set("copyformat",!1);const e=t.selection.current();e&&("IMG"===e.nodeName?ne(e,n):t.selection.applyCSS(n)),t.events.off(t.editor,"mouseup.copyformat")};t.events.on(t.editor,"mouseup.copyformat",r),t.buffer.set("copyformat",!0)}},isActive:t=>!!t.buffer.get("copyformat"),tooltip:"Paint format"};var ko=ve.TabsWidget,xo=ve.ColorPickerWidget;function Co(t){const e=(e,i,o)=>{const s=Gt(o);switch(e){case"background":t.selection.applyCSS({backgroundColor:s||""});break;case"forecolor":t.selection.applyCSS({color:s||""})}return t.setEditorValue(),!1};t.registerCommand("forecolor",e).registerCommand("background",e)}we.prototype.controls.brush={isActive(t,e,i){if(!i)return!0;const o=t.selection.current(),s=i.container.querySelector("svg");if(s&&s.style.fill&&s.style.removeProperty("fill"),o&&!i.isDisable()){const e=me.closest(o,e=>me.isBlock(e,t.editorWindow)||e&&me.isNode(e,t.editorWindow)&&e.nodeType===Node.ELEMENT_NODE,t.editor)||t.editor,i=""+ne(e,"color"),n=""+ne(e,"background-color");if(i!==""+ne(t.editor,"color"))return s&&(s.style.fill=i),!0;if(n!==""+ne(t.editor,"background-color"))return s&&(s.style.fill=n),!0}return!1},popup(t,e,i,o){let s,n="",r="",a=null;e&&e!==t.editor&&me.isNode(e,t.editorWindow)&&e.nodeType===Node.ELEMENT_NODE&&(n=""+ne(e,"color"),r=""+ne(e,"background-color"),a=e);const l=xo(t,e=>{a?a.style.backgroundColor=e:t.execCommand("background",!1,e),o()},r),d=xo(t,e=>{a?a.style.color=e:t.execCommand("forecolor",!1,e),o()},n);return s="background"===t.options.colorPickerDefaultTab?{Background:l,Text:d}:{Text:d,Background:l},ko(t,s,a)},tooltip:"Fill color or set the text color"};class jo extends Fi{constructor(){super(...arguments),this.isFragmentFromEditor=!1,this.isCopyMode=!1,this.startDragPoint={x:0,y:0},this.draggable=null,this.bufferRange=null,this.onDragEnd=()=>{this.draggable&&(me.safeRemove(this.draggable),this.draggable=null),this.isCopyMode=!1},this.onDrag=t=>{this.draggable&&(this.draggable.parentNode||this.jodit.ownerDocument.body.appendChild(this.draggable),this.jodit.events.fire("hidePopup"),ne(this.draggable,{left:t.clientX+20,top:t.clientY+20}),this.jodit.selection.insertCursorAtPoint(t.clientX,t.clientY),t.preventDefault(),t.stopPropagation())},this.onDrop=t=>{if(!t.dataTransfer||!t.dataTransfer.files||!t.dataTransfer.files.length){if(!this.isFragmentFromEditor&&!this.draggable)return this.jodit.events.fire("paste",t),t.preventDefault(),t.stopPropagation(),!1;const e=this.jodit.selection.sel,i=this.bufferRange||(e&&e.rangeCount?e.getRangeAt(0):null);let o=null;if(!this.draggable&&i)o=this.isCopyMode?i.cloneContents():i.extractContents();else if(this.draggable)if(this.isCopyMode){const[t,e]="1"===this.draggable.getAttribute("data-is-file")?["a","href"]:["img","src"];o=this.jodit.editorDocument.createElement(t),o.setAttribute(e,this.draggable.getAttribute("data-src")||this.draggable.getAttribute("src")||""),"a"===t&&(o.textContent=o.getAttribute(e)||"")}else o=le(this.draggable,"target");else this.getText(t)&&(o=this.jodit.create.inside.fromHTML(this.getText(t)));e&&e.removeAllRanges(),this.jodit.selection.insertCursorAtPoint(t.clientX,t.clientY),o&&(this.jodit.selection.insertNode(o,!1,!1),i&&o.firstChild&&o.lastChild&&(i.setStartBefore(o.firstChild),i.setEndAfter(o.lastChild),this.jodit.selection.selectRange(i),this.jodit.events.fire("synchro")),"IMG"===o.nodeName&&this.jodit.events&&this.jodit.events.fire("afterInsertImage",o)),t.preventDefault(),t.stopPropagation()}this.isFragmentFromEditor=!1},this.onDragStart=t=>{let e=t.target;if(this.onDragEnd(),this.isFragmentFromEditor=me.isOrContains(this.jodit.editor,e,!0),this.isCopyMode=!this.isFragmentFromEditor||ae(t),this.isFragmentFromEditor){const t=this.jodit.selection.sel,e=t&&t.rangeCount?t.getRangeAt(0):null;e&&(this.bufferRange=e.cloneRange())}else this.bufferRange=null;this.startDragPoint.x=t.clientX,this.startDragPoint.y=t.clientY,e.nodeType===Node.ELEMENT_NODE&&e.matches(".jodit_filebrowser_files_item")&&(e=e.querySelector("img")),"IMG"===e.nodeName&&(this.draggable=e.cloneNode(!0),le(this.draggable,"target",e),ne(this.draggable,{"z-index":1e14,"pointer-events":"none",position:"fixed",display:"inlin-block",left:this.startDragPoint.x,top:this.startDragPoint.y,width:e.offsetWidth,height:e.offsetHeight}))},this.getDataTransfer=t=>t.dataTransfer||new DataTransfer,this.getText=t=>{const e=this.getDataTransfer(t);return e.getData($)||e.getData(W)}}afterInit(){this.jodit.events.on(window,"dragover",this.onDrag).on([window,this.jodit.editorDocument,this.jodit.editor],"dragstart",this.onDragStart).on("drop",this.onDrop).on(window,"dragend drop mouseup",this.onDragEnd)}beforeDestruct(){this.onDragEnd()}}we.prototype.draggableTags=["img","a","jodit-media","jodit"];class To extends Fi{constructor(){super(...arguments),this.dragList=[],this.isCopyMode=!1,this.draggable=null,this.wasMoved=!1,this.timeout=0,this.onDrag=rt(t=>{this.draggable&&(this.wasMoved=!0,this.jodit.events.fire("hidePopup hideResizer"),this.draggable.parentNode||this.jodit.ownerDocument.body.appendChild(this.draggable),ne(this.draggable,{left:t.clientX+20,top:t.clientY+20}),this.jodit.selection.insertCursorAtPoint(t.clientX,t.clientY))},this.jodit.defaultTimeout),this.onDragStart=t=>{let e=t.target,i=null;if(this.dragList.length){do{-1!==this.dragList.indexOf(e.nodeName.toLowerCase())&&(!i||e.firstChild===i&&e.lastChild===i)&&(i=e),e=e.parentNode}while(e&&e!==this.jodit.editor);i&&(this.isCopyMode=ae(t),this.onDragEnd(),this.timeout=st(e=>{e&&(this.draggable=e.cloneNode(!0),le(this.draggable,"target",e),ne(this.draggable,{"z-index":1e14,"pointer-events":"none",position:"fixed",display:"inlin-block",left:t.clientX,top:t.clientY,width:e.offsetWidth,height:e.offsetHeight}))},this.jodit.defaultTimeout,i),t.preventDefault())}},this.onDragEnd=()=>{window.clearTimeout(this.timeout),this.draggable&&(me.safeRemove(this.draggable),this.draggable=null,this.wasMoved=!1)},this.onDrop=()=>{if(!this.draggable||!this.wasMoved)return void this.onDragEnd();let t=le(this.draggable,"target");this.onDragEnd(),this.isCopyMode&&(t=t.cloneNode(!0)),this.jodit.selection.insertNode(t,!0,!1),"IMG"===t.nodeName&&this.jodit.events&&this.jodit.events.fire("afterInsertImage",t),this.jodit.events.fire("synchro")}}afterInit(){this.dragList=this.jodit.options.draggableTags?ot(this.jodit.options.draggableTags).filter(t=>t).map(t=>t.toLowerCase()):[],this.dragList.length&&this.jodit.events.on(this.jodit.editor,"mousemove touchmove",this.onDrag).on(this.jodit.editor,"mousedown touchstart dragstart",this.onDragStart).on("mouseup touchend",this.onDrop).on(window,"mouseup touchend",this.onDragEnd)}beforeDestruct(){this.onDragEnd()}}const Eo=(t,e,i,o)=>{const s=t.create.inside.element(i),n=t.create.inside.element("br");s.appendChild(n),o&&o.cssText&&s.setAttribute("style",o.cssText),t.selection.insertNode(s,!1,!1),t.selection.setCursorBefore(n);const r=t.editorDocument.createRange();return r.setStartBefore("br"!==i.toLowerCase()?n:s),r.collapse(!0),t.selection.selectRange(r),me.safeRemove(e),ue(s,t.editor,t.editorDocument),t.events&&t.events.fire("synchro"),s};function zo(t){t.options.enterBlock||(t.options.enterBlock="br"===t.options.enter.toLowerCase()?B:t.options.enter.toLowerCase()),t.events.on("keydown",e=>{if(e.which===_){const i=t.events.fire("beforeEnter",e);if(void 0!==i)return i;t.selection.isCollapsed()||t.execCommand("Delete"),t.selection.focus();let o=t.selection.current(!1);const s=t.selection.sel;let n=t.selection.range;o&&o!==t.editor||(t.selection.current(),o=t.create.inside.text(l),s&&s.rangeCount?n.insertNode(o):t.editor.appendChild(o),n.selectNode(o),n.collapse(!1),s&&(s.removeAllRanges(),s.addRange(n)));let r=!!o&&me.up(o,e=>me.isBlock(e,t.editorWindow),t.editor);const a=r&&"LI"===r.nodeName;if(!a&&(t.options.enter.toLowerCase()===R.toLowerCase()||e.shiftKey||me.closest(o,"PRE|BLOCKQUOTE",t.editor))){const e=t.create.inside.element("br");return t.selection.insertNode(e,!0),ue(e,t.editor,t.editorDocument),!1}if(!r&&o&&!me.prev(o,e=>me.isBlock(e,t.editorWindow)||!!e&&me.isImage(e,t.editorWindow),t.editor)){let e=o;if(me.up(e,i=>{i&&i.hasChildNodes()&&i!==t.editor&&(e=i)},t.editor),r=me.wrapInline(e,t.options.enter,t),me.isEmpty(r)){const e=t.editorDocument.createElement("br");r.appendChild(e),t.selection.setCursorBefore(e)}n=s&&s.rangeCount?s.getRangeAt(0):t.editorDocument.createRange()}let d=!1,c=!1;if(r){if(!me.canSplitBlock(r,t.editorWindow)){const e=t.create.inside.element("br");return t.selection.insertNode(e,!1),t.selection.setCursorAfter(e),!1}if(a&&me.isEmpty(r)){let e=!1;const i=me.closest(r,"ol|ul",t.editor);if(me.prev(r,t=>t&&"LI"===t.nodeName,i))if(me.next(r,t=>t&&"LI"===t.nodeName,i)){const o=t.editorDocument.createRange();o.setStartBefore(i),o.setEndAfter(r);const s=o.extractContents();i.parentNode&&i.parentNode.insertBefore(s,i),e=t.selection.setCursorBefore(i)}else e=t.selection.setCursorAfter(i);else e=t.selection.setCursorBefore(i);return me.safeRemove(r),Eo(t,e,t.options.enter),zt("li",i).length||me.safeRemove(i),!1}if(t.selection.cursorInTheEdge(!0,r))return d=t.selection.setCursorBefore(r),Eo(t,d,a?"li":t.options.enter,r.style),r&&t.selection.setCursorIn(r,!0),!1;if(!1===t.selection.cursorInTheEdge(!1,r)){const e=t.editorDocument.createRange();e.setStartBefore(r),e.setEnd(n.startContainer,n.startOffset);const i=e.extractContents();r.parentNode&&r.parentNode.insertBefore(i,r),t.selection.setCursorIn(r,!0)}else d=t.selection.setCursorAfter(r)}else c=!0;return(c||d)&&Eo(t,d,a?"li":t.options.enter,r?r.style:void 0),!1}})}function qo(t){if(t.options.showMessageErrors){let e;const i=t.create.div("jodit_error_box_for_messages"),o=()=>{e=5,Array.from(i.childNodes).forEach(o=>{ne(i,"bottom",e+"px"),e+=o.offsetWidth+t.options.showMessageErrorOffsetPx})};t.workplace.appendChild(i),t.events.on("beforeDestruct",()=>{me.safeRemove(i)}).on("errorMessage",(e,s,n)=>{const r=t.create.div("active "+(s||""),e);i.appendChild(r),o(),st(()=>{r.classList.remove("active"),st(()=>{me.safeRemove(r),o()},300)},n||t.options.showMessageErrorTime)})}}function So(t){const e=(e,i,o)=>{switch(e){case"fontsize":t.selection.applyCSS({fontSize:Kt(o)});break;case"fontname":t.selection.applyCSS({fontFamily:o})}return t.events.fire("synchro"),!1};t.registerCommand("fontsize",e).registerCommand("fontname",e)}function Lo(t){t.registerCommand("formatblock",(e,i,o)=>{t.selection.focus();let s=!1;if(t.selection.eachSelection(e=>{const i=t.selection.save();let n=!!e&&me.up(e,e=>me.isBlock(e,t.editorWindow),t.editor);n&&"LI"!==n.nodeName||!e||(n=me.wrapInline(e,t.options.enter,t)),n?(n.tagName.match(/TD|TH|TBODY|TABLE|THEAD/i)?t.selection.isCollapsed()?me.wrapInline(e,o,t):t.selection.applyCSS({},o):o===t.options.enterBlock.toLowerCase()&&n.parentNode&&"LI"===n.parentNode.nodeName?me.unwrap(n):me.replace(n,o,!0,!1,t.editorDocument),s=!0,t.selection.restore(i)):t.selection.restore(i)}),!s){const e=t.editorDocument.createElement(o);e.innerHTML=l,t.selection.insertNode(e,!1),t.selection.setCursorIn(e)}return t.setEditorValue(),!1})}function No(t){let e=!1,i=0,o=0,s=!1;const n=()=>{t.events&&(e?(i=ne(t.container,"height"),o=ne(t.container,"width"),ne(t.container,{height:t.ownerWindow.innerHeight,width:t.ownerWindow.innerWidth}),s=!0):s&&ne(t.container,{height:i||"auto",width:o||"auto"}))},r=i=>{var o,s;if(t.container){if(void 0===i&&(i=!t.container.classList.contains("jodit_fullsize")),t.options.fullsize=i,e=i,t.container.classList.toggle("jodit_fullsize",i),t.toolbar&&(i?null===(s=t.container.querySelector(".jodit_toolbar_container"))||void 0===s||s.appendChild(t.toolbar.container):null===(o=t.toolbar.getParentContainer())||void 0===o||o.appendChild(t.toolbar.container),ne(t.toolbar.container,"width","auto")),t.options.globalFullsize){let e=t.container.parentNode;for(;e&&e.nodeType!==Node.DOCUMENT_NODE;)e.classList.toggle("jodit_fullsize_box",i),e=e.parentNode;n()}t.events.fire("afterResize")}};t.options.globalFullsize&&t.events.on(t.ownerWindow,"resize",n),t.events.on("afterInit afterOpen",()=>{var e,i;t.toggleFullSize(null===(i=null===(e=t)||void 0===e?void 0:e.options)||void 0===i?void 0:i.fullsize)}).on("toggleFullSize",r).on("beforeDestruct beforeClose",()=>{r(!1)}).on("beforeDestruct",()=>{t.events&&t.events.off(t.ownerWindow,"resize",n)})}we.prototype.showMessageErrors=!0,we.prototype.showMessageErrorTime=3e3,we.prototype.showMessageErrorOffsetPx=3,we.prototype.controls.fontsize={command:"fontSize",list:["8","9","10","11","12","14","16","18","24","30","36","48","60","72","96"],template:(t,e,i)=>i,tooltip:"Font size",isActiveChild(t,e){const i=t.selection.current();if(i){const o=me.closest(i,e=>me.isBlock(e,t.editorWindow)||e&&me.isNode(e,t.editorWindow)&&e.nodeType===Node.ELEMENT_NODE,t.editor)||t.editor,s=ne(o,"font-size");return!(!s||!e.args||""+e.args[1]!=""+s)}return!1},isActive(t){const e=t.selection.current();if(e){const i=me.closest(e,e=>me.isBlock(e,t.editorWindow)||e&&me.isNode(e,t.editorWindow)&&e.nodeType===Node.ELEMENT_NODE,t.editor)||t.editor;return""+ne(i,"font-size")!=""+ne(t.editor,"font-size")}return!1}},we.prototype.controls.font={command:"fontname",exec(t,e,i){t.execCommand(i.command,!1,i.args?i.args[0]:void 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:(t,e,i)=>`${i}`,isActiveChild(t,e){const i=t.selection.current(),o=t=>t.toLowerCase().replace(/['"]+/g,"").replace(/[^a-z0-9]+/g,",");if(i){const s=me.closest(i,e=>me.isBlock(e,t.editorWindow)||e&&me.isNode(e,t.editorWindow)&&e.nodeType===Node.ELEMENT_NODE,t.editor)||t.editor,n=""+ne(s,"font-family");return!(!n||!e.args||o(""+e.args[0])!==o(n))}return!1},isActive(t){const e=t.selection.current();if(e){const i=me.closest(e,e=>me.isBlock(e,t.editorWindow)||me.isNode(e,t.editorWindow)&&e&&e.nodeType===Node.ELEMENT_NODE,t.editor)||t.editor;return""+ne(i,"font-family")!=""+ne(t.editor,"font-family")}return!1},tooltip:"Font family"},we.prototype.controls.paragraph={command:"formatBlock",getLabel(t,e,i){const o=t.selection.current();if(o&&t.options.textIcons){const s=(me.closest(o,e=>me.isBlock(e,t.editorWindow),t.editor)||t.editor).nodeName.toLowerCase(),n=e.list;i&&e.data&&e.data.currentValue!==s&&e.list&&n[s]&&(i.textBox.innerHTML=`${t.i18n(n[s])}`,i.textBox.firstChild.classList.add("jodit_icon"),e.data.currentValue=s)}return!1},exec(t,e,i){t.execCommand(i.command,!1,i.args?i.args[0]:void 0)},data:{currentValue:"left"},list:{p:"Normal",h1:"Heading 1",h2:"Heading 2",h3:"Heading 3",h4:"Heading 4",blockquote:"Quote"},isActiveChild(t,e){const i=t.selection.current();if(i){const o=me.closest(i,e=>me.isBlock(e,t.editorWindow),t.editor);return o&&o!==t.editor&&void 0!==e.args&&o.nodeName.toLowerCase()===e.args[0]}return!1},isActive(t,e){const i=t.selection.current();if(i){const o=me.closest(i,e=>me.isBlock(e,t.editorWindow),t.editor);return o&&o!==t.editor&&void 0!==e.list&&"p"!==o.nodeName.toLowerCase()&&void 0!==e.list[o.nodeName.toLowerCase()]}return!1},template:(t,e,i)=>"<"+e+' class="jodit_list_element">'+t.i18n(i)+"",tooltip:"Insert format block"},we.prototype.fullsize=!1,we.prototype.globalFullsize=!0,we.prototype.controls.fullsize={exec(t){t.toggleFullSize()},isActive:t=>t.isFullSize(),getLabel(t,e,i){const o=t.isFullSize()?"shrink":"fullsize";i&&(i.textBox.innerHTML=t.options.textIcons?`${t.i18n(o)}`:ge.getIcon(o),i.textBox.firstChild.classList.add("jodit_icon"))},tooltip:"Open editor in fullsize",mode:P+H},we.prototype.commandToHotkeys={removeFormat:["ctrl+shift+m","cmd+shift+m"],insertOrderedList:["ctrl+shift+7","cmd+shift+7"],insertUnorderedList:["ctrl+shift+8, cmd+shift+8"],selectall:["ctrl+a","cmd+a"]};class Mo extends Fi{constructor(){super(...arguments),this.onKeyPress=t=>{const e=this.specialKeys[t.which],i=(t.key||String.fromCharCode(t.which)).toLowerCase(),o=[e||i];return["alt","ctrl","shift","meta"].forEach(i=>{t[i+"Key"]&&e!==i&&o.push(i)}),Ft(o.join("+"))},this.specialKeys={8:"backspace",9:"tab",10:"return",13:"return",16:"shift",17:"ctrl",18:"alt",19:"pause",20:"capslock",27:"esc",32:"space",33:"pageup",34:"pagedown",35:"end",36:"home",37:"left",38:"up",39:"right",40:"down",45:"insert",46:"del",59:";",61:"=",91:"meta",96:"0",97:"1",98:"2",99:"3",100:"4",101:"5",102:"6",103:"7",104:"8",105:"9",106:"*",107:"+",109:"-",110:".",111:"/",112:"f1",113:"f2",114:"f3",115:"f4",116:"f5",117:"f6",118:"f7",119:"f8",120:"f9",121:"f10",122:"f11",123:"f12",144:"numlock",145:"scroll",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"}}afterInit(t){Object.keys(t.options.commandToHotkeys).forEach(e=>{const i=t.options.commandToHotkeys[e];i&&t.registerHotkeyToCommand(i,e)});let e=!1;t.events.on("keydown.hotkeys",i=>{const o=this.onKeyPress(i);if(!1===this.jodit.events.fire(o+".hotkey",i.type))return e=!0,t.events.stopPropagation("keydown"),!1},void 0,void 0,!0).on("keyup.hotkeys",()=>{if(e)return e=!1,t.events.stopPropagation("keyup"),!1},void 0,void 0,!0)}beforeDestruct(t){t.events&&t.events.off(".hotkeys")}}function Ao(t){t.events.on("afterSetMode",()=>{t.isEditorMode()&&t.selection.focus()}).on("generateDocumentStructure.iframe",(t,e)=>{const i=t||e.iframe.contentWindow.document;if(i.open(),i.write('Jodit Editor'+(e.options.iframeBaseUrl?'':"")+' '),i.close(),e.options.iframeCSSLinks&&e.options.iframeCSSLinks.forEach(t=>{const e=i.createElement("link");e.setAttribute("rel","stylesheet"),e.setAttribute("href",t),i.head&&i.head.appendChild(e)}),e.options.iframeStyle){const t=i.createElement("style");t.innerHTML=e.options.iframeStyle,i.head&&i.head.appendChild(t)}}).on("createEditor",async()=>{if(!t.options.iframe)return;delete t.editor;const e=t.create.element("iframe");e.style.display="block",e.src="about:blank",e.className="jodit_wysiwyg_iframe",e.setAttribute("allowtransparency","true"),e.setAttribute("tabindex",""+t.options.tabIndex),e.setAttribute("frameborder","0"),t.workplace.appendChild(e),t.iframe=e,await t.events.fire("generateDocumentStructure.iframe",null,t);const i=t.iframe.contentWindow.document;if(t.editorDocument=i,t.editorWindow=t.iframe.contentWindow,t.create.inside.setDocument(i),t.editor=i.body,"auto"===t.options.height){i.documentElement&&(i.documentElement.style.overflowY="hidden");const e=rt(()=>{t.editor&&t.iframe&&"auto"===t.options.height&&ne(t.iframe,"height",t.editor.offsetHeight)},t.defaultTimeout/2);t.events.on("change afterInit afterSetMode resize",e).on([t.iframe,t.editorWindow,i.documentElement],"load",e).on(i,"readystatechange DOMContentLoaded",e)}return(t=>{t.matches||(t.matches=Element.prototype.matches)})(t.editorWindow.Element.prototype),t.editorDocument.documentElement&&t.events.on(t.editorDocument.documentElement,"mousedown touchend",()=>{t.selection.isFocused()||(t.selection.focus(),t.selection.setCursorIn(t.editor))}).on(t.editorWindow,"mousedown touchstart keydown keyup touchend click mouseup mousemove scroll",e=>{t.events&&t.events.fire&&t.events.fire(t.ownerWindow,e)}),!1})}we.prototype.iframeBaseUrl="",we.prototype.iframeDefaultSrc="about:blank",we.prototype.iframeStyle='html{margin: 0px;min-height: 100%;}body{box-sizing: border-box;font-size: 13px; line-height: 1.6;padding:10px;background:transparent;color:#000;position:relative;z-index: 2;user-select:auto;margin:0px;overflow:auto;}table{width:100%;border: none;border-collapse:collapse;empty-cells: show;max-width: 100%;}th,td{padding: 2px 5px;border:1px solid #ccc;-webkit-user-select:text;-moz-user-select:text;-ms-user-select:text;user-select:text}td[data-jodit-selected-cell],th[data-jodit-selected-cell]{border: 1px double #1e88e5}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);} .jodit_disabled{user-select: none;-o-user-select: none;-moz-user-select: none;-khtml-user-select: none;-webkit-user-select: none;-ms-user-select: none}',we.prototype.iframeCSSLinks=[];const Io="__jodit_imageprocessor_binded";function Do(t){t.events.on("change afterInit",nt(()=>{t.editor&&zt("img",t.editor).forEach(e=>{e[Io]||(e[Io]=!0,e.complete||e.addEventListener("load",(function i(){t.events&&t.events.fire&&t.events.fire("resize"),e.removeEventListener("load",i)})),t.events.on(e,"mousedown touchstart",()=>{t.selection.select(e)}))})},t.defaultTimeout))}var Ro=ve.TabsWidget,Bo=ve.FileSelectorWidget;function Ho(t){const e=t.i18n,i=ge.getIcon,o=t.options,s=t.create.fromHTML.bind(t.create),n=function(n){if(o.readonly)return;n&&n.stopImmediatePropagation();const r=this,a=new Bi(t),l=s(`${i("check")}${e("Ok")}`),d={remove:s(`${i("bin")}${e("Delete")}`)},c=s(`
\n\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t${i("lock")}\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t
`),h=s(`
\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t${i("lock")}\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t`),p=o.filebrowser.ajax.url||o.uploader.url,u=o.image.useImageEditor,f=s(`
\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t${i("image")}\n\t\t\t\t\t\t\t\t\t\t\t${i("crop")}\n\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t${e("Open link in new tab")}\n\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t
`),m=r.naturalWidth/r.naturalHeight||1,g=c.querySelector(".imageWidth"),v=c.querySelector(".imageHeight"),b=()=>{fe(c,".imageSrc",r.getAttribute("src")||"");const t=c.querySelector(".imageViewSrc");t&&t.setAttribute("src",r.getAttribute("src")||"")},y=()=>{b(),(()=>{r.hasAttribute("title")&&fe(c,".imageTitle",r.getAttribute("title")||""),r.hasAttribute("alt")&&fe(c,".imageAlt",r.getAttribute("alt")||"");const e=me.closest(r,"a",t.editor);e&&(fe(c,".imageLink",e.getAttribute("href")||""),c.querySelector(".imageLinkOpenInNewTab").checked="_blank"===e.getAttribute("target"))})(),g.value=""+r.offsetWidth,v.value=""+r.offsetHeight,(()=>{if(!o.image.editMargins)return;let t=!1;zt(".margins",c).forEach(e=>{const i=e.getAttribute("data-id")||"";let o=r.style[i];o&&(/^[0-9]+(px)?$/.test(o)&&(o=parseInt(o,10)),e.value=""+o||"",t||"marginTop"===i||e.value===fe(c,".marginTop")||(t=!0))}),k=!t;const e=c.querySelector(".jodit_lock_margin");e&&(e.innerHTML=i(k?"lock":"unlock")),zt(".margins:not(.marginTop)",c).forEach(t=>k?t.setAttribute("disabled","true"):t.removeAttribute("disabled"))})(),fe(c,".classes",(r.getAttribute("class")||"").replace(/jodit_focused_image[\s]*/,"")),fe(c,".id",r.getAttribute("id")||""),fe(c,".border_radius",""+(parseInt(r.style.borderRadius||"0",10)||"0")),r.style.cssFloat&&-1!==["left","right"].indexOf(r.style.cssFloat.toLowerCase())?fe(c,".align",ne(r,"float")):"block"===ne(r,"display")&&"auto"===r.style.marginLeft&&"auto"===r.style.marginRight&&fe(c,".align","center"),fe(c,".style",r.getAttribute("style")||"")};let _,w=!0,k=!0;const x={},C=c.querySelector(".tabsbox");x.Image=f,x.Advanced=h,C&&C.appendChild(Ro(t,x)),y(),t.events.on(a,"afterClose",()=>{a.destruct(),r.parentNode&&o.image.selectImageAfterClose&&t.selection.select(r)}),d.remove.addEventListener("click",()=>{me.safeRemove(r),a.close()}),o.image.useImageEditor&&zt(".jodit_use_image_editor",f).forEach(i=>{t.events.on(i,"mousedown touchstart",()=>{const i=r.getAttribute("src")||"",o=t.create.element("a"),s=()=>{o.host===location.host||Oi(e("You can only edit your own images. Download this image on the host?"),i=>{i&&t.uploader&&t.uploader.uploadRemoteImage(""+o.href,t=>{Hi(e("The image has been successfully uploaded to the host!"),()=>{"string"==typeof t.newfilename&&(r.setAttribute("src",t.baseurl+t.newfilename),b())})},t=>{Hi(e("There was an error loading %s",t.message))})})};o.href=i,t.getInstance("FileBrowser").dataProvider.getPathByUrl(""+o.href,(e,s,n)=>{t.getInstance("FileBrowser").openImageEditor(o.href,s,e,n,()=>{const t=(new Date).getTime();r.setAttribute("src",i+(-1!==i.indexOf("?")?"":"?")+"&_tmp="+t),b()},t=>{Hi(t.message)})},t=>{Hi(t.message,s)})})}),zt(".jodit_rechange",f).forEach(e=>{e.addEventListener("mousedown",i=>{e.classList.toggle("active");const o=new We(t,e);o.open(Bo(t,{upload(t){t.files&&t.files.length&&r.setAttribute("src",t.baseurl+t.files[0]),y(),o.close()},filebrowser(t){t&&t.files&&Array.isArray(t.files)&&t.files.length&&(r.setAttribute("src",t.files[0]),o.close(),y())}},r,o.close),!0),i.stopPropagation()})});const j=c.querySelector(".jodit_lock_helper.jodit_lock_size"),T=c.querySelector(".jodit_lock_helper.jodit_lock_margin");j&&j.addEventListener("click",(function(){w=!w,this.innerHTML=i(w?"lock":"unlock"),t.events.fire(g,"change")})),T&&T.addEventListener("click",(function(){k=!k,this.innerHTML=i(k?"lock":"unlock"),k?zt(".margins",c).forEach(t=>{t.matches(".marginTop")||t.setAttribute("disabled","true")}):zt(".margins",c).forEach(t=>{t.matches(".marginTop")||t.removeAttribute("disabled")})}));const E=t=>{const e=parseInt(g.value,10),i=parseInt(v.value,10);t.target===g?v.value=""+Math.round(e/m):g.value=""+Math.round(i*m)};return t.events.on([g,v],"change keydown mousedown paste",e=>{w&&(t.defaultTimeout?(clearTimeout(_),_=st(E.bind(this,e),t.defaultTimeout)):E(e))}),a.setTitle([e("Image properties"),d.remove]),a.setContent(c),l.addEventListener("click",()=>{if(o.image.editStyle&&(fe(c,".style")?r.setAttribute("style",fe(c,".style")):r.removeAttribute("style")),!fe(c,".imageSrc"))return me.safeRemove(r),void a.close();r.setAttribute("src",fe(c,".imageSrc")),r.style.borderRadius="0"!==fe(c,".border_radius")&&/^[0-9]+$/.test(fe(c,".border_radius"))?fe(c,".border_radius")+"px":"",fe(c,".imageTitle")?r.setAttribute("title",fe(c,".imageTitle")):r.removeAttribute("title"),fe(c,".imageAlt")?r.setAttribute("alt",fe(c,".imageAlt")):r.removeAttribute("alt");let e=me.closest(r,"a",t.editor);fe(c,".imageLink")?(e||(e=me.wrap(r,"a",t)),e.setAttribute("href",fe(c,".imageLink")),c.querySelector(".imageLinkOpenInNewTab").checked?e.setAttribute("target","_blank"):e.removeAttribute("target")):e&&e.parentNode&&e.parentNode.replaceChild(r,e);const i=t=>(t=Mt(t),/^[0-9]+$/.test(t)?t+"px":t);g.value===""+r.offsetWidth&&v.value===""+r.offsetHeight||ne(r,{width:Mt(g.value)?i(g.value):null,height:Mt(v.value)?i(v.value):null}),o.image.editMargins&&(k?ne(r,"margin",i(fe(c,".marginTop"))):zt(".margins",c).forEach(t=>{const e=t.getAttribute("data-id")||"";ne(r,e,i(t.value))})),o.image.editClass&&(fe(c,".classes")?r.setAttribute("class",fe(c,".classes")):r.removeAttribute("class")),o.image.editId&&(fe(c,".id")?r.setAttribute("id",fe(c,".id")):r.removeAttribute("id")),o.image.editAlign&&(fe(c,".align")?-1!==["right","left"].indexOf(fe(c,".align").toLowerCase())?(ne(r,"float",fe(c,".align")),re(r)):(ne(r,"float",""),ne(r,{display:"block","margin-left":"auto","margin-right":"auto"})):(ne(r,"float")&&-1!==["right","left"].indexOf((""+ne(r,"float")).toLowerCase())&&ne(r,"float",""),re(r))),r.getAttribute("style")||r.removeAttribute("style"),t.setEditorValue(),a.close()}),a.setFooter([l]),a.setSize(500),a.open(),n&&n.preventDefault(),!1};t.events.on("afterInit",()=>{t.events.on(t.editor,"dblclick",o.image.openOnDblClick?n:function(e){e.stopImmediatePropagation(),t.selection.select(this)},"img")}).on("openImageProperties",t=>{n.call(t)})}function Po(t){const e=e=>{const i=[];return t.selection.eachSelection(o=>{const s=t.selection.save();let n=!!o&&me.up(o,e=>me.isBlock(e,t.editorWindow),t.editor);const r=t.options.enter;if(!n&&o&&(n=me.wrapInline(o,r!==R?r:B,t)),!n)return t.selection.restore(s),!1;const a=-1!==i.indexOf(n);if(n&&n.style&&!a){i.push(n);let o=n.style.marginLeft?parseInt(n.style.marginLeft,10):0;o+=t.options.indentMargin*("outdent"===e?-1:1),n.style.marginLeft=o>0?o+"px":"",n.getAttribute("style")||n.removeAttribute("style")}t.selection.restore(s)}),t.setEditorValue(),!1};t.registerCommand("indent",{exec:e,hotkeys:["ctrl+]","cmd+]"]}),t.registerCommand("outdent",{exec:e,hotkeys:["ctrl+[","cmd+["]})}we.prototype.image={openOnDblClick:!0,editSrc:!0,useImageEditor:!0,editTitle:!0,editAlt:!0,editLink:!0,editSize:!0,editBorderRadius:!0,editMargins:!0,editClass:!0,editStyle:!0,editId:!0,editAlign:!0,showPreview:!0,selectImageAfterClose:!0},we.prototype.controls.indent={tooltip:"Increase Indent"},we.prototype.controls.outdent={isDisable(t){const e=t.selection.current();if(e){const i=me.closest(e,e=>me.isBlock(e,t.editorWindow),t.editor);if(i&&i.style&&i.style.marginLeft)return 0>=parseInt(i.style.marginLeft,10)}return!0},tooltip:"Decrease Indent"},we.prototype.indentMargin=10;var Oo=ve.ColorPickerWidget,Fo=ve.TabsWidget;we.prototype.toolbarInline=!0,we.prototype.toolbarInlineDisableFor=[],we.prototype.popup={a:[{name:"eye",tooltip:"Open link",exec(t,e){const i=e.getAttribute("href");e&&i&&t.ownerWindow.open(i)}},{name:"link",tooltip:"Edit link",icon:"pencil"},"unlink","brush","file"],jodit:[{name:"bin",tooltip:"Delete",exec(t,e){e.parentNode&&(me.safeRemove(e),t.events.fire("hidePopup"))}}],"jodit-media":[{name:"bin",tooltip:"Delete",exec(t,e){e.parentNode&&(me.safeRemove(e),t.events.fire("hidePopup"))}}],img:[{name:"delete",icon:"bin",tooltip:"Delete",exec(t,e){e.parentNode&&(me.safeRemove(e),t.events.fire("hidePopup"))}},{name:"pencil",exec(t,e){"img"===e.tagName.toLowerCase()&&t.events.fire("openImageProperties",e)},tooltip:"Edit"},{name:"valign",list:["Top","Middle","Bottom"],tooltip:"Vertical align",exec(t,e,i){if("img"!==e.tagName.toLowerCase())return;const o=i.args&&"string"==typeof i.args[1]?i.args[1].toLowerCase():"";ne(e,"vertical-align",o),t.events.fire("recalcPositionPopup")}},{name:"left",list:["Left","Right","Center","Normal"],exec(t,e,i){if("img"!==e.tagName.toLowerCase())return;const o=i.args&&"string"==typeof i.args[1]?i.args[1].toLowerCase():"";"normal"!==o?-1!==["right","left"].indexOf(o)?(ne(e,"float",o),re(e)):(ne(e,"float",""),ne(e,{display:"block","margin-left":"auto","margin-right":"auto"})):(ne(e,"float")&&-1!==["right","left"].indexOf(ne(e,"float").toLowerCase())&&ne(e,"float",""),re(e)),t.events.fire("recalcPositionPopup")},tooltip:"Horizontal align"}],table:[{name:"brush",popup(t,e){const i=ro.getAllSelectedCells(e);let o,s,n,r,a,l,d;return!!i.length&&(a=ne(i[0],"color"),d=ne(i[0],"background-color"),l=ne(i[0],"border-color"),o=Oo(t,e=>{i.forEach(t=>{ne(t,"background-color",e)}),t.setEditorValue()},d),s=Oo(t,e=>{i.forEach(t=>{ne(t,"color",e)}),t.setEditorValue()},a),n=Oo(t,e=>{i.forEach(t=>{ne(t,"border-color",e)}),t.setEditorValue()},l),r=Fo(t,{Background:o,Text:s,Border:n}),r)},tooltip:"Background"},{name:"valign",list:["Top","Middle","Bottom"],exec(t,e,i){const o=i.args&&"string"==typeof i.args[1]?i.args[1].toLowerCase():"";ro.getAllSelectedCells(e).forEach(t=>{ne(t,"vertical-align",o)})},tooltip:"Vertical align"},{name:"splitv",list:{tablesplitv:"Split vertical",tablesplitg:"Split horizontal"},tooltip:"Split"},{name:"align",icon:"left"},"\n",{name:"merge",command:"tablemerge",tooltip:"Merge"},{name:"addcolumn",list:{tableaddcolumnbefore:"Insert column before",tableaddcolumnafter:"Insert column after"},exec(t,e,i){const o=i.args&&"string"==typeof i.args[0]?i.args[0].toLowerCase():"";t.execCommand(o,!1,e)},tooltip:"Add column"},{name:"addrow",list:{tableaddrowbefore:"Insert row above",tableaddrowafter:"Insert row below"},exec(t,e,i){const o=i.args&&"string"==typeof i.args[0]?i.args[0].toLowerCase():"";t.execCommand(o,!1,e)},tooltip:"Add row"},{name:"delete",icon:"bin",list:{tablebin:"Delete table",tablebinrow:"Delete row",tablebincolumn:"Delete column",tableempty:"Empty cell"},exec(t,e,i){const o=i.args&&"string"==typeof i.args[0]?i.args[0].toLowerCase():"";t.execCommand(o,!1,e),t.events.fire("hidePopup")},tooltip:"Delete"}]};class Vo extends Fi{constructor(){super(...arguments),this._hiddenClass="jodit_toolbar_popup-inline-target-hidden",this.isSelectionStarted=!1,this.onSelectionEnd=nt(()=>{!this.isDestructed&&this.jodit.isEditorMode()&&(this.isSelectionStarted&&(this.isTargetAction||this.onChangeSelection()),this.isSelectionStarted=!1,this.isTargetAction=!1)},this.jodit.defaultTimeout),this.isTargetAction=!1,this.isSelectionPopup=!1,this.calcWindSizes=()=>{const t=this.jodit.ownerWindow,e=this.jodit.ownerDocument.documentElement;if(!e)return{left:0,top:0,width:0,height:0};const i=this.jodit.ownerDocument.body,o=e.clientTop||i.clientTop||0,s=e.clientLeft||i.clientLeft||0;return{left:s,top:o,width:e.clientWidth+(t.pageXOffset||e.scrollLeft||i.scrollLeft)-s,height:e.clientHeight+(t.pageYOffset||e.scrollTop||i.scrollTop)-o}},this.calcPosition=(t,e)=>{if(this.isDestructed)return;this.popup.target.classList.remove(this._hiddenClass);const i=t.left+t.width/2,o=Qt(this.jodit.workplace,this.jodit,this.jodit.ownerDocument,!0);let s=t.top+t.height+10;this.target.style.left=i+"px",this.target.style.top=s+"px",this.jodit.isFullSize()&&(this.target.style.zIndex=""+ne(this.jodit.container,"zIndex"));const n=this.container.offsetWidth/2;let r=-n;this.popup.container.classList.remove("jodit_toolbar_popup-inline-top"),s+this.container.offsetHeight>e.height&&(s=t.top-this.container.offsetHeight-10,this.target.style.top=s+"px",this.popup.container.classList.add("jodit_toolbar_popup-inline-top")),0>i-n&&(r=-(t.width/2+t.left)),i+n>e.width&&(r=-(this.container.offsetWidth-(e.width-i))),this.container.style.marginLeft=r+"px",(o.top-s>50||s-(o.top+o.height)>50)&&this.popup.target.classList.add(this._hiddenClass)},this.reCalcPosition=()=>{this.__getRect&&this.calcPosition(this.__getRect(),this.calcWindSizes())},this.showPopup=(t,e,i)=>{if(!this.jodit.options.toolbarInline||!this.jodit.options.popup[e.toLowerCase()])return!1;if(this.isExcludedTarget(e))return!0;this.isOpened=!0,this.isTargetAction=!0;const o=this.calcWindSizes();return this.targetContainer.parentNode||this.jodit.ownerDocument.body.appendChild(this.targetContainer),this.toolbar.build(this.jodit.options.popup[e.toLowerCase()],this.container,i),this.popup.open(this.container,!1,!0),this.__getRect=t,this.calcPosition(t(),o),!0},this.hidePopup=t=>{this.isDestructed||t&&(me.isNode(t,this.jodit.editorWindow||window)||t instanceof We)&&me.isOrContains(this.target,t instanceof We?t.target:t)||(this.isTargetAction=!1,this.isOpened=!1,this.popup.close(),me.safeRemove(this.targetContainer))},this.onSelectionStart=t=>{if(!this.isDestructed&&this.jodit.isEditorMode()&&(this.isTargetAction=!1,this.isSelectionPopup=!1,!this.isSelectionStarted)){const e=Object.keys(this.jodit.options.popup).join("|"),i="IMG"===t.target.nodeName?t.target:me.closest(t.target,e,this.jodit.editor);i&&this.showPopup(()=>Qt(i,this.jodit,this.jodit.editorDocument),i.nodeName,i)||(this.isSelectionStarted=!0)}},this.checkIsTargetEvent=()=>{this.isTargetAction?this.isTargetAction=!1:this.hidePopup()},this.isOpened=!1,this.onChangeSelection=()=>{if(this.jodit.options.toolbarInline&&this.jodit.isEditorMode()&&!this.hideIfCollapsed()&&void 0!==this.jodit.options.popup.selection){const t=this.jodit.selection.sel;if(t&&t.rangeCount){this.isSelectionPopup=!0;const e=t.getRangeAt(0);this.showPopup(()=>Qt(e,this.jodit,this.jodit.editorDocument),"selection")}}}}isExcludedTarget(t){return-1!==ot(this.jodit.options.toolbarInlineDisableFor).map(t=>t.toLowerCase()).indexOf(t.toLowerCase())}hideIfCollapsed(){return!!this.jodit.selection.isCollapsed()&&(this.hidePopup(),!0)}afterInit(t){this.toolbar=Ge.makeCollection(t),this.target=t.create.div("jodit_toolbar_popup-inline-target"),this.targetContainer=t.create.div("jodit_toolbar_popup-inline-container",this.target),this.container=t.create.div(),this.popup=new We(t,this.target,void 0,"jodit_toolbar_popup-inline"),t.events.on(this.target,"mousedown keydown touchstart",t=>{t.stopPropagation()}).on("beforeOpenPopup hidePopup afterSetMode blur",this.hidePopup).on("recalcPositionPopup",this.reCalcPosition).on("getDiffButtons.mobile",e=>{if(this.toolbar===e)return ot(t.options.buttons).filter(t=>"|"!==t&&"\n"!==t).filter(t=>0>this.toolbar.getButtonsList().indexOf(t))}).on("selectionchange",this.onChangeSelection).on("afterCommand afterExec",()=>{this.isOpened&&this.isSelectionPopup&&this.onChangeSelection()}).on("showPopup",(t,e)=>{const i=("string"==typeof t?t:t.nodeName).toLowerCase();this.isSelectionPopup=!1,this.showPopup(e,i,"string"==typeof t?void 0:t)}).on("mousedown keydown touchstart",this.onSelectionStart).on([t.ownerWindow,t.editor],"scroll resize",this.reCalcPosition).on([t.ownerWindow],"mouseup keyup touchend",this.onSelectionEnd).on([t.ownerWindow],"mousedown keydown touchstart",this.checkIsTargetEvent)}beforeDestruct(t){this.popup&&this.popup.destruct(),delete this.popup,this.toolbar&&this.toolbar.destruct(),delete this.toolbar,me.safeRemove(this.target),me.safeRemove(this.container),t.events&&t.events.off([t.ownerWindow],"scroll resize",this.reCalcPosition).off([t.ownerWindow],"mouseup keyup touchend",this.onSelectionEnd).off([t.ownerWindow],"mousedown keydown touchstart",this.checkIsTargetEvent)}}function Wo(t){const e=e=>{const i=i=>{if(i instanceof t.editorWindow.HTMLElement)switch(e.toLowerCase()){case"justifyfull":i.style.textAlign="justify";break;case"justifyright":i.style.textAlign="right";break;case"justifyleft":i.style.textAlign="left";break;case"justifycenter":i.style.textAlign="center"}};return t.selection.focus(),t.selection.eachSelection(e=>{if(!e&&t.editor.querySelector(".jodit_selected_cell"))return zt(".jodit_selected_cell",t.editor).forEach(i),!1;if(!(e instanceof t.editorWindow.Node))return;let o=!!e&&me.up(e,e=>me.isBlock(e,t.editorWindow),t.editor);!o&&e&&(o=me.wrapInline(e,t.options.enterBlock,t)),i(o)}),!1};t.registerCommand("justifyfull",e),t.registerCommand("justifyright",e),t.registerCommand("justifyleft",e),t.registerCommand("justifycenter",e)}function $o(t){if(t&&(t.options.limitWords||t.options.limitChars)){const e=(e,i="")=>{const o=(i||(t.options.limitHTML?t.value:t.getEditorText())).replace(d,"").split(p).filter(t=>t.length);if(!e||-1===D.indexOf(e.which))return t.options.limitWords&&o.length>=t.options.limitWords?t.options.limitWords===o.length:t.options.limitChars&&t.options.limitChars<=o.join("").length?t.options.limitChars===o.join("").length:void 0};let i=null;t.events.on("beforePaste",()=>{i=t.observer.snapshot.make()}).on("keydown keyup beforeEnter beforePaste",t=>{if(void 0!==e(t))return!1}).on("change",nt((i,o)=>{!1===e(null,t.options.limitHTML?i:Ot(i))&&(t.value=o)},t.defaultTimeout)).on("afterPaste",()=>{if(!1===e(null)&&i)return t.observer.snapshot.restore(i),!1})}}function Uo(t){t.options.link.followOnDblClick&&t.events.on("afterInit",()=>{t.events.on(t.editor,"dblclick",(function(t){const e=this.getAttribute("href");e&&(location.href=e,t.preventDefault())}),"a")}),t.options.link.processPastedLink&&t.events.on("processPaste",(e,i)=>{if(xt(i)){const e=se(i);if(e!==i)return t.create.inside.fromHTML(e);const o=t.create.inside.element("a");return o.setAttribute("href",i),o.textContent=i,o}}),t.options.link.removeLinkAfterFormat&&t.events.on("afterCommand",e=>{let i,o;"removeFormat"===e&&(o=t.selection.current(),o&&"A"!==o.nodeName&&(o=me.closest(o,"A",t.editor)),o&&"A"===o.nodeName&&(o.innerHTML===o.textContent?i=t.editorDocument.createTextNode(o.innerHTML):(i=t.editorDocument.createElement("span"),i.innerHTML=o.innerHTML),o.parentNode&&(o.parentNode.replaceChild(i,o),t.selection.setCursorIn(i,!0))))})}function Ko(t){const e="jodit_fake_wrapper",{mediaFakeTag:i,mediaBlocks:o,mediaInFakeBlock:s}=t.options;s&&t.events.on("afterGetValueFromEditor",t=>{const o=RegExp(`<${i}[^>]+data-${e}[^>]+>(.+?)`,"ig");o.test(t.value)&&(t.value=t.value.replace(o,"$1"))}).on("change afterInit afterSetMode",nt(()=>{t.isDestructed||t.getMode()===P||zt(o.join(","),t.editor).forEach(o=>{o["__"+e]||(o["__"+e]=!0,(o=>{if(o.parentNode&&o.parentNode.getAttribute("data-jodit_iframe_wrapper"))o=o.parentNode;else{let s;s=t.create.inside.fromHTML("<"+i+' data-jodit-temp="1" contenteditable="false" draggable="true" data-'+e+'="1">"),s.style.display="inline-block"===o.style.display?"inline-block":"block",s.style.width=o.offsetWidth+"px",s.style.height=o.offsetHeight+"px",o.parentNode&&o.parentNode.insertBefore(s,o),s.appendChild(o),o=s}t.events.off(o,"mousedown.select touchstart.select").on(o,"mousedown.select touchstart.select",()=>{t.selection.setCursorAfter(o)})})(o))})},t.defaultTimeout))}function Xo(t){let e,i=0,o=ot(t.options.buttons);t.events.on("touchend",o=>{o.changedTouches&&o.changedTouches.length&&(e=(new Date).getTime(),e-i>t.options.mobileTapTimeout&&(i=e,t.selection.insertCursorAtPoint(o.changedTouches[0].clientX,o.changedTouches[0].clientY)))}).on("getDiffButtons.mobile",e=>{if(e===t.toolbar)return ot(t.options.buttons).filter(t=>0>o.indexOf(t))}),t.options.toolbarAdaptive&&t.events.on("resize afterInit",()=>{if(!t.options.toolbar)return;const e=t.container.offsetWidth;let i=[];i=ot(t.options.sizeLG>e?t.options.sizeMD>e?t.options.sizeSM>e?t.options.buttonsXS:t.options.buttonsSM:t.options.buttonsMD:t.options.buttons),""+i!=""+o&&(o=i,t.toolbar.build(o.concat(t.options.extraButtons),t.toolbar.container.parentElement||t.toolbar.getParentContainer()))})}function Yo(t){t.events.on("afterCommand",e=>{if(/insert(un)?orderedlist/i.test(e)){const e=me.up(t.selection.current(),t=>t&&/^UL|OL$/i.test(t.nodeName),t.editor);if(e&&e.parentNode&&"P"===e.parentNode.nodeName){const i=t.selection.save();me.unwrap(e.parentNode),Array.from(e.childNodes).forEach(t=>{t.lastChild&&t.lastChild.nodeType===Node.ELEMENT_NODE&&"BR"===t.lastChild.nodeName&&me.safeRemove(t.lastChild)}),t.selection.restore(i)}t.setEditorValue()}})}function Go(t){if(!t.options.showPlaceholder)return;this.destruct=()=>{me.safeRemove(o)};const e=()=>{o.parentNode&&(o.style.display="none")},i=nt(()=>{if(null===o.parentNode)return;if(!t.editor)return;if(t.getRealMode()!==H)return e();const i=t.getEditorValue();i&&!/^<(p|div|h[1-6])><\/\1>$/.test(i)?e():(()=>{if(!o.parentNode||t.options.readonly)return;let e=0,i=0;const s=t.editorWindow.getComputedStyle(t.editor);if(t.editor.firstChild&&t.editor.firstChild.nodeType===Node.ELEMENT_NODE){const s=t.editorWindow.getComputedStyle(t.editor.firstChild);e=parseInt(s.getPropertyValue("margin-top"),10),i=parseInt(s.getPropertyValue("margin-left"),10),o.style.fontSize=parseInt(s.getPropertyValue("font-size"),10)+"px",o.style.lineHeight=s.getPropertyValue("line-height")}else o.style.fontSize=parseInt(s.getPropertyValue("font-size"),10)+"px",o.style.lineHeight=s.getPropertyValue("line-height");ne(o,{display:"block",marginTop:Math.max(parseInt(s.getPropertyValue("margin-top"),10),e),marginLeft:Math.max(parseInt(s.getPropertyValue("margin-left"),10),i)})})()},t.defaultTimeout/10),o=t.create.fromHTML('");"rtl"===t.options.direction&&(o.style.right="0px",o.style.direction="rtl"),t.options.useInputsPlaceholder&&t.element.hasAttribute("placeholder")&&(o.innerHTML=t.element.getAttribute("placeholder")||""),t.events.on("readonly",t=>{t?e():i()}).on("afterInit",()=>{t.workplace.appendChild(o),i(),t.events.fire("placeholder",o.innerHTML),t.events.on("change keyup mouseup keydown mousedown afterSetMode",i).on(window,"load",i)})}we.prototype.controls.align={name:"left",tooltip:"Align",getLabel(t,e,i){const o=t.selection.current();if(o){const s=me.closest(o,e=>me.isBlock(e,t.editorWindow),t.editor)||t.editor;let n=""+ne(s,"text-align");e.defaultValue&&-1!==e.defaultValue.indexOf(n)&&(n="left"),i&&e.data&&e.data.currentValue!==n&&e.list&&-1!==e.list.indexOf(n)&&(i.textBox.innerHTML=t.options.textIcons?`${n}`:ge.getIcon(n,""),i.textBox.firstChild.classList.add("jodit_icon"),e.data.currentValue=n)}return!1},isActive(t,e){const i=t.selection.current();if(i&&e.defaultValue){const o=me.closest(i,e=>me.isBlock(e,t.editorWindow),t.editor)||t.editor;return-1===e.defaultValue.indexOf(""+ne(o,"text-align"))}return!1},defaultValue:["left","start","inherit"],data:{currentValue:"left"},list:["center","left","right","justify"]},we.prototype.controls.center={command:"justifyCenter",css:{"text-align":"center"},tooltip:"Align Center"},we.prototype.controls.justify={command:"justifyFull",css:{"text-align":"justify"},tooltip:"Align Justify"},we.prototype.controls.left={command:"justifyLeft",css:{"text-align":"left"},tooltip:"Align Left"},we.prototype.controls.right={command:"justifyRight",css:{"text-align":"right"},tooltip:"Align Right"},we.prototype.limitWords=!1,we.prototype.limitChars=!1,we.prototype.limitHTML=!1,we.prototype.link={followOnDblClick:!0,processVideoLink:!0,processPastedLink:!0,openLinkDialogAfterPost:!0,removeLinkAfterFormat:!0,noFollowCheckbox:!0,openInNewTabCheckbox:!0},we.prototype.controls.unlink={exec(t,e){const i=me.closest(e,"A",t.editor);i&&me.unwrap(i),t.events.fire("hidePopup")}},we.prototype.controls.link={isActive(t){const e=t.selection.current();return e&&!1!==me.closest(e,"a",t.editor)},popup(t,e,i,o){const s=t.selection.sel,n=t.create.fromHTML('
'+(t.options.link.openInNewTabCheckbox?'":"")+(t.options.link.noFollowCheckbox?'":"")+'
  
');e=!(!e||!me.closest(e,"A",t.editor))&&me.closest(e,"A",t.editor);const r=n.querySelector(".jodit_link_insert_button"),a=n.querySelector(".jodit_unlink_button");e?(fe(n,"input[name=url]",e.getAttribute("href")||""),fe(n,"input[name=text]",e.textContent||""),t.options.link.openInNewTabCheckbox&&(n.querySelector("input[name=target]").checked="_blank"===e.getAttribute("target")),t.options.link.noFollowCheckbox&&(n.querySelector("input[name=nofollow]").checked="nofollow"===e.getAttribute("rel")),r&&(r.innerHTML=t.i18n("Update"))):(a&&(a.style.display="none"),fe(n,"input[name=text]",s?""+s:""),r&&(r.innerHTML=t.i18n("Insert")));const l=t.selection.save();return a&&a.addEventListener("mousedown",i=>{e&&me.unwrap(e),t.selection.restore(l),o(),i.preventDefault()}),n.addEventListener("submit",i=>{i.preventDefault(),t.selection.restore(l);const s=e||t.editorDocument.createElement("a");return fe(n,"input[name=url]")?(s.setAttribute("href",fe(n,"input[name=url]")),s.textContent=fe(n,"input[name=text]"),t.options.link.openInNewTabCheckbox&&(n.querySelector("input[name=target]").checked?s.setAttribute("target","_blank"):s.removeAttribute("target")),t.options.link.noFollowCheckbox&&(n.querySelector("input[name=nofollow]").checked?s.setAttribute("rel","nofollow"):s.removeAttribute("rel")),e||t.selection.insertNode(s),o(),!1):(n.querySelector("input[name=url]").focus(),n.querySelector("input[name=url]").classList.add("jodit_error"),!1)}),n},tags:["a"],tooltip:"Insert link"},we.prototype.mediaFakeTag="jodit-media",we.prototype.mediaInFakeBlock=!0,we.prototype.mediaBlocks=["video","audio"],we.prototype.mobileTapTimeout=300,we.prototype.toolbarAdaptive=!0,we.prototype.controls.dots={mode:P+H,popup(t,e,i,o,s){let n=i.data;if(void 0===n){n={container:t.create.div(),toolbar:Ge.makeCollection(t),rebuild(){if(s){const e=t.events.fire("getDiffButtons.mobile",s.parentToolbar);e&&n&&n.toolbar.build(ot(e),n.container)}}};let e=32;const o=t.options.toolbarButtonSize;"large"===o?e=36:"small"===o&&(e=24),n.container.style.width=3*e+"px",i.data=n}return n.rebuild(),n.container}},we.prototype.controls.ul={command:"insertUnorderedList",controlName:"ul",tags:["ul"],tooltip:"Insert Unordered List"},we.prototype.controls.ol={command:"insertOrderedList",controlName:"ol",tags:["ol"],tooltip:"Insert Ordered List"},we.prototype.showPlaceholder=!0,we.prototype.useInputsPlaceholder=!0,we.prototype.placeholder="Type something",we.prototype.controls.redo={mode:O,isDisable:t=>!t.observer.stack.canRedo(),tooltip:"Redo"},we.prototype.controls.undo={mode:O,isDisable:t=>!t.observer.stack.canUndo(),tooltip:"Undo"};class Jo extends Fi{beforeDestruct(){}afterInit(t){const e=e=>(t.getRealMode()===H&&t.observer[e](),!1);t.registerCommand("redo",{exec:e,hotkeys:["ctrl+y","ctrl+shift+z","cmd+y","cmd+shift+z"]}),t.registerCommand("undo",{exec:e,hotkeys:["ctrl+z","cmd+z"]})}}function Zo(t){let e,i,o,s,n,r,a,l,d,c,h,p=!1,u=!1,f=!1,m=0;const g=t.create.fromHTML(''),v=g.getElementsByTagName("span")[0],b=()=>{u=!1,f=!1,i=null,g.style.display="none"},y=()=>{v.style.opacity="0"},_=()=>{if(f&&i&&g){const e=Qt(g.parentNode||t.ownerDocument.documentElement,t,t.ownerDocument,!0),o=Qt(i,t,t.editorDocument),s=parseInt(g.style.left||"0",10),n=g.offsetWidth,r=g.offsetHeight,a=o.top-1-e.top,l=o.left-1-e.left;parseInt(g.style.top||"0",10)===a&&s===l&&n===i.offsetWidth&&r===i.offsetHeight||(g.style.top=a+"px",g.style.left=l+"px",g.style.width=i.offsetWidth+"px",g.style.height=i.offsetHeight+"px",t.events&&(t.events.fire(i,"changesize"),isNaN(s)||t.events.fire("resize")))}};zt("i",g).forEach(l=>{t.events.on(l,"mousedown touchstart",d=>{if(!i||!i.parentNode)return b(),!1;e=l,d.preventDefault(),d.stopImmediatePropagation(),n=i.offsetWidth,r=i.offsetHeight,a=n/r,u=!0,o=d.clientX,s=d.clientY,t.events.fire("hidePopup"),t.lock("resizer")})}),t.events.on("readonly",t=>{t&&b()}).on("beforeDestruct",()=>{me.safeRemove(g)}).on("afterInit",()=>{t.events.on(t.editor,"keydown",e=>{f&&e.which===T&&i&&"table"!==i.tagName.toLowerCase()&&("JODIT"!==i.tagName?t.selection.select(i):(me.safeRemove(i),b(),e.preventDefault()))}).on(t.ownerWindow,"mousemove touchmove",p=>{if(u){if(c=p.clientX-o,h=p.clientY-s,!i)return;const u=e.className;"IMG"===i.tagName?(c?(d=n+(u.match(/left/)?-1:1)*c,l=Math.round(d/a)):(l=r+(u.match(/top/)?-1:1)*h,d=Math.round(l*a)),d>Zt(t.editor,t.ownerWindow)&&(d=Zt(t.editor,t.ownerWindow),l=Math.round(d/a))):(d=n+(u.match(/left/)?-1:1)*c,l=r+(u.match(/top/)?-1:1)*h),d>t.options.resizer.min_width&&(i.style.width=g.parentNode.offsetWidth>d?d+"px":"100%"),l>t.options.resizer.min_height&&(i.style.height=l+"px"),_(),((e,i)=>{t.options.resizer.showSize&&(v.offsetWidth>e||v.offsetHeight>i?y():(v.style.opacity="1",v.innerHTML=`${e} x ${i}`,clearTimeout(m),m=st(y,t.options.resizer.hideSizeTimeout)))})(i.offsetWidth,i.offsetHeight),p.stopImmediatePropagation()}}).on(t.ownerWindow,"resize",()=>{f&&_()}).on(t.ownerWindow,"mouseup keydown touchend",e=>{f&&!p&&(u?(t.unlock(),u=!1,t.setEditorValue(),e.stopImmediatePropagation()):b())}).on([t.ownerWindow,t.editor],"scroll",()=>{f&&!u&&b()})}).on("afterGetValueFromEditor",t=>{const e=/]+data-jodit_iframe_wrapper[^>]+>(.*?]+>[\s\n\r]*<\/iframe>.*?)<\/jodit>/gi;e.test(t.value)&&(t.value=t.value.replace(e,"$1"))}).on("hideResizer",b).on("change afterInit afterSetMode",nt(()=>{f&&(i&&i.parentNode?_():b()),t.isDestructed||zt("img, table, iframe",t.editor).forEach(e=>{t.getMode()!==P&&!e.__jodit_resizer_binded&&("IFRAME"===e.tagName&&t.options.useIframeResizer||"IMG"===e.tagName&&t.options.useImageResizer||"TABLE"===e.tagName&&t.options.useTableResizer)&&(e.__jodit_resizer_binded=!0,(e=>{let o,s;if("IFRAME"===e.tagName){const i=e;e.parentNode&&e.parentNode.getAttribute("data-jodit_iframe_wrapper")?e=e.parentNode:(o=t.create.inside.fromHTML(''),o.style.display="inline-block"===e.style.display?"inline-block":"block",o.style.width=e.offsetWidth+"px",o.style.height=e.offsetHeight+"px",e.parentNode&&e.parentNode.insertBefore(o,e),o.appendChild(e),e=o),t.events.off(e,"mousedown.select touchstart.select").on(e,"mousedown.select touchstart.select",()=>{t.selection.select(e)}),t.events.off(e,"changesize").on(e,"changesize",()=>{i.setAttribute("width",e.offsetWidth+"px"),i.setAttribute("height",e.offsetHeight+"px")})}t.events.on(e,"dragstart",b).on(e,"mousedown",t=>{F&&"IMG"===e.nodeName&&t.preventDefault()}).on(e,"mousedown touchstart",()=>{p||(p=!0,i=e,t.options.readonly||(g.parentNode||t.workplace.appendChild(g),f=!0,g.style.display="block",t.isFullSize()&&(g.style.zIndex=""+ne(t.container,"zIndex")),_()),"IMG"!==i.tagName||i.complete||i.addEventListener("load",(function t(){_(),i&&i.removeEventListener("load",t)})),clearTimeout(s)),s=st(()=>{p=!1},400)})})(e))})},t.defaultTimeout))}we.prototype.useIframeResizer=!0,we.prototype.useTableResizer=!0,we.prototype.useImageResizer=!0,we.prototype.resizer={showSize:!0,hideSizeTimeout:1e3,min_width:10,min_height:10},we.prototype.useSearch=!0;class Qo extends Fi{constructor(){super(...arguments),this.template='",this.isOpened=!1,this.selInfo=null,this.current=!1,this.eachMap=(t,e,i)=>{me.findWithCurrent(t,t=>!!t&&e(t),this.jodit.editor,i?"nextSibling":"previousSibling",i?"firstChild":"lastChild")},this.updateCounters=()=>{if(!this.isOpened)return;this.counterBox.style.display=this.queryInput.value.length?"inline-block":"none";const t=this.calcCounts(this.queryInput.value,this.jodit.selection.range);this.counterBox.textContent=t.join("/")},this.calcCounts=(t,e=!1)=>{const i=[];let o=0,s=0,n=!1,r=this.jodit.editor.firstChild;for(;r&&t.length;)if(n=this.find(r,t,!0,0,n||this.jodit.editorDocument.createRange()),n){if(this.boundAlreadyWas(n,i))break;i.push(n),r=n.startContainer,s+=1,e&&this.boundAlreadyWas(e,[n])&&(o=s)}else r=null;return[o,s]},this.findAndReplace=(t,e)=>{const i=this.find(t,e,!0,0,this.jodit.selection.range);if(i&&i.startContainer&&i.endContainer){const t=this.jodit.editorDocument.createRange();try{if(i&&i.startContainer&&i.endContainer){t.setStart(i.startContainer,i.startOffset),t.setEnd(i.endContainer,i.endOffset),t.deleteContents();const e=this.jodit.editorDocument.createTextNode(this.replaceInput.value);t.insertNode(e),this.jodit.selection.select(e),this.tryScrollToElement(e)}}catch(t){}return!0}return!1},this.findAndSelect=(t,e,i)=>{const o=this.find(t,e,i,0,this.jodit.selection.range);if(o&&o.startContainer&&o.endContainer){const t=this.jodit.editorDocument.createRange();try{t.setStart(o.startContainer,o.startOffset),t.setEnd(o.endContainer,o.endOffset),this.jodit.selection.selectRange(t)}catch(t){}return this.tryScrollToElement(o.startContainer),this.current=o.startContainer,this.updateCounters(),!0}return!1},this.find=(t,e,i,o,s)=>{if(t&&e.length){let n="",r={startContainer:null,startOffset:null,endContainer:null,endOffset:null};if(this.eachMap(t,t=>{if(t.nodeType===Node.TEXT_NODE&&null!==t.nodeValue&&t.nodeValue.length){let a=t.nodeValue;i||t!==s.startContainer?i&&t===s.endContainer&&(a=o?a.substr(0,s.startOffset):a.substr(s.endOffset)):a=o?a.substr(s.endOffset):a.substr(0,s.startOffset);const l=i?n+a:a+n,d=Qo.findSomePartOfString(e,l,i);if(!1!==d){let s=Qo.findSomePartOfString(e,a,i);!0===s?s=Mt(e):!1===s&&(s=Qo.findSomePartOfString(a,e,i),!0===s&&(s=Mt(a)));let c=Qo.getSomePartOfStringIndex(e,a,i)||0;if((i&&!o||!i&&o)&&t.nodeValue.length-a.length>0&&(c+=t.nodeValue.length-a.length),null===r.startContainer&&(r.startContainer=t,r.startOffset=c),!0===d)return r.endContainer=t,r.endOffset=c,r.endOffset+=s.length,!0;n=l}else n="",r={startContainer:null,startOffset:null,endContainer:null,endOffset:null}}else me.isBlock(t,this.jodit.editorWindow)&&""!==n&&(n=i?n+" ":" "+n);return!1},i),r.startContainer&&r.endContainer)return r;if(!o)return this.current=i?this.jodit.editor.firstChild:this.jodit.editor.lastChild,this.find(this.current,e,i,o+1,s)}return!1},this.open=(t=!1)=>{this.isOpened||(this.searchBox.classList.add("jodit_search-active"),this.isOpened=!0),this.jodit.events.fire("hidePopup"),this.searchBox.classList.toggle("jodit_search-and-replace",t),this.current=this.jodit.selection.current(),this.selInfo=this.jodit.selection.save();const e=""+(this.jodit.selection.sel||"");e&&(this.queryInput.value=e),this.updateCounters(),e?this.queryInput.select():this.queryInput.focus()},this.close=()=>{this.isOpened&&(this.selInfo&&(this.jodit.selection.restore(this.selInfo),this.selInfo=null),this.searchBox.classList.remove("jodit_search-active"),this.isOpened=!1)}}static getSomePartOfStringIndex(t,e,i=!0){return this.findSomePartOfString(t,e,i,!0)}static findSomePartOfString(t,e,i=!0,o=!1){t=Mt(t.toLowerCase().replace(p," ")),e=e.toLowerCase();let s=i?0:e.length-1,n=i?0:t.length-1,r=0,a=null;const l=i?1:-1,d=[];for(;void 0!==e[s];s+=l){const c=t[n]===e[s];if(c||null!==a&&p.test(e[s])?(null!==a&&i||(a=s),d.push(e[s]),c&&(r+=1,n+=l)):(a=null,d.length=0,r=0,n=i?0:t.length-1),r===t.length)return!o||a}return o?null!=a&&a:!!d.length&&(i?d.join(""):d.reverse().join(""))}boundAlreadyWas(t,e){return e.some(e=>e.startContainer===t.startContainer&&e.endContainer===t.endContainer&&e.startOffset===t.startOffset&&e.endOffset===t.endOffset,!1)}tryScrollToElement(t){let e=me.closest(t,t=>t&&t.nodeType===Node.ELEMENT_NODE,this.jodit.editor);e||(e=me.prev(t,t=>t&&t.nodeType===Node.ELEMENT_NODE,this.jodit.editor)),e&&e!==this.jodit.editor&&e.scrollIntoView()}afterInit(t){if(t.options.useSearch){const e=this;e.searchBox=t.create.fromHTML(e.template);const i=e.searchBox.querySelector.bind(e.searchBox);e.queryInput=i("input.jodit_search-query"),e.replaceInput=i("input.jodit_search-replace"),e.closeButton=i(".jodit_search_buttons-cancel"),e.nextButton=i(".jodit_search_buttons-next"),e.prevButton=i(".jodit_search_buttons-prev"),e.replaceButton=i(".jodit_search_buttons-replace"),e.counterBox=i(".jodit_search_counts span"),t.workplace.appendChild(this.searchBox),t.events.on(e.closeButton,"click",this.close).on(e.queryInput,"mousedown",()=>{t.selection.isFocused()&&(t.selection.removeMarkers(),e.selInfo=t.selection.save())}).on(e.replaceButton,"click",i=>{e.findAndReplace(t.selection.current()||t.editor.firstChild,e.queryInput.value),this.updateCounters(),i.preventDefault(),i.stopImmediatePropagation()}).on([e.nextButton,e.prevButton],"click",(function(i){t.events.fire(e.nextButton===this?"searchNext":"searchPrevious"),i.preventDefault(),i.stopImmediatePropagation()})).on(this.queryInput,"keydown",nt(e=>{switch(e.which){case _:e.preventDefault(),e.stopImmediatePropagation(),t.events.fire("searchNext")&&this.close();break;default:this.updateCounters()}},this.jodit.defaultTimeout)).on(this.jodit.container,"keydown.search",i=>{if(t.getRealMode()===H)switch(i.which){case w:this.close();break;case M:e.queryInput.value&&(t.events.fire(i.shiftKey?"searchPrevious":"searchNext"),i.preventDefault())}}).on("beforeSetMode.search",()=>{this.close()}).on("keydown.search mousedown.search",()=>{this.selInfo&&(t.selection.removeMarkers(),this.selInfo=null),this.isOpened&&(this.current=this.jodit.selection.current(),this.updateCounters())}).on("searchNext.search searchPrevious.search",()=>e.findAndSelect(t.selection.current()||t.editor.firstChild,e.queryInput.value,"searchNext"===t.events.current[t.events.current.length-1])).on("search.search",(e,i=!0)=>{t.execCommand("search",e,i)}),t.registerCommand("search",{exec:(i,o,s=!0)=>(e.findAndSelect(t.selection.current()||t.editor.firstChild,o||"",s),!1)}),t.registerCommand("openSearchDialog",{exec:()=>(e.open(),!1),hotkeys:["ctrl+f","cmd+f"]}),t.registerCommand("openReplaceDialog",{exec:()=>(t.options.readonly||e.open(!0),!1),hotkeys:["ctrl+h","cmd+h"]})}}beforeDestruct(t){me.safeRemove(this.searchBox),t.events&&t.events.off(".search"),t.events&&t.events.off(t.container,".search")}}function ts(t){const e=e=>{ne(t.container,"height",e),t.options.saveHeightInStorage&&t.storage.set("height",e)},i=e=>ne(t.container,"width",e),o=e=>ne(t.workplace,"height",e);if("auto"!==t.options.height&&(t.options.allowResizeX||t.options.allowResizeY)){const o=t.create.div("jodit_editor_resize",''),s={x:0,y:0,w:0,h:0};let n=!1;t.events.on(o,"mousedown touchstart",e=>{n=!0,s.x=e.clientX,s.y=e.clientY,s.w=t.container.offsetWidth,s.h=t.container.offsetHeight,t.lock(),e.preventDefault()}).on(t.ownerWindow,"mousemove touchmove",rt(o=>{n&&(t.options.allowResizeY&&e(s.h+o.clientY-s.y),t.options.allowResizeX&&i(s.w+o.clientX-s.x),r(),t.events.fire("resize"))},t.defaultTimeout/10)).on(t.ownerWindow,"mouseup touchsend",()=>{n&&(n=!1,t.unlock())}).on("afterInit",()=>{t.container.appendChild(o)}).on("toggleFullSize",t=>{o.style.display=t?"none":"block"})}const s=()=>(t.options.toolbar?t.toolbar.container.offsetHeight:0)+(t.statusbar?t.statusbar.getHeight():0),n=()=>{if(!t.container||!t.container.parentNode)return;const e=ne(t.container,"minHeight")-s();[t.workplace,t.iframe,t.editor].map(i=>{const o=i===t.editor?e-2:e;i&&ne(i,"minHeight",o),t.events.fire("setMinHeight",o)})},r=()=>{t&&!t.isDestructed&&t.options&&!t.options.inline&&(n(),t.container&&("auto"!==t.options.height||t.isFullSize())&&o(t.container.offsetHeight-s()))},a=nt(r,t.defaultTimeout);t.events.on("toggleFullSize",e=>{e||"auto"!==t.options.height||(o("auto"),n())}).on("afterInit",()=>{t.options.inline||(ne(t.editor,{minHeight:"100%"}),ne(t.container,{minHeight:t.options.minHeight,minWidth:t.options.minWidth,maxWidth:t.options.maxWidth}));let o=t.options.height;if(t.options.saveHeightInStorage&&"auto"!==o){const e=t.storage.get("height");e&&(o=e)}t.options.inline||(e(o),i(t.options.width)),r()},void 0,void 0,!0).on(window,"load",a).on("afterInit resize updateToolbar scroll afterResize",a)}we.prototype.allowResizeX=!1,we.prototype.allowResizeY=!0,we.prototype.beautifyHTML=!0,we.prototype.useAceEditor=!0,we.prototype.sourceEditorNativeOptions={showGutter:!0,theme:"ace/theme/idle_fingers",mode:"ace/mode/html",wrap:!0,highlightActiveLine:!0},we.prototype.sourceEditorCDNUrlsJS=["https://cdnjs.cloudflare.com/ajax/libs/ace/1.4.5/ace.js"],we.prototype.beautifyHTMLCDNUrlsJS=["https://cdnjs.cloudflare.com/ajax/libs/js-beautify/1.10.0/beautify.min.js","https://cdnjs.cloudflare.com/ajax/libs/js-beautify/1.10.0/beautify-html.min.js"],we.prototype.controls.source={mode:O,exec(t){t.toggleMode()},isActive:t=>t.getRealMode()===P,tooltip:"Change mode"};class es extends Fi{constructor(){super(...arguments),this.className="jodit_ace_editor",this.__lock=!1,this.__oldMirrorValue="",this.autosize=nt(()=>{this.mirror.style.height="auto",this.mirror.style.height=this.mirror.scrollHeight+"px"},this.jodit.defaultTimeout),this.tempMarkerStart="{start-jodit-selection}",this.tempMarkerStartReg=/{start-jodit-selection}/g,this.tempMarkerEnd="{end-jodit-selection}",this.tempMarkerEndReg=/{end-jodit-selection}/g,this.selInfo=[],this.lastTuple=null,this.loadNext=(t,e,i="aceReady",o=this.className)=>{if(i&&void 0===e[t]&&!this.isDestructed)return this.jodit&&this.jodit.events&&this.jodit.events.fire(i),void(this.jodit&&this.jodit.events&&this.jodit.events.fire(this.jodit.ownerWindow,i));void 0!==e[t]&&(this.lastTuple&&this.lastTuple.element.removeEventListener("load",this.lastTuple.callback),this.lastTuple=ee(e[t],()=>{this.isDestructed||this.loadNext(t+1,e,i,o)},o,this.jodit.ownerDocument))},this.insertHTML=t=>{if(this.mirror.selectionStart||0===this.mirror.selectionStart){const e=this.mirror.selectionEnd;this.mirror.value=this.mirror.value.substring(0,this.mirror.selectionStart)+t+this.mirror.value.substring(e,this.mirror.value.length)}else this.mirror.value+=this.mirror;this.toWYSIWYG()},this.fromWYSIWYG=(t=!1)=>{if(!this.__lock||!0===t){this.__lock=!0;const t=this.jodit.getEditorValue(!1);t!==this.getMirrorValue()&&this.setMirrorValue(t),this.__lock=!1}},this.toWYSIWYG=()=>{if(this.__lock)return;const t=this.getMirrorValue();t!==this.__oldMirrorValue&&(this.__lock=!0,this.jodit.setEditorValue(t),this.__lock=!1,this.__oldMirrorValue=t)},this.getNormalPosition=(t,e)=>{let i=t;for(;i>0;){if(i--,"<"===e[i]&&void 0!==e[i+1]&&e[i+1].match(/[\w\/]+/i))return i;if(">"===e[i])return t}return t},this.__clear=t=>t.replace(d,""),this.selectAll=()=>{this.mirror.select()},this.onSelectAll=t=>{if("selectall"===t.toLowerCase()&&this.jodit.getRealMode()===P)return this.selectAll(),!1},this.getSelectionStart=()=>this.mirror.selectionStart,this.getSelectionEnd=()=>this.mirror.selectionEnd,this.saveSelection=()=>{if(this.jodit.getRealMode()===H)this.selInfo=this.jodit.selection.save()||[],this.jodit.setEditorValue(),this.fromWYSIWYG(!0);else{this.selInfo.length=0;const t=this.getMirrorValue();if(this.getSelectionStart()===this.getSelectionEnd()){const e=this.jodit.selection.marker(!0);this.selInfo[0]={startId:e.id,collapsed:!0,startMarker:e.outerHTML};const i=this.getNormalPosition(this.getSelectionStart(),this.getMirrorValue());this.setMirrorValue(t.substr(0,i)+this.__clear(this.selInfo[0].startMarker)+t.substr(i))}else{const e=this.jodit.selection.marker(!0),i=this.jodit.selection.marker(!1);this.selInfo[0]={startId:e.id,endId:i.id,collapsed:!1,startMarker:this.__clear(e.outerHTML),endMarker:this.__clear(i.outerHTML)};const o=this.getNormalPosition(this.getSelectionStart(),t),s=this.getNormalPosition(this.getSelectionEnd(),t);this.setMirrorValue(t.substr(0,o)+this.selInfo[0].startMarker+t.substr(o,s-o)+this.selInfo[0].endMarker+t.substr(s))}this.toWYSIWYG()}},this.restoreSelection=()=>{if(!this.selInfo.length)return;if(this.jodit.getRealMode()===H)return this.__lock=!0,this.jodit.selection.restore(this.selInfo),void(this.__lock=!1);let t=this.getMirrorValue(),e=0,i=0;try{this.selInfo[0].startMarker&&(t=t.replace(/]+data-jodit_selection_marker="start"[^>]*>[<>]*?<\/span>/gim,this.tempMarkerStart)),this.selInfo[0].endMarker&&(t=t.replace(/]+data-jodit_selection_marker="end"[^>]*>[<>]*?<\/span>/gim,this.tempMarkerEnd)),this.jodit.ownerWindow.html_beautify&&this.jodit.options.beautifyHTML&&(t=this.jodit.ownerWindow.html_beautify(t)),e=t.indexOf(this.tempMarkerStart),i=e,t=t.replace(this.tempMarkerStartReg,""),this.selInfo[0].collapsed&&-1!==e||(i=t.indexOf(this.tempMarkerEnd),-1===e&&(e=i)),t=t.replace(this.tempMarkerEndReg,"")}finally{t=t.replace(this.tempMarkerEndReg,"").replace(this.tempMarkerStartReg,"")}this.setMirrorValue(t),this.setMirrorSelectionRange(e,i),this.toWYSIWYG(),this.setFocusToMirror()},this.__proxyOnFocus=t=>{this.jodit.events.fire("focus",t)},this.__proxyOnMouseDown=t=>{this.jodit.events.fire("mousedown",t)},this.setMirrorSelectionRange=(t,e)=>{this.mirror.setSelectionRange(t,e)},this.onReadonlyReact=()=>{const t=this.jodit.options.readonly;t?this.mirror.setAttribute("readonly","true"):this.mirror.removeAttribute("readonly"),this.aceEditor&&this.aceEditor.setReadOnly(t)}}getMirrorValue(){return this.mirror.value}setMirrorValue(t){this.mirror.value=t}setFocusToMirror(){this.mirror.focus()}replaceMirrorToACE(){const t=this.jodit;let e,i;const o=()=>{i&&t.getRealMode()===P&&(t.events.fire("canRedo",i.hasRedo()),t.events.fire("canUndo",i.hasUndo()))},s=t=>e.session.getLine(t).length,n=()=>{const t=e.session.getLength(),i=[];let o=0;for(let e=0;t>e;e++)o+=s(e),e>0&&(o+=1),i[e]=o;return i},r=t=>{const e=n();if(e[0]>=t)return{row:0,column:t};let i=1;for(let o=1;e.length>o;o++)t>e[o]&&(i=o+1);return{row:i,column:t-e[i-1]-1}},a=(t,e)=>n()[t]-s(t)+e,l=()=>{if(void 0===e&&void 0!==this.jodit.ownerWindow.ace){this.jodit.events.off(this.jodit.ownerWindow,"aceReady",l);const s=this.jodit.create.div("jodit_source_mirror-fake");this.mirrorContainer.insertBefore(s,this.mirrorContainer.firstChild),this.aceEditor=e=this.jodit.ownerWindow.ace.edit(s),e.setTheme(t.options.sourceEditorNativeOptions.theme),e.renderer.setShowGutter(t.options.sourceEditorNativeOptions.showGutter),e.getSession().setMode(t.options.sourceEditorNativeOptions.mode),e.setHighlightActiveLine(t.options.sourceEditorNativeOptions.highlightActiveLine),e.getSession().setUseWrapMode(!0),e.setOption("indentedSoftWrap",!1),e.setOption("wrap",t.options.sourceEditorNativeOptions.wrap),e.getSession().setUseWorker(!1),e.$blockScrolling=1/0,e.setOptions({maxLines:1/0}),e.on("change",this.toWYSIWYG),e.on("focus",this.__proxyOnFocus),e.on("mousedown",this.__proxyOnMouseDown),this.mirror.style.display="none",i=e.getSession().getUndoManager(),this.setMirrorValue=i=>{e.setValue(t.options.beautifyHTML&&t.ownerWindow.html_beautify?t.ownerWindow.html_beautify(i):i),e.clearSelection(),o()},this.jodit.getRealMode()!==H&&this.setMirrorValue(this.getMirrorValue()),this.getMirrorValue=()=>e.getValue(),this.setFocusToMirror=()=>{e.focus()},this.getSelectionStart=()=>{const t=e.selection.getRange();return a(t.start.row,t.start.column)},this.getSelectionEnd=()=>{const t=e.selection.getRange();return a(t.end.row,t.end.column)},this.selectAll=()=>{e.selection.selectAll()},this.insertHTML=t=>{const i=e.selection.getCursor(),o=e.session.insert(i,t);e.selection.setRange({start:i,end:o},!1)},this.setMirrorSelectionRange=(t,i)=>{((t,i)=>{const o=r(t),s=r(i);e.getSelection().setSelectionRange({start:o,end:s})})(t,i)},t.events.on("afterResize",()=>{e.resize()}).fire("aceInited",t)}};t.events.on(this.jodit.ownerWindow,"aceReady",l).on("aceReady",l).on("afterSetMode",()=>{t.getRealMode()!==P&&t.getMode()!==O||(this.fromWYSIWYG(),l())}).on("beforeCommand",s=>{if(t.getRealMode()!==H&&("redo"===s||"undo"===s)&&i)return i["has"+s.substr(0,1).toUpperCase()+s.substr(1)]&&e[s](),o(),!1}),l(),void 0!==this.jodit.ownerWindow.ace||zt("script."+this.className,this.jodit.ownerDocument.body).length||this.loadNext(0,t.options.sourceEditorCDNUrlsJS,"aceReady",this.className)}afterInit(t){this.mirrorContainer=t.create.div("jodit_source"),this.mirror=t.create.fromHTML('\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t`),r={},a=t.selection.save(),l=e=>{t.selection.restore(a),t.selection.insertHTML(e),o()};return t.options.textIcons?(r[t.i18n("Link")]=s,r[t.i18n("Code")]=n):(r[ge.getIcon("link")+" "+t.i18n("Link")]=s,r[ge.getIcon("source")+" "+t.i18n("Code")]=n),n.addEventListener("submit",t=>(t.preventDefault(),Mt(fe(n,"textarea[name=code]"))?(l(fe(n,"textarea[name=code]")),!1):(n.querySelector("textarea[name=code]").focus(),n.querySelector("textarea[name=code]").classList.add("jodit_error"),!1))),s.addEventListener("submit",t=>(t.preventDefault(),xt(fe(s,"input[name=code]"))?(l(se(fe(s,"input[name=code]"))),!1):(s.querySelector("input[name=code]").focus(),s.querySelector("input[name=code]").classList.add("jodit_error"),!1))),ye(t,r)},tags:["iframe"],tooltip:"Insert youtube/vimeo video"}};const xe=t=>!!(t&&t instanceof Object&&"function"==typeof t.constructor&&(t instanceof Qe||t.isJodit));class Ce{constructor(t){this.__isDestructed=!1,t&&t instanceof Ce&&(this.jodit=t,xe(t)&&t.components.push(this))}get isDestructed(){return this.__isDestructed}destruct(){this.jodit&&(this.jodit=void 0),this.__isDestructed=!0}}class je extends Ce{constructor(){super(...arguments),this.isBlocked=!1}static equal(t,e){return t.html===e.html&&JSON.stringify(t.range)===JSON.stringify(e.range)}static countNodesBeforeInParent(t){if(!t.parentNode)return 0;const e=t.parentNode.childNodes;let i,o=0,s=null;for(i=0;e.length>i;i+=1){if(!s||e[i].nodeType===Node.TEXT_NODE&&""===e[i].textContent||s.nodeType===Node.TEXT_NODE&&e[i].nodeType===Node.TEXT_NODE||(o+=1),e[i]===t)return o;s=e[i]}return 0}static strokeOffset(t,e){for(;t&&t.nodeType===Node.TEXT_NODE;)(t=t.previousSibling)&&t.nodeType===Node.TEXT_NODE&&null!==t.textContent&&(e+=t.textContent.length);return e}calcHierarchyLadder(t){const e=[];if(!t||!t.parentNode||!me.isOrContains(this.jodit.editor,t))return[];for(;t&&t!==this.jodit.editor;)t&&e.push(je.countNodesBeforeInParent(t)),t=t.parentNode;return e.reverse()}getElementByLadder(t){let e,i=this.jodit.editor;for(e=0;i&&t.length>e;e+=1)i=i.childNodes[t[e]];return i}make(){const t={html:"",range:{startContainer:[],startOffset:0,endContainer:[],endOffset:0}};t.html=this.jodit.getNativeEditorValue();const e=this.jodit.selection.sel;if(e&&e.rangeCount){const i=e.getRangeAt(0),o=this.calcHierarchyLadder(i.startContainer),s=this.calcHierarchyLadder(i.endContainer);let n=je.strokeOffset(i.startContainer,i.startOffset),r=je.strokeOffset(i.endContainer,i.endOffset);o.length||i.startContainer===this.jodit.editor||(n=0),s.length||i.endContainer===this.jodit.editor||(r=0),t.range={startContainer:o,startOffset:n,endContainer:s,endOffset:r}}return t}restore(t){this.isBlocked=!0,this.jodit.setEditorValue(t.html);try{if(t.range){const e=this.jodit.editorDocument.createRange();e.setStart(this.getElementByLadder(t.range.startContainer),t.range.startOffset),e.setEnd(this.getElementByLadder(t.range.endContainer),t.range.endOffset),this.jodit.selection.selectRange(e)}}catch(t){}this.isBlocked=!1}destruct(){this.isBlocked=!1,super.destruct()}}class Te{constructor(){this.commands=[],this.stackPosition=-1}clearRedo(){this.commands.length=this.stackPosition+1}clear(){this.commands.length=0,this.stackPosition=-1}push(t){this.clearRedo(),this.commands.push(t),this.stackPosition+=1}undo(){return!!this.canUndo()&&(this.commands[this.stackPosition]&&this.commands[this.stackPosition].undo(),this.stackPosition-=1,!0)}redo(){return!!this.canRedo()&&(this.stackPosition+=1,this.commands[this.stackPosition]&&this.commands[this.stackPosition].redo(),!0)}canUndo(){return this.stackPosition>=0}canRedo(){return this.commands.length-1>this.stackPosition}}class Ee{constructor(t,e,i){this.observer=i,this.oldValue=t,this.newValue=e}undo(){this.observer.snapshot.restore(this.oldValue)}redo(){this.observer.snapshot.restore(this.newValue)}}we.prototype.observer={timeout:100};class ze extends Ce{constructor(t){super(t),this.onChangeStack=()=>{this.__newValue=this.snapshot.make(),je.equal(this.__newValue,this.__startValue)||(this.stack.push(new Ee(this.__startValue,this.__newValue,this)),this.__startValue=this.__newValue,this.changeStack())},this.stack=new Te,this.snapshot=new je(t);const e=nt(this.onChangeStack,t.defaultTimeout);t.events.on("afterInit.observer",()=>{this.isDestructed||(this.__startValue=this.snapshot.make(),t.events.on("changeSelection.observer selectionstart.observer selectionchange.observer mousedown.observer mouseup.observer keydown.observer keyup.observer",()=>{this.__startValue.html===this.jodit.getNativeEditorValue()&&(this.__startValue=this.snapshot.make())}).on("change.observer",()=>{this.snapshot.isBlocked||e()}))})}redo(){this.stack.redo()&&(this.__startValue=this.snapshot.make(),this.changeStack())}undo(){this.stack.undo()&&(this.__startValue=this.snapshot.make(),this.changeStack())}clear(){this.__startValue=this.snapshot.make(),this.stack.clear(),this.changeStack()}changeStack(){this.jodit&&!this.jodit.isDestructed&&this.jodit.events&&this.jodit.events.fire("changeStack")}destruct(){this.jodit.events&&this.jodit.events.off(".observer"),this.snapshot.destruct(),delete this.snapshot,delete this.stack,super.destruct()}}class qe{constructor(t){this.jodit=t,this.isMarker=t=>me.isNode(t,this.win)&&t.nodeType===Node.ELEMENT_NODE&&"SPAN"===t.nodeName&&t.hasAttribute("data-"+U),this.focus=()=>{var t,e;if(!this.isFocused()){this.jodit.iframe&&"complete"==this.doc.readyState&&this.jodit.iframe.focus(),this.win.focus(),this.area.focus();const i=this.sel,o=this.createRange();return!i||i.rangeCount&&this.current()||(o.setStart(this.area,0),o.collapse(!0),i.removeAllRanges(),i.addRange(o)),this.jodit.editorIsActive||null===(e=null===(t=this.jodit)||void 0===t?void 0:t.events)||void 0===e||e.fire("focus"),!0}return!1},this.eachSelection=t=>{const e=this.sel;if(e&&e.rangeCount){const i=e.getRangeAt(0),o=[],s=i.startOffset,n=this.area.childNodes.length,r=n>s?s:n-1,a=i.startContainer===this.area?this.area.childNodes[r]:i.startContainer,d=i.endContainer===this.area?this.area.childNodes[i.endOffset-1]:i.endContainer;me.find(a,t=>(!t||t===this.area||me.isEmptyTextNode(t)||this.isMarker(t)||o.push(t),t===d||t&&t.contains(d)),this.area,!0,"nextSibling",!1);const c=e=>{if(e.nodeName.match(/^(UL|OL)$/))return Array.from(e.childNodes).forEach(c);if("LI"===e.nodeName)if(e.firstChild)e=e.firstChild;else{const t=this.jodit.create.inside.text(l);e.appendChild(t),e=t}t(e)};0===o.length&&me.isEmptyTextNode(a)&&o.push(a),o.forEach(c)}}}errorNode(t){if(!me.isNode(t,this.win))throw Error("Parameter node must be instance of Node")}get area(){return this.jodit.editor}get win(){return this.jodit.editorWindow}get doc(){return this.jodit.editorDocument}get sel(){return this.win.getSelection()}get range(){const t=this.sel;return t&&t.rangeCount?t.getRangeAt(0):this.createRange()}createRange(){return this.doc.createRange()}remove(){const t=this.sel,e=this.current();if(t&&e)for(let e=0;t.rangeCount>e;e+=1)t.getRangeAt(e).deleteContents(),t.getRangeAt(e).collapse(!0)}insertCursorAtPoint(t,e){this.removeMarkers();try{let i=this.createRange();if(this.doc.caretPositionFromPoint){const o=this.doc.caretPositionFromPoint(t,e);i.setStart(o.offsetNode,o.offset)}else if(this.doc.caretRangeFromPoint){const o=this.doc.caretRangeFromPoint(t,e);i.setStart(o.startContainer,o.startOffset)}if(i){i.collapse(!0);const t=this.sel;t&&(t.removeAllRanges(),t.addRange(i))}else if(void 0!==this.doc.body.createTextRange){const i=this.doc.body.createTextRange();i.moveToPoint(t,e);const o=i.duplicate();o.moveToPoint(t,e),i.setEndPoint("EndToEnd",o),i.select()}return!0}catch(t){}return!1}removeMarkers(){zt("span[data-"+U+"]",this.area).forEach(me.safeRemove)}marker(t=!1,e){let i=null;e&&(i=e.cloneRange(),i.collapse(t));const o=this.jodit.create.inside.span();return o.id=U+"_"+ +new Date+"_"+(""+Math.random()).slice(2),o.style.lineHeight="0",o.style.display="none",o.setAttribute("data-"+U,t?"start":"end"),o.appendChild(this.jodit.create.inside.text(l)),i&&me.isOrContains(this.area,t?i.startContainer:i.endContainer)&&i.insertNode(o),o}restore(t=[]){if(Array.isArray(t)){const e=this.sel;e&&e.removeAllRanges(),t.forEach(t=>{const i=this.createRange(),o=this.area.querySelector("#"+t.endId),s=this.area.querySelector("#"+t.startId);if(s){if(t.collapsed||!o){const t=s.previousSibling;t&&t.nodeType===Node.TEXT_NODE?i.setStart(t,t.nodeValue?t.nodeValue.length:0):i.setStartBefore(s),me.safeRemove(s),i.collapse(!0)}else i.setStartAfter(s),me.safeRemove(s),i.setEndBefore(o),me.safeRemove(o);e&&e.addRange(i)}})}}save(){const t=this.sel;if(!t||!t.rangeCount)return[];const e=[],i=t.rangeCount,o=[];let s,n,r;for(s=0;i>s;s+=1)o[s]=t.getRangeAt(s),o[s].collapsed?(n=this.marker(!0,o[s]),e[s]={startId:n.id,collapsed:!0,startMarker:n.outerHTML}):(n=this.marker(!0,o[s]),r=this.marker(!1,o[s]),e[s]={startId:n.id,endId:r.id,collapsed:!1,startMarker:n.outerHTML,endMarker:r.outerHTML});for(t.removeAllRanges(),s=i-1;s>=0;--s){const i=this.doc.getElementById(e[s].startId);if(i)if(e[s].collapsed)o[s].setStartAfter(i),o[s].collapse(!0);else if(o[s].setStartBefore(i),e[s].endId){const t=this.doc.getElementById(e[s].endId);t&&o[s].setEndAfter(t)}try{t.addRange(o[s].cloneRange())}catch(t){}}return e}isCollapsed(){const t=this.sel;for(let e=0;t&&t.rangeCount>e;e+=1)if(!t.getRangeAt(e).collapsed)return!1;return!0}isFocused(){return this.doc.hasFocus&&this.doc.hasFocus()&&this.area===this.doc.activeElement}current(t=!0){if(this.jodit.getRealMode()===H){const e=this.sel;if(e&&e.rangeCount>0){const i=e.getRangeAt(0);let o=i.startContainer,s=!1;const n=t=>s?t.lastChild:t.firstChild;if(o.nodeType!==Node.TEXT_NODE){if(o=i.startContainer.childNodes[i.startOffset],o||(o=i.startContainer.childNodes[i.startOffset-1],s=!0),o&&e.isCollapsed&&o.nodeType!==Node.TEXT_NODE)if(!s&&o.previousSibling&&o.previousSibling.nodeType===Node.TEXT_NODE)o=o.previousSibling;else if(t){let t=n(o);for(;t;){if(t&&t.nodeType===Node.TEXT_NODE){o=t;break}t=n(t)}}if(o&&!e.isCollapsed&&o.nodeType!==Node.TEXT_NODE){let t=o,e=o;do{t=t.firstChild,e=e.lastChild}while(t&&e&&t.nodeType!==Node.TEXT_NODE);t===e&&t&&t.nodeType===Node.TEXT_NODE&&(o=t)}}if(o&&me.isOrContains(this.area,o))return o}}return!1}insertNode(t,e=!0,i=!0){this.errorNode(t),this.focus();const o=this.sel;if(this.isCollapsed()||this.jodit.execCommand("Delete"),o&&o.rangeCount){const e=o.getRangeAt(0);me.isOrContains(this.area,e.commonAncestorContainer)?(e.deleteContents(),e.insertNode(t)):this.area.appendChild(t)}else this.area.appendChild(t);e&&this.setCursorAfter(t),i&&this.jodit.events&&this.jodit.events.fire("synchro"),this.jodit.events&&this.jodit.events.fire("afterInsertNode",t)}insertHTML(t){if(""===t)return;const e=this.jodit.create.inside.div(),i=this.jodit.create.inside.fragment();let o,s;if(!this.isFocused()&&this.jodit.isEditorMode()&&this.focus(),me.isNode(t,this.win)?e.appendChild(t):e.innerHTML=""+t,(this.jodit.isEditorMode()||!1!==this.jodit.events.fire("insertHTML",e.innerHTML))&&(o=e.lastChild,o)){for(;e.firstChild;)o=e.firstChild,i.appendChild(e.firstChild);for(this.insertNode(i,!1),o?this.setCursorAfter(o):this.setCursorIn(i),s=this.area.lastChild;s&&s.nodeType===Node.TEXT_NODE&&s.previousSibling&&s.nodeValue&&/^\s*$/.test(s.nodeValue);)s=s.previousSibling;o&&(s&&o===s&&o.nodeType===Node.ELEMENT_NODE&&this.area.appendChild(this.jodit.create.inside.element("br")),this.setCursorAfter(o))}}insertImage(t,e,i){const o="string"==typeof t?this.jodit.create.inside.element("img"):t;if("string"==typeof t&&o.setAttribute("src",t),null!==i){let t=""+i;t&&"auto"!==t&&0>(t+"").indexOf("px")&&0>(t+"").indexOf("%")&&(t+="px"),ne(o,"width",t)}e&&"object"==typeof e&&ne(o,e);const s=()=>{(o.offsetHeight>o.naturalHeight||o.offsetWidth>o.naturalWidth)&&(o.style.width="",o.style.height=""),o.removeEventListener("load",s)};o.addEventListener("load",s),o.complete&&s();const n=this.insertNode(o);return this.jodit.events.fire("afterInsertImage",o),n}setCursorAfter(t){if(this.errorNode(t),!me.up(t,t=>t===this.area||t&&t.parentNode===this.area,this.area))throw Error("Node element must be in editor");const e=this.createRange();let i=!1;return t.nodeType!==Node.TEXT_NODE?(i=this.doc.createTextNode(l),e.setStartAfter(t),e.insertNode(i),e.selectNode(i)):e.setEnd(t,null!==t.nodeValue?t.nodeValue.length:0),e.collapse(!1),this.selectRange(e),i}cursorInTheEdge(t,e){const i=this.sel,o=i&&i.rangeCount?i.getRangeAt(0):null;if(!o)return null;const s=t?o.startContainer:o.endContainer,n=i=>t?me.prev(i,t=>!!t,e):me.next(i,t=>!!t,e),r=t=>{for(;t;)if((t=n(t))&&!me.isEmptyTextNode(t)&&"BR"!==t.nodeName)return!1};if(s.nodeType===Node.TEXT_NODE){const e=s.nodeValue||"";if(t&&o.startOffset>e.length-e.replace(h,"").length)return!1;if(!t&&o.startOffsett===this.area||t&&t.parentNode===this.area,this.area))throw Error("Node element must be in editor");const e=this.createRange();let i=!1;return t.nodeType!==Node.TEXT_NODE?(i=this.doc.createTextNode(l),e.setStartBefore(t),e.collapse(!0),e.insertNode(i),e.selectNode(i)):e.setStart(t,null!==t.nodeValue?t.nodeValue.length:0),e.collapse(!0),this.selectRange(e),i}setCursorIn(t,e=!1){if(this.errorNode(t),!me.up(t,t=>t===this.area||t&&t.parentNode===this.area,this.area))throw Error("Node element must be in editor");const i=this.createRange();let o=t,s=t;do{if(o.nodeType===Node.TEXT_NODE)break;s=o,o=e?o.firstChild:o.lastChild}while(o);if(!o){const t=this.doc.createTextNode(l);/^(img|br|input)$/i.test(s.nodeName)?o=s:(s.appendChild(t),s=t)}return i.selectNodeContents(o||s),i.collapse(e),this.selectRange(i),s}selectRange(t){const e=this.sel;e&&(e.removeAllRanges(),e.addRange(t)),this.jodit.events.fire("changeSelection")}select(t,e=!1){if(this.errorNode(t),!me.up(t,t=>t===this.area||t&&t.parentNode===this.area,this.area))throw Error("Node element must be in editor");const i=this.createRange();i[e?"selectNodeContents":"selectNode"](t),this.selectRange(i)}getHTML(){const t=this.sel;if(t&&t.rangeCount>0){const e=t.getRangeAt(0).cloneContents(),i=this.jodit.create.inside.div();return i.appendChild(e),i.innerHTML}return""}applyCSS(t,e="span",i){let o;const s=t=>null!==t&&!me.isEmptyTextNode(t)&&!this.isMarker(t),n=t=>"FONT"!==t.nodeName&&t.nodeType===Node.ELEMENT_NODE&&(ft(i)&&de(i,(e,i)=>{const o=ne(t,e,void 0,!0);return null!==o&&""!==o&&-1!==i.indexOf((""+o).toLowerCase())})||"function"==typeof i&&i(this.jodit,t)),r=t=>!!t&&(RegExp("^"+t.nodeName+"$","i").test(e)||!(!i||!n(t)))&&s(t),a=e=>{r(e)&&("SPAN"===e.nodeName&&t&&Object.keys(t).forEach(i=>{0===o||ne(e,i)===Yt(i,t[i])?(ne(e,i,""),void 0===o&&(o=0)):(ne(e,i,t[i]),void 0===o&&(o=1))}),me.isBlock(e,this.win)||e.getAttribute("style")&&"SPAN"===e.nodeName||(me.unwrap(e),void 0===o&&(o=0)))};if(this.isCollapsed()){let i=!1;if(this.current()&&me.closest(this.current(),e,this.area)){i=!0;const t=me.closest(this.current(),e,this.area);t&&this.setCursorAfter(t)}if("SPAN"===e.toUpperCase()||!i){const i=this.jodit.create.inside.element(e);i.appendChild(this.jodit.create.inside.text(l)),this.insertNode(i,!1,!1),"SPAN"===e.toUpperCase()&&t&&ne(i,t),this.setCursorIn(i)}}else{const i=this.save();Wt(this.area.firstChild),zt("*[style*=font-size]",this.area).forEach(t=>{t.style&&t.style.fontSize&&t.setAttribute("data-font-size",""+t.style.fontSize)}),this.doc.execCommand("fontsize",!1,"7"),zt("*[data-font-size]",this.area).forEach(t=>{const e=t.getAttribute("data-font-size");t.style&&e&&(t.style.fontSize=e,t.removeAttribute("data-font-size"))}),zt('font[size="7"]',this.area).forEach(i=>{if(me.next(i,s,i.parentNode)||me.prev(i,s,i.parentNode)||!r(i.parentNode)||i.parentNode===this.area||me.isBlock(i.parentNode,this.win)&&!m.test(e))if(i.firstChild&&!me.next(i.firstChild,s,i)&&!me.prev(i.firstChild,s,i)&&r(i.firstChild))a(i.firstChild);else if(me.closest(i,r,this.area)){const t=this.createRange(),e=me.closest(i,r,this.area);t.setStartBefore(e),t.setEndBefore(i);const o=t.extractContents();o.textContent&&Mt(o.textContent).length||!o.firstChild||me.unwrap(o.firstChild),e.parentNode&&e.parentNode.insertBefore(o,e),t.setStartAfter(i),t.setEndAfter(e);const s=t.extractContents();s.textContent&&Mt(s.textContent).length||!s.firstChild||me.unwrap(s.firstChild),me.after(e,s),a(e)}else{const s=[];let n;i.firstChild&&me.find(i.firstChild,t=>(t&&r(t)?(void 0===n&&(n=!0),s.push(t)):void 0===n&&(n=!1),!1),i,!0),s.forEach(me.unwrap),n||(void 0===o&&(o=1),1===o&&ne(me.replace(i,e,!1,!1,this.doc),t&&"SPAN"===e.toUpperCase()?t:{}))}else a(i.parentNode);i.parentNode&&me.unwrap(i)}),this.restore(i)}}}class Se extends Ce{constructor(t,e){super(t),this.target=e,this.container=t.create.div("jodit_statusbar"),e.appendChild(this.container),this.hide()}hide(){this.container&&this.container.classList.add("jodit_hidden")}show(){this.container&&this.container.classList.remove("jodit_hidden")}getHeight(){return this.container.offsetHeight}append(t,e=!1){const i=this.jodit.create.div("jodit_statusbar_item");e&&i.classList.add("jodit_statusbar_item-right"),i.appendChild(t),this.container.appendChild(i),this.show(),this.jodit.events.fire("resize")}destruct(){me.safeRemove(this.container),delete this.container,super.destruct()}}const Le=(()=>{let t;return()=>(void 0===t&&(t=(()=>{const t="___Jodit___"+Math.random();try{localStorage.setItem(t,"1");const e="1"===localStorage.getItem(t);return localStorage.removeItem(t),e}catch(t){}return!1})()),t)})();class Ne{constructor(t){this.rootKey=t}set(t,e){try{const i=localStorage.getItem(this.rootKey),o=i?JSON.parse(i):{};o[t]=e,localStorage.setItem(this.rootKey,JSON.stringify(o))}catch(t){}}get(t){try{const e=localStorage.getItem(this.rootKey),i=e?JSON.parse(e):{};return void 0!==i[t]?i[t]:null}catch(t){}}exists(t){return null!==this.get(t)}clear(){try{localStorage.removeItem(this.rootKey)}catch(t){}}}class Me{constructor(){this.data=new Map}set(t,e){this.data.set(t,e)}get(t){return this.data.get(t)}exists(t){return this.data.has(t)}clear(){this.data.clear()}}const Ae="Jodit_";class Ie{constructor(t,e){this.provider=t,this.prefix=Ae,e&&(this.prefix+=e)}set(t,e){this.provider.set(Lt(this.prefix+t),e)}get(t){return this.provider.get(Lt(this.prefix+t))}exists(t){return this.provider.exists(Lt(this.prefix+t))}clear(){return this.provider.clear()}static makeStorage(t=!1,e){let i;return t&&Le()&&(i=new Ne(Ae+e)),i||(i=new Me),new Ie(i,e)}}const De="JoditEventDefaultNamespace";class Re{constructor(){this.__store={}}get(t,e){if(void 0!==this.__store[e])return this.__store[e][t]}indexOf(t,e,i){const o=this.get(t,e);if(o)for(let t=0;o.length>t;t+=1)if(o[t].originalCallback===i)return t;return!1}namespaces(t=!1){const e=Object.keys(this.__store);return t?e.filter(t=>t!==De):e}events(t){return this.__store[t]?Object.keys(this.__store[t]):[]}set(t,e,i,o=!1){void 0===this.__store[e]&&(this.__store[e]={}),void 0===this.__store[e][t]&&(this.__store[e][t]=[]),o?this.__store[e][t].unshift(i):this.__store[e][t].push(i)}clear(){delete this.__store,this.__store={}}}class Be{constructor(t){this.__key="__JoditEventsNativeNamespaces",this.doc=document,this.__stopped=[],this.prepareEvent=t=>{t.cancelBubble||(t.type.match(/^touch/)&&t.changedTouches&&t.changedTouches.length&&["clientX","clientY","pageX","pageY"].forEach(e=>{Object.defineProperty(t,e,{value:t.changedTouches[0][e],configurable:!0,enumerable:!0})}),t.originalEvent||(t.originalEvent=t),"paste"===t.type&&void 0===t.clipboardData&&this.doc.defaultView.clipboardData&&Object.defineProperty(t,"clipboardData",{get:()=>this.doc.defaultView.clipboardData,configurable:!0,enumerable:!0}))},this.current=[],this.isDestructed=!1,t&&(this.doc=t),this.__key+=(new Date).getTime()}eachEvent(t,e){t.split(/[\s,]+/).forEach(t=>{const i=t.split(".");e.call(this,i[0],i[1]||De)})}getStore(t){if(void 0===t[this.__key]){const e=new Re;Object.defineProperty(t,this.__key,{enumerable:!1,configurable:!0,value:e})}return t[this.__key]}clearStore(t){void 0!==t[this.__key]&&delete t[this.__key]}triggerNativeEvent(t,e){const i=this.doc.createEvent("HTMLEvents");"string"==typeof e?i.initEvent(e,!0,!0):(i.initEvent(e.type,e.bubbles,e.cancelable),["screenX","screenY","clientX","clientY","target","srcElement","currentTarget","timeStamp","which","keyCode"].forEach(t=>{Object.defineProperty(i,t,{value:e[t],enumerable:!0})}),Object.defineProperty(i,"originalEvent",{value:e,enumerable:!0})),t.dispatchEvent(i)}removeStop(t){if(t){const e=this.__stopped.indexOf(t);-1!==e&&this.__stopped.splice(e,1)}}isStopped(t){return void 0!==t&&-1!==this.__stopped.indexOf(t)}on(t,e,i,o,s=!1){const n="string"==typeof t?this:t,r="string"==typeof e?e:t;let a=i;void 0===a&&"function"==typeof e&&(a=e);const l=this.getStore(n);if("string"!=typeof r||""===r)throw Error("Need events names");if("function"!=typeof a)throw Error("Need event handler");if(Array.isArray(n))return n.forEach(t=>{this.on(t,r,a,o)}),this;const d="function"==typeof n.addEventListener,c=this;let h=function(t){return a&&a.apply(this,arguments)};return d&&(h=function(t){if(c.prepareEvent(t),a&&!1===a.call(this,t))return t.preventDefault(),t.stopImmediatePropagation(),!1},o&&(h=function(t){c.prepareEvent(t);let e=t.target;for(;e&&e!==this;){if(e.matches(o))return Object.defineProperty(t,"target",{value:e,configurable:!0,enumerable:!0}),a&&!1===a.call(e,t)?(t.preventDefault(),!1):void 0;e=e.parentNode}})),this.eachEvent(r,(t,e)=>{if(""===t)throw Error("Need event name");!1===l.indexOf(t,e,a)&&(l.set(t,e,{event:t,originalCallback:a,syntheticCallback:h},s),d&&n.addEventListener(t,h,!1))}),this}off(t,e,i){const o="string"==typeof t?this:t,s="string"==typeof e?e:t,n=this.getStore(o);let r=i;if("string"!=typeof s||!s)return n.namespaces().forEach(t=>{this.off(o,"."+t)}),this.clearStore(o),this;void 0===r&&"function"==typeof e&&(r=e);const a="function"==typeof o.removeEventListener,l=t=>{a&&o.removeEventListener(t.event,t.syntheticCallback,!1)},d=(t,e)=>{if(""!==t){const i=n.get(t,e);if(i&&i.length)if("function"!=typeof r)i.forEach(l),i.length=0;else{const o=n.indexOf(t,e,r);!1!==o&&(l(i[o]),i.splice(o,1))}}else n.events(e).forEach(t=>{""!==t&&d(t,e)})};return this.eachEvent(s,(t,e)=>{e===De?n.namespaces().forEach(e=>{d(t,e)}):d(t,e)}),this}stopPropagation(t,e){const i="string"==typeof t?this:t,o="string"==typeof t?t:e;if("string"!=typeof o)throw Error("Need event names");const s=this.getStore(i);this.eachEvent(o,(t,e)=>{const o=s.get(t,e);o&&this.__stopped.push(o),e===De&&s.namespaces(!0).forEach(e=>this.stopPropagation(i,t+"."+e))})}fire(t,e,...i){let o,s=void 0;const n="string"==typeof t?this:t,r="string"==typeof t?t:e,a="string"==typeof t?[e,...i]:i,l="function"==typeof n.dispatchEvent;if(!l&&"string"!=typeof r)throw Error("Need events names");const d=this.getStore(n);return"string"!=typeof r&&l?this.triggerNativeEvent(n,e):this.eachEvent(r,(t,e)=>{if(l)this.triggerNativeEvent(n,t);else{const i=d.get(t,e);if(i)try{i.every(e=>!this.isStopped(i)&&(this.current.push(t),o=e.syntheticCallback.apply(n,a),this.current.pop(),void 0!==o&&(s=o),!0))}finally{this.removeStop(i)}e!==De||l||d.namespaces().filter(t=>t!==e).forEach(e=>{const i=this.fire.call(this,n,t+"."+e,...a);void 0!==i&&(s=i)})}}),s}destruct(){this.isDestructed&&(this.isDestructed=!0,this.off(this),this.getStore(this).clear(),delete this[this.__key])}}class He{constructor(t,e){this.doc=t,null!==e&&(this.inside=e?new He(e):new He(t,null))}setDocument(t){this.doc=t}element(t,e,i){const o=this.doc.createElement(t.toLowerCase());return e&&(ft(e)?de(e,(t,e)=>{ft(e)&&"style"===t?ne(o,e):o.setAttribute(t,""+e)}):i=e),i&&et(i).forEach(t=>o.appendChild("string"==typeof t?this.fromHTML(t):t)),o}div(t,e,i){const o=this.element("div",e,i);return t&&(o.className=t),o}span(t,e,i){const o=this.element("span",e,i);return t&&(o.className=t),o}a(t,e,i){const o=this.element("a",e,i);return t&&(o.className=t),o}text(t){return this.doc.createTextNode(t)}fragment(){return this.doc.createDocumentFragment()}fromHTML(t){const e=this.div();e.innerHTML=""+t;const i=e.firstChild===e.lastChild&&e.firstChild?e.firstChild:e;return me.safeRemove(i),i}}class Pe extends Ce{constructor(t){super(t),this.__whoLocked="",this.__isFullSize=!1,this.ownerDocument=document,this.ownerWindow=window,this.isLocked=()=>""!==this.__whoLocked,this.isLockedNotBy=t=>this.isLocked()&&this.__whoLocked!==t,this.isFullSize=()=>this.__isFullSize,t&&t.ownerDocument&&(this.ownerDocument=t.ownerDocument,this.ownerWindow=t.ownerWindow),this.create=new He(this.ownerDocument,xe(t)?t.editorDocument:void 0),this.container=this.create.div()}destruct(){this.isDestructed&&(me.safeRemove(this.container),delete this.container,super.destruct())}lock(t="any"){return!this.isLocked()&&(this.__whoLocked=t,!0)}unlock(){return!!this.isLocked()&&(this.__whoLocked="",!0)}toggleFullSize(t){void 0===t&&(t=!this.__isFullSize),t!==this.__isFullSize&&(this.__isFullSize=t)}}class Oe extends Pe{constructor(t,e){super(t),this.version="3.3.2",this.__modulesInstances={},this.buffer=Ie.makeStorage(),this.progress_bar=this.create.div("jodit_progress_bar",this.create.div()),this.options={removeButtons:[],zIndex:100002,fullsize:!1,showTooltip:!0,useNativeTooltip:!1,buttons:[],globalFullsize:!0},this.components=[],this.getVersion=()=>this.version,this.id=t&&t.id?t.id:""+(new Date).getTime(),this.jodit=t||this,this.events=t&&t.events?t.events:new Be(this.ownerDocument),this.buffer=t&&t.buffer?t.buffer:Ie.makeStorage(),this.options={...this.options,...e}}get defaultTimeout(){return 100}i18n(t,...e){var i;return Rt(t,e,(null===(i=null==this?void 0:this.jodit)||void 0===i?void 0:i.options)||(null==this?void 0:this.options))}toggleFullSize(t){super.toggleFullSize(t),this.events&&this.events.fire("toggleFullSize",t)}getInstance(t,e){if("function"!=typeof Qe.modules[t])throw Error("Need real module name");return void 0===this.__modulesInstances[t]&&(this.__modulesInstances[t]=new Qe.modules[t](this.jodit||this,e)),this.__modulesInstances[t]}destruct(){this.isDestructed||(this.events&&(this.events.destruct(),delete this.events),delete this.options,super.destruct())}}class Fe extends Ce{constructor(t,e="li",i="jodit_toolbar_btn"){t instanceof Ye?(super(t.jodit),this.parentToolbar=t):super(t),this.container=this.jodit.create.element(e),this.container.classList.add(i)}focus(){this.container.focus()}destruct(){this.isDestructed||(me.safeRemove(this.container),this.parentToolbar=void 0,super.destruct())}createIcon(t,e){const i=e?e.icon||e.name:t;if(!this.jodit.options.textIcons){let o,s=this.jodit.events.fire("getIcon",i,e,t);return e&&e.iconURL&&void 0===s?(o=this.jodit.create.element("i"),o.style.backgroundImage="url("+e.iconURL+")"):(void 0===s&&(s=ge.exists(i)?ge.getIcon(i):ge.getIcon("empty")),o="string"==typeof s?this.jodit.create.fromHTML(Mt(s)):s),o.classList.add("jodit_icon","jodit_icon_"+t),o}return this.jodit.create.fromHTML(`${this.jodit.i18n(e?e.name:t)}`)}}class Ve extends Fe{constructor(t){super(t),this.container.classList.add("jodit_toolbar_btn-break")}}class We extends Ce{constructor(t,e,i,o="jodit_toolbar_popup"){super(t),this.target=e,this.current=i,this.className=o,this.throttleCalcPosition=rt(this.calcPosition,this.jodit.defaultTimeout),this.isOpened=!1,this.close=t=>{(this.isOpened||this.isDestructed)&&(t&&me.isOrContains(this.container,t instanceof We?t.target:t)||(this.isOpened=!1,this.jodit.events.off("closeAllPopups",this.close),this.doClose(),me.safeRemove(this.container),this.jodit.events.fire("removeMarkers"),this.jodit.events.fire(this,"afterClose")))},this.container=this.jodit.create.div(o,{"data-editor_id":t.id}),this.jodit.events.on(this.container,"mousedown touchstart touchend",t=>{t.stopPropagation()}).on([this.jodit.ownerWindow,this.jodit.events],"resize",this.throttleCalcPosition).on("afterInsertNode, afterInsertImage",this.close)}calcPosition(){if(!this.isOpened||this.isDestructed)return;const t=this.container,e=Qt(this.jodit.container,this.jodit,this.jodit.ownerDocument,!0),i=Qt(t,this.jodit,this.jodit.ownerDocument,!0),o=ne(t,"marginLeft")||0;i.left-=o;let s=o,n="auto";if(s=e.left>i.left?e.left-i.left:e.left+e.width>i.left+i.width?0:-(i.left+i.width-(e.left+e.width)),e.width>i.width||(s=e.left-i.left,n=e.width),s!==o)try{t.style.setProperty("margin-left",s+"px","important")}catch(e){t.style.marginLeft=s+"px"}const r=t.querySelector(".jodit_popup_triangle");r&&(r.style.marginLeft=-s+"px"),ne(t,"width",n)}doOpen(t){t&&(me.detach(this.container),this.container.innerHTML='',this.container.appendChild(me.isNode(t,this.jodit.ownerWindow)?t:this.jodit.create.fromHTML(""+t)),this.container.style.display="block",this.container.style.removeProperty("marginLeft"))}doClose(){}open(t,e,i=!1){Qe.fireEach("beforeOpenPopup closeAllPopups",this,t),i||this.jodit.events.on("closeAllPopups",this.close),this.container.classList.add(this.className+"-open"),this.doOpen(t),this.target.appendChild(this.container),this.jodit.options.textIcons&&this.firstInFocus(),void 0!==e&&this.container.classList.toggle("jodit_right",e),!i&&this.container.parentNode&&this.jodit.events.fire(this.container.parentNode,"afterOpenPopup",this.container),this.isOpened=!0,!i&&this.calcPosition()}firstInFocus(){}destruct(){this.isDestructed||(this.jodit.events.off([this.jodit.ownerWindow,this.jodit.events],"resize",this.throttleCalcPosition),me.safeRemove(this.container),delete this.container,super.destruct())}}class $e extends We{constructor(t,e,i,o="jodit_toolbar_list"){super(t,e,i,o),this.target=e,this.current=i,this.className=o,this.defaultControl={template:(t,e,i)=>this.jodit.i18n(i)}}doClose(){this.toolbar&&(this.toolbar.destruct(),delete this.toolbar)}doOpen(t){this.toolbar=Ge.makeCollection(this.jodit),de("string"==typeof t.list?t.list.split(/[\s,]+/):t.list,(e,i)=>{let o,s=this.jodit.options.controls,n=t=>s&&s[t];"string"==typeof i&&n(i)?o=new Ke(this.toolbar,{name:""+i,...n(i)},this.current):"string"==typeof e&&n(e)&&"object"==typeof i?o=new Ke(this.toolbar,{name:""+e,...n(e),...i},this.current):(o=new Ke(this.toolbar,{name:""+e,exec:t.exec,command:t.command,isActive:t.isActiveChild,isDisable:t.isDisableChild,mode:t.mode,args:[t.args&&t.args[0]||e,t.args&&t.args[1]||i]},this.current),o.textBox.innerHTML=(t.template||this.defaultControl.template)(this.jodit,""+e,""+i)),this.toolbar.appendChild(o)}),this.container.appendChild(this.toolbar.container),this.container.style.removeProperty("marginLeft"),this.toolbar.checkActiveButtons()}firstInFocus(){this.toolbar.firstButton.focus()}destruct(){this.isDestructed||(this.doClose(),super.destruct())}}class Ue extends Fe{constructor(t){super(t.parentToolbar||t.jodit,"div","jodit_tooltip"),this.button=t,this.timeout=0,this.show=()=>{const t=this.button.jodit.options.showTooltipDelay||10*this.button.jodit.defaultTimeout;this.button.jodit.events.fire("hideTooltip"),this.timeout=st(()=>{this.button.container.appendChild(this.container),this.container.style.marginLeft=-(this.container.offsetWidth-this.button.container.offsetWidth)/2+"px"},t)},this.hide=()=>{window.clearTimeout(this.timeout),me.safeRemove(this.container)},t.control.tooltip&&(this.container.innerHTML=t.tooltipText,t.jodit.events.on(t.anchor,"mouseenter",this.show).on(t.anchor,"mouseleave",this.hide).on("change updateToolbar scroll hidePopup closeAllPopups hideTooltip",this.hide))}destruct(){return this.hide(),this.jodit&&this.jodit.events&&this.jodit.events.off("change updateToolbar scroll hidePopup closeAllPopups hideTooltip",this.hide),super.destruct()}}class Ke extends Fe{constructor(t,e,i){super(t),this.__disabled=!1,this.__actived=!1,this.onMouseDown=t=>{if("keydown"===t.type&&t.which!==_)return;if(t.stopImmediatePropagation(),t.preventDefault(),this.disable)return!1;const e=this.control,i=()=>this.parentToolbar&&this.parentToolbar.getTarget(this)||this.target||!1;if(e.list){const t=new $e(this.jodit,this.container,this.target);t.open(e),this.jodit.events.fire("closeAllPopups",t.container),this.anchor.setAttribute("aria-expanded","true"),this.jodit.events.on(t,"afterClose",()=>{this.anchor.setAttribute("aria-expanded","false")})}else if(void 0!==e.exec&&"function"==typeof e.exec)e.exec(this.jodit,i(),e,t,this.container),this.jodit.events.fire("synchro"),this.parentToolbar&&this.parentToolbar.immediateCheckActiveButtons(),this.jodit.events.fire("closeAllPopups afterExec");else if(void 0!==e.popup&&"function"==typeof e.popup){const t=new We(this.jodit,this.container,this.target);if(!1!==this.jodit.events.fire(Lt(`before-${e.name}-OpenPopup`),i(),e,t)){const o=e.popup(this.jodit,i(),e,t.close,this);o&&t.open(o)}this.jodit.events.fire(Lt(`after-${e.name}-OpenPopup`)+" closeAllPopups",t.container)}else(e.command||e.name)&&(xe(this.jodit)?this.jodit.execCommand(e.command||e.name,e.args&&e.args[0]||!1,e.args&&e.args[1]||null):this.jodit.ownerDocument.execCommand(e.command||e.name,e.args&&e.args[0]||!1,e.args&&e.args[1]||null),this.jodit.events.fire("closeAllPopups"))},this.control=e,this.target=i,this.anchor=this.jodit.create.element("a",{role:"button",href:"javascript:void(0)"});let o="-1";this.jodit.options.allowTabNavigation&&(o="0"),this.anchor.setAttribute("tabindex",o),this.container.appendChild(this.anchor),this.jodit.options.showTooltip&&e.tooltip&&(this.jodit.options.useNativeTooltip?this.anchor.setAttribute("title",this.tooltipText):this.tooltip=new Ue(this),this.anchor.setAttribute("aria-label",this.tooltipText)),this.textBox=this.jodit.create.span(),this.anchor.appendChild(this.textBox);const s=e.name.replace(/[^a-zA-Z0-9]/g,"_");if(e.getContent&&"function"==typeof e.getContent){me.detach(this.container);const t=e.getContent(this.jodit,e,this);this.container.appendChild("string"==typeof t?this.jodit.create.fromHTML(t):t)}else{if(e.list&&this.anchor){const t=this.jodit.create.fromHTML(ge.getIcon("dropdown-arrow"));t.classList.add("jodit_with_dropdownlist-trigger"),this.container.classList.add("jodit_with_dropdownlist"),this.anchor.appendChild(t)}this.textBox.appendChild(this.createIcon(s,e))}if(this.container.classList.add("jodit_toolbar_btn-"+s),this.jodit.options.direction){const t=this.jodit.options.direction.toLowerCase();this.container.style.direction="rtl"===t?"rtl":"ltr"}e.isInput?this.container.classList.add("jodit_toolbar-input"):this.jodit.events.on(this.container,"mousedown touchend keydown",this.onMouseDown).on(`click-${s}-btn`,this.onMouseDown)}set disable(t){this.__disabled=t,this.container.classList.toggle("jodit_disabled",t),t?this.container.hasAttribute("disabled")||this.container.setAttribute("disabled","disabled"):this.container.hasAttribute("disabled")&&this.container.removeAttribute("disabled")}get disable(){return this.__disabled}set active(t){this.__actived=t,this.container.classList.toggle("jodit_active",t)}get active(){return this.__actived}isDisable(){return!(!this.parentToolbar||!this.parentToolbar.buttonIsDisabled(this))}isActive(){return!(!this.parentToolbar||!this.parentToolbar.buttonIsActive(this))}get tooltipText(){return this.control.tooltip?this.jodit.i18n(this.control.tooltip)+(this.control.hotkeys?"
"+et(this.control.hotkeys).join(" "):""):""}focus(){this.anchor.focus()}destruct(){this.isDestructed||(this.jodit&&this.jodit.events&&this.jodit.events.off(this.container),super.destruct(),this.tooltip&&(this.tooltip.destruct(),delete this.tooltip))}}class Xe extends Fe{constructor(t){super(t),this.container.classList.add("jodit_toolbar_btn-separator")}}class Ye extends Ce{constructor(t){super(t),this.__buttons=[],this.__getControlType=t=>{let e;const i=this.jodit.options.controls||we.defaultOptions.controls;if("string"!=typeof t)e={name:"empty",...t},void 0!==i[e.name]&&(e={...i[e.name],...e});else{const o=t.split(/\./);let s=i;o.length>1&&void 0!==i[o[0]]&&(s=i[o[0]],t=o[1]),e=void 0!==s[t]?{name:t,...s[t]}:{name:t,command:t,tooltip:t}}return e},this.closeAll=()=>{this.jodit&&this.jodit.events&&this.jodit.events.fire("closeAllPopups")},this.initEvents=()=>{this.jodit.events.on(this.jodit.ownerWindow,"mousedown touchend",this.closeAll).on(this.listenEvents,this.checkActiveButtons).on("afterSetMode focus",this.immediateCheckActiveButtons)},this.listenEvents="changeStack mousedown mouseup keydown change afterInit readonly afterResize selectionchange changeSelection focus afterSetMode touchstart focus blur",this.immediateCheckActiveButtons=()=>{this.isDestructed||this.jodit.isLocked()||(this.__buttons.filter(t=>t instanceof Ke).forEach(t=>{t.disable=t.isDisable(),t.disable||(t.active=t.isActive()),"function"==typeof t.control.getLabel&&t.control.getLabel(this.jodit,t.control,t)}),this.jodit.events&&this.jodit.events.fire("updateToolbar"))},this.checkActiveButtons=nt(this.immediateCheckActiveButtons,this.jodit.defaultTimeout),this.container=this.jodit.create.element("ul"),this.container.classList.add("jodit_toolbar"),this.initEvents()}getButtonsList(){return this.__buttons.map(t=>t instanceof Ke?t.control.name:"").filter(t=>""!==t)}getParentContainer(){return this.__parentContainer}appendChild(t){this.__buttons.push(t),this.container.appendChild(t.container)}get firstButton(){return this.__buttons[0]}removeChild(t){const e=this.__buttons.indexOf(t);-1!==e&&(this.__buttons.splice(e,1),t.container.parentNode===this.container&&me.safeRemove(t.container))}build(t,e,i){this.__parentContainer=e;let o=!1;this.clear(),("string"==typeof t?t.split(/[,\s]+/):t).map(this.__getControlType).forEach(t=>{let e=null;if(-1===this.jodit.options.removeButtons.indexOf(t.name)){switch(t.name){case"\n":e=new Ve(this);break;case"|":o||(o=!0,e=new Xe(this));break;default:o=!1,e=new Ke(this,t,i)}e&&this.appendChild(e)}}),this.container.parentNode!==e&&e.appendChild(this.container),this.immediateCheckActiveButtons()}clear(){[...this.__buttons].forEach(t=>{this.removeChild(t),t.destruct()}),this.__buttons.length=0}buttonIsActive(t){return!(xe(this.jodit)&&!this.jodit.editorIsActive)&&("function"==typeof t.control.isActive?t.control.isActive(this.jodit,t.control,t):void 0)}buttonIsDisabled(t){if(this.jodit.options.disabled)return!0;if(this.jodit.options.readonly&&(!this.jodit.options.activeButtonsInReadOnly||-1===this.jodit.options.activeButtonsInReadOnly.indexOf(t.control.name)))return!0;let e;return"function"==typeof t.control.isDisable&&(e=t.control.isDisable(this.jodit,t.control,t)),e}getTarget(t){return t.target}setDirection(t){this.container.style.direction=t,this.container.setAttribute("dir",t)}destruct(){this.isDestructed||(this.jodit.events.off(this.jodit.ownerWindow,"mousedown touchstart",this.closeAll).off(this.listenEvents,this.checkActiveButtons).off("afterSetMode focus",this.immediateCheckActiveButtons),this.clear(),me.safeRemove(this.container),delete this.container,super.destruct())}}class Ge extends Ye{constructor(){super(...arguments),this.checkActiveStatus=(t,e)=>{let i=0,o=0;return Object.keys(t).forEach(s=>{const n=t[s];"function"==typeof n?n(this.jodit,""+ne(e,s))&&(i+=1):-1!==n.indexOf(""+ne(e,s))&&(i+=1),o+=1}),o===i}}buttonIsActive(t){const e=super.buttonIsActive(t);if(void 0!==e)return e;const i=!!this.jodit.selection&&this.jodit.selection.current();if(!i)return!1;let o,s,n;return!(!(t.control.tags||t.control.options&&t.control.options.tags)||(o=t.control.tags||t.control.options&&t.control.options.tags,s=i,!me.up(s,t=>{if(t&&-1!==o.indexOf(t.nodeName.toLowerCase()))return!0},this.jodit.editor)))||!(!(t.control.css||t.control.options&&t.control.options.css)||(n=t.control.css||t.control.options&&t.control.options.css,s=i,!me.up(s,t=>{if(t&&t.nodeType!==Node.TEXT_NODE)return this.checkActiveStatus(n,t)},this.jodit.editor)))}buttonIsDisabled(t){const e=super.buttonIsDisabled(t);if(void 0!==e)return e;const i=void 0===t.control||void 0===t.control.mode?H:t.control.mode;return!(i===O||i===this.jodit.getRealMode())}getTarget(t){return t.target||this.jodit.selection.current()||void 0}static makeCollection(t){const e=xe(t)?new Ge(t):new Ye(t);return t.options.textIcons&&e.container.classList.add("jodit_text_icons"),e}}class Je extends Oe{constructor(){super(...arguments),this.toolbar=Ge.makeCollection(this)}destruct(){this.toolbar.destruct(),delete this.toolbar,super.destruct()}}const Ze=10;class Qe extends Je{constructor(t,e){super(),this.__defaultStyleDisplayKey="data-jodit-default-style-display",this.__defaultClassesKey="data-jodit-default-classes",this.commands={},this.__selectionLocked=null,this.__wasReadOnly=!1,this.storage=Ie.makeStorage(!0,this.id),this.editorIsActive=!1,this.iframe=null,this.__plugins={},this.mode=H,this.__callChangeCount=0,this.isInited=!1,this.options=new ke(e),this.editorDocument=this.options.ownerDocument,this.editorWindow=this.options.ownerWindow,this.ownerDocument=this.options.ownerDocument,this.ownerWindow=this.options.ownerWindow,this.element=this.resolveElement(t),this.element.attributes&&Array.from(this.element.attributes).forEach(t=>{const i=t.name;let o=t.value;void 0===Qe.defaultOptions[i]||e&&void 0!==e[i]||(-1!==["readonly","disabled"].indexOf(i)&&(o=""===o||"true"===o),/^[0-9]+(\.)?([0-9]+)?$/.test(""+o)&&(o=Number(o)),this.options[i]=o)}),this.options.events&&Object.keys(this.options.events).forEach(t=>{this.events.on(t,this.options.events[t])}),this.container.classList.add("jodit_container"),this.container.setAttribute("contenteditable","false"),this.selection=new qe(this),this.events.on("removeMarkers",()=>{this.selection&&this.selection.removeMarkers()}),this.observer=new ze(this);let i=null;this.options.inline&&(-1===["TEXTAREA","INPUT"].indexOf(this.element.nodeName)&&(this.container=this.element,this.element.setAttribute(this.__defaultClassesKey,""+this.element.className),i=this.container.innerHTML,this.container.innerHTML=""),this.container.classList.add("jodit_inline"),this.container.classList.add("jodit_container")),this.element!==this.container&&(this.element.style.display&&this.element.setAttribute(this.__defaultStyleDisplayKey,this.element.style.display),this.element.style.display="none"),this.applyOptionsToToolbarContainer(this.container),this.workplace=this.create.div("jodit_workplace",{contenteditable:!1}),this.makeToolbar(),this.options.textIcons&&this.container.classList.add("jodit_text_icons"),this.events.on(this.ownerWindow,"resize",()=>{this.events&&this.events.fire("resize")}),this.container.appendChild(this.workplace),this.statusbar=new Se(this,this.container),this.workplace.appendChild(this.progress_bar),this.element.parentNode&&this.element!==this.container&&this.element.parentNode.insertBefore(this.container,this.element),this.id=this.element.getAttribute("id")||""+(new Date).getTime(),this.editor=this.create.div("jodit_wysiwyg",{contenteditable:!0,"aria-disabled":!1,tabindex:this.options.tabIndex}),this.workplace.appendChild(this.editor),this.setNativeEditorValue(this.getElementValue()),(async()=>{await this.beforeInitHook(),await this.events.fire("beforeInit",this);try{this.__initPlugines()}catch(t){}if(await this.__initEditor(i),this.isDestructed)return;const t=this.options;t.enableDragAndDropFileToEditor&&t.uploader&&(t.uploader.url||t.uploader.insertImageAsBase64URI)&&this.uploader.bind(this.editor),this.isInited=!0,this.events&&(await this.events.fire("afterInit",this),this.events.fire("afterConstructor",this)),await this.afterInitHook()})()}get isJodit(){return!0}get value(){return this.getEditorValue()}set value(t){this.setEditorValue(t)}get defaultTimeout(){return this.options&&this.options.observer?this.options.observer.timeout:Qe.defaultOptions.observer.timeout}static Array(t){return new lt(t)}static Object(t){return new at(t)}static fireEach(t,...e){Object.keys(Qe.instances).forEach(i=>{const o=Qe.instances[i];!o.isDestructed&&o.events&&o.events.fire(t,...e)})}static make(t,e){return new Qe(t,e)}get uploader(){return this.getInstance("Uploader")}get filebrowser(){return this.getInstance("FileBrowser")}getElementValue(){return void 0!==this.element.value?this.element.value:this.element.innerHTML}getNativeEditorValue(){return this.editor?this.editor.innerHTML:this.getElementValue()}setNativeEditorValue(t){this.editor&&(this.editor.innerHTML=t)}getEditorValue(t=!0){let e;if(e=this.events.fire("beforeGetValueFromEditor"),void 0!==e)return e;e=this.getNativeEditorValue().replace(d,""),t&&(e=e.replace(/]+id="jodit_selection_marker_[^>]+><\/span>/g,"")),"
"===e&&(e="");const i={value:e};return this.events.fire("afterGetValueFromEditor",i),i.value}getEditorText(){if(this.editor)return this.editor.textContent||"";const t=this.create.inside.div();return t.innerHTML=this.getElementValue(),t.textContent||""}setElementValue(t){if("string"!=typeof t&&void 0!==t)throw Error("value must be string");void 0!==t?this.element!==this.container&&(void 0!==this.element.value?this.element.value=t:this.element.innerHTML=t):t=this.getElementValue(),t!==this.getEditorValue()&&this.setEditorValue(t)}setEditorValue(t){const e=this.events.fire("beforeSetValueToEditor",t);if(!1===e)return;if("string"==typeof e&&(t=e),!this.editor)return void(void 0!==t&&this.setElementValue(t));if("string"!=typeof t&&void 0!==t)throw Error("value must be string");void 0!==t&&this.editor.innerHTML!==t&&this.setNativeEditorValue(t);const i=this.getElementValue(),o=this.getEditorValue();if(i!==o&&Ze>this.__callChangeCount){this.setElementValue(o),this.__callChangeCount+=1;try{this.events.fire("change",o,i)}finally{this.__callChangeCount=0}}}registerCommand(t,e){const i=t.toLowerCase();if(void 0===this.commands[i]&&(this.commands[i]=[]),this.commands[i].push(e),"function"!=typeof e){const o=this.options.commandToHotkeys[i]||this.options.commandToHotkeys[t]||e.hotkeys;o&&this.registerHotkeyToCommand(o,i)}return this}registerHotkeyToCommand(t,e){const i=et(t).map(Ft).map(t=>t+".hotkey").join(" ");this.events.off(i).on(i,()=>this.execCommand(e))}execCommand(t,e=!1,i=null){if(this.options.readonly&&"selectall"!==t)return;let o;if(t=t.toLowerCase(),o=this.events.fire("beforeCommand",t,e,i),!1!==o&&(o=this.execCustomCommands(t,e,i)),!1!==o)if(this.selection.focus(),"selectall"===t)this.selection.select(this.editor,!0);else try{o=this.editorDocument.execCommand(t,e,i)}catch(t){}return this.events.fire("afterCommand",t,e,i),this.setEditorValue(),o}execCustomCommands(t,e=!1,i=null){if(t=t.toLowerCase(),void 0!==this.commands[t]){let o;const s=s=>{let n;n="function"==typeof s?s:s.exec;const r=n.call(this,t,e,i);void 0!==r&&(o=r)};for(let e=0;this.commands[t].length>e;e+=1)s(this.commands[t][e]);return o}}lock(t="any"){return!!super.lock(t)&&(this.__selectionLocked=this.selection.save(),this.editor.classList.add("jodit_disabled"),!0)}unlock(){return!!super.unlock()&&(this.editor.classList.remove("jodit_disabled"),this.__selectionLocked&&this.selection.restore(this.__selectionLocked),!0)}getMode(){return this.mode}isEditorMode(){return this.getRealMode()===H}getRealMode(){if(this.getMode()!==O)return this.getMode();const t=this.ownerDocument.activeElement;return t&&(me.isOrContains(this.editor,t)||me.isOrContains(this.toolbar.container,t))?H:P}setMode(t){const e=this.getMode(),i={mode:parseInt(""+t,10)},o=["jodit_wysiwyg_mode","jodit_source_mode","jodit_split_mode"];!1!==this.events.fire("beforeSetMode",i)&&(this.mode=it(i.mode,[P,H,O])?i.mode:H,this.options.saveModeInStorage&&this.storage.set("jodit_default_mode",this.mode),o.forEach(t=>{this.container.classList.remove(t)}),this.container.classList.add(o[this.mode-1]),e!==this.getMode()&&this.events.fire("afterSetMode"))}toggleMode(){let t=this.getMode();it(t+1,[P,H,this.options.useSplitMode?O:9])?t+=1:t=H,this.setMode(t)}setDisabled(t){this.options.disabled=t;const e=this.__wasReadOnly;this.setReadOnly(t||e),this.__wasReadOnly=e,this.editor&&(this.editor.setAttribute("aria-disabled",""+t),this.container.classList.toggle("jodit_disabled",t),this.events.fire("disabled",t))}getDisabled(){return this.options.disabled}setReadOnly(t){this.__wasReadOnly!==t&&(this.__wasReadOnly=t,this.options.readonly=t,t?this.editor&&this.editor.removeAttribute("contenteditable"):this.editor&&this.editor.setAttribute("contenteditable","true"),this.events&&this.events.fire("readonly",t))}getReadOnly(){return this.options.readonly}beforeInitHook(){}afterInitHook(){}resolveElement(t){let e=t;if("string"==typeof t)try{e=this.ownerDocument.querySelector(t)}catch(e){throw Error('String "'+t+'" should be valid HTML selector')}if(!e||"object"!=typeof e||e.nodeType!==Node.ELEMENT_NODE||!e.cloneNode)throw Error('Element "'+t+'" should be string or HTMLElement instance');return e}makeToolbar(){if(!this.options.toolbar)return;let t=this.create.div("jodit_toolbar_container");this.container.appendChild(t),(this.options.toolbar instanceof HTMLElement||"string"==typeof this.options.toolbar)&&(t=this.resolveElement(this.options.toolbar)),this.applyOptionsToToolbarContainer(t),this.toolbar.build(ot(this.options.buttons).concat(this.options.extraButtons),t);const e=this.options.toolbarButtonSize.toLowerCase();t.classList.add("jodit_toolbar_size-"+(-1!==["middle","large","small"].indexOf(e)?e:"middle"))}applyOptionsToToolbarContainer(t){t.classList.add("jodit_"+(this.options.theme||"default")+"_theme"),this.options.zIndex&&(t.style.zIndex=""+parseInt(""+this.options.zIndex,10))}__initPlugines(){const t=this.options.disablePlugins,e=Array.isArray(t)?t.map(t=>t.toLowerCase()):t.toLowerCase().split(/[\s,]+/);Object.keys(Qe.plugins).forEach(t=>{-1===e.indexOf(t.toLowerCase())&&(this.__plugins[t]=new Qe.plugins[t](this))})}async __initEditor(t){if(await this.__createEditor(),this.isDestructed)return;this.element!==this.container?this.setElementValue():null!==t&&this.setEditorValue(t),Qe.instances[this.id]=this;let e=this.options.defaultMode;if(this.options.saveModeInStorage){const t=this.storage.get("jodit_default_mode");"string"==typeof t&&(e=parseInt(t,10))}this.setMode(e),this.options.readonly&&this.setReadOnly(!0),this.options.disabled&&this.setDisabled(!0);try{this.editorDocument.execCommand("defaultParagraphSeparator",!1,this.options.enter.toLowerCase())}catch(t){}try{this.editorDocument.execCommand("enableObjectResizing",!1,"false")}catch(t){}try{this.editorDocument.execCommand("enableInlineTableEditing",!1,"false")}catch(t){}}async __createEditor(){const t=this.editor,e=await this.events.fire("createEditor",this);if(!this.isDestructed){if(!1===e&&me.safeRemove(t),this.options.editorCssClass&&this.editor.classList.add(this.options.editorCssClass),this.options.style&&ne(this.editor,this.options.style),this.events.on("synchro",()=>{this.setEditorValue()}).on("focus",()=>this.editorIsActive=!0).on("blur",()=>this.editorIsActive=!1).on(this.editor,"selectionchange selectionstart keydown keyup keypress mousedown mouseup mousepress click copy cut dragstart drop dragover paste resize touchstart touchend focus blur",t=>{if(!this.options.readonly&&this.events&&this.events.fire){if(!1===this.events.fire(t.type,t))return!1;this.setEditorValue()}}),this.options.spellcheck&&this.editor.setAttribute("spellcheck","true"),this.options.direction){const t="rtl"===this.options.direction.toLowerCase()?"rtl":"ltr";this.editor.style.direction=t,this.container.style.direction=t,this.editor.setAttribute("dir",t),this.container.setAttribute("dir",t),this.toolbar.setDirection(t)}this.options.triggerChangeEvent&&this.events.on("change",nt(()=>{this.events&&this.events.fire(this.element,"change")},this.defaultTimeout))}}destruct(){if(this.isDestructed)return;if(!1===this.events.fire("beforeDestruct"))return;if(!this.editor)return;const t=this.getEditorValue();if(this.element!==this.container)if(this.element.hasAttribute(this.__defaultStyleDisplayKey)){const t=this.element.getAttribute(this.__defaultStyleDisplayKey);t&&(this.element.style.display=t,this.element.removeAttribute(this.__defaultStyleDisplayKey))}else this.element.style.display="";else this.element.hasAttribute(this.__defaultClassesKey)&&(this.element.className=this.element.getAttribute(this.__defaultClassesKey)||"",this.element.removeAttribute(this.__defaultClassesKey));this.element.hasAttribute("style")&&!this.element.getAttribute("style")&&this.element.removeAttribute("style"),Object.keys(this.__plugins).forEach(t=>{const e=this.__plugins[t];void 0!==e&&void 0!==e.destruct&&"function"==typeof e.destruct&&e.destruct(),delete this.__plugins[t]}),this.observer.destruct(),this.statusbar.destruct(),delete this.observer,delete this.statusbar,delete this.storage,this.buffer.clear(),delete this.buffer,this.components.forEach(t=>{void 0===t.destruct||"function"!=typeof t.destruct||t.isDestructed||t.destruct()}),this.components.length=0,this.commands={},delete this.selection,this.__selectionLocked=null,this.events.off(this.ownerWindow),this.events.off(this.ownerDocument),this.events.off(this.ownerDocument.body),this.events.off(this.element),this.events.off(this.editor),me.safeRemove(this.workplace),me.safeRemove(this.editor),me.safeRemove(this.progress_bar),me.safeRemove(this.iframe),this.container!==this.element&&me.safeRemove(this.container),delete this.workplace,delete this.editor,delete this.progress_bar,delete this.iframe,this.container===this.element&&(this.element.innerHTML=t),delete Qe.instances[this.id],super.destruct(),delete this.container}}Qe.plugins={},Qe.modules={},Qe.instances={},Qe.lang={};var ti=i(79),ei=i.n(ti),ii=i(80),oi=i.n(ii),si=i(81),ni=i.n(si),ri=i(82),ai=i.n(ri),li=i(83),di=i.n(li),ci=i(84),hi=i.n(ci),pi=i(85),ui=i.n(pi),fi=i(86),mi=i.n(fi),gi=i(87),vi=i.n(gi),bi=i(88),yi=i.n(bi),_i=i(89),wi=i.n(_i),ki=i(90),xi=i.n(ki),Ci=i(91),ji=i.n(Ci),Ti=i(92),Ei=i.n(Ti),zi=i(93),qi=i.n(zi),Si=i(0),Li=i.n(Si);const Ni={ar:ei.a,de:ni.a,cs_cz:oi.a,en:Li.a,es:ai.a,fr:di.a,he:hi.a,hu:ui.a,id:mi.a,it:vi.a,nl:yi.a,pt_br:wi.a,ru:xi.a,tr:ji.a,zh_cn:Ei.a,zh_tw:qi.a},Mi=t=>t.default||t,Ai={};Array.isArray(Mi(Li.a))&&Mi(Li.a).forEach((t,e)=>{Ai[e]=t}),Object.keys(Ni).forEach(t=>{const e=Mi(Ni[t]);Array.isArray(e)&&(Ni[t]={},e.forEach((e,i)=>{Ni[t][Ai[i]]=e}))});var Ii=Ni;we.prototype.defaultAjaxOptions={dataType:"json",method:"GET",url:"",data:null,contentType:"application/x-www-form-urlencoded; charset=UTF-8",headers:{"X-REQUESTED-WITH":"XMLHttpRequest"},withCredentials:!1,xhr:()=>new XMLHttpRequest};class Di{constructor(t,e){this.success_response_codes=[200,201,202],this.jodit=t,this.options=mt(!0,{},we.prototype.defaultAjaxOptions,e),this.options.xhr&&(this.xhr=this.options.xhr()),t&&t.events&&t.events.on("beforeDestruct",()=>{this.abort()})}__buildParams(t,e){return this.options.queryBuild&&"function"==typeof this.options.queryBuild?this.options.queryBuild.call(this,t,e):"string"==typeof t||this.jodit.ownerWindow.FormData&&t instanceof this.jodit.ownerWindow.FormData?t:he(t)}abort(){try{this.xhr.abort()}catch(t){}return this}send(){return new Promise((t,e)=>{const i=t=>{let e=null;if("json"===this.options.dataType&&(e=JSON.parse(t)),!e)throw Error("No JSON format");return e};this.xhr.onabort=()=>{e(Error(this.xhr.statusText))},this.xhr.onerror=()=>{e(Error(this.xhr.statusText))},this.xhr.ontimeout=()=>{e(Error(this.xhr.statusText))},this.xhr.onload=()=>{this.response=this.xhr.responseText,this.status=this.xhr.status,t.call(this.xhr,i(this.response)||{})},this.xhr.onreadystatechange=()=>{if(this.xhr.readyState===XMLHttpRequest.DONE){const o=this.xhr.responseText;this.response=o,this.status=this.xhr.status,this.success_response_codes.indexOf(this.xhr.status)>-1?t.call(this.xhr,i(o)):e.call(this.xhr,Error(this.xhr.statusText||this.jodit.i18n("Connection error!")))}},this.xhr.withCredentials=this.options.withCredentials||!1;const{url:o,data:s,method:n}=this.prepareRequest();this.xhr.open(n,o,!0),this.options.contentType&&this.xhr.setRequestHeader&&this.xhr.setRequestHeader("Content-type",this.options.contentType),this.options.headers&&this.xhr.setRequestHeader&&de(this.options.headers,(t,e)=>{this.xhr.setRequestHeader(t,e)}),setTimeout(()=>{this.xhr.send(s?this.__buildParams(s):void 0)},0)})}prepareRequest(){if(!this.options.url)throw Error("Need URL for AJAX request");let t=this.options.url;const e=this.options.data,i=(this.options.method||"get").toLowerCase();if("get"===i&&e&&ft(e)){const i=t.indexOf("?");if(-1!==i){const o=oe(t);t=t.substr(0,i)+"?"+he({...o,...e})}else t+="?"+he(this.options.data)}const o={url:t,method:i,data:e};return Di.log.splice(100),Di.log.push(o),o}}Di.log=[];class Ri extends Ce{constructor(t){super(t),this.hide=()=>{this.context.classList.remove("jodit_context_menu-show"),this.jodit.ownerWindow.removeEventListener("mouseup",this.hide)},this.context=t.create.div("jodit_context_menu",{"data-editor_id":this.jodit.id}),t.ownerDocument.body.appendChild(this.context)}show(t,e,i,o){const s=this;Array.isArray(i)&&(o&&(this.context.style.zIndex=""+o),this.context.innerHTML="",i.forEach(t=>{if(!t)return;const e=s.jodit.i18n(t.title||""),i=this.jodit.create.fromHTML(``+(t.icon?ge.getIcon(t.icon):"")+""),o=i.querySelector("span");i.addEventListener("click",e=>(t.exec&&t.exec.call(s,e),s.hide(),!1)),o.textContent=e,s.context.appendChild(i)}),ne(s.context,{left:t,top:e}),this.jodit.events.on(this.jodit.ownerWindow,"mouseup jodit_close_dialog",s.hide),this.context.classList.add("jodit_context_menu-show"))}destruct(){me.safeRemove(this.context),delete this.context,this.jodit.events.off(this.jodit.ownerWindow,"mouseup",this.hide),super.destruct()}}we.prototype.dialog={resizable:!0,draggable:!0,buttons:["dialog.close"],removeButtons:[]},we.prototype.controls.dialog={close:{icon:"cancel",exec(t){t.close()}},fullsize:{icon:"fullsize",getLabel(t,e,i){if(we.prototype.controls.fullsize&&we.prototype.controls.fullsize.getLabel&&"function"==typeof we.prototype.controls.fullsize.getLabel)return we.prototype.controls.fullsize.getLabel(t,e,i)},exec(t){t.toggleFullSize()}}};class Bi extends Oe{constructor(t,e=we.prototype.dialog){super(t,e),this.destination=document.body,this.destroyAfterClose=!1,this.moved=!1,this.iSetMaximization=!1,this.resizable=!1,this.draggable=!1,this.startX=0,this.startY=0,this.startPoint={x:0,y:0,w:0,h:0},this.lockSelect=()=>{this.container.classList.add("jodit_dialog_box-moved")},this.unlockSelect=()=>{this.container.classList.remove("jodit_dialog_box-moved")},this.onMouseUp=()=>{(this.draggable||this.resizable)&&(this.draggable=!1,this.resizable=!1,this.unlockSelect(),this.jodit&&this.jodit.events&&this.jodit.events.fire(this,"endResize endMove"))},this.onHeaderMouseDown=t=>{const e=t.target;!this.options.draggable||e&&e.nodeName.match(/^(INPUT|SELECT)$/)||(this.draggable=!0,this.startX=t.clientX,this.startY=t.clientY,this.startPoint.x=ne(this.dialog,"left"),this.startPoint.y=ne(this.dialog,"top"),this.setMaxZIndex(),t.preventDefault(),this.lockSelect(),this.jodit&&this.jodit.events&&this.jodit.events.fire(this,"startMove"))},this.onMouseMove=t=>{this.draggable&&this.options.draggable&&(this.setPosition(this.startPoint.x+t.clientX-this.startX,this.startPoint.y+t.clientY-this.startY),this.jodit&&this.jodit.events&&this.jodit.events.fire(this,"move",t.clientX-this.startX,t.clientY-this.startY),t.stopImmediatePropagation(),t.preventDefault()),this.resizable&&this.options.resizable&&(this.setSize(this.startPoint.w+t.clientX-this.startX,this.startPoint.h+t.clientY-this.startY),this.jodit&&this.jodit.events&&this.jodit.events.fire(this,"resizeDialog",t.clientX-this.startX,t.clientY-this.startY),t.stopImmediatePropagation(),t.preventDefault())},this.onKeyDown=t=>{if(this.isOpened()&&t.which===w){const e=this.getMaxZIndexDialog();e?e.close():this.close(),t.stopImmediatePropagation()}},this.onResize=()=>{this.options&&this.options.resizable&&!this.moved&&this.isOpened()&&!this.offsetX&&!this.offsetY&&this.setPosition()},this.document=document,this.window=window,this.close=t=>{this.isDestructed||(t&&(t.stopImmediatePropagation(),t.preventDefault()),this.jodit&&this.jodit.events&&this.jodit.events.fire("beforeClose",this),this.container&&this.container.classList&&this.container.classList.remove("active"),this.iSetMaximization&&this.maximization(!1),this.destroyAfterClose&&this.destruct(),this.jodit&&this.jodit.events&&(this.jodit.events.fire(this,"afterClose"),this.jodit.events.fire(this.ownerWindow,"jodit_close_dialog")))},xe(t)&&(this.window=t.ownerWindow,this.document=t.ownerDocument,t.events.on("beforeDestruct",()=>{this.destruct()})),this.options={...t&&t.options?t.options.dialog:we.prototype.dialog,...this.options},this.container=this.create.fromHTML('
'+(this.options.resizable?'
':"")+"
"),t&&t.id&&this.container.setAttribute("data-editor_id",t.id),Object.defineProperty(this.container,"__jodit_dialog",{value:this}),this.dialog=this.container.querySelector(".jodit_dialog"),this.resizer=this.container.querySelector(".jodit_dialog_resizer"),this.jodit&&this.jodit.options&&this.jodit.options.textIcons&&this.container.classList.add("jodit_text_icons"),this.dialogbox_header=this.container.querySelector(".jodit_dialog_header>.jodit_dialog_header-title"),this.dialogbox_content=this.container.querySelector(".jodit_dialog_content"),this.dialogbox_footer=this.container.querySelector(".jodit_dialog_footer"),this.dialogbox_toolbar=this.container.querySelector(".jodit_dialog_header>.jodit_dialog_header-toolbar"),this.destination.appendChild(this.container),this.container.addEventListener("close_dialog",this.close),this.toolbar=Ge.makeCollection(this),this.toolbar.build(this.options.buttons,this.dialogbox_toolbar),this.events.on(this.window,"mousemove",this.onMouseMove).on(this.window,"mouseup",this.onMouseUp).on(this.window,"keydown",this.onKeyDown).on(this.window,"resize",this.onResize);const i=this.container.querySelector(".jodit_dialog_header");i&&i.addEventListener("mousedown",this.onHeaderMouseDown.bind(this)),this.options.resizable&&this.resizer.addEventListener("mousedown",this.onResizerMouseDown.bind(this)),Qe.plugins.fullsize(this)}setElements(t,e){const i=[];et(e).forEach(e=>{const o="string"==typeof e?this.create.fromHTML(e):e;i.push(o),o.parentNode!==t&&t.appendChild(o)}),Array.from(t.childNodes).forEach(e=>{-1===i.indexOf(e)&&t.removeChild(e)})}onResizerMouseDown(t){this.resizable=!0,this.startX=t.clientX,this.startY=t.clientY,this.startPoint.w=this.dialog.offsetWidth,this.startPoint.h=this.dialog.offsetHeight,this.lockSelect(),this.jodit.events&&this.jodit.events.fire(this,"startResize")}setSize(t,e){t&&ne(this.dialog,"width",t),e&&ne(this.dialog,"height",e)}setPosition(t,e){let i=this.window.innerWidth/2-this.dialog.offsetWidth/2,o=this.window.innerHeight/2-this.dialog.offsetHeight/2;0>i&&(i=0),0>o&&(o=0),void 0!==t&&void 0!==e&&(this.offsetX=t,this.offsetY=e,this.moved=Math.abs(t-i)>100||Math.abs(e-o)>100),this.dialog.style.left=(t||i)+"px",this.dialog.style.top=(e||o)+"px"}setTitle(t){this.setElements(this.dialogbox_header,t)}setContent(t){this.setElements(this.dialogbox_content,t)}setFooter(t){this.setElements(this.dialogbox_footer,t),this.dialog.classList.toggle("with_footer",!!t)}getZIndex(){return parseInt(this.container.style.zIndex||"0",10)}getMaxZIndexDialog(){let t,e,i=0,o=this;return zt(".jodit_dialog_box",this.destination).forEach(s=>{t=s.__jodit_dialog,e=parseInt(ne(s,"zIndex"),10),t.isOpened()&&!isNaN(e)&&e>i&&(o=t,i=e)}),o}setMaxZIndex(){let t=0,e=0;zt(".jodit_dialog_box",this.destination).forEach(i=>{e=parseInt(ne(i,"zIndex"),10),t=Math.max(isNaN(e)?0:e,t)}),this.container.style.zIndex=""+(t+1)}maximization(t){return"boolean"!=typeof t&&(t=!this.container.classList.contains("jodit_dialog_box-fullsize")),this.container.classList.toggle("jodit_dialog_box-fullsize",t),[this.destination,this.destination.parentNode].forEach(e=>{e&&e.classList&&e.classList.toggle("jodit_fullsize_box",t)}),this.iSetMaximization=t,t}open(t,e,i,o){this.jodit&&this.jodit.events&&!1===this.jodit.events.fire(this,"beforeOpen")||(this.destroyAfterClose=!0===i,void 0!==e&&this.setTitle(e),t&&this.setContent(t),this.container.classList.add("active"),o&&this.container.classList.add("jodit_modal"),this.setPosition(this.offsetX,this.offsetY),this.setMaxZIndex(),this.options.fullsize&&this.maximization(!0),this.jodit&&this.jodit.events&&this.jodit.events.fire("afterOpen",this))}isOpened(){return!this.isDestructed&&this.container&&this.container.classList.contains("active")}destruct(){this.isDestructed||(this.toolbar&&(this.toolbar.destruct(),delete this.toolbar),this.events&&this.events.off(this.window,"mousemove",this.onMouseMove).off(this.window,"mouseup",this.onMouseUp).off(this.window,"keydown",this.onKeyDown).off(this.window,"resize",this.onResize),!this.jodit&&this.events&&(this.events.destruct(),delete this.events),this.container&&(me.safeRemove(this.container),delete this.container),super.destruct())}}const Hi=(t,e,i,o="jodit_alert")=>{"function"==typeof e&&(i=e,e=void 0);const s=new Bi,n=s.create.div(o),r=s.create.fromHTML(''+ge.getIcon("cancel")+""+Qe.prototype.i18n("Ok")+"");return et(t).forEach(t=>{n.appendChild(me.isNode(t,s.window)?t:s.create.fromHTML(t))}),r.addEventListener("click",()=>{i&&"function"==typeof i&&!1===i(s)||s.close()}),s.setFooter([r]),s.open(n,e||" ",!0,!0),r.focus(),s},Pi=(t,e,i,o,s)=>{const n=new Bi,r=n.create.fromHTML(''+ge.getIcon("cancel")+""+Qe.prototype.i18n("Cancel")+""),a=n.create.fromHTML(''+ge.getIcon("check")+""+Qe.prototype.i18n("Ok")+""),l=n.create.element("form",{class:"jodit_promt"}),d=n.create.element("input",{autofocus:!0,class:"jodit_input"}),c=n.create.element("label");"function"==typeof e&&(i=e,e=void 0),o&&d.setAttribute("placeholder",o),c.appendChild(n.create.text(t)),l.appendChild(c),l.appendChild(d),r.addEventListener("click",n.close,!1);const h=()=>{i&&"function"==typeof i&&!1===i(d.value)||n.close()};return a.addEventListener("click",h),l.addEventListener("submit",()=>(h(),!1)),n.setFooter([a,r]),n.open(l,e||" ",!0,!0),d.focus(),void 0!==s&&s.length&&(d.value=s,d.select()),n},Oi=(t,e,i)=>{const o=new Bi,s=o.create.fromHTML('
'),n=o.create.element("label");"function"==typeof e&&(i=e,e=void 0),n.appendChild(o.create.fromHTML(t)),s.appendChild(n);const r=o.create.fromHTML(''+ge.getIcon("cancel")+""+Qe.prototype.i18n("Cancel")+"");r.addEventListener("click",()=>{i&&i(!1),o.close()});const a=()=>{i&&i(!0),o.close()},l=o.create.fromHTML(''+ge.getIcon("check")+""+Qe.prototype.i18n("Yes")+"");return l.addEventListener("click",a),s.addEventListener("submit",()=>(a(),!1)),o.setFooter([l,r]),o.open(s,e||" ",!0,!0),l.focus(),o};class Fi extends Ce{constructor(t){super(t),this.destruct=()=>{this.isDestructed||(this.jodit.events&&this.jodit.events.off("beforeDestruct",this.destruct),this.beforeDestruct(this.jodit),super.destruct())},t.events.on("afterInit",this.afterInit.bind(this,t)).on("beforeDestruct",this.destruct)}}const Vi="jodit_filebrowser",Wi=Vi+"_files_item",$i='';we.prototype.filebrowser={filter:(t,e)=>(e=e.toLowerCase(),"string"==typeof t?-1!==t.toLowerCase().indexOf(e):"string"==typeof t.name?-1!==t.name.toLowerCase().indexOf(e):"string"!=typeof t.file||-1!==t.file.toLowerCase().indexOf(e)),sortBy:"changed-desc",sort(t,e,i){const[o,s]=i.toLowerCase().split("-"),n="asc"===s,r=(t,e)=>e>t?n?-1:1:t>e?n?1:-1:0;if("string"==typeof t)return r(t.toLowerCase(),e.toLowerCase());if(void 0===t[o]||"name"===o)return"string"==typeof t.name?r(t.name.toLowerCase(),e.name.toLowerCase()):"string"==typeof t.file?r(t.file.toLowerCase(),e.file.toLowerCase()):0;switch(o){case"changed":{const i=new Date(t.changed).getTime(),o=new Date(e.changed).getTime();return n?i-o:o-i}case"size":{const i=ce(t.size),o=ce(e.size);return n?i-o:o-i}}return 0},editImage:!0,preview:!0,showPreviewNavigation:!0,showSelectButtonInPreview:!0,contextMenu:!0,howLongShowMsg:3e3,createNewFolder:!0,deleteFolder:!0,moveFolder:!0,moveFile:!0,showFoldersPanel:!0,width:859,height:400,buttons:["filebrowser.upload","filebrowser.remove","filebrowser.update","filebrowser.select","filebrowser.edit","|","filebrowser.tiles","filebrowser.list","|","filebrowser.filter","|","filebrowser.sort"],removeButtons:[],fullsize:!1,showTooltip:!0,view:null,isSuccess:t=>t.success,getMessage:t=>void 0!==t.data.messages&&Array.isArray(t.data.messages)?t.data.messages.join(" "):"",showFileName:!0,showFileSize:!0,showFileChangeTime:!0,saveStateInStorage:!0,getThumbTemplate(t,e,i){const o=this.options,s=o.showFileName,n=o.showFileSize&&t.size,r=o.showFileChangeTime&&t.time;let a,l="";return void 0!==t.file&&(l=t.file),a=`
`+(s?`${l}`:"")+(n?`${t.size}`:"")+(r?`${r}`:"")+"
","'+(s||n||r?a:"")+""},ajax:{url:"",async:!0,data:{},cache:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",method:"POST",processData:!0,dataType:"json",headers:{},prepareData:t=>t,process:t=>t},create:{data:{action:"folderCreate"}},getLocalFileByUrl:{data:{action:"getLocalFileByUrl"}},resize:{data:{action:"imageResize"}},crop:{data:{action:"imageCrop"}},fileMove:{data:{action:"fileMove"}},folderMove:{data:{action:"folderMove"}},fileRename:{data:{action:"fileRename"}},folderRename:{data:{action:"folderRename"}},fileRemove:{data:{action:"fileRemove"}},folderRemove:{data:{action:"folderRemove"}},items:{data:{action:"files"}},folder:{data:{action:"folders"}},permissions:{data:{action:"permissions"}},uploader:null},we.prototype.controls.filebrowser={upload:{icon:"plus",isInput:!0,exec(){},isDisable:t=>!t.dataProvider.canI("FileUpload"),getContent(t,e){const i=t.create.fromHTML(''+ge.getIcon("plus")+''),o=i.querySelector("input");return t.events.on("updateToolbar",()=>{e&&e.isDisable&&(e.isDisable(t,e)?o.setAttribute("disabled","disabled"):o.removeAttribute("disabled"))}).fire("bindUploader.filebrowser",i),i}},remove:{icon:"bin",isDisable:t=>!t.state.activeElements.length||!t.dataProvider.canI("FileRemove"),exec(t){t.events.fire("fileRemove.filebrowser")}},update:{exec(t){t.events.fire("update.filebrowser")}},select:{icon:"check",isDisable:t=>!t.state.activeElements.length,exec(t){t.events.fire("select.filebrowser")}},edit:{icon:"pencil",isDisable(t){const e=t.state.activeElements;return 1!==e.length||!e[0].isImage||!(t.dataProvider.canI("ImageCrop")||t.dataProvider.canI("ImageResize"))},exec(t){t.events.fire("edit.filebrowser")}},tiles:{icon:"th",isActive:t=>"tiles"===t.state.view,exec(t){t.events.fire("view.filebrowser","tiles")}},list:{icon:"th-list",isActive:t=>"list"===t.state.view,exec(t){t.events.fire("view.filebrowser","list")}},filter:{isInput:!0,getContent(t){const e=t.create.element("input",{class:"jodit_input",placeholder:t.i18n("Filter")});return t.events.on(e,"keydown mousedown",nt(()=>{t.events.fire("filter.filebrowser",e.value)},t.defaultTimeout)),e}},sort:{isInput:!0,getContent(t){const e=t.create.fromHTML('");return t.events.on("sort.filebrowser",t=>{e.value!==t&&(e.value=t)}).on(e,"change",()=>{t.events.fire("sort.filebrowser",e.value)}),e}}};const Ui="default";class Ki{constructor(t,e){this.options=t,this.parent=e,this.__currentPermissions=null,this.currentPath="",this.currentSource=Ui,this.currentBaseUrl="",this.getPathByUrl=(t,e,i)=>(this.options.getLocalFileByUrl.data.url=t,this.get("getLocalFileByUrl",t=>{this.options.isSuccess(t)?e(t.data.path,t.data.name,t.data.source):i(Error(this.options.getMessage(t)))},i))}canI(t){const e="allow"+t;return null===this.__currentPermissions||void 0===this.__currentPermissions[e]||this.__currentPermissions[e]}get(t,e,i){const o=mt(!0,{},this.options.ajax,void 0!==this.options[t]?this.options[t]:this.options.ajax);o.prepareData&&(o.data=o.prepareData.call(this,o.data));const s=new Di(this.parent,o).send();return e&&s.then(e),i&&s.catch(i),s}async permissions(t=this.currentPath,e=this.currentSource){return this.options.permissions?(this.options.permissions.data.path=t,this.options.permissions.data.source=e,this.options.permissions.url?this.get("permissions").then(t=>{let e=this.options.permissions.process;if(e||(e=this.options.ajax.process),e){const i=e.call(self,t);i.data.permissions&&(this.__currentPermissions=i.data.permissions)}}):Promise.resolve()):Promise.resolve()}async items(t=this.currentPath,e=this.currentSource){const i=this.options;return i.items?(i.items.data.path=t,i.items.data.source=e,this.get("items")):Promise.reject("Set Items api options")}async tree(t=this.currentPath,e=this.currentSource){return t=Ut(t),await this.permissions(t,e),this.options.folder?(this.options.folder.data.path=t,this.options.folder.data.source=e,this.get("folder")):Promise.reject("Set Folder Api options")}createFolder(t,e,i){return this.options.create?(this.options.create.data.source=i,this.options.create.data.path=e,this.options.create.data.name=t,this.get("create").then(t=>(this.currentPath=e,this.currentSource=i,t))):Promise.reject("Set Create api options")}move(t,e,i,o){const s=o?"fileMove":"folderMove",n=this.options[s];return n?(n.data.from=t,n.data.path=e,n.data.source=i,this.get(s)):Promise.reject("Set Move api options")}fileRemove(t,e,i){return this.options.fileRemove?(this.options.fileRemove.data.path=t,this.options.fileRemove.data.name=e,this.options.fileRemove.data.source=i,this.get("fileRemove")):Promise.reject("Set fileRemove api options")}folderRemove(t,e,i){return this.options.folderRemove?(this.options.folderRemove.data.path=t,this.options.folderRemove.data.name=e,this.options.folderRemove.data.source=i,this.get("folderRemove")):Promise.reject("Set folderRemove api options")}folderRename(t,e,i,o){return this.options.folderRename?(this.options.folderRename.data.path=t,this.options.folderRename.data.name=e,this.options.folderRename.data.newname=i,this.options.folderRename.data.source=o,this.get("folderRename")):Promise.reject("Set folderRename api options")}fileRename(t,e,i,o){return this.options.fileRename?(this.options.fileRename.data.path=t,this.options.fileRename.data.name=e,this.options.fileRename.data.newname=i,this.options.fileRename.data.source=o,this.get("fileRename")):Promise.reject("Set fileRename api options")}crop(t,e,i,o,s){return this.options.crop||(this.options.crop={data:{}}),void 0===this.options.crop.data&&(this.options.crop.data={action:"crop"}),this.options.crop.data.newname=o||i,s&&(this.options.crop.data.box=s),this.options.crop.data.path=t,this.options.crop.data.name=i,this.options.crop.data.source=e,this.get("crop")}resize(t,e,i,o,s){return this.options.resize||(this.options.resize={data:{}}),void 0===this.options.resize.data&&(this.options.resize.data={action:"resize"}),this.options.resize.data.newname=o||i,s&&(this.options.resize.data.box=s),this.options.resize.data.path=t,this.options.resize.data.name=i,this.options.resize.data.source=e,this.get("resize")}}const Xi=Vi+"_preview_",Yi=(t="next",e="right")=>``+""+ge.getIcon("angle-"+e)+"";var Gi=t=>{if(!t.options.contextMenu)return()=>{};const e=new Ri(t.jodit||t);return function(i){let o=this,s=t.options,n=t=>o.getAttribute(t)||"";return st(()=>{e.show(i.pageX,i.pageY,[!("1"===n("data-is-file")||!s.editImage||!t.dataProvider.canI("ImageResize")&&!t.dataProvider.canI("ImageCrop"))&&{icon:"pencil",title:"Edit",exec(){t.openImageEditor(n("href"),n("data-name"),n("data-path"),n("data-source"))}},!!t.dataProvider.canI("FileRename")&&{icon:"italic",title:"Rename",async exec(){t.events.fire("fileRename.filebrowser",n("data-name"),n("data-path"),n("data-source"))}},!!t.dataProvider.canI("FileRemove")&&{icon:"bin",title:"Delete",async exec(){await t.deleteFile(n("data-name"),n("data-source")),t.state.activeElements=[],t.loadTree()}},!!s.preview&&{icon:"eye",title:"Preview",exec(){var e,i;const r=new Bi(t),a=t.create.div(Vi+"_preview",$i),l=t.create.div(Vi+"_preview_box"),d=t.create.fromHTML(Yi()),c=t.create.fromHTML(Yi("prev","left")),h=e=>{const i=t.create.element("img");i.setAttribute("src",e);const n=()=>{var e,h;i.removeEventListener("load",n),a.innerHTML="",s.showPreviewNavigation&&(me.prevWithClass(o,Wi)&&a.appendChild(c),me.nextWithClass(o,Wi)&&a.appendChild(d)),a.appendChild(l),l.appendChild(i),r.setPosition(),null===(h=null===(e=t)||void 0===e?void 0:e.events)||void 0===h||h.fire("previewOpenedAndLoaded")};i.addEventListener("load",n),i.complete&&n()};h(n("href")),t.events.on([d,c],"click",(function(){if(o=this.classList.contains(Xi+"navigation-next")?me.nextWithClass(o,Wi):me.prevWithClass(o,Wi),!o)throw Error("Need element");me.detach(a),me.detach(l),a.innerHTML=$i,h(n("href"))})),r.setContent(a),r.setPosition(),r.open(),null===(i=null===(e=t)||void 0===e?void 0:e.events)||void 0===i||i.fire("previewOpened")}},{icon:"upload",title:"Download",exec(){const e=n("href");e&&t.ownerWindow.open(e)}}],t.dialog.getZIndex()+1)},t.defaultTimeout),i.stopPropagation(),i.preventDefault(),!1}};class Ji{constructor(t){this.data=t,this.__onEvents={},this.__lockEvent={},Object.keys(t).forEach(e=>{Object.defineProperty(this,e,{set:i=>{this.fire(["beforeChange",`beforeChange.${e}`],e,i),t[e]=i,this.fire(["change",`change.${e}`],e,i)},get:()=>t[e]})})}on(t,e){return Array.isArray(t)?(t.map(t=>this.on(t,e)),this):(this.__onEvents[t]||(this.__onEvents[t]=[]),this.__onEvents[t].push(e),this)}fire(t,...e){if(Array.isArray(t))t.map(t=>this.fire(t,...e));else try{!this.__lockEvent[t]&&this.__onEvents[t]&&(this.__lockEvent[t]=!0,this.__onEvents[t].forEach(t=>t.call(this,...e)))}catch(t){}finally{this.__lockEvent[t]=!1}}static create(t){return new Ji(t)}}class Zi{constructor(t){this.data=t,mt(this,t)}static create(t){return new Zi(t)}get path(){return $t(this.data.source.path?this.data.source.path+"/":"/")}get imageURL(){const t=""+(new Date).getTime(),{thumbIsAbsolute:e,source:i,thumb:o,file:s}=this.data,n=o||s;return e&&n?n:Xt(i.baseurl,i.path,n||"")+"?_tmst="+t}get fileURL(){let{name:t,file:e,fileIsAbsolute:i,source:o}=this.data;return void 0!==e&&(t=e),i&&t?t:Xt(o.baseurl,o.path,t||"")}get time(){const{changed:t}=this.data;return t&&("number"==typeof t?new Date(t).toLocaleString():t)||""}get uniqueHashKey(){const t=this.data;let e=[t.sourceName,t.name,t.file,this.time,t.thumb].join("_");return e=e.toLowerCase().replace(/[^0-9a-z\-.]/g,"-"),e}}const Qi=t=>!!t.length&&!/[^0-9A-Za-zа-яА-ЯЁё\w\-_\.]/.test(t),to="default",eo=Wi+"-active-true";class io extends Je{constructor(t,e){super(t,e),this.loader=this.create.div(Vi+"_loader",$i),this.browser=this.create.div(Vi+" non-selected"),this.status_line=this.create.div(Vi+"_status"),this.tree=this.create.div(Vi+"_tree"),this.files=this.create.div(Vi+"_files"),this.state=Ji.create({activeElements:[],elements:[],folders:[],view:"tiles",sortBy:"changed-desc",filterWord:"",onlyImages:!1}),this.errorHandler=t=>{this.status(t instanceof Error?this.i18n(t.message):this.options.getMessage(t))},this.status=(t,e)=>{"string"!=typeof t&&(t=t.message),clearTimeout(this.statusTimer),this.status_line.classList.remove("success"),this.status_line.classList.add("active");const i=this.create.div();i.textContent=t,this.status_line.appendChild(i),e&&this.status_line.classList.add("success"),this.statusTimer=st(()=>{this.status_line.classList.remove("active"),me.detach(this.status_line)},this.options.howLongShowMsg)},this.close=()=>{this.dialog.close()},this.open=(t,e=!1)=>(this.state.onlyImages=e,new Promise((e,i)=>{if(!this.options.items||!this.options.items.url)throw Error("Need set options.filebrowser.ajax.url");let o=0;this.events.off(this.files,"dblclick").on(this.files,"dblclick",this.onSelect(t),"a").on(this.files,"touchstart",()=>{const e=(new Date).getTime();K>e-o&&this.onSelect(t)(),o=e},"a").off("select.filebrowser").on("select.filebrowser",this.onSelect(t));const s=this.create.div();this.toolbar.build(this.options.buttons,s),this.dialog.dialogbox_header.classList.add(Vi+"_title_box"),this.dialog.open(this.browser,s),this.events.fire("sort.filebrowser",this.state.sortBy),this.loadTree().then(e,i)})),this.openImageEditor=(t,e,i,o,s,n)=>this.getInstance("ImageEditor").open(t,(t,r,a,l)=>{let d;d="resize"===r.action?this.dataProvider.resize(i,o,e,t,r.box):this.dataProvider.crop(i,o,e,t,r.box),d.then(t=>{this.options.isSuccess(t)?this.loadTree().then(()=>{a(),s&&s()}):(l(Error(this.options.getMessage(t))),n&&n(Error(this.options.getMessage(t))))}).catch(t=>{l(t),n&&n(t)})}),this.elementsMap={};const i=this,o=t?t.ownerDocument:document,s=t?t.editorDocument:o;t&&(this.id=t.id),i.options=new ke(mt(!0,{},i.options,we.defaultOptions.filebrowser,e,t?t.options.filebrowser:void 0)),i.storage=Ie.makeStorage(this.options.filebrowser.saveStateInStorage),i.dataProvider=new Ki(i.options,i.jodit||i),i.dialog=new Bi(t||i,{fullsize:i.options.fullsize,buttons:["dialog.fullsize","dialog.close"]}),i.options.showFoldersPanel&&i.browser.appendChild(i.tree),i.browser.appendChild(i.files),i.browser.appendChild(i.status_line),this.initEventsListeners(),this.initNativeEventsListeners(),i.dialog.setSize(i.options.width,i.options.height),["getLocalFileByUrl","crop","resize","create","fileMove","folderMove","fileRename","folderRename","fileRemove","folderRemove","folder","items","permissions"].forEach(t=>{null!==this.options[t]&&(this.options[t]=mt(!0,{},this.options.ajax,this.options[t]))}),i.stateToView();const n=this.storage.get(Vi+"_view");i.state.view=n&&null===this.options.view?"list"===n?"list":"tiles":"list"===i.options.view?"list":"tiles";const r=i.storage.get(Vi+"_sortby");if(r){const t=r.split("-");i.state.sortBy=["changed","name","size"].includes(t[0])?r:"changed-desc"}else i.state.sortBy=i.options.sortBy||"changed-desc";i.dataProvider.currentBaseUrl=zt("base",s).length?zt("base",s)[0].getAttribute("href")||"":location.protocol+"//"+location.host,i.initUploader(t)}get defaultTimeout(){return this.jodit&&this.jodit!==this?this.jodit.defaultTimeout:we.defaultOptions.observer.timeout}async loadItems(t=this.dataProvider.currentPath,e=this.dataProvider.currentSource){return this.files.classList.add("active"),this.files.appendChild(this.loader.cloneNode(!0)),this.dataProvider.items(t,e).then(t=>{let e=this.options.items.process;if(e||(e=this.options.ajax.process),e){const i=e.call(self,t);this.generateItemsList(i.data.sources),this.state.activeElements=[]}}).catch(t=>{Hi(t.message),this.errorHandler(t)})}async loadTree(){const t=this.dataProvider.currentPath,e=this.dataProvider.currentSource,i=t=>{throw t instanceof Error?t:Error(t)};if(this.uploader&&(this.uploader.setPath(t),this.uploader.setSource(e)),this.tree.classList.add("active"),me.detach(this.tree),this.tree.appendChild(this.loader.cloneNode(!0)),this.options.showFoldersPanel){const o=this.dataProvider.tree(t,e).then(t=>{let e=this.options.folder.process;if(e||(e=this.options.ajax.process),e){const i=e.call(self,t);this.generateFolderTree(i.data.sources)}}).catch(t=>{this.errorHandler(Error(this.jodit.i18n("Error on load folders"))),i(t)}),s=this.loadItems(t,e);return Promise.all([o,s]).catch(i)}this.tree.classList.remove("active")}async deleteFile(t,e){return this.dataProvider.fileRemove(this.dataProvider.currentPath,t,e).then(e=>{if(this.options.remove&&this.options.remove.process&&(e=this.options.remove.process.call(this,e)),!this.options.isSuccess(e))throw Error(this.options.getMessage(e));this.status(this.options.getMessage(e)||this.i18n('File "%s" was deleted',t),!0)}).catch(this.status)}generateFolderTree(t){const e=[];de(t,(t,i)=>{i.folders.forEach(o=>{e.push({name:o,source:i,sourceName:t})})}),this.state.folders=e}generateItemsList(t){const e=[],i=this.state,o=t=>!this.state.onlyImages||void 0===t.isImage||t.isImage,s=t=>!i.filterWord.length||void 0===this.options.filter||this.options.filter(t,i.filterWord);de(t,(t,n)=>{n.files&&n.files.length&&("function"==typeof this.options.sort&&n.files.sort((t,e)=>this.options.sort(t,e,i.sortBy)),n.files.forEach(i=>{s(i)&&o(i)&&e.push(Zi.create({...i,sourceName:t,source:n}))}))}),this.state.elements=e}onSelect(t){return()=>{if(this.state.activeElements.length){const e=[];this.state.activeElements.forEach(t=>{const i=t.fileURL;i&&e.push(i)}),this.close(),"function"==typeof t&&t({baseurl:"",files:e})}return!1}}isOpened(){return this.dialog.isOpened()&&"none"!==this.browser.style.display}elementToItem(t){const{key:e}=t.dataset,{item:i}=this.elementsMap[e||""];return i}stateToView(){const{state:t,files:e,create:i,options:o}=this,s=t=>{const e=t.uniqueHashKey;if(this.elementsMap[e])return this.elementsMap[e].elm;const s=i.fromHTML(o.getThumbTemplate.call(this,t,t.source,""+t.sourceName));return s.dataset.key=e,this.elementsMap[e]={item:t,elm:s},this.elementsMap[e].elm};t.on("beforeChange.activeElements",()=>{t.activeElements.forEach(t=>{const e=t.uniqueHashKey,{elm:i}=this.elementsMap[e];i&&i.classList.remove(eo)})}).on("change.activeElements",()=>{this.events.fire("changeSelection"),t.activeElements.forEach(t=>{const e=t.uniqueHashKey,{elm:i}=this.elementsMap[e];i&&i.classList.add(eo)})}).on("change.view",()=>{e.classList.remove(Vi+"_files_view-tiles"),e.classList.remove(Vi+"_files_view-list"),e.classList.add(Vi+"_files_view-"+t.view),this.storage.set(Vi+"_view",t.view)}).on("change.sortBy",()=>{this.storage.set(Vi+"_sortby",t.sortBy)}).on("change.elements",nt(()=>{me.detach(e),t.elements.length?t.elements.forEach(t=>{this.files.appendChild(s(t))}):e.appendChild(i.div(Vi+"_no_files",this.i18n("There are no files")))},this.defaultTimeout)).on("change.folders",nt(()=>{me.detach(this.tree);let e=to,s=null;const n=(t,e,n=!1)=>{t&&s&&(t!==s||n)&&o.createNewFolder&&this.dataProvider.canI("FolderCreate")&&(this.tree.appendChild(i.a("jodit_button addfolder",{href:"javascript:void(0)","data-path":$t(t.path+"/"),"data-source":e},ge.getIcon("plus")+" "+this.i18n("Add folder"))),s=t)};t.folders.forEach(t=>{const{name:r,source:a,sourceName:l}=t;l&&l!==e&&(this.tree.appendChild(i.div(Vi+"_source_title",l)),e=l);const d=i.a(Vi+"_tree_item",{draggable:"draggable",href:"javascript:void(0)","data-path":$t(a.path,r+"/"),"data-name":r,"data-source":l,"data-source-path":a.path},i.span(Vi+"_tree_item_title",r));n(a,l),s=a,this.tree.appendChild(d),".."!==r&&"."!==r&&(o.deleteFolder&&this.dataProvider.canI("FolderRename")&&d.appendChild(i.element("i",{class:"jodit_icon_folder jodit_icon_folder_rename",title:this.i18n("Rename")},ge.getIcon("pencil"))),o.deleteFolder&&this.dataProvider.canI("FolderRemove")&&d.appendChild(i.element("i",{class:"jodit_icon_folder jodit_icon_folder_remove",title:this.i18n("Delete")},ge.getIcon("cancel"))))}),n(s,e,!0)},this.defaultTimeout))}initEventsListeners(){const t=this.state,e=this;e.events.on("view.filebrowser",e=>{e!==t.view&&(t.view=e)}).on("sort.filebrowser",i=>{i!==t.sortBy&&(t.sortBy=i,e.loadItems())}).on("filter.filebrowser",i=>{i!==t.filterWord&&(t.filterWord=i,e.loadItems())}).on("fileRemove.filebrowser",()=>{e.state.activeElements.length&&Oi(e.i18n("Are you sure?"),"",t=>{if(t){const t=[];e.state.activeElements.forEach(i=>{t.push(e.deleteFile(i.file||i.name||"",i.sourceName))}),e.state.activeElements=[],Promise.all(t).then(()=>e.loadTree())}})}).on("edit.filebrowser",()=>{if(1===e.state.activeElements.length){const[t]=this.state.activeElements;e.openImageEditor(t.fileURL,t.file||"",t.path,t.sourceName)}}).on("fileRename.filebrowser",(t,i,o)=>{1===e.state.activeElements.length&&Pi(e.i18n("Enter new name"),e.i18n("Rename"),s=>{if(!Qi(s))return e.status(e.i18n("Enter new name")),!1;e.dataProvider.fileRename(i,t,s,o).then(t=>{if(e.options.fileRename&&e.options.fileRename.process&&(t=e.options.fileRename.process.call(e,t)),!e.options.isSuccess(t))throw Error(e.options.getMessage(t));e.state.activeElements=[],e.status(e.options.getMessage(t),!0),e.loadItems()}).catch(e.status)},e.i18n("type name"),t)}).on("update.filebrowser",()=>{e.loadTree()})}initNativeEventsListeners(){let t=!1;const e=this;e.events.on(e.tree,"click",(function(t){const i=this.parentNode,o=i.getAttribute("data-path")||"";return Oi(e.i18n("Are you sure?"),e.i18n("Delete"),t=>{t&&e.dataProvider.folderRemove(o,i.getAttribute("data-name")||"",i.getAttribute("data-source")||"").then(t=>{if(e.options.folderRemove&&e.options.folderRemove.process&&(t=e.options.folderRemove.process.call(e,t)),!e.options.isSuccess(t))throw Error(e.options.getMessage(t));e.state.activeElements=[],e.status(e.options.getMessage(t),!0),e.loadTree()}).catch(e.status)}),t.stopImmediatePropagation(),!1}),"a>.jodit_icon_folder_remove").on(e.tree,"click",(function(t){const i=this.parentNode,o=i.getAttribute("data-name")||"",s=i.getAttribute("data-source-path")||"";return Pi(e.i18n("Enter new name"),e.i18n("Rename"),t=>{if(!Qi(t))return e.status(e.i18n("Enter new name")),!1;e.dataProvider.folderRename(s,i.getAttribute("data-name")||"",t,i.getAttribute("data-source")||"").then(t=>{if(e.options.folderRename&&e.options.folderRename.process&&(t=e.options.folderRename.process.call(e,t)),!e.options.isSuccess(t))throw Error(e.options.getMessage(t));e.state.activeElements=[],e.status(e.options.getMessage(t),!0),e.loadTree()}).catch(e.status)},e.i18n("type name"),o),t.stopImmediatePropagation(),!1}),"a>.jodit_icon_folder_rename").on(e.tree,"click",(function(){this.classList.contains("addfolder")?Pi(e.i18n("Enter Directory name"),e.i18n("Create directory"),t=>{e.dataProvider.createFolder(t,this.getAttribute("data-path")||"",this.getAttribute("data-source")||"").then(t=>(e.options.isSuccess(t)?e.loadTree():e.status(e.options.getMessage(t)),t),e.status)},e.i18n("type name")):(e.dataProvider.currentPath=this.getAttribute("data-path")||"",e.dataProvider.currentSource=this.getAttribute("data-source")||"",e.loadTree())}),"a").on(e.tree,"dragstart",(function(){e.options.moveFolder&&(t=this)}),"a").on(e.tree,"drop",(function(){if((e.options.moveFile||e.options.moveFolder)&&t){let i=t.getAttribute("data-path")||"";if(!e.options.moveFolder&&t.classList.contains(Vi+"_tree_item"))return!1;if(t.classList.contains(Wi)&&(i+=t.getAttribute("data-name"),!e.options.moveFile))return!1;e.dataProvider.move(i,this.getAttribute("data-path")||"",this.getAttribute("data-source")||"",t.classList.contains(Wi)).then(t=>{e.options.isSuccess(t)?e.loadTree():e.status(e.options.getMessage(t))},e.status),t=!1}}),"a").on(e.files,"contextmenu",Gi(e),"a").on(e.files,"click",t=>{ae(t)||(this.state.activeElements=[])}).on(e.files,"click",(function(t){const i=e.elementToItem(this);if(i)return e.state.activeElements=ae(t)?[...e.state.activeElements,i]:[i],t.stopPropagation(),!1}),"a").on(e.files,"dragstart",(function(){e.options.moveFile&&(t=this)}),"a").on(e.dialog.container,"drop",t=>t.preventDefault())}initUploader(t){var e,i;const o=this,s=mt(!0,{},we.defaultOptions.uploader,o.options.uploader,{...null===(i=null===(e=t)||void 0===e?void 0:e.options)||void 0===i?void 0:i.uploader}),n=()=>{this.loadItems()};o.uploader=o.getInstance("Uploader",s),o.uploader.setPath(o.dataProvider.currentPath),o.uploader.setSource(o.dataProvider.currentSource),o.uploader.bind(o.browser,n,o.errorHandler),o.events.on("bindUploader.filebrowser",t=>{o.uploader.bind(t,n,o.errorHandler)})}destruct(){this.dialog.destruct(),delete this.dialog,this.events&&this.events.off(".filebrowser"),this.uploader&&this.uploader.destruct(),delete this.uploader,super.destruct()}}we.prototype.imageeditor={min_width:20,min_height:20,closeAfterSave:!1,width:"85%",height:"85%",crop:!0,resize:!0,resizeUseRatio:!0,resizeMinWidth:20,resizeMinHeight:20,cropUseRatio:!0,cropDefaultWidth:"70%",cropDefaultHeight:"70%"};const oo="jodit_image_editor",so=ge.getIcon;class no extends Ce{constructor(t){super(t),this.resizeUseRatio=!0,this.cropUseRatio=!0,this.clicked=!1,this.activeTab="resize",this.cropBox={x:0,y:0,w:0,h:0},this.resizeBox={w:0,h:0},this.calcValueByPercent=(t,e)=>{const i=""+e,o=parseFloat(""+t);let s;return s=/^[\-+]?[0-9]+(px)?$/.exec(i),s?parseInt(i,10):(s=/^([\-+]?[0-9.]+)%$/.exec(i),s?Math.round(o*(parseFloat(s[1])/100)):o||0)},this.calcCropBox=()=>{const t=.8*this.crop_box.parentNode.offsetWidth,e=.8*this.crop_box.parentNode.offsetHeight;let i=t,o=e;t>this.naturalWidth&&e>this.naturalHeight?(i=this.naturalWidth,o=this.naturalHeight):this.ratio>t/e?(i=t,o=this.naturalHeight*(t/this.naturalWidth)):(i=this.naturalWidth*(e/this.naturalHeight),o=e),ne(this.crop_box,{width:i,height:o})},this.showCrop=()=>{this.cropImage&&(this.calcCropBox(),this.new_w=this.calcValueByPercent(this.cropImage.offsetWidth||this.image.offsetWidth,this.options.cropDefaultWidth),this.new_h=this.cropUseRatio?this.new_w/this.ratio:this.calcValueByPercent(this.cropImage.offsetHeight||this.image.offsetHeight,this.options.cropDefaultHeight),ne(this.cropHandler,{backgroundImage:"url("+this.cropImage.getAttribute("src")+")",width:this.new_w,height:this.new_h,left:(this.cropImage.offsetWidth||this.image.offsetWidth)/2-this.new_w/2,top:(this.cropImage.offsetHeight||this.image.offsetHeight)/2-this.new_h/2}),this.jodit.events.fire(this.cropHandler,"updatesize"))},this.updateCropBox=()=>{if(!this.cropImage)return;const t=this.cropImage.offsetWidth/this.naturalWidth,e=this.cropImage.offsetHeight/this.naturalHeight;this.cropBox.x=ne(this.cropHandler,"left")/t,this.cropBox.y=ne(this.cropHandler,"top")/e,this.cropBox.w=this.cropHandler.offsetWidth/t,this.cropBox.h=this.cropHandler.offsetHeight/e,this.sizes.textContent=this.cropBox.w.toFixed(0)+"x"+this.cropBox.h.toFixed(0)},this.updateResizeBox=()=>{this.resizeBox.w=this.image.offsetWidth||this.naturalWidth,this.resizeBox.h=this.image.offsetHeight||this.naturalHeight},this.setHandlers=()=>{const t=this;t.jodit.events.on([t.editor.querySelector(".jodit_bottomright"),t.cropHandler],`mousedown.${oo}`,e=>{t.target=e.target,e.preventDefault(),e.stopImmediatePropagation(),t.clicked=!0,t.start_x=e.clientX,t.start_y=e.clientY,"crop"===t.activeTab?(t.top_x=ne(t.cropHandler,"left"),t.top_y=ne(t.cropHandler,"top"),t.width=t.cropHandler.offsetWidth,t.height=t.cropHandler.offsetHeight):(t.width=t.image.offsetWidth,t.height=t.image.offsetHeight)}).off(this.jodit.ownerWindow,`.${oo}`+t.jodit.id).on(this.jodit.ownerWindow,`mousemove.${oo}`+t.jodit.id,rt(e=>{t.clicked&&(t.diff_x=e.clientX-t.start_x,t.diff_y=e.clientY-t.start_y,"resize"===t.activeTab&&t.resizeUseRatio||"crop"===t.activeTab&&t.cropUseRatio?t.diff_x?(t.new_w=t.width+t.diff_x,t.new_h=Math.round(t.new_w/t.ratio)):(t.new_h=t.height+t.diff_y,t.new_w=Math.round(t.new_h*t.ratio)):(t.new_w=t.width+t.diff_x,t.new_h=t.height+t.diff_y),"resize"===t.activeTab?(t.new_w>t.options.resizeMinWidth&&(ne(t.image,"width",t.new_w+"px"),t.widthInput.value=""+t.new_w),t.new_h>t.options.resizeMinHeight&&(ne(t.image,"height",t.new_h+"px"),t.heightInput.value=""+t.new_h),this.jodit.events.fire(t.resizeHandler,"updatesize")):(t.target!==t.cropHandler?(t.top_x+t.new_w>t.cropImage.offsetWidth&&(t.new_w=t.cropImage.offsetWidth-t.top_x),t.top_y+t.new_h>t.cropImage.offsetHeight&&(t.new_h=t.cropImage.offsetHeight-t.top_y),ne(t.cropHandler,{width:t.new_w,height:t.new_h})):(t.top_x+t.diff_x+t.cropHandler.offsetWidth>t.cropImage.offsetWidth&&(t.diff_x=t.cropImage.offsetWidth-t.top_x-t.cropHandler.offsetWidth),ne(t.cropHandler,"left",t.top_x+t.diff_x),t.top_y+t.diff_y+t.cropHandler.offsetHeight>t.cropImage.offsetHeight&&(t.diff_y=t.cropImage.offsetHeight-t.top_y-t.cropHandler.offsetHeight),ne(t.cropHandler,"top",t.top_y+t.diff_y)),this.jodit.events.fire(t.cropHandler,"updatesize")),e.stopImmediatePropagation())},5)).on(this.jodit.ownerWindow,`resize.${oo}`+t.jodit.id,()=>{this.jodit.events.fire(t.resizeHandler,"updatesize"),t.showCrop(),this.jodit.events.fire(t.cropHandler,"updatesize")}).on(this.jodit.ownerWindow,`mouseup.${oo} ${t.jodit.id} keydown.${oo}`+t.jodit.id,e=>{t.clicked&&(t.clicked=!1,e.stopImmediatePropagation())}),zt(".jodit_button_group",t.editor).forEach(e=>{const i=e.querySelector("input");t.jodit.events.on(e,"click change",()=>{i.checked=!i.checked,t.jodit.events.fire(i,"change")},"button")}),t.jodit.events.on(this.editor,"click."+oo,(function(){zt(`.${oo}_slider,.${oo}_area`,t.editor).forEach(t=>t.classList.remove("active"));const e=this.parentNode;e.classList.add("active"),t.activeTab=e.getAttribute("data-area")||"resize";const i=t.editor.querySelector(`.${oo}_area.${oo}_area_`+t.activeTab);i&&i.classList.add("active"),"crop"===t.activeTab&&t.showCrop()}),`.${oo}_slider-title`).on(t.widthInput,`change.${oo} mousedown.${oo} keydown.${oo}`,nt(()=>{const e=parseInt(t.widthInput.value,10);let i;e>t.options.min_width&&(ne(t.image,"width",e+"px"),t.resizeUseRatio&&(i=Math.round(e/t.ratio),i>t.options.min_height&&(ne(t.image,"height",i+"px"),t.heightInput.value=""+i))),this.jodit.events.fire(t.resizeHandler,"updatesize")},200)).on(t.heightInput,`change.${oo} mousedown.${oo} keydown.${oo}`,nt(()=>{if(this.isDestructed)return;const e=parseInt(t.heightInput.value,10);let i;e>t.options.min_height&&(ne(t.image,"height",e+"px"),t.resizeUseRatio&&(i=Math.round(e*t.ratio),i>t.options.min_width&&(ne(t.image,"width",i+"px"),t.widthInput.value=""+i))),this.jodit.events.fire(t.resizeHandler,"updatesize")},200));const e=t.editor.querySelector(`.${oo}_keep_spect_ratio`);e&&e.addEventListener("change",()=>{t.resizeUseRatio=e.checked});const i=t.editor.querySelector(`.${oo}_keep_spect_ratio_crop`);i&&i.addEventListener("change",()=>{t.cropUseRatio=i.checked}),t.jodit.events.on(t.resizeHandler,"updatesize",()=>{ne(t.resizeHandler,{top:0,left:0,width:(t.image.offsetWidth||t.naturalWidth)+"px",height:(t.image.offsetHeight||t.naturalHeight)+"px"}),this.updateResizeBox()}).on(t.cropHandler,"updatesize",()=>{if(!t.cropImage)return;let e=ne(t.cropHandler,"left"),i=ne(t.cropHandler,"top"),o=t.cropHandler.offsetWidth,s=t.cropHandler.offsetHeight;0>e&&(e=0),0>i&&(i=0),e+o>t.cropImage.offsetWidth&&(o=t.cropImage.offsetWidth-e,t.cropUseRatio&&(s=o/t.ratio)),i+s>t.cropImage.offsetHeight&&(s=t.cropImage.offsetHeight-i,t.cropUseRatio&&(o=s*t.ratio)),ne(t.cropHandler,{width:o,height:s,left:e,top:i,backgroundPosition:-e-1+"px "+(-i-1)+"px",backgroundSize:t.cropImage.offsetWidth+"px "+t.cropImage.offsetHeight+"px"}),t.updateCropBox()}),t.buttons.forEach(e=>{e.addEventListener("mousedown",t=>{t.stopImmediatePropagation()}),e.addEventListener("click",()=>{const i={action:t.activeTab,box:"resize"===t.activeTab?t.resizeBox:t.cropBox};switch(e.getAttribute("data-action")){case"saveas":Pi(t.jodit.i18n("Enter new name"),t.jodit.i18n("Save in new file"),e=>{if(!Mt(e))return Hi(t.jodit.i18n("The name should not be empty")),!1;t.onSave(e,i,t.hide,t=>{Hi(t.message)})});break;case"save":t.onSave(void 0,i,t.hide,t=>{Hi(t.message)});break;case"reset":"resize"===t.activeTab?(ne(t.image,{width:null,height:null}),t.widthInput.value=""+t.naturalWidth,t.heightInput.value=""+t.naturalHeight,t.jodit.events.fire(t.resizeHandler,"updatesize")):t.showCrop()}})})},this.hide=()=>{this.dialog.close()},this.open=(t,e)=>new Promise(i=>{const o=(new Date).getTime();this.image=this.jodit.create.element("img"),zt("img,.jodit_icon-loader",this.resize_box).forEach(me.safeRemove),zt("img,.jodit_icon-loader",this.crop_box).forEach(me.safeRemove),ne(this.cropHandler,"background","transparent"),this.onSave=e,this.resize_box.appendChild(this.jodit.create.element("i",{class:"jodit_icon-loader"})),this.crop_box.appendChild(this.jodit.create.element("i",{class:"jodit_icon-loader"})),this.image.setAttribute("src",t+=/\?/.test(t)?"&_tst="+o:"?_tst="+o),this.dialog.open();const s=()=>{this.isDestructed||(this.image.removeEventListener("load",s),this.naturalWidth=this.image.naturalWidth,this.naturalHeight=this.image.naturalHeight,this.widthInput.value=""+this.naturalWidth,this.heightInput.value=""+this.naturalHeight,this.ratio=this.naturalWidth/this.naturalHeight,this.resize_box.appendChild(this.image),this.cropImage=this.image.cloneNode(),this.crop_box.appendChild(this.cropImage),zt(".jodit_icon-loader",this.editor).forEach(me.safeRemove),"crop"===this.activeTab&&this.showCrop(),this.jodit.events.fire(this.resizeHandler,"updatesize"),this.jodit.events.fire(this.cropHandler,"updatesize"),this.dialog.setPosition(),this.jodit.events.fire("afterImageEditor"),i(this.dialog))};this.image.addEventListener("load",s),this.image.complete&&s()}),this.options=t&&t.options?t.options.imageeditor:we.defaultOptions.imageeditor;const e=this.options,i=t.i18n;this.resizeUseRatio=e.resizeUseRatio,this.cropUseRatio=e.cropUseRatio;const o=this.resizeUseRatio,s=this.cropUseRatio;this.buttons=[this.jodit.create.fromHTML('"),this.jodit.create.fromHTML('"),this.jodit.create.fromHTML('")],this.activeTab=e.resize?"resize":"crop";const n=(t,e="active")=>t?e:"",r=(t,e,o=!0)=>`
\n\t\t\t\n\t\t\t
\n\t\t\t\t\n\n\t\t\t\t\n\n\t\t\t\t\n\t\t\t
\n\t\t
`;this.editor=this.jodit.create.fromHTML(`
\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t${e.resize?`
\n\t\t\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\t
`:""}\n\t\t\t\t\t\t\t\t${e.crop?`
\n\t\t\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\t
`:""}\n\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t${e.resize?`
\n\t\t\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\t\t\t${so("resize")}\n\t\t\t\t\t\t\t\t\t\t\t\t\t${i("Resize")}\n\t\t\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\t\t\t${r("Keep Aspect Ratio","keep_spect_ratio",o)}\n\t\t\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\t
`:""}\n\t\t\t\t\t\t\t\t${e.crop?`
\n\t\t\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\t\t\t${so("crop")}\n\t\t\t\t\t\t\t\t\t\t\t\t\t${i("Crop")}\n\t\t\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\t\t\t${r("Keep Aspect Ratio","keep_spect_ratio_crop",s)}\n\t\t\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\t
`:""}\n\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t
`),this.widthInput=this.editor.querySelector(`.${oo}_width`),this.heightInput=this.editor.querySelector(`.${oo}_height`),this.resize_box=this.editor.querySelector(`.${oo}_area.${oo}_area_resize .${oo}_box`),this.crop_box=this.editor.querySelector(`.${oo}_area.${oo}_area_crop .${oo}_box`),this.sizes=this.editor.querySelector(`.${oo}_area.${oo}_area_crop .jodit_sizes`),this.resizeHandler=this.editor.querySelector(`.${oo}_resizer`),this.cropHandler=this.editor.querySelector(`.${oo}_croper`),this.dialog=new Bi(t),this.dialog.setContent(this.editor),this.dialog.setSize(this.options.width,this.options.height),this.dialog.setTitle(this.buttons),this.setHandlers()}destruct(){this.isDestructed||(this.dialog&&(this.dialog.destruct(),delete this.dialog),me.safeRemove(this.editor),delete this.widthInput,delete this.heightInput,delete this.resize_box,delete this.crop_box,delete this.sizes,delete this.resizeHandler,delete this.cropHandler,delete this.editor,this.jodit.events&&this.jodit.events.off(`.${oo}`),super.destruct())}}class ro{static addSelected(t){t.setAttribute(X,"1")}static restoreSelection(t){t.removeAttribute(X)}static getAllSelectedCells(t){return t?zt(`td[${X}],th[${X}]`,t):[]}static getRowsCount(t){return t.rows.length}static getColumnsCount(t){return ro.formalMatrix(t).reduce((t,e)=>Math.max(t,e.length),0)}static formalMatrix(t,e){const i=[[]],o=Array.prototype.slice.call(t.rows),s=(t,o)=>{void 0===i[o]&&(i[o]=[]);const s=t.colSpan,n=t.rowSpan;let r,a,l=0;for(;i[o][l];)l+=1;for(a=0;n>a;a+=1)for(r=0;s>r;r+=1){if(void 0===i[o+a]&&(i[o+a]=[]),e&&!1===e(t,o+a,l+r,s,n))return!1;i[o+a][l+r]=t}};for(let t,e=0;o.length>e;e+=1){const n=Array.prototype.slice.call(o[e].cells);for(t=0;n.length>t;t+=1)if(!1===s(n[t],e))return i}return i}static formalCoordinate(t,e,i=!1){let o=0,s=0,n=1,r=1;return ro.formalMatrix(t,(t,a,l,d,c)=>{if(e===t)return o=a,s=l,n=d||1,r=c||1,i&&(s+=(d||1)-1,o+=(c||1)-1),!1}),[o,s,n,r]}static appendRow(t,e=!1,i=!0){const o=t.ownerDocument||document,s=ro.getColumnsCount(t),n=o.createElement("tr");for(let t=0;s>t;t+=1)n.appendChild(o.createElement("td"));i&&e&&e.nextSibling?e.parentNode&&e.parentNode.insertBefore(n,e.nextSibling):!i&&e?e.parentNode&&e.parentNode.insertBefore(n,e):(zt(":scope>tbody",t)[0]||t).appendChild(n)}static removeRow(t,e){const i=ro.formalMatrix(t);let o;const s=t.rows[e];de(i[e],(n,r)=>{if(o=!1,0>e-1||i[e-1][n]!==r)if(i[e+1]&&i[e+1][n]===r){if(r.parentNode===s&&r.parentNode.nextSibling){o=!0;let s=n+1;for(;i[e+1][s]===r;)s+=1;const a=me.next(r.parentNode,t=>t&&t.nodeType===Node.ELEMENT_NODE&&"TR"===t.nodeName,t);i[e+1][s]?a.insertBefore(r,i[e+1][s]):a.appendChild(r)}}else me.safeRemove(r);else o=!0;if(o&&(r.parentNode===s||r!==i[e][n-1])){const t=r.rowSpan;t-1>1?r.setAttribute("rowspan",""+(t-1)):r.removeAttribute("rowspan")}}),me.safeRemove(s)}static appendColumn(t,e,i=!0){const o=ro.formalMatrix(t);let s;for(void 0===e&&(e=ro.getColumnsCount(t)-1),s=0;o.length>s;s+=1){const n=(t.ownerDocument||document).createElement("td"),r=o[s][e];let a=!1;i?(o[s]&&r&&e+1>=o[s].length||r!==o[s][e+1])&&(r.nextSibling?r.parentNode&&r.parentNode.insertBefore(n,r.nextSibling):r.parentNode&&r.parentNode.appendChild(n),a=!0):(0>e-1||o[s][e]!==o[s][e-1]&&o[s][e].parentNode)&&(r.parentNode&&r.parentNode.insertBefore(n,o[s][e]),a=!0),a||o[s][e].setAttribute("colspan",""+(parseInt(o[s][e].getAttribute("colspan")||"1",10)+1))}}static removeColumn(t,e){const i=ro.formalMatrix(t);let o;de(i,(t,s)=>{const n=s[e];if(o=!1,0>e-1||i[t][e-1]!==n?s.length>e+1&&i[t][e+1]===n?o=!0:me.safeRemove(n):o=!0,o&&(0>t-1||n!==i[t-1][e])){const t=n.colSpan;t-1>1?n.setAttribute("colspan",""+(t-1)):n.removeAttribute("colspan")}})}static getSelectedBound(t,e){const i=[[1/0,1/0],[0,0]],o=ro.formalMatrix(t);let s,n,r;for(s=0;o.length>s;s+=1)for(n=0;o[s].length>n;n+=1)-1!==e.indexOf(o[s][n])&&(i[0][0]=Math.min(s,i[0][0]),i[0][1]=Math.min(n,i[0][1]),i[1][0]=Math.max(s,i[1][0]),i[1][1]=Math.max(n,i[1][1]));for(s=i[0][0];i[1][0]>=s;s+=1)for(r=1,n=i[0][1];i[1][1]>=n;n+=1){for(;o[s][n-r]&&o[s][n]===o[s][n-r];)i[0][1]=Math.min(n-r,i[0][1]),i[1][1]=Math.max(n-r,i[1][1]),r+=1;for(r=1;o[s][n+r]&&o[s][n]===o[s][n+r];)i[0][1]=Math.min(n+r,i[0][1]),i[1][1]=Math.max(n+r,i[1][1]),r+=1;for(r=1;o[s-r]&&o[s][n]===o[s-r][n];)i[0][0]=Math.min(s-r,i[0][0]),i[1][0]=Math.max(s-r,i[1][0]),r+=1;for(r=1;o[s+r]&&o[s][n]===o[s+r][n];)i[0][0]=Math.min(s+r,i[0][0]),i[1][0]=Math.max(s+r,i[1][0]),r+=1}return i}static normalizeTable(t){let e,i,o,s;const n=[],r=ro.formalMatrix(t);for(i=0;r[0].length>i;i+=1){for(o=1e6,s=!1,e=0;r.length>e;e+=1)if(void 0!==r[e][i]){if(2>r[e][i].colSpan){s=!0;break}o=Math.min(o,r[e][i].colSpan)}if(!s)for(e=0;r.length>e;e+=1)void 0!==r[e][i]&&ro.__mark(r[e][i],"colspan",r[e][i].colSpan-o+1,n)}for(e=0;r.length>e;e+=1){for(o=1e6,s=!1,i=0;r[e].length>i;i+=1)if(void 0!==r[e][i]){if(2>r[e][i].rowSpan){s=!0;break}o=Math.min(o,r[e][i].rowSpan)}if(!s)for(i=0;r[e].length>i;i+=1)void 0!==r[e][i]&&ro.__mark(r[e][i],"rowspan",r[e][i].rowSpan-o+1,n)}for(e=0;r.length>e;e+=1)for(i=0;r[e].length>i;i+=1)void 0!==r[e][i]&&(r[e][i].hasAttribute("rowspan")&&1===r[e][i].rowSpan&&r[e][i].removeAttribute("rowspan"),r[e][i].hasAttribute("colspan")&&1===r[e][i].colSpan&&r[e][i].removeAttribute("colspan"),r[e][i].hasAttribute("class")&&!r[e][i].getAttribute("class")&&r[e][i].removeAttribute("class"));ro.__unmark(n)}static mergeSelected(t){const e=[],i=ro.getSelectedBound(t,ro.getAllSelectedCells(t));let o,s=0,n=null,r=0,a=0,l=0;const d=[];i&&(i[0][0]-i[1][0]||i[0][1]-i[1][1])&&(ro.formalMatrix(t,(t,c,h,p,u)=>{if(!(i[0][0]>c||c>i[1][0]||i[0][1]>h||h>i[1][1])){if(o=t,o.__i_am_already_was)return;o.__i_am_already_was=!0,c===i[0][0]&&o.style.width&&(s+=o.offsetWidth),""!==Mt(t.innerHTML.replace(//g,""))&&e.push(t.innerHTML),p>1&&(a+=p-1),u>1&&(l+=u-1),n?ro.__mark(o,"remove",1,d):(n=t,r=h)}}),a=i[1][1]-i[0][1]+1,l=i[1][0]-i[0][0]+1,n&&(a>1&&ro.__mark(n,"colspan",a,d),l>1&&ro.__mark(n,"rowspan",l,d),s&&(ro.__mark(n,"width",(s/t.offsetWidth*100).toFixed(I)+"%",d),r&&ro.setColumnWidthByDelta(t,r,0,!0,d)),n.innerHTML=e.join("
"),delete n.__i_am_already_was,ro.__unmark(d),ro.normalizeTable(t),de(Array.from(t.rows),(t,e)=>{e.cells.length||me.safeRemove(e)})))}static splitHorizontal(t){let e,i,o,s,n;const r=[],a=t.ownerDocument||document;ro.getAllSelectedCells(t).forEach(l=>{i=a.createElement("td"),i.appendChild(a.createElement("br")),o=a.createElement("tr"),e=ro.formalCoordinate(t,l),2>l.rowSpan?(ro.formalMatrix(t,(t,i,o)=>{e[0]===i&&e[1]!==o&&t!==l&&ro.__mark(t,"rowspan",t.rowSpan+1,r)}),me.after(me.closest(l,"tr",t),o),o.appendChild(i)):(ro.__mark(l,"rowspan",l.rowSpan-1,r),ro.formalMatrix(t,(i,o,r)=>{o>e[0]&&e[0]+l.rowSpan>o&&e[1]>r&&i.parentNode.rowIndex===o&&(n=i),o>e[0]&&i===l&&(s=t.rows[o])}),n?me.after(n,i):s.insertBefore(i,s.firstChild)),l.colSpan>1&&ro.__mark(i,"colspan",l.colSpan,r),ro.__unmark(r),ro.restoreSelection(l)}),this.normalizeTable(t)}static splitVertical(t){let e,i,o;const s=[],n=t.ownerDocument||document;ro.getAllSelectedCells(t).forEach(r=>{e=ro.formalCoordinate(t,r),2>r.colSpan?ro.formalMatrix(t,(t,i,o)=>{e[1]===o&&e[0]!==i&&t!==r&&ro.__mark(t,"colspan",t.colSpan+1,s)}):ro.__mark(r,"colspan",r.colSpan-1,s),i=n.createElement("td"),i.appendChild(n.createElement("br")),r.rowSpan>1&&ro.__mark(i,"rowspan",r.rowSpan,s);const a=r.offsetWidth;me.after(r,i),o=a/t.offsetWidth/2,ro.__mark(r,"width",(100*o).toFixed(I)+"%",s),ro.__mark(i,"width",(100*o).toFixed(I)+"%",s),ro.__unmark(s),ro.restoreSelection(r)}),ro.normalizeTable(t)}static setColumnWidthByDelta(t,e,i,o,s){const n=ro.formalMatrix(t);let r,a,l;for(r=0;n.length>r;r+=1)a=n[r][e].offsetWidth,l=(a+i)/t.offsetWidth*100,ro.__mark(n[r][e],"width",l.toFixed(I)+"%",s);o||ro.__unmark(s)}static __mark(t,e,i,o){o.push(t),t.__marked_value||(t.__marked_value={}),t.__marked_value[e]=void 0===i?1:i}static __unmark(t){t.forEach(t=>{t.__marked_value&&(de(t.__marked_value,(e,i)=>{switch(e){case"remove":me.safeRemove(t);break;case"rowspan":i>1?t.setAttribute("rowspan",""+i):t.removeAttribute("rowspan");break;case"colspan":i>1?t.setAttribute("colspan",""+i):t.removeAttribute("colspan");break;case"width":t.style.width=""+i}delete t.__marked_value[e]}),delete t.__marked_value)})}}we.prototype.enableDragAndDropFileToEditor=!0,we.prototype.uploader={url:"",insertImageAsBase64URI:!1,imagesExtensions:["jpg","png","jpeg","gif"],headers:null,data:null,filesVariableName:t=>`files[${t}]`,withCredentials:!1,pathVariableName:"path",format:"json",method:"POST",prepareData:t=>t,isSuccess:t=>t.success,getMessage:t=>void 0!==t.data.messages&&Array.isArray(t.data.messages)?t.data.messages.join(" "):"",process:t=>t.data,error(t){this.jodit.events.fire("errorMessage",t.message,"error",4e3)},defaultHandlerSuccess(t){t.files&&t.files.length&&t.files.forEach((e,i)=>{const[o,s]=t.isImages&&t.isImages[i]?["img","src"]:["a","href"],n=this.jodit.create.inside.element(o);n.setAttribute(s,t.baseurl+e),"a"===o&&(n.textContent=t.baseurl+e),xe(this.jodit)&&("img"===o?this.jodit.selection.insertImage(n,null,this.jodit.options.imageDefaultWidth):this.jodit.selection.insertNode(n))})},defaultHandlerError(t){this.jodit.events.fire("errorMessage",t.message)},contentType(t){return(void 0===this.jodit.ownerWindow.FormData||"string"==typeof t)&&"application/x-www-form-urlencoded; charset=UTF-8"}};class ao extends Ce{constructor(t,e){super(t),this.path="",this.source="default",this.ajaxInstances=[],this.options=mt(!0,{},we.defaultOptions.uploader,xe(t)?t.options.uploader:null,e)}static dataURItoBlob(t){const e=atob(t.split(",")[1]),i=t.split(",")[0].split(":")[1].split(";")[0],o=new ArrayBuffer(e.length),s=new Uint8Array(o);for(let t=0;e.length>t;t+=1)s[t]=e.charCodeAt(t);return new Blob([s],{type:i})}buildData(t){if(this.options.buildData&&"function"==typeof this.options.buildData)return this.options.buildData.call(this,t);const e=this.jodit.ownerWindow.FormData;if(void 0!==e){if(t instanceof e)return t;if("string"==typeof t)return t;const i=new e;return Object.keys(t).forEach(e=>{i.append(e,t[e])}),i}return t}send(t,e){const i=this.buildData(t),o=t=>{const i=new Di(this.jodit||this,{xhr:()=>{const t=new XMLHttpRequest;return void 0!==this.jodit.ownerWindow.FormData&&t.upload?t.upload.addEventListener("progress",t=>{if(t.lengthComputable){let e=t.loaded/t.total;e*=100,this.jodit.progress_bar.style.display="block",this.jodit.progress_bar.style.width=e+"%",100===e&&(this.jodit.progress_bar.style.display="none")}},!1):this.jodit.progress_bar.style.display="none",t},method:this.options.method||"POST",data:t,url:this.options.url,headers:this.options.headers,queryBuild:this.options.queryBuild,contentType:this.options.contentType.call(this,t),dataType:this.options.format||"json",withCredentials:this.options.withCredentials||!1});this.ajaxInstances.push(i);const o=()=>{const t=this.ajaxInstances.indexOf(i);-1!==t&&this.ajaxInstances.splice(t,1)};return i.send().then(t=>{o(),e.call(this,t)}).catch(t=>{o(),this.options.error.call(this,t)})};return i instanceof Promise?i.then(o).catch(t=>{this.options.error.call(this,t)}):o(i)}sendFiles(t,e,i,o){if(!t)return Promise.reject(Error("Need files"));const s=this;let n=Array.from(t);if(!n.length)return Promise.reject(Error("Need files"));const r=[];if(this.options.insertImageAsBase64URI){let t,i;for(i=0;n.length>i;i+=1)if(t=n[i],t&&t.type){const o=t.type.match(/\/([a-z0-9]+)/i),a=o[1]?o[1].toLowerCase():"";if(this.options.imagesExtensions.includes(a)){const o=new FileReader;r.push(new Promise((i,n)=>{o.onerror=n,o.onloadend=()=>{const t={baseurl:"",files:[o.result],isImages:[!0]};"function"==typeof(e||s.options.defaultHandlerSuccess)&&(e||s.options.defaultHandlerSuccess).call(s,t),i(t)},o.readAsDataURL(t)})),n[i]=null}}}if(n=n.filter(t=>t),n.length){const t=new FormData;let a;t.append(this.options.pathVariableName,s.path),t.append("source",s.source);for(let e=0;n.length>e;e+=1)if(a=n[e],a){const i=a.type.match(/\/([a-z0-9]+)/i),o=i&&i[1]?i[1].toLowerCase():"";let s=n[e].name||(""+Math.random()).replace(".","");if(o){let t=o;["jpeg","jpg"].includes(t)&&(t="jpeg|jpg"),RegExp(".("+t+")$","i").test(s)||(s+="."+o)}t.append(this.options.filesVariableName(e),n[e],s)}o&&o(t),s.options.data&&ft(s.options.data)&&Object.keys(s.options.data).forEach(e=>{t.append(e,s.options.data[e])}),s.options.prepareData.call(this,t),r.push(s.send(t,t=>{this.options.isSuccess.call(s,t)?"function"==typeof(e||s.options.defaultHandlerSuccess)&&(e||s.options.defaultHandlerSuccess).call(s,s.options.process.call(s,t)):(i||s.options.defaultHandlerError).call(s,Error(s.options.getMessage.call(s,t)))}).then(()=>{this.jodit.events&&this.jodit.events.fire("filesWereUploaded")}))}return Promise.all(r)}setPath(t){this.path=t}setSource(t){this.source=t}bind(t,e,i){const o=this,s=t=>{let s,n,r;const a=t=>{n&&(t.append("extension",r),t.append("mimetype",n.type))};if(t.clipboardData&&t.clipboardData.files&&t.clipboardData.files.length)return this.sendFiles(t.clipboardData.files,e,i),!1;if(ie("ff")||F){if(t.clipboardData&&!t.clipboardData.types.length&&t.clipboardData.types[0]!==W){const t=this.jodit.create.div("",{tabindex:-1,style:"left: -9999px; top: 0; width: 0; height: 100%;line-height: 140%; overflow: hidden; position: fixed; z-index: 2147483647; word-break: break-all;",contenteditable:!0});this.jodit.ownerDocument.body.appendChild(t);const s=this.jodit&&xe(this.jodit)?this.jodit.selection.save():null,n=()=>s&&this.jodit&&xe(this.jodit)&&this.jodit.selection.restore(s);t.focus(),setTimeout(()=>{const s=t.firstChild;if(me.safeRemove(t),s&&s.hasAttribute("src")){const t=s.getAttribute("src")||"";n(),o.sendFiles([ao.dataURItoBlob(t)],e,i)}},200)}}else if(t.clipboardData&&t.clipboardData.items&&t.clipboardData.items.length){const o=t.clipboardData.items;for(s=0;o.length>s;s+=1)if("file"===o[s].kind&&"image/png"===o[s].type){if(n=o[s].getAsFile(),n){const t=n.type.match(/\/([a-z0-9]+)/i);r=t[1]?t[1].toLowerCase():"",this.sendFiles([n],e,i,a)}t.preventDefault();break}}};this.jodit&&this.jodit.editor!==t?o.jodit.events.on(t,"paste",s):o.jodit.events.on("beforePaste",s);const n=t=>!(!t.dataTransfer||!t.dataTransfer.files||0===t.dataTransfer.files.length);o.jodit.events.on(t,"dragend dragover dragenter dragleave drop",t=>{t.preventDefault()}).on(t,"dragover",e=>{n(e)&&(t.classList.contains("jodit_draghover")||t.classList.add("jodit_draghover"),e.preventDefault())}).on(t,"dragend",e=>{n(e)&&(t.classList.contains("jodit_draghover")&&t.classList.remove("jodit_draghover"),e.preventDefault())}).on(t,"drop",o=>{t.classList.remove("jodit_draghover"),n(o)&&o.dataTransfer&&o.dataTransfer.files&&(o.preventDefault(),o.stopImmediatePropagation(),this.sendFiles(o.dataTransfer.files,e,i))});const r=t.querySelector("input[type=file]");r&&o.jodit.events.on(r,"change",(function(){o.sendFiles(this.files,e,i).then(()=>{r.value="",/safari/i.test(navigator.userAgent)||(r.type="",r.type="file")})}))}uploadRemoteImage(t,e,i){const o=this;o.send({action:"fileUploadRemote",url:t},t=>{if(o.options.isSuccess.call(o,t))"function"==typeof e?e.call(o,this.options.process.call(this,t)):this.options.defaultHandlerSuccess.call(o,this.options.process.call(this,t));else if("function"==typeof(i||o.options.defaultHandlerError))return void(i||this.options.defaultHandlerError).call(o,Error(o.options.getMessage.call(this,t)))})}destruct(){this.ajaxInstances.forEach(t=>{try{t.abort()}catch(t){}}),delete this.options,super.destruct()}}function lo(t){if(!t.options.addNewLine)return;const e=t.create.fromHTML('
'+ge.getIcon("enter")+"
"),i=RegExp("^("+t.options.addNewLineTagsTriggers.join("|")+")$","i");let o,s,n=!1,r=!1,a=!1;const l=()=>{clearTimeout(o),a=!1,e.style.display="none",n=!0},d=e=>null!==e&&me.isBlock(e,t.editorWindow)&&!/^(img|table|iframe|hr)$/i.test(e.nodeName),c=()=>{n||a||(clearTimeout(o),o=st(l,500))};t.events.on("beforeDestruct",()=>{me.safeRemove(e)}).on("afterInit",()=>{t.container.appendChild(e),t.events.on(e,"mousemove",t=>{t.stopPropagation()}).on(e,"mousedown touchstart",e=>{const i=t.editorDocument.createElement(t.options.enter);r&&s&&s.parentNode?s.parentNode.insertBefore(i,s):t.editor.appendChild(i),t.selection.setCursorIn(i),t.events.fire("synchro"),l(),e.preventDefault()})}).on("afterInit",()=>{t.events.on(t.editor,"scroll",()=>{l()}).on(t.container,"mouseleave",c).on(e,"mouseenter",()=>{clearTimeout(o),a=!0}).on(e,"mouseleave",()=>{a=!1}).on(t.editor,"dblclick",e=>{if(!t.options.readonly&&t.options.addNewLineOnDBLClick&&e.target===t.editor&&t.selection.isCollapsed()){const i=Qt(t.editor,t,t.editorDocument),o=e.pageY-t.editorWindow.pageYOffset,s=t.editorDocument.createElement(t.options.enter);Math.abs(o-(i.height+i.top))>Math.abs(o-i.top)&&t.editor.firstChild?t.editor.insertBefore(s,t.editor.firstChild):t.editor.appendChild(s),t.selection.setCursorIn(s),t.setEditorValue(),l(),e.preventDefault()}}).on(t.editor,"mousemove",nt(a=>{let l=t.editorDocument.elementFromPoint(a.pageX-t.editorWindow.pageXOffset,a.pageY-t.editorWindow.pageYOffset);if(l&&me.isOrContains(e,l))return;if(!l||!me.isOrContains(t.editor,l))return;if(!(l&&l.nodeName.match(i)&&me.isOrContains(t.editor,l)||(l=me.closest(l,i,t.editor),l)))return void c();if(i.test(l.nodeName)){const e=me.up(l,e=>me.isBlock(e,t.editorWindow),t.editor);e&&e!==t.editor&&(l=e)}const h=Qt(t.editor,t,t.editorDocument),p=Qt(l,t,t.editorDocument);let u=!1;10>Math.abs(a.pageY-p.top)&&(u=p.top,20>u-h.top||(u-=15),r=!0),10>Math.abs(a.pageY-(p.top+p.height))&&(u=p.top+p.height,25>h.top+h.height-u||(u+=15),r=!1),!1!==u&&(r&&!me.prev(l,d,t.editor)||!r&&!me.next(l,d,t.editor))?(e.style.top=u+"px",s=l,t.options.readonly||t.isLocked()||t.container.classList.contains("jodit_popup_active")||(clearTimeout(o),e.classList.toggle("jodit-add-new-line_after",!r),e.style.display="block",e.style.width=t.editor.clientWidth+"px",n=!1)):(s=!1,c())},t.defaultTimeout))})}function co(t){let e;t.events.on("afterInit",()=>{t.options.autofocus&&(t.defaultTimeout?e=st(t.selection.focus,300):t.selection.focus())}).on("mousedown",e=>{t.isEditorMode()&&e.target&&me.isBlock(e.target,t.editorWindow)&&!e.target.childNodes.length&&(t.editor===e.target?t.selection.focus():t.selection.setCursorIn(e.target))}).on("beforeDestruct",()=>{clearTimeout(e)})}function ho(t){const e=e=>{let i,o=e;Wt(e);do{const s=o.innerHTML.replace(d,"");if(s.length&&"
"!==s||me.isCell(o,t.editorWindow)||!o.parentNode||e===t.editor)break;i=o.parentNode,me.safeRemove(o),o=i}while(o&&o!==t.editor)},i=(e,o,s)=>{if(e.node&&e.node.nodeType===Node.TEXT_NODE&&"string"==typeof e.node.nodeValue){let n=e.node.nodeValue,r=o?n.length:0;const a=o?-1:1,d=r;for(;r>=0&&n.length>=r&&n[r+(o?-1:0)]===l;)r+=a;r!==d&&(o?n=n.substr(0,r)+n.substr(d):(n=n.substr(0,d)+n.substr(r),r=d),e.node.nodeValue=n),s.setStart(e.node,r),s.collapse(!0),t.selection.selectRange(s);let c=me.findInline(e.node,o,t.editor);if(n.length){let t=!1;if(o?r&&(t=!0):n.length>r&&(t=!0),t)return!0}else s.setStartBefore(e.node),s.collapse(!0),t.selection.selectRange(s),me.safeRemove(e.node),e.node=c;if(c&&(me.isInlineBlock(c)&&(c=o?c.lastChild:c.firstChild),c&&c.nodeType===Node.TEXT_NODE))return e.node=c,i(e,o,s)}},o=v,s=t=>{if(t&&o.test(t.nodeName))return me.safeRemove(t),!1},n=(e,o,n)=>{if(e.node){const r=e.node;if(void 0!==i(e,o,n))return!0;if(e.node||(e.node=r.parentNode),e.node===t.editor)return!1;let a=e.node;if(!1===s(a))return!1;for(a&&(a=o?a.previousSibling:a.nextSibling);a&&a.nodeType===Node.TEXT_NODE&&a.nodeValue&&a.nodeValue.match(/^[\n\r]+$/);)a=o?a.previousSibling:a.nextSibling;return s(a)}},r=t=>null===t.nodeName.match(/^(TD|TH|TR|TABLE|LI)$/)&&(!(!me.isEmpty(t)&&null===t.nodeName.match(o))||!(t.nodeType===Node.TEXT_NODE&&!me.isEmptyTextNode(t))&&(!t.childNodes.length||Array.from(t.childNodes).every(r)));t.events.on("afterCommand",e=>{if("delete"===e){const e=t.selection.current();if(e&&e.firstChild&&"BR"===e.firstChild.nodeName&&me.safeRemove(e.firstChild),!(Mt(t.editor.textContent||"")||t.editor.querySelector("img")||e&&me.closest(e,"table",t.editor))){t.editor.innerHTML="";const e=t.selection.setCursorIn(t.editor);me.safeRemove(e)}}}).on("keydown",i=>{if(i.which===b||i.which===T){const o=i.which===b;if(t.selection.isFocused()||t.selection.focus(),!t.selection.isCollapsed())return t.execCommand("Delete"),!1;const s=t.selection.sel,a=!(!s||!s.rangeCount)&&s.getRangeAt(0);if(!a)return!1;const d=t.ownerDocument.createTextNode(l),c=t.editorDocument.createElement("span");try{if(a.insertNode(d),!me.isOrContains(t.editor,d))return!1;let i=me.up(d,e=>me.isBlock(e,t.editorWindow),t.editor);const s=me.findInline(d,o,t.editor),h={node:s};let p;if(s?p=n(h,o,a):d.parentNode&&(p=n({node:o?d.parentNode.previousSibling:d.parentNode.nextSibling},o,a)),void 0!==p)return!!p&&void 0;if(i&&i.nodeName.match(/^(TD)$/))return!1;let u=o?me.prev(h.node||d,e=>me.isBlock(e,t.editorWindow),t.editor):me.next(h.node||d,e=>me.isBlock(e,t.editorWindow),t.editor);if(!u&&i&&i.parentNode){u=t.create.inside.element(t.options.enter);let e=i;for(;e&&e.parentNode&&e.parentNode!==t.editor;)e=e.parentNode;e.parentNode&&e.parentNode.insertBefore(u,e)}else if(u&&r(u))return me.safeRemove(u),!1;if(u){const e=t.selection.setCursorIn(u,!o);t.selection.insertNode(c,!1,!1),e.nodeType===Node.TEXT_NODE&&e.nodeValue===l&&me.safeRemove(e)}if(i){if(e(i),u&&i.parentNode&&(i.nodeName===u.nodeName&&i.parentNode&&u.parentNode&&i.parentNode!==t.editor&&u.parentNode!==t.editor&&i.parentNode!==u.parentNode&&i.parentNode.nodeName===u.parentNode.nodeName&&(i=i.parentNode,u=u.parentNode),me.moveContent(i,u,!o),Wt(u)),u&&"LI"===u.nodeName){const e=me.closest(u,"Ul|OL",t.editor);if(e){const t=e.nextSibling;t&&t.nodeName===e.nodeName&&e!==t&&(me.moveContent(t,e,!o),me.safeRemove(t))}}return e(i),!1}}finally{if(d.parentNode&&d.nodeValue===l){const e=d.parentNode;me.safeRemove(d),!e.firstChild&&e.parentNode&&e!==t.editor&&me.safeRemove(e)}if(c&&me.isOrContains(t.editor,c,!0)){const e=t.selection.setCursorBefore(c);me.safeRemove(c),e&&e.parentNode&&(me.findInline(e,!0,e.parentNode)||me.findInline(e,!0,e.parentNode))&&me.safeRemove(e)}t.setEditorValue()}return!1}})}function po(t){const e=e=>{const i=we.defaultOptions.controls[e],o={...i.css},s={};return Object.keys(o).forEach(t=>{s[t]=Array.isArray(o[t])?o[t][0]:o[t]}),t.selection.applyCSS(s,i.tags?i.tags[0]:void 0,i.css),t.events.fire("synchro"),!1};t.registerCommand("bold",{exec:e,hotkeys:["ctrl+b","cmd+b"]}).registerCommand("italic",{exec:e,hotkeys:["ctrl+i","cmd+i"]}).registerCommand("underline",{exec:e,hotkeys:["ctrl+u","cmd+u"]}).registerCommand("strikethrough",{exec:e})}function uo(t){t.options.cleanHTML.cleanOnPaste&&t.events.on("processPaste",(t,e)=>Bt(e));const e=/([^\[]*)\[([^\]]+)]/,i=/[\s]*,[\s]*/,o=/^(.*)[\s]*=[\s]*(.*)$/,s=t=>{const s={};return"string"==typeof t?(t.split(i).map(t=>{t=Mt(t);const n=e.exec(t),r={},a=t=>{t=Mt(t);const e=o.exec(t);e?r[e[1]]=e[2]:r[t]=!0};if(n){const t=n[2].split(i);n[1]&&(t.forEach(a),s[n[1].toUpperCase()]=r)}else s[t.toUpperCase()]=!0}),s):!!t&&(Object.keys(t).forEach(e=>{s[e.toUpperCase()]=t[e]}),s)};let n;const r=s(t.options.cleanHTML.allowTags),a=s(t.options.cleanHTML.denyTags),l=(t,e=!1)=>{let i=e?t.nextSibling:t.previousSibling;for(;i;){if(i.nodeType===Node.ELEMENT_NODE||!me.isEmptyTextNode(i))return!0;i=e?i.nextSibling:i.previousSibling}return!1};t.events.on("change afterSetMode afterInit mousedown keydown",nt(()=>{if(!t.isDestructed&&t.isEditorMode()&&t.selection){n=t.selection.current();let e=null,i=!1,o=0;const s=[],d=t.options.cleanHTML.replaceOldTags;if(d&&n){const e=Object.keys(d).join("|");if(t.selection.isCollapsed()){const i=me.closest(n,e,t.editor);if(i){const e=t.selection.save(),o=d[i.nodeName.toLowerCase()]||d[i.nodeName];me.replace(i,o,!0,!1,t.editorDocument),t.selection.restore(e)}}}const c=e=>{if(e){if((e=>!(e.nodeType===Node.TEXT_NODE||!(r&&!r[e.nodeName]||a&&a[e.nodeName]))||!(!n||"BR"!==e.nodeName||!l(e)||l(e,!0)||me.up(e,e=>me.isBlock(e,t.editorWindow),t.editor)===me.up(n,e=>me.isBlock(e,t.editorWindow),t.editor))||t.options.cleanHTML.removeEmptyElements&&!1!==n&&e.nodeType===Node.ELEMENT_NODE&&null!==e.nodeName.match(g)&&!t.selection.isMarker(e)&&0===Mt(e.innerHTML).length&&!me.isOrContains(e,n))(e))return s.push(e),c(e.nextSibling);if(t.options.cleanHTML.fillEmptyParagraph&&me.isBlock(e,t.editorWindow)&&me.isEmpty(e,/^(img|svg|canvas|input|textarea|form|br)$/)){const i=t.create.inside.element("br");e.appendChild(i)}if(r&&!0!==r[e.nodeName]){const t=e.attributes;if(t&&t.length){const s=[];for(o=0;t.length>o;o+=1)(!r[e.nodeName][t[o].name]||!0!==r[e.nodeName][t[o].name]&&r[e.nodeName][t[o].name]!==t[o].value)&&s.push(t[o].name);s.length&&(i=!0),s.forEach(t=>{e.removeAttribute(t)})}}c(e.firstChild),c(e.nextSibling)}};t.editor.firstChild&&(e=t.editor.firstChild),c(e),s.forEach(me.safeRemove),(s.length||i)&&t.events&&t.events.fire("syncho")}},t.options.cleanHTML.timeout)).on("keyup",()=>{if(t.options.readonly)return;const e=t.selection.current();if(e){const i=me.up(e,e=>me.isBlock(e,t.editorWindow),t.editor);i&&me.all(i,i=>{i&&i.nodeType===Node.TEXT_NODE&&null!==i.nodeValue&&d.test(i.nodeValue)&&0!==i.nodeValue.replace(d,"").length&&(i.nodeValue=i.nodeValue.replace(d,""),i===e&&t.selection.isCollapsed()&&t.selection.setCursorAfter(i))})}}).on("afterCommand",e=>{const i=t.selection;let o,s;switch(e.toLowerCase()){case"inserthorizontalrule":o=t.editor.querySelector("hr[id=null]"),o&&(s=me.next(o,e=>me.isBlock(e,t.editorWindow),t.editor,!1),s||(s=t.create.inside.element(t.options.enter),s&&me.after(o,s)),i.setCursorIn(s));break;case"removeformat":s=i.current();const e=i=>{switch(i.nodeType){case Node.ELEMENT_NODE:me.each(i,e),"FONT"===i.nodeName?me.unwrap(i):([].slice.call(i.attributes).forEach(t=>{-1===["src","href","rel","content"].indexOf(t.name.toLowerCase())&&i.removeAttribute(t.name)}),Wt(i));break;case Node.TEXT_NODE:t.options.cleanHTML.replaceNBSP&&i.nodeType===Node.TEXT_NODE&&null!==i.nodeValue&&i.nodeValue.match(p)&&(i.nodeValue=i.nodeValue.replace(p," "));break;default:me.safeRemove(i)}};if(i.isCollapsed())for(;s&&s.nodeType!==Node.ELEMENT_NODE&&s!==t.editor;)e(s),s&&(s=s.parentNode);else t.selection.eachSelection(t=>{e(t)})}})}we.prototype.addNewLine=!0,we.prototype.addNewLineOnDBLClick=!0,we.prototype.addNewLineTagsTriggers=["table","iframe","img","hr","jodit"],we.prototype.autofocus=!1,we.prototype.controls.subscript={tags:["sub"],tooltip:"subscript"},we.prototype.controls.superscript={tags:["sup"],tooltip:"superscript"},we.prototype.controls.bold={tagRegExp:/^(strong|b)$/i,tags:["strong","b"],css:{"font-weight":["bold","700"]},tooltip:"Bold"},we.prototype.controls.italic={tagRegExp:/^(em|i)$/i,tags:["em","i"],css:{"font-style":"italic"},tooltip:"Italic"},we.prototype.controls.underline={tagRegExp:/^(u)$/i,tags:["u"],css:{"text-decoration":"underline"},tooltip:"Underline"},we.prototype.controls.strikethrough={tagRegExp:/^(s)$/i,tags:["s"],css:{"text-decoration":"line-through"},tooltip:"Strike through"},we.prototype.cleanHTML={timeout:300,removeEmptyElements:!0,fillEmptyParagraph:!0,replaceNBSP:!0,cleanOnPaste:!0,replaceOldTags:{i:"em",b:"strong"},allowTags:!1,denyTags:!1},we.prototype.controls.eraser={command:"removeFormat",tooltip:"Clear Formatting"};const fo=t=>t.replace(/([^>])([\n\r]+)/g,"$1
$2");we.prototype.askBeforePasteHTML=!0,we.prototype.askBeforePasteFromWord=!0,we.prototype.nl2brInPlainText=!0,we.prototype.defaultActionOnPaste=Y;const mo=t=>t.clipboardData?t.clipboardData:t.dataTransfer||new DataTransfer;function go(t){const e=(e,i,o,s="Clean",n="Insert only Text")=>{if(t.events&&!1===t.events.fire("beforeOpenPasteDialog",e,i,o,s,n))return;const r=Oi(`
${e}
`,i,o);r.container.setAttribute("data-editor_id",t.id);const a=r.create.fromHTML(''+t.i18n("Keep")+""),l=r.create.fromHTML(''+t.i18n(s)+""),d=r.create.fromHTML(''+t.i18n(n)+""),c=r.create.fromHTML(''+t.i18n("Cancel")+"");return t.events.on(a,"click",()=>{r.close(),o&&o(!0)}),t.events.on(l,"click",()=>{r.close(),o&&o(!1)}),t.events.on(d,"click",()=>{r.close(),o&&o(0)}),t.events.on(c,"click",()=>{r.close()}),r.setFooter([a,l,n?d:"",c]),t.events&&t.events.fire("afterOpenPasteDialog",r,e,i,o,s,n),r},i=(e,i)=>{if("string"==typeof e)switch(i){case G:e=Bt(e);break;case Z:e=Ot(e);break;case J:e=Pt(e)}"string"==typeof e&&t.buffer.set(vo,e),t.selection.insertHTML(e)},o=(o,n)=>{const r=t.buffer.get(vo);if(gt(o)&&r!==s(o))return t.events.stopPropagation("beforePaste"),o=s(o),e(t.i18n("Your code is similar to HTML. Keep as HTML?"),t.i18n("Paste as HTML"),e=>{let s=Y;!1===e&&(s=J),0===e&&(s=Z),"drop"===n.type&&t.selection.insertCursorAtPoint(n.clientX,n.clientY),i(o,s),t.setEditorValue()},"Insert as Text"),!1},s=t=>{const e=t.search(//i);-1!==e&&(t=t.substr(e+20));const i=t.search(//i);return-1!==i&&(t=t.substr(0,i)),t};t.events.on("paste",e=>{if(!1===t.events.fire("beforePaste",e))return e.preventDefault(),!1;const o=mo(e);if(e&&o){const n=o.types;let r="";if(Array.isArray(n)||"domstringlist"===pt(n))for(let t=0;n.length>t;t+=1)r+=n[t]+";";else r=n+";";let a=(()=>/text\/html/i.test(r)?o.getData("text/html"):/text\/rtf/i.test(r)&&ie("safari")?o.getData("text/rtf"):/text\/plain/i.test(r)&&!ie("mozilla")?o.getData(W):/text/i.test(r)&&F?o.getData(W):"")();(me.isNode(a,t.editorWindow)||""!==Mt(a))&&(a=s(a),t.buffer.get(vo)!==a&&(a=t.events.fire("processPaste",e,a,r)),("string"==typeof a||me.isNode(a,t.editorWindow))&&("drop"===e.type&&t.selection.insertCursorAtPoint(e.clientX,e.clientY),i(a,t.options.defaultActionOnPaste)),e.preventDefault(),e.stopPropagation())}return!1!==t.events.fire("afterPaste",e)&&void 0}),t.options.askBeforePasteHTML&&t.events.on("beforePaste",t=>{const e=mo(t);if(t&&e&&e.getData(W)){const i=e.getData(W);return o(i,t)}}),t.options.askBeforePasteFromWord&&t.events.on("beforePaste",i=>{const n=mo(i);if(i&&n&&n.getData&&n.getData($)){const r=n=>{const r=t.buffer.get(vo);if(gt(n)&&r!==s(n))return vt(n)?e(t.i18n("The pasted content is coming from a Microsoft Word/Excel document. Do you want to keep the format or clean it up?"),t.i18n("Word Paste Detected"),e=>{!0===e&&(n=St(n),t.options.beautifyHTML&&t.ownerWindow.html_beautify&&(n=t.ownerWindow.html_beautify(n))),!1===e&&(n=Bt(n)),0===e&&(n=Ot(Bt(n))),t.selection.insertHTML(n),t.setEditorValue()}):o(n,i),!1};if(n.types&&-1!==Array.from(n.types).indexOf("text/html")){const t=n.getData($);return r(t)}if("drop"!==i.type){const e=t.create.div("",{tabindex:-1,contenteditable:!0,style:{left:-9999,top:0,width:0,height:"100%",lineHeight:"140%",overflow:"hidden",position:"fixed",zIndex:2147483647,wordBreak:"break-all"}});t.container.appendChild(e);const i=t.selection.save();e.focus();let o=0;const s=()=>{me.safeRemove(e),t.selection&&t.selection.restore(i)},n=()=>{if(o+=1,e.childNodes&&e.childNodes.length>0){const i=e.innerHTML;return s(),void(!1!==r(i)&&t.selection.insertHTML(i))}5>o?st(n,20):s()};n()}}}),t.options.nl2brInPlainText&&t.events.on("processPaste",(t,e,i)=>{if(i===W+";"&&!gt(e))return fo(e)})}we.prototype.controls.paste={tooltip:"Paste from clipboard",async exec(t){t.selection.focus();let e="",i=!0;if(i&&(e=t.buffer.get(vo)||"",i=0===e.length),i&&navigator.clipboard){try{const t=await navigator.clipboard.read();if(t&&t.length){const i=await t[0].getType("text/plain");e=await new Response(i).text()}}catch(t){}if(i)try{e=await navigator.clipboard.readText(),i=!1}catch(t){}}if(i){const e=t.value;t.editorDocument.execCommand("paste"),i=e!==t.value}e?t.selection.insertHTML(e):i&&Hi(t.i18n("Your browser doesn't support direct access to the clipboard."),()=>{t.selection.focus()})}},we.prototype.controls.cut={command:"cut",isDisable:t=>t.selection.isCollapsed(),tooltip:"Cut selection"},we.prototype.controls.copy={command:"copy",isDisable:t=>t.selection.isCollapsed(),tooltip:"Copy selection"};const vo="clipboard";class bo extends Fi{afterInit(t){t.events.on(`copy.${vo} cut.${vo}`,e=>{var i,o;const s=t.selection.getHTML(),n=mo(e)||mo(t.editorWindow)||mo(e.originalEvent);n&&(n.setData(W,Ot(s)),n.setData($,s)),t.buffer.set(vo,s),"cut"===e.type&&(t.selection.remove(),t.selection.focus()),e.preventDefault(),null===(o=null===(i=t)||void 0===i?void 0:i.events)||void 0===o||o.fire("afterCopy",s)})}beforeDestruct(t){var e,i,o,s;null===(i=null===(e=t)||void 0===e?void 0:e.buffer)||void 0===i||i.set(vo,""),null===(s=null===(o=t)||void 0===o?void 0:o.events)||void 0===s||s.off("."+vo)}}class yo extends Fi{constructor(){super(...arguments),this.currentIndex=0,this.list=[],this.container=null,this.listBox=null,this.previewBox=null,this.dialog=null,this.paste=()=>{if(this.jodit.selection.focus(),this.jodit.selection.insertHTML(this.list[this.currentIndex]),0!==this.currentIndex){const t=this.list[0];this.list[0]=this.list[this.currentIndex],this.list[this.currentIndex]=t}this.dialog&&this.dialog.close(),this.jodit.setEditorValue()},this.onKeyDown=t=>{let e=this.currentIndex;-1!==[x,j,_].indexOf(t.which)&&(t.which===x&&(0===e?e=this.list.length-1:e-=1),t.which===j&&(e===this.list.length-1?e=0:e+=1),t.which!==_?(e!==this.currentIndex&&this.selectIndex(e),t.stopImmediatePropagation(),t.preventDefault()):this.paste())},this.selectIndex=t=>{this.listBox&&Array.from(this.listBox.childNodes).forEach((e,i)=>{e.classList.remove("jodit_active"),t===i&&this.previewBox&&(e.classList.add("jodit_active"),this.previewBox.innerHTML=this.list[t],e.focus())}),this.currentIndex=t},this.showDialog=()=>{2>this.list.length||(this.dialog||this.createDialog(),this.listBox&&(this.listBox.innerHTML=""),this.previewBox&&(this.previewBox.innerHTML=""),this.list.forEach((t,e)=>{const i=this.jodit.ownerDocument.createElement("a");i.textContent=e+1+". "+t.replace(p,""),i.addEventListener("keydown",this.onKeyDown),i.setAttribute("href","javascript:void(0)"),i.setAttribute("data-index",""+e),i.setAttribute("tab-index","-1"),this.listBox&&this.listBox.appendChild(i)}),this.dialog&&this.dialog.open(),st(()=>{this.selectIndex(0)},100))}}createDialog(){this.dialog=new Bi(this.jodit);const t=this.jodit.create.fromHTML(''+this.jodit.i18n("Paste")+"");t.addEventListener("click",this.paste);const e=this.jodit.create.fromHTML(''+this.jodit.i18n("Cancel")+"");e.addEventListener("click",this.dialog.close),this.container=this.jodit.ownerDocument.createElement("div"),this.container.classList.add("jodit_paste_storage"),this.listBox=this.jodit.ownerDocument.createElement("div"),this.previewBox=this.jodit.ownerDocument.createElement("div"),this.container.appendChild(this.listBox),this.container.appendChild(this.previewBox),this.dialog.setTitle(this.jodit.i18n("Choose Content to Paste")),this.dialog.setContent(this.container),this.dialog.setFooter([t,e]),this.jodit.events.on(this.listBox,"click dblclick",t=>{const e=t.target;return e&&"A"===e.nodeName&&e.hasAttribute("data-index")&&this.selectIndex(parseInt(e.getAttribute("data-index")||"0",10)),"dblclick"===t.type&&this.paste(),!1},"a")}afterInit(){this.jodit.events.on("afterCopy",t=>{-1!==this.list.indexOf(t)&&this.list.splice(this.list.indexOf(t),1),this.list.unshift(t),this.list.length>5&&(this.list.length=5)}),this.jodit.registerCommand("showPasteStorage",{exec:this.showDialog,hotkeys:["ctrl+shift+v","cmd+shift+v"]})}beforeDestruct(){this.dialog&&this.dialog.destruct(),me.safeRemove(this.previewBox),me.safeRemove(this.listBox),me.safeRemove(this.container),this.container=null,this.listBox=null,this.previewBox=null,this.dialog=null,this.list=[]}}const _o=["fontWeight","fontStyle","fontSize","color","margin","padding","borderWidth","borderStyle","borderColor","borderRadius","backgroundColor","textDecorationLine","fontFamily"],wo=(t,e,i,o)=>{let s=ne(i,e);return s===o[e]&&(s=i.parentNode&&i!==t.editor&&i.parentNode!==t.editor?wo(t,e,i.parentNode,o):void 0),s};we.prototype.controls.copyformat={exec(t,e){if(e)if(t.buffer.exists("copyformat"))t.buffer.set("copyformat",!1),t.events.off(t.editor,"mouseup.copyformat");else{const i={},o=me.up(e,t=>t&&t.nodeType!==Node.TEXT_NODE,t.editor)||t.editor,s=t.create.inside.span();t.editor.appendChild(s),_o.forEach(t=>{i[t]=ne(s,t)}),s!==t.editor&&me.safeRemove(s);const n=((t,e,i)=>{const o={};return e&&_o.forEach(s=>{o[s]=wo(t,s,e,i),s.match(/border(Style|Color)/)&&!o.borderWidth&&(o[s]=void 0)}),o})(t,o,i),r=()=>{t.buffer.set("copyformat",!1);const e=t.selection.current();e&&("IMG"===e.nodeName?ne(e,n):t.selection.applyCSS(n)),t.events.off(t.editor,"mouseup.copyformat")};t.events.on(t.editor,"mouseup.copyformat",r),t.buffer.set("copyformat",!0)}},isActive:t=>!!t.buffer.get("copyformat"),tooltip:"Paint format"};var ko=ve.TabsWidget,xo=ve.ColorPickerWidget;function Co(t){const e=(e,i,o)=>{const s=Gt(o);switch(e){case"background":t.selection.applyCSS({backgroundColor:s||""});break;case"forecolor":t.selection.applyCSS({color:s||""})}return t.setEditorValue(),!1};t.registerCommand("forecolor",e).registerCommand("background",e)}we.prototype.controls.brush={isActive(t,e,i){if(!i)return!0;const o=t.selection.current(),s=i.container.querySelector("svg");if(s&&s.style.fill&&s.style.removeProperty("fill"),o&&!i.isDisable()){const e=me.closest(o,e=>me.isBlock(e,t.editorWindow)||e&&me.isNode(e,t.editorWindow)&&e.nodeType===Node.ELEMENT_NODE,t.editor)||t.editor,i=""+ne(e,"color"),n=""+ne(e,"background-color");if(i!==""+ne(t.editor,"color"))return s&&(s.style.fill=i),!0;if(n!==""+ne(t.editor,"background-color"))return s&&(s.style.fill=n),!0}return!1},popup(t,e,i,o){let s,n="",r="",a=null;e&&e!==t.editor&&me.isNode(e,t.editorWindow)&&e.nodeType===Node.ELEMENT_NODE&&(n=""+ne(e,"color"),r=""+ne(e,"background-color"),a=e);const l=xo(t,e=>{a?a.style.backgroundColor=e:t.execCommand("background",!1,e),o()},r),d=xo(t,e=>{a?a.style.color=e:t.execCommand("forecolor",!1,e),o()},n);return s="background"===t.options.colorPickerDefaultTab?{Background:l,Text:d}:{Text:d,Background:l},ko(t,s,a)},tooltip:"Fill color or set the text color"};class jo extends Fi{constructor(){super(...arguments),this.isFragmentFromEditor=!1,this.isCopyMode=!1,this.startDragPoint={x:0,y:0},this.draggable=null,this.bufferRange=null,this.onDragEnd=()=>{this.draggable&&(me.safeRemove(this.draggable),this.draggable=null),this.isCopyMode=!1},this.onDrag=t=>{this.draggable&&(this.draggable.parentNode||this.jodit.ownerDocument.body.appendChild(this.draggable),this.jodit.events.fire("hidePopup"),ne(this.draggable,{left:t.clientX+20,top:t.clientY+20}),this.jodit.selection.insertCursorAtPoint(t.clientX,t.clientY),t.preventDefault(),t.stopPropagation())},this.onDrop=t=>{if(!t.dataTransfer||!t.dataTransfer.files||!t.dataTransfer.files.length){if(!this.isFragmentFromEditor&&!this.draggable)return this.jodit.events.fire("paste",t),t.preventDefault(),t.stopPropagation(),!1;const e=this.jodit.selection.sel,i=this.bufferRange||(e&&e.rangeCount?e.getRangeAt(0):null);let o=null;if(!this.draggable&&i)o=this.isCopyMode?i.cloneContents():i.extractContents();else if(this.draggable)if(this.isCopyMode){const[t,e]="1"===this.draggable.getAttribute("data-is-file")?["a","href"]:["img","src"];o=this.jodit.editorDocument.createElement(t),o.setAttribute(e,this.draggable.getAttribute("data-src")||this.draggable.getAttribute("src")||""),"a"===t&&(o.textContent=o.getAttribute(e)||"")}else o=le(this.draggable,"target");else this.getText(t)&&(o=this.jodit.create.inside.fromHTML(this.getText(t)));e&&e.removeAllRanges(),this.jodit.selection.insertCursorAtPoint(t.clientX,t.clientY),o&&(this.jodit.selection.insertNode(o,!1,!1),i&&o.firstChild&&o.lastChild&&(i.setStartBefore(o.firstChild),i.setEndAfter(o.lastChild),this.jodit.selection.selectRange(i),this.jodit.events.fire("synchro")),"IMG"===o.nodeName&&this.jodit.events&&this.jodit.events.fire("afterInsertImage",o)),t.preventDefault(),t.stopPropagation()}this.isFragmentFromEditor=!1},this.onDragStart=t=>{let e=t.target;if(this.onDragEnd(),this.isFragmentFromEditor=me.isOrContains(this.jodit.editor,e,!0),this.isCopyMode=!this.isFragmentFromEditor||ae(t),this.isFragmentFromEditor){const t=this.jodit.selection.sel,e=t&&t.rangeCount?t.getRangeAt(0):null;e&&(this.bufferRange=e.cloneRange())}else this.bufferRange=null;this.startDragPoint.x=t.clientX,this.startDragPoint.y=t.clientY,e.nodeType===Node.ELEMENT_NODE&&e.matches(".jodit_filebrowser_files_item")&&(e=e.querySelector("img")),"IMG"===e.nodeName&&(this.draggable=e.cloneNode(!0),le(this.draggable,"target",e),ne(this.draggable,{"z-index":1e14,"pointer-events":"none",position:"fixed",display:"inlin-block",left:this.startDragPoint.x,top:this.startDragPoint.y,width:e.offsetWidth,height:e.offsetHeight}))},this.getDataTransfer=t=>t.dataTransfer||new DataTransfer,this.getText=t=>{const e=this.getDataTransfer(t);return e.getData($)||e.getData(W)}}afterInit(){this.jodit.events.on(window,"dragover",this.onDrag).on([window,this.jodit.editorDocument,this.jodit.editor],"dragstart",this.onDragStart).on("drop",this.onDrop).on(window,"dragend drop mouseup",this.onDragEnd)}beforeDestruct(){this.onDragEnd()}}we.prototype.draggableTags=["img","a","jodit-media","jodit"];class To extends Fi{constructor(){super(...arguments),this.dragList=[],this.isCopyMode=!1,this.draggable=null,this.wasMoved=!1,this.timeout=0,this.onDrag=rt(t=>{this.draggable&&(this.wasMoved=!0,this.jodit.events.fire("hidePopup hideResizer"),this.draggable.parentNode||this.jodit.ownerDocument.body.appendChild(this.draggable),ne(this.draggable,{left:t.clientX+20,top:t.clientY+20}),this.jodit.selection.insertCursorAtPoint(t.clientX,t.clientY))},this.jodit.defaultTimeout),this.onDragStart=t=>{let e=t.target,i=null;if(this.dragList.length){do{-1!==this.dragList.indexOf(e.nodeName.toLowerCase())&&(!i||e.firstChild===i&&e.lastChild===i)&&(i=e),e=e.parentNode}while(e&&e!==this.jodit.editor);i&&(this.isCopyMode=ae(t),this.onDragEnd(),this.timeout=st(e=>{e&&(this.draggable=e.cloneNode(!0),le(this.draggable,"target",e),ne(this.draggable,{"z-index":1e14,"pointer-events":"none",position:"fixed",display:"inlin-block",left:t.clientX,top:t.clientY,width:e.offsetWidth,height:e.offsetHeight}))},this.jodit.defaultTimeout,i),t.preventDefault())}},this.onDragEnd=()=>{window.clearTimeout(this.timeout),this.draggable&&(me.safeRemove(this.draggable),this.draggable=null,this.wasMoved=!1)},this.onDrop=()=>{if(!this.draggable||!this.wasMoved)return void this.onDragEnd();let t=le(this.draggable,"target");this.onDragEnd(),this.isCopyMode&&(t=t.cloneNode(!0)),this.jodit.selection.insertNode(t,!0,!1),"IMG"===t.nodeName&&this.jodit.events&&this.jodit.events.fire("afterInsertImage",t),this.jodit.events.fire("synchro")}}afterInit(){this.dragList=this.jodit.options.draggableTags?ot(this.jodit.options.draggableTags).filter(t=>t).map(t=>t.toLowerCase()):[],this.dragList.length&&this.jodit.events.on(this.jodit.editor,"mousemove touchmove",this.onDrag).on(this.jodit.editor,"mousedown touchstart dragstart",this.onDragStart).on("mouseup touchend",this.onDrop).on(window,"mouseup touchend",this.onDragEnd)}beforeDestruct(){this.onDragEnd()}}const Eo=(t,e,i,o)=>{const s=t.create.inside.element(i),n=t.create.inside.element("br");s.appendChild(n),o&&o.cssText&&s.setAttribute("style",o.cssText),t.selection.insertNode(s,!1,!1),t.selection.setCursorBefore(n);const r=t.editorDocument.createRange();return r.setStartBefore("br"!==i.toLowerCase()?n:s),r.collapse(!0),t.selection.selectRange(r),me.safeRemove(e),ue(s,t.editor,t.editorDocument),t.events&&t.events.fire("synchro"),s};function zo(t){t.options.enterBlock||(t.options.enterBlock="br"===t.options.enter.toLowerCase()?B:t.options.enter.toLowerCase()),t.events.on("keydown",e=>{if(e.which===_){const i=t.events.fire("beforeEnter",e);if(void 0!==i)return i;t.selection.isCollapsed()||t.execCommand("Delete"),t.selection.focus();let o=t.selection.current(!1);const s=t.selection.sel;let n=t.selection.range;o&&o!==t.editor||(t.selection.current(),o=t.create.inside.text(l),s&&s.rangeCount?n.insertNode(o):t.editor.appendChild(o),n.selectNode(o),n.collapse(!1),s&&(s.removeAllRanges(),s.addRange(n)));let r=!!o&&me.up(o,e=>me.isBlock(e,t.editorWindow),t.editor);const a=r&&"LI"===r.nodeName;if(!a&&(t.options.enter.toLowerCase()===R.toLowerCase()||e.shiftKey||me.closest(o,"PRE|BLOCKQUOTE",t.editor))){const e=t.create.inside.element("br");return t.selection.insertNode(e,!0),ue(e,t.editor,t.editorDocument),!1}if(!r&&o&&!me.prev(o,e=>me.isBlock(e,t.editorWindow)||!!e&&me.isImage(e,t.editorWindow),t.editor)){let e=o;if(me.up(e,i=>{i&&i.hasChildNodes()&&i!==t.editor&&(e=i)},t.editor),r=me.wrapInline(e,t.options.enter,t),me.isEmpty(r)){const e=t.editorDocument.createElement("br");r.appendChild(e),t.selection.setCursorBefore(e)}n=s&&s.rangeCount?s.getRangeAt(0):t.editorDocument.createRange()}let d=!1,c=!1;if(r){if(!me.canSplitBlock(r,t.editorWindow)){const e=t.create.inside.element("br");return t.selection.insertNode(e,!1),t.selection.setCursorAfter(e),!1}if(a&&me.isEmpty(r)){let e=!1;const i=me.closest(r,"ol|ul",t.editor);if(me.prev(r,t=>t&&"LI"===t.nodeName,i))if(me.next(r,t=>t&&"LI"===t.nodeName,i)){const o=t.editorDocument.createRange();o.setStartBefore(i),o.setEndAfter(r);const s=o.extractContents();i.parentNode&&i.parentNode.insertBefore(s,i),e=t.selection.setCursorBefore(i)}else e=t.selection.setCursorAfter(i);else e=t.selection.setCursorBefore(i);return me.safeRemove(r),Eo(t,e,t.options.enter),zt("li",i).length||me.safeRemove(i),!1}if(t.selection.cursorInTheEdge(!0,r))return d=t.selection.setCursorBefore(r),Eo(t,d,a?"li":t.options.enter,r.style),r&&t.selection.setCursorIn(r,!0),!1;if(!1===t.selection.cursorInTheEdge(!1,r)){const e=t.editorDocument.createRange();e.setStartBefore(r),e.setEnd(n.startContainer,n.startOffset);const i=e.extractContents();r.parentNode&&r.parentNode.insertBefore(i,r),t.selection.setCursorIn(r,!0)}else d=t.selection.setCursorAfter(r)}else c=!0;return(c||d)&&Eo(t,d,a?"li":t.options.enter,r?r.style:void 0),!1}})}function qo(t){if(t.options.showMessageErrors){let e;const i=t.create.div("jodit_error_box_for_messages"),o=()=>{e=5,Array.from(i.childNodes).forEach(o=>{ne(i,"bottom",e+"px"),e+=o.offsetWidth+t.options.showMessageErrorOffsetPx})};t.workplace.appendChild(i),t.events.on("beforeDestruct",()=>{me.safeRemove(i)}).on("errorMessage",(e,s,n)=>{const r=t.create.div("active "+(s||""),e);i.appendChild(r),o(),st(()=>{r.classList.remove("active"),st(()=>{me.safeRemove(r),o()},300)},n||t.options.showMessageErrorTime)})}}function So(t){const e=(e,i,o)=>{switch(e){case"fontsize":t.selection.applyCSS({fontSize:Kt(o)});break;case"fontname":t.selection.applyCSS({fontFamily:o})}return t.events.fire("synchro"),!1};t.registerCommand("fontsize",e).registerCommand("fontname",e)}function Lo(t){t.registerCommand("formatblock",(e,i,o)=>{t.selection.focus();let s=!1;if(t.selection.eachSelection(e=>{const i=t.selection.save();let n=!!e&&me.up(e,e=>me.isBlock(e,t.editorWindow),t.editor);n&&"LI"!==n.nodeName||!e||(n=me.wrapInline(e,t.options.enter,t)),n?(n.tagName.match(/TD|TH|TBODY|TABLE|THEAD/i)?t.selection.isCollapsed()?me.wrapInline(e,o,t):t.selection.applyCSS({},o):o===t.options.enterBlock.toLowerCase()&&n.parentNode&&"LI"===n.parentNode.nodeName?me.unwrap(n):me.replace(n,o,!0,!1,t.editorDocument),s=!0,t.selection.restore(i)):t.selection.restore(i)}),!s){const e=t.editorDocument.createElement(o);e.innerHTML=l,t.selection.insertNode(e,!1),t.selection.setCursorIn(e)}return t.setEditorValue(),!1})}function No(t){let e=!1,i=0,o=0,s=!1;const n=()=>{t.events&&(e?(i=ne(t.container,"height"),o=ne(t.container,"width"),ne(t.container,{height:t.ownerWindow.innerHeight,width:t.ownerWindow.innerWidth}),s=!0):s&&ne(t.container,{height:i||"auto",width:o||"auto"}))},r=i=>{var o,s;if(t.container){if(void 0===i&&(i=!t.container.classList.contains("jodit_fullsize")),t.options.fullsize=i,e=i,t.container.classList.toggle("jodit_fullsize",i),t.toolbar&&(i?null===(s=t.container.querySelector(".jodit_toolbar_container"))||void 0===s||s.appendChild(t.toolbar.container):null===(o=t.toolbar.getParentContainer())||void 0===o||o.appendChild(t.toolbar.container),ne(t.toolbar.container,"width","auto")),t.options.globalFullsize){let e=t.container.parentNode;for(;e&&e.nodeType!==Node.DOCUMENT_NODE;)e.classList.toggle("jodit_fullsize_box",i),e=e.parentNode;n()}t.events.fire("afterResize")}};t.options.globalFullsize&&t.events.on(t.ownerWindow,"resize",n),t.events.on("afterInit afterOpen",()=>{var e,i;t.toggleFullSize(null===(i=null===(e=t)||void 0===e?void 0:e.options)||void 0===i?void 0:i.fullsize)}).on("toggleFullSize",r).on("beforeDestruct beforeClose",()=>{r(!1)}).on("beforeDestruct",()=>{t.events&&t.events.off(t.ownerWindow,"resize",n)})}we.prototype.showMessageErrors=!0,we.prototype.showMessageErrorTime=3e3,we.prototype.showMessageErrorOffsetPx=3,we.prototype.controls.fontsize={command:"fontSize",list:["8","9","10","11","12","14","16","18","24","30","36","48","60","72","96"],template:(t,e,i)=>i,tooltip:"Font size",isActiveChild(t,e){const i=t.selection.current();if(i){const o=me.closest(i,e=>me.isBlock(e,t.editorWindow)||e&&me.isNode(e,t.editorWindow)&&e.nodeType===Node.ELEMENT_NODE,t.editor)||t.editor,s=ne(o,"font-size");return!(!s||!e.args||""+e.args[1]!=""+s)}return!1},isActive(t){const e=t.selection.current();if(e){const i=me.closest(e,e=>me.isBlock(e,t.editorWindow)||e&&me.isNode(e,t.editorWindow)&&e.nodeType===Node.ELEMENT_NODE,t.editor)||t.editor;return""+ne(i,"font-size")!=""+ne(t.editor,"font-size")}return!1}},we.prototype.controls.font={command:"fontname",exec(t,e,i){t.execCommand(i.command,!1,i.args?i.args[0]:void 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:(t,e,i)=>`${i}`,isActiveChild(t,e){const i=t.selection.current(),o=t=>t.toLowerCase().replace(/['"]+/g,"").replace(/[^a-z0-9]+/g,",");if(i){const s=me.closest(i,e=>me.isBlock(e,t.editorWindow)||e&&me.isNode(e,t.editorWindow)&&e.nodeType===Node.ELEMENT_NODE,t.editor)||t.editor,n=""+ne(s,"font-family");return!(!n||!e.args||o(""+e.args[0])!==o(n))}return!1},isActive(t){const e=t.selection.current();if(e){const i=me.closest(e,e=>me.isBlock(e,t.editorWindow)||me.isNode(e,t.editorWindow)&&e&&e.nodeType===Node.ELEMENT_NODE,t.editor)||t.editor;return""+ne(i,"font-family")!=""+ne(t.editor,"font-family")}return!1},tooltip:"Font family"},we.prototype.controls.paragraph={command:"formatBlock",getLabel(t,e,i){const o=t.selection.current();if(o&&t.options.textIcons){const s=(me.closest(o,e=>me.isBlock(e,t.editorWindow),t.editor)||t.editor).nodeName.toLowerCase(),n=e.list;i&&e.data&&e.data.currentValue!==s&&e.list&&n[s]&&(i.textBox.innerHTML=`${t.i18n(n[s])}`,i.textBox.firstChild.classList.add("jodit_icon"),e.data.currentValue=s)}return!1},exec(t,e,i){t.execCommand(i.command,!1,i.args?i.args[0]:void 0)},data:{currentValue:"left"},list:{p:"Normal",h1:"Heading 1",h2:"Heading 2",h3:"Heading 3",h4:"Heading 4",blockquote:"Quote"},isActiveChild(t,e){const i=t.selection.current();if(i){const o=me.closest(i,e=>me.isBlock(e,t.editorWindow),t.editor);return o&&o!==t.editor&&void 0!==e.args&&o.nodeName.toLowerCase()===e.args[0]}return!1},isActive(t,e){const i=t.selection.current();if(i){const o=me.closest(i,e=>me.isBlock(e,t.editorWindow),t.editor);return o&&o!==t.editor&&void 0!==e.list&&"p"!==o.nodeName.toLowerCase()&&void 0!==e.list[o.nodeName.toLowerCase()]}return!1},template:(t,e,i)=>"<"+e+' class="jodit_list_element">'+t.i18n(i)+"",tooltip:"Insert format block"},we.prototype.fullsize=!1,we.prototype.globalFullsize=!0,we.prototype.controls.fullsize={exec(t){t.toggleFullSize()},isActive:t=>t.isFullSize(),getLabel(t,e,i){const o=t.isFullSize()?"shrink":"fullsize";i&&(i.textBox.innerHTML=t.options.textIcons?`${t.i18n(o)}`:ge.getIcon(o),i.textBox.firstChild.classList.add("jodit_icon"))},tooltip:"Open editor in fullsize",mode:P+H},we.prototype.commandToHotkeys={removeFormat:["ctrl+shift+m","cmd+shift+m"],insertOrderedList:["ctrl+shift+7","cmd+shift+7"],insertUnorderedList:["ctrl+shift+8, cmd+shift+8"],selectall:["ctrl+a","cmd+a"]};class Mo extends Fi{constructor(){super(...arguments),this.onKeyPress=t=>{const e=this.specialKeys[t.which],i=(t.key||String.fromCharCode(t.which)).toLowerCase(),o=[e||i];return["alt","ctrl","shift","meta"].forEach(i=>{t[i+"Key"]&&e!==i&&o.push(i)}),Ft(o.join("+"))},this.specialKeys={8:"backspace",9:"tab",10:"return",13:"return",16:"shift",17:"ctrl",18:"alt",19:"pause",20:"capslock",27:"esc",32:"space",33:"pageup",34:"pagedown",35:"end",36:"home",37:"left",38:"up",39:"right",40:"down",45:"insert",46:"del",59:";",61:"=",91:"meta",96:"0",97:"1",98:"2",99:"3",100:"4",101:"5",102:"6",103:"7",104:"8",105:"9",106:"*",107:"+",109:"-",110:".",111:"/",112:"f1",113:"f2",114:"f3",115:"f4",116:"f5",117:"f6",118:"f7",119:"f8",120:"f9",121:"f10",122:"f11",123:"f12",144:"numlock",145:"scroll",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"}}afterInit(t){Object.keys(t.options.commandToHotkeys).forEach(e=>{const i=t.options.commandToHotkeys[e];i&&t.registerHotkeyToCommand(i,e)});let e=!1;t.events.on("keydown.hotkeys",i=>{const o=this.onKeyPress(i);if(!1===this.jodit.events.fire(o+".hotkey",i.type))return e=!0,t.events.stopPropagation("keydown"),!1},void 0,void 0,!0).on("keyup.hotkeys",()=>{if(e)return e=!1,t.events.stopPropagation("keyup"),!1},void 0,void 0,!0)}beforeDestruct(t){t.events&&t.events.off(".hotkeys")}}function Ao(t){t.events.on("afterSetMode",()=>{t.isEditorMode()&&t.selection.focus()}).on("generateDocumentStructure.iframe",(t,e)=>{const i=t||e.iframe.contentWindow.document;if(i.open(),i.write('Jodit Editor'+(e.options.iframeBaseUrl?'':"")+' '),i.close(),e.options.iframeCSSLinks&&e.options.iframeCSSLinks.forEach(t=>{const e=i.createElement("link");e.setAttribute("rel","stylesheet"),e.setAttribute("href",t),i.head&&i.head.appendChild(e)}),e.options.iframeStyle){const t=i.createElement("style");t.innerHTML=e.options.iframeStyle,i.head&&i.head.appendChild(t)}}).on("createEditor",async()=>{if(!t.options.iframe)return;delete t.editor;const e=t.create.element("iframe");e.style.display="block",e.src="about:blank",e.className="jodit_wysiwyg_iframe",e.setAttribute("allowtransparency","true"),e.setAttribute("tabindex",""+t.options.tabIndex),e.setAttribute("frameborder","0"),t.workplace.appendChild(e),t.iframe=e,await t.events.fire("generateDocumentStructure.iframe",null,t);const i=t.iframe.contentWindow.document;if(t.editorDocument=i,t.editorWindow=t.iframe.contentWindow,t.create.inside.setDocument(i),t.editor=i.body,"auto"===t.options.height){i.documentElement&&(i.documentElement.style.overflowY="hidden");const e=rt(()=>{t.editor&&t.iframe&&"auto"===t.options.height&&ne(t.iframe,"height",t.editor.offsetHeight)},t.defaultTimeout/2);t.events.on("change afterInit afterSetMode resize",e).on([t.iframe,t.editorWindow,i.documentElement],"load",e).on(i,"readystatechange DOMContentLoaded",e)}return(t=>{t.matches||(t.matches=Element.prototype.matches)})(t.editorWindow.Element.prototype),t.editorDocument.documentElement&&t.events.on(t.editorDocument.documentElement,"mousedown touchend",()=>{t.selection.isFocused()||(t.selection.focus(),t.selection.setCursorIn(t.editor))}).on(t.editorWindow,"mousedown touchstart keydown keyup touchend click mouseup mousemove scroll",e=>{t.events&&t.events.fire&&t.events.fire(t.ownerWindow,e)}),!1})}we.prototype.iframeBaseUrl="",we.prototype.iframeDefaultSrc="about:blank",we.prototype.iframeStyle='html{margin: 0px;min-height: 100%;}body{box-sizing: border-box;font-size: 13px; line-height: 1.6;padding:10px;background:transparent;color:#000;position:relative;z-index: 2;user-select:auto;margin:0px;overflow:auto;}table{width:100%;border: none;border-collapse:collapse;empty-cells: show;max-width: 100%;}th,td{padding: 2px 5px;border:1px solid #ccc;-webkit-user-select:text;-moz-user-select:text;-ms-user-select:text;user-select:text}td[data-jodit-selected-cell],th[data-jodit-selected-cell]{border: 1px double #1e88e5}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);} .jodit_disabled{user-select: none;-o-user-select: none;-moz-user-select: none;-khtml-user-select: none;-webkit-user-select: none;-ms-user-select: none}',we.prototype.iframeCSSLinks=[];const Io="__jodit_imageprocessor_binded";function Do(t){t.events.on("change afterInit",nt(()=>{t.editor&&zt("img",t.editor).forEach(e=>{e[Io]||(e[Io]=!0,e.complete||e.addEventListener("load",(function i(){t.events&&t.events.fire&&t.events.fire("resize"),e.removeEventListener("load",i)})),t.events.on(e,"mousedown touchstart",()=>{t.selection.select(e)}))})},t.defaultTimeout))}var Ro=ve.TabsWidget,Bo=ve.FileSelectorWidget;function Ho(t){const e=t.i18n,i=ge.getIcon,o=t.options,s=t.create.fromHTML.bind(t.create),n=function(n){if(o.readonly)return;n&&n.stopImmediatePropagation();const r=this,a=new Bi(t),l=s(`${i("check")}${e("Ok")}`),d={remove:s(`${i("bin")}${e("Delete")}`)},c=s(`
\n\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t${i("lock")}\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t
`),h=s(`
\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t${i("lock")}\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t`),p=o.filebrowser.ajax.url||o.uploader.url,u=o.image.useImageEditor,f=s(`
\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t${i("image")}\n\t\t\t\t\t\t\t\t\t\t\t${i("crop")}\n\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t${e("Open link in new tab")}\n\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t
`),m=r.naturalWidth/r.naturalHeight||1,g=c.querySelector(".imageWidth"),v=c.querySelector(".imageHeight"),b=()=>{fe(c,".imageSrc",r.getAttribute("src")||"");const t=c.querySelector(".imageViewSrc");t&&t.setAttribute("src",r.getAttribute("src")||"")},y=()=>{b(),(()=>{r.hasAttribute("title")&&fe(c,".imageTitle",r.getAttribute("title")||""),r.hasAttribute("alt")&&fe(c,".imageAlt",r.getAttribute("alt")||"");const e=me.closest(r,"a",t.editor);e&&(fe(c,".imageLink",e.getAttribute("href")||""),c.querySelector(".imageLinkOpenInNewTab").checked="_blank"===e.getAttribute("target"))})(),g.value=""+r.offsetWidth,v.value=""+r.offsetHeight,(()=>{if(!o.image.editMargins)return;let t=!1;zt(".margins",c).forEach(e=>{const i=e.getAttribute("data-id")||"";let o=r.style[i];o&&(/^[0-9]+(px)?$/.test(o)&&(o=parseInt(o,10)),e.value=""+o||"",t||"marginTop"===i||e.value===fe(c,".marginTop")||(t=!0))}),k=!t;const e=c.querySelector(".jodit_lock_margin");e&&(e.innerHTML=i(k?"lock":"unlock")),zt(".margins:not(.marginTop)",c).forEach(t=>k?t.setAttribute("disabled","true"):t.removeAttribute("disabled"))})(),fe(c,".classes",(r.getAttribute("class")||"").replace(/jodit_focused_image[\s]*/,"")),fe(c,".id",r.getAttribute("id")||""),fe(c,".border_radius",""+(parseInt(r.style.borderRadius||"0",10)||"0")),r.style.cssFloat&&-1!==["left","right"].indexOf(r.style.cssFloat.toLowerCase())?fe(c,".align",ne(r,"float")):"block"===ne(r,"display")&&"auto"===r.style.marginLeft&&"auto"===r.style.marginRight&&fe(c,".align","center"),fe(c,".style",r.getAttribute("style")||"")};let _,w=!0,k=!0;const x={},C=c.querySelector(".tabsbox");x.Image=f,x.Advanced=h,C&&C.appendChild(Ro(t,x)),y(),t.events.on(a,"afterClose",()=>{a.destruct(),r.parentNode&&o.image.selectImageAfterClose&&t.selection.select(r)}),d.remove.addEventListener("click",()=>{me.safeRemove(r),a.close()}),o.image.useImageEditor&&zt(".jodit_use_image_editor",f).forEach(i=>{t.events.on(i,"mousedown touchstart",()=>{const i=r.getAttribute("src")||"",o=t.create.element("a"),s=()=>{o.host===location.host||Oi(e("You can only edit your own images. Download this image on the host?"),i=>{i&&t.uploader&&t.uploader.uploadRemoteImage(""+o.href,t=>{Hi(e("The image has been successfully uploaded to the host!"),()=>{"string"==typeof t.newfilename&&(r.setAttribute("src",t.baseurl+t.newfilename),b())})},t=>{Hi(e("There was an error loading %s",t.message))})})};o.href=i,t.getInstance("FileBrowser").dataProvider.getPathByUrl(""+o.href,(e,s,n)=>{t.getInstance("FileBrowser").openImageEditor(o.href,s,e,n,()=>{const t=(new Date).getTime();r.setAttribute("src",i+(-1!==i.indexOf("?")?"":"?")+"&_tmp="+t),b()},t=>{Hi(t.message)})},t=>{Hi(t.message,s)})})}),zt(".jodit_rechange",f).forEach(e=>{e.addEventListener("mousedown",i=>{e.classList.toggle("active");const o=new We(t,e);o.open(Bo(t,{upload(t){t.files&&t.files.length&&r.setAttribute("src",t.baseurl+t.files[0]),y(),o.close()},filebrowser(t){t&&t.files&&Array.isArray(t.files)&&t.files.length&&(r.setAttribute("src",t.files[0]),o.close(),y())}},r,o.close),!0),i.stopPropagation()})});const j=c.querySelector(".jodit_lock_helper.jodit_lock_size"),T=c.querySelector(".jodit_lock_helper.jodit_lock_margin");j&&j.addEventListener("click",(function(){w=!w,this.innerHTML=i(w?"lock":"unlock"),t.events.fire(g,"change")})),T&&T.addEventListener("click",(function(){k=!k,this.innerHTML=i(k?"lock":"unlock"),k?zt(".margins",c).forEach(t=>{t.matches(".marginTop")||t.setAttribute("disabled","true")}):zt(".margins",c).forEach(t=>{t.matches(".marginTop")||t.removeAttribute("disabled")})}));const E=t=>{const e=parseInt(g.value,10),i=parseInt(v.value,10);t.target===g?v.value=""+Math.round(e/m):g.value=""+Math.round(i*m)};return t.events.on([g,v],"change keydown mousedown paste",e=>{w&&(t.defaultTimeout?(clearTimeout(_),_=st(E.bind(this,e),t.defaultTimeout)):E(e))}),a.setTitle([e("Image properties"),d.remove]),a.setContent(c),l.addEventListener("click",()=>{if(o.image.editStyle&&(fe(c,".style")?r.setAttribute("style",fe(c,".style")):r.removeAttribute("style")),!fe(c,".imageSrc"))return me.safeRemove(r),void a.close();r.setAttribute("src",fe(c,".imageSrc")),r.style.borderRadius="0"!==fe(c,".border_radius")&&/^[0-9]+$/.test(fe(c,".border_radius"))?fe(c,".border_radius")+"px":"",fe(c,".imageTitle")?r.setAttribute("title",fe(c,".imageTitle")):r.removeAttribute("title"),fe(c,".imageAlt")?r.setAttribute("alt",fe(c,".imageAlt")):r.removeAttribute("alt");let e=me.closest(r,"a",t.editor);fe(c,".imageLink")?(e||(e=me.wrap(r,"a",t)),e.setAttribute("href",fe(c,".imageLink")),c.querySelector(".imageLinkOpenInNewTab").checked?e.setAttribute("target","_blank"):e.removeAttribute("target")):e&&e.parentNode&&e.parentNode.replaceChild(r,e);const i=t=>(t=Mt(t),/^[0-9]+$/.test(t)?t+"px":t);g.value===""+r.offsetWidth&&v.value===""+r.offsetHeight||ne(r,{width:Mt(g.value)?i(g.value):null,height:Mt(v.value)?i(v.value):null}),o.image.editMargins&&(k?ne(r,"margin",i(fe(c,".marginTop"))):zt(".margins",c).forEach(t=>{const e=t.getAttribute("data-id")||"";ne(r,e,i(t.value))})),o.image.editClass&&(fe(c,".classes")?r.setAttribute("class",fe(c,".classes")):r.removeAttribute("class")),o.image.editId&&(fe(c,".id")?r.setAttribute("id",fe(c,".id")):r.removeAttribute("id")),o.image.editAlign&&(fe(c,".align")?-1!==["right","left"].indexOf(fe(c,".align").toLowerCase())?(ne(r,"float",fe(c,".align")),re(r)):(ne(r,"float",""),ne(r,{display:"block","margin-left":"auto","margin-right":"auto"})):(ne(r,"float")&&-1!==["right","left"].indexOf((""+ne(r,"float")).toLowerCase())&&ne(r,"float",""),re(r))),r.getAttribute("style")||r.removeAttribute("style"),t.setEditorValue(),a.close()}),a.setFooter([l]),a.setSize(500),a.open(),n&&n.preventDefault(),!1};t.events.on("afterInit",()=>{t.events.on(t.editor,"dblclick",o.image.openOnDblClick?n:function(e){e.stopImmediatePropagation(),t.selection.select(this)},"img")}).on("openImageProperties",t=>{n.call(t)})}function Po(t){const e=e=>{const i=[];return t.selection.eachSelection(o=>{const s=t.selection.save();let n=!!o&&me.up(o,e=>me.isBlock(e,t.editorWindow),t.editor);const r=t.options.enter;if(!n&&o&&(n=me.wrapInline(o,r!==R?r:B,t)),!n)return t.selection.restore(s),!1;const a=-1!==i.indexOf(n);if(n&&n.style&&!a){i.push(n);let o=n.style.marginLeft?parseInt(n.style.marginLeft,10):0;o+=t.options.indentMargin*("outdent"===e?-1:1),n.style.marginLeft=o>0?o+"px":"",n.getAttribute("style")||n.removeAttribute("style")}t.selection.restore(s)}),t.setEditorValue(),!1};t.registerCommand("indent",{exec:e,hotkeys:["ctrl+]","cmd+]"]}),t.registerCommand("outdent",{exec:e,hotkeys:["ctrl+[","cmd+["]})}we.prototype.image={openOnDblClick:!0,editSrc:!0,useImageEditor:!0,editTitle:!0,editAlt:!0,editLink:!0,editSize:!0,editBorderRadius:!0,editMargins:!0,editClass:!0,editStyle:!0,editId:!0,editAlign:!0,showPreview:!0,selectImageAfterClose:!0},we.prototype.controls.indent={tooltip:"Increase Indent"},we.prototype.controls.outdent={isDisable(t){const e=t.selection.current();if(e){const i=me.closest(e,e=>me.isBlock(e,t.editorWindow),t.editor);if(i&&i.style&&i.style.marginLeft)return 0>=parseInt(i.style.marginLeft,10)}return!0},tooltip:"Decrease Indent"},we.prototype.indentMargin=10;var Oo=ve.ColorPickerWidget,Fo=ve.TabsWidget;we.prototype.toolbarInline=!0,we.prototype.toolbarInlineDisableFor=[],we.prototype.popup={a:[{name:"eye",tooltip:"Open link",exec(t,e){const i=e.getAttribute("href");e&&i&&t.ownerWindow.open(i)}},{name:"link",tooltip:"Edit link",icon:"pencil"},"unlink","brush","file"],jodit:[{name:"bin",tooltip:"Delete",exec(t,e){e.parentNode&&(me.safeRemove(e),t.events.fire("hidePopup"))}}],"jodit-media":[{name:"bin",tooltip:"Delete",exec(t,e){e.parentNode&&(me.safeRemove(e),t.events.fire("hidePopup"))}}],img:[{name:"delete",icon:"bin",tooltip:"Delete",exec(t,e){e.parentNode&&(me.safeRemove(e),t.events.fire("hidePopup"))}},{name:"pencil",exec(t,e){"img"===e.tagName.toLowerCase()&&t.events.fire("openImageProperties",e)},tooltip:"Edit"},{name:"valign",list:["Top","Middle","Bottom"],tooltip:"Vertical align",exec(t,e,i){if("img"!==e.tagName.toLowerCase())return;const o=i.args&&"string"==typeof i.args[1]?i.args[1].toLowerCase():"";ne(e,"vertical-align",o),t.events.fire("recalcPositionPopup")}},{name:"left",list:["Left","Right","Center","Normal"],exec(t,e,i){if("img"!==e.tagName.toLowerCase())return;const o=i.args&&"string"==typeof i.args[1]?i.args[1].toLowerCase():"";"normal"!==o?-1!==["right","left"].indexOf(o)?(ne(e,"float",o),re(e)):(ne(e,"float",""),ne(e,{display:"block","margin-left":"auto","margin-right":"auto"})):(ne(e,"float")&&-1!==["right","left"].indexOf(ne(e,"float").toLowerCase())&&ne(e,"float",""),re(e)),t.events.fire("recalcPositionPopup")},tooltip:"Horizontal align"}],table:[{name:"brush",popup(t,e){const i=ro.getAllSelectedCells(e);let o,s,n,r,a,l,d;return!!i.length&&(a=ne(i[0],"color"),d=ne(i[0],"background-color"),l=ne(i[0],"border-color"),o=Oo(t,e=>{i.forEach(t=>{ne(t,"background-color",e)}),t.setEditorValue()},d),s=Oo(t,e=>{i.forEach(t=>{ne(t,"color",e)}),t.setEditorValue()},a),n=Oo(t,e=>{i.forEach(t=>{ne(t,"border-color",e)}),t.setEditorValue()},l),r=Fo(t,{Background:o,Text:s,Border:n}),r)},tooltip:"Background"},{name:"valign",list:["Top","Middle","Bottom"],exec(t,e,i){const o=i.args&&"string"==typeof i.args[1]?i.args[1].toLowerCase():"";ro.getAllSelectedCells(e).forEach(t=>{ne(t,"vertical-align",o)})},tooltip:"Vertical align"},{name:"splitv",list:{tablesplitv:"Split vertical",tablesplitg:"Split horizontal"},tooltip:"Split"},{name:"align",icon:"left"},"\n",{name:"merge",command:"tablemerge",tooltip:"Merge"},{name:"addcolumn",list:{tableaddcolumnbefore:"Insert column before",tableaddcolumnafter:"Insert column after"},exec(t,e,i){const o=i.args&&"string"==typeof i.args[0]?i.args[0].toLowerCase():"";t.execCommand(o,!1,e)},tooltip:"Add column"},{name:"addrow",list:{tableaddrowbefore:"Insert row above",tableaddrowafter:"Insert row below"},exec(t,e,i){const o=i.args&&"string"==typeof i.args[0]?i.args[0].toLowerCase():"";t.execCommand(o,!1,e)},tooltip:"Add row"},{name:"delete",icon:"bin",list:{tablebin:"Delete table",tablebinrow:"Delete row",tablebincolumn:"Delete column",tableempty:"Empty cell"},exec(t,e,i){const o=i.args&&"string"==typeof i.args[0]?i.args[0].toLowerCase():"";t.execCommand(o,!1,e),t.events.fire("hidePopup")},tooltip:"Delete"}]};class Vo extends Fi{constructor(){super(...arguments),this._hiddenClass="jodit_toolbar_popup-inline-target-hidden",this.isSelectionStarted=!1,this.onSelectionEnd=nt(()=>{!this.isDestructed&&this.jodit.isEditorMode()&&(this.isSelectionStarted&&(this.isTargetAction||this.onChangeSelection()),this.isSelectionStarted=!1,this.isTargetAction=!1)},this.jodit.defaultTimeout),this.isTargetAction=!1,this.isSelectionPopup=!1,this.calcWindSizes=()=>{const t=this.jodit.ownerWindow,e=this.jodit.ownerDocument.documentElement;if(!e)return{left:0,top:0,width:0,height:0};const i=this.jodit.ownerDocument.body,o=e.clientTop||i.clientTop||0,s=e.clientLeft||i.clientLeft||0;return{left:s,top:o,width:e.clientWidth+(t.pageXOffset||e.scrollLeft||i.scrollLeft)-s,height:e.clientHeight+(t.pageYOffset||e.scrollTop||i.scrollTop)-o}},this.calcPosition=(t,e)=>{if(this.isDestructed)return;this.popup.target.classList.remove(this._hiddenClass);const i=t.left+t.width/2,o=Qt(this.jodit.workplace,this.jodit,this.jodit.ownerDocument,!0);let s=t.top+t.height+10;this.target.style.left=i+"px",this.target.style.top=s+"px",this.jodit.isFullSize()&&(this.target.style.zIndex=""+ne(this.jodit.container,"zIndex"));const n=this.container.offsetWidth/2;let r=-n;this.popup.container.classList.remove("jodit_toolbar_popup-inline-top"),s+this.container.offsetHeight>e.height&&(s=t.top-this.container.offsetHeight-10,this.target.style.top=s+"px",this.popup.container.classList.add("jodit_toolbar_popup-inline-top")),0>i-n&&(r=-(t.width/2+t.left)),i+n>e.width&&(r=-(this.container.offsetWidth-(e.width-i))),this.container.style.marginLeft=r+"px",(o.top-s>50||s-(o.top+o.height)>50)&&this.popup.target.classList.add(this._hiddenClass)},this.reCalcPosition=()=>{this.__getRect&&this.calcPosition(this.__getRect(),this.calcWindSizes())},this.showPopup=(t,e,i)=>{if(!this.jodit.options.toolbarInline||!this.jodit.options.popup[e.toLowerCase()])return!1;if(this.isExcludedTarget(e))return!0;this.isOpened=!0,this.isTargetAction=!0;const o=this.calcWindSizes();return this.targetContainer.parentNode||this.jodit.ownerDocument.body.appendChild(this.targetContainer),this.toolbar.build(this.jodit.options.popup[e.toLowerCase()],this.container,i),this.popup.open(this.container,!1,!0),this.__getRect=t,this.calcPosition(t(),o),!0},this.hidePopup=t=>{this.isDestructed||t&&(me.isNode(t,this.jodit.editorWindow||window)||t instanceof We)&&me.isOrContains(this.target,t instanceof We?t.target:t)||(this.isTargetAction=!1,this.isOpened=!1,this.popup.close(),me.safeRemove(this.targetContainer))},this.onSelectionStart=t=>{if(!this.isDestructed&&this.jodit.isEditorMode()&&(this.isTargetAction=!1,this.isSelectionPopup=!1,!this.isSelectionStarted)){const e=Object.keys(this.jodit.options.popup).join("|"),i="IMG"===t.target.nodeName?t.target:me.closest(t.target,e,this.jodit.editor);i&&this.showPopup(()=>Qt(i,this.jodit,this.jodit.editorDocument),i.nodeName,i)||(this.isSelectionStarted=!0)}},this.checkIsTargetEvent=()=>{this.isTargetAction?this.isTargetAction=!1:this.hidePopup()},this.isOpened=!1,this.onChangeSelection=()=>{if(this.jodit.options.toolbarInline&&this.jodit.isEditorMode()&&!this.hideIfCollapsed()&&void 0!==this.jodit.options.popup.selection){const t=this.jodit.selection.sel;if(t&&t.rangeCount){this.isSelectionPopup=!0;const e=t.getRangeAt(0);this.showPopup(()=>Qt(e,this.jodit,this.jodit.editorDocument),"selection")}}}}isExcludedTarget(t){return-1!==ot(this.jodit.options.toolbarInlineDisableFor).map(t=>t.toLowerCase()).indexOf(t.toLowerCase())}hideIfCollapsed(){return!!this.jodit.selection.isCollapsed()&&(this.hidePopup(),!0)}afterInit(t){this.toolbar=Ge.makeCollection(t),this.target=t.create.div("jodit_toolbar_popup-inline-target"),this.targetContainer=t.create.div("jodit_toolbar_popup-inline-container",this.target),this.container=t.create.div(),this.popup=new We(t,this.target,void 0,"jodit_toolbar_popup-inline"),t.events.on(this.target,"mousedown keydown touchstart",t=>{t.stopPropagation()}).on("beforeOpenPopup hidePopup afterSetMode blur",this.hidePopup).on("recalcPositionPopup",this.reCalcPosition).on("getDiffButtons.mobile",e=>{if(this.toolbar===e)return ot(t.options.buttons).filter(t=>"|"!==t&&"\n"!==t).filter(t=>0>this.toolbar.getButtonsList().indexOf(t))}).on("selectionchange",this.onChangeSelection).on("afterCommand afterExec",()=>{this.isOpened&&this.isSelectionPopup&&this.onChangeSelection()}).on("showPopup",(t,e)=>{const i=("string"==typeof t?t:t.nodeName).toLowerCase();this.isSelectionPopup=!1,this.showPopup(e,i,"string"==typeof t?void 0:t)}).on("mousedown keydown touchstart",this.onSelectionStart).on([t.ownerWindow,t.editor],"scroll resize",this.reCalcPosition).on([t.ownerWindow],"mouseup keyup touchend",this.onSelectionEnd).on([t.ownerWindow],"mousedown keydown touchstart",this.checkIsTargetEvent)}beforeDestruct(t){this.popup&&this.popup.destruct(),delete this.popup,this.toolbar&&this.toolbar.destruct(),delete this.toolbar,me.safeRemove(this.target),me.safeRemove(this.container),t.events&&t.events.off([t.ownerWindow],"scroll resize",this.reCalcPosition).off([t.ownerWindow],"mouseup keyup touchend",this.onSelectionEnd).off([t.ownerWindow],"mousedown keydown touchstart",this.checkIsTargetEvent)}}function Wo(t){const e=e=>{const i=i=>{if(i instanceof t.editorWindow.HTMLElement)switch(e.toLowerCase()){case"justifyfull":i.style.textAlign="justify";break;case"justifyright":i.style.textAlign="right";break;case"justifyleft":i.style.textAlign="left";break;case"justifycenter":i.style.textAlign="center"}};return t.selection.focus(),t.selection.eachSelection(e=>{if(!e&&t.editor.querySelector(".jodit_selected_cell"))return zt(".jodit_selected_cell",t.editor).forEach(i),!1;if(!(e instanceof t.editorWindow.Node))return;let o=!!e&&me.up(e,e=>me.isBlock(e,t.editorWindow),t.editor);!o&&e&&(o=me.wrapInline(e,t.options.enterBlock,t)),i(o)}),!1};t.registerCommand("justifyfull",e),t.registerCommand("justifyright",e),t.registerCommand("justifyleft",e),t.registerCommand("justifycenter",e)}function $o(t){if(t&&(t.options.limitWords||t.options.limitChars)){const e=(e,i="")=>{const o=(i||(t.options.limitHTML?t.value:t.getEditorText())).replace(d,"").split(p).filter(t=>t.length);if(!e||-1===D.indexOf(e.which))return t.options.limitWords&&o.length>=t.options.limitWords?t.options.limitWords===o.length:t.options.limitChars&&t.options.limitChars<=o.join("").length?t.options.limitChars===o.join("").length:void 0};let i=null;t.events.on("beforePaste",()=>{i=t.observer.snapshot.make()}).on("keydown keyup beforeEnter beforePaste",t=>{if(void 0!==e(t))return!1}).on("change",nt((i,o)=>{!1===e(null,t.options.limitHTML?i:Ot(i))&&(t.value=o)},t.defaultTimeout)).on("afterPaste",()=>{if(!1===e(null)&&i)return t.observer.snapshot.restore(i),!1})}}function Uo(t){t.options.link.followOnDblClick&&t.events.on("afterInit",()=>{t.events.on(t.editor,"dblclick",(function(t){const e=this.getAttribute("href");e&&(location.href=e,t.preventDefault())}),"a")}),t.options.link.processPastedLink&&t.events.on("processPaste",(e,i)=>{if(xt(i)){const e=se(i);if(e!==i)return t.create.inside.fromHTML(e);const o=t.create.inside.element("a");return o.setAttribute("href",i),o.textContent=i,o}}),t.options.link.removeLinkAfterFormat&&t.events.on("afterCommand",e=>{let i,o;"removeFormat"===e&&(o=t.selection.current(),o&&"A"!==o.nodeName&&(o=me.closest(o,"A",t.editor)),o&&"A"===o.nodeName&&(o.innerHTML===o.textContent?i=t.editorDocument.createTextNode(o.innerHTML):(i=t.editorDocument.createElement("span"),i.innerHTML=o.innerHTML),o.parentNode&&(o.parentNode.replaceChild(i,o),t.selection.setCursorIn(i,!0))))})}function Ko(t){const e="jodit_fake_wrapper",{mediaFakeTag:i,mediaBlocks:o,mediaInFakeBlock:s}=t.options;s&&t.events.on("afterGetValueFromEditor",t=>{const o=RegExp(`<${i}[^>]+data-${e}[^>]+>(.+?)`,"ig");o.test(t.value)&&(t.value=t.value.replace(o,"$1"))}).on("change afterInit afterSetMode",nt(()=>{t.isDestructed||t.getMode()===P||zt(o.join(","),t.editor).forEach(o=>{o["__"+e]||(o["__"+e]=!0,(o=>{if(o.parentNode&&o.parentNode.getAttribute("data-jodit_iframe_wrapper"))o=o.parentNode;else{let s;s=t.create.inside.fromHTML("<"+i+' data-jodit-temp="1" contenteditable="false" draggable="true" data-'+e+'="1">"),s.style.display="inline-block"===o.style.display?"inline-block":"block",s.style.width=o.offsetWidth+"px",s.style.height=o.offsetHeight+"px",o.parentNode&&o.parentNode.insertBefore(s,o),s.appendChild(o),o=s}t.events.off(o,"mousedown.select touchstart.select").on(o,"mousedown.select touchstart.select",()=>{t.selection.setCursorAfter(o)})})(o))})},t.defaultTimeout))}function Xo(t){let e,i=0,o=ot(t.options.buttons);t.events.on("touchend",o=>{o.changedTouches&&o.changedTouches.length&&(e=(new Date).getTime(),e-i>t.options.mobileTapTimeout&&(i=e,t.selection.insertCursorAtPoint(o.changedTouches[0].clientX,o.changedTouches[0].clientY)))}).on("getDiffButtons.mobile",e=>{if(e===t.toolbar)return ot(t.options.buttons).filter(t=>0>o.indexOf(t))}),t.options.toolbarAdaptive&&t.events.on("resize afterInit",()=>{if(!t.options.toolbar)return;const e=t.container.offsetWidth;let i=[];i=ot(t.options.sizeLG>e?t.options.sizeMD>e?t.options.sizeSM>e?t.options.buttonsXS:t.options.buttonsSM:t.options.buttonsMD:t.options.buttons),""+i!=""+o&&(o=i,t.toolbar.build(o.concat(t.options.extraButtons),t.toolbar.container.parentElement||t.toolbar.getParentContainer()))})}function Yo(t){t.events.on("afterCommand",e=>{if(/insert(un)?orderedlist/i.test(e)){const e=me.up(t.selection.current(),t=>t&&/^UL|OL$/i.test(t.nodeName),t.editor);if(e&&e.parentNode&&"P"===e.parentNode.nodeName){const i=t.selection.save();me.unwrap(e.parentNode),Array.from(e.childNodes).forEach(t=>{t.lastChild&&t.lastChild.nodeType===Node.ELEMENT_NODE&&"BR"===t.lastChild.nodeName&&me.safeRemove(t.lastChild)}),t.selection.restore(i)}t.setEditorValue()}})}function Go(t){if(!t.options.showPlaceholder)return;this.destruct=()=>{me.safeRemove(o)};const e=()=>{o.parentNode&&(o.style.display="none")},i=nt(()=>{if(null===o.parentNode)return;if(!t.editor)return;if(t.getRealMode()!==H)return e();const i=t.getEditorValue();i&&!/^<(p|div|h[1-6])><\/\1>$/.test(i)?e():(()=>{if(!o.parentNode||t.options.readonly)return;let e=0,i=0;const s=t.editorWindow.getComputedStyle(t.editor);if(t.editor.firstChild&&t.editor.firstChild.nodeType===Node.ELEMENT_NODE){const s=t.editorWindow.getComputedStyle(t.editor.firstChild);e=parseInt(s.getPropertyValue("margin-top"),10),i=parseInt(s.getPropertyValue("margin-left"),10),o.style.fontSize=parseInt(s.getPropertyValue("font-size"),10)+"px",o.style.lineHeight=s.getPropertyValue("line-height")}else o.style.fontSize=parseInt(s.getPropertyValue("font-size"),10)+"px",o.style.lineHeight=s.getPropertyValue("line-height");ne(o,{display:"block",marginTop:Math.max(parseInt(s.getPropertyValue("margin-top"),10),e),marginLeft:Math.max(parseInt(s.getPropertyValue("margin-left"),10),i)})})()},t.defaultTimeout/10),o=t.create.fromHTML('");"rtl"===t.options.direction&&(o.style.right="0px",o.style.direction="rtl"),t.options.useInputsPlaceholder&&t.element.hasAttribute("placeholder")&&(o.innerHTML=t.element.getAttribute("placeholder")||""),t.events.on("readonly",t=>{t?e():i()}).on("afterInit",()=>{t.workplace.appendChild(o),i(),t.events.fire("placeholder",o.innerHTML),t.events.on("change keyup mouseup keydown mousedown afterSetMode",i).on(window,"load",i)})}we.prototype.controls.align={name:"left",tooltip:"Align",getLabel(t,e,i){const o=t.selection.current();if(o){const s=me.closest(o,e=>me.isBlock(e,t.editorWindow),t.editor)||t.editor;let n=""+ne(s,"text-align");e.defaultValue&&-1!==e.defaultValue.indexOf(n)&&(n="left"),i&&e.data&&e.data.currentValue!==n&&e.list&&-1!==e.list.indexOf(n)&&(i.textBox.innerHTML=t.options.textIcons?`${n}`:ge.getIcon(n,""),i.textBox.firstChild.classList.add("jodit_icon"),e.data.currentValue=n)}return!1},isActive(t,e){const i=t.selection.current();if(i&&e.defaultValue){const o=me.closest(i,e=>me.isBlock(e,t.editorWindow),t.editor)||t.editor;return-1===e.defaultValue.indexOf(""+ne(o,"text-align"))}return!1},defaultValue:["left","start","inherit"],data:{currentValue:"left"},list:["center","left","right","justify"]},we.prototype.controls.center={command:"justifyCenter",css:{"text-align":"center"},tooltip:"Align Center"},we.prototype.controls.justify={command:"justifyFull",css:{"text-align":"justify"},tooltip:"Align Justify"},we.prototype.controls.left={command:"justifyLeft",css:{"text-align":"left"},tooltip:"Align Left"},we.prototype.controls.right={command:"justifyRight",css:{"text-align":"right"},tooltip:"Align Right"},we.prototype.limitWords=!1,we.prototype.limitChars=!1,we.prototype.limitHTML=!1,we.prototype.link={followOnDblClick:!0,processVideoLink:!0,processPastedLink:!0,openLinkDialogAfterPost:!0,removeLinkAfterFormat:!0,noFollowCheckbox:!0,openInNewTabCheckbox:!0},we.prototype.controls.unlink={exec(t,e){const i=me.closest(e,"A",t.editor);i&&me.unwrap(i),t.events.fire("hidePopup")}},we.prototype.controls.link={isActive(t){const e=t.selection.current();return e&&!1!==me.closest(e,"a",t.editor)},popup(t,e,i,o){const s=t.selection.sel,n=t.create.fromHTML('
'+(t.options.link.openInNewTabCheckbox?'":"")+(t.options.link.noFollowCheckbox?'":"")+'
  
');e=!(!e||!me.closest(e,"A",t.editor))&&me.closest(e,"A",t.editor);const r=n.querySelector(".jodit_link_insert_button"),a=n.querySelector(".jodit_unlink_button");e?(fe(n,"input[name=url]",e.getAttribute("href")||""),fe(n,"input[name=text]",e.textContent||""),t.options.link.openInNewTabCheckbox&&(n.querySelector("input[name=target]").checked="_blank"===e.getAttribute("target")),t.options.link.noFollowCheckbox&&(n.querySelector("input[name=nofollow]").checked="nofollow"===e.getAttribute("rel")),r&&(r.innerHTML=t.i18n("Update"))):(a&&(a.style.display="none"),fe(n,"input[name=text]",s?""+s:""),r&&(r.innerHTML=t.i18n("Insert")));const l=t.selection.save();return a&&a.addEventListener("mousedown",i=>{e&&me.unwrap(e),t.selection.restore(l),o(),i.preventDefault()}),n.addEventListener("submit",i=>{i.preventDefault(),t.selection.restore(l);const s=e||t.editorDocument.createElement("a");return fe(n,"input[name=url]")?(s.setAttribute("href",fe(n,"input[name=url]")),s.textContent=fe(n,"input[name=text]"),t.options.link.openInNewTabCheckbox&&(n.querySelector("input[name=target]").checked?s.setAttribute("target","_blank"):s.removeAttribute("target")),t.options.link.noFollowCheckbox&&(n.querySelector("input[name=nofollow]").checked?s.setAttribute("rel","nofollow"):s.removeAttribute("rel")),e||t.selection.insertNode(s),o(),!1):(n.querySelector("input[name=url]").focus(),n.querySelector("input[name=url]").classList.add("jodit_error"),!1)}),n},tags:["a"],tooltip:"Insert link"},we.prototype.mediaFakeTag="jodit-media",we.prototype.mediaInFakeBlock=!0,we.prototype.mediaBlocks=["video","audio"],we.prototype.mobileTapTimeout=300,we.prototype.toolbarAdaptive=!0,we.prototype.controls.dots={mode:P+H,popup(t,e,i,o,s){let n=i.data;if(void 0===n){n={container:t.create.div(),toolbar:Ge.makeCollection(t),rebuild(){if(s){const e=t.events.fire("getDiffButtons.mobile",s.parentToolbar);e&&n&&n.toolbar.build(ot(e),n.container)}}};let e=32;const o=t.options.toolbarButtonSize;"large"===o?e=36:"small"===o&&(e=24),n.container.style.width=3*e+"px",i.data=n}return n.rebuild(),n.container}},we.prototype.controls.ul={command:"insertUnorderedList",controlName:"ul",tags:["ul"],tooltip:"Insert Unordered List"},we.prototype.controls.ol={command:"insertOrderedList",controlName:"ol",tags:["ol"],tooltip:"Insert Ordered List"},we.prototype.showPlaceholder=!0,we.prototype.useInputsPlaceholder=!0,we.prototype.placeholder="Type something",we.prototype.controls.redo={mode:O,isDisable:t=>!t.observer.stack.canRedo(),tooltip:"Redo"},we.prototype.controls.undo={mode:O,isDisable:t=>!t.observer.stack.canUndo(),tooltip:"Undo"};class Jo extends Fi{beforeDestruct(){}afterInit(t){const e=e=>(t.getRealMode()===H&&t.observer[e](),!1);t.registerCommand("redo",{exec:e,hotkeys:["ctrl+y","ctrl+shift+z","cmd+y","cmd+shift+z"]}),t.registerCommand("undo",{exec:e,hotkeys:["ctrl+z","cmd+z"]})}}function Zo(t){let e,i,o,s,n,r,a,l,d,c,h,p=!1,u=!1,f=!1,m=0;const g=t.create.fromHTML(''),v=g.getElementsByTagName("span")[0],b=()=>{u=!1,f=!1,i=null,g.style.display="none"},y=()=>{v.style.opacity="0"},_=()=>{if(f&&i&&g){const e=Qt(g.parentNode||t.ownerDocument.documentElement,t,t.ownerDocument,!0),o=Qt(i,t,t.editorDocument),s=parseInt(g.style.left||"0",10),n=g.offsetWidth,r=g.offsetHeight,a=o.top-1-e.top,l=o.left-1-e.left;parseInt(g.style.top||"0",10)===a&&s===l&&n===i.offsetWidth&&r===i.offsetHeight||(g.style.top=a+"px",g.style.left=l+"px",g.style.width=i.offsetWidth+"px",g.style.height=i.offsetHeight+"px",t.events&&(t.events.fire(i,"changesize"),isNaN(s)||t.events.fire("resize")))}};zt("i",g).forEach(l=>{t.events.on(l,"mousedown touchstart",d=>{if(!i||!i.parentNode)return b(),!1;e=l,d.preventDefault(),d.stopImmediatePropagation(),n=i.offsetWidth,r=i.offsetHeight,a=n/r,u=!0,o=d.clientX,s=d.clientY,t.events.fire("hidePopup"),t.lock("resizer")})}),t.events.on("readonly",t=>{t&&b()}).on("beforeDestruct",()=>{me.safeRemove(g)}).on("afterInit",()=>{t.events.on(t.editor,"keydown",e=>{f&&e.which===T&&i&&"table"!==i.tagName.toLowerCase()&&("JODIT"!==i.tagName?t.selection.select(i):(me.safeRemove(i),b(),e.preventDefault()))}).on(t.ownerWindow,"mousemove touchmove",p=>{if(u){if(c=p.clientX-o,h=p.clientY-s,!i)return;const u=e.className;"IMG"===i.tagName?(c?(d=n+(u.match(/left/)?-1:1)*c,l=Math.round(d/a)):(l=r+(u.match(/top/)?-1:1)*h,d=Math.round(l*a)),d>Zt(t.editor,t.ownerWindow)&&(d=Zt(t.editor,t.ownerWindow),l=Math.round(d/a))):(d=n+(u.match(/left/)?-1:1)*c,l=r+(u.match(/top/)?-1:1)*h),d>t.options.resizer.min_width&&(i.style.width=g.parentNode.offsetWidth>d?d+"px":"100%"),l>t.options.resizer.min_height&&(i.style.height=l+"px"),_(),((e,i)=>{t.options.resizer.showSize&&(v.offsetWidth>e||v.offsetHeight>i?y():(v.style.opacity="1",v.innerHTML=`${e} x ${i}`,clearTimeout(m),m=st(y,t.options.resizer.hideSizeTimeout)))})(i.offsetWidth,i.offsetHeight),p.stopImmediatePropagation()}}).on(t.ownerWindow,"resize",()=>{f&&_()}).on(t.ownerWindow,"mouseup keydown touchend",e=>{f&&!p&&(u?(t.unlock(),u=!1,t.setEditorValue(),e.stopImmediatePropagation()):b())}).on([t.ownerWindow,t.editor],"scroll",()=>{f&&!u&&b()})}).on("afterGetValueFromEditor",t=>{const e=/]+data-jodit_iframe_wrapper[^>]+>(.*?]+>[\s\n\r]*<\/iframe>.*?)<\/jodit>/gi;e.test(t.value)&&(t.value=t.value.replace(e,"$1"))}).on("hideResizer",b).on("change afterInit afterSetMode",nt(()=>{f&&(i&&i.parentNode?_():b()),t.isDestructed||zt("img, table, iframe",t.editor).forEach(e=>{t.getMode()!==P&&!e.__jodit_resizer_binded&&("IFRAME"===e.tagName&&t.options.useIframeResizer||"IMG"===e.tagName&&t.options.useImageResizer||"TABLE"===e.tagName&&t.options.useTableResizer)&&(e.__jodit_resizer_binded=!0,(e=>{let o,s;if("IFRAME"===e.tagName){const i=e;e.parentNode&&e.parentNode.getAttribute("data-jodit_iframe_wrapper")?e=e.parentNode:(o=t.create.inside.fromHTML(''),o.style.display="inline-block"===e.style.display?"inline-block":"block",o.style.width=e.offsetWidth+"px",o.style.height=e.offsetHeight+"px",e.parentNode&&e.parentNode.insertBefore(o,e),o.appendChild(e),e=o),t.events.off(e,"mousedown.select touchstart.select").on(e,"mousedown.select touchstart.select",()=>{t.selection.select(e)}),t.events.off(e,"changesize").on(e,"changesize",()=>{i.setAttribute("width",e.offsetWidth+"px"),i.setAttribute("height",e.offsetHeight+"px")})}t.events.on(e,"dragstart",b).on(e,"mousedown",t=>{F&&"IMG"===e.nodeName&&t.preventDefault()}).on(e,"mousedown touchstart",()=>{p||(p=!0,i=e,t.options.readonly||(g.parentNode||t.workplace.appendChild(g),f=!0,g.style.display="block",t.isFullSize()&&(g.style.zIndex=""+ne(t.container,"zIndex")),_()),"IMG"!==i.tagName||i.complete||i.addEventListener("load",(function t(){_(),i&&i.removeEventListener("load",t)})),clearTimeout(s)),s=st(()=>{p=!1},400)})})(e))})},t.defaultTimeout))}we.prototype.useIframeResizer=!0,we.prototype.useTableResizer=!0,we.prototype.useImageResizer=!0,we.prototype.resizer={showSize:!0,hideSizeTimeout:1e3,min_width:10,min_height:10},we.prototype.useSearch=!0;class Qo extends Fi{constructor(){super(...arguments),this.template='",this.isOpened=!1,this.selInfo=null,this.current=!1,this.eachMap=(t,e,i)=>{me.findWithCurrent(t,t=>!!t&&e(t),this.jodit.editor,i?"nextSibling":"previousSibling",i?"firstChild":"lastChild")},this.updateCounters=()=>{if(!this.isOpened)return;this.counterBox.style.display=this.queryInput.value.length?"inline-block":"none";const t=this.calcCounts(this.queryInput.value,this.jodit.selection.range);this.counterBox.textContent=t.join("/")},this.calcCounts=(t,e=!1)=>{const i=[];let o=0,s=0,n=!1,r=this.jodit.editor.firstChild;for(;r&&t.length;)if(n=this.find(r,t,!0,0,n||this.jodit.editorDocument.createRange()),n){if(this.boundAlreadyWas(n,i))break;i.push(n),r=n.startContainer,s+=1,e&&this.boundAlreadyWas(e,[n])&&(o=s)}else r=null;return[o,s]},this.findAndReplace=(t,e)=>{const i=this.find(t,e,!0,0,this.jodit.selection.range);if(i&&i.startContainer&&i.endContainer){const t=this.jodit.editorDocument.createRange();try{if(i&&i.startContainer&&i.endContainer){t.setStart(i.startContainer,i.startOffset),t.setEnd(i.endContainer,i.endOffset),t.deleteContents();const e=this.jodit.editorDocument.createTextNode(this.replaceInput.value);t.insertNode(e),this.jodit.selection.select(e),this.tryScrollToElement(e)}}catch(t){}return!0}return!1},this.findAndSelect=(t,e,i)=>{const o=this.find(t,e,i,0,this.jodit.selection.range);if(o&&o.startContainer&&o.endContainer){const t=this.jodit.editorDocument.createRange();try{t.setStart(o.startContainer,o.startOffset),t.setEnd(o.endContainer,o.endOffset),this.jodit.selection.selectRange(t)}catch(t){}return this.tryScrollToElement(o.startContainer),this.current=o.startContainer,this.updateCounters(),!0}return!1},this.find=(t,e,i,o,s)=>{if(t&&e.length){let n="",r={startContainer:null,startOffset:null,endContainer:null,endOffset:null};if(this.eachMap(t,t=>{if(t.nodeType===Node.TEXT_NODE&&null!==t.nodeValue&&t.nodeValue.length){let a=t.nodeValue;i||t!==s.startContainer?i&&t===s.endContainer&&(a=o?a.substr(0,s.startOffset):a.substr(s.endOffset)):a=o?a.substr(s.endOffset):a.substr(0,s.startOffset);const l=i?n+a:a+n,d=Qo.findSomePartOfString(e,l,i);if(!1!==d){let s=Qo.findSomePartOfString(e,a,i);!0===s?s=Mt(e):!1===s&&(s=Qo.findSomePartOfString(a,e,i),!0===s&&(s=Mt(a)));let c=Qo.getSomePartOfStringIndex(e,a,i)||0;if((i&&!o||!i&&o)&&t.nodeValue.length-a.length>0&&(c+=t.nodeValue.length-a.length),null===r.startContainer&&(r.startContainer=t,r.startOffset=c),!0===d)return r.endContainer=t,r.endOffset=c,r.endOffset+=s.length,!0;n=l}else n="",r={startContainer:null,startOffset:null,endContainer:null,endOffset:null}}else me.isBlock(t,this.jodit.editorWindow)&&""!==n&&(n=i?n+" ":" "+n);return!1},i),r.startContainer&&r.endContainer)return r;if(!o)return this.current=i?this.jodit.editor.firstChild:this.jodit.editor.lastChild,this.find(this.current,e,i,o+1,s)}return!1},this.open=(t=!1)=>{this.isOpened||(this.searchBox.classList.add("jodit_search-active"),this.isOpened=!0),this.jodit.events.fire("hidePopup"),this.searchBox.classList.toggle("jodit_search-and-replace",t),this.current=this.jodit.selection.current(),this.selInfo=this.jodit.selection.save();const e=""+(this.jodit.selection.sel||"");e&&(this.queryInput.value=e),this.updateCounters(),e?this.queryInput.select():this.queryInput.focus()},this.close=()=>{this.isOpened&&(this.selInfo&&(this.jodit.selection.restore(this.selInfo),this.selInfo=null),this.searchBox.classList.remove("jodit_search-active"),this.isOpened=!1)}}static getSomePartOfStringIndex(t,e,i=!0){return this.findSomePartOfString(t,e,i,!0)}static findSomePartOfString(t,e,i=!0,o=!1){t=Mt(t.toLowerCase().replace(p," ")),e=e.toLowerCase();let s=i?0:e.length-1,n=i?0:t.length-1,r=0,a=null;const l=i?1:-1,d=[];for(;void 0!==e[s];s+=l){const c=t[n]===e[s];if(c||null!==a&&p.test(e[s])?(null!==a&&i||(a=s),d.push(e[s]),c&&(r+=1,n+=l)):(a=null,d.length=0,r=0,n=i?0:t.length-1),r===t.length)return!o||a}return o?null!=a&&a:!!d.length&&(i?d.join(""):d.reverse().join(""))}boundAlreadyWas(t,e){return e.some(e=>e.startContainer===t.startContainer&&e.endContainer===t.endContainer&&e.startOffset===t.startOffset&&e.endOffset===t.endOffset,!1)}tryScrollToElement(t){let e=me.closest(t,t=>t&&t.nodeType===Node.ELEMENT_NODE,this.jodit.editor);e||(e=me.prev(t,t=>t&&t.nodeType===Node.ELEMENT_NODE,this.jodit.editor)),e&&e!==this.jodit.editor&&e.scrollIntoView()}afterInit(t){if(t.options.useSearch){const e=this;e.searchBox=t.create.fromHTML(e.template);const i=e.searchBox.querySelector.bind(e.searchBox);e.queryInput=i("input.jodit_search-query"),e.replaceInput=i("input.jodit_search-replace"),e.closeButton=i(".jodit_search_buttons-cancel"),e.nextButton=i(".jodit_search_buttons-next"),e.prevButton=i(".jodit_search_buttons-prev"),e.replaceButton=i(".jodit_search_buttons-replace"),e.counterBox=i(".jodit_search_counts span"),t.workplace.appendChild(this.searchBox),t.events.on(e.closeButton,"click",this.close).on(e.queryInput,"mousedown",()=>{t.selection.isFocused()&&(t.selection.removeMarkers(),e.selInfo=t.selection.save())}).on(e.replaceButton,"click",i=>{e.findAndReplace(t.selection.current()||t.editor.firstChild,e.queryInput.value),this.updateCounters(),i.preventDefault(),i.stopImmediatePropagation()}).on([e.nextButton,e.prevButton],"click",(function(i){t.events.fire(e.nextButton===this?"searchNext":"searchPrevious"),i.preventDefault(),i.stopImmediatePropagation()})).on(this.queryInput,"keydown",nt(e=>{switch(e.which){case _:e.preventDefault(),e.stopImmediatePropagation(),t.events.fire("searchNext")&&this.close();break;default:this.updateCounters()}},this.jodit.defaultTimeout)).on(this.jodit.container,"keydown.search",i=>{if(t.getRealMode()===H)switch(i.which){case w:this.close();break;case M:e.queryInput.value&&(t.events.fire(i.shiftKey?"searchPrevious":"searchNext"),i.preventDefault())}}).on("beforeSetMode.search",()=>{this.close()}).on("keydown.search mousedown.search",()=>{this.selInfo&&(t.selection.removeMarkers(),this.selInfo=null),this.isOpened&&(this.current=this.jodit.selection.current(),this.updateCounters())}).on("searchNext.search searchPrevious.search",()=>e.findAndSelect(t.selection.current()||t.editor.firstChild,e.queryInput.value,"searchNext"===t.events.current[t.events.current.length-1])).on("search.search",(e,i=!0)=>{t.execCommand("search",e,i)}),t.registerCommand("search",{exec:(i,o,s=!0)=>(e.findAndSelect(t.selection.current()||t.editor.firstChild,o||"",s),!1)}),t.registerCommand("openSearchDialog",{exec:()=>(e.open(),!1),hotkeys:["ctrl+f","cmd+f"]}),t.registerCommand("openReplaceDialog",{exec:()=>(t.options.readonly||e.open(!0),!1),hotkeys:["ctrl+h","cmd+h"]})}}beforeDestruct(t){me.safeRemove(this.searchBox),t.events&&t.events.off(".search"),t.events&&t.events.off(t.container,".search")}}function ts(t){const e=e=>{ne(t.container,"height",e),t.options.saveHeightInStorage&&t.storage.set("height",e)},i=e=>ne(t.container,"width",e),o=e=>ne(t.workplace,"height",e);if("auto"!==t.options.height&&(t.options.allowResizeX||t.options.allowResizeY)){const o=t.create.div("jodit_editor_resize",''),s={x:0,y:0,w:0,h:0};let n=!1;t.events.on(o,"mousedown touchstart",e=>{n=!0,s.x=e.clientX,s.y=e.clientY,s.w=t.container.offsetWidth,s.h=t.container.offsetHeight,t.lock(),e.preventDefault()}).on(t.ownerWindow,"mousemove touchmove",rt(o=>{n&&(t.options.allowResizeY&&e(s.h+o.clientY-s.y),t.options.allowResizeX&&i(s.w+o.clientX-s.x),r(),t.events.fire("resize"))},t.defaultTimeout/10)).on(t.ownerWindow,"mouseup touchsend",()=>{n&&(n=!1,t.unlock())}).on("afterInit",()=>{t.container.appendChild(o)}).on("toggleFullSize",t=>{o.style.display=t?"none":"block"})}const s=()=>(t.options.toolbar?t.toolbar.container.offsetHeight:0)+(t.statusbar?t.statusbar.getHeight():0),n=()=>{if(!t.container||!t.container.parentNode)return;const e=ne(t.container,"minHeight")-s();[t.workplace,t.iframe,t.editor].map(i=>{const o=i===t.editor?e-2:e;i&&ne(i,"minHeight",o),t.events.fire("setMinHeight",o)})},r=()=>{t&&!t.isDestructed&&t.options&&!t.options.inline&&(n(),t.container&&("auto"!==t.options.height||t.isFullSize())&&o(t.container.offsetHeight-s()))},a=nt(r,t.defaultTimeout);t.events.on("toggleFullSize",e=>{e||"auto"!==t.options.height||(o("auto"),n())}).on("afterInit",()=>{t.options.inline||(ne(t.editor,{minHeight:"100%"}),ne(t.container,{minHeight:t.options.minHeight,minWidth:t.options.minWidth,maxWidth:t.options.maxWidth}));let o=t.options.height;if(t.options.saveHeightInStorage&&"auto"!==o){const e=t.storage.get("height");e&&(o=e)}t.options.inline||(e(o),i(t.options.width)),r()},void 0,void 0,!0).on(window,"load",a).on("afterInit resize updateToolbar scroll afterResize",a)}we.prototype.allowResizeX=!1,we.prototype.allowResizeY=!0,we.prototype.beautifyHTML=!0,we.prototype.useAceEditor=!0,we.prototype.sourceEditorNativeOptions={showGutter:!0,theme:"ace/theme/idle_fingers",mode:"ace/mode/html",wrap:!0,highlightActiveLine:!0},we.prototype.sourceEditorCDNUrlsJS=["https://cdnjs.cloudflare.com/ajax/libs/ace/1.4.5/ace.js"],we.prototype.beautifyHTMLCDNUrlsJS=["https://cdnjs.cloudflare.com/ajax/libs/js-beautify/1.10.0/beautify.min.js","https://cdnjs.cloudflare.com/ajax/libs/js-beautify/1.10.0/beautify-html.min.js"],we.prototype.controls.source={mode:O,exec(t){t.toggleMode()},isActive:t=>t.getRealMode()===P,tooltip:"Change mode"};class es extends Fi{constructor(){super(...arguments),this.className="jodit_ace_editor",this.__lock=!1,this.__oldMirrorValue="",this.autosize=nt(()=>{this.mirror.style.height="auto",this.mirror.style.height=this.mirror.scrollHeight+"px"},this.jodit.defaultTimeout),this.tempMarkerStart="{start-jodit-selection}",this.tempMarkerStartReg=/{start-jodit-selection}/g,this.tempMarkerEnd="{end-jodit-selection}",this.tempMarkerEndReg=/{end-jodit-selection}/g,this.selInfo=[],this.lastTuple=null,this.loadNext=(t,e,i="aceReady",o=this.className)=>{if(i&&void 0===e[t]&&!this.isDestructed)return this.jodit&&this.jodit.events&&this.jodit.events.fire(i),void(this.jodit&&this.jodit.events&&this.jodit.events.fire(this.jodit.ownerWindow,i));void 0!==e[t]&&(this.lastTuple&&this.lastTuple.element.removeEventListener("load",this.lastTuple.callback),this.lastTuple=ee(e[t],()=>{this.isDestructed||this.loadNext(t+1,e,i,o)},o,this.jodit.ownerDocument))},this.insertHTML=t=>{if(this.mirror.selectionStart||0===this.mirror.selectionStart){const e=this.mirror.selectionEnd;this.mirror.value=this.mirror.value.substring(0,this.mirror.selectionStart)+t+this.mirror.value.substring(e,this.mirror.value.length)}else this.mirror.value+=this.mirror;this.toWYSIWYG()},this.fromWYSIWYG=(t=!1)=>{if(!this.__lock||!0===t){this.__lock=!0;const t=this.jodit.getEditorValue(!1);t!==this.getMirrorValue()&&this.setMirrorValue(t),this.__lock=!1}},this.toWYSIWYG=()=>{if(this.__lock)return;const t=this.getMirrorValue();t!==this.__oldMirrorValue&&(this.__lock=!0,this.jodit.setEditorValue(t),this.__lock=!1,this.__oldMirrorValue=t)},this.getNormalPosition=(t,e)=>{let i=t;for(;i>0;){if(i--,"<"===e[i]&&void 0!==e[i+1]&&e[i+1].match(/[\w\/]+/i))return i;if(">"===e[i])return t}return t},this.__clear=t=>t.replace(d,""),this.selectAll=()=>{this.mirror.select()},this.onSelectAll=t=>{if("selectall"===t.toLowerCase()&&this.jodit.getRealMode()===P)return this.selectAll(),!1},this.getSelectionStart=()=>this.mirror.selectionStart,this.getSelectionEnd=()=>this.mirror.selectionEnd,this.saveSelection=()=>{if(this.jodit.getRealMode()===H)this.selInfo=this.jodit.selection.save()||[],this.jodit.setEditorValue(),this.fromWYSIWYG(!0);else{this.selInfo.length=0;const t=this.getMirrorValue();if(this.getSelectionStart()===this.getSelectionEnd()){const e=this.jodit.selection.marker(!0);this.selInfo[0]={startId:e.id,collapsed:!0,startMarker:e.outerHTML};const i=this.getNormalPosition(this.getSelectionStart(),this.getMirrorValue());this.setMirrorValue(t.substr(0,i)+this.__clear(this.selInfo[0].startMarker)+t.substr(i))}else{const e=this.jodit.selection.marker(!0),i=this.jodit.selection.marker(!1);this.selInfo[0]={startId:e.id,endId:i.id,collapsed:!1,startMarker:this.__clear(e.outerHTML),endMarker:this.__clear(i.outerHTML)};const o=this.getNormalPosition(this.getSelectionStart(),t),s=this.getNormalPosition(this.getSelectionEnd(),t);this.setMirrorValue(t.substr(0,o)+this.selInfo[0].startMarker+t.substr(o,s-o)+this.selInfo[0].endMarker+t.substr(s))}this.toWYSIWYG()}},this.restoreSelection=()=>{if(!this.selInfo.length)return;if(this.jodit.getRealMode()===H)return this.__lock=!0,this.jodit.selection.restore(this.selInfo),void(this.__lock=!1);let t=this.getMirrorValue(),e=0,i=0;try{this.selInfo[0].startMarker&&(t=t.replace(/]+data-jodit_selection_marker="start"[^>]*>[<>]*?<\/span>/gim,this.tempMarkerStart)),this.selInfo[0].endMarker&&(t=t.replace(/]+data-jodit_selection_marker="end"[^>]*>[<>]*?<\/span>/gim,this.tempMarkerEnd)),this.jodit.ownerWindow.html_beautify&&this.jodit.options.beautifyHTML&&(t=this.jodit.ownerWindow.html_beautify(t)),e=t.indexOf(this.tempMarkerStart),i=e,t=t.replace(this.tempMarkerStartReg,""),this.selInfo[0].collapsed&&-1!==e||(i=t.indexOf(this.tempMarkerEnd),-1===e&&(e=i)),t=t.replace(this.tempMarkerEndReg,"")}finally{t=t.replace(this.tempMarkerEndReg,"").replace(this.tempMarkerStartReg,"")}this.setMirrorValue(t),this.setMirrorSelectionRange(e,i),this.toWYSIWYG(),this.setFocusToMirror()},this.__proxyOnFocus=t=>{this.jodit.events.fire("focus",t)},this.__proxyOnMouseDown=t=>{this.jodit.events.fire("mousedown",t)},this.setMirrorSelectionRange=(t,e)=>{this.mirror.setSelectionRange(t,e)},this.onReadonlyReact=()=>{const t=this.jodit.options.readonly;t?this.mirror.setAttribute("readonly","true"):this.mirror.removeAttribute("readonly"),this.aceEditor&&this.aceEditor.setReadOnly(t)}}getMirrorValue(){return this.mirror.value}setMirrorValue(t){this.mirror.value=t}setFocusToMirror(){this.mirror.focus()}replaceMirrorToACE(){const t=this.jodit;let e,i;const o=()=>{i&&t.getRealMode()===P&&(t.events.fire("canRedo",i.hasRedo()),t.events.fire("canUndo",i.hasUndo()))},s=t=>e.session.getLine(t).length,n=()=>{const t=e.session.getLength(),i=[];let o=0;for(let e=0;t>e;e++)o+=s(e),e>0&&(o+=1),i[e]=o;return i},r=t=>{const e=n();if(e[0]>=t)return{row:0,column:t};let i=1;for(let o=1;e.length>o;o++)t>e[o]&&(i=o+1);return{row:i,column:t-e[i-1]-1}},a=(t,e)=>n()[t]-s(t)+e,l=()=>{if(void 0===e&&void 0!==this.jodit.ownerWindow.ace){this.jodit.events.off(this.jodit.ownerWindow,"aceReady",l);const s=this.jodit.create.div("jodit_source_mirror-fake");this.mirrorContainer.insertBefore(s,this.mirrorContainer.firstChild),this.aceEditor=e=this.jodit.ownerWindow.ace.edit(s),e.setTheme(t.options.sourceEditorNativeOptions.theme),e.renderer.setShowGutter(t.options.sourceEditorNativeOptions.showGutter),e.getSession().setMode(t.options.sourceEditorNativeOptions.mode),e.setHighlightActiveLine(t.options.sourceEditorNativeOptions.highlightActiveLine),e.getSession().setUseWrapMode(!0),e.setOption("indentedSoftWrap",!1),e.setOption("wrap",t.options.sourceEditorNativeOptions.wrap),e.getSession().setUseWorker(!1),e.$blockScrolling=1/0,e.setOptions({maxLines:1/0}),e.on("change",this.toWYSIWYG),e.on("focus",this.__proxyOnFocus),e.on("mousedown",this.__proxyOnMouseDown),this.mirror.style.display="none",i=e.getSession().getUndoManager(),this.setMirrorValue=i=>{e.setValue(t.options.beautifyHTML&&t.ownerWindow.html_beautify?t.ownerWindow.html_beautify(i):i),e.clearSelection(),o()},this.jodit.getRealMode()!==H&&this.setMirrorValue(this.getMirrorValue()),this.getMirrorValue=()=>e.getValue(),this.setFocusToMirror=()=>{e.focus()},this.getSelectionStart=()=>{const t=e.selection.getRange();return a(t.start.row,t.start.column)},this.getSelectionEnd=()=>{const t=e.selection.getRange();return a(t.end.row,t.end.column)},this.selectAll=()=>{e.selection.selectAll()},this.insertHTML=t=>{const i=e.selection.getCursor(),o=e.session.insert(i,t);e.selection.setRange({start:i,end:o},!1)},this.setMirrorSelectionRange=(t,i)=>{((t,i)=>{const o=r(t),s=r(i);e.getSelection().setSelectionRange({start:o,end:s})})(t,i)},t.events.on("afterResize",()=>{e.resize()}).fire("aceInited",t)}};t.events.on(this.jodit.ownerWindow,"aceReady",l).on("aceReady",l).on("afterSetMode",()=>{t.getRealMode()!==P&&t.getMode()!==O||(this.fromWYSIWYG(),l())}).on("beforeCommand",s=>{if(t.getRealMode()!==H&&("redo"===s||"undo"===s)&&i)return i["has"+s.substr(0,1).toUpperCase()+s.substr(1)]&&e[s](),o(),!1}),l(),void 0!==this.jodit.ownerWindow.ace||zt("script."+this.className,this.jodit.ownerDocument.body).length||this.loadNext(0,t.options.sourceEditorCDNUrlsJS,"aceReady",this.className)}afterInit(t){this.mirrorContainer=t.create.div("jodit_source"),this.mirror=t.create.fromHTML('\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t"),s={},l=e.selection.save(),u=function(t){e.selection.restore(l),e.selection.insertHTML(t),n()};return e.options.textIcons?(s[e.i18n("Link")]=i,s[e.i18n("Code")]=r):(s[d.ToolbarIcon.getIcon("link")+" "+e.i18n("Link")]=i,s[d.ToolbarIcon.getIcon("source")+" "+e.i18n("Code")]=r),r.addEventListener("submit",(function(e){return e.preventDefault(),c.trim(c.val(r,"textarea[name=code]"))?(u(c.val(r,"textarea[name=code]")),!1):(r.querySelector("textarea[name=code]").focus(),r.querySelector("textarea[name=code]").classList.add("jodit_error"),!1)})),i.addEventListener("submit",(function(e){return e.preventDefault(),c.isURL(c.val(i,"input[name=code]"))?(u(c.convertMediaURLToVideoEmbed(c.val(i,"input[name=code]"))),!1):(i.querySelector("input[name=code]").focus(),i.querySelector("input[name=code]").classList.add("jodit_error"),!1)})),a(e,s)},tags:["iframe"],tooltip:"Insert youtube/vimeo video"}}},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.INVISIBLE_SPACE="\ufeff",t.INVISIBLE_SPACE_REG_EXP=/[\uFEFF]/g,t.INVISIBLE_SPACE_REG_EXP_END=/[\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|LI|H[1-6]|BLOCKQUOTE|TD|TH|TABLE|BODY|HTML|FIGCAPTION|FIGURE|DT|DD)$/i,t.IS_INLINE=/^(STRONG|SPAN|I|EM|B|SUP|SUB)$/,t.MAY_BE_REMOVED_WITH_KEY=/^(IMG|BR|IFRAME|SCRIPT|INPUT|TEXTAREA|HR|JODIT|JODIT-MEDIA)$/,t.KEY_BACKSPACE=8,t.KEY_TAB=9,t.KEY_ENTER=13,t.KEY_ESC=27,t.KEY_LEFT=37,t.KEY_UP=38,t.KEY_RIGHT=39,t.KEY_DOWN=40,t.KEY_DELETE=46,t.KEY_F=70,t.KEY_R=82,t.KEY_H=72,t.KEY_Y=89,t.KEY_V=86,t.KEY_Z=90,t.KEY_F3=114,t.NEARBY=5,t.ACCURACY=10,t.COMMAND_KEYS=[t.KEY_BACKSPACE,t.KEY_DELETE,t.KEY_UP,t.KEY_DOWN,t.KEY_RIGHT,t.KEY_LEFT,t.KEY_ENTER,t.KEY_ESC,t.KEY_F3,t.KEY_TAB],t.BR="br",t.PARAGRAPH="p",t.MODE_WYSIWYG=1,t.MODE_SOURCE=2,t.MODE_SPLIT=3,t.IS_IE="undefined"!=typeof navigator&&(-1!==navigator.userAgent.indexOf("MSIE")||/rv:11.0/i.test(navigator.userAgent)),t.URL_LIST=t.IS_IE?"url":"text/uri-list",t.TEXT_PLAIN=t.IS_IE?"text":"text/plain",t.TEXT_HTML=t.IS_IE?"text":"text/html",t.MARKER_CLASS="jodit_selection_marker",t.EMULATE_DBLCLICK_TIMEOUT=300,t.JODIT_SELECTED_CELL_MARKER="data-jodit-selected-cell",t.INSERT_AS_HTML="insert_as_html",t.INSERT_CLEAR_HTML="insert_clear_html",t.INSERT_AS_TEXT="insert_as_text",t.INSERT_ONLY_TEXT="insert_only_text",t.IS_MAC="undefined"!=typeof window&&/Mac|iPod|iPhone|iPad/.test(window.navigator.platform),t.KEY_ALIASES={add:"+",break:"pause",cmd:"meta",command:"meta",ctl:"control",ctrl:"control",del:"delete",down:"arrowdown",esc:"escape",ins:"insert",left:"arrowleft",mod:t.IS_MAC?"meta":"control",opt:"alt",option:"alt",return:"enter",right:"arrowright",space:" ",spacebar:" ",up:"arrowup",win:"meta",windows:"meta"}},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=o(1);n.__exportStar(o(31),t),n.__exportStar(o(5),t),n.__exportStar(o(15),t),n.__exportStar(o(35),t),n.__exportStar(o(88),t),n.__exportStar(o(36),t),n.__exportStar(o(19),t),n.__exportStar(o(23),t),n.__exportStar(o(9),t),n.__exportStar(o(51),t),n.__exportStar(o(108),t),n.__exportStar(o(109),t),n.__exportStar(o(11),t),n.__exportStar(o(54),t),n.__exportStar(o(110),t),n.__exportStar(o(38),t),n.__exportStar(o(24),t),n.__exportStar(o(52),t),n.__exportStar(o(111),t),n.__exportStar(o(33),t),n.__exportStar(o(32),t),n.__exportStar(o(53),t),n.__exportStar(o(55),t),n.__exportStar(o(112),t),n.__exportStar(o(12),t),n.__exportStar(o(34),t),n.__exportStar(o(113),t)},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=o(1);n.__exportStar(o(44),t),n.__exportStar(o(18),t),n.__exportStar(o(80),t)},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(){}return e.exists=function(t){return void 0!==e.icons[t]},e.getIcon=function(t,o){return void 0===o&&(o=""),e.icons[t]||e.icons[t.replace(/-/g,"_")]||e.icons[t.toLowerCase()]||o},e.icons={},e}();t.ToolbarIcon=n},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=o(1),i=function(e){function t(t){var o=e.call(this,t)||this;return o.destruct=function(){o.isDestructed||(o.jodit.events&&o.jodit.events.off("beforeDestruct",o.destruct),o.beforeDestruct(o.jodit),e.prototype.destruct.call(o))},t.events.on("afterInit",o.afterInit.bind(o,t)).on("beforeDestruct",o.destruct),o}return n.__extends(t,e),t}(o(8).Component);t.Plugin=i},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=o(13),i=function(){function e(t){this.__isDestructed=!1,t&&t instanceof e&&(this.jodit=t,n.isJoditObject(t)&&t.components.push(this))}return Object.defineProperty(e.prototype,"isDestructed",{get:function(){return this.__isDestructed},enumerable:!0,configurable:!0}),e.prototype.destruct=function(){this.jodit&&(this.jodit=void 0),this.__isDestructed=!0},e}();t.Component=i},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=o(1);n.__exportStar(o(48),t),n.__exportStar(o(49),t),n.__exportStar(o(37),t),n.__exportStar(o(92),t),n.__exportStar(o(93),t)},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=o(1),i=o(2),r=o(3),a=o(0),s=o(4),l=o(33),c=o(32),d=o(56),u=o(59),f=o(115),p=o(25),Jodit=function(e){function Jodit(t,o){var a=e.call(this)||this;a.__defaultStyleDisplayKey="data-jodit-default-style-display",a.__defaultClassesKey="data-jodit-default-classes",a.commands={},a.__selectionLocked=null,a.__wasReadOnly=!1,a.storage=p.Storage.makeStorage(!0,a.id),a.editorIsActive=!1,a.iframe=null,a.__plugins={},a.mode=r.MODE_WYSIWYG,a.__callChangeCount=0,a.isInited=!1,a.options=new i.OptionsDefault(o),a.editorDocument=a.options.ownerDocument,a.editorWindow=a.options.ownerWindow,a.ownerDocument=a.options.ownerDocument,a.ownerWindow=a.options.ownerWindow,a.element=a.resolveElement(t),a.element.attributes&&Array.from(a.element.attributes).forEach((function(e){var t=e.name,n=e.value;void 0===Jodit.defaultOptions[t]||o&&void 0!==o[t]||(-1!==["readonly","disabled"].indexOf(t)&&(n=""===n||"true"===n),/^[0-9]+(\.)?([0-9]+)?$/.test(n.toString())&&(n=Number(n)),a.options[t]=n)})),a.options.events&&Object.keys(a.options.events).forEach((function(e){a.events.on(e,a.options.events[e])})),a.container.classList.add("jodit_container"),a.container.setAttribute("contenteditable","false"),a.selection=new u.Select(a),a.events.on("removeMarkers",(function(){a.selection&&a.selection.removeMarkers()})),a.observer=new d.Observer(a);var s=null;return a.options.inline&&(-1===["TEXTAREA","INPUT"].indexOf(a.element.nodeName)&&(a.container=a.element,a.element.setAttribute(a.__defaultClassesKey,a.element.className.toString()),s=a.container.innerHTML,a.container.innerHTML=""),a.container.classList.add("jodit_inline"),a.container.classList.add("jodit_container")),a.element!==a.container&&(a.element.style.display&&a.element.setAttribute(a.__defaultStyleDisplayKey,a.element.style.display),a.element.style.display="none"),a.applyOptionsToToolbarContainer(a.container),a.workplace=a.create.div("jodit_workplace",{contenteditable:!1}),a.makeToolbar(),a.options.textIcons&&a.container.classList.add("jodit_text_icons"),a.events.on(a.ownerWindow,"resize",(function(){a.events&&a.events.fire("resize")})),a.container.appendChild(a.workplace),a.statusbar=new f.StatusBar(a,a.container),a.workplace.appendChild(a.progress_bar),a.element.parentNode&&a.element!==a.container&&a.element.parentNode.insertBefore(a.container,a.element),a.id=a.element.getAttribute("id")||(new Date).getTime().toString(),a.editor=a.create.div("jodit_wysiwyg",{contenteditable:!0,"aria-disabled":!1,tabindex:a.options.tabIndex}),a.workplace.appendChild(a.editor),a.setNativeEditorValue(a.getElementValue()),n.__awaiter(a,void 0,void 0,(function(){var e;return n.__generator(this,(function(t){switch(t.label){case 0:return[4,this.beforeInitHook()];case 1:return t.sent(),[4,this.events.fire("beforeInit",this)];case 2:t.sent();try{this.__initPlugines()}catch(e){}return[4,this.__initEditor(s)];case 3:return t.sent(),this.isDestructed?[2]:((e=this.options).enableDragAndDropFileToEditor&&e.uploader&&(e.uploader.url||e.uploader.insertImageAsBase64URI)&&this.uploader.bind(this.editor),this.isInited=!0,this.events?[4,this.events.fire("afterInit",this)]:[3,5]);case 4:t.sent(),this.events.fire("afterConstructor",this),t.label=5;case 5:return[4,this.afterInitHook()];case 6:return t.sent(),[2]}}))})),a}return n.__extends(Jodit,e),Object.defineProperty(Jodit.prototype,"isJodit",{get:function(){return!0},enumerable:!0,configurable:!0}),Object.defineProperty(Jodit.prototype,"value",{get:function(){return this.getEditorValue()},set:function(e){this.setEditorValue(e)},enumerable:!0,configurable:!0}),Object.defineProperty(Jodit.prototype,"defaultTimeout",{get:function(){return this.options&&this.options.observer?this.options.observer.timeout:Jodit.defaultOptions.observer.timeout},enumerable:!0,configurable:!0}),Jodit.Array=function(e){return new l.JoditArray(e)},Jodit.Object=function(e){return new c.JoditObject(e)},Jodit.fireEach=function(e){for(var t=[],o=1;arguments.length>o;o++)t[o-1]=arguments[o];Object.keys(Jodit.instances).forEach((function(o){var i,r=Jodit.instances[o];!r.isDestructed&&r.events&&(i=r.events).fire.apply(i,n.__spreadArrays([e],t))}))},Jodit.make=function(e,t){return new Jodit(e,t)},Object.defineProperty(Jodit.prototype,"uploader",{get:function(){return this.getInstance("Uploader")},enumerable:!0,configurable:!0}),Object.defineProperty(Jodit.prototype,"filebrowser",{get:function(){return this.getInstance("FileBrowser")},enumerable:!0,configurable:!0}),Jodit.prototype.getElementValue=function(){return void 0!==this.element.value?this.element.value:this.element.innerHTML},Jodit.prototype.getNativeEditorValue=function(){return this.editor?this.editor.innerHTML:this.getElementValue()},Jodit.prototype.setNativeEditorValue=function(e){this.editor&&(this.editor.innerHTML=e)},Jodit.prototype.getEditorValue=function(e){var t;if(void 0===e&&(e=!0),void 0!==(t=this.events.fire("beforeGetValueFromEditor")))return t;t=this.getNativeEditorValue().replace(r.INVISIBLE_SPACE_REG_EXP,""),e&&(t=t.replace(/]+id="jodit_selection_marker_[^>]+><\/span>/g,"")),"
"===t&&(t="");var o={value:t};return this.events.fire("afterGetValueFromEditor",o),o.value},Jodit.prototype.getEditorText=function(){if(this.editor)return this.editor.textContent||"";var e=this.create.inside.div();return e.innerHTML=this.getElementValue(),e.textContent||""},Jodit.prototype.setElementValue=function(e){if("string"!=typeof e&&void 0!==e)throw new Error("value must be string");void 0!==e?this.element!==this.container&&(void 0!==this.element.value?this.element.value=e:this.element.innerHTML=e):e=this.getElementValue(),e!==this.getEditorValue()&&this.setEditorValue(e)},Jodit.prototype.setEditorValue=function(e){var t=this.events.fire("beforeSetValueToEditor",e);if(!1!==t)if("string"==typeof t&&(e=t),this.editor){if("string"!=typeof e&&void 0!==e)throw new Error("value must be string");void 0!==e&&this.editor.innerHTML!==e&&this.setNativeEditorValue(e);var o=this.getElementValue(),n=this.getEditorValue();if(o!==n&&10>this.__callChangeCount){this.setElementValue(n),this.__callChangeCount+=1;try{this.events.fire("change",n,o)}finally{this.__callChangeCount=0}}}else void 0!==e&&this.setElementValue(e)},Jodit.prototype.registerCommand=function(e,t){var o=e.toLowerCase();if(void 0===this.commands[o]&&(this.commands[o]=[]),this.commands[o].push(t),"function"!=typeof t){var n=this.options.commandToHotkeys[o]||this.options.commandToHotkeys[e]||t.hotkeys;n&&this.registerHotkeyToCommand(n,o)}return this},Jodit.prototype.registerHotkeyToCommand=function(e,t){var o=this,n=s.asArray(e).map(s.normalizeKeyAliases).map((function(e){return e+".hotkey"})).join(" ");this.events.off(n).on(n,(function(){return o.execCommand(t)}))},Jodit.prototype.execCommand=function(e,t,o){if(void 0===t&&(t=!1),void 0===o&&(o=null),!this.options.readonly||"selectall"===e){var n;if(e=e.toLowerCase(),!1!==(n=this.events.fire("beforeCommand",e,t,o))&&(n=this.execCustomCommands(e,t,o)),!1!==n)if(this.selection.focus(),"selectall"===e)this.selection.select(this.editor,!0);else try{n=this.editorDocument.execCommand(e,t,o)}catch(e){}return this.events.fire("afterCommand",e,t,o),this.setEditorValue(),n}},Jodit.prototype.execCustomCommands=function(e,t,o){var n,i;if(void 0===t&&(t=!1),void 0===o&&(o=null),e=e.toLowerCase(),void 0!==this.commands[e]){for(var r,a=0;this.commands[e].length>a;a+=1)void 0!==(i=("function"==typeof(n=this.commands[e][a])?n:n.exec).call(this,e,t,o))&&(r=i);return r}},Jodit.prototype.lock=function(t){return void 0===t&&(t="any"),!!e.prototype.lock.call(this,t)&&(this.__selectionLocked=this.selection.save(),this.editor.classList.add("jodit_disabled"),!0)},Jodit.prototype.unlock=function(){return!!e.prototype.unlock.call(this)&&(this.editor.classList.remove("jodit_disabled"),this.__selectionLocked&&this.selection.restore(this.__selectionLocked),!0)},Jodit.prototype.getMode=function(){return this.mode},Jodit.prototype.isEditorMode=function(){return this.getRealMode()===r.MODE_WYSIWYG},Jodit.prototype.getRealMode=function(){if(this.getMode()!==r.MODE_SPLIT)return this.getMode();var e=this.ownerDocument.activeElement;return e&&(a.Dom.isOrContains(this.editor,e)||a.Dom.isOrContains(this.toolbar.container,e))?r.MODE_WYSIWYG:r.MODE_SOURCE},Jodit.prototype.setMode=function(e){var t=this,o=this.getMode(),n={mode:parseInt(e.toString(),10)},i=["jodit_wysiwyg_mode","jodit_source_mode","jodit_split_mode"];!1!==this.events.fire("beforeSetMode",n)&&(this.mode=s.inArray(n.mode,[r.MODE_SOURCE,r.MODE_WYSIWYG,r.MODE_SPLIT])?n.mode:r.MODE_WYSIWYG,this.options.saveModeInStorage&&this.storage.set("jodit_default_mode",this.mode),i.forEach((function(e){t.container.classList.remove(e)})),this.container.classList.add(i[this.mode-1]),o!==this.getMode()&&this.events.fire("afterSetMode"))},Jodit.prototype.toggleMode=function(){var e=this.getMode();s.inArray(e+1,[r.MODE_SOURCE,r.MODE_WYSIWYG,this.options.useSplitMode?r.MODE_SPLIT:9])?e+=1:e=r.MODE_WYSIWYG,this.setMode(e)},Jodit.prototype.setDisabled=function(e){this.options.disabled=e;var t=this.__wasReadOnly;this.setReadOnly(e||t),this.__wasReadOnly=t,this.editor&&(this.editor.setAttribute("aria-disabled",e.toString()),this.container.classList.toggle("jodit_disabled",e),this.events.fire("disabled",e))},Jodit.prototype.getDisabled=function(){return this.options.disabled},Jodit.prototype.setReadOnly=function(e){this.__wasReadOnly!==e&&(this.__wasReadOnly=e,this.options.readonly=e,e?this.editor&&this.editor.removeAttribute("contenteditable"):this.editor&&this.editor.setAttribute("contenteditable","true"),this.events&&this.events.fire("readonly",e))},Jodit.prototype.getReadOnly=function(){return this.options.readonly},Jodit.prototype.beforeInitHook=function(){},Jodit.prototype.afterInitHook=function(){},Jodit.prototype.resolveElement=function(e){var t=e;if("string"==typeof e)try{t=this.ownerDocument.querySelector(e)}catch(t){throw new Error('String "'+e+'" should be valid HTML selector')}if(!t||"object"!=typeof t||t.nodeType!==Node.ELEMENT_NODE||!t.cloneNode)throw new Error('Element "'+e+'" should be string or HTMLElement instance');return t},Jodit.prototype.makeToolbar=function(){if(this.options.toolbar){var e=this.create.div("jodit_toolbar_container");this.container.appendChild(e),(this.options.toolbar instanceof HTMLElement||"string"==typeof this.options.toolbar)&&(e=this.resolveElement(this.options.toolbar)),this.applyOptionsToToolbarContainer(e),this.toolbar.build(s.splitArray(this.options.buttons).concat(this.options.extraButtons),e);var t=this.options.toolbarButtonSize.toLowerCase();e.classList.add("jodit_toolbar_size-"+(-1!==["middle","large","small"].indexOf(t)?t:"middle"))}},Jodit.prototype.applyOptionsToToolbarContainer=function(e){e.classList.add("jodit_"+(this.options.theme||"default")+"_theme"),this.options.zIndex&&(e.style.zIndex=parseInt(this.options.zIndex.toString(),10).toString())},Jodit.prototype.__initPlugines=function(){var e=this,t=this.options.disablePlugins,o=Array.isArray(t)?t.map((function(e){return e.toLowerCase()})):t.toLowerCase().split(/[\s,]+/);Object.keys(Jodit.plugins).forEach((function(t){-1===o.indexOf(t.toLowerCase())&&(e.__plugins[t]=new Jodit.plugins[t](e))}))},Jodit.prototype.__initEditor=function(e){return n.__awaiter(this,void 0,void 0,(function(){var t,o;return n.__generator(this,(function(n){switch(n.label){case 0:return[4,this.__createEditor()];case 1:if(n.sent(),this.isDestructed)return[2];this.element!==this.container?this.setElementValue():null!==e&&this.setEditorValue(e),Jodit.instances[this.id]=this,t=this.options.defaultMode,this.options.saveModeInStorage&&"string"==typeof(o=this.storage.get("jodit_default_mode"))&&(t=parseInt(o,10)),this.setMode(t),this.options.readonly&&this.setReadOnly(!0),this.options.disabled&&this.setDisabled(!0);try{this.editorDocument.execCommand("defaultParagraphSeparator",!1,this.options.enter.toLowerCase())}catch(e){}try{this.editorDocument.execCommand("enableObjectResizing",!1,"false")}catch(e){}try{this.editorDocument.execCommand("enableInlineTableEditing",!1,"false")}catch(e){}return[2]}}))}))},Jodit.prototype.__createEditor=function(){return n.__awaiter(this,void 0,void 0,(function(){var e,t,o,i=this;return n.__generator(this,(function(n){switch(n.label){case 0:return e=this.editor,[4,this.events.fire("createEditor",this)];case 1:return t=n.sent(),this.isDestructed?[2]:(!1===t&&a.Dom.safeRemove(e),this.options.editorCssClass&&this.editor.classList.add(this.options.editorCssClass),this.options.style&&s.css(this.editor,this.options.style),this.events.on("synchro",(function(){i.setEditorValue()})).on("focus",(function(){return i.editorIsActive=!0})).on("blur",(function(){return i.editorIsActive=!1})).on(this.editor,"selectionchange selectionstart keydown keyup keypress mousedown mouseup mousepress click copy cut dragstart drop dragover paste resize touchstart touchend focus blur",(function(e){if(!i.options.readonly&&i.events&&i.events.fire){if(!1===i.events.fire(e.type,e))return!1;i.setEditorValue()}})),this.options.spellcheck&&this.editor.setAttribute("spellcheck","true"),this.options.direction&&(o="rtl"===this.options.direction.toLowerCase()?"rtl":"ltr",this.editor.style.direction=o,this.container.style.direction=o,this.editor.setAttribute("dir",o),this.container.setAttribute("dir",o),this.toolbar.setDirection(o)),this.options.triggerChangeEvent&&this.events.on("change",s.debounce((function(){i.events&&i.events.fire(i.element,"change")}),this.defaultTimeout)),[2])}}))}))},Jodit.prototype.destruct=function(){var t=this;if(!this.isDestructed&&!1!==this.events.fire("beforeDestruct")&&this.editor){var o=this.getEditorValue();if(this.element!==this.container)if(this.element.hasAttribute(this.__defaultStyleDisplayKey)){var n=this.element.getAttribute(this.__defaultStyleDisplayKey);n&&(this.element.style.display=n,this.element.removeAttribute(this.__defaultStyleDisplayKey))}else this.element.style.display="";else this.element.hasAttribute(this.__defaultClassesKey)&&(this.element.className=this.element.getAttribute(this.__defaultClassesKey)||"",this.element.removeAttribute(this.__defaultClassesKey));this.element.hasAttribute("style")&&!this.element.getAttribute("style")&&this.element.removeAttribute("style"),Object.keys(this.__plugins).forEach((function(e){var o=t.__plugins[e];void 0!==o&&void 0!==o.destruct&&"function"==typeof o.destruct&&o.destruct(),delete t.__plugins[e]})),this.observer.destruct(),this.statusbar.destruct(),delete this.observer,delete this.statusbar,delete this.storage,this.buffer.clear(),delete this.buffer,this.components.forEach((function(e){void 0===e.destruct||"function"!=typeof e.destruct||e.isDestructed||e.destruct()})),this.components.length=0,this.commands={},delete this.selection,this.__selectionLocked=null,this.events.off(this.ownerWindow),this.events.off(this.ownerDocument),this.events.off(this.ownerDocument.body),this.events.off(this.element),this.events.off(this.editor),a.Dom.safeRemove(this.workplace),a.Dom.safeRemove(this.editor),a.Dom.safeRemove(this.progress_bar),a.Dom.safeRemove(this.iframe),this.container!==this.element&&a.Dom.safeRemove(this.container),delete this.workplace,delete this.editor,delete this.progress_bar,delete this.iframe,this.container===this.element&&(this.element.innerHTML=o),delete Jodit.instances[this.id],e.prototype.destruct.call(this),delete this.container}},Jodit.plugins={},Jodit.modules={},Jodit.instances={},Jodit.lang={},Jodit}(o(62).ViewWithToolbar);t.Jodit=Jodit},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=o(21),i=o(22),r=o(50),a=o(48),s=o(49);t.css=function(e,o,l,c){void 0===c&&(c=!1);var d=/^left|top|bottom|right|width|min|max|height|margin|padding|font-size/i;if(n.isPlainObject(o)||void 0!==l){var u=function(e,o,n){null!=n&&d.test(o)&&i.isNumeric(n.toString())&&(n=parseInt(n.toString(),10)+"px"),void 0!==n&&t.css(e,o,void 0,!0)!==r.normilizeCSSValue(o,n)&&(e.style[o]=n)};if(n.isPlainObject(o))for(var f=Object.keys(o),p=0;f.length>p;p+=1)u(e,a.camelCase(f[p]),o[f[p]]);else u(e,a.camelCase(o),l);return""}var h=s.fromCamelCase(o),v=e.ownerDocument||document,m=!!v&&(v.defaultView||v.parentWindow),g=e.style[o],b="";return void 0!==g&&""!==g?b=g:m&&!c&&(b=m.getComputedStyle(e).getPropertyValue(h)),d.test(o)&&/^[\-+]?[0-9.]+px$/.test(b.toString())&&(b=parseInt(b.toString(),10)),r.normilizeCSSValue(o,b)},t.clearCenterAlign=function(e){"block"===t.css(e,"display")&&t.css(e,"display",""),"auto"===e.style.marginLeft&&"auto"===e.style.marginRight&&(e.style.marginLeft="",e.style.marginRight="")}},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=o(3),i=1;t.$$=function(e,t){var o;if(!/:scope/.test(e)||!n.IS_IE||t&&t.nodeType===Node.DOCUMENT_NODE)o=t.querySelectorAll(e);else{var r=t.id,a=r||"_selector_id_"+(""+Math.random()).slice(2)+i++;e=e.replace(/:scope/g,"#"+a),!r&&t.setAttribute("id",a),o=t.parentNode.querySelectorAll(e),r||t.removeAttribute("id")}return[].slice.call(o)},t.getXPathByElement=function(e,o){if(!e||1!==e.nodeType)return"";if(!e.parentNode||o===e)return"";if(e.id)return"//*[@id='"+e.id+"']";var n=[].filter.call(e.parentNode.childNodes,(function(t){return t.nodeName===e.nodeName}));return t.getXPathByElement(e.parentNode,o)+"/"+e.nodeName.toLowerCase()+(n.length>1?"["+(Array.from(n).indexOf(e)+1)+"]":"")}},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isJoditObject=function(e){return!!(e&&e instanceof Object&&"function"==typeof e.constructor&&(e instanceof n.Jodit||e.isJodit))};var n=o(10)},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=o(16);t.Dialog=n.Dialog;var i=o(140);t.Alert=i.Alert;var r=o(66);t.Promt=r.Promt;var a=o(67);t.Confirm=a.Confirm},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=o(32),i=o(33),r=o(34),a=o(21);t.extend=function e(){for(var t=[],o=0;arguments.length>o;o++)t[o]=arguments[o];var s,l,c,d,u,f,p,h=t.length,v=t[0]||{},m=1,g=!1;for("boolean"==typeof v&&(g=v,v=t[m]||{},m+=1),"object"!=typeof v&&"function"===r.type(v)&&(v={}),m===h&&(v=this,m+=1);h>m;m+=1)if(null!=(s=t[m]))for(p=Object.keys(s),f=0;p.length>f;f+=1)c=v[l=p[f]],v!==(d=s[l])&&(g&&d&&(a.isPlainObject(d)&&!(d instanceof n.JoditObject)||Array.isArray(d)&&!(d instanceof i.JoditArray))?(u=Array.isArray(d)?c&&Array.isArray(c)?c:[]:c&&a.isPlainObject(c)?c:{},v[l]=e(g,u,d)):void 0!==d&&(v[l]=d));return v}},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=o(1),i=o(2),r=o(3),a=o(4),s=o(63),l=o(0),c=o(13);i.Config.prototype.dialog={resizable:!0,draggable:!0,buttons:["dialog.close"],removeButtons:[]},i.Config.prototype.controls.dialog={close:{icon:"cancel",exec:function(e){e.close()}},fullsize:{icon:"fullsize",getLabel:function(e,t,o){if(i.Config.prototype.controls.fullsize&&i.Config.prototype.controls.fullsize.getLabel&&"function"==typeof i.Config.prototype.controls.fullsize.getLabel)return i.Config.prototype.controls.fullsize.getLabel(e,t,o)},exec:function(e){e.toggleFullSize()}}};var d=function(e){function t(t,o){void 0===o&&(o=i.Config.prototype.dialog);var s=e.call(this,t,o)||this;s.destination=document.body,s.destroyAfterClose=!1,s.moved=!1,s.iSetMaximization=!1,s.resizable=!1,s.draggable=!1,s.startX=0,s.startY=0,s.startPoint={x:0,y:0,w:0,h:0},s.lockSelect=function(){s.container.classList.add("jodit_dialog_box-moved")},s.unlockSelect=function(){s.container.classList.remove("jodit_dialog_box-moved")},s.onMouseUp=function(){(s.draggable||s.resizable)&&(s.draggable=!1,s.resizable=!1,s.unlockSelect(),s.jodit&&s.jodit.events&&s.jodit.events.fire(s,"endResize endMove"))},s.onHeaderMouseDown=function(e){var t=e.target;!s.options.draggable||t&&t.nodeName.match(/^(INPUT|SELECT)$/)||(s.draggable=!0,s.startX=e.clientX,s.startY=e.clientY,s.startPoint.x=a.css(s.dialog,"left"),s.startPoint.y=a.css(s.dialog,"top"),s.setMaxZIndex(),e.preventDefault(),s.lockSelect(),s.jodit&&s.jodit.events&&s.jodit.events.fire(s,"startMove"))},s.onMouseMove=function(e){s.draggable&&s.options.draggable&&(s.setPosition(s.startPoint.x+e.clientX-s.startX,s.startPoint.y+e.clientY-s.startY),s.jodit&&s.jodit.events&&s.jodit.events.fire(s,"move",e.clientX-s.startX,e.clientY-s.startY),e.stopImmediatePropagation(),e.preventDefault()),s.resizable&&s.options.resizable&&(s.setSize(s.startPoint.w+e.clientX-s.startX,s.startPoint.h+e.clientY-s.startY),s.jodit&&s.jodit.events&&s.jodit.events.fire(s,"resizeDialog",e.clientX-s.startX,e.clientY-s.startY),e.stopImmediatePropagation(),e.preventDefault())},s.onKeyDown=function(e){if(s.isOpened()&&e.which===r.KEY_ESC){var t=s.getMaxZIndexDialog();t?t.close():s.close(),e.stopImmediatePropagation()}},s.onResize=function(){s.options&&s.options.resizable&&!s.moved&&s.isOpened()&&!s.offsetX&&!s.offsetY&&s.setPosition()},s.document=document,s.window=window,s.close=function(e){s.isDestructed||(e&&(e.stopImmediatePropagation(),e.preventDefault()),s.jodit&&s.jodit.events&&s.jodit.events.fire("beforeClose",s),s.container&&s.container.classList&&s.container.classList.remove("active"),s.iSetMaximization&&s.maximization(!1),s.destroyAfterClose&&s.destruct(),s.jodit&&s.jodit.events&&(s.jodit.events.fire(s,"afterClose"),s.jodit.events.fire(s.ownerWindow,"jodit_close_dialog")))},c.isJoditObject(t)&&(s.window=t.ownerWindow,s.document=t.ownerDocument,t.events.on("beforeDestruct",(function(){s.destruct()})));var l=s;l.options=n.__assign(n.__assign({},t&&t.options?t.options.dialog:i.Config.prototype.dialog),l.options),l.container=s.create.fromHTML('
'+(l.options.resizable?'
':"")+"
"),t&&t.id&&l.container.setAttribute("data-editor_id",t.id),Object.defineProperty(l.container,"__jodit_dialog",{value:l}),l.dialog=l.container.querySelector(".jodit_dialog"),l.resizer=l.container.querySelector(".jodit_dialog_resizer"),l.jodit&&l.jodit.options&&l.jodit.options.textIcons&&l.container.classList.add("jodit_text_icons"),l.dialogbox_header=l.container.querySelector(".jodit_dialog_header>.jodit_dialog_header-title"),l.dialogbox_content=l.container.querySelector(".jodit_dialog_content"),l.dialogbox_footer=l.container.querySelector(".jodit_dialog_footer"),l.dialogbox_toolbar=l.container.querySelector(".jodit_dialog_header>.jodit_dialog_header-toolbar"),l.destination.appendChild(l.container),l.container.addEventListener("close_dialog",l.close),l.toolbar=f.JoditToolbarCollection.makeCollection(l),l.toolbar.build(l.options.buttons,l.dialogbox_toolbar),l.events.on(s.window,"mousemove",l.onMouseMove).on(s.window,"mouseup",l.onMouseUp).on(s.window,"keydown",l.onKeyDown).on(s.window,"resize",l.onResize);var d=l.container.querySelector(".jodit_dialog_header");return d&&d.addEventListener("mousedown",l.onHeaderMouseDown.bind(l)),l.options.resizable&&l.resizer.addEventListener("mousedown",l.onResizerMouseDown.bind(l)),u.Jodit.plugins.fullsize(l),s}return n.__extends(t,e),t.prototype.setElements=function(e,t){var o=this,n=[];a.asArray(t).forEach((function(t){var i="string"==typeof t?o.create.fromHTML(t):t;n.push(i),i.parentNode!==e&&e.appendChild(i)})),Array.from(e.childNodes).forEach((function(t){-1===n.indexOf(t)&&e.removeChild(t)}))},t.prototype.onResizerMouseDown=function(e){this.resizable=!0,this.startX=e.clientX,this.startY=e.clientY,this.startPoint.w=this.dialog.offsetWidth,this.startPoint.h=this.dialog.offsetHeight,this.lockSelect(),this.jodit.events&&this.jodit.events.fire(this,"startResize")},t.prototype.setSize=function(e,t){e&&a.css(this.dialog,"width",e),t&&a.css(this.dialog,"height",t)},t.prototype.setPosition=function(e,t){var o=this.window.innerWidth/2-this.dialog.offsetWidth/2,n=this.window.innerHeight/2-this.dialog.offsetHeight/2;0>o&&(o=0),0>n&&(n=0),void 0!==e&&void 0!==t&&(this.offsetX=e,this.offsetY=t,this.moved=Math.abs(e-o)>100||Math.abs(t-n)>100),this.dialog.style.left=(e||o)+"px",this.dialog.style.top=(t||n)+"px"},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.getZIndex=function(){return parseInt(this.container.style.zIndex||"0",10)},t.prototype.getMaxZIndexDialog=function(){var e,t,o=0,n=this;return a.$$(".jodit_dialog_box",this.destination).forEach((function(i){e=i.__jodit_dialog,t=parseInt(a.css(i,"zIndex"),10),e.isOpened()&&!isNaN(t)&&t>o&&(n=e,o=t)})),n},t.prototype.setMaxZIndex=function(){var e=0,t=0;a.$$(".jodit_dialog_box",this.destination).forEach((function(o){t=parseInt(a.css(o,"zIndex"),10),e=Math.max(isNaN(t)?0:t,e)})),this.container.style.zIndex=(e+1).toString()},t.prototype.maximization=function(e){return"boolean"!=typeof e&&(e=!this.container.classList.contains("jodit_dialog_box-fullsize")),this.container.classList.toggle("jodit_dialog_box-fullsize",e),[this.destination,this.destination.parentNode].forEach((function(t){t&&t.classList&&t.classList.toggle("jodit_fullsize_box",e)})),this.iSetMaximization=e,e},t.prototype.open=function(e,t,o,n){this.jodit&&this.jodit.events&&!1===this.jodit.events.fire(this,"beforeOpen")||(this.destroyAfterClose=!0===o,void 0!==t&&this.setTitle(t),e&&this.setContent(e),this.container.classList.add("active"),n&&this.container.classList.add("jodit_modal"),this.setPosition(this.offsetX,this.offsetY),this.setMaxZIndex(),this.options.fullsize&&this.maximization(!0),this.jodit&&this.jodit.events&&this.jodit.events.fire("afterOpen",this))},t.prototype.isOpened=function(){return!this.isDestructed&&this.container&&this.container.classList.contains("active")},t.prototype.destruct=function(){this.isDestructed||(this.toolbar&&(this.toolbar.destruct(),delete this.toolbar),this.events&&this.events.off(this.window,"mousemove",this.onMouseMove).off(this.window,"mouseup",this.onMouseUp).off(this.window,"keydown",this.onKeyDown).off(this.window,"resize",this.onResize),!this.jodit&&this.events&&(this.events.destruct(),delete this.events),this.container&&(l.Dom.safeRemove(this.container),delete this.container),e.prototype.destruct.call(this))},t}(s.View);t.Dialog=d;var u=o(10),f=o(29)},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n,i=o(0),r=o(4),a=o(6);(n=t.Widget||(t.Widget={})).ColorPickerWidget=function(e,t,o){var n=r.normalizeColor(o),s=e.create.div("jodit_colorpicker"),l=e.options.textIcons?"":a.ToolbarIcon.getIcon("eye"),c=e.options.textIcons?""+e.i18n("eraser")+"":a.ToolbarIcon.getIcon("eraser"),d=e.options.textIcons?""+e.i18n("palette")+"":a.ToolbarIcon.getIcon("palette"),u=function(e,t){e.innerHTML=a.ToolbarIcon.getIcon("eye"),e.classList.add("active");var o=r.hexToRgb(t);o&&(e.firstChild.style.fill="rgb("+(255-o.r)+","+(255-o.g)+","+(255-o.b)+")")},f=function(e){var t=[];return r.isPlainObject(e)?Object.keys(e).forEach((function(o){t.push('
'),t.push(f(e[o])),t.push("
")})):Array.isArray(e)&&e.forEach((function(e){t.push("'+(n===e?l:"")+"")})),t.join("")};return s.appendChild(e.create.fromHTML("
"+f(e.options.colors)+"
")),s.appendChild(e.create.fromHTML("'+c+"")),e.options.showBrowserColorPicker&&r.hasBrowserColorPicker()&&(s.appendChild(e.create.fromHTML(""+d+'')),e.events.on(s,"change",(function(e){e.stopPropagation();var o=e.target;if(o&&o.tagName&&"INPUT"===o.tagName.toUpperCase()){var n=o.value||"";n&&u(o,n),t&&"function"==typeof t&&t(n),e.preventDefault()}}))),e.events.on(s,"mousedown touchend",(function(o){o.stopPropagation();var n=o.target;if(n&&n.tagName&&"SVG"!==n.tagName.toUpperCase()&&"PATH"!==n.tagName.toUpperCase()||!n.parentNode||(n=i.Dom.closest(n.parentNode,"A",e.editor)),"A"===n.tagName.toUpperCase()){var r=s.querySelector("a.active");r&&(r.classList.remove("active"),r.innerHTML="");var a=n.getAttribute("data-color")||"";a&&u(n,a),t&&"function"==typeof t&&t(a),o.preventDefault()}})),s},n.TabsWidget=function(e,t,o){var n=e.create.div("jodit_tabs"),i=e.create.div("jodit_tabs_wrapper"),a=e.create.div("jodit_tabs_buttons"),s={},l="",c=0;return n.appendChild(a),n.appendChild(i),r.each(t,(function(t,n){var d=e.create.div("jodit_tab"),u=e.create.element("a",{href:"javascript:void(0);"});l||(l=t.toString()),u.innerHTML=/'+e.i18n(s?"Drop image":"Drop file")+"
"+e.i18n("or click")+'
');e.getInstance("Uploader").bind(d,(function(o){var n=r.isFunction(t.upload)?t.upload:e.options.uploader.defaultHandlerSuccess;"function"==typeof n&&n.call(e,{baseurl:o.baseurl,files:o.files,isImages:o.isImages})}),(function(t){e.events.fire("errorMessage",t.message)})),c[(e.options.textIcons?"":a.ToolbarIcon.getIcon("upload"))+e.i18n("Upload")]=d}if(t.filebrowser&&(e.options.filebrowser.ajax.url||e.options.filebrowser.items.url)&&(c[(e.options.textIcons?"":a.ToolbarIcon.getIcon("folder"))+e.i18n("Browse")]=function(){i&&i(),t.filebrowser&&e.getInstance("FileBrowser").open(t.filebrowser,s)}),t.url){var u=e.create.fromHTML('
\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t
"),f=u.querySelector("button"),p=u.querySelector("input[name=url]");l=null,o&&o.nodeType!==Node.TEXT_NODE&&("IMG"===o.tagName||r.$$("img",o).length)&&(l="IMG"===o.tagName?o:r.$$("img",o)[0],r.val(u,"input[name=url]",l.getAttribute("src")),r.val(u,"input[name=text]",l.getAttribute("alt")),f.textContent=e.i18n("Update")),o&&o.nodeType!==Node.TEXT_NODE&&"A"===o.nodeName&&(r.val(u,"input[name=url]",o.getAttribute("href")||""),r.val(u,"input[name=text]",o.getAttribute("title")||""),f.textContent=e.i18n("Update")),u.addEventListener("submit",(function(o){return o.preventDefault(),o.stopPropagation(),r.val(u,"input[name=url]")?("function"==typeof t.url&&t.url.call(e,r.val(u,"input[name=url]"),r.val(u,"input[name=text]")),!1):(p.focus(),p.classList.add("jodit_error"),!1)}),!1),c[(e.options.textIcons?"":a.ToolbarIcon.getIcon("link"))+" URL"]=u}return n.TabsWidget(e,c)}},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setTimeout=function(e,t,o,n,i){return t?window.setTimeout.call(window,e,t,o,n,i):(e.call(null,o,n,i),0)}},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=o(1);n.__exportStar(o(97),t),n.__exportStar(o(98),t),n.__exportStar(o(99),t),n.__exportStar(o(100),t),n.__exportStar(o(101),t),n.__exportStar(o(102),t),n.__exportStar(o(103),t),n.__exportStar(o(50),t),n.__exportStar(o(104),t)},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=o(1),i=o(39),r=o(0),a=o(11),s=o(3),l=o(13),c=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.checkActiveStatus=function(e,o){var n=0,i=0;return Object.keys(e).forEach((function(r){var s=e[r];"function"==typeof s?s(t.jodit,a.css(o,r).toString())&&(n+=1):-1!==s.indexOf(a.css(o,r).toString())&&(n+=1),i+=1})),i===n},t}return n.__extends(t,e),t.prototype.buttonIsActive=function(t){var o=this,n=e.prototype.buttonIsActive.call(this,t);if(void 0!==n)return n;var i,a,s=!!this.jodit.selection&&this.jodit.selection.current();return!(!s||!((t.control.tags||t.control.options&&t.control.options.tags)&&(i=t.control.tags||t.control.options&&t.control.options.tags,r.Dom.up(s,(function(e){if(e&&-1!==i.indexOf(e.nodeName.toLowerCase()))return!0}),this.jodit.editor))||(t.control.css||t.control.options&&t.control.options.css)&&(a=t.control.css||t.control.options&&t.control.options.css,r.Dom.up(s,(function(e){if(e&&e.nodeType!==Node.TEXT_NODE)return o.checkActiveStatus(a,e)}),this.jodit.editor))))},t.prototype.buttonIsDisabled=function(t){var o=e.prototype.buttonIsDisabled.call(this,t);if(void 0!==o)return o;var n=void 0===t.control||void 0===t.control.mode?s.MODE_WYSIWYG:t.control.mode;return!(n===s.MODE_SPLIT||n===this.jodit.getRealMode())},t.prototype.getTarget=function(e){return e.target||this.jodit.selection.current()||void 0},t.makeCollection=function(e){var o=l.isJoditObject(e)?new t(e):new i.ToolbarCollection(e);return e.options.textIcons&&o.container.classList.add("jodit_text_icons"),o},t}(i.ToolbarCollection);t.JoditToolbarCollection=c},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=o(45),i=o(34);t.isPlainObject=function(e){return!("object"!=typeof e||e.nodeType||n.isWindow(e)||e.constructor&&!i.hasOwn.call(e.constructor.prototype,"isPrototypeOf"))}},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isNumeric=function(e){if("string"==typeof e){if(!e.match(/^([+\-])?[0-9]+(\.?)([0-9]+)?(e[0-9]+)?$/))return!1;e=parseFloat(e)}return!isNaN(e)&&isFinite(e)}},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=o(1);n.__exportStar(o(105),t),n.__exportStar(o(106),t),n.__exportStar(o(107),t)},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.each=function(e,t){var o,n,i;if(Array.isArray(e)){for(o=e.length,i=0;o>i;i+=1)if(!1===t.call(e[i],i,e[i]))return!1}else for(n=Object.keys(e),i=0;n.length>i;i+=1)if(!1===t.call(e[n[i]],n[i],e[n[i]]))return!1;return!0}},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=o(9),i=o(60),r=o(61);t.StorageKey="Jodit_";var a=function(){function e(e,o){this.provider=e,this.prefix=t.StorageKey,o&&(this.prefix+=o)}return e.prototype.set=function(e,t){this.provider.set(n.camelCase(this.prefix+e),t)},e.prototype.get=function(e){return this.provider.get(n.camelCase(this.prefix+e))},e.prototype.exists=function(e){return this.provider.exists(n.camelCase(this.prefix+e))},e.prototype.clear=function(){return this.provider.clear()},e.makeStorage=function(o,n){var a;return void 0===o&&(o=!1),o&&i.canUsePersistentStorage()&&(a=new i.LocalStorageProvider(t.StorageKey+n)),a||(a=new r.MemoryStorageProvider),new e(a,n)},e}();t.Storage=a},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=o(1),i=o(8),r=o(39),a=o(6),s=o(0),l=o(9),c=function(e){function t(t,o,n){void 0===o&&(o="li"),void 0===n&&(n="jodit_toolbar_btn");var i=this;return t instanceof r.ToolbarCollection?(i=e.call(this,t.jodit)||this).parentToolbar=t:i=e.call(this,t)||this,i.container=i.jodit.create.element(o),i.container.classList.add(n),i}return n.__extends(t,e),t.prototype.focus=function(){this.container.focus()},t.prototype.destruct=function(){this.isDestructed||(s.Dom.safeRemove(this.container),this.parentToolbar=void 0,e.prototype.destruct.call(this))},t.prototype.createIcon=function(e,t){var o=t?t.icon||t.name:e;if(!this.jodit.options.textIcons){var n=this.jodit.events.fire("getIcon",o,t,e),i=void 0;return t&&t.iconURL&&void 0===n?(i=this.jodit.create.element("i")).style.backgroundImage="url("+t.iconURL+")":(void 0===n&&(n=a.ToolbarIcon.exists(o)?a.ToolbarIcon.getIcon(o):a.ToolbarIcon.getIcon("empty")),i="string"==typeof n?this.jodit.create.fromHTML(l.trim(n)):n),i.classList.add("jodit_icon","jodit_icon_"+e),i}return this.jodit.create.fromHTML(''+this.jodit.i18n(t?t.name:e)+"")},t}(i.Component);t.ToolbarElement=c},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=o(1),i=o(0),r=o(4),a=o(26),s=o(120),l=o(28),c=o(121),d=o(13),u=o(3),f=o(6),p=function(e){function t(t,o,n){var a=e.call(this,t)||this;a.__disabled=!1,a.__actived=!1,a.onMouseDown=function(e){if("keydown"!==e.type||e.which===u.KEY_ENTER){if(e.stopImmediatePropagation(),e.preventDefault(),a.disable)return!1;var t=a.control,o=function(){return a.parentToolbar&&a.parentToolbar.getTarget(a)||a.target||!1};if(t.list){var n=new s.PopupList(a.jodit,a.container,a.target);n.open(t),a.jodit.events.fire("closeAllPopups",n.container),a.anchor.setAttribute("aria-expanded","true"),a.jodit.events.on(n,"afterClose",(function(){a.anchor.setAttribute("aria-expanded","false")}))}else if(void 0!==t.exec&&"function"==typeof t.exec)t.exec(a.jodit,o(),t,e,a.container),a.jodit.events.fire("synchro"),a.parentToolbar&&a.parentToolbar.immediateCheckActiveButtons(),a.jodit.events.fire("closeAllPopups afterExec");else if(void 0!==t.popup&&"function"==typeof t.popup){var i=new l.Popup(a.jodit,a.container,a.target);if(!1!==a.jodit.events.fire(r.camelCase("before-"+t.name+"-OpenPopup"),o(),t,i)){var c=t.popup(a.jodit,o(),t,i.close,a);c&&i.open(c)}a.jodit.events.fire(r.camelCase("after-"+t.name+"-OpenPopup")+" closeAllPopups",i.container)}else(t.command||t.name)&&(d.isJoditObject(a.jodit)?a.jodit.execCommand(t.command||t.name,t.args&&t.args[0]||!1,t.args&&t.args[1]||null):a.jodit.ownerDocument.execCommand(t.command||t.name,t.args&&t.args[0]||!1,t.args&&t.args[1]||null),a.jodit.events.fire("closeAllPopups"))}},a.control=o,a.target=n,a.anchor=a.jodit.create.element("a",{role:"button",href:"javascript:void(0)"});var p="-1";a.jodit.options.allowTabNavigation&&(p="0"),a.anchor.setAttribute("tabindex",p),a.container.appendChild(a.anchor),a.jodit.options.showTooltip&&o.tooltip&&(a.jodit.options.useNativeTooltip?a.anchor.setAttribute("title",a.tooltipText):a.tooltip=new c.ToolbarTooltip(a),a.anchor.setAttribute("aria-label",a.tooltipText)),a.textBox=a.jodit.create.span(),a.anchor.appendChild(a.textBox);var h=o.name.replace(/[^a-zA-Z0-9]/g,"_");if(o.getContent&&"function"==typeof o.getContent){i.Dom.detach(a.container);var v=o.getContent(a.jodit,o,a);a.container.appendChild("string"==typeof v?a.jodit.create.fromHTML(v):v)}else{if(o.list&&a.anchor){var m=a.jodit.create.fromHTML(f.ToolbarIcon.getIcon("dropdown-arrow"));m.classList.add("jodit_with_dropdownlist-trigger"),a.container.classList.add("jodit_with_dropdownlist"),a.anchor.appendChild(m)}a.textBox.appendChild(a.createIcon(h,o))}if(a.container.classList.add("jodit_toolbar_btn-"+h),a.jodit.options.direction){var g=a.jodit.options.direction.toLowerCase();a.container.style.direction="rtl"===g?"rtl":"ltr"}return o.isInput?a.container.classList.add("jodit_toolbar-input"):a.jodit.events.on(a.container,"mousedown touchend keydown",a.onMouseDown).on("click-"+h+"-btn",a.onMouseDown),a}return n.__extends(t,e),Object.defineProperty(t.prototype,"disable",{get:function(){return this.__disabled},set:function(e){this.__disabled=e,this.container.classList.toggle("jodit_disabled",e),e?this.container.hasAttribute("disabled")||this.container.setAttribute("disabled","disabled"):this.container.hasAttribute("disabled")&&this.container.removeAttribute("disabled")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"active",{get:function(){return this.__actived},set:function(e){this.__actived=e,this.container.classList.toggle("jodit_active",e)},enumerable:!0,configurable:!0}),t.prototype.isDisable=function(){return Boolean(this.parentToolbar&&this.parentToolbar.buttonIsDisabled(this))},t.prototype.isActive=function(){return Boolean(this.parentToolbar&&this.parentToolbar.buttonIsActive(this))},Object.defineProperty(t.prototype,"tooltipText",{get:function(){return this.control.tooltip?this.jodit.i18n(this.control.tooltip)+(this.control.hotkeys?"
"+r.asArray(this.control.hotkeys).join(" "):""):""},enumerable:!0,configurable:!0}),t.prototype.focus=function(){this.anchor.focus()},t.prototype.destruct=function(){this.isDestructed||(this.jodit&&this.jodit.events&&this.jodit.events.off(this.container),e.prototype.destruct.call(this),this.tooltip&&(this.tooltip.destruct(),delete this.tooltip))},t}(a.ToolbarElement);t.ToolbarButton=p},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=o(1),i=o(0),r=o(4),a=function(e){function t(o,n,a,s){void 0===s&&(s="jodit_toolbar_popup");var l=e.call(this,o)||this;return l.target=n,l.current=a,l.className=s,l.throttleCalcPosition=r.throttle(l.calcPosition,l.jodit.defaultTimeout),l.isOpened=!1,l.close=function(e){(l.isOpened||l.isDestructed)&&(e&&i.Dom.isOrContains(l.container,e instanceof t?e.target:e)||(l.isOpened=!1,l.jodit.events.off("closeAllPopups",l.close),l.doClose(),i.Dom.safeRemove(l.container),l.jodit.events.fire("removeMarkers"),l.jodit.events.fire(l,"afterClose")))},l.container=l.jodit.create.div(s,{"data-editor_id":o.id}),l.jodit.events.on(l.container,"mousedown touchstart touchend",(function(e){e.stopPropagation()})).on([l.jodit.ownerWindow,l.jodit.events],"resize",l.throttleCalcPosition).on("afterInsertNode, afterInsertImage",l.close),l}return n.__extends(t,e),t.prototype.calcPosition=function(){if(this.isOpened&&!this.isDestructed){var e=this.container,t=r.offset(this.jodit.container,this.jodit,this.jodit.ownerDocument,!0),o=r.offset(e,this.jodit,this.jodit.ownerDocument,!0),n=r.css(e,"marginLeft")||0;o.left-=n;var i=n,a="auto";if(i=t.left>o.left?t.left-o.left:t.left+t.width>o.left+o.width?0:-(o.left+o.width-(t.left+t.width)),t.width>o.width||(i=t.left-o.left,a=t.width),i!==n)try{e.style.setProperty("margin-left",i+"px","important")}catch(t){e.style.marginLeft=i+"px"}var s=e.querySelector(".jodit_popup_triangle");s&&(s.style.marginLeft=-i+"px"),r.css(e,"width",a)}},t.prototype.doOpen=function(e){e&&(i.Dom.detach(this.container),this.container.innerHTML='',this.container.appendChild(i.Dom.isNode(e,this.jodit.ownerWindow)?e:this.jodit.create.fromHTML(e.toString())),this.container.style.display="block",this.container.style.removeProperty("marginLeft"))},t.prototype.doClose=function(){},t.prototype.open=function(e,t,o){void 0===o&&(o=!1),s.Jodit.fireEach("beforeOpenPopup closeAllPopups",this,e),o||this.jodit.events.on("closeAllPopups",this.close),this.container.classList.add(this.className+"-open"),this.doOpen(e),this.target.appendChild(this.container),this.jodit.options.textIcons&&this.firstInFocus(),void 0!==t&&this.container.classList.toggle("jodit_right",t),!o&&this.container.parentNode&&this.jodit.events.fire(this.container.parentNode,"afterOpenPopup",this.container),this.isOpened=!0,!o&&this.calcPosition()},t.prototype.firstInFocus=function(){},t.prototype.destruct=function(){this.isDestructed||(this.jodit.events.off([this.jodit.ownerWindow,this.jodit.events],"resize",this.throttleCalcPosition),i.Dom.safeRemove(this.container),delete this.container,e.prototype.destruct.call(this))},t}(o(8).Component);t.Popup=a;var s=o(10)},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=o(40);t.Ajax=n.Ajax;var i=o(64);t.EventsNative=i.EventsNative;var r=o(8);t.Component=r.Component;var a=o(41);t.ContextMenu=a.ContextMenu;var s=o(14);t.Alert=s.Alert,t.Confirm=s.Confirm,t.Promt=s.Promt,t.Dialog=s.Dialog;var l=o(0);t.Dom=l.Dom;var c=o(7);t.Plugin=c.Plugin;var d=o(65);t.Create=d.Create;var u=o(141);t.FileBrowser=u.FileBrowser;var f=o(4);t.Helpers=f;var p=o(148);t.ImageEditor=p.ImageEditor;var h=o(56);t.Observer=h.Observer;var v=o(59);t.Select=v.Select;var m=o(25);t.Storage=m.Storage;var g=o(57);t.Snapshot=g.Snapshot;var b=o(30);t.Table=b.Table;var _=o(6);t.ToolbarIcon=_.ToolbarIcon;var y=o(20);t.JoditToolbarCollection=y.JoditToolbarCollection;var w=o(39);t.ToolbarCollection=w.ToolbarCollection;var C=o(27);t.ToolbarButton=C.ToolbarButton;var S=o(58);t.Stack=S.Stack;var E=o(17);t.Widget=E.Widget;var j=o(149);t.Uploader=j.Uploader},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=o(3),i=o(0),r=o(4),a=function(){function e(){}return e.addSelected=function(e){e.setAttribute(n.JODIT_SELECTED_CELL_MARKER,"1")},e.restoreSelection=function(e){e.removeAttribute(n.JODIT_SELECTED_CELL_MARKER)},e.getAllSelectedCells=function(e){return e?r.$$("td["+n.JODIT_SELECTED_CELL_MARKER+"],th["+n.JODIT_SELECTED_CELL_MARKER+"]",e):[]},e.getRowsCount=function(e){return e.rows.length},e.getColumnsCount=function(t){return e.formalMatrix(t).reduce((function(e,t){return Math.max(e,t.length)}),0)},e.formalMatrix=function(e,t){for(var o=[[]],n=Array.prototype.slice.call(e.rows),i=function(e,n){void 0===o[n]&&(o[n]=[]);for(var i,r,a=e.colSpan,s=e.rowSpan,l=0;o[n][l];)l+=1;for(r=0;s>r;r+=1)for(i=0;a>i;i+=1){if(void 0===o[n+r]&&(o[n+r]=[]),t&&!1===t(e,n+r,l+i,a,s))return!1;o[n+r][l+i]=e}},r=0,a=void 0;n.length>r;r+=1){var s=Array.prototype.slice.call(n[r].cells);for(a=0;s.length>a;a+=1)if(!1===i(s[a],r))return o}return o},e.formalCoordinate=function(t,o,n){void 0===n&&(n=!1);var i=0,r=0,a=1,s=1;return e.formalMatrix(t,(function(e,t,l,c,d){if(o===e)return i=t,r=l,a=c||1,s=d||1,n&&(r+=(c||1)-1,i+=(d||1)-1),!1})),[i,r,a,s]},e.appendRow=function(t,o,n){void 0===o&&(o=!1),void 0===n&&(n=!0);for(var i=t.ownerDocument||document,a=e.getColumnsCount(t),s=i.createElement("tr"),l=0;a>l;l+=1)s.appendChild(i.createElement("td"));n&&o&&o.nextSibling?o.parentNode&&o.parentNode.insertBefore(s,o.nextSibling):!n&&o?o.parentNode&&o.parentNode.insertBefore(s,o):(r.$$(":scope>tbody",t)[0]||t).appendChild(s)},e.removeRow=function(t,o){var n,a=e.formalMatrix(t),s=t.rows[o];r.each(a[o],(function(e,r){if(n=!1,0>o-1||a[o-1][e]!==r)if(a[o+1]&&a[o+1][e]===r){if(r.parentNode===s&&r.parentNode.nextSibling){n=!0;for(var l=e+1;a[o+1][l]===r;)l+=1;var c=i.Dom.next(r.parentNode,(function(e){return e&&e.nodeType===Node.ELEMENT_NODE&&"TR"===e.nodeName}),t);a[o+1][l]?c.insertBefore(r,a[o+1][l]):c.appendChild(r)}}else i.Dom.safeRemove(r);else n=!0;if(n&&(r.parentNode===s||r!==a[o][e-1])){var d=r.rowSpan;d-1>1?r.setAttribute("rowspan",(d-1).toString()):r.removeAttribute("rowspan")}})),i.Dom.safeRemove(s)},e.appendColumn=function(t,o,n){void 0===n&&(n=!0);var i,r=e.formalMatrix(t);for(void 0===o&&(o=e.getColumnsCount(t)-1),i=0;r.length>i;i+=1){var a=(t.ownerDocument||document).createElement("td"),s=r[i][o],l=!1;n?(r[i]&&s&&o+1>=r[i].length||s!==r[i][o+1])&&(s.nextSibling?s.parentNode&&s.parentNode.insertBefore(a,s.nextSibling):s.parentNode&&s.parentNode.appendChild(a),l=!0):(0>o-1||r[i][o]!==r[i][o-1]&&r[i][o].parentNode)&&(s.parentNode&&s.parentNode.insertBefore(a,r[i][o]),l=!0),l||r[i][o].setAttribute("colspan",(parseInt(r[i][o].getAttribute("colspan")||"1",10)+1).toString())}},e.removeColumn=function(t,o){var n,a=e.formalMatrix(t);r.each(a,(function(e,t){var r=t[o];if(n=!1,0>o-1||a[e][o-1]!==r?t.length>o+1&&a[e][o+1]===r?n=!0:i.Dom.safeRemove(r):n=!0,n&&(0>e-1||r!==a[e-1][o])){var s=r.colSpan;s-1>1?r.setAttribute("colspan",(s-1).toString()):r.removeAttribute("colspan")}}))},e.getSelectedBound=function(t,o){var n,i,r,a=[[1/0,1/0],[0,0]],s=e.formalMatrix(t);for(n=0;s.length>n;n+=1)for(i=0;s[n].length>i;i+=1)-1!==o.indexOf(s[n][i])&&(a[0][0]=Math.min(n,a[0][0]),a[0][1]=Math.min(i,a[0][1]),a[1][0]=Math.max(n,a[1][0]),a[1][1]=Math.max(i,a[1][1]));for(n=a[0][0];a[1][0]>=n;n+=1)for(r=1,i=a[0][1];a[1][1]>=i;i+=1){for(;s[n][i-r]&&s[n][i]===s[n][i-r];)a[0][1]=Math.min(i-r,a[0][1]),a[1][1]=Math.max(i-r,a[1][1]),r+=1;for(r=1;s[n][i+r]&&s[n][i]===s[n][i+r];)a[0][1]=Math.min(i+r,a[0][1]),a[1][1]=Math.max(i+r,a[1][1]),r+=1;for(r=1;s[n-r]&&s[n][i]===s[n-r][i];)a[0][0]=Math.min(n-r,a[0][0]),a[1][0]=Math.max(n-r,a[1][0]),r+=1;for(r=1;s[n+r]&&s[n][i]===s[n+r][i];)a[0][0]=Math.min(n+r,a[0][0]),a[1][0]=Math.max(n+r,a[1][0]),r+=1}return a},e.normalizeTable=function(t){var o,n,i,r,a=[],s=e.formalMatrix(t);for(n=0;s[0].length>n;n+=1){for(i=1e6,r=!1,o=0;s.length>o;o+=1)if(void 0!==s[o][n]){if(2>s[o][n].colSpan){r=!0;break}i=Math.min(i,s[o][n].colSpan)}if(!r)for(o=0;s.length>o;o+=1)void 0!==s[o][n]&&e.__mark(s[o][n],"colspan",s[o][n].colSpan-i+1,a)}for(o=0;s.length>o;o+=1){for(i=1e6,r=!1,n=0;s[o].length>n;n+=1)if(void 0!==s[o][n]){if(2>s[o][n].rowSpan){r=!0;break}i=Math.min(i,s[o][n].rowSpan)}if(!r)for(n=0;s[o].length>n;n+=1)void 0!==s[o][n]&&e.__mark(s[o][n],"rowspan",s[o][n].rowSpan-i+1,a)}for(o=0;s.length>o;o+=1)for(n=0;s[o].length>n;n+=1)void 0!==s[o][n]&&(s[o][n].hasAttribute("rowspan")&&1===s[o][n].rowSpan&&s[o][n].removeAttribute("rowspan"),s[o][n].hasAttribute("colspan")&&1===s[o][n].colSpan&&s[o][n].removeAttribute("colspan"),s[o][n].hasAttribute("class")&&!s[o][n].getAttribute("class")&&s[o][n].removeAttribute("class"));e.__unmark(a)},e.mergeSelected=function(t){var o,a=[],s=e.getSelectedBound(t,e.getAllSelectedCells(t)),l=0,c=null,d=0,u=0,f=0,p=[];s&&(s[0][0]-s[1][0]||s[0][1]-s[1][1])&&(e.formalMatrix(t,(function(t,n,i,h,v){if(!(s[0][0]>n||n>s[1][0]||s[0][1]>i||i>s[1][1])){if((o=t).__i_am_already_was)return;o.__i_am_already_was=!0,n===s[0][0]&&o.style.width&&(l+=o.offsetWidth),""!==r.trim(t.innerHTML.replace(//g,""))&&a.push(t.innerHTML),h>1&&(u+=h-1),v>1&&(f+=v-1),c?e.__mark(o,"remove",1,p):(c=t,d=i)}})),u=s[1][1]-s[0][1]+1,f=s[1][0]-s[0][0]+1,c&&(u>1&&e.__mark(c,"colspan",u,p),f>1&&e.__mark(c,"rowspan",f,p),l&&(e.__mark(c,"width",(l/t.offsetWidth*100).toFixed(n.ACCURACY)+"%",p),d&&e.setColumnWidthByDelta(t,d,0,!0,p)),c.innerHTML=a.join("
"),delete c.__i_am_already_was,e.__unmark(p),e.normalizeTable(t),r.each(Array.from(t.rows),(function(e,t){t.cells.length||i.Dom.safeRemove(t)}))))},e.splitHorizontal=function(t){var o,n,r,a,s,l=[],c=t.ownerDocument||document;e.getAllSelectedCells(t).forEach((function(d){(n=c.createElement("td")).appendChild(c.createElement("br")),r=c.createElement("tr"),o=e.formalCoordinate(t,d),2>d.rowSpan?(e.formalMatrix(t,(function(t,n,i){o[0]===n&&o[1]!==i&&t!==d&&e.__mark(t,"rowspan",t.rowSpan+1,l)})),i.Dom.after(i.Dom.closest(d,"tr",t),r),r.appendChild(n)):(e.__mark(d,"rowspan",d.rowSpan-1,l),e.formalMatrix(t,(function(e,n,i){n>o[0]&&o[0]+d.rowSpan>n&&o[1]>i&&e.parentNode.rowIndex===n&&(s=e),n>o[0]&&e===d&&(a=t.rows[n])})),s?i.Dom.after(s,n):a.insertBefore(n,a.firstChild)),d.colSpan>1&&e.__mark(n,"colspan",d.colSpan,l),e.__unmark(l),e.restoreSelection(d)})),this.normalizeTable(t)},e.splitVertical=function(t){var o,r,a,s=[],l=t.ownerDocument||document;e.getAllSelectedCells(t).forEach((function(c){o=e.formalCoordinate(t,c),2>c.colSpan?e.formalMatrix(t,(function(t,n,i){o[1]===i&&o[0]!==n&&t!==c&&e.__mark(t,"colspan",t.colSpan+1,s)})):e.__mark(c,"colspan",c.colSpan-1,s),(r=l.createElement("td")).appendChild(l.createElement("br")),c.rowSpan>1&&e.__mark(r,"rowspan",c.rowSpan,s);var d=c.offsetWidth;i.Dom.after(c,r),e.__mark(c,"width",(100*(a=d/t.offsetWidth/2)).toFixed(n.ACCURACY)+"%",s),e.__mark(r,"width",(100*a).toFixed(n.ACCURACY)+"%",s),e.__unmark(s),e.restoreSelection(c)})),e.normalizeTable(t)},e.setColumnWidthByDelta=function(t,o,i,r,a){var s,l=e.formalMatrix(t);for(s=0;l.length>s;s+=1)e.__mark(l[s][o],"width",((l[s][o].offsetWidth+i)/t.offsetWidth*100).toFixed(n.ACCURACY)+"%",a);r||e.__unmark(a)},e.__mark=function(e,t,o,n){n.push(e),e.__marked_value||(e.__marked_value={}),e.__marked_value[t]=void 0===o?1:o},e.__unmark=function(e){e.forEach((function(e){e.__marked_value&&(r.each(e.__marked_value,(function(t,o){switch(t){case"remove":i.Dom.safeRemove(e);break;case"rowspan":o>1?e.setAttribute("rowspan",o.toString()):e.removeAttribute("rowspan");break;case"colspan":o>1?e.setAttribute("colspan",o.toString()):e.removeAttribute("colspan");break;case"width":e.style.width=o.toString()}delete e.__marked_value[t]})),delete e.__marked_value)}))},e}();t.Table=a},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=o(43);t.asArray=n.asArray;var i=o(78);t.inArray=i.inArray;var r=o(79);t.splitArray=r.splitArray},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=o(15);t.JoditObject=function(e){n.extend(!0,this,e)}},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=o(15),i=function(){function e(e){var t=this;this.length=0,n.extend(!0,this,e),this.length=e.length;var o=Array.prototype;["map","forEach","reduce","push","pop","shift","unshift","slice","splice"].forEach((function(e){t[e]=o[e]}))}return e.prototype.toString=function(){for(var e=[],t=0;this.length>t;t+=1)e[t]=this[t];return e.toString()},e}();t.JoditArray=i},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={},i=n.toString;t.hasOwn=n.hasOwnProperty,["Boolean","Number","String","Function","Array","Date","RegExp","Object","Error","Symbol","HTMLDocument","Window","HTMLElement","HTMLBodyElement","Text","DocumentFragment","DOMStringList","HTMLCollection"].forEach((function(e){n["[object "+e+"]"]=e.toLowerCase()})),t.type=function(e){return null===e?"null":"object"==typeof e||"function"==typeof e?n[i.call(e)]||"object":typeof e}},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=o(1);n.__exportStar(o(81),t),n.__exportStar(o(82),t),n.__exportStar(o(83),t),n.__exportStar(o(84),t),n.__exportStar(o(22),t),n.__exportStar(o(85),t),n.__exportStar(o(86),t),n.__exportStar(o(21),t),n.__exportStar(o(46),t),n.__exportStar(o(45),t),n.__exportStar(o(87),t)},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=o(1);n.__exportStar(o(90),t),n.__exportStar(o(91),t),n.__exportStar(o(94),t),n.__exportStar(o(95),t),n.__exportStar(o(96),t)},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=o(3);t.trim=function(e){return e.replace(n.SPACE_REG_EXP_START,"").replace(n.SPACE_REG_EXP_END,"")}},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.defaultLanguage=function(e,t){return void 0===t&&(t="en"),"auto"!==e&&"string"==typeof e?e:document.documentElement&&document.documentElement.lang?document.documentElement.lang:navigator.language?navigator.language.substr(0,2):t}},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=o(1),i=o(5),r=o(119),a=o(27),s=o(122),l=o(0),c=o(8),d=o(2),u=o(13),f=function(e){function t(t){var o=e.call(this,t)||this;return o.__buttons=[],o.__getControlType=function(e){var t,i=o.jodit.options.controls||d.Config.defaultOptions.controls;if("string"!=typeof e)void 0!==i[(t=n.__assign({name:"empty"},e)).name]&&(t=n.__assign(n.__assign({},i[t.name]),t));else{var r=e.split(/\./),a=i;r.length>1&&void 0!==i[r[0]]&&(a=i[r[0]],e=r[1]),t=void 0!==a[e]?n.__assign({name:e},a[e]):{name:e,command:e,tooltip:e}}return t},o.closeAll=function(){o.jodit&&o.jodit.events&&o.jodit.events.fire("closeAllPopups")},o.initEvents=function(){o.jodit.events.on(o.jodit.ownerWindow,"mousedown touchend",o.closeAll).on(o.listenEvents,o.checkActiveButtons).on("afterSetMode focus",o.immediateCheckActiveButtons)},o.listenEvents="changeStack mousedown mouseup keydown change afterInit readonly afterResize selectionchange changeSelection focus afterSetMode touchstart focus blur",o.immediateCheckActiveButtons=function(){o.isDestructed||o.jodit.isLocked()||(o.__buttons.filter((function(e){return e instanceof a.ToolbarButton})).forEach((function(e){e.disable=e.isDisable(),e.disable||(e.active=e.isActive()),"function"==typeof e.control.getLabel&&e.control.getLabel(o.jodit,e.control,e)})),o.jodit.events&&o.jodit.events.fire("updateToolbar"))},o.checkActiveButtons=i.debounce(o.immediateCheckActiveButtons,o.jodit.defaultTimeout),o.container=o.jodit.create.element("ul"),o.container.classList.add("jodit_toolbar"),o.initEvents(),o}return n.__extends(t,e),t.prototype.getButtonsList=function(){return this.__buttons.map((function(e){return e instanceof a.ToolbarButton?e.control.name:""})).filter((function(e){return""!==e}))},t.prototype.getParentContainer=function(){return this.__parentContainer},t.prototype.appendChild=function(e){this.__buttons.push(e),this.container.appendChild(e.container)},Object.defineProperty(t.prototype,"firstButton",{get:function(){return this.__buttons[0]},enumerable:!0,configurable:!0}),t.prototype.removeChild=function(e){var t=this.__buttons.indexOf(e);-1!==t&&(this.__buttons.splice(t,1),e.container.parentNode===this.container&&l.Dom.safeRemove(e.container))},t.prototype.build=function(e,t,o){var n=this;this.__parentContainer=t;var i=!1;this.clear(),("string"==typeof e?e.split(/[,\s]+/):e).map(this.__getControlType).forEach((function(e){var t=null;if(-1===n.jodit.options.removeButtons.indexOf(e.name)){switch(e.name){case"\n":t=new r.ToolbarBreak(n);break;case"|":i||(i=!0,t=new s.ToolbarSeparator(n));break;default:i=!1,t=new a.ToolbarButton(n,e,o)}t&&n.appendChild(t)}})),this.container.parentNode!==t&&t.appendChild(this.container),this.immediateCheckActiveButtons()},t.prototype.clear=function(){var e=this;n.__spreadArrays(this.__buttons).forEach((function(t){e.removeChild(t),t.destruct()})),this.__buttons.length=0},t.prototype.buttonIsActive=function(e){return!(u.isJoditObject(this.jodit)&&!this.jodit.editorIsActive)&&("function"==typeof e.control.isActive?e.control.isActive(this.jodit,e.control,e):void 0)},t.prototype.buttonIsDisabled=function(e){return!!this.jodit.options.disabled||!(!this.jodit.options.readonly||this.jodit.options.activeButtonsInReadOnly&&-1!==this.jodit.options.activeButtonsInReadOnly.indexOf(e.control.name))||("function"==typeof e.control.isDisable&&(t=e.control.isDisable(this.jodit,e.control,e)),t);var t},t.prototype.getTarget=function(e){return e.target},t.prototype.setDirection=function(e){this.container.style.direction=e,this.container.setAttribute("dir",e)},t.prototype.destruct=function(){this.isDestructed||(this.jodit.events.off(this.jodit.ownerWindow,"mousedown touchstart",this.closeAll).off(this.listenEvents,this.checkActiveButtons).off("afterSetMode focus",this.immediateCheckActiveButtons),this.clear(),l.Dom.safeRemove(this.container),delete this.container,e.prototype.destruct.call(this))},t}(c.Component);t.ToolbarCollection=f},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=o(1),i=o(2),r=o(4),a=o(55);i.Config.prototype.defaultAjaxOptions={dataType:"json",method:"GET",url:"",data:null,contentType:"application/x-www-form-urlencoded; charset=UTF-8",headers:{"X-REQUESTED-WITH":"XMLHttpRequest"},withCredentials:!1,xhr:function(){return new XMLHttpRequest}};var s=function(){function e(e,t){var o=this;this.success_response_codes=[200,201,202],this.jodit=e,this.options=r.extend(!0,{},i.Config.prototype.defaultAjaxOptions,t),this.options.xhr&&(this.xhr=this.options.xhr()),e&&e.events&&e.events.on("beforeDestruct",(function(){o.abort()}))}return e.prototype.__buildParams=function(e,t){return this.options.queryBuild&&"function"==typeof this.options.queryBuild?this.options.queryBuild.call(this,e,t):"string"==typeof e||this.jodit.ownerWindow.FormData&&e instanceof this.jodit.ownerWindow.FormData?e:a.buildQuery(e)},e.prototype.abort=function(){try{this.xhr.abort()}catch(e){}return this},e.prototype.send=function(){var e=this;return new Promise((function(t,o){var n=function(t){var o=null;if("json"===e.options.dataType&&(o=JSON.parse(t)),!o)throw new Error("No JSON format");return o};e.xhr.onabort=function(){o(new Error(e.xhr.statusText))},e.xhr.onerror=function(){o(new Error(e.xhr.statusText))},e.xhr.ontimeout=function(){o(new Error(e.xhr.statusText))},e.xhr.onload=function(){e.response=e.xhr.responseText,e.status=e.xhr.status,t.call(e.xhr,n(e.response)||{})},e.xhr.onreadystatechange=function(){if(e.xhr.readyState===XMLHttpRequest.DONE){var i=e.xhr.responseText;e.response=i,e.status=e.xhr.status,e.success_response_codes.indexOf(e.xhr.status)>-1?t.call(e.xhr,n(i)):o.call(e.xhr,new Error(e.xhr.statusText||e.jodit.i18n("Connection error!")))}},e.xhr.withCredentials=e.options.withCredentials||!1;var i=e.prepareRequest(),a=i.data;e.xhr.open(i.method,i.url,!0),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(a?e.__buildParams(a):void 0)}),0)}))},e.prototype.prepareRequest=function(){if(!this.options.url)throw new Error("Need URL for AJAX request");var t=this.options.url,o=this.options.data,i=(this.options.method||"get").toLowerCase();if("get"===i&&o&&r.isPlainObject(o)){var s=t.indexOf("?");if(-1!==s){var l=r.parseQuery(t);t=t.substr(0,s)+"?"+a.buildQuery(n.__assign(n.__assign({},l),o))}else t+="?"+a.buildQuery(this.options.data)}var c={url:t,method:i,data:o};return e.log.splice(100),e.log.push(c),c},e.log=[],e}();t.Ajax=s},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=o(1),i=o(8),r=o(11),a=o(6),s=o(0),l=function(e){function t(t){var o=e.call(this,t)||this;return o.hide=function(){o.context.classList.remove("jodit_context_menu-show"),o.jodit.ownerWindow.removeEventListener("mouseup",o.hide)},o.context=t.create.div("jodit_context_menu",{"data-editor_id":o.jodit.id}),t.ownerDocument.body.appendChild(o.context),o}return n.__extends(t,e),t.prototype.show=function(e,t,o,n){var i=this,s=this;Array.isArray(o)&&(n&&(this.context.style.zIndex=n.toString()),this.context.innerHTML="",o.forEach((function(e){if(e){var t=s.jodit.i18n(e.title||""),o=i.jodit.create.fromHTML(''+(e.icon?a.ToolbarIcon.getIcon(e.icon):"")+""),n=o.querySelector("span");o.addEventListener("click",(function(t){return e.exec&&e.exec.call(s,t),s.hide(),!1})),n.textContent=t,s.context.appendChild(o)}})),r.css(s.context,{left:e,top:t}),this.jodit.events.on(this.jodit.ownerWindow,"mouseup jodit_close_dialog",s.hide),this.context.classList.add("jodit_context_menu-show"))},t.prototype.destruct=function(){s.Dom.safeRemove(this.context),delete this.context,this.jodit.events.off(this.jodit.ownerWindow,"mouseup",this.hide),e.prototype.destruct.call(this)},t}(i.Component);t.ContextMenu=l},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.F_CLASS="jodit_filebrowser",t.ITEM_CLASS=t.F_CLASS+"_files_item",t.ICON_LOADER=''},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.asArray=function(e){return Array.isArray(e)?e:[e]}},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=o(18);t.debounce=function(e,t,o,i){3===arguments.length&&"boolean"!=typeof o&&(i=o,o=!1);var r=0;return function(){var a=arguments,s=i||this;(o&&!r||!t)&&e.apply(s,a),t&&(clearTimeout(r),r=n.setTimeout((function(){o||e.apply(s,a),r=0}),t))}}},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isWindow=function(e){return null!==e&&e===e.window}},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isURL=function(e){return new 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)}},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),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,n,i=/([\s\n\t\r]*?)rgb\((\d+), (\d+), (\d+)\)/.exec(e)||/([\s\n\t\r]*?)rgba\((\d+), (\d+), (\d+), ([\d.]+)\)/.exec(e);if(!i)return"#000000";for(o=parseInt(i[2],10),n=parseInt(i[3],10),t=(parseInt(i[4],10)|n<<8|o<<16).toString(16).toUpperCase();6>t.length;)t="0"+t;return i[1]+"#"+t}},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.camelCase=function(e){return e.replace(/([-_])(.)/g,(function(e,t,o){return o.toUpperCase()}))}},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.fromCamelCase=function(e){return e.replace(/([A-Z]+)/g,(function(e,t){return"-"+t.toLowerCase()}))}},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=o(22);t.normilizeCSSValue=function(e,t){switch(e.toLowerCase()){case"font-weight":switch(t.toString().toLowerCase()){case"bold":return 700;case"normal":return 400;case"heavy":return 900}return n.isNumeric(t)?+t:t}return t}},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=o(52);t.appendScript=function(e,t,o,i){void 0===o&&(o="");var r=i.createElement("script");return r.className=o,r.type="text/javascript",void 0!==t&&r.addEventListener("load",t),r.src=n.completeUrl(e),i.body.appendChild(r),{callback:t,element:r}}},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.completeUrl=function(e){return"file:"===window.location.protocol&&/^\/\//.test(e)&&(e="https:"+e),e}},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.parseQuery=function(e){for(var t={},o=e.substr(1).split("&"),n=0;o.length>n;n+=1){var i=o[n].split("=");t[decodeURIComponent(i[0])]=decodeURIComponent(i[1]||"")}return t}},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ctrlKey=function(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}},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=o(35);t.buildQuery=function(e,o){var i=[],r=encodeURIComponent;for(var a in e)if(e.hasOwnProperty(a)){var s=o?o+"["+a+"]":a,l=e[a];i.push(n.isPlainObject(l)?t.buildQuery(l,s):r(s)+"="+r(l))}return i.join("&")}},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=o(1),i=o(2),r=o(8),a=o(5),s=o(57),l=o(58),c=o(114);i.Config.prototype.observer={timeout:100};var d=function(e){function t(t){var o=e.call(this,t)||this;o.onChangeStack=function(){o.__newValue=o.snapshot.make(),s.Snapshot.equal(o.__newValue,o.__startValue)||(o.stack.push(new c.Command(o.__startValue,o.__newValue,o)),o.__startValue=o.__newValue,o.changeStack())},o.stack=new l.Stack,o.snapshot=new s.Snapshot(t);var n=a.debounce(o.onChangeStack,t.defaultTimeout);return t.events.on("afterInit.observer",(function(){o.isDestructed||(o.__startValue=o.snapshot.make(),t.events.on("changeSelection.observer selectionstart.observer selectionchange.observer mousedown.observer mouseup.observer keydown.observer keyup.observer",(function(){o.__startValue.html===o.jodit.getNativeEditorValue()&&(o.__startValue=o.snapshot.make())})).on("change.observer",(function(){o.snapshot.isBlocked||n()})))})),o}return n.__extends(t,e),t.prototype.redo=function(){this.stack.redo()&&(this.__startValue=this.snapshot.make(),this.changeStack())},t.prototype.undo=function(){this.stack.undo()&&(this.__startValue=this.snapshot.make(),this.changeStack())},t.prototype.clear=function(){this.__startValue=this.snapshot.make(),this.stack.clear(),this.changeStack()},t.prototype.changeStack=function(){this.jodit&&!this.jodit.isDestructed&&this.jodit.events&&this.jodit.events.fire("changeStack")},t.prototype.destruct=function(){this.jodit.events&&this.jodit.events.off(".observer"),this.snapshot.destruct(),delete this.snapshot,delete this.stack,e.prototype.destruct.call(this)},t}(r.Component);t.Observer=d},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=o(1),i=o(8),r=o(0),a=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.isBlocked=!1,t}return n.__extends(t,e),t.equal=function(e,t){return e.html===t.html&&JSON.stringify(e.range)===JSON.stringify(t.range)},t.countNodesBeforeInParent=function(e){if(!e.parentNode)return 0;var t,o=e.parentNode.childNodes,n=0,i=null;for(t=0;o.length>t;t+=1){if(!i||o[t].nodeType===Node.TEXT_NODE&&""===o[t].textContent||i.nodeType===Node.TEXT_NODE&&o[t].nodeType===Node.TEXT_NODE||(n+=1),o[t]===e)return n;i=o[t]}return 0},t.strokeOffset=function(e,t){for(;e&&e.nodeType===Node.TEXT_NODE;)(e=e.previousSibling)&&e.nodeType===Node.TEXT_NODE&&null!==e.textContent&&(t+=e.textContent.length);return t},t.prototype.calcHierarchyLadder=function(e){var o=[];if(!e||!e.parentNode||!r.Dom.isOrContains(this.jodit.editor,e))return[];for(;e&&e!==this.jodit.editor;)e&&o.push(t.countNodesBeforeInParent(e)),e=e.parentNode;return o.reverse()},t.prototype.getElementByLadder=function(e){var t,o=this.jodit.editor;for(t=0;o&&e.length>t;t+=1)o=o.childNodes[e[t]];return o},t.prototype.make=function(){var e={html:"",range:{startContainer:[],startOffset:0,endContainer:[],endOffset:0}};e.html=this.jodit.getNativeEditorValue();var o=this.jodit.selection.sel;if(o&&o.rangeCount){var n=o.getRangeAt(0),i=this.calcHierarchyLadder(n.startContainer),r=this.calcHierarchyLadder(n.endContainer),a=t.strokeOffset(n.startContainer,n.startOffset),s=t.strokeOffset(n.endContainer,n.endOffset);i.length||n.startContainer===this.jodit.editor||(a=0),r.length||n.endContainer===this.jodit.editor||(s=0),e.range={startContainer:i,startOffset:a,endContainer:r,endOffset:s}}return e},t.prototype.restore=function(e){this.isBlocked=!0,this.jodit.setEditorValue(e.html);try{if(e.range){var t=this.jodit.editorDocument.createRange();t.setStart(this.getElementByLadder(e.range.startContainer),e.range.startOffset),t.setEnd(this.getElementByLadder(e.range.endContainer),e.range.endOffset),this.jodit.selection.selectRange(t)}}catch(e){}this.isBlocked=!1},t.prototype.destruct=function(){this.isBlocked=!1,e.prototype.destruct.call(this)},t}(i.Component);t.Snapshot=a},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(){this.commands=[],this.stackPosition=-1}return e.prototype.clearRedo=function(){this.commands.length=this.stackPosition+1},e.prototype.clear=function(){this.commands.length=0,this.stackPosition=-1},e.prototype.push=function(e){this.clearRedo(),this.commands.push(e),this.stackPosition+=1},e.prototype.undo=function(){return!!this.canUndo()&&(this.commands[this.stackPosition]&&this.commands[this.stackPosition].undo(),this.stackPosition-=1,!0)},e.prototype.redo=function(){return!!this.canRedo()&&(this.stackPosition+=1,this.commands[this.stackPosition]&&this.commands[this.stackPosition].redo(),!0)},e.prototype.canUndo=function(){return this.stackPosition>=0},e.prototype.canRedo=function(){return this.commands.length-1>this.stackPosition},e}();t.Stack=n},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=o(3),i=o(3),r=o(0),a=o(11),s=o(19),l=o(12),c=o(35),d=o(24),u=o(9),f=function(){function e(e){var t=this;this.jodit=e,this.isMarker=function(e){return r.Dom.isNode(e,t.win)&&e.nodeType===Node.ELEMENT_NODE&&"SPAN"===e.nodeName&&e.hasAttribute("data-"+n.MARKER_CLASS)},this.focus=function(){var e,o;if(!t.isFocused()){t.jodit.iframe&&"complete"==t.doc.readyState&&t.jodit.iframe.focus(),t.win.focus(),t.area.focus();var n=t.sel,i=t.createRange();return!n||n.rangeCount&&t.current()||(i.setStart(t.area,0),i.collapse(!0),n.removeAllRanges(),n.addRange(i)),t.jodit.editorIsActive||null===(o=null===(e=t.jodit)||void 0===e?void 0:e.events)||void 0===o||o.fire("focus"),!0}return!1},this.eachSelection=function(e){var o=t.sel;if(o&&o.rangeCount){var n=o.getRangeAt(0),a=[],s=n.startOffset,l=t.area.childNodes.length,c=n.startContainer===t.area?t.area.childNodes[l>s?s:l-1]:n.startContainer,d=n.endContainer===t.area?t.area.childNodes[n.endOffset-1]:n.endContainer;r.Dom.find(c,(function(e){return!e||e===t.area||r.Dom.isEmptyTextNode(e)||t.isMarker(e)||a.push(e),e===d||e&&e.contains(d)}),t.area,!0,"nextSibling",!1);var u=function(o){if(o.nodeName.match(/^(UL|OL)$/))return Array.from(o.childNodes).forEach(u);if("LI"===o.nodeName)if(o.firstChild)o=o.firstChild;else{var n=t.jodit.create.inside.text(i.INVISIBLE_SPACE);o.appendChild(n),o=n}e(o)};0===a.length&&r.Dom.isEmptyTextNode(c)&&a.push(c),a.forEach(u)}}}return e.prototype.errorNode=function(e){if(!r.Dom.isNode(e,this.win))throw new Error("Parameter node must be instance of Node")},Object.defineProperty(e.prototype,"area",{get:function(){return this.jodit.editor},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"win",{get:function(){return this.jodit.editorWindow},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"doc",{get:function(){return this.jodit.editorDocument},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"sel",{get:function(){return this.win.getSelection()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"range",{get:function(){var e=this.sel;return e&&e.rangeCount?e.getRangeAt(0):this.createRange()},enumerable:!0,configurable:!0}),e.prototype.createRange=function(){return this.doc.createRange()},e.prototype.remove=function(){var e=this.sel,t=this.current();if(e&&t)for(var o=0;e.rangeCount>o;o+=1)e.getRangeAt(o).deleteContents(),e.getRangeAt(o).collapse(!0)},e.prototype.insertCursorAtPoint=function(e,t){this.removeMarkers();try{var o=this.createRange();if(this.doc.caretPositionFromPoint){var n=this.doc.caretPositionFromPoint(e,t);o.setStart(n.offsetNode,n.offset)}else this.doc.caretRangeFromPoint&&(n=this.doc.caretRangeFromPoint(e,t),o.setStart(n.startContainer,n.startOffset));if(o){o.collapse(!0);var i=this.sel;i&&(i.removeAllRanges(),i.addRange(o))}else if(void 0!==this.doc.body.createTextRange){var r=this.doc.body.createTextRange();r.moveToPoint(e,t);var a=r.duplicate();a.moveToPoint(e,t),r.setEndPoint("EndToEnd",a),r.select()}return!0}catch(e){}return!1},e.prototype.removeMarkers=function(){l.$$("span[data-"+n.MARKER_CLASS+"]",this.area).forEach(r.Dom.safeRemove)},e.prototype.marker=function(e,t){void 0===e&&(e=!1);var o=null;t&&(o=t.cloneRange()).collapse(e);var i=this.jodit.create.inside.span();return i.id=n.MARKER_CLASS+"_"+ +new Date+"_"+(""+Math.random()).slice(2),i.style.lineHeight="0",i.style.display="none",i.setAttribute("data-"+n.MARKER_CLASS,e?"start":"end"),i.appendChild(this.jodit.create.inside.text(n.INVISIBLE_SPACE)),o&&r.Dom.isOrContains(this.area,e?o.startContainer:o.endContainer)&&o.insertNode(i),i},e.prototype.restore=function(e){var t=this;if(void 0===e&&(e=[]),Array.isArray(e)){var o=this.sel;o&&o.removeAllRanges(),e.forEach((function(e){var n=t.createRange(),i=t.area.querySelector("#"+e.endId),a=t.area.querySelector("#"+e.startId);if(a){if(e.collapsed||!i){var s=a.previousSibling;s&&s.nodeType===Node.TEXT_NODE?n.setStart(s,s.nodeValue?s.nodeValue.length:0):n.setStartBefore(a),r.Dom.safeRemove(a),n.collapse(!0)}else n.setStartAfter(a),r.Dom.safeRemove(a),n.setEndBefore(i),r.Dom.safeRemove(i);o&&o.addRange(n)}}))}},e.prototype.save=function(){var e=this.sel;if(!e||!e.rangeCount)return[];var t,o,n,i=[],r=e.rangeCount,a=[];for(t=0;r>t;t+=1)a[t]=e.getRangeAt(t),a[t].collapsed?(o=this.marker(!0,a[t]),i[t]={startId:o.id,collapsed:!0,startMarker:o.outerHTML}):(o=this.marker(!0,a[t]),n=this.marker(!1,a[t]),i[t]={startId:o.id,endId:n.id,collapsed:!1,startMarker:o.outerHTML,endMarker:n.outerHTML});for(e.removeAllRanges(),t=r-1;t>=0;--t){var s=this.doc.getElementById(i[t].startId);if(s)if(i[t].collapsed)a[t].setStartAfter(s),a[t].collapse(!0);else if(a[t].setStartBefore(s),i[t].endId){var l=this.doc.getElementById(i[t].endId);l&&a[t].setEndAfter(l)}try{e.addRange(a[t].cloneRange())}catch(e){}}return i},e.prototype.isCollapsed=function(){for(var e=this.sel,t=0;e&&e.rangeCount>t;t+=1)if(!e.getRangeAt(t).collapsed)return!1;return!0},e.prototype.isFocused=function(){return this.doc.hasFocus&&this.doc.hasFocus()&&this.area===this.doc.activeElement},e.prototype.current=function(e){if(void 0===e&&(e=!0),this.jodit.getRealMode()===n.MODE_WYSIWYG){var t=this.sel;if(t&&t.rangeCount>0){var o=t.getRangeAt(0),i=o.startContainer,a=!1,s=function(e){return a?e.lastChild:e.firstChild};if(i.nodeType!==Node.TEXT_NODE){if((i=o.startContainer.childNodes[o.startOffset])||(i=o.startContainer.childNodes[o.startOffset-1],a=!0),i&&t.isCollapsed&&i.nodeType!==Node.TEXT_NODE)if(!a&&i.previousSibling&&i.previousSibling.nodeType===Node.TEXT_NODE)i=i.previousSibling;else if(e)for(var l=s(i);l;){if(l&&l.nodeType===Node.TEXT_NODE){i=l;break}l=s(l)}if(i&&!t.isCollapsed&&i.nodeType!==Node.TEXT_NODE){var c=i,d=i;do{c=c.firstChild,d=d.lastChild}while(c&&d&&c.nodeType!==Node.TEXT_NODE);c===d&&c&&c.nodeType===Node.TEXT_NODE&&(i=c)}}if(i&&r.Dom.isOrContains(this.area,i))return i}}return!1},e.prototype.insertNode=function(e,t,o){void 0===t&&(t=!0),void 0===o&&(o=!0),this.errorNode(e),this.focus();var n=this.sel;if(this.isCollapsed()||this.jodit.execCommand("Delete"),n&&n.rangeCount){var i=n.getRangeAt(0);r.Dom.isOrContains(this.area,i.commonAncestorContainer)?(i.deleteContents(),i.insertNode(e)):this.area.appendChild(e)}else this.area.appendChild(e);t&&this.setCursorAfter(e),o&&this.jodit.events&&this.jodit.events.fire("synchro"),this.jodit.events&&this.jodit.events.fire("afterInsertNode",e)},e.prototype.insertHTML=function(e){if(""!==e){var t,o,n=this.jodit.create.inside.div(),i=this.jodit.create.inside.fragment();if(!this.isFocused()&&this.jodit.isEditorMode()&&this.focus(),r.Dom.isNode(e,this.win)?n.appendChild(e):n.innerHTML=e.toString(),(this.jodit.isEditorMode()||!1!==this.jodit.events.fire("insertHTML",n.innerHTML))&&(t=n.lastChild)){for(;n.firstChild;)t=n.firstChild,i.appendChild(n.firstChild);for(this.insertNode(i,!1),t?this.setCursorAfter(t):this.setCursorIn(i),o=this.area.lastChild;o&&o.nodeType===Node.TEXT_NODE&&o.previousSibling&&o.nodeValue&&/^\s*$/.test(o.nodeValue);)o=o.previousSibling;t&&(o&&t===o&&t.nodeType===Node.ELEMENT_NODE&&this.area.appendChild(this.jodit.create.inside.element("br")),this.setCursorAfter(t))}}},e.prototype.insertImage=function(e,t,o){var n="string"==typeof e?this.jodit.create.inside.element("img"):e;if("string"==typeof e&&n.setAttribute("src",e),null!==o){var i=o.toString();i&&"auto"!==i&&0>String(i).indexOf("px")&&0>String(i).indexOf("%")&&(i+="px"),a.css(n,"width",i)}t&&"object"==typeof t&&a.css(n,t);var r=function(){(n.offsetHeight>n.naturalHeight||n.offsetWidth>n.naturalWidth)&&(n.style.width="",n.style.height=""),n.removeEventListener("load",r)};n.addEventListener("load",r),n.complete&&r();var s=this.insertNode(n);return this.jodit.events.fire("afterInsertImage",n),s},e.prototype.setCursorAfter=function(e){var t=this;if(this.errorNode(e),!r.Dom.up(e,(function(e){return e===t.area||e&&e.parentNode===t.area}),this.area))throw new Error("Node element must be in editor");var o=this.createRange(),i=!1;return e.nodeType!==Node.TEXT_NODE?(i=this.doc.createTextNode(n.INVISIBLE_SPACE),o.setStartAfter(e),o.insertNode(i),o.selectNode(i)):o.setEnd(e,null!==e.nodeValue?e.nodeValue.length:0),o.collapse(!1),this.selectRange(o),i},e.prototype.cursorInTheEdge=function(e,t){var o=this.sel,n=o&&o.rangeCount?o.getRangeAt(0):null;if(!n)return null;var a=e?n.startContainer:n.endContainer,s=function(o){for(;o;)if(n=o,(o=e?r.Dom.prev(n,(function(e){return!!e}),t):r.Dom.next(n,(function(e){return!!e}),t))&&!r.Dom.isEmptyTextNode(o)&&"BR"!==o.nodeName)return!1;var n};if(a.nodeType===Node.TEXT_NODE){var l=a.nodeValue||"";if(e&&n.startOffset>l.length-l.replace(i.INVISIBLE_SPACE_REG_EXP_START,"").length)return!1;if(!e&&n.startOffset0){var t=e.getRangeAt(0).cloneContents(),o=this.jodit.create.inside.div();return o.appendChild(t),o.innerHTML}return""},e.prototype.applyCSS=function(e,t,o){var i=this;void 0===t&&(t="span");var f,p=function(e){return null!==e&&!r.Dom.isEmptyTextNode(e)&&!i.isMarker(e)},h=function(e){return!!e&&(new RegExp("^"+e.nodeName+"$","i").test(t)||!(!o||!function(e){return"FONT"!==e.nodeName&&e.nodeType===Node.ELEMENT_NODE&&(c.isPlainObject(o)&&d.each(o,(function(t,o){var n=a.css(e,t,void 0,!0);return null!==n&&""!==n&&-1!==o.indexOf(n.toString().toLowerCase())}))||"function"==typeof o&&o(i.jodit,e))}(e)))&&p(e)},v=function(t){h(t)&&("SPAN"===t.nodeName&&e&&Object.keys(e).forEach((function(o){0===f||a.css(t,o)===s.normilizeCSSValue(o,e[o])?(a.css(t,o,""),void 0===f&&(f=0)):(a.css(t,o,e[o]),void 0===f&&(f=1))})),r.Dom.isBlock(t,i.win)||t.getAttribute("style")&&"SPAN"===t.nodeName||(r.Dom.unwrap(t),void 0===f&&(f=0)))};if(this.isCollapsed()){var m=!1;if(this.current()&&r.Dom.closest(this.current(),t,this.area)){m=!0;var g=r.Dom.closest(this.current(),t,this.area);g&&this.setCursorAfter(g)}if("SPAN"===t.toUpperCase()||!m){var b=this.jodit.create.inside.element(t);b.appendChild(this.jodit.create.inside.text(n.INVISIBLE_SPACE)),this.insertNode(b,!1,!1),"SPAN"===t.toUpperCase()&&e&&a.css(b,e),this.setCursorIn(b)}}else{var _=this.save();s.normalizeNode(this.area.firstChild),l.$$("*[style*=font-size]",this.area).forEach((function(e){e.style&&e.style.fontSize&&e.setAttribute("data-font-size",e.style.fontSize.toString())})),this.doc.execCommand("fontsize",!1,"7"),l.$$("*[data-font-size]",this.area).forEach((function(e){var t=e.getAttribute("data-font-size");e.style&&t&&(e.style.fontSize=t,e.removeAttribute("data-font-size"))})),l.$$('font[size="7"]',this.area).forEach((function(o){if(r.Dom.next(o,p,o.parentNode)||r.Dom.prev(o,p,o.parentNode)||!h(o.parentNode)||o.parentNode===i.area||r.Dom.isBlock(o.parentNode,i.win)&&!n.IS_BLOCK.test(t))if(o.firstChild&&!r.Dom.next(o.firstChild,p,o)&&!r.Dom.prev(o.firstChild,p,o)&&h(o.firstChild))v(o.firstChild);else if(r.Dom.closest(o,h,i.area)){var s=i.createRange(),l=r.Dom.closest(o,h,i.area);s.setStartBefore(l),s.setEndBefore(o);var c=s.extractContents();c.textContent&&u.trim(c.textContent).length||!c.firstChild||r.Dom.unwrap(c.firstChild),l.parentNode&&l.parentNode.insertBefore(c,l),s.setStartAfter(o),s.setEndAfter(l);var d=s.extractContents();d.textContent&&u.trim(d.textContent).length||!d.firstChild||r.Dom.unwrap(d.firstChild),r.Dom.after(l,d),v(l)}else{var m,g=[];o.firstChild&&r.Dom.find(o.firstChild,(function(e){return e&&h(e)?(void 0===m&&(m=!0),g.push(e)):void 0===m&&(m=!1),!1}),o,!0),g.forEach(r.Dom.unwrap),m||(void 0===f&&(f=1),1===f&&a.css(r.Dom.replace(o,t,!1,!1,i.doc),e&&"SPAN"===t.toUpperCase()?e:{}))}else v(o.parentNode);o.parentNode&&r.Dom.unwrap(o)})),this.restore(_)}},e}();t.Select=f},function(e,t,o){"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.canUsePersistentStorage=function(){return void 0===n&&(n=function(){var e="___Jodit___"+Math.random().toString();try{localStorage.setItem(e,"1");var t="1"===localStorage.getItem(e);return localStorage.removeItem(e),t}catch(e){}return!1}()),n};var i=function(){function e(e){this.rootKey=e}return e.prototype.set=function(e,t){try{var o=localStorage.getItem(this.rootKey),n=o?JSON.parse(o):{};n[e]=t,localStorage.setItem(this.rootKey,JSON.stringify(n))}catch(e){}},e.prototype.get=function(e){try{var t=localStorage.getItem(this.rootKey),o=t?JSON.parse(t):{};return void 0!==o[e]?o[e]:null}catch(e){}},e.prototype.exists=function(e){return null!==this.get(e)},e.prototype.clear=function(){try{localStorage.removeItem(this.rootKey)}catch(e){}},e}();t.LocalStorageProvider=i},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(){this.data=new Map}return e.prototype.set=function(e,t){this.data.set(e,t)},e.prototype.get=function(e){return this.data.get(e)},e.prototype.exists=function(e){return this.data.has(e)},e.prototype.clear=function(){this.data.clear()},e}();t.MemoryStorageProvider=n},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=o(1),i=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.toolbar=r.JoditToolbarCollection.makeCollection(t),t}return n.__extends(t,e),t.prototype.destruct=function(){this.toolbar.destruct(),delete this.toolbar,e.prototype.destruct.call(this)},t}(o(63).View);t.ViewWithToolbar=i;var r=o(20)},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=o(1),i=o(64),r=o(117),a=o(118),s=o(4),l=function(e){function t(t,o){var r=e.call(this,t)||this;return r.version="3.3.1",r.__modulesInstances={},r.buffer=a.Storage.makeStorage(),r.progress_bar=r.create.div("jodit_progress_bar",r.create.div()),r.options={removeButtons:[],zIndex:100002,fullsize:!1,showTooltip:!0,useNativeTooltip:!1,buttons:[],globalFullsize:!0},r.components=[],r.getVersion=function(){return r.version},r.id=t&&t.id?t.id:(new Date).getTime().toString(),r.jodit=t||r,r.events=t&&t.events?t.events:new i.EventsNative(r.ownerDocument),r.buffer=t&&t.buffer?t.buffer:a.Storage.makeStorage(),r.options=n.__assign(n.__assign({},r.options),o),r}return n.__extends(t,e),Object.defineProperty(t.prototype,"defaultTimeout",{get:function(){return 100},enumerable:!0,configurable:!0}),t.prototype.i18n=function(e){for(var t,o,n,i=[],r=1;arguments.length>r;r++)i[r-1]=arguments[r];return s.i18n(e,i,(null===(o=null===(t=this)||void 0===t?void 0:t.jodit)||void 0===o?void 0:o.options)||(null===(n=this)||void 0===n?void 0:n.options))},t.prototype.toggleFullSize=function(t){e.prototype.toggleFullSize.call(this,t),this.events&&this.events.fire("toggleFullSize",t)},t.prototype.getInstance=function(e,t){if("function"!=typeof c.Jodit.modules[e])throw new Error("Need real module name");return void 0===this.__modulesInstances[e]&&(this.__modulesInstances[e]=new c.Jodit.modules[e](this.jodit||this,t)),this.__modulesInstances[e]},t.prototype.destruct=function(){this.isDestructed||(this.events&&(this.events.destruct(),delete this.events),delete this.options,e.prototype.destruct.call(this))},t}(r.Panel);t.View=l;var c=o(10)},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=o(1),i=o(116),r=function(){function e(e){var t=this;this.__key="__JoditEventsNativeNamespaces",this.doc=document,this.__stopped=[],this.prepareEvent=function(e){e.cancelBubble||(e.type.match(/^touch/)&&e.changedTouches&&e.changedTouches.length&&["clientX","clientY","pageX","pageY"].forEach((function(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&&t.doc.defaultView.clipboardData&&Object.defineProperty(e,"clipboardData",{get:function(){return t.doc.defaultView.clipboardData},configurable:!0,enumerable:!0}))},this.current=[],this.isDestructed=!1,e&&(this.doc=e),this.__key+=(new Date).getTime()}return e.prototype.eachEvent=function(e,t){var o=this;e.split(/[\s,]+/).forEach((function(e){var n=e.split(".");t.call(o,n[0],n[1]||i.defaultNameSpace)}))},e.prototype.getStore=function(e){if(void 0===e[this.__key]){var t=new i.EventHandlersStore;Object.defineProperty(e,this.__key,{enumerable:!1,configurable:!0,value:t})}return e[this.__key]},e.prototype.clearStore=function(e){void 0!==e[this.__key]&&delete e[this.__key]},e.prototype.triggerNativeEvent=function(e,t){var o=this.doc.createEvent("HTMLEvents");"string"==typeof t?o.initEvent(t,!0,!0):(o.initEvent(t.type,t.bubbles,t.cancelable),["screenX","screenY","clientX","clientY","target","srcElement","currentTarget","timeStamp","which","keyCode"].forEach((function(e){Object.defineProperty(o,e,{value:t[e],enumerable:!0})})),Object.defineProperty(o,"originalEvent",{value:t,enumerable:!0})),e.dispatchEvent(o)},e.prototype.removeStop=function(e){if(e){var t=this.__stopped.indexOf(e);-1!==t&&this.__stopped.splice(t,1)}},e.prototype.isStopped=function(e){return void 0!==e&&-1!==this.__stopped.indexOf(e)},e.prototype.on=function(e,t,o,n,i){var r=this;void 0===i&&(i=!1);var a="string"==typeof e?this:e,s="string"==typeof t?t:e,l=o;void 0===l&&"function"==typeof t&&(l=t);var c=this.getStore(a);if("string"!=typeof s||""===s)throw new Error("Need events names");if("function"!=typeof l)throw new Error("Need event handler");if(Array.isArray(a))return a.forEach((function(e){r.on(e,s,l,n)})),this;var d="function"==typeof a.addEventListener,u=this,f=function(e){return l&&l.apply(this,arguments)};return d&&(f=function(e){if(u.prepareEvent(e),l&&!1===l.call(this,e))return e.preventDefault(),e.stopImmediatePropagation(),!1},n&&(f=function(e){u.prepareEvent(e);for(var t=e.target;t&&t!==this;){if(t.matches(n))return Object.defineProperty(e,"target",{value:t,configurable:!0,enumerable:!0}),l&&!1===l.call(t,e)?(e.preventDefault(),!1):void 0;t=t.parentNode}})),this.eachEvent(s,(function(e,t){if(""===e)throw new Error("Need event name");!1===c.indexOf(e,t,l)&&(c.set(e,t,{event:e,originalCallback:l,syntheticCallback:f},i),d&&a.addEventListener(e,f,!1))})),this},e.prototype.off=function(e,t,o){var n=this,r="string"==typeof e?this:e,a="string"==typeof t?t:e,s=this.getStore(r),l=o;if("string"!=typeof a||!a)return s.namespaces().forEach((function(e){n.off(r,"."+e)})),this.clearStore(r),this;void 0===l&&"function"==typeof t&&(l=t);var c="function"==typeof r.removeEventListener,d=function(e){c&&r.removeEventListener(e.event,e.syntheticCallback,!1)},u=function(e,t){if(""!==e){var o=s.get(e,t);if(o&&o.length)if("function"!=typeof l)o.forEach(d),o.length=0;else{var n=s.indexOf(e,t,l);!1!==n&&(d(o[n]),o.splice(n,1))}}else s.events(t).forEach((function(e){""!==e&&u(e,t)}))};return this.eachEvent(a,(function(e,t){t===i.defaultNameSpace?s.namespaces().forEach((function(t){u(e,t)})):u(e,t)})),this},e.prototype.stopPropagation=function(e,t){var o=this,n="string"==typeof e?this:e,r="string"==typeof e?e:t;if("string"!=typeof r)throw new Error("Need event names");var a=this.getStore(n);this.eachEvent(r,(function(e,t){var r=a.get(e,t);r&&o.__stopped.push(r),t===i.defaultNameSpace&&a.namespaces(!0).forEach((function(t){return o.stopPropagation(n,e+"."+t)}))}))},e.prototype.fire=function(e,t){for(var o=this,r=[],a=2;arguments.length>a;a++)r[a-2]=arguments[a];var s,l=void 0,c="string"==typeof e?this:e,d="string"==typeof e?e:t,u="string"==typeof e?n.__spreadArrays([t],r):r,f="function"==typeof c.dispatchEvent;if(!f&&"string"!=typeof d)throw new Error("Need events names");var p=this.getStore(c);return"string"!=typeof d&&f?this.triggerNativeEvent(c,t):this.eachEvent(d,(function(e,t){if(f)o.triggerNativeEvent(c,e);else{var r=p.get(e,t);if(r)try{r.every((function(t){return!o.isStopped(r)&&(o.current.push(e),s=t.syntheticCallback.apply(c,u),o.current.pop(),void 0!==s&&(l=s),!0)}))}finally{o.removeStop(r)}t!==i.defaultNameSpace||f||p.namespaces().filter((function(e){return e!==t})).forEach((function(t){var i=o.fire.apply(o,n.__spreadArrays([c,e+"."+t],u));void 0!==i&&(l=i)}))}})),l},e.prototype.destruct=function(){this.isDestructed&&(this.isDestructed=!0,this.off(this),this.getStore(this).clear(),delete this[this.__key])},e}();t.EventsNative=r},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=o(21),i=o(24),r=o(43),a=o(0),s=o(4),l=function(){function e(t,o){this.doc=t,null!==o&&(this.inside=o?new e(o):new e(t,null))}return e.prototype.setDocument=function(e){this.doc=e},e.prototype.element=function(e,t,o){var a=this,l=this.doc.createElement(e.toLowerCase());return t&&(n.isPlainObject(t)?i.each(t,(function(e,t){n.isPlainObject(t)&&"style"===e?s.css(l,t):l.setAttribute(e,t.toString())})):o=t),o&&r.asArray(o).forEach((function(e){return l.appendChild("string"==typeof e?a.fromHTML(e):e)})),l},e.prototype.div=function(e,t,o){var n=this.element("div",t,o);return e&&(n.className=e),n},e.prototype.span=function(e,t,o){var n=this.element("span",t,o);return e&&(n.className=e),n},e.prototype.a=function(e,t,o){var n=this.element("a",t,o);return e&&(n.className=e),n},e.prototype.text=function(e){return this.doc.createTextNode(e)},e.prototype.fragment=function(){return this.doc.createDocumentFragment()},e.prototype.fromHTML=function(e){var t=this.div();t.innerHTML=e.toString();var o=t.firstChild===t.lastChild&&t.firstChild?t.firstChild:t;return a.Dom.safeRemove(o),o},e}();t.Create=l},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=o(16),i=o(6);t.Promt=function(e,t,o,a,s){var l=new n.Dialog,c=l.create.fromHTML(''+i.ToolbarIcon.getIcon("cancel")+""+r.Jodit.prototype.i18n("Cancel")+""),d=l.create.fromHTML(''+i.ToolbarIcon.getIcon("check")+""+r.Jodit.prototype.i18n("Ok")+""),u=l.create.element("form",{class:"jodit_promt"}),f=l.create.element("input",{autofocus:!0,class:"jodit_input"}),p=l.create.element("label");"function"==typeof t&&(o=t,t=void 0),a&&f.setAttribute("placeholder",a),p.appendChild(l.create.text(e)),u.appendChild(p),u.appendChild(f),c.addEventListener("click",l.close,!1);var h=function(){o&&"function"==typeof o&&!1===o(f.value)||l.close()};return d.addEventListener("click",h),u.addEventListener("submit",(function(){return h(),!1})),l.setFooter([d,c]),l.open(u,t||" ",!0,!0),f.focus(),void 0!==s&&s.length&&(f.value=s,f.select()),l};var r=o(10)},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=o(16),i=o(6);t.Confirm=function(e,t,o){var a=new n.Dialog,s=a.create.fromHTML('
'),l=a.create.element("label");"function"==typeof t&&(o=t,t=void 0),l.appendChild(a.create.fromHTML(e)),s.appendChild(l);var c=a.create.fromHTML(''+i.ToolbarIcon.getIcon("cancel")+""+r.Jodit.prototype.i18n("Cancel")+"");c.addEventListener("click",(function(){o&&o(!1),a.close()}));var d=function(){o&&o(!0),a.close()},u=a.create.fromHTML(''+i.ToolbarIcon.getIcon("check")+""+r.Jodit.prototype.i18n("Yes")+"");return u.addEventListener("click",d),s.addEventListener("submit",(function(){return d(),!1})),a.setFooter([u,c]),a.open(s,t||" ",!0,!0),u.focus(),a};var r=o(10)},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=o(1),i=o(29),r=o(2),a=o(3),s=o(36),l=o(69);r.Config.prototype.controls.cut={command:"cut",isDisable:function(e){return e.selection.isCollapsed()},tooltip:"Cut selection"},r.Config.prototype.controls.copy={command:"copy",isDisable:function(e){return e.selection.isCollapsed()},tooltip:"Copy selection"},t.pluginKey="clipboard";var c=function(e){function o(){return null!==e&&e.apply(this,arguments)||this}return n.__extends(o,e),o.prototype.afterInit=function(e){e.events.on("copy."+t.pluginKey+" cut."+t.pluginKey,(function(o){var n,i,r=e.selection.getHTML(),c=l.getDataTransfer(o)||l.getDataTransfer(e.editorWindow)||l.getDataTransfer(o.originalEvent);c&&(c.setData(a.TEXT_PLAIN,s.stripTags(r)),c.setData(a.TEXT_HTML,r)),e.buffer.set(t.pluginKey,r),"cut"===o.type&&(e.selection.remove(),e.selection.focus()),o.preventDefault(),null===(i=null===(n=e)||void 0===n?void 0:n.events)||void 0===i||i.fire("afterCopy",r)}))},o.prototype.beforeDestruct=function(e){var o,n,i,r;null===(n=null===(o=e)||void 0===o?void 0:o.buffer)||void 0===n||n.set(t.pluginKey,""),null===(r=null===(i=e)||void 0===i?void 0:i.events)||void 0===r||r.off("."+t.pluginKey)},o}(i.Plugin);t.clipboard=c},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=o(1),i=o(2),r=o(3),a=o(14),s=o(4),l=o(0),c=o(157),d=o(68);i.Config.prototype.askBeforePasteHTML=!0,i.Config.prototype.askBeforePasteFromWord=!0,i.Config.prototype.nl2brInPlainText=!0,i.Config.prototype.defaultActionOnPaste=r.INSERT_AS_HTML,t.getDataTransfer=function(e){return e.clipboardData?e.clipboardData:e.dataTransfer||new DataTransfer},i.Config.prototype.controls.paste={tooltip:"Paste from clipboard",exec:function(e){return n.__awaiter(this,void 0,void 0,(function(){var t,o,i,r,s;return n.__generator(this,(function(n){switch(n.label){case 0:if(e.selection.focus(),t="",(o=!0)&&(t=e.buffer.get(d.pluginKey)||"",o=0===t.length),!o||!navigator.clipboard)return[3,11];n.label=1;case 1:return n.trys.push([1,6,,7]),[4,navigator.clipboard.read()];case 2:return(i=n.sent())&&i.length?[4,i[0].getType("text/plain")]:[3,5];case 3:return r=n.sent(),[4,new Response(r).text()];case 4:t=n.sent(),n.label=5;case 5:return[3,7];case 6:return n.sent(),[3,7];case 7:if(!o)return[3,11];n.label=8;case 8:return n.trys.push([8,10,,11]),[4,navigator.clipboard.readText()];case 9:return t=n.sent(),o=!1,[3,11];case 10:return n.sent(),[3,11];case 11:return o&&(s=e.value,e.editorDocument.execCommand("paste"),o=s!==e.value),t?e.selection.insertHTML(t):o&&a.Alert(e.i18n("Your browser doesn't support direct access to the clipboard."),(function(){e.selection.focus()})),[2]}}))}))}},t.paste=function(e){var o=function(t,o,n,i,r){if(void 0===i&&(i="Clean"),void 0===r&&(r="Insert only Text"),!e.events||!1!==e.events.fire("beforeOpenPasteDialog",t,o,n,i,r)){var s=a.Confirm('
'+t+"
",o,n);s.container.setAttribute("data-editor_id",e.id);var l=s.create.fromHTML(''+e.i18n("Keep")+""),c=s.create.fromHTML(''+e.i18n(i)+""),d=s.create.fromHTML(''+e.i18n(r)+""),u=s.create.fromHTML(''+e.i18n("Cancel")+"");return e.events.on(l,"click",(function(){s.close(),n&&n(!0)})),e.events.on(c,"click",(function(){s.close(),n&&n(!1)})),e.events.on(d,"click",(function(){s.close(),n&&n(0)})),e.events.on(u,"click",(function(){s.close()})),s.setFooter([l,c,r?d:"",u]),e.events&&e.events.fire("afterOpenPasteDialog",s,t,o,n,i,r),s}},n=function(t,o){if("string"==typeof t)switch(o){case r.INSERT_CLEAR_HTML:t=s.cleanFromWord(t);break;case r.INSERT_ONLY_TEXT:t=s.stripTags(t);break;case r.INSERT_AS_TEXT:t=s.htmlspecialchars(t)}"string"==typeof t&&e.buffer.set(d.pluginKey,t),e.selection.insertHTML(t)},i=function(t,i){var a=e.buffer.get(d.pluginKey);if(s.isHTML(t)&&a!==u(t))return e.events.stopPropagation("beforePaste"),t=u(t),o(e.i18n("Your code is similar to HTML. Keep as HTML?"),e.i18n("Paste as HTML"),(function(o){var a=r.INSERT_AS_HTML;!1===o&&(a=r.INSERT_AS_TEXT),0===o&&(a=r.INSERT_ONLY_TEXT),"drop"===i.type&&e.selection.insertCursorAtPoint(i.clientX,i.clientY),n(t,a),e.setEditorValue()}),"Insert as Text"),!1},u=function(e){var t=e.search(//i);-1!==t&&(e=e.substr(t+20));var o=e.search(//i);return-1!==o&&(e=e.substr(0,o)),e};e.events.on("paste",(function(o){if(!1===e.events.fire("beforePaste",o))return o.preventDefault(),!1;var i=t.getDataTransfer(o);if(o&&i){var a=i.types,c="";if(Array.isArray(a)||"domstringlist"===s.type(a))for(var f=0;a.length>f;f+=1)c+=a[f]+";";else c=a.toString()+";";var p=/text\/html/i.test(c)?i.getData("text/html"):/text\/rtf/i.test(c)&&s.browser("safari")?i.getData("text/rtf"):/text\/plain/i.test(c)&&!s.browser("mozilla")?i.getData(r.TEXT_PLAIN):/text/i.test(c)&&r.IS_IE?i.getData(r.TEXT_PLAIN):"";(l.Dom.isNode(p,e.editorWindow)||""!==s.trim(p))&&(p=u(p),e.buffer.get(d.pluginKey)!==p&&(p=e.events.fire("processPaste",o,p,c)),("string"==typeof p||l.Dom.isNode(p,e.editorWindow))&&("drop"===o.type&&e.selection.insertCursorAtPoint(o.clientX,o.clientY),n(p,e.options.defaultActionOnPaste)),o.preventDefault(),o.stopPropagation())}return!1!==e.events.fire("afterPaste",o)&&void 0})),e.options.askBeforePasteHTML&&e.events.on("beforePaste",(function(e){var o=t.getDataTransfer(e);if(e&&o&&o.getData(r.TEXT_PLAIN)){var n=o.getData(r.TEXT_PLAIN);return i(n,e)}})),e.options.askBeforePasteFromWord&&e.events.on("beforePaste",(function(n){var a=t.getDataTransfer(n);if(n&&a&&a.getData&&a.getData(r.TEXT_HTML)){var c=function(t){var r=e.buffer.get(d.pluginKey);if(s.isHTML(t)&&r!==u(t))return s.isHTMLFromWord(t)?o(e.i18n("The pasted content is coming from a Microsoft Word/Excel document. Do you want to keep the format or clean it up?"),e.i18n("Word Paste Detected"),(function(o){!0===o&&(t=s.applyStyles(t),e.options.beautifyHTML&&e.ownerWindow.html_beautify&&(t=e.ownerWindow.html_beautify(t))),!1===o&&(t=s.cleanFromWord(t)),0===o&&(t=s.stripTags(s.cleanFromWord(t))),e.selection.insertHTML(t),e.setEditorValue()})):i(t,n),!1};if(a.types&&-1!==Array.from(a.types).indexOf("text/html")){var f=a.getData(r.TEXT_HTML);return c(f)}if("drop"!==n.type){var p=e.create.div("",{tabindex:-1,contenteditable:!0,style:{left:-9999,top:0,width:0,height:"100%",lineHeight:"140%",overflow:"hidden",position:"fixed",zIndex:2147483647,wordBreak:"break-all"}});e.container.appendChild(p);var h=e.selection.save();p.focus();var v=0,m=function(){l.Dom.safeRemove(p),e.selection&&e.selection.restore(h)},g=function(){if(v+=1,p.childNodes&&p.childNodes.length>0){var t=p.innerHTML;return m(),void(!1!==c(t)&&e.selection.insertHTML(t))}5>v?s.setTimeout(g,20):m()};g()}}})),e.options.nl2brInPlainText&&e.events.on("processPaste",(function(e,t,o){if(o===r.TEXT_PLAIN+";"&&!s.isHTML(t))return c.nl2br(t)}))}},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),o(71),"undefined"!=typeof window&&o(72);var n=o(10),i=o(123),r=o(3),a=o(29),s=o(150),l=o(192),c=o(2),d=o(6);Object.keys(r).forEach((function(e){n.Jodit[e]=r[e]}));var u=function(e){return"__esModule"!==e};Object.keys(l).filter(u).forEach((function(e){d.ToolbarIcon.icons[e.replace("_","-")]=l[e]})),Object.keys(a).filter(u).forEach((function(e){n.Jodit.modules[e]=a[e]})),["Confirm","Alert","Promt"].forEach((function(e){n.Jodit[e]=a[e]})),Object.keys(s).filter(u).forEach((function(e){n.Jodit.plugins[e]=s[e]})),Object.keys(i.default).filter(u).forEach((function(e){n.Jodit.lang[e]=i.default[e]})),n.Jodit.defaultOptions=c.Config.defaultOptions,c.OptionsDefault.prototype=n.Jodit.defaultOptions,t.Jodit=n.Jodit,t.default=n.Jodit},function(e,t,o){},function(e,t,o){"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),o(73),o(74),(n=Element.prototype).matches||(n.matches=void 0!==n.matchesSelector?n.matchesSelector:function(e){if(!this.ownerDocument)return[];var t=this.ownerDocument.querySelectorAll(e),o=this;return Array.prototype.some.call(t,(function(e){return e===o}))}),Array.from||(Array.from=function(e){return[].slice.call(e)}),Array.prototype.includes||(Array.prototype.includes=function(e){return this.indexOf(e)>-1})},function(e,t){"document"in window.self&&("classList"in document.createElement("_")&&(!document.createElementNS||"classList"in document.createElementNS("http://www.w3.org/2000/svg","g"))||function(e){"use strict";if("Element"in e){var t=e.Element.prototype,o=Object,n=String.prototype.trim||function(){return this.replace(/^\s+|\s+$/g,"")},i=Array.prototype.indexOf||function(e){for(var t=0,o=this.length;o>t;t++)if(t in this&&this[t]===e)return t;return-1},r=function(e,t){this.name=e,this.code=DOMException[e],this.message=t},a=function(e,t){if(""===t)throw new r("SYNTAX_ERR","An invalid or illegal string was specified");if(/\s/.test(t))throw new r("INVALID_CHARACTER_ERR","String contains an invalid character");return i.call(e,t)},s=function(e){for(var t=n.call(e.getAttribute("class")||""),o=t?t.split(/\s+/):[],i=0,r=o.length;r>i;i++)this.push(o[i]);this._updateClassName=function(){e.setAttribute("class",this.toString())}},l=s.prototype=[],c=function(){return new s(this)};if(r.prototype=Error.prototype,l.item=function(e){return this[e]||null},l.contains=function(e){return-1!==a(this,e+="")},l.add=function(){var e,t=arguments,o=0,n=t.length,i=!1;do{-1===a(this,e=t[o]+"")&&(this.push(e),i=!0)}while(++oo;o++)t.call(this,e=arguments[o])}};t("add"),t("remove")}if(e.classList.toggle("c3",!1),e.classList.contains("c3")){var o=DOMTokenList.prototype.toggle;DOMTokenList.prototype.toggle=function(e,t){return 1 in arguments&&!this.contains(e)==!t?t:o.call(this,e)}}e=null}())},function(e,t,o){"use strict";e.exports=o(75).polyfill()},function(e,t,o){(function(t,o){e.exports=function(){"use strict";function e(e){return"function"==typeof e}var n=Array.isArray?Array.isArray:function(e){return"[object Array]"===Object.prototype.toString.call(e)},i=0,r=void 0,a=void 0,s=function(e,t){h[i]=e,h[i+1]=t,2===(i+=2)&&(a?a(v):y())},l="undefined"!=typeof window?window:void 0,c=l||{},d=c.MutationObserver||c.WebKitMutationObserver,u="undefined"==typeof self&&void 0!==t&&"[object process]"==={}.toString.call(t),f="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel;function p(){var e=setTimeout;return function(){return e(v,1)}}var h=new Array(1e3);function v(){for(var e=0;i>e;e+=2)(0,h[e])(h[e+1]),h[e]=void 0,h[e+1]=void 0;i=0}var m,g,b,_,y=void 0;function w(e,t){var o=this,n=new this.constructor(E);void 0===n[S]&&P(n);var i=o._state;if(i){var r=arguments[i-1];s((function(){return q(i,n,r,o._result)}))}else A(o,n,e,t);return n}function C(e){if(e&&"object"==typeof e&&e.constructor===this)return e;var t=new this(E);return D(t,e),t}u?y=function(){return t.nextTick(v)}:d?(g=0,b=new d(v),_=document.createTextNode(""),b.observe(_,{characterData:!0}),y=function(){_.data=g=++g%2}):f?((m=new MessageChannel).port1.onmessage=v,y=function(){return m.port2.postMessage(0)}):y=void 0===l?function(){try{var e=Function("return this")().require("vertx");return void 0!==(r=e.runOnLoop||e.runOnContext)?function(){r(v)}:p()}catch(e){return p()}}():p();var S=Math.random().toString(36).substring(2);function E(){}var j=void 0,T=1,x=2;function k(t,o,n){o.constructor===t.constructor&&n===w&&o.constructor.resolve===C?function(e,t){t._state===T?M(e,t._result):t._state===x?z(e,t._result):A(t,void 0,(function(t){return D(e,t)}),(function(t){return z(e,t)}))}(t,o):void 0===n?M(t,o):e(n)?function(e,t,o){s((function(e){var n=!1,i=function(o,i,r,a){try{o.call(i,(function(o){n||(n=!0,t!==o?D(e,o):M(e,o))}),(function(t){n||(n=!0,z(e,t))}))}catch(e){return e}}(o,t);!n&&i&&(n=!0,z(e,i))}),e)}(t,o,n):M(t,o)}function D(e,t){if(e===t)z(e,new TypeError("You cannot resolve a promise with itself"));else if(i=typeof(n=t),null===n||"object"!==i&&"function"!==i)M(e,t);else{var o=void 0;try{o=t.then}catch(t){return void z(e,t)}k(e,t,o)}var n,i}function L(e){e._onerror&&e._onerror(e._result),I(e)}function M(e,t){e._state===j&&(e._result=t,e._state=T,0!==e._subscribers.length&&s(I,e))}function z(e,t){e._state===j&&(e._state=x,e._result=t,s(L,e))}function A(e,t,o,n){var i=e._subscribers,r=i.length;e._onerror=null,i[r]=t,i[r+T]=o,i[r+x]=n,0===r&&e._state&&s(I,e)}function I(e){var t=e._subscribers,o=e._state;if(0!==t.length){for(var n=void 0,i=void 0,r=e._result,a=0;t.length>a;a+=3)i=t[a+o],(n=t[a])?q(o,n,i,r):i(r);e._subscribers.length=0}}function q(t,o,n,i){var r=e(n),a=void 0,s=void 0,l=!0;if(r){try{a=n(i)}catch(e){l=!1,s=e}if(o===a)return void z(o,new TypeError("A promises callback cannot return that same promise."))}else a=i;o._state!==j||(r&&l?D(o,a):!1===l?z(o,s):t===T?M(o,a):t===x&&z(o,a))}var N=0;function P(e){e[S]=N++,e._state=void 0,e._result=void 0,e._subscribers=[]}var O=function(){function e(e,t){this._instanceConstructor=e,this.promise=new e(E),this.promise[S]||P(this.promise),n(t)?(this.length=t.length,this._remaining=t.length,this._result=new Array(this.length),0===this.length?M(this.promise,this._result):(this.length=this.length||0,this._enumerate(t),0===this._remaining&&M(this.promise,this._result))):z(this.promise,new Error("Array Methods must be provided an Array"))}return e.prototype._enumerate=function(e){for(var t=0;this._state===j&&e.length>t;t++)this._eachEntry(e[t],t)},e.prototype._eachEntry=function(e,t){var o=this._instanceConstructor,n=o.resolve;if(n===C){var i=void 0,r=void 0,a=!1;try{i=e.then}catch(e){a=!0,r=e}if(i===w&&e._state!==j)this._settledAt(e._state,t,e._result);else if("function"!=typeof i)this._remaining--,this._result[t]=e;else if(o===R){var s=new o(E);a?z(s,r):k(s,e,i),this._willSettleAt(s,t)}else this._willSettleAt(new o((function(t){return t(e)})),t)}else this._willSettleAt(n(e),t)},e.prototype._settledAt=function(e,t,o){var n=this.promise;n._state===j&&(this._remaining--,e===x?z(n,o):this._result[t]=o),0===this._remaining&&M(n,this._result)},e.prototype._willSettleAt=function(e,t){var o=this;A(e,void 0,(function(e){return o._settledAt(T,t,e)}),(function(e){return o._settledAt(x,t,e)}))},e}(),R=function(){function t(e){this[S]=N++,this._result=this._state=void 0,this._subscribers=[],E!==e&&("function"!=typeof e&&function(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}(),this instanceof t?function(e,t){try{t((function(t){D(e,t)}),(function(t){z(e,t)}))}catch(t){z(e,t)}}(this,e):function(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}())}return t.prototype.catch=function(e){return this.then(null,e)},t.prototype.finally=function(t){var o=this.constructor;return e(t)?this.then((function(e){return o.resolve(t()).then((function(){return e}))}),(function(e){return o.resolve(t()).then((function(){throw e}))})):this.then(t,t)},t}();return R.prototype.then=w,R.all=function(e){return new O(this,e).promise},R.race=function(e){var t=this;return n(e)?new t((function(o,n){for(var i=e.length,r=0;i>r;r++)t.resolve(e[r]).then(o,n)})):new t((function(e,t){return t(new TypeError("You must pass an array to race."))}))},R.resolve=C,R.reject=function(e){var t=new this(E);return z(t,e),t},R._setScheduler=function(e){a=e},R._setAsap=function(e){s=e},R._asap=s,R.polyfill=function(){var e=void 0;if(void 0!==o)e=o;else if("undefined"!=typeof self)e=self;else try{e=Function("return this")()}catch(e){throw new Error("polyfill failed because global object is unavailable in this environment")}var t=e.Promise;if(t){var n=null;try{n=Object.prototype.toString.call(t.resolve())}catch(e){}if("[object Promise]"===n&&!t.cast)return}e.Promise=R},R.Promise=R,R}()}).call(this,o(76),o(77))},function(e,t){var o,n,i=e.exports={};function r(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function s(e){if(o===setTimeout)return setTimeout(e,0);if((o===r||!o)&&setTimeout)return o=setTimeout,setTimeout(e,0);try{return o(e,0)}catch(t){try{return o.call(null,e,0)}catch(t){return o.call(this,e,0)}}}!function(){try{o="function"==typeof setTimeout?setTimeout:r}catch(e){o=r}try{n="function"==typeof clearTimeout?clearTimeout:a}catch(e){n=a}}();var l,c=[],d=!1,u=-1;function f(){d&&l&&(d=!1,l.length?c=l.concat(c):u=-1,c.length&&p())}function p(){if(!d){var e=s(f);d=!0;for(var t=c.length;t;){for(l=c,c=[];++u1)for(var o=1;arguments.length>o;o++)t[o-1]=arguments[o];c.push(new h(e,t)),1!==c.length||d||s(p)},h.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=v,i.addListener=v,i.once=v,i.off=v,i.removeListener=v,i.removeAllListeners=v,i.emit=v,i.prependListener=v,i.prependOnceListener=v,i.listeners=function(e){return[]},i.binding=function(e){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(e){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},function(e,t){var o;o=function(){return this}();try{o=o||new Function("return this")()}catch(e){"object"==typeof window&&(o=window)}e.exports=o},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.inArray=function(e,t){return-1!==t.indexOf(e)}},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.splitArray=function(e){return"string"==typeof e?e.split(/[,\s]+/):e}},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=o(18);t.throttle=function(e,t,o){var i,r,a,s=null;return function(){i=arguments,r=!0;var l=o||this;t?s||(a=function(){r?(e.apply(l,i),r=!1,s=n.setTimeout(a,t)):s=null})():e.apply(l,i)}}},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isHTML=function(e){return/<([A-Za-z][A-Za-z0-9]*)\b[^>]*>(.*?)<\/\1>/m.test(e)}},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isHTMLFromWord=function(e){return-1!==e.search(//)||-1!==e.search(//)||-1!==e.search(/style="[^"]*mso-/)&&-1!==e.search(/")+"".length);var t=document.createElement("iframe");t.style.display="none",document.body.appendChild(t);var o="",r=[];try{var a=t.contentDocument||(t.contentWindow?t.contentWindow.document:null);if(a){a.open(),a.write(e),a.close(),a.styleSheets.length&&(r=a.styleSheets[a.styleSheets.length-1].cssRules);for(var s=function(e){if(""===r[e].selectorText)return"continue";i.$$(r[e].selectorText,a.body).forEach((function(t){t.style.cssText=r[e].style.cssText.replace(/mso-[a-z\-]+:[\s]*[^;]+;/g,"").replace(/border[a-z\-]*:[\s]*[^;]+;/g,"")+t.style.cssText}))},l=0;r.length>l;l+=1)s(l);o=a.firstChild?a.body.innerHTML:""}}catch(e){}finally{n.Dom.safeRemove(t)}return o&&(e=o),e.replace(/<(\/)?(html|colgroup|col|o:p)[^>]*>/g,"").replace(//i);-1!==t&&(e=e.substr(t+20));var o=e.search(//i);return-1!==o&&(e=e.substr(0,o)),e};e.events.on("paste",(function(o){if(!1===e.events.fire("beforePaste",o))return o.preventDefault(),!1;var i=t.getDataTransfer(o);if(o&&i){var a=i.types,c="";if(Array.isArray(a)||"domstringlist"===s.type(a))for(var f=0;a.length>f;f+=1)c+=a[f]+";";else c=a.toString()+";";var p=/text\/html/i.test(c)?i.getData("text/html"):/text\/rtf/i.test(c)&&s.browser("safari")?i.getData("text/rtf"):/text\/plain/i.test(c)&&!s.browser("mozilla")?i.getData(r.TEXT_PLAIN):/text/i.test(c)&&r.IS_IE?i.getData(r.TEXT_PLAIN):"";(l.Dom.isNode(p,e.editorWindow)||""!==s.trim(p))&&(p=u(p),e.buffer.get(d.pluginKey)!==p&&(p=e.events.fire("processPaste",o,p,c)),("string"==typeof p||l.Dom.isNode(p,e.editorWindow))&&("drop"===o.type&&e.selection.insertCursorAtPoint(o.clientX,o.clientY),n(p,e.options.defaultActionOnPaste)),o.preventDefault(),o.stopPropagation())}return!1!==e.events.fire("afterPaste",o)&&void 0})),e.options.askBeforePasteHTML&&e.events.on("beforePaste",(function(e){var o=t.getDataTransfer(e);if(e&&o&&o.getData(r.TEXT_PLAIN)){var n=o.getData(r.TEXT_PLAIN);return i(n,e)}})),e.options.askBeforePasteFromWord&&e.events.on("beforePaste",(function(n){var a=t.getDataTransfer(n);if(n&&a&&a.getData&&a.getData(r.TEXT_HTML)){var c=function(t){var r=e.buffer.get(d.pluginKey);if(s.isHTML(t)&&r!==u(t))return s.isHTMLFromWord(t)?o(e.i18n("The pasted content is coming from a Microsoft Word/Excel document. Do you want to keep the format or clean it up?"),e.i18n("Word Paste Detected"),(function(o){!0===o&&(t=s.applyStyles(t),e.options.beautifyHTML&&e.ownerWindow.html_beautify&&(t=e.ownerWindow.html_beautify(t))),!1===o&&(t=s.cleanFromWord(t)),0===o&&(t=s.stripTags(s.cleanFromWord(t))),e.selection.insertHTML(t),e.setEditorValue()})):i(t,n),!1};if(a.types&&-1!==Array.from(a.types).indexOf("text/html")){var f=a.getData(r.TEXT_HTML);return c(f)}if("drop"!==n.type){var p=e.create.div("",{tabindex:-1,contenteditable:!0,style:{left:-9999,top:0,width:0,height:"100%",lineHeight:"140%",overflow:"hidden",position:"fixed",zIndex:2147483647,wordBreak:"break-all"}});e.container.appendChild(p);var h=e.selection.save();p.focus();var v=0,m=function(){l.Dom.safeRemove(p),e.selection&&e.selection.restore(h)},g=function(){if(v+=1,p.childNodes&&p.childNodes.length>0){var t=p.innerHTML;return m(),void(!1!==c(t)&&e.selection.insertHTML(t))}5>v?s.setTimeout(g,20):m()};g()}}})),e.options.nl2brInPlainText&&e.events.on("processPaste",(function(e,t,o){if(o===r.TEXT_PLAIN+";"&&!s.isHTML(t))return c.nl2br(t)}))}},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),o(71),"undefined"!=typeof window&&o(72);var n=o(10),i=o(123),r=o(3),a=o(29),s=o(150),l=o(192),c=o(2),d=o(6);Object.keys(r).forEach((function(e){n.Jodit[e]=r[e]}));var u=function(e){return"__esModule"!==e};Object.keys(l).filter(u).forEach((function(e){d.ToolbarIcon.icons[e.replace("_","-")]=l[e]})),Object.keys(a).filter(u).forEach((function(e){n.Jodit.modules[e]=a[e]})),["Confirm","Alert","Promt"].forEach((function(e){n.Jodit[e]=a[e]})),Object.keys(s).filter(u).forEach((function(e){n.Jodit.plugins[e]=s[e]})),Object.keys(i.default).filter(u).forEach((function(e){n.Jodit.lang[e]=i.default[e]})),n.Jodit.defaultOptions=c.Config.defaultOptions,c.OptionsDefault.prototype=n.Jodit.defaultOptions,t.Jodit=n.Jodit,t.default=n.Jodit},function(e,t,o){},function(e,t,o){"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),o(73),o(74),(n=Element.prototype).matches||(n.matches=void 0!==n.matchesSelector?n.matchesSelector:function(e){if(!this.ownerDocument)return[];var t=this.ownerDocument.querySelectorAll(e),o=this;return Array.prototype.some.call(t,(function(e){return e===o}))}),Array.from||(Array.from=function(e){return[].slice.call(e)}),Array.prototype.includes||(Array.prototype.includes=function(e){return this.indexOf(e)>-1})},function(e,t){"document"in window.self&&("classList"in document.createElement("_")&&(!document.createElementNS||"classList"in document.createElementNS("http://www.w3.org/2000/svg","g"))||function(e){"use strict";if("Element"in e){var t=e.Element.prototype,o=Object,n=String.prototype.trim||function(){return this.replace(/^\s+|\s+$/g,"")},i=Array.prototype.indexOf||function(e){for(var t=0,o=this.length;o>t;t++)if(t in this&&this[t]===e)return t;return-1},r=function(e,t){this.name=e,this.code=DOMException[e],this.message=t},a=function(e,t){if(""===t)throw new r("SYNTAX_ERR","An invalid or illegal string was specified");if(/\s/.test(t))throw new r("INVALID_CHARACTER_ERR","String contains an invalid character");return i.call(e,t)},s=function(e){for(var t=n.call(e.getAttribute("class")||""),o=t?t.split(/\s+/):[],i=0,r=o.length;r>i;i++)this.push(o[i]);this._updateClassName=function(){e.setAttribute("class",this.toString())}},l=s.prototype=[],c=function(){return new s(this)};if(r.prototype=Error.prototype,l.item=function(e){return this[e]||null},l.contains=function(e){return-1!==a(this,e+="")},l.add=function(){var e,t=arguments,o=0,n=t.length,i=!1;do{-1===a(this,e=t[o]+"")&&(this.push(e),i=!0)}while(++oo;o++)t.call(this,e=arguments[o])}};t("add"),t("remove")}if(e.classList.toggle("c3",!1),e.classList.contains("c3")){var o=DOMTokenList.prototype.toggle;DOMTokenList.prototype.toggle=function(e,t){return 1 in arguments&&!this.contains(e)==!t?t:o.call(this,e)}}e=null}())},function(e,t,o){"use strict";e.exports=o(75).polyfill()},function(e,t,o){(function(t,o){e.exports=function(){"use strict";function e(e){return"function"==typeof e}var n=Array.isArray?Array.isArray:function(e){return"[object Array]"===Object.prototype.toString.call(e)},i=0,r=void 0,a=void 0,s=function(e,t){h[i]=e,h[i+1]=t,2===(i+=2)&&(a?a(v):y())},l="undefined"!=typeof window?window:void 0,c=l||{},d=c.MutationObserver||c.WebKitMutationObserver,u="undefined"==typeof self&&void 0!==t&&"[object process]"==={}.toString.call(t),f="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel;function p(){var e=setTimeout;return function(){return e(v,1)}}var h=new Array(1e3);function v(){for(var e=0;i>e;e+=2)(0,h[e])(h[e+1]),h[e]=void 0,h[e+1]=void 0;i=0}var m,g,b,_,y=void 0;function w(e,t){var o=this,n=new this.constructor(E);void 0===n[S]&&P(n);var i=o._state;if(i){var r=arguments[i-1];s((function(){return q(i,n,r,o._result)}))}else A(o,n,e,t);return n}function C(e){if(e&&"object"==typeof e&&e.constructor===this)return e;var t=new this(E);return D(t,e),t}u?y=function(){return t.nextTick(v)}:d?(g=0,b=new d(v),_=document.createTextNode(""),b.observe(_,{characterData:!0}),y=function(){_.data=g=++g%2}):f?((m=new MessageChannel).port1.onmessage=v,y=function(){return m.port2.postMessage(0)}):y=void 0===l?function(){try{var e=Function("return this")().require("vertx");return void 0!==(r=e.runOnLoop||e.runOnContext)?function(){r(v)}:p()}catch(e){return p()}}():p();var S=Math.random().toString(36).substring(2);function E(){}var j=void 0,T=1,x=2;function k(t,o,n){o.constructor===t.constructor&&n===w&&o.constructor.resolve===C?function(e,t){t._state===T?M(e,t._result):t._state===x?z(e,t._result):A(t,void 0,(function(t){return D(e,t)}),(function(t){return z(e,t)}))}(t,o):void 0===n?M(t,o):e(n)?function(e,t,o){s((function(e){var n=!1,i=function(o,i,r,a){try{o.call(i,(function(o){n||(n=!0,t!==o?D(e,o):M(e,o))}),(function(t){n||(n=!0,z(e,t))}))}catch(e){return e}}(o,t);!n&&i&&(n=!0,z(e,i))}),e)}(t,o,n):M(t,o)}function D(e,t){if(e===t)z(e,new TypeError("You cannot resolve a promise with itself"));else if(i=typeof(n=t),null===n||"object"!==i&&"function"!==i)M(e,t);else{var o=void 0;try{o=t.then}catch(t){return void z(e,t)}k(e,t,o)}var n,i}function L(e){e._onerror&&e._onerror(e._result),I(e)}function M(e,t){e._state===j&&(e._result=t,e._state=T,0!==e._subscribers.length&&s(I,e))}function z(e,t){e._state===j&&(e._state=x,e._result=t,s(L,e))}function A(e,t,o,n){var i=e._subscribers,r=i.length;e._onerror=null,i[r]=t,i[r+T]=o,i[r+x]=n,0===r&&e._state&&s(I,e)}function I(e){var t=e._subscribers,o=e._state;if(0!==t.length){for(var n=void 0,i=void 0,r=e._result,a=0;t.length>a;a+=3)i=t[a+o],(n=t[a])?q(o,n,i,r):i(r);e._subscribers.length=0}}function q(t,o,n,i){var r=e(n),a=void 0,s=void 0,l=!0;if(r){try{a=n(i)}catch(e){l=!1,s=e}if(o===a)return void z(o,new TypeError("A promises callback cannot return that same promise."))}else a=i;o._state!==j||(r&&l?D(o,a):!1===l?z(o,s):t===T?M(o,a):t===x&&z(o,a))}var N=0;function P(e){e[S]=N++,e._state=void 0,e._result=void 0,e._subscribers=[]}var O=function(){function e(e,t){this._instanceConstructor=e,this.promise=new e(E),this.promise[S]||P(this.promise),n(t)?(this.length=t.length,this._remaining=t.length,this._result=new Array(this.length),0===this.length?M(this.promise,this._result):(this.length=this.length||0,this._enumerate(t),0===this._remaining&&M(this.promise,this._result))):z(this.promise,new Error("Array Methods must be provided an Array"))}return e.prototype._enumerate=function(e){for(var t=0;this._state===j&&e.length>t;t++)this._eachEntry(e[t],t)},e.prototype._eachEntry=function(e,t){var o=this._instanceConstructor,n=o.resolve;if(n===C){var i=void 0,r=void 0,a=!1;try{i=e.then}catch(e){a=!0,r=e}if(i===w&&e._state!==j)this._settledAt(e._state,t,e._result);else if("function"!=typeof i)this._remaining--,this._result[t]=e;else if(o===R){var s=new o(E);a?z(s,r):k(s,e,i),this._willSettleAt(s,t)}else this._willSettleAt(new o((function(t){return t(e)})),t)}else this._willSettleAt(n(e),t)},e.prototype._settledAt=function(e,t,o){var n=this.promise;n._state===j&&(this._remaining--,e===x?z(n,o):this._result[t]=o),0===this._remaining&&M(n,this._result)},e.prototype._willSettleAt=function(e,t){var o=this;A(e,void 0,(function(e){return o._settledAt(T,t,e)}),(function(e){return o._settledAt(x,t,e)}))},e}(),R=function(){function t(e){this[S]=N++,this._result=this._state=void 0,this._subscribers=[],E!==e&&("function"!=typeof e&&function(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}(),this instanceof t?function(e,t){try{t((function(t){D(e,t)}),(function(t){z(e,t)}))}catch(t){z(e,t)}}(this,e):function(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}())}return t.prototype.catch=function(e){return this.then(null,e)},t.prototype.finally=function(t){var o=this.constructor;return e(t)?this.then((function(e){return o.resolve(t()).then((function(){return e}))}),(function(e){return o.resolve(t()).then((function(){throw e}))})):this.then(t,t)},t}();return R.prototype.then=w,R.all=function(e){return new O(this,e).promise},R.race=function(e){var t=this;return n(e)?new t((function(o,n){for(var i=e.length,r=0;i>r;r++)t.resolve(e[r]).then(o,n)})):new t((function(e,t){return t(new TypeError("You must pass an array to race."))}))},R.resolve=C,R.reject=function(e){var t=new this(E);return z(t,e),t},R._setScheduler=function(e){a=e},R._setAsap=function(e){s=e},R._asap=s,R.polyfill=function(){var e=void 0;if(void 0!==o)e=o;else if("undefined"!=typeof self)e=self;else try{e=Function("return this")()}catch(e){throw new Error("polyfill failed because global object is unavailable in this environment")}var t=e.Promise;if(t){var n=null;try{n=Object.prototype.toString.call(t.resolve())}catch(e){}if("[object Promise]"===n&&!t.cast)return}e.Promise=R},R.Promise=R,R}()}).call(this,o(76),o(77))},function(e,t){var o,n,i=e.exports={};function r(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function s(e){if(o===setTimeout)return setTimeout(e,0);if((o===r||!o)&&setTimeout)return o=setTimeout,setTimeout(e,0);try{return o(e,0)}catch(t){try{return o.call(null,e,0)}catch(t){return o.call(this,e,0)}}}!function(){try{o="function"==typeof setTimeout?setTimeout:r}catch(e){o=r}try{n="function"==typeof clearTimeout?clearTimeout:a}catch(e){n=a}}();var l,c=[],d=!1,u=-1;function f(){d&&l&&(d=!1,l.length?c=l.concat(c):u=-1,c.length&&p())}function p(){if(!d){var e=s(f);d=!0;for(var t=c.length;t;){for(l=c,c=[];++u1)for(var o=1;arguments.length>o;o++)t[o-1]=arguments[o];c.push(new h(e,t)),1!==c.length||d||s(p)},h.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=v,i.addListener=v,i.once=v,i.off=v,i.removeListener=v,i.removeAllListeners=v,i.emit=v,i.prependListener=v,i.prependOnceListener=v,i.listeners=function(e){return[]},i.binding=function(e){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(e){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},function(e,t){var o;o=function(){return this}();try{o=o||new Function("return this")()}catch(e){"object"==typeof window&&(o=window)}e.exports=o},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.inArray=function(e,t){return-1!==t.indexOf(e)}},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.splitArray=function(e){return"string"==typeof e?e.split(/[,\s]+/):e}},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=o(18);t.throttle=function(e,t,o){var i,r,a,s=null;return function(){i=arguments,r=!0;var l=o||this;t?s||(a=function(){r?(e.apply(l,i),r=!1,s=n.setTimeout(a,t)):s=null})():e.apply(l,i)}}},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isHTML=function(e){return/<([A-Za-z][A-Za-z0-9]*)\b[^>]*>(.*?)<\/\1>/m.test(e)}},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isHTMLFromWord=function(e){return-1!==e.search(//)||-1!==e.search(//)||-1!==e.search(/style="[^"]*mso-/)&&-1!==e.search(/")+"".length);var t=document.createElement("iframe");t.style.display="none",document.body.appendChild(t);var o="",r=[];try{var a=t.contentDocument||(t.contentWindow?t.contentWindow.document:null);if(a){a.open(),a.write(e),a.close(),a.styleSheets.length&&(r=a.styleSheets[a.styleSheets.length-1].cssRules);for(var s=function(e){if(""===r[e].selectorText)return"continue";i.$$(r[e].selectorText,a.body).forEach((function(t){t.style.cssText=r[e].style.cssText.replace(/mso-[a-z\-]+:[\s]*[^;]+;/g,"").replace(/border[a-z\-]*:[\s]*[^;]+;/g,"")+t.style.cssText}))},l=0;r.length>l;l+=1)s(l);o=a.firstChild?a.body.innerHTML:""}}catch(e){}finally{n.Dom.safeRemove(t)}return o&&(e=o),e.replace(/<(\/)?(html|colgroup|col|o:p)[^>]*>/g,"").replace(/