jodit 4.20.2 → 4.20.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (61) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/es2015/jodit.css +1 -1
  3. package/es2015/jodit.fat.min.js +6 -6
  4. package/es2015/jodit.js +90 -21
  5. package/es2015/jodit.min.js +6 -6
  6. package/es2015/plugins/debug/debug.css +1 -1
  7. package/es2015/plugins/debug/debug.js +1 -1
  8. package/es2015/plugins/debug/debug.min.js +1 -1
  9. package/es2015/plugins/speech-recognize/speech-recognize.css +1 -1
  10. package/es2015/plugins/speech-recognize/speech-recognize.js +1 -1
  11. package/es2015/plugins/speech-recognize/speech-recognize.min.js +1 -1
  12. package/es2018/jodit.fat.min.js +6 -6
  13. package/es2018/jodit.min.js +6 -6
  14. package/es2018/plugins/debug/debug.min.js +1 -1
  15. package/es2018/plugins/speech-recognize/speech-recognize.min.js +1 -1
  16. package/es2021/jodit.css +1 -1
  17. package/es2021/jodit.fat.min.js +6 -6
  18. package/es2021/jodit.js +87 -21
  19. package/es2021/jodit.min.js +6 -6
  20. package/es2021/plugins/debug/debug.css +1 -1
  21. package/es2021/plugins/debug/debug.js +1 -1
  22. package/es2021/plugins/debug/debug.min.js +1 -1
  23. package/es2021/plugins/speech-recognize/speech-recognize.css +1 -1
  24. package/es2021/plugins/speech-recognize/speech-recognize.js +1 -1
  25. package/es2021/plugins/speech-recognize/speech-recognize.min.js +1 -1
  26. package/es2021.en/jodit.css +1 -1
  27. package/es2021.en/jodit.fat.min.js +6 -6
  28. package/es2021.en/jodit.js +87 -21
  29. package/es2021.en/jodit.min.js +6 -6
  30. package/es2021.en/plugins/debug/debug.css +1 -1
  31. package/es2021.en/plugins/debug/debug.js +1 -1
  32. package/es2021.en/plugins/debug/debug.min.js +1 -1
  33. package/es2021.en/plugins/speech-recognize/speech-recognize.css +1 -1
  34. package/es2021.en/plugins/speech-recognize/speech-recognize.js +1 -1
  35. package/es2021.en/plugins/speech-recognize/speech-recognize.min.js +1 -1
  36. package/es5/jodit.css +2 -2
  37. package/es5/jodit.fat.min.js +2 -2
  38. package/es5/jodit.js +98 -21
  39. package/es5/jodit.min.css +2 -2
  40. package/es5/jodit.min.js +2 -2
  41. package/es5/plugins/debug/debug.css +1 -1
  42. package/es5/plugins/debug/debug.js +1 -1
  43. package/es5/plugins/debug/debug.min.js +1 -1
  44. package/es5/plugins/speech-recognize/speech-recognize.css +1 -1
  45. package/es5/plugins/speech-recognize/speech-recognize.js +1 -1
  46. package/es5/plugins/speech-recognize/speech-recognize.min.js +1 -1
  47. package/es5/polyfills.fat.min.js +1 -1
  48. package/es5/polyfills.js +1 -1
  49. package/es5/polyfills.min.js +1 -1
  50. package/esm/core/constants.js +1 -1
  51. package/esm/modules/file-browser/builders/context-menu.js +6 -2
  52. package/esm/modules/toolbar/factory.js +3 -1
  53. package/esm/plugins/backspace/cases/check-not-collapsed.js +1 -1
  54. package/esm/plugins/delete/delete.d.ts +12 -0
  55. package/esm/plugins/delete/delete.js +66 -4
  56. package/esm/plugins/delete/interface.d.ts +4 -2
  57. package/esm/plugins/dtd/after-insert/remove-extra-br.js +7 -1
  58. package/esm/plugins/placeholder/placeholder.js +3 -1
  59. package/package.json +1 -1
  60. package/types/plugins/delete/delete.d.ts +12 -0
  61. package/types/plugins/delete/interface.d.ts +4 -2
@@ -1,12 +1,12 @@
1
1
  /*!
2
2
  * jodit - Jodit is an awesome and useful wysiwyg editor with filebrowser
3
3
  * Author: Chupurnov <chupurnov@gmail.com> (https://xdsoft.net/jodit/)
4
- * Version: v4.20.2
4
+ * Version: v4.20.3
5
5
  * Url: https://xdsoft.net/jodit/
6
6
  * License(s): MIT
7
7
  */
8
8
  !function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var i=t();for(var n in i)("object"==typeof exports?exports:e)[n]=i[n]}}(self,function(){return function(){var e,t,i,n,o,r,s={5266:function(e,t,i){"use strict";i.d(t,{Config:function(){return s}});var n=i(25045),o=i(81937);let r={};class s{static get defaultOptions(){return s.__defaultOptions||(s.__defaultOptions=new s),s.__defaultOptions}constructor(){(0,n._)(this,"cache",!0),(0,n._)(this,"defaultTimeout",100),(0,n._)(this,"namespace",""),(0,n._)(this,"safeMode",!1),(0,n._)(this,"width","auto"),(0,n._)(this,"height","auto"),(0,n._)(this,"safePluginsList",["about","enter","backspace","size","bold","hotkeys"]),(0,n._)(this,"commandToHotkeys",void 0),(0,n._)(this,"license",""),(0,n._)(this,"preset","custom"),(0,n._)(this,"presets",{inline:{inline:!0,toolbar:!1,toolbarInline:!0,toolbarInlineForSelection:!0,showXPathInStatusbar:!1,showCharsCounter:!1,showWordsCounter:!1,showPlaceholder:!1}}),(0,n._)(this,"ownerDocument",o.globalDocument),(0,n._)(this,"ownerWindow",o.globalWindow),(0,n._)(this,"shadowRoot",null),(0,n._)(this,"nonce",""),(0,n._)(this,"zIndex",0),(0,n._)(this,"readonly",!1),(0,n._)(this,"disabled",!1),(0,n._)(this,"activeButtonsInReadOnly",["source","fullsize","print","about","dots","selectall"]),(0,n._)(this,"allowCommandsInReadOnly",["selectall","preview","print"]),(0,n._)(this,"toolbarButtonSize","middle"),(0,n._)(this,"allowTabNavigation",!1),(0,n._)(this,"inline",!1),(0,n._)(this,"theme","default"),(0,n._)(this,"saveModeInStorage",!1),(0,n._)(this,"asyncStorage",{}),(0,n._)(this,"editorClassName",!1),(0,n._)(this,"className",!1),(0,n._)(this,"style",!1),(0,n._)(this,"containerStyle",!1),(0,n._)(this,"styleValues",{}),(0,n._)(this,"triggerChangeEvent",!0),(0,n._)(this,"direction",""),(0,n._)(this,"language","auto"),(0,n._)(this,"debugLanguage",!1),(0,n._)(this,"i18n",!1),(0,n._)(this,"tabIndex",-1),(0,n._)(this,"toolbar",!0),(0,n._)(this,"statusbar",!0),(0,n._)(this,"showTooltip",!0),(0,n._)(this,"showTooltipDelay",200),(0,n._)(this,"useNativeTooltip",!1),(0,n._)(this,"defaultActionOnPaste",o.INSERT_AS_HTML),(0,n._)(this,"enter",o.PARAGRAPH),(0,n._)(this,"iframe",!1),(0,n._)(this,"editHTMLDocumentMode",!1),(0,n._)(this,"enterBlock","br"!==this.enter?this.enter:o.PARAGRAPH),(0,n._)(this,"defaultMode",o.MODE_WYSIWYG),(0,n._)(this,"useSplitMode",!1),(0,n._)(this,"colors",{greyscale:["#000000","#434343","#666666","#999999","#B7B7B7","#CCCCCC","#D9D9D9","#EFEFEF","#F3F3F3","#FFFFFF"],palette:["#980000","#FF0000","#FF9900","#FFFF00","#00F0F0","#00FFFF","#4A86E8","#0000FF","#9900FF","#FF00FF"],full:["#E6B8AF","#F4CCCC","#FCE5CD","#FFF2CC","#D9EAD3","#D0E0E3","#C9DAF8","#CFE2F3","#D9D2E9","#EAD1DC","#DD7E6B","#EA9999","#F9CB9C","#FFE599","#B6D7A8","#A2C4C9","#A4C2F4","#9FC5E8","#B4A7D6","#D5A6BD","#CC4125","#E06666","#F6B26B","#FFD966","#93C47D","#76A5AF","#6D9EEB","#6FA8DC","#8E7CC3","#C27BA0","#A61C00","#CC0000","#E69138","#F1C232","#6AA84F","#45818E","#3C78D8","#3D85C6","#674EA7","#A64D79","#85200C","#990000","#B45F06","#BF9000","#38761D","#134F5C","#1155CC","#0B5394","#351C75","#733554","#5B0F00","#660000","#783F04","#7F6000","#274E13","#0C343D","#1C4587","#073763","#20124D","#4C1130"]}),(0,n._)(this,"colorPickerDefaultTab","background"),(0,n._)(this,"imageDefaultWidth",300),(0,n._)(this,"imageDefaultAlign","normal"),(0,n._)(this,"imageAlignClasses",null),(0,n._)(this,"alignClasses",{}),(0,n._)(this,"mediaDefaultAlign","normal"),(0,n._)(this,"removeButtons",[]),(0,n._)(this,"disablePlugins",[]),(0,n._)(this,"extraPlugins",[]),(0,n._)(this,"basePath",void 0),(0,n._)(this,"extraButtons",[]),(0,n._)(this,"extraIcons",{}),(0,n._)(this,"createAttributes",{table:{style:"border-collapse:collapse;width: 100%;"}}),(0,n._)(this,"sizeLG",900),(0,n._)(this,"sizeMD",700),(0,n._)(this,"sizeSM",400),(0,n._)(this,"buttons",[{group:"font-style",buttons:[]},{group:"list",buttons:[]},{group:"font",buttons:[]},"---",{group:"script",buttons:[]},{group:"media",buttons:[]},`
9
- `,{group:"state",buttons:[]},{group:"clipboard",buttons:[]},{group:"insert",buttons:[]},{group:"indent",buttons:[]},{group:"color",buttons:[]},{group:"form",buttons:[]},"---",{group:"history",buttons:[]},{group:"search",buttons:[]},{group:"source",buttons:[]},{group:"other",buttons:[]},{group:"info",buttons:[]}]),(0,n._)(this,"controls",void 0),(0,n._)(this,"events",{}),(0,n._)(this,"textIcons",!1),(0,n._)(this,"popupRoot",null),(0,n._)(this,"showBrowserColorPicker",!0),Object.assign(this,r)}}(0,n._)(s,"__defaultOptions",void 0),r=s.prototype,s.prototype.controls={}},24735:function(e,t,i){"use strict";i.d(t,{Async:function(){return f}});var n=i(25045),o=i(81937),r=i(61077),s=i(72068),a=i(91565),l=i(72412),u=i(62101),c=i(52100),d=i(85932),h=i(18303),p=i(28712),m=i(14228);class f{delay(e){return this.promise(t=>this.setTimeout(t,e))}setTimeout(e,t,...i){if(this.isDestructed)return 0;let n={};(0,h.isVoid)(t)&&(t=0),(0,l.isNumber)(t)||(t=(n=t).timeout||0),n.label&&this.clearLabel(n.label);let o=(0,r.setTimeout)(e,t,...i),s=n.label||o;return this.timers.set(s,o),this.__callbacks.set(s,e),o}updateTimeout(e,t){if((0,p.assert)(e&&this.timers.has(e),"Label does not exist"),!e||!this.timers.has(e))return null;let i=this.__callbacks.get(e);return(0,p.assert)((0,a.isFunction)(i),"Callback is not a function"),this.setTimeout(i,{label:e,timeout:t})}clearLabel(e){e&&this.timers.has(e)&&((0,r.clearTimeout)(this.timers.get(e)),this.timers.delete(e),this.__callbacks.delete(e))}clearTimeout(e){if((0,d.isString)(e))return this.clearLabel(e);(0,r.clearTimeout)(e),this.timers.delete(e),this.__callbacks.delete(e)}debounce(e,t,i=!1){let n=0,o=!1,l=[],d=(...t)=>{if(!o){n=0;let i=e(...t);if(o=!0,l.length){let e=()=>{l.forEach(e=>e()),l.length=0};(0,c.isPromise)(i)?i.finally(e):e()}}},h=(...s)=>{o=!1,t?(!n&&i&&d(...s),(0,r.clearTimeout)(n),n=this.setTimeout(()=>d(...s),(0,a.isFunction)(t)?t():t),this.timers.set(e,n)):d(...s)};return(0,u.isPlainObject)(t)&&t.promisify?(...e)=>{let t=this.promise(e=>{l.push(e)}).catch(e=>{if((0,s.isAbortError)(e))return null;throw e});return h(...e),t}:h}microDebounce(e,t=!1){let i,n=!1,o=!0;return(...r)=>{if(i=r,n){o=!0;return}o=!0,t&&(o=!1,e(...i)),n=!0,this.__queueMicrotaskNative(()=>{n=!1,!this.isDestructed&&o&&e(...i)})}}throttle(e,t,i=!1){let n=null,o,r,s;return(...i)=>{(o=!0,s=i,t)?n||(r=()=>{o?(e(...s),o=!1,n=this.setTimeout(r,(0,a.isFunction)(t)?t():t),this.timers.set(r,n)):n=null})():e(...s)}}promise(e){let t=()=>{},i=new Promise((i,n)=>{t=()=>n((0,m.abort)("Abort async")),this.promisesRejections.add(t),e(i,n)});return!i.finally&&"u">typeof process&&!o.IS_ES_NEXT&&(i.finally=e=>(i.then(e).catch(e),i)),i.finally(()=>{this.promisesRejections.delete(t)}).catch(()=>null),i.rejectCallback=t,i}promiseState(e){if(e.status)return e.status;if(!Promise.race)return new Promise(t=>{e.then(e=>(t("fulfilled"),e),e=>{throw t("rejected"),e}),this.setTimeout(()=>{t("pending")},100)});let t={};return Promise.race([e,t]).then(e=>e===t?"pending":"fulfilled",()=>"rejected")}requestIdleCallback(e,t={timeout:100}){let i=this.__requestIdleCallbackNative(e,t);return this.__requestsIdle.add(i),i}requestIdlePromise(e){return this.promise(t=>{let i=this.requestIdleCallback(()=>t(i),e)})}schedulerPostTask(e,t={delay:0,priority:"user-visible"}){let i=new AbortController;if(t.signal&&t.signal.addEventListener("abort",()=>i.abort()),this.__controllers.add(i),void 0!==globalThis.scheduler){let n=globalThis.scheduler.postTask(e,{...t,signal:i.signal});return n.finally(()=>{this.__controllers.delete(i)}).catch(()=>null),n}return this.promise((n,o)=>{let r=this.setTimeout(()=>{try{n(e())}catch(e){o(e)}this.__controllers.delete(i)},t.delay||1);i.signal.addEventListener("abort",()=>{this.clearTimeout(r),this.__controllers.delete(i),o((0,m.abort)())})})}schedulerYield(){return this.schedulerPostTask(()=>{},{priority:"user-visible"})}cancelIdleCallback(e){return this.__requestsIdle.delete(e),this.__cancelIdleCallbackNative(e)}requestAnimationFrame(e){let t=requestAnimationFrame(e);return this.__requestsRaf.add(t),t}cancelAnimationFrame(e){this.__requestsRaf.delete(e),cancelAnimationFrame(e)}clear(){this.__requestsIdle.forEach(e=>this.cancelIdleCallback(e)),this.__requestsRaf.forEach(e=>this.cancelAnimationFrame(e)),this.__controllers.forEach(e=>e.abort()),this.timers.forEach(e=>(0,r.clearTimeout)(e)),this.timers.clear(),this.promisesRejections.forEach(e=>e()),this.promisesRejections.clear()}destruct(){this.clear(),this.isDestructed=!0}constructor(){(0,n._)(this,"timers",new Map),(0,n._)(this,"__callbacks",new Map),(0,n._)(this,"__queueMicrotaskNative",queueMicrotask?.bind(window)??Promise.resolve().then.bind(Promise.resolve())),(0,n._)(this,"promisesRejections",new Set),(0,n._)(this,"__requestsIdle",new Set),(0,n._)(this,"__controllers",new Set),(0,n._)(this,"__requestsRaf",new Set),(0,n._)(this,"__requestIdleCallbackNative",window.requestIdleCallback?.bind(window)??((e,t)=>{let i=Date.now();return this.setTimeout(()=>{e({didTimeout:!1,timeRemaining:()=>Math.max(0,50-(Date.now()-i))})},t?.timeout??1)})),(0,n._)(this,"__cancelIdleCallbackNative",window.cancelIdleCallback?.bind(window)??(e=>{this.clearTimeout(e)})),(0,n._)(this,"isDestructed",!1)}}},91231:function(e,t,i){"use strict";i.d(t,{Async:function(){return n.Async}});var n=i(24735)},80251:function(e,t,i){"use strict";i.d(t,{Component:function(){return u}});var n=i(25045),o=i(91231),r=i(69364),s=i(28077),a=i(65946);let l=new Map;class u{get componentName(){return this.__componentName||(this.__componentName="jodit-"+(0,a.kebabCase)(((0,a.isFunction)(this.className)?this.className():"")||(0,a.getClassName)(this))),this.__componentName}getFullElName(e,t,i){let n=[this.componentName];return e&&n.push("__"+(e=e.replace(/[^a-z0-9-]/gi,"-"))),t&&(n.push("_",t),n.push("_",(0,a.isVoid)(i)?"true":i.toString())),n.join("")}get ownerDocument(){return this.ow.document}get od(){return this.ownerDocument}get ow(){return this.ownerWindow}get(e,t){return(0,a.get)(e,t||this)}get isReady(){return this.componentStatus===r.STATUSES.ready}get isDestructed(){return this.componentStatus===r.STATUSES.destructed}get isInDestruct(){return r.STATUSES.beforeDestruct===this.componentStatus||r.STATUSES.destructed===this.componentStatus}bindDestruct(e){return e.hookStatus(r.STATUSES.beforeDestruct,()=>!this.isInDestruct&&this.destruct()),this}destruct(){this.setStatus(r.STATUSES.destructed),this.async&&(this.async.destruct(),this.async=void 0),l.get(this)&&l.delete(this),this.ownerWindow=void 0}get componentStatus(){return this.__componentStatus}set componentStatus(e){this.setStatus(e)}setStatus(e){return this.setStatusComponent(e,this)}setStatusComponent(e,t){if(e===this.__componentStatus)return;t===this&&(this.__componentStatus=e);let i=Object.getPrototypeOf(this);i&&(0,a.isFunction)(i.setStatusComponent)&&i.setStatusComponent(e,t);let n=l.get(this),o=n?.[e];o&&o.length&&o.forEach(e=>e(t))}hookStatus(e,t){let i=l.get(this);i||(i={},l.set(this,i)),i[e]||(i[e]=[]),i[e].push(t)}static isInstanceOf(e,t){return e instanceof t}constructor(){(0,n._)(this,"__componentName",void 0),(0,n._)(this,"async",new o.Async),(0,n._)(this,"uid",void 0),(0,n._)(this,"ownerWindow",window),(0,n._)(this,"__componentStatus",r.STATUSES.beforeInit),this.uid="jodit-uid-"+(0,s.uniqueUid)()}}(0,n._)(u,"STATUSES",r.STATUSES)},16964:function(e,t,i){"use strict";i.d(t,{Component:function(){return n.Component},STATUSES:function(){return o.STATUSES},ViewComponent:function(){return r.ViewComponent}});var n=i(80251),o=i(69364),r=i(59609)},69364:function(e,t,i){"use strict";i.d(t,["STATUSES",0,{beforeInit:"beforeInit",ready:"ready",beforeDestruct:"beforeDestruct",destructed:"destructed"}])},59609:function(e,t,i){"use strict";i.d(t,{ViewComponent:function(){return r}});var n=i(25045),o=i(80251);class r extends o.Component{get j(){return this.jodit}get defaultTimeout(){return this.j.defaultTimeout}i18n(e,...t){return this.j.i18n(e,...t)}setParentView(e){return this.jodit=e,e.ow&&(this.ownerWindow=e.ow),e.components.add(this),this}destruct(){return this.j.components.delete(this),super.destruct()}constructor(e){super(),(0,n._)(this,"jodit",void 0),this.setParentView(e)}}},81937:function(e,t,i){"use strict";i.r(t),i.d(t,{IS_TEST:function(){return n}});let n=!1,o="u">typeof window?window:void 0,r="u">typeof document?document:void 0,s=new Set(["ul","ol"]),a=["img","video","svg","iframe","script","input","textarea","link","jodit","jodit-media"],l=new Set([...a,"br","hr"]),u=new Set(a),c="Meta",d="Backspace",h="Enter",p="Escape",m="ArrowLeft",f="ArrowUp",g="ArrowRight",_="ArrowDown",v="Delete",b=[c,d,v,f,_,g,m,h,p,"F3","Tab"],y="u">typeof navigator&&(-1!==navigator.userAgent.indexOf("MSIE")||/rv:11.0/i.test(navigator.userAgent)),w=void 0!==o&&/Mac|iPod|iPhone|iPad/.test(o.navigator.platform),k=e=>{let t=e.split("/");return/\.js/.test(t[t.length-1])?{basePath:t.slice(0,t.length-1).join("/")+"/",isMin:!0}:{basePath:e,isMin:!0}},{basePath:S,isMin:C}=(()=>{if("u"<typeof document)return{basePath:"",isMin:!0};let e=r.currentScript;if(e)return k(e.src);let t=r.querySelectorAll("script[src]");return t&&t.length?k(t[t.length-1].src):k(o.location.href)})(),E=new Set(["touchstart","touchend","scroll","mousewheel","mousemove","touchmove"]);i.d(t,["ACCURACY",0,10,"APP_VERSION",0,"4.20.2","BASE_PATH",0,S,"BASE_PATH_IS_MIN",0,C,"BR",0,"br","CLIPBOARD_ID",0,"clipboard","COMMAND_KEYS",0,b,"EMULATE_DBLCLICK_TIMEOUT",0,300,"ERROR_CODE_CONFLICT",0,409,"ES",0,"es2021","FAT_MODE",0,!1,"HOMEPAGE",0,"https://xdsoft.net/jodit/","INSEPARABLE_TAGS",0,l,"INSERT_AS_HTML",0,"insert_as_html","INSERT_AS_TEXT",0,"insert_as_text","INSERT_CLEAR_HTML",0,"insert_clear_html","INSERT_ONLY_TEXT",0,"insert_only_text","INVISIBLE_SPACE",0,"\uFEFF","INVISIBLE_SPACE_REG_EXP",0,()=>/[\uFEFF]/g,"INVISIBLE_SPACE_REG_EXP_END",0,()=>/[\uFEFF]+$/g,"INVISIBLE_SPACE_REG_EXP_START",0,()=>/^[\uFEFF]+/g,"IS_BLOCK",0,/^(ADDRESS|ARTICLE|ASIDE|BLOCKQUOTE|CANVAS|DD|DFN|DIV|DL|DT|FIELDSET|FIGCAPTION|FIGURE|FOOTER|FORM|H[1-6]|HEADER|HGROUP|HR|LI|MAIN|NAV|NOSCRIPT|OUTPUT|P|PRE|RUBY|SCRIPT|STYLE|OBJECT|OL|SECTION|IFRAME|JODIT|JODIT-MEDIA|UL|TR|TD|TH|TBODY|THEAD|TFOOT|TABLE|BODY|HTML|VIDEO)$/i,"IS_ES_MODERN",0,!0,"IS_ES_NEXT",0,!0,"IS_IE",0,y,"IS_INLINE",0,/^(STRONG|SPAN|I|EM|B|SUP|SUB|A|U)$/i,"IS_MAC",0,w,"IS_PROD",0,!0,"KEY_ALIASES",0,{add:"+",break:"pause",cmd:"meta",command:"meta",ctl:"control",ctrl:"control",del:"delete",down:"arrowdown",esc:"escape",ins:"insert",left:"arrowleft",mod:w?"meta":"control",opt:"alt",option:"alt",return:"enter",right:"arrowright",space:"space",spacebar:"space",up:"arrowup",win:"meta",windows:"meta"},"KEY_ALT",0,"Alt","KEY_BACKSPACE",0,d,"KEY_DELETE",0,v,"KEY_DOWN",0,_,"KEY_END",0,"End","KEY_ENTER",0,h,"KEY_ESC",0,p,"KEY_F3",0,"F3","KEY_HOME",0,"Home","KEY_LEFT",0,m,"KEY_META",0,c,"KEY_RIGHT",0,g,"KEY_SPACE",0,"Space","KEY_TAB",0,"Tab","KEY_UP",0,f,"LIST_TAGS",0,s,"MARKER_CLASS",0,"jodit-selection_marker","MODE_SOURCE",0,2,"MODE_SPLIT",0,3,"MODE_WYSIWYG",0,1,"NBSP_SPACE",0," ","NEARBY",0,5,"NO_EMPTY_TAGS",0,u,"PARAGRAPH",0,"p","PASSIVE_EVENTS",0,E,"SAFE_COUNT_CHANGE_CALL",0,10,"SET_TEST",0,()=>n=!0,"SOURCE_CONSUMER",0,"source-consumer","SPACE_REG_EXP",0,()=>/[\s\n\t\r\uFEFF\u200b]+/g,"SPACE_REG_EXP_END",0,()=>/[\s\n\t\r\uFEFF\u200b]+$/g,"SPACE_REG_EXP_START",0,()=>/^[\s\n\t\r\uFEFF\u200b]+/g,"TEMP_ATTR",0,"data-jodit-temp","TEXT_HTML",0,y?"html":"text/html","TEXT_PLAIN",0,y?"text":"text/plain","TEXT_RTF",0,y?"rtf":"text/rtf","TOKENS",0,{},"globalDocument",0,r,"globalWindow",0,o,"lang",0,{}])},76517:function(e,t,i){"use strict";i.d(t,{Create:function(){return l}});var n=i(25045),o=i(81937),r=i(23211),s=i(65946),a=i(28712);class l{get doc(){return(0,s.isFunction)(this.document)?this.document():this.document}element(e,t,i){let n=this.doc.createElement(e.toLowerCase());return this.applyCreateAttributes(n),t&&((0,s.isPlainObject)(t)?(0,s.attr)(n,t):i=t),i&&(0,s.asArray)(i).forEach(e=>r.Dom.append(n,(0,s.isString)(e)?this.fromHTML(e):e)),n}div(e,t,i){let n=this.element("div",t,i);return e&&(n.className=e),n}sandbox(){let e=this.element("iframe",{sandbox:"allow-same-origin"});r.Dom.append(this.doc.body,e);let t=e.contentWindow?.document;if((0,a.assert)(t,"iframe.contentWindow.document"),!t)throw Error("Iframe error");return t.open(),t.write("<!DOCTYPE html><html><head></head><body></body></html>"),t.close(),[t.body,e]}span(e,t,i){let n=this.element("span",t,i);return e&&(n.className=e),n}a(e,t,i){let n=this.element("a",t,i);return e&&(n.className=e),n}text(e){return this.doc.createTextNode(e)}fake(){return this.text(o.INVISIBLE_SPACE)}fragment(){return this.doc.createDocumentFragment()}fromHTML(e,t){let i=this.div();i.innerHTML=e.toString();let n=i.firstChild===i.lastChild&&i.firstChild?i.firstChild:i;if(r.Dom.safeRemove(n),t){let e=(0,s.refs)(n);Object.keys(t).forEach(i=>{let n=e[i];n&&!1===t[i]&&r.Dom.hide(n)})}return n}applyCreateAttributes(e){if(this.createAttributes){let t=this.createAttributes;if(t&&t[e.tagName.toLowerCase()]){let i=t[e.tagName.toLowerCase()];(0,s.isFunction)(i)?i(e):(0,s.isPlainObject)(i)&&(0,s.attr)(e,i)}}}constructor(e,t){(0,n._)(this,"document",void 0),(0,n._)(this,"createAttributes",void 0),this.document=e,this.createAttributes=t}}},79821:function(e,t,i){"use strict";i.d(t,{Create:function(){return n.Create}});var n=i(76517)},49574:function(e,t,i){"use strict";i.d(t,{autobind:function(){return o}});var n=i(91565);function o(e,t,i){if(!(0,n.isFunction)(i.value))throw TypeError(`@autobind can only be applied to methods, but "${t}" is not a function`);let o=i.value;return{configurable:!0,get(){let e=o.bind(this);return Object.defineProperty(this,t,{value:e,configurable:!0,writable:!0}),e}}}},51676:function(e,t,i){"use strict";i.d(t,{cache:function(){return l},cacheHTML:function(){return u},cached:function(){return a}});var n=i(69364),o=i(23211),r=i(28686),s=i(38027);function a(e,t){let i=Object.getOwnPropertyDescriptor(e,t);return!i||(0,r.isFunction)(i.get)?null:i.value}function l(e,t,i){let n=i.get;if(!n)throw(0,s.error)("Getter property descriptor expected");i.get=function(){let e=n.call(this);return e&&!0===e.noCache||Object.defineProperty(this,t,{configurable:i.configurable,enumerable:i.enumerable,writable:!1,value:e}),e}}function u(e,t,i){let a=i.value;if(!(0,r.isFunction)(a))throw(0,s.error)("Handler must be a Function");let l=!0,u=new WeakMap;i.value=function(...e){let t=this.od??document,i=u.get(t);if(l&&i?.has(this.constructor))return i.get(this.constructor)?.cloneNode(!0);let n=a.apply(this,e);return l&&o.Dom.isElement(n)&&(i?i.set(this.constructor,n):u.set(t,new WeakMap([[this.constructor,n]]))),l?n.cloneNode(!0):n},e.hookStatus(n.STATUSES.ready,e=>{l=!!((0,r.isViewObject)(e)?e:e.jodit).options.cache})}},91672:function(e,t,i){"use strict";i.d(t,{component:function(){return l},getComponentClass:function(){return u}});var n=i(81937),o=i(421);let r=new Map,s=new WeakSet,a=new WeakSet;function l(e){class t extends e{constructor(...e){super(...e),this.constructor===t?(this instanceof t||Object.setPrototypeOf(this,t.prototype),this.setStatus("ready")):n.IS_PROD||s.has(this.constructor)||a.has(this.constructor)||a.add(this.constructor)}}s.add(e),s.add(t);let i=(0,o.getClassName)(e.prototype);if(r.has(i)&&!n.IS_PROD)throw Error(`Component with name "${i}" is already registered`);return r.set(i,t),t}function u(e){return r.get(e)}},55184:function(e,t,i){"use strict";i.d(t,{debounce:function(){return a},throttle:function(){return l}});var n=i(16964),o=i(28686),r=i(28712),s=i(33201);function a(e,t=!1,i="debounce"){return(a,l)=>{let u=a[l];if(!(0,o.isFunction)(u))throw(0,s.error)("Handler must be a Function");return a.hookStatus(n.STATUSES.ready,n=>{let{async:s}=n;(0,r.assert)(null!=s,`Component ${n.componentName||n.constructor.name} should have "async:IAsync" field`);let a=(0,o.isFunction)(e)?e(n):e,u=(0,o.isNumber)(a)||(0,o.isPlainObject)(a)?a:n.defaultTimeout;Object.defineProperty(n,l,{configurable:!0,value:s[i](n[l].bind(n),u,t)})}),{configurable:!0,get(){return u.bind(this)}}}}function l(e,t=!1){return a(e,t,"throttle")}},24968:function(e,t,i){"use strict";i.d(t,{derive:function(){return o}});var n=i(91565);function o(...e){return t=>{let i=t.prototype;for(let t=0;t<e.length;t++){let o=e[t],r=Object.getOwnPropertyNames(o.prototype);for(let e=0;e<r.length;e++){let t=r[e],s=Object.getOwnPropertyDescriptor(o.prototype,t);null!=s&&(0,n.isFunction)(s.value)&&!(0,n.isFunction)(i[t])&&Object.defineProperty(i,t,{enumerable:!0,configurable:!0,writable:!0,value:function(...e){return s.value.call(this,...e)}})}}}}},29200:function(e,t,i){"use strict";i.d(t,{hook:function(){return r}});var n=i(91565),o=i(33201);function r(e){return(t,i)=>{if(!(0,n.isFunction)(t[i]))throw(0,o.error)("Handler must be a Function");t.hookStatus(e,e=>{e[i].call(e)})}}},35718:function(e,t,i){"use strict";i.d(t,{idle:function(){return s}});var n=i(16964),o=i(91565),r=i(33201);function s(){return(e,t)=>{if(!(0,o.isFunction)(e[t]))throw(0,r.error)("Handler must be a Function");e.hookStatus(n.STATUSES.ready,e=>{let{async:i}=e,n=e[t];e[t]=(...t)=>i.requestIdleCallback(n.bind(e,...t))})}}},84839:function(e,t,i){"use strict";i.r(t),i.d(t,{autobind:function(){return n.autobind},cache:function(){return o.cache},cacheHTML:function(){return o.cacheHTML},cached:function(){return o.cached},component:function(){return r.component},debounce:function(){return s.debounce},derive:function(){return a.derive},getComponentClass:function(){return r.getComponentClass},hook:function(){return l.hook},idle:function(){return u.idle},nonenumerable:function(){return c.nonenumerable},persistent:function(){return d.persistent},throttle:function(){return s.throttle},wait:function(){return h.wait},watch:function(){return p.watch}});var n=i(49574),o=i(51676),r=i(91672),s=i(55184),a=i(24968),l=i(29200),u=i(35718),c=i(41360),d=i(77036),h=i(80840),p=i(68616)},41360:function(e,t,i){"use strict";i.d(t,["nonenumerable",0,(e,t)=>{!1!==(Object.getOwnPropertyDescriptor(e,t)||{}).enumerable&&Object.defineProperty(e,t,{enumerable:!1,set(e){Object.defineProperty(this,t,{enumerable:!1,writable:!0,value:e})}})}])},77036:function(e,t,i){"use strict";i.d(t,{persistent:function(){return r}});var n=i(69364),o=i(31534);function r(e,t){e.hookStatus(n.STATUSES.ready,e=>{let i=(0,o.isViewObject)(e)?e:e.jodit,n=`${i.options.namespace}${e.componentName}_prop_${t}`,r=e[t];Object.defineProperty(e,t,{get:()=>i.storage.get(n)??r,set(e){i.storage.set(n,e)}})})}},80840:function(e,t,i){"use strict";i.d(t,{wait:function(){return s}});var n=i(69364),o=i(91565),r=i(33201);function s(e){return(t,i)=>{let s=t[i];if(!(0,o.isFunction)(s))throw(0,r.error)("Handler must be a Function");t.hookStatus(n.STATUSES.ready,t=>{let{async:n}=t,o=t[i],r=0;Object.defineProperty(t,i,{configurable:!0,value:function i(...s){n.clearTimeout(r),e(t)?o.apply(t,s):r=n.setTimeout(()=>i(...s),10)}})})}}},68616:function(e,t,i){"use strict";i.d(t,{watch:function(){return d}});var n=i(69364),o=i(70535),r=i(32328),s=i(91565),a=i(62101),l=i(31534),u=i(33201),c=i(71125);function d(e,t){return(i,d)=>{if(!(0,s.isFunction)(i[d]))throw(0,u.error)("Handler must be a Function");let h=t?.immediately??!0,p=t?.context,m=t=>{let n=(0,l.isViewObject)(t)?t:t.jodit,u=(e,...i)=>{if(!t.isInDestruct)return t[d](e,...i)};h||(u=t.async.microDebounce(u,!0)),(0,r.splitArray)(e).forEach(e=>{if(/:/.test(e)){let[i,o]=e.split(":"),r=p;i.length&&(r=t.get(i)),(0,s.isFunction)(r)&&(r=r(t)),n.events.on(r||t,o,u),r||n.events.on(o,u),t.hookStatus("beforeDestruct",()=>{n.events.off(r||t,o,u).off(o,u)});return}let r=e.split("."),[l]=r,d=r.slice(1),h=t[l];(0,a.isPlainObject)(h)&&(0,o.observable)(h).on("change."+d.join("."),u);let m=(0,c.getPropertyDescriptor)(i,l);Object.defineProperty(t,l,{configurable:!0,set(e){let i=h;i!==e&&(h=e,m&&m.set&&m.set.call(t,e),(0,a.isPlainObject)(h)&&(h=(0,o.observable)(h)).on("change."+d.join("."),u),u(l,i,h))},get:()=>m&&m.get?m.get.call(t):h})})};(0,s.isFunction)(i.hookStatus)?i.hookStatus(n.STATUSES.ready,m):m(i)}}},23211:function(e,t,i){"use strict";i.d(t,{Dom:function(){return b}});var n=i(81937),o=i(88475),r=i(17312),s=i(91565),a=i(46248),l=i(3213),u=i(85932),c=i(18303),d=i(81910),h=i(4040),p=i(28712),m=i(7909),f=i(80991),g=i(36400),_=i(33201),v=i(71125);class b{static detach(e){for(;e&&e.firstChild;)e.removeChild(e.firstChild)}static wrapNextInline(e,t,i){let n,o,r=e;i.s.save();do o=!1,(n=r.nextSibling)&&!b.isBlock(n)&&!b.isTag(n,"br")&&(o=!0,r=n);while(o)return b.__wrapElements(t,i,e,r)}static __wrapElements(e,t,i,n){let o=(0,u.isString)(e)?t.createInside.element(e):e;i.parentNode&&i.parentNode.insertBefore(o,i);let r=i;for(;r&&(r=i.nextSibling,o.appendChild(i),i!==n&&r);)i=r;return t.s.restore(),o}static wrapInline(e,t,i){let n,o,r=e,s=e;i.s.save();do o=!1,(n=r.previousSibling)&&!b.isBlock(n)&&(o=!0,r=n);while(o)do o=!1,(n=s.nextSibling)&&!b.isBlock(n)&&(o=!0,s=n);while(o)return b.__wrapElements(t,i,r,s)}static wrap(e,t,i){let n=(0,u.isString)(t)?i.element(t):t;if(b.isNode(e)){if(!e.parentNode)throw(0,_.error)("Element should be in DOM");e.parentNode.insertBefore(n,e),n.appendChild(e)}else{let t=e.extractContents();e.insertNode(n),n.appendChild(t)}return n}static unwrap(e){let t=e.parentNode;if(t){for(;e.firstChild;)t.insertBefore(e.firstChild,e);b.safeRemove(e)}}static between(e,t,i){let n=e;for(;n&&n!==t&&!(e!==n&&i(n));){let e=n.firstChild||n.nextSibling;if(!e){for(;n&&!n.nextSibling;)if((n=n.parentNode)===t)return;e=n?.nextSibling}n=e}}static replace(e,t,i,n=!1,r=!1){let s;if((0,a.isHTML)(t)&&((0,p.assert)(i,"Need create instance for new tag"),t=i.fromHTML(t)),(0,u.isString)(t)?((0,p.assert)(i,"Need create instance for new tag"),s=i.element(t)):s=t,!r)for(;e.firstChild;)s.appendChild(e.firstChild);return n&&b.isElement(e)&&b.isElement(s)&&(0,o.toArray)(e.attributes).forEach(e=>{s.setAttribute(e.name,e.value)}),e.parentNode&&e.parentNode.replaceChild(s,e),s}static isEmptyTextNode(e){return b.isText(e)&&(!e.nodeValue||0===e.nodeValue.replace(n.INVISIBLE_SPACE_REG_EXP(),"").trim().length)}static isEmptyContent(e){return b.each(e,e=>b.isEmptyTextNode(e))}static isContentEditable(e,t){let i=b.closest(e,e=>b.isElement(e)&&e.hasAttribute("contenteditable"),t);return b.isNode(e)&&i?.getAttribute("contenteditable")!=="false"}static isEmpty(e,t=n.NO_EMPTY_TAGS){let i;if(!e)return!0;i=(0,s.isFunction)(t)?t:e=>t.has(e.nodeName.toLowerCase());let o=e=>null==e.nodeValue||0===(0,h.trim)(e.nodeValue).length;return b.isText(e)?o(e):!(b.isElement(e)&&i(e))&&b.each(e,e=>{if(b.isText(e)&&!o(e)||b.isElement(e)&&i(e))return!1})}static isNode(e){return!!(e&&(0,u.isString)(e.nodeName)&&"number"==typeof e.nodeType&&e.childNodes&&(0,s.isFunction)(e.appendChild))}static isCell(e){return b.isNode(e)&&("TD"===e.nodeName||"TH"===e.nodeName)}static isList(e){return b.isTag(e,n.LIST_TAGS)}static isLeaf(e){return b.isTag(e,"li")}static isImage(e){return b.isNode(e)&&/^(img|svg|picture|canvas)$/i.test(e.nodeName)}static isBlock(e){return!(0,c.isVoid)(e)&&"object"==typeof e&&b.isNode(e)&&n.IS_BLOCK.test(e.nodeName)}static isText(e){return!!(e&&e.nodeType===Node.TEXT_NODE)}static isComment(e){return!!(e&&e.nodeType===Node.COMMENT_NODE)}static isElement(e){return!!b.isNode(e)&&e.nodeType===Node.ELEMENT_NODE}static isFragment(e){return!!b.isNode(e)&&e.nodeType===Node.DOCUMENT_FRAGMENT_NODE}static isHTMLElement(e){if(!b.isNode(e))return!1;let t=e.ownerDocument?.defaultView;return e instanceof(t?t.HTMLElement:HTMLElement)}static isInlineBlock(e){return b.isElement(e)&&!/^(BR|HR)$/i.test(e.tagName)&&-1!==["inline","inline-block"].indexOf((0,f.css)(e,"display").toString())}static canSplitBlock(e){return!(0,c.isVoid)(e)&&b.isHTMLElement(e)&&b.isBlock(e)&&!/^(TD|TH|CAPTION|FORM)$/.test(e.nodeName)&&void 0!==e.style&&!/^(fixed|absolute)/i.test(e.style.position)}static first(e,t){return b.__deepMost(e,t,!1)}static last(e,t){return b.__deepMost(e,t,!0)}static __deepMost(e,t,i){let n=i?"lastChild":"firstChild",o=i?"previousSibling":"nextSibling",r=e?.[n];if(!r)return null;do{if(t(r))return r;let i=r[n]||r[o];if(!i&&r.parentNode!==e){do r=r.parentNode;while(r&&!r[o]&&r.parentNode!==e)i=r?.[o]}r=i}while(r)return null}static prev(e,t,i,n=!0){return b.find(e,t,i,!1,n)}static next(e,t,i,n=!0){return b.find(e,t,i,!0,n)}static prevWithClass(e,t){return b.__siblingWithClass(e,t,!0)}static nextWithClass(e,t){return b.__siblingWithClass(e,t,!1)}static __siblingWithClass(e,t,i){let n=e=>b.isElement(e)&&e.classList.contains(t),o=e.parentNode;return i?b.prev(e,n,o):b.next(e,n,o)}static find(e,t,i,n=!0,o=!0){let r=this.nextGen(e,i,n,o),s=r.next();for(;!s.done;){if(t(s.value))return s.value;s=r.next()}return null}static*nextGen(e,t,i=!0,n=!0){let o=[],r=e;do{let t=i?r.nextSibling:r.previousSibling;for(;t;)o.push(t),t=i?t.nextSibling:t.previousSibling;o.reverse(),yield*this.runInStack(e,o,i,n),r=r.parentNode}while(r&&r!==t)return null}static each(e,t,i=!0){let n=this.eachGen(e,i),o=n.next();for(;!o.done;){if(!1===t(o.value))return!1;o=n.next()}return!0}static eachGen(e,t=!0){return this.runInStack(e,[e],t)}static*runInStack(e,t,i,n=!0){for(;t.length;){let o=t.pop();if(n){let e=i?o.lastChild:o.firstChild;for(;e;)t.push(e),e=i?e.previousSibling:e.nextSibling}e!==o&&(yield o)}}static findWithCurrent(e,t,i,n="nextSibling",o="firstChild"){let r=e;do{if(t(r))return r||null;if(o&&r&&r[o]){let e=b.findWithCurrent(r[o],t,r,n,o);if(e)return e}for(;r&&!r[n]&&r!==i;)r=r.parentNode;r&&r[n]&&r!==i&&(r=r[n])}while(r&&r!==i)return null}static findSibling(e,t=!0,i=e=>!b.isEmptyTextNode(e)){let n=b.sibling(e,t);for(;n&&!i(n);)n=b.sibling(n,t);return n&&i(n)?n:null}static findNotEmptySibling(e,t){return b.findSibling(e,t,e=>!b.isEmptyTextNode(e)&&!!(!b.isText(e)||e.nodeValue?.length&&(0,h.trim)(e.nodeValue)))}static findNotEmptyNeighbor(e,t,i){return(0,v.call)(t?b.prev:b.next,e,e=>!!(e&&(!(b.isText(e)||b.isComment(e))||(0,h.trim)(e?.nodeValue||"").length)),i)}static sibling(e,t){return t?e.previousSibling:e.nextSibling}static up(e,t,i,n=!1){let o=e;if(!o)return null;do{if(t(o))return o;if(o===i||!o.parentNode)break;o=o.parentNode}while(o&&o!==i)return o===i&&n&&t(o)?o:null}static closest(e,t,i){let n,o=e=>e.toLowerCase();if((0,s.isFunction)(t))n=t;else if((0,r.isArray)(t)||(0,l.isSet)(t)){let e=(0,l.isSet)(t)?t:new Set(t.map(o));n=t=>!!(t&&e.has(o(t.nodeName)))}else n=e=>!!(e&&o(t)===o(e.nodeName));return b.up(e,n,i)}static furthest(e,t,i){let n=null,o=e?.parentElement;for(;o&&o!==i;)t(o)&&(n=o),o=o?.parentElement;return n}static appendChildFirst(e,t){e.firstChild!==t&&b.prepend(e,t)}static after(e,t){e.parentNode?.insertBefore(t,e.nextSibling)}static before(e,t){e.parentNode?.insertBefore(t,e)}static prepend(e,t){e.insertBefore(t,e.firstChild)}static append(e,t){(0,r.isArray)(t)?t.forEach(t=>{this.append(e,t)}):e.appendChild(t)}static moveContent(e,t,i=!1,r=()=>!0){let s=(e.ownerDocument||n.globalDocument).createDocumentFragment();(0,o.toArray)(e.childNodes).filter(e=>!!r(e)||(b.safeRemove(e),!1)).forEach(e=>{s.appendChild(e)}),t.insertBefore(s,i?t.firstChild:null)}static isOrContains(e,t,i=!1){return e===t?!i:!!(t&&e&&this.up(t,t=>t===e,e,!0))}static safeRemove(...e){e.forEach(e=>b.isNode(e)&&e.parentNode&&e.parentNode.removeChild(e))}static safeInsertNode(e,t){e.collapsed||e.deleteContents();let i=b.isFragment(t)?t.lastChild:t;e.startContainer===e.endContainer&&e.collapsed&&b.isTag(e.startContainer,n.INSEPARABLE_TAGS)?b.after(e.startContainer,t):(e.insertNode(t),i&&e.setStartBefore(i)),e.collapse(!0),[t.nextSibling,t.previousSibling].forEach(e=>b.isText(e)&&!e.nodeValue&&b.safeRemove(e))}static hide(e){e&&((0,g.dataBind)(e,"__old_display",e.style.getPropertyValue("display")),e.style.setProperty("display","none"))}static show(e){if(!e)return;let t=(0,g.dataBind)(e,"__old_display");"none"===e.style.getPropertyValue("display")&&e.style.setProperty("display",t||null)}static isTag(e,t){if(Array.isArray(t))throw TypeError("Dom.isTag does not support array");if(!this.isElement(e))return!1;let i=e.tagName.toLowerCase();return t instanceof Set?t.has(i)||t.has(e.tagName.toUpperCase()):i===t||e.tagName.toUpperCase()===t}static markTemporary(e,t){return t&&(0,m.attr)(e,t),(0,m.attr)(e,n.TEMP_ATTR,!0),e}static isTemporary(e){return!!b.isElement(e)&&(b.isMarker(e)||"true"===(0,m.attr)(e,n.TEMP_ATTR))}static isMarker(e){return b.isNode(e)&&b.isTag(e,"span")&&e.hasAttribute("data-"+n.MARKER_CLASS)}static replaceTemporaryFromString(e){return(0,d.unwrapMarkedTags)(e,null,n.TEMP_ATTR)}static temporaryList(e){let t=[];return b.each(e,e=>{b.isHTMLElement(e)&&e.hasAttribute(n.TEMP_ATTR)&&t.push(e)}),t}constructor(){throw Error("Dom is static module")}}},27795:function(e,t,i){"use strict";i.d(t,{Dom:function(){return n.Dom},LazyWalker:function(){return o.LazyWalker}});var n=i(23211),o=i(1080)},1080:function(e,t,i){"use strict";i.d(t,{LazyWalker:function(){return l}});var n=i(25045),o=i(62445),r=i(49574),s=i(23211),a=i(60216);class l extends a.Eventify{setWork(e){return this.isWorked?this.break():this.stop(),this.workNodes=s.Dom.eachGen(e,!this.options.reverse),this.isFinished=!1,this.hadAffect=!1,this._requestStarting(),this}_requestStarting(){this.__schedulerController=new AbortController,this.async.schedulerPostTask(this.__workPerform,{delay:this.options.timeout,signal:this.__schedulerController.signal}).catch(()=>null)}break(e){this.isWorked&&(this.stop(),this.emit("break",e))}end(){this.isWorked&&(this.stop(),this.emit("end",this.hadAffect),this.hadAffect=!1)}stop(){this.isWorked=!1,this.isFinished=!0,this.workNodes=null,this.__schedulerController?.abort(),this.__schedulerController=null}destruct(){super.destruct(),this.stop()}__workPerform(){if(this.workNodes){this.isWorked=!0;let e=0,t=this.options.timeoutChunkSize??50;for(;!this.isFinished&&e<t;){let t=this.workNodes.next();if(e+=1,this.visitNode(t.value)&&(this.hadAffect=!0),t.done)return void this.end()}}else this.end();this.isFinished||this._requestStarting()}visitNode(e){return!!e&&(void 0===this.options.whatToShow||e.nodeType===this.options.whatToShow)&&(this.emit("visit",e)??!1)}constructor(e,t={}){super(),(0,n._)(this,"async",void 0),(0,n._)(this,"options",void 0),(0,n._)(this,"workNodes",void 0),(0,n._)(this,"hadAffect",void 0),(0,n._)(this,"isWorked",void 0),(0,n._)(this,"isFinished",void 0),(0,n._)(this,"__schedulerController",void 0),this.async=e,this.options=t,this.workNodes=null,this.hadAffect=!1,this.isWorked=!1,this.isFinished=!1,this.__schedulerController=null}}(0,o._)([r.autobind],l.prototype,"__workPerform",null)},93747:function(e,t,i){"use strict";i.d(t,{EventEmitter:function(){return d}});var n=i(25045),o=i(81937),r=i(32328),s=i(17312),a=i(91565),l=i(85932),u=i(33201),c=i(18869);class d{mute(e){return this.__mutedEvents.add(e??"*"),this}isMuted(e){return!!(e&&this.__mutedEvents.has(e))||this.__mutedEvents.has("*")}unmute(e){return this.__mutedEvents.delete(e??"*"),this}__eachEvent(e,t){(0,r.splitArray)(e).map(e=>e.trim()).forEach(e=>{let i=e.split("."),n=i[1]||c.defaultNameSpace;t.call(this,i[0],n)})}__getStore(e){if(!e)throw(0,u.error)("Need subject");if(void 0===e[this.__key]){let t=new c.EventHandlersStore;Object.defineProperty(e,this.__key,{enumerable:!1,configurable:!0,writable:!0,value:t})}return e[this.__key]}__removeStoreFromSubject(e){void 0!==e[this.__key]&&delete e[this.__key]}__triggerNativeEvent(e,t){let i=this.__doc.createEvent("HTMLEvents");(0,l.isString)(t)?i.initEvent(t,!0,!0):(i.initEvent(t.type,t.bubbles,t.cancelable),["screenX","screenY","clientX","clientY","view","target","srcElement","currentTarget","timeStamp","which","keyCode"].forEach(e=>{Object.defineProperty(i,e,{value:t[e],enumerable:!0})}),Object.defineProperty(i,"originalEvent",{value:t,enumerable:!0})),e.dispatchEvent(i)}get current(){return this.currents[this.currents.length-1]}on(e,t,i,n){let r,c,d,p;if((0,l.isString)(e)||(0,l.isStringArray)(e)?(r=this,c=e,d=t,p=i):(r=e,c=t,d=i,p=n),!((0,l.isString)(c)||(0,l.isStringArray)(c))||0===c.length)throw(0,u.error)("Need events names");if(!(0,a.isFunction)(d))throw(0,u.error)("Need event handler");if((0,s.isArray)(r))return r.forEach(e=>{this.on(e,c,d,p)}),this;let m=r,f=this.__getStore(m),g=this,_=function(e,...t){if(!g.isMuted(e))return d&&d.call(this,...t)};return h(m)&&(_=function(e){if(!g.isMuted(e.type)&&(g.__prepareEvent(e),d&&!1===d.call(this,e)))return e.preventDefault(),e.stopImmediatePropagation(),!1}),this.__eachEvent(c,(e,t)=>{if(0===e.length)throw(0,u.error)("Need event name");if(!1===f.indexOf(e,t,d)){let i={event:e,originalCallback:d,syntheticCallback:_};if(f.set(e,t,i,p?.top),h(m)){let t=o.PASSIVE_EVENTS.has(e)?{passive:!0,capture:p?.capture??!1}:p?.capture??!1;_.options=t,m.addEventListener(e,_,t),this.__memoryDOMSubjectToHandler(m,_)}}}),this}__memoryDOMSubjectToHandler(e,t){let i=this.__domEventsMap.get(e)||new Set;i.add(t),this.__domEventsMap.set(e,i)}__unmemoryDOMSubjectToHandler(e,t){let i=this.__domEventsMap,n=i.get(e)||new Set;n.delete(t),n.size?i.set(e,n):i.delete(e)}one(e,t,i,n){let o,r,s,a;(0,l.isString)(e)||(0,l.isStringArray)(e)?(o=this,r=e,s=t,a=i):(o=e,r=t,s=i,a=n);let u=(...e)=>(this.off(o,r,u),s(...e));return this.on(o,r,u,a),this}off(e,t,i){let n,o,r;if((0,l.isString)(e)||(0,l.isStringArray)(e)?(n=this,o=e,r=t):(n=e,o=t,r=i),(0,s.isArray)(n))return n.forEach(e=>{this.off(e,o,r)}),this;let u=n,d=this.__getStore(u);if(!((0,l.isString)(o)||(0,l.isStringArray)(o))||0===o.length)return d.namespaces().forEach(e=>{this.off(u,"."+e)}),this.__removeStoreFromSubject(u),this;let p=e=>{h(u)&&(u.removeEventListener(e.event,e.syntheticCallback,e.syntheticCallback.options??!1),this.__unmemoryDOMSubjectToHandler(u,e.syntheticCallback))},m=(e,t)=>{if(""===e)return void d.events(t).forEach(e=>{""!==e&&m(e,t)});let i=d.get(e,t);if(i&&i.length)if((0,a.isFunction)(r)){let n=d.indexOf(e,t,r);!1!==n&&(p(i[n]),i.splice(n,1),i.length||d.clearEvents(t,e))}else i.forEach(p),i.length=0,d.clearEvents(t,e)};return this.__eachEvent(o,(e,t)=>{t===c.defaultNameSpace?d.namespaces().forEach(t=>{m(e,t)}):m(e,t)}),d.isEmpty()&&this.__removeStoreFromSubject(u),this}stopPropagation(e,t){let i=(0,l.isString)(e)?this:e,n=(0,l.isString)(e)?e:t;if("string"!=typeof n)throw(0,u.error)("Need event names");let o=this.__getStore(i);this.__eachEvent(n,(e,t)=>{let n=o.get(e,t);n&&this.__stopped.push(n),t===c.defaultNameSpace&&o.namespaces(!0).forEach(t=>this.stopPropagation(i,e+"."+t))})}__removeStop(e){if(e){let t=this.__stopped.indexOf(e);-1!==t&&this.__stopped.splice(0,t+1)}}__isStopped(e){return void 0!==e&&-1!==this.__stopped.indexOf(e)}fire(e,t,...i){let n,o,r=(0,l.isString)(e)?this:e,s=(0,l.isString)(e)?e:t,a=(0,l.isString)(e)?[t,...i]:i;if(!h(r)&&!(0,l.isString)(s))throw(0,u.error)("Need events names");let d=this.__getStore(r);return!(0,l.isString)(s)&&h(r)?this.__triggerNativeEvent(r,t):this.__eachEvent(s,(e,t)=>{if(h(r))this.__triggerNativeEvent(r,e);else{let i=d.get(e,t);if(i)try{[...i].every(t=>!this.__isStopped(i)&&(this.currents.push(e),o=t.syntheticCallback.call(r,e,...a),this.currents.pop(),void 0!==o&&(n=o),!0))}finally{this.__removeStop(i)}t!==c.defaultNameSpace||h(r)||d.namespaces().filter(e=>e!==t).forEach(t=>{let i=this.fire.apply(this,[r,e+"."+t,...a]);void 0!==i&&(n=i)})}}),n}destruct(){this.__isDestructed||(this.__isDestructed=!0,this.__domEventsMap.forEach((e,t)=>{this.off(t)}),this.__domEventsMap.clear(),this.__mutedEvents.clear(),this.currents.length=0,this.__stopped.length=0,this.off(this),this.__getStore(this).clear(),this.__removeStoreFromSubject(this))}constructor(e){(0,n._)(this,"__domEventsMap",new Map),(0,n._)(this,"__mutedEvents",new Set),(0,n._)(this,"__key","__JoditEventEmitterNamespaces"),(0,n._)(this,"__doc",o.globalDocument),(0,n._)(this,"__prepareEvent",e=>{!e.cancelBubble&&(e.composed&&(0,a.isFunction)(e.composedPath)&&e.composedPath()[0]&&Object.defineProperty(e,"target",{value:e.composedPath()[0],configurable:!0,enumerable:!0}),e.type.match(/^touch/)&&e.changedTouches&&e.changedTouches.length&&["clientX","clientY","pageX","pageY"].forEach(t=>{Object.defineProperty(e,t,{value:e.changedTouches[0][t],configurable:!0,enumerable:!0})}),e.originalEvent||(e.originalEvent=e),"paste"===e.type&&void 0===e.clipboardData&&this.__doc.defaultView.clipboardData&&Object.defineProperty(e,"clipboardData",{get:()=>this.__doc.defaultView.clipboardData,configurable:!0,enumerable:!0}))}),(0,n._)(this,"currents",[]),(0,n._)(this,"__stopped",[]),(0,n._)(this,"__isDestructed",!1),e&&(this.__doc=e),this.__key+=new Date().getTime()}}function h(e){return e&&(0,a.isFunction)(e.addEventListener)}},60216:function(e,t,i){"use strict";i.d(t,{Eventify:function(){return o}});var n=i(25045);class o{on(e,t){return this.__map.has(e)||this.__map.set(e,new Set),this.__map.get(e)?.add(t),this}off(e,t){return this.__map.has(e)&&this.__map.get(e)?.delete(t),this}destruct(){this.__map.clear()}emit(e,...t){let i;return this.__map.has(e)&&this.__map.get(e)?.forEach(e=>{i=e(...t)}),i}constructor(){(0,n._)(this,"__map",new Map)}}},42689:function(e,t,i){"use strict";let n=new(i(93747)).EventEmitter;i.d(t,["eventEmitter",0,n])},1496:function(e,t,i){"use strict";i.d(t,{EventEmitter:function(){return n.EventEmitter},EventHandlersStore:function(){return s.EventHandlersStore},Eventify:function(){return o.Eventify},defaultNameSpace:function(){return s.defaultNameSpace},observable:function(){return r.observable}});var n=i(93747),o=i(60216),r=i(70535),s=i(18869)},70535:function(e,t,i){"use strict";i.d(t,{observable:function(){return u}});var n=i(17312),o=i(94013),r=i(62101),s=i(71125);let a=Symbol("observable-object");function l(e){return void 0!==e[a]}function u(e){if(l(e))return e;let t={},i={},u=(t,o)=>((0,n.isArray)(t)?t.map(e=>u(e,o)):(i[t]||(i[t]=[]),i[t].push(o)),e),c=(o,...r)=>{if((0,n.isArray)(o))return void o.map(e=>c(e,...r));try{!t[o]&&i[o]&&(t[o]=!0,i[o].forEach(t=>t.call(e,...r)))}finally{t[o]=!1}},d=(t,i=[])=>{let n={};l(t)||(Object.defineProperty(t,a,{enumerable:!1,value:!0}),Object.keys(t).forEach(a=>{let l=i.concat(a).filter(e=>e.length);n[a]=t[a];let u=(0,s.getPropertyDescriptor)(t,a);Object.defineProperty(t,a,{set(t){let i=n[a];if(!(0,o.isFastEqual)(n[a],t)){c(["beforeChange","beforeChange."+l.join(".")],a,t),(0,r.isPlainObject)(t)&&d(t,l),u&&u.set?u.set.call(e,t):n[a]=t;let o=[];c(["change",...l.reduce((e,t)=>(o.push(t),e.push("change."+o.join(".")),e),[])],l.join("."),i,t?.valueOf?t.valueOf():t)}},get:()=>u&&u.get?u.get.call(e):n[a],enumerable:!0,configurable:!0}),(0,r.isPlainObject)(n[a])&&d(n[a],l)}),Object.defineProperty(e,"on",{value:u}))};return d(e),e}},18869:function(e,t,i){"use strict";i.d(t,{EventHandlersStore:function(){return a}});var n=i(25045),o=i(88475),r=i(28712);let s="JoditEventDefaultNamespace";class a{get(e,t){if(this.__store.has(t)){let i=this.__store.get(t);return(0,r.assert)(i,"-"),i[e]}}indexOf(e,t,i){let n=this.get(e,t);if(n){for(let e=0;e<n.length;e+=1)if(n[e].originalCallback===i)return e}return!1}namespaces(e=!1){let t=(0,o.toArray)(this.__store.keys());return e?t.filter(e=>e!==s):t}events(e){let t=this.__store.get(e);return t?Object.keys(t):[]}set(e,t,i,n=!1){let o=this.__store.get(t);o||(o={},this.__store.set(t,o)),void 0===o[e]&&(o[e]=[]),n?o[e].unshift(i):o[e].push(i)}clear(){this.__store.clear()}clearEvents(e,t){let i=this.__store.get(e);i&&i[t]&&(delete i[t],Object.keys(i).length||this.__store.delete(e))}isEmpty(){return 0===this.__store.size}constructor(){(0,n._)(this,"__store",new Map)}}i.d(t,["defaultNameSpace",0,s])},28077:function(e,t,i){"use strict";i.d(t,{getContainer:function(){return w},getPopupViewRoot:function(){return k},uniqueUid:function(){return v}});var n=i(24497),o=i(62101),r=i(85932),s=i(31534),a=i(74264),l=i(7909),u=i(80991),c=i(421),d=i(78048),h=i(85305),p=i(42689),m=i(81937),f=i(27795);let g=1,_=new Set;function v(){function e(){return Math.round(g+=10*(Math.random()+1)).toString(16)}let t=e();for(;_.has(t);)t=e();return _.add(t),t}let b=new h.PluginSystem({getContainer:w}),y=new WeakMap;function w(e,t,i="div",o=!1){let u,d=(0,r.isString)(t)?t:t?(0,c.getClassName)(t.prototype):"jodit-utils",h=y.get(e)||{},p=d+i,m=(0,s.isViewObject)(e)?e:e.j;if(!h[p]){let t=m.c;if(u=k(m.o,m.container,e.od.body),o&&(0,n.isJoditObject)(e)&&e.od!==e.ed){t=e.createInside;let o="style"===i?e.ed.head:e.ed.body;u=(0,n.isJoditObject)(e)&&e.o.shadowRoot?e.o.shadowRoot:o}let r=t.element(i,{className:`jodit jodit-${(0,a.kebabCase)(d)}-container jodit-box`});m.o.nonce&&("style"===i||"script"===i)&&(0,l.attr)(r,"nonce",m.o.nonce),r.classList.add("jodit_theme_"+(m.o.theme||"default")),f.Dom.append(u,r),h[p]=r,e.hookStatus("beforeDestruct",()=>{m.events.off(r),f.Dom.safeRemove(r),delete h[p],Object.keys(h).length&&y.delete(e)}),y.set(e,h),m.events.fire("getContainer",r)}return h[p].classList.remove("jodit_theme_default","jodit_theme_dark"),h[p].classList.add("jodit_theme_"+(m.o.theme||"default")),h[p]}function k(e,t,i){return e.popupRoot??e.shadowRoot??f.Dom.closest(t,e=>f.Dom.isHTMLElement(e)&&(f.Dom.isTag(e,"dialog")||["fixed","absolute"].includes((0,u.css)(e,"position"))),i)??i}let S=p.eventEmitter;i.d(t,["eventEmitter",0,S,"extendLang",0,e=>{Object.keys(e).forEach(t=>{let i,n=(i=e[t],(0,o.isPlainObject)(i)&&(0,o.isPlainObject)(i.default)?i.default:i);!(0,d.isUnsafeProtoKey)(t)&&(0,o.isPlainObject)(n)&&(Object.prototype.hasOwnProperty.call(m.lang,t)&&(0,o.isPlainObject)(m.lang[t])||(m.lang[t]={}),Object.keys(n).forEach(e=>{(0,d.isUnsafeProtoKey)(e)||(m.lang[t][e]=n[e])}))})},"instances",0,{},"modules",0,{},"pluginSystem",0,b])},78982:function(e,t,i){"use strict";var n=i(17312);i.d(t,["asArray",0,e=>(0,n.isArray)(e)?e:[e]])},45664:function(e,t,i){"use strict";i.d(t,{asArray:function(){return n.asArray},splitArray:function(){return o.splitArray},toArray:function(){return r.toArray}});var n=i(78982),o=i(32328),r=i(88475)},32328:function(e,t,i){"use strict";function n(e){return Array.isArray(e)?e:e.split(/[,\s]+/)}i.d(t,{splitArray:function(){return n}})},88475:function(e,t,i){"use strict";var n=i(23283),o=i(43379);i.d(t,["toArray",0,function(...e){return((0,n.isNativeFunction)(Array.from)?Array.from:(0,o.reset)("Array.from")??Array.from).apply(Array,e)}])},61077:function(e,t,i){"use strict";i.d(t,{clearTimeout:function(){return n.clearTimeout},setTimeout:function(){return n.setTimeout}});var n=i(79947)},79947:function(e,t,i){"use strict";i.d(t,{clearTimeout:function(){return r},setTimeout:function(){return o}});var n=i(81937);function o(e,t,...i){return t?n.globalWindow.setTimeout(e,t,...i):(e.call(null,...i),0)}function r(e){n.globalWindow.clearTimeout(e)}},98740:function(e,t,i){"use strict";i.d(t,{hasBrowserColorPicker:function(){return o}});var n=i(81937);function o(){let e;try{let t=n.globalDocument.createElement("input");t.type="color",t.value="!",e="color"===t.type&&"!"!==t.value}catch(t){e=!1}return e}},28686:function(e,t,i){"use strict";i.d(t,{hasBrowserColorPicker:function(){return n.hasBrowserColorPicker},hasContainer:function(){return d.hasContainer},isAbortError:function(){return o.isAbortError},isArray:function(){return r.isArray},isBoolean:function(){return s.isBoolean},isDestructable:function(){return d.isDestructable},isEqual:function(){return a.isEqual},isFastEqual:function(){return a.isFastEqual},isFunction:function(){return l.isFunction},isHTML:function(){return u.isHTML},isHtmlFromWord:function(){return c.isHtmlFromWord},isInitable:function(){return d.isInitable},isInt:function(){return h.isInt},isJoditObject:function(){return p.isJoditObject},isLicense:function(){return m.isLicense},isMarker:function(){return f.isMarker},isNativeFunction:function(){return g.isNativeFunction},isNumber:function(){return _.isNumber},isNumeric:function(){return v.isNumeric},isPlainObject:function(){return b.isPlainObject},isPromise:function(){return y.isPromise},isSet:function(){return w.isSet},isString:function(){return k.isString},isStringArray:function(){return k.isStringArray},isURL:function(){return S.isURL},isValidName:function(){return C.isValidName},isViewObject:function(){return E.isViewObject},isVoid:function(){return D.isVoid},isWindow:function(){return T.isWindow}});var n=i(98740),o=i(72068),r=i(17312),s=i(22289),a=i(94013),l=i(91565),u=i(46248),c=i(82166),d=i(52433),h=i(99732),p=i(24497),m=i(44998),f=i(23175),g=i(23283),_=i(72412),v=i(70222),b=i(62101),y=i(52100),w=i(3213),k=i(85932),S=i(91764),C=i(50083),E=i(31534),D=i(18303),T=i(3513)},72068:function(e,t,i){"use strict";function n(e){return!!e&&e instanceof DOMException&&"AbortError"===e.name}i.d(t,{isAbortError:function(){return n}})},17312:function(e,t,i){"use strict";function n(e){return Array.isArray(e)}i.d(t,{isArray:function(){return n}})},22289:function(e,t,i){"use strict";function n(e){return"boolean"==typeof e}i.d(t,{isBoolean:function(){return n}})},94013:function(e,t,i){"use strict";i.d(t,{isEqual:function(){return o},isFastEqual:function(){return r}});var n=i(3347);function o(e,t){return e===t||(0,n.stringify)(e)===(0,n.stringify)(t)}function r(e,t){return e===t}},91565:function(e,t,i){"use strict";function n(e){return"function"==typeof e}i.d(t,{isFunction:function(){return n}})},82166:function(e,t,i){"use strict";i.d(t,{isHtmlFromWord:function(){return l}});let n=/\s/,o=/\d/,r=/\w/;function s(e,t){let i=e.indexOf(t);for(;-1!==i;){let r=i+t.length;if(n.test(e.charAt(r))&&o.test(e.charAt(r+1)))return!0;i=e.indexOf(t,r)}return!1}function a(e,t){let i="style="+t,n=e.indexOf(i);for(;-1!==n;){let o=n+i.length,r=e.indexOf(t,o);if(-1===r&&(r=e.length),e.slice(o,r).includes("mso-"))return!0;n=e.indexOf(i,r)}return!1}function l(e){if(e.includes("urn:schemas-microsoft-com:office:word")||e.includes("urn:schemas-microsoft-com:office:excel"))return!0;let t=e.indexOf("<");for(;-1!==t;){if(!r.test(e.charAt(t+1))){t=e.indexOf("<",t+1);continue}let i=e.indexOf(">",t);-1===i&&(i=e.length);let o=e.slice(t,i);if("<meta"===o.slice(0,5).toLowerCase()&&function(e){if(s(e,"Microsoft Word")||s(e,"Microsoft Excel"))return!0;let t=e.toLowerCase(),i=t.indexOf("progid");return -1!==i&&(-1!==t.indexOf("word.",i)||-1!==t.indexOf("excel.",i))||t.includes("libreoffice")||t.includes("openoffice")}(o)||function(e){let t=e.indexOf("class=");for(;-1!==t;){if(t>0&&n.test(e.charAt(t-1))){let i=t+6,n=e.charAt(i);if(('"'===n||"'"===n)&&(i+=1),e.startsWith("Mso",i))return!0}t=e.indexOf("class=",t+6)}return!1}(o))return!0;t=e.indexOf("<",i)}return a(e,"'")||a(e,'"')&&e.includes("<font")}},46248:function(e,t,i){"use strict";var n=i(85932);let o=/[A-Za-z]/,r=/[A-Za-z0-9]/,s=/\w/;function a(e,t){if(!o.test(e.charAt(t)))return"";let i=t+1;for(;r.test(e.charAt(i));)i+=1;return e.slice(t,i)}i.d(t,["isHTML",0,e=>(0,n.isString)(e)&&function(e){let t=new Map,i=e.indexOf("</");for(;-1!==i;){let n=a(e,i+2);""!==n&&">"===e.charAt(i+2+n.length)&&t.set(n,i),i=e.indexOf("</",i+2)}if(0===t.size)return!1;let n=-1;for(i=e.indexOf("<");-1!==i;){let o=a(e,i+1),r=i+1+o.length;if(""!==o&&!s.test(e.charAt(r))){if(n<r&&(n=e.indexOf(">",r)),-1===n)return!1;let i=t.get(o);if(void 0!==i&&i>n)return!0}i=e.indexOf("<",i+1)}return!1}(e)])},52433:function(e,t,i){"use strict";i.d(t,{hasContainer:function(){return l},isDestructable:function(){return a},isInitable:function(){return s}});var n=i(23211),o=i(91565),r=i(18303);function s(e){return!(0,r.isVoid)(e)&&(0,o.isFunction)(e.init)}function a(e){return!(0,r.isVoid)(e)&&(0,o.isFunction)(e.destruct)}function l(e){return!(0,r.isVoid)(e)&&n.Dom.isElement(e.container)}},99732:function(e,t,i){"use strict";i.d(t,{isInt:function(){return r}});var n=i(70222),o=i(85932);function r(e){return(0,o.isString)(e)&&(0,n.isNumeric)(e)&&(e=parseFloat(e)),"number"==typeof e&&Number.isFinite(e)&&!(e%1)}},24497:function(e,t,i){"use strict";i.d(t,{isJoditObject:function(){return o}});var n=i(91565);function o(e){return!!(e&&e instanceof Object&&(0,n.isFunction)(e.constructor)&&("u">typeof Jodit&&e instanceof Jodit||e.isJodit))}},44998:function(e,t,i){"use strict";var n=i(85932);i.d(t,["isLicense",0,e=>(0,n.isString)(e)&&23===e.length&&/^[a-z0-9]{5}-[a-z0-9]{5}-[a-z0-9]{5}-[a-z0-9]{5}$/i.test(e)])},23175:function(e,t,i){"use strict";i.d(t,{isMarker:function(){return o}});var n=i(23211);function o(e){return n.Dom.isMarker(e)}},23283:function(e,t,i){"use strict";function n(e){return!!e&&"function"===(typeof e).toLowerCase()&&(e===Function.prototype||/^\s*function\s*(\b[a-z$_][a-z0-9$_]*\b)*\s*\((|([a-z$_][a-z0-9$_]*)(\s*,[a-z$_][a-z0-9$_]*)*)\)\s*{\s*\[native code]\s*}\s*$/i.test(e+""))}i.d(t,{isNativeFunction:function(){return n}})},72412:function(e,t,i){"use strict";function n(e){return"number"==typeof e&&!isNaN(e)&&isFinite(e)}i.d(t,{isNumber:function(){return n}})},70222:function(e,t,i){"use strict";i.d(t,{isNumeric:function(){return o}});var n=i(85932);function o(e){if((0,n.isString)(e)){if(!e.match(/^([+-])?[0-9]+(\.?)([0-9]+)?(e[0-9]+)?$/))return!1;e=parseFloat(e)}return"number"==typeof e&&!isNaN(e)&&isFinite(e)}},62101:function(e,t,i){"use strict";i.d(t,{isPlainObject:function(){return o}});var n=i(3513);function o(e){return!(!e||"object"!=typeof e||e.nodeType||(0,n.isWindow)(e))&&!(e.constructor&&!({}).hasOwnProperty.call(e.constructor.prototype,"isPrototypeOf"))}},52100:function(e,t,i){"use strict";function n(e){return e&&"function"==typeof e.then}i.d(t,{isPromise:function(){return n}})},3213:function(e,t,i){"use strict";i.d(t,{isSet:function(){return o}});var n=i(91565);function o(e){return!!e&&(0,n.isFunction)(e.has)&&(0,n.isFunction)(e.add)&&(0,n.isFunction)(e.delete)}},85932:function(e,t,i){"use strict";i.d(t,{isString:function(){return o},isStringArray:function(){return r}});var n=i(17312);function o(e){return"string"==typeof e}function r(e){return(0,n.isArray)(e)&&o(e[0])}},91764:function(e,t,i){"use strict";i.d(t,{isURL:function(){return o}});var n=i(81937);function o(e){if(e.includes(" "))return!1;if("u">typeof URL)try{let t=new URL(e);return["https:","http:","ftp:","file:","rtmp:"].includes(t.protocol)}catch(e){return!1}let t=n.globalDocument.createElement("a");return t.href=e,!!t.hostname}},50083:function(e,t,i){"use strict";function n(e){return!!e.length&&!/[^0-9A-Za-zа-яА-ЯЁё\w\-_. ]/.test(e)&&e.trim().length>0}i.d(t,{isValidName:function(){return n}})},31534:function(e,t,i){"use strict";i.d(t,{isViewObject:function(){return o}});var n=i(91565);function o(e){return!!(e&&e instanceof Object&&(0,n.isFunction)(e.constructor)&&e.isView)}},18303:function(e,t,i){"use strict";function n(e){return null==e}i.d(t,{isVoid:function(){return n}})},3513:function(e,t,i){"use strict";function n(e){return null!=e&&e===e.window}i.d(t,{isWindow:function(){return n}})},93387:function(e,t,i){"use strict";i.d(t,["colorToHex",0,e=>{if("rgba(0, 0, 0, 0)"===e||""===e)return!1;if(!e)return"#000000";if("#"===e.substr(0,1))return e;let t=/([\s\n\t\r]*?)rgb\((\d+), (\d+), (\d+)\)/.exec(e)||/([\s\n\t\r]*?)rgba\((\d+), (\d+), (\d+), ([\d.]+)\)/.exec(e);if(!t)return"#000000";let i=parseInt(t[2],10),n=parseInt(t[3],10),o=(parseInt(t[4],10)|n<<8|i<<16).toString(16).toUpperCase();for(;o.length<6;)o="0"+o;return t[1]+"#"+o}])},30893:function(e,t,i){"use strict";i.d(t,{applyStyles:function(){return h}});var n=i(81937),o=i(23211),r=i(81910),s=i(75480),a=i(4040),l=i(7909),u=i(80991),c=i(28723);function d(e){let t=e.split(";"),i=t.length-1;return t.filter((e,t)=>{let n=/^\s*([a-z-]{1,64})\s*:/i.exec(e);if(!n)return!0;let o=n[1].toLowerCase();return!(o.startsWith("mso-")||o.startsWith("border")&&t!==i)}).join(";").replace(/([0-9.]{1,32})(pt|cm)/gi,(e,t,i)=>{switch(i.toLowerCase()){case"pt":return(1.328*parseFloat(t)).toFixed(0)+"px";case"cm":return(.02645833*parseFloat(t)).toFixed(0)+"px"}return e})}function h(e){let t=(0,r.indexOfOpenTag)(e,"html");if(-1===t)return e;let i=(e=e.substring(t)).toLowerCase().lastIndexOf("</html>");-1!==i&&(e=e.substring(0,i+7));let h=n.globalDocument.createElement("iframe");(0,u.css)(h,"display","none"),o.Dom.append(n.globalDocument.body,h);let p="";try{let t=h.contentDocument||(h.contentWindow?h.contentWindow.document:null);if(t){t.open(),t.write(e),t.close();let i=(0,s.readWordListItems)(t.body);o.Dom.each(t.body,e=>{o.Dom.isElement(e)&&/mso-list:\s*ignore/i.test((0,l.attr)(e,"style")||"")&&o.Dom.safeRemove(e)});try{for(let e=0;e<t.styleSheets.length;e+=1){let i=t.styleSheets[e].cssRules;for(let e=0;e<i.length;e+=1)""!==i[e].selectorText&&(0,c.$$)(i[e].selectorText,t.body).forEach(t=>{t.style.cssText=d(i[e].style.cssText+";"+t.style.cssText)})}}catch(e){if(!n.IS_PROD)throw e}(0,s.wrapWordListItems)(i),o.Dom.each(t.body,e=>{if(o.Dom.isElement(e)){let t=(0,l.attr)(e,"style");t&&(e.style.cssText=d(t)),(0,l.attr)(e,"style")||(0,l.attr)(e,"style",null)}}),p=t.firstChild?(0,a.trim)(t.body.innerHTML):""}}catch{}finally{o.Dom.safeRemove(h)}return p&&(e=p),(0,a.trim)((0,r.removeWordWrappers)(e))}},1277:function(e,t,i){"use strict";i.d(t,{cleanFromWord:function(){return c}});var n=i(81937),o=i(23211),r=i(88475),s=i(81910),a=i(75480),l=i(4040),u=i(7909);function c(e){-1!==e.indexOf("<html ")&&(e=(e=e.substring(e.indexOf("<html "),e.length)).substring(0,e.lastIndexOf("</html>")+7));let t="";try{let i=n.globalDocument.createElement("div");i.innerHTML=e;let s=[],l=(0,a.readWordListItems)(i);i.firstChild&&o.Dom.each(i,e=>{if(e)switch(e.nodeType){case Node.ELEMENT_NODE:switch(e.nodeName){case"STYLE":case"LINK":case"META":s.push(e);break;case"W:SDT":case"W:SDTPR":case"FONT":o.Dom.unwrap(e);break;default:if(/mso-list:\s*ignore/i.test((0,u.attr)(e,"style")||"")){s.push(e);break}(0,r.toArray)(e.attributes).forEach(t=>{-1===["src","href","rel","content"].indexOf(t.name.toLowerCase())&&(0,u.attrRaw)(e,t.name,null)})}break;case Node.TEXT_NODE:break;default:s.push(e)}}),o.Dom.safeRemove.apply(null,s),(0,a.wrapWordListItems)(l),t=i.innerHTML}catch(e){}return t&&(e=t),e=e.split(/(\n)/).filter(l.trim).join(`
9
+ `,{group:"state",buttons:[]},{group:"clipboard",buttons:[]},{group:"insert",buttons:[]},{group:"indent",buttons:[]},{group:"color",buttons:[]},{group:"form",buttons:[]},"---",{group:"history",buttons:[]},{group:"search",buttons:[]},{group:"source",buttons:[]},{group:"other",buttons:[]},{group:"info",buttons:[]}]),(0,n._)(this,"controls",void 0),(0,n._)(this,"events",{}),(0,n._)(this,"textIcons",!1),(0,n._)(this,"popupRoot",null),(0,n._)(this,"showBrowserColorPicker",!0),Object.assign(this,r)}}(0,n._)(s,"__defaultOptions",void 0),r=s.prototype,s.prototype.controls={}},24735:function(e,t,i){"use strict";i.d(t,{Async:function(){return f}});var n=i(25045),o=i(81937),r=i(61077),s=i(72068),a=i(91565),l=i(72412),u=i(62101),c=i(52100),d=i(85932),h=i(18303),p=i(28712),m=i(14228);class f{delay(e){return this.promise(t=>this.setTimeout(t,e))}setTimeout(e,t,...i){if(this.isDestructed)return 0;let n={};(0,h.isVoid)(t)&&(t=0),(0,l.isNumber)(t)||(t=(n=t).timeout||0),n.label&&this.clearLabel(n.label);let o=(0,r.setTimeout)(e,t,...i),s=n.label||o;return this.timers.set(s,o),this.__callbacks.set(s,e),o}updateTimeout(e,t){if((0,p.assert)(e&&this.timers.has(e),"Label does not exist"),!e||!this.timers.has(e))return null;let i=this.__callbacks.get(e);return(0,p.assert)((0,a.isFunction)(i),"Callback is not a function"),this.setTimeout(i,{label:e,timeout:t})}clearLabel(e){e&&this.timers.has(e)&&((0,r.clearTimeout)(this.timers.get(e)),this.timers.delete(e),this.__callbacks.delete(e))}clearTimeout(e){if((0,d.isString)(e))return this.clearLabel(e);(0,r.clearTimeout)(e),this.timers.delete(e),this.__callbacks.delete(e)}debounce(e,t,i=!1){let n=0,o=!1,l=[],d=(...t)=>{if(!o){n=0;let i=e(...t);if(o=!0,l.length){let e=()=>{l.forEach(e=>e()),l.length=0};(0,c.isPromise)(i)?i.finally(e):e()}}},h=(...s)=>{o=!1,t?(!n&&i&&d(...s),(0,r.clearTimeout)(n),n=this.setTimeout(()=>d(...s),(0,a.isFunction)(t)?t():t),this.timers.set(e,n)):d(...s)};return(0,u.isPlainObject)(t)&&t.promisify?(...e)=>{let t=this.promise(e=>{l.push(e)}).catch(e=>{if((0,s.isAbortError)(e))return null;throw e});return h(...e),t}:h}microDebounce(e,t=!1){let i,n=!1,o=!0;return(...r)=>{if(i=r,n){o=!0;return}o=!0,t&&(o=!1,e(...i)),n=!0,this.__queueMicrotaskNative(()=>{n=!1,!this.isDestructed&&o&&e(...i)})}}throttle(e,t,i=!1){let n=null,o,r,s;return(...i)=>{(o=!0,s=i,t)?n||(r=()=>{o?(e(...s),o=!1,n=this.setTimeout(r,(0,a.isFunction)(t)?t():t),this.timers.set(r,n)):n=null})():e(...s)}}promise(e){let t=()=>{},i=new Promise((i,n)=>{t=()=>n((0,m.abort)("Abort async")),this.promisesRejections.add(t),e(i,n)});return!i.finally&&"u">typeof process&&!o.IS_ES_NEXT&&(i.finally=e=>(i.then(e).catch(e),i)),i.finally(()=>{this.promisesRejections.delete(t)}).catch(()=>null),i.rejectCallback=t,i}promiseState(e){if(e.status)return e.status;if(!Promise.race)return new Promise(t=>{e.then(e=>(t("fulfilled"),e),e=>{throw t("rejected"),e}),this.setTimeout(()=>{t("pending")},100)});let t={};return Promise.race([e,t]).then(e=>e===t?"pending":"fulfilled",()=>"rejected")}requestIdleCallback(e,t={timeout:100}){let i=this.__requestIdleCallbackNative(e,t);return this.__requestsIdle.add(i),i}requestIdlePromise(e){return this.promise(t=>{let i=this.requestIdleCallback(()=>t(i),e)})}schedulerPostTask(e,t={delay:0,priority:"user-visible"}){let i=new AbortController;if(t.signal&&t.signal.addEventListener("abort",()=>i.abort()),this.__controllers.add(i),void 0!==globalThis.scheduler){let n=globalThis.scheduler.postTask(e,{...t,signal:i.signal});return n.finally(()=>{this.__controllers.delete(i)}).catch(()=>null),n}return this.promise((n,o)=>{let r=this.setTimeout(()=>{try{n(e())}catch(e){o(e)}this.__controllers.delete(i)},t.delay||1);i.signal.addEventListener("abort",()=>{this.clearTimeout(r),this.__controllers.delete(i),o((0,m.abort)())})})}schedulerYield(){return this.schedulerPostTask(()=>{},{priority:"user-visible"})}cancelIdleCallback(e){return this.__requestsIdle.delete(e),this.__cancelIdleCallbackNative(e)}requestAnimationFrame(e){let t=requestAnimationFrame(e);return this.__requestsRaf.add(t),t}cancelAnimationFrame(e){this.__requestsRaf.delete(e),cancelAnimationFrame(e)}clear(){this.__requestsIdle.forEach(e=>this.cancelIdleCallback(e)),this.__requestsRaf.forEach(e=>this.cancelAnimationFrame(e)),this.__controllers.forEach(e=>e.abort()),this.timers.forEach(e=>(0,r.clearTimeout)(e)),this.timers.clear(),this.promisesRejections.forEach(e=>e()),this.promisesRejections.clear()}destruct(){this.clear(),this.isDestructed=!0}constructor(){(0,n._)(this,"timers",new Map),(0,n._)(this,"__callbacks",new Map),(0,n._)(this,"__queueMicrotaskNative",queueMicrotask?.bind(window)??Promise.resolve().then.bind(Promise.resolve())),(0,n._)(this,"promisesRejections",new Set),(0,n._)(this,"__requestsIdle",new Set),(0,n._)(this,"__controllers",new Set),(0,n._)(this,"__requestsRaf",new Set),(0,n._)(this,"__requestIdleCallbackNative",window.requestIdleCallback?.bind(window)??((e,t)=>{let i=Date.now();return this.setTimeout(()=>{e({didTimeout:!1,timeRemaining:()=>Math.max(0,50-(Date.now()-i))})},t?.timeout??1)})),(0,n._)(this,"__cancelIdleCallbackNative",window.cancelIdleCallback?.bind(window)??(e=>{this.clearTimeout(e)})),(0,n._)(this,"isDestructed",!1)}}},91231:function(e,t,i){"use strict";i.d(t,{Async:function(){return n.Async}});var n=i(24735)},80251:function(e,t,i){"use strict";i.d(t,{Component:function(){return u}});var n=i(25045),o=i(91231),r=i(69364),s=i(28077),a=i(65946);let l=new Map;class u{get componentName(){return this.__componentName||(this.__componentName="jodit-"+(0,a.kebabCase)(((0,a.isFunction)(this.className)?this.className():"")||(0,a.getClassName)(this))),this.__componentName}getFullElName(e,t,i){let n=[this.componentName];return e&&n.push("__"+(e=e.replace(/[^a-z0-9-]/gi,"-"))),t&&(n.push("_",t),n.push("_",(0,a.isVoid)(i)?"true":i.toString())),n.join("")}get ownerDocument(){return this.ow.document}get od(){return this.ownerDocument}get ow(){return this.ownerWindow}get(e,t){return(0,a.get)(e,t||this)}get isReady(){return this.componentStatus===r.STATUSES.ready}get isDestructed(){return this.componentStatus===r.STATUSES.destructed}get isInDestruct(){return r.STATUSES.beforeDestruct===this.componentStatus||r.STATUSES.destructed===this.componentStatus}bindDestruct(e){return e.hookStatus(r.STATUSES.beforeDestruct,()=>!this.isInDestruct&&this.destruct()),this}destruct(){this.setStatus(r.STATUSES.destructed),this.async&&(this.async.destruct(),this.async=void 0),l.get(this)&&l.delete(this),this.ownerWindow=void 0}get componentStatus(){return this.__componentStatus}set componentStatus(e){this.setStatus(e)}setStatus(e){return this.setStatusComponent(e,this)}setStatusComponent(e,t){if(e===this.__componentStatus)return;t===this&&(this.__componentStatus=e);let i=Object.getPrototypeOf(this);i&&(0,a.isFunction)(i.setStatusComponent)&&i.setStatusComponent(e,t);let n=l.get(this),o=n?.[e];o&&o.length&&o.forEach(e=>e(t))}hookStatus(e,t){let i=l.get(this);i||(i={},l.set(this,i)),i[e]||(i[e]=[]),i[e].push(t)}static isInstanceOf(e,t){return e instanceof t}constructor(){(0,n._)(this,"__componentName",void 0),(0,n._)(this,"async",new o.Async),(0,n._)(this,"uid",void 0),(0,n._)(this,"ownerWindow",window),(0,n._)(this,"__componentStatus",r.STATUSES.beforeInit),this.uid="jodit-uid-"+(0,s.uniqueUid)()}}(0,n._)(u,"STATUSES",r.STATUSES)},16964:function(e,t,i){"use strict";i.d(t,{Component:function(){return n.Component},STATUSES:function(){return o.STATUSES},ViewComponent:function(){return r.ViewComponent}});var n=i(80251),o=i(69364),r=i(59609)},69364:function(e,t,i){"use strict";i.d(t,["STATUSES",0,{beforeInit:"beforeInit",ready:"ready",beforeDestruct:"beforeDestruct",destructed:"destructed"}])},59609:function(e,t,i){"use strict";i.d(t,{ViewComponent:function(){return r}});var n=i(25045),o=i(80251);class r extends o.Component{get j(){return this.jodit}get defaultTimeout(){return this.j.defaultTimeout}i18n(e,...t){return this.j.i18n(e,...t)}setParentView(e){return this.jodit=e,e.ow&&(this.ownerWindow=e.ow),e.components.add(this),this}destruct(){return this.j.components.delete(this),super.destruct()}constructor(e){super(),(0,n._)(this,"jodit",void 0),this.setParentView(e)}}},81937:function(e,t,i){"use strict";i.r(t),i.d(t,{IS_TEST:function(){return n}});let n=!1,o="u">typeof window?window:void 0,r="u">typeof document?document:void 0,s=new Set(["ul","ol"]),a=["img","video","svg","iframe","script","input","textarea","link","jodit","jodit-media"],l=new Set([...a,"br","hr"]),u=new Set(a),c="Meta",d="Backspace",h="Enter",p="Escape",m="ArrowLeft",f="ArrowUp",g="ArrowRight",_="ArrowDown",v="Delete",b=[c,d,v,f,_,g,m,h,p,"F3","Tab"],y="u">typeof navigator&&(-1!==navigator.userAgent.indexOf("MSIE")||/rv:11.0/i.test(navigator.userAgent)),w=void 0!==o&&/Mac|iPod|iPhone|iPad/.test(o.navigator.platform),k=e=>{let t=e.split("/");return/\.js/.test(t[t.length-1])?{basePath:t.slice(0,t.length-1).join("/")+"/",isMin:!0}:{basePath:e,isMin:!0}},{basePath:S,isMin:C}=(()=>{if("u"<typeof document)return{basePath:"",isMin:!0};let e=r.currentScript;if(e)return k(e.src);let t=r.querySelectorAll("script[src]");return t&&t.length?k(t[t.length-1].src):k(o.location.href)})(),E=new Set(["touchstart","touchend","scroll","mousewheel","mousemove","touchmove"]);i.d(t,["ACCURACY",0,10,"APP_VERSION",0,"4.20.3","BASE_PATH",0,S,"BASE_PATH_IS_MIN",0,C,"BR",0,"br","CLIPBOARD_ID",0,"clipboard","COMMAND_KEYS",0,b,"EMULATE_DBLCLICK_TIMEOUT",0,300,"ERROR_CODE_CONFLICT",0,409,"ES",0,"es2021","FAT_MODE",0,!1,"HOMEPAGE",0,"https://xdsoft.net/jodit/","INSEPARABLE_TAGS",0,l,"INSERT_AS_HTML",0,"insert_as_html","INSERT_AS_TEXT",0,"insert_as_text","INSERT_CLEAR_HTML",0,"insert_clear_html","INSERT_ONLY_TEXT",0,"insert_only_text","INVISIBLE_SPACE",0,"\uFEFF","INVISIBLE_SPACE_REG_EXP",0,()=>/[\uFEFF]/g,"INVISIBLE_SPACE_REG_EXP_END",0,()=>/[\uFEFF]+$/g,"INVISIBLE_SPACE_REG_EXP_START",0,()=>/^[\uFEFF]+/g,"IS_BLOCK",0,/^(ADDRESS|ARTICLE|ASIDE|BLOCKQUOTE|CANVAS|DD|DFN|DIV|DL|DT|FIELDSET|FIGCAPTION|FIGURE|FOOTER|FORM|H[1-6]|HEADER|HGROUP|HR|LI|MAIN|NAV|NOSCRIPT|OUTPUT|P|PRE|RUBY|SCRIPT|STYLE|OBJECT|OL|SECTION|IFRAME|JODIT|JODIT-MEDIA|UL|TR|TD|TH|TBODY|THEAD|TFOOT|TABLE|BODY|HTML|VIDEO)$/i,"IS_ES_MODERN",0,!0,"IS_ES_NEXT",0,!0,"IS_IE",0,y,"IS_INLINE",0,/^(STRONG|SPAN|I|EM|B|SUP|SUB|A|U)$/i,"IS_MAC",0,w,"IS_PROD",0,!0,"KEY_ALIASES",0,{add:"+",break:"pause",cmd:"meta",command:"meta",ctl:"control",ctrl:"control",del:"delete",down:"arrowdown",esc:"escape",ins:"insert",left:"arrowleft",mod:w?"meta":"control",opt:"alt",option:"alt",return:"enter",right:"arrowright",space:"space",spacebar:"space",up:"arrowup",win:"meta",windows:"meta"},"KEY_ALT",0,"Alt","KEY_BACKSPACE",0,d,"KEY_DELETE",0,v,"KEY_DOWN",0,_,"KEY_END",0,"End","KEY_ENTER",0,h,"KEY_ESC",0,p,"KEY_F3",0,"F3","KEY_HOME",0,"Home","KEY_LEFT",0,m,"KEY_META",0,c,"KEY_RIGHT",0,g,"KEY_SPACE",0,"Space","KEY_TAB",0,"Tab","KEY_UP",0,f,"LIST_TAGS",0,s,"MARKER_CLASS",0,"jodit-selection_marker","MODE_SOURCE",0,2,"MODE_SPLIT",0,3,"MODE_WYSIWYG",0,1,"NBSP_SPACE",0," ","NEARBY",0,5,"NO_EMPTY_TAGS",0,u,"PARAGRAPH",0,"p","PASSIVE_EVENTS",0,E,"SAFE_COUNT_CHANGE_CALL",0,10,"SET_TEST",0,()=>n=!0,"SOURCE_CONSUMER",0,"source-consumer","SPACE_REG_EXP",0,()=>/[\s\n\t\r\uFEFF\u200b]+/g,"SPACE_REG_EXP_END",0,()=>/[\s\n\t\r\uFEFF\u200b]+$/g,"SPACE_REG_EXP_START",0,()=>/^[\s\n\t\r\uFEFF\u200b]+/g,"TEMP_ATTR",0,"data-jodit-temp","TEXT_HTML",0,y?"html":"text/html","TEXT_PLAIN",0,y?"text":"text/plain","TEXT_RTF",0,y?"rtf":"text/rtf","TOKENS",0,{},"globalDocument",0,r,"globalWindow",0,o,"lang",0,{}])},76517:function(e,t,i){"use strict";i.d(t,{Create:function(){return l}});var n=i(25045),o=i(81937),r=i(23211),s=i(65946),a=i(28712);class l{get doc(){return(0,s.isFunction)(this.document)?this.document():this.document}element(e,t,i){let n=this.doc.createElement(e.toLowerCase());return this.applyCreateAttributes(n),t&&((0,s.isPlainObject)(t)?(0,s.attr)(n,t):i=t),i&&(0,s.asArray)(i).forEach(e=>r.Dom.append(n,(0,s.isString)(e)?this.fromHTML(e):e)),n}div(e,t,i){let n=this.element("div",t,i);return e&&(n.className=e),n}sandbox(){let e=this.element("iframe",{sandbox:"allow-same-origin"});r.Dom.append(this.doc.body,e);let t=e.contentWindow?.document;if((0,a.assert)(t,"iframe.contentWindow.document"),!t)throw Error("Iframe error");return t.open(),t.write("<!DOCTYPE html><html><head></head><body></body></html>"),t.close(),[t.body,e]}span(e,t,i){let n=this.element("span",t,i);return e&&(n.className=e),n}a(e,t,i){let n=this.element("a",t,i);return e&&(n.className=e),n}text(e){return this.doc.createTextNode(e)}fake(){return this.text(o.INVISIBLE_SPACE)}fragment(){return this.doc.createDocumentFragment()}fromHTML(e,t){let i=this.div();i.innerHTML=e.toString();let n=i.firstChild===i.lastChild&&i.firstChild?i.firstChild:i;if(r.Dom.safeRemove(n),t){let e=(0,s.refs)(n);Object.keys(t).forEach(i=>{let n=e[i];n&&!1===t[i]&&r.Dom.hide(n)})}return n}applyCreateAttributes(e){if(this.createAttributes){let t=this.createAttributes;if(t&&t[e.tagName.toLowerCase()]){let i=t[e.tagName.toLowerCase()];(0,s.isFunction)(i)?i(e):(0,s.isPlainObject)(i)&&(0,s.attr)(e,i)}}}constructor(e,t){(0,n._)(this,"document",void 0),(0,n._)(this,"createAttributes",void 0),this.document=e,this.createAttributes=t}}},79821:function(e,t,i){"use strict";i.d(t,{Create:function(){return n.Create}});var n=i(76517)},49574:function(e,t,i){"use strict";i.d(t,{autobind:function(){return o}});var n=i(91565);function o(e,t,i){if(!(0,n.isFunction)(i.value))throw TypeError(`@autobind can only be applied to methods, but "${t}" is not a function`);let o=i.value;return{configurable:!0,get(){let e=o.bind(this);return Object.defineProperty(this,t,{value:e,configurable:!0,writable:!0}),e}}}},51676:function(e,t,i){"use strict";i.d(t,{cache:function(){return l},cacheHTML:function(){return u},cached:function(){return a}});var n=i(69364),o=i(23211),r=i(28686),s=i(38027);function a(e,t){let i=Object.getOwnPropertyDescriptor(e,t);return!i||(0,r.isFunction)(i.get)?null:i.value}function l(e,t,i){let n=i.get;if(!n)throw(0,s.error)("Getter property descriptor expected");i.get=function(){let e=n.call(this);return e&&!0===e.noCache||Object.defineProperty(this,t,{configurable:i.configurable,enumerable:i.enumerable,writable:!1,value:e}),e}}function u(e,t,i){let a=i.value;if(!(0,r.isFunction)(a))throw(0,s.error)("Handler must be a Function");let l=!0,u=new WeakMap;i.value=function(...e){let t=this.od??document,i=u.get(t);if(l&&i?.has(this.constructor))return i.get(this.constructor)?.cloneNode(!0);let n=a.apply(this,e);return l&&o.Dom.isElement(n)&&(i?i.set(this.constructor,n):u.set(t,new WeakMap([[this.constructor,n]]))),l?n.cloneNode(!0):n},e.hookStatus(n.STATUSES.ready,e=>{l=!!((0,r.isViewObject)(e)?e:e.jodit).options.cache})}},91672:function(e,t,i){"use strict";i.d(t,{component:function(){return l},getComponentClass:function(){return u}});var n=i(81937),o=i(421);let r=new Map,s=new WeakSet,a=new WeakSet;function l(e){class t extends e{constructor(...e){super(...e),this.constructor===t?(this instanceof t||Object.setPrototypeOf(this,t.prototype),this.setStatus("ready")):n.IS_PROD||s.has(this.constructor)||a.has(this.constructor)||a.add(this.constructor)}}s.add(e),s.add(t);let i=(0,o.getClassName)(e.prototype);if(r.has(i)&&!n.IS_PROD)throw Error(`Component with name "${i}" is already registered`);return r.set(i,t),t}function u(e){return r.get(e)}},55184:function(e,t,i){"use strict";i.d(t,{debounce:function(){return a},throttle:function(){return l}});var n=i(16964),o=i(28686),r=i(28712),s=i(33201);function a(e,t=!1,i="debounce"){return(a,l)=>{let u=a[l];if(!(0,o.isFunction)(u))throw(0,s.error)("Handler must be a Function");return a.hookStatus(n.STATUSES.ready,n=>{let{async:s}=n;(0,r.assert)(null!=s,`Component ${n.componentName||n.constructor.name} should have "async:IAsync" field`);let a=(0,o.isFunction)(e)?e(n):e,u=(0,o.isNumber)(a)||(0,o.isPlainObject)(a)?a:n.defaultTimeout;Object.defineProperty(n,l,{configurable:!0,value:s[i](n[l].bind(n),u,t)})}),{configurable:!0,get(){return u.bind(this)}}}}function l(e,t=!1){return a(e,t,"throttle")}},24968:function(e,t,i){"use strict";i.d(t,{derive:function(){return o}});var n=i(91565);function o(...e){return t=>{let i=t.prototype;for(let t=0;t<e.length;t++){let o=e[t],r=Object.getOwnPropertyNames(o.prototype);for(let e=0;e<r.length;e++){let t=r[e],s=Object.getOwnPropertyDescriptor(o.prototype,t);null!=s&&(0,n.isFunction)(s.value)&&!(0,n.isFunction)(i[t])&&Object.defineProperty(i,t,{enumerable:!0,configurable:!0,writable:!0,value:function(...e){return s.value.call(this,...e)}})}}}}},29200:function(e,t,i){"use strict";i.d(t,{hook:function(){return r}});var n=i(91565),o=i(33201);function r(e){return(t,i)=>{if(!(0,n.isFunction)(t[i]))throw(0,o.error)("Handler must be a Function");t.hookStatus(e,e=>{e[i].call(e)})}}},35718:function(e,t,i){"use strict";i.d(t,{idle:function(){return s}});var n=i(16964),o=i(91565),r=i(33201);function s(){return(e,t)=>{if(!(0,o.isFunction)(e[t]))throw(0,r.error)("Handler must be a Function");e.hookStatus(n.STATUSES.ready,e=>{let{async:i}=e,n=e[t];e[t]=(...t)=>i.requestIdleCallback(n.bind(e,...t))})}}},84839:function(e,t,i){"use strict";i.r(t),i.d(t,{autobind:function(){return n.autobind},cache:function(){return o.cache},cacheHTML:function(){return o.cacheHTML},cached:function(){return o.cached},component:function(){return r.component},debounce:function(){return s.debounce},derive:function(){return a.derive},getComponentClass:function(){return r.getComponentClass},hook:function(){return l.hook},idle:function(){return u.idle},nonenumerable:function(){return c.nonenumerable},persistent:function(){return d.persistent},throttle:function(){return s.throttle},wait:function(){return h.wait},watch:function(){return p.watch}});var n=i(49574),o=i(51676),r=i(91672),s=i(55184),a=i(24968),l=i(29200),u=i(35718),c=i(41360),d=i(77036),h=i(80840),p=i(68616)},41360:function(e,t,i){"use strict";i.d(t,["nonenumerable",0,(e,t)=>{!1!==(Object.getOwnPropertyDescriptor(e,t)||{}).enumerable&&Object.defineProperty(e,t,{enumerable:!1,set(e){Object.defineProperty(this,t,{enumerable:!1,writable:!0,value:e})}})}])},77036:function(e,t,i){"use strict";i.d(t,{persistent:function(){return r}});var n=i(69364),o=i(31534);function r(e,t){e.hookStatus(n.STATUSES.ready,e=>{let i=(0,o.isViewObject)(e)?e:e.jodit,n=`${i.options.namespace}${e.componentName}_prop_${t}`,r=e[t];Object.defineProperty(e,t,{get:()=>i.storage.get(n)??r,set(e){i.storage.set(n,e)}})})}},80840:function(e,t,i){"use strict";i.d(t,{wait:function(){return s}});var n=i(69364),o=i(91565),r=i(33201);function s(e){return(t,i)=>{let s=t[i];if(!(0,o.isFunction)(s))throw(0,r.error)("Handler must be a Function");t.hookStatus(n.STATUSES.ready,t=>{let{async:n}=t,o=t[i],r=0;Object.defineProperty(t,i,{configurable:!0,value:function i(...s){n.clearTimeout(r),e(t)?o.apply(t,s):r=n.setTimeout(()=>i(...s),10)}})})}}},68616:function(e,t,i){"use strict";i.d(t,{watch:function(){return d}});var n=i(69364),o=i(70535),r=i(32328),s=i(91565),a=i(62101),l=i(31534),u=i(33201),c=i(71125);function d(e,t){return(i,d)=>{if(!(0,s.isFunction)(i[d]))throw(0,u.error)("Handler must be a Function");let h=t?.immediately??!0,p=t?.context,m=t=>{let n=(0,l.isViewObject)(t)?t:t.jodit,u=(e,...i)=>{if(!t.isInDestruct)return t[d](e,...i)};h||(u=t.async.microDebounce(u,!0)),(0,r.splitArray)(e).forEach(e=>{if(/:/.test(e)){let[i,o]=e.split(":"),r=p;i.length&&(r=t.get(i)),(0,s.isFunction)(r)&&(r=r(t)),n.events.on(r||t,o,u),r||n.events.on(o,u),t.hookStatus("beforeDestruct",()=>{n.events.off(r||t,o,u).off(o,u)});return}let r=e.split("."),[l]=r,d=r.slice(1),h=t[l];(0,a.isPlainObject)(h)&&(0,o.observable)(h).on("change."+d.join("."),u);let m=(0,c.getPropertyDescriptor)(i,l);Object.defineProperty(t,l,{configurable:!0,set(e){let i=h;i!==e&&(h=e,m&&m.set&&m.set.call(t,e),(0,a.isPlainObject)(h)&&(h=(0,o.observable)(h)).on("change."+d.join("."),u),u(l,i,h))},get:()=>m&&m.get?m.get.call(t):h})})};(0,s.isFunction)(i.hookStatus)?i.hookStatus(n.STATUSES.ready,m):m(i)}}},23211:function(e,t,i){"use strict";i.d(t,{Dom:function(){return b}});var n=i(81937),o=i(88475),r=i(17312),s=i(91565),a=i(46248),l=i(3213),u=i(85932),c=i(18303),d=i(81910),h=i(4040),p=i(28712),m=i(7909),f=i(80991),g=i(36400),_=i(33201),v=i(71125);class b{static detach(e){for(;e&&e.firstChild;)e.removeChild(e.firstChild)}static wrapNextInline(e,t,i){let n,o,r=e;i.s.save();do o=!1,(n=r.nextSibling)&&!b.isBlock(n)&&!b.isTag(n,"br")&&(o=!0,r=n);while(o)return b.__wrapElements(t,i,e,r)}static __wrapElements(e,t,i,n){let o=(0,u.isString)(e)?t.createInside.element(e):e;i.parentNode&&i.parentNode.insertBefore(o,i);let r=i;for(;r&&(r=i.nextSibling,o.appendChild(i),i!==n&&r);)i=r;return t.s.restore(),o}static wrapInline(e,t,i){let n,o,r=e,s=e;i.s.save();do o=!1,(n=r.previousSibling)&&!b.isBlock(n)&&(o=!0,r=n);while(o)do o=!1,(n=s.nextSibling)&&!b.isBlock(n)&&(o=!0,s=n);while(o)return b.__wrapElements(t,i,r,s)}static wrap(e,t,i){let n=(0,u.isString)(t)?i.element(t):t;if(b.isNode(e)){if(!e.parentNode)throw(0,_.error)("Element should be in DOM");e.parentNode.insertBefore(n,e),n.appendChild(e)}else{let t=e.extractContents();e.insertNode(n),n.appendChild(t)}return n}static unwrap(e){let t=e.parentNode;if(t){for(;e.firstChild;)t.insertBefore(e.firstChild,e);b.safeRemove(e)}}static between(e,t,i){let n=e;for(;n&&n!==t&&!(e!==n&&i(n));){let e=n.firstChild||n.nextSibling;if(!e){for(;n&&!n.nextSibling;)if((n=n.parentNode)===t)return;e=n?.nextSibling}n=e}}static replace(e,t,i,n=!1,r=!1){let s;if((0,a.isHTML)(t)&&((0,p.assert)(i,"Need create instance for new tag"),t=i.fromHTML(t)),(0,u.isString)(t)?((0,p.assert)(i,"Need create instance for new tag"),s=i.element(t)):s=t,!r)for(;e.firstChild;)s.appendChild(e.firstChild);return n&&b.isElement(e)&&b.isElement(s)&&(0,o.toArray)(e.attributes).forEach(e=>{s.setAttribute(e.name,e.value)}),e.parentNode&&e.parentNode.replaceChild(s,e),s}static isEmptyTextNode(e){return b.isText(e)&&(!e.nodeValue||0===e.nodeValue.replace(n.INVISIBLE_SPACE_REG_EXP(),"").trim().length)}static isEmptyContent(e){return b.each(e,e=>b.isEmptyTextNode(e))}static isContentEditable(e,t){let i=b.closest(e,e=>b.isElement(e)&&e.hasAttribute("contenteditable"),t);return b.isNode(e)&&i?.getAttribute("contenteditable")!=="false"}static isEmpty(e,t=n.NO_EMPTY_TAGS){let i;if(!e)return!0;i=(0,s.isFunction)(t)?t:e=>t.has(e.nodeName.toLowerCase());let o=e=>null==e.nodeValue||0===(0,h.trim)(e.nodeValue).length;return b.isText(e)?o(e):!(b.isElement(e)&&i(e))&&b.each(e,e=>{if(b.isText(e)&&!o(e)||b.isElement(e)&&i(e))return!1})}static isNode(e){return!!(e&&(0,u.isString)(e.nodeName)&&"number"==typeof e.nodeType&&e.childNodes&&(0,s.isFunction)(e.appendChild))}static isCell(e){return b.isNode(e)&&("TD"===e.nodeName||"TH"===e.nodeName)}static isList(e){return b.isTag(e,n.LIST_TAGS)}static isLeaf(e){return b.isTag(e,"li")}static isImage(e){return b.isNode(e)&&/^(img|svg|picture|canvas)$/i.test(e.nodeName)}static isBlock(e){return!(0,c.isVoid)(e)&&"object"==typeof e&&b.isNode(e)&&n.IS_BLOCK.test(e.nodeName)}static isText(e){return!!(e&&e.nodeType===Node.TEXT_NODE)}static isComment(e){return!!(e&&e.nodeType===Node.COMMENT_NODE)}static isElement(e){return!!b.isNode(e)&&e.nodeType===Node.ELEMENT_NODE}static isFragment(e){return!!b.isNode(e)&&e.nodeType===Node.DOCUMENT_FRAGMENT_NODE}static isHTMLElement(e){if(!b.isNode(e))return!1;let t=e.ownerDocument?.defaultView;return e instanceof(t?t.HTMLElement:HTMLElement)}static isInlineBlock(e){return b.isElement(e)&&!/^(BR|HR)$/i.test(e.tagName)&&-1!==["inline","inline-block"].indexOf((0,f.css)(e,"display").toString())}static canSplitBlock(e){return!(0,c.isVoid)(e)&&b.isHTMLElement(e)&&b.isBlock(e)&&!/^(TD|TH|CAPTION|FORM)$/.test(e.nodeName)&&void 0!==e.style&&!/^(fixed|absolute)/i.test(e.style.position)}static first(e,t){return b.__deepMost(e,t,!1)}static last(e,t){return b.__deepMost(e,t,!0)}static __deepMost(e,t,i){let n=i?"lastChild":"firstChild",o=i?"previousSibling":"nextSibling",r=e?.[n];if(!r)return null;do{if(t(r))return r;let i=r[n]||r[o];if(!i&&r.parentNode!==e){do r=r.parentNode;while(r&&!r[o]&&r.parentNode!==e)i=r?.[o]}r=i}while(r)return null}static prev(e,t,i,n=!0){return b.find(e,t,i,!1,n)}static next(e,t,i,n=!0){return b.find(e,t,i,!0,n)}static prevWithClass(e,t){return b.__siblingWithClass(e,t,!0)}static nextWithClass(e,t){return b.__siblingWithClass(e,t,!1)}static __siblingWithClass(e,t,i){let n=e=>b.isElement(e)&&e.classList.contains(t),o=e.parentNode;return i?b.prev(e,n,o):b.next(e,n,o)}static find(e,t,i,n=!0,o=!0){let r=this.nextGen(e,i,n,o),s=r.next();for(;!s.done;){if(t(s.value))return s.value;s=r.next()}return null}static*nextGen(e,t,i=!0,n=!0){let o=[],r=e;do{let t=i?r.nextSibling:r.previousSibling;for(;t;)o.push(t),t=i?t.nextSibling:t.previousSibling;o.reverse(),yield*this.runInStack(e,o,i,n),r=r.parentNode}while(r&&r!==t)return null}static each(e,t,i=!0){let n=this.eachGen(e,i),o=n.next();for(;!o.done;){if(!1===t(o.value))return!1;o=n.next()}return!0}static eachGen(e,t=!0){return this.runInStack(e,[e],t)}static*runInStack(e,t,i,n=!0){for(;t.length;){let o=t.pop();if(n){let e=i?o.lastChild:o.firstChild;for(;e;)t.push(e),e=i?e.previousSibling:e.nextSibling}e!==o&&(yield o)}}static findWithCurrent(e,t,i,n="nextSibling",o="firstChild"){let r=e;do{if(t(r))return r||null;if(o&&r&&r[o]){let e=b.findWithCurrent(r[o],t,r,n,o);if(e)return e}for(;r&&!r[n]&&r!==i;)r=r.parentNode;r&&r[n]&&r!==i&&(r=r[n])}while(r&&r!==i)return null}static findSibling(e,t=!0,i=e=>!b.isEmptyTextNode(e)){let n=b.sibling(e,t);for(;n&&!i(n);)n=b.sibling(n,t);return n&&i(n)?n:null}static findNotEmptySibling(e,t){return b.findSibling(e,t,e=>!b.isEmptyTextNode(e)&&!!(!b.isText(e)||e.nodeValue?.length&&(0,h.trim)(e.nodeValue)))}static findNotEmptyNeighbor(e,t,i){return(0,v.call)(t?b.prev:b.next,e,e=>!!(e&&(!(b.isText(e)||b.isComment(e))||(0,h.trim)(e?.nodeValue||"").length)),i)}static sibling(e,t){return t?e.previousSibling:e.nextSibling}static up(e,t,i,n=!1){let o=e;if(!o)return null;do{if(t(o))return o;if(o===i||!o.parentNode)break;o=o.parentNode}while(o&&o!==i)return o===i&&n&&t(o)?o:null}static closest(e,t,i){let n,o=e=>e.toLowerCase();if((0,s.isFunction)(t))n=t;else if((0,r.isArray)(t)||(0,l.isSet)(t)){let e=(0,l.isSet)(t)?t:new Set(t.map(o));n=t=>!!(t&&e.has(o(t.nodeName)))}else n=e=>!!(e&&o(t)===o(e.nodeName));return b.up(e,n,i)}static furthest(e,t,i){let n=null,o=e?.parentElement;for(;o&&o!==i;)t(o)&&(n=o),o=o?.parentElement;return n}static appendChildFirst(e,t){e.firstChild!==t&&b.prepend(e,t)}static after(e,t){e.parentNode?.insertBefore(t,e.nextSibling)}static before(e,t){e.parentNode?.insertBefore(t,e)}static prepend(e,t){e.insertBefore(t,e.firstChild)}static append(e,t){(0,r.isArray)(t)?t.forEach(t=>{this.append(e,t)}):e.appendChild(t)}static moveContent(e,t,i=!1,r=()=>!0){let s=(e.ownerDocument||n.globalDocument).createDocumentFragment();(0,o.toArray)(e.childNodes).filter(e=>!!r(e)||(b.safeRemove(e),!1)).forEach(e=>{s.appendChild(e)}),t.insertBefore(s,i?t.firstChild:null)}static isOrContains(e,t,i=!1){return e===t?!i:!!(t&&e&&this.up(t,t=>t===e,e,!0))}static safeRemove(...e){e.forEach(e=>b.isNode(e)&&e.parentNode&&e.parentNode.removeChild(e))}static safeInsertNode(e,t){e.collapsed||e.deleteContents();let i=b.isFragment(t)?t.lastChild:t;e.startContainer===e.endContainer&&e.collapsed&&b.isTag(e.startContainer,n.INSEPARABLE_TAGS)?b.after(e.startContainer,t):(e.insertNode(t),i&&e.setStartBefore(i)),e.collapse(!0),[t.nextSibling,t.previousSibling].forEach(e=>b.isText(e)&&!e.nodeValue&&b.safeRemove(e))}static hide(e){e&&((0,g.dataBind)(e,"__old_display",e.style.getPropertyValue("display")),e.style.setProperty("display","none"))}static show(e){if(!e)return;let t=(0,g.dataBind)(e,"__old_display");"none"===e.style.getPropertyValue("display")&&e.style.setProperty("display",t||null)}static isTag(e,t){if(Array.isArray(t))throw TypeError("Dom.isTag does not support array");if(!this.isElement(e))return!1;let i=e.tagName.toLowerCase();return t instanceof Set?t.has(i)||t.has(e.tagName.toUpperCase()):i===t||e.tagName.toUpperCase()===t}static markTemporary(e,t){return t&&(0,m.attr)(e,t),(0,m.attr)(e,n.TEMP_ATTR,!0),e}static isTemporary(e){return!!b.isElement(e)&&(b.isMarker(e)||"true"===(0,m.attr)(e,n.TEMP_ATTR))}static isMarker(e){return b.isNode(e)&&b.isTag(e,"span")&&e.hasAttribute("data-"+n.MARKER_CLASS)}static replaceTemporaryFromString(e){return(0,d.unwrapMarkedTags)(e,null,n.TEMP_ATTR)}static temporaryList(e){let t=[];return b.each(e,e=>{b.isHTMLElement(e)&&e.hasAttribute(n.TEMP_ATTR)&&t.push(e)}),t}constructor(){throw Error("Dom is static module")}}},27795:function(e,t,i){"use strict";i.d(t,{Dom:function(){return n.Dom},LazyWalker:function(){return o.LazyWalker}});var n=i(23211),o=i(1080)},1080:function(e,t,i){"use strict";i.d(t,{LazyWalker:function(){return l}});var n=i(25045),o=i(62445),r=i(49574),s=i(23211),a=i(60216);class l extends a.Eventify{setWork(e){return this.isWorked?this.break():this.stop(),this.workNodes=s.Dom.eachGen(e,!this.options.reverse),this.isFinished=!1,this.hadAffect=!1,this._requestStarting(),this}_requestStarting(){this.__schedulerController=new AbortController,this.async.schedulerPostTask(this.__workPerform,{delay:this.options.timeout,signal:this.__schedulerController.signal}).catch(()=>null)}break(e){this.isWorked&&(this.stop(),this.emit("break",e))}end(){this.isWorked&&(this.stop(),this.emit("end",this.hadAffect),this.hadAffect=!1)}stop(){this.isWorked=!1,this.isFinished=!0,this.workNodes=null,this.__schedulerController?.abort(),this.__schedulerController=null}destruct(){super.destruct(),this.stop()}__workPerform(){if(this.workNodes){this.isWorked=!0;let e=0,t=this.options.timeoutChunkSize??50;for(;!this.isFinished&&e<t;){let t=this.workNodes.next();if(e+=1,this.visitNode(t.value)&&(this.hadAffect=!0),t.done)return void this.end()}}else this.end();this.isFinished||this._requestStarting()}visitNode(e){return!!e&&(void 0===this.options.whatToShow||e.nodeType===this.options.whatToShow)&&(this.emit("visit",e)??!1)}constructor(e,t={}){super(),(0,n._)(this,"async",void 0),(0,n._)(this,"options",void 0),(0,n._)(this,"workNodes",void 0),(0,n._)(this,"hadAffect",void 0),(0,n._)(this,"isWorked",void 0),(0,n._)(this,"isFinished",void 0),(0,n._)(this,"__schedulerController",void 0),this.async=e,this.options=t,this.workNodes=null,this.hadAffect=!1,this.isWorked=!1,this.isFinished=!1,this.__schedulerController=null}}(0,o._)([r.autobind],l.prototype,"__workPerform",null)},93747:function(e,t,i){"use strict";i.d(t,{EventEmitter:function(){return d}});var n=i(25045),o=i(81937),r=i(32328),s=i(17312),a=i(91565),l=i(85932),u=i(33201),c=i(18869);class d{mute(e){return this.__mutedEvents.add(e??"*"),this}isMuted(e){return!!(e&&this.__mutedEvents.has(e))||this.__mutedEvents.has("*")}unmute(e){return this.__mutedEvents.delete(e??"*"),this}__eachEvent(e,t){(0,r.splitArray)(e).map(e=>e.trim()).forEach(e=>{let i=e.split("."),n=i[1]||c.defaultNameSpace;t.call(this,i[0],n)})}__getStore(e){if(!e)throw(0,u.error)("Need subject");if(void 0===e[this.__key]){let t=new c.EventHandlersStore;Object.defineProperty(e,this.__key,{enumerable:!1,configurable:!0,writable:!0,value:t})}return e[this.__key]}__removeStoreFromSubject(e){void 0!==e[this.__key]&&delete e[this.__key]}__triggerNativeEvent(e,t){let i=this.__doc.createEvent("HTMLEvents");(0,l.isString)(t)?i.initEvent(t,!0,!0):(i.initEvent(t.type,t.bubbles,t.cancelable),["screenX","screenY","clientX","clientY","view","target","srcElement","currentTarget","timeStamp","which","keyCode"].forEach(e=>{Object.defineProperty(i,e,{value:t[e],enumerable:!0})}),Object.defineProperty(i,"originalEvent",{value:t,enumerable:!0})),e.dispatchEvent(i)}get current(){return this.currents[this.currents.length-1]}on(e,t,i,n){let r,c,d,p;if((0,l.isString)(e)||(0,l.isStringArray)(e)?(r=this,c=e,d=t,p=i):(r=e,c=t,d=i,p=n),!((0,l.isString)(c)||(0,l.isStringArray)(c))||0===c.length)throw(0,u.error)("Need events names");if(!(0,a.isFunction)(d))throw(0,u.error)("Need event handler");if((0,s.isArray)(r))return r.forEach(e=>{this.on(e,c,d,p)}),this;let m=r,f=this.__getStore(m),g=this,_=function(e,...t){if(!g.isMuted(e))return d&&d.call(this,...t)};return h(m)&&(_=function(e){if(!g.isMuted(e.type)&&(g.__prepareEvent(e),d&&!1===d.call(this,e)))return e.preventDefault(),e.stopImmediatePropagation(),!1}),this.__eachEvent(c,(e,t)=>{if(0===e.length)throw(0,u.error)("Need event name");if(!1===f.indexOf(e,t,d)){let i={event:e,originalCallback:d,syntheticCallback:_};if(f.set(e,t,i,p?.top),h(m)){let t=o.PASSIVE_EVENTS.has(e)?{passive:!0,capture:p?.capture??!1}:p?.capture??!1;_.options=t,m.addEventListener(e,_,t),this.__memoryDOMSubjectToHandler(m,_)}}}),this}__memoryDOMSubjectToHandler(e,t){let i=this.__domEventsMap.get(e)||new Set;i.add(t),this.__domEventsMap.set(e,i)}__unmemoryDOMSubjectToHandler(e,t){let i=this.__domEventsMap,n=i.get(e)||new Set;n.delete(t),n.size?i.set(e,n):i.delete(e)}one(e,t,i,n){let o,r,s,a;(0,l.isString)(e)||(0,l.isStringArray)(e)?(o=this,r=e,s=t,a=i):(o=e,r=t,s=i,a=n);let u=(...e)=>(this.off(o,r,u),s(...e));return this.on(o,r,u,a),this}off(e,t,i){let n,o,r;if((0,l.isString)(e)||(0,l.isStringArray)(e)?(n=this,o=e,r=t):(n=e,o=t,r=i),(0,s.isArray)(n))return n.forEach(e=>{this.off(e,o,r)}),this;let u=n,d=this.__getStore(u);if(!((0,l.isString)(o)||(0,l.isStringArray)(o))||0===o.length)return d.namespaces().forEach(e=>{this.off(u,"."+e)}),this.__removeStoreFromSubject(u),this;let p=e=>{h(u)&&(u.removeEventListener(e.event,e.syntheticCallback,e.syntheticCallback.options??!1),this.__unmemoryDOMSubjectToHandler(u,e.syntheticCallback))},m=(e,t)=>{if(""===e)return void d.events(t).forEach(e=>{""!==e&&m(e,t)});let i=d.get(e,t);if(i&&i.length)if((0,a.isFunction)(r)){let n=d.indexOf(e,t,r);!1!==n&&(p(i[n]),i.splice(n,1),i.length||d.clearEvents(t,e))}else i.forEach(p),i.length=0,d.clearEvents(t,e)};return this.__eachEvent(o,(e,t)=>{t===c.defaultNameSpace?d.namespaces().forEach(t=>{m(e,t)}):m(e,t)}),d.isEmpty()&&this.__removeStoreFromSubject(u),this}stopPropagation(e,t){let i=(0,l.isString)(e)?this:e,n=(0,l.isString)(e)?e:t;if("string"!=typeof n)throw(0,u.error)("Need event names");let o=this.__getStore(i);this.__eachEvent(n,(e,t)=>{let n=o.get(e,t);n&&this.__stopped.push(n),t===c.defaultNameSpace&&o.namespaces(!0).forEach(t=>this.stopPropagation(i,e+"."+t))})}__removeStop(e){if(e){let t=this.__stopped.indexOf(e);-1!==t&&this.__stopped.splice(0,t+1)}}__isStopped(e){return void 0!==e&&-1!==this.__stopped.indexOf(e)}fire(e,t,...i){let n,o,r=(0,l.isString)(e)?this:e,s=(0,l.isString)(e)?e:t,a=(0,l.isString)(e)?[t,...i]:i;if(!h(r)&&!(0,l.isString)(s))throw(0,u.error)("Need events names");let d=this.__getStore(r);return!(0,l.isString)(s)&&h(r)?this.__triggerNativeEvent(r,t):this.__eachEvent(s,(e,t)=>{if(h(r))this.__triggerNativeEvent(r,e);else{let i=d.get(e,t);if(i)try{[...i].every(t=>!this.__isStopped(i)&&(this.currents.push(e),o=t.syntheticCallback.call(r,e,...a),this.currents.pop(),void 0!==o&&(n=o),!0))}finally{this.__removeStop(i)}t!==c.defaultNameSpace||h(r)||d.namespaces().filter(e=>e!==t).forEach(t=>{let i=this.fire.apply(this,[r,e+"."+t,...a]);void 0!==i&&(n=i)})}}),n}destruct(){this.__isDestructed||(this.__isDestructed=!0,this.__domEventsMap.forEach((e,t)=>{this.off(t)}),this.__domEventsMap.clear(),this.__mutedEvents.clear(),this.currents.length=0,this.__stopped.length=0,this.off(this),this.__getStore(this).clear(),this.__removeStoreFromSubject(this))}constructor(e){(0,n._)(this,"__domEventsMap",new Map),(0,n._)(this,"__mutedEvents",new Set),(0,n._)(this,"__key","__JoditEventEmitterNamespaces"),(0,n._)(this,"__doc",o.globalDocument),(0,n._)(this,"__prepareEvent",e=>{!e.cancelBubble&&(e.composed&&(0,a.isFunction)(e.composedPath)&&e.composedPath()[0]&&Object.defineProperty(e,"target",{value:e.composedPath()[0],configurable:!0,enumerable:!0}),e.type.match(/^touch/)&&e.changedTouches&&e.changedTouches.length&&["clientX","clientY","pageX","pageY"].forEach(t=>{Object.defineProperty(e,t,{value:e.changedTouches[0][t],configurable:!0,enumerable:!0})}),e.originalEvent||(e.originalEvent=e),"paste"===e.type&&void 0===e.clipboardData&&this.__doc.defaultView.clipboardData&&Object.defineProperty(e,"clipboardData",{get:()=>this.__doc.defaultView.clipboardData,configurable:!0,enumerable:!0}))}),(0,n._)(this,"currents",[]),(0,n._)(this,"__stopped",[]),(0,n._)(this,"__isDestructed",!1),e&&(this.__doc=e),this.__key+=new Date().getTime()}}function h(e){return e&&(0,a.isFunction)(e.addEventListener)}},60216:function(e,t,i){"use strict";i.d(t,{Eventify:function(){return o}});var n=i(25045);class o{on(e,t){return this.__map.has(e)||this.__map.set(e,new Set),this.__map.get(e)?.add(t),this}off(e,t){return this.__map.has(e)&&this.__map.get(e)?.delete(t),this}destruct(){this.__map.clear()}emit(e,...t){let i;return this.__map.has(e)&&this.__map.get(e)?.forEach(e=>{i=e(...t)}),i}constructor(){(0,n._)(this,"__map",new Map)}}},42689:function(e,t,i){"use strict";let n=new(i(93747)).EventEmitter;i.d(t,["eventEmitter",0,n])},1496:function(e,t,i){"use strict";i.d(t,{EventEmitter:function(){return n.EventEmitter},EventHandlersStore:function(){return s.EventHandlersStore},Eventify:function(){return o.Eventify},defaultNameSpace:function(){return s.defaultNameSpace},observable:function(){return r.observable}});var n=i(93747),o=i(60216),r=i(70535),s=i(18869)},70535:function(e,t,i){"use strict";i.d(t,{observable:function(){return u}});var n=i(17312),o=i(94013),r=i(62101),s=i(71125);let a=Symbol("observable-object");function l(e){return void 0!==e[a]}function u(e){if(l(e))return e;let t={},i={},u=(t,o)=>((0,n.isArray)(t)?t.map(e=>u(e,o)):(i[t]||(i[t]=[]),i[t].push(o)),e),c=(o,...r)=>{if((0,n.isArray)(o))return void o.map(e=>c(e,...r));try{!t[o]&&i[o]&&(t[o]=!0,i[o].forEach(t=>t.call(e,...r)))}finally{t[o]=!1}},d=(t,i=[])=>{let n={};l(t)||(Object.defineProperty(t,a,{enumerable:!1,value:!0}),Object.keys(t).forEach(a=>{let l=i.concat(a).filter(e=>e.length);n[a]=t[a];let u=(0,s.getPropertyDescriptor)(t,a);Object.defineProperty(t,a,{set(t){let i=n[a];if(!(0,o.isFastEqual)(n[a],t)){c(["beforeChange","beforeChange."+l.join(".")],a,t),(0,r.isPlainObject)(t)&&d(t,l),u&&u.set?u.set.call(e,t):n[a]=t;let o=[];c(["change",...l.reduce((e,t)=>(o.push(t),e.push("change."+o.join(".")),e),[])],l.join("."),i,t?.valueOf?t.valueOf():t)}},get:()=>u&&u.get?u.get.call(e):n[a],enumerable:!0,configurable:!0}),(0,r.isPlainObject)(n[a])&&d(n[a],l)}),Object.defineProperty(e,"on",{value:u}))};return d(e),e}},18869:function(e,t,i){"use strict";i.d(t,{EventHandlersStore:function(){return a}});var n=i(25045),o=i(88475),r=i(28712);let s="JoditEventDefaultNamespace";class a{get(e,t){if(this.__store.has(t)){let i=this.__store.get(t);return(0,r.assert)(i,"-"),i[e]}}indexOf(e,t,i){let n=this.get(e,t);if(n){for(let e=0;e<n.length;e+=1)if(n[e].originalCallback===i)return e}return!1}namespaces(e=!1){let t=(0,o.toArray)(this.__store.keys());return e?t.filter(e=>e!==s):t}events(e){let t=this.__store.get(e);return t?Object.keys(t):[]}set(e,t,i,n=!1){let o=this.__store.get(t);o||(o={},this.__store.set(t,o)),void 0===o[e]&&(o[e]=[]),n?o[e].unshift(i):o[e].push(i)}clear(){this.__store.clear()}clearEvents(e,t){let i=this.__store.get(e);i&&i[t]&&(delete i[t],Object.keys(i).length||this.__store.delete(e))}isEmpty(){return 0===this.__store.size}constructor(){(0,n._)(this,"__store",new Map)}}i.d(t,["defaultNameSpace",0,s])},28077:function(e,t,i){"use strict";i.d(t,{getContainer:function(){return w},getPopupViewRoot:function(){return k},uniqueUid:function(){return v}});var n=i(24497),o=i(62101),r=i(85932),s=i(31534),a=i(74264),l=i(7909),u=i(80991),c=i(421),d=i(78048),h=i(85305),p=i(42689),m=i(81937),f=i(27795);let g=1,_=new Set;function v(){function e(){return Math.round(g+=10*(Math.random()+1)).toString(16)}let t=e();for(;_.has(t);)t=e();return _.add(t),t}let b=new h.PluginSystem({getContainer:w}),y=new WeakMap;function w(e,t,i="div",o=!1){let u,d=(0,r.isString)(t)?t:t?(0,c.getClassName)(t.prototype):"jodit-utils",h=y.get(e)||{},p=d+i,m=(0,s.isViewObject)(e)?e:e.j;if(!h[p]){let t=m.c;if(u=k(m.o,m.container,e.od.body),o&&(0,n.isJoditObject)(e)&&e.od!==e.ed){t=e.createInside;let o="style"===i?e.ed.head:e.ed.body;u=(0,n.isJoditObject)(e)&&e.o.shadowRoot?e.o.shadowRoot:o}let r=t.element(i,{className:`jodit jodit-${(0,a.kebabCase)(d)}-container jodit-box`});m.o.nonce&&("style"===i||"script"===i)&&(0,l.attr)(r,"nonce",m.o.nonce),r.classList.add("jodit_theme_"+(m.o.theme||"default")),f.Dom.append(u,r),h[p]=r,e.hookStatus("beforeDestruct",()=>{m.events.off(r),f.Dom.safeRemove(r),delete h[p],Object.keys(h).length&&y.delete(e)}),y.set(e,h),m.events.fire("getContainer",r)}return h[p].classList.remove("jodit_theme_default","jodit_theme_dark"),h[p].classList.add("jodit_theme_"+(m.o.theme||"default")),h[p]}function k(e,t,i){return e.popupRoot??e.shadowRoot??f.Dom.closest(t,e=>f.Dom.isHTMLElement(e)&&(f.Dom.isTag(e,"dialog")||["fixed","absolute"].includes((0,u.css)(e,"position"))),i)??i}let S=p.eventEmitter;i.d(t,["eventEmitter",0,S,"extendLang",0,e=>{Object.keys(e).forEach(t=>{let i,n=(i=e[t],(0,o.isPlainObject)(i)&&(0,o.isPlainObject)(i.default)?i.default:i);!(0,d.isUnsafeProtoKey)(t)&&(0,o.isPlainObject)(n)&&(Object.prototype.hasOwnProperty.call(m.lang,t)&&(0,o.isPlainObject)(m.lang[t])||(m.lang[t]={}),Object.keys(n).forEach(e=>{(0,d.isUnsafeProtoKey)(e)||(m.lang[t][e]=n[e])}))})},"instances",0,{},"modules",0,{},"pluginSystem",0,b])},78982:function(e,t,i){"use strict";var n=i(17312);i.d(t,["asArray",0,e=>(0,n.isArray)(e)?e:[e]])},45664:function(e,t,i){"use strict";i.d(t,{asArray:function(){return n.asArray},splitArray:function(){return o.splitArray},toArray:function(){return r.toArray}});var n=i(78982),o=i(32328),r=i(88475)},32328:function(e,t,i){"use strict";function n(e){return Array.isArray(e)?e:e.split(/[,\s]+/)}i.d(t,{splitArray:function(){return n}})},88475:function(e,t,i){"use strict";var n=i(23283),o=i(43379);i.d(t,["toArray",0,function(...e){return((0,n.isNativeFunction)(Array.from)?Array.from:(0,o.reset)("Array.from")??Array.from).apply(Array,e)}])},61077:function(e,t,i){"use strict";i.d(t,{clearTimeout:function(){return n.clearTimeout},setTimeout:function(){return n.setTimeout}});var n=i(79947)},79947:function(e,t,i){"use strict";i.d(t,{clearTimeout:function(){return r},setTimeout:function(){return o}});var n=i(81937);function o(e,t,...i){return t?n.globalWindow.setTimeout(e,t,...i):(e.call(null,...i),0)}function r(e){n.globalWindow.clearTimeout(e)}},98740:function(e,t,i){"use strict";i.d(t,{hasBrowserColorPicker:function(){return o}});var n=i(81937);function o(){let e;try{let t=n.globalDocument.createElement("input");t.type="color",t.value="!",e="color"===t.type&&"!"!==t.value}catch(t){e=!1}return e}},28686:function(e,t,i){"use strict";i.d(t,{hasBrowserColorPicker:function(){return n.hasBrowserColorPicker},hasContainer:function(){return d.hasContainer},isAbortError:function(){return o.isAbortError},isArray:function(){return r.isArray},isBoolean:function(){return s.isBoolean},isDestructable:function(){return d.isDestructable},isEqual:function(){return a.isEqual},isFastEqual:function(){return a.isFastEqual},isFunction:function(){return l.isFunction},isHTML:function(){return u.isHTML},isHtmlFromWord:function(){return c.isHtmlFromWord},isInitable:function(){return d.isInitable},isInt:function(){return h.isInt},isJoditObject:function(){return p.isJoditObject},isLicense:function(){return m.isLicense},isMarker:function(){return f.isMarker},isNativeFunction:function(){return g.isNativeFunction},isNumber:function(){return _.isNumber},isNumeric:function(){return v.isNumeric},isPlainObject:function(){return b.isPlainObject},isPromise:function(){return y.isPromise},isSet:function(){return w.isSet},isString:function(){return k.isString},isStringArray:function(){return k.isStringArray},isURL:function(){return S.isURL},isValidName:function(){return C.isValidName},isViewObject:function(){return E.isViewObject},isVoid:function(){return D.isVoid},isWindow:function(){return T.isWindow}});var n=i(98740),o=i(72068),r=i(17312),s=i(22289),a=i(94013),l=i(91565),u=i(46248),c=i(82166),d=i(52433),h=i(99732),p=i(24497),m=i(44998),f=i(23175),g=i(23283),_=i(72412),v=i(70222),b=i(62101),y=i(52100),w=i(3213),k=i(85932),S=i(91764),C=i(50083),E=i(31534),D=i(18303),T=i(3513)},72068:function(e,t,i){"use strict";function n(e){return!!e&&e instanceof DOMException&&"AbortError"===e.name}i.d(t,{isAbortError:function(){return n}})},17312:function(e,t,i){"use strict";function n(e){return Array.isArray(e)}i.d(t,{isArray:function(){return n}})},22289:function(e,t,i){"use strict";function n(e){return"boolean"==typeof e}i.d(t,{isBoolean:function(){return n}})},94013:function(e,t,i){"use strict";i.d(t,{isEqual:function(){return o},isFastEqual:function(){return r}});var n=i(3347);function o(e,t){return e===t||(0,n.stringify)(e)===(0,n.stringify)(t)}function r(e,t){return e===t}},91565:function(e,t,i){"use strict";function n(e){return"function"==typeof e}i.d(t,{isFunction:function(){return n}})},82166:function(e,t,i){"use strict";i.d(t,{isHtmlFromWord:function(){return l}});let n=/\s/,o=/\d/,r=/\w/;function s(e,t){let i=e.indexOf(t);for(;-1!==i;){let r=i+t.length;if(n.test(e.charAt(r))&&o.test(e.charAt(r+1)))return!0;i=e.indexOf(t,r)}return!1}function a(e,t){let i="style="+t,n=e.indexOf(i);for(;-1!==n;){let o=n+i.length,r=e.indexOf(t,o);if(-1===r&&(r=e.length),e.slice(o,r).includes("mso-"))return!0;n=e.indexOf(i,r)}return!1}function l(e){if(e.includes("urn:schemas-microsoft-com:office:word")||e.includes("urn:schemas-microsoft-com:office:excel"))return!0;let t=e.indexOf("<");for(;-1!==t;){if(!r.test(e.charAt(t+1))){t=e.indexOf("<",t+1);continue}let i=e.indexOf(">",t);-1===i&&(i=e.length);let o=e.slice(t,i);if("<meta"===o.slice(0,5).toLowerCase()&&function(e){if(s(e,"Microsoft Word")||s(e,"Microsoft Excel"))return!0;let t=e.toLowerCase(),i=t.indexOf("progid");return -1!==i&&(-1!==t.indexOf("word.",i)||-1!==t.indexOf("excel.",i))||t.includes("libreoffice")||t.includes("openoffice")}(o)||function(e){let t=e.indexOf("class=");for(;-1!==t;){if(t>0&&n.test(e.charAt(t-1))){let i=t+6,n=e.charAt(i);if(('"'===n||"'"===n)&&(i+=1),e.startsWith("Mso",i))return!0}t=e.indexOf("class=",t+6)}return!1}(o))return!0;t=e.indexOf("<",i)}return a(e,"'")||a(e,'"')&&e.includes("<font")}},46248:function(e,t,i){"use strict";var n=i(85932);let o=/[A-Za-z]/,r=/[A-Za-z0-9]/,s=/\w/;function a(e,t){if(!o.test(e.charAt(t)))return"";let i=t+1;for(;r.test(e.charAt(i));)i+=1;return e.slice(t,i)}i.d(t,["isHTML",0,e=>(0,n.isString)(e)&&function(e){let t=new Map,i=e.indexOf("</");for(;-1!==i;){let n=a(e,i+2);""!==n&&">"===e.charAt(i+2+n.length)&&t.set(n,i),i=e.indexOf("</",i+2)}if(0===t.size)return!1;let n=-1;for(i=e.indexOf("<");-1!==i;){let o=a(e,i+1),r=i+1+o.length;if(""!==o&&!s.test(e.charAt(r))){if(n<r&&(n=e.indexOf(">",r)),-1===n)return!1;let i=t.get(o);if(void 0!==i&&i>n)return!0}i=e.indexOf("<",i+1)}return!1}(e)])},52433:function(e,t,i){"use strict";i.d(t,{hasContainer:function(){return l},isDestructable:function(){return a},isInitable:function(){return s}});var n=i(23211),o=i(91565),r=i(18303);function s(e){return!(0,r.isVoid)(e)&&(0,o.isFunction)(e.init)}function a(e){return!(0,r.isVoid)(e)&&(0,o.isFunction)(e.destruct)}function l(e){return!(0,r.isVoid)(e)&&n.Dom.isElement(e.container)}},99732:function(e,t,i){"use strict";i.d(t,{isInt:function(){return r}});var n=i(70222),o=i(85932);function r(e){return(0,o.isString)(e)&&(0,n.isNumeric)(e)&&(e=parseFloat(e)),"number"==typeof e&&Number.isFinite(e)&&!(e%1)}},24497:function(e,t,i){"use strict";i.d(t,{isJoditObject:function(){return o}});var n=i(91565);function o(e){return!!(e&&e instanceof Object&&(0,n.isFunction)(e.constructor)&&("u">typeof Jodit&&e instanceof Jodit||e.isJodit))}},44998:function(e,t,i){"use strict";var n=i(85932);i.d(t,["isLicense",0,e=>(0,n.isString)(e)&&23===e.length&&/^[a-z0-9]{5}-[a-z0-9]{5}-[a-z0-9]{5}-[a-z0-9]{5}$/i.test(e)])},23175:function(e,t,i){"use strict";i.d(t,{isMarker:function(){return o}});var n=i(23211);function o(e){return n.Dom.isMarker(e)}},23283:function(e,t,i){"use strict";function n(e){return!!e&&"function"===(typeof e).toLowerCase()&&(e===Function.prototype||/^\s*function\s*(\b[a-z$_][a-z0-9$_]*\b)*\s*\((|([a-z$_][a-z0-9$_]*)(\s*,[a-z$_][a-z0-9$_]*)*)\)\s*{\s*\[native code]\s*}\s*$/i.test(e+""))}i.d(t,{isNativeFunction:function(){return n}})},72412:function(e,t,i){"use strict";function n(e){return"number"==typeof e&&!isNaN(e)&&isFinite(e)}i.d(t,{isNumber:function(){return n}})},70222:function(e,t,i){"use strict";i.d(t,{isNumeric:function(){return o}});var n=i(85932);function o(e){if((0,n.isString)(e)){if(!e.match(/^([+-])?[0-9]+(\.?)([0-9]+)?(e[0-9]+)?$/))return!1;e=parseFloat(e)}return"number"==typeof e&&!isNaN(e)&&isFinite(e)}},62101:function(e,t,i){"use strict";i.d(t,{isPlainObject:function(){return o}});var n=i(3513);function o(e){return!(!e||"object"!=typeof e||e.nodeType||(0,n.isWindow)(e))&&!(e.constructor&&!({}).hasOwnProperty.call(e.constructor.prototype,"isPrototypeOf"))}},52100:function(e,t,i){"use strict";function n(e){return e&&"function"==typeof e.then}i.d(t,{isPromise:function(){return n}})},3213:function(e,t,i){"use strict";i.d(t,{isSet:function(){return o}});var n=i(91565);function o(e){return!!e&&(0,n.isFunction)(e.has)&&(0,n.isFunction)(e.add)&&(0,n.isFunction)(e.delete)}},85932:function(e,t,i){"use strict";i.d(t,{isString:function(){return o},isStringArray:function(){return r}});var n=i(17312);function o(e){return"string"==typeof e}function r(e){return(0,n.isArray)(e)&&o(e[0])}},91764:function(e,t,i){"use strict";i.d(t,{isURL:function(){return o}});var n=i(81937);function o(e){if(e.includes(" "))return!1;if("u">typeof URL)try{let t=new URL(e);return["https:","http:","ftp:","file:","rtmp:"].includes(t.protocol)}catch(e){return!1}let t=n.globalDocument.createElement("a");return t.href=e,!!t.hostname}},50083:function(e,t,i){"use strict";function n(e){return!!e.length&&!/[^0-9A-Za-zа-яА-ЯЁё\w\-_. ]/.test(e)&&e.trim().length>0}i.d(t,{isValidName:function(){return n}})},31534:function(e,t,i){"use strict";i.d(t,{isViewObject:function(){return o}});var n=i(91565);function o(e){return!!(e&&e instanceof Object&&(0,n.isFunction)(e.constructor)&&e.isView)}},18303:function(e,t,i){"use strict";function n(e){return null==e}i.d(t,{isVoid:function(){return n}})},3513:function(e,t,i){"use strict";function n(e){return null!=e&&e===e.window}i.d(t,{isWindow:function(){return n}})},93387:function(e,t,i){"use strict";i.d(t,["colorToHex",0,e=>{if("rgba(0, 0, 0, 0)"===e||""===e)return!1;if(!e)return"#000000";if("#"===e.substr(0,1))return e;let t=/([\s\n\t\r]*?)rgb\((\d+), (\d+), (\d+)\)/.exec(e)||/([\s\n\t\r]*?)rgba\((\d+), (\d+), (\d+), ([\d.]+)\)/.exec(e);if(!t)return"#000000";let i=parseInt(t[2],10),n=parseInt(t[3],10),o=(parseInt(t[4],10)|n<<8|i<<16).toString(16).toUpperCase();for(;o.length<6;)o="0"+o;return t[1]+"#"+o}])},30893:function(e,t,i){"use strict";i.d(t,{applyStyles:function(){return h}});var n=i(81937),o=i(23211),r=i(81910),s=i(75480),a=i(4040),l=i(7909),u=i(80991),c=i(28723);function d(e){let t=e.split(";"),i=t.length-1;return t.filter((e,t)=>{let n=/^\s*([a-z-]{1,64})\s*:/i.exec(e);if(!n)return!0;let o=n[1].toLowerCase();return!(o.startsWith("mso-")||o.startsWith("border")&&t!==i)}).join(";").replace(/([0-9.]{1,32})(pt|cm)/gi,(e,t,i)=>{switch(i.toLowerCase()){case"pt":return(1.328*parseFloat(t)).toFixed(0)+"px";case"cm":return(.02645833*parseFloat(t)).toFixed(0)+"px"}return e})}function h(e){let t=(0,r.indexOfOpenTag)(e,"html");if(-1===t)return e;let i=(e=e.substring(t)).toLowerCase().lastIndexOf("</html>");-1!==i&&(e=e.substring(0,i+7));let h=n.globalDocument.createElement("iframe");(0,u.css)(h,"display","none"),o.Dom.append(n.globalDocument.body,h);let p="";try{let t=h.contentDocument||(h.contentWindow?h.contentWindow.document:null);if(t){t.open(),t.write(e),t.close();let i=(0,s.readWordListItems)(t.body);o.Dom.each(t.body,e=>{o.Dom.isElement(e)&&/mso-list:\s*ignore/i.test((0,l.attr)(e,"style")||"")&&o.Dom.safeRemove(e)});try{for(let e=0;e<t.styleSheets.length;e+=1){let i=t.styleSheets[e].cssRules;for(let e=0;e<i.length;e+=1)""!==i[e].selectorText&&(0,c.$$)(i[e].selectorText,t.body).forEach(t=>{t.style.cssText=d(i[e].style.cssText+";"+t.style.cssText)})}}catch(e){if(!n.IS_PROD)throw e}(0,s.wrapWordListItems)(i),o.Dom.each(t.body,e=>{if(o.Dom.isElement(e)){let t=(0,l.attr)(e,"style");t&&(e.style.cssText=d(t)),(0,l.attr)(e,"style")||(0,l.attr)(e,"style",null)}}),p=t.firstChild?(0,a.trim)(t.body.innerHTML):""}}catch{}finally{o.Dom.safeRemove(h)}return p&&(e=p),(0,a.trim)((0,r.removeWordWrappers)(e))}},1277:function(e,t,i){"use strict";i.d(t,{cleanFromWord:function(){return c}});var n=i(81937),o=i(23211),r=i(88475),s=i(81910),a=i(75480),l=i(4040),u=i(7909);function c(e){-1!==e.indexOf("<html ")&&(e=(e=e.substring(e.indexOf("<html "),e.length)).substring(0,e.lastIndexOf("</html>")+7));let t="";try{let i=n.globalDocument.createElement("div");i.innerHTML=e;let s=[],l=(0,a.readWordListItems)(i);i.firstChild&&o.Dom.each(i,e=>{if(e)switch(e.nodeType){case Node.ELEMENT_NODE:switch(e.nodeName){case"STYLE":case"LINK":case"META":s.push(e);break;case"W:SDT":case"W:SDTPR":case"FONT":o.Dom.unwrap(e);break;default:if(/mso-list:\s*ignore/i.test((0,u.attr)(e,"style")||"")){s.push(e);break}(0,r.toArray)(e.attributes).forEach(t=>{-1===["src","href","rel","content"].indexOf(t.name.toLowerCase())&&(0,u.attrRaw)(e,t.name,null)})}break;case Node.TEXT_NODE:break;default:s.push(e)}}),o.Dom.safeRemove.apply(null,s),(0,a.wrapWordListItems)(l),t=i.innerHTML}catch(e){}return t&&(e=t),e=e.split(/(\n)/).filter(l.trim).join(`
10
10
  `),(0,s.removeWordWrappers)(e)}},6609:function(e,t,i){"use strict";i.d(t,{htmlspecialchars:function(){return o}});var n=i(81937);function o(e){let t=n.globalDocument.createElement("div");return t.textContent=e,t.innerHTML}},82658:function(e,t,i){"use strict";i.d(t,{applyStyles:function(){return n.applyStyles},cleanFromWord:function(){return o.cleanFromWord},htmlspecialchars:function(){return r.htmlspecialchars},indexOfClosingTag:function(){return u.indexOfClosingTag},indexOfOpenTag:function(){return u.indexOfOpenTag},nl2br:function(){return s.nl2br},removeBetween:function(){return u.removeBetween},removeEmptyMarkedTags:function(){return u.removeEmptyMarkedTags},removeTagsByPrefix:function(){return u.removeTagsByPrefix},removeWordWrappers:function(){return u.removeWordWrappers},safeHTML:function(){return a.safeHTML},sanitizeHTMLElement:function(){return a.sanitizeHTMLElement},stripTags:function(){return l.stripTags},unwrapMarkedTags:function(){return u.unwrapMarkedTags}});var n=i(30893),o=i(1277),r=i(6609),s=i(48838),a=i(48155),l=i(22852),u=i(81910)},48838:function(e,t,i){"use strict";function n(e){return e.replace(/\r\n|\r|\n/g,"<br/>")}i.d(t,{nl2br:function(){return n}})},48155:function(e,t,i){"use strict";i.d(t,{safeHTML:function(){return l},sanitizeHTMLElement:function(){return f}});var n=i(23211),o=i(93640),r=i(7909);let s=new Set(["foreignobject","annotation-xml","desc","title"]),a=e=>!!(e&&/^(math|svg)$/i.test(e.nodeName));function l(e,t){if(!n.Dom.isElement(e)&&!n.Dom.isFragment(e))return;let i=[];for(let t of(n.Dom.each(e,e=>{n.Dom.isElement(e)&&n.Dom.up(e.parentNode,a)&&i.push(e)}),i))n.Dom.isOrContains(e,t)&&function(e){if("http://www.w3.org/1999/xhtml"!==e.namespaceURI||null==n.Dom.up(e,a))return!1;for(let t=e.parentElement;t;t=t.parentElement){let e=t.nodeName.toLowerCase();if("math"===e||"svg"===e)break;if(s.has(e))return!1}return!0}(t)&&n.Dom.safeRemove(t);let r=[];for(let t of(n.Dom.each(e,e=>{n.Dom.isElement(e)&&"NOSCRIPT"===e.nodeName&&r.push(e)}),r))n.Dom.safeRemove(t);let l=t.removeEventAttributes??t.removeOnError,c=e=>{if(n.Dom.isElement(e)&&(l&&u(e),f(e,t),t.safeLinksTarget&&"A"===e.nodeName&&"_blank"===(0,o.attr)(e,"target"))){let t=((0,o.attr)(e,"rel")||"").split(/\s+/).filter(Boolean);t.includes("noopener")||t.push("noopener"),t.includes("noreferrer")||t.push("noreferrer"),(0,o.attr)(e,"rel",t.join(" "))}};c(e),n.Dom.each(e,c)}function u(e){if(!n.Dom.isElement(e))return!1;let t=!1,i=[];for(let t=0;t<e.attributes.length;t++)e.attributes[t].name.toLowerCase().startsWith("on")&&i.push(e.attributes[t].name);for(let n of i)(0,r.attrRaw)(e,n,null),t=!0;return t}let c=["src","data","action","formaction","poster","background","xlink:href"],d=new Set(["animate","set","animatemotion","animatetransform"]),h=["values","from","to","by"],p=new Set(["iframe","frame","object","embed"]);function m(e,t){let i=e.replace(/[\u0000-\u0020]+/g,"").toLowerCase();return!!(/^(?:javascript|vbscript|livescript|mocha):/.test(i)||/^data:(?:text\/html|application\/xhtml)/.test(i))||/^data:image\/svg/.test(i)&&p.has(t)}function f(e,{safeJavaScriptLink:t,removeOnError:i,removeEventAttributes:s}={safeJavaScriptLink:!0,removeOnError:!0}){if(!n.Dom.isElement(e))return!1;let a=!1;s&&u(e)&&(a=!0),i&&e.hasAttribute("onerror")&&((0,o.attr)(e,"onerror",null),a=!0);let l=e.nodeName.toLowerCase(),p=(0,o.attr)(e,"href");if(t&&p&&m(p,l)){let t="u">typeof location?location.protocol:"http:";(0,o.attr)(e,"href",t+"//"+p),a=!0}if(t){for(let t of(e.hasAttribute("srcdoc")&&((0,o.attr)(e,"srcdoc",null),a=!0),c)){let i=(0,r.attrRaw)(e,t);i&&m(i,l)&&((0,o.attr)(e,t,null),a=!0)}if(d.has(l))for(let t of h){let i=(0,r.attrRaw)(e,t);i&&i.split(";").some(e=>m(e,"a"))&&((0,o.attr)(e,t,null),a=!0)}}return a}},22852:function(e,t,i){"use strict";i.d(t,{stripTags:function(){return function e(t,i=document,c=null,d=!1){let h=i.createElement("div");(0,o.isString)(t)?h.innerHTML=t:n.Dom.append(h,t);let p=[];n.Dom.each(h,e=>{n.Dom.isElement(e)&&p.push(e)});let m=new Set,f=()=>{let e=i.createTextNode(d?"%%%jodit-single-br%%%":" ");return m.add(e),e};return p.forEach(t=>{if(!t.parentNode)return;if(c&&n.Dom.isTag(t,c)){let o=t.nodeName.toLowerCase(),r=n.Dom.isTag(t,u)?`%%%jodit-single-${o}%%%`:`%%%jodit-${o}%%%${e(t.innerHTML,i,c,d)}%%%/jodit-${o}%%%`;n.Dom.before(t,i.createTextNode(r)),n.Dom.safeRemove(t);return}if(n.Dom.isTag(t,l))return void n.Dom.safeRemove(t);if(!n.Dom.isTag(t,s))return;let o=t.previousSibling;n.Dom.isTag(t,a)&&o&&!m.has(o)&&!(n.Dom.isText(o)&&/\s$/.test(o.nodeValue||""))&&n.Dom.before(t,f());let r=t.nextSibling;!(n.Dom.isText(r)&&/^\s/.test(r.nodeValue||""))&&r&&n.Dom.before(r,f())}),(0,r.trim)(h.innerText).replace(/%%%(\/)?jodit(-single)?-([\w\n]+)%%%/g,(e,t,i,n)=>`<${t?"/":""}${n}>`)}}});var n=i(23211),o=i(85932),r=i(4040);let s=new Set(["div","p","br","h1","h2","h3","h4","h5","h6","hr","ul","ol","li"]),a=new Set(["ul","ol"]),l=new Set(["script","style"]),u=new Set(["br","hr","input"])},81910:function(e,t,i){"use strict";i.d(t,{indexOfClosingTag:function(){return a},indexOfOpenTag:function(){return c},removeBetween:function(){return m},removeEmptyMarkedTags:function(){return f},removeTagsByPrefix:function(){return l},removeWordWrappers:function(){return u},unwrapMarkedTags:function(){return h}});let n=/[a-z0-9:-]/i,o=["<html","</html","<col","</col","<o:p","</o:p"];function r(e,t,i){return e.substr(t,i.length).toLowerCase()===i}function s(e,t,i){let n=e.indexOf("<",i);for(;-1!==n;){for(let i of t)if(r(e,n,i))return[n,i];n=e.indexOf("<",n+1)}return[-1,""]}function a(e,t,i){let n="</"+t+">",o=e.indexOf("</",i);for(;-1!==o;){if(r(e,o,n))return o;o=e.indexOf("</",o+2)}return -1}function l(e,t){let i=t.map(e=>e.toLowerCase()),n="",o=0;for(;;){let[t]=s(e,i,o);if(-1===t)break;let r=e.indexOf(">",t);if(-1===r)break;n+=e.slice(o,t),o=r+1}return 0===o?e:n+e.slice(o)}function u(e){return l(l(e,o),["\x3c!--"])}function c(e,t){let i="<"+t.toLowerCase(),n=0;for(;;){let[t]=s(e,[i],n);if(-1===t)return -1;let o=e.charAt(t+i.length);if(">"===o)return t;if(/\s/.test(o)){if(-1===e.indexOf(">",t))return -1;return t}n=t+1}}function d(e,t){let i=t;for(;n.test(e.charAt(i));)i+=1;return e.slice(t,i)}function h(e,t,i,n){let o=i.toLowerCase(),r=[null==t?"<":"<"+t.toLowerCase()],a=function(e){let t=new Map,i=e.indexOf("</");for(;-1!==i;){let n=d(e,i+2).toLowerCase();if(""!==n&&">"===e.charAt(i+2+n.length)){let e=t.get(n);e?e.push(i):t.set(n,[i])}i=e.indexOf("</",i+2)}return t}(e),l="",u=0;for(;;){let[i]=s(e,r,u);if(-1===i)break;let c=(t??d(e,i+1)).toLowerCase(),h=e.indexOf(">",i);if(-1===h)break;let p=""!==c&&e.slice(i,h).toLowerCase().includes(o)?function(e,t){if(!e)return -1;let i=0,n=e.length;for(;i<n;){let o=i+n>>1;e[o]<t?i=o+1:n=o}return i<e.length?e[i]:-1}(a.get(c),h+1):-1;if(-1===p){l+=e.slice(u,i+1),u=i+1;continue}let m=e.slice(h+1,p),f=p+c.length+3;l+=e.slice(u,i),l+=""!==m&&(!n||n(m))?m:e.slice(i,f),u=f}return 0===u?e:l+e.slice(u)}function p(e,t,i){let n=t.charAt(0),o=e.indexOf(n,i);for(;-1!==o;){if(r(e,o,t))return o;o=e.indexOf(n,o+1)}return -1}function m(e,t,i,n,o=""){let r=t.toLowerCase(),s=o.toLowerCase(),a="",l=0;for(;;){let o=p(e,r,l);if(-1===o)break;let u=p(e,i,o+t.length);if(-1===u)break;if(""!==s&&!e.slice(o,u).toLowerCase().includes(s)){a+=e.slice(l,u+i.length),l=u+i.length;continue}let c=p(e,n,u+i.length);if(-1===c)break;a+=e.slice(l,o),l=c+n.length}return 0===l?e:a+e.slice(l)}function f(e,t,i){let n=t.toLowerCase(),o=i.toLowerCase(),a="</"+n+">",l="",u=0;for(;;){let[t]=s(e,["<"+n],u);if(-1===t)break;let i=e.indexOf(">",t);if(-1===i)break;if(e.slice(t,i).toLowerCase().includes(o)&&r(e,i+1,a)){l+=e.slice(u,t),u=i+1+a.length;continue}l+=e.slice(u,i+1),u=i+1}return 0===u?e:l+e.slice(u)}},75480:function(e,t,i){"use strict";i.d(t,{readWordListItems:function(){return a},wrapWordListItems:function(){return l}});var n=i(23211),o=i(88475),r=i(7909);let s={i:1,v:5,x:10,l:50,c:100,d:500,m:1e3};function a(e){let t=[];return(0,o.toArray)(e.querySelectorAll("p")).forEach(e=>{let i=/mso-list:\s*l(\d+)\s+level(\d+)(?:\s+lfo(\d+))?/i.exec((0,r.attr)(e,"style")||"");if(!i)return;let a=(0,o.toArray)(e.querySelectorAll("[style]")).find(e=>/mso-list:\s*ignore/i.test((0,r.attr)(e,"style")||""));t.push({paragraph:e,list:`${i[1]}:${i[3]||""}`,level:Number(i[2]),...function(e){let t=e.replace(/\s+/g,""),i=/^\(?(?:\d+\.)*(\d+)[.)]?$/.exec(t);if(i)return{tag:"ol",listStyleType:null,start:Number(i[1])};let n=/^\(?([a-z]+|[A-Z]+)[.)]$/.exec(t);if(n){let e=n[1],t=e.toLowerCase(),i=e!==t;if(/^[ivxlcdm]+$/.test(t)&&(t.length>1||"i"===t))return{tag:"ol",listStyleType:i?"upper-roman":"lower-roman",start:function(e){let t=0;for(let i=0;i<e.length;i+=1){let n=s[e[i]];t+=(s[e[i+1]]||0)>n?-n:n}return t}(t)};if(/^([a-z])\1*$/.test(t))return{tag:"ol",listStyleType:i?"upper-alpha":"lower-alpha",start:(t.length-1)*26+t.charCodeAt(0)-96}}return{tag:"ul",listStyleType:null,start:1}}(a?.textContent||"")}),a&&function(e,t){let i=e.parentNode;for(n.Dom.safeRemove(e);i&&i!==t&&n.Dom.isElement(i)&&n.Dom.isEmpty(i);){let e=i.parentNode;n.Dom.safeRemove(i),i=e}}(a,e)}),t}function l(e){let t=[],i=e.map((t,i)=>{var o;return i>0&&(o=e[i-1],n.Dom.findSibling(t.paragraph,!0,e=>!n.Dom.isEmptyTextNode(e)&&!n.Dom.isComment(e))===o.paragraph)});e.forEach((e,s)=>{let{paragraph:a}=e;for(i[s]||(t=[]);t.length&&t[t.length-1].level>e.level;)t.pop();let l=t[t.length-1];l&&l.level===e.level&&l.list!==e.list&&(t.pop(),l=t[t.length-1]);let u=a.ownerDocument;if(!l||l.level<e.level){let i=u.createElement(e.tag);e.listStyleType&&(i.style.listStyleType=e.listStyleType),"ol"===e.tag&&1!==e.start&&(0,r.attr)(i,"start",e.start),l&&l.li?l.li.appendChild(i):n.Dom.before(a,i),l={level:e.level,list:e.list,element:i},t.push(l)}let c=u.createElement("li");(0,o.toArray)(a.attributes).forEach(e=>{"class"!==e.name&&c.setAttribute(e.name,e.value)}),c.style.removeProperty("margin-left"),c.style.removeProperty("text-indent"),(0,r.attr)(c,"style")||(0,r.attr)(c,"style",null),n.Dom.moveContent(a,c),n.Dom.safeRemove(a),l.element.appendChild(c),l.li=c})}},65946:function(e,t,i){"use strict";i.r(t),i.d(t,{CamelCaseToKebabCase:function(){return c.CamelCaseToKebabCase},NUMBER_FIELDS_REG:function(){return l.NUMBER_FIELDS_REG},applyStyles:function(){return a.applyStyles},asArray:function(){return n.asArray},camelCase:function(){return c.camelCase},cleanFromWord:function(){return a.cleanFromWord},clearTimeout:function(){return o.clearTimeout},colorToHex:function(){return s.colorToHex},fuzzySearchIndex:function(){return c.fuzzySearchIndex},getContentWidth:function(){return u.getContentWidth},getFixedPositionOffset:function(){return u.getFixedPositionOffset},getScrollParent:function(){return u.getScrollParent},hasBrowserColorPicker:function(){return r.hasBrowserColorPicker},hasContainer:function(){return r.hasContainer},htmlspecialchars:function(){return a.htmlspecialchars},i18n:function(){return c.i18n},indexOfClosingTag:function(){return a.indexOfClosingTag},indexOfOpenTag:function(){return a.indexOfOpenTag},innerWidth:function(){return u.innerWidth},isAbortError:function(){return r.isAbortError},isArray:function(){return r.isArray},isBoolean:function(){return r.isBoolean},isDestructable:function(){return r.isDestructable},isEqual:function(){return r.isEqual},isFastEqual:function(){return r.isFastEqual},isFunction:function(){return r.isFunction},isHTML:function(){return r.isHTML},isHtmlFromWord:function(){return r.isHtmlFromWord},isInitable:function(){return r.isInitable},isInt:function(){return r.isInt},isJoditObject:function(){return r.isJoditObject},isLicense:function(){return r.isLicense},isMarker:function(){return r.isMarker},isNativeFunction:function(){return r.isNativeFunction},isNumber:function(){return r.isNumber},isNumeric:function(){return r.isNumeric},isPlainObject:function(){return r.isPlainObject},isPromise:function(){return r.isPromise},isSet:function(){return r.isSet},isString:function(){return r.isString},isStringArray:function(){return r.isStringArray},isURL:function(){return r.isURL},isValidName:function(){return r.isValidName},isViewObject:function(){return r.isViewObject},isVoid:function(){return r.isVoid},isWindow:function(){return r.isWindow},kebabCase:function(){return c.kebabCase},nl2br:function(){return a.nl2br},normalizeColor:function(){return l.normalizeColor},normalizeCssNumericValue:function(){return l.normalizeCssNumericValue},normalizeCssValue:function(){return l.normalizeCssValue},normalizeKeyAliases:function(){return l.normalizeKeyAliases},normalizeLicense:function(){return l.normalizeLicense},normalizePath:function(){return l.normalizePath},normalizeRelativePath:function(){return l.normalizeRelativePath},normalizeSize:function(){return l.normalizeSize},normalizeUrl:function(){return l.normalizeUrl},offset:function(){return u.offset},position:function(){return u.position},removeBetween:function(){return a.removeBetween},removeEmptyMarkedTags:function(){return a.removeEmptyMarkedTags},removeTagsByPrefix:function(){return a.removeTagsByPrefix},removeWordWrappers:function(){return a.removeWordWrappers},safeHTML:function(){return a.safeHTML},sanitizeHTMLElement:function(){return a.sanitizeHTMLElement},setTimeout:function(){return o.setTimeout},size:function(){return u.size},splitArray:function(){return n.splitArray},sprintf:function(){return c.sprintf},stringify:function(){return c.stringify},stripTags:function(){return a.stripTags},toArray:function(){return n.toArray},trim:function(){return c.trim},trimChars:function(){return c.trimChars},trimInv:function(){return c.trimInv},trimInvEnd:function(){return c.trimInvEnd},ucfirst:function(){return c.ucfirst},unwrapMarkedTags:function(){return a.unwrapMarkedTags}});var n=i(45664),o=i(61077),r=i(28686),s=i(93387),a=i(82658),l=i(97022),u=i(86878),c=i(97642),d=i(93640),h={};for(var p in d)0>["default","asArray","splitArray","toArray","clearTimeout","setTimeout","hasBrowserColorPicker","hasContainer","isAbortError","isArray","isBoolean","isDestructable","isEqual","isFastEqual","isFunction","isHTML","isHtmlFromWord","isInitable","isInt","isJoditObject","isLicense","isMarker","isNativeFunction","isNumber","isNumeric","isPlainObject","isPromise","isSet","isString","isStringArray","isURL","isValidName","isViewObject","isVoid","isWindow","colorToHex","applyStyles","cleanFromWord","htmlspecialchars","indexOfClosingTag","indexOfOpenTag","nl2br","removeBetween","removeEmptyMarkedTags","removeTagsByPrefix","removeWordWrappers","safeHTML","sanitizeHTMLElement","stripTags","unwrapMarkedTags","NUMBER_FIELDS_REG","normalizeColor","normalizeCssNumericValue","normalizeCssValue","normalizeKeyAliases","normalizeLicense","normalizePath","normalizeRelativePath","normalizeSize","normalizeUrl","getContentWidth","getFixedPositionOffset","getScrollParent","innerWidth","offset","position","size","CamelCaseToKebabCase","camelCase","fuzzySearchIndex","i18n","kebabCase","sprintf","stringify","trim","trimChars","trimInv","trimInvEnd","ucfirst"].indexOf(p)&&(h[p]=(function(e){return d[e]}).bind(0,p));i.d(t,h)},97022:function(e,t,i){"use strict";i.d(t,{NUMBER_FIELDS_REG:function(){return o.NUMBER_FIELDS_REG},normalizeColor:function(){return n.normalizeColor},normalizeCssNumericValue:function(){return o.normalizeCssNumericValue},normalizeCssValue:function(){return o.normalizeCssValue},normalizeKeyAliases:function(){return r.normalizeKeyAliases},normalizeLicense:function(){return s.normalizeLicense},normalizePath:function(){return a.normalizePath},normalizeRelativePath:function(){return l.normalizeRelativePath},normalizeSize:function(){return u.normalizeSize},normalizeUrl:function(){return c.normalizeUrl}});var n=i(77367),o=i(19147),r=i(27978),s=i(49663),a=i(18377),l=i(96340),u=i(98831),c=i(48009)},77367:function(e,t,i){"use strict";var n=i(93387),o=i(4040);i.d(t,["normalizeColor",0,e=>{let t=["#"],i=(0,n.colorToHex)(e);if(!i)return!1;if(3===(i=(i=(0,o.trim)(i.toUpperCase())).substring(1)).length){for(let e=0;e<3;e+=1)t.push(i[e]),t.push(i[e]);return t.join("")}return i.length>6&&(i=i.slice(0,6)),"#"+i}])},19147:function(e,t,i){"use strict";i.d(t,{normalizeCssNumericValue:function(){return l},normalizeCssValue:function(){return u}});var n=i(70222),o=i(18303),r=i(93387),s=i(74264);let a=/^(left|top|bottom|right|width|min|max|height|margin|padding|fontsize|font-size)/i;function l(e,t){return!(0,o.isVoid)(t)&&a.test(e)&&(0,n.isNumeric)(t.toString())?parseInt(t.toString(),10)+"px":t}function u(e,t){if("font-weight"===(0,s.kebabCase)(e)){switch(t.toString().toLowerCase()){case"700":case"bold":return 700;case"400":case"normal":return 400;case"900":case"heavy":return 900}return(0,n.isNumeric)(t)?Number(t):t}return/color/i.test(e)&&/^rgb/i.test(t.toString())&&(0,r.colorToHex)(t.toString())||t}i.d(t,["NUMBER_FIELDS_REG",0,a])},27978:function(e,t,i){"use strict";i.d(t,{normalizeKeyAliases:function(){return r}});var n=i(81937),o=i(4040);function r(e){let t={},i={meta:1,ctrl:2,control:2,alt:3,shift:4,space:5};return e.replace(/\+\+/g,"+add").split(/[\s]*\+[\s]*/).map(e=>(0,o.trim)(e.toLowerCase())).map(e=>n.KEY_ALIASES[e]||e).sort((e,t)=>i[e]&&!i[t]?-1:!i[e]&&i[t]?1:i[e]&&i[t]?i[e]-i[t]:e>t?1:-1).filter(e=>!t[e]&&""!==e&&(t[e]=!0)).join("+")}},49663:function(e,t,i){"use strict";i.d(t,["normalizeLicense",0,(e,t=8)=>{let i=[];for(;e.length;)i.push(e.substr(0,t)),e=e.substr(t);return i[1]=i[1].replace(/./g,"*"),i[2]=i[2].replace(/./g,"*"),i.join("-")}])},18377:function(e,t,i){"use strict";var n=i(4040);i.d(t,["normalizePath",0,(...e)=>e.filter(e=>(0,n.trim)(e).length).map((t,i)=>(t=t.replace(/([^:])[\\/]+/g,"$1/"),i&&(t=t.replace(/^\//,"")),i!==e.length-1&&(t=t.replace(/\/$/,"")),t)).join("/")])},96340:function(e,t,i){"use strict";i.d(t,["normalizeRelativePath",0,e=>e.split("/").reduce((e,t)=>{switch(t){case"":case".":break;case"..":e.pop();break;default:e.push(t)}return e},[]).join("/")+(e.endsWith("/")?"/":"")])},98831:function(e,t,i){"use strict";i.d(t,["normalizeSize",0,(e,t)=>/^[0-9]+$/.test(e.toString())?e+t:e.toString()])},48009:function(e,t,i){"use strict";i.d(t,["normalizeUrl",0,(...e)=>e.filter(e=>e.length).map(e=>e.replace(/\/$/,"")).join("/").replace(/([^:])[\\/]+/g,"$1/")])},54447:function(e,t,i){"use strict";i.d(t,["getContentWidth",0,(e,t)=>{let i=t.getComputedStyle(e);return e.offsetWidth-parseInt(i.getPropertyValue("padding-left")||"0",10)-parseInt(i.getPropertyValue("padding-right")||"0",10)}])},2373:function(e,t,i){"use strict";function n(e){let t=e.ownerDocument?.defaultView,i=e.parentElement;for(;t&&i;){var n;if(""!==(n=t.getComputedStyle(i)).transform&&"none"!==n.transform||""!==n.perspective&&"none"!==n.perspective||""!==n.filter&&"none"!==n.filter||"transform"===n.willChange||"perspective"===n.willChange||"filter"===n.willChange||"paint"===n.contain||"layout"===n.contain||"strict"===n.contain||"content"===n.contain){let e=i.getBoundingClientRect();return{x:e.left,y:e.top}}i=i.parentElement}let o=t?.visualViewport;return t&&o&&(o.offsetLeft||o.offsetTop)&&1>Math.abs(o.pageLeft-t.scrollX)&&1>Math.abs(o.pageTop-t.scrollY)?{x:-Math.round(o.offsetLeft),y:-Math.round(o.offsetTop)}:{x:0,y:0}}i.d(t,{getFixedPositionOffset:function(){return n}})},34027:function(e,t,i){"use strict";i.d(t,{getScrollParent:function(){return function e(t){if(!t)return null;let i=o.Dom.isHTMLElement(t),s=i&&(0,r.css)(t,"overflowY");return i&&"visible"!==s&&"hidden"!==s&&t.scrollHeight>=t.clientHeight?t:e(t.parentNode)||n.globalDocument.scrollingElement||n.globalDocument.body}}});var n=i(81937),o=i(23211),r=i(93640)},86878:function(e,t,i){"use strict";i.d(t,{getContentWidth:function(){return n.getContentWidth},getFixedPositionOffset:function(){return o.getFixedPositionOffset},getScrollParent:function(){return r.getScrollParent},innerWidth:function(){return s.innerWidth},offset:function(){return l.offset},position:function(){return u.position},size:function(){return a.size}});var n=i(54447),o=i(2373),r=i(34027),s=i(83215),a=i(18073),l=i(69143),u=i(23599)},83215:function(e,t,i){"use strict";i.d(t,["innerWidth",0,(e,t)=>{let i=t.getComputedStyle(e);return e.clientWidth-(parseFloat(i.paddingLeft||"0")+parseFloat(i.paddingRight||"0"))}])},18073:function(e,t,i){"use strict";i.d(t,{size:function(){return o}});var n=i(28686);function o(e){return(0,n.isString)(e)||(0,n.isArray)(e)?e.length:(0,n.isPlainObject)(e)?Object.keys(e).length:0}},69143:function(e,t,i){"use strict";let n=(e,t,i,o=!1)=>{let r,s,a;try{r=e.getBoundingClientRect()}catch(e){r={top:0,bottom:0,left:0,right:0,width:0,height:0}}let l=i.body,u=i.documentElement||{clientTop:0,clientLeft:0,scrollTop:0,scrollLeft:0},c=i.defaultView||i.parentWindow,d=c.pageYOffset||u.scrollTop||l.scrollTop,h=c.pageXOffset||u.scrollLeft||l.scrollLeft,p=u.clientTop||l.clientTop||0,m=u.clientLeft||l.clientLeft||0,f=t.iframe;if(!o&&t&&t.options&&t.o.iframe&&f){let{top:e,left:i}=n(f,t,t.od,!0);s=r.top+e,a=r.left+i}else s=r.top+d-p,a=r.left+h-m;return{top:Math.round(s),left:Math.round(a),width:r.width,height:r.height}};i.d(t,["offset",0,n])},23599:function(e,t,i){"use strict";i.d(t,{position:function(){return function e(t,i,o=!1){let r=t.getBoundingClientRect(),s=r.left,a=r.top;if((0,n.isJoditObject)(i)&&i.iframe&&i.ed.body.contains(t)&&!o){let{left:t,top:n}=e(i.iframe,i,!0);s+=t,a+=n}return{left:Math.round(s),top:Math.round(a),width:Math.round(t.offsetWidth??r.width),height:Math.round(t.offsetHeight??r.height)}}}});var n=i(24497)},57821:function(e,t,i){"use strict";i.d(t,["camelCase",0,e=>e.replace(/([-_])(.)/g,(e,t,i)=>i.toUpperCase())])},57626:function(e,t,i){"use strict";i.d(t,{fuzzySearchIndex:function(){return o}});var n=i(81937);function o(e,t,i=0,r=1){let s=0,a,l=-1,u=0,c=0;for(a=i;s<e.length&&a<t.length;)e[s].toLowerCase()===t[a].toLowerCase()?(s++,u++,c=0,-1===l&&(l=a)):s>0&&(c>=r&&t[a]!==n.INVISIBLE_SPACE?(s=0,l=-1,u=0,c=0,a--):(c++,u++)),a++;return s===e.length?[l,u]:[-1,0]}},18080:function(e,t,i){"use strict";i.d(t,{i18n:function(){return u}});var n=i(81937),o=i(85932),r=i(99436),s=i(93640),a=i(5266);let l=(e,t)=>{if(!t||!t.length)return e;let i=/%([sd])/g,n=i.exec(e),o=e,r=0;for(;n&&void 0!==t[r];)o=o.replace(n[0],t[r].toString()),r+=1,n=i.exec(e);return o};function u(e,t,i){if(!(0,o.isString)(e))throw(0,s.error)("i18n: Need string in first argument");if(!e.length)return e;let u=!!i?.debugLanguage,c={},d=e=>t&&t.length?l(e,t):e,h=(0,s.defaultLanguage)(a.Config.defaultOptions.language,a.Config.defaultOptions.language),p=(0,s.defaultLanguage)(i?.language,h),m=t=>{if(!t)return;if((0,o.isString)(t[e]))return d(t[e]);let i=e.toLowerCase();if((0,o.isString)(t[i]))return d(t[i]);let n=(0,r.ucfirst)(e);if((0,o.isString)(t[n]))return d(t[n])};void 0!==n.lang[p]?c=n.lang[p]:u||(c=void 0!==n.lang[h]?n.lang[h]:n.lang.en);let f=i?.i18n;if(f&&f[p]){let e=m(f[p]);if(e)return e}return m(c)||(!u&&n.lang.en&&(0,o.isString)(n.lang.en[e])&&n.lang.en[e]?d(n.lang.en[e]):u?"{"+e+"}":(n.IS_PROD,d(e)))}i.d(t,["sprintf",0,l])},97642:function(e,t,i){"use strict";i.d(t,{CamelCaseToKebabCase:function(){return s.CamelCaseToKebabCase},camelCase:function(){return n.camelCase},fuzzySearchIndex:function(){return o.fuzzySearchIndex},i18n:function(){return r.i18n},kebabCase:function(){return s.kebabCase},sprintf:function(){return r.sprintf},stringify:function(){return a.stringify},trim:function(){return l.trim},trimChars:function(){return l.trimChars},trimInv:function(){return l.trimInv},trimInvEnd:function(){return l.trimInvEnd},ucfirst:function(){return u.ucfirst}});var n=i(57821),o=i(57626),r=i(18080),s=i(74264),a=i(3347),l=i(4040),u=i(99436)},74264:function(e,t,i){"use strict";i.d(t,["CamelCaseToKebabCase",0,e=>e.replace(/([A-Z])([A-Z])([a-z])/g,"$1-$2$3").replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),"kebabCase",0,e=>e.replace(/([A-Z])([A-Z])([a-z])/g,"$1-$2$3").replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase()])},3347:function(e,t,i){"use strict";function n(e,t={}){if("object"!=typeof e)return e+"";let i=new Set(t.excludeKeys),o=new WeakMap;return JSON.stringify(e,(e,t)=>{if(!i.has(e)){if("object"==typeof t&&null!=t){if(o.get(t))return"[refObject]";o.set(t,!0)}return t}},t.prettify)}i.d(t,{stringify:function(){return n}})},4040:function(e,t,i){"use strict";i.d(t,{trim:function(){return s},trimChars:function(){return a},trimInv:function(){return l},trimInvEnd:function(){return u}});let n=/[\s\u200b]/,o=/\uFEFF/;function r(e,t){let i=0,n=e.length;for(;i<n&&t.test(e.charAt(i));)i+=1;for(;n>i&&t.test(e.charAt(n-1));)n-=1;return 0===i&&n===e.length?e:e.slice(i,n)}function s(e){return r(e,n)}function a(e,t){return r(e,RegExp(`[${t}]`))}function l(e){return r(e,o)}function u(e){let t=e.length;for(;t>0&&o.test(e.charAt(t-1));)t-=1;return t===e.length?e:e.slice(0,t)}},99436:function(e,t,i){"use strict";function n(e){return e.length?e[0].toUpperCase()+e.substring(1):""}i.d(t,{ucfirst:function(){return n}})},16849:function(e,t,i){"use strict";i.d(t,{alignElement:function(){return g},clearAlign:function(){return m},clearHAlign:function(){return h},getAlignClasses:function(){return c},getHAlign:function(){return p},hAlignElement:function(){return d}});var n=i(27795),o=i(17312),r=i(7909),s=i(80991),a=i(66638),l=i(83314);let u=e=>((0,o.isArray)(e)?e:[e??""]).map(e=>e.split(/\s+/).filter(Boolean)).filter(e=>e.length);function c(e,t){if(!t)return null;let i=n.Dom.isTag(t,new Set(["jodit","jodit-media"]))?t.firstElementChild:(0,l.getWrappedMedia)(e,t)??(0,a.getCaptionedImage)(e,t);return e.o.alignClasses?.[(i??t).nodeName.toLowerCase()]??null}function d(e,t,i){if(i){h(e,i),e.classList.add(...u(i[t||"normal"])[0]??[]);return}t&&"normal"!==t?"center"!==t?((0,s.css)(e,"float",t),(0,s.clearCenterAlign)(e)):(0,s.css)(e,{float:"",display:"block",marginLeft:"auto",marginRight:"auto"}):((0,s.css)(e,"float")&&-1!==["right","left"].indexOf((0,s.css)(e,"float").toString().toLowerCase())&&(0,s.css)(e,"float",""),(0,s.clearCenterAlign)(e))}function h(e,t){d(e,"normal"),t&&Object.values(t).forEach(t=>u(t).forEach(t=>e.classList.remove(...t))),["class","style"].forEach(t=>{(0,r.attr)(e,t)?.trim()||(0,r.attr)(e,t,null)})}function p(e,t){if(t){for(let i of["left","right","center","normal"])if(u(t[i]).some(t=>t.every(t=>e.classList.contains(t))))return i}let i=(0,s.cssInline)(e,"float").toLowerCase();return"left"===i||"right"===i?i:"block"===(0,s.css)(e,"display")&&"auto"===(0,s.cssInline)(e,"margin-left")&&"auto"===(0,s.cssInline)(e,"margin-right")?"center":"normal"}function m(e){n.Dom.each(e,e=>{n.Dom.isHTMLElement(e)&&(0,s.cssInline)(e,"textAlign")&&((0,s.css)(e,"textAlign",""),((0,r.attr)(e,"style")||"").trim().length||(0,r.attr)(e,"style",null))})}let f=new Map([["justifyfull","justify"],["justifyright","right"],["justifyleft","left"],["justifycenter","center"]]);function g(e,t){if(n.Dom.isNode(t)&&n.Dom.isElement(t)){m(t);let i=f.get(e.toLowerCase());i&&(0,s.css)(t,"textAlign",i)}}},85371:function(e,t,i){"use strict";i.d(t,{getAnchorName:function(){return r},getAnchors:function(){return a},isAnchor:function(){return s}});var n=i(23211),o=i(88475);function r(e){return e.id||e.getAttribute("name")||""}function s(e){return n.Dom.isTag(e,"a")&&!e.hasAttribute("href")&&!e.hasChildNodes()&&""!==r(e)}function a(e){return(0,o.toArray)(e.querySelectorAll("a")).filter(s)}},47760:function(e,t,i){"use strict";i.d(t,{loadNext:function(){return function e(t,i,n=0){return(0,o.isString)(i[n])?u(t,i[n]).then(()=>e(t,i,n+1)):Promise.resolve()}},loadNextStyle:function(){return function e(t,i,n=0){return(0,o.isString)(i[n])?c(t,i[n]).then(()=>e(t,i,n+1)):Promise.resolve()}}});var n=i(23211),o=i(85932),r=i(7909),s=i(91321);let a=new Map,l=e=>(t,i)=>{if(a.has(i))return a.get(i);let n=e(t,i);return a.set(i,n),n},u=l((e,t)=>e.async.promise((i,o)=>{if(e.isInDestruct)return o();let a=e.c.element("script",{type:"text/javascript",crossorigin:"anonymous",referrerpolicy:"no-referrer",async:!0,src:(0,s.completeUrl)(t)});e.o.nonce&&(0,r.attr)(a,"nonce",e.o.nonce),e.e.one(a,"error",o).one(a,"load",i),n.Dom.append(e.od.body,a)})),c=l((e,t)=>e.async.promise((i,o)=>{if(e.isInDestruct)return o();let a=e.c.element("link",{rel:"stylesheet",media:"all",crossorigin:"anonymous"});e.o.nonce&&(0,r.attr)(a,"nonce",e.o.nonce),e.isInDestruct||e.e.on(a,"load",()=>i(a)).on(a,"error",o),(0,r.attr)(a,"href",(0,s.completeUrl)(t)),e.o.shadowRoot?n.Dom.append(e.o.shadowRoot,a):n.Dom.append(e.od.body,a)}));i.d(t,["alreadyLoadedList",0,a,"appendScriptAsync",0,u,"appendStyleAsync",0,c])},7909:function(e,t,i){"use strict";i.d(t,{attr:function(){return function e(t,i,l){if(!t||!(0,n.isFunction)(t.getAttribute))return null;if(!(0,r.isString)(i))return Object.keys(i).forEach(n=>{let r=i[n];(0,o.isPlainObject)(r)&&"style"===n?(0,a.css)(t,r):("className"===n&&(n="class"),e(t,n,r))}),null;let u=(0,s.CamelCaseToKebabCase)(i);if(/^-/.test(u)){let i=e(t,"data"+u);if(i)return i;u=u.substr(1)}if(void 0!==l)if(null==l)t.hasAttribute(u)&&t.removeAttribute(u);else{let e=l.toString();return"IMG"===t.nodeName&&("width"===u||"height"===u)&&(e=e.replace("px","")),t.setAttribute(u,e),e}return t.getAttribute(u)}},attrRaw:function(){return l}});var n=i(91565),o=i(62101),r=i(85932),s=i(74264),a=i(80991);function l(e,t,i){if(void 0===i)return e.getAttribute(t);if(null==i){e.hasAttribute(t)&&e.removeAttribute(t);return}e.setAttribute(t,i)}},26136:function(e,t,i){"use strict";i.d(t,["browser",0,e=>{let t=navigator.userAgent.toLowerCase(),i=/(firefox)[\s/]([\w.]+)/.exec(t)||/(chrome)[\s/]([\w.]+)/.exec(t)||/(webkit)[\s/]([\w.]+)/.exec(t)||/(opera)(?:.*version)[\s/]([\w.]+)/.exec(t)||/(msie)[\s]([\w.]+)/.exec(t)||/(trident)\/([\w.]+)/.exec(t)||0>t.indexOf("compatible")||[];return"version"===e?i[2]:"webkit"===e?"chrome"===i[1]||"webkit"===i[1]:"ff"===e?"firefox"===i[1]:"msie"===e?"trident"===i[1]||"msie"===i[1]:i[1]===e}])},36833:function(e,t,i){"use strict";var n=i(62101);let o=(e,t)=>{let i=[],r=encodeURIComponent;for(let s in e)if(Object.prototype.hasOwnProperty.call(e,s)){let a=t?t+"["+s+"]":s,l=e[s];i.push((0,n.isPlainObject)(l)?o(l,a):r(a)+"="+r(l))}return i.join("&")};i.d(t,["buildQuery",0,o])},91321:function(e,t,i){"use strict";var n=i(81937);i.d(t,["completeUrl",0,e=>("file:"===n.globalWindow.location.protocol&&/^\/\//.test(e)&&(e="https:"+e),e)])},77483:function(e,t,i){"use strict";i.d(t,{ConfigDeepFlatten:function(){return function e(t){return(0,c.keys)(t,!1).reduce((i,n)=>(i[n]=(0,o.isPlainObject)(t[n])?e(t[n]):t[n],i),{})}},ConfigFlatten:function(){return d},ConfigMerge:function(){return function e(t,i){Object.keys(i).forEach(n=>{if((0,u.isUnsafeProtoKey)(n))return;let r=i[n],s=t[n];(0,o.isPlainObject)(r)&&(0,o.isPlainObject)(s)&&!(0,l.isAtom)(r)?e(s,r):t[n]=r})}},ConfigProto:function(){return function e(t,i,c=0){if(Object.getPrototypeOf(t)!==Object.prototype)return t;let d=a.Config.defaultOptions;if((0,r.isString)(t.preset)){if(void 0!==d.presets[t.preset]){let e=d.presets[t.preset];Object.keys(e).forEach(i=>{(0,s.isVoid)(t[i])&&(t[i]=e[i])})}delete t.preset}let h={};return Object.keys(t).forEach(r=>{if((0,u.isUnsafeProtoKey)(r))return;let s=t[r],a=i?i[r]:null;if((0,o.isPlainObject)(s)&&(0,o.isPlainObject)(a)&&!(0,l.isAtom)(s)){h[r]=e(s,a,c+1);return}if(0!==c&&(0,n.isArray)(s)&&!(0,l.isAtom)(s)&&(0,n.isArray)(a)){h[r]=[...s,...a.slice(s.length)];return}h[r]=s}),Object.setPrototypeOf(h,i),h}}});var n=i(17312),o=i(62101),r=i(85932),s=i(18303),a=i(5266),l=i(54794),u=i(78048),c=i(71125);function d(e){return(0,c.keys)(e,!1).reduce((t,i)=>(t[i]=e[i],t),{})}},3856:function(e,t,i){"use strict";var n=i(81937),o=i(91764),r=i(36310);i.d(t,["convertMediaUrlToVideoEmbed",0,(e,{width:t=400,height:i=345}={})=>{if(!(0,o.isURL)(e))return e;let s=n.globalDocument.createElement("a");s.href=e,t||(t=400),i||(i=345);let a=s.protocol||"";switch(s.hostname){case"www.vimeo.com":case"vimeo.com":{let n=s.pathname.split("/").filter(Boolean),o=n.findIndex(e=>/^\d+$/.test(e));if(-1===o)return e;let r=n[o],l=n[o+1];return l&&0===o&&(r+="/"+l),'<iframe width="'+t+'" height="'+i+'" src="'+a+"//player.vimeo.com/video/"+r+'" frameborder="0" allowfullscreen></iframe>'}case"youtube.com":case"www.youtube.com":case"m.youtube.com":case"music.youtube.com":case"youtu.be":case"www.youtu.be":{let n=(s.search?(0,r.parseQuery)(s.search):{}).v||s.pathname.substring(1);return(n=n.replace(/^(watch|embed|shorts|live|v)\//,"").replace(/\/$/,""))?'<iframe width="'+t+'" height="'+i+'" src="'+a+"//www.youtube.com/embed/"+n+'" frameborder="0" allowfullscreen></iframe>':e}}return e}])},80991:function(e,t,i){"use strict";i.d(t,{css:function(){return l},cssInline:function(){return u}});var n=i(22289),o=i(62101),r=i(19147),s=i(57821),a=i(74264);function l(e,t,i,u=!1){if((0,n.isBoolean)(i)&&(u=i,i=void 0),(0,o.isPlainObject)(t)||void 0!==i){let n=(e,t,i)=>{void 0!==(i=(0,r.normalizeCssNumericValue)(t,i))&&(null==i||l(e,t,!0)!==(0,r.normalizeCssValue)(t,i))&&(e.style[t]=i)};if((0,o.isPlainObject)(t)){let i=Object.keys(t);for(let o=0;o<i.length;o+=1)n(e,(0,s.camelCase)(i[o]),t[i[o]])}else n(e,(0,s.camelCase)(t),i);return""}let c=(0,a.kebabCase)(t),d=e.ownerDocument||document,h=!!d&&(d.defaultView||d.parentWindow),p=e.style[t],m="";return void 0!==p&&""!==p?m=p:h&&!u&&(m=h.getComputedStyle(e).getPropertyValue(c)),r.NUMBER_FIELDS_REG.test(t)&&/^[-+]?[0-9.]+px$/.test(m.toString())&&(m=parseInt(m.toString(),10)),(0,r.normalizeCssValue)(t,m)}function u(e,t){return e.style.getPropertyValue((0,a.kebabCase)(t))}i.d(t,["clearCenterAlign",0,e=>{"block"===l(e,"display")&&l(e,"display","");let{style:t}=e;"auto"===t.marginLeft&&"auto"===t.marginRight&&(t.marginLeft="",t.marginRight="")}])},77213:function(e,t,i){"use strict";i.d(t,["ctrlKey",0,e=>{if("u">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}])},36400:function(e,t,i){"use strict";var n=i(31534);let o=new WeakMap;i.d(t,["dataBind",0,(e,t,i)=>{let r=o.get(e);if(!r){r={},o.set(e,r);let t=null;(0,n.isViewObject)(e.j)&&(t=e.j.e),(0,n.isViewObject)(e)&&(t=e.e),t&&t.on("beforeDestruct",()=>{o.delete(e)})}return void 0===i?r[t]:(r[t]=i,i)}])},97228:function(e,t,i){"use strict";var n=i(81937),o=i(85932);i.d(t,["defaultLanguage",0,(e,t="en")=>"auto"!==e&&(0,o.isString)(e)?e:n.globalDocument.documentElement&&n.globalDocument.documentElement.lang?n.globalDocument.documentElement.lang:navigator.language?navigator.language.substring(0,2):t])},38027:function(e,t,i){"use strict";i.d(t,{answer:function(){return a},connection:function(){return r},error:function(){return o},options:function(){return s}});var n=i(29953);function o(e){return TypeError(e)}function r(e){return new n.ConnectionError(e)}function s(e){return new n.OptionsError(e)}function a(e,t,i){return new n.AnswerError(e,t,i)}},14228:function(e,t,i){"use strict";function n(e="Aborted"){return new DOMException(e,"AbortError")}i.d(t,{abort:function(){return n}})},45052:function(e,t,i){"use strict";i.d(t,{AnswerError:function(){return o}});var n=i(25045);class o extends Error{constructor(e,t,i){super(e),(0,n._)(this,"answer",void 0),(0,n._)(this,"code",void 0),this.answer=t,this.code=i,Object.setPrototypeOf(this,o.prototype)}}},58250:function(e,t,i){"use strict";i.d(t,{ConnectionError:function(){return n}});class n extends Error{constructor(e){super(e),Object.setPrototypeOf(this,n.prototype)}}},29953:function(e,t,i){"use strict";i.d(t,{AnswerError:function(){return o.AnswerError},ConnectionError:function(){return r.ConnectionError},OptionsError:function(){return s.OptionsError},abort:function(){return n.abort}});var n=i(14228),o=i(45052),r=i(58250),s=i(11080)},11080:function(e,t,i){"use strict";i.d(t,{OptionsError:function(){return n}});class n extends TypeError{constructor(e){super(e),Object.setPrototypeOf(this,n.prototype)}}},33201:function(e,t,i){"use strict";i.d(t,{AnswerError:function(){return o.AnswerError},ConnectionError:function(){return o.ConnectionError},OptionsError:function(){return o.OptionsError},abort:function(){return o.abort},answer:function(){return n.answer},connection:function(){return n.connection},error:function(){return n.error},options:function(){return n.options}});var n=i(38027),o=i(29953)},54794:function(e,t,i){"use strict";i.d(t,{fastClone:function(){return s},isAtom:function(){return o},markAsAtomic:function(){return r}});var n=i(3347);function o(e){return e&&e.isAtom}function r(e){return Object.defineProperty(e,"isAtom",{enumerable:!1,value:!0,configurable:!1}),e}function s(e){return JSON.parse((0,n.stringify)(e))}},421:function(e,t,i){"use strict";var n=i(91565);let o=new Map;i.d(t,["getClassName",0,e=>{if((0,n.isFunction)(e.className))return e.className();let t=e.constructor?.originalConstructor||e.constructor;if(o.has(t))return o.get(t);if(t.name)return t.name;let i=new RegExp(/^\s*function\s*(\S*)\s*\(/),r=t.toString().match(i);return r?r[1]:""},"keepNames",0,o])},89308:function(e,t,i){"use strict";i.d(t,{get:function(){return r}});var n=i(85932),o=i(18303);function r(e,t){if(!(0,n.isString)(e)||!e.length)return null;let i=e.split("."),r=t;try{for(let e of i){if((0,o.isVoid)(r[e]))return null;r=r[e]}}catch{return null}return(0,o.isVoid)(r)?null:r}},37427:function(e,t,i){"use strict";i.d(t,["humanSizeToBytes",0,e=>{if(/^[0-9.]+$/.test(e.toString()))return parseFloat(e);let t=e.substr(-2,2).toUpperCase(),i=["KB","MB","GB","TB"],n=parseFloat(e.substr(0,e.length-2));return -1!==i.indexOf(t)?n*Math.pow(1024,i.indexOf(t)+1):parseInt(e,10)}])},66638:function(e,t,i){"use strict";i.d(t,{getCaptionWrapper:function(){return l},getCaptionedImage:function(){return a},getImageCaption:function(){return s}});var n=i(23211),o=i(88475);let r=(e,t)=>n.Dom.isHTMLElement(e)&&e.nodeName.toLowerCase()===t.tag.toLowerCase()&&(!t.className||e.classList.contains(t.className));function s(e,t){let i=e.o.imageCaption;return i&&r(t,i.wrapper)?(0,o.toArray)(t.getElementsByTagName(i.caption.tag)).find(e=>r(e,i.caption))??null:null}function a(e,t){let i=s(e,t);if(!i)return null;let n=t.getElementsByTagName("img");return 1!==n.length||i.contains(n[0])?null:n[0]}function l(e,t){return n.Dom.closest(t,t=>!!a(e,t),e.editor)}},93640:function(e,t,i){"use strict";i.r(t),i.d(t,{$$:function(){return P.$$},AnswerError:function(){return b.AnswerError},ConfigDeepFlatten:function(){return p.ConfigDeepFlatten},ConfigFlatten:function(){return p.ConfigFlatten},ConfigMerge:function(){return p.ConfigMerge},ConfigProto:function(){return p.ConfigProto},ConnectionError:function(){return b.ConnectionError},LimitedStack:function(){return M.LimitedStack},OptionsError:function(){return b.OptionsError},UNSAFE_PROTO_KEYS:function(){return E.UNSAFE_PROTO_KEYS},abort:function(){return b.abort},alignElement:function(){return n.alignElement},alreadyLoadedList:function(){return r.alreadyLoadedList},answer:function(){return b.answer},appendScriptAsync:function(){return r.appendScriptAsync},appendStyleAsync:function(){return r.appendStyleAsync},attr:function(){return u.attr},attrRaw:function(){return u.attrRaw},browser:function(){return c.browser},buildQuery:function(){return d.buildQuery},call:function(){return N.call},callPromise:function(){return N.callPromise},callThis:function(){return N.callThis},clearAlign:function(){return n.clearAlign},clearCenterAlign:function(){return f.clearCenterAlign},clearHAlign:function(){return n.clearHAlign},cns:function(){return D.cns},completeUrl:function(){return h.completeUrl},connection:function(){return b.connection},convertMediaUrlToVideoEmbed:function(){return m.convertMediaUrlToVideoEmbed},createMediaWrapper:function(){return T.createMediaWrapper},css:function(){return f.css},cssInline:function(){return f.cssInline},cssPath:function(){return P.cssPath},ctrlKey:function(){return g.ctrlKey},dataBind:function(){return _.dataBind},defaultLanguage:function(){return v.defaultLanguage},error:function(){return b.error},fastClone:function(){return y.fastClone},get:function(){return w.get},getAlignClasses:function(){return n.getAlignClasses},getAnchorName:function(){return o.getAnchorName},getAnchors:function(){return o.getAnchors},getCaptionWrapper:function(){return C.getCaptionWrapper},getCaptionedImage:function(){return C.getCaptionedImage},getClassName:function(){return k.getClassName},getDataTransfer:function(){return N.getDataTransfer},getHAlign:function(){return n.getHAlign},getImageCaption:function(){return C.getImageCaption},getMediaWrapper:function(){return T.getMediaWrapper},getPropertyDescriptor:function(){return N.getPropertyDescriptor},getWrappedMedia:function(){return T.getWrappedMedia},getXPathByElement:function(){return P.getXPathByElement},hAlignElement:function(){return n.hAlignElement},humanSizeToBytes:function(){return S.humanSizeToBytes},inView:function(){return L.inView},isAnchor:function(){return o.isAnchor},isAtom:function(){return y.isAtom},isUnsafeProtoKey:function(){return E.isUnsafeProtoKey},keepNames:function(){return k.keepNames},keys:function(){return N.keys},loadImage:function(){return N.loadImage},loadNext:function(){return r.loadNext},loadNextStyle:function(){return r.loadNextStyle},markAsAtomic:function(){return y.markAsAtomic},markDeprecated:function(){return D.markDeprecated},markOwner:function(){return N.markOwner},memorizeExec:function(){return N.memorizeExec},options:function(){return b.options},parseQuery:function(){return I.parseQuery},prepareEmbedCode:function(){return x.prepareEmbedCode},prepareMedia:function(){return x.prepareMedia},previewBox:function(){return j.previewBox},refs:function(){return P.refs},reset:function(){return A.reset},resolveElement:function(){return P.resolveElement},scrollIntoViewIfNeeded:function(){return L.scrollIntoViewIfNeeded},set:function(){return z.set},wrapMedia:function(){return T.wrapMedia}});var n=i(16849),o=i(85371),r=i(47760),s=i(28712),a={};for(var l in s)0>["default","alignElement","clearAlign","clearHAlign","getAlignClasses","getHAlign","hAlignElement","getAnchorName","getAnchors","isAnchor","alreadyLoadedList","appendScriptAsync","appendStyleAsync","loadNext","loadNextStyle"].indexOf(l)&&(a[l]=(function(e){return s[e]}).bind(0,l));i.d(t,a);var u=i(7909),c=i(26136),d=i(36833),h=i(91321),p=i(77483),m=i(3856),f=i(80991),g=i(77213),_=i(36400),v=i(97228),b=i(33201),y=i(54794),w=i(89308),k=i(421),S=i(37427),C=i(66638),E=i(78048),D=i(49385),T=i(83314),I=i(36310),x=i(89214),j=i(57075),A=i(43379),L=i(60898),P=i(28723),z=i(52144),M=i(42820),N=i(71125)},78048:function(e,t,i){"use strict";i.d(t,{isUnsafeProtoKey:function(){return o}});let n=["__proto__","constructor","prototype"];function o(e){return -1!==n.indexOf(e)}i.d(t,["UNSAFE_PROTO_KEYS",0,n])},49385:function(e,t,i){"use strict";i.d(t,{markDeprecated:function(){return o}});let n=console;function o(e,t=[""],i=null){return(...o)=>(n.warn(`Method "${t[0]}" deprecated.`+(t[1]?` Use "${t[1]}" instead`:"")),e.call(i,...o))}i.d(t,["cns",0,n])},83314:function(e,t,i){"use strict";i.d(t,{createMediaWrapper:function(){return a},getMediaWrapper:function(){return s},getWrappedMedia:function(){return r},wrapMedia:function(){return l}});var n=i(23211);let o=(e,t)=>n.Dom.isHTMLElement(e)&&e.nodeName.toLowerCase()===t.tag.toLowerCase()&&e.classList.contains(t.className);function r(e,t){for(let[i,n]of Object.entries(e.o.mediaWrappers??{}))if(o(t,n)){let e=t.querySelector(i);if(e)return e}return null}function s(e,t){return n.Dom.closest(t,t=>!!r(e,t),e.editor)}function a(e,t){let i=e.o.mediaWrappers?.[t.toLowerCase()];return i?e.createInside.element(i.tag,{class:i.className,contenteditable:!1,draggable:!0}):null}function l(e,t){let i=a(e,t.nodeName);return i?(t.parentNode&&n.Dom.before(t,i),n.Dom.append(i,t),i):t}},36310:function(e,t,i){"use strict";i.d(t,["parseQuery",0,e=>{let t={},i=e.substring(1).split("&");for(let e=0;e<i.length;e+=1){let n=i[e].split("=");t[decodeURIComponent(n[0])]=decodeURIComponent(n[1]||"")}return t}])},89214:function(e,t,i){"use strict";i.d(t,{prepareEmbedCode:function(){return s},prepareMedia:function(){return r}});var n=i(16849),o=i(83314);function r(e,t){let i=(0,o.wrapMedia)(e,t),{mediaDefaultAlign:r}=e.o;return r&&"normal"!==r&&(0,n.hAlignElement)(i,r,(0,n.getAlignClasses)(e,i)),i}function s(e,t){let i=e.createInside.div();i.innerHTML=t.trim();let n=i.firstElementChild;return n&&1===i.childNodes.length?r(e,n):t}},57075:function(e,t,i){"use strict";i.d(t,{previewBox:function(){return a}});var n=i(23211),o=i(85932),r=i(7909),s=i(80991);function a(e,t,i="px",l=null){let u=[],c=function(e,t){let i=[],o=[];n.Dom.each(e.editor,e=>{n.Dom.isTag(e,"img")&&o.push(e)});try{o.forEach(o=>{let s=[(0,r.attr)(o,"width"),(0,r.attr)(o,"height"),(0,r.attr)(o,"src")];(0,r.attr)(o,{width:o.offsetWidth+t,height:o.offsetHeight+t});let a=e.createInside.a();n.Dom.append(e.ed.body,a),(0,r.attr)(a,"href",(0,r.attr)(o,"src")||""),(0,r.attr)(o,"src",a.href),n.Dom.safeRemove(a),i.push(()=>{(0,r.attr)(o,{src:s[2],width:s[0]||null,height:s[1]||null})})})}catch(e){throw i.forEach(e=>e()),i.length=0,e}return i}(e,i);try{let a=e.e.fire("beforePreviewBox",t,i);if(null!=a)return a;let c=e.c.div("jodit__preview-box jodit-context");l&&n.Dom.append(l,c),(0,s.css)(c,{position:"relative",padding:16});let d=e.value||`<div style='position: absolute;left:50%;top:50%;transform: translateX(-50%) translateY(-50%);color:#ccc;'>${e.i18n("Empty")}</div>`;if(e.iframe){let t=e.create.element("iframe");(0,s.css)(t,{minWidth:800,minHeight:600,border:0}),n.Dom.append(c,t);let i=t.contentWindow;if(i&&(e.e.fire("generateDocumentStructure.iframe",i.document,e),c=i.document.body,"function"==typeof ResizeObserver)){let n=!1,o=i.document.body,r=new ResizeObserver(e.async.debounce(()=>{r.unobserve(o),(0,s.css)(t,"height",o.offsetHeight+20),e.async.requestAnimationFrame(()=>{n||r.observe(o)})},100)),a=()=>{n=!0,r.unobserve(o),r.disconnect(),e.e.off("beforeDestruct",a)};u.push(a),e.e.on("beforeDestruct",a)}}else(0,s.css)(c,{minWidth:1024,minHeight:600,border:0});let h=(t,i)=>{let s=(0,o.isString)(i)?e.c.div():i;(0,o.isString)(i)&&(s.innerHTML=i);for(let e=0;e<s.childNodes.length;e+=1){let i=s.childNodes[e];if(n.Dom.isElement(i)){let e=t.ownerDocument.createElement(i.nodeName);for(let t=0;t<i.attributes.length;t+=1)(0,r.attr)(e,i.attributes[t].name,i.attributes[t].value);0===i.childNodes.length||n.Dom.isTag(i,"table")?"SCRIPT"===i.nodeName?i.textContent&&(e.textContent=i.textContent):i.innerHTML&&(e.innerHTML=i.innerHTML):h(e,i);try{n.Dom.append(t,e)}catch{}}else try{n.Dom.append(t,i.cloneNode(!0))}catch{}}};return h(c,d),e.e.fire("afterPreviewBox",c),[c,()=>{u.forEach(e=>e())}]}finally{c.forEach(e=>e())}}},43379:function(e,t,i){"use strict";i.d(t,{reset:function(){return a}});var n=i(81937),o=i(91565),r=i(89308);let s={};function a(e){if(!(e in s)){let t=n.globalDocument.createElement("iframe");try{if(t.src="about:blank",n.globalDocument.body.appendChild(t),!t.contentWindow)return null;let i=(0,r.get)(e,t.contentWindow),a=(0,r.get)(e.split(".").slice(0,-1).join("."),t.contentWindow);(0,o.isFunction)(i)&&(s[e]=i.bind(a))}catch(e){if(!n.IS_PROD)throw e}finally{t.parentNode?.removeChild(t)}}return s[e]??null}},60898:function(e,t,i){"use strict";i.d(t,{inView:function(){return o},scrollIntoViewIfNeeded:function(){return r}});var n=i(23211);function o(e,t,i){let n=e.getBoundingClientRect(),o=e,r=n.top,s=n.height;for(;o&&o!==t&&o.parentNode;)if(r+s>(n=(o=o.parentNode).getBoundingClientRect()).bottom+1&&r>n.top||r+s<=n.top)return!1;let a=i.documentElement&&i.documentElement.clientHeight||0,l=i.defaultView?.getComputedStyle(i.documentElement),u=(e="")=>e.endsWith("%")?parseFloat(e)*a/100:parseFloat(e)||0,c=u(l?.scrollPaddingTop);return(r+s<=a-u(l?.scrollPaddingBottom)+1||c>=r)&&r+s>=c}function r(e,t,i){if(n.Dom.isHTMLElement(e)&&!o(e,t,i)){if(t.clientHeight!==t.scrollHeight){let i=e.offsetTop+e.offsetHeight-t.clientHeight;t.scrollTop=t.scrollTop<i?i:e.offsetTop}o(e,t,i)||e.scrollIntoView({block:"nearest"})}}},28723:function(e,t,i){"use strict";i.d(t,{$$:function(){return d},resolveElement:function(){return p}});var n=i(81937),o=i(23211),r=i(88475),s=i(85932),a=i(57821),l=i(7909),u=i(33201);let c=1;function d(e,t){let i;if(!n.IS_ES_NEXT&&/:scope/.test(e)&&n.IS_IE&&!(t&&t.nodeType===Node.DOCUMENT_NODE)){let n=t.id,o=n||"_selector_id_"+(Math.random()+"").slice(2)+ ++c;e=e.replace(/:scope/g,"#"+o),n||t.setAttribute("id",o),i=t.parentNode.querySelectorAll(e),n||t.removeAttribute("id")}else i=t.querySelectorAll(e);return[].slice.call(i)}let h=(e,t)=>{if(!e||e.nodeType!==Node.ELEMENT_NODE||!e.parentNode||t===e)return"";if(e.id)return"//*[@id='"+e.id+"']";let i=[].filter.call(e.parentNode.childNodes,t=>t.nodeName===e.nodeName);return h(e.parentNode,t)+"/"+e.nodeName.toLowerCase()+(i.length>1?"["+((0,r.toArray)(i).indexOf(e)+1)+"]":"")};function p(e,t){let i=e;if((0,s.isString)(e))try{i=t.querySelector(e)}catch{throw(0,u.error)('String "'+e+'" should be valid HTML selector')}if(!i||"object"!=typeof i||!o.Dom.isElement(i)||!i.cloneNode)throw(0,u.error)('Element "'+e+'" should be string or HTMLElement instance');return i}i.d(t,["cssPath",0,e=>{if(!o.Dom.isElement(e))return null;let t=[],i=e;for(;i&&i.nodeType===Node.ELEMENT_NODE;){let e=i.nodeName.toLowerCase();if(i.id){e+="#"+i.id,t.unshift(e);break}{let t=i,n=1;do(t=t.previousElementSibling)&&t.nodeName.toLowerCase()===e&&n++;while(t)e+=":nth-of-type("+n+")"}t.unshift(e),i=i.parentNode}return t.join(" > ")},"getXPathByElement",0,h,"refs",0,e=>{"container"in e&&(e=e.container);let t={};return o.Dom.each(e,e=>{if(o.Dom.isElement(e)&&(e.hasAttribute("ref")||e.hasAttribute("data-ref"))){let i=(0,l.attr)(e,"-ref");i&&(0,s.isString)(i)&&(t[(0,a.camelCase)(i)]=e,t[i]=e)}}),t}])},52144:function(e,t,i){"use strict";i.d(t,{set:function(){return l}});var n=i(17312),o=i(70222),r=i(62101),s=i(85932),a=i(78048);function l(e,t,i){if(!(0,s.isString)(e)||!e.length)return;let l=e.split(".");if(l.some(a.isUnsafeProtoKey))return;let u=i;for(let e=0;e<l.length-1;e+=1){let t=l[e];(0,n.isArray)(u[t])||(0,r.isPlainObject)(u[t])||(u[t]=(0,o.isNumeric)(l[e+1])?[]:{}),u=u[t]}u&&(u[l[l.length-1]]=t)}},42820:function(e,t,i){"use strict";i.d(t,{LimitedStack:function(){return o}});var n=i(25045);class o{push(e){return this.stack.push(e),this.stack.length>this.limit&&this.stack.shift(),this}pop(){return this.stack.pop()}find(e){return this.stack.find(e)}constructor(e){(0,n._)(this,"limit",void 0),(0,n._)(this,"stack",void 0),this.limit=e,this.stack=[]}}},71125:function(e,t,i){"use strict";i.d(t,{call:function(){return a},callPromise:function(){return c},callThis:function(){return l},getPropertyDescriptor:function(){return d},markOwner:function(){return u}});var n=i(52100),o=i(18303),r=i(7909),s=i(36400);function a(e,...t){return e(...t)}function l(e,t,...i){return e.apply(t,i)}function u(e,t){(0,r.attr)(t,"data-editor_id",e.id),t.component||Object.defineProperty(t,"jodit",{value:e})}function c(e,t){return(0,n.isPromise)(e)?e.then(e=>e,()=>null).finally(t):t?.()}function d(e,t){let i;do i=Object.getOwnPropertyDescriptor(e,t),e=Object.getPrototypeOf(e);while(!i&&e)return i}i.d(t,["getDataTransfer",0,e=>{if(e.clipboardData)return e.clipboardData;try{return e.dataTransfer||new DataTransfer}catch{return null}},"keys",0,(e,t=!0)=>{if(t)return Object.keys(e);let i=[];for(let t in e)i.push(t);return i},"loadImage",0,(e,t)=>t.async.promise((i,n)=>{let o=new Image,r=()=>{t.e.off(o),n?.()},s=()=>{t.e.off(o),i(o)};t.e.one(o,"load",s).one(o,"error",r).one(o,"abort",r),o.src=e,o.complete&&s()}),"memorizeExec",0,(e,t,{control:i},n)=>{let r="button"+i.command,a=(i.args&&i.args[0])??(0,s.dataBind)(e,r);if((0,o.isVoid)(a))return!1;(0,s.dataBind)(e,r,a),n&&(a=n(a)),e.execCommand(i.command,!1,a??void 0)}])},55810:function(e,t,i){"use strict";i.d(t,{init:function(){return s}});var n=i(81937),o=i(52433),r=i(3050);function s(e,t,i,s,a,l,u){if((0,o.isInitable)(s))try{s.init(e)}catch(e){if(!n.IS_PROD)throw e}a.set(t,s),l.delete(t),s.hasStyle&&(0,r.loadStyle)(e,t).catch(e=>{n.IS_PROD}),s.styles&&(u(e,t,"style").innerHTML=s.styles)}},3050:function(e,t,i){"use strict";i.d(t,{loadExtras:function(){return c},loadStyle:function(){return l}});var n=i(81937),o=i(74264),r=i(47760),s=i(86189);let a=new Set;async function l(e,t){let i=u(e,t,!1);if(!a.has(i))return a.add(i),(0,r.appendStyleAsync)(e,i)}function u(e,t,i){t=(0,o.kebabCase)(t);let n=e.minified?".min":"";return e.basePath+"plugins/"+t+"/"+t+n+"."+(i?"js":"css")}function c(e,t,i,o){try{let n=i.filter(t=>!e.has((0,s.normalizeName)(t.name)));n.length&&n.map(e=>{let i=e.url||u(t,e.name,!0);return(0,r.appendScriptAsync)(t,i).then(o).catch(()=>null)})}catch(e){if(!n.IS_PROD)throw e}}},25974:function(e,t,i){"use strict";i.d(t,{makeInstance:function(){return r}});var n=i(81937),o=i(91565);function r(e,t){try{try{return(0,o.isFunction)(t)?new t(e):t}catch(i){if((0,o.isFunction)(t)&&!t.prototype)return t(e)}}catch(e){if(!n.IS_PROD)throw e}return null}},86189:function(e,t,i){"use strict";i.d(t,{normalizeName:function(){return o}});var n=i(74264);function o(e){return(0,n.kebabCase)(e).toLowerCase()}},91206:function(e,t,i){"use strict";i.d(t,{Plugin:function(){return n.Plugin}});var n=i(18855);i(85305)},85305:function(e,t,i){"use strict";i.d(t,{PluginSystem:function(){return m}});var n=i(25045),o=i(81937),r=i(42689),s=i(32328),a=i(17312),l=i(52433),u=i(85932),c=i(55810),d=i(3050),h=i(25974),p=i(86189);class m{get size(){return this.__items.size}add(e,t){this.__items.set((0,p.normalizeName)(e),t),r.eventEmitter.fire(`plugin:${e}:ready`)}get(e){return this.__items.get((0,p.normalizeName)(e))}remove(e){this.__items.delete((0,p.normalizeName)(e))}__getFullPluginsList(e){let t=[];return this.__items.forEach((i,n)=>{(!e||e.has(n))&&t.push([n,i])}),t}__init(e){let{extraList:t,disableList:i,filter:n}={extraList:e.o.extraPlugins.map(e=>(0,u.isString)(e)?{name:e}:e),disableList:new Set((0,s.splitArray)(e.o.disablePlugins).map(p.normalizeName)),filter:e.o.safeMode?new Set(e.o.safePluginsList):null},r=new Map,m={},f=new Set;e.__plugins=m;let g=()=>{if(e.isInDestruct)return;let t=!1;this.__getFullPluginsList(n).forEach(([n,o])=>{if(i.has(n)||r.has(n))return;let s=o?.requires;if(s&&(0,a.isArray)(s)&&s.length){if(s.some(e=>i.has(e)))return;if(!s.every(e=>r.has(e)))return void f.add(n)}t=!0;let l=(0,h.makeInstance)(e,o);if(!l){r.set(n,null),f.delete(n);return}(0,c.init)(e,n,o,l,r,f,this.opts.getContainer),m[n]=l}),t&&(e.e.fire("updatePlugins"),g())};t&&t.length&&(0,d.loadExtras)(this.__items,e,t,g),g(),e.e.on("beforeDestruct",()=>{Object.keys(m).forEach(t=>{let i=m[t];(0,l.isDestructable)(i)&&i.destruct(e),delete m[t]}),delete e.__plugins}),o.IS_PROD||f.size}wait(e){return new Promise(t=>{if(this.get(e))return t();let i=()=>{t(),r.eventEmitter.off(`plugin:${e}:ready`,i)};r.eventEmitter.on(`plugin:${e}:ready`,i)})}constructor(e){(0,n._)(this,"opts",void 0),(0,n._)(this,"__items",void 0),this.opts=e,this.__items=new Map}}},18855:function(e,t,i){"use strict";i.d(t,{Plugin:function(){return l}});var n=i(25045),o=i(62445),r=i(16964),s=i(84839),a=i(24497);class l extends r.ViewComponent{className(){return"Plugin"}__afterPluginSystemInit(){let{j:e,buttons:t}=this;t&&(0,a.isJoditObject)(e)&&t.forEach(t=>{e.registerButton(t)})}__afterInit(){this.__inited=!0,this.setStatus(r.STATUSES.ready),this.afterInit(this.jodit)}init(e){this.jodit.isReady&&(this.afterInit(this.jodit),this.__afterPluginSystemInit(),this.jodit.e.fire("rebuildToolbar"))}__beforeDestruct(){if(this.isInDestruct)return;let{j:e}=this;if(e.e.off("afterPluginSystemInit",this.__afterPluginSystemInit).off("afterInit",this.__afterInit).off("beforeDestruct",this.destruct),this.setStatus(r.STATUSES.beforeDestruct),!this.__inited)return super.destruct();(0,a.isJoditObject)(e)&&this.buttons?.forEach(t=>{e?.unregisterButton(t)}),this.beforeDestruct(this.j),super.destruct()}constructor(e){super(e),(0,n._)(this,"buttons",[]),(0,n._)(this,"hasStyle",!1),(0,n._)(this,"styles",void 0),(0,n._)(this,"__inited",!1),e.e.on("afterPluginSystemInit",this.__afterPluginSystemInit).on("afterInit",this.__afterInit).on("beforeDestruct",this.__beforeDestruct)}}(0,n._)(l,"requires",[]),(0,o._)([s.autobind],l.prototype,"__afterPluginSystemInit",null),(0,o._)([s.autobind],l.prototype,"__afterInit",null),(0,o._)([s.autobind],l.prototype,"__beforeDestruct",null)},17338:function(e,t,i){"use strict";i.d(t,{Ajax:function(){return h}});var n=i(25045),o=i(62445),r=i(91231),s=i(81937),a=i(49574),l=i(65946),u=i(33201),c=i(5266);i(37102);var d=i(32855);class h{className(){return"Ajax"}__buildParams(e,t){return(0,l.isPlainObject)(e)&&this.options.contentType&&this.options.contentType.includes("application/json")?JSON.stringify(e):(0,l.isFunction)(this.o.queryBuild)?this.o.queryBuild.call(this,e,t):(0,l.isString)(e)||e instanceof s.globalWindow.FormData||"object"==typeof e&&null!=e&&(0,l.isFunction)(e.append)?e:(0,l.buildQuery)(e)}get o(){return this.options}abort(){if(this.__isFulfilled)return this;try{this.__isFulfilled=!0,this.xhr.abort()}catch{}return this}__hasAnswerEnvelope(){let{xhr:e}=this;if(e.responseType&&"text"!==e.responseType)return!1;let t=e.responseText;if(!t||"{"!==t[0])return!1;try{let e=JSON.parse(t);return(0,l.isPlainObject)(e)&&"success"in e}catch{return!1}}send(){this.__activated=!0;let{xhr:e,o:t}=this,i=this.prepareRequest();return this.__async.promise(async(n,o)=>{let r=()=>{this.__isFulfilled=!0,o(u.connection("Connection error"))},s=()=>{this.__isFulfilled=!0,n(new d.Response(i,e.status,e.statusText,!e.responseType?e.responseText:e.response))};e.onload=s,e.onabort=()=>{this.__isFulfilled=!0,o(u.abort("Abort connection"))},e.onerror=r,e.ontimeout=r,t.responseType&&(e.responseType=t.responseType),e.onprogress=e=>{let t=0;e.lengthComputable&&(t=e.loaded/e.total*100),this.options.onProgress?.(t)},e.onreadystatechange=()=>{this.options.onProgress?.(10),e.readyState===XMLHttpRequest.DONE&&(t.successStatuses.includes(e.status)||this.__hasAnswerEnvelope()?s():e.statusText&&(this.__isFulfilled=!0,o(u.connection(e.statusText))))},e.withCredentials=t.withCredentials??!1;let{url:a,data:c,method:h}=i;e.open(h,a,!0),t.contentType&&e.setRequestHeader&&e.setRequestHeader("Content-type",t.contentType);let{headers:p}=t;(0,l.isFunction)(p)&&(p=await p.call(this)),p&&e.setRequestHeader&&Object.keys(p).forEach(t=>{e.setRequestHeader(t,p[t])}),this.__async.setTimeout(()=>{e.send(c?this.__buildParams(c):void 0)},0)})}async *stream(){this.__activated=!0;let{xhr:e,o:t}=this,i=this.prepareRequest(),n=0,o="",r=[],s=null,a=!1,c=null,d=()=>{if(s){let e=s;s=null,e()}},h=t=>{let i=e.responseText;o+=i.substring(n),n=i.length;let s=o.split(`
11
11
 
12
12
  `);for(let e of(o=t?"":s.pop()??"",s)){let t=e.trim();if(!t)continue;let i=[];for(let e of t.split(`
@@ -35,7 +35,7 @@
35
35
  <div class="${t("footer")}"></div>
36
36
  <div class="${t("resizer")}">${f.Icon.get("resize_handler")}</div>
37
37
  </div>
38
- </div>`),"rtl"===this.options.direction&&((0,p.css)(this.container,"direction","rtl"),(0,p.attr)(this.container,"dir","rtl")),this.o.zIndex&&(0,p.css)(this.container,"zIndex",this.o.zIndex.toString()),(0,p.attr)(this.container,"role","dialog"),Object.defineProperty(this.container,"component",{value:this}),this.setMod("theme",this.o.theme||"default").setMod("resizable",!!this.o.resizable);let i=this.getElm("panel");(0,m.assert)(null!=i,"Panel element does not exist");let o=this.getElm("resizer");(0,m.assert)(null!=o,"Resizer element does not exist");let r=this.getElm("header-title");(0,m.assert)(null!=r,"header-title element does not exist");let s=this.getElm("content");(0,m.assert)(null!=s,"Content element does not exist");let a=this.getElm("footer");(0,m.assert)(null!=a,"Footer element does not exist");let c=this.getElm("header-toolbar");(0,m.assert)(null!=c,"header-toolbar element does not exist"),this.dialog=i,this.resizer=o,this.dialogbox_header=r,this.dialogbox_content=s,this.dialogbox_footer=a,this.dialogbox_toolbar=c,(0,p.css)(this.dialog,{maxWidth:this.options.maxWidth,minHeight:this.options.minHeight,minWidth:this.options.minWidth});let h=this.getElm("header");h&&this.e.on(h,"pointerdown touchstart",this.__onHeaderMouseDown),this.e.on(this.resizer,"mousedown touchstart",this.__onResizerMouseDown);let g=u.pluginSystem.get("fullsize");if((0,d.isFunction)(g)&&g(this),this.e.on(this.container,"close_dialog",this.close).on(this.ow,"keydown",this.__onEsc).on(this.ow,"resize",this.__onResize),this.o.closeOnClickOverlay){let e=this.getElm("overlay");(0,m.assert)(null!=e,"Overlay element does not exist"),this.e.on(e,"click",this.close)}}}(0,n._)(y,"__opened",new Set),(0,n._)(y,"defaultOptions",{...g.View.defaultOptions,closeOnClickOverlay:!1,closeOnEsc:!0}),(0,o._)([a.autobind],y.prototype,"__onMouseUp",null),(0,o._)([a.autobind],y.prototype,"__onHeaderMouseDown",null),(0,o._)([a.autobind],y.prototype,"__onMouseMove",null),(0,o._)([a.autobind],y.prototype,"__onEsc",null),(0,o._)([a.autobind],y.prototype,"__onResizerMouseDown",null),(0,o._)([a.autobind],y.prototype,"close",null),(0,o._)([(0,a.hook)("ready")],y.prototype,"buildToolbar",null),y=(0,o._)([a.component],y)},37333:function(e,t,i){"use strict";i.d(t,{Alert:function(){return n.Alert},Confirm:function(){return o.Confirm},Dialog:function(){return r.Dialog},Prompt:function(){return s.Prompt}});var n=i(91535),o=i(88329),r=i(76841),s=i(74103)},74103:function(e,t,i){"use strict";i.d(t,{Prompt:function(){return l}});var n=i(23211),o=i(91565),r=i(7909),s=i(53681),a=i(76841);function l(e,t,i,l,u){let c=this instanceof a.Dialog?this:new a.Dialog({closeOnClickOverlay:!0}),d=(0,s.Button)(c,"cancel","Cancel"),h=(0,s.Button)(c,"ok","Ok"),p=c.c.element("form",{class:"jodit-dialog_prompt"}),m=c.c.element("input",{autofocus:!0,class:"jodit-input"}),f=c.c.element("label");(0,o.isFunction)(t)&&(i=t,t=void 0),l&&(0,r.attr)(m,"placeholder",l),n.Dom.append(f,c.c.text(e)),n.Dom.append(p,f),n.Dom.append(p,m),d.onAction(c.close);let g=()=>{i&&(0,o.isFunction)(i)&&!1===i(m.value)||c.close()};return h.onAction(g),c.e.on(p,"submit",()=>(g(),!1)),c.setFooter([h,d]),c.open(p,t||"&nbsp;",!0,!0),m.focus(),void 0!==u&&u.length&&(m.value=u,m.select()),c}},61334:function(e,t,i){"use strict";var n=i(27795),o=i(7909),r=i(33201),s=i(29434),a=i(31125),l=i(66206),u=i(18272),c=i(1305),d=i(53202),h=i(43271);let p="jodit-file-browser-preview",m=(e="next",t="right")=>`<div class="${p}__navigation ${p}__navigation_arrow_${e}">`+s.Icon.get("angle-"+t)+"</a>";t.default=e=>{if(!e.o.contextMenu)return()=>{};let t=(0,u.makeContextMenu)(e);return i=>{let s=(0,l.getItem)(i.target,e.container);if(!s)return;let u=s,f=e.options,g=e=>(0,o.attr)(u,e)||"";return e.async.setTimeout(()=>{let _=(0,l.elementToItem)(s,(0,a.elementsMap)(e));_&&(e.state.activeElements=[_],t.show(i.clientX,i.clientY,[!!("1"!==g("data-is-file")&&f.editImage&&(e.dataProvider.canI("ImageResize")||e.dataProvider.canI("ImageCrop")))&&{icon:"pencil",title:"Edit",exec:()=>h.openImageEditor.call(e,g("href"),g("data-name"),g("data-path"),g("data-source"))},!!e.dataProvider.canI("FileRename")&&{icon:"italic",title:"Rename",exec(){e.e.fire("fileRename.filebrowser",g("data-name"),g("data-path"),g("data-source"))}},!!e.dataProvider.canI("FileRemove")&&{icon:"bin",title:"Delete",async exec(){try{await (0,c.deleteFile)(e,g("data-name"),g("data-source"))}catch(t){return e.status(t)}return e.state.activeElements=[],(0,d.loadTree)(e).catch(e.status)}},!!f.preview&&{icon:"eye",title:"Preview",exec(){let t=e.dlg({buttons:["fullsize","dialog.close"]}),i=e.c.div(p,'<div class="jodit-icon_loader"></div>'),s=e.c.div(p+"__box"),a=e.c.fromHTML(m()),l=e.c.fromHTML(m("prev","left")),c=r=>{let c=e.c.element("img");(0,o.attr)(c,"src",r);let d=()=>{e.isInDestruct||(e.e.off(c,"load"),n.Dom.detach(i),f.showPreviewNavigation&&(n.Dom.prevWithClass(u,e.files.getFullElName("item"))&&n.Dom.append(i,l),n.Dom.nextWithClass(u,e.files.getFullElName("item"))&&n.Dom.append(i,a)),n.Dom.append(i,s),n.Dom.append(s,c),t.setPosition(),e?.events?.fire("previewOpenedAndLoaded"))};e.e.on(c,"load",d),c.complete&&d()};e.e.on([a,l],"click",function(){if(!(u=this===a?n.Dom.nextWithClass(u,e.files.getFullElName("item")):n.Dom.prevWithClass(u,e.files.getFullElName("item"))))throw(0,r.error)("Need element");n.Dom.detach(i),n.Dom.detach(s),i.innerHTML='<div class="jodit-icon_loader"></div>',c(g("href"))}),e.e.on("beforeDestruct",()=>{t.destruct()}),t.container.classList.add(p+"__dialog"),t.setContent(i),t.setPosition(),t.open(),c(g("href")),e.events.on("beforeDestruct",()=>{t.destruct()}).fire("previewOpened")}},{icon:"download",title:"Download",exec(){let t=g("href");t&&e.ow.open(t)}}]))},e.defaultTimeout),e.e.on("beforeClose",()=>{t.close()}).on("beforeDestruct",()=>t.destruct()),i.stopPropagation(),i.preventDefault(),!1}}},31125:function(e,t,i){"use strict";let n=new WeakMap;i.d(t,["elementsMap",0,e=>{let t=n.get(e);return t||(t={},n.set(e,t)),t}])},58664:function(e,t,i){"use strict";i.d(t,{FileBrowserItem:function(){return r}});var n=i(25045),o=i(65946);class r{static create(e){return e instanceof r?e:new r(e)}get path(){return(0,o.normalizePath)(this.data.source.path?this.data.source.path+"/":"/")}get imageURL(){let e=this.time||new Date().getTime().toString(),{thumbIsAbsolute:t,source:i,thumb:n,file:r}=this.data,s=n||r;return t&&s?s:(0,o.normalizeUrl)(i.baseurl,i.path,s||"")+"?_tmst="+encodeURIComponent(e)}get fileURL(){let{name:e}=this.data,{file:t,fileIsAbsolute:i,source:n}=this.data;return void 0!==t&&(e=t),i&&e?e:(0,o.normalizeUrl)(n.baseurl,n.path,e||"")}get time(){let{changed:e}=this.data;return e&&("number"==typeof e?new Date(e).toLocaleString():e)||""}get uniqueHashKey(){let e=this.data;return[e.sourceName,e.name,e.file,this.time,e.thumb].join("_").toLowerCase().replace(/[^0-9a-z\-.]/g,"-")}toJSON(){return this.data}constructor(e){(0,n._)(this,"data",void 0),(0,n._)(this,"source",void 0),(0,n._)(this,"sourceName",void 0),(0,n._)(this,"type",void 0),this.data=e,Object.keys(e).forEach(t=>{this[t]=e[t]})}}},66206:function(e,t,i){"use strict";var n=i(23211);i.d(t,["elementToItem",0,(e,t)=>{let{key:i}=e.dataset,{item:n}=t[i||""];return n},"getItem",0,(e,t,i="a")=>n.Dom.closest(e,e=>n.Dom.isTag(e,i),t)])},68502:function(e,t,i){"use strict";i(37102);var n=i(23211),o=i(28686),r=i(37427),s=i(75587),a=i(5266);a.Config.prototype.filebrowser={namespace:"",cache:!0,extraButtons:[],filter:(e,t)=>(t=t.toLowerCase(),(0,o.isString)(e))?-1!==e.toLowerCase().indexOf(t):(0,o.isString)(e.name)?-1!==e.name.toLowerCase().indexOf(t):!(0,o.isString)(e.file)||-1!==e.file.toLowerCase().indexOf(t),sortBy:"changed-desc",sort(e,t,i){let[n,s]=i.toLowerCase().split("-"),a="asc"===s,l=(e,t)=>t>e?a?-1:1:e>t?a?1:-1:0;if((0,o.isString)(e))return l(e.toLowerCase(),t.toLowerCase());if(void 0===e[n]||"name"===n)return(0,o.isString)(e.name)?l(e.name.toLowerCase(),t.name.toLowerCase()):(0,o.isString)(e.file)?l(e.file.toLowerCase(),t.file.toLowerCase()):0;switch(n){case"changed":{let i=new Date(e.changed).getTime(),n=new Date(t.changed).getTime();return a?i-n:n-i}case"size":{let i=(0,r.humanSizeToBytes)(e.size),n=(0,r.humanSizeToBytes)(t.size);return a?i-n:n-i}}return 0},editImage:!0,preview:!0,showPreviewNavigation:!0,showSelectButtonInPreview:!0,contextMenu:!0,howLongShowMsg:3e3,createNewFolder:!0,deleteFolder:!0,renameFolder:!0,moveFolder:!0,moveFile:!0,permissionsPresets:{allowFileDownload:void 0,allowFileMove:void 0,allowFileRemove:void 0,allowFileRename:void 0,allowFileUpload:void 0,allowFileUploadRemote:void 0,allowFiles:void 0,allowFolderCreate:void 0,allowFolderMove:void 0,allowFolderRemove:void 0,allowFolderRename:void 0,allowFolderTree:void 0,allowFolders:void 0,allowGeneratePdf:void 0,allowImageCrop:void 0,allowImageResize:void 0},showFoldersPanel:!0,storeLastOpenedFolder:!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:e=>e.success,getMessage:e=>void 0!==e.data.messages&&(0,o.isArray)(e.data.messages)?e.data.messages.join(" "):"",showFileName:!0,showFileSize:!0,showFileChangeTime:!0,saveStateInStorage:{storeLastOpenedFolder:!0,storeView:!0,storeSortBy:!0},pixelOffsetLoadNewChunk:200,getThumbTemplate(e,t,i){let n=this.options,o=this.files.getFullElName("item"),r=n.showFileName,s=n.showFileSize&&e.size,a=n.showFileChangeTime&&e.time,l="";void 0!==e.file&&(l=e.file);let u=`<div class="${o}-info">${r?`<span class="${o}-info-filename">${l}</span>`:""}${s?`<span class="${o}-info-filesize">${e.size}</span>`:""}${a?`<span class="${o}-info-filechanged">${a}</span>`:""}</div>`;return`<a
38
+ </div>`),"rtl"===this.options.direction&&((0,p.css)(this.container,"direction","rtl"),(0,p.attr)(this.container,"dir","rtl")),this.o.zIndex&&(0,p.css)(this.container,"zIndex",this.o.zIndex.toString()),(0,p.attr)(this.container,"role","dialog"),Object.defineProperty(this.container,"component",{value:this}),this.setMod("theme",this.o.theme||"default").setMod("resizable",!!this.o.resizable);let i=this.getElm("panel");(0,m.assert)(null!=i,"Panel element does not exist");let o=this.getElm("resizer");(0,m.assert)(null!=o,"Resizer element does not exist");let r=this.getElm("header-title");(0,m.assert)(null!=r,"header-title element does not exist");let s=this.getElm("content");(0,m.assert)(null!=s,"Content element does not exist");let a=this.getElm("footer");(0,m.assert)(null!=a,"Footer element does not exist");let c=this.getElm("header-toolbar");(0,m.assert)(null!=c,"header-toolbar element does not exist"),this.dialog=i,this.resizer=o,this.dialogbox_header=r,this.dialogbox_content=s,this.dialogbox_footer=a,this.dialogbox_toolbar=c,(0,p.css)(this.dialog,{maxWidth:this.options.maxWidth,minHeight:this.options.minHeight,minWidth:this.options.minWidth});let h=this.getElm("header");h&&this.e.on(h,"pointerdown touchstart",this.__onHeaderMouseDown),this.e.on(this.resizer,"mousedown touchstart",this.__onResizerMouseDown);let g=u.pluginSystem.get("fullsize");if((0,d.isFunction)(g)&&g(this),this.e.on(this.container,"close_dialog",this.close).on(this.ow,"keydown",this.__onEsc).on(this.ow,"resize",this.__onResize),this.o.closeOnClickOverlay){let e=this.getElm("overlay");(0,m.assert)(null!=e,"Overlay element does not exist"),this.e.on(e,"click",this.close)}}}(0,n._)(y,"__opened",new Set),(0,n._)(y,"defaultOptions",{...g.View.defaultOptions,closeOnClickOverlay:!1,closeOnEsc:!0}),(0,o._)([a.autobind],y.prototype,"__onMouseUp",null),(0,o._)([a.autobind],y.prototype,"__onHeaderMouseDown",null),(0,o._)([a.autobind],y.prototype,"__onMouseMove",null),(0,o._)([a.autobind],y.prototype,"__onEsc",null),(0,o._)([a.autobind],y.prototype,"__onResizerMouseDown",null),(0,o._)([a.autobind],y.prototype,"close",null),(0,o._)([(0,a.hook)("ready")],y.prototype,"buildToolbar",null),y=(0,o._)([a.component],y)},37333:function(e,t,i){"use strict";i.d(t,{Alert:function(){return n.Alert},Confirm:function(){return o.Confirm},Dialog:function(){return r.Dialog},Prompt:function(){return s.Prompt}});var n=i(91535),o=i(88329),r=i(76841),s=i(74103)},74103:function(e,t,i){"use strict";i.d(t,{Prompt:function(){return l}});var n=i(23211),o=i(91565),r=i(7909),s=i(53681),a=i(76841);function l(e,t,i,l,u){let c=this instanceof a.Dialog?this:new a.Dialog({closeOnClickOverlay:!0}),d=(0,s.Button)(c,"cancel","Cancel"),h=(0,s.Button)(c,"ok","Ok"),p=c.c.element("form",{class:"jodit-dialog_prompt"}),m=c.c.element("input",{autofocus:!0,class:"jodit-input"}),f=c.c.element("label");(0,o.isFunction)(t)&&(i=t,t=void 0),l&&(0,r.attr)(m,"placeholder",l),n.Dom.append(f,c.c.text(e)),n.Dom.append(p,f),n.Dom.append(p,m),d.onAction(c.close);let g=()=>{i&&(0,o.isFunction)(i)&&!1===i(m.value)||c.close()};return h.onAction(g),c.e.on(p,"submit",()=>(g(),!1)),c.setFooter([h,d]),c.open(p,t||"&nbsp;",!0,!0),m.focus(),void 0!==u&&u.length&&(m.value=u,m.select()),c}},61334:function(e,t,i){"use strict";var n=i(27795),o=i(7909),r=i(33201),s=i(29434),a=i(31125),l=i(66206),u=i(18272),c=i(1305),d=i(53202),h=i(43271);let p="jodit-file-browser-preview",m=(e="next",t="right")=>`<div class="${p}__navigation ${p}__navigation_arrow_${e}">`+s.Icon.get("angle-"+t)+"</a>";t.default=e=>{if(!e.o.contextMenu)return()=>{};let t=(0,u.makeContextMenu)(e);return i=>{let s=(0,l.getItem)(i.target,e.container);if(!s)return;let u=s,f=e.options,g=e=>(0,o.attr)(u,e)||"";return e.async.setTimeout(()=>{let _=(0,l.elementToItem)(s,(0,a.elementsMap)(e));_&&(e.state.activeElements=[_],t.show(i.clientX,i.clientY,[!!("1"!==g("data-is-file")&&f.editImage&&(e.dataProvider.canI("ImageResize")||e.dataProvider.canI("ImageCrop")))&&{icon:"pencil",title:"Edit",exec:()=>h.openImageEditor.call(e,g("href"),g("data-name"),g("data-path"),g("data-source"))},!!e.dataProvider.canI("FileRename")&&{icon:"italic",title:"Rename",exec(){e.e.fire("fileRename.filebrowser",g("data-name"),g("data-path"),g("data-source"))}},!!e.dataProvider.canI("FileRemove")&&{icon:"bin",title:"Delete",async exec(){try{await (0,c.deleteFile)(e,g("data-name"),g("data-source"))}catch(t){return e.status(t)}return e.state.activeElements=[],(0,d.loadTree)(e).catch(e.status)}},!!f.preview&&{icon:"eye",title:"Preview",exec(){let t=e.dlg({buttons:["fullsize","dialog.close"]}),i=e.c.div(p,'<div class="jodit-icon_loader"></div>'),s=e.c.div(p+"__box"),a=e.c.fromHTML(m()),l=e.c.fromHTML(m("prev","left")),c=r=>{let c=e.c.element("img");(0,o.attr)(c,"src",r),(0,o.attr)(c,"alt",g("data-name"));let d=()=>{e.isInDestruct||(e.e.off(c,"load error"),n.Dom.detach(i),f.showPreviewNavigation&&(n.Dom.prevWithClass(u,e.files.getFullElName("item"))&&n.Dom.append(i,l),n.Dom.nextWithClass(u,e.files.getFullElName("item"))&&n.Dom.append(i,a)),n.Dom.append(i,s),n.Dom.append(s,c),t.setPosition(),e?.events?.fire("previewOpenedAndLoaded"))};e.e.on(c,"load error",d),c.complete&&d()};e.e.on([a,l],"click",function(){if(!(u=this===a?n.Dom.nextWithClass(u,e.files.getFullElName("item")):n.Dom.prevWithClass(u,e.files.getFullElName("item"))))throw(0,r.error)("Need element");n.Dom.detach(i),n.Dom.detach(s),i.innerHTML='<div class="jodit-icon_loader"></div>',c(g("href"))}),e.e.on("beforeDestruct",()=>{t.destruct()}),t.container.classList.add(p+"__dialog"),t.setContent(i),t.setPosition(),t.open(),c(g("href")),e.events.on("beforeDestruct",()=>{t.destruct()}).fire("previewOpened")}},{icon:"download",title:"Download",exec(){let t=g("href");t&&e.ow.open(t)}}]))},e.defaultTimeout),e.e.on("beforeClose",()=>{t.close()}).on("beforeDestruct",()=>t.destruct()),i.stopPropagation(),i.preventDefault(),!1}}},31125:function(e,t,i){"use strict";let n=new WeakMap;i.d(t,["elementsMap",0,e=>{let t=n.get(e);return t||(t={},n.set(e,t)),t}])},58664:function(e,t,i){"use strict";i.d(t,{FileBrowserItem:function(){return r}});var n=i(25045),o=i(65946);class r{static create(e){return e instanceof r?e:new r(e)}get path(){return(0,o.normalizePath)(this.data.source.path?this.data.source.path+"/":"/")}get imageURL(){let e=this.time||new Date().getTime().toString(),{thumbIsAbsolute:t,source:i,thumb:n,file:r}=this.data,s=n||r;return t&&s?s:(0,o.normalizeUrl)(i.baseurl,i.path,s||"")+"?_tmst="+encodeURIComponent(e)}get fileURL(){let{name:e}=this.data,{file:t,fileIsAbsolute:i,source:n}=this.data;return void 0!==t&&(e=t),i&&e?e:(0,o.normalizeUrl)(n.baseurl,n.path,e||"")}get time(){let{changed:e}=this.data;return e&&("number"==typeof e?new Date(e).toLocaleString():e)||""}get uniqueHashKey(){let e=this.data;return[e.sourceName,e.name,e.file,this.time,e.thumb].join("_").toLowerCase().replace(/[^0-9a-z\-.]/g,"-")}toJSON(){return this.data}constructor(e){(0,n._)(this,"data",void 0),(0,n._)(this,"source",void 0),(0,n._)(this,"sourceName",void 0),(0,n._)(this,"type",void 0),this.data=e,Object.keys(e).forEach(t=>{this[t]=e[t]})}}},66206:function(e,t,i){"use strict";var n=i(23211);i.d(t,["elementToItem",0,(e,t)=>{let{key:i}=e.dataset,{item:n}=t[i||""];return n},"getItem",0,(e,t,i="a")=>n.Dom.closest(e,e=>n.Dom.isTag(e,i),t)])},68502:function(e,t,i){"use strict";i(37102);var n=i(23211),o=i(28686),r=i(37427),s=i(75587),a=i(5266);a.Config.prototype.filebrowser={namespace:"",cache:!0,extraButtons:[],filter:(e,t)=>(t=t.toLowerCase(),(0,o.isString)(e))?-1!==e.toLowerCase().indexOf(t):(0,o.isString)(e.name)?-1!==e.name.toLowerCase().indexOf(t):!(0,o.isString)(e.file)||-1!==e.file.toLowerCase().indexOf(t),sortBy:"changed-desc",sort(e,t,i){let[n,s]=i.toLowerCase().split("-"),a="asc"===s,l=(e,t)=>t>e?a?-1:1:e>t?a?1:-1:0;if((0,o.isString)(e))return l(e.toLowerCase(),t.toLowerCase());if(void 0===e[n]||"name"===n)return(0,o.isString)(e.name)?l(e.name.toLowerCase(),t.name.toLowerCase()):(0,o.isString)(e.file)?l(e.file.toLowerCase(),t.file.toLowerCase()):0;switch(n){case"changed":{let i=new Date(e.changed).getTime(),n=new Date(t.changed).getTime();return a?i-n:n-i}case"size":{let i=(0,r.humanSizeToBytes)(e.size),n=(0,r.humanSizeToBytes)(t.size);return a?i-n:n-i}}return 0},editImage:!0,preview:!0,showPreviewNavigation:!0,showSelectButtonInPreview:!0,contextMenu:!0,howLongShowMsg:3e3,createNewFolder:!0,deleteFolder:!0,renameFolder:!0,moveFolder:!0,moveFile:!0,permissionsPresets:{allowFileDownload:void 0,allowFileMove:void 0,allowFileRemove:void 0,allowFileRename:void 0,allowFileUpload:void 0,allowFileUploadRemote:void 0,allowFiles:void 0,allowFolderCreate:void 0,allowFolderMove:void 0,allowFolderRemove:void 0,allowFolderRename:void 0,allowFolderTree:void 0,allowFolders:void 0,allowGeneratePdf:void 0,allowImageCrop:void 0,allowImageResize:void 0},showFoldersPanel:!0,storeLastOpenedFolder:!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:e=>e.success,getMessage:e=>void 0!==e.data.messages&&(0,o.isArray)(e.data.messages)?e.data.messages.join(" "):"",showFileName:!0,showFileSize:!0,showFileChangeTime:!0,saveStateInStorage:{storeLastOpenedFolder:!0,storeView:!0,storeSortBy:!0},pixelOffsetLoadNewChunk:200,getThumbTemplate(e,t,i){let n=this.options,o=this.files.getFullElName("item"),r=n.showFileName,s=n.showFileSize&&e.size,a=n.showFileChangeTime&&e.time,l="";void 0!==e.file&&(l=e.file);let u=`<div class="${o}-info">${r?`<span class="${o}-info-filename">${l}</span>`:""}${s?`<span class="${o}-info-filesize">${e.size}</span>`:""}${a?`<span class="${o}-info-filechanged">${a}</span>`:""}</div>`;return`<a
39
39
  data-jodit-file-browser-item="true"
40
40
  data-is-file="${+!e.isImage}"
41
41
  draggable="true"
@@ -113,7 +113,7 @@
113
113
  </div>`:""}
114
114
  </div>
115
115
  </div>
116
- </form>`)}])},60936:function(e,t,i){"use strict";i.r(t),i.d(t,{Ajax:function(){return p.Ajax},Alert:function(){return s.Alert},Async:function(){return l.Async},AsyncStorage:function(){return x.AsyncStorage},Button:function(){return m.Button},CommitStyle:function(){return I.CommitStyle},Component:function(){return n.Component},Confirm:function(){return s.Confirm},ContextMenu:function(){return r.ContextMenu},Create:function(){return u.Create},Dialog:function(){return s.Dialog},Dom:function(){return c.Dom},EventEmitter:function(){return d.EventEmitter},EventHandlersStore:function(){return d.EventHandlersStore},Eventify:function(){return d.Eventify},FileBrowser:function(){return a.FileBrowser},Helpers:function(){return o},History:function(){return _.History},Icon:function(){return m.Icon},ImageEditor:function(){return b.ImageEditor},IndexedDBProvider:function(){return x.IndexedDBProvider},LazyWalker:function(){return c.LazyWalker},LocalStorageProvider:function(){return x.LocalStorageProvider},MemoryStorageProvider:function(){return x.MemoryStorageProvider},Plugin:function(){return h.Plugin},PluginSystem:function(){return T.PluginSystem},Popup:function(){return m.Popup},ProgressBar:function(){return m.ProgressBar},Prompt:function(){return s.Prompt},Response:function(){return p.Response},STATUSES:function(){return n.STATUSES},Selection:function(){return I.Selection},Snapshot:function(){return v.Snapshot},StatusBar:function(){return w.StatusBar},Storage:function(){return x.Storage},StorageKey:function(){return x.StorageKey},Table:function(){return k.Table},ToolbarButton:function(){return S.ToolbarButton},ToolbarCollection:function(){return C.ToolbarCollection},ToolbarContent:function(){return S.ToolbarContent},ToolbarEditorCollection:function(){return E.ToolbarEditorCollection},ToolbarSelect:function(){return S.ToolbarSelect},UIBlock:function(){return m.UIBlock},UIButton:function(){return m.UIButton},UIButtonGroup:function(){return m.UIButtonGroup},UIButtonState:function(){return m.UIButtonState},UICheckbox:function(){return m.UICheckbox},UIElement:function(){return m.UIElement},UIFileInput:function(){return m.UIFileInput},UIForm:function(){return m.UIForm},UIGroup:function(){return m.UIGroup},UIInput:function(){return m.UIInput},UIList:function(){return m.UIList},UIMessages:function(){return y.UIMessages},UISelect:function(){return m.UISelect},UISeparator:function(){return m.UISeparator},UISpacer:function(){return m.UISpacer},UITextArea:function(){return m.UITextArea},UITooltip:function(){return m.UITooltip},Uploader:function(){return D.Uploader},View:function(){return f.View},ViewComponent:function(){return n.ViewComponent},ViewWithToolbar:function(){return g.ViewWithToolbar},canUseIndexedDB:function(){return x.canUseIndexedDB},canUsePersistentStorage:function(){return x.canUsePersistentStorage},clearUseIndexedDBCache:function(){return x.clearUseIndexedDBCache},defaultNameSpace:function(){return d.defaultNameSpace},observable:function(){return d.observable}});var n=i(16964),o=i(65946),r=i(67399),s=i(37333),a=i(17610),l=i(91231),u=i(79821),c=i(27795),d=i(1496),h=i(91206),p=i(73714),m=i(4099),f=i(35099),g=i(2222),_=i(53855),v=i(46363),b=i(43271),y=i(10081),w=i(29433),k=i(98803),S=i(39709),C=i(42573),E=i(6209),D=i(94925),T=i(85305),I=i(59841),x=i(25222)},61466:function(e,t,i){"use strict";i.d(t,{UIMessage:function(){return s}});var n=i(62445),o=i(91672),r=i(4099);class s extends r.UIElement{className(){return"UIMessage"}constructor(e,t){super(e),this.setMod("active",!0),this.setMod("variant",t.variant),this.container.textContent=t.text}}s=(0,n._)([o.component],s)},10081:function(e,t,i){"use strict";i.d(t,{UIMessages:function(){return c}});var n=i(25045),o=i(62445),r=i(91672),s=i(23211),a=i(80991),l=i(63468),u=i(61466);class c extends l.UIGroup{className(){return"UIMessages"}info(e,t){this.__message(e,"info",t)}success(e,t){this.__message(e,"success",t)}error(e,t){this.__message(e,"error",t)}message(e,t,i){this.__message(e,t,i)}__message(e,t="info",i){let n=e+":"+t;if(this.__messages.has(n))return void this.async.updateTimeout(n,i||this.options.defaultTimeout);if(!this.__box)throw Error("Container is not defined: "+n);s.Dom.append(this.__box,this.container);let o=new u.UIMessage(this.j,{text:e,variant:t});this.append(o),this.__calcOffsets(),this.__messages.add(n);let r=this.__getRemoveCallback(o,n);this.j.e.on(o.container,"pointerdown",r),this.async.setTimeout(r,{label:n,timeout:i||this.options.defaultTimeout})}__getRemoveCallback(e,t){let i=n=>{n&&n.preventDefault(),e.isInDestruct||(this.async.clearTimeout(t),this.j.e.off(e.container,"pointerdown",i),this.__messages.delete(t),e.setMod("active",!1),this.async.setTimeout(()=>{this.remove(e),e.destruct(),this.__calcOffsets()},300))};return i}__calcOffsets(){let e=5;this.elements.forEach(t=>{(0,a.css)(t.container,"bottom",e+"px"),e+=t.container.offsetHeight+this.options.defaultOffset})}constructor(e,t,i={defaultTimeout:3e3,defaultOffset:5}){super(e),(0,n._)(this,"__box",void 0),(0,n._)(this,"options",void 0),(0,n._)(this,"__messages",void 0),this.__box=t,this.options=i,this.__messages=new Set}}c=(0,o._)([r.component],c)},29433:function(e,t,i){"use strict";i.d(t,{StatusBar:function(){return c}});var n=i(25045),o=i(62445),r=i(16964),s=i(84839),a=i(23211),l=i(23183),u=i(81987);class c extends r.ViewComponent{className(){return"StatusBar"}hide(){this.container.classList.add("jodit_hidden")}show(){this.container.classList.remove("jodit_hidden")}get isShown(){return!this.container.classList.contains("jodit_hidden")}getHeight(){return this.container?.offsetHeight??0}findEmpty(e=!1){let t=this.getElms(e?"item-right":"item");for(let e=0;e<t.length;e+=1)if(!t[e].innerHTML.trim().length)return t[e]}append(e,t=!1){let i=this.findEmpty(t)||this.j.c.div(this.getFullElName("item"));t&&i.classList.add(this.getFullElName("item-right")),a.Dom.append(i,e),this.container&&a.Dom.append(this.container,i),this.j.o.statusbar&&this.show(),this.j.e.fire("resize")}destruct(){this.isInDestruct||(this.setStatus(r.STATUSES.beforeDestruct),a.Dom.safeRemove(this.container),super.destruct())}constructor(e,t){super(e),(0,n._)(this,"target",void 0),(0,n._)(this,"container",void 0),(0,n._)(this,"mods",void 0),this.target=t,this.mods={},this.container=e.c.div("jodit-status-bar"),a.Dom.append(t,this.container),this.hide()}}c=(0,o._)([s.component,(0,s.derive)(u.Mods,l.Elms)],c)},98803:function(e,t,i){"use strict";i.d(t,{Table:function(){return h}});var n=i(25045),o=i(16964),r=i(81937),s=i(27795),a=i(28077),l=i(65946),u=i(80991);let c=new Set(["thead","tbody","tfoot"]),d=new WeakMap;class h extends o.ViewComponent{className(){return"Table"}addSelection(e){this.selected.add(e),this.__recalculateStyles();let t=s.Dom.closest(e,"table",this.j.editor);if(t){let i=h.__selectedByTable.get(t)||new Set;i.add(e),h.__selectedByTable.set(t,i)}}removeSelection(e){this.selected.delete(e),this.__recalculateStyles();let t=s.Dom.closest(e,"table",this.j.editor);if(t){let i=h.__selectedByTable.get(t);i&&(i.delete(e),i.size||h.__selectedByTable.delete(t))}}getAllSelectedCells(){return(0,l.toArray)(this.selected)}static __getSelectedCellsByTable(e){let t=h.__selectedByTable.get(e);return t?(0,l.toArray)(t):[]}destruct(){return this.selected.clear(),super.destruct()}static __getRowsCount(e){return e.rows.length}getRowsCount(e){return h.__getRowsCount(e)}static __getColumnsCount(e){return h.__formalMatrix(e).reduce((e,t)=>Math.max(e,t.length),0)}getColumnsCount(e){return h.__getColumnsCount(e)}static __formalMatrix(e,t){let i=[[]],n=(0,l.toArray)(e.rows),o=(e,n)=>{void 0===i[n]&&(i[n]=[]);let o=e.colSpan,r=e.rowSpan,s,a,l=0;for(;i[n][l];)l+=1;for(a=0;r>a;a+=1)for(s=0;s<o;s+=1){if(void 0===i[n+a]&&(i[n+a]=[]),t&&!1===t(e,n+a,l+s,o,r))return!1;i[n+a][l+s]=e}};for(let e=0;e<n.length;e+=1){let t=(0,l.toArray)(n[e].cells);for(let n=0;n<t.length;n+=1)if(!1===o(t[n],e))return i}return i}formalMatrix(e,t){return h.__formalMatrix(e,t)}static __formalCoordinate(e,t,i=!1){let n=0,o=0,r=1,s=1;return h.__formalMatrix(e,(e,a,l,u,c)=>{if(t===e)return n=a,o=l,r=u||1,s=c||1,i&&(o+=(u||1)-1,n+=(c||1)-1),!1}),[n,o,r,s]}formalCoordinate(e,t,i=!1){return h.__formalCoordinate(e,t,i)}static __appendRow(e,t,i,n){let o;if(t)o=t.cloneNode(!0),s.Dom.each(t,e=>{if(!s.Dom.isCell(e))return;let t=(0,l.attr)(e,"rowspan");if(t&&parseInt(t,10)>1){let i=parseInt(t,10)-1;(0,l.attr)(e,"rowspan",i>1?i:null)}}),s.Dom.each(o,e=>{s.Dom.isCell(e)&&(s.Dom.detach(e),s.Dom.append(e,n.element("br")))});else{let t=h.__getColumnsCount(e);o=n.element("tr");for(let e=0;e<t;e+=1){let e=n.element("td");s.Dom.append(e,n.element("br")),s.Dom.append(o,e)}}let r=t&&t.parentElement;if(i&&t&&!t.nextElementSibling&&s.Dom.isTag(r,"thead")){let t=h.__bodyOf(e,r,n);t.insertBefore(o,t.firstChild),h.__setCellsTag(o,"td",n)}else i&&t&&t.nextSibling?s.Dom.after(t,o):!i&&t?s.Dom.before(t,o):s.Dom.append(s.Dom.first(e,e=>s.Dom.isTag(e,"tbody"))||e,o)}static __bodyOf(e,t,i){let n=e.tBodies[0];return n||(n=i.element("tbody"),s.Dom.after(t,n)),n}static __setCellsTag(e,t,i,n){(0,l.toArray)(e.cells).forEach(e=>{let o=s.Dom.isTag(e,t)?e:s.Dom.replace(e,t,i,!0);o!==e&&n?.set(e,o),"td"===t?(0,l.attr)(o,"scope",null):o.hasAttribute("scope")||(0,l.attr)(o,"scope","col")})}hasHeaderRow(e){return!!e.tHead?.rows.length}canToggleHeaderRow(e){let[t]=(0,l.toArray)(e.rows);return this.hasHeaderRow(e)||!!(t&&(0,l.toArray)(t.cells).every(e=>e.rowSpan<2))}toggleHeaderRow(e){let t=new Map,i=this.j.createInside,n=e.tHead;if(!this.canToggleHeaderRow(e))return t;if(n&&this.hasHeaderRow(e)){let o=h.__bodyOf(e,n,i),r=o.firstChild;(0,l.toArray)(n.rows).forEach(e=>{o.insertBefore(e,r),h.__setCellsTag(e,"td",i,t)}),s.Dom.safeRemove(n)}else{let[o]=(0,l.toArray)(e.rows),r=n||i.element("thead");n||(e.tHead=r),s.Dom.append(r,o),h.__setCellsTag(o,"th",i,t)}return t}appendRow(e,t,i){return h.__appendRow(e,t,i,this.j.createInside)}static __removeRow(e,t){let i,n=h.__formalMatrix(e),o=e.rows[t];n[t].forEach((r,a)=>{if(i=!1,t-1>=0&&n[t-1][a]===r)i=!0;else if(n[t+1]&&n[t+1][a]===r){if(r.parentNode===o&&r.parentNode.nextSibling){i=!0;let o=a+1;for(;n[t+1][o]===r;)o+=1;let l=s.Dom.next(r.parentNode,e=>s.Dom.isTag(e,"tr"),e);if(l){let e=null;for(let i=o;i<n[t+1].length;i+=1){let o=n[t+1][i];if(o&&o.parentNode===l){e=o;break}}e?s.Dom.before(e,r):s.Dom.append(l,r)}}}else s.Dom.safeRemove(r);if(i&&(r.parentNode===o||r!==n[t][a-1])){let e=r.rowSpan;(0,l.attr)(r,"rowspan",e-1>1?e-1:null)}});let r=o.parentElement;s.Dom.safeRemove(o),s.Dom.isTag(r,c)&&!r.rows.length&&s.Dom.safeRemove(r)}removeRow(e,t){return h.__removeRow(e,t)}appendColumn(e,t,i=!0){let n=h.__formalMatrix(e);if(!i&&s.Dom.isCell(t.previousElementSibling))return this.appendColumn(e,t.previousElementSibling,!0);let[,o]=h.__formalCoordinate(e,t,i),r=i?o+1:o;for(let e=0;e<n.length;){let t=n[e];if(t[o]!==t[r]||o===r){let e=this.j.createInside.element("td");s.Dom.append(e,this.j.createInside.element("br")),i?s.Dom.after(t[o],e):s.Dom.before(t[o],e),t[o].rowSpan>1&&(e.rowSpan=t[o].rowSpan)}else t[o].colSpan+=1;e+=t[o].rowSpan||1}}static __removeColumn(e,t){let i,n=h.__formalMatrix(e);n.forEach((e,o)=>{let r=e[t];if(i=!1,t-1>=0&&n[o][t-1]===r||t+1<e.length&&n[o][t+1]===r?i=!0:s.Dom.safeRemove(r),i&&(o-1<0||r!==n[o-1][t])){let e=r.colSpan;(0,l.attr)(r,"colspan",e-1>1?(e-1).toString():null)}})}removeColumn(e,t){return h.__removeColumn(e,t)}static __getSelectedBound(e,t){let i,n,o,r=[[1/0,1/0],[0,0]],s=h.__formalMatrix(e);for(i=0;i<s.length;i+=1)for(n=0;s[i]&&n<s[i].length;n+=1)t.includes(s[i][n])&&(r[0][0]=Math.min(i,r[0][0]),r[0][1]=Math.min(n,r[0][1]),r[1][0]=Math.max(i,r[1][0]),r[1][1]=Math.max(n,r[1][1]));for(i=r[0][0];i<=r[1][0];i+=1)for(o=1,n=r[0][1];n<=r[1][1];n+=1){for(;s[i]&&s[i][n-o]&&s[i][n]===s[i][n-o];)r[0][1]=Math.min(n-o,r[0][1]),r[1][1]=Math.max(n-o,r[1][1]),o+=1;for(o=1;s[i]&&s[i][n+o]&&s[i][n]===s[i][n+o];)r[0][1]=Math.min(n+o,r[0][1]),r[1][1]=Math.max(n+o,r[1][1]),o+=1;for(o=1;s[i-o]&&s[i][n]===s[i-o][n];)r[0][0]=Math.min(i-o,r[0][0]),r[1][0]=Math.max(i-o,r[1][0]),o+=1;for(o=1;s[i+o]&&s[i][n]===s[i+o][n];)r[0][0]=Math.min(i+o,r[0][0]),r[1][0]=Math.max(i+o,r[1][0]),o+=1}return r}getSelectedBound(e,t){return h.__getSelectedBound(e,t)}static __normalizeTable(e){let t=[],i=h.__formalMatrix(e);h.__removeExtraColspans(i,t),h.__removeExtraRowspans(i,t);for(let e=0;e<i.length;e+=1)for(let t=0;t<i[e].length;t+=1)void 0!==i[e][t]&&(i[e][t].hasAttribute("rowspan")&&1===i[e][t].rowSpan&&(0,l.attr)(i[e][t],"rowspan",null),i[e][t].hasAttribute("colspan")&&1===i[e][t].colSpan&&(0,l.attr)(i[e][t],"colspan",null),i[e][t].hasAttribute("class")&&!(0,l.attr)(i[e][t],"class")&&(0,l.attr)(i[e][t],"class",null));h.__unmark(t)}static __removeExtraColspans(e,t){for(let i=0;i<e[0].length;i+=1){let n=1e6,o=!1;for(let t=0;t<e.length;t+=1)if(void 0!==e[t][i]){if(e[t][i].colSpan<2){o=!0;break}n=Math.min(n,e[t][i].colSpan)}if(!o)for(let o=0;o<e.length;o+=1)void 0!==e[o][i]&&h.__mark(e[o][i],"colspan",e[o][i].colSpan-n+1,t)}}static __removeExtraRowspans(e,t){let i,n;for(i=0;i<e.length;i+=1){let o=1e6,r=!1;for(n=0;n<e[i].length;n+=1)if(void 0!==e[i][n]){if(e[i][n].rowSpan<2){r=!0;break}o=Math.min(o,e[i][n].rowSpan)}if(!r)for(n=0;n<e[i].length;n+=1)void 0!==e[i][n]&&h.__mark(e[i][n],"rowspan",e[i][n].rowSpan-o+1,t)}}normalizeTable(e){return h.__normalizeTable(e)}static __mergeSelected(e,t){let i=[],n=h.__getSelectedBound(e,h.__getSelectedCellsByTable(e)),o=0,a=null,c=0,d=0,m=0,f=new Set,g=[];n&&(n[0][0]-n[1][0]||n[0][1]-n[1][1])&&(h.__formalMatrix(e,(e,r,s,_,v)=>{r>=n[0][0]&&r<=n[1][0]&&s>=n[0][1]&&s<=n[1][1]&&(f.has(e)||(f.add(e),r===n[0][0]&&(0,u.cssInline)(e,"width")&&(o+=e.offsetWidth),""!==(0,l.trim)(e.innerHTML.replace(/<br(\/)?>/g,""))&&i.push(e.innerHTML),_>1&&(d+=_-1),v>1&&(m+=v-1),a?(h.__mark(e,"remove",1,g),p(t).removeSelection(e)):(a=e,c=s)))}),d=n[1][1]-n[0][1]+1,m=n[1][0]-n[0][0]+1,a&&(d>1&&h.__mark(a,"colspan",d,g),m>1&&h.__mark(a,"rowspan",m,g),o&&(h.__mark(a,"width",(o/e.offsetWidth*100).toFixed(r.ACCURACY)+"%",g),c&&h.__setColumnWidthByDelta(e,c,0,!0,g)),a.innerHTML=i.join("<br/>")||"<br/>",p(t).addSelection(a),f.delete(a),h.__unmark(g),h.__normalizeTable(e),(0,l.toArray)(e.rows).forEach(e=>{e.cells.length||s.Dom.safeRemove(e)})))}mergeSelected(e){return h.__mergeSelected(e,this.j)}static __splitHorizontal(e,t){let i,n,o,r,a,l=[];h.__getSelectedCellsByTable(e).forEach(u=>{n=t.createInside.element("td"),s.Dom.append(n,t.createInside.element("br")),o=t.createInside.element("tr"),i=h.__formalCoordinate(e,u),u.rowSpan<2?(h.__formalMatrix(e,(e,t,n)=>{i[0]===t&&i[1]!==n&&e!==u&&h.__mark(e,"rowspan",e.rowSpan+1,l)}),s.Dom.after(s.Dom.closest(u,"tr",e),o),s.Dom.append(o,n)):(h.__mark(u,"rowspan",u.rowSpan-1,l),h.__formalMatrix(e,(t,n,o)=>{n>i[0]&&n<i[0]+u.rowSpan&&i[1]>o&&t.parentNode.rowIndex===n&&(a=t),i[0]<n&&t===u&&(r=e.rows[n])}),a?s.Dom.after(a,n):s.Dom.prepend(r,n)),u.colSpan>1&&h.__mark(n,"colspan",u.colSpan,l),h.__unmark(l),p(t).removeSelection(u)}),this.__normalizeTable(e)}splitHorizontal(e){return h.__splitHorizontal(e,this.j)}static __splitVertical(e,t){let i,n,o,a=[];h.__getSelectedCellsByTable(e).forEach(l=>{i=h.__formalCoordinate(e,l),l.colSpan<2?h.__formalMatrix(e,(e,t,n)=>{i[1]===n&&i[0]!==t&&e!==l&&h.__mark(e,"colspan",e.colSpan+1,a)}):h.__mark(l,"colspan",l.colSpan-1,a),n=t.createInside.element("td"),s.Dom.append(n,t.createInside.element("br")),l.rowSpan>1&&h.__mark(n,"rowspan",l.rowSpan,a);let u=l.offsetWidth;s.Dom.after(l,n),o=u/e.offsetWidth/2,h.__mark(l,"width",(100*o).toFixed(r.ACCURACY)+"%",a),h.__mark(n,"width",(100*o).toFixed(r.ACCURACY)+"%",a),h.__unmark(a),p(t).removeSelection(l)}),h.__normalizeTable(e)}splitVertical(e){return h.__splitVertical(e,this.j)}static __setColumnWidthByDelta(e,t,i,n,o){let s=h.__formalMatrix(e),a=0;for(let n=0;n<s.length;n+=1){let l=s[n][t];if(l.colSpan>1&&s.length>1)continue;let u=(l.offsetWidth+i)/e.offsetWidth*100;h.__mark(l,"width",u.toFixed(r.ACCURACY)+"%",o),a=n;break}for(let e=a+1;e<s.length;e+=1){let i=s[e][t];h.__mark(i,"width",null,o)}n||h.__unmark(o)}setColumnWidthByDelta(e,t,i,n,o){return h.__setColumnWidthByDelta(e,t,i,n,o)}static __mark(e,t,i,n){n.push(e);let o=d.get(e)??{};o[t]=void 0===i?1:i,d.set(e,o)}static __unmark(e){e.forEach(e=>{let t=d.get(e);t&&(Object.keys(t).forEach(i=>{let n=t[i];switch(i){case"remove":s.Dom.safeRemove(e);break;case"rowspan":(0,l.attr)(e,"rowspan",(0,l.isNumber)(n)&&n>1?n:null);break;case"colspan":(0,l.attr)(e,"colspan",(0,l.isNumber)(n)&&n>1?n:null);break;case"width":null==n?(e.style.removeProperty("width"),(0,l.attr)(e,"style")||(0,l.attr)(e,"style",null)):(0,l.css)(e,"width",n.toString())}delete t[i]}),d.delete(e))})}constructor(...e){super(...e),(0,n._)(this,"selected",new Set),(0,n._)(this,"__recalculateStyles",this.async.microDebounce(()=>{let e=(0,a.getContainer)(this.j,h,"style",!0),t=[];this.selected.forEach(e=>{let i=(0,l.cssPath)(e);i&&t.push(i)});let i=t.length>1?t.map(e=>`${e}::selection,${e} ::selection`).join(",")+"{background:transparent}":"";e.innerHTML=t.length?t.join(",")+`{${this.jodit.options.table.selectionCellStyle}}`+i:""}))}}(0,n._)(h,"__selectedByTable",new WeakMap);let p=e=>e.getInstance("Table",e.o)},22533:function(e,t,i){"use strict";i.d(t,{ToolbarButton:function(){return j}});var n=i(25045),o=i(62445),r=i(80251),s=i(69364),a=i(81937),l=i(49574),u=i(51676),c=i(91672),d=i(68616),h=i(23211),p=i(17312),m=i(91565),f=i(24497),g=i(62101),_=i(85932),v=i(86878),b=i(57821),y=i(28712),w=i(7909),k=i(71125),S=i(59400),C=i(29577),E=i(15982),D=i(29434),T=i(51116),I=i(4274);let x=new Set(["input","textarea","select"]);class j extends S.UIButton{className(){return"ToolbarButton"}getRole(){return"listitem"}updateAriaLabel(){if(super.updateAriaLabel(),this.trigger){let e=this.state.tooltip?this.jodit.i18n(this.state.tooltip):null;(0,w.attr)(this.trigger,"aria-label",e)}}get toolbar(){let e=(0,c.getComponentClass)("ToolbarCollection");return this.closest(e)}update(){let{control:e,state:t}=this,i=this.toolbar;if(!i)return;let n=e.value?.(i.jodit,this);void 0!==n&&(t.value=n),t.disabled=this.__calculateDisabledStatus(i),t.activated=this.__calculateActivatedStatus(i),e.update?.(i.jodit,this)}__calculateActivatedStatus(e){return(!(0,f.isJoditObject)(this.j)||!!this.j.editorIsActive)&&(!!this.control.isActive?.(this.j,this)||!!(e&&e.shouldBeActive(this)))}__calculateDisabledStatus(e){return!!(this.j.o.disabled||this.j.o.readonly&&(!this.j.o.activeButtonsInReadOnly||!this.j.o.activeButtonsInReadOnly.includes(this.control.name))||this.control.isDisabled?.(this.j,this))||!!(e&&e.shouldBeDisabled(this))}get isToggle(){let{isActive:e,tags:t,css:i}=this.control;return!!(e||t||i)}onChangeActivated(){(0,w.attr)(this.button,"aria-pressed",this.isToggle?this.state.activated:null),this.setMod("activated",this.state.activated||null)}onChangeText(){(0,m.isFunction)(this.control.template)?(this.text.innerHTML=this.control.template(this.j,this.control.name,this.j.i18n(this.state.text)),this.updateAriaLabel()):super.onChangeText(),this.setMod("text-icons",!!this.text.innerText.trim().length)}onChangeTabIndex(){(0,w.attr)(this.button,"tabindex",this.state.tabIndex),(0,w.attr)(this.trigger,"tabindex",this.state.tabIndex)}createContainer(){let e=this.componentName,t=this.j.c.span(e),i=super.createContainer();i.classList.remove(e),i.classList.add(e+"__button"),Object.defineProperty(i,"component",{value:this,configurable:!0}),h.Dom.append(t,i);let n=this.j.c.fromHTML(`<span role="button" aria-haspopup="true" aria-expanded="false" class="${e}__trigger">${D.Icon.get("chevron")}</span>`);return h.Dom.append(i,n),t}focus(){h.Dom.first(this.container,e=>h.Dom.isTag(e,"button"))?.focus()}onChangeHasTrigger(){this.state.hasTrigger?h.Dom.append(this.container,this.trigger):h.Dom.safeRemove(this.trigger),this.setMod("with-trigger",this.state.hasTrigger||null)}onChangeDisabled(){let e=this.state.disabled?"disabled":null;(0,w.attr)(this.trigger,"disabled",e),(0,w.attr)(this.button,"disabled",e),(0,w.attr)(this.container,"disabled",e)}__initFromControl(){let{control:e,state:t}=this;this.updateSize(),t.name=e.name,this.__initIconFromControl(),e.tooltip&&(t.tooltip=(0,m.isFunction)(e.tooltip)?e.tooltip(this.j,e,this):e.tooltip),t.hasTrigger=!!(e.list||e.popup&&e.exec),this.onChangeActivated()}__initIconFromControl(){let{control:e,state:t}=this,{textIcons:i}=this.j.o;if(!0===i||(0,m.isFunction)(i)&&i(e.name)||e.template){t.icon=(0,S.UIButtonState)().icon,t.text=e.text||e.name;return}if(!(0,_.isString)(e.icon)&&null!=e.icon){t.icon={name:e.icon.name||e.name,iconURL:e.icon.iconURL||"",fill:e.icon.fill||"",scale:e.icon.scale};return}if(e.iconURL)t.icon.iconURL=e.iconURL;else{let i=e.icon||e.name;t.icon.name=D.Icon.exists(i)||this.j.o.extraIcons?.[i]?i:""}e.iconURL||t.icon.name||(t.text=e.text||e.name)}onTriggerClick(e){if(this.openedPopup)return void this.__closePopup();let{control:t}=this;if((0,w.attr)(this.trigger,"aria-expanded",!0),e.buffer={actionTrigger:this},t.list)return this.__openControlList(t);if((0,m.isFunction)(t.popup)){let e=this.openPopup();e.parentElement=this;try{if(!1!==this.j.e.fire((0,b.camelCase)(`before-${t.name}-open-popup`),this.target,t,e)){let i=this.toolbar?.getTarget(this)??this.target??null,n=t.popup(this.j,i,this.__closePopup,this);n?(e.setContent((0,_.isString)(n)?this.j.c.fromHTML(n):n).open(()=>(0,v.position)(this.container),!1,this.j.o.allowTabNavigation?this.container:void 0),(0,C.focusFormField)(e.container)):this.__closePopup()}}catch(e){throw this.__closePopup(),e}this.j.e.fire((0,b.camelCase)(`after-${t.name}-open-popup`),e.container)}}onTriggerKeyDown(e){this.state.disabled||(e.key===a.KEY_DOWN?this.onButtonKeyDown(e):[a.KEY_ENTER,a.KEY_SPACE," "].includes(e.key)&&(e.preventDefault(),this.trigger.click()))}onButtonKeyDown(e){e.key!==a.KEY_DOWN||this.state.disabled||!this.state.hasTrigger||e.altKey||e.ctrlKey||e.metaKey||(e.preventDefault(),e.stopPropagation(),this.openedPopup||this.trigger.click(),this.__popupFocusables()[0]?.focus())}__onPopupKeyDown(e){if(!this.openedPopup||e.altKey||e.ctrlKey||e.metaKey)return;let t=e.target;if(h.Dom.isTag(t,x)&&e.key!==a.KEY_ESC)return;let i=this.__popupFocusables(),n=i.indexOf(t);switch(e.key){case a.KEY_ESC:this.__closePopup();break;case a.KEY_UP:n<=0?this.__closePopup():i[n-1].focus();break;case a.KEY_DOWN:if(!i.length)return;i[(n+1)%i.length].focus();break;default:if(!this.control.list||!this.__typeAhead(e.key,i,n))return}e.preventDefault(),e.stopPropagation()}__onEditorKeyDown(e){if(this.openedPopup&&this.control.list&&!e.altKey&&!e.ctrlKey&&!e.metaKey&&this.__typeAhead(e.key,this.__popupFocusables(),-1))return e.preventDefault(),!1}__typeAhead(e,t,i){let n=Date.now();if((n-this.__typedAt>1e3||t[i]!==this.__typedTo)&&(this.__typed=""),1!==e.length||" "===e&&!this.__typed)return!1;this.__typedAt=n,this.__typed+=e,this.__typedTo=t[i];let{compare:o}=new Intl.Collator(void 0,{usage:"search",sensitivity:"base"}),r=this.__typed,s=Array.from(r).every(e=>0===o(e,r[0])),a=s?r[0]:r,l=s?i+1:Math.max(i,0);for(let e=0;e<t.length;e+=1){let i=t[(l+e)%t.length];if(0===o((i.textContent?.trim()??"").slice(0,a.length),a)){i.focus(),this.__typedTo=i;break}}return!0}__popupFocusables(){let e=this.openedPopup;return e?Array.from(e.container.querySelectorAll('button:not([disabled]),a[href],input:not([disabled]):not([type="hidden"]),select:not([disabled]),textarea:not([disabled]),[tabindex]:not([tabindex="-1"])')).filter(e=>!!e.offsetParent):[]}__openControlList(e){let t=this.jodit.options.controls??{},i=e=>(0,E.findControlType)(e,t),n=e.list,o=this.openPopup();o.parentElement=this;let r=e.popup?.(this.j,this.toolbar?.getTarget(this)??this.target??null,this.__closePopup,this);if(r)return this.__openMenu(o,r);let s=(0,I.makeCollection)(this.j);s.parentElement=o,s.mode="vertical";let a=(t,n)=>{let o;if((0,_.isString)(n)&&i(n))return{name:n.toString(),...i(n)};if((0,_.isString)(t)&&i(t))return{name:t.toString(),...i(t),..."object"==typeof n?n:{}};o=t,(0,g.isPlainObject)(o)&&"title"in o&&"value"in o&&(n=t.value,t=t.title);let{childTemplate:r}=e,s={name:t.toString(),template:r&&((e,t,i)=>r(e,t,i,this)),exec:e.childExec?(t,i,n)=>e.childExec?.(t,i,{...n,parentControl:e}):e.exec,data:e.data,command:e.command,isActive:e.isChildActive,value:e.value,isDisabled:e.isChildDisabled,mode:e.mode,args:[...e.args?e.args:[],t,n]};return(0,_.isString)(n)&&(s.text=n),s};s.build((0,p.isArray)(n)?n.map(a):(0,k.keys)(n,!1).map(e=>a(e,n[e])),this.target),this.__openMenu(o,s)}__openMenu(e,t){e.setContent(t).open(()=>(0,v.position)(this.container),!1,this.j.o.allowTabNavigation?this.container:void 0),this.state.activated=!0}onOutsideClick(e){this.openedPopup&&(e&&h.Dom.isNode(e.target)&&(h.Dom.isOrContains(this.container,e.target)||this.openedPopup.isOwnClick(e))||this.__closePopup())}openPopup(){return this.__closePopup(),this.openedPopup=new T.Popup(this.j,!1),this.j.e.on(this.ow,"mousedown touchstart",this.onOutsideClick).on("escape closeAllPopups",this.onOutsideClick).on("keydown",this.__onEditorKeyDown).on(this.openedPopup.container,"keydown",this.__onPopupKeyDown),this.openedPopup}__closePopup(){let e=this.openedPopup;if(!e)return;this.openedPopup=null,this.j.e.off(this.ow,"mousedown touchstart",this.onOutsideClick).off("escape closeAllPopups",this.onOutsideClick).off("keydown",this.__onEditorKeyDown);let{activeElement:t}=this.od,i=t&&h.Dom.isOrContains(e.container,t),n=i&&h.Dom.closest(t,"form",e.container);this.state.activated=!1,e.close(),e.destruct(),this.trigger&&(0,w.attr)(this.trigger,"aria-expanded",!1),n&&(0,f.isJoditObject)(this.j)?this.j.s.focus():i&&this.focus()}onClick(e){let{control:t}=this;if((0,m.isFunction)(t.exec)){let i=this.toolbar?.getTarget(this)??this.target??null,n=t.exec(this.j,i,{control:t,originalEvent:e,button:this});if(!1!==n&&!0!==n&&(this.j?.e?.fire("synchro"),this.parentElement&&this.parentElement.update(),this.__closePopups(),this.j?.e?.fire("afterExec")),!1!==n)return}return t.list?this.__openControlList(t):(0,m.isFunction)(t.popup)?this.onTriggerClick(e):void((t.command||t.name)&&((0,k.call)((0,f.isJoditObject)(this.j)?this.j.execCommand.bind(this.j):this.j.od.execCommand.bind(this.j.od),t.command||t.name,!1,t.args&&t.args[0]),this.__closePopups()))}__closePopups(){let e=[this];for(let t=this.parentElement;t;t=t.parentElement){if(r.Component.isInstanceOf(t,T.Popup)&&t.keepOpen&&(!this.target||this.target.isConnected)){e.forEach(e=>e.__closePopup()),t.updatePosition();return}r.Component.isInstanceOf(t,j)&&e.push(t)}this.j?.e?.fire("closeAllPopups")}destruct(){return this.__closePopup(),super.destruct()}constructor(e,t,i=null){super(e),(0,n._)(this,"control",void 0),(0,n._)(this,"target",void 0),(0,n._)(this,"state",void 0),(0,n._)(this,"trigger",void 0),(0,n._)(this,"__typed",void 0),(0,n._)(this,"__typedAt",void 0),(0,n._)(this,"__typedTo",void 0),(0,n._)(this,"openedPopup",void 0),this.control=t,this.target=i,this.state={...(0,S.UIButtonState)(),theme:"toolbar",currentValue:"",hasTrigger:!1},this.__typed="",this.__typedAt=0,this.__typedTo=null,this.openedPopup=null;let o=this.getElm("button");(0,y.assert)(o,"Element button should exists"),this.button=o,Object.defineProperty(o,"component",{value:this,configurable:!0});let r=this.getElm("trigger");(0,y.assert)(r,"Element trigger should exists"),this.trigger=r,r.remove(),e.e.on([this.button,this.trigger],"mousedown",e=>e.preventDefault()),this.onAction(this.onClick),this.hookStatus(s.STATUSES.ready,()=>{this.__initFromControl(),this.update()}),t.mods&&Object.keys(t.mods).forEach(e=>{t.mods&&this.setMod(e,t.mods[e])})}}(0,o._)([u.cacheHTML],j.prototype,"createContainer",null),(0,o._)([(0,d.watch)("state.hasTrigger",{immediately:!1})],j.prototype,"onChangeHasTrigger",null),(0,o._)([(0,d.watch)("trigger:click")],j.prototype,"onTriggerClick",null),(0,o._)([(0,d.watch)("trigger:keydown")],j.prototype,"onTriggerKeyDown",null),(0,o._)([(0,d.watch)("button:keydown")],j.prototype,"onButtonKeyDown",null),(0,o._)([l.autobind],j.prototype,"__onPopupKeyDown",null),(0,o._)([l.autobind],j.prototype,"__onEditorKeyDown",null),(0,o._)([l.autobind],j.prototype,"onOutsideClick",null),(0,o._)([l.autobind],j.prototype,"__closePopup",null),j=(0,o._)([c.component],j)},5772:function(e,t,i){"use strict";i.d(t,{ToolbarContent:function(){return c}});var n=i(25045),o=i(62445),r=i(84839),s=i(27795),a=i(65946),l=i(59400);let u=new Set(["input","button","select","textarea"]);class c extends l.UIButton{className(){return"ToolbarContent"}getRole(){return"listitem"}onChangeActivated(){}update(){let{control:e}=this,t=e.getContent(this.j,this);((0,a.isString)(t)||t.parentNode!==this.container)&&(s.Dom.detach(this.container),s.Dom.append(this.container,(0,a.isString)(t)?this.j.create.fromHTML(t):t)),this.state.disabled=!!e.isDisabled?.(this.j,this),this.state.activated=!!e.isActive?.(this.j,this),e.update?.(this.j,this),this.onChangeDisabled(),this.onChangeActivated(),super.update()}onChangeDisabled(){super.onChangeDisabled(),s.Dom.each(this.container,e=>{s.Dom.isTag(e,u)&&(0,a.attr)(e,"disabled",this.state.disabled||null)})}createContainer(){return this.j.c.span(this.componentName)}constructor(e,t,i=null){super(e),(0,n._)(this,"control",void 0),(0,n._)(this,"target",void 0),this.control=t,this.target=i,this.container.classList.add(`${this.componentName}_${this.clearName(t.name)}`)}}c=(0,o._)([r.component],c)},39709:function(e,t,i){"use strict";i.d(t,{ToolbarButton:function(){return n.ToolbarButton},ToolbarContent:function(){return o.ToolbarContent},ToolbarSelect:function(){return r.ToolbarSelect}});var n=i(22533),o=i(5772),r=i(61764)},61764:function(e,t,i){"use strict";i.d(t,{ToolbarSelect:function(){return u}});var n=i(62445),o=i(84839),r=i(62101),s=i(85932),a=i(7909),l=i(22533);class u extends l.ToolbarButton{className(){return"ToolbarSelect"}get isToggle(){return!1}update(){super.update(),this.state.icon.name="";let{list:e,data:t}=this.control;if(e){let i=this.state.value||(t&&(0,s.isString)(t.currentValue)?t.currentValue:void 0);i||(i=Object.keys(e)[0]);let n=((0,r.isPlainObject)(e)&&e[i.toString()]||i).toString();this.state.text=this.control.textTemplate?.(this.jodit,n)??n}}updateAriaLabel(){super.updateAriaLabel();let{tooltip:e}=this.state,t=this.text.textContent?.trim();e&&t&&(0,a.attr)(this.button,"aria-label",`${this.jodit.i18n(e)}, ${t}`)}}u=(0,n._)([o.component],u)},42573:function(e,t,i){"use strict";i.d(t,{ToolbarCollection:function(){return f}});var n=i(25045),o=i(62445),r=i(84839),s=i(49574),a=i(91672),l=i(29200),u=i(68616),c=i(7909),d=i(80991),h=i(38027),p=i(97959),m=i(4274);class f extends p.UIList{className(){return"ToolbarCollection"}getRole(){return"toolbar"}get firstButton(){let[e]=this.buttons;return e||null}makeButton(e,t=null){return(0,m.makeButton)(this.j,e,t)}makeSelect(e,t=null){return(0,m.makeSelect)(this.j,e,t)}shouldBeActive(e){}shouldBeDisabled(e){}getTarget(e){return e.target||null}__immediateUpdate(){this.isDestructed||this.j.isLocked||(super.update(),this.j.e.fire("afterUpdateToolbar",this))}update(){this.__immediateUpdate()}setDirection(e){(0,d.css)(this.container,"direction",e),(0,c.attr)(this.container,"dir",e)}__initEvents(){this.j.e.on(this.__listenEvents,this.update).on("afterSetMode focus",this.__immediateUpdate)}hide(){this.container.remove()}show(){this.appendTo(this.j.toolbarContainer)}showInline(e){throw(0,h.error)("The method is not implemented for this class.")}build(e,t=null){let i=this.j.e.fire("beforeToolbarBuild",e);return i&&(e=i),super.build(e,t),this}destruct(){this.isDestructed||(this.j.e.off(this.__listenEvents,this.update).off("afterSetMode focus",this.__immediateUpdate),super.destruct())}constructor(e){super(e),(0,n._)(this,"__listenEvents","updatePlugins updateToolbar changeStack mousedown mouseup keydown change readonly afterResize selectionchange changeSelection focus afterSetMode touchstart focus blur")}}(0,o._)([(0,u.watch)(":afterInit"),s.autobind],f.prototype,"__immediateUpdate",null),(0,o._)([(0,r.debounce)(e=>e.j.defaultTimeout,!0)],f.prototype,"update",null),(0,o._)([(0,l.hook)("ready")],f.prototype,"__initEvents",null),f=(0,o._)([a.component],f)},6209:function(e,t,i){"use strict";i.d(t,{ToolbarEditorCollection:function(){return c}});var n=i(25045),o=i(62445),r=i(81937),s=i(84839),a=i(27795),l=i(65946),u=i(42573);class c extends u.ToolbarCollection{className(){return"ToolbarEditorCollection"}shouldBeDisabled(e){let t=super.shouldBeDisabled(e);if(void 0!==t)return t;let i=void 0===e.control.mode?r.MODE_WYSIWYG:e.control.mode;return i!==r.MODE_SPLIT&&i!==this.j.getRealMode()}shouldBeActive(e){let t,i=super.shouldBeActive(e);if(void 0!==i)return i;let n=this.j.selection?this.j.s.current():null;if(!n)return!1;if(e.control.tags){let i=e.control.tags;if(t=n,a.Dom.up(t,e=>{if(e&&-1!==i.indexOf(e.nodeName.toLowerCase()))return!0},this.j.editor))return!0}if(e.control.css){let i=e.control.css;if(t=n,a.Dom.up(t,e=>{if(e&&!a.Dom.isText(e)&&!a.Dom.isComment(e))return this.checkActiveStatus(i,e)},this.j.editor))return!0}return!1}getTarget(e){return e.target||this.j.s.current()||null}prependInvisibleInput(e){let t=this.j.create.element("input",{name:"jodit-toolbar-focus-helper_"+this.j.id,tabIndex:-1,disabled:!0,style:"width: 0; height:0; position: absolute; visibility: hidden;"});a.Dom.appendChildFirst(e,t)}showInline(e){this.jodit.e.fire("showInlineToolbar",e)}hide(){this.jodit.e.fire("hidePopup"),super.hide(),this.jodit.e.fire("toggleToolbar")}show(){super.show(),this.jodit.e.fire("toggleToolbar")}constructor(e){super(e),(0,n._)(this,"checkActiveStatus",(e,t)=>{let i=0,n=0;return Object.keys(e).forEach(o=>{let r=e[o];(0,l.isFunction)(r)?r(this.j,(0,l.css)(t,o).toString())&&(i+=1):-1!==r.indexOf((0,l.css)(t,o).toString())&&(i+=1),n+=1}),n===i}),this.prependInvisibleInput(this.container)}}c=(0,o._)([s.component],c)},4274:function(e,t,i){"use strict";i.d(t,{makeButton:function(){return a},makeCollection:function(){return s},makeSelect:function(){return l}});var n=i(91672),o=i(91565),r=i(24497);function s(e,t){let i=(0,n.getComponentClass)("ToolbarCollection"),o=(0,n.getComponentClass)("ToolbarEditorCollection"),s=(0,r.isJoditObject)(e)?new o(e):new i(e);return e.o.textIcons&&s.container.classList.add("jodit_text_icons"),t&&(s.parentElement=t),e.o.toolbarButtonSize&&(s.buttonSize=e.o.toolbarButtonSize),s}function a(e,t,i=null){if((0,o.isFunction)(t.getContent))return new((0,n.getComponentClass)("ToolbarContent"))(e,t,i);let r=new((0,n.getComponentClass)("ToolbarButton"))(e,t,i);return r.state.tabIndex=e.o.allowTabNavigation?0:-1,r}function l(e,t,i=null){return new((0,n.getComponentClass)("ToolbarSelect"))(e,t,i)}},40013:function(e,t,i){"use strict";var n=i(17312),o=i(24497),r=i(7909),s=i(5266),a=i(7042);s.Config.prototype.enableDragAndDropFileToEditor=!0,s.Config.prototype.uploader={url:"",insertImageAsBase64URI:!1,showTabInFileSelector:!0,imagesExtensions:["jpg","jpeg","png","gif","webp","bmp","svg","tiff","avif"],headers:null,data:null,filesVariableName:e=>`files[${e}]`,withCredentials:!1,pathVariableName:"path",format:"json",method:"POST",prepareData:e=>e,isSuccess:e=>e.success,getMessage:e=>void 0!==e.data.messages&&(0,n.isArray)(e.data.messages)?e.data.messages.join(" "):"",processFileName:(e,t,i)=>[e,t,i],process:e=>e.data,error(e){this.j.message.error(e.message,4e3)},getDisplayName:(e,t)=>e+t,defaultHandlerSuccess(e){let t=this.j||this;if(!(0,o.isJoditObject)(t))return;let{baseurl:i}=e;(0,a.getItems)(e).forEach(({file:e,isImage:n})=>{let[o,s]=n?["img","src"]:["a","href"],a=t.createInside.element(o);(0,r.attr)(a,s,i+e),"a"===o&&(a.textContent=t.o.uploader.getDisplayName.call(this,i,e)),"img"===o?t.s.insertImage(a,null,t.o.imageDefaultWidth):t.s.insertNode(a)})},defaultHandlerError(e){this.j.message.error(e.message)},promptOnExists:!0,promptOnExistsSuggestName:e=>e,contentType(e){return(void 0===this.ow.FormData||"string"==typeof e)&&"application/x-www-form-urlencoded; charset=UTF-8"}}},89446:function(e,t,i){"use strict";i.d(t,{buildData:function(){return o}});var n=i(65946);function o(e,t){if((0,n.isFunction)(e.o.buildData))return e.o.buildData.call(e,t);let i=e.ow.FormData;if(void 0!==i){if(t instanceof i||(0,n.isString)(t))return t;let e=new i;return Object.keys(t).forEach(i=>{e.append(i,t[i])}),e}return t}},23112:function(e,t,i){"use strict";function n(e){let[t,...i]=e.split(","),n=i.join(","),o=t.split(":")[1]?.split(";")[0]??"",r=/;base64/i.test(t)?atob(n):decodeURIComponent(n),s=new Uint8Array(new ArrayBuffer(r.length));for(let e=0;e<r.length;e+=1)s[e]=r.charCodeAt(e);return new Blob([s.buffer],{type:o})}i.d(t,{dataURItoBlob:function(){return n}})},11981:function(e,t,i){"use strict";i.d(t,{ajaxInstances:function(){return r.ajaxInstances},hasFiles:function(){return a},hasItems:function(){return l},normalizeUploaderData:function(){return n.normalizeUploaderData},processOldBrowserDrag:function(){return o.processOldBrowserDrag},send:function(){return r.send},sendFiles:function(){return s.sendFiles}}),i(89446);var n=i(7042),o=i(95436),r=i(77911),s=i(46533);function a(e){return!!(e&&e.files&&e.files.length>0)}function l(e){return!!(e&&e.items&&e.items.length>0)}},7042:function(e,t,i){"use strict";i.d(t,{getItems:function(){return r},normalizeUploaderData:function(){return s}});var n=i(17312),o=i(85932);function r(e){let{files:t,isImages:i,fileNames:o,items:r}=e;return(0,n.isArray)(t)?t.map((e,t)=>{let n=o?.[t];return{file:e,isImage:!!i?.[t],...void 0!==n?{name:n}:{}}}):r??[]}function s(e){if(!e||"object"!=typeof e)return e;let{files:t,items:i}=e;if(!i||(0,n.isArray)(t)&&(t.length||!i.length))return{...e,items:r(e)};let s=i.map(({name:e})=>e);return{...e,files:i.map(({file:e})=>e),isImages:i.map(({isImage:e})=>e),...s.every(o.isString)?{fileNames:s}:{},items:i}}},95436:function(e,t,i){"use strict";i.d(t,{processOldBrowserDrag:function(){return u}});var n=i(81937),o=i(27795),r=i(28077),s=i(65946),a=i(23112),l=i(46533);function u(e,t,i,u,c){if(t&&(!t.types.length||t.types[0]!==n.TEXT_PLAIN)){let t=e.j.c.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});o.Dom.append((0,r.getContainer)(e.j,e.constructor),t);let n=(0,s.isJoditObject)(e.j)?e.j.s.save():null;t.focus(),e.j.async.setTimeout(()=>{let r=t.firstChild;if(o.Dom.safeRemove(t),r&&r.hasAttribute("src")){let t=(0,s.attr)(r,"src")||"";n&&(0,s.isJoditObject)(e.j)&&e.j.s.restore(),(0,l.sendFiles)(e,[(0,a.dataURItoBlob)(t)],i,u).finally(c)}},e.j.defaultTimeout)}}},46533:function(e,t,i){"use strict";i.d(t,{sendFiles:function(){return async function e(t,i,c,d,h,p){if(!i)throw(0,o.error)("Need files");let{o:m}=t,f=(0,o.toArray)(i);if(!f.length)throw(0,o.error)("Need files");let g=p?.data;if(!p&&(0,o.isFunction)(m.beforeUpload)){let e;try{e=await m.beforeUpload.call(t,f)}catch(e){throw(d||m.defaultHandlerError).call(t,e),e}if(!1===e){let e=(0,o.error)("Upload canceled");throw(d||m.defaultHandlerError).call(t,e),e}if((0,o.isArray)(e)?f=e:(0,o.isPlainObject)(e)&&(0,o.isArray)(e.files)&&(f=e.files,g=e.data),!f.length)return[]}let _=[];if(m.insertImageAsBase64URI&&function(e,t,i,n,r,s){let l,u,c=[];for(u=0;u<e.length;u+=1)if((l=e[u])&&l.type){let d=l.type.match(/\/([a-z0-9]+)/i),h=d[1]?d[1].toLowerCase():"";if(!t.includes(h))continue;let p=new FileReader,{name:m}=l,f=n.j.async.promise((e,t)=>{p.onerror=t,p.onloadend=()=>{let t=(0,a.normalizeUploaderData)({baseurl:"",items:[{file:p.result,isImage:!0,name:m}]});((0,o.isFunction)(r)?r:s).call(n,t),e(t)},p.readAsDataURL(l)});c.push(f),i.push(f),e[u]=null}c.length&&Promise.all(c).then(()=>{n.j.events&&n.j.e.fire("filesWereUploaded")}).catch(()=>{})}(f,m.imagesExtensions,_,t,c,m.defaultHandlerSuccess),(f=f.filter(e=>e)).length){let i,p=new FormData;p.append(m.pathVariableName,t.path),p.append("source",t.source);for(let e=0;e<f.length;e+=1)if(i=f[e]){let n=/\.\w+$/.test(i.name),o=i.type.match(/\/([a-z0-9]+)/i),r=o&&o[1]?o[1].toLowerCase():"",s=f[e].name||Math.random().toString().replace(".","");if(!n&&r){let e=r;["jpeg","jpg"].includes(e)&&(e="jpeg|jpg"),RegExp(".("+e+")$","i").test(s)||(s+="."+r)}let[a,l,u]=m.processFileName.call(t,m.filesVariableName(e),f[e],s);p.append(a,l,u)}h&&h(p),m.data&&(0,o.isPlainObject)(m.data)&&Object.keys(m.data).forEach(e=>{p.append(e,m.data[e])}),g&&Object.keys(g).forEach(e=>{p.append(e,g[e])}),m.prepareData.call(t,p),_.push((0,l.send)(t,p).then(i=>{if(m.isSuccess.call(t,i))return((0,o.isFunction)(c)?c:m.defaultHandlerSuccess).call(t,(0,a.normalizeUploaderData)(m.process.call(t,i))),i;let l=new u.UploadError(m.getMessage.call(t,i),i,f,i=>e(t,i?.files??f,c,d,h,{data:{...g,...i?.data}}));return l.code===n.ERROR_CODE_CONFLICT&&m.promptOnExists?function(e,t){let{files:i}=t;if(i.length>1)return i.reduce((e,i)=>e.then(()=>t.retry({files:[i]})),Promise.resolve());let[n]=i,{j:o,o:a}=e;return new Promise(i=>{let l=!1,u=s.Prompt.call(r.Dlgs.prototype.dlg.call(o,{closeOnClickOverlay:!0}),o.i18n(t.message),o.i18n("Rename"),e=>{if(!(e=e.trim()))return!1;l=!0,i(t.retry({files:[new File([n],e,{type:n.type})]}))},o.i18n("Enter new name"),a.promptOnExistsSuggestName.call(e,n.name));u.e.on(u,"afterClose",()=>{l||i(void 0)})})}(t,l):(((0,o.isFunction)(d)?d:m.defaultHandlerError).call(t,l),i)}).then(()=>{t.j.events&&t.j.e.fire("filesWereUploaded")}))}return Promise.all(_)}}});var n=i(81937),o=i(65946),r=i(80512),s=i(74103),a=i(7042),l=i(77911),u=i(55083)},77911:function(e,t,i){"use strict";i.d(t,{send:function(){return a}});var n=i(65946),o=i(73714),r=i(89446);let s=new WeakMap;function a(e,t){let i=(0,r.buildData)(e,t),a=t=>{e.j.progressbar.show().progress(t),t>=100&&e.j.progressbar.hide()},l=(t,i)=>{let r=new o.Ajax({xhr(){let t=new XMLHttpRequest;return void 0!==e.j.ow.FormData&&t.upload?(i(10),t.upload.addEventListener("progress",e=>{if(e.lengthComputable){let t=e.loaded/e.total;i(t*=100)}},!1)):i(100),t},method:e.o.method||"POST",data:t,url:(0,n.isFunction)(e.o.url)?e.o.url(t):e.o.url,headers:e.o.headers,queryBuild:e.o.queryBuild,contentType:e.o.contentType.call(e,t),withCredentials:e.o.withCredentials||!1}),a=s.get(e);return a||(a=new Set,s.set(e,a)),a.add(r),e.j.e.one("beforeDestruct",r.destruct),r.send().then(e=>e.json()).catch(e=>({success:!1,data:{messages:[e]}})).finally(()=>{r.destruct(),a?.delete(r)})};return((0,n.isFunction)(e.o.customUploadFunction)&&(l=e.o.customUploadFunction),(0,n.isPromise)(i))?i.then(e=>l(e,a)).catch(t=>{e.o.error.call(e,t)}):l(i,a)}i.d(t,["ajaxInstances",0,s])},55083:function(e,t,i){"use strict";i.d(t,{UploadError:function(){return r}});var n=i(25045),o=i(33201);class r extends o.AnswerError{constructor(e,t,i,o){super(e,t,t.data?.code),(0,n._)(this,"files",void 0),(0,n._)(this,"retry",void 0),this.files=i,this.retry=o,Object.setPrototypeOf(this,r.prototype)}}},94925:function(e,t,i){"use strict";i.d(t,{Uploader:function(){return d}});var n=i(25045),o=i(16964),r=i(81937),s=i(23211),a=i(65946),l=i(33201),u=i(5266),c=i(11981);i(40013);class d extends o.ViewComponent{get j(){return this.jodit}className(){return"Uploader"}get o(){return this.options}setPath(e){return this.path=e,this}setSource(e){return this.source=e,this}bind(e,t,i){let n=()=>{e.classList.remove("jodit_drag_hover")},o=this,s=e=>{let s,a,l,u=e.clipboardData,d=e=>{a&&(e.append("extension",l),e.append("mimetype",a.type))};if(!r.IS_IE&&(0,c.hasFiles)(u))return(0,c.sendFiles)(o,u.files,t,i).finally(n),!1;if(r.IS_IE&&!r.IS_ES_NEXT)return(0,c.processOldBrowserDrag)(o,u,t,i,n);if((0,c.hasItems)(u)){let{items:r}=u;for(s=0;s<r.length;s+=1)if("file"===r[s].kind&&"image/png"===r[s].type){if(a=r[s].getAsFile()){let e=a.type.match(/\/([a-z0-9]+)/i);l=e[1]?e[1].toLowerCase():"",(0,c.sendFiles)(o,[a],t,i,d).finally(n)}e.preventDefault();break}}};o.j&&o.j.editor!==e?o.j.e.on(e,"paste",s):o.j.e.on("beforePaste",s),this.attachEvents(e,t,i,n)}attachEvents(e,t,i,n){let o=this;o.j.e.on(e,"dragend dragover dragenter dragleave drop",e=>{e.preventDefault()}).on(e,"dragover",t=>{((0,c.hasFiles)(t.dataTransfer)||(0,c.hasItems)(t.dataTransfer))&&(e.classList.add("jodit_drag_hover"),t.preventDefault())}).on(e,"dragend dragleave",t=>{e.classList.remove("jodit_drag_hover"),(0,c.hasFiles)(t.dataTransfer)&&t.preventDefault()}).on(e,"drop",r=>{e.classList.remove("jodit_drag_hover"),(0,c.hasFiles)(r.dataTransfer)&&(r.preventDefault(),r.stopImmediatePropagation(),(0,c.sendFiles)(o,r.dataTransfer.files,t,i).finally(n))});let r=s.Dom.first(e,e=>s.Dom.isTag(e,"input")&&(0,a.attr)(e,"type")?.toLowerCase()==="file");r&&o.j.e.on(r,"change",()=>{(0,c.sendFiles)(o,r.files,t,i).then(()=>{r.value="",/safari/i.test(navigator.userAgent)||(r.type="",r.type="file")}).finally(n)})}uploadRemoteImage(e,t,i){let n=this,{o}=n,r=(0,a.isFunction)(i)?i:o.defaultHandlerError;(0,c.send)(n,{action:"fileUploadRemote",url:e}).then(e=>{o.isSuccess.call(n,e)?((0,a.isFunction)(t)?t:o.defaultHandlerSuccess).call(n,(0,c.normalizeUploaderData)(o.process.call(n,e))):r.call(n,(0,l.answer)(o.getMessage.call(n,e),e,e.data?.code))}).catch(e=>r.call(n,e))}upload(e){return this.async.promise((t,i)=>{let n=!1,o=e=>t=>{n=!0,e(t)};(0,c.sendFiles)(this,e,o(t),o(i)).then(()=>{n||t({baseurl:"",items:[],files:[],isImages:[]})},o(i))})}destruct(){this.setStatus(o.STATUSES.beforeDestruct);let e=c.ajaxInstances.get(this);e&&(e.forEach(e=>{try{e.destruct()}catch{}}),e.clear()),super.destruct()}constructor(e,t){super(e),(0,n._)(this,"path",""),(0,n._)(this,"source","default"),(0,n._)(this,"options",void 0),this.options=(0,a.ConfigProto)(t||{},(0,a.ConfigProto)(u.Config.defaultOptions.uploader,(0,a.isJoditObject)(e)?e.o.uploader:{}))}}},72348:function(e,t,i){"use strict";var n=i(81937),o=i(27795),r=i(65946),s=i(4099),a=i(54522),l=i.n(a);s.Icon.set("palette",l()),i.d(t,["ColorPickerWidget",0,(e,t,i)=>{let a="jodit-color-picker",l=(0,r.normalizeColor)(i),u=e.c.div(a),c=e.o.textIcons?`<span>${e.i18n("palette")}</span>`:s.Icon.get("palette"),d=e=>{let t=[];return(0,r.isPlainObject)(e)?Object.keys(e).forEach(i=>{t.push(`<div class="${a}__group ${a}__group-${i}">`),t.push(d(e[i])),t.push("</div>")}):(0,r.isArray)(e)&&e.forEach(e=>{let i=l===e;t.push(`<button type="button" class='${a}__color-item ${i?a+"__color-item_active_true":""}' title="${e}" aria-pressed="${i}" tabindex="-1" style="background-color:${e}" data-color="${e}"></button>`)}),t.join("")},h=(0,r.isArray)(e.o.colors)?`<div class="${a}__group">${d(e.o.colors)}</div>`:d(e.o.colors);o.Dom.append(u,e.c.fromHTML(`<div class="${a}__groups">${h}</div>`));let p=(0,r.toArray)(u.querySelectorAll(`.${a}__color-item`)),m=p.find(e=>"true"===(0,r.attr)(e,"aria-pressed"))??p[0];m&&(0,r.attr)(m,"tabindex",0),o.Dom.append(u,e.c.fromHTML(`<div data-ref="extra" class="${a}__extra"></div>`));let{extra:f}=(0,r.refs)(u);o.Dom.append(f,e.c.fromHTML(`<div class="${a}__hex"><input data-ref="hexInput" type="text" spellcheck="false" aria-label="HEX" placeholder="#FF0000" value="${l||""}"/></div>`));let{hexInput:g}=(0,r.refs)(u),_=null,v=()=>{let e=g.value.trim();if(e===_)return;let i=/^#?[0-9a-f]{3}(?:[0-9a-f]{3})?$/i.test(e),n=/^rgba?\([\d\s.,%]+\)$/i.test(e);if(!i&&!n)return;let o=(0,r.normalizeColor)(i&&!e.startsWith("#")?"#"+e:e);o&&(0,r.isFunction)(t)&&(_=e,t(o))};e.e.on(g,"keydown",e=>{e.stopPropagation(),"Enter"===e.key&&(e.preventDefault(),v())}).on(g,"change",e=>{e.stopPropagation(),v()}),o.Dom.append(f,e.c.fromHTML(`<button type="button" class="${a}__remove" data-color="" title="${e.i18n("Remove")}">${e.o.textIcons?e.i18n("Remove"):s.Icon.get("eraser")}</button>`)),e.o.showBrowserColorPicker&&(0,r.hasBrowserColorPicker)()&&(o.Dom.append(f,e.c.fromHTML(`<div class="${a}__native">${c}<input type="color" value="#ffffff"/></div>`)),e.e.on(u,"change",e=>{e.stopPropagation();let i=e.target;if(!i||!i.tagName||!o.Dom.isTag(i,"input")||"color"!==i.type)return;let n=i.value||"";(0,r.isFunction)(t)&&t(n),e.preventDefault()}));let b=e=>{let t=o.Dom.closest(e,e=>o.Dom.isHTMLElement(e)&&(e.classList.contains(a+"__color-item")||e.classList.contains(a+"__remove")),u);return t?(0,r.attr)(t,"-color")||"":void 0},y=e=>{t&&(0,r.isFunction)(t)&&t(e)},w=!1;return e.e.on(u,"mousedown touchend",e=>{if(o.Dom.isTag(e.target,"input"))return void e.stopPropagation();e.stopPropagation(),e.preventDefault();let t=b(e.target);void 0!==t&&(w="mousedown"===e.type,y(t))}),e.e.on(u,"click",e=>{let t=b(e.target);void 0===t||w||y(t),w=!1}).on(u,"keydown",e=>{w=!1;let t=e.target;p.includes(t)&&[n.KEY_LEFT,n.KEY_RIGHT,n.KEY_UP,n.KEY_DOWN].includes(e.key)&&(e.preventDefault(),e.stopPropagation(),((e,t)=>{let i=p.indexOf(e);if(t===n.KEY_LEFT||t===n.KEY_RIGHT){let o=t===n.KEY_LEFT?-1:1;return p[i+("rtl"===(0,r.css)(e,"direction")?-o:o)]}let o=t===n.KEY_DOWN,s=p.filter(t=>o?t.offsetTop>e.offsetTop:t.offsetTop<e.offsetTop);if(!s.length)return;let a=(o?Math.min:Math.max)(...s.map(e=>e.offsetTop)),l=t=>Math.abs(t.offsetLeft-e.offsetLeft);return s.filter(e=>e.offsetTop===a).reduce((e,t)=>l(t)<l(e)?t:e)})(t,e.key)?.focus())}).on(u,"focusin",e=>{p.includes(e.target)&&p.forEach(t=>(0,r.attr)(t,"tabindex",t===e.target?0:-1))}),e.e.fire("afterGenerateColorPicker",u,f,t,l),u}])},18762:function(e,t,i){"use strict";var n=i(23211),o=i(65946),r=i(4099),s=i(89636);let a=(e,t,{label:i,accept:n})=>{let o=e.c.fromHTML(`<div class="jodit-drag-and-drop__file-box"><strong>${e.i18n(i)}</strong><span><br>${e.i18n("or click")}</span><input type="file" accept="${n}" tabindex="-1" dir="auto" multiple=""/></div>`);return e.uploader.bind(o,i=>{t.call(e,i),e.e.fire("closeAllPopups")},t=>{e.message.error(t.message),e.e.fire("closeAllPopups")}),{icon:"upload",name:"Upload",content:o}};function l(e,t,i){let r=n.Dom.first(e,e=>n.Dom.isTag(e,"input")&&(0,o.attr)(e,"name")===t);return r?(i&&(r.value=i),r.value):""}i.d(t,["FileSelectorWidget",0,(e,t,i,u,c=!0)=>{let d,h=[],p=e.o.uploader;if(t.upload&&!1!==p.showTabInFileSelector&&(p.url||p.insertImageAsBase64URI||p.customUploadFunction)){let{upload:i}=t;h.push(a(e,t=>{let n=(0,o.isFunction)(i)?i:p.defaultHandlerSuccess;(0,o.isFunction)(n)&&n.call(e,t)},c?{label:"Drop image",accept:"image/*"}:{label:"Drop file",accept:"*"}))}if(t.filebrowser&&(e.o.filebrowser.ajax.url||e.o.filebrowser.items.url)&&h.push({icon:"folder",name:"Browse",content(){u&&u(),t.filebrowser&&e.filebrowser.open(t.filebrowser,c)}}),t.url){let s=new r.UIButton(e,{type:"submit",variant:"primary",text:"Insert"}),a=new r.UIForm(e,[new r.UIInput(e,{required:!0,label:"URL",name:"url",type:"text",placeholder:"https://"}),new r.UIInput(e,{name:"text",label:"Alternative text"}),new r.UIBlock(e,[s])]);i&&!n.Dom.isText(i)&&!n.Dom.isComment(i)&&(n.Dom.isTag(i,"img")||(0,o.$$)("img",i).length)&&(d="IMG"===i.tagName?i:(0,o.$$)("img",i)[0],l(a.container,"url",(0,o.attr)(d,"src")),l(a.container,"text",(0,o.attr)(d,"alt")),s.state.text="Update"),i&&n.Dom.isTag(i,"a")&&(l(a.container,"url",(0,o.attr)(i,"href")),l(a.container,"text",(0,o.attr)(i,"title")),s.state.text="Update"),a.onSubmit(i=>{(0,o.isFunction)(t.url)&&t.url.call(e,i.url,i.text)}),h.push({icon:"link",name:"URL",content:a.container})}let m=(0,s.TabsWidget)(e,h);return m.classList.add("jodit-file-selector"),m},"UploadTab",0,a])},15753:function(e,t,i){"use strict";i.d(t,{ColorPickerWidget:function(){return n.ColorPickerWidget},FileSelectorWidget:function(){return o.FileSelectorWidget},TabsWidget:function(){return r.TabsWidget},UploadTab:function(){return o.UploadTab}});var n=i(72348),o=i(18762),r=i(89636)},89636:function(e,t,i){"use strict";var n=i(16964),o=i(23211),r=i(91565),s=i(7909),a=i(4099),l=i(29577);i.d(t,["TabsWidget",0,(e,t,i)=>{let u=e.c.div("jodit-tabs"),c=e.c.div("jodit-tabs__wrapper"),d=e.c.div("jodit-tabs__buttons");(0,s.attr)(d,{role:"tablist","aria-orientation":"horizontal"});let h={},p=[],m="";o.Dom.append(u,d),o.Dom.append(u,c);let f=e=>{h[e]&&(p.forEach(e=>{e.state.activated=!1}),Object.values(h).forEach(({tab:e})=>e.classList.remove("jodit-tab_active")),h[e].button.state.activated=!0,h[e].tab.classList.add("jodit-tab_active"))};if(t.forEach(({icon:u,name:g,content:_})=>{let v=e.c.div("jodit-tab");(0,s.attr)(v,{role:"tabpanel"});let b=(0,a.Button)(e,u||g,g);b.state.role="tab",e.e.on(b.container,"pointerdown",e=>e.preventDefault()),m||(m=g),o.Dom.append(d,b.container),p.push(b),b.container.classList.add("jodit-tabs__button","jodit-tabs__button_columns_"+t.length),(0,r.isFunction)(_)?v.classList.add("jodit-tab_empty"):o.Dom.append(v,n.Component.isInstanceOf(_,a.UIElement)?_.container:_),o.Dom.append(c,v),b.onAction(()=>(f(g),(0,r.isFunction)(_)&&!o.Dom.isElement(_)&&_.call(e),i&&(i.activeTab=g),(0,l.focusFormField)(v),!1)),h[g]={button:b,tab:v}}),f(i&&i.activeTab&&h[i.activeTab]?i.activeTab:m),i){let e=i.activeTab;Object.defineProperty(i,"activeTab",{configurable:!0,enumerable:!1,get:()=>e,set(t){e=t,f(t)}})}return u}])},94358:function(e,t,i){"use strict";var n=i(81937),o=i(28077),r=i(65946),s=i(29434),a=i(5266),l=i(17995),u=i.n(l);a.Config.prototype.controls.about={exec(e){let t=e.dlg({closeOnClickOverlay:!0}),i=e.i18n.bind(e);t.setMod("theme",e.o.theme).setHeader(i("About Jodit")).setContent(`<div class="jodit-about">
116
+ </form>`)}])},60936:function(e,t,i){"use strict";i.r(t),i.d(t,{Ajax:function(){return p.Ajax},Alert:function(){return s.Alert},Async:function(){return l.Async},AsyncStorage:function(){return x.AsyncStorage},Button:function(){return m.Button},CommitStyle:function(){return I.CommitStyle},Component:function(){return n.Component},Confirm:function(){return s.Confirm},ContextMenu:function(){return r.ContextMenu},Create:function(){return u.Create},Dialog:function(){return s.Dialog},Dom:function(){return c.Dom},EventEmitter:function(){return d.EventEmitter},EventHandlersStore:function(){return d.EventHandlersStore},Eventify:function(){return d.Eventify},FileBrowser:function(){return a.FileBrowser},Helpers:function(){return o},History:function(){return _.History},Icon:function(){return m.Icon},ImageEditor:function(){return b.ImageEditor},IndexedDBProvider:function(){return x.IndexedDBProvider},LazyWalker:function(){return c.LazyWalker},LocalStorageProvider:function(){return x.LocalStorageProvider},MemoryStorageProvider:function(){return x.MemoryStorageProvider},Plugin:function(){return h.Plugin},PluginSystem:function(){return T.PluginSystem},Popup:function(){return m.Popup},ProgressBar:function(){return m.ProgressBar},Prompt:function(){return s.Prompt},Response:function(){return p.Response},STATUSES:function(){return n.STATUSES},Selection:function(){return I.Selection},Snapshot:function(){return v.Snapshot},StatusBar:function(){return w.StatusBar},Storage:function(){return x.Storage},StorageKey:function(){return x.StorageKey},Table:function(){return k.Table},ToolbarButton:function(){return S.ToolbarButton},ToolbarCollection:function(){return C.ToolbarCollection},ToolbarContent:function(){return S.ToolbarContent},ToolbarEditorCollection:function(){return E.ToolbarEditorCollection},ToolbarSelect:function(){return S.ToolbarSelect},UIBlock:function(){return m.UIBlock},UIButton:function(){return m.UIButton},UIButtonGroup:function(){return m.UIButtonGroup},UIButtonState:function(){return m.UIButtonState},UICheckbox:function(){return m.UICheckbox},UIElement:function(){return m.UIElement},UIFileInput:function(){return m.UIFileInput},UIForm:function(){return m.UIForm},UIGroup:function(){return m.UIGroup},UIInput:function(){return m.UIInput},UIList:function(){return m.UIList},UIMessages:function(){return y.UIMessages},UISelect:function(){return m.UISelect},UISeparator:function(){return m.UISeparator},UISpacer:function(){return m.UISpacer},UITextArea:function(){return m.UITextArea},UITooltip:function(){return m.UITooltip},Uploader:function(){return D.Uploader},View:function(){return f.View},ViewComponent:function(){return n.ViewComponent},ViewWithToolbar:function(){return g.ViewWithToolbar},canUseIndexedDB:function(){return x.canUseIndexedDB},canUsePersistentStorage:function(){return x.canUsePersistentStorage},clearUseIndexedDBCache:function(){return x.clearUseIndexedDBCache},defaultNameSpace:function(){return d.defaultNameSpace},observable:function(){return d.observable}});var n=i(16964),o=i(65946),r=i(67399),s=i(37333),a=i(17610),l=i(91231),u=i(79821),c=i(27795),d=i(1496),h=i(91206),p=i(73714),m=i(4099),f=i(35099),g=i(2222),_=i(53855),v=i(46363),b=i(43271),y=i(10081),w=i(29433),k=i(98803),S=i(39709),C=i(42573),E=i(6209),D=i(94925),T=i(85305),I=i(59841),x=i(25222)},61466:function(e,t,i){"use strict";i.d(t,{UIMessage:function(){return s}});var n=i(62445),o=i(91672),r=i(4099);class s extends r.UIElement{className(){return"UIMessage"}constructor(e,t){super(e),this.setMod("active",!0),this.setMod("variant",t.variant),this.container.textContent=t.text}}s=(0,n._)([o.component],s)},10081:function(e,t,i){"use strict";i.d(t,{UIMessages:function(){return c}});var n=i(25045),o=i(62445),r=i(91672),s=i(23211),a=i(80991),l=i(63468),u=i(61466);class c extends l.UIGroup{className(){return"UIMessages"}info(e,t){this.__message(e,"info",t)}success(e,t){this.__message(e,"success",t)}error(e,t){this.__message(e,"error",t)}message(e,t,i){this.__message(e,t,i)}__message(e,t="info",i){let n=e+":"+t;if(this.__messages.has(n))return void this.async.updateTimeout(n,i||this.options.defaultTimeout);if(!this.__box)throw Error("Container is not defined: "+n);s.Dom.append(this.__box,this.container);let o=new u.UIMessage(this.j,{text:e,variant:t});this.append(o),this.__calcOffsets(),this.__messages.add(n);let r=this.__getRemoveCallback(o,n);this.j.e.on(o.container,"pointerdown",r),this.async.setTimeout(r,{label:n,timeout:i||this.options.defaultTimeout})}__getRemoveCallback(e,t){let i=n=>{n&&n.preventDefault(),e.isInDestruct||(this.async.clearTimeout(t),this.j.e.off(e.container,"pointerdown",i),this.__messages.delete(t),e.setMod("active",!1),this.async.setTimeout(()=>{this.remove(e),e.destruct(),this.__calcOffsets()},300))};return i}__calcOffsets(){let e=5;this.elements.forEach(t=>{(0,a.css)(t.container,"bottom",e+"px"),e+=t.container.offsetHeight+this.options.defaultOffset})}constructor(e,t,i={defaultTimeout:3e3,defaultOffset:5}){super(e),(0,n._)(this,"__box",void 0),(0,n._)(this,"options",void 0),(0,n._)(this,"__messages",void 0),this.__box=t,this.options=i,this.__messages=new Set}}c=(0,o._)([r.component],c)},29433:function(e,t,i){"use strict";i.d(t,{StatusBar:function(){return c}});var n=i(25045),o=i(62445),r=i(16964),s=i(84839),a=i(23211),l=i(23183),u=i(81987);class c extends r.ViewComponent{className(){return"StatusBar"}hide(){this.container.classList.add("jodit_hidden")}show(){this.container.classList.remove("jodit_hidden")}get isShown(){return!this.container.classList.contains("jodit_hidden")}getHeight(){return this.container?.offsetHeight??0}findEmpty(e=!1){let t=this.getElms(e?"item-right":"item");for(let e=0;e<t.length;e+=1)if(!t[e].innerHTML.trim().length)return t[e]}append(e,t=!1){let i=this.findEmpty(t)||this.j.c.div(this.getFullElName("item"));t&&i.classList.add(this.getFullElName("item-right")),a.Dom.append(i,e),this.container&&a.Dom.append(this.container,i),this.j.o.statusbar&&this.show(),this.j.e.fire("resize")}destruct(){this.isInDestruct||(this.setStatus(r.STATUSES.beforeDestruct),a.Dom.safeRemove(this.container),super.destruct())}constructor(e,t){super(e),(0,n._)(this,"target",void 0),(0,n._)(this,"container",void 0),(0,n._)(this,"mods",void 0),this.target=t,this.mods={},this.container=e.c.div("jodit-status-bar"),a.Dom.append(t,this.container),this.hide()}}c=(0,o._)([s.component,(0,s.derive)(u.Mods,l.Elms)],c)},98803:function(e,t,i){"use strict";i.d(t,{Table:function(){return h}});var n=i(25045),o=i(16964),r=i(81937),s=i(27795),a=i(28077),l=i(65946),u=i(80991);let c=new Set(["thead","tbody","tfoot"]),d=new WeakMap;class h extends o.ViewComponent{className(){return"Table"}addSelection(e){this.selected.add(e),this.__recalculateStyles();let t=s.Dom.closest(e,"table",this.j.editor);if(t){let i=h.__selectedByTable.get(t)||new Set;i.add(e),h.__selectedByTable.set(t,i)}}removeSelection(e){this.selected.delete(e),this.__recalculateStyles();let t=s.Dom.closest(e,"table",this.j.editor);if(t){let i=h.__selectedByTable.get(t);i&&(i.delete(e),i.size||h.__selectedByTable.delete(t))}}getAllSelectedCells(){return(0,l.toArray)(this.selected)}static __getSelectedCellsByTable(e){let t=h.__selectedByTable.get(e);return t?(0,l.toArray)(t):[]}destruct(){return this.selected.clear(),super.destruct()}static __getRowsCount(e){return e.rows.length}getRowsCount(e){return h.__getRowsCount(e)}static __getColumnsCount(e){return h.__formalMatrix(e).reduce((e,t)=>Math.max(e,t.length),0)}getColumnsCount(e){return h.__getColumnsCount(e)}static __formalMatrix(e,t){let i=[[]],n=(0,l.toArray)(e.rows),o=(e,n)=>{void 0===i[n]&&(i[n]=[]);let o=e.colSpan,r=e.rowSpan,s,a,l=0;for(;i[n][l];)l+=1;for(a=0;r>a;a+=1)for(s=0;s<o;s+=1){if(void 0===i[n+a]&&(i[n+a]=[]),t&&!1===t(e,n+a,l+s,o,r))return!1;i[n+a][l+s]=e}};for(let e=0;e<n.length;e+=1){let t=(0,l.toArray)(n[e].cells);for(let n=0;n<t.length;n+=1)if(!1===o(t[n],e))return i}return i}formalMatrix(e,t){return h.__formalMatrix(e,t)}static __formalCoordinate(e,t,i=!1){let n=0,o=0,r=1,s=1;return h.__formalMatrix(e,(e,a,l,u,c)=>{if(t===e)return n=a,o=l,r=u||1,s=c||1,i&&(o+=(u||1)-1,n+=(c||1)-1),!1}),[n,o,r,s]}formalCoordinate(e,t,i=!1){return h.__formalCoordinate(e,t,i)}static __appendRow(e,t,i,n){let o;if(t)o=t.cloneNode(!0),s.Dom.each(t,e=>{if(!s.Dom.isCell(e))return;let t=(0,l.attr)(e,"rowspan");if(t&&parseInt(t,10)>1){let i=parseInt(t,10)-1;(0,l.attr)(e,"rowspan",i>1?i:null)}}),s.Dom.each(o,e=>{s.Dom.isCell(e)&&(s.Dom.detach(e),s.Dom.append(e,n.element("br")))});else{let t=h.__getColumnsCount(e);o=n.element("tr");for(let e=0;e<t;e+=1){let e=n.element("td");s.Dom.append(e,n.element("br")),s.Dom.append(o,e)}}let r=t&&t.parentElement;if(i&&t&&!t.nextElementSibling&&s.Dom.isTag(r,"thead")){let t=h.__bodyOf(e,r,n);t.insertBefore(o,t.firstChild),h.__setCellsTag(o,"td",n)}else i&&t&&t.nextSibling?s.Dom.after(t,o):!i&&t?s.Dom.before(t,o):s.Dom.append(s.Dom.first(e,e=>s.Dom.isTag(e,"tbody"))||e,o)}static __bodyOf(e,t,i){let n=e.tBodies[0];return n||(n=i.element("tbody"),s.Dom.after(t,n)),n}static __setCellsTag(e,t,i,n){(0,l.toArray)(e.cells).forEach(e=>{let o=s.Dom.isTag(e,t)?e:s.Dom.replace(e,t,i,!0);o!==e&&n?.set(e,o),"td"===t?(0,l.attr)(o,"scope",null):o.hasAttribute("scope")||(0,l.attr)(o,"scope","col")})}hasHeaderRow(e){return!!e.tHead?.rows.length}canToggleHeaderRow(e){let[t]=(0,l.toArray)(e.rows);return this.hasHeaderRow(e)||!!(t&&(0,l.toArray)(t.cells).every(e=>e.rowSpan<2))}toggleHeaderRow(e){let t=new Map,i=this.j.createInside,n=e.tHead;if(!this.canToggleHeaderRow(e))return t;if(n&&this.hasHeaderRow(e)){let o=h.__bodyOf(e,n,i),r=o.firstChild;(0,l.toArray)(n.rows).forEach(e=>{o.insertBefore(e,r),h.__setCellsTag(e,"td",i,t)}),s.Dom.safeRemove(n)}else{let[o]=(0,l.toArray)(e.rows),r=n||i.element("thead");n||(e.tHead=r),s.Dom.append(r,o),h.__setCellsTag(o,"th",i,t)}return t}appendRow(e,t,i){return h.__appendRow(e,t,i,this.j.createInside)}static __removeRow(e,t){let i,n=h.__formalMatrix(e),o=e.rows[t];n[t].forEach((r,a)=>{if(i=!1,t-1>=0&&n[t-1][a]===r)i=!0;else if(n[t+1]&&n[t+1][a]===r){if(r.parentNode===o&&r.parentNode.nextSibling){i=!0;let o=a+1;for(;n[t+1][o]===r;)o+=1;let l=s.Dom.next(r.parentNode,e=>s.Dom.isTag(e,"tr"),e);if(l){let e=null;for(let i=o;i<n[t+1].length;i+=1){let o=n[t+1][i];if(o&&o.parentNode===l){e=o;break}}e?s.Dom.before(e,r):s.Dom.append(l,r)}}}else s.Dom.safeRemove(r);if(i&&(r.parentNode===o||r!==n[t][a-1])){let e=r.rowSpan;(0,l.attr)(r,"rowspan",e-1>1?e-1:null)}});let r=o.parentElement;s.Dom.safeRemove(o),s.Dom.isTag(r,c)&&!r.rows.length&&s.Dom.safeRemove(r)}removeRow(e,t){return h.__removeRow(e,t)}appendColumn(e,t,i=!0){let n=h.__formalMatrix(e);if(!i&&s.Dom.isCell(t.previousElementSibling))return this.appendColumn(e,t.previousElementSibling,!0);let[,o]=h.__formalCoordinate(e,t,i),r=i?o+1:o;for(let e=0;e<n.length;){let t=n[e];if(t[o]!==t[r]||o===r){let e=this.j.createInside.element("td");s.Dom.append(e,this.j.createInside.element("br")),i?s.Dom.after(t[o],e):s.Dom.before(t[o],e),t[o].rowSpan>1&&(e.rowSpan=t[o].rowSpan)}else t[o].colSpan+=1;e+=t[o].rowSpan||1}}static __removeColumn(e,t){let i,n=h.__formalMatrix(e);n.forEach((e,o)=>{let r=e[t];if(i=!1,t-1>=0&&n[o][t-1]===r||t+1<e.length&&n[o][t+1]===r?i=!0:s.Dom.safeRemove(r),i&&(o-1<0||r!==n[o-1][t])){let e=r.colSpan;(0,l.attr)(r,"colspan",e-1>1?(e-1).toString():null)}})}removeColumn(e,t){return h.__removeColumn(e,t)}static __getSelectedBound(e,t){let i,n,o,r=[[1/0,1/0],[0,0]],s=h.__formalMatrix(e);for(i=0;i<s.length;i+=1)for(n=0;s[i]&&n<s[i].length;n+=1)t.includes(s[i][n])&&(r[0][0]=Math.min(i,r[0][0]),r[0][1]=Math.min(n,r[0][1]),r[1][0]=Math.max(i,r[1][0]),r[1][1]=Math.max(n,r[1][1]));for(i=r[0][0];i<=r[1][0];i+=1)for(o=1,n=r[0][1];n<=r[1][1];n+=1){for(;s[i]&&s[i][n-o]&&s[i][n]===s[i][n-o];)r[0][1]=Math.min(n-o,r[0][1]),r[1][1]=Math.max(n-o,r[1][1]),o+=1;for(o=1;s[i]&&s[i][n+o]&&s[i][n]===s[i][n+o];)r[0][1]=Math.min(n+o,r[0][1]),r[1][1]=Math.max(n+o,r[1][1]),o+=1;for(o=1;s[i-o]&&s[i][n]===s[i-o][n];)r[0][0]=Math.min(i-o,r[0][0]),r[1][0]=Math.max(i-o,r[1][0]),o+=1;for(o=1;s[i+o]&&s[i][n]===s[i+o][n];)r[0][0]=Math.min(i+o,r[0][0]),r[1][0]=Math.max(i+o,r[1][0]),o+=1}return r}getSelectedBound(e,t){return h.__getSelectedBound(e,t)}static __normalizeTable(e){let t=[],i=h.__formalMatrix(e);h.__removeExtraColspans(i,t),h.__removeExtraRowspans(i,t);for(let e=0;e<i.length;e+=1)for(let t=0;t<i[e].length;t+=1)void 0!==i[e][t]&&(i[e][t].hasAttribute("rowspan")&&1===i[e][t].rowSpan&&(0,l.attr)(i[e][t],"rowspan",null),i[e][t].hasAttribute("colspan")&&1===i[e][t].colSpan&&(0,l.attr)(i[e][t],"colspan",null),i[e][t].hasAttribute("class")&&!(0,l.attr)(i[e][t],"class")&&(0,l.attr)(i[e][t],"class",null));h.__unmark(t)}static __removeExtraColspans(e,t){for(let i=0;i<e[0].length;i+=1){let n=1e6,o=!1;for(let t=0;t<e.length;t+=1)if(void 0!==e[t][i]){if(e[t][i].colSpan<2){o=!0;break}n=Math.min(n,e[t][i].colSpan)}if(!o)for(let o=0;o<e.length;o+=1)void 0!==e[o][i]&&h.__mark(e[o][i],"colspan",e[o][i].colSpan-n+1,t)}}static __removeExtraRowspans(e,t){let i,n;for(i=0;i<e.length;i+=1){let o=1e6,r=!1;for(n=0;n<e[i].length;n+=1)if(void 0!==e[i][n]){if(e[i][n].rowSpan<2){r=!0;break}o=Math.min(o,e[i][n].rowSpan)}if(!r)for(n=0;n<e[i].length;n+=1)void 0!==e[i][n]&&h.__mark(e[i][n],"rowspan",e[i][n].rowSpan-o+1,t)}}normalizeTable(e){return h.__normalizeTable(e)}static __mergeSelected(e,t){let i=[],n=h.__getSelectedBound(e,h.__getSelectedCellsByTable(e)),o=0,a=null,c=0,d=0,m=0,f=new Set,g=[];n&&(n[0][0]-n[1][0]||n[0][1]-n[1][1])&&(h.__formalMatrix(e,(e,r,s,_,v)=>{r>=n[0][0]&&r<=n[1][0]&&s>=n[0][1]&&s<=n[1][1]&&(f.has(e)||(f.add(e),r===n[0][0]&&(0,u.cssInline)(e,"width")&&(o+=e.offsetWidth),""!==(0,l.trim)(e.innerHTML.replace(/<br(\/)?>/g,""))&&i.push(e.innerHTML),_>1&&(d+=_-1),v>1&&(m+=v-1),a?(h.__mark(e,"remove",1,g),p(t).removeSelection(e)):(a=e,c=s)))}),d=n[1][1]-n[0][1]+1,m=n[1][0]-n[0][0]+1,a&&(d>1&&h.__mark(a,"colspan",d,g),m>1&&h.__mark(a,"rowspan",m,g),o&&(h.__mark(a,"width",(o/e.offsetWidth*100).toFixed(r.ACCURACY)+"%",g),c&&h.__setColumnWidthByDelta(e,c,0,!0,g)),a.innerHTML=i.join("<br/>")||"<br/>",p(t).addSelection(a),f.delete(a),h.__unmark(g),h.__normalizeTable(e),(0,l.toArray)(e.rows).forEach(e=>{e.cells.length||s.Dom.safeRemove(e)})))}mergeSelected(e){return h.__mergeSelected(e,this.j)}static __splitHorizontal(e,t){let i,n,o,r,a,l=[];h.__getSelectedCellsByTable(e).forEach(u=>{n=t.createInside.element("td"),s.Dom.append(n,t.createInside.element("br")),o=t.createInside.element("tr"),i=h.__formalCoordinate(e,u),u.rowSpan<2?(h.__formalMatrix(e,(e,t,n)=>{i[0]===t&&i[1]!==n&&e!==u&&h.__mark(e,"rowspan",e.rowSpan+1,l)}),s.Dom.after(s.Dom.closest(u,"tr",e),o),s.Dom.append(o,n)):(h.__mark(u,"rowspan",u.rowSpan-1,l),h.__formalMatrix(e,(t,n,o)=>{n>i[0]&&n<i[0]+u.rowSpan&&i[1]>o&&t.parentNode.rowIndex===n&&(a=t),i[0]<n&&t===u&&(r=e.rows[n])}),a?s.Dom.after(a,n):s.Dom.prepend(r,n)),u.colSpan>1&&h.__mark(n,"colspan",u.colSpan,l),h.__unmark(l),p(t).removeSelection(u)}),this.__normalizeTable(e)}splitHorizontal(e){return h.__splitHorizontal(e,this.j)}static __splitVertical(e,t){let i,n,o,a=[];h.__getSelectedCellsByTable(e).forEach(l=>{i=h.__formalCoordinate(e,l),l.colSpan<2?h.__formalMatrix(e,(e,t,n)=>{i[1]===n&&i[0]!==t&&e!==l&&h.__mark(e,"colspan",e.colSpan+1,a)}):h.__mark(l,"colspan",l.colSpan-1,a),n=t.createInside.element("td"),s.Dom.append(n,t.createInside.element("br")),l.rowSpan>1&&h.__mark(n,"rowspan",l.rowSpan,a);let u=l.offsetWidth;s.Dom.after(l,n),o=u/e.offsetWidth/2,h.__mark(l,"width",(100*o).toFixed(r.ACCURACY)+"%",a),h.__mark(n,"width",(100*o).toFixed(r.ACCURACY)+"%",a),h.__unmark(a),p(t).removeSelection(l)}),h.__normalizeTable(e)}splitVertical(e){return h.__splitVertical(e,this.j)}static __setColumnWidthByDelta(e,t,i,n,o){let s=h.__formalMatrix(e),a=0;for(let n=0;n<s.length;n+=1){let l=s[n][t];if(l.colSpan>1&&s.length>1)continue;let u=(l.offsetWidth+i)/e.offsetWidth*100;h.__mark(l,"width",u.toFixed(r.ACCURACY)+"%",o),a=n;break}for(let e=a+1;e<s.length;e+=1){let i=s[e][t];h.__mark(i,"width",null,o)}n||h.__unmark(o)}setColumnWidthByDelta(e,t,i,n,o){return h.__setColumnWidthByDelta(e,t,i,n,o)}static __mark(e,t,i,n){n.push(e);let o=d.get(e)??{};o[t]=void 0===i?1:i,d.set(e,o)}static __unmark(e){e.forEach(e=>{let t=d.get(e);t&&(Object.keys(t).forEach(i=>{let n=t[i];switch(i){case"remove":s.Dom.safeRemove(e);break;case"rowspan":(0,l.attr)(e,"rowspan",(0,l.isNumber)(n)&&n>1?n:null);break;case"colspan":(0,l.attr)(e,"colspan",(0,l.isNumber)(n)&&n>1?n:null);break;case"width":null==n?(e.style.removeProperty("width"),(0,l.attr)(e,"style")||(0,l.attr)(e,"style",null)):(0,l.css)(e,"width",n.toString())}delete t[i]}),d.delete(e))})}constructor(...e){super(...e),(0,n._)(this,"selected",new Set),(0,n._)(this,"__recalculateStyles",this.async.microDebounce(()=>{let e=(0,a.getContainer)(this.j,h,"style",!0),t=[];this.selected.forEach(e=>{let i=(0,l.cssPath)(e);i&&t.push(i)});let i=t.length>1?t.map(e=>`${e}::selection,${e} ::selection`).join(",")+"{background:transparent}":"";e.innerHTML=t.length?t.join(",")+`{${this.jodit.options.table.selectionCellStyle}}`+i:""}))}}(0,n._)(h,"__selectedByTable",new WeakMap);let p=e=>e.getInstance("Table",e.o)},22533:function(e,t,i){"use strict";i.d(t,{ToolbarButton:function(){return j}});var n=i(25045),o=i(62445),r=i(80251),s=i(69364),a=i(81937),l=i(49574),u=i(51676),c=i(91672),d=i(68616),h=i(23211),p=i(17312),m=i(91565),f=i(24497),g=i(62101),_=i(85932),v=i(86878),b=i(57821),y=i(28712),w=i(7909),k=i(71125),S=i(59400),C=i(29577),E=i(15982),D=i(29434),T=i(51116),I=i(4274);let x=new Set(["input","textarea","select"]);class j extends S.UIButton{className(){return"ToolbarButton"}getRole(){return"listitem"}updateAriaLabel(){if(super.updateAriaLabel(),this.trigger){let e=this.state.tooltip?this.jodit.i18n(this.state.tooltip):null;(0,w.attr)(this.trigger,"aria-label",e)}}get toolbar(){let e=(0,c.getComponentClass)("ToolbarCollection");return this.closest(e)}update(){let{control:e,state:t}=this,i=this.toolbar;if(!i)return;let n=e.value?.(i.jodit,this);void 0!==n&&(t.value=n),t.disabled=this.__calculateDisabledStatus(i),t.activated=this.__calculateActivatedStatus(i),e.update?.(i.jodit,this)}__calculateActivatedStatus(e){return(!(0,f.isJoditObject)(this.j)||!!this.j.editorIsActive)&&(!!this.control.isActive?.(this.j,this)||!!(e&&e.shouldBeActive(this)))}__calculateDisabledStatus(e){return!!(this.j.o.disabled||this.j.o.readonly&&(!this.j.o.activeButtonsInReadOnly||!this.j.o.activeButtonsInReadOnly.includes(this.control.name))||this.control.isDisabled?.(this.j,this))||!!(e&&e.shouldBeDisabled(this))}get isToggle(){let{isActive:e,tags:t,css:i}=this.control;return!!(e||t||i)}onChangeActivated(){(0,w.attr)(this.button,"aria-pressed",this.isToggle?this.state.activated:null),this.setMod("activated",this.state.activated||null)}onChangeText(){(0,m.isFunction)(this.control.template)?(this.text.innerHTML=this.control.template(this.j,this.control.name,this.j.i18n(this.state.text)),this.updateAriaLabel()):super.onChangeText(),this.setMod("text-icons",!!this.text.innerText.trim().length)}onChangeTabIndex(){(0,w.attr)(this.button,"tabindex",this.state.tabIndex),(0,w.attr)(this.trigger,"tabindex",this.state.tabIndex)}createContainer(){let e=this.componentName,t=this.j.c.span(e),i=super.createContainer();i.classList.remove(e),i.classList.add(e+"__button"),Object.defineProperty(i,"component",{value:this,configurable:!0}),h.Dom.append(t,i);let n=this.j.c.fromHTML(`<span role="button" aria-haspopup="true" aria-expanded="false" class="${e}__trigger">${D.Icon.get("chevron")}</span>`);return h.Dom.append(i,n),t}focus(){h.Dom.first(this.container,e=>h.Dom.isTag(e,"button"))?.focus()}onChangeHasTrigger(){this.state.hasTrigger?h.Dom.append(this.container,this.trigger):h.Dom.safeRemove(this.trigger),this.setMod("with-trigger",this.state.hasTrigger||null)}onChangeDisabled(){let e=this.state.disabled?"disabled":null;(0,w.attr)(this.trigger,"disabled",e),(0,w.attr)(this.button,"disabled",e),(0,w.attr)(this.container,"disabled",e)}__initFromControl(){let{control:e,state:t}=this;this.updateSize(),t.name=e.name,this.__initIconFromControl(),e.tooltip&&(t.tooltip=(0,m.isFunction)(e.tooltip)?e.tooltip(this.j,e,this):e.tooltip),t.hasTrigger=!!(e.list||e.popup&&e.exec),this.onChangeActivated()}__initIconFromControl(){let{control:e,state:t}=this,{textIcons:i}=this.j.o;if(!0===i||(0,m.isFunction)(i)&&i(e.name)||e.template){t.icon=(0,S.UIButtonState)().icon,t.text=e.text||e.name;return}if(!(0,_.isString)(e.icon)&&null!=e.icon){t.icon={name:e.icon.name||e.name,iconURL:e.icon.iconURL||"",fill:e.icon.fill||"",scale:e.icon.scale};return}if(e.iconURL)t.icon.iconURL=e.iconURL;else{let i=e.icon||e.name;t.icon.name=D.Icon.exists(i)||this.j.o.extraIcons?.[i]?i:""}e.iconURL||t.icon.name||(t.text=e.text||e.name)}onTriggerClick(e){if(this.openedPopup)return void this.__closePopup();let{control:t}=this;if((0,w.attr)(this.trigger,"aria-expanded",!0),e.buffer={actionTrigger:this},t.list)return this.__openControlList(t);if((0,m.isFunction)(t.popup)){let e=this.openPopup();e.parentElement=this;try{if(!1!==this.j.e.fire((0,b.camelCase)(`before-${t.name}-open-popup`),this.target,t,e)){let i=this.toolbar?.getTarget(this)??this.target??null,n=t.popup(this.j,i,this.__closePopup,this);n?(e.setContent((0,_.isString)(n)?this.j.c.fromHTML(n):n).open(()=>(0,v.position)(this.container),!1,this.j.o.allowTabNavigation?this.container:void 0),(0,C.focusFormField)(e.container)):this.__closePopup()}}catch(e){throw this.__closePopup(),e}this.j.e.fire((0,b.camelCase)(`after-${t.name}-open-popup`),e.container)}}onTriggerKeyDown(e){this.state.disabled||(e.key===a.KEY_DOWN?this.onButtonKeyDown(e):[a.KEY_ENTER,a.KEY_SPACE," "].includes(e.key)&&(e.preventDefault(),this.trigger.click()))}onButtonKeyDown(e){e.key!==a.KEY_DOWN||this.state.disabled||!this.state.hasTrigger||e.altKey||e.ctrlKey||e.metaKey||(e.preventDefault(),e.stopPropagation(),this.openedPopup||this.trigger.click(),this.__popupFocusables()[0]?.focus())}__onPopupKeyDown(e){if(!this.openedPopup||e.altKey||e.ctrlKey||e.metaKey)return;let t=e.target;if(h.Dom.isTag(t,x)&&e.key!==a.KEY_ESC)return;let i=this.__popupFocusables(),n=i.indexOf(t);switch(e.key){case a.KEY_ESC:this.__closePopup();break;case a.KEY_UP:n<=0?this.__closePopup():i[n-1].focus();break;case a.KEY_DOWN:if(!i.length)return;i[(n+1)%i.length].focus();break;default:if(!this.control.list||!this.__typeAhead(e.key,i,n))return}e.preventDefault(),e.stopPropagation()}__onEditorKeyDown(e){if(this.openedPopup&&this.control.list&&!e.altKey&&!e.ctrlKey&&!e.metaKey&&this.__typeAhead(e.key,this.__popupFocusables(),-1))return e.preventDefault(),!1}__typeAhead(e,t,i){let n=Date.now();if((n-this.__typedAt>1e3||t[i]!==this.__typedTo)&&(this.__typed=""),1!==e.length||" "===e&&!this.__typed)return!1;this.__typedAt=n,this.__typed+=e,this.__typedTo=t[i];let{compare:o}=new Intl.Collator(void 0,{usage:"search",sensitivity:"base"}),r=this.__typed,s=Array.from(r).every(e=>0===o(e,r[0])),a=s?r[0]:r,l=s?i+1:Math.max(i,0);for(let e=0;e<t.length;e+=1){let i=t[(l+e)%t.length];if(0===o((i.textContent?.trim()??"").slice(0,a.length),a)){i.focus(),this.__typedTo=i;break}}return!0}__popupFocusables(){let e=this.openedPopup;return e?Array.from(e.container.querySelectorAll('button:not([disabled]),a[href],input:not([disabled]):not([type="hidden"]),select:not([disabled]),textarea:not([disabled]),[tabindex]:not([tabindex="-1"])')).filter(e=>!!e.offsetParent):[]}__openControlList(e){let t=this.jodit.options.controls??{},i=e=>(0,E.findControlType)(e,t),n=e.list,o=this.openPopup();o.parentElement=this;let r=e.popup?.(this.j,this.toolbar?.getTarget(this)??this.target??null,this.__closePopup,this);if(r)return this.__openMenu(o,r);let s=(0,I.makeCollection)(this.j);s.parentElement=o,s.mode="vertical";let a=(t,n)=>{let o;if((0,_.isString)(n)&&i(n))return{name:n.toString(),...i(n)};if((0,_.isString)(t)&&i(t))return{name:t.toString(),...i(t),..."object"==typeof n?n:{}};o=t,(0,g.isPlainObject)(o)&&"title"in o&&"value"in o&&(n=t.value,t=t.title);let{childTemplate:r}=e,s={name:t.toString(),template:r&&((e,t,i)=>r(e,t,i,this)),exec:e.childExec?(t,i,n)=>e.childExec?.(t,i,{...n,parentControl:e}):e.exec,data:e.data,command:e.command,isActive:e.isChildActive,value:e.value,isDisabled:e.isChildDisabled,mode:e.mode,args:[...e.args?e.args:[],t,n]};return(0,_.isString)(n)&&(s.text=n),s};s.build((0,p.isArray)(n)?n.map(a):(0,k.keys)(n,!1).map(e=>a(e,n[e])),this.target),this.__openMenu(o,s)}__openMenu(e,t){e.setContent(t).open(()=>(0,v.position)(this.container),!1,this.j.o.allowTabNavigation?this.container:void 0),this.state.activated=!0}onOutsideClick(e){this.openedPopup&&(e&&h.Dom.isNode(e.target)&&(h.Dom.isOrContains(this.container,e.target)||this.openedPopup.isOwnClick(e))||this.__closePopup())}openPopup(){return this.__closePopup(),this.openedPopup=new T.Popup(this.j,!1),this.j.e.on(this.ow,"mousedown touchstart",this.onOutsideClick).on("escape closeAllPopups",this.onOutsideClick).on("keydown",this.__onEditorKeyDown).on(this.openedPopup.container,"keydown",this.__onPopupKeyDown),this.openedPopup}__closePopup(){let e=this.openedPopup;if(!e)return;this.openedPopup=null,this.j.e.off(this.ow,"mousedown touchstart",this.onOutsideClick).off("escape closeAllPopups",this.onOutsideClick).off("keydown",this.__onEditorKeyDown);let{activeElement:t}=this.od,i=t&&h.Dom.isOrContains(e.container,t),n=i&&h.Dom.closest(t,"form",e.container);this.state.activated=!1,e.close(),e.destruct(),this.trigger&&(0,w.attr)(this.trigger,"aria-expanded",!1),n&&(0,f.isJoditObject)(this.j)?this.j.s.focus():i&&this.focus()}onClick(e){let{control:t}=this;if((0,m.isFunction)(t.exec)){let i=this.toolbar?.getTarget(this)??this.target??null,n=t.exec(this.j,i,{control:t,originalEvent:e,button:this});if(!1!==n&&!0!==n&&(this.j?.e?.fire("synchro"),this.parentElement&&this.parentElement.update(),this.__closePopups(),this.j?.e?.fire("afterExec")),!1!==n)return}return t.list?this.__openControlList(t):(0,m.isFunction)(t.popup)?this.onTriggerClick(e):void((t.command||t.name)&&((0,k.call)((0,f.isJoditObject)(this.j)?this.j.execCommand.bind(this.j):this.j.od.execCommand.bind(this.j.od),t.command||t.name,!1,t.args&&t.args[0]),this.__closePopups()))}__closePopups(){let e=[this];for(let t=this.parentElement;t;t=t.parentElement){if(r.Component.isInstanceOf(t,T.Popup)&&t.keepOpen&&(!this.target||this.target.isConnected)){e.forEach(e=>e.__closePopup()),t.updatePosition();return}r.Component.isInstanceOf(t,j)&&e.push(t)}this.j?.e?.fire("closeAllPopups")}destruct(){return this.__closePopup(),super.destruct()}constructor(e,t,i=null){super(e),(0,n._)(this,"control",void 0),(0,n._)(this,"target",void 0),(0,n._)(this,"state",void 0),(0,n._)(this,"trigger",void 0),(0,n._)(this,"__typed",void 0),(0,n._)(this,"__typedAt",void 0),(0,n._)(this,"__typedTo",void 0),(0,n._)(this,"openedPopup",void 0),this.control=t,this.target=i,this.state={...(0,S.UIButtonState)(),theme:"toolbar",currentValue:"",hasTrigger:!1},this.__typed="",this.__typedAt=0,this.__typedTo=null,this.openedPopup=null;let o=this.getElm("button");(0,y.assert)(o,"Element button should exists"),this.button=o,Object.defineProperty(o,"component",{value:this,configurable:!0});let r=this.getElm("trigger");(0,y.assert)(r,"Element trigger should exists"),this.trigger=r,r.remove(),e.e.on([this.button,this.trigger],"mousedown",e=>e.preventDefault()),this.onAction(this.onClick),this.hookStatus(s.STATUSES.ready,()=>{this.__initFromControl(),this.update()}),t.mods&&Object.keys(t.mods).forEach(e=>{t.mods&&this.setMod(e,t.mods[e])})}}(0,o._)([u.cacheHTML],j.prototype,"createContainer",null),(0,o._)([(0,d.watch)("state.hasTrigger",{immediately:!1})],j.prototype,"onChangeHasTrigger",null),(0,o._)([(0,d.watch)("trigger:click")],j.prototype,"onTriggerClick",null),(0,o._)([(0,d.watch)("trigger:keydown")],j.prototype,"onTriggerKeyDown",null),(0,o._)([(0,d.watch)("button:keydown")],j.prototype,"onButtonKeyDown",null),(0,o._)([l.autobind],j.prototype,"__onPopupKeyDown",null),(0,o._)([l.autobind],j.prototype,"__onEditorKeyDown",null),(0,o._)([l.autobind],j.prototype,"onOutsideClick",null),(0,o._)([l.autobind],j.prototype,"__closePopup",null),j=(0,o._)([c.component],j)},5772:function(e,t,i){"use strict";i.d(t,{ToolbarContent:function(){return c}});var n=i(25045),o=i(62445),r=i(84839),s=i(27795),a=i(65946),l=i(59400);let u=new Set(["input","button","select","textarea"]);class c extends l.UIButton{className(){return"ToolbarContent"}getRole(){return"listitem"}onChangeActivated(){}update(){let{control:e}=this,t=e.getContent(this.j,this);((0,a.isString)(t)||t.parentNode!==this.container)&&(s.Dom.detach(this.container),s.Dom.append(this.container,(0,a.isString)(t)?this.j.create.fromHTML(t):t)),this.state.disabled=!!e.isDisabled?.(this.j,this),this.state.activated=!!e.isActive?.(this.j,this),e.update?.(this.j,this),this.onChangeDisabled(),this.onChangeActivated(),super.update()}onChangeDisabled(){super.onChangeDisabled(),s.Dom.each(this.container,e=>{s.Dom.isTag(e,u)&&(0,a.attr)(e,"disabled",this.state.disabled||null)})}createContainer(){return this.j.c.span(this.componentName)}constructor(e,t,i=null){super(e),(0,n._)(this,"control",void 0),(0,n._)(this,"target",void 0),this.control=t,this.target=i,this.container.classList.add(`${this.componentName}_${this.clearName(t.name)}`)}}c=(0,o._)([r.component],c)},39709:function(e,t,i){"use strict";i.d(t,{ToolbarButton:function(){return n.ToolbarButton},ToolbarContent:function(){return o.ToolbarContent},ToolbarSelect:function(){return r.ToolbarSelect}});var n=i(22533),o=i(5772),r=i(61764)},61764:function(e,t,i){"use strict";i.d(t,{ToolbarSelect:function(){return u}});var n=i(62445),o=i(84839),r=i(62101),s=i(85932),a=i(7909),l=i(22533);class u extends l.ToolbarButton{className(){return"ToolbarSelect"}get isToggle(){return!1}update(){super.update(),this.state.icon.name="";let{list:e,data:t}=this.control;if(e){let i=this.state.value||(t&&(0,s.isString)(t.currentValue)?t.currentValue:void 0);i||(i=Object.keys(e)[0]);let n=((0,r.isPlainObject)(e)&&e[i.toString()]||i).toString();this.state.text=this.control.textTemplate?.(this.jodit,n)??n}}updateAriaLabel(){super.updateAriaLabel();let{tooltip:e}=this.state,t=this.text.textContent?.trim();e&&t&&(0,a.attr)(this.button,"aria-label",`${this.jodit.i18n(e)}, ${t}`)}}u=(0,n._)([o.component],u)},42573:function(e,t,i){"use strict";i.d(t,{ToolbarCollection:function(){return f}});var n=i(25045),o=i(62445),r=i(84839),s=i(49574),a=i(91672),l=i(29200),u=i(68616),c=i(7909),d=i(80991),h=i(38027),p=i(97959),m=i(4274);class f extends p.UIList{className(){return"ToolbarCollection"}getRole(){return"toolbar"}get firstButton(){let[e]=this.buttons;return e||null}makeButton(e,t=null){return(0,m.makeButton)(this.j,e,t)}makeSelect(e,t=null){return(0,m.makeSelect)(this.j,e,t)}shouldBeActive(e){}shouldBeDisabled(e){}getTarget(e){return e.target||null}__immediateUpdate(){this.isDestructed||this.j.isLocked||(super.update(),this.j.e.fire("afterUpdateToolbar",this))}update(){this.__immediateUpdate()}setDirection(e){(0,d.css)(this.container,"direction",e),(0,c.attr)(this.container,"dir",e)}__initEvents(){this.j.e.on(this.__listenEvents,this.update).on("afterSetMode focus",this.__immediateUpdate)}hide(){this.container.remove()}show(){this.appendTo(this.j.toolbarContainer)}showInline(e){throw(0,h.error)("The method is not implemented for this class.")}build(e,t=null){let i=this.j.e.fire("beforeToolbarBuild",e);return i&&(e=i),super.build(e,t),this}destruct(){this.isDestructed||(this.j.e.off(this.__listenEvents,this.update).off("afterSetMode focus",this.__immediateUpdate),super.destruct())}constructor(e){super(e),(0,n._)(this,"__listenEvents","updatePlugins updateToolbar changeStack mousedown mouseup keydown change readonly afterResize selectionchange changeSelection focus afterSetMode touchstart focus blur")}}(0,o._)([(0,u.watch)(":afterInit"),s.autobind],f.prototype,"__immediateUpdate",null),(0,o._)([(0,r.debounce)(e=>e.j.defaultTimeout,!0)],f.prototype,"update",null),(0,o._)([(0,l.hook)("ready")],f.prototype,"__initEvents",null),f=(0,o._)([a.component],f)},6209:function(e,t,i){"use strict";i.d(t,{ToolbarEditorCollection:function(){return c}});var n=i(25045),o=i(62445),r=i(81937),s=i(84839),a=i(27795),l=i(65946),u=i(42573);class c extends u.ToolbarCollection{className(){return"ToolbarEditorCollection"}shouldBeDisabled(e){let t=super.shouldBeDisabled(e);if(void 0!==t)return t;let i=void 0===e.control.mode?r.MODE_WYSIWYG:e.control.mode;return i!==r.MODE_SPLIT&&i!==this.j.getRealMode()}shouldBeActive(e){let t,i=super.shouldBeActive(e);if(void 0!==i)return i;let n=this.j.selection?this.j.s.current():null;if(!n)return!1;if(e.control.tags){let i=e.control.tags;if(t=n,a.Dom.up(t,e=>{if(e&&-1!==i.indexOf(e.nodeName.toLowerCase()))return!0},this.j.editor))return!0}if(e.control.css){let i=e.control.css;if(t=n,a.Dom.up(t,e=>{if(e&&!a.Dom.isText(e)&&!a.Dom.isComment(e))return this.checkActiveStatus(i,e)},this.j.editor))return!0}return!1}getTarget(e){return e.target||this.j.s.current()||null}prependInvisibleInput(e){let t=this.j.create.element("input",{name:"jodit-toolbar-focus-helper_"+this.j.id,tabIndex:-1,disabled:!0,style:"width: 0; height:0; position: absolute; visibility: hidden;"});a.Dom.appendChildFirst(e,t)}showInline(e){this.jodit.e.fire("showInlineToolbar",e)}hide(){this.jodit.e.fire("hidePopup"),super.hide(),this.jodit.e.fire("toggleToolbar")}show(){super.show(),this.jodit.e.fire("toggleToolbar")}constructor(e){super(e),(0,n._)(this,"checkActiveStatus",(e,t)=>{let i=0,n=0;return Object.keys(e).forEach(o=>{let r=e[o];(0,l.isFunction)(r)?r(this.j,(0,l.css)(t,o).toString())&&(i+=1):-1!==r.indexOf((0,l.css)(t,o).toString())&&(i+=1),n+=1}),n===i}),this.prependInvisibleInput(this.container)}}c=(0,o._)([s.component],c)},4274:function(e,t,i){"use strict";i.d(t,{makeButton:function(){return a},makeCollection:function(){return s},makeSelect:function(){return l}});var n=i(91672),o=i(91565),r=i(24497);function s(e,t){let i=(0,n.getComponentClass)("ToolbarCollection"),o=(0,n.getComponentClass)("ToolbarEditorCollection"),s=(0,r.isJoditObject)(e)?new o(e):new i(e);return e.o.textIcons&&s.container.classList.add("jodit_text_icons"),t&&(s.parentElement=t),e.o.toolbarButtonSize&&(s.buttonSize=e.o.toolbarButtonSize),s}function a(e,t,i=null){if((0,o.isFunction)(t.getContent))return new((0,n.getComponentClass)("ToolbarContent"))(e,t,i);let r=new((0,n.getComponentClass)("ToolbarButton"))(e,t,i);return r.state.tabIndex=e.o.allowTabNavigation?0:-1,r}function l(e,t,i=null){let o=new((0,n.getComponentClass)("ToolbarSelect"))(e,t,i);return o.state.tabIndex=e.o.allowTabNavigation?0:-1,o}},40013:function(e,t,i){"use strict";var n=i(17312),o=i(24497),r=i(7909),s=i(5266),a=i(7042);s.Config.prototype.enableDragAndDropFileToEditor=!0,s.Config.prototype.uploader={url:"",insertImageAsBase64URI:!1,showTabInFileSelector:!0,imagesExtensions:["jpg","jpeg","png","gif","webp","bmp","svg","tiff","avif"],headers:null,data:null,filesVariableName:e=>`files[${e}]`,withCredentials:!1,pathVariableName:"path",format:"json",method:"POST",prepareData:e=>e,isSuccess:e=>e.success,getMessage:e=>void 0!==e.data.messages&&(0,n.isArray)(e.data.messages)?e.data.messages.join(" "):"",processFileName:(e,t,i)=>[e,t,i],process:e=>e.data,error(e){this.j.message.error(e.message,4e3)},getDisplayName:(e,t)=>e+t,defaultHandlerSuccess(e){let t=this.j||this;if(!(0,o.isJoditObject)(t))return;let{baseurl:i}=e;(0,a.getItems)(e).forEach(({file:e,isImage:n})=>{let[o,s]=n?["img","src"]:["a","href"],a=t.createInside.element(o);(0,r.attr)(a,s,i+e),"a"===o&&(a.textContent=t.o.uploader.getDisplayName.call(this,i,e)),"img"===o?t.s.insertImage(a,null,t.o.imageDefaultWidth):t.s.insertNode(a)})},defaultHandlerError(e){this.j.message.error(e.message)},promptOnExists:!0,promptOnExistsSuggestName:e=>e,contentType(e){return(void 0===this.ow.FormData||"string"==typeof e)&&"application/x-www-form-urlencoded; charset=UTF-8"}}},89446:function(e,t,i){"use strict";i.d(t,{buildData:function(){return o}});var n=i(65946);function o(e,t){if((0,n.isFunction)(e.o.buildData))return e.o.buildData.call(e,t);let i=e.ow.FormData;if(void 0!==i){if(t instanceof i||(0,n.isString)(t))return t;let e=new i;return Object.keys(t).forEach(i=>{e.append(i,t[i])}),e}return t}},23112:function(e,t,i){"use strict";function n(e){let[t,...i]=e.split(","),n=i.join(","),o=t.split(":")[1]?.split(";")[0]??"",r=/;base64/i.test(t)?atob(n):decodeURIComponent(n),s=new Uint8Array(new ArrayBuffer(r.length));for(let e=0;e<r.length;e+=1)s[e]=r.charCodeAt(e);return new Blob([s.buffer],{type:o})}i.d(t,{dataURItoBlob:function(){return n}})},11981:function(e,t,i){"use strict";i.d(t,{ajaxInstances:function(){return r.ajaxInstances},hasFiles:function(){return a},hasItems:function(){return l},normalizeUploaderData:function(){return n.normalizeUploaderData},processOldBrowserDrag:function(){return o.processOldBrowserDrag},send:function(){return r.send},sendFiles:function(){return s.sendFiles}}),i(89446);var n=i(7042),o=i(95436),r=i(77911),s=i(46533);function a(e){return!!(e&&e.files&&e.files.length>0)}function l(e){return!!(e&&e.items&&e.items.length>0)}},7042:function(e,t,i){"use strict";i.d(t,{getItems:function(){return r},normalizeUploaderData:function(){return s}});var n=i(17312),o=i(85932);function r(e){let{files:t,isImages:i,fileNames:o,items:r}=e;return(0,n.isArray)(t)?t.map((e,t)=>{let n=o?.[t];return{file:e,isImage:!!i?.[t],...void 0!==n?{name:n}:{}}}):r??[]}function s(e){if(!e||"object"!=typeof e)return e;let{files:t,items:i}=e;if(!i||(0,n.isArray)(t)&&(t.length||!i.length))return{...e,items:r(e)};let s=i.map(({name:e})=>e);return{...e,files:i.map(({file:e})=>e),isImages:i.map(({isImage:e})=>e),...s.every(o.isString)?{fileNames:s}:{},items:i}}},95436:function(e,t,i){"use strict";i.d(t,{processOldBrowserDrag:function(){return u}});var n=i(81937),o=i(27795),r=i(28077),s=i(65946),a=i(23112),l=i(46533);function u(e,t,i,u,c){if(t&&(!t.types.length||t.types[0]!==n.TEXT_PLAIN)){let t=e.j.c.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});o.Dom.append((0,r.getContainer)(e.j,e.constructor),t);let n=(0,s.isJoditObject)(e.j)?e.j.s.save():null;t.focus(),e.j.async.setTimeout(()=>{let r=t.firstChild;if(o.Dom.safeRemove(t),r&&r.hasAttribute("src")){let t=(0,s.attr)(r,"src")||"";n&&(0,s.isJoditObject)(e.j)&&e.j.s.restore(),(0,l.sendFiles)(e,[(0,a.dataURItoBlob)(t)],i,u).finally(c)}},e.j.defaultTimeout)}}},46533:function(e,t,i){"use strict";i.d(t,{sendFiles:function(){return async function e(t,i,c,d,h,p){if(!i)throw(0,o.error)("Need files");let{o:m}=t,f=(0,o.toArray)(i);if(!f.length)throw(0,o.error)("Need files");let g=p?.data;if(!p&&(0,o.isFunction)(m.beforeUpload)){let e;try{e=await m.beforeUpload.call(t,f)}catch(e){throw(d||m.defaultHandlerError).call(t,e),e}if(!1===e){let e=(0,o.error)("Upload canceled");throw(d||m.defaultHandlerError).call(t,e),e}if((0,o.isArray)(e)?f=e:(0,o.isPlainObject)(e)&&(0,o.isArray)(e.files)&&(f=e.files,g=e.data),!f.length)return[]}let _=[];if(m.insertImageAsBase64URI&&function(e,t,i,n,r,s){let l,u,c=[];for(u=0;u<e.length;u+=1)if((l=e[u])&&l.type){let d=l.type.match(/\/([a-z0-9]+)/i),h=d[1]?d[1].toLowerCase():"";if(!t.includes(h))continue;let p=new FileReader,{name:m}=l,f=n.j.async.promise((e,t)=>{p.onerror=t,p.onloadend=()=>{let t=(0,a.normalizeUploaderData)({baseurl:"",items:[{file:p.result,isImage:!0,name:m}]});((0,o.isFunction)(r)?r:s).call(n,t),e(t)},p.readAsDataURL(l)});c.push(f),i.push(f),e[u]=null}c.length&&Promise.all(c).then(()=>{n.j.events&&n.j.e.fire("filesWereUploaded")}).catch(()=>{})}(f,m.imagesExtensions,_,t,c,m.defaultHandlerSuccess),(f=f.filter(e=>e)).length){let i,p=new FormData;p.append(m.pathVariableName,t.path),p.append("source",t.source);for(let e=0;e<f.length;e+=1)if(i=f[e]){let n=/\.\w+$/.test(i.name),o=i.type.match(/\/([a-z0-9]+)/i),r=o&&o[1]?o[1].toLowerCase():"",s=f[e].name||Math.random().toString().replace(".","");if(!n&&r){let e=r;["jpeg","jpg"].includes(e)&&(e="jpeg|jpg"),RegExp(".("+e+")$","i").test(s)||(s+="."+r)}let[a,l,u]=m.processFileName.call(t,m.filesVariableName(e),f[e],s);p.append(a,l,u)}h&&h(p),m.data&&(0,o.isPlainObject)(m.data)&&Object.keys(m.data).forEach(e=>{p.append(e,m.data[e])}),g&&Object.keys(g).forEach(e=>{p.append(e,g[e])}),m.prepareData.call(t,p),_.push((0,l.send)(t,p).then(i=>{if(m.isSuccess.call(t,i))return((0,o.isFunction)(c)?c:m.defaultHandlerSuccess).call(t,(0,a.normalizeUploaderData)(m.process.call(t,i))),i;let l=new u.UploadError(m.getMessage.call(t,i),i,f,i=>e(t,i?.files??f,c,d,h,{data:{...g,...i?.data}}));return l.code===n.ERROR_CODE_CONFLICT&&m.promptOnExists?function(e,t){let{files:i}=t;if(i.length>1)return i.reduce((e,i)=>e.then(()=>t.retry({files:[i]})),Promise.resolve());let[n]=i,{j:o,o:a}=e;return new Promise(i=>{let l=!1,u=s.Prompt.call(r.Dlgs.prototype.dlg.call(o,{closeOnClickOverlay:!0}),o.i18n(t.message),o.i18n("Rename"),e=>{if(!(e=e.trim()))return!1;l=!0,i(t.retry({files:[new File([n],e,{type:n.type})]}))},o.i18n("Enter new name"),a.promptOnExistsSuggestName.call(e,n.name));u.e.on(u,"afterClose",()=>{l||i(void 0)})})}(t,l):(((0,o.isFunction)(d)?d:m.defaultHandlerError).call(t,l),i)}).then(()=>{t.j.events&&t.j.e.fire("filesWereUploaded")}))}return Promise.all(_)}}});var n=i(81937),o=i(65946),r=i(80512),s=i(74103),a=i(7042),l=i(77911),u=i(55083)},77911:function(e,t,i){"use strict";i.d(t,{send:function(){return a}});var n=i(65946),o=i(73714),r=i(89446);let s=new WeakMap;function a(e,t){let i=(0,r.buildData)(e,t),a=t=>{e.j.progressbar.show().progress(t),t>=100&&e.j.progressbar.hide()},l=(t,i)=>{let r=new o.Ajax({xhr(){let t=new XMLHttpRequest;return void 0!==e.j.ow.FormData&&t.upload?(i(10),t.upload.addEventListener("progress",e=>{if(e.lengthComputable){let t=e.loaded/e.total;i(t*=100)}},!1)):i(100),t},method:e.o.method||"POST",data:t,url:(0,n.isFunction)(e.o.url)?e.o.url(t):e.o.url,headers:e.o.headers,queryBuild:e.o.queryBuild,contentType:e.o.contentType.call(e,t),withCredentials:e.o.withCredentials||!1}),a=s.get(e);return a||(a=new Set,s.set(e,a)),a.add(r),e.j.e.one("beforeDestruct",r.destruct),r.send().then(e=>e.json()).catch(e=>({success:!1,data:{messages:[e]}})).finally(()=>{r.destruct(),a?.delete(r)})};return((0,n.isFunction)(e.o.customUploadFunction)&&(l=e.o.customUploadFunction),(0,n.isPromise)(i))?i.then(e=>l(e,a)).catch(t=>{e.o.error.call(e,t)}):l(i,a)}i.d(t,["ajaxInstances",0,s])},55083:function(e,t,i){"use strict";i.d(t,{UploadError:function(){return r}});var n=i(25045),o=i(33201);class r extends o.AnswerError{constructor(e,t,i,o){super(e,t,t.data?.code),(0,n._)(this,"files",void 0),(0,n._)(this,"retry",void 0),this.files=i,this.retry=o,Object.setPrototypeOf(this,r.prototype)}}},94925:function(e,t,i){"use strict";i.d(t,{Uploader:function(){return d}});var n=i(25045),o=i(16964),r=i(81937),s=i(23211),a=i(65946),l=i(33201),u=i(5266),c=i(11981);i(40013);class d extends o.ViewComponent{get j(){return this.jodit}className(){return"Uploader"}get o(){return this.options}setPath(e){return this.path=e,this}setSource(e){return this.source=e,this}bind(e,t,i){let n=()=>{e.classList.remove("jodit_drag_hover")},o=this,s=e=>{let s,a,l,u=e.clipboardData,d=e=>{a&&(e.append("extension",l),e.append("mimetype",a.type))};if(!r.IS_IE&&(0,c.hasFiles)(u))return(0,c.sendFiles)(o,u.files,t,i).finally(n),!1;if(r.IS_IE&&!r.IS_ES_NEXT)return(0,c.processOldBrowserDrag)(o,u,t,i,n);if((0,c.hasItems)(u)){let{items:r}=u;for(s=0;s<r.length;s+=1)if("file"===r[s].kind&&"image/png"===r[s].type){if(a=r[s].getAsFile()){let e=a.type.match(/\/([a-z0-9]+)/i);l=e[1]?e[1].toLowerCase():"",(0,c.sendFiles)(o,[a],t,i,d).finally(n)}e.preventDefault();break}}};o.j&&o.j.editor!==e?o.j.e.on(e,"paste",s):o.j.e.on("beforePaste",s),this.attachEvents(e,t,i,n)}attachEvents(e,t,i,n){let o=this;o.j.e.on(e,"dragend dragover dragenter dragleave drop",e=>{e.preventDefault()}).on(e,"dragover",t=>{((0,c.hasFiles)(t.dataTransfer)||(0,c.hasItems)(t.dataTransfer))&&(e.classList.add("jodit_drag_hover"),t.preventDefault())}).on(e,"dragend dragleave",t=>{e.classList.remove("jodit_drag_hover"),(0,c.hasFiles)(t.dataTransfer)&&t.preventDefault()}).on(e,"drop",r=>{e.classList.remove("jodit_drag_hover"),(0,c.hasFiles)(r.dataTransfer)&&(r.preventDefault(),r.stopImmediatePropagation(),(0,c.sendFiles)(o,r.dataTransfer.files,t,i).finally(n))});let r=s.Dom.first(e,e=>s.Dom.isTag(e,"input")&&(0,a.attr)(e,"type")?.toLowerCase()==="file");r&&o.j.e.on(r,"change",()=>{(0,c.sendFiles)(o,r.files,t,i).then(()=>{r.value="",/safari/i.test(navigator.userAgent)||(r.type="",r.type="file")}).finally(n)})}uploadRemoteImage(e,t,i){let n=this,{o}=n,r=(0,a.isFunction)(i)?i:o.defaultHandlerError;(0,c.send)(n,{action:"fileUploadRemote",url:e}).then(e=>{o.isSuccess.call(n,e)?((0,a.isFunction)(t)?t:o.defaultHandlerSuccess).call(n,(0,c.normalizeUploaderData)(o.process.call(n,e))):r.call(n,(0,l.answer)(o.getMessage.call(n,e),e,e.data?.code))}).catch(e=>r.call(n,e))}upload(e){return this.async.promise((t,i)=>{let n=!1,o=e=>t=>{n=!0,e(t)};(0,c.sendFiles)(this,e,o(t),o(i)).then(()=>{n||t({baseurl:"",items:[],files:[],isImages:[]})},o(i))})}destruct(){this.setStatus(o.STATUSES.beforeDestruct);let e=c.ajaxInstances.get(this);e&&(e.forEach(e=>{try{e.destruct()}catch{}}),e.clear()),super.destruct()}constructor(e,t){super(e),(0,n._)(this,"path",""),(0,n._)(this,"source","default"),(0,n._)(this,"options",void 0),this.options=(0,a.ConfigProto)(t||{},(0,a.ConfigProto)(u.Config.defaultOptions.uploader,(0,a.isJoditObject)(e)?e.o.uploader:{}))}}},72348:function(e,t,i){"use strict";var n=i(81937),o=i(27795),r=i(65946),s=i(4099),a=i(54522),l=i.n(a);s.Icon.set("palette",l()),i.d(t,["ColorPickerWidget",0,(e,t,i)=>{let a="jodit-color-picker",l=(0,r.normalizeColor)(i),u=e.c.div(a),c=e.o.textIcons?`<span>${e.i18n("palette")}</span>`:s.Icon.get("palette"),d=e=>{let t=[];return(0,r.isPlainObject)(e)?Object.keys(e).forEach(i=>{t.push(`<div class="${a}__group ${a}__group-${i}">`),t.push(d(e[i])),t.push("</div>")}):(0,r.isArray)(e)&&e.forEach(e=>{let i=l===e;t.push(`<button type="button" class='${a}__color-item ${i?a+"__color-item_active_true":""}' title="${e}" aria-pressed="${i}" tabindex="-1" style="background-color:${e}" data-color="${e}"></button>`)}),t.join("")},h=(0,r.isArray)(e.o.colors)?`<div class="${a}__group">${d(e.o.colors)}</div>`:d(e.o.colors);o.Dom.append(u,e.c.fromHTML(`<div class="${a}__groups">${h}</div>`));let p=(0,r.toArray)(u.querySelectorAll(`.${a}__color-item`)),m=p.find(e=>"true"===(0,r.attr)(e,"aria-pressed"))??p[0];m&&(0,r.attr)(m,"tabindex",0),o.Dom.append(u,e.c.fromHTML(`<div data-ref="extra" class="${a}__extra"></div>`));let{extra:f}=(0,r.refs)(u);o.Dom.append(f,e.c.fromHTML(`<div class="${a}__hex"><input data-ref="hexInput" type="text" spellcheck="false" aria-label="HEX" placeholder="#FF0000" value="${l||""}"/></div>`));let{hexInput:g}=(0,r.refs)(u),_=null,v=()=>{let e=g.value.trim();if(e===_)return;let i=/^#?[0-9a-f]{3}(?:[0-9a-f]{3})?$/i.test(e),n=/^rgba?\([\d\s.,%]+\)$/i.test(e);if(!i&&!n)return;let o=(0,r.normalizeColor)(i&&!e.startsWith("#")?"#"+e:e);o&&(0,r.isFunction)(t)&&(_=e,t(o))};e.e.on(g,"keydown",e=>{e.stopPropagation(),"Enter"===e.key&&(e.preventDefault(),v())}).on(g,"change",e=>{e.stopPropagation(),v()}),o.Dom.append(f,e.c.fromHTML(`<button type="button" class="${a}__remove" data-color="" title="${e.i18n("Remove")}">${e.o.textIcons?e.i18n("Remove"):s.Icon.get("eraser")}</button>`)),e.o.showBrowserColorPicker&&(0,r.hasBrowserColorPicker)()&&(o.Dom.append(f,e.c.fromHTML(`<div class="${a}__native">${c}<input type="color" value="#ffffff"/></div>`)),e.e.on(u,"change",e=>{e.stopPropagation();let i=e.target;if(!i||!i.tagName||!o.Dom.isTag(i,"input")||"color"!==i.type)return;let n=i.value||"";(0,r.isFunction)(t)&&t(n),e.preventDefault()}));let b=e=>{let t=o.Dom.closest(e,e=>o.Dom.isHTMLElement(e)&&(e.classList.contains(a+"__color-item")||e.classList.contains(a+"__remove")),u);return t?(0,r.attr)(t,"-color")||"":void 0},y=e=>{t&&(0,r.isFunction)(t)&&t(e)},w=!1;return e.e.on(u,"mousedown touchend",e=>{if(o.Dom.isTag(e.target,"input"))return void e.stopPropagation();e.stopPropagation(),e.preventDefault();let t=b(e.target);void 0!==t&&(w="mousedown"===e.type,y(t))}),e.e.on(u,"click",e=>{let t=b(e.target);void 0===t||w||y(t),w=!1}).on(u,"keydown",e=>{w=!1;let t=e.target;p.includes(t)&&[n.KEY_LEFT,n.KEY_RIGHT,n.KEY_UP,n.KEY_DOWN].includes(e.key)&&(e.preventDefault(),e.stopPropagation(),((e,t)=>{let i=p.indexOf(e);if(t===n.KEY_LEFT||t===n.KEY_RIGHT){let o=t===n.KEY_LEFT?-1:1;return p[i+("rtl"===(0,r.css)(e,"direction")?-o:o)]}let o=t===n.KEY_DOWN,s=p.filter(t=>o?t.offsetTop>e.offsetTop:t.offsetTop<e.offsetTop);if(!s.length)return;let a=(o?Math.min:Math.max)(...s.map(e=>e.offsetTop)),l=t=>Math.abs(t.offsetLeft-e.offsetLeft);return s.filter(e=>e.offsetTop===a).reduce((e,t)=>l(t)<l(e)?t:e)})(t,e.key)?.focus())}).on(u,"focusin",e=>{p.includes(e.target)&&p.forEach(t=>(0,r.attr)(t,"tabindex",t===e.target?0:-1))}),e.e.fire("afterGenerateColorPicker",u,f,t,l),u}])},18762:function(e,t,i){"use strict";var n=i(23211),o=i(65946),r=i(4099),s=i(89636);let a=(e,t,{label:i,accept:n})=>{let o=e.c.fromHTML(`<div class="jodit-drag-and-drop__file-box"><strong>${e.i18n(i)}</strong><span><br>${e.i18n("or click")}</span><input type="file" accept="${n}" tabindex="-1" dir="auto" multiple=""/></div>`);return e.uploader.bind(o,i=>{t.call(e,i),e.e.fire("closeAllPopups")},t=>{e.message.error(t.message),e.e.fire("closeAllPopups")}),{icon:"upload",name:"Upload",content:o}};function l(e,t,i){let r=n.Dom.first(e,e=>n.Dom.isTag(e,"input")&&(0,o.attr)(e,"name")===t);return r?(i&&(r.value=i),r.value):""}i.d(t,["FileSelectorWidget",0,(e,t,i,u,c=!0)=>{let d,h=[],p=e.o.uploader;if(t.upload&&!1!==p.showTabInFileSelector&&(p.url||p.insertImageAsBase64URI||p.customUploadFunction)){let{upload:i}=t;h.push(a(e,t=>{let n=(0,o.isFunction)(i)?i:p.defaultHandlerSuccess;(0,o.isFunction)(n)&&n.call(e,t)},c?{label:"Drop image",accept:"image/*"}:{label:"Drop file",accept:"*"}))}if(t.filebrowser&&(e.o.filebrowser.ajax.url||e.o.filebrowser.items.url)&&h.push({icon:"folder",name:"Browse",content(){u&&u(),t.filebrowser&&e.filebrowser.open(t.filebrowser,c)}}),t.url){let s=new r.UIButton(e,{type:"submit",variant:"primary",text:"Insert"}),a=new r.UIForm(e,[new r.UIInput(e,{required:!0,label:"URL",name:"url",type:"text",placeholder:"https://"}),new r.UIInput(e,{name:"text",label:"Alternative text"}),new r.UIBlock(e,[s])]);i&&!n.Dom.isText(i)&&!n.Dom.isComment(i)&&(n.Dom.isTag(i,"img")||(0,o.$$)("img",i).length)&&(d="IMG"===i.tagName?i:(0,o.$$)("img",i)[0],l(a.container,"url",(0,o.attr)(d,"src")),l(a.container,"text",(0,o.attr)(d,"alt")),s.state.text="Update"),i&&n.Dom.isTag(i,"a")&&(l(a.container,"url",(0,o.attr)(i,"href")),l(a.container,"text",(0,o.attr)(i,"title")),s.state.text="Update"),a.onSubmit(i=>{(0,o.isFunction)(t.url)&&t.url.call(e,i.url,i.text)}),h.push({icon:"link",name:"URL",content:a.container})}let m=(0,s.TabsWidget)(e,h);return m.classList.add("jodit-file-selector"),m},"UploadTab",0,a])},15753:function(e,t,i){"use strict";i.d(t,{ColorPickerWidget:function(){return n.ColorPickerWidget},FileSelectorWidget:function(){return o.FileSelectorWidget},TabsWidget:function(){return r.TabsWidget},UploadTab:function(){return o.UploadTab}});var n=i(72348),o=i(18762),r=i(89636)},89636:function(e,t,i){"use strict";var n=i(16964),o=i(23211),r=i(91565),s=i(7909),a=i(4099),l=i(29577);i.d(t,["TabsWidget",0,(e,t,i)=>{let u=e.c.div("jodit-tabs"),c=e.c.div("jodit-tabs__wrapper"),d=e.c.div("jodit-tabs__buttons");(0,s.attr)(d,{role:"tablist","aria-orientation":"horizontal"});let h={},p=[],m="";o.Dom.append(u,d),o.Dom.append(u,c);let f=e=>{h[e]&&(p.forEach(e=>{e.state.activated=!1}),Object.values(h).forEach(({tab:e})=>e.classList.remove("jodit-tab_active")),h[e].button.state.activated=!0,h[e].tab.classList.add("jodit-tab_active"))};if(t.forEach(({icon:u,name:g,content:_})=>{let v=e.c.div("jodit-tab");(0,s.attr)(v,{role:"tabpanel"});let b=(0,a.Button)(e,u||g,g);b.state.role="tab",e.e.on(b.container,"pointerdown",e=>e.preventDefault()),m||(m=g),o.Dom.append(d,b.container),p.push(b),b.container.classList.add("jodit-tabs__button","jodit-tabs__button_columns_"+t.length),(0,r.isFunction)(_)?v.classList.add("jodit-tab_empty"):o.Dom.append(v,n.Component.isInstanceOf(_,a.UIElement)?_.container:_),o.Dom.append(c,v),b.onAction(()=>(f(g),(0,r.isFunction)(_)&&!o.Dom.isElement(_)&&_.call(e),i&&(i.activeTab=g),(0,l.focusFormField)(v),!1)),h[g]={button:b,tab:v}}),f(i&&i.activeTab&&h[i.activeTab]?i.activeTab:m),i){let e=i.activeTab;Object.defineProperty(i,"activeTab",{configurable:!0,enumerable:!1,get:()=>e,set(t){e=t,f(t)}})}return u}])},94358:function(e,t,i){"use strict";var n=i(81937),o=i(28077),r=i(65946),s=i(29434),a=i(5266),l=i(17995),u=i.n(l);a.Config.prototype.controls.about={exec(e){let t=e.dlg({closeOnClickOverlay:!0}),i=e.i18n.bind(e);t.setMod("theme",e.o.theme).setHeader(i("About Jodit")).setContent(`<div class="jodit-about">
117
117
  <div>${i("Jodit Editor")} v.${e.getVersion()}</div>
118
118
  <div>${i("License: %s",!(0,r.isLicense)(e.o.license)?e.o.license||"MIT":(0,r.normalizeLicense)(e.o.license))}</div>
119
119
  <div>
@@ -133,7 +133,7 @@
133
133
  <div class="&__spinner"></div>
134
134
  </div>
135
135
  </div>
136
- </div>`}setPrompt(e){if(e){let{jodit:t}=this,i=t.o.aiAssistant[e],{aiCommonPrefixPrompt:n,aiCommonSuffixPrompt:o}=t.o.aiAssistant;this.promptInput.value=[n,(0,l.isString)(i)?i:"",o].filter(Boolean).join(" "),this.__toggleInsertButton(!0),this.promptInput.value&&(this.__formAiAssistant.submit(),this.__toggleSubmitButton(!0))}this.promptInput.focus()}onAiAssistentResponse(e){this.setMod("loading",!1),a.Dom.detach(this.__results),this.__aiResult=e,a.Dom.append(this.__results,this.jodit.c.fromHTML(e)),this.__toggleSubmitButton(!1),this.__toggleInsertButton(!1)}onAiAssistentError(e){this.__aiResult="",this.setMod("loading",!1),this.__error.textContent=e,a.Dom.detach(this.__results),this.__toggleSubmitButton(!1);let t=this.getFullElName("","hide","true");this.__results.classList.add(t),this.__toggleInsertButton(!0)}onChangePromptValue(){this.__toggleSubmitButton(!this.promptInput.value)}__toggleSubmitButton(e){this.__submitButton.state.disabled=e,this.__tryAgainButton.state.disabled=e}__toggleInsertButton(e){this.__insertButton.state.disabled=e,this.__insertAfterButton.state.disabled=e}constructor(e,{onInsert:t,onInsertAfter:i}){super(e),(0,n._)(this,"__body",void 0),(0,n._)(this,"__buttons",void 0),(0,n._)(this,"__results",void 0),(0,n._)(this,"__spinner",void 0),(0,n._)(this,"__error",void 0),(0,n._)(this,"promptInput",void 0),(0,n._)(this,"__insertAfterButton",void 0),(0,n._)(this,"__submitButton",void 0),(0,n._)(this,"__tryAgainButton",void 0),(0,n._)(this,"__insertButton",void 0),(0,n._)(this,"__formAiAssistant",void 0),(0,n._)(this,"__aiResult",""),this.__error=this.getElm("error"),this.__body=this.getElm("body"),this.__buttons=this.getElm("buttons"),this.__results=this.getElm("results"),this.__spinner=this.getElm("spinner"),this.__insertButton=(0,u.Button)(e,"","Insert","primary").onAction(()=>t(this.__aiResult)),this.__insertAfterButton=(0,u.Button)(e,"","Insert After","initial").onAction(()=>i(this.__aiResult));let o=()=>{this.__formAiAssistant.validate()&&(this.__formAiAssistant.submit(),this.__toggleInsertButton(!0),this.__toggleSubmitButton(!0))};this.__submitButton=(0,u.Button)(e,{icon:{name:"ai-assistant"},name:"ai-assistant",tooltip:"Submit"}).onAction(o),this.__tryAgainButton=(0,u.Button)(e,{icon:{name:"update"},name:"update",tooltip:"Try Again",variant:"initial"}).onAction(o),this.promptInput=new u.UITextArea(e,{name:"prompt",required:!0,label:"Prompt",placeholder:"Ask AI to improve generated text",className:this.getFullElName("prompt-row-input")});let r=new u.UIBlock(e,[this.__insertButton,this.__insertAfterButton,this.__tryAgainButton],{className:this.getFullElName("prompt-row")});this.__formAiAssistant=new u.UIForm(e,[new u.UIBlock(e,[this.promptInput,this.__submitButton],{className:this.getFullElName("prompt-row")})]).onSubmit(t=>{this.__error.textContent="",this.setMod("loading",!0),e.e.fire("invokeAiAssistant",t.prompt);let i=this.getFullElName("","hide","true");this.__results.classList.remove(i),this.__buttons.classList.remove(i),a.Dom.detach(this.__results),a.Dom.append(this.__results,this.__spinner),this.__insertButton.focus()}),a.Dom.append(this.__buttons,r.container),a.Dom.append(this.__body,this.__formAiAssistant.container),this.onChangePromptValue()}}(0,o._)([(0,s.watch)(":ai-assistant-response")],d.prototype,"onAiAssistentResponse",null),(0,o._)([(0,s.watch)(":ai-assistant-error")],d.prototype,"onAiAssistentError",null),(0,o._)([(0,s.watch)("promptInput:change")],d.prototype,"onChangePromptValue",null),d=(0,o._)([r.component],d)},90010:function(e,t,i){"use strict";var n=i(25045),o=i(62445),r=i(81937),s=i(84839),a=i(23211),l=i(28077),u=i(65946),c=i(91206),d=i(59400),h=i(5658),p=i(29434);i(95085);let m="jodit-wysiwyg_anchors",f=' contenteditable="false"';class g extends c.Plugin{afterInit(e){var t;let i,n,o=e.ed===e.od;o&&e.editor.classList.add(m),(0,l.getContainer)(e,"anchor","style",!0).textContent=(t=o?"."+m:"",i=["id","name"].map(e=>`.jodit-wysiwyg${t} a[${e}]:not([href]):empty::before`).join(","),n=`url("data:image/svg+xml,${encodeURIComponent(p.Icon.get("anchor"))}") center/contain no-repeat`,`${i}{display:inline-block;width:.75em;height:1em;margin:0 .1em;vertical-align:-.15em;background-color:var(--jd-color-icon,#4c4c4c);-webkit-mask:${n};mask:${n};cursor:pointer;content:''}`),e.e.on("generateAnchorForm.anchor",this.__generateForm).on("clickA touchstartA",this.__onClickA,{top:!0})}__onClickA(e,t){let{j:i}=this;if(!i.o.readonly&&(0,u.isAnchor)(e))return i.e.stopPropagation((0,u.camelCase)((t?.type??"click")+"_a")),i.e.fire("showPopup",e,()=>(0,u.position)(e,i),"anchor",!0),!1}onChange(){let{j:e}=this;e.isInDestruct||e.getMode()===r.MODE_SOURCE||(0,u.getAnchors)(e.editor).forEach(_)}onAfterGetValueFromEditor(e){e.value=function(e){if(!e.includes(f))return e;let t="",i=0,n=0;for(;;){let o=e.indexOf("<",n);if(-1===o)break;let r=e.indexOf(">",o);if(-1===r)break;if(e.startsWith("<a",o)&&/\s/.test(e.charAt(o+2))&&e.startsWith("</a>",r+1)){let n=e.slice(o,r),s=n.indexOf(f);-1===s||/\shref=/.test(n)||(t+=e.slice(i,o+s),i=o+s+f.length)}n=r+1}return 0===i?e:t+e.slice(i)}(e.value)}onBeforePasteInsert(e){if(a.Dom.isElement(e)||a.Dom.isFragment(e))return void this.__renameCopies(e);if(!(0,u.isString)(e)||!/<a\s/i.test(e))return;let t=this.j.createInside.element("template");if(t.innerHTML=e,this.__renameCopies(t.content))return t.innerHTML}__generateForm(e,t){let{j:i}=this,n=(0,u.isAnchor)(e)?e:null,o=new h.UIInput(i,{name:"name",ref:"name_input",label:"Anchor",required:!0}),s=[new d.UIButton(i,{name:"insert",type:"submit",variant:"primary",text:n?"Update":"Insert"})];n&&(o.value=(0,u.getAnchorName)(n),s.unshift(new d.UIButton(i,{name:"remove",variant:"default",text:"Remove"}).onAction(()=>{i.o.readonly||(i.s.restore(),a.Dom.safeRemove(n),i.synchronizeValues()),t()})));let l=new h.UIForm(i,[new h.UIBlock(i,[o]),new h.UIBlock(i,s,{align:"full"})]);return n&&(this.__dropForm(),this.__form=l,i.e.on(l.container,"keydown",e=>{e.key===r.KEY_ESC&&(t(),i.s.restore())})),l.onSubmit(()=>{if(i.o.readonly)return t(),!1;let e=o.value.trim().replace(/^#/,""),r=e?/\s/.test(e)?"The name cannot contain spaces":this.__isTaken(e,n)?"This name is already in use":"":"Please fill out this field";return r?(o.error=r,o.focus()):(i.s.restore(),n?this.__rename(n,e):this.__insert(e),i.synchronizeValues(),t()),!1}),i.async.requestIdleCallback(()=>o.focus()),l}__dropForm(){let e=this.__form;this.__form=null,e&&!e.isInDestruct&&(this.j.e.off(e.container,"keydown"),e.destruct())}__isTaken(e,t){return(0,u.toArray)(this.j.editor.querySelectorAll("[id], a[name]")).some(i=>i!==t&&(i.id===e||(0,u.isAnchor)(i)&&(0,u.attr)(i,"name")===e))}__insert(e){let{j:t}=this,i=t.createInside.element("a",{id:e}),n=t.s.range;_(i),n.collapsed||(n.collapse(!0),t.s.selectRange(n));let o=a.Dom.closest(n.startContainer,"a",t.editor);o?(a.Dom.before(o,i),t.s.setCursorAfter(i)):t.s.insertNode(i,!0,!1)}__rename(e,t){let i=(0,u.getAnchorName)(e),n=this.__isTaken(i,e);["id","name"].forEach(i=>{e.hasAttribute(i)&&(0,u.attr)(e,i,t)}),n||(0,u.toArray)(this.j.editor.querySelectorAll("a[href]")).forEach(e=>{(0,u.attr)(e,"href")==="#"+i&&(0,u.attr)(e,"href","#"+t)})}__renameCopies(e){let t=new Set((0,u.toArray)(e.querySelectorAll("[id], a[name]")).map(e=>e.id||(0,u.attr)(e,"name"))),i=new Map;return((0,u.isAnchor)(e)?[e]:(0,u.getAnchors)(e)).forEach(e=>{let n=(0,u.getAnchorName)(e);if(!this.__isTaken(n,null))return;let o=n;for(let e=2;t.has(o)||this.__isTaken(o,null);e+=1)o=`${n}-${e}`;["id","name"].forEach(t=>{e.hasAttribute(t)&&(0,u.attr)(e,t,o)}),t.add(o),i.set(n,o)}),!!i.size&&((0,u.toArray)(e.querySelectorAll("a[href]")).forEach(e=>{let t=(0,u.attr)(e,"href")??"",n="#"===t[0]&&i.get(t.slice(1));n&&(0,u.attr)(e,"href","#"+n)}),!0)}beforeDestruct(e){this.__dropForm(),e.editor.classList.remove(m),e.e.off("generateAnchorForm.anchor",this.__generateForm).off("clickA touchstartA",this.__onClickA)}constructor(...e){super(...e),(0,n._)(this,"buttons",[{name:"anchor",group:"insert"}]),(0,n._)(this,"__form",null)}}function _(e){"false"!==(0,u.attr)(e,"contenteditable")&&(0,u.attr)(e,"contenteditable",!1)}(0,o._)([s.autobind],g.prototype,"__onClickA",null),(0,o._)([(0,s.watch)([":change",":afterInit",":afterSetMode"]),(0,s.debounce)()],g.prototype,"onChange",null),(0,o._)([(0,s.watch)(":afterGetValueFromEditor")],g.prototype,"onAfterGetValueFromEditor",null),(0,o._)([(0,s.watch)(":beforePasteInsert")],g.prototype,"onBeforePasteInsert",null),(0,o._)([s.autobind],g.prototype,"__generateForm",null),l.pluginSystem.add("anchor",g)},95085:function(e,t,i){"use strict";var n=i(5266);i(89873),n.Config.prototype.controls.anchor={popup:(e,t,i)=>e.e.fire("generateAnchorForm.anchor",null,i),tooltip:"Insert anchor"},n.Config.prototype.popup.anchor=(e,t,i)=>e.e.fire("generateAnchorForm.anchor",t,i)},28286:function(e,t,i){"use strict";var n=i(25045),o=i(81937),r=i(27795),s=i(28077),a=i(91565),l=i(91206),u=i(42259);i(33831);var c=i(89827),d=i(17523),h=i(15200);class p extends l.Plugin{afterInit(e){e.registerCommand("deleteButton",{exec:()=>this.onDelete(!1),hotkeys:e.o.delete.hotkeys.delete},{stopPropagation:!1}).registerCommand("backspaceButton",{exec:()=>this.onDelete(!0),hotkeys:e.o.delete.hotkeys.backspace},{stopPropagation:!1}).registerCommand("deleteWordButton",{exec:()=>this.onDelete(!1,"word"),hotkeys:e.o.delete.hotkeys.deleteWord}).registerCommand("backspaceWordButton",{exec:()=>this.onDelete(!0,"word"),hotkeys:e.o.delete.hotkeys.backspaceWord}).registerCommand("deleteSentenceButton",{exec:()=>this.onDelete(!1,"sentence"),hotkeys:e.o.delete.hotkeys.deleteSentence}).registerCommand("backspaceSentenceButton",{exec:()=>this.onDelete(!0,"sentence"),hotkeys:e.o.delete.hotkeys.backspaceSentence})}beforeDestruct(e){e.e.off("afterCommand.delete")}onDelete(e,t="char"){let i=this.j,n=i.selection;if(n.isFocused()||n.focus(),!n.isInsideArea)return;if((0,c.checkNotCollapsed)(i))return i.e.fire("backSpaceAfterDelete",e),!1;let s=n.range,l=i.createInside.text(o.INVISIBLE_SPACE);try{if(r.Dom.safeInsertNode(s,l),!r.Dom.isOrContains(i.editor,l))return;let c=r.Dom.closest(l,e=>r.Dom.isElement(e)&&e.hasAttribute("contenteditable")&&!r.Dom.isContentEditable(e.parentNode,i.editor),i.editor);if(c&&n.cursorInTheEdge(e,c,l)||i.e.fire("backSpaceBeforeCases",e,l))return!1;(0,u.moveNodeInsideStart)(i,l,e);let h=i.o.delete.disableCases;if(d.casesMap.some(([n,r])=>{if(!(h&&h.has(n))&&(0,a.isFunction)(r)&&r(i,l,e,t))return o.IS_PROD,!0}))return!1}catch(e){throw o.IS_PROD,e}finally{i.e.fire("backSpaceAfterDelete",e,l),this.moveCaretToTextBefore(l),this.safeRemoveEmptyNode(l)}return!1}moveCaretToTextBefore(e){let{jodit:t}=this,{range:i}=t.s;if(!e.parentNode)return;let n=t.ed.createRange();if(n.selectNode(e),!i.collapsed||!n.isPointInRange(i.startContainer,i.startOffset))return;let o=e.previousSibling;for(;r.Dom.isText(o)&&!/\S|\u00A0/.test(o.data);)o=o.previousSibling;let s=r.Dom.isText(o)?o:(0,h.findMostNestedNeighbor)(e,!1,t.editor,!0),a=r.Dom.closest(s,"a",t.editor);r.Dom.isText(s)&&r.Dom.isContentEditable(s,t.editor)&&(!a||r.Dom.isOrContains(a,e))&&r.Dom.closest(s,r.Dom.isBlock,t.editor)===r.Dom.closest(e,r.Dom.isBlock,t.editor)&&(i.setStart(s,s.nodeValue?.length??0),i.collapse(!0),t.s.selectRange(i))}safeRemoveEmptyNode(e){let{range:t}=this.j.s;r.Dom.isText(e)&&e.nodeValue!==o.INVISIBLE_SPACE&&e.nodeValue?.startsWith(o.INVISIBLE_SPACE)?e.deleteData(0,o.INVISIBLE_SPACE.length):(t.startContainer===e&&(e.previousSibling?r.Dom.isText(e.previousSibling)?t.setStart(e.previousSibling,e.previousSibling.nodeValue?.length??0):t.setStartAfter(e.previousSibling):e.nextSibling&&(r.Dom.isText(e.nextSibling)?t.setStart(e.nextSibling,0):t.setStartBefore(e.nextSibling)),t.collapse(!0),this.j.s.selectRange(t)),r.Dom.safeRemove(e))}}(0,n._)(p,"requires",["hotkeys"]),s.pluginSystem.add("backspace",p)},26106:function(e,t,i){"use strict";i.d(t,{checkJoinNeighbors:function(){return s}});var n=i(81937),o=i(23211),r=i(15200);function s(e,t,i){return function e(t,i,s,h){if(function(e,t,i){let n=o.Dom.findNotEmptySibling(t,i);if(!c(e,n))return!1;let s=(0,r.getMoveFilter)(e);if(i)for(let e=t;e&&!o.Dom.isBlock(e);){let t=e.nextSibling;if(o.Dom.isTag(e,"br")){o.Dom.safeRemove(e);break}s(e)?o.Dom.append(n,e):o.Dom.safeRemove(e),e=t}else{let t=o.Dom.findNotEmptySibling(n,!1);!t||o.Dom.isBlock(t)||o.Dom.isTag(t,"br")||o.Dom.after(n,e.createInside.element("br")),o.Dom.unwrap(n)}return e.s.setCursorBefore(t),!0}(t,i,s))return!0;let p=o.Dom.findNotEmptySibling(i,s);if(c(t,function(e,t){let i=e;for(;o.Dom.isElement(i)&&!o.Dom.isBlock(i);){let e=Array.from(i.childNodes).filter(e=>!o.Dom.isEmptyTextNode(e));i=(t?e[e.length-1]:e[0])??null}return i===e?null:i}(p,s))&&a(p,t.editor))return e(t,i,s,h);let m=i,f=m;for(;m&&!o.Dom.findNotEmptySibling(m,s)&&m.parentElement!==t.editor;)f=m=m.parentElement;if(o.Dom.isElement(f)&&o.Dom.isContentEditable(f,t.editor)){var g,_;let c,p,m,v;if(o.Dom.up(i,o.Dom.isCell,f,!0))return!1;let b=o.Dom.findNotEmptySibling(f,s);if(b&&(a(o.Dom.furthest(i,e=>o.Dom.isElement(e)&&!o.Dom.isBlock(e)&&!o.Dom.isOrContains(e,b),t.editor),t.editor)||a(b,t.editor)))return e(t,i,s,h);if(o.Dom.isTag(b,"br"))return o.Dom.safeRemove(b),t.s.setCursorBefore(i),!0;if(s&&o.Dom.isTag(b,"table"))return t.s.setCursorBefore(i),!0;if(o.Dom.isElement(b)&&!o.Dom.isContentEditable(b,t.editor))return!1;let y=(g=f,(c=o.Dom.up(i,o.Dom.isBlock,g))?o.Dom.isLeaf(c)&&c.parentElement?c.parentElement:c:g);if(!h&&b&&function(e,t,i,r,s){if(s||o.Dom.isTag(r,"table")||o.Dom.isTag(r,n.INSEPARABLE_TAGS)||!o.Dom.isContentEditable(r,e.editor))return!1;let a=o.Dom.up(t,o.Dom.isBlock,i,!0),c=l(r,!1,e.editor);if(!a||!c||!o.Dom.isContentEditable(c,e.editor)||!(o.Dom.isLeaf(a)||o.Dom.isLeaf(c))||o.Dom.isLeaf(a.parentElement)||o.Dom.isLeaf(c.parentElement)||u(a)===u(c))return!1;let d=a.parentElement;o.Dom.isLeaf(a)&&o.Dom.isLeaf(c)?o.Dom.before(c,a):o.Dom.isLeaf(a)?o.Dom.before(c,function(e){let t=e.parentElement,i=t.cloneNode(!1),n=Array.from(t.children).indexOf(e);if(n&&(i.removeAttribute("id"),o.Dom.isTag(t,"ol"))){let e=parseInt(t.getAttribute("start")||"1",10)||1;i.setAttribute("start",e+n+"")}return o.Dom.append(i,e),i}(a)):o.Dom.before(c.parentElement,a);let h=d;for(;h&&h!==e.editor&&o.Dom.isEmpty(h);){let e=h.parentElement;o.Dom.safeRemove(h),h=e}return!0}(t,i,y,b,s))return e(t,i,s,!0)||t.s.setCursorBefore(i),!0;if(b&&(function(e,t,i,s,a){if(a||!(o.Dom.isList(i)||o.Dom.isList(s)))return!1;let l=o.Dom.up(t,o.Dom.isBlock,i,!0),u=o.Dom.isList(s)?s.firstElementChild:s;if(!l||!u||o.Dom.isTag(u,n.INSEPARABLE_TAGS)||o.Dom.isTag(u,"table"))return!1;if(!o.Dom.isEmpty(u)){let t=[];for(let e=u.firstChild;e&&!o.Dom.isBlock(e);e=e.nextSibling)t.push(e);if(!t.length)return!1;let i=(0,r.getMoveFilter)(e);t.forEach(e=>i(e)?o.Dom.append(l,e):o.Dom.safeRemove(e))}let c=u;for(;c&&c!==e.editor&&o.Dom.isEmpty(c);){let e=c.parentElement;o.Dom.safeRemove(c),c=e}return!0}(t,i,y,b,s)||(_=b,p=o.Dom.isTag(_,n.LIST_TAGS),m=o.Dom.isTag(y,n.LIST_TAGS),v=(e,t)=>t?e.firstElementChild:e.lastElementChild,m?(_=t.createInside.element(t.o.enterBlock),o.Dom.before(y,_),d(t,v(y,s),_,s)):!!_&&!!p&&!m&&d(t,y,v(_,!s),s))||function(e,t,i,n){if(o.Dom.isBlock(i)||!o.Dom.isBlock(t)||o.Dom.isList(t)||t.parentNode!==i.parentNode||Array.from(t.childNodes).some(e=>o.Dom.isBlock(e)))return!1;if(n){let i=o.Dom.findNotEmptySibling(t,!1);return!i||o.Dom.isBlock(i)||o.Dom.isTag(i,"br")||o.Dom.after(t,e.createInside.element("br")),o.Dom.unwrap(t),!0}let s=(0,r.getMoveFilter)(e);for(let e=i;e&&!o.Dom.isBlock(e);){let i=e.nextSibling;if(o.Dom.isTag(e,"br")){o.Dom.safeRemove(e);break}s(e)?o.Dom.append(t,e):o.Dom.safeRemove(e),e=i}return!0}(t,y,b,s)||d(t,y,l(function(e,t){if(!o.Dom.isTag(e,"table"))return e;let i=[];return o.Dom.each(e,e=>{o.Dom.isCell(e)&&i.push(e)}),i.length?i[t?i.length-1:0]:null}(b,s),s,t.editor),s)))return t.s.setCursorBefore(i),!0}return!1}(e,t,i,!1)}function a(e,t){if(!o.Dom.isElement(e)||o.Dom.isBlock(e))return!1;let i=e=>o.Dom.isBlock(e)&&!o.Dom.isTag(e,n.NO_EMPTY_TAGS);Array.from(e.childNodes).forEach(e=>a(e,t));let r=Array.from(e.childNodes);if(!r.some(i))return!1;let s=null;for(let l of r){if(!i(l)){s||o.Dom.isEmptyTextNode(l)||(s=e.cloneNode(!1),o.Dom.before(l,s)),s&&o.Dom.append(s,l);continue}if(s=null,o.Dom.isTag(l,n.INSEPARABLE_TAGS)||!o.Dom.isContentEditable(l,t))continue;let r=e.cloneNode(!1);o.Dom.moveContent(l,r),o.Dom.append(l,r),a(r,t)}return o.Dom.unwrap(e),!0}function l(e,t,i){let r=e;for(;r;){let e=t?r.lastChild:r.firstChild,s=e&&o.Dom.isEmptyTextNode(e)?o.Dom.findNotEmptySibling(e,t):e;if(!o.Dom.isBlock(s)||o.Dom.isTag(s,n.INSEPARABLE_TAGS)||o.Dom.isTag(s,"table")||!o.Dom.isContentEditable(s,i))break;r=s}return r}function u(e){let t=e.parentElement;for(;o.Dom.isList(t)||o.Dom.isLeaf(t);)t=t.parentElement;return t}function c(e,t){return o.Dom.isElement(t)&&o.Dom.isBlock(t)&&!o.Dom.isList(t)&&!o.Dom.isTag(t,"table")&&!o.Dom.isCell(t)&&o.Dom.isContentEditable(t,e.editor)&&!Array.from(t.childNodes).some(e=>o.Dom.isBlock(e))}function d(e,t,i,n){if(t&&o.Dom.isElement(i)){o.Dom.moveContent(t,i,!n,(0,r.getMoveFilter)(e));let s=t;for(;s&&s!==e.editor&&o.Dom.isEmpty(s);){let e=s.parentElement;o.Dom.safeRemove(s),s=e}return!0}return!1}},80951:function(e,t,i){"use strict";i.d(t,{checkJoinTwoLists:function(){return s}});var n=i(23211),o=i(71125),r=i(15200);function s(e,t,i){let s=n.Dom.findSibling(t,i),a=n.Dom.findSibling(t,!i);if(!n.Dom.closest(t,n.Dom.isElement,e.editor)&&n.Dom.isList(s)&&n.Dom.isList(a)&&n.Dom.isTag(s.lastElementChild,"li")&&n.Dom.isTag(a.firstElementChild,"li")){let{setCursorBefore:l,setCursorAfter:u}=e.s,c=s.lastElementChild,d=a.firstElementChild;return(0,o.call)(i?n.Dom.prepend:n.Dom.append,d,t),n.Dom.moveContent(a,s,!i,(0,r.getMoveFilter)(e)),n.Dom.safeRemove(a),(0,o.call)(i?n.Dom.append:n.Dom.prepend,c,t),(0,o.call)(i?l:u,t),!0}return!1}},89827:function(e,t,i){"use strict";function n(e){return!e.s.isCollapsed()&&(e.execCommand("Delete"),!0)}i.d(t,{checkNotCollapsed:function(){return n}})},58881:function(e,t,i){"use strict";i.d(t,{checkRemoveChar:function(){return function e(t,i,u,c,d=!1){let h,p=u?-1:1,m=o.Dom.sibling(i,!u),f=o.Dom.sibling(i,u),g=null,_=!1;for(f||(f=a(i,u,t.editor));f&&(o.Dom.isText(f)||o.Dom.isInlineBlock(f));){for(;o.Dom.isInlineBlock(f);)f=u?f?.lastChild:f?.firstChild;if(!f||o.Dom.isBlock(f))break;if(f.nodeValue?.length){if(d&&l(function(e,t){let i=(0,r.toArray)(e),o=t?-1:1,s=t?i.length-1:0;for(;i[s]===n.INVISIBLE_SPACE;)s+=o;return i[s]}(f.nodeValue,u)))break;h=function(e,t,i,s){let a=(0,r.toArray)(e.nodeValue),l=a.length,u=t?l-1:0;if(a[u]===n.INVISIBLE_SPACE)for(;a[u]===n.INVISIBLE_SPACE;)u+=i;let c=a[u];if(a[u+i]===n.INVISIBLE_SPACE){for(u+=i;a[u]===n.INVISIBLE_SPACE;)u+=i;u+=t?1:-1}return a=t&&u<0?[]:a.slice(t?0:u+1,t?u:l),function(e,t,i){if(!e||!o.Dom.isText(e)||(!t?/ $/:/^ /).test(e.nodeValue??"")||!(0,r.trimInv)(e.nodeValue||"").length)for(let e=t?i.length-1:0;(t?e>=0:e<i.length)&&" "===i[e];e+=t?-1:1)i[e]=n.NBSP_SPACE}(s,t,a),e.nodeValue=a.join(""),c}(f,u,p,m),!f.nodeValue.length&&o.Dom.isInlineBlock(f.parentNode)&&(f.nodeValue=n.INVISIBLE_SPACE)}if(f.nodeValue?.length||(g=f),!(0,r.isVoid)(h)&&h!==n.INVISIBLE_SPACE){(function(t,i,n,s,a,u){(0,r.call)(t?o.Dom.after:o.Dom.before,i,n);let c="word"===s&&!l(a);("sentence"===s||c||"word"===s&&t)&&e(u,n,t,s,c&&t)})(u,f,i,c,h,t),_=!0;break}let s=a(f,u,t.editor);g&&(o.Dom.safeRemove(g),g=null),f=s}return g&&o.Dom.safeRemove(g),_&&(function(e){let t=e.parentElement;for(;t&&o.Dom.isInlineBlock(t)&&o.Dom.isTag(t,"a");){let i=t.parentElement;o.Dom.isEmpty(t)&&(o.Dom.after(t,e),o.Dom.safeRemove(t)),t=i}}(i),(0,s.addBRInsideEmptyBlock)(t,i),t.s.setCursorBefore(i),o.Dom.isTag(i.previousSibling,"br")&&!o.Dom.findNotEmptySibling(i,!1)&&o.Dom.after(i,t.createInside.element("br"))),_}}});var n=i(81937),o=i(27795),r=i(65946),s=i(15200);function a(e,t,i){let n=o.Dom.sibling(e,t);return!n&&e.parentNode&&e.parentNode!==i&&(n=(0,s.findMostNestedNeighbor)(e,!t,i,!0))&&o.Dom.closest(e,o.Dom.isBlock,i)!==o.Dom.closest(n,o.Dom.isBlock,i)?null:n}function l(e){return" "===e||e===n.NBSP_SPACE}},68709:function(e,t,i){"use strict";i.d(t,{checkRemoveContentNotEditable:function(){return a}});var n=i(27795),o=i(65946),r=i(42259),s=i(26106);function a(e,t,i){let a=t,u=n.Dom.findSibling(a,i);for(;!u&&a.parentElement&&a.parentElement!==e.editor&&!n.Dom.isCell(a.parentElement);)if(a=a.parentElement,u=n.Dom.findSibling(a,i),i&&n.Dom.isLeaf(a)&&!(n.Dom.isLeaf(u)&&l(e,u)))return!1;if(l(e,u)){if(n.Dom.isBlock(u)){let o=!(i&&n.Dom.isLeaf(u));n.Dom.safeRemove(u),o&&(0,s.checkJoinNeighbors)(e,t,i)}else(0,o.call)(i?n.Dom.before:n.Dom.after,u,t),n.Dom.safeRemove(u),(0,r.moveNodeInsideStart)(e,t,i);return(0,o.call)(i?e.s.setCursorBefore:e.s.setCursorAfter,t),!0}return!1}function l(e,t){return n.Dom.isElement(t)&&!n.Dom.isContentEditable(t,e.editor)}},5771:function(e,t,i){"use strict";i.d(t,{checkRemoveEmptyNeighbor:function(){return o}});var n=i(23211);function o(e,t,i){let o=n.Dom.closest(t,n.Dom.isElement,e.editor);if(!o)return!1;let r=n.Dom.findNotEmptySibling(o,i);return!!(r&&n.Dom.isEmpty(r))&&(n.Dom.safeRemove(r),e.s.setCursorBefore(t),!0)}},2409:function(e,t,i){"use strict";i.d(t,{checkRemoveEmptyParent:function(){return s}});var n=i(81937),o=i(27795),r=i(80951);function s(e,t,i){let s=!1,{setCursorBefore:a,setCursorIn:l}=e.s,u=o.Dom.closest(t,o.Dom.isElement,e.editor);if(!u||!o.Dom.isEmpty(u))return!1;do if(u&&o.Dom.isEmpty(u)&&!o.Dom.isCell(u)){o.Dom.after(u,t);let i=o.Dom.closest(u,e=>o.Dom.isElement(e)&&e!==u,e.editor);o.Dom.safeRemove(u),s=!0,u=i}else break;while(u)if(s&&(0,r.checkJoinTwoLists)(e,t,i))return!0;let c=o.Dom.findNotEmptyNeighbor(t,i,e.editor);return!c||o.Dom.isText(c)||o.Dom.isTag(c,n.INSEPARABLE_TAGS)?a(t):l(c,!i),s}},93890:function(e,t,i){"use strict";i.d(t,{checkRemoveUnbreakableElement:function(){return s}});var n=i(81937),o=i(23211),r=i(2409);function s(e,t,i){let s=o.Dom.findSibling(t,i);return!!(o.Dom.isElement(s)&&(o.Dom.isTag(s,n.INSEPARABLE_TAGS)||o.Dom.isEmpty(s)))&&(o.Dom.safeRemove(s),o.Dom.isTag(s,"br")&&!o.Dom.findNotEmptySibling(t,!1)&&o.Dom.after(t,e.createInside.element("br")),e.s.setCursorBefore(t),o.Dom.isTag(s,"br")&&(0,r.checkRemoveEmptyParent)(e,t,i),!0)}},12443:function(e,t,i){"use strict";i.d(t,{checkTableCell:function(){return o}});var n=i(23211);function o(e,t){let i=t.parentElement;return!!n.Dom.isCell(i)}},10157:function(e,t,i){"use strict";i.d(t,{checkUnwrapFirstListItem:function(){return r}});var n=i(23211),o=i(93640);function r(e,t,i){let r=n.Dom.closest(t,n.Dom.isElement,e.editor),{s}=e;if(n.Dom.isLeaf(r)&&r?.parentElement?.[i?"firstElementChild":"lastElementChild"]===r&&s.cursorInTheEdge(i,r)){let a=r.parentElement,l=e.createInside.element(e.o.enterBlock);return(0,o.call)(i?n.Dom.before:n.Dom.after,a,l),n.Dom.moveContent(r,l),n.Dom.safeRemove(r),n.Dom.isEmpty(a)&&n.Dom.safeRemove(a),(0,o.call)(i?s.setCursorBefore:s.setCursorAfter,t),!0}return!1}},88426:function(e,t,i){"use strict";i.d(t,{checkUnwrapListItem:function(){return o}});var n=i(23211);function o(e,t,i){if(!i)return!1;let o=n.Dom.closest(t,"li",e.editor),r=o?o.parentElement:null;if(!o||!n.Dom.isList(r)||!o.previousElementSibling||n.Dom.isEmpty(o)||Array.from(o.childNodes).some(e=>n.Dom.isBlock(e))||!e.s.cursorInTheEdge(!0,o))return!1;let s=e.createInside.element(e.o.enterBlock);if(n.Dom.after(r,s),o.nextElementSibling){let e=r.cloneNode(!1);for(e.removeAttribute("id");o.nextSibling;)n.Dom.append(e,o.nextSibling);if(n.Dom.isTag(r,"ol")){let t=parseInt(r.getAttribute("start")||"1",10)||1;e.setAttribute("start",t+r.children.length-1+"")}n.Dom.after(s,e)}return n.Dom.moveContent(o,s),n.Dom.safeRemove(o),e.s.setCursorBefore(t),!0}},17523:function(e,t,i){"use strict";var n=i(26106),o=i(80951),r=i(58881),s=i(68709),a=i(5771),l=i(2409),u=i(93890),c=i(12443),d=i(10157),h=i(88426);let p=[["remove-unbreakable",u.checkRemoveUnbreakableElement],["remove-not-editable",s.checkRemoveContentNotEditable],["remove-char",r.checkRemoveChar],["table-cell",c.checkTableCell],["remove-empty-parent",l.checkRemoveEmptyParent],["remove-empty-neighbor",a.checkRemoveEmptyNeighbor],["join-two-lists",o.checkJoinTwoLists],["unwrap-list-item",h.checkUnwrapListItem],["join-neighbors",n.checkJoinNeighbors],["unwrap-first-list-item",d.checkUnwrapFirstListItem]];p.map(([,e])=>e),i.d(t,["casesMap",0,p])},33831:function(e,t,i){"use strict";var n=i(81937);i(5266).Config.prototype.delete={hotkeys:{delete:n.IS_MAC?["delete"]:["delete","cmd+backspace"],deleteWord:n.IS_MAC?["ctrl+delete"]:["ctrl+delete","cmd+alt+backspace","ctrl+alt+backspace"],deleteSentence:["ctrl+shift+delete","cmd+shift+delete"],backspace:["backspace"],backspaceWord:n.IS_MAC?[]:["ctrl+backspace"],backspaceSentence:["ctrl+shift+backspace","cmd+shift+backspace"]}}},15200:function(e,t,i){"use strict";i.d(t,{addBRInsideEmptyBlock:function(){return s},findMostNestedNeighbor:function(){return o},getMoveFilter:function(){return r}});var n=i(27795);function o(e,t,i,r=!1){let s=e=>t?e.firstChild:e.lastChild,a=n.Dom.findNotEmptyNeighbor(e,!t,i);if(r&&n.Dom.isElement(a)&&!n.Dom.isInlineBlock(a))return null;if(a)do{if(!s(a))return a;a=s(a)}while(a)return null}function r(e){return t=>!0!==e.e.fire("backSpaceIsMovedIgnore",t)}function s(e,t){t.parentElement!==e.editor&&n.Dom.isBlock(t.parentElement)&&n.Dom.each(t.parentElement,n.Dom.isEmptyTextNode)&&n.Dom.after(t,e.createInside.element("br"))}},91678:function(e,t,i){"use strict";var n=i(28077),o=i(65946),r=i(29434),s=i(5266);i(40291);var a=i(52450),l=i.n(a),u=i(41111),c=i.n(u),d=i(49972),h=i.n(d),p=i(45062),m=i.n(p),f=i(18605),g=i.n(f),_=i(83389),v=i.n(_);n.pluginSystem.add("bold",function(e){let t=t=>{let i,n=s.Config.defaultOptions.controls[t],r={...n.css};Object.keys(r).forEach(e=>{i||(i={}),i[e]=(0,o.isArray)(r[e])?r[e][0]:r[e]});let a=n.tags?n.tags[0]:void 0;return e.s.commitStyle({element:a,exclude:"sub"===a?["sup"]:"sup"===a?["sub"]:[]}),e.synchronizeValues(),!1};["bold","italic","underline","strikethrough"].forEach(t=>{e.registerButton({name:t,group:"font-style"})}),["superscript","subscript"].forEach(t=>{e.registerButton({name:t,group:"script"})}),e.registerCommand("bold",{exec:t,hotkeys:["ctrl+b","cmd+b"]}).registerCommand("italic",{exec:t,hotkeys:["ctrl+i","cmd+i"]}).registerCommand("underline",{exec:t,hotkeys:["ctrl+u","cmd+u"]}).registerCommand("strikethrough",{exec:t}).registerCommand("subscript",{exec:t}).registerCommand("superscript",{exec:t})}),r.Icon.set("bold",l()).set("italic",c()).set("strikethrough",h()).set("subscript",m()).set("superscript",g()).set("underline",v())},40291:function(e,t,i){"use strict";var n=i(5266);n.Config.prototype.controls.subscript={tags:["sub"],tooltip:"Subscript"},n.Config.prototype.controls.superscript={tags:["sup"],tooltip:"Superscript"},n.Config.prototype.controls.bold={tagRegExp:/^(strong|b)$/i,tags:["strong","b"],css:{"font-weight":["bold","700"]},tooltip:"Bold"},n.Config.prototype.controls.italic={tagRegExp:/^(em|i)$/i,tags:["em","i"],css:{"font-style":"italic"},tooltip:"Italic"},n.Config.prototype.controls.underline={tagRegExp:/^(u)$/i,tags:["u"],css:{"text-decoration-line":"underline"},tooltip:"Underline"},n.Config.prototype.controls.strikethrough={tagRegExp:/^(s)$/i,tags:["s"],css:{"text-decoration-line":"line-through"},tooltip:"Strike through"}},58910:function(e,t,i){"use strict";var n=i(25045),o=i(23211),r=i(28077),s=i(71125),a=i(91206),l=i(29434),u=i(5266),c=i(93267),d=i.n(c);u.Config.prototype.controls.classSpan={command:"applyClassName",exec:s.memorizeExec,list:["enabled","disabled","activated","text-left","text-center","text-right","warning","error"],isChildActive(e,t){let i=e.s.current();if(i){let n=o.Dom.closest(i,o.Dom.isElement,e.editor)||e.editor;return!!(t.control.args&&n.classList.contains(t.control.args[0].toString()))}return!1},isActive(e,t){let i=e.s.current();if(i){let n=o.Dom.closest(i,o.Dom.isElement,e.editor)||e.editor,r=!1;return t.control.list&&Object.keys(t.control.list).forEach(e=>{n.classList.contains(e)&&(r=!0)}),!!(n&&n!==e.editor&&void 0!==t.control.list&&r)}return!1},childTemplate:(e,t,i)=>`<span class="${t}">${e.i18n(i)}</span>`,tooltip:"Insert className"};class h extends a.Plugin{afterInit(e){e.registerCommand("applyClassName",(t,i,n)=>(e.s.commitStyle({attributes:{class:n}}),!1))}beforeDestruct(){}constructor(...e){super(...e),(0,n._)(this,"buttons",[{name:"classSpan",group:"script"}])}}r.pluginSystem.add("classSpan",h),l.Icon.set("class-span",d())},11018:function(e,t,i){"use strict";var n=i(25045),o=i(62445),r=i(84839),s=i(23211),a=i(1080),l=i(28077),u=i(48155),c=i(18855);i(11173);var d=i(35104),h=i(54053);class p extends c.Plugin{afterInit(){this.onChangeCleanHTML()}get isEditMode(){return!(this.j.isInDestruct||!this.j.isEditorMode()||this.j.getReadOnly())}onChangeCleanHTML(){if(!this.isEditMode)return;let e=this.j;this.walker.setWork(e.editor),this.currentSelectionNode=e.s.current()}onInputRemovePlaceholderBr(e){this.isEditMode&&("input"!==e.type||!e.isComposing&&e.inputType?.startsWith("insert"))&&(0,h.removePlaceholderBr)(this.j)}startWalker(){let{jodit:e}=this,t=(0,h.getHash)(this.j.o.cleanHTML.allowTags),i=(0,h.getHash)(this.j.o.cleanHTML.denyTags);this.walker.on("visit",n=>(0,h.visitNodeWalker)(e,n,t,i,this.currentSelectionNode)).on("end",e=>{this.j.e.fire(e?"internalChange finishedCleanHTMLWorker":"finishedCleanHTMLWorker")})}beforeCommand(e){if("removeformat"===e.toLowerCase())return this.j.s.isCollapsed()?(0,h.removeFormatForWord)(this.j):(0,h.removeFormatForSelection)(this.j),!1}onAfterSetNativeEditorValue(){(0,u.safeHTML)(this.j.editor,this.j.o.cleanHTML)}onBeforeSetNativeEditorValue(e){let[t,i]=this.j.o.cleanHTML.useIframeSandbox?this.j.createInside.sandbox():[this.j.od.implementation.createHTMLDocument("").body];return t.innerHTML=e.value,this.j.e.fire("safeHTML",t),this.__replaceOldTags(t),e.value=t.innerHTML,(0,u.safeHTML)(t,{safeJavaScriptLink:!0,removeOnError:!0}),s.Dom.safeRemove(i),!1}__replaceOldTags(e){let{replaceOldTags:t,disableCleanFilter:i}=this.j.o.cleanHTML;!t||i?.has("replaceOldTags")||s.Dom.each(e,e=>{(0,d.replaceOldTags)(this.j,e,!1)})}onAfterGetValueFromEditor(e){if(this.__singleQuotesInFontFamily(e),this.__removeTrailingBr(e),!this.j.o.cleanHTML.collapseEmptyValueToEmptyString)return;let t=/^<([a-z][a-z0-9]*)\b[^>]*>(?:<br\/?>)?<\/\1>$/i.exec(e.value.trim());t&&/^(p|div|h[1-6]|blockquote|pre)$/i.test(t[1])&&(e.value="")}__removeTrailingBr(e){if(!this.j.o.cleanHTML.removeTrailingBr||!/<br/i.test(e.value))return;let t=this.j.c.div();t.innerHTML=e.value,[t,...t.querySelectorAll("p, div, li, td, th, h1, h2, h3, h4, h5, h6, blockquote")].forEach(e=>{let t=e.lastChild;if(!s.Dom.isTag(t,"br"))return;let i=t.previousSibling;!i||s.Dom.isTag(i,"br")||(!s.Dom.isText(i)||i.nodeValue?.trim()||i.previousSibling)&&s.Dom.safeRemove(t)}),e.value=t.innerHTML}__singleQuotesInFontFamily(e){this.j.o.cleanHTML.singleQuotesInFontFamily&&e.value.includes("&quot;")&&(e.value=e.value.replace(/\sstyle="([^"]*)"/gi,(e,t)=>{if(!t.includes("&quot;")||!/font-family/i.test(t))return e;let i=t.replace(/font-family\s*:(?:&quot;|[^;])*/gi,e=>e.includes("'")?e:e.replace(/&quot;/g,"'"));return e.replace(t,i)}))}onSafeHTML(e){let t=this.j.o.cleanHTML.sanitizer;t&&(e.innerHTML=t(e.innerHTML)),(0,u.safeHTML)(e,this.j.o.cleanHTML)}beforeDestruct(){this.j.e.off("safeHTML",this.onSafeHTML).off("beforeSetNativeEditorValue",this.onBeforeSetNativeEditorValue).off("afterSetNativeEditorValue",this.onAfterSetNativeEditorValue),this.walker.destruct()}constructor(e){super(e),(0,n._)(this,"buttons",[{name:"eraser",group:"font-style"}]),(0,n._)(this,"currentSelectionNode",null),(0,n._)(this,"walker",new a.LazyWalker(this.j.async,{timeout:this.j.o.cleanHTML.timeout})),e.e.on("safeHTML",this.onSafeHTML).on("beforeSetNativeEditorValue",this.onBeforeSetNativeEditorValue).on("afterSetNativeEditorValue",this.onAfterSetNativeEditorValue)}}(0,o._)([(0,r.watch)([":change",":afterSetMode",":afterInit",":mousedown",":keydown"])],p.prototype,"onChangeCleanHTML",null),(0,o._)([(0,r.watch)([":input","jodit.editor:compositionend"])],p.prototype,"onInputRemovePlaceholderBr",null),(0,o._)([(0,r.hook)("ready")],p.prototype,"startWalker",null),(0,o._)([(0,r.watch)(":beforeCommand")],p.prototype,"beforeCommand",null),(0,o._)([r.autobind],p.prototype,"onAfterSetNativeEditorValue",null),(0,o._)([r.autobind],p.prototype,"onBeforeSetNativeEditorValue",null),(0,o._)([(0,r.watch)(":afterGetValueFromEditor")],p.prototype,"onAfterGetValueFromEditor",null),(0,o._)([r.autobind],p.prototype,"onSafeHTML",null),l.pluginSystem.add("cleanHtml",p)},11173:function(e,t,i){"use strict";var n=i(5266);n.Config.prototype.cleanHTML={timeout:300,removeEmptyElements:!0,fillEmptyParagraph:!0,collapseEmptyValueToEmptyString:!1,singleQuotesInFontFamily:!0,removeTrailingBr:!1,replaceNBSP:!0,replaceOldTags:{i:"em",b:"strong"},allowTags:!1,denyTags:"script,iframe,object,embed",useIframeSandbox:!1,removeOnError:!0,removeEventAttributes:!0,safeJavaScriptLink:!0,safeLinksTarget:!0,allowedStyles:!1,sanitizer:!1,sandboxIframesInContent:!0,convertUnsafeEmbeds:["object","embed"],disableCleanFilter:null},n.Config.prototype.controls.eraser={command:"removeFormat",tooltip:"Clear Formatting"}},5650:function(e,t,i){"use strict";i.d(t,{getHash:function(){return r}});var n=i(85932),o=i(4040);function r(e){let t=/([^[]*)\[([^\]]+)]/,i=/[\s]*,[\s]*/,r=/^(.*)[\s]*=[\s]*(.*)$/,s={};return(0,n.isString)(e)?(e.split(i).map(e=>{e=(0,o.trim)(e);let n=t.exec(e),a={};if(n){let e=n[2].split(i);n[1]&&(e.forEach(e=>{e=(0,o.trim)(e);let t=r.exec(e);t?a[t[1]]=t[2]:a[e]=!0}),s[n[1].toUpperCase()]=a)}else s[e.toUpperCase()]=!0}),s):!!e&&(Object.keys(e).forEach(t=>{s[t.toUpperCase()]=e[t]}),s)}},54053:function(e,t,i){"use strict";i.d(t,{getHash:function(){return n.getHash},removeFormatForSelection:function(){return o.removeFormatForSelection},removeFormatForWord:function(){return r.removeFormatForWord},removePlaceholderBr:function(){return s.removePlaceholderBr},visitNodeWalker:function(){return a.visitNodeWalker}});var n=i(5650);i(37431);var o=i(70195),r=i(54189),s=i(53626),a=i(45219)},28665:function(e,t,i){"use strict";i.d(t,{isAllowedMediaEmbed:function(){return r}});let n=/^(https?:)?\/\/(www\.|m\.|music\.)?youtube(-nocookie)?\.com\/embed\//i,o=/^(https?:)?\/\/player\.vimeo\.com\/video\//i;function r(e){return n.test(e)||o.test(e)}},37431:function(e,t,i){"use strict";i.d(t,{isInlineBlock:function(){return s},removeFormatForCollapsedSelection:function(){return r}});var n=i(81937),o=i(23211);function r(e,t){let{s:i}=e,n=t;if(!n){n=e.createInside.fake();let{range:t}=i;o.Dom.safeInsertNode(t,n),t.collapse()}let r=o.Dom.furthest(n,s,e.editor);if(r)if(i.cursorOnTheLeft(r))o.Dom.before(r,n);else if(i.cursorOnTheRight(r))o.Dom.after(r,n);else{let e=i.splitSelection(r);e&&o.Dom.after(e,n)}t||(i.setCursorBefore(n),o.Dom.safeRemove(n))}function s(e){return o.Dom.isInlineBlock(e)&&!o.Dom.isTag(e,n.INSEPARABLE_TAGS)}},70195:function(e,t,i){"use strict";i.d(t,{removeFormatForSelection:function(){return s}});var n=i(23211),o=i(93640),r=i(37431);function s(e){let{s:t,editor:i,createInside:s}=e,{range:a}=t,l=a.cloneRange(),u=a.cloneRange(),c=s.fake(),d=s.fake();l.collapse(!0),u.collapse(!1),n.Dom.safeInsertNode(l,c),n.Dom.safeInsertNode(u,d),a.setStartBefore(c),a.collapse(!0),t.selectRange(a),(0,r.removeFormatForCollapsedSelection)(e,c),a.setEndAfter(d),a.collapse(!1),t.selectRange(a),(0,r.removeFormatForCollapsedSelection)(e,d);let h=[];n.Dom.between(c,d,e=>{(0,r.isInlineBlock)(e)&&!n.Dom.isTag(e,"a")&&h.push(e),n.Dom.isElement(e)&&(0,o.attr)(e,"style")&&(0,o.attr)(e,"style",null)}),h.forEach(e=>n.Dom.unwrap(e));let p=(e,t)=>{if(!n.Dom.findNotEmptySibling(e,t)){let n=e.parentNode;if(n&&n!==i&&(0,o.attr)(n,"style"))return(0,o.attr)(n,"style",null),p(n,t),!0}};p(c,!0)&&p(d,!1),a.setStartAfter(c),a.setEndBefore(d),t.selectRange(a),n.Dom.safeRemove(c),n.Dom.safeRemove(d)}},54189:function(e,t,i){"use strict";i.d(t,{removeFormatForWord:function(){return s}});var n=i(81937),o=i(23211),r=i(70195);function s(e){let{range:t}=e.s,i=o.Dom.closest(t.startContainer,o.Dom.isBlock,e.editor);if(!i)return;let n=l(i),s=n.map(e=>o.Dom.isText(e)?e.nodeValue:" ").join(""),d=function(e,t){let i=0;for(let n of e){if(n===t.startContainer)return i+t.startOffset;let e=u(n);if(t.comparePoint(n,o.Dom.isText(n)?e:0)>0)break;i+=e}return i}(n,t);if(!a(s[d-1])||!a(s[d]))return;let h=d,p=d;for(;a(s[h-1]);)h-=1;for(;a(s[p]);)p+=1;let m=e.s.createRange();m.setStart(...c(n,h,!0)),m.setEnd(...c(n,p,!1)),e.s.selectRange(m),(0,r.removeFormatForSelection)(e);let f=e.s.createRange();f.setStart(...c(l(i),d,!1)),e.s.selectRange(f)}function a(e){return!!(e&&e!==n.INVISIBLE_SPACE&&/\S/.test(e))}function l(e){let t=[];return o.Dom.each(e,i=>{!o.Dom.closest(i,o.Dom.isBlock,e)&&(o.Dom.isText(i)||o.Dom.isTag(i,n.INSEPARABLE_TAGS))&&t.push(i)}),t}function u(e){return o.Dom.isText(e)?e.nodeValue?.length??0:1}function c(e,t,i){let n=0,r=null;for(let s of e){let e=u(s);if(o.Dom.isText(s)&&(t<n+e||!i&&t===n+e))return[s,t-n];o.Dom.isText(s)&&(r=s),n+=e}return[r,r?.nodeValue?.length??0]}},53626:function(e,t,i){"use strict";i.d(t,{removePlaceholderBr:function(){return a}});var n=i(81937),o=i(23211),r=i(4040);function s(e){let t=e.lastChild;for(;o.Dom.isText(t)&&!t.nodeValue;)t=t.previousSibling;return t}function a(e){let t=o.Dom.closest(e.s.current(),o.Dom.isBlock,e.editor);if(!t||!(0,r.trim)(t.textContent??""))return;let i=s(t);for(;o.Dom.isElement(i)&&!o.Dom.isTag(i,n.INSEPARABLE_TAGS)&&!o.Dom.isBlock(i);)i=s(i);!o.Dom.isTag(i,"br")||o.Dom.each(t,e=>{if(e!==i&&o.Dom.isElement(e)&&(o.Dom.isTag(e,n.INSEPARABLE_TAGS)||o.Dom.isBlock(e)||o.Dom.isHTMLElement(e)&&!e.isContentEditable))return!1})&&o.Dom.safeRemove(i)}},95559:function(e,t,i){"use strict";i.d(t,{allowAttributes:function(){return r}});var n=i(23211),o=i(7909);function r(e,t,i,r){let s=r&&n.Dom.isElement(t)&&r[t.nodeName];if(r&&n.Dom.isElement(t)&&!0!==s){if(!s)return i;let e=t.attributes;if(e&&e.length){let n=[];for(let t=0;t<e.length;t+=1){let i=s[e[t].name];i&&(!0===i||i===e[t].value)||n.push(e[t].name)}n.length&&(i=!0),n.forEach(e=>{(0,o.attrRaw)(t,e,null)})}}return i}},85085:function(e,t,i){"use strict";i.d(t,{convertUnsafeEmbeds:function(){return r}});var n=i(23211),o=i(7909);function r(e,t,i){let r=e.o.cleanHTML.convertUnsafeEmbeds;if(!r||!n.Dom.isElement(t))return i;let s=t.nodeName.toLowerCase();if(!r.includes(s))return i;let a=(0,o.attr)(t,"data")||(0,o.attr)(t,"src")||(0,o.attr)(t,"movie")||"";if(!a)return n.Dom.safeRemove(t),!0;let l=e.createInside.element("iframe");return(0,o.attr)(l,{src:a,sandbox:"",frameborder:"0",width:(0,o.attr)(t,"width"),height:(0,o.attr)(t,"height")}),n.Dom.replace(t,l,void 0,!1,!0),!0}},39188:function(e,t,i){"use strict";i.d(t,{fillEmptyParagraph:function(){return s}});var n=i(81937),o=i(23211);let r=new Set(["table","tbody","thead","tfoot","tr"]);function s(e,t,i){if(e.o.cleanHTML.fillEmptyParagraph&&o.Dom.isBlock(t)&&o.Dom.isEmpty(t,n.INSEPARABLE_TAGS)&&!o.Dom.isTag(t,r)){let i=e.createInside.element("br");return o.Dom.append(t,i),!0}return i}},91560:function(e,t,i){"use strict";i.r(t),i.d(t,{allowAttributes:function(){return n.allowAttributes},convertUnsafeEmbeds:function(){return o.convertUnsafeEmbeds},fillEmptyParagraph:function(){return r.fillEmptyParagraph},removeEmptyTextNode:function(){return s.removeEmptyTextNode},removeInvTextNodes:function(){return a.removeInvTextNodes},replaceOldTags:function(){return l.replaceOldTags},safeLinksTarget:function(){return u.safeLinksTarget},sandboxIframesInContent:function(){return c.sandboxIframesInContent},sanitizeAttributes:function(){return d.sanitizeAttributes},sanitizeStyles:function(){return h.sanitizeStyles},tryRemoveNode:function(){return p.tryRemoveNode}});var n=i(95559),o=i(85085),r=i(39188),s=i(94561),a=i(53514),l=i(35104),u=i(77041),c=i(66647),d=i(65015),h=i(60220),p=i(27611)},94561:function(e,t,i){"use strict";i.d(t,{removeEmptyTextNode:function(){return o}});var n=i(23211);function o(e,t,i,o,r,s){return n.Dom.isText(t)&&!t.nodeValue?(t===s&&e.s.isFocused()&&e.s.isCollapsed()&&e.s.setCursorAfter(t),n.Dom.safeRemove(t),!0):i}},53514:function(e,t,i){"use strict";i.d(t,{removeInvTextNodes:function(){return r}});var n=i(81937),o=i(23211);function r(e,t,i,r,s,a){if(a===t||!o.Dom.isText(t)||null==t.nodeValue||!(0,n.INVISIBLE_SPACE_REG_EXP)().test(t.nodeValue))return i;let l=o.Dom.furthest(a,o.Dom.isBlock,e.editor);return!l||o.Dom.isOrContains(l,t)?i:(t.nodeValue=t.nodeValue.replace((0,n.INVISIBLE_SPACE_REG_EXP)(),""),t===a&&e.s.isFocused()&&e.s.isCollapsed()&&e.s.setCursorAfter(t),t.nodeValue||o.Dom.safeRemove(t),!0)}},35104:function(e,t,i){"use strict";i.d(t,{replaceOldTags:function(){return o}});var n=i(23211);function o(e,t,i){let o=function(e,t,i){if(!i||!n.Dom.isHTMLElement(t))return t;let o=i[t.nodeName.toLowerCase()]||i[t.nodeName];if(o){let i=function(e,t){let{sel:i}=e.s;if(!i?.anchorNode||!i.focusNode||!e.s.isFocused())return null;let{anchorNode:o,anchorOffset:r,focusNode:s,focusOffset:a}=i;return n.Dom.isOrContains(t,o)||n.Dom.isOrContains(t,s)?e=>{i.setBaseAndExtent(o===t?e:o,r,s===t?e:s,a)}:null}(e,t),r=n.Dom.replace(t,o,e.createInside,!0,!1);return i?.(r),r}return t}(e,t,e.o.cleanHTML.replaceOldTags);return t!==o||i}},77041:function(e,t,i){"use strict";i.d(t,{safeLinksTarget:function(){return r}});var n=i(23211),o=i(7909);function r(e,t,i){if(!e.o.cleanHTML.safeLinksTarget||!n.Dom.isElement(t)||"A"!==t.nodeName||"_blank"!==(0,o.attr)(t,"target"))return i;let r=((0,o.attr)(t,"rel")||"").split(/\s+/).filter(Boolean),s=!1;return(r.includes("noopener")||(r.push("noopener"),s=!0),r.includes("noreferrer")||(r.push("noreferrer"),s=!0),s)?((0,o.attr)(t,"rel",r.join(" ")),!0):i}},66647:function(e,t,i){"use strict";i.d(t,{sandboxIframesInContent:function(){return s}});var n=i(23211),o=i(7909),r=i(28665);function s(e,t,i){return e.o.cleanHTML.sandboxIframesInContent&&n.Dom.isElement(t)&&"IFRAME"===t.nodeName?(0,r.isAllowedMediaEmbed)((0,o.attr)(t,"src")||"")||t.hasAttribute("sandbox")?i:((0,o.attr)(t,"sandbox",""),!0):i}},65015:function(e,t,i){"use strict";i.d(t,{sanitizeAttributes:function(){return r}});var n=i(23211),o=i(65946);function r(e,t,i){if(!n.Dom.isElement(t))return i;let r=e.options.cleanHTML;return!!(0,o.sanitizeHTMLElement)(t,{safeJavaScriptLink:r.safeJavaScriptLink,removeOnError:r.removeOnError,removeEventAttributes:r.removeEventAttributes,safeLinksTarget:r.safeLinksTarget})||i}},60220:function(e,t,i){"use strict";i.d(t,{sanitizeStyles:function(){return r}});var n=i(23211),o=i(7909);function r(e,t,i){let r=e.o.cleanHTML.allowedStyles;if(!r||!n.Dom.isElement(t))return i;let s=(0,o.attr)(t,"style");if(!s)return i;let a=function(e,t){let i=t[e],n=t["*"];if(!i&&!n)return null;let o=new Set;if(n)for(let e of n)o.add(e.toLowerCase());if(i)for(let e of i)o.add(e.toLowerCase());return o}(t.nodeName.toLowerCase(),r);if(!a)return i;let l=s.split(";").map(e=>e.trim()).filter(e=>{if(!e)return!1;let t=e.indexOf(":");if(-1===t)return!1;let i=e.substring(0,t).trim().toLowerCase();return a.has(i)}).join("; ").replace(/;\s*$/,"");return l!==s?((0,o.attr)(t,"style",l||null),!0):i}},27611:function(e,t,i){"use strict";i.d(t,{tryRemoveNode:function(){return l}});var n=i(81937),o=i(23211),r=i(4040),s=i(7909),a=i(28665);function l(e,t,i,l,u,c){return!function(e,t,i,l,u){if(!o.Dom.isText(t)){let e=t.nodeName.toUpperCase();if(l&&!l[e])return!0;let i="IFRAME"===e&&(0,a.isAllowedMediaEmbed)((0,s.attr)(t,"src")||"");if(!l&&u&&u[e]&&!i)return!0}if(!e.o.cleanHTML.removeEmptyElements)return!1;let c=e.s.isCollapsed()?e.s.range.startContainer:null;return o.Dom.isElement(t)&&null!=t.nodeName.match(n.IS_INLINE)&&!o.Dom.isTemporary(t)&&!(t.hasAttribute("id")||"A"===t.nodeName&&t.hasAttribute("name"))&&0===(0,r.trimInv)(t.innerHTML).length&&(null==i||!o.Dom.isOrContains(t,i))&&(null==c||!o.Dom.isOrContains(t,c))}(e,t,c,l,u)?i:(o.Dom.safeRemove(t),!0)}},45219:function(e,t,i){"use strict";i.d(t,{visitNodeWalker:function(){return s}});var n=i(81937),o=i(91560);let r=Object.keys(o);function s(e,t,i,s,a){let l=!1,u=e.o.cleanHTML.disableCleanFilter;for(let c of r)if(!(u&&u.has(c))&&(l=(0,o[c])(e,t,l,i,s,a),n.IS_PROD,!t.isConnected))return!0;return l}},43354:function(e,t,i){"use strict";var n=i(25045),o=i(81937),r=i(51676),s=i(23211),a=i(28077),l=i(65946);i(81008);class u{init(e){this.buttons?.forEach(t=>e.registerButton(t)),e.e.off(`copy.${o.CLIPBOARD_ID} cut.${o.CLIPBOARD_ID}`).on(`copy.${o.CLIPBOARD_ID} cut.${o.CLIPBOARD_ID}`,t=>{let i=function(e,t){if(!t||e.s.isCollapsed())return t;let i=e.s.range.commonAncestorContainer;s.Dom.isElement(i)||(i=i.parentElement);let n=t;for(;i&&i!==e.editor&&s.Dom.isElement(i)&&!s.Dom.isBlock(i);){let e=i.cloneNode(!1);e.innerHTML=n,n=e.outerHTML,i=i.parentElement}return n}(e,e.s.html),n=(0,l.getDataTransfer)(t)||(0,l.getDataTransfer)(e.ew)||(0,l.getDataTransfer)(t.originalEvent);n&&(n.setData(o.TEXT_PLAIN,(0,l.stripTags)(i)),n.setData(o.TEXT_HTML,i)),e.buffer.set(o.CLIPBOARD_ID,i),e.e.fire("pasteStack",{html:i,action:e.o.defaultActionOnPaste||o.INSERT_AS_HTML}),"cut"===t.type&&(e.s.remove(),e.s.focus()),t.preventDefault(),e?.events?.fire("afterCopy",i)})}destruct(e){(0,r.cached)(e,"buffer")?.set(o.CLIPBOARD_ID,""),e?.events?.off("."+o.CLIPBOARD_ID)}constructor(){(0,n._)(this,"jodit",void 0),(0,n._)(this,"buttons",[{name:"cut",group:"clipboard"},{name:"copy",group:"clipboard"},{name:"paste",group:"clipboard"},{name:"selectall",group:"clipboard"}])}}a.pluginSystem.add("clipboard",u)},81008:function(e,t,i){"use strict";var n=i(29434),o=i(5266),r=i(51457),s=i.n(r),a=i(23602),l=i.n(a),u=i(86899),c=i.n(u),d=i(95320),h=i.n(d);o.Config.prototype.controls.cut={command:"cut",isDisabled:e=>e.s.isCollapsed(),tooltip:"Cut selection"},o.Config.prototype.controls.copy={command:"copy",isDisabled:e=>e.s.isCollapsed(),tooltip:"Copy selection"},o.Config.prototype.controls.selectall={icon:"select-all",command:"selectall",tooltip:"Select all"},n.Icon.set("copy",s()).set("cut",l()).set("paste",c()).set("select-all",h())},42462:function(e,t,i){"use strict";var n=i(28077),o=i(65946);i(8071),n.pluginSystem.add("color",function(e){e.registerButton({name:"brush",group:"color"});let t=(t,i,n)=>{let r=(0,o.normalizeColor)(n)||"",s="background"===t?{backgroundColor:r}:{color:r},a=e.getInstance("Table",e.o).getAllSelectedCells();return a.length&&e.s.isCollapsed()?(a.forEach(t=>{e.s.select(t,!0),e.s.commitStyle({attributes:{style:s}})}),e.s.sel?.removeAllRanges()):e.s.commitStyle({attributes:{style:s}}),e.synchronizeValues(),!1};e.registerCommand("forecolor",t).registerCommand("background",t)})},8071:function(e,t,i){"use strict";var n=i(23211),o=i(65946),r=i(29434),s=i(5266),a=i(15753),l=i(45674),u=i.n(l);function c(e,t,i){(0,o.css)(e,t,i),(0,o.attr)(e,"style")||(0,o.attr)(e,"style",null)}r.Icon.set("brush",u()),s.Config.prototype.controls.brushCell={isVisible:e=>!e.o.disablePlugins.includes("color"),icon:"brush",popup(e,t,i){if(!(0,o.isJoditObject)(e))return;let n=e.getInstance("Table",e.o).getAllSelectedCells();if(!n.length)return!1;let r=t=>(0,a.ColorPickerWidget)(e,o=>{n.forEach(e=>{c(e,t,o)}),e.lock(),e.synchronizeValues(),i(),e.unlock()},(0,o.css)(n[0],t));return(0,a.TabsWidget)(e,[{name:"Background",content:r("background-color")},{name:"Text",content:r("color")},{name:"Border",content:r("border-color")}])},tooltip:"Background"},s.Config.prototype.controls.brush={isVisible:e=>!e.o.disablePlugins.includes("color"),update(e,t){let i=(0,o.dataBind)(t,"color"),r=(i,n)=>!!n&&n!==(0,o.css)(e.editor,i).toString()&&(t.state.icon.fill=n,!0);if(i){let e=(0,o.dataBind)(t,"color");r("color"===e?e:"background-color",i);return}let s=e.s.current();if(s&&!t.state.disabled){let t=n.Dom.closest(s,n.Dom.isElement,e.editor)||e.editor,i=r("color",(0,o.css)(t,"color").toString()),a=r("background-color",(0,o.css)(t,"background-color").toString());if(i||a)return}t.state.icon.fill="",t.state.activated=!1},popup(e,t,i,r){let s="",l="",u,d=null;return t&&t!==e.editor&&n.Dom.isNode(t)&&(n.Dom.isElement(t)&&e.s.isCollapsed()&&!n.Dom.isTag(t,new Set(["br","hr"]))&&(d=t),n.Dom.up(t,e=>{if(n.Dom.isHTMLElement(e)){let t=(0,o.css)(e,"color",!0),i=(0,o.css)(e,"background-color",!0);if(t)return s=t.toString(),!0;if(i)return l=i.toString(),!0}},e.editor)),u=[{name:"Background",content:(0,a.ColorPickerWidget)(e,t=>{d?c(d,"backgroundColor",t):e.execCommand("background",!1,t),(0,o.dataBind)(r,"color",t),(0,o.dataBind)(r,"color-mode","background"),i()},l)},{name:"Text",content:(0,a.ColorPickerWidget)(e,t=>{d?c(d,"color",t):e.execCommand("forecolor",!1,t),(0,o.dataBind)(r,"color",t),(0,o.dataBind)(r,"color-mode","color"),i()},s)}],"background"!==e.o.colorPickerDefaultTab&&(u=u.reverse()),(0,a.TabsWidget)(e,u,d)},exec(e,t,{button:i}){let r=(0,o.dataBind)(i,"color-mode"),s=(0,o.dataBind)(i,"color");if(!r)return!1;if(t&&t!==e.editor&&n.Dom.isNode(t)&&n.Dom.isElement(t))switch(r){case"color":c(t,"color",s);break;case"background":c(t,"backgroundColor",s)}else e.execCommand("background"===r?r:"forecolor",!1,s)},tooltip:"Fill color or set the text color"}},30062:function(e,t,i){"use strict";var n=i(23211),o=i(28077),r=i(80991),s=i(29434),a=i(5266),l=i(3843),u=i.n(l),c=i(38639);let d="copy-format",h=["lineHeight","fontWeight","fontStyle","fontSize","fontFamily","color","margin","padding","borderWidth","borderStyle","borderColor","borderRadius","backgroundColor","textDecorationLine"],p=(e,t,i,n)=>{let o=(0,r.css)(i,t);return o===n[t]&&(o=i.parentNode&&i!==e.editor&&i.parentNode!==e.editor?p(e,t,i.parentNode,n):void 0),o};a.Config.prototype.controls.copyformat={exec(e,t,{button:i}){if(t){if(e.buffer.exists(d))e.buffer.delete(d),e.e.off(e.editor,"mouseup."+d);else{let i,o={},s=n.Dom.up(t,e=>e&&!n.Dom.isText(e),e.editor)||e.editor,a=e.createInside.span();n.Dom.append(e.editor,a),h.forEach(e=>{o[e]=(0,r.css)(a,e)}),a!==e.editor&&n.Dom.safeRemove(a);let l=(i={},s&&h.forEach(t=>{i[t]=p(e,t,s,o),t.match(/border(Style|Color)/)&&!i.borderWidth&&(i[t]=void 0)}),i);e.e.on(e.editor,"mouseup."+d,()=>{e.buffer.delete(d);let t=e.s.current();t&&(n.Dom.isTag(t,"img")?(0,r.css)(t,l):e.s.commitStyle({attributes:{style:l}})),e.e.off(e.editor,"mouseup."+d)}),e.buffer.set(d,!0)}i.update()}},isActive:e=>e.buffer.exists(d),tooltip:"Paint format"},o.pluginSystem.add("copyformat",function(e){e.registerButton({name:"copyformat",group:"clipboard"}),(0,o.extendLang)(c)}),s.Icon.set("copyformat",u())},35830:function(e){e.exports={"copy-format":"نسخ التنسيق"}},3787:function(e){e.exports={"copy-format":"Kopírovat formát"}},83778:function(e){e.exports={"copy-format":"Format kopierenт"}},70577:function(e){e.exports={"copy-format":"Copiar formato"}},15552:function(e){e.exports={"copy-format":"کپی کردن قالب"}},79400:function(e){e.exports={"copy-format":"Kopioi muotoilu"}},21513:function(e){e.exports={"copy-format":"Format de copie"}},40998:function(e){e.exports={"copy-format":"העתק עיצוב"}},22998:function(e){e.exports={"copy-format":"Formátum másolás"}},52504:function(e){e.exports={"copy-format":"salin format"}},38639:function(e,t,i){"use strict";i.r(t),i.d(t,{ar:function(){return n},cs_cz:function(){return o},de:function(){return r},es:function(){return s},fa:function(){return a},fi:function(){return l},fr:function(){return u},he:function(){return c},hu:function(){return d},id:function(){return h},it:function(){return p},ja:function(){return m},ko:function(){return f},mn:function(){return g},nl:function(){return _},pl:function(){return v},pt_br:function(){return b},ru:function(){return y},tr:function(){return w},zh_cn:function(){return k},zh_tw:function(){return S}});var n=i(35830),o=i(3787),r=i(83778),s=i(70577),a=i(15552),l=i(79400),u=i(21513),c=i(40998),d=i(22998),h=i(52504),p=i(66568),m=i(83708),f=i(37023),g=i(1678),_=i(58067),v=i(35109),b=i(22380),y=i(12872),w=i(31371),k=i(41599),S=i(15223)},66568:function(e){e.exports={"copy-format":"Copia il formato"}},83708:function(e){e.exports={"copy-format":"copyformat"}},37023:function(e){e.exports={"copy-format":"복사 형식"}},1678:function(e){e.exports={"copy-format":"Формат хуулах"}},58067:function(e){e.exports={"copy-format":"opmaak kopiëren"}},35109:function(e){e.exports={"copy-format":"format kopii"}},22380:function(e){e.exports={"copy-format":"Copiar formato"}},12872:function(e){e.exports={"copy-format":"Копировать формат"}},31371:function(e){e.exports={"copy-format":"Kopyalama Biçimi"}},41599:function(e){e.exports={"copy-format":"复制格式"}},15223:function(e){e.exports={"copy-format":"複製格式"}},63974:function(e,t,i){"use strict";var n=i(25045),o=i(81937),r=i(27795),s=i(28077),a=i(65946),l=i(4040),u=i(91206);let c=new Set(["img","table","jodit","iframe","hr"]),d=new Set(["pre","pre-wrap","break-spaces"]);function h(e,t){let i=0;for(;i<e.length&&" "===e.charAt(t?e.length-1-i:i);)i+=1;return 0===i?e:t?e.slice(0,e.length-i)+o.NBSP_SPACE.repeat(i):o.NBSP_SPACE.repeat(i)+e.slice(i)}function p(e,t){return!e||r.Dom.isTag(e,"br")||r.Dom.isBlock(e)||r.Dom.isText(e)&&t.test(e.nodeValue??"")}class m extends u.Plugin{afterInit(e){e.e.on("afterCommand.delete",e=>{"delete"===e&&this.__afterDeleteCommand()}),e.registerCommand("delete",{exec:this.__onDeleteCommand.bind(this)},{stopPropagation:!1})}beforeDestruct(e){e.e.off("afterCommand.delete")}__afterDeleteCommand(){let e=this.j,t=e.s.current();if(t&&r.Dom.isTag(t.firstChild,"br")&&e.s.removeNode(t.firstChild),!(0,l.trim)(e.editor.textContent||"")&&!r.Dom.first(e.editor,e=>r.Dom.isTag(e,c))&&(!t||!r.Dom.closest(t,"table",e.editor))){r.Dom.detach(e.editor);let t=e.s.setCursorIn(e.editor);e.s.removeNode(t)}}__onDeleteCommand(){let{jodit:e}=this;if(e.s.isCollapsed())return;e.s.expandSelection();let t=e.s.range;this.__moveEdgesIntoCells(t);let i=this.__clearSelectedCells(t);if(i&&t.collapsed)return e.s.selectRange(i),!1;t.deleteContents();let n=e.createInside.fake();t.insertNode(n);let o=r.Dom.findSibling(n,!0),s=r.Dom.findSibling(n,!1);return this.__moveContentInLeftSibling(n,o,s),this.__keepSpacesVisible(n),this.__keepSpacesVisibleBesideTable(n),t.setStartBefore(n),t.collapse(!0),this.__moveCursorInEditableSibling(e,o,n,t),this.__addBrInEmptyBlock(n,t),r.Dom.safeRemove(n),e.s.selectRange(i??t),!1}__moveEdgesIntoCells(e){let{startContainer:t,startOffset:i,endContainer:n,endOffset:o}=e,s=r.Dom.isTag(t,"tr")?t.childNodes[i]:null,a=r.Dom.isTag(n,"tr")?n.childNodes[o-1]:null;r.Dom.isCell(s)&&e.setStart(s,0),r.Dom.isCell(a)&&e.setEnd(a,a.childNodes.length)}__clearSelectedCells(e){let{editor:t,createInside:i}=this.j,n=r.Dom.closest(e.startContainer,r.Dom.isCell,t),o=r.Dom.closest(e.endContainer,r.Dom.isCell,t);if(n===o)return null;let s=r.Dom.closest(n,"table",t),l=r.Dom.closest(o,"table",t),u=e.cloneRange();u.collapse(!0);let c=e.cloneRange();c.collapse(!1);let d=[],h=t=>{(0,a.toArray)(t.rows).flatMap(e=>(0,a.toArray)(e.cells)).filter(t=>e.intersectsNode(t)).forEach(t=>{let i=e.cloneRange();r.Dom.isOrContains(t,e.startContainer)||i.setStart(t,0),r.Dom.isOrContains(t,e.endContainer)||i.setEnd(t,t.childNodes.length),d.push([t,i])})};return s&&(h(s),s===l?e.collapse(!0):e.setStartAfter(s)),l&&l!==s&&(h(l),e.setEndBefore(l)),d.forEach(([e,t])=>{if(t.deleteContents(),r.Dom.isEmpty(e)){r.Dom.detach(e),r.Dom.append(e,i.element("br"));return}[u,c].filter(t=>r.Dom.isOrContains(e,t.startContainer)).forEach(e=>{let t=i.fake();e.insertNode(t),this.__keepSpacesVisible(t),e.setStartBefore(t),e.collapse(!0),r.Dom.safeRemove(t)})}),s?u:null}__moveContentInLeftSibling(e,t,i){if(t=this.__defineRightLeftBox(t),r.Dom.isTag(t,"table")){r.Dom.isBlock(i)&&r.Dom.isEmpty(i)&&r.Dom.safeRemove(i);return}if(!r.Dom.isList(i)&&!r.Dom.isTag(i,"table")&&r.Dom.isBlock(i)&&r.Dom.isBlock(t)&&(r.Dom.append(t,e),r.Dom.moveContent(i,t),r.Dom.safeRemove(i)),r.Dom.isList(i)&&r.Dom.isLeaf(i.firstElementChild)){let n=i.firstElementChild;if(!r.Dom.isEmpty(n)&&r.Dom.isBlock(t))for(r.Dom.append(t,e);n.firstChild&&!r.Dom.isBlock(n.firstChild);)r.Dom.append(t,n.firstChild);r.Dom.isEmpty(n)&&r.Dom.safeRemove(n),r.Dom.isEmpty(i)&&r.Dom.safeRemove(i)}}__keepSpacesVisible(e){let{jodit:t}=this,i=r.Dom.closest(e,r.Dom.isBlock,t.editor)??t.editor;if(d.has(t.ew.getComputedStyle(i).whiteSpace))return;let n=this.__findNeighbor(e,!0,i),o=this.__findNeighbor(e,!1,i);r.Dom.isText(n)&&p(o,/^ /)&&(n.nodeValue=h(n.nodeValue,!0)),r.Dom.isText(o)&&p(n,/ $/)&&(o.nodeValue=h(o.nodeValue,!1))}__keepSpacesVisibleBesideTable(e){let t=r.Dom.findNotEmptySibling(e,!0),i=r.Dom.findNotEmptySibling(e,!1),n=r.Dom.isTag(i,"table")?t:r.Dom.isTag(t,"table")?i:null;if(!r.Dom.isBlock(n)||r.Dom.isTag(n,"table"))return;let o=this.jodit.createInside.fake();n===t?r.Dom.append(n,o):n.insertBefore(o,n.firstChild),this.__keepSpacesVisible(o),r.Dom.safeRemove(o)}__findNeighbor(e,t,i){return(0,a.call)(t?r.Dom.prev:r.Dom.next,e,e=>r.Dom.isText(e)?(0,a.trimInv)(e.nodeValue??"").length>0:!r.Dom.isComment(e)&&!(r.Dom.isInlineBlock(e)&&e.firstChild),i)}__defineRightLeftBox(e){if(!r.Dom.isList(e))return e;let t=e.lastElementChild;return r.Dom.isLeaf(t)||(t=this.j.createInside.element("li"),r.Dom.append(e,t)),t}__addBrInEmptyBlock(e,t){let i=this.j;if(e.isConnected&&r.Dom.isBlock(e.parentNode)&&!e.nextSibling&&!e.previousSibling){let n=i.createInside.element("br");r.Dom.after(e,n),t.setStartBefore(n),t.collapse(!0)}}__moveCursorInEditableSibling(e,t,i,n){if(!t||!r.Dom.isText(t)){let t=r.Dom.closest(i,r.Dom.isBlock,e.editor)??e.editor,o=r.Dom.prev(i,r.Dom.isText,t);o&&(n.setStartAfter(o),n.collapse(!0),r.Dom.safeRemove(i))}}}(0,n._)(m,"requires",["backspace"]),s.pluginSystem.add("deleteCommand",m)},65701:function(e,t,i){"use strict";i(5266).Config.prototype.draggableTags=["img","jodit-media","jodit"]},43102:function(e,t,i){"use strict";var n=i(25045),o=i(62445),r=i(84839),s=i(27795),a=i(28077),l=i(65946),u=i(91206);i(65701);class c extends u.Plugin{afterInit(){this.dragList=this.j.o.draggableTags?(0,l.splitArray)(this.j.o.draggableTags).filter(Boolean).map(e=>e.toLowerCase()):[],this.j.e.on("startDragElement",this.onStartDragElement),this.dragList.length&&this.j.e.on("mousedown dragstart",this.onDragStart)}onStartDragElement(e,t){this.isInDestruct||this.state>0||!e||this.startDragging(e,t)}onDragStart(e){if("dragstart"===e.type&&this.draggable)return!1;if(this.state>0)return;let t=e.target;if(!this.dragList.length||!t)return;let i=e=>!!(e&&this.dragList.includes(e.nodeName.toLowerCase())),n=s.Dom.furthest(t,i,this.j.editor)||(i(t)?t:null);n&&(s.Dom.isTag(n.parentElement,"a")&&n.parentElement.firstChild===n&&n.parentElement.lastChild===n&&(n=n.parentElement),this.startDragging((0,l.getCaptionWrapper)(this.j,n)??n,e))}startDragging(e,t){this.startX=t.clientX,this.startY=t.clientY,this.isCopyMode=(0,l.ctrlKey)(t),this.draggable=e.cloneNode(!0),(0,l.dataBind)(this.draggable,"target",e),this.state=1,this.addDragListeners()}onDrag(e){if(!this.draggable||0===this.state)return;let t=e.clientX,i=e.clientY;if(1===this.state&&Math.sqrt(Math.pow(t-this.startX,2)+Math.pow(i-this.startY,2))<this.diffStep)return;1===this.state&&(this.j.lock("drag-and-drop-element"),this.state=2),this.j.e.fire("hidePopup hideResizer");let n=this.__ghostOffset();if(!this.draggable.parentNode){let t=(0,l.dataBind)(this.draggable,"target");(0,l.css)(this.draggable,{zIndex:1e13,pointerEvents:"none",pointer:"drag",position:"fixed",opacity:.7,display:"inline-block",left:e.clientX+n.left,top:e.clientY+n.top,width:t?.offsetWidth??100,height:t?.offsetHeight??100}),s.Dom.append((0,a.getContainer)(this.j,c),this.draggable)}(0,l.css)(this.draggable,{left:e.clientX+n.left,top:e.clientY+n.top}),this.j.s.insertCursorAtPoint(e.clientX,e.clientY)}__ghostOffset(){let e=this.j.iframe;if(!e)return{left:0,top:0};let t=e.getBoundingClientRect();return{left:t.left,top:t.top}}onDragEnd(){!this.isInDestruct&&(this.removeDragListeners(),this.j.unlock(),this.state=0,this.draggable&&(s.Dom.safeRemove(this.draggable),this.draggable=null))}onDrop(){if(!this.draggable||this.state<2)return void this.onDragEnd();let e=(0,l.dataBind)(this.draggable,"target");this.onDragEnd(),this.isCopyMode&&(e=e.cloneNode(!0));let{parentElement:t}=e;this.j.s.insertNode(e,!0,!1),[e.previousSibling,e.nextSibling].forEach(e=>{s.Dom.isEmptyTextNode(e)&&s.Dom.safeRemove(e)}),t&&s.Dom.isEmpty(t)&&!s.Dom.isCell(t)&&s.Dom.safeRemove(t),s.Dom.isTag(e,"img")&&this.j.e&&this.j.e.fire("afterInsertImage",e),this.j.e.fire("synchro")}addDragListeners(){this.j.e.on(this.j.editor,"mousemove",this.onDrag).on("mouseup",this.onDrop).on([this.j.ew,this.ow],"mouseup",this.onDragEnd)}removeDragListeners(){this.j.e.off(this.j.editor,"mousemove",this.onDrag).off("mouseup",this.onDrop).off([this.j.ew,this.ow],"mouseup",this.onDragEnd)}beforeDestruct(){this.onDragEnd(),this.j.e.off("mousedown dragstart",this.onDragStart).off("startDragElement",this.onStartDragElement),this.removeDragListeners()}constructor(...e){super(...e),(0,n._)(this,"dragList",[]),(0,n._)(this,"draggable",null),(0,n._)(this,"isCopyMode",!1),(0,n._)(this,"diffStep",10),(0,n._)(this,"startX",0),(0,n._)(this,"startY",0),(0,n._)(this,"state",0)}}(0,o._)([r.autobind],c.prototype,"onStartDragElement",null),(0,o._)([r.autobind],c.prototype,"onDragStart",null),(0,o._)([(0,r.throttle)(e=>e.defaultTimeout/10)],c.prototype,"onDrag",null),(0,o._)([r.autobind],c.prototype,"onDragEnd",null),(0,o._)([r.autobind],c.prototype,"onDrop",null),a.pluginSystem.add("dragAndDropElement",c)},64222:function(e,t,i){"use strict";var n=i(25045),o=i(62445),r=i(81937),s=i(84839),a=i(23211),l=i(28077),u=i(65946),c=i(91206),d=i(63425);class h extends c.Plugin{afterInit(){this.j.e.on([window,this.j.ed,this.j.editor],"dragstart.DragAndDrop",this.onDragStart).on("drop.DragAndDrop",this.onDrop)}onDragStart(e){var t;let i=e.target;if(this.onDragEnd(),this.isFragmentFromEditor=a.Dom.isOrContains(this.j.editor,i,!0),this.isCopyMode=!this.isFragmentFromEditor||(0,u.ctrlKey)(e),this.isFragmentFromEditor){let e=this.j.s.sel,t=e&&e.rangeCount?e.getRangeAt(0):null;t&&(this.bufferRange=t.cloneRange())}else this.bufferRange=null;this.startDragPoint.x=e.clientX,this.startDragPoint.y=e.clientY,t=i,a.Dom.isElement(t)&&t.classList.contains(d.FileBrowserFiles.prototype.getFullElName("item"))&&(i=a.Dom.first(i,e=>a.Dom.isTag(e,"img"))),a.Dom.isTag(i,"img")&&(this.draggable=i.cloneNode(!0),(0,u.dataBind)(this.draggable,"target",i)),this.addDragListeners()}addDragListeners(){this.j.e.on("dragover",this.onDrag).on(window,"dragend.DragAndDrop drop.DragAndDrop mouseup.DragAndDrop",this.onDragEnd)}removeDragListeners(){this.j.e.off("dragover",this.onDrag).off(window,"dragend.DragAndDrop drop.DragAndDrop mouseup.DragAndDrop",this.onDragEnd)}onDrag(e){this.draggable&&(this.j.e.fire("hidePopup"),this.j.s.insertCursorAtPoint(e.clientX,e.clientY),e.preventDefault(),e.stopPropagation())}onDragEnd(){this.draggable&&(a.Dom.safeRemove(this.draggable),this.draggable=null),this.isCopyMode=!1,this.removeDragListeners()}onDrop(e){if(!e.dataTransfer||!e.dataTransfer.files||!e.dataTransfer.files.length){if(!this.isFragmentFromEditor&&!this.draggable)return this.j.e.fire("paste",e),e.preventDefault(),e.stopPropagation(),!1;let t=this.j.s.sel,i=this.bufferRange||(t&&t.rangeCount?t.getRangeAt(0):null),n=this.__getWorkFragment(i,e);t&&t.removeAllRanges(),this.j.s.insertCursorAtPoint(e.clientX,e.clientY),n&&this.__insertFragment.call(this,n,i),e.preventDefault(),e.stopPropagation()}this.isFragmentFromEditor=!1,this.removeDragListeners()}__getWorkFragment(e,t){let i=null;if(!this.draggable&&e)i=this.isCopyMode?e.cloneContents():e.extractContents();else if(this.draggable)if(this.isCopyMode){let[e,t]="1"===(0,u.attr)(this.draggable,"-is-file")?["a","href"]:["img","src"];i=this.j.createInside.element(e),(0,u.attr)(i,t,(0,u.attr)(this.draggable,"data-src")||(0,u.attr)(this.draggable,"src")||""),"a"===e&&(i.textContent=(0,u.attr)(i,t)||"")}else i=(0,u.dataBind)(this.draggable,"target");else if(this.getText(t)){let e=this.j.createInside.div();e.innerHTML=this.getText(t),this.j.e.fire("safeHTML",e),i=e.firstChild===e.lastChild&&e.firstChild?e.firstChild:e}return i}__insertFragment(e,t){this.j.s.insertNode(e,!1,!1),t&&e.firstChild&&e.lastChild&&(t.setStartBefore(e.firstChild),t.setEndAfter(e.lastChild),this.j.s.selectRange(t),this.j.e.fire("synchro")),a.Dom.isTag(e,"img")&&this.j.events&&this.j.e.fire("afterInsertImage",e)}beforeDestruct(){this.onDragEnd(),this.j.e.off(window,".DragAndDrop").off(".DragAndDrop").off([window,this.j.ed,this.j.editor],"dragstart.DragAndDrop",this.onDragStart)}constructor(...e){super(...e),(0,n._)(this,"isFragmentFromEditor",!1),(0,n._)(this,"isCopyMode",!1),(0,n._)(this,"startDragPoint",{x:0,y:0}),(0,n._)(this,"draggable",null),(0,n._)(this,"bufferRange",null),(0,n._)(this,"getText",e=>{let t=(0,u.getDataTransfer)(e);return t?t.getData(r.TEXT_HTML)||t.getData(r.TEXT_PLAIN):null})}}(0,o._)([s.autobind],h.prototype,"onDragStart",null),(0,o._)([(0,s.throttle)(e=>e.defaultTimeout/10)],h.prototype,"onDrag",null),(0,o._)([s.autobind],h.prototype,"onDragEnd",null),(0,o._)([s.autobind],h.prototype,"onDrop",null),l.pluginSystem.add("dragAndDrop",h)},33915:function(e,t,i){"use strict";i.r(t),i.d(t,{removeExtraBr:function(){return n.removeExtraBr}});var n=i(14841)},14841:function(e,t,i){"use strict";i.d(t,{removeExtraBr:function(){return r}});var n=i(23211);let o=new Set(["table","pre","blockquote","code"]);function r(e,t){if(!e.o.dtd.removeExtraBr||n.Dom.isTag(t,"br"))return;let i=n.Dom.furthest(t,n.Dom.isBlock,e.editor);if(i&&!n.Dom.isTag(i,o)){let i=n.Dom.isTag(t,"br")?t:n.Dom.findNotEmptySibling(t,!1);if(!n.Dom.isTag(i,"br")||n.Dom.findNotEmptySibling(i,!1))return;n.Dom.isOrContains(t,e.s.range.startContainer)||e.s.setCursorBefore(i),n.Dom.safeRemove(i)}}},34693:function(e,t,i){"use strict";i.d(t,{checkBlockNesting:function(){return o}});var n=i(23211);function o(e,t){if(n.Dom.isFragment(t)&&(t=t.firstChild),e.o.dtd.checkBlockNesting&&n.Dom.isBlock(t)){let i=null,o=e.s.current()?.parentElement??null;for(;o&&o!==e.editor;){if(n.Dom.isBlock(o)){let t=!i&&n.Dom.isTag(o,e.o.enter)&&n.Dom.isEmpty(o);if(e.o.dtd.blockLimits[o.nodeName.toLowerCase()]&&!t)break;i=o}o=o.parentElement}n.Dom.isLeaf(o)&&n.Dom.isList(t)&&n.Dom.isFragment(t.parentNode)&&!n.Dom.findNotEmptySibling(t,!1)&&(n.Dom.unwrap(t),i=o),i&&function(e,t){let{s:i}=e;if(n.Dom.isEmpty(t)){i.setCursorAfter(t),n.Dom.safeRemove(t);return}i.cursorOnTheRight(t)?i.setCursorAfter(t):i.cursorOnTheLeft(t)?i.setCursorBefore(t):i.setCursorAfter(i.splitSelection(t)??t)}(e,i)}}},14282:function(e,t,i){"use strict";i.r(t),i.d(t,{checkBlockNesting:function(){return n.checkBlockNesting}});var n=i(34693)},96722:function(e,t,i){"use strict";i(5266).Config.prototype.dtd={removeExtraBr:!0,checkBlockNesting:!0,blockLimits:{article:1,aside:1,audio:1,body:1,caption:1,dd:1,details:1,dir:1,div:1,dl:1,dt:1,fieldset:1,figcaption:1,figure:1,footer:1,form:1,header:1,hgroup:1,li:1,main:1,menu:1,nav:1,ol:1,section:1,table:1,td:1,th:1,tr:1,ul:1,video:1}}},56894:function(e,t,i){"use strict";var n=i(62445),o=i(68616),r=i(28077),s=i(91206);i(96722);var a=i(33915),l=i(14282);class u extends s.Plugin{afterInit(e){}beforeDestruct(e){}__onBeforeInsertNode(e){Object.keys(l).forEach(t=>{l[t](this.j,e)})}__onAfterInsertNode(e){Object.keys(a).forEach(t=>{a[t](this.j,e)})}}(0,n._)([(0,o.watch)(":beforeInsertNode")],u.prototype,"__onBeforeInsertNode",null),(0,n._)([(0,o.watch)(":afterInsertNode")],u.prototype,"__onAfterInsertNode",null),r.pluginSystem.add("dtd",u)},3678:function(e,t,i){"use strict";var n=i(62445),o=i(81937),r=i(84839),s=i(23211),a=i(28077),l=i(22289),u=i(18855),c=i(10918);class d extends u.Plugin{afterInit(e){let t=e.o.enter.toLowerCase(),i=t===o.BR.toLowerCase();e.o.enterBlock||(e.o.enterBlock=i?o.PARAGRAPH:t),e.registerCommand("enter",(e,t,i={})=>this.onEnter(i))}onEnterKeyDown(e){if(e.key===o.KEY_ENTER){let t=this.j,i=t.e.fire("beforeEnter",e);return void 0!==i?i:(t.history.snapshot.transaction(()=>{t.s.isCollapsed()||t.execCommand("Delete"),t.s.focus(),this.onEnter(e),t.e.fire("afterEnter",e)}),t.synchronizeValues(),!1)}}onEnter(e){let{jodit:t}=this,i=t.createInside.fake();try{s.Dom.safeInsertNode(t.s.range,i),(0,c.moveCursorOutFromSpecialTags)(t,i,["a"]);let n=(0,c.getBlockWrapper)(i,t),o=s.Dom.isLeaf(n);if((!o||e?.shiftKey)&&(0,c.checkBR)(i,t,e?.shiftKey,n))return!1;if(n||(0,c.hasPreviousBlock)(i,t)||(n=(0,c.wrapText)(i,t)),!n)return(0,c.insertParagraph)(i,t,o?"li":t.o.enter),!1;if(!(0,c.checkUnsplittableBox)(i,t,n))return!1;if(o&&this.__isEmptyListLeaf(n))return(0,c.processEmptyLILeaf)(i,t,n),!1;(0,c.splitFragment)(i,t,n)}finally{i.isConnected&&t.s.setCursorBefore(i),s.Dom.safeRemove(i)}}__isEmptyListLeaf(e){let t=this.j.e.fire("enterIsEmptyListLeaf",e);return(0,l.isBoolean)(t)?t:s.Dom.isEmpty(e)}beforeDestruct(e){e.e.off("keydown.enter")}}(0,n._)([(0,r.watch)(":keydown.enter")],d.prototype,"onEnterKeyDown",null),a.pluginSystem.add("enter",d)},34287:function(e,t,i){"use strict";i.d(t,{checkBR:function(){return s}});var n=i(81937),o=i(23211),r=i(60898);function s(e,t,i,s){let l=!!o.Dom.closest(e,"pre",t.editor)||(s?o.Dom.isTag(s,"blockquote"):!!o.Dom.closest(e,"blockquote",t.editor)),u=!l&&(s?o.Dom.isCell(s):!!o.Dom.closest(e,["td","th"],t.editor));if(t.o.enter.toLowerCase()===n.BR.toLowerCase()||u||i&&!l||!i&&l){var c;let i;if(l&&(i=a(a(c=e)))&&(o.Dom.safeRemove(a(c)),o.Dom.safeRemove(i),1))return!1;let n=t.createInside.element("br");if(o.Dom.before(e,n),!o.Dom.findNotEmptySibling(n,!1)){let t=n.cloneNode();o.Dom.after(n,t),o.Dom.before(t,e)}let s=n.cloneNode();return o.Dom.before(e,s),(0,r.scrollIntoViewIfNeeded)(s,t.editor,t.ed),o.Dom.safeRemove(s),!0}return!1}function a(e){if(!e)return!1;let t=o.Dom.findSibling(e,!0);return!!t&&!!o.Dom.isTag(t,"br")&&t}},8524:function(e,t,i){"use strict";i.d(t,{checkUnsplittableBox:function(){return o}});var n=i(23211);function o(e,t,i){return!!n.Dom.canSplitBlock(i)||(n.Dom.before(e,t.createInside.element("br")),!1)}},83376:function(e,t,i){"use strict";i.d(t,{getBlockWrapper:function(){return function e(t,i,r=n.IS_BLOCK){let s=t,a=i.editor;do{if(!s||s===a)break;if(r.test(s.nodeName)){if(o.Dom.isLeaf(s))return s;return e(s.parentNode,i,/^li$/i)||s}s=s.parentNode}while(s&&s!==a)return null}}});var n=i(81937),o=i(23211)},66862:function(e,t,i){"use strict";i.d(t,{hasPreviousBlock:function(){return o}});var n=i(23211);function o(e,t){return!!n.Dom.prev(e,e=>n.Dom.isBlock(e)||n.Dom.isImage(e),t.editor)}},10918:function(e,t,i){"use strict";i.d(t,{checkBR:function(){return n.checkBR},checkUnsplittableBox:function(){return o.checkUnsplittableBox},getBlockWrapper:function(){return r.getBlockWrapper},hasPreviousBlock:function(){return s.hasPreviousBlock},insertParagraph:function(){return a.insertParagraph},moveCursorOutFromSpecialTags:function(){return l.moveCursorOutFromSpecialTags},processEmptyLILeaf:function(){return u.processEmptyLILeaf},splitFragment:function(){return c.splitFragment},wrapText:function(){return d.wrapText}});var n=i(34287),o=i(8524),r=i(83376),s=i(66862),a=i(65710),l=i(47919),u=i(34672),c=i(46303),d=i(52938)},65710:function(e,t,i){"use strict";i.d(t,{insertParagraph:function(){return s}});var n=i(23211),o=i(7909),r=i(60898);function s(e,t,i,s){let a="br"===i.toLowerCase(),{createInside:l}=t,u=l.element(i),c=l.element("br");return a||n.Dom.append(u,c),s&&s.cssText&&(0,o.attr)(u,"style",s.cssText),n.Dom.after(e,u),n.Dom.before(a?u:c,e),(0,r.scrollIntoViewIfNeeded)(u,t.editor,t.ed),u}},47919:function(e,t,i){"use strict";i.d(t,{moveCursorOutFromSpecialTags:function(){return o}});var n=i(23211);function o(e,t,i){let{s:o}=e,r=n.Dom.closest(t,i,e.editor);if(r){if(o.cursorOnTheRight(r,t))n.Dom.after(r,t);else{if(!o.cursorOnTheLeft(r,t))return;n.Dom.before(r,t)}let e=o.createRange();e.setStartBefore(t),o.selectRange(e)}}},34672:function(e,t,i){"use strict";i.d(t,{processEmptyLILeaf:function(){return s}});var n=i(23211),o=i(28723),r=i(65710);function s(e,t,i){let s=n.Dom.closest(i,["ol","ul"],t.editor);if(!s)return;let a=s.parentElement,l=n.Dom.isLeaf(a),u=l?a:s,c=t.s.createRange();c.setStartAfter(i),c.setEndAfter(s);let d=c.extractContents();n.Dom.after(u,e),n.Dom.safeRemove(i),(0,o.$$)("li",s).length||n.Dom.safeRemove(s);let h=(0,r.insertParagraph)(e,t,l?"li":t.o.enter);n.Dom.first(d,e=>n.Dom.isTag(e,"li"))&&(l?n.Dom.append(h,d):n.Dom.after(h,d))}},46303:function(e,t,i){"use strict";i.d(t,{splitFragment:function(){return s}});var n=i(23211),o=i(60898),r=i(65710);function s(e,t,i){let s=t.s,{enter:a}=t.o,l=a.toLowerCase(),u=n.Dom.isLeaf(i),c=i.tagName.toLowerCase()===l||u,d=s.cursorOnTheRight(i,e),h=s.cursorOnTheLeft(i,e);if(!c&&(d||h)){d?n.Dom.after(i,e):n.Dom.before(i,e),(0,r.insertParagraph)(e,t,l),h&&!d&&n.Dom.prepend(i,e);return}let{scrollTop:p}=t.editor;s.splitSelection(i,e),t.editor.scrollTop!==p&&(t.editor.scrollTop=p),(0,o.scrollIntoViewIfNeeded)(i,t.editor,t.ed)}},52938:function(e,t,i){"use strict";i.d(t,{wrapText:function(){return o}});var n=i(23211);function o(e,t){let i=e;n.Dom.up(i,e=>{e&&e.hasChildNodes()&&e!==t.editor&&(i=e)},t.editor);let o=n.Dom.wrapInline(i,t.o.enter,t);if(n.Dom.isEmpty(o)){let i=t.createInside.element("br");n.Dom.append(o,i),n.Dom.before(i,e)}return o}},49764:function(e,t,i){"use strict";var n=i(23211),o=i(28077),r=i(7909),s=i(5266),a=i(7042),l=i(15753);function u(e,t,i=""){if(e.s.isCollapsed())return!1;let n=e.s.wrapInTag("a");return!!n.length&&(n.forEach(e=>{(0,r.attr)(e,"href",t),i&&(0,r.attr)(e,"title",i)}),e.s.setCursorAfter(n[n.length-1]),!0)}function c(e){let{baseurl:t}=e;(0,a.getItems)(e).forEach(({file:e})=>{let i=t+e;if(u(this,i))return;let n=this.createInside.element("a",{href:i});n.textContent=this.o.uploader.getDisplayName.call(this.uploader,t,e),this.s.insertNode(n)})}s.Config.prototype.file={defaultHandlerSuccess:c},s.Config.prototype.controls.file={popup(e,t,i){let o=e.s.isCollapsed()?null:e.s.range,s=()=>{o&&e.s.selectRange(o)},d=(t,i="")=>{s(),u(e,t,i)||e.s.insertNode(e.createInside.fromHTML(`<a href="${t}" title="${i}">${i||t}</a>`))},h=null;return t&&(n.Dom.isTag(t,"a")||n.Dom.closest(t,"a",e.editor))&&(h=n.Dom.isTag(t,"a")?t:n.Dom.closest(t,"a",e.editor)),(0,l.FileSelectorWidget)(e,{filebrowser(e){(0,a.getItems)(e).forEach(({file:t})=>d(e.baseurl+t)),i()},upload(t){s(),(e.o.file?.defaultHandlerSuccess??c).call(e,t)},url(e,t){h?((0,r.attr)(h,"href",e),(0,r.attr)(h,"title",t)):d(e,t),i()}},h,i,!1)},tags:["a"],tooltip:"Insert file"},o.pluginSystem.add("file",function(e){e.registerButton({name:"file",group:"media"})})},78690:function(e,t,i){"use strict";var n=i(81937),o=i(27795),r=i(28077),s=i(5266);s.Config.prototype.autofocus=!1,s.Config.prototype.cursorAfterAutofocus="end",s.Config.prototype.saveSelectionOnBlur=!0,r.pluginSystem.add("focus",function(e){if(e.o.saveSelectionOnBlur){let t=!1;e.e.on("blur",()=>{t=!1,e.isEditorMode()&&e.s.save(!0)}).on("mousedown touchstart",()=>{t=!e.editorIsActive}).on("focus",()=>{e.isEditorMode()&&(t?e.s.removeMarkers():e.s.restore()),t=!1})}let t=()=>{e.s.focus();let t=null;switch(e.o.cursorAfterAutofocus){case"start":t=o.Dom.first(e.editor,e=>o.Dom.isText(e));break;case"end":t=o.Dom.last(e.editor,e=>o.Dom.isText(e))}t&&e.s.setCursorIn(t,"start"===e.o.cursorAfterAutofocus)};e.e.on("afterInit",()=>{if(e.o.autofocus)if(e.defaultTimeout){let i="mousedown touchstart keydown",n=()=>{e.async.clearTimeout(o),e.e.off(i,n)},o=e.async.setTimeout(()=>{e.e.off(i,n),t()},300);e.e.on(i,n)}else t()}),e.e.on("afterInit afterAddPlace",()=>{e.e.off(e.editor,"mousedown.autofocus").on(e.editor,"mousedown.autofocus",t=>{e.isEditorMode()&&t.target&&o.Dom.isBlock(t.target)&&!o.Dom.isTag(t.target,n.INSEPARABLE_TAGS)&&!t.target.childNodes.length&&(e.editor===t.target?e.s.focus():e.s.setCursorIn(t.target))})})})},7433:function(e,t,i){"use strict";var n=i(27795),o=i(17312),r=i(4040),s=i(80991),a=i(29434),l=i(5266),u=i(48842),c=i.n(u),d=i(25501),h=i.n(d),p=i(80045);l.Config.prototype.defaultFontSizePoints="px",l.Config.prototype.font={googleFonts:{url:""}},a.Icon.set("font",c()).set("fontsize",h());let m=new WeakSet;l.Config.prototype.controls.fontsize={command:"fontsize",data:{cssRule:"font-size",normalize:e=>e.toString().replace(/(px|pt)$/i,"")},list:[8,9,10,11,12,14,16,18,24,30,32,34,36,48,60,72,96],textTemplate:(e,t)=>t+e.o.defaultFontSizePoints,childTemplate:(e,t,i)=>`${i}${e.o.defaultFontSizePoints}`,tooltip:"Font size",value(e,t){let i=e.s.current(),o=i&&n.Dom.closest(i,n.Dom.isElement,e.editor),r=t.control;if(o)m.add(t);else if("select"!==r.component||m.has(t))return;let a=r.data?.cssRule||"font-size",l=(0,s.css)(o||e.editor,a);if("font-size"===a){let t=parseFloat(l.toString());return"pt"===e.o.defaultFontSizePoints?Math.round(.75*t).toString():Math.round(t).toString()}return l.toString()},isChildActive(e,t){let i=t.state.value,n=t.control.data?.normalize??(e=>e);return!!(i&&t.control.args&&n(t.control.args[0].toString())===n(i.toString()))},isActive(e,t){let i=t.state.value;if(!i)return!1;let n=t.control.data?.normalize??(e=>e),o=t.control.data.cacheListSet;return o||(o=new Set(Object.keys(t.control.list).map(n)),t.control.data.cacheListSet=o),o.has(n(i.toString()))}},l.Config.prototype.controls.font={...l.Config.prototype.controls.fontsize,command:"fontname",textTemplate(e,t){let[i]=t.split(",");return(0,r.trimChars)(i,"\"'")},list:{"":"Default","Arial, Helvetica, sans-serif":"Arial","'Courier New', Courier, monospace":"Courier New","Georgia, Palatino, serif":"Georgia","'Lucida Sans Unicode', 'Lucida Grande', sans-serif":"Lucida Sans Unicode","Tahoma, Geneva, sans-serif":"Tahoma","'Times New Roman', Times, serif":"Times New Roman","'Trebuchet MS', Helvetica, sans-serif":"Trebuchet MS","Helvetica, sans-serif":"Helvetica","Impact, Charcoal, sans-serif":"Impact","Verdana, Geneva, sans-serif":"Verdana"},childTemplate(e,t,i){let n=!1;try{n=-1===t.indexOf("dings")&&document.fonts.check("16px "+t,i)}catch{}return`<span data-style="${t}" style="${n?`font-family: ${t}!important;`:""}">${i}</span>`},popup:(e,t,i,n)=>!!e.o.font.googleFonts.url&&new p.UIFontPicker(e,n,i),data:{cssRule:"font-family",normalize:e=>e.toLowerCase().replace(/['"]+/g,"").replace(/[^a-z0-9-]+/g,",")},value(e,t){let i=e.s.current(),r=i&&n.Dom.closest(i,n.Dom.isElement,e.editor);if(r)m.add(t);else if(m.has(t))return;let a=(0,s.css)(r||e.editor,"font-family").toString(),{list:l}=t.control;return a===(0,s.css)(e.editor,"font-family").toString()&&((0,o.isArray)(l)?l.includes(""):""in(l??{}))?"":a},tooltip:"Font family"}},80045:function(e,t,i){"use strict";i.d(t,{UIFontPicker:function(){return _}});var n=i(25045),o=i(62445),r=i(91672),s=i(68616),a=i(23211),l=i(28077),u=i(17312),c=i(7909),d=i(80991),h=i(71125),p=i(96007),m=i(24939);let f=["h1","h2","h3","h4","h5","h6"],g=new Set(["serif","sans-serif","monospace","cursive","fantasy","system-ui","ui-serif","ui-sans-serif","ui-monospace","ui-rounded"]);class _ extends p.UIElement{className(){return"UIFontPicker"}__render(){let{control:e}=this.__button,{list:t={}}=e,i=(0,u.isArray)(t)?t.map(e=>({value:e.toString(),title:e.toString()})):(0,h.keys)(t,!1).map(e=>({value:e,title:t[e].toString()})),n=Array.from(this.__googleFonts.fonts.values(),e=>({value:this.__googleFonts.value(e),title:e.family,font:e})),o=new Map;[...n,...i].forEach(e=>o.set((0,m.firstFamily)(e.value),e));let r=new Map,s=new Map;this.__themeFonts().forEach(e=>{let t=(0,m.firstFamily)(e),i=e.split(",")[0].replace(/["']/g,"").trim(),n=o.get(t)??(!t||t.startsWith("-")||g.has(t)?void 0:{value:e,title:i});n&&!r.has(t)&&r.set(t,n)}),this.__usedFonts().forEach(e=>{let t=(0,m.firstFamily)(e),i=o.get(t);i&&!r.has(t)&&s.set(t,i)});let l=i.find(e=>""===e.value),c=(0,m.firstFamily)(e.value?.(this.j,this.__button)??"");a.Dom.detach(this.container),this.__fonts.clear(),l&&this.__append(c,[l]),this.__append(c,[...r.values()],"Theme fonts"),this.__append(c,[...s.values()],"Used fonts"),this.__append(c,i.filter(e=>e!==l),"System fonts"),this.__append(c,n,"Google Fonts"),this.__observeGoogleFonts()}__themeFonts(){let{editor:e}=this.j,t=[(0,d.css)(e,"font-family").toString()];return f.forEach(i=>{let n=this.j.createInside.element(i,{style:"display: none"});a.Dom.append(e,n),t.push((0,d.css)(n,"font-family").toString()),a.Dom.safeRemove(n)}),t}__usedFonts(){return Array.from(this.j.editor.querySelectorAll('[style*="font-family"]'),e=>e.style.fontFamily)}__append(e,t,i){if(!t.length)return;let{control:n}=this.__button,o=this.j.c.div(this.getFullElName("group"));if(i){let e=this.j.c.div(this.getFullElName("heading"),{id:`${this.getFullElName("heading")}-${(0,l.uniqueUid)()}`});e.textContent=this.i18n(i),(0,c.attr)(o,{role:"group","aria-labelledby":e.id}),a.Dom.append(o,e)}t.forEach(t=>{let i=this.j.c.element("button",{type:"button",class:this.getFullElName("item"),"data-value":t.value,"aria-pressed":(0,m.firstFamily)(t.value)===e});t.font?(i.textContent=t.title,this.__fonts.set(i,t.font)):i.innerHTML=n.childTemplate?.(this.j,t.value,t.title,this.__button)??t.title,a.Dom.append(o,i)}),a.Dom.append(this.container,o)}__observeGoogleFonts(){this.j.async.requestAnimationFrame(()=>{if(this.__observer?.disconnect(),this.isDestructed||!this.__fonts.size)return;let e=new IntersectionObserver(t=>{let i=[];t.forEach(({isIntersecting:t,target:n})=>{let o=this.__fonts.get(n);t&&o&&(i.push(o),(0,d.css)(n,{fontFamily:this.__googleFonts.value(o)}),e.unobserve(n))}),this.__googleFonts.preview(i)},{root:this.container.parentElement,rootMargin:"0px 0px 400px 0px"});this.__fonts.forEach((t,i)=>e.observe(i)),this.__observer=e})}onMouseDown(e){e.preventDefault()}onClick(e){let t=a.Dom.up(e.target,e=>a.Dom.isHTMLElement(e)&&e.hasAttribute("data-value"),this.container);if(!t)return;let i=(0,c.attr)(t,"data-value")??"",n=this.__googleFonts.find(i),o=(0,m.firstFamily)(i)===(0,m.firstFamily)(this.__blockFont());n&&!o&&this.__googleFonts.load(n),this.j.execCommand("fontname",!1,o?"":i),this.__close()}__blockFont(){let e=a.Dom.up(this.j.s.current(),a.Dom.isBlock,this.j.editor);return(0,d.css)(e??this.j.editor,"font-family").toString()}destruct(){this.__observer?.disconnect(),super.destruct()}constructor(e,t,i){super(e),(0,n._)(this,"__button",void 0),(0,n._)(this,"__close",void 0),(0,n._)(this,"__googleFonts",void 0),(0,n._)(this,"__fonts",void 0),(0,n._)(this,"__observer",void 0),this.__button=t,this.__close=i,this.__fonts=new Map,this.__observer=null,this.__googleFonts=e.getInstance(m.GoogleFonts),this.__render(),this.__googleFonts.fonts.size||this.__googleFonts.ready.then(()=>!this.isDestructed&&this.__render())}}(0,o._)([(0,s.watch)("container:mousedown")],_.prototype,"onMouseDown",null),(0,o._)([(0,s.watch)("container:click")],_.prototype,"onClick",null),_=(0,o._)([r.component],_)},50294:function(e,t,i){"use strict";var n=i(28077),o=i(65946);i(7433);var r=i(24939);n.pluginSystem.add("font",function(e){if(e.registerButton({name:"font",group:"font"}).registerButton({name:"fontsize",group:"font"}),e.o.font.googleFonts.url){let t=e.getInstance(r.GoogleFonts),i=e.async.debounce(()=>t.loadUsed(),e.defaultTimeout);t.ready.then(i),e.e.on("afterInit afterSetMode change",i)}e.e.on("afterInit",()=>{e.iframe&&e.e.on(e.ed,"load",()=>e.e.fire("updateToolbar"),{capture:!0})});let t=(t,i,n)=>{switch(t){case"fontsize":e.s.commitStyle({attributes:{style:{fontSize:(0,o.normalizeSize)(n,e.o.defaultFontSizePoints)}}});break;case"fontname":e.s.commitStyle({attributes:{style:{fontFamily:n}}})}return e.synchronizeValues(),!1};e.registerCommand("fontsize",t).registerCommand("fontname",t)})},24939:function(e,t,i){"use strict";i.d(t,{GoogleFonts:function(){return c},firstFamily:function(){return u}});var n=i(25045),o=i(59609),r=i(23211),s=i(17338);let a={serif:"serif",monospace:"monospace"},l=new Map;function u(e){return e.split(",")[0].replace(/["']/g,"").trim().toLowerCase()}class c extends o.ViewComponent{className(){return"GoogleFonts"}find(e){return this.fonts.get(u(e))}value(e){return`'${e.family}', ${a[e.category]??"sans-serif"}`}load(e){let t=this.__loadedInto(this.j.ed);if(t.has(e.family))return;t.add(e.family);let i=[["regular","0,400"],["700","0,700"],["italic","1,400"],["700italic","1,700"]].filter(([t])=>e.variants.includes(t)).map(([,e])=>e);this.__append(this.j.ed,`family=${this.__family(e)}:ital,wght@${i.join(";")}`)}loadUsed(){this.j.editor.querySelectorAll('[style*="font-family"]').forEach(e=>{let t=this.find(e.style.fontFamily);t&&this.load(t)})}preview(e){let t=this.__loadedInto(this.j.od);if(!(e=e.filter(e=>!this.__previewed.has(e.family)&&!t.has(e.family))).length)return;e.forEach(e=>this.__previewed.add(e.family));let i=e.map(e=>"family="+this.__family(e)),n=new Set(e.map(e=>e.family).join(""));this.__append(this.j.od,`${i.join("&")}&text=${encodeURIComponent([...n].join(""))}`)}__loadedInto(e){let t=this.__loaded.get(e)??new Set;return this.__loaded.set(e,t),t}__family(e){return encodeURIComponent(e.family).replace(/%20/g,"+")}__append(e,t){let i=e.createElement("link");i.rel="stylesheet",i.href=`https://fonts.googleapis.com/css2?${t}&display=swap`,e.head.appendChild(i),this.__links.push(i)}destruct(){this.__links.forEach(e=>r.Dom.safeRemove(e)),super.destruct()}constructor(e){super(e),(0,n._)(this,"fonts",new Map),(0,n._)(this,"ready",void 0),(0,n._)(this,"__links",[]),(0,n._)(this,"__loaded",new WeakMap),(0,n._)(this,"__previewed",new Set),this.ready=(function(e,t){let i=l.get(t);if(!i){let n=new s.Ajax({url:t,method:"GET"},e.o.defaultAjaxOptions);i=n.send().then(e=>e.json()).then(({items:e})=>e.filter(e=>e.variants.includes("regular"))).catch(()=>(l.delete(t),[])).finally(()=>n.destruct()),l.set(t,i)}return i})(e,e.o.font.googleFonts.url).then(e=>{e.forEach(e=>this.fonts.set(e.family.toLowerCase(),e))})}}},96863:function(e,t,i){"use strict";var n=i(23211),o=i(62101),r=i(29434),s=i(5266),a=i(50995),l=i(29348),u=i.n(l);r.Icon.set("paragraph",u()),s.Config.prototype.formatBlock={previewProperties:[]},s.Config.prototype.controls.paragraph={command:"formatBlock",value(e,t){let i=t.control,o=e.s.current(),r=n.Dom.closest(o,n.Dom.isBlock,e.editor);return r?.nodeName.toLowerCase()??i.data?.currentValue},update(e,t){let i=t.control;if(!e.s.current())return!1;let n=t.state.value,r=i.list;return(0,o.isPlainObject)(r)&&r[n.toString()]&&e.o.textIcons&&(t.state.text=r[n.toString()].toString()),!1},data:{currentValue:"p"},list:{p:"Paragraph",h1:"Heading 1",h2:"Heading 2",h3:"Heading 3",h4:"Heading 4",blockquote:"Quote",pre:"Code"},isChildActive:(e,t)=>t.state.value===t.control?.args?.[0],isActive:(e,t)=>t.state.value!==e.o.enter&&(0,o.isPlainObject)(t.control.list)&&!!t.control.list[t.state.value],childTemplate:(e,t,i)=>`<${t} style="margin:0;padding:0${function(e,t){let{previewProperties:i}=e.o.formatBlock;if(!i.length)return"";let o=e.createInside.element(t,{style:"display: none"});n.Dom.append(e.editor,o);let r=e.ew.getComputedStyle(o),s=parseFloat(r.fontSize)||16,l=i.map(t=>{let i=r.getPropertyValue(t);return i&&"font-family"===t&&(i=(0,a.withContentFonts)(e,i)),i?`;${t}:${i.replace(/(-?[\d.]+)px/g,(e,t)=>`${parseFloat(t)/s}em`).replace(/"/g,"'")}`:""}).join("");return n.Dom.safeRemove(o),l}(e,t)}"><span>${e.i18n(i)}</span></${t}>`,tooltip:"Insert format block"}},50995:function(e,t,i){"use strict";i.d(t,{withContentFonts:function(){return s}});let n=new WeakMap,o=new Map,r=0;function s(e,t){let{ed:i,od:o}=e;if(i===o)return t;let s=function(e){let t=n.get(e);if(!t){let{od:i}=e,o={prefix:`jodit-preview-${++r}-`,faces:new Map,pending:!1};n.set(e,o),e.e.on("beforeDestruct",()=>o.faces.forEach(e=>i.fonts.delete(e))),t=o}return t}(e);!function(e,t){if(t.pending)return;t.pending=!0;let{ed:i,od:n}=e;Promise.all(Array.from(i.styleSheets,e=>a(e,i.baseURI))).then(i=>{t.pending=!1,e.isInDestruct||i.flat().forEach(e=>{let i=JSON.stringify(e);if(!t.faces.has(i)){let o=new FontFace(t.prefix+e.family,e.source,e.descriptors);n.fonts.add(o),t.faces.set(i,o)}})})}(e,s);let l=new Set;return i.fonts.forEach(e=>l.add(u(e.family))),t.split(",").map(e=>{let t=u(e);return l.has(t)?`"${s.prefix}${t}", ${e.trim()}`:e.trim()}).join(", ")}function a(e,t){let i;try{i=e.cssRules}catch{let{href:t}=e;if(!t)return Promise.resolve([]);let i=o.get(t);return i||(i=fetch(t).then(e=>e.text()).then(e=>{let i=document.implementation.createHTMLDocument(""),n=i.createElement("style");return n.textContent=e,i.head.appendChild(n),n.sheet?l(n.sheet.cssRules,t):[]}).catch(()=>[]),o.set(t,i)),i}return l(i,e.href??t)}function l(e,t){return Promise.all(Array.from(e,e=>{var i;let n;if("styleSheet"in e){let{styleSheet:i}=e;return i?a(i,t):[]}return"cssRules"in e?l(e.cssRules,t):e.cssText.startsWith("@font-face")?[(n=t=>e.style.getPropertyValue(t)||void 0,{family:u(e.style.getPropertyValue("font-family")),source:(i=e.style.getPropertyValue("src"),i.replace(/url\(\s*(["']?)(.*?)\1\s*\)/g,(e,i,n)=>{try{return`url("${new URL(n,t).href}")`}catch{return e}})),descriptors:{style:n("font-style"),weight:n("font-weight"),stretch:n("font-stretch"),unicodeRange:n("unicode-range")}})]:[]})).then(e=>e.flat())}function u(e){return e.replace(/["']/g,"").trim().toLowerCase()}},53390:function(e,t,i){"use strict";var n=i(28077);i(96863),n.pluginSystem.add("formatBlock",function(e){e.registerButton({name:"paragraph",group:"font"}),e.registerCommand("formatblock",(t,i,n)=>(e.s.commitStyle({element:n}),e.synchronizeValues(),!1))})},80538:function(e,t,i){"use strict";var n=i(81937),o=i(29434),r=i(5266),s=i(24772),a=i.n(s),l=i(66547),u=i.n(l);r.Config.prototype.fullsize=!1,r.Config.prototype.globalFullSize=!0,o.Icon.set("fullsize",a()).set("shrink",u()),r.Config.prototype.controls.fullsize={exec(e){e.toggleFullSize()},isActive:e=>e.isFullSize,update(e,t){let i=e.isFullSize?"shrink":"fullsize";t.state.activated=e.isFullSize,e.o.textIcons?t.state.text=i:t.state.icon.name=i},tooltip:"Open in fullsize",mode:n.MODE_SOURCE+n.MODE_WYSIWYG}},69696:function(e,t,i){"use strict";var n=i(23211),o=i(28077),r=i(24497),s=i(80991);i(80538);let a=new Set;o.pluginSystem.add("fullsize",function(e){e.registerButton({name:"fullsize"});let t=!1,i=0,o=0,l=0,u=0,c=!1,d=()=>{let{container:n,events:r}=e;r&&(t?(c||(i=(0,s.css)(n,"height",!0),o=(0,s.css)(n,"width",!0),c=!0),(0,s.css)(n,{height:e.ow.innerHeight,width:e.ow.innerWidth})):c&&((0,s.css)(n,{height:i||"auto",width:o||"auto"}),c=!1))},h=i=>{let{container:o,events:c}=e;if(o){if(void 0===i&&(i=!o.classList.contains("jodit_fullsize")),e.setMod("fullsize",i),e.o.fullsize=i,t=i,o.classList.toggle("jodit_fullsize",i),e.toolbar&&((0,r.isJoditObject)(e)&&e.toolbarContainer&&n.Dom.append(e.toolbarContainer,e.toolbar.container),(0,s.css)(e.toolbar.container,"width","auto")),i?a.add(o):a.delete(o),e.o.globalFullSize&&(1===a.size&&i||0===a.size&&!i)){i&&(l=e.ow.scrollX,u=e.ow.scrollY);let t=o.parentNode;for(;t&&t.nodeType!==Node.DOCUMENT_NODE&&t.nodeType!==Node.DOCUMENT_FRAGMENT_NODE;)t.classList.toggle("jodit_fullsize-box_true",i),t=t.parentNode;d(),i||e.ow.scrollTo(l,u)}c.fire("afterResize")}};e.o.globalFullSize&&e.e.on(e.ow,"resize",d),e.e.on("afterInit afterOpen",()=>{e.toggleFullSize(e?.options?.fullsize)}).on("toggleFullSize",h).on("beforeDestruct",()=>{t&&h(!1)}).on("beforeDestruct",()=>{e.events&&e.e.off(e.ow,"resize",d)})})},14907:function(e,t,i){"use strict";i(5266).Config.prototype.commandToHotkeys={removeFormat:["ctrl+shift+m","cmd+shift+m"],insertOrderedList:["ctrl+shift+7","cmd+shift+7"],insertUnorderedList:["ctrl+shift+8","cmd+shift+8"],selectall:["ctrl+a","cmd+a"]}},50982:function(e,t,i){"use strict";var n=i(25045),o=i(81937),r=i(28077),s=i(65946),a=i(91206);i(14907);class l extends a.Plugin{afterInit(e){(0,s.keys)(e.o.commandToHotkeys,!1).forEach(t=>{let i=e.o.commandToHotkeys[t];i&&((0,s.isArray)(i)||(0,s.isString)(i))&&e.registerHotkeyToCommand(i,t)});let t=!1;e.e.off(".hotkeys").on([e.ow,e.ew],"keydown.hotkeys",e=>{if(e.key===o.KEY_ESC)return this.j.e.fire("escape",e)}).on("keydown.hotkeys",i=>{let n=this.onKeyPress(i),o={shouldStop:!0};if(!1===this.j.e.fire(n+".hotkey",i.type,o))if(o.shouldStop)return t=!0,e.e.stopPropagation("keydown"),!1;else i.preventDefault()},{top:!0}).on("keyup.hotkeys",()=>{if(t)return t=!1,e.e.stopPropagation("keyup"),!1},{top:!0})}beforeDestruct(e){e.events&&e.e.off(".hotkeys")}constructor(...e){super(...e),(0,n._)(this,"onKeyPress",e=>{let t=this.specialKeys[e.which],i=(e.key||String.fromCharCode(e.which)).toLowerCase(),n=[t||i];return["alt","ctrl","shift","meta"].forEach(i=>{e[i+"Key"]&&t!==i&&n.push(i)}),(0,s.normalizeKeyAliases)(n.join("+"))}),(0,n._)(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",48:"0",49:"1",50:"2",51:"3",52:"4",53:"5",54:"6",55:"7",56:"8",57:"9",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:"'"})}}r.pluginSystem.add("hotkeys",l)},2952:function(e,t,i){"use strict";var n=i(27795),o=i(28077),r=i(29434),s=i(5266),a=i(89097),l=i.n(a);r.Icon.set("hr",l()),s.Config.prototype.controls.hr={command:"insertHorizontalRule",tooltip:"Insert Horizontal Line"},o.pluginSystem.add("hr",function(e){e.registerButton({name:"hr",group:"insert"}),e.registerCommand("insertHorizontalRule",()=>{let t=e.createInside.element("hr");e.s.insertNode(t,!1,!1);let i=n.Dom.closest(t.parentElement,n.Dom.isBlock,e.editor);i&&n.Dom.isEmpty(i)&&i!==e.editor&&!e.o.dtd?.blockLimits[i.nodeName.toLowerCase()]&&(n.Dom.after(i,t),n.Dom.safeRemove(i));let o=n.Dom.findNotEmptySibling(t,!1);if(n.Dom.isBlock(o))return e.s.setCursorIn(o,!0),!1;if(o||t.parentNode!==e.editor&&!n.Dom.isBlock(n.Dom.findNotEmptySibling(t,!0)))return e.s.setCursorAfter(t),!1;let r=e.createInside.element(e.o.enter);return n.Dom.isTag(r,"br")||n.Dom.append(r,e.createInside.element("br")),n.Dom.after(t,r),e.s.setCursorIn(r),!1})})},17326:function(e,t,i){"use strict";var n=i(5266);n.Config.prototype.iframeBaseUrl="",n.Config.prototype.iframeTitle="Jodit Editor",n.Config.prototype.iframeDoctype="<!DOCTYPE html>",n.Config.prototype.iframeDefaultSrc="about:blank",n.Config.prototype.iframeStyle="html{margin:0;padding:0;min-height: 100%;}body{box-sizing:border-box;font-size:13px;line-height:1.6;padding:10px;margin:0;background:transparent;color:#000;position:relative;z-index:2;user-select:auto;margin:0px;overflow:auto;outline:none;}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}p{margin-top: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}",n.Config.prototype.iframeCSSLinks=[],n.Config.prototype.iframeSandbox=null},81144:function(e,t,i){"use strict";var n=i(81937),o=i(23211),r=i(28077),s=i(65946),a=i(81910);i(17326),r.pluginSystem.add("iframe",function(e){let t=e.options;e.e.on("afterSetMode",()=>{e.isEditorMode()&&e.s.focus()}).on("generateDocumentStructure.iframe",(e,i)=>{let n=e||i.iframe.contentWindow.document;if(n.open(),n.write(t.iframeDoctype+`<html dir="${t.direction}" class="jodit" lang="${(0,s.defaultLanguage)(t.language)}">`+"<head>"+`<title>${t.iframeTitle}</title>`+(t.iframeBaseUrl?`<base href="${t.iframeBaseUrl}"/>`:"")+'</head><body class="jodit-wysiwyg"></body></html>'),n.close(),t.iframeCSSLinks&&t.iframeCSSLinks.forEach(e=>{let t=n.createElement("link");(0,s.attr)(t,"rel","stylesheet"),(0,s.attr)(t,"href",e),n.head&&o.Dom.append(n.head,t),i.e.on(t,"load",()=>i.e.fire("resize"))}),t.iframeStyle){let e=n.createElement("style");e.innerHTML=t.iframeStyle,n.head&&o.Dom.append(n.head,e)}}).on("createEditor",()=>{if(!t.iframe)return;let i=e.c.element("iframe");(0,s.css)(i,"display","block"),i.src="about:blank",i.className="jodit-wysiwyg_iframe",(0,s.attr)(i,{allowtransparency:"true",tabindex:t.tabIndex.toString(),frameborder:"0"}),null!=t.iframeSandbox&&(0,s.attr)(i,"sandbox",t.iframeSandbox),o.Dom.append(e.workplace,i),e.iframe=i;let r=e.e.fire("generateDocumentStructure.iframe",null,e);return(0,s.callPromise)(r,()=>{if(!e.iframe)return!1;let i=e.iframe.contentWindow.document;e.editorWindow=e.iframe.contentWindow;let r=t.editHTMLDocumentMode,l=()=>{(0,s.attr)(i.body,"contenteditable",e.getMode()!==n.MODE_SOURCE&&!e.getReadOnly()||null)},u=(e,t)=>{for(;t>0&&/\s/.test(e.charAt(t-1));)t-=1;return t},c=e=>{e=(0,a.removeBetween)(e,"<style",">","</style>","jodit-box");let t=(0,a.indexOfOpenTag)(e,"body"),i=-1;for(let n=(0,a.indexOfClosingTag)(e,"body",t+1);-1!==n;n=(0,a.indexOfClosingTag)(e,"body",n+1))i=n;if(-1!==t&&-1!==i){let n=i+7,o=e.indexOf(">",t),r=e.slice(t,n);for(let s of(-1!==o&&o<i&&(r=(e=>{e=e.replace(/min-height["'\s]*:[\s"']*[0-9]+(px|%)/i,"");let t=(t,i)=>{for(;i.test(e.charAt(t));)t+=1;return t},i=e.indexOf("contenteditable");for(;-1!==i;){let n=t(i+15,/["'\s]/);if("="===e.charAt(n)&&(n=t(n+1,/[\s"']/),e.startsWith("true",n))){n=t(n+4,/["']/);let o=i;return/["']/.test(e.charAt(o-1))&&(o-=1),o=u(e,o),e.slice(0,o)+e.slice(n)}i=e.indexOf("contenteditable",i+1)}return e})(e.slice(t,o))+e.slice(o,n)),["style","script","span"]))r=(0,a.removeBetween)(r,"<"+s,">","</"+s+">","jodit");let s=e=>(0,a.removeBetween)((0,a.removeBetween)(e,"<span",">","</span>"),"&lt;span","&gt;","&lt;/span&gt;");e=(s(e.slice(0,t))+r+s(e.slice(n))).replace(/(class\s*=\s*)(['"])([^"']*)(jodit-wysiwyg|jodit)([^"']*\2)/g,"$1$2$3$5").replace(/(<[^<]+?)\sclass="[\s]*"/gim,"$1").replace(/(<[^<]+?)\sstyle="[\s;]*"/gim,"$1").replace(/(<[^<]+?)\sdir="[\s]*"/gim,"$1")}return e};if(r){let t=e.element.tagName;if("TEXTAREA"!==t&&"INPUT"!==t)throw(0,s.error)("If enable `editHTMLDocumentMode` - source element should be INPUT or TEXTAREA");e.e.on("beforeGetNativeEditorValue",()=>c(e.o.iframeDoctype+i.documentElement.outerHTML)).on("beforeSetNativeEditorValue",({value:t})=>{if(e.isLocked)return!1;if(/<(html|body)/i.test(t)){if(c(i.documentElement.outerHTML)!==c(t)){var n;let r,a;n=c(t),r=new DOMParser().parseFromString(n,"text/html"),e.e.fire("safeHTML",r.documentElement),a=(0,s.$$)("style.jodit-box",i.head),i.replaceChild(i.adoptNode(r.documentElement),i.documentElement),a.forEach(e=>o.Dom.append(i.head,e)),e.editor=i.body,l(),e.e.fire("prepareWYSIWYGEditor"),e.e.stopPropagation("beforeSetNativeEditorValue")}return!0}return!1},{top:!0})}if(e.editor=i.body,e.e.on("afterSetMode afterInit afterAddPlace",l),"auto"===t.height){i.documentElement&&(0,s.css)(i.documentElement,"overflowY","hidden");let n=e.async.throttle((...i)=>{e.async.requestAnimationFrame(()=>{if(e.editor&&e.iframe&&"auto"===t.height){let t=e.ew.getComputedStyle(e.editor),i=parseInt(t.marginTop||"0",10)+parseInt(t.marginBottom||"0",10);(0,s.css)(e.iframe,"height",e.editor.offsetHeight+i)}})},e.defaultTimeout/2);if(e.e.on("change afterInit afterSetMode resize",n).on([e.iframe,e.ew,i.documentElement],"load",n).on(i,"readystatechange DOMContentLoaded",n),"function"==typeof ResizeObserver){let t=new ResizeObserver(n);t.observe(i.body),e.e.on("beforeDestruct",()=>{t.disconnect()})}}return i.documentElement&&e.e.on(i.documentElement,"mousedown touchend",()=>{e.s.isFocused()||(e.s.focus(),e.editor===i.body&&e.s.setCursorIn(i.body))}).on(e.ew,"mousedown touchstart keydown keyup touchend click mouseup mousemove scroll",t=>{e.events?.fire(e.ow,t)}),!1})})})},61396:function(e,t,i){"use strict";i(5266).Config.prototype.imageCaption={wrapper:{tag:"figure",className:""},inner:null,caption:{tag:"figcaption",className:""}}},43058:function(e,t,i){"use strict";var n=i(25045),o=i(62445),r=i(81937),s=i(84839),a=i(23211),l=i(28077),u=i(65946),c=i(80991),d=i(18855),h=i(42259);i(61396);let p=["margin-top","margin-right","margin-bottom","margin-left"],m=new Set([r.KEY_UP,r.KEY_DOWN,r.KEY_LEFT,r.KEY_RIGHT]),f=/^(P|H[1-6]|PRE)$/i,g=new Set(["formatblock","insertorderedlist","insertunorderedlist"]),_="data-jodit-placeholder",v=`:where(.jodit-wysiwyg [contenteditable=false] [contenteditable=true]:focus){outline:1px solid var(--jd-color-border-selected,#1e88e5)}:where(.jodit-wysiwyg [${_}]){position:relative}:where(.jodit-wysiwyg [${_}])::before{position:absolute;top:0;right:0;left:0;padding:inherit;color:var(--jd-color-placeholder,#a5a5a5);content:attr(${_});pointer-events:none}`;class b extends d.Plugin{afterInit(e){(0,l.getContainer)(e,"imageCaption","style",!0).textContent=v,e.e.on("beforeCommandSelectall",this.__onSelectAll,{top:!0}),this.onChangePlace()}onToggleImageCaption(e,t){let i=(0,u.getCaptionWrapper)(this.j,e);if(i&&!0!==t){let t=this.__freshCaption(i);return t?this.__unrecorded(()=>this.__restore(t)):this.__uncaption(i,e),null}if(!i&&!1!==t)return this.__caption(e)}__freshCaption(e){let t=this.__fresh;return t&&t.wrapper===e&&e.parentNode===t.parent&&e.previousSibling===t.previous&&e.nextSibling===t.next&&y(e,t.image)===t.shape&&(0,u.getImageCaption)(this.j,e)===t.caption&&a.Dom.isEmpty(t.caption)?t:null}__caption(e){let t,{j:i}=this,{snapshot:n}=i.history;i.setEditorValue(),i.e.fire("internalUpdate");let o=n.make();return n.transaction(()=>{t=this.__fresh={...this.__wrap(e),before:o},i.setEditorValue()}),i.e.fire("updateToolbar"),t.caption}__unrecorded(e){let{j:t}=this;t.setEditorValue(),this.__fresh=null,t.history.snapshot.transaction(()=>{e(),t.setEditorValue()}),t.e.fire("internalUpdate"),t.e.fire("updateToolbar")}__wrap(e){var t;let{j:i}=this,{wrapper:n,inner:o,caption:r}=i.o.imageCaption,s=a.Dom.closest(e,"a",i.editor),l=s&&!s.textContent?.trim()&&1===s.getElementsByTagName("img").length?s:e,d=[(0,u.attr)(e,"style"),(0,u.attr)(e,"class")],h=l.parentNode,p=(0,c.cssInline)(e,"width")||((t=(0,u.attr)(e,"width"))?(0,u.isNumeric)(t)?`${t}px`:t:"")||(e.offsetWidth?`${e.offsetWidth}px`:""),m=(0,u.getAlignClasses)(i,e),f=(0,u.getHAlign)(e,m);(0,u.clearHAlign)(e,m);let g=this.__create(n),_=o?this.__create(o):g,v=this.__create(r);v.appendChild(i.createInside.element("br"));let b=this.__insert(g,l);return _!==g&&a.Dom.append(g,_),a.Dom.append(_,[l,v]),w(e,g),p&&((0,u.css)(g,"width",p),(0,u.css)(e,"width","100%")),(0,u.hAlignElement)(g,f,(0,u.getAlignClasses)(i,g)),this.__mark(g),{caption:v,wrapper:g,image:e,target:l,place:h,split:b,attributes:d,parent:g.parentNode,previous:g.previousSibling,next:g.nextSibling,shape:y(g,e)}}__restore(e){let{wrapper:t,image:i,target:n,place:o,split:r,attributes:s}=e;if(r)if(r.head||r.tail){let{sel:e}=this.j.s,t=e?.rangeCount?e.getRangeAt(0).startContainer:null,{head:i,tail:o}=r;if(i&&!(o&&t&&a.Dom.isOrContains(o,t)))a.Dom.append(i,[n,...(0,u.toArray)(o?.childNodes??[])]),a.Dom.safeRemove(o);else if(o){let e=o.firstChild;[...(0,u.toArray)(i?.childNodes??[]),n].forEach(t=>o.insertBefore(t,e)),a.Dom.safeRemove(i)}}else a.Dom.append(o,n),a.Dom.before(t,r.block);else a.Dom.before(t,n);a.Dom.safeRemove(t),(0,u.attr)(i,{style:s[0],class:s[1]})}__uncaption(e,t){let{j:i}=this,n=(0,u.getHAlign)(e,(0,u.getAlignClasses)(i,e)),o=(0,c.cssInline)(e,"width");a.Dom.safeRemove((0,u.getImageCaption)(i,e));let s=a.Dom.closest(t,"a",e)??t;if(w(e,t),o&&(0,u.css)(t,"width",o),(0,u.hAlignElement)(t,n,(0,u.getAlignClasses)(i,t)),a.Dom.isBlock(e)&&e.parentNode===i.editor&&i.o.enter.toLowerCase()!==r.BR){let t=i.createInside.element(i.o.enter);a.Dom.before(e,t),a.Dom.append(t,s)}else a.Dom.before(e,s);a.Dom.safeRemove(e)}__create({tag:e,className:t}){return this.j.createInside.element(e,t?{class:t}:{})}__insert(e,t){let{j:i}=this,n=a.Dom.isBlock(e)?a.Dom.closest(t,a.Dom.isBlock,i.editor):null;if(!n||!f.test(n.nodeName))return a.Dom.before(t,e),null;let o=i.ed.createRange();o.setStartBefore(n),o.setEndBefore(t);let r=o.extractContents();o.setStartAfter(t),o.setEndAfter(n);let[s,l]=[r,o.extractContents()].map((e,t)=>{let i=e.firstChild;return!i||a.Dom.isEmpty(i)?null:((0,u.call)(t?a.Dom.after:a.Dom.before,n,i),i)});return a.Dom.before(n,e),a.Dom.safeRemove(n),{block:n,head:s,tail:l}}__mark(e){(0,u.attr)(e,"contenteditable",!1);let t=(0,u.getImageCaption)(this.j,e);t&&((0,u.attr)(t,"contenteditable",!0),this.__placeholder(t))}__placeholder(e){let t=a.Dom.isEmpty(e)?this.j.i18n("Caption"):null;(0,u.attr)(e,_)!==t&&(0,u.attr)(e,_,t)}onChange(){let{j:e}=this;e.isInDestruct||e.getMode()===r.MODE_SOURCE||(0,u.toArray)(e.editor.getElementsByTagName(e.o.imageCaption.wrapper.tag)).forEach(t=>{a.Dom.isHTMLElement(t)&&(0,u.getCaptionedImage)(e,t)&&this.__mark(t)})}onInput(){let e=this.__caretCaption();e&&this.__placeholder(e)}onAfterGetValueFromEditor(e){if(!e.value.includes("contenteditable"))return;let{j:t}=this,i=t.c.element("template");i.innerHTML=e.value;let n=e=>(0,u.toArray)(e.querySelectorAll(t.o.imageCaption.wrapper.tag)).filter(e=>(0,u.getCaptionedImage)(t,e)),o=n(i.content),r=this.__fresh&&this.__freshCaption(this.__fresh.wrapper),s=r&&o[n(t.editor).indexOf(r.wrapper)],l=r&&s&&function(e,t,i){let n=(0,u.getCaptionedImage)(e,i),{split:o}=t;if(!n)return null;let r={wrapper:i,image:n,target:a.Dom.closest(n,"a",i)??n,place:t.place,split:null,attributes:t.attributes};if(o){let e=o.head?i.previousSibling:null,n=o.tail?i.nextSibling:null;if(o.head&&!a.Dom.isHTMLElement(e)||o.tail&&!a.Dom.isHTMLElement(n))return null;let s=o.block.cloneNode(!0);r.split={block:s,head:e,tail:n},r.place=function(e,t,i){let n=[];for(let i=t;i!==e&&i.parentNode;i=i.parentNode)n.unshift((0,u.toArray)(i.parentNode.childNodes).indexOf(i));return n.reduce((e,t)=>e.childNodes[t],i)}(o.block,t.place,s)}return r}(t,r,s),c=!1;l&&(this.__restore(l),c=!0),o.forEach(e=>{[e,(0,u.getImageCaption)(t,e)].forEach(e=>["contenteditable",_].forEach(t=>{e?.hasAttribute(t)&&(e.removeAttribute(t),c=!0)}))}),c&&(e.value=i.innerHTML)}onChangePlace(){let{j:e}=this;e.e.off([e.editor,e.ow,e.ew],".imageCaption").on(e.editor,"focusout.imageCaption",this.__onFocusOut,{capture:!0}).on(e.editor,"mousedown.imageCaption",this.__onMouseDown,{capture:!0}).on([e.ow,e.ew],"mouseup.imageCaption",this.__onMouseUp)}__onMouseDown(e){this.__press=e.target}__onFocusOut(e){let t=e.target;(0,u.getImageCaption)(this.j,(0,u.getCaptionWrapper)(this.j,t))===t&&(this.__press?this.__afterPress.push(t):this.__dropBlank(t,null))}__onMouseUp(){let e=this.__press;this.__press=null,this.__afterPress.splice(0).forEach(t=>this.__dropBlank(t,e))}__dropBlank(e,t){this.j.async.setTimeout(()=>{let{j:i}=this,n=(0,u.getCaptionWrapper)(i,e),o=(0,u.getCaptionedImage)(i,n);if(!n||!o||!a.Dom.isEmpty(e)||this.__keepsFocus(e))return;let r=!!(t&&a.Dom.isOrContains(n,t)),s=this.__freshCaption(n);this.__unrecorded(()=>s?this.__restore(s):this.__uncaption(n,o)),r&&i.e.fire("recalcPositionPopup")},1)}__keepsFocus(e){let{j:t}=this,i=e.ownerDocument;if(i.activeElement===e&&(i.hasFocus()||!t.od.hasFocus()))return!0;let n=t.od.activeElement;return!!(n&&n!==t.iframe&&!a.Dom.isOrContains(t.editor,n)&&(a.Dom.isOrContains(t.container,n)||a.Dom.closest(n,e=>a.Dom.isElement(e)&&(0,u.attr)(e,"data-editor_id")===t.id,t.od.body)))}__caretCaption(){let{s:e}=this.j;if(!e.isInsideArea)return null;let t=e.range.startContainer,i=(0,u.getImageCaption)(this.j,(0,u.getCaptionWrapper)(this.j,t));return i&&a.Dom.isOrContains(i,t)?i:null}onBeforeEnter(e){let t=e?.shiftKey?null:this.__caretCaption(),i=(0,u.getCaptionWrapper)(this.j,t);if(!i)return;let{j:n}=this;if(this.__focusEditor(),!a.Dom.isBlock(i))return void n.s.setCursorAfter(i);let o=this.__line();return a.Dom.after(i,o),n.s.setCursorIn(o),n.synchronizeValues(),!1}__focusEditor(){this.j.editor.focus({preventScroll:!0})}__line(){let{j:e}=this,t=e.createInside.element(e.o.enter);return a.Dom.isTag(t,"br")||a.Dom.append(t,e.createInside.element("br")),t}onBeforeInsertNode(e){let t=(0,u.getCaptionWrapper)(this.j,this.__caretCaption());if(!t||!((a.Dom.isElement(e)||a.Dom.isFragment(e))&&[e,...(0,u.toArray)(e.querySelectorAll("*"))].some(e=>a.Dom.isElement(e)&&(a.Dom.isBlock(e)||r.NO_EMPTY_TAGS.has(e.nodeName.toLowerCase())))))return;let{j:i}=this;if(this.__focusEditor(),!a.Dom.isBlock(t))return void i.s.setCursorAfter(t);let n=this.__line();a.Dom.after(t,n),i.s.setCursorIn(n)}onBeforeCommandDelete(){let e=this.__selectedWrapper();if(!e||!a.Dom.isBlock(e))return;let t=this.__line();return a.Dom.before(e,t),a.Dom.safeRemove(e),this.j.s.setCursorIn(t),!1}__selectedWrapper(){let{s:e}=this.j;if(!e.isInsideArea||e.isCollapsed())return null;let{startContainer:t,startOffset:i,endContainer:n,endOffset:o}=e.range,r=t.childNodes[i];return t===n&&o===i+1&&(0,u.getCaptionedImage)(this.j,r)?r:null}onKeyDown(e){if(this.__arrow=null,e.key?.length===1&&!e.ctrlKey&&!e.metaKey&&this.__selectedWrapper())return void this.j.execCommand("Delete");if(!m.has(e.key)||e.shiftKey||e.altKey||e.ctrlKey||e.metaKey||!this.j.s.isCollapsed())return;let t=this.__caretCaption();t&&(this.__arrow={key:e.key,range:this.j.s.range.cloneRange(),caption:t})}onKeyUp(e){let t=this.__arrow;if(this.__arrow=null,!t||e.key!==t.key||(0,h.isMoved)(this.j,t.range))return;let i=(0,u.getCaptionWrapper)(this.j,t.caption);if(!i)return;let n=t.key===r.KEY_DOWN||t.key===r.KEY_RIGHT,{s:o}=this.j;if(this.__focusEditor(),!a.Dom.isBlock(i))return void(n?o.setCursorAfter(i):o.setCursorBefore(i));let s=a.Dom.findNotEmptySibling(i,!n);if(a.Dom.isHTMLElement(s))return void o.setCursorIn(s,n);if(a.Dom.isText(s))return void(n?o.setCursorBefore(s):o.setCursorAfter(s));let l=this.__line();(0,u.call)(n?a.Dom.after:a.Dom.before,i,l),o.setCursorIn(l),this.j.synchronizeValues()}onBeforeCommand(e){let t=e.toLowerCase();if(g.has(t)&&this.__caretCaption())return!1;let i="undo"===t&&this.__fresh?this.__freshCaption(this.__fresh.wrapper):null;if(i)return this.__unrecorded(()=>{this.__restore(i),this.j.history.snapshot.restore(i.before)}),!1}__onSelectAll(){let e=this.__caretCaption();if(e)return this.j.e.stopPropagation("beforeCommandSelectall"),this.j.s.select(e,!0),!1}beforeDestruct(e){e.e.off("beforeCommandSelectall",this.__onSelectAll).off([e.editor,e.ow,e.ew],".imageCaption")}constructor(...e){super(...e),(0,n._)(this,"__fresh",null),(0,n._)(this,"__press",null),(0,n._)(this,"__afterPress",[]),(0,n._)(this,"__arrow",null)}}function y(e,t){return[e,t].flatMap(e=>[(0,u.attr)(e,"style"),(0,u.attr)(e,"class")]).join("|")}function w(e,t){p.forEach(i=>{let n=(0,c.cssInline)(e,i);n&&((0,u.css)(t,i,n),(0,u.css)(e,i,""))}),(0,u.attr)(e,"style")?.trim()||(0,u.attr)(e,"style",null)}(0,o._)([(0,s.watch)(":toggleImageCaption")],b.prototype,"onToggleImageCaption",null),(0,o._)([(0,s.watch)([":change",":afterInit",":afterSetMode",":changePlace"]),(0,s.debounce)()],b.prototype,"onChange",null),(0,o._)([(0,s.watch)([":input",":keyup",":afterPaste"])],b.prototype,"onInput",null),(0,o._)([(0,s.watch)(":afterGetValueFromEditor")],b.prototype,"onAfterGetValueFromEditor",null),(0,o._)([(0,s.watch)(":changePlace")],b.prototype,"onChangePlace",null),(0,o._)([s.autobind],b.prototype,"__onMouseDown",null),(0,o._)([s.autobind],b.prototype,"__onFocusOut",null),(0,o._)([s.autobind],b.prototype,"__onMouseUp",null),(0,o._)([(0,s.watch)(":beforeEnter")],b.prototype,"onBeforeEnter",null),(0,o._)([(0,s.watch)(":beforeInsertNode")],b.prototype,"onBeforeInsertNode",null),(0,o._)([(0,s.watch)(":beforeCommandDelete")],b.prototype,"onBeforeCommandDelete",null),(0,o._)([(0,s.watch)(":keydown")],b.prototype,"onKeyDown",null),(0,o._)([(0,s.watch)(":keyup")],b.prototype,"onKeyUp",null),(0,o._)([(0,s.watch)(":beforeCommand")],b.prototype,"onBeforeCommand",null),(0,o._)([s.autobind],b.prototype,"__onSelectAll",null),l.pluginSystem.add("imageCaption",b)},51034:function(e,t,i){"use strict";i(5266).Config.prototype.imageProcessor={replaceDataURIToBlobIdInView:!0}},39978:function(e,t,i){"use strict";var n=i(62445),o=i(81937),r=i(84839),s=i(23211),a=i(28077),l=i(65946),u=i(91206),c=i(23112);i(51034);let d="__jodit_imageprocessor_binded",h=d+"blob-id",p="jodit-wysiwyg_image-selected",m=new Set(["img","jodit","jodit-media"]);class f extends u.Plugin{afterInit(e){e.e.on(e.ed,"selectionchange",this.onSelectionChange),(0,a.getContainer)(e,"image-processor","style",!0).textContent=`.jodit-wysiwyg.${p}::selection,.jodit-wysiwyg.${p} *:not(img)::selection{background:transparent}`}beforeDestruct(e){e.e.off(e.ed,"selectionchange",this.onSelectionChange),e.editor.classList.remove(p);let t=(0,r.cached)(e,"buffer"),i=t?.get(h);if(t&&i){for(let e of Object.keys(i))URL.revokeObjectURL(e);t.delete(h)}}onAfterGetValueFromEditor(e,t){if(t!==o.SOURCE_CONSUMER)return this.onBeforeSetElementValue(e)}onBeforeSetElementValue(e){let{jodit:t}=this;if(!t.o.imageProcessor.replaceDataURIToBlobIdInView)return;let i=t.buffer.get(h);if(i)for(let t of Object.keys(i))for(;e.value.includes(t);)e.value=e.value.replace(t,i[t])}onSelectionChange(){let{jodit:e}=this;e.editor.classList.toggle(p,function(e){let{sel:t}=e.s;if(!t||!t.rangeCount)return!1;let{startContainer:i,startOffset:n,endContainer:o,endOffset:r}=t.getRangeAt(0),a=i.childNodes[n];return i===o&&r===n+1&&(s.Dom.isTag(a,m)||!!((0,l.getWrappedMedia)(e,a)??(0,l.getCaptionedImage)(e,a)))&&s.Dom.isOrContains(e.editor,i)}(e))}async afterChange(e){let{jodit:t}=this;t.editor&&(0,l.$$)("img",t.editor).forEach(e=>{(0,l.dataBind)(e,d)||((0,l.dataBind)(e,d,!0),e.complete||t.e.on(e,"load",function i(){t.isInDestruct||t.e?.fire("resize"),t.e.off(e,"load",i)}),e.src&&/^data:/.test(e.src)&&function(e,t){let i;if(!e.o.imageProcessor.replaceDataURIToBlobIdInView||"u"<typeof ArrayBuffer||"u"<typeof URL)return;let n=t.src;try{i=(0,c.dataURItoBlob)(n)}catch{return}t.src=URL.createObjectURL(i),e.e.fire("internalUpdate");let{buffer:o}=e,r=o.get(h)||{};r[t.src]=n,e.buffer.set(h,r)}(t,e),t.e.on(e,"mousedown touchstart",()=>{(function(e){for(let t of["previousSibling","nextSibling"]){let i=e[t];for(;s.Dom.isText(i)&&!i.nodeValue?.replace((0,o.INVISIBLE_SPACE_REG_EXP)(),"");){let e=i[t];s.Dom.safeRemove(i),i=e}}})(e),t.s.select((0,l.getCaptionWrapper)(t,e)??e)}))})}}(0,n._)([(0,r.watch)(":afterGetValueFromEditor")],f.prototype,"onAfterGetValueFromEditor",null),(0,n._)([(0,r.watch)(":beforeSetElementValue")],f.prototype,"onBeforeSetElementValue",null),(0,n._)([r.autobind],f.prototype,"onSelectionChange",null),(0,n._)([(0,r.watch)([":change",":afterInit",":changePlace"]),(0,r.debounce)()],f.prototype,"afterChange",null),a.pluginSystem.add("imageProcessor",f)},34689:function(e,t,i){"use strict";i(5266).Config.prototype.image={dialogWidth:600,openOnDblClick:!0,editSrc:!0,useImageEditor:!0,editTitle:!0,editAlt:!0,showCaptionCheckbox:!0,editLink:!0,editSize:!0,editBorderRadius:!0,editMargins:!0,editClass:!0,availableClasses:[],editStyle:!0,editId:!0,editAlign:!0,showPreview:!0,selectImageAfterClose:!0}},90886:function(e,t,i){"use strict";var n=i(25045),o=i(62445),r=i(84839),s=i(23211),a=i(28077),l=i(65946),u=i(18855),c=i(59400);i(34689);var d=i(27137),h=i(28771),p=i(670),m=i(47744),f=i(71552);class g extends u.Plugin{get form(){return new d.UIImagePropertiesForm(this.j,this.state,this.activeTabState,{openImageEditor:()=>(0,h.openImageEditorDialog)(this.j,this.state),openImagePopup:e=>(0,p.openImagePopup)(this.j,this.dialog,this.state,e)})}get dialog(){let{j:e}=this,t=e.dlg({minWidth:Math.min(400,screen.width),minHeight:590,buttons:["fullsize","dialog.close"]}),i=this.__buttons;return i.check.onAction(()=>{(0,f.applyValuesToImage)(e,this.state,this.state.sourceImage),e.synchronizeValues(),t.close()}),i.remove.onAction(()=>{let{sourceImage:i}=this.state,n=(0,l.getCaptionWrapper)(e,i)??i,o=e.s.createRange();o.setStartBefore(n),o.collapse(!0),e.s.removeNode(n),t.close(),e.s.selectRange(o)}),i.cancel.onAction(()=>{t.close()}),t.setHeader(e.i18n("Image properties")),t.setContent(this.form),t.setFooter([[i.cancel,i.remove],i.check]),t.e.on(t,"afterClose",()=>{let{sourceImage:t}=this.state;if(e.isInDestruct||!s.Dom.isOrContains(e.editor,t))return;let i=(0,l.getCaptionWrapper)(e,t),n=(0,l.getImageCaption)(e,i);if(n&&s.Dom.isEmpty(n))return void e.s.setCursorIn(n);let o=i??t;if(e.o.image.selectImageAfterClose)return void e.s.select(o);let r=e.s.createRange();r.setStartAfter(o),r.collapse(!0),e.s.selectRange(r)}),t.setSize(e.o.image.dialogWidth),(0,l.markOwner)(e,t.container),t}get __buttons(){let{j:e}=this;return{check:(0,c.Button)(e,"ok","Apply","primary"),remove:(0,c.Button)(e,"bin","Delete"),cancel:(0,c.Button)(e,"cancel","Cancel")}}open(){return this.activeTabState.activeTab="Image",this.__lock(),this.dialog.open().setModal(!0).setPosition(),this.__focusFirstField(),this.async.promise((e,t)=>(0,m.readValuesFromImage)(this.j,this.state).then(e,t)).catch(e=>{(0,l.isAbortError)(e)||this.dialog.message.error(e.message)}).finally(()=>this.__unlock()),!1}__focusFirstField(){let e=e=>(0,l.toArray)(e.querySelectorAll("input, select, textarea"));e(this.form.getElm("tabsBox")).concat(e(this.form.container)).find(e=>null!=e.offsetParent)?.focus()}__lock(){this.dialog.lock(),this.form.setMod("lock",!0),Object.values(this.__buttons).forEach(e=>e.state.disabled=!0)}__unlock(){this.dialog.unlock(),this.form.setMod("lock",!1),Object.values(this.__buttons).forEach(e=>e.state.disabled=!1)}afterInit(e){let t=this;e.e.on("afterConstructor changePlace",()=>{e.e.off(e.editor,".imageproperties").on(e.editor,"dblclick.imageproperties",i=>{let n=i.target;if(s.Dom.isTag(n,"img"))if(e.o.image.openOnDblClick){if(!1===this.j.e.fire("openOnDblClick",n))return;t.state.sourceImage=n,t.state.image=n.cloneNode(!0),e.o.readonly||(i.stopImmediatePropagation(),i.preventDefault(),t.open())}else i.stopImmediatePropagation(),e.s.select(n)})}).on("openImageProperties.imageproperties",e=>{t.state.sourceImage=e,this.state.image=e.cloneNode(!0),this.open()})}async onStateValuesImageSrcChange(){let{image:e,values:t}=this.state;if(e.src)try{this.__lock();try{await e.decode()}catch(e){}if(this.state.sizeIsLocked&&(0,l.isNumeric)(t.imageWidth)){let e=parseFloat(t.imageWidth.toString());t.imageHeight=Math.round(e/this.state.ratio)}this.j.e.fire("updateImageProperties.imageproperties",e)}catch(e){this.j.alert(e.message)}finally{this.__unlock()}}beforeDestruct(e){Object.values((0,r.cached)(this,"__buttons")??{}).forEach(e=>e.destruct()),(0,r.cached)(this,"dialog")?.destruct(),(0,r.cached)(this,"form")?.destruct(),e.e.off(e.editor,".imageproperties").off(".imageproperties")}constructor(...e){super(...e),(0,n._)(this,"state",{image:new Image,sourceImage:new Image,get ratio(){let{naturalWidth:e,naturalHeight:t}=this.image;return e/t||1},sizeIsLocked:!0,marginIsLocked:!0,values:{style:"",imageSrc:"",borderRadius:0,imageTitle:"",imageAlt:"",imageCaption:!1,imageLink:"",imageLinkOpenInNewTab:!1,imageWidth:0,imageHeight:0,marginTop:0,marginRight:0,marginBottom:0,marginLeft:0,classes:"",id:"",align:""}}),(0,n._)(this,"activeTabState",{activeTab:"Image"})}}(0,o._)([r.cache],g.prototype,"form",null),(0,o._)([r.cache],g.prototype,"dialog",null),(0,o._)([r.cache],g.prototype,"__buttons",null),(0,o._)([(0,r.watch)("state.image")],g.prototype,"onStateValuesImageSrcChange",null),a.pluginSystem.add("imageProperties",g)},26633:function(e,t,i){"use strict";i.d(t,{readAlign:function(){return o}});var n=i(16849);function o(e,t,i){let o=(0,n.getHAlign)(e,i);t.align="normal"===o?"":o}},47744:function(e,t,i){"use strict";i.d(t,{readValuesFromImage:function(){return d}});var n=i(16849),o=i(7909),r=i(80991),s=i(66638),a=i(26633),l=i(79310),u=i(18380),c=i(57339);async function d(e,t){let{sourceImage:i,values:d}=t,h=(0,s.getCaptionWrapper)(e,i),p=h??i;return d.imageCaption=!!h,(0,a.readAlign)(p,d,(0,n.getAlignClasses)(e,p)),d.borderRadius=parseInt((0,r.cssInline)(i,"border-radius")||"0",10)||0,d.id=(0,o.attr)(i,"id")||"",d.imageTitle=(0,o.attr)(i,"title")||"",d.imageAlt=(0,o.attr)(i,"alt")||"",d.style=(0,o.attr)(i,"style")||"",d.classes=((0,o.attr)(i,"class")||"").replace(/jodit_focused_image[\s]*/,""),(0,u.readMargins)(p,d,t),(0,l.readLink)(t,e,d),d.imageSrc=(0,o.attr)(i,"src")||"",(0,c.readSizes)(i,d,t,h)}},79310:function(e,t,i){"use strict";i.d(t,{readLink:function(){return r}});var n=i(23211),o=i(7909);function r(e,t,i){let r=n.Dom.closest(e.sourceImage,"a",t.editor);r?(i.imageLink=(0,o.attr)(r,"href")||"",i.imageLinkOpenInNewTab="_blank"===(0,o.attr)(r,"target")):(i.imageLink="",i.imageLinkOpenInNewTab=!1)}},18380:function(e,t,i){"use strict";i.d(t,{readMargins:function(){return o}});var n=i(74264);function o(e,t,i){let o=!0,r=!1;["marginTop","marginRight","marginBottom","marginLeft"].forEach(i=>{let s=e.style.getPropertyValue((0,n.kebabCase)(i));if(!s){r=!0,t[i]=0;return}/^[0-9]+(px)?$/.test(s)&&(s=parseInt(s,10)),t[i]=s,(r&&t[i]||o&&"marginTop"!==i&&t[i]!==t.marginTop)&&(o=!1)}),i.marginIsLocked=o}},57339:function(e,t,i){"use strict";i.d(t,{readSizes:function(){return a}});var n=i(70222),o=i(7909),r=i(80991),s=i(10808);async function a(e,t,i,a){try{await e.decode()}catch(e){}let l=(0,r.css)(a??e,"width",!0)||(0,o.attr)(e,"width")||!1,u=(0,r.css)(e,"height",!0)||(0,o.attr)(e,"height")||!1;t.imageWidth=!1!==l?(0,s.normalSizeFromString)(l):e.offsetWidth||e.naturalWidth,(0,n.isNumeric)(t.imageWidth)?t.imageHeight=!1!==u?(0,s.normalSizeFromString)(u):e.offsetHeight||e.naturalHeight:t.imageHeight=u||"";let{imageWidth:c,imageHeight:d}=t,h=parseFloat(c.toString());if(!(0,n.isNumeric)(c)||!(0,n.isNumeric)(d)){i.sizeIsLocked=!1;return}if(!1===u){t.imageHeight=Math.round(h/i.ratio),i.sizeIsLocked=!0;return}i.sizeIsLocked=1>Math.abs(h-parseFloat(d.toString())*i.ratio)}},27137:function(e,t,i){"use strict";i.d(t,{UIImagePropertiesForm:function(){return m}});var n=i(25045),o=i(62445),r=i(84839),s=i(91672),a=i(23211),l=i(65946),u=i(63468),c=i(29434),d=i(15753),h=i(29596),p=i(17306);class m extends u.UIGroup{className(){return"UIImagePropertiesForm"}appendChildToContainer(){}getElm(e){let t=super.getElm(e);if(t)return t;for(let t of this.elements){let i=t.getElm(e);if(i)return i}return null}render(){return`<form>
136
+ </div>`}setPrompt(e){if(e){let{jodit:t}=this,i=t.o.aiAssistant[e],{aiCommonPrefixPrompt:n,aiCommonSuffixPrompt:o}=t.o.aiAssistant;this.promptInput.value=[n,(0,l.isString)(i)?i:"",o].filter(Boolean).join(" "),this.__toggleInsertButton(!0),this.promptInput.value&&(this.__formAiAssistant.submit(),this.__toggleSubmitButton(!0))}this.promptInput.focus()}onAiAssistentResponse(e){this.setMod("loading",!1),a.Dom.detach(this.__results),this.__aiResult=e,a.Dom.append(this.__results,this.jodit.c.fromHTML(e)),this.__toggleSubmitButton(!1),this.__toggleInsertButton(!1)}onAiAssistentError(e){this.__aiResult="",this.setMod("loading",!1),this.__error.textContent=e,a.Dom.detach(this.__results),this.__toggleSubmitButton(!1);let t=this.getFullElName("","hide","true");this.__results.classList.add(t),this.__toggleInsertButton(!0)}onChangePromptValue(){this.__toggleSubmitButton(!this.promptInput.value)}__toggleSubmitButton(e){this.__submitButton.state.disabled=e,this.__tryAgainButton.state.disabled=e}__toggleInsertButton(e){this.__insertButton.state.disabled=e,this.__insertAfterButton.state.disabled=e}constructor(e,{onInsert:t,onInsertAfter:i}){super(e),(0,n._)(this,"__body",void 0),(0,n._)(this,"__buttons",void 0),(0,n._)(this,"__results",void 0),(0,n._)(this,"__spinner",void 0),(0,n._)(this,"__error",void 0),(0,n._)(this,"promptInput",void 0),(0,n._)(this,"__insertAfterButton",void 0),(0,n._)(this,"__submitButton",void 0),(0,n._)(this,"__tryAgainButton",void 0),(0,n._)(this,"__insertButton",void 0),(0,n._)(this,"__formAiAssistant",void 0),(0,n._)(this,"__aiResult",""),this.__error=this.getElm("error"),this.__body=this.getElm("body"),this.__buttons=this.getElm("buttons"),this.__results=this.getElm("results"),this.__spinner=this.getElm("spinner"),this.__insertButton=(0,u.Button)(e,"","Insert","primary").onAction(()=>t(this.__aiResult)),this.__insertAfterButton=(0,u.Button)(e,"","Insert After","initial").onAction(()=>i(this.__aiResult));let o=()=>{this.__formAiAssistant.validate()&&(this.__formAiAssistant.submit(),this.__toggleInsertButton(!0),this.__toggleSubmitButton(!0))};this.__submitButton=(0,u.Button)(e,{icon:{name:"ai-assistant"},name:"ai-assistant",tooltip:"Submit"}).onAction(o),this.__tryAgainButton=(0,u.Button)(e,{icon:{name:"update"},name:"update",tooltip:"Try Again",variant:"initial"}).onAction(o),this.promptInput=new u.UITextArea(e,{name:"prompt",required:!0,label:"Prompt",placeholder:"Ask AI to improve generated text",className:this.getFullElName("prompt-row-input")});let r=new u.UIBlock(e,[this.__insertButton,this.__insertAfterButton,this.__tryAgainButton],{className:this.getFullElName("prompt-row")});this.__formAiAssistant=new u.UIForm(e,[new u.UIBlock(e,[this.promptInput,this.__submitButton],{className:this.getFullElName("prompt-row")})]).onSubmit(t=>{this.__error.textContent="",this.setMod("loading",!0),e.e.fire("invokeAiAssistant",t.prompt);let i=this.getFullElName("","hide","true");this.__results.classList.remove(i),this.__buttons.classList.remove(i),a.Dom.detach(this.__results),a.Dom.append(this.__results,this.__spinner),this.__insertButton.focus()}),a.Dom.append(this.__buttons,r.container),a.Dom.append(this.__body,this.__formAiAssistant.container),this.onChangePromptValue()}}(0,o._)([(0,s.watch)(":ai-assistant-response")],d.prototype,"onAiAssistentResponse",null),(0,o._)([(0,s.watch)(":ai-assistant-error")],d.prototype,"onAiAssistentError",null),(0,o._)([(0,s.watch)("promptInput:change")],d.prototype,"onChangePromptValue",null),d=(0,o._)([r.component],d)},90010:function(e,t,i){"use strict";var n=i(25045),o=i(62445),r=i(81937),s=i(84839),a=i(23211),l=i(28077),u=i(65946),c=i(91206),d=i(59400),h=i(5658),p=i(29434);i(95085);let m="jodit-wysiwyg_anchors",f=' contenteditable="false"';class g extends c.Plugin{afterInit(e){var t;let i,n,o=e.ed===e.od;o&&e.editor.classList.add(m),(0,l.getContainer)(e,"anchor","style",!0).textContent=(t=o?"."+m:"",i=["id","name"].map(e=>`.jodit-wysiwyg${t} a[${e}]:not([href]):empty::before`).join(","),n=`url("data:image/svg+xml,${encodeURIComponent(p.Icon.get("anchor"))}") center/contain no-repeat`,`${i}{display:inline-block;width:.75em;height:1em;margin:0 .1em;vertical-align:-.15em;background-color:var(--jd-color-icon,#4c4c4c);-webkit-mask:${n};mask:${n};cursor:pointer;content:''}`),e.e.on("generateAnchorForm.anchor",this.__generateForm).on("clickA touchstartA",this.__onClickA,{top:!0})}__onClickA(e,t){let{j:i}=this;if(!i.o.readonly&&(0,u.isAnchor)(e))return i.e.stopPropagation((0,u.camelCase)((t?.type??"click")+"_a")),i.e.fire("showPopup",e,()=>(0,u.position)(e,i),"anchor",!0),!1}onChange(){let{j:e}=this;e.isInDestruct||e.getMode()===r.MODE_SOURCE||(0,u.getAnchors)(e.editor).forEach(_)}onAfterGetValueFromEditor(e){e.value=function(e){if(!e.includes(f))return e;let t="",i=0,n=0;for(;;){let o=e.indexOf("<",n);if(-1===o)break;let r=e.indexOf(">",o);if(-1===r)break;if(e.startsWith("<a",o)&&/\s/.test(e.charAt(o+2))&&e.startsWith("</a>",r+1)){let n=e.slice(o,r),s=n.indexOf(f);-1===s||/\shref=/.test(n)||(t+=e.slice(i,o+s),i=o+s+f.length)}n=r+1}return 0===i?e:t+e.slice(i)}(e.value)}onBeforePasteInsert(e){if(a.Dom.isElement(e)||a.Dom.isFragment(e))return void this.__renameCopies(e);if(!(0,u.isString)(e)||!/<a\s/i.test(e))return;let t=this.j.createInside.element("template");if(t.innerHTML=e,this.__renameCopies(t.content))return t.innerHTML}__generateForm(e,t){let{j:i}=this,n=(0,u.isAnchor)(e)?e:null,o=new h.UIInput(i,{name:"name",ref:"name_input",label:"Anchor",required:!0}),s=[new d.UIButton(i,{name:"insert",type:"submit",variant:"primary",text:n?"Update":"Insert"})];n&&(o.value=(0,u.getAnchorName)(n),s.unshift(new d.UIButton(i,{name:"remove",variant:"default",text:"Remove"}).onAction(()=>{i.o.readonly||(i.s.restore(),a.Dom.safeRemove(n),i.synchronizeValues()),t()})));let l=new h.UIForm(i,[new h.UIBlock(i,[o]),new h.UIBlock(i,s,{align:"full"})]);return n&&(this.__dropForm(),this.__form=l,i.e.on(l.container,"keydown",e=>{e.key===r.KEY_ESC&&(t(),i.s.restore())})),l.onSubmit(()=>{if(i.o.readonly)return t(),!1;let e=o.value.trim().replace(/^#/,""),r=e?/\s/.test(e)?"The name cannot contain spaces":this.__isTaken(e,n)?"This name is already in use":"":"Please fill out this field";return r?(o.error=r,o.focus()):(i.s.restore(),n?this.__rename(n,e):this.__insert(e),i.synchronizeValues(),t()),!1}),i.async.requestIdleCallback(()=>o.focus()),l}__dropForm(){let e=this.__form;this.__form=null,e&&!e.isInDestruct&&(this.j.e.off(e.container,"keydown"),e.destruct())}__isTaken(e,t){return(0,u.toArray)(this.j.editor.querySelectorAll("[id], a[name]")).some(i=>i!==t&&(i.id===e||(0,u.isAnchor)(i)&&(0,u.attr)(i,"name")===e))}__insert(e){let{j:t}=this,i=t.createInside.element("a",{id:e}),n=t.s.range;_(i),n.collapsed||(n.collapse(!0),t.s.selectRange(n));let o=a.Dom.closest(n.startContainer,"a",t.editor);o?(a.Dom.before(o,i),t.s.setCursorAfter(i)):t.s.insertNode(i,!0,!1)}__rename(e,t){let i=(0,u.getAnchorName)(e),n=this.__isTaken(i,e);["id","name"].forEach(i=>{e.hasAttribute(i)&&(0,u.attr)(e,i,t)}),n||(0,u.toArray)(this.j.editor.querySelectorAll("a[href]")).forEach(e=>{(0,u.attr)(e,"href")==="#"+i&&(0,u.attr)(e,"href","#"+t)})}__renameCopies(e){let t=new Set((0,u.toArray)(e.querySelectorAll("[id], a[name]")).map(e=>e.id||(0,u.attr)(e,"name"))),i=new Map;return((0,u.isAnchor)(e)?[e]:(0,u.getAnchors)(e)).forEach(e=>{let n=(0,u.getAnchorName)(e);if(!this.__isTaken(n,null))return;let o=n;for(let e=2;t.has(o)||this.__isTaken(o,null);e+=1)o=`${n}-${e}`;["id","name"].forEach(t=>{e.hasAttribute(t)&&(0,u.attr)(e,t,o)}),t.add(o),i.set(n,o)}),!!i.size&&((0,u.toArray)(e.querySelectorAll("a[href]")).forEach(e=>{let t=(0,u.attr)(e,"href")??"",n="#"===t[0]&&i.get(t.slice(1));n&&(0,u.attr)(e,"href","#"+n)}),!0)}beforeDestruct(e){this.__dropForm(),e.editor.classList.remove(m),e.e.off("generateAnchorForm.anchor",this.__generateForm).off("clickA touchstartA",this.__onClickA)}constructor(...e){super(...e),(0,n._)(this,"buttons",[{name:"anchor",group:"insert"}]),(0,n._)(this,"__form",null)}}function _(e){"false"!==(0,u.attr)(e,"contenteditable")&&(0,u.attr)(e,"contenteditable",!1)}(0,o._)([s.autobind],g.prototype,"__onClickA",null),(0,o._)([(0,s.watch)([":change",":afterInit",":afterSetMode"]),(0,s.debounce)()],g.prototype,"onChange",null),(0,o._)([(0,s.watch)(":afterGetValueFromEditor")],g.prototype,"onAfterGetValueFromEditor",null),(0,o._)([(0,s.watch)(":beforePasteInsert")],g.prototype,"onBeforePasteInsert",null),(0,o._)([s.autobind],g.prototype,"__generateForm",null),l.pluginSystem.add("anchor",g)},95085:function(e,t,i){"use strict";var n=i(5266);i(89873),n.Config.prototype.controls.anchor={popup:(e,t,i)=>e.e.fire("generateAnchorForm.anchor",null,i),tooltip:"Insert anchor"},n.Config.prototype.popup.anchor=(e,t,i)=>e.e.fire("generateAnchorForm.anchor",t,i)},28286:function(e,t,i){"use strict";var n=i(25045),o=i(81937),r=i(27795),s=i(28077),a=i(91565),l=i(91206),u=i(42259);i(33831);var c=i(89827),d=i(17523),h=i(15200);class p extends l.Plugin{afterInit(e){e.registerCommand("deleteButton",{exec:()=>this.onDelete(!1),hotkeys:e.o.delete.hotkeys.delete},{stopPropagation:!1}).registerCommand("backspaceButton",{exec:()=>this.onDelete(!0),hotkeys:e.o.delete.hotkeys.backspace},{stopPropagation:!1}).registerCommand("deleteWordButton",{exec:()=>this.onDelete(!1,"word"),hotkeys:e.o.delete.hotkeys.deleteWord}).registerCommand("backspaceWordButton",{exec:()=>this.onDelete(!0,"word"),hotkeys:e.o.delete.hotkeys.backspaceWord}).registerCommand("deleteSentenceButton",{exec:()=>this.onDelete(!1,"sentence"),hotkeys:e.o.delete.hotkeys.deleteSentence}).registerCommand("backspaceSentenceButton",{exec:()=>this.onDelete(!0,"sentence"),hotkeys:e.o.delete.hotkeys.backspaceSentence})}beforeDestruct(e){e.e.off("afterCommand.delete")}onDelete(e,t="char"){let i=this.j,n=i.selection;if(n.isFocused()||n.focus(),!n.isInsideArea)return;if((0,c.checkNotCollapsed)(i))return i.e.fire("backSpaceAfterDelete",e),!1;let s=n.range,l=i.createInside.text(o.INVISIBLE_SPACE);try{if(r.Dom.safeInsertNode(s,l),!r.Dom.isOrContains(i.editor,l))return;let c=r.Dom.closest(l,e=>r.Dom.isElement(e)&&e.hasAttribute("contenteditable")&&!r.Dom.isContentEditable(e.parentNode,i.editor),i.editor);if(c&&n.cursorInTheEdge(e,c,l)||i.e.fire("backSpaceBeforeCases",e,l))return!1;(0,u.moveNodeInsideStart)(i,l,e);let h=i.o.delete.disableCases;if(d.casesMap.some(([n,r])=>{if(!(h&&h.has(n))&&(0,a.isFunction)(r)&&r(i,l,e,t))return o.IS_PROD,!0}))return!1}catch(e){throw o.IS_PROD,e}finally{i.e.fire("backSpaceAfterDelete",e,l),this.moveCaretToTextBefore(l),this.safeRemoveEmptyNode(l)}return!1}moveCaretToTextBefore(e){let{jodit:t}=this,{range:i}=t.s;if(!e.parentNode)return;let n=t.ed.createRange();if(n.selectNode(e),!i.collapsed||!n.isPointInRange(i.startContainer,i.startOffset))return;let o=e.previousSibling;for(;r.Dom.isText(o)&&!/\S|\u00A0/.test(o.data);)o=o.previousSibling;let s=r.Dom.isText(o)?o:(0,h.findMostNestedNeighbor)(e,!1,t.editor,!0),a=r.Dom.closest(s,"a",t.editor);r.Dom.isText(s)&&r.Dom.isContentEditable(s,t.editor)&&(!a||r.Dom.isOrContains(a,e))&&r.Dom.closest(s,r.Dom.isBlock,t.editor)===r.Dom.closest(e,r.Dom.isBlock,t.editor)&&(i.setStart(s,s.nodeValue?.length??0),i.collapse(!0),t.s.selectRange(i))}safeRemoveEmptyNode(e){let{range:t}=this.j.s;r.Dom.isText(e)&&e.nodeValue!==o.INVISIBLE_SPACE&&e.nodeValue?.startsWith(o.INVISIBLE_SPACE)?e.deleteData(0,o.INVISIBLE_SPACE.length):(t.startContainer===e&&(e.previousSibling?r.Dom.isText(e.previousSibling)?t.setStart(e.previousSibling,e.previousSibling.nodeValue?.length??0):t.setStartAfter(e.previousSibling):e.nextSibling&&(r.Dom.isText(e.nextSibling)?t.setStart(e.nextSibling,0):t.setStartBefore(e.nextSibling)),t.collapse(!0),this.j.s.selectRange(t)),r.Dom.safeRemove(e))}}(0,n._)(p,"requires",["hotkeys"]),s.pluginSystem.add("backspace",p)},26106:function(e,t,i){"use strict";i.d(t,{checkJoinNeighbors:function(){return s}});var n=i(81937),o=i(23211),r=i(15200);function s(e,t,i){return function e(t,i,s,h){if(function(e,t,i){let n=o.Dom.findNotEmptySibling(t,i);if(!c(e,n))return!1;let s=(0,r.getMoveFilter)(e);if(i)for(let e=t;e&&!o.Dom.isBlock(e);){let t=e.nextSibling;if(o.Dom.isTag(e,"br")){o.Dom.safeRemove(e);break}s(e)?o.Dom.append(n,e):o.Dom.safeRemove(e),e=t}else{let t=o.Dom.findNotEmptySibling(n,!1);!t||o.Dom.isBlock(t)||o.Dom.isTag(t,"br")||o.Dom.after(n,e.createInside.element("br")),o.Dom.unwrap(n)}return e.s.setCursorBefore(t),!0}(t,i,s))return!0;let p=o.Dom.findNotEmptySibling(i,s);if(c(t,function(e,t){let i=e;for(;o.Dom.isElement(i)&&!o.Dom.isBlock(i);){let e=Array.from(i.childNodes).filter(e=>!o.Dom.isEmptyTextNode(e));i=(t?e[e.length-1]:e[0])??null}return i===e?null:i}(p,s))&&a(p,t.editor))return e(t,i,s,h);let m=i,f=m;for(;m&&!o.Dom.findNotEmptySibling(m,s)&&m.parentElement!==t.editor;)f=m=m.parentElement;if(o.Dom.isElement(f)&&o.Dom.isContentEditable(f,t.editor)){var g,_;let c,p,m,v;if(o.Dom.up(i,o.Dom.isCell,f,!0))return!1;let b=o.Dom.findNotEmptySibling(f,s);if(b&&(a(o.Dom.furthest(i,e=>o.Dom.isElement(e)&&!o.Dom.isBlock(e)&&!o.Dom.isOrContains(e,b),t.editor),t.editor)||a(b,t.editor)))return e(t,i,s,h);if(o.Dom.isTag(b,"br"))return o.Dom.safeRemove(b),t.s.setCursorBefore(i),!0;if(s&&o.Dom.isTag(b,"table"))return t.s.setCursorBefore(i),!0;if(o.Dom.isElement(b)&&!o.Dom.isContentEditable(b,t.editor))return!1;let y=(g=f,(c=o.Dom.up(i,o.Dom.isBlock,g))?o.Dom.isLeaf(c)&&c.parentElement?c.parentElement:c:g);if(!h&&b&&function(e,t,i,r,s){if(s||o.Dom.isTag(r,"table")||o.Dom.isTag(r,n.INSEPARABLE_TAGS)||!o.Dom.isContentEditable(r,e.editor))return!1;let a=o.Dom.up(t,o.Dom.isBlock,i,!0),c=l(r,!1,e.editor);if(!a||!c||!o.Dom.isContentEditable(c,e.editor)||!(o.Dom.isLeaf(a)||o.Dom.isLeaf(c))||o.Dom.isLeaf(a.parentElement)||o.Dom.isLeaf(c.parentElement)||u(a)===u(c))return!1;let d=a.parentElement;o.Dom.isLeaf(a)&&o.Dom.isLeaf(c)?o.Dom.before(c,a):o.Dom.isLeaf(a)?o.Dom.before(c,function(e){let t=e.parentElement,i=t.cloneNode(!1),n=Array.from(t.children).indexOf(e);if(n&&(i.removeAttribute("id"),o.Dom.isTag(t,"ol"))){let e=parseInt(t.getAttribute("start")||"1",10)||1;i.setAttribute("start",e+n+"")}return o.Dom.append(i,e),i}(a)):o.Dom.before(c.parentElement,a);let h=d;for(;h&&h!==e.editor&&o.Dom.isEmpty(h);){let e=h.parentElement;o.Dom.safeRemove(h),h=e}return!0}(t,i,y,b,s))return e(t,i,s,!0)||t.s.setCursorBefore(i),!0;if(b&&(function(e,t,i,s,a){if(a||!(o.Dom.isList(i)||o.Dom.isList(s)))return!1;let l=o.Dom.up(t,o.Dom.isBlock,i,!0),u=o.Dom.isList(s)?s.firstElementChild:s;if(!l||!u||o.Dom.isTag(u,n.INSEPARABLE_TAGS)||o.Dom.isTag(u,"table"))return!1;if(!o.Dom.isEmpty(u)){let t=[];for(let e=u.firstChild;e&&!o.Dom.isBlock(e);e=e.nextSibling)t.push(e);if(!t.length)return!1;let i=(0,r.getMoveFilter)(e);t.forEach(e=>i(e)?o.Dom.append(l,e):o.Dom.safeRemove(e))}let c=u;for(;c&&c!==e.editor&&o.Dom.isEmpty(c);){let e=c.parentElement;o.Dom.safeRemove(c),c=e}return!0}(t,i,y,b,s)||(_=b,p=o.Dom.isTag(_,n.LIST_TAGS),m=o.Dom.isTag(y,n.LIST_TAGS),v=(e,t)=>t?e.firstElementChild:e.lastElementChild,m?(_=t.createInside.element(t.o.enterBlock),o.Dom.before(y,_),d(t,v(y,s),_,s)):!!_&&!!p&&!m&&d(t,y,v(_,!s),s))||function(e,t,i,n){if(o.Dom.isBlock(i)||!o.Dom.isBlock(t)||o.Dom.isList(t)||t.parentNode!==i.parentNode||Array.from(t.childNodes).some(e=>o.Dom.isBlock(e)))return!1;if(n){let i=o.Dom.findNotEmptySibling(t,!1);return!i||o.Dom.isBlock(i)||o.Dom.isTag(i,"br")||o.Dom.after(t,e.createInside.element("br")),o.Dom.unwrap(t),!0}let s=(0,r.getMoveFilter)(e);for(let e=i;e&&!o.Dom.isBlock(e);){let i=e.nextSibling;if(o.Dom.isTag(e,"br")){o.Dom.safeRemove(e);break}s(e)?o.Dom.append(t,e):o.Dom.safeRemove(e),e=i}return!0}(t,y,b,s)||d(t,y,l(function(e,t){if(!o.Dom.isTag(e,"table"))return e;let i=[];return o.Dom.each(e,e=>{o.Dom.isCell(e)&&i.push(e)}),i.length?i[t?i.length-1:0]:null}(b,s),s,t.editor),s)))return t.s.setCursorBefore(i),!0}return!1}(e,t,i,!1)}function a(e,t){if(!o.Dom.isElement(e)||o.Dom.isBlock(e))return!1;let i=e=>o.Dom.isBlock(e)&&!o.Dom.isTag(e,n.NO_EMPTY_TAGS);Array.from(e.childNodes).forEach(e=>a(e,t));let r=Array.from(e.childNodes);if(!r.some(i))return!1;let s=null;for(let l of r){if(!i(l)){s||o.Dom.isEmptyTextNode(l)||(s=e.cloneNode(!1),o.Dom.before(l,s)),s&&o.Dom.append(s,l);continue}if(s=null,o.Dom.isTag(l,n.INSEPARABLE_TAGS)||!o.Dom.isContentEditable(l,t))continue;let r=e.cloneNode(!1);o.Dom.moveContent(l,r),o.Dom.append(l,r),a(r,t)}return o.Dom.unwrap(e),!0}function l(e,t,i){let r=e;for(;r;){let e=t?r.lastChild:r.firstChild,s=e&&o.Dom.isEmptyTextNode(e)?o.Dom.findNotEmptySibling(e,t):e;if(!o.Dom.isBlock(s)||o.Dom.isTag(s,n.INSEPARABLE_TAGS)||o.Dom.isTag(s,"table")||!o.Dom.isContentEditable(s,i))break;r=s}return r}function u(e){let t=e.parentElement;for(;o.Dom.isList(t)||o.Dom.isLeaf(t);)t=t.parentElement;return t}function c(e,t){return o.Dom.isElement(t)&&o.Dom.isBlock(t)&&!o.Dom.isList(t)&&!o.Dom.isTag(t,"table")&&!o.Dom.isCell(t)&&o.Dom.isContentEditable(t,e.editor)&&!Array.from(t.childNodes).some(e=>o.Dom.isBlock(e))}function d(e,t,i,n){if(t&&o.Dom.isElement(i)){o.Dom.moveContent(t,i,!n,(0,r.getMoveFilter)(e));let s=t;for(;s&&s!==e.editor&&o.Dom.isEmpty(s);){let e=s.parentElement;o.Dom.safeRemove(s),s=e}return!0}return!1}},80951:function(e,t,i){"use strict";i.d(t,{checkJoinTwoLists:function(){return s}});var n=i(23211),o=i(71125),r=i(15200);function s(e,t,i){let s=n.Dom.findSibling(t,i),a=n.Dom.findSibling(t,!i);if(!n.Dom.closest(t,n.Dom.isElement,e.editor)&&n.Dom.isList(s)&&n.Dom.isList(a)&&n.Dom.isTag(s.lastElementChild,"li")&&n.Dom.isTag(a.firstElementChild,"li")){let{setCursorBefore:l,setCursorAfter:u}=e.s,c=s.lastElementChild,d=a.firstElementChild;return(0,o.call)(i?n.Dom.prepend:n.Dom.append,d,t),n.Dom.moveContent(a,s,!i,(0,r.getMoveFilter)(e)),n.Dom.safeRemove(a),(0,o.call)(i?n.Dom.append:n.Dom.prepend,c,t),(0,o.call)(i?l:u,t),!0}return!1}},89827:function(e,t,i){"use strict";function n(e){return!e.s.isCollapsed()&&(e.execCommand("delete",!1,!0),!0)}i.d(t,{checkNotCollapsed:function(){return n}})},58881:function(e,t,i){"use strict";i.d(t,{checkRemoveChar:function(){return function e(t,i,u,c,d=!1){let h,p=u?-1:1,m=o.Dom.sibling(i,!u),f=o.Dom.sibling(i,u),g=null,_=!1;for(f||(f=a(i,u,t.editor));f&&(o.Dom.isText(f)||o.Dom.isInlineBlock(f));){for(;o.Dom.isInlineBlock(f);)f=u?f?.lastChild:f?.firstChild;if(!f||o.Dom.isBlock(f))break;if(f.nodeValue?.length){if(d&&l(function(e,t){let i=(0,r.toArray)(e),o=t?-1:1,s=t?i.length-1:0;for(;i[s]===n.INVISIBLE_SPACE;)s+=o;return i[s]}(f.nodeValue,u)))break;h=function(e,t,i,s){let a=(0,r.toArray)(e.nodeValue),l=a.length,u=t?l-1:0;if(a[u]===n.INVISIBLE_SPACE)for(;a[u]===n.INVISIBLE_SPACE;)u+=i;let c=a[u];if(a[u+i]===n.INVISIBLE_SPACE){for(u+=i;a[u]===n.INVISIBLE_SPACE;)u+=i;u+=t?1:-1}return a=t&&u<0?[]:a.slice(t?0:u+1,t?u:l),function(e,t,i){if(!e||!o.Dom.isText(e)||(!t?/ $/:/^ /).test(e.nodeValue??"")||!(0,r.trimInv)(e.nodeValue||"").length)for(let e=t?i.length-1:0;(t?e>=0:e<i.length)&&" "===i[e];e+=t?-1:1)i[e]=n.NBSP_SPACE}(s,t,a),e.nodeValue=a.join(""),c}(f,u,p,m),!f.nodeValue.length&&o.Dom.isInlineBlock(f.parentNode)&&(f.nodeValue=n.INVISIBLE_SPACE)}if(f.nodeValue?.length||(g=f),!(0,r.isVoid)(h)&&h!==n.INVISIBLE_SPACE){(function(t,i,n,s,a,u){(0,r.call)(t?o.Dom.after:o.Dom.before,i,n);let c="word"===s&&!l(a);("sentence"===s||c||"word"===s&&t)&&e(u,n,t,s,c&&t)})(u,f,i,c,h,t),_=!0;break}let s=a(f,u,t.editor);g&&(o.Dom.safeRemove(g),g=null),f=s}return g&&o.Dom.safeRemove(g),_&&(function(e){let t=e.parentElement;for(;t&&o.Dom.isInlineBlock(t)&&o.Dom.isTag(t,"a");){let i=t.parentElement;o.Dom.isEmpty(t)&&(o.Dom.after(t,e),o.Dom.safeRemove(t)),t=i}}(i),(0,s.addBRInsideEmptyBlock)(t,i),t.s.setCursorBefore(i),o.Dom.isTag(i.previousSibling,"br")&&!o.Dom.findNotEmptySibling(i,!1)&&o.Dom.after(i,t.createInside.element("br"))),_}}});var n=i(81937),o=i(27795),r=i(65946),s=i(15200);function a(e,t,i){let n=o.Dom.sibling(e,t);return!n&&e.parentNode&&e.parentNode!==i&&(n=(0,s.findMostNestedNeighbor)(e,!t,i,!0))&&o.Dom.closest(e,o.Dom.isBlock,i)!==o.Dom.closest(n,o.Dom.isBlock,i)?null:n}function l(e){return" "===e||e===n.NBSP_SPACE}},68709:function(e,t,i){"use strict";i.d(t,{checkRemoveContentNotEditable:function(){return a}});var n=i(27795),o=i(65946),r=i(42259),s=i(26106);function a(e,t,i){let a=t,u=n.Dom.findSibling(a,i);for(;!u&&a.parentElement&&a.parentElement!==e.editor&&!n.Dom.isCell(a.parentElement);)if(a=a.parentElement,u=n.Dom.findSibling(a,i),i&&n.Dom.isLeaf(a)&&!(n.Dom.isLeaf(u)&&l(e,u)))return!1;if(l(e,u)){if(n.Dom.isBlock(u)){let o=!(i&&n.Dom.isLeaf(u));n.Dom.safeRemove(u),o&&(0,s.checkJoinNeighbors)(e,t,i)}else(0,o.call)(i?n.Dom.before:n.Dom.after,u,t),n.Dom.safeRemove(u),(0,r.moveNodeInsideStart)(e,t,i);return(0,o.call)(i?e.s.setCursorBefore:e.s.setCursorAfter,t),!0}return!1}function l(e,t){return n.Dom.isElement(t)&&!n.Dom.isContentEditable(t,e.editor)}},5771:function(e,t,i){"use strict";i.d(t,{checkRemoveEmptyNeighbor:function(){return o}});var n=i(23211);function o(e,t,i){let o=n.Dom.closest(t,n.Dom.isElement,e.editor);if(!o)return!1;let r=n.Dom.findNotEmptySibling(o,i);return!!(r&&n.Dom.isEmpty(r))&&(n.Dom.safeRemove(r),e.s.setCursorBefore(t),!0)}},2409:function(e,t,i){"use strict";i.d(t,{checkRemoveEmptyParent:function(){return s}});var n=i(81937),o=i(27795),r=i(80951);function s(e,t,i){let s=!1,{setCursorBefore:a,setCursorIn:l}=e.s,u=o.Dom.closest(t,o.Dom.isElement,e.editor);if(!u||!o.Dom.isEmpty(u))return!1;do if(u&&o.Dom.isEmpty(u)&&!o.Dom.isCell(u)){o.Dom.after(u,t);let i=o.Dom.closest(u,e=>o.Dom.isElement(e)&&e!==u,e.editor);o.Dom.safeRemove(u),s=!0,u=i}else break;while(u)if(s&&(0,r.checkJoinTwoLists)(e,t,i))return!0;let c=o.Dom.findNotEmptyNeighbor(t,i,e.editor);return!c||o.Dom.isText(c)||o.Dom.isTag(c,n.INSEPARABLE_TAGS)?a(t):l(c,!i),s}},93890:function(e,t,i){"use strict";i.d(t,{checkRemoveUnbreakableElement:function(){return s}});var n=i(81937),o=i(23211),r=i(2409);function s(e,t,i){let s=o.Dom.findSibling(t,i);return!!(o.Dom.isElement(s)&&(o.Dom.isTag(s,n.INSEPARABLE_TAGS)||o.Dom.isEmpty(s)))&&(o.Dom.safeRemove(s),o.Dom.isTag(s,"br")&&!o.Dom.findNotEmptySibling(t,!1)&&o.Dom.after(t,e.createInside.element("br")),e.s.setCursorBefore(t),o.Dom.isTag(s,"br")&&(0,r.checkRemoveEmptyParent)(e,t,i),!0)}},12443:function(e,t,i){"use strict";i.d(t,{checkTableCell:function(){return o}});var n=i(23211);function o(e,t){let i=t.parentElement;return!!n.Dom.isCell(i)}},10157:function(e,t,i){"use strict";i.d(t,{checkUnwrapFirstListItem:function(){return r}});var n=i(23211),o=i(93640);function r(e,t,i){let r=n.Dom.closest(t,n.Dom.isElement,e.editor),{s}=e;if(n.Dom.isLeaf(r)&&r?.parentElement?.[i?"firstElementChild":"lastElementChild"]===r&&s.cursorInTheEdge(i,r)){let a=r.parentElement,l=e.createInside.element(e.o.enterBlock);return(0,o.call)(i?n.Dom.before:n.Dom.after,a,l),n.Dom.moveContent(r,l),n.Dom.safeRemove(r),n.Dom.isEmpty(a)&&n.Dom.safeRemove(a),(0,o.call)(i?s.setCursorBefore:s.setCursorAfter,t),!0}return!1}},88426:function(e,t,i){"use strict";i.d(t,{checkUnwrapListItem:function(){return o}});var n=i(23211);function o(e,t,i){if(!i)return!1;let o=n.Dom.closest(t,"li",e.editor),r=o?o.parentElement:null;if(!o||!n.Dom.isList(r)||!o.previousElementSibling||n.Dom.isEmpty(o)||Array.from(o.childNodes).some(e=>n.Dom.isBlock(e))||!e.s.cursorInTheEdge(!0,o))return!1;let s=e.createInside.element(e.o.enterBlock);if(n.Dom.after(r,s),o.nextElementSibling){let e=r.cloneNode(!1);for(e.removeAttribute("id");o.nextSibling;)n.Dom.append(e,o.nextSibling);if(n.Dom.isTag(r,"ol")){let t=parseInt(r.getAttribute("start")||"1",10)||1;e.setAttribute("start",t+r.children.length-1+"")}n.Dom.after(s,e)}return n.Dom.moveContent(o,s),n.Dom.safeRemove(o),e.s.setCursorBefore(t),!0}},17523:function(e,t,i){"use strict";var n=i(26106),o=i(80951),r=i(58881),s=i(68709),a=i(5771),l=i(2409),u=i(93890),c=i(12443),d=i(10157),h=i(88426);let p=[["remove-unbreakable",u.checkRemoveUnbreakableElement],["remove-not-editable",s.checkRemoveContentNotEditable],["remove-char",r.checkRemoveChar],["table-cell",c.checkTableCell],["remove-empty-parent",l.checkRemoveEmptyParent],["remove-empty-neighbor",a.checkRemoveEmptyNeighbor],["join-two-lists",o.checkJoinTwoLists],["unwrap-list-item",h.checkUnwrapListItem],["join-neighbors",n.checkJoinNeighbors],["unwrap-first-list-item",d.checkUnwrapFirstListItem]];p.map(([,e])=>e),i.d(t,["casesMap",0,p])},33831:function(e,t,i){"use strict";var n=i(81937);i(5266).Config.prototype.delete={hotkeys:{delete:n.IS_MAC?["delete"]:["delete","cmd+backspace"],deleteWord:n.IS_MAC?["ctrl+delete"]:["ctrl+delete","cmd+alt+backspace","ctrl+alt+backspace"],deleteSentence:["ctrl+shift+delete","cmd+shift+delete"],backspace:["backspace"],backspaceWord:n.IS_MAC?[]:["ctrl+backspace"],backspaceSentence:["ctrl+shift+backspace","cmd+shift+backspace"]}}},15200:function(e,t,i){"use strict";i.d(t,{addBRInsideEmptyBlock:function(){return s},findMostNestedNeighbor:function(){return o},getMoveFilter:function(){return r}});var n=i(27795);function o(e,t,i,r=!1){let s=e=>t?e.firstChild:e.lastChild,a=n.Dom.findNotEmptyNeighbor(e,!t,i);if(r&&n.Dom.isElement(a)&&!n.Dom.isInlineBlock(a))return null;if(a)do{if(!s(a))return a;a=s(a)}while(a)return null}function r(e){return t=>!0!==e.e.fire("backSpaceIsMovedIgnore",t)}function s(e,t){t.parentElement!==e.editor&&n.Dom.isBlock(t.parentElement)&&n.Dom.each(t.parentElement,n.Dom.isEmptyTextNode)&&n.Dom.after(t,e.createInside.element("br"))}},91678:function(e,t,i){"use strict";var n=i(28077),o=i(65946),r=i(29434),s=i(5266);i(40291);var a=i(52450),l=i.n(a),u=i(41111),c=i.n(u),d=i(49972),h=i.n(d),p=i(45062),m=i.n(p),f=i(18605),g=i.n(f),_=i(83389),v=i.n(_);n.pluginSystem.add("bold",function(e){let t=t=>{let i,n=s.Config.defaultOptions.controls[t],r={...n.css};Object.keys(r).forEach(e=>{i||(i={}),i[e]=(0,o.isArray)(r[e])?r[e][0]:r[e]});let a=n.tags?n.tags[0]:void 0;return e.s.commitStyle({element:a,exclude:"sub"===a?["sup"]:"sup"===a?["sub"]:[]}),e.synchronizeValues(),!1};["bold","italic","underline","strikethrough"].forEach(t=>{e.registerButton({name:t,group:"font-style"})}),["superscript","subscript"].forEach(t=>{e.registerButton({name:t,group:"script"})}),e.registerCommand("bold",{exec:t,hotkeys:["ctrl+b","cmd+b"]}).registerCommand("italic",{exec:t,hotkeys:["ctrl+i","cmd+i"]}).registerCommand("underline",{exec:t,hotkeys:["ctrl+u","cmd+u"]}).registerCommand("strikethrough",{exec:t}).registerCommand("subscript",{exec:t}).registerCommand("superscript",{exec:t})}),r.Icon.set("bold",l()).set("italic",c()).set("strikethrough",h()).set("subscript",m()).set("superscript",g()).set("underline",v())},40291:function(e,t,i){"use strict";var n=i(5266);n.Config.prototype.controls.subscript={tags:["sub"],tooltip:"Subscript"},n.Config.prototype.controls.superscript={tags:["sup"],tooltip:"Superscript"},n.Config.prototype.controls.bold={tagRegExp:/^(strong|b)$/i,tags:["strong","b"],css:{"font-weight":["bold","700"]},tooltip:"Bold"},n.Config.prototype.controls.italic={tagRegExp:/^(em|i)$/i,tags:["em","i"],css:{"font-style":"italic"},tooltip:"Italic"},n.Config.prototype.controls.underline={tagRegExp:/^(u)$/i,tags:["u"],css:{"text-decoration-line":"underline"},tooltip:"Underline"},n.Config.prototype.controls.strikethrough={tagRegExp:/^(s)$/i,tags:["s"],css:{"text-decoration-line":"line-through"},tooltip:"Strike through"}},58910:function(e,t,i){"use strict";var n=i(25045),o=i(23211),r=i(28077),s=i(71125),a=i(91206),l=i(29434),u=i(5266),c=i(93267),d=i.n(c);u.Config.prototype.controls.classSpan={command:"applyClassName",exec:s.memorizeExec,list:["enabled","disabled","activated","text-left","text-center","text-right","warning","error"],isChildActive(e,t){let i=e.s.current();if(i){let n=o.Dom.closest(i,o.Dom.isElement,e.editor)||e.editor;return!!(t.control.args&&n.classList.contains(t.control.args[0].toString()))}return!1},isActive(e,t){let i=e.s.current();if(i){let n=o.Dom.closest(i,o.Dom.isElement,e.editor)||e.editor,r=!1;return t.control.list&&Object.keys(t.control.list).forEach(e=>{n.classList.contains(e)&&(r=!0)}),!!(n&&n!==e.editor&&void 0!==t.control.list&&r)}return!1},childTemplate:(e,t,i)=>`<span class="${t}">${e.i18n(i)}</span>`,tooltip:"Insert className"};class h extends a.Plugin{afterInit(e){e.registerCommand("applyClassName",(t,i,n)=>(e.s.commitStyle({attributes:{class:n}}),!1))}beforeDestruct(){}constructor(...e){super(...e),(0,n._)(this,"buttons",[{name:"classSpan",group:"script"}])}}r.pluginSystem.add("classSpan",h),l.Icon.set("class-span",d())},11018:function(e,t,i){"use strict";var n=i(25045),o=i(62445),r=i(84839),s=i(23211),a=i(1080),l=i(28077),u=i(48155),c=i(18855);i(11173);var d=i(35104),h=i(54053);class p extends c.Plugin{afterInit(){this.onChangeCleanHTML()}get isEditMode(){return!(this.j.isInDestruct||!this.j.isEditorMode()||this.j.getReadOnly())}onChangeCleanHTML(){if(!this.isEditMode)return;let e=this.j;this.walker.setWork(e.editor),this.currentSelectionNode=e.s.current()}onInputRemovePlaceholderBr(e){this.isEditMode&&("input"!==e.type||!e.isComposing&&e.inputType?.startsWith("insert"))&&(0,h.removePlaceholderBr)(this.j)}startWalker(){let{jodit:e}=this,t=(0,h.getHash)(this.j.o.cleanHTML.allowTags),i=(0,h.getHash)(this.j.o.cleanHTML.denyTags);this.walker.on("visit",n=>(0,h.visitNodeWalker)(e,n,t,i,this.currentSelectionNode)).on("end",e=>{this.j.e.fire(e?"internalChange finishedCleanHTMLWorker":"finishedCleanHTMLWorker")})}beforeCommand(e){if("removeformat"===e.toLowerCase())return this.j.s.isCollapsed()?(0,h.removeFormatForWord)(this.j):(0,h.removeFormatForSelection)(this.j),!1}onAfterSetNativeEditorValue(){(0,u.safeHTML)(this.j.editor,this.j.o.cleanHTML)}onBeforeSetNativeEditorValue(e){let[t,i]=this.j.o.cleanHTML.useIframeSandbox?this.j.createInside.sandbox():[this.j.od.implementation.createHTMLDocument("").body];return t.innerHTML=e.value,this.j.e.fire("safeHTML",t),this.__replaceOldTags(t),e.value=t.innerHTML,(0,u.safeHTML)(t,{safeJavaScriptLink:!0,removeOnError:!0}),s.Dom.safeRemove(i),!1}__replaceOldTags(e){let{replaceOldTags:t,disableCleanFilter:i}=this.j.o.cleanHTML;!t||i?.has("replaceOldTags")||s.Dom.each(e,e=>{(0,d.replaceOldTags)(this.j,e,!1)})}onAfterGetValueFromEditor(e){if(this.__singleQuotesInFontFamily(e),this.__removeTrailingBr(e),!this.j.o.cleanHTML.collapseEmptyValueToEmptyString)return;let t=/^<([a-z][a-z0-9]*)\b[^>]*>(?:<br\/?>)?<\/\1>$/i.exec(e.value.trim());t&&/^(p|div|h[1-6]|blockquote|pre)$/i.test(t[1])&&(e.value="")}__removeTrailingBr(e){if(!this.j.o.cleanHTML.removeTrailingBr||!/<br/i.test(e.value))return;let t=this.j.c.div();t.innerHTML=e.value,[t,...t.querySelectorAll("p, div, li, td, th, h1, h2, h3, h4, h5, h6, blockquote")].forEach(e=>{let t=e.lastChild;if(!s.Dom.isTag(t,"br"))return;let i=t.previousSibling;!i||s.Dom.isTag(i,"br")||(!s.Dom.isText(i)||i.nodeValue?.trim()||i.previousSibling)&&s.Dom.safeRemove(t)}),e.value=t.innerHTML}__singleQuotesInFontFamily(e){this.j.o.cleanHTML.singleQuotesInFontFamily&&e.value.includes("&quot;")&&(e.value=e.value.replace(/\sstyle="([^"]*)"/gi,(e,t)=>{if(!t.includes("&quot;")||!/font-family/i.test(t))return e;let i=t.replace(/font-family\s*:(?:&quot;|[^;])*/gi,e=>e.includes("'")?e:e.replace(/&quot;/g,"'"));return e.replace(t,i)}))}onSafeHTML(e){let t=this.j.o.cleanHTML.sanitizer;t&&(e.innerHTML=t(e.innerHTML)),(0,u.safeHTML)(e,this.j.o.cleanHTML)}beforeDestruct(){this.j.e.off("safeHTML",this.onSafeHTML).off("beforeSetNativeEditorValue",this.onBeforeSetNativeEditorValue).off("afterSetNativeEditorValue",this.onAfterSetNativeEditorValue),this.walker.destruct()}constructor(e){super(e),(0,n._)(this,"buttons",[{name:"eraser",group:"font-style"}]),(0,n._)(this,"currentSelectionNode",null),(0,n._)(this,"walker",new a.LazyWalker(this.j.async,{timeout:this.j.o.cleanHTML.timeout})),e.e.on("safeHTML",this.onSafeHTML).on("beforeSetNativeEditorValue",this.onBeforeSetNativeEditorValue).on("afterSetNativeEditorValue",this.onAfterSetNativeEditorValue)}}(0,o._)([(0,r.watch)([":change",":afterSetMode",":afterInit",":mousedown",":keydown"])],p.prototype,"onChangeCleanHTML",null),(0,o._)([(0,r.watch)([":input","jodit.editor:compositionend"])],p.prototype,"onInputRemovePlaceholderBr",null),(0,o._)([(0,r.hook)("ready")],p.prototype,"startWalker",null),(0,o._)([(0,r.watch)(":beforeCommand")],p.prototype,"beforeCommand",null),(0,o._)([r.autobind],p.prototype,"onAfterSetNativeEditorValue",null),(0,o._)([r.autobind],p.prototype,"onBeforeSetNativeEditorValue",null),(0,o._)([(0,r.watch)(":afterGetValueFromEditor")],p.prototype,"onAfterGetValueFromEditor",null),(0,o._)([r.autobind],p.prototype,"onSafeHTML",null),l.pluginSystem.add("cleanHtml",p)},11173:function(e,t,i){"use strict";var n=i(5266);n.Config.prototype.cleanHTML={timeout:300,removeEmptyElements:!0,fillEmptyParagraph:!0,collapseEmptyValueToEmptyString:!1,singleQuotesInFontFamily:!0,removeTrailingBr:!1,replaceNBSP:!0,replaceOldTags:{i:"em",b:"strong"},allowTags:!1,denyTags:"script,iframe,object,embed",useIframeSandbox:!1,removeOnError:!0,removeEventAttributes:!0,safeJavaScriptLink:!0,safeLinksTarget:!0,allowedStyles:!1,sanitizer:!1,sandboxIframesInContent:!0,convertUnsafeEmbeds:["object","embed"],disableCleanFilter:null},n.Config.prototype.controls.eraser={command:"removeFormat",tooltip:"Clear Formatting"}},5650:function(e,t,i){"use strict";i.d(t,{getHash:function(){return r}});var n=i(85932),o=i(4040);function r(e){let t=/([^[]*)\[([^\]]+)]/,i=/[\s]*,[\s]*/,r=/^(.*)[\s]*=[\s]*(.*)$/,s={};return(0,n.isString)(e)?(e.split(i).map(e=>{e=(0,o.trim)(e);let n=t.exec(e),a={};if(n){let e=n[2].split(i);n[1]&&(e.forEach(e=>{e=(0,o.trim)(e);let t=r.exec(e);t?a[t[1]]=t[2]:a[e]=!0}),s[n[1].toUpperCase()]=a)}else s[e.toUpperCase()]=!0}),s):!!e&&(Object.keys(e).forEach(t=>{s[t.toUpperCase()]=e[t]}),s)}},54053:function(e,t,i){"use strict";i.d(t,{getHash:function(){return n.getHash},removeFormatForSelection:function(){return o.removeFormatForSelection},removeFormatForWord:function(){return r.removeFormatForWord},removePlaceholderBr:function(){return s.removePlaceholderBr},visitNodeWalker:function(){return a.visitNodeWalker}});var n=i(5650);i(37431);var o=i(70195),r=i(54189),s=i(53626),a=i(45219)},28665:function(e,t,i){"use strict";i.d(t,{isAllowedMediaEmbed:function(){return r}});let n=/^(https?:)?\/\/(www\.|m\.|music\.)?youtube(-nocookie)?\.com\/embed\//i,o=/^(https?:)?\/\/player\.vimeo\.com\/video\//i;function r(e){return n.test(e)||o.test(e)}},37431:function(e,t,i){"use strict";i.d(t,{isInlineBlock:function(){return s},removeFormatForCollapsedSelection:function(){return r}});var n=i(81937),o=i(23211);function r(e,t){let{s:i}=e,n=t;if(!n){n=e.createInside.fake();let{range:t}=i;o.Dom.safeInsertNode(t,n),t.collapse()}let r=o.Dom.furthest(n,s,e.editor);if(r)if(i.cursorOnTheLeft(r))o.Dom.before(r,n);else if(i.cursorOnTheRight(r))o.Dom.after(r,n);else{let e=i.splitSelection(r);e&&o.Dom.after(e,n)}t||(i.setCursorBefore(n),o.Dom.safeRemove(n))}function s(e){return o.Dom.isInlineBlock(e)&&!o.Dom.isTag(e,n.INSEPARABLE_TAGS)}},70195:function(e,t,i){"use strict";i.d(t,{removeFormatForSelection:function(){return s}});var n=i(23211),o=i(93640),r=i(37431);function s(e){let{s:t,editor:i,createInside:s}=e,{range:a}=t,l=a.cloneRange(),u=a.cloneRange(),c=s.fake(),d=s.fake();l.collapse(!0),u.collapse(!1),n.Dom.safeInsertNode(l,c),n.Dom.safeInsertNode(u,d),a.setStartBefore(c),a.collapse(!0),t.selectRange(a),(0,r.removeFormatForCollapsedSelection)(e,c),a.setEndAfter(d),a.collapse(!1),t.selectRange(a),(0,r.removeFormatForCollapsedSelection)(e,d);let h=[];n.Dom.between(c,d,e=>{(0,r.isInlineBlock)(e)&&!n.Dom.isTag(e,"a")&&h.push(e),n.Dom.isElement(e)&&(0,o.attr)(e,"style")&&(0,o.attr)(e,"style",null)}),h.forEach(e=>n.Dom.unwrap(e));let p=(e,t)=>{if(!n.Dom.findNotEmptySibling(e,t)){let n=e.parentNode;if(n&&n!==i&&(0,o.attr)(n,"style"))return(0,o.attr)(n,"style",null),p(n,t),!0}};p(c,!0)&&p(d,!1),a.setStartAfter(c),a.setEndBefore(d),t.selectRange(a),n.Dom.safeRemove(c),n.Dom.safeRemove(d)}},54189:function(e,t,i){"use strict";i.d(t,{removeFormatForWord:function(){return s}});var n=i(81937),o=i(23211),r=i(70195);function s(e){let{range:t}=e.s,i=o.Dom.closest(t.startContainer,o.Dom.isBlock,e.editor);if(!i)return;let n=l(i),s=n.map(e=>o.Dom.isText(e)?e.nodeValue:" ").join(""),d=function(e,t){let i=0;for(let n of e){if(n===t.startContainer)return i+t.startOffset;let e=u(n);if(t.comparePoint(n,o.Dom.isText(n)?e:0)>0)break;i+=e}return i}(n,t);if(!a(s[d-1])||!a(s[d]))return;let h=d,p=d;for(;a(s[h-1]);)h-=1;for(;a(s[p]);)p+=1;let m=e.s.createRange();m.setStart(...c(n,h,!0)),m.setEnd(...c(n,p,!1)),e.s.selectRange(m),(0,r.removeFormatForSelection)(e);let f=e.s.createRange();f.setStart(...c(l(i),d,!1)),e.s.selectRange(f)}function a(e){return!!(e&&e!==n.INVISIBLE_SPACE&&/\S/.test(e))}function l(e){let t=[];return o.Dom.each(e,i=>{!o.Dom.closest(i,o.Dom.isBlock,e)&&(o.Dom.isText(i)||o.Dom.isTag(i,n.INSEPARABLE_TAGS))&&t.push(i)}),t}function u(e){return o.Dom.isText(e)?e.nodeValue?.length??0:1}function c(e,t,i){let n=0,r=null;for(let s of e){let e=u(s);if(o.Dom.isText(s)&&(t<n+e||!i&&t===n+e))return[s,t-n];o.Dom.isText(s)&&(r=s),n+=e}return[r,r?.nodeValue?.length??0]}},53626:function(e,t,i){"use strict";i.d(t,{removePlaceholderBr:function(){return a}});var n=i(81937),o=i(23211),r=i(4040);function s(e){let t=e.lastChild;for(;o.Dom.isText(t)&&!t.nodeValue;)t=t.previousSibling;return t}function a(e){let t=o.Dom.closest(e.s.current(),o.Dom.isBlock,e.editor);if(!t||!(0,r.trim)(t.textContent??""))return;let i=s(t);for(;o.Dom.isElement(i)&&!o.Dom.isTag(i,n.INSEPARABLE_TAGS)&&!o.Dom.isBlock(i);)i=s(i);!o.Dom.isTag(i,"br")||o.Dom.each(t,e=>{if(e!==i&&o.Dom.isElement(e)&&(o.Dom.isTag(e,n.INSEPARABLE_TAGS)||o.Dom.isBlock(e)||o.Dom.isHTMLElement(e)&&!e.isContentEditable))return!1})&&o.Dom.safeRemove(i)}},95559:function(e,t,i){"use strict";i.d(t,{allowAttributes:function(){return r}});var n=i(23211),o=i(7909);function r(e,t,i,r){let s=r&&n.Dom.isElement(t)&&r[t.nodeName];if(r&&n.Dom.isElement(t)&&!0!==s){if(!s)return i;let e=t.attributes;if(e&&e.length){let n=[];for(let t=0;t<e.length;t+=1){let i=s[e[t].name];i&&(!0===i||i===e[t].value)||n.push(e[t].name)}n.length&&(i=!0),n.forEach(e=>{(0,o.attrRaw)(t,e,null)})}}return i}},85085:function(e,t,i){"use strict";i.d(t,{convertUnsafeEmbeds:function(){return r}});var n=i(23211),o=i(7909);function r(e,t,i){let r=e.o.cleanHTML.convertUnsafeEmbeds;if(!r||!n.Dom.isElement(t))return i;let s=t.nodeName.toLowerCase();if(!r.includes(s))return i;let a=(0,o.attr)(t,"data")||(0,o.attr)(t,"src")||(0,o.attr)(t,"movie")||"";if(!a)return n.Dom.safeRemove(t),!0;let l=e.createInside.element("iframe");return(0,o.attr)(l,{src:a,sandbox:"",frameborder:"0",width:(0,o.attr)(t,"width"),height:(0,o.attr)(t,"height")}),n.Dom.replace(t,l,void 0,!1,!0),!0}},39188:function(e,t,i){"use strict";i.d(t,{fillEmptyParagraph:function(){return s}});var n=i(81937),o=i(23211);let r=new Set(["table","tbody","thead","tfoot","tr"]);function s(e,t,i){if(e.o.cleanHTML.fillEmptyParagraph&&o.Dom.isBlock(t)&&o.Dom.isEmpty(t,n.INSEPARABLE_TAGS)&&!o.Dom.isTag(t,r)){let i=e.createInside.element("br");return o.Dom.append(t,i),!0}return i}},91560:function(e,t,i){"use strict";i.r(t),i.d(t,{allowAttributes:function(){return n.allowAttributes},convertUnsafeEmbeds:function(){return o.convertUnsafeEmbeds},fillEmptyParagraph:function(){return r.fillEmptyParagraph},removeEmptyTextNode:function(){return s.removeEmptyTextNode},removeInvTextNodes:function(){return a.removeInvTextNodes},replaceOldTags:function(){return l.replaceOldTags},safeLinksTarget:function(){return u.safeLinksTarget},sandboxIframesInContent:function(){return c.sandboxIframesInContent},sanitizeAttributes:function(){return d.sanitizeAttributes},sanitizeStyles:function(){return h.sanitizeStyles},tryRemoveNode:function(){return p.tryRemoveNode}});var n=i(95559),o=i(85085),r=i(39188),s=i(94561),a=i(53514),l=i(35104),u=i(77041),c=i(66647),d=i(65015),h=i(60220),p=i(27611)},94561:function(e,t,i){"use strict";i.d(t,{removeEmptyTextNode:function(){return o}});var n=i(23211);function o(e,t,i,o,r,s){return n.Dom.isText(t)&&!t.nodeValue?(t===s&&e.s.isFocused()&&e.s.isCollapsed()&&e.s.setCursorAfter(t),n.Dom.safeRemove(t),!0):i}},53514:function(e,t,i){"use strict";i.d(t,{removeInvTextNodes:function(){return r}});var n=i(81937),o=i(23211);function r(e,t,i,r,s,a){if(a===t||!o.Dom.isText(t)||null==t.nodeValue||!(0,n.INVISIBLE_SPACE_REG_EXP)().test(t.nodeValue))return i;let l=o.Dom.furthest(a,o.Dom.isBlock,e.editor);return!l||o.Dom.isOrContains(l,t)?i:(t.nodeValue=t.nodeValue.replace((0,n.INVISIBLE_SPACE_REG_EXP)(),""),t===a&&e.s.isFocused()&&e.s.isCollapsed()&&e.s.setCursorAfter(t),t.nodeValue||o.Dom.safeRemove(t),!0)}},35104:function(e,t,i){"use strict";i.d(t,{replaceOldTags:function(){return o}});var n=i(23211);function o(e,t,i){let o=function(e,t,i){if(!i||!n.Dom.isHTMLElement(t))return t;let o=i[t.nodeName.toLowerCase()]||i[t.nodeName];if(o){let i=function(e,t){let{sel:i}=e.s;if(!i?.anchorNode||!i.focusNode||!e.s.isFocused())return null;let{anchorNode:o,anchorOffset:r,focusNode:s,focusOffset:a}=i;return n.Dom.isOrContains(t,o)||n.Dom.isOrContains(t,s)?e=>{i.setBaseAndExtent(o===t?e:o,r,s===t?e:s,a)}:null}(e,t),r=n.Dom.replace(t,o,e.createInside,!0,!1);return i?.(r),r}return t}(e,t,e.o.cleanHTML.replaceOldTags);return t!==o||i}},77041:function(e,t,i){"use strict";i.d(t,{safeLinksTarget:function(){return r}});var n=i(23211),o=i(7909);function r(e,t,i){if(!e.o.cleanHTML.safeLinksTarget||!n.Dom.isElement(t)||"A"!==t.nodeName||"_blank"!==(0,o.attr)(t,"target"))return i;let r=((0,o.attr)(t,"rel")||"").split(/\s+/).filter(Boolean),s=!1;return(r.includes("noopener")||(r.push("noopener"),s=!0),r.includes("noreferrer")||(r.push("noreferrer"),s=!0),s)?((0,o.attr)(t,"rel",r.join(" ")),!0):i}},66647:function(e,t,i){"use strict";i.d(t,{sandboxIframesInContent:function(){return s}});var n=i(23211),o=i(7909),r=i(28665);function s(e,t,i){return e.o.cleanHTML.sandboxIframesInContent&&n.Dom.isElement(t)&&"IFRAME"===t.nodeName?(0,r.isAllowedMediaEmbed)((0,o.attr)(t,"src")||"")||t.hasAttribute("sandbox")?i:((0,o.attr)(t,"sandbox",""),!0):i}},65015:function(e,t,i){"use strict";i.d(t,{sanitizeAttributes:function(){return r}});var n=i(23211),o=i(65946);function r(e,t,i){if(!n.Dom.isElement(t))return i;let r=e.options.cleanHTML;return!!(0,o.sanitizeHTMLElement)(t,{safeJavaScriptLink:r.safeJavaScriptLink,removeOnError:r.removeOnError,removeEventAttributes:r.removeEventAttributes,safeLinksTarget:r.safeLinksTarget})||i}},60220:function(e,t,i){"use strict";i.d(t,{sanitizeStyles:function(){return r}});var n=i(23211),o=i(7909);function r(e,t,i){let r=e.o.cleanHTML.allowedStyles;if(!r||!n.Dom.isElement(t))return i;let s=(0,o.attr)(t,"style");if(!s)return i;let a=function(e,t){let i=t[e],n=t["*"];if(!i&&!n)return null;let o=new Set;if(n)for(let e of n)o.add(e.toLowerCase());if(i)for(let e of i)o.add(e.toLowerCase());return o}(t.nodeName.toLowerCase(),r);if(!a)return i;let l=s.split(";").map(e=>e.trim()).filter(e=>{if(!e)return!1;let t=e.indexOf(":");if(-1===t)return!1;let i=e.substring(0,t).trim().toLowerCase();return a.has(i)}).join("; ").replace(/;\s*$/,"");return l!==s?((0,o.attr)(t,"style",l||null),!0):i}},27611:function(e,t,i){"use strict";i.d(t,{tryRemoveNode:function(){return l}});var n=i(81937),o=i(23211),r=i(4040),s=i(7909),a=i(28665);function l(e,t,i,l,u,c){return!function(e,t,i,l,u){if(!o.Dom.isText(t)){let e=t.nodeName.toUpperCase();if(l&&!l[e])return!0;let i="IFRAME"===e&&(0,a.isAllowedMediaEmbed)((0,s.attr)(t,"src")||"");if(!l&&u&&u[e]&&!i)return!0}if(!e.o.cleanHTML.removeEmptyElements)return!1;let c=e.s.isCollapsed()?e.s.range.startContainer:null;return o.Dom.isElement(t)&&null!=t.nodeName.match(n.IS_INLINE)&&!o.Dom.isTemporary(t)&&!(t.hasAttribute("id")||"A"===t.nodeName&&t.hasAttribute("name"))&&0===(0,r.trimInv)(t.innerHTML).length&&(null==i||!o.Dom.isOrContains(t,i))&&(null==c||!o.Dom.isOrContains(t,c))}(e,t,c,l,u)?i:(o.Dom.safeRemove(t),!0)}},45219:function(e,t,i){"use strict";i.d(t,{visitNodeWalker:function(){return s}});var n=i(81937),o=i(91560);let r=Object.keys(o);function s(e,t,i,s,a){let l=!1,u=e.o.cleanHTML.disableCleanFilter;for(let c of r)if(!(u&&u.has(c))&&(l=(0,o[c])(e,t,l,i,s,a),n.IS_PROD,!t.isConnected))return!0;return l}},43354:function(e,t,i){"use strict";var n=i(25045),o=i(81937),r=i(51676),s=i(23211),a=i(28077),l=i(65946);i(81008);class u{init(e){this.buttons?.forEach(t=>e.registerButton(t)),e.e.off(`copy.${o.CLIPBOARD_ID} cut.${o.CLIPBOARD_ID}`).on(`copy.${o.CLIPBOARD_ID} cut.${o.CLIPBOARD_ID}`,t=>{let i=function(e,t){if(!t||e.s.isCollapsed())return t;let i=e.s.range.commonAncestorContainer;s.Dom.isElement(i)||(i=i.parentElement);let n=t;for(;i&&i!==e.editor&&s.Dom.isElement(i)&&!s.Dom.isBlock(i);){let e=i.cloneNode(!1);e.innerHTML=n,n=e.outerHTML,i=i.parentElement}return n}(e,e.s.html),n=(0,l.getDataTransfer)(t)||(0,l.getDataTransfer)(e.ew)||(0,l.getDataTransfer)(t.originalEvent);n&&(n.setData(o.TEXT_PLAIN,(0,l.stripTags)(i)),n.setData(o.TEXT_HTML,i)),e.buffer.set(o.CLIPBOARD_ID,i),e.e.fire("pasteStack",{html:i,action:e.o.defaultActionOnPaste||o.INSERT_AS_HTML}),"cut"===t.type&&(e.s.remove(),e.s.focus()),t.preventDefault(),e?.events?.fire("afterCopy",i)})}destruct(e){(0,r.cached)(e,"buffer")?.set(o.CLIPBOARD_ID,""),e?.events?.off("."+o.CLIPBOARD_ID)}constructor(){(0,n._)(this,"jodit",void 0),(0,n._)(this,"buttons",[{name:"cut",group:"clipboard"},{name:"copy",group:"clipboard"},{name:"paste",group:"clipboard"},{name:"selectall",group:"clipboard"}])}}a.pluginSystem.add("clipboard",u)},81008:function(e,t,i){"use strict";var n=i(29434),o=i(5266),r=i(51457),s=i.n(r),a=i(23602),l=i.n(a),u=i(86899),c=i.n(u),d=i(95320),h=i.n(d);o.Config.prototype.controls.cut={command:"cut",isDisabled:e=>e.s.isCollapsed(),tooltip:"Cut selection"},o.Config.prototype.controls.copy={command:"copy",isDisabled:e=>e.s.isCollapsed(),tooltip:"Copy selection"},o.Config.prototype.controls.selectall={icon:"select-all",command:"selectall",tooltip:"Select all"},n.Icon.set("copy",s()).set("cut",l()).set("paste",c()).set("select-all",h())},42462:function(e,t,i){"use strict";var n=i(28077),o=i(65946);i(8071),n.pluginSystem.add("color",function(e){e.registerButton({name:"brush",group:"color"});let t=(t,i,n)=>{let r=(0,o.normalizeColor)(n)||"",s="background"===t?{backgroundColor:r}:{color:r},a=e.getInstance("Table",e.o).getAllSelectedCells();return a.length&&e.s.isCollapsed()?(a.forEach(t=>{e.s.select(t,!0),e.s.commitStyle({attributes:{style:s}})}),e.s.sel?.removeAllRanges()):e.s.commitStyle({attributes:{style:s}}),e.synchronizeValues(),!1};e.registerCommand("forecolor",t).registerCommand("background",t)})},8071:function(e,t,i){"use strict";var n=i(23211),o=i(65946),r=i(29434),s=i(5266),a=i(15753),l=i(45674),u=i.n(l);function c(e,t,i){(0,o.css)(e,t,i),(0,o.attr)(e,"style")||(0,o.attr)(e,"style",null)}r.Icon.set("brush",u()),s.Config.prototype.controls.brushCell={isVisible:e=>!e.o.disablePlugins.includes("color"),icon:"brush",popup(e,t,i){if(!(0,o.isJoditObject)(e))return;let n=e.getInstance("Table",e.o).getAllSelectedCells();if(!n.length)return!1;let r=t=>(0,a.ColorPickerWidget)(e,o=>{n.forEach(e=>{c(e,t,o)}),e.lock(),e.synchronizeValues(),i(),e.unlock()},(0,o.css)(n[0],t));return(0,a.TabsWidget)(e,[{name:"Background",content:r("background-color")},{name:"Text",content:r("color")},{name:"Border",content:r("border-color")}])},tooltip:"Background"},s.Config.prototype.controls.brush={isVisible:e=>!e.o.disablePlugins.includes("color"),update(e,t){let i=(0,o.dataBind)(t,"color"),r=(i,n)=>!!n&&n!==(0,o.css)(e.editor,i).toString()&&(t.state.icon.fill=n,!0);if(i){let e=(0,o.dataBind)(t,"color");r("color"===e?e:"background-color",i);return}let s=e.s.current();if(s&&!t.state.disabled){let t=n.Dom.closest(s,n.Dom.isElement,e.editor)||e.editor,i=r("color",(0,o.css)(t,"color").toString()),a=r("background-color",(0,o.css)(t,"background-color").toString());if(i||a)return}t.state.icon.fill="",t.state.activated=!1},popup(e,t,i,r){let s="",l="",u,d=null;return t&&t!==e.editor&&n.Dom.isNode(t)&&(n.Dom.isElement(t)&&e.s.isCollapsed()&&!n.Dom.isTag(t,new Set(["br","hr"]))&&(d=t),n.Dom.up(t,e=>{if(n.Dom.isHTMLElement(e)){let t=(0,o.css)(e,"color",!0),i=(0,o.css)(e,"background-color",!0);if(t)return s=t.toString(),!0;if(i)return l=i.toString(),!0}},e.editor)),u=[{name:"Background",content:(0,a.ColorPickerWidget)(e,t=>{d?c(d,"backgroundColor",t):e.execCommand("background",!1,t),(0,o.dataBind)(r,"color",t),(0,o.dataBind)(r,"color-mode","background"),i()},l)},{name:"Text",content:(0,a.ColorPickerWidget)(e,t=>{d?c(d,"color",t):e.execCommand("forecolor",!1,t),(0,o.dataBind)(r,"color",t),(0,o.dataBind)(r,"color-mode","color"),i()},s)}],"background"!==e.o.colorPickerDefaultTab&&(u=u.reverse()),(0,a.TabsWidget)(e,u,d)},exec(e,t,{button:i}){let r=(0,o.dataBind)(i,"color-mode"),s=(0,o.dataBind)(i,"color");if(!r)return!1;if(t&&t!==e.editor&&n.Dom.isNode(t)&&n.Dom.isElement(t))switch(r){case"color":c(t,"color",s);break;case"background":c(t,"backgroundColor",s)}else e.execCommand("background"===r?r:"forecolor",!1,s)},tooltip:"Fill color or set the text color"}},30062:function(e,t,i){"use strict";var n=i(23211),o=i(28077),r=i(80991),s=i(29434),a=i(5266),l=i(3843),u=i.n(l),c=i(38639);let d="copy-format",h=["lineHeight","fontWeight","fontStyle","fontSize","fontFamily","color","margin","padding","borderWidth","borderStyle","borderColor","borderRadius","backgroundColor","textDecorationLine"],p=(e,t,i,n)=>{let o=(0,r.css)(i,t);return o===n[t]&&(o=i.parentNode&&i!==e.editor&&i.parentNode!==e.editor?p(e,t,i.parentNode,n):void 0),o};a.Config.prototype.controls.copyformat={exec(e,t,{button:i}){if(t){if(e.buffer.exists(d))e.buffer.delete(d),e.e.off(e.editor,"mouseup."+d);else{let i,o={},s=n.Dom.up(t,e=>e&&!n.Dom.isText(e),e.editor)||e.editor,a=e.createInside.span();n.Dom.append(e.editor,a),h.forEach(e=>{o[e]=(0,r.css)(a,e)}),a!==e.editor&&n.Dom.safeRemove(a);let l=(i={},s&&h.forEach(t=>{i[t]=p(e,t,s,o),t.match(/border(Style|Color)/)&&!i.borderWidth&&(i[t]=void 0)}),i);e.e.on(e.editor,"mouseup."+d,()=>{e.buffer.delete(d);let t=e.s.current();t&&(n.Dom.isTag(t,"img")?(0,r.css)(t,l):e.s.commitStyle({attributes:{style:l}})),e.e.off(e.editor,"mouseup."+d)}),e.buffer.set(d,!0)}i.update()}},isActive:e=>e.buffer.exists(d),tooltip:"Paint format"},o.pluginSystem.add("copyformat",function(e){e.registerButton({name:"copyformat",group:"clipboard"}),(0,o.extendLang)(c)}),s.Icon.set("copyformat",u())},35830:function(e){e.exports={"copy-format":"نسخ التنسيق"}},3787:function(e){e.exports={"copy-format":"Kopírovat formát"}},83778:function(e){e.exports={"copy-format":"Format kopierenт"}},70577:function(e){e.exports={"copy-format":"Copiar formato"}},15552:function(e){e.exports={"copy-format":"کپی کردن قالب"}},79400:function(e){e.exports={"copy-format":"Kopioi muotoilu"}},21513:function(e){e.exports={"copy-format":"Format de copie"}},40998:function(e){e.exports={"copy-format":"העתק עיצוב"}},22998:function(e){e.exports={"copy-format":"Formátum másolás"}},52504:function(e){e.exports={"copy-format":"salin format"}},38639:function(e,t,i){"use strict";i.r(t),i.d(t,{ar:function(){return n},cs_cz:function(){return o},de:function(){return r},es:function(){return s},fa:function(){return a},fi:function(){return l},fr:function(){return u},he:function(){return c},hu:function(){return d},id:function(){return h},it:function(){return p},ja:function(){return m},ko:function(){return f},mn:function(){return g},nl:function(){return _},pl:function(){return v},pt_br:function(){return b},ru:function(){return y},tr:function(){return w},zh_cn:function(){return k},zh_tw:function(){return S}});var n=i(35830),o=i(3787),r=i(83778),s=i(70577),a=i(15552),l=i(79400),u=i(21513),c=i(40998),d=i(22998),h=i(52504),p=i(66568),m=i(83708),f=i(37023),g=i(1678),_=i(58067),v=i(35109),b=i(22380),y=i(12872),w=i(31371),k=i(41599),S=i(15223)},66568:function(e){e.exports={"copy-format":"Copia il formato"}},83708:function(e){e.exports={"copy-format":"copyformat"}},37023:function(e){e.exports={"copy-format":"복사 형식"}},1678:function(e){e.exports={"copy-format":"Формат хуулах"}},58067:function(e){e.exports={"copy-format":"opmaak kopiëren"}},35109:function(e){e.exports={"copy-format":"format kopii"}},22380:function(e){e.exports={"copy-format":"Copiar formato"}},12872:function(e){e.exports={"copy-format":"Копировать формат"}},31371:function(e){e.exports={"copy-format":"Kopyalama Biçimi"}},41599:function(e){e.exports={"copy-format":"复制格式"}},15223:function(e){e.exports={"copy-format":"複製格式"}},63974:function(e,t,i){"use strict";var n=i(25045),o=i(81937),r=i(27795),s=i(28077),a=i(65946),l=i(4040),u=i(91206);let c=new Set(["img","table","jodit","iframe","hr"]),d=new Set(["pre","pre-wrap","break-spaces"]);function h(e,t){let i=0;for(;i<e.length&&" "===e.charAt(t?e.length-1-i:i);)i+=1;return 0===i?e:t?e.slice(0,e.length-i)+o.NBSP_SPACE.repeat(i):o.NBSP_SPACE.repeat(i)+e.slice(i)}function p(e,t){return!e||r.Dom.isTag(e,"br")||r.Dom.isBlock(e)||r.Dom.isText(e)&&t.test(e.nodeValue??"")}class m extends u.Plugin{afterInit(e){e.e.on("afterCommand.delete",e=>{"delete"===e&&this.__afterDeleteCommand()}),e.registerCommand("delete",{exec:this.__onDeleteCommand.bind(this)},{stopPropagation:!1})}beforeDestruct(e){e.e.off("afterCommand.delete")}__afterDeleteCommand(){let e=this.j,t=e.s.current();if(t&&r.Dom.isTag(t.firstChild,"br")&&e.s.removeNode(t.firstChild),!(0,l.trim)(e.editor.textContent||"")&&!r.Dom.first(e.editor,e=>r.Dom.isTag(e,c))&&(!t||!r.Dom.closest(t,"table",e.editor))){r.Dom.detach(e.editor);let t=e.s.setCursorIn(e.editor);e.s.removeNode(t)}}__onDeleteCommand(e,t,i){let{jodit:n}=this;if(n.s.isCollapsed())return;n.s.expandSelection();let o=n.s.range;this.__moveEdgesIntoCells(o);let s=!0===i?this.__formatTakenWhole(o):[],a=this.__clearSelectedCells(o);if(a&&o.collapsed)return n.s.selectRange(a),!1;o.deleteContents();let l=n.createInside.fake();o.insertNode(l);let u=r.Dom.findSibling(l,!0),c=r.Dom.findSibling(l,!1);return this.__moveContentInLeftSibling(l,u,c),this.__keepSpacesVisible(l),this.__keepSpacesVisibleBesideTable(l),o.setStartBefore(l),o.collapse(!0),s.length&&!a?this.__keepFormat(s,l,o):(this.__moveCursorInEditableSibling(n,u,l,o),this.__addBrInEmptyBlock(l,o)),r.Dom.safeRemove(l),n.s.selectRange(a??o),!1}__moveEdgesIntoCells(e){let{startContainer:t,startOffset:i,endContainer:n,endOffset:o}=e,s=r.Dom.isTag(t,"tr")?t.childNodes[i]:null,a=r.Dom.isTag(n,"tr")?n.childNodes[o-1]:null;r.Dom.isCell(s)&&e.setStart(s,0),r.Dom.isCell(a)&&e.setEnd(a,a.childNodes.length)}__formatTakenWhole(e){let t=[],i=this.jodit.s.createRange(),{startContainer:n,startOffset:o}=e,s=r.Dom.isText(n)?null:n.childNodes[o];for(;r.Dom.isHTMLElement(s);){var l;if(i.selectNode(s),0>e.compareBoundaryPoints(Range.END_TO_END,i))break;if(l=s,r.Dom.isHTMLElement(l)&&!l.hasAttribute("contenteditable")&&!r.Dom.isTemporary(l)&&(/^(STRONG|B|EM|I|U|S|SUB|SUP)$/.test(l.nodeName)||r.Dom.isTag(l,"span")&&l.hasAttribute("style")))t.push(s);else if(t.length||!r.Dom.isBlock(s))break;s=(0,a.toArray)(s.childNodes).find(e=>!r.Dom.isText(e)||(0,a.trimInv)(e.nodeValue??""))}return t}__keepFormat(e,t,i){let n=e.map(e=>e.cloneNode(!1));for(let e=1;e<n.length;e+=1)r.Dom.append(n[e-1],n[e]);let s=this.jodit.createInside.text(o.INVISIBLE_SPACE);r.Dom.append(n[n.length-1],s),r.Dom.before(t,n[0]),i.setStartAfter(s),i.collapse(!0)}__clearSelectedCells(e){let{editor:t,createInside:i}=this.j,n=r.Dom.closest(e.startContainer,r.Dom.isCell,t),o=r.Dom.closest(e.endContainer,r.Dom.isCell,t);if(n===o)return null;let s=r.Dom.closest(n,"table",t),l=r.Dom.closest(o,"table",t),u=e.cloneRange();u.collapse(!0);let c=e.cloneRange();c.collapse(!1);let d=[],h=t=>{(0,a.toArray)(t.rows).flatMap(e=>(0,a.toArray)(e.cells)).filter(t=>e.intersectsNode(t)).forEach(t=>{let i=e.cloneRange();r.Dom.isOrContains(t,e.startContainer)||i.setStart(t,0),r.Dom.isOrContains(t,e.endContainer)||i.setEnd(t,t.childNodes.length),d.push([t,i])})};return s&&(h(s),s===l?e.collapse(!0):e.setStartAfter(s)),l&&l!==s&&(h(l),e.setEndBefore(l)),d.forEach(([e,t])=>{if(t.deleteContents(),r.Dom.isEmpty(e)){r.Dom.detach(e),r.Dom.append(e,i.element("br"));return}[u,c].filter(t=>r.Dom.isOrContains(e,t.startContainer)).forEach(e=>{let t=i.fake();e.insertNode(t),this.__keepSpacesVisible(t),e.setStartBefore(t),e.collapse(!0),r.Dom.safeRemove(t)})}),s?u:null}__moveContentInLeftSibling(e,t,i){if(t=this.__defineRightLeftBox(t),r.Dom.isTag(t,"table")){r.Dom.isBlock(i)&&r.Dom.isEmpty(i)&&r.Dom.safeRemove(i);return}if(!r.Dom.isList(i)&&!r.Dom.isTag(i,"table")&&r.Dom.isBlock(i)&&r.Dom.isBlock(t)&&(r.Dom.append(t,e),r.Dom.moveContent(i,t),r.Dom.safeRemove(i)),r.Dom.isList(i)&&r.Dom.isLeaf(i.firstElementChild)){let n=i.firstElementChild;if(!r.Dom.isEmpty(n)&&r.Dom.isBlock(t))for(r.Dom.append(t,e);n.firstChild&&!r.Dom.isBlock(n.firstChild);)r.Dom.append(t,n.firstChild);r.Dom.isEmpty(n)&&r.Dom.safeRemove(n),r.Dom.isEmpty(i)&&r.Dom.safeRemove(i)}}__keepSpacesVisible(e){let{jodit:t}=this,i=r.Dom.closest(e,r.Dom.isBlock,t.editor)??t.editor;if(d.has(t.ew.getComputedStyle(i).whiteSpace))return;let n=this.__findNeighbor(e,!0,i),o=this.__findNeighbor(e,!1,i);r.Dom.isText(n)&&p(o,/^ /)&&(n.nodeValue=h(n.nodeValue,!0)),r.Dom.isText(o)&&p(n,/ $/)&&(o.nodeValue=h(o.nodeValue,!1))}__keepSpacesVisibleBesideTable(e){let t=r.Dom.findNotEmptySibling(e,!0),i=r.Dom.findNotEmptySibling(e,!1),n=r.Dom.isTag(i,"table")?t:r.Dom.isTag(t,"table")?i:null;if(!r.Dom.isBlock(n)||r.Dom.isTag(n,"table"))return;let o=this.jodit.createInside.fake();n===t?r.Dom.append(n,o):n.insertBefore(o,n.firstChild),this.__keepSpacesVisible(o),r.Dom.safeRemove(o)}__findNeighbor(e,t,i){return(0,a.call)(t?r.Dom.prev:r.Dom.next,e,e=>r.Dom.isText(e)?(0,a.trimInv)(e.nodeValue??"").length>0:!r.Dom.isComment(e)&&!(r.Dom.isInlineBlock(e)&&e.firstChild),i)}__defineRightLeftBox(e){if(!r.Dom.isList(e))return e;let t=e.lastElementChild;return r.Dom.isLeaf(t)||(t=this.j.createInside.element("li"),r.Dom.append(e,t)),t}__addBrInEmptyBlock(e,t){let i=this.j;if(e.isConnected&&r.Dom.isBlock(e.parentNode)&&!e.nextSibling&&!e.previousSibling){let n=i.createInside.element("br");r.Dom.after(e,n),t.setStartBefore(n),t.collapse(!0)}}__moveCursorInEditableSibling(e,t,i,n){if(!t||!r.Dom.isText(t)){let t=r.Dom.closest(i,r.Dom.isBlock,e.editor)??e.editor,o=r.Dom.prev(i,r.Dom.isText,t);o&&(n.setStartAfter(o),n.collapse(!0),r.Dom.safeRemove(i))}}}(0,n._)(m,"requires",["backspace"]),s.pluginSystem.add("deleteCommand",m)},65701:function(e,t,i){"use strict";i(5266).Config.prototype.draggableTags=["img","jodit-media","jodit"]},43102:function(e,t,i){"use strict";var n=i(25045),o=i(62445),r=i(84839),s=i(27795),a=i(28077),l=i(65946),u=i(91206);i(65701);class c extends u.Plugin{afterInit(){this.dragList=this.j.o.draggableTags?(0,l.splitArray)(this.j.o.draggableTags).filter(Boolean).map(e=>e.toLowerCase()):[],this.j.e.on("startDragElement",this.onStartDragElement),this.dragList.length&&this.j.e.on("mousedown dragstart",this.onDragStart)}onStartDragElement(e,t){this.isInDestruct||this.state>0||!e||this.startDragging(e,t)}onDragStart(e){if("dragstart"===e.type&&this.draggable)return!1;if(this.state>0)return;let t=e.target;if(!this.dragList.length||!t)return;let i=e=>!!(e&&this.dragList.includes(e.nodeName.toLowerCase())),n=s.Dom.furthest(t,i,this.j.editor)||(i(t)?t:null);n&&(s.Dom.isTag(n.parentElement,"a")&&n.parentElement.firstChild===n&&n.parentElement.lastChild===n&&(n=n.parentElement),this.startDragging((0,l.getCaptionWrapper)(this.j,n)??n,e))}startDragging(e,t){this.startX=t.clientX,this.startY=t.clientY,this.isCopyMode=(0,l.ctrlKey)(t),this.draggable=e.cloneNode(!0),(0,l.dataBind)(this.draggable,"target",e),this.state=1,this.addDragListeners()}onDrag(e){if(!this.draggable||0===this.state)return;let t=e.clientX,i=e.clientY;if(1===this.state&&Math.sqrt(Math.pow(t-this.startX,2)+Math.pow(i-this.startY,2))<this.diffStep)return;1===this.state&&(this.j.lock("drag-and-drop-element"),this.state=2),this.j.e.fire("hidePopup hideResizer");let n=this.__ghostOffset();if(!this.draggable.parentNode){let t=(0,l.dataBind)(this.draggable,"target");(0,l.css)(this.draggable,{zIndex:1e13,pointerEvents:"none",pointer:"drag",position:"fixed",opacity:.7,display:"inline-block",left:e.clientX+n.left,top:e.clientY+n.top,width:t?.offsetWidth??100,height:t?.offsetHeight??100}),s.Dom.append((0,a.getContainer)(this.j,c),this.draggable)}(0,l.css)(this.draggable,{left:e.clientX+n.left,top:e.clientY+n.top}),this.j.s.insertCursorAtPoint(e.clientX,e.clientY)}__ghostOffset(){let e=this.j.iframe;if(!e)return{left:0,top:0};let t=e.getBoundingClientRect();return{left:t.left,top:t.top}}onDragEnd(){!this.isInDestruct&&(this.removeDragListeners(),this.j.unlock(),this.state=0,this.draggable&&(s.Dom.safeRemove(this.draggable),this.draggable=null))}onDrop(){if(!this.draggable||this.state<2)return void this.onDragEnd();let e=(0,l.dataBind)(this.draggable,"target");this.onDragEnd(),this.isCopyMode&&(e=e.cloneNode(!0));let{parentElement:t}=e;this.j.s.insertNode(e,!0,!1),[e.previousSibling,e.nextSibling].forEach(e=>{s.Dom.isEmptyTextNode(e)&&s.Dom.safeRemove(e)}),t&&s.Dom.isEmpty(t)&&!s.Dom.isCell(t)&&s.Dom.safeRemove(t),s.Dom.isTag(e,"img")&&this.j.e&&this.j.e.fire("afterInsertImage",e),this.j.e.fire("synchro")}addDragListeners(){this.j.e.on(this.j.editor,"mousemove",this.onDrag).on("mouseup",this.onDrop).on([this.j.ew,this.ow],"mouseup",this.onDragEnd)}removeDragListeners(){this.j.e.off(this.j.editor,"mousemove",this.onDrag).off("mouseup",this.onDrop).off([this.j.ew,this.ow],"mouseup",this.onDragEnd)}beforeDestruct(){this.onDragEnd(),this.j.e.off("mousedown dragstart",this.onDragStart).off("startDragElement",this.onStartDragElement),this.removeDragListeners()}constructor(...e){super(...e),(0,n._)(this,"dragList",[]),(0,n._)(this,"draggable",null),(0,n._)(this,"isCopyMode",!1),(0,n._)(this,"diffStep",10),(0,n._)(this,"startX",0),(0,n._)(this,"startY",0),(0,n._)(this,"state",0)}}(0,o._)([r.autobind],c.prototype,"onStartDragElement",null),(0,o._)([r.autobind],c.prototype,"onDragStart",null),(0,o._)([(0,r.throttle)(e=>e.defaultTimeout/10)],c.prototype,"onDrag",null),(0,o._)([r.autobind],c.prototype,"onDragEnd",null),(0,o._)([r.autobind],c.prototype,"onDrop",null),a.pluginSystem.add("dragAndDropElement",c)},64222:function(e,t,i){"use strict";var n=i(25045),o=i(62445),r=i(81937),s=i(84839),a=i(23211),l=i(28077),u=i(65946),c=i(91206),d=i(63425);class h extends c.Plugin{afterInit(){this.j.e.on([window,this.j.ed,this.j.editor],"dragstart.DragAndDrop",this.onDragStart).on("drop.DragAndDrop",this.onDrop)}onDragStart(e){var t;let i=e.target;if(this.onDragEnd(),this.isFragmentFromEditor=a.Dom.isOrContains(this.j.editor,i,!0),this.isCopyMode=!this.isFragmentFromEditor||(0,u.ctrlKey)(e),this.isFragmentFromEditor){let e=this.j.s.sel,t=e&&e.rangeCount?e.getRangeAt(0):null;t&&(this.bufferRange=t.cloneRange())}else this.bufferRange=null;this.startDragPoint.x=e.clientX,this.startDragPoint.y=e.clientY,t=i,a.Dom.isElement(t)&&t.classList.contains(d.FileBrowserFiles.prototype.getFullElName("item"))&&(i=a.Dom.first(i,e=>a.Dom.isTag(e,"img"))),a.Dom.isTag(i,"img")&&(this.draggable=i.cloneNode(!0),(0,u.dataBind)(this.draggable,"target",i)),this.addDragListeners()}addDragListeners(){this.j.e.on("dragover",this.onDrag).on(window,"dragend.DragAndDrop drop.DragAndDrop mouseup.DragAndDrop",this.onDragEnd)}removeDragListeners(){this.j.e.off("dragover",this.onDrag).off(window,"dragend.DragAndDrop drop.DragAndDrop mouseup.DragAndDrop",this.onDragEnd)}onDrag(e){this.draggable&&(this.j.e.fire("hidePopup"),this.j.s.insertCursorAtPoint(e.clientX,e.clientY),e.preventDefault(),e.stopPropagation())}onDragEnd(){this.draggable&&(a.Dom.safeRemove(this.draggable),this.draggable=null),this.isCopyMode=!1,this.removeDragListeners()}onDrop(e){if(!e.dataTransfer||!e.dataTransfer.files||!e.dataTransfer.files.length){if(!this.isFragmentFromEditor&&!this.draggable)return this.j.e.fire("paste",e),e.preventDefault(),e.stopPropagation(),!1;let t=this.j.s.sel,i=this.bufferRange||(t&&t.rangeCount?t.getRangeAt(0):null),n=this.__getWorkFragment(i,e);t&&t.removeAllRanges(),this.j.s.insertCursorAtPoint(e.clientX,e.clientY),n&&this.__insertFragment.call(this,n,i),e.preventDefault(),e.stopPropagation()}this.isFragmentFromEditor=!1,this.removeDragListeners()}__getWorkFragment(e,t){let i=null;if(!this.draggable&&e)i=this.isCopyMode?e.cloneContents():e.extractContents();else if(this.draggable)if(this.isCopyMode){let[e,t]="1"===(0,u.attr)(this.draggable,"-is-file")?["a","href"]:["img","src"];i=this.j.createInside.element(e),(0,u.attr)(i,t,(0,u.attr)(this.draggable,"data-src")||(0,u.attr)(this.draggable,"src")||""),"a"===e&&(i.textContent=(0,u.attr)(i,t)||"")}else i=(0,u.dataBind)(this.draggable,"target");else if(this.getText(t)){let e=this.j.createInside.div();e.innerHTML=this.getText(t),this.j.e.fire("safeHTML",e),i=e.firstChild===e.lastChild&&e.firstChild?e.firstChild:e}return i}__insertFragment(e,t){this.j.s.insertNode(e,!1,!1),t&&e.firstChild&&e.lastChild&&(t.setStartBefore(e.firstChild),t.setEndAfter(e.lastChild),this.j.s.selectRange(t),this.j.e.fire("synchro")),a.Dom.isTag(e,"img")&&this.j.events&&this.j.e.fire("afterInsertImage",e)}beforeDestruct(){this.onDragEnd(),this.j.e.off(window,".DragAndDrop").off(".DragAndDrop").off([window,this.j.ed,this.j.editor],"dragstart.DragAndDrop",this.onDragStart)}constructor(...e){super(...e),(0,n._)(this,"isFragmentFromEditor",!1),(0,n._)(this,"isCopyMode",!1),(0,n._)(this,"startDragPoint",{x:0,y:0}),(0,n._)(this,"draggable",null),(0,n._)(this,"bufferRange",null),(0,n._)(this,"getText",e=>{let t=(0,u.getDataTransfer)(e);return t?t.getData(r.TEXT_HTML)||t.getData(r.TEXT_PLAIN):null})}}(0,o._)([s.autobind],h.prototype,"onDragStart",null),(0,o._)([(0,s.throttle)(e=>e.defaultTimeout/10)],h.prototype,"onDrag",null),(0,o._)([s.autobind],h.prototype,"onDragEnd",null),(0,o._)([s.autobind],h.prototype,"onDrop",null),l.pluginSystem.add("dragAndDrop",h)},33915:function(e,t,i){"use strict";i.r(t),i.d(t,{removeExtraBr:function(){return n.removeExtraBr}});var n=i(14841)},14841:function(e,t,i){"use strict";i.d(t,{removeExtraBr:function(){return r}});var n=i(23211);let o=new Set(["table","pre","blockquote","code"]);function r(e,t){if(!e.o.dtd.removeExtraBr||n.Dom.isTag(t,"br"))return;let i=n.Dom.furthest(t,n.Dom.isBlock,e.editor);if(i&&!n.Dom.isTag(i,o)){let i=n.Dom.isTag(t,"br")?t:n.Dom.findNotEmptySibling(t,!1);if(!n.Dom.isTag(i,"br")||n.Dom.findNotEmptySibling(i,!1))return;if(!n.Dom.isOrContains(t,e.s.range.startContainer)){let t=e.s.createRange();t.setStartBefore(i),t.collapse(!0),e.s.selectRange(t)}n.Dom.safeRemove(i)}}},34693:function(e,t,i){"use strict";i.d(t,{checkBlockNesting:function(){return o}});var n=i(23211);function o(e,t){if(n.Dom.isFragment(t)&&(t=t.firstChild),e.o.dtd.checkBlockNesting&&n.Dom.isBlock(t)){let i=null,o=e.s.current()?.parentElement??null;for(;o&&o!==e.editor;){if(n.Dom.isBlock(o)){let t=!i&&n.Dom.isTag(o,e.o.enter)&&n.Dom.isEmpty(o);if(e.o.dtd.blockLimits[o.nodeName.toLowerCase()]&&!t)break;i=o}o=o.parentElement}n.Dom.isLeaf(o)&&n.Dom.isList(t)&&n.Dom.isFragment(t.parentNode)&&!n.Dom.findNotEmptySibling(t,!1)&&(n.Dom.unwrap(t),i=o),i&&function(e,t){let{s:i}=e;if(n.Dom.isEmpty(t)){i.setCursorAfter(t),n.Dom.safeRemove(t);return}i.cursorOnTheRight(t)?i.setCursorAfter(t):i.cursorOnTheLeft(t)?i.setCursorBefore(t):i.setCursorAfter(i.splitSelection(t)??t)}(e,i)}}},14282:function(e,t,i){"use strict";i.r(t),i.d(t,{checkBlockNesting:function(){return n.checkBlockNesting}});var n=i(34693)},96722:function(e,t,i){"use strict";i(5266).Config.prototype.dtd={removeExtraBr:!0,checkBlockNesting:!0,blockLimits:{article:1,aside:1,audio:1,body:1,caption:1,dd:1,details:1,dir:1,div:1,dl:1,dt:1,fieldset:1,figcaption:1,figure:1,footer:1,form:1,header:1,hgroup:1,li:1,main:1,menu:1,nav:1,ol:1,section:1,table:1,td:1,th:1,tr:1,ul:1,video:1}}},56894:function(e,t,i){"use strict";var n=i(62445),o=i(68616),r=i(28077),s=i(91206);i(96722);var a=i(33915),l=i(14282);class u extends s.Plugin{afterInit(e){}beforeDestruct(e){}__onBeforeInsertNode(e){Object.keys(l).forEach(t=>{l[t](this.j,e)})}__onAfterInsertNode(e){Object.keys(a).forEach(t=>{a[t](this.j,e)})}}(0,n._)([(0,o.watch)(":beforeInsertNode")],u.prototype,"__onBeforeInsertNode",null),(0,n._)([(0,o.watch)(":afterInsertNode")],u.prototype,"__onAfterInsertNode",null),r.pluginSystem.add("dtd",u)},3678:function(e,t,i){"use strict";var n=i(62445),o=i(81937),r=i(84839),s=i(23211),a=i(28077),l=i(22289),u=i(18855),c=i(10918);class d extends u.Plugin{afterInit(e){let t=e.o.enter.toLowerCase(),i=t===o.BR.toLowerCase();e.o.enterBlock||(e.o.enterBlock=i?o.PARAGRAPH:t),e.registerCommand("enter",(e,t,i={})=>this.onEnter(i))}onEnterKeyDown(e){if(e.key===o.KEY_ENTER){let t=this.j,i=t.e.fire("beforeEnter",e);return void 0!==i?i:(t.history.snapshot.transaction(()=>{t.s.isCollapsed()||t.execCommand("Delete"),t.s.focus(),this.onEnter(e),t.e.fire("afterEnter",e)}),t.synchronizeValues(),!1)}}onEnter(e){let{jodit:t}=this,i=t.createInside.fake();try{s.Dom.safeInsertNode(t.s.range,i),(0,c.moveCursorOutFromSpecialTags)(t,i,["a"]);let n=(0,c.getBlockWrapper)(i,t),o=s.Dom.isLeaf(n);if((!o||e?.shiftKey)&&(0,c.checkBR)(i,t,e?.shiftKey,n))return!1;if(n||(0,c.hasPreviousBlock)(i,t)||(n=(0,c.wrapText)(i,t)),!n)return(0,c.insertParagraph)(i,t,o?"li":t.o.enter),!1;if(!(0,c.checkUnsplittableBox)(i,t,n))return!1;if(o&&this.__isEmptyListLeaf(n))return(0,c.processEmptyLILeaf)(i,t,n),!1;(0,c.splitFragment)(i,t,n)}finally{i.isConnected&&t.s.setCursorBefore(i),s.Dom.safeRemove(i)}}__isEmptyListLeaf(e){let t=this.j.e.fire("enterIsEmptyListLeaf",e);return(0,l.isBoolean)(t)?t:s.Dom.isEmpty(e)}beforeDestruct(e){e.e.off("keydown.enter")}}(0,n._)([(0,r.watch)(":keydown.enter")],d.prototype,"onEnterKeyDown",null),a.pluginSystem.add("enter",d)},34287:function(e,t,i){"use strict";i.d(t,{checkBR:function(){return s}});var n=i(81937),o=i(23211),r=i(60898);function s(e,t,i,s){let l=!!o.Dom.closest(e,"pre",t.editor)||(s?o.Dom.isTag(s,"blockquote"):!!o.Dom.closest(e,"blockquote",t.editor)),u=!l&&(s?o.Dom.isCell(s):!!o.Dom.closest(e,["td","th"],t.editor));if(t.o.enter.toLowerCase()===n.BR.toLowerCase()||u||i&&!l||!i&&l){var c;let i;if(l&&(i=a(a(c=e)))&&(o.Dom.safeRemove(a(c)),o.Dom.safeRemove(i),1))return!1;let n=t.createInside.element("br");if(o.Dom.before(e,n),!o.Dom.findNotEmptySibling(n,!1)){let t=n.cloneNode();o.Dom.after(n,t),o.Dom.before(t,e)}let s=n.cloneNode();return o.Dom.before(e,s),(0,r.scrollIntoViewIfNeeded)(s,t.editor,t.ed),o.Dom.safeRemove(s),!0}return!1}function a(e){if(!e)return!1;let t=o.Dom.findSibling(e,!0);return!!t&&!!o.Dom.isTag(t,"br")&&t}},8524:function(e,t,i){"use strict";i.d(t,{checkUnsplittableBox:function(){return o}});var n=i(23211);function o(e,t,i){return!!n.Dom.canSplitBlock(i)||(n.Dom.before(e,t.createInside.element("br")),!1)}},83376:function(e,t,i){"use strict";i.d(t,{getBlockWrapper:function(){return function e(t,i,r=n.IS_BLOCK){let s=t,a=i.editor;do{if(!s||s===a)break;if(r.test(s.nodeName)){if(o.Dom.isLeaf(s))return s;return e(s.parentNode,i,/^li$/i)||s}s=s.parentNode}while(s&&s!==a)return null}}});var n=i(81937),o=i(23211)},66862:function(e,t,i){"use strict";i.d(t,{hasPreviousBlock:function(){return o}});var n=i(23211);function o(e,t){return!!n.Dom.prev(e,e=>n.Dom.isBlock(e)||n.Dom.isImage(e),t.editor)}},10918:function(e,t,i){"use strict";i.d(t,{checkBR:function(){return n.checkBR},checkUnsplittableBox:function(){return o.checkUnsplittableBox},getBlockWrapper:function(){return r.getBlockWrapper},hasPreviousBlock:function(){return s.hasPreviousBlock},insertParagraph:function(){return a.insertParagraph},moveCursorOutFromSpecialTags:function(){return l.moveCursorOutFromSpecialTags},processEmptyLILeaf:function(){return u.processEmptyLILeaf},splitFragment:function(){return c.splitFragment},wrapText:function(){return d.wrapText}});var n=i(34287),o=i(8524),r=i(83376),s=i(66862),a=i(65710),l=i(47919),u=i(34672),c=i(46303),d=i(52938)},65710:function(e,t,i){"use strict";i.d(t,{insertParagraph:function(){return s}});var n=i(23211),o=i(7909),r=i(60898);function s(e,t,i,s){let a="br"===i.toLowerCase(),{createInside:l}=t,u=l.element(i),c=l.element("br");return a||n.Dom.append(u,c),s&&s.cssText&&(0,o.attr)(u,"style",s.cssText),n.Dom.after(e,u),n.Dom.before(a?u:c,e),(0,r.scrollIntoViewIfNeeded)(u,t.editor,t.ed),u}},47919:function(e,t,i){"use strict";i.d(t,{moveCursorOutFromSpecialTags:function(){return o}});var n=i(23211);function o(e,t,i){let{s:o}=e,r=n.Dom.closest(t,i,e.editor);if(r){if(o.cursorOnTheRight(r,t))n.Dom.after(r,t);else{if(!o.cursorOnTheLeft(r,t))return;n.Dom.before(r,t)}let e=o.createRange();e.setStartBefore(t),o.selectRange(e)}}},34672:function(e,t,i){"use strict";i.d(t,{processEmptyLILeaf:function(){return s}});var n=i(23211),o=i(28723),r=i(65710);function s(e,t,i){let s=n.Dom.closest(i,["ol","ul"],t.editor);if(!s)return;let a=s.parentElement,l=n.Dom.isLeaf(a),u=l?a:s,c=t.s.createRange();c.setStartAfter(i),c.setEndAfter(s);let d=c.extractContents();n.Dom.after(u,e),n.Dom.safeRemove(i),(0,o.$$)("li",s).length||n.Dom.safeRemove(s);let h=(0,r.insertParagraph)(e,t,l?"li":t.o.enter);n.Dom.first(d,e=>n.Dom.isTag(e,"li"))&&(l?n.Dom.append(h,d):n.Dom.after(h,d))}},46303:function(e,t,i){"use strict";i.d(t,{splitFragment:function(){return s}});var n=i(23211),o=i(60898),r=i(65710);function s(e,t,i){let s=t.s,{enter:a}=t.o,l=a.toLowerCase(),u=n.Dom.isLeaf(i),c=i.tagName.toLowerCase()===l||u,d=s.cursorOnTheRight(i,e),h=s.cursorOnTheLeft(i,e);if(!c&&(d||h)){d?n.Dom.after(i,e):n.Dom.before(i,e),(0,r.insertParagraph)(e,t,l),h&&!d&&n.Dom.prepend(i,e);return}let{scrollTop:p}=t.editor;s.splitSelection(i,e),t.editor.scrollTop!==p&&(t.editor.scrollTop=p),(0,o.scrollIntoViewIfNeeded)(i,t.editor,t.ed)}},52938:function(e,t,i){"use strict";i.d(t,{wrapText:function(){return o}});var n=i(23211);function o(e,t){let i=e;n.Dom.up(i,e=>{e&&e.hasChildNodes()&&e!==t.editor&&(i=e)},t.editor);let o=n.Dom.wrapInline(i,t.o.enter,t);if(n.Dom.isEmpty(o)){let i=t.createInside.element("br");n.Dom.append(o,i),n.Dom.before(i,e)}return o}},49764:function(e,t,i){"use strict";var n=i(23211),o=i(28077),r=i(7909),s=i(5266),a=i(7042),l=i(15753);function u(e,t,i=""){if(e.s.isCollapsed())return!1;let n=e.s.wrapInTag("a");return!!n.length&&(n.forEach(e=>{(0,r.attr)(e,"href",t),i&&(0,r.attr)(e,"title",i)}),e.s.setCursorAfter(n[n.length-1]),!0)}function c(e){let{baseurl:t}=e;(0,a.getItems)(e).forEach(({file:e})=>{let i=t+e;if(u(this,i))return;let n=this.createInside.element("a",{href:i});n.textContent=this.o.uploader.getDisplayName.call(this.uploader,t,e),this.s.insertNode(n)})}s.Config.prototype.file={defaultHandlerSuccess:c},s.Config.prototype.controls.file={popup(e,t,i){let o=e.s.isCollapsed()?null:e.s.range,s=()=>{o&&e.s.selectRange(o)},d=(t,i="")=>{s(),u(e,t,i)||e.s.insertNode(e.createInside.fromHTML(`<a href="${t}" title="${i}">${i||t}</a>`))},h=null;return t&&(n.Dom.isTag(t,"a")||n.Dom.closest(t,"a",e.editor))&&(h=n.Dom.isTag(t,"a")?t:n.Dom.closest(t,"a",e.editor)),(0,l.FileSelectorWidget)(e,{filebrowser(e){(0,a.getItems)(e).forEach(({file:t})=>d(e.baseurl+t)),i()},upload(t){s(),(e.o.file?.defaultHandlerSuccess??c).call(e,t)},url(e,t){h?((0,r.attr)(h,"href",e),(0,r.attr)(h,"title",t)):d(e,t),i()}},h,i,!1)},tags:["a"],tooltip:"Insert file"},o.pluginSystem.add("file",function(e){e.registerButton({name:"file",group:"media"})})},78690:function(e,t,i){"use strict";var n=i(81937),o=i(27795),r=i(28077),s=i(5266);s.Config.prototype.autofocus=!1,s.Config.prototype.cursorAfterAutofocus="end",s.Config.prototype.saveSelectionOnBlur=!0,r.pluginSystem.add("focus",function(e){if(e.o.saveSelectionOnBlur){let t=!1;e.e.on("blur",()=>{t=!1,e.isEditorMode()&&e.s.save(!0)}).on("mousedown touchstart",()=>{t=!e.editorIsActive}).on("focus",()=>{e.isEditorMode()&&(t?e.s.removeMarkers():e.s.restore()),t=!1})}let t=()=>{e.s.focus();let t=null;switch(e.o.cursorAfterAutofocus){case"start":t=o.Dom.first(e.editor,e=>o.Dom.isText(e));break;case"end":t=o.Dom.last(e.editor,e=>o.Dom.isText(e))}t&&e.s.setCursorIn(t,"start"===e.o.cursorAfterAutofocus)};e.e.on("afterInit",()=>{if(e.o.autofocus)if(e.defaultTimeout){let i="mousedown touchstart keydown",n=()=>{e.async.clearTimeout(o),e.e.off(i,n)},o=e.async.setTimeout(()=>{e.e.off(i,n),t()},300);e.e.on(i,n)}else t()}),e.e.on("afterInit afterAddPlace",()=>{e.e.off(e.editor,"mousedown.autofocus").on(e.editor,"mousedown.autofocus",t=>{e.isEditorMode()&&t.target&&o.Dom.isBlock(t.target)&&!o.Dom.isTag(t.target,n.INSEPARABLE_TAGS)&&!t.target.childNodes.length&&(e.editor===t.target?e.s.focus():e.s.setCursorIn(t.target))})})})},7433:function(e,t,i){"use strict";var n=i(27795),o=i(17312),r=i(4040),s=i(80991),a=i(29434),l=i(5266),u=i(48842),c=i.n(u),d=i(25501),h=i.n(d),p=i(80045);l.Config.prototype.defaultFontSizePoints="px",l.Config.prototype.font={googleFonts:{url:""}},a.Icon.set("font",c()).set("fontsize",h());let m=new WeakSet;l.Config.prototype.controls.fontsize={command:"fontsize",data:{cssRule:"font-size",normalize:e=>e.toString().replace(/(px|pt)$/i,"")},list:[8,9,10,11,12,14,16,18,24,30,32,34,36,48,60,72,96],textTemplate:(e,t)=>t+e.o.defaultFontSizePoints,childTemplate:(e,t,i)=>`${i}${e.o.defaultFontSizePoints}`,tooltip:"Font size",value(e,t){let i=e.s.current(),o=i&&n.Dom.closest(i,n.Dom.isElement,e.editor),r=t.control;if(o)m.add(t);else if("select"!==r.component||m.has(t))return;let a=r.data?.cssRule||"font-size",l=(0,s.css)(o||e.editor,a);if("font-size"===a){let t=parseFloat(l.toString());return"pt"===e.o.defaultFontSizePoints?Math.round(.75*t).toString():Math.round(t).toString()}return l.toString()},isChildActive(e,t){let i=t.state.value,n=t.control.data?.normalize??(e=>e);return!!(i&&t.control.args&&n(t.control.args[0].toString())===n(i.toString()))},isActive(e,t){let i=t.state.value;if(!i)return!1;let n=t.control.data?.normalize??(e=>e),o=t.control.data.cacheListSet;return o||(o=new Set(Object.keys(t.control.list).map(n)),t.control.data.cacheListSet=o),o.has(n(i.toString()))}},l.Config.prototype.controls.font={...l.Config.prototype.controls.fontsize,command:"fontname",textTemplate(e,t){let[i]=t.split(",");return(0,r.trimChars)(i,"\"'")},list:{"":"Default","Arial, Helvetica, sans-serif":"Arial","'Courier New', Courier, monospace":"Courier New","Georgia, Palatino, serif":"Georgia","'Lucida Sans Unicode', 'Lucida Grande', sans-serif":"Lucida Sans Unicode","Tahoma, Geneva, sans-serif":"Tahoma","'Times New Roman', Times, serif":"Times New Roman","'Trebuchet MS', Helvetica, sans-serif":"Trebuchet MS","Helvetica, sans-serif":"Helvetica","Impact, Charcoal, sans-serif":"Impact","Verdana, Geneva, sans-serif":"Verdana"},childTemplate(e,t,i){let n=!1;try{n=-1===t.indexOf("dings")&&document.fonts.check("16px "+t,i)}catch{}return`<span data-style="${t}" style="${n?`font-family: ${t}!important;`:""}">${i}</span>`},popup:(e,t,i,n)=>!!e.o.font.googleFonts.url&&new p.UIFontPicker(e,n,i),data:{cssRule:"font-family",normalize:e=>e.toLowerCase().replace(/['"]+/g,"").replace(/[^a-z0-9-]+/g,",")},value(e,t){let i=e.s.current(),r=i&&n.Dom.closest(i,n.Dom.isElement,e.editor);if(r)m.add(t);else if(m.has(t))return;let a=(0,s.css)(r||e.editor,"font-family").toString(),{list:l}=t.control;return a===(0,s.css)(e.editor,"font-family").toString()&&((0,o.isArray)(l)?l.includes(""):""in(l??{}))?"":a},tooltip:"Font family"}},80045:function(e,t,i){"use strict";i.d(t,{UIFontPicker:function(){return _}});var n=i(25045),o=i(62445),r=i(91672),s=i(68616),a=i(23211),l=i(28077),u=i(17312),c=i(7909),d=i(80991),h=i(71125),p=i(96007),m=i(24939);let f=["h1","h2","h3","h4","h5","h6"],g=new Set(["serif","sans-serif","monospace","cursive","fantasy","system-ui","ui-serif","ui-sans-serif","ui-monospace","ui-rounded"]);class _ extends p.UIElement{className(){return"UIFontPicker"}__render(){let{control:e}=this.__button,{list:t={}}=e,i=(0,u.isArray)(t)?t.map(e=>({value:e.toString(),title:e.toString()})):(0,h.keys)(t,!1).map(e=>({value:e,title:t[e].toString()})),n=Array.from(this.__googleFonts.fonts.values(),e=>({value:this.__googleFonts.value(e),title:e.family,font:e})),o=new Map;[...n,...i].forEach(e=>o.set((0,m.firstFamily)(e.value),e));let r=new Map,s=new Map;this.__themeFonts().forEach(e=>{let t=(0,m.firstFamily)(e),i=e.split(",")[0].replace(/["']/g,"").trim(),n=o.get(t)??(!t||t.startsWith("-")||g.has(t)?void 0:{value:e,title:i});n&&!r.has(t)&&r.set(t,n)}),this.__usedFonts().forEach(e=>{let t=(0,m.firstFamily)(e),i=o.get(t);i&&!r.has(t)&&s.set(t,i)});let l=i.find(e=>""===e.value),c=(0,m.firstFamily)(e.value?.(this.j,this.__button)??"");a.Dom.detach(this.container),this.__fonts.clear(),l&&this.__append(c,[l]),this.__append(c,[...r.values()],"Theme fonts"),this.__append(c,[...s.values()],"Used fonts"),this.__append(c,i.filter(e=>e!==l),"System fonts"),this.__append(c,n,"Google Fonts"),this.__observeGoogleFonts()}__themeFonts(){let{editor:e}=this.j,t=[(0,d.css)(e,"font-family").toString()];return f.forEach(i=>{let n=this.j.createInside.element(i,{style:"display: none"});a.Dom.append(e,n),t.push((0,d.css)(n,"font-family").toString()),a.Dom.safeRemove(n)}),t}__usedFonts(){return Array.from(this.j.editor.querySelectorAll('[style*="font-family"]'),e=>e.style.fontFamily)}__append(e,t,i){if(!t.length)return;let{control:n}=this.__button,o=this.j.c.div(this.getFullElName("group"));if(i){let e=this.j.c.div(this.getFullElName("heading"),{id:`${this.getFullElName("heading")}-${(0,l.uniqueUid)()}`});e.textContent=this.i18n(i),(0,c.attr)(o,{role:"group","aria-labelledby":e.id}),a.Dom.append(o,e)}t.forEach(t=>{let i=this.j.c.element("button",{type:"button",class:this.getFullElName("item"),"data-value":t.value,"aria-pressed":(0,m.firstFamily)(t.value)===e});t.font?(i.textContent=t.title,this.__fonts.set(i,t.font)):i.innerHTML=n.childTemplate?.(this.j,t.value,t.title,this.__button)??t.title,a.Dom.append(o,i)}),a.Dom.append(this.container,o)}__observeGoogleFonts(){this.j.async.requestAnimationFrame(()=>{if(this.__observer?.disconnect(),this.isDestructed||!this.__fonts.size)return;let e=new IntersectionObserver(t=>{let i=[];t.forEach(({isIntersecting:t,target:n})=>{let o=this.__fonts.get(n);t&&o&&(i.push(o),(0,d.css)(n,{fontFamily:this.__googleFonts.value(o)}),e.unobserve(n))}),this.__googleFonts.preview(i)},{root:this.container.parentElement,rootMargin:"0px 0px 400px 0px"});this.__fonts.forEach((t,i)=>e.observe(i)),this.__observer=e})}onMouseDown(e){e.preventDefault()}onClick(e){let t=a.Dom.up(e.target,e=>a.Dom.isHTMLElement(e)&&e.hasAttribute("data-value"),this.container);if(!t)return;let i=(0,c.attr)(t,"data-value")??"",n=this.__googleFonts.find(i),o=(0,m.firstFamily)(i)===(0,m.firstFamily)(this.__blockFont());n&&!o&&this.__googleFonts.load(n),this.j.execCommand("fontname",!1,o?"":i),this.__close()}__blockFont(){let e=a.Dom.up(this.j.s.current(),a.Dom.isBlock,this.j.editor);return(0,d.css)(e??this.j.editor,"font-family").toString()}destruct(){this.__observer?.disconnect(),super.destruct()}constructor(e,t,i){super(e),(0,n._)(this,"__button",void 0),(0,n._)(this,"__close",void 0),(0,n._)(this,"__googleFonts",void 0),(0,n._)(this,"__fonts",void 0),(0,n._)(this,"__observer",void 0),this.__button=t,this.__close=i,this.__fonts=new Map,this.__observer=null,this.__googleFonts=e.getInstance(m.GoogleFonts),this.__render(),this.__googleFonts.fonts.size||this.__googleFonts.ready.then(()=>!this.isDestructed&&this.__render())}}(0,o._)([(0,s.watch)("container:mousedown")],_.prototype,"onMouseDown",null),(0,o._)([(0,s.watch)("container:click")],_.prototype,"onClick",null),_=(0,o._)([r.component],_)},50294:function(e,t,i){"use strict";var n=i(28077),o=i(65946);i(7433);var r=i(24939);n.pluginSystem.add("font",function(e){if(e.registerButton({name:"font",group:"font"}).registerButton({name:"fontsize",group:"font"}),e.o.font.googleFonts.url){let t=e.getInstance(r.GoogleFonts),i=e.async.debounce(()=>t.loadUsed(),e.defaultTimeout);t.ready.then(i),e.e.on("afterInit afterSetMode change",i)}e.e.on("afterInit",()=>{e.iframe&&e.e.on(e.ed,"load",()=>e.e.fire("updateToolbar"),{capture:!0})});let t=(t,i,n)=>{switch(t){case"fontsize":e.s.commitStyle({attributes:{style:{fontSize:(0,o.normalizeSize)(n,e.o.defaultFontSizePoints)}}});break;case"fontname":e.s.commitStyle({attributes:{style:{fontFamily:n}}})}return e.synchronizeValues(),!1};e.registerCommand("fontsize",t).registerCommand("fontname",t)})},24939:function(e,t,i){"use strict";i.d(t,{GoogleFonts:function(){return c},firstFamily:function(){return u}});var n=i(25045),o=i(59609),r=i(23211),s=i(17338);let a={serif:"serif",monospace:"monospace"},l=new Map;function u(e){return e.split(",")[0].replace(/["']/g,"").trim().toLowerCase()}class c extends o.ViewComponent{className(){return"GoogleFonts"}find(e){return this.fonts.get(u(e))}value(e){return`'${e.family}', ${a[e.category]??"sans-serif"}`}load(e){let t=this.__loadedInto(this.j.ed);if(t.has(e.family))return;t.add(e.family);let i=[["regular","0,400"],["700","0,700"],["italic","1,400"],["700italic","1,700"]].filter(([t])=>e.variants.includes(t)).map(([,e])=>e);this.__append(this.j.ed,`family=${this.__family(e)}:ital,wght@${i.join(";")}`)}loadUsed(){this.j.editor.querySelectorAll('[style*="font-family"]').forEach(e=>{let t=this.find(e.style.fontFamily);t&&this.load(t)})}preview(e){let t=this.__loadedInto(this.j.od);if(!(e=e.filter(e=>!this.__previewed.has(e.family)&&!t.has(e.family))).length)return;e.forEach(e=>this.__previewed.add(e.family));let i=e.map(e=>"family="+this.__family(e)),n=new Set(e.map(e=>e.family).join(""));this.__append(this.j.od,`${i.join("&")}&text=${encodeURIComponent([...n].join(""))}`)}__loadedInto(e){let t=this.__loaded.get(e)??new Set;return this.__loaded.set(e,t),t}__family(e){return encodeURIComponent(e.family).replace(/%20/g,"+")}__append(e,t){let i=e.createElement("link");i.rel="stylesheet",i.href=`https://fonts.googleapis.com/css2?${t}&display=swap`,e.head.appendChild(i),this.__links.push(i)}destruct(){this.__links.forEach(e=>r.Dom.safeRemove(e)),super.destruct()}constructor(e){super(e),(0,n._)(this,"fonts",new Map),(0,n._)(this,"ready",void 0),(0,n._)(this,"__links",[]),(0,n._)(this,"__loaded",new WeakMap),(0,n._)(this,"__previewed",new Set),this.ready=(function(e,t){let i=l.get(t);if(!i){let n=new s.Ajax({url:t,method:"GET"},e.o.defaultAjaxOptions);i=n.send().then(e=>e.json()).then(({items:e})=>e.filter(e=>e.variants.includes("regular"))).catch(()=>(l.delete(t),[])).finally(()=>n.destruct()),l.set(t,i)}return i})(e,e.o.font.googleFonts.url).then(e=>{e.forEach(e=>this.fonts.set(e.family.toLowerCase(),e))})}}},96863:function(e,t,i){"use strict";var n=i(23211),o=i(62101),r=i(29434),s=i(5266),a=i(50995),l=i(29348),u=i.n(l);r.Icon.set("paragraph",u()),s.Config.prototype.formatBlock={previewProperties:[]},s.Config.prototype.controls.paragraph={command:"formatBlock",value(e,t){let i=t.control,o=e.s.current(),r=n.Dom.closest(o,n.Dom.isBlock,e.editor);return r?.nodeName.toLowerCase()??i.data?.currentValue},update(e,t){let i=t.control;if(!e.s.current())return!1;let n=t.state.value,r=i.list;return(0,o.isPlainObject)(r)&&r[n.toString()]&&e.o.textIcons&&(t.state.text=r[n.toString()].toString()),!1},data:{currentValue:"p"},list:{p:"Paragraph",h1:"Heading 1",h2:"Heading 2",h3:"Heading 3",h4:"Heading 4",blockquote:"Quote",pre:"Code"},isChildActive:(e,t)=>t.state.value===t.control?.args?.[0],isActive:(e,t)=>t.state.value!==e.o.enter&&(0,o.isPlainObject)(t.control.list)&&!!t.control.list[t.state.value],childTemplate:(e,t,i)=>`<${t} style="margin:0;padding:0${function(e,t){let{previewProperties:i}=e.o.formatBlock;if(!i.length)return"";let o=e.createInside.element(t,{style:"display: none"});n.Dom.append(e.editor,o);let r=e.ew.getComputedStyle(o),s=parseFloat(r.fontSize)||16,l=i.map(t=>{let i=r.getPropertyValue(t);return i&&"font-family"===t&&(i=(0,a.withContentFonts)(e,i)),i?`;${t}:${i.replace(/(-?[\d.]+)px/g,(e,t)=>`${parseFloat(t)/s}em`).replace(/"/g,"'")}`:""}).join("");return n.Dom.safeRemove(o),l}(e,t)}"><span>${e.i18n(i)}</span></${t}>`,tooltip:"Insert format block"}},50995:function(e,t,i){"use strict";i.d(t,{withContentFonts:function(){return s}});let n=new WeakMap,o=new Map,r=0;function s(e,t){let{ed:i,od:o}=e;if(i===o)return t;let s=function(e){let t=n.get(e);if(!t){let{od:i}=e,o={prefix:`jodit-preview-${++r}-`,faces:new Map,pending:!1};n.set(e,o),e.e.on("beforeDestruct",()=>o.faces.forEach(e=>i.fonts.delete(e))),t=o}return t}(e);!function(e,t){if(t.pending)return;t.pending=!0;let{ed:i,od:n}=e;Promise.all(Array.from(i.styleSheets,e=>a(e,i.baseURI))).then(i=>{t.pending=!1,e.isInDestruct||i.flat().forEach(e=>{let i=JSON.stringify(e);if(!t.faces.has(i)){let o=new FontFace(t.prefix+e.family,e.source,e.descriptors);n.fonts.add(o),t.faces.set(i,o)}})})}(e,s);let l=new Set;return i.fonts.forEach(e=>l.add(u(e.family))),t.split(",").map(e=>{let t=u(e);return l.has(t)?`"${s.prefix}${t}", ${e.trim()}`:e.trim()}).join(", ")}function a(e,t){let i;try{i=e.cssRules}catch{let{href:t}=e;if(!t)return Promise.resolve([]);let i=o.get(t);return i||(i=fetch(t).then(e=>e.text()).then(e=>{let i=document.implementation.createHTMLDocument(""),n=i.createElement("style");return n.textContent=e,i.head.appendChild(n),n.sheet?l(n.sheet.cssRules,t):[]}).catch(()=>[]),o.set(t,i)),i}return l(i,e.href??t)}function l(e,t){return Promise.all(Array.from(e,e=>{var i;let n;if("styleSheet"in e){let{styleSheet:i}=e;return i?a(i,t):[]}return"cssRules"in e?l(e.cssRules,t):e.cssText.startsWith("@font-face")?[(n=t=>e.style.getPropertyValue(t)||void 0,{family:u(e.style.getPropertyValue("font-family")),source:(i=e.style.getPropertyValue("src"),i.replace(/url\(\s*(["']?)(.*?)\1\s*\)/g,(e,i,n)=>{try{return`url("${new URL(n,t).href}")`}catch{return e}})),descriptors:{style:n("font-style"),weight:n("font-weight"),stretch:n("font-stretch"),unicodeRange:n("unicode-range")}})]:[]})).then(e=>e.flat())}function u(e){return e.replace(/["']/g,"").trim().toLowerCase()}},53390:function(e,t,i){"use strict";var n=i(28077);i(96863),n.pluginSystem.add("formatBlock",function(e){e.registerButton({name:"paragraph",group:"font"}),e.registerCommand("formatblock",(t,i,n)=>(e.s.commitStyle({element:n}),e.synchronizeValues(),!1))})},80538:function(e,t,i){"use strict";var n=i(81937),o=i(29434),r=i(5266),s=i(24772),a=i.n(s),l=i(66547),u=i.n(l);r.Config.prototype.fullsize=!1,r.Config.prototype.globalFullSize=!0,o.Icon.set("fullsize",a()).set("shrink",u()),r.Config.prototype.controls.fullsize={exec(e){e.toggleFullSize()},isActive:e=>e.isFullSize,update(e,t){let i=e.isFullSize?"shrink":"fullsize";t.state.activated=e.isFullSize,e.o.textIcons?t.state.text=i:t.state.icon.name=i},tooltip:"Open in fullsize",mode:n.MODE_SOURCE+n.MODE_WYSIWYG}},69696:function(e,t,i){"use strict";var n=i(23211),o=i(28077),r=i(24497),s=i(80991);i(80538);let a=new Set;o.pluginSystem.add("fullsize",function(e){e.registerButton({name:"fullsize"});let t=!1,i=0,o=0,l=0,u=0,c=!1,d=()=>{let{container:n,events:r}=e;r&&(t?(c||(i=(0,s.css)(n,"height",!0),o=(0,s.css)(n,"width",!0),c=!0),(0,s.css)(n,{height:e.ow.innerHeight,width:e.ow.innerWidth})):c&&((0,s.css)(n,{height:i||"auto",width:o||"auto"}),c=!1))},h=i=>{let{container:o,events:c}=e;if(o){if(void 0===i&&(i=!o.classList.contains("jodit_fullsize")),e.setMod("fullsize",i),e.o.fullsize=i,t=i,o.classList.toggle("jodit_fullsize",i),e.toolbar&&((0,r.isJoditObject)(e)&&e.toolbarContainer&&n.Dom.append(e.toolbarContainer,e.toolbar.container),(0,s.css)(e.toolbar.container,"width","auto")),i?a.add(o):a.delete(o),e.o.globalFullSize&&(1===a.size&&i||0===a.size&&!i)){i&&(l=e.ow.scrollX,u=e.ow.scrollY);let t=o.parentNode;for(;t&&t.nodeType!==Node.DOCUMENT_NODE&&t.nodeType!==Node.DOCUMENT_FRAGMENT_NODE;)t.classList.toggle("jodit_fullsize-box_true",i),t=t.parentNode;d(),i||e.ow.scrollTo(l,u)}c.fire("afterResize")}};e.o.globalFullSize&&e.e.on(e.ow,"resize",d),e.e.on("afterInit afterOpen",()=>{e.toggleFullSize(e?.options?.fullsize)}).on("toggleFullSize",h).on("beforeDestruct",()=>{t&&h(!1)}).on("beforeDestruct",()=>{e.events&&e.e.off(e.ow,"resize",d)})})},14907:function(e,t,i){"use strict";i(5266).Config.prototype.commandToHotkeys={removeFormat:["ctrl+shift+m","cmd+shift+m"],insertOrderedList:["ctrl+shift+7","cmd+shift+7"],insertUnorderedList:["ctrl+shift+8","cmd+shift+8"],selectall:["ctrl+a","cmd+a"]}},50982:function(e,t,i){"use strict";var n=i(25045),o=i(81937),r=i(28077),s=i(65946),a=i(91206);i(14907);class l extends a.Plugin{afterInit(e){(0,s.keys)(e.o.commandToHotkeys,!1).forEach(t=>{let i=e.o.commandToHotkeys[t];i&&((0,s.isArray)(i)||(0,s.isString)(i))&&e.registerHotkeyToCommand(i,t)});let t=!1;e.e.off(".hotkeys").on([e.ow,e.ew],"keydown.hotkeys",e=>{if(e.key===o.KEY_ESC)return this.j.e.fire("escape",e)}).on("keydown.hotkeys",i=>{let n=this.onKeyPress(i),o={shouldStop:!0};if(!1===this.j.e.fire(n+".hotkey",i.type,o))if(o.shouldStop)return t=!0,e.e.stopPropagation("keydown"),!1;else i.preventDefault()},{top:!0}).on("keyup.hotkeys",()=>{if(t)return t=!1,e.e.stopPropagation("keyup"),!1},{top:!0})}beforeDestruct(e){e.events&&e.e.off(".hotkeys")}constructor(...e){super(...e),(0,n._)(this,"onKeyPress",e=>{let t=this.specialKeys[e.which],i=(e.key||String.fromCharCode(e.which)).toLowerCase(),n=[t||i];return["alt","ctrl","shift","meta"].forEach(i=>{e[i+"Key"]&&t!==i&&n.push(i)}),(0,s.normalizeKeyAliases)(n.join("+"))}),(0,n._)(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",48:"0",49:"1",50:"2",51:"3",52:"4",53:"5",54:"6",55:"7",56:"8",57:"9",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:"'"})}}r.pluginSystem.add("hotkeys",l)},2952:function(e,t,i){"use strict";var n=i(27795),o=i(28077),r=i(29434),s=i(5266),a=i(89097),l=i.n(a);r.Icon.set("hr",l()),s.Config.prototype.controls.hr={command:"insertHorizontalRule",tooltip:"Insert Horizontal Line"},o.pluginSystem.add("hr",function(e){e.registerButton({name:"hr",group:"insert"}),e.registerCommand("insertHorizontalRule",()=>{let t=e.createInside.element("hr");e.s.insertNode(t,!1,!1);let i=n.Dom.closest(t.parentElement,n.Dom.isBlock,e.editor);i&&n.Dom.isEmpty(i)&&i!==e.editor&&!e.o.dtd?.blockLimits[i.nodeName.toLowerCase()]&&(n.Dom.after(i,t),n.Dom.safeRemove(i));let o=n.Dom.findNotEmptySibling(t,!1);if(n.Dom.isBlock(o))return e.s.setCursorIn(o,!0),!1;if(o||t.parentNode!==e.editor&&!n.Dom.isBlock(n.Dom.findNotEmptySibling(t,!0)))return e.s.setCursorAfter(t),!1;let r=e.createInside.element(e.o.enter);return n.Dom.isTag(r,"br")||n.Dom.append(r,e.createInside.element("br")),n.Dom.after(t,r),e.s.setCursorIn(r),!1})})},17326:function(e,t,i){"use strict";var n=i(5266);n.Config.prototype.iframeBaseUrl="",n.Config.prototype.iframeTitle="Jodit Editor",n.Config.prototype.iframeDoctype="<!DOCTYPE html>",n.Config.prototype.iframeDefaultSrc="about:blank",n.Config.prototype.iframeStyle="html{margin:0;padding:0;min-height: 100%;}body{box-sizing:border-box;font-size:13px;line-height:1.6;padding:10px;margin:0;background:transparent;color:#000;position:relative;z-index:2;user-select:auto;margin:0px;overflow:auto;outline:none;}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}p{margin-top: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}",n.Config.prototype.iframeCSSLinks=[],n.Config.prototype.iframeSandbox=null},81144:function(e,t,i){"use strict";var n=i(81937),o=i(23211),r=i(28077),s=i(65946),a=i(81910);i(17326),r.pluginSystem.add("iframe",function(e){let t=e.options;e.e.on("afterSetMode",()=>{e.isEditorMode()&&e.s.focus()}).on("generateDocumentStructure.iframe",(e,i)=>{let n=e||i.iframe.contentWindow.document;if(n.open(),n.write(t.iframeDoctype+`<html dir="${t.direction}" class="jodit" lang="${(0,s.defaultLanguage)(t.language)}">`+"<head>"+`<title>${t.iframeTitle}</title>`+(t.iframeBaseUrl?`<base href="${t.iframeBaseUrl}"/>`:"")+'</head><body class="jodit-wysiwyg"></body></html>'),n.close(),t.iframeCSSLinks&&t.iframeCSSLinks.forEach(e=>{let t=n.createElement("link");(0,s.attr)(t,"rel","stylesheet"),(0,s.attr)(t,"href",e),n.head&&o.Dom.append(n.head,t),i.e.on(t,"load",()=>i.e.fire("resize"))}),t.iframeStyle){let e=n.createElement("style");e.innerHTML=t.iframeStyle,n.head&&o.Dom.append(n.head,e)}}).on("createEditor",()=>{if(!t.iframe)return;let i=e.c.element("iframe");(0,s.css)(i,"display","block"),i.src="about:blank",i.className="jodit-wysiwyg_iframe",(0,s.attr)(i,{allowtransparency:"true",tabindex:t.tabIndex.toString(),frameborder:"0"}),null!=t.iframeSandbox&&(0,s.attr)(i,"sandbox",t.iframeSandbox),o.Dom.append(e.workplace,i),e.iframe=i;let r=e.e.fire("generateDocumentStructure.iframe",null,e);return(0,s.callPromise)(r,()=>{if(!e.iframe)return!1;let i=e.iframe.contentWindow.document;e.editorWindow=e.iframe.contentWindow;let r=t.editHTMLDocumentMode,l=()=>{(0,s.attr)(i.body,"contenteditable",e.getMode()!==n.MODE_SOURCE&&!e.getReadOnly()||null)},u=(e,t)=>{for(;t>0&&/\s/.test(e.charAt(t-1));)t-=1;return t},c=e=>{e=(0,a.removeBetween)(e,"<style",">","</style>","jodit-box");let t=(0,a.indexOfOpenTag)(e,"body"),i=-1;for(let n=(0,a.indexOfClosingTag)(e,"body",t+1);-1!==n;n=(0,a.indexOfClosingTag)(e,"body",n+1))i=n;if(-1!==t&&-1!==i){let n=i+7,o=e.indexOf(">",t),r=e.slice(t,n);for(let s of(-1!==o&&o<i&&(r=(e=>{e=e.replace(/min-height["'\s]*:[\s"']*[0-9]+(px|%)/i,"");let t=(t,i)=>{for(;i.test(e.charAt(t));)t+=1;return t},i=e.indexOf("contenteditable");for(;-1!==i;){let n=t(i+15,/["'\s]/);if("="===e.charAt(n)&&(n=t(n+1,/[\s"']/),e.startsWith("true",n))){n=t(n+4,/["']/);let o=i;return/["']/.test(e.charAt(o-1))&&(o-=1),o=u(e,o),e.slice(0,o)+e.slice(n)}i=e.indexOf("contenteditable",i+1)}return e})(e.slice(t,o))+e.slice(o,n)),["style","script","span"]))r=(0,a.removeBetween)(r,"<"+s,">","</"+s+">","jodit");let s=e=>(0,a.removeBetween)((0,a.removeBetween)(e,"<span",">","</span>"),"&lt;span","&gt;","&lt;/span&gt;");e=(s(e.slice(0,t))+r+s(e.slice(n))).replace(/(class\s*=\s*)(['"])([^"']*)(jodit-wysiwyg|jodit)([^"']*\2)/g,"$1$2$3$5").replace(/(<[^<]+?)\sclass="[\s]*"/gim,"$1").replace(/(<[^<]+?)\sstyle="[\s;]*"/gim,"$1").replace(/(<[^<]+?)\sdir="[\s]*"/gim,"$1")}return e};if(r){let t=e.element.tagName;if("TEXTAREA"!==t&&"INPUT"!==t)throw(0,s.error)("If enable `editHTMLDocumentMode` - source element should be INPUT or TEXTAREA");e.e.on("beforeGetNativeEditorValue",()=>c(e.o.iframeDoctype+i.documentElement.outerHTML)).on("beforeSetNativeEditorValue",({value:t})=>{if(e.isLocked)return!1;if(/<(html|body)/i.test(t)){if(c(i.documentElement.outerHTML)!==c(t)){var n;let r,a;n=c(t),r=new DOMParser().parseFromString(n,"text/html"),e.e.fire("safeHTML",r.documentElement),a=(0,s.$$)("style.jodit-box",i.head),i.replaceChild(i.adoptNode(r.documentElement),i.documentElement),a.forEach(e=>o.Dom.append(i.head,e)),e.editor=i.body,l(),e.e.fire("prepareWYSIWYGEditor"),e.e.stopPropagation("beforeSetNativeEditorValue")}return!0}return!1},{top:!0})}if(e.editor=i.body,e.e.on("afterSetMode afterInit afterAddPlace",l),"auto"===t.height){i.documentElement&&(0,s.css)(i.documentElement,"overflowY","hidden");let n=e.async.throttle((...i)=>{e.async.requestAnimationFrame(()=>{if(e.editor&&e.iframe&&"auto"===t.height){let t=e.ew.getComputedStyle(e.editor),i=parseInt(t.marginTop||"0",10)+parseInt(t.marginBottom||"0",10);(0,s.css)(e.iframe,"height",e.editor.offsetHeight+i)}})},e.defaultTimeout/2);if(e.e.on("change afterInit afterSetMode resize",n).on([e.iframe,e.ew,i.documentElement],"load",n).on(i,"readystatechange DOMContentLoaded",n),"function"==typeof ResizeObserver){let t=new ResizeObserver(n);t.observe(i.body),e.e.on("beforeDestruct",()=>{t.disconnect()})}}return i.documentElement&&e.e.on(i.documentElement,"mousedown touchend",()=>{e.s.isFocused()||(e.s.focus(),e.editor===i.body&&e.s.setCursorIn(i.body))}).on(e.ew,"mousedown touchstart keydown keyup touchend click mouseup mousemove scroll",t=>{e.events?.fire(e.ow,t)}),!1})})})},61396:function(e,t,i){"use strict";i(5266).Config.prototype.imageCaption={wrapper:{tag:"figure",className:""},inner:null,caption:{tag:"figcaption",className:""}}},43058:function(e,t,i){"use strict";var n=i(25045),o=i(62445),r=i(81937),s=i(84839),a=i(23211),l=i(28077),u=i(65946),c=i(80991),d=i(18855),h=i(42259);i(61396);let p=["margin-top","margin-right","margin-bottom","margin-left"],m=new Set([r.KEY_UP,r.KEY_DOWN,r.KEY_LEFT,r.KEY_RIGHT]),f=/^(P|H[1-6]|PRE)$/i,g=new Set(["formatblock","insertorderedlist","insertunorderedlist"]),_="data-jodit-placeholder",v=`:where(.jodit-wysiwyg [contenteditable=false] [contenteditable=true]:focus){outline:1px solid var(--jd-color-border-selected,#1e88e5)}:where(.jodit-wysiwyg [${_}]){position:relative}:where(.jodit-wysiwyg [${_}])::before{position:absolute;top:0;right:0;left:0;padding:inherit;color:var(--jd-color-placeholder,#a5a5a5);content:attr(${_});pointer-events:none}`;class b extends d.Plugin{afterInit(e){(0,l.getContainer)(e,"imageCaption","style",!0).textContent=v,e.e.on("beforeCommandSelectall",this.__onSelectAll,{top:!0}),this.onChangePlace()}onToggleImageCaption(e,t){let i=(0,u.getCaptionWrapper)(this.j,e);if(i&&!0!==t){let t=this.__freshCaption(i);return t?this.__unrecorded(()=>this.__restore(t)):this.__uncaption(i,e),null}if(!i&&!1!==t)return this.__caption(e)}__freshCaption(e){let t=this.__fresh;return t&&t.wrapper===e&&e.parentNode===t.parent&&e.previousSibling===t.previous&&e.nextSibling===t.next&&y(e,t.image)===t.shape&&(0,u.getImageCaption)(this.j,e)===t.caption&&a.Dom.isEmpty(t.caption)?t:null}__caption(e){let t,{j:i}=this,{snapshot:n}=i.history;i.setEditorValue(),i.e.fire("internalUpdate");let o=n.make();return n.transaction(()=>{t=this.__fresh={...this.__wrap(e),before:o},i.setEditorValue()}),i.e.fire("updateToolbar"),t.caption}__unrecorded(e){let{j:t}=this;t.setEditorValue(),this.__fresh=null,t.history.snapshot.transaction(()=>{e(),t.setEditorValue()}),t.e.fire("internalUpdate"),t.e.fire("updateToolbar")}__wrap(e){var t;let{j:i}=this,{wrapper:n,inner:o,caption:r}=i.o.imageCaption,s=a.Dom.closest(e,"a",i.editor),l=s&&!s.textContent?.trim()&&1===s.getElementsByTagName("img").length?s:e,d=[(0,u.attr)(e,"style"),(0,u.attr)(e,"class")],h=l.parentNode,p=(0,c.cssInline)(e,"width")||((t=(0,u.attr)(e,"width"))?(0,u.isNumeric)(t)?`${t}px`:t:"")||(e.offsetWidth?`${e.offsetWidth}px`:""),m=(0,u.getAlignClasses)(i,e),f=(0,u.getHAlign)(e,m);(0,u.clearHAlign)(e,m);let g=this.__create(n),_=o?this.__create(o):g,v=this.__create(r);v.appendChild(i.createInside.element("br"));let b=this.__insert(g,l);return _!==g&&a.Dom.append(g,_),a.Dom.append(_,[l,v]),w(e,g),p&&((0,u.css)(g,"width",p),(0,u.css)(e,"width","100%")),(0,u.hAlignElement)(g,f,(0,u.getAlignClasses)(i,g)),this.__mark(g),{caption:v,wrapper:g,image:e,target:l,place:h,split:b,attributes:d,parent:g.parentNode,previous:g.previousSibling,next:g.nextSibling,shape:y(g,e)}}__restore(e){let{wrapper:t,image:i,target:n,place:o,split:r,attributes:s}=e;if(r)if(r.head||r.tail){let{sel:e}=this.j.s,t=e?.rangeCount?e.getRangeAt(0).startContainer:null,{head:i,tail:o}=r;if(i&&!(o&&t&&a.Dom.isOrContains(o,t)))a.Dom.append(i,[n,...(0,u.toArray)(o?.childNodes??[])]),a.Dom.safeRemove(o);else if(o){let e=o.firstChild;[...(0,u.toArray)(i?.childNodes??[]),n].forEach(t=>o.insertBefore(t,e)),a.Dom.safeRemove(i)}}else a.Dom.append(o,n),a.Dom.before(t,r.block);else a.Dom.before(t,n);a.Dom.safeRemove(t),(0,u.attr)(i,{style:s[0],class:s[1]})}__uncaption(e,t){let{j:i}=this,n=(0,u.getHAlign)(e,(0,u.getAlignClasses)(i,e)),o=(0,c.cssInline)(e,"width");a.Dom.safeRemove((0,u.getImageCaption)(i,e));let s=a.Dom.closest(t,"a",e)??t;if(w(e,t),o&&(0,u.css)(t,"width",o),(0,u.hAlignElement)(t,n,(0,u.getAlignClasses)(i,t)),a.Dom.isBlock(e)&&e.parentNode===i.editor&&i.o.enter.toLowerCase()!==r.BR){let t=i.createInside.element(i.o.enter);a.Dom.before(e,t),a.Dom.append(t,s)}else a.Dom.before(e,s);a.Dom.safeRemove(e)}__create({tag:e,className:t}){return this.j.createInside.element(e,t?{class:t}:{})}__insert(e,t){let{j:i}=this,n=a.Dom.isBlock(e)?a.Dom.closest(t,a.Dom.isBlock,i.editor):null;if(!n||!f.test(n.nodeName))return a.Dom.before(t,e),null;let o=i.ed.createRange();o.setStartBefore(n),o.setEndBefore(t);let r=o.extractContents();o.setStartAfter(t),o.setEndAfter(n);let[s,l]=[r,o.extractContents()].map((e,t)=>{let i=e.firstChild;return!i||a.Dom.isEmpty(i)?null:((0,u.call)(t?a.Dom.after:a.Dom.before,n,i),i)});return a.Dom.before(n,e),a.Dom.safeRemove(n),{block:n,head:s,tail:l}}__mark(e){(0,u.attr)(e,"contenteditable",!1);let t=(0,u.getImageCaption)(this.j,e);t&&((0,u.attr)(t,"contenteditable",!0),this.__placeholder(t))}__placeholder(e){let t=a.Dom.isEmpty(e)?this.j.i18n("Caption"):null;(0,u.attr)(e,_)!==t&&(0,u.attr)(e,_,t)}onChange(){let{j:e}=this;e.isInDestruct||e.getMode()===r.MODE_SOURCE||(0,u.toArray)(e.editor.getElementsByTagName(e.o.imageCaption.wrapper.tag)).forEach(t=>{a.Dom.isHTMLElement(t)&&(0,u.getCaptionedImage)(e,t)&&this.__mark(t)})}onInput(){let e=this.__caretCaption();e&&this.__placeholder(e)}onAfterGetValueFromEditor(e){if(!e.value.includes("contenteditable"))return;let{j:t}=this,i=t.c.element("template");i.innerHTML=e.value;let n=e=>(0,u.toArray)(e.querySelectorAll(t.o.imageCaption.wrapper.tag)).filter(e=>(0,u.getCaptionedImage)(t,e)),o=n(i.content),r=this.__fresh&&this.__freshCaption(this.__fresh.wrapper),s=r&&o[n(t.editor).indexOf(r.wrapper)],l=r&&s&&function(e,t,i){let n=(0,u.getCaptionedImage)(e,i),{split:o}=t;if(!n)return null;let r={wrapper:i,image:n,target:a.Dom.closest(n,"a",i)??n,place:t.place,split:null,attributes:t.attributes};if(o){let e=o.head?i.previousSibling:null,n=o.tail?i.nextSibling:null;if(o.head&&!a.Dom.isHTMLElement(e)||o.tail&&!a.Dom.isHTMLElement(n))return null;let s=o.block.cloneNode(!0);r.split={block:s,head:e,tail:n},r.place=function(e,t,i){let n=[];for(let i=t;i!==e&&i.parentNode;i=i.parentNode)n.unshift((0,u.toArray)(i.parentNode.childNodes).indexOf(i));return n.reduce((e,t)=>e.childNodes[t],i)}(o.block,t.place,s)}return r}(t,r,s),c=!1;l&&(this.__restore(l),c=!0),o.forEach(e=>{[e,(0,u.getImageCaption)(t,e)].forEach(e=>["contenteditable",_].forEach(t=>{e?.hasAttribute(t)&&(e.removeAttribute(t),c=!0)}))}),c&&(e.value=i.innerHTML)}onChangePlace(){let{j:e}=this;e.e.off([e.editor,e.ow,e.ew],".imageCaption").on(e.editor,"focusout.imageCaption",this.__onFocusOut,{capture:!0}).on(e.editor,"mousedown.imageCaption",this.__onMouseDown,{capture:!0}).on([e.ow,e.ew],"mouseup.imageCaption",this.__onMouseUp)}__onMouseDown(e){this.__press=e.target}__onFocusOut(e){let t=e.target;(0,u.getImageCaption)(this.j,(0,u.getCaptionWrapper)(this.j,t))===t&&(this.__press?this.__afterPress.push(t):this.__dropBlank(t,null))}__onMouseUp(){let e=this.__press;this.__press=null,this.__afterPress.splice(0).forEach(t=>this.__dropBlank(t,e))}__dropBlank(e,t){this.j.async.setTimeout(()=>{let{j:i}=this,n=(0,u.getCaptionWrapper)(i,e),o=(0,u.getCaptionedImage)(i,n);if(!n||!o||!a.Dom.isEmpty(e)||this.__keepsFocus(e))return;let r=!!(t&&a.Dom.isOrContains(n,t)),s=this.__freshCaption(n);this.__unrecorded(()=>s?this.__restore(s):this.__uncaption(n,o)),r&&i.e.fire("recalcPositionPopup")},1)}__keepsFocus(e){let{j:t}=this,i=e.ownerDocument;if(i.activeElement===e&&(i.hasFocus()||!t.od.hasFocus()))return!0;let n=t.od.activeElement;return!!(n&&n!==t.iframe&&!a.Dom.isOrContains(t.editor,n)&&(a.Dom.isOrContains(t.container,n)||a.Dom.closest(n,e=>a.Dom.isElement(e)&&(0,u.attr)(e,"data-editor_id")===t.id,t.od.body)))}__caretCaption(){let{s:e}=this.j;if(!e.isInsideArea)return null;let t=e.range.startContainer,i=(0,u.getImageCaption)(this.j,(0,u.getCaptionWrapper)(this.j,t));return i&&a.Dom.isOrContains(i,t)?i:null}onBeforeEnter(e){let t=e?.shiftKey?null:this.__caretCaption(),i=(0,u.getCaptionWrapper)(this.j,t);if(!i)return;let{j:n}=this;if(this.__focusEditor(),!a.Dom.isBlock(i))return void n.s.setCursorAfter(i);let o=this.__line();return a.Dom.after(i,o),n.s.setCursorIn(o),n.synchronizeValues(),!1}__focusEditor(){this.j.editor.focus({preventScroll:!0})}__line(){let{j:e}=this,t=e.createInside.element(e.o.enter);return a.Dom.isTag(t,"br")||a.Dom.append(t,e.createInside.element("br")),t}onBeforeInsertNode(e){let t=(0,u.getCaptionWrapper)(this.j,this.__caretCaption());if(!t||!((a.Dom.isElement(e)||a.Dom.isFragment(e))&&[e,...(0,u.toArray)(e.querySelectorAll("*"))].some(e=>a.Dom.isElement(e)&&(a.Dom.isBlock(e)||r.NO_EMPTY_TAGS.has(e.nodeName.toLowerCase())))))return;let{j:i}=this;if(this.__focusEditor(),!a.Dom.isBlock(t))return void i.s.setCursorAfter(t);let n=this.__line();a.Dom.after(t,n),i.s.setCursorIn(n)}onBeforeCommandDelete(){let e=this.__selectedWrapper();if(!e||!a.Dom.isBlock(e))return;let t=this.__line();return a.Dom.before(e,t),a.Dom.safeRemove(e),this.j.s.setCursorIn(t),!1}__selectedWrapper(){let{s:e}=this.j;if(!e.isInsideArea||e.isCollapsed())return null;let{startContainer:t,startOffset:i,endContainer:n,endOffset:o}=e.range,r=t.childNodes[i];return t===n&&o===i+1&&(0,u.getCaptionedImage)(this.j,r)?r:null}onKeyDown(e){if(this.__arrow=null,e.key?.length===1&&!e.ctrlKey&&!e.metaKey&&this.__selectedWrapper())return void this.j.execCommand("Delete");if(!m.has(e.key)||e.shiftKey||e.altKey||e.ctrlKey||e.metaKey||!this.j.s.isCollapsed())return;let t=this.__caretCaption();t&&(this.__arrow={key:e.key,range:this.j.s.range.cloneRange(),caption:t})}onKeyUp(e){let t=this.__arrow;if(this.__arrow=null,!t||e.key!==t.key||(0,h.isMoved)(this.j,t.range))return;let i=(0,u.getCaptionWrapper)(this.j,t.caption);if(!i)return;let n=t.key===r.KEY_DOWN||t.key===r.KEY_RIGHT,{s:o}=this.j;if(this.__focusEditor(),!a.Dom.isBlock(i))return void(n?o.setCursorAfter(i):o.setCursorBefore(i));let s=a.Dom.findNotEmptySibling(i,!n);if(a.Dom.isHTMLElement(s))return void o.setCursorIn(s,n);if(a.Dom.isText(s))return void(n?o.setCursorBefore(s):o.setCursorAfter(s));let l=this.__line();(0,u.call)(n?a.Dom.after:a.Dom.before,i,l),o.setCursorIn(l),this.j.synchronizeValues()}onBeforeCommand(e){let t=e.toLowerCase();if(g.has(t)&&this.__caretCaption())return!1;let i="undo"===t&&this.__fresh?this.__freshCaption(this.__fresh.wrapper):null;if(i)return this.__unrecorded(()=>{this.__restore(i),this.j.history.snapshot.restore(i.before)}),!1}__onSelectAll(){let e=this.__caretCaption();if(e)return this.j.e.stopPropagation("beforeCommandSelectall"),this.j.s.select(e,!0),!1}beforeDestruct(e){e.e.off("beforeCommandSelectall",this.__onSelectAll).off([e.editor,e.ow,e.ew],".imageCaption")}constructor(...e){super(...e),(0,n._)(this,"__fresh",null),(0,n._)(this,"__press",null),(0,n._)(this,"__afterPress",[]),(0,n._)(this,"__arrow",null)}}function y(e,t){return[e,t].flatMap(e=>[(0,u.attr)(e,"style"),(0,u.attr)(e,"class")]).join("|")}function w(e,t){p.forEach(i=>{let n=(0,c.cssInline)(e,i);n&&((0,u.css)(t,i,n),(0,u.css)(e,i,""))}),(0,u.attr)(e,"style")?.trim()||(0,u.attr)(e,"style",null)}(0,o._)([(0,s.watch)(":toggleImageCaption")],b.prototype,"onToggleImageCaption",null),(0,o._)([(0,s.watch)([":change",":afterInit",":afterSetMode",":changePlace"]),(0,s.debounce)()],b.prototype,"onChange",null),(0,o._)([(0,s.watch)([":input",":keyup",":afterPaste"])],b.prototype,"onInput",null),(0,o._)([(0,s.watch)(":afterGetValueFromEditor")],b.prototype,"onAfterGetValueFromEditor",null),(0,o._)([(0,s.watch)(":changePlace")],b.prototype,"onChangePlace",null),(0,o._)([s.autobind],b.prototype,"__onMouseDown",null),(0,o._)([s.autobind],b.prototype,"__onFocusOut",null),(0,o._)([s.autobind],b.prototype,"__onMouseUp",null),(0,o._)([(0,s.watch)(":beforeEnter")],b.prototype,"onBeforeEnter",null),(0,o._)([(0,s.watch)(":beforeInsertNode")],b.prototype,"onBeforeInsertNode",null),(0,o._)([(0,s.watch)(":beforeCommandDelete")],b.prototype,"onBeforeCommandDelete",null),(0,o._)([(0,s.watch)(":keydown")],b.prototype,"onKeyDown",null),(0,o._)([(0,s.watch)(":keyup")],b.prototype,"onKeyUp",null),(0,o._)([(0,s.watch)(":beforeCommand")],b.prototype,"onBeforeCommand",null),(0,o._)([s.autobind],b.prototype,"__onSelectAll",null),l.pluginSystem.add("imageCaption",b)},51034:function(e,t,i){"use strict";i(5266).Config.prototype.imageProcessor={replaceDataURIToBlobIdInView:!0}},39978:function(e,t,i){"use strict";var n=i(62445),o=i(81937),r=i(84839),s=i(23211),a=i(28077),l=i(65946),u=i(91206),c=i(23112);i(51034);let d="__jodit_imageprocessor_binded",h=d+"blob-id",p="jodit-wysiwyg_image-selected",m=new Set(["img","jodit","jodit-media"]);class f extends u.Plugin{afterInit(e){e.e.on(e.ed,"selectionchange",this.onSelectionChange),(0,a.getContainer)(e,"image-processor","style",!0).textContent=`.jodit-wysiwyg.${p}::selection,.jodit-wysiwyg.${p} *:not(img)::selection{background:transparent}`}beforeDestruct(e){e.e.off(e.ed,"selectionchange",this.onSelectionChange),e.editor.classList.remove(p);let t=(0,r.cached)(e,"buffer"),i=t?.get(h);if(t&&i){for(let e of Object.keys(i))URL.revokeObjectURL(e);t.delete(h)}}onAfterGetValueFromEditor(e,t){if(t!==o.SOURCE_CONSUMER)return this.onBeforeSetElementValue(e)}onBeforeSetElementValue(e){let{jodit:t}=this;if(!t.o.imageProcessor.replaceDataURIToBlobIdInView)return;let i=t.buffer.get(h);if(i)for(let t of Object.keys(i))for(;e.value.includes(t);)e.value=e.value.replace(t,i[t])}onSelectionChange(){let{jodit:e}=this;e.editor.classList.toggle(p,function(e){let{sel:t}=e.s;if(!t||!t.rangeCount)return!1;let{startContainer:i,startOffset:n,endContainer:o,endOffset:r}=t.getRangeAt(0),a=i.childNodes[n];return i===o&&r===n+1&&(s.Dom.isTag(a,m)||!!((0,l.getWrappedMedia)(e,a)??(0,l.getCaptionedImage)(e,a)))&&s.Dom.isOrContains(e.editor,i)}(e))}async afterChange(e){let{jodit:t}=this;t.editor&&(0,l.$$)("img",t.editor).forEach(e=>{(0,l.dataBind)(e,d)||((0,l.dataBind)(e,d,!0),e.complete||t.e.on(e,"load",function i(){t.isInDestruct||t.e?.fire("resize"),t.e.off(e,"load",i)}),e.src&&/^data:/.test(e.src)&&function(e,t){let i;if(!e.o.imageProcessor.replaceDataURIToBlobIdInView||"u"<typeof ArrayBuffer||"u"<typeof URL)return;let n=t.src;try{i=(0,c.dataURItoBlob)(n)}catch{return}t.src=URL.createObjectURL(i),e.e.fire("internalUpdate");let{buffer:o}=e,r=o.get(h)||{};r[t.src]=n,e.buffer.set(h,r)}(t,e),t.e.on(e,"mousedown touchstart",()=>{(function(e){for(let t of["previousSibling","nextSibling"]){let i=e[t];for(;s.Dom.isText(i)&&!i.nodeValue?.replace((0,o.INVISIBLE_SPACE_REG_EXP)(),"");){let e=i[t];s.Dom.safeRemove(i),i=e}}})(e),t.s.select((0,l.getCaptionWrapper)(t,e)??e)}))})}}(0,n._)([(0,r.watch)(":afterGetValueFromEditor")],f.prototype,"onAfterGetValueFromEditor",null),(0,n._)([(0,r.watch)(":beforeSetElementValue")],f.prototype,"onBeforeSetElementValue",null),(0,n._)([r.autobind],f.prototype,"onSelectionChange",null),(0,n._)([(0,r.watch)([":change",":afterInit",":changePlace"]),(0,r.debounce)()],f.prototype,"afterChange",null),a.pluginSystem.add("imageProcessor",f)},34689:function(e,t,i){"use strict";i(5266).Config.prototype.image={dialogWidth:600,openOnDblClick:!0,editSrc:!0,useImageEditor:!0,editTitle:!0,editAlt:!0,showCaptionCheckbox:!0,editLink:!0,editSize:!0,editBorderRadius:!0,editMargins:!0,editClass:!0,availableClasses:[],editStyle:!0,editId:!0,editAlign:!0,showPreview:!0,selectImageAfterClose:!0}},90886:function(e,t,i){"use strict";var n=i(25045),o=i(62445),r=i(84839),s=i(23211),a=i(28077),l=i(65946),u=i(18855),c=i(59400);i(34689);var d=i(27137),h=i(28771),p=i(670),m=i(47744),f=i(71552);class g extends u.Plugin{get form(){return new d.UIImagePropertiesForm(this.j,this.state,this.activeTabState,{openImageEditor:()=>(0,h.openImageEditorDialog)(this.j,this.state),openImagePopup:e=>(0,p.openImagePopup)(this.j,this.dialog,this.state,e)})}get dialog(){let{j:e}=this,t=e.dlg({minWidth:Math.min(400,screen.width),minHeight:590,buttons:["fullsize","dialog.close"]}),i=this.__buttons;return i.check.onAction(()=>{(0,f.applyValuesToImage)(e,this.state,this.state.sourceImage),e.synchronizeValues(),t.close()}),i.remove.onAction(()=>{let{sourceImage:i}=this.state,n=(0,l.getCaptionWrapper)(e,i)??i,o=e.s.createRange();o.setStartBefore(n),o.collapse(!0),e.s.removeNode(n),t.close(),e.s.selectRange(o)}),i.cancel.onAction(()=>{t.close()}),t.setHeader(e.i18n("Image properties")),t.setContent(this.form),t.setFooter([[i.cancel,i.remove],i.check]),t.e.on(t,"afterClose",()=>{let{sourceImage:t}=this.state;if(e.isInDestruct||!s.Dom.isOrContains(e.editor,t))return;let i=(0,l.getCaptionWrapper)(e,t),n=(0,l.getImageCaption)(e,i);if(n&&s.Dom.isEmpty(n))return void e.s.setCursorIn(n);let o=i??t;if(e.o.image.selectImageAfterClose)return void e.s.select(o);let r=e.s.createRange();r.setStartAfter(o),r.collapse(!0),e.s.selectRange(r)}),t.setSize(e.o.image.dialogWidth),(0,l.markOwner)(e,t.container),t}get __buttons(){let{j:e}=this;return{check:(0,c.Button)(e,"ok","Apply","primary"),remove:(0,c.Button)(e,"bin","Delete"),cancel:(0,c.Button)(e,"cancel","Cancel")}}open(){return this.activeTabState.activeTab="Image",this.__lock(),this.dialog.open().setModal(!0).setPosition(),this.__focusFirstField(),this.async.promise((e,t)=>(0,m.readValuesFromImage)(this.j,this.state).then(e,t)).catch(e=>{(0,l.isAbortError)(e)||this.dialog.message.error(e.message)}).finally(()=>this.__unlock()),!1}__focusFirstField(){let e=e=>(0,l.toArray)(e.querySelectorAll("input, select, textarea"));e(this.form.getElm("tabsBox")).concat(e(this.form.container)).find(e=>null!=e.offsetParent)?.focus()}__lock(){this.dialog.lock(),this.form.setMod("lock",!0),Object.values(this.__buttons).forEach(e=>e.state.disabled=!0)}__unlock(){this.dialog.unlock(),this.form.setMod("lock",!1),Object.values(this.__buttons).forEach(e=>e.state.disabled=!1)}afterInit(e){let t=this;e.e.on("afterConstructor changePlace",()=>{e.e.off(e.editor,".imageproperties").on(e.editor,"dblclick.imageproperties",i=>{let n=i.target;if(s.Dom.isTag(n,"img"))if(e.o.image.openOnDblClick){if(!1===this.j.e.fire("openOnDblClick",n))return;t.state.sourceImage=n,t.state.image=n.cloneNode(!0),e.o.readonly||(i.stopImmediatePropagation(),i.preventDefault(),t.open())}else i.stopImmediatePropagation(),e.s.select(n)})}).on("openImageProperties.imageproperties",e=>{t.state.sourceImage=e,this.state.image=e.cloneNode(!0),this.open()})}async onStateValuesImageSrcChange(){let{image:e,values:t}=this.state;if(e.src)try{this.__lock();try{await e.decode()}catch(e){}if(this.state.sizeIsLocked&&(0,l.isNumeric)(t.imageWidth)){let e=parseFloat(t.imageWidth.toString());t.imageHeight=Math.round(e/this.state.ratio)}this.j.e.fire("updateImageProperties.imageproperties",e)}catch(e){this.j.alert(e.message)}finally{this.__unlock()}}beforeDestruct(e){Object.values((0,r.cached)(this,"__buttons")??{}).forEach(e=>e.destruct()),(0,r.cached)(this,"dialog")?.destruct(),(0,r.cached)(this,"form")?.destruct(),e.e.off(e.editor,".imageproperties").off(".imageproperties")}constructor(...e){super(...e),(0,n._)(this,"state",{image:new Image,sourceImage:new Image,get ratio(){let{naturalWidth:e,naturalHeight:t}=this.image;return e/t||1},sizeIsLocked:!0,marginIsLocked:!0,values:{style:"",imageSrc:"",borderRadius:0,imageTitle:"",imageAlt:"",imageCaption:!1,imageLink:"",imageLinkOpenInNewTab:!1,imageWidth:0,imageHeight:0,marginTop:0,marginRight:0,marginBottom:0,marginLeft:0,classes:"",id:"",align:""}}),(0,n._)(this,"activeTabState",{activeTab:"Image"})}}(0,o._)([r.cache],g.prototype,"form",null),(0,o._)([r.cache],g.prototype,"dialog",null),(0,o._)([r.cache],g.prototype,"__buttons",null),(0,o._)([(0,r.watch)("state.image")],g.prototype,"onStateValuesImageSrcChange",null),a.pluginSystem.add("imageProperties",g)},26633:function(e,t,i){"use strict";i.d(t,{readAlign:function(){return o}});var n=i(16849);function o(e,t,i){let o=(0,n.getHAlign)(e,i);t.align="normal"===o?"":o}},47744:function(e,t,i){"use strict";i.d(t,{readValuesFromImage:function(){return d}});var n=i(16849),o=i(7909),r=i(80991),s=i(66638),a=i(26633),l=i(79310),u=i(18380),c=i(57339);async function d(e,t){let{sourceImage:i,values:d}=t,h=(0,s.getCaptionWrapper)(e,i),p=h??i;return d.imageCaption=!!h,(0,a.readAlign)(p,d,(0,n.getAlignClasses)(e,p)),d.borderRadius=parseInt((0,r.cssInline)(i,"border-radius")||"0",10)||0,d.id=(0,o.attr)(i,"id")||"",d.imageTitle=(0,o.attr)(i,"title")||"",d.imageAlt=(0,o.attr)(i,"alt")||"",d.style=(0,o.attr)(i,"style")||"",d.classes=((0,o.attr)(i,"class")||"").replace(/jodit_focused_image[\s]*/,""),(0,u.readMargins)(p,d,t),(0,l.readLink)(t,e,d),d.imageSrc=(0,o.attr)(i,"src")||"",(0,c.readSizes)(i,d,t,h)}},79310:function(e,t,i){"use strict";i.d(t,{readLink:function(){return r}});var n=i(23211),o=i(7909);function r(e,t,i){let r=n.Dom.closest(e.sourceImage,"a",t.editor);r?(i.imageLink=(0,o.attr)(r,"href")||"",i.imageLinkOpenInNewTab="_blank"===(0,o.attr)(r,"target")):(i.imageLink="",i.imageLinkOpenInNewTab=!1)}},18380:function(e,t,i){"use strict";i.d(t,{readMargins:function(){return o}});var n=i(74264);function o(e,t,i){let o=!0,r=!1;["marginTop","marginRight","marginBottom","marginLeft"].forEach(i=>{let s=e.style.getPropertyValue((0,n.kebabCase)(i));if(!s){r=!0,t[i]=0;return}/^[0-9]+(px)?$/.test(s)&&(s=parseInt(s,10)),t[i]=s,(r&&t[i]||o&&"marginTop"!==i&&t[i]!==t.marginTop)&&(o=!1)}),i.marginIsLocked=o}},57339:function(e,t,i){"use strict";i.d(t,{readSizes:function(){return a}});var n=i(70222),o=i(7909),r=i(80991),s=i(10808);async function a(e,t,i,a){try{await e.decode()}catch(e){}let l=(0,r.css)(a??e,"width",!0)||(0,o.attr)(e,"width")||!1,u=(0,r.css)(e,"height",!0)||(0,o.attr)(e,"height")||!1;t.imageWidth=!1!==l?(0,s.normalSizeFromString)(l):e.offsetWidth||e.naturalWidth,(0,n.isNumeric)(t.imageWidth)?t.imageHeight=!1!==u?(0,s.normalSizeFromString)(u):e.offsetHeight||e.naturalHeight:t.imageHeight=u||"";let{imageWidth:c,imageHeight:d}=t,h=parseFloat(c.toString());if(!(0,n.isNumeric)(c)||!(0,n.isNumeric)(d)){i.sizeIsLocked=!1;return}if(!1===u){t.imageHeight=Math.round(h/i.ratio),i.sizeIsLocked=!0;return}i.sizeIsLocked=1>Math.abs(h-parseFloat(d.toString())*i.ratio)}},27137:function(e,t,i){"use strict";i.d(t,{UIImagePropertiesForm:function(){return m}});var n=i(25045),o=i(62445),r=i(84839),s=i(91672),a=i(23211),l=i(65946),u=i(63468),c=i(29434),d=i(15753),h=i(29596),p=i(17306);class m extends u.UIGroup{className(){return"UIImagePropertiesForm"}appendChildToContainer(){}getElm(e){let t=super.getElm(e);if(t)return t;for(let t of this.elements){let i=t.getElm(e);if(i)return i}return null}render(){return`<form>
137
137
  <div class="jodit-grid jodit-grid_xs-column">
138
138
  <div class="jodit_col-lg-2-5 jodit_col-xs-5-5">
139
139
  <div class="&__view-box">
@@ -239,7 +239,7 @@
239
239
  `.trim().split(/\s+/));i.d(t,["TLDS",0,n])},99763:function(e,t,i){"use strict";i.d(t,{findTypedLink:function(){return c}});var n=i(91764),o=i(4441);let r=/^[^\s@]+@[^\s@]+\.[^\s@]+$/,s=new Set(["(","[",'"',"'","“","‘","<"]),a=new Set([".",",",";",":","!","?",'"',"'","”","’",">"]),l={")":"(","]":"["},u=/^[a-z\d][a-z\d-]{0,62}$/i;function c(e,t,i,c){var d;let h,p,m,f,g=t;for(;g>0&&!/\s/.test(e[g-1]);)g-=1;for(;g<t&&s.has(e[g]);)g+=1;for(;t>g;){let i=e[t-1],n=l[i];if(a.has(i)||n&&!e.slice(g,t-1).includes(n))t-=1;else break}let _=(d=e.slice(g,t),h=d.replace(/^mailto:/i,""),r.test(h)?"mailto:"+h:/^www\.[^\s.]+\.\S+$/i.test(d)||(f=(m=((p=d.search(/[/?#]/))<0?d:d.slice(0,p)).split("."))[m.length-1],m.length>1&&m.every(e=>u.test(e)&&!e.endsWith("-"))&&(o.TLDS.has(f)||i.includes(f))&&!c.includes(f)&&/[a-z]/i.test(m[0]))?"https://"+d:/^[a-z][a-z\d+.-]*:\/\//i.test(d)&&(0,n.isURL)(d)?d:"");return _?[g,t,_]:null}i.d(t,["EMAIL",0,r])},51730:function(e,t,i){"use strict";var n=i(5266);n.Config.prototype.mediaFakeTag="jodit-media",n.Config.prototype.mediaInFakeBlock=!0,n.Config.prototype.mediaBlocks=["video","audio"],n.Config.prototype.mediaWrappers={}},76830:function(e,t,i){"use strict";var n=i(81937),o=i(23211),r=i(28077),s=i(81910),a=i(93640),l=i(80991);i(51730),r.pluginSystem.add("media",function(e){let t="jodit_fake_wrapper",{mediaFakeTag:i,mediaBlocks:u,mediaInFakeBlock:c,mediaWrappers:d}=e.options,h=Object.values(d);h.length&&e.e.on("afterInit",()=>{let t=e=>[...new Set(e)].join(","),i=({tag:e,className:t})=>`.jodit-wysiwyg ${e}.${t}`,o=t(h.filter(({tag:e})=>n.IS_INLINE.test(e)).map(i)),s=t(h.flatMap(e=>u.map(t=>`${i(e)}>${t}`)));(0,r.getContainer)(e,"media-wrappers","style",!0).innerHTML=(o?`:where(${o}){display:inline-block}`:"")+`${s}{pointer-events:none}`}),(c||Object.keys(d).length)&&e.e.on("afterGetValueFromEditor",e=>{e.value=(0,s.unwrapMarkedTags)(e.value,i,"data-"+t)}).on("change afterInit afterSetMode changePlace",e.async.debounce(()=>{e.isDestructed||e.getMode()===n.MODE_SOURCE||(0,a.$$)(u.join(","),e.editor).forEach(n=>{(0,a.dataBind)(n,t)||((0,a.dataBind)(n,t,!0),(n=>{if(n.parentNode&&(0,a.attr)(n.parentNode,"data-jodit_iframe_wrapper"))n=n.parentNode;else if(d[n.nodeName.toLowerCase()])n=(0,a.getMediaWrapper)(e,n)??(0,a.wrapMedia)(e,n);else{if(!c)return;let r=n,s=e.createInside.element(i,{"data-jodit-temp":1,contenteditable:!1,draggable:!0,["data-"+t]:1});(0,a.attr)(s,"style",(0,a.attr)(n,"style"));let u=()=>{let e=(0,l.cssInline)(r,"width").endsWith("%");(0,l.css)(s,{display:!e&&/^inline/.test((0,l.css)(r,"display").toString())?"inline-block":"block",width:e?"":"fit-content",height:""})};u(),e.e.on(r,"changesize",u),n.parentNode&&o.Dom.before(n,s),o.Dom.append(s,n),n=s}e.e.off(n,"mousedown.select touchstart.select").on(n,"mousedown.select touchstart.select",()=>{e.s.select(n)})})(n))})},e.defaultTimeout))})},3244:function(e,t,i){"use strict";var n=i(81937),o=i(65946),r=i(80991),s=i(5266),a=i(42573),l=i(4274);s.Config.prototype.mobileTapTimeout=300,s.Config.prototype.toolbarAdaptive=!0,s.Config.prototype.buttonsMD=[{group:"font-style",buttons:[]},{group:"list",buttons:[]},{group:"font",buttons:[]},"---",{group:"media",buttons:[]},`
240
240
  `,{group:"state",buttons:[]},{group:"insert",buttons:[]},{group:"indent",buttons:[]},{group:"color",buttons:[]},"---",{group:"history",buttons:[]},{group:"other",buttons:[]},"|","dots"],s.Config.prototype.buttonsSM=[{group:"font-style",buttons:[]},{group:"list",buttons:[]},"---",{group:"font",buttons:[]},`
241
241
  `,{group:"state",buttons:[]},{group:"indent",buttons:[]},{group:"color",buttons:[]},"---",{group:"history",buttons:[]},"|","dots"],s.Config.prototype.buttonsXS=[{group:"font-style",buttons:[]},{group:"list",buttons:[]},"---",{group:"font",buttons:[]},{group:"color",buttons:[]},"---","dots"],s.Config.prototype.controls.dots={mode:n.MODE_SOURCE+n.MODE_WYSIWYG,popup(e,t,i,n){let s=n.control.data;return void 0===s&&(s={toolbar:(0,l.makeCollection)(e),rebuild(){if(n){let t=e.e.fire("getDiffButtons.mobile",n.closest(a.ToolbarCollection));if(t&&s){s.toolbar.build((0,o.splitArray)(t));let i=e.toolbar?.firstButton?.container.offsetWidth||36;(0,r.css)(s.toolbar.container,"width",(i+4)*3)}}}},n.control.data=s),s.rebuild(),s.toolbar},tooltip:"Show all"}},74240:function(e,t,i){"use strict";var n=i(23211),o=i(28077),r=i(65946),s=i(85932),a=i(2496);i(3244);let l=e=>"|"===e||"---"===e||`
242
- `===e;function u(e,t){let i=(0,a.flatButtonsSet)((0,r.splitArray)(t.o.buttons),t),n=t.getRegisteredButtonGroups(),o=!1,s=!1,u=[];for(let t of e)if((0,a.isButtonGroup)(t)){let e=[...t.buttons,...n[t.group]??[]],r=e.filter(e=>i.has(e));r.length!==e.length&&(o=!0),u.push(...r)}else l(t)?u.push(t):"dots"===t?s=!0:i.has(t)?u.push(t):o=!0;if(!o)return e;let c=[];for(let e of u)l(e)&&(0===c.length||l(c[c.length-1]))||c.push(e);for(;c.length&&l(c[c.length-1]);)c.pop();if(s){let e=(0,a.flatButtonsSet)(c,t);(0,r.toArray)(i).some(t=>!e.has(t))&&c.push("dots")}return c}o.pluginSystem.add("mobile",function(e){let t=0,i=(0,r.splitArray)(e.o.buttons);e.o.mobileTapTimeout&&e.e.on("touchend",i=>{if(i.changedTouches&&i.changedTouches.length){let n=new Date().getTime(),o=n-t;o>e.o.mobileTapTimeout&&(t=n,o<1.5*e.o.mobileTapTimeout&&e.s.insertCursorAtPoint(i.clientX,i.clientY))}}),e.e.on("getDiffButtons.mobile",t=>{if(t===e.toolbar){let t=(0,a.flatButtonsSet)((0,r.splitArray)(e.o.buttons),e),n=(0,a.flatButtonsSet)(i,e);return(0,r.toArray)(t).reduce((e,t)=>(n.has(t)||e.push(t),e),[])}}),e.o.toolbarAdaptive&&e.e.on("resize afterInit recalcAdaptive changePlace afterAddPlace",()=>{if(!e.o.toolbar)return;let t=(()=>{if(e.isFullSize)return(0,r.splitArray)(e.o.buttons);let t=function(e){let{toolbar:t}=e.o;if((0,s.isString)(t)||n.Dom.isHTMLElement(t)){let t=e.toolbarContainer.offsetWidth;if(t)return t}return e.container.offsetWidth||(e.container.parentElement??e.container).offsetWidth}(e);return t>=e.o.sizeLG?(0,r.splitArray)(e.o.buttons):t>=e.o.sizeMD?u((0,r.splitArray)(e.o.buttonsMD),e):t>=e.o.sizeSM?u((0,r.splitArray)(e.o.buttonsSM),e):u((0,r.splitArray)(e.o.buttonsXS),e)})();t.toString()!==i.toString()&&(i=t,e.e.fire("closeAllPopups"),e.toolbar?.setRemoveButtons(e.o.removeButtons).build(i.concat(e.o.extraButtons)))}).on(e.ow,"load resize",()=>e.e.fire("recalcAdaptive"))})},60162:function(e,t,i){"use strict";var n=i(36400),o=i(29434),r=i(5266),s=i(40037),a=i.n(s),l=i(83207),u=i.n(l),c=i(97547);let d="start",h=(e,t,{control:i})=>{let o="button"+i.command,r=(i.args&&i.args[0])??(0,n.dataBind)(e,o);r===d?(0,c.openStartDialog)(e):((0,n.dataBind)(e,o,r),e.execCommand(i.command,!1,"default"===r?null:r))};o.Icon.set("ol",a()).set("ul",u()),r.Config.prototype.controls.ul={command:"insertUnorderedList",tags:["ul"],tooltip:"Insert Unordered List",list:{default:"Default",circle:"Circle",disc:"Dot",square:"Quadrate"},exec:h},r.Config.prototype.controls.ol={command:"insertOrderedList",tags:["ol"],tooltip:"Insert Ordered List",list:{default:"Default","lower-alpha":"Lower Alpha","lower-greek":"Lower Greek","lower-roman":"Lower Roman","upper-alpha":"Upper Alpha","upper-roman":"Upper Roman",[d]:"Start at..."},exec:h,isChildDisabled:(e,t)=>t.control.args?.[0]===d&&!(0,c.closestOrderedList)(e)}},98792:function(e,t,i){"use strict";var n=i(25045),o=i(62445),r=i(84839),s=i(28077),a=i(91206);i(60162);class l extends a.Plugin{afterInit(e){e.registerCommand("insertUnorderedList",this.onCommand).registerCommand("insertOrderedList",this.onCommand)}onCommand(e,t,i){return this.jodit.s.commitStyle({element:"insertunorderedlist"===e?"ul":"ol",attributes:{style:{listStyleType:i??null}}}),this.jodit.synchronizeValues(),!1}beforeDestruct(e){}constructor(...e){super(...e),(0,n._)(this,"buttons",[{name:"ul",group:"list"},{name:"ol",group:"list"}])}}(0,o._)([r.autobind],l.prototype,"onCommand",null),s.pluginSystem.add("orderedList",l)},97547:function(e,t,i){"use strict";i.d(t,{closestOrderedList:function(){return a},openStartDialog:function(){return l}});var n=i(23211),o=i(7909),r=i(59400),s=i(5658);function a(e){let t=e.s.current();return t?n.Dom.closest(t,"ol",e.editor):null}function l(e){let t=a(e);if(!t)return;let i=e.dlg({resizable:!1,closeOnClickOverlay:!0}),n=new s.UIInput(e,{name:"start",type:"number",label:"Number for the first item",value:t.start}),l=new s.UIForm(e,[new s.UIBlock(e,[n])]);l.container.classList.add("jodit-dialog_alert"),l.onSubmit(({start:r})=>{let s=""===r?1:parseInt(r,10);if(isNaN(s))return n.focus(),!1;i.close(),(0,o.attr)(t,"start",1===s?null:s),e.synchronizeValues()}),e.s.save(),i.e.on(i,"afterClose",()=>{e.s.focus(),e.s.restore()}),i.setFooter([(0,r.Button)(e,"cancel","Cancel").onAction(()=>i.close()),(0,r.Button)(e,"ok","Apply","primary").onAction(()=>l.submit())]),i.open(l,e.i18n("Start numbering at"),!0,!0),n.focus(),n.nativeInput.select()}},71693:function(e,t,i){"use strict";var n=i(81937),o=i(5266);o.Config.prototype.askBeforePasteFromWord=!0,o.Config.prototype.processPasteFromWord=!0,o.Config.prototype.defaultActionOnPasteFromWord=null,o.Config.prototype.pasteFromWordActionList=[{value:n.INSERT_AS_HTML,text:"Keep"},{value:n.INSERT_AS_TEXT,text:"Clean"},{value:n.INSERT_ONLY_TEXT,text:"Insert only Text"}]},96730:function(e,t,i){"use strict";var n=i(25045),o=i(62445),r=i(81937),s=i(84839),a=i(28077),l=i(65946),u=i(91206);i(71693);var c=i(54308);class d extends u.Plugin{afterInit(e){}beforeDestruct(e){}processWordHTML(e,t,i){let{j:n}=this,{processPasteFromWord:o,askBeforePasteFromWord:r,defaultActionOnPasteFromWord:s,defaultActionOnPaste:a,pasteFromWordActionList:u}=n.o;return!!(o&&(0,l.isHtmlFromWord)(t))&&(r?(0,c.askInsertTypeDialog)(n,"The pasted content is coming from a Microsoft Word/Excel document. Do you want to keep the format or clean it up?","Word Paste Detected",n=>{this.insertFromWordByType(e,t,n,i)},u):this.insertFromWordByType(e,t,s||a,i),!0)}insertFromWordByType(e,t,i,n){switch(i){case r.INSERT_AS_HTML:{t=(0,l.applyStyles)(t);let e=this.j.events?.fire("beautifyHTML",t);(0,l.isString)(e)&&(t=e);break}case r.INSERT_AS_TEXT:t=(0,l.cleanFromWord)(t);break;case r.INSERT_ONLY_TEXT:t=(0,l.stripTags)((0,l.cleanFromWord)(t),this.j.ed,new Set(this.j.o.pasteExcludeStripTags),this.j.o.nl2brInPlainText)}(0,c.pasteInsertHtml)(e,this.j,t)}}(0,n._)(d,"requires",["paste"]),(0,o._)([(0,s.watch)(":processHTML")],d.prototype,"processWordHTML",null),a.pluginSystem.add("pasteFromWord",d)},7758:function(e,t,i){"use strict";var n=i(25045),o=i(81937),r=i(23211),s=i(28077),a=i(65946),l=i(18855),u=i(53681);class c extends l.Plugin{createDialog(){this.dialog=this.j.dlg();let e=(0,u.Button)(this.j,"paste","Paste","primary");e.onAction(this.paste);let t=(0,u.Button)(this.j,"","Cancel");t.onAction(this.dialog.close),this.container=this.j.c.div(),this.container.classList.add("jodit-paste-storage"),this.listBox=this.j.c.div(),this.previewBox=this.j.c.div(),r.Dom.append(this.container,this.listBox),r.Dom.append(this.container,this.previewBox),this.dialog.setHeader(this.j.i18n("Choose Content to Paste")),this.dialog.setContent(this.container),this.dialog.setFooter([e,t]),this.j.e.on(this.listBox,"click dblclick",e=>{let t=e.target;return r.Dom.isTag(t,"a")&&t.hasAttribute("data-index")&&this.selectIndex(parseInt((0,a.attr)(t,"-index")||"0",10)),"dblclick"===e.type&&this.paste(),!1})}afterInit(){this.j.e.off("afterCopy.paste-storage").on("pasteStorageList.paste-storage",()=>this.list.length).on("afterCopy.paste-storage",e=>{-1!==this.list.indexOf(e)&&this.list.splice(this.list.indexOf(e),1),this.list.unshift(e),this.list.length>5&&(this.list.length=5)}),this.j.registerCommand("showPasteStorage",{exec:this.showDialog,hotkeys:["ctrl+shift+v","cmd+shift+v"]})}beforeDestruct(){this.dialog&&this.dialog.destruct(),this.j.e.off(".paste-storage"),r.Dom.safeRemove(this.previewBox),r.Dom.safeRemove(this.listBox),r.Dom.safeRemove(this.container),this.container=null,this.listBox=null,this.previewBox=null,this.dialog=null,this.list=[]}constructor(...e){super(...e),(0,n._)(this,"currentIndex",0),(0,n._)(this,"list",[]),(0,n._)(this,"container",null),(0,n._)(this,"listBox",null),(0,n._)(this,"previewBox",null),(0,n._)(this,"dialog",null),(0,n._)(this,"paste",()=>{if(this.j.s.focus(),this.j.s.insertHTML(this.list[this.currentIndex]),0!==this.currentIndex){let e=this.list[0];this.list[0]=this.list[this.currentIndex],this.list[this.currentIndex]=e}this.dialog&&this.dialog.close(),this.j.synchronizeValues(),this.j.e.fire("afterPaste")}),(0,n._)(this,"onKeyDown",e=>{let t=this.currentIndex;if(-1!==[o.KEY_UP,o.KEY_DOWN,o.KEY_ENTER].indexOf(e.key)){if(e.key===o.KEY_UP&&(0===t?t=this.list.length-1:t-=1),e.key===o.KEY_DOWN&&(t===this.list.length-1?t=0:t+=1),e.key===o.KEY_ENTER)return void this.paste();t!==this.currentIndex&&this.selectIndex(t),e.stopImmediatePropagation(),e.preventDefault()}}),(0,n._)(this,"selectIndex",e=>{this.listBox&&(0,a.toArray)(this.listBox.childNodes).forEach((t,i)=>{t.classList.remove("jodit_active"),e===i&&this.previewBox&&(t.classList.add("jodit_active"),this.previewBox.innerHTML=this.list[e],t.focus())}),this.currentIndex=e}),(0,n._)(this,"showDialog",()=>{this.list.length<2||(this.dialog||this.createDialog(),this.listBox&&r.Dom.detach(this.listBox),this.previewBox&&r.Dom.detach(this.previewBox),this.list.forEach((e,t)=>{let i=this.j.c.element("a");i.textContent=t+1+". "+e.replace((0,o.SPACE_REG_EXP)(),""),this.j.e.on(i,"keydown",this.onKeyDown),(0,a.attr)(i,"href","#"),(0,a.attr)(i,"data-index",t.toString()),(0,a.attr)(i,"tab-index","-1"),this.listBox&&r.Dom.append(this.listBox,i)}),this.dialog&&this.dialog.open(),this.j.async.setTimeout(()=>{this.selectIndex(0)},100))})}}s.pluginSystem.add("pasteStorage",c)},38187:function(e,t,i){"use strict";var n=i(81937),o=i(5266),r=i(54308);o.Config.prototype.askBeforePasteHTML=!0,o.Config.prototype.processPasteHTML=!0,o.Config.prototype.scrollToPastedContent=!0,o.Config.prototype.pasteExcludeStripTags=["br","hr"],o.Config.prototype.pasteHTMLActionList=[{value:n.INSERT_AS_HTML,text:"Keep"},{value:n.INSERT_AS_TEXT,text:"Insert as Text"},{value:n.INSERT_ONLY_TEXT,text:"Insert only Text"}],o.Config.prototype.memorizeChoiceWhenPasteFragment=!1,o.Config.prototype.nl2brInPlainText=!0;let s="pasteStorage";o.Config.prototype.controls.paste={tooltip:"Paste from clipboard",async exec(e,t,{control:i}){if(i.name===s)return void e.execCommand("showPasteStorage");e.s.focus();let o="",a=!0;if(navigator.clipboard){try{let e=await navigator.clipboard.read();if(e&&e.length){let t=e[0],i=t.types?.includes(n.TEXT_HTML)?n.TEXT_HTML:n.TEXT_PLAIN,r=await t.getType(i);o=await new Response(r).text()}a=!1}catch(e){n.IS_PROD}if(a)try{o=await navigator.clipboard.readText(),a=!1}catch(e){n.IS_PROD}}a&&(a=0===(o=e.buffer.get(n.CLIPBOARD_ID)||"").length);let l=e.value;a?(e.ed.execCommand("paste"),(a=l===e.value)||e.e.fire("afterPaste")):o.length?((0,r.pasteInsertHtml)(null,e,o),e.e.fire("afterPaste")):a&&e.alert("Your browser doesn't support direct access to the clipboard.",()=>void e.s.focus())},list:{[s]:"Paste Storage"},isChildDisabled:e=>2>e.e.fire("pasteStorageList")}},54308:function(e,t,i){"use strict";i.d(t,{askInsertTypeDialog:function(){return h},getAllTypes:function(){return d},pasteInsertHtml:function(){return c},removeGoogleDocsWrapper:function(){return u}});var n=i(81937),o=i(23211),r=i(88475),s=i(28686),a=i(81910),l=i(53681);function u(e){if(!/docs-internal-guid-/i.test(e))return e;let{body:t}=new DOMParser().parseFromString(e,"text/html");return(0,r.toArray)(t.querySelectorAll('b[id^="docs-internal-guid-"]')).forEach(o.Dom.unwrap),t.innerHTML}function c(e,t,i){var n;let r,l;if(t.isInDestruct)return;e&&"drop"===e.type&&t.s.insertCursorAtPoint(e.clientX,e.clientY);let c=t.e.fire("beforePasteInsert",i);!(0,s.isVoid)(c)&&((0,s.isString)(c)||(0,s.isNumber)(c)||o.Dom.isNode(c))&&(i=c),(0,s.isString)(i)&&(n=u(i),-1!==(r=(n=(0,a.removeTagsByPrefix)(n,["<meta"])).search(/<\x21--StartFragment--\x3e/i))&&(n=n.substring(r+20)),-1!==(l=n.search(/<\x21--EndFragment--\x3e/i))&&(n=n.substring(0,l)),i=n),t.s.insertHTML(i)}function d(e){let t=e.types,i="";if((0,s.isArray)(t)||"[object DOMStringList]"===({}).toString.call(t))for(let e=0;e<t.length;e+=1)i+=t[e]+";";else i=(t||n.TEXT_PLAIN).toString()+";";return i}function h(e,t,i,n,o){if(!1===e.e.fire("beforeOpenPasteDialog",t,i,n,o))return;let r=e.confirm(`<div style="word-break: normal; white-space: normal">${e.i18n(t)}</div>`,e.i18n(i)),s=o.map(({text:t,value:i})=>(0,l.Button)(e,{text:t,name:t.toLowerCase(),tabIndex:0}).onAction(()=>{r.close(),n(i)}));r.e.on(r,"beforeClose",()=>{e.e.fire("beforeClosePasteDialog",r)}).one(r,"afterClose",()=>{e.s.isFocused()||e.s.focus(),e.e.fire("afterClosePasteDialog",r)});let a=(0,l.Button)(e,{text:"Cancel",tabIndex:0}).onAction(()=>{r.close()});return r.setFooter([...s,a]),s[0].focus(),s[0].state.variant="primary",e.e.fire("afterOpenPasteDialog",r,t,i,n,o),r}},23422:function(e,t,i){"use strict";var n=i(25045),o=i(62445),r=i(81937),s=i(84839),a=i(23211),l=i(28077),u=i(65946),c=i(18855);i(38187);var d=i(54308);class h extends c.Plugin{afterInit(e){e.e.on("paste.paste",this.onPaste).on("pasteStack.paste",e=>this.pasteStack.push(e)),this.j.e.on("processPaste.paste",this.onProcessPasteReplaceNl2Br)}beforeDestruct(e){e.e.off("paste.paste",this.onPaste).off("processPaste.paste",this.onProcessPasteReplaceNl2Br).off(".paste")}onPaste(e){try{if(!1===this.customPasteProcess(e)||!1===this.j.e.fire("beforePaste",e))return e.preventDefault(),!1;this.defaultPasteProcess(e)}finally{this.j.e.fire("afterPaste",e)}}customPasteProcess(e){if(!this.j.o.processPasteHTML)return;let t=(0,u.getDataTransfer)(e),i=[t?.getData(r.TEXT_PLAIN),t?.getData(r.TEXT_HTML),t?.getData(r.TEXT_RTF)];for(let t of i)if((0,u.isHTML)(t)&&(this.j.e.fire("processHTML",e,t,{plain:i[0],html:i[1],rtf:i[2]})||this.processHTML(e,t)))return!1}defaultPasteProcess(e){let t=(0,u.getDataTransfer)(e),i=t?.getData(r.TEXT_HTML)||t?.getData(r.TEXT_PLAIN);if(t&&i&&""!==(0,u.trim)(i)){let n=this.j.e.fire("processPaste",e,i,(0,d.getAllTypes)(t));void 0!==n&&(i=n),((0,u.isString)(i)||a.Dom.isNode(i))&&this.__insertByType(e,i,this.j.o.defaultActionOnPaste),e.preventDefault(),e.stopPropagation()}}processHTML(e,t){if(!this.j.o.askBeforePasteHTML)return!1;if(this.j.o.memorizeChoiceWhenPasteFragment){let i=this.pasteStack.find(e=>e.html===t);if(i)return this.__insertByType(e,t,i.action||this.j.o.defaultActionOnPaste),!0}if(this._isDialogOpened)return!0;let i=(0,d.askInsertTypeDialog)(this.j,"Your code is similar to HTML. Keep as HTML?","Paste as HTML",i=>{this._isDialogOpened=!1,this.__insertByType(e,t,i)},this.j.o.pasteHTMLActionList);return i&&(this._isDialogOpened=!0,i.e.on("beforeClose",()=>{this._isDialogOpened=!1})),!0}__insertByType(e,t,i){if(this.pasteStack.push({html:t,action:i}),(0,u.isString)(t))switch(this.j.buffer.set(r.CLIPBOARD_ID,t),i){case r.INSERT_CLEAR_HTML:t=(0,u.cleanFromWord)((0,d.removeGoogleDocsWrapper)(t));break;case r.INSERT_ONLY_TEXT:t=(0,u.stripTags)(t,this.j.ed,new Set(this.j.o.pasteExcludeStripTags),this.j.o.nl2brInPlainText);break;case r.INSERT_AS_TEXT:t=(0,u.htmlspecialchars)(t),this.j.o.nl2brInPlainText&&(t=(0,u.nl2br)(t));break;default:{let n=this.j.e.fire("onCustomPasteHTMLOption",i,t,e);"string"==typeof n&&(t=n)}}(0,d.pasteInsertHtml)(e,this.j,t)}onProcessPasteReplaceNl2Br(e,t,i){if(i===r.TEXT_PLAIN+";"&&!(0,u.isHTML)(t)){let e=(0,u.htmlspecialchars)(t);return this.j.o.nl2brInPlainText?(0,u.nl2br)(e):e}}constructor(...e){super(...e),(0,n._)(this,"pasteStack",new u.LimitedStack(20)),(0,n._)(this,"_isDialogOpened",!1)}}(0,o._)([s.autobind],h.prototype,"onPaste",null),(0,o._)([s.autobind],h.prototype,"onProcessPasteReplaceNl2Br",null),l.pluginSystem.add("paste",h)},8257:function(e,t,i){"use strict";var n=i(5266);n.Config.prototype.showPlaceholder=!0,n.Config.prototype.placeholder="Type something",n.Config.prototype.useInputsPlaceholder=!0},28346:function(e,t,i){"use strict";var n=i(25045),o=i(62445),r=i(81937),s=i(84839),a=i(23211),l=i(28077),u=i(23175),c=i(7909),d=i(80991),h=i(18855);i(8257);class p extends h.Plugin{afterInit(e){e.o.showPlaceholder&&(this.placeholderElm=e.c.fromHTML(`<span data-ref="placeholder" style="display: none;" class="jodit-placeholder">${e.i18n(e.o.placeholder)}</span>`),"rtl"===e.o.direction&&(0,d.css)(this.placeholderElm,{right:0,direction:"rtl"}),e.e.on("readonly",e=>{e?this.hide():this.toggle()}).on("changePlace",this.addEvents),this.addEvents())}show(){let e=this.j;if(e.o.readonly)return;let t=0,i=0,n=e.s.current(),o=n&&a.Dom.closest(n,a.Dom.isBlock,e.editor)||e.editor,r=e.ew.getComputedStyle(o),s=e.ew.getComputedStyle(e.editor);a.Dom.append(e.workplace,this.placeholderElm);let{firstChild:l}=e.editor;if(a.Dom.isElement(l)&&!(0,u.isMarker)(l)){let n=e.ew.getComputedStyle(l);t=parseInt(n.getPropertyValue("margin-top"),10),i=parseInt(n.getPropertyValue("margin-left"),10),(0,d.css)(this.placeholderElm,{fontFamily:n.getPropertyValue("font-family"),fontSize:parseInt(n.getPropertyValue("font-size"),10),lineHeight:n.getPropertyValue("line-height")})}else(0,d.css)(this.placeholderElm,{fontFamily:r.getPropertyValue("font-family"),fontSize:parseInt(r.getPropertyValue("font-size"),10),lineHeight:r.getPropertyValue("line-height")});(0,d.css)(this.placeholderElm,{display:"block",textAlign:r.getPropertyValue("text-align"),paddingTop:parseInt(s.paddingTop,10)+"px",paddingLeft:parseInt(s.paddingLeft,10)+"px",paddingRight:parseInt(s.paddingRight,10)+"px",marginTop:Math.max(parseInt(r.getPropertyValue("margin-top"),10),t),marginLeft:Math.max(parseInt(r.getPropertyValue("margin-left"),10),i)})}hide(){a.Dom.safeRemove(this.placeholderElm)}toggle(){let e=this.j;if(e.editor&&!e.isInDestruct){var t;if(e.getRealMode()!==r.MODE_WYSIWYG)return void this.hide();(function(e){if(!e.firstChild)return!0;let t=e.firstChild;if(a.Dom.isTag(t,"br")&&!a.Dom.next(t,Boolean,e))return!0;if(r.INSEPARABLE_TAGS.has(t.nodeName?.toLowerCase())||/^(TABLE)$/i.test(t.nodeName))return!1;let i=a.Dom.next(t,e=>e&&!a.Dom.isEmptyTextNode(e),e);return a.Dom.isText(t)&&!i?a.Dom.isEmptyTextNode(t):!i&&a.Dom.each(t,e=>!(a.Dom.isLeaf(e)||a.Dom.isList(e))&&(a.Dom.isEmpty(e)||a.Dom.isTag(e,"br")))})(t=e.editor)&&!t.textContent?.includes(r.NBSP_SPACE)?this.show():this.hide()}}beforeDestruct(e){this.hide(),e.e.off(".placeholder").off(window,"load",this.toggle)}constructor(...e){super(...e),(0,n._)(this,"placeholderElm",void 0),(0,n._)(this,"addNativeListeners",()=>{this.j.e.off(this.j.editor,"input.placeholder keydown.placeholder").on(this.j.editor,"input.placeholder keydown.placeholder",this.toggle)}),(0,n._)(this,"addEvents",()=>{let e=this.j;e.o.useInputsPlaceholder&&e.element.hasAttribute("placeholder")&&(this.placeholderElm.innerHTML=(0,c.attr)(e.element,"placeholder")||""),e.e.fire("placeholder",this.placeholderElm.innerHTML),e.e.off(".placeholder").on("changePlace.placeholder",this.addNativeListeners).on("change.placeholder focus.placeholder keyup.placeholder mouseup.placeholder keydown.placeholder mousedown.placeholder afterSetMode.placeholder changePlace.placeholder internalChange.placeholder afterCommand.placeholder resize.placeholder",this.toggle).on(window,"load",this.toggle),this.addNativeListeners(),this.toggle()})}}(0,o._)([(0,s.debounce)(e=>e.defaultTimeout/10,!0)],p.prototype,"toggle",null),l.pluginSystem.add("placeholder",p)},198:function(e,t,i){"use strict";i(28077).pluginSystem.add("poweredByJodit",function(e){let{o:t}=e;!t.hidePoweredByJodit&&!t.inline&&(t.showCharsCounter||t.showWordsCounter||t.showXPathInStatusbar)&&e.hookStatus("ready",()=>{e.statusbar.append(e.create.fromHTML(`<a
242
+ `===e;function u(e,t){let i=(0,a.flatButtonsSet)((0,r.splitArray)(t.o.buttons),t),n=t.getRegisteredButtonGroups(),o=!1,s=!1,u=[];for(let t of e)if((0,a.isButtonGroup)(t)){let e=[...t.buttons,...n[t.group]??[]],r=e.filter(e=>i.has(e));r.length!==e.length&&(o=!0),u.push(...r)}else l(t)?u.push(t):"dots"===t?s=!0:i.has(t)?u.push(t):o=!0;if(!o)return e;let c=[];for(let e of u)l(e)&&(0===c.length||l(c[c.length-1]))||c.push(e);for(;c.length&&l(c[c.length-1]);)c.pop();if(s){let e=(0,a.flatButtonsSet)(c,t);(0,r.toArray)(i).some(t=>!e.has(t))&&c.push("dots")}return c}o.pluginSystem.add("mobile",function(e){let t=0,i=(0,r.splitArray)(e.o.buttons);e.o.mobileTapTimeout&&e.e.on("touchend",i=>{if(i.changedTouches&&i.changedTouches.length){let n=new Date().getTime(),o=n-t;o>e.o.mobileTapTimeout&&(t=n,o<1.5*e.o.mobileTapTimeout&&e.s.insertCursorAtPoint(i.clientX,i.clientY))}}),e.e.on("getDiffButtons.mobile",t=>{if(t===e.toolbar){let t=(0,a.flatButtonsSet)((0,r.splitArray)(e.o.buttons),e),n=(0,a.flatButtonsSet)(i,e);return(0,r.toArray)(t).reduce((e,t)=>(n.has(t)||e.push(t),e),[])}}),e.o.toolbarAdaptive&&e.e.on("resize afterInit recalcAdaptive changePlace afterAddPlace",()=>{if(!e.o.toolbar)return;let t=(()=>{if(e.isFullSize)return(0,r.splitArray)(e.o.buttons);let t=function(e){let{toolbar:t}=e.o;if((0,s.isString)(t)||n.Dom.isHTMLElement(t)){let t=e.toolbarContainer.offsetWidth;if(t)return t}return e.container.offsetWidth||(e.container.parentElement??e.container).offsetWidth}(e);return t>=e.o.sizeLG?(0,r.splitArray)(e.o.buttons):t>=e.o.sizeMD?u((0,r.splitArray)(e.o.buttonsMD),e):t>=e.o.sizeSM?u((0,r.splitArray)(e.o.buttonsSM),e):u((0,r.splitArray)(e.o.buttonsXS),e)})();t.toString()!==i.toString()&&(i=t,e.e.fire("closeAllPopups"),e.toolbar?.setRemoveButtons(e.o.removeButtons).build(i.concat(e.o.extraButtons)))}).on(e.ow,"load resize",()=>e.e.fire("recalcAdaptive"))})},60162:function(e,t,i){"use strict";var n=i(36400),o=i(29434),r=i(5266),s=i(40037),a=i.n(s),l=i(83207),u=i.n(l),c=i(97547);let d="start",h=(e,t,{control:i})=>{let o="button"+i.command,r=(i.args&&i.args[0])??(0,n.dataBind)(e,o);r===d?(0,c.openStartDialog)(e):((0,n.dataBind)(e,o,r),e.execCommand(i.command,!1,"default"===r?null:r))};o.Icon.set("ol",a()).set("ul",u()),r.Config.prototype.controls.ul={command:"insertUnorderedList",tags:["ul"],tooltip:"Insert Unordered List",list:{default:"Default",circle:"Circle",disc:"Dot",square:"Quadrate"},exec:h},r.Config.prototype.controls.ol={command:"insertOrderedList",tags:["ol"],tooltip:"Insert Ordered List",list:{default:"Default","lower-alpha":"Lower Alpha","lower-greek":"Lower Greek","lower-roman":"Lower Roman","upper-alpha":"Upper Alpha","upper-roman":"Upper Roman",[d]:"Start at..."},exec:h,isChildDisabled:(e,t)=>t.control.args?.[0]===d&&!(0,c.closestOrderedList)(e)}},98792:function(e,t,i){"use strict";var n=i(25045),o=i(62445),r=i(84839),s=i(28077),a=i(91206);i(60162);class l extends a.Plugin{afterInit(e){e.registerCommand("insertUnorderedList",this.onCommand).registerCommand("insertOrderedList",this.onCommand)}onCommand(e,t,i){return this.jodit.s.commitStyle({element:"insertunorderedlist"===e?"ul":"ol",attributes:{style:{listStyleType:i??null}}}),this.jodit.synchronizeValues(),!1}beforeDestruct(e){}constructor(...e){super(...e),(0,n._)(this,"buttons",[{name:"ul",group:"list"},{name:"ol",group:"list"}])}}(0,o._)([r.autobind],l.prototype,"onCommand",null),s.pluginSystem.add("orderedList",l)},97547:function(e,t,i){"use strict";i.d(t,{closestOrderedList:function(){return a},openStartDialog:function(){return l}});var n=i(23211),o=i(7909),r=i(59400),s=i(5658);function a(e){let t=e.s.current();return t?n.Dom.closest(t,"ol",e.editor):null}function l(e){let t=a(e);if(!t)return;let i=e.dlg({resizable:!1,closeOnClickOverlay:!0}),n=new s.UIInput(e,{name:"start",type:"number",label:"Number for the first item",value:t.start}),l=new s.UIForm(e,[new s.UIBlock(e,[n])]);l.container.classList.add("jodit-dialog_alert"),l.onSubmit(({start:r})=>{let s=""===r?1:parseInt(r,10);if(isNaN(s))return n.focus(),!1;i.close(),(0,o.attr)(t,"start",1===s?null:s),e.synchronizeValues()}),e.s.save(),i.e.on(i,"afterClose",()=>{e.s.focus(),e.s.restore()}),i.setFooter([(0,r.Button)(e,"cancel","Cancel").onAction(()=>i.close()),(0,r.Button)(e,"ok","Apply","primary").onAction(()=>l.submit())]),i.open(l,e.i18n("Start numbering at"),!0,!0),n.focus(),n.nativeInput.select()}},71693:function(e,t,i){"use strict";var n=i(81937),o=i(5266);o.Config.prototype.askBeforePasteFromWord=!0,o.Config.prototype.processPasteFromWord=!0,o.Config.prototype.defaultActionOnPasteFromWord=null,o.Config.prototype.pasteFromWordActionList=[{value:n.INSERT_AS_HTML,text:"Keep"},{value:n.INSERT_AS_TEXT,text:"Clean"},{value:n.INSERT_ONLY_TEXT,text:"Insert only Text"}]},96730:function(e,t,i){"use strict";var n=i(25045),o=i(62445),r=i(81937),s=i(84839),a=i(28077),l=i(65946),u=i(91206);i(71693);var c=i(54308);class d extends u.Plugin{afterInit(e){}beforeDestruct(e){}processWordHTML(e,t,i){let{j:n}=this,{processPasteFromWord:o,askBeforePasteFromWord:r,defaultActionOnPasteFromWord:s,defaultActionOnPaste:a,pasteFromWordActionList:u}=n.o;return!!(o&&(0,l.isHtmlFromWord)(t))&&(r?(0,c.askInsertTypeDialog)(n,"The pasted content is coming from a Microsoft Word/Excel document. Do you want to keep the format or clean it up?","Word Paste Detected",n=>{this.insertFromWordByType(e,t,n,i)},u):this.insertFromWordByType(e,t,s||a,i),!0)}insertFromWordByType(e,t,i,n){switch(i){case r.INSERT_AS_HTML:{t=(0,l.applyStyles)(t);let e=this.j.events?.fire("beautifyHTML",t);(0,l.isString)(e)&&(t=e);break}case r.INSERT_AS_TEXT:t=(0,l.cleanFromWord)(t);break;case r.INSERT_ONLY_TEXT:t=(0,l.stripTags)((0,l.cleanFromWord)(t),this.j.ed,new Set(this.j.o.pasteExcludeStripTags),this.j.o.nl2brInPlainText)}(0,c.pasteInsertHtml)(e,this.j,t)}}(0,n._)(d,"requires",["paste"]),(0,o._)([(0,s.watch)(":processHTML")],d.prototype,"processWordHTML",null),a.pluginSystem.add("pasteFromWord",d)},7758:function(e,t,i){"use strict";var n=i(25045),o=i(81937),r=i(23211),s=i(28077),a=i(65946),l=i(18855),u=i(53681);class c extends l.Plugin{createDialog(){this.dialog=this.j.dlg();let e=(0,u.Button)(this.j,"paste","Paste","primary");e.onAction(this.paste);let t=(0,u.Button)(this.j,"","Cancel");t.onAction(this.dialog.close),this.container=this.j.c.div(),this.container.classList.add("jodit-paste-storage"),this.listBox=this.j.c.div(),this.previewBox=this.j.c.div(),r.Dom.append(this.container,this.listBox),r.Dom.append(this.container,this.previewBox),this.dialog.setHeader(this.j.i18n("Choose Content to Paste")),this.dialog.setContent(this.container),this.dialog.setFooter([e,t]),this.j.e.on(this.listBox,"click dblclick",e=>{let t=e.target;return r.Dom.isTag(t,"a")&&t.hasAttribute("data-index")&&this.selectIndex(parseInt((0,a.attr)(t,"-index")||"0",10)),"dblclick"===e.type&&this.paste(),!1})}afterInit(){this.j.e.off("afterCopy.paste-storage").on("pasteStorageList.paste-storage",()=>this.list.length).on("afterCopy.paste-storage",e=>{-1!==this.list.indexOf(e)&&this.list.splice(this.list.indexOf(e),1),this.list.unshift(e),this.list.length>5&&(this.list.length=5)}),this.j.registerCommand("showPasteStorage",{exec:this.showDialog,hotkeys:["ctrl+shift+v","cmd+shift+v"]})}beforeDestruct(){this.dialog&&this.dialog.destruct(),this.j.e.off(".paste-storage"),r.Dom.safeRemove(this.previewBox),r.Dom.safeRemove(this.listBox),r.Dom.safeRemove(this.container),this.container=null,this.listBox=null,this.previewBox=null,this.dialog=null,this.list=[]}constructor(...e){super(...e),(0,n._)(this,"currentIndex",0),(0,n._)(this,"list",[]),(0,n._)(this,"container",null),(0,n._)(this,"listBox",null),(0,n._)(this,"previewBox",null),(0,n._)(this,"dialog",null),(0,n._)(this,"paste",()=>{if(this.j.s.focus(),this.j.s.insertHTML(this.list[this.currentIndex]),0!==this.currentIndex){let e=this.list[0];this.list[0]=this.list[this.currentIndex],this.list[this.currentIndex]=e}this.dialog&&this.dialog.close(),this.j.synchronizeValues(),this.j.e.fire("afterPaste")}),(0,n._)(this,"onKeyDown",e=>{let t=this.currentIndex;if(-1!==[o.KEY_UP,o.KEY_DOWN,o.KEY_ENTER].indexOf(e.key)){if(e.key===o.KEY_UP&&(0===t?t=this.list.length-1:t-=1),e.key===o.KEY_DOWN&&(t===this.list.length-1?t=0:t+=1),e.key===o.KEY_ENTER)return void this.paste();t!==this.currentIndex&&this.selectIndex(t),e.stopImmediatePropagation(),e.preventDefault()}}),(0,n._)(this,"selectIndex",e=>{this.listBox&&(0,a.toArray)(this.listBox.childNodes).forEach((t,i)=>{t.classList.remove("jodit_active"),e===i&&this.previewBox&&(t.classList.add("jodit_active"),this.previewBox.innerHTML=this.list[e],t.focus())}),this.currentIndex=e}),(0,n._)(this,"showDialog",()=>{this.list.length<2||(this.dialog||this.createDialog(),this.listBox&&r.Dom.detach(this.listBox),this.previewBox&&r.Dom.detach(this.previewBox),this.list.forEach((e,t)=>{let i=this.j.c.element("a");i.textContent=t+1+". "+e.replace((0,o.SPACE_REG_EXP)(),""),this.j.e.on(i,"keydown",this.onKeyDown),(0,a.attr)(i,"href","#"),(0,a.attr)(i,"data-index",t.toString()),(0,a.attr)(i,"tab-index","-1"),this.listBox&&r.Dom.append(this.listBox,i)}),this.dialog&&this.dialog.open(),this.j.async.setTimeout(()=>{this.selectIndex(0)},100))})}}s.pluginSystem.add("pasteStorage",c)},38187:function(e,t,i){"use strict";var n=i(81937),o=i(5266),r=i(54308);o.Config.prototype.askBeforePasteHTML=!0,o.Config.prototype.processPasteHTML=!0,o.Config.prototype.scrollToPastedContent=!0,o.Config.prototype.pasteExcludeStripTags=["br","hr"],o.Config.prototype.pasteHTMLActionList=[{value:n.INSERT_AS_HTML,text:"Keep"},{value:n.INSERT_AS_TEXT,text:"Insert as Text"},{value:n.INSERT_ONLY_TEXT,text:"Insert only Text"}],o.Config.prototype.memorizeChoiceWhenPasteFragment=!1,o.Config.prototype.nl2brInPlainText=!0;let s="pasteStorage";o.Config.prototype.controls.paste={tooltip:"Paste from clipboard",async exec(e,t,{control:i}){if(i.name===s)return void e.execCommand("showPasteStorage");e.s.focus();let o="",a=!0;if(navigator.clipboard){try{let e=await navigator.clipboard.read();if(e&&e.length){let t=e[0],i=t.types?.includes(n.TEXT_HTML)?n.TEXT_HTML:n.TEXT_PLAIN,r=await t.getType(i);o=await new Response(r).text()}a=!1}catch(e){n.IS_PROD}if(a)try{o=await navigator.clipboard.readText(),a=!1}catch(e){n.IS_PROD}}a&&(a=0===(o=e.buffer.get(n.CLIPBOARD_ID)||"").length);let l=e.value;a?(e.ed.execCommand("paste"),(a=l===e.value)||e.e.fire("afterPaste")):o.length?((0,r.pasteInsertHtml)(null,e,o),e.e.fire("afterPaste")):a&&e.alert("Your browser doesn't support direct access to the clipboard.",()=>void e.s.focus())},list:{[s]:"Paste Storage"},isChildDisabled:e=>2>e.e.fire("pasteStorageList")}},54308:function(e,t,i){"use strict";i.d(t,{askInsertTypeDialog:function(){return h},getAllTypes:function(){return d},pasteInsertHtml:function(){return c},removeGoogleDocsWrapper:function(){return u}});var n=i(81937),o=i(23211),r=i(88475),s=i(28686),a=i(81910),l=i(53681);function u(e){if(!/docs-internal-guid-/i.test(e))return e;let{body:t}=new DOMParser().parseFromString(e,"text/html");return(0,r.toArray)(t.querySelectorAll('b[id^="docs-internal-guid-"]')).forEach(o.Dom.unwrap),t.innerHTML}function c(e,t,i){var n;let r,l;if(t.isInDestruct)return;e&&"drop"===e.type&&t.s.insertCursorAtPoint(e.clientX,e.clientY);let c=t.e.fire("beforePasteInsert",i);!(0,s.isVoid)(c)&&((0,s.isString)(c)||(0,s.isNumber)(c)||o.Dom.isNode(c))&&(i=c),(0,s.isString)(i)&&(n=u(i),-1!==(r=(n=(0,a.removeTagsByPrefix)(n,["<meta"])).search(/<\x21--StartFragment--\x3e/i))&&(n=n.substring(r+20)),-1!==(l=n.search(/<\x21--EndFragment--\x3e/i))&&(n=n.substring(0,l)),i=n),t.s.insertHTML(i)}function d(e){let t=e.types,i="";if((0,s.isArray)(t)||"[object DOMStringList]"===({}).toString.call(t))for(let e=0;e<t.length;e+=1)i+=t[e]+";";else i=(t||n.TEXT_PLAIN).toString()+";";return i}function h(e,t,i,n,o){if(!1===e.e.fire("beforeOpenPasteDialog",t,i,n,o))return;let r=e.confirm(`<div style="word-break: normal; white-space: normal">${e.i18n(t)}</div>`,e.i18n(i)),s=o.map(({text:t,value:i})=>(0,l.Button)(e,{text:t,name:t.toLowerCase(),tabIndex:0}).onAction(()=>{r.close(),n(i)}));r.e.on(r,"beforeClose",()=>{e.e.fire("beforeClosePasteDialog",r)}).one(r,"afterClose",()=>{e.s.isFocused()||e.s.focus(),e.e.fire("afterClosePasteDialog",r)});let a=(0,l.Button)(e,{text:"Cancel",tabIndex:0}).onAction(()=>{r.close()});return r.setFooter([...s,a]),s[0].focus(),s[0].state.variant="primary",e.e.fire("afterOpenPasteDialog",r,t,i,n,o),r}},23422:function(e,t,i){"use strict";var n=i(25045),o=i(62445),r=i(81937),s=i(84839),a=i(23211),l=i(28077),u=i(65946),c=i(18855);i(38187);var d=i(54308);class h extends c.Plugin{afterInit(e){e.e.on("paste.paste",this.onPaste).on("pasteStack.paste",e=>this.pasteStack.push(e)),this.j.e.on("processPaste.paste",this.onProcessPasteReplaceNl2Br)}beforeDestruct(e){e.e.off("paste.paste",this.onPaste).off("processPaste.paste",this.onProcessPasteReplaceNl2Br).off(".paste")}onPaste(e){try{if(!1===this.customPasteProcess(e)||!1===this.j.e.fire("beforePaste",e))return e.preventDefault(),!1;this.defaultPasteProcess(e)}finally{this.j.e.fire("afterPaste",e)}}customPasteProcess(e){if(!this.j.o.processPasteHTML)return;let t=(0,u.getDataTransfer)(e),i=[t?.getData(r.TEXT_PLAIN),t?.getData(r.TEXT_HTML),t?.getData(r.TEXT_RTF)];for(let t of i)if((0,u.isHTML)(t)&&(this.j.e.fire("processHTML",e,t,{plain:i[0],html:i[1],rtf:i[2]})||this.processHTML(e,t)))return!1}defaultPasteProcess(e){let t=(0,u.getDataTransfer)(e),i=t?.getData(r.TEXT_HTML)||t?.getData(r.TEXT_PLAIN);if(t&&i&&""!==(0,u.trim)(i)){let n=this.j.e.fire("processPaste",e,i,(0,d.getAllTypes)(t));void 0!==n&&(i=n),((0,u.isString)(i)||a.Dom.isNode(i))&&this.__insertByType(e,i,this.j.o.defaultActionOnPaste),e.preventDefault(),e.stopPropagation()}}processHTML(e,t){if(!this.j.o.askBeforePasteHTML)return!1;if(this.j.o.memorizeChoiceWhenPasteFragment){let i=this.pasteStack.find(e=>e.html===t);if(i)return this.__insertByType(e,t,i.action||this.j.o.defaultActionOnPaste),!0}if(this._isDialogOpened)return!0;let i=(0,d.askInsertTypeDialog)(this.j,"Your code is similar to HTML. Keep as HTML?","Paste as HTML",i=>{this._isDialogOpened=!1,this.__insertByType(e,t,i)},this.j.o.pasteHTMLActionList);return i&&(this._isDialogOpened=!0,i.e.on("beforeClose",()=>{this._isDialogOpened=!1})),!0}__insertByType(e,t,i){if(this.pasteStack.push({html:t,action:i}),(0,u.isString)(t))switch(this.j.buffer.set(r.CLIPBOARD_ID,t),i){case r.INSERT_CLEAR_HTML:t=(0,u.cleanFromWord)((0,d.removeGoogleDocsWrapper)(t));break;case r.INSERT_ONLY_TEXT:t=(0,u.stripTags)(t,this.j.ed,new Set(this.j.o.pasteExcludeStripTags),this.j.o.nl2brInPlainText);break;case r.INSERT_AS_TEXT:t=(0,u.htmlspecialchars)(t),this.j.o.nl2brInPlainText&&(t=(0,u.nl2br)(t));break;default:{let n=this.j.e.fire("onCustomPasteHTMLOption",i,t,e);"string"==typeof n&&(t=n)}}(0,d.pasteInsertHtml)(e,this.j,t)}onProcessPasteReplaceNl2Br(e,t,i){if(i===r.TEXT_PLAIN+";"&&!(0,u.isHTML)(t)){let e=(0,u.htmlspecialchars)(t);return this.j.o.nl2brInPlainText?(0,u.nl2br)(e):e}}constructor(...e){super(...e),(0,n._)(this,"pasteStack",new u.LimitedStack(20)),(0,n._)(this,"_isDialogOpened",!1)}}(0,o._)([s.autobind],h.prototype,"onPaste",null),(0,o._)([s.autobind],h.prototype,"onProcessPasteReplaceNl2Br",null),l.pluginSystem.add("paste",h)},8257:function(e,t,i){"use strict";var n=i(5266);n.Config.prototype.showPlaceholder=!0,n.Config.prototype.placeholder="Type something",n.Config.prototype.useInputsPlaceholder=!0},28346:function(e,t,i){"use strict";var n=i(25045),o=i(62445),r=i(81937),s=i(84839),a=i(23211),l=i(28077),u=i(23175),c=i(85371),d=i(7909),h=i(80991),p=i(18855);i(8257);class m extends p.Plugin{afterInit(e){e.o.showPlaceholder&&(this.placeholderElm=e.c.fromHTML(`<span data-ref="placeholder" style="display: none;" class="jodit-placeholder">${e.i18n(e.o.placeholder)}</span>`),"rtl"===e.o.direction&&(0,h.css)(this.placeholderElm,{right:0,direction:"rtl"}),e.e.on("readonly",e=>{e?this.hide():this.toggle()}).on("changePlace",this.addEvents),this.addEvents())}show(){let e=this.j;if(e.o.readonly)return;let t=0,i=0,n=e.s.current(),o=n&&a.Dom.closest(n,a.Dom.isBlock,e.editor)||e.editor,r=e.ew.getComputedStyle(o),s=e.ew.getComputedStyle(e.editor);a.Dom.append(e.workplace,this.placeholderElm);let{firstChild:l}=e.editor;if(a.Dom.isElement(l)&&!(0,u.isMarker)(l)){let n=e.ew.getComputedStyle(l);t=parseInt(n.getPropertyValue("margin-top"),10),i=parseInt(n.getPropertyValue("margin-left"),10),(0,h.css)(this.placeholderElm,{fontFamily:n.getPropertyValue("font-family"),fontSize:parseInt(n.getPropertyValue("font-size"),10),lineHeight:n.getPropertyValue("line-height")})}else(0,h.css)(this.placeholderElm,{fontFamily:r.getPropertyValue("font-family"),fontSize:parseInt(r.getPropertyValue("font-size"),10),lineHeight:r.getPropertyValue("line-height")});(0,h.css)(this.placeholderElm,{display:"block",textAlign:r.getPropertyValue("text-align"),paddingTop:parseInt(s.paddingTop,10)+"px",paddingLeft:parseInt(s.paddingLeft,10)+"px",paddingRight:parseInt(s.paddingRight,10)+"px",marginTop:Math.max(parseInt(r.getPropertyValue("margin-top"),10),t),marginLeft:Math.max(parseInt(r.getPropertyValue("margin-left"),10),i)})}hide(){a.Dom.safeRemove(this.placeholderElm)}toggle(){let e=this.j;if(e.editor&&!e.isInDestruct){var t;if(e.getRealMode()!==r.MODE_WYSIWYG)return void this.hide();(function(e){if(!e.firstChild)return!0;let t=e.firstChild;if(a.Dom.isTag(t,"br")&&!a.Dom.next(t,Boolean,e))return!0;if(r.INSEPARABLE_TAGS.has(t.nodeName?.toLowerCase())||/^(TABLE)$/i.test(t.nodeName))return!1;let i=a.Dom.next(t,e=>e&&!a.Dom.isEmptyTextNode(e),e);return a.Dom.isText(t)&&!i?a.Dom.isEmptyTextNode(t):!i&&a.Dom.each(t,e=>!(a.Dom.isLeaf(e)||a.Dom.isList(e)||(0,c.isAnchor)(e))&&(a.Dom.isEmpty(e)||a.Dom.isTag(e,"br")))})(t=e.editor)&&!t.textContent?.includes(r.NBSP_SPACE)?this.show():this.hide()}}beforeDestruct(e){this.hide(),e.e.off(".placeholder").off(window,"load",this.toggle)}constructor(...e){super(...e),(0,n._)(this,"placeholderElm",void 0),(0,n._)(this,"addNativeListeners",()=>{this.j.e.off(this.j.editor,"input.placeholder keydown.placeholder").on(this.j.editor,"input.placeholder keydown.placeholder",this.toggle)}),(0,n._)(this,"addEvents",()=>{let e=this.j;e.o.useInputsPlaceholder&&e.element.hasAttribute("placeholder")&&(this.placeholderElm.innerHTML=(0,d.attr)(e.element,"placeholder")||""),e.e.fire("placeholder",this.placeholderElm.innerHTML),e.e.off(".placeholder").on("changePlace.placeholder",this.addNativeListeners).on("change.placeholder focus.placeholder keyup.placeholder mouseup.placeholder keydown.placeholder mousedown.placeholder afterSetMode.placeholder changePlace.placeholder internalChange.placeholder afterCommand.placeholder resize.placeholder",this.toggle).on(window,"load",this.toggle),this.addNativeListeners(),this.toggle()})}}(0,o._)([(0,s.debounce)(e=>e.defaultTimeout/10,!0)],m.prototype,"toggle",null),l.pluginSystem.add("placeholder",m)},198:function(e,t,i){"use strict";i(28077).pluginSystem.add("poweredByJodit",function(e){let{o:t}=e;!t.hidePoweredByJodit&&!t.inline&&(t.showCharsCounter||t.showWordsCounter||t.showXPathInStatusbar)&&e.hookStatus("ready",()=>{e.statusbar.append(e.create.fromHTML(`<a
243
243
  tabindex="-1"
244
244
  style="text-transform: uppercase"
245
245
  class="jodit-status-bar-link"