jodit 4.17.0 → 4.17.2

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 (64) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/es2015/jodit.css +1 -1
  3. package/es2015/jodit.fat.min.js +3 -3
  4. package/es2015/jodit.js +171 -12
  5. package/es2015/jodit.min.js +3 -3
  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 +3 -3
  13. package/es2018/jodit.min.js +3 -3
  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 +5 -5
  18. package/es2021/jodit.js +171 -12
  19. package/es2021/jodit.min.js +5 -5
  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 +24 -24
  28. package/es2021.en/jodit.js +171 -12
  29. package/es2021.en/jodit.min.js +5 -5
  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 +186 -12
  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/core/helpers/html/safe-html.d.ts +1 -1
  52. package/esm/core/helpers/html/safe-html.js +8 -1
  53. package/esm/core/selection/helpers/composed-ranges.d.ts +21 -0
  54. package/esm/core/selection/helpers/composed-ranges.js +45 -0
  55. package/esm/core/selection/helpers/index.d.ts +1 -0
  56. package/esm/core/selection/helpers/index.js +1 -0
  57. package/esm/core/selection/selection.d.ts +23 -0
  58. package/esm/core/selection/selection.js +80 -4
  59. package/esm/plugins/drag-and-drop/drag-and-drop.js +16 -4
  60. package/package.json +1 -1
  61. package/types/core/helpers/html/safe-html.d.ts +1 -1
  62. package/types/core/selection/helpers/composed-ranges.d.ts +21 -0
  63. package/types/core/selection/helpers/index.d.ts +1 -0
  64. package/types/core/selection/selection.d.ts +23 -0
@@ -1,30 +1,30 @@
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.17.0
4
+ * Version: v4.17.2
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(require("{}"));else if("function"==typeof define&&define.amd)define(["{}"],t);else{var i="object"==typeof exports?t(require("{}")):t(e["{}"]);for(var o in i)("object"==typeof exports?exports:e)[o]=i[o]}}(self,function(e){return function(){var t,i,o={5266:function(e,t,i){"use strict";i.d(t,{Config:function(){return r}});var o=i(25045),n=i(81937);let s={};class r{static get defaultOptions(){return r.__defaultOptions||(r.__defaultOptions=new r),r.__defaultOptions}constructor(){(0,o._)(this,"cache",!0),(0,o._)(this,"defaultTimeout",100),(0,o._)(this,"namespace",""),(0,o._)(this,"safeMode",!1),(0,o._)(this,"width","auto"),(0,o._)(this,"height","auto"),(0,o._)(this,"safePluginsList",["about","enter","backspace","size","bold","hotkeys"]),(0,o._)(this,"commandToHotkeys",void 0),(0,o._)(this,"license",""),(0,o._)(this,"preset","custom"),(0,o._)(this,"presets",{inline:{inline:!0,toolbar:!1,toolbarInline:!0,toolbarInlineForSelection:!0,showXPathInStatusbar:!1,showCharsCounter:!1,showWordsCounter:!1,showPlaceholder:!1}}),(0,o._)(this,"ownerDocument",n.globalDocument),(0,o._)(this,"ownerWindow",n.globalWindow),(0,o._)(this,"shadowRoot",null),(0,o._)(this,"nonce",""),(0,o._)(this,"zIndex",0),(0,o._)(this,"readonly",!1),(0,o._)(this,"disabled",!1),(0,o._)(this,"activeButtonsInReadOnly",["source","fullsize","print","about","dots","selectall"]),(0,o._)(this,"allowCommandsInReadOnly",["selectall","preview","print"]),(0,o._)(this,"toolbarButtonSize","middle"),(0,o._)(this,"allowTabNavigation",!1),(0,o._)(this,"inline",!1),(0,o._)(this,"theme","default"),(0,o._)(this,"saveModeInStorage",!1),(0,o._)(this,"asyncStorage",{}),(0,o._)(this,"editorClassName",!1),(0,o._)(this,"className",!1),(0,o._)(this,"style",!1),(0,o._)(this,"containerStyle",!1),(0,o._)(this,"styleValues",{}),(0,o._)(this,"triggerChangeEvent",!0),(0,o._)(this,"direction",""),(0,o._)(this,"language","auto"),(0,o._)(this,"debugLanguage",!1),(0,o._)(this,"i18n",!1),(0,o._)(this,"tabIndex",-1),(0,o._)(this,"toolbar",!0),(0,o._)(this,"statusbar",!0),(0,o._)(this,"showTooltip",!0),(0,o._)(this,"showTooltipDelay",200),(0,o._)(this,"useNativeTooltip",!1),(0,o._)(this,"defaultActionOnPaste",n.INSERT_AS_HTML),(0,o._)(this,"enter",n.PARAGRAPH),(0,o._)(this,"iframe",!1),(0,o._)(this,"editHTMLDocumentMode",!1),(0,o._)(this,"enterBlock","br"!==this.enter?this.enter:n.PARAGRAPH),(0,o._)(this,"defaultMode",n.MODE_WYSIWYG),(0,o._)(this,"useSplitMode",!1),(0,o._)(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,o._)(this,"colorPickerDefaultTab","background"),(0,o._)(this,"imageDefaultWidth",300),(0,o._)(this,"imageDefaultAlign","normal"),(0,o._)(this,"imageAlignClasses",null),(0,o._)(this,"removeButtons",[]),(0,o._)(this,"disablePlugins",[]),(0,o._)(this,"extraPlugins",[]),(0,o._)(this,"basePath",void 0),(0,o._)(this,"extraButtons",[]),(0,o._)(this,"extraIcons",{}),(0,o._)(this,"createAttributes",{table:{style:"border-collapse:collapse;width: 100%;"}}),(0,o._)(this,"sizeLG",900),(0,o._)(this,"sizeMD",700),(0,o._)(this,"sizeSM",400),(0,o._)(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,o._)(this,"controls",void 0),(0,o._)(this,"events",{}),(0,o._)(this,"textIcons",!1),(0,o._)(this,"popupRoot",null),(0,o._)(this,"showBrowserColorPicker",!0),Object.assign(this,s)}}(0,o._)(r,"__defaultOptions",void 0),s=r.prototype,r.prototype.controls={}},24735:function(e,t,i){"use strict";i.d(t,{Async:function(){return m}});var o=i(25045),n=i(81937),s=i(61077),r=i(72068),a=i(91565),l=i(72412),c=i(62101),u=i(52100),h=i(85932),d=i(18303),p=i(28712),f=i(14228);class m{delay(e){return this.promise(t=>this.setTimeout(t,e))}setTimeout(e,t,...i){if(this.isDestructed)return 0;let o={};(0,d.isVoid)(t)&&(t=0),(0,l.isNumber)(t)||(t=(o=t).timeout||0),o.label&&this.clearLabel(o.label);let n=(0,s.setTimeout)(e,t,...i),r=o.label||n;return this.timers.set(r,n),this.__callbacks.set(r,e),n}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,s.clearTimeout)(this.timers.get(e)),this.timers.delete(e),this.__callbacks.delete(e))}clearTimeout(e){if((0,h.isString)(e))return this.clearLabel(e);(0,s.clearTimeout)(e),this.timers.delete(e),this.__callbacks.delete(e)}debounce(e,t,i=!1){let o=0,n=!1,l=[],h=(...t)=>{if(!n){o=0;let i=e(...t);if(n=!0,l.length){let e=()=>{l.forEach(e=>e()),l.length=0};(0,u.isPromise)(i)?i.finally(e):e()}}},d=(...r)=>{n=!1,t?(!o&&i&&h(...r),(0,s.clearTimeout)(o),o=this.setTimeout(()=>h(...r),(0,a.isFunction)(t)?t():t),this.timers.set(e,o)):h(...r)};return(0,c.isPlainObject)(t)&&t.promisify?(...e)=>{let t=this.promise(e=>{l.push(e)}).catch(e=>{if((0,r.isAbortError)(e))return null;throw e});return d(...e),t}:d}microDebounce(e,t=!1){let i,o=!1,n=!0;return(...s)=>{if(i=s,o){n=!0;return}n=!0,t&&(n=!1,e(...i)),o=!0,this.__queueMicrotaskNative(()=>{o=!1,!this.isDestructed&&n&&e(...i)})}}throttle(e,t,i=!1){let o=null,n,s,r;return(...i)=>{(n=!0,r=i,t)?o||(s=()=>{n?(e(...r),n=!1,o=this.setTimeout(s,(0,a.isFunction)(t)?t():t),this.timers.set(s,o)):o=null})():e(...r)}}promise(e){let t=()=>{},i=new Promise((i,o)=>{t=()=>o((0,f.abort)("Abort async")),this.promisesRejections.add(t),e(i,o)});return!i.finally&&"u">typeof process&&!n.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 o=globalThis.scheduler.postTask(e,{...t,signal:i.signal});return o.finally(()=>{this.__controllers.delete(i)}).catch(()=>null),o}return this.promise((o,n)=>{let s=this.setTimeout(()=>{try{o(e())}catch(e){n(e)}this.__controllers.delete(i)},t.delay||1);i.signal.addEventListener("abort",()=>{this.clearTimeout(s),this.__controllers.delete(i),n((0,f.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,s.clearTimeout)(this.timers.get(e))),this.timers.clear(),this.promisesRejections.forEach(e=>e()),this.promisesRejections.clear()}destruct(){this.clear(),this.isDestructed=!0}constructor(){(0,o._)(this,"timers",new Map),(0,o._)(this,"__callbacks",new Map),(0,o._)(this,"__queueMicrotaskNative",queueMicrotask?.bind(window)??Promise.resolve().then.bind(Promise.resolve())),(0,o._)(this,"promisesRejections",new Set),(0,o._)(this,"__requestsIdle",new Set),(0,o._)(this,"__controllers",new Set),(0,o._)(this,"__requestsRaf",new Set),(0,o._)(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,o._)(this,"__cancelIdleCallbackNative",window.cancelIdleCallback?.bind(window)??(e=>{this.clearTimeout(e)})),(0,o._)(this,"isDestructed",!1)}}},91231:function(e,t,i){"use strict";i.d(t,{Async:function(){return o.Async}});var o=i(24735)},80251:function(e,t,i){"use strict";i.d(t,{Component:function(){return c}});var o=i(25045),n=i(91231),s=i(69364),r=i(28077),a=i(65946);let l=new Map;class c{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 o=[this.componentName];return e&&o.push("__"+(e=e.replace(/[^a-z0-9-]/gi,"-"))),t&&(o.push("_",t),o.push("_",(0,a.isVoid)(i)?"true":i.toString())),o.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===s.STATUSES.ready}get isDestructed(){return this.componentStatus===s.STATUSES.destructed}get isInDestruct(){return s.STATUSES.beforeDestruct===this.componentStatus||s.STATUSES.destructed===this.componentStatus}bindDestruct(e){return e.hookStatus(s.STATUSES.beforeDestruct,()=>!this.isInDestruct&&this.destruct()),this}destruct(){this.setStatus(s.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 o=l.get(this),n=o?.[e];n&&n.length&&n.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,o._)(this,"__componentName",void 0),(0,o._)(this,"async",new n.Async),(0,o._)(this,"uid",void 0),(0,o._)(this,"ownerWindow",window),(0,o._)(this,"__componentStatus",s.STATUSES.beforeInit),this.uid="jodit-uid-"+(0,r.uniqueUid)()}}(0,o._)(c,"STATUSES",s.STATUSES)},16964:function(e,t,i){"use strict";i.d(t,{Component:function(){return o.Component},STATUSES:function(){return n.STATUSES},ViewComponent:function(){return s.ViewComponent}});var o=i(80251),n=i(69364),s=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 s}});var o=i(25045),n=i(80251);class s extends n.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,o._)(this,"jodit",void 0),this.setParentView(e)}}},81937:function(e,t,i){"use strict";i.r(t),i.d(t,{IS_TEST:function(){return o}});let o=!1,n="u">typeof window?window:void 0,s="u">typeof document?document:void 0,r=new Set(["ul","ol"]),a=["img","video","svg","iframe","script","input","textarea","link","jodit","jodit-media"],l=new Set([...a,"br","hr"]),c=new Set(a),u="Meta",h="Backspace",d="Enter",p="Escape",f="ArrowLeft",m="ArrowUp",g="ArrowRight",_="ArrowDown",v="Delete",b=[u,h,v,m,_,g,f,d,p,"F3","Tab"],y="u">typeof navigator&&(-1!==navigator.userAgent.indexOf("MSIE")||/rv:11.0/i.test(navigator.userAgent)),w=void 0!==n&&/Mac|iPod|iPhone|iPad/.test(n.navigator.platform),S=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:C,isMin:E}=(()=>{if("u"<typeof document)return{basePath:"",isMin:!0};let e=s.currentScript;if(e)return S(e.src);let t=s.querySelectorAll("script[src]");return t&&t.length?S(t[t.length-1].src):S(n.location.href)})(),D=new Set(["touchstart","touchend","scroll","mousewheel","mousemove","touchmove"]);i.d(t,["ACCURACY",0,10,"APP_VERSION",0,"4.17.0","BASE_PATH",0,C,"BASE_PATH_IS_MIN",0,E,"BR",0,"br","CLIPBOARD_ID",0,"clipboard","COMMAND_KEYS",0,b,"EMULATE_DBLCLICK_TIMEOUT",0,300,"ES",0,"es2021","FAT_MODE",0,!0,"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,h,"KEY_DELETE",0,v,"KEY_DOWN",0,_,"KEY_END",0,"End","KEY_ENTER",0,d,"KEY_ESC",0,p,"KEY_F3",0,"F3","KEY_HOME",0,"Home","KEY_LEFT",0,f,"KEY_META",0,u,"KEY_RIGHT",0,g,"KEY_SPACE",0,"Space","KEY_TAB",0,"Tab","KEY_UP",0,m,"LIST_TAGS",0,r,"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,c,"PARAGRAPH",0,"p","PASSIVE_EVENTS",0,D,"SAFE_COUNT_CHANGE_CALL",0,10,"SET_TEST",0,()=>o=!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,s,"globalWindow",0,n,"lang",0,{}])},76517:function(e,t,i){"use strict";i.d(t,{Create:function(){return l}});var o=i(25045),n=i(81937),s=i(23211),r=i(65946),a=i(28712);class l{get doc(){return(0,r.isFunction)(this.document)?this.document():this.document}element(e,t,i){let o=this.doc.createElement(e.toLowerCase());return this.applyCreateAttributes(o),t&&((0,r.isPlainObject)(t)?(0,r.attr)(o,t):i=t),i&&(0,r.asArray)(i).forEach(e=>s.Dom.append(o,(0,r.isString)(e)?this.fromHTML(e):e)),o}div(e,t,i){let o=this.element("div",t,i);return e&&(o.className=e),o}sandbox(){let e=this.element("iframe",{sandbox:"allow-same-origin"});s.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 o=this.element("span",t,i);return e&&(o.className=e),o}a(e,t,i){let o=this.element("a",t,i);return e&&(o.className=e),o}text(e){return this.doc.createTextNode(e)}fake(){return this.text(n.INVISIBLE_SPACE)}fragment(){return this.doc.createDocumentFragment()}fromHTML(e,t){let i=this.div();i.innerHTML=e.toString();let o=i.firstChild===i.lastChild&&i.firstChild?i.firstChild:i;if(s.Dom.safeRemove(o),t){let e=(0,r.refs)(o);Object.keys(t).forEach(i=>{let o=e[i];o&&!1===t[i]&&s.Dom.hide(o)})}return o}applyCreateAttributes(e){if(this.createAttributes){let t=this.createAttributes;if(t&&t[e.tagName.toLowerCase()]){let i=t[e.tagName.toLowerCase()];(0,r.isFunction)(i)?i(e):(0,r.isPlainObject)(i)&&(0,r.attr)(e,i)}}}constructor(e,t){(0,o._)(this,"document",void 0),(0,o._)(this,"createAttributes",void 0),this.document=e,this.createAttributes=t}}},79821:function(e,t,i){"use strict";i.d(t,{Create:function(){return o.Create}});var o=i(76517)},49574:function(e,t,i){"use strict";i.d(t,{autobind:function(){return n}});var o=i(91565);function n(e,t,i){if(!(0,o.isFunction)(i.value))throw TypeError(`@autobind can only be applied to methods, but "${t}" is not a function`);let n=i.value;return{configurable:!0,get(){let e=n.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 c},cached:function(){return a}});var o=i(69364),n=i(23211),s=i(28686),r=i(38027);function a(e,t){let i=Object.getOwnPropertyDescriptor(e,t);return!i||(0,s.isFunction)(i.get)?null:i.value}function l(e,t,i){let o=i.get;if(!o)throw(0,r.error)("Getter property descriptor expected");i.get=function(){let e=o.call(this);return e&&!0===e.noCache||Object.defineProperty(this,t,{configurable:i.configurable,enumerable:i.enumerable,writable:!1,value:e}),e}}function c(e,t,i){let a=i.value;if(!(0,s.isFunction)(a))throw(0,r.error)("Handler must be a Function");let l=!0,c=new WeakMap;i.value=function(...e){let t=this.od??document,i=c.get(t);if(l&&i?.has(this.constructor))return i.get(this.constructor)?.cloneNode(!0);let o=a.apply(this,e);return l&&n.Dom.isElement(o)&&(i?i.set(this.constructor,o):c.set(t,new WeakMap([[this.constructor,o]]))),l?o.cloneNode(!0):o},e.hookStatus(o.STATUSES.ready,e=>{l=!!((0,s.isViewObject)(e)?e:e.jodit).options.cache})}},91672:function(e,t,i){"use strict";i.d(t,{component:function(){return r},getComponentClass:function(){return a}});var o=i(81937),n=i(421);let s=new Map;function r(e){class t extends e{constructor(...e){super(...e),this.constructor===t&&(this instanceof t||Object.setPrototypeOf(this,t.prototype),this.setStatus("ready"))}}let i=(0,n.getClassName)(e.prototype);if(s.has(i)&&!o.IS_PROD)throw Error(`Component with name "${i}" is already registered`);return s.set(i,t),t}function a(e){return s.get(e)}},55184:function(e,t,i){"use strict";i.d(t,{debounce:function(){return a},throttle:function(){return l}});var o=i(16964),n=i(28686),s=i(28712),r=i(33201);function a(e,t=!1,i="debounce"){return(a,l)=>{let c=a[l];if(!(0,n.isFunction)(c))throw(0,r.error)("Handler must be a Function");return a.hookStatus(o.STATUSES.ready,o=>{let{async:r}=o;(0,s.assert)(null!=r,`Component ${o.componentName||o.constructor.name} should have "async:IAsync" field`);let a=(0,n.isFunction)(e)?e(o):e,c=(0,n.isNumber)(a)||(0,n.isPlainObject)(a)?a:o.defaultTimeout;Object.defineProperty(o,l,{configurable:!0,value:r[i](o[l].bind(o),c,t)})}),{configurable:!0,get(){return c.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 n}});var o=i(91565);function n(...e){return t=>{let i=t.prototype;for(let t=0;t<e.length;t++){let n=e[t],s=Object.getOwnPropertyNames(n.prototype);for(let e=0;e<s.length;e++){let t=s[e],r=Object.getOwnPropertyDescriptor(n.prototype,t);null!=r&&(0,o.isFunction)(r.value)&&!(0,o.isFunction)(i[t])&&Object.defineProperty(i,t,{enumerable:!0,configurable:!0,writable:!0,value:function(...e){return r.value.call(this,...e)}})}}}}},29200:function(e,t,i){"use strict";i.d(t,{hook:function(){return s}});var o=i(91565),n=i(33201);function s(e){return(t,i)=>{if(!(0,o.isFunction)(t[i]))throw(0,n.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 r}});var o=i(16964),n=i(91565),s=i(33201);function r(){return(e,t)=>{if(!(0,n.isFunction)(e[t]))throw(0,s.error)("Handler must be a Function");e.hookStatus(o.STATUSES.ready,e=>{let{async:i}=e,o=e[t];e[t]=(...t)=>i.requestIdleCallback(o.bind(e,...t))})}}},84839:function(e,t,i){"use strict";i.r(t),i.d(t,{autobind:function(){return o.autobind},cache:function(){return n.cache},cacheHTML:function(){return n.cacheHTML},cached:function(){return n.cached},component:function(){return s.component},debounce:function(){return r.debounce},derive:function(){return a.derive},getComponentClass:function(){return s.getComponentClass},hook:function(){return l.hook},idle:function(){return c.idle},nonenumerable:function(){return u.nonenumerable},persistent:function(){return h.persistent},throttle:function(){return r.throttle},wait:function(){return d.wait},watch:function(){return p.watch}});var o=i(49574),n=i(51676),s=i(91672),r=i(55184),a=i(24968),l=i(29200),c=i(35718),u=i(41360),h=i(77036),d=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 s}});var o=i(69364),n=i(31534);function s(e,t){e.hookStatus(o.STATUSES.ready,e=>{let i=(0,n.isViewObject)(e)?e:e.jodit,o=`${i.options.namespace}${e.componentName}_prop_${t}`,s=e[t];Object.defineProperty(e,t,{get:()=>i.storage.get(o)??s,set(e){i.storage.set(o,e)}})})}},80840:function(e,t,i){"use strict";i.d(t,{wait:function(){return r}});var o=i(69364),n=i(91565),s=i(33201);function r(e){return(t,i)=>{let r=t[i];if(!(0,n.isFunction)(r))throw(0,s.error)("Handler must be a Function");t.hookStatus(o.STATUSES.ready,t=>{let{async:o}=t,n=t[i],s=0;Object.defineProperty(t,i,{configurable:!0,value:function i(...r){o.clearTimeout(s),e(t)?n.apply(t,r):s=o.setTimeout(()=>i(...r),10)}})})}}},68616:function(e,t,i){"use strict";i.d(t,{watch:function(){return h}});var o=i(69364),n=i(70535),s=i(32328),r=i(91565),a=i(62101),l=i(31534),c=i(33201),u=i(71125);function h(e,t){return(i,h)=>{if(!(0,r.isFunction)(i[h]))throw(0,c.error)("Handler must be a Function");let d=t?.immediately??!0,p=t?.context,f=t=>{let o=(0,l.isViewObject)(t)?t:t.jodit,c=(e,...i)=>{if(!t.isInDestruct)return t[h](e,...i)};d||(c=t.async.microDebounce(c,!0)),(0,s.splitArray)(e).forEach(e=>{if(/:/.test(e)){let[i,n]=e.split(":"),s=p;i.length&&(s=t.get(i)),(0,r.isFunction)(s)&&(s=s(t)),o.events.on(s||t,n,c),s||o.events.on(n,c),t.hookStatus("beforeDestruct",()=>{o.events.off(s||t,n,c).off(n,c)});return}let s=e.split("."),[l]=s,h=s.slice(1),d=t[l];(0,a.isPlainObject)(d)&&(0,n.observable)(d).on("change."+h.join("."),c);let f=(0,u.getPropertyDescriptor)(i,l);Object.defineProperty(t,l,{configurable:!0,set(e){let i=d;i!==e&&(d=e,f&&f.set&&f.set.call(t,e),(0,a.isPlainObject)(d)&&(d=(0,n.observable)(d)).on("change."+h.join("."),c),c(l,i,d))},get:()=>f&&f.get?f.get.call(t):d})})};(0,r.isFunction)(i.hookStatus)?i.hookStatus(o.STATUSES.ready,f):f(i)}}},23211:function(e,t,i){"use strict";i.d(t,{Dom:function(){return b}});var o=i(81937),n=i(88475),s=i(17312),r=i(91565),a=i(46248),l=i(3213),c=i(85932),u=i(18303),h=i(4040),d=i(28712),p=i(7909),f=i(80991),m=i(36400),g=i(33201),_=i(71125);let v=RegExp(`<([a-z]+)[^>]+${o.TEMP_ATTR}[^>]*>(.+?)</\\1>`,"gi");class b{static detach(e){for(;e&&e.firstChild;)e.removeChild(e.firstChild)}static wrapNextInline(e,t,i){let o,n,s=e;i.s.save();do n=!1,(o=s.nextSibling)&&!b.isBlock(o)&&!b.isTag(o,"br")&&(n=!0,s=o);while(n)return b.__wrapElements(t,i,e,s)}static __wrapElements(e,t,i,o){let n=(0,c.isString)(e)?t.createInside.element(e):e;i.parentNode&&i.parentNode.insertBefore(n,i);let s=i;for(;s&&(s=i.nextSibling,n.appendChild(i),i!==o&&s);)i=s;return t.s.restore(),n}static wrapInline(e,t,i){let o,n,s=e,r=e;i.s.save();do n=!1,(o=s.previousSibling)&&!b.isBlock(o)&&(n=!0,s=o);while(n)do n=!1,(o=r.nextSibling)&&!b.isBlock(o)&&(n=!0,r=o);while(n)return b.__wrapElements(t,i,s,r)}static wrap(e,t,i){let o=(0,c.isString)(t)?i.element(t):t;if(b.isNode(e)){if(!e.parentNode)throw(0,g.error)("Element should be in DOM");e.parentNode.insertBefore(o,e),o.appendChild(e)}else{let t=e.extractContents();e.insertNode(o),o.appendChild(t)}return o}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 o=e;for(;o&&o!==t&&!(e!==o&&i(o));){let e=o.firstChild||o.nextSibling;if(!e){for(;o&&!o.nextSibling;)if((o=o.parentNode)===t)return;e=o?.nextSibling}o=e}}static replace(e,t,i,o=!1,s=!1){let r;if((0,a.isHTML)(t)&&((0,d.assert)(i,"Need create instance for new tag"),t=i.fromHTML(t)),(0,c.isString)(t)?((0,d.assert)(i,"Need create instance for new tag"),r=i.element(t)):r=t,!s)for(;e.firstChild;)r.appendChild(e.firstChild);return o&&b.isElement(e)&&b.isElement(r)&&(0,n.toArray)(e.attributes).forEach(e=>{r.setAttribute(e.name,e.value)}),e.parentNode&&e.parentNode.replaceChild(r,e),r}static isEmptyTextNode(e){return b.isText(e)&&(!e.nodeValue||0===e.nodeValue.replace(o.INVISIBLE_SPACE_REG_EXP(),"").trim().length)}static isEmptyContent(e){return b.each(e,e=>b.isEmptyTextNode(e))}static isContentEditable(e,t){return b.isNode(e)&&!b.closest(e,e=>b.isElement(e)&&"false"===e.getAttribute("contenteditable"),t)}static isEmpty(e,t=o.NO_EMPTY_TAGS){let i;if(!e)return!0;i=(0,r.isFunction)(t)?t:e=>t.has(e.nodeName.toLowerCase());let n=e=>null==e.nodeValue||0===(0,h.trim)(e.nodeValue).length;return b.isText(e)?n(e):!(b.isElement(e)&&i(e))&&b.each(e,e=>{if(b.isText(e)&&!n(e)||b.isElement(e)&&i(e))return!1})}static isNode(e){return!!(e&&(0,c.isString)(e.nodeName)&&"number"==typeof e.nodeType&&e.childNodes&&(0,r.isFunction)(e.appendChild))}static isCell(e){return b.isNode(e)&&("TD"===e.nodeName||"TH"===e.nodeName)}static isList(e){return b.isTag(e,o.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,u.isVoid)(e)&&"object"==typeof e&&b.isNode(e)&&o.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,u.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 o=i?"lastChild":"firstChild",n=i?"previousSibling":"nextSibling",s=e?.[o];if(!s)return null;do{if(t(s))return s;let i=s[o]||s[n];if(!i&&s.parentNode!==e){do s=s.parentNode;while(s&&!s[n]&&s.parentNode!==e)i=s?.[n]}s=i}while(s)return null}static prev(e,t,i,o=!0){return b.find(e,t,i,!1,o)}static next(e,t,i,o=!0){return b.find(e,t,i,!0,o)}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 o=e=>b.isElement(e)&&e.classList.contains(t),n=e.parentNode;return i?b.prev(e,o,n):b.next(e,o,n)}static find(e,t,i,o=!0,n=!0){let s=this.nextGen(e,i,o,n),r=s.next();for(;!r.done;){if(t(r.value))return r.value;r=s.next()}return null}static*nextGen(e,t,i=!0,o=!0){let n=[],s=e;do{let t=i?s.nextSibling:s.previousSibling;for(;t;)n.push(t),t=i?t.nextSibling:t.previousSibling;n.reverse(),yield*this.runInStack(e,n,i,o),s=s.parentNode}while(s&&s!==t)return null}static each(e,t,i=!0){let o=this.eachGen(e,i),n=o.next();for(;!n.done;){if(!1===t(n.value))return!1;n=o.next()}return!0}static eachGen(e,t=!0){return this.runInStack(e,[e],t)}static*runInStack(e,t,i,o=!0){for(;t.length;){let n=t.pop();if(o){let e=i?n.lastChild:n.firstChild;for(;e;)t.push(e),e=i?e.previousSibling:e.nextSibling}e!==n&&(yield n)}}static findWithCurrent(e,t,i,o="nextSibling",n="firstChild"){let s=e;do{if(t(s))return s||null;if(n&&s&&s[n]){let e=b.findWithCurrent(s[n],t,s,o,n);if(e)return e}for(;s&&!s[o]&&s!==i;)s=s.parentNode;s&&s[o]&&s!==i&&(s=s[o])}while(s&&s!==i)return null}static findSibling(e,t=!0,i=e=>!b.isEmptyTextNode(e)){let o=b.sibling(e,t);for(;o&&!i(o);)o=b.sibling(o,t);return o&&i(o)?o: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,_.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,o=!1){let n=e;if(!n)return null;do{if(t(n))return n;if(n===i||!n.parentNode)break;n=n.parentNode}while(n&&n!==i)return n===i&&o&&t(n)?n:null}static closest(e,t,i){let o,n=e=>e.toLowerCase();if((0,r.isFunction)(t))o=t;else if((0,s.isArray)(t)||(0,l.isSet)(t)){let e=(0,l.isSet)(t)?t:new Set(t.map(n));o=t=>!!(t&&e.has(n(t.nodeName)))}else o=e=>!!(e&&n(t)===n(e.nodeName));return b.up(e,o,i)}static furthest(e,t,i){let o=null,n=e?.parentElement;for(;n&&n!==i;)t(n)&&(o=n),n=n?.parentElement;return o}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,s.isArray)(t)?t.forEach(t=>{this.append(e,t)}):e.appendChild(t)}static moveContent(e,t,i=!1,s=()=>!0){let r=(e.ownerDocument||o.globalDocument).createDocumentFragment();(0,n.toArray)(e.childNodes).filter(e=>!!s(e)||(b.safeRemove(e),!1)).forEach(e=>{r.appendChild(e)}),t.insertBefore(r,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,o.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,m.dataBind)(e,"__old_display",e.style.getPropertyValue("display")),e.style.setProperty("display","none"))}static show(e){if(!e)return;let t=(0,m.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,p.attr)(e,t),(0,p.attr)(e,o.TEMP_ATTR,!0),e}static isTemporary(e){return!!b.isElement(e)&&(b.isMarker(e)||"true"===(0,p.attr)(e,o.TEMP_ATTR))}static isMarker(e){return b.isNode(e)&&b.isTag(e,"span")&&e.hasAttribute("data-"+o.MARKER_CLASS)}static replaceTemporaryFromString(e){return e.replace(v,"$2")}static temporaryList(e){let t=[];return b.each(e,e=>{b.isHTMLElement(e)&&e.hasAttribute(o.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 o.Dom},LazyWalker:function(){return n.LazyWalker}});var o=i(23211),n=i(1080)},1080:function(e,t,i){"use strict";i.d(t,{LazyWalker:function(){return l}});var o=i(25045),n=i(31635),s=i(49574),r=i(23211),a=i(60216);class l extends a.Eventify{setWork(e){return this.isWorked?this.break():this.stop(),this.workNodes=r.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,o._)(this,"async",void 0),(0,o._)(this,"options",void 0),(0,o._)(this,"workNodes",void 0),(0,o._)(this,"hadAffect",void 0),(0,o._)(this,"isWorked",void 0),(0,o._)(this,"isFinished",void 0),(0,o._)(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,n.__decorate)([s.autobind],l.prototype,"__workPerform",null)},93747:function(e,t,i){"use strict";i.d(t,{EventEmitter:function(){return h}});var o=i(25045),n=i(81937),s=i(32328),r=i(17312),a=i(91565),l=i(85932),c=i(33201),u=i(18869);class h{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,s.splitArray)(e).map(e=>e.trim()).forEach(e=>{let i=e.split("."),o=i[1]||u.defaultNameSpace;t.call(this,i[0],o)})}__getStore(e){if(!e)throw(0,c.error)("Need subject");if(void 0===e[this.__key]){let t=new u.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","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,o){let s,u,h,p;if((0,l.isString)(e)||(0,l.isStringArray)(e)?(s=this,u=e,h=t,p=i):(s=e,u=t,h=i,p=o),!((0,l.isString)(u)||(0,l.isStringArray)(u))||0===u.length)throw(0,c.error)("Need events names");if(!(0,a.isFunction)(h))throw(0,c.error)("Need event handler");if((0,r.isArray)(s))return s.forEach(e=>{this.on(e,u,h,p)}),this;let f=s,m=this.__getStore(f),g=this,_=function(e,...t){if(!g.isMuted(e))return h&&h.call(this,...t)};return d(f)&&(_=function(e){if(!g.isMuted(e.type)&&(g.__prepareEvent(e),h&&!1===h.call(this,e)))return e.preventDefault(),e.stopImmediatePropagation(),!1}),this.__eachEvent(u,(e,t)=>{if(0===e.length)throw(0,c.error)("Need event name");if(!1===m.indexOf(e,t,h)){let i={event:e,originalCallback:h,syntheticCallback:_};if(m.set(e,t,i,p?.top),d(f)){let t=n.PASSIVE_EVENTS.has(e)?{passive:!0,capture:p?.capture??!1}:p?.capture??!1;_.options=t,f.addEventListener(e,_,t),this.__memoryDOMSubjectToHandler(f,_)}}}),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,o=i.get(e)||new Set;o.delete(t),o.size?i.set(e,o):i.delete(e)}one(e,t,i,o){let n,s,r,a;(0,l.isString)(e)||(0,l.isStringArray)(e)?(n=this,s=e,r=t,a=i):(n=e,s=t,r=i,a=o);let c=(...e)=>(this.off(n,s,c),r(...e));return this.on(n,s,c,a),this}off(e,t,i){let o,n,s;if((0,l.isString)(e)||(0,l.isStringArray)(e)?(o=this,n=e,s=t):(o=e,n=t,s=i),(0,r.isArray)(o))return o.forEach(e=>{this.off(e,n,s)}),this;let c=o,h=this.__getStore(c);if(!((0,l.isString)(n)||(0,l.isStringArray)(n))||0===n.length)return h.namespaces().forEach(e=>{this.off(c,"."+e)}),this.__removeStoreFromSubject(c),this;let p=e=>{d(c)&&(c.removeEventListener(e.event,e.syntheticCallback,e.syntheticCallback.options??!1),this.__unmemoryDOMSubjectToHandler(c,e.syntheticCallback))},f=(e,t)=>{if(""===e)return void h.events(t).forEach(e=>{""!==e&&f(e,t)});let i=h.get(e,t);if(i&&i.length)if((0,a.isFunction)(s)){let o=h.indexOf(e,t,s);!1!==o&&(p(i[o]),i.splice(o,1),i.length||h.clearEvents(t,e))}else i.forEach(p),i.length=0,h.clearEvents(t,e)};return this.__eachEvent(n,(e,t)=>{t===u.defaultNameSpace?h.namespaces().forEach(t=>{f(e,t)}):f(e,t)}),h.isEmpty()&&this.__removeStoreFromSubject(c),this}stopPropagation(e,t){let i=(0,l.isString)(e)?this:e,o=(0,l.isString)(e)?e:t;if("string"!=typeof o)throw(0,c.error)("Need event names");let n=this.__getStore(i);this.__eachEvent(o,(e,t)=>{let o=n.get(e,t);o&&this.__stopped.push(o),t===u.defaultNameSpace&&n.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 o,n,s=(0,l.isString)(e)?this:e,r=(0,l.isString)(e)?e:t,a=(0,l.isString)(e)?[t,...i]:i;if(!d(s)&&!(0,l.isString)(r))throw(0,c.error)("Need events names");let h=this.__getStore(s);return!(0,l.isString)(r)&&d(s)?this.__triggerNativeEvent(s,t):this.__eachEvent(r,(e,t)=>{if(d(s))this.__triggerNativeEvent(s,e);else{let i=h.get(e,t);if(i)try{[...i].every(t=>!this.__isStopped(i)&&(this.currents.push(e),n=t.syntheticCallback.call(s,e,...a),this.currents.pop(),void 0!==n&&(o=n),!0))}finally{this.__removeStop(i)}t!==u.defaultNameSpace||d(s)||h.namespaces().filter(e=>e!==t).forEach(t=>{let i=this.fire.apply(this,[s,e+"."+t,...a]);void 0!==i&&(o=i)})}}),o}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,o._)(this,"__domEventsMap",new Map),(0,o._)(this,"__mutedEvents",new Set),(0,o._)(this,"__key","__JoditEventEmitterNamespaces"),(0,o._)(this,"__doc",n.globalDocument),(0,o._)(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,o._)(this,"currents",[]),(0,o._)(this,"__stopped",[]),(0,o._)(this,"__isDestructed",!1),e&&(this.__doc=e),this.__key+=new Date().getTime()}}function d(e){return e&&(0,a.isFunction)(e.addEventListener)}},60216:function(e,t,i){"use strict";i.d(t,{Eventify:function(){return n}});var o=i(25045);class n{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,o._)(this,"__map",new Map)}}},42689:function(e,t,i){"use strict";let o=new(i(93747)).EventEmitter;i.d(t,["eventEmitter",0,o])},1496:function(e,t,i){"use strict";i.d(t,{EventEmitter:function(){return o.EventEmitter},EventHandlersStore:function(){return r.EventHandlersStore},Eventify:function(){return n.Eventify},defaultNameSpace:function(){return r.defaultNameSpace},observable:function(){return s.observable}});var o=i(93747),n=i(60216),s=i(70535),r=i(18869)},70535:function(e,t,i){"use strict";i.d(t,{observable:function(){return c}});var o=i(17312),n=i(94013),s=i(62101),r=i(71125);let a=Symbol("observable-object");function l(e){return void 0!==e[a]}function c(e){if(l(e))return e;let t={},i={},c=(t,n)=>((0,o.isArray)(t)?t.map(e=>c(e,n)):(i[t]||(i[t]=[]),i[t].push(n)),e),u=(n,...s)=>{if((0,o.isArray)(n))return void n.map(e=>u(e,...s));try{!t[n]&&i[n]&&(t[n]=!0,i[n].forEach(t=>t.call(e,...s)))}finally{t[n]=!1}},h=(t,i=[])=>{let o={};l(t)||(Object.defineProperty(t,a,{enumerable:!1,value:!0}),Object.keys(t).forEach(a=>{let l=i.concat(a).filter(e=>e.length);o[a]=t[a];let c=(0,r.getPropertyDescriptor)(t,a);Object.defineProperty(t,a,{set(t){let i=o[a];if(!(0,n.isFastEqual)(o[a],t)){u(["beforeChange","beforeChange."+l.join(".")],a,t),(0,s.isPlainObject)(t)&&h(t,l),c&&c.set?c.set.call(e,t):o[a]=t;let n=[];u(["change",...l.reduce((e,t)=>(n.push(t),e.push("change."+n.join(".")),e),[])],l.join("."),i,t?.valueOf?t.valueOf():t)}},get:()=>c&&c.get?c.get.call(e):o[a],enumerable:!0,configurable:!0}),(0,s.isPlainObject)(o[a])&&h(o[a],l)}),Object.defineProperty(e,"on",{value:c}))};return h(e),e}},18869:function(e,t,i){"use strict";i.d(t,{EventHandlersStore:function(){return a}});var o=i(25045),n=i(88475),s=i(28712);let r="JoditEventDefaultNamespace";class a{get(e,t){if(this.__store.has(t)){let i=this.__store.get(t);return(0,s.assert)(i,"-"),i[e]}}indexOf(e,t,i){let o=this.get(e,t);if(o){for(let e=0;e<o.length;e+=1)if(o[e].originalCallback===i)return e}return!1}namespaces(e=!1){let t=(0,n.toArray)(this.__store.keys());return e?t.filter(e=>e!==r):t}events(e){let t=this.__store.get(e);return t?Object.keys(t):[]}set(e,t,i,o=!1){let n=this.__store.get(t);n||(n={},this.__store.set(t,n)),void 0===n[e]&&(n[e]=[]),o?n[e].unshift(i):n[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,o._)(this,"__store",new Map)}}i.d(t,["defaultNameSpace",0,r])},28077:function(e,t,i){"use strict";i.d(t,{getContainer:function(){return b},getPopupViewRoot:function(){return y},uniqueUid:function(){return g}});var o=i(24497),n=i(85932),s=i(31534),r=i(74264),a=i(7909),l=i(80991),c=i(421),u=i(85305),h=i(42689),d=i(81937),p=i(27795);let f=1,m=new Set;function g(){function e(){return Math.round(f+=10*(Math.random()+1)).toString(16)}let t=e();for(;m.has(t);)t=e();return m.add(t),t}let _=new u.PluginSystem({getContainer:b}),v=new WeakMap;function b(e,t,i="div",l=!1){let u,h=(0,n.isString)(t)?t:t?(0,c.getClassName)(t.prototype):"jodit-utils",d=v.get(e)||{},f=h+i,m=(0,s.isViewObject)(e)?e:e.j;if(!d[f]){let t=m.c;if(u=y(m.o,m.container,e.od.body),l&&(0,o.isJoditObject)(e)&&e.od!==e.ed){t=e.createInside;let n="style"===i?e.ed.head:e.ed.body;u=(0,o.isJoditObject)(e)&&e.o.shadowRoot?e.o.shadowRoot:n}let n=t.element(i,{className:`jodit jodit-${(0,r.kebabCase)(h)}-container jodit-box`});m.o.nonce&&("style"===i||"script"===i)&&(0,a.attr)(n,"nonce",m.o.nonce),n.classList.add("jodit_theme_"+(m.o.theme||"default")),p.Dom.append(u,n),d[f]=n,e.hookStatus("beforeDestruct",()=>{m.events.off(n),p.Dom.safeRemove(n),delete d[f],Object.keys(d).length&&v.delete(e)}),v.set(e,d),m.events.fire("getContainer",n)}return d[f].classList.remove("jodit_theme_default","jodit_theme_dark"),d[f].classList.add("jodit_theme_"+(m.o.theme||"default")),d[f]}function y(e,t,i){return e.popupRoot??e.shadowRoot??p.Dom.closest(t,e=>p.Dom.isHTMLElement(e)&&(p.Dom.isTag(e,"dialog")||["fixed","absolute"].includes((0,l.css)(e,"position"))),i)??i}let w=h.eventEmitter;i.d(t,["eventEmitter",0,w,"extendLang",0,e=>{Object.keys(e).forEach(t=>{d.lang[t]?Object.assign(d.lang[t],e[t]):d.lang[t]=e[t]})},"instances",0,{},"modules",0,{},"pluginSystem",0,_])},78982:function(e,t,i){"use strict";var o=i(17312);i.d(t,["asArray",0,e=>(0,o.isArray)(e)?e:[e]])},45664:function(e,t,i){"use strict";i.d(t,{asArray:function(){return o.asArray},splitArray:function(){return n.splitArray},toArray:function(){return s.toArray}});var o=i(78982),n=i(32328),s=i(88475)},32328:function(e,t,i){"use strict";function o(e){return Array.isArray(e)?e:e.split(/[,\s]+/)}i.d(t,{splitArray:function(){return o}})},88475:function(e,t,i){"use strict";var o=i(23283),n=i(43379);i.d(t,["toArray",0,function(...e){return((0,o.isNativeFunction)(Array.from)?Array.from:(0,n.reset)("Array.from")??Array.from).apply(Array,e)}])},61077:function(e,t,i){"use strict";i.d(t,{clearTimeout:function(){return o.clearTimeout},setTimeout:function(){return o.setTimeout}});var o=i(79947)},79947:function(e,t,i){"use strict";i.d(t,{clearTimeout:function(){return s},setTimeout:function(){return n}});var o=i(81937);function n(e,t,...i){return t?o.globalWindow.setTimeout(e,t,...i):(e.call(null,...i),0)}function s(e){o.globalWindow.clearTimeout(e)}},98740:function(e,t,i){"use strict";i.d(t,{hasBrowserColorPicker:function(){return n}});var o=i(81937);function n(){let e;try{let t=o.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 o.hasBrowserColorPicker},hasContainer:function(){return h.hasContainer},isAbortError:function(){return n.isAbortError},isArray:function(){return s.isArray},isBoolean:function(){return r.isBoolean},isDestructable:function(){return h.isDestructable},isEqual:function(){return a.isEqual},isFastEqual:function(){return a.isFastEqual},isFunction:function(){return l.isFunction},isHTML:function(){return c.isHTML},isHtmlFromWord:function(){return u.isHtmlFromWord},isInitable:function(){return h.isInitable},isInt:function(){return d.isInt},isJoditObject:function(){return p.isJoditObject},isLicense:function(){return f.isLicense},isMarker:function(){return m.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 S.isString},isStringArray:function(){return S.isStringArray},isURL:function(){return C.isURL},isValidName:function(){return E.isValidName},isViewObject:function(){return D.isViewObject},isVoid:function(){return I.isVoid},isWindow:function(){return k.isWindow}});var o=i(98740),n=i(72068),s=i(17312),r=i(22289),a=i(94013),l=i(91565),c=i(46248),u=i(82166),h=i(52433),d=i(99732),p=i(24497),f=i(44998),m=i(23175),g=i(23283),_=i(72412),v=i(70222),b=i(62101),y=i(52100),w=i(3213),S=i(85932),C=i(91764),E=i(50083),D=i(31534),I=i(18303),k=i(3513)},72068:function(e,t,i){"use strict";function o(e){return!!e&&e instanceof DOMException&&"AbortError"===e.name}i.d(t,{isAbortError:function(){return o}})},17312:function(e,t,i){"use strict";function o(e){return Array.isArray(e)}i.d(t,{isArray:function(){return o}})},22289:function(e,t,i){"use strict";function o(e){return"boolean"==typeof e}i.d(t,{isBoolean:function(){return o}})},94013:function(e,t,i){"use strict";i.d(t,{isEqual:function(){return n},isFastEqual:function(){return s}});var o=i(3347);function n(e,t){return e===t||(0,o.stringify)(e)===(0,o.stringify)(t)}function s(e,t){return e===t}},91565:function(e,t,i){"use strict";function o(e){return"function"==typeof e}i.d(t,{isFunction:function(){return o}})},82166:function(e,t,i){"use strict";function o(e){return -1!==e.search(/<meta.*?Microsoft Excel\s[\d].*?>/)||-1!==e.search(/<meta.*?Microsoft Word\s[\d].*?>/)||-1!==e.search(/<meta[^>]*?ProgId[^>]*?(Word|Excel)\./i)||-1!==e.search(/<meta[^>]*?(LibreOffice|OpenOffice)/i)||-1!==e.search(/urn:schemas-microsoft-com:office:(word|excel)/)||-1!==e.search(/<\w[^>]*\sclass=("|')?Mso/)||-1!==e.search(/style='[^']*mso-/)||-1!==e.search(/style="[^"]*mso-/)&&-1!==e.search(/<font/)}i.d(t,{isHtmlFromWord:function(){return o}})},46248:function(e,t,i){"use strict";var o=i(85932);i.d(t,["isHTML",0,e=>(0,o.isString)(e)&&/<([A-Za-z][A-Za-z0-9]*)\b[^>]*>(.*?)<\/\1>/m.test(e.replace(/[\r\n]/g,""))])},52433:function(e,t,i){"use strict";i.d(t,{hasContainer:function(){return l},isDestructable:function(){return a},isInitable:function(){return r}});var o=i(23211),n=i(91565),s=i(18303);function r(e){return!(0,s.isVoid)(e)&&(0,n.isFunction)(e.init)}function a(e){return!(0,s.isVoid)(e)&&(0,n.isFunction)(e.destruct)}function l(e){return!(0,s.isVoid)(e)&&o.Dom.isElement(e.container)}},99732:function(e,t,i){"use strict";i.d(t,{isInt:function(){return s}});var o=i(70222),n=i(85932);function s(e){return(0,n.isString)(e)&&(0,o.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 n}});var o=i(91565);function n(e){return!!(e&&e instanceof Object&&(0,o.isFunction)(e.constructor)&&("u">typeof Jodit&&e instanceof Jodit||e.isJodit))}},44998:function(e,t,i){"use strict";var o=i(85932);i.d(t,["isLicense",0,e=>(0,o.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 n}});var o=i(23211);function n(e){return o.Dom.isMarker(e)}},23283:function(e,t,i){"use strict";function o(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 o}})},72412:function(e,t,i){"use strict";function o(e){return"number"==typeof e&&!isNaN(e)&&isFinite(e)}i.d(t,{isNumber:function(){return o}})},70222:function(e,t,i){"use strict";i.d(t,{isNumeric:function(){return n}});var o=i(85932);function n(e){if((0,o.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 n}});var o=i(3513);function n(e){return!(!e||"object"!=typeof e||e.nodeType||(0,o.isWindow)(e))&&!(e.constructor&&!({}).hasOwnProperty.call(e.constructor.prototype,"isPrototypeOf"))}},52100:function(e,t,i){"use strict";function o(e){return e&&"function"==typeof e.then}i.d(t,{isPromise:function(){return o}})},3213:function(e,t,i){"use strict";i.d(t,{isSet:function(){return n}});var o=i(91565);function n(e){return!!e&&(0,o.isFunction)(e.has)&&(0,o.isFunction)(e.add)&&(0,o.isFunction)(e.delete)}},85932:function(e,t,i){"use strict";i.d(t,{isString:function(){return n},isStringArray:function(){return s}});var o=i(17312);function n(e){return"string"==typeof e}function s(e){return(0,o.isArray)(e)&&n(e[0])}},91764:function(e,t,i){"use strict";i.d(t,{isURL:function(){return n}});var o=i(81937);function n(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=o.globalDocument.createElement("a");return t.href=e,!!t.hostname}},50083:function(e,t,i){"use strict";function o(e){return!!e.length&&!/[^0-9A-Za-zа-яА-ЯЁё\w\-_. ]/.test(e)&&e.trim().length>0}i.d(t,{isValidName:function(){return o}})},31534:function(e,t,i){"use strict";i.d(t,{isViewObject:function(){return n}});var o=i(91565);function n(e){return!!(e&&e instanceof Object&&(0,o.isFunction)(e.constructor)&&e.isView)}},18303:function(e,t,i){"use strict";function o(e){return null==e}i.d(t,{isVoid:function(){return o}})},3513:function(e,t,i){"use strict";function o(e){return null!=e&&e===e.window}i.d(t,{isWindow:function(){return o}})},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),o=parseInt(t[3],10),n=(parseInt(t[4],10)|o<<8|i<<16).toString(16).toUpperCase();for(;n.length<6;)n="0"+n;return t[1]+"#"+n}])},30893:function(e,t,i){"use strict";i.d(t,{applyStyles:function(){return u}});var o=i(81937),n=i(23211),s=i(4040),r=i(7909),a=i(80991),l=i(28723);function c(e){return e.replace(/mso-[a-z-]+:[\s]*[^;]+;/gi,"").replace(/mso-[a-z-]+:[\s]*[^";']+$/gi,"").replace(/border[a-z-]*:[\s]*[^;]+;/gi,"").replace(/([0-9.]+)(pt|cm)/gi,(e,t,i)=>{switch(i.toLowerCase()){case"pt":return(1.328*parseFloat(t)).toFixed(0)+"px";case"cm":return(.02645833*parseFloat(t)).toFixed(0)+"px"}return e})}function u(e){let t=/<html(?:\s[^>]*)?>/i.exec(e);if(!t)return e;let i=(e=e.substring(t.index)).toLowerCase().lastIndexOf("</html>");-1!==i&&(e=e.substring(0,i+7));let u=o.globalDocument.createElement("iframe");(0,a.css)(u,"display","none"),n.Dom.append(o.globalDocument.body,u);let h="";try{let t=u.contentDocument||(u.contentWindow?u.contentWindow.document:null);if(t){t.open(),t.write(e),t.close(),n.Dom.each(t.body,e=>{n.Dom.isElement(e)&&/mso-list:\s*ignore/i.test((0,r.attr)(e,"style")||"")&&n.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,l.$$)(i[e].selectorText,t.body).forEach(t=>{t.style.cssText=c(i[e].style.cssText+";"+t.style.cssText)})}}catch(e){if(!o.IS_PROD)throw e}n.Dom.each(t.body,e=>{if(n.Dom.isElement(e)){let t=(0,r.attr)(e,"style");t&&(e.style.cssText=c(t)),(0,r.attr)(e,"style")||(0,r.attr)(e,"style",null)}}),h=t.firstChild?(0,s.trim)(t.body.innerHTML):""}}catch{}finally{n.Dom.safeRemove(u)}return h&&(e=h),(0,s.trim)(e.replace(/<(\/)?(html|colgroup|col|o:p)[^>]*>/g,"").replace(/<!--[^>]*>/g,""))}},1277:function(e,t,i){"use strict";i.d(t,{cleanFromWord:function(){return l}});var o=i(81937),n=i(23211),s=i(88475),r=i(4040),a=i(7909);function l(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=o.globalDocument.createElement("div");i.innerHTML=e;let r=[];i.firstChild&&n.Dom.each(i,e=>{if(e)switch(e.nodeType){case Node.ELEMENT_NODE:switch(e.nodeName){case"STYLE":case"LINK":case"META":r.push(e);break;case"W:SDT":case"W:SDTPR":case"FONT":n.Dom.unwrap(e);break;default:if(/mso-list:\s*ignore/i.test((0,a.attr)(e,"style")||"")){r.push(e);break}(0,s.toArray)(e.attributes).forEach(t=>{-1===["src","href","rel","content"].indexOf(t.name.toLowerCase())&&(0,a.attrRaw)(e,t.name,null)})}break;case Node.TEXT_NODE:break;default:r.push(e)}}),n.Dom.safeRemove.apply(null,r),t=i.innerHTML}catch(e){}return t&&(e=t),(e=e.split(/(\n)/).filter(r.trim).join(`
10
- `)).replace(/<(\/)?(html|colgroup|col|o:p)[^>]*>/g,"").replace(/<!--[^>]*>/g,"")}},6609:function(e,t,i){"use strict";i.d(t,{htmlspecialchars:function(){return n}});var o=i(81937);function n(e){let t=o.globalDocument.createElement("div");return t.textContent=e,t.innerHTML}},82658:function(e,t,i){"use strict";i.d(t,{applyStyles:function(){return o.applyStyles},cleanFromWord:function(){return n.cleanFromWord},htmlspecialchars:function(){return s.htmlspecialchars},nl2br:function(){return r.nl2br},safeHTML:function(){return a.safeHTML},sanitizeHTMLElement:function(){return a.sanitizeHTMLElement},stripTags:function(){return l.stripTags}});var o=i(30893),n=i(1277),s=i(6609),r=i(48838),a=i(48155),l=i(22852)},48838:function(e,t,i){"use strict";function o(e){return e.replace(/\r\n|\r|\n/g,"<br/>")}i.d(t,{nl2br:function(){return o}})},48155:function(e,t,i){"use strict";i.d(t,{safeHTML:function(){return l},sanitizeHTMLElement:function(){return d}});var o=i(23211),n=i(93640),s=i(7909);let r=new Set(["foreignobject","annotation-xml","desc","title"]),a=e=>!!(e&&/^(math|svg)$/i.test(e.nodeName));function l(e,t){if(!o.Dom.isElement(e)&&!o.Dom.isFragment(e))return;let i=[];for(let t of(o.Dom.each(e,e=>{o.Dom.isElement(e)&&o.Dom.up(e.parentNode,a)&&i.push(e)}),i))o.Dom.isOrContains(e,t)&&function(e){if("http://www.w3.org/1999/xhtml"!==e.namespaceURI||null==o.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(r.has(e))return!1}return!0}(t)&&o.Dom.safeRemove(t);let l=t.removeEventAttributes??t.removeOnError,c=e=>{if(o.Dom.isElement(e)&&(l&&function(e){if(!o.Dom.isElement(e))return;let t=[];for(let i=0;i<e.attributes.length;i++)e.attributes[i].name.toLowerCase().startsWith("on")&&t.push(e.attributes[i].name);for(let i of t)(0,s.attrRaw)(e,i,null)}(e),d(e,t),t.safeLinksTarget&&"A"===e.nodeName&&"_blank"===(0,n.attr)(e,"target"))){let t=((0,n.attr)(e,"rel")||"").split(/\s+/).filter(Boolean);t.includes("noopener")||t.push("noopener"),t.includes("noreferrer")||t.push("noreferrer"),(0,n.attr)(e,"rel",t.join(" "))}};c(e),o.Dom.each(e,c)}let c=["src","data","action","formaction","poster","background","xlink:href"],u=new Set(["iframe","frame","object","embed"]);function h(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)&&u.has(t)}function d(e,{safeJavaScriptLink:t,removeOnError:i}={safeJavaScriptLink:!0,removeOnError:!0}){if(!o.Dom.isElement(e))return!1;let r=!1;i&&e.hasAttribute("onerror")&&((0,n.attr)(e,"onerror",null),r=!0);let a=e.nodeName.toLowerCase(),l=(0,n.attr)(e,"href");if(t&&l&&h(l,a)){let t="u">typeof location?location.protocol:"http:";(0,n.attr)(e,"href",t+"//"+l),r=!0}if(t)for(let t of(e.hasAttribute("srcdoc")&&((0,n.attr)(e,"srcdoc",null),r=!0),c)){let i=(0,s.attrRaw)(e,t);i&&h(i,a)&&((0,n.attr)(e,t,null),r=!0)}return r}},22852:function(e,t,i){"use strict";i.d(t,{stripTags:function(){return function e(t,i=document,c=null,u=!1){let h=i.createElement("div");(0,n.isString)(t)?h.innerHTML=t:o.Dom.append(h,t);let d=[];return o.Dom.each(h,e=>{o.Dom.isElement(e)&&d.push(e)}),d.forEach(t=>{if(!t.parentNode)return;if(c&&o.Dom.isTag(t,c)){let n=t.nodeName.toLowerCase(),s=o.Dom.isTag(t,l)?`%%%jodit-single-${n}%%%`:`%%%jodit-${n}%%%${e(t.innerHTML,i,c,u)}%%%/jodit-${n}%%%`;o.Dom.before(t,i.createTextNode(s)),o.Dom.safeRemove(t);return}if(o.Dom.isTag(t,a))return void o.Dom.safeRemove(t);if(!o.Dom.isTag(t,r))return;let n=t.nextSibling;!(o.Dom.isText(n)&&/^\s/.test(n.nodeValue||""))&&n&&o.Dom.before(n,i.createTextNode(u?"%%%jodit-single-br%%%":" "))}),(0,s.trim)(h.innerText).replace(/%%%(\/)?jodit(-single)?-([\w\n]+)%%%/g,(e,t,i,o)=>`<${t?"/":""}${o}>`)}}});var o=i(23211),n=i(85932),s=i(4040);let r=new Set(["div","p","br","h1","h2","h3","h4","h5","h6","hr"]),a=new Set(["script","style"]),l=new Set(["br","hr","input"])},65946:function(e,t,i){"use strict";i.r(t),i.d(t,{CamelCaseToKebabCase:function(){return u.CamelCaseToKebabCase},NUMBER_FIELDS_REG:function(){return l.NUMBER_FIELDS_REG},applyStyles:function(){return a.applyStyles},asArray:function(){return o.asArray},camelCase:function(){return u.camelCase},cleanFromWord:function(){return a.cleanFromWord},clearTimeout:function(){return n.clearTimeout},colorToHex:function(){return r.colorToHex},fuzzySearchIndex:function(){return u.fuzzySearchIndex},getContentWidth:function(){return c.getContentWidth},getFixedPositionOffset:function(){return c.getFixedPositionOffset},getScrollParent:function(){return c.getScrollParent},hasBrowserColorPicker:function(){return s.hasBrowserColorPicker},hasContainer:function(){return s.hasContainer},htmlspecialchars:function(){return a.htmlspecialchars},i18n:function(){return u.i18n},innerWidth:function(){return c.innerWidth},isAbortError:function(){return s.isAbortError},isArray:function(){return s.isArray},isBoolean:function(){return s.isBoolean},isDestructable:function(){return s.isDestructable},isEqual:function(){return s.isEqual},isFastEqual:function(){return s.isFastEqual},isFunction:function(){return s.isFunction},isHTML:function(){return s.isHTML},isHtmlFromWord:function(){return s.isHtmlFromWord},isInitable:function(){return s.isInitable},isInt:function(){return s.isInt},isJoditObject:function(){return s.isJoditObject},isLicense:function(){return s.isLicense},isMarker:function(){return s.isMarker},isNativeFunction:function(){return s.isNativeFunction},isNumber:function(){return s.isNumber},isNumeric:function(){return s.isNumeric},isPlainObject:function(){return s.isPlainObject},isPromise:function(){return s.isPromise},isSet:function(){return s.isSet},isString:function(){return s.isString},isStringArray:function(){return s.isStringArray},isURL:function(){return s.isURL},isValidName:function(){return s.isValidName},isViewObject:function(){return s.isViewObject},isVoid:function(){return s.isVoid},isWindow:function(){return s.isWindow},kebabCase:function(){return u.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 c.offset},position:function(){return c.position},safeHTML:function(){return a.safeHTML},sanitizeHTMLElement:function(){return a.sanitizeHTMLElement},setTimeout:function(){return n.setTimeout},size:function(){return c.size},splitArray:function(){return o.splitArray},sprintf:function(){return u.sprintf},stringify:function(){return u.stringify},stripTags:function(){return a.stripTags},toArray:function(){return o.toArray},trim:function(){return u.trim},trimChars:function(){return u.trimChars},trimInv:function(){return u.trimInv},ucfirst:function(){return u.ucfirst}});var o=i(45664),n=i(61077),s=i(28686),r=i(93387),a=i(82658),l=i(97022),c=i(86878),u=i(97642),h=i(93640),d={};for(var p in h)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","nl2br","safeHTML","sanitizeHTMLElement","stripTags","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","ucfirst"].indexOf(p)&&(d[p]=(function(e){return h[e]}).bind(0,p));i.d(t,d)},97022:function(e,t,i){"use strict";i.d(t,{NUMBER_FIELDS_REG:function(){return n.NUMBER_FIELDS_REG},normalizeColor:function(){return o.normalizeColor},normalizeCssNumericValue:function(){return n.normalizeCssNumericValue},normalizeCssValue:function(){return n.normalizeCssValue},normalizeKeyAliases:function(){return s.normalizeKeyAliases},normalizeLicense:function(){return r.normalizeLicense},normalizePath:function(){return a.normalizePath},normalizeRelativePath:function(){return l.normalizeRelativePath},normalizeSize:function(){return c.normalizeSize},normalizeUrl:function(){return u.normalizeUrl}});var o=i(77367),n=i(19147),s=i(27978),r=i(49663),a=i(18377),l=i(96340),c=i(98831),u=i(48009)},77367:function(e,t,i){"use strict";var o=i(93387),n=i(4040);i.d(t,["normalizeColor",0,e=>{let t=["#"],i=(0,o.colorToHex)(e);if(!i)return!1;if(3===(i=(i=(0,n.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 c}});var o=i(70222),n=i(18303),s=i(93387),r=i(74264);let a=/^(left|top|bottom|right|width|min|max|height|margin|padding|fontsize|font-size)/i;function l(e,t){return!(0,n.isVoid)(t)&&a.test(e)&&(0,o.isNumeric)(t.toString())?parseInt(t.toString(),10)+"px":t}function c(e,t){if("font-weight"===(0,r.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,o.isNumeric)(t)?Number(t):t}return/color/i.test(e)&&/^rgb/i.test(t.toString())&&(0,s.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 s}});var o=i(81937),n=i(4040);function s(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,n.trim)(e.toLowerCase())).map(e=>o.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 o=i(4040);i.d(t,["normalizePath",0,(...e)=>e.filter(e=>(0,o.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 o(e){let t=e.ownerDocument?.defaultView,i=e.parentElement;for(;t&&i;){var o;if(""!==(o=t.getComputedStyle(i)).transform&&"none"!==o.transform||""!==o.perspective&&"none"!==o.perspective||""!==o.filter&&"none"!==o.filter||"transform"===o.willChange||"perspective"===o.willChange||"filter"===o.willChange||"paint"===o.contain||"layout"===o.contain||"strict"===o.contain||"content"===o.contain){let e=i.getBoundingClientRect();return{x:e.left,y:e.top}}i=i.parentElement}return{x:0,y:0}}i.d(t,{getFixedPositionOffset:function(){return o}})},34027:function(e,t,i){"use strict";i.d(t,{getScrollParent:function(){return function e(t){if(!t)return null;let i=n.Dom.isHTMLElement(t),r=i&&(0,s.css)(t,"overflowY");return i&&"visible"!==r&&"hidden"!==r&&t.scrollHeight>=t.clientHeight?t:e(t.parentNode)||o.globalDocument.scrollingElement||o.globalDocument.body}}});var o=i(81937),n=i(23211),s=i(93640)},86878:function(e,t,i){"use strict";i.d(t,{getContentWidth:function(){return o.getContentWidth},getFixedPositionOffset:function(){return n.getFixedPositionOffset},getScrollParent:function(){return s.getScrollParent},innerWidth:function(){return r.innerWidth},offset:function(){return l.offset},position:function(){return c.position},size:function(){return a.size}});var o=i(54447),n=i(2373),s=i(34027),r=i(83215),a=i(18073),l=i(69143),c=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 n}});var o=i(28686);function n(e){return(0,o.isString)(e)||(0,o.isArray)(e)?e.length:(0,o.isPlainObject)(e)?Object.keys(e).length:0}},69143:function(e,t,i){"use strict";let o=(e,t,i,n=!1)=>{let s,r,a;try{s=e.getBoundingClientRect()}catch(e){s={top:0,bottom:0,left:0,right:0,width:0,height:0}}let l=i.body,c=i.documentElement||{clientTop:0,clientLeft:0,scrollTop:0,scrollLeft:0},u=i.defaultView||i.parentWindow,h=u.pageYOffset||c.scrollTop||l.scrollTop,d=u.pageXOffset||c.scrollLeft||l.scrollLeft,p=c.clientTop||l.clientTop||0,f=c.clientLeft||l.clientLeft||0,m=t.iframe;if(!n&&t&&t.options&&t.o.iframe&&m){let{top:e,left:i}=o(m,t,t.od,!0);r=s.top+e,a=s.left+i}else r=s.top+h-p,a=s.left+d-f;return{top:Math.round(r),left:Math.round(a),width:s.width,height:s.height}};i.d(t,["offset",0,o])},23599:function(e,t,i){"use strict";i.d(t,{position:function(){return function e(t,i,n=!1){let s=t.getBoundingClientRect(),r=s.left,a=s.top;if((0,o.isJoditObject)(i)&&i.iframe&&i.ed.body.contains(t)&&!n){let{left:t,top:o}=e(i.iframe,i,!0);r+=t,a+=o}return{left:Math.round(r),top:Math.round(a),width:Math.round(t.offsetWidth??s.width),height:Math.round(t.offsetHeight??s.height)}}}});var o=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 n}});var o=i(81937);function n(e,t,i=0,s=1){let r=0,a,l=-1,c=0,u=0;for(a=i;r<e.length&&a<t.length;)e[r].toLowerCase()===t[a].toLowerCase()?(r++,c++,u=0,-1===l&&(l=a)):r>0&&(u>=s&&t[a]!==o.INVISIBLE_SPACE?(r=0,l=-1,c=0,u=0,a--):(u++,c++)),a++;return r===e.length?[l,c]:[-1,0]}},18080:function(e,t,i){"use strict";i.d(t,{i18n:function(){return c}});var o=i(81937),n=i(85932),s=i(99436),r=i(93640),a=i(5266);let l=(e,t)=>{if(!t||!t.length)return e;let i=/%([sd])/g,o=i.exec(e),n=e,s=0;for(;o&&void 0!==t[s];)n=n.replace(o[0],t[s].toString()),s+=1,o=i.exec(e);return n};function c(e,t,i){if(!(0,n.isString)(e))throw(0,r.error)("i18n: Need string in first argument");if(!e.length)return e;let c=!!i?.debugLanguage,u={},h=e=>t&&t.length?l(e,t):e,d=(0,r.defaultLanguage)(a.Config.defaultOptions.language,a.Config.defaultOptions.language),p=(0,r.defaultLanguage)(i?.language,d),f=t=>{if(!t)return;if((0,n.isString)(t[e]))return h(t[e]);let i=e.toLowerCase();if((0,n.isString)(t[i]))return h(t[i]);let o=(0,s.ucfirst)(e);if((0,n.isString)(t[o]))return h(t[o])};void 0!==o.lang[p]?u=o.lang[p]:c||(u=void 0!==o.lang[d]?o.lang[d]:o.lang.en);let m=i?.i18n;if(m&&m[p]){let e=f(m[p]);if(e)return e}return f(u)||(!c&&o.lang.en&&(0,n.isString)(o.lang.en[e])&&o.lang.en[e]?h(o.lang.en[e]):c?"{"+e+"}":(o.IS_PROD,h(e)))}i.d(t,["sprintf",0,l])},97642:function(e,t,i){"use strict";i.d(t,{CamelCaseToKebabCase:function(){return r.CamelCaseToKebabCase},camelCase:function(){return o.camelCase},fuzzySearchIndex:function(){return n.fuzzySearchIndex},i18n:function(){return s.i18n},kebabCase:function(){return r.kebabCase},sprintf:function(){return s.sprintf},stringify:function(){return a.stringify},trim:function(){return l.trim},trimChars:function(){return l.trimChars},trimInv:function(){return l.trimInv},ucfirst:function(){return c.ucfirst}});var o=i(57821),n=i(57626),s=i(18080),r=i(74264),a=i(3347),l=i(4040),c=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 o(e,t={}){if("object"!=typeof e)return e+"";let i=new Set(t.excludeKeys),n=new WeakMap;return JSON.stringify(e,(e,t)=>{if(!i.has(e)){if("object"==typeof t&&null!=t){if(n.get(t))return"[refObject]";n.set(t,!0)}return t}},t.prettify)}i.d(t,{stringify:function(){return o}})},4040:function(e,t,i){"use strict";i.d(t,{trim:function(){return n},trimChars:function(){return s},trimInv:function(){return r}});var o=i(81937);function n(e){return e.replace((0,o.SPACE_REG_EXP_END)(),"").replace((0,o.SPACE_REG_EXP_START)(),"")}function s(e,t){return e.replace(RegExp(`[${t}]+$`),"").replace(RegExp(`^[${t}]+`),"")}function r(e){return e.replace((0,o.INVISIBLE_SPACE_REG_EXP_END)(),"").replace((0,o.INVISIBLE_SPACE_REG_EXP_START)(),"")}},99436:function(e,t,i){"use strict";function o(e){return e.length?e[0].toUpperCase()+e.substring(1):""}i.d(t,{ucfirst:function(){return o}})},16849:function(e,t,i){"use strict";i.d(t,{alignElement:function(){return u},clearAlign:function(){return l},getHAlign:function(){return a},hAlignElement:function(){return function e(t,i,o){if(o){e(t,"normal"),Object.values(o).forEach(e=>t.classList.remove(...r(e))),t.classList.add(...r(o[i||"normal"])),["class","style"].forEach(e=>{(0,n.attr)(t,e)?.trim()||(0,n.attr)(t,e,null)});return}i&&"normal"!==i?"center"!==i?((0,s.css)(t,"float",i),(0,s.clearCenterAlign)(t)):(0,s.css)(t,{float:"",display:"block",marginLeft:"auto",marginRight:"auto"}):((0,s.css)(t,"float")&&-1!==["right","left"].indexOf((0,s.css)(t,"float").toString().toLowerCase())&&(0,s.css)(t,"float",""),(0,s.clearCenterAlign)(t))}}});var o=i(27795),n=i(7909),s=i(80991);let r=e=>(e??"").split(/\s+/).filter(Boolean);function a(e,t){if(t)for(let i of["left","right","center","normal"]){let o=r(t[i]);if(o.length&&o.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 l(e){o.Dom.each(e,e=>{o.Dom.isHTMLElement(e)&&(0,s.cssInline)(e,"textAlign")&&((0,s.css)(e,"textAlign",""),((0,n.attr)(e,"style")||"").trim().length||(0,n.attr)(e,"style",null))})}let c=new Map([["justifyfull","justify"],["justifyright","right"],["justifyleft","left"],["justifycenter","center"]]);function u(e,t){if(o.Dom.isNode(t)&&o.Dom.isElement(t)){l(t);let i=c.get(e.toLowerCase());i&&(0,s.css)(t,"textAlign",i)}}},47760:function(e,t,i){"use strict";i.d(t,{loadNext:function(){return function e(t,i,o=0){return(0,n.isString)(i[o])?c(t,i[o]).then(()=>e(t,i,o+1)):Promise.resolve()}},loadNextStyle:function(){return function e(t,i,o=0){return(0,n.isString)(i[o])?u(t,i[o]).then(()=>e(t,i,o+1)):Promise.resolve()}}});var o=i(23211),n=i(85932),s=i(7909),r=i(91321);let a=new Map,l=e=>(t,i)=>{if(a.has(i))return a.get(i);let o=e(t,i);return a.set(i,o),o},c=l((e,t)=>e.async.promise((i,n)=>{if(e.isInDestruct)return n();let a=e.c.element("script",{type:"text/javascript",crossorigin:"anonymous",referrerpolicy:"no-referrer",async:!0,src:(0,r.completeUrl)(t)});e.o.nonce&&(0,s.attr)(a,"nonce",e.o.nonce),e.e.one(a,"error",n).one(a,"load",i),o.Dom.append(e.od.body,a)})),u=l((e,t)=>e.async.promise((i,n)=>{if(e.isInDestruct)return n();let a=e.c.element("link",{rel:"stylesheet",media:"all",crossorigin:"anonymous"});e.o.nonce&&(0,s.attr)(a,"nonce",e.o.nonce),e.isInDestruct||e.e.on(a,"load",()=>i(a)).on(a,"error",n),(0,s.attr)(a,"href",(0,r.completeUrl)(t)),e.o.shadowRoot?o.Dom.append(e.o.shadowRoot,a):o.Dom.append(e.od.body,a)}));i.d(t,["alreadyLoadedList",0,a,"appendScriptAsync",0,c,"appendStyleAsync",0,u])},7909:function(e,t,i){"use strict";i.d(t,{attr:function(){return function e(t,i,l){if(!t||!(0,o.isFunction)(t.getAttribute))return null;if(!(0,s.isString)(i))return Object.keys(i).forEach(o=>{let s=i[o];(0,n.isPlainObject)(s)&&"style"===o?(0,a.css)(t,s):("className"===o&&(o="class"),e(t,o,s))}),null;let c=(0,r.CamelCaseToKebabCase)(i);if(/^-/.test(c)){let i=e(t,"data"+c);if(i)return i;c=c.substr(1)}if(void 0!==l)if(null==l)t.hasAttribute(c)&&t.removeAttribute(c);else{let e=l.toString();return"IMG"===t.nodeName&&("width"===c||"height"===c)&&(e=e.replace("px","")),t.setAttribute(c,e),e}return t.getAttribute(c)}},attrRaw:function(){return l}});var o=i(91565),n=i(62101),s=i(85932),r=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 o=i(62101);let n=(e,t)=>{let i=[],s=encodeURIComponent;for(let r in e)if(Object.prototype.hasOwnProperty.call(e,r)){let a=t?t+"["+r+"]":r,l=e[r];i.push((0,o.isPlainObject)(l)?n(l,a):s(a)+"="+s(l))}return i.join("&")};i.d(t,["buildQuery",0,n])},91321:function(e,t,i){"use strict";var o=i(81937);i.d(t,["completeUrl",0,e=>("file:"===o.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,u.keys)(t,!1).reduce((i,o)=>(i[o]=(0,n.isPlainObject)(t[o])?e(t[o]):t[o],i),{})}},ConfigFlatten:function(){return h},ConfigMerge:function(){return function e(t,i){Object.keys(i).forEach(o=>{if((0,c.isUnsafeProtoKey)(o))return;let s=i[o],r=t[o];(0,n.isPlainObject)(s)&&(0,n.isPlainObject)(r)&&!(0,l.isAtom)(s)?e(r,s):t[o]=s})}},ConfigProto:function(){return function e(t,i,u=0){if(Object.getPrototypeOf(t)!==Object.prototype)return t;let h=a.Config.defaultOptions;if((0,s.isString)(t.preset)){if(void 0!==h.presets[t.preset]){let e=h.presets[t.preset];Object.keys(e).forEach(i=>{(0,r.isVoid)(t[i])&&(t[i]=e[i])})}delete t.preset}let d={};return Object.keys(t).forEach(s=>{if((0,c.isUnsafeProtoKey)(s))return;let r=t[s],a=i?i[s]:null;if((0,n.isPlainObject)(r)&&(0,n.isPlainObject)(a)&&!(0,l.isAtom)(r)){d[s]=e(r,a,u+1);return}if(0!==u&&(0,o.isArray)(r)&&!(0,l.isAtom)(r)&&(0,o.isArray)(a)){d[s]=[...r,...a.slice(r.length)];return}d[s]=r}),Object.setPrototypeOf(d,i),d}}});var o=i(17312),n=i(62101),s=i(85932),r=i(18303),a=i(5266),l=i(54794),c=i(78048),u=i(71125);function h(e){return(0,u.keys)(e,!1).reduce((t,i)=>(t[i]=e[i],t),{})}},3856:function(e,t,i){"use strict";var o=i(81937),n=i(91764),s=i(36310);i.d(t,["convertMediaUrlToVideoEmbed",0,(e,{width:t=400,height:i=345}={})=>{if(!(0,n.isURL)(e))return e;let r=o.globalDocument.createElement("a");r.href=e,t||(t=400),i||(i=345);let a=r.protocol||"";switch(r.hostname){case"www.vimeo.com":case"vimeo.com":{let o=r.pathname.split("/").filter(Boolean),n=o.findIndex(e=>/^\d+$/.test(e));if(-1===n)return e;let s=o[n],l=o[n+1];return l&&0===n&&(s+="/"+l),'<iframe width="'+t+'" height="'+i+'" src="'+a+"//player.vimeo.com/video/"+s+'" 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 o=(r.search?(0,s.parseQuery)(r.search):{}).v||r.pathname.substring(1);return(o=o.replace(/^(watch|embed|shorts|live|v)\//,"").replace(/\/$/,""))?'<iframe width="'+t+'" height="'+i+'" src="'+a+"//www.youtube.com/embed/"+o+'" frameborder="0" allowfullscreen></iframe>':e}}return e}])},80991:function(e,t,i){"use strict";i.d(t,{css:function(){return l},cssInline:function(){return c}});var o=i(22289),n=i(62101),s=i(19147),r=i(57821),a=i(74264);function l(e,t,i,c=!1){if((0,o.isBoolean)(i)&&(c=i,i=void 0),(0,n.isPlainObject)(t)||void 0!==i){let o=(e,t,i)=>{void 0!==(i=(0,s.normalizeCssNumericValue)(t,i))&&(null==i||l(e,t,!0)!==(0,s.normalizeCssValue)(t,i))&&(e.style[t]=i)};if((0,n.isPlainObject)(t)){let i=Object.keys(t);for(let n=0;n<i.length;n+=1)o(e,(0,r.camelCase)(i[n]),t[i[n]])}else o(e,(0,r.camelCase)(t),i);return""}let u=(0,a.kebabCase)(t),h=e.ownerDocument||document,d=!!h&&(h.defaultView||h.parentWindow),p=e.style[t],f="";return void 0!==p&&""!==p?f=p:d&&!c&&(f=d.getComputedStyle(e).getPropertyValue(u)),s.NUMBER_FIELDS_REG.test(t)&&/^[-+]?[0-9.]+px$/.test(f.toString())&&(f=parseInt(f.toString(),10)),(0,s.normalizeCssValue)(t,f)}function c(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 o=i(31534);let n=new WeakMap;i.d(t,["dataBind",0,(e,t,i)=>{let s=n.get(e);if(!s){s={},n.set(e,s);let t=null;(0,o.isViewObject)(e.j)&&(t=e.j.e),(0,o.isViewObject)(e)&&(t=e.e),t&&t.on("beforeDestruct",()=>{n.delete(e)})}return void 0===i?s[t]:(s[t]=i,i)}])},97228:function(e,t,i){"use strict";var o=i(81937),n=i(85932);i.d(t,["defaultLanguage",0,(e,t="en")=>"auto"!==e&&(0,n.isString)(e)?e:o.globalDocument.documentElement&&o.globalDocument.documentElement.lang?o.globalDocument.documentElement.lang:navigator.language?navigator.language.substring(0,2):t])},38027:function(e,t,i){"use strict";i.d(t,{connection:function(){return s},error:function(){return n},options:function(){return r}});var o=i(29953);function n(e){return TypeError(e)}function s(e){return new o.ConnectionError(e)}function r(e){return new o.OptionsError(e)}},14228:function(e,t,i){"use strict";function o(e="Aborted"){return new DOMException(e,"AbortError")}i.d(t,{abort:function(){return o}})},58250:function(e,t,i){"use strict";i.d(t,{ConnectionError:function(){return o}});class o extends Error{constructor(e){super(e),Object.setPrototypeOf(this,o.prototype)}}},29953:function(e,t,i){"use strict";i.d(t,{ConnectionError:function(){return n.ConnectionError},OptionsError:function(){return s.OptionsError},abort:function(){return o.abort}});var o=i(14228),n=i(58250),s=i(11080)},11080:function(e,t,i){"use strict";i.d(t,{OptionsError:function(){return o}});class o extends TypeError{constructor(e){super(e),Object.setPrototypeOf(this,o.prototype)}}},33201:function(e,t,i){"use strict";i.d(t,{ConnectionError:function(){return n.ConnectionError},OptionsError:function(){return n.OptionsError},abort:function(){return n.abort},connection:function(){return o.connection},error:function(){return o.error},options:function(){return o.options}});var o=i(38027),n=i(29953)},54794:function(e,t,i){"use strict";i.d(t,{fastClone:function(){return r},isAtom:function(){return n},markAsAtomic:function(){return s}});var o=i(3347);function n(e){return e&&e.isAtom}function s(e){return Object.defineProperty(e,"isAtom",{enumerable:!1,value:!0,configurable:!1}),e}function r(e){return JSON.parse((0,o.stringify)(e))}},421:function(e,t,i){"use strict";var o=i(91565);let n=new Map;i.d(t,["getClassName",0,e=>{if((0,o.isFunction)(e.className))return e.className();let t=e.constructor?.originalConstructor||e.constructor;if(n.has(t))return n.get(t);if(t.name)return t.name;let i=new RegExp(/^\s*function\s*(\S*)\s*\(/),s=t.toString().match(i);return s?s[1]:""},"keepNames",0,n])},89308:function(e,t,i){"use strict";i.d(t,{get:function(){return s}});var o=i(85932),n=i(18303);function s(e,t){if(!(0,o.isString)(e)||!e.length)return null;let i=e.split("."),s=t;try{for(let e of i){if((0,n.isVoid)(s[e]))return null;s=s[e]}}catch{return null}return(0,n.isVoid)(s)?null:s}},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"],o=parseFloat(e.substr(0,e.length-2));return -1!==i.indexOf(t)?o*Math.pow(1024,i.indexOf(t)+1):parseInt(e,10)}])},93640:function(e,t,i){"use strict";i.r(t),i.d(t,{$$:function(){return x.$$},ConfigDeepFlatten:function(){return d.ConfigDeepFlatten},ConfigFlatten:function(){return d.ConfigFlatten},ConfigMerge:function(){return d.ConfigMerge},ConfigProto:function(){return d.ConfigProto},ConnectionError:function(){return v.ConnectionError},LimitedStack:function(){return P.LimitedStack},OptionsError:function(){return v.OptionsError},UNSAFE_PROTO_KEYS:function(){return C.UNSAFE_PROTO_KEYS},abort:function(){return v.abort},alignElement:function(){return o.alignElement},alreadyLoadedList:function(){return n.alreadyLoadedList},appendScriptAsync:function(){return n.appendScriptAsync},appendStyleAsync:function(){return n.appendStyleAsync},attr:function(){return l.attr},attrRaw:function(){return l.attrRaw},browser:function(){return c.browser},buildQuery:function(){return u.buildQuery},call:function(){return A.call},callPromise:function(){return A.callPromise},callThis:function(){return A.callThis},clearAlign:function(){return o.clearAlign},clearCenterAlign:function(){return f.clearCenterAlign},cns:function(){return E.cns},completeUrl:function(){return h.completeUrl},connection:function(){return v.connection},convertMediaUrlToVideoEmbed:function(){return p.convertMediaUrlToVideoEmbed},css:function(){return f.css},cssInline:function(){return f.cssInline},cssPath:function(){return x.cssPath},ctrlKey:function(){return m.ctrlKey},dataBind:function(){return g.dataBind},defaultLanguage:function(){return _.defaultLanguage},error:function(){return v.error},fastClone:function(){return b.fastClone},get:function(){return y.get},getClassName:function(){return w.getClassName},getDataTransfer:function(){return A.getDataTransfer},getHAlign:function(){return o.getHAlign},getPropertyDescriptor:function(){return A.getPropertyDescriptor},getXPathByElement:function(){return x.getXPathByElement},hAlignElement:function(){return o.hAlignElement},humanSizeToBytes:function(){return S.humanSizeToBytes},inView:function(){return T.inView},isAtom:function(){return b.isAtom},isUnsafeProtoKey:function(){return C.isUnsafeProtoKey},keepNames:function(){return w.keepNames},keys:function(){return A.keys},loadImage:function(){return A.loadImage},loadNext:function(){return n.loadNext},loadNextStyle:function(){return n.loadNextStyle},markAsAtomic:function(){return b.markAsAtomic},markDeprecated:function(){return E.markDeprecated},markOwner:function(){return A.markOwner},memorizeExec:function(){return A.memorizeExec},options:function(){return v.options},parseQuery:function(){return D.parseQuery},previewBox:function(){return I.previewBox},refs:function(){return x.refs},reset:function(){return k.reset},resolveElement:function(){return x.resolveElement},scrollIntoViewIfNeeded:function(){return T.scrollIntoViewIfNeeded},set:function(){return j.set}});var o=i(16849),n=i(47760),s=i(28712),r={};for(var a in s)0>["default","alignElement","clearAlign","getHAlign","hAlignElement","alreadyLoadedList","appendScriptAsync","appendStyleAsync","loadNext","loadNextStyle"].indexOf(a)&&(r[a]=(function(e){return s[e]}).bind(0,a));i.d(t,r);var l=i(7909),c=i(26136),u=i(36833),h=i(91321),d=i(77483),p=i(3856),f=i(80991),m=i(77213),g=i(36400),_=i(97228),v=i(33201),b=i(54794),y=i(89308),w=i(421),S=i(37427),C=i(78048),E=i(49385),D=i(36310),I=i(57075),k=i(43379),T=i(60898),x=i(28723),j=i(52144),P=i(42820),A=i(71125)},78048:function(e,t,i){"use strict";i.d(t,{isUnsafeProtoKey:function(){return n}});let o=["__proto__","constructor","prototype"];function n(e){return -1!==o.indexOf(e)}i.d(t,["UNSAFE_PROTO_KEYS",0,o])},49385:function(e,t,i){"use strict";i.d(t,{markDeprecated:function(){return n}});let o=console;function n(e,t=[""],i=null){return(...n)=>(o.warn(`Method "${t[0]}" deprecated.`+(t[1]?` Use "${t[1]}" instead`:"")),e.call(i,...n))}i.d(t,["cns",0,o])},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 o=i[e].split("=");t[decodeURIComponent(o[0])]=decodeURIComponent(o[1]||"")}return t}])},57075:function(e,t,i){"use strict";i.d(t,{previewBox:function(){return a}});var o=i(23211),n=i(85932),s=i(7909),r=i(80991);function a(e,t,i="px",l=null){let c=[],u=function(e,t){let i=[],n=[];o.Dom.each(e.editor,e=>{o.Dom.isTag(e,"img")&&n.push(e)});try{n.forEach(n=>{let r=[(0,s.attr)(n,"width"),(0,s.attr)(n,"height"),(0,s.attr)(n,"src")];(0,s.attr)(n,{width:n.offsetWidth+t,height:n.offsetHeight+t});let a=e.createInside.a();o.Dom.append(e.ed.body,a),(0,s.attr)(a,"href",(0,s.attr)(n,"src")||""),(0,s.attr)(n,"src",a.href),o.Dom.safeRemove(a),i.push(()=>{(0,s.attr)(n,{src:r[2],width:r[0]||null,height:r[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 u=e.c.div("jodit__preview-box jodit-context");l&&o.Dom.append(l,u),(0,r.css)(u,{position:"relative",padding:16});let h=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,r.css)(t,{minWidth:800,minHeight:600,border:0}),o.Dom.append(u,t);let i=t.contentWindow;if(i&&(e.e.fire("generateDocumentStructure.iframe",i.document,e),u=i.document.body,"function"==typeof ResizeObserver)){let o=!1,n=i.document.body,s=new ResizeObserver(e.async.debounce(()=>{s.unobserve(n),(0,r.css)(t,"height",n.offsetHeight+20),e.async.requestAnimationFrame(()=>{o||s.observe(n)})},100)),a=()=>{o=!0,s.unobserve(n),s.disconnect(),e.e.off("beforeDestruct",a)};c.push(a),e.e.on("beforeDestruct",a)}}else(0,r.css)(u,{minWidth:1024,minHeight:600,border:0});let d=(t,i)=>{let r=(0,n.isString)(i)?e.c.div():i;(0,n.isString)(i)&&(r.innerHTML=i);for(let e=0;e<r.childNodes.length;e+=1){let i=r.childNodes[e];if(o.Dom.isElement(i)){let e=t.ownerDocument.createElement(i.nodeName);for(let t=0;t<i.attributes.length;t+=1)(0,s.attr)(e,i.attributes[t].name,i.attributes[t].value);0===i.childNodes.length||o.Dom.isTag(i,"table")?"SCRIPT"===i.nodeName?i.textContent&&(e.textContent=i.textContent):i.innerHTML&&(e.innerHTML=i.innerHTML):d(e,i);try{o.Dom.append(t,e)}catch{}}else try{o.Dom.append(t,i.cloneNode(!0))}catch{}}};return d(u,h),e.e.fire("afterPreviewBox",u),[u,()=>{c.forEach(e=>e())}]}finally{u.forEach(e=>e())}}},43379:function(e,t,i){"use strict";i.d(t,{reset:function(){return a}});var o=i(81937),n=i(91565),s=i(89308);let r={};function a(e){if(!(e in r)){let t=o.globalDocument.createElement("iframe");try{if(t.src="about:blank",o.globalDocument.body.appendChild(t),!t.contentWindow)return null;let i=(0,s.get)(e,t.contentWindow),a=(0,s.get)(e.split(".").slice(0,-1).join("."),t.contentWindow);(0,n.isFunction)(i)&&(r[e]=i.bind(a))}catch(e){if(!o.IS_PROD)throw e}finally{t.parentNode?.removeChild(t)}}return r[e]??null}},60898:function(e,t,i){"use strict";i.d(t,{inView:function(){return n},scrollIntoViewIfNeeded:function(){return s}});var o=i(23211);function n(e,t,i){let o=e.getBoundingClientRect(),n=e,s=o.top,r=o.height;for(;n&&n!==t&&n.parentNode;)if(s+r>(o=(n=n.parentNode).getBoundingClientRect()).bottom+1&&s>o.top||s+r<=o.top)return!1;return(s+r<=(i.documentElement&&i.documentElement.clientHeight||0)+1||s<=0)&&s+r>=0}function s(e,t,i){if(o.Dom.isHTMLElement(e)&&!n(e,t,i)){if(t.clientHeight!==t.scrollHeight){let i=e.offsetTop+e.offsetHeight-t.clientHeight;t.scrollTop=t.scrollTop<i?i:e.offsetTop}n(e,t,i)||e.scrollIntoView({block:"nearest"})}}},28723:function(e,t,i){"use strict";i.d(t,{$$:function(){return h},resolveElement:function(){return p}});var o=i(81937),n=i(23211),s=i(88475),r=i(85932),a=i(57821),l=i(7909),c=i(33201);let u=1;function h(e,t){let i;if(!o.IS_ES_NEXT&&/:scope/.test(e)&&o.IS_IE&&!(t&&t.nodeType===Node.DOCUMENT_NODE)){let o=t.id,n=o||"_selector_id_"+(Math.random()+"").slice(2)+ ++u;e=e.replace(/:scope/g,"#"+n),o||t.setAttribute("id",n),i=t.parentNode.querySelectorAll(e),o||t.removeAttribute("id")}else i=t.querySelectorAll(e);return[].slice.call(i)}let d=(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 d(e.parentNode,t)+"/"+e.nodeName.toLowerCase()+(i.length>1?"["+((0,s.toArray)(i).indexOf(e)+1)+"]":"")};function p(e,t){let i=e;if((0,r.isString)(e))try{i=t.querySelector(e)}catch{throw(0,c.error)('String "'+e+'" should be valid HTML selector')}if(!i||"object"!=typeof i||!n.Dom.isElement(i)||!i.cloneNode)throw(0,c.error)('Element "'+e+'" should be string or HTMLElement instance');return i}i.d(t,["cssPath",0,e=>{if(!n.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,o=1;do(t=t.previousElementSibling)&&t.nodeName.toLowerCase()===e&&o++;while(t)e+=":nth-of-type("+o+")"}t.unshift(e),i=i.parentNode}return t.join(" > ")},"getXPathByElement",0,d,"refs",0,e=>{"container"in e&&(e=e.container);let t={};return n.Dom.each(e,e=>{if(n.Dom.isElement(e)&&(e.hasAttribute("ref")||e.hasAttribute("data-ref"))){let i=(0,l.attr)(e,"-ref");i&&(0,r.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 o=i(17312),n=i(70222),s=i(62101),r=i(85932),a=i(78048);function l(e,t,i){if(!(0,r.isString)(e)||!e.length)return;let l=e.split(".");if(l.some(a.isUnsafeProtoKey))return;let c=i;for(let e=0;e<l.length-1;e+=1){let t=l[e];(0,o.isArray)(c[t])||(0,s.isPlainObject)(c[t])||(c[t]=(0,n.isNumeric)(l[e+1])?[]:{}),c=c[t]}c&&(c[l[l.length-1]]=t)}},42820:function(e,t,i){"use strict";i.d(t,{LimitedStack:function(){return n}});var o=i(25045);class n{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,o._)(this,"limit",void 0),(0,o._)(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 u},callThis:function(){return l},getPropertyDescriptor:function(){return h},markOwner:function(){return c}});var o=i(52100),n=i(18303),s=i(7909),r=i(36400);function a(e,...t){return e(...t)}function l(e,t,...i){return e.apply(t,i)}function c(e,t){(0,s.attr)(t,"data-editor_id",e.id),t.component||Object.defineProperty(t,"jodit",{value:e})}function u(e,t){return(0,o.isPromise)(e)?e.then(e=>e,()=>null).finally(t):t?.()}function h(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,o)=>{let n=new Image,s=()=>{t.e.off(n),o?.()},r=()=>{t.e.off(n),i(n)};t.e.one(n,"load",r).one(n,"error",s).one(n,"abort",s),n.src=e,n.complete&&r()}),"memorizeExec",0,(e,t,{control:i},o)=>{let s="button"+i.command,a=(i.args&&i.args[0])??(0,r.dataBind)(e,s);if((0,n.isVoid)(a))return!1;(0,r.dataBind)(e,s,a),o&&(a=o(a)),e.execCommand(i.command,!1,a??void 0)}])},55810:function(e,t,i){"use strict";i.d(t,{init:function(){return r}});var o=i(81937),n=i(52433),s=i(3050);function r(e,t,i,r,a,l,c){if((0,n.isInitable)(r))try{r.init(e)}catch(e){if(!o.IS_PROD)throw e}a.set(t,r),l.delete(t),r.hasStyle&&(0,s.loadStyle)(e,t).catch(e=>{o.IS_PROD}),r.styles&&(c(e,t,"style").innerHTML=r.styles)}},3050:function(e,t,i){"use strict";i.d(t,{loadExtras:function(){return u},loadStyle:function(){return l}});var o=i(81937),n=i(74264),s=i(47760),r=i(86189);let a=new Set;async function l(e,t){let i=c(e,t,!1);if(!a.has(i))return a.add(i),(0,s.appendStyleAsync)(e,i)}function c(e,t,i){t=(0,n.kebabCase)(t);let o=e.minified?".min":"";return e.basePath+"plugins/"+t+"/"+t+o+"."+(i?"js":"css")}function u(e,t,i,n){try{let o=i.filter(t=>!e.has((0,r.normalizeName)(t.name)));o.length&&o.map(e=>{let i=e.url||c(t,e.name,!0);return(0,s.appendScriptAsync)(t,i).then(n).catch(()=>null)})}catch(e){if(!o.IS_PROD)throw e}}},25974:function(e,t,i){"use strict";i.d(t,{makeInstance:function(){return s}});var o=i(81937),n=i(91565);function s(e,t){try{try{return(0,n.isFunction)(t)?new t(e):t}catch(i){if((0,n.isFunction)(t)&&!t.prototype)return t(e)}}catch(e){if(!o.IS_PROD)throw e}return null}},86189:function(e,t,i){"use strict";i.d(t,{normalizeName:function(){return n}});var o=i(74264);function n(e){return(0,o.kebabCase)(e).toLowerCase()}},91206:function(e,t,i){"use strict";i.d(t,{Plugin:function(){return o.Plugin}});var o=i(18855);i(85305)},85305:function(e,t,i){"use strict";i.d(t,{PluginSystem:function(){return f}});var o=i(25045),n=i(81937),s=i(42689),r=i(32328),a=i(17312),l=i(52433),c=i(85932),u=i(55810),h=i(3050),d=i(25974),p=i(86189);class f{get size(){return this.__items.size}add(e,t){this.__items.set((0,p.normalizeName)(e),t),s.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,o)=>{(!e||e.has(o))&&t.push([o,i])}),t}__init(e){let{extraList:t,disableList:i,filter:o}={extraList:e.o.extraPlugins.map(e=>(0,c.isString)(e)?{name:e}:e),disableList:new Set((0,r.splitArray)(e.o.disablePlugins).map(p.normalizeName)),filter:e.o.safeMode?new Set(e.o.safePluginsList):null},s=new Map,f={},m=new Set;e.__plugins=f;let g=()=>{if(e.isInDestruct)return;let t=!1;this.__getFullPluginsList(o).forEach(([o,n])=>{if(i.has(o)||s.has(o))return;let r=n?.requires;if(r&&(0,a.isArray)(r)&&r.length){if(r.some(e=>i.has(e)))return;if(!r.every(e=>s.has(e)))return void m.add(o)}t=!0;let l=(0,d.makeInstance)(e,n);if(!l){s.set(o,null),m.delete(o);return}(0,u.init)(e,o,n,l,s,m,this.opts.getContainer),f[o]=l}),t&&(e.e.fire("updatePlugins"),g())};t&&t.length&&(0,h.loadExtras)(this.__items,e,t,g),g(),e.e.on("beforeDestruct",()=>{Object.keys(f).forEach(t=>{let i=f[t];(0,l.isDestructable)(i)&&i.destruct(e),delete f[t]}),delete e.__plugins}),n.IS_PROD||m.size}wait(e){return new Promise(t=>{if(this.get(e))return t();let i=()=>{t(),s.eventEmitter.off(`plugin:${e}:ready`,i)};s.eventEmitter.on(`plugin:${e}:ready`,i)})}constructor(e){(0,o._)(this,"opts",void 0),(0,o._)(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 o=i(25045),n=i(31635),s=i(16964),r=i(84839),a=i(24497);class l extends s.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(s.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(s.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,o._)(this,"buttons",[]),(0,o._)(this,"hasStyle",!1),(0,o._)(this,"styles",void 0),(0,o._)(this,"__inited",!1),e.e.on("afterPluginSystemInit",this.__afterPluginSystemInit).on("afterInit",this.__afterInit).on("beforeDestruct",this.__beforeDestruct)}}(0,o._)(l,"requires",[]),(0,n.__decorate)([r.autobind],l.prototype,"__afterPluginSystemInit",null),(0,n.__decorate)([r.autobind],l.prototype,"__afterInit",null),(0,n.__decorate)([r.autobind],l.prototype,"__beforeDestruct",null)},17338:function(e,t,i){"use strict";i.d(t,{Ajax:function(){return d}});var o=i(25045),n=i(31635),s=i(91231),r=i(81937),a=i(49574),l=i(65946),c=i(33201),u=i(5266);i(37102);var h=i(32855);class d{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 r.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}send(){this.__activated=!0;let{xhr:e,o:t}=this,i=this.prepareRequest();return this.__async.promise(async(o,n)=>{let s=()=>{this.__isFulfilled=!0,n(c.connection("Connection error"))},r=()=>{this.__isFulfilled=!0,o(new h.Response(i,e.status,e.statusText,!e.responseType?e.responseText:e.response))};e.onload=r,e.onabort=()=>{this.__isFulfilled=!0,n(c.abort("Abort connection"))},e.onerror=s,e.ontimeout=s,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)?r():e.statusText&&(this.__isFulfilled=!0,n(c.connection(e.statusText))))},e.withCredentials=t.withCredentials??!1;let{url:a,data:u,method:d}=i;e.open(d,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(u?this.__buildParams(u):void 0)},0)})}async *stream(){this.__activated=!0;let{xhr:e,o:t}=this,i=this.prepareRequest(),o=0,n="",s=[],r=null,a=!1,u=null,h=()=>{if(r){let e=r;r=null,e()}},d=t=>{let i=e.responseText;n+=i.substring(o),o=i.length;let r=n.split(`
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,o._)(this,"controls",void 0),(0,o._)(this,"events",{}),(0,o._)(this,"textIcons",!1),(0,o._)(this,"popupRoot",null),(0,o._)(this,"showBrowserColorPicker",!0),Object.assign(this,s)}}(0,o._)(r,"__defaultOptions",void 0),s=r.prototype,r.prototype.controls={}},24735:function(e,t,i){"use strict";i.d(t,{Async:function(){return m}});var o=i(25045),n=i(81937),s=i(61077),r=i(72068),a=i(91565),l=i(72412),c=i(62101),u=i(52100),h=i(85932),d=i(18303),f=i(28712),p=i(14228);class m{delay(e){return this.promise(t=>this.setTimeout(t,e))}setTimeout(e,t,...i){if(this.isDestructed)return 0;let o={};(0,d.isVoid)(t)&&(t=0),(0,l.isNumber)(t)||(t=(o=t).timeout||0),o.label&&this.clearLabel(o.label);let n=(0,s.setTimeout)(e,t,...i),r=o.label||n;return this.timers.set(r,n),this.__callbacks.set(r,e),n}updateTimeout(e,t){if((0,f.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,f.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,s.clearTimeout)(this.timers.get(e)),this.timers.delete(e),this.__callbacks.delete(e))}clearTimeout(e){if((0,h.isString)(e))return this.clearLabel(e);(0,s.clearTimeout)(e),this.timers.delete(e),this.__callbacks.delete(e)}debounce(e,t,i=!1){let o=0,n=!1,l=[],h=(...t)=>{if(!n){o=0;let i=e(...t);if(n=!0,l.length){let e=()=>{l.forEach(e=>e()),l.length=0};(0,u.isPromise)(i)?i.finally(e):e()}}},d=(...r)=>{n=!1,t?(!o&&i&&h(...r),(0,s.clearTimeout)(o),o=this.setTimeout(()=>h(...r),(0,a.isFunction)(t)?t():t),this.timers.set(e,o)):h(...r)};return(0,c.isPlainObject)(t)&&t.promisify?(...e)=>{let t=this.promise(e=>{l.push(e)}).catch(e=>{if((0,r.isAbortError)(e))return null;throw e});return d(...e),t}:d}microDebounce(e,t=!1){let i,o=!1,n=!0;return(...s)=>{if(i=s,o){n=!0;return}n=!0,t&&(n=!1,e(...i)),o=!0,this.__queueMicrotaskNative(()=>{o=!1,!this.isDestructed&&n&&e(...i)})}}throttle(e,t,i=!1){let o=null,n,s,r;return(...i)=>{(n=!0,r=i,t)?o||(s=()=>{n?(e(...r),n=!1,o=this.setTimeout(s,(0,a.isFunction)(t)?t():t),this.timers.set(s,o)):o=null})():e(...r)}}promise(e){let t=()=>{},i=new Promise((i,o)=>{t=()=>o((0,p.abort)("Abort async")),this.promisesRejections.add(t),e(i,o)});return!i.finally&&"u">typeof process&&!n.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 o=globalThis.scheduler.postTask(e,{...t,signal:i.signal});return o.finally(()=>{this.__controllers.delete(i)}).catch(()=>null),o}return this.promise((o,n)=>{let s=this.setTimeout(()=>{try{o(e())}catch(e){n(e)}this.__controllers.delete(i)},t.delay||1);i.signal.addEventListener("abort",()=>{this.clearTimeout(s),this.__controllers.delete(i),n((0,p.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,s.clearTimeout)(this.timers.get(e))),this.timers.clear(),this.promisesRejections.forEach(e=>e()),this.promisesRejections.clear()}destruct(){this.clear(),this.isDestructed=!0}constructor(){(0,o._)(this,"timers",new Map),(0,o._)(this,"__callbacks",new Map),(0,o._)(this,"__queueMicrotaskNative",queueMicrotask?.bind(window)??Promise.resolve().then.bind(Promise.resolve())),(0,o._)(this,"promisesRejections",new Set),(0,o._)(this,"__requestsIdle",new Set),(0,o._)(this,"__controllers",new Set),(0,o._)(this,"__requestsRaf",new Set),(0,o._)(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,o._)(this,"__cancelIdleCallbackNative",window.cancelIdleCallback?.bind(window)??(e=>{this.clearTimeout(e)})),(0,o._)(this,"isDestructed",!1)}}},91231:function(e,t,i){"use strict";i.d(t,{Async:function(){return o.Async}});var o=i(24735)},80251:function(e,t,i){"use strict";i.d(t,{Component:function(){return c}});var o=i(25045),n=i(91231),s=i(69364),r=i(28077),a=i(65946);let l=new Map;class c{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 o=[this.componentName];return e&&o.push("__"+(e=e.replace(/[^a-z0-9-]/gi,"-"))),t&&(o.push("_",t),o.push("_",(0,a.isVoid)(i)?"true":i.toString())),o.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===s.STATUSES.ready}get isDestructed(){return this.componentStatus===s.STATUSES.destructed}get isInDestruct(){return s.STATUSES.beforeDestruct===this.componentStatus||s.STATUSES.destructed===this.componentStatus}bindDestruct(e){return e.hookStatus(s.STATUSES.beforeDestruct,()=>!this.isInDestruct&&this.destruct()),this}destruct(){this.setStatus(s.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 o=l.get(this),n=o?.[e];n&&n.length&&n.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,o._)(this,"__componentName",void 0),(0,o._)(this,"async",new n.Async),(0,o._)(this,"uid",void 0),(0,o._)(this,"ownerWindow",window),(0,o._)(this,"__componentStatus",s.STATUSES.beforeInit),this.uid="jodit-uid-"+(0,r.uniqueUid)()}}(0,o._)(c,"STATUSES",s.STATUSES)},16964:function(e,t,i){"use strict";i.d(t,{Component:function(){return o.Component},STATUSES:function(){return n.STATUSES},ViewComponent:function(){return s.ViewComponent}});var o=i(80251),n=i(69364),s=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 s}});var o=i(25045),n=i(80251);class s extends n.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,o._)(this,"jodit",void 0),this.setParentView(e)}}},81937:function(e,t,i){"use strict";i.r(t),i.d(t,{IS_TEST:function(){return o}});let o=!1,n="u">typeof window?window:void 0,s="u">typeof document?document:void 0,r=new Set(["ul","ol"]),a=["img","video","svg","iframe","script","input","textarea","link","jodit","jodit-media"],l=new Set([...a,"br","hr"]),c=new Set(a),u="Meta",h="Backspace",d="Enter",f="Escape",p="ArrowLeft",m="ArrowUp",g="ArrowRight",_="ArrowDown",v="Delete",b=[u,h,v,m,_,g,p,d,f,"F3","Tab"],y="u">typeof navigator&&(-1!==navigator.userAgent.indexOf("MSIE")||/rv:11.0/i.test(navigator.userAgent)),w=void 0!==n&&/Mac|iPod|iPhone|iPad/.test(n.navigator.platform),S=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:C,isMin:E}=(()=>{if("u"<typeof document)return{basePath:"",isMin:!0};let e=s.currentScript;if(e)return S(e.src);let t=s.querySelectorAll("script[src]");return t&&t.length?S(t[t.length-1].src):S(n.location.href)})(),D=new Set(["touchstart","touchend","scroll","mousewheel","mousemove","touchmove"]);i.d(t,["ACCURACY",0,10,"APP_VERSION",0,"4.17.2","BASE_PATH",0,C,"BASE_PATH_IS_MIN",0,E,"BR",0,"br","CLIPBOARD_ID",0,"clipboard","COMMAND_KEYS",0,b,"EMULATE_DBLCLICK_TIMEOUT",0,300,"ES",0,"es2021","FAT_MODE",0,!0,"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,h,"KEY_DELETE",0,v,"KEY_DOWN",0,_,"KEY_END",0,"End","KEY_ENTER",0,d,"KEY_ESC",0,f,"KEY_F3",0,"F3","KEY_HOME",0,"Home","KEY_LEFT",0,p,"KEY_META",0,u,"KEY_RIGHT",0,g,"KEY_SPACE",0,"Space","KEY_TAB",0,"Tab","KEY_UP",0,m,"LIST_TAGS",0,r,"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,c,"PARAGRAPH",0,"p","PASSIVE_EVENTS",0,D,"SAFE_COUNT_CHANGE_CALL",0,10,"SET_TEST",0,()=>o=!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,s,"globalWindow",0,n,"lang",0,{}])},76517:function(e,t,i){"use strict";i.d(t,{Create:function(){return l}});var o=i(25045),n=i(81937),s=i(23211),r=i(65946),a=i(28712);class l{get doc(){return(0,r.isFunction)(this.document)?this.document():this.document}element(e,t,i){let o=this.doc.createElement(e.toLowerCase());return this.applyCreateAttributes(o),t&&((0,r.isPlainObject)(t)?(0,r.attr)(o,t):i=t),i&&(0,r.asArray)(i).forEach(e=>s.Dom.append(o,(0,r.isString)(e)?this.fromHTML(e):e)),o}div(e,t,i){let o=this.element("div",t,i);return e&&(o.className=e),o}sandbox(){let e=this.element("iframe",{sandbox:"allow-same-origin"});s.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 o=this.element("span",t,i);return e&&(o.className=e),o}a(e,t,i){let o=this.element("a",t,i);return e&&(o.className=e),o}text(e){return this.doc.createTextNode(e)}fake(){return this.text(n.INVISIBLE_SPACE)}fragment(){return this.doc.createDocumentFragment()}fromHTML(e,t){let i=this.div();i.innerHTML=e.toString();let o=i.firstChild===i.lastChild&&i.firstChild?i.firstChild:i;if(s.Dom.safeRemove(o),t){let e=(0,r.refs)(o);Object.keys(t).forEach(i=>{let o=e[i];o&&!1===t[i]&&s.Dom.hide(o)})}return o}applyCreateAttributes(e){if(this.createAttributes){let t=this.createAttributes;if(t&&t[e.tagName.toLowerCase()]){let i=t[e.tagName.toLowerCase()];(0,r.isFunction)(i)?i(e):(0,r.isPlainObject)(i)&&(0,r.attr)(e,i)}}}constructor(e,t){(0,o._)(this,"document",void 0),(0,o._)(this,"createAttributes",void 0),this.document=e,this.createAttributes=t}}},79821:function(e,t,i){"use strict";i.d(t,{Create:function(){return o.Create}});var o=i(76517)},49574:function(e,t,i){"use strict";i.d(t,{autobind:function(){return n}});var o=i(91565);function n(e,t,i){if(!(0,o.isFunction)(i.value))throw TypeError(`@autobind can only be applied to methods, but "${t}" is not a function`);let n=i.value;return{configurable:!0,get(){let e=n.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 c},cached:function(){return a}});var o=i(69364),n=i(23211),s=i(28686),r=i(38027);function a(e,t){let i=Object.getOwnPropertyDescriptor(e,t);return!i||(0,s.isFunction)(i.get)?null:i.value}function l(e,t,i){let o=i.get;if(!o)throw(0,r.error)("Getter property descriptor expected");i.get=function(){let e=o.call(this);return e&&!0===e.noCache||Object.defineProperty(this,t,{configurable:i.configurable,enumerable:i.enumerable,writable:!1,value:e}),e}}function c(e,t,i){let a=i.value;if(!(0,s.isFunction)(a))throw(0,r.error)("Handler must be a Function");let l=!0,c=new WeakMap;i.value=function(...e){let t=this.od??document,i=c.get(t);if(l&&i?.has(this.constructor))return i.get(this.constructor)?.cloneNode(!0);let o=a.apply(this,e);return l&&n.Dom.isElement(o)&&(i?i.set(this.constructor,o):c.set(t,new WeakMap([[this.constructor,o]]))),l?o.cloneNode(!0):o},e.hookStatus(o.STATUSES.ready,e=>{l=!!((0,s.isViewObject)(e)?e:e.jodit).options.cache})}},91672:function(e,t,i){"use strict";i.d(t,{component:function(){return r},getComponentClass:function(){return a}});var o=i(81937),n=i(421);let s=new Map;function r(e){class t extends e{constructor(...e){super(...e),this.constructor===t&&(this instanceof t||Object.setPrototypeOf(this,t.prototype),this.setStatus("ready"))}}let i=(0,n.getClassName)(e.prototype);if(s.has(i)&&!o.IS_PROD)throw Error(`Component with name "${i}" is already registered`);return s.set(i,t),t}function a(e){return s.get(e)}},55184:function(e,t,i){"use strict";i.d(t,{debounce:function(){return a},throttle:function(){return l}});var o=i(16964),n=i(28686),s=i(28712),r=i(33201);function a(e,t=!1,i="debounce"){return(a,l)=>{let c=a[l];if(!(0,n.isFunction)(c))throw(0,r.error)("Handler must be a Function");return a.hookStatus(o.STATUSES.ready,o=>{let{async:r}=o;(0,s.assert)(null!=r,`Component ${o.componentName||o.constructor.name} should have "async:IAsync" field`);let a=(0,n.isFunction)(e)?e(o):e,c=(0,n.isNumber)(a)||(0,n.isPlainObject)(a)?a:o.defaultTimeout;Object.defineProperty(o,l,{configurable:!0,value:r[i](o[l].bind(o),c,t)})}),{configurable:!0,get(){return c.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 n}});var o=i(91565);function n(...e){return t=>{let i=t.prototype;for(let t=0;t<e.length;t++){let n=e[t],s=Object.getOwnPropertyNames(n.prototype);for(let e=0;e<s.length;e++){let t=s[e],r=Object.getOwnPropertyDescriptor(n.prototype,t);null!=r&&(0,o.isFunction)(r.value)&&!(0,o.isFunction)(i[t])&&Object.defineProperty(i,t,{enumerable:!0,configurable:!0,writable:!0,value:function(...e){return r.value.call(this,...e)}})}}}}},29200:function(e,t,i){"use strict";i.d(t,{hook:function(){return s}});var o=i(91565),n=i(33201);function s(e){return(t,i)=>{if(!(0,o.isFunction)(t[i]))throw(0,n.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 r}});var o=i(16964),n=i(91565),s=i(33201);function r(){return(e,t)=>{if(!(0,n.isFunction)(e[t]))throw(0,s.error)("Handler must be a Function");e.hookStatus(o.STATUSES.ready,e=>{let{async:i}=e,o=e[t];e[t]=(...t)=>i.requestIdleCallback(o.bind(e,...t))})}}},84839:function(e,t,i){"use strict";i.r(t),i.d(t,{autobind:function(){return o.autobind},cache:function(){return n.cache},cacheHTML:function(){return n.cacheHTML},cached:function(){return n.cached},component:function(){return s.component},debounce:function(){return r.debounce},derive:function(){return a.derive},getComponentClass:function(){return s.getComponentClass},hook:function(){return l.hook},idle:function(){return c.idle},nonenumerable:function(){return u.nonenumerable},persistent:function(){return h.persistent},throttle:function(){return r.throttle},wait:function(){return d.wait},watch:function(){return f.watch}});var o=i(49574),n=i(51676),s=i(91672),r=i(55184),a=i(24968),l=i(29200),c=i(35718),u=i(41360),h=i(77036),d=i(80840),f=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 s}});var o=i(69364),n=i(31534);function s(e,t){e.hookStatus(o.STATUSES.ready,e=>{let i=(0,n.isViewObject)(e)?e:e.jodit,o=`${i.options.namespace}${e.componentName}_prop_${t}`,s=e[t];Object.defineProperty(e,t,{get:()=>i.storage.get(o)??s,set(e){i.storage.set(o,e)}})})}},80840:function(e,t,i){"use strict";i.d(t,{wait:function(){return r}});var o=i(69364),n=i(91565),s=i(33201);function r(e){return(t,i)=>{let r=t[i];if(!(0,n.isFunction)(r))throw(0,s.error)("Handler must be a Function");t.hookStatus(o.STATUSES.ready,t=>{let{async:o}=t,n=t[i],s=0;Object.defineProperty(t,i,{configurable:!0,value:function i(...r){o.clearTimeout(s),e(t)?n.apply(t,r):s=o.setTimeout(()=>i(...r),10)}})})}}},68616:function(e,t,i){"use strict";i.d(t,{watch:function(){return h}});var o=i(69364),n=i(70535),s=i(32328),r=i(91565),a=i(62101),l=i(31534),c=i(33201),u=i(71125);function h(e,t){return(i,h)=>{if(!(0,r.isFunction)(i[h]))throw(0,c.error)("Handler must be a Function");let d=t?.immediately??!0,f=t?.context,p=t=>{let o=(0,l.isViewObject)(t)?t:t.jodit,c=(e,...i)=>{if(!t.isInDestruct)return t[h](e,...i)};d||(c=t.async.microDebounce(c,!0)),(0,s.splitArray)(e).forEach(e=>{if(/:/.test(e)){let[i,n]=e.split(":"),s=f;i.length&&(s=t.get(i)),(0,r.isFunction)(s)&&(s=s(t)),o.events.on(s||t,n,c),s||o.events.on(n,c),t.hookStatus("beforeDestruct",()=>{o.events.off(s||t,n,c).off(n,c)});return}let s=e.split("."),[l]=s,h=s.slice(1),d=t[l];(0,a.isPlainObject)(d)&&(0,n.observable)(d).on("change."+h.join("."),c);let p=(0,u.getPropertyDescriptor)(i,l);Object.defineProperty(t,l,{configurable:!0,set(e){let i=d;i!==e&&(d=e,p&&p.set&&p.set.call(t,e),(0,a.isPlainObject)(d)&&(d=(0,n.observable)(d)).on("change."+h.join("."),c),c(l,i,d))},get:()=>p&&p.get?p.get.call(t):d})})};(0,r.isFunction)(i.hookStatus)?i.hookStatus(o.STATUSES.ready,p):p(i)}}},23211:function(e,t,i){"use strict";i.d(t,{Dom:function(){return b}});var o=i(81937),n=i(88475),s=i(17312),r=i(91565),a=i(46248),l=i(3213),c=i(85932),u=i(18303),h=i(4040),d=i(28712),f=i(7909),p=i(80991),m=i(36400),g=i(33201),_=i(71125);let v=RegExp(`<([a-z]+)[^>]+${o.TEMP_ATTR}[^>]*>(.+?)</\\1>`,"gi");class b{static detach(e){for(;e&&e.firstChild;)e.removeChild(e.firstChild)}static wrapNextInline(e,t,i){let o,n,s=e;i.s.save();do n=!1,(o=s.nextSibling)&&!b.isBlock(o)&&!b.isTag(o,"br")&&(n=!0,s=o);while(n)return b.__wrapElements(t,i,e,s)}static __wrapElements(e,t,i,o){let n=(0,c.isString)(e)?t.createInside.element(e):e;i.parentNode&&i.parentNode.insertBefore(n,i);let s=i;for(;s&&(s=i.nextSibling,n.appendChild(i),i!==o&&s);)i=s;return t.s.restore(),n}static wrapInline(e,t,i){let o,n,s=e,r=e;i.s.save();do n=!1,(o=s.previousSibling)&&!b.isBlock(o)&&(n=!0,s=o);while(n)do n=!1,(o=r.nextSibling)&&!b.isBlock(o)&&(n=!0,r=o);while(n)return b.__wrapElements(t,i,s,r)}static wrap(e,t,i){let o=(0,c.isString)(t)?i.element(t):t;if(b.isNode(e)){if(!e.parentNode)throw(0,g.error)("Element should be in DOM");e.parentNode.insertBefore(o,e),o.appendChild(e)}else{let t=e.extractContents();e.insertNode(o),o.appendChild(t)}return o}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 o=e;for(;o&&o!==t&&!(e!==o&&i(o));){let e=o.firstChild||o.nextSibling;if(!e){for(;o&&!o.nextSibling;)if((o=o.parentNode)===t)return;e=o?.nextSibling}o=e}}static replace(e,t,i,o=!1,s=!1){let r;if((0,a.isHTML)(t)&&((0,d.assert)(i,"Need create instance for new tag"),t=i.fromHTML(t)),(0,c.isString)(t)?((0,d.assert)(i,"Need create instance for new tag"),r=i.element(t)):r=t,!s)for(;e.firstChild;)r.appendChild(e.firstChild);return o&&b.isElement(e)&&b.isElement(r)&&(0,n.toArray)(e.attributes).forEach(e=>{r.setAttribute(e.name,e.value)}),e.parentNode&&e.parentNode.replaceChild(r,e),r}static isEmptyTextNode(e){return b.isText(e)&&(!e.nodeValue||0===e.nodeValue.replace(o.INVISIBLE_SPACE_REG_EXP(),"").trim().length)}static isEmptyContent(e){return b.each(e,e=>b.isEmptyTextNode(e))}static isContentEditable(e,t){return b.isNode(e)&&!b.closest(e,e=>b.isElement(e)&&"false"===e.getAttribute("contenteditable"),t)}static isEmpty(e,t=o.NO_EMPTY_TAGS){let i;if(!e)return!0;i=(0,r.isFunction)(t)?t:e=>t.has(e.nodeName.toLowerCase());let n=e=>null==e.nodeValue||0===(0,h.trim)(e.nodeValue).length;return b.isText(e)?n(e):!(b.isElement(e)&&i(e))&&b.each(e,e=>{if(b.isText(e)&&!n(e)||b.isElement(e)&&i(e))return!1})}static isNode(e){return!!(e&&(0,c.isString)(e.nodeName)&&"number"==typeof e.nodeType&&e.childNodes&&(0,r.isFunction)(e.appendChild))}static isCell(e){return b.isNode(e)&&("TD"===e.nodeName||"TH"===e.nodeName)}static isList(e){return b.isTag(e,o.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,u.isVoid)(e)&&"object"==typeof e&&b.isNode(e)&&o.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,p.css)(e,"display").toString())}static canSplitBlock(e){return!(0,u.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 o=i?"lastChild":"firstChild",n=i?"previousSibling":"nextSibling",s=e?.[o];if(!s)return null;do{if(t(s))return s;let i=s[o]||s[n];if(!i&&s.parentNode!==e){do s=s.parentNode;while(s&&!s[n]&&s.parentNode!==e)i=s?.[n]}s=i}while(s)return null}static prev(e,t,i,o=!0){return b.find(e,t,i,!1,o)}static next(e,t,i,o=!0){return b.find(e,t,i,!0,o)}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 o=e=>b.isElement(e)&&e.classList.contains(t),n=e.parentNode;return i?b.prev(e,o,n):b.next(e,o,n)}static find(e,t,i,o=!0,n=!0){let s=this.nextGen(e,i,o,n),r=s.next();for(;!r.done;){if(t(r.value))return r.value;r=s.next()}return null}static*nextGen(e,t,i=!0,o=!0){let n=[],s=e;do{let t=i?s.nextSibling:s.previousSibling;for(;t;)n.push(t),t=i?t.nextSibling:t.previousSibling;n.reverse(),yield*this.runInStack(e,n,i,o),s=s.parentNode}while(s&&s!==t)return null}static each(e,t,i=!0){let o=this.eachGen(e,i),n=o.next();for(;!n.done;){if(!1===t(n.value))return!1;n=o.next()}return!0}static eachGen(e,t=!0){return this.runInStack(e,[e],t)}static*runInStack(e,t,i,o=!0){for(;t.length;){let n=t.pop();if(o){let e=i?n.lastChild:n.firstChild;for(;e;)t.push(e),e=i?e.previousSibling:e.nextSibling}e!==n&&(yield n)}}static findWithCurrent(e,t,i,o="nextSibling",n="firstChild"){let s=e;do{if(t(s))return s||null;if(n&&s&&s[n]){let e=b.findWithCurrent(s[n],t,s,o,n);if(e)return e}for(;s&&!s[o]&&s!==i;)s=s.parentNode;s&&s[o]&&s!==i&&(s=s[o])}while(s&&s!==i)return null}static findSibling(e,t=!0,i=e=>!b.isEmptyTextNode(e)){let o=b.sibling(e,t);for(;o&&!i(o);)o=b.sibling(o,t);return o&&i(o)?o: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,_.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,o=!1){let n=e;if(!n)return null;do{if(t(n))return n;if(n===i||!n.parentNode)break;n=n.parentNode}while(n&&n!==i)return n===i&&o&&t(n)?n:null}static closest(e,t,i){let o,n=e=>e.toLowerCase();if((0,r.isFunction)(t))o=t;else if((0,s.isArray)(t)||(0,l.isSet)(t)){let e=(0,l.isSet)(t)?t:new Set(t.map(n));o=t=>!!(t&&e.has(n(t.nodeName)))}else o=e=>!!(e&&n(t)===n(e.nodeName));return b.up(e,o,i)}static furthest(e,t,i){let o=null,n=e?.parentElement;for(;n&&n!==i;)t(n)&&(o=n),n=n?.parentElement;return o}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,s.isArray)(t)?t.forEach(t=>{this.append(e,t)}):e.appendChild(t)}static moveContent(e,t,i=!1,s=()=>!0){let r=(e.ownerDocument||o.globalDocument).createDocumentFragment();(0,n.toArray)(e.childNodes).filter(e=>!!s(e)||(b.safeRemove(e),!1)).forEach(e=>{r.appendChild(e)}),t.insertBefore(r,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,o.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,m.dataBind)(e,"__old_display",e.style.getPropertyValue("display")),e.style.setProperty("display","none"))}static show(e){if(!e)return;let t=(0,m.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,f.attr)(e,t),(0,f.attr)(e,o.TEMP_ATTR,!0),e}static isTemporary(e){return!!b.isElement(e)&&(b.isMarker(e)||"true"===(0,f.attr)(e,o.TEMP_ATTR))}static isMarker(e){return b.isNode(e)&&b.isTag(e,"span")&&e.hasAttribute("data-"+o.MARKER_CLASS)}static replaceTemporaryFromString(e){return e.replace(v,"$2")}static temporaryList(e){let t=[];return b.each(e,e=>{b.isHTMLElement(e)&&e.hasAttribute(o.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 o.Dom},LazyWalker:function(){return n.LazyWalker}});var o=i(23211),n=i(1080)},1080:function(e,t,i){"use strict";i.d(t,{LazyWalker:function(){return l}});var o=i(25045),n=i(31635),s=i(49574),r=i(23211),a=i(60216);class l extends a.Eventify{setWork(e){return this.isWorked?this.break():this.stop(),this.workNodes=r.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,o._)(this,"async",void 0),(0,o._)(this,"options",void 0),(0,o._)(this,"workNodes",void 0),(0,o._)(this,"hadAffect",void 0),(0,o._)(this,"isWorked",void 0),(0,o._)(this,"isFinished",void 0),(0,o._)(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,n.__decorate)([s.autobind],l.prototype,"__workPerform",null)},93747:function(e,t,i){"use strict";i.d(t,{EventEmitter:function(){return h}});var o=i(25045),n=i(81937),s=i(32328),r=i(17312),a=i(91565),l=i(85932),c=i(33201),u=i(18869);class h{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,s.splitArray)(e).map(e=>e.trim()).forEach(e=>{let i=e.split("."),o=i[1]||u.defaultNameSpace;t.call(this,i[0],o)})}__getStore(e){if(!e)throw(0,c.error)("Need subject");if(void 0===e[this.__key]){let t=new u.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","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,o){let s,u,h,f;if((0,l.isString)(e)||(0,l.isStringArray)(e)?(s=this,u=e,h=t,f=i):(s=e,u=t,h=i,f=o),!((0,l.isString)(u)||(0,l.isStringArray)(u))||0===u.length)throw(0,c.error)("Need events names");if(!(0,a.isFunction)(h))throw(0,c.error)("Need event handler");if((0,r.isArray)(s))return s.forEach(e=>{this.on(e,u,h,f)}),this;let p=s,m=this.__getStore(p),g=this,_=function(e,...t){if(!g.isMuted(e))return h&&h.call(this,...t)};return d(p)&&(_=function(e){if(!g.isMuted(e.type)&&(g.__prepareEvent(e),h&&!1===h.call(this,e)))return e.preventDefault(),e.stopImmediatePropagation(),!1}),this.__eachEvent(u,(e,t)=>{if(0===e.length)throw(0,c.error)("Need event name");if(!1===m.indexOf(e,t,h)){let i={event:e,originalCallback:h,syntheticCallback:_};if(m.set(e,t,i,f?.top),d(p)){let t=n.PASSIVE_EVENTS.has(e)?{passive:!0,capture:f?.capture??!1}:f?.capture??!1;_.options=t,p.addEventListener(e,_,t),this.__memoryDOMSubjectToHandler(p,_)}}}),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,o=i.get(e)||new Set;o.delete(t),o.size?i.set(e,o):i.delete(e)}one(e,t,i,o){let n,s,r,a;(0,l.isString)(e)||(0,l.isStringArray)(e)?(n=this,s=e,r=t,a=i):(n=e,s=t,r=i,a=o);let c=(...e)=>(this.off(n,s,c),r(...e));return this.on(n,s,c,a),this}off(e,t,i){let o,n,s;if((0,l.isString)(e)||(0,l.isStringArray)(e)?(o=this,n=e,s=t):(o=e,n=t,s=i),(0,r.isArray)(o))return o.forEach(e=>{this.off(e,n,s)}),this;let c=o,h=this.__getStore(c);if(!((0,l.isString)(n)||(0,l.isStringArray)(n))||0===n.length)return h.namespaces().forEach(e=>{this.off(c,"."+e)}),this.__removeStoreFromSubject(c),this;let f=e=>{d(c)&&(c.removeEventListener(e.event,e.syntheticCallback,e.syntheticCallback.options??!1),this.__unmemoryDOMSubjectToHandler(c,e.syntheticCallback))},p=(e,t)=>{if(""===e)return void h.events(t).forEach(e=>{""!==e&&p(e,t)});let i=h.get(e,t);if(i&&i.length)if((0,a.isFunction)(s)){let o=h.indexOf(e,t,s);!1!==o&&(f(i[o]),i.splice(o,1),i.length||h.clearEvents(t,e))}else i.forEach(f),i.length=0,h.clearEvents(t,e)};return this.__eachEvent(n,(e,t)=>{t===u.defaultNameSpace?h.namespaces().forEach(t=>{p(e,t)}):p(e,t)}),h.isEmpty()&&this.__removeStoreFromSubject(c),this}stopPropagation(e,t){let i=(0,l.isString)(e)?this:e,o=(0,l.isString)(e)?e:t;if("string"!=typeof o)throw(0,c.error)("Need event names");let n=this.__getStore(i);this.__eachEvent(o,(e,t)=>{let o=n.get(e,t);o&&this.__stopped.push(o),t===u.defaultNameSpace&&n.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 o,n,s=(0,l.isString)(e)?this:e,r=(0,l.isString)(e)?e:t,a=(0,l.isString)(e)?[t,...i]:i;if(!d(s)&&!(0,l.isString)(r))throw(0,c.error)("Need events names");let h=this.__getStore(s);return!(0,l.isString)(r)&&d(s)?this.__triggerNativeEvent(s,t):this.__eachEvent(r,(e,t)=>{if(d(s))this.__triggerNativeEvent(s,e);else{let i=h.get(e,t);if(i)try{[...i].every(t=>!this.__isStopped(i)&&(this.currents.push(e),n=t.syntheticCallback.call(s,e,...a),this.currents.pop(),void 0!==n&&(o=n),!0))}finally{this.__removeStop(i)}t!==u.defaultNameSpace||d(s)||h.namespaces().filter(e=>e!==t).forEach(t=>{let i=this.fire.apply(this,[s,e+"."+t,...a]);void 0!==i&&(o=i)})}}),o}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,o._)(this,"__domEventsMap",new Map),(0,o._)(this,"__mutedEvents",new Set),(0,o._)(this,"__key","__JoditEventEmitterNamespaces"),(0,o._)(this,"__doc",n.globalDocument),(0,o._)(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,o._)(this,"currents",[]),(0,o._)(this,"__stopped",[]),(0,o._)(this,"__isDestructed",!1),e&&(this.__doc=e),this.__key+=new Date().getTime()}}function d(e){return e&&(0,a.isFunction)(e.addEventListener)}},60216:function(e,t,i){"use strict";i.d(t,{Eventify:function(){return n}});var o=i(25045);class n{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,o._)(this,"__map",new Map)}}},42689:function(e,t,i){"use strict";let o=new(i(93747)).EventEmitter;i.d(t,["eventEmitter",0,o])},1496:function(e,t,i){"use strict";i.d(t,{EventEmitter:function(){return o.EventEmitter},EventHandlersStore:function(){return r.EventHandlersStore},Eventify:function(){return n.Eventify},defaultNameSpace:function(){return r.defaultNameSpace},observable:function(){return s.observable}});var o=i(93747),n=i(60216),s=i(70535),r=i(18869)},70535:function(e,t,i){"use strict";i.d(t,{observable:function(){return c}});var o=i(17312),n=i(94013),s=i(62101),r=i(71125);let a=Symbol("observable-object");function l(e){return void 0!==e[a]}function c(e){if(l(e))return e;let t={},i={},c=(t,n)=>((0,o.isArray)(t)?t.map(e=>c(e,n)):(i[t]||(i[t]=[]),i[t].push(n)),e),u=(n,...s)=>{if((0,o.isArray)(n))return void n.map(e=>u(e,...s));try{!t[n]&&i[n]&&(t[n]=!0,i[n].forEach(t=>t.call(e,...s)))}finally{t[n]=!1}},h=(t,i=[])=>{let o={};l(t)||(Object.defineProperty(t,a,{enumerable:!1,value:!0}),Object.keys(t).forEach(a=>{let l=i.concat(a).filter(e=>e.length);o[a]=t[a];let c=(0,r.getPropertyDescriptor)(t,a);Object.defineProperty(t,a,{set(t){let i=o[a];if(!(0,n.isFastEqual)(o[a],t)){u(["beforeChange","beforeChange."+l.join(".")],a,t),(0,s.isPlainObject)(t)&&h(t,l),c&&c.set?c.set.call(e,t):o[a]=t;let n=[];u(["change",...l.reduce((e,t)=>(n.push(t),e.push("change."+n.join(".")),e),[])],l.join("."),i,t?.valueOf?t.valueOf():t)}},get:()=>c&&c.get?c.get.call(e):o[a],enumerable:!0,configurable:!0}),(0,s.isPlainObject)(o[a])&&h(o[a],l)}),Object.defineProperty(e,"on",{value:c}))};return h(e),e}},18869:function(e,t,i){"use strict";i.d(t,{EventHandlersStore:function(){return a}});var o=i(25045),n=i(88475),s=i(28712);let r="JoditEventDefaultNamespace";class a{get(e,t){if(this.__store.has(t)){let i=this.__store.get(t);return(0,s.assert)(i,"-"),i[e]}}indexOf(e,t,i){let o=this.get(e,t);if(o){for(let e=0;e<o.length;e+=1)if(o[e].originalCallback===i)return e}return!1}namespaces(e=!1){let t=(0,n.toArray)(this.__store.keys());return e?t.filter(e=>e!==r):t}events(e){let t=this.__store.get(e);return t?Object.keys(t):[]}set(e,t,i,o=!1){let n=this.__store.get(t);n||(n={},this.__store.set(t,n)),void 0===n[e]&&(n[e]=[]),o?n[e].unshift(i):n[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,o._)(this,"__store",new Map)}}i.d(t,["defaultNameSpace",0,r])},28077:function(e,t,i){"use strict";i.d(t,{getContainer:function(){return b},getPopupViewRoot:function(){return y},uniqueUid:function(){return g}});var o=i(24497),n=i(85932),s=i(31534),r=i(74264),a=i(7909),l=i(80991),c=i(421),u=i(85305),h=i(42689),d=i(81937),f=i(27795);let p=1,m=new Set;function g(){function e(){return Math.round(p+=10*(Math.random()+1)).toString(16)}let t=e();for(;m.has(t);)t=e();return m.add(t),t}let _=new u.PluginSystem({getContainer:b}),v=new WeakMap;function b(e,t,i="div",l=!1){let u,h=(0,n.isString)(t)?t:t?(0,c.getClassName)(t.prototype):"jodit-utils",d=v.get(e)||{},p=h+i,m=(0,s.isViewObject)(e)?e:e.j;if(!d[p]){let t=m.c;if(u=y(m.o,m.container,e.od.body),l&&(0,o.isJoditObject)(e)&&e.od!==e.ed){t=e.createInside;let n="style"===i?e.ed.head:e.ed.body;u=(0,o.isJoditObject)(e)&&e.o.shadowRoot?e.o.shadowRoot:n}let n=t.element(i,{className:`jodit jodit-${(0,r.kebabCase)(h)}-container jodit-box`});m.o.nonce&&("style"===i||"script"===i)&&(0,a.attr)(n,"nonce",m.o.nonce),n.classList.add("jodit_theme_"+(m.o.theme||"default")),f.Dom.append(u,n),d[p]=n,e.hookStatus("beforeDestruct",()=>{m.events.off(n),f.Dom.safeRemove(n),delete d[p],Object.keys(d).length&&v.delete(e)}),v.set(e,d),m.events.fire("getContainer",n)}return d[p].classList.remove("jodit_theme_default","jodit_theme_dark"),d[p].classList.add("jodit_theme_"+(m.o.theme||"default")),d[p]}function y(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,l.css)(e,"position"))),i)??i}let w=h.eventEmitter;i.d(t,["eventEmitter",0,w,"extendLang",0,e=>{Object.keys(e).forEach(t=>{d.lang[t]?Object.assign(d.lang[t],e[t]):d.lang[t]=e[t]})},"instances",0,{},"modules",0,{},"pluginSystem",0,_])},78982:function(e,t,i){"use strict";var o=i(17312);i.d(t,["asArray",0,e=>(0,o.isArray)(e)?e:[e]])},45664:function(e,t,i){"use strict";i.d(t,{asArray:function(){return o.asArray},splitArray:function(){return n.splitArray},toArray:function(){return s.toArray}});var o=i(78982),n=i(32328),s=i(88475)},32328:function(e,t,i){"use strict";function o(e){return Array.isArray(e)?e:e.split(/[,\s]+/)}i.d(t,{splitArray:function(){return o}})},88475:function(e,t,i){"use strict";var o=i(23283),n=i(43379);i.d(t,["toArray",0,function(...e){return((0,o.isNativeFunction)(Array.from)?Array.from:(0,n.reset)("Array.from")??Array.from).apply(Array,e)}])},61077:function(e,t,i){"use strict";i.d(t,{clearTimeout:function(){return o.clearTimeout},setTimeout:function(){return o.setTimeout}});var o=i(79947)},79947:function(e,t,i){"use strict";i.d(t,{clearTimeout:function(){return s},setTimeout:function(){return n}});var o=i(81937);function n(e,t,...i){return t?o.globalWindow.setTimeout(e,t,...i):(e.call(null,...i),0)}function s(e){o.globalWindow.clearTimeout(e)}},98740:function(e,t,i){"use strict";i.d(t,{hasBrowserColorPicker:function(){return n}});var o=i(81937);function n(){let e;try{let t=o.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 o.hasBrowserColorPicker},hasContainer:function(){return h.hasContainer},isAbortError:function(){return n.isAbortError},isArray:function(){return s.isArray},isBoolean:function(){return r.isBoolean},isDestructable:function(){return h.isDestructable},isEqual:function(){return a.isEqual},isFastEqual:function(){return a.isFastEqual},isFunction:function(){return l.isFunction},isHTML:function(){return c.isHTML},isHtmlFromWord:function(){return u.isHtmlFromWord},isInitable:function(){return h.isInitable},isInt:function(){return d.isInt},isJoditObject:function(){return f.isJoditObject},isLicense:function(){return p.isLicense},isMarker:function(){return m.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 S.isString},isStringArray:function(){return S.isStringArray},isURL:function(){return C.isURL},isValidName:function(){return E.isValidName},isViewObject:function(){return D.isViewObject},isVoid:function(){return I.isVoid},isWindow:function(){return k.isWindow}});var o=i(98740),n=i(72068),s=i(17312),r=i(22289),a=i(94013),l=i(91565),c=i(46248),u=i(82166),h=i(52433),d=i(99732),f=i(24497),p=i(44998),m=i(23175),g=i(23283),_=i(72412),v=i(70222),b=i(62101),y=i(52100),w=i(3213),S=i(85932),C=i(91764),E=i(50083),D=i(31534),I=i(18303),k=i(3513)},72068:function(e,t,i){"use strict";function o(e){return!!e&&e instanceof DOMException&&"AbortError"===e.name}i.d(t,{isAbortError:function(){return o}})},17312:function(e,t,i){"use strict";function o(e){return Array.isArray(e)}i.d(t,{isArray:function(){return o}})},22289:function(e,t,i){"use strict";function o(e){return"boolean"==typeof e}i.d(t,{isBoolean:function(){return o}})},94013:function(e,t,i){"use strict";i.d(t,{isEqual:function(){return n},isFastEqual:function(){return s}});var o=i(3347);function n(e,t){return e===t||(0,o.stringify)(e)===(0,o.stringify)(t)}function s(e,t){return e===t}},91565:function(e,t,i){"use strict";function o(e){return"function"==typeof e}i.d(t,{isFunction:function(){return o}})},82166:function(e,t,i){"use strict";function o(e){return -1!==e.search(/<meta.*?Microsoft Excel\s[\d].*?>/)||-1!==e.search(/<meta.*?Microsoft Word\s[\d].*?>/)||-1!==e.search(/<meta[^>]*?ProgId[^>]*?(Word|Excel)\./i)||-1!==e.search(/<meta[^>]*?(LibreOffice|OpenOffice)/i)||-1!==e.search(/urn:schemas-microsoft-com:office:(word|excel)/)||-1!==e.search(/<\w[^>]*\sclass=("|')?Mso/)||-1!==e.search(/style='[^']*mso-/)||-1!==e.search(/style="[^"]*mso-/)&&-1!==e.search(/<font/)}i.d(t,{isHtmlFromWord:function(){return o}})},46248:function(e,t,i){"use strict";var o=i(85932);i.d(t,["isHTML",0,e=>(0,o.isString)(e)&&/<([A-Za-z][A-Za-z0-9]*)\b[^>]*>(.*?)<\/\1>/m.test(e.replace(/[\r\n]/g,""))])},52433:function(e,t,i){"use strict";i.d(t,{hasContainer:function(){return l},isDestructable:function(){return a},isInitable:function(){return r}});var o=i(23211),n=i(91565),s=i(18303);function r(e){return!(0,s.isVoid)(e)&&(0,n.isFunction)(e.init)}function a(e){return!(0,s.isVoid)(e)&&(0,n.isFunction)(e.destruct)}function l(e){return!(0,s.isVoid)(e)&&o.Dom.isElement(e.container)}},99732:function(e,t,i){"use strict";i.d(t,{isInt:function(){return s}});var o=i(70222),n=i(85932);function s(e){return(0,n.isString)(e)&&(0,o.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 n}});var o=i(91565);function n(e){return!!(e&&e instanceof Object&&(0,o.isFunction)(e.constructor)&&("u">typeof Jodit&&e instanceof Jodit||e.isJodit))}},44998:function(e,t,i){"use strict";var o=i(85932);i.d(t,["isLicense",0,e=>(0,o.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 n}});var o=i(23211);function n(e){return o.Dom.isMarker(e)}},23283:function(e,t,i){"use strict";function o(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 o}})},72412:function(e,t,i){"use strict";function o(e){return"number"==typeof e&&!isNaN(e)&&isFinite(e)}i.d(t,{isNumber:function(){return o}})},70222:function(e,t,i){"use strict";i.d(t,{isNumeric:function(){return n}});var o=i(85932);function n(e){if((0,o.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 n}});var o=i(3513);function n(e){return!(!e||"object"!=typeof e||e.nodeType||(0,o.isWindow)(e))&&!(e.constructor&&!({}).hasOwnProperty.call(e.constructor.prototype,"isPrototypeOf"))}},52100:function(e,t,i){"use strict";function o(e){return e&&"function"==typeof e.then}i.d(t,{isPromise:function(){return o}})},3213:function(e,t,i){"use strict";i.d(t,{isSet:function(){return n}});var o=i(91565);function n(e){return!!e&&(0,o.isFunction)(e.has)&&(0,o.isFunction)(e.add)&&(0,o.isFunction)(e.delete)}},85932:function(e,t,i){"use strict";i.d(t,{isString:function(){return n},isStringArray:function(){return s}});var o=i(17312);function n(e){return"string"==typeof e}function s(e){return(0,o.isArray)(e)&&n(e[0])}},91764:function(e,t,i){"use strict";i.d(t,{isURL:function(){return n}});var o=i(81937);function n(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=o.globalDocument.createElement("a");return t.href=e,!!t.hostname}},50083:function(e,t,i){"use strict";function o(e){return!!e.length&&!/[^0-9A-Za-zа-яА-ЯЁё\w\-_. ]/.test(e)&&e.trim().length>0}i.d(t,{isValidName:function(){return o}})},31534:function(e,t,i){"use strict";i.d(t,{isViewObject:function(){return n}});var o=i(91565);function n(e){return!!(e&&e instanceof Object&&(0,o.isFunction)(e.constructor)&&e.isView)}},18303:function(e,t,i){"use strict";function o(e){return null==e}i.d(t,{isVoid:function(){return o}})},3513:function(e,t,i){"use strict";function o(e){return null!=e&&e===e.window}i.d(t,{isWindow:function(){return o}})},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),o=parseInt(t[3],10),n=(parseInt(t[4],10)|o<<8|i<<16).toString(16).toUpperCase();for(;n.length<6;)n="0"+n;return t[1]+"#"+n}])},30893:function(e,t,i){"use strict";i.d(t,{applyStyles:function(){return u}});var o=i(81937),n=i(23211),s=i(4040),r=i(7909),a=i(80991),l=i(28723);function c(e){return e.replace(/mso-[a-z-]+:[\s]*[^;]+;/gi,"").replace(/mso-[a-z-]+:[\s]*[^";']+$/gi,"").replace(/border[a-z-]*:[\s]*[^;]+;/gi,"").replace(/([0-9.]+)(pt|cm)/gi,(e,t,i)=>{switch(i.toLowerCase()){case"pt":return(1.328*parseFloat(t)).toFixed(0)+"px";case"cm":return(.02645833*parseFloat(t)).toFixed(0)+"px"}return e})}function u(e){let t=/<html(?:\s[^>]*)?>/i.exec(e);if(!t)return e;let i=(e=e.substring(t.index)).toLowerCase().lastIndexOf("</html>");-1!==i&&(e=e.substring(0,i+7));let u=o.globalDocument.createElement("iframe");(0,a.css)(u,"display","none"),n.Dom.append(o.globalDocument.body,u);let h="";try{let t=u.contentDocument||(u.contentWindow?u.contentWindow.document:null);if(t){t.open(),t.write(e),t.close(),n.Dom.each(t.body,e=>{n.Dom.isElement(e)&&/mso-list:\s*ignore/i.test((0,r.attr)(e,"style")||"")&&n.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,l.$$)(i[e].selectorText,t.body).forEach(t=>{t.style.cssText=c(i[e].style.cssText+";"+t.style.cssText)})}}catch(e){if(!o.IS_PROD)throw e}n.Dom.each(t.body,e=>{if(n.Dom.isElement(e)){let t=(0,r.attr)(e,"style");t&&(e.style.cssText=c(t)),(0,r.attr)(e,"style")||(0,r.attr)(e,"style",null)}}),h=t.firstChild?(0,s.trim)(t.body.innerHTML):""}}catch{}finally{n.Dom.safeRemove(u)}return h&&(e=h),(0,s.trim)(e.replace(/<(\/)?(html|colgroup|col|o:p)[^>]*>/g,"").replace(/<!--[^>]*>/g,""))}},1277:function(e,t,i){"use strict";i.d(t,{cleanFromWord:function(){return l}});var o=i(81937),n=i(23211),s=i(88475),r=i(4040),a=i(7909);function l(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=o.globalDocument.createElement("div");i.innerHTML=e;let r=[];i.firstChild&&n.Dom.each(i,e=>{if(e)switch(e.nodeType){case Node.ELEMENT_NODE:switch(e.nodeName){case"STYLE":case"LINK":case"META":r.push(e);break;case"W:SDT":case"W:SDTPR":case"FONT":n.Dom.unwrap(e);break;default:if(/mso-list:\s*ignore/i.test((0,a.attr)(e,"style")||"")){r.push(e);break}(0,s.toArray)(e.attributes).forEach(t=>{-1===["src","href","rel","content"].indexOf(t.name.toLowerCase())&&(0,a.attrRaw)(e,t.name,null)})}break;case Node.TEXT_NODE:break;default:r.push(e)}}),n.Dom.safeRemove.apply(null,r),t=i.innerHTML}catch(e){}return t&&(e=t),(e=e.split(/(\n)/).filter(r.trim).join(`
10
+ `)).replace(/<(\/)?(html|colgroup|col|o:p)[^>]*>/g,"").replace(/<!--[^>]*>/g,"")}},6609:function(e,t,i){"use strict";i.d(t,{htmlspecialchars:function(){return n}});var o=i(81937);function n(e){let t=o.globalDocument.createElement("div");return t.textContent=e,t.innerHTML}},82658:function(e,t,i){"use strict";i.d(t,{applyStyles:function(){return o.applyStyles},cleanFromWord:function(){return n.cleanFromWord},htmlspecialchars:function(){return s.htmlspecialchars},nl2br:function(){return r.nl2br},safeHTML:function(){return a.safeHTML},sanitizeHTMLElement:function(){return a.sanitizeHTMLElement},stripTags:function(){return l.stripTags}});var o=i(30893),n=i(1277),s=i(6609),r=i(48838),a=i(48155),l=i(22852)},48838:function(e,t,i){"use strict";function o(e){return e.replace(/\r\n|\r|\n/g,"<br/>")}i.d(t,{nl2br:function(){return o}})},48155:function(e,t,i){"use strict";i.d(t,{safeHTML:function(){return l},sanitizeHTMLElement:function(){return f}});var o=i(23211),n=i(93640),s=i(7909);let r=new Set(["foreignobject","annotation-xml","desc","title"]),a=e=>!!(e&&/^(math|svg)$/i.test(e.nodeName));function l(e,t){if(!o.Dom.isElement(e)&&!o.Dom.isFragment(e))return;let i=[];for(let t of(o.Dom.each(e,e=>{o.Dom.isElement(e)&&o.Dom.up(e.parentNode,a)&&i.push(e)}),i))o.Dom.isOrContains(e,t)&&function(e){if("http://www.w3.org/1999/xhtml"!==e.namespaceURI||null==o.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(r.has(e))return!1}return!0}(t)&&o.Dom.safeRemove(t);let s=t.removeEventAttributes??t.removeOnError,l=e=>{if(o.Dom.isElement(e)&&(s&&c(e),f(e,t),t.safeLinksTarget&&"A"===e.nodeName&&"_blank"===(0,n.attr)(e,"target"))){let t=((0,n.attr)(e,"rel")||"").split(/\s+/).filter(Boolean);t.includes("noopener")||t.push("noopener"),t.includes("noreferrer")||t.push("noreferrer"),(0,n.attr)(e,"rel",t.join(" "))}};l(e),o.Dom.each(e,l)}function c(e){if(!o.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 o of i)(0,s.attrRaw)(e,o,null),t=!0;return t}let u=["src","data","action","formaction","poster","background","xlink:href"],h=new Set(["iframe","frame","object","embed"]);function d(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)&&h.has(t)}function f(e,{safeJavaScriptLink:t,removeOnError:i,removeEventAttributes:r}={safeJavaScriptLink:!0,removeOnError:!0}){if(!o.Dom.isElement(e))return!1;let a=!1;r&&c(e)&&(a=!0),i&&e.hasAttribute("onerror")&&((0,n.attr)(e,"onerror",null),a=!0);let l=e.nodeName.toLowerCase(),h=(0,n.attr)(e,"href");if(t&&h&&d(h,l)){let t="u">typeof location?location.protocol:"http:";(0,n.attr)(e,"href",t+"//"+h),a=!0}if(t)for(let t of(e.hasAttribute("srcdoc")&&((0,n.attr)(e,"srcdoc",null),a=!0),u)){let i=(0,s.attrRaw)(e,t);i&&d(i,l)&&((0,n.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,u=!1){let h=i.createElement("div");(0,n.isString)(t)?h.innerHTML=t:o.Dom.append(h,t);let d=[];return o.Dom.each(h,e=>{o.Dom.isElement(e)&&d.push(e)}),d.forEach(t=>{if(!t.parentNode)return;if(c&&o.Dom.isTag(t,c)){let n=t.nodeName.toLowerCase(),s=o.Dom.isTag(t,l)?`%%%jodit-single-${n}%%%`:`%%%jodit-${n}%%%${e(t.innerHTML,i,c,u)}%%%/jodit-${n}%%%`;o.Dom.before(t,i.createTextNode(s)),o.Dom.safeRemove(t);return}if(o.Dom.isTag(t,a))return void o.Dom.safeRemove(t);if(!o.Dom.isTag(t,r))return;let n=t.nextSibling;!(o.Dom.isText(n)&&/^\s/.test(n.nodeValue||""))&&n&&o.Dom.before(n,i.createTextNode(u?"%%%jodit-single-br%%%":" "))}),(0,s.trim)(h.innerText).replace(/%%%(\/)?jodit(-single)?-([\w\n]+)%%%/g,(e,t,i,o)=>`<${t?"/":""}${o}>`)}}});var o=i(23211),n=i(85932),s=i(4040);let r=new Set(["div","p","br","h1","h2","h3","h4","h5","h6","hr"]),a=new Set(["script","style"]),l=new Set(["br","hr","input"])},65946:function(e,t,i){"use strict";i.r(t),i.d(t,{CamelCaseToKebabCase:function(){return u.CamelCaseToKebabCase},NUMBER_FIELDS_REG:function(){return l.NUMBER_FIELDS_REG},applyStyles:function(){return a.applyStyles},asArray:function(){return o.asArray},camelCase:function(){return u.camelCase},cleanFromWord:function(){return a.cleanFromWord},clearTimeout:function(){return n.clearTimeout},colorToHex:function(){return r.colorToHex},fuzzySearchIndex:function(){return u.fuzzySearchIndex},getContentWidth:function(){return c.getContentWidth},getFixedPositionOffset:function(){return c.getFixedPositionOffset},getScrollParent:function(){return c.getScrollParent},hasBrowserColorPicker:function(){return s.hasBrowserColorPicker},hasContainer:function(){return s.hasContainer},htmlspecialchars:function(){return a.htmlspecialchars},i18n:function(){return u.i18n},innerWidth:function(){return c.innerWidth},isAbortError:function(){return s.isAbortError},isArray:function(){return s.isArray},isBoolean:function(){return s.isBoolean},isDestructable:function(){return s.isDestructable},isEqual:function(){return s.isEqual},isFastEqual:function(){return s.isFastEqual},isFunction:function(){return s.isFunction},isHTML:function(){return s.isHTML},isHtmlFromWord:function(){return s.isHtmlFromWord},isInitable:function(){return s.isInitable},isInt:function(){return s.isInt},isJoditObject:function(){return s.isJoditObject},isLicense:function(){return s.isLicense},isMarker:function(){return s.isMarker},isNativeFunction:function(){return s.isNativeFunction},isNumber:function(){return s.isNumber},isNumeric:function(){return s.isNumeric},isPlainObject:function(){return s.isPlainObject},isPromise:function(){return s.isPromise},isSet:function(){return s.isSet},isString:function(){return s.isString},isStringArray:function(){return s.isStringArray},isURL:function(){return s.isURL},isValidName:function(){return s.isValidName},isViewObject:function(){return s.isViewObject},isVoid:function(){return s.isVoid},isWindow:function(){return s.isWindow},kebabCase:function(){return u.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 c.offset},position:function(){return c.position},safeHTML:function(){return a.safeHTML},sanitizeHTMLElement:function(){return a.sanitizeHTMLElement},setTimeout:function(){return n.setTimeout},size:function(){return c.size},splitArray:function(){return o.splitArray},sprintf:function(){return u.sprintf},stringify:function(){return u.stringify},stripTags:function(){return a.stripTags},toArray:function(){return o.toArray},trim:function(){return u.trim},trimChars:function(){return u.trimChars},trimInv:function(){return u.trimInv},ucfirst:function(){return u.ucfirst}});var o=i(45664),n=i(61077),s=i(28686),r=i(93387),a=i(82658),l=i(97022),c=i(86878),u=i(97642),h=i(93640),d={};for(var f in h)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","nl2br","safeHTML","sanitizeHTMLElement","stripTags","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","ucfirst"].indexOf(f)&&(d[f]=(function(e){return h[e]}).bind(0,f));i.d(t,d)},97022:function(e,t,i){"use strict";i.d(t,{NUMBER_FIELDS_REG:function(){return n.NUMBER_FIELDS_REG},normalizeColor:function(){return o.normalizeColor},normalizeCssNumericValue:function(){return n.normalizeCssNumericValue},normalizeCssValue:function(){return n.normalizeCssValue},normalizeKeyAliases:function(){return s.normalizeKeyAliases},normalizeLicense:function(){return r.normalizeLicense},normalizePath:function(){return a.normalizePath},normalizeRelativePath:function(){return l.normalizeRelativePath},normalizeSize:function(){return c.normalizeSize},normalizeUrl:function(){return u.normalizeUrl}});var o=i(77367),n=i(19147),s=i(27978),r=i(49663),a=i(18377),l=i(96340),c=i(98831),u=i(48009)},77367:function(e,t,i){"use strict";var o=i(93387),n=i(4040);i.d(t,["normalizeColor",0,e=>{let t=["#"],i=(0,o.colorToHex)(e);if(!i)return!1;if(3===(i=(i=(0,n.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 c}});var o=i(70222),n=i(18303),s=i(93387),r=i(74264);let a=/^(left|top|bottom|right|width|min|max|height|margin|padding|fontsize|font-size)/i;function l(e,t){return!(0,n.isVoid)(t)&&a.test(e)&&(0,o.isNumeric)(t.toString())?parseInt(t.toString(),10)+"px":t}function c(e,t){if("font-weight"===(0,r.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,o.isNumeric)(t)?Number(t):t}return/color/i.test(e)&&/^rgb/i.test(t.toString())&&(0,s.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 s}});var o=i(81937),n=i(4040);function s(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,n.trim)(e.toLowerCase())).map(e=>o.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 o=i(4040);i.d(t,["normalizePath",0,(...e)=>e.filter(e=>(0,o.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 o(e){let t=e.ownerDocument?.defaultView,i=e.parentElement;for(;t&&i;){var o;if(""!==(o=t.getComputedStyle(i)).transform&&"none"!==o.transform||""!==o.perspective&&"none"!==o.perspective||""!==o.filter&&"none"!==o.filter||"transform"===o.willChange||"perspective"===o.willChange||"filter"===o.willChange||"paint"===o.contain||"layout"===o.contain||"strict"===o.contain||"content"===o.contain){let e=i.getBoundingClientRect();return{x:e.left,y:e.top}}i=i.parentElement}return{x:0,y:0}}i.d(t,{getFixedPositionOffset:function(){return o}})},34027:function(e,t,i){"use strict";i.d(t,{getScrollParent:function(){return function e(t){if(!t)return null;let i=n.Dom.isHTMLElement(t),r=i&&(0,s.css)(t,"overflowY");return i&&"visible"!==r&&"hidden"!==r&&t.scrollHeight>=t.clientHeight?t:e(t.parentNode)||o.globalDocument.scrollingElement||o.globalDocument.body}}});var o=i(81937),n=i(23211),s=i(93640)},86878:function(e,t,i){"use strict";i.d(t,{getContentWidth:function(){return o.getContentWidth},getFixedPositionOffset:function(){return n.getFixedPositionOffset},getScrollParent:function(){return s.getScrollParent},innerWidth:function(){return r.innerWidth},offset:function(){return l.offset},position:function(){return c.position},size:function(){return a.size}});var o=i(54447),n=i(2373),s=i(34027),r=i(83215),a=i(18073),l=i(69143),c=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 n}});var o=i(28686);function n(e){return(0,o.isString)(e)||(0,o.isArray)(e)?e.length:(0,o.isPlainObject)(e)?Object.keys(e).length:0}},69143:function(e,t,i){"use strict";let o=(e,t,i,n=!1)=>{let s,r,a;try{s=e.getBoundingClientRect()}catch(e){s={top:0,bottom:0,left:0,right:0,width:0,height:0}}let l=i.body,c=i.documentElement||{clientTop:0,clientLeft:0,scrollTop:0,scrollLeft:0},u=i.defaultView||i.parentWindow,h=u.pageYOffset||c.scrollTop||l.scrollTop,d=u.pageXOffset||c.scrollLeft||l.scrollLeft,f=c.clientTop||l.clientTop||0,p=c.clientLeft||l.clientLeft||0,m=t.iframe;if(!n&&t&&t.options&&t.o.iframe&&m){let{top:e,left:i}=o(m,t,t.od,!0);r=s.top+e,a=s.left+i}else r=s.top+h-f,a=s.left+d-p;return{top:Math.round(r),left:Math.round(a),width:s.width,height:s.height}};i.d(t,["offset",0,o])},23599:function(e,t,i){"use strict";i.d(t,{position:function(){return function e(t,i,n=!1){let s=t.getBoundingClientRect(),r=s.left,a=s.top;if((0,o.isJoditObject)(i)&&i.iframe&&i.ed.body.contains(t)&&!n){let{left:t,top:o}=e(i.iframe,i,!0);r+=t,a+=o}return{left:Math.round(r),top:Math.round(a),width:Math.round(t.offsetWidth??s.width),height:Math.round(t.offsetHeight??s.height)}}}});var o=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 n}});var o=i(81937);function n(e,t,i=0,s=1){let r=0,a,l=-1,c=0,u=0;for(a=i;r<e.length&&a<t.length;)e[r].toLowerCase()===t[a].toLowerCase()?(r++,c++,u=0,-1===l&&(l=a)):r>0&&(u>=s&&t[a]!==o.INVISIBLE_SPACE?(r=0,l=-1,c=0,u=0,a--):(u++,c++)),a++;return r===e.length?[l,c]:[-1,0]}},18080:function(e,t,i){"use strict";i.d(t,{i18n:function(){return c}});var o=i(81937),n=i(85932),s=i(99436),r=i(93640),a=i(5266);let l=(e,t)=>{if(!t||!t.length)return e;let i=/%([sd])/g,o=i.exec(e),n=e,s=0;for(;o&&void 0!==t[s];)n=n.replace(o[0],t[s].toString()),s+=1,o=i.exec(e);return n};function c(e,t,i){if(!(0,n.isString)(e))throw(0,r.error)("i18n: Need string in first argument");if(!e.length)return e;let c=!!i?.debugLanguage,u={},h=e=>t&&t.length?l(e,t):e,d=(0,r.defaultLanguage)(a.Config.defaultOptions.language,a.Config.defaultOptions.language),f=(0,r.defaultLanguage)(i?.language,d),p=t=>{if(!t)return;if((0,n.isString)(t[e]))return h(t[e]);let i=e.toLowerCase();if((0,n.isString)(t[i]))return h(t[i]);let o=(0,s.ucfirst)(e);if((0,n.isString)(t[o]))return h(t[o])};void 0!==o.lang[f]?u=o.lang[f]:c||(u=void 0!==o.lang[d]?o.lang[d]:o.lang.en);let m=i?.i18n;if(m&&m[f]){let e=p(m[f]);if(e)return e}return p(u)||(!c&&o.lang.en&&(0,n.isString)(o.lang.en[e])&&o.lang.en[e]?h(o.lang.en[e]):c?"{"+e+"}":(o.IS_PROD,h(e)))}i.d(t,["sprintf",0,l])},97642:function(e,t,i){"use strict";i.d(t,{CamelCaseToKebabCase:function(){return r.CamelCaseToKebabCase},camelCase:function(){return o.camelCase},fuzzySearchIndex:function(){return n.fuzzySearchIndex},i18n:function(){return s.i18n},kebabCase:function(){return r.kebabCase},sprintf:function(){return s.sprintf},stringify:function(){return a.stringify},trim:function(){return l.trim},trimChars:function(){return l.trimChars},trimInv:function(){return l.trimInv},ucfirst:function(){return c.ucfirst}});var o=i(57821),n=i(57626),s=i(18080),r=i(74264),a=i(3347),l=i(4040),c=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 o(e,t={}){if("object"!=typeof e)return e+"";let i=new Set(t.excludeKeys),n=new WeakMap;return JSON.stringify(e,(e,t)=>{if(!i.has(e)){if("object"==typeof t&&null!=t){if(n.get(t))return"[refObject]";n.set(t,!0)}return t}},t.prettify)}i.d(t,{stringify:function(){return o}})},4040:function(e,t,i){"use strict";i.d(t,{trim:function(){return n},trimChars:function(){return s},trimInv:function(){return r}});var o=i(81937);function n(e){return e.replace((0,o.SPACE_REG_EXP_END)(),"").replace((0,o.SPACE_REG_EXP_START)(),"")}function s(e,t){return e.replace(RegExp(`[${t}]+$`),"").replace(RegExp(`^[${t}]+`),"")}function r(e){return e.replace((0,o.INVISIBLE_SPACE_REG_EXP_END)(),"").replace((0,o.INVISIBLE_SPACE_REG_EXP_START)(),"")}},99436:function(e,t,i){"use strict";function o(e){return e.length?e[0].toUpperCase()+e.substring(1):""}i.d(t,{ucfirst:function(){return o}})},16849:function(e,t,i){"use strict";i.d(t,{alignElement:function(){return u},clearAlign:function(){return l},getHAlign:function(){return a},hAlignElement:function(){return function e(t,i,o){if(o){e(t,"normal"),Object.values(o).forEach(e=>t.classList.remove(...r(e))),t.classList.add(...r(o[i||"normal"])),["class","style"].forEach(e=>{(0,n.attr)(t,e)?.trim()||(0,n.attr)(t,e,null)});return}i&&"normal"!==i?"center"!==i?((0,s.css)(t,"float",i),(0,s.clearCenterAlign)(t)):(0,s.css)(t,{float:"",display:"block",marginLeft:"auto",marginRight:"auto"}):((0,s.css)(t,"float")&&-1!==["right","left"].indexOf((0,s.css)(t,"float").toString().toLowerCase())&&(0,s.css)(t,"float",""),(0,s.clearCenterAlign)(t))}}});var o=i(27795),n=i(7909),s=i(80991);let r=e=>(e??"").split(/\s+/).filter(Boolean);function a(e,t){if(t)for(let i of["left","right","center","normal"]){let o=r(t[i]);if(o.length&&o.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 l(e){o.Dom.each(e,e=>{o.Dom.isHTMLElement(e)&&(0,s.cssInline)(e,"textAlign")&&((0,s.css)(e,"textAlign",""),((0,n.attr)(e,"style")||"").trim().length||(0,n.attr)(e,"style",null))})}let c=new Map([["justifyfull","justify"],["justifyright","right"],["justifyleft","left"],["justifycenter","center"]]);function u(e,t){if(o.Dom.isNode(t)&&o.Dom.isElement(t)){l(t);let i=c.get(e.toLowerCase());i&&(0,s.css)(t,"textAlign",i)}}},47760:function(e,t,i){"use strict";i.d(t,{loadNext:function(){return function e(t,i,o=0){return(0,n.isString)(i[o])?c(t,i[o]).then(()=>e(t,i,o+1)):Promise.resolve()}},loadNextStyle:function(){return function e(t,i,o=0){return(0,n.isString)(i[o])?u(t,i[o]).then(()=>e(t,i,o+1)):Promise.resolve()}}});var o=i(23211),n=i(85932),s=i(7909),r=i(91321);let a=new Map,l=e=>(t,i)=>{if(a.has(i))return a.get(i);let o=e(t,i);return a.set(i,o),o},c=l((e,t)=>e.async.promise((i,n)=>{if(e.isInDestruct)return n();let a=e.c.element("script",{type:"text/javascript",crossorigin:"anonymous",referrerpolicy:"no-referrer",async:!0,src:(0,r.completeUrl)(t)});e.o.nonce&&(0,s.attr)(a,"nonce",e.o.nonce),e.e.one(a,"error",n).one(a,"load",i),o.Dom.append(e.od.body,a)})),u=l((e,t)=>e.async.promise((i,n)=>{if(e.isInDestruct)return n();let a=e.c.element("link",{rel:"stylesheet",media:"all",crossorigin:"anonymous"});e.o.nonce&&(0,s.attr)(a,"nonce",e.o.nonce),e.isInDestruct||e.e.on(a,"load",()=>i(a)).on(a,"error",n),(0,s.attr)(a,"href",(0,r.completeUrl)(t)),e.o.shadowRoot?o.Dom.append(e.o.shadowRoot,a):o.Dom.append(e.od.body,a)}));i.d(t,["alreadyLoadedList",0,a,"appendScriptAsync",0,c,"appendStyleAsync",0,u])},7909:function(e,t,i){"use strict";i.d(t,{attr:function(){return function e(t,i,l){if(!t||!(0,o.isFunction)(t.getAttribute))return null;if(!(0,s.isString)(i))return Object.keys(i).forEach(o=>{let s=i[o];(0,n.isPlainObject)(s)&&"style"===o?(0,a.css)(t,s):("className"===o&&(o="class"),e(t,o,s))}),null;let c=(0,r.CamelCaseToKebabCase)(i);if(/^-/.test(c)){let i=e(t,"data"+c);if(i)return i;c=c.substr(1)}if(void 0!==l)if(null==l)t.hasAttribute(c)&&t.removeAttribute(c);else{let e=l.toString();return"IMG"===t.nodeName&&("width"===c||"height"===c)&&(e=e.replace("px","")),t.setAttribute(c,e),e}return t.getAttribute(c)}},attrRaw:function(){return l}});var o=i(91565),n=i(62101),s=i(85932),r=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 o=i(62101);let n=(e,t)=>{let i=[],s=encodeURIComponent;for(let r in e)if(Object.prototype.hasOwnProperty.call(e,r)){let a=t?t+"["+r+"]":r,l=e[r];i.push((0,o.isPlainObject)(l)?n(l,a):s(a)+"="+s(l))}return i.join("&")};i.d(t,["buildQuery",0,n])},91321:function(e,t,i){"use strict";var o=i(81937);i.d(t,["completeUrl",0,e=>("file:"===o.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,u.keys)(t,!1).reduce((i,o)=>(i[o]=(0,n.isPlainObject)(t[o])?e(t[o]):t[o],i),{})}},ConfigFlatten:function(){return h},ConfigMerge:function(){return function e(t,i){Object.keys(i).forEach(o=>{if((0,c.isUnsafeProtoKey)(o))return;let s=i[o],r=t[o];(0,n.isPlainObject)(s)&&(0,n.isPlainObject)(r)&&!(0,l.isAtom)(s)?e(r,s):t[o]=s})}},ConfigProto:function(){return function e(t,i,u=0){if(Object.getPrototypeOf(t)!==Object.prototype)return t;let h=a.Config.defaultOptions;if((0,s.isString)(t.preset)){if(void 0!==h.presets[t.preset]){let e=h.presets[t.preset];Object.keys(e).forEach(i=>{(0,r.isVoid)(t[i])&&(t[i]=e[i])})}delete t.preset}let d={};return Object.keys(t).forEach(s=>{if((0,c.isUnsafeProtoKey)(s))return;let r=t[s],a=i?i[s]:null;if((0,n.isPlainObject)(r)&&(0,n.isPlainObject)(a)&&!(0,l.isAtom)(r)){d[s]=e(r,a,u+1);return}if(0!==u&&(0,o.isArray)(r)&&!(0,l.isAtom)(r)&&(0,o.isArray)(a)){d[s]=[...r,...a.slice(r.length)];return}d[s]=r}),Object.setPrototypeOf(d,i),d}}});var o=i(17312),n=i(62101),s=i(85932),r=i(18303),a=i(5266),l=i(54794),c=i(78048),u=i(71125);function h(e){return(0,u.keys)(e,!1).reduce((t,i)=>(t[i]=e[i],t),{})}},3856:function(e,t,i){"use strict";var o=i(81937),n=i(91764),s=i(36310);i.d(t,["convertMediaUrlToVideoEmbed",0,(e,{width:t=400,height:i=345}={})=>{if(!(0,n.isURL)(e))return e;let r=o.globalDocument.createElement("a");r.href=e,t||(t=400),i||(i=345);let a=r.protocol||"";switch(r.hostname){case"www.vimeo.com":case"vimeo.com":{let o=r.pathname.split("/").filter(Boolean),n=o.findIndex(e=>/^\d+$/.test(e));if(-1===n)return e;let s=o[n],l=o[n+1];return l&&0===n&&(s+="/"+l),'<iframe width="'+t+'" height="'+i+'" src="'+a+"//player.vimeo.com/video/"+s+'" 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 o=(r.search?(0,s.parseQuery)(r.search):{}).v||r.pathname.substring(1);return(o=o.replace(/^(watch|embed|shorts|live|v)\//,"").replace(/\/$/,""))?'<iframe width="'+t+'" height="'+i+'" src="'+a+"//www.youtube.com/embed/"+o+'" frameborder="0" allowfullscreen></iframe>':e}}return e}])},80991:function(e,t,i){"use strict";i.d(t,{css:function(){return l},cssInline:function(){return c}});var o=i(22289),n=i(62101),s=i(19147),r=i(57821),a=i(74264);function l(e,t,i,c=!1){if((0,o.isBoolean)(i)&&(c=i,i=void 0),(0,n.isPlainObject)(t)||void 0!==i){let o=(e,t,i)=>{void 0!==(i=(0,s.normalizeCssNumericValue)(t,i))&&(null==i||l(e,t,!0)!==(0,s.normalizeCssValue)(t,i))&&(e.style[t]=i)};if((0,n.isPlainObject)(t)){let i=Object.keys(t);for(let n=0;n<i.length;n+=1)o(e,(0,r.camelCase)(i[n]),t[i[n]])}else o(e,(0,r.camelCase)(t),i);return""}let u=(0,a.kebabCase)(t),h=e.ownerDocument||document,d=!!h&&(h.defaultView||h.parentWindow),f=e.style[t],p="";return void 0!==f&&""!==f?p=f:d&&!c&&(p=d.getComputedStyle(e).getPropertyValue(u)),s.NUMBER_FIELDS_REG.test(t)&&/^[-+]?[0-9.]+px$/.test(p.toString())&&(p=parseInt(p.toString(),10)),(0,s.normalizeCssValue)(t,p)}function c(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 o=i(31534);let n=new WeakMap;i.d(t,["dataBind",0,(e,t,i)=>{let s=n.get(e);if(!s){s={},n.set(e,s);let t=null;(0,o.isViewObject)(e.j)&&(t=e.j.e),(0,o.isViewObject)(e)&&(t=e.e),t&&t.on("beforeDestruct",()=>{n.delete(e)})}return void 0===i?s[t]:(s[t]=i,i)}])},97228:function(e,t,i){"use strict";var o=i(81937),n=i(85932);i.d(t,["defaultLanguage",0,(e,t="en")=>"auto"!==e&&(0,n.isString)(e)?e:o.globalDocument.documentElement&&o.globalDocument.documentElement.lang?o.globalDocument.documentElement.lang:navigator.language?navigator.language.substring(0,2):t])},38027:function(e,t,i){"use strict";i.d(t,{connection:function(){return s},error:function(){return n},options:function(){return r}});var o=i(29953);function n(e){return TypeError(e)}function s(e){return new o.ConnectionError(e)}function r(e){return new o.OptionsError(e)}},14228:function(e,t,i){"use strict";function o(e="Aborted"){return new DOMException(e,"AbortError")}i.d(t,{abort:function(){return o}})},58250:function(e,t,i){"use strict";i.d(t,{ConnectionError:function(){return o}});class o extends Error{constructor(e){super(e),Object.setPrototypeOf(this,o.prototype)}}},29953:function(e,t,i){"use strict";i.d(t,{ConnectionError:function(){return n.ConnectionError},OptionsError:function(){return s.OptionsError},abort:function(){return o.abort}});var o=i(14228),n=i(58250),s=i(11080)},11080:function(e,t,i){"use strict";i.d(t,{OptionsError:function(){return o}});class o extends TypeError{constructor(e){super(e),Object.setPrototypeOf(this,o.prototype)}}},33201:function(e,t,i){"use strict";i.d(t,{ConnectionError:function(){return n.ConnectionError},OptionsError:function(){return n.OptionsError},abort:function(){return n.abort},connection:function(){return o.connection},error:function(){return o.error},options:function(){return o.options}});var o=i(38027),n=i(29953)},54794:function(e,t,i){"use strict";i.d(t,{fastClone:function(){return r},isAtom:function(){return n},markAsAtomic:function(){return s}});var o=i(3347);function n(e){return e&&e.isAtom}function s(e){return Object.defineProperty(e,"isAtom",{enumerable:!1,value:!0,configurable:!1}),e}function r(e){return JSON.parse((0,o.stringify)(e))}},421:function(e,t,i){"use strict";var o=i(91565);let n=new Map;i.d(t,["getClassName",0,e=>{if((0,o.isFunction)(e.className))return e.className();let t=e.constructor?.originalConstructor||e.constructor;if(n.has(t))return n.get(t);if(t.name)return t.name;let i=new RegExp(/^\s*function\s*(\S*)\s*\(/),s=t.toString().match(i);return s?s[1]:""},"keepNames",0,n])},89308:function(e,t,i){"use strict";i.d(t,{get:function(){return s}});var o=i(85932),n=i(18303);function s(e,t){if(!(0,o.isString)(e)||!e.length)return null;let i=e.split("."),s=t;try{for(let e of i){if((0,n.isVoid)(s[e]))return null;s=s[e]}}catch{return null}return(0,n.isVoid)(s)?null:s}},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"],o=parseFloat(e.substr(0,e.length-2));return -1!==i.indexOf(t)?o*Math.pow(1024,i.indexOf(t)+1):parseInt(e,10)}])},93640:function(e,t,i){"use strict";i.r(t),i.d(t,{$$:function(){return x.$$},ConfigDeepFlatten:function(){return d.ConfigDeepFlatten},ConfigFlatten:function(){return d.ConfigFlatten},ConfigMerge:function(){return d.ConfigMerge},ConfigProto:function(){return d.ConfigProto},ConnectionError:function(){return v.ConnectionError},LimitedStack:function(){return P.LimitedStack},OptionsError:function(){return v.OptionsError},UNSAFE_PROTO_KEYS:function(){return C.UNSAFE_PROTO_KEYS},abort:function(){return v.abort},alignElement:function(){return o.alignElement},alreadyLoadedList:function(){return n.alreadyLoadedList},appendScriptAsync:function(){return n.appendScriptAsync},appendStyleAsync:function(){return n.appendStyleAsync},attr:function(){return l.attr},attrRaw:function(){return l.attrRaw},browser:function(){return c.browser},buildQuery:function(){return u.buildQuery},call:function(){return A.call},callPromise:function(){return A.callPromise},callThis:function(){return A.callThis},clearAlign:function(){return o.clearAlign},clearCenterAlign:function(){return p.clearCenterAlign},cns:function(){return E.cns},completeUrl:function(){return h.completeUrl},connection:function(){return v.connection},convertMediaUrlToVideoEmbed:function(){return f.convertMediaUrlToVideoEmbed},css:function(){return p.css},cssInline:function(){return p.cssInline},cssPath:function(){return x.cssPath},ctrlKey:function(){return m.ctrlKey},dataBind:function(){return g.dataBind},defaultLanguage:function(){return _.defaultLanguage},error:function(){return v.error},fastClone:function(){return b.fastClone},get:function(){return y.get},getClassName:function(){return w.getClassName},getDataTransfer:function(){return A.getDataTransfer},getHAlign:function(){return o.getHAlign},getPropertyDescriptor:function(){return A.getPropertyDescriptor},getXPathByElement:function(){return x.getXPathByElement},hAlignElement:function(){return o.hAlignElement},humanSizeToBytes:function(){return S.humanSizeToBytes},inView:function(){return T.inView},isAtom:function(){return b.isAtom},isUnsafeProtoKey:function(){return C.isUnsafeProtoKey},keepNames:function(){return w.keepNames},keys:function(){return A.keys},loadImage:function(){return A.loadImage},loadNext:function(){return n.loadNext},loadNextStyle:function(){return n.loadNextStyle},markAsAtomic:function(){return b.markAsAtomic},markDeprecated:function(){return E.markDeprecated},markOwner:function(){return A.markOwner},memorizeExec:function(){return A.memorizeExec},options:function(){return v.options},parseQuery:function(){return D.parseQuery},previewBox:function(){return I.previewBox},refs:function(){return x.refs},reset:function(){return k.reset},resolveElement:function(){return x.resolveElement},scrollIntoViewIfNeeded:function(){return T.scrollIntoViewIfNeeded},set:function(){return j.set}});var o=i(16849),n=i(47760),s=i(28712),r={};for(var a in s)0>["default","alignElement","clearAlign","getHAlign","hAlignElement","alreadyLoadedList","appendScriptAsync","appendStyleAsync","loadNext","loadNextStyle"].indexOf(a)&&(r[a]=(function(e){return s[e]}).bind(0,a));i.d(t,r);var l=i(7909),c=i(26136),u=i(36833),h=i(91321),d=i(77483),f=i(3856),p=i(80991),m=i(77213),g=i(36400),_=i(97228),v=i(33201),b=i(54794),y=i(89308),w=i(421),S=i(37427),C=i(78048),E=i(49385),D=i(36310),I=i(57075),k=i(43379),T=i(60898),x=i(28723),j=i(52144),P=i(42820),A=i(71125)},78048:function(e,t,i){"use strict";i.d(t,{isUnsafeProtoKey:function(){return n}});let o=["__proto__","constructor","prototype"];function n(e){return -1!==o.indexOf(e)}i.d(t,["UNSAFE_PROTO_KEYS",0,o])},49385:function(e,t,i){"use strict";i.d(t,{markDeprecated:function(){return n}});let o=console;function n(e,t=[""],i=null){return(...n)=>(o.warn(`Method "${t[0]}" deprecated.`+(t[1]?` Use "${t[1]}" instead`:"")),e.call(i,...n))}i.d(t,["cns",0,o])},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 o=i[e].split("=");t[decodeURIComponent(o[0])]=decodeURIComponent(o[1]||"")}return t}])},57075:function(e,t,i){"use strict";i.d(t,{previewBox:function(){return a}});var o=i(23211),n=i(85932),s=i(7909),r=i(80991);function a(e,t,i="px",l=null){let c=[],u=function(e,t){let i=[],n=[];o.Dom.each(e.editor,e=>{o.Dom.isTag(e,"img")&&n.push(e)});try{n.forEach(n=>{let r=[(0,s.attr)(n,"width"),(0,s.attr)(n,"height"),(0,s.attr)(n,"src")];(0,s.attr)(n,{width:n.offsetWidth+t,height:n.offsetHeight+t});let a=e.createInside.a();o.Dom.append(e.ed.body,a),(0,s.attr)(a,"href",(0,s.attr)(n,"src")||""),(0,s.attr)(n,"src",a.href),o.Dom.safeRemove(a),i.push(()=>{(0,s.attr)(n,{src:r[2],width:r[0]||null,height:r[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 u=e.c.div("jodit__preview-box jodit-context");l&&o.Dom.append(l,u),(0,r.css)(u,{position:"relative",padding:16});let h=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,r.css)(t,{minWidth:800,minHeight:600,border:0}),o.Dom.append(u,t);let i=t.contentWindow;if(i&&(e.e.fire("generateDocumentStructure.iframe",i.document,e),u=i.document.body,"function"==typeof ResizeObserver)){let o=!1,n=i.document.body,s=new ResizeObserver(e.async.debounce(()=>{s.unobserve(n),(0,r.css)(t,"height",n.offsetHeight+20),e.async.requestAnimationFrame(()=>{o||s.observe(n)})},100)),a=()=>{o=!0,s.unobserve(n),s.disconnect(),e.e.off("beforeDestruct",a)};c.push(a),e.e.on("beforeDestruct",a)}}else(0,r.css)(u,{minWidth:1024,minHeight:600,border:0});let d=(t,i)=>{let r=(0,n.isString)(i)?e.c.div():i;(0,n.isString)(i)&&(r.innerHTML=i);for(let e=0;e<r.childNodes.length;e+=1){let i=r.childNodes[e];if(o.Dom.isElement(i)){let e=t.ownerDocument.createElement(i.nodeName);for(let t=0;t<i.attributes.length;t+=1)(0,s.attr)(e,i.attributes[t].name,i.attributes[t].value);0===i.childNodes.length||o.Dom.isTag(i,"table")?"SCRIPT"===i.nodeName?i.textContent&&(e.textContent=i.textContent):i.innerHTML&&(e.innerHTML=i.innerHTML):d(e,i);try{o.Dom.append(t,e)}catch{}}else try{o.Dom.append(t,i.cloneNode(!0))}catch{}}};return d(u,h),e.e.fire("afterPreviewBox",u),[u,()=>{c.forEach(e=>e())}]}finally{u.forEach(e=>e())}}},43379:function(e,t,i){"use strict";i.d(t,{reset:function(){return a}});var o=i(81937),n=i(91565),s=i(89308);let r={};function a(e){if(!(e in r)){let t=o.globalDocument.createElement("iframe");try{if(t.src="about:blank",o.globalDocument.body.appendChild(t),!t.contentWindow)return null;let i=(0,s.get)(e,t.contentWindow),a=(0,s.get)(e.split(".").slice(0,-1).join("."),t.contentWindow);(0,n.isFunction)(i)&&(r[e]=i.bind(a))}catch(e){if(!o.IS_PROD)throw e}finally{t.parentNode?.removeChild(t)}}return r[e]??null}},60898:function(e,t,i){"use strict";i.d(t,{inView:function(){return n},scrollIntoViewIfNeeded:function(){return s}});var o=i(23211);function n(e,t,i){let o=e.getBoundingClientRect(),n=e,s=o.top,r=o.height;for(;n&&n!==t&&n.parentNode;)if(s+r>(o=(n=n.parentNode).getBoundingClientRect()).bottom+1&&s>o.top||s+r<=o.top)return!1;return(s+r<=(i.documentElement&&i.documentElement.clientHeight||0)+1||s<=0)&&s+r>=0}function s(e,t,i){if(o.Dom.isHTMLElement(e)&&!n(e,t,i)){if(t.clientHeight!==t.scrollHeight){let i=e.offsetTop+e.offsetHeight-t.clientHeight;t.scrollTop=t.scrollTop<i?i:e.offsetTop}n(e,t,i)||e.scrollIntoView({block:"nearest"})}}},28723:function(e,t,i){"use strict";i.d(t,{$$:function(){return h},resolveElement:function(){return f}});var o=i(81937),n=i(23211),s=i(88475),r=i(85932),a=i(57821),l=i(7909),c=i(33201);let u=1;function h(e,t){let i;if(!o.IS_ES_NEXT&&/:scope/.test(e)&&o.IS_IE&&!(t&&t.nodeType===Node.DOCUMENT_NODE)){let o=t.id,n=o||"_selector_id_"+(Math.random()+"").slice(2)+ ++u;e=e.replace(/:scope/g,"#"+n),o||t.setAttribute("id",n),i=t.parentNode.querySelectorAll(e),o||t.removeAttribute("id")}else i=t.querySelectorAll(e);return[].slice.call(i)}let d=(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 d(e.parentNode,t)+"/"+e.nodeName.toLowerCase()+(i.length>1?"["+((0,s.toArray)(i).indexOf(e)+1)+"]":"")};function f(e,t){let i=e;if((0,r.isString)(e))try{i=t.querySelector(e)}catch{throw(0,c.error)('String "'+e+'" should be valid HTML selector')}if(!i||"object"!=typeof i||!n.Dom.isElement(i)||!i.cloneNode)throw(0,c.error)('Element "'+e+'" should be string or HTMLElement instance');return i}i.d(t,["cssPath",0,e=>{if(!n.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,o=1;do(t=t.previousElementSibling)&&t.nodeName.toLowerCase()===e&&o++;while(t)e+=":nth-of-type("+o+")"}t.unshift(e),i=i.parentNode}return t.join(" > ")},"getXPathByElement",0,d,"refs",0,e=>{"container"in e&&(e=e.container);let t={};return n.Dom.each(e,e=>{if(n.Dom.isElement(e)&&(e.hasAttribute("ref")||e.hasAttribute("data-ref"))){let i=(0,l.attr)(e,"-ref");i&&(0,r.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 o=i(17312),n=i(70222),s=i(62101),r=i(85932),a=i(78048);function l(e,t,i){if(!(0,r.isString)(e)||!e.length)return;let l=e.split(".");if(l.some(a.isUnsafeProtoKey))return;let c=i;for(let e=0;e<l.length-1;e+=1){let t=l[e];(0,o.isArray)(c[t])||(0,s.isPlainObject)(c[t])||(c[t]=(0,n.isNumeric)(l[e+1])?[]:{}),c=c[t]}c&&(c[l[l.length-1]]=t)}},42820:function(e,t,i){"use strict";i.d(t,{LimitedStack:function(){return n}});var o=i(25045);class n{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,o._)(this,"limit",void 0),(0,o._)(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 u},callThis:function(){return l},getPropertyDescriptor:function(){return h},markOwner:function(){return c}});var o=i(52100),n=i(18303),s=i(7909),r=i(36400);function a(e,...t){return e(...t)}function l(e,t,...i){return e.apply(t,i)}function c(e,t){(0,s.attr)(t,"data-editor_id",e.id),t.component||Object.defineProperty(t,"jodit",{value:e})}function u(e,t){return(0,o.isPromise)(e)?e.then(e=>e,()=>null).finally(t):t?.()}function h(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,o)=>{let n=new Image,s=()=>{t.e.off(n),o?.()},r=()=>{t.e.off(n),i(n)};t.e.one(n,"load",r).one(n,"error",s).one(n,"abort",s),n.src=e,n.complete&&r()}),"memorizeExec",0,(e,t,{control:i},o)=>{let s="button"+i.command,a=(i.args&&i.args[0])??(0,r.dataBind)(e,s);if((0,n.isVoid)(a))return!1;(0,r.dataBind)(e,s,a),o&&(a=o(a)),e.execCommand(i.command,!1,a??void 0)}])},55810:function(e,t,i){"use strict";i.d(t,{init:function(){return r}});var o=i(81937),n=i(52433),s=i(3050);function r(e,t,i,r,a,l,c){if((0,n.isInitable)(r))try{r.init(e)}catch(e){if(!o.IS_PROD)throw e}a.set(t,r),l.delete(t),r.hasStyle&&(0,s.loadStyle)(e,t).catch(e=>{o.IS_PROD}),r.styles&&(c(e,t,"style").innerHTML=r.styles)}},3050:function(e,t,i){"use strict";i.d(t,{loadExtras:function(){return u},loadStyle:function(){return l}});var o=i(81937),n=i(74264),s=i(47760),r=i(86189);let a=new Set;async function l(e,t){let i=c(e,t,!1);if(!a.has(i))return a.add(i),(0,s.appendStyleAsync)(e,i)}function c(e,t,i){t=(0,n.kebabCase)(t);let o=e.minified?".min":"";return e.basePath+"plugins/"+t+"/"+t+o+"."+(i?"js":"css")}function u(e,t,i,n){try{let o=i.filter(t=>!e.has((0,r.normalizeName)(t.name)));o.length&&o.map(e=>{let i=e.url||c(t,e.name,!0);return(0,s.appendScriptAsync)(t,i).then(n).catch(()=>null)})}catch(e){if(!o.IS_PROD)throw e}}},25974:function(e,t,i){"use strict";i.d(t,{makeInstance:function(){return s}});var o=i(81937),n=i(91565);function s(e,t){try{try{return(0,n.isFunction)(t)?new t(e):t}catch(i){if((0,n.isFunction)(t)&&!t.prototype)return t(e)}}catch(e){if(!o.IS_PROD)throw e}return null}},86189:function(e,t,i){"use strict";i.d(t,{normalizeName:function(){return n}});var o=i(74264);function n(e){return(0,o.kebabCase)(e).toLowerCase()}},91206:function(e,t,i){"use strict";i.d(t,{Plugin:function(){return o.Plugin}});var o=i(18855);i(85305)},85305:function(e,t,i){"use strict";i.d(t,{PluginSystem:function(){return p}});var o=i(25045),n=i(81937),s=i(42689),r=i(32328),a=i(17312),l=i(52433),c=i(85932),u=i(55810),h=i(3050),d=i(25974),f=i(86189);class p{get size(){return this.__items.size}add(e,t){this.__items.set((0,f.normalizeName)(e),t),s.eventEmitter.fire(`plugin:${e}:ready`)}get(e){return this.__items.get((0,f.normalizeName)(e))}remove(e){this.__items.delete((0,f.normalizeName)(e))}__getFullPluginsList(e){let t=[];return this.__items.forEach((i,o)=>{(!e||e.has(o))&&t.push([o,i])}),t}__init(e){let{extraList:t,disableList:i,filter:o}={extraList:e.o.extraPlugins.map(e=>(0,c.isString)(e)?{name:e}:e),disableList:new Set((0,r.splitArray)(e.o.disablePlugins).map(f.normalizeName)),filter:e.o.safeMode?new Set(e.o.safePluginsList):null},s=new Map,p={},m=new Set;e.__plugins=p;let g=()=>{if(e.isInDestruct)return;let t=!1;this.__getFullPluginsList(o).forEach(([o,n])=>{if(i.has(o)||s.has(o))return;let r=n?.requires;if(r&&(0,a.isArray)(r)&&r.length){if(r.some(e=>i.has(e)))return;if(!r.every(e=>s.has(e)))return void m.add(o)}t=!0;let l=(0,d.makeInstance)(e,n);if(!l){s.set(o,null),m.delete(o);return}(0,u.init)(e,o,n,l,s,m,this.opts.getContainer),p[o]=l}),t&&(e.e.fire("updatePlugins"),g())};t&&t.length&&(0,h.loadExtras)(this.__items,e,t,g),g(),e.e.on("beforeDestruct",()=>{Object.keys(p).forEach(t=>{let i=p[t];(0,l.isDestructable)(i)&&i.destruct(e),delete p[t]}),delete e.__plugins}),n.IS_PROD||m.size}wait(e){return new Promise(t=>{if(this.get(e))return t();let i=()=>{t(),s.eventEmitter.off(`plugin:${e}:ready`,i)};s.eventEmitter.on(`plugin:${e}:ready`,i)})}constructor(e){(0,o._)(this,"opts",void 0),(0,o._)(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 o=i(25045),n=i(31635),s=i(16964),r=i(84839),a=i(24497);class l extends s.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(s.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(s.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,o._)(this,"buttons",[]),(0,o._)(this,"hasStyle",!1),(0,o._)(this,"styles",void 0),(0,o._)(this,"__inited",!1),e.e.on("afterPluginSystemInit",this.__afterPluginSystemInit).on("afterInit",this.__afterInit).on("beforeDestruct",this.__beforeDestruct)}}(0,o._)(l,"requires",[]),(0,n.__decorate)([r.autobind],l.prototype,"__afterPluginSystemInit",null),(0,n.__decorate)([r.autobind],l.prototype,"__afterInit",null),(0,n.__decorate)([r.autobind],l.prototype,"__beforeDestruct",null)},17338:function(e,t,i){"use strict";i.d(t,{Ajax:function(){return d}});var o=i(25045),n=i(31635),s=i(91231),r=i(81937),a=i(49574),l=i(65946),c=i(33201),u=i(5266);i(37102);var h=i(32855);class d{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 r.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}send(){this.__activated=!0;let{xhr:e,o:t}=this,i=this.prepareRequest();return this.__async.promise(async(o,n)=>{let s=()=>{this.__isFulfilled=!0,n(c.connection("Connection error"))},r=()=>{this.__isFulfilled=!0,o(new h.Response(i,e.status,e.statusText,!e.responseType?e.responseText:e.response))};e.onload=r,e.onabort=()=>{this.__isFulfilled=!0,n(c.abort("Abort connection"))},e.onerror=s,e.ontimeout=s,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)?r():e.statusText&&(this.__isFulfilled=!0,n(c.connection(e.statusText))))},e.withCredentials=t.withCredentials??!1;let{url:a,data:u,method:d}=i;e.open(d,a,!0),t.contentType&&e.setRequestHeader&&e.setRequestHeader("Content-type",t.contentType);let{headers:f}=t;(0,l.isFunction)(f)&&(f=await f.call(this)),f&&e.setRequestHeader&&Object.keys(f).forEach(t=>{e.setRequestHeader(t,f[t])}),this.__async.setTimeout(()=>{e.send(u?this.__buildParams(u):void 0)},0)})}async *stream(){this.__activated=!0;let{xhr:e,o:t}=this,i=this.prepareRequest(),o=0,n="",s=[],r=null,a=!1,u=null,h=()=>{if(r){let e=r;r=null,e()}},d=t=>{let i=e.responseText;n+=i.substring(o),o=i.length;let r=n.split(`
11
11
 
12
12
  `);for(let e of(n=t?"":r.pop()??"",r)){let t=e.trim();if(!t)continue;let i=[];for(let e of t.split(`
13
13
  `))e.startsWith("data: ")?i.push(e.slice(6)):e.startsWith("data:")&&i.push(e.slice(5));i.length&&s.push(i.join(`
14
- `))}h()};e.onprogress=()=>d(!1),e.onload=()=>{d(!0),a=!0,this.__isFulfilled=!0,h()},e.onerror=()=>{u=c.connection("Connection error"),a=!0,this.__isFulfilled=!0,h()},e.onabort=()=>{u=c.abort("Abort connection"),a=!0,this.__isFulfilled=!0,h()},e.withCredentials=t.withCredentials??!1;let{url:p,data:f,method:m}=i;e.open(m,p,!0),t.contentType&&e.setRequestHeader&&e.setRequestHeader("Content-type",t.contentType);let{headers:g}=t;(0,l.isFunction)(g)&&(g=await g.call(this)),g&&e.setRequestHeader&&Object.keys(g).forEach(t=>{e.setRequestHeader(t,g[t])}),e.send(f?this.__buildParams(f):void 0);try{for(;;)if(s.length>0)yield s.shift();else if(a)break;else await new Promise(e=>{r=e})}finally{this.__isFulfilled||this.abort()}if(u)throw u}prepareRequest(){if(!this.o.url)throw c.error("Need URL for AJAX request");let e=this.o.url,t=this.o.data,i=(this.o.method||"get").toLowerCase();if("get"===i&&t&&(0,l.isPlainObject)(t)){let i=e.indexOf("?");if(-1!==i){let o=(0,l.parseQuery)(e.substring(i));e=e.substring(0,i)+"?"+(0,l.buildQuery)({...o,...t})}else e+="?"+(0,l.buildQuery)(this.o.data)}let o={url:e,method:i,data:t};return d.log.splice(100),d.log.push(o),o}destruct(){this.__isDestructed||(this.__isDestructed=!0,this.__activated&&!this.__isFulfilled&&(this.abort(),this.__isFulfilled=!0),this.__async.destruct())}constructor(e,t=u.Config.prototype.defaultAjaxOptions){(0,o._)(this,"__async",new s.Async),(0,o._)(this,"xhr",void 0),(0,o._)(this,"options",void 0),(0,o._)(this,"__isFulfilled",!1),(0,o._)(this,"__activated",!1),(0,o._)(this,"__isDestructed",!1),this.options=(0,l.ConfigProto)(e||{},t),this.xhr=this.o.xhr?this.o.xhr():new XMLHttpRequest}}(0,o._)(d,"log",[]),(0,n.__decorate)([a.autobind],d.prototype,"destruct",null)},37102:function(e,t,i){"use strict";i(5266).Config.prototype.defaultAjaxOptions={successStatuses:[200,201,202],method:"GET",url:"",data:null,contentType:"application/x-www-form-urlencoded; charset=UTF-8",headers:{"X-REQUESTED-WITH":"XMLHttpRequest"},withCredentials:!1,xhr:()=>new XMLHttpRequest}},73714:function(e,t,i){"use strict";i.d(t,{Ajax:function(){return o.Ajax},Response:function(){return n.Response}});var o=i(17338),n=i(32855)},32855:function(e,t,i){"use strict";i.d(t,{Response:function(){return n}});var o=i(25045);class n{get url(){return this.request.url}async json(){return JSON.parse(this.body)}text(){return Promise.resolve(this.body)}async blob(){return this.body}constructor(e,t,i,n){(0,o._)(this,"status",void 0),(0,o._)(this,"statusText",void 0),(0,o._)(this,"request",void 0),(0,o._)(this,"body",void 0),this.request=e,this.status=t,this.statusText=i,this.body=n}}},42259:function(e,t,i){"use strict";i.d(t,{cursorInTheEdgeOfString:function(){return r},findCorrectCurrentNode:function(){return a},moveNodeInsideStart:function(){return s.moveNodeInsideStart}});var o=i(81937),n=i(23211),s=i(89817);function r(e,t,i,n){let s=e.nodeValue?.length?e.nodeValue:"";if(n&&s.replace((0,o.INVISIBLE_SPACE_REG_EXP_END)(),"").length>t)return!0;let r=(0,o.INVISIBLE_SPACE_REG_EXP_START)().exec(s);return i&&(r&&r[0].length<t||!r&&t>0)}function a(e,t,i,o,s,r){if((e=t.startContainer.childNodes[t.startOffset])||(e=t.startContainer.childNodes[t.startOffset-1],i=!0),e&&o&&!n.Dom.isText(e)){if(!i&&n.Dom.isText(e.previousSibling))e=e.previousSibling;else if(s){let t=e=>i?e.lastChild:r(e),o=t(e);for(;o;){if(o&&n.Dom.isText(o)){e=o;break}o=t(o)}}}if(e&&!o&&!n.Dom.isText(e)){let t=e,i=e;do t=t.firstChild,i=i.lastChild;while(t&&i&&!n.Dom.isText(t))t===i&&t&&n.Dom.isText(t)&&(e=t)}return{node:e,rightMode:i}}i(7470)},89817:function(e,t,i){"use strict";i.d(t,{moveNodeInsideStart:function(){return s}});var o=i(81937),n=i(23211);function s(e,t,i){let s=n.Dom.findSibling(t,i),r=n.Dom.findSibling(t,!i);for(;n.Dom.isElement(s)&&!n.Dom.isTag(s,o.INSEPARABLE_TAGS)&&n.Dom.isContentEditable(s,e.editor)&&(!r||!n.Dom.closest(t,n.Dom.isElement,e.editor));)i||!s.firstChild?n.Dom.append(s,t):n.Dom.before(s.firstChild,t),s=n.Dom.sibling(t,i),r=n.Dom.sibling(t,!i)}},7470:function(e,t,i){"use strict";i.d(t,{moveTheNodeAlongTheEdgeOutward:function(){return n}});var o=i(23211);function n(e,t,i){let n=e;for(;n&&n!==i&&!(o.Dom.findSibling(n,t)||o.Dom.isBlock(n.parentElement));)(n=n.parentElement)&&n!==i&&(t?o.Dom.before(n,e):o.Dom.after(n,e))}},59841:function(e,t,i){"use strict";i.d(t,{CommitStyle:function(){return n.CommitStyle},Selection:function(){return o.Selection}});var o=i(98595),n=i(84578)},98595:function(e,t,i){"use strict";i.d(t,{Selection:function(){return m}});var o=i(25045),n=i(31635),s=i(81937),r=i(84839),a=i(23211),l=i(65946),c=i(28686),u=i(16849),h=i(28712),d=i(7470),p=i(84578),f=i(42259);class m{get j(){return this.jodit}errorNode(e){if(!a.Dom.isNode(e))throw(0,l.error)("Parameter node must be instance of Node")}get area(){return this.j.editor}get win(){return this.j.ew}get doc(){return this.j.ed}get sel(){return this.j.o.shadowRoot&&(0,c.isFunction)(this.j.o.shadowRoot.getSelection)?this.j.o.shadowRoot.getSelection():this.win.getSelection()}get range(){let e=this.sel;return e&&e.rangeCount?e.getRangeAt(0):this.createRange()}get isInsideArea(){let{sel:e}=this;if(!e?.rangeCount)return!1;for(let t=0;t<e.rangeCount;t+=1)if(!a.Dom.isOrContains(this.area,e.getRangeAt(t).commonAncestorContainer))return!1;return!0}createRange(e=!1){let t=this.doc.createRange();return e&&this.selectRange(t),t}remove(){let e=this.sel,t=this.current();if(e&&t)for(let t=0;t<e.rangeCount;t+=1){let i=e.getRangeAt(t);a.Dom.isOrContains(this.area,i.commonAncestorContainer)&&(i.deleteContents(),i.collapse(!0))}}clear(){this.sel?.rangeCount&&this.sel?.removeAllRanges()}removeNode(e){if(!a.Dom.isOrContains(this.j.editor,e,!0))throw(0,l.error)("Selection.removeNode can remove only editor's children");a.Dom.safeRemove(e),this.j.e.fire("afterRemoveNode",e)}insertCursorAtPoint(e,t){try{let i=this.createRange(),o=this.doc.caretPositionFromPoint?.(e,t),n=o?null:this.doc.caretRangeFromPoint?.(e,t);if(o)i.setStart(o.offsetNode,o.offset);else{if(!n)return!1;i.setStart(n.startContainer,n.startOffset)}if(!a.Dom.isOrContains(this.area,i.startContainer))return!1;return i.collapse(!0),this.removeMarkers(),this.selectRange(i),!0}catch{}return!1}get hasMarkers(){return!!this.markers.length}get markers(){return(0,l.$$)("span[data-"+s.MARKER_CLASS+"]",this.area)}removeMarkers(){a.Dom.safeRemove(...this.markers)}marker(e=!1,t){let i=null;t&&(i=t.cloneRange()).collapse(e);let o=this.j.createInside.span();return o.id=s.MARKER_CLASS+"_"+Number(new Date)+"_"+(Math.random()+"").slice(2),(0,l.css)(o,{lineHeight:"0",display:"none"}),a.Dom.markTemporary(o),(0,l.attr)(o,"data-"+s.MARKER_CLASS,e?"start":"end"),a.Dom.append(o,this.j.createInside.text(s.INVISIBLE_SPACE)),i&&a.Dom.isOrContains(this.area,e?i.startContainer:i.endContainer)&&i.insertNode(o),o}restore(){let e=this.markers,t=new Map(e.map(e=>[e.id,e])),i=[],o=!1;for(let n=0;n<e.length;n+=1){let r=e[n];if("start"!==(0,l.attr)(r,"data-"+s.MARKER_CLASS))continue;o||="true"===(0,l.attr)(r,"data-selection-backward");let c=(0,l.attr)(r,"data-selection-end"),u=c?t.get(c):void 0;!c&&e[n+1]&&"end"===(0,l.attr)(e[n+1],"data-"+s.MARKER_CLASS)&&(u=e[n+1]);let h=this.createRange();if(u)h.setStartAfter(r),h.setEndBefore(u);else{let e=r.previousSibling;a.Dom.isText(e)?h.setStart(e,e.nodeValue?.length??0):h.setStartBefore(r),h.collapse(!0)}i.push(h)}a.Dom.safeRemove(...e),i.length&&this.__selectRanges(i,o)}__isBackward(){let e=this.sel;return!!(e&&1===e.rangeCount&&!e.isCollapsed&&e.anchorNode===e.getRangeAt(0).endContainer&&e.anchorOffset===e.getRangeAt(0).endOffset)}__ranges(){let e=this.sel;return e?Array.from({length:e.rangeCount},(t,i)=>e.getRangeAt(i).cloneRange()):[]}fakes(){if(!this.isInsideArea)return[];let e=this.__isBackward(),t=this.__ranges(),i=t.map(e=>{let t=e.collapsed,i=e.cloneRange();i.collapse(!0);let o=this.j.createInside.fake();a.Dom.safeInsertNode(i,o),e.setStartBefore(o);let n=[o];if(t)e.collapse(!0);else{let t=e.cloneRange();t.collapse(!1);let i=this.j.createInside.fake();a.Dom.safeInsertNode(t,i),e.setEndAfter(i),n.push(i)}return n});return this.__fakeSelections.set(i[0][0],{pairs:i,backward:e}),this.__selectRanges(t,e),i[0]}restoreFakes(e){if(!e.length)return;let t=this.__fakeSelections.get(e[0]);if(this.__fakeSelections.delete(e[0]),this.j.isInDestruct)return;let i=[];for(let o of t?.pairs??[e]){let e=o.filter(e=>e.isConnected&&a.Dom.isOrContains(this.area,e,!0));if(!e.length)continue;let[t,n]=e,s=this.createRange();for(let i of(s.setStartAfter(t),n?s.setEndBefore(n):s.collapse(!0),e))i.parentNode?.firstChild!==i.parentNode?.lastChild&&a.Dom.safeRemove(i);i.push(s)}i.length&&this.__selectRanges(i,t?.backward)}save(e=!1){if(this.hasMarkers)return[];let t=this.sel;if(!t||!t.rangeCount)return[];let i=this.__isBackward(),o=[],n=t.rangeCount,s=[];for(let e=0;n>e;e+=1)if(s[e]=t.getRangeAt(e),!a.Dom.isOrContains(this.area,s[e].commonAncestorContainer))return[];for(let e=0;n>e;e+=1)if(s[e].collapsed){let t=this.marker(!0,s[e]);o[e]={startId:t.id,collapsed:!0,startMarker:t.outerHTML}}else{let t=this.marker(!0,s[e]),r=this.marker(!1,s[e]);n>1&&(0,l.attr)(t,"data-selection-end",r.id),i&&(0,l.attr)(t,"data-selection-backward","true"),o[e]={startId:t.id,endId:r.id,collapsed:!1,startMarker:t.outerHTML,endMarker:r.outerHTML}}if(!e){t.removeAllRanges();for(let e=n-1;e>=0;--e){let i=this.area.querySelector("#"+o[e].startId);if(i){if(o[e].collapsed)s[e].setStartAfter(i),s[e].collapse(!0);else if(s[e].setStartBefore(i),o[e].endId){let t=this.area.querySelector("#"+o[e].endId);t&&s[e].setEndAfter(t)}try{t.addRange(s[e].cloneRange())}catch{}}}}return o}focus(e={preventScroll:!0}){if(!this.isFocused()){let t=(0,l.getScrollParent)(this.j.container),i=t?.scrollTop;this.j.iframe&&"complete"===this.doc.readyState&&this.j.iframe.focus(e),this.win.focus(),this.area.focus(e),i&&t?.scrollTo&&t.scrollTo(0,i);let o=this.sel,n=o?.rangeCount?o?.getRangeAt(0):null;if(!n||!a.Dom.isOrContains(this.area,n.startContainer)){let e=this.createRange();e.setStart(this.area,0),e.collapse(!0),this.selectRange(e,!1)}return this.j.editorIsActive||this.j?.events?.fire("focus"),!0}return!1}isCollapsed(){let e=this.sel;for(let t=0;e&&t<e.rangeCount;t+=1)if(!e.getRangeAt(t).collapsed)return!1;return!0}isFocused(){return this.doc.hasFocus&&this.doc.hasFocus()&&this.area===this.doc.activeElement}current(e=!0){if(this.j.getRealMode()!==s.MODE_WYSIWYG)return null;let t=this.sel;if(!t||0===t.rangeCount)return null;let i=t.getRangeAt(0),o=i.startContainer,n=!1;if(!a.Dom.isOrContains(this.area,o))return null;if(a.Dom.isTag(o,"br")&&t.isCollapsed)return o;if(!a.Dom.isText(o)){let s=(0,f.findCorrectCurrentNode)(o,i,n,t.isCollapsed,e,e=>n?e.lastChild:e.firstChild);o=s.node,n=s.rightMode}return o&&a.Dom.isOrContains(this.area,o)?o:null}insertNode(e,t=!0,i=!0){this.errorNode(e),this.j.e.fire("safeHTML",e);let o=a.Dom.isFragment(e)?e.lastChild:e;if(!o||this.j.isInDestruct)return;!this.isFocused()&&this.j.isEditorMode()&&(this.focus(),this.restore());let n=this.sel;this.j.history.snapshot.transaction(()=>{if(this.isCollapsed()||this.j.execCommand("Delete"),this.j.e.fire("beforeInsertNode",e),!(o=a.Dom.isFragment(e)?e.lastChild:e)||this.j.isInDestruct)return;if(n&&n.rangeCount){let t=n.getRangeAt(0),{firstChild:i}=e;a.Dom.isOrContains(this.area,t.commonAncestorContainer)?a.Dom.safeInsertNode(t,e):a.Dom.append(this.area,e),[()=>i?.previousSibling,()=>i?.previousSibling,()=>i?.previousSibling?.lastChild].forEach(e=>{let t=e();t&&a.Dom.isEmptyTextNode(t)&&a.Dom.safeRemove(t)})}else a.Dom.append(this.area,e);let i=e=>{if(a.Dom.isBlock(e)){let t=e.lastChild;if(t)return i(t)}this.setCursorAfter(e)};t&&(a.Dom.isFragment(e)?o&&i(o):i(e)),this.j.o.scrollToPastedContent&&(0,l.scrollIntoViewIfNeeded)(o??e,this.j.editor,this.doc)}),i&&this.j.events&&this.j.__imdSynchronizeValues(),this.j.events&&this.j.e.fire("afterInsertNode",a.Dom.isFragment(e)?o:e)}insertHTML(e,t=!0){if(""===e)return;let i=this.j.createInside.div(),o=this.j.createInside.fragment();!this.isFocused()&&this.j.isEditorMode()&&(this.focus(),this.restore()),a.Dom.isNode(e)?a.Dom.append(i,e):i.innerHTML=e.toString(),!this.j.isEditorMode()&&!1===this.j.e.fire("insertHTML",i.innerHTML)||i.lastChild&&(a.Dom.moveContent(i,o),this.insertNode(o,t,!1),this.j.__imdSynchronizeValues())}insertImage(e,t=null,i=null){let o=(0,c.isString)(e)?this.j.createInside.element("img"):e;if((0,c.isString)(e)&&(0,l.attr)(o,"src",e),null!=i){let e=i.toString();e&&"auto"!==e&&0>(e+"").indexOf("px")&&0>(e+"").indexOf("%")&&(e+="px"),(0,l.attr)(o,"width",e)}t&&"object"==typeof t&&(0,l.css)(o,t);let{imageDefaultAlign:n,imageAlignClasses:s}=this.j.o;n&&"normal"!==n&&(0,u.hAlignElement)(o,n,s);let r=()=>{(o.naturalHeight<o.offsetHeight||o.naturalWidth<o.offsetWidth)&&(0,l.css)(o,{width:"",height:""}),o.removeEventListener("load",r)};this.j.e.on(o,"load",r),o.complete&&r(),this.insertNode(o),this.j.e.fire("afterInsertImage",o)}eachSelection(e){let t=new Set;for(let i of this.__ranges())a.Dom.isOrContains(this.area,i.commonAncestorContainer)&&this.__eachRange(i,i=>{t.has(i)||(t.add(i),e(i))})}__eachRange(e,t){let i=e.commonAncestorContainer;a.Dom.isHTMLElement(i)||(i=i.parentElement);let o=[],n=e.startOffset,r=i.childNodes.length,u=e.startContainer===this.area?i.childNodes[n<r?n:r-1]:e.startContainer,h=e.endContainer===this.area?i.childNodes[e.endOffset-1]:e.endContainer;a.Dom.isText(u)&&u===e.startContainer&&e.startOffset===u.nodeValue?.length&&u.nextSibling&&(u=u.nextSibling),a.Dom.isText(h)&&h===e.endContainer&&0===e.endOffset&&h.previousSibling&&(h=h.previousSibling);let d=e=>{!e||e===i||a.Dom.isEmptyTextNode(e)||(0,c.isMarker)(e)||o.push(e)};d(u),u!==h&&a.Dom.isOrContains(i,u,!0)&&a.Dom.find(u,e=>(d(e),e===h||e&&e.contains&&e.contains(h)),i,!0,!1);let p=e=>{if(a.Dom.isOrContains(this.j.editor,e,!0)){if(e.nodeName.match(/^(UL|OL)$/))return(0,l.toArray)(e.childNodes).forEach(p);if(a.Dom.isTag(e,"li"))if(e.firstChild)e=e.firstChild;else{let t=this.j.createInside.text(s.INVISIBLE_SPACE);a.Dom.append(e,t),e=t}t(e)}};0===o.length&&(a.Dom.isEmptyTextNode(u)&&o.push(u),u?.firstChild&&o.push(u.firstChild)),o.forEach(p)}cursorInTheEdge(e,t,i=null){let o=!e,n=this.sel,s=n?.rangeCount?n.getRangeAt(0):null;if(!s)return null;let r=e?s.startContainer:s.endContainer,l=e?s.startOffset:s.endOffset;if(i??=r,!a.Dom.isOrContains(t,r)||!a.Dom.isOrContains(t,i))return null;let c=e=>!!(e&&!a.Dom.isTag(e,"br")&&!a.Dom.isEmptyTextNode(e)&&!a.Dom.isTemporary(e)&&!(a.Dom.isElement(e)&&!0===this.j.e.fire("isInvisibleForCursor",e)));if(a.Dom.isText(r)){if((0,f.cursorInTheEdgeOfString)(r,l,e,o))return!1}else{let e=r.childNodes,t=o?e.length:l;for(let i=o?l:0;t>i;i+=1)if(c(e[i]))return!1}let u=i;for(;u&&u!==t;){let t=a.Dom.sibling(u,e);if(!t){u=u.parentNode;continue}if(c(u=t))return!1}return!0}cursorOnTheLeft(e,t){return this.cursorInTheEdge(!0,e,t)}cursorOnTheRight(e,t){return this.cursorInTheEdge(!1,e,t)}setCursorAfter(e){return this.setCursorNearWith(e,!1)}setCursorBefore(e){return this.setCursorNearWith(e,!0)}setCursorNearWith(e,t){if(this.errorNode(e),!a.Dom.isOrContains(this.area,e,!0))throw(0,l.error)("Node element must be in editor");let i=this.createRange(),o=null;return a.Dom.isText(e)?t?i.setStart(e,0):i.setEnd(e,e.nodeValue?.length??0):(o=this.j.createInside.fake(),t?i.setStartBefore(e):i.setEndAfter(e),i.collapse(t),a.Dom.safeInsertNode(i,o),i.selectNode(o)),i.collapse(t),this.selectRange(i),o}setCursorIn(e,t=!1){if(this.errorNode(e),!a.Dom.up(e,e=>e===this.area||e&&e.parentNode===this.area,this.area))throw(0,l.error)("Node element must be in editor");let i=this.createRange(),o=e,n=e;do{if(a.Dom.isText(o)||a.Dom.isTag(o,s.INSEPARABLE_TAGS))break;n=o,o=t?o.firstChild:o.lastChild}while(o)if(!o){let e=this.j.createInside.text(s.INVISIBLE_SPACE);a.Dom.isTag(n,s.INSEPARABLE_TAGS)?o=n:(a.Dom.append(n,e),n=e)}let r=o||n;return a.Dom.isTag(r,s.INSEPARABLE_TAGS)?t||a.Dom.isTag(r,"br")?i.setStartBefore(r):i.setEndAfter(r):i.selectNodeContents(r),i.collapse(t),this.selectRange(i),n}selectRange(e,t=!0){return this.__selectRanges([e],!1,t)}__selectRanges(e,t=!1,i=!0){let o=this.sel;if(i&&!this.isFocused()&&"focus"!==this.j.e.current&&this.focus(),o&&(o.removeAllRanges(),e.forEach(e=>o.addRange(e)),t&&1===e.length)){let t=e[0];o.setBaseAndExtent(t.endContainer,t.endOffset,t.startContainer,t.startOffset)}return this.j.e.fire("changeSelection"),this}select(e,t=!1){if(this.errorNode(e),!a.Dom.up(e,e=>e===this.area||e&&e.parentNode===this.area,this.area))throw(0,l.error)("Node element must be in editor");let i=!t&&this.__closestNotEditable(e)||e,o=this.createRange();return o[t||i===this.area?"selectNodeContents":"selectNode"](i),this.selectRange(o)}__closestNotEditable(e){let{area:t}=this,i=null,o=e.parentNode;for(;o&&o!==t&&t.contains(o);)a.Dom.isElement(o)&&"false"===o.getAttribute("contenteditable")&&(i=o),o=o.parentNode;return i}get html(){let e=this.sel;if(e&&e.rangeCount>0){let e=this.j.createInside.div();return this.__ranges().forEach(t=>a.Dom.append(e,t.cloneContents())),e.innerHTML}return""}__wrapSelectionFragments(e){this.__splitSelectionBoundaries(e);let t=e.commonAncestorContainer;return(a.Dom.isText(t)&&(t=t.parentNode),t)?this.__wrapSelectionRuns(this.__collectContainedNodes(t,e)):[]}__splitSelectionBoundaries(e){let{endContainer:t,endOffset:i}=e;a.Dom.isText(t)&&i>0&&i<(t.nodeValue?.length??0)&&t.splitText(i);let{startContainer:o,startOffset:n}=e;if(a.Dom.isText(o)&&n>0&&n<(o.nodeValue?.length??0)){let t=o.splitText(n);e.setStart(t,0)}this.__normalizeRangeBoundary(e,!0),this.__normalizeRangeBoundary(e,!1)}__normalizeRangeBoundary(e,t){let i=t?e.startContainer:e.endContainer;if(!a.Dom.isText(i))return;let o=t?e.startOffset:e.endOffset,n=i.nodeValue?.length??0;0===o?t?e.setStartBefore(i):e.setEndBefore(i):o>=n&&(t?e.setStartAfter(i):e.setEndAfter(i))}__collectContainedNodes(e,t,i=this.createRange()){let o=[];return(0,l.toArray)(e.childNodes).forEach(e=>{this.__isFullyContained(t,e,i)?o.push(e):e.childNodes.length&&t.intersectsNode(e)&&o.push(...this.__collectContainedNodes(e,t,i))}),o}__isFullyContained(e,t,i){return i.selectNode(t),0>=e.compareBoundaryPoints(Range.START_TO_START,i)&&e.compareBoundaryPoints(Range.END_TO_END,i)>=0}__wrapSelectionRuns(e){let t=[],i=[],o=()=>{i.length&&(t.push(this.__wrapRunInFont(i)),i=[])};return e.forEach(e=>{a.Dom.isElement(e)&&this.__isOrContainsBlock(e)?(o(),t.push(...this.__wrapSelectionRuns((0,l.toArray)(e.childNodes)))):(i.length&&i[i.length-1].parentNode!==e.parentNode&&o(),i.push(e))}),o(),t}__isOrContainsBlock(e){return!!a.Dom.isBlock(e)||(0,l.toArray)(e.childNodes).some(e=>this.__isOrContainsBlock(e))}__wrapRunInFont(e){let t=this.j.createInside.element("font"),[i]=e;return a.Dom.before(i,t),e.forEach(e=>a.Dom.append(t,e)),t}*wrapInTagGen(e){if(this.sel?.rangeCount&&!this.isInsideArea)return;if(this.isCollapsed()){let t=this.jodit.createInside.element("font",s.INVISIBLE_SPACE);this.insertNode(t,!1,!1),e&&e[0]&&a.Dom.append(t,e[0]);try{yield t}finally{a.Dom.unwrap(t)}return}let t=this.__ranges().flatMap(e=>this.__wrapSelectionFragments(e));try{for(let e of t){if(this.j.isInDestruct||!a.Dom.isOrContains(this.area,e,!0))continue;let{firstChild:t,lastChild:i}=e;if(t&&t===i&&(0,c.isMarker)(t)){a.Dom.unwrap(e);continue}t&&(0,c.isMarker)(t)&&a.Dom.before(e,t),i&&(0,c.isMarker)(i)&&a.Dom.after(e,i),yield e,a.Dom.unwrap(e)}}finally{t.forEach(e=>a.Dom.unwrap(e))}}wrapInTag(e){let t=[];for(let i of this.wrapInTagGen())try{if(i.firstChild&&i.firstChild===i.lastChild&&(0,c.isMarker)(i.firstChild))continue;(0,c.isFunction)(e)?e(i):t.push(a.Dom.replace(i,e,this.j.createInside))}finally{let e=i.parentNode;e&&(a.Dom.unwrap(i),a.Dom.isEmpty(e)&&a.Dom.unwrap(e))}return t}commitStyle(e){(0,h.assert)((0,l.size)(e)>0,"Need to pass at least one option"),new p.CommitStyle(e).apply(this.j)}splitSelection(e,t){if(!this.isCollapsed()||!this.isInsideArea||!a.Dom.isOrContains(this.area,e,!0)||!a.Dom.isOrContains(e,this.range.startContainer)||t&&!a.Dom.isOrContains(e,t,!0))return null;let i=this.createRange(),o=this.range;i.setStartBefore(e);let n=this.cursorOnTheRight(e,t),r=this.cursorOnTheLeft(e,t),l=this.j.createInside.element("br"),c=this.j.createInside.fake(),u=c.cloneNode();try{if(n||r){t?a.Dom.before(t,l):a.Dom.safeInsertNode(o,l);let e=(e,t)=>{let i=t(e);for(;i;){let e=t(i);if(i&&(a.Dom.isTag(i,"br")||a.Dom.isEmptyTextNode(i)))a.Dom.safeRemove(i);else break;i=e}};e(l,e=>e.nextSibling),e(l,e=>e.previousSibling),a.Dom.after(l,u),a.Dom.before(l,c),n?(i.setEndBefore(l),o.setEndBefore(l)):(i.setEndAfter(l),o.setEndAfter(l))}else i.setEnd(o.startContainer,o.startOffset);let d=i.extractContents(),p=e=>a.Dom.each(e,e=>a.Dom.isEmptyTextNode(e)&&a.Dom.safeRemove(e));(0,h.assert)(e.parentNode,"Splitting fails");try{if(p(d),p(e),a.Dom.before(e,d),!t&&n&&l?.parentNode){let e=this.createRange();e.setStartBefore(l),this.selectRange(e)}}catch(e){if(!s.IS_PROD)throw e}let f=e=>{let t=e?.parentNode;t&&t.firstChild===t.lastChild&&a.Dom.append(t,l.cloneNode())};f(c),f(u)}finally{a.Dom.safeRemove(c),a.Dom.safeRemove(u)}return e.previousElementSibling}expandSelection(){if(this.isCollapsed()||!this.isInsideArea)return this;let e=this.__isBackward(),t=this.__ranges().map(e=>this.__expandRange(e));return this.__selectRanges(t,e),this}__expandRange(e){let t=e.cloneRange();if(!a.Dom.isOrContains(this.j.editor,e.commonAncestorContainer,!0))return e;let i=t=>{let i=this.j.createInside.fake(),o=e.cloneRange();return o.collapse(t),a.Dom.safeInsertNode(o,i),(0,d.moveTheNodeAlongTheEdgeOutward)(i,t,this.j.editor),i},o=i(!0),n=i(!1);t.setStartAfter(o),t.setEndBefore(n);let s=a.Dom.findSibling(o,!1),r=a.Dom.findSibling(n,!0);if(s!==r){let e=a.Dom.isElement(s)&&a.Dom.isOrContains(s,n),i=!e&&a.Dom.isElement(r)&&a.Dom.isOrContains(r,o);if(e||i){let i=e?s:r,l=i;for(;a.Dom.isElement(i);)(i=e?i.firstElementChild:i.lastElementChild)&&(e?a.Dom.isOrContains(i,n):a.Dom.isOrContains(i,o))&&(l=i);e?t.setStart(l,0):t.setEnd(l,l.childNodes.length)}}if(a.Dom.safeRemove(o,n),t.collapsed)throw(0,l.error)("Selection is collapsed");return t}constructor(e){(0,o._)(this,"jodit",void 0),(0,o._)(this,"__fakeSelections",void 0),this.jodit=e,this.__fakeSelections=new WeakMap,e.e.on("removeMarkers",()=>{this.removeMarkers()})}}(0,n.__decorate)([r.autobind],m.prototype,"createRange",null),(0,n.__decorate)([r.autobind],m.prototype,"focus",null),(0,n.__decorate)([r.autobind],m.prototype,"setCursorAfter",null),(0,n.__decorate)([r.autobind],m.prototype,"setCursorBefore",null),(0,n.__decorate)([r.autobind],m.prototype,"setCursorIn",null)},17481:function(e,t,i){"use strict";i.d(t,{extractSelectedPart:function(){return r}});var o=i(23211),n=i(23175),s=i(71125);function r(e,t,i){let o=i.s.createRange(),s=(0,n.isMarker)(t.previousSibling)?t.previousSibling:t;o.setStartBefore(e),o.setEndBefore(s),a(e,o,!0);let r=(0,n.isMarker)(t.nextSibling)?t.nextSibling:t;o.setStartAfter(r),o.setEndAfter(e),a(e,o,!1)}function a(e,t,i){let n=t.extractContents();o.Dom.isEmpty(n)&&n.firstChild&&o.Dom.unwrap(n.firstChild),e.parentNode&&(0,s.call)(i?o.Dom.before:o.Dom.after,e,n)}},48729:function(e,t,i){"use strict";i.d(t,{FiniteStateMachine:function(){return a}});var o=i(25045),n=i(81937),s=i(85932),r=i(28712);class a{setState(e){(0,r.assert)(!this.__previewsStates.has(e),"Circled states"),this.__previewsStates.add(e),this.__state=e}getState(){return this.__state}disableSilent(){this.silent=!1}dispatch(e,t){let i=this.transitions[this.getState()][e];if(i){let e=i.call(this,t);return(0,r.assert)(e&&e!==t,"Action should return new value"),(0,r.assert)((0,s.isString)(e.next),"Value should contain the next state"),(0,r.assert)(e.next!==this.getState(),"The new state should not be equal to the old one."),this.setState(e.next),n.IS_PROD||this.silent,e}throw Error(`invalid action: ${this.getState()}.${e.toString()}`)}constructor(e,t){(0,o._)(this,"transitions",void 0),(0,o._)(this,"__state",void 0),(0,o._)(this,"silent",void 0),(0,o._)(this,"__previewsStates",void 0),this.transitions=t,this.silent=!0,this.__previewsStates=new Set,this.setState(e)}}},10171:function(e,t,i){"use strict";i.d(t,{getSuitChild:function(){return r}});var o=i(23211),n=i(83653),s=i(73019);function r(e,t){let{firstChild:i}=t;for(;i&&!(0,n.isNormalNode)(i);)if(!(i=i.nextSibling))return null;return i&&!o.Dom.next(i,n.isNormalNode,t)&&(0,s.isSuitElement)(e,i,!1)?i:null}},19549:function(e,t,i){"use strict";i.d(t,{getSuitParent:function(){return function e(t,i,r){let{parentNode:a}=i;return a===r||!o.Dom.isHTMLElement(a)||o.Dom.next(i,n.isNormalNode,a)||o.Dom.prev(i,n.isNormalNode,a)?null:t.isElementCommit&&t.elementIsBlock&&!o.Dom.isBlock(a)?e(t,a,r):o.Dom.isTag(a,"li")&&!t.isElementCommit&&t.options.attributes?.style||(0,s.isSuitElement)(t,a,!1)&&(!o.Dom.isBlock(a)||t.elementIsBlock)?a:t.isElementCommit&&!o.Dom.isBlock(a)?e(t,a,r):null}}});var o=i(23211),n=i(83653),s=i(73019)},9703:function(e,t,i){"use strict";i.d(t,{hasSameStyle:function(){return c},hasSameStyleKeys:function(){return u}});var o=i(81937),n=i(23211),s=i(18303),r=i(19147),a=i(28712),l=i(80991);function c(e,t){return!!(!n.Dom.isTag(e,"font")&&n.Dom.isHTMLElement(e)&&Object.keys(t).every(i=>{let o=(0,l.css)(e,i,!0);return""===o&&(""===t[i]||null==t[i])||!(0,s.isVoid)(o)&&""!==o&&!(0,s.isVoid)(t[i])&&(0,r.normalizeCssValue)(i,t[i]).toString().toLowerCase()===o.toString().toLowerCase()}))}if(o.globalDocument){let e=o.globalDocument.createElement("div");e.style.color="red",(0,a.assert)(c(e,{color:"red"}),"Style test"),(0,a.assert)(c(e,{fontSize:null}),"Style test"),(0,a.assert)(c(e,{fontSize:""}),"Style test")}function u(e,t){return!!(!n.Dom.isTag(e,"font")&&n.Dom.isHTMLElement(e)&&Object.keys(t).every(t=>""!==(0,l.css)(e,t,!0)))}if(o.globalDocument){let e=o.globalDocument.createElement("div");e.style.color="red",(0,a.assert)(u(e,{color:"red"}),"Style test"),(0,a.assert)(!u(e,{font:"Arial",color:"red"}),"Style test"),(0,a.assert)(!u(e,{border:"1px solid #ccc"}),"Style test")}},51640:function(e,t,i){"use strict";i.d(t,{FiniteStateMachine:function(){return n.FiniteStateMachine},WRAP_NODES:function(){return d.WRAP_NODES},extractSelectedPart:function(){return o.extractSelectedPart},getSuitChild:function(){return s.getSuitChild},getSuitParent:function(){return r.getSuitParent},isInsideInvisibleElement:function(){return a.isInsideInvisibleElement},suitableClosest:function(){return l.suitableClosest},toggleAttributes:function(){return u.toggleAttributes},toggleOrderedList:function(){return c.toggleOrderedList},unwrapChildren:function(){return h.unwrapChildren},wrap:function(){return d.wrap}});var o=i(17481),n=i(48729),s=i(10171),r=i(19549);i(9703);var a=i(39608);i(83653),i(95971);var l=i(73019),c=i(34582);i(97110);var u=i(82794),h=i(89081),d=i(73154);i(83335)},39608:function(e,t,i){"use strict";i.d(t,{isInsideInvisibleElement:function(){return n}});var o=i(23211);function n(e,t){return!!o.Dom.closest(e,["style","script"],t)}},83653:function(e,t,i){"use strict";i.d(t,{isNormalNode:function(){return s}});var o=i(23211),n=i(23175);function s(e){return!!(e&&!o.Dom.isEmptyTextNode(e)&&!o.Dom.isTemporary(e)&&!(0,n.isMarker)(e))}},95971:function(e,t,i){"use strict";i.d(t,{elementsEqualAttributes:function(){return c},isSameAttributes:function(){return l}});var o=i(18073),n=i(93640),s=i(28712),r=i(7909),a=i(9703);function l(e,t){return!(0,o.size)(t)||((0,s.assert)(t,"Attrs must be a non-empty object"),Object.keys(t).every(i=>{if("class"===i||"className"===i)return((t[i]+"").match(/[^\t\n\f\r ]+/g)??[]).every(t=>e.classList.contains(t));if("style"===i)return(0,a.hasSameStyle)(e,t[i]);let o=t[i];return(0,n.attr)(e,i)===(null==o?o:o+"")}))}function c(e,t){return e.attributes.length===t.attributes.length&&Array.from(e.attributes).every(e=>(0,r.attrRaw)(t,e.name)===e.value)}},73019:function(e,t,i){"use strict";i.d(t,{isSuitElement:function(){return r},suitableClosest:function(){return a}});var o=i(23211),n=i(9703),s=i(83653);function r(e,t,i,a=!0){if(!t||!(0,s.isNormalNode)(t))return!1;let{element:l,elementIsDefault:c,options:u}=e;if(o.Dom.isList(t)&&e.elementIsList)return!0;let h=o.Dom.isTag(t,l);return!!(h&&!(c&&i)||u.attributes?.style&&(a?(0,n.hasSameStyle)(t,u.attributes.style):(0,n.hasSameStyleKeys)(t,u.attributes.style))&&!e.elementIsList)||!h&&!i&&c&&o.Dom.isInlineBlock(t)}function a(e,t,i){return o.Dom.closest(t,t=>r(e,t,!0,!1),i)}},34582:function(e,t,i){"use strict";i.d(t,{toggleOrderedList:function(){return c}});var o=i(23211),n=i(28712),s=i(17481),r=i(82794),a=i(98394),l=i(97110);function c(e,t,i,o){if(!t)return o;let n=t.parentElement;if(!n)return o;let s=i.e.fire(`${a._PREFIX}BeforeToggleList`,o,e,n);if(void 0!==s)return s;let c=i.e.fire.bind(i.e,`${a._PREFIX}AfterToggleList`);if("unwrap"!==o){let s="change"===(0,r.toggleAttributes)(e,t.parentElement,i,a.INITIAL,!0);if(o===a.REPLACE||s||n.tagName.toLowerCase()!==e.element){let o=u(a.REPLACE,n,t,i,e),s=(0,l.wrapList)(e,o,i);return c(a.REPLACE,s,e),a.REPLACE}}return c("unwrap",u("unwrap",n,t,i,e),e),"unwrap"}function u(e,t,i,r,l){let c=r.e.fire(`${a._PREFIX}BeforeUnwrapList`,e,t,l);return c?((0,n.assert)(o.Dom.isHTMLElement(c),`${a._PREFIX}BeforeUnwrapList hook must return HTMLElement`),c):((0,s.extractSelectedPart)(t,i,r),(0,n.assert)(o.Dom.isHTMLElement(i.parentElement),"Element should be inside the list"),o.Dom.unwrap(i.parentElement),e===a.REPLACE)?i:o.Dom.replace(i,"br"!==r.o.enter.toLowerCase()?r.o.enter:r.createInside.fragment(),r.createInside)}},97110:function(e,t,i){"use strict";i.d(t,{wrapList:function(){return a}});var o=i(23211),n=i(95971),s=i(82794),r=i(98394);function a(e,t,i){let a=i.e.fire(`${r._PREFIX}BeforeWrapList`,r.REPLACE,t,e)??o.Dom.replace(t,"li",i.createInside),l=a.previousElementSibling,c=a.nextElementSibling,u=o.Dom.isTag(l,e.element)?l:null;return u??=o.Dom.isTag(c,e.element)?c:null,o.Dom.isList(u)&&(0,n.isSameAttributes)(u,e.options.attributes)||(u=i.createInside.element(e.element),(0,s.toggleAttributes)(e,u,i,r.INITIAL),o.Dom.before(a,u)),l===u?o.Dom.append(u,a):o.Dom.prepend(u,a),o.Dom.isTag(u.nextElementSibling,e.element)&&(0,n.elementsEqualAttributes)(u,u.nextElementSibling)&&(o.Dom.append(u,Array.from(u.nextElementSibling.childNodes)),o.Dom.safeRemove(u.nextElementSibling)),i.e.fire(`${r._PREFIX}AfterWrapList`,"wrap",u,e),u}},82794:function(e,t,i){"use strict";i.d(t,{toggleAttributes:function(){return f}});var o=i(81937),n=i(23211),s=i(28077),r=i(28686),a=i(19147),l=i(18073),c=i(93640),u=i(80991),h=i(36400),d=i(98394);let p="toggleAttributes";function f(e,t,i,m,g=!1){var _;if(!g&&e.isApplied(t,p))return m;g||e.setApplied(t,p);let{attributes:v}=e.options;return v&&(0,l.size)(v)>0&&Object.keys(v).forEach(e=>{var p,f;let _=v[e];switch(e){case"style":p=m,(0,c.assert)((0,r.isPlainObject)(_)&&(0,l.size)(_),"Style must be an object"),Object.keys(_).forEach(e=>{let r=(0,u.cssInline)(t,e),l=_[e];if(""!==r||null!=l){let d,f,m,_;if(null==l||""===l){r&&(g||(0,u.css)(t,e,null),p="change");return}if(d=function(e){if(void 0!==(0,h.dataBind)(e,"shadowRoot"))return(0,h.dataBind)(e,"shadowRoot");let t=(0,s.getContainer)(e),i=o.globalDocument.createElement("iframe");(0,u.css)(i,{width:0,height:0,position:"absolute",border:0}),(0,c.attr)(i,"src","about:blank"),n.Dom.append(t,i);let r=i.contentWindow?.document,a=r?r.body:e.od.body;return(0,h.dataBind)(e,"shadowRoot",a),a}(i),f=i.create.element("div"),(0,u.css)(f,"color",(0,u.css)(i.editor,"color")),m=i.create.element(t.tagName.toLowerCase()),(0,c.attr)(m,"style",(0,c.attr)(t,"style")),n.Dom.append(f,m),n.Dom.append(d,f),_=(0,u.css)(m,e),n.Dom.safeRemove(f),_===(0,a.normalizeCssValue)(e,l)){if(!r)return;g||(0,u.css)(t,e,null),p="unset";return}p="change",g||(0,u.css)(t,e,l)}}),m=p;break;case"className":case"class":m=function(e,t,i,o,n){(0,c.assert)((0,r.isString)(t),"Class name must be a string");let s=t.match(/[^\t\n\f\r ]+/g)??[];if(!s.length)return o;let a=e.e.fire.bind(e.e,`${d._PREFIX}AfterToggleAttribute`);return s.every(e=>i.classList.contains(e))?(o="unset",n||(i.classList.remove(...s),0===i.classList.length&&(0,c.attr)(i,"class",null),a(o,i,"class",(0,c.attr)(i,"class")))):(o="change",n||(i.classList.add(...s),a(o,i,"class",t))),o}(i,_,t,m,g);break;default:let b;f=m,(0,c.assert)((0,r.isString)(_)||(0,r.isNumber)(_)||(0,r.isBoolean)(_)||null==_,"Attribute value must be a string or number or boolean or null"),b=i.e.fire.bind(i.e,`${d._PREFIX}AfterToggleAttribute`),(0,c.attr)(t,e)===(null==_?_:_+"")?(g||(0,c.attr)(t,e,null),f="unset",g||b(f,t,e,_)):(f="change",g||((0,c.attr)(t,e,_),b(f,t,e,_))),m=f}}),!g&&v?.style?(_=m,!(0,c.attr)(t,"style")&&((0,c.attr)(t,"style",null),t.attributes.length||t.tagName.toLowerCase()!==e.defaultTag||(n.Dom.unwrap(t),_="unwrap")),_):m}},89081:function(e,t,i){"use strict";i.d(t,{unwrapChildren:function(){return a}});var o=i(23211),n=i(93640),s=i(9703),r=i(73019);function a(e,t){let i,a=[],l=[],c=e.options.attributes?.style,u=Object.keys(c??{}),h={};u.forEach(e=>{h[e]=null});let d=t=>{(0,n.css)(t,h),(0,n.attr)(t,"style")||(0,n.attr)(t,"style",null),!t.attributes.length&&o.Dom.isTag(t,e.element)&&a.push(t)};for(let h of o.Dom.eachGen(t))o.Dom.isContentEditable(h,t)&&((0,r.isSuitElement)(e,h,!0)&&(!c||(0,s.hasSameStyleKeys)(h,c))?(void 0===i&&(i=!0),c?l.push(()=>d(h)):a.push(h)):c&&o.Dom.isHTMLElement(h)&&u.some(e=>""!==(0,n.css)(h,e,!0))?(void 0===i&&(i=!1),l.push(()=>d(h))):o.Dom.isEmptyTextNode(h)||void 0!==i||(i=!1));return l.forEach(e=>e()),a.forEach(o.Dom.unwrap),!!i}},83335:function(e,t,i){"use strict";i.d(t,{wrapUnwrappedText:function(){return s}});var o=i(23211),n=i(23175);function s(e,t,i){let s=i.editor,r=i.createInside,a=(e,t="previousSibling")=>{let r=e,a=e;for(;a&&!(0,n.isMarker)(a)&&!o.Dom.isTag(a,i.o.enter)&&(r=a,a=a[t]?a[t]:a.parentNode&&!o.Dom.isBlock(a.parentNode)&&a.parentNode!==s?a.parentNode:null,!o.Dom.isBlock(a)););return r},l=a(t),c=a(t,"nextSibling"),u=i.s.createRange();u.setStartBefore(l),u.setEndAfter(c);let h=u.extractContents(),d=r.element(e.element);return o.Dom.append(d,h),o.Dom.safeInsertNode(u,d),e.elementIsBlock&&o.Dom.isEmpty(d)&&!o.Dom.isTag(d.firstElementChild,"br")&&o.Dom.append(d,r.element("br")),d}},73154:function(e,t,i){"use strict";i.d(t,{wrap:function(){return l}});var o=i(27795),n=i(7909),s=i(80991),r=i(97110),a=i(83335);function l(e,t,i){var l,u,h;let d=(l=e,u=t,h=i,l.elementIsBlock?o.Dom.up(u,e=>o.Dom.isBlock(e)&&!o.Dom.isTag(e,c)&&!Array.from(e.childNodes).some(e=>o.Dom.isBlock(e)),h.editor)||(0,a.wrapUnwrappedText)(l,u,h):((0,n.attr)(u,"size",null),u));if(e.elementIsList)return(0,r.wrapList)(e,d,i);let p=o.Dom.replace(d,e.element,i.createInside,!0);return e.elementIsBlock&&((0,s.css)(p,"fontSize",null),(0,s.css)(p,"fontWeight",null),(0,n.attr)(p,"style")||(0,n.attr)(p,"style",null)),p}let c=new Set(["td","th","tr","tbody","table","li","ul","ol"]);i.d(t,["WRAP_NODES",0,c])},96127:function(e,t,i){"use strict";i.d(t,{ApplyStyle:function(){return r}});var o=i(51640),n=i(98394),s=i(78462);function r(e,t){let{s:i,editor:r}=e;r.firstChild?.normalize();let a=i.fakes(),l=i.isCollapsed(),c=n.INITIAL;try{for(let n of i.wrapInTagGen(a)){let i={collapsed:l,mode:c,element:n,next:s.states.START,jodit:e,style:t},r=new o.FiniteStateMachine(s.states.START,s.transactions);for(;!e.isInDestruct&&r.getState()!==s.states.END;)i=r.dispatch("exec",i);c=i.mode}}finally{i.restoreFakes(a)}}},84578:function(e,t,i){"use strict";i.d(t,{CommitStyle:function(){return l}});var o=i(25045),n=i(81937),s=i(57821),r=i(98394),a=i(96127);class l{isApplied(e,t){let i=this.__applyMap.get(e);return!!i&&!!i[t]}setApplied(e,t){let i=this.__applyMap.get(e)??{};i[t]=!0,this.__applyMap.set(e,i)}get elementIsList(){return!!(this.options.element&&n.LIST_TAGS.has(this.options.element))}get element(){return this.options.element||this.defaultTag}get elementIsBlock(){return!!(this.options.element&&n.IS_BLOCK.test(this.options.element))}get isElementCommit(){return!!(this.options.element&&this.options.element!==this.options.defaultTag)}get defaultTag(){return this.options.defaultTag?this.options.defaultTag:this.elementIsBlock?"p":"span"}get elementIsDefault(){return this.element===this.defaultTag}apply(e){let{hooks:t}=this.options,i=t?Object.keys(t):[];try{i.forEach(i=>{e.e.on((0,s.camelCase)(r._PREFIX+"_"+i),t[i])}),(0,a.ApplyStyle)(e,this)}finally{i.forEach(i=>{e.e.off((0,s.camelCase)(r._PREFIX+"_"+i),t[i])}),this.__applyMap=new WeakMap}e.isInDestruct||(e.synchronizeValues(),e.e.fire("afterCommitStyle",this))}constructor(e){(0,o._)(this,"options",void 0),(0,o._)(this,"__applyMap",void 0),this.options=e,this.__applyMap=new WeakMap}}},98394:function(e,t,i){"use strict";i.d(t,["INITIAL",0,"initial","REPLACE",0,"replace","_PREFIX",0,"commitStyle"])},78462:function(e,t,i){"use strict";var o=i(81937),n=i(23211),s=i(28712),r=i(51640),a=i(98394);let l={START:"START",ELEMENT:"ELEMENT",UNWRAP:"UNWRAP",UNWRAP_CHILDREN:"UNWRAP_CHILDREN",CHANGE:"CHANGE",REPLACE_DEFAULT:"REPLACE_DEFAULT",LIST:"LIST",TOGGLE_LIST:"TOGGLE_LIST",WRAP:"WRAP",EXTRACT:"EXTRACT",END:"END"},c={[l.START]:{exec(e){let{element:t,jodit:i,style:o,mode:s,collapsed:a}=e;if(!n.Dom.isContentEditable(t,i.editor)||(0,r.isInsideInvisibleElement)(t,i.editor)||!a&&n.Dom.isEmptyContent(t))return{...e,next:l.END};let c=(0,r.getSuitParent)(o,t,i.editor)||(0,r.getSuitChild)(o,t);if(c)return{...e,next:l.ELEMENT,element:c};let u=(0,r.suitableClosest)(o,t,i.editor);return o.elementIsList&&n.Dom.isList(u)?{...e,next:l.LIST}:u?{...e,next:l.EXTRACT}:{...e,next:"unwrap"!==s?l.UNWRAP_CHILDREN:l.END}}},[l.LIST]:{exec(e){let{element:t,jodit:i,mode:s}=e;if(s!==a.INITIAL&&"unwrap"!==s&&s!==a.REPLACE)return{...e,next:l.END};let r=n.Dom.closest(t,"li",i.editor);return r&&n.Dom.closest(t,o.LIST_TAGS,i.editor)?{...e,element:r,next:l.TOGGLE_LIST}:{...e,next:l.END}}},[l.TOGGLE_LIST]:{exec:e=>({...e,mode:(0,r.toggleOrderedList)(e.style,e.element,e.jodit,e.mode),next:l.END})},[l.EXTRACT]:{exec(e){let{element:t,jodit:i,style:o}=e,a=(0,r.suitableClosest)(o,t,i.editor);return((0,s.assert)(a,"This place should have an element"),!o.elementIsBlock&&o.options.attributes?.style&&n.Dom.isBlock(a))?{...e,next:l.WRAP}:(o.elementIsBlock||(0,r.extractSelectedPart)(a,t,i),{...e,element:a,next:l.ELEMENT})}},[l.UNWRAP_CHILDREN]:{exec(e){let{element:t,style:i}=e;return(0,r.unwrapChildren)(i,t)?{...e,mode:"unwrap",next:l.END}:{...e,next:l.WRAP}}},[l.WRAP]:{exec(e){let{element:t,jodit:i,style:o}=e,n=(0,r.wrap)(o,t,i);return{...e,next:o.elementIsList?l.END:l.CHANGE,mode:"wrap",element:n}}},[l.ELEMENT]:{exec(e){let{style:t,element:i,jodit:o}=e;return(0,r.toggleAttributes)(t,i,o,a.INITIAL,!0)!==a.INITIAL?{...e,next:l.CHANGE}:n.Dom.isTag(i,t.element)?{...e,next:l.UNWRAP}:{...e,next:l.END}}},[l.CHANGE]:{exec(e){let{style:t,element:i,jodit:o,mode:s}=e,a=(0,r.toggleAttributes)(t,i,o,e.mode);return"wrap"!==s&&"unset"===a&&!i.attributes.length&&n.Dom.isTag(i,t.element)?{...e,next:l.UNWRAP}:{...e,mode:a,next:l.END}}},[l.UNWRAP]:{exec(e){let{element:t,style:i,jodit:o}=e;if(t.attributes.length&&n.Dom.isTag(t,i.element))return{...e,next:l.REPLACE_DEFAULT};let s=t.parentElement;return i.elementIsBlock&&!i.elementIsDefault&&s&&s!==o.editor&&n.Dom.isBlock(s)&&!n.Dom.isTag(s,r.WRAP_NODES)?{...e,next:l.REPLACE_DEFAULT}:(n.Dom.unwrap(t),{...e,mode:"unwrap",next:l.END})}},[l.REPLACE_DEFAULT]:{exec:e=>(n.Dom.replace(e.element,e.style.defaultTag,e.jodit.createInside,!0),{...e,mode:a.REPLACE,next:l.END})},[l.END]:{exec:e=>e}};i.d(t,["states",0,l,"transactions",0,c])},8006:function(e,t,i){"use strict";i.d(t,{AsyncStorage:function(){return l}});var o=i(25045),n=i(57821),s=i(91162),r=i(59807),a=i(9505);class l{async set(e,t){let i=await this.provider;return await i.set((0,n.camelCase)(this.prefix+e),t),this}async delete(e){let t=await this.provider;return await t.delete((0,n.camelCase)(this.prefix+e)),this}async get(e){return(await this.provider).get((0,n.camelCase)(this.prefix+e))}async exists(e){return(await this.provider).exists((0,n.camelCase)(this.prefix+e))}async clear(){let e=await this.provider;return await e.clear(),this}async close(){let e=await this.provider;"close"in e&&"function"==typeof e.close&&await e.close()}static makeStorage(e=!1,t,i){let o,n=i?.defaultProvider;return null!=n?new l(Promise.resolve(o="local"===n?(0,r.canUsePersistentStorage)("localStorage")?new r.LocalStorageProvider("Jodit_"+(t||"")):new a.MemoryStorageProvider:"memory"===n?new a.MemoryStorageProvider:n),t):("localStorage"===e||"sessionStorage"===e?(0,r.canUsePersistentStorage)(e)&&(o=new r.LocalStorageProvider("Jodit_"+(t||""),e)):("indexedDB"===e||!0===e)&&(o=(0,s.canUseIndexedDB)().then(e=>e?new s.IndexedDBProvider("Jodit_"+(t||""),"keyValueStore"):new a.MemoryStorageProvider)),o||(o=new a.MemoryStorageProvider),new l(Promise.resolve(o),t))}constructor(e,t){(0,o._)(this,"provider",void 0),(0,o._)(this,"prefix",void 0),this.provider=e,this.prefix="Jodit_",t&&(this.prefix+=t)}}},91162:function(e,t,i){"use strict";i.d(t,{IndexedDBProvider:function(){return s},canUseIndexedDB:function(){return l},clearUseIndexedDBCache:function(){return a}});var o=i(25045),n=i(81937);class s{getDB(){return this.dbPromise||(this.dbPromise=new Promise((e,t)=>{let i=indexedDB.open(this.dbName,this.DB_VERSION);i.onerror=()=>{t(i.error)},i.onsuccess=()=>{e(i.result)},i.onupgradeneeded=e=>{let t=e.target.result;t.objectStoreNames.contains(this.storeName)||t.createObjectStore(this.storeName)}})),this.dbPromise}async performTransaction(e,t){try{let i=(await this.getDB()).transaction([this.storeName],e).objectStore(this.storeName),o=t(i);return new Promise((e,t)=>{o.onsuccess=()=>{e(o.result)},o.onerror=()=>{t(o.error)}})}catch(e){return Promise.reject(e)}}async set(e,t){try{await this.performTransaction("readwrite",i=>i.put(t,e))}catch(e){n.IS_PROD}return this}async delete(e){try{await this.performTransaction("readwrite",t=>t.delete(e))}catch{}return this}async get(e){try{return await this.performTransaction("readonly",t=>t.get(e))}catch{return}}async exists(e){try{let t=await this.performTransaction("readonly",t=>t.get(e));return void 0!==t}catch{return!1}}async clear(){try{await this.performTransaction("readwrite",e=>e.clear())}catch{}return this}async close(){if(this.dbPromise){try{(await this.dbPromise).close()}catch{}this.dbPromise=null}}async keys(){try{let e=await this.performTransaction("readonly",e=>e.getAllKeys());return e&&"object"==typeof e&&"then"in e&&(e=await e),e.map(e=>e+"")}catch{return[]}}async values(){try{let e=await this.performTransaction("readonly",e=>e.getAll());return e&&"object"==typeof e&&"then"in e&&(e=await e),e}catch{return[]}}async entries(){try{let[e,t]=await Promise.all([this.keys(),this.values()]);return e.map((e,i)=>[e,t[i]])}catch{return[]}}constructor(e="JoditDB",t="keyValueStore"){(0,o._)(this,"dbName",void 0),(0,o._)(this,"dbPromise",void 0),(0,o._)(this,"DB_VERSION",void 0),(0,o._)(this,"storeName",void 0),this.dbName=e,this.dbPromise=null,this.DB_VERSION=1,this.storeName=t}}let r=null;function a(){r=null}async function l(){if(null!=r)return r;try{if("u"<typeof indexedDB)return r=!1,!1;let e="___Jodit___"+Math.random().toString(),t=indexedDB.open(e);return r=await new Promise(i=>{t.onerror=()=>{i(!1)},t.onsuccess=()=>{indexedDB.deleteDatabase(e),i(!0)}})}catch{return r=!1,!1}}},59807:function(e,t,i){"use strict";i.d(t,{LocalStorageProvider:function(){return n}});var o=i(25045);class n{get storage(){return"sessionStorage"===this.strategy?sessionStorage:localStorage}set(e,t){try{let i=this.storage.getItem(this.rootKey),o=i?JSON.parse(i):{};o[e]=t,this.storage.setItem(this.rootKey,JSON.stringify(o))}catch{}return this}delete(e){try{let t=this.storage.getItem(this.rootKey);if(t){let i=JSON.parse(t);delete i[e],this.storage.setItem(this.rootKey,JSON.stringify(i))}}catch{}return this}get(e){try{let t=this.storage.getItem(this.rootKey),i=t?JSON.parse(t):{};return void 0!==i[e]?i[e]:void 0}catch{}}exists(e){return null!=this.get(e)}clear(){try{this.storage.removeItem(this.rootKey)}catch{}return this}constructor(e,t="localStorage"){(0,o._)(this,"rootKey",void 0),(0,o._)(this,"strategy",void 0),this.rootKey=e,this.strategy=t}}i.d(t,["canUsePersistentStorage",0,(e="localStorage")=>{let t=new Map;if(t.has(e))return t.get(e);let i="___Jodit___"+Math.random().toString(),o="sessionStorage"===e?sessionStorage:localStorage;try{o.setItem(i,"1");let n="1"===o.getItem(i);return o.removeItem(i),t.set(e,n),n}catch{}return t.set(e,!1),!1}])},9505:function(e,t,i){"use strict";i.d(t,{MemoryStorageProvider:function(){return n}});var o=i(25045);class n{set(e,t){return this.data.set(e,t),this}delete(e){return this.data.delete(e),this}get(e){return this.data.get(e)}exists(e){return this.data.has(e)}clear(){return this.data.clear(),this}constructor(){(0,o._)(this,"data",new Map)}}},25222:function(e,t,i){"use strict";i.d(t,{AsyncStorage:function(){return o.AsyncStorage},IndexedDBProvider:function(){return n.IndexedDBProvider},LocalStorageProvider:function(){return s.LocalStorageProvider},MemoryStorageProvider:function(){return r.MemoryStorageProvider},Storage:function(){return a.Storage},StorageKey:function(){return"Jodit_"},canUseIndexedDB:function(){return n.canUseIndexedDB},canUsePersistentStorage:function(){return s.canUsePersistentStorage},clearUseIndexedDBCache:function(){return n.clearUseIndexedDBCache}});var o=i(8006),n=i(91162),s=i(59807),r=i(9505),a=i(24475)},24475:function(e,t,i){"use strict";i.d(t,{Storage:function(){return l}});var o=i(25045),n=i(57821),s=i(59807),r=i(9505);let a="Jodit_";class l{set(e,t){return this.provider.set((0,n.camelCase)(this.prefix+e),t),this}delete(e){return this.provider.delete((0,n.camelCase)(this.prefix+e)),this}get(e){return this.provider.get((0,n.camelCase)(this.prefix+e))}exists(e){return this.provider.exists((0,n.camelCase)(this.prefix+e))}clear(){return this.provider.clear(),this}static makeStorage(e=!1,t){let i;return"localStorage"===e||"sessionStorage"===e?(0,s.canUsePersistentStorage)(e)&&(i=new s.LocalStorageProvider(a+(t||""),e)):!0===e&&(0,s.canUsePersistentStorage)("localStorage")&&(i=new s.LocalStorageProvider(a+(t||""))),i||(i=new r.MemoryStorageProvider),new l(i,t)}constructor(e,t){(0,o._)(this,"provider",void 0),(0,o._)(this,"prefix",void 0),this.provider=e,this.prefix=a,t&&(this.prefix+=t)}}},80512:function(e,t,i){"use strict";i.d(t,{Dlgs:function(){return a}});var o=i(28077),n=i(28686),s=i(71125),r=i(37333);class a{dlg(e){let t=(0,o.getPopupViewRoot)(this.o,this.container,this.od.body),i=new r.Dialog({language:this.o.language,shadowRoot:this.o.shadowRoot,popupRoot:t,ownerWindow:this.o.ownerWindow,defaultTimeout:this.o.defaultTimeout,direction:this.o.direction,theme:this.o.theme,globalFullSize:this.o.globalFullSize,...e});return(0,s.markOwner)(this,i.container),i.parent=this,i.bindDestruct(this)}confirm(e,t,i){return e=l(e,this),t=l(t,this),r.Confirm.call(this.dlg({closeOnClickOverlay:!0}),e,t,i)}prompt(e,t,i,o,n){return e=l(e,this),t=l(t,this),o=l(o,this),r.Prompt.call(this.dlg({closeOnClickOverlay:!0}),e,t,i,o,n)}alert(e,t,i,o){return e=l(e,this),t=l(t,this),r.Alert.call(this.dlg({closeOnClickOverlay:!0}),e,t,i,o)}}function l(e,t){return(0,n.isString)(e)&&!(0,n.isHTML)(e)&&(e=t.i18n(e)),e}},23183:function(e,t,i){"use strict";i.d(t,{Elms:function(){return n}});var o=i(23211);class n{getElm(e){let t=this.getFullElName(e);return o.Dom.first(this.container,e=>o.Dom.isHTMLElement(e)&&e.classList.contains(t))}getElms(e){let t=this.getFullElName(e),i=[];return o.Dom.each(this.container,e=>{o.Dom.isHTMLElement(e)&&e.classList.contains(t)&&i.push(e)}),i}}},81987:function(e,t,i){"use strict";i.d(t,{Mods:function(){return n}});var o=i(18303);class n{afterSetMod(e,t){}setMod(e,t,i){e=e.toLowerCase();let n=this.mods[e];if(n===t)return this;let s=`${this.componentName}_${e}_`,r=(i||this.container).classList;return null!=n&&r.remove(`${s}${n.toString().toLowerCase()}`),(0,o.isVoid)(t)||""===t||r.add(`${s}${t.toString().toLowerCase()}`),this.mods[e]=t,this.afterSetMod(e,t),this}getMod(e){return this.mods[e]??null}}},53681:function(e,t,i){"use strict";i.d(t,{Button:function(){return v},UIButton:function(){return _}});var o=i(25045),n=i(31635),s=i(69364),r=i(51676),a=i(91672),l=i(68616),c=i(23211),u=i(91565),h=i(85932),d=i(28712),p=i(7909),f=i(96007),m=i(29434);let g=()=>({size:"middle",type:"button",role:"button",name:"",value:"",variant:"initial",disabled:!1,activated:!1,icon:{name:"empty",fill:"",iconURL:"",scale:void 0},tooltip:"",text:"",tabIndex:void 0});class _ extends f.UIElement{className(){return"UIButton"}setState(e){return Object.assign(this.state,e),this}get text(){let e=this.getElm("text");return(0,d.assert)(e,"Text element not found"),e}get icon(){let e=this.getElm("icon");return(0,d.assert)(e,"Icon element not found"),e}onChangeSize(){this.setMod("size",this.state.size)}onChangeType(){(0,p.attr)(this.container,"type",this.state.type)}onChangeRole(){(0,p.attr)(this.container,"role",this.state.role)}updateSize(){let e=(0,a.getComponentClass)("UIList"),t=this.closest(e);if(t){this.state.size=t.buttonSize;return}}onChangeStatus(){this.setMod("variant",this.state.variant)}onChangeText(){this.text.textContent=this.jodit.i18n(this.state.text),this.updateAriaLabel()}onChangeTextSetMode(){this.setMod("text-icons",!!this.state.text.trim().length)}onChangeDisabled(){(0,p.attr)(this.container,"disabled",this.state.disabled||null)}onChangeActivated(){(0,p.attr)(this.container,"aria-pressed",this.state.activated)}onChangeName(){this.container.classList.add(`${this.componentName}_${this.clearName(this.state.name)}`),this.name=this.state.name,(0,p.attr)(this.container,"data-ref",this.state.name),(0,p.attr)(this.container,"ref",this.state.name),this.updateAriaLabel()}onChangeTooltip(){let e=this.state.tooltip?this.jodit.i18n(this.state.tooltip):null;this.get("j.o.useNativeTooltip")&&(0,p.attr)(this.container,"title",e),(0,p.attr)(this.container,"aria-label",e),this.updateAriaLabel()}updateAriaLabel(){let e=this.state.text.trim().length>0,t=this.state.tooltip?this.jodit.i18n(this.state.tooltip):!e&&this.state.name?this.state.name:null;(0,p.attr)(this.container,"aria-label",t),(0,p.attr)(this.button,"aria-label",e?null:t)}onChangeTabIndex(){(0,p.attr)(this.container,"tabindex",this.state.tabIndex)}onChangeIcon(){let e=this.get("j.o.textIcons");if(!0===e||(0,u.isFunction)(e)&&e(this.state.name))return;c.Dom.detach(this.icon);let t=m.Icon.makeIcon(this.j,this.state.icon);t&&c.Dom.append(this.icon,t)}focus(){this.container.focus()}isFocused(){let{activeElement:e}=this.od;return!!(e&&c.Dom.isOrContains(this.container,e))}createContainer(){let e=this.componentName,t=this.j.c.element("button",{class:e,type:"button",role:"button",ariaPressed:!1}),i=this.j.c.span(e+"__icon"),o=this.j.c.span(e+"__text");return c.Dom.append(t,i),c.Dom.append(t,o),t}destruct(){return this.j.e.off(this),this.j.e.off(this.container),super.destruct()}onAction(e){return this.actionHandlers.push(e),this}__onActionFire(e){e.buffer={actionTrigger:this},this.actionHandlers.forEach(t=>t.call(this,e)),this.j.e.fire(this,"click",e)}constructor(e,t){super(e),(0,o._)(this,"isButton",!0),(0,o._)(this,"state",g()),(0,o._)(this,"button",void 0),(0,o._)(this,"actionHandlers",[]),this.button=this.container,this.updateSize(),this.onChangeSize(),this.onChangeStatus(),t&&this.hookStatus(s.STATUSES.ready,()=>{this.setState(t)})}}function v(e,t,i,o){let n=new _(e);return n.state.tabIndex=e.o.allowTabNavigation?0:-1,(0,h.isString)(t)?(n.state.icon.name=t,n.state.name=t,o&&(n.state.variant=o),i&&(n.state.text=i)):n.setState(t),n}(0,n.__decorate)([r.cache],_.prototype,"text",null),(0,n.__decorate)([r.cache],_.prototype,"icon",null),(0,n.__decorate)([(0,l.watch)("state.size",{immediately:!1})],_.prototype,"onChangeSize",null),(0,n.__decorate)([(0,l.watch)("state.type",{immediately:!1})],_.prototype,"onChangeType",null),(0,n.__decorate)([(0,l.watch)("state.role",{immediately:!1})],_.prototype,"onChangeRole",null),(0,n.__decorate)([(0,l.watch)("parentElement")],_.prototype,"updateSize",null),(0,n.__decorate)([(0,l.watch)("state.variant",{immediately:!1})],_.prototype,"onChangeStatus",null),(0,n.__decorate)([(0,l.watch)("state.text",{immediately:!1})],_.prototype,"onChangeText",null),(0,n.__decorate)([(0,l.watch)("state.text",{immediately:!1})],_.prototype,"onChangeTextSetMode",null),(0,n.__decorate)([(0,l.watch)("state.disabled")],_.prototype,"onChangeDisabled",null),(0,n.__decorate)([(0,l.watch)("state.activated")],_.prototype,"onChangeActivated",null),(0,n.__decorate)([(0,l.watch)("state.name",{immediately:!1})],_.prototype,"onChangeName",null),(0,n.__decorate)([(0,l.watch)("state.tooltip",{immediately:!1})],_.prototype,"onChangeTooltip",null),(0,n.__decorate)([(0,l.watch)("state.tabIndex",{immediately:!1})],_.prototype,"onChangeTabIndex",null),(0,n.__decorate)([(0,l.watch)("state.icon",{immediately:!1})],_.prototype,"onChangeIcon",null),(0,n.__decorate)([r.cacheHTML],_.prototype,"createContainer",null),(0,n.__decorate)([(0,l.watch)("button:click")],_.prototype,"__onActionFire",null),_=(0,n.__decorate)([a.component],_),i.d(t,["UIButtonState",0,g])},15367:function(e,t,i){"use strict";i.d(t,{UIButtonGroup:function(){return u}});var o=i(25045),n=i(31635),s=i(91672),r=i(23211),a=i(28712),l=i(53681),c=i(63468);class u extends c.UIGroup{className(){return"UIButtonGroup"}render(e){return`<div>
14
+ `))}h()};e.onprogress=()=>d(!1),e.onload=()=>{d(!0),a=!0,this.__isFulfilled=!0,h()},e.onerror=()=>{u=c.connection("Connection error"),a=!0,this.__isFulfilled=!0,h()},e.onabort=()=>{u=c.abort("Abort connection"),a=!0,this.__isFulfilled=!0,h()},e.withCredentials=t.withCredentials??!1;let{url:f,data:p,method:m}=i;e.open(m,f,!0),t.contentType&&e.setRequestHeader&&e.setRequestHeader("Content-type",t.contentType);let{headers:g}=t;(0,l.isFunction)(g)&&(g=await g.call(this)),g&&e.setRequestHeader&&Object.keys(g).forEach(t=>{e.setRequestHeader(t,g[t])}),e.send(p?this.__buildParams(p):void 0);try{for(;;)if(s.length>0)yield s.shift();else if(a)break;else await new Promise(e=>{r=e})}finally{this.__isFulfilled||this.abort()}if(u)throw u}prepareRequest(){if(!this.o.url)throw c.error("Need URL for AJAX request");let e=this.o.url,t=this.o.data,i=(this.o.method||"get").toLowerCase();if("get"===i&&t&&(0,l.isPlainObject)(t)){let i=e.indexOf("?");if(-1!==i){let o=(0,l.parseQuery)(e.substring(i));e=e.substring(0,i)+"?"+(0,l.buildQuery)({...o,...t})}else e+="?"+(0,l.buildQuery)(this.o.data)}let o={url:e,method:i,data:t};return d.log.splice(100),d.log.push(o),o}destruct(){this.__isDestructed||(this.__isDestructed=!0,this.__activated&&!this.__isFulfilled&&(this.abort(),this.__isFulfilled=!0),this.__async.destruct())}constructor(e,t=u.Config.prototype.defaultAjaxOptions){(0,o._)(this,"__async",new s.Async),(0,o._)(this,"xhr",void 0),(0,o._)(this,"options",void 0),(0,o._)(this,"__isFulfilled",!1),(0,o._)(this,"__activated",!1),(0,o._)(this,"__isDestructed",!1),this.options=(0,l.ConfigProto)(e||{},t),this.xhr=this.o.xhr?this.o.xhr():new XMLHttpRequest}}(0,o._)(d,"log",[]),(0,n.__decorate)([a.autobind],d.prototype,"destruct",null)},37102:function(e,t,i){"use strict";i(5266).Config.prototype.defaultAjaxOptions={successStatuses:[200,201,202],method:"GET",url:"",data:null,contentType:"application/x-www-form-urlencoded; charset=UTF-8",headers:{"X-REQUESTED-WITH":"XMLHttpRequest"},withCredentials:!1,xhr:()=>new XMLHttpRequest}},73714:function(e,t,i){"use strict";i.d(t,{Ajax:function(){return o.Ajax},Response:function(){return n.Response}});var o=i(17338),n=i(32855)},32855:function(e,t,i){"use strict";i.d(t,{Response:function(){return n}});var o=i(25045);class n{get url(){return this.request.url}async json(){return JSON.parse(this.body)}text(){return Promise.resolve(this.body)}async blob(){return this.body}constructor(e,t,i,n){(0,o._)(this,"status",void 0),(0,o._)(this,"statusText",void 0),(0,o._)(this,"request",void 0),(0,o._)(this,"body",void 0),this.request=e,this.status=t,this.statusText=i,this.body=n}}},43134:function(e,t,i){"use strict";i.d(t,{composedRanges:function(){return n}});var o=i(28686);function n(e,t){let i=e.getComposedRanges;if(!(0,o.isFunction)(i))return null;for(let o of[[{shadowRoots:[t]}],[t]]){let n;try{n=i.apply(e,o)}catch{continue}if(function(e,t){return Array.isArray(e)&&e.length>0&&e.every(e=>{var i;return(i=e.startContainer)===t||t.contains(i)})}(n,t))return n}return null}},42259:function(e,t,i){"use strict";i.d(t,{composedRanges:function(){return s.composedRanges},cursorInTheEdgeOfString:function(){return a},findCorrectCurrentNode:function(){return l},moveNodeInsideStart:function(){return r.moveNodeInsideStart}});var o=i(81937),n=i(23211),s=i(43134),r=i(89817);function a(e,t,i,n){let s=e.nodeValue?.length?e.nodeValue:"";if(n&&s.replace((0,o.INVISIBLE_SPACE_REG_EXP_END)(),"").length>t)return!0;let r=(0,o.INVISIBLE_SPACE_REG_EXP_START)().exec(s);return i&&(r&&r[0].length<t||!r&&t>0)}function l(e,t,i,o,s,r){if((e=t.startContainer.childNodes[t.startOffset])||(e=t.startContainer.childNodes[t.startOffset-1],i=!0),e&&o&&!n.Dom.isText(e)){if(!i&&n.Dom.isText(e.previousSibling))e=e.previousSibling;else if(s){let t=e=>i?e.lastChild:r(e),o=t(e);for(;o;){if(o&&n.Dom.isText(o)){e=o;break}o=t(o)}}}if(e&&!o&&!n.Dom.isText(e)){let t=e,i=e;do t=t.firstChild,i=i.lastChild;while(t&&i&&!n.Dom.isText(t))t===i&&t&&n.Dom.isText(t)&&(e=t)}return{node:e,rightMode:i}}i(7470)},89817:function(e,t,i){"use strict";i.d(t,{moveNodeInsideStart:function(){return s}});var o=i(81937),n=i(23211);function s(e,t,i){let s=n.Dom.findSibling(t,i),r=n.Dom.findSibling(t,!i);for(;n.Dom.isElement(s)&&!n.Dom.isTag(s,o.INSEPARABLE_TAGS)&&n.Dom.isContentEditable(s,e.editor)&&(!r||!n.Dom.closest(t,n.Dom.isElement,e.editor));)i||!s.firstChild?n.Dom.append(s,t):n.Dom.before(s.firstChild,t),s=n.Dom.sibling(t,i),r=n.Dom.sibling(t,!i)}},7470:function(e,t,i){"use strict";i.d(t,{moveTheNodeAlongTheEdgeOutward:function(){return n}});var o=i(23211);function n(e,t,i){let n=e;for(;n&&n!==i&&!(o.Dom.findSibling(n,t)||o.Dom.isBlock(n.parentElement));)(n=n.parentElement)&&n!==i&&(t?o.Dom.before(n,e):o.Dom.after(n,e))}},59841:function(e,t,i){"use strict";i.d(t,{CommitStyle:function(){return n.CommitStyle},Selection:function(){return o.Selection}});var o=i(98595),n=i(84578)},98595:function(e,t,i){"use strict";i.d(t,{Selection:function(){return m}});var o=i(25045),n=i(31635),s=i(81937),r=i(84839),a=i(23211),l=i(65946),c=i(28686),u=i(16849),h=i(28712),d=i(7470),f=i(84578),p=i(42259);class m{get j(){return this.jodit}errorNode(e){if(!a.Dom.isNode(e))throw(0,l.error)("Parameter node must be instance of Node")}get area(){return this.j.editor}get win(){return this.j.ew}get doc(){return this.j.ed}get sel(){let{shadowRoot:e}=this.j.o;if(e){if((0,c.isFunction)(e.getSelection))return e.getSelection();let t=this.__composedSelection(e);if(t)return t}return this.win.getSelection()}__composedSelection(e){let t=this.win.getSelection();if(!t)return null;let{anchorNode:i}=t;if(i&&a.Dom.isOrContains(e,i))return null;let o=(0,p.composedRanges)(t,e);if(!o)return null;let n=o.map(e=>{let t=this.createRange();return t.setStart(e.startContainer,e.startOffset),t.setEnd(e.endContainer,e.endOffset),t}),s=n[0],r={rangeCount:n.length,getRangeAt:e=>n[e],isCollapsed:n.every(e=>e.collapsed),anchorNode:s?s.startContainer:null,anchorOffset:s?s.startOffset:0,focusNode:s?s.endContainer:null,focusOffset:s?s.endOffset:0,toString:()=>n.map(e=>e.toString()).join("")};return new Proxy(t,{get(e,t){if((0,c.isString)(t)&&t in r)return r[t];let i=Reflect.get(e,t,e);return(0,c.isFunction)(i)?i.bind(e):i}})}get range(){let e=this.sel;return e&&e.rangeCount?e.getRangeAt(0):this.createRange()}get isInsideArea(){let{sel:e}=this;if(!e?.rangeCount)return!1;for(let t=0;t<e.rangeCount;t+=1)if(!a.Dom.isOrContains(this.area,e.getRangeAt(t).commonAncestorContainer))return!1;return!0}createRange(e=!1){let t=this.doc.createRange();return e&&this.selectRange(t),t}remove(){let e=this.sel,t=this.current();if(e&&t)for(let t=0;t<e.rangeCount;t+=1){let i=e.getRangeAt(t);a.Dom.isOrContains(this.area,i.commonAncestorContainer)&&(i.deleteContents(),i.collapse(!0))}}clear(){this.sel?.rangeCount&&this.sel?.removeAllRanges()}removeNode(e){if(!a.Dom.isOrContains(this.j.editor,e,!0))throw(0,l.error)("Selection.removeNode can remove only editor's children");a.Dom.safeRemove(e),this.j.e.fire("afterRemoveNode",e)}insertCursorAtPoint(e,t){try{let i=this.createRange(),o=this.doc.caretPositionFromPoint?.(e,t),n=o?null:this.doc.caretRangeFromPoint?.(e,t);if(o)i.setStart(o.offsetNode,o.offset);else{if(!n)return!1;i.setStart(n.startContainer,n.startOffset)}if(!a.Dom.isOrContains(this.area,i.startContainer))return!1;return i.collapse(!0),this.removeMarkers(),this.selectRange(i),!0}catch{}return!1}get hasMarkers(){return!!this.markers.length}get markers(){return(0,l.$$)("span[data-"+s.MARKER_CLASS+"]",this.area)}removeMarkers(){a.Dom.safeRemove(...this.markers)}marker(e=!1,t){let i=null;t&&(i=t.cloneRange()).collapse(e);let o=this.j.createInside.span();return o.id=s.MARKER_CLASS+"_"+Number(new Date)+"_"+(Math.random()+"").slice(2),(0,l.css)(o,{lineHeight:"0",display:"none"}),a.Dom.markTemporary(o),(0,l.attr)(o,"data-"+s.MARKER_CLASS,e?"start":"end"),a.Dom.append(o,this.j.createInside.text(s.INVISIBLE_SPACE)),i&&a.Dom.isOrContains(this.area,e?i.startContainer:i.endContainer)&&i.insertNode(o),o}restore(){let e=this.markers,t=new Map(e.map(e=>[e.id,e])),i=[],o=!1;for(let n=0;n<e.length;n+=1){let r=e[n];if("start"!==(0,l.attr)(r,"data-"+s.MARKER_CLASS))continue;o||="true"===(0,l.attr)(r,"data-selection-backward");let c=(0,l.attr)(r,"data-selection-end"),u=c?t.get(c):void 0;!c&&e[n+1]&&"end"===(0,l.attr)(e[n+1],"data-"+s.MARKER_CLASS)&&(u=e[n+1]);let h=this.createRange();if(u)h.setStartAfter(r),h.setEndBefore(u);else{let e=r.previousSibling;a.Dom.isText(e)?h.setStart(e,e.nodeValue?.length??0):h.setStartBefore(r),h.collapse(!0)}i.push(h)}a.Dom.safeRemove(...e),i.length&&this.__selectRanges(i,o)}__isBackward(){let e=this.sel;return!!(e&&1===e.rangeCount&&!e.isCollapsed&&e.anchorNode===e.getRangeAt(0).endContainer&&e.anchorOffset===e.getRangeAt(0).endOffset)}__ranges(){let e=this.sel;return e?Array.from({length:e.rangeCount},(t,i)=>e.getRangeAt(i).cloneRange()):[]}fakes(){if(!this.isInsideArea)return[];let e=this.__isBackward(),t=this.__ranges(),i=t.map(e=>{let t=e.collapsed,i=e.cloneRange();i.collapse(!0);let o=this.j.createInside.fake();a.Dom.safeInsertNode(i,o),e.setStartBefore(o);let n=[o];if(t)e.collapse(!0);else{let t=e.cloneRange();t.collapse(!1);let i=this.j.createInside.fake();a.Dom.safeInsertNode(t,i),e.setEndAfter(i),n.push(i)}return n});return this.__fakeSelections.set(i[0][0],{pairs:i,backward:e}),this.__selectRanges(t,e),i[0]}restoreFakes(e){if(!e.length)return;let t=this.__fakeSelections.get(e[0]);if(this.__fakeSelections.delete(e[0]),this.j.isInDestruct)return;let i=[];for(let o of t?.pairs??[e]){let e=o.filter(e=>e.isConnected&&a.Dom.isOrContains(this.area,e,!0));if(!e.length)continue;let[t,n]=e,s=this.createRange();for(let i of(s.setStartAfter(t),n?s.setEndBefore(n):s.collapse(!0),e))i.parentNode?.firstChild!==i.parentNode?.lastChild&&a.Dom.safeRemove(i);i.push(s)}i.length&&this.__selectRanges(i,t?.backward)}save(e=!1){if(this.hasMarkers)return[];let t=this.sel;if(!t||!t.rangeCount)return[];let i=this.__isBackward(),o=[],n=t.rangeCount,s=[];for(let e=0;n>e;e+=1)if(s[e]=t.getRangeAt(e),!a.Dom.isOrContains(this.area,s[e].commonAncestorContainer))return[];for(let e=0;n>e;e+=1)if(s[e].collapsed){let t=this.marker(!0,s[e]);o[e]={startId:t.id,collapsed:!0,startMarker:t.outerHTML}}else{let t=this.marker(!0,s[e]),r=this.marker(!1,s[e]);n>1&&(0,l.attr)(t,"data-selection-end",r.id),i&&(0,l.attr)(t,"data-selection-backward","true"),o[e]={startId:t.id,endId:r.id,collapsed:!1,startMarker:t.outerHTML,endMarker:r.outerHTML}}if(!e){t.removeAllRanges();for(let e=n-1;e>=0;--e){let i=this.area.querySelector("#"+o[e].startId);if(i){if(o[e].collapsed)s[e].setStartAfter(i),s[e].collapse(!0);else if(s[e].setStartBefore(i),o[e].endId){let t=this.area.querySelector("#"+o[e].endId);t&&s[e].setEndAfter(t)}try{t.addRange(s[e].cloneRange())}catch{}}}}return o}focus(e={preventScroll:!0}){if(!this.isFocused()){let t=(0,l.getScrollParent)(this.j.container),i=t?.scrollTop;this.j.iframe&&"complete"===this.doc.readyState&&this.j.iframe.focus(e),this.win.focus(),this.area.focus(e),i&&t?.scrollTo&&t.scrollTo(0,i);let o=this.sel,n=o?.rangeCount?o?.getRangeAt(0):null;if(!n||!a.Dom.isOrContains(this.area,n.startContainer)){let e=this.createRange();e.setStart(this.area,0),e.collapse(!0),this.selectRange(e,!1)}return this.j.editorIsActive||this.j?.events?.fire("focus"),!0}return!1}isCollapsed(){let e=this.sel;for(let t=0;e&&t<e.rangeCount;t+=1)if(!e.getRangeAt(t).collapsed)return!1;return!0}isFocused(){return this.doc.hasFocus&&this.doc.hasFocus()&&this.area===this.doc.activeElement}current(e=!0){if(this.j.getRealMode()!==s.MODE_WYSIWYG)return null;let t=this.sel;if(!t||0===t.rangeCount)return null;let i=t.getRangeAt(0),o=i.startContainer,n=!1;if(!a.Dom.isOrContains(this.area,o))return null;if(a.Dom.isTag(o,"br")&&t.isCollapsed)return o;if(!a.Dom.isText(o)){let s=(0,p.findCorrectCurrentNode)(o,i,n,t.isCollapsed,e,e=>n?e.lastChild:e.firstChild);o=s.node,n=s.rightMode}return o&&a.Dom.isOrContains(this.area,o)?o:null}insertNode(e,t=!0,i=!0){this.errorNode(e),this.j.e.fire("safeHTML",e);let o=a.Dom.isFragment(e)?e.lastChild:e;if(!o||this.j.isInDestruct)return;!this.isFocused()&&this.j.isEditorMode()&&(this.focus(),this.restore());let n=this.sel;this.j.history.snapshot.transaction(()=>{if(this.isCollapsed()||this.j.execCommand("Delete"),this.j.e.fire("beforeInsertNode",e),!(o=a.Dom.isFragment(e)?e.lastChild:e)||this.j.isInDestruct)return;if(n&&n.rangeCount){let t=n.getRangeAt(0),{firstChild:i}=e;a.Dom.isOrContains(this.area,t.commonAncestorContainer)?a.Dom.safeInsertNode(t,e):a.Dom.append(this.area,e),[()=>i?.previousSibling,()=>i?.previousSibling,()=>i?.previousSibling?.lastChild].forEach(e=>{let t=e();t&&a.Dom.isEmptyTextNode(t)&&a.Dom.safeRemove(t)})}else a.Dom.append(this.area,e);let i=e=>{if(a.Dom.isBlock(e)){let t=e.lastChild;if(t)return i(t)}this.setCursorAfter(e)};t&&(a.Dom.isFragment(e)?o&&i(o):i(e)),this.j.o.scrollToPastedContent&&(0,l.scrollIntoViewIfNeeded)(o??e,this.j.editor,this.doc)}),i&&this.j.events&&this.j.__imdSynchronizeValues(),this.j.events&&this.j.e.fire("afterInsertNode",a.Dom.isFragment(e)?o:e)}insertHTML(e,t=!0){if(""===e)return;let i=this.j.createInside.div(),o=this.j.createInside.fragment();!this.isFocused()&&this.j.isEditorMode()&&(this.focus(),this.restore()),a.Dom.isNode(e)?a.Dom.append(i,e):i.innerHTML=e.toString(),!this.j.isEditorMode()&&!1===this.j.e.fire("insertHTML",i.innerHTML)||i.lastChild&&(a.Dom.moveContent(i,o),this.insertNode(o,t,!1),this.j.__imdSynchronizeValues())}insertImage(e,t=null,i=null){let o=(0,c.isString)(e)?this.j.createInside.element("img"):e;if((0,c.isString)(e)&&(0,l.attr)(o,"src",e),null!=i){let e=i.toString();e&&"auto"!==e&&0>(e+"").indexOf("px")&&0>(e+"").indexOf("%")&&(e+="px"),(0,l.attr)(o,"width",e)}t&&"object"==typeof t&&(0,l.css)(o,t);let{imageDefaultAlign:n,imageAlignClasses:s}=this.j.o;n&&"normal"!==n&&(0,u.hAlignElement)(o,n,s);let r=()=>{(o.naturalHeight<o.offsetHeight||o.naturalWidth<o.offsetWidth)&&(0,l.css)(o,{width:"",height:""}),o.removeEventListener("load",r)};this.j.e.on(o,"load",r),o.complete&&r(),this.insertNode(o),this.j.e.fire("afterInsertImage",o)}eachSelection(e){let t=new Set;for(let i of this.__ranges())a.Dom.isOrContains(this.area,i.commonAncestorContainer)&&this.__eachRange(i,i=>{t.has(i)||(t.add(i),e(i))})}__eachRange(e,t){let i=e.commonAncestorContainer;a.Dom.isHTMLElement(i)||(i=i.parentElement);let o=[],n=e.startOffset,r=i.childNodes.length,u=e.startContainer===this.area?i.childNodes[n<r?n:r-1]:e.startContainer,h=e.endContainer===this.area?i.childNodes[e.endOffset-1]:e.endContainer;a.Dom.isText(u)&&u===e.startContainer&&e.startOffset===u.nodeValue?.length&&u.nextSibling&&(u=u.nextSibling),a.Dom.isText(h)&&h===e.endContainer&&0===e.endOffset&&h.previousSibling&&(h=h.previousSibling);let d=e=>{!e||e===i||a.Dom.isEmptyTextNode(e)||(0,c.isMarker)(e)||o.push(e)};d(u),u!==h&&a.Dom.isOrContains(i,u,!0)&&a.Dom.find(u,e=>(d(e),e===h||e&&e.contains&&e.contains(h)),i,!0,!1);let f=e=>{if(a.Dom.isOrContains(this.j.editor,e,!0)){if(e.nodeName.match(/^(UL|OL)$/))return(0,l.toArray)(e.childNodes).forEach(f);if(a.Dom.isTag(e,"li"))if(e.firstChild)e=e.firstChild;else{let t=this.j.createInside.text(s.INVISIBLE_SPACE);a.Dom.append(e,t),e=t}t(e)}};0===o.length&&(a.Dom.isEmptyTextNode(u)&&o.push(u),u?.firstChild&&o.push(u.firstChild)),o.forEach(f)}cursorInTheEdge(e,t,i=null){let o=!e,n=this.sel,s=n?.rangeCount?n.getRangeAt(0):null;if(!s)return null;let r=e?s.startContainer:s.endContainer,l=e?s.startOffset:s.endOffset;if(i??=r,!a.Dom.isOrContains(t,r)||!a.Dom.isOrContains(t,i))return null;let c=e=>!!(e&&!a.Dom.isTag(e,"br")&&!a.Dom.isEmptyTextNode(e)&&!a.Dom.isTemporary(e)&&!(a.Dom.isElement(e)&&!0===this.j.e.fire("isInvisibleForCursor",e)));if(a.Dom.isText(r)){if((0,p.cursorInTheEdgeOfString)(r,l,e,o))return!1}else{let e=r.childNodes,t=o?e.length:l;for(let i=o?l:0;t>i;i+=1)if(c(e[i]))return!1}let u=i;for(;u&&u!==t;){let t=a.Dom.sibling(u,e);if(!t){u=u.parentNode;continue}if(c(u=t))return!1}return!0}cursorOnTheLeft(e,t){return this.cursorInTheEdge(!0,e,t)}cursorOnTheRight(e,t){return this.cursorInTheEdge(!1,e,t)}setCursorAfter(e){return this.setCursorNearWith(e,!1)}setCursorBefore(e){return this.setCursorNearWith(e,!0)}setCursorNearWith(e,t){if(this.errorNode(e),!a.Dom.isOrContains(this.area,e,!0))throw(0,l.error)("Node element must be in editor");let i=this.createRange(),o=null;return a.Dom.isText(e)?t?i.setStart(e,0):i.setEnd(e,e.nodeValue?.length??0):(o=this.j.createInside.fake(),t?i.setStartBefore(e):i.setEndAfter(e),i.collapse(t),a.Dom.safeInsertNode(i,o),i.selectNode(o)),i.collapse(t),this.selectRange(i),o}setCursorIn(e,t=!1){if(this.errorNode(e),!a.Dom.up(e,e=>e===this.area||e&&e.parentNode===this.area,this.area))throw(0,l.error)("Node element must be in editor");let i=this.createRange(),o=e,n=e;do{if(a.Dom.isText(o)||a.Dom.isTag(o,s.INSEPARABLE_TAGS))break;n=o,o=t?o.firstChild:o.lastChild}while(o)if(!o){let e=this.j.createInside.text(s.INVISIBLE_SPACE);a.Dom.isTag(n,s.INSEPARABLE_TAGS)?o=n:(a.Dom.append(n,e),n=e)}let r=o||n;return a.Dom.isTag(r,s.INSEPARABLE_TAGS)?t||a.Dom.isTag(r,"br")?i.setStartBefore(r):i.setEndAfter(r):i.selectNodeContents(r),i.collapse(t),this.selectRange(i),n}selectRange(e,t=!0){return this.__selectRanges([e],!1,t)}__selectRanges(e,t=!1,i=!0){let o=this.sel;if(i&&!this.isFocused()&&"focus"!==this.j.e.current&&this.focus(),o&&(o.removeAllRanges(),e.forEach(e=>o.addRange(e)),t&&1===e.length)){let t=e[0];o.setBaseAndExtent(t.endContainer,t.endOffset,t.startContainer,t.startOffset)}return this.j.e.fire("changeSelection"),this}select(e,t=!1){if(this.errorNode(e),!a.Dom.up(e,e=>e===this.area||e&&e.parentNode===this.area,this.area))throw(0,l.error)("Node element must be in editor");let i=!t&&this.__closestNotEditable(e)||e,o=this.createRange();return o[t||i===this.area?"selectNodeContents":"selectNode"](i),this.selectRange(o)}__closestNotEditable(e){let{area:t}=this,i=null,o=e.parentNode;for(;o&&o!==t&&t.contains(o);)a.Dom.isElement(o)&&"false"===o.getAttribute("contenteditable")&&(i=o),o=o.parentNode;return i}get html(){let e=this.sel;if(e&&e.rangeCount>0){let e=this.j.createInside.div();return this.__ranges().forEach(t=>a.Dom.append(e,t.cloneContents())),e.innerHTML}return""}__wrapSelectionFragments(e){this.__splitSelectionBoundaries(e);let t=e.commonAncestorContainer;return(a.Dom.isText(t)&&(t=t.parentNode),t)?this.__wrapSelectionRuns(this.__collectContainedNodes(t,e)):[]}__splitSelectionBoundaries(e){let{endContainer:t,endOffset:i}=e;a.Dom.isText(t)&&i>0&&i<(t.nodeValue?.length??0)&&t.splitText(i);let{startContainer:o,startOffset:n}=e;if(a.Dom.isText(o)&&n>0&&n<(o.nodeValue?.length??0)){let t=o.splitText(n);e.setStart(t,0)}this.__normalizeRangeBoundary(e,!0),this.__normalizeRangeBoundary(e,!1)}__normalizeRangeBoundary(e,t){let i=t?e.startContainer:e.endContainer;if(!a.Dom.isText(i))return;let o=t?e.startOffset:e.endOffset,n=i.nodeValue?.length??0;0===o?t?e.setStartBefore(i):e.setEndBefore(i):o>=n&&(t?e.setStartAfter(i):e.setEndAfter(i))}__collectContainedNodes(e,t,i=this.createRange()){let o=[];return(0,l.toArray)(e.childNodes).forEach(e=>{this.__isFullyContained(t,e,i)?o.push(e):e.childNodes.length&&t.intersectsNode(e)&&o.push(...this.__collectContainedNodes(e,t,i))}),o}__isFullyContained(e,t,i){return i.selectNode(t),0>=e.compareBoundaryPoints(Range.START_TO_START,i)&&e.compareBoundaryPoints(Range.END_TO_END,i)>=0}__wrapSelectionRuns(e){let t=[],i=[],o=()=>{i.length&&(t.push(this.__wrapRunInFont(i)),i=[])};return e.forEach(e=>{a.Dom.isElement(e)&&this.__isOrContainsBlock(e)?(o(),t.push(...this.__wrapSelectionRuns((0,l.toArray)(e.childNodes)))):(i.length&&i[i.length-1].parentNode!==e.parentNode&&o(),i.push(e))}),o(),t}__isOrContainsBlock(e){return!!a.Dom.isBlock(e)||(0,l.toArray)(e.childNodes).some(e=>this.__isOrContainsBlock(e))}__wrapRunInFont(e){let t=this.j.createInside.element("font"),[i]=e;return a.Dom.before(i,t),e.forEach(e=>a.Dom.append(t,e)),t}*wrapInTagGen(e){if(this.sel?.rangeCount&&!this.isInsideArea)return;if(this.isCollapsed()){let t=this.jodit.createInside.element("font",s.INVISIBLE_SPACE);this.insertNode(t,!1,!1),e&&e[0]&&a.Dom.append(t,e[0]);try{yield t}finally{a.Dom.unwrap(t)}return}let t=this.__ranges().flatMap(e=>this.__wrapSelectionFragments(e));try{for(let e of t){if(this.j.isInDestruct||!a.Dom.isOrContains(this.area,e,!0))continue;let{firstChild:t,lastChild:i}=e;if(t&&t===i&&(0,c.isMarker)(t)){a.Dom.unwrap(e);continue}t&&(0,c.isMarker)(t)&&a.Dom.before(e,t),i&&(0,c.isMarker)(i)&&a.Dom.after(e,i),yield e,a.Dom.unwrap(e)}}finally{t.forEach(e=>a.Dom.unwrap(e))}}wrapInTag(e){let t=[];for(let i of this.wrapInTagGen())try{if(i.firstChild&&i.firstChild===i.lastChild&&(0,c.isMarker)(i.firstChild))continue;(0,c.isFunction)(e)?e(i):t.push(a.Dom.replace(i,e,this.j.createInside))}finally{let e=i.parentNode;e&&(a.Dom.unwrap(i),a.Dom.isEmpty(e)&&a.Dom.unwrap(e))}return t}commitStyle(e){(0,h.assert)((0,l.size)(e)>0,"Need to pass at least one option"),new f.CommitStyle(e).apply(this.j)}splitSelection(e,t){if(!this.isCollapsed()||!this.isInsideArea||!a.Dom.isOrContains(this.area,e,!0)||!a.Dom.isOrContains(e,this.range.startContainer)||t&&!a.Dom.isOrContains(e,t,!0))return null;let i=this.createRange(),o=this.range;i.setStartBefore(e);let n=this.cursorOnTheRight(e,t),r=this.cursorOnTheLeft(e,t),l=this.j.createInside.element("br"),c=this.j.createInside.fake(),u=c.cloneNode();try{if(n||r){t?a.Dom.before(t,l):a.Dom.safeInsertNode(o,l);let e=(e,t)=>{let i=t(e);for(;i;){let e=t(i);if(i&&(a.Dom.isTag(i,"br")||a.Dom.isEmptyTextNode(i)))a.Dom.safeRemove(i);else break;i=e}};e(l,e=>e.nextSibling),e(l,e=>e.previousSibling),a.Dom.after(l,u),a.Dom.before(l,c),n?(i.setEndBefore(l),o.setEndBefore(l)):(i.setEndAfter(l),o.setEndAfter(l))}else i.setEnd(o.startContainer,o.startOffset);let d=i.extractContents(),f=e=>a.Dom.each(e,e=>a.Dom.isEmptyTextNode(e)&&a.Dom.safeRemove(e));(0,h.assert)(e.parentNode,"Splitting fails");try{if(f(d),f(e),a.Dom.before(e,d),!t&&n&&l?.parentNode){let e=this.createRange();e.setStartBefore(l),this.selectRange(e)}}catch(e){if(!s.IS_PROD)throw e}let p=e=>{let t=e?.parentNode;t&&t.firstChild===t.lastChild&&a.Dom.append(t,l.cloneNode())};p(c),p(u)}finally{a.Dom.safeRemove(c),a.Dom.safeRemove(u)}return e.previousElementSibling}expandSelection(){if(this.isCollapsed()||!this.isInsideArea)return this;let e=this.__isBackward(),t=this.__ranges().map(e=>this.__expandRange(e));return this.__selectRanges(t,e),this}__expandRange(e){let t=e.cloneRange();if(!a.Dom.isOrContains(this.j.editor,e.commonAncestorContainer,!0))return e;let i=t=>{let i=this.j.createInside.fake(),o=e.cloneRange();return o.collapse(t),a.Dom.safeInsertNode(o,i),(0,d.moveTheNodeAlongTheEdgeOutward)(i,t,this.j.editor),i},o=i(!0),n=i(!1);t.setStartAfter(o),t.setEndBefore(n);let s=a.Dom.findSibling(o,!1),r=a.Dom.findSibling(n,!0);if(s!==r){let e=a.Dom.isElement(s)&&a.Dom.isOrContains(s,n),i=!e&&a.Dom.isElement(r)&&a.Dom.isOrContains(r,o);if(e||i){let i=e?s:r,l=i;for(;a.Dom.isElement(i);)(i=e?i.firstElementChild:i.lastElementChild)&&(e?a.Dom.isOrContains(i,n):a.Dom.isOrContains(i,o))&&(l=i);e?t.setStart(l,0):t.setEnd(l,l.childNodes.length)}}if(a.Dom.safeRemove(o,n),t.collapsed)throw(0,l.error)("Selection is collapsed");return t}constructor(e){(0,o._)(this,"jodit",void 0),(0,o._)(this,"__fakeSelections",void 0),this.jodit=e,this.__fakeSelections=new WeakMap,e.e.on("removeMarkers",()=>{this.removeMarkers()})}}(0,n.__decorate)([r.autobind],m.prototype,"createRange",null),(0,n.__decorate)([r.autobind],m.prototype,"focus",null),(0,n.__decorate)([r.autobind],m.prototype,"setCursorAfter",null),(0,n.__decorate)([r.autobind],m.prototype,"setCursorBefore",null),(0,n.__decorate)([r.autobind],m.prototype,"setCursorIn",null)},17481:function(e,t,i){"use strict";i.d(t,{extractSelectedPart:function(){return r}});var o=i(23211),n=i(23175),s=i(71125);function r(e,t,i){let o=i.s.createRange(),s=(0,n.isMarker)(t.previousSibling)?t.previousSibling:t;o.setStartBefore(e),o.setEndBefore(s),a(e,o,!0);let r=(0,n.isMarker)(t.nextSibling)?t.nextSibling:t;o.setStartAfter(r),o.setEndAfter(e),a(e,o,!1)}function a(e,t,i){let n=t.extractContents();o.Dom.isEmpty(n)&&n.firstChild&&o.Dom.unwrap(n.firstChild),e.parentNode&&(0,s.call)(i?o.Dom.before:o.Dom.after,e,n)}},48729:function(e,t,i){"use strict";i.d(t,{FiniteStateMachine:function(){return a}});var o=i(25045),n=i(81937),s=i(85932),r=i(28712);class a{setState(e){(0,r.assert)(!this.__previewsStates.has(e),"Circled states"),this.__previewsStates.add(e),this.__state=e}getState(){return this.__state}disableSilent(){this.silent=!1}dispatch(e,t){let i=this.transitions[this.getState()][e];if(i){let e=i.call(this,t);return(0,r.assert)(e&&e!==t,"Action should return new value"),(0,r.assert)((0,s.isString)(e.next),"Value should contain the next state"),(0,r.assert)(e.next!==this.getState(),"The new state should not be equal to the old one."),this.setState(e.next),n.IS_PROD||this.silent,e}throw Error(`invalid action: ${this.getState()}.${e.toString()}`)}constructor(e,t){(0,o._)(this,"transitions",void 0),(0,o._)(this,"__state",void 0),(0,o._)(this,"silent",void 0),(0,o._)(this,"__previewsStates",void 0),this.transitions=t,this.silent=!0,this.__previewsStates=new Set,this.setState(e)}}},10171:function(e,t,i){"use strict";i.d(t,{getSuitChild:function(){return r}});var o=i(23211),n=i(83653),s=i(73019);function r(e,t){let{firstChild:i}=t;for(;i&&!(0,n.isNormalNode)(i);)if(!(i=i.nextSibling))return null;return i&&!o.Dom.next(i,n.isNormalNode,t)&&(0,s.isSuitElement)(e,i,!1)?i:null}},19549:function(e,t,i){"use strict";i.d(t,{getSuitParent:function(){return function e(t,i,r){let{parentNode:a}=i;return a===r||!o.Dom.isHTMLElement(a)||o.Dom.next(i,n.isNormalNode,a)||o.Dom.prev(i,n.isNormalNode,a)?null:t.isElementCommit&&t.elementIsBlock&&!o.Dom.isBlock(a)?e(t,a,r):o.Dom.isTag(a,"li")&&!t.isElementCommit&&t.options.attributes?.style||(0,s.isSuitElement)(t,a,!1)&&(!o.Dom.isBlock(a)||t.elementIsBlock)?a:t.isElementCommit&&!o.Dom.isBlock(a)?e(t,a,r):null}}});var o=i(23211),n=i(83653),s=i(73019)},9703:function(e,t,i){"use strict";i.d(t,{hasSameStyle:function(){return c},hasSameStyleKeys:function(){return u}});var o=i(81937),n=i(23211),s=i(18303),r=i(19147),a=i(28712),l=i(80991);function c(e,t){return!!(!n.Dom.isTag(e,"font")&&n.Dom.isHTMLElement(e)&&Object.keys(t).every(i=>{let o=(0,l.css)(e,i,!0);return""===o&&(""===t[i]||null==t[i])||!(0,s.isVoid)(o)&&""!==o&&!(0,s.isVoid)(t[i])&&(0,r.normalizeCssValue)(i,t[i]).toString().toLowerCase()===o.toString().toLowerCase()}))}if(o.globalDocument){let e=o.globalDocument.createElement("div");e.style.color="red",(0,a.assert)(c(e,{color:"red"}),"Style test"),(0,a.assert)(c(e,{fontSize:null}),"Style test"),(0,a.assert)(c(e,{fontSize:""}),"Style test")}function u(e,t){return!!(!n.Dom.isTag(e,"font")&&n.Dom.isHTMLElement(e)&&Object.keys(t).every(t=>""!==(0,l.css)(e,t,!0)))}if(o.globalDocument){let e=o.globalDocument.createElement("div");e.style.color="red",(0,a.assert)(u(e,{color:"red"}),"Style test"),(0,a.assert)(!u(e,{font:"Arial",color:"red"}),"Style test"),(0,a.assert)(!u(e,{border:"1px solid #ccc"}),"Style test")}},51640:function(e,t,i){"use strict";i.d(t,{FiniteStateMachine:function(){return n.FiniteStateMachine},WRAP_NODES:function(){return d.WRAP_NODES},extractSelectedPart:function(){return o.extractSelectedPart},getSuitChild:function(){return s.getSuitChild},getSuitParent:function(){return r.getSuitParent},isInsideInvisibleElement:function(){return a.isInsideInvisibleElement},suitableClosest:function(){return l.suitableClosest},toggleAttributes:function(){return u.toggleAttributes},toggleOrderedList:function(){return c.toggleOrderedList},unwrapChildren:function(){return h.unwrapChildren},wrap:function(){return d.wrap}});var o=i(17481),n=i(48729),s=i(10171),r=i(19549);i(9703);var a=i(39608);i(83653),i(95971);var l=i(73019),c=i(34582);i(97110);var u=i(82794),h=i(89081),d=i(73154);i(83335)},39608:function(e,t,i){"use strict";i.d(t,{isInsideInvisibleElement:function(){return n}});var o=i(23211);function n(e,t){return!!o.Dom.closest(e,["style","script"],t)}},83653:function(e,t,i){"use strict";i.d(t,{isNormalNode:function(){return s}});var o=i(23211),n=i(23175);function s(e){return!!(e&&!o.Dom.isEmptyTextNode(e)&&!o.Dom.isTemporary(e)&&!(0,n.isMarker)(e))}},95971:function(e,t,i){"use strict";i.d(t,{elementsEqualAttributes:function(){return c},isSameAttributes:function(){return l}});var o=i(18073),n=i(93640),s=i(28712),r=i(7909),a=i(9703);function l(e,t){return!(0,o.size)(t)||((0,s.assert)(t,"Attrs must be a non-empty object"),Object.keys(t).every(i=>{if("class"===i||"className"===i)return((t[i]+"").match(/[^\t\n\f\r ]+/g)??[]).every(t=>e.classList.contains(t));if("style"===i)return(0,a.hasSameStyle)(e,t[i]);let o=t[i];return(0,n.attr)(e,i)===(null==o?o:o+"")}))}function c(e,t){return e.attributes.length===t.attributes.length&&Array.from(e.attributes).every(e=>(0,r.attrRaw)(t,e.name)===e.value)}},73019:function(e,t,i){"use strict";i.d(t,{isSuitElement:function(){return r},suitableClosest:function(){return a}});var o=i(23211),n=i(9703),s=i(83653);function r(e,t,i,a=!0){if(!t||!(0,s.isNormalNode)(t))return!1;let{element:l,elementIsDefault:c,options:u}=e;if(o.Dom.isList(t)&&e.elementIsList)return!0;let h=o.Dom.isTag(t,l);return!!(h&&!(c&&i)||u.attributes?.style&&(a?(0,n.hasSameStyle)(t,u.attributes.style):(0,n.hasSameStyleKeys)(t,u.attributes.style))&&!e.elementIsList)||!h&&!i&&c&&o.Dom.isInlineBlock(t)}function a(e,t,i){return o.Dom.closest(t,t=>r(e,t,!0,!1),i)}},34582:function(e,t,i){"use strict";i.d(t,{toggleOrderedList:function(){return c}});var o=i(23211),n=i(28712),s=i(17481),r=i(82794),a=i(98394),l=i(97110);function c(e,t,i,o){if(!t)return o;let n=t.parentElement;if(!n)return o;let s=i.e.fire(`${a._PREFIX}BeforeToggleList`,o,e,n);if(void 0!==s)return s;let c=i.e.fire.bind(i.e,`${a._PREFIX}AfterToggleList`);if("unwrap"!==o){let s="change"===(0,r.toggleAttributes)(e,t.parentElement,i,a.INITIAL,!0);if(o===a.REPLACE||s||n.tagName.toLowerCase()!==e.element){let o=u(a.REPLACE,n,t,i,e),s=(0,l.wrapList)(e,o,i);return c(a.REPLACE,s,e),a.REPLACE}}return c("unwrap",u("unwrap",n,t,i,e),e),"unwrap"}function u(e,t,i,r,l){let c=r.e.fire(`${a._PREFIX}BeforeUnwrapList`,e,t,l);return c?((0,n.assert)(o.Dom.isHTMLElement(c),`${a._PREFIX}BeforeUnwrapList hook must return HTMLElement`),c):((0,s.extractSelectedPart)(t,i,r),(0,n.assert)(o.Dom.isHTMLElement(i.parentElement),"Element should be inside the list"),o.Dom.unwrap(i.parentElement),e===a.REPLACE)?i:o.Dom.replace(i,"br"!==r.o.enter.toLowerCase()?r.o.enter:r.createInside.fragment(),r.createInside)}},97110:function(e,t,i){"use strict";i.d(t,{wrapList:function(){return a}});var o=i(23211),n=i(95971),s=i(82794),r=i(98394);function a(e,t,i){let a=i.e.fire(`${r._PREFIX}BeforeWrapList`,r.REPLACE,t,e)??o.Dom.replace(t,"li",i.createInside),l=a.previousElementSibling,c=a.nextElementSibling,u=o.Dom.isTag(l,e.element)?l:null;return u??=o.Dom.isTag(c,e.element)?c:null,o.Dom.isList(u)&&(0,n.isSameAttributes)(u,e.options.attributes)||(u=i.createInside.element(e.element),(0,s.toggleAttributes)(e,u,i,r.INITIAL),o.Dom.before(a,u)),l===u?o.Dom.append(u,a):o.Dom.prepend(u,a),o.Dom.isTag(u.nextElementSibling,e.element)&&(0,n.elementsEqualAttributes)(u,u.nextElementSibling)&&(o.Dom.append(u,Array.from(u.nextElementSibling.childNodes)),o.Dom.safeRemove(u.nextElementSibling)),i.e.fire(`${r._PREFIX}AfterWrapList`,"wrap",u,e),u}},82794:function(e,t,i){"use strict";i.d(t,{toggleAttributes:function(){return p}});var o=i(81937),n=i(23211),s=i(28077),r=i(28686),a=i(19147),l=i(18073),c=i(93640),u=i(80991),h=i(36400),d=i(98394);let f="toggleAttributes";function p(e,t,i,m,g=!1){var _;if(!g&&e.isApplied(t,f))return m;g||e.setApplied(t,f);let{attributes:v}=e.options;return v&&(0,l.size)(v)>0&&Object.keys(v).forEach(e=>{var f,p;let _=v[e];switch(e){case"style":f=m,(0,c.assert)((0,r.isPlainObject)(_)&&(0,l.size)(_),"Style must be an object"),Object.keys(_).forEach(e=>{let r=(0,u.cssInline)(t,e),l=_[e];if(""!==r||null!=l){let d,p,m,_;if(null==l||""===l){r&&(g||(0,u.css)(t,e,null),f="change");return}if(d=function(e){if(void 0!==(0,h.dataBind)(e,"shadowRoot"))return(0,h.dataBind)(e,"shadowRoot");let t=(0,s.getContainer)(e),i=o.globalDocument.createElement("iframe");(0,u.css)(i,{width:0,height:0,position:"absolute",border:0}),(0,c.attr)(i,"src","about:blank"),n.Dom.append(t,i);let r=i.contentWindow?.document,a=r?r.body:e.od.body;return(0,h.dataBind)(e,"shadowRoot",a),a}(i),p=i.create.element("div"),(0,u.css)(p,"color",(0,u.css)(i.editor,"color")),m=i.create.element(t.tagName.toLowerCase()),(0,c.attr)(m,"style",(0,c.attr)(t,"style")),n.Dom.append(p,m),n.Dom.append(d,p),_=(0,u.css)(m,e),n.Dom.safeRemove(p),_===(0,a.normalizeCssValue)(e,l)){if(!r)return;g||(0,u.css)(t,e,null),f="unset";return}f="change",g||(0,u.css)(t,e,l)}}),m=f;break;case"className":case"class":m=function(e,t,i,o,n){(0,c.assert)((0,r.isString)(t),"Class name must be a string");let s=t.match(/[^\t\n\f\r ]+/g)??[];if(!s.length)return o;let a=e.e.fire.bind(e.e,`${d._PREFIX}AfterToggleAttribute`);return s.every(e=>i.classList.contains(e))?(o="unset",n||(i.classList.remove(...s),0===i.classList.length&&(0,c.attr)(i,"class",null),a(o,i,"class",(0,c.attr)(i,"class")))):(o="change",n||(i.classList.add(...s),a(o,i,"class",t))),o}(i,_,t,m,g);break;default:let b;p=m,(0,c.assert)((0,r.isString)(_)||(0,r.isNumber)(_)||(0,r.isBoolean)(_)||null==_,"Attribute value must be a string or number or boolean or null"),b=i.e.fire.bind(i.e,`${d._PREFIX}AfterToggleAttribute`),(0,c.attr)(t,e)===(null==_?_:_+"")?(g||(0,c.attr)(t,e,null),p="unset",g||b(p,t,e,_)):(p="change",g||((0,c.attr)(t,e,_),b(p,t,e,_))),m=p}}),!g&&v?.style?(_=m,!(0,c.attr)(t,"style")&&((0,c.attr)(t,"style",null),t.attributes.length||t.tagName.toLowerCase()!==e.defaultTag||(n.Dom.unwrap(t),_="unwrap")),_):m}},89081:function(e,t,i){"use strict";i.d(t,{unwrapChildren:function(){return a}});var o=i(23211),n=i(93640),s=i(9703),r=i(73019);function a(e,t){let i,a=[],l=[],c=e.options.attributes?.style,u=Object.keys(c??{}),h={};u.forEach(e=>{h[e]=null});let d=t=>{(0,n.css)(t,h),(0,n.attr)(t,"style")||(0,n.attr)(t,"style",null),!t.attributes.length&&o.Dom.isTag(t,e.element)&&a.push(t)};for(let h of o.Dom.eachGen(t))o.Dom.isContentEditable(h,t)&&((0,r.isSuitElement)(e,h,!0)&&(!c||(0,s.hasSameStyleKeys)(h,c))?(void 0===i&&(i=!0),c?l.push(()=>d(h)):a.push(h)):c&&o.Dom.isHTMLElement(h)&&u.some(e=>""!==(0,n.css)(h,e,!0))?(void 0===i&&(i=!1),l.push(()=>d(h))):o.Dom.isEmptyTextNode(h)||void 0!==i||(i=!1));return l.forEach(e=>e()),a.forEach(o.Dom.unwrap),!!i}},83335:function(e,t,i){"use strict";i.d(t,{wrapUnwrappedText:function(){return s}});var o=i(23211),n=i(23175);function s(e,t,i){let s=i.editor,r=i.createInside,a=(e,t="previousSibling")=>{let r=e,a=e;for(;a&&!(0,n.isMarker)(a)&&!o.Dom.isTag(a,i.o.enter)&&(r=a,a=a[t]?a[t]:a.parentNode&&!o.Dom.isBlock(a.parentNode)&&a.parentNode!==s?a.parentNode:null,!o.Dom.isBlock(a)););return r},l=a(t),c=a(t,"nextSibling"),u=i.s.createRange();u.setStartBefore(l),u.setEndAfter(c);let h=u.extractContents(),d=r.element(e.element);return o.Dom.append(d,h),o.Dom.safeInsertNode(u,d),e.elementIsBlock&&o.Dom.isEmpty(d)&&!o.Dom.isTag(d.firstElementChild,"br")&&o.Dom.append(d,r.element("br")),d}},73154:function(e,t,i){"use strict";i.d(t,{wrap:function(){return l}});var o=i(27795),n=i(7909),s=i(80991),r=i(97110),a=i(83335);function l(e,t,i){var l,u,h;let d=(l=e,u=t,h=i,l.elementIsBlock?o.Dom.up(u,e=>o.Dom.isBlock(e)&&!o.Dom.isTag(e,c)&&!Array.from(e.childNodes).some(e=>o.Dom.isBlock(e)),h.editor)||(0,a.wrapUnwrappedText)(l,u,h):((0,n.attr)(u,"size",null),u));if(e.elementIsList)return(0,r.wrapList)(e,d,i);let f=o.Dom.replace(d,e.element,i.createInside,!0);return e.elementIsBlock&&((0,s.css)(f,"fontSize",null),(0,s.css)(f,"fontWeight",null),(0,n.attr)(f,"style")||(0,n.attr)(f,"style",null)),f}let c=new Set(["td","th","tr","tbody","table","li","ul","ol"]);i.d(t,["WRAP_NODES",0,c])},96127:function(e,t,i){"use strict";i.d(t,{ApplyStyle:function(){return r}});var o=i(51640),n=i(98394),s=i(78462);function r(e,t){let{s:i,editor:r}=e;r.firstChild?.normalize();let a=i.fakes(),l=i.isCollapsed(),c=n.INITIAL;try{for(let n of i.wrapInTagGen(a)){let i={collapsed:l,mode:c,element:n,next:s.states.START,jodit:e,style:t},r=new o.FiniteStateMachine(s.states.START,s.transactions);for(;!e.isInDestruct&&r.getState()!==s.states.END;)i=r.dispatch("exec",i);c=i.mode}}finally{i.restoreFakes(a)}}},84578:function(e,t,i){"use strict";i.d(t,{CommitStyle:function(){return l}});var o=i(25045),n=i(81937),s=i(57821),r=i(98394),a=i(96127);class l{isApplied(e,t){let i=this.__applyMap.get(e);return!!i&&!!i[t]}setApplied(e,t){let i=this.__applyMap.get(e)??{};i[t]=!0,this.__applyMap.set(e,i)}get elementIsList(){return!!(this.options.element&&n.LIST_TAGS.has(this.options.element))}get element(){return this.options.element||this.defaultTag}get elementIsBlock(){return!!(this.options.element&&n.IS_BLOCK.test(this.options.element))}get isElementCommit(){return!!(this.options.element&&this.options.element!==this.options.defaultTag)}get defaultTag(){return this.options.defaultTag?this.options.defaultTag:this.elementIsBlock?"p":"span"}get elementIsDefault(){return this.element===this.defaultTag}apply(e){let{hooks:t}=this.options,i=t?Object.keys(t):[];try{i.forEach(i=>{e.e.on((0,s.camelCase)(r._PREFIX+"_"+i),t[i])}),(0,a.ApplyStyle)(e,this)}finally{i.forEach(i=>{e.e.off((0,s.camelCase)(r._PREFIX+"_"+i),t[i])}),this.__applyMap=new WeakMap}e.isInDestruct||(e.synchronizeValues(),e.e.fire("afterCommitStyle",this))}constructor(e){(0,o._)(this,"options",void 0),(0,o._)(this,"__applyMap",void 0),this.options=e,this.__applyMap=new WeakMap}}},98394:function(e,t,i){"use strict";i.d(t,["INITIAL",0,"initial","REPLACE",0,"replace","_PREFIX",0,"commitStyle"])},78462:function(e,t,i){"use strict";var o=i(81937),n=i(23211),s=i(28712),r=i(51640),a=i(98394);let l={START:"START",ELEMENT:"ELEMENT",UNWRAP:"UNWRAP",UNWRAP_CHILDREN:"UNWRAP_CHILDREN",CHANGE:"CHANGE",REPLACE_DEFAULT:"REPLACE_DEFAULT",LIST:"LIST",TOGGLE_LIST:"TOGGLE_LIST",WRAP:"WRAP",EXTRACT:"EXTRACT",END:"END"},c={[l.START]:{exec(e){let{element:t,jodit:i,style:o,mode:s,collapsed:a}=e;if(!n.Dom.isContentEditable(t,i.editor)||(0,r.isInsideInvisibleElement)(t,i.editor)||!a&&n.Dom.isEmptyContent(t))return{...e,next:l.END};let c=(0,r.getSuitParent)(o,t,i.editor)||(0,r.getSuitChild)(o,t);if(c)return{...e,next:l.ELEMENT,element:c};let u=(0,r.suitableClosest)(o,t,i.editor);return o.elementIsList&&n.Dom.isList(u)?{...e,next:l.LIST}:u?{...e,next:l.EXTRACT}:{...e,next:"unwrap"!==s?l.UNWRAP_CHILDREN:l.END}}},[l.LIST]:{exec(e){let{element:t,jodit:i,mode:s}=e;if(s!==a.INITIAL&&"unwrap"!==s&&s!==a.REPLACE)return{...e,next:l.END};let r=n.Dom.closest(t,"li",i.editor);return r&&n.Dom.closest(t,o.LIST_TAGS,i.editor)?{...e,element:r,next:l.TOGGLE_LIST}:{...e,next:l.END}}},[l.TOGGLE_LIST]:{exec:e=>({...e,mode:(0,r.toggleOrderedList)(e.style,e.element,e.jodit,e.mode),next:l.END})},[l.EXTRACT]:{exec(e){let{element:t,jodit:i,style:o}=e,a=(0,r.suitableClosest)(o,t,i.editor);return((0,s.assert)(a,"This place should have an element"),!o.elementIsBlock&&o.options.attributes?.style&&n.Dom.isBlock(a))?{...e,next:l.WRAP}:(o.elementIsBlock||(0,r.extractSelectedPart)(a,t,i),{...e,element:a,next:l.ELEMENT})}},[l.UNWRAP_CHILDREN]:{exec(e){let{element:t,style:i}=e;return(0,r.unwrapChildren)(i,t)?{...e,mode:"unwrap",next:l.END}:{...e,next:l.WRAP}}},[l.WRAP]:{exec(e){let{element:t,jodit:i,style:o}=e,n=(0,r.wrap)(o,t,i);return{...e,next:o.elementIsList?l.END:l.CHANGE,mode:"wrap",element:n}}},[l.ELEMENT]:{exec(e){let{style:t,element:i,jodit:o}=e;return(0,r.toggleAttributes)(t,i,o,a.INITIAL,!0)!==a.INITIAL?{...e,next:l.CHANGE}:n.Dom.isTag(i,t.element)?{...e,next:l.UNWRAP}:{...e,next:l.END}}},[l.CHANGE]:{exec(e){let{style:t,element:i,jodit:o,mode:s}=e,a=(0,r.toggleAttributes)(t,i,o,e.mode);return"wrap"!==s&&"unset"===a&&!i.attributes.length&&n.Dom.isTag(i,t.element)?{...e,next:l.UNWRAP}:{...e,mode:a,next:l.END}}},[l.UNWRAP]:{exec(e){let{element:t,style:i,jodit:o}=e;if(t.attributes.length&&n.Dom.isTag(t,i.element))return{...e,next:l.REPLACE_DEFAULT};let s=t.parentElement;return i.elementIsBlock&&!i.elementIsDefault&&s&&s!==o.editor&&n.Dom.isBlock(s)&&!n.Dom.isTag(s,r.WRAP_NODES)?{...e,next:l.REPLACE_DEFAULT}:(n.Dom.unwrap(t),{...e,mode:"unwrap",next:l.END})}},[l.REPLACE_DEFAULT]:{exec:e=>(n.Dom.replace(e.element,e.style.defaultTag,e.jodit.createInside,!0),{...e,mode:a.REPLACE,next:l.END})},[l.END]:{exec:e=>e}};i.d(t,["states",0,l,"transactions",0,c])},8006:function(e,t,i){"use strict";i.d(t,{AsyncStorage:function(){return l}});var o=i(25045),n=i(57821),s=i(91162),r=i(59807),a=i(9505);class l{async set(e,t){let i=await this.provider;return await i.set((0,n.camelCase)(this.prefix+e),t),this}async delete(e){let t=await this.provider;return await t.delete((0,n.camelCase)(this.prefix+e)),this}async get(e){return(await this.provider).get((0,n.camelCase)(this.prefix+e))}async exists(e){return(await this.provider).exists((0,n.camelCase)(this.prefix+e))}async clear(){let e=await this.provider;return await e.clear(),this}async close(){let e=await this.provider;"close"in e&&"function"==typeof e.close&&await e.close()}static makeStorage(e=!1,t,i){let o,n=i?.defaultProvider;return null!=n?new l(Promise.resolve(o="local"===n?(0,r.canUsePersistentStorage)("localStorage")?new r.LocalStorageProvider("Jodit_"+(t||"")):new a.MemoryStorageProvider:"memory"===n?new a.MemoryStorageProvider:n),t):("localStorage"===e||"sessionStorage"===e?(0,r.canUsePersistentStorage)(e)&&(o=new r.LocalStorageProvider("Jodit_"+(t||""),e)):("indexedDB"===e||!0===e)&&(o=(0,s.canUseIndexedDB)().then(e=>e?new s.IndexedDBProvider("Jodit_"+(t||""),"keyValueStore"):new a.MemoryStorageProvider)),o||(o=new a.MemoryStorageProvider),new l(Promise.resolve(o),t))}constructor(e,t){(0,o._)(this,"provider",void 0),(0,o._)(this,"prefix",void 0),this.provider=e,this.prefix="Jodit_",t&&(this.prefix+=t)}}},91162:function(e,t,i){"use strict";i.d(t,{IndexedDBProvider:function(){return s},canUseIndexedDB:function(){return l},clearUseIndexedDBCache:function(){return a}});var o=i(25045),n=i(81937);class s{getDB(){return this.dbPromise||(this.dbPromise=new Promise((e,t)=>{let i=indexedDB.open(this.dbName,this.DB_VERSION);i.onerror=()=>{t(i.error)},i.onsuccess=()=>{e(i.result)},i.onupgradeneeded=e=>{let t=e.target.result;t.objectStoreNames.contains(this.storeName)||t.createObjectStore(this.storeName)}})),this.dbPromise}async performTransaction(e,t){try{let i=(await this.getDB()).transaction([this.storeName],e).objectStore(this.storeName),o=t(i);return new Promise((e,t)=>{o.onsuccess=()=>{e(o.result)},o.onerror=()=>{t(o.error)}})}catch(e){return Promise.reject(e)}}async set(e,t){try{await this.performTransaction("readwrite",i=>i.put(t,e))}catch(e){n.IS_PROD}return this}async delete(e){try{await this.performTransaction("readwrite",t=>t.delete(e))}catch{}return this}async get(e){try{return await this.performTransaction("readonly",t=>t.get(e))}catch{return}}async exists(e){try{let t=await this.performTransaction("readonly",t=>t.get(e));return void 0!==t}catch{return!1}}async clear(){try{await this.performTransaction("readwrite",e=>e.clear())}catch{}return this}async close(){if(this.dbPromise){try{(await this.dbPromise).close()}catch{}this.dbPromise=null}}async keys(){try{let e=await this.performTransaction("readonly",e=>e.getAllKeys());return e&&"object"==typeof e&&"then"in e&&(e=await e),e.map(e=>e+"")}catch{return[]}}async values(){try{let e=await this.performTransaction("readonly",e=>e.getAll());return e&&"object"==typeof e&&"then"in e&&(e=await e),e}catch{return[]}}async entries(){try{let[e,t]=await Promise.all([this.keys(),this.values()]);return e.map((e,i)=>[e,t[i]])}catch{return[]}}constructor(e="JoditDB",t="keyValueStore"){(0,o._)(this,"dbName",void 0),(0,o._)(this,"dbPromise",void 0),(0,o._)(this,"DB_VERSION",void 0),(0,o._)(this,"storeName",void 0),this.dbName=e,this.dbPromise=null,this.DB_VERSION=1,this.storeName=t}}let r=null;function a(){r=null}async function l(){if(null!=r)return r;try{if("u"<typeof indexedDB)return r=!1,!1;let e="___Jodit___"+Math.random().toString(),t=indexedDB.open(e);return r=await new Promise(i=>{t.onerror=()=>{i(!1)},t.onsuccess=()=>{indexedDB.deleteDatabase(e),i(!0)}})}catch{return r=!1,!1}}},59807:function(e,t,i){"use strict";i.d(t,{LocalStorageProvider:function(){return n}});var o=i(25045);class n{get storage(){return"sessionStorage"===this.strategy?sessionStorage:localStorage}set(e,t){try{let i=this.storage.getItem(this.rootKey),o=i?JSON.parse(i):{};o[e]=t,this.storage.setItem(this.rootKey,JSON.stringify(o))}catch{}return this}delete(e){try{let t=this.storage.getItem(this.rootKey);if(t){let i=JSON.parse(t);delete i[e],this.storage.setItem(this.rootKey,JSON.stringify(i))}}catch{}return this}get(e){try{let t=this.storage.getItem(this.rootKey),i=t?JSON.parse(t):{};return void 0!==i[e]?i[e]:void 0}catch{}}exists(e){return null!=this.get(e)}clear(){try{this.storage.removeItem(this.rootKey)}catch{}return this}constructor(e,t="localStorage"){(0,o._)(this,"rootKey",void 0),(0,o._)(this,"strategy",void 0),this.rootKey=e,this.strategy=t}}i.d(t,["canUsePersistentStorage",0,(e="localStorage")=>{let t=new Map;if(t.has(e))return t.get(e);let i="___Jodit___"+Math.random().toString(),o="sessionStorage"===e?sessionStorage:localStorage;try{o.setItem(i,"1");let n="1"===o.getItem(i);return o.removeItem(i),t.set(e,n),n}catch{}return t.set(e,!1),!1}])},9505:function(e,t,i){"use strict";i.d(t,{MemoryStorageProvider:function(){return n}});var o=i(25045);class n{set(e,t){return this.data.set(e,t),this}delete(e){return this.data.delete(e),this}get(e){return this.data.get(e)}exists(e){return this.data.has(e)}clear(){return this.data.clear(),this}constructor(){(0,o._)(this,"data",new Map)}}},25222:function(e,t,i){"use strict";i.d(t,{AsyncStorage:function(){return o.AsyncStorage},IndexedDBProvider:function(){return n.IndexedDBProvider},LocalStorageProvider:function(){return s.LocalStorageProvider},MemoryStorageProvider:function(){return r.MemoryStorageProvider},Storage:function(){return a.Storage},StorageKey:function(){return"Jodit_"},canUseIndexedDB:function(){return n.canUseIndexedDB},canUsePersistentStorage:function(){return s.canUsePersistentStorage},clearUseIndexedDBCache:function(){return n.clearUseIndexedDBCache}});var o=i(8006),n=i(91162),s=i(59807),r=i(9505),a=i(24475)},24475:function(e,t,i){"use strict";i.d(t,{Storage:function(){return l}});var o=i(25045),n=i(57821),s=i(59807),r=i(9505);let a="Jodit_";class l{set(e,t){return this.provider.set((0,n.camelCase)(this.prefix+e),t),this}delete(e){return this.provider.delete((0,n.camelCase)(this.prefix+e)),this}get(e){return this.provider.get((0,n.camelCase)(this.prefix+e))}exists(e){return this.provider.exists((0,n.camelCase)(this.prefix+e))}clear(){return this.provider.clear(),this}static makeStorage(e=!1,t){let i;return"localStorage"===e||"sessionStorage"===e?(0,s.canUsePersistentStorage)(e)&&(i=new s.LocalStorageProvider(a+(t||""),e)):!0===e&&(0,s.canUsePersistentStorage)("localStorage")&&(i=new s.LocalStorageProvider(a+(t||""))),i||(i=new r.MemoryStorageProvider),new l(i,t)}constructor(e,t){(0,o._)(this,"provider",void 0),(0,o._)(this,"prefix",void 0),this.provider=e,this.prefix=a,t&&(this.prefix+=t)}}},80512:function(e,t,i){"use strict";i.d(t,{Dlgs:function(){return a}});var o=i(28077),n=i(28686),s=i(71125),r=i(37333);class a{dlg(e){let t=(0,o.getPopupViewRoot)(this.o,this.container,this.od.body),i=new r.Dialog({language:this.o.language,shadowRoot:this.o.shadowRoot,popupRoot:t,ownerWindow:this.o.ownerWindow,defaultTimeout:this.o.defaultTimeout,direction:this.o.direction,theme:this.o.theme,globalFullSize:this.o.globalFullSize,...e});return(0,s.markOwner)(this,i.container),i.parent=this,i.bindDestruct(this)}confirm(e,t,i){return e=l(e,this),t=l(t,this),r.Confirm.call(this.dlg({closeOnClickOverlay:!0}),e,t,i)}prompt(e,t,i,o,n){return e=l(e,this),t=l(t,this),o=l(o,this),r.Prompt.call(this.dlg({closeOnClickOverlay:!0}),e,t,i,o,n)}alert(e,t,i,o){return e=l(e,this),t=l(t,this),r.Alert.call(this.dlg({closeOnClickOverlay:!0}),e,t,i,o)}}function l(e,t){return(0,n.isString)(e)&&!(0,n.isHTML)(e)&&(e=t.i18n(e)),e}},23183:function(e,t,i){"use strict";i.d(t,{Elms:function(){return n}});var o=i(23211);class n{getElm(e){let t=this.getFullElName(e);return o.Dom.first(this.container,e=>o.Dom.isHTMLElement(e)&&e.classList.contains(t))}getElms(e){let t=this.getFullElName(e),i=[];return o.Dom.each(this.container,e=>{o.Dom.isHTMLElement(e)&&e.classList.contains(t)&&i.push(e)}),i}}},81987:function(e,t,i){"use strict";i.d(t,{Mods:function(){return n}});var o=i(18303);class n{afterSetMod(e,t){}setMod(e,t,i){e=e.toLowerCase();let n=this.mods[e];if(n===t)return this;let s=`${this.componentName}_${e}_`,r=(i||this.container).classList;return null!=n&&r.remove(`${s}${n.toString().toLowerCase()}`),(0,o.isVoid)(t)||""===t||r.add(`${s}${t.toString().toLowerCase()}`),this.mods[e]=t,this.afterSetMod(e,t),this}getMod(e){return this.mods[e]??null}}},53681:function(e,t,i){"use strict";i.d(t,{Button:function(){return v},UIButton:function(){return _}});var o=i(25045),n=i(31635),s=i(69364),r=i(51676),a=i(91672),l=i(68616),c=i(23211),u=i(91565),h=i(85932),d=i(28712),f=i(7909),p=i(96007),m=i(29434);let g=()=>({size:"middle",type:"button",role:"button",name:"",value:"",variant:"initial",disabled:!1,activated:!1,icon:{name:"empty",fill:"",iconURL:"",scale:void 0},tooltip:"",text:"",tabIndex:void 0});class _ extends p.UIElement{className(){return"UIButton"}setState(e){return Object.assign(this.state,e),this}get text(){let e=this.getElm("text");return(0,d.assert)(e,"Text element not found"),e}get icon(){let e=this.getElm("icon");return(0,d.assert)(e,"Icon element not found"),e}onChangeSize(){this.setMod("size",this.state.size)}onChangeType(){(0,f.attr)(this.container,"type",this.state.type)}onChangeRole(){(0,f.attr)(this.container,"role",this.state.role)}updateSize(){let e=(0,a.getComponentClass)("UIList"),t=this.closest(e);if(t){this.state.size=t.buttonSize;return}}onChangeStatus(){this.setMod("variant",this.state.variant)}onChangeText(){this.text.textContent=this.jodit.i18n(this.state.text),this.updateAriaLabel()}onChangeTextSetMode(){this.setMod("text-icons",!!this.state.text.trim().length)}onChangeDisabled(){(0,f.attr)(this.container,"disabled",this.state.disabled||null)}onChangeActivated(){(0,f.attr)(this.container,"aria-pressed",this.state.activated)}onChangeName(){this.container.classList.add(`${this.componentName}_${this.clearName(this.state.name)}`),this.name=this.state.name,(0,f.attr)(this.container,"data-ref",this.state.name),(0,f.attr)(this.container,"ref",this.state.name),this.updateAriaLabel()}onChangeTooltip(){let e=this.state.tooltip?this.jodit.i18n(this.state.tooltip):null;this.get("j.o.useNativeTooltip")&&(0,f.attr)(this.container,"title",e),(0,f.attr)(this.container,"aria-label",e),this.updateAriaLabel()}updateAriaLabel(){let e=this.state.text.trim().length>0,t=this.state.tooltip?this.jodit.i18n(this.state.tooltip):!e&&this.state.name?this.state.name:null;(0,f.attr)(this.container,"aria-label",t),(0,f.attr)(this.button,"aria-label",e?null:t)}onChangeTabIndex(){(0,f.attr)(this.container,"tabindex",this.state.tabIndex)}onChangeIcon(){let e=this.get("j.o.textIcons");if(!0===e||(0,u.isFunction)(e)&&e(this.state.name))return;c.Dom.detach(this.icon);let t=m.Icon.makeIcon(this.j,this.state.icon);t&&c.Dom.append(this.icon,t)}focus(){this.container.focus()}isFocused(){let{activeElement:e}=this.od;return!!(e&&c.Dom.isOrContains(this.container,e))}createContainer(){let e=this.componentName,t=this.j.c.element("button",{class:e,type:"button",role:"button",ariaPressed:!1}),i=this.j.c.span(e+"__icon"),o=this.j.c.span(e+"__text");return c.Dom.append(t,i),c.Dom.append(t,o),t}destruct(){return this.j.e.off(this),this.j.e.off(this.container),super.destruct()}onAction(e){return this.actionHandlers.push(e),this}__onActionFire(e){e.buffer={actionTrigger:this},this.actionHandlers.forEach(t=>t.call(this,e)),this.j.e.fire(this,"click",e)}constructor(e,t){super(e),(0,o._)(this,"isButton",!0),(0,o._)(this,"state",g()),(0,o._)(this,"button",void 0),(0,o._)(this,"actionHandlers",[]),this.button=this.container,this.updateSize(),this.onChangeSize(),this.onChangeStatus(),t&&this.hookStatus(s.STATUSES.ready,()=>{this.setState(t)})}}function v(e,t,i,o){let n=new _(e);return n.state.tabIndex=e.o.allowTabNavigation?0:-1,(0,h.isString)(t)?(n.state.icon.name=t,n.state.name=t,o&&(n.state.variant=o),i&&(n.state.text=i)):n.setState(t),n}(0,n.__decorate)([r.cache],_.prototype,"text",null),(0,n.__decorate)([r.cache],_.prototype,"icon",null),(0,n.__decorate)([(0,l.watch)("state.size",{immediately:!1})],_.prototype,"onChangeSize",null),(0,n.__decorate)([(0,l.watch)("state.type",{immediately:!1})],_.prototype,"onChangeType",null),(0,n.__decorate)([(0,l.watch)("state.role",{immediately:!1})],_.prototype,"onChangeRole",null),(0,n.__decorate)([(0,l.watch)("parentElement")],_.prototype,"updateSize",null),(0,n.__decorate)([(0,l.watch)("state.variant",{immediately:!1})],_.prototype,"onChangeStatus",null),(0,n.__decorate)([(0,l.watch)("state.text",{immediately:!1})],_.prototype,"onChangeText",null),(0,n.__decorate)([(0,l.watch)("state.text",{immediately:!1})],_.prototype,"onChangeTextSetMode",null),(0,n.__decorate)([(0,l.watch)("state.disabled")],_.prototype,"onChangeDisabled",null),(0,n.__decorate)([(0,l.watch)("state.activated")],_.prototype,"onChangeActivated",null),(0,n.__decorate)([(0,l.watch)("state.name",{immediately:!1})],_.prototype,"onChangeName",null),(0,n.__decorate)([(0,l.watch)("state.tooltip",{immediately:!1})],_.prototype,"onChangeTooltip",null),(0,n.__decorate)([(0,l.watch)("state.tabIndex",{immediately:!1})],_.prototype,"onChangeTabIndex",null),(0,n.__decorate)([(0,l.watch)("state.icon",{immediately:!1})],_.prototype,"onChangeIcon",null),(0,n.__decorate)([r.cacheHTML],_.prototype,"createContainer",null),(0,n.__decorate)([(0,l.watch)("button:click")],_.prototype,"__onActionFire",null),_=(0,n.__decorate)([a.component],_),i.d(t,["UIButtonState",0,g])},15367:function(e,t,i){"use strict";i.d(t,{UIButtonGroup:function(){return u}});var o=i(25045),n=i(31635),s=i(91672),r=i(23211),a=i(28712),l=i(53681),c=i(63468);class u extends c.UIGroup{className(){return"UIButtonGroup"}render(e){return`<div>
15
15
  <div class="&__label">~${e.label}~</div>
16
16
  <div class="&__options"></div>
17
- </div>`}appendChildToContainer(e){let t=this.getElm("options");(0,a.assert)(null!=t,"Options does not exist"),r.Dom.append(t,e)}select(e){this.elements.forEach((t,i)=>{i===e||t.state.value===e?t.state.activated=!0:this.options.radio&&(t.state.activated=!1)});let t=this.elements.filter(e=>e.state.activated).map(e=>({text:e.state.text,value:e.state.value}));this.jodit.e.fire(this,"select",t),this.options.onChange?.(t)}constructor(e,t={radio:!0}){super(e,t.options?.map(t=>{let i=new l.UIButton(e,{text:t.text,value:t.value,variant:"primary"});return i.onAction(()=>{this.select(t.value)}),i}),t),(0,o._)(this,"options",void 0),this.options=t,this.select(t.value??0)}}u=(0,n.__decorate)([s.component],u)},59400:function(e,t,i){"use strict";i.d(t,{Button:function(){return o.Button},UIButton:function(){return o.UIButton},UIButtonGroup:function(){return n.UIButtonGroup},UIButtonState:function(){return o.UIButtonState},UITooltip:function(){return s.UITooltip}});var o=i(53681),n=i(15367),s=i(95399)},95399:function(e,t,i){"use strict";i.d(t,{UITooltip:function(){return m}});var o=i(25045),n=i(31635),s=i(16964),r=i(84839),a=i(27795),l=i(28077),c=i(2373),u=i(23599),h=i(93640),d=i(96007);let p=["scroll.tooltip","joditCloseDialog","mouseleave.tooltip"],f=["escape.tooltip","change.tooltip","changePlace.tooltip","afterOpenPopup.tooltip","hidePopup.tooltip","beforePopupClose.tooltip","closeAllPopups.tooltip"];class m extends d.UIElement{className(){return"UITooltip"}render(){return'<div><div class="&__content"></div></div>'}__onAttach(e){a.Dom.append((0,l.getContainer)(this.j,m),this.container),this.__attachedContainers.add(e),this.__attachedContainers.add(this.j.container),this.j.e.on(e,"mouseenter.tooltip",this.__onMouseEnter,{capture:!0}).on(e,"mouseleave.tooltip",this.__onMouseLeave,{capture:!0}).on(this.j.container,"mouseleave.tooltip",this.__onMouseLeave,{capture:!0})}__addListenersOnEnter(){if(this.__listenClose)return;this.__listenClose=!0;let e=this.j;e.e.on(e.ow,p,this.__hide).on(f,this.__hide)}__removeListenersOnLeave(){if(!this.__listenClose)return;this.__listenClose=!1;let e=this.j;e.e.off(e.ow,p,this.__hide).off(f,this.__hide)}__onMouseLeave(e){this.__currentTarget===e.target&&(this.__hideDelay(),this.__currentTarget=null)}__onMouseEnter(e){if(!a.Dom.isHTMLElement(e.target))return;let t=(0,h.attr)(e.target,"aria-label");if(!t||(0,h.attr)(e.target,"disabled")||!e.target.className.includes("jodit"))return;this.__currentTarget=e.target;let i=e.target;this.__open(()=>{let e=(0,u.position)(i);return{x:e.left+e.width/2,y:e.top+e.height}},t)}__open(e,t){this.__addListenersOnEnter(),this.__isOpened=!0,this.j.async.clearTimeout(this.__hideTimeout),this.j.async.clearTimeout(this.__delayShowTimeout);let i=this.j.o.showTooltipDelay||this.j.defaultTimeout;i?this.__delayShowTimeout=this.j.async.setTimeout(()=>this.__show(e,t),i):this.__show(e,t)}__show(e,t){this.setMod("visible",!0),this.setMod("above",!1),this.getElm("content").innerHTML=t;let i=e(),o=(0,c.getFixedPositionOffset)(this.container);(0,h.css)(this.container,{left:i.x-o.x,top:i.y-o.y});let n=(0,u.position)(this.container),s=this.j.ow.innerHeight;if(n.top+n.height>s){let e=(0,u.position)(this.__currentTarget);this.setMod("above",!0),(0,h.css)(this.container,{top:e.top-n.height-o.y})}}__hide(){this.j.async.clearTimeout(this.__delayShowTimeout),this.j.async.clearTimeout(this.__hideTimeout),this.__removeListenersOnLeave(),this.__isOpened&&(this.__isOpened=!1,this.setMod("visible",!1),a.Dom.detach(this.getElm("content")),(0,h.css)(this.container,{left:-5e3}))}__hideDelay(){this.j.async.clearTimeout(this.__delayShowTimeout),this.j.async.clearTimeout(this.__hideTimeout),this.__isOpened&&(this.__hideTimeout=this.async.setTimeout(this.__hide,this.j.defaultTimeout))}destruct(){this.__attachedContainers.forEach(e=>{this.j.e.off(e,"mouseenter.tooltip",this.__onMouseEnter).off(e,"mouseleave.tooltip",this.__onMouseLeave)}),this.__hide(),super.destruct()}constructor(e){super(e),(0,o._)(this,"__isOpened",!1),(0,o._)(this,"__attachedContainers",new Set),(0,o._)(this,"__listenClose",!1),(0,o._)(this,"__currentTarget",null),(0,o._)(this,"__delayShowTimeout",0),(0,o._)(this,"__hideTimeout",0),e.o.textIcons||!e.o.showTooltip||e.o.useNativeTooltip||(this.j.e.on("getContainer",e=>{this.__onAttach(e)}),e.hookStatus(s.STATUSES.ready,()=>{this.__onAttach(this.j.container)}))}}(0,n.__decorate)([r.autobind],m.prototype,"__onMouseLeave",null),(0,n.__decorate)([r.autobind],m.prototype,"__onMouseEnter",null),(0,n.__decorate)([r.autobind],m.prototype,"__hide",null),(0,n.__decorate)([r.autobind],m.prototype,"__hideDelay",null),m=(0,n.__decorate)([r.component],m)},96007:function(e,t,i){"use strict";i.d(t,{UIElement:function(){return p}});var o=i(25045),n=i(31635),s=i(16964),r=i(24968),a=i(23211),l=i(85932),c=i(7909),u=i(23183),h=i(81987),d=i(29434);class p extends s.ViewComponent{getRole(){return this.options?.role||""}get parentElement(){return this.__parentElement}set parentElement(e){this.__parentElement=e,e&&e.hookStatus("beforeDestruct",()=>this.destruct()),this.updateParentElement(this)}bubble(e){let t=this.parentElement;for(;t;)e(t),t=t.parentElement;return this}updateParentElement(e){return this.__parentElement?.updateParentElement(e),this}get(e,t){return super.get(e,t)||this.getElm(e)}closest(e){let t="object"==typeof e?t=>t===e:t=>s.Component.isInstanceOf(t,e),i=this.__parentElement;for(;i;){if(t(i))return i;i=!i.parentElement&&i.container.parentElement?p.closestElement(i.container.parentElement,p):i.parentElement}return null}static closestElement(e,t){let i=a.Dom.up(e,e=>{if(e){let{component:i}=e;return i&&s.Component.isInstanceOf(i,t)}return!1});return i?i?.component:null}update(){}appendTo(e){return a.Dom.append(e,this.container),this}clearName(e){return e.replace(/[^a-zA-Z0-9]/g,"_")}render(e){return this.j.c.div(this.componentName)}createContainer(e){let t=this.render(e);if((0,l.isString)(t)){let e=this.parseTemplate(t);return e.classList.add(this.componentName),e}return t}parseTemplate(e){return this.j.c.fromHTML(e.replace(/\*([^*]+?)\*/g,(e,t)=>d.Icon.get(t)||"").replace(/&_/g,this.componentName+"_").replace(/~([^~]+?)~/g,(e,t)=>this.i18n(t)))}destruct(){return a.Dom.safeRemove(this.container),this.parentElement=null,super.destruct()}constructor(e,t){super(e),(0,o._)(this,"container",void 0),(0,o._)(this,"name",""),(0,o._)(this,"options",void 0),(0,o._)(this,"__parentElement",null),(0,o._)(this,"mods",{}),this.options=t,this.container=this.createContainer(t);let i=this.getRole();i&&(0,c.attr)(this.container,"role",i),Object.defineProperty(this.container,"component",{value:this,configurable:!0})}}p=(0,n.__decorate)([(0,r.derive)(h.Mods,u.Elms)],p)},4561:function(e,t,i){"use strict";i.d(t,{UIBlock:function(){return l}});var o=i(25045),n=i(31635),s=i(91672),r=i(93640),a=i(63468);class l extends a.UIGroup{className(){return"UIBlock"}constructor(e,t,i={align:"left"}){super(e,t),(0,o._)(this,"options",void 0),this.options=i,this.setMod("align",this.options.align||"left"),this.setMod("width",this.options.width||""),this.options.mod&&this.setMod(this.options.mod,!0),this.options.className&&this.container.classList.add(this.options.className),(0,r.attr)(this.container,"data-ref",i.ref),(0,r.attr)(this.container,"ref",i.ref)}}l=(0,n.__decorate)([s.component],l)},98838:function(e,t,i){"use strict";i.d(t,{UIForm:function(){return u}});var o=i(31635),n=i(80251),s=i(91672),r=i(93640),a=i(65273),l=i(49999),c=i(63468);class u extends c.UIGroup{className(){return"UIForm"}submit(){this.j.e.fire(this.container,"submit")}validate(){for(let e of this.allChildren.filter(e=>n.Component.isInstanceOf(e,a.UIInput)))if(!e.validate())return!1;for(let e of this.allChildren.filter(e=>n.Component.isInstanceOf(e,l.UISelect)))if(!e.validate())return!1;return!0}onSubmit(e){return this.j.e.on(this.container,"submit",()=>{let t=this.allChildren.filter(e=>n.Component.isInstanceOf(e,a.UIInput));return!!this.validate()&&(e(t.reduce((e,t)=>(e[t.state.name]=t.value,e),{})),!1)}),this}createContainer(){let e=this.j.c.element("form");return e.classList.add(this.componentName),(0,r.attr)(e,"dir",this.j.o.direction||"auto"),(0,r.attr)(e,"novalidate",""),e}constructor(...e){super(...e),this.options?.className&&this.container.classList.add(this.options?.className)}}u=(0,o.__decorate)([s.component],u)},5658:function(e,t,i){"use strict";i.d(t,{UIBlock:function(){return o.UIBlock},UICheckbox:function(){return s.UICheckbox},UIFileInput:function(){return s.UIFileInput},UIForm:function(){return n.UIForm},UIInput:function(){return s.UIInput},UISelect:function(){return s.UISelect},UITextArea:function(){return s.UITextArea}});var o=i(4561),n=i(98838),s=i(2602)},87329:function(e,t,i){"use strict";i.d(t,{UITextArea:function(){return c}});var o=i(25045),n=i(31635),s=i(84839),r=i(91672),a=i(80991),l=i(65273);class c extends l.UIInput{className(){return"UITextArea"}createNativeInput(e){return this.j.create.element("textarea")}onChangeStateSize(){let{size:e,resizable:t}=this.state;(0,a.css)(this.nativeInput,"resize",t?"auto":"none"),this.nativeInput.rows=e??5}constructor(e,t){super(e,t),(0,o._)(this,"state",{...c.defaultState}),Object.assign(this.state,t),!1===this.state.resizable&&(0,a.css)(this.nativeInput,"resize","none")}}(0,o._)(c,"defaultState",{...l.UIInput.defaultState,size:5,resizable:!0}),(0,n.__decorate)([(0,s.watch)(["state.size","state.resizable"])],c.prototype,"onChangeStateSize",null),c=(0,n.__decorate)([r.component],c)},24641:function(e,t,i){"use strict";i.d(t,{UICheckbox:function(){return l}});var o=i(25045),n=i(31635),s=i(84839),r=i(23211),a=i(65273);class l extends a.UIInput{className(){return"UICheckbox"}render(){return this.j.c.element("label",{className:this.componentName})}onChangeChecked(){this.value=this.state.checked.toString(),this.nativeInput.checked=this.state.checked,this.setMod("checked",this.state.checked)}onChangeNativeCheckBox(){this.state.checked=this.nativeInput.checked}onChangeSwitch(){this.setMod("switch",this.state.switch);let e=this.getElm("switch-slider");this.state.switch?(e||(e=this.j.c.div(this.getFullElName("switch-slider"))),r.Dom.after(this.nativeInput,e)):r.Dom.safeRemove(e)}constructor(e,t){super(e,{...t,type:"checkbox"}),(0,o._)(this,"state",{...l.defaultState}),Object.assign(this.state,t)}}(0,o._)(l,"defaultState",{...a.UIInput.defaultState,checked:!1,switch:!1}),(0,n.__decorate)([(0,s.watch)("state.checked"),(0,s.hook)("ready")],l.prototype,"onChangeChecked",null),(0,n.__decorate)([(0,s.watch)("nativeInput:change")],l.prototype,"onChangeNativeCheckBox",null),(0,n.__decorate)([(0,s.watch)("state.switch"),(0,s.hook)("ready")],l.prototype,"onChangeSwitch",null),l=(0,n.__decorate)([s.component],l)},75587:function(e,t,i){"use strict";i.d(t,{UIFileInput:function(){return c}});var o=i(25045),n=i(31635),s=i(91672),r=i(23211),a=i(53681),l=i(65273);class c extends l.UIInput{className(){return"UIFileInput"}createContainer(e){this.button=new a.UIButton(this.j,{tooltip:e.tooltip,icon:{name:"plus"}});let{container:t}=this.button;this.nativeInput||(this.nativeInput=this.createNativeInput(e));let{nativeInput:i}=this;return i.classList.add(this.getFullElName("input")),t.classList.add(this.componentName),r.Dom.append(t,i),t}createNativeInput(e){return this.j.create.fromHTML(`<input
17
+ </div>`}appendChildToContainer(e){let t=this.getElm("options");(0,a.assert)(null!=t,"Options does not exist"),r.Dom.append(t,e)}select(e){this.elements.forEach((t,i)=>{i===e||t.state.value===e?t.state.activated=!0:this.options.radio&&(t.state.activated=!1)});let t=this.elements.filter(e=>e.state.activated).map(e=>({text:e.state.text,value:e.state.value}));this.jodit.e.fire(this,"select",t),this.options.onChange?.(t)}constructor(e,t={radio:!0}){super(e,t.options?.map(t=>{let i=new l.UIButton(e,{text:t.text,value:t.value,variant:"primary"});return i.onAction(()=>{this.select(t.value)}),i}),t),(0,o._)(this,"options",void 0),this.options=t,this.select(t.value??0)}}u=(0,n.__decorate)([s.component],u)},59400:function(e,t,i){"use strict";i.d(t,{Button:function(){return o.Button},UIButton:function(){return o.UIButton},UIButtonGroup:function(){return n.UIButtonGroup},UIButtonState:function(){return o.UIButtonState},UITooltip:function(){return s.UITooltip}});var o=i(53681),n=i(15367),s=i(95399)},95399:function(e,t,i){"use strict";i.d(t,{UITooltip:function(){return m}});var o=i(25045),n=i(31635),s=i(16964),r=i(84839),a=i(27795),l=i(28077),c=i(2373),u=i(23599),h=i(93640),d=i(96007);let f=["scroll.tooltip","joditCloseDialog","mouseleave.tooltip"],p=["escape.tooltip","change.tooltip","changePlace.tooltip","afterOpenPopup.tooltip","hidePopup.tooltip","beforePopupClose.tooltip","closeAllPopups.tooltip"];class m extends d.UIElement{className(){return"UITooltip"}render(){return'<div><div class="&__content"></div></div>'}__onAttach(e){a.Dom.append((0,l.getContainer)(this.j,m),this.container),this.__attachedContainers.add(e),this.__attachedContainers.add(this.j.container),this.j.e.on(e,"mouseenter.tooltip",this.__onMouseEnter,{capture:!0}).on(e,"mouseleave.tooltip",this.__onMouseLeave,{capture:!0}).on(this.j.container,"mouseleave.tooltip",this.__onMouseLeave,{capture:!0})}__addListenersOnEnter(){if(this.__listenClose)return;this.__listenClose=!0;let e=this.j;e.e.on(e.ow,f,this.__hide).on(p,this.__hide)}__removeListenersOnLeave(){if(!this.__listenClose)return;this.__listenClose=!1;let e=this.j;e.e.off(e.ow,f,this.__hide).off(p,this.__hide)}__onMouseLeave(e){this.__currentTarget===e.target&&(this.__hideDelay(),this.__currentTarget=null)}__onMouseEnter(e){if(!a.Dom.isHTMLElement(e.target))return;let t=(0,h.attr)(e.target,"aria-label");if(!t||(0,h.attr)(e.target,"disabled")||!e.target.className.includes("jodit"))return;this.__currentTarget=e.target;let i=e.target;this.__open(()=>{let e=(0,u.position)(i);return{x:e.left+e.width/2,y:e.top+e.height}},t)}__open(e,t){this.__addListenersOnEnter(),this.__isOpened=!0,this.j.async.clearTimeout(this.__hideTimeout),this.j.async.clearTimeout(this.__delayShowTimeout);let i=this.j.o.showTooltipDelay||this.j.defaultTimeout;i?this.__delayShowTimeout=this.j.async.setTimeout(()=>this.__show(e,t),i):this.__show(e,t)}__show(e,t){this.setMod("visible",!0),this.setMod("above",!1),this.getElm("content").innerHTML=t;let i=e(),o=(0,c.getFixedPositionOffset)(this.container);(0,h.css)(this.container,{left:i.x-o.x,top:i.y-o.y});let n=(0,u.position)(this.container),s=this.j.ow.innerHeight;if(n.top+n.height>s){let e=(0,u.position)(this.__currentTarget);this.setMod("above",!0),(0,h.css)(this.container,{top:e.top-n.height-o.y})}}__hide(){this.j.async.clearTimeout(this.__delayShowTimeout),this.j.async.clearTimeout(this.__hideTimeout),this.__removeListenersOnLeave(),this.__isOpened&&(this.__isOpened=!1,this.setMod("visible",!1),a.Dom.detach(this.getElm("content")),(0,h.css)(this.container,{left:-5e3}))}__hideDelay(){this.j.async.clearTimeout(this.__delayShowTimeout),this.j.async.clearTimeout(this.__hideTimeout),this.__isOpened&&(this.__hideTimeout=this.async.setTimeout(this.__hide,this.j.defaultTimeout))}destruct(){this.__attachedContainers.forEach(e=>{this.j.e.off(e,"mouseenter.tooltip",this.__onMouseEnter).off(e,"mouseleave.tooltip",this.__onMouseLeave)}),this.__hide(),super.destruct()}constructor(e){super(e),(0,o._)(this,"__isOpened",!1),(0,o._)(this,"__attachedContainers",new Set),(0,o._)(this,"__listenClose",!1),(0,o._)(this,"__currentTarget",null),(0,o._)(this,"__delayShowTimeout",0),(0,o._)(this,"__hideTimeout",0),e.o.textIcons||!e.o.showTooltip||e.o.useNativeTooltip||(this.j.e.on("getContainer",e=>{this.__onAttach(e)}),e.hookStatus(s.STATUSES.ready,()=>{this.__onAttach(this.j.container)}))}}(0,n.__decorate)([r.autobind],m.prototype,"__onMouseLeave",null),(0,n.__decorate)([r.autobind],m.prototype,"__onMouseEnter",null),(0,n.__decorate)([r.autobind],m.prototype,"__hide",null),(0,n.__decorate)([r.autobind],m.prototype,"__hideDelay",null),m=(0,n.__decorate)([r.component],m)},96007:function(e,t,i){"use strict";i.d(t,{UIElement:function(){return f}});var o=i(25045),n=i(31635),s=i(16964),r=i(24968),a=i(23211),l=i(85932),c=i(7909),u=i(23183),h=i(81987),d=i(29434);class f extends s.ViewComponent{getRole(){return this.options?.role||""}get parentElement(){return this.__parentElement}set parentElement(e){this.__parentElement=e,e&&e.hookStatus("beforeDestruct",()=>this.destruct()),this.updateParentElement(this)}bubble(e){let t=this.parentElement;for(;t;)e(t),t=t.parentElement;return this}updateParentElement(e){return this.__parentElement?.updateParentElement(e),this}get(e,t){return super.get(e,t)||this.getElm(e)}closest(e){let t="object"==typeof e?t=>t===e:t=>s.Component.isInstanceOf(t,e),i=this.__parentElement;for(;i;){if(t(i))return i;i=!i.parentElement&&i.container.parentElement?f.closestElement(i.container.parentElement,f):i.parentElement}return null}static closestElement(e,t){let i=a.Dom.up(e,e=>{if(e){let{component:i}=e;return i&&s.Component.isInstanceOf(i,t)}return!1});return i?i?.component:null}update(){}appendTo(e){return a.Dom.append(e,this.container),this}clearName(e){return e.replace(/[^a-zA-Z0-9]/g,"_")}render(e){return this.j.c.div(this.componentName)}createContainer(e){let t=this.render(e);if((0,l.isString)(t)){let e=this.parseTemplate(t);return e.classList.add(this.componentName),e}return t}parseTemplate(e){return this.j.c.fromHTML(e.replace(/\*([^*]+?)\*/g,(e,t)=>d.Icon.get(t)||"").replace(/&_/g,this.componentName+"_").replace(/~([^~]+?)~/g,(e,t)=>this.i18n(t)))}destruct(){return a.Dom.safeRemove(this.container),this.parentElement=null,super.destruct()}constructor(e,t){super(e),(0,o._)(this,"container",void 0),(0,o._)(this,"name",""),(0,o._)(this,"options",void 0),(0,o._)(this,"__parentElement",null),(0,o._)(this,"mods",{}),this.options=t,this.container=this.createContainer(t);let i=this.getRole();i&&(0,c.attr)(this.container,"role",i),Object.defineProperty(this.container,"component",{value:this,configurable:!0})}}f=(0,n.__decorate)([(0,r.derive)(h.Mods,u.Elms)],f)},4561:function(e,t,i){"use strict";i.d(t,{UIBlock:function(){return l}});var o=i(25045),n=i(31635),s=i(91672),r=i(93640),a=i(63468);class l extends a.UIGroup{className(){return"UIBlock"}constructor(e,t,i={align:"left"}){super(e,t),(0,o._)(this,"options",void 0),this.options=i,this.setMod("align",this.options.align||"left"),this.setMod("width",this.options.width||""),this.options.mod&&this.setMod(this.options.mod,!0),this.options.className&&this.container.classList.add(this.options.className),(0,r.attr)(this.container,"data-ref",i.ref),(0,r.attr)(this.container,"ref",i.ref)}}l=(0,n.__decorate)([s.component],l)},98838:function(e,t,i){"use strict";i.d(t,{UIForm:function(){return u}});var o=i(31635),n=i(80251),s=i(91672),r=i(93640),a=i(65273),l=i(49999),c=i(63468);class u extends c.UIGroup{className(){return"UIForm"}submit(){this.j.e.fire(this.container,"submit")}validate(){for(let e of this.allChildren.filter(e=>n.Component.isInstanceOf(e,a.UIInput)))if(!e.validate())return!1;for(let e of this.allChildren.filter(e=>n.Component.isInstanceOf(e,l.UISelect)))if(!e.validate())return!1;return!0}onSubmit(e){return this.j.e.on(this.container,"submit",()=>{let t=this.allChildren.filter(e=>n.Component.isInstanceOf(e,a.UIInput));return!!this.validate()&&(e(t.reduce((e,t)=>(e[t.state.name]=t.value,e),{})),!1)}),this}createContainer(){let e=this.j.c.element("form");return e.classList.add(this.componentName),(0,r.attr)(e,"dir",this.j.o.direction||"auto"),(0,r.attr)(e,"novalidate",""),e}constructor(...e){super(...e),this.options?.className&&this.container.classList.add(this.options?.className)}}u=(0,o.__decorate)([s.component],u)},5658:function(e,t,i){"use strict";i.d(t,{UIBlock:function(){return o.UIBlock},UICheckbox:function(){return s.UICheckbox},UIFileInput:function(){return s.UIFileInput},UIForm:function(){return n.UIForm},UIInput:function(){return s.UIInput},UISelect:function(){return s.UISelect},UITextArea:function(){return s.UITextArea}});var o=i(4561),n=i(98838),s=i(2602)},87329:function(e,t,i){"use strict";i.d(t,{UITextArea:function(){return c}});var o=i(25045),n=i(31635),s=i(84839),r=i(91672),a=i(80991),l=i(65273);class c extends l.UIInput{className(){return"UITextArea"}createNativeInput(e){return this.j.create.element("textarea")}onChangeStateSize(){let{size:e,resizable:t}=this.state;(0,a.css)(this.nativeInput,"resize",t?"auto":"none"),this.nativeInput.rows=e??5}constructor(e,t){super(e,t),(0,o._)(this,"state",{...c.defaultState}),Object.assign(this.state,t),!1===this.state.resizable&&(0,a.css)(this.nativeInput,"resize","none")}}(0,o._)(c,"defaultState",{...l.UIInput.defaultState,size:5,resizable:!0}),(0,n.__decorate)([(0,s.watch)(["state.size","state.resizable"])],c.prototype,"onChangeStateSize",null),c=(0,n.__decorate)([r.component],c)},24641:function(e,t,i){"use strict";i.d(t,{UICheckbox:function(){return l}});var o=i(25045),n=i(31635),s=i(84839),r=i(23211),a=i(65273);class l extends a.UIInput{className(){return"UICheckbox"}render(){return this.j.c.element("label",{className:this.componentName})}onChangeChecked(){this.value=this.state.checked.toString(),this.nativeInput.checked=this.state.checked,this.setMod("checked",this.state.checked)}onChangeNativeCheckBox(){this.state.checked=this.nativeInput.checked}onChangeSwitch(){this.setMod("switch",this.state.switch);let e=this.getElm("switch-slider");this.state.switch?(e||(e=this.j.c.div(this.getFullElName("switch-slider"))),r.Dom.after(this.nativeInput,e)):r.Dom.safeRemove(e)}constructor(e,t){super(e,{...t,type:"checkbox"}),(0,o._)(this,"state",{...l.defaultState}),Object.assign(this.state,t)}}(0,o._)(l,"defaultState",{...a.UIInput.defaultState,checked:!1,switch:!1}),(0,n.__decorate)([(0,s.watch)("state.checked"),(0,s.hook)("ready")],l.prototype,"onChangeChecked",null),(0,n.__decorate)([(0,s.watch)("nativeInput:change")],l.prototype,"onChangeNativeCheckBox",null),(0,n.__decorate)([(0,s.watch)("state.switch"),(0,s.hook)("ready")],l.prototype,"onChangeSwitch",null),l=(0,n.__decorate)([s.component],l)},75587:function(e,t,i){"use strict";i.d(t,{UIFileInput:function(){return c}});var o=i(25045),n=i(31635),s=i(91672),r=i(23211),a=i(53681),l=i(65273);class c extends l.UIInput{className(){return"UIFileInput"}createContainer(e){this.button=new a.UIButton(this.j,{tooltip:e.tooltip,icon:{name:"plus"}});let{container:t}=this.button;this.nativeInput||(this.nativeInput=this.createNativeInput(e));let{nativeInput:i}=this;return i.classList.add(this.getFullElName("input")),t.classList.add(this.componentName),r.Dom.append(t,i),t}createNativeInput(e){return this.j.create.fromHTML(`<input
18
18
  type="file"
19
19
  accept="${e.onlyImages?"image/*":"*"}"
20
20
  aria-label="${this.j.i18n(e.tooltip||"Upload")}"
21
21
  tabindex="-1"
22
22
  dir="auto"
23
23
  multiple=""
24
- />`)}constructor(e,t){super(e,{type:"file",...t}),(0,o._)(this,"state",{...l.UIInput.defaultState,type:"file",onlyImages:!0})}}c=(0,n.__decorate)([s.component],c)},2602:function(e,t,i){"use strict";i.d(t,{UICheckbox:function(){return n.UICheckbox},UIFileInput:function(){return s.UIFileInput},UIInput:function(){return r.UIInput},UISelect:function(){return a.UISelect},UITextArea:function(){return o.UITextArea}});var o=i(87329),n=i(24641),s=i(75587),r=i(65273),a=i(49999)},65273:function(e,t,i){"use strict";i.d(t,{UIInput:function(){return d}});var o=i(25045),n=i(31635),s=i(84839),r=i(23211),a=i(88475),l=i(93640),c=i(96007),u=i(81488),h=i(29434);class d extends c.UIElement{className(){return"UIInput"}onChangeClear(){this.state.clearButton?r.Dom.after(this.nativeInput,this.clearButton):r.Dom.safeRemove(this.clearButton)}onChangeClassName(e,t){t&&this.container.classList.remove(t),this.state.className&&this.container.classList.add(this.state.className)}onChangeState(){this.name=this.state.name;let e=this.nativeInput,{name:t,icon:i,type:o,ref:n,required:s,placeholder:a,autocomplete:c,label:u}=this.state;(0,l.attr)(e,"name",t),(0,l.attr)(e,"type",o),(0,l.attr)(e,"data-ref",n||t),(0,l.attr)(e,"ref",n||t),(0,l.attr)(e,"required",s||null),(0,l.attr)(e,"autocomplete",c?null:"off"),(0,l.attr)(e,"placeholder",a?this.j.i18n(a):""),i&&h.Icon.exists(i)?(r.Dom.before(e,this.icon),this.icon.innerHTML=h.Icon.get(i)):r.Dom.safeRemove(this.icon),u?(r.Dom.before(this.wrapper,this.label),this.label.innerText=this.j.i18n(u)):r.Dom.safeRemove(this.label),this.updateValidators()}updateValidators(){this.validators.clear(),this.state.required&&this.validators.add(u.inputValidators.required),this.state.validators?.forEach(e=>{let t=u.inputValidators[e];t&&this.validators.add(t)})}set error(e){this.setMod("has-error",!!e),e?(this.__errorBox.innerText=this.j.i18n(e,this.j.i18n(this.state.label||"")),r.Dom.append(this.container,this.__errorBox)):r.Dom.safeRemove(this.__errorBox)}get value(){return this.nativeInput.value}set value(e){this.value!==e&&(this.nativeInput.value=e,this.onChangeValue())}onChangeStateValue(){let e=this.state.value.toString();e!==this.value&&(this.value=e)}onChangeValue(){let{value:e}=this;this.state.value!==e&&(this.state.value=e,this.j.e.fire(this,"change",e),this.state.onChange?.(e))}validate(){this.error="";let e=(0,a.toArray)(this.validators).every(e=>e(this));return this.__markInputInvalid(),e}__markInputInvalid(){this.error?((0,l.attr)(this.nativeInput,"aria-invalid","true"),this.nativeInput.setCustomValidity?.(this.error)):((0,l.attr)(this.nativeInput,"aria-invalid",null),this.nativeInput.setCustomValidity?.(""))}createContainer(e){let t=super.createContainer();this.wrapper=this.j.c.div(this.getFullElName("wrapper")),this.nativeInput||(this.nativeInput=this.createNativeInput());let{nativeInput:i}=this;return i.classList.add(this.getFullElName("input")),r.Dom.append(this.wrapper,i),r.Dom.append(t,this.wrapper),(0,l.attr)(i,"dir",this.j.o.direction||"auto"),t}createNativeInput(e){return this.j.create.element("input")}focus(){this.nativeInput.focus()}get isFocused(){return this.nativeInput===this.j.od.activeElement}onChangeFocus(){this.setMod("focused",this.isFocused)}constructor(e,t){super(e,t),(0,o._)(this,"label",this.j.c.span(this.getFullElName("label"))),(0,o._)(this,"icon",this.j.c.span(this.getFullElName("icon"))),(0,o._)(this,"clearButton",this.j.c.span(this.getFullElName("clear"),h.Icon.get("cancel"))),(0,o._)(this,"state",{...d.defaultState}),(0,o._)(this,"__errorBox",this.j.c.span(this.getFullElName("error"))),(0,o._)(this,"validators",new Set([])),t?.value!==void 0&&(t.value=t.value.toString()),Object.assign(this.state,t),void 0!==this.state.clearButton&&(this.j.e.on(this.clearButton,"click",e=>{e.preventDefault(),this.nativeInput.value="",this.j.e.fire(this.nativeInput,"input"),this.focus()}).on(this.nativeInput,"input",()=>{this.state.clearButton=!!this.value.length}),this.state.clearButton=!!this.value.length),this.j.e.on(this.nativeInput,"focus blur",()=>{this.onChangeFocus()}).on(this.nativeInput,"input change",this.onChangeValue),this.onChangeState(),this.onChangeClassName(),this.onChangeStateValue()}}(0,o._)(d,"defaultState",{className:"",autocomplete:!0,name:"",value:"",icon:"",label:"",ref:"",type:"text",placeholder:"",required:!1,validators:[]}),(0,n.__decorate)([(0,s.watch)("state.clearButton")],d.prototype,"onChangeClear",null),(0,n.__decorate)([(0,s.watch)("state.className")],d.prototype,"onChangeClassName",null),(0,n.__decorate)([(0,s.watch)(["state.name","state.type","state.label","state.placeholder","state.autocomplete","state.icon"],{immediately:!1}),(0,s.debounce)()],d.prototype,"onChangeState",null),(0,n.__decorate)([(0,s.watch)("state.value")],d.prototype,"onChangeStateValue",null),(0,n.__decorate)([s.autobind],d.prototype,"onChangeValue",null),d=(0,n.__decorate)([s.component],d)},49999:function(e,t,i){"use strict";i.d(t,{UISelect:function(){return c}});var o=i(25045),n=i(31635),s=i(91672),r=i(7909),a=i(65273),l=i(81488);class c extends a.UIInput{className(){return"UISelect"}createContainer(e){let t=super.createContainer(e),{j:i}=this,{nativeInput:o}=this;if(void 0!==e.placeholder){let t=i.create.element("option");t.value="",t.text=i.i18n(e.placeholder),o.add(t)}return e.options?.forEach(e=>{let t=i.create.element("option");t.value=e.value.toString(),t.text=i.i18n(e.text),o.add(t)}),e.size&&e.size>0&&(0,r.attr)(o,"size",e.size),e.multiple&&(0,r.attr)(o,"multiple",""),t}createNativeInput(){return this.j.create.element("select")}updateValidators(){super.updateValidators(),this.state.required&&(this.validators.delete(l.inputValidators.required),this.validators.add(l.selectValidators.required))}constructor(e,t){super(e,t),(0,o._)(this,"state",{...c.defaultState}),Object.assign(this.state,t)}}(0,o._)(c,"defaultState",{...a.UIInput.defaultState,options:[],size:1,multiple:!1}),c=(0,n.__decorate)([s.component],c)},81488:function(e,t,i){"use strict";i.d(t,{inputValidators:function(){return o},selectValidators:function(){return n}});var o=i(48776),n=i(6490)},48776:function(e,t,i){"use strict";i.r(t);var o=i(91764),n=i(4040);i.d(t,["required",0,function(e){return!!(0,n.trim)(e.value).length||(e.error="Please fill out this field",!1)},"url",0,function(e){return!!(0,o.isURL)((0,n.trim)(e.value))||(e.error="Please enter a web address",!1)}])},6490:function(e,t,i){"use strict";var o=i(4040);i.d(t,["required",0,function(e){return!!(0,o.trim)(e.value).length||(e.error="Please fill out this field",!1)}])},63468:function(e,t,i){"use strict";i.d(t,{UIGroup:function(){return u}});var o=i(25045),n=i(31635),s=i(80251),r=i(84839),a=i(23211),l=i(65946),c=i(96007);class u extends c.UIElement{className(){return"UIGroup"}getRole(){return this.options?.role||"group"}get allChildren(){let e=[],t=[...this.elements];for(;t.length;){let i=t.shift();(0,l.isArray)(i)?t.push(...i):s.Component.isInstanceOf(i,u)?t.push(...i.elements):i&&e.push(i)}return e}update(){this.elements.forEach(e=>e.update()),this.setMod("size",this.buttonSize)}append(e,t){let i;if((0,l.isArray)(e)){if("number"==typeof t)throw Error("You can not use index when append array of elements");return e.forEach(e=>this.append(e,t)),this}if("number"==typeof t?(i=Math.min(Math.max(0,t),this.elements.length),this.elements.splice(i,0,e)):this.elements.push(e),e.name&&e.container.classList.add(this.getFullElName(e.name)),t&&"string"==typeof t){let i=this.getElm(t);if(null==i)throw Error("Element does not exist");a.Dom.append(i,e.container)}else this.appendChildToContainer(e.container,i);return e.parentElement=this,this}afterSetMod(e,t){this.syncMod&&this.elements.forEach(i=>i.setMod(e,t))}appendChildToContainer(e,t){let i=void 0===t||t<0||t>this.elements.length-1?null:this.container.children[t];null==i?a.Dom.append(this.container,e):a.Dom.before(i,e)}remove(e){let t=this.elements.indexOf(e);return -1!==t&&(this.elements.splice(t,1),a.Dom.safeRemove(e.container),e.parentElement=null),this}clear(){return this.elements.forEach(e=>e.destruct()),this.elements.length=0,this}setParentView(e){return this.elements?.forEach(t=>t.setParentView(e)),super.setParentView(e)}destruct(){return this.clear(),super.destruct()}constructor(e,t,i){super(e,i),(0,o._)(this,"options",void 0),(0,o._)(this,"syncMod",void 0),(0,o._)(this,"elements",void 0),(0,o._)(this,"buttonSize",void 0),this.options=i,this.syncMod=!1,this.elements=[],this.buttonSize="middle",t?.forEach(e=>e&&this.append(e)),i?.name&&(this.name=i.name)}}(0,n.__decorate)([(0,r.watch)("buttonSize")],u.prototype,"update",null),u=(0,n.__decorate)([r.component],u)},64847:function(e,t,i){"use strict";i.d(t,{UIGroup:function(){return o.UIGroup},UIList:function(){return n.UIList},UISeparator:function(){return s.UISeparator},UISpacer:function(){return r.UISpacer}});var o=i(63468),n=i(97959),s=i(35676),r=i(27987)},97959:function(e,t,i){"use strict";i.d(t,{UIList:function(){return _}});var o=i(25045),n=i(31635),s=i(80251),r=i(91672),a=i(29200),l=i(68616),c=i(32328),u=i(53681),h=i(63468),d=i(35676),p=i(27987),f=i(2496),m=i(15982),g=i(40253);class _ extends h.UIGroup{className(){return"UIList"}getRole(){return"list"}__onChangeMode(){this.setMod("mode",this.mode)}makeGroup(e="list"){return new h.UIGroup(this.jodit,[],{role:e})}get buttons(){return this.allChildren.filter(e=>s.Component.isInstanceOf(e,u.UIButton))}getButtonsNames(){return this.buttons.map(e=>e instanceof u.UIButton&&e.state.name||"").filter(e=>""!==e)}setRemoveButtons(e){return this.removeButtons=e||[],this}build(e,t=null){let i;e=(0,c.splitArray)(e),this.clear();let o=!1,n=this.makeGroup("group");this.append(n),n.setMod("line",!0);let s=e=>{let s=null;switch(e.name){case`
25
- `:(n=this.makeGroup("group")).setMod("line",!0),i=this.makeGroup(),n.append(i),this.append(n);break;case"|":o||(o=!0,s=new d.UISeparator(this.j));break;case"---":{i.setMod("before-spacer",!0);let e=new p.UISpacer(this.j);n.append(e),i=this.makeGroup(),n.append(i),o=!1;break}default:o=!1,s="select"===e.component?this.makeSelect(e,t):this.makeButton(e,t)}s&&(i||(i=this.makeGroup(),n.append(i)),i.append(s))},r=e=>!this.removeButtons.includes(e.name)&&(!e.isVisible||e.isVisible?.(this.j,e));return e.forEach(e=>{if((0,f.isButtonGroup)(e)){let t=e.buttons.filter(e=>e);t.length&&((i=this.makeGroup()).setMod("separated",!0).setMod("group",e.group),n.append(i),(0,g.getStrongControlTypes)(t,this.j.o.controls).filter(r).forEach(s))}else{i||(i=this.makeGroup(),n.append(i));let t=(0,m.getControlType)(e,this.j.o.controls);r(t)&&s(t)}}),this.update(),this}makeSelect(e,t){throw Error("Not implemented behaviour")}makeButton(e,t){return new u.UIButton(this.j,{name:e.name})}constructor(...e){super(...e),(0,o._)(this,"mode","horizontal"),(0,o._)(this,"removeButtons",[])}}(0,n.__decorate)([(0,l.watch)("mode"),(0,a.hook)("ready")],_.prototype,"__onChangeMode",null),_=(0,n.__decorate)([r.component],_)},35676:function(e,t,i){"use strict";i.d(t,{UISeparator:function(){return r}});var o=i(31635),n=i(91672),s=i(96007);class r extends s.UIElement{className(){return"UISeparator"}}r=(0,o.__decorate)([n.component],r)},27987:function(e,t,i){"use strict";i.d(t,{UISpacer:function(){return r}});var o=i(31635),n=i(91672),s=i(96007);class r extends s.UIElement{className(){return"UISpacer"}}r=(0,o.__decorate)([n.component],r)},2496:function(e,t,i){"use strict";i.d(t,{flatButtonsSet:function(){return s}});var o=i(17312);let n=e=>(0,o.isArray)(e.buttons);function s(e,t){let i=t.getRegisteredButtonGroups();return new Set(e.reduce((e,t)=>(n(t)?e=e.concat([...t.buttons,...i[t.group]??[]]):e.push(t),e),[]))}i.d(t,["isButtonGroup",0,n])},15982:function(e,t,i){"use strict";i.d(t,{findControlType:function(){return r},getControlType:function(){return s}});var o=i(65946),n=i(5266);function s(e,t){let i;return t||(t=n.Config.defaultOptions.controls),(0,o.isString)(e)?i=r(e,t)||{name:e,command:e,tooltip:e}:void 0!==t[(i={name:"empty",...(0,o.ConfigFlatten)(e)}).name]&&(i={...(0,o.ConfigFlatten)(t[i.name]),...(0,o.ConfigFlatten)(i)}),i}function r(e,t){let[i,n]=e.split(/\./),s=t;return null!=n?void 0!==t[i]&&(s=t[i]):n=i,s[n]?{name:n,...(0,o.ConfigFlatten)(s[n])}:void 0}},40253:function(e,t,i){"use strict";i.d(t,{getStrongControlTypes:function(){return a}});var o=i(17312),n=i(93640),s=i(5266),r=i(15982);function a(e,t){return((0,o.isArray)(e)?e:(0,n.keys)(e,!1).map(t=>{let i=e[t]||{};return(0,n.ConfigProto)({name:t},i)})).map(e=>(0,r.getControlType)(e,t||s.Config.defaultOptions.controls))}},29434:function(e,t,i){"use strict";i.d(t,{Icon:function(){return l}});var o=i(25045),n=i(81937),s=i(23211),r=i(65946),a=i(80991);class l{static getIcon(e){if(/<svg/i.test(e))return e;let t=l.icons[e]||l.icons[e.replace(/-/g,"_")]||l.icons[e.replace(/_/g,"-")]||l.icons[(0,r.camelCase)(e)]||l.icons[(0,r.kebabCase)(e)]||l.icons[e.toLowerCase()];return n.IS_PROD,t}static exists(e){return void 0!==this.getIcon(e)}static get(e,t="<span></span>"){return this.getIcon(e)||t}static set(e,t){return this.icons[e.replace("_","-")]=t,this}static makeIcon(e,t){let i,o;if(!t)return;let{name:n,iconURL:s,fill:r,scale:c}=t,u=n.replace(/[^a-zA-Z0-9]/g,"_");/<svg/.test(n)||(o=e.o.getIcon?.(n,u));let h=`${n}${s}${r}${c??""}${o??""}`;if(e.o.cache&&this.__cache.has(h))return this.__cache.get(h)?.cloneNode(!0);if(s)i=e.c.span(),(0,a.css)(i,"backgroundImage","url("+s.replace("{basePath}",e?.basePath||"")+")");else{let t=o||l.get(n,"")||e.o.extraIcons?.[n];t&&(i=l.toIconElement(e,t.trim()),/^<svg/i.test(n)||i.classList.add("jodit-icon_"+u))}return i&&(i.classList.add("jodit-icon"),(0,a.css)(i,"fill",r),null!=c&&(0,a.css)(i,"transform",`scale(${c})`),e.o.cache&&this.__cache.set(h,i.cloneNode(!0))),i}static toIconElement(e,t){let i=e.c.fromHTML(t);return s.Dom.isElement(i)?i:e.c.span("jodit-icon_text",i)}}(0,o._)(l,"icons",{}),(0,o._)(l,"__cache",new Map)},4099:function(e,t,i){"use strict";i.d(t,{Button:function(){return o.Button},Icon:function(){return a.Icon},Popup:function(){return l.Popup},ProgressBar:function(){return c.ProgressBar},UIBlock:function(){return s.UIBlock},UIButton:function(){return o.UIButton},UIButtonGroup:function(){return o.UIButtonGroup},UIButtonState:function(){return o.UIButtonState},UICheckbox:function(){return s.UICheckbox},UIElement:function(){return n.UIElement},UIFileInput:function(){return s.UIFileInput},UIForm:function(){return s.UIForm},UIGroup:function(){return r.UIGroup},UIInput:function(){return s.UIInput},UIList:function(){return r.UIList},UISelect:function(){return s.UISelect},UISeparator:function(){return r.UISeparator},UISpacer:function(){return r.UISpacer},UITextArea:function(){return s.UITextArea},UITooltip:function(){return o.UITooltip}});var o=i(59400),n=i(96007),s=i(5658),r=i(64847),a=i(29434),l=i(56490),c=i(34396)},56490:function(e,t,i){"use strict";i.d(t,{Popup:function(){return o.Popup}});var o=i(51116)},51116:function(e,t,i){"use strict";i.d(t,{Popup:function(){return m}});var o=i(25045),n=i(31635),s=i(80251),r=i(84839),a=i(23211),l=i(28077),c=i(65946),u=i(28712),h=i(80991),d=i(96007),p=i(63468);let f=["escape","cut","delete","backSpaceAfterDelete","beforeCommandDelete"];class m extends p.UIGroup{className(){return"Popup"}appendChildToContainer(e){let t=this.getElm("content");(0,u.assert)(t,"Content element should exist"),a.Dom.append(t,e)}updateParentElement(e){return e!==this&&s.Component.isInstanceOf(e,m)&&(this.__childrenPopups.forEach(t=>{!e.closest(t)&&t.isOpened&&t.close()}),this.__childrenPopups.has(e)||this.j.e.on(e,"beforeClose",()=>{this.__childrenPopups.delete(e)}),this.__childrenPopups.add(e)),super.updateParentElement(e)}setContent(e){if(this.allChildren.length)throw Error("Remove children");if(s.Component.isInstanceOf(e,d.UIElement))this.append(e);else{let t=(0,c.isString)(e)?this.j.c.fromHTML(e):e;this.appendChildToContainer(t)}return this.updatePosition(),this}open(e,t=!1,i){if((0,c.markOwner)(this.jodit,this.container),this.container.classList.add("jodit_theme_"+this.jodit.o.theme),this.__calculateZIndex(),this.isOpened=!0,this.__addGlobalListeners(),this.__targetBound=t?this.getKeepBound(e):e,i)a.Dom.append(i,this.container);else{let e=(0,l.getContainer)(this.jodit,m);i!==this.container.parentElement&&a.Dom.append(e,this.container)}return this.updatePosition(),this.j.e.fire(this,"afterOpen"),this.j.e.fire("afterOpenPopup",this),this}__calculateZIndex(){if((0,h.cssInline)(this.container,"zIndex"))return;let e=e=>{let t=(0,h.cssInline)(e.container,"zIndex")||e.o.zIndex;return!!t&&(this.setZIndex(1+parseInt(t.toString(),10)),!0)},{j:t}=this;if(e(t))return;let i=this.parentElement;for(;i;){if(e(i.j))return;let t=(0,h.cssInline)(i.container,"zIndex");if(t)return void this.setZIndex(1+parseInt(t.toString(),10));if(!i.parentElement&&i.container.parentElement){let e=d.UIElement.closestElement(i.container.parentElement,d.UIElement);if(e){i=e;continue}}i=i.parentElement}}getKeepBound(e){let t=e(),i=(this.j.o.shadowRoot??this.od).elementFromPoint(t.left,t.top);if(!i)return e;let o=a.Dom.isHTMLElement(i)?i:i.parentElement,n=(0,c.position)(o,this.j);return()=>{let t=e(),i=(0,c.position)(o,this.j);return{...t,top:t.top+(i.top-n.top),left:t.left+(i.left-n.left)}}}updatePosition(){if(!this.isOpened)return this;let[e,t]=this.__calculatePosition(this.__targetBound(),this.viewBound(),(0,c.position)(this.container,this.j));this.setMod("strategy",t);let i=(0,c.getFixedPositionOffset)(this.container);return(0,c.css)(this.container,{left:e.left-i.x,top:e.top-i.y}),this.__childrenPopups.forEach(e=>e.updatePosition()),this}__throttleUpdatePosition(){this.updatePosition()}__calculatePosition(e,t,i,o=this.strategy){let n={left:e.left,right:e.left-(i.width-e.width)},s={bottom:e.top+e.height,top:e.top-i.height},r=Object.keys(n).reduce((e,t)=>e.concat(Object.keys(s).map(e=>`${t}${(0,c.ucfirst)(e)}`)),[]),a=e=>{let[t,o]=(0,c.kebabCase)(e).split("-");return{left:n[t],top:s[o],width:i.width,height:i.height}},l=e=>m.boxInView(a(o),e)?o:r.find(t=>{if(m.boxInView(a(t),e))return t})||null,u=l((0,c.position)(this.j.container,this.j));return u&&m.boxInView(a(u),t)||(u=l(t)||u||o),[a(u),u]}static boxInView(e,t){return e.top-t.top>=-2&&e.left-t.left>=-2&&t.top+t.height-(e.top+e.height)>=-2&&t.left+t.width-(e.left+e.width)>=-2}close(){if(!this.isOpened)return this;this.isOpened=!1,this.__childrenPopups.forEach(e=>e.close()),this.j.e.fire(this,"beforeClose"),this.j.e.fire("beforePopupClose",this),this.__removeGlobalListeners();let{activeElement:e}=this.od;return e&&e!==this.container&&a.Dom.isOrContains(this.container,e)&&(0,c.isFunction)(e.blur)&&e.blur(),a.Dom.safeRemove(this.container),this}__closeOnOutsideClick(e){!this.isOpened||this.isOwnClick(e)||this.close()}isOwnClick(e){if(!e.target)return!1;let t=d.UIElement.closestElement(e.target,m);return!!(t&&(this===t||t.closest(this)))}__addGlobalListeners(){let e=this.__throttleUpdatePosition,t=this.ow;l.eventEmitter.on("closeAllPopups",this.close),this.smart&&this.j.e.on(f,this.close).on("mousedown touchstart",this.__closeOnOutsideClick).on(t,"mousedown touchstart",this.__closeOnOutsideClick),this.j.e.on("closeAllPopups",this.close).on("resize",e).on(this.container,"scroll mousewheel",e).on(t,"scroll",e).on(t,"resize",e),a.Dom.up(this.j.container,t=>{t&&this.j.e.on(t,"scroll mousewheel",e)})}__removeGlobalListeners(){let e=this.__throttleUpdatePosition,t=this.ow;l.eventEmitter.off("closeAllPopups",this.close),this.smart&&this.j.e.off(f,this.close).off("mousedown touchstart",this.__closeOnOutsideClick).off(t,"mousedown touchstart",this.__closeOnOutsideClick),this.j.e.off("closeAllPopups",this.close).off("resize",e).off(this.container,"scroll mousewheel",e).off(t,"scroll",e).off(t,"resize",e),this.j.container.isConnected&&a.Dom.up(this.j.container,t=>{t&&this.j.e.off(t,"scroll mousewheel",e)})}setZIndex(e){(0,c.css)(this.container,"zIndex",e.toString())}render(){return`<div>
24
+ />`)}constructor(e,t){super(e,{type:"file",...t}),(0,o._)(this,"state",{...l.UIInput.defaultState,type:"file",onlyImages:!0})}}c=(0,n.__decorate)([s.component],c)},2602:function(e,t,i){"use strict";i.d(t,{UICheckbox:function(){return n.UICheckbox},UIFileInput:function(){return s.UIFileInput},UIInput:function(){return r.UIInput},UISelect:function(){return a.UISelect},UITextArea:function(){return o.UITextArea}});var o=i(87329),n=i(24641),s=i(75587),r=i(65273),a=i(49999)},65273:function(e,t,i){"use strict";i.d(t,{UIInput:function(){return d}});var o=i(25045),n=i(31635),s=i(84839),r=i(23211),a=i(88475),l=i(93640),c=i(96007),u=i(81488),h=i(29434);class d extends c.UIElement{className(){return"UIInput"}onChangeClear(){this.state.clearButton?r.Dom.after(this.nativeInput,this.clearButton):r.Dom.safeRemove(this.clearButton)}onChangeClassName(e,t){t&&this.container.classList.remove(t),this.state.className&&this.container.classList.add(this.state.className)}onChangeState(){this.name=this.state.name;let e=this.nativeInput,{name:t,icon:i,type:o,ref:n,required:s,placeholder:a,autocomplete:c,label:u}=this.state;(0,l.attr)(e,"name",t),(0,l.attr)(e,"type",o),(0,l.attr)(e,"data-ref",n||t),(0,l.attr)(e,"ref",n||t),(0,l.attr)(e,"required",s||null),(0,l.attr)(e,"autocomplete",c?null:"off"),(0,l.attr)(e,"placeholder",a?this.j.i18n(a):""),i&&h.Icon.exists(i)?(r.Dom.before(e,this.icon),this.icon.innerHTML=h.Icon.get(i)):r.Dom.safeRemove(this.icon),u?(r.Dom.before(this.wrapper,this.label),this.label.innerText=this.j.i18n(u)):r.Dom.safeRemove(this.label),this.updateValidators()}updateValidators(){this.validators.clear(),this.state.required&&this.validators.add(u.inputValidators.required),this.state.validators?.forEach(e=>{let t=u.inputValidators[e];t&&this.validators.add(t)})}set error(e){this.setMod("has-error",!!e),e?(this.__errorBox.innerText=this.j.i18n(e,this.j.i18n(this.state.label||"")),r.Dom.append(this.container,this.__errorBox)):r.Dom.safeRemove(this.__errorBox)}get value(){return this.nativeInput.value}set value(e){this.value!==e&&(this.nativeInput.value=e,this.onChangeValue())}onChangeStateValue(){let e=this.state.value.toString();e!==this.value&&(this.value=e)}onChangeValue(){let{value:e}=this;this.state.value!==e&&(this.state.value=e,this.j.e.fire(this,"change",e),this.state.onChange?.(e))}validate(){this.error="";let e=(0,a.toArray)(this.validators).every(e=>e(this));return this.__markInputInvalid(),e}__markInputInvalid(){this.error?((0,l.attr)(this.nativeInput,"aria-invalid","true"),this.nativeInput.setCustomValidity?.(this.error)):((0,l.attr)(this.nativeInput,"aria-invalid",null),this.nativeInput.setCustomValidity?.(""))}createContainer(e){let t=super.createContainer();this.wrapper=this.j.c.div(this.getFullElName("wrapper")),this.nativeInput||(this.nativeInput=this.createNativeInput());let{nativeInput:i}=this;return i.classList.add(this.getFullElName("input")),r.Dom.append(this.wrapper,i),r.Dom.append(t,this.wrapper),(0,l.attr)(i,"dir",this.j.o.direction||"auto"),t}createNativeInput(e){return this.j.create.element("input")}focus(){this.nativeInput.focus()}get isFocused(){return this.nativeInput===this.j.od.activeElement}onChangeFocus(){this.setMod("focused",this.isFocused)}constructor(e,t){super(e,t),(0,o._)(this,"label",this.j.c.span(this.getFullElName("label"))),(0,o._)(this,"icon",this.j.c.span(this.getFullElName("icon"))),(0,o._)(this,"clearButton",this.j.c.span(this.getFullElName("clear"),h.Icon.get("cancel"))),(0,o._)(this,"state",{...d.defaultState}),(0,o._)(this,"__errorBox",this.j.c.span(this.getFullElName("error"))),(0,o._)(this,"validators",new Set([])),t?.value!==void 0&&(t.value=t.value.toString()),Object.assign(this.state,t),void 0!==this.state.clearButton&&(this.j.e.on(this.clearButton,"click",e=>{e.preventDefault(),this.nativeInput.value="",this.j.e.fire(this.nativeInput,"input"),this.focus()}).on(this.nativeInput,"input",()=>{this.state.clearButton=!!this.value.length}),this.state.clearButton=!!this.value.length),this.j.e.on(this.nativeInput,"focus blur",()=>{this.onChangeFocus()}).on(this.nativeInput,"input change",this.onChangeValue),this.onChangeState(),this.onChangeClassName(),this.onChangeStateValue()}}(0,o._)(d,"defaultState",{className:"",autocomplete:!0,name:"",value:"",icon:"",label:"",ref:"",type:"text",placeholder:"",required:!1,validators:[]}),(0,n.__decorate)([(0,s.watch)("state.clearButton")],d.prototype,"onChangeClear",null),(0,n.__decorate)([(0,s.watch)("state.className")],d.prototype,"onChangeClassName",null),(0,n.__decorate)([(0,s.watch)(["state.name","state.type","state.label","state.placeholder","state.autocomplete","state.icon"],{immediately:!1}),(0,s.debounce)()],d.prototype,"onChangeState",null),(0,n.__decorate)([(0,s.watch)("state.value")],d.prototype,"onChangeStateValue",null),(0,n.__decorate)([s.autobind],d.prototype,"onChangeValue",null),d=(0,n.__decorate)([s.component],d)},49999:function(e,t,i){"use strict";i.d(t,{UISelect:function(){return c}});var o=i(25045),n=i(31635),s=i(91672),r=i(7909),a=i(65273),l=i(81488);class c extends a.UIInput{className(){return"UISelect"}createContainer(e){let t=super.createContainer(e),{j:i}=this,{nativeInput:o}=this;if(void 0!==e.placeholder){let t=i.create.element("option");t.value="",t.text=i.i18n(e.placeholder),o.add(t)}return e.options?.forEach(e=>{let t=i.create.element("option");t.value=e.value.toString(),t.text=i.i18n(e.text),o.add(t)}),e.size&&e.size>0&&(0,r.attr)(o,"size",e.size),e.multiple&&(0,r.attr)(o,"multiple",""),t}createNativeInput(){return this.j.create.element("select")}updateValidators(){super.updateValidators(),this.state.required&&(this.validators.delete(l.inputValidators.required),this.validators.add(l.selectValidators.required))}constructor(e,t){super(e,t),(0,o._)(this,"state",{...c.defaultState}),Object.assign(this.state,t)}}(0,o._)(c,"defaultState",{...a.UIInput.defaultState,options:[],size:1,multiple:!1}),c=(0,n.__decorate)([s.component],c)},81488:function(e,t,i){"use strict";i.d(t,{inputValidators:function(){return o},selectValidators:function(){return n}});var o=i(48776),n=i(6490)},48776:function(e,t,i){"use strict";i.r(t);var o=i(91764),n=i(4040);i.d(t,["required",0,function(e){return!!(0,n.trim)(e.value).length||(e.error="Please fill out this field",!1)},"url",0,function(e){return!!(0,o.isURL)((0,n.trim)(e.value))||(e.error="Please enter a web address",!1)}])},6490:function(e,t,i){"use strict";var o=i(4040);i.d(t,["required",0,function(e){return!!(0,o.trim)(e.value).length||(e.error="Please fill out this field",!1)}])},63468:function(e,t,i){"use strict";i.d(t,{UIGroup:function(){return u}});var o=i(25045),n=i(31635),s=i(80251),r=i(84839),a=i(23211),l=i(65946),c=i(96007);class u extends c.UIElement{className(){return"UIGroup"}getRole(){return this.options?.role||"group"}get allChildren(){let e=[],t=[...this.elements];for(;t.length;){let i=t.shift();(0,l.isArray)(i)?t.push(...i):s.Component.isInstanceOf(i,u)?t.push(...i.elements):i&&e.push(i)}return e}update(){this.elements.forEach(e=>e.update()),this.setMod("size",this.buttonSize)}append(e,t){let i;if((0,l.isArray)(e)){if("number"==typeof t)throw Error("You can not use index when append array of elements");return e.forEach(e=>this.append(e,t)),this}if("number"==typeof t?(i=Math.min(Math.max(0,t),this.elements.length),this.elements.splice(i,0,e)):this.elements.push(e),e.name&&e.container.classList.add(this.getFullElName(e.name)),t&&"string"==typeof t){let i=this.getElm(t);if(null==i)throw Error("Element does not exist");a.Dom.append(i,e.container)}else this.appendChildToContainer(e.container,i);return e.parentElement=this,this}afterSetMod(e,t){this.syncMod&&this.elements.forEach(i=>i.setMod(e,t))}appendChildToContainer(e,t){let i=void 0===t||t<0||t>this.elements.length-1?null:this.container.children[t];null==i?a.Dom.append(this.container,e):a.Dom.before(i,e)}remove(e){let t=this.elements.indexOf(e);return -1!==t&&(this.elements.splice(t,1),a.Dom.safeRemove(e.container),e.parentElement=null),this}clear(){return this.elements.forEach(e=>e.destruct()),this.elements.length=0,this}setParentView(e){return this.elements?.forEach(t=>t.setParentView(e)),super.setParentView(e)}destruct(){return this.clear(),super.destruct()}constructor(e,t,i){super(e,i),(0,o._)(this,"options",void 0),(0,o._)(this,"syncMod",void 0),(0,o._)(this,"elements",void 0),(0,o._)(this,"buttonSize",void 0),this.options=i,this.syncMod=!1,this.elements=[],this.buttonSize="middle",t?.forEach(e=>e&&this.append(e)),i?.name&&(this.name=i.name)}}(0,n.__decorate)([(0,r.watch)("buttonSize")],u.prototype,"update",null),u=(0,n.__decorate)([r.component],u)},64847:function(e,t,i){"use strict";i.d(t,{UIGroup:function(){return o.UIGroup},UIList:function(){return n.UIList},UISeparator:function(){return s.UISeparator},UISpacer:function(){return r.UISpacer}});var o=i(63468),n=i(97959),s=i(35676),r=i(27987)},97959:function(e,t,i){"use strict";i.d(t,{UIList:function(){return _}});var o=i(25045),n=i(31635),s=i(80251),r=i(91672),a=i(29200),l=i(68616),c=i(32328),u=i(53681),h=i(63468),d=i(35676),f=i(27987),p=i(2496),m=i(15982),g=i(40253);class _ extends h.UIGroup{className(){return"UIList"}getRole(){return"list"}__onChangeMode(){this.setMod("mode",this.mode)}makeGroup(e="list"){return new h.UIGroup(this.jodit,[],{role:e})}get buttons(){return this.allChildren.filter(e=>s.Component.isInstanceOf(e,u.UIButton))}getButtonsNames(){return this.buttons.map(e=>e instanceof u.UIButton&&e.state.name||"").filter(e=>""!==e)}setRemoveButtons(e){return this.removeButtons=e||[],this}build(e,t=null){let i;e=(0,c.splitArray)(e),this.clear();let o=!1,n=this.makeGroup("group");this.append(n),n.setMod("line",!0);let s=e=>{let s=null;switch(e.name){case`
25
+ `:(n=this.makeGroup("group")).setMod("line",!0),i=this.makeGroup(),n.append(i),this.append(n);break;case"|":o||(o=!0,s=new d.UISeparator(this.j));break;case"---":{i.setMod("before-spacer",!0);let e=new f.UISpacer(this.j);n.append(e),i=this.makeGroup(),n.append(i),o=!1;break}default:o=!1,s="select"===e.component?this.makeSelect(e,t):this.makeButton(e,t)}s&&(i||(i=this.makeGroup(),n.append(i)),i.append(s))},r=e=>!this.removeButtons.includes(e.name)&&(!e.isVisible||e.isVisible?.(this.j,e));return e.forEach(e=>{if((0,p.isButtonGroup)(e)){let t=e.buttons.filter(e=>e);t.length&&((i=this.makeGroup()).setMod("separated",!0).setMod("group",e.group),n.append(i),(0,g.getStrongControlTypes)(t,this.j.o.controls).filter(r).forEach(s))}else{i||(i=this.makeGroup(),n.append(i));let t=(0,m.getControlType)(e,this.j.o.controls);r(t)&&s(t)}}),this.update(),this}makeSelect(e,t){throw Error("Not implemented behaviour")}makeButton(e,t){return new u.UIButton(this.j,{name:e.name})}constructor(...e){super(...e),(0,o._)(this,"mode","horizontal"),(0,o._)(this,"removeButtons",[])}}(0,n.__decorate)([(0,l.watch)("mode"),(0,a.hook)("ready")],_.prototype,"__onChangeMode",null),_=(0,n.__decorate)([r.component],_)},35676:function(e,t,i){"use strict";i.d(t,{UISeparator:function(){return r}});var o=i(31635),n=i(91672),s=i(96007);class r extends s.UIElement{className(){return"UISeparator"}}r=(0,o.__decorate)([n.component],r)},27987:function(e,t,i){"use strict";i.d(t,{UISpacer:function(){return r}});var o=i(31635),n=i(91672),s=i(96007);class r extends s.UIElement{className(){return"UISpacer"}}r=(0,o.__decorate)([n.component],r)},2496:function(e,t,i){"use strict";i.d(t,{flatButtonsSet:function(){return s}});var o=i(17312);let n=e=>(0,o.isArray)(e.buttons);function s(e,t){let i=t.getRegisteredButtonGroups();return new Set(e.reduce((e,t)=>(n(t)?e=e.concat([...t.buttons,...i[t.group]??[]]):e.push(t),e),[]))}i.d(t,["isButtonGroup",0,n])},15982:function(e,t,i){"use strict";i.d(t,{findControlType:function(){return r},getControlType:function(){return s}});var o=i(65946),n=i(5266);function s(e,t){let i;return t||(t=n.Config.defaultOptions.controls),(0,o.isString)(e)?i=r(e,t)||{name:e,command:e,tooltip:e}:void 0!==t[(i={name:"empty",...(0,o.ConfigFlatten)(e)}).name]&&(i={...(0,o.ConfigFlatten)(t[i.name]),...(0,o.ConfigFlatten)(i)}),i}function r(e,t){let[i,n]=e.split(/\./),s=t;return null!=n?void 0!==t[i]&&(s=t[i]):n=i,s[n]?{name:n,...(0,o.ConfigFlatten)(s[n])}:void 0}},40253:function(e,t,i){"use strict";i.d(t,{getStrongControlTypes:function(){return a}});var o=i(17312),n=i(93640),s=i(5266),r=i(15982);function a(e,t){return((0,o.isArray)(e)?e:(0,n.keys)(e,!1).map(t=>{let i=e[t]||{};return(0,n.ConfigProto)({name:t},i)})).map(e=>(0,r.getControlType)(e,t||s.Config.defaultOptions.controls))}},29434:function(e,t,i){"use strict";i.d(t,{Icon:function(){return l}});var o=i(25045),n=i(81937),s=i(23211),r=i(65946),a=i(80991);class l{static getIcon(e){if(/<svg/i.test(e))return e;let t=l.icons[e]||l.icons[e.replace(/-/g,"_")]||l.icons[e.replace(/_/g,"-")]||l.icons[(0,r.camelCase)(e)]||l.icons[(0,r.kebabCase)(e)]||l.icons[e.toLowerCase()];return n.IS_PROD,t}static exists(e){return void 0!==this.getIcon(e)}static get(e,t="<span></span>"){return this.getIcon(e)||t}static set(e,t){return this.icons[e.replace("_","-")]=t,this}static makeIcon(e,t){let i,o;if(!t)return;let{name:n,iconURL:s,fill:r,scale:c}=t,u=n.replace(/[^a-zA-Z0-9]/g,"_");/<svg/.test(n)||(o=e.o.getIcon?.(n,u));let h=`${n}${s}${r}${c??""}${o??""}`;if(e.o.cache&&this.__cache.has(h))return this.__cache.get(h)?.cloneNode(!0);if(s)i=e.c.span(),(0,a.css)(i,"backgroundImage","url("+s.replace("{basePath}",e?.basePath||"")+")");else{let t=o||l.get(n,"")||e.o.extraIcons?.[n];t&&(i=l.toIconElement(e,t.trim()),/^<svg/i.test(n)||i.classList.add("jodit-icon_"+u))}return i&&(i.classList.add("jodit-icon"),(0,a.css)(i,"fill",r),null!=c&&(0,a.css)(i,"transform",`scale(${c})`),e.o.cache&&this.__cache.set(h,i.cloneNode(!0))),i}static toIconElement(e,t){let i=e.c.fromHTML(t);return s.Dom.isElement(i)?i:e.c.span("jodit-icon_text",i)}}(0,o._)(l,"icons",{}),(0,o._)(l,"__cache",new Map)},4099:function(e,t,i){"use strict";i.d(t,{Button:function(){return o.Button},Icon:function(){return a.Icon},Popup:function(){return l.Popup},ProgressBar:function(){return c.ProgressBar},UIBlock:function(){return s.UIBlock},UIButton:function(){return o.UIButton},UIButtonGroup:function(){return o.UIButtonGroup},UIButtonState:function(){return o.UIButtonState},UICheckbox:function(){return s.UICheckbox},UIElement:function(){return n.UIElement},UIFileInput:function(){return s.UIFileInput},UIForm:function(){return s.UIForm},UIGroup:function(){return r.UIGroup},UIInput:function(){return s.UIInput},UIList:function(){return r.UIList},UISelect:function(){return s.UISelect},UISeparator:function(){return r.UISeparator},UISpacer:function(){return r.UISpacer},UITextArea:function(){return s.UITextArea},UITooltip:function(){return o.UITooltip}});var o=i(59400),n=i(96007),s=i(5658),r=i(64847),a=i(29434),l=i(56490),c=i(34396)},56490:function(e,t,i){"use strict";i.d(t,{Popup:function(){return o.Popup}});var o=i(51116)},51116:function(e,t,i){"use strict";i.d(t,{Popup:function(){return m}});var o=i(25045),n=i(31635),s=i(80251),r=i(84839),a=i(23211),l=i(28077),c=i(65946),u=i(28712),h=i(80991),d=i(96007),f=i(63468);let p=["escape","cut","delete","backSpaceAfterDelete","beforeCommandDelete"];class m extends f.UIGroup{className(){return"Popup"}appendChildToContainer(e){let t=this.getElm("content");(0,u.assert)(t,"Content element should exist"),a.Dom.append(t,e)}updateParentElement(e){return e!==this&&s.Component.isInstanceOf(e,m)&&(this.__childrenPopups.forEach(t=>{!e.closest(t)&&t.isOpened&&t.close()}),this.__childrenPopups.has(e)||this.j.e.on(e,"beforeClose",()=>{this.__childrenPopups.delete(e)}),this.__childrenPopups.add(e)),super.updateParentElement(e)}setContent(e){if(this.allChildren.length)throw Error("Remove children");if(s.Component.isInstanceOf(e,d.UIElement))this.append(e);else{let t=(0,c.isString)(e)?this.j.c.fromHTML(e):e;this.appendChildToContainer(t)}return this.updatePosition(),this}open(e,t=!1,i){if((0,c.markOwner)(this.jodit,this.container),this.container.classList.add("jodit_theme_"+this.jodit.o.theme),this.__calculateZIndex(),this.isOpened=!0,this.__addGlobalListeners(),this.__targetBound=t?this.getKeepBound(e):e,i)a.Dom.append(i,this.container);else{let e=(0,l.getContainer)(this.jodit,m);i!==this.container.parentElement&&a.Dom.append(e,this.container)}return this.updatePosition(),this.j.e.fire(this,"afterOpen"),this.j.e.fire("afterOpenPopup",this),this}__calculateZIndex(){if((0,h.cssInline)(this.container,"zIndex"))return;let e=e=>{let t=(0,h.cssInline)(e.container,"zIndex")||e.o.zIndex;return!!t&&(this.setZIndex(1+parseInt(t.toString(),10)),!0)},{j:t}=this;if(e(t))return;let i=this.parentElement;for(;i;){if(e(i.j))return;let t=(0,h.cssInline)(i.container,"zIndex");if(t)return void this.setZIndex(1+parseInt(t.toString(),10));if(!i.parentElement&&i.container.parentElement){let e=d.UIElement.closestElement(i.container.parentElement,d.UIElement);if(e){i=e;continue}}i=i.parentElement}}getKeepBound(e){let t=e(),i=(this.j.o.shadowRoot??this.od).elementFromPoint(t.left,t.top);if(!i)return e;let o=a.Dom.isHTMLElement(i)?i:i.parentElement,n=(0,c.position)(o,this.j);return()=>{let t=e(),i=(0,c.position)(o,this.j);return{...t,top:t.top+(i.top-n.top),left:t.left+(i.left-n.left)}}}updatePosition(){if(!this.isOpened)return this;let[e,t]=this.__calculatePosition(this.__targetBound(),this.viewBound(),(0,c.position)(this.container,this.j));this.setMod("strategy",t);let i=(0,c.getFixedPositionOffset)(this.container);return(0,c.css)(this.container,{left:e.left-i.x,top:e.top-i.y}),this.__childrenPopups.forEach(e=>e.updatePosition()),this}__throttleUpdatePosition(){this.updatePosition()}__calculatePosition(e,t,i,o=this.strategy){let n={left:e.left,right:e.left-(i.width-e.width)},s={bottom:e.top+e.height,top:e.top-i.height},r=Object.keys(n).reduce((e,t)=>e.concat(Object.keys(s).map(e=>`${t}${(0,c.ucfirst)(e)}`)),[]),a=e=>{let[t,o]=(0,c.kebabCase)(e).split("-");return{left:n[t],top:s[o],width:i.width,height:i.height}},l=e=>m.boxInView(a(o),e)?o:r.find(t=>{if(m.boxInView(a(t),e))return t})||null,u=l((0,c.position)(this.j.container,this.j));return u&&m.boxInView(a(u),t)||(u=l(t)||u||o),[a(u),u]}static boxInView(e,t){return e.top-t.top>=-2&&e.left-t.left>=-2&&t.top+t.height-(e.top+e.height)>=-2&&t.left+t.width-(e.left+e.width)>=-2}close(){if(!this.isOpened)return this;this.isOpened=!1,this.__childrenPopups.forEach(e=>e.close()),this.j.e.fire(this,"beforeClose"),this.j.e.fire("beforePopupClose",this),this.__removeGlobalListeners();let{activeElement:e}=this.od;return e&&e!==this.container&&a.Dom.isOrContains(this.container,e)&&(0,c.isFunction)(e.blur)&&e.blur(),a.Dom.safeRemove(this.container),this}__closeOnOutsideClick(e){!this.isOpened||this.isOwnClick(e)||this.close()}isOwnClick(e){if(!e.target)return!1;let t=d.UIElement.closestElement(e.target,m);return!!(t&&(this===t||t.closest(this)))}__addGlobalListeners(){let e=this.__throttleUpdatePosition,t=this.ow;l.eventEmitter.on("closeAllPopups",this.close),this.smart&&this.j.e.on(p,this.close).on("mousedown touchstart",this.__closeOnOutsideClick).on(t,"mousedown touchstart",this.__closeOnOutsideClick),this.j.e.on("closeAllPopups",this.close).on("resize",e).on(this.container,"scroll mousewheel",e).on(t,"scroll",e).on(t,"resize",e),a.Dom.up(this.j.container,t=>{t&&this.j.e.on(t,"scroll mousewheel",e)})}__removeGlobalListeners(){let e=this.__throttleUpdatePosition,t=this.ow;l.eventEmitter.off("closeAllPopups",this.close),this.smart&&this.j.e.off(p,this.close).off("mousedown touchstart",this.__closeOnOutsideClick).off(t,"mousedown touchstart",this.__closeOnOutsideClick),this.j.e.off("closeAllPopups",this.close).off("resize",e).off(this.container,"scroll mousewheel",e).off(t,"scroll",e).off(t,"resize",e),this.j.container.isConnected&&a.Dom.up(this.j.container,t=>{t&&this.j.e.off(t,"scroll mousewheel",e)})}setZIndex(e){(0,c.css)(this.container,"zIndex",e.toString())}render(){return`<div>
26
26
  <div class="&__content"></div>
27
- </div>`}destruct(){return this.close(),super.destruct()}constructor(e,t=!0){super(e),(0,o._)(this,"smart",void 0),(0,o._)(this,"isOpened",void 0),(0,o._)(this,"strategy",void 0),(0,o._)(this,"viewBound",void 0),(0,o._)(this,"__targetBound",void 0),(0,o._)(this,"__childrenPopups",void 0),this.smart=t,this.isOpened=!1,this.strategy="leftBottom",this.viewBound=()=>({left:0,top:0,width:this.ow.innerWidth,height:this.ow.innerHeight}),this.__childrenPopups=new Set,(0,c.attr)(this.container,"role","popup")}}(0,n.__decorate)([r.autobind],m.prototype,"updatePosition",null),(0,n.__decorate)([(0,r.throttle)(10),r.autobind],m.prototype,"__throttleUpdatePosition",null),(0,n.__decorate)([r.autobind],m.prototype,"close",null),(0,n.__decorate)([r.autobind],m.prototype,"__closeOnOutsideClick",null)},34396:function(e,t,i){"use strict";i.d(t,{ProgressBar:function(){return u}});var o=i(25045),n=i(23211),s=i(28077),r=i(23599),a=i(80991),l=i(96007),c=i(29434);class u extends l.UIElement{className(){return"ProgressBar"}render(){return"<div><div></div></div>"}show(){let e=this.j.workplace||this.j.container;return n.Dom.append(e,this.container),this}hide(){return n.Dom.safeRemove(this.container),this}progress(e){return(0,a.css)(this.container,"width",e.toFixed(2)+"%"),this}showFileUploadAnimation(e,t){this.__cleanUpAnimation();let i=(0,s.getContainer)(this.j,u),o=(0,r.position)(this.j.container,this.j),l=this.j.c.div(this.getFullElName("file-animation")),h=c.Icon.get("file","");h&&(l.innerHTML=h);let d=e??{x:o.width/2,y:0},p=t??{x:d.x+60,y:d.y-80};(0,a.css)(l,{left:o.left+d.x,top:o.top+d.y}),n.Dom.append(i,l),this.__animationElement=l,l.offsetWidth,(0,a.css)(l,{left:o.left+p.x,top:o.top+p.y,opacity:0,transform:"scale(0.4)"});let f=()=>{l.removeEventListener("transitionend",f),this.__cleanUpAnimation()};l.addEventListener("transitionend",f)}__cleanUpAnimation(){this.__animationElement&&(n.Dom.safeRemove(this.__animationElement),this.__animationElement=null)}destruct(){return this.__cleanUpAnimation(),this.hide(),super.destruct()}constructor(...e){super(...e),(0,o._)(this,"__animationElement",null)}}},2222:function(e,t,i){"use strict";i.d(t,{ViewWithToolbar:function(){return g}});var o=i(25045),n=i(31635),s=i(69364),r=i(49574),a=i(68616),l=i(23211),c=i(45664),u=i(85932),h=i(28723),d=i(4099),p=i(2496),f=i(35099),m=i(4274);class g extends f.View{get toolbarContainer(){return!this.o.fullsize&&((0,u.isString)(this.o.toolbar)||l.Dom.isHTMLElement(this.o.toolbar))?(0,h.resolveElement)(this.o.toolbar,this.o.shadowRoot||this.od):(this.o.toolbar&&this.__appendToolbarBox(),this.__defaultToolbarContainer)}__appendToolbarBox(){let e=this.__defaultToolbarContainer,t=this.container.firstElementChild;for(;t&&t!==e&&t.hasAttribute("data-jodit-above-toolbar");)t=t.nextElementSibling;t!==e&&(t?l.Dom.before(t,e):l.Dom.append(this.container,e))}setPanel(e){this.o.toolbar=e,this.buildToolbar()}buildToolbar(){if(!this.o.toolbar)return;let e=this.o.buttons?(0,c.splitArray)(this.o.buttons):[];this.toolbar?.setRemoveButtons(this.o.removeButtons).build(e.concat(this.o.extraButtons||[])).appendTo(this.toolbarContainer)}getRegisteredButtonGroups(){return this.groupToButtons}registerButton(e){this.registeredButtons.add(e);let t=e.group??"other";return this.groupToButtons[t]||(this.groupToButtons[t]=[]),null!=e.position?this.groupToButtons[t][e.position]=e.name:this.groupToButtons[t].push(e.name),this}unregisterButton(e){this.registeredButtons.delete(e);let t=e.group??"other",i=this.groupToButtons[t];if(i){let o=i.indexOf(e.name);-1!==o&&i.splice(o,1),0===i.length&&delete this.groupToButtons[t]}return this}beforeToolbarBuild(e){if(Object.keys(this.groupToButtons).length)return e.map(e=>(0,p.isButtonGroup)(e)&&e.group&&this.groupToButtons[e.group]?{group:e.group,buttons:[...e.buttons,...this.groupToButtons[e.group]]}:e)}destruct(){this.isDestructed||(this.setStatus(s.STATUSES.beforeDestruct),this.e.off("beforeToolbarBuild",this.beforeToolbarBuild),this.__tooltip.destruct(),this.toolbar.destruct(),this.toolbar=void 0,super.destruct())}constructor(e,t=!1){super(e,t),(0,o._)(this,"toolbar",(0,m.makeCollection)(this)),(0,o._)(this,"__defaultToolbarContainer",this.c.div("jodit-toolbar__box")),(0,o._)(this,"registeredButtons",new Set),(0,o._)(this,"groupToButtons",{}),(0,o._)(this,"isJodit",!1),(0,o._)(this,"__tooltip",new d.UITooltip(this)),this.isJodit=t,this.e.on("beforeToolbarBuild",this.beforeToolbarBuild)}}(0,n.__decorate)([(0,a.watch)(":rebuildToolbar")],g.prototype,"buildToolbar",null),(0,n.__decorate)([r.autobind],g.prototype,"beforeToolbarBuild",null)},35099:function(e,t,i){"use strict";i.d(t,{View:function(){return C}});var o=i(25045),n=i(31635),s=i(16964),r=i(80251),a=i(69364),l=i(81937),c=i(76517),u=i(51676),h=i(24968),d=i(29200),p=i(27795),f=i(1496),m=i(28077),g=i(65946),_=i(8006),v=i(24475),b=i(23183),y=i(81987),w=i(34396),S=i(10081);class C extends r.Component{get basePath(){return this.o.basePath?this.o.basePath:l.BASE_PATH}get minified(){return void 0!==this.o.minified?this.o.minified:l.BASE_PATH_IS_MIN}get defaultTimeout(){return(0,g.isVoid)(this.o.defaultTimeout)?100:this.o.defaultTimeout}get buffer(){return v.Storage.makeStorage()}get message(){return this.getMessageModule(this.container)}getMessageModule(e){return new S.UIMessages(this,e)}get storage(){return v.Storage.makeStorage(!0,this.id)}get asyncStorage(){return _.AsyncStorage.makeStorage(!0,this.id,this.o.asyncStorage)}get c(){return this.create}get container(){return this.__container}set container(e){this.__container=e}get e(){return this.events}get progressbar(){return new w.ProgressBar(this)}get options(){return this.__options}set options(e){this.__options=e}get o(){return this.options}i18n(e,...t){return(0,g.i18n)(e,t,this.options)}toggleFullSize(e){void 0===e&&(e=!this.__isFullSize),e!==this.__isFullSize&&(this.__isFullSize=e,this.e.fire("toggleFullSize",e))}get isLocked(){return""!==this.__whoLocked}lock(e="any"){return!this.isLocked&&(this.__whoLocked=e,!0)}unlock(){return!!this.isLocked&&(this.__whoLocked="",!0)}get isFullSize(){return this.__isFullSize}getVersion(){return C.version}static getVersion(){return C.version}initOptions(e){this.options=(0,g.ConfigProto)(e||{},(0,g.ConfigProto)(this.options||{},C.defaultOptions))}initOwners(){this.ownerWindow=this.o.ownerWindow??window}attachEvents(e){if(!e)return;let t=e?.events;t&&Object.keys(t).forEach(e=>this.e.on(e,t[e]))}getInstance(e,t){let i=(0,g.isFunction)(e)?e.prototype.className():e,o=this.e.fire((0,g.camelCase)("getInstance_"+i),t);if(o)return o;let n=(0,g.isFunction)(e)?e:m.modules[i],r=this.__modulesInstances;if(!(0,g.isFunction)(n))throw(0,g.error)("Need real module name");if(!r.has(i)){let e=n.prototype instanceof s.ViewComponent?new n(this,t):new n(t);this.components.add(e),r.set(i,e)}return r.get(i)}addDisclaimer(e){p.Dom.append(this.container,e)}beforeDestruct(){this.e.fire(a.STATUSES.beforeDestruct,this),this.components.forEach(e=>{(0,g.isDestructable)(e)&&!e.isInDestruct&&e.destruct()}),this.components.clear()}destruct(){this.isDestructed||((0,u.cached)(this,"progressbar")?.destruct(),(0,u.cached)(this,"message")?.destruct(),(0,u.cached)(this,"asyncStorage")?.close(),this.events&&(this.events.destruct(),this.events=void 0),(0,u.cached)(this,"buffer")?.clear(),p.Dom.safeRemove(this.container),super.destruct())}constructor(e,t=!1){super(),(0,o._)(this,"isJodit",void 0),(0,o._)(this,"isView",void 0),(0,o._)(this,"parent",void 0),(0,o._)(this,"mods",void 0),(0,o._)(this,"id",void 0),(0,o._)(this,"components",void 0),(0,o._)(this,"events",void 0),(0,o._)(this,"create",void 0),(0,o._)(this,"__container",void 0),(0,o._)(this,"OPTIONS",void 0),(0,o._)(this,"__options",void 0),(0,o._)(this,"__isFullSize",void 0),(0,o._)(this,"__whoLocked",void 0),(0,o._)(this,"isLockedNotBy",void 0),(0,o._)(this,"__modulesInstances",void 0),this.isJodit=t,this.isView=!0,this.parent=null,this.mods={},this.components=new Set,this.OPTIONS=C.defaultOptions,this.__isFullSize=!1,this.__whoLocked="",this.isLockedNotBy=e=>this.isLocked&&this.__whoLocked!==e,this.__modulesInstances=new Map,this.id=new Date().getTime().toString(),this.initOptions(e),this.initOwners(),this.events=e?.eventEmmiter??new f.EventEmitter(this.od),this.create=new c.Create(this.od),this.__container=this.c.div("jodit "+this.componentName)}}(0,o._)(C,"ES",l.ES),(0,o._)(C,"version",l.APP_VERSION),(0,o._)(C,"esNext",l.IS_ES_NEXT),(0,o._)(C,"esModern",l.IS_ES_MODERN),(0,o._)(C,"defaultOptions",void 0),(0,n.__decorate)([u.cache],C.prototype,"buffer",null),(0,n.__decorate)([u.cache],C.prototype,"message",null),(0,n.__decorate)([u.cache],C.prototype,"storage",null),(0,n.__decorate)([u.cache],C.prototype,"asyncStorage",null),(0,n.__decorate)([u.cache],C.prototype,"c",null),(0,n.__decorate)([u.cache],C.prototype,"e",null),(0,n.__decorate)([u.cache],C.prototype,"progressbar",null),(0,n.__decorate)([(0,d.hook)(a.STATUSES.beforeDestruct)],C.prototype,"beforeDestruct",null),(C=(0,n.__decorate)([(0,h.derive)(y.Mods,b.Elms)],C)).defaultOptions={extraButtons:[],cache:!0,textIcons:!1,namespace:"",removeButtons:[],zIndex:100002,defaultTimeout:100,fullsize:!1,showTooltip:!0,useNativeTooltip:!1,buttons:[],globalFullSize:!0,language:"auto"}},73302:function(e,t,i){"use strict";i.d(t,{Jodit:function(){return Jodit}});var o=i(25045),n=i(31635),s=i(81937),r=i(84839),a=i(28077),l=i(65946),c=i(80991),u=i(73714),h=i(80512),d=i(5266),p=i(60936);let f="data-jodit-default-style-display",m="data-jodit-default-classes",g={contenteditable:!1};class Jodit extends p.ViewWithToolbar{className(){return"Jodit"}waitForReady(){return this.isReady?Promise.resolve(this):this.async.promise(e=>{this.hookStatus("ready",()=>e(this))})}static get ready(){return new Promise(e=>{a.eventEmitter.on("joditready",e)})}get text(){if(this.editor)return this.editor.innerText||"";let e=this.createInside.div();return e.innerHTML=this.getElementValue(),e.innerText||""}get defaultTimeout(){return(0,l.isNumber)(this.o.defaultTimeout)?this.o.defaultTimeout:d.Config.defaultOptions.defaultTimeout}static atom(e){return(0,l.markAsAtomic)(e)}static make(e,t){return new this(e,t)}static isJoditAssigned(e){return e&&(0,l.isJoditObject)(e.component)&&!e.component.isInDestruct}static get defaultOptions(){return d.Config.defaultOptions}static configure(e){(0,l.ConfigMerge)(Jodit.defaultOptions,e)}get createInside(){return new p.Create(()=>this.ed,this.o.createAttributes)}__setPlaceField(e,t){this.currentPlace||(this.currentPlace={},this.places=[this.currentPlace]),this.currentPlace[e]=t}get element(){return this.currentPlace.element}get editor(){return this.currentPlace.editor}set editor(e){this.__setPlaceField("editor",e)}get container(){return this.currentPlace.container}set container(e){this.__setPlaceField("container",e)}get workplace(){return this.currentPlace.workplace}get message(){return this.getMessageModule(this.workplace)}get statusbar(){return this.currentPlace.statusbar}get iframe(){return this.currentPlace.iframe}set iframe(e){this.__setPlaceField("iframe",e)}get history(){return this.currentPlace.history}get editorWindow(){return this.currentPlace.editorWindow}set editorWindow(e){this.__setPlaceField("editorWindow",e)}get ew(){return this.editorWindow}get editorDocument(){return this.currentPlace.editorWindow.document}get ed(){return this.editorDocument}get options(){return this.currentPlace.options}set options(e){this.__options=e,this.__setPlaceField("options",e)}get s(){return this.selection}get uploader(){return this.getInstance("Uploader",this.o.uploader)}get filebrowser(){let e=this,t=(0,l.ConfigProto)({defaultTimeout:e.defaultTimeout,uploader:e.o.uploader,language:e.o.language,license:e.o.license,theme:e.o.theme,shadowRoot:e.o.shadowRoot,defaultCallback(t){t.files&&t.files.length&&t.files.forEach((i,o)=>{let n=t.baseurl+i;t.isImages&&t.isImages[o]?e.s.insertImage(n,null,e.o.imageDefaultWidth):e.s.insertNode(e.createInside.fromHTML(`<a href='${n}' title='${n}'>${n}</a>`))})}},this.o.filebrowser);return e.getInstance("FileBrowser",t)}get mode(){return this.__mode}set mode(e){this.setMode(e)}getNativeEditorValue(){let e=this.e.fire("beforeGetNativeEditorValue");return(0,l.isString)(e)?e:this.editor?this.editor.innerHTML:this.getElementValue()}setNativeEditorValue(e){let t={value:e};!this.e.fire("beforeSetNativeEditorValue",t)&&this.editor&&(this.editor.innerHTML=t.value)}get value(){return this.getEditorValue()}set value(e){this.setEditorValue(e),this.history.__processChanges()}synchronizeValues(){this.__imdSynchronizeValues()}__imdSynchronizeValues(){this.setEditorValue()}getEditorValue(e=!0,t){let i;if(void 0!==(i=this.e.fire("beforeGetValueFromEditor",t)))return i;i=this.getNativeEditorValue().replace(s.INVISIBLE_SPACE_REG_EXP(),""),e&&(i=i.replace(/<span[^>]+id="jodit-selection_marker_[^>]+><\/span>/g,"")),"<br>"===i&&(i="");let o={value:i};return this.e.fire("afterGetValueFromEditor",o,t),o.value}setEditorValue(e){let t=this.e.fire("beforeSetValueToEditor",e);if(!1===t)return;if((0,l.isString)(t)&&(e=t),!this.editor){void 0!==e&&this.__setElementValue(e);return}if(!(0,l.isString)(e)&&!(0,l.isVoid)(e))throw(0,l.error)("value must be string");(0,l.isVoid)(e)||this.getNativeEditorValue()===e||this.setNativeEditorValue(e),this.e.fire("postProcessSetEditorValue");let i=this.getElementValue(),o=this.getEditorValue();if(!this.__isSilentChange&&i!==o&&this.__callChangeCount<s.SAFE_COUNT_CHANGE_CALL){this.__setElementValue(o),this.__callChangeCount+=1,s.IS_PROD||this.__callChangeCount;try{this.history.__upTick(),this.e.fire("change",o,i),this.e.fire(this.history,"change",o,i)}finally{this.__callChangeCount=0}}}updateElementValue(){this.__setElementValue(this.getEditorValue())}getElementValue(){return this.element===this.container&&void 0!==this.__inlineElementValue?this.__inlineElementValue:void 0!==this.element.value?this.element.value:this.element.innerHTML}__setElementValue(e){if(!(0,l.isString)(e))throw(0,l.error)("value must be string");if(this.element===this.container){this.__inlineElementValue=e;return}if(e!==this.getElementValue()){let t={value:e},i=this.e.fire("beforeSetElementValue",t);(0,l.callPromise)(i,()=>{void 0!==this.element.value?this.element.value=t.value:this.element.innerHTML=t.value,this.e.fire("afterSetElementValue",t)})}}registerCommand(e,t,i){let o=e.toLowerCase(),n=this.commands.get(o);if(void 0===n&&(n=[],this.commands.set(o,n)),n.push(t),!(0,l.isFunction)(t)){let n=this.o.commandToHotkeys[o]||this.o.commandToHotkeys[e]||t.hotkeys;n&&this.registerHotkeyToCommand(n,o,i?.stopPropagation)}return this}registerHotkeyToCommand(e,t,i=!0){let o=(0,l.asArray)(e).map(l.normalizeKeyAliases).map(e=>e+".hotkey").join(" ");this.e.off(o).on(o,(e,o)=>(o&&(o.shouldStop=i??!0),this.execCommand(t)))}execCommand(e,t,i,...o){let n;if(this.s.isFocused()||this.s.focus(),!this.o.readonly||this.o.allowCommandsInReadOnly.includes(e)){if(e=e.toLowerCase(),!1!==(n=this.e.fire("beforeCommand"+(0,l.ucfirst)(e),t,i,...o))&&(n=this.e.fire("beforeCommand",e,t,i,...o)),!1!==n&&(n=this.__execCustomCommands(e,t,i,...o)),!1!==n){this.s.focus();try{n=this.nativeExecCommand(e,t,i)}catch(e){if(!s.IS_PROD)throw e}}return this.e.fire("afterCommand",e,t,i),this.__imdSynchronizeValues(),n}}nativeExecCommand(e,t,i){this.__isSilentChange=!0;try{return this.ed.execCommand(e,t,i)}finally{this.__isSilentChange=!1}}__execCustomCommands(e,t,i,...o){e=e.toLowerCase();let n=this.commands.get(e);if(void 0!==n){let s;return n.forEach(n=>{let r=((0,l.isFunction)(n)?n:n.exec).call(this,e,t,i,...o);void 0!==r&&(s=r)}),s}}lock(e="any"){return!!super.lock(e)&&(this.__selectionLocked=this.s.save(),this.s.clear(),this.container.classList.add("jodit_lock"),this.e.fire("lock",!0),!0)}unlock(){return!!super.unlock()&&(this.container.classList.remove("jodit_lock"),this.__selectionLocked&&this.s.restore(),this.e.fire("lock",!1),!0)}getMode(){return this.mode}isEditorMode(){return this.getRealMode()===s.MODE_WYSIWYG}getRealMode(){if(this.getMode()!==s.MODE_SPLIT)return this.getMode();let e=this.od.activeElement;return e&&(e===this.iframe||p.Dom.isOrContains(this.editor,e)||p.Dom.isOrContains(this.toolbar.container,e))?s.MODE_WYSIWYG:s.MODE_SOURCE}setMode(e){let t=this.getMode(),i={mode:parseInt(e.toString(),10)},o=["jodit-wysiwyg_mode","jodit-source__mode","jodit_split_mode"];!1!==this.e.fire("beforeSetMode",i)&&(this.__mode=[s.MODE_SOURCE,s.MODE_WYSIWYG,s.MODE_SPLIT].includes(i.mode)?i.mode:s.MODE_WYSIWYG,this.o.saveModeInStorage&&this.storage.set("jodit_default_mode",this.mode),o.forEach(e=>{this.container.classList.remove(e)}),this.container.classList.add(o[this.mode-1]),t!==this.getMode()&&this.e.fire("afterSetMode"))}toggleMode(){let e=this.getMode();[s.MODE_SOURCE,s.MODE_WYSIWYG,this.o.useSplitMode?s.MODE_SPLIT:9].includes(e+1)?e+=1:e=s.MODE_WYSIWYG,this.setMode(e)}setDisabled(e){this.o.disabled=e;let t=this.__wasReadOnly;this.setReadOnly(e||t),this.__wasReadOnly=t,this.editor&&((0,l.attr)(this.editor,"aria-disabled",e),this.container.classList.toggle("jodit_disabled",e),this.e.fire("disabled",e))}getDisabled(){return this.o.disabled}setReadOnly(e){this.__wasReadOnly!==e&&(this.__wasReadOnly=e,this.o.readonly=e,e?this.editor&&(0,l.attr)(this.editor,"contenteditable",null):this.editor&&(0,l.attr)(this.editor,"contenteditable",!0),this.e&&this.e.fire("readonly",e))}getReadOnly(){return this.o.readonly}focus(){this.getMode()!==s.MODE_SOURCE&&this.s.focus()}get isFocused(){return this.s.isFocused()}beforeInitHook(){}afterInitHook(){}initOptions(e){this.options=(0,l.ConfigProto)(e||{},d.Config.defaultOptions)}initOwners(){this.editorWindow=this.o.ownerWindow,this.ownerWindow=this.o.ownerWindow}addPlace(e,t){let i=(0,l.resolveElement)(e,this.o.shadowRoot||this.od);this.attachEvents(t),i.attributes&&(0,l.toArray)(i.attributes).forEach(e=>{let i=e.name,o=e.value;void 0===d.Config.defaultOptions[i]||t&&void 0!==t[i]||(-1!==["readonly","disabled"].indexOf(i)&&(o=""===o||"true"===o),/^[0-9]+(\.)?([0-9]+)?$/.test(o.toString())&&(o=Number(o)),this.options[i]=o)});let o=this.c.div("jodit-container");o.classList.add("jodit"),o.classList.add("jodit-container"),o.classList.add("jodit_theme_"+(this.o.theme||"default")),_(this.o.className,o),this.o.containerStyle&&(0,l.css)(o,this.o.containerStyle);let{styleValues:n}=this.o;Object.keys(n).forEach(e=>{let t=(0,l.kebabCase)(e);o.style.setProperty("--jd-"+t,n[e])}),(0,l.attr)(o,"contenteditable",!1);let s=null;if(this.o.inline&&(-1===["TEXTAREA","INPUT"].indexOf(i.nodeName)&&(o=i,(0,l.attr)(i,m,i.className.toString()),s=o.innerHTML,p.Dom.detach(o)),o.classList.add("jodit_inline"),o.classList.add("jodit-container")),i!==o){let e=(0,c.cssInline)(i,"display");e&&(0,l.attr)(i,f,e),(0,l.css)(i,"display","none")}let r="workplace-slot",a=this.c.div(this.getFullElName(r,"above"),g);(0,l.attr)(a,"data-jodit-above-toolbar",""),p.Dom.appendChildFirst(o,a);let u=this.c.div(this.getFullElName(r,"top"),g);p.Dom.append(o,u);let h=this.c.div(this.getFullElName(r,"center"),g),v=this.c.div("jodit-workplace",g),b=this.c.div(this.getFullElName(r,"left"),g),y=this.c.div(this.getFullElName(r,"right"),g);p.Dom.append(h,b),p.Dom.append(h,v),p.Dom.append(h,y),p.Dom.append(o,h);let w=this.c.div(this.getFullElName(r,"bottom"),g);p.Dom.append(o,w),i.parentNode&&i!==o&&p.Dom.before(i,o),Object.defineProperty(i,"component",{enumerable:!1,configurable:!0,value:this});let S=this.c.div("jodit-wysiwyg",{contenteditable:!0,"aria-disabled":!1,tabindex:this.o.tabIndex});p.Dom.append(v,S);let C={editor:S,element:i,container:o,workplace:v,slots:{above:a,top:u,bottom:w,center:h,left:b,right:y},statusbar:new p.StatusBar(this,o),options:this.isReady?(0,l.ConfigProto)(t||{},d.Config.defaultOptions):this.options,history:new p.History(this),editorWindow:this.ow};this.__elementToPlace.set(S,C),this.setCurrentPlace(C),this.places.push(C),this.setNativeEditorValue(this.getElementValue());let E=this.__initEditor(s),D=this.options,I=()=>{D.enableDragAndDropFileToEditor&&D.uploader&&(D.uploader.url||D.uploader.insertImageAsBase64URI)?this.uploader.bind(this.editor):D.enableDragAndDropFileToEditor||this.e.on(S,"drop",e=>{e.dataTransfer?.files?.length&&e.preventDefault()}),this.__elementToPlace.get(this.editor)||this.__elementToPlace.set(this.editor,C),this.e.fire("afterAddPlace",C)};return(0,l.callPromise)(E,I)}addDisclaimer(e){p.Dom.append(this.workplace,e)}setCurrentPlace(e){this.currentPlace!==e&&(this.isEditorMode()||this.setMode(s.MODE_WYSIWYG),this.currentPlace=e,this.buildToolbar(),this.isReady&&this.e.fire("changePlace",e))}__initEditor(e){let t=this.__createEditor();return(0,l.callPromise)(t,()=>{if(this.isInDestruct)return;if(this.element!==this.container){let e=this.getElementValue();e!==this.getEditorValue()&&this.setEditorValue(e)}else null!=e&&this.setEditorValue(e);let t=this.o.defaultMode;if(this.o.saveModeInStorage){let e=this.storage.get("jodit_default_mode");"string"==typeof e&&(t=parseInt(e,10))}this.setMode(t),this.o.readonly&&(this.__wasReadOnly=!1,this.setReadOnly(!0)),this.o.disabled&&this.setDisabled(!0);try{this.ed.execCommand("defaultParagraphSeparator",!1,this.o.enter.toLowerCase())}catch{}})}__createEditor(){let e=this.editor,t=this.e.fire("createEditor",this);return(0,l.callPromise)(t,()=>{!this.isInDestruct&&((!1===t||(0,l.isPromise)(t))&&p.Dom.safeRemove(e),_(this.o.editorClassName,this.editor),this.o.style&&(0,l.css)(this.editor,this.o.style),this.e.on("synchro",()=>{this.setEditorValue()}).on("focus",()=>{this.editorIsActive=!0}).on("blur",()=>this.editorIsActive=!1),this.__prepareWYSIWYGEditor(),this.o.triggerChangeEvent&&this.e.on("change",this.async.debounce(()=>{this.e&&this.e.fire(this.element,"change")},this.defaultTimeout)))})}__prepareWYSIWYGEditor(){let{editor:e}=this;if(this.o.direction){let e="rtl"===this.o.direction.toLowerCase()?"rtl":"ltr";(0,l.css)(this.editor,"direction",e),(0,l.attr)(this.editor,"dir",e),(0,l.css)(this.container,"direction",e),(0,l.attr)(this.container,"dir",e),this.toolbar.setDirection(e)}this.e.on(e,"mousedown touchstart focus",()=>{let t=this.__elementToPlace.get(e);t&&this.setCurrentPlace(t)}).on(e,"compositionend",this.synchronizeValues).on(e,"selectionchange selectionstart keydown keyup input keypress dblclick mousedown mouseup click copy cut dragstart drop dragover paste resize touchstart touchend focus blur",e=>{if(!this.o.readonly&&!this.__isSilentChange&&(!(e instanceof this.ew.KeyboardEvent)||!e.isComposing)&&this.e&&this.e.fire){if(!1===this.e.fire(e.type,e))return!1;this.synchronizeValues()}}).on(this.ow,"mouseup",t=>{if(this.o.readonly||this.__isSilentChange)return;let i=t.target;!(i&&(0,l.isNumber)(i.nodeType)&&e.contains(i))&&this.s.isInsideArea&&(this.e.fire("changeSelection"),this.synchronizeValues())})}fetch(e,t){let i=new u.Ajax({url:e,...t},this.o.defaultAjaxOptions),o=()=>{this.e.off("beforeDestruct",o),this.progressbar.progress(100).hide(),i.destruct()};this.e.one("beforeDestruct",o),this.progressbar.show().progress(30);let n=i.send();return n.finally(o).catch(()=>null),n}destruct(){if(this.isInDestruct)return;this.setStatus(p.STATUSES.beforeDestruct),this.__elementToPlace.clear(),(0,r.cached)(this,"storage")?.clear(),(0,r.cached)(this,"buffer")?.clear(),this.commands.clear(),this.__selectionLocked=null,this.e.off(this.ow,"resize"),this.e.off(this.ow),this.e.off(this.od),this.e.off(this.od.body);let e=this.editor?this.getEditorValue():"";this.places.forEach(({container:t,workplace:i,statusbar:o,element:n,iframe:s,editor:r,history:a})=>{if(n){if(n!==t)if(n.hasAttribute(f)){let e=(0,l.attr)(n,f);e&&((0,l.css)(n,"display",e),(0,l.attr)(n,f,null))}else(0,l.css)(n,"display","");else n.hasAttribute(m)&&(n.className=(0,l.attr)(n,m)||"",(0,l.attr)(n,m,null));n.hasAttribute("style")&&!(0,l.attr)(n,"style")&&(0,l.attr)(n,"style",null),o.destruct(),this.e.off(t),this.e.off(n),this.e.off(r),p.Dom.safeRemove(i),p.Dom.safeRemove(r),t!==n&&p.Dom.safeRemove(t),Object.defineProperty(n,"component",{enumerable:!1,configurable:!0,value:null}),p.Dom.safeRemove(s),t===n&&(n.innerHTML=e),a.destruct()}}),this.places.length=0,this.currentPlace={},delete a.instances[this.id],super.destruct()}constructor(e,t){super(t,!0),(0,o._)(this,"isJodit",!0),(0,o._)(this,"commands",new Map),(0,o._)(this,"__selectionLocked",null),(0,o._)(this,"__wasReadOnly",!1),(0,o._)(this,"editorIsActive",!1),(0,o._)(this,"selection",void 0),(0,o._)(this,"__mode",s.MODE_WYSIWYG),(0,o._)(this,"__callChangeCount",0),(0,o._)(this,"__inlineElementValue",void 0),(0,o._)(this,"__isSilentChange",!1),(0,o._)(this,"currentPlace",{options:this.__options,container:this.__container}),(0,o._)(this,"places",[]),(0,o._)(this,"__elementToPlace",new Map);try{let t=(0,l.resolveElement)(e,this.options.shadowRoot||this.od);if(Jodit.isJoditAssigned(t))return t.component}catch(e){if(!s.IS_PROD)throw e;throw this.destruct(),e}this.setStatus(p.STATUSES.beforeInit),this.id=(0,l.attr)((0,l.resolveElement)(e,this.o.shadowRoot||this.od),"id")||new Date().getTime().toString(),a.instances[this.id]=this,this.attachEvents(t),this.e.on(this.ow,"resize",()=>{this.e&&this.e.fire("resize")}),this.e.on("prepareWYSIWYGEditor",this.__prepareWYSIWYGEditor),this.selection=new p.Selection(this);let i=this.beforeInitHook();(0,l.callPromise)(i,()=>{if(this.isInDestruct)return;this.e.fire("beforeInit",this),a.pluginSystem.__init(this),this.e.fire("afterPluginSystemInit",this),this.e.on("changePlace",()=>{this.setReadOnly(this.o.readonly),this.setDisabled(this.o.disabled)}),this.places.length=0;let i=this.addPlace(e,t);a.instances[this.id]=this;let o=()=>{this.isInDestruct||(this.e&&this.e.fire("afterInit",this),(0,l.callPromise)(this.afterInitHook()),this.setStatus(p.STATUSES.ready),this.e.fire("afterConstructor",this))};(0,l.callPromise)(i,o)})}}function _(e,t){e&&e.split(/\s+/).forEach(e=>t.classList.add(e))}(0,o._)(Jodit,"fatMode",s.FAT_MODE),(0,o._)(Jodit,"plugins",a.pluginSystem),(0,o._)(Jodit,"modules",a.modules),(0,o._)(Jodit,"ns",a.modules),(0,o._)(Jodit,"decorators",{}),(0,o._)(Jodit,"constants",s),(0,o._)(Jodit,"instances",a.instances),(0,o._)(Jodit,"lang",s.lang),(0,o._)(Jodit,"core",{Plugin:p.Plugin}),(0,n.__decorate)([r.cache],Jodit.prototype,"createInside",null),(0,n.__decorate)([r.cache],Jodit.prototype,"message",null),(0,n.__decorate)([r.cache],Jodit.prototype,"s",null),(0,n.__decorate)([r.cache],Jodit.prototype,"uploader",null),(0,n.__decorate)([r.cache],Jodit.prototype,"filebrowser",null),(0,n.__decorate)([(0,r.throttle)()],Jodit.prototype,"synchronizeValues",null),(0,n.__decorate)([(0,r.watch)(":internalChange")],Jodit.prototype,"updateElementValue",null),(0,n.__decorate)([r.autobind],Jodit.prototype,"__prepareWYSIWYGEditor",null),Jodit=(0,n.__decorate)([(0,r.derive)(h.Dlgs)],Jodit)},89317:function(e,t,i){"use strict";var o=i(17312),n=i(41324),s=i.n(n),r=i(63837),a=i(53414);let l={};l={ar:s(),az:s(),cs_cz:s(),de:s(),en:r,es:s(),fa:s(),fi:s(),fr:s(),he:s(),hu:s(),id:s(),it:s(),ja:s(),ko:s(),mn:s(),nl:s(),no:s(),pl:s(),pt_br:s(),ru:s(),sk:s(),sv:s(),tr:s(),ua:s(),zh_cn:s(),zh_tw:s()};let c=e=>e?e.default||e:{},u={};(0,o.isArray)(c(a))&&c(a).forEach((e,t)=>{u[t]=e}),Object.keys(l).forEach(e=>{let t=c(l[e]);(0,o.isArray)(t)?(l[e]={},t.forEach((t,i)=>{l[e][u[i]]=t})):l[e]=t}),t.default=l},67399:function(e,t,i){"use strict";i.d(t,{ContextMenu:function(){return l}});var o=i(31635),n=i(91672),s=i(17312),r=i(53681),a=i(51116);class l extends a.Popup{className(){return"ContextMenu"}show(e,t,i){let o=this;o.clear(),(0,s.isArray)(i)&&(i.forEach(e=>{if(!e)return;let t=(0,r.Button)(this.jodit,e.icon||"empty",e.title);this.jodit&&t.setParentView(this.jodit),t.setMod("context","menu"),t.onAction(t=>(e.exec?.call(o,t),o.clear(),o.close(),!1)),this.append(t)}),this.open(()=>({left:e,top:t,width:0,height:0}),!0))}}l=(0,o.__decorate)([n.component],l)},91535:function(e,t,i){"use strict";i.d(t,{Alert:function(){return l}});var o=i(23211),n=i(78982),s=i(91565),r=i(53681),a=i(76841);function l(e,t,i,c="jodit-dialog_alert"){(0,s.isFunction)(t)&&(i=t,t=void 0);let u=this instanceof a.Dialog?this:new a.Dialog({closeOnClickOverlay:!0}),h=u.c.div(c),d=(0,r.Button)(u,"ok","Ok");return(0,n.asArray)(e).forEach(e=>{o.Dom.append(h,o.Dom.isNode(e)?e:u.c.fromHTML(e))}),d.onAction(()=>{i&&(0,s.isFunction)(i)&&!1===i(u)||u.close()}),u.setFooter([d]),u.open(h,t||"&nbsp;",!0,!0),d.focus(),u}},88329:function(e,t,i){"use strict";i.d(t,{Confirm:function(){return a}});var o=i(23211),n=i(91565),s=i(53681),r=i(76841);function a(e,t,i){let a=this instanceof r.Dialog?this:new r.Dialog({closeOnClickOverlay:!0}),l=a.c.fromHTML('<form class="jodit-dialog_prompt"></form>'),c=a.c.element("label");(0,n.isFunction)(t)&&(i=t,t=void 0),o.Dom.append(c,a.c.fromHTML(e)),o.Dom.append(l,c);let u=e=>()=>{i&&!1===i(e)||a.close()},h=(0,s.Button)(a,"cancel","Cancel"),d=(0,s.Button)(a,"ok","Yes");return h.onAction(u(!1)),d.onAction(u(!0)),a.e.on(l,"submit",()=>(u(!0)(),!1)),a.setFooter([d,h]),a.open(l,t||"&nbsp;",!0,!0),d.focus(),a}},76841:function(e,t,i){"use strict";i.d(t,{Dialog:function(){return b}});var o=i(25045),n=i(31635),s=i(16964),r=i(81937),a=i(84839),l=i(23211),c=i(28077),u=i(45664),h=i(28686),d=i(22852),p=i(93640),f=i(28712),m=i(4099),g=i(35099),_=i(2222),v=i(5266);v.Config.prototype.dialog={namespace:"",extraButtons:[],resizable:!0,draggable:!0,buttons:["dialog.close"],removeButtons:[],toolbarButtonSize:"middle",zIndex:"inherit"},v.Config.prototype.controls.dialog={close:{icon:"cancel",exec(e){e.close()}}};class b extends _.ViewWithToolbar{className(){return"Dialog"}get destination(){let{popupRoot:e,shadowRoot:t}=this.o;return e||t||this.od.body}setElements(e,t){let i=[];(0,u.asArray)(t).forEach(t=>{let o;if((0,h.isArray)(t)){let o=this.c.div(this.getFullElName("column"));return i.push(o),l.Dom.append(e,o),this.setElements(o,t)}o=(0,h.isString)(t)?this.c.fromHTML(t):(0,h.hasContainer)(t)?t.container:t,i.push(o),o.parentNode!==e&&l.Dom.append(e,o)}),(0,u.toArray)(e.childNodes).forEach(e=>{-1===i.indexOf(e)&&l.Dom.safeRemove(e)})}__onMouseUp(){(this.draggable||this.resizable)&&(this.__removeGlobalResizeListeners(),this.draggable=!1,this.resizable=!1,this.unlockSelect(),this.e&&(this.__removeGlobalResizeListeners(),this.e.fire(this,"endResize endMove")))}__onHeaderMouseDown(e){let t=e.target;!(!this.o.draggable||t&&t.nodeName.match(/^(INPUT|SELECT)$/))&&(this.draggable=!0,this.startX=e.clientX,this.startY=e.clientY,this.startPoint.x=(0,p.css)(this.dialog,"left"),this.startPoint.y=(0,p.css)(this.dialog,"top"),this.setMaxZIndex(),e.cancelable&&e.preventDefault(),this.lockSelect(),this.__addGlobalResizeListeners(),this.e&&(this.e.fire(this,"startMove"),this.e.fire("closeAllPopups")))}__onMouseMove(e){this.draggable&&this.o.draggable&&(this.setPosition(this.startPoint.x+e.clientX-this.startX,this.startPoint.y+e.clientY-this.startY),this.e&&this.e.fire(this,"move",e.clientX-this.startX,e.clientY-this.startY),e.stopImmediatePropagation()),this.resizable&&this.o.resizable&&(this.setSize(Math.max(this.startPoint.w+e.clientX-this.startX,this.minSize.w),Math.max(this.startPoint.h+e.clientY-this.startY,this.minSize.h)),this.e&&this.e.fire(this,"resizeDialog",e.clientX-this.startX,e.clientY-this.startY))}__onEsc(e){if(this.o.closeOnEsc&&this.isOpened&&e.key===r.KEY_ESC&&!0!==this.getMod("static")){let t=this.getMaxZIndexDialog();t?t.close():this.close(),e.stopImmediatePropagation()}}__onResizerMouseDown(e){this.resizable=!0,this.startX=e.clientX,this.startY=e.clientY,this.startPoint.w=this.dialog.offsetWidth,this.startPoint.h=this.dialog.offsetHeight;let t=this.getElm("header"),i=this.getElm("footer"),o=this.getElm("content"),n=o&&parseFloat(this.ow.getComputedStyle(o).minHeight)||0;this.minSize.w=(0,h.isNumber)(this.o.minWidth)?this.o.minWidth:Math.max(100,i?.scrollWidth??0),this.minSize.h=(0,h.isNumber)(this.o.minHeight)?this.o.minHeight:(t?.offsetHeight??0)+(i?.offsetHeight??0)+n+this.resizer.offsetHeight,this.lockSelect(),this.__addGlobalResizeListeners(),this.e&&this.e.fire(this,"startResize")}__addGlobalResizeListeners(){this.e.on(this.ow,"pointermove touchmove",this.__onMouseMove).on(this.ow,"pointerup touchend",this.__onMouseUp)}__removeGlobalResizeListeners(){this.e.off(this.ow,"mousemove pointermove",this.__onMouseMove).off(this.ow,"mouseup pointerup",this.__onMouseUp)}setSize(e,t){return null==e&&(e=this.dialog.offsetWidth),null==t&&(t=this.dialog.offsetHeight),(0,p.css)(this.dialog,{width:e,height:t}),this}calcAutoSize(){return this.setSize("auto","auto"),this.setSize(),this}setPosition(e,t){let i=this.ow.innerWidth,o=this.ow.innerHeight,n=i/2-this.dialog.offsetWidth/2,s=o/2-this.dialog.offsetHeight/2;return n<0&&(n=0),s<0&&(s=0),void 0!==e&&void 0!==t&&(this.offsetX=e,this.offsetY=t,this.moved=Math.abs(e-n)>100||Math.abs(t-s)>100),(0,p.css)(this.dialog,{left:(e||n)+"px",top:(t||s)+"px"}),this}setHeader(e){if(this.setElements(this.dialogbox_header,e),(0,h.isString)(e)){let t=(0,d.stripTags)(e,this.od).trim();(0,p.attr)(this.container,"aria-label",t||null)}return this}setContent(e){return this.setElements(this.dialogbox_content,e),this}setFooter(e){return this.setElements(this.dialogbox_footer,e),this.setMod("footer",!!e),this}__openedSiblings(){let e=[];return b.__opened.forEach(t=>{t.destination===this.destination&&e.push(t)}),e}getZIndex(){return parseInt((0,p.css)(this.container,"zIndex"),10)||0}getMaxZIndexDialog(){let e=0,t=this;return this.__openedSiblings().forEach(i=>{let o=i.getZIndex();o>e&&(t=i,e=o)}),t}setMaxZIndex(){if(this.getMod("static"))return;let e=0x1312d04;this.__openedSiblings().forEach(t=>{e=Math.max(t.getZIndex(),e)}),(0,p.css)(this.container,"zIndex",(e+1).toString())}toggleFullSize(e){(0,h.isVoid)(e)&&(e=!this.getMod("fullsize")),this.setMod("fullsize",e),super.toggleFullSize(e)}open(e,t,i,o){if(c.eventEmitter.fire("closeAllPopups hideHelpers"),!1===this.e.fire(this,"beforeOpen"))return this;(0,h.isBoolean)(e)&&(i=e),(0,h.isBoolean)(t)&&(o=t),this.destroyAfterClose=!0===i;let n=(0,h.isBoolean)(e)?void 0:e,s=(0,h.isBoolean)(t)?void 0:t;return void 0!==s&&this.setHeader(s),n&&this.setContent(n),this.setMod("active",!0),this.isOpened=!0,b.__opened.add(this),this.setModal(o),l.Dom.append(this.destination,this.container),!0!==this.getMod("static")?(this.setPosition(this.offsetX,this.offsetY),this.setMaxZIndex()):(0,p.css)(this.container,"zIndex",null),this.o.fullsize&&this.toggleFullSize(!0),this.e.fire("afterOpen",this),this}setModal(e){return this.isModal=!!e,this.setMod("modal",this.isModal),this}close(){if(this.isDestructed||!this.isOpened||!0===this.getMod("static"))return this;let{e}=this;return!1===e.fire(this,"beforeClose")||!1===e.fire("beforeClose",this)||(this.setMod("active",!1),this.isOpened=!1,b.__opened.delete(this),this.isFullSize&&this.toggleFullSize(!1),l.Dom.safeRemove(this.container),this.__removeGlobalResizeListeners(),e.fire(this,"afterClose"),this.isInDestruct||e.fire(this.ow,"joditCloseDialog"),this.destroyAfterClose&&this.destruct()),this}buildToolbar(){this.o.buttons&&this.toolbar.build((0,u.splitArray)(this.o.buttons)).setMod("mode","header").appendTo(this.dialogbox_toolbar)}destruct(){this.isInDestruct||(this.setStatus(s.STATUSES.beforeDestruct),this.isOpened&&this.close(),b.__opened.delete(this),this.events&&(this.__removeGlobalResizeListeners(),this.events.off(this.container,"close_dialog",self.close).off(this.ow,"keydown",this.__onEsc).off(this.ow,"resize",this.__onResize)),super.destruct())}constructor(e={}){super(e),(0,o._)(this,"resizer",void 0),(0,o._)(this,"offsetX",void 0),(0,o._)(this,"offsetY",void 0),(0,o._)(this,"destroyAfterClose",!1),(0,o._)(this,"moved",!1),(0,o._)(this,"resizable",!1),(0,o._)(this,"draggable",!1),(0,o._)(this,"startX",0),(0,o._)(this,"startY",0),(0,o._)(this,"startPoint",{x:0,y:0,w:0,h:0}),(0,o._)(this,"lockSelect",()=>{this.setMod("moved",!0)}),(0,o._)(this,"unlockSelect",()=>{this.setMod("moved",!1)}),(0,o._)(this,"__onResize",()=>{this.options&&this.o.resizable&&!this.moved&&this.isOpened&&!this.offsetX&&!this.offsetY&&this.setPosition()}),(0,o._)(this,"minSize",{w:0,h:0}),(0,o._)(this,"dialog",void 0),(0,o._)(this,"workplace",void 0),(0,o._)(this,"dialogbox_header",void 0),(0,o._)(this,"dialogbox_content",void 0),(0,o._)(this,"dialogbox_footer",void 0),(0,o._)(this,"dialogbox_toolbar",void 0),(0,o._)(this,"isModal",!1),(0,o._)(this,"isOpened",!1),this.options=(0,p.ConfigProto)(e,(0,p.ConfigProto)(v.Config.prototype.dialog,b.defaultOptions)),this.attachEvents(this.options),l.Dom.safeRemove(this.container);let t=this.getFullElName.bind(this);this.container=this.c.fromHTML(`<div class="jodit jodit-dialog ${this.componentName}">
27
+ </div>`}destruct(){return this.close(),super.destruct()}constructor(e,t=!0){super(e),(0,o._)(this,"smart",void 0),(0,o._)(this,"isOpened",void 0),(0,o._)(this,"strategy",void 0),(0,o._)(this,"viewBound",void 0),(0,o._)(this,"__targetBound",void 0),(0,o._)(this,"__childrenPopups",void 0),this.smart=t,this.isOpened=!1,this.strategy="leftBottom",this.viewBound=()=>({left:0,top:0,width:this.ow.innerWidth,height:this.ow.innerHeight}),this.__childrenPopups=new Set,(0,c.attr)(this.container,"role","popup")}}(0,n.__decorate)([r.autobind],m.prototype,"updatePosition",null),(0,n.__decorate)([(0,r.throttle)(10),r.autobind],m.prototype,"__throttleUpdatePosition",null),(0,n.__decorate)([r.autobind],m.prototype,"close",null),(0,n.__decorate)([r.autobind],m.prototype,"__closeOnOutsideClick",null)},34396:function(e,t,i){"use strict";i.d(t,{ProgressBar:function(){return u}});var o=i(25045),n=i(23211),s=i(28077),r=i(23599),a=i(80991),l=i(96007),c=i(29434);class u extends l.UIElement{className(){return"ProgressBar"}render(){return"<div><div></div></div>"}show(){let e=this.j.workplace||this.j.container;return n.Dom.append(e,this.container),this}hide(){return n.Dom.safeRemove(this.container),this}progress(e){return(0,a.css)(this.container,"width",e.toFixed(2)+"%"),this}showFileUploadAnimation(e,t){this.__cleanUpAnimation();let i=(0,s.getContainer)(this.j,u),o=(0,r.position)(this.j.container,this.j),l=this.j.c.div(this.getFullElName("file-animation")),h=c.Icon.get("file","");h&&(l.innerHTML=h);let d=e??{x:o.width/2,y:0},f=t??{x:d.x+60,y:d.y-80};(0,a.css)(l,{left:o.left+d.x,top:o.top+d.y}),n.Dom.append(i,l),this.__animationElement=l,l.offsetWidth,(0,a.css)(l,{left:o.left+f.x,top:o.top+f.y,opacity:0,transform:"scale(0.4)"});let p=()=>{l.removeEventListener("transitionend",p),this.__cleanUpAnimation()};l.addEventListener("transitionend",p)}__cleanUpAnimation(){this.__animationElement&&(n.Dom.safeRemove(this.__animationElement),this.__animationElement=null)}destruct(){return this.__cleanUpAnimation(),this.hide(),super.destruct()}constructor(...e){super(...e),(0,o._)(this,"__animationElement",null)}}},2222:function(e,t,i){"use strict";i.d(t,{ViewWithToolbar:function(){return g}});var o=i(25045),n=i(31635),s=i(69364),r=i(49574),a=i(68616),l=i(23211),c=i(45664),u=i(85932),h=i(28723),d=i(4099),f=i(2496),p=i(35099),m=i(4274);class g extends p.View{get toolbarContainer(){return!this.o.fullsize&&((0,u.isString)(this.o.toolbar)||l.Dom.isHTMLElement(this.o.toolbar))?(0,h.resolveElement)(this.o.toolbar,this.o.shadowRoot||this.od):(this.o.toolbar&&this.__appendToolbarBox(),this.__defaultToolbarContainer)}__appendToolbarBox(){let e=this.__defaultToolbarContainer,t=this.container.firstElementChild;for(;t&&t!==e&&t.hasAttribute("data-jodit-above-toolbar");)t=t.nextElementSibling;t!==e&&(t?l.Dom.before(t,e):l.Dom.append(this.container,e))}setPanel(e){this.o.toolbar=e,this.buildToolbar()}buildToolbar(){if(!this.o.toolbar)return;let e=this.o.buttons?(0,c.splitArray)(this.o.buttons):[];this.toolbar?.setRemoveButtons(this.o.removeButtons).build(e.concat(this.o.extraButtons||[])).appendTo(this.toolbarContainer)}getRegisteredButtonGroups(){return this.groupToButtons}registerButton(e){this.registeredButtons.add(e);let t=e.group??"other";return this.groupToButtons[t]||(this.groupToButtons[t]=[]),null!=e.position?this.groupToButtons[t][e.position]=e.name:this.groupToButtons[t].push(e.name),this}unregisterButton(e){this.registeredButtons.delete(e);let t=e.group??"other",i=this.groupToButtons[t];if(i){let o=i.indexOf(e.name);-1!==o&&i.splice(o,1),0===i.length&&delete this.groupToButtons[t]}return this}beforeToolbarBuild(e){if(Object.keys(this.groupToButtons).length)return e.map(e=>(0,f.isButtonGroup)(e)&&e.group&&this.groupToButtons[e.group]?{group:e.group,buttons:[...e.buttons,...this.groupToButtons[e.group]]}:e)}destruct(){this.isDestructed||(this.setStatus(s.STATUSES.beforeDestruct),this.e.off("beforeToolbarBuild",this.beforeToolbarBuild),this.__tooltip.destruct(),this.toolbar.destruct(),this.toolbar=void 0,super.destruct())}constructor(e,t=!1){super(e,t),(0,o._)(this,"toolbar",(0,m.makeCollection)(this)),(0,o._)(this,"__defaultToolbarContainer",this.c.div("jodit-toolbar__box")),(0,o._)(this,"registeredButtons",new Set),(0,o._)(this,"groupToButtons",{}),(0,o._)(this,"isJodit",!1),(0,o._)(this,"__tooltip",new d.UITooltip(this)),this.isJodit=t,this.e.on("beforeToolbarBuild",this.beforeToolbarBuild)}}(0,n.__decorate)([(0,a.watch)(":rebuildToolbar")],g.prototype,"buildToolbar",null),(0,n.__decorate)([r.autobind],g.prototype,"beforeToolbarBuild",null)},35099:function(e,t,i){"use strict";i.d(t,{View:function(){return C}});var o=i(25045),n=i(31635),s=i(16964),r=i(80251),a=i(69364),l=i(81937),c=i(76517),u=i(51676),h=i(24968),d=i(29200),f=i(27795),p=i(1496),m=i(28077),g=i(65946),_=i(8006),v=i(24475),b=i(23183),y=i(81987),w=i(34396),S=i(10081);class C extends r.Component{get basePath(){return this.o.basePath?this.o.basePath:l.BASE_PATH}get minified(){return void 0!==this.o.minified?this.o.minified:l.BASE_PATH_IS_MIN}get defaultTimeout(){return(0,g.isVoid)(this.o.defaultTimeout)?100:this.o.defaultTimeout}get buffer(){return v.Storage.makeStorage()}get message(){return this.getMessageModule(this.container)}getMessageModule(e){return new S.UIMessages(this,e)}get storage(){return v.Storage.makeStorage(!0,this.id)}get asyncStorage(){return _.AsyncStorage.makeStorage(!0,this.id,this.o.asyncStorage)}get c(){return this.create}get container(){return this.__container}set container(e){this.__container=e}get e(){return this.events}get progressbar(){return new w.ProgressBar(this)}get options(){return this.__options}set options(e){this.__options=e}get o(){return this.options}i18n(e,...t){return(0,g.i18n)(e,t,this.options)}toggleFullSize(e){void 0===e&&(e=!this.__isFullSize),e!==this.__isFullSize&&(this.__isFullSize=e,this.e.fire("toggleFullSize",e))}get isLocked(){return""!==this.__whoLocked}lock(e="any"){return!this.isLocked&&(this.__whoLocked=e,!0)}unlock(){return!!this.isLocked&&(this.__whoLocked="",!0)}get isFullSize(){return this.__isFullSize}getVersion(){return C.version}static getVersion(){return C.version}initOptions(e){this.options=(0,g.ConfigProto)(e||{},(0,g.ConfigProto)(this.options||{},C.defaultOptions))}initOwners(){this.ownerWindow=this.o.ownerWindow??window}attachEvents(e){if(!e)return;let t=e?.events;t&&Object.keys(t).forEach(e=>this.e.on(e,t[e]))}getInstance(e,t){let i=(0,g.isFunction)(e)?e.prototype.className():e,o=this.e.fire((0,g.camelCase)("getInstance_"+i),t);if(o)return o;let n=(0,g.isFunction)(e)?e:m.modules[i],r=this.__modulesInstances;if(!(0,g.isFunction)(n))throw(0,g.error)("Need real module name");if(!r.has(i)){let e=n.prototype instanceof s.ViewComponent?new n(this,t):new n(t);this.components.add(e),r.set(i,e)}return r.get(i)}addDisclaimer(e){f.Dom.append(this.container,e)}beforeDestruct(){this.e.fire(a.STATUSES.beforeDestruct,this),this.components.forEach(e=>{(0,g.isDestructable)(e)&&!e.isInDestruct&&e.destruct()}),this.components.clear()}destruct(){this.isDestructed||((0,u.cached)(this,"progressbar")?.destruct(),(0,u.cached)(this,"message")?.destruct(),(0,u.cached)(this,"asyncStorage")?.close(),this.events&&(this.events.destruct(),this.events=void 0),(0,u.cached)(this,"buffer")?.clear(),f.Dom.safeRemove(this.container),super.destruct())}constructor(e,t=!1){super(),(0,o._)(this,"isJodit",void 0),(0,o._)(this,"isView",void 0),(0,o._)(this,"parent",void 0),(0,o._)(this,"mods",void 0),(0,o._)(this,"id",void 0),(0,o._)(this,"components",void 0),(0,o._)(this,"events",void 0),(0,o._)(this,"create",void 0),(0,o._)(this,"__container",void 0),(0,o._)(this,"OPTIONS",void 0),(0,o._)(this,"__options",void 0),(0,o._)(this,"__isFullSize",void 0),(0,o._)(this,"__whoLocked",void 0),(0,o._)(this,"isLockedNotBy",void 0),(0,o._)(this,"__modulesInstances",void 0),this.isJodit=t,this.isView=!0,this.parent=null,this.mods={},this.components=new Set,this.OPTIONS=C.defaultOptions,this.__isFullSize=!1,this.__whoLocked="",this.isLockedNotBy=e=>this.isLocked&&this.__whoLocked!==e,this.__modulesInstances=new Map,this.id=new Date().getTime().toString(),this.initOptions(e),this.initOwners(),this.events=e?.eventEmmiter??new p.EventEmitter(this.od),this.create=new c.Create(this.od),this.__container=this.c.div("jodit "+this.componentName)}}(0,o._)(C,"ES",l.ES),(0,o._)(C,"version",l.APP_VERSION),(0,o._)(C,"esNext",l.IS_ES_NEXT),(0,o._)(C,"esModern",l.IS_ES_MODERN),(0,o._)(C,"defaultOptions",void 0),(0,n.__decorate)([u.cache],C.prototype,"buffer",null),(0,n.__decorate)([u.cache],C.prototype,"message",null),(0,n.__decorate)([u.cache],C.prototype,"storage",null),(0,n.__decorate)([u.cache],C.prototype,"asyncStorage",null),(0,n.__decorate)([u.cache],C.prototype,"c",null),(0,n.__decorate)([u.cache],C.prototype,"e",null),(0,n.__decorate)([u.cache],C.prototype,"progressbar",null),(0,n.__decorate)([(0,d.hook)(a.STATUSES.beforeDestruct)],C.prototype,"beforeDestruct",null),(C=(0,n.__decorate)([(0,h.derive)(y.Mods,b.Elms)],C)).defaultOptions={extraButtons:[],cache:!0,textIcons:!1,namespace:"",removeButtons:[],zIndex:100002,defaultTimeout:100,fullsize:!1,showTooltip:!0,useNativeTooltip:!1,buttons:[],globalFullSize:!0,language:"auto"}},73302:function(e,t,i){"use strict";i.d(t,{Jodit:function(){return Jodit}});var o=i(25045),n=i(31635),s=i(81937),r=i(84839),a=i(28077),l=i(65946),c=i(80991),u=i(73714),h=i(80512),d=i(5266),f=i(60936);let p="data-jodit-default-style-display",m="data-jodit-default-classes",g={contenteditable:!1};class Jodit extends f.ViewWithToolbar{className(){return"Jodit"}waitForReady(){return this.isReady?Promise.resolve(this):this.async.promise(e=>{this.hookStatus("ready",()=>e(this))})}static get ready(){return new Promise(e=>{a.eventEmitter.on("joditready",e)})}get text(){if(this.editor)return this.editor.innerText||"";let e=this.createInside.div();return e.innerHTML=this.getElementValue(),e.innerText||""}get defaultTimeout(){return(0,l.isNumber)(this.o.defaultTimeout)?this.o.defaultTimeout:d.Config.defaultOptions.defaultTimeout}static atom(e){return(0,l.markAsAtomic)(e)}static make(e,t){return new this(e,t)}static isJoditAssigned(e){return e&&(0,l.isJoditObject)(e.component)&&!e.component.isInDestruct}static get defaultOptions(){return d.Config.defaultOptions}static configure(e){(0,l.ConfigMerge)(Jodit.defaultOptions,e)}get createInside(){return new f.Create(()=>this.ed,this.o.createAttributes)}__setPlaceField(e,t){this.currentPlace||(this.currentPlace={},this.places=[this.currentPlace]),this.currentPlace[e]=t}get element(){return this.currentPlace.element}get editor(){return this.currentPlace.editor}set editor(e){this.__setPlaceField("editor",e)}get container(){return this.currentPlace.container}set container(e){this.__setPlaceField("container",e)}get workplace(){return this.currentPlace.workplace}get message(){return this.getMessageModule(this.workplace)}get statusbar(){return this.currentPlace.statusbar}get iframe(){return this.currentPlace.iframe}set iframe(e){this.__setPlaceField("iframe",e)}get history(){return this.currentPlace.history}get editorWindow(){return this.currentPlace.editorWindow}set editorWindow(e){this.__setPlaceField("editorWindow",e)}get ew(){return this.editorWindow}get editorDocument(){return this.currentPlace.editorWindow.document}get ed(){return this.editorDocument}get options(){return this.currentPlace.options}set options(e){this.__options=e,this.__setPlaceField("options",e)}get s(){return this.selection}get uploader(){return this.getInstance("Uploader",this.o.uploader)}get filebrowser(){let e=this,t=(0,l.ConfigProto)({defaultTimeout:e.defaultTimeout,uploader:e.o.uploader,language:e.o.language,license:e.o.license,theme:e.o.theme,shadowRoot:e.o.shadowRoot,defaultCallback(t){t.files&&t.files.length&&t.files.forEach((i,o)=>{let n=t.baseurl+i;t.isImages&&t.isImages[o]?e.s.insertImage(n,null,e.o.imageDefaultWidth):e.s.insertNode(e.createInside.fromHTML(`<a href='${n}' title='${n}'>${n}</a>`))})}},this.o.filebrowser);return e.getInstance("FileBrowser",t)}get mode(){return this.__mode}set mode(e){this.setMode(e)}getNativeEditorValue(){let e=this.e.fire("beforeGetNativeEditorValue");return(0,l.isString)(e)?e:this.editor?this.editor.innerHTML:this.getElementValue()}setNativeEditorValue(e){let t={value:e};!this.e.fire("beforeSetNativeEditorValue",t)&&this.editor&&(this.editor.innerHTML=t.value)}get value(){return this.getEditorValue()}set value(e){this.setEditorValue(e),this.history.__processChanges()}synchronizeValues(){this.__imdSynchronizeValues()}__imdSynchronizeValues(){this.setEditorValue()}getEditorValue(e=!0,t){let i;if(void 0!==(i=this.e.fire("beforeGetValueFromEditor",t)))return i;i=this.getNativeEditorValue().replace(s.INVISIBLE_SPACE_REG_EXP(),""),e&&(i=i.replace(/<span[^>]+id="jodit-selection_marker_[^>]+><\/span>/g,"")),"<br>"===i&&(i="");let o={value:i};return this.e.fire("afterGetValueFromEditor",o,t),o.value}setEditorValue(e){let t=this.e.fire("beforeSetValueToEditor",e);if(!1===t)return;if((0,l.isString)(t)&&(e=t),!this.editor){void 0!==e&&this.__setElementValue(e);return}if(!(0,l.isString)(e)&&!(0,l.isVoid)(e))throw(0,l.error)("value must be string");(0,l.isVoid)(e)||this.getNativeEditorValue()===e||this.setNativeEditorValue(e),this.e.fire("postProcessSetEditorValue");let i=this.getElementValue(),o=this.getEditorValue();if(!this.__isSilentChange&&i!==o&&this.__callChangeCount<s.SAFE_COUNT_CHANGE_CALL){this.__setElementValue(o),this.__callChangeCount+=1,s.IS_PROD||this.__callChangeCount;try{this.history.__upTick(),this.e.fire("change",o,i),this.e.fire(this.history,"change",o,i)}finally{this.__callChangeCount=0}}}updateElementValue(){this.__setElementValue(this.getEditorValue())}getElementValue(){return this.element===this.container&&void 0!==this.__inlineElementValue?this.__inlineElementValue:void 0!==this.element.value?this.element.value:this.element.innerHTML}__setElementValue(e){if(!(0,l.isString)(e))throw(0,l.error)("value must be string");if(this.element===this.container){this.__inlineElementValue=e;return}if(e!==this.getElementValue()){let t={value:e},i=this.e.fire("beforeSetElementValue",t);(0,l.callPromise)(i,()=>{void 0!==this.element.value?this.element.value=t.value:this.element.innerHTML=t.value,this.e.fire("afterSetElementValue",t)})}}registerCommand(e,t,i){let o=e.toLowerCase(),n=this.commands.get(o);if(void 0===n&&(n=[],this.commands.set(o,n)),n.push(t),!(0,l.isFunction)(t)){let n=this.o.commandToHotkeys[o]||this.o.commandToHotkeys[e]||t.hotkeys;n&&this.registerHotkeyToCommand(n,o,i?.stopPropagation)}return this}registerHotkeyToCommand(e,t,i=!0){let o=(0,l.asArray)(e).map(l.normalizeKeyAliases).map(e=>e+".hotkey").join(" ");this.e.off(o).on(o,(e,o)=>(o&&(o.shouldStop=i??!0),this.execCommand(t)))}execCommand(e,t,i,...o){let n;if(this.s.isFocused()||this.s.focus(),!this.o.readonly||this.o.allowCommandsInReadOnly.includes(e)){if(e=e.toLowerCase(),!1!==(n=this.e.fire("beforeCommand"+(0,l.ucfirst)(e),t,i,...o))&&(n=this.e.fire("beforeCommand",e,t,i,...o)),!1!==n&&(n=this.__execCustomCommands(e,t,i,...o)),!1!==n){this.s.focus();try{n=this.nativeExecCommand(e,t,i)}catch(e){if(!s.IS_PROD)throw e}}return this.e.fire("afterCommand",e,t,i),this.__imdSynchronizeValues(),n}}nativeExecCommand(e,t,i){this.__isSilentChange=!0;try{return this.ed.execCommand(e,t,i)}finally{this.__isSilentChange=!1}}__execCustomCommands(e,t,i,...o){e=e.toLowerCase();let n=this.commands.get(e);if(void 0!==n){let s;return n.forEach(n=>{let r=((0,l.isFunction)(n)?n:n.exec).call(this,e,t,i,...o);void 0!==r&&(s=r)}),s}}lock(e="any"){return!!super.lock(e)&&(this.__selectionLocked=this.s.save(),this.s.clear(),this.container.classList.add("jodit_lock"),this.e.fire("lock",!0),!0)}unlock(){return!!super.unlock()&&(this.container.classList.remove("jodit_lock"),this.__selectionLocked&&this.s.restore(),this.e.fire("lock",!1),!0)}getMode(){return this.mode}isEditorMode(){return this.getRealMode()===s.MODE_WYSIWYG}getRealMode(){if(this.getMode()!==s.MODE_SPLIT)return this.getMode();let e=this.od.activeElement;return e&&(e===this.iframe||f.Dom.isOrContains(this.editor,e)||f.Dom.isOrContains(this.toolbar.container,e))?s.MODE_WYSIWYG:s.MODE_SOURCE}setMode(e){let t=this.getMode(),i={mode:parseInt(e.toString(),10)},o=["jodit-wysiwyg_mode","jodit-source__mode","jodit_split_mode"];!1!==this.e.fire("beforeSetMode",i)&&(this.__mode=[s.MODE_SOURCE,s.MODE_WYSIWYG,s.MODE_SPLIT].includes(i.mode)?i.mode:s.MODE_WYSIWYG,this.o.saveModeInStorage&&this.storage.set("jodit_default_mode",this.mode),o.forEach(e=>{this.container.classList.remove(e)}),this.container.classList.add(o[this.mode-1]),t!==this.getMode()&&this.e.fire("afterSetMode"))}toggleMode(){let e=this.getMode();[s.MODE_SOURCE,s.MODE_WYSIWYG,this.o.useSplitMode?s.MODE_SPLIT:9].includes(e+1)?e+=1:e=s.MODE_WYSIWYG,this.setMode(e)}setDisabled(e){this.o.disabled=e;let t=this.__wasReadOnly;this.setReadOnly(e||t),this.__wasReadOnly=t,this.editor&&((0,l.attr)(this.editor,"aria-disabled",e),this.container.classList.toggle("jodit_disabled",e),this.e.fire("disabled",e))}getDisabled(){return this.o.disabled}setReadOnly(e){this.__wasReadOnly!==e&&(this.__wasReadOnly=e,this.o.readonly=e,e?this.editor&&(0,l.attr)(this.editor,"contenteditable",null):this.editor&&(0,l.attr)(this.editor,"contenteditable",!0),this.e&&this.e.fire("readonly",e))}getReadOnly(){return this.o.readonly}focus(){this.getMode()!==s.MODE_SOURCE&&this.s.focus()}get isFocused(){return this.s.isFocused()}beforeInitHook(){}afterInitHook(){}initOptions(e){this.options=(0,l.ConfigProto)(e||{},d.Config.defaultOptions)}initOwners(){this.editorWindow=this.o.ownerWindow,this.ownerWindow=this.o.ownerWindow}addPlace(e,t){let i=(0,l.resolveElement)(e,this.o.shadowRoot||this.od);this.attachEvents(t),i.attributes&&(0,l.toArray)(i.attributes).forEach(e=>{let i=e.name,o=e.value;void 0===d.Config.defaultOptions[i]||t&&void 0!==t[i]||(-1!==["readonly","disabled"].indexOf(i)&&(o=""===o||"true"===o),/^[0-9]+(\.)?([0-9]+)?$/.test(o.toString())&&(o=Number(o)),this.options[i]=o)});let o=this.c.div("jodit-container");o.classList.add("jodit"),o.classList.add("jodit-container"),o.classList.add("jodit_theme_"+(this.o.theme||"default")),_(this.o.className,o),this.o.containerStyle&&(0,l.css)(o,this.o.containerStyle);let{styleValues:n}=this.o;Object.keys(n).forEach(e=>{let t=(0,l.kebabCase)(e);o.style.setProperty("--jd-"+t,n[e])}),(0,l.attr)(o,"contenteditable",!1);let s=null;if(this.o.inline&&(-1===["TEXTAREA","INPUT"].indexOf(i.nodeName)&&(o=i,(0,l.attr)(i,m,i.className.toString()),s=o.innerHTML,f.Dom.detach(o)),o.classList.add("jodit_inline"),o.classList.add("jodit-container")),i!==o){let e=(0,c.cssInline)(i,"display");e&&(0,l.attr)(i,p,e),(0,l.css)(i,"display","none")}let r="workplace-slot",a=this.c.div(this.getFullElName(r,"above"),g);(0,l.attr)(a,"data-jodit-above-toolbar",""),f.Dom.appendChildFirst(o,a);let u=this.c.div(this.getFullElName(r,"top"),g);f.Dom.append(o,u);let h=this.c.div(this.getFullElName(r,"center"),g),v=this.c.div("jodit-workplace",g),b=this.c.div(this.getFullElName(r,"left"),g),y=this.c.div(this.getFullElName(r,"right"),g);f.Dom.append(h,b),f.Dom.append(h,v),f.Dom.append(h,y),f.Dom.append(o,h);let w=this.c.div(this.getFullElName(r,"bottom"),g);f.Dom.append(o,w),i.parentNode&&i!==o&&f.Dom.before(i,o),Object.defineProperty(i,"component",{enumerable:!1,configurable:!0,value:this});let S=this.c.div("jodit-wysiwyg",{contenteditable:!0,"aria-disabled":!1,tabindex:this.o.tabIndex});f.Dom.append(v,S);let C={editor:S,element:i,container:o,workplace:v,slots:{above:a,top:u,bottom:w,center:h,left:b,right:y},statusbar:new f.StatusBar(this,o),options:this.isReady?(0,l.ConfigProto)(t||{},d.Config.defaultOptions):this.options,history:new f.History(this),editorWindow:this.ow};this.__elementToPlace.set(S,C),this.setCurrentPlace(C),this.places.push(C),this.setNativeEditorValue(this.getElementValue());let E=this.__initEditor(s),D=this.options,I=()=>{D.enableDragAndDropFileToEditor&&D.uploader&&(D.uploader.url||D.uploader.insertImageAsBase64URI)?this.uploader.bind(this.editor):D.enableDragAndDropFileToEditor||this.e.on(S,"drop",e=>{e.dataTransfer?.files?.length&&e.preventDefault()}),this.__elementToPlace.get(this.editor)||this.__elementToPlace.set(this.editor,C),this.e.fire("afterAddPlace",C)};return(0,l.callPromise)(E,I)}addDisclaimer(e){f.Dom.append(this.workplace,e)}setCurrentPlace(e){this.currentPlace!==e&&(this.isEditorMode()||this.setMode(s.MODE_WYSIWYG),this.currentPlace=e,this.buildToolbar(),this.isReady&&this.e.fire("changePlace",e))}__initEditor(e){let t=this.__createEditor();return(0,l.callPromise)(t,()=>{if(this.isInDestruct)return;if(this.element!==this.container){let e=this.getElementValue();e!==this.getEditorValue()&&this.setEditorValue(e)}else null!=e&&this.setEditorValue(e);let t=this.o.defaultMode;if(this.o.saveModeInStorage){let e=this.storage.get("jodit_default_mode");"string"==typeof e&&(t=parseInt(e,10))}this.setMode(t),this.o.readonly&&(this.__wasReadOnly=!1,this.setReadOnly(!0)),this.o.disabled&&this.setDisabled(!0);try{this.ed.execCommand("defaultParagraphSeparator",!1,this.o.enter.toLowerCase())}catch{}})}__createEditor(){let e=this.editor,t=this.e.fire("createEditor",this);return(0,l.callPromise)(t,()=>{!this.isInDestruct&&((!1===t||(0,l.isPromise)(t))&&f.Dom.safeRemove(e),_(this.o.editorClassName,this.editor),this.o.style&&(0,l.css)(this.editor,this.o.style),this.e.on("synchro",()=>{this.setEditorValue()}).on("focus",()=>{this.editorIsActive=!0}).on("blur",()=>this.editorIsActive=!1),this.__prepareWYSIWYGEditor(),this.o.triggerChangeEvent&&this.e.on("change",this.async.debounce(()=>{this.e&&this.e.fire(this.element,"change")},this.defaultTimeout)))})}__prepareWYSIWYGEditor(){let{editor:e}=this;if(this.o.direction){let e="rtl"===this.o.direction.toLowerCase()?"rtl":"ltr";(0,l.css)(this.editor,"direction",e),(0,l.attr)(this.editor,"dir",e),(0,l.css)(this.container,"direction",e),(0,l.attr)(this.container,"dir",e),this.toolbar.setDirection(e)}this.e.on(e,"mousedown touchstart focus",()=>{let t=this.__elementToPlace.get(e);t&&this.setCurrentPlace(t)}).on(e,"compositionend",this.synchronizeValues).on(e,"selectionchange selectionstart keydown keyup input keypress dblclick mousedown mouseup click copy cut dragstart drop dragover paste resize touchstart touchend focus blur",e=>{if(!this.o.readonly&&!this.__isSilentChange&&(!(e instanceof this.ew.KeyboardEvent)||!e.isComposing)&&this.e&&this.e.fire){if(!1===this.e.fire(e.type,e))return!1;this.synchronizeValues()}}).on(this.ow,"mouseup",t=>{if(this.o.readonly||this.__isSilentChange)return;let i=t.target;!(i&&(0,l.isNumber)(i.nodeType)&&e.contains(i))&&this.s.isInsideArea&&(this.e.fire("changeSelection"),this.synchronizeValues())})}fetch(e,t){let i=new u.Ajax({url:e,...t},this.o.defaultAjaxOptions),o=()=>{this.e.off("beforeDestruct",o),this.progressbar.progress(100).hide(),i.destruct()};this.e.one("beforeDestruct",o),this.progressbar.show().progress(30);let n=i.send();return n.finally(o).catch(()=>null),n}destruct(){if(this.isInDestruct)return;this.setStatus(f.STATUSES.beforeDestruct),this.__elementToPlace.clear(),(0,r.cached)(this,"storage")?.clear(),(0,r.cached)(this,"buffer")?.clear(),this.commands.clear(),this.__selectionLocked=null,this.e.off(this.ow,"resize"),this.e.off(this.ow),this.e.off(this.od),this.e.off(this.od.body);let e=this.editor?this.getEditorValue():"";this.places.forEach(({container:t,workplace:i,statusbar:o,element:n,iframe:s,editor:r,history:a})=>{if(n){if(n!==t)if(n.hasAttribute(p)){let e=(0,l.attr)(n,p);e&&((0,l.css)(n,"display",e),(0,l.attr)(n,p,null))}else(0,l.css)(n,"display","");else n.hasAttribute(m)&&(n.className=(0,l.attr)(n,m)||"",(0,l.attr)(n,m,null));n.hasAttribute("style")&&!(0,l.attr)(n,"style")&&(0,l.attr)(n,"style",null),o.destruct(),this.e.off(t),this.e.off(n),this.e.off(r),f.Dom.safeRemove(i),f.Dom.safeRemove(r),t!==n&&f.Dom.safeRemove(t),Object.defineProperty(n,"component",{enumerable:!1,configurable:!0,value:null}),f.Dom.safeRemove(s),t===n&&(n.innerHTML=e),a.destruct()}}),this.places.length=0,this.currentPlace={},delete a.instances[this.id],super.destruct()}constructor(e,t){super(t,!0),(0,o._)(this,"isJodit",!0),(0,o._)(this,"commands",new Map),(0,o._)(this,"__selectionLocked",null),(0,o._)(this,"__wasReadOnly",!1),(0,o._)(this,"editorIsActive",!1),(0,o._)(this,"selection",void 0),(0,o._)(this,"__mode",s.MODE_WYSIWYG),(0,o._)(this,"__callChangeCount",0),(0,o._)(this,"__inlineElementValue",void 0),(0,o._)(this,"__isSilentChange",!1),(0,o._)(this,"currentPlace",{options:this.__options,container:this.__container}),(0,o._)(this,"places",[]),(0,o._)(this,"__elementToPlace",new Map);try{let t=(0,l.resolveElement)(e,this.options.shadowRoot||this.od);if(Jodit.isJoditAssigned(t))return t.component}catch(e){if(!s.IS_PROD)throw e;throw this.destruct(),e}this.setStatus(f.STATUSES.beforeInit),this.id=(0,l.attr)((0,l.resolveElement)(e,this.o.shadowRoot||this.od),"id")||new Date().getTime().toString(),a.instances[this.id]=this,this.attachEvents(t),this.e.on(this.ow,"resize",()=>{this.e&&this.e.fire("resize")}),this.e.on("prepareWYSIWYGEditor",this.__prepareWYSIWYGEditor),this.selection=new f.Selection(this);let i=this.beforeInitHook();(0,l.callPromise)(i,()=>{if(this.isInDestruct)return;this.e.fire("beforeInit",this),a.pluginSystem.__init(this),this.e.fire("afterPluginSystemInit",this),this.e.on("changePlace",()=>{this.setReadOnly(this.o.readonly),this.setDisabled(this.o.disabled)}),this.places.length=0;let i=this.addPlace(e,t);a.instances[this.id]=this;let o=()=>{this.isInDestruct||(this.e&&this.e.fire("afterInit",this),(0,l.callPromise)(this.afterInitHook()),this.setStatus(f.STATUSES.ready),this.e.fire("afterConstructor",this))};(0,l.callPromise)(i,o)})}}function _(e,t){e&&e.split(/\s+/).forEach(e=>t.classList.add(e))}(0,o._)(Jodit,"fatMode",s.FAT_MODE),(0,o._)(Jodit,"plugins",a.pluginSystem),(0,o._)(Jodit,"modules",a.modules),(0,o._)(Jodit,"ns",a.modules),(0,o._)(Jodit,"decorators",{}),(0,o._)(Jodit,"constants",s),(0,o._)(Jodit,"instances",a.instances),(0,o._)(Jodit,"lang",s.lang),(0,o._)(Jodit,"core",{Plugin:f.Plugin}),(0,n.__decorate)([r.cache],Jodit.prototype,"createInside",null),(0,n.__decorate)([r.cache],Jodit.prototype,"message",null),(0,n.__decorate)([r.cache],Jodit.prototype,"s",null),(0,n.__decorate)([r.cache],Jodit.prototype,"uploader",null),(0,n.__decorate)([r.cache],Jodit.prototype,"filebrowser",null),(0,n.__decorate)([(0,r.throttle)()],Jodit.prototype,"synchronizeValues",null),(0,n.__decorate)([(0,r.watch)(":internalChange")],Jodit.prototype,"updateElementValue",null),(0,n.__decorate)([r.autobind],Jodit.prototype,"__prepareWYSIWYGEditor",null),Jodit=(0,n.__decorate)([(0,r.derive)(h.Dlgs)],Jodit)},89317:function(e,t,i){"use strict";var o=i(17312),n=i(41324),s=i.n(n),r=i(63837),a=i(53414);let l={};l={ar:s(),az:s(),cs_cz:s(),de:s(),en:r,es:s(),fa:s(),fi:s(),fr:s(),he:s(),hu:s(),id:s(),it:s(),ja:s(),ko:s(),mn:s(),nl:s(),no:s(),pl:s(),pt_br:s(),ru:s(),sk:s(),sv:s(),tr:s(),ua:s(),zh_cn:s(),zh_tw:s()};let c=e=>e?e.default||e:{},u={};(0,o.isArray)(c(a))&&c(a).forEach((e,t)=>{u[t]=e}),Object.keys(l).forEach(e=>{let t=c(l[e]);(0,o.isArray)(t)?(l[e]={},t.forEach((t,i)=>{l[e][u[i]]=t})):l[e]=t}),t.default=l},67399:function(e,t,i){"use strict";i.d(t,{ContextMenu:function(){return l}});var o=i(31635),n=i(91672),s=i(17312),r=i(53681),a=i(51116);class l extends a.Popup{className(){return"ContextMenu"}show(e,t,i){let o=this;o.clear(),(0,s.isArray)(i)&&(i.forEach(e=>{if(!e)return;let t=(0,r.Button)(this.jodit,e.icon||"empty",e.title);this.jodit&&t.setParentView(this.jodit),t.setMod("context","menu"),t.onAction(t=>(e.exec?.call(o,t),o.clear(),o.close(),!1)),this.append(t)}),this.open(()=>({left:e,top:t,width:0,height:0}),!0))}}l=(0,o.__decorate)([n.component],l)},91535:function(e,t,i){"use strict";i.d(t,{Alert:function(){return l}});var o=i(23211),n=i(78982),s=i(91565),r=i(53681),a=i(76841);function l(e,t,i,c="jodit-dialog_alert"){(0,s.isFunction)(t)&&(i=t,t=void 0);let u=this instanceof a.Dialog?this:new a.Dialog({closeOnClickOverlay:!0}),h=u.c.div(c),d=(0,r.Button)(u,"ok","Ok");return(0,n.asArray)(e).forEach(e=>{o.Dom.append(h,o.Dom.isNode(e)?e:u.c.fromHTML(e))}),d.onAction(()=>{i&&(0,s.isFunction)(i)&&!1===i(u)||u.close()}),u.setFooter([d]),u.open(h,t||"&nbsp;",!0,!0),d.focus(),u}},88329:function(e,t,i){"use strict";i.d(t,{Confirm:function(){return a}});var o=i(23211),n=i(91565),s=i(53681),r=i(76841);function a(e,t,i){let a=this instanceof r.Dialog?this:new r.Dialog({closeOnClickOverlay:!0}),l=a.c.fromHTML('<form class="jodit-dialog_prompt"></form>'),c=a.c.element("label");(0,n.isFunction)(t)&&(i=t,t=void 0),o.Dom.append(c,a.c.fromHTML(e)),o.Dom.append(l,c);let u=e=>()=>{i&&!1===i(e)||a.close()},h=(0,s.Button)(a,"cancel","Cancel"),d=(0,s.Button)(a,"ok","Yes");return h.onAction(u(!1)),d.onAction(u(!0)),a.e.on(l,"submit",()=>(u(!0)(),!1)),a.setFooter([d,h]),a.open(l,t||"&nbsp;",!0,!0),d.focus(),a}},76841:function(e,t,i){"use strict";i.d(t,{Dialog:function(){return b}});var o=i(25045),n=i(31635),s=i(16964),r=i(81937),a=i(84839),l=i(23211),c=i(28077),u=i(45664),h=i(28686),d=i(22852),f=i(93640),p=i(28712),m=i(4099),g=i(35099),_=i(2222),v=i(5266);v.Config.prototype.dialog={namespace:"",extraButtons:[],resizable:!0,draggable:!0,buttons:["dialog.close"],removeButtons:[],toolbarButtonSize:"middle",zIndex:"inherit"},v.Config.prototype.controls.dialog={close:{icon:"cancel",exec(e){e.close()}}};class b extends _.ViewWithToolbar{className(){return"Dialog"}get destination(){let{popupRoot:e,shadowRoot:t}=this.o;return e||t||this.od.body}setElements(e,t){let i=[];(0,u.asArray)(t).forEach(t=>{let o;if((0,h.isArray)(t)){let o=this.c.div(this.getFullElName("column"));return i.push(o),l.Dom.append(e,o),this.setElements(o,t)}o=(0,h.isString)(t)?this.c.fromHTML(t):(0,h.hasContainer)(t)?t.container:t,i.push(o),o.parentNode!==e&&l.Dom.append(e,o)}),(0,u.toArray)(e.childNodes).forEach(e=>{-1===i.indexOf(e)&&l.Dom.safeRemove(e)})}__onMouseUp(){(this.draggable||this.resizable)&&(this.__removeGlobalResizeListeners(),this.draggable=!1,this.resizable=!1,this.unlockSelect(),this.e&&(this.__removeGlobalResizeListeners(),this.e.fire(this,"endResize endMove")))}__onHeaderMouseDown(e){let t=e.target;!(!this.o.draggable||t&&t.nodeName.match(/^(INPUT|SELECT)$/))&&(this.draggable=!0,this.startX=e.clientX,this.startY=e.clientY,this.startPoint.x=(0,f.css)(this.dialog,"left"),this.startPoint.y=(0,f.css)(this.dialog,"top"),this.setMaxZIndex(),e.cancelable&&e.preventDefault(),this.lockSelect(),this.__addGlobalResizeListeners(),this.e&&(this.e.fire(this,"startMove"),this.e.fire("closeAllPopups")))}__onMouseMove(e){this.draggable&&this.o.draggable&&(this.setPosition(this.startPoint.x+e.clientX-this.startX,this.startPoint.y+e.clientY-this.startY),this.e&&this.e.fire(this,"move",e.clientX-this.startX,e.clientY-this.startY),e.stopImmediatePropagation()),this.resizable&&this.o.resizable&&(this.setSize(Math.max(this.startPoint.w+e.clientX-this.startX,this.minSize.w),Math.max(this.startPoint.h+e.clientY-this.startY,this.minSize.h)),this.e&&this.e.fire(this,"resizeDialog",e.clientX-this.startX,e.clientY-this.startY))}__onEsc(e){if(this.o.closeOnEsc&&this.isOpened&&e.key===r.KEY_ESC&&!0!==this.getMod("static")){let t=this.getMaxZIndexDialog();t?t.close():this.close(),e.stopImmediatePropagation()}}__onResizerMouseDown(e){this.resizable=!0,this.startX=e.clientX,this.startY=e.clientY,this.startPoint.w=this.dialog.offsetWidth,this.startPoint.h=this.dialog.offsetHeight;let t=this.getElm("header"),i=this.getElm("footer"),o=this.getElm("content"),n=o&&parseFloat(this.ow.getComputedStyle(o).minHeight)||0;this.minSize.w=(0,h.isNumber)(this.o.minWidth)?this.o.minWidth:Math.max(100,i?.scrollWidth??0),this.minSize.h=(0,h.isNumber)(this.o.minHeight)?this.o.minHeight:(t?.offsetHeight??0)+(i?.offsetHeight??0)+n+this.resizer.offsetHeight,this.lockSelect(),this.__addGlobalResizeListeners(),this.e&&this.e.fire(this,"startResize")}__addGlobalResizeListeners(){this.e.on(this.ow,"pointermove touchmove",this.__onMouseMove).on(this.ow,"pointerup touchend",this.__onMouseUp)}__removeGlobalResizeListeners(){this.e.off(this.ow,"mousemove pointermove",this.__onMouseMove).off(this.ow,"mouseup pointerup",this.__onMouseUp)}setSize(e,t){return null==e&&(e=this.dialog.offsetWidth),null==t&&(t=this.dialog.offsetHeight),(0,f.css)(this.dialog,{width:e,height:t}),this}calcAutoSize(){return this.setSize("auto","auto"),this.setSize(),this}setPosition(e,t){let i=this.ow.innerWidth,o=this.ow.innerHeight,n=i/2-this.dialog.offsetWidth/2,s=o/2-this.dialog.offsetHeight/2;return n<0&&(n=0),s<0&&(s=0),void 0!==e&&void 0!==t&&(this.offsetX=e,this.offsetY=t,this.moved=Math.abs(e-n)>100||Math.abs(t-s)>100),(0,f.css)(this.dialog,{left:(e||n)+"px",top:(t||s)+"px"}),this}setHeader(e){if(this.setElements(this.dialogbox_header,e),(0,h.isString)(e)){let t=(0,d.stripTags)(e,this.od).trim();(0,f.attr)(this.container,"aria-label",t||null)}return this}setContent(e){return this.setElements(this.dialogbox_content,e),this}setFooter(e){return this.setElements(this.dialogbox_footer,e),this.setMod("footer",!!e),this}__openedSiblings(){let e=[];return b.__opened.forEach(t=>{t.destination===this.destination&&e.push(t)}),e}getZIndex(){return parseInt((0,f.css)(this.container,"zIndex"),10)||0}getMaxZIndexDialog(){let e=0,t=this;return this.__openedSiblings().forEach(i=>{let o=i.getZIndex();o>e&&(t=i,e=o)}),t}setMaxZIndex(){if(this.getMod("static"))return;let e=0x1312d04;this.__openedSiblings().forEach(t=>{e=Math.max(t.getZIndex(),e)}),(0,f.css)(this.container,"zIndex",(e+1).toString())}toggleFullSize(e){(0,h.isVoid)(e)&&(e=!this.getMod("fullsize")),this.setMod("fullsize",e),super.toggleFullSize(e)}open(e,t,i,o){if(c.eventEmitter.fire("closeAllPopups hideHelpers"),!1===this.e.fire(this,"beforeOpen"))return this;(0,h.isBoolean)(e)&&(i=e),(0,h.isBoolean)(t)&&(o=t),this.destroyAfterClose=!0===i;let n=(0,h.isBoolean)(e)?void 0:e,s=(0,h.isBoolean)(t)?void 0:t;return void 0!==s&&this.setHeader(s),n&&this.setContent(n),this.setMod("active",!0),this.isOpened=!0,b.__opened.add(this),this.setModal(o),l.Dom.append(this.destination,this.container),!0!==this.getMod("static")?(this.setPosition(this.offsetX,this.offsetY),this.setMaxZIndex()):(0,f.css)(this.container,"zIndex",null),this.o.fullsize&&this.toggleFullSize(!0),this.e.fire("afterOpen",this),this}setModal(e){return this.isModal=!!e,this.setMod("modal",this.isModal),this}close(){if(this.isDestructed||!this.isOpened||!0===this.getMod("static"))return this;let{e}=this;return!1===e.fire(this,"beforeClose")||!1===e.fire("beforeClose",this)||(this.setMod("active",!1),this.isOpened=!1,b.__opened.delete(this),this.isFullSize&&this.toggleFullSize(!1),l.Dom.safeRemove(this.container),this.__removeGlobalResizeListeners(),e.fire(this,"afterClose"),this.isInDestruct||e.fire(this.ow,"joditCloseDialog"),this.destroyAfterClose&&this.destruct()),this}buildToolbar(){this.o.buttons&&this.toolbar.build((0,u.splitArray)(this.o.buttons)).setMod("mode","header").appendTo(this.dialogbox_toolbar)}destruct(){this.isInDestruct||(this.setStatus(s.STATUSES.beforeDestruct),this.isOpened&&this.close(),b.__opened.delete(this),this.events&&(this.__removeGlobalResizeListeners(),this.events.off(this.container,"close_dialog",self.close).off(this.ow,"keydown",this.__onEsc).off(this.ow,"resize",this.__onResize)),super.destruct())}constructor(e={}){super(e),(0,o._)(this,"resizer",void 0),(0,o._)(this,"offsetX",void 0),(0,o._)(this,"offsetY",void 0),(0,o._)(this,"destroyAfterClose",!1),(0,o._)(this,"moved",!1),(0,o._)(this,"resizable",!1),(0,o._)(this,"draggable",!1),(0,o._)(this,"startX",0),(0,o._)(this,"startY",0),(0,o._)(this,"startPoint",{x:0,y:0,w:0,h:0}),(0,o._)(this,"lockSelect",()=>{this.setMod("moved",!0)}),(0,o._)(this,"unlockSelect",()=>{this.setMod("moved",!1)}),(0,o._)(this,"__onResize",()=>{this.options&&this.o.resizable&&!this.moved&&this.isOpened&&!this.offsetX&&!this.offsetY&&this.setPosition()}),(0,o._)(this,"minSize",{w:0,h:0}),(0,o._)(this,"dialog",void 0),(0,o._)(this,"workplace",void 0),(0,o._)(this,"dialogbox_header",void 0),(0,o._)(this,"dialogbox_content",void 0),(0,o._)(this,"dialogbox_footer",void 0),(0,o._)(this,"dialogbox_toolbar",void 0),(0,o._)(this,"isModal",!1),(0,o._)(this,"isOpened",!1),this.options=(0,f.ConfigProto)(e,(0,f.ConfigProto)(v.Config.prototype.dialog,b.defaultOptions)),this.attachEvents(this.options),l.Dom.safeRemove(this.container);let t=this.getFullElName.bind(this);this.container=this.c.fromHTML(`<div class="jodit jodit-dialog ${this.componentName}">
28
28
  <div class="${t("overlay")}"></div>
29
29
  <div class="${this.getFullElName("panel")}">
30
30
  <div class="${t("header")}">
@@ -35,7 +35,7 @@
35
35
  <div class="${t("footer")}"></div>
36
36
  <div class="${t("resizer")}">${m.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,f.assert)(null!=i,"Panel element does not exist");let n=this.getElm("resizer");(0,f.assert)(null!=n,"Resizer element does not exist");let s=this.getElm("header-title");(0,f.assert)(null!=s,"header-title element does not exist");let r=this.getElm("content");(0,f.assert)(null!=r,"Content element does not exist");let a=this.getElm("footer");(0,f.assert)(null!=a,"Footer element does not exist");let u=this.getElm("header-toolbar");(0,f.assert)(null!=u,"header-toolbar element does not exist"),this.dialog=i,this.resizer=n,this.dialogbox_header=s,this.dialogbox_content=r,this.dialogbox_footer=a,this.dialogbox_toolbar=u,(0,p.css)(this.dialog,{maxWidth:this.options.maxWidth,minHeight:this.options.minHeight,minWidth:this.options.minWidth});let d=this.getElm("header");d&&this.e.on(d,"pointerdown touchstart",this.__onHeaderMouseDown),this.e.on(this.resizer,"mousedown touchstart",this.__onResizerMouseDown);let g=c.pluginSystem.get("fullsize");if((0,h.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,f.assert)(null!=e,"Overlay element does not exist"),this.e.on(e,"click",this.close)}}}(0,o._)(b,"__opened",new Set),(0,o._)(b,"defaultOptions",{...g.View.defaultOptions,closeOnClickOverlay:!1,closeOnEsc:!0}),(0,n.__decorate)([a.autobind],b.prototype,"__onMouseUp",null),(0,n.__decorate)([a.autobind],b.prototype,"__onHeaderMouseDown",null),(0,n.__decorate)([a.autobind],b.prototype,"__onMouseMove",null),(0,n.__decorate)([a.autobind],b.prototype,"__onEsc",null),(0,n.__decorate)([a.autobind],b.prototype,"__onResizerMouseDown",null),(0,n.__decorate)([a.autobind],b.prototype,"close",null),(0,n.__decorate)([(0,a.hook)("ready")],b.prototype,"buildToolbar",null),b=(0,n.__decorate)([a.component],b)},37333:function(e,t,i){"use strict";i.d(t,{Alert:function(){return o.Alert},Confirm:function(){return n.Confirm},Dialog:function(){return s.Dialog},Prompt:function(){return r.Prompt}});var o=i(91535),n=i(88329),s=i(76841),r=i(74103)},74103:function(e,t,i){"use strict";i.d(t,{Prompt:function(){return l}});var o=i(23211),n=i(91565),s=i(7909),r=i(53681),a=i(76841);function l(e,t,i,l,c){let u=this instanceof a.Dialog?this:new a.Dialog({closeOnClickOverlay:!0}),h=(0,r.Button)(u,"cancel","Cancel"),d=(0,r.Button)(u,"ok","Ok"),p=u.c.element("form",{class:"jodit-dialog_prompt"}),f=u.c.element("input",{autofocus:!0,class:"jodit-input"}),m=u.c.element("label");(0,n.isFunction)(t)&&(i=t,t=void 0),l&&(0,s.attr)(f,"placeholder",l),o.Dom.append(m,u.c.text(e)),o.Dom.append(p,m),o.Dom.append(p,f),h.onAction(u.close);let g=()=>{i&&(0,n.isFunction)(i)&&!1===i(f.value)||u.close()};return d.onAction(g),u.e.on(p,"submit",()=>(g(),!1)),u.setFooter([d,h]),u.open(p,t||"&nbsp;",!0,!0),f.focus(),void 0!==c&&c.length&&(f.value=c,f.select()),u}},61334:function(e,t,i){"use strict";var o=i(27795),n=i(7909),s=i(33201),r=i(29434),a=i(31125),l=i(66206),c=i(18272),u=i(1305),h=i(53202),d=i(43271);let p="jodit-file-browser-preview",f=(e="next",t="right")=>`<div class="${p}__navigation ${p}__navigation_arrow_${e}">`+r.Icon.get("angle-"+t)+"</a>";t.default=e=>{if(!e.o.contextMenu)return()=>{};let t=(0,c.makeContextMenu)(e);return i=>{let r=(0,l.getItem)(i.target,e.container);if(!r)return;let c=r,m=e.options,g=e=>(0,n.attr)(c,e)||"";return e.async.setTimeout(()=>{let _=(0,l.elementToItem)(r,(0,a.elementsMap)(e));_&&(e.state.activeElements=[_],t.show(i.clientX,i.clientY,[!!("1"!==g("data-is-file")&&m.editImage&&(e.dataProvider.canI("ImageResize")||e.dataProvider.canI("ImageCrop")))&&{icon:"pencil",title:"Edit",exec:()=>d.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,u.deleteFile)(e,g("data-name"),g("data-source"))}catch(t){return e.status(t)}return e.state.activeElements=[],(0,h.loadTree)(e).catch(e.status)}},!!m.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>'),r=e.c.div(p+"__box"),a=e.c.fromHTML(f()),l=e.c.fromHTML(f("prev","left")),u=s=>{let u=e.c.element("img");(0,n.attr)(u,"src",s);let h=()=>{e.isInDestruct||(e.e.off(u,"load"),o.Dom.detach(i),m.showPreviewNavigation&&(o.Dom.prevWithClass(c,e.files.getFullElName("item"))&&o.Dom.append(i,l),o.Dom.nextWithClass(c,e.files.getFullElName("item"))&&o.Dom.append(i,a)),o.Dom.append(i,r),o.Dom.append(r,u),t.setPosition(),e?.events?.fire("previewOpenedAndLoaded"))};e.e.on(u,"load",h),u.complete&&h()};e.e.on([a,l],"click",function(){if(!(c=this===a?o.Dom.nextWithClass(c,e.files.getFullElName("item")):o.Dom.prevWithClass(c,e.files.getFullElName("item"))))throw(0,s.error)("Need element");o.Dom.detach(i),o.Dom.detach(r),i.innerHTML='<div class="jodit-icon_loader"></div>',u(g("href"))}),e.e.on("beforeDestruct",()=>{t.destruct()}),t.container.classList.add(p+"__dialog"),t.setContent(i),t.setPosition(),t.open(),u(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 o=new WeakMap;i.d(t,["elementsMap",0,e=>{let t=o.get(e);return t||(t={},o.set(e,t)),t}])},58664:function(e,t,i){"use strict";i.d(t,{FileBrowserItem:function(){return s}});var o=i(25045),n=i(65946);class s{static create(e){return e instanceof s?e:new s(e)}get path(){return(0,n.normalizePath)(this.data.source.path?this.data.source.path+"/":"/")}get imageURL(){let e=this.time||new Date().getTime().toString(),{thumbIsAbsolute:t,source:i,thumb:o,file:s}=this.data,r=o||s;return t&&r?r:(0,n.normalizeUrl)(i.baseurl,i.path,r||"")+"?_tmst="+encodeURIComponent(e)}get fileURL(){let{name:e}=this.data,{file:t,fileIsAbsolute:i,source:o}=this.data;return void 0!==t&&(e=t),i&&e?e:(0,n.normalizeUrl)(o.baseurl,o.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,o._)(this,"data",void 0),(0,o._)(this,"source",void 0),(0,o._)(this,"sourceName",void 0),(0,o._)(this,"type",void 0),this.data=e,Object.keys(e).forEach(t=>{this[t]=e[t]})}}},66206:function(e,t,i){"use strict";var o=i(23211);i.d(t,["elementToItem",0,(e,t)=>{let{key:i}=e.dataset,{item:o}=t[i||""];return o},"getItem",0,(e,t,i="a")=>o.Dom.closest(e,e=>o.Dom.isTag(e,i),t)])},68502:function(e,t,i){"use strict";i(37102);var o=i(23211),n=i(28686),s=i(37427),r=i(75587),a=i(5266);a.Config.prototype.filebrowser={namespace:"",cache:!0,extraButtons:[],filter:(e,t)=>(t=t.toLowerCase(),(0,n.isString)(e))?-1!==e.toLowerCase().indexOf(t):(0,n.isString)(e.name)?-1!==e.name.toLowerCase().indexOf(t):!(0,n.isString)(e.file)||-1!==e.file.toLowerCase().indexOf(t),sortBy:"changed-desc",sort(e,t,i){let[o,r]=i.toLowerCase().split("-"),a="asc"===r,l=(e,t)=>t>e?a?-1:1:e>t?a?1:-1:0;if((0,n.isString)(e))return l(e.toLowerCase(),t.toLowerCase());if(void 0===e[o]||"name"===o)return(0,n.isString)(e.name)?l(e.name.toLowerCase(),t.name.toLowerCase()):(0,n.isString)(e.file)?l(e.file.toLowerCase(),t.file.toLowerCase()):0;switch(o){case"changed":{let i=new Date(e.changed).getTime(),o=new Date(t.changed).getTime();return a?i-o:o-i}case"size":{let i=(0,s.humanSizeToBytes)(e.size),o=(0,s.humanSizeToBytes)(t.size);return a?i-o:o-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,n.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 o=this.options,n=this.files.getFullElName("item"),s=o.showFileName,r=o.showFileSize&&e.size,a=o.showFileChangeTime&&e.time,l="";void 0!==e.file&&(l=e.file);let c=`<div class="${n}-info">${s?`<span class="${n}-info-filename">${l}</span>`:""}${r?`<span class="${n}-info-filesize">${e.size}</span>`:""}${a?`<span class="${n}-info-filechanged">${a}</span>`:""}</div>`;return`<a
38
+ </div>`),"rtl"===this.options.direction&&((0,f.css)(this.container,"direction","rtl"),(0,f.attr)(this.container,"dir","rtl")),this.o.zIndex&&(0,f.css)(this.container,"zIndex",this.o.zIndex.toString()),(0,f.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,p.assert)(null!=i,"Panel element does not exist");let n=this.getElm("resizer");(0,p.assert)(null!=n,"Resizer element does not exist");let s=this.getElm("header-title");(0,p.assert)(null!=s,"header-title element does not exist");let r=this.getElm("content");(0,p.assert)(null!=r,"Content element does not exist");let a=this.getElm("footer");(0,p.assert)(null!=a,"Footer element does not exist");let u=this.getElm("header-toolbar");(0,p.assert)(null!=u,"header-toolbar element does not exist"),this.dialog=i,this.resizer=n,this.dialogbox_header=s,this.dialogbox_content=r,this.dialogbox_footer=a,this.dialogbox_toolbar=u,(0,f.css)(this.dialog,{maxWidth:this.options.maxWidth,minHeight:this.options.minHeight,minWidth:this.options.minWidth});let d=this.getElm("header");d&&this.e.on(d,"pointerdown touchstart",this.__onHeaderMouseDown),this.e.on(this.resizer,"mousedown touchstart",this.__onResizerMouseDown);let g=c.pluginSystem.get("fullsize");if((0,h.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,p.assert)(null!=e,"Overlay element does not exist"),this.e.on(e,"click",this.close)}}}(0,o._)(b,"__opened",new Set),(0,o._)(b,"defaultOptions",{...g.View.defaultOptions,closeOnClickOverlay:!1,closeOnEsc:!0}),(0,n.__decorate)([a.autobind],b.prototype,"__onMouseUp",null),(0,n.__decorate)([a.autobind],b.prototype,"__onHeaderMouseDown",null),(0,n.__decorate)([a.autobind],b.prototype,"__onMouseMove",null),(0,n.__decorate)([a.autobind],b.prototype,"__onEsc",null),(0,n.__decorate)([a.autobind],b.prototype,"__onResizerMouseDown",null),(0,n.__decorate)([a.autobind],b.prototype,"close",null),(0,n.__decorate)([(0,a.hook)("ready")],b.prototype,"buildToolbar",null),b=(0,n.__decorate)([a.component],b)},37333:function(e,t,i){"use strict";i.d(t,{Alert:function(){return o.Alert},Confirm:function(){return n.Confirm},Dialog:function(){return s.Dialog},Prompt:function(){return r.Prompt}});var o=i(91535),n=i(88329),s=i(76841),r=i(74103)},74103:function(e,t,i){"use strict";i.d(t,{Prompt:function(){return l}});var o=i(23211),n=i(91565),s=i(7909),r=i(53681),a=i(76841);function l(e,t,i,l,c){let u=this instanceof a.Dialog?this:new a.Dialog({closeOnClickOverlay:!0}),h=(0,r.Button)(u,"cancel","Cancel"),d=(0,r.Button)(u,"ok","Ok"),f=u.c.element("form",{class:"jodit-dialog_prompt"}),p=u.c.element("input",{autofocus:!0,class:"jodit-input"}),m=u.c.element("label");(0,n.isFunction)(t)&&(i=t,t=void 0),l&&(0,s.attr)(p,"placeholder",l),o.Dom.append(m,u.c.text(e)),o.Dom.append(f,m),o.Dom.append(f,p),h.onAction(u.close);let g=()=>{i&&(0,n.isFunction)(i)&&!1===i(p.value)||u.close()};return d.onAction(g),u.e.on(f,"submit",()=>(g(),!1)),u.setFooter([d,h]),u.open(f,t||"&nbsp;",!0,!0),p.focus(),void 0!==c&&c.length&&(p.value=c,p.select()),u}},61334:function(e,t,i){"use strict";var o=i(27795),n=i(7909),s=i(33201),r=i(29434),a=i(31125),l=i(66206),c=i(18272),u=i(1305),h=i(53202),d=i(43271);let f="jodit-file-browser-preview",p=(e="next",t="right")=>`<div class="${f}__navigation ${f}__navigation_arrow_${e}">`+r.Icon.get("angle-"+t)+"</a>";t.default=e=>{if(!e.o.contextMenu)return()=>{};let t=(0,c.makeContextMenu)(e);return i=>{let r=(0,l.getItem)(i.target,e.container);if(!r)return;let c=r,m=e.options,g=e=>(0,n.attr)(c,e)||"";return e.async.setTimeout(()=>{let _=(0,l.elementToItem)(r,(0,a.elementsMap)(e));_&&(e.state.activeElements=[_],t.show(i.clientX,i.clientY,[!!("1"!==g("data-is-file")&&m.editImage&&(e.dataProvider.canI("ImageResize")||e.dataProvider.canI("ImageCrop")))&&{icon:"pencil",title:"Edit",exec:()=>d.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,u.deleteFile)(e,g("data-name"),g("data-source"))}catch(t){return e.status(t)}return e.state.activeElements=[],(0,h.loadTree)(e).catch(e.status)}},!!m.preview&&{icon:"eye",title:"Preview",exec(){let t=e.dlg({buttons:["fullsize","dialog.close"]}),i=e.c.div(f,'<div class="jodit-icon_loader"></div>'),r=e.c.div(f+"__box"),a=e.c.fromHTML(p()),l=e.c.fromHTML(p("prev","left")),u=s=>{let u=e.c.element("img");(0,n.attr)(u,"src",s);let h=()=>{e.isInDestruct||(e.e.off(u,"load"),o.Dom.detach(i),m.showPreviewNavigation&&(o.Dom.prevWithClass(c,e.files.getFullElName("item"))&&o.Dom.append(i,l),o.Dom.nextWithClass(c,e.files.getFullElName("item"))&&o.Dom.append(i,a)),o.Dom.append(i,r),o.Dom.append(r,u),t.setPosition(),e?.events?.fire("previewOpenedAndLoaded"))};e.e.on(u,"load",h),u.complete&&h()};e.e.on([a,l],"click",function(){if(!(c=this===a?o.Dom.nextWithClass(c,e.files.getFullElName("item")):o.Dom.prevWithClass(c,e.files.getFullElName("item"))))throw(0,s.error)("Need element");o.Dom.detach(i),o.Dom.detach(r),i.innerHTML='<div class="jodit-icon_loader"></div>',u(g("href"))}),e.e.on("beforeDestruct",()=>{t.destruct()}),t.container.classList.add(f+"__dialog"),t.setContent(i),t.setPosition(),t.open(),u(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 o=new WeakMap;i.d(t,["elementsMap",0,e=>{let t=o.get(e);return t||(t={},o.set(e,t)),t}])},58664:function(e,t,i){"use strict";i.d(t,{FileBrowserItem:function(){return s}});var o=i(25045),n=i(65946);class s{static create(e){return e instanceof s?e:new s(e)}get path(){return(0,n.normalizePath)(this.data.source.path?this.data.source.path+"/":"/")}get imageURL(){let e=this.time||new Date().getTime().toString(),{thumbIsAbsolute:t,source:i,thumb:o,file:s}=this.data,r=o||s;return t&&r?r:(0,n.normalizeUrl)(i.baseurl,i.path,r||"")+"?_tmst="+encodeURIComponent(e)}get fileURL(){let{name:e}=this.data,{file:t,fileIsAbsolute:i,source:o}=this.data;return void 0!==t&&(e=t),i&&e?e:(0,n.normalizeUrl)(o.baseurl,o.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,o._)(this,"data",void 0),(0,o._)(this,"source",void 0),(0,o._)(this,"sourceName",void 0),(0,o._)(this,"type",void 0),this.data=e,Object.keys(e).forEach(t=>{this[t]=e[t]})}}},66206:function(e,t,i){"use strict";var o=i(23211);i.d(t,["elementToItem",0,(e,t)=>{let{key:i}=e.dataset,{item:o}=t[i||""];return o},"getItem",0,(e,t,i="a")=>o.Dom.closest(e,e=>o.Dom.isTag(e,i),t)])},68502:function(e,t,i){"use strict";i(37102);var o=i(23211),n=i(28686),s=i(37427),r=i(75587),a=i(5266);a.Config.prototype.filebrowser={namespace:"",cache:!0,extraButtons:[],filter:(e,t)=>(t=t.toLowerCase(),(0,n.isString)(e))?-1!==e.toLowerCase().indexOf(t):(0,n.isString)(e.name)?-1!==e.name.toLowerCase().indexOf(t):!(0,n.isString)(e.file)||-1!==e.file.toLowerCase().indexOf(t),sortBy:"changed-desc",sort(e,t,i){let[o,r]=i.toLowerCase().split("-"),a="asc"===r,l=(e,t)=>t>e?a?-1:1:e>t?a?1:-1:0;if((0,n.isString)(e))return l(e.toLowerCase(),t.toLowerCase());if(void 0===e[o]||"name"===o)return(0,n.isString)(e.name)?l(e.name.toLowerCase(),t.name.toLowerCase()):(0,n.isString)(e.file)?l(e.file.toLowerCase(),t.file.toLowerCase()):0;switch(o){case"changed":{let i=new Date(e.changed).getTime(),o=new Date(t.changed).getTime();return a?i-o:o-i}case"size":{let i=(0,s.humanSizeToBytes)(e.size),o=(0,s.humanSizeToBytes)(t.size);return a?i-o:o-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,n.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 o=this.options,n=this.files.getFullElName("item"),s=o.showFileName,r=o.showFileSize&&e.size,a=o.showFileChangeTime&&e.time,l="";void 0!==e.file&&(l=e.file);let c=`<div class="${n}-info">${s?`<span class="${n}-info-filename">${l}</span>`:""}${r?`<span class="${n}-info-filesize">${e.size}</span>`:""}${a?`<span class="${n}-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"
@@ -54,7 +54,7 @@
54
54
  loading="lazy"
55
55
  />
56
56
  ${s||r||a?c:""}
57
- </a>`},ajax:{...a.Config.prototype.defaultAjaxOptions,url:"",data:{},cache:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",method:"POST",processData:!0,headers:{},prepareData:e=>e,process:e=>e},create:{data:{action:"folderCreate"}},getLocalFileByUrl:{data:{action:"getLocalFileByUrl"}},resize:{data:{action:"imageResize"}},crop:{data:{action:"imageCrop"}},fileMove:{data:{action:"fileMove"}},folderMove:{data:{action:"folderMove"}},fileRename:{data:{action:"fileRename"}},folderRename:{data:{action:"folderRename"}},fileRemove:{data:{action:"fileRemove"}},folderRemove:{data:{action:"folderRemove"}},items:{data:{action:"files"}},folder:{data:{action:"folders"}},permissions:{data:{action:"permissions"}}},a.Config.prototype.controls.filebrowser={upload:{icon:"plus",tooltip:"Upload file",isInput:!0,isDisabled:e=>!e.dataProvider.canI("FileUpload"),getContent(e,t){let i=new r.UIFileInput(e,{tooltip:t.control.tooltip,onlyImages:e.state.onlyImages});return e.e.fire("bindUploader.filebrowser",i.container),i.container}},remove:{icon:"bin",tooltip:"Remove file",isDisabled:e=>!e.state.activeElements.length||!e.dataProvider.canI("FileRemove"),exec(e){e.e.fire("fileRemove.filebrowser")}},update:{tooltip:"Update file list",exec(e){e.e.fire("update.filebrowser")}},select:{tooltip:"Select file",icon:"check",isDisabled:e=>!e.state.activeElements.length,exec(e){e.e.fire("select.filebrowser")}},edit:{tooltip:"Edit image",icon:"pencil",isDisabled(e){let t=e.state.activeElements;return 1!==t.length||!t[0].isImage||!(e.dataProvider.canI("ImageCrop")||e.dataProvider.canI("ImageResize"))},exec(e){e.e.fire("edit.filebrowser")}},tiles:{tooltip:"Tiles view",icon:"th",isActive:e=>"tiles"===e.state.view,exec(e){e.e.fire("view.filebrowser","tiles")}},list:{tooltip:"List view",icon:"th-list",isActive:e=>"list"===e.state.view,exec(e){e.e.fire("view.filebrowser","list")}},filter:{isInput:!0,getContent(e,t){let i=o.Dom.first(t.container,e=>o.Dom.isHTMLElement(e)&&e.classList.contains("jodit-input"));if(i)return i;let n=e.c.element("input",{class:"jodit-input",placeholder:e.i18n("Filter")});return n.value=e.state.filterWord,e.e.on(n,"keydown mousedown",e.async.debounce(()=>{e.e.fire("filter.filebrowser",n.value)},e.defaultTimeout)),n}},sort:{isInput:!0,getContent(e){let t=e.c.fromHTML(`<select class="jodit-input jodit-select"><option value="changed-asc">${e.i18n("Sort by changed")} (↑)</option><option value="changed-desc">${e.i18n("Sort by changed")} (↓)</option><option value="name-asc">${e.i18n("Sort by name")} (↑)</option><option value="name-desc">${e.i18n("Sort by name")} (↓)</option><option value="size-asc">${e.i18n("Sort by size")} (↑)</option><option value="size-desc">${e.i18n("Sort by size")} (↓)</option></select>`);return t.value=e.state.sortBy,e.e.on("sort.filebrowser",e=>{t.value!==e&&(t.value=e)}).on(t,"change",()=>{e.e.fire("sort.filebrowser",t.value)}),t}}}},17780:function(e,t,i){"use strict";i.d(t,{default:function(){return v}});var o=i(25045),n=i(31635),s=i(81937),r=i(49574),a=i(17312),l=i(91565),c=i(62101),u=i(96340),h=i(77483),d=i(33201),p=i(52144),f=i(17338),m=i(58664);let g=new Set(["allowFiles","allowFileMove","allowFileUpload","allowFileUploadRemote","allowFileRemove","allowFileRename","allowFolders","allowFolderMove","allowFolderCreate","allowFolderRemove","allowFolderRename","allowImageResize","allowImageCrop"]);function _(e,t,i){let o=e=>{throw Error(`File browser: the connector answer for action "${t}" (option "filebrowser.${i}") ${e}. See https://xdsoft.net/jodit/docs/modules/file_browser.html`)};if(!(0,c.isPlainObject)(e)||!(0,c.isPlainObject)(e.data))return o('has no "data" object');let{sources:n}=e.data;return(0,a.isArray)(n)?(n.forEach((e,t)=>{if(!(0,c.isPlainObject)(e))return o(`has a non-object entry at "data.sources[${t}]"`);(0,a.isArray)(e.files)||(e.files=[]),(0,a.isArray)(e.folders)||(e.folders=[])}),e):o(void 0===n?'has no "data.sources" array':'must contain "data.sources" as an array of sources, got '+((0,c.isPlainObject)(n)?"an object keyed by source name":typeof n))}class v{get o(){return this.options}get(e){let t=this.__ajaxInstances;if(t.has(e)){let i=t.get(e);i?.abort(),t.delete(e)}let i=(0,h.ConfigProto)(void 0!==this.options[e]?this.options[e]:{},(0,h.ConfigProto)({onProgress:this.progressHandler},this.o.ajax));i.prepareData&&(i.data=i.prepareData.call(this,i.data));let o=new f.Ajax(i);t.set(e,o);let n=o.send();return n.finally(()=>{o.destruct(),t.delete(e),this.progressHandler(100)}).catch(()=>null),n.then(e=>e.json()).then(e=>{if(e&&!this.isSuccess(e))throw Error(this.getMessage(e));return e})}onProgress(e){this.progressHandler=e}async permissions(e,t){return this.o.permissions&&(this.o.permissions.data.path=e,this.o.permissions.data.source=t,this.o.permissions.url)?this.get("permissions").then(e=>{if(this.parent.isInDestruct)throw(0,d.abort)();let t=this.o.permissions.process;if(t||(t=this.o.ajax.process),t){let i=t.call(self,e);i?.data?.permissions&&(this.parent.events.fire(this,"changePermissions",this.__currentPermissions,i.data.permissions),this.__currentPermissions=i.data.permissions)}return this.__currentPermissions}):null}canI(e){let t="allow"+e;if(!s.IS_PROD&&!g.has(t))throw(0,d.error)("Wrong action "+e);let i=this.o.permissionsPresets[t];return void 0!==i?i:null==this.__currentPermissions||void 0===this.__currentPermissions[t]||this.__currentPermissions[t]}__items(e,t,i,o){let n=this.options;return n.items?(n.items.data.path=e,n.items.data.source=t,n.items.data.mods=i,this.get("items").then(e=>{let t=this.o.items.process;return t||(t=this.o.ajax.process),t&&(e=t.call(self,e)),o(_(e,"files","items"))})):Promise.reject(Error("Set Items api options"))}items(e,t,i={}){return this.__items(e,t,i,e=>this.__generateItemsList(e.data.sources,i))}itemsEx(e,t,i={}){return this.__items(e,t,i,e=>({items:this.__generateItemsList(e.data.sources,i),loadedTotal:e.data.sources.reduce((e,t)=>e+t.files.length,0)}))}__generateItemsList(e,t={}){let i=[],o=e=>!t.filterWord?.length||void 0===this.o.filter||this.o.filter(e,t.filterWord);return e.forEach(e=>{if(e.files&&e.files.length){let{sort:n}=this.o;(0,l.isFunction)(n)&&t.sortBy&&e.files.sort((e,i)=>n(e,i,t.sortBy)),e.files.forEach(n=>{o(n)&&("folder"===n.type||!t.onlyImages||void 0===n.isImage||n.isImage)&&i.push(m.FileBrowserItem.create({...n,sourceName:e.name,source:e}))})}}),i}async tree(e,t){return(e=(0,u.normalizeRelativePath)(e),this.o.folder)?(await this.permissions(e,t),this.o.folder.data.path=e,this.o.folder.data.source=t,this.get("folder").then(e=>{let t=this.o.folder.process;return t||(t=this.o.ajax.process),t&&(e=t.call(self,e)),_(e,"folders","folder").data.sources})):Promise.reject(Error("Set Folder Api options"))}getPathByUrl(e){return(0,p.set)("options.getLocalFileByUrl.data.url",e,this),this.get("getLocalFileByUrl").then(e=>{if(this.isSuccess(e))return e.data;throw(0,d.error)(this.getMessage(e))})}createFolder(e,t,i){let{create:o}=this.o;if(!o)throw(0,d.error)("Set Create api options");return o.data.source=i,o.data.path=t,o.data.name=e,this.get("create").then(e=>{if(this.isSuccess(e))return!0;throw(0,d.error)(this.getMessage(e))})}move(e,t,i,o){let n=o?"fileMove":"folderMove",s=this.options[n];if(!s)throw(0,d.error)("Set Move api options");return s.data.from=e,s.data.path=t,s.data.source=i,this.get(n).then(e=>{if(this.isSuccess(e))return!0;throw(0,d.error)(this.getMessage(e))})}__remove(e,t,i,o){let n=this.o[e];if(!n)throw(0,d.error)(`Set "${e}" api options`);return n.data.path=t,n.data.name=i,n.data.source=o,this.get(e).then(e=>(n.process&&(e=n.process.call(this,e)),this.getMessage(e)))}fileRemove(e,t,i){return this.__remove("fileRemove",e,t,i)}folderRemove(e,t,i){return this.__remove("folderRemove",e,t,i)}__rename(e,t,i,o,n){let s=this.o[e];if(!s)throw(0,d.error)(`Set "${e}" api options`);return s.data.path=t,s.data.name=i,s.data.newname=o,s.data.source=n,this.get(e).then(e=>(s.process&&(e=s.process.call(self,e)),this.getMessage(e)))}folderRename(e,t,i,o){return this.__rename("folderRename",e,t,i,o)}fileRename(e,t,i,o){return this.__rename("fileRename",e,t,i,o)}__changeImage(e,t,i,o,n,s){this.o[e]||(this.o[e]={data:{}});let r=this.o[e];return void 0===r.data&&(r.data={action:e}),r.data.newname=n||o,s&&(r.data.box=s),r.data.path=t,r.data.name=o,r.data.source=i,this.get(e).then(e=>e.data.newPath||!0)}crop(e,t,i,o,n){return this.__changeImage("crop",e,t,i,o,n)}resize(e,t,i,o,n){return this.__changeImage("resize",e,t,i,o,n)}getMessage(e){return this.options.getMessage(e)}isSuccess(e){return this.options.isSuccess(e)}destruct(){this.__ajaxInstances.forEach(e=>e.destruct()),this.__ajaxInstances.clear()}constructor(e,t){(0,o._)(this,"parent",void 0),(0,o._)(this,"options",void 0),(0,o._)(this,"__currentPermissions",void 0),(0,o._)(this,"__ajaxInstances",void 0),(0,o._)(this,"progressHandler",void 0),this.parent=e,this.options=t,this.__currentPermissions=null,this.__ajaxInstances=new Map,this.progressHandler=e=>{}}}(0,n.__decorate)([r.autobind],v.prototype,"onProgress",null),(0,n.__decorate)([r.autobind],v.prototype,"permissions",null),(0,n.__decorate)([r.autobind],v.prototype,"canI",null),(0,n.__decorate)([r.autobind],v.prototype,"items",null),(0,n.__decorate)([r.autobind],v.prototype,"itemsEx",null),(0,n.__decorate)([r.autobind],v.prototype,"tree",null),(0,n.__decorate)([r.autobind],v.prototype,"getPathByUrl",null),(0,n.__decorate)([r.autobind],v.prototype,"createFolder",null),(0,n.__decorate)([r.autobind],v.prototype,"move",null),(0,n.__decorate)([r.autobind],v.prototype,"fileRemove",null),(0,n.__decorate)([r.autobind],v.prototype,"folderRemove",null),(0,n.__decorate)([r.autobind],v.prototype,"folderRename",null),(0,n.__decorate)([r.autobind],v.prototype,"fileRename",null),(0,n.__decorate)([r.autobind],v.prototype,"crop",null),(0,n.__decorate)([r.autobind],v.prototype,"resize",null),(0,n.__decorate)([r.autobind],v.prototype,"getMessage",null),(0,n.__decorate)([r.autobind],v.prototype,"isSuccess",null),(0,n.__decorate)([r.autobind],v.prototype,"destruct",null),i.d(t,["DEFAULT_SOURCE_NAME",0,"default"])},18272:function(e,t,i){"use strict";i.d(t,{makeContextMenu:function(){return r},makeDataProvider:function(){return s}});var o=i(67399),n=i(17780);function s(e,t){return new n.default(e,t)}function r(e){return new o.ContextMenu(e)}},1305:function(e,t,i){"use strict";function o(e,t,i){return e.dataProvider.fileRemove(e.state.currentPath,t,i).then(i=>{e.status(i||e.i18n('File "%s" was deleted',t),!0)}).catch(e.status)}i.d(t,{deleteFile:function(){return o}})},1488:function(e,t,i){"use strict";function o(e){return e.files.setMod("active",!0),e.files.setMod("loading",!0),e.dataProvider.items(e.state.currentPath,e.state.currentSource,{sortBy:e.state.sortBy,onlyImages:e.state.onlyImages,filterWord:e.state.filterWord}).then(t=>{t&&(e.state.elements=t,e.state.activeElements=[])}).catch(e.status).finally(()=>e.files.setMod("loading",!1))}i.d(t,{loadItems:function(){return o}})},53202:function(e,t,i){"use strict";i.d(t,{loadTree:function(){return s}});var o=i(27795),n=i(1488);async function s(e){e.tree.setMod("active",!0),o.Dom.detach(e.tree.container);let t=(0,n.loadItems)(e);return e.o.showFoldersPanel?(e.tree.setMod("loading",!0),Promise.all([e.dataProvider.tree(e.state.currentPath,e.state.currentSource).then(t=>{e.state.sources=t}).catch(e.status).finally(()=>e.tree.setMod("loading",!1)),t])):(e.tree.setMod("active",!1),t)}},62623:function(e,t,i){"use strict";i.d(t,{FileBrowser:function(){return D}});var o=i(25045),n=i(31635),s=i(16964),r=i(81937),a=i(84839),l=i(68616),c=i(23211),u=i(1496),h=i(65946),d=i(80991),p=i(25222),f=i(80512),m=i(2222),g=i(5266);i(68502);var _=i(1488),v=i(53202),b=i(34269),y=i(36664),w=i(74833),S=i(17780),C=i(18272),E=i(63425);class D extends m.ViewWithToolbar{className(){return"FileBrowser"}get dataProvider(){return(0,C.makeDataProvider)(this,this.options)}onSelect(e){return()=>{if(this.state.activeElements.length){let t=[],i=[];this.state.activeElements.forEach(e=>{let o=e.fileURL;o&&(t.push(o),i.push(e.isImage||!1))}),this.close(),(0,h.isFunction)(e)&&e({baseurl:"",files:t,isImages:i}),this.close()}return!1}}get _dialog(){let e=this.dlg({minWidth:Math.min(700,screen.width),minHeight:300,buttons:this.o.headerButtons??["fullsize","dialog.close"]});return["beforeClose","afterClose","beforeOpen"].forEach(t=>e.events.on(e,t,()=>this.e.fire(t))),e.setSize(this.o.width,this.o.height),e}get storage(){return p.Storage.makeStorage(!!this.o.saveStateInStorage,this.componentName)}get isOpened(){return this._dialog.isOpened&&"none"!==(0,d.cssInline)(this.browser,"display")}status(e,t){!e||(0,h.isAbortError)(e)||((0,h.isString)(e)||(e=e.message),(0,h.isString)(e)&&(0,h.trim)(e).length&&this.message.message(e,t?"success":"error",this.o.howLongShowMsg))}open(e=this.o.defaultCallback,t=!1){return this.state.onlyImages=t,this.async.promise((t,i)=>{if(!this.o.items||!this.o.items.url)throw(0,h.error)("Need set options.filebrowser.ajax.url");let o=0;this.e.off(this.files.container,"dblclick").on(this.files.container,"dblclick",this.onSelect(e)).on(this.files.container,"touchstart",()=>{let t=new Date().getTime();t-o<r.EMULATE_DBLCLICK_TIMEOUT&&this.onSelect(e)(),o=t}).off("select.filebrowser").on("select.filebrowser",this.onSelect(e));let n=this.c.div();this.toolbar?.appendTo(n),this.__updateToolbarButtons(),this._dialog.open(this.browser,n),this.e.fire("sort.filebrowser",this.state.sortBy),(0,v.loadTree)(this).then(t,i).finally(()=>{this.isInDestruct||this?.e?.fire("fileBrowserReady.filebrowser")})}).catch(e=>{if(!(0,h.isAbortError)(e)&&!r.IS_PROD)throw e})}__getButtons(){return(this.o.buttons??[]).filter(e=>{if(!(0,h.isString)(e))return!0;switch(e){case"filebrowser.upload":return this.dataProvider.canI("FileUpload");case"filebrowser.edit":return this.dataProvider.canI("ImageResize")||this.dataProvider.canI("ImageCrop");case"filebrowser.remove":return this.dataProvider.canI("FileRemove")}return!0})}initUploader(e){let t=this,i=e?.options?.uploader,o=(0,h.ConfigProto)(i||{},g.Config.defaultOptions.uploader),n=()=>(0,_.loadItems)(this);t.uploader=t.getInstance("Uploader",o),t.uploader.setPath(t.state.currentPath).setSource(t.state.currentSource).bind(t.browser,n,t.errorHandler),this.state.on(["change.currentPath","change.currentSource"],()=>{this.uploader.setPath(this.state.currentPath).setSource(this.state.currentSource)}),t.e.on("bindUploader.filebrowser",e=>{t.uploader.bind(e,n,t.errorHandler)})}destruct(){!this.isInDestruct&&((0,a.cached)(this,"_dialog")?.destruct(),super.destruct(),this.events&&this.e.off(".filebrowser"),this.uploader&&this.uploader.destruct())}__updateToolbarButtons(){let e=this.__getButtons();!function(e,t){if(e.length!==t.length)return!1;for(let i=0;i<e.length;i++)if(e[i]!==t[i])return!1;return!0}(this.__prevButtons,e)&&(this.__prevButtons=e,this.toolbar?.build(e))}constructor(e){super(e),(0,o._)(this,"browser",this.c.div(this.componentName)),(0,o._)(this,"status_line",this.c.div(this.getFullElName("status"))),(0,o._)(this,"tree",new E.FileBrowserTree(this)),(0,o._)(this,"files",new E.FileBrowserFiles(this)),(0,o._)(this,"state",(0,u.observable)({currentPath:"",currentSource:S.DEFAULT_SOURCE_NAME,currentBaseUrl:"",activeElements:[],elements:[],sources:[],view:"tiles",sortBy:"changed-desc",filterWord:"",onlyImages:!1})),(0,o._)(this,"errorHandler",e=>{(0,h.isAbortError)(e)||(e instanceof Error?this.status(this.i18n(e.message)):this.status(this.dataProvider.getMessage(e)))}),(0,o._)(this,"uploader",void 0),(0,o._)(this,"close",()=>{this._dialog.close()}),(0,o._)(this,"__prevButtons",[]),this.attachEvents(e),this.options=(0,h.ConfigProto)(e||{},g.Config.defaultOptions.filebrowser),this.browser.component=this,this.container=this.browser,this.o.showFoldersPanel&&c.Dom.append(this.browser,this.tree.container),c.Dom.append(this.browser,this.files.container),c.Dom.append(this.browser,this.status_line),y.selfListeners.call(this),b.nativeListeners.call(this),w.stateListeners.call(this),["getLocalFileByUrl","crop","resize","create","fileMove","folderMove","fileRename","folderRename","fileRemove","folderRemove","folder","items","permissions"].forEach(e=>{null!=this.options[e]&&(this.options[e]=(0,h.ConfigProto)(this.options[e],this.o.ajax))});let{storeView:t,storeSortBy:i,storeLastOpenedFolder:n}=this.o.saveStateInStorage||{storeLastOpenedFolder:!1,storeView:!1,storeSortBy:!1},r=t&&this.storage.get("view");r&&null==this.o.view?this.state.view="list"===r?"list":"tiles":this.state.view="list"===this.o.view?"list":"tiles",this.files.setMod("view",this.state.view);let a=i&&this.storage.get("sortBy");if(a){let e=a.split("-");this.state.sortBy=["changed","name","size"].includes(e[0])?a:"changed-desc"}else this.state.sortBy=this.o.sortBy||"changed-desc";if(n){let e=this.storage.get("currentPath"),t=this.storage.get("currentSource");this.state.currentPath=e??"",this.state.currentSource=t??""}this.initUploader(this),this.setStatus(s.STATUSES.ready)}}(0,n.__decorate)([a.cache],D.prototype,"dataProvider",null),(0,n.__decorate)([a.cache],D.prototype,"_dialog",null),(0,n.__decorate)([a.cache],D.prototype,"storage",null),(0,n.__decorate)([a.autobind],D.prototype,"status",null),(0,n.__decorate)([a.autobind],D.prototype,"open",null),(0,n.__decorate)([(0,l.watch)("dataProvider:changePermissions")],D.prototype,"__updateToolbarButtons",null),D=(0,n.__decorate)([(0,a.derive)(f.Dlgs)],D)},17610:function(e,t,i){"use strict";i.d(t,{FileBrowser:function(){return o.FileBrowser}});var o=i(62623)},34269:function(e,t,i){"use strict";i.d(t,{nativeListeners:function(){return c}});var o=i(7909),n=i(77213),s=i(61334),r=i(31125),a=i(66206),l=i(53202);function c(){let e=!1,t=(0,r.elementsMap)(this),i=this;i.e.on(i.tree.container,"dragstart",t=>{let o=(0,a.getItem)(t.target,i.container);o&&i.o.moveFolder&&(e=o)}).on(i.tree.container,"drop",t=>{if((i.o.moveFile||i.o.moveFolder)&&e){let n=(0,o.attr)(e,"-path")||"";if(!i.o.moveFolder&&e.classList.contains(this.tree.getFullElName("item"))||e.classList.contains(this.files.getFullElName("item"))&&(n+=(0,o.attr)(e,"-name"),!i.o.moveFile))return!1;let s=(0,a.getItem)(t.target,i.container);s&&(i.dataProvider.move(n,(0,o.attr)(s,"-path")||"",(0,o.attr)(s,"-source")||"",e.classList.contains(this.files.getFullElName("item"))).then(()=>(0,l.loadTree)(this)).catch(i.status),e=!1)}}).on(i.files.container,"contextmenu",(0,s.default)(i)).on(i.files.container,"click",e=>{(0,n.ctrlKey)(e)||(this.state.activeElements=[])}).on(i.files.container,"click",e=>{let o=(0,a.getItem)(e.target,i.container);if(!o)return;let s=(0,a.elementToItem)(o,t);if(s)return(0,n.ctrlKey)(e)?i.state.activeElements=[...i.state.activeElements,s]:i.state.activeElements=[s],e.stopPropagation(),!1}).on(i.files.container,"dragstart",t=>{if(i.o.moveFile){let o=(0,a.getItem)(t.target,i.container);o&&(e=o)}}).on(i.container,"drop",e=>e.preventDefault())}},36664:function(e,t,i){"use strict";i.d(t,{selfListeners:function(){return u}});var o=i(65946),n=i(28686),s=i(17780),r=i(1305),a=i(1488),l=i(53202),c=i(43271);function u(){let e=this.state,t=this.dataProvider,i=this;i.e.on("view.filebrowser",t=>{t!==e.view&&(e.view=t)}).on("sort.filebrowser",t=>{t!==e.sortBy&&(e.sortBy=t,(0,a.loadItems)(i))}).on("filter.filebrowser",t=>{t!==e.filterWord&&(e.filterWord=t,(0,a.loadItems)(i))}).on("openFolder.filebrowser",e=>{let t;t=".."===e.name?e.path.split("/").filter(e=>e.length).slice(0,-1).join("/"):(0,o.normalizePath)(e.path,e.name),i.state.currentPath=t,i.state.currentSource="."===e.name?s.DEFAULT_SOURCE_NAME:e.source}).on("removeFolder.filebrowser",e=>{i.confirm("Are you sure?","Delete",o=>{o&&t.folderRemove(e.path,e.name,e.source).then(e=>(i.status(e,!0),(0,l.loadTree)(i))).catch(i.status)})}).on("renameFolder.filebrowser",e=>{i.prompt("Enter new name","Rename",o=>{if(!(0,n.isValidName)(o))return i.status(i.i18n("Enter new name")),!1;t.folderRename(e.path,e.name,o,e.source).then(e=>(i.state.activeElements=[],i.status(e,!0),(0,l.loadTree)(i))).catch(i.status)},"type name",e.name)}).on("addFolder.filebrowser",e=>{i.prompt("Enter Directory name","Create directory",o=>{t.createFolder(o,e.path,e.source).then(()=>(0,l.loadTree)(i)).catch(i.status)},"type dir name")}).on("fileRemove.filebrowser",()=>{i.state.activeElements.length&&i.confirm("Are you sure?","",e=>{if(e){let e=[];i.state.activeElements.forEach(t=>{e.push((0,r.deleteFile)(i,t.file||t.name||"",t.sourceName))}),i.state.activeElements=[],Promise.all(e).then(()=>(0,l.loadTree)(i).catch(i.status),i.status)}})}).on("edit.filebrowser",()=>{if(1===i.state.activeElements.length){let[e]=this.state.activeElements;c.openImageEditor.call(i,e.fileURL,e.file||"",e.path,e.sourceName)}}).on("fileRename.filebrowser",(e,o,s)=>{1===i.state.activeElements.length&&i.prompt("Enter new name","Rename",r=>{if(!(0,n.isValidName)(r))return i.status(i.i18n("Enter new name")),!1;t.fileRename(o,e,r,s).then(e=>{i.state.activeElements=[],i.status(e,!0),(0,a.loadItems)(i)}).catch(i.status)},"type name",e)}).on("update.filebrowser",()=>{(0,l.loadTree)(this).then(this.status,this.status)})}},74833:function(e,t,i){"use strict";i.d(t,{stateListeners:function(){return l}});var o=i(27795),n=i(97022),s=i(53681),r=i(31125),a=i(53202);function l(){let e=(0,r.elementsMap)(this),{state:t,files:i,create:l,options:c}=this,u=t=>{let i=t.uniqueHashKey;if(e[i])return e[i].elm;let o=l.fromHTML(c.getThumbTemplate.call(this,t,t.source,t.sourceName.toString()));return o.dataset.key=i,e[i]={item:t,elm:o},e[i].elm};t.on(["change.currentPath","change.currentSource"],this.async.debounce(()=>{this.o.saveStateInStorage&&this.o.saveStateInStorage.storeLastOpenedFolder&&this.storage.set("currentPath",this.state.currentPath).set("currentSource",this.state.currentSource),(0,a.loadTree)(this).catch(this.status)},this.defaultTimeout)).on("beforeChange.activeElements",()=>{t.activeElements.forEach(t=>{let{elm:o}=e[t.uniqueHashKey];o&&o.classList.remove(i.getFullElName("item","active",!0))})}).on("change.activeElements",()=>{this.e.fire("changeSelection"),t.activeElements.forEach(t=>{let{elm:o}=e[t.uniqueHashKey];o&&o.classList.add(i.getFullElName("item","active",!0))})}).on("change.view",()=>{i.setMod("view",t.view),this.o.saveStateInStorage&&this.o.saveStateInStorage.storeView&&this.storage.set("view",t.view)}).on("change.sortBy",()=>{this.o.saveStateInStorage&&this.o.saveStateInStorage.storeSortBy&&this.storage.set("sortBy",t.sortBy)}).on("change.elements",this.async.debounce(()=>{o.Dom.detach(i.container),t.elements.length?t.elements.forEach(e=>{o.Dom.append(this.files.container,u(e))}):o.Dom.append(i.container,l.div(this.componentName+"_no-files_true",this.i18n("There are no files")))},this.defaultTimeout)).on("change.sources",this.async.debounce(()=>{o.Dom.detach(this.tree.container),t.sources.forEach(e=>{let t=e.name;if(t&&"default"!==t&&o.Dom.append(this.tree.container,l.div(this.tree.getFullElName("source-title"),t)),e.folders.forEach(i=>{let r=l.a(this.tree.getFullElName("item"),{draggable:"draggable",href:"#","data-path":(0,n.normalizePath)(e.path,i+"/"),"data-name":i,"data-source":t,"data-source-path":e.path},l.span(this.tree.getFullElName("item-title"),i)),a=o=>s=>{this.e.fire(`${o}.filebrowser`,{name:i,path:(0,n.normalizePath)(e.path+"/"),source:t}),s.stopPropagation(),s.preventDefault()};if(this.e.on(r,"click",a("openFolder")),o.Dom.append(this.tree.container,r),".."!==i&&"."!==i){if(c.renameFolder&&this.dataProvider.canI("FolderRename")){let e=(0,s.Button)(this,{icon:{name:"pencil"},name:"rename",tooltip:"Rename",size:"tiny"});e.onAction(a("renameFolder")),o.Dom.append(r,e.container)}if(c.deleteFolder&&this.dataProvider.canI("FolderRemove")){let e=(0,s.Button)(this,{icon:{name:"cancel"},name:"remove",tooltip:"Delete",size:"tiny"});e.onAction(a("removeFolder")),o.Dom.append(r,e.container)}}}),c.createNewFolder&&this.dataProvider.canI("FolderCreate")){let i=(0,s.Button)(this,"plus","Add folder","secondary");i.onAction(()=>{this.e.fire("addFolder",{path:(0,n.normalizePath)(e.path+"/"),source:t})}),this.tree.append(i)}})},this.defaultTimeout))}},86122:function(e,t,i){"use strict";i.d(t,{FileBrowserFiles:function(){return n}});var o=i(4099);class n extends o.UIGroup{className(){return"FileBrowserFiles"}}},63425:function(e,t,i){"use strict";i.d(t,{FileBrowserFiles:function(){return o.FileBrowserFiles},FileBrowserTree:function(){return n.FileBrowserTree}});var o=i(86122),n=i(55376)},55376:function(e,t,i){"use strict";i.d(t,{FileBrowserTree:function(){return n}});var o=i(4099);class n extends o.UIGroup{className(){return"FileBrowserTree"}}},8838:function(e,t,i){"use strict";i.d(t,{Command:function(){return n}});var o=i(25045);class n{undo(){this.history.snapshot.restore(this.oldValue)}redo(){this.history.snapshot.restore(this.newValue)}constructor(e,t,i,n){(0,o._)(this,"oldValue",void 0),(0,o._)(this,"newValue",void 0),(0,o._)(this,"history",void 0),(0,o._)(this,"tick",void 0),this.oldValue=e,this.newValue=t,this.history=i,this.tick=n}}},53855:function(e,t,i){"use strict";i.d(t,{History:function(){return h}});var o=i(25045),n=i(31635),s=i(59609),r=i(55184),a=i(5266),l=i(8838),c=i(46363),u=i(33511);a.Config.prototype.history={enable:!0,maxHistoryLength:1/0,timeout:1e3};class h extends s.ViewComponent{className(){return"History"}redo(){this.__stack.redo()&&(this.startValue=this.snapshot.make(),this.fireChangeStack())}canRedo(){return this.__stack.canRedo()}undo(){this.__stack.undo()&&(this.startValue=this.snapshot.make(),this.fireChangeStack())}canUndo(){return this.__stack.canUndo()}clear(){this.startValue=this.snapshot.make(),this.__stack.clear(),this.fireChangeStack()}get length(){return this.__stack.length}get startValue(){return this.__startValue}set startValue(e){this.__startValue=e}__upTick(){this.updateTick+=1}onChange(){this.__processChanges()}__processChanges(){!this.snapshot.isBlocked&&this.j.o.history.enable&&this.updateStack()}updateStack(e=!1){let t=this.snapshot.make();if(!c.Snapshot.equal(t,this.startValue)){let i=new l.Command(this.startValue,t,this,this.updateTick);if(e){let e=this.__stack.current();e&&this.updateTick===e.tick&&this.__stack.replace(i)}else this.__stack.push(i);this.startValue=t,this.fireChangeStack()}}fireChangeStack(){this.j&&!this.j.isInDestruct&&this.j.events?.fire("changeStack")}destruct(){this.isInDestruct||(this.j.events&&this.j.e.off(".history"),this.snapshot.destruct(),super.destruct())}constructor(e,t=new u.Stack(e.o.history.maxHistoryLength),i=new c.Snapshot(e)){super(e),(0,o._)(this,"__startValue",void 0),(0,o._)(this,"__stack",void 0),(0,o._)(this,"snapshot",void 0),(0,o._)(this,"updateTick",0),this.__stack=t,this.snapshot=i,e.o.history.enable&&e.e.on("afterAddPlace.history",()=>{this.isInDestruct||(this.startValue=this.snapshot.make(),e.events.on("internalChange internalUpdate",()=>{this.startValue=this.snapshot.make()}).on(e.editor,["changeSelection","selectionstart","selectionchange","mousedown","mouseup","keydown","keyup"].map(e=>e+".history").join(" "),()=>{this.startValue.html===this.j.getNativeEditorValue()&&(this.startValue=this.snapshot.make())}).on(this,"change.history",this.onChange))})}}(0,n.__decorate)([(0,r.debounce)()],h.prototype,"onChange",null)},46363:function(e,t,i){"use strict";i.d(t,{Snapshot:function(){return a}});var o=i(25045),n=i(16964),s=i(81937),r=i(23211);class a extends n.ViewComponent{className(){return"Snapshot"}static equal(e,t){return e.html===t.html&&JSON.stringify(e.range)===JSON.stringify(t.range)&&JSON.stringify(e.ranges)===JSON.stringify(t.ranges)&&!!e.backward==!!t.backward}static countNodesBeforeInParent(e){if(!e.parentNode)return 0;let t=e.parentNode.childNodes,i=0,o=null;for(let n=0;n<t.length;n+=1){if(!o||this.isIgnoredNode(t[n])||r.Dom.isText(o)&&r.Dom.isText(t[n])||(i+=1),t[n]===e)return i;o=t[n]}return 0}static strokeOffset(e,t){for(;r.Dom.isText(e);)e=e.previousSibling,r.Dom.isText(e)&&e.nodeValue&&(t+=e.nodeValue.length);return t}calcHierarchyLadder(e){let t=[];if(!e||!e.parentNode||!r.Dom.isOrContains(this.j.editor,e))return[];for(;e&&e!==this.j.editor;)e&&!a.isIgnoredNode(e)&&t.push(a.countNodesBeforeInParent(e)),e=e.parentNode;return t.reverse()}getElementByLadder(e){let t=this.j.editor,i;for(i=0;t&&i<e.length;i+=1)t=t.childNodes[e[i]];return t}get isBlocked(){return this.__isBlocked}__block(e){this.__isBlocked=e}transaction(e){this.__block(!0),this.__levelOfTransaction+=1;try{e()}catch(e){if(!s.IS_PROD)throw e}finally{this.__levelOfTransaction-=1,0===this.__levelOfTransaction&&this.__block(!1)}}make(){let e={html:"",range:{startContainer:[],startOffset:0,endContainer:[],endOffset:0}};e.html=this.__getCleanedEditorValue(this.j.editor);let t=this.j.s.sel;if(t&&t.rangeCount){let i=[];for(let e=0;e<t.rangeCount;e+=1){let o=t.getRangeAt(e),n=this.calcHierarchyLadder(o.startContainer),s=this.calcHierarchyLadder(o.endContainer),r=a.strokeOffset(o.startContainer,o.startOffset),l=a.strokeOffset(o.endContainer,o.endOffset);n.length||o.startContainer===this.j.editor||(r=0),s.length||o.endContainer===this.j.editor||(l=0),i.push({startContainer:n,startOffset:r,endContainer:s,endOffset:l})}e.range=i[0],i.length>1?e.ranges=i:t.isCollapsed||t.anchorNode!==t.getRangeAt(0).endContainer||t.anchorOffset!==t.getRangeAt(0).endOffset||(e.backward=!0)}return e}restore(e){this.transaction(()=>{let t=this.storeScrollState();this.__getCleanedEditorValue(this.j.editor)!==e.html&&(this.j.value=e.html),this.restoreOnlySelection(e),this.restoreScrollState(t)})}storeScrollState(){return[this.j.ow.scrollY,this.j.editor.scrollTop]}restoreScrollState(e){let{j:t}=this,{ow:i}=t;i.scrollTo(i.scrollX,e[0]),t.editor.scrollTop=e[1]}restoreOnlySelection(e){try{if(e.range){let t=(e.ranges??[e.range]).map(e=>{let t=this.j.ed.createRange();return t.setStart(this.getElementByLadder(e.startContainer),e.startOffset),t.setEnd(this.getElementByLadder(e.endContainer),e.endOffset),t});this.j.s.selectRange(t[0]);let i=this.j.s.sel;if(t.slice(1).forEach(e=>i?.addRange(e)),e.backward&&1===t.length){let e=t[0];i?.setBaseAndExtent(e.endContainer,e.endOffset,e.startContainer,e.startOffset)}}}catch(e){this.j.editor.lastChild&&this.j.s.setCursorAfter(this.j.editor.lastChild),s.IS_PROD}}destruct(){this.__block(!1),super.destruct()}static isIgnoredNode(e){return r.Dom.isText(e)&&!e.nodeValue||r.Dom.isTemporary(e)}__getCleanedEditorValue(e){let t=e.cloneNode(!0);return r.Dom.temporaryList(t).forEach(r.Dom.unwrap),t.innerHTML}constructor(...e){super(...e),(0,o._)(this,"__isBlocked",!1),(0,o._)(this,"__levelOfTransaction",0)}}},33511:function(e,t,i){"use strict";i.d(t,{Stack:function(){return n}});var o=i(25045);class n{get length(){return this.commands.length}clearRedo(){this.commands.length=this.stackPosition+1}clear(){this.commands.length=0,this.stackPosition=-1}push(e){this.clearRedo(),this.commands.push(e),this.stackPosition+=1,this.commands.length>this.size&&(this.commands.shift(),this.stackPosition-=1)}replace(e){this.commands[this.stackPosition]=e}current(){return this.commands[this.stackPosition]}undo(){return!!this.canUndo()&&(this.commands[this.stackPosition]&&this.commands[this.stackPosition].undo(),this.stackPosition-=1,!0)}redo(){return!!this.canRedo()&&(this.stackPosition+=1,this.commands[this.stackPosition]&&this.commands[this.stackPosition].redo(),!0)}canUndo(){return this.stackPosition>=0}canRedo(){return this.stackPosition<this.commands.length-1}constructor(e){(0,o._)(this,"size",void 0),(0,o._)(this,"commands",void 0),(0,o._)(this,"stackPosition",void 0),this.size=e,this.commands=[],this.stackPosition=-1}}},54500:function(e,t,i){"use strict";var o=i(29434),n=i(5266),s=i(928),r=i.n(s),a=i(31230),l=i.n(a);n.Config.prototype.imageeditor={min_width:20,min_height:20,closeAfterSave:!1,width:"85%",height:"85%",crop:!0,resize:!0,resizeUseRatio:!0,resizeMinWidth:20,resizeMinHeight:20,cropUseRatio:!0,cropDefaultWidth:"70%",cropDefaultHeight:"70%"},o.Icon.set("crop",r()).set("resize",l())},43271:function(e,t,i){"use strict";i.d(t,{ImageEditor:function(){return S},openImageEditor:function(){return C}});var o=i(25045),n=i(31635),s=i(16964),r=i(84839),a=i(27795),l=i(4040),c=i(7909),u=i(80991),h=i(28723),d=i(71125),p=i(59400),f=i(5266);i(54500);var m=i(8908);let g="jodit-image-editor",_=e=>t=>t.classList.contains(e);function v(e,t){return a.Dom.first(e,e=>a.Dom.isHTMLElement(e)&&t(e))}function b(e,t){let i=[];return a.Dom.each(e,e=>{a.Dom.isHTMLElement(e)&&t(e)&&i.push(e)}),i}let y="resize",w="crop";class S extends s.ViewComponent{className(){return"ImageEditor"}get o(){return this.options}hide(){this._dialog.close()}open(e,t){return this.j.async.promise(i=>{let o=new Date().getTime();this.image=this.j.c.element("img");let n=e=>a.Dom.isTag(e,"img")||_("jodit-icon_loader")(e);b(this.resize_box,n).forEach(a.Dom.safeRemove),b(this.crop_box,n).forEach(a.Dom.safeRemove),(0,u.css)(this.cropHandler,"background","transparent"),this.onSave=t,a.Dom.append(this.resize_box,this.j.c.element("i",{class:"jodit-icon_loader"})),a.Dom.append(this.crop_box,this.j.c.element("i",{class:"jodit-icon_loader"})),/\?/.test(e)?e+="&_tst="+o:e+="?_tst="+o,(0,c.attr)(this.image,"src",e),this._dialog.open();let{widthInput:s,heightInput:r}=(0,h.refs)(this.editor),l=()=>{this.isDestructed||(this.image.removeEventListener("load",l),this.naturalWidth=this.image.naturalWidth,this.naturalHeight=this.image.naturalHeight,s.value=this.naturalWidth.toString(),r.value=this.naturalHeight.toString(),this.ratio=this.naturalWidth/this.naturalHeight,a.Dom.append(this.resize_box,this.image),this.cropImage=this.image.cloneNode(!0),a.Dom.append(this.crop_box,this.cropImage),a.Dom.safeRemove.apply(null,b(this.editor,_("jodit-icon_loader"))),this.activeTab===w&&this.showCrop(),this.j.e.fire(this.resizeHandler,"updatesize"),this.j.e.fire(this.cropHandler,"updatesize"),this._dialog.setPosition(),this.j.e.fire("afterImageEditor"),i(this._dialog))};this.image.addEventListener("load",l),this.image.complete&&l()})}onTitleModeClick(e){let t=this,i=e.target,o=i?.parentElement;if(!o)return;b(t.editor,e=>_(`${g}__slider`)(e)||_(`${g}__area`)(e)).forEach(e=>e.classList.remove(`${g}_active`)),o.classList.add(`${g}_active`),this.activeTab=(0,c.attr)(o,"-area")||y;let n=v(t.editor,e=>_(`${g}__area`)(e)&&_(`${g}__area_`+t.activeTab)(e));n&&n.classList.add(`${g}_active`),t.activeTab===w&&t.showCrop()}onChangeSizeInput(e){let t,i=e.target,{widthInput:o,heightInput:n}=(0,h.refs)(this.editor),s="widthInput"===(0,c.attr)(i,"data-ref"),r=parseInt(i.value,10),a=s?this.o.min_width:this.o.min_height,l=s?this.o.min_height:this.o.min_width;r>a&&((0,u.css)(this.image,s?"width":"height",r),this.resizeUseRatio&&(t=s?Math.round(r/this.ratio):Math.round(r*this.ratio))>l&&((0,u.css)(this.image,s?"height":"width",t),s?n.value=t.toString():o.value=t.toString())),this.j.e.fire(this.resizeHandler,"updatesize")}onResizeHandleMouseDown(e){this.target=e.target,e.preventDefault(),e.stopImmediatePropagation(),this.clicked=!0,this.start_x=e.clientX,this.start_y=e.clientY,this.activeTab===w?(this.top_x=(0,u.css)(this.cropHandler,"left"),this.top_y=(0,u.css)(this.cropHandler,"top"),this.width=this.cropHandler.offsetWidth,this.height=this.cropHandler.offsetHeight):(this.width=this.image.offsetWidth,this.height=this.image.offsetHeight),this.j.e.on(this.j.ow,"mousemove",this.onGlobalMouseMove).one(this.j.ow,"mouseup",this.onGlobalMouseUp)}onGlobalMouseUp(e){this.clicked&&(this.clicked=!1,e.stopImmediatePropagation(),this.j.e.off(this.j.ow,"mousemove",this.onGlobalMouseMove))}onGlobalMouseMove(e){if(!this.clicked)return;let{widthInput:t,heightInput:i}=(0,h.refs)(this.editor);this.diff_x=e.clientX-this.start_x,this.diff_y=e.clientY-this.start_y,this.activeTab===y&&this.resizeUseRatio||this.activeTab===w&&this.cropUseRatio?this.diff_x?(this.new_w=this.width+this.diff_x,this.new_h=Math.round(this.new_w/this.ratio)):(this.new_h=this.height+this.diff_y,this.new_w=Math.round(this.new_h*this.ratio)):(this.new_w=this.width+this.diff_x,this.new_h=this.height+this.diff_y),this.activeTab===y?(this.new_w>this.o.resizeMinWidth&&((0,u.css)(this.image,"width",this.new_w+"px"),t.value=this.new_w.toString()),this.new_h>this.o.resizeMinHeight&&((0,u.css)(this.image,"height",this.new_h+"px"),i.value=this.new_h.toString()),this.j.e.fire(this.resizeHandler,"updatesize")):(this.target!==this.cropHandler?(this.top_x+this.new_w>this.cropImage.offsetWidth&&(this.new_w=this.cropImage.offsetWidth-this.top_x),this.top_y+this.new_h>this.cropImage.offsetHeight&&(this.new_h=this.cropImage.offsetHeight-this.top_y),(0,u.css)(this.cropHandler,{width:this.new_w,height:this.new_h})):(this.top_x+this.diff_x+this.cropHandler.offsetWidth>this.cropImage.offsetWidth&&(this.diff_x=this.cropImage.offsetWidth-this.top_x-this.cropHandler.offsetWidth),(0,u.css)(this.cropHandler,"left",this.top_x+this.diff_x),this.top_y+this.diff_y+this.cropHandler.offsetHeight>this.cropImage.offsetHeight&&(this.diff_y=this.cropImage.offsetHeight-this.top_y-this.cropHandler.offsetHeight),(0,u.css)(this.cropHandler,"top",this.top_y+this.diff_y)),this.j.e.fire(this.cropHandler,"updatesize"))}destruct(){this.isDestructed||(this._dialog&&!this._dialog.isInDestruct&&this._dialog.destruct(),a.Dom.safeRemove(this.editor),this.j.e&&this.j.e.off(this.j.ow,"mousemove",this.onGlobalMouseMove).off(this.j.ow,"mouseup",this.onGlobalMouseUp).off(this.ow,"."+g).off("."+g),super.destruct())}constructor(e){super(e),(0,o._)(this,"options",void 0),(0,o._)(this,"onSave",void 0),(0,o._)(this,"resizeUseRatio",!0),(0,o._)(this,"cropUseRatio",!0),(0,o._)(this,"_dialog",void 0),(0,o._)(this,"image",void 0),(0,o._)(this,"cropImage",void 0),(0,o._)(this,"clicked",!1),(0,o._)(this,"target",void 0),(0,o._)(this,"start_x",0),(0,o._)(this,"start_y",0),(0,o._)(this,"top_x",0),(0,o._)(this,"top_y",0),(0,o._)(this,"width",0),(0,o._)(this,"height",0),(0,o._)(this,"activeTab",y),(0,o._)(this,"naturalWidth",0),(0,o._)(this,"naturalHeight",0),(0,o._)(this,"ratio",0),(0,o._)(this,"new_h",0),(0,o._)(this,"new_w",0),(0,o._)(this,"diff_x",0),(0,o._)(this,"diff_y",0),(0,o._)(this,"buttons",void 0),(0,o._)(this,"editor",void 0),(0,o._)(this,"resize_box",void 0),(0,o._)(this,"crop_box",void 0),(0,o._)(this,"sizes",void 0),(0,o._)(this,"resizeHandler",void 0),(0,o._)(this,"cropHandler",void 0),(0,o._)(this,"cropBox",{x:0,y:0,w:0,h:0}),(0,o._)(this,"resizeBox",{w:0,h:0}),(0,o._)(this,"calcCropBox",()=>{let e,t,i=this.crop_box.parentNode,o=.8*i.offsetWidth,n=.8*i.offsetHeight,{naturalWidth:s,naturalHeight:r}=this;o>s&&n>r?(e=s,t=r):this.ratio>o/n?(e=o,t=o/s*r):(e=n/r*s,t=n),(0,u.css)(this.crop_box,{width:e,height:t})}),(0,o._)(this,"showCrop",()=>{if(!this.cropImage)return;this.calcCropBox();let e=this.cropImage.offsetWidth||this.image.offsetWidth||this.image.naturalWidth;this.new_w=S.calcValueByPercent(e,this.o.cropDefaultWidth);let t=this.cropImage.offsetHeight||this.image.offsetHeight||this.image.naturalHeight;this.cropUseRatio?this.new_h=this.new_w/this.ratio:this.new_h=S.calcValueByPercent(t,this.o.cropDefaultHeight),(0,u.css)(this.cropHandler,{backgroundImage:"url("+(0,c.attr)(this.cropImage,"src")+")",width:this.new_w,height:this.new_h,left:e/2-this.new_w/2,top:t/2-this.new_h/2}),this.j.e.fire(this.cropHandler,"updatesize")}),(0,o._)(this,"updateCropBox",()=>{if(!this.cropImage)return;let e=this.cropImage.offsetWidth/this.naturalWidth,t=this.cropImage.offsetHeight/this.naturalHeight;this.cropBox.x=(0,u.css)(this.cropHandler,"left")/e,this.cropBox.y=(0,u.css)(this.cropHandler,"top")/t,this.cropBox.w=this.cropHandler.offsetWidth/e,this.cropBox.h=this.cropHandler.offsetHeight/t,this.sizes.textContent=this.cropBox.w.toFixed(0)+"x"+this.cropBox.h.toFixed(0)}),(0,o._)(this,"updateResizeBox",()=>{this.resizeBox.w=this.image.offsetWidth||this.naturalWidth,this.resizeBox.h=this.image.offsetHeight||this.naturalHeight}),(0,o._)(this,"setHandlers",()=>{let e=this,{widthInput:t,heightInput:i}=(0,h.refs)(this.editor);e.j.e.on([v(e.editor,_("jodit_bottomright")),e.cropHandler],"mousedown."+g,this.onResizeHandleMouseDown).on(this.j.ow,"resize."+g,()=>{this.j.e.fire(e.resizeHandler,"updatesize"),e.showCrop(),this.j.e.fire(e.cropHandler,"updatesize")}),e.j.e.on(b(this.editor,_(`${g}__slider-title`)),"click",this.onTitleModeClick).on([t,i],"input",this.onChangeSizeInput);let{keepAspectRatioResize:o,keepAspectRatioCrop:n}=(0,h.refs)(this.editor);o&&o.addEventListener("change",()=>{this.resizeUseRatio=o.checked}),n&&n.addEventListener("change",()=>{this.cropUseRatio=n.checked}),e.j.e.on(e.resizeHandler,"updatesize",()=>{(0,u.css)(e.resizeHandler,{top:0,left:0,width:e.image.offsetWidth||e.naturalWidth,height:e.image.offsetHeight||e.naturalHeight}),this.updateResizeBox()}).on(e.cropHandler,"updatesize",()=>{if(!e.cropImage)return;let t=(0,u.css)(e.cropHandler,"left"),i=(0,u.css)(e.cropHandler,"top"),o=e.cropHandler.offsetWidth,n=e.cropHandler.offsetHeight;t<0&&(t=0),i<0&&(i=0),t+o>e.cropImage.offsetWidth&&(o=e.cropImage.offsetWidth-t,e.cropUseRatio&&(n=o/e.ratio)),i+n>e.cropImage.offsetHeight&&(n=e.cropImage.offsetHeight-i,e.cropUseRatio&&(o=n*e.ratio)),(0,u.css)(e.cropHandler,{width:o,height:n,left:t,top:i,backgroundPosition:-t-1+"px "+(-i-1)+"px",backgroundSize:e.cropImage.offsetWidth+"px "+e.cropImage.offsetHeight+"px"}),e.updateCropBox()}),Object.values(e.buttons).forEach(o=>{o.onAction(()=>{let n={action:e.activeTab,box:e.activeTab===y?e.resizeBox:e.cropBox};switch(o){case e.buttons.saveas:e.j.prompt("Enter new name","Save in new file",t=>{if(!(0,l.trim)(t))return e.j.alert("The name should not be empty"),!1;e.j.e.fire("afterImageEditorSave",n,t),e.onSave(t,n,e.hide,t=>{e.j.alert(t.message)})});break;case e.buttons.save:e.j.e.fire("afterImageEditorSave",n),e.onSave(void 0,n,e.hide,t=>{e.j.alert(t.message)});break;case e.buttons.reset:e.activeTab===y?((0,u.css)(e.image,{width:null,height:null}),t.value=e.naturalWidth.toString(),i.value=e.naturalHeight.toString(),e.j.e.fire(e.resizeHandler,"updatesize")):e.showCrop()}})})}),this.options=e&&e.o&&e.o.imageeditor?e.o.imageeditor:f.Config.defaultOptions.imageeditor;let t=this.options;this.resizeUseRatio=t.resizeUseRatio,this.cropUseRatio=t.cropUseRatio,this.buttons={reset:(0,p.Button)(this.j,"update","Reset"),save:(0,p.Button)(this.j,"save","Save"),saveas:(0,p.Button)(this.j,{icon:{name:"save"},name:"save-as",text:"Save as ..."})},this.activeTab=t.resize?y:w,this.editor=(0,m.form)(this.j,this.options);let{resizeBox:i,cropBox:n}=(0,h.refs)(this.editor);this.resize_box=i,this.crop_box=n,this.sizes=v(this.editor,e=>_(`${g}__sizes`)(e)&&!!a.Dom.closest(e,e=>a.Dom.isHTMLElement(e)&&_(`${g}__area_crop`)(e),this.editor)),this.resizeHandler=v(this.editor,_(`${g}__resizer`)),this.cropHandler=v(this.editor,_(`${g}__croper`)),this._dialog=this.j.dlg({buttons:["fullsize","dialog.close"]}),this._dialog.setContent(this.editor),this._dialog.setSize(this.o.width,this.o.height),this._dialog.setHeader([this.buttons.reset,this.buttons.save,this.buttons.saveas]),this.setHandlers()}}function C(e,t,i,o,n,s){return this.getInstance("ImageEditor",this.o).open(e,(e,r,a,l)=>{if("saved"===r.action){a(),n&&n(r.newPath);return}(0,d.call)("resize"===r.action?this.dataProvider.resize:this.dataProvider.crop,i,o,t,e,r.box).then(e=>{e&&(a(),n&&n("string"==typeof e?e:void 0))}).catch(e=>{l(e),s&&s(e)})})}(0,o._)(S,"calcValueByPercent",(e,t)=>{let i,o=t.toString(),n=parseFloat(e.toString());return(i=/^[-+]?[0-9]+(px)?$/.exec(o))?parseInt(o,10):(i=/^([-+]?[0-9.]+)%$/.exec(o))?Math.round(n*(parseFloat(i[1])/100)):n||0}),(0,n.__decorate)([r.autobind],S.prototype,"hide",null),(0,n.__decorate)([r.autobind],S.prototype,"open",null),(0,n.__decorate)([r.autobind],S.prototype,"onTitleModeClick",null),(0,n.__decorate)([(0,r.debounce)(),r.autobind],S.prototype,"onChangeSizeInput",null),(0,n.__decorate)([r.autobind],S.prototype,"onResizeHandleMouseDown",null),(0,n.__decorate)([r.autobind],S.prototype,"onGlobalMouseUp",null),(0,n.__decorate)([(0,r.throttle)(10)],S.prototype,"onGlobalMouseMove",null),S=(0,n.__decorate)([r.component],S)},8908:function(e,t,i){"use strict";var o=i(4099);let n="jodit-image-editor",s=o.Icon.get.bind(o.Icon),r=(e,t="jodti-image-editor_active")=>e?t:"";i.d(t,["form",0,(e,t)=>{let i=e.i18n.bind(e),o=(e,t,o=!0)=>`<div class="jodit-form__group">
57
+ </a>`},ajax:{...a.Config.prototype.defaultAjaxOptions,url:"",data:{},cache:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",method:"POST",processData:!0,headers:{},prepareData:e=>e,process:e=>e},create:{data:{action:"folderCreate"}},getLocalFileByUrl:{data:{action:"getLocalFileByUrl"}},resize:{data:{action:"imageResize"}},crop:{data:{action:"imageCrop"}},fileMove:{data:{action:"fileMove"}},folderMove:{data:{action:"folderMove"}},fileRename:{data:{action:"fileRename"}},folderRename:{data:{action:"folderRename"}},fileRemove:{data:{action:"fileRemove"}},folderRemove:{data:{action:"folderRemove"}},items:{data:{action:"files"}},folder:{data:{action:"folders"}},permissions:{data:{action:"permissions"}}},a.Config.prototype.controls.filebrowser={upload:{icon:"plus",tooltip:"Upload file",isInput:!0,isDisabled:e=>!e.dataProvider.canI("FileUpload"),getContent(e,t){let i=new r.UIFileInput(e,{tooltip:t.control.tooltip,onlyImages:e.state.onlyImages});return e.e.fire("bindUploader.filebrowser",i.container),i.container}},remove:{icon:"bin",tooltip:"Remove file",isDisabled:e=>!e.state.activeElements.length||!e.dataProvider.canI("FileRemove"),exec(e){e.e.fire("fileRemove.filebrowser")}},update:{tooltip:"Update file list",exec(e){e.e.fire("update.filebrowser")}},select:{tooltip:"Select file",icon:"check",isDisabled:e=>!e.state.activeElements.length,exec(e){e.e.fire("select.filebrowser")}},edit:{tooltip:"Edit image",icon:"pencil",isDisabled(e){let t=e.state.activeElements;return 1!==t.length||!t[0].isImage||!(e.dataProvider.canI("ImageCrop")||e.dataProvider.canI("ImageResize"))},exec(e){e.e.fire("edit.filebrowser")}},tiles:{tooltip:"Tiles view",icon:"th",isActive:e=>"tiles"===e.state.view,exec(e){e.e.fire("view.filebrowser","tiles")}},list:{tooltip:"List view",icon:"th-list",isActive:e=>"list"===e.state.view,exec(e){e.e.fire("view.filebrowser","list")}},filter:{isInput:!0,getContent(e,t){let i=o.Dom.first(t.container,e=>o.Dom.isHTMLElement(e)&&e.classList.contains("jodit-input"));if(i)return i;let n=e.c.element("input",{class:"jodit-input",placeholder:e.i18n("Filter")});return n.value=e.state.filterWord,e.e.on(n,"keydown mousedown",e.async.debounce(()=>{e.e.fire("filter.filebrowser",n.value)},e.defaultTimeout)),n}},sort:{isInput:!0,getContent(e){let t=e.c.fromHTML(`<select class="jodit-input jodit-select"><option value="changed-asc">${e.i18n("Sort by changed")} (↑)</option><option value="changed-desc">${e.i18n("Sort by changed")} (↓)</option><option value="name-asc">${e.i18n("Sort by name")} (↑)</option><option value="name-desc">${e.i18n("Sort by name")} (↓)</option><option value="size-asc">${e.i18n("Sort by size")} (↑)</option><option value="size-desc">${e.i18n("Sort by size")} (↓)</option></select>`);return t.value=e.state.sortBy,e.e.on("sort.filebrowser",e=>{t.value!==e&&(t.value=e)}).on(t,"change",()=>{e.e.fire("sort.filebrowser",t.value)}),t}}}},17780:function(e,t,i){"use strict";i.d(t,{default:function(){return v}});var o=i(25045),n=i(31635),s=i(81937),r=i(49574),a=i(17312),l=i(91565),c=i(62101),u=i(96340),h=i(77483),d=i(33201),f=i(52144),p=i(17338),m=i(58664);let g=new Set(["allowFiles","allowFileMove","allowFileUpload","allowFileUploadRemote","allowFileRemove","allowFileRename","allowFolders","allowFolderMove","allowFolderCreate","allowFolderRemove","allowFolderRename","allowImageResize","allowImageCrop"]);function _(e,t,i){let o=e=>{throw Error(`File browser: the connector answer for action "${t}" (option "filebrowser.${i}") ${e}. See https://xdsoft.net/jodit/docs/modules/file_browser.html`)};if(!(0,c.isPlainObject)(e)||!(0,c.isPlainObject)(e.data))return o('has no "data" object');let{sources:n}=e.data;return(0,a.isArray)(n)?(n.forEach((e,t)=>{if(!(0,c.isPlainObject)(e))return o(`has a non-object entry at "data.sources[${t}]"`);(0,a.isArray)(e.files)||(e.files=[]),(0,a.isArray)(e.folders)||(e.folders=[])}),e):o(void 0===n?'has no "data.sources" array':'must contain "data.sources" as an array of sources, got '+((0,c.isPlainObject)(n)?"an object keyed by source name":typeof n))}class v{get o(){return this.options}get(e){let t=this.__ajaxInstances;if(t.has(e)){let i=t.get(e);i?.abort(),t.delete(e)}let i=(0,h.ConfigProto)(void 0!==this.options[e]?this.options[e]:{},(0,h.ConfigProto)({onProgress:this.progressHandler},this.o.ajax));i.prepareData&&(i.data=i.prepareData.call(this,i.data));let o=new p.Ajax(i);t.set(e,o);let n=o.send();return n.finally(()=>{o.destruct(),t.delete(e),this.progressHandler(100)}).catch(()=>null),n.then(e=>e.json()).then(e=>{if(e&&!this.isSuccess(e))throw Error(this.getMessage(e));return e})}onProgress(e){this.progressHandler=e}async permissions(e,t){return this.o.permissions&&(this.o.permissions.data.path=e,this.o.permissions.data.source=t,this.o.permissions.url)?this.get("permissions").then(e=>{if(this.parent.isInDestruct)throw(0,d.abort)();let t=this.o.permissions.process;if(t||(t=this.o.ajax.process),t){let i=t.call(self,e);i?.data?.permissions&&(this.parent.events.fire(this,"changePermissions",this.__currentPermissions,i.data.permissions),this.__currentPermissions=i.data.permissions)}return this.__currentPermissions}):null}canI(e){let t="allow"+e;if(!s.IS_PROD&&!g.has(t))throw(0,d.error)("Wrong action "+e);let i=this.o.permissionsPresets[t];return void 0!==i?i:null==this.__currentPermissions||void 0===this.__currentPermissions[t]||this.__currentPermissions[t]}__items(e,t,i,o){let n=this.options;return n.items?(n.items.data.path=e,n.items.data.source=t,n.items.data.mods=i,this.get("items").then(e=>{let t=this.o.items.process;return t||(t=this.o.ajax.process),t&&(e=t.call(self,e)),o(_(e,"files","items"))})):Promise.reject(Error("Set Items api options"))}items(e,t,i={}){return this.__items(e,t,i,e=>this.__generateItemsList(e.data.sources,i))}itemsEx(e,t,i={}){return this.__items(e,t,i,e=>({items:this.__generateItemsList(e.data.sources,i),loadedTotal:e.data.sources.reduce((e,t)=>e+t.files.length,0)}))}__generateItemsList(e,t={}){let i=[],o=e=>!t.filterWord?.length||void 0===this.o.filter||this.o.filter(e,t.filterWord);return e.forEach(e=>{if(e.files&&e.files.length){let{sort:n}=this.o;(0,l.isFunction)(n)&&t.sortBy&&e.files.sort((e,i)=>n(e,i,t.sortBy)),e.files.forEach(n=>{o(n)&&("folder"===n.type||!t.onlyImages||void 0===n.isImage||n.isImage)&&i.push(m.FileBrowserItem.create({...n,sourceName:e.name,source:e}))})}}),i}async tree(e,t){return(e=(0,u.normalizeRelativePath)(e),this.o.folder)?(await this.permissions(e,t),this.o.folder.data.path=e,this.o.folder.data.source=t,this.get("folder").then(e=>{let t=this.o.folder.process;return t||(t=this.o.ajax.process),t&&(e=t.call(self,e)),_(e,"folders","folder").data.sources})):Promise.reject(Error("Set Folder Api options"))}getPathByUrl(e){return(0,f.set)("options.getLocalFileByUrl.data.url",e,this),this.get("getLocalFileByUrl").then(e=>{if(this.isSuccess(e))return e.data;throw(0,d.error)(this.getMessage(e))})}createFolder(e,t,i){let{create:o}=this.o;if(!o)throw(0,d.error)("Set Create api options");return o.data.source=i,o.data.path=t,o.data.name=e,this.get("create").then(e=>{if(this.isSuccess(e))return!0;throw(0,d.error)(this.getMessage(e))})}move(e,t,i,o){let n=o?"fileMove":"folderMove",s=this.options[n];if(!s)throw(0,d.error)("Set Move api options");return s.data.from=e,s.data.path=t,s.data.source=i,this.get(n).then(e=>{if(this.isSuccess(e))return!0;throw(0,d.error)(this.getMessage(e))})}__remove(e,t,i,o){let n=this.o[e];if(!n)throw(0,d.error)(`Set "${e}" api options`);return n.data.path=t,n.data.name=i,n.data.source=o,this.get(e).then(e=>(n.process&&(e=n.process.call(this,e)),this.getMessage(e)))}fileRemove(e,t,i){return this.__remove("fileRemove",e,t,i)}folderRemove(e,t,i){return this.__remove("folderRemove",e,t,i)}__rename(e,t,i,o,n){let s=this.o[e];if(!s)throw(0,d.error)(`Set "${e}" api options`);return s.data.path=t,s.data.name=i,s.data.newname=o,s.data.source=n,this.get(e).then(e=>(s.process&&(e=s.process.call(self,e)),this.getMessage(e)))}folderRename(e,t,i,o){return this.__rename("folderRename",e,t,i,o)}fileRename(e,t,i,o){return this.__rename("fileRename",e,t,i,o)}__changeImage(e,t,i,o,n,s){this.o[e]||(this.o[e]={data:{}});let r=this.o[e];return void 0===r.data&&(r.data={action:e}),r.data.newname=n||o,s&&(r.data.box=s),r.data.path=t,r.data.name=o,r.data.source=i,this.get(e).then(e=>e.data.newPath||!0)}crop(e,t,i,o,n){return this.__changeImage("crop",e,t,i,o,n)}resize(e,t,i,o,n){return this.__changeImage("resize",e,t,i,o,n)}getMessage(e){return this.options.getMessage(e)}isSuccess(e){return this.options.isSuccess(e)}destruct(){this.__ajaxInstances.forEach(e=>e.destruct()),this.__ajaxInstances.clear()}constructor(e,t){(0,o._)(this,"parent",void 0),(0,o._)(this,"options",void 0),(0,o._)(this,"__currentPermissions",void 0),(0,o._)(this,"__ajaxInstances",void 0),(0,o._)(this,"progressHandler",void 0),this.parent=e,this.options=t,this.__currentPermissions=null,this.__ajaxInstances=new Map,this.progressHandler=e=>{}}}(0,n.__decorate)([r.autobind],v.prototype,"onProgress",null),(0,n.__decorate)([r.autobind],v.prototype,"permissions",null),(0,n.__decorate)([r.autobind],v.prototype,"canI",null),(0,n.__decorate)([r.autobind],v.prototype,"items",null),(0,n.__decorate)([r.autobind],v.prototype,"itemsEx",null),(0,n.__decorate)([r.autobind],v.prototype,"tree",null),(0,n.__decorate)([r.autobind],v.prototype,"getPathByUrl",null),(0,n.__decorate)([r.autobind],v.prototype,"createFolder",null),(0,n.__decorate)([r.autobind],v.prototype,"move",null),(0,n.__decorate)([r.autobind],v.prototype,"fileRemove",null),(0,n.__decorate)([r.autobind],v.prototype,"folderRemove",null),(0,n.__decorate)([r.autobind],v.prototype,"folderRename",null),(0,n.__decorate)([r.autobind],v.prototype,"fileRename",null),(0,n.__decorate)([r.autobind],v.prototype,"crop",null),(0,n.__decorate)([r.autobind],v.prototype,"resize",null),(0,n.__decorate)([r.autobind],v.prototype,"getMessage",null),(0,n.__decorate)([r.autobind],v.prototype,"isSuccess",null),(0,n.__decorate)([r.autobind],v.prototype,"destruct",null),i.d(t,["DEFAULT_SOURCE_NAME",0,"default"])},18272:function(e,t,i){"use strict";i.d(t,{makeContextMenu:function(){return r},makeDataProvider:function(){return s}});var o=i(67399),n=i(17780);function s(e,t){return new n.default(e,t)}function r(e){return new o.ContextMenu(e)}},1305:function(e,t,i){"use strict";function o(e,t,i){return e.dataProvider.fileRemove(e.state.currentPath,t,i).then(i=>{e.status(i||e.i18n('File "%s" was deleted',t),!0)}).catch(e.status)}i.d(t,{deleteFile:function(){return o}})},1488:function(e,t,i){"use strict";function o(e){return e.files.setMod("active",!0),e.files.setMod("loading",!0),e.dataProvider.items(e.state.currentPath,e.state.currentSource,{sortBy:e.state.sortBy,onlyImages:e.state.onlyImages,filterWord:e.state.filterWord}).then(t=>{t&&(e.state.elements=t,e.state.activeElements=[])}).catch(e.status).finally(()=>e.files.setMod("loading",!1))}i.d(t,{loadItems:function(){return o}})},53202:function(e,t,i){"use strict";i.d(t,{loadTree:function(){return s}});var o=i(27795),n=i(1488);async function s(e){e.tree.setMod("active",!0),o.Dom.detach(e.tree.container);let t=(0,n.loadItems)(e);return e.o.showFoldersPanel?(e.tree.setMod("loading",!0),Promise.all([e.dataProvider.tree(e.state.currentPath,e.state.currentSource).then(t=>{e.state.sources=t}).catch(e.status).finally(()=>e.tree.setMod("loading",!1)),t])):(e.tree.setMod("active",!1),t)}},62623:function(e,t,i){"use strict";i.d(t,{FileBrowser:function(){return D}});var o=i(25045),n=i(31635),s=i(16964),r=i(81937),a=i(84839),l=i(68616),c=i(23211),u=i(1496),h=i(65946),d=i(80991),f=i(25222),p=i(80512),m=i(2222),g=i(5266);i(68502);var _=i(1488),v=i(53202),b=i(34269),y=i(36664),w=i(74833),S=i(17780),C=i(18272),E=i(63425);class D extends m.ViewWithToolbar{className(){return"FileBrowser"}get dataProvider(){return(0,C.makeDataProvider)(this,this.options)}onSelect(e){return()=>{if(this.state.activeElements.length){let t=[],i=[];this.state.activeElements.forEach(e=>{let o=e.fileURL;o&&(t.push(o),i.push(e.isImage||!1))}),this.close(),(0,h.isFunction)(e)&&e({baseurl:"",files:t,isImages:i}),this.close()}return!1}}get _dialog(){let e=this.dlg({minWidth:Math.min(700,screen.width),minHeight:300,buttons:this.o.headerButtons??["fullsize","dialog.close"]});return["beforeClose","afterClose","beforeOpen"].forEach(t=>e.events.on(e,t,()=>this.e.fire(t))),e.setSize(this.o.width,this.o.height),e}get storage(){return f.Storage.makeStorage(!!this.o.saveStateInStorage,this.componentName)}get isOpened(){return this._dialog.isOpened&&"none"!==(0,d.cssInline)(this.browser,"display")}status(e,t){!e||(0,h.isAbortError)(e)||((0,h.isString)(e)||(e=e.message),(0,h.isString)(e)&&(0,h.trim)(e).length&&this.message.message(e,t?"success":"error",this.o.howLongShowMsg))}open(e=this.o.defaultCallback,t=!1){return this.state.onlyImages=t,this.async.promise((t,i)=>{if(!this.o.items||!this.o.items.url)throw(0,h.error)("Need set options.filebrowser.ajax.url");let o=0;this.e.off(this.files.container,"dblclick").on(this.files.container,"dblclick",this.onSelect(e)).on(this.files.container,"touchstart",()=>{let t=new Date().getTime();t-o<r.EMULATE_DBLCLICK_TIMEOUT&&this.onSelect(e)(),o=t}).off("select.filebrowser").on("select.filebrowser",this.onSelect(e));let n=this.c.div();this.toolbar?.appendTo(n),this.__updateToolbarButtons(),this._dialog.open(this.browser,n),this.e.fire("sort.filebrowser",this.state.sortBy),(0,v.loadTree)(this).then(t,i).finally(()=>{this.isInDestruct||this?.e?.fire("fileBrowserReady.filebrowser")})}).catch(e=>{if(!(0,h.isAbortError)(e)&&!r.IS_PROD)throw e})}__getButtons(){return(this.o.buttons??[]).filter(e=>{if(!(0,h.isString)(e))return!0;switch(e){case"filebrowser.upload":return this.dataProvider.canI("FileUpload");case"filebrowser.edit":return this.dataProvider.canI("ImageResize")||this.dataProvider.canI("ImageCrop");case"filebrowser.remove":return this.dataProvider.canI("FileRemove")}return!0})}initUploader(e){let t=this,i=e?.options?.uploader,o=(0,h.ConfigProto)(i||{},g.Config.defaultOptions.uploader),n=()=>(0,_.loadItems)(this);t.uploader=t.getInstance("Uploader",o),t.uploader.setPath(t.state.currentPath).setSource(t.state.currentSource).bind(t.browser,n,t.errorHandler),this.state.on(["change.currentPath","change.currentSource"],()=>{this.uploader.setPath(this.state.currentPath).setSource(this.state.currentSource)}),t.e.on("bindUploader.filebrowser",e=>{t.uploader.bind(e,n,t.errorHandler)})}destruct(){!this.isInDestruct&&((0,a.cached)(this,"_dialog")?.destruct(),super.destruct(),this.events&&this.e.off(".filebrowser"),this.uploader&&this.uploader.destruct())}__updateToolbarButtons(){let e=this.__getButtons();!function(e,t){if(e.length!==t.length)return!1;for(let i=0;i<e.length;i++)if(e[i]!==t[i])return!1;return!0}(this.__prevButtons,e)&&(this.__prevButtons=e,this.toolbar?.build(e))}constructor(e){super(e),(0,o._)(this,"browser",this.c.div(this.componentName)),(0,o._)(this,"status_line",this.c.div(this.getFullElName("status"))),(0,o._)(this,"tree",new E.FileBrowserTree(this)),(0,o._)(this,"files",new E.FileBrowserFiles(this)),(0,o._)(this,"state",(0,u.observable)({currentPath:"",currentSource:S.DEFAULT_SOURCE_NAME,currentBaseUrl:"",activeElements:[],elements:[],sources:[],view:"tiles",sortBy:"changed-desc",filterWord:"",onlyImages:!1})),(0,o._)(this,"errorHandler",e=>{(0,h.isAbortError)(e)||(e instanceof Error?this.status(this.i18n(e.message)):this.status(this.dataProvider.getMessage(e)))}),(0,o._)(this,"uploader",void 0),(0,o._)(this,"close",()=>{this._dialog.close()}),(0,o._)(this,"__prevButtons",[]),this.attachEvents(e),this.options=(0,h.ConfigProto)(e||{},g.Config.defaultOptions.filebrowser),this.browser.component=this,this.container=this.browser,this.o.showFoldersPanel&&c.Dom.append(this.browser,this.tree.container),c.Dom.append(this.browser,this.files.container),c.Dom.append(this.browser,this.status_line),y.selfListeners.call(this),b.nativeListeners.call(this),w.stateListeners.call(this),["getLocalFileByUrl","crop","resize","create","fileMove","folderMove","fileRename","folderRename","fileRemove","folderRemove","folder","items","permissions"].forEach(e=>{null!=this.options[e]&&(this.options[e]=(0,h.ConfigProto)(this.options[e],this.o.ajax))});let{storeView:t,storeSortBy:i,storeLastOpenedFolder:n}=this.o.saveStateInStorage||{storeLastOpenedFolder:!1,storeView:!1,storeSortBy:!1},r=t&&this.storage.get("view");r&&null==this.o.view?this.state.view="list"===r?"list":"tiles":this.state.view="list"===this.o.view?"list":"tiles",this.files.setMod("view",this.state.view);let a=i&&this.storage.get("sortBy");if(a){let e=a.split("-");this.state.sortBy=["changed","name","size"].includes(e[0])?a:"changed-desc"}else this.state.sortBy=this.o.sortBy||"changed-desc";if(n){let e=this.storage.get("currentPath"),t=this.storage.get("currentSource");this.state.currentPath=e??"",this.state.currentSource=t??""}this.initUploader(this),this.setStatus(s.STATUSES.ready)}}(0,n.__decorate)([a.cache],D.prototype,"dataProvider",null),(0,n.__decorate)([a.cache],D.prototype,"_dialog",null),(0,n.__decorate)([a.cache],D.prototype,"storage",null),(0,n.__decorate)([a.autobind],D.prototype,"status",null),(0,n.__decorate)([a.autobind],D.prototype,"open",null),(0,n.__decorate)([(0,l.watch)("dataProvider:changePermissions")],D.prototype,"__updateToolbarButtons",null),D=(0,n.__decorate)([(0,a.derive)(p.Dlgs)],D)},17610:function(e,t,i){"use strict";i.d(t,{FileBrowser:function(){return o.FileBrowser}});var o=i(62623)},34269:function(e,t,i){"use strict";i.d(t,{nativeListeners:function(){return c}});var o=i(7909),n=i(77213),s=i(61334),r=i(31125),a=i(66206),l=i(53202);function c(){let e=!1,t=(0,r.elementsMap)(this),i=this;i.e.on(i.tree.container,"dragstart",t=>{let o=(0,a.getItem)(t.target,i.container);o&&i.o.moveFolder&&(e=o)}).on(i.tree.container,"drop",t=>{if((i.o.moveFile||i.o.moveFolder)&&e){let n=(0,o.attr)(e,"-path")||"";if(!i.o.moveFolder&&e.classList.contains(this.tree.getFullElName("item"))||e.classList.contains(this.files.getFullElName("item"))&&(n+=(0,o.attr)(e,"-name"),!i.o.moveFile))return!1;let s=(0,a.getItem)(t.target,i.container);s&&(i.dataProvider.move(n,(0,o.attr)(s,"-path")||"",(0,o.attr)(s,"-source")||"",e.classList.contains(this.files.getFullElName("item"))).then(()=>(0,l.loadTree)(this)).catch(i.status),e=!1)}}).on(i.files.container,"contextmenu",(0,s.default)(i)).on(i.files.container,"click",e=>{(0,n.ctrlKey)(e)||(this.state.activeElements=[])}).on(i.files.container,"click",e=>{let o=(0,a.getItem)(e.target,i.container);if(!o)return;let s=(0,a.elementToItem)(o,t);if(s)return(0,n.ctrlKey)(e)?i.state.activeElements=[...i.state.activeElements,s]:i.state.activeElements=[s],e.stopPropagation(),!1}).on(i.files.container,"dragstart",t=>{if(i.o.moveFile){let o=(0,a.getItem)(t.target,i.container);o&&(e=o)}}).on(i.container,"drop",e=>e.preventDefault())}},36664:function(e,t,i){"use strict";i.d(t,{selfListeners:function(){return u}});var o=i(65946),n=i(28686),s=i(17780),r=i(1305),a=i(1488),l=i(53202),c=i(43271);function u(){let e=this.state,t=this.dataProvider,i=this;i.e.on("view.filebrowser",t=>{t!==e.view&&(e.view=t)}).on("sort.filebrowser",t=>{t!==e.sortBy&&(e.sortBy=t,(0,a.loadItems)(i))}).on("filter.filebrowser",t=>{t!==e.filterWord&&(e.filterWord=t,(0,a.loadItems)(i))}).on("openFolder.filebrowser",e=>{let t;t=".."===e.name?e.path.split("/").filter(e=>e.length).slice(0,-1).join("/"):(0,o.normalizePath)(e.path,e.name),i.state.currentPath=t,i.state.currentSource="."===e.name?s.DEFAULT_SOURCE_NAME:e.source}).on("removeFolder.filebrowser",e=>{i.confirm("Are you sure?","Delete",o=>{o&&t.folderRemove(e.path,e.name,e.source).then(e=>(i.status(e,!0),(0,l.loadTree)(i))).catch(i.status)})}).on("renameFolder.filebrowser",e=>{i.prompt("Enter new name","Rename",o=>{if(!(0,n.isValidName)(o))return i.status(i.i18n("Enter new name")),!1;t.folderRename(e.path,e.name,o,e.source).then(e=>(i.state.activeElements=[],i.status(e,!0),(0,l.loadTree)(i))).catch(i.status)},"type name",e.name)}).on("addFolder.filebrowser",e=>{i.prompt("Enter Directory name","Create directory",o=>{t.createFolder(o,e.path,e.source).then(()=>(0,l.loadTree)(i)).catch(i.status)},"type dir name")}).on("fileRemove.filebrowser",()=>{i.state.activeElements.length&&i.confirm("Are you sure?","",e=>{if(e){let e=[];i.state.activeElements.forEach(t=>{e.push((0,r.deleteFile)(i,t.file||t.name||"",t.sourceName))}),i.state.activeElements=[],Promise.all(e).then(()=>(0,l.loadTree)(i).catch(i.status),i.status)}})}).on("edit.filebrowser",()=>{if(1===i.state.activeElements.length){let[e]=this.state.activeElements;c.openImageEditor.call(i,e.fileURL,e.file||"",e.path,e.sourceName)}}).on("fileRename.filebrowser",(e,o,s)=>{1===i.state.activeElements.length&&i.prompt("Enter new name","Rename",r=>{if(!(0,n.isValidName)(r))return i.status(i.i18n("Enter new name")),!1;t.fileRename(o,e,r,s).then(e=>{i.state.activeElements=[],i.status(e,!0),(0,a.loadItems)(i)}).catch(i.status)},"type name",e)}).on("update.filebrowser",()=>{(0,l.loadTree)(this).then(this.status,this.status)})}},74833:function(e,t,i){"use strict";i.d(t,{stateListeners:function(){return l}});var o=i(27795),n=i(97022),s=i(53681),r=i(31125),a=i(53202);function l(){let e=(0,r.elementsMap)(this),{state:t,files:i,create:l,options:c}=this,u=t=>{let i=t.uniqueHashKey;if(e[i])return e[i].elm;let o=l.fromHTML(c.getThumbTemplate.call(this,t,t.source,t.sourceName.toString()));return o.dataset.key=i,e[i]={item:t,elm:o},e[i].elm};t.on(["change.currentPath","change.currentSource"],this.async.debounce(()=>{this.o.saveStateInStorage&&this.o.saveStateInStorage.storeLastOpenedFolder&&this.storage.set("currentPath",this.state.currentPath).set("currentSource",this.state.currentSource),(0,a.loadTree)(this).catch(this.status)},this.defaultTimeout)).on("beforeChange.activeElements",()=>{t.activeElements.forEach(t=>{let{elm:o}=e[t.uniqueHashKey];o&&o.classList.remove(i.getFullElName("item","active",!0))})}).on("change.activeElements",()=>{this.e.fire("changeSelection"),t.activeElements.forEach(t=>{let{elm:o}=e[t.uniqueHashKey];o&&o.classList.add(i.getFullElName("item","active",!0))})}).on("change.view",()=>{i.setMod("view",t.view),this.o.saveStateInStorage&&this.o.saveStateInStorage.storeView&&this.storage.set("view",t.view)}).on("change.sortBy",()=>{this.o.saveStateInStorage&&this.o.saveStateInStorage.storeSortBy&&this.storage.set("sortBy",t.sortBy)}).on("change.elements",this.async.debounce(()=>{o.Dom.detach(i.container),t.elements.length?t.elements.forEach(e=>{o.Dom.append(this.files.container,u(e))}):o.Dom.append(i.container,l.div(this.componentName+"_no-files_true",this.i18n("There are no files")))},this.defaultTimeout)).on("change.sources",this.async.debounce(()=>{o.Dom.detach(this.tree.container),t.sources.forEach(e=>{let t=e.name;if(t&&"default"!==t&&o.Dom.append(this.tree.container,l.div(this.tree.getFullElName("source-title"),t)),e.folders.forEach(i=>{let r=l.a(this.tree.getFullElName("item"),{draggable:"draggable",href:"#","data-path":(0,n.normalizePath)(e.path,i+"/"),"data-name":i,"data-source":t,"data-source-path":e.path},l.span(this.tree.getFullElName("item-title"),i)),a=o=>s=>{this.e.fire(`${o}.filebrowser`,{name:i,path:(0,n.normalizePath)(e.path+"/"),source:t}),s.stopPropagation(),s.preventDefault()};if(this.e.on(r,"click",a("openFolder")),o.Dom.append(this.tree.container,r),".."!==i&&"."!==i){if(c.renameFolder&&this.dataProvider.canI("FolderRename")){let e=(0,s.Button)(this,{icon:{name:"pencil"},name:"rename",tooltip:"Rename",size:"tiny"});e.onAction(a("renameFolder")),o.Dom.append(r,e.container)}if(c.deleteFolder&&this.dataProvider.canI("FolderRemove")){let e=(0,s.Button)(this,{icon:{name:"cancel"},name:"remove",tooltip:"Delete",size:"tiny"});e.onAction(a("removeFolder")),o.Dom.append(r,e.container)}}}),c.createNewFolder&&this.dataProvider.canI("FolderCreate")){let i=(0,s.Button)(this,"plus","Add folder","secondary");i.onAction(()=>{this.e.fire("addFolder",{path:(0,n.normalizePath)(e.path+"/"),source:t})}),this.tree.append(i)}})},this.defaultTimeout))}},86122:function(e,t,i){"use strict";i.d(t,{FileBrowserFiles:function(){return n}});var o=i(4099);class n extends o.UIGroup{className(){return"FileBrowserFiles"}}},63425:function(e,t,i){"use strict";i.d(t,{FileBrowserFiles:function(){return o.FileBrowserFiles},FileBrowserTree:function(){return n.FileBrowserTree}});var o=i(86122),n=i(55376)},55376:function(e,t,i){"use strict";i.d(t,{FileBrowserTree:function(){return n}});var o=i(4099);class n extends o.UIGroup{className(){return"FileBrowserTree"}}},8838:function(e,t,i){"use strict";i.d(t,{Command:function(){return n}});var o=i(25045);class n{undo(){this.history.snapshot.restore(this.oldValue)}redo(){this.history.snapshot.restore(this.newValue)}constructor(e,t,i,n){(0,o._)(this,"oldValue",void 0),(0,o._)(this,"newValue",void 0),(0,o._)(this,"history",void 0),(0,o._)(this,"tick",void 0),this.oldValue=e,this.newValue=t,this.history=i,this.tick=n}}},53855:function(e,t,i){"use strict";i.d(t,{History:function(){return h}});var o=i(25045),n=i(31635),s=i(59609),r=i(55184),a=i(5266),l=i(8838),c=i(46363),u=i(33511);a.Config.prototype.history={enable:!0,maxHistoryLength:1/0,timeout:1e3};class h extends s.ViewComponent{className(){return"History"}redo(){this.__stack.redo()&&(this.startValue=this.snapshot.make(),this.fireChangeStack())}canRedo(){return this.__stack.canRedo()}undo(){this.__stack.undo()&&(this.startValue=this.snapshot.make(),this.fireChangeStack())}canUndo(){return this.__stack.canUndo()}clear(){this.startValue=this.snapshot.make(),this.__stack.clear(),this.fireChangeStack()}get length(){return this.__stack.length}get startValue(){return this.__startValue}set startValue(e){this.__startValue=e}__upTick(){this.updateTick+=1}onChange(){this.__processChanges()}__processChanges(){!this.snapshot.isBlocked&&this.j.o.history.enable&&this.updateStack()}updateStack(e=!1){let t=this.snapshot.make();if(!c.Snapshot.equal(t,this.startValue)){let i=new l.Command(this.startValue,t,this,this.updateTick);if(e){let e=this.__stack.current();e&&this.updateTick===e.tick&&this.__stack.replace(i)}else this.__stack.push(i);this.startValue=t,this.fireChangeStack()}}fireChangeStack(){this.j&&!this.j.isInDestruct&&this.j.events?.fire("changeStack")}destruct(){this.isInDestruct||(this.j.events&&this.j.e.off(".history"),this.snapshot.destruct(),super.destruct())}constructor(e,t=new u.Stack(e.o.history.maxHistoryLength),i=new c.Snapshot(e)){super(e),(0,o._)(this,"__startValue",void 0),(0,o._)(this,"__stack",void 0),(0,o._)(this,"snapshot",void 0),(0,o._)(this,"updateTick",0),this.__stack=t,this.snapshot=i,e.o.history.enable&&e.e.on("afterAddPlace.history",()=>{this.isInDestruct||(this.startValue=this.snapshot.make(),e.events.on("internalChange internalUpdate",()=>{this.startValue=this.snapshot.make()}).on(e.editor,["changeSelection","selectionstart","selectionchange","mousedown","mouseup","keydown","keyup"].map(e=>e+".history").join(" "),()=>{this.startValue.html===this.j.getNativeEditorValue()&&(this.startValue=this.snapshot.make())}).on(this,"change.history",this.onChange))})}}(0,n.__decorate)([(0,r.debounce)()],h.prototype,"onChange",null)},46363:function(e,t,i){"use strict";i.d(t,{Snapshot:function(){return a}});var o=i(25045),n=i(16964),s=i(81937),r=i(23211);class a extends n.ViewComponent{className(){return"Snapshot"}static equal(e,t){return e.html===t.html&&JSON.stringify(e.range)===JSON.stringify(t.range)&&JSON.stringify(e.ranges)===JSON.stringify(t.ranges)&&!!e.backward==!!t.backward}static countNodesBeforeInParent(e){if(!e.parentNode)return 0;let t=e.parentNode.childNodes,i=0,o=null;for(let n=0;n<t.length;n+=1){if(!o||this.isIgnoredNode(t[n])||r.Dom.isText(o)&&r.Dom.isText(t[n])||(i+=1),t[n]===e)return i;o=t[n]}return 0}static strokeOffset(e,t){for(;r.Dom.isText(e);)e=e.previousSibling,r.Dom.isText(e)&&e.nodeValue&&(t+=e.nodeValue.length);return t}calcHierarchyLadder(e){let t=[];if(!e||!e.parentNode||!r.Dom.isOrContains(this.j.editor,e))return[];for(;e&&e!==this.j.editor;)e&&!a.isIgnoredNode(e)&&t.push(a.countNodesBeforeInParent(e)),e=e.parentNode;return t.reverse()}getElementByLadder(e){let t=this.j.editor,i;for(i=0;t&&i<e.length;i+=1)t=t.childNodes[e[i]];return t}get isBlocked(){return this.__isBlocked}__block(e){this.__isBlocked=e}transaction(e){this.__block(!0),this.__levelOfTransaction+=1;try{e()}catch(e){if(!s.IS_PROD)throw e}finally{this.__levelOfTransaction-=1,0===this.__levelOfTransaction&&this.__block(!1)}}make(){let e={html:"",range:{startContainer:[],startOffset:0,endContainer:[],endOffset:0}};e.html=this.__getCleanedEditorValue(this.j.editor);let t=this.j.s.sel;if(t&&t.rangeCount){let i=[];for(let e=0;e<t.rangeCount;e+=1){let o=t.getRangeAt(e),n=this.calcHierarchyLadder(o.startContainer),s=this.calcHierarchyLadder(o.endContainer),r=a.strokeOffset(o.startContainer,o.startOffset),l=a.strokeOffset(o.endContainer,o.endOffset);n.length||o.startContainer===this.j.editor||(r=0),s.length||o.endContainer===this.j.editor||(l=0),i.push({startContainer:n,startOffset:r,endContainer:s,endOffset:l})}e.range=i[0],i.length>1?e.ranges=i:t.isCollapsed||t.anchorNode!==t.getRangeAt(0).endContainer||t.anchorOffset!==t.getRangeAt(0).endOffset||(e.backward=!0)}return e}restore(e){this.transaction(()=>{let t=this.storeScrollState();this.__getCleanedEditorValue(this.j.editor)!==e.html&&(this.j.value=e.html),this.restoreOnlySelection(e),this.restoreScrollState(t)})}storeScrollState(){return[this.j.ow.scrollY,this.j.editor.scrollTop]}restoreScrollState(e){let{j:t}=this,{ow:i}=t;i.scrollTo(i.scrollX,e[0]),t.editor.scrollTop=e[1]}restoreOnlySelection(e){try{if(e.range){let t=(e.ranges??[e.range]).map(e=>{let t=this.j.ed.createRange();return t.setStart(this.getElementByLadder(e.startContainer),e.startOffset),t.setEnd(this.getElementByLadder(e.endContainer),e.endOffset),t});this.j.s.selectRange(t[0]);let i=this.j.s.sel;if(t.slice(1).forEach(e=>i?.addRange(e)),e.backward&&1===t.length){let e=t[0];i?.setBaseAndExtent(e.endContainer,e.endOffset,e.startContainer,e.startOffset)}}}catch(e){this.j.editor.lastChild&&this.j.s.setCursorAfter(this.j.editor.lastChild),s.IS_PROD}}destruct(){this.__block(!1),super.destruct()}static isIgnoredNode(e){return r.Dom.isText(e)&&!e.nodeValue||r.Dom.isTemporary(e)}__getCleanedEditorValue(e){let t=e.cloneNode(!0);return r.Dom.temporaryList(t).forEach(r.Dom.unwrap),t.innerHTML}constructor(...e){super(...e),(0,o._)(this,"__isBlocked",!1),(0,o._)(this,"__levelOfTransaction",0)}}},33511:function(e,t,i){"use strict";i.d(t,{Stack:function(){return n}});var o=i(25045);class n{get length(){return this.commands.length}clearRedo(){this.commands.length=this.stackPosition+1}clear(){this.commands.length=0,this.stackPosition=-1}push(e){this.clearRedo(),this.commands.push(e),this.stackPosition+=1,this.commands.length>this.size&&(this.commands.shift(),this.stackPosition-=1)}replace(e){this.commands[this.stackPosition]=e}current(){return this.commands[this.stackPosition]}undo(){return!!this.canUndo()&&(this.commands[this.stackPosition]&&this.commands[this.stackPosition].undo(),this.stackPosition-=1,!0)}redo(){return!!this.canRedo()&&(this.stackPosition+=1,this.commands[this.stackPosition]&&this.commands[this.stackPosition].redo(),!0)}canUndo(){return this.stackPosition>=0}canRedo(){return this.stackPosition<this.commands.length-1}constructor(e){(0,o._)(this,"size",void 0),(0,o._)(this,"commands",void 0),(0,o._)(this,"stackPosition",void 0),this.size=e,this.commands=[],this.stackPosition=-1}}},54500:function(e,t,i){"use strict";var o=i(29434),n=i(5266),s=i(928),r=i.n(s),a=i(31230),l=i.n(a);n.Config.prototype.imageeditor={min_width:20,min_height:20,closeAfterSave:!1,width:"85%",height:"85%",crop:!0,resize:!0,resizeUseRatio:!0,resizeMinWidth:20,resizeMinHeight:20,cropUseRatio:!0,cropDefaultWidth:"70%",cropDefaultHeight:"70%"},o.Icon.set("crop",r()).set("resize",l())},43271:function(e,t,i){"use strict";i.d(t,{ImageEditor:function(){return S},openImageEditor:function(){return C}});var o=i(25045),n=i(31635),s=i(16964),r=i(84839),a=i(27795),l=i(4040),c=i(7909),u=i(80991),h=i(28723),d=i(71125),f=i(59400),p=i(5266);i(54500);var m=i(8908);let g="jodit-image-editor",_=e=>t=>t.classList.contains(e);function v(e,t){return a.Dom.first(e,e=>a.Dom.isHTMLElement(e)&&t(e))}function b(e,t){let i=[];return a.Dom.each(e,e=>{a.Dom.isHTMLElement(e)&&t(e)&&i.push(e)}),i}let y="resize",w="crop";class S extends s.ViewComponent{className(){return"ImageEditor"}get o(){return this.options}hide(){this._dialog.close()}open(e,t){return this.j.async.promise(i=>{let o=new Date().getTime();this.image=this.j.c.element("img");let n=e=>a.Dom.isTag(e,"img")||_("jodit-icon_loader")(e);b(this.resize_box,n).forEach(a.Dom.safeRemove),b(this.crop_box,n).forEach(a.Dom.safeRemove),(0,u.css)(this.cropHandler,"background","transparent"),this.onSave=t,a.Dom.append(this.resize_box,this.j.c.element("i",{class:"jodit-icon_loader"})),a.Dom.append(this.crop_box,this.j.c.element("i",{class:"jodit-icon_loader"})),/\?/.test(e)?e+="&_tst="+o:e+="?_tst="+o,(0,c.attr)(this.image,"src",e),this._dialog.open();let{widthInput:s,heightInput:r}=(0,h.refs)(this.editor),l=()=>{this.isDestructed||(this.image.removeEventListener("load",l),this.naturalWidth=this.image.naturalWidth,this.naturalHeight=this.image.naturalHeight,s.value=this.naturalWidth.toString(),r.value=this.naturalHeight.toString(),this.ratio=this.naturalWidth/this.naturalHeight,a.Dom.append(this.resize_box,this.image),this.cropImage=this.image.cloneNode(!0),a.Dom.append(this.crop_box,this.cropImage),a.Dom.safeRemove.apply(null,b(this.editor,_("jodit-icon_loader"))),this.activeTab===w&&this.showCrop(),this.j.e.fire(this.resizeHandler,"updatesize"),this.j.e.fire(this.cropHandler,"updatesize"),this._dialog.setPosition(),this.j.e.fire("afterImageEditor"),i(this._dialog))};this.image.addEventListener("load",l),this.image.complete&&l()})}onTitleModeClick(e){let t=this,i=e.target,o=i?.parentElement;if(!o)return;b(t.editor,e=>_(`${g}__slider`)(e)||_(`${g}__area`)(e)).forEach(e=>e.classList.remove(`${g}_active`)),o.classList.add(`${g}_active`),this.activeTab=(0,c.attr)(o,"-area")||y;let n=v(t.editor,e=>_(`${g}__area`)(e)&&_(`${g}__area_`+t.activeTab)(e));n&&n.classList.add(`${g}_active`),t.activeTab===w&&t.showCrop()}onChangeSizeInput(e){let t,i=e.target,{widthInput:o,heightInput:n}=(0,h.refs)(this.editor),s="widthInput"===(0,c.attr)(i,"data-ref"),r=parseInt(i.value,10),a=s?this.o.min_width:this.o.min_height,l=s?this.o.min_height:this.o.min_width;r>a&&((0,u.css)(this.image,s?"width":"height",r),this.resizeUseRatio&&(t=s?Math.round(r/this.ratio):Math.round(r*this.ratio))>l&&((0,u.css)(this.image,s?"height":"width",t),s?n.value=t.toString():o.value=t.toString())),this.j.e.fire(this.resizeHandler,"updatesize")}onResizeHandleMouseDown(e){this.target=e.target,e.preventDefault(),e.stopImmediatePropagation(),this.clicked=!0,this.start_x=e.clientX,this.start_y=e.clientY,this.activeTab===w?(this.top_x=(0,u.css)(this.cropHandler,"left"),this.top_y=(0,u.css)(this.cropHandler,"top"),this.width=this.cropHandler.offsetWidth,this.height=this.cropHandler.offsetHeight):(this.width=this.image.offsetWidth,this.height=this.image.offsetHeight),this.j.e.on(this.j.ow,"mousemove",this.onGlobalMouseMove).one(this.j.ow,"mouseup",this.onGlobalMouseUp)}onGlobalMouseUp(e){this.clicked&&(this.clicked=!1,e.stopImmediatePropagation(),this.j.e.off(this.j.ow,"mousemove",this.onGlobalMouseMove))}onGlobalMouseMove(e){if(!this.clicked)return;let{widthInput:t,heightInput:i}=(0,h.refs)(this.editor);this.diff_x=e.clientX-this.start_x,this.diff_y=e.clientY-this.start_y,this.activeTab===y&&this.resizeUseRatio||this.activeTab===w&&this.cropUseRatio?this.diff_x?(this.new_w=this.width+this.diff_x,this.new_h=Math.round(this.new_w/this.ratio)):(this.new_h=this.height+this.diff_y,this.new_w=Math.round(this.new_h*this.ratio)):(this.new_w=this.width+this.diff_x,this.new_h=this.height+this.diff_y),this.activeTab===y?(this.new_w>this.o.resizeMinWidth&&((0,u.css)(this.image,"width",this.new_w+"px"),t.value=this.new_w.toString()),this.new_h>this.o.resizeMinHeight&&((0,u.css)(this.image,"height",this.new_h+"px"),i.value=this.new_h.toString()),this.j.e.fire(this.resizeHandler,"updatesize")):(this.target!==this.cropHandler?(this.top_x+this.new_w>this.cropImage.offsetWidth&&(this.new_w=this.cropImage.offsetWidth-this.top_x),this.top_y+this.new_h>this.cropImage.offsetHeight&&(this.new_h=this.cropImage.offsetHeight-this.top_y),(0,u.css)(this.cropHandler,{width:this.new_w,height:this.new_h})):(this.top_x+this.diff_x+this.cropHandler.offsetWidth>this.cropImage.offsetWidth&&(this.diff_x=this.cropImage.offsetWidth-this.top_x-this.cropHandler.offsetWidth),(0,u.css)(this.cropHandler,"left",this.top_x+this.diff_x),this.top_y+this.diff_y+this.cropHandler.offsetHeight>this.cropImage.offsetHeight&&(this.diff_y=this.cropImage.offsetHeight-this.top_y-this.cropHandler.offsetHeight),(0,u.css)(this.cropHandler,"top",this.top_y+this.diff_y)),this.j.e.fire(this.cropHandler,"updatesize"))}destruct(){this.isDestructed||(this._dialog&&!this._dialog.isInDestruct&&this._dialog.destruct(),a.Dom.safeRemove(this.editor),this.j.e&&this.j.e.off(this.j.ow,"mousemove",this.onGlobalMouseMove).off(this.j.ow,"mouseup",this.onGlobalMouseUp).off(this.ow,"."+g).off("."+g),super.destruct())}constructor(e){super(e),(0,o._)(this,"options",void 0),(0,o._)(this,"onSave",void 0),(0,o._)(this,"resizeUseRatio",!0),(0,o._)(this,"cropUseRatio",!0),(0,o._)(this,"_dialog",void 0),(0,o._)(this,"image",void 0),(0,o._)(this,"cropImage",void 0),(0,o._)(this,"clicked",!1),(0,o._)(this,"target",void 0),(0,o._)(this,"start_x",0),(0,o._)(this,"start_y",0),(0,o._)(this,"top_x",0),(0,o._)(this,"top_y",0),(0,o._)(this,"width",0),(0,o._)(this,"height",0),(0,o._)(this,"activeTab",y),(0,o._)(this,"naturalWidth",0),(0,o._)(this,"naturalHeight",0),(0,o._)(this,"ratio",0),(0,o._)(this,"new_h",0),(0,o._)(this,"new_w",0),(0,o._)(this,"diff_x",0),(0,o._)(this,"diff_y",0),(0,o._)(this,"buttons",void 0),(0,o._)(this,"editor",void 0),(0,o._)(this,"resize_box",void 0),(0,o._)(this,"crop_box",void 0),(0,o._)(this,"sizes",void 0),(0,o._)(this,"resizeHandler",void 0),(0,o._)(this,"cropHandler",void 0),(0,o._)(this,"cropBox",{x:0,y:0,w:0,h:0}),(0,o._)(this,"resizeBox",{w:0,h:0}),(0,o._)(this,"calcCropBox",()=>{let e,t,i=this.crop_box.parentNode,o=.8*i.offsetWidth,n=.8*i.offsetHeight,{naturalWidth:s,naturalHeight:r}=this;o>s&&n>r?(e=s,t=r):this.ratio>o/n?(e=o,t=o/s*r):(e=n/r*s,t=n),(0,u.css)(this.crop_box,{width:e,height:t})}),(0,o._)(this,"showCrop",()=>{if(!this.cropImage)return;this.calcCropBox();let e=this.cropImage.offsetWidth||this.image.offsetWidth||this.image.naturalWidth;this.new_w=S.calcValueByPercent(e,this.o.cropDefaultWidth);let t=this.cropImage.offsetHeight||this.image.offsetHeight||this.image.naturalHeight;this.cropUseRatio?this.new_h=this.new_w/this.ratio:this.new_h=S.calcValueByPercent(t,this.o.cropDefaultHeight),(0,u.css)(this.cropHandler,{backgroundImage:"url("+(0,c.attr)(this.cropImage,"src")+")",width:this.new_w,height:this.new_h,left:e/2-this.new_w/2,top:t/2-this.new_h/2}),this.j.e.fire(this.cropHandler,"updatesize")}),(0,o._)(this,"updateCropBox",()=>{if(!this.cropImage)return;let e=this.cropImage.offsetWidth/this.naturalWidth,t=this.cropImage.offsetHeight/this.naturalHeight;this.cropBox.x=(0,u.css)(this.cropHandler,"left")/e,this.cropBox.y=(0,u.css)(this.cropHandler,"top")/t,this.cropBox.w=this.cropHandler.offsetWidth/e,this.cropBox.h=this.cropHandler.offsetHeight/t,this.sizes.textContent=this.cropBox.w.toFixed(0)+"x"+this.cropBox.h.toFixed(0)}),(0,o._)(this,"updateResizeBox",()=>{this.resizeBox.w=this.image.offsetWidth||this.naturalWidth,this.resizeBox.h=this.image.offsetHeight||this.naturalHeight}),(0,o._)(this,"setHandlers",()=>{let e=this,{widthInput:t,heightInput:i}=(0,h.refs)(this.editor);e.j.e.on([v(e.editor,_("jodit_bottomright")),e.cropHandler],"mousedown."+g,this.onResizeHandleMouseDown).on(this.j.ow,"resize."+g,()=>{this.j.e.fire(e.resizeHandler,"updatesize"),e.showCrop(),this.j.e.fire(e.cropHandler,"updatesize")}),e.j.e.on(b(this.editor,_(`${g}__slider-title`)),"click",this.onTitleModeClick).on([t,i],"input",this.onChangeSizeInput);let{keepAspectRatioResize:o,keepAspectRatioCrop:n}=(0,h.refs)(this.editor);o&&o.addEventListener("change",()=>{this.resizeUseRatio=o.checked}),n&&n.addEventListener("change",()=>{this.cropUseRatio=n.checked}),e.j.e.on(e.resizeHandler,"updatesize",()=>{(0,u.css)(e.resizeHandler,{top:0,left:0,width:e.image.offsetWidth||e.naturalWidth,height:e.image.offsetHeight||e.naturalHeight}),this.updateResizeBox()}).on(e.cropHandler,"updatesize",()=>{if(!e.cropImage)return;let t=(0,u.css)(e.cropHandler,"left"),i=(0,u.css)(e.cropHandler,"top"),o=e.cropHandler.offsetWidth,n=e.cropHandler.offsetHeight;t<0&&(t=0),i<0&&(i=0),t+o>e.cropImage.offsetWidth&&(o=e.cropImage.offsetWidth-t,e.cropUseRatio&&(n=o/e.ratio)),i+n>e.cropImage.offsetHeight&&(n=e.cropImage.offsetHeight-i,e.cropUseRatio&&(o=n*e.ratio)),(0,u.css)(e.cropHandler,{width:o,height:n,left:t,top:i,backgroundPosition:-t-1+"px "+(-i-1)+"px",backgroundSize:e.cropImage.offsetWidth+"px "+e.cropImage.offsetHeight+"px"}),e.updateCropBox()}),Object.values(e.buttons).forEach(o=>{o.onAction(()=>{let n={action:e.activeTab,box:e.activeTab===y?e.resizeBox:e.cropBox};switch(o){case e.buttons.saveas:e.j.prompt("Enter new name","Save in new file",t=>{if(!(0,l.trim)(t))return e.j.alert("The name should not be empty"),!1;e.j.e.fire("afterImageEditorSave",n,t),e.onSave(t,n,e.hide,t=>{e.j.alert(t.message)})});break;case e.buttons.save:e.j.e.fire("afterImageEditorSave",n),e.onSave(void 0,n,e.hide,t=>{e.j.alert(t.message)});break;case e.buttons.reset:e.activeTab===y?((0,u.css)(e.image,{width:null,height:null}),t.value=e.naturalWidth.toString(),i.value=e.naturalHeight.toString(),e.j.e.fire(e.resizeHandler,"updatesize")):e.showCrop()}})})}),this.options=e&&e.o&&e.o.imageeditor?e.o.imageeditor:p.Config.defaultOptions.imageeditor;let t=this.options;this.resizeUseRatio=t.resizeUseRatio,this.cropUseRatio=t.cropUseRatio,this.buttons={reset:(0,f.Button)(this.j,"update","Reset"),save:(0,f.Button)(this.j,"save","Save"),saveas:(0,f.Button)(this.j,{icon:{name:"save"},name:"save-as",text:"Save as ..."})},this.activeTab=t.resize?y:w,this.editor=(0,m.form)(this.j,this.options);let{resizeBox:i,cropBox:n}=(0,h.refs)(this.editor);this.resize_box=i,this.crop_box=n,this.sizes=v(this.editor,e=>_(`${g}__sizes`)(e)&&!!a.Dom.closest(e,e=>a.Dom.isHTMLElement(e)&&_(`${g}__area_crop`)(e),this.editor)),this.resizeHandler=v(this.editor,_(`${g}__resizer`)),this.cropHandler=v(this.editor,_(`${g}__croper`)),this._dialog=this.j.dlg({buttons:["fullsize","dialog.close"]}),this._dialog.setContent(this.editor),this._dialog.setSize(this.o.width,this.o.height),this._dialog.setHeader([this.buttons.reset,this.buttons.save,this.buttons.saveas]),this.setHandlers()}}function C(e,t,i,o,n,s){return this.getInstance("ImageEditor",this.o).open(e,(e,r,a,l)=>{if("saved"===r.action){a(),n&&n(r.newPath);return}(0,d.call)("resize"===r.action?this.dataProvider.resize:this.dataProvider.crop,i,o,t,e,r.box).then(e=>{e&&(a(),n&&n("string"==typeof e?e:void 0))}).catch(e=>{l(e),s&&s(e)})})}(0,o._)(S,"calcValueByPercent",(e,t)=>{let i,o=t.toString(),n=parseFloat(e.toString());return(i=/^[-+]?[0-9]+(px)?$/.exec(o))?parseInt(o,10):(i=/^([-+]?[0-9.]+)%$/.exec(o))?Math.round(n*(parseFloat(i[1])/100)):n||0}),(0,n.__decorate)([r.autobind],S.prototype,"hide",null),(0,n.__decorate)([r.autobind],S.prototype,"open",null),(0,n.__decorate)([r.autobind],S.prototype,"onTitleModeClick",null),(0,n.__decorate)([(0,r.debounce)(),r.autobind],S.prototype,"onChangeSizeInput",null),(0,n.__decorate)([r.autobind],S.prototype,"onResizeHandleMouseDown",null),(0,n.__decorate)([r.autobind],S.prototype,"onGlobalMouseUp",null),(0,n.__decorate)([(0,r.throttle)(10)],S.prototype,"onGlobalMouseMove",null),S=(0,n.__decorate)([r.component],S)},8908:function(e,t,i){"use strict";var o=i(4099);let n="jodit-image-editor",s=o.Icon.get.bind(o.Icon),r=(e,t="jodti-image-editor_active")=>e?t:"";i.d(t,["form",0,(e,t)=>{let i=e.i18n.bind(e),o=(e,t,o=!0)=>`<div class="jodit-form__group">
58
58
  <label class="jodit-switcher-wrapper">
59
59
  <span class='jodit-switcher'>
60
60
  <input ${r(o,"checked")} data-ref="${t}" type="checkbox"/>
@@ -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 r.Alert},Async:function(){return l.Async},AsyncStorage:function(){return x.AsyncStorage},Button:function(){return f.Button},CommitStyle:function(){return T.CommitStyle},Component:function(){return o.Component},Confirm:function(){return r.Confirm},ContextMenu:function(){return s.ContextMenu},Create:function(){return c.Create},Dialog:function(){return r.Dialog},Dom:function(){return u.Dom},EventEmitter:function(){return h.EventEmitter},EventHandlersStore:function(){return h.EventHandlersStore},Eventify:function(){return h.Eventify},FileBrowser:function(){return a.FileBrowser},Helpers:function(){return n},History:function(){return _.History},Icon:function(){return f.Icon},ImageEditor:function(){return b.ImageEditor},IndexedDBProvider:function(){return x.IndexedDBProvider},LazyWalker:function(){return u.LazyWalker},LocalStorageProvider:function(){return x.LocalStorageProvider},MemoryStorageProvider:function(){return x.MemoryStorageProvider},Plugin:function(){return d.Plugin},PluginSystem:function(){return k.PluginSystem},Popup:function(){return f.Popup},ProgressBar:function(){return f.ProgressBar},Prompt:function(){return r.Prompt},Response:function(){return p.Response},STATUSES:function(){return o.STATUSES},Selection:function(){return T.Selection},Snapshot:function(){return v.Snapshot},StatusBar:function(){return w.StatusBar},Storage:function(){return x.Storage},StorageKey:function(){return x.StorageKey},Table:function(){return S.Table},ToolbarButton:function(){return C.ToolbarButton},ToolbarCollection:function(){return E.ToolbarCollection},ToolbarContent:function(){return C.ToolbarContent},ToolbarEditorCollection:function(){return D.ToolbarEditorCollection},ToolbarSelect:function(){return C.ToolbarSelect},UIBlock:function(){return f.UIBlock},UIButton:function(){return f.UIButton},UIButtonGroup:function(){return f.UIButtonGroup},UIButtonState:function(){return f.UIButtonState},UICheckbox:function(){return f.UICheckbox},UIElement:function(){return f.UIElement},UIFileInput:function(){return f.UIFileInput},UIForm:function(){return f.UIForm},UIGroup:function(){return f.UIGroup},UIInput:function(){return f.UIInput},UIList:function(){return f.UIList},UIMessages:function(){return y.UIMessages},UISelect:function(){return f.UISelect},UISeparator:function(){return f.UISeparator},UISpacer:function(){return f.UISpacer},UITextArea:function(){return f.UITextArea},UITooltip:function(){return f.UITooltip},Uploader:function(){return I.Uploader},View:function(){return m.View},ViewComponent:function(){return o.ViewComponent},ViewWithToolbar:function(){return g.ViewWithToolbar},canUseIndexedDB:function(){return x.canUseIndexedDB},canUsePersistentStorage:function(){return x.canUsePersistentStorage},clearUseIndexedDBCache:function(){return x.clearUseIndexedDBCache},defaultNameSpace:function(){return h.defaultNameSpace},observable:function(){return h.observable}});var o=i(16964),n=i(65946),s=i(67399),r=i(37333),a=i(17610),l=i(91231),c=i(79821),u=i(27795),h=i(1496),d=i(91206),p=i(73714),f=i(4099),m=i(35099),g=i(2222),_=i(53855),v=i(46363),b=i(43271),y=i(10081),w=i(29433),S=i(98803),C=i(39709),E=i(42573),D=i(6209),I=i(94925),k=i(85305),T=i(59841),x=i(25222)},61466:function(e,t,i){"use strict";i.d(t,{UIMessage:function(){return r}});var o=i(31635),n=i(91672),s=i(4099);class r extends s.UIElement{className(){return"UIMessage"}constructor(e,t){super(e),this.setMod("active",!0),this.setMod("variant",t.variant),this.container.textContent=t.text}}r=(0,o.__decorate)([n.component],r)},10081:function(e,t,i){"use strict";i.d(t,{UIMessages:function(){return u}});var o=i(25045),n=i(31635),s=i(91672),r=i(23211),a=i(80991),l=i(63468),c=i(61466);class u 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 o=e+":"+t;if(this.__messages.has(o))return void this.async.updateTimeout(o,i||this.options.defaultTimeout);if(!this.__box)throw Error("Container is not defined: "+o);r.Dom.append(this.__box,this.container);let n=new c.UIMessage(this.j,{text:e,variant:t});this.append(n),this.__calcOffsets(),this.__messages.add(o);let s=this.__getRemoveCallback(n,o);this.j.e.on(n.container,"pointerdown",s),this.async.setTimeout(s,{label:o,timeout:i||this.options.defaultTimeout})}__getRemoveCallback(e,t){let i=o=>{o&&o.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,o._)(this,"__box",void 0),(0,o._)(this,"options",void 0),(0,o._)(this,"__messages",void 0),this.__box=t,this.options=i,this.__messages=new Set}}u=(0,n.__decorate)([s.component],u)},29433:function(e,t,i){"use strict";i.d(t,{StatusBar:function(){return u}});var o=i(25045),n=i(31635),s=i(16964),r=i(84839),a=i(23211),l=i(23183),c=i(81987);class u extends s.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(s.STATUSES.beforeDestruct),a.Dom.safeRemove(this.container),super.destruct())}constructor(e,t){super(e),(0,o._)(this,"target",void 0),(0,o._)(this,"container",void 0),(0,o._)(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()}}u=(0,n.__decorate)([r.component,(0,r.derive)(c.Mods,l.Elms)],u)},98803:function(e,t,i){"use strict";i.d(t,{Table:function(){return p}});var o=i(25045),n=i(31635),s=i(16964),r=i(81937),a=i(84839),l=i(27795),c=i(28077),u=i(65946),h=i(80991);let d=new WeakMap;class p extends s.ViewComponent{className(){return"Table"}__recalculateStyles(){let e=(0,c.getContainer)(this.j,p,"style",!0),t=[];this.selected.forEach(e=>{let i=(0,u.cssPath)(e);i&&t.push(i)}),e.innerHTML=t.length?t.join(",")+`{${this.jodit.options.table.selectionCellStyle}}`:""}addSelection(e){this.selected.add(e),this.__recalculateStyles();let t=l.Dom.closest(e,"table",this.j.editor);if(t){let i=p.__selectedByTable.get(t)||new Set;i.add(e),p.__selectedByTable.set(t,i)}}removeSelection(e){this.selected.delete(e),this.__recalculateStyles();let t=l.Dom.closest(e,"table",this.j.editor);if(t){let i=p.__selectedByTable.get(t);i&&(i.delete(e),i.size||p.__selectedByTable.delete(t))}}getAllSelectedCells(){return(0,u.toArray)(this.selected)}static __getSelectedCellsByTable(e){let t=p.__selectedByTable.get(e);return t?(0,u.toArray)(t):[]}destruct(){return this.selected.clear(),super.destruct()}static __getRowsCount(e){return e.rows.length}getRowsCount(e){return p.__getRowsCount(e)}static __getColumnsCount(e){return p.__formalMatrix(e).reduce((e,t)=>Math.max(e,t.length),0)}getColumnsCount(e){return p.__getColumnsCount(e)}static __formalMatrix(e,t){let i=[[]],o=(0,u.toArray)(e.rows),n=(e,o)=>{void 0===i[o]&&(i[o]=[]);let n=e.colSpan,s=e.rowSpan,r,a,l=0;for(;i[o][l];)l+=1;for(a=0;s>a;a+=1)for(r=0;r<n;r+=1){if(void 0===i[o+a]&&(i[o+a]=[]),t&&!1===t(e,o+a,l+r,n,s))return!1;i[o+a][l+r]=e}};for(let e=0;e<o.length;e+=1){let t=(0,u.toArray)(o[e].cells);for(let o=0;o<t.length;o+=1)if(!1===n(t[o],e))return i}return i}formalMatrix(e,t){return p.__formalMatrix(e,t)}static __formalCoordinate(e,t,i=!1){let o=0,n=0,s=1,r=1;return p.__formalMatrix(e,(e,a,l,c,u)=>{if(t===e)return o=a,n=l,s=c||1,r=u||1,i&&(n+=(c||1)-1,o+=(u||1)-1),!1}),[o,n,s,r]}formalCoordinate(e,t,i=!1){return p.__formalCoordinate(e,t,i)}static __appendRow(e,t,i,o){let n;if(t)n=t.cloneNode(!0),l.Dom.each(t,e=>{if(!l.Dom.isCell(e))return;let t=(0,u.attr)(e,"rowspan");if(t&&parseInt(t,10)>1){let i=parseInt(t,10)-1;(0,u.attr)(e,"rowspan",i>1?i:null)}}),l.Dom.each(n,e=>{l.Dom.isCell(e)&&l.Dom.detach(e)});else{let t=p.__getColumnsCount(e);n=o.element("tr");for(let e=0;e<t;e+=1)l.Dom.append(n,o.element("td"))}i&&t&&t.nextSibling?l.Dom.after(t,n):!i&&t?l.Dom.before(t,n):l.Dom.append(l.Dom.first(e,e=>l.Dom.isTag(e,"tbody"))||e,n)}appendRow(e,t,i){return p.__appendRow(e,t,i,this.j.createInside)}static __removeRow(e,t){let i,o=p.__formalMatrix(e),n=e.rows[t];o[t].forEach((s,r)=>{if(i=!1,t-1>=0&&o[t-1][r]===s)i=!0;else if(o[t+1]&&o[t+1][r]===s){if(s.parentNode===n&&s.parentNode.nextSibling){i=!0;let n=r+1;for(;o[t+1][n]===s;)n+=1;let a=l.Dom.next(s.parentNode,e=>l.Dom.isTag(e,"tr"),e);if(a){let e=null;for(let i=n;i<o[t+1].length;i+=1){let n=o[t+1][i];if(n&&n.parentNode===a){e=n;break}}e?l.Dom.before(e,s):l.Dom.append(a,s)}}}else l.Dom.safeRemove(s);if(i&&(s.parentNode===n||s!==o[t][r-1])){let e=s.rowSpan;(0,u.attr)(s,"rowspan",e-1>1?e-1:null)}}),l.Dom.safeRemove(n)}removeRow(e,t){return p.__removeRow(e,t)}appendColumn(e,t,i=!0){let o=p.__formalMatrix(e);if(!i&&l.Dom.isCell(t.previousElementSibling))return this.appendColumn(e,t.previousElementSibling,!0);let[,n]=p.__formalCoordinate(e,t,i),s=i?n+1:n;for(let e=0;e<o.length;){let t=o[e];if(t[n]!==t[s]||n===s){let e=this.j.createInside.element("td");i?l.Dom.after(t[n],e):l.Dom.before(t[n],e),t[n].rowSpan>1&&(e.rowSpan=t[n].rowSpan)}else t[n].colSpan+=1;e+=t[n].rowSpan||1}}static __removeColumn(e,t){let i,o=p.__formalMatrix(e);o.forEach((e,n)=>{let s=e[t];if(i=!1,t-1>=0&&o[n][t-1]===s||t+1<e.length&&o[n][t+1]===s?i=!0:l.Dom.safeRemove(s),i&&(n-1<0||s!==o[n-1][t])){let e=s.colSpan;(0,u.attr)(s,"colspan",e-1>1?(e-1).toString():null)}})}removeColumn(e,t){return p.__removeColumn(e,t)}static __getSelectedBound(e,t){let i,o,n,s=[[1/0,1/0],[0,0]],r=p.__formalMatrix(e);for(i=0;i<r.length;i+=1)for(o=0;r[i]&&o<r[i].length;o+=1)t.includes(r[i][o])&&(s[0][0]=Math.min(i,s[0][0]),s[0][1]=Math.min(o,s[0][1]),s[1][0]=Math.max(i,s[1][0]),s[1][1]=Math.max(o,s[1][1]));for(i=s[0][0];i<=s[1][0];i+=1)for(n=1,o=s[0][1];o<=s[1][1];o+=1){for(;r[i]&&r[i][o-n]&&r[i][o]===r[i][o-n];)s[0][1]=Math.min(o-n,s[0][1]),s[1][1]=Math.max(o-n,s[1][1]),n+=1;for(n=1;r[i]&&r[i][o+n]&&r[i][o]===r[i][o+n];)s[0][1]=Math.min(o+n,s[0][1]),s[1][1]=Math.max(o+n,s[1][1]),n+=1;for(n=1;r[i-n]&&r[i][o]===r[i-n][o];)s[0][0]=Math.min(i-n,s[0][0]),s[1][0]=Math.max(i-n,s[1][0]),n+=1;for(n=1;r[i+n]&&r[i][o]===r[i+n][o];)s[0][0]=Math.min(i+n,s[0][0]),s[1][0]=Math.max(i+n,s[1][0]),n+=1}return s}getSelectedBound(e,t){return p.__getSelectedBound(e,t)}static __normalizeTable(e){let t=[],i=p.__formalMatrix(e);p.__removeExtraColspans(i,t),p.__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,u.attr)(i[e][t],"rowspan",null),i[e][t].hasAttribute("colspan")&&1===i[e][t].colSpan&&(0,u.attr)(i[e][t],"colspan",null),i[e][t].hasAttribute("class")&&!(0,u.attr)(i[e][t],"class")&&(0,u.attr)(i[e][t],"class",null));p.__unmark(t)}static __removeExtraColspans(e,t){for(let i=0;i<e[0].length;i+=1){let o=1e6,n=!1;for(let t=0;t<e.length;t+=1)if(void 0!==e[t][i]){if(e[t][i].colSpan<2){n=!0;break}o=Math.min(o,e[t][i].colSpan)}if(!n)for(let n=0;n<e.length;n+=1)void 0!==e[n][i]&&p.__mark(e[n][i],"colspan",e[n][i].colSpan-o+1,t)}}static __removeExtraRowspans(e,t){let i,o;for(i=0;i<e.length;i+=1){let n=1e6,s=!1;for(o=0;o<e[i].length;o+=1)if(void 0!==e[i][o]){if(e[i][o].rowSpan<2){s=!0;break}n=Math.min(n,e[i][o].rowSpan)}if(!s)for(o=0;o<e[i].length;o+=1)void 0!==e[i][o]&&p.__mark(e[i][o],"rowspan",e[i][o].rowSpan-n+1,t)}}normalizeTable(e){return p.__normalizeTable(e)}static __mergeSelected(e,t){let i=[],o=p.__getSelectedBound(e,p.__getSelectedCellsByTable(e)),n=0,s=null,a=0,c=0,d=0,m=new Set,g=[];o&&(o[0][0]-o[1][0]||o[0][1]-o[1][1])&&(p.__formalMatrix(e,(e,r,l,_,v)=>{r>=o[0][0]&&r<=o[1][0]&&l>=o[0][1]&&l<=o[1][1]&&(m.has(e)||(m.add(e),r===o[0][0]&&(0,h.cssInline)(e,"width")&&(n+=e.offsetWidth),""!==(0,u.trim)(e.innerHTML.replace(/<br(\/)?>/g,""))&&i.push(e.innerHTML),_>1&&(c+=_-1),v>1&&(d+=v-1),s?(p.__mark(e,"remove",1,g),f(t).removeSelection(e)):(s=e,a=l)))}),c=o[1][1]-o[0][1]+1,d=o[1][0]-o[0][0]+1,s&&(c>1&&p.__mark(s,"colspan",c,g),d>1&&p.__mark(s,"rowspan",d,g),n&&(p.__mark(s,"width",(n/e.offsetWidth*100).toFixed(r.ACCURACY)+"%",g),a&&p.__setColumnWidthByDelta(e,a,0,!0,g)),s.innerHTML=i.join("<br/>"),f(t).addSelection(s),m.delete(s),p.__unmark(g),p.__normalizeTable(e),(0,u.toArray)(e.rows).forEach(e=>{e.cells.length||l.Dom.safeRemove(e)})))}mergeSelected(e){return p.__mergeSelected(e,this.j)}static __splitHorizontal(e,t){let i,o,n,s,r,a=[];p.__getSelectedCellsByTable(e).forEach(c=>{o=t.createInside.element("td"),l.Dom.append(o,t.createInside.element("br")),n=t.createInside.element("tr"),i=p.__formalCoordinate(e,c),c.rowSpan<2?(p.__formalMatrix(e,(e,t,o)=>{i[0]===t&&i[1]!==o&&e!==c&&p.__mark(e,"rowspan",e.rowSpan+1,a)}),l.Dom.after(l.Dom.closest(c,"tr",e),n),l.Dom.append(n,o)):(p.__mark(c,"rowspan",c.rowSpan-1,a),p.__formalMatrix(e,(t,o,n)=>{o>i[0]&&o<i[0]+c.rowSpan&&i[1]>n&&t.parentNode.rowIndex===o&&(r=t),i[0]<o&&t===c&&(s=e.rows[o])}),r?l.Dom.after(r,o):l.Dom.prepend(s,o)),c.colSpan>1&&p.__mark(o,"colspan",c.colSpan,a),p.__unmark(a),f(t).removeSelection(c)}),this.__normalizeTable(e)}splitHorizontal(e){return p.__splitHorizontal(e,this.j)}static __splitVertical(e,t){let i,o,n,s=[];p.__getSelectedCellsByTable(e).forEach(a=>{i=p.__formalCoordinate(e,a),a.colSpan<2?p.__formalMatrix(e,(e,t,o)=>{i[1]===o&&i[0]!==t&&e!==a&&p.__mark(e,"colspan",e.colSpan+1,s)}):p.__mark(a,"colspan",a.colSpan-1,s),o=t.createInside.element("td"),l.Dom.append(o,t.createInside.element("br")),a.rowSpan>1&&p.__mark(o,"rowspan",a.rowSpan,s);let c=a.offsetWidth;l.Dom.after(a,o),n=c/e.offsetWidth/2,p.__mark(a,"width",(100*n).toFixed(r.ACCURACY)+"%",s),p.__mark(o,"width",(100*n).toFixed(r.ACCURACY)+"%",s),p.__unmark(s),f(t).removeSelection(a)}),p.__normalizeTable(e)}splitVertical(e){return p.__splitVertical(e,this.j)}static __setColumnWidthByDelta(e,t,i,o,n){let s=p.__formalMatrix(e),a=0;for(let o=0;o<s.length;o+=1){let l=s[o][t];if(l.colSpan>1&&s.length>1)continue;let c=(l.offsetWidth+i)/e.offsetWidth*100;p.__mark(l,"width",c.toFixed(r.ACCURACY)+"%",n),a=o;break}for(let e=a+1;e<s.length;e+=1){let i=s[e][t];p.__mark(i,"width",null,n)}o||p.__unmark(n)}setColumnWidthByDelta(e,t,i,o,n){return p.__setColumnWidthByDelta(e,t,i,o,n)}static __mark(e,t,i,o){o.push(e);let n=d.get(e)??{};n[t]=void 0===i?1:i,d.set(e,n)}static __unmark(e){e.forEach(e=>{let t=d.get(e);t&&(Object.keys(t).forEach(i=>{let o=t[i];switch(i){case"remove":l.Dom.safeRemove(e);break;case"rowspan":(0,u.attr)(e,"rowspan",(0,u.isNumber)(o)&&o>1?o:null);break;case"colspan":(0,u.attr)(e,"colspan",(0,u.isNumber)(o)&&o>1?o:null);break;case"width":null==o?(e.style.removeProperty("width"),(0,u.attr)(e,"style")||(0,u.attr)(e,"style",null)):(0,u.css)(e,"width",o.toString())}delete t[i]}),d.delete(e))})}constructor(...e){super(...e),(0,o._)(this,"selected",new Set)}}(0,o._)(p,"__selectedByTable",new WeakMap),(0,n.__decorate)([(0,a.debounce)()],p.prototype,"__recalculateStyles",null);let f=e=>e.getInstance("Table",e.o)},22533:function(e,t,i){"use strict";i.d(t,{ToolbarButton:function(){return T}});var o=i(25045),n=i(31635),s=i(69364),r=i(81937),a=i(49574),l=i(51676),c=i(91672),u=i(68616),h=i(23211),d=i(17312),p=i(91565),f=i(24497),m=i(62101),g=i(85932),_=i(86878),v=i(57821),b=i(28712),y=i(7909),w=i(71125),S=i(59400),C=i(15982),E=i(29434),D=i(51116),I=i(4274);let k=new Set(["input","textarea","select"]);class T 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,y.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 o=e.value?.(i.jodit,this);void 0!==o&&(t.value=o),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))}onChangeActivated(){(0,y.attr)(this.button,"aria-pressed",this.state.activated),super.onChangeActivated()}onChangeText(){(0,p.isFunction)(this.control.template)?this.text.innerHTML=this.control.template(this.j,this.control.name,this.j.i18n(this.state.text)):super.onChangeText(),this.setMod("text-icons",!!this.text.innerText.trim().length)}onChangeTabIndex(){(0,y.attr)(this.button,"tabindex",this.state.tabIndex),(0,y.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 o=this.j.c.fromHTML(`<span role="button" aria-haspopup="true" aria-expanded="false" class="${e}__trigger">${E.Icon.get("chevron")}</span>`);return h.Dom.append(i,o),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,y.attr)(this.trigger,"disabled",e),(0,y.attr)(this.button,"disabled",e),(0,y.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,p.isFunction)(e.tooltip)?e.tooltip(this.j,e,this):e.tooltip),t.hasTrigger=!!(e.list||e.popup&&e.exec)}__initIconFromControl(){let{control:e,state:t}=this,{textIcons:i}=this.j.o;if(!0===i||(0,p.isFunction)(i)&&i(e.name)||e.template){t.icon=(0,S.UIButtonState)().icon,t.text=e.text||e.name;return}if(!(0,g.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=E.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,y.attr)(this.trigger,"aria-expanded",!0),e.buffer={actionTrigger:this},t.list)return this.__openControlList(t);if((0,p.isFunction)(t.popup)){let e=this.openPopup();e.parentElement=this;try{if(!1!==this.j.e.fire((0,v.camelCase)(`before-${t.name}-open-popup`),this.target,t,e)){let i=this.toolbar?.getTarget(this)??this.target??null,o=t.popup(this.j,i,this.__closePopup,this);o?e.setContent((0,g.isString)(o)?this.j.c.fromHTML(o):o).open(()=>(0,_.position)(this.container),!1,this.j.o.allowTabNavigation?this.container:void 0):this.__closePopup()}}catch(e){throw this.__closePopup(),e}this.j.e.fire((0,v.camelCase)(`after-${t.name}-open-popup`),e.container)}}onTriggerKeyDown(e){this.state.disabled||(e.key===r.KEY_DOWN?this.onButtonKeyDown(e):[r.KEY_ENTER,r.KEY_SPACE," "].includes(e.key)&&(e.preventDefault(),this.trigger.click()))}onButtonKeyDown(e){e.key!==r.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,k)&&e.key!==r.KEY_ESC)return;let i=this.__popupFocusables(),o=i.indexOf(t);switch(e.key){case r.KEY_ESC:this.__closePopup();break;case r.KEY_UP:o<=0?this.__closePopup():i[o-1].focus();break;case r.KEY_DOWN:if(!i.length)return;i[(o+1)%i.length].focus();break;default:return}e.preventDefault(),e.stopPropagation()}__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,C.findControlType)(e,t),o=e.list,n=this.openPopup(),s=(0,I.makeCollection)(this.j);n.parentElement=this,s.parentElement=n,s.mode="vertical";let r=(t,o)=>{let n;if((0,g.isString)(o)&&i(o))return{name:o.toString(),...i(o)};if((0,g.isString)(t)&&i(t))return{name:t.toString(),...i(t),..."object"==typeof o?o:{}};n=t,(0,m.isPlainObject)(n)&&"title"in n&&"value"in n&&(o=t.value,t=t.title);let{childTemplate:s}=e,r={name:t.toString(),template:s&&((e,t,i)=>s(e,t,i,this)),exec:e.childExec?(t,i,o)=>e.childExec?.(t,i,{...o,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,o]};return(0,g.isString)(o)&&(r.text=o),r};s.build((0,d.isArray)(o)?o.map(r):(0,w.keys)(o,!1).map(e=>r(e,o[e])),this.target),n.setContent(s).open(()=>(0,_.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 D.Popup(this.j,!1),this.j.e.on(this.ow,"mousedown touchstart",this.onOutsideClick).on("escape closeAllPopups",this.onOutsideClick).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);let{activeElement:t}=this.od,i=t&&h.Dom.isOrContains(e.container,t);this.state.activated=!1,e.close(),e.destruct(),this.trigger&&(0,y.attr)(this.trigger,"aria-expanded",!1),i&&this.focus()}onClick(e){let{control:t}=this;if((0,p.isFunction)(t.exec)){let i=this.toolbar?.getTarget(this)??this.target??null,o=t.exec(this.j,i,{control:t,originalEvent:e,button:this});if(!1!==o&&!0!==o&&(this.j?.e?.fire("synchro"),this.parentElement&&this.parentElement.update(),this.j?.e?.fire("closeAllPopups afterExec")),!1!==o)return}return t.list?this.__openControlList(t):(0,p.isFunction)(t.popup)?this.onTriggerClick(e):void((t.command||t.name)&&((0,w.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.j.e.fire("closeAllPopups")))}destruct(){return this.__closePopup(),super.destruct()}constructor(e,t,i=null){super(e),(0,o._)(this,"control",void 0),(0,o._)(this,"target",void 0),(0,o._)(this,"state",void 0),(0,o._)(this,"trigger",void 0),(0,o._)(this,"openedPopup",void 0),this.control=t,this.target=i,this.state={...(0,S.UIButtonState)(),theme:"toolbar",currentValue:"",hasTrigger:!1},this.openedPopup=null;let n=this.getElm("button");(0,b.assert)(n,"Element button should exists"),this.button=n,Object.defineProperty(n,"component",{value:this,configurable:!0});let r=this.getElm("trigger");(0,b.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,n.__decorate)([l.cacheHTML],T.prototype,"createContainer",null),(0,n.__decorate)([(0,u.watch)("state.hasTrigger",{immediately:!1})],T.prototype,"onChangeHasTrigger",null),(0,n.__decorate)([(0,u.watch)("trigger:click")],T.prototype,"onTriggerClick",null),(0,n.__decorate)([(0,u.watch)("trigger:keydown")],T.prototype,"onTriggerKeyDown",null),(0,n.__decorate)([(0,u.watch)("button:keydown")],T.prototype,"onButtonKeyDown",null),(0,n.__decorate)([a.autobind],T.prototype,"__onPopupKeyDown",null),(0,n.__decorate)([a.autobind],T.prototype,"onOutsideClick",null),(0,n.__decorate)([a.autobind],T.prototype,"__closePopup",null),T=(0,n.__decorate)([c.component],T)},5772:function(e,t,i){"use strict";i.d(t,{ToolbarContent:function(){return u}});var o=i(25045),n=i(31635),s=i(84839),r=i(27795),a=i(65946),l=i(59400);let c=new Set(["input","button","select","textarea"]);class u 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)&&(r.Dom.detach(this.container),r.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(),r.Dom.each(this.container,e=>{r.Dom.isTag(e,c)&&(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,o._)(this,"control",void 0),(0,o._)(this,"target",void 0),this.control=t,this.target=i,this.container.classList.add(`${this.componentName}_${this.clearName(t.name)}`)}}u=(0,n.__decorate)([s.component],u)},39709:function(e,t,i){"use strict";i.d(t,{ToolbarButton:function(){return o.ToolbarButton},ToolbarContent:function(){return n.ToolbarContent},ToolbarSelect:function(){return s.ToolbarSelect}});var o=i(22533),n=i(5772),s=i(61764)},61764:function(e,t,i){"use strict";i.d(t,{ToolbarSelect:function(){return l}});var o=i(31635),n=i(84839),s=i(62101),r=i(85932),a=i(22533);class l extends a.ToolbarButton{className(){return"ToolbarSelect"}update(){super.update(),this.state.icon.name="";let{list:e,data:t}=this.control;if(e){let i=this.state.value||(t&&(0,r.isString)(t.currentValue)?t.currentValue:void 0);i||(i=Object.keys(e)[0]);let o=((0,s.isPlainObject)(e)&&e[i.toString()]||i).toString();this.state.text=this.control.textTemplate?.(this.jodit,o)??o}}}l=(0,o.__decorate)([n.component],l)},42573:function(e,t,i){"use strict";i.d(t,{ToolbarCollection:function(){return m}});var o=i(25045),n=i(31635),s=i(84839),r=i(49574),a=i(91672),l=i(29200),c=i(68616),u=i(7909),h=i(80991),d=i(38027),p=i(97959),f=i(4274);class m extends p.UIList{className(){return"ToolbarCollection"}getRole(){return"toolbar"}get firstButton(){let[e]=this.buttons;return e||null}makeButton(e,t=null){return(0,f.makeButton)(this.j,e,t)}makeSelect(e,t=null){return(0,f.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,h.css)(this.container,"direction",e),(0,u.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,d.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,o._)(this,"__listenEvents","updatePlugins updateToolbar changeStack mousedown mouseup keydown change readonly afterResize selectionchange changeSelection focus afterSetMode touchstart focus blur")}}(0,n.__decorate)([(0,c.watch)(":afterInit"),r.autobind],m.prototype,"__immediateUpdate",null),(0,n.__decorate)([(0,s.debounce)(e=>e.j.defaultTimeout,!0)],m.prototype,"update",null),(0,n.__decorate)([(0,l.hook)("ready")],m.prototype,"__initEvents",null),m=(0,n.__decorate)([a.component],m)},6209:function(e,t,i){"use strict";i.d(t,{ToolbarEditorCollection:function(){return u}});var o=i(25045),n=i(31635),s=i(81937),r=i(84839),a=i(27795),l=i(65946),c=i(42573);class u extends c.ToolbarCollection{className(){return"ToolbarEditorCollection"}shouldBeDisabled(e){let t=super.shouldBeDisabled(e);if(void 0!==t)return t;let i=void 0===e.control.mode?s.MODE_WYSIWYG:e.control.mode;return i!==s.MODE_SPLIT&&i!==this.j.getRealMode()}shouldBeActive(e){let t,i=super.shouldBeActive(e);if(void 0!==i)return i;let o=this.j.selection?this.j.s.current():null;if(!o)return!1;if(e.control.tags){let i=e.control.tags;if(t=o,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=o,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,o._)(this,"checkActiveStatus",(e,t)=>{let i=0,o=0;return Object.keys(e).forEach(n=>{let s=e[n];(0,l.isFunction)(s)?s(this.j,(0,l.css)(t,n).toString())&&(i+=1):-1!==s.indexOf((0,l.css)(t,n).toString())&&(i+=1),o+=1}),o===i}),this.prependInvisibleInput(this.container)}}u=(0,n.__decorate)([r.component],u)},4274:function(e,t,i){"use strict";i.d(t,{makeButton:function(){return a},makeCollection:function(){return r},makeSelect:function(){return l}});var o=i(91672),n=i(91565),s=i(24497);function r(e,t){let i=(0,o.getComponentClass)("ToolbarCollection"),n=(0,o.getComponentClass)("ToolbarEditorCollection"),r=(0,s.isJoditObject)(e)?new n(e):new i(e);return e.o.textIcons&&r.container.classList.add("jodit_text_icons"),t&&(r.parentElement=t),e.o.toolbarButtonSize&&(r.buttonSize=e.o.toolbarButtonSize),r}function a(e,t,i=null){if((0,n.isFunction)(t.getContent))return new((0,o.getComponentClass)("ToolbarContent"))(e,t,i);let s=new((0,o.getComponentClass)("ToolbarButton"))(e,t,i);return s.state.tabIndex=e.o.allowTabNavigation?0:-1,s}function l(e,t,i=null){return new((0,o.getComponentClass)("ToolbarSelect"))(e,t,i)}},40013:function(e,t,i){"use strict";var o=i(17312),n=i(24497),s=i(7909),r=i(5266);r.Config.prototype.enableDragAndDropFileToEditor=!0,r.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,o.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;(0,n.isJoditObject)(t)&&e.files&&e.files.length&&e.files.forEach((i,o)=>{let[n,r]=e.isImages&&e.isImages[o]?["img","src"]:["a","href"],a=t.createInside.element(n);(0,s.attr)(a,r,e.baseurl+i),"a"===n&&(a.textContent=t.o.uploader.getDisplayName.call(this,e.baseurl,i)),"img"===n?t.s.insertImage(a,null,t.o.imageDefaultWidth):t.s.insertNode(a)})},defaultHandlerError(e){this.j.message.error(e.message)},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 n}});var o=i(65946);function n(e,t){if((0,o.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,o.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 o(e){let[t,...i]=e.split(","),o=i.join(","),n=t.split(":")[1]?.split(";")[0]??"",s=/;base64/i.test(t)?atob(o):decodeURIComponent(o),r=new Uint8Array(new ArrayBuffer(s.length));for(let e=0;e<s.length;e+=1)r[e]=s.charCodeAt(e);return new Blob([r.buffer],{type:n})}i.d(t,{dataURItoBlob:function(){return o}})},11981:function(e,t,i){"use strict";i.d(t,{ajaxInstances:function(){return n.ajaxInstances},hasFiles:function(){return r},hasItems:function(){return a},processOldBrowserDrag:function(){return o.processOldBrowserDrag},send:function(){return n.send},sendFiles:function(){return s.sendFiles}}),i(89446);var o=i(95436),n=i(77911),s=i(46533);function r(e){return!!(e&&e.files&&e.files.length>0)}function a(e){return!!(e&&e.items&&e.items.length>0)}},95436:function(e,t,i){"use strict";i.d(t,{processOldBrowserDrag:function(){return c}});var o=i(81937),n=i(27795),s=i(28077),r=i(65946),a=i(23112),l=i(46533);function c(e,t,i,c,u){if(t&&(!t.types.length||t.types[0]!==o.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});n.Dom.append((0,s.getContainer)(e.j,e.constructor),t);let o=(0,r.isJoditObject)(e.j)?e.j.s.save():null;t.focus(),e.j.async.setTimeout(()=>{let s=t.firstChild;if(n.Dom.safeRemove(t),s&&s.hasAttribute("src")){let t=(0,r.attr)(s,"src")||"";o&&(0,r.isJoditObject)(e.j)&&e.j.s.restore(),(0,l.sendFiles)(e,[(0,a.dataURItoBlob)(t)],i,c).finally(u)}},e.j.defaultTimeout)}}},46533:function(e,t,i){"use strict";i.d(t,{sendFiles:function(){return s}});var o=i(65946),n=i(77911);function s(e,t,i,s,r){if(!t)return Promise.reject((0,o.error)("Need files"));let{o:a}=e,l=(0,o.toArray)(t);if(!l.length)return Promise.reject((0,o.error)("Need files"));if((0,o.isFunction)(a.beforeUpload)&&!1===a.beforeUpload.call(e,l)){let t=(0,o.error)("Upload canceled");return(s||a.defaultHandlerError).call(e,t),Promise.reject(t)}let c=[];if(a.insertImageAsBase64URI&&function(e,t,i,n,s,r){let a,l,c=[];for(l=0;l<e.length;l+=1)if((a=e[l])&&a.type){let u=a.type.match(/\/([a-z0-9]+)/i),h=u[1]?u[1].toLowerCase():"";if(!t.includes(h))continue;let d=new FileReader,p=n.j.async.promise((e,t)=>{d.onerror=t,d.onloadend=()=>{let t={baseurl:"",files:[d.result],isImages:[!0]};((0,o.isFunction)(s)?s:r).call(n,t),e(t)},d.readAsDataURL(a)});c.push(p),i.push(p),e[l]=null}c.length&&Promise.all(c).then(()=>{n.j.events&&n.j.e.fire("filesWereUploaded")}).catch(()=>{})}(l,a.imagesExtensions,c,e,i,a.defaultHandlerSuccess),(l=l.filter(e=>e)).length){let t,u=new FormData;u.append(a.pathVariableName,e.path),u.append("source",e.source);for(let i=0;i<l.length;i+=1)if(t=l[i]){let o=/\.\w+$/.test(t.name),n=t.type.match(/\/([a-z0-9]+)/i),s=n&&n[1]?n[1].toLowerCase():"",r=l[i].name||Math.random().toString().replace(".","");if(!o&&s){let e=s;["jpeg","jpg"].includes(e)&&(e="jpeg|jpg"),RegExp(".("+e+")$","i").test(r)||(r+="."+s)}let[c,h,d]=a.processFileName.call(e,a.filesVariableName(i),l[i],r);u.append(c,h,d)}r&&r(u),a.data&&(0,o.isPlainObject)(a.data)&&Object.keys(a.data).forEach(e=>{u.append(e,a.data[e])}),a.prepareData.call(e,u),c.push((0,n.send)(e,u).then(t=>(a.isSuccess.call(e,t)?((0,o.isFunction)(i)?i:a.defaultHandlerSuccess).call(e,a.process.call(e,t)):((0,o.isFunction)(s)?s:a.defaultHandlerError).call(e,(0,o.error)(a.getMessage.call(e,t))),t)).then(()=>{e.j.events&&e.j.e.fire("filesWereUploaded")}))}return Promise.all(c)}},77911:function(e,t,i){"use strict";i.d(t,{send:function(){return a}});var o=i(65946),n=i(73714),s=i(89446);let r=new WeakMap;function a(e,t){let i=(0,s.buildData)(e,t),a=t=>{e.j.progressbar.show().progress(t),t>=100&&e.j.progressbar.hide()},l=(t,i)=>{let s=new n.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,o.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=r.get(e);return a||(a=new Set,r.set(e,a)),a.add(s),e.j.e.one("beforeDestruct",s.destruct),s.send().then(e=>e.json()).catch(e=>({success:!1,data:{messages:[e]}})).finally(()=>{s.destruct(),a?.delete(s)})};return((0,o.isFunction)(e.o.customUploadFunction)&&(l=e.o.customUploadFunction),(0,o.isPromise)(i))?i.then(e=>l(e,a)).catch(t=>{e.o.error.call(e,t)}):l(i,a)}i.d(t,["ajaxInstances",0,r])},94925:function(e,t,i){"use strict";i.d(t,{Uploader:function(){return u}});var o=i(25045),n=i(16964),s=i(81937),r=i(23211),a=i(65946),l=i(5266),c=i(11981);i(40013);class u extends n.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 o=()=>{e.classList.remove("jodit_drag_hover")},n=this,r=e=>{let r,a,l,u=e.clipboardData,h=e=>{a&&(e.append("extension",l),e.append("mimetype",a.type))};if(!s.IS_IE&&(0,c.hasFiles)(u))return(0,c.sendFiles)(n,u.files,t,i).finally(o),!1;if(s.IS_IE&&!s.IS_ES_NEXT)return(0,c.processOldBrowserDrag)(n,u,t,i,o);if((0,c.hasItems)(u)){let{items:s}=u;for(r=0;r<s.length;r+=1)if("file"===s[r].kind&&"image/png"===s[r].type){if(a=s[r].getAsFile()){let e=a.type.match(/\/([a-z0-9]+)/i);l=e[1]?e[1].toLowerCase():"",(0,c.sendFiles)(n,[a],t,i,h).finally(o)}e.preventDefault();break}}};n.j&&n.j.editor!==e?n.j.e.on(e,"paste",r):n.j.e.on("beforePaste",r),this.attachEvents(e,t,i,o)}attachEvents(e,t,i,o){let n=this;n.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",s=>{e.classList.remove("jodit_drag_hover"),(0,c.hasFiles)(s.dataTransfer)&&(s.preventDefault(),s.stopImmediatePropagation(),(0,c.sendFiles)(n,s.dataTransfer.files,t,i).finally(o))});let s=r.Dom.first(e,e=>r.Dom.isTag(e,"input")&&(0,a.attr)(e,"type")?.toLowerCase()==="file");s&&n.j.e.on(s,"change",()=>{(0,c.sendFiles)(n,s.files,t,i).then(()=>{s.value="",/safari/i.test(navigator.userAgent)||(s.type="",s.type="file")}).finally(o)})}uploadRemoteImage(e,t,i){let o=this,{o:n}=o,s=(0,a.isFunction)(i)?i:n.defaultHandlerError;(0,c.send)(o,{action:"fileUploadRemote",url:e}).then(e=>{n.isSuccess.call(o,e)?((0,a.isFunction)(t)?t:n.defaultHandlerSuccess).call(o,n.process.call(o,e)):s.call(o,(0,a.error)(n.getMessage.call(o,e)))}).catch(e=>s.call(o,e))}upload(e){return this.async.promise((t,i)=>{(0,c.sendFiles)(this,e,t,i)})}destruct(){this.setStatus(n.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,o._)(this,"path",""),(0,o._)(this,"source","default"),(0,o._)(this,"options",void 0),this.options=(0,a.ConfigProto)(t||{},(0,a.ConfigProto)(l.Config.defaultOptions.uploader,(0,a.isJoditObject)(e)?e.o.uploader:{}))}}},72348:function(e,t,i){"use strict";var o=i(27795),n=i(65946),s=i(4099),r=i(54522),a=i.n(r);s.Icon.set("palette",a()),i.d(t,["ColorPickerWidget",0,(e,t,i)=>{let r="jodit-color-picker",a=(0,n.normalizeColor)(i),l=e.c.div(r),c=e.o.textIcons?`<span>${e.i18n("palette")}</span>`:s.Icon.get("palette"),u=e=>{let t=[];return(0,n.isPlainObject)(e)?Object.keys(e).forEach(i=>{t.push(`<div class="${r}__group ${r}__group-${i}">`),t.push(u(e[i])),t.push("</div>")}):(0,n.isArray)(e)&&e.forEach(e=>{t.push(`<span class='${r}__color-item ${a===e?r+"__color-item_active_true":""}' title="${e}" style="background-color:${e}" data-color="${e}"></span>`)}),t.join("")},h=(0,n.isArray)(e.o.colors)?`<div class="${r}__group">${u(e.o.colors)}</div>`:u(e.o.colors);o.Dom.append(l,e.c.fromHTML(`<div class="${r}__groups">${h}</div>`)),o.Dom.append(l,e.c.fromHTML(`<div data-ref="extra" class="${r}__extra"></div>`));let{extra:d}=(0,n.refs)(l);o.Dom.append(d,e.c.fromHTML(`<div class="${r}__hex"><input data-ref="hexInput" type="text" spellcheck="false" aria-label="HEX" placeholder="#FF0000" value="${a||""}"/></div>`));let{hexInput:p}=(0,n.refs)(l),f=null,m=()=>{let e=p.value.trim();if(e===f)return;let i=/^#?[0-9a-f]{3}(?:[0-9a-f]{3})?$/i.test(e),o=/^rgba?\([\d\s.,%]+\)$/i.test(e);if(!i&&!o)return;let s=(0,n.normalizeColor)(i&&!e.startsWith("#")?"#"+e:e);s&&(0,n.isFunction)(t)&&(f=e,t(s))};return e.e.on(p,"keydown",e=>{e.stopPropagation(),"Enter"===e.key&&(e.preventDefault(),m())}).on(p,"change",e=>{e.stopPropagation(),m()}),o.Dom.append(d,e.c.fromHTML(`<span class="${r}__remove" data-color="" title="${e.i18n("Remove")}">${e.o.textIcons?e.i18n("Remove"):s.Icon.get("eraser")}</span>`)),e.o.showBrowserColorPicker&&(0,n.hasBrowserColorPicker)()&&(o.Dom.append(d,e.c.fromHTML(`<div class="${r}__native">${c}<input type="color" value="#ffffff"/></div>`)),e.e.on(l,"change",e=>{e.stopPropagation();let i=e.target;if(!i||!i.tagName||!o.Dom.isTag(i,"input")||"color"!==i.type)return;let s=i.value||"";(0,n.isFunction)(t)&&t(s),e.preventDefault()})),e.e.on(l,"mousedown touchend",i=>{if(o.Dom.isTag(i.target,"input"))return void i.stopPropagation();i.stopPropagation(),i.preventDefault();let s=i.target;if((!s||!s.tagName||o.Dom.isTag(s,"svg")||o.Dom.isTag(s,"path"))&&s.parentNode&&(s=o.Dom.closest(s.parentNode,"span",e.editor)),!o.Dom.isTag(s,"span")||!s.classList.contains(r+"__color-item")&&!s.classList.contains(r+"__remove"))return;let a=(0,n.attr)(s,"-color")||"";t&&(0,n.isFunction)(t)&&t(a)}),e.e.fire("afterGenerateColorPicker",l,d,t,a),l}])},18762:function(e,t,i){"use strict";var o=i(23211),n=i(65946),s=i(4099),r=i(89636);let a=(e,t,{label:i,accept:o})=>{let n=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="${o}" tabindex="-1" dir="auto" multiple=""/></div>`);return e.uploader.bind(n,i=>{t.call(e,i),e.e.fire("closeAllPopups")},t=>{e.message.error(t.message),e.e.fire("closeAllPopups")}),{icon:"upload",name:"Upload",content:n}};function l(e,t,i){let s=o.Dom.first(e,e=>o.Dom.isTag(e,"input")&&(0,n.attr)(e,"name")===t);return s?(i&&(s.value=i),s.value):""}i.d(t,["FileSelectorWidget",0,(e,t,i,c,u=!0)=>{let h,d=[],p=e.o.uploader;if(t.upload&&!1!==p.showTabInFileSelector&&(p.url||p.insertImageAsBase64URI||p.customUploadFunction)){let{upload:i}=t;d.push(a(e,t=>{let o=(0,n.isFunction)(i)?i:p.defaultHandlerSuccess;(0,n.isFunction)(o)&&o.call(e,t)},u?{label:"Drop image",accept:"image/*"}:{label:"Drop file",accept:"*"}))}if(t.filebrowser&&(e.o.filebrowser.ajax.url||e.o.filebrowser.items.url)&&d.push({icon:"folder",name:"Browse",content(){c&&c(),t.filebrowser&&e.filebrowser.open(t.filebrowser,u)}}),t.url){let r=new s.UIButton(e,{type:"submit",variant:"primary",text:"Insert"}),a=new s.UIForm(e,[new s.UIInput(e,{required:!0,label:"URL",name:"url",type:"text",placeholder:"https://"}),new s.UIInput(e,{name:"text",label:"Alternative text"}),new s.UIBlock(e,[r])]);i&&!o.Dom.isText(i)&&!o.Dom.isComment(i)&&(o.Dom.isTag(i,"img")||(0,n.$$)("img",i).length)&&(h="IMG"===i.tagName?i:(0,n.$$)("img",i)[0],l(a.container,"url",(0,n.attr)(h,"src")),l(a.container,"text",(0,n.attr)(h,"alt")),r.state.text="Update"),i&&o.Dom.isTag(i,"a")&&(l(a.container,"url",(0,n.attr)(i,"href")),l(a.container,"text",(0,n.attr)(i,"title")),r.state.text="Update"),a.onSubmit(i=>{(0,n.isFunction)(t.url)&&t.url.call(e,i.url,i.text)}),d.push({icon:"link",name:"URL",content:a.container})}let f=(0,r.TabsWidget)(e,d);return f.classList.add("jodit-file-selector"),f},"UploadTab",0,a])},15753:function(e,t,i){"use strict";i.d(t,{ColorPickerWidget:function(){return o.ColorPickerWidget},FileSelectorWidget:function(){return n.FileSelectorWidget},TabsWidget:function(){return s.TabsWidget},UploadTab:function(){return n.UploadTab}});var o=i(72348),n=i(18762),s=i(89636)},89636:function(e,t,i){"use strict";var o=i(16964),n=i(23211),s=i(91565),r=i(7909),a=i(4099);i.d(t,["TabsWidget",0,(e,t,i)=>{let l=e.c.div("jodit-tabs"),c=e.c.div("jodit-tabs__wrapper"),u=e.c.div("jodit-tabs__buttons");(0,r.attr)(u,{role:"tablist","aria-orientation":"horizontal"});let h={},d=[],p="";n.Dom.append(l,u),n.Dom.append(l,c);let f=e=>{h[e]&&(d.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:l,name:m,content:g})=>{let _=e.c.div("jodit-tab");(0,r.attr)(_,{role:"tabpanel"});let v=(0,a.Button)(e,l||m,m);v.state.role="tab",e.e.on(v.container,"pointerdown",e=>e.preventDefault()),p||(p=m),n.Dom.append(u,v.container),d.push(v),v.container.classList.add("jodit-tabs__button","jodit-tabs__button_columns_"+t.length),(0,s.isFunction)(g)?_.classList.add("jodit-tab_empty"):n.Dom.append(_,o.Component.isInstanceOf(g,a.UIElement)?g.container:g),n.Dom.append(c,_),v.onAction(()=>(f(m),(0,s.isFunction)(g)&&!n.Dom.isElement(g)&&g.call(e),i&&(i.activeTab=m),!1)),h[m]={button:v,tab:_}}),f(i&&i.activeTab&&h[i.activeTab]?i.activeTab:p),i){let e=i.activeTab;Object.defineProperty(i,"activeTab",{configurable:!0,enumerable:!1,get:()=>e,set(t){e=t,f(t)}})}return l}])},94358:function(e,t,i){"use strict";var o=i(81937),n=i(28077),s=i(65946),r=i(29434),a=i(5266),l=i(17995),c=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 f.Ajax},Alert:function(){return r.Alert},Async:function(){return l.Async},AsyncStorage:function(){return x.AsyncStorage},Button:function(){return p.Button},CommitStyle:function(){return T.CommitStyle},Component:function(){return o.Component},Confirm:function(){return r.Confirm},ContextMenu:function(){return s.ContextMenu},Create:function(){return c.Create},Dialog:function(){return r.Dialog},Dom:function(){return u.Dom},EventEmitter:function(){return h.EventEmitter},EventHandlersStore:function(){return h.EventHandlersStore},Eventify:function(){return h.Eventify},FileBrowser:function(){return a.FileBrowser},Helpers:function(){return n},History:function(){return _.History},Icon:function(){return p.Icon},ImageEditor:function(){return b.ImageEditor},IndexedDBProvider:function(){return x.IndexedDBProvider},LazyWalker:function(){return u.LazyWalker},LocalStorageProvider:function(){return x.LocalStorageProvider},MemoryStorageProvider:function(){return x.MemoryStorageProvider},Plugin:function(){return d.Plugin},PluginSystem:function(){return k.PluginSystem},Popup:function(){return p.Popup},ProgressBar:function(){return p.ProgressBar},Prompt:function(){return r.Prompt},Response:function(){return f.Response},STATUSES:function(){return o.STATUSES},Selection:function(){return T.Selection},Snapshot:function(){return v.Snapshot},StatusBar:function(){return w.StatusBar},Storage:function(){return x.Storage},StorageKey:function(){return x.StorageKey},Table:function(){return S.Table},ToolbarButton:function(){return C.ToolbarButton},ToolbarCollection:function(){return E.ToolbarCollection},ToolbarContent:function(){return C.ToolbarContent},ToolbarEditorCollection:function(){return D.ToolbarEditorCollection},ToolbarSelect:function(){return C.ToolbarSelect},UIBlock:function(){return p.UIBlock},UIButton:function(){return p.UIButton},UIButtonGroup:function(){return p.UIButtonGroup},UIButtonState:function(){return p.UIButtonState},UICheckbox:function(){return p.UICheckbox},UIElement:function(){return p.UIElement},UIFileInput:function(){return p.UIFileInput},UIForm:function(){return p.UIForm},UIGroup:function(){return p.UIGroup},UIInput:function(){return p.UIInput},UIList:function(){return p.UIList},UIMessages:function(){return y.UIMessages},UISelect:function(){return p.UISelect},UISeparator:function(){return p.UISeparator},UISpacer:function(){return p.UISpacer},UITextArea:function(){return p.UITextArea},UITooltip:function(){return p.UITooltip},Uploader:function(){return I.Uploader},View:function(){return m.View},ViewComponent:function(){return o.ViewComponent},ViewWithToolbar:function(){return g.ViewWithToolbar},canUseIndexedDB:function(){return x.canUseIndexedDB},canUsePersistentStorage:function(){return x.canUsePersistentStorage},clearUseIndexedDBCache:function(){return x.clearUseIndexedDBCache},defaultNameSpace:function(){return h.defaultNameSpace},observable:function(){return h.observable}});var o=i(16964),n=i(65946),s=i(67399),r=i(37333),a=i(17610),l=i(91231),c=i(79821),u=i(27795),h=i(1496),d=i(91206),f=i(73714),p=i(4099),m=i(35099),g=i(2222),_=i(53855),v=i(46363),b=i(43271),y=i(10081),w=i(29433),S=i(98803),C=i(39709),E=i(42573),D=i(6209),I=i(94925),k=i(85305),T=i(59841),x=i(25222)},61466:function(e,t,i){"use strict";i.d(t,{UIMessage:function(){return r}});var o=i(31635),n=i(91672),s=i(4099);class r extends s.UIElement{className(){return"UIMessage"}constructor(e,t){super(e),this.setMod("active",!0),this.setMod("variant",t.variant),this.container.textContent=t.text}}r=(0,o.__decorate)([n.component],r)},10081:function(e,t,i){"use strict";i.d(t,{UIMessages:function(){return u}});var o=i(25045),n=i(31635),s=i(91672),r=i(23211),a=i(80991),l=i(63468),c=i(61466);class u 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 o=e+":"+t;if(this.__messages.has(o))return void this.async.updateTimeout(o,i||this.options.defaultTimeout);if(!this.__box)throw Error("Container is not defined: "+o);r.Dom.append(this.__box,this.container);let n=new c.UIMessage(this.j,{text:e,variant:t});this.append(n),this.__calcOffsets(),this.__messages.add(o);let s=this.__getRemoveCallback(n,o);this.j.e.on(n.container,"pointerdown",s),this.async.setTimeout(s,{label:o,timeout:i||this.options.defaultTimeout})}__getRemoveCallback(e,t){let i=o=>{o&&o.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,o._)(this,"__box",void 0),(0,o._)(this,"options",void 0),(0,o._)(this,"__messages",void 0),this.__box=t,this.options=i,this.__messages=new Set}}u=(0,n.__decorate)([s.component],u)},29433:function(e,t,i){"use strict";i.d(t,{StatusBar:function(){return u}});var o=i(25045),n=i(31635),s=i(16964),r=i(84839),a=i(23211),l=i(23183),c=i(81987);class u extends s.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(s.STATUSES.beforeDestruct),a.Dom.safeRemove(this.container),super.destruct())}constructor(e,t){super(e),(0,o._)(this,"target",void 0),(0,o._)(this,"container",void 0),(0,o._)(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()}}u=(0,n.__decorate)([r.component,(0,r.derive)(c.Mods,l.Elms)],u)},98803:function(e,t,i){"use strict";i.d(t,{Table:function(){return f}});var o=i(25045),n=i(31635),s=i(16964),r=i(81937),a=i(84839),l=i(27795),c=i(28077),u=i(65946),h=i(80991);let d=new WeakMap;class f extends s.ViewComponent{className(){return"Table"}__recalculateStyles(){let e=(0,c.getContainer)(this.j,f,"style",!0),t=[];this.selected.forEach(e=>{let i=(0,u.cssPath)(e);i&&t.push(i)}),e.innerHTML=t.length?t.join(",")+`{${this.jodit.options.table.selectionCellStyle}}`:""}addSelection(e){this.selected.add(e),this.__recalculateStyles();let t=l.Dom.closest(e,"table",this.j.editor);if(t){let i=f.__selectedByTable.get(t)||new Set;i.add(e),f.__selectedByTable.set(t,i)}}removeSelection(e){this.selected.delete(e),this.__recalculateStyles();let t=l.Dom.closest(e,"table",this.j.editor);if(t){let i=f.__selectedByTable.get(t);i&&(i.delete(e),i.size||f.__selectedByTable.delete(t))}}getAllSelectedCells(){return(0,u.toArray)(this.selected)}static __getSelectedCellsByTable(e){let t=f.__selectedByTable.get(e);return t?(0,u.toArray)(t):[]}destruct(){return this.selected.clear(),super.destruct()}static __getRowsCount(e){return e.rows.length}getRowsCount(e){return f.__getRowsCount(e)}static __getColumnsCount(e){return f.__formalMatrix(e).reduce((e,t)=>Math.max(e,t.length),0)}getColumnsCount(e){return f.__getColumnsCount(e)}static __formalMatrix(e,t){let i=[[]],o=(0,u.toArray)(e.rows),n=(e,o)=>{void 0===i[o]&&(i[o]=[]);let n=e.colSpan,s=e.rowSpan,r,a,l=0;for(;i[o][l];)l+=1;for(a=0;s>a;a+=1)for(r=0;r<n;r+=1){if(void 0===i[o+a]&&(i[o+a]=[]),t&&!1===t(e,o+a,l+r,n,s))return!1;i[o+a][l+r]=e}};for(let e=0;e<o.length;e+=1){let t=(0,u.toArray)(o[e].cells);for(let o=0;o<t.length;o+=1)if(!1===n(t[o],e))return i}return i}formalMatrix(e,t){return f.__formalMatrix(e,t)}static __formalCoordinate(e,t,i=!1){let o=0,n=0,s=1,r=1;return f.__formalMatrix(e,(e,a,l,c,u)=>{if(t===e)return o=a,n=l,s=c||1,r=u||1,i&&(n+=(c||1)-1,o+=(u||1)-1),!1}),[o,n,s,r]}formalCoordinate(e,t,i=!1){return f.__formalCoordinate(e,t,i)}static __appendRow(e,t,i,o){let n;if(t)n=t.cloneNode(!0),l.Dom.each(t,e=>{if(!l.Dom.isCell(e))return;let t=(0,u.attr)(e,"rowspan");if(t&&parseInt(t,10)>1){let i=parseInt(t,10)-1;(0,u.attr)(e,"rowspan",i>1?i:null)}}),l.Dom.each(n,e=>{l.Dom.isCell(e)&&l.Dom.detach(e)});else{let t=f.__getColumnsCount(e);n=o.element("tr");for(let e=0;e<t;e+=1)l.Dom.append(n,o.element("td"))}i&&t&&t.nextSibling?l.Dom.after(t,n):!i&&t?l.Dom.before(t,n):l.Dom.append(l.Dom.first(e,e=>l.Dom.isTag(e,"tbody"))||e,n)}appendRow(e,t,i){return f.__appendRow(e,t,i,this.j.createInside)}static __removeRow(e,t){let i,o=f.__formalMatrix(e),n=e.rows[t];o[t].forEach((s,r)=>{if(i=!1,t-1>=0&&o[t-1][r]===s)i=!0;else if(o[t+1]&&o[t+1][r]===s){if(s.parentNode===n&&s.parentNode.nextSibling){i=!0;let n=r+1;for(;o[t+1][n]===s;)n+=1;let a=l.Dom.next(s.parentNode,e=>l.Dom.isTag(e,"tr"),e);if(a){let e=null;for(let i=n;i<o[t+1].length;i+=1){let n=o[t+1][i];if(n&&n.parentNode===a){e=n;break}}e?l.Dom.before(e,s):l.Dom.append(a,s)}}}else l.Dom.safeRemove(s);if(i&&(s.parentNode===n||s!==o[t][r-1])){let e=s.rowSpan;(0,u.attr)(s,"rowspan",e-1>1?e-1:null)}}),l.Dom.safeRemove(n)}removeRow(e,t){return f.__removeRow(e,t)}appendColumn(e,t,i=!0){let o=f.__formalMatrix(e);if(!i&&l.Dom.isCell(t.previousElementSibling))return this.appendColumn(e,t.previousElementSibling,!0);let[,n]=f.__formalCoordinate(e,t,i),s=i?n+1:n;for(let e=0;e<o.length;){let t=o[e];if(t[n]!==t[s]||n===s){let e=this.j.createInside.element("td");i?l.Dom.after(t[n],e):l.Dom.before(t[n],e),t[n].rowSpan>1&&(e.rowSpan=t[n].rowSpan)}else t[n].colSpan+=1;e+=t[n].rowSpan||1}}static __removeColumn(e,t){let i,o=f.__formalMatrix(e);o.forEach((e,n)=>{let s=e[t];if(i=!1,t-1>=0&&o[n][t-1]===s||t+1<e.length&&o[n][t+1]===s?i=!0:l.Dom.safeRemove(s),i&&(n-1<0||s!==o[n-1][t])){let e=s.colSpan;(0,u.attr)(s,"colspan",e-1>1?(e-1).toString():null)}})}removeColumn(e,t){return f.__removeColumn(e,t)}static __getSelectedBound(e,t){let i,o,n,s=[[1/0,1/0],[0,0]],r=f.__formalMatrix(e);for(i=0;i<r.length;i+=1)for(o=0;r[i]&&o<r[i].length;o+=1)t.includes(r[i][o])&&(s[0][0]=Math.min(i,s[0][0]),s[0][1]=Math.min(o,s[0][1]),s[1][0]=Math.max(i,s[1][0]),s[1][1]=Math.max(o,s[1][1]));for(i=s[0][0];i<=s[1][0];i+=1)for(n=1,o=s[0][1];o<=s[1][1];o+=1){for(;r[i]&&r[i][o-n]&&r[i][o]===r[i][o-n];)s[0][1]=Math.min(o-n,s[0][1]),s[1][1]=Math.max(o-n,s[1][1]),n+=1;for(n=1;r[i]&&r[i][o+n]&&r[i][o]===r[i][o+n];)s[0][1]=Math.min(o+n,s[0][1]),s[1][1]=Math.max(o+n,s[1][1]),n+=1;for(n=1;r[i-n]&&r[i][o]===r[i-n][o];)s[0][0]=Math.min(i-n,s[0][0]),s[1][0]=Math.max(i-n,s[1][0]),n+=1;for(n=1;r[i+n]&&r[i][o]===r[i+n][o];)s[0][0]=Math.min(i+n,s[0][0]),s[1][0]=Math.max(i+n,s[1][0]),n+=1}return s}getSelectedBound(e,t){return f.__getSelectedBound(e,t)}static __normalizeTable(e){let t=[],i=f.__formalMatrix(e);f.__removeExtraColspans(i,t),f.__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,u.attr)(i[e][t],"rowspan",null),i[e][t].hasAttribute("colspan")&&1===i[e][t].colSpan&&(0,u.attr)(i[e][t],"colspan",null),i[e][t].hasAttribute("class")&&!(0,u.attr)(i[e][t],"class")&&(0,u.attr)(i[e][t],"class",null));f.__unmark(t)}static __removeExtraColspans(e,t){for(let i=0;i<e[0].length;i+=1){let o=1e6,n=!1;for(let t=0;t<e.length;t+=1)if(void 0!==e[t][i]){if(e[t][i].colSpan<2){n=!0;break}o=Math.min(o,e[t][i].colSpan)}if(!n)for(let n=0;n<e.length;n+=1)void 0!==e[n][i]&&f.__mark(e[n][i],"colspan",e[n][i].colSpan-o+1,t)}}static __removeExtraRowspans(e,t){let i,o;for(i=0;i<e.length;i+=1){let n=1e6,s=!1;for(o=0;o<e[i].length;o+=1)if(void 0!==e[i][o]){if(e[i][o].rowSpan<2){s=!0;break}n=Math.min(n,e[i][o].rowSpan)}if(!s)for(o=0;o<e[i].length;o+=1)void 0!==e[i][o]&&f.__mark(e[i][o],"rowspan",e[i][o].rowSpan-n+1,t)}}normalizeTable(e){return f.__normalizeTable(e)}static __mergeSelected(e,t){let i=[],o=f.__getSelectedBound(e,f.__getSelectedCellsByTable(e)),n=0,s=null,a=0,c=0,d=0,m=new Set,g=[];o&&(o[0][0]-o[1][0]||o[0][1]-o[1][1])&&(f.__formalMatrix(e,(e,r,l,_,v)=>{r>=o[0][0]&&r<=o[1][0]&&l>=o[0][1]&&l<=o[1][1]&&(m.has(e)||(m.add(e),r===o[0][0]&&(0,h.cssInline)(e,"width")&&(n+=e.offsetWidth),""!==(0,u.trim)(e.innerHTML.replace(/<br(\/)?>/g,""))&&i.push(e.innerHTML),_>1&&(c+=_-1),v>1&&(d+=v-1),s?(f.__mark(e,"remove",1,g),p(t).removeSelection(e)):(s=e,a=l)))}),c=o[1][1]-o[0][1]+1,d=o[1][0]-o[0][0]+1,s&&(c>1&&f.__mark(s,"colspan",c,g),d>1&&f.__mark(s,"rowspan",d,g),n&&(f.__mark(s,"width",(n/e.offsetWidth*100).toFixed(r.ACCURACY)+"%",g),a&&f.__setColumnWidthByDelta(e,a,0,!0,g)),s.innerHTML=i.join("<br/>"),p(t).addSelection(s),m.delete(s),f.__unmark(g),f.__normalizeTable(e),(0,u.toArray)(e.rows).forEach(e=>{e.cells.length||l.Dom.safeRemove(e)})))}mergeSelected(e){return f.__mergeSelected(e,this.j)}static __splitHorizontal(e,t){let i,o,n,s,r,a=[];f.__getSelectedCellsByTable(e).forEach(c=>{o=t.createInside.element("td"),l.Dom.append(o,t.createInside.element("br")),n=t.createInside.element("tr"),i=f.__formalCoordinate(e,c),c.rowSpan<2?(f.__formalMatrix(e,(e,t,o)=>{i[0]===t&&i[1]!==o&&e!==c&&f.__mark(e,"rowspan",e.rowSpan+1,a)}),l.Dom.after(l.Dom.closest(c,"tr",e),n),l.Dom.append(n,o)):(f.__mark(c,"rowspan",c.rowSpan-1,a),f.__formalMatrix(e,(t,o,n)=>{o>i[0]&&o<i[0]+c.rowSpan&&i[1]>n&&t.parentNode.rowIndex===o&&(r=t),i[0]<o&&t===c&&(s=e.rows[o])}),r?l.Dom.after(r,o):l.Dom.prepend(s,o)),c.colSpan>1&&f.__mark(o,"colspan",c.colSpan,a),f.__unmark(a),p(t).removeSelection(c)}),this.__normalizeTable(e)}splitHorizontal(e){return f.__splitHorizontal(e,this.j)}static __splitVertical(e,t){let i,o,n,s=[];f.__getSelectedCellsByTable(e).forEach(a=>{i=f.__formalCoordinate(e,a),a.colSpan<2?f.__formalMatrix(e,(e,t,o)=>{i[1]===o&&i[0]!==t&&e!==a&&f.__mark(e,"colspan",e.colSpan+1,s)}):f.__mark(a,"colspan",a.colSpan-1,s),o=t.createInside.element("td"),l.Dom.append(o,t.createInside.element("br")),a.rowSpan>1&&f.__mark(o,"rowspan",a.rowSpan,s);let c=a.offsetWidth;l.Dom.after(a,o),n=c/e.offsetWidth/2,f.__mark(a,"width",(100*n).toFixed(r.ACCURACY)+"%",s),f.__mark(o,"width",(100*n).toFixed(r.ACCURACY)+"%",s),f.__unmark(s),p(t).removeSelection(a)}),f.__normalizeTable(e)}splitVertical(e){return f.__splitVertical(e,this.j)}static __setColumnWidthByDelta(e,t,i,o,n){let s=f.__formalMatrix(e),a=0;for(let o=0;o<s.length;o+=1){let l=s[o][t];if(l.colSpan>1&&s.length>1)continue;let c=(l.offsetWidth+i)/e.offsetWidth*100;f.__mark(l,"width",c.toFixed(r.ACCURACY)+"%",n),a=o;break}for(let e=a+1;e<s.length;e+=1){let i=s[e][t];f.__mark(i,"width",null,n)}o||f.__unmark(n)}setColumnWidthByDelta(e,t,i,o,n){return f.__setColumnWidthByDelta(e,t,i,o,n)}static __mark(e,t,i,o){o.push(e);let n=d.get(e)??{};n[t]=void 0===i?1:i,d.set(e,n)}static __unmark(e){e.forEach(e=>{let t=d.get(e);t&&(Object.keys(t).forEach(i=>{let o=t[i];switch(i){case"remove":l.Dom.safeRemove(e);break;case"rowspan":(0,u.attr)(e,"rowspan",(0,u.isNumber)(o)&&o>1?o:null);break;case"colspan":(0,u.attr)(e,"colspan",(0,u.isNumber)(o)&&o>1?o:null);break;case"width":null==o?(e.style.removeProperty("width"),(0,u.attr)(e,"style")||(0,u.attr)(e,"style",null)):(0,u.css)(e,"width",o.toString())}delete t[i]}),d.delete(e))})}constructor(...e){super(...e),(0,o._)(this,"selected",new Set)}}(0,o._)(f,"__selectedByTable",new WeakMap),(0,n.__decorate)([(0,a.debounce)()],f.prototype,"__recalculateStyles",null);let p=e=>e.getInstance("Table",e.o)},22533:function(e,t,i){"use strict";i.d(t,{ToolbarButton:function(){return T}});var o=i(25045),n=i(31635),s=i(69364),r=i(81937),a=i(49574),l=i(51676),c=i(91672),u=i(68616),h=i(23211),d=i(17312),f=i(91565),p=i(24497),m=i(62101),g=i(85932),_=i(86878),v=i(57821),b=i(28712),y=i(7909),w=i(71125),S=i(59400),C=i(15982),E=i(29434),D=i(51116),I=i(4274);let k=new Set(["input","textarea","select"]);class T 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,y.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 o=e.value?.(i.jodit,this);void 0!==o&&(t.value=o),t.disabled=this.__calculateDisabledStatus(i),t.activated=this.__calculateActivatedStatus(i),e.update?.(i.jodit,this)}__calculateActivatedStatus(e){return(!(0,p.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))}onChangeActivated(){(0,y.attr)(this.button,"aria-pressed",this.state.activated),super.onChangeActivated()}onChangeText(){(0,f.isFunction)(this.control.template)?this.text.innerHTML=this.control.template(this.j,this.control.name,this.j.i18n(this.state.text)):super.onChangeText(),this.setMod("text-icons",!!this.text.innerText.trim().length)}onChangeTabIndex(){(0,y.attr)(this.button,"tabindex",this.state.tabIndex),(0,y.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 o=this.j.c.fromHTML(`<span role="button" aria-haspopup="true" aria-expanded="false" class="${e}__trigger">${E.Icon.get("chevron")}</span>`);return h.Dom.append(i,o),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,y.attr)(this.trigger,"disabled",e),(0,y.attr)(this.button,"disabled",e),(0,y.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,f.isFunction)(e.tooltip)?e.tooltip(this.j,e,this):e.tooltip),t.hasTrigger=!!(e.list||e.popup&&e.exec)}__initIconFromControl(){let{control:e,state:t}=this,{textIcons:i}=this.j.o;if(!0===i||(0,f.isFunction)(i)&&i(e.name)||e.template){t.icon=(0,S.UIButtonState)().icon,t.text=e.text||e.name;return}if(!(0,g.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=E.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,y.attr)(this.trigger,"aria-expanded",!0),e.buffer={actionTrigger:this},t.list)return this.__openControlList(t);if((0,f.isFunction)(t.popup)){let e=this.openPopup();e.parentElement=this;try{if(!1!==this.j.e.fire((0,v.camelCase)(`before-${t.name}-open-popup`),this.target,t,e)){let i=this.toolbar?.getTarget(this)??this.target??null,o=t.popup(this.j,i,this.__closePopup,this);o?e.setContent((0,g.isString)(o)?this.j.c.fromHTML(o):o).open(()=>(0,_.position)(this.container),!1,this.j.o.allowTabNavigation?this.container:void 0):this.__closePopup()}}catch(e){throw this.__closePopup(),e}this.j.e.fire((0,v.camelCase)(`after-${t.name}-open-popup`),e.container)}}onTriggerKeyDown(e){this.state.disabled||(e.key===r.KEY_DOWN?this.onButtonKeyDown(e):[r.KEY_ENTER,r.KEY_SPACE," "].includes(e.key)&&(e.preventDefault(),this.trigger.click()))}onButtonKeyDown(e){e.key!==r.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,k)&&e.key!==r.KEY_ESC)return;let i=this.__popupFocusables(),o=i.indexOf(t);switch(e.key){case r.KEY_ESC:this.__closePopup();break;case r.KEY_UP:o<=0?this.__closePopup():i[o-1].focus();break;case r.KEY_DOWN:if(!i.length)return;i[(o+1)%i.length].focus();break;default:return}e.preventDefault(),e.stopPropagation()}__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,C.findControlType)(e,t),o=e.list,n=this.openPopup(),s=(0,I.makeCollection)(this.j);n.parentElement=this,s.parentElement=n,s.mode="vertical";let r=(t,o)=>{let n;if((0,g.isString)(o)&&i(o))return{name:o.toString(),...i(o)};if((0,g.isString)(t)&&i(t))return{name:t.toString(),...i(t),..."object"==typeof o?o:{}};n=t,(0,m.isPlainObject)(n)&&"title"in n&&"value"in n&&(o=t.value,t=t.title);let{childTemplate:s}=e,r={name:t.toString(),template:s&&((e,t,i)=>s(e,t,i,this)),exec:e.childExec?(t,i,o)=>e.childExec?.(t,i,{...o,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,o]};return(0,g.isString)(o)&&(r.text=o),r};s.build((0,d.isArray)(o)?o.map(r):(0,w.keys)(o,!1).map(e=>r(e,o[e])),this.target),n.setContent(s).open(()=>(0,_.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 D.Popup(this.j,!1),this.j.e.on(this.ow,"mousedown touchstart",this.onOutsideClick).on("escape closeAllPopups",this.onOutsideClick).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);let{activeElement:t}=this.od,i=t&&h.Dom.isOrContains(e.container,t);this.state.activated=!1,e.close(),e.destruct(),this.trigger&&(0,y.attr)(this.trigger,"aria-expanded",!1),i&&this.focus()}onClick(e){let{control:t}=this;if((0,f.isFunction)(t.exec)){let i=this.toolbar?.getTarget(this)??this.target??null,o=t.exec(this.j,i,{control:t,originalEvent:e,button:this});if(!1!==o&&!0!==o&&(this.j?.e?.fire("synchro"),this.parentElement&&this.parentElement.update(),this.j?.e?.fire("closeAllPopups afterExec")),!1!==o)return}return t.list?this.__openControlList(t):(0,f.isFunction)(t.popup)?this.onTriggerClick(e):void((t.command||t.name)&&((0,w.call)((0,p.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.j.e.fire("closeAllPopups")))}destruct(){return this.__closePopup(),super.destruct()}constructor(e,t,i=null){super(e),(0,o._)(this,"control",void 0),(0,o._)(this,"target",void 0),(0,o._)(this,"state",void 0),(0,o._)(this,"trigger",void 0),(0,o._)(this,"openedPopup",void 0),this.control=t,this.target=i,this.state={...(0,S.UIButtonState)(),theme:"toolbar",currentValue:"",hasTrigger:!1},this.openedPopup=null;let n=this.getElm("button");(0,b.assert)(n,"Element button should exists"),this.button=n,Object.defineProperty(n,"component",{value:this,configurable:!0});let r=this.getElm("trigger");(0,b.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,n.__decorate)([l.cacheHTML],T.prototype,"createContainer",null),(0,n.__decorate)([(0,u.watch)("state.hasTrigger",{immediately:!1})],T.prototype,"onChangeHasTrigger",null),(0,n.__decorate)([(0,u.watch)("trigger:click")],T.prototype,"onTriggerClick",null),(0,n.__decorate)([(0,u.watch)("trigger:keydown")],T.prototype,"onTriggerKeyDown",null),(0,n.__decorate)([(0,u.watch)("button:keydown")],T.prototype,"onButtonKeyDown",null),(0,n.__decorate)([a.autobind],T.prototype,"__onPopupKeyDown",null),(0,n.__decorate)([a.autobind],T.prototype,"onOutsideClick",null),(0,n.__decorate)([a.autobind],T.prototype,"__closePopup",null),T=(0,n.__decorate)([c.component],T)},5772:function(e,t,i){"use strict";i.d(t,{ToolbarContent:function(){return u}});var o=i(25045),n=i(31635),s=i(84839),r=i(27795),a=i(65946),l=i(59400);let c=new Set(["input","button","select","textarea"]);class u 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)&&(r.Dom.detach(this.container),r.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(),r.Dom.each(this.container,e=>{r.Dom.isTag(e,c)&&(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,o._)(this,"control",void 0),(0,o._)(this,"target",void 0),this.control=t,this.target=i,this.container.classList.add(`${this.componentName}_${this.clearName(t.name)}`)}}u=(0,n.__decorate)([s.component],u)},39709:function(e,t,i){"use strict";i.d(t,{ToolbarButton:function(){return o.ToolbarButton},ToolbarContent:function(){return n.ToolbarContent},ToolbarSelect:function(){return s.ToolbarSelect}});var o=i(22533),n=i(5772),s=i(61764)},61764:function(e,t,i){"use strict";i.d(t,{ToolbarSelect:function(){return l}});var o=i(31635),n=i(84839),s=i(62101),r=i(85932),a=i(22533);class l extends a.ToolbarButton{className(){return"ToolbarSelect"}update(){super.update(),this.state.icon.name="";let{list:e,data:t}=this.control;if(e){let i=this.state.value||(t&&(0,r.isString)(t.currentValue)?t.currentValue:void 0);i||(i=Object.keys(e)[0]);let o=((0,s.isPlainObject)(e)&&e[i.toString()]||i).toString();this.state.text=this.control.textTemplate?.(this.jodit,o)??o}}}l=(0,o.__decorate)([n.component],l)},42573:function(e,t,i){"use strict";i.d(t,{ToolbarCollection:function(){return m}});var o=i(25045),n=i(31635),s=i(84839),r=i(49574),a=i(91672),l=i(29200),c=i(68616),u=i(7909),h=i(80991),d=i(38027),f=i(97959),p=i(4274);class m extends f.UIList{className(){return"ToolbarCollection"}getRole(){return"toolbar"}get firstButton(){let[e]=this.buttons;return e||null}makeButton(e,t=null){return(0,p.makeButton)(this.j,e,t)}makeSelect(e,t=null){return(0,p.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,h.css)(this.container,"direction",e),(0,u.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,d.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,o._)(this,"__listenEvents","updatePlugins updateToolbar changeStack mousedown mouseup keydown change readonly afterResize selectionchange changeSelection focus afterSetMode touchstart focus blur")}}(0,n.__decorate)([(0,c.watch)(":afterInit"),r.autobind],m.prototype,"__immediateUpdate",null),(0,n.__decorate)([(0,s.debounce)(e=>e.j.defaultTimeout,!0)],m.prototype,"update",null),(0,n.__decorate)([(0,l.hook)("ready")],m.prototype,"__initEvents",null),m=(0,n.__decorate)([a.component],m)},6209:function(e,t,i){"use strict";i.d(t,{ToolbarEditorCollection:function(){return u}});var o=i(25045),n=i(31635),s=i(81937),r=i(84839),a=i(27795),l=i(65946),c=i(42573);class u extends c.ToolbarCollection{className(){return"ToolbarEditorCollection"}shouldBeDisabled(e){let t=super.shouldBeDisabled(e);if(void 0!==t)return t;let i=void 0===e.control.mode?s.MODE_WYSIWYG:e.control.mode;return i!==s.MODE_SPLIT&&i!==this.j.getRealMode()}shouldBeActive(e){let t,i=super.shouldBeActive(e);if(void 0!==i)return i;let o=this.j.selection?this.j.s.current():null;if(!o)return!1;if(e.control.tags){let i=e.control.tags;if(t=o,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=o,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,o._)(this,"checkActiveStatus",(e,t)=>{let i=0,o=0;return Object.keys(e).forEach(n=>{let s=e[n];(0,l.isFunction)(s)?s(this.j,(0,l.css)(t,n).toString())&&(i+=1):-1!==s.indexOf((0,l.css)(t,n).toString())&&(i+=1),o+=1}),o===i}),this.prependInvisibleInput(this.container)}}u=(0,n.__decorate)([r.component],u)},4274:function(e,t,i){"use strict";i.d(t,{makeButton:function(){return a},makeCollection:function(){return r},makeSelect:function(){return l}});var o=i(91672),n=i(91565),s=i(24497);function r(e,t){let i=(0,o.getComponentClass)("ToolbarCollection"),n=(0,o.getComponentClass)("ToolbarEditorCollection"),r=(0,s.isJoditObject)(e)?new n(e):new i(e);return e.o.textIcons&&r.container.classList.add("jodit_text_icons"),t&&(r.parentElement=t),e.o.toolbarButtonSize&&(r.buttonSize=e.o.toolbarButtonSize),r}function a(e,t,i=null){if((0,n.isFunction)(t.getContent))return new((0,o.getComponentClass)("ToolbarContent"))(e,t,i);let s=new((0,o.getComponentClass)("ToolbarButton"))(e,t,i);return s.state.tabIndex=e.o.allowTabNavigation?0:-1,s}function l(e,t,i=null){return new((0,o.getComponentClass)("ToolbarSelect"))(e,t,i)}},40013:function(e,t,i){"use strict";var o=i(17312),n=i(24497),s=i(7909),r=i(5266);r.Config.prototype.enableDragAndDropFileToEditor=!0,r.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,o.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;(0,n.isJoditObject)(t)&&e.files&&e.files.length&&e.files.forEach((i,o)=>{let[n,r]=e.isImages&&e.isImages[o]?["img","src"]:["a","href"],a=t.createInside.element(n);(0,s.attr)(a,r,e.baseurl+i),"a"===n&&(a.textContent=t.o.uploader.getDisplayName.call(this,e.baseurl,i)),"img"===n?t.s.insertImage(a,null,t.o.imageDefaultWidth):t.s.insertNode(a)})},defaultHandlerError(e){this.j.message.error(e.message)},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 n}});var o=i(65946);function n(e,t){if((0,o.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,o.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 o(e){let[t,...i]=e.split(","),o=i.join(","),n=t.split(":")[1]?.split(";")[0]??"",s=/;base64/i.test(t)?atob(o):decodeURIComponent(o),r=new Uint8Array(new ArrayBuffer(s.length));for(let e=0;e<s.length;e+=1)r[e]=s.charCodeAt(e);return new Blob([r.buffer],{type:n})}i.d(t,{dataURItoBlob:function(){return o}})},11981:function(e,t,i){"use strict";i.d(t,{ajaxInstances:function(){return n.ajaxInstances},hasFiles:function(){return r},hasItems:function(){return a},processOldBrowserDrag:function(){return o.processOldBrowserDrag},send:function(){return n.send},sendFiles:function(){return s.sendFiles}}),i(89446);var o=i(95436),n=i(77911),s=i(46533);function r(e){return!!(e&&e.files&&e.files.length>0)}function a(e){return!!(e&&e.items&&e.items.length>0)}},95436:function(e,t,i){"use strict";i.d(t,{processOldBrowserDrag:function(){return c}});var o=i(81937),n=i(27795),s=i(28077),r=i(65946),a=i(23112),l=i(46533);function c(e,t,i,c,u){if(t&&(!t.types.length||t.types[0]!==o.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});n.Dom.append((0,s.getContainer)(e.j,e.constructor),t);let o=(0,r.isJoditObject)(e.j)?e.j.s.save():null;t.focus(),e.j.async.setTimeout(()=>{let s=t.firstChild;if(n.Dom.safeRemove(t),s&&s.hasAttribute("src")){let t=(0,r.attr)(s,"src")||"";o&&(0,r.isJoditObject)(e.j)&&e.j.s.restore(),(0,l.sendFiles)(e,[(0,a.dataURItoBlob)(t)],i,c).finally(u)}},e.j.defaultTimeout)}}},46533:function(e,t,i){"use strict";i.d(t,{sendFiles:function(){return s}});var o=i(65946),n=i(77911);function s(e,t,i,s,r){if(!t)return Promise.reject((0,o.error)("Need files"));let{o:a}=e,l=(0,o.toArray)(t);if(!l.length)return Promise.reject((0,o.error)("Need files"));if((0,o.isFunction)(a.beforeUpload)&&!1===a.beforeUpload.call(e,l)){let t=(0,o.error)("Upload canceled");return(s||a.defaultHandlerError).call(e,t),Promise.reject(t)}let c=[];if(a.insertImageAsBase64URI&&function(e,t,i,n,s,r){let a,l,c=[];for(l=0;l<e.length;l+=1)if((a=e[l])&&a.type){let u=a.type.match(/\/([a-z0-9]+)/i),h=u[1]?u[1].toLowerCase():"";if(!t.includes(h))continue;let d=new FileReader,f=n.j.async.promise((e,t)=>{d.onerror=t,d.onloadend=()=>{let t={baseurl:"",files:[d.result],isImages:[!0]};((0,o.isFunction)(s)?s:r).call(n,t),e(t)},d.readAsDataURL(a)});c.push(f),i.push(f),e[l]=null}c.length&&Promise.all(c).then(()=>{n.j.events&&n.j.e.fire("filesWereUploaded")}).catch(()=>{})}(l,a.imagesExtensions,c,e,i,a.defaultHandlerSuccess),(l=l.filter(e=>e)).length){let t,u=new FormData;u.append(a.pathVariableName,e.path),u.append("source",e.source);for(let i=0;i<l.length;i+=1)if(t=l[i]){let o=/\.\w+$/.test(t.name),n=t.type.match(/\/([a-z0-9]+)/i),s=n&&n[1]?n[1].toLowerCase():"",r=l[i].name||Math.random().toString().replace(".","");if(!o&&s){let e=s;["jpeg","jpg"].includes(e)&&(e="jpeg|jpg"),RegExp(".("+e+")$","i").test(r)||(r+="."+s)}let[c,h,d]=a.processFileName.call(e,a.filesVariableName(i),l[i],r);u.append(c,h,d)}r&&r(u),a.data&&(0,o.isPlainObject)(a.data)&&Object.keys(a.data).forEach(e=>{u.append(e,a.data[e])}),a.prepareData.call(e,u),c.push((0,n.send)(e,u).then(t=>(a.isSuccess.call(e,t)?((0,o.isFunction)(i)?i:a.defaultHandlerSuccess).call(e,a.process.call(e,t)):((0,o.isFunction)(s)?s:a.defaultHandlerError).call(e,(0,o.error)(a.getMessage.call(e,t))),t)).then(()=>{e.j.events&&e.j.e.fire("filesWereUploaded")}))}return Promise.all(c)}},77911:function(e,t,i){"use strict";i.d(t,{send:function(){return a}});var o=i(65946),n=i(73714),s=i(89446);let r=new WeakMap;function a(e,t){let i=(0,s.buildData)(e,t),a=t=>{e.j.progressbar.show().progress(t),t>=100&&e.j.progressbar.hide()},l=(t,i)=>{let s=new n.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,o.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=r.get(e);return a||(a=new Set,r.set(e,a)),a.add(s),e.j.e.one("beforeDestruct",s.destruct),s.send().then(e=>e.json()).catch(e=>({success:!1,data:{messages:[e]}})).finally(()=>{s.destruct(),a?.delete(s)})};return((0,o.isFunction)(e.o.customUploadFunction)&&(l=e.o.customUploadFunction),(0,o.isPromise)(i))?i.then(e=>l(e,a)).catch(t=>{e.o.error.call(e,t)}):l(i,a)}i.d(t,["ajaxInstances",0,r])},94925:function(e,t,i){"use strict";i.d(t,{Uploader:function(){return u}});var o=i(25045),n=i(16964),s=i(81937),r=i(23211),a=i(65946),l=i(5266),c=i(11981);i(40013);class u extends n.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 o=()=>{e.classList.remove("jodit_drag_hover")},n=this,r=e=>{let r,a,l,u=e.clipboardData,h=e=>{a&&(e.append("extension",l),e.append("mimetype",a.type))};if(!s.IS_IE&&(0,c.hasFiles)(u))return(0,c.sendFiles)(n,u.files,t,i).finally(o),!1;if(s.IS_IE&&!s.IS_ES_NEXT)return(0,c.processOldBrowserDrag)(n,u,t,i,o);if((0,c.hasItems)(u)){let{items:s}=u;for(r=0;r<s.length;r+=1)if("file"===s[r].kind&&"image/png"===s[r].type){if(a=s[r].getAsFile()){let e=a.type.match(/\/([a-z0-9]+)/i);l=e[1]?e[1].toLowerCase():"",(0,c.sendFiles)(n,[a],t,i,h).finally(o)}e.preventDefault();break}}};n.j&&n.j.editor!==e?n.j.e.on(e,"paste",r):n.j.e.on("beforePaste",r),this.attachEvents(e,t,i,o)}attachEvents(e,t,i,o){let n=this;n.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",s=>{e.classList.remove("jodit_drag_hover"),(0,c.hasFiles)(s.dataTransfer)&&(s.preventDefault(),s.stopImmediatePropagation(),(0,c.sendFiles)(n,s.dataTransfer.files,t,i).finally(o))});let s=r.Dom.first(e,e=>r.Dom.isTag(e,"input")&&(0,a.attr)(e,"type")?.toLowerCase()==="file");s&&n.j.e.on(s,"change",()=>{(0,c.sendFiles)(n,s.files,t,i).then(()=>{s.value="",/safari/i.test(navigator.userAgent)||(s.type="",s.type="file")}).finally(o)})}uploadRemoteImage(e,t,i){let o=this,{o:n}=o,s=(0,a.isFunction)(i)?i:n.defaultHandlerError;(0,c.send)(o,{action:"fileUploadRemote",url:e}).then(e=>{n.isSuccess.call(o,e)?((0,a.isFunction)(t)?t:n.defaultHandlerSuccess).call(o,n.process.call(o,e)):s.call(o,(0,a.error)(n.getMessage.call(o,e)))}).catch(e=>s.call(o,e))}upload(e){return this.async.promise((t,i)=>{(0,c.sendFiles)(this,e,t,i)})}destruct(){this.setStatus(n.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,o._)(this,"path",""),(0,o._)(this,"source","default"),(0,o._)(this,"options",void 0),this.options=(0,a.ConfigProto)(t||{},(0,a.ConfigProto)(l.Config.defaultOptions.uploader,(0,a.isJoditObject)(e)?e.o.uploader:{}))}}},72348:function(e,t,i){"use strict";var o=i(27795),n=i(65946),s=i(4099),r=i(54522),a=i.n(r);s.Icon.set("palette",a()),i.d(t,["ColorPickerWidget",0,(e,t,i)=>{let r="jodit-color-picker",a=(0,n.normalizeColor)(i),l=e.c.div(r),c=e.o.textIcons?`<span>${e.i18n("palette")}</span>`:s.Icon.get("palette"),u=e=>{let t=[];return(0,n.isPlainObject)(e)?Object.keys(e).forEach(i=>{t.push(`<div class="${r}__group ${r}__group-${i}">`),t.push(u(e[i])),t.push("</div>")}):(0,n.isArray)(e)&&e.forEach(e=>{t.push(`<span class='${r}__color-item ${a===e?r+"__color-item_active_true":""}' title="${e}" style="background-color:${e}" data-color="${e}"></span>`)}),t.join("")},h=(0,n.isArray)(e.o.colors)?`<div class="${r}__group">${u(e.o.colors)}</div>`:u(e.o.colors);o.Dom.append(l,e.c.fromHTML(`<div class="${r}__groups">${h}</div>`)),o.Dom.append(l,e.c.fromHTML(`<div data-ref="extra" class="${r}__extra"></div>`));let{extra:d}=(0,n.refs)(l);o.Dom.append(d,e.c.fromHTML(`<div class="${r}__hex"><input data-ref="hexInput" type="text" spellcheck="false" aria-label="HEX" placeholder="#FF0000" value="${a||""}"/></div>`));let{hexInput:f}=(0,n.refs)(l),p=null,m=()=>{let e=f.value.trim();if(e===p)return;let i=/^#?[0-9a-f]{3}(?:[0-9a-f]{3})?$/i.test(e),o=/^rgba?\([\d\s.,%]+\)$/i.test(e);if(!i&&!o)return;let s=(0,n.normalizeColor)(i&&!e.startsWith("#")?"#"+e:e);s&&(0,n.isFunction)(t)&&(p=e,t(s))};return e.e.on(f,"keydown",e=>{e.stopPropagation(),"Enter"===e.key&&(e.preventDefault(),m())}).on(f,"change",e=>{e.stopPropagation(),m()}),o.Dom.append(d,e.c.fromHTML(`<span class="${r}__remove" data-color="" title="${e.i18n("Remove")}">${e.o.textIcons?e.i18n("Remove"):s.Icon.get("eraser")}</span>`)),e.o.showBrowserColorPicker&&(0,n.hasBrowserColorPicker)()&&(o.Dom.append(d,e.c.fromHTML(`<div class="${r}__native">${c}<input type="color" value="#ffffff"/></div>`)),e.e.on(l,"change",e=>{e.stopPropagation();let i=e.target;if(!i||!i.tagName||!o.Dom.isTag(i,"input")||"color"!==i.type)return;let s=i.value||"";(0,n.isFunction)(t)&&t(s),e.preventDefault()})),e.e.on(l,"mousedown touchend",i=>{if(o.Dom.isTag(i.target,"input"))return void i.stopPropagation();i.stopPropagation(),i.preventDefault();let s=i.target;if((!s||!s.tagName||o.Dom.isTag(s,"svg")||o.Dom.isTag(s,"path"))&&s.parentNode&&(s=o.Dom.closest(s.parentNode,"span",e.editor)),!o.Dom.isTag(s,"span")||!s.classList.contains(r+"__color-item")&&!s.classList.contains(r+"__remove"))return;let a=(0,n.attr)(s,"-color")||"";t&&(0,n.isFunction)(t)&&t(a)}),e.e.fire("afterGenerateColorPicker",l,d,t,a),l}])},18762:function(e,t,i){"use strict";var o=i(23211),n=i(65946),s=i(4099),r=i(89636);let a=(e,t,{label:i,accept:o})=>{let n=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="${o}" tabindex="-1" dir="auto" multiple=""/></div>`);return e.uploader.bind(n,i=>{t.call(e,i),e.e.fire("closeAllPopups")},t=>{e.message.error(t.message),e.e.fire("closeAllPopups")}),{icon:"upload",name:"Upload",content:n}};function l(e,t,i){let s=o.Dom.first(e,e=>o.Dom.isTag(e,"input")&&(0,n.attr)(e,"name")===t);return s?(i&&(s.value=i),s.value):""}i.d(t,["FileSelectorWidget",0,(e,t,i,c,u=!0)=>{let h,d=[],f=e.o.uploader;if(t.upload&&!1!==f.showTabInFileSelector&&(f.url||f.insertImageAsBase64URI||f.customUploadFunction)){let{upload:i}=t;d.push(a(e,t=>{let o=(0,n.isFunction)(i)?i:f.defaultHandlerSuccess;(0,n.isFunction)(o)&&o.call(e,t)},u?{label:"Drop image",accept:"image/*"}:{label:"Drop file",accept:"*"}))}if(t.filebrowser&&(e.o.filebrowser.ajax.url||e.o.filebrowser.items.url)&&d.push({icon:"folder",name:"Browse",content(){c&&c(),t.filebrowser&&e.filebrowser.open(t.filebrowser,u)}}),t.url){let r=new s.UIButton(e,{type:"submit",variant:"primary",text:"Insert"}),a=new s.UIForm(e,[new s.UIInput(e,{required:!0,label:"URL",name:"url",type:"text",placeholder:"https://"}),new s.UIInput(e,{name:"text",label:"Alternative text"}),new s.UIBlock(e,[r])]);i&&!o.Dom.isText(i)&&!o.Dom.isComment(i)&&(o.Dom.isTag(i,"img")||(0,n.$$)("img",i).length)&&(h="IMG"===i.tagName?i:(0,n.$$)("img",i)[0],l(a.container,"url",(0,n.attr)(h,"src")),l(a.container,"text",(0,n.attr)(h,"alt")),r.state.text="Update"),i&&o.Dom.isTag(i,"a")&&(l(a.container,"url",(0,n.attr)(i,"href")),l(a.container,"text",(0,n.attr)(i,"title")),r.state.text="Update"),a.onSubmit(i=>{(0,n.isFunction)(t.url)&&t.url.call(e,i.url,i.text)}),d.push({icon:"link",name:"URL",content:a.container})}let p=(0,r.TabsWidget)(e,d);return p.classList.add("jodit-file-selector"),p},"UploadTab",0,a])},15753:function(e,t,i){"use strict";i.d(t,{ColorPickerWidget:function(){return o.ColorPickerWidget},FileSelectorWidget:function(){return n.FileSelectorWidget},TabsWidget:function(){return s.TabsWidget},UploadTab:function(){return n.UploadTab}});var o=i(72348),n=i(18762),s=i(89636)},89636:function(e,t,i){"use strict";var o=i(16964),n=i(23211),s=i(91565),r=i(7909),a=i(4099);i.d(t,["TabsWidget",0,(e,t,i)=>{let l=e.c.div("jodit-tabs"),c=e.c.div("jodit-tabs__wrapper"),u=e.c.div("jodit-tabs__buttons");(0,r.attr)(u,{role:"tablist","aria-orientation":"horizontal"});let h={},d=[],f="";n.Dom.append(l,u),n.Dom.append(l,c);let p=e=>{h[e]&&(d.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:l,name:m,content:g})=>{let _=e.c.div("jodit-tab");(0,r.attr)(_,{role:"tabpanel"});let v=(0,a.Button)(e,l||m,m);v.state.role="tab",e.e.on(v.container,"pointerdown",e=>e.preventDefault()),f||(f=m),n.Dom.append(u,v.container),d.push(v),v.container.classList.add("jodit-tabs__button","jodit-tabs__button_columns_"+t.length),(0,s.isFunction)(g)?_.classList.add("jodit-tab_empty"):n.Dom.append(_,o.Component.isInstanceOf(g,a.UIElement)?g.container:g),n.Dom.append(c,_),v.onAction(()=>(p(m),(0,s.isFunction)(g)&&!n.Dom.isElement(g)&&g.call(e),i&&(i.activeTab=m),!1)),h[m]={button:v,tab:_}}),p(i&&i.activeTab&&h[i.activeTab]?i.activeTab:f),i){let e=i.activeTab;Object.defineProperty(i,"activeTab",{configurable:!0,enumerable:!1,get:()=>e,set(t){e=t,p(t)}})}return l}])},94358:function(e,t,i){"use strict";var o=i(81937),n=i(28077),s=i(65946),r=i(29434),a=i(5266),l=i(17995),c=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,s.isLicense)(e.o.license)?e.o.license||"MIT":(0,s.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:o,aiCommonSuffixPrompt:n}=t.o.aiAssistant;this.promptInput.value=[o,(0,l.isString)(i)?i:"",n].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,o._)(this,"__body",void 0),(0,o._)(this,"__buttons",void 0),(0,o._)(this,"__results",void 0),(0,o._)(this,"__spinner",void 0),(0,o._)(this,"__error",void 0),(0,o._)(this,"promptInput",void 0),(0,o._)(this,"__insertAfterButton",void 0),(0,o._)(this,"__submitButton",void 0),(0,o._)(this,"__tryAgainButton",void 0),(0,o._)(this,"__insertButton",void 0),(0,o._)(this,"__formAiAssistant",void 0),(0,o._)(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,c.Button)(e,"","Insert","primary").onAction(()=>t(this.__aiResult)),this.__insertAfterButton=(0,c.Button)(e,"","Insert After","initial").onAction(()=>i(this.__aiResult));let n=()=>{this.__formAiAssistant.validate()&&(this.__formAiAssistant.submit(),this.__toggleInsertButton(!0),this.__toggleSubmitButton(!0))};this.__submitButton=(0,c.Button)(e,"ai-assistant","").onAction(n),this.__tryAgainButton=(0,c.Button)(e,"update","","initial").onAction(n),this.promptInput=new c.UITextArea(e,{name:"prompt",required:!0,label:"Prompt",placeholder:"Ask AI to improve generated text",className:this.getFullElName("prompt-row-input")});let s=new c.UIBlock(e,[this.__insertButton,this.__insertAfterButton,this.__tryAgainButton],{className:this.getFullElName("prompt-row")});this.__formAiAssistant=new c.UIForm(e,[new c.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,s.container),a.Dom.append(this.__body,this.__formAiAssistant.container),this.onChangePromptValue()}}(0,n.__decorate)([(0,r.watch)(":ai-assistant-response")],h.prototype,"onAiAssistentResponse",null),(0,n.__decorate)([(0,r.watch)(":ai-assistant-error")],h.prototype,"onAiAssistentError",null),(0,n.__decorate)([(0,r.watch)("promptInput:change")],h.prototype,"onChangePromptValue",null),h=(0,n.__decorate)([s.component],h)},28286:function(e,t,i){"use strict";var o=i(25045),n=i(81937),s=i(27795),r=i(28077),a=i(91565),l=i(91206),c=i(42259);i(33831);var u=i(89827),h=i(17523);class d 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,o=i.selection;if(o.isFocused()||o.focus(),(0,u.checkNotCollapsed)(i))return i.e.fire("backSpaceAfterDelete",e),!1;let r=o.range,l=i.createInside.text(n.INVISIBLE_SPACE);try{if(s.Dom.safeInsertNode(r,l),!s.Dom.isOrContains(i.editor,l))return;if(i.e.fire("backSpaceBeforeCases",e,l))return!1;(0,c.moveNodeInsideStart)(i,l,e);let o=i.o.delete.disableCases;if(h.casesMap.some(([s,r])=>{if(!(o&&o.has(s))&&(0,a.isFunction)(r)&&r(i,l,e,t))return n.IS_PROD,!0}))return!1}catch(e){throw n.IS_PROD,e}finally{i.e.fire("backSpaceAfterDelete",e,l),this.safeRemoveEmptyNode(l)}return!1}safeRemoveEmptyNode(e){let{range:t}=this.j.s;t.startContainer===e&&(e.previousSibling?s.Dom.isText(e.previousSibling)?t.setStart(e.previousSibling,e.previousSibling.nodeValue?.length??0):t.setStartAfter(e.previousSibling):e.nextSibling&&(s.Dom.isText(e.nextSibling)?t.setStart(e.nextSibling,0):t.setStartBefore(e.nextSibling)),t.collapse(!0),this.j.s.selectRange(t)),s.Dom.safeRemove(e)}}(0,o._)(d,"requires",["hotkeys"]),r.pluginSystem.add("backspace",d)},26106:function(e,t,i){"use strict";i.d(t,{checkJoinNeighbors:function(){return r}});var o=i(81937),n=i(23211),s=i(15200);function r(e,t,i){let s=t,r=s;for(;s&&!n.Dom.findNotEmptySibling(s,i)&&s.parentElement!==e.editor;)r=s=s.parentElement;if(n.Dom.isElement(r)&&n.Dom.isContentEditable(r,e.editor)){var l,c;let s,u,h,d=n.Dom.findNotEmptySibling(r,i);if(n.Dom.isTag(d,"br"))return n.Dom.safeRemove(d),e.s.setCursorBefore(t),!0;if(d&&(l=r,c=d,s=n.Dom.isTag(c,o.LIST_TAGS),u=n.Dom.isTag(l,o.LIST_TAGS),h=(e,t)=>t?e.firstElementChild:e.lastElementChild,(u?(c=e.createInside.element(e.o.enterBlock),n.Dom.before(l,c),a(e,h(l,i),c,i)):!!c&&!!s&&!u&&a(e,l,h(c,!i),i))||a(e,r,function(e,t){if(!n.Dom.isTag(e,"table"))return e;let i=[];return n.Dom.each(e,e=>{n.Dom.isCell(e)&&i.push(e)}),i.length?i[t?i.length-1:0]:null}(d,i),i)))return e.s.setCursorBefore(t),!0}return!1}function a(e,t,i,o){if(t&&n.Dom.isElement(i)){n.Dom.moveContent(t,i,!o,(0,s.getMoveFilter)(e));let r=t;for(;r&&r!==e.editor&&n.Dom.isEmpty(r);){let e=r.parentElement;n.Dom.safeRemove(r),r=e}return!0}return!1}},80951:function(e,t,i){"use strict";i.d(t,{checkJoinTwoLists:function(){return r}});var o=i(23211),n=i(71125),s=i(15200);function r(e,t,i){let r=o.Dom.findSibling(t,i),a=o.Dom.findSibling(t,!i);if(!o.Dom.closest(t,o.Dom.isElement,e.editor)&&o.Dom.isList(r)&&o.Dom.isList(a)&&o.Dom.isTag(r.lastElementChild,"li")&&o.Dom.isTag(a.firstElementChild,"li")){let{setCursorBefore:l,setCursorAfter:c}=e.s,u=r.lastElementChild,h=a.firstElementChild;return(0,n.call)(i?o.Dom.prepend:o.Dom.append,h,t),o.Dom.moveContent(a,r,!i,(0,s.getMoveFilter)(e)),o.Dom.safeRemove(a),(0,n.call)(i?o.Dom.append:o.Dom.prepend,u,t),(0,n.call)(i?l:c,t),!0}return!1}},89827:function(e,t,i){"use strict";function o(e){return!e.s.isCollapsed()&&(e.execCommand("Delete"),!0)}i.d(t,{checkNotCollapsed:function(){return o}})},58881:function(e,t,i){"use strict";i.d(t,{checkRemoveChar:function(){return function e(t,i,r,l){var c,u;let h,d=r?-1:1,p=n.Dom.sibling(i,!r),f=n.Dom.sibling(i,r),m=null,g=!1;for(f||(f=a(i,r,t.editor));f&&(n.Dom.isText(f)||n.Dom.isInlineBlock(f));){for(;n.Dom.isInlineBlock(f);)f=r?f?.lastChild:f?.firstChild;if(!f)break;if(f.nodeValue?.length&&(h=function(e,t,i,r){let a=(0,s.toArray)(e.nodeValue),l=a.length,c=t?l-1:0;if(a[c]===o.INVISIBLE_SPACE)for(;a[c]===o.INVISIBLE_SPACE;)c+=i;let u=a[c];if(a[c+i]===o.INVISIBLE_SPACE){for(c+=i;a[c]===o.INVISIBLE_SPACE;)c+=i;c+=t?1:-1}return a=t&&c<0?[]:a.slice(t?0:c+1,t?c:l),function(e,t,i){if(!e||!n.Dom.isText(e)||(!t?/ $/:/^ /).test(e.nodeValue??"")||!(0,s.trimInv)(e.nodeValue||"").length)for(let e=t?i.length-1:0;t?e>=0:e<i.length;e+=t?-1:1)if(" "===i[e])i[e]=o.NBSP_SPACE;else break}(r,t,a),e.nodeValue=a.join(""),u}(f,r,d,p),!f.nodeValue.length&&n.Dom.isInlineBlock(f.parentNode)&&(f.nodeValue=o.INVISIBLE_SPACE)),f.nodeValue?.length||(m=f),!(0,s.isVoid)(h)&&h!==o.INVISIBLE_SPACE){c=f,u=h,(0,s.call)(r?n.Dom.after:n.Dom.before,c,i),("sentence"===l||"word"===l&&" "!==u&&u!==o.NBSP_SPACE)&&e(t,i,r,l),g=!0;break}let _=a(f,r,t.editor);m&&(n.Dom.safeRemove(m),m=null),f=_}return m&&n.Dom.safeRemove(m),g&&(function(e){let t=e.parentElement;for(;t&&n.Dom.isInlineBlock(t)&&n.Dom.isTag(t,"a");){let i=t.parentElement;n.Dom.isEmpty(t)&&(n.Dom.after(t,e),n.Dom.safeRemove(t)),t=i}}(i),i.parentElement!==t.editor&&n.Dom.isBlock(i.parentElement)&&n.Dom.each(i.parentElement,n.Dom.isEmptyTextNode)&&n.Dom.after(i,t.createInside.element("br")),t.s.setCursorBefore(i),n.Dom.isTag(i.previousSibling,"br")&&!n.Dom.findNotEmptySibling(i,!1)&&n.Dom.after(i,t.createInside.element("br"))),g}}});var o=i(81937),n=i(27795),s=i(65946),r=i(15200);function a(e,t,i){let o=n.Dom.sibling(e,t);return!o&&e.parentNode&&e.parentNode!==i&&(o=(0,r.findMostNestedNeighbor)(e,!t,i,!0))&&n.Dom.closest(e,"li",i)!==n.Dom.closest(o,"li",i)?null:o}},68709:function(e,t,i){"use strict";i.d(t,{checkRemoveContentNotEditable:function(){return r}});var o=i(27795),n=i(65946),s=i(42259);function r(e,t,i){let r=o.Dom.findSibling(t,i);return!r&&t.parentElement&&t.parentElement!==e.editor&&(r=o.Dom.findSibling(t.parentElement,i)),!(!o.Dom.isElement(r)||o.Dom.isContentEditable(r,e.editor))&&((0,n.call)(i?o.Dom.before:o.Dom.after,r,t),o.Dom.safeRemove(r),(0,s.moveNodeInsideStart)(e,t,i),(0,n.call)(i?e.s.setCursorBefore:e.s.setCursorAfter,t),!0)}},5771:function(e,t,i){"use strict";i.d(t,{checkRemoveEmptyNeighbor:function(){return n}});var o=i(23211);function n(e,t,i){let n=o.Dom.closest(t,o.Dom.isElement,e.editor);if(!n)return!1;let s=o.Dom.findNotEmptySibling(n,i);return!!(s&&o.Dom.isEmpty(s))&&(o.Dom.safeRemove(s),e.s.setCursorBefore(t),!0)}},2409:function(e,t,i){"use strict";i.d(t,{checkRemoveEmptyParent:function(){return r}});var o=i(81937),n=i(27795),s=i(80951);function r(e,t,i){let r=!1,{setCursorBefore:a,setCursorIn:l}=e.s,c=n.Dom.closest(t,n.Dom.isElement,e.editor);if(!c||!n.Dom.isEmpty(c))return!1;let u=n.Dom.findNotEmptyNeighbor(t,i,e.editor);do if(c&&n.Dom.isEmpty(c)&&!n.Dom.isCell(c)){n.Dom.after(c,t);let i=n.Dom.closest(c,e=>n.Dom.isElement(e)&&e!==c,e.editor);n.Dom.safeRemove(c),r=!0,c=i}else break;while(c)return!!(r&&(0,s.checkJoinTwoLists)(e,t,i))||(!u||n.Dom.isText(u)||n.Dom.isTag(u,o.INSEPARABLE_TAGS)?a(t):l(u,!i),r)}},93890:function(e,t,i){"use strict";i.d(t,{checkRemoveUnbreakableElement:function(){return r}});var o=i(81937),n=i(23211),s=i(2409);function r(e,t,i){let r=n.Dom.findSibling(t,i);return!!(n.Dom.isElement(r)&&(n.Dom.isTag(r,o.INSEPARABLE_TAGS)||n.Dom.isEmpty(r)))&&(n.Dom.safeRemove(r),n.Dom.isTag(r,"br")&&!n.Dom.findNotEmptySibling(t,!1)&&n.Dom.after(t,e.createInside.element("br")),e.s.setCursorBefore(t),n.Dom.isTag(r,"br")&&(0,s.checkRemoveEmptyParent)(e,t,i),!0)}},12443:function(e,t,i){"use strict";i.d(t,{checkTableCell:function(){return n}});var o=i(23211);function n(e,t){let i=t.parentElement;return!!o.Dom.isCell(i)}},10157:function(e,t,i){"use strict";i.d(t,{checkUnwrapFirstListItem:function(){return s}});var o=i(23211),n=i(93640);function s(e,t,i){let s=o.Dom.closest(t,o.Dom.isElement,e.editor),{s:r}=e;if(o.Dom.isLeaf(s)&&s?.parentElement?.[i?"firstElementChild":"lastElementChild"]===s&&r.cursorInTheEdge(i,s)){let a=s.parentElement,l=e.createInside.element(e.o.enterBlock);return(0,n.call)(i?o.Dom.before:o.Dom.after,a,l),o.Dom.moveContent(s,l),o.Dom.safeRemove(s),o.Dom.isEmpty(a)&&o.Dom.safeRemove(a),(0,n.call)(i?r.setCursorBefore:r.setCursorAfter,t),!0}return!1}},17523:function(e,t,i){"use strict";var o=i(26106),n=i(80951),s=i(58881),r=i(68709),a=i(5771),l=i(2409),c=i(93890),u=i(12443),h=i(10157);let d=[["remove-unbreakable",c.checkRemoveUnbreakableElement],["remove-not-editable",r.checkRemoveContentNotEditable],["remove-char",s.checkRemoveChar],["table-cell",u.checkTableCell],["remove-empty-parent",l.checkRemoveEmptyParent],["remove-empty-neighbor",a.checkRemoveEmptyNeighbor],["join-two-lists",n.checkJoinTwoLists],["join-neighbors",o.checkJoinNeighbors],["unwrap-first-list-item",h.checkUnwrapFirstListItem]];d.map(([,e])=>e),i.d(t,["casesMap",0,d])},33831:function(e,t,i){"use strict";i(5266).Config.prototype.delete={hotkeys:{delete:["delete","cmd+backspace"],deleteWord:["ctrl+delete","cmd+alt+backspace","ctrl+alt+backspace"],deleteSentence:["ctrl+shift+delete","cmd+shift+delete"],backspace:["backspace"],backspaceWord:["ctrl+backspace"],backspaceSentence:["ctrl+shift+backspace","cmd+shift+backspace"]}}},15200:function(e,t,i){"use strict";i.d(t,{findMostNestedNeighbor:function(){return n},getMoveFilter:function(){return s}});var o=i(27795);function n(e,t,i,s=!1){let r=e=>t?e.firstChild:e.lastChild,a=o.Dom.findNotEmptyNeighbor(e,!t,i);if(s&&o.Dom.isElement(a)&&!o.Dom.isInlineBlock(a))return null;if(a)do{if(!r(a))return a;a=r(a)}while(a)return null}function s(e){return t=>!0!==e.e.fire("backSpaceIsMovedIgnore",t)}},91678:function(e,t,i){"use strict";var o=i(28077),n=i(65946),s=i(29434),r=i(5266);i(40291);var a=i(52450),l=i.n(a),c=i(41111),u=i.n(c),h=i(49972),d=i.n(h),p=i(45062),f=i.n(p),m=i(18605),g=i.n(m),_=i(83389),v=i.n(_);o.pluginSystem.add("bold",function(e){let t=t=>{let i,o=r.Config.defaultOptions.controls[t],s={...o.css};return Object.keys(s).forEach(e=>{i||(i={}),i[e]=(0,n.isArray)(s[e])?s[e][0]:s[e]}),e.s.commitStyle({element:o.tags?o.tags[0]:void 0}),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})}),s.Icon.set("bold",l()).set("italic",u()).set("strikethrough",d()).set("subscript",f()).set("superscript",g()).set("underline",v())},40291:function(e,t,i){"use strict";var o=i(5266);o.Config.prototype.controls.subscript={tags:["sub"],tooltip:"subscript"},o.Config.prototype.controls.superscript={tags:["sup"],tooltip:"superscript"},o.Config.prototype.controls.bold={tagRegExp:/^(strong|b)$/i,tags:["strong","b"],css:{"font-weight":["bold","700"]},tooltip:"Bold"},o.Config.prototype.controls.italic={tagRegExp:/^(em|i)$/i,tags:["em","i"],css:{"font-style":"italic"},tooltip:"Italic"},o.Config.prototype.controls.underline={tagRegExp:/^(u)$/i,tags:["u"],css:{"text-decoration-line":"underline"},tooltip:"Underline"},o.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 o=i(25045),n=i(23211),s=i(28077),r=i(71125),a=i(91206),l=i(29434),c=i(5266),u=i(93267),h=i.n(u);c.Config.prototype.controls.classSpan={command:"applyClassName",exec:r.memorizeExec,list:["enabled","disabled","activated","text-left","text-center","text-right","warning","error"],isChildActive(e,t){let i=e.s.current();if(i){let o=n.Dom.closest(i,n.Dom.isElement,e.editor)||e.editor;return!!(t.control.args&&o.classList.contains(t.control.args[0].toString()))}return!1},isActive(e,t){let i=e.s.current();if(i){let o=n.Dom.closest(i,n.Dom.isElement,e.editor)||e.editor,s=!1;return t.control.list&&Object.keys(t.control.list).forEach(e=>{o.classList.contains(e)&&(s=!0)}),!!(o&&o!==e.editor&&void 0!==t.control.list&&s)}return!1},childTemplate:(e,t,i)=>`<span class="${t}">${e.i18n(i)}</span>`,tooltip:"Insert className"};class d extends a.Plugin{afterInit(e){e.registerCommand("applyClassName",(t,i,o)=>(e.s.commitStyle({attributes:{class:o}}),!1))}beforeDestruct(){}constructor(...e){super(...e),(0,o._)(this,"buttons",[{name:"classSpan",group:"script"}])}}s.pluginSystem.add("classSpan",d),l.Icon.set("class-span",h())},11018:function(e,t,i){"use strict";var o=i(25045),n=i(31635),s=i(84839),r=i(23211),a=i(1080),l=i(28077),c=i(48155),u=i(18855);i(11173);var h=i(54053);class d extends u.Plugin{afterInit(e){}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()}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",o=>(0,h.visitNodeWalker)(e,o,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.removeFormatForCollapsedSelection)(this.j):(0,h.removeFormatForSelection)(this.j),!1}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),e.value=t.innerHTML,(0,c.safeHTML)(t,{safeJavaScriptLink:!0,removeOnError:!0}),r.Dom.safeRemove(i),!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(!r.Dom.isTag(t,"br"))return;let i=t.previousSibling;!i||r.Dom.isTag(i,"br")||(!r.Dom.isText(i)||i.nodeValue?.trim()||i.previousSibling)&&r.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,c.safeHTML)(e,this.j.o.cleanHTML)}beforeDestruct(){this.walker.destruct()}constructor(...e){super(...e),(0,o._)(this,"buttons",[{name:"eraser",group:"font-style"}]),(0,o._)(this,"currentSelectionNode",null),(0,o._)(this,"walker",new a.LazyWalker(this.j.async,{timeout:this.j.o.cleanHTML.timeout}))}}(0,n.__decorate)([(0,s.watch)([":change",":afterSetMode",":afterInit",":mousedown",":keydown"])],d.prototype,"onChangeCleanHTML",null),(0,n.__decorate)([(0,s.hook)("ready")],d.prototype,"startWalker",null),(0,n.__decorate)([(0,s.watch)(":beforeCommand")],d.prototype,"beforeCommand",null),(0,n.__decorate)([(0,s.watch)(":beforeSetNativeEditorValue")],d.prototype,"onBeforeSetNativeEditorValue",null),(0,n.__decorate)([(0,s.watch)(":afterGetValueFromEditor")],d.prototype,"onAfterGetValueFromEditor",null),(0,n.__decorate)([(0,s.watch)(":safeHTML")],d.prototype,"onSafeHTML",null),l.pluginSystem.add("cleanHtml",d)},11173:function(e,t,i){"use strict";var o=i(5266);o.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},o.Config.prototype.controls.eraser={command:"removeFormat",tooltip:"Clear Formatting"}},5650:function(e,t,i){"use strict";i.d(t,{getHash:function(){return s}});var o=i(85932),n=i(4040);function s(e){let t=/([^[]*)\[([^\]]+)]/,i=/[\s]*,[\s]*/,s=/^(.*)[\s]*=[\s]*(.*)$/,r={};return(0,o.isString)(e)?(e.split(i).map(e=>{e=(0,n.trim)(e);let o=t.exec(e),a={};if(o){let e=o[2].split(i);o[1]&&(e.forEach(e=>{e=(0,n.trim)(e);let t=s.exec(e);t?a[t[1]]=t[2]:a[e]=!0}),r[o[1].toUpperCase()]=a)}else r[e.toUpperCase()]=!0}),r):!!e&&(Object.keys(e).forEach(t=>{r[t.toUpperCase()]=e[t]}),r)}},54053:function(e,t,i){"use strict";i.d(t,{getHash:function(){return o.getHash},removeFormatForCollapsedSelection:function(){return n.removeFormatForCollapsedSelection},removeFormatForSelection:function(){return s.removeFormatForSelection},visitNodeWalker:function(){return r.visitNodeWalker}});var o=i(5650),n=i(37431),s=i(70195),r=i(45219)},28665:function(e,t,i){"use strict";i.d(t,{isAllowedMediaEmbed:function(){return s}});let o=/^(https?:)?\/\/(www\.|m\.|music\.)?youtube(-nocookie)?\.com\/embed\//i,n=/^(https?:)?\/\/player\.vimeo\.com\/video\//i;function s(e){return o.test(e)||n.test(e)}},37431:function(e,t,i){"use strict";i.d(t,{isInlineBlock:function(){return r},removeFormatForCollapsedSelection:function(){return s}});var o=i(81937),n=i(23211);function s(e,t){let{s:i}=e,o=t;if(!o){o=e.createInside.fake();let{range:t}=i;n.Dom.safeInsertNode(t,o),t.collapse()}let s=n.Dom.furthest(o,r,e.editor);if(s)if(i.cursorOnTheLeft(s))n.Dom.before(s,o);else if(i.cursorOnTheRight(s))n.Dom.after(s,o);else{let e=i.splitSelection(s);e&&n.Dom.after(e,o)}t||(i.setCursorBefore(o),n.Dom.safeRemove(o))}function r(e){return n.Dom.isInlineBlock(e)&&!n.Dom.isTag(e,o.INSEPARABLE_TAGS)}},70195:function(e,t,i){"use strict";i.d(t,{removeFormatForSelection:function(){return r}});var o=i(23211),n=i(93640),s=i(37431);function r(e){let{s:t,editor:i,createInside:r}=e,{range:a}=t,l=a.cloneRange(),c=a.cloneRange(),u=r.fake(),h=r.fake();l.collapse(!0),c.collapse(!1),o.Dom.safeInsertNode(l,u),o.Dom.safeInsertNode(c,h),a.setStartBefore(u),a.collapse(!0),t.selectRange(a),(0,s.removeFormatForCollapsedSelection)(e,u),a.setEndAfter(h),a.collapse(!1),t.selectRange(a),(0,s.removeFormatForCollapsedSelection)(e,h);let d=[];o.Dom.between(u,h,e=>{(0,s.isInlineBlock)(e)&&!o.Dom.isTag(e,"a")&&d.push(e),o.Dom.isElement(e)&&(0,n.attr)(e,"style")&&(0,n.attr)(e,"style",null)}),d.forEach(e=>o.Dom.unwrap(e));let p=(e,t)=>{if(!o.Dom.findNotEmptySibling(e,t)){let o=e.parentNode;if(o&&o!==i&&(0,n.attr)(o,"style"))return(0,n.attr)(o,"style",null),p(o,t),!0}};p(u,!0)&&p(h,!1),a.setStartAfter(u),a.setEndBefore(h),t.selectRange(a),o.Dom.safeRemove(u),o.Dom.safeRemove(h)}},95559:function(e,t,i){"use strict";i.d(t,{allowAttributes:function(){return s}});var o=i(23211),n=i(7909);function s(e,t,i,s){let r=s&&o.Dom.isElement(t)&&s[t.nodeName];if(s&&o.Dom.isElement(t)&&!0!==r){if(!r)return i;let e=t.attributes;if(e&&e.length){let o=[];for(let t=0;t<e.length;t+=1){let i=r[e[t].name];i&&(!0===i||i===e[t].value)||o.push(e[t].name)}o.length&&(i=!0),o.forEach(e=>{(0,n.attrRaw)(t,e,null)})}}return i}},85085:function(e,t,i){"use strict";i.d(t,{convertUnsafeEmbeds:function(){return s}});var o=i(23211),n=i(7909);function s(e,t,i){let s=e.o.cleanHTML.convertUnsafeEmbeds;if(!s||!o.Dom.isElement(t))return i;let r=t.nodeName.toLowerCase();if(!s.includes(r))return i;let a=(0,n.attr)(t,"data")||(0,n.attr)(t,"src")||(0,n.attr)(t,"movie")||"";if(!a)return o.Dom.safeRemove(t),!0;let l=e.createInside.element("iframe");return(0,n.attr)(l,{src:a,sandbox:"",frameborder:"0",width:(0,n.attr)(t,"width"),height:(0,n.attr)(t,"height")}),o.Dom.replace(t,l,void 0,!1,!0),!0}},39188:function(e,t,i){"use strict";i.d(t,{fillEmptyParagraph:function(){return r}});var o=i(81937),n=i(23211);let s=new Set(["table","tbody","thead","tfoot","tr"]);function r(e,t,i){if(e.o.cleanHTML.fillEmptyParagraph&&n.Dom.isBlock(t)&&n.Dom.isEmpty(t,o.INSEPARABLE_TAGS)&&!n.Dom.isTag(t,s)){let i=e.createInside.element("br");return n.Dom.append(t,i),!0}return i}},91560:function(e,t,i){"use strict";i.r(t),i.d(t,{allowAttributes:function(){return o.allowAttributes},convertUnsafeEmbeds:function(){return n.convertUnsafeEmbeds},fillEmptyParagraph:function(){return s.fillEmptyParagraph},removeEmptyTextNode:function(){return r.removeEmptyTextNode},removeInvTextNodes:function(){return a.removeInvTextNodes},replaceOldTags:function(){return l.replaceOldTags},safeLinksTarget:function(){return c.safeLinksTarget},sandboxIframesInContent:function(){return u.sandboxIframesInContent},sanitizeAttributes:function(){return h.sanitizeAttributes},sanitizeStyles:function(){return d.sanitizeStyles},tryRemoveNode:function(){return p.tryRemoveNode}});var o=i(95559),n=i(85085),s=i(39188),r=i(94561),a=i(53514),l=i(35104),c=i(77041),u=i(66647),h=i(65015),d=i(60220),p=i(27611)},94561:function(e,t,i){"use strict";i.d(t,{removeEmptyTextNode:function(){return n}});var o=i(23211);function n(e,t,i,n,s,r){return o.Dom.isText(t)&&!t.nodeValue?(t===r&&e.s.isFocused()&&e.s.isCollapsed()&&e.s.setCursorAfter(t),o.Dom.safeRemove(t),!0):i}},53514:function(e,t,i){"use strict";i.d(t,{removeInvTextNodes:function(){return s}});var o=i(81937),n=i(23211);function s(e,t,i,s,r,a){if(a===t||!n.Dom.isText(t)||null==t.nodeValue||!(0,o.INVISIBLE_SPACE_REG_EXP)().test(t.nodeValue))return i;let l=n.Dom.furthest(a,n.Dom.isBlock,e.editor);return!l||n.Dom.isOrContains(l,t)?i:(t.nodeValue=t.nodeValue.replace((0,o.INVISIBLE_SPACE_REG_EXP)(),""),t===a&&e.s.isFocused()&&e.s.isCollapsed()&&e.s.setCursorAfter(t),t.nodeValue||n.Dom.safeRemove(t),!0)}},35104:function(e,t,i){"use strict";i.d(t,{replaceOldTags:function(){return n}});var o=i(23211);function n(e,t,i){let n=function(e,t,i){if(!i||!o.Dom.isHTMLElement(t))return t;let n=i[t.nodeName.toLowerCase()]||i[t.nodeName];return n?o.Dom.replace(t,n,e.createInside,!0,!1):t}(e,t,e.o.cleanHTML.replaceOldTags);return t!==n||i}},77041:function(e,t,i){"use strict";i.d(t,{safeLinksTarget:function(){return s}});var o=i(23211),n=i(7909);function s(e,t,i){if(!e.o.cleanHTML.safeLinksTarget||!o.Dom.isElement(t)||"A"!==t.nodeName||"_blank"!==(0,n.attr)(t,"target"))return i;let s=((0,n.attr)(t,"rel")||"").split(/\s+/).filter(Boolean),r=!1;return(s.includes("noopener")||(s.push("noopener"),r=!0),s.includes("noreferrer")||(s.push("noreferrer"),r=!0),r)?((0,n.attr)(t,"rel",s.join(" ")),!0):i}},66647:function(e,t,i){"use strict";i.d(t,{sandboxIframesInContent:function(){return r}});var o=i(23211),n=i(7909),s=i(28665);function r(e,t,i){return e.o.cleanHTML.sandboxIframesInContent&&o.Dom.isElement(t)&&"IFRAME"===t.nodeName?(0,s.isAllowedMediaEmbed)((0,n.attr)(t,"src")||"")||t.hasAttribute("sandbox")?i:((0,n.attr)(t,"sandbox",""),!0):i}},65015:function(e,t,i){"use strict";i.d(t,{sanitizeAttributes:function(){return s}});var o=i(23211),n=i(65946);function s(e,t,i){if(!o.Dom.isElement(t))return i;let s=e.options.cleanHTML;return!!(0,n.sanitizeHTMLElement)(t,{safeJavaScriptLink:s.safeJavaScriptLink,removeOnError:s.removeOnError,removeEventAttributes:s.removeEventAttributes,safeLinksTarget:s.safeLinksTarget})||i}},60220:function(e,t,i){"use strict";i.d(t,{sanitizeStyles:function(){return s}});var o=i(23211),n=i(7909);function s(e,t,i){let s=e.o.cleanHTML.allowedStyles;if(!s||!o.Dom.isElement(t))return i;let r=(0,n.attr)(t,"style");if(!r)return i;let a=function(e,t){let i=t[e],o=t["*"];if(!i&&!o)return null;let n=new Set;if(o)for(let e of o)n.add(e.toLowerCase());if(i)for(let e of i)n.add(e.toLowerCase());return n}(t.nodeName.toLowerCase(),s);if(!a)return i;let l=r.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!==r?((0,n.attr)(t,"style",l||null),!0):i}},27611:function(e,t,i){"use strict";i.d(t,{tryRemoveNode:function(){return l}});var o=i(81937),n=i(23211),s=i(4040),r=i(7909),a=i(28665);function l(e,t,i,l,c,u){return!function(e,t,i,l,c){if(!n.Dom.isText(t)){let e=t.nodeName.toUpperCase();if(l&&!l[e])return!0;let i="IFRAME"===e&&(0,a.isAllowedMediaEmbed)((0,r.attr)(t,"src")||"");if(!l&&c&&c[e]&&!i)return!0}if(!e.o.cleanHTML.removeEmptyElements)return!1;let u=e.s.isCollapsed()?e.s.range.startContainer:null;return n.Dom.isElement(t)&&null!=t.nodeName.match(o.IS_INLINE)&&!n.Dom.isTemporary(t)&&!(t.hasAttribute("id")||"A"===t.nodeName&&t.hasAttribute("name"))&&0===(0,s.trimInv)(t.innerHTML).length&&(null==i||!n.Dom.isOrContains(t,i))&&(null==u||!n.Dom.isOrContains(t,u))}(e,t,u,l,c)?i:(n.Dom.safeRemove(t),!0)}},45219:function(e,t,i){"use strict";i.d(t,{visitNodeWalker:function(){return r}});var o=i(81937),n=i(91560);let s=Object.keys(n);function r(e,t,i,r,a){let l=!1,c=e.o.cleanHTML.disableCleanFilter;for(let u of s)if(!(c&&c.has(u))&&(l=(0,n[u])(e,t,l,i,r,a),o.IS_PROD,!t.isConnected))return!0;return l}},43354:function(e,t,i){"use strict";var o=i(25045),n=i(81937),s=i(51676),r=i(23211),a=i(28077),l=i(65946);i(81008);class c{init(e){this.buttons?.forEach(t=>e.registerButton(t)),e.e.off(`copy.${n.CLIPBOARD_ID} cut.${n.CLIPBOARD_ID}`).on(`copy.${n.CLIPBOARD_ID} cut.${n.CLIPBOARD_ID}`,t=>{let i=function(e,t){if(!t||e.s.isCollapsed())return t;let i=e.s.range.commonAncestorContainer;r.Dom.isElement(i)||(i=i.parentElement);let o=t;for(;i&&i!==e.editor&&r.Dom.isElement(i)&&!r.Dom.isBlock(i);){let e=i.cloneNode(!1);e.innerHTML=o,o=e.outerHTML,i=i.parentElement}return o}(e,e.s.html),o=(0,l.getDataTransfer)(t)||(0,l.getDataTransfer)(e.ew)||(0,l.getDataTransfer)(t.originalEvent);o&&(o.setData(n.TEXT_PLAIN,(0,l.stripTags)(i)),o.setData(n.TEXT_HTML,i)),e.buffer.set(n.CLIPBOARD_ID,i),e.e.fire("pasteStack",{html:i,action:e.o.defaultActionOnPaste||n.INSERT_AS_HTML}),"cut"===t.type&&(e.s.remove(),e.s.focus()),t.preventDefault(),e?.events?.fire("afterCopy",i)})}destruct(e){(0,s.cached)(e,"buffer")?.set(n.CLIPBOARD_ID,""),e?.events?.off("."+n.CLIPBOARD_ID)}constructor(){(0,o._)(this,"jodit",void 0),(0,o._)(this,"buttons",[{name:"cut",group:"clipboard"},{name:"copy",group:"clipboard"},{name:"paste",group:"clipboard"},{name:"selectall",group:"clipboard"}])}}a.pluginSystem.add("clipboard",c)},81008:function(e,t,i){"use strict";var o=i(29434),n=i(5266),s=i(51457),r=i.n(s),a=i(23602),l=i.n(a),c=i(86899),u=i.n(c),h=i(95320),d=i.n(h);n.Config.prototype.controls.cut={command:"cut",isDisabled:e=>e.s.isCollapsed(),tooltip:"Cut selection"},n.Config.prototype.controls.copy={command:"copy",isDisabled:e=>e.s.isCollapsed(),tooltip:"Copy selection"},n.Config.prototype.controls.selectall={icon:"select-all",command:"selectall",tooltip:"Select all"},o.Icon.set("copy",r()).set("cut",l()).set("paste",u()).set("select-all",d())},42462:function(e,t,i){"use strict";var o=i(28077),n=i(65946);i(8071),o.pluginSystem.add("color",function(e){e.registerButton({name:"brush",group:"color"});let t=(t,i,o)=>{let s=(0,n.normalizeColor)(o)||"",r="background"===t?{backgroundColor:s}:{color:s},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:r}})}),e.s.sel?.removeAllRanges()):e.s.commitStyle({attributes:{style:r}}),e.synchronizeValues(),!1};e.registerCommand("forecolor",t).registerCommand("background",t)})},8071:function(e,t,i){"use strict";var o=i(23211),n=i(65946),s=i(29434),r=i(5266),a=i(15753),l=i(45674),c=i.n(l);function u(e,t,i){(0,n.css)(e,t,i),(0,n.attr)(e,"style")||(0,n.attr)(e,"style",null)}s.Icon.set("brush",c()),r.Config.prototype.controls.brushCell={isVisible:e=>!e.o.disablePlugins.includes("color"),icon:"brush",popup(e,t,i){if(!(0,n.isJoditObject)(e))return;let o=e.getInstance("Table",e.o).getAllSelectedCells();if(!o.length)return!1;let s=t=>(0,a.ColorPickerWidget)(e,n=>{o.forEach(e=>{u(e,t,n)}),e.lock(),e.synchronizeValues(),i(),e.unlock()},(0,n.css)(o[0],t));return(0,a.TabsWidget)(e,[{name:"Background",content:s("background-color")},{name:"Text",content:s("color")},{name:"Border",content:s("border-color")}])},tooltip:"Background"},r.Config.prototype.controls.brush={isVisible:e=>!e.o.disablePlugins.includes("color"),update(e,t){let i=(0,n.dataBind)(t,"color"),s=(i,o)=>!!o&&o!==(0,n.css)(e.editor,i).toString()&&(t.state.icon.fill=o,!0);if(i){let e=(0,n.dataBind)(t,"color");s("color"===e?e:"background-color",i);return}let r=e.s.current();if(r&&!t.state.disabled){let t=o.Dom.closest(r,o.Dom.isElement,e.editor)||e.editor,i=s("color",(0,n.css)(t,"color").toString()),a=s("background-color",(0,n.css)(t,"background-color").toString());if(i||a)return}t.state.icon.fill="",t.state.activated=!1},popup(e,t,i,s){let r="",l="",c,h=null;return t&&t!==e.editor&&o.Dom.isNode(t)&&(o.Dom.isElement(t)&&e.s.isCollapsed()&&!o.Dom.isTag(t,new Set(["br","hr"]))&&(h=t),o.Dom.up(t,e=>{if(o.Dom.isHTMLElement(e)){let t=(0,n.css)(e,"color",!0),i=(0,n.css)(e,"background-color",!0);if(t)return r=t.toString(),!0;if(i)return l=i.toString(),!0}},e.editor)),c=[{name:"Background",content:(0,a.ColorPickerWidget)(e,t=>{h?u(h,"backgroundColor",t):e.execCommand("background",!1,t),(0,n.dataBind)(s,"color",t),(0,n.dataBind)(s,"color-mode","background"),i()},l)},{name:"Text",content:(0,a.ColorPickerWidget)(e,t=>{h?u(h,"color",t):e.execCommand("forecolor",!1,t),(0,n.dataBind)(s,"color",t),(0,n.dataBind)(s,"color-mode","color"),i()},r)}],"background"!==e.o.colorPickerDefaultTab&&(c=c.reverse()),(0,a.TabsWidget)(e,c,h)},exec(e,t,{button:i}){let s=(0,n.dataBind)(i,"color-mode"),r=(0,n.dataBind)(i,"color");if(!s)return!1;if(t&&t!==e.editor&&o.Dom.isNode(t)&&o.Dom.isElement(t))switch(s){case"color":u(t,"color",r);break;case"background":u(t,"backgroundColor",r)}else e.execCommand("background"===s?s:"forecolor",!1,r)},tooltip:"Fill color or set the text color"}},30062:function(e,t,i){"use strict";var o=i(23211),n=i(28077),s=i(80991),r=i(29434),a=i(5266),l=i(3843),c=i.n(l),u=i(38639);let h="copy-format",d=["lineHeight","fontWeight","fontStyle","fontSize","fontFamily","color","margin","padding","borderWidth","borderStyle","borderColor","borderRadius","backgroundColor","textDecorationLine"],p=(e,t,i,o)=>{let n=(0,s.css)(i,t);return n===o[t]&&(n=i.parentNode&&i!==e.editor&&i.parentNode!==e.editor?p(e,t,i.parentNode,o):void 0),n};a.Config.prototype.controls.copyformat={exec(e,t,{button:i}){if(t){if(e.buffer.exists(h))e.buffer.delete(h),e.e.off(e.editor,"mouseup."+h);else{let i,n={},r=o.Dom.up(t,e=>e&&!o.Dom.isText(e),e.editor)||e.editor,a=e.createInside.span();o.Dom.append(e.editor,a),d.forEach(e=>{n[e]=(0,s.css)(a,e)}),a!==e.editor&&o.Dom.safeRemove(a);let l=(i={},r&&d.forEach(t=>{i[t]=p(e,t,r,n),t.match(/border(Style|Color)/)&&!i.borderWidth&&(i[t]=void 0)}),i);e.e.on(e.editor,"mouseup."+h,()=>{e.buffer.delete(h);let t=e.s.current();t&&(o.Dom.isTag(t,"img")?(0,s.css)(t,l):e.s.commitStyle({attributes:{style:l}})),e.e.off(e.editor,"mouseup."+h)}),e.buffer.set(h,!0)}i.update()}},isActive:e=>e.buffer.exists(h),tooltip:"Paint format"},n.pluginSystem.add("copyformat",function(e){e.registerButton({name:"copyformat",group:"clipboard"}),(0,n.extendLang)(u)}),r.Icon.set("copyformat",c())},38639:function(e,t,i){"use strict";i.r(t),i.d(t,{ar:function(){return n.a},cs_cz:function(){return n.a},de:function(){return n.a},es:function(){return n.a},fa:function(){return n.a},fi:function(){return n.a},fr:function(){return n.a},he:function(){return n.a},hu:function(){return n.a},id:function(){return n.a},it:function(){return n.a},ja:function(){return n.a},ko:function(){return n.a},mn:function(){return n.a},nl:function(){return n.a},pl:function(){return n.a},pt_br:function(){return n.a},ru:function(){return n.a},tr:function(){return n.a},zh_cn:function(){return n.a},zh_tw:function(){return n.a}});var o=i(41324),n=i.n(o)},63974:function(e,t,i){"use strict";var o=i(25045),n=i(27795),s=i(28077),r=i(65946),a=i(4040),l=i(91206);let c=new Set(["img","table","jodit","iframe","hr"]);class u extends l.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&&n.Dom.isTag(t.firstChild,"br")&&e.s.removeNode(t.firstChild),!(0,a.trim)(e.editor.textContent||"")&&!n.Dom.first(e.editor,e=>n.Dom.isTag(e,c))&&(!t||!n.Dom.closest(t,"table",e.editor))){n.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;t.deleteContents();let i=e.createInside.fake();t.insertNode(i);let o=n.Dom.findSibling(i,!0),s=n.Dom.findSibling(i,!1);return this.__moveContentInLeftSibling(i,o,s),t.setStartBefore(i),t.collapse(!0),this.__moveCursorInEditableSibling(e,o,i,t),this.__addBrInEmptyBlock(i,s,t),n.Dom.safeRemove(i),e.s.selectRange(t),!1}__moveContentInLeftSibling(e,t,i){t=this.__defineRightLeftBox(t),!n.Dom.isList(i)&&!n.Dom.isTag(i,"table")&&n.Dom.isBlock(i)&&n.Dom.isBlock(t)&&(n.Dom.append(t,e),n.Dom.moveContent(i,t),n.Dom.safeRemove(i)),n.Dom.isList(i)&&n.Dom.isLeaf(i.firstElementChild)&&n.Dom.isEmpty(i.firstElementChild)&&n.Dom.safeRemove(i.firstElementChild)}__defineRightLeftBox(e){if(!n.Dom.isList(e))return e;let t=e.lastElementChild;return n.Dom.isLeaf(t)||(t=this.j.createInside.element("li"),n.Dom.append(e,t)),t}__addBrInEmptyBlock(e,t,i){let o=this.j;if(e.isConnected&&n.Dom.isBlock(e.parentNode)&&!e.nextSibling&&!e.previousSibling){let t=o.createInside.element("br");n.Dom.after(e,t),i.setStartBefore(t),i.collapse(!0)}if(n.Dom.isTag(t,"table")){let e=(0,r.$$)("td,th",t).shift();n.Dom.isCell(e)&&n.Dom.isEmpty(e)&&n.Dom.append(e,o.createInside.element("br"))}}__moveCursorInEditableSibling(e,t,i,o){if(!t||!n.Dom.isText(t)){let t=n.Dom.closest(i,n.Dom.isBlock,e.editor)??e.editor,s=n.Dom.prev(i,n.Dom.isText,t);s&&(o.setStartAfter(s),o.collapse(!0),n.Dom.safeRemove(i))}}}(0,o._)(u,"requires",["backspace"]),s.pluginSystem.add("deleteCommand",u)},65701:function(e,t,i){"use strict";i(5266).Config.prototype.draggableTags=["img","jodit-media","jodit"]},43102:function(e,t,i){"use strict";var o=i(25045),n=i(31635),s=i(84839),r=i(27795),a=i(28077),l=i(65946),c=i(91206);i(65701);class u extends c.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())),o=r.Dom.furthest(t,i,this.j.editor)||(i(t)?t:null);o&&(r.Dom.isTag(o.parentElement,"a")&&o.parentElement.firstChild===o&&o.parentElement.lastChild===o&&(o=o.parentElement),this.startDragging(o,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 o=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+o.left,top:e.clientY+o.top,width:t?.offsetWidth??100,height:t?.offsetHeight??100}),r.Dom.append((0,a.getContainer)(this.j,u),this.draggable)}(0,l.css)(this.draggable,{left:e.clientX+o.left,top:e.clientY+o.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&&(r.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=>{r.Dom.isEmptyTextNode(e)&&r.Dom.safeRemove(e)}),t&&r.Dom.isEmpty(t)&&!r.Dom.isCell(t)&&r.Dom.safeRemove(t),r.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,o._)(this,"dragList",[]),(0,o._)(this,"draggable",null),(0,o._)(this,"isCopyMode",!1),(0,o._)(this,"diffStep",10),(0,o._)(this,"startX",0),(0,o._)(this,"startY",0),(0,o._)(this,"state",0)}}(0,n.__decorate)([s.autobind],u.prototype,"onStartDragElement",null),(0,n.__decorate)([s.autobind],u.prototype,"onDragStart",null),(0,n.__decorate)([(0,s.throttle)(e=>e.defaultTimeout/10)],u.prototype,"onDrag",null),(0,n.__decorate)([s.autobind],u.prototype,"onDragEnd",null),(0,n.__decorate)([s.autobind],u.prototype,"onDrop",null),a.pluginSystem.add("dragAndDropElement",u)},64222:function(e,t,i){"use strict";var o=i(25045),n=i(31635),s=i(81937),r=i(84839),a=i(23211),l=i(28077),c=i(65946),u=i(91206),h=i(63425);class d extends u.Plugin{afterInit(){this.j.e.on([window,this.j.ed,this.j.editor],"dragstart.DragAndDrop",this.onDragStart)}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,c.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(h.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,c.dataBind)(this.draggable,"target",i)),this.addDragListeners()}addDragListeners(){this.j.e.on("dragover",this.onDrag).on("drop.DragAndDrop",this.onDrop).on(window,"dragend.DragAndDrop drop.DragAndDrop mouseup.DragAndDrop",this.onDragEnd)}removeDragListeners(){this.j.e.off("dragover",this.onDrag).off("drop.DragAndDrop",this.onDrop).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),o=this.__getWorkFragment(i,e);t&&t.removeAllRanges(),this.j.s.insertCursorAtPoint(e.clientX,e.clientY),o&&this.__insertFragment.call(this,o,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,c.attr)(this.draggable,"-is-file")?["a","href"]:["img","src"];i=this.j.createInside.element(e),(0,c.attr)(i,t,(0,c.attr)(this.draggable,"data-src")||(0,c.attr)(this.draggable,"src")||""),"a"===e&&(i.textContent=(0,c.attr)(i,t)||"")}else i=(0,c.dataBind)(this.draggable,"target");else this.getText(t)&&(i=this.j.createInside.fromHTML(this.getText(t)));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,o._)(this,"isFragmentFromEditor",!1),(0,o._)(this,"isCopyMode",!1),(0,o._)(this,"startDragPoint",{x:0,y:0}),(0,o._)(this,"draggable",null),(0,o._)(this,"bufferRange",null),(0,o._)(this,"getText",e=>{let t=(0,c.getDataTransfer)(e);return t?t.getData(s.TEXT_HTML)||t.getData(s.TEXT_PLAIN):null})}}(0,n.__decorate)([r.autobind],d.prototype,"onDragStart",null),(0,n.__decorate)([(0,r.throttle)(e=>e.defaultTimeout/10)],d.prototype,"onDrag",null),(0,n.__decorate)([r.autobind],d.prototype,"onDragEnd",null),(0,n.__decorate)([r.autobind],d.prototype,"onDrop",null),l.pluginSystem.add("dragAndDrop",d)},33915:function(e,t,i){"use strict";i.r(t),i.d(t,{removeExtraBr:function(){return o.removeExtraBr}});var o=i(14841)},14841:function(e,t,i){"use strict";i.d(t,{removeExtraBr:function(){return s}});var o=i(23211);let n=new Set(["table","pre","blockquote","code"]);function s(e,t){if(!e.o.dtd.removeExtraBr||o.Dom.isTag(t,"br"))return;let i=o.Dom.furthest(t,o.Dom.isBlock,e.editor);if(i&&!o.Dom.isTag(i,n)){let i=o.Dom.isTag(t,"br")?t:o.Dom.findNotEmptySibling(t,!1);if(!o.Dom.isTag(i,"br")||o.Dom.findNotEmptySibling(i,!1))return;e.s.setCursorBefore(i),o.Dom.safeRemove(i)}}},34693:function(e,t,i){"use strict";i.d(t,{checkBlockNesting:function(){return n}});var o=i(23211);function n(e,t){if(o.Dom.isFragment(t)&&(t=t.firstChild),e.o.dtd.checkBlockNesting&&o.Dom.isBlock(t)){let t=null,i=e.s.current()?.parentElement??null;for(;i&&i!==e.editor;){if(o.Dom.isBlock(i)){if(e.o.dtd.blockLimits[i.nodeName.toLowerCase()])break;t=i}i=i.parentElement}t&&(e.s.setCursorAfter(t),o.Dom.isEmpty(t)&&o.Dom.safeRemove(t))}}},14282:function(e,t,i){"use strict";i.r(t),i.d(t,{checkBlockNesting:function(){return o.checkBlockNesting}});var o=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,details:1,dir:1,div:1,dl:1,fieldset:1,figcaption:1,figure:1,footer:1,form:1,header:1,hgroup: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 o=i(31635),n=i(68616),s=i(28077),r=i(91206);i(96722);var a=i(33915),l=i(14282);class c extends r.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,o.__decorate)([(0,n.watch)(":beforeInsertNode")],c.prototype,"__onBeforeInsertNode",null),(0,o.__decorate)([(0,n.watch)(":afterInsertNode")],c.prototype,"__onAfterInsertNode",null),s.pluginSystem.add("dtd",c)},3678:function(e,t,i){"use strict";var o=i(31635),n=i(81937),s=i(84839),r=i(23211),a=i(28077),l=i(22289),c=i(18855),u=i(10918);class h extends c.Plugin{afterInit(e){let t=e.o.enter.toLowerCase(),i=t===n.BR.toLowerCase();e.o.enterBlock||(e.o.enterBlock=i?n.PARAGRAPH:t),e.registerCommand("enter",(e,t,i={})=>this.onEnter(i))}onEnterKeyDown(e){if(e.key===n.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{r.Dom.safeInsertNode(t.s.range,i),(0,u.moveCursorOutFromSpecialTags)(t,i,["a"]);let o=(0,u.getBlockWrapper)(i,t),n=r.Dom.isLeaf(o);if((!n||e?.shiftKey)&&(0,u.checkBR)(i,t,e?.shiftKey,o))return!1;if(o||(0,u.hasPreviousBlock)(i,t)||(o=(0,u.wrapText)(i,t)),!o)return(0,u.insertParagraph)(i,t,n?"li":t.o.enter),!1;if(!(0,u.checkUnsplittableBox)(i,t,o))return!1;if(n&&this.__isEmptyListLeaf(o))return(0,u.processEmptyLILeaf)(i,t,o),!1;(0,u.splitFragment)(i,t,o)}finally{i.isConnected&&t.s.setCursorBefore(i),r.Dom.safeRemove(i)}}__isEmptyListLeaf(e){let t=this.j.e.fire("enterIsEmptyListLeaf",e);return(0,l.isBoolean)(t)?t:r.Dom.isEmpty(e)}beforeDestruct(e){e.e.off("keydown.enter")}}(0,o.__decorate)([(0,s.watch)(":keydown.enter")],h.prototype,"onEnterKeyDown",null),a.pluginSystem.add("enter",h)},34287:function(e,t,i){"use strict";i.d(t,{checkBR:function(){return r}});var o=i(81937),n=i(23211),s=i(60898);function r(e,t,i,r){let l=!!n.Dom.closest(e,["pre","blockquote"],t.editor),c=!l&&(r?n.Dom.isCell(r):!!n.Dom.closest(e,["td","th"],t.editor));if(t.o.enter.toLowerCase()===o.BR.toLowerCase()||c||i&&!l||!i&&l){var u;let i;if(l&&(i=a(a(u=e)))&&(n.Dom.safeRemove(a(u)),n.Dom.safeRemove(i),1))return!1;let o=t.createInside.element("br");if(n.Dom.before(e,o),!n.Dom.findNotEmptySibling(o,!1)){let t=o.cloneNode();n.Dom.after(o,t),n.Dom.before(t,e)}return(0,s.scrollIntoViewIfNeeded)(o,t.editor,t.ed),!0}return!1}function a(e){if(!e)return!1;let t=n.Dom.findSibling(e,!0);return!!t&&!!n.Dom.isTag(t,"br")&&t}},8524:function(e,t,i){"use strict";i.d(t,{checkUnsplittableBox:function(){return n}});var o=i(23211);function n(e,t,i){return!!o.Dom.canSplitBlock(i)||(o.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,s=o.IS_BLOCK){let r=t,a=i.editor;do{if(!r||r===a)break;if(s.test(r.nodeName)){if(n.Dom.isLeaf(r))return r;return e(r.parentNode,i,/^li$/i)||r}r=r.parentNode}while(r&&r!==a)return null}}});var o=i(81937),n=i(23211)},66862:function(e,t,i){"use strict";i.d(t,{hasPreviousBlock:function(){return n}});var o=i(23211);function n(e,t){return!!o.Dom.prev(e,e=>o.Dom.isBlock(e)||o.Dom.isImage(e),t.editor)}},10918:function(e,t,i){"use strict";i.d(t,{checkBR:function(){return o.checkBR},checkUnsplittableBox:function(){return n.checkUnsplittableBox},getBlockWrapper:function(){return s.getBlockWrapper},hasPreviousBlock:function(){return r.hasPreviousBlock},insertParagraph:function(){return a.insertParagraph},moveCursorOutFromSpecialTags:function(){return l.moveCursorOutFromSpecialTags},processEmptyLILeaf:function(){return c.processEmptyLILeaf},splitFragment:function(){return u.splitFragment},wrapText:function(){return h.wrapText}});var o=i(34287),n=i(8524),s=i(83376),r=i(66862),a=i(65710),l=i(47919),c=i(34672),u=i(46303),h=i(52938)},65710:function(e,t,i){"use strict";i.d(t,{insertParagraph:function(){return r}});var o=i(23211),n=i(7909),s=i(60898);function r(e,t,i,r){let a="br"===i.toLowerCase(),{createInside:l}=t,c=l.element(i),u=l.element("br");return a||o.Dom.append(c,u),r&&r.cssText&&(0,n.attr)(c,"style",r.cssText),o.Dom.after(e,c),o.Dom.before(a?c:u,e),(0,s.scrollIntoViewIfNeeded)(c,t.editor,t.ed),c}},47919:function(e,t,i){"use strict";i.d(t,{moveCursorOutFromSpecialTags:function(){return n}});var o=i(23211);function n(e,t,i){let{s:n}=e,s=o.Dom.closest(t,i,e.editor);s&&(n.cursorOnTheRight(s,t)?o.Dom.after(s,t):n.cursorOnTheLeft(s,t)&&o.Dom.before(s,t))}},34672:function(e,t,i){"use strict";i.d(t,{processEmptyLILeaf:function(){return r}});var o=i(23211),n=i(28723),s=i(65710);function r(e,t,i){let r=o.Dom.closest(i,["ol","ul"],t.editor);if(!r)return;let a=r.parentElement,l=o.Dom.isLeaf(a),c=l?a:r,u=t.s.createRange();u.setStartAfter(i),u.setEndAfter(r);let h=u.extractContents();o.Dom.after(c,e),o.Dom.safeRemove(i),(0,n.$$)("li",r).length||o.Dom.safeRemove(r);let d=(0,s.insertParagraph)(e,t,l?"li":t.o.enter);o.Dom.first(h,e=>o.Dom.isTag(e,"li"))&&(l?o.Dom.append(d,h):o.Dom.after(d,h))}},46303:function(e,t,i){"use strict";i.d(t,{splitFragment:function(){return r}});var o=i(23211),n=i(60898),s=i(65710);function r(e,t,i){let r=t.s,{enter:a}=t.o,l=a.toLowerCase(),c=o.Dom.isLeaf(i),u=i.tagName.toLowerCase()===l||c,h=r.cursorOnTheRight(i,e),d=r.cursorOnTheLeft(i,e);if(!u&&(h||d)){h?o.Dom.after(i,e):o.Dom.before(i,e),(0,s.insertParagraph)(e,t,l),d&&!h&&o.Dom.prepend(i,e);return}let{scrollTop:p}=t.editor;r.splitSelection(i,e),t.editor.scrollTop!==p&&(t.editor.scrollTop=p),(0,n.scrollIntoViewIfNeeded)(i,t.editor,t.ed)}},52938:function(e,t,i){"use strict";i.d(t,{wrapText:function(){return n}});var o=i(23211);function n(e,t){let i=e;o.Dom.up(i,e=>{e&&e.hasChildNodes()&&e!==t.editor&&(i=e)},t.editor);let n=o.Dom.wrapInline(i,t.o.enter,t);if(o.Dom.isEmpty(n)){let i=t.createInside.element("br");o.Dom.append(n,i),o.Dom.before(i,e)}return n}},49764:function(e,t,i){"use strict";var o=i(23211),n=i(28077),s=i(7909),r=i(5266),a=i(15753);function l(e){e.files?.forEach(t=>{let i=this.createInside.element("a",{href:e.baseurl+t});i.textContent=this.o.uploader.getDisplayName.call(this.uploader,e.baseurl,t),this.s.insertNode(i)})}r.Config.prototype.file={defaultHandlerSuccess:l},r.Config.prototype.controls.file={popup(e,t,i){let n=(t,i="")=>{e.s.insertNode(e.createInside.fromHTML(`<a href="${t}" title="${i}">${i||t}</a>`))},r=null;return t&&(o.Dom.isTag(t,"a")||o.Dom.closest(t,"a",e.editor))&&(r=o.Dom.isTag(t,"a")?t:o.Dom.closest(t,"a",e.editor)),(0,a.FileSelectorWidget)(e,{filebrowser(e){e.files&&e.files.forEach(t=>n(e.baseurl+t)),i()},upload(t){(e.o.file?.defaultHandlerSuccess??l).call(e,t)},url(e,t){r?((0,s.attr)(r,"href",e),(0,s.attr)(r,"title",t)):n(e,t),i()}},r,i,!1)},tags:["a"],tooltip:"Insert file"},n.pluginSystem.add("file",function(e){e.registerButton({name:"file",group:"media"})})},78690:function(e,t,i){"use strict";var o=i(27795),n=i(28077),s=i(5266);s.Config.prototype.autofocus=!1,s.Config.prototype.cursorAfterAutofocus="end",s.Config.prototype.saveSelectionOnBlur=!0,n.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",()=>{e.o.autofocus&&(e.defaultTimeout?e.async.setTimeout(t,300):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)&&!t.target.childNodes.length&&(e.editor===t.target?e.s.focus():e.s.setCursorIn(t.target))})})})},7433:function(e,t,i){"use strict";var o=i(27795),n=i(4040),s=i(80991),r=i(29434),a=i(5266),l=i(48842),c=i.n(l),u=i(25501),h=i.n(u);a.Config.prototype.defaultFontSizePoints="px",r.Icon.set("font",c()).set("fontsize",h()),a.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();if(!i)return;let n=o.Dom.closest(i,o.Dom.isElement,e.editor);if(!n)return;let r=t.control,a=r.data?.cssRule||"font-size",l=(0,s.css)(n,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,o=t.control.data?.normalize??(e=>e);return!!(i&&t.control.args&&o(t.control.args[0].toString())===o(i.toString()))},isActive(e,t){let i=t.state.value;if(!i)return!1;let o=t.control.data?.normalize??(e=>e),n=t.control.data.cacheListSet;return n||(n=new Set(Object.keys(t.control.list).map(o)),t.control.data.cacheListSet=n),n.has(o(i.toString()))}},a.Config.prototype.controls.font={...a.Config.prototype.controls.fontsize,command:"fontname",textTemplate(e,t){let[i]=t.split(",");return(0,n.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 o=!1;try{o=-1===t.indexOf("dings")&&document.fonts.check("16px "+t,i)}catch{}return`<span data-style="${t}" style="${o?`font-family: ${t}!important;`:""}">${i}</span>`},data:{cssRule:"font-family",normalize:e=>e.toLowerCase().replace(/['"]+/g,"").replace(/[^a-z0-9-]+/g,",")},value(e){let t=e.s.current();if(!t)return;let i=o.Dom.closest(t,o.Dom.isElement,e.editor);if(!i)return;let n=(0,s.css)(i,"font-family").toString();return n===(0,s.css)(e.editor,"font-family").toString()?"":n},tooltip:"Font family"}},50294:function(e,t,i){"use strict";var o=i(28077),n=i(65946);i(7433),o.pluginSystem.add("font",function(e){e.registerButton({name:"font",group:"font"}).registerButton({name:"fontsize",group:"font"});let t=(t,i,o)=>{switch(t){case"fontsize":e.s.commitStyle({attributes:{style:{fontSize:(0,n.normalizeSize)(o,e.o.defaultFontSizePoints)}}});break;case"fontname":e.s.commitStyle({attributes:{style:{fontFamily:o}}})}return e.synchronizeValues(),!1};e.registerCommand("fontsize",t).registerCommand("fontname",t)})},96863:function(e,t,i){"use strict";var o=i(23211),n=i(62101),s=i(29434),r=i(5266),a=i(29348),l=i.n(a);s.Icon.set("paragraph",l()),r.Config.prototype.controls.paragraph={command:"formatBlock",value(e,t){let i=t.control,n=e.s.current(),s=o.Dom.closest(n,o.Dom.isBlock,e.editor);return s?.nodeName.toLowerCase()??i.data?.currentValue},update(e,t){let i=t.control;if(!e.s.current())return!1;let o=t.state.value,s=i.list;return(0,n.isPlainObject)(s)&&s[o.toString()]&&e.o.textIcons&&(t.state.text=s[o.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,n.isPlainObject)(t.control.list)&&!!t.control.list[t.state.value],childTemplate:(e,t,i)=>`<${t} style="margin:0;padding:0"><span>${e.i18n(i)}</span></${t}>`,tooltip:"Insert format block"}},53390:function(e,t,i){"use strict";var o=i(28077);i(96863),o.pluginSystem.add("formatBlock",function(e){e.registerButton({name:"paragraph",group:"font"}),e.registerCommand("formatblock",(t,i,o)=>(e.s.commitStyle({element:o}),e.synchronizeValues(),!1))})},80538:function(e,t,i){"use strict";var o=i(81937),n=i(29434),s=i(5266),r=i(24772),a=i.n(r),l=i(66547),c=i.n(l);s.Config.prototype.fullsize=!1,s.Config.prototype.globalFullSize=!0,n.Icon.set("fullsize",a()).set("shrink",c()),s.Config.prototype.controls.fullsize={exec(e){e.toggleFullSize()},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:o.MODE_SOURCE+o.MODE_WYSIWYG}},69696:function(e,t,i){"use strict";var o=i(23211),n=i(28077),s=i(24497),r=i(80991);i(80538);let a=new Set;n.pluginSystem.add("fullsize",function(e){e.registerButton({name:"fullsize"});let t=!1,i=0,n=0,l=0,c=0,u=!1,h=()=>{let{container:o,events:s}=e;s&&(t?(u||(i=(0,r.css)(o,"height",!0),n=(0,r.css)(o,"width",!0),u=!0),(0,r.css)(o,{height:e.ow.innerHeight,width:e.ow.innerWidth})):u&&((0,r.css)(o,{height:i||"auto",width:n||"auto"}),u=!1))},d=i=>{let{container:n,events:u}=e;if(n){if(void 0===i&&(i=!n.classList.contains("jodit_fullsize")),e.setMod("fullsize",i),e.o.fullsize=i,t=i,n.classList.toggle("jodit_fullsize",i),e.toolbar&&((0,s.isJoditObject)(e)&&e.toolbarContainer&&o.Dom.append(e.toolbarContainer,e.toolbar.container),(0,r.css)(e.toolbar.container,"width","auto")),i?a.add(n):a.delete(n),e.o.globalFullSize&&(1===a.size&&i||0===a.size&&!i)){i&&(l=e.ow.scrollX,c=e.ow.scrollY);let t=n.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;h(),i||e.ow.scrollTo(l,c)}u.fire("afterResize")}};e.o.globalFullSize&&e.e.on(e.ow,"resize",h),e.e.on("afterInit afterOpen",()=>{e.toggleFullSize(e?.options?.fullsize)}).on("toggleFullSize",d).on("beforeDestruct",()=>{t&&d(!1)}).on("beforeDestruct",()=>{e.events&&e.e.off(e.ow,"resize",h)})})},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 o=i(25045),n=i(81937),s=i(28077),r=i(65946),a=i(91206);i(14907);class l extends a.Plugin{afterInit(e){(0,r.keys)(e.o.commandToHotkeys,!1).forEach(t=>{let i=e.o.commandToHotkeys[t];i&&((0,r.isArray)(i)||(0,r.isString)(i))&&e.registerHotkeyToCommand(i,t)});let t=!1;e.e.off(".hotkeys").on([e.ow,e.ew],"keydown.hotkeys",e=>{if(e.key===n.KEY_ESC)return this.j.e.fire("escape",e)}).on("keydown.hotkeys",i=>{let o=this.onKeyPress(i),n={shouldStop:!0};if(!1===this.j.e.fire(o+".hotkey",i.type,n))if(n.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,o._)(this,"onKeyPress",e=>{let t=this.specialKeys[e.which],i=(e.key||String.fromCharCode(e.which)).toLowerCase(),o=[t||i];return["alt","ctrl","shift","meta"].forEach(i=>{e[i+"Key"]&&t!==i&&o.push(i)}),(0,r.normalizeKeyAliases)(o.join("+"))}),(0,o._)(this,"specialKeys",{8:"backspace",9:"tab",10:"return",13:"return",16:"shift",17:"ctrl",18:"alt",19:"pause",20:"capslock",27:"esc",32:"space",33:"pageup",34:"pagedown",35:"end",36:"home",37:"left",38:"up",39:"right",40:"down",45:"insert",46:"del",59:";",61:"=",91:"meta",96:"0",97:"1",98:"2",99:"3",100:"4",101:"5",102:"6",103:"7",104:"8",105:"9",106:"*",107:"+",109:"-",110:".",111:"/",112:"f1",113:"f2",114:"f3",115:"f4",116:"f5",117:"f6",118:"f7",119:"f8",120:"f9",121:"f10",122:"f11",123:"f12",144:"numlock",145:"scroll",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"})}}s.pluginSystem.add("hotkeys",l)},2952:function(e,t,i){"use strict";var o=i(27795),n=i(28077),s=i(29434),r=i(5266),a=i(89097),l=i.n(a);s.Icon.set("hr",l()),r.Config.prototype.controls.hr={command:"insertHorizontalRule",tags:["hr"],tooltip:"Insert Horizontal Line"},n.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=o.Dom.closest(t.parentElement,o.Dom.isBlock,e.editor);i&&o.Dom.isEmpty(i)&&i!==e.editor&&(o.Dom.after(i,t),o.Dom.safeRemove(i));let n=o.Dom.next(t,o.Dom.isBlock,e.editor,!1);return n||(n=e.createInside.element(e.o.enter),o.Dom.after(t,n)),e.s.setCursorIn(n),!1})})},17326:function(e,t,i){"use strict";var o=i(5266);o.Config.prototype.iframeBaseUrl="",o.Config.prototype.iframeTitle="Jodit Editor",o.Config.prototype.iframeDoctype="<!DOCTYPE html>",o.Config.prototype.iframeDefaultSrc="about:blank",o.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_editor .jodit_iframe_wrapper{display: block;clear: both;user-select: none;position: relative;}.jodit_editor .jodit_iframe_wrapper:after {position:absolute;content:"";z-index:1;top:0;left:0;right: 0;bottom: 0;cursor: pointer;display: block;background: rgba(0, 0, 0, 0);} .jodit-wysiwyg_image-selected::selection,.jodit-wysiwyg_image-selected *:not(img)::selection{background:transparent}.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}',o.Config.prototype.iframeCSSLinks=[],o.Config.prototype.iframeSandbox=null},81144:function(e,t,i){"use strict";var o=i(81937),n=i(23211),s=i(28077),r=i(65946);i(17326),s.pluginSystem.add("iframe",function(e){let t=e.options;e.e.on("afterSetMode",()=>{e.isEditorMode()&&e.s.focus()}).on("generateDocumentStructure.iframe",(e,i)=>{let o=e||i.iframe.contentWindow.document;if(o.open(),o.write(t.iframeDoctype+`<html dir="${t.direction}" class="jodit" lang="${(0,r.defaultLanguage)(t.language)}">`+"<head>"+`<title>${t.iframeTitle}</title>`+(t.iframeBaseUrl?`<base href="${t.iframeBaseUrl}"/>`:"")+'</head><body class="jodit-wysiwyg"></body></html>'),o.close(),t.iframeCSSLinks&&t.iframeCSSLinks.forEach(e=>{let t=o.createElement("link");(0,r.attr)(t,"rel","stylesheet"),(0,r.attr)(t,"href",e),o.head&&n.Dom.append(o.head,t)}),t.iframeStyle){let e=o.createElement("style");e.innerHTML=t.iframeStyle,o.head&&n.Dom.append(o.head,e)}}).on("createEditor",()=>{if(!t.iframe)return;let i=e.c.element("iframe");(0,r.css)(i,"display","block"),i.src="about:blank",i.className="jodit-wysiwyg_iframe",(0,r.attr)(i,{allowtransparency:"true",tabindex:t.tabIndex.toString(),frameborder:"0"}),null!=t.iframeSandbox&&(0,r.attr)(i,"sandbox",t.iframeSandbox),n.Dom.append(e.workplace,i),e.iframe=i;let s=e.e.fire("generateDocumentStructure.iframe",null,e);return(0,r.callPromise)(s,()=>{if(!e.iframe)return!1;let i=e.iframe.contentWindow.document;e.editorWindow=e.iframe.contentWindow;let n=t.editHTMLDocumentMode,s=()=>{(0,r.attr)(i.body,"contenteditable",e.getMode()!==o.MODE_SOURCE&&!e.getReadOnly()||null)},a=e=>{let t=/<body.*<\/body>/im,i="{%%BODY%%}",o=t.exec(e);return o&&(e=e.replace(t,i).replace(/<span([^>]*?)>(.*?)<\/span>/gim,"").replace(/&lt;span([^&]*?)&gt;(.*?)&lt;\/span&gt;/gim,"").replace(i,o[0].replace(/(<body[^>]+?)min-height["'\s]*:[\s"']*[0-9]+(px|%)/im,"$1").replace(/(<body[^>]+?)([\s]*["'])?contenteditable["'\s]*=[\s"']*true["']?/im,"$1").replace(/<(style|script|span)[^>]+jodit[^>]+>.*?<\/\1>/g,"")).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")),e};if(n){let t=e.element.tagName;if("TEXTAREA"!==t&&"INPUT"!==t)throw(0,r.error)("If enable `editHTMLDocumentMode` - source element should be INPUT or TEXTAREA");e.e.on("beforeGetNativeEditorValue",()=>a(e.o.iframeDoctype+i.documentElement.outerHTML)).on("beforeSetNativeEditorValue",({value:t})=>{if(e.isLocked)return!1;if(/<(html|body)/i.test(t)){if(a(i.documentElement.outerHTML)!==a(t)){var o;let n;o=a(t),n=new DOMParser().parseFromString(o,"text/html"),e.e.fire("safeHTML",n.documentElement),i.replaceChild(i.adoptNode(n.documentElement),i.documentElement),e.editor=i.body,s(),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",s),"auto"===t.height){i.documentElement&&(0,r.css)(i.documentElement,"overflowY","hidden");let o=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,r.css)(e.iframe,"height",e.editor.offsetHeight+i)}})},e.defaultTimeout/2);if(e.e.on("change afterInit afterSetMode resize",o).on([e.iframe,e.ew,i.documentElement],"load",o).on(i,"readystatechange DOMContentLoaded",o),"function"==typeof ResizeObserver){let t=new ResizeObserver(o);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})})})},51034:function(e,t,i){"use strict";i(5266).Config.prototype.imageProcessor={replaceDataURIToBlobIdInView:!0}},39978:function(e,t,i){"use strict";var o=i(31635),n=i(81937),s=i(84839),r=i(23211),a=i(28077),l=i(65946),c=i(91206),u=i(23112);i(51034);let h="__jodit_imageprocessor_binded",d=h+"blob-id",p="jodit-wysiwyg_image-selected";class f extends c.Plugin{afterInit(e){e.e.on(e.ed,"selectionchange",this.onSelectionChange)}beforeDestruct(e){e.e.off(e.ed,"selectionchange",this.onSelectionChange),e.editor.classList.remove(p);let t=(0,s.cached)(e,"buffer"),i=t?.get(d);if(t&&i){for(let e of Object.keys(i))URL.revokeObjectURL(e);t.delete(d)}}onAfterGetValueFromEditor(e,t){if(t!==n.SOURCE_CONSUMER)return this.onBeforeSetElementValue(e)}onBeforeSetElementValue(e){let{jodit:t}=this;if(!t.o.imageProcessor.replaceDataURIToBlobIdInView)return;let i=t.buffer.get(d);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:o,endContainer:n,endOffset:s}=t.getRangeAt(0);return i===n&&s===o+1&&r.Dom.isTag(i.childNodes[o],"img")&&r.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,h)||((0,l.dataBind)(e,h,!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 o=t.src;try{i=(0,u.dataURItoBlob)(o)}catch{return}t.src=URL.createObjectURL(i),e.e.fire("internalUpdate");let{buffer:n}=e,s=n.get(d)||{};s[t.src]=o,e.buffer.set(d,s)}(t,e),t.e.on(e,"mousedown touchstart",()=>{(function(e){for(let t of["previousSibling","nextSibling"]){let i=e[t];for(;r.Dom.isText(i)&&!i.nodeValue?.replace((0,n.INVISIBLE_SPACE_REG_EXP)(),"");){let e=i[t];r.Dom.safeRemove(i),i=e}}})(e),t.s.select(e)}))})}}(0,o.__decorate)([(0,s.watch)(":afterGetValueFromEditor")],f.prototype,"onAfterGetValueFromEditor",null),(0,o.__decorate)([(0,s.watch)(":beforeSetElementValue")],f.prototype,"onBeforeSetElementValue",null),(0,o.__decorate)([s.autobind],f.prototype,"onSelectionChange",null),(0,o.__decorate)([(0,s.watch)([":change",":afterInit",":changePlace"]),(0,s.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,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 o=i(25045),n=i(31635),s=i(84839),r=i(23211),a=i(28077),l=i(65946),c=i(18855),u=i(59400);i(34689);var h=i(27137),d=i(28771),p=i(670),f=i(47744),m=i(71552);class g extends c.Plugin{get form(){return new h.UIImagePropertiesForm(this.j,this.state,this.activeTabState,{openImageEditor:()=>(0,d.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,m.applyValuesToImage)(e,this.state,this.state.sourceImage),e.synchronizeValues(),t.close()}),i.remove.onAction(()=>{e.s.removeNode(this.state.sourceImage),t.close()}),i.cancel.onAction(()=>{t.close()}),t.setHeader(e.i18n("Image properties")),t.setContent(this.form),t.setFooter([[i.cancel,i.remove],i.check]),e.e.on(t,"afterClose",()=>{this.state.image.parentNode&&e.o.image.selectImageAfterClose&&e.s.select(this.state.sourceImage)}),t.setSize(e.o.image.dialogWidth),(0,l.markOwner)(e,t.container),t}get __buttons(){let{j:e}=this;return{check:(0,u.Button)(e,"ok","Apply","primary"),remove:(0,u.Button)(e,"bin","Delete"),cancel:(0,u.Button)(e,"cancel","Cancel")}}open(){return this.activeTabState.activeTab="Image",this.__lock(),this.dialog.open().setModal(!0).setPosition(),this.async.promise((e,t)=>(0,f.readValuesFromImage)(this.j,this.state).then(e,t)).catch(e=>{(0,l.isAbortError)(e)||this.dialog.message.error(e.message)}).finally(()=>this.__unlock()),!1}__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 o=i.target;if(r.Dom.isTag(o,"img"))if(e.o.image.openOnDblClick){if(!1===this.j.e.fire("openOnDblClick",o))return;t.state.sourceImage=o,t.state.image=o.cloneNode(!0),e.o.readonly||(i.stopImmediatePropagation(),i.preventDefault(),t.open())}else i.stopImmediatePropagation(),e.s.select(o)})}).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,s.cached)(this,"__buttons")??{}).forEach(e=>e.destruct()),(0,s.cached)(this,"dialog")?.destruct(),(0,s.cached)(this,"form")?.destruct(),e.e.off(e.editor,".imageproperties").off(".imageproperties")}constructor(...e){super(...e),(0,o._)(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:"",imageLink:"",imageLinkOpenInNewTab:!1,imageWidth:0,imageHeight:0,marginTop:0,marginRight:0,marginBottom:0,marginLeft:0,classes:"",id:"",align:""}}),(0,o._)(this,"activeTabState",{activeTab:"Image"})}}(0,n.__decorate)([s.cache],g.prototype,"form",null),(0,n.__decorate)([s.cache],g.prototype,"dialog",null),(0,n.__decorate)([s.cache],g.prototype,"__buttons",null),(0,n.__decorate)([(0,s.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 n}});var o=i(16849);function n(e,t,i){let n=(0,o.getHAlign)(e,i);t.align="normal"===n?"":n}},47744:function(e,t,i){"use strict";i.d(t,{readValuesFromImage:function(){return c}});var o=i(7909),n=i(80991),s=i(26633),r=i(79310),a=i(18380),l=i(57339);async function c(e,t){let{sourceImage:i,values:c}=t;return(0,s.readAlign)(i,c,e.o.imageAlignClasses),c.borderRadius=parseInt((0,n.cssInline)(i,"border-radius")||"0",10)||0,c.id=(0,o.attr)(i,"id")||"",c.imageTitle=(0,o.attr)(i,"title")||"",c.imageAlt=(0,o.attr)(i,"alt")||"",c.style=(0,o.attr)(i,"style")||"",c.classes=((0,o.attr)(i,"class")||"").replace(/jodit_focused_image[\s]*/,""),(0,a.readMargins)(i,c,t),(0,r.readLink)(t,e,c),c.imageSrc=(0,o.attr)(i,"src")||"",(0,l.readSizes)(i,c,t)}},79310:function(e,t,i){"use strict";i.d(t,{readLink:function(){return s}});var o=i(23211),n=i(7909);function s(e,t,i){let s=o.Dom.closest(e.sourceImage,"a",t.editor);s?(i.imageLink=(0,n.attr)(s,"href")||"",i.imageLinkOpenInNewTab="_blank"===(0,n.attr)(s,"target")):(i.imageLink="",i.imageLinkOpenInNewTab=!1)}},18380:function(e,t,i){"use strict";i.d(t,{readMargins:function(){return n}});var o=i(74264);function n(e,t,i){let n=!0,s=!1;["marginTop","marginRight","marginBottom","marginLeft"].forEach(i=>{let r=e.style.getPropertyValue((0,o.kebabCase)(i));if(!r){s=!0,t[i]=0;return}/^[0-9]+(px)?$/.test(r)&&(r=parseInt(r,10)),t[i]=r,(s&&t[i]||n&&"marginTop"!==i&&t[i]!==t.marginTop)&&(n=!1)}),i.marginIsLocked=n}},57339:function(e,t,i){"use strict";i.d(t,{readSizes:function(){return a}});var o=i(70222),n=i(7909),s=i(80991),r=i(10808);async function a(e,t,i){try{await e.decode()}catch(e){}let a=(0,s.css)(e,"width",!0)||(0,n.attr)(e,"width")||!1,l=(0,s.css)(e,"height",!0)||(0,n.attr)(e,"height")||!1;t.imageWidth=!1!==a?(0,r.normalSizeFromString)(a):e.offsetWidth||e.naturalWidth,(0,o.isNumeric)(t.imageWidth)?t.imageHeight=!1!==l?(0,r.normalSizeFromString)(l):e.offsetHeight||e.naturalHeight:t.imageHeight=l||"";let{imageWidth:c,imageHeight:u}=t,h=parseFloat(c.toString());if(!(0,o.isNumeric)(c)||!(0,o.isNumeric)(u)){i.sizeIsLocked=!1;return}if(!1===l){t.imageHeight=Math.round(h/i.ratio),i.sizeIsLocked=!0;return}i.sizeIsLocked=1>Math.abs(h-parseFloat(u.toString())*i.ratio)}},27137:function(e,t,i){"use strict";i.d(t,{UIImagePropertiesForm:function(){return f}});var o=i(25045),n=i(31635),s=i(84839),r=i(91672),a=i(23211),l=i(65946),c=i(63468),u=i(29434),h=i(15753),d=i(29596),p=i(17306);class f extends c.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:o,aiCommonSuffixPrompt:n}=t.o.aiAssistant;this.promptInput.value=[o,(0,l.isString)(i)?i:"",n].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,o._)(this,"__body",void 0),(0,o._)(this,"__buttons",void 0),(0,o._)(this,"__results",void 0),(0,o._)(this,"__spinner",void 0),(0,o._)(this,"__error",void 0),(0,o._)(this,"promptInput",void 0),(0,o._)(this,"__insertAfterButton",void 0),(0,o._)(this,"__submitButton",void 0),(0,o._)(this,"__tryAgainButton",void 0),(0,o._)(this,"__insertButton",void 0),(0,o._)(this,"__formAiAssistant",void 0),(0,o._)(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,c.Button)(e,"","Insert","primary").onAction(()=>t(this.__aiResult)),this.__insertAfterButton=(0,c.Button)(e,"","Insert After","initial").onAction(()=>i(this.__aiResult));let n=()=>{this.__formAiAssistant.validate()&&(this.__formAiAssistant.submit(),this.__toggleInsertButton(!0),this.__toggleSubmitButton(!0))};this.__submitButton=(0,c.Button)(e,"ai-assistant","").onAction(n),this.__tryAgainButton=(0,c.Button)(e,"update","","initial").onAction(n),this.promptInput=new c.UITextArea(e,{name:"prompt",required:!0,label:"Prompt",placeholder:"Ask AI to improve generated text",className:this.getFullElName("prompt-row-input")});let s=new c.UIBlock(e,[this.__insertButton,this.__insertAfterButton,this.__tryAgainButton],{className:this.getFullElName("prompt-row")});this.__formAiAssistant=new c.UIForm(e,[new c.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,s.container),a.Dom.append(this.__body,this.__formAiAssistant.container),this.onChangePromptValue()}}(0,n.__decorate)([(0,r.watch)(":ai-assistant-response")],h.prototype,"onAiAssistentResponse",null),(0,n.__decorate)([(0,r.watch)(":ai-assistant-error")],h.prototype,"onAiAssistentError",null),(0,n.__decorate)([(0,r.watch)("promptInput:change")],h.prototype,"onChangePromptValue",null),h=(0,n.__decorate)([s.component],h)},28286:function(e,t,i){"use strict";var o=i(25045),n=i(81937),s=i(27795),r=i(28077),a=i(91565),l=i(91206),c=i(42259);i(33831);var u=i(89827),h=i(17523);class d 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,o=i.selection;if(o.isFocused()||o.focus(),(0,u.checkNotCollapsed)(i))return i.e.fire("backSpaceAfterDelete",e),!1;let r=o.range,l=i.createInside.text(n.INVISIBLE_SPACE);try{if(s.Dom.safeInsertNode(r,l),!s.Dom.isOrContains(i.editor,l))return;if(i.e.fire("backSpaceBeforeCases",e,l))return!1;(0,c.moveNodeInsideStart)(i,l,e);let o=i.o.delete.disableCases;if(h.casesMap.some(([s,r])=>{if(!(o&&o.has(s))&&(0,a.isFunction)(r)&&r(i,l,e,t))return n.IS_PROD,!0}))return!1}catch(e){throw n.IS_PROD,e}finally{i.e.fire("backSpaceAfterDelete",e,l),this.safeRemoveEmptyNode(l)}return!1}safeRemoveEmptyNode(e){let{range:t}=this.j.s;t.startContainer===e&&(e.previousSibling?s.Dom.isText(e.previousSibling)?t.setStart(e.previousSibling,e.previousSibling.nodeValue?.length??0):t.setStartAfter(e.previousSibling):e.nextSibling&&(s.Dom.isText(e.nextSibling)?t.setStart(e.nextSibling,0):t.setStartBefore(e.nextSibling)),t.collapse(!0),this.j.s.selectRange(t)),s.Dom.safeRemove(e)}}(0,o._)(d,"requires",["hotkeys"]),r.pluginSystem.add("backspace",d)},26106:function(e,t,i){"use strict";i.d(t,{checkJoinNeighbors:function(){return r}});var o=i(81937),n=i(23211),s=i(15200);function r(e,t,i){let s=t,r=s;for(;s&&!n.Dom.findNotEmptySibling(s,i)&&s.parentElement!==e.editor;)r=s=s.parentElement;if(n.Dom.isElement(r)&&n.Dom.isContentEditable(r,e.editor)){var l,c;let s,u,h,d=n.Dom.findNotEmptySibling(r,i);if(n.Dom.isTag(d,"br"))return n.Dom.safeRemove(d),e.s.setCursorBefore(t),!0;if(d&&(l=r,c=d,s=n.Dom.isTag(c,o.LIST_TAGS),u=n.Dom.isTag(l,o.LIST_TAGS),h=(e,t)=>t?e.firstElementChild:e.lastElementChild,(u?(c=e.createInside.element(e.o.enterBlock),n.Dom.before(l,c),a(e,h(l,i),c,i)):!!c&&!!s&&!u&&a(e,l,h(c,!i),i))||a(e,r,function(e,t){if(!n.Dom.isTag(e,"table"))return e;let i=[];return n.Dom.each(e,e=>{n.Dom.isCell(e)&&i.push(e)}),i.length?i[t?i.length-1:0]:null}(d,i),i)))return e.s.setCursorBefore(t),!0}return!1}function a(e,t,i,o){if(t&&n.Dom.isElement(i)){n.Dom.moveContent(t,i,!o,(0,s.getMoveFilter)(e));let r=t;for(;r&&r!==e.editor&&n.Dom.isEmpty(r);){let e=r.parentElement;n.Dom.safeRemove(r),r=e}return!0}return!1}},80951:function(e,t,i){"use strict";i.d(t,{checkJoinTwoLists:function(){return r}});var o=i(23211),n=i(71125),s=i(15200);function r(e,t,i){let r=o.Dom.findSibling(t,i),a=o.Dom.findSibling(t,!i);if(!o.Dom.closest(t,o.Dom.isElement,e.editor)&&o.Dom.isList(r)&&o.Dom.isList(a)&&o.Dom.isTag(r.lastElementChild,"li")&&o.Dom.isTag(a.firstElementChild,"li")){let{setCursorBefore:l,setCursorAfter:c}=e.s,u=r.lastElementChild,h=a.firstElementChild;return(0,n.call)(i?o.Dom.prepend:o.Dom.append,h,t),o.Dom.moveContent(a,r,!i,(0,s.getMoveFilter)(e)),o.Dom.safeRemove(a),(0,n.call)(i?o.Dom.append:o.Dom.prepend,u,t),(0,n.call)(i?l:c,t),!0}return!1}},89827:function(e,t,i){"use strict";function o(e){return!e.s.isCollapsed()&&(e.execCommand("Delete"),!0)}i.d(t,{checkNotCollapsed:function(){return o}})},58881:function(e,t,i){"use strict";i.d(t,{checkRemoveChar:function(){return function e(t,i,r,l){var c,u;let h,d=r?-1:1,f=n.Dom.sibling(i,!r),p=n.Dom.sibling(i,r),m=null,g=!1;for(p||(p=a(i,r,t.editor));p&&(n.Dom.isText(p)||n.Dom.isInlineBlock(p));){for(;n.Dom.isInlineBlock(p);)p=r?p?.lastChild:p?.firstChild;if(!p)break;if(p.nodeValue?.length&&(h=function(e,t,i,r){let a=(0,s.toArray)(e.nodeValue),l=a.length,c=t?l-1:0;if(a[c]===o.INVISIBLE_SPACE)for(;a[c]===o.INVISIBLE_SPACE;)c+=i;let u=a[c];if(a[c+i]===o.INVISIBLE_SPACE){for(c+=i;a[c]===o.INVISIBLE_SPACE;)c+=i;c+=t?1:-1}return a=t&&c<0?[]:a.slice(t?0:c+1,t?c:l),function(e,t,i){if(!e||!n.Dom.isText(e)||(!t?/ $/:/^ /).test(e.nodeValue??"")||!(0,s.trimInv)(e.nodeValue||"").length)for(let e=t?i.length-1:0;t?e>=0:e<i.length;e+=t?-1:1)if(" "===i[e])i[e]=o.NBSP_SPACE;else break}(r,t,a),e.nodeValue=a.join(""),u}(p,r,d,f),!p.nodeValue.length&&n.Dom.isInlineBlock(p.parentNode)&&(p.nodeValue=o.INVISIBLE_SPACE)),p.nodeValue?.length||(m=p),!(0,s.isVoid)(h)&&h!==o.INVISIBLE_SPACE){c=p,u=h,(0,s.call)(r?n.Dom.after:n.Dom.before,c,i),("sentence"===l||"word"===l&&" "!==u&&u!==o.NBSP_SPACE)&&e(t,i,r,l),g=!0;break}let _=a(p,r,t.editor);m&&(n.Dom.safeRemove(m),m=null),p=_}return m&&n.Dom.safeRemove(m),g&&(function(e){let t=e.parentElement;for(;t&&n.Dom.isInlineBlock(t)&&n.Dom.isTag(t,"a");){let i=t.parentElement;n.Dom.isEmpty(t)&&(n.Dom.after(t,e),n.Dom.safeRemove(t)),t=i}}(i),i.parentElement!==t.editor&&n.Dom.isBlock(i.parentElement)&&n.Dom.each(i.parentElement,n.Dom.isEmptyTextNode)&&n.Dom.after(i,t.createInside.element("br")),t.s.setCursorBefore(i),n.Dom.isTag(i.previousSibling,"br")&&!n.Dom.findNotEmptySibling(i,!1)&&n.Dom.after(i,t.createInside.element("br"))),g}}});var o=i(81937),n=i(27795),s=i(65946),r=i(15200);function a(e,t,i){let o=n.Dom.sibling(e,t);return!o&&e.parentNode&&e.parentNode!==i&&(o=(0,r.findMostNestedNeighbor)(e,!t,i,!0))&&n.Dom.closest(e,"li",i)!==n.Dom.closest(o,"li",i)?null:o}},68709:function(e,t,i){"use strict";i.d(t,{checkRemoveContentNotEditable:function(){return r}});var o=i(27795),n=i(65946),s=i(42259);function r(e,t,i){let r=o.Dom.findSibling(t,i);return!r&&t.parentElement&&t.parentElement!==e.editor&&(r=o.Dom.findSibling(t.parentElement,i)),!(!o.Dom.isElement(r)||o.Dom.isContentEditable(r,e.editor))&&((0,n.call)(i?o.Dom.before:o.Dom.after,r,t),o.Dom.safeRemove(r),(0,s.moveNodeInsideStart)(e,t,i),(0,n.call)(i?e.s.setCursorBefore:e.s.setCursorAfter,t),!0)}},5771:function(e,t,i){"use strict";i.d(t,{checkRemoveEmptyNeighbor:function(){return n}});var o=i(23211);function n(e,t,i){let n=o.Dom.closest(t,o.Dom.isElement,e.editor);if(!n)return!1;let s=o.Dom.findNotEmptySibling(n,i);return!!(s&&o.Dom.isEmpty(s))&&(o.Dom.safeRemove(s),e.s.setCursorBefore(t),!0)}},2409:function(e,t,i){"use strict";i.d(t,{checkRemoveEmptyParent:function(){return r}});var o=i(81937),n=i(27795),s=i(80951);function r(e,t,i){let r=!1,{setCursorBefore:a,setCursorIn:l}=e.s,c=n.Dom.closest(t,n.Dom.isElement,e.editor);if(!c||!n.Dom.isEmpty(c))return!1;let u=n.Dom.findNotEmptyNeighbor(t,i,e.editor);do if(c&&n.Dom.isEmpty(c)&&!n.Dom.isCell(c)){n.Dom.after(c,t);let i=n.Dom.closest(c,e=>n.Dom.isElement(e)&&e!==c,e.editor);n.Dom.safeRemove(c),r=!0,c=i}else break;while(c)return!!(r&&(0,s.checkJoinTwoLists)(e,t,i))||(!u||n.Dom.isText(u)||n.Dom.isTag(u,o.INSEPARABLE_TAGS)?a(t):l(u,!i),r)}},93890:function(e,t,i){"use strict";i.d(t,{checkRemoveUnbreakableElement:function(){return r}});var o=i(81937),n=i(23211),s=i(2409);function r(e,t,i){let r=n.Dom.findSibling(t,i);return!!(n.Dom.isElement(r)&&(n.Dom.isTag(r,o.INSEPARABLE_TAGS)||n.Dom.isEmpty(r)))&&(n.Dom.safeRemove(r),n.Dom.isTag(r,"br")&&!n.Dom.findNotEmptySibling(t,!1)&&n.Dom.after(t,e.createInside.element("br")),e.s.setCursorBefore(t),n.Dom.isTag(r,"br")&&(0,s.checkRemoveEmptyParent)(e,t,i),!0)}},12443:function(e,t,i){"use strict";i.d(t,{checkTableCell:function(){return n}});var o=i(23211);function n(e,t){let i=t.parentElement;return!!o.Dom.isCell(i)}},10157:function(e,t,i){"use strict";i.d(t,{checkUnwrapFirstListItem:function(){return s}});var o=i(23211),n=i(93640);function s(e,t,i){let s=o.Dom.closest(t,o.Dom.isElement,e.editor),{s:r}=e;if(o.Dom.isLeaf(s)&&s?.parentElement?.[i?"firstElementChild":"lastElementChild"]===s&&r.cursorInTheEdge(i,s)){let a=s.parentElement,l=e.createInside.element(e.o.enterBlock);return(0,n.call)(i?o.Dom.before:o.Dom.after,a,l),o.Dom.moveContent(s,l),o.Dom.safeRemove(s),o.Dom.isEmpty(a)&&o.Dom.safeRemove(a),(0,n.call)(i?r.setCursorBefore:r.setCursorAfter,t),!0}return!1}},17523:function(e,t,i){"use strict";var o=i(26106),n=i(80951),s=i(58881),r=i(68709),a=i(5771),l=i(2409),c=i(93890),u=i(12443),h=i(10157);let d=[["remove-unbreakable",c.checkRemoveUnbreakableElement],["remove-not-editable",r.checkRemoveContentNotEditable],["remove-char",s.checkRemoveChar],["table-cell",u.checkTableCell],["remove-empty-parent",l.checkRemoveEmptyParent],["remove-empty-neighbor",a.checkRemoveEmptyNeighbor],["join-two-lists",n.checkJoinTwoLists],["join-neighbors",o.checkJoinNeighbors],["unwrap-first-list-item",h.checkUnwrapFirstListItem]];d.map(([,e])=>e),i.d(t,["casesMap",0,d])},33831:function(e,t,i){"use strict";i(5266).Config.prototype.delete={hotkeys:{delete:["delete","cmd+backspace"],deleteWord:["ctrl+delete","cmd+alt+backspace","ctrl+alt+backspace"],deleteSentence:["ctrl+shift+delete","cmd+shift+delete"],backspace:["backspace"],backspaceWord:["ctrl+backspace"],backspaceSentence:["ctrl+shift+backspace","cmd+shift+backspace"]}}},15200:function(e,t,i){"use strict";i.d(t,{findMostNestedNeighbor:function(){return n},getMoveFilter:function(){return s}});var o=i(27795);function n(e,t,i,s=!1){let r=e=>t?e.firstChild:e.lastChild,a=o.Dom.findNotEmptyNeighbor(e,!t,i);if(s&&o.Dom.isElement(a)&&!o.Dom.isInlineBlock(a))return null;if(a)do{if(!r(a))return a;a=r(a)}while(a)return null}function s(e){return t=>!0!==e.e.fire("backSpaceIsMovedIgnore",t)}},91678:function(e,t,i){"use strict";var o=i(28077),n=i(65946),s=i(29434),r=i(5266);i(40291);var a=i(52450),l=i.n(a),c=i(41111),u=i.n(c),h=i(49972),d=i.n(h),f=i(45062),p=i.n(f),m=i(18605),g=i.n(m),_=i(83389),v=i.n(_);o.pluginSystem.add("bold",function(e){let t=t=>{let i,o=r.Config.defaultOptions.controls[t],s={...o.css};return Object.keys(s).forEach(e=>{i||(i={}),i[e]=(0,n.isArray)(s[e])?s[e][0]:s[e]}),e.s.commitStyle({element:o.tags?o.tags[0]:void 0}),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})}),s.Icon.set("bold",l()).set("italic",u()).set("strikethrough",d()).set("subscript",p()).set("superscript",g()).set("underline",v())},40291:function(e,t,i){"use strict";var o=i(5266);o.Config.prototype.controls.subscript={tags:["sub"],tooltip:"subscript"},o.Config.prototype.controls.superscript={tags:["sup"],tooltip:"superscript"},o.Config.prototype.controls.bold={tagRegExp:/^(strong|b)$/i,tags:["strong","b"],css:{"font-weight":["bold","700"]},tooltip:"Bold"},o.Config.prototype.controls.italic={tagRegExp:/^(em|i)$/i,tags:["em","i"],css:{"font-style":"italic"},tooltip:"Italic"},o.Config.prototype.controls.underline={tagRegExp:/^(u)$/i,tags:["u"],css:{"text-decoration-line":"underline"},tooltip:"Underline"},o.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 o=i(25045),n=i(23211),s=i(28077),r=i(71125),a=i(91206),l=i(29434),c=i(5266),u=i(93267),h=i.n(u);c.Config.prototype.controls.classSpan={command:"applyClassName",exec:r.memorizeExec,list:["enabled","disabled","activated","text-left","text-center","text-right","warning","error"],isChildActive(e,t){let i=e.s.current();if(i){let o=n.Dom.closest(i,n.Dom.isElement,e.editor)||e.editor;return!!(t.control.args&&o.classList.contains(t.control.args[0].toString()))}return!1},isActive(e,t){let i=e.s.current();if(i){let o=n.Dom.closest(i,n.Dom.isElement,e.editor)||e.editor,s=!1;return t.control.list&&Object.keys(t.control.list).forEach(e=>{o.classList.contains(e)&&(s=!0)}),!!(o&&o!==e.editor&&void 0!==t.control.list&&s)}return!1},childTemplate:(e,t,i)=>`<span class="${t}">${e.i18n(i)}</span>`,tooltip:"Insert className"};class d extends a.Plugin{afterInit(e){e.registerCommand("applyClassName",(t,i,o)=>(e.s.commitStyle({attributes:{class:o}}),!1))}beforeDestruct(){}constructor(...e){super(...e),(0,o._)(this,"buttons",[{name:"classSpan",group:"script"}])}}s.pluginSystem.add("classSpan",d),l.Icon.set("class-span",h())},11018:function(e,t,i){"use strict";var o=i(25045),n=i(31635),s=i(84839),r=i(23211),a=i(1080),l=i(28077),c=i(48155),u=i(18855);i(11173);var h=i(54053);class d extends u.Plugin{afterInit(e){}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()}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",o=>(0,h.visitNodeWalker)(e,o,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.removeFormatForCollapsedSelection)(this.j):(0,h.removeFormatForSelection)(this.j),!1}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),e.value=t.innerHTML,(0,c.safeHTML)(t,{safeJavaScriptLink:!0,removeOnError:!0}),r.Dom.safeRemove(i),!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(!r.Dom.isTag(t,"br"))return;let i=t.previousSibling;!i||r.Dom.isTag(i,"br")||(!r.Dom.isText(i)||i.nodeValue?.trim()||i.previousSibling)&&r.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,c.safeHTML)(e,this.j.o.cleanHTML)}beforeDestruct(){this.walker.destruct()}constructor(...e){super(...e),(0,o._)(this,"buttons",[{name:"eraser",group:"font-style"}]),(0,o._)(this,"currentSelectionNode",null),(0,o._)(this,"walker",new a.LazyWalker(this.j.async,{timeout:this.j.o.cleanHTML.timeout}))}}(0,n.__decorate)([(0,s.watch)([":change",":afterSetMode",":afterInit",":mousedown",":keydown"])],d.prototype,"onChangeCleanHTML",null),(0,n.__decorate)([(0,s.hook)("ready")],d.prototype,"startWalker",null),(0,n.__decorate)([(0,s.watch)(":beforeCommand")],d.prototype,"beforeCommand",null),(0,n.__decorate)([(0,s.watch)(":beforeSetNativeEditorValue")],d.prototype,"onBeforeSetNativeEditorValue",null),(0,n.__decorate)([(0,s.watch)(":afterGetValueFromEditor")],d.prototype,"onAfterGetValueFromEditor",null),(0,n.__decorate)([(0,s.watch)(":safeHTML")],d.prototype,"onSafeHTML",null),l.pluginSystem.add("cleanHtml",d)},11173:function(e,t,i){"use strict";var o=i(5266);o.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},o.Config.prototype.controls.eraser={command:"removeFormat",tooltip:"Clear Formatting"}},5650:function(e,t,i){"use strict";i.d(t,{getHash:function(){return s}});var o=i(85932),n=i(4040);function s(e){let t=/([^[]*)\[([^\]]+)]/,i=/[\s]*,[\s]*/,s=/^(.*)[\s]*=[\s]*(.*)$/,r={};return(0,o.isString)(e)?(e.split(i).map(e=>{e=(0,n.trim)(e);let o=t.exec(e),a={};if(o){let e=o[2].split(i);o[1]&&(e.forEach(e=>{e=(0,n.trim)(e);let t=s.exec(e);t?a[t[1]]=t[2]:a[e]=!0}),r[o[1].toUpperCase()]=a)}else r[e.toUpperCase()]=!0}),r):!!e&&(Object.keys(e).forEach(t=>{r[t.toUpperCase()]=e[t]}),r)}},54053:function(e,t,i){"use strict";i.d(t,{getHash:function(){return o.getHash},removeFormatForCollapsedSelection:function(){return n.removeFormatForCollapsedSelection},removeFormatForSelection:function(){return s.removeFormatForSelection},visitNodeWalker:function(){return r.visitNodeWalker}});var o=i(5650),n=i(37431),s=i(70195),r=i(45219)},28665:function(e,t,i){"use strict";i.d(t,{isAllowedMediaEmbed:function(){return s}});let o=/^(https?:)?\/\/(www\.|m\.|music\.)?youtube(-nocookie)?\.com\/embed\//i,n=/^(https?:)?\/\/player\.vimeo\.com\/video\//i;function s(e){return o.test(e)||n.test(e)}},37431:function(e,t,i){"use strict";i.d(t,{isInlineBlock:function(){return r},removeFormatForCollapsedSelection:function(){return s}});var o=i(81937),n=i(23211);function s(e,t){let{s:i}=e,o=t;if(!o){o=e.createInside.fake();let{range:t}=i;n.Dom.safeInsertNode(t,o),t.collapse()}let s=n.Dom.furthest(o,r,e.editor);if(s)if(i.cursorOnTheLeft(s))n.Dom.before(s,o);else if(i.cursorOnTheRight(s))n.Dom.after(s,o);else{let e=i.splitSelection(s);e&&n.Dom.after(e,o)}t||(i.setCursorBefore(o),n.Dom.safeRemove(o))}function r(e){return n.Dom.isInlineBlock(e)&&!n.Dom.isTag(e,o.INSEPARABLE_TAGS)}},70195:function(e,t,i){"use strict";i.d(t,{removeFormatForSelection:function(){return r}});var o=i(23211),n=i(93640),s=i(37431);function r(e){let{s:t,editor:i,createInside:r}=e,{range:a}=t,l=a.cloneRange(),c=a.cloneRange(),u=r.fake(),h=r.fake();l.collapse(!0),c.collapse(!1),o.Dom.safeInsertNode(l,u),o.Dom.safeInsertNode(c,h),a.setStartBefore(u),a.collapse(!0),t.selectRange(a),(0,s.removeFormatForCollapsedSelection)(e,u),a.setEndAfter(h),a.collapse(!1),t.selectRange(a),(0,s.removeFormatForCollapsedSelection)(e,h);let d=[];o.Dom.between(u,h,e=>{(0,s.isInlineBlock)(e)&&!o.Dom.isTag(e,"a")&&d.push(e),o.Dom.isElement(e)&&(0,n.attr)(e,"style")&&(0,n.attr)(e,"style",null)}),d.forEach(e=>o.Dom.unwrap(e));let f=(e,t)=>{if(!o.Dom.findNotEmptySibling(e,t)){let o=e.parentNode;if(o&&o!==i&&(0,n.attr)(o,"style"))return(0,n.attr)(o,"style",null),f(o,t),!0}};f(u,!0)&&f(h,!1),a.setStartAfter(u),a.setEndBefore(h),t.selectRange(a),o.Dom.safeRemove(u),o.Dom.safeRemove(h)}},95559:function(e,t,i){"use strict";i.d(t,{allowAttributes:function(){return s}});var o=i(23211),n=i(7909);function s(e,t,i,s){let r=s&&o.Dom.isElement(t)&&s[t.nodeName];if(s&&o.Dom.isElement(t)&&!0!==r){if(!r)return i;let e=t.attributes;if(e&&e.length){let o=[];for(let t=0;t<e.length;t+=1){let i=r[e[t].name];i&&(!0===i||i===e[t].value)||o.push(e[t].name)}o.length&&(i=!0),o.forEach(e=>{(0,n.attrRaw)(t,e,null)})}}return i}},85085:function(e,t,i){"use strict";i.d(t,{convertUnsafeEmbeds:function(){return s}});var o=i(23211),n=i(7909);function s(e,t,i){let s=e.o.cleanHTML.convertUnsafeEmbeds;if(!s||!o.Dom.isElement(t))return i;let r=t.nodeName.toLowerCase();if(!s.includes(r))return i;let a=(0,n.attr)(t,"data")||(0,n.attr)(t,"src")||(0,n.attr)(t,"movie")||"";if(!a)return o.Dom.safeRemove(t),!0;let l=e.createInside.element("iframe");return(0,n.attr)(l,{src:a,sandbox:"",frameborder:"0",width:(0,n.attr)(t,"width"),height:(0,n.attr)(t,"height")}),o.Dom.replace(t,l,void 0,!1,!0),!0}},39188:function(e,t,i){"use strict";i.d(t,{fillEmptyParagraph:function(){return r}});var o=i(81937),n=i(23211);let s=new Set(["table","tbody","thead","tfoot","tr"]);function r(e,t,i){if(e.o.cleanHTML.fillEmptyParagraph&&n.Dom.isBlock(t)&&n.Dom.isEmpty(t,o.INSEPARABLE_TAGS)&&!n.Dom.isTag(t,s)){let i=e.createInside.element("br");return n.Dom.append(t,i),!0}return i}},91560:function(e,t,i){"use strict";i.r(t),i.d(t,{allowAttributes:function(){return o.allowAttributes},convertUnsafeEmbeds:function(){return n.convertUnsafeEmbeds},fillEmptyParagraph:function(){return s.fillEmptyParagraph},removeEmptyTextNode:function(){return r.removeEmptyTextNode},removeInvTextNodes:function(){return a.removeInvTextNodes},replaceOldTags:function(){return l.replaceOldTags},safeLinksTarget:function(){return c.safeLinksTarget},sandboxIframesInContent:function(){return u.sandboxIframesInContent},sanitizeAttributes:function(){return h.sanitizeAttributes},sanitizeStyles:function(){return d.sanitizeStyles},tryRemoveNode:function(){return f.tryRemoveNode}});var o=i(95559),n=i(85085),s=i(39188),r=i(94561),a=i(53514),l=i(35104),c=i(77041),u=i(66647),h=i(65015),d=i(60220),f=i(27611)},94561:function(e,t,i){"use strict";i.d(t,{removeEmptyTextNode:function(){return n}});var o=i(23211);function n(e,t,i,n,s,r){return o.Dom.isText(t)&&!t.nodeValue?(t===r&&e.s.isFocused()&&e.s.isCollapsed()&&e.s.setCursorAfter(t),o.Dom.safeRemove(t),!0):i}},53514:function(e,t,i){"use strict";i.d(t,{removeInvTextNodes:function(){return s}});var o=i(81937),n=i(23211);function s(e,t,i,s,r,a){if(a===t||!n.Dom.isText(t)||null==t.nodeValue||!(0,o.INVISIBLE_SPACE_REG_EXP)().test(t.nodeValue))return i;let l=n.Dom.furthest(a,n.Dom.isBlock,e.editor);return!l||n.Dom.isOrContains(l,t)?i:(t.nodeValue=t.nodeValue.replace((0,o.INVISIBLE_SPACE_REG_EXP)(),""),t===a&&e.s.isFocused()&&e.s.isCollapsed()&&e.s.setCursorAfter(t),t.nodeValue||n.Dom.safeRemove(t),!0)}},35104:function(e,t,i){"use strict";i.d(t,{replaceOldTags:function(){return n}});var o=i(23211);function n(e,t,i){let n=function(e,t,i){if(!i||!o.Dom.isHTMLElement(t))return t;let n=i[t.nodeName.toLowerCase()]||i[t.nodeName];return n?o.Dom.replace(t,n,e.createInside,!0,!1):t}(e,t,e.o.cleanHTML.replaceOldTags);return t!==n||i}},77041:function(e,t,i){"use strict";i.d(t,{safeLinksTarget:function(){return s}});var o=i(23211),n=i(7909);function s(e,t,i){if(!e.o.cleanHTML.safeLinksTarget||!o.Dom.isElement(t)||"A"!==t.nodeName||"_blank"!==(0,n.attr)(t,"target"))return i;let s=((0,n.attr)(t,"rel")||"").split(/\s+/).filter(Boolean),r=!1;return(s.includes("noopener")||(s.push("noopener"),r=!0),s.includes("noreferrer")||(s.push("noreferrer"),r=!0),r)?((0,n.attr)(t,"rel",s.join(" ")),!0):i}},66647:function(e,t,i){"use strict";i.d(t,{sandboxIframesInContent:function(){return r}});var o=i(23211),n=i(7909),s=i(28665);function r(e,t,i){return e.o.cleanHTML.sandboxIframesInContent&&o.Dom.isElement(t)&&"IFRAME"===t.nodeName?(0,s.isAllowedMediaEmbed)((0,n.attr)(t,"src")||"")||t.hasAttribute("sandbox")?i:((0,n.attr)(t,"sandbox",""),!0):i}},65015:function(e,t,i){"use strict";i.d(t,{sanitizeAttributes:function(){return s}});var o=i(23211),n=i(65946);function s(e,t,i){if(!o.Dom.isElement(t))return i;let s=e.options.cleanHTML;return!!(0,n.sanitizeHTMLElement)(t,{safeJavaScriptLink:s.safeJavaScriptLink,removeOnError:s.removeOnError,removeEventAttributes:s.removeEventAttributes,safeLinksTarget:s.safeLinksTarget})||i}},60220:function(e,t,i){"use strict";i.d(t,{sanitizeStyles:function(){return s}});var o=i(23211),n=i(7909);function s(e,t,i){let s=e.o.cleanHTML.allowedStyles;if(!s||!o.Dom.isElement(t))return i;let r=(0,n.attr)(t,"style");if(!r)return i;let a=function(e,t){let i=t[e],o=t["*"];if(!i&&!o)return null;let n=new Set;if(o)for(let e of o)n.add(e.toLowerCase());if(i)for(let e of i)n.add(e.toLowerCase());return n}(t.nodeName.toLowerCase(),s);if(!a)return i;let l=r.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!==r?((0,n.attr)(t,"style",l||null),!0):i}},27611:function(e,t,i){"use strict";i.d(t,{tryRemoveNode:function(){return l}});var o=i(81937),n=i(23211),s=i(4040),r=i(7909),a=i(28665);function l(e,t,i,l,c,u){return!function(e,t,i,l,c){if(!n.Dom.isText(t)){let e=t.nodeName.toUpperCase();if(l&&!l[e])return!0;let i="IFRAME"===e&&(0,a.isAllowedMediaEmbed)((0,r.attr)(t,"src")||"");if(!l&&c&&c[e]&&!i)return!0}if(!e.o.cleanHTML.removeEmptyElements)return!1;let u=e.s.isCollapsed()?e.s.range.startContainer:null;return n.Dom.isElement(t)&&null!=t.nodeName.match(o.IS_INLINE)&&!n.Dom.isTemporary(t)&&!(t.hasAttribute("id")||"A"===t.nodeName&&t.hasAttribute("name"))&&0===(0,s.trimInv)(t.innerHTML).length&&(null==i||!n.Dom.isOrContains(t,i))&&(null==u||!n.Dom.isOrContains(t,u))}(e,t,u,l,c)?i:(n.Dom.safeRemove(t),!0)}},45219:function(e,t,i){"use strict";i.d(t,{visitNodeWalker:function(){return r}});var o=i(81937),n=i(91560);let s=Object.keys(n);function r(e,t,i,r,a){let l=!1,c=e.o.cleanHTML.disableCleanFilter;for(let u of s)if(!(c&&c.has(u))&&(l=(0,n[u])(e,t,l,i,r,a),o.IS_PROD,!t.isConnected))return!0;return l}},43354:function(e,t,i){"use strict";var o=i(25045),n=i(81937),s=i(51676),r=i(23211),a=i(28077),l=i(65946);i(81008);class c{init(e){this.buttons?.forEach(t=>e.registerButton(t)),e.e.off(`copy.${n.CLIPBOARD_ID} cut.${n.CLIPBOARD_ID}`).on(`copy.${n.CLIPBOARD_ID} cut.${n.CLIPBOARD_ID}`,t=>{let i=function(e,t){if(!t||e.s.isCollapsed())return t;let i=e.s.range.commonAncestorContainer;r.Dom.isElement(i)||(i=i.parentElement);let o=t;for(;i&&i!==e.editor&&r.Dom.isElement(i)&&!r.Dom.isBlock(i);){let e=i.cloneNode(!1);e.innerHTML=o,o=e.outerHTML,i=i.parentElement}return o}(e,e.s.html),o=(0,l.getDataTransfer)(t)||(0,l.getDataTransfer)(e.ew)||(0,l.getDataTransfer)(t.originalEvent);o&&(o.setData(n.TEXT_PLAIN,(0,l.stripTags)(i)),o.setData(n.TEXT_HTML,i)),e.buffer.set(n.CLIPBOARD_ID,i),e.e.fire("pasteStack",{html:i,action:e.o.defaultActionOnPaste||n.INSERT_AS_HTML}),"cut"===t.type&&(e.s.remove(),e.s.focus()),t.preventDefault(),e?.events?.fire("afterCopy",i)})}destruct(e){(0,s.cached)(e,"buffer")?.set(n.CLIPBOARD_ID,""),e?.events?.off("."+n.CLIPBOARD_ID)}constructor(){(0,o._)(this,"jodit",void 0),(0,o._)(this,"buttons",[{name:"cut",group:"clipboard"},{name:"copy",group:"clipboard"},{name:"paste",group:"clipboard"},{name:"selectall",group:"clipboard"}])}}a.pluginSystem.add("clipboard",c)},81008:function(e,t,i){"use strict";var o=i(29434),n=i(5266),s=i(51457),r=i.n(s),a=i(23602),l=i.n(a),c=i(86899),u=i.n(c),h=i(95320),d=i.n(h);n.Config.prototype.controls.cut={command:"cut",isDisabled:e=>e.s.isCollapsed(),tooltip:"Cut selection"},n.Config.prototype.controls.copy={command:"copy",isDisabled:e=>e.s.isCollapsed(),tooltip:"Copy selection"},n.Config.prototype.controls.selectall={icon:"select-all",command:"selectall",tooltip:"Select all"},o.Icon.set("copy",r()).set("cut",l()).set("paste",u()).set("select-all",d())},42462:function(e,t,i){"use strict";var o=i(28077),n=i(65946);i(8071),o.pluginSystem.add("color",function(e){e.registerButton({name:"brush",group:"color"});let t=(t,i,o)=>{let s=(0,n.normalizeColor)(o)||"",r="background"===t?{backgroundColor:s}:{color:s},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:r}})}),e.s.sel?.removeAllRanges()):e.s.commitStyle({attributes:{style:r}}),e.synchronizeValues(),!1};e.registerCommand("forecolor",t).registerCommand("background",t)})},8071:function(e,t,i){"use strict";var o=i(23211),n=i(65946),s=i(29434),r=i(5266),a=i(15753),l=i(45674),c=i.n(l);function u(e,t,i){(0,n.css)(e,t,i),(0,n.attr)(e,"style")||(0,n.attr)(e,"style",null)}s.Icon.set("brush",c()),r.Config.prototype.controls.brushCell={isVisible:e=>!e.o.disablePlugins.includes("color"),icon:"brush",popup(e,t,i){if(!(0,n.isJoditObject)(e))return;let o=e.getInstance("Table",e.o).getAllSelectedCells();if(!o.length)return!1;let s=t=>(0,a.ColorPickerWidget)(e,n=>{o.forEach(e=>{u(e,t,n)}),e.lock(),e.synchronizeValues(),i(),e.unlock()},(0,n.css)(o[0],t));return(0,a.TabsWidget)(e,[{name:"Background",content:s("background-color")},{name:"Text",content:s("color")},{name:"Border",content:s("border-color")}])},tooltip:"Background"},r.Config.prototype.controls.brush={isVisible:e=>!e.o.disablePlugins.includes("color"),update(e,t){let i=(0,n.dataBind)(t,"color"),s=(i,o)=>!!o&&o!==(0,n.css)(e.editor,i).toString()&&(t.state.icon.fill=o,!0);if(i){let e=(0,n.dataBind)(t,"color");s("color"===e?e:"background-color",i);return}let r=e.s.current();if(r&&!t.state.disabled){let t=o.Dom.closest(r,o.Dom.isElement,e.editor)||e.editor,i=s("color",(0,n.css)(t,"color").toString()),a=s("background-color",(0,n.css)(t,"background-color").toString());if(i||a)return}t.state.icon.fill="",t.state.activated=!1},popup(e,t,i,s){let r="",l="",c,h=null;return t&&t!==e.editor&&o.Dom.isNode(t)&&(o.Dom.isElement(t)&&e.s.isCollapsed()&&!o.Dom.isTag(t,new Set(["br","hr"]))&&(h=t),o.Dom.up(t,e=>{if(o.Dom.isHTMLElement(e)){let t=(0,n.css)(e,"color",!0),i=(0,n.css)(e,"background-color",!0);if(t)return r=t.toString(),!0;if(i)return l=i.toString(),!0}},e.editor)),c=[{name:"Background",content:(0,a.ColorPickerWidget)(e,t=>{h?u(h,"backgroundColor",t):e.execCommand("background",!1,t),(0,n.dataBind)(s,"color",t),(0,n.dataBind)(s,"color-mode","background"),i()},l)},{name:"Text",content:(0,a.ColorPickerWidget)(e,t=>{h?u(h,"color",t):e.execCommand("forecolor",!1,t),(0,n.dataBind)(s,"color",t),(0,n.dataBind)(s,"color-mode","color"),i()},r)}],"background"!==e.o.colorPickerDefaultTab&&(c=c.reverse()),(0,a.TabsWidget)(e,c,h)},exec(e,t,{button:i}){let s=(0,n.dataBind)(i,"color-mode"),r=(0,n.dataBind)(i,"color");if(!s)return!1;if(t&&t!==e.editor&&o.Dom.isNode(t)&&o.Dom.isElement(t))switch(s){case"color":u(t,"color",r);break;case"background":u(t,"backgroundColor",r)}else e.execCommand("background"===s?s:"forecolor",!1,r)},tooltip:"Fill color or set the text color"}},30062:function(e,t,i){"use strict";var o=i(23211),n=i(28077),s=i(80991),r=i(29434),a=i(5266),l=i(3843),c=i.n(l),u=i(38639);let h="copy-format",d=["lineHeight","fontWeight","fontStyle","fontSize","fontFamily","color","margin","padding","borderWidth","borderStyle","borderColor","borderRadius","backgroundColor","textDecorationLine"],f=(e,t,i,o)=>{let n=(0,s.css)(i,t);return n===o[t]&&(n=i.parentNode&&i!==e.editor&&i.parentNode!==e.editor?f(e,t,i.parentNode,o):void 0),n};a.Config.prototype.controls.copyformat={exec(e,t,{button:i}){if(t){if(e.buffer.exists(h))e.buffer.delete(h),e.e.off(e.editor,"mouseup."+h);else{let i,n={},r=o.Dom.up(t,e=>e&&!o.Dom.isText(e),e.editor)||e.editor,a=e.createInside.span();o.Dom.append(e.editor,a),d.forEach(e=>{n[e]=(0,s.css)(a,e)}),a!==e.editor&&o.Dom.safeRemove(a);let l=(i={},r&&d.forEach(t=>{i[t]=f(e,t,r,n),t.match(/border(Style|Color)/)&&!i.borderWidth&&(i[t]=void 0)}),i);e.e.on(e.editor,"mouseup."+h,()=>{e.buffer.delete(h);let t=e.s.current();t&&(o.Dom.isTag(t,"img")?(0,s.css)(t,l):e.s.commitStyle({attributes:{style:l}})),e.e.off(e.editor,"mouseup."+h)}),e.buffer.set(h,!0)}i.update()}},isActive:e=>e.buffer.exists(h),tooltip:"Paint format"},n.pluginSystem.add("copyformat",function(e){e.registerButton({name:"copyformat",group:"clipboard"}),(0,n.extendLang)(u)}),r.Icon.set("copyformat",c())},38639:function(e,t,i){"use strict";i.r(t),i.d(t,{ar:function(){return n.a},cs_cz:function(){return n.a},de:function(){return n.a},es:function(){return n.a},fa:function(){return n.a},fi:function(){return n.a},fr:function(){return n.a},he:function(){return n.a},hu:function(){return n.a},id:function(){return n.a},it:function(){return n.a},ja:function(){return n.a},ko:function(){return n.a},mn:function(){return n.a},nl:function(){return n.a},pl:function(){return n.a},pt_br:function(){return n.a},ru:function(){return n.a},tr:function(){return n.a},zh_cn:function(){return n.a},zh_tw:function(){return n.a}});var o=i(41324),n=i.n(o)},63974:function(e,t,i){"use strict";var o=i(25045),n=i(27795),s=i(28077),r=i(65946),a=i(4040),l=i(91206);let c=new Set(["img","table","jodit","iframe","hr"]);class u extends l.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&&n.Dom.isTag(t.firstChild,"br")&&e.s.removeNode(t.firstChild),!(0,a.trim)(e.editor.textContent||"")&&!n.Dom.first(e.editor,e=>n.Dom.isTag(e,c))&&(!t||!n.Dom.closest(t,"table",e.editor))){n.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;t.deleteContents();let i=e.createInside.fake();t.insertNode(i);let o=n.Dom.findSibling(i,!0),s=n.Dom.findSibling(i,!1);return this.__moveContentInLeftSibling(i,o,s),t.setStartBefore(i),t.collapse(!0),this.__moveCursorInEditableSibling(e,o,i,t),this.__addBrInEmptyBlock(i,s,t),n.Dom.safeRemove(i),e.s.selectRange(t),!1}__moveContentInLeftSibling(e,t,i){t=this.__defineRightLeftBox(t),!n.Dom.isList(i)&&!n.Dom.isTag(i,"table")&&n.Dom.isBlock(i)&&n.Dom.isBlock(t)&&(n.Dom.append(t,e),n.Dom.moveContent(i,t),n.Dom.safeRemove(i)),n.Dom.isList(i)&&n.Dom.isLeaf(i.firstElementChild)&&n.Dom.isEmpty(i.firstElementChild)&&n.Dom.safeRemove(i.firstElementChild)}__defineRightLeftBox(e){if(!n.Dom.isList(e))return e;let t=e.lastElementChild;return n.Dom.isLeaf(t)||(t=this.j.createInside.element("li"),n.Dom.append(e,t)),t}__addBrInEmptyBlock(e,t,i){let o=this.j;if(e.isConnected&&n.Dom.isBlock(e.parentNode)&&!e.nextSibling&&!e.previousSibling){let t=o.createInside.element("br");n.Dom.after(e,t),i.setStartBefore(t),i.collapse(!0)}if(n.Dom.isTag(t,"table")){let e=(0,r.$$)("td,th",t).shift();n.Dom.isCell(e)&&n.Dom.isEmpty(e)&&n.Dom.append(e,o.createInside.element("br"))}}__moveCursorInEditableSibling(e,t,i,o){if(!t||!n.Dom.isText(t)){let t=n.Dom.closest(i,n.Dom.isBlock,e.editor)??e.editor,s=n.Dom.prev(i,n.Dom.isText,t);s&&(o.setStartAfter(s),o.collapse(!0),n.Dom.safeRemove(i))}}}(0,o._)(u,"requires",["backspace"]),s.pluginSystem.add("deleteCommand",u)},65701:function(e,t,i){"use strict";i(5266).Config.prototype.draggableTags=["img","jodit-media","jodit"]},43102:function(e,t,i){"use strict";var o=i(25045),n=i(31635),s=i(84839),r=i(27795),a=i(28077),l=i(65946),c=i(91206);i(65701);class u extends c.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())),o=r.Dom.furthest(t,i,this.j.editor)||(i(t)?t:null);o&&(r.Dom.isTag(o.parentElement,"a")&&o.parentElement.firstChild===o&&o.parentElement.lastChild===o&&(o=o.parentElement),this.startDragging(o,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 o=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+o.left,top:e.clientY+o.top,width:t?.offsetWidth??100,height:t?.offsetHeight??100}),r.Dom.append((0,a.getContainer)(this.j,u),this.draggable)}(0,l.css)(this.draggable,{left:e.clientX+o.left,top:e.clientY+o.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&&(r.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=>{r.Dom.isEmptyTextNode(e)&&r.Dom.safeRemove(e)}),t&&r.Dom.isEmpty(t)&&!r.Dom.isCell(t)&&r.Dom.safeRemove(t),r.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,o._)(this,"dragList",[]),(0,o._)(this,"draggable",null),(0,o._)(this,"isCopyMode",!1),(0,o._)(this,"diffStep",10),(0,o._)(this,"startX",0),(0,o._)(this,"startY",0),(0,o._)(this,"state",0)}}(0,n.__decorate)([s.autobind],u.prototype,"onStartDragElement",null),(0,n.__decorate)([s.autobind],u.prototype,"onDragStart",null),(0,n.__decorate)([(0,s.throttle)(e=>e.defaultTimeout/10)],u.prototype,"onDrag",null),(0,n.__decorate)([s.autobind],u.prototype,"onDragEnd",null),(0,n.__decorate)([s.autobind],u.prototype,"onDrop",null),a.pluginSystem.add("dragAndDropElement",u)},64222:function(e,t,i){"use strict";var o=i(25045),n=i(31635),s=i(81937),r=i(84839),a=i(23211),l=i(28077),c=i(65946),u=i(91206),h=i(63425);class d extends u.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,c.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(h.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,c.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),o=this.__getWorkFragment(i,e);t&&t.removeAllRanges(),this.j.s.insertCursorAtPoint(e.clientX,e.clientY),o&&this.__insertFragment.call(this,o,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,c.attr)(this.draggable,"-is-file")?["a","href"]:["img","src"];i=this.j.createInside.element(e),(0,c.attr)(i,t,(0,c.attr)(this.draggable,"data-src")||(0,c.attr)(this.draggable,"src")||""),"a"===e&&(i.textContent=(0,c.attr)(i,t)||"")}else i=(0,c.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,o._)(this,"isFragmentFromEditor",!1),(0,o._)(this,"isCopyMode",!1),(0,o._)(this,"startDragPoint",{x:0,y:0}),(0,o._)(this,"draggable",null),(0,o._)(this,"bufferRange",null),(0,o._)(this,"getText",e=>{let t=(0,c.getDataTransfer)(e);return t?t.getData(s.TEXT_HTML)||t.getData(s.TEXT_PLAIN):null})}}(0,n.__decorate)([r.autobind],d.prototype,"onDragStart",null),(0,n.__decorate)([(0,r.throttle)(e=>e.defaultTimeout/10)],d.prototype,"onDrag",null),(0,n.__decorate)([r.autobind],d.prototype,"onDragEnd",null),(0,n.__decorate)([r.autobind],d.prototype,"onDrop",null),l.pluginSystem.add("dragAndDrop",d)},33915:function(e,t,i){"use strict";i.r(t),i.d(t,{removeExtraBr:function(){return o.removeExtraBr}});var o=i(14841)},14841:function(e,t,i){"use strict";i.d(t,{removeExtraBr:function(){return s}});var o=i(23211);let n=new Set(["table","pre","blockquote","code"]);function s(e,t){if(!e.o.dtd.removeExtraBr||o.Dom.isTag(t,"br"))return;let i=o.Dom.furthest(t,o.Dom.isBlock,e.editor);if(i&&!o.Dom.isTag(i,n)){let i=o.Dom.isTag(t,"br")?t:o.Dom.findNotEmptySibling(t,!1);if(!o.Dom.isTag(i,"br")||o.Dom.findNotEmptySibling(i,!1))return;e.s.setCursorBefore(i),o.Dom.safeRemove(i)}}},34693:function(e,t,i){"use strict";i.d(t,{checkBlockNesting:function(){return n}});var o=i(23211);function n(e,t){if(o.Dom.isFragment(t)&&(t=t.firstChild),e.o.dtd.checkBlockNesting&&o.Dom.isBlock(t)){let t=null,i=e.s.current()?.parentElement??null;for(;i&&i!==e.editor;){if(o.Dom.isBlock(i)){if(e.o.dtd.blockLimits[i.nodeName.toLowerCase()])break;t=i}i=i.parentElement}t&&(e.s.setCursorAfter(t),o.Dom.isEmpty(t)&&o.Dom.safeRemove(t))}}},14282:function(e,t,i){"use strict";i.r(t),i.d(t,{checkBlockNesting:function(){return o.checkBlockNesting}});var o=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,details:1,dir:1,div:1,dl:1,fieldset:1,figcaption:1,figure:1,footer:1,form:1,header:1,hgroup: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 o=i(31635),n=i(68616),s=i(28077),r=i(91206);i(96722);var a=i(33915),l=i(14282);class c extends r.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,o.__decorate)([(0,n.watch)(":beforeInsertNode")],c.prototype,"__onBeforeInsertNode",null),(0,o.__decorate)([(0,n.watch)(":afterInsertNode")],c.prototype,"__onAfterInsertNode",null),s.pluginSystem.add("dtd",c)},3678:function(e,t,i){"use strict";var o=i(31635),n=i(81937),s=i(84839),r=i(23211),a=i(28077),l=i(22289),c=i(18855),u=i(10918);class h extends c.Plugin{afterInit(e){let t=e.o.enter.toLowerCase(),i=t===n.BR.toLowerCase();e.o.enterBlock||(e.o.enterBlock=i?n.PARAGRAPH:t),e.registerCommand("enter",(e,t,i={})=>this.onEnter(i))}onEnterKeyDown(e){if(e.key===n.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{r.Dom.safeInsertNode(t.s.range,i),(0,u.moveCursorOutFromSpecialTags)(t,i,["a"]);let o=(0,u.getBlockWrapper)(i,t),n=r.Dom.isLeaf(o);if((!n||e?.shiftKey)&&(0,u.checkBR)(i,t,e?.shiftKey,o))return!1;if(o||(0,u.hasPreviousBlock)(i,t)||(o=(0,u.wrapText)(i,t)),!o)return(0,u.insertParagraph)(i,t,n?"li":t.o.enter),!1;if(!(0,u.checkUnsplittableBox)(i,t,o))return!1;if(n&&this.__isEmptyListLeaf(o))return(0,u.processEmptyLILeaf)(i,t,o),!1;(0,u.splitFragment)(i,t,o)}finally{i.isConnected&&t.s.setCursorBefore(i),r.Dom.safeRemove(i)}}__isEmptyListLeaf(e){let t=this.j.e.fire("enterIsEmptyListLeaf",e);return(0,l.isBoolean)(t)?t:r.Dom.isEmpty(e)}beforeDestruct(e){e.e.off("keydown.enter")}}(0,o.__decorate)([(0,s.watch)(":keydown.enter")],h.prototype,"onEnterKeyDown",null),a.pluginSystem.add("enter",h)},34287:function(e,t,i){"use strict";i.d(t,{checkBR:function(){return r}});var o=i(81937),n=i(23211),s=i(60898);function r(e,t,i,r){let l=!!n.Dom.closest(e,["pre","blockquote"],t.editor),c=!l&&(r?n.Dom.isCell(r):!!n.Dom.closest(e,["td","th"],t.editor));if(t.o.enter.toLowerCase()===o.BR.toLowerCase()||c||i&&!l||!i&&l){var u;let i;if(l&&(i=a(a(u=e)))&&(n.Dom.safeRemove(a(u)),n.Dom.safeRemove(i),1))return!1;let o=t.createInside.element("br");if(n.Dom.before(e,o),!n.Dom.findNotEmptySibling(o,!1)){let t=o.cloneNode();n.Dom.after(o,t),n.Dom.before(t,e)}return(0,s.scrollIntoViewIfNeeded)(o,t.editor,t.ed),!0}return!1}function a(e){if(!e)return!1;let t=n.Dom.findSibling(e,!0);return!!t&&!!n.Dom.isTag(t,"br")&&t}},8524:function(e,t,i){"use strict";i.d(t,{checkUnsplittableBox:function(){return n}});var o=i(23211);function n(e,t,i){return!!o.Dom.canSplitBlock(i)||(o.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,s=o.IS_BLOCK){let r=t,a=i.editor;do{if(!r||r===a)break;if(s.test(r.nodeName)){if(n.Dom.isLeaf(r))return r;return e(r.parentNode,i,/^li$/i)||r}r=r.parentNode}while(r&&r!==a)return null}}});var o=i(81937),n=i(23211)},66862:function(e,t,i){"use strict";i.d(t,{hasPreviousBlock:function(){return n}});var o=i(23211);function n(e,t){return!!o.Dom.prev(e,e=>o.Dom.isBlock(e)||o.Dom.isImage(e),t.editor)}},10918:function(e,t,i){"use strict";i.d(t,{checkBR:function(){return o.checkBR},checkUnsplittableBox:function(){return n.checkUnsplittableBox},getBlockWrapper:function(){return s.getBlockWrapper},hasPreviousBlock:function(){return r.hasPreviousBlock},insertParagraph:function(){return a.insertParagraph},moveCursorOutFromSpecialTags:function(){return l.moveCursorOutFromSpecialTags},processEmptyLILeaf:function(){return c.processEmptyLILeaf},splitFragment:function(){return u.splitFragment},wrapText:function(){return h.wrapText}});var o=i(34287),n=i(8524),s=i(83376),r=i(66862),a=i(65710),l=i(47919),c=i(34672),u=i(46303),h=i(52938)},65710:function(e,t,i){"use strict";i.d(t,{insertParagraph:function(){return r}});var o=i(23211),n=i(7909),s=i(60898);function r(e,t,i,r){let a="br"===i.toLowerCase(),{createInside:l}=t,c=l.element(i),u=l.element("br");return a||o.Dom.append(c,u),r&&r.cssText&&(0,n.attr)(c,"style",r.cssText),o.Dom.after(e,c),o.Dom.before(a?c:u,e),(0,s.scrollIntoViewIfNeeded)(c,t.editor,t.ed),c}},47919:function(e,t,i){"use strict";i.d(t,{moveCursorOutFromSpecialTags:function(){return n}});var o=i(23211);function n(e,t,i){let{s:n}=e,s=o.Dom.closest(t,i,e.editor);s&&(n.cursorOnTheRight(s,t)?o.Dom.after(s,t):n.cursorOnTheLeft(s,t)&&o.Dom.before(s,t))}},34672:function(e,t,i){"use strict";i.d(t,{processEmptyLILeaf:function(){return r}});var o=i(23211),n=i(28723),s=i(65710);function r(e,t,i){let r=o.Dom.closest(i,["ol","ul"],t.editor);if(!r)return;let a=r.parentElement,l=o.Dom.isLeaf(a),c=l?a:r,u=t.s.createRange();u.setStartAfter(i),u.setEndAfter(r);let h=u.extractContents();o.Dom.after(c,e),o.Dom.safeRemove(i),(0,n.$$)("li",r).length||o.Dom.safeRemove(r);let d=(0,s.insertParagraph)(e,t,l?"li":t.o.enter);o.Dom.first(h,e=>o.Dom.isTag(e,"li"))&&(l?o.Dom.append(d,h):o.Dom.after(d,h))}},46303:function(e,t,i){"use strict";i.d(t,{splitFragment:function(){return r}});var o=i(23211),n=i(60898),s=i(65710);function r(e,t,i){let r=t.s,{enter:a}=t.o,l=a.toLowerCase(),c=o.Dom.isLeaf(i),u=i.tagName.toLowerCase()===l||c,h=r.cursorOnTheRight(i,e),d=r.cursorOnTheLeft(i,e);if(!u&&(h||d)){h?o.Dom.after(i,e):o.Dom.before(i,e),(0,s.insertParagraph)(e,t,l),d&&!h&&o.Dom.prepend(i,e);return}let{scrollTop:f}=t.editor;r.splitSelection(i,e),t.editor.scrollTop!==f&&(t.editor.scrollTop=f),(0,n.scrollIntoViewIfNeeded)(i,t.editor,t.ed)}},52938:function(e,t,i){"use strict";i.d(t,{wrapText:function(){return n}});var o=i(23211);function n(e,t){let i=e;o.Dom.up(i,e=>{e&&e.hasChildNodes()&&e!==t.editor&&(i=e)},t.editor);let n=o.Dom.wrapInline(i,t.o.enter,t);if(o.Dom.isEmpty(n)){let i=t.createInside.element("br");o.Dom.append(n,i),o.Dom.before(i,e)}return n}},49764:function(e,t,i){"use strict";var o=i(23211),n=i(28077),s=i(7909),r=i(5266),a=i(15753);function l(e){e.files?.forEach(t=>{let i=this.createInside.element("a",{href:e.baseurl+t});i.textContent=this.o.uploader.getDisplayName.call(this.uploader,e.baseurl,t),this.s.insertNode(i)})}r.Config.prototype.file={defaultHandlerSuccess:l},r.Config.prototype.controls.file={popup(e,t,i){let n=(t,i="")=>{e.s.insertNode(e.createInside.fromHTML(`<a href="${t}" title="${i}">${i||t}</a>`))},r=null;return t&&(o.Dom.isTag(t,"a")||o.Dom.closest(t,"a",e.editor))&&(r=o.Dom.isTag(t,"a")?t:o.Dom.closest(t,"a",e.editor)),(0,a.FileSelectorWidget)(e,{filebrowser(e){e.files&&e.files.forEach(t=>n(e.baseurl+t)),i()},upload(t){(e.o.file?.defaultHandlerSuccess??l).call(e,t)},url(e,t){r?((0,s.attr)(r,"href",e),(0,s.attr)(r,"title",t)):n(e,t),i()}},r,i,!1)},tags:["a"],tooltip:"Insert file"},n.pluginSystem.add("file",function(e){e.registerButton({name:"file",group:"media"})})},78690:function(e,t,i){"use strict";var o=i(27795),n=i(28077),s=i(5266);s.Config.prototype.autofocus=!1,s.Config.prototype.cursorAfterAutofocus="end",s.Config.prototype.saveSelectionOnBlur=!0,n.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",()=>{e.o.autofocus&&(e.defaultTimeout?e.async.setTimeout(t,300):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)&&!t.target.childNodes.length&&(e.editor===t.target?e.s.focus():e.s.setCursorIn(t.target))})})})},7433:function(e,t,i){"use strict";var o=i(27795),n=i(4040),s=i(80991),r=i(29434),a=i(5266),l=i(48842),c=i.n(l),u=i(25501),h=i.n(u);a.Config.prototype.defaultFontSizePoints="px",r.Icon.set("font",c()).set("fontsize",h()),a.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();if(!i)return;let n=o.Dom.closest(i,o.Dom.isElement,e.editor);if(!n)return;let r=t.control,a=r.data?.cssRule||"font-size",l=(0,s.css)(n,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,o=t.control.data?.normalize??(e=>e);return!!(i&&t.control.args&&o(t.control.args[0].toString())===o(i.toString()))},isActive(e,t){let i=t.state.value;if(!i)return!1;let o=t.control.data?.normalize??(e=>e),n=t.control.data.cacheListSet;return n||(n=new Set(Object.keys(t.control.list).map(o)),t.control.data.cacheListSet=n),n.has(o(i.toString()))}},a.Config.prototype.controls.font={...a.Config.prototype.controls.fontsize,command:"fontname",textTemplate(e,t){let[i]=t.split(",");return(0,n.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 o=!1;try{o=-1===t.indexOf("dings")&&document.fonts.check("16px "+t,i)}catch{}return`<span data-style="${t}" style="${o?`font-family: ${t}!important;`:""}">${i}</span>`},data:{cssRule:"font-family",normalize:e=>e.toLowerCase().replace(/['"]+/g,"").replace(/[^a-z0-9-]+/g,",")},value(e){let t=e.s.current();if(!t)return;let i=o.Dom.closest(t,o.Dom.isElement,e.editor);if(!i)return;let n=(0,s.css)(i,"font-family").toString();return n===(0,s.css)(e.editor,"font-family").toString()?"":n},tooltip:"Font family"}},50294:function(e,t,i){"use strict";var o=i(28077),n=i(65946);i(7433),o.pluginSystem.add("font",function(e){e.registerButton({name:"font",group:"font"}).registerButton({name:"fontsize",group:"font"});let t=(t,i,o)=>{switch(t){case"fontsize":e.s.commitStyle({attributes:{style:{fontSize:(0,n.normalizeSize)(o,e.o.defaultFontSizePoints)}}});break;case"fontname":e.s.commitStyle({attributes:{style:{fontFamily:o}}})}return e.synchronizeValues(),!1};e.registerCommand("fontsize",t).registerCommand("fontname",t)})},96863:function(e,t,i){"use strict";var o=i(23211),n=i(62101),s=i(29434),r=i(5266),a=i(29348),l=i.n(a);s.Icon.set("paragraph",l()),r.Config.prototype.controls.paragraph={command:"formatBlock",value(e,t){let i=t.control,n=e.s.current(),s=o.Dom.closest(n,o.Dom.isBlock,e.editor);return s?.nodeName.toLowerCase()??i.data?.currentValue},update(e,t){let i=t.control;if(!e.s.current())return!1;let o=t.state.value,s=i.list;return(0,n.isPlainObject)(s)&&s[o.toString()]&&e.o.textIcons&&(t.state.text=s[o.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,n.isPlainObject)(t.control.list)&&!!t.control.list[t.state.value],childTemplate:(e,t,i)=>`<${t} style="margin:0;padding:0"><span>${e.i18n(i)}</span></${t}>`,tooltip:"Insert format block"}},53390:function(e,t,i){"use strict";var o=i(28077);i(96863),o.pluginSystem.add("formatBlock",function(e){e.registerButton({name:"paragraph",group:"font"}),e.registerCommand("formatblock",(t,i,o)=>(e.s.commitStyle({element:o}),e.synchronizeValues(),!1))})},80538:function(e,t,i){"use strict";var o=i(81937),n=i(29434),s=i(5266),r=i(24772),a=i.n(r),l=i(66547),c=i.n(l);s.Config.prototype.fullsize=!1,s.Config.prototype.globalFullSize=!0,n.Icon.set("fullsize",a()).set("shrink",c()),s.Config.prototype.controls.fullsize={exec(e){e.toggleFullSize()},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:o.MODE_SOURCE+o.MODE_WYSIWYG}},69696:function(e,t,i){"use strict";var o=i(23211),n=i(28077),s=i(24497),r=i(80991);i(80538);let a=new Set;n.pluginSystem.add("fullsize",function(e){e.registerButton({name:"fullsize"});let t=!1,i=0,n=0,l=0,c=0,u=!1,h=()=>{let{container:o,events:s}=e;s&&(t?(u||(i=(0,r.css)(o,"height",!0),n=(0,r.css)(o,"width",!0),u=!0),(0,r.css)(o,{height:e.ow.innerHeight,width:e.ow.innerWidth})):u&&((0,r.css)(o,{height:i||"auto",width:n||"auto"}),u=!1))},d=i=>{let{container:n,events:u}=e;if(n){if(void 0===i&&(i=!n.classList.contains("jodit_fullsize")),e.setMod("fullsize",i),e.o.fullsize=i,t=i,n.classList.toggle("jodit_fullsize",i),e.toolbar&&((0,s.isJoditObject)(e)&&e.toolbarContainer&&o.Dom.append(e.toolbarContainer,e.toolbar.container),(0,r.css)(e.toolbar.container,"width","auto")),i?a.add(n):a.delete(n),e.o.globalFullSize&&(1===a.size&&i||0===a.size&&!i)){i&&(l=e.ow.scrollX,c=e.ow.scrollY);let t=n.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;h(),i||e.ow.scrollTo(l,c)}u.fire("afterResize")}};e.o.globalFullSize&&e.e.on(e.ow,"resize",h),e.e.on("afterInit afterOpen",()=>{e.toggleFullSize(e?.options?.fullsize)}).on("toggleFullSize",d).on("beforeDestruct",()=>{t&&d(!1)}).on("beforeDestruct",()=>{e.events&&e.e.off(e.ow,"resize",h)})})},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 o=i(25045),n=i(81937),s=i(28077),r=i(65946),a=i(91206);i(14907);class l extends a.Plugin{afterInit(e){(0,r.keys)(e.o.commandToHotkeys,!1).forEach(t=>{let i=e.o.commandToHotkeys[t];i&&((0,r.isArray)(i)||(0,r.isString)(i))&&e.registerHotkeyToCommand(i,t)});let t=!1;e.e.off(".hotkeys").on([e.ow,e.ew],"keydown.hotkeys",e=>{if(e.key===n.KEY_ESC)return this.j.e.fire("escape",e)}).on("keydown.hotkeys",i=>{let o=this.onKeyPress(i),n={shouldStop:!0};if(!1===this.j.e.fire(o+".hotkey",i.type,n))if(n.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,o._)(this,"onKeyPress",e=>{let t=this.specialKeys[e.which],i=(e.key||String.fromCharCode(e.which)).toLowerCase(),o=[t||i];return["alt","ctrl","shift","meta"].forEach(i=>{e[i+"Key"]&&t!==i&&o.push(i)}),(0,r.normalizeKeyAliases)(o.join("+"))}),(0,o._)(this,"specialKeys",{8:"backspace",9:"tab",10:"return",13:"return",16:"shift",17:"ctrl",18:"alt",19:"pause",20:"capslock",27:"esc",32:"space",33:"pageup",34:"pagedown",35:"end",36:"home",37:"left",38:"up",39:"right",40:"down",45:"insert",46:"del",59:";",61:"=",91:"meta",96:"0",97:"1",98:"2",99:"3",100:"4",101:"5",102:"6",103:"7",104:"8",105:"9",106:"*",107:"+",109:"-",110:".",111:"/",112:"f1",113:"f2",114:"f3",115:"f4",116:"f5",117:"f6",118:"f7",119:"f8",120:"f9",121:"f10",122:"f11",123:"f12",144:"numlock",145:"scroll",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"})}}s.pluginSystem.add("hotkeys",l)},2952:function(e,t,i){"use strict";var o=i(27795),n=i(28077),s=i(29434),r=i(5266),a=i(89097),l=i.n(a);s.Icon.set("hr",l()),r.Config.prototype.controls.hr={command:"insertHorizontalRule",tags:["hr"],tooltip:"Insert Horizontal Line"},n.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=o.Dom.closest(t.parentElement,o.Dom.isBlock,e.editor);i&&o.Dom.isEmpty(i)&&i!==e.editor&&(o.Dom.after(i,t),o.Dom.safeRemove(i));let n=o.Dom.next(t,o.Dom.isBlock,e.editor,!1);return n||(n=e.createInside.element(e.o.enter),o.Dom.after(t,n)),e.s.setCursorIn(n),!1})})},17326:function(e,t,i){"use strict";var o=i(5266);o.Config.prototype.iframeBaseUrl="",o.Config.prototype.iframeTitle="Jodit Editor",o.Config.prototype.iframeDoctype="<!DOCTYPE html>",o.Config.prototype.iframeDefaultSrc="about:blank",o.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_editor .jodit_iframe_wrapper{display: block;clear: both;user-select: none;position: relative;}.jodit_editor .jodit_iframe_wrapper:after {position:absolute;content:"";z-index:1;top:0;left:0;right: 0;bottom: 0;cursor: pointer;display: block;background: rgba(0, 0, 0, 0);} .jodit-wysiwyg_image-selected::selection,.jodit-wysiwyg_image-selected *:not(img)::selection{background:transparent}.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}',o.Config.prototype.iframeCSSLinks=[],o.Config.prototype.iframeSandbox=null},81144:function(e,t,i){"use strict";var o=i(81937),n=i(23211),s=i(28077),r=i(65946);i(17326),s.pluginSystem.add("iframe",function(e){let t=e.options;e.e.on("afterSetMode",()=>{e.isEditorMode()&&e.s.focus()}).on("generateDocumentStructure.iframe",(e,i)=>{let o=e||i.iframe.contentWindow.document;if(o.open(),o.write(t.iframeDoctype+`<html dir="${t.direction}" class="jodit" lang="${(0,r.defaultLanguage)(t.language)}">`+"<head>"+`<title>${t.iframeTitle}</title>`+(t.iframeBaseUrl?`<base href="${t.iframeBaseUrl}"/>`:"")+'</head><body class="jodit-wysiwyg"></body></html>'),o.close(),t.iframeCSSLinks&&t.iframeCSSLinks.forEach(e=>{let t=o.createElement("link");(0,r.attr)(t,"rel","stylesheet"),(0,r.attr)(t,"href",e),o.head&&n.Dom.append(o.head,t)}),t.iframeStyle){let e=o.createElement("style");e.innerHTML=t.iframeStyle,o.head&&n.Dom.append(o.head,e)}}).on("createEditor",()=>{if(!t.iframe)return;let i=e.c.element("iframe");(0,r.css)(i,"display","block"),i.src="about:blank",i.className="jodit-wysiwyg_iframe",(0,r.attr)(i,{allowtransparency:"true",tabindex:t.tabIndex.toString(),frameborder:"0"}),null!=t.iframeSandbox&&(0,r.attr)(i,"sandbox",t.iframeSandbox),n.Dom.append(e.workplace,i),e.iframe=i;let s=e.e.fire("generateDocumentStructure.iframe",null,e);return(0,r.callPromise)(s,()=>{if(!e.iframe)return!1;let i=e.iframe.contentWindow.document;e.editorWindow=e.iframe.contentWindow;let n=t.editHTMLDocumentMode,s=()=>{(0,r.attr)(i.body,"contenteditable",e.getMode()!==o.MODE_SOURCE&&!e.getReadOnly()||null)},a=e=>{let t=/<body.*<\/body>/im,i="{%%BODY%%}",o=t.exec(e);return o&&(e=e.replace(t,i).replace(/<span([^>]*?)>(.*?)<\/span>/gim,"").replace(/&lt;span([^&]*?)&gt;(.*?)&lt;\/span&gt;/gim,"").replace(i,o[0].replace(/(<body[^>]+?)min-height["'\s]*:[\s"']*[0-9]+(px|%)/im,"$1").replace(/(<body[^>]+?)([\s]*["'])?contenteditable["'\s]*=[\s"']*true["']?/im,"$1").replace(/<(style|script|span)[^>]+jodit[^>]+>.*?<\/\1>/g,"")).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")),e};if(n){let t=e.element.tagName;if("TEXTAREA"!==t&&"INPUT"!==t)throw(0,r.error)("If enable `editHTMLDocumentMode` - source element should be INPUT or TEXTAREA");e.e.on("beforeGetNativeEditorValue",()=>a(e.o.iframeDoctype+i.documentElement.outerHTML)).on("beforeSetNativeEditorValue",({value:t})=>{if(e.isLocked)return!1;if(/<(html|body)/i.test(t)){if(a(i.documentElement.outerHTML)!==a(t)){var o;let n;o=a(t),n=new DOMParser().parseFromString(o,"text/html"),e.e.fire("safeHTML",n.documentElement),i.replaceChild(i.adoptNode(n.documentElement),i.documentElement),e.editor=i.body,s(),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",s),"auto"===t.height){i.documentElement&&(0,r.css)(i.documentElement,"overflowY","hidden");let o=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,r.css)(e.iframe,"height",e.editor.offsetHeight+i)}})},e.defaultTimeout/2);if(e.e.on("change afterInit afterSetMode resize",o).on([e.iframe,e.ew,i.documentElement],"load",o).on(i,"readystatechange DOMContentLoaded",o),"function"==typeof ResizeObserver){let t=new ResizeObserver(o);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})})})},51034:function(e,t,i){"use strict";i(5266).Config.prototype.imageProcessor={replaceDataURIToBlobIdInView:!0}},39978:function(e,t,i){"use strict";var o=i(31635),n=i(81937),s=i(84839),r=i(23211),a=i(28077),l=i(65946),c=i(91206),u=i(23112);i(51034);let h="__jodit_imageprocessor_binded",d=h+"blob-id",f="jodit-wysiwyg_image-selected";class p extends c.Plugin{afterInit(e){e.e.on(e.ed,"selectionchange",this.onSelectionChange)}beforeDestruct(e){e.e.off(e.ed,"selectionchange",this.onSelectionChange),e.editor.classList.remove(f);let t=(0,s.cached)(e,"buffer"),i=t?.get(d);if(t&&i){for(let e of Object.keys(i))URL.revokeObjectURL(e);t.delete(d)}}onAfterGetValueFromEditor(e,t){if(t!==n.SOURCE_CONSUMER)return this.onBeforeSetElementValue(e)}onBeforeSetElementValue(e){let{jodit:t}=this;if(!t.o.imageProcessor.replaceDataURIToBlobIdInView)return;let i=t.buffer.get(d);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(f,function(e){let{sel:t}=e.s;if(!t||!t.rangeCount)return!1;let{startContainer:i,startOffset:o,endContainer:n,endOffset:s}=t.getRangeAt(0);return i===n&&s===o+1&&r.Dom.isTag(i.childNodes[o],"img")&&r.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,h)||((0,l.dataBind)(e,h,!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 o=t.src;try{i=(0,u.dataURItoBlob)(o)}catch{return}t.src=URL.createObjectURL(i),e.e.fire("internalUpdate");let{buffer:n}=e,s=n.get(d)||{};s[t.src]=o,e.buffer.set(d,s)}(t,e),t.e.on(e,"mousedown touchstart",()=>{(function(e){for(let t of["previousSibling","nextSibling"]){let i=e[t];for(;r.Dom.isText(i)&&!i.nodeValue?.replace((0,n.INVISIBLE_SPACE_REG_EXP)(),"");){let e=i[t];r.Dom.safeRemove(i),i=e}}})(e),t.s.select(e)}))})}}(0,o.__decorate)([(0,s.watch)(":afterGetValueFromEditor")],p.prototype,"onAfterGetValueFromEditor",null),(0,o.__decorate)([(0,s.watch)(":beforeSetElementValue")],p.prototype,"onBeforeSetElementValue",null),(0,o.__decorate)([s.autobind],p.prototype,"onSelectionChange",null),(0,o.__decorate)([(0,s.watch)([":change",":afterInit",":changePlace"]),(0,s.debounce)()],p.prototype,"afterChange",null),a.pluginSystem.add("imageProcessor",p)},34689:function(e,t,i){"use strict";i(5266).Config.prototype.image={dialogWidth:600,openOnDblClick:!0,editSrc:!0,useImageEditor:!0,editTitle:!0,editAlt:!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 o=i(25045),n=i(31635),s=i(84839),r=i(23211),a=i(28077),l=i(65946),c=i(18855),u=i(59400);i(34689);var h=i(27137),d=i(28771),f=i(670),p=i(47744),m=i(71552);class g extends c.Plugin{get form(){return new h.UIImagePropertiesForm(this.j,this.state,this.activeTabState,{openImageEditor:()=>(0,d.openImageEditorDialog)(this.j,this.state),openImagePopup:e=>(0,f.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,m.applyValuesToImage)(e,this.state,this.state.sourceImage),e.synchronizeValues(),t.close()}),i.remove.onAction(()=>{e.s.removeNode(this.state.sourceImage),t.close()}),i.cancel.onAction(()=>{t.close()}),t.setHeader(e.i18n("Image properties")),t.setContent(this.form),t.setFooter([[i.cancel,i.remove],i.check]),e.e.on(t,"afterClose",()=>{this.state.image.parentNode&&e.o.image.selectImageAfterClose&&e.s.select(this.state.sourceImage)}),t.setSize(e.o.image.dialogWidth),(0,l.markOwner)(e,t.container),t}get __buttons(){let{j:e}=this;return{check:(0,u.Button)(e,"ok","Apply","primary"),remove:(0,u.Button)(e,"bin","Delete"),cancel:(0,u.Button)(e,"cancel","Cancel")}}open(){return this.activeTabState.activeTab="Image",this.__lock(),this.dialog.open().setModal(!0).setPosition(),this.async.promise((e,t)=>(0,p.readValuesFromImage)(this.j,this.state).then(e,t)).catch(e=>{(0,l.isAbortError)(e)||this.dialog.message.error(e.message)}).finally(()=>this.__unlock()),!1}__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 o=i.target;if(r.Dom.isTag(o,"img"))if(e.o.image.openOnDblClick){if(!1===this.j.e.fire("openOnDblClick",o))return;t.state.sourceImage=o,t.state.image=o.cloneNode(!0),e.o.readonly||(i.stopImmediatePropagation(),i.preventDefault(),t.open())}else i.stopImmediatePropagation(),e.s.select(o)})}).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,s.cached)(this,"__buttons")??{}).forEach(e=>e.destruct()),(0,s.cached)(this,"dialog")?.destruct(),(0,s.cached)(this,"form")?.destruct(),e.e.off(e.editor,".imageproperties").off(".imageproperties")}constructor(...e){super(...e),(0,o._)(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:"",imageLink:"",imageLinkOpenInNewTab:!1,imageWidth:0,imageHeight:0,marginTop:0,marginRight:0,marginBottom:0,marginLeft:0,classes:"",id:"",align:""}}),(0,o._)(this,"activeTabState",{activeTab:"Image"})}}(0,n.__decorate)([s.cache],g.prototype,"form",null),(0,n.__decorate)([s.cache],g.prototype,"dialog",null),(0,n.__decorate)([s.cache],g.prototype,"__buttons",null),(0,n.__decorate)([(0,s.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 n}});var o=i(16849);function n(e,t,i){let n=(0,o.getHAlign)(e,i);t.align="normal"===n?"":n}},47744:function(e,t,i){"use strict";i.d(t,{readValuesFromImage:function(){return c}});var o=i(7909),n=i(80991),s=i(26633),r=i(79310),a=i(18380),l=i(57339);async function c(e,t){let{sourceImage:i,values:c}=t;return(0,s.readAlign)(i,c,e.o.imageAlignClasses),c.borderRadius=parseInt((0,n.cssInline)(i,"border-radius")||"0",10)||0,c.id=(0,o.attr)(i,"id")||"",c.imageTitle=(0,o.attr)(i,"title")||"",c.imageAlt=(0,o.attr)(i,"alt")||"",c.style=(0,o.attr)(i,"style")||"",c.classes=((0,o.attr)(i,"class")||"").replace(/jodit_focused_image[\s]*/,""),(0,a.readMargins)(i,c,t),(0,r.readLink)(t,e,c),c.imageSrc=(0,o.attr)(i,"src")||"",(0,l.readSizes)(i,c,t)}},79310:function(e,t,i){"use strict";i.d(t,{readLink:function(){return s}});var o=i(23211),n=i(7909);function s(e,t,i){let s=o.Dom.closest(e.sourceImage,"a",t.editor);s?(i.imageLink=(0,n.attr)(s,"href")||"",i.imageLinkOpenInNewTab="_blank"===(0,n.attr)(s,"target")):(i.imageLink="",i.imageLinkOpenInNewTab=!1)}},18380:function(e,t,i){"use strict";i.d(t,{readMargins:function(){return n}});var o=i(74264);function n(e,t,i){let n=!0,s=!1;["marginTop","marginRight","marginBottom","marginLeft"].forEach(i=>{let r=e.style.getPropertyValue((0,o.kebabCase)(i));if(!r){s=!0,t[i]=0;return}/^[0-9]+(px)?$/.test(r)&&(r=parseInt(r,10)),t[i]=r,(s&&t[i]||n&&"marginTop"!==i&&t[i]!==t.marginTop)&&(n=!1)}),i.marginIsLocked=n}},57339:function(e,t,i){"use strict";i.d(t,{readSizes:function(){return a}});var o=i(70222),n=i(7909),s=i(80991),r=i(10808);async function a(e,t,i){try{await e.decode()}catch(e){}let a=(0,s.css)(e,"width",!0)||(0,n.attr)(e,"width")||!1,l=(0,s.css)(e,"height",!0)||(0,n.attr)(e,"height")||!1;t.imageWidth=!1!==a?(0,r.normalSizeFromString)(a):e.offsetWidth||e.naturalWidth,(0,o.isNumeric)(t.imageWidth)?t.imageHeight=!1!==l?(0,r.normalSizeFromString)(l):e.offsetHeight||e.naturalHeight:t.imageHeight=l||"";let{imageWidth:c,imageHeight:u}=t,h=parseFloat(c.toString());if(!(0,o.isNumeric)(c)||!(0,o.isNumeric)(u)){i.sizeIsLocked=!1;return}if(!1===l){t.imageHeight=Math.round(h/i.ratio),i.sizeIsLocked=!0;return}i.sizeIsLocked=1>Math.abs(h-parseFloat(u.toString())*i.ratio)}},27137:function(e,t,i){"use strict";i.d(t,{UIImagePropertiesForm:function(){return p}});var o=i(25045),n=i(31635),s=i(84839),r=i(91672),a=i(23211),l=i(65946),c=i(63468),u=i(29434),h=i(15753),d=i(29596),f=i(17306);class p extends c.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">
@@ -149,7 +149,7 @@
149
149
  </div>
150
150
  <div class="jodit_col-lg-3-5 jodit_col-xs-5-5 &__tabsBox"></div>
151
151
  </div>
152
- </form>`}onChangeSizeIsLocked(){let e=this.getElm("lockSize"),t=this.getElm("imageWidth");e.innerHTML=u.Icon.get(this.state.sizeIsLocked?"lock":"unlock"),this.setMod("lock-size",this.state.sizeIsLocked),this.j.e.fire(t,"change")}onLockSizeClick(){this.state.sizeIsLocked=!this.state.sizeIsLocked}onStateValuesSizeChange(){let e=this.getElm("imageWidth"),t=this.getElm("imageHeight");e!==this.j.od.activeElement&&(e.value=this.state.values.imageWidth.toString()),t!==this.j.od.activeElement&&(t.value=this.state.values.imageHeight.toString())}onImageWidthChange(e){let t=this.getElm("imageWidth"),i=this.getElm("imageHeight");if(!this.state.sizeIsLocked||!(0,l.isNumeric)(t.value)||!(0,l.isNumeric)(i.value)){this.state.values.imageWidth=t.value,this.state.values.imageHeight=i.value;return}let o=parseFloat(t.value),n=parseFloat(i.value);e.target===t?(this.state.values.imageWidth=o,this.state.values.imageHeight=Math.round(o/this.state.ratio)):(this.state.values.imageWidth=Math.round(n*this.state.ratio),this.state.values.imageHeight=n)}onStateValuesImageSrcChange(){let{imageSrc:e}=this.state.values;if(!e)return;let t=this.getElm("imageViewSrc");(0,l.attr)(t,"src",e);let i=new Image;i.src=e,this.state.image=i}hideFieldByOptions(){let e=this.j.o.image;[["editSize","imageSizes"],["showPreview","imageView"]].forEach(([t,i])=>{let o=this.getElm(i);(0,l.css)(o,"display",e[t]?null:"none")})}constructor(e,t,i,n){super(e),(0,o._)(this,"state",void 0),(0,o._)(this,"handlers",void 0),(0,o._)(this,"__mainTab",void 0),(0,o._)(this,"__positionTab",void 0),this.state=t,this.handlers=n,this.__mainTab=new d.UIImageMainTab(this.jodit,this.state,this.handlers),this.__positionTab=new p.UIImagePositionTab(this.jodit,this.state,this.handlers),a.Dom.append(this.getElm("tabsBox"),(0,h.TabsWidget)(e,[{name:"Image",content:this.__mainTab},{name:"Advanced",content:this.__positionTab}],i)),this.setMod("lock-size",this.state.sizeIsLocked),this.append(this.__mainTab).append(this.__positionTab)}}(0,n.__decorate)([(0,s.hook)("ready"),(0,s.watch)("state.sizeIsLocked")],f.prototype,"onChangeSizeIsLocked",null),(0,n.__decorate)([(0,s.watch)("lockSize:click")],f.prototype,"onLockSizeClick",null),(0,n.__decorate)([(0,s.hook)("ready"),(0,s.watch)(["state.values.imageWidth","state.values.imageHeight"])],f.prototype,"onStateValuesSizeChange",null),(0,n.__decorate)([(0,s.watch)(["imageWidth:change","imageHeight:change","imageWidth:keydown","imageHeight:keydown","imageWidth:mousedown","imageHeight:mousedown","imageWidth:paste","imageHeight:paste"]),(0,s.debounce)()],f.prototype,"onImageWidthChange",null),(0,n.__decorate)([(0,s.hook)("ready"),(0,s.watch)("state.values.imageSrc")],f.prototype,"onStateValuesImageSrcChange",null),(0,n.__decorate)([(0,s.hook)("ready")],f.prototype,"hideFieldByOptions",null),f=(0,n.__decorate)([r.component],f)},29596:function(e,t,i){"use strict";i.d(t,{UIImageMainTab:function(){return u}});var o=i(25045),n=i(31635),s=i(91672),r=i(29200),a=i(68616),l=i(65946),c=i(63468);class u extends c.UIGroup{className(){return"UIImageMainTab"}appendChildToContainer(){}render(){return`<div class="jodit-form__group &__editSrc">
152
+ </form>`}onChangeSizeIsLocked(){let e=this.getElm("lockSize"),t=this.getElm("imageWidth");e.innerHTML=u.Icon.get(this.state.sizeIsLocked?"lock":"unlock"),this.setMod("lock-size",this.state.sizeIsLocked),this.j.e.fire(t,"change")}onLockSizeClick(){this.state.sizeIsLocked=!this.state.sizeIsLocked}onStateValuesSizeChange(){let e=this.getElm("imageWidth"),t=this.getElm("imageHeight");e!==this.j.od.activeElement&&(e.value=this.state.values.imageWidth.toString()),t!==this.j.od.activeElement&&(t.value=this.state.values.imageHeight.toString())}onImageWidthChange(e){let t=this.getElm("imageWidth"),i=this.getElm("imageHeight");if(!this.state.sizeIsLocked||!(0,l.isNumeric)(t.value)||!(0,l.isNumeric)(i.value)){this.state.values.imageWidth=t.value,this.state.values.imageHeight=i.value;return}let o=parseFloat(t.value),n=parseFloat(i.value);e.target===t?(this.state.values.imageWidth=o,this.state.values.imageHeight=Math.round(o/this.state.ratio)):(this.state.values.imageWidth=Math.round(n*this.state.ratio),this.state.values.imageHeight=n)}onStateValuesImageSrcChange(){let{imageSrc:e}=this.state.values;if(!e)return;let t=this.getElm("imageViewSrc");(0,l.attr)(t,"src",e);let i=new Image;i.src=e,this.state.image=i}hideFieldByOptions(){let e=this.j.o.image;[["editSize","imageSizes"],["showPreview","imageView"]].forEach(([t,i])=>{let o=this.getElm(i);(0,l.css)(o,"display",e[t]?null:"none")})}constructor(e,t,i,n){super(e),(0,o._)(this,"state",void 0),(0,o._)(this,"handlers",void 0),(0,o._)(this,"__mainTab",void 0),(0,o._)(this,"__positionTab",void 0),this.state=t,this.handlers=n,this.__mainTab=new d.UIImageMainTab(this.jodit,this.state,this.handlers),this.__positionTab=new f.UIImagePositionTab(this.jodit,this.state,this.handlers),a.Dom.append(this.getElm("tabsBox"),(0,h.TabsWidget)(e,[{name:"Image",content:this.__mainTab},{name:"Advanced",content:this.__positionTab}],i)),this.setMod("lock-size",this.state.sizeIsLocked),this.append(this.__mainTab).append(this.__positionTab)}}(0,n.__decorate)([(0,s.hook)("ready"),(0,s.watch)("state.sizeIsLocked")],p.prototype,"onChangeSizeIsLocked",null),(0,n.__decorate)([(0,s.watch)("lockSize:click")],p.prototype,"onLockSizeClick",null),(0,n.__decorate)([(0,s.hook)("ready"),(0,s.watch)(["state.values.imageWidth","state.values.imageHeight"])],p.prototype,"onStateValuesSizeChange",null),(0,n.__decorate)([(0,s.watch)(["imageWidth:change","imageHeight:change","imageWidth:keydown","imageHeight:keydown","imageWidth:mousedown","imageHeight:mousedown","imageWidth:paste","imageHeight:paste"]),(0,s.debounce)()],p.prototype,"onImageWidthChange",null),(0,n.__decorate)([(0,s.hook)("ready"),(0,s.watch)("state.values.imageSrc")],p.prototype,"onStateValuesImageSrcChange",null),(0,n.__decorate)([(0,s.hook)("ready")],p.prototype,"hideFieldByOptions",null),p=(0,n.__decorate)([r.component],p)},29596:function(e,t,i){"use strict";i.d(t,{UIImageMainTab:function(){return u}});var o=i(25045),n=i(31635),s=i(91672),r=i(29200),a=i(68616),l=i(65946),c=i(63468);class u extends c.UIGroup{className(){return"UIImageMainTab"}appendChildToContainer(){}render(){return`<div class="jodit-form__group &__editSrc">
153
153
  <label>~Src~</label>
154
154
  <div class="jodit-input_group">
155
155
  <input class="jodit-input &__imageSrc" type="text"/>
@@ -176,7 +176,7 @@
176
176
  <input type="checkbox" class="jodit-checkbox &__imageLinkOpenInNewTab"/>
177
177
  <span>~Open link in new tab~</span>
178
178
  </label>
179
- </div>`}async onStateImageSrcChange(){this.getElm("imageSrc").value=this.state.values.imageSrc}onImageSrcChange(){this.state.values.imageSrc=this.getElm("imageSrc").value}onEditImageClick(e){this.handlers.openImageEditor(),e.stopPropagation()}onChangeImageClick(e){this.handlers.openImagePopup(this.getElm("changeImage")),e.stopPropagation()}onStateTitleChange(){this.getElm("imageTitle").value=this.state.values.imageTitle}onTitleChange(){this.state.values.imageTitle=this.getElm("imageTitle").value}onStateAltChange(){this.getElm("imageAlt").value=this.state.values.imageAlt}onAltChange(){this.state.values.imageAlt=this.getElm("imageAlt").value}onStateImageLinkChange(){this.getElm("imageLink").value=this.state.values.imageLink}onImageLinkChange(){this.state.values.imageLink=this.getElm("imageLink").value}onStateImageLinkOpenInNewTabChange(){this.getElm("imageLinkOpenInNewTab").checked=this.state.values.imageLinkOpenInNewTab}onImageLinkOpenInNewTabChange(){this.state.values.imageLinkOpenInNewTab=this.getElm("imageLinkOpenInNewTab").checked}hideFieldByOptions(){let e=this.j.o,t=e.image;[["editSrc","editSrc"],["editTitle","editTitle"],["editAlt","editAlt"],["editLink","editLink"],["editLink","editLinkTarget"],["useImageEditor","editImage"]].forEach(([e,i])=>{let o=this.getElm(i);(0,l.css)(o,"display",t[e]?null:"none")});let i=this.getElm("changeImage"),o=!!(e.filebrowser.ajax.url||e.uploader.url);(0,l.css)(i,"display",o?null:"none");let n=this.getElm("editImage"),s=!!e.filebrowser.ajax.url&&t.useImageEditor;(0,l.css)(n,"display",s?null:"none");let r=this.getElm("fixImage");(0,l.css)(r,"display",o||s?null:"none")}constructor(e,t,i){super(e),(0,o._)(this,"state",void 0),(0,o._)(this,"handlers",void 0),this.state=t,this.handlers=i}}(0,n.__decorate)([(0,a.watch)("state.values.imageSrc")],u.prototype,"onStateImageSrcChange",null),(0,n.__decorate)([(0,a.watch)("imageSrc:change")],u.prototype,"onImageSrcChange",null),(0,n.__decorate)([(0,a.watch)("editImage:click")],u.prototype,"onEditImageClick",null),(0,n.__decorate)([(0,a.watch)("changeImage:click")],u.prototype,"onChangeImageClick",null),(0,n.__decorate)([(0,a.watch)("state.values.imageTitle")],u.prototype,"onStateTitleChange",null),(0,n.__decorate)([(0,a.watch)("imageTitle:change")],u.prototype,"onTitleChange",null),(0,n.__decorate)([(0,a.watch)("state.values.imageAlt")],u.prototype,"onStateAltChange",null),(0,n.__decorate)([(0,a.watch)("imageAlt:change")],u.prototype,"onAltChange",null),(0,n.__decorate)([(0,a.watch)("state.values.imageLink")],u.prototype,"onStateImageLinkChange",null),(0,n.__decorate)([(0,a.watch)("imageLink:change")],u.prototype,"onImageLinkChange",null),(0,n.__decorate)([(0,a.watch)("state.values.imageLinkOpenInNewTab")],u.prototype,"onStateImageLinkOpenInNewTabChange",null),(0,n.__decorate)([(0,a.watch)("imageLinkOpenInNewTab:change")],u.prototype,"onImageLinkOpenInNewTabChange",null),(0,n.__decorate)([(0,r.hook)("ready")],u.prototype,"hideFieldByOptions",null),u=(0,n.__decorate)([s.component],u)},17306:function(e,t,i){"use strict";i.d(t,{UIImagePositionTab:function(){return f}});var o=i(25045),n=i(31635),s=i(91672),r=i(29200),a=i(68616),l=i(65946),c=i(85932),u=i(7909),h=i(96007),d=i(29434),p=i(10808);class f extends h.UIElement{className(){return"UIImagePositionTab"}render({availableClasses:e}){let t;return`<div class="jodit-form__group &__editMargins">
179
+ </div>`}async onStateImageSrcChange(){this.getElm("imageSrc").value=this.state.values.imageSrc}onImageSrcChange(){this.state.values.imageSrc=this.getElm("imageSrc").value}onEditImageClick(e){this.handlers.openImageEditor(),e.stopPropagation()}onChangeImageClick(e){this.handlers.openImagePopup(this.getElm("changeImage")),e.stopPropagation()}onStateTitleChange(){this.getElm("imageTitle").value=this.state.values.imageTitle}onTitleChange(){this.state.values.imageTitle=this.getElm("imageTitle").value}onStateAltChange(){this.getElm("imageAlt").value=this.state.values.imageAlt}onAltChange(){this.state.values.imageAlt=this.getElm("imageAlt").value}onStateImageLinkChange(){this.getElm("imageLink").value=this.state.values.imageLink}onImageLinkChange(){this.state.values.imageLink=this.getElm("imageLink").value}onStateImageLinkOpenInNewTabChange(){this.getElm("imageLinkOpenInNewTab").checked=this.state.values.imageLinkOpenInNewTab}onImageLinkOpenInNewTabChange(){this.state.values.imageLinkOpenInNewTab=this.getElm("imageLinkOpenInNewTab").checked}hideFieldByOptions(){let e=this.j.o,t=e.image;[["editSrc","editSrc"],["editTitle","editTitle"],["editAlt","editAlt"],["editLink","editLink"],["editLink","editLinkTarget"],["useImageEditor","editImage"]].forEach(([e,i])=>{let o=this.getElm(i);(0,l.css)(o,"display",t[e]?null:"none")});let i=this.getElm("changeImage"),o=!!(e.filebrowser.ajax.url||e.uploader.url);(0,l.css)(i,"display",o?null:"none");let n=this.getElm("editImage"),s=!!e.filebrowser.ajax.url&&t.useImageEditor;(0,l.css)(n,"display",s?null:"none");let r=this.getElm("fixImage");(0,l.css)(r,"display",o||s?null:"none")}constructor(e,t,i){super(e),(0,o._)(this,"state",void 0),(0,o._)(this,"handlers",void 0),this.state=t,this.handlers=i}}(0,n.__decorate)([(0,a.watch)("state.values.imageSrc")],u.prototype,"onStateImageSrcChange",null),(0,n.__decorate)([(0,a.watch)("imageSrc:change")],u.prototype,"onImageSrcChange",null),(0,n.__decorate)([(0,a.watch)("editImage:click")],u.prototype,"onEditImageClick",null),(0,n.__decorate)([(0,a.watch)("changeImage:click")],u.prototype,"onChangeImageClick",null),(0,n.__decorate)([(0,a.watch)("state.values.imageTitle")],u.prototype,"onStateTitleChange",null),(0,n.__decorate)([(0,a.watch)("imageTitle:change")],u.prototype,"onTitleChange",null),(0,n.__decorate)([(0,a.watch)("state.values.imageAlt")],u.prototype,"onStateAltChange",null),(0,n.__decorate)([(0,a.watch)("imageAlt:change")],u.prototype,"onAltChange",null),(0,n.__decorate)([(0,a.watch)("state.values.imageLink")],u.prototype,"onStateImageLinkChange",null),(0,n.__decorate)([(0,a.watch)("imageLink:change")],u.prototype,"onImageLinkChange",null),(0,n.__decorate)([(0,a.watch)("state.values.imageLinkOpenInNewTab")],u.prototype,"onStateImageLinkOpenInNewTabChange",null),(0,n.__decorate)([(0,a.watch)("imageLinkOpenInNewTab:change")],u.prototype,"onImageLinkOpenInNewTabChange",null),(0,n.__decorate)([(0,r.hook)("ready")],u.prototype,"hideFieldByOptions",null),u=(0,n.__decorate)([s.component],u)},17306:function(e,t,i){"use strict";i.d(t,{UIImagePositionTab:function(){return p}});var o=i(25045),n=i(31635),s=i(91672),r=i(29200),a=i(68616),l=i(65946),c=i(85932),u=i(7909),h=i(96007),d=i(29434),f=i(10808);class p extends h.UIElement{className(){return"UIImagePositionTab"}render({availableClasses:e}){let t;return`<div class="jodit-form__group &__editMargins">
180
180
  <label>~Margins~</label>
181
181
  <div class="jodit-grid jodit_vertical_middle">
182
182
  <input class="jodit_col-lg-1-5 jodit-input &__marginTop" type="text" placeholder="~top~"/>
@@ -212,15 +212,15 @@
212
212
  >
213
213
  <label>~Border radius~</label>
214
214
  <input type="number" class="jodit-input &__borderRadius"/>
215
- </div>`}onStateAlignChange(){this.getElm("align").value=this.state.values.align}onChangeAlign(){let e=this.getElm("align");this.state.values.align=e.value}onStateValuesBorderRadiusChange(){this.getElm("borderRadius").value=this.state.values.borderRadius.toString()}onChangeBorderRadius(){let e=this.getElm("borderRadius");this.state.values.borderRadius=parseFloat(e.value)}onStateValuesIdChange(){this.getElm("id").value=this.state.values.id}onChangeId(){let e=this.getElm("id");this.state.values.id=e.value}onStateValuesStyleChange(){this.getElm("style").value=this.state.values.style}onChangeStyle(){let e=this.getElm("style");this.state.values.style=e.value}onStateValuesClassesChange(){this.getElm("classes").value=this.state.values.classes}onChangClasses(){let e=this.getElm("classes");this.state.values.classes=e.value}onLockMarginClick(e){this.state.marginIsLocked=!this.state.marginIsLocked,e.preventDefault()}onChangeMarginIsLocked(){let e=this.getElm("marginBottom"),t=this.getElm("marginRight"),i=this.getElm("marginLeft"),o=this.getElm("lockMargin");if([t,e,i].forEach(e=>{(0,u.attr)(e,"disabled",this.state.marginIsLocked||null)}),o.innerHTML=d.Icon.get(this.state.marginIsLocked?"lock":"unlock"),this.state.marginIsLocked){let e=this.state.values.marginTop;this.state.values.marginRight=e,this.state.values.marginBottom=e,this.state.values.marginLeft=e}}onStateValuesMarginChange(){let e=this.getElm("marginTop"),t=this.getElm("marginRight"),i=this.getElm("marginBottom"),o=this.getElm("marginLeft");e.value=this.state.values.marginTop.toString(),t.value=this.state.values.marginRight.toString(),i.value=this.state.values.marginBottom.toString(),o.value=this.state.values.marginLeft.toString()}onChangeMargin(){let e=this.getElm("marginTop"),t=this.getElm("marginRight"),i=this.getElm("marginBottom"),o=this.getElm("marginLeft");this.state.values.marginTop=(0,p.normalSizeFromString)(e.value),this.state.marginIsLocked?(this.state.values.marginRight=this.state.values.marginTop,this.state.values.marginBottom=this.state.values.marginTop,this.state.values.marginLeft=this.state.values.marginTop):(this.state.values.marginRight=(0,p.normalSizeFromString)(t.value),this.state.values.marginBottom=(0,p.normalSizeFromString)(i.value),this.state.values.marginLeft=(0,p.normalSizeFromString)(o.value))}hideFieldByOptions(){let e=this.j.o.image;[["editMargins","editMargins"],["editAlign","editAlign"],["editStyle","editStyle"],["editClass","editClass"],["editId","editId"],["editBorderRadius","editBorderRadius"]].forEach(([t,i])=>{let o=this.getElm(i);(0,l.css)(o,"display",e[t]?null:"none")})}constructor(e,t,i){super(e,{availableClasses:e.o.image.availableClasses}),(0,o._)(this,"state",void 0),(0,o._)(this,"handlers",void 0),this.state=t,this.handlers=i}}(0,n.__decorate)([(0,r.hook)("ready"),(0,a.watch)("state.values.align")],f.prototype,"onStateAlignChange",null),(0,n.__decorate)([(0,a.watch)("align:change")],f.prototype,"onChangeAlign",null),(0,n.__decorate)([(0,r.hook)("ready"),(0,a.watch)("state.values.borderRadius")],f.prototype,"onStateValuesBorderRadiusChange",null),(0,n.__decorate)([(0,a.watch)("borderRadius:change")],f.prototype,"onChangeBorderRadius",null),(0,n.__decorate)([(0,r.hook)("ready"),(0,a.watch)("state.values.id")],f.prototype,"onStateValuesIdChange",null),(0,n.__decorate)([(0,a.watch)("id:change")],f.prototype,"onChangeId",null),(0,n.__decorate)([(0,r.hook)("ready"),(0,a.watch)("state.values.style")],f.prototype,"onStateValuesStyleChange",null),(0,n.__decorate)([(0,a.watch)("style:change")],f.prototype,"onChangeStyle",null),(0,n.__decorate)([(0,r.hook)("ready"),(0,a.watch)("state.values.classes")],f.prototype,"onStateValuesClassesChange",null),(0,n.__decorate)([(0,a.watch)("classes:change")],f.prototype,"onChangClasses",null),(0,n.__decorate)([(0,a.watch)("lockMargin:click")],f.prototype,"onLockMarginClick",null),(0,n.__decorate)([(0,r.hook)("ready"),(0,a.watch)("state.marginIsLocked")],f.prototype,"onChangeMarginIsLocked",null),(0,n.__decorate)([(0,r.hook)("ready"),(0,a.watch)(["state.values.marginTop","state.values.marginRight","state.values.marginBottom","state.values.marginLeft"])],f.prototype,"onStateValuesMarginChange",null),(0,n.__decorate)([(0,a.watch)(["marginTop:change","marginRight:change","marginBottom:change","marginLeft:change"])],f.prototype,"onChangeMargin",null),(0,n.__decorate)([(0,r.hook)("ready")],f.prototype,"hideFieldByOptions",null),f=(0,n.__decorate)([s.component],f)},28771:function(e,t,i){"use strict";i.d(t,{openImageEditorDialog:function(){return r}});var o=i(85932),n=i(7909),s=i(43271);function r(e,t){let i=(0,n.attr)(t.image,"src")||"",r=e.c.element("a"),a=()=>{if(r.host!==location.host)return void e.confirm("You can only edit your own images. Download this image on the host?",i=>{i&&e.uploader&&e.uploader.uploadRemoteImage(r.href.toString(),i=>{e.alert("The image has been successfully uploaded to the host!",()=>{(0,o.isString)(i.newfilename)&&(t.values.imageSrc=i.baseurl+i.newfilename)})},t=>{e.alert(e.i18n("There was an error loading %s",t.message))})})};r.href=i,e.filebrowser.dataProvider.getPathByUrl(r.href.toString()).then(o=>{s.openImageEditor.call(e.filebrowser,r.href,o.name,o.path,o.source,e=>{let o=new Date().getTime(),n=e||i;t.values.imageSrc=n+(-1!==n.indexOf("?")?"":"?")+"&_tmp="+o.toString()},t=>{e.alert(t.message)})}).catch(t=>{e.alert(t.message,a)})}},670:function(e,t,i){"use strict";i.d(t,{openImagePopup:function(){return a}});var o=i(17312),n=i(23599),s=i(51116),r=i(18762);function a(e,t,i,a){let l=new s.Popup(t),c=()=>{l.close(),l.destruct()};l.setContent((0,r.FileSelectorWidget)(e,{upload(e){e.files&&e.files.length&&(i.values.imageSrc=e.baseurl+e.files[0]),c()},async filebrowser(e){e&&(0,o.isArray)(e.files)&&e.files.length&&(i.values.imageSrc=e.files[0],c())}},i.image,c)).open(()=>(0,n.position)(a))}},10808:function(e,t,i){"use strict";var o=i(72412),n=i(4040);i.d(t,["normalSizeFromString",0,e=>/^[-+]?[0-9.]+(px)?$/.test(e.toString())?parseFloat(e.toString()):e,"normalSizeToString",0,e=>(0,o.isNumber)(e)?e?e+"px":e.toString():(e=(0,n.trim)(e),/^[0-9]+$/.test(e)?e+"px":e)])},71552:function(e,t,i){"use strict";i.d(t,{applyValuesToImage:function(){return c}});var o=i(23211),n=i(93640),s=i(80991),r=i(49422),a=i(21132),l=i(49147);function c(e,t,i){let{style:c,imageSrc:u,borderRadius:h,imageTitle:d,imageAlt:p,imageLink:f,imageWidth:m,imageHeight:g,marginTop:_,marginRight:v,marginBottom:b,marginLeft:y,imageLinkOpenInNewTab:w,align:S,classes:C,id:E}=t.values,D=e.o;(D.image.editStyle&&(0,n.attr)(i,"style",c||null),u)?((0,n.attr)(i,"src",u),(0,s.css)(i,"borderRadius",h?h+"px":""),(0,n.attr)(i,"title",d||null),(0,n.attr)(i,"alt",p||null),(0,r.applyLink)(e,i,f,w),(0,l.applySize)(i,m,g,t.sizeIsLocked),e.o.image.editMargins&&(0,a.applyMargin)(e,_,v,b,y,i,t.marginIsLocked),D.image.editClass&&(0,n.attr)(i,"class",C||null),D.image.editId&&(0,n.attr)(i,"id",E||null),D.image.editAlign&&(0,n.hAlignElement)(i,S,e.o.imageAlignClasses)):o.Dom.safeRemove(i)}},49422:function(e,t,i){"use strict";i.d(t,{applyLink:function(){return s}});var o=i(23211),n=i(7909);function s(e,t,i,s){let r=o.Dom.closest(t,"a",e.editor);if(i){if(r||(r=o.Dom.wrap(t,"a",e.createInside)),(0,n.attr)(r,"href",i),(0,n.attr)(r,"target",s?"_blank":null),!s){let e=((0,n.attr)(r,"rel")||"").split(/\s+/).filter(e=>e&&"noopener"!==e&&"noreferrer"!==e);(0,n.attr)(r,"rel",e.length?e.join(" "):null)}}else r&&r.parentNode&&o.Dom.replace(r,t,void 0,!1,!0)}},21132:function(e,t,i){"use strict";i.d(t,{applyMargin:function(){return s}});var o=i(80991),n=i(10808);function s(e,t,i,s,r,a,l){let c=[t,i,s,r],u=(e,t)=>{let i=(0,n.normalSizeToString)((0,o.cssInline)(a,e)||0),s=(0,n.normalSizeToString)(t);i!==s&&(0,o.css)(a,e,s)};if(l)u("margin",t);else{let e=["margin-top","margin-right","margin-bottom","margin-left"];c.forEach((t,i)=>{u(e[i],t)})}}},49147:function(e,t,i){"use strict";i.d(t,{applySize:function(){return a}});var o=i(70222),n=i(7909),s=i(80991),r=i(10808);function a(e,t,i,a){if(t!==e.offsetWidth||i!==e.offsetHeight){let l=t?(0,r.normalSizeToString)(t):null,c=i?(0,r.normalSizeToString)(i):null;(0,s.css)(e,{width:l,height:l&&a?null:c}),(0,n.attr)(e,"width",l&&(0,o.isNumeric)(t)&&(0,n.attr)(e,"width")?l:null),(!(0,n.attr)(e,"width")||a)&&(c=null),(0,n.attr)(e,"height",c)}}},90826:function(e,t,i){"use strict";var o=i(27795),n=i(28077),s=i(65946),r=i(7909),a=i(29434),l=i(5266),c=i(15753),u=i(64831),h=i.n(u);a.Icon.set("image",h()),l.Config.prototype.controls.image={popup(e,t,i){let n=null;return t&&!o.Dom.isText(t)&&o.Dom.isHTMLElement(t)&&(o.Dom.isTag(t,"img")||(0,s.$$)("img",t).length)&&(n=o.Dom.isTag(t,"img")?t:(0,s.$$)("img",t)[0]),e.s.save(),(0,c.FileSelectorWidget)(e,{filebrowser(t){e.s.restore(),t.files&&t.files.forEach(i=>e.s.insertImage(t.baseurl+i,null,e.o.imageDefaultWidth)),i()},upload:!0,async url(t,o){e.s.restore(),/^[a-z\d_-]+(\.[a-z\d_-]+)+/i.test(t)&&(t="//"+t);let s=n||e.createInside.element("img");(0,r.attr)(s,"src",t),(0,r.attr)(s,"alt",o),n||await e.s.insertImage(s,null,e.o.imageDefaultWidth),i()}},n,i)},tags:["img"],tooltip:"Insert Image"},n.pluginSystem.add("image",function(e){e.registerButton({name:"image",group:"media"})})},42360:function(e,t,i){"use strict";var o=i(27795),n=i(80991),s=i(29434),r=i(5266),a=i(67176),l=i.n(a),c=i(14017),u=i.n(c),h=i(11917);s.Icon.set("indent",l()).set("outdent",u()),r.Config.prototype.controls.indent={tooltip:"Increase Indent"},r.Config.prototype.controls.outdent={isDisabled(e){let t=e.s.current();if(!t)return!0;if(e.o.tab?.tabInsideLiInsertNewList){let i=o.Dom.closest(t,"li",e.editor);if(i){let t=o.Dom.closest(i,["ul","ol"],e.editor);if(t&&o.Dom.closest(t,"li",e.editor))return!1}}let i=o.Dom.closest(t,o.Dom.isBlock,e.editor);if(i){let t=(0,h.getKey)(e.o.direction,i),o=(0,n.cssInline)(i,t);return!o||0>=parseInt(o,10)}return!0},tooltip:"Decrease Indent"},r.Config.prototype.indentMargin=10},11917:function(e,t,i){"use strict";var o=i(23211);i.d(t,["getKey",0,(e,t)=>`${o.Dom.isCell(t)?"padding":"margin"}${"rtl"===e?"Right":"Left"}`])},39e3:function(e,t,i){"use strict";var o=i(81937),n=i(27795),s=i(28077),r=i(93640),a=i(80991);i(42360);var l=i(11917);let c=(e,t,i,o)=>{if(!t||e.has(t))return;let n=(0,l.getKey)(i.o.direction,t);e.add(t);let s=(0,a.cssInline)(t,n),c=s?parseInt(s,10):0;c+=i.o.indentMargin*("outdent"===o?-1:1),(0,a.css)(t,n,c>0?c:""),(0,r.attr)(t,"style")||(0,r.attr)(t,"style",null)};s.pluginSystem.add("indent",function(e){e.registerButton({name:"indent",group:"indent"}).registerButton({name:"outdent",group:"indent"});let t=t=>{let i=new Set,{enter:s,enterBlock:a}=e.o,l=s.toLowerCase()===o.BR,u=e.s.current();return l&&e.s.isCollapsed()&&u?c(i,n.Dom.wrapNextInline(u,a,e),e,t):(e.s.eachSelection(o=>{e.s.save();let u=!!o&&n.Dom.up(o,n.Dom.isBlock,e.editor);if(!u&&o&&(u=(0,r.call)(l?n.Dom.wrapNextInline:n.Dom.wrapInline,o,l?a:s.toLowerCase(),e)),!u)return e.s.restore(),!1;c(i,u,e,t),e.s.restore()}),e.synchronizeValues()),!1};e.registerCommand("indent",{exec:t,hotkeys:["ctrl+]","cmd+]"]}),e.registerCommand("outdent",{exec:t,hotkeys:["ctrl+[","cmd+["]})})},93637:function(e,t,i){"use strict";i(94358),i(42766),i(28286),i(63974),i(91678),i(58910),i(11018),i(43354),i(42462),i(30062),i(64222),i(43102),i(3678),i(49764),i(78690),i(50294),i(53390),i(69696),i(50982),i(2952),i(81144),i(90826),i(39978),i(90886),i(39e3),i(88952),i(64094),i(18210),i(50662),i(58354),i(68624),i(76830),i(74240),i(98792),i(23422),i(96730),i(7758),i(28346),i(198),i(49690),i(41134),i(59758),i(14248),i(72214),i(74522),i(30500),i(98988),i(2756),i(44322),i(13810),i(90204),i(86236),i(67582),i(11774),i(14774),i(81582),i(7994),i(30110),i(74192),i(34142),i(22980),i(56894),i(52014),i(31262)},89873:function(e,t,i){"use strict";var o=i(28686),n=i(29434),s=i(5266),r=i(70235),a=i(17849),l=i(466),c=i(75711),u=i(59399),h=i(38681),d=i.n(h),p=i(64637),f=i.n(p),m=i(94190),g=i.n(m),_=i(51957),v=i.n(_),b=i(71940),y=i.n(b),w=i(43218),S=i.n(w),C=i(48007),E=i.n(C);s.Config.prototype.toolbarInline=!0,s.Config.prototype.toolbarInlineForSelection=!1,s.Config.prototype.toolbarInlineDisableFor=[],s.Config.prototype.toolbarInlineDisabledButtons=["source"],n.Icon.set("addcolumn",d()).set("addrow",f()).set("merge",g()).set("th",S()).set("splitg",v()).set("splitv",y()).set("th-list",E()),a.default.forEach(e=>{(0,o.isString)(e)||!e.name||s.Config.prototype.controls[e.name]||(s.Config.prototype.controls[e.name]=e)}),s.Config.prototype.popup={a:r.default,img:c.default,cells:a.default,toolbar:u.default,jodit:l.default,iframe:l.default,"jodit-media":l.default,selection:["bold","underline","italic","ul","ol",`
215
+ </div>`}onStateAlignChange(){this.getElm("align").value=this.state.values.align}onChangeAlign(){let e=this.getElm("align");this.state.values.align=e.value}onStateValuesBorderRadiusChange(){this.getElm("borderRadius").value=this.state.values.borderRadius.toString()}onChangeBorderRadius(){let e=this.getElm("borderRadius");this.state.values.borderRadius=parseFloat(e.value)}onStateValuesIdChange(){this.getElm("id").value=this.state.values.id}onChangeId(){let e=this.getElm("id");this.state.values.id=e.value}onStateValuesStyleChange(){this.getElm("style").value=this.state.values.style}onChangeStyle(){let e=this.getElm("style");this.state.values.style=e.value}onStateValuesClassesChange(){this.getElm("classes").value=this.state.values.classes}onChangClasses(){let e=this.getElm("classes");this.state.values.classes=e.value}onLockMarginClick(e){this.state.marginIsLocked=!this.state.marginIsLocked,e.preventDefault()}onChangeMarginIsLocked(){let e=this.getElm("marginBottom"),t=this.getElm("marginRight"),i=this.getElm("marginLeft"),o=this.getElm("lockMargin");if([t,e,i].forEach(e=>{(0,u.attr)(e,"disabled",this.state.marginIsLocked||null)}),o.innerHTML=d.Icon.get(this.state.marginIsLocked?"lock":"unlock"),this.state.marginIsLocked){let e=this.state.values.marginTop;this.state.values.marginRight=e,this.state.values.marginBottom=e,this.state.values.marginLeft=e}}onStateValuesMarginChange(){let e=this.getElm("marginTop"),t=this.getElm("marginRight"),i=this.getElm("marginBottom"),o=this.getElm("marginLeft");e.value=this.state.values.marginTop.toString(),t.value=this.state.values.marginRight.toString(),i.value=this.state.values.marginBottom.toString(),o.value=this.state.values.marginLeft.toString()}onChangeMargin(){let e=this.getElm("marginTop"),t=this.getElm("marginRight"),i=this.getElm("marginBottom"),o=this.getElm("marginLeft");this.state.values.marginTop=(0,f.normalSizeFromString)(e.value),this.state.marginIsLocked?(this.state.values.marginRight=this.state.values.marginTop,this.state.values.marginBottom=this.state.values.marginTop,this.state.values.marginLeft=this.state.values.marginTop):(this.state.values.marginRight=(0,f.normalSizeFromString)(t.value),this.state.values.marginBottom=(0,f.normalSizeFromString)(i.value),this.state.values.marginLeft=(0,f.normalSizeFromString)(o.value))}hideFieldByOptions(){let e=this.j.o.image;[["editMargins","editMargins"],["editAlign","editAlign"],["editStyle","editStyle"],["editClass","editClass"],["editId","editId"],["editBorderRadius","editBorderRadius"]].forEach(([t,i])=>{let o=this.getElm(i);(0,l.css)(o,"display",e[t]?null:"none")})}constructor(e,t,i){super(e,{availableClasses:e.o.image.availableClasses}),(0,o._)(this,"state",void 0),(0,o._)(this,"handlers",void 0),this.state=t,this.handlers=i}}(0,n.__decorate)([(0,r.hook)("ready"),(0,a.watch)("state.values.align")],p.prototype,"onStateAlignChange",null),(0,n.__decorate)([(0,a.watch)("align:change")],p.prototype,"onChangeAlign",null),(0,n.__decorate)([(0,r.hook)("ready"),(0,a.watch)("state.values.borderRadius")],p.prototype,"onStateValuesBorderRadiusChange",null),(0,n.__decorate)([(0,a.watch)("borderRadius:change")],p.prototype,"onChangeBorderRadius",null),(0,n.__decorate)([(0,r.hook)("ready"),(0,a.watch)("state.values.id")],p.prototype,"onStateValuesIdChange",null),(0,n.__decorate)([(0,a.watch)("id:change")],p.prototype,"onChangeId",null),(0,n.__decorate)([(0,r.hook)("ready"),(0,a.watch)("state.values.style")],p.prototype,"onStateValuesStyleChange",null),(0,n.__decorate)([(0,a.watch)("style:change")],p.prototype,"onChangeStyle",null),(0,n.__decorate)([(0,r.hook)("ready"),(0,a.watch)("state.values.classes")],p.prototype,"onStateValuesClassesChange",null),(0,n.__decorate)([(0,a.watch)("classes:change")],p.prototype,"onChangClasses",null),(0,n.__decorate)([(0,a.watch)("lockMargin:click")],p.prototype,"onLockMarginClick",null),(0,n.__decorate)([(0,r.hook)("ready"),(0,a.watch)("state.marginIsLocked")],p.prototype,"onChangeMarginIsLocked",null),(0,n.__decorate)([(0,r.hook)("ready"),(0,a.watch)(["state.values.marginTop","state.values.marginRight","state.values.marginBottom","state.values.marginLeft"])],p.prototype,"onStateValuesMarginChange",null),(0,n.__decorate)([(0,a.watch)(["marginTop:change","marginRight:change","marginBottom:change","marginLeft:change"])],p.prototype,"onChangeMargin",null),(0,n.__decorate)([(0,r.hook)("ready")],p.prototype,"hideFieldByOptions",null),p=(0,n.__decorate)([s.component],p)},28771:function(e,t,i){"use strict";i.d(t,{openImageEditorDialog:function(){return r}});var o=i(85932),n=i(7909),s=i(43271);function r(e,t){let i=(0,n.attr)(t.image,"src")||"",r=e.c.element("a"),a=()=>{if(r.host!==location.host)return void e.confirm("You can only edit your own images. Download this image on the host?",i=>{i&&e.uploader&&e.uploader.uploadRemoteImage(r.href.toString(),i=>{e.alert("The image has been successfully uploaded to the host!",()=>{(0,o.isString)(i.newfilename)&&(t.values.imageSrc=i.baseurl+i.newfilename)})},t=>{e.alert(e.i18n("There was an error loading %s",t.message))})})};r.href=i,e.filebrowser.dataProvider.getPathByUrl(r.href.toString()).then(o=>{s.openImageEditor.call(e.filebrowser,r.href,o.name,o.path,o.source,e=>{let o=new Date().getTime(),n=e||i;t.values.imageSrc=n+(-1!==n.indexOf("?")?"":"?")+"&_tmp="+o.toString()},t=>{e.alert(t.message)})}).catch(t=>{e.alert(t.message,a)})}},670:function(e,t,i){"use strict";i.d(t,{openImagePopup:function(){return a}});var o=i(17312),n=i(23599),s=i(51116),r=i(18762);function a(e,t,i,a){let l=new s.Popup(t),c=()=>{l.close(),l.destruct()};l.setContent((0,r.FileSelectorWidget)(e,{upload(e){e.files&&e.files.length&&(i.values.imageSrc=e.baseurl+e.files[0]),c()},async filebrowser(e){e&&(0,o.isArray)(e.files)&&e.files.length&&(i.values.imageSrc=e.files[0],c())}},i.image,c)).open(()=>(0,n.position)(a))}},10808:function(e,t,i){"use strict";var o=i(72412),n=i(4040);i.d(t,["normalSizeFromString",0,e=>/^[-+]?[0-9.]+(px)?$/.test(e.toString())?parseFloat(e.toString()):e,"normalSizeToString",0,e=>(0,o.isNumber)(e)?e?e+"px":e.toString():(e=(0,n.trim)(e),/^[0-9]+$/.test(e)?e+"px":e)])},71552:function(e,t,i){"use strict";i.d(t,{applyValuesToImage:function(){return c}});var o=i(23211),n=i(93640),s=i(80991),r=i(49422),a=i(21132),l=i(49147);function c(e,t,i){let{style:c,imageSrc:u,borderRadius:h,imageTitle:d,imageAlt:f,imageLink:p,imageWidth:m,imageHeight:g,marginTop:_,marginRight:v,marginBottom:b,marginLeft:y,imageLinkOpenInNewTab:w,align:S,classes:C,id:E}=t.values,D=e.o;(D.image.editStyle&&(0,n.attr)(i,"style",c||null),u)?((0,n.attr)(i,"src",u),(0,s.css)(i,"borderRadius",h?h+"px":""),(0,n.attr)(i,"title",d||null),(0,n.attr)(i,"alt",f||null),(0,r.applyLink)(e,i,p,w),(0,l.applySize)(i,m,g,t.sizeIsLocked),e.o.image.editMargins&&(0,a.applyMargin)(e,_,v,b,y,i,t.marginIsLocked),D.image.editClass&&(0,n.attr)(i,"class",C||null),D.image.editId&&(0,n.attr)(i,"id",E||null),D.image.editAlign&&(0,n.hAlignElement)(i,S,e.o.imageAlignClasses)):o.Dom.safeRemove(i)}},49422:function(e,t,i){"use strict";i.d(t,{applyLink:function(){return s}});var o=i(23211),n=i(7909);function s(e,t,i,s){let r=o.Dom.closest(t,"a",e.editor);if(i){if(r||(r=o.Dom.wrap(t,"a",e.createInside)),(0,n.attr)(r,"href",i),(0,n.attr)(r,"target",s?"_blank":null),!s){let e=((0,n.attr)(r,"rel")||"").split(/\s+/).filter(e=>e&&"noopener"!==e&&"noreferrer"!==e);(0,n.attr)(r,"rel",e.length?e.join(" "):null)}}else r&&r.parentNode&&o.Dom.replace(r,t,void 0,!1,!0)}},21132:function(e,t,i){"use strict";i.d(t,{applyMargin:function(){return s}});var o=i(80991),n=i(10808);function s(e,t,i,s,r,a,l){let c=[t,i,s,r],u=(e,t)=>{let i=(0,n.normalSizeToString)((0,o.cssInline)(a,e)||0),s=(0,n.normalSizeToString)(t);i!==s&&(0,o.css)(a,e,s)};if(l)u("margin",t);else{let e=["margin-top","margin-right","margin-bottom","margin-left"];c.forEach((t,i)=>{u(e[i],t)})}}},49147:function(e,t,i){"use strict";i.d(t,{applySize:function(){return a}});var o=i(70222),n=i(7909),s=i(80991),r=i(10808);function a(e,t,i,a){if(t!==e.offsetWidth||i!==e.offsetHeight){let l=t?(0,r.normalSizeToString)(t):null,c=i?(0,r.normalSizeToString)(i):null;(0,s.css)(e,{width:l,height:l&&a?null:c}),(0,n.attr)(e,"width",l&&(0,o.isNumeric)(t)&&(0,n.attr)(e,"width")?l:null),(!(0,n.attr)(e,"width")||a)&&(c=null),(0,n.attr)(e,"height",c)}}},90826:function(e,t,i){"use strict";var o=i(27795),n=i(28077),s=i(65946),r=i(7909),a=i(29434),l=i(5266),c=i(15753),u=i(64831),h=i.n(u);a.Icon.set("image",h()),l.Config.prototype.controls.image={popup(e,t,i){let n=null;return t&&!o.Dom.isText(t)&&o.Dom.isHTMLElement(t)&&(o.Dom.isTag(t,"img")||(0,s.$$)("img",t).length)&&(n=o.Dom.isTag(t,"img")?t:(0,s.$$)("img",t)[0]),e.s.save(),(0,c.FileSelectorWidget)(e,{filebrowser(t){e.s.restore(),t.files&&t.files.forEach(i=>e.s.insertImage(t.baseurl+i,null,e.o.imageDefaultWidth)),i()},upload:!0,async url(t,o){e.s.restore(),/^[a-z\d_-]+(\.[a-z\d_-]+)+/i.test(t)&&(t="//"+t);let s=n||e.createInside.element("img");(0,r.attr)(s,"src",t),(0,r.attr)(s,"alt",o),n||await e.s.insertImage(s,null,e.o.imageDefaultWidth),i()}},n,i)},tags:["img"],tooltip:"Insert Image"},n.pluginSystem.add("image",function(e){e.registerButton({name:"image",group:"media"})})},42360:function(e,t,i){"use strict";var o=i(27795),n=i(80991),s=i(29434),r=i(5266),a=i(67176),l=i.n(a),c=i(14017),u=i.n(c),h=i(11917);s.Icon.set("indent",l()).set("outdent",u()),r.Config.prototype.controls.indent={tooltip:"Increase Indent"},r.Config.prototype.controls.outdent={isDisabled(e){let t=e.s.current();if(!t)return!0;if(e.o.tab?.tabInsideLiInsertNewList){let i=o.Dom.closest(t,"li",e.editor);if(i){let t=o.Dom.closest(i,["ul","ol"],e.editor);if(t&&o.Dom.closest(t,"li",e.editor))return!1}}let i=o.Dom.closest(t,o.Dom.isBlock,e.editor);if(i){let t=(0,h.getKey)(e.o.direction,i),o=(0,n.cssInline)(i,t);return!o||0>=parseInt(o,10)}return!0},tooltip:"Decrease Indent"},r.Config.prototype.indentMargin=10},11917:function(e,t,i){"use strict";var o=i(23211);i.d(t,["getKey",0,(e,t)=>`${o.Dom.isCell(t)?"padding":"margin"}${"rtl"===e?"Right":"Left"}`])},39e3:function(e,t,i){"use strict";var o=i(81937),n=i(27795),s=i(28077),r=i(93640),a=i(80991);i(42360);var l=i(11917);let c=(e,t,i,o)=>{if(!t||e.has(t))return;let n=(0,l.getKey)(i.o.direction,t);e.add(t);let s=(0,a.cssInline)(t,n),c=s?parseInt(s,10):0;c+=i.o.indentMargin*("outdent"===o?-1:1),(0,a.css)(t,n,c>0?c:""),(0,r.attr)(t,"style")||(0,r.attr)(t,"style",null)};s.pluginSystem.add("indent",function(e){e.registerButton({name:"indent",group:"indent"}).registerButton({name:"outdent",group:"indent"});let t=t=>{let i=new Set,{enter:s,enterBlock:a}=e.o,l=s.toLowerCase()===o.BR,u=e.s.current();return l&&e.s.isCollapsed()&&u?c(i,n.Dom.wrapNextInline(u,a,e),e,t):(e.s.eachSelection(o=>{e.s.save();let u=!!o&&n.Dom.up(o,n.Dom.isBlock,e.editor);if(!u&&o&&(u=(0,r.call)(l?n.Dom.wrapNextInline:n.Dom.wrapInline,o,l?a:s.toLowerCase(),e)),!u)return e.s.restore(),!1;c(i,u,e,t),e.s.restore()}),e.synchronizeValues()),!1};e.registerCommand("indent",{exec:t,hotkeys:["ctrl+]","cmd+]"]}),e.registerCommand("outdent",{exec:t,hotkeys:["ctrl+[","cmd+["]})})},93637:function(e,t,i){"use strict";i(94358),i(42766),i(28286),i(63974),i(91678),i(58910),i(11018),i(43354),i(42462),i(30062),i(64222),i(43102),i(3678),i(49764),i(78690),i(50294),i(53390),i(69696),i(50982),i(2952),i(81144),i(90826),i(39978),i(90886),i(39e3),i(88952),i(64094),i(18210),i(50662),i(58354),i(68624),i(76830),i(74240),i(98792),i(23422),i(96730),i(7758),i(28346),i(198),i(49690),i(41134),i(59758),i(14248),i(72214),i(74522),i(30500),i(98988),i(2756),i(44322),i(13810),i(90204),i(86236),i(67582),i(11774),i(14774),i(81582),i(7994),i(30110),i(74192),i(34142),i(22980),i(56894),i(52014),i(31262)},89873:function(e,t,i){"use strict";var o=i(28686),n=i(29434),s=i(5266),r=i(70235),a=i(17849),l=i(466),c=i(75711),u=i(59399),h=i(38681),d=i.n(h),f=i(64637),p=i.n(f),m=i(94190),g=i.n(m),_=i(51957),v=i.n(_),b=i(71940),y=i.n(b),w=i(43218),S=i.n(w),C=i(48007),E=i.n(C);s.Config.prototype.toolbarInline=!0,s.Config.prototype.toolbarInlineForSelection=!1,s.Config.prototype.toolbarInlineDisableFor=[],s.Config.prototype.toolbarInlineDisabledButtons=["source"],n.Icon.set("addcolumn",d()).set("addrow",p()).set("merge",g()).set("th",S()).set("splitg",v()).set("splitv",y()).set("th-list",E()),a.default.forEach(e=>{(0,o.isString)(e)||!e.name||s.Config.prototype.controls[e.name]||(s.Config.prototype.controls[e.name]=e)}),s.Config.prototype.popup={a:r.default,img:c.default,cells:a.default,toolbar:u.default,jodit:l.default,iframe:l.default,"jodit-media":l.default,selection:["bold","underline","italic","ul","ol",`
216
216
  `,"outdent","indent","fontsize","brush","cut",`
217
217
  `,"paragraph","link","align","dots"]}},70235:function(e,t,i){"use strict";var o=i(7909);t.default=[{name:"eye",tooltip:"Open link",exec(e,t){let i=(0,o.attr)(t,"href");t&&i&&/^(https?:|mailto:|tel:)/i.test(i.trim())&&!/^(javascript:|data:|vbscript:)/i.test(i.trim())&&e.ow.open(i)}},{name:"link",tooltip:"Edit link",icon:"pencil"},"unlink","brush","file"]},17849:function(e,t,i){"use strict";var o=i(28686),n=i(80991);let s=e=>e.args&&(0,o.isString)(e.args[0])?e.args[0].toLowerCase():"";t.default=["brushCell",{name:"valign",list:["Top","Middle","Bottom","Normal"],childTemplate:(e,t,i)=>i,exec(e,t,{control:i}){let o=s(i);e.getInstance("Table",e.o).getAllSelectedCells().forEach(e=>{(0,n.css)(e,"vertical-align","normal"===o?"":o)})},tooltip:"Vertical align"},{name:"splitv",list:{tablesplitv:"Split vertical",tablesplitg:"Split horizontal"},tooltip:"Split"},{name:"align",icon:"left"},`
218
218
  `,{name:"merge",command:"tablemerge",tooltip:"Merge"},{name:"addcolumn",list:{tableaddcolumnbefore:"Insert column before",tableaddcolumnafter:"Insert column after"},exec(e,t,{control:i}){if(!(0,o.isJoditObject)(e))return;if(!i.args)return!1;let n=s(i);e.execCommand(n,!1,t)},tooltip:"Add column"},{name:"addrow",list:{tableaddrowbefore:"Insert row above",tableaddrowafter:"Insert row below"},exec(e,t,{control:i}){if(!(0,o.isJoditObject)(e))return;if(!i.args)return!1;let n=s(i);e.execCommand(n,!1,t)},tooltip:"Add row"},{name:"deleteTable",icon:"bin",list:{tablebin:"Delete table",tablebinrow:"Delete row",tablebincolumn:"Delete column",tableempty:"Empty cell"},exec(e,t,{control:i}){if(!(0,o.isJoditObject)(e))return;if(!i.args)return!1;let n=s(i);e.execCommand(n,!1,t),e.e.fire("hidePopup")},tooltip:"Delete"}]},466:function(e,t,i){"use strict";var o=i(75711);t.default=[{name:"bin",tooltip:"Delete",exec(e,t){t&&e.s.removeNode(t)}},o.align]},75711:function(e,t,i){"use strict";var o=i(27795),n=i(85932),s=i(16849),r=i(80991);let a=(e,t)=>o.Dom.isTag(t,"img")?e.o.imageAlignClasses:null,l=(e,t)=>t?(0,s.getHAlign)(t,a(e,t)):"normal",c={name:"left",childTemplate:(e,t,i)=>i,list:["Left","Right","Center","Normal"],update(e,t){let i=l(e,t.target);t.state.icon.name="normal"===i?((e,t)=>{let i=t&&o.Dom.closest(t,o.Dom.isBlock,e.editor)||e.editor,n="rtl"===(0,r.css)(i,"direction");switch((0,r.css)(i,"text-align")){case"center":case"-webkit-center":return"center";case"justify":return"justify";case"right":return"right";case"end":return n?"left":"right";case"start":return n?"right":"left";default:return"left"}})(e,t.target):i},isActive:(e,t)=>"normal"!==l(e,t.target),isChildActive(e,t){let[i]=t.control.args??[];return(0,n.isString)(i)&&l(e,t.target)===i.toLowerCase()},exec(e,t,{control:i}){if(!o.Dom.isTag(t,new Set(["img","jodit","jodit-media"])))return;let r=i.args&&(0,n.isString)(i.args[0])?i.args[0].toLowerCase():"";if(!r)return!1;(0,s.hAlignElement)(t,r,a(e,t)),o.Dom.isTag(t,new Set(["jodit","jodit-media"]))&&t.firstElementChild&&(0,s.hAlignElement)(t.firstElementChild,r),e.synchronizeValues(),e.e.fire("recalcPositionPopup")},tooltip:"Horizontal align"};t.default=[{name:"delete",icon:"bin",tooltip:"Delete",exec(e,t){t&&e.s.removeNode(t)}},{name:"pencil",exec(e,t){"img"===t.tagName.toLowerCase()&&e.e.fire("openImageProperties",t)},tooltip:"Edit"},{name:"valign",list:["Top","Middle","Bottom","Normal"],tooltip:"Vertical align",isDisabled(e,t){let i=t.target;return!!(i&&(["left","right"].includes((0,r.css)(i,"float"))||"block"===(0,r.css)(i,"display")))},exec(e,t,{control:i}){if(!o.Dom.isTag(t,"img"))return;let s=i.args&&(0,n.isString)(i.args[0])?i.args[0].toLowerCase():"";if(!s)return!1;(0,r.css)(t,"vertical-align","normal"===s?"":s),e.e.fire("recalcPositionPopup")}},c],i.d(t,["align",0,c])},59399:function(e,t){"use strict";t.default=["bold","italic","|","ul","ol","eraser","|","fontsize","brush","paragraph","---","image","table",`
219
- `,"link","|","align","|","undo","redo","|","copyformat","fullsize","---","dots"]},88952:function(e,t,i){"use strict";var o=i(25045),n=i(31635),s=i(84839),r=i(27795),a=i(28077),l=i(65946),c=i(91206),u=i(4099),h=i(56490),d=i(4274);i(89873);class p extends c.Plugin{get popup(){return new h.Popup(this.jodit,!1)}get toolbar(){return(0,d.makeCollection)(this.jodit,this.popup)}onClick(e){let t=this.elmsList,i=r.Dom.isTag(e,"img")?e:r.Dom.closest(e,t,this.j.editor);if(i&&this.canShowPopupForType(i.nodeName.toLowerCase()))return this.showPopup(()=>(0,l.position)(i,this.j),i.nodeName.toLowerCase(),i),!1}showPopup(e,t,i){if(t=t.toLowerCase(),!this.canShowPopupForType(t))return!1;if(this.type!==t||i!==this.previousTarget){let e;this.previousTarget=i;let o=this.j.o.popup[t];if(e=(0,l.isFunction)(o)?o(this.j,i,this.popup.close):o,(0,l.isArray)(e)){let t=this.j.o.toolbarInlineDisabledButtons;this.toolbar.build(t.length?e.filter(e=>{let i=(0,l.isString)(e)?e:e.name;return!t.includes(i??"")}):e,i),this.toolbar.buttonSize=this.j.o.toolbarButtonSize,e=this.toolbar.container}this.popup.setContent(e),this.type=t}return this.popup.open(e),!0}hidePopup(e){this.popup.isOpened&&(!(0,l.isString)(e)||e===this.type)&&this.popup.close()}onOutsideClick(){this.popup.close()}canShowPopupForType(e){let t=this.j.o.popup[e.toLowerCase()];return!this.j.o.readonly&&!!this.j.o.toolbarInline&&!!t&&!this.isExcludedTarget(e)}isExcludedTarget(e){return(0,l.splitArray)(this.j.o.toolbarInlineDisableFor).map(e=>e.toLowerCase()).includes(e.toLowerCase())}afterInit(e){this.j.e.on("getDiffButtons.mobile",t=>{if(this.toolbar===t){let t=this.toolbar.getButtonsNames();return(0,l.toArray)(e.registeredButtons).filter(e=>!this.j.o.toolbarInlineDisabledButtons.includes(e.name)).filter(e=>{let i=(0,l.isString)(e)?e:e.name;return i&&"|"!==i&&`
220
- `!==i&&!t.includes(i)})}}).on("hidePopup",this.hidePopup).on("showInlineToolbar",this.showInlineToolbar).on("showPopup",(e,t,i)=>{this.showPopup(t,i||((0,l.isString)(e)?e:e.nodeName),(0,l.isString)(e)?void 0:e)}).on("mousedown keydown",this.onSelectionStart).on("change",()=>{this.popup.isOpened&&this.previousTarget&&!this.previousTarget.parentNode&&(this.hidePopup(),this.previousTarget=void 0)}).on([this.j.ew,this.j.ow],"mouseup keyup",this.onSelectionEnd).on([this.j.ew,this.j.ow],"mousedown touchstart",this.__onDocumentMouseDown).on("closeAllPopups",this.__onCloseAllPopups),this.addListenersForElements()}__onDocumentMouseDown(e){this.popup.isOpened&&"selection"===this.type&&e.target&&u.UIElement.closestElement(e.target,h.Popup)&&(this.__reopenSelectionPopup=!0)}__onCloseAllPopups(){!this.__reopenSelectionPopup||(this.__reopenSelectionPopup=!1,this.j.o.toolbarInlineForSelection&&this.j.async.setTimeout(()=>{let e=this.j.s.sel;e&&!e.isCollapsed&&this.showPopup(()=>this.__selectionBound(),"selection")},1))}__selectionBound(){let e=this.j.s.range.getBoundingClientRect(),{left:t,top:i}=e;if(this.j.iframe){let e=(0,l.position)(this.j.iframe,this.j,!0);t+=e.left,i+=e.top}return{left:t,top:i,width:e.width,height:e.height}}onSelectionStart(){this.snapRange=this.j.s.range.cloneRange()}onSelectionEnd(e){if(e&&e.target&&u.UIElement.closestElement(e.target,h.Popup))return;let{snapRange:t}=this,{range:i}=this.j.s;(!t||i.collapsed||i.startContainer!==t.startContainer||i.startOffset!==t.startOffset||i.endContainer!==t.endContainer||i.endOffset!==t.endOffset)&&this.onSelectionChange()}onSelectionChange(){if(!this.j.o.toolbarInlineForSelection)return;let e="selection",t=this.j.s.sel,i=this.j.s.range;if(t?.isCollapsed||this.isSelectedTarget(i)){this.type===e&&this.popup.isOpened&&this.hidePopup();return}this.j.s.current()&&this.showPopup(()=>this.__selectionBound(),e)}isSelectedTarget(e){let t=e.startContainer;return r.Dom.isElement(t)&&t===e.endContainer&&r.Dom.isTag(t.childNodes[e.startOffset],new Set((0,l.keys)(this.j.o.popup,!1)))&&e.startOffset===e.endOffset-1}beforeDestruct(e){e.e.off("showPopup").off([this.j.ew,this.j.ow],"mouseup keyup",this.onSelectionEnd).off([this.j.ew,this.j.ow],"mousedown touchstart",this.__onDocumentMouseDown).off("closeAllPopups",this.__onCloseAllPopups),this.removeListenersForElements()}_eventsList(){let e=this.elmsList;return e.map(e=>(0,l.camelCase)("click_"+e)).concat(e.map(e=>(0,l.camelCase)("touchstart_"+e))).join(" ")}addListenersForElements(){this.j.e.on(this._eventsList(),this.onClick)}removeListenersForElements(){this.j.e.off(this._eventsList(),this.onClick)}showInlineToolbar(e){this.showPopup(()=>{if(e)return e;let{range:t}=this.j.s;return t.getBoundingClientRect()},"toolbar")}constructor(...e){super(...e),(0,o._)(this,"type",null),(0,o._)(this,"previousTarget",void 0),(0,o._)(this,"__reopenSelectionPopup",!1),(0,o._)(this,"snapRange",null),(0,o._)(this,"elmsList",(0,l.keys)(this.j.o.popup,!1).filter(e=>!this.isExcludedTarget(e)))}}(0,o._)(p,"requires",["select"]),(0,n.__decorate)([s.cache],p.prototype,"popup",null),(0,n.__decorate)([s.cache],p.prototype,"toolbar",null),(0,n.__decorate)([s.autobind],p.prototype,"onClick",null),(0,n.__decorate)([(0,s.wait)(e=>!e.j.isLocked)],p.prototype,"showPopup",null),(0,n.__decorate)([(0,s.watch)([":clickEditor",":beforeCommandDelete",":backSpaceAfterDelete"]),s.autobind],p.prototype,"hidePopup",null),(0,n.__decorate)([(0,s.watch)(":outsideClick")],p.prototype,"onOutsideClick",null),(0,n.__decorate)([s.autobind],p.prototype,"__onDocumentMouseDown",null),(0,n.__decorate)([s.autobind],p.prototype,"__onCloseAllPopups",null),(0,n.__decorate)([s.autobind],p.prototype,"onSelectionStart",null),(0,n.__decorate)([s.autobind],p.prototype,"onSelectionEnd",null),(0,n.__decorate)([(0,s.debounce)(e=>e.defaultTimeout)],p.prototype,"onSelectionChange",null),(0,n.__decorate)([s.autobind],p.prototype,"showInlineToolbar",null),a.pluginSystem.add("inlinePopup",p)},64094:function(e,t,i){"use strict";var o=i(23211),n=i(28077),s=i(65946),r=i(16849),a=i(80991),l=i(29434),c=i(5266),u=i(80515),h=i.n(u);l.Icon.set("justify",h()),c.Config.prototype.controls.align={name:"left",tooltip:"Align",update(e,t){let i=t.control,n=e.s.current();if(n){let r=o.Dom.closest(n,o.Dom.isBlock,e.editor)||e.editor,l=(0,a.css)(r,"text-align").toString();i.defaultValue&&-1!==i.defaultValue.indexOf(l)&&(l="left");let{list:c,data:u}=i;u&&u.currentValue!==l&&c&&((0,s.isPlainObject)(c)?c[l]:c.includes(l))&&(e.o.textIcons||"select"===i.component?t.state.text=l:t.state.icon.name=l,u.currentValue=l)}},isActive(e,t){let i=e.s.current();if(!i||!t.control.defaultValue)return!1;let n=o.Dom.closest(i,o.Dom.isBlock,e.editor)||e.editor;return -1===t.control.defaultValue.indexOf((0,a.css)(n,"text-align").toString())},defaultValue:["left","start","inherit"],data:{currentValue:"left"},list:["center","left","right","justify"]},c.Config.prototype.controls.center={command:"justifyCenter",css:{"text-align":"center"},tooltip:"Align Center"},c.Config.prototype.controls.justify={command:"justifyFull",css:{"text-align":"justify"},tooltip:"Align Justify"},c.Config.prototype.controls.left={command:"justifyLeft",css:{"text-align":"left"},tooltip:"Align Left"},c.Config.prototype.controls.right={command:"justifyRight",css:{"text-align":"right"},tooltip:"Align Right"},n.pluginSystem.add("justify",function(e){e.registerButton({name:"align",group:"indent"});let t=t=>(e.s.focus(),e.s.eachSelection(i=>{if(!i)return;let n=o.Dom.up(i,o.Dom.isBlock,e.editor);n||(n=o.Dom.wrapInline(i,e.o.enterBlock,e)),(0,r.alignElement)(t,n)}),!1);e.registerCommand("justifyfull",t),e.registerCommand("justifyright",t),e.registerCommand("justifyleft",t),e.registerCommand("justifycenter",t)})},18210:function(e,t,i){"use strict";var o=i(31635),n=i(81937),s=i(84839),r=i(23211),a=i(28077),l=i(91206);class c extends l.Plugin{afterInit(e){}beforeDestruct(e){}onKeyDownArrow(e){if(e.key!==n.KEY_RIGHT||!this.j.selection.isCollapsed())return;let{endContainer:t,endOffset:i}=this.j.selection.range;if(r.Dom.isText(t)&&t.nodeValue?.length===i){let{parentNode:e}=t;r.Dom.isInlineBlock(e)&&!r.Dom.findNotEmptyNeighbor(e,!1,this.j.editor)&&r.Dom.after(e,this.j.createInside.text(n.NBSP_SPACE))}}}(0,o.__decorate)([(0,s.watch)(":keydown")],c.prototype,"onKeyDownArrow",null),a.pluginSystem.add("keyArrowOutside",c)},82147:function(e,t,i){"use strict";var o=i(5266);o.Config.prototype.limitWords=!1,o.Config.prototype.limitChars=!1,o.Config.prototype.limitHTML=!1},50662:function(e,t,i){"use strict";var o=i(31635),n=i(81937),s=i(84839),r=i(28077),a=i(91206);i(82147);class l extends a.Plugin{afterInit(e){let{limitWords:t,limitChars:i}=e.o;if(e&&(t||i)){let t=null;e.e.off(".limit").on("beforePaste.limit",()=>{t=e.history.snapshot.make()}).on("keydown.limit keyup.limit beforeEnter.limit",this.checkPreventKeyPressOrPaste).on("change.limit",this.checkPreventChanging).on("afterPaste.limit",()=>{if(this.__shouldDenyInput(!0)&&t)return e.history.snapshot.restore(t),e.e.fire("denyPaste.limit"),!1})}}shouldPreventInsertHTML(e){return!(e&&(n.COMMAND_KEYS.includes(e.key)||e.ctrlKey||e.metaKey))&&this.__shouldDenyInput(!1)}__shouldDenyInput(e){var t;let{jodit:i}=this,{limitWords:o,limitChars:s}=i.o,r=i.o.limitHTML?i.value:i.text,a=this.__splitWords(r);if(o&&(t=a.length,e?t>o:t>=o))return i.e.fire("denyWords.limit limit.limit"),!0;let l=i.o.countTextSpaces?r.replace((0,n.INVISIBLE_SPACE_REG_EXP)(),"").replace(/[\r\n]/g,"").length:a.join("").length,c=!!(s&&(e?l>s:l>=s));return c&&i.e.fire("denyChars.limit limit.limit"),c}checkPreventKeyPressOrPaste(e){if(this.shouldPreventInsertHTML(e))return!1}checkPreventChanging(e,t){let{jodit:i}=this;this.__shouldDenyInput(!0)&&(i.value=t)}__splitWords(e){return e.replace((0,n.INVISIBLE_SPACE_REG_EXP)(),"").split((0,n.SPACE_REG_EXP)()).filter(e=>e.length)}beforeDestruct(e){e.e.off(".limit")}}(0,o.__decorate)([s.autobind],l.prototype,"checkPreventKeyPressOrPaste",null),(0,o.__decorate)([s.autobind],l.prototype,"checkPreventChanging",null),r.pluginSystem.add("limit",l)},87908:function(e,t,i){"use strict";var o=i(65946),n=i(29434),s=i(5266),r=i(223),a=i.n(r);s.Config.prototype.defaultLineHeight=null,n.Icon.set("line-height",a()),s.Config.prototype.controls.lineHeight={command:"applyLineHeight",tags:["ol"],tooltip:"Line height",list:[1,1.1,1.2,1.3,1.4,1.5,2],exec:(e,t,{control:i})=>(0,o.memorizeExec)(e,t,{control:i},e=>e)}},5070:function(e,t,i){"use strict";i.r(t),i.d(t,{ar:function(){return o},cs_cz:function(){return o},de:function(){return o},es:function(){return o},fa:function(){return o},fi:function(){return o},fr:function(){return o},he:function(){return o},hu:function(){return o},id:function(){return o},it:function(){return o},ja:function(){return o},ko:function(){return o},mn:function(){return o},nl:function(){return o},pl:function(){return o},pt_br:function(){return o},ru:function(){return o},sk:function(){return o},tr:function(){return o},ua:function(){return o},zh_cn:function(){return o},zh_tw:function(){return o}});var o=i(41324)},58354:function(e,t,i){"use strict";var o=i(25045),n=i(31635),s=i(84839),r=i(23211),a=i(28077),l=i(65946),c=i(91206);i(87908);var u=i(5070);class h extends c.Plugin{afterInit(e){(0,l.css)(e.editor,{lineHeight:e.o.defaultLineHeight}),e.registerCommand("applyLineHeight",this.applyLineHeight)}applyLineHeight(e,t,i){let o,{s:n,createInside:s,editor:a,o:c}=this.j;n.isFocused()||n.focus(),n.save();let u=e=>{let t=r.Dom.closest(e,r.Dom.isBlock,a);t||(t=r.Dom.wrap(e,c.enter,s));let n=(0,l.css)(t,"lineHeight");void 0===o&&(o=n.toString()!==i.toString()),(0,l.css)(t,"lineHeight",o?i:null)};try{if(n.isCollapsed()){let e=s.fake();n.insertNode(e,!1,!1),u(e),r.Dom.safeRemove(e)}else n.eachSelection(u)}finally{n.restore()}}beforeDestruct(e){(0,l.css)(e.editor,{lineHeight:null})}constructor(e){super(e),(0,o._)(this,"buttons",[{name:"lineHeight",group:"font"}]),(0,a.extendLang)(u)}}(0,n.__decorate)([s.autobind],h.prototype,"applyLineHeight",null),a.pluginSystem.add("lineHeight",h)},65230:function(e,t,i){"use strict";var o=i(23211),n=i(29434),s=i(5266),r=i(95032),a=i.n(r),l=i(73533),c=i.n(l),u=i(45778);s.Config.prototype.link={formTemplate:u.formTemplate,followOnDblClick:!1,processVideoLink:!0,processPastedLink:!0,deriveUrlFromText:!1,noFollowCheckbox:!0,openInNewTabCheckbox:!0,openInNewTabCheckboxDefaultChecked:!1,ariaLabelInput:!1,modeClassName:"input",selectMultipleClassName:!0,preventReadOnlyNavigation:!0,selectSizeClassName:3,selectOptionsClassName:[],hotkeys:["ctrl+k","cmd+k"]},n.Icon.set("link",a()).set("unlink",c()),s.Config.prototype.controls.unlink={exec(e,t){let i=o.Dom.closest(t,"a",e.editor);i&&o.Dom.unwrap(i),e.synchronizeValues(),e.e.fire("hidePopup")},tooltip:"Unlink"},s.Config.prototype.controls.link={isActive(e){let t=e.s.current();return!!(t&&o.Dom.closest(t,"a",e.editor))},popup:(e,t,i)=>e.e.fire("generateLinkForm.link",t,i),tags:["a"],tooltip:"Insert link"}},68624:function(e,t,i){"use strict";var o=i(25045),n=i(31635),s=i(84839),r=i(27795),a=i(28077),l=i(65946),c=i(91206);i(65230);class u extends c.Plugin{afterInit(e){e.o.link.followOnDblClick&&e.e.on("dblclick.link",this.__onDblClickOnLink),e.e.on(e.editor,"click.link",this.__onClickReadOnlyLink),e.o.link.processPastedLink&&e.e.on("processPaste.link",this.onProcessPasteLink),e.e.on("generateLinkForm.link",this.__generateForm),e.registerCommand("openLinkDialog",{exec:()=>{let t=e.dlg({resizable:!1}),i=this.__generateForm(e.s.current(),()=>{t.close()});i.container.classList.add("jodit-dialog_alert"),t.setContent(i),t.open(),e.async.requestIdleCallback(()=>{let{url_input:e}=(0,l.refs)(i.container);e?.focus()})},hotkeys:e.o.link.hotkeys})}__onDblClickOnLink(e){if(!r.Dom.isTag(e.target,"a"))return;let t=(0,l.attr)(e.target,"href");t&&(location.href=t,e.preventDefault())}onProcessPasteLink(e,t){let{jodit:i}=this;if((0,l.isURL)(t)&&i.o.link.processPastedLink){if(i.e.stopPropagation("processPaste"),i.o.link.processVideoLink){let e=(0,l.call)(i.o.video?.parseUrlToVideoEmbed??l.convertMediaUrlToVideoEmbed,t,{width:i.o.video?.defaultWidth,height:i.o.video?.defaultHeight});if(e!==t)return i.createInside.fromHTML(e)}if(i.s.isCollapsed()){let e=i.createInside.element("a");return(0,l.attr)(e,"href",t),e.textContent=t,i.e.fire("applyLink",i,e,null),e}return i.s.commitStyle({element:"a",attributes:{href:t}}),!0}}__generateForm(e,t){let i,o,{jodit:n}=this,s=n.i18n.bind(n),{openInNewTabCheckbox:a,openInNewTabCheckboxDefaultChecked:c,noFollowCheckbox:u,formTemplate:h,formClassName:d,modeClassName:p}=n.o.link,f=h(n),m=(0,l.isString)(f)?n.c.fromHTML(f,{target_checkbox_box:a,nofollow_checkbox_box:u}):f,g=r.Dom.isElement(m)?m:m.container,_=(0,l.refs)(g),{insert:v,unlink:b,content_input_box:y}=_,{target_checkbox:w,nofollow_checkbox:S,url_input:C}=_,E=r.Dom.isImage(e),{content_input:D}=_,{className_input:I}=_,{className_select:k}=_,{aria_label_input:T}=_;D||(D=n.c.element("input",{type:"hidden",ref:"content_input"})),d&&g.classList.add(d),E&&r.Dom.hide(y);let x=()=>o?o.innerText:(0,l.stripTags)(n.s.range.cloneContents(),n.ed);o=!!(e&&r.Dom.closest(e,"a",n.editor))&&r.Dom.closest(e,"a",n.editor),!E&&e&&(D.value=x()),T&&(T.value=o&&(0,l.attr)(o,"aria-label")||""),o?(C.value=(0,l.attr)(o,"href")||"",p&&function(e,t,i,o){switch(e){case"input":t&&(t.value=(0,l.attr)(i,"class")||"");break;case"select":if(o){for(let e=0;e<o.selectedOptions.length;e++){let t=o.options.item(e);t&&(t.selected=!1)}((0,l.attr)(i,"class")||"").split(/\s+/).filter(e=>e.trim().length>0).forEach(e=>{if(e)for(let t=0;t<o.options.length;t++){let i=o.options.item(t);i?.value&&i.value.split(/\s+/).map(e=>e.trim()).includes(e)&&(i.selected=!0)}})}}}(p,I,o,k),a&&w&&(w.checked="_blank"===(0,l.attr)(o,"target")),u&&S&&(S.checked=((0,l.attr)(o,"rel")||"").split(/\s+/).includes("nofollow")),v.textContent=s("Update")):(r.Dom.hide(b),n.o.link.deriveUrlFromText&&C&&!E&&!C.value.trim()&&(C.value=!(i=D.value.trim())||/\s/.test(i)?"":/^(https?:|mailto:|tel:|ftp:|#|\/|\.{1,2}\/)/i.test(i)?i:/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(i)?"mailto:"+i:/^[a-z0-9-]+(\.[a-z0-9-]+)+(\/\S*)?$/i.test(i)?"https://"+i:""),a&&w&&(w.checked=c)),n.editor.normalize();let j=n.history.snapshot.make();b&&n.e.on(b,"click",e=>{n.s.restore(),n.history.snapshot.restore(j),o&&r.Dom.unwrap(o),n.synchronizeValues(),t(),e.preventDefault()});let P=()=>{let e;if(!C.value.trim().length)return C.focus(),C.classList.add("jodit_error"),!1;n.s.restore(),n.s.removeMarkers(),n.editor.normalize(),n.history.snapshot.restore(j);let i=x()!==D.value.trim(),s=n.createInside,c=null;if(o&&r.Dom.isOrContains(n.editor,o))e=[o];else{if(n.s.isCollapsed()){let t=s.element("a");n.s.insertNode(t,!1,!1),e=[t],c=t}else{let t=n.s.current();e=r.Dom.isTag(t,"img")?[r.Dom.wrap(t,"a",s)]:n.s.wrapInTag("a")}e.forEach(e=>n.s.select(e))}return e.forEach(e=>{var t;let o;if((0,l.attr)(e,"href",C.value),function(e,t,i,o){if(e&&(t??i)){if("input"===e)""===t.value&&o.hasAttribute("class")&&(0,l.attr)(o,"class",null),""!==t.value&&(0,l.attr)(o,"class",t.value);else if("select"===e){o.hasAttribute("class")&&(0,l.attr)(o,"class",null);for(let e=0;e<i.selectedOptions.length;e++){let t=i.selectedOptions.item(e)?.value;t&&t.split(/\s+/).filter(e=>e.trim().length>0).forEach(e=>{o.classList.add(e)})}}}}(p,I,k,e),E||(t=D,o=e.textContent,t.value.trim().length?i&&(o=t.value):o=C.value,o!==e.textContent&&(e.textContent=o)),a&&w&&(0,l.attr)(e,"target",w.checked?"_blank":null),u&&S){let t=((0,l.attr)(e,"rel")||"").split(/\s+/).filter(Boolean),i=t.includes("nofollow");S.checked&&!i?t.push("nofollow"):!S.checked&&i&&t.splice(t.indexOf("nofollow"),1),(0,l.attr)(e,"rel",t.length?t.join(" "):null)}if(T){let t=T.value.trim();(0,l.attr)(e,"aria-label",t||null)}n.e.fire("applyLink",n,e,m)}),c&&n.s.setCursorAfter(c),n.synchronizeValues(),t(),!1};return r.Dom.isElement(m)?n.e.on(m,"submit",e=>(e.preventDefault(),e.stopImmediatePropagation(),P(),!1)):m.onSubmit(P),m}beforeDestruct(e){e.e.off("generateLinkForm.link",this.__generateForm).off("dblclick.link",this.__onDblClickOnLink).off(e.editor,"click.link",this.__onClickReadOnlyLink).off("processPaste.link",this.onProcessPasteLink)}__onClickReadOnlyLink(e){let{jodit:t}=this;t.o.readonly&&t.o.link.preventReadOnlyNavigation&&r.Dom.isTag(e.target,"a")&&e.preventDefault()}constructor(...e){super(...e),(0,o._)(this,"buttons",[{name:"link",group:"insert"}])}}(0,n.__decorate)([s.autobind],u.prototype,"__onDblClickOnLink",null),(0,n.__decorate)([s.autobind],u.prototype,"onProcessPasteLink",null),(0,n.__decorate)([s.autobind],u.prototype,"__generateForm",null),(0,n.__decorate)([s.autobind],u.prototype,"__onClickReadOnlyLink",null),a.pluginSystem.add("link",u)},45778:function(e,t,i){"use strict";var o=i(59400),n=i(5658);i.d(t,["formTemplate",0,e=>{let{openInNewTabCheckbox:t,noFollowCheckbox:i,ariaLabelInput:s,modeClassName:r,selectSizeClassName:a,selectMultipleClassName:l,selectOptionsClassName:c}=e.o.link;return new n.UIForm(e,[new n.UIBlock(e,[new n.UIInput(e,{name:"url",type:"text",ref:"url_input",label:"URL",placeholder:"http://",required:!0})]),s?new n.UIBlock(e,[new n.UIInput(e,{name:"ariaLabel",ref:"aria_label_input",label:"Aria label"})]):null,new n.UIBlock(e,[new n.UIInput(e,{name:"content",ref:"content_input",label:"Text"})],{ref:"content_input_box"}),r?new n.UIBlock(e,["input"===r?new n.UIInput(e,{name:"className",ref:"className_input",label:"Class name"}):"select"===r?new n.UISelect(e,{name:"className",ref:"className_select",label:"Class name",size:a,multiple:l,options:c}):null]):null,t?new n.UICheckbox(e,{name:"target",ref:"target_checkbox",label:"Open in new tab"}):null,i?new n.UICheckbox(e,{name:"nofollow",ref:"nofollow_checkbox",label:"No follow"}):null,new n.UIBlock(e,[new o.UIButton(e,{name:"unlink",variant:"default",text:"Unlink"}),new o.UIButton(e,{name:"insert",type:"submit",variant:"primary",text:"Insert"})],{align:"full"})])}])},51730:function(e,t,i){"use strict";var o=i(5266);o.Config.prototype.mediaFakeTag="jodit-media",o.Config.prototype.mediaInFakeBlock=!0,o.Config.prototype.mediaBlocks=["video","audio"]},76830:function(e,t,i){"use strict";var o=i(81937),n=i(23211),s=i(28077),r=i(93640),a=i(80991);i(51730),s.pluginSystem.add("media",function(e){let t="jodit_fake_wrapper",{mediaFakeTag:i,mediaBlocks:s,mediaInFakeBlock:l}=e.options;l&&e.e.on("afterGetValueFromEditor",e=>{let o=RegExp(`<${i}[^>]+data-${t}[^>]+>([^]+?)</${i}>`,"ig");o.test(e.value)&&(e.value=e.value.replace(o,"$1"))}).on("change afterInit afterSetMode changePlace",e.async.debounce(()=>{e.isDestructed||e.getMode()===o.MODE_SOURCE||(0,r.$$)(s.join(","),e.editor).forEach(o=>{if(!(0,r.dataBind)(o,t)){(0,r.dataBind)(o,t,!0);var s=o;if(s.parentNode&&(0,r.attr)(s.parentNode,"data-jodit_iframe_wrapper"))s=s.parentNode;else{let o=e.createInside.element(i,{"data-jodit-temp":1,contenteditable:!1,draggable:!0,["data-"+t]:1});(0,r.attr)(o,"style",(0,r.attr)(s,"style")),(0,a.css)(o,{display:"inline-block"===(0,a.cssInline)(s,"display")?"inline-block":"block",width:s.offsetWidth,height:s.offsetHeight}),s.parentNode&&n.Dom.before(s,o),n.Dom.append(o,s),s=o}e.e.off(s,"mousedown.select touchstart.select").on(s,"mousedown.select touchstart.select",()=>{e.s.setCursorAfter(s)})}})},e.defaultTimeout))})},3244:function(e,t,i){"use strict";var o=i(81937),n=i(65946),s=i(80991),r=i(5266),a=i(42573),l=i(4274);r.Config.prototype.mobileTapTimeout=300,r.Config.prototype.toolbarAdaptive=!0,r.Config.prototype.buttonsMD=[{group:"font-style",buttons:[]},{group:"list",buttons:[]},{group:"font",buttons:[]},"---",{group:"media",buttons:[]},`
219
+ `,"link","|","align","|","undo","redo","|","copyformat","fullsize","---","dots"]},88952:function(e,t,i){"use strict";var o=i(25045),n=i(31635),s=i(84839),r=i(27795),a=i(28077),l=i(65946),c=i(91206),u=i(4099),h=i(56490),d=i(4274);i(89873);class f extends c.Plugin{get popup(){return new h.Popup(this.jodit,!1)}get toolbar(){return(0,d.makeCollection)(this.jodit,this.popup)}onClick(e){let t=this.elmsList,i=r.Dom.isTag(e,"img")?e:r.Dom.closest(e,t,this.j.editor);if(i&&this.canShowPopupForType(i.nodeName.toLowerCase()))return this.showPopup(()=>(0,l.position)(i,this.j),i.nodeName.toLowerCase(),i),!1}showPopup(e,t,i){if(t=t.toLowerCase(),!this.canShowPopupForType(t))return!1;if(this.type!==t||i!==this.previousTarget){let e;this.previousTarget=i;let o=this.j.o.popup[t];if(e=(0,l.isFunction)(o)?o(this.j,i,this.popup.close):o,(0,l.isArray)(e)){let t=this.j.o.toolbarInlineDisabledButtons;this.toolbar.build(t.length?e.filter(e=>{let i=(0,l.isString)(e)?e:e.name;return!t.includes(i??"")}):e,i),this.toolbar.buttonSize=this.j.o.toolbarButtonSize,e=this.toolbar.container}this.popup.setContent(e),this.type=t}return this.popup.open(e),!0}hidePopup(e){this.popup.isOpened&&(!(0,l.isString)(e)||e===this.type)&&this.popup.close()}onOutsideClick(){this.popup.close()}canShowPopupForType(e){let t=this.j.o.popup[e.toLowerCase()];return!this.j.o.readonly&&!!this.j.o.toolbarInline&&!!t&&!this.isExcludedTarget(e)}isExcludedTarget(e){return(0,l.splitArray)(this.j.o.toolbarInlineDisableFor).map(e=>e.toLowerCase()).includes(e.toLowerCase())}afterInit(e){this.j.e.on("getDiffButtons.mobile",t=>{if(this.toolbar===t){let t=this.toolbar.getButtonsNames();return(0,l.toArray)(e.registeredButtons).filter(e=>!this.j.o.toolbarInlineDisabledButtons.includes(e.name)).filter(e=>{let i=(0,l.isString)(e)?e:e.name;return i&&"|"!==i&&`
220
+ `!==i&&!t.includes(i)})}}).on("hidePopup",this.hidePopup).on("showInlineToolbar",this.showInlineToolbar).on("showPopup",(e,t,i)=>{this.showPopup(t,i||((0,l.isString)(e)?e:e.nodeName),(0,l.isString)(e)?void 0:e)}).on("mousedown keydown",this.onSelectionStart).on("change",()=>{this.popup.isOpened&&this.previousTarget&&!this.previousTarget.parentNode&&(this.hidePopup(),this.previousTarget=void 0)}).on([this.j.ew,this.j.ow],"mouseup keyup",this.onSelectionEnd).on([this.j.ew,this.j.ow],"mousedown touchstart",this.__onDocumentMouseDown).on("closeAllPopups",this.__onCloseAllPopups),this.addListenersForElements()}__onDocumentMouseDown(e){this.popup.isOpened&&"selection"===this.type&&e.target&&u.UIElement.closestElement(e.target,h.Popup)&&(this.__reopenSelectionPopup=!0)}__onCloseAllPopups(){!this.__reopenSelectionPopup||(this.__reopenSelectionPopup=!1,this.j.o.toolbarInlineForSelection&&this.j.async.setTimeout(()=>{let e=this.j.s.sel;e&&!e.isCollapsed&&this.showPopup(()=>this.__selectionBound(),"selection")},1))}__selectionBound(){let e=this.j.s.range.getBoundingClientRect(),{left:t,top:i}=e;if(this.j.iframe){let e=(0,l.position)(this.j.iframe,this.j,!0);t+=e.left,i+=e.top}return{left:t,top:i,width:e.width,height:e.height}}onSelectionStart(){this.snapRange=this.j.s.range.cloneRange()}onSelectionEnd(e){if(e&&e.target&&u.UIElement.closestElement(e.target,h.Popup))return;let{snapRange:t}=this,{range:i}=this.j.s;(!t||i.collapsed||i.startContainer!==t.startContainer||i.startOffset!==t.startOffset||i.endContainer!==t.endContainer||i.endOffset!==t.endOffset)&&this.onSelectionChange()}onSelectionChange(){if(!this.j.o.toolbarInlineForSelection)return;let e="selection",t=this.j.s.sel,i=this.j.s.range;if(t?.isCollapsed||this.isSelectedTarget(i)){this.type===e&&this.popup.isOpened&&this.hidePopup();return}this.j.s.current()&&this.showPopup(()=>this.__selectionBound(),e)}isSelectedTarget(e){let t=e.startContainer;return r.Dom.isElement(t)&&t===e.endContainer&&r.Dom.isTag(t.childNodes[e.startOffset],new Set((0,l.keys)(this.j.o.popup,!1)))&&e.startOffset===e.endOffset-1}beforeDestruct(e){e.e.off("showPopup").off([this.j.ew,this.j.ow],"mouseup keyup",this.onSelectionEnd).off([this.j.ew,this.j.ow],"mousedown touchstart",this.__onDocumentMouseDown).off("closeAllPopups",this.__onCloseAllPopups),this.removeListenersForElements()}_eventsList(){let e=this.elmsList;return e.map(e=>(0,l.camelCase)("click_"+e)).concat(e.map(e=>(0,l.camelCase)("touchstart_"+e))).join(" ")}addListenersForElements(){this.j.e.on(this._eventsList(),this.onClick)}removeListenersForElements(){this.j.e.off(this._eventsList(),this.onClick)}showInlineToolbar(e){this.showPopup(()=>{if(e)return e;let{range:t}=this.j.s;return t.getBoundingClientRect()},"toolbar")}constructor(...e){super(...e),(0,o._)(this,"type",null),(0,o._)(this,"previousTarget",void 0),(0,o._)(this,"__reopenSelectionPopup",!1),(0,o._)(this,"snapRange",null),(0,o._)(this,"elmsList",(0,l.keys)(this.j.o.popup,!1).filter(e=>!this.isExcludedTarget(e)))}}(0,o._)(f,"requires",["select"]),(0,n.__decorate)([s.cache],f.prototype,"popup",null),(0,n.__decorate)([s.cache],f.prototype,"toolbar",null),(0,n.__decorate)([s.autobind],f.prototype,"onClick",null),(0,n.__decorate)([(0,s.wait)(e=>!e.j.isLocked)],f.prototype,"showPopup",null),(0,n.__decorate)([(0,s.watch)([":clickEditor",":beforeCommandDelete",":backSpaceAfterDelete"]),s.autobind],f.prototype,"hidePopup",null),(0,n.__decorate)([(0,s.watch)(":outsideClick")],f.prototype,"onOutsideClick",null),(0,n.__decorate)([s.autobind],f.prototype,"__onDocumentMouseDown",null),(0,n.__decorate)([s.autobind],f.prototype,"__onCloseAllPopups",null),(0,n.__decorate)([s.autobind],f.prototype,"onSelectionStart",null),(0,n.__decorate)([s.autobind],f.prototype,"onSelectionEnd",null),(0,n.__decorate)([(0,s.debounce)(e=>e.defaultTimeout)],f.prototype,"onSelectionChange",null),(0,n.__decorate)([s.autobind],f.prototype,"showInlineToolbar",null),a.pluginSystem.add("inlinePopup",f)},64094:function(e,t,i){"use strict";var o=i(23211),n=i(28077),s=i(65946),r=i(16849),a=i(80991),l=i(29434),c=i(5266),u=i(80515),h=i.n(u);l.Icon.set("justify",h()),c.Config.prototype.controls.align={name:"left",tooltip:"Align",update(e,t){let i=t.control,n=e.s.current();if(n){let r=o.Dom.closest(n,o.Dom.isBlock,e.editor)||e.editor,l=(0,a.css)(r,"text-align").toString();i.defaultValue&&-1!==i.defaultValue.indexOf(l)&&(l="left");let{list:c,data:u}=i;u&&u.currentValue!==l&&c&&((0,s.isPlainObject)(c)?c[l]:c.includes(l))&&(e.o.textIcons||"select"===i.component?t.state.text=l:t.state.icon.name=l,u.currentValue=l)}},isActive(e,t){let i=e.s.current();if(!i||!t.control.defaultValue)return!1;let n=o.Dom.closest(i,o.Dom.isBlock,e.editor)||e.editor;return -1===t.control.defaultValue.indexOf((0,a.css)(n,"text-align").toString())},defaultValue:["left","start","inherit"],data:{currentValue:"left"},list:["center","left","right","justify"]},c.Config.prototype.controls.center={command:"justifyCenter",css:{"text-align":"center"},tooltip:"Align Center"},c.Config.prototype.controls.justify={command:"justifyFull",css:{"text-align":"justify"},tooltip:"Align Justify"},c.Config.prototype.controls.left={command:"justifyLeft",css:{"text-align":"left"},tooltip:"Align Left"},c.Config.prototype.controls.right={command:"justifyRight",css:{"text-align":"right"},tooltip:"Align Right"},n.pluginSystem.add("justify",function(e){e.registerButton({name:"align",group:"indent"});let t=t=>(e.s.focus(),e.s.eachSelection(i=>{if(!i)return;let n=o.Dom.up(i,o.Dom.isBlock,e.editor);n||(n=o.Dom.wrapInline(i,e.o.enterBlock,e)),(0,r.alignElement)(t,n)}),!1);e.registerCommand("justifyfull",t),e.registerCommand("justifyright",t),e.registerCommand("justifyleft",t),e.registerCommand("justifycenter",t)})},18210:function(e,t,i){"use strict";var o=i(31635),n=i(81937),s=i(84839),r=i(23211),a=i(28077),l=i(91206);class c extends l.Plugin{afterInit(e){}beforeDestruct(e){}onKeyDownArrow(e){if(e.key!==n.KEY_RIGHT||!this.j.selection.isCollapsed())return;let{endContainer:t,endOffset:i}=this.j.selection.range;if(r.Dom.isText(t)&&t.nodeValue?.length===i){let{parentNode:e}=t;r.Dom.isInlineBlock(e)&&!r.Dom.findNotEmptyNeighbor(e,!1,this.j.editor)&&r.Dom.after(e,this.j.createInside.text(n.NBSP_SPACE))}}}(0,o.__decorate)([(0,s.watch)(":keydown")],c.prototype,"onKeyDownArrow",null),a.pluginSystem.add("keyArrowOutside",c)},82147:function(e,t,i){"use strict";var o=i(5266);o.Config.prototype.limitWords=!1,o.Config.prototype.limitChars=!1,o.Config.prototype.limitHTML=!1},50662:function(e,t,i){"use strict";var o=i(31635),n=i(81937),s=i(84839),r=i(28077),a=i(91206);i(82147);class l extends a.Plugin{afterInit(e){let{limitWords:t,limitChars:i}=e.o;if(e&&(t||i)){let t=null;e.e.off(".limit").on("beforePaste.limit",()=>{t=e.history.snapshot.make()}).on("keydown.limit keyup.limit beforeEnter.limit",this.checkPreventKeyPressOrPaste).on("change.limit",this.checkPreventChanging).on("afterPaste.limit",()=>{if(this.__shouldDenyInput(!0)&&t)return e.history.snapshot.restore(t),e.e.fire("denyPaste.limit"),!1})}}shouldPreventInsertHTML(e){return!(e&&(n.COMMAND_KEYS.includes(e.key)||e.ctrlKey||e.metaKey))&&this.__shouldDenyInput(!1)}__shouldDenyInput(e){var t;let{jodit:i}=this,{limitWords:o,limitChars:s}=i.o,r=i.o.limitHTML?i.value:i.text,a=this.__splitWords(r);if(o&&(t=a.length,e?t>o:t>=o))return i.e.fire("denyWords.limit limit.limit"),!0;let l=i.o.countTextSpaces?r.replace((0,n.INVISIBLE_SPACE_REG_EXP)(),"").replace(/[\r\n]/g,"").length:a.join("").length,c=!!(s&&(e?l>s:l>=s));return c&&i.e.fire("denyChars.limit limit.limit"),c}checkPreventKeyPressOrPaste(e){if(this.shouldPreventInsertHTML(e))return!1}checkPreventChanging(e,t){let{jodit:i}=this;this.__shouldDenyInput(!0)&&(i.value=t)}__splitWords(e){return e.replace((0,n.INVISIBLE_SPACE_REG_EXP)(),"").split((0,n.SPACE_REG_EXP)()).filter(e=>e.length)}beforeDestruct(e){e.e.off(".limit")}}(0,o.__decorate)([s.autobind],l.prototype,"checkPreventKeyPressOrPaste",null),(0,o.__decorate)([s.autobind],l.prototype,"checkPreventChanging",null),r.pluginSystem.add("limit",l)},87908:function(e,t,i){"use strict";var o=i(65946),n=i(29434),s=i(5266),r=i(223),a=i.n(r);s.Config.prototype.defaultLineHeight=null,n.Icon.set("line-height",a()),s.Config.prototype.controls.lineHeight={command:"applyLineHeight",tags:["ol"],tooltip:"Line height",list:[1,1.1,1.2,1.3,1.4,1.5,2],exec:(e,t,{control:i})=>(0,o.memorizeExec)(e,t,{control:i},e=>e)}},5070:function(e,t,i){"use strict";i.r(t),i.d(t,{ar:function(){return o},cs_cz:function(){return o},de:function(){return o},es:function(){return o},fa:function(){return o},fi:function(){return o},fr:function(){return o},he:function(){return o},hu:function(){return o},id:function(){return o},it:function(){return o},ja:function(){return o},ko:function(){return o},mn:function(){return o},nl:function(){return o},pl:function(){return o},pt_br:function(){return o},ru:function(){return o},sk:function(){return o},tr:function(){return o},ua:function(){return o},zh_cn:function(){return o},zh_tw:function(){return o}});var o=i(41324)},58354:function(e,t,i){"use strict";var o=i(25045),n=i(31635),s=i(84839),r=i(23211),a=i(28077),l=i(65946),c=i(91206);i(87908);var u=i(5070);class h extends c.Plugin{afterInit(e){(0,l.css)(e.editor,{lineHeight:e.o.defaultLineHeight}),e.registerCommand("applyLineHeight",this.applyLineHeight)}applyLineHeight(e,t,i){let o,{s:n,createInside:s,editor:a,o:c}=this.j;n.isFocused()||n.focus(),n.save();let u=e=>{let t=r.Dom.closest(e,r.Dom.isBlock,a);t||(t=r.Dom.wrap(e,c.enter,s));let n=(0,l.css)(t,"lineHeight");void 0===o&&(o=n.toString()!==i.toString()),(0,l.css)(t,"lineHeight",o?i:null)};try{if(n.isCollapsed()){let e=s.fake();n.insertNode(e,!1,!1),u(e),r.Dom.safeRemove(e)}else n.eachSelection(u)}finally{n.restore()}}beforeDestruct(e){(0,l.css)(e.editor,{lineHeight:null})}constructor(e){super(e),(0,o._)(this,"buttons",[{name:"lineHeight",group:"font"}]),(0,a.extendLang)(u)}}(0,n.__decorate)([s.autobind],h.prototype,"applyLineHeight",null),a.pluginSystem.add("lineHeight",h)},65230:function(e,t,i){"use strict";var o=i(23211),n=i(29434),s=i(5266),r=i(95032),a=i.n(r),l=i(73533),c=i.n(l),u=i(45778);s.Config.prototype.link={formTemplate:u.formTemplate,followOnDblClick:!1,processVideoLink:!0,processPastedLink:!0,deriveUrlFromText:!1,noFollowCheckbox:!0,openInNewTabCheckbox:!0,openInNewTabCheckboxDefaultChecked:!1,ariaLabelInput:!1,modeClassName:"input",selectMultipleClassName:!0,preventReadOnlyNavigation:!0,selectSizeClassName:3,selectOptionsClassName:[],hotkeys:["ctrl+k","cmd+k"]},n.Icon.set("link",a()).set("unlink",c()),s.Config.prototype.controls.unlink={exec(e,t){let i=o.Dom.closest(t,"a",e.editor);i&&o.Dom.unwrap(i),e.synchronizeValues(),e.e.fire("hidePopup")},tooltip:"Unlink"},s.Config.prototype.controls.link={isActive(e){let t=e.s.current();return!!(t&&o.Dom.closest(t,"a",e.editor))},popup:(e,t,i)=>e.e.fire("generateLinkForm.link",t,i),tags:["a"],tooltip:"Insert link"}},68624:function(e,t,i){"use strict";var o=i(25045),n=i(31635),s=i(84839),r=i(27795),a=i(28077),l=i(65946),c=i(91206);i(65230);class u extends c.Plugin{afterInit(e){e.o.link.followOnDblClick&&e.e.on("dblclick.link",this.__onDblClickOnLink),e.e.on(e.editor,"click.link",this.__onClickReadOnlyLink),e.o.link.processPastedLink&&e.e.on("processPaste.link",this.onProcessPasteLink),e.e.on("generateLinkForm.link",this.__generateForm),e.registerCommand("openLinkDialog",{exec:()=>{let t=e.dlg({resizable:!1}),i=this.__generateForm(e.s.current(),()=>{t.close()});i.container.classList.add("jodit-dialog_alert"),t.setContent(i),t.open(),e.async.requestIdleCallback(()=>{let{url_input:e}=(0,l.refs)(i.container);e?.focus()})},hotkeys:e.o.link.hotkeys})}__onDblClickOnLink(e){if(!r.Dom.isTag(e.target,"a"))return;let t=(0,l.attr)(e.target,"href");t&&(location.href=t,e.preventDefault())}onProcessPasteLink(e,t){let{jodit:i}=this;if((0,l.isURL)(t)&&i.o.link.processPastedLink){if(i.e.stopPropagation("processPaste"),i.o.link.processVideoLink){let e=(0,l.call)(i.o.video?.parseUrlToVideoEmbed??l.convertMediaUrlToVideoEmbed,t,{width:i.o.video?.defaultWidth,height:i.o.video?.defaultHeight});if(e!==t)return i.createInside.fromHTML(e)}if(i.s.isCollapsed()){let e=i.createInside.element("a");return(0,l.attr)(e,"href",t),e.textContent=t,i.e.fire("applyLink",i,e,null),e}return i.s.commitStyle({element:"a",attributes:{href:t}}),!0}}__generateForm(e,t){let i,o,{jodit:n}=this,s=n.i18n.bind(n),{openInNewTabCheckbox:a,openInNewTabCheckboxDefaultChecked:c,noFollowCheckbox:u,formTemplate:h,formClassName:d,modeClassName:f}=n.o.link,p=h(n),m=(0,l.isString)(p)?n.c.fromHTML(p,{target_checkbox_box:a,nofollow_checkbox_box:u}):p,g=r.Dom.isElement(m)?m:m.container,_=(0,l.refs)(g),{insert:v,unlink:b,content_input_box:y}=_,{target_checkbox:w,nofollow_checkbox:S,url_input:C}=_,E=r.Dom.isImage(e),{content_input:D}=_,{className_input:I}=_,{className_select:k}=_,{aria_label_input:T}=_;D||(D=n.c.element("input",{type:"hidden",ref:"content_input"})),d&&g.classList.add(d),E&&r.Dom.hide(y);let x=()=>o?o.innerText:(0,l.stripTags)(n.s.range.cloneContents(),n.ed);o=!!(e&&r.Dom.closest(e,"a",n.editor))&&r.Dom.closest(e,"a",n.editor),!E&&e&&(D.value=x()),T&&(T.value=o&&(0,l.attr)(o,"aria-label")||""),o?(C.value=(0,l.attr)(o,"href")||"",f&&function(e,t,i,o){switch(e){case"input":t&&(t.value=(0,l.attr)(i,"class")||"");break;case"select":if(o){for(let e=0;e<o.selectedOptions.length;e++){let t=o.options.item(e);t&&(t.selected=!1)}((0,l.attr)(i,"class")||"").split(/\s+/).filter(e=>e.trim().length>0).forEach(e=>{if(e)for(let t=0;t<o.options.length;t++){let i=o.options.item(t);i?.value&&i.value.split(/\s+/).map(e=>e.trim()).includes(e)&&(i.selected=!0)}})}}}(f,I,o,k),a&&w&&(w.checked="_blank"===(0,l.attr)(o,"target")),u&&S&&(S.checked=((0,l.attr)(o,"rel")||"").split(/\s+/).includes("nofollow")),v.textContent=s("Update")):(r.Dom.hide(b),n.o.link.deriveUrlFromText&&C&&!E&&!C.value.trim()&&(C.value=!(i=D.value.trim())||/\s/.test(i)?"":/^(https?:|mailto:|tel:|ftp:|#|\/|\.{1,2}\/)/i.test(i)?i:/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(i)?"mailto:"+i:/^[a-z0-9-]+(\.[a-z0-9-]+)+(\/\S*)?$/i.test(i)?"https://"+i:""),a&&w&&(w.checked=c)),n.editor.normalize();let j=n.history.snapshot.make();b&&n.e.on(b,"click",e=>{n.s.restore(),n.history.snapshot.restore(j),o&&r.Dom.unwrap(o),n.synchronizeValues(),t(),e.preventDefault()});let P=()=>{let e;if(!C.value.trim().length)return C.focus(),C.classList.add("jodit_error"),!1;n.s.restore(),n.s.removeMarkers(),n.editor.normalize(),n.history.snapshot.restore(j);let i=x()!==D.value.trim(),s=n.createInside,c=null;if(o&&r.Dom.isOrContains(n.editor,o))e=[o];else{if(n.s.isCollapsed()){let t=s.element("a");n.s.insertNode(t,!1,!1),e=[t],c=t}else{let t=n.s.current();e=r.Dom.isTag(t,"img")?[r.Dom.wrap(t,"a",s)]:n.s.wrapInTag("a")}e.forEach(e=>n.s.select(e))}return e.forEach(e=>{var t;let o;if((0,l.attr)(e,"href",C.value),function(e,t,i,o){if(e&&(t??i)){if("input"===e)""===t.value&&o.hasAttribute("class")&&(0,l.attr)(o,"class",null),""!==t.value&&(0,l.attr)(o,"class",t.value);else if("select"===e){o.hasAttribute("class")&&(0,l.attr)(o,"class",null);for(let e=0;e<i.selectedOptions.length;e++){let t=i.selectedOptions.item(e)?.value;t&&t.split(/\s+/).filter(e=>e.trim().length>0).forEach(e=>{o.classList.add(e)})}}}}(f,I,k,e),E||(t=D,o=e.textContent,t.value.trim().length?i&&(o=t.value):o=C.value,o!==e.textContent&&(e.textContent=o)),a&&w&&(0,l.attr)(e,"target",w.checked?"_blank":null),u&&S){let t=((0,l.attr)(e,"rel")||"").split(/\s+/).filter(Boolean),i=t.includes("nofollow");S.checked&&!i?t.push("nofollow"):!S.checked&&i&&t.splice(t.indexOf("nofollow"),1),(0,l.attr)(e,"rel",t.length?t.join(" "):null)}if(T){let t=T.value.trim();(0,l.attr)(e,"aria-label",t||null)}n.e.fire("applyLink",n,e,m)}),c&&n.s.setCursorAfter(c),n.synchronizeValues(),t(),!1};return r.Dom.isElement(m)?n.e.on(m,"submit",e=>(e.preventDefault(),e.stopImmediatePropagation(),P(),!1)):m.onSubmit(P),m}beforeDestruct(e){e.e.off("generateLinkForm.link",this.__generateForm).off("dblclick.link",this.__onDblClickOnLink).off(e.editor,"click.link",this.__onClickReadOnlyLink).off("processPaste.link",this.onProcessPasteLink)}__onClickReadOnlyLink(e){let{jodit:t}=this;t.o.readonly&&t.o.link.preventReadOnlyNavigation&&r.Dom.isTag(e.target,"a")&&e.preventDefault()}constructor(...e){super(...e),(0,o._)(this,"buttons",[{name:"link",group:"insert"}])}}(0,n.__decorate)([s.autobind],u.prototype,"__onDblClickOnLink",null),(0,n.__decorate)([s.autobind],u.prototype,"onProcessPasteLink",null),(0,n.__decorate)([s.autobind],u.prototype,"__generateForm",null),(0,n.__decorate)([s.autobind],u.prototype,"__onClickReadOnlyLink",null),a.pluginSystem.add("link",u)},45778:function(e,t,i){"use strict";var o=i(59400),n=i(5658);i.d(t,["formTemplate",0,e=>{let{openInNewTabCheckbox:t,noFollowCheckbox:i,ariaLabelInput:s,modeClassName:r,selectSizeClassName:a,selectMultipleClassName:l,selectOptionsClassName:c}=e.o.link;return new n.UIForm(e,[new n.UIBlock(e,[new n.UIInput(e,{name:"url",type:"text",ref:"url_input",label:"URL",placeholder:"http://",required:!0})]),s?new n.UIBlock(e,[new n.UIInput(e,{name:"ariaLabel",ref:"aria_label_input",label:"Aria label"})]):null,new n.UIBlock(e,[new n.UIInput(e,{name:"content",ref:"content_input",label:"Text"})],{ref:"content_input_box"}),r?new n.UIBlock(e,["input"===r?new n.UIInput(e,{name:"className",ref:"className_input",label:"Class name"}):"select"===r?new n.UISelect(e,{name:"className",ref:"className_select",label:"Class name",size:a,multiple:l,options:c}):null]):null,t?new n.UICheckbox(e,{name:"target",ref:"target_checkbox",label:"Open in new tab"}):null,i?new n.UICheckbox(e,{name:"nofollow",ref:"nofollow_checkbox",label:"No follow"}):null,new n.UIBlock(e,[new o.UIButton(e,{name:"unlink",variant:"default",text:"Unlink"}),new o.UIButton(e,{name:"insert",type:"submit",variant:"primary",text:"Insert"})],{align:"full"})])}])},51730:function(e,t,i){"use strict";var o=i(5266);o.Config.prototype.mediaFakeTag="jodit-media",o.Config.prototype.mediaInFakeBlock=!0,o.Config.prototype.mediaBlocks=["video","audio"]},76830:function(e,t,i){"use strict";var o=i(81937),n=i(23211),s=i(28077),r=i(93640),a=i(80991);i(51730),s.pluginSystem.add("media",function(e){let t="jodit_fake_wrapper",{mediaFakeTag:i,mediaBlocks:s,mediaInFakeBlock:l}=e.options;l&&e.e.on("afterGetValueFromEditor",e=>{let o=RegExp(`<${i}[^>]+data-${t}[^>]+>([^]+?)</${i}>`,"ig");o.test(e.value)&&(e.value=e.value.replace(o,"$1"))}).on("change afterInit afterSetMode changePlace",e.async.debounce(()=>{e.isDestructed||e.getMode()===o.MODE_SOURCE||(0,r.$$)(s.join(","),e.editor).forEach(o=>{if(!(0,r.dataBind)(o,t)){(0,r.dataBind)(o,t,!0);var s=o;if(s.parentNode&&(0,r.attr)(s.parentNode,"data-jodit_iframe_wrapper"))s=s.parentNode;else{let o=e.createInside.element(i,{"data-jodit-temp":1,contenteditable:!1,draggable:!0,["data-"+t]:1});(0,r.attr)(o,"style",(0,r.attr)(s,"style")),(0,a.css)(o,{display:"inline-block"===(0,a.cssInline)(s,"display")?"inline-block":"block",width:s.offsetWidth,height:s.offsetHeight}),s.parentNode&&n.Dom.before(s,o),n.Dom.append(o,s),s=o}e.e.off(s,"mousedown.select touchstart.select").on(s,"mousedown.select touchstart.select",()=>{e.s.setCursorAfter(s)})}})},e.defaultTimeout))})},3244:function(e,t,i){"use strict";var o=i(81937),n=i(65946),s=i(80991),r=i(5266),a=i(42573),l=i(4274);r.Config.prototype.mobileTapTimeout=300,r.Config.prototype.toolbarAdaptive=!0,r.Config.prototype.buttonsMD=[{group:"font-style",buttons:[]},{group:"list",buttons:[]},{group:"font",buttons:[]},"---",{group:"media",buttons:[]},`
221
221
  `,{group:"state",buttons:[]},{group:"insert",buttons:[]},{group:"indent",buttons:[]},{group:"color",buttons:[]},"---",{group:"history",buttons:[]},{group:"other",buttons:[]},"|","dots"],r.Config.prototype.buttonsSM=[{group:"font-style",buttons:[]},{group:"list",buttons:[]},"---",{group:"font",buttons:[]},`
222
222
  `,{group:"state",buttons:[]},{group:"indent",buttons:[]},{group:"color",buttons:[]},"---",{group:"history",buttons:[]},"|","dots"],r.Config.prototype.buttonsXS=[{group:"font-style",buttons:[]},{group:"list",buttons:[]},"---",{group:"font",buttons:[]},{group:"color",buttons:[]},"---","dots"],r.Config.prototype.controls.dots={mode:o.MODE_SOURCE+o.MODE_WYSIWYG,popup(e,t,i,o){let r=o.control.data;return void 0===r&&(r={toolbar:(0,l.makeCollection)(e),rebuild(){if(o){let t=e.e.fire("getDiffButtons.mobile",o.closest(a.ToolbarCollection));if(t&&r){r.toolbar.build((0,n.splitArray)(t));let i=e.toolbar?.firstButton?.container.offsetWidth||36;(0,s.css)(r.toolbar.container,"width",(i+4)*3)}}}},o.control.data=r),r.rebuild(),r.toolbar},tooltip:"Show all"}},74240:function(e,t,i){"use strict";var o=i(23211),n=i(28077),s=i(65946),r=i(85932),a=i(2496);i(3244);let l=e=>"|"===e||"---"===e||`
223
- `===e;function c(e,t){let i=(0,a.flatButtonsSet)((0,s.splitArray)(t.o.buttons),t),o=t.getRegisteredButtonGroups(),n=!1,r=!1,c=[];for(let t of e)if((0,a.isButtonGroup)(t)){let e=[...t.buttons,...o[t.group]??[]],s=e.filter(e=>i.has(e));s.length!==e.length&&(n=!0),c.push(...s)}else l(t)?c.push(t):"dots"===t?r=!0:i.has(t)?c.push(t):n=!0;if(!n)return e;let u=[];for(let e of c)l(e)&&(0===u.length||l(u[u.length-1]))||u.push(e);for(;u.length&&l(u[u.length-1]);)u.pop();if(r){let e=(0,a.flatButtonsSet)(u,t);(0,s.toArray)(i).some(t=>!e.has(t))&&u.push("dots")}return u}n.pluginSystem.add("mobile",function(e){let t=0,i=(0,s.splitArray)(e.o.buttons);e.o.mobileTapTimeout&&e.e.on("touchend",i=>{if(i.changedTouches&&i.changedTouches.length){let o=new Date().getTime(),n=o-t;n>e.o.mobileTapTimeout&&(t=o,n<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,s.splitArray)(e.o.buttons),e),o=(0,a.flatButtonsSet)(i,e);return(0,s.toArray)(t).reduce((e,t)=>(o.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,s.splitArray)(e.o.buttons);let t=function(e){let{toolbar:t}=e.o;if((0,r.isString)(t)||o.Dom.isHTMLElement(t)){let t=e.toolbarContainer.offsetWidth;if(t)return t}return(e.container.parentElement??e.container).offsetWidth}(e);return t>=e.o.sizeLG?(0,s.splitArray)(e.o.buttons):t>=e.o.sizeMD?c((0,s.splitArray)(e.o.buttonsMD),e):t>=e.o.sizeSM?c((0,s.splitArray)(e.o.buttonsSM),e):c((0,s.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 o=i(36400),n=i(29434),s=i(5266),r=i(40037),a=i.n(r),l=i(83207),c=i.n(l);let u=(e,t,{control:i})=>{let n="button"+i.command,s=(i.args&&i.args[0])??(0,o.dataBind)(e,n);(0,o.dataBind)(e,n,s),e.execCommand(i.command,!1,"default"===s?null:s)};n.Icon.set("ol",a()).set("ul",c()),s.Config.prototype.controls.ul={command:"insertUnorderedList",tags:["ul"],tooltip:"Insert Unordered List",list:{default:"Default",circle:"Circle",disc:"Dot",square:"Quadrate"},exec:u},s.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"},exec:u}},98792:function(e,t,i){"use strict";var o=i(25045),n=i(31635),s=i(84839),r=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,o._)(this,"buttons",[{name:"ul",group:"list"},{name:"ol",group:"list"}])}}(0,n.__decorate)([s.autobind],l.prototype,"onCommand",null),r.pluginSystem.add("orderedList",l)},71693:function(e,t,i){"use strict";var o=i(81937),n=i(5266);n.Config.prototype.askBeforePasteFromWord=!0,n.Config.prototype.processPasteFromWord=!0,n.Config.prototype.defaultActionOnPasteFromWord=null,n.Config.prototype.pasteFromWordActionList=[{value:o.INSERT_AS_HTML,text:"Keep"},{value:o.INSERT_AS_TEXT,text:"Clean"},{value:o.INSERT_ONLY_TEXT,text:"Insert only Text"}]},96730:function(e,t,i){"use strict";var o=i(25045),n=i(31635),s=i(81937),r=i(84839),a=i(28077),l=i(65946),c=i(91206);i(71693);var u=i(54308);class h extends c.Plugin{afterInit(e){}beforeDestruct(e){}processWordHTML(e,t,i){let{j:o}=this,{processPasteFromWord:n,askBeforePasteFromWord:s,defaultActionOnPasteFromWord:r,defaultActionOnPaste:a,pasteFromWordActionList:c}=o.o;return!!(n&&(0,l.isHtmlFromWord)(t))&&(s?(0,u.askInsertTypeDialog)(o,"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",o=>{this.insertFromWordByType(e,t,o,i)},c):this.insertFromWordByType(e,t,r||a,i),!0)}insertFromWordByType(e,t,i,o){switch(i){case s.INSERT_AS_HTML:{t=(0,l.applyStyles)(t);let e=this.j.events?.fire("beautifyHTML",t);(0,l.isString)(e)&&(t=e);break}case s.INSERT_AS_TEXT:t=(0,l.cleanFromWord)(t);break;case s.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,u.pasteInsertHtml)(e,this.j,t)}}(0,o._)(h,"requires",["paste"]),(0,n.__decorate)([(0,r.watch)(":processHTML")],h.prototype,"processWordHTML",null),a.pluginSystem.add("pasteFromWord",h)},7758:function(e,t,i){"use strict";var o=i(25045),n=i(81937),s=i(23211),r=i(28077),a=i(65946),l=i(18855),c=i(53681);class u extends l.Plugin{createDialog(){this.dialog=this.j.dlg();let e=(0,c.Button)(this.j,"paste","Paste","primary");e.onAction(this.paste);let t=(0,c.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(),s.Dom.append(this.container,this.listBox),s.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 s.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"),s.Dom.safeRemove(this.previewBox),s.Dom.safeRemove(this.listBox),s.Dom.safeRemove(this.container),this.container=null,this.listBox=null,this.previewBox=null,this.dialog=null,this.list=[]}constructor(...e){super(...e),(0,o._)(this,"currentIndex",0),(0,o._)(this,"list",[]),(0,o._)(this,"container",null),(0,o._)(this,"listBox",null),(0,o._)(this,"previewBox",null),(0,o._)(this,"dialog",null),(0,o._)(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,o._)(this,"onKeyDown",e=>{let t=this.currentIndex;if(-1!==[n.KEY_UP,n.KEY_DOWN,n.KEY_ENTER].indexOf(e.key)){if(e.key===n.KEY_UP&&(0===t?t=this.list.length-1:t-=1),e.key===n.KEY_DOWN&&(t===this.list.length-1?t=0:t+=1),e.key===n.KEY_ENTER)return void this.paste();t!==this.currentIndex&&this.selectIndex(t),e.stopImmediatePropagation(),e.preventDefault()}}),(0,o._)(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,o._)(this,"showDialog",()=>{this.list.length<2||(this.dialog||this.createDialog(),this.listBox&&s.Dom.detach(this.listBox),this.previewBox&&s.Dom.detach(this.previewBox),this.list.forEach((e,t)=>{let i=this.j.c.element("a");i.textContent=t+1+". "+e.replace((0,n.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&&s.Dom.append(this.listBox,i)}),this.dialog&&this.dialog.open(),this.j.async.setTimeout(()=>{this.selectIndex(0)},100))})}}r.pluginSystem.add("pasteStorage",u)},38187:function(e,t,i){"use strict";var o=i(81937),n=i(5266),s=i(54308);n.Config.prototype.askBeforePasteHTML=!0,n.Config.prototype.processPasteHTML=!0,n.Config.prototype.scrollToPastedContent=!0,n.Config.prototype.pasteExcludeStripTags=["br","hr"],n.Config.prototype.pasteHTMLActionList=[{value:o.INSERT_AS_HTML,text:"Keep"},{value:o.INSERT_AS_TEXT,text:"Insert as Text"},{value:o.INSERT_ONLY_TEXT,text:"Insert only Text"}],n.Config.prototype.memorizeChoiceWhenPasteFragment=!1,n.Config.prototype.nl2brInPlainText=!0;let r="pasteStorage";n.Config.prototype.controls.paste={tooltip:"Paste from clipboard",async exec(e,t,{control:i}){if(i.name===r)return void e.execCommand("showPasteStorage");e.s.focus();let n="",a=!0;if(navigator.clipboard){try{let e=await navigator.clipboard.read();if(e&&e.length){let t=e[0],i=t.types?.includes(o.TEXT_HTML)?o.TEXT_HTML:o.TEXT_PLAIN,s=await t.getType(i);n=await new Response(s).text()}a=!1}catch(e){o.IS_PROD}if(a)try{n=await navigator.clipboard.readText(),a=!1}catch(e){o.IS_PROD}}a&&(a=0===(n=e.buffer.get(o.CLIPBOARD_ID)||"").length);let l=e.value;a?(e.ed.execCommand("paste"),(a=l===e.value)||e.e.fire("afterPaste")):n.length?((0,s.pasteInsertHtml)(null,e,n),e.e.fire("afterPaste")):a&&e.alert("Your browser doesn't support direct access to the clipboard.",()=>void e.s.focus())},list:{[r]:"Paste Storage"},isChildDisabled:e=>2>e.e.fire("pasteStorageList")}},54308:function(e,t,i){"use strict";i.d(t,{askInsertTypeDialog:function(){return c},getAllTypes:function(){return l},pasteInsertHtml:function(){return a}});var o=i(81937),n=i(23211),s=i(28686),r=i(53681);function a(e,t,i){var o;let r,a;if(t.isInDestruct)return;e&&"drop"===e.type&&t.s.insertCursorAtPoint(e.clientX,e.clientY);let l=t.e.fire("beforePasteInsert",i);!(0,s.isVoid)(l)&&((0,s.isString)(l)||(0,s.isNumber)(l)||n.Dom.isNode(l))&&(i=l),(0,s.isString)(i)&&(-1!==(r=(o=(o=i).replace(/<meta[^>]+?>/g,"")).search(/<!--StartFragment-->/i))&&(o=o.substring(r+20)),-1!==(a=o.search(/<!--EndFragment-->/i))&&(o=o.substring(0,a)),i=o),t.s.insertHTML(i)}function l(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||o.TEXT_PLAIN).toString()+";";return i}function c(e,t,i,o,n){if(!1===e.e.fire("beforeOpenPasteDialog",t,i,o,n))return;let s=e.confirm(`<div style="word-break: normal; white-space: normal">${e.i18n(t)}</div>`,e.i18n(i)),a=n.map(({text:t,value:i})=>(0,r.Button)(e,{text:t,name:t.toLowerCase(),tabIndex:0}).onAction(()=>{s.close(),o(i)}));s.e.on(s,"beforeClose",()=>{e.e.fire("beforeClosePasteDialog",s)}).one(s,"afterClose",()=>{e.s.isFocused()||e.s.focus(),e.e.fire("afterClosePasteDialog",s)});let l=(0,r.Button)(e,{text:"Cancel",tabIndex:0}).onAction(()=>{s.close()});return s.setFooter([...a,l]),a[0].focus(),a[0].state.variant="primary",e.e.fire("afterOpenPasteDialog",s,t,i,o,n),s}},23422:function(e,t,i){"use strict";var o=i(25045),n=i(31635),s=i(81937),r=i(84839),a=i(23211),l=i(28077),c=i(65946),u=i(18855);i(38187);var h=i(54308);class d extends u.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,c.getDataTransfer)(e),i=[t?.getData(s.TEXT_PLAIN),t?.getData(s.TEXT_HTML),t?.getData(s.TEXT_RTF)];for(let t of i)if((0,c.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,c.getDataTransfer)(e),i=t?.getData(s.TEXT_HTML)||t?.getData(s.TEXT_PLAIN);if(t&&i&&""!==(0,c.trim)(i)){let o=this.j.e.fire("processPaste",e,i,(0,h.getAllTypes)(t));void 0!==o&&(i=o),((0,c.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,h.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,c.isString)(t))switch(this.j.buffer.set(s.CLIPBOARD_ID,t),i){case s.INSERT_CLEAR_HTML:t=(0,c.cleanFromWord)(t);break;case s.INSERT_ONLY_TEXT:t=(0,c.stripTags)(t,this.j.ed,new Set(this.j.o.pasteExcludeStripTags),this.j.o.nl2brInPlainText);break;case s.INSERT_AS_TEXT:t=(0,c.htmlspecialchars)(t),this.j.o.nl2brInPlainText&&(t=(0,c.nl2br)(t));break;default:{let o=this.j.e.fire("onCustomPasteHTMLOption",i,t,e);"string"==typeof o&&(t=o)}}(0,h.pasteInsertHtml)(e,this.j,t)}onProcessPasteReplaceNl2Br(e,t,i){if(i===s.TEXT_PLAIN+";"&&!(0,c.isHTML)(t)){let e=(0,c.htmlspecialchars)(t);return this.j.o.nl2brInPlainText?(0,c.nl2br)(e):e}}constructor(...e){super(...e),(0,o._)(this,"pasteStack",new c.LimitedStack(20)),(0,o._)(this,"_isDialogOpened",!1)}}(0,n.__decorate)([r.autobind],d.prototype,"onPaste",null),(0,n.__decorate)([r.autobind],d.prototype,"onProcessPasteReplaceNl2Br",null),l.pluginSystem.add("paste",d)},8257:function(e,t,i){"use strict";var o=i(5266);o.Config.prototype.showPlaceholder=!0,o.Config.prototype.placeholder="Type something",o.Config.prototype.useInputsPlaceholder=!0},28346:function(e,t,i){"use strict";var o=i(25045),n=i(31635),s=i(81937),r=i(84839),a=i(23211),l=i(28077),c=i(23175),u=i(7909),h=i(80991),d=i(18855);i(8257);class p extends d.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,o=e.s.current(),n=o&&a.Dom.closest(o,a.Dom.isBlock,e.editor)||e.editor,s=e.ew.getComputedStyle(n),r=e.ew.getComputedStyle(e.editor);a.Dom.append(e.workplace,this.placeholderElm);let{firstChild:l}=e.editor;if(a.Dom.isElement(l)&&!(0,c.isMarker)(l)){let o=e.ew.getComputedStyle(l);t=parseInt(o.getPropertyValue("margin-top"),10),i=parseInt(o.getPropertyValue("margin-left"),10),(0,h.css)(this.placeholderElm,{fontSize:parseInt(o.getPropertyValue("font-size"),10),lineHeight:o.getPropertyValue("line-height")})}else(0,h.css)(this.placeholderElm,{fontSize:parseInt(s.getPropertyValue("font-size"),10),lineHeight:s.getPropertyValue("line-height")});(0,h.css)(this.placeholderElm,{display:"block",textAlign:s.getPropertyValue("text-align"),paddingTop:parseInt(r.paddingTop,10)+"px",paddingLeft:parseInt(r.paddingLeft,10)+"px",paddingRight:parseInt(r.paddingRight,10)+"px",marginTop:Math.max(parseInt(s.getPropertyValue("margin-top"),10),t),marginLeft:Math.max(parseInt(s.getPropertyValue("margin-left"),10),i)})}hide(){a.Dom.safeRemove(this.placeholderElm)}toggle(){let e=this.j;if(e.editor&&!e.isInDestruct){if(e.getRealMode()!==s.MODE_WYSIWYG)return void this.hide();!function(e){if(!e.firstChild)return!0;let t=e.firstChild;if(s.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")))}(e.editor)?this.hide():this.show()}}beforeDestruct(e){this.hide(),e.e.off(".placeholder").off(window,"load",this.toggle)}constructor(...e){super(...e),(0,o._)(this,"placeholderElm",void 0),(0,o._)(this,"addNativeListeners",()=>{this.j.e.off(this.j.editor,"input.placeholder keydown.placeholder").on(this.j.editor,"input.placeholder keydown.placeholder",this.toggle)}),(0,o._)(this,"addEvents",()=>{let e=this.j;e.o.useInputsPlaceholder&&e.element.hasAttribute("placeholder")&&(this.placeholderElm.innerHTML=(0,u.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",this.toggle).on(window,"load",this.toggle),this.addNativeListeners(),this.toggle()})}}(0,n.__decorate)([(0,r.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
223
+ `===e;function c(e,t){let i=(0,a.flatButtonsSet)((0,s.splitArray)(t.o.buttons),t),o=t.getRegisteredButtonGroups(),n=!1,r=!1,c=[];for(let t of e)if((0,a.isButtonGroup)(t)){let e=[...t.buttons,...o[t.group]??[]],s=e.filter(e=>i.has(e));s.length!==e.length&&(n=!0),c.push(...s)}else l(t)?c.push(t):"dots"===t?r=!0:i.has(t)?c.push(t):n=!0;if(!n)return e;let u=[];for(let e of c)l(e)&&(0===u.length||l(u[u.length-1]))||u.push(e);for(;u.length&&l(u[u.length-1]);)u.pop();if(r){let e=(0,a.flatButtonsSet)(u,t);(0,s.toArray)(i).some(t=>!e.has(t))&&u.push("dots")}return u}n.pluginSystem.add("mobile",function(e){let t=0,i=(0,s.splitArray)(e.o.buttons);e.o.mobileTapTimeout&&e.e.on("touchend",i=>{if(i.changedTouches&&i.changedTouches.length){let o=new Date().getTime(),n=o-t;n>e.o.mobileTapTimeout&&(t=o,n<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,s.splitArray)(e.o.buttons),e),o=(0,a.flatButtonsSet)(i,e);return(0,s.toArray)(t).reduce((e,t)=>(o.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,s.splitArray)(e.o.buttons);let t=function(e){let{toolbar:t}=e.o;if((0,r.isString)(t)||o.Dom.isHTMLElement(t)){let t=e.toolbarContainer.offsetWidth;if(t)return t}return(e.container.parentElement??e.container).offsetWidth}(e);return t>=e.o.sizeLG?(0,s.splitArray)(e.o.buttons):t>=e.o.sizeMD?c((0,s.splitArray)(e.o.buttonsMD),e):t>=e.o.sizeSM?c((0,s.splitArray)(e.o.buttonsSM),e):c((0,s.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 o=i(36400),n=i(29434),s=i(5266),r=i(40037),a=i.n(r),l=i(83207),c=i.n(l);let u=(e,t,{control:i})=>{let n="button"+i.command,s=(i.args&&i.args[0])??(0,o.dataBind)(e,n);(0,o.dataBind)(e,n,s),e.execCommand(i.command,!1,"default"===s?null:s)};n.Icon.set("ol",a()).set("ul",c()),s.Config.prototype.controls.ul={command:"insertUnorderedList",tags:["ul"],tooltip:"Insert Unordered List",list:{default:"Default",circle:"Circle",disc:"Dot",square:"Quadrate"},exec:u},s.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"},exec:u}},98792:function(e,t,i){"use strict";var o=i(25045),n=i(31635),s=i(84839),r=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,o._)(this,"buttons",[{name:"ul",group:"list"},{name:"ol",group:"list"}])}}(0,n.__decorate)([s.autobind],l.prototype,"onCommand",null),r.pluginSystem.add("orderedList",l)},71693:function(e,t,i){"use strict";var o=i(81937),n=i(5266);n.Config.prototype.askBeforePasteFromWord=!0,n.Config.prototype.processPasteFromWord=!0,n.Config.prototype.defaultActionOnPasteFromWord=null,n.Config.prototype.pasteFromWordActionList=[{value:o.INSERT_AS_HTML,text:"Keep"},{value:o.INSERT_AS_TEXT,text:"Clean"},{value:o.INSERT_ONLY_TEXT,text:"Insert only Text"}]},96730:function(e,t,i){"use strict";var o=i(25045),n=i(31635),s=i(81937),r=i(84839),a=i(28077),l=i(65946),c=i(91206);i(71693);var u=i(54308);class h extends c.Plugin{afterInit(e){}beforeDestruct(e){}processWordHTML(e,t,i){let{j:o}=this,{processPasteFromWord:n,askBeforePasteFromWord:s,defaultActionOnPasteFromWord:r,defaultActionOnPaste:a,pasteFromWordActionList:c}=o.o;return!!(n&&(0,l.isHtmlFromWord)(t))&&(s?(0,u.askInsertTypeDialog)(o,"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",o=>{this.insertFromWordByType(e,t,o,i)},c):this.insertFromWordByType(e,t,r||a,i),!0)}insertFromWordByType(e,t,i,o){switch(i){case s.INSERT_AS_HTML:{t=(0,l.applyStyles)(t);let e=this.j.events?.fire("beautifyHTML",t);(0,l.isString)(e)&&(t=e);break}case s.INSERT_AS_TEXT:t=(0,l.cleanFromWord)(t);break;case s.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,u.pasteInsertHtml)(e,this.j,t)}}(0,o._)(h,"requires",["paste"]),(0,n.__decorate)([(0,r.watch)(":processHTML")],h.prototype,"processWordHTML",null),a.pluginSystem.add("pasteFromWord",h)},7758:function(e,t,i){"use strict";var o=i(25045),n=i(81937),s=i(23211),r=i(28077),a=i(65946),l=i(18855),c=i(53681);class u extends l.Plugin{createDialog(){this.dialog=this.j.dlg();let e=(0,c.Button)(this.j,"paste","Paste","primary");e.onAction(this.paste);let t=(0,c.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(),s.Dom.append(this.container,this.listBox),s.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 s.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"),s.Dom.safeRemove(this.previewBox),s.Dom.safeRemove(this.listBox),s.Dom.safeRemove(this.container),this.container=null,this.listBox=null,this.previewBox=null,this.dialog=null,this.list=[]}constructor(...e){super(...e),(0,o._)(this,"currentIndex",0),(0,o._)(this,"list",[]),(0,o._)(this,"container",null),(0,o._)(this,"listBox",null),(0,o._)(this,"previewBox",null),(0,o._)(this,"dialog",null),(0,o._)(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,o._)(this,"onKeyDown",e=>{let t=this.currentIndex;if(-1!==[n.KEY_UP,n.KEY_DOWN,n.KEY_ENTER].indexOf(e.key)){if(e.key===n.KEY_UP&&(0===t?t=this.list.length-1:t-=1),e.key===n.KEY_DOWN&&(t===this.list.length-1?t=0:t+=1),e.key===n.KEY_ENTER)return void this.paste();t!==this.currentIndex&&this.selectIndex(t),e.stopImmediatePropagation(),e.preventDefault()}}),(0,o._)(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,o._)(this,"showDialog",()=>{this.list.length<2||(this.dialog||this.createDialog(),this.listBox&&s.Dom.detach(this.listBox),this.previewBox&&s.Dom.detach(this.previewBox),this.list.forEach((e,t)=>{let i=this.j.c.element("a");i.textContent=t+1+". "+e.replace((0,n.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&&s.Dom.append(this.listBox,i)}),this.dialog&&this.dialog.open(),this.j.async.setTimeout(()=>{this.selectIndex(0)},100))})}}r.pluginSystem.add("pasteStorage",u)},38187:function(e,t,i){"use strict";var o=i(81937),n=i(5266),s=i(54308);n.Config.prototype.askBeforePasteHTML=!0,n.Config.prototype.processPasteHTML=!0,n.Config.prototype.scrollToPastedContent=!0,n.Config.prototype.pasteExcludeStripTags=["br","hr"],n.Config.prototype.pasteHTMLActionList=[{value:o.INSERT_AS_HTML,text:"Keep"},{value:o.INSERT_AS_TEXT,text:"Insert as Text"},{value:o.INSERT_ONLY_TEXT,text:"Insert only Text"}],n.Config.prototype.memorizeChoiceWhenPasteFragment=!1,n.Config.prototype.nl2brInPlainText=!0;let r="pasteStorage";n.Config.prototype.controls.paste={tooltip:"Paste from clipboard",async exec(e,t,{control:i}){if(i.name===r)return void e.execCommand("showPasteStorage");e.s.focus();let n="",a=!0;if(navigator.clipboard){try{let e=await navigator.clipboard.read();if(e&&e.length){let t=e[0],i=t.types?.includes(o.TEXT_HTML)?o.TEXT_HTML:o.TEXT_PLAIN,s=await t.getType(i);n=await new Response(s).text()}a=!1}catch(e){o.IS_PROD}if(a)try{n=await navigator.clipboard.readText(),a=!1}catch(e){o.IS_PROD}}a&&(a=0===(n=e.buffer.get(o.CLIPBOARD_ID)||"").length);let l=e.value;a?(e.ed.execCommand("paste"),(a=l===e.value)||e.e.fire("afterPaste")):n.length?((0,s.pasteInsertHtml)(null,e,n),e.e.fire("afterPaste")):a&&e.alert("Your browser doesn't support direct access to the clipboard.",()=>void e.s.focus())},list:{[r]:"Paste Storage"},isChildDisabled:e=>2>e.e.fire("pasteStorageList")}},54308:function(e,t,i){"use strict";i.d(t,{askInsertTypeDialog:function(){return c},getAllTypes:function(){return l},pasteInsertHtml:function(){return a}});var o=i(81937),n=i(23211),s=i(28686),r=i(53681);function a(e,t,i){var o;let r,a;if(t.isInDestruct)return;e&&"drop"===e.type&&t.s.insertCursorAtPoint(e.clientX,e.clientY);let l=t.e.fire("beforePasteInsert",i);!(0,s.isVoid)(l)&&((0,s.isString)(l)||(0,s.isNumber)(l)||n.Dom.isNode(l))&&(i=l),(0,s.isString)(i)&&(-1!==(r=(o=(o=i).replace(/<meta[^>]+?>/g,"")).search(/<!--StartFragment-->/i))&&(o=o.substring(r+20)),-1!==(a=o.search(/<!--EndFragment-->/i))&&(o=o.substring(0,a)),i=o),t.s.insertHTML(i)}function l(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||o.TEXT_PLAIN).toString()+";";return i}function c(e,t,i,o,n){if(!1===e.e.fire("beforeOpenPasteDialog",t,i,o,n))return;let s=e.confirm(`<div style="word-break: normal; white-space: normal">${e.i18n(t)}</div>`,e.i18n(i)),a=n.map(({text:t,value:i})=>(0,r.Button)(e,{text:t,name:t.toLowerCase(),tabIndex:0}).onAction(()=>{s.close(),o(i)}));s.e.on(s,"beforeClose",()=>{e.e.fire("beforeClosePasteDialog",s)}).one(s,"afterClose",()=>{e.s.isFocused()||e.s.focus(),e.e.fire("afterClosePasteDialog",s)});let l=(0,r.Button)(e,{text:"Cancel",tabIndex:0}).onAction(()=>{s.close()});return s.setFooter([...a,l]),a[0].focus(),a[0].state.variant="primary",e.e.fire("afterOpenPasteDialog",s,t,i,o,n),s}},23422:function(e,t,i){"use strict";var o=i(25045),n=i(31635),s=i(81937),r=i(84839),a=i(23211),l=i(28077),c=i(65946),u=i(18855);i(38187);var h=i(54308);class d extends u.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,c.getDataTransfer)(e),i=[t?.getData(s.TEXT_PLAIN),t?.getData(s.TEXT_HTML),t?.getData(s.TEXT_RTF)];for(let t of i)if((0,c.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,c.getDataTransfer)(e),i=t?.getData(s.TEXT_HTML)||t?.getData(s.TEXT_PLAIN);if(t&&i&&""!==(0,c.trim)(i)){let o=this.j.e.fire("processPaste",e,i,(0,h.getAllTypes)(t));void 0!==o&&(i=o),((0,c.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,h.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,c.isString)(t))switch(this.j.buffer.set(s.CLIPBOARD_ID,t),i){case s.INSERT_CLEAR_HTML:t=(0,c.cleanFromWord)(t);break;case s.INSERT_ONLY_TEXT:t=(0,c.stripTags)(t,this.j.ed,new Set(this.j.o.pasteExcludeStripTags),this.j.o.nl2brInPlainText);break;case s.INSERT_AS_TEXT:t=(0,c.htmlspecialchars)(t),this.j.o.nl2brInPlainText&&(t=(0,c.nl2br)(t));break;default:{let o=this.j.e.fire("onCustomPasteHTMLOption",i,t,e);"string"==typeof o&&(t=o)}}(0,h.pasteInsertHtml)(e,this.j,t)}onProcessPasteReplaceNl2Br(e,t,i){if(i===s.TEXT_PLAIN+";"&&!(0,c.isHTML)(t)){let e=(0,c.htmlspecialchars)(t);return this.j.o.nl2brInPlainText?(0,c.nl2br)(e):e}}constructor(...e){super(...e),(0,o._)(this,"pasteStack",new c.LimitedStack(20)),(0,o._)(this,"_isDialogOpened",!1)}}(0,n.__decorate)([r.autobind],d.prototype,"onPaste",null),(0,n.__decorate)([r.autobind],d.prototype,"onProcessPasteReplaceNl2Br",null),l.pluginSystem.add("paste",d)},8257:function(e,t,i){"use strict";var o=i(5266);o.Config.prototype.showPlaceholder=!0,o.Config.prototype.placeholder="Type something",o.Config.prototype.useInputsPlaceholder=!0},28346:function(e,t,i){"use strict";var o=i(25045),n=i(31635),s=i(81937),r=i(84839),a=i(23211),l=i(28077),c=i(23175),u=i(7909),h=i(80991),d=i(18855);i(8257);class f extends d.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,o=e.s.current(),n=o&&a.Dom.closest(o,a.Dom.isBlock,e.editor)||e.editor,s=e.ew.getComputedStyle(n),r=e.ew.getComputedStyle(e.editor);a.Dom.append(e.workplace,this.placeholderElm);let{firstChild:l}=e.editor;if(a.Dom.isElement(l)&&!(0,c.isMarker)(l)){let o=e.ew.getComputedStyle(l);t=parseInt(o.getPropertyValue("margin-top"),10),i=parseInt(o.getPropertyValue("margin-left"),10),(0,h.css)(this.placeholderElm,{fontSize:parseInt(o.getPropertyValue("font-size"),10),lineHeight:o.getPropertyValue("line-height")})}else(0,h.css)(this.placeholderElm,{fontSize:parseInt(s.getPropertyValue("font-size"),10),lineHeight:s.getPropertyValue("line-height")});(0,h.css)(this.placeholderElm,{display:"block",textAlign:s.getPropertyValue("text-align"),paddingTop:parseInt(r.paddingTop,10)+"px",paddingLeft:parseInt(r.paddingLeft,10)+"px",paddingRight:parseInt(r.paddingRight,10)+"px",marginTop:Math.max(parseInt(s.getPropertyValue("margin-top"),10),t),marginLeft:Math.max(parseInt(s.getPropertyValue("margin-left"),10),i)})}hide(){a.Dom.safeRemove(this.placeholderElm)}toggle(){let e=this.j;if(e.editor&&!e.isInDestruct){if(e.getRealMode()!==s.MODE_WYSIWYG)return void this.hide();!function(e){if(!e.firstChild)return!0;let t=e.firstChild;if(s.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")))}(e.editor)?this.hide():this.show()}}beforeDestruct(e){this.hide(),e.e.off(".placeholder").off(window,"load",this.toggle)}constructor(...e){super(...e),(0,o._)(this,"placeholderElm",void 0),(0,o._)(this,"addNativeListeners",()=>{this.j.e.off(this.j.editor,"input.placeholder keydown.placeholder").on(this.j.editor,"input.placeholder keydown.placeholder",this.toggle)}),(0,o._)(this,"addEvents",()=>{let e=this.j;e.o.useInputsPlaceholder&&e.element.hasAttribute("placeholder")&&(this.placeholderElm.innerHTML=(0,u.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",this.toggle).on(window,"load",this.toggle),this.addNativeListeners(),this.toggle()})}}(0,n.__decorate)([(0,r.debounce)(e=>e.defaultTimeout/10,!0)],f.prototype,"toggle",null),l.pluginSystem.add("placeholder",f)},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
224
224
  tabindex="-1"
225
225
  style="text-transform: uppercase"
226
226
  class="jodit-status-bar-link"
@@ -232,13 +232,13 @@
232
232
  body {
233
233
  -webkit-print-color-adjust: exact;
234
234
  }
235
- }`,n.Dom.append(o.document.head,t),o.focus(),o.print()}},mode:o.MODE_SOURCE+o.MODE_WYSIWYG,tooltip:"Print"},s.pluginSystem.add("print",function(e){e.registerButton({name:"print"})})},59758:function(e,t,i){"use strict";var o=i(25045),n=i(81937),s=i(28077),r=i(18855),a=i(29434),l=i(5266),c=i(34045),u=i.n(c),h=i(39199),d=i.n(h);a.Icon.set("redo",u()).set("undo",d()),l.Config.prototype.controls.redo={mode:n.MODE_SPLIT,isDisabled:e=>!e.history.canRedo(),tooltip:"Redo"},l.Config.prototype.controls.undo={mode:n.MODE_SPLIT,isDisabled:e=>!e.history.canUndo(),tooltip:"Undo"};class p extends r.Plugin{beforeDestruct(){}afterInit(e){let t=t=>(e.history[t](),!1);e.registerCommand("redo",{exec:t,hotkeys:["ctrl+y","ctrl+shift+z","cmd+y","cmd+shift+z"]}),e.registerCommand("undo",{exec:t,hotkeys:["ctrl+z","cmd+z"]})}constructor(...e){super(...e),(0,o._)(this,"buttons",[{name:"undo",group:"history"},{name:"redo",group:"history"}])}}s.pluginSystem.add("redoUndo",p)},51822:function(e,t,i){"use strict";i(5266).Config.prototype.tableAllowCellResize=!0},14248:function(e,t,i){"use strict";var o=i(25045),n=i(31635),s=i(81937),r=i(84839),a=i(23211),l=i(28077),c=i(65946),u=i(80991),h=i(60936);i(51822);let d="table_processor_observer-resize";class p extends h.Plugin{get module(){return this.j.getInstance("Table",this.j.o)}get isRTL(){return"rtl"===this.j.o.direction}showResizeHandle(){this.j.async.clearTimeout(this.hideTimeout),a.Dom.append(this.j.workplace,this.resizeHandler)}hideResizeHandle(){this.hideTimeout=this.j.async.setTimeout(()=>{a.Dom.safeRemove(this.resizeHandler)},{timeout:this.j.defaultTimeout,label:"hideResizer"})}onHandleMouseDown(e){let t;if(!this.j.isLocked){if(this.drag=!0,this.j.e.on(this.j.ow,"mouseup.resize-cells touchend.resize-cells",this.onMouseUp).on(this.j.ew,"mousemove.table touchmove.table",this.onMouseMove),this.startX=e.clientX,this.j.lock(d),this.resizeHandler.classList.add("jodit-table-resizer_moved"),this.minX=0,this.maxX=1e6,null!=this.wholeTable){let e=this.workTable.parentNode.getBoundingClientRect();this.minX=e.left,this.maxX=this.minX+e.width}else{let e=this.module.formalCoordinate(this.workTable,this.workCell,!0);this.module.formalMatrix(this.workTable,(i,o,n)=>{e[1]===n&&(t=i.getBoundingClientRect(),this.minX=Math.max(t.left+s.NEARBY/2,this.minX)),e[1]+(this.isRTL?-1:1)===n&&(t=i.getBoundingClientRect(),this.maxX=Math.min(t.left+t.width-s.NEARBY/2,this.maxX))})}return!1}}onMouseMove(e){if(!this.drag)return;this.j.e.fire("closeAllPopups");let t=e.clientX,i=(0,c.offset)(this.resizeHandler.parentNode||this.j.od.documentElement,this.j,this.j.od,!0);t<this.minX&&(t=this.minX),t>this.maxX&&(t=this.maxX),this.resizeDelta=t-this.startX+(this.j.o.iframe?i.left:0),(0,u.css)(this.resizeHandler,"left",t-(this.j.o.iframe?0:i.left)+"px");let o=this.j.s.sel;o&&o.removeAllRanges()}onMouseUp(e){(this.selectMode||this.drag)&&(this.selectMode=!1,this.j.unlock()),this.resizeHandler&&this.drag&&(this.drag=!1,this.j.e.off(this.j.ew,"mousemove.table touchmove.table",this.onMouseMove),this.resizeHandler.classList.remove("jodit-table-resizer_moved"),this.startX!==e.clientX&&(null==this.wholeTable?this.resizeColumns():this.resizeTable()),this.j.synchronizeValues(),this.j.s.focus())}resizeColumns(){let e=this.resizeDelta,t=[],i=this.module;i.setColumnWidthByDelta(this.workTable,i.formalCoordinate(this.workTable,this.workCell,!0)[1],e,!0,t);let o=(0,c.call)(this.isRTL?a.Dom.prev:a.Dom.next,this.workCell,a.Dom.isCell,this.workCell.parentNode);i.setColumnWidthByDelta(this.workTable,i.formalCoordinate(this.workTable,o)[1],-e,!1,t)}resizeTable(){let e=this.resizeDelta*(this.isRTL?-1:1),t=this.workTable.offsetWidth,i=(0,c.getContentWidth)(this.workTable.parentNode,this.j.ew),o=!this.wholeTable;if(this.isRTL?!o:o)(0,u.css)(this.workTable,"width",(t+e)/i*100+"%");else{let o=this.isRTL?"marginRight":"marginLeft",n=parseInt(this.j.ew.getComputedStyle(this.workTable)[o]||"0",10);(0,u.css)(this.workTable,{width:(t-e)/i*100+"%",[o]:(n+e)/i*100+"%"})}}setWorkCell(e,t=null){this.wholeTable=t,this.workCell=e,this.workTable=a.Dom.up(e,e=>a.Dom.isTag(e,"table"),this.j.editor)}calcHandlePosition(e,t,i=0,o=0){let n=(0,c.offset)(t,this.j,this.j.ed);if(i>s.NEARBY&&i<n.width-s.NEARBY)return void this.hideResizeHandle();let r=(0,c.offset)(this.j.workplace,this.j,this.j.od,!0),l=(0,c.offset)(e,this.j,this.j.ed);if((0,u.css)(this.resizeHandler,"left",(i<=s.NEARBY?n.left:n.left+n.width)-r.left+o+"px"),Object.assign(this.resizeHandler.style,{height:l.height+"px",top:l.top-r.top+"px"}),this.showResizeHandle(),i<=s.NEARBY){let e=(0,c.call)(this.isRTL?a.Dom.next:a.Dom.prev,t,a.Dom.isCell,t.parentNode);this.setWorkCell(e||t,!e||null)}else{let e=(0,c.call)(this.isRTL?a.Dom.prev:a.Dom.next,t,a.Dom.isCell,t.parentNode);this.setWorkCell(t,!!e&&null)}}afterInit(e){e.o.tableAllowCellResize&&e.e.off(this.j.ow,".resize-cells").off(".resize-cells").on("change.resize-cells afterCommand.resize-cells afterSetMode.resize-cells",()=>{(0,c.$$)("table",e.editor).forEach(this.observe)}).on(this.j.ow,"scroll.resize-cells",()=>{if(!this.drag)return;let t=a.Dom.up(this.workCell,e=>a.Dom.isTag(e,"table"),e.editor);if(t){let e=t.getBoundingClientRect();(0,u.css)(this.resizeHandler,"top",e.top+"px")}}).on("beforeSetMode.resize-cells",()=>{let t=this.module;t.getAllSelectedCells().forEach(i=>{t.removeSelection(i),t.normalizeTable(a.Dom.closest(i,"table",e.editor))})})}observe(e){(0,c.dataBind)(e,d)||((0,c.dataBind)(e,d,!0),this.j.e.on(e,"mouseleave.resize-cells",e=>{this.resizeHandler&&this.resizeHandler!==e.relatedTarget&&this.hideResizeHandle()}).on(e,"mousemove.resize-cells touchmove.resize-cells",this.j.async.throttle(t=>{if(this.j.isLocked)return;let i=a.Dom.up(t.target,a.Dom.isCell,e);i&&this.calcHandlePosition(e,i,t.offsetX)},{timeout:this.j.defaultTimeout})),this.createResizeHandle())}beforeDestruct(e){e.events&&(e.e.off(this.j.ow,".resize-cells"),e.e.off(".resize-cells"))}constructor(...e){super(...e),(0,o._)(this,"selectMode",!1),(0,o._)(this,"resizeDelta",0),(0,o._)(this,"resizeHandler",void 0),(0,o._)(this,"createResizeHandle",()=>{this.resizeHandler||(this.resizeHandler=this.j.c.div("jodit-table-resizer"),this.j.e.on(this.resizeHandler,"mousedown.table touchstart.table",this.onHandleMouseDown).on(this.resizeHandler,"mouseenter.table",()=>{this.j.async.clearTimeout(this.hideTimeout)}))}),(0,o._)(this,"hideTimeout",0),(0,o._)(this,"drag",!1),(0,o._)(this,"wholeTable",void 0),(0,o._)(this,"workCell",void 0),(0,o._)(this,"workTable",void 0),(0,o._)(this,"minX",0),(0,o._)(this,"maxX",0),(0,o._)(this,"startX",0)}}(0,n.__decorate)([r.autobind],p.prototype,"onHandleMouseDown",null),(0,n.__decorate)([r.autobind],p.prototype,"onMouseMove",null),(0,n.__decorate)([r.autobind],p.prototype,"onMouseUp",null),(0,n.__decorate)([r.autobind],p.prototype,"observe",null),l.pluginSystem.add("resizeCells",p)},58293:function(e,t,i){"use strict";var o=i(5266);o.Config.prototype.allowResizeX=!1,o.Config.prototype.allowResizeY=!0},72214:function(e,t,i){"use strict";var o=i(25045),n=i(31635),s=i(84839),r=i(27795),a=i(28077),l=i(65946),c=i(80991),u=i(91206),h=i(4099);i(58293);class d extends u.Plugin{afterInit(e){let{height:t,width:i,allowResizeX:o}=e.o,{allowResizeY:n}=e.o;"auto"===t&&"auto"!==i&&(n=!1),("auto"!==t||"auto"!==i)&&(o||n)&&(e.statusbar.setMod("resize-handle",!0),e.statusbar.show(),e.e.on("toggleFullSize.resizeHandler",()=>{(0,c.css)(this.handle,"display",e.isFullSize?"none":"block")}).on(this.handle,"mousedown touchstart",this.onHandleResizeStart).on(e.ow,"mouseup touchend",this.onHandleResizeEnd),r.Dom.append(e.container,this.handle))}onHandleResizeStart(e){this.isResized=!0,this.start.x=e.clientX,this.start.y=e.clientY,this.start.w=this.j.container.offsetWidth,this.start.h=this.j.container.offsetHeight,this.j.lock(),this.j.e.on(this.j.ow,"mousemove touchmove",this.onHandleResize),e.preventDefault()}onHandleResize(e){if(!this.isResized)return;let{clientX:t,clientY:i}=e;if(e.view===this.j.ew&&this.j.ew!==this.j.ow){let e=(0,l.offset)(this.j.workplace,this.j,this.j.od,!0);t+=e.left,i+=e.top}this.j.o.allowResizeY&&this.j.e.fire("setHeight",this.start.h+i-this.start.y),this.j.o.allowResizeX&&this.j.e.fire("setWidth",this.start.w+t-this.start.x),this.j.e.fire("resize")}onHandleResizeEnd(){this.isResized&&(this.isResized=!1,this.j.e.off(this.j.ow,"mousemove touchmove",this.onHandleResize),this.j.unlock())}beforeDestruct(){r.Dom.safeRemove(this.handle),this.j.e.off(this.j.ow,"mouseup touchsend",this.onHandleResizeEnd)}constructor(...e){super(...e),(0,o._)(this,"isResized",!1),(0,o._)(this,"start",{x:0,y:0,w:0,h:0}),(0,o._)(this,"handle",this.j.c.div("jodit-editor__resize",h.Icon.get("resize_handler")))}}(0,o._)(d,"requires",["size"]),(0,n.__decorate)([s.autobind],d.prototype,"onHandleResizeStart",null),(0,n.__decorate)([s.autobind],d.prototype,"onHandleResize",null),(0,n.__decorate)([s.autobind],d.prototype,"onHandleResizeEnd",null),a.pluginSystem.add("resizeHandler",d)},96608:function(e,t,i){"use strict";var o=i(5266);o.Config.prototype.allowResizeTags=new Set(["img","iframe","table","jodit"]),o.Config.prototype.resizer={showSize:!0,hideSizeTimeout:1e3,forImageChangeAttributes:!0,min_width:10,min_height:10,useAspectRatio:new Set(["img"])}},74522:function(e,t,i){"use strict";var o=i(25045),n=i(31635),s=i(81937),r=i(84839),a=i(23211),l=i(28077),c=i(65946),u=i(80991),h=i(18855);i(96608);let d="__jodit-resizer_binded";function p(e,t){let i=(0,c.attr)(e,t)?.trim();return i&&/^\d+(\.\d+)?(px)?$/i.test(i)?parseFloat(i):0}class f extends h.Plugin{afterInit(e){(0,c.$$)("div",this.rect).forEach(t=>{e.e.on(t,"mousedown.resizer touchstart.resizer",this.onStartResizing.bind(this,t))}),l.eventEmitter.on("hideHelpers",this.hide),e.e.on("readonly",e=>{e&&this.hide()}).on("afterInit changePlace",this.addEventListeners.bind(this)).on("afterGetValueFromEditor.resizer",e=>{let t=/<jodit[^>]+data-jodit_iframe_wrapper[^>]+>(.*?<iframe[^>]*>.*?<\/iframe>.*?)<\/jodit>/gi;t.test(e.value)&&(e.value=e.value.replace(t,"$1"))}),this.addEventListeners(),this.__onChangeEditor()}onEditorClick(e){let t=e.target,{editor:i,options:{allowResizeTags:o}}=this.j;for(;t&&t!==i;){if(a.Dom.isTag(t,o)){this.__bind(t),this.onClickElement(t);return}t=t.parentNode}}__afterInsertImage(e){if(this.j.o.resizer.forImageChangeAttributes)return;let t=(0,c.attr)(e,"width");t&&!(0,u.cssInline)(e,"width")&&((0,c.css)(e,"width",t),(0,c.attr)(e,"width",null))}addEventListeners(){let e=this.j;e.e.off(e.editor,".resizer").off(e.ow,".resizer").on(e.editor,"keydown.resizer",e=>{this.isShown&&e.key===s.KEY_DELETE&&this.element&&!a.Dom.isTag(this.element,"table")&&this.onDelete(e)}).on(e.ow,"resize.resizer",this.updateSize).on("resize.resizer",this.updateSize).on([e.ow,e.editor],"scroll.resizer",()=>{this.isShown&&!this.isResizeMode&&this.hide()}).on(e.ow,"keydown.resizer",this.onKeyDown).on(e.ow,"keyup.resizer",this.onKeyUp).on(e.ow,"mouseup.resizer touchend.resizer",this.onClickOutside)}onStartResizing(e,t){if(!this.element||!this.element.parentNode)return this.hide(),!1;this.handle=e,t.cancelable&&t.preventDefault(),t.stopImmediatePropagation(),this.width=this.element.offsetWidth,this.height=this.element.offsetHeight,this.ratio=this.width/this.height,this.isResizeMode=!0,this.startX=t.clientX,this.startY=t.clientY,this.pointerX=t.clientX,this.pointerY=t.clientY;let{j:i}=this;i.e.fire("hidePopup"),i.lock(this.LOCK_KEY),i.e.on(i.ow,"mousemove.resizer touchmove.resizer",this.onResize)}onEndResizing(){let{j:e}=this;e.unlock(),this.isResizeMode=!1,this.isAltMode=!1,e.synchronizeValues(),e.e.off(e.ow,"mousemove.resizer touchmove.resizer",this.onResize)}onResize(e){if(this.isResizeMode){let t,i,o,n;if(!this.element)return;if(this.pointerX=e.clientX,this.pointerY=e.clientY,this.j.options.iframe&&e.view===this.j.ew){let o=this.getWorkplacePosition();t=e.clientX+o.left-this.startX,i=e.clientY+o.top-this.startY}else t=this.pointerX-this.startX,i=this.pointerY-this.startY;let s=this.handle.className,r=this.j.o.resizer.useAspectRatio;!this.isAltMode&&(!0===r||r&&a.Dom.isTag(this.element,r))?(t?n=Math.round((o=this.width+(s.match(/left/)?-1:1)*t)/this.ratio):o=Math.round((n=this.height+(s.match(/top/)?-1:1)*i)*this.ratio),o>(0,c.innerWidth)(this.j.editor,this.j.ow)&&(n=Math.round((o=(0,c.innerWidth)(this.j.editor,this.j.ow))/this.ratio))):(o=this.width+(s.match(/left/)?-1:1)*t,n=this.height+(s.match(/top/)?-1:1)*i),o>this.j.o.resizer.min_width&&(o<this.rect.parentNode.offsetWidth?this.applySize(this.element,"width",o):this.applySize(this.element,"width","100%")),n>this.j.o.resizer.min_height&&this.applySize(this.element,"height",n),this.updateSize(),this.showSizeViewer(this.element.offsetWidth,this.element.offsetHeight),e.stopImmediatePropagation()}}onKeyDown(e){this.isAltMode=e.key===s.KEY_ALT,!this.isAltMode&&this.isResizeMode&&this.onEndResizing()}onKeyUp(){this.isAltMode&&this.isResizeMode&&this.element&&(this.width=this.element.offsetWidth,this.height=this.element.offsetHeight,this.ratio=this.width/this.height,this.startX=this.pointerX,this.startY=this.pointerY),this.isAltMode=!1}onClickOutside(e){if(this.isShown){if(!this.isResizeMode)return this.hide();e.stopImmediatePropagation(),this.onEndResizing()}}getWorkplacePosition(){return(0,c.offset)(this.rect.parentNode||this.j.od.documentElement,this.j,this.j.od,!0)}applySize(e,t,i){let o=a.Dom.isImage(e)&&this.j.o.resizer.forImageChangeAttributes;o&&(0,c.attr)(e,t,i),(!o||(0,u.cssInline)(e,t))&&(0,c.css)(e,t,i)}onDelete(e){this.element&&("JODIT"!==this.element.tagName?this.j.s.select(this.element):(a.Dom.safeRemove(this.element),this.hide(),e.preventDefault()))}__onChangeEditor(){this.isShown&&(this.element&&this.element.parentNode?this.updateSize():this.hide()),(0,c.$$)("iframe",this.j.editor).forEach(this.__bind)}__bind(e){let t;if(!(!a.Dom.isHTMLElement(e)||!this.j.o.allowResizeTags.has(e.tagName.toLowerCase())||(0,c.dataBind)(e,d))){if((0,c.dataBind)(e,d,!0),a.Dom.isTag(e,"iframe")){let i=e;if(a.Dom.isHTMLElement(e.parentNode)&&(0,c.attr)(e.parentNode,"-jodit_iframe_wrapper"))e=e.parentNode;else{t=this.j.createInside.element("jodit",{"data-jodit-temp":1,contenteditable:!1,draggable:!0,"data-jodit_iframe_wrapper":1}),(0,c.attr)(t,"style",(0,c.attr)(e,"style"));let i=e.offsetWidth||p(e,"width"),o=e.offsetHeight||p(e,"height");(0,c.css)(t,{display:"inline-block"===(0,u.cssInline)(e,"display")?"inline-block":"block"}),i&&(0,c.css)(t,"width",i),o&&(0,c.css)(t,"height",o),e.parentNode&&a.Dom.before(e,t),a.Dom.append(t,e),this.j.e.on(t,"click",()=>{(0,c.attr)(t,"data-jodit-wrapper_active",!0)}),e=t}this.j.e.off(e,"mousedown.select touchstart.select").on(e,"mousedown.select touchstart.select",()=>{this.j.s.select(e)}).off(e,"changesize").on(e,"changesize",()=>{(0,c.attr)(i,"width",e.offsetWidth+"px"),(0,c.attr)(i,"height",e.offsetHeight+"px")})}this.j.e.on(e,"dragstart",this.hide),!s.IS_ES_NEXT&&s.IS_IE&&this.j.e.on(e,"mousedown",t=>{a.Dom.isTag(e,"img")&&t.preventDefault()})}}showSizeViewer(e,t){if(this.j.o.resizer.showSize){if(e<this.sizeViewer.offsetWidth||t<this.sizeViewer.offsetHeight)return void this.hideSizeViewer();(0,c.css)(this.sizeViewer,"opacity","1"),this.sizeViewer.textContent=`${e} x ${t}`,this.j.async.setTimeout(this.hideSizeViewer,{timeout:this.j.o.resizer.hideSizeTimeout,label:"hideSizeViewer"})}}show(){this.j.o.readonly||this.isShown||(this.isShown=!0,this.rect.parentNode||((0,c.markOwner)(this.j,this.rect),a.Dom.append(this.j.workplace,this.rect)),this.j.isFullSize&&(0,c.css)(this.rect,"zIndex",(0,c.css)(this.j.container,"zIndex").toString()),this.updateSize())}hide(){this.isResizeMode||(this.isResizeMode=!1,this.isShown=!1,this.element=null,a.Dom.safeRemove(this.rect),(0,c.$$)("[data-jodit-wrapper_active='true']",this.j.editor).forEach(e=>(0,c.attr)(e,"data-jodit-wrapper_active",!1)))}beforeDestruct(e){this.hide(),l.eventEmitter.off("hideHelpers",this.hide),e.e.off(this.j.ow,".resizer").off(".resizer")}constructor(...e){super(...e),(0,o._)(this,"LOCK_KEY","resizer"),(0,o._)(this,"handle",void 0),(0,o._)(this,"element",null),(0,o._)(this,"isResizeMode",!1),(0,o._)(this,"isShown",!1),(0,o._)(this,"startX",0),(0,o._)(this,"startY",0),(0,o._)(this,"width",0),(0,o._)(this,"height",0),(0,o._)(this,"ratio",0),(0,o._)(this,"rect",this.j.c.fromHTML(`<div title="${this.j.i18n("Press Alt for custom resizing")}" class="jodit-resizer">
235
+ }`,n.Dom.append(o.document.head,t),o.focus(),o.print()}},mode:o.MODE_SOURCE+o.MODE_WYSIWYG,tooltip:"Print"},s.pluginSystem.add("print",function(e){e.registerButton({name:"print"})})},59758:function(e,t,i){"use strict";var o=i(25045),n=i(81937),s=i(28077),r=i(18855),a=i(29434),l=i(5266),c=i(34045),u=i.n(c),h=i(39199),d=i.n(h);a.Icon.set("redo",u()).set("undo",d()),l.Config.prototype.controls.redo={mode:n.MODE_SPLIT,isDisabled:e=>!e.history.canRedo(),tooltip:"Redo"},l.Config.prototype.controls.undo={mode:n.MODE_SPLIT,isDisabled:e=>!e.history.canUndo(),tooltip:"Undo"};class f extends r.Plugin{beforeDestruct(){}afterInit(e){let t=t=>(e.history[t](),!1);e.registerCommand("redo",{exec:t,hotkeys:["ctrl+y","ctrl+shift+z","cmd+y","cmd+shift+z"]}),e.registerCommand("undo",{exec:t,hotkeys:["ctrl+z","cmd+z"]})}constructor(...e){super(...e),(0,o._)(this,"buttons",[{name:"undo",group:"history"},{name:"redo",group:"history"}])}}s.pluginSystem.add("redoUndo",f)},51822:function(e,t,i){"use strict";i(5266).Config.prototype.tableAllowCellResize=!0},14248:function(e,t,i){"use strict";var o=i(25045),n=i(31635),s=i(81937),r=i(84839),a=i(23211),l=i(28077),c=i(65946),u=i(80991),h=i(60936);i(51822);let d="table_processor_observer-resize";class f extends h.Plugin{get module(){return this.j.getInstance("Table",this.j.o)}get isRTL(){return"rtl"===this.j.o.direction}showResizeHandle(){this.j.async.clearTimeout(this.hideTimeout),a.Dom.append(this.j.workplace,this.resizeHandler)}hideResizeHandle(){this.hideTimeout=this.j.async.setTimeout(()=>{a.Dom.safeRemove(this.resizeHandler)},{timeout:this.j.defaultTimeout,label:"hideResizer"})}onHandleMouseDown(e){let t;if(!this.j.isLocked){if(this.drag=!0,this.j.e.on(this.j.ow,"mouseup.resize-cells touchend.resize-cells",this.onMouseUp).on(this.j.ew,"mousemove.table touchmove.table",this.onMouseMove),this.startX=e.clientX,this.j.lock(d),this.resizeHandler.classList.add("jodit-table-resizer_moved"),this.minX=0,this.maxX=1e6,null!=this.wholeTable){let e=this.workTable.parentNode.getBoundingClientRect();this.minX=e.left,this.maxX=this.minX+e.width}else{let e=this.module.formalCoordinate(this.workTable,this.workCell,!0);this.module.formalMatrix(this.workTable,(i,o,n)=>{e[1]===n&&(t=i.getBoundingClientRect(),this.minX=Math.max(t.left+s.NEARBY/2,this.minX)),e[1]+(this.isRTL?-1:1)===n&&(t=i.getBoundingClientRect(),this.maxX=Math.min(t.left+t.width-s.NEARBY/2,this.maxX))})}return!1}}onMouseMove(e){if(!this.drag)return;this.j.e.fire("closeAllPopups");let t=e.clientX,i=(0,c.offset)(this.resizeHandler.parentNode||this.j.od.documentElement,this.j,this.j.od,!0);t<this.minX&&(t=this.minX),t>this.maxX&&(t=this.maxX),this.resizeDelta=t-this.startX+(this.j.o.iframe?i.left:0),(0,u.css)(this.resizeHandler,"left",t-(this.j.o.iframe?0:i.left)+"px");let o=this.j.s.sel;o&&o.removeAllRanges()}onMouseUp(e){(this.selectMode||this.drag)&&(this.selectMode=!1,this.j.unlock()),this.resizeHandler&&this.drag&&(this.drag=!1,this.j.e.off(this.j.ew,"mousemove.table touchmove.table",this.onMouseMove),this.resizeHandler.classList.remove("jodit-table-resizer_moved"),this.startX!==e.clientX&&(null==this.wholeTable?this.resizeColumns():this.resizeTable()),this.j.synchronizeValues(),this.j.s.focus())}resizeColumns(){let e=this.resizeDelta,t=[],i=this.module;i.setColumnWidthByDelta(this.workTable,i.formalCoordinate(this.workTable,this.workCell,!0)[1],e,!0,t);let o=(0,c.call)(this.isRTL?a.Dom.prev:a.Dom.next,this.workCell,a.Dom.isCell,this.workCell.parentNode);i.setColumnWidthByDelta(this.workTable,i.formalCoordinate(this.workTable,o)[1],-e,!1,t)}resizeTable(){let e=this.resizeDelta*(this.isRTL?-1:1),t=this.workTable.offsetWidth,i=(0,c.getContentWidth)(this.workTable.parentNode,this.j.ew),o=!this.wholeTable;if(this.isRTL?!o:o)(0,u.css)(this.workTable,"width",(t+e)/i*100+"%");else{let o=this.isRTL?"marginRight":"marginLeft",n=parseInt(this.j.ew.getComputedStyle(this.workTable)[o]||"0",10);(0,u.css)(this.workTable,{width:(t-e)/i*100+"%",[o]:(n+e)/i*100+"%"})}}setWorkCell(e,t=null){this.wholeTable=t,this.workCell=e,this.workTable=a.Dom.up(e,e=>a.Dom.isTag(e,"table"),this.j.editor)}calcHandlePosition(e,t,i=0,o=0){let n=(0,c.offset)(t,this.j,this.j.ed);if(i>s.NEARBY&&i<n.width-s.NEARBY)return void this.hideResizeHandle();let r=(0,c.offset)(this.j.workplace,this.j,this.j.od,!0),l=(0,c.offset)(e,this.j,this.j.ed);if((0,u.css)(this.resizeHandler,"left",(i<=s.NEARBY?n.left:n.left+n.width)-r.left+o+"px"),Object.assign(this.resizeHandler.style,{height:l.height+"px",top:l.top-r.top+"px"}),this.showResizeHandle(),i<=s.NEARBY){let e=(0,c.call)(this.isRTL?a.Dom.next:a.Dom.prev,t,a.Dom.isCell,t.parentNode);this.setWorkCell(e||t,!e||null)}else{let e=(0,c.call)(this.isRTL?a.Dom.prev:a.Dom.next,t,a.Dom.isCell,t.parentNode);this.setWorkCell(t,!!e&&null)}}afterInit(e){e.o.tableAllowCellResize&&e.e.off(this.j.ow,".resize-cells").off(".resize-cells").on("change.resize-cells afterCommand.resize-cells afterSetMode.resize-cells",()=>{(0,c.$$)("table",e.editor).forEach(this.observe)}).on(this.j.ow,"scroll.resize-cells",()=>{if(!this.drag)return;let t=a.Dom.up(this.workCell,e=>a.Dom.isTag(e,"table"),e.editor);if(t){let e=t.getBoundingClientRect();(0,u.css)(this.resizeHandler,"top",e.top+"px")}}).on("beforeSetMode.resize-cells",()=>{let t=this.module;t.getAllSelectedCells().forEach(i=>{t.removeSelection(i),t.normalizeTable(a.Dom.closest(i,"table",e.editor))})})}observe(e){(0,c.dataBind)(e,d)||((0,c.dataBind)(e,d,!0),this.j.e.on(e,"mouseleave.resize-cells",e=>{this.resizeHandler&&this.resizeHandler!==e.relatedTarget&&this.hideResizeHandle()}).on(e,"mousemove.resize-cells touchmove.resize-cells",this.j.async.throttle(t=>{if(this.j.isLocked)return;let i=a.Dom.up(t.target,a.Dom.isCell,e);i&&this.calcHandlePosition(e,i,t.offsetX)},{timeout:this.j.defaultTimeout})),this.createResizeHandle())}beforeDestruct(e){e.events&&(e.e.off(this.j.ow,".resize-cells"),e.e.off(".resize-cells"))}constructor(...e){super(...e),(0,o._)(this,"selectMode",!1),(0,o._)(this,"resizeDelta",0),(0,o._)(this,"resizeHandler",void 0),(0,o._)(this,"createResizeHandle",()=>{this.resizeHandler||(this.resizeHandler=this.j.c.div("jodit-table-resizer"),this.j.e.on(this.resizeHandler,"mousedown.table touchstart.table",this.onHandleMouseDown).on(this.resizeHandler,"mouseenter.table",()=>{this.j.async.clearTimeout(this.hideTimeout)}))}),(0,o._)(this,"hideTimeout",0),(0,o._)(this,"drag",!1),(0,o._)(this,"wholeTable",void 0),(0,o._)(this,"workCell",void 0),(0,o._)(this,"workTable",void 0),(0,o._)(this,"minX",0),(0,o._)(this,"maxX",0),(0,o._)(this,"startX",0)}}(0,n.__decorate)([r.autobind],f.prototype,"onHandleMouseDown",null),(0,n.__decorate)([r.autobind],f.prototype,"onMouseMove",null),(0,n.__decorate)([r.autobind],f.prototype,"onMouseUp",null),(0,n.__decorate)([r.autobind],f.prototype,"observe",null),l.pluginSystem.add("resizeCells",f)},58293:function(e,t,i){"use strict";var o=i(5266);o.Config.prototype.allowResizeX=!1,o.Config.prototype.allowResizeY=!0},72214:function(e,t,i){"use strict";var o=i(25045),n=i(31635),s=i(84839),r=i(27795),a=i(28077),l=i(65946),c=i(80991),u=i(91206),h=i(4099);i(58293);class d extends u.Plugin{afterInit(e){let{height:t,width:i,allowResizeX:o}=e.o,{allowResizeY:n}=e.o;"auto"===t&&"auto"!==i&&(n=!1),("auto"!==t||"auto"!==i)&&(o||n)&&(e.statusbar.setMod("resize-handle",!0),e.statusbar.show(),e.e.on("toggleFullSize.resizeHandler",()=>{(0,c.css)(this.handle,"display",e.isFullSize?"none":"block")}).on(this.handle,"mousedown touchstart",this.onHandleResizeStart).on(e.ow,"mouseup touchend",this.onHandleResizeEnd),r.Dom.append(e.container,this.handle))}onHandleResizeStart(e){this.isResized=!0,this.start.x=e.clientX,this.start.y=e.clientY,this.start.w=this.j.container.offsetWidth,this.start.h=this.j.container.offsetHeight,this.j.lock(),this.j.e.on(this.j.ow,"mousemove touchmove",this.onHandleResize),e.preventDefault()}onHandleResize(e){if(!this.isResized)return;let{clientX:t,clientY:i}=e;if(e.view===this.j.ew&&this.j.ew!==this.j.ow){let e=(0,l.offset)(this.j.workplace,this.j,this.j.od,!0);t+=e.left,i+=e.top}this.j.o.allowResizeY&&this.j.e.fire("setHeight",this.start.h+i-this.start.y),this.j.o.allowResizeX&&this.j.e.fire("setWidth",this.start.w+t-this.start.x),this.j.e.fire("resize")}onHandleResizeEnd(){this.isResized&&(this.isResized=!1,this.j.e.off(this.j.ow,"mousemove touchmove",this.onHandleResize),this.j.unlock())}beforeDestruct(){r.Dom.safeRemove(this.handle),this.j.e.off(this.j.ow,"mouseup touchsend",this.onHandleResizeEnd)}constructor(...e){super(...e),(0,o._)(this,"isResized",!1),(0,o._)(this,"start",{x:0,y:0,w:0,h:0}),(0,o._)(this,"handle",this.j.c.div("jodit-editor__resize",h.Icon.get("resize_handler")))}}(0,o._)(d,"requires",["size"]),(0,n.__decorate)([s.autobind],d.prototype,"onHandleResizeStart",null),(0,n.__decorate)([s.autobind],d.prototype,"onHandleResize",null),(0,n.__decorate)([s.autobind],d.prototype,"onHandleResizeEnd",null),a.pluginSystem.add("resizeHandler",d)},96608:function(e,t,i){"use strict";var o=i(5266);o.Config.prototype.allowResizeTags=new Set(["img","iframe","table","jodit"]),o.Config.prototype.resizer={showSize:!0,hideSizeTimeout:1e3,forImageChangeAttributes:!0,min_width:10,min_height:10,useAspectRatio:new Set(["img"])}},74522:function(e,t,i){"use strict";var o=i(25045),n=i(31635),s=i(81937),r=i(84839),a=i(23211),l=i(28077),c=i(65946),u=i(80991),h=i(18855);i(96608);let d="__jodit-resizer_binded";function f(e,t){let i=(0,c.attr)(e,t)?.trim();return i&&/^\d+(\.\d+)?(px)?$/i.test(i)?parseFloat(i):0}class p extends h.Plugin{afterInit(e){(0,c.$$)("div",this.rect).forEach(t=>{e.e.on(t,"mousedown.resizer touchstart.resizer",this.onStartResizing.bind(this,t))}),l.eventEmitter.on("hideHelpers",this.hide),e.e.on("readonly",e=>{e&&this.hide()}).on("afterInit changePlace",this.addEventListeners.bind(this)).on("afterGetValueFromEditor.resizer",e=>{let t=/<jodit[^>]+data-jodit_iframe_wrapper[^>]+>(.*?<iframe[^>]*>.*?<\/iframe>.*?)<\/jodit>/gi;t.test(e.value)&&(e.value=e.value.replace(t,"$1"))}),this.addEventListeners(),this.__onChangeEditor()}onEditorClick(e){let t=e.target,{editor:i,options:{allowResizeTags:o}}=this.j;for(;t&&t!==i;){if(a.Dom.isTag(t,o)){this.__bind(t),this.onClickElement(t);return}t=t.parentNode}}__afterInsertImage(e){if(this.j.o.resizer.forImageChangeAttributes)return;let t=(0,c.attr)(e,"width");t&&!(0,u.cssInline)(e,"width")&&((0,c.css)(e,"width",t),(0,c.attr)(e,"width",null))}addEventListeners(){let e=this.j;e.e.off(e.editor,".resizer").off(e.ow,".resizer").on(e.editor,"keydown.resizer",e=>{this.isShown&&e.key===s.KEY_DELETE&&this.element&&!a.Dom.isTag(this.element,"table")&&this.onDelete(e)}).on(e.ow,"resize.resizer",this.updateSize).on("resize.resizer",this.updateSize).on([e.ow,e.editor],"scroll.resizer",()=>{this.isShown&&!this.isResizeMode&&this.hide()}).on(e.ow,"keydown.resizer",this.onKeyDown).on(e.ow,"keyup.resizer",this.onKeyUp).on(e.ow,"mouseup.resizer touchend.resizer",this.onClickOutside)}onStartResizing(e,t){if(!this.element||!this.element.parentNode)return this.hide(),!1;this.handle=e,t.cancelable&&t.preventDefault(),t.stopImmediatePropagation(),this.width=this.element.offsetWidth,this.height=this.element.offsetHeight,this.ratio=this.width/this.height,this.isResizeMode=!0,this.startX=t.clientX,this.startY=t.clientY,this.pointerX=t.clientX,this.pointerY=t.clientY;let{j:i}=this;i.e.fire("hidePopup"),i.lock(this.LOCK_KEY),i.e.on(i.ow,"mousemove.resizer touchmove.resizer",this.onResize)}onEndResizing(){let{j:e}=this;e.unlock(),this.isResizeMode=!1,this.isAltMode=!1,e.synchronizeValues(),e.e.off(e.ow,"mousemove.resizer touchmove.resizer",this.onResize)}onResize(e){if(this.isResizeMode){let t,i,o,n;if(!this.element)return;if(this.pointerX=e.clientX,this.pointerY=e.clientY,this.j.options.iframe&&e.view===this.j.ew){let o=this.getWorkplacePosition();t=e.clientX+o.left-this.startX,i=e.clientY+o.top-this.startY}else t=this.pointerX-this.startX,i=this.pointerY-this.startY;let s=this.handle.className,r=this.j.o.resizer.useAspectRatio;!this.isAltMode&&(!0===r||r&&a.Dom.isTag(this.element,r))?(t?n=Math.round((o=this.width+(s.match(/left/)?-1:1)*t)/this.ratio):o=Math.round((n=this.height+(s.match(/top/)?-1:1)*i)*this.ratio),o>(0,c.innerWidth)(this.j.editor,this.j.ow)&&(n=Math.round((o=(0,c.innerWidth)(this.j.editor,this.j.ow))/this.ratio))):(o=this.width+(s.match(/left/)?-1:1)*t,n=this.height+(s.match(/top/)?-1:1)*i),o>this.j.o.resizer.min_width&&(o<this.rect.parentNode.offsetWidth?this.applySize(this.element,"width",o):this.applySize(this.element,"width","100%")),n>this.j.o.resizer.min_height&&this.applySize(this.element,"height",n),this.updateSize(),this.showSizeViewer(this.element.offsetWidth,this.element.offsetHeight),e.stopImmediatePropagation()}}onKeyDown(e){this.isAltMode=e.key===s.KEY_ALT,!this.isAltMode&&this.isResizeMode&&this.onEndResizing()}onKeyUp(){this.isAltMode&&this.isResizeMode&&this.element&&(this.width=this.element.offsetWidth,this.height=this.element.offsetHeight,this.ratio=this.width/this.height,this.startX=this.pointerX,this.startY=this.pointerY),this.isAltMode=!1}onClickOutside(e){if(this.isShown){if(!this.isResizeMode)return this.hide();e.stopImmediatePropagation(),this.onEndResizing()}}getWorkplacePosition(){return(0,c.offset)(this.rect.parentNode||this.j.od.documentElement,this.j,this.j.od,!0)}applySize(e,t,i){let o=a.Dom.isImage(e)&&this.j.o.resizer.forImageChangeAttributes;o&&(0,c.attr)(e,t,i),(!o||(0,u.cssInline)(e,t))&&(0,c.css)(e,t,i)}onDelete(e){this.element&&("JODIT"!==this.element.tagName?this.j.s.select(this.element):(a.Dom.safeRemove(this.element),this.hide(),e.preventDefault()))}__onChangeEditor(){this.isShown&&(this.element&&this.element.parentNode?this.updateSize():this.hide()),(0,c.$$)("iframe",this.j.editor).forEach(this.__bind)}__bind(e){let t;if(!(!a.Dom.isHTMLElement(e)||!this.j.o.allowResizeTags.has(e.tagName.toLowerCase())||(0,c.dataBind)(e,d))){if((0,c.dataBind)(e,d,!0),a.Dom.isTag(e,"iframe")){let i=e;if(a.Dom.isHTMLElement(e.parentNode)&&(0,c.attr)(e.parentNode,"-jodit_iframe_wrapper"))e=e.parentNode;else{t=this.j.createInside.element("jodit",{"data-jodit-temp":1,contenteditable:!1,draggable:!0,"data-jodit_iframe_wrapper":1}),(0,c.attr)(t,"style",(0,c.attr)(e,"style"));let i=e.offsetWidth||f(e,"width"),o=e.offsetHeight||f(e,"height");(0,c.css)(t,{display:"inline-block"===(0,u.cssInline)(e,"display")?"inline-block":"block"}),i&&(0,c.css)(t,"width",i),o&&(0,c.css)(t,"height",o),e.parentNode&&a.Dom.before(e,t),a.Dom.append(t,e),this.j.e.on(t,"click",()=>{(0,c.attr)(t,"data-jodit-wrapper_active",!0)}),e=t}this.j.e.off(e,"mousedown.select touchstart.select").on(e,"mousedown.select touchstart.select",()=>{this.j.s.select(e)}).off(e,"changesize").on(e,"changesize",()=>{(0,c.attr)(i,"width",e.offsetWidth+"px"),(0,c.attr)(i,"height",e.offsetHeight+"px")})}this.j.e.on(e,"dragstart",this.hide),!s.IS_ES_NEXT&&s.IS_IE&&this.j.e.on(e,"mousedown",t=>{a.Dom.isTag(e,"img")&&t.preventDefault()})}}showSizeViewer(e,t){if(this.j.o.resizer.showSize){if(e<this.sizeViewer.offsetWidth||t<this.sizeViewer.offsetHeight)return void this.hideSizeViewer();(0,c.css)(this.sizeViewer,"opacity","1"),this.sizeViewer.textContent=`${e} x ${t}`,this.j.async.setTimeout(this.hideSizeViewer,{timeout:this.j.o.resizer.hideSizeTimeout,label:"hideSizeViewer"})}}show(){this.j.o.readonly||this.isShown||(this.isShown=!0,this.rect.parentNode||((0,c.markOwner)(this.j,this.rect),a.Dom.append(this.j.workplace,this.rect)),this.j.isFullSize&&(0,c.css)(this.rect,"zIndex",(0,c.css)(this.j.container,"zIndex").toString()),this.updateSize())}hide(){this.isResizeMode||(this.isResizeMode=!1,this.isShown=!1,this.element=null,a.Dom.safeRemove(this.rect),(0,c.$$)("[data-jodit-wrapper_active='true']",this.j.editor).forEach(e=>(0,c.attr)(e,"data-jodit-wrapper_active",!1)))}beforeDestruct(e){this.hide(),l.eventEmitter.off("hideHelpers",this.hide),e.e.off(this.j.ow,".resizer").off(".resizer")}constructor(...e){super(...e),(0,o._)(this,"LOCK_KEY","resizer"),(0,o._)(this,"handle",void 0),(0,o._)(this,"element",null),(0,o._)(this,"isResizeMode",!1),(0,o._)(this,"isShown",!1),(0,o._)(this,"startX",0),(0,o._)(this,"startY",0),(0,o._)(this,"width",0),(0,o._)(this,"height",0),(0,o._)(this,"ratio",0),(0,o._)(this,"rect",this.j.c.fromHTML(`<div title="${this.j.i18n("Press Alt for custom resizing")}" class="jodit-resizer">
236
236
  <div class="jodit-resizer__top-left"></div>
237
237
  <div class="jodit-resizer__top-right"></div>
238
238
  <div class="jodit-resizer__bottom-right"></div>
239
239
  <div class="jodit-resizer__bottom-left"></div>
240
240
  <span>100x100</span>
241
- </div>`)),(0,o._)(this,"sizeViewer",this.rect.getElementsByTagName("span")[0]),(0,o._)(this,"pointerX",0),(0,o._)(this,"pointerY",0),(0,o._)(this,"isAltMode",!1),(0,o._)(this,"onClickElement",e=>{!this.isResizeMode&&(this.element===e&&this.isShown||(this.element=e,this.show(),a.Dom.isTag(this.element,"img")&&!this.element.complete&&this.j.e.one(this.element,"load",this.updateSize)))}),(0,o._)(this,"updateSize",()=>{if(!this.isInDestruct&&this.isShown&&this.element&&this.rect){let e=this.getWorkplacePosition(),t=(0,c.offset)(this.element,this.j,this.j.ed),i=parseInt((0,u.cssInline)(this.rect,"left")||"0",10),o=parseInt((0,u.cssInline)(this.rect,"top")||"0",10),n=this.rect.offsetWidth,s=this.rect.offsetHeight,r=t.top-e.top,a=t.left-e.left;(o!==r||i!==a||n!==this.element.offsetWidth||s!==this.element.offsetHeight)&&((0,c.css)(this.rect,{top:r,left:a,width:this.element.offsetWidth,height:this.element.offsetHeight}),this.j.events&&(this.j.e.fire(this.element,"changesize"),isNaN(i)||this.j.e.fire("resize")))}}),(0,o._)(this,"hideSizeViewer",()=>{(0,c.css)(this.sizeViewer,"opacity","0")})}}(0,n.__decorate)([(0,r.watch)(":click")],f.prototype,"onEditorClick",null),(0,n.__decorate)([(0,r.watch)(":afterInsertImage")],f.prototype,"__afterInsertImage",null),(0,n.__decorate)([r.autobind],f.prototype,"onStartResizing",null),(0,n.__decorate)([r.autobind],f.prototype,"onEndResizing",null),(0,n.__decorate)([r.autobind],f.prototype,"onResize",null),(0,n.__decorate)([r.autobind],f.prototype,"onKeyDown",null),(0,n.__decorate)([r.autobind],f.prototype,"onKeyUp",null),(0,n.__decorate)([r.autobind],f.prototype,"onClickOutside",null),(0,n.__decorate)([(0,r.watch)(":change")],f.prototype,"__onChangeEditor",null),(0,n.__decorate)([r.autobind],f.prototype,"__bind",null),(0,n.__decorate)([r.autobind,(0,r.watch)(":hideResizer")],f.prototype,"hide",null),l.pluginSystem.add("resizer",f)},12266:function(e,t,i){"use strict";var o=i(81937),n=i(29434),s=i(5266),r=i(21917),a=i.n(r);s.Config.prototype.useSearch=!0,s.Config.prototype.search={lazyIdleTimeout:0,useCustomHighlightAPI:o.globalWindow&&void 0!==o.globalWindow.Highlight},n.Icon.set("search",a()),s.Config.prototype.controls.find={tooltip:"Find",icon:"search",exec(e,t,{control:i}){switch(i.args&&i.args[0]){case"findPrevious":e.e.fire("searchPrevious");break;case"findNext":e.e.fire("searchNext");break;case"replace":e.execCommand("openReplaceDialog");break;default:e.execCommand("openSearchDialog")}},list:{search:"Find",findNext:"Find Next",findPrevious:"Find Previous",replace:"Replace"},childTemplate:(e,t,i)=>i}},19213:function(e,t,i){"use strict";i.d(t,{clearSelectionWrappers:function(){return d},clearSelectionWrappersFromHTML:function(){return p},getSelectionWrappers:function(){return h},highlightTextRanges:function(){return u}});var o=i(81937),n=i(23211),s=i(28723);let r="jd-tmp-selection",a="background-color: var(--jd-color-background-selection); color: var(--jd-color-text-selection);",l=new WeakSet;function c(e,t){if(l.has(e))return;l.add(e);let i=t?`::highlight(jodit-search-result) { ${a} }`:`[${r}] { ${a} }`;try{let t=new CSSStyleSheet;t.insertRule(i),e.adoptedStyleSheets=[...e.adoptedStyleSheets,t]}catch{let t=e.createElement("style");t.textContent=i,n.Dom.append(e.head,t)}}function u(e,t,i,s,a){if(null==t.startContainer.nodeValue||null==t.endContainer.nodeValue||function(e,t,i){if(e.o.search.useCustomHighlightAPI&&o.globalWindow&&void 0!==o.globalWindow.Highlight){let o=[t,...i].map(t=>{let i=e.selection.createRange();return i.setStart(t.startContainer,t.startOffset),i.setEnd(t.endContainer,t.endOffset),i});c(e.ed,!0);let n=new Highlight(...o);return CSS.highlights.clear(),CSS.highlights.set("jodit-search-result",n),i.length=0,!0}return!1}(e,t,i))return;c(e.ed,!1);let l=s.element("span",{[r]:!0});n.Dom.markTemporary(l),function(e,t,i){let o=e.startContainer.nodeValue,s=0;if(0!==e.startOffset){let t=i.text(o.substring(0,e.startOffset));e.startContainer.nodeValue=o.substring(e.startOffset),n.Dom.before(e.startContainer,t),e.startContainer===e.endContainer&&(s=e.startOffset,e.endOffset-=s),e.startOffset=0}let r=e.endContainer.nodeValue;if(e.endOffset!==r.length){let o=i.text(r.substring(e.endOffset));for(let i of(e.endContainer.nodeValue=r.substring(0,e.endOffset),n.Dom.after(e.endContainer,o),t))if(i.startContainer===e.endContainer)i.startContainer=o,i.startOffset=i.startOffset-e.endOffset-s,i.endContainer===e.endContainer&&(i.endContainer=o,i.endOffset=i.endOffset-e.endOffset-s);else break;e.endOffset=e.endContainer.nodeValue.length}}(t,i,s);let u=t.startContainer;do{var h;if(!u||(n.Dom.isText(u)&&(h=u.parentNode,!(n.Dom.isElement(h)&&h.hasAttribute(r)))&&n.Dom.wrap(u,l.cloneNode(),s),u===t.endContainer))break;let e=u.firstChild||u.nextSibling;if(!e){for(;u&&!u.nextSibling&&u!==a;)u=u.parentNode;e=u?.nextSibling}u=e}while(u&&u!==a)}function h(e){return(0,s.$$)(`[${r}]`,e)}function d(e){h(e.editor).forEach(e=>n.Dom.unwrap(e)),e.o.search.useCustomHighlightAPI&&o.globalWindow&&void 0!==o.globalWindow.Highlight&&CSS.highlights.clear()}function p(e){return e.replace(RegExp(`<span[^>]+${r}[^>]+>(.*?)</span>`,"g"),"$1")}},87624:function(e,t,i){"use strict";i.d(t,{SentenceFinder:function(){return n.SentenceFinder},clearSelectionWrappers:function(){return o.clearSelectionWrappers},clearSelectionWrappersFromHTML:function(){return o.clearSelectionWrappersFromHTML},getSelectionWrappers:function(){return o.getSelectionWrappers},highlightTextRanges:function(){return o.highlightTextRanges}});var o=i(19213),n=i(59276)},59276:function(e,t,i){"use strict";i.d(t,{SentenceFinder:function(){return s}});var o=i(25045),n=i(57626);class s{add(e){let t=(e.nodeValue??"").toLowerCase();if(!t.length)return;let i=this.value.length;this.queue.push({startIndex:i,endIndex:i+t.length,node:e}),this.value+=t}ranges(e,t=0){let i=[],o=t,n,s=0;do if([o,n]=this.searchIndex(e,this.value,o),-1!==o){let e,t=0,r,a=0;for(let i=s;i<this.queue.length;i+=1)if(!e&&this.queue[i].endIndex>o&&(e=this.queue[i].node,t=o-this.queue[i].startIndex),e&&this.queue[i].endIndex>=o+n){r=this.queue[i].node,a=o+n-this.queue[i].startIndex,s=i;break}e&&r&&i.push({startContainer:e,startOffset:t,endContainer:r,endOffset:a}),o+=n}while(-1!==o)return 0===i.length?null:i}constructor(e=n.fuzzySearchIndex){(0,o._)(this,"searchIndex",void 0),(0,o._)(this,"queue",void 0),(0,o._)(this,"value",void 0),this.searchIndex=e,this.queue=[],this.value=""}}},30500:function(e,t,i){"use strict";var o=i(25045),n=i(31635),s=i(81937),r=i(84839),a=i(27795),l=i(28077),c=i(65946),u=i(91206);i(12266);var h=i(87624),d=i(58317);class p extends u.Plugin{get ui(){return new d.UISearch(this.j)}async updateCounters(){this.ui.isOpened&&(this.ui.count=await this.calcCounts(this.ui.query))}onPressReplaceButton(){this.findAndReplace(this.ui.query),this.updateCounters()}tryScrollToElement(e){let t=a.Dom.closest(e,a.Dom.isElement,this.j.editor);t||(t=a.Dom.prev(e,a.Dom.isElement,this.j.editor)),t&&t!==this.j.editor&&(0,c.scrollIntoViewIfNeeded)(t,this.j.editor,this.j.ed)}async calcCounts(e){return(await this.findQueryBounds(e,"walkerCount")).length}async findQueryBounds(e,t){let i=this[t];return i&&i.break(),i=new a.LazyWalker(this.j.async,{timeout:this.j.o.search.lazyIdleTimeout}),this[t]=i,this.find(i,e).catch(e=>(s.IS_PROD,[]))}async findAndReplace(e){let t=await this.findQueryBounds(e,"walker");if(!t.length)return!1;let i=this.findCurrentIndexInRanges(t,this.j.s.range);-1===i&&(i=0);let o=t[i];if(o){try{let t=this.j.ed.createRange();t.setStart(o.startContainer,o.startOffset),t.setEnd(o.endContainer,o.endOffset),t.deleteContents();let n=this.j.createInside.text(this.ui.replace);a.Dom.safeInsertNode(t,n),(0,h.clearSelectionWrappers)(this.j),this.j.s.setCursorAfter(n),this.tryScrollToElement(n),this.cache={},this.ui.currentIndex=i,await this.findAndSelect(e,!0).catch(e=>(s.IS_PROD,null))}finally{this.j.synchronizeValues()}return this.j.e.fire("afterFindAndReplace"),!0}return!1}async findAndSelect(e,t){let i=await this.findQueryBounds(e,"walker");if(!i.length)return!1;this.previousQuery===e&&(0,h.getSelectionWrappers)(this.j.editor).length||(this.drawPromise?.rejectCallback(),this.j.async.cancelAnimationFrame(this.wrapFrameRequest),(0,h.clearSelectionWrappers)(this.j),this.drawPromise=this.__drawSelectionRanges(i)),this.previousQuery=e;let o=this.ui.currentIndex-1;o=-1===o?0:t?o===i.length-1?0:o+1:0===o?i.length-1:o-1,this.ui.currentIndex=o+1;let n=i[o];if(n){let e=this.j.ed.createRange();try{e.setStart(n.startContainer,n.startOffset),e.setEnd(n.endContainer,n.endOffset),this.j.s.selectRange(e)}catch(e){s.IS_PROD}return this.tryScrollToElement(n.startContainer),await this.updateCounters(),await this.drawPromise,this.j.e.fire("afterFindAndSelect"),!0}return!1}findCurrentIndexInRanges(e,t){return e.findIndex(e=>e.startContainer===t.startContainer&&e.startOffset===t.startOffset&&e.endContainer===t.startContainer&&e.endOffset===t.endOffset)}async isValidCache(e){return(await e).every(e=>e.startContainer.isConnected&&e.startOffset<=(e.startContainer.nodeValue?.length??0)&&e.endContainer.isConnected&&e.endOffset<=(e.endContainer.nodeValue?.length??0))}async find(e,t){if(!t.length)return[];let i=this.cache[t];return i&&await this.isValidCache(i)?i:(this.cache[t]=this.j.async.promise(i=>{let o=new h.SentenceFinder(this.j.o.search.fuzzySearch);e.on("break",()=>{i([])}).on("visit",e=>(a.Dom.isText(e)&&o.add(e),!1)).on("end",()=>{i(o.ranges(t)??[])}).setWork(this.j.editor)}),this.cache[t])}__drawSelectionRanges(e){let{async:t,createInside:i,editor:o}=this.j;t.cancelAnimationFrame(this.wrapFrameRequest);let n=[...e],s,r=0;return t.promise(e=>{let a=()=>{do(s=n.shift())&&(0,h.highlightTextRanges)(this.j,s,n,i,o),r+=1;while(s&&r<=5)n.length?this.wrapFrameRequest=t.requestAnimationFrame(a):e()};a()})}onAfterGetValueFromEditor(e){e.value=(0,h.clearSelectionWrappersFromHTML)(e.value)}afterInit(e){if(e.o.useSearch){let t=this;e.e.on("beforeSetMode.search",()=>{this.ui.close()}).on(this.ui,"afterClose",()=>{(0,h.clearSelectionWrappers)(e),this.ui.currentIndex=0,this.ui.count=0,this.cache={},e.focus()}).on("click",()=>{this.ui.currentIndex=0,(0,h.clearSelectionWrappers)(e)}).on("change.search",()=>{this.cache={}}).on("keydown.search mousedown.search",e.async.debounce(()=>{this.ui.selInfo&&(e.s.removeMarkers(),this.ui.selInfo=null),this.ui.isOpened&&this.updateCounters()},e.defaultTimeout)).on("searchNext.search searchPrevious.search",()=>(this.ui.isOpened||this.ui.open(),t.findAndSelect(t.ui.query,"searchNext"===e.e.current).catch(e=>{s.IS_PROD}))).on("search.search",(e,i=!0)=>(this.ui.currentIndex=0,t.findAndSelect(e||"",i).catch(e=>{s.IS_PROD}))),e.registerCommand("search",{exec:(e,i,o=!0)=>(i&&t.findAndSelect(i,o).catch(e=>{s.IS_PROD}),!1)}).registerCommand("openSearchDialog",{exec:(e,i)=>(t.ui.open(i),!1),hotkeys:["ctrl+f","cmd+f"]}).registerCommand("openReplaceDialog",{exec:(i,o,n)=>(e.o.readonly||t.ui.open(o,n,!0),!1),hotkeys:["ctrl+h","cmd+h"]})}}beforeDestruct(e){(0,r.cached)(this,"ui")?.destruct(),e.e.off(".search")}constructor(...e){super(...e),(0,o._)(this,"buttons",[{name:"find",group:"search"}]),(0,o._)(this,"previousQuery",""),(0,o._)(this,"drawPromise",null),(0,o._)(this,"walker",null),(0,o._)(this,"walkerCount",null),(0,o._)(this,"cache",{}),(0,o._)(this,"wrapFrameRequest",0)}}(0,n.__decorate)([r.cache],p.prototype,"ui",null),(0,n.__decorate)([(0,r.watch)("ui:needUpdateCounters")],p.prototype,"updateCounters",null),(0,n.__decorate)([(0,r.watch)("ui:pressReplaceButton")],p.prototype,"onPressReplaceButton",null),(0,n.__decorate)([r.autobind],p.prototype,"findQueryBounds",null),(0,n.__decorate)([r.autobind],p.prototype,"findAndReplace",null),(0,n.__decorate)([r.autobind],p.prototype,"findAndSelect",null),(0,n.__decorate)([r.autobind],p.prototype,"find",null),(0,n.__decorate)([(0,r.watch)(":afterGetValueFromEditor")],p.prototype,"onAfterGetValueFromEditor",null),l.pluginSystem.add("search",p)},58317:function(e,t,i){"use strict";i.d(t,{UISearch:function(){return u}});var o=i(25045),n=i(31635),s=i(81937),r=i(84839),a=i(27795),l=i(65946),c=i(4099);class u extends c.UIElement{className(){return"UISearch"}render(){return`<div>
241
+ </div>`)),(0,o._)(this,"sizeViewer",this.rect.getElementsByTagName("span")[0]),(0,o._)(this,"pointerX",0),(0,o._)(this,"pointerY",0),(0,o._)(this,"isAltMode",!1),(0,o._)(this,"onClickElement",e=>{!this.isResizeMode&&(this.element===e&&this.isShown||(this.element=e,this.show(),a.Dom.isTag(this.element,"img")&&!this.element.complete&&this.j.e.one(this.element,"load",this.updateSize)))}),(0,o._)(this,"updateSize",()=>{if(!this.isInDestruct&&this.isShown&&this.element&&this.rect){let e=this.getWorkplacePosition(),t=(0,c.offset)(this.element,this.j,this.j.ed),i=parseInt((0,u.cssInline)(this.rect,"left")||"0",10),o=parseInt((0,u.cssInline)(this.rect,"top")||"0",10),n=this.rect.offsetWidth,s=this.rect.offsetHeight,r=t.top-e.top,a=t.left-e.left;(o!==r||i!==a||n!==this.element.offsetWidth||s!==this.element.offsetHeight)&&((0,c.css)(this.rect,{top:r,left:a,width:this.element.offsetWidth,height:this.element.offsetHeight}),this.j.events&&(this.j.e.fire(this.element,"changesize"),isNaN(i)||this.j.e.fire("resize")))}}),(0,o._)(this,"hideSizeViewer",()=>{(0,c.css)(this.sizeViewer,"opacity","0")})}}(0,n.__decorate)([(0,r.watch)(":click")],p.prototype,"onEditorClick",null),(0,n.__decorate)([(0,r.watch)(":afterInsertImage")],p.prototype,"__afterInsertImage",null),(0,n.__decorate)([r.autobind],p.prototype,"onStartResizing",null),(0,n.__decorate)([r.autobind],p.prototype,"onEndResizing",null),(0,n.__decorate)([r.autobind],p.prototype,"onResize",null),(0,n.__decorate)([r.autobind],p.prototype,"onKeyDown",null),(0,n.__decorate)([r.autobind],p.prototype,"onKeyUp",null),(0,n.__decorate)([r.autobind],p.prototype,"onClickOutside",null),(0,n.__decorate)([(0,r.watch)(":change")],p.prototype,"__onChangeEditor",null),(0,n.__decorate)([r.autobind],p.prototype,"__bind",null),(0,n.__decorate)([r.autobind,(0,r.watch)(":hideResizer")],p.prototype,"hide",null),l.pluginSystem.add("resizer",p)},12266:function(e,t,i){"use strict";var o=i(81937),n=i(29434),s=i(5266),r=i(21917),a=i.n(r);s.Config.prototype.useSearch=!0,s.Config.prototype.search={lazyIdleTimeout:0,useCustomHighlightAPI:o.globalWindow&&void 0!==o.globalWindow.Highlight},n.Icon.set("search",a()),s.Config.prototype.controls.find={tooltip:"Find",icon:"search",exec(e,t,{control:i}){switch(i.args&&i.args[0]){case"findPrevious":e.e.fire("searchPrevious");break;case"findNext":e.e.fire("searchNext");break;case"replace":e.execCommand("openReplaceDialog");break;default:e.execCommand("openSearchDialog")}},list:{search:"Find",findNext:"Find Next",findPrevious:"Find Previous",replace:"Replace"},childTemplate:(e,t,i)=>i}},19213:function(e,t,i){"use strict";i.d(t,{clearSelectionWrappers:function(){return d},clearSelectionWrappersFromHTML:function(){return f},getSelectionWrappers:function(){return h},highlightTextRanges:function(){return u}});var o=i(81937),n=i(23211),s=i(28723);let r="jd-tmp-selection",a="background-color: var(--jd-color-background-selection); color: var(--jd-color-text-selection);",l=new WeakSet;function c(e,t){if(l.has(e))return;l.add(e);let i=t?`::highlight(jodit-search-result) { ${a} }`:`[${r}] { ${a} }`;try{let t=new CSSStyleSheet;t.insertRule(i),e.adoptedStyleSheets=[...e.adoptedStyleSheets,t]}catch{let t=e.createElement("style");t.textContent=i,n.Dom.append(e.head,t)}}function u(e,t,i,s,a){if(null==t.startContainer.nodeValue||null==t.endContainer.nodeValue||function(e,t,i){if(e.o.search.useCustomHighlightAPI&&o.globalWindow&&void 0!==o.globalWindow.Highlight){let o=[t,...i].map(t=>{let i=e.selection.createRange();return i.setStart(t.startContainer,t.startOffset),i.setEnd(t.endContainer,t.endOffset),i});c(e.ed,!0);let n=new Highlight(...o);return CSS.highlights.clear(),CSS.highlights.set("jodit-search-result",n),i.length=0,!0}return!1}(e,t,i))return;c(e.ed,!1);let l=s.element("span",{[r]:!0});n.Dom.markTemporary(l),function(e,t,i){let o=e.startContainer.nodeValue,s=0;if(0!==e.startOffset){let t=i.text(o.substring(0,e.startOffset));e.startContainer.nodeValue=o.substring(e.startOffset),n.Dom.before(e.startContainer,t),e.startContainer===e.endContainer&&(s=e.startOffset,e.endOffset-=s),e.startOffset=0}let r=e.endContainer.nodeValue;if(e.endOffset!==r.length){let o=i.text(r.substring(e.endOffset));for(let i of(e.endContainer.nodeValue=r.substring(0,e.endOffset),n.Dom.after(e.endContainer,o),t))if(i.startContainer===e.endContainer)i.startContainer=o,i.startOffset=i.startOffset-e.endOffset-s,i.endContainer===e.endContainer&&(i.endContainer=o,i.endOffset=i.endOffset-e.endOffset-s);else break;e.endOffset=e.endContainer.nodeValue.length}}(t,i,s);let u=t.startContainer;do{var h;if(!u||(n.Dom.isText(u)&&(h=u.parentNode,!(n.Dom.isElement(h)&&h.hasAttribute(r)))&&n.Dom.wrap(u,l.cloneNode(),s),u===t.endContainer))break;let e=u.firstChild||u.nextSibling;if(!e){for(;u&&!u.nextSibling&&u!==a;)u=u.parentNode;e=u?.nextSibling}u=e}while(u&&u!==a)}function h(e){return(0,s.$$)(`[${r}]`,e)}function d(e){h(e.editor).forEach(e=>n.Dom.unwrap(e)),e.o.search.useCustomHighlightAPI&&o.globalWindow&&void 0!==o.globalWindow.Highlight&&CSS.highlights.clear()}function f(e){return e.replace(RegExp(`<span[^>]+${r}[^>]+>(.*?)</span>`,"g"),"$1")}},87624:function(e,t,i){"use strict";i.d(t,{SentenceFinder:function(){return n.SentenceFinder},clearSelectionWrappers:function(){return o.clearSelectionWrappers},clearSelectionWrappersFromHTML:function(){return o.clearSelectionWrappersFromHTML},getSelectionWrappers:function(){return o.getSelectionWrappers},highlightTextRanges:function(){return o.highlightTextRanges}});var o=i(19213),n=i(59276)},59276:function(e,t,i){"use strict";i.d(t,{SentenceFinder:function(){return s}});var o=i(25045),n=i(57626);class s{add(e){let t=(e.nodeValue??"").toLowerCase();if(!t.length)return;let i=this.value.length;this.queue.push({startIndex:i,endIndex:i+t.length,node:e}),this.value+=t}ranges(e,t=0){let i=[],o=t,n,s=0;do if([o,n]=this.searchIndex(e,this.value,o),-1!==o){let e,t=0,r,a=0;for(let i=s;i<this.queue.length;i+=1)if(!e&&this.queue[i].endIndex>o&&(e=this.queue[i].node,t=o-this.queue[i].startIndex),e&&this.queue[i].endIndex>=o+n){r=this.queue[i].node,a=o+n-this.queue[i].startIndex,s=i;break}e&&r&&i.push({startContainer:e,startOffset:t,endContainer:r,endOffset:a}),o+=n}while(-1!==o)return 0===i.length?null:i}constructor(e=n.fuzzySearchIndex){(0,o._)(this,"searchIndex",void 0),(0,o._)(this,"queue",void 0),(0,o._)(this,"value",void 0),this.searchIndex=e,this.queue=[],this.value=""}}},30500:function(e,t,i){"use strict";var o=i(25045),n=i(31635),s=i(81937),r=i(84839),a=i(27795),l=i(28077),c=i(65946),u=i(91206);i(12266);var h=i(87624),d=i(58317);class f extends u.Plugin{get ui(){return new d.UISearch(this.j)}async updateCounters(){this.ui.isOpened&&(this.ui.count=await this.calcCounts(this.ui.query))}onPressReplaceButton(){this.findAndReplace(this.ui.query),this.updateCounters()}tryScrollToElement(e){let t=a.Dom.closest(e,a.Dom.isElement,this.j.editor);t||(t=a.Dom.prev(e,a.Dom.isElement,this.j.editor)),t&&t!==this.j.editor&&(0,c.scrollIntoViewIfNeeded)(t,this.j.editor,this.j.ed)}async calcCounts(e){return(await this.findQueryBounds(e,"walkerCount")).length}async findQueryBounds(e,t){let i=this[t];return i&&i.break(),i=new a.LazyWalker(this.j.async,{timeout:this.j.o.search.lazyIdleTimeout}),this[t]=i,this.find(i,e).catch(e=>(s.IS_PROD,[]))}async findAndReplace(e){let t=await this.findQueryBounds(e,"walker");if(!t.length)return!1;let i=this.findCurrentIndexInRanges(t,this.j.s.range);-1===i&&(i=0);let o=t[i];if(o){try{let t=this.j.ed.createRange();t.setStart(o.startContainer,o.startOffset),t.setEnd(o.endContainer,o.endOffset),t.deleteContents();let n=this.j.createInside.text(this.ui.replace);a.Dom.safeInsertNode(t,n),(0,h.clearSelectionWrappers)(this.j),this.j.s.setCursorAfter(n),this.tryScrollToElement(n),this.cache={},this.ui.currentIndex=i,await this.findAndSelect(e,!0).catch(e=>(s.IS_PROD,null))}finally{this.j.synchronizeValues()}return this.j.e.fire("afterFindAndReplace"),!0}return!1}async findAndSelect(e,t){let i=await this.findQueryBounds(e,"walker");if(!i.length)return!1;this.previousQuery===e&&(0,h.getSelectionWrappers)(this.j.editor).length||(this.drawPromise?.rejectCallback(),this.j.async.cancelAnimationFrame(this.wrapFrameRequest),(0,h.clearSelectionWrappers)(this.j),this.drawPromise=this.__drawSelectionRanges(i)),this.previousQuery=e;let o=this.ui.currentIndex-1;o=-1===o?0:t?o===i.length-1?0:o+1:0===o?i.length-1:o-1,this.ui.currentIndex=o+1;let n=i[o];if(n){let e=this.j.ed.createRange();try{e.setStart(n.startContainer,n.startOffset),e.setEnd(n.endContainer,n.endOffset),this.j.s.selectRange(e)}catch(e){s.IS_PROD}return this.tryScrollToElement(n.startContainer),await this.updateCounters(),await this.drawPromise,this.j.e.fire("afterFindAndSelect"),!0}return!1}findCurrentIndexInRanges(e,t){return e.findIndex(e=>e.startContainer===t.startContainer&&e.startOffset===t.startOffset&&e.endContainer===t.startContainer&&e.endOffset===t.endOffset)}async isValidCache(e){return(await e).every(e=>e.startContainer.isConnected&&e.startOffset<=(e.startContainer.nodeValue?.length??0)&&e.endContainer.isConnected&&e.endOffset<=(e.endContainer.nodeValue?.length??0))}async find(e,t){if(!t.length)return[];let i=this.cache[t];return i&&await this.isValidCache(i)?i:(this.cache[t]=this.j.async.promise(i=>{let o=new h.SentenceFinder(this.j.o.search.fuzzySearch);e.on("break",()=>{i([])}).on("visit",e=>(a.Dom.isText(e)&&o.add(e),!1)).on("end",()=>{i(o.ranges(t)??[])}).setWork(this.j.editor)}),this.cache[t])}__drawSelectionRanges(e){let{async:t,createInside:i,editor:o}=this.j;t.cancelAnimationFrame(this.wrapFrameRequest);let n=[...e],s,r=0;return t.promise(e=>{let a=()=>{do(s=n.shift())&&(0,h.highlightTextRanges)(this.j,s,n,i,o),r+=1;while(s&&r<=5)n.length?this.wrapFrameRequest=t.requestAnimationFrame(a):e()};a()})}onAfterGetValueFromEditor(e){e.value=(0,h.clearSelectionWrappersFromHTML)(e.value)}afterInit(e){if(e.o.useSearch){let t=this;e.e.on("beforeSetMode.search",()=>{this.ui.close()}).on(this.ui,"afterClose",()=>{(0,h.clearSelectionWrappers)(e),this.ui.currentIndex=0,this.ui.count=0,this.cache={},e.focus()}).on("click",()=>{this.ui.currentIndex=0,(0,h.clearSelectionWrappers)(e)}).on("change.search",()=>{this.cache={}}).on("keydown.search mousedown.search",e.async.debounce(()=>{this.ui.selInfo&&(e.s.removeMarkers(),this.ui.selInfo=null),this.ui.isOpened&&this.updateCounters()},e.defaultTimeout)).on("searchNext.search searchPrevious.search",()=>(this.ui.isOpened||this.ui.open(),t.findAndSelect(t.ui.query,"searchNext"===e.e.current).catch(e=>{s.IS_PROD}))).on("search.search",(e,i=!0)=>(this.ui.currentIndex=0,t.findAndSelect(e||"",i).catch(e=>{s.IS_PROD}))),e.registerCommand("search",{exec:(e,i,o=!0)=>(i&&t.findAndSelect(i,o).catch(e=>{s.IS_PROD}),!1)}).registerCommand("openSearchDialog",{exec:(e,i)=>(t.ui.open(i),!1),hotkeys:["ctrl+f","cmd+f"]}).registerCommand("openReplaceDialog",{exec:(i,o,n)=>(e.o.readonly||t.ui.open(o,n,!0),!1),hotkeys:["ctrl+h","cmd+h"]})}}beforeDestruct(e){(0,r.cached)(this,"ui")?.destruct(),e.e.off(".search")}constructor(...e){super(...e),(0,o._)(this,"buttons",[{name:"find",group:"search"}]),(0,o._)(this,"previousQuery",""),(0,o._)(this,"drawPromise",null),(0,o._)(this,"walker",null),(0,o._)(this,"walkerCount",null),(0,o._)(this,"cache",{}),(0,o._)(this,"wrapFrameRequest",0)}}(0,n.__decorate)([r.cache],f.prototype,"ui",null),(0,n.__decorate)([(0,r.watch)("ui:needUpdateCounters")],f.prototype,"updateCounters",null),(0,n.__decorate)([(0,r.watch)("ui:pressReplaceButton")],f.prototype,"onPressReplaceButton",null),(0,n.__decorate)([r.autobind],f.prototype,"findQueryBounds",null),(0,n.__decorate)([r.autobind],f.prototype,"findAndReplace",null),(0,n.__decorate)([r.autobind],f.prototype,"findAndSelect",null),(0,n.__decorate)([r.autobind],f.prototype,"find",null),(0,n.__decorate)([(0,r.watch)(":afterGetValueFromEditor")],f.prototype,"onAfterGetValueFromEditor",null),l.pluginSystem.add("search",f)},58317:function(e,t,i){"use strict";i.d(t,{UISearch:function(){return u}});var o=i(25045),n=i(31635),s=i(81937),r=i(84839),a=i(27795),l=i(65946),c=i(4099);class u extends c.UIElement{className(){return"UISearch"}render(){return`<div>
242
242
  <div class="&__box">
243
243
  <div class="&__inputs">
244
244
  <input data-ref="query" tabindex="0" placeholder="~Search for~" type="text"/>
@@ -256,7 +256,7 @@
256
256
  <button data-ref="replace-btn" tabindex="0" type="button" class="jodit-ui-button">~Replace~</button>
257
257
  </div>
258
258
  </div>
259
- </div>`}get currentIndex(){return this._currentIndex}set currentIndex(e){this._currentIndex=e,this.currentBox.innerText=e.toString()}set count(e){this.countBox.innerText=e.toString()}get query(){return this.queryInput.value}get replace(){return this.replaceInput.value}onEditorKeyDown(e){if(!this.isOpened)return;let{j:t}=this;if(t.getRealMode()===s.MODE_WYSIWYG)switch(e.key){case s.KEY_ESC:this.close();break;case s.KEY_F3:this.queryInput.value&&(t.e.fire(e.shiftKey?"searchPrevious":"searchNext"),e.preventDefault())}}open(e,t,i=!1){this.isOpened||(a.Dom.append(this.j.workplace,this.container),this.isOpened=!0),this.calcSticky(this.j.e.fire("getStickyState.sticky")||!1),this.j.e.fire("hidePopup"),this.setMod("replace",i);let o=e??(this.j.s.sel||"").toString();o&&(this.queryInput.value=o),t&&(this.replaceInput.value=t),this.setMod("empty-query",!o.length),this.j.e.fire(this,"needUpdateCounters"),o?this.queryInput.select():this.queryInput.focus()}close(){this.isOpened&&(this.j.s.restore(),a.Dom.safeRemove(this.container),this.isOpened=!1,this.j.e.fire(this,"afterClose"))}calcSticky(e){if(this.isOpened)if(this.setMod("sticky",e),e){let e=(0,l.position)(this.j.toolbarContainer);(0,l.css)(this.container,{top:e.top+e.height,left:e.left+e.width})}else(0,l.css)(this.container,{top:null,left:null})}constructor(e){let t;super(e),(0,o._)(this,"queryInput",void 0),(0,o._)(this,"replaceInput",void 0),(0,o._)(this,"selInfo",null),(0,o._)(this,"closeButton",void 0),(0,o._)(this,"replaceButton",void 0),(0,o._)(this,"currentBox",void 0),(0,o._)(this,"countBox",void 0),(0,o._)(this,"_currentIndex",0),(0,o._)(this,"isOpened",!1);let{query:i,replace:n,cancel:r,next:a,prev:c,replaceBtn:u,current:h,count:d}=(0,l.refs)(this.container);this.queryInput=i,this.replaceInput=n,this.closeButton=r,this.replaceButton=u,this.currentBox=h,this.countBox=d;let p=()=>this.close(),f=()=>void e.e.fire(this,"pressReplaceButton"),m=()=>void e.e.fire("searchNext"),g=()=>void e.e.fire("searchPrevious"),_=e=>t=>{t.detail||(t.preventDefault(),e())};e.e.on(this.closeButton,"pointerdown",()=>(p(),!1)).on(this.closeButton,"click",_(p)).on(this.queryInput,"input",()=>{this.currentIndex=0}).on(this.queryInput,"pointerdown",()=>{e.s.isFocused()&&(e.s.removeMarkers(),this.selInfo=e.s.save())}).on(this.replaceButton,"pointerdown",()=>(f(),!1)).on(this.replaceButton,"click",_(f)).on(a,"pointerdown",()=>(m(),!1)).on(a,"click",_(m)).on(c,"pointerdown",()=>(g(),!1)).on(c,"click",_(g)).on(this.queryInput,"input",()=>{this.setMod("empty-query",!(0,l.trim)(this.queryInput.value).length)}).on(this.queryInput,"keydown",(t=this.j.async.debounce(async t=>{t.key===s.KEY_ENTER?await e.e.fire("searchNext")&&this.close():e.e.fire(this,"needUpdateCounters")},this.j.defaultTimeout),e=>{e.key===s.KEY_ENTER&&(e.preventDefault(),e.stopImmediatePropagation()),t(e)}))}}(0,n.__decorate)([(0,r.watch)([":keydown","queryInput:keydown"])],u.prototype,"onEditorKeyDown",null),(0,n.__decorate)([r.autobind],u.prototype,"open",null),(0,n.__decorate)([r.autobind],u.prototype,"close",null),(0,n.__decorate)([(0,r.watch)(":toggleSticky")],u.prototype,"calcSticky",null),u=(0,n.__decorate)([r.component],u)},69070:function(e,t,i){"use strict";i(5266).Config.prototype.tableAllowCellSelection=!0},2756:function(e,t,i){"use strict";var o=i(25045),n=i(31635),s=i(81937),r=i(84839),a=i(23211),l=i(28077),c=i(65946),u=i(91206),h=i(98803);i(69070);let d="table_processor_observer",p="onMoveTableSelectCell";class f extends u.Plugin{get __tableModule(){return this.j.getInstance(h.Table,this.j.o)}afterInit(e){e.o.tableAllowCellSelection&&e.e.on("keydown.select-cells",e=>{e.key===s.KEY_TAB&&this.unselectCells()}).on("beforeCommand.select-cells",this.onExecCommand).on("afterCommand.select-cells",this.onAfterCommand).on(["clickEditor","mousedownTd","mousedownTh","touchstartTd","touchstartTh"].map(e=>e+".select-cells").join(" "),this.onStartSelection).on("clickTr clickTbody",()=>{let e=this.__tableModule.getAllSelectedCells().length;if(e)return e>1&&this.j.s.sel?.removeAllRanges(),!1})}onStartSelection(e,t){if(this.j.o.readonly)return;let i=a.Dom.closest(e,"table",this.j.editor);return(t?.ctrlKey||t?.metaKey)&&e!==this.j.editor&&i&&a.Dom.isCell(e)?(this.__tableModule.getAllSelectedCells().includes(e)?this.__tableModule.removeSelection(e):(e.firstChild||a.Dom.append(e,this.j.createInside.element("br")),this.__tableModule.addSelection(e)),this.__selectedCell=e,this.j.s.sel?.removeAllRanges(),this.__tableModule.getAllSelectedCells().length?this.j.e.fire("showPopup",i,()=>(0,c.position)(e,this.j),"cells"):this.j.e.fire("hidePopup","cells"),!1):(this.unselectCells(),e===this.j.editor)?void 0:e&&i?(e.firstChild||a.Dom.append(e,this.j.createInside.element("br")),this.__isSelectionMode=!0,this.__selectedCell=e,this.__tableModule.addSelection(e),this.j.e.on(i,"mousemove.select-cells touchmove.select-cells",this.j.async.throttle(this.__onMove.bind(this,i),{label:p,timeout:this.j.defaultTimeout/2})).on(i,"mouseup.select-cells touchend.select-cells",this.__onStopSelection.bind(this,i)),!1):void 0}onOutsideClick(){this.__selectedCell=null,this.__onRemoveSelection()}onChange(){this.j.isLocked||this.__isSelectionMode||this.__onRemoveSelection()}__onMove(e,t){let i;if(this.j.o.readonly&&!this.j.isLocked||this.j.isLockedNotBy(d))return;let o=(this.j.o.shadowRoot??this.j.ed).elementFromPoint(t.clientX,t.clientY);if(!o)return;let n=a.Dom.closest(o,["td","th"],e);if(!n||!this.__selectedCell)return;n!==this.__selectedCell&&this.j.lock(d),this.unselectCells();let s=this.__tableModule.getSelectedBound(e,[n,this.__selectedCell]),r=this.__tableModule.formalMatrix(e);for(let e=s[0][0];e<=s[1][0];e+=1)for(let t=s[0][1];t<=s[1][1];t+=1)this.__tableModule.addSelection(r[e][t]);this.__tableModule.getAllSelectedCells().length>1&&this.j.s.sel?.removeAllRanges(),this.j.e.fire("hidePopup"),t.stopPropagation(),i=this.j.createInside.fromHTML('<div style="color:rgba(0,0,0,0.01);width:0;height:0">&nbsp;</div>'),a.Dom.append(n,i),this.j.async.setTimeout(()=>{a.Dom.safeRemove(i)},this.j.defaultTimeout/5)}__onRemoveSelection(e){if(!e?.buffer?.actionTrigger&&!this.__selectedCell&&this.__tableModule.getAllSelectedCells().length){this.j.unlock(),this.unselectCells(),this.j.e.fire("hidePopup","cells");return}this.__isSelectionMode=!1,this.__selectedCell=null}__onStopSelection(e,t){if(!this.__selectedCell)return;this.__isSelectionMode=!1,this.j.unlock();let i=(this.j.o.shadowRoot??this.j.ed).elementFromPoint(t.clientX,t.clientY);if(!i)return;let o=a.Dom.closest(i,["td","th"],e);if(!o)return;let n=a.Dom.closest(o,"table",e);if(n&&n!==e)return;let s=this.__tableModule.getSelectedBound(e,[o,this.__selectedCell]),r=this.__tableModule.formalMatrix(e),l=r[s[1][0]]?.[s[1][1]],u=r[s[0][0]]?.[s[0][1]];u&&l&&(this.j.e.fire("showPopup",e,()=>{let e=(0,c.position)(u,this.j),t=(0,c.position)(l,this.j);return{left:e.left,top:e.top,width:t.left-e.left+t.width,height:t.top-e.top+t.height}},"cells"),(0,c.$$)("table",this.j.editor).forEach(e=>{this.j.e.off(e,"mousemove.select-cells touchmove.select-cells mouseup.select-cells touchend.select-cells")}),this.j.async.clearTimeout(p))}unselectCells(e){let t=this.__tableModule,i=t.getAllSelectedCells();i.length&&i.forEach(i=>{e&&e===i||t.removeSelection(i)})}onExecCommand(e){if(/^(delete|backspace)(word|sentence)?button$/.test(e)&&this.__tableModule.getAllSelectedCells().length>1){let e=this.__tableModule.getAllSelectedCells();return e.forEach(e=>{a.Dom.detach(e),a.Dom.append(e,this.j.createInside.element("br"))}),this.unselectCells(),this.j.s.setCursorIn(e[0]),this.j.synchronizeValues(),!1}if(/table(splitv|splitg|merge|empty|bin|binrow|bincolumn|addcolumn|addrow)/.test(e)){e=e.replace("table","");let t=this.__tableModule.getAllSelectedCells();if(t.length){let[i]=t;if(!i)return;let o=a.Dom.closest(i,"table",this.j.editor);if(!o)return;switch(e){case"splitv":this.__tableModule.splitVertical(o);break;case"splitg":this.__tableModule.splitHorizontal(o);break;case"merge":this.__tableModule.mergeSelected(o);break;case"empty":t.forEach(e=>a.Dom.detach(e));break;case"bin":a.Dom.safeRemove(o);break;case"binrow":new Set(t.map(e=>e.parentNode)).forEach(e=>{this.__tableModule.removeRow(o,e.rowIndex)});break;case"bincolumn":{let e=new Set,i=[];t.forEach(t=>{let[,n]=this.__tableModule.formalCoordinate(o,t);e.has(n)||(i.push(n),e.add(n))}),i.sort((e,t)=>t-e).forEach(e=>{this.__tableModule.removeColumn(o,e)})}break;case"addcolumnafter":case"addcolumnbefore":this.__tableModule.appendColumn(o,i,"addcolumnafter"===e);break;case"addrowafter":case"addrowbefore":this.__tableModule.appendRow(o,i.parentNode,"addrowafter"===e)}}return!1}}onAfterCommand(e){/^justify/.test(e)&&this.__tableModule.getAllSelectedCells().forEach(t=>(0,c.alignElement)(e,t))}beforeDestruct(e){this.__onRemoveSelection(),e.e.off(".select-cells")}constructor(...e){super(...e),(0,o._)(this,"__selectedCell",null),(0,o._)(this,"__isSelectionMode",!1)}}(0,o._)(f,"requires",["select"]),(0,n.__decorate)([r.autobind],f.prototype,"onStartSelection",null),(0,n.__decorate)([(0,r.watch)(":outsideClick")],f.prototype,"onOutsideClick",null),(0,n.__decorate)([(0,r.watch)(":change")],f.prototype,"onChange",null),(0,n.__decorate)([r.autobind],f.prototype,"__onRemoveSelection",null),(0,n.__decorate)([r.autobind],f.prototype,"__onStopSelection",null),(0,n.__decorate)([r.autobind],f.prototype,"onExecCommand",null),(0,n.__decorate)([r.autobind],f.prototype,"onAfterCommand",null),l.pluginSystem.add("selectCells",f)},47670:function(e,t,i){"use strict";i(5266).Config.prototype.select={normalizeSelectionBeforeCutAndCopy:!1,normalizeTripleClick:!0}},98988:function(e,t,i){"use strict";var o=i(25045),n=i(31635),s=i(81937),r=i(84839),a=i(23211),l=i(28077),c=i(57821),u=i(91206),h=i(4099);i(47670);class d extends u.Plugin{afterInit(e){this.proxyEventsList.forEach(t=>{e.e.on(t+".select",this.onStartSelection)})}beforeDestruct(e){this.proxyEventsList.forEach(t=>{e.e.on(t+".select",this.onStartSelection)})}onStartSelection(e){let{j:t}=this,i,o=e.target;for(;void 0===i&&o&&o!==t.editor;)i=t.e.fire((0,c.camelCase)(e.type+"_"+o.nodeName.toLowerCase()),o,e),o=o.parentElement;"click"===e.type&&void 0===i&&o===t.editor&&t.e.fire(e.type+"Editor",o,e)}onOutsideClick(e){let t=e.target;a.Dom.up(t,e=>e===this.j.editor)||h.UIElement.closestElement(t,h.Popup)||this.j.e.fire("outsideClick",e)}beforeCommandCut(){let{s:e}=this.j;if(!e.isCollapsed()){let t=e.current();t&&a.Dom.isOrContains(this.j.editor,t)&&this.onCopyNormalizeSelectionBound()}}beforeCommandSelectAll(){let{s:e}=this.j;return e.focus(),e.select(this.j.editor,!0),e.expandSelection(),!1}onClickRightOfNestedListItem(e){let{s:t}=this.j,i=t.range;if(!i.collapsed||0!==i.startOffset||!a.Dom.isText(i.startContainer))return;let o=i.startContainer,n=o.parentNode;if(!a.Dom.isTag(n,"li")||!a.Dom.first(n,e=>a.Dom.isTag(e,s.LIST_TAGS)))return;let r=this.j.ed.createRange();r.selectNodeContents(o);let l=r.getBoundingClientRect();e.clientX>l.right&&t.setCursorAfter(o)}onClickKeepPendingFormat(){let{s:e}=this.j,t=e.range;if(!t.collapsed||!a.Dom.isText(t.startContainer))return;let i=t.startContainer;if(t.startOffset!==(i.nodeValue?.length??0))return;let o=i.nextSibling;if(!a.Dom.isElement(o)||!o.nodeName.match(s.IS_INLINE)||!a.Dom.isEmpty(o))return;let n=o;for(;a.Dom.isElement(n.firstElementChild)&&n.firstElementChild.nodeName.match(s.IS_INLINE);)n=n.firstElementChild;e.setCursorIn(n)}onTripleClickNormalizeSelection(e){if(3!==e.detail||!this.j.o.select.normalizeTripleClick)return;let{s:t}=this.j,{startContainer:i,startOffset:o}=t.range;0===o&&a.Dom.isText(i)&&t.select(a.Dom.closest(i,a.Dom.isBlock,this.j.editor)||i,!0)}onCopyNormalizeSelectionBound(e){let{s:t,editor:i,o}=this.j;!o.select.normalizeSelectionBeforeCutAndCopy||t.isCollapsed()||(!e||e.isTrusted&&a.Dom.isNode(e.target)&&a.Dom.isOrContains(i,e.target))&&this.jodit.s.expandSelection()}constructor(...e){super(...e),(0,o._)(this,"proxyEventsList",["click","mousedown","touchstart","mouseup","touchend"])}}(0,n.__decorate)([r.autobind],d.prototype,"onStartSelection",null),(0,n.__decorate)([(0,r.watch)("ow:click")],d.prototype,"onOutsideClick",null),(0,n.__decorate)([(0,r.watch)([":beforeCommandCut"])],d.prototype,"beforeCommandCut",null),(0,n.__decorate)([(0,r.watch)([":beforeCommandSelectall"])],d.prototype,"beforeCommandSelectAll",null),(0,n.__decorate)([(0,r.watch)([":click"])],d.prototype,"onClickRightOfNestedListItem",null),(0,n.__decorate)([(0,r.watch)([":click"])],d.prototype,"onClickKeepPendingFormat",null),(0,n.__decorate)([(0,r.watch)([":click"])],d.prototype,"onTripleClickNormalizeSelection",null),(0,n.__decorate)([(0,r.watch)([":copy",":cut"])],d.prototype,"onCopyNormalizeSelectionBound",null),l.pluginSystem.add("select",d)},80202:function(e,t,i){"use strict";var o=i(5266);o.Config.prototype.minWidth=200,o.Config.prototype.maxWidth="100%",o.Config.prototype.minHeight=200,o.Config.prototype.maxHeight="auto",o.Config.prototype.saveHeightInStorage=!1},44322:function(e,t,i){"use strict";var o=i(25045),n=i(31635),s=i(84839),r=i(28077),a=i(72412),l=i(80991),c=i(18855);i(80202);class u extends c.Plugin{afterInit(e){e.e.on("setHeight.size",this.__setHeight).on("setWidth.size",this.__setWidth).on("afterInit.size changePlace.size",this.__initialize,{top:!0}).on(e.ow,"load.size",this.__resizeWorkspaces).on("afterInit.size resize.size afterUpdateToolbar.size scroll.size afterResize.size",this.__resizeWorkspaces).on("toggleFullSize.size toggleToolbar.size",this.__resizeWorkspaceImd),this.__immediateInitialize()}__initialize(){this.__immediateInitialize()}__immediateInitialize(){let{j:e}=this;if(e.o.inline)return;let{height:t}=e.o;if(e.o.saveHeightInStorage&&"auto"!==t){let i=e.storage.get("height");i&&(t=i)}(0,l.css)(e.editor,{minHeight:"100%"}),(0,l.css)(e.container,{minHeight:e.o.minHeight,maxHeight:e.o.maxHeight,minWidth:e.o.minWidth,maxWidth:e.o.maxWidth}),e.isFullSize||(this.__setHeight(t),this.__setWidth(e.o.width))}__setHeight(e){let{clientHeight:t,clientWidth:i}=this.j.container;if((0,a.isNumber)(e)){let{minHeight:t,maxHeight:i}=this.j.o;(0,a.isNumber)(t)&&t>e&&(e=t),(0,a.isNumber)(i)&&i<e&&(e=i)}(0,l.css)(this.j.container,"height",e),this.j.o.saveHeightInStorage&&this.j.storage.set("height",e),this.__resizeWorkspaceImd({clientHeight:t,clientWidth:i})}__setWidth(e){let{clientHeight:t,clientWidth:i}=this.j.container;if((0,a.isNumber)(e)){let{minWidth:t,maxWidth:i}=this.j.o;(0,a.isNumber)(t)&&t>e&&(e=t),(0,a.isNumber)(i)&&e>i&&(e=i)}(0,l.css)(this.j.container,"width",e),this.__resizeWorkspaceImd({clientHeight:t,clientWidth:i})}__getNotWorkHeight(){let e=this.j.toolbarContainer;return(e&&this.j.container.contains(e)?e.offsetHeight:0)+(this.j.statusbar?.getHeight()||0)+2}__resizeWorkspaceImd({clientHeight:e,clientWidth:t}=this.j.container){if(!this.j||this.j.isDestructed||!this.j.o||this.j.o.inline||!this.j.container||!this.j.container.parentNode)return;let i=((0,l.css)(this.j.container,"minHeight")||0)-this.__getNotWorkHeight();if((0,a.isNumber)(i)&&i>0&&([this.j.workplace,this.j.currentPlace.slots.center,this.j.iframe,this.j.editor].map(e=>{e&&(0,l.css)(e,"minHeight",i)}),this.j.e.fire("setMinHeight",i)),(0,a.isNumber)(this.j.o.maxHeight)){let e=this.j.o.maxHeight-this.__getNotWorkHeight();[this.j.workplace,this.j.currentPlace.slots.center,this.j.iframe,this.j.editor].map(t=>{t&&(0,l.css)(t,"maxHeight",e)}),this.j.e.fire("setMaxHeight",e)}if(this.j.container){let e="auto"!==this.j.o.height||this.j.isFullSize?this.j.container.offsetHeight-this.__getNotWorkHeight():"auto";(0,l.css)(this.j.workplace,"height",e),this.j.container.style.setProperty("--jd-jodit-workplace-height",(0,a.isNumber)(e)?e+"px":e)}let{clientHeight:o,clientWidth:n}=this.j.container;(e!==o||t!==n)&&this.j.e.fire(this.j,"resize")}beforeDestruct(e){e.e.off(e.ow,"load.size",this.__resizeWorkspaces).off(".size")}constructor(...e){super(...e),(0,o._)(this,"__resizeWorkspaces",this.j.async.debounce(this.__resizeWorkspaceImd,this.j.defaultTimeout,!0))}}(0,n.__decorate)([(0,s.throttle)()],u.prototype,"__initialize",null),(0,n.__decorate)([s.autobind],u.prototype,"__setHeight",null),(0,n.__decorate)([s.autobind],u.prototype,"__setWidth",null),(0,n.__decorate)([s.autobind],u.prototype,"__resizeWorkspaceImd",null),r.pluginSystem.add("size",u)},18929:function(e,t,i){"use strict";var o=i(81937),n=i(29434),s=i(5266),r=i(9103),a=i.n(r);s.Config.prototype.beautifyHTML=!o.IS_IE,s.Config.prototype.sourceEditor="ace",s.Config.prototype.sourceEditorNativeOptions={showGutter:!0,theme:"ace/theme/idle_fingers",mode:"ace/mode/html",wrap:!0,highlightActiveLine:!0},s.Config.prototype.sourceEditorCDNUrlsJS=["https://cdnjs.cloudflare.com/ajax/libs/ace/1.43.3/ace.js"],s.Config.prototype.beautifyHTMLCDNUrlsJS=["https://cdnjs.cloudflare.com/ajax/libs/js-beautify/1.14.4/beautify.min.js","https://cdnjs.cloudflare.com/ajax/libs/js-beautify/1.14.4/beautify-html.min.js"],n.Icon.set("source",a()),s.Config.prototype.controls.source={mode:o.MODE_SPLIT,exec(e){e.toggleMode()},isActive:e=>e.getRealMode()===o.MODE_SOURCE,tooltip:"Change mode"}},94978:function(e,t,i){"use strict";i.d(t,{AceEditor:function(){return l}});var o=i(25045),n=i(81937),s=i(23211),r=i(65946),a=i(94193);class l extends a.SourceEditor{aceExists(){return void 0!==this.j.ow.ace}getLastColumnIndex(e){return this.instance.session.getLine(e).length}getLastColumnIndices(){let e=this.instance.session.getLength(),t=[],i=0;for(let o=0;e>o;o++)i+=this.getLastColumnIndex(o),o>0&&(i+=1),t[o]=i;return t}getRowColumnIndices(e){let t=this.getLastColumnIndices();if(e<=t[0])return{row:0,column:e};let i=1;for(let o=1;o<t.length;o++)e>t[o]&&(i=o+1);let o=e-t[i-1]-1;return{row:i,column:o}}setSelectionRangeIndices(e,t){let i=this.getRowColumnIndices(e),o=this.getRowColumnIndices(t);this.instance.getSelection().setSelectionRange({start:i,end:o})}getIndexByRowColumn(e,t){return this.getLastColumnIndices()[e]-this.getLastColumnIndex(e)+t}init(e){let t=()=>{if(void 0!==this.instance||!this.aceExists())return;let t=this.j.c.div("jodit-source__mirror-fake");s.Dom.append(this.container,t);let i=e.ow.ace;this.instance=i.edit(t),"rtl"===e.o.direction&&(this.instance.setOption("rtlText",!0),this.instance.setOption("rtl",!0)),this.instance.setOptions(e.o.sourceEditorNativeOptions),this.instance.setTheme(e.o.sourceEditorNativeOptions.theme),this.instance.renderer.setShowGutter(e.o.sourceEditorNativeOptions.showGutter),this.instance.getSession().setMode(e.o.sourceEditorNativeOptions.mode),this.instance.setHighlightActiveLine(e.o.sourceEditorNativeOptions.highlightActiveLine),this.instance.getSession().setUseWrapMode(!0),this.instance.setOption("indentedSoftWrap",!1),this.instance.setOption("wrap",e.o.sourceEditorNativeOptions.wrap),this.instance.getSession().setUseWorker(!1),this.instance.$blockScrolling=1/0,this.instance.on("change",this.toWYSIWYG),this.instance.on("focus",this.proxyOnFocus),this.instance.on("mousedown",this.proxyOnMouseDown),this.instance.on("blur",this.proxyOnBlur),e.getRealMode()!==n.MODE_WYSIWYG&&this.setValue(this.getValue());let o=this.j.async.throttle(()=>{if(e.isInDestruct||e.getMode()===n.MODE_WYSIWYG)return;let t=this.instance.isFocused();"auto"!==e.o.height?this.instance.setOption("maxLines",e.workplace.offsetHeight/this.instance.renderer.lineHeight):this.instance.setOption("maxLines",1/0),this.instance.resize(),t&&this.focus()},2*this.j.defaultTimeout);e.e.on(e,"resize",o).on("afterResize afterSetMode",o),o(),this.onReady()},i=!1,o=()=>{if(!e.isInDestruct&&(e.getRealMode()===n.MODE_SOURCE||e.getMode()===n.MODE_SPLIT)){if(!this.aceExists()){i||(i=!0,(0,r.loadNext)(e,e.o.sourceEditorCDNUrlsJS).then(o).catch(()=>null));return}t()}};e.e.on("afterSetMode",o),o()}destruct(){this.instance.off("change",this.toWYSIWYG),this.instance.off("focus",this.proxyOnFocus),this.instance.off("mousedown",this.proxyOnMouseDown),this.instance.destroy(),this.j?.events?.off("aceInited.source")}setValue(e){if(!this.j.o.editHTMLDocumentMode&&this.j.o.beautifyHTML){let t=this.j.e.fire("beautifyHTML",e);(0,r.isString)(t)&&(e=t)}this.instance.setValue(e),this.instance.clearSelection()}getValue(){return this.instance.getValue()}setReadOnly(e){this.instance.setReadOnly(e)}get isFocused(){return this.instance.isFocused()}focus(){this.instance.container.focus(),this.instance.focus()}blur(){this.instance.blur()}getSelectionStart(){let e=this.instance.selection.getRange();return this.getIndexByRowColumn(e.start.row,e.start.column)}getSelectionEnd(){let e=this.instance.selection.getRange();return this.getIndexByRowColumn(e.end.row,e.end.column)}selectAll(){this.instance.selection.selectAll()}insertRaw(e){let t=this.instance.selection.getCursor(),i=this.instance.session.insert(t,e);this.instance.selection.setRange({start:t,end:i},!1)}setSelectionRange(e,t){this.setSelectionRangeIndices(e,t)}setPlaceHolder(e){}replaceUndoManager(){let{history:e}=this.jodit;this.instance.commands.addCommand({name:"Undo",bindKey:{win:"Ctrl-Z",mac:"Command-Z"},exec(){e.undo()}}),this.instance.commands.addCommand({name:"Redo",bindKey:{win:"Ctrl-Shift-Z",mac:"Command-Shift-Z"},exec(){e.redo()}})}constructor(...e){super(...e),(0,o._)(this,"className","jodit_ace_editor"),(0,o._)(this,"proxyOnBlur",e=>{this.j.e.fire("blur",e)}),(0,o._)(this,"proxyOnFocus",e=>{this.j.e.fire("focus",e)}),(0,o._)(this,"proxyOnMouseDown",e=>{this.j.e.fire("mousedown",e)})}}},45844:function(e,t,i){"use strict";i.d(t,{TextAreaEditor:function(){return l}});var o=i(25045),n=i(23211),s=i(7909),r=i(80991),a=i(94193);class l extends a.SourceEditor{init(e){this.instance=e.c.element("textarea",{class:"jodit-source__mirror",dir:"rtl"===e.o.direction?"rtl":void 0}),n.Dom.append(this.container,this.instance),e.e.on(this.instance,"mousedown keydown touchstart input",e.async.debounce(this.toWYSIWYG,e.defaultTimeout)).on("setMinHeight.source",e=>{(0,r.css)(this.instance,"minHeight",e)}).on(this.instance,"change keydown mousedown touchstart input",this.autosize).on("afterSetMode.source",this.autosize).on(this.instance,"mousedown focus blur",t=>{e.e.fire(t.type,t)}),this.autosize(),this.onReady()}destruct(){n.Dom.safeRemove(this.instance)}getValue(){return this.instance.value}setValue(e){this.instance.value=e}insertRaw(e){let t=this.getValue();if(this.getSelectionStart()>=0){let i=this.getSelectionStart(),o=this.getSelectionEnd();this.setValue(t.substring(0,i)+e+t.substring(o,t.length))}else this.setValue(t+e)}getSelectionStart(){return this.instance.selectionStart}getSelectionEnd(){return this.instance.selectionEnd}setSelectionRange(e,t=e){this.instance.setSelectionRange(e,t)}get isFocused(){return this.instance===this.j.od.activeElement}focus(){this.instance.focus()}blur(){this.instance.blur()}setPlaceHolder(e){(0,s.attr)(this.instance,"placeholder",e)}setReadOnly(e){(0,s.attr)(this.instance,"readonly",e?"true":null)}selectAll(){this.instance.select()}replaceUndoManager(){let{history:e}=this.jodit;this.j.e.on(this.instance,"keydown",t=>{if((t.ctrlKey||t.metaKey)&&"z"===t.key)return t.shiftKey?e.redo():e.undo(),this.setSelectionRange(this.getValue().length),!1})}constructor(...e){super(...e),(0,o._)(this,"autosize",this.j.async.debounce(()=>{(0,r.css)(this.instance,"height","auto"),(0,r.css)(this.instance,"height",this.instance.scrollHeight)},this.j.defaultTimeout,!0))}}},8105:function(e,t,i){"use strict";i.d(t,{AceEditor:function(){return o.AceEditor},TextAreaEditor:function(){return n.TextAreaEditor}});var o=i(94978),n=i(45844)},82495:function(e,t,i){"use strict";i.d(t,{createSourceEditor:function(){return s}});var o=i(65946),n=i(8105);function s(e,t,i,s,r){let a;if((0,o.isFunction)(e))a=e(t);else switch(e){case"ace":if(!t.o.shadowRoot){a=new n.AceEditor(t,i,s,r);break}default:a=new n.TextAreaEditor(t,i,s,r)}return a.init(t),a.onReadyAlways(()=>{a.setReadOnly(t.o.readonly)}),a}},94193:function(e,t,i){"use strict";i.d(t,{SourceEditor:function(){return n}});var o=i(25045);class n{get j(){return this.jodit}onReady(){this.replaceUndoManager(),this.isReady=!0,this.j.e.fire(this,"ready")}onReadyAlways(e){this.isReady?e():this.j.events?.on(this,"ready",e)}constructor(e,t,i,n){(0,o._)(this,"jodit",void 0),(0,o._)(this,"container",void 0),(0,o._)(this,"toWYSIWYG",void 0),(0,o._)(this,"fromWYSIWYG",void 0),(0,o._)(this,"instance",void 0),(0,o._)(this,"className",void 0),(0,o._)(this,"isReady",void 0),this.jodit=e,this.container=t,this.toWYSIWYG=i,this.fromWYSIWYG=n,this.className="",this.isReady=!1}}},13810:function(e,t,i){"use strict";var o=i(25045),n=i(31635),s=i(81937),r=i(84839),a=i(23211),l=i(28077),c=i(65946),u=i(91206);i(18929);var h=i(82495);class d extends u.Plugin{onInsertHTML(e){if(!this.j.o.readonly&&!this.j.isEditorMode())return this.sourceEditor?.insertRaw(e),this.toWYSIWYG(),!1}fromWYSIWYG(e=!1){if(!this.__lock||!0===e){this.__lock=!0;let e=this.j.getEditorValue(!1,s.SOURCE_CONSUMER);e!==this.getMirrorValue()&&this.setMirrorValue(e),this.__filledValue=this.getMirrorValue(),this.__lock=!1}}toWYSIWYG(){if(this.__lock)return;let e=this.getMirrorValue();e!==this.__oldMirrorValue&&(this.__lock=!0,this.j.value=e,this.__lock=!1,this.__oldMirrorValue=e)}getNormalPosition(e,t){for(t=t.replace(/<(script|style|iframe)[^>]*>[^]*?<\/\1>/im,e=>{let t="";for(let i=0;i<e.length;i+=1)t+=s.INVISIBLE_SPACE;return t});e>0&&t[e]===s.INVISIBLE_SPACE;)e--;let i=e;for(;i>0;){if("<"===t[--i]&&void 0!==t[i+1]&&t[i+1].match(/[\w/]+/i))return i;if(">"===t[i])break}return e}clnInv(e){return e.replace(s.INVISIBLE_SPACE_REG_EXP(),"")}onSelectAll(e){if("selectall"===e.toLowerCase()&&this.j.getRealMode()===s.MODE_SOURCE)return this.sourceEditor?.selectAll(),!1}getMirrorValue(){return this.sourceEditor?.getValue()||""}setMirrorValue(e){this.sourceEditor?.setValue(e)}setFocusToMirror(){let e=this.j.od.activeElement;(!e||e===this.j.od.body||this.j.container.contains(e))&&this.sourceEditor?.focus()}saveSelection(){if(this.j.getRealMode()===s.MODE_WYSIWYG)this.j.s.save(),this.j.synchronizeValues(),this.fromWYSIWYG(!0);else{if(this.j.o.editHTMLDocumentMode)return;let e=this.getMirrorValue();if(this.getSelectionStart()===this.getSelectionEnd()){let t=this.j.s.marker(!0),i=this.getNormalPosition(this.getSelectionStart(),this.getMirrorValue());this.setMirrorValue(e.substring(0,i)+this.clnInv(t.outerHTML)+e.substring(i))}else{let t=this.j.s.marker(!0),i=this.j.s.marker(!1),o=this.getNormalPosition(this.getSelectionStart(),e),n=this.getNormalPosition(this.getSelectionEnd(),e);this.setMirrorValue(e.slice(0,o)+this.clnInv(t.outerHTML)+e.slice(o,n)+this.clnInv(i.outerHTML)+e.slice(n))}this.toWYSIWYG()}}removeSelection(){let e,t;if(this.j.getRealMode()===s.MODE_WYSIWYG){this.__lock=!0,this.j.s.restore(),this.__lock=!1;return}let i=this.getMirrorValue();try{if(i=i.replace(/<span[^>]+data-jodit-selection_marker=(["'])start\1[^>]*>[<>]*?<\/span>/gim,this.tempMarkerStart).replace(/<span[^>]+data-jodit-selection_marker=(["'])end\1[^>]*>[<>]*?<\/span>/gim,this.tempMarkerEnd),!this.j.o.editHTMLDocumentMode&&this.j.o.beautifyHTML){let e=this.j.e.fire("beautifyHTML",i);(0,c.isString)(e)&&(i=e)}if(t=e=i.indexOf(this.tempMarkerStart),i=i.replace(this.tempMarkerStartReg,""),-1!==e){let e=i.indexOf(this.tempMarkerEnd);-1!==e&&(t=e)}i=i.replace(this.tempMarkerEndReg,"")}finally{i=i.replace(this.tempMarkerEndReg,"").replace(this.tempMarkerStartReg,"")}this.setMirrorValue(i),this.setMirrorSelectionRange(e,t),this.toWYSIWYG(),this.setFocusToMirror()}setMirrorSelectionRange(e,t){this.sourceEditor?.setSelectionRange(e,t)}onReadonlyReact(){this.sourceEditor?.setReadOnly(this.j.o.readonly)}afterInit(e){if(this.mirrorContainer=e.c.div("jodit-source"),a.Dom.append(e.workplace,this.mirrorContainer),e.e.on("afterAddPlace changePlace afterInit",()=>{a.Dom.append(e.workplace,this.mirrorContainer)}),this.sourceEditor=(0,h.createSourceEditor)("area",e,this.mirrorContainer,this.toWYSIWYG,this.fromWYSIWYG),e.e.on(e.ow,"keydown",e=>{e.key===s.KEY_ESC&&this.sourceEditor?.isFocused&&this.sourceEditor.blur()}),this.onReadonlyReact(),e.e.on("placeholder.source",e=>{this.sourceEditor?.setPlaceHolder(e)}).on("change.source",this.syncValueFromWYSIWYG).on("beautifyHTML",e=>e),e.o.beautifyHTML){let t=()=>{if(e.isInDestruct)return!1;let t=e.ow.html_beautify;return!!t&&!e.isInDestruct&&(e.events?.off("beautifyHTML").on("beautifyHTML",e=>t(e)),!0)};if(!t()){let i=!1,o=()=>{i||e.getMode()!==s.MODE_SOURCE&&e.getMode()!==s.MODE_SPLIT||(i=!0,(0,c.loadNext)(e,e.o.beautifyHTMLCDNUrlsJS).then(()=>{t()&&this.beautifyUntouched()},()=>null))};e.e.on("afterSetMode.source",o),o()}}this.syncValueFromWYSIWYG(!0),this.initSourceEditor(e)}syncValueFromWYSIWYG(e=!1){let t=this.j;(t.getMode()===s.MODE_SPLIT||t.getMode()===s.MODE_SOURCE)&&this.fromWYSIWYG(e)}initSourceEditor(e){if("area"!==e.o.sourceEditor){let t=(0,h.createSourceEditor)(e.o.sourceEditor,e,this.mirrorContainer,this.toWYSIWYG,this.fromWYSIWYG);t.onReadyAlways(()=>{this.takeOver(t),e.events?.fire("sourceEditorReady",e)})}else this.sourceEditor?.onReadyAlways(()=>{this.syncValueFromWYSIWYG(!0),e.events?.fire("sourceEditorReady",e)})}takeOver(e){let t=this.sourceEditor;if(!t||t===e){this.sourceEditor=e,this.syncValueFromWYSIWYG(!0);return}let i=t.getValue(),o=t.getSelectionStart(),n=t.getSelectionEnd(),s=t.isFocused,r=i===this.__filledValue;t.destruct(),this.sourceEditor=e,r?this.syncValueFromWYSIWYG(!0):(e.setValue(i),this.toWYSIWYG()),o>=0&&e.setSelectionRange(o,n),s&&e.focus()}beautifyUntouched(){let e=this.getMirrorValue();if(this.j.o.editHTMLDocumentMode||!e||e!==this.__filledValue)return;let t=this.j.e.fire("beautifyHTML",e);if((0,c.isString)(t)&&t!==e){let e=this.sourceEditor?.isFocused;this.setMirrorValue(t),this.__filledValue=this.getMirrorValue(),e&&this.sourceEditor?.focus()}}beforeDestruct(){this.sourceEditor&&(this.sourceEditor.destruct(),delete this.sourceEditor),a.Dom.safeRemove(this.mirrorContainer)}constructor(...e){super(...e),(0,o._)(this,"buttons",[{name:"source",group:"source"}]),(0,o._)(this,"sourceEditor",void 0),(0,o._)(this,"mirrorContainer",void 0),(0,o._)(this,"__lock",!1),(0,o._)(this,"__oldMirrorValue",""),(0,o._)(this,"__filledValue",""),(0,o._)(this,"tempMarkerStart","{start-jodit-selection}"),(0,o._)(this,"tempMarkerStartReg",/{start-jodit-selection}/g),(0,o._)(this,"tempMarkerEnd","{end-jodit-selection}"),(0,o._)(this,"tempMarkerEndReg",/{end-jodit-selection}/g),(0,o._)(this,"getSelectionStart",()=>this.sourceEditor?.getSelectionStart()??0),(0,o._)(this,"getSelectionEnd",()=>this.sourceEditor?.getSelectionEnd()??0)}}(0,n.__decorate)([(0,r.watch)(":insertHTML.source")],d.prototype,"onInsertHTML",null),(0,n.__decorate)([r.autobind],d.prototype,"fromWYSIWYG",null),(0,n.__decorate)([r.autobind],d.prototype,"toWYSIWYG",null),(0,n.__decorate)([r.autobind],d.prototype,"getNormalPosition",null),(0,n.__decorate)([(0,r.watch)(":beforeCommand.source")],d.prototype,"onSelectAll",null),(0,n.__decorate)([(0,r.watch)(":beforeSetMode.source")],d.prototype,"saveSelection",null),(0,n.__decorate)([(0,r.watch)(":afterSetMode.source")],d.prototype,"removeSelection",null),(0,n.__decorate)([r.autobind],d.prototype,"setMirrorSelectionRange",null),(0,n.__decorate)([(0,r.watch)(":readonly.source")],d.prototype,"onReadonlyReact",null),(0,n.__decorate)([r.autobind],d.prototype,"syncValueFromWYSIWYG",null),l.pluginSystem.add("source",d)},75143:function(e,t,i){"use strict";var o=i(22289),n=i(85932),s=i(7909),r=i(36400),a=i(29434),l=i(5266),c=i(97743),u=i(68097),h=i(22227),d=i.n(h);l.Config.prototype.speechRecognize={api:void 0!==c.SpeechRecognition?c.SpeechRecognition:null,sound:!0,continuous:!1,interimResults:!0,commands:{"newline|enter":"enter","delete|remove word|delete word":"backspaceWordButton",comma:"inserthtml::,",underline:"inserthtml::_",hyphen:"inserthtml::-",space:"inserthtml:: ",question:"inserthtml::?",dot:"inserthtml::.","quote|quotes|open quote":"inserthtml::'","header|header h1":"formatblock::h1","select all":"selectall"}},a.Icon.set("speech-recognize",d()),l.Config.prototype.controls.speechRecognize={isVisible:e=>!!e.o.speechRecognize.api,isActive(e,t){let i=(0,r.dataBind)(e,"speech");return!!i?.isEnabled},isDisabled:e=>!e.o.speechRecognize.api,exec(e,t,{button:i,control:a}){let{api:l,lang:c,continuous:h,interimResults:d,sound:p}=e.o.speechRecognize;if(!l)return void e.alert("Speech recognize API unsupported in your browser");let f=(0,r.dataBind)(e,"speech");if(!f){let t=new l;(f=new u.RecognizeManager(e.async,t)).lang=(0,n.isString)(c)?c:(0,s.attr)(e.od.documentElement,"lang")??void 0,f.continuous=h,f.interimResults=d,f.sound=p,(0,r.dataBind)(e,"speech",f),f.on("pulse",e=>{i.setMod("pulse",e)}),f.on("result",t=>e.e.fire("speechRecognizeResult",t)),f.on("progress",t=>e.e.fire("speechRecognizeProgressResult",t)),f.on("error",t=>e.message.error(t)),e.hookStatus("beforeDestruct",()=>{(0,r.dataBind)(e,"speech",null),f.destruct()})}if(a.args){let e=a.args[0];if((0,o.isBoolean)(f[e])){f[e]=!f[e],f.isEnabled&&f.restart();return}}f.toggle(),f.isEnabled&&i.setMod("pulse",!0),i.state.activated=f.isEnabled},name:"speechRecognize",command:"toggleSpeechRecognize",tooltip:"Speech Recognize",list:{sound:"Sound",interimResults:"Interim Results"},childTemplate(e,t,i){let o=(0,r.dataBind)(e,"speech"),n=o?.[t]??e.o.speechRecognize[t];return`<span class='jodit-speech-recognize__list-item'><input ${n?"checked":""} class='jodit-checkbox' type='checkbox'>&nbsp;${i}</span>`},mods:{stroke:!1}}},97743:function(e,t,i){"use strict";var o=i(81937);let n=o.globalWindow?o.globalWindow.SpeechRecognition||o.globalWindow.webkitSpeechRecognition:void 0;i.d(t,["SpeechRecognition",0,n])},86581:function(e,t,i){"use strict";function o(e,t){let[i,o]=t.split("::");"open"===i.toLowerCase()&&o&&/^(javascript:|data:|vbscript:)/i.test(o.trim())||e.execCommand(i,null,o)}i.d(t,{execSpellCommand:function(){return o}})},68097:function(e,t,i){"use strict";i.d(t,{RecognizeManager:function(){return l}});var o=i(25045),n=i(31635),s=i(84839),r=i(60216),a=i(32560);class l extends r.Eventify{set lang(e){this._lang=e,this._api.lang=e}get lang(){return this._lang}set continuous(e){this._continuous=e,this._api.continuous=e}get continuous(){return this._continuous}set interimResults(e){this._interimResults=e,this._api.interimResults=e}get interimResults(){return this._interimResults}destruct(){this.stop(),(0,a.closeSound)(this),l._instances.delete(this),super.destruct()}get isEnabled(){return this._isEnabled}start(){if(!this._isEnabled){this._isEnabled=!0,l._instances.forEach(e=>{e!==this&&e.stop()});try{this._api.start()}catch(e){this._onError(e),this.stop();return}this.__on("speechstart",this._onSpeechStart).__on("error",this._onError).__on("result",this._onProgress).__on("end",this._onResults)}}stop(){this._isEnabled&&(this._api.abort(),this._api.stop(),this.__off("speechstart",this._onSpeechStart).__off("error",this._onError).__off("result",this._onProgress).__off("end",this._onResults),this.async.clearTimeout(this._restartTimeout),this._isEnabled=!1,this.emit("pulse",!1))}toggle(){this._isEnabled?this.stop():this.start()}restart(){this.stop(),this.start()}__on(e,t){return this._api.addEventListener(e,t),this}__off(e,t){return this._api.removeEventListener(e,t),this}_onResults(e){this.emit("pulse",!1),this.emit("result",this.__interimResults),this.__interimResults="",this._makeSound(440),this.restart()}_onProgress(e){if(this._isEnabled&&(this.__interimResults="",e.results)){for(let t=0;t<e.results.length;t++){let i=e.results.item(t);if(i.length){let{transcript:e}=i.item(0);this.__interimResults+=e}}this.__interimResults&&this.emit("progress",this.__interimResults)}}_onError(e){"voice-unavailable"===e.error&&this.emit("error","Voice unavailable"),"not-allowed"===e.error&&this.emit("error","Not allowed"),("language-unavailable"===e.error||"language-not-supported"===e.error)&&this.emit("error","Language unavailable"),this._makeSound(940),this.emit("pulse",!1),this.stop()}_makeSound(e){this.sound&&(0,a.sound)(this,{frequency:e})}constructor(e,t){super(),(0,o._)(this,"async",void 0),(0,o._)(this,"_lang",void 0),(0,o._)(this,"_continuous",void 0),(0,o._)(this,"_interimResults",void 0),(0,o._)(this,"sound",void 0),(0,o._)(this,"_isEnabled",void 0),(0,o._)(this,"_restartTimeout",void 0),(0,o._)(this,"_onSpeechStart",void 0),(0,o._)(this,"_api",void 0),(0,o._)(this,"__interimResults",void 0),this.async=e,this._continuous=!1,this._interimResults=!1,this.sound=!0,this._isEnabled=!1,this._restartTimeout=0,this._onSpeechStart=e=>{this._isEnabled&&(this.async.clearTimeout(this._restartTimeout),this._restartTimeout=this.async.setTimeout(()=>{this.restart(),this.emit("pulse",!1),this._makeSound(940)},5e3),this.emit("pulse",!0))},this.__interimResults="",this._api=t,l._instances.add(this)}}(0,o._)(l,"_instances",new Set),(0,n.__decorate)([s.autobind],l.prototype,"_onResults",null),(0,n.__decorate)([s.autobind],l.prototype,"_onProgress",null),(0,n.__decorate)([s.autobind],l.prototype,"_onError",null)},32560:function(e,t,i){"use strict";i.d(t,{closeSound:function(){return r},sound:function(){return s}});var o=i(81937);let n=new WeakMap;function s(e,{sec:t=.1,frequency:i=440,gain:r=.1,type:a="sine"}={}){let l=function(e){if(!o.globalWindow)return null;let t=n.get(e);if(t&&"closed"!==t.state)return t;let i=o.globalWindow.AudioContext||o.globalWindow.webkitAudioContext;if(!i)return null;let s=new i;return n.set(e,s),s}(e);if(!l)return;let c=l.createGain(),u=l.createOscillator();u.type=a,u.frequency.value=i,c.gain.value=r,u.connect(c),c.connect(l.destination),u.start(),u.stop(l.currentTime+t)}function r(e){let t=n.get(e);t&&(n.delete(e),"closed"!==t.state&&t.close())}},43219:function(e,t,i){"use strict";i.r(t),i.d(t,{ar:function(){return o},cs_cz:function(){return o},de:function(){return o},es:function(){return o},fa:function(){return o},fi:function(){return o},fr:function(){return o},he:function(){return o},hu:function(){return o},id:function(){return o},it:function(){return o},ja:function(){return o},ko:function(){return o},mn:function(){return o},nl:function(){return o},no:function(){return o},pl:function(){return o},pt_br:function(){return o},ru:function(){return o},sk:function(){return o},tr:function(){return o},ua:function(){return o},zh_cn:function(){return o},zh_tw:function(){return o}});var o=i(41324)},31262:function(e,t,i){"use strict";var o=i(25045),n=i(31635),s=i(68616),r=i(23211),a=i(28077),l=i(71125),c=i(91206);i(75143);var u=i(73302),h=i(86581),d=i(43219);class p extends c.Plugin{afterInit(e){let{commands:t}=e.o.speechRecognize;t&&((0,a.extendLang)(d),(0,l.keys)(t,!1).forEach(i=>{i.split("|").forEach(o=>{o=o.trim().toLowerCase(),this._commandToWord[o]=t[i];let n=e.i18n(o);n!==o&&n.split("|").forEach(e=>{this._commandToWord[e.trim().toLowerCase()]=t[i].trim()})})}))}beforeDestruct(e){r.Dom.safeRemove(this.messagePopup)}onSpeechRecognizeProgressResult(e){this.messagePopup||(this.messagePopup=this.j.create.div("jodit-speech-recognize__popup")),r.Dom.append(this.j.workplace,this.messagePopup),this.j.async.clearTimeout(this.__hidePopupTimeout),this.__hidePopupTimeout=this.j.async.setTimeout(()=>{r.Dom.safeRemove(this.messagePopup)},1e3),this.messagePopup.innerText=e+"|"}onSpeechRecognizeResult(e){this.j.async.clearTimeout(this.__hidePopupTimeout),r.Dom.safeRemove(this.messagePopup);let{j:t}=this,{s:i}=t;if(!this._checkCommand(e)){let{range:o}=i,n=i.current();if(i.isCollapsed()&&r.Dom.isText(n)&&r.Dom.isOrContains(t.editor,n)&&n.nodeValue){let s=n.nodeValue;n.nodeValue=s+(/[\u00A0 ]\uFEFF*$/.test(s)?"":" ")+e,o.setStartAfter(n),i.selectRange(o),t.synchronizeValues()}else i.insertHTML(e)}}_checkCommand(e){return e=e.toLowerCase().replace(/\./g,""),!!this._commandToWord[e]&&((0,h.execSpellCommand)(this.j,this._commandToWord[e]),!0)}constructor(...e){super(...e),(0,o._)(this,"buttons",[{group:"state",name:"speechRecognize"}]),(0,o._)(this,"messagePopup",void 0),(0,o._)(this,"__hidePopupTimeout",void 0),(0,o._)(this,"_commandToWord",{})}}(0,n.__decorate)([(0,s.watch)(":speechRecognizeProgressResult")],p.prototype,"onSpeechRecognizeProgressResult",null),(0,n.__decorate)([(0,s.watch)(":speechRecognizeResult")],p.prototype,"onSpeechRecognizeResult",null),u.Jodit.plugins.add("speech-recognize",p)},24268:function(e,t,i){"use strict";var o=i(29434),n=i(5266),s=i(49989),r=i.n(s);n.Config.prototype.spellcheck=!1,o.Icon.set("spellcheck",r()),n.Config.prototype.controls.spellcheck={isActive:e=>e.o.spellcheck,icon:r(),name:"spellcheck",command:"toggleSpellcheck",tooltip:"Spellcheck"}},33494:function(e,t,i){"use strict";i.r(t),i.d(t,{ar:function(){return o},cs_cz:function(){return o},de:function(){return o},es:function(){return o},fa:function(){return o},fi:function(){return o},fr:function(){return o},he:function(){return o},hu:function(){return o},id:function(){return o},it:function(){return o},ja:function(){return o},ko:function(){return o},mn:function(){return o},nl:function(){return o},no:function(){return o},pl:function(){return o},pt_br:function(){return o},ru:function(){return o},sk:function(){return o},tr:function(){return o},ua:function(){return o},zh_cn:function(){return o},zh_tw:function(){return o}});var o=i(41324)},90204:function(e,t,i){"use strict";var o=i(25045),n=i(31635),s=i(84839),r=i(28077),a=i(7909),l=i(91206);i(24268);var c=i(33494);class u extends l.Plugin{afterInit(e){e.e.on("afterInit afterAddPlace prepareWYSIWYGEditor",this.toggleSpellcheck),this.toggleSpellcheck(),e.registerCommand("toggleSpellcheck",()=>{this.jodit.o.spellcheck=!this.jodit.o.spellcheck,this.toggleSpellcheck(),this.j.e.fire("updateToolbar")})}toggleSpellcheck(){(0,a.attr)(this.jodit.editor,"spellcheck",this.jodit.o.spellcheck)}beforeDestruct(e){}constructor(e){super(e),(0,o._)(this,"buttons",[{group:"state",name:"spellcheck"}]),(0,r.extendLang)(c)}}(0,n.__decorate)([s.autobind],u.prototype,"toggleSpellcheck",null),r.pluginSystem.add("spellcheck",u)},88580:function(e,t,i){"use strict";var o=i(5266);o.Config.prototype.showCharsCounter=!0,o.Config.prototype.countHTMLChars=!1,o.Config.prototype.countTextSpaces=!1,o.Config.prototype.showWordsCounter=!0},86236:function(e,t,i){"use strict";var o=i(25045),n=i(81937),s=i(23211),r=i(28077),a=i(18855);i(88580);class l extends a.Plugin{afterInit(){this.charCounter=this.j.c.span(),this.wordCounter=this.j.c.span(),this.j.e.on("afterInit changePlace afterAddPlace",this.reInit),this.reInit()}beforeDestruct(){s.Dom.safeRemove(this.charCounter),s.Dom.safeRemove(this.wordCounter),this.j.e.off("afterInit changePlace afterAddPlace",this.reInit),this.charCounter=null,this.wordCounter=null}constructor(...e){super(...e),(0,o._)(this,"charCounter",null),(0,o._)(this,"wordCounter",null),(0,o._)(this,"reInit",()=>{this.j.o.showCharsCounter&&this.charCounter&&this.j.statusbar.append(this.charCounter,!0),this.j.o.showWordsCounter&&this.wordCounter&&this.j.statusbar.append(this.wordCounter,!0),this.j.e.off("change keyup",this.calc).on("change keyup",this.calc),this.calc()}),(0,o._)(this,"calc",this.j.async.throttle(()=>{let e=this.j.text;if(this.j.o.showCharsCounter&&this.charCounter){let t;t=this.j.o.countHTMLChars?this.j.value:this.j.o.countTextSpaces?e.replace((0,n.INVISIBLE_SPACE_REG_EXP)(),"").replace(/[\r\n]/g,""):e.replace((0,n.SPACE_REG_EXP)(),""),this.charCounter.textContent=this.j.i18n("Chars: %d",t.length)}this.j.o.showWordsCounter&&this.wordCounter&&(this.wordCounter.textContent=this.j.i18n("Words: %d",e.replace((0,n.INVISIBLE_SPACE_REG_EXP)(),"").split((0,n.SPACE_REG_EXP)()).filter(e=>e.length).length))},this.j.defaultTimeout))}}r.pluginSystem.add("stat",l)},79803:function(e,t,i){"use strict";var o=i(5266);o.Config.prototype.toolbarSticky=!0,o.Config.prototype.toolbarDisableStickyForMobile=!0,o.Config.prototype.toolbarStickyOffset=0},67582:function(e,t,i){"use strict";var o=i(25045),n=i(31635),s=i(81937),r=i(84839),a=i(23211),l=i(28077),c=i(65946),u=i(18855);i(79803);let h=!s.IS_ES_NEXT&&s.IS_IE;class d extends u.Plugin{afterInit(e){e.e.on(e.ow,"scroll.sticky wheel.sticky mousewheel.sticky resize.sticky",this.__onScroll).on("getStickyState.sticky",()=>this.__isToolbarStuck)}__onScroll(){let{jodit:e}=this;if(!e.o.toolbarSticky||!e.o.toolbar)return;let t=e.ow.pageYOffset||e.od.documentElement&&e.od.documentElement.scrollTop||0,i=(0,c.offset)(e.container,e,e.od,!0),o=e.getMode()===s.MODE_WYSIWYG&&t+e.o.toolbarStickyOffset>i.top&&t+e.o.toolbarStickyOffset<i.top+i.height&&!(e.o.toolbarDisableStickyForMobile&&this.__isMobile());if(this.__isToolbarStuck===o)return;let n=e.toolbarContainer;n&&(o?this.addSticky(n):this.removeSticky(n)),e.e.fire("toggleSticky",o)}__isMobile(){let{j:e}=this;return e&&e.options&&e.container&&e.options.sizeSM>=e.container.offsetWidth}beforeDestruct(e){a.Dom.safeRemove(this.__dummyBox),e.e.off(e.ow,"scroll.sticky wheel.sticky mousewheel.sticky resize.sticky",this.__onScroll).off(".sticky")}constructor(...e){super(...e),(0,o._)(this,"__isToolbarStuck",!1),(0,o._)(this,"__dummyBox",void 0),(0,o._)(this,"__createDummy",e=>{this.__dummyBox=this.j.c.div(),this.__dummyBox.classList.add("jodit_sticky-dummy_toolbar"),a.Dom.before(e,this.__dummyBox)}),(0,o._)(this,"addSticky",e=>{this.__isToolbarStuck||(h&&!this.__dummyBox&&this.__createDummy(e),this.j.container.classList.add("jodit_sticky"),this.__isToolbarStuck=!0),(0,c.css)(e,{top:this.j.o.toolbarStickyOffset||null,width:this.j.container.offsetWidth-2}),this.__dummyBox&&(0,c.css)(this.__dummyBox,{height:e.offsetHeight})}),(0,o._)(this,"removeSticky",e=>{this.__isToolbarStuck&&((0,c.css)(e,{width:"",top:""}),this.j.container.classList.remove("jodit_sticky"),this.__isToolbarStuck=!1)})}}(0,n.__decorate)([(0,r.throttle)()],d.prototype,"__onScroll",null),l.pluginSystem.add("sticky",d)},18993:function(e,t,i){"use strict";var o=i(23211),n=i(29434),s=i(5266),r=i(81875),a=i.n(r);s.Config.prototype.usePopupForSpecialCharacters=!1,s.Config.prototype.specialCharacters=["!","&quot;","#","$","%","&amp;","'","(",")","*","+","-",".","/","0","1","2","3","4","5","6","7","8","9",":",";","&lt;","=","&gt;","?","@","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","[","]","^","_","`","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","{","|","}","~","&euro;","&lsquo;","&rsquo;","&ldquo;","&rdquo;","&ndash;","&mdash;","&iexcl;","&cent;","&pound;","&curren;","&yen;","&brvbar;","&sect;","&uml;","&copy;","&ordf;","&laquo;","&raquo;","&not;","&reg;","&macr;","&deg;","&sup2;","&sup3;","&acute;","&micro;","&para;","&middot;","&cedil;","&sup1;","&ordm;","&frac14;","&frac12;","&frac34;","&iquest;","&Agrave;","&Aacute;","&Acirc;","&Atilde;","&Auml;","&Aring;","&AElig;","&Ccedil;","&Egrave;","&Eacute;","&Ecirc;","&Euml;","&Igrave;","&Iacute;","&Icirc;","&Iuml;","&ETH;","&Ntilde;","&Ograve;","&Oacute;","&Ocirc;","&Otilde;","&Ouml;","&times;","&Oslash;","&Ugrave;","&Uacute;","&Ucirc;","&Uuml;","&Yacute;","&THORN;","&szlig;","&agrave;","&aacute;","&acirc;","&atilde;","&auml;","&aring;","&aelig;","&ccedil;","&egrave;","&eacute;","&ecirc;","&euml;","&igrave;","&iacute;","&icirc;","&iuml;","&eth;","&ntilde;","&ograve;","&oacute;","&ocirc;","&otilde;","&ouml;","&divide;","&oslash;","&ugrave;","&uacute;","&ucirc;","&uuml;","&yacute;","&thorn;","&yuml;","&OElig;","&oelig;","&#372;","&#374","&#373","&#375;","&sbquo;","&#8219;","&bdquo;","&hellip;","&trade;","&#9658;","&bull;","&rarr;","&rArr;","&hArr;","&diams;","&asymp;"],n.Icon.set("symbols",a()),s.Config.prototype.controls.symbols={hotkeys:["ctrl+shift+i","cmd+shift+i"],tooltip:"Insert Special Character",popup(e,t,i){let n=e.e.fire("generateSpecialCharactersTable.symbols");if(n){if(e.o.usePopupForSpecialCharacters){let t=e.c.div();return t.classList.add("jodit-symbols"),o.Dom.append(t,n),e.e.on(n,"close_dialog",i),t}e.alert(n,"Select Special Character",void 0,"jodit-symbols").bindDestruct(e);let t=o.Dom.first(n,e=>o.Dom.isTag(e,"a"));t&&t.focus()}}}},91017:function(e,t,i){"use strict";i.r(t),i.d(t,{ar:function(){return o},cs_cz:function(){return o},de:function(){return o},es:function(){return o},fa:function(){return o},fi:function(){return o},fr:function(){return o},he:function(){return o},hu:function(){return o},id:function(){return o},it:function(){return o},ja:function(){return o},ko:function(){return o},mn:function(){return o},nl:function(){return o},pl:function(){return o},pt_br:function(){return o},ru:function(){return o},tr:function(){return o},ua:function(){return o},zh_cn:function(){return o},zh_tw:function(){return o}});var o=i(41324)},11774:function(e,t,i){"use strict";var o=i(25045),n=i(81937),s=i(23211),r=i(28077),a=i(93640),l=i(18855);i(18993);var c=i(91017);class u extends l.Plugin{afterInit(e){e.e.on("generateSpecialCharactersTable.symbols",()=>{let t=e.c.fromHTML(`<div class="jodit-symbols__container">
259
+ </div>`}get currentIndex(){return this._currentIndex}set currentIndex(e){this._currentIndex=e,this.currentBox.innerText=e.toString()}set count(e){this.countBox.innerText=e.toString()}get query(){return this.queryInput.value}get replace(){return this.replaceInput.value}onEditorKeyDown(e){if(!this.isOpened)return;let{j:t}=this;if(t.getRealMode()===s.MODE_WYSIWYG)switch(e.key){case s.KEY_ESC:this.close();break;case s.KEY_F3:this.queryInput.value&&(t.e.fire(e.shiftKey?"searchPrevious":"searchNext"),e.preventDefault())}}open(e,t,i=!1){this.isOpened||(a.Dom.append(this.j.workplace,this.container),this.isOpened=!0),this.calcSticky(this.j.e.fire("getStickyState.sticky")||!1),this.j.e.fire("hidePopup"),this.setMod("replace",i);let o=e??(this.j.s.sel||"").toString();o&&(this.queryInput.value=o),t&&(this.replaceInput.value=t),this.setMod("empty-query",!o.length),this.j.e.fire(this,"needUpdateCounters"),o?this.queryInput.select():this.queryInput.focus()}close(){this.isOpened&&(this.j.s.restore(),a.Dom.safeRemove(this.container),this.isOpened=!1,this.j.e.fire(this,"afterClose"))}calcSticky(e){if(this.isOpened)if(this.setMod("sticky",e),e){let e=(0,l.position)(this.j.toolbarContainer);(0,l.css)(this.container,{top:e.top+e.height,left:e.left+e.width})}else(0,l.css)(this.container,{top:null,left:null})}constructor(e){let t;super(e),(0,o._)(this,"queryInput",void 0),(0,o._)(this,"replaceInput",void 0),(0,o._)(this,"selInfo",null),(0,o._)(this,"closeButton",void 0),(0,o._)(this,"replaceButton",void 0),(0,o._)(this,"currentBox",void 0),(0,o._)(this,"countBox",void 0),(0,o._)(this,"_currentIndex",0),(0,o._)(this,"isOpened",!1);let{query:i,replace:n,cancel:r,next:a,prev:c,replaceBtn:u,current:h,count:d}=(0,l.refs)(this.container);this.queryInput=i,this.replaceInput=n,this.closeButton=r,this.replaceButton=u,this.currentBox=h,this.countBox=d;let f=()=>this.close(),p=()=>void e.e.fire(this,"pressReplaceButton"),m=()=>void e.e.fire("searchNext"),g=()=>void e.e.fire("searchPrevious"),_=e=>t=>{t.detail||(t.preventDefault(),e())};e.e.on(this.closeButton,"pointerdown",()=>(f(),!1)).on(this.closeButton,"click",_(f)).on(this.queryInput,"input",()=>{this.currentIndex=0}).on(this.queryInput,"pointerdown",()=>{e.s.isFocused()&&(e.s.removeMarkers(),this.selInfo=e.s.save())}).on(this.replaceButton,"pointerdown",()=>(p(),!1)).on(this.replaceButton,"click",_(p)).on(a,"pointerdown",()=>(m(),!1)).on(a,"click",_(m)).on(c,"pointerdown",()=>(g(),!1)).on(c,"click",_(g)).on(this.queryInput,"input",()=>{this.setMod("empty-query",!(0,l.trim)(this.queryInput.value).length)}).on(this.queryInput,"keydown",(t=this.j.async.debounce(async t=>{t.key===s.KEY_ENTER?await e.e.fire("searchNext")&&this.close():e.e.fire(this,"needUpdateCounters")},this.j.defaultTimeout),e=>{e.key===s.KEY_ENTER&&(e.preventDefault(),e.stopImmediatePropagation()),t(e)}))}}(0,n.__decorate)([(0,r.watch)([":keydown","queryInput:keydown"])],u.prototype,"onEditorKeyDown",null),(0,n.__decorate)([r.autobind],u.prototype,"open",null),(0,n.__decorate)([r.autobind],u.prototype,"close",null),(0,n.__decorate)([(0,r.watch)(":toggleSticky")],u.prototype,"calcSticky",null),u=(0,n.__decorate)([r.component],u)},69070:function(e,t,i){"use strict";i(5266).Config.prototype.tableAllowCellSelection=!0},2756:function(e,t,i){"use strict";var o=i(25045),n=i(31635),s=i(81937),r=i(84839),a=i(23211),l=i(28077),c=i(65946),u=i(91206),h=i(98803);i(69070);let d="table_processor_observer",f="onMoveTableSelectCell";class p extends u.Plugin{get __tableModule(){return this.j.getInstance(h.Table,this.j.o)}afterInit(e){e.o.tableAllowCellSelection&&e.e.on("keydown.select-cells",e=>{e.key===s.KEY_TAB&&this.unselectCells()}).on("beforeCommand.select-cells",this.onExecCommand).on("afterCommand.select-cells",this.onAfterCommand).on(["clickEditor","mousedownTd","mousedownTh","touchstartTd","touchstartTh"].map(e=>e+".select-cells").join(" "),this.onStartSelection).on("clickTr clickTbody",()=>{let e=this.__tableModule.getAllSelectedCells().length;if(e)return e>1&&this.j.s.sel?.removeAllRanges(),!1})}onStartSelection(e,t){if(this.j.o.readonly)return;let i=a.Dom.closest(e,"table",this.j.editor);return(t?.ctrlKey||t?.metaKey)&&e!==this.j.editor&&i&&a.Dom.isCell(e)?(this.__tableModule.getAllSelectedCells().includes(e)?this.__tableModule.removeSelection(e):(e.firstChild||a.Dom.append(e,this.j.createInside.element("br")),this.__tableModule.addSelection(e)),this.__selectedCell=e,this.j.s.sel?.removeAllRanges(),this.__tableModule.getAllSelectedCells().length?this.j.e.fire("showPopup",i,()=>(0,c.position)(e,this.j),"cells"):this.j.e.fire("hidePopup","cells"),!1):(this.unselectCells(),e===this.j.editor)?void 0:e&&i?(e.firstChild||a.Dom.append(e,this.j.createInside.element("br")),this.__isSelectionMode=!0,this.__selectedCell=e,this.__tableModule.addSelection(e),this.j.e.on(i,"mousemove.select-cells touchmove.select-cells",this.j.async.throttle(this.__onMove.bind(this,i),{label:f,timeout:this.j.defaultTimeout/2})).on(i,"mouseup.select-cells touchend.select-cells",this.__onStopSelection.bind(this,i)),!1):void 0}onOutsideClick(){this.__selectedCell=null,this.__onRemoveSelection()}onChange(){this.j.isLocked||this.__isSelectionMode||this.__onRemoveSelection()}__onMove(e,t){let i;if(this.j.o.readonly&&!this.j.isLocked||this.j.isLockedNotBy(d))return;let o=(this.j.o.shadowRoot??this.j.ed).elementFromPoint(t.clientX,t.clientY);if(!o)return;let n=a.Dom.closest(o,["td","th"],e);if(!n||!this.__selectedCell)return;n!==this.__selectedCell&&this.j.lock(d),this.unselectCells();let s=this.__tableModule.getSelectedBound(e,[n,this.__selectedCell]),r=this.__tableModule.formalMatrix(e);for(let e=s[0][0];e<=s[1][0];e+=1)for(let t=s[0][1];t<=s[1][1];t+=1)this.__tableModule.addSelection(r[e][t]);this.__tableModule.getAllSelectedCells().length>1&&this.j.s.sel?.removeAllRanges(),this.j.e.fire("hidePopup"),t.stopPropagation(),i=this.j.createInside.fromHTML('<div style="color:rgba(0,0,0,0.01);width:0;height:0">&nbsp;</div>'),a.Dom.append(n,i),this.j.async.setTimeout(()=>{a.Dom.safeRemove(i)},this.j.defaultTimeout/5)}__onRemoveSelection(e){if(!e?.buffer?.actionTrigger&&!this.__selectedCell&&this.__tableModule.getAllSelectedCells().length){this.j.unlock(),this.unselectCells(),this.j.e.fire("hidePopup","cells");return}this.__isSelectionMode=!1,this.__selectedCell=null}__onStopSelection(e,t){if(!this.__selectedCell)return;this.__isSelectionMode=!1,this.j.unlock();let i=(this.j.o.shadowRoot??this.j.ed).elementFromPoint(t.clientX,t.clientY);if(!i)return;let o=a.Dom.closest(i,["td","th"],e);if(!o)return;let n=a.Dom.closest(o,"table",e);if(n&&n!==e)return;let s=this.__tableModule.getSelectedBound(e,[o,this.__selectedCell]),r=this.__tableModule.formalMatrix(e),l=r[s[1][0]]?.[s[1][1]],u=r[s[0][0]]?.[s[0][1]];u&&l&&(this.j.e.fire("showPopup",e,()=>{let e=(0,c.position)(u,this.j),t=(0,c.position)(l,this.j);return{left:e.left,top:e.top,width:t.left-e.left+t.width,height:t.top-e.top+t.height}},"cells"),(0,c.$$)("table",this.j.editor).forEach(e=>{this.j.e.off(e,"mousemove.select-cells touchmove.select-cells mouseup.select-cells touchend.select-cells")}),this.j.async.clearTimeout(f))}unselectCells(e){let t=this.__tableModule,i=t.getAllSelectedCells();i.length&&i.forEach(i=>{e&&e===i||t.removeSelection(i)})}onExecCommand(e){if(/^(delete|backspace)(word|sentence)?button$/.test(e)&&this.__tableModule.getAllSelectedCells().length>1){let e=this.__tableModule.getAllSelectedCells();return e.forEach(e=>{a.Dom.detach(e),a.Dom.append(e,this.j.createInside.element("br"))}),this.unselectCells(),this.j.s.setCursorIn(e[0]),this.j.synchronizeValues(),!1}if(/table(splitv|splitg|merge|empty|bin|binrow|bincolumn|addcolumn|addrow)/.test(e)){e=e.replace("table","");let t=this.__tableModule.getAllSelectedCells();if(t.length){let[i]=t;if(!i)return;let o=a.Dom.closest(i,"table",this.j.editor);if(!o)return;switch(e){case"splitv":this.__tableModule.splitVertical(o);break;case"splitg":this.__tableModule.splitHorizontal(o);break;case"merge":this.__tableModule.mergeSelected(o);break;case"empty":t.forEach(e=>a.Dom.detach(e));break;case"bin":a.Dom.safeRemove(o);break;case"binrow":new Set(t.map(e=>e.parentNode)).forEach(e=>{this.__tableModule.removeRow(o,e.rowIndex)});break;case"bincolumn":{let e=new Set,i=[];t.forEach(t=>{let[,n]=this.__tableModule.formalCoordinate(o,t);e.has(n)||(i.push(n),e.add(n))}),i.sort((e,t)=>t-e).forEach(e=>{this.__tableModule.removeColumn(o,e)})}break;case"addcolumnafter":case"addcolumnbefore":this.__tableModule.appendColumn(o,i,"addcolumnafter"===e);break;case"addrowafter":case"addrowbefore":this.__tableModule.appendRow(o,i.parentNode,"addrowafter"===e)}}return!1}}onAfterCommand(e){/^justify/.test(e)&&this.__tableModule.getAllSelectedCells().forEach(t=>(0,c.alignElement)(e,t))}beforeDestruct(e){this.__onRemoveSelection(),e.e.off(".select-cells")}constructor(...e){super(...e),(0,o._)(this,"__selectedCell",null),(0,o._)(this,"__isSelectionMode",!1)}}(0,o._)(p,"requires",["select"]),(0,n.__decorate)([r.autobind],p.prototype,"onStartSelection",null),(0,n.__decorate)([(0,r.watch)(":outsideClick")],p.prototype,"onOutsideClick",null),(0,n.__decorate)([(0,r.watch)(":change")],p.prototype,"onChange",null),(0,n.__decorate)([r.autobind],p.prototype,"__onRemoveSelection",null),(0,n.__decorate)([r.autobind],p.prototype,"__onStopSelection",null),(0,n.__decorate)([r.autobind],p.prototype,"onExecCommand",null),(0,n.__decorate)([r.autobind],p.prototype,"onAfterCommand",null),l.pluginSystem.add("selectCells",p)},47670:function(e,t,i){"use strict";i(5266).Config.prototype.select={normalizeSelectionBeforeCutAndCopy:!1,normalizeTripleClick:!0}},98988:function(e,t,i){"use strict";var o=i(25045),n=i(31635),s=i(81937),r=i(84839),a=i(23211),l=i(28077),c=i(57821),u=i(91206),h=i(4099);i(47670);class d extends u.Plugin{afterInit(e){this.proxyEventsList.forEach(t=>{e.e.on(t+".select",this.onStartSelection)})}beforeDestruct(e){this.proxyEventsList.forEach(t=>{e.e.on(t+".select",this.onStartSelection)})}onStartSelection(e){let{j:t}=this,i,o=e.target;for(;void 0===i&&o&&o!==t.editor;)i=t.e.fire((0,c.camelCase)(e.type+"_"+o.nodeName.toLowerCase()),o,e),o=o.parentElement;"click"===e.type&&void 0===i&&o===t.editor&&t.e.fire(e.type+"Editor",o,e)}onOutsideClick(e){let t=e.target;a.Dom.up(t,e=>e===this.j.editor)||h.UIElement.closestElement(t,h.Popup)||this.j.e.fire("outsideClick",e)}beforeCommandCut(){let{s:e}=this.j;if(!e.isCollapsed()){let t=e.current();t&&a.Dom.isOrContains(this.j.editor,t)&&this.onCopyNormalizeSelectionBound()}}beforeCommandSelectAll(){let{s:e}=this.j;return e.focus(),e.select(this.j.editor,!0),e.expandSelection(),!1}onClickRightOfNestedListItem(e){let{s:t}=this.j,i=t.range;if(!i.collapsed||0!==i.startOffset||!a.Dom.isText(i.startContainer))return;let o=i.startContainer,n=o.parentNode;if(!a.Dom.isTag(n,"li")||!a.Dom.first(n,e=>a.Dom.isTag(e,s.LIST_TAGS)))return;let r=this.j.ed.createRange();r.selectNodeContents(o);let l=r.getBoundingClientRect();e.clientX>l.right&&t.setCursorAfter(o)}onClickKeepPendingFormat(){let{s:e}=this.j,t=e.range;if(!t.collapsed||!a.Dom.isText(t.startContainer))return;let i=t.startContainer;if(t.startOffset!==(i.nodeValue?.length??0))return;let o=i.nextSibling;if(!a.Dom.isElement(o)||!o.nodeName.match(s.IS_INLINE)||!a.Dom.isEmpty(o))return;let n=o;for(;a.Dom.isElement(n.firstElementChild)&&n.firstElementChild.nodeName.match(s.IS_INLINE);)n=n.firstElementChild;e.setCursorIn(n)}onTripleClickNormalizeSelection(e){if(3!==e.detail||!this.j.o.select.normalizeTripleClick)return;let{s:t}=this.j,{startContainer:i,startOffset:o}=t.range;0===o&&a.Dom.isText(i)&&t.select(a.Dom.closest(i,a.Dom.isBlock,this.j.editor)||i,!0)}onCopyNormalizeSelectionBound(e){let{s:t,editor:i,o}=this.j;!o.select.normalizeSelectionBeforeCutAndCopy||t.isCollapsed()||(!e||e.isTrusted&&a.Dom.isNode(e.target)&&a.Dom.isOrContains(i,e.target))&&this.jodit.s.expandSelection()}constructor(...e){super(...e),(0,o._)(this,"proxyEventsList",["click","mousedown","touchstart","mouseup","touchend"])}}(0,n.__decorate)([r.autobind],d.prototype,"onStartSelection",null),(0,n.__decorate)([(0,r.watch)("ow:click")],d.prototype,"onOutsideClick",null),(0,n.__decorate)([(0,r.watch)([":beforeCommandCut"])],d.prototype,"beforeCommandCut",null),(0,n.__decorate)([(0,r.watch)([":beforeCommandSelectall"])],d.prototype,"beforeCommandSelectAll",null),(0,n.__decorate)([(0,r.watch)([":click"])],d.prototype,"onClickRightOfNestedListItem",null),(0,n.__decorate)([(0,r.watch)([":click"])],d.prototype,"onClickKeepPendingFormat",null),(0,n.__decorate)([(0,r.watch)([":click"])],d.prototype,"onTripleClickNormalizeSelection",null),(0,n.__decorate)([(0,r.watch)([":copy",":cut"])],d.prototype,"onCopyNormalizeSelectionBound",null),l.pluginSystem.add("select",d)},80202:function(e,t,i){"use strict";var o=i(5266);o.Config.prototype.minWidth=200,o.Config.prototype.maxWidth="100%",o.Config.prototype.minHeight=200,o.Config.prototype.maxHeight="auto",o.Config.prototype.saveHeightInStorage=!1},44322:function(e,t,i){"use strict";var o=i(25045),n=i(31635),s=i(84839),r=i(28077),a=i(72412),l=i(80991),c=i(18855);i(80202);class u extends c.Plugin{afterInit(e){e.e.on("setHeight.size",this.__setHeight).on("setWidth.size",this.__setWidth).on("afterInit.size changePlace.size",this.__initialize,{top:!0}).on(e.ow,"load.size",this.__resizeWorkspaces).on("afterInit.size resize.size afterUpdateToolbar.size scroll.size afterResize.size",this.__resizeWorkspaces).on("toggleFullSize.size toggleToolbar.size",this.__resizeWorkspaceImd),this.__immediateInitialize()}__initialize(){this.__immediateInitialize()}__immediateInitialize(){let{j:e}=this;if(e.o.inline)return;let{height:t}=e.o;if(e.o.saveHeightInStorage&&"auto"!==t){let i=e.storage.get("height");i&&(t=i)}(0,l.css)(e.editor,{minHeight:"100%"}),(0,l.css)(e.container,{minHeight:e.o.minHeight,maxHeight:e.o.maxHeight,minWidth:e.o.minWidth,maxWidth:e.o.maxWidth}),e.isFullSize||(this.__setHeight(t),this.__setWidth(e.o.width))}__setHeight(e){let{clientHeight:t,clientWidth:i}=this.j.container;if((0,a.isNumber)(e)){let{minHeight:t,maxHeight:i}=this.j.o;(0,a.isNumber)(t)&&t>e&&(e=t),(0,a.isNumber)(i)&&i<e&&(e=i)}(0,l.css)(this.j.container,"height",e),this.j.o.saveHeightInStorage&&this.j.storage.set("height",e),this.__resizeWorkspaceImd({clientHeight:t,clientWidth:i})}__setWidth(e){let{clientHeight:t,clientWidth:i}=this.j.container;if((0,a.isNumber)(e)){let{minWidth:t,maxWidth:i}=this.j.o;(0,a.isNumber)(t)&&t>e&&(e=t),(0,a.isNumber)(i)&&e>i&&(e=i)}(0,l.css)(this.j.container,"width",e),this.__resizeWorkspaceImd({clientHeight:t,clientWidth:i})}__getNotWorkHeight(){let e=this.j.toolbarContainer;return(e&&this.j.container.contains(e)?e.offsetHeight:0)+(this.j.statusbar?.getHeight()||0)+2}__resizeWorkspaceImd({clientHeight:e,clientWidth:t}=this.j.container){if(!this.j||this.j.isDestructed||!this.j.o||this.j.o.inline||!this.j.container||!this.j.container.parentNode)return;let i=((0,l.css)(this.j.container,"minHeight")||0)-this.__getNotWorkHeight();if((0,a.isNumber)(i)&&i>0&&([this.j.workplace,this.j.currentPlace.slots.center,this.j.iframe,this.j.editor].map(e=>{e&&(0,l.css)(e,"minHeight",i)}),this.j.e.fire("setMinHeight",i)),(0,a.isNumber)(this.j.o.maxHeight)){let e=this.j.o.maxHeight-this.__getNotWorkHeight();[this.j.workplace,this.j.currentPlace.slots.center,this.j.iframe,this.j.editor].map(t=>{t&&(0,l.css)(t,"maxHeight",e)}),this.j.e.fire("setMaxHeight",e)}if(this.j.container){let e="auto"!==this.j.o.height||this.j.isFullSize?this.j.container.offsetHeight-this.__getNotWorkHeight():"auto";(0,l.css)(this.j.workplace,"height",e),this.j.container.style.setProperty("--jd-jodit-workplace-height",(0,a.isNumber)(e)?e+"px":e)}let{clientHeight:o,clientWidth:n}=this.j.container;(e!==o||t!==n)&&this.j.e.fire(this.j,"resize")}beforeDestruct(e){e.e.off(e.ow,"load.size",this.__resizeWorkspaces).off(".size")}constructor(...e){super(...e),(0,o._)(this,"__resizeWorkspaces",this.j.async.debounce(this.__resizeWorkspaceImd,this.j.defaultTimeout,!0))}}(0,n.__decorate)([(0,s.throttle)()],u.prototype,"__initialize",null),(0,n.__decorate)([s.autobind],u.prototype,"__setHeight",null),(0,n.__decorate)([s.autobind],u.prototype,"__setWidth",null),(0,n.__decorate)([s.autobind],u.prototype,"__resizeWorkspaceImd",null),r.pluginSystem.add("size",u)},18929:function(e,t,i){"use strict";var o=i(81937),n=i(29434),s=i(5266),r=i(9103),a=i.n(r);s.Config.prototype.beautifyHTML=!o.IS_IE,s.Config.prototype.sourceEditor="ace",s.Config.prototype.sourceEditorNativeOptions={showGutter:!0,theme:"ace/theme/idle_fingers",mode:"ace/mode/html",wrap:!0,highlightActiveLine:!0},s.Config.prototype.sourceEditorCDNUrlsJS=["https://cdnjs.cloudflare.com/ajax/libs/ace/1.43.3/ace.js"],s.Config.prototype.beautifyHTMLCDNUrlsJS=["https://cdnjs.cloudflare.com/ajax/libs/js-beautify/1.14.4/beautify.min.js","https://cdnjs.cloudflare.com/ajax/libs/js-beautify/1.14.4/beautify-html.min.js"],n.Icon.set("source",a()),s.Config.prototype.controls.source={mode:o.MODE_SPLIT,exec(e){e.toggleMode()},isActive:e=>e.getRealMode()===o.MODE_SOURCE,tooltip:"Change mode"}},94978:function(e,t,i){"use strict";i.d(t,{AceEditor:function(){return l}});var o=i(25045),n=i(81937),s=i(23211),r=i(65946),a=i(94193);class l extends a.SourceEditor{aceExists(){return void 0!==this.j.ow.ace}getLastColumnIndex(e){return this.instance.session.getLine(e).length}getLastColumnIndices(){let e=this.instance.session.getLength(),t=[],i=0;for(let o=0;e>o;o++)i+=this.getLastColumnIndex(o),o>0&&(i+=1),t[o]=i;return t}getRowColumnIndices(e){let t=this.getLastColumnIndices();if(e<=t[0])return{row:0,column:e};let i=1;for(let o=1;o<t.length;o++)e>t[o]&&(i=o+1);let o=e-t[i-1]-1;return{row:i,column:o}}setSelectionRangeIndices(e,t){let i=this.getRowColumnIndices(e),o=this.getRowColumnIndices(t);this.instance.getSelection().setSelectionRange({start:i,end:o})}getIndexByRowColumn(e,t){return this.getLastColumnIndices()[e]-this.getLastColumnIndex(e)+t}init(e){let t=()=>{if(void 0!==this.instance||!this.aceExists())return;let t=this.j.c.div("jodit-source__mirror-fake");s.Dom.append(this.container,t);let i=e.ow.ace;this.instance=i.edit(t),"rtl"===e.o.direction&&(this.instance.setOption("rtlText",!0),this.instance.setOption("rtl",!0)),this.instance.setOptions(e.o.sourceEditorNativeOptions),this.instance.setTheme(e.o.sourceEditorNativeOptions.theme),this.instance.renderer.setShowGutter(e.o.sourceEditorNativeOptions.showGutter),this.instance.getSession().setMode(e.o.sourceEditorNativeOptions.mode),this.instance.setHighlightActiveLine(e.o.sourceEditorNativeOptions.highlightActiveLine),this.instance.getSession().setUseWrapMode(!0),this.instance.setOption("indentedSoftWrap",!1),this.instance.setOption("wrap",e.o.sourceEditorNativeOptions.wrap),this.instance.getSession().setUseWorker(!1),this.instance.$blockScrolling=1/0,this.instance.on("change",this.toWYSIWYG),this.instance.on("focus",this.proxyOnFocus),this.instance.on("mousedown",this.proxyOnMouseDown),this.instance.on("blur",this.proxyOnBlur),e.getRealMode()!==n.MODE_WYSIWYG&&this.setValue(this.getValue());let o=this.j.async.throttle(()=>{if(e.isInDestruct||e.getMode()===n.MODE_WYSIWYG)return;let t=this.instance.isFocused();"auto"!==e.o.height?this.instance.setOption("maxLines",e.workplace.offsetHeight/this.instance.renderer.lineHeight):this.instance.setOption("maxLines",1/0),this.instance.resize(),t&&this.focus()},2*this.j.defaultTimeout);e.e.on(e,"resize",o).on("afterResize afterSetMode",o),o(),this.onReady()},i=!1,o=()=>{if(!e.isInDestruct&&(e.getRealMode()===n.MODE_SOURCE||e.getMode()===n.MODE_SPLIT)){if(!this.aceExists()){i||(i=!0,(0,r.loadNext)(e,e.o.sourceEditorCDNUrlsJS).then(o).catch(()=>null));return}t()}};e.e.on("afterSetMode",o),o()}destruct(){this.instance.off("change",this.toWYSIWYG),this.instance.off("focus",this.proxyOnFocus),this.instance.off("mousedown",this.proxyOnMouseDown),this.instance.destroy(),this.j?.events?.off("aceInited.source")}setValue(e){if(!this.j.o.editHTMLDocumentMode&&this.j.o.beautifyHTML){let t=this.j.e.fire("beautifyHTML",e);(0,r.isString)(t)&&(e=t)}this.instance.setValue(e),this.instance.clearSelection()}getValue(){return this.instance.getValue()}setReadOnly(e){this.instance.setReadOnly(e)}get isFocused(){return this.instance.isFocused()}focus(){this.instance.container.focus(),this.instance.focus()}blur(){this.instance.blur()}getSelectionStart(){let e=this.instance.selection.getRange();return this.getIndexByRowColumn(e.start.row,e.start.column)}getSelectionEnd(){let e=this.instance.selection.getRange();return this.getIndexByRowColumn(e.end.row,e.end.column)}selectAll(){this.instance.selection.selectAll()}insertRaw(e){let t=this.instance.selection.getCursor(),i=this.instance.session.insert(t,e);this.instance.selection.setRange({start:t,end:i},!1)}setSelectionRange(e,t){this.setSelectionRangeIndices(e,t)}setPlaceHolder(e){}replaceUndoManager(){let{history:e}=this.jodit;this.instance.commands.addCommand({name:"Undo",bindKey:{win:"Ctrl-Z",mac:"Command-Z"},exec(){e.undo()}}),this.instance.commands.addCommand({name:"Redo",bindKey:{win:"Ctrl-Shift-Z",mac:"Command-Shift-Z"},exec(){e.redo()}})}constructor(...e){super(...e),(0,o._)(this,"className","jodit_ace_editor"),(0,o._)(this,"proxyOnBlur",e=>{this.j.e.fire("blur",e)}),(0,o._)(this,"proxyOnFocus",e=>{this.j.e.fire("focus",e)}),(0,o._)(this,"proxyOnMouseDown",e=>{this.j.e.fire("mousedown",e)})}}},45844:function(e,t,i){"use strict";i.d(t,{TextAreaEditor:function(){return l}});var o=i(25045),n=i(23211),s=i(7909),r=i(80991),a=i(94193);class l extends a.SourceEditor{init(e){this.instance=e.c.element("textarea",{class:"jodit-source__mirror",dir:"rtl"===e.o.direction?"rtl":void 0}),n.Dom.append(this.container,this.instance),e.e.on(this.instance,"mousedown keydown touchstart input",e.async.debounce(this.toWYSIWYG,e.defaultTimeout)).on("setMinHeight.source",e=>{(0,r.css)(this.instance,"minHeight",e)}).on(this.instance,"change keydown mousedown touchstart input",this.autosize).on("afterSetMode.source",this.autosize).on(this.instance,"mousedown focus blur",t=>{e.e.fire(t.type,t)}),this.autosize(),this.onReady()}destruct(){n.Dom.safeRemove(this.instance)}getValue(){return this.instance.value}setValue(e){this.instance.value=e}insertRaw(e){let t=this.getValue();if(this.getSelectionStart()>=0){let i=this.getSelectionStart(),o=this.getSelectionEnd();this.setValue(t.substring(0,i)+e+t.substring(o,t.length))}else this.setValue(t+e)}getSelectionStart(){return this.instance.selectionStart}getSelectionEnd(){return this.instance.selectionEnd}setSelectionRange(e,t=e){this.instance.setSelectionRange(e,t)}get isFocused(){return this.instance===this.j.od.activeElement}focus(){this.instance.focus()}blur(){this.instance.blur()}setPlaceHolder(e){(0,s.attr)(this.instance,"placeholder",e)}setReadOnly(e){(0,s.attr)(this.instance,"readonly",e?"true":null)}selectAll(){this.instance.select()}replaceUndoManager(){let{history:e}=this.jodit;this.j.e.on(this.instance,"keydown",t=>{if((t.ctrlKey||t.metaKey)&&"z"===t.key)return t.shiftKey?e.redo():e.undo(),this.setSelectionRange(this.getValue().length),!1})}constructor(...e){super(...e),(0,o._)(this,"autosize",this.j.async.debounce(()=>{(0,r.css)(this.instance,"height","auto"),(0,r.css)(this.instance,"height",this.instance.scrollHeight)},this.j.defaultTimeout,!0))}}},8105:function(e,t,i){"use strict";i.d(t,{AceEditor:function(){return o.AceEditor},TextAreaEditor:function(){return n.TextAreaEditor}});var o=i(94978),n=i(45844)},82495:function(e,t,i){"use strict";i.d(t,{createSourceEditor:function(){return s}});var o=i(65946),n=i(8105);function s(e,t,i,s,r){let a;if((0,o.isFunction)(e))a=e(t);else switch(e){case"ace":if(!t.o.shadowRoot){a=new n.AceEditor(t,i,s,r);break}default:a=new n.TextAreaEditor(t,i,s,r)}return a.init(t),a.onReadyAlways(()=>{a.setReadOnly(t.o.readonly)}),a}},94193:function(e,t,i){"use strict";i.d(t,{SourceEditor:function(){return n}});var o=i(25045);class n{get j(){return this.jodit}onReady(){this.replaceUndoManager(),this.isReady=!0,this.j.e.fire(this,"ready")}onReadyAlways(e){this.isReady?e():this.j.events?.on(this,"ready",e)}constructor(e,t,i,n){(0,o._)(this,"jodit",void 0),(0,o._)(this,"container",void 0),(0,o._)(this,"toWYSIWYG",void 0),(0,o._)(this,"fromWYSIWYG",void 0),(0,o._)(this,"instance",void 0),(0,o._)(this,"className",void 0),(0,o._)(this,"isReady",void 0),this.jodit=e,this.container=t,this.toWYSIWYG=i,this.fromWYSIWYG=n,this.className="",this.isReady=!1}}},13810:function(e,t,i){"use strict";var o=i(25045),n=i(31635),s=i(81937),r=i(84839),a=i(23211),l=i(28077),c=i(65946),u=i(91206);i(18929);var h=i(82495);class d extends u.Plugin{onInsertHTML(e){if(!this.j.o.readonly&&!this.j.isEditorMode())return this.sourceEditor?.insertRaw(e),this.toWYSIWYG(),!1}fromWYSIWYG(e=!1){if(!this.__lock||!0===e){this.__lock=!0;let e=this.j.getEditorValue(!1,s.SOURCE_CONSUMER);e!==this.getMirrorValue()&&this.setMirrorValue(e),this.__filledValue=this.getMirrorValue(),this.__lock=!1}}toWYSIWYG(){if(this.__lock)return;let e=this.getMirrorValue();e!==this.__oldMirrorValue&&(this.__lock=!0,this.j.value=e,this.__lock=!1,this.__oldMirrorValue=e)}getNormalPosition(e,t){for(t=t.replace(/<(script|style|iframe)[^>]*>[^]*?<\/\1>/im,e=>{let t="";for(let i=0;i<e.length;i+=1)t+=s.INVISIBLE_SPACE;return t});e>0&&t[e]===s.INVISIBLE_SPACE;)e--;let i=e;for(;i>0;){if("<"===t[--i]&&void 0!==t[i+1]&&t[i+1].match(/[\w/]+/i))return i;if(">"===t[i])break}return e}clnInv(e){return e.replace(s.INVISIBLE_SPACE_REG_EXP(),"")}onSelectAll(e){if("selectall"===e.toLowerCase()&&this.j.getRealMode()===s.MODE_SOURCE)return this.sourceEditor?.selectAll(),!1}getMirrorValue(){return this.sourceEditor?.getValue()||""}setMirrorValue(e){this.sourceEditor?.setValue(e)}setFocusToMirror(){let e=this.j.od.activeElement;(!e||e===this.j.od.body||this.j.container.contains(e))&&this.sourceEditor?.focus()}saveSelection(){if(this.j.getRealMode()===s.MODE_WYSIWYG)this.j.s.save(),this.j.synchronizeValues(),this.fromWYSIWYG(!0);else{if(this.j.o.editHTMLDocumentMode)return;let e=this.getMirrorValue();if(this.getSelectionStart()===this.getSelectionEnd()){let t=this.j.s.marker(!0),i=this.getNormalPosition(this.getSelectionStart(),this.getMirrorValue());this.setMirrorValue(e.substring(0,i)+this.clnInv(t.outerHTML)+e.substring(i))}else{let t=this.j.s.marker(!0),i=this.j.s.marker(!1),o=this.getNormalPosition(this.getSelectionStart(),e),n=this.getNormalPosition(this.getSelectionEnd(),e);this.setMirrorValue(e.slice(0,o)+this.clnInv(t.outerHTML)+e.slice(o,n)+this.clnInv(i.outerHTML)+e.slice(n))}this.toWYSIWYG()}}removeSelection(){let e,t;if(this.j.getRealMode()===s.MODE_WYSIWYG){this.__lock=!0,this.j.s.restore(),this.__lock=!1;return}let i=this.getMirrorValue();try{if(i=i.replace(/<span[^>]+data-jodit-selection_marker=(["'])start\1[^>]*>[<>]*?<\/span>/gim,this.tempMarkerStart).replace(/<span[^>]+data-jodit-selection_marker=(["'])end\1[^>]*>[<>]*?<\/span>/gim,this.tempMarkerEnd),!this.j.o.editHTMLDocumentMode&&this.j.o.beautifyHTML){let e=this.j.e.fire("beautifyHTML",i);(0,c.isString)(e)&&(i=e)}if(t=e=i.indexOf(this.tempMarkerStart),i=i.replace(this.tempMarkerStartReg,""),-1!==e){let e=i.indexOf(this.tempMarkerEnd);-1!==e&&(t=e)}i=i.replace(this.tempMarkerEndReg,"")}finally{i=i.replace(this.tempMarkerEndReg,"").replace(this.tempMarkerStartReg,"")}this.setMirrorValue(i),this.setMirrorSelectionRange(e,t),this.toWYSIWYG(),this.setFocusToMirror()}setMirrorSelectionRange(e,t){this.sourceEditor?.setSelectionRange(e,t)}onReadonlyReact(){this.sourceEditor?.setReadOnly(this.j.o.readonly)}afterInit(e){if(this.mirrorContainer=e.c.div("jodit-source"),a.Dom.append(e.workplace,this.mirrorContainer),e.e.on("afterAddPlace changePlace afterInit",()=>{a.Dom.append(e.workplace,this.mirrorContainer)}),this.sourceEditor=(0,h.createSourceEditor)("area",e,this.mirrorContainer,this.toWYSIWYG,this.fromWYSIWYG),e.e.on(e.ow,"keydown",e=>{e.key===s.KEY_ESC&&this.sourceEditor?.isFocused&&this.sourceEditor.blur()}),this.onReadonlyReact(),e.e.on("placeholder.source",e=>{this.sourceEditor?.setPlaceHolder(e)}).on("change.source",this.syncValueFromWYSIWYG).on("beautifyHTML",e=>e),e.o.beautifyHTML){let t=()=>{if(e.isInDestruct)return!1;let t=e.ow.html_beautify;return!!t&&!e.isInDestruct&&(e.events?.off("beautifyHTML").on("beautifyHTML",e=>t(e)),!0)};if(!t()){let i=!1,o=()=>{i||e.getMode()!==s.MODE_SOURCE&&e.getMode()!==s.MODE_SPLIT||(i=!0,(0,c.loadNext)(e,e.o.beautifyHTMLCDNUrlsJS).then(()=>{t()&&this.beautifyUntouched()},()=>null))};e.e.on("afterSetMode.source",o),o()}}this.syncValueFromWYSIWYG(!0),this.initSourceEditor(e)}syncValueFromWYSIWYG(e=!1){let t=this.j;(t.getMode()===s.MODE_SPLIT||t.getMode()===s.MODE_SOURCE)&&this.fromWYSIWYG(e)}initSourceEditor(e){if("area"!==e.o.sourceEditor){let t=(0,h.createSourceEditor)(e.o.sourceEditor,e,this.mirrorContainer,this.toWYSIWYG,this.fromWYSIWYG);t.onReadyAlways(()=>{this.takeOver(t),e.events?.fire("sourceEditorReady",e)})}else this.sourceEditor?.onReadyAlways(()=>{this.syncValueFromWYSIWYG(!0),e.events?.fire("sourceEditorReady",e)})}takeOver(e){let t=this.sourceEditor;if(!t||t===e){this.sourceEditor=e,this.syncValueFromWYSIWYG(!0);return}let i=t.getValue(),o=t.getSelectionStart(),n=t.getSelectionEnd(),s=t.isFocused,r=i===this.__filledValue;t.destruct(),this.sourceEditor=e,r?this.syncValueFromWYSIWYG(!0):(e.setValue(i),this.toWYSIWYG()),o>=0&&e.setSelectionRange(o,n),s&&e.focus()}beautifyUntouched(){let e=this.getMirrorValue();if(this.j.o.editHTMLDocumentMode||!e||e!==this.__filledValue)return;let t=this.j.e.fire("beautifyHTML",e);if((0,c.isString)(t)&&t!==e){let e=this.sourceEditor?.isFocused;this.setMirrorValue(t),this.__filledValue=this.getMirrorValue(),e&&this.sourceEditor?.focus()}}beforeDestruct(){this.sourceEditor&&(this.sourceEditor.destruct(),delete this.sourceEditor),a.Dom.safeRemove(this.mirrorContainer)}constructor(...e){super(...e),(0,o._)(this,"buttons",[{name:"source",group:"source"}]),(0,o._)(this,"sourceEditor",void 0),(0,o._)(this,"mirrorContainer",void 0),(0,o._)(this,"__lock",!1),(0,o._)(this,"__oldMirrorValue",""),(0,o._)(this,"__filledValue",""),(0,o._)(this,"tempMarkerStart","{start-jodit-selection}"),(0,o._)(this,"tempMarkerStartReg",/{start-jodit-selection}/g),(0,o._)(this,"tempMarkerEnd","{end-jodit-selection}"),(0,o._)(this,"tempMarkerEndReg",/{end-jodit-selection}/g),(0,o._)(this,"getSelectionStart",()=>this.sourceEditor?.getSelectionStart()??0),(0,o._)(this,"getSelectionEnd",()=>this.sourceEditor?.getSelectionEnd()??0)}}(0,n.__decorate)([(0,r.watch)(":insertHTML.source")],d.prototype,"onInsertHTML",null),(0,n.__decorate)([r.autobind],d.prototype,"fromWYSIWYG",null),(0,n.__decorate)([r.autobind],d.prototype,"toWYSIWYG",null),(0,n.__decorate)([r.autobind],d.prototype,"getNormalPosition",null),(0,n.__decorate)([(0,r.watch)(":beforeCommand.source")],d.prototype,"onSelectAll",null),(0,n.__decorate)([(0,r.watch)(":beforeSetMode.source")],d.prototype,"saveSelection",null),(0,n.__decorate)([(0,r.watch)(":afterSetMode.source")],d.prototype,"removeSelection",null),(0,n.__decorate)([r.autobind],d.prototype,"setMirrorSelectionRange",null),(0,n.__decorate)([(0,r.watch)(":readonly.source")],d.prototype,"onReadonlyReact",null),(0,n.__decorate)([r.autobind],d.prototype,"syncValueFromWYSIWYG",null),l.pluginSystem.add("source",d)},75143:function(e,t,i){"use strict";var o=i(22289),n=i(85932),s=i(7909),r=i(36400),a=i(29434),l=i(5266),c=i(97743),u=i(68097),h=i(22227),d=i.n(h);l.Config.prototype.speechRecognize={api:void 0!==c.SpeechRecognition?c.SpeechRecognition:null,sound:!0,continuous:!1,interimResults:!0,commands:{"newline|enter":"enter","delete|remove word|delete word":"backspaceWordButton",comma:"inserthtml::,",underline:"inserthtml::_",hyphen:"inserthtml::-",space:"inserthtml:: ",question:"inserthtml::?",dot:"inserthtml::.","quote|quotes|open quote":"inserthtml::'","header|header h1":"formatblock::h1","select all":"selectall"}},a.Icon.set("speech-recognize",d()),l.Config.prototype.controls.speechRecognize={isVisible:e=>!!e.o.speechRecognize.api,isActive(e,t){let i=(0,r.dataBind)(e,"speech");return!!i?.isEnabled},isDisabled:e=>!e.o.speechRecognize.api,exec(e,t,{button:i,control:a}){let{api:l,lang:c,continuous:h,interimResults:d,sound:f}=e.o.speechRecognize;if(!l)return void e.alert("Speech recognize API unsupported in your browser");let p=(0,r.dataBind)(e,"speech");if(!p){let t=new l;(p=new u.RecognizeManager(e.async,t)).lang=(0,n.isString)(c)?c:(0,s.attr)(e.od.documentElement,"lang")??void 0,p.continuous=h,p.interimResults=d,p.sound=f,(0,r.dataBind)(e,"speech",p),p.on("pulse",e=>{i.setMod("pulse",e)}),p.on("result",t=>e.e.fire("speechRecognizeResult",t)),p.on("progress",t=>e.e.fire("speechRecognizeProgressResult",t)),p.on("error",t=>e.message.error(t)),e.hookStatus("beforeDestruct",()=>{(0,r.dataBind)(e,"speech",null),p.destruct()})}if(a.args){let e=a.args[0];if((0,o.isBoolean)(p[e])){p[e]=!p[e],p.isEnabled&&p.restart();return}}p.toggle(),p.isEnabled&&i.setMod("pulse",!0),i.state.activated=p.isEnabled},name:"speechRecognize",command:"toggleSpeechRecognize",tooltip:"Speech Recognize",list:{sound:"Sound",interimResults:"Interim Results"},childTemplate(e,t,i){let o=(0,r.dataBind)(e,"speech"),n=o?.[t]??e.o.speechRecognize[t];return`<span class='jodit-speech-recognize__list-item'><input ${n?"checked":""} class='jodit-checkbox' type='checkbox'>&nbsp;${i}</span>`},mods:{stroke:!1}}},97743:function(e,t,i){"use strict";var o=i(81937);let n=o.globalWindow?o.globalWindow.SpeechRecognition||o.globalWindow.webkitSpeechRecognition:void 0;i.d(t,["SpeechRecognition",0,n])},86581:function(e,t,i){"use strict";function o(e,t){let[i,o]=t.split("::");"open"===i.toLowerCase()&&o&&/^(javascript:|data:|vbscript:)/i.test(o.trim())||e.execCommand(i,null,o)}i.d(t,{execSpellCommand:function(){return o}})},68097:function(e,t,i){"use strict";i.d(t,{RecognizeManager:function(){return l}});var o=i(25045),n=i(31635),s=i(84839),r=i(60216),a=i(32560);class l extends r.Eventify{set lang(e){this._lang=e,this._api.lang=e}get lang(){return this._lang}set continuous(e){this._continuous=e,this._api.continuous=e}get continuous(){return this._continuous}set interimResults(e){this._interimResults=e,this._api.interimResults=e}get interimResults(){return this._interimResults}destruct(){this.stop(),(0,a.closeSound)(this),l._instances.delete(this),super.destruct()}get isEnabled(){return this._isEnabled}start(){if(!this._isEnabled){this._isEnabled=!0,l._instances.forEach(e=>{e!==this&&e.stop()});try{this._api.start()}catch(e){this._onError(e),this.stop();return}this.__on("speechstart",this._onSpeechStart).__on("error",this._onError).__on("result",this._onProgress).__on("end",this._onResults)}}stop(){this._isEnabled&&(this._api.abort(),this._api.stop(),this.__off("speechstart",this._onSpeechStart).__off("error",this._onError).__off("result",this._onProgress).__off("end",this._onResults),this.async.clearTimeout(this._restartTimeout),this._isEnabled=!1,this.emit("pulse",!1))}toggle(){this._isEnabled?this.stop():this.start()}restart(){this.stop(),this.start()}__on(e,t){return this._api.addEventListener(e,t),this}__off(e,t){return this._api.removeEventListener(e,t),this}_onResults(e){this.emit("pulse",!1),this.emit("result",this.__interimResults),this.__interimResults="",this._makeSound(440),this.restart()}_onProgress(e){if(this._isEnabled&&(this.__interimResults="",e.results)){for(let t=0;t<e.results.length;t++){let i=e.results.item(t);if(i.length){let{transcript:e}=i.item(0);this.__interimResults+=e}}this.__interimResults&&this.emit("progress",this.__interimResults)}}_onError(e){"voice-unavailable"===e.error&&this.emit("error","Voice unavailable"),"not-allowed"===e.error&&this.emit("error","Not allowed"),("language-unavailable"===e.error||"language-not-supported"===e.error)&&this.emit("error","Language unavailable"),this._makeSound(940),this.emit("pulse",!1),this.stop()}_makeSound(e){this.sound&&(0,a.sound)(this,{frequency:e})}constructor(e,t){super(),(0,o._)(this,"async",void 0),(0,o._)(this,"_lang",void 0),(0,o._)(this,"_continuous",void 0),(0,o._)(this,"_interimResults",void 0),(0,o._)(this,"sound",void 0),(0,o._)(this,"_isEnabled",void 0),(0,o._)(this,"_restartTimeout",void 0),(0,o._)(this,"_onSpeechStart",void 0),(0,o._)(this,"_api",void 0),(0,o._)(this,"__interimResults",void 0),this.async=e,this._continuous=!1,this._interimResults=!1,this.sound=!0,this._isEnabled=!1,this._restartTimeout=0,this._onSpeechStart=e=>{this._isEnabled&&(this.async.clearTimeout(this._restartTimeout),this._restartTimeout=this.async.setTimeout(()=>{this.restart(),this.emit("pulse",!1),this._makeSound(940)},5e3),this.emit("pulse",!0))},this.__interimResults="",this._api=t,l._instances.add(this)}}(0,o._)(l,"_instances",new Set),(0,n.__decorate)([s.autobind],l.prototype,"_onResults",null),(0,n.__decorate)([s.autobind],l.prototype,"_onProgress",null),(0,n.__decorate)([s.autobind],l.prototype,"_onError",null)},32560:function(e,t,i){"use strict";i.d(t,{closeSound:function(){return r},sound:function(){return s}});var o=i(81937);let n=new WeakMap;function s(e,{sec:t=.1,frequency:i=440,gain:r=.1,type:a="sine"}={}){let l=function(e){if(!o.globalWindow)return null;let t=n.get(e);if(t&&"closed"!==t.state)return t;let i=o.globalWindow.AudioContext||o.globalWindow.webkitAudioContext;if(!i)return null;let s=new i;return n.set(e,s),s}(e);if(!l)return;let c=l.createGain(),u=l.createOscillator();u.type=a,u.frequency.value=i,c.gain.value=r,u.connect(c),c.connect(l.destination),u.start(),u.stop(l.currentTime+t)}function r(e){let t=n.get(e);t&&(n.delete(e),"closed"!==t.state&&t.close())}},43219:function(e,t,i){"use strict";i.r(t),i.d(t,{ar:function(){return o},cs_cz:function(){return o},de:function(){return o},es:function(){return o},fa:function(){return o},fi:function(){return o},fr:function(){return o},he:function(){return o},hu:function(){return o},id:function(){return o},it:function(){return o},ja:function(){return o},ko:function(){return o},mn:function(){return o},nl:function(){return o},no:function(){return o},pl:function(){return o},pt_br:function(){return o},ru:function(){return o},sk:function(){return o},tr:function(){return o},ua:function(){return o},zh_cn:function(){return o},zh_tw:function(){return o}});var o=i(41324)},31262:function(e,t,i){"use strict";var o=i(25045),n=i(31635),s=i(68616),r=i(23211),a=i(28077),l=i(71125),c=i(91206);i(75143);var u=i(73302),h=i(86581),d=i(43219);class f extends c.Plugin{afterInit(e){let{commands:t}=e.o.speechRecognize;t&&((0,a.extendLang)(d),(0,l.keys)(t,!1).forEach(i=>{i.split("|").forEach(o=>{o=o.trim().toLowerCase(),this._commandToWord[o]=t[i];let n=e.i18n(o);n!==o&&n.split("|").forEach(e=>{this._commandToWord[e.trim().toLowerCase()]=t[i].trim()})})}))}beforeDestruct(e){r.Dom.safeRemove(this.messagePopup)}onSpeechRecognizeProgressResult(e){this.messagePopup||(this.messagePopup=this.j.create.div("jodit-speech-recognize__popup")),r.Dom.append(this.j.workplace,this.messagePopup),this.j.async.clearTimeout(this.__hidePopupTimeout),this.__hidePopupTimeout=this.j.async.setTimeout(()=>{r.Dom.safeRemove(this.messagePopup)},1e3),this.messagePopup.innerText=e+"|"}onSpeechRecognizeResult(e){this.j.async.clearTimeout(this.__hidePopupTimeout),r.Dom.safeRemove(this.messagePopup);let{j:t}=this,{s:i}=t;if(!this._checkCommand(e)){let{range:o}=i,n=i.current();if(i.isCollapsed()&&r.Dom.isText(n)&&r.Dom.isOrContains(t.editor,n)&&n.nodeValue){let s=n.nodeValue;n.nodeValue=s+(/[\u00A0 ]\uFEFF*$/.test(s)?"":" ")+e,o.setStartAfter(n),i.selectRange(o),t.synchronizeValues()}else i.insertHTML(e)}}_checkCommand(e){return e=e.toLowerCase().replace(/\./g,""),!!this._commandToWord[e]&&((0,h.execSpellCommand)(this.j,this._commandToWord[e]),!0)}constructor(...e){super(...e),(0,o._)(this,"buttons",[{group:"state",name:"speechRecognize"}]),(0,o._)(this,"messagePopup",void 0),(0,o._)(this,"__hidePopupTimeout",void 0),(0,o._)(this,"_commandToWord",{})}}(0,n.__decorate)([(0,s.watch)(":speechRecognizeProgressResult")],f.prototype,"onSpeechRecognizeProgressResult",null),(0,n.__decorate)([(0,s.watch)(":speechRecognizeResult")],f.prototype,"onSpeechRecognizeResult",null),u.Jodit.plugins.add("speech-recognize",f)},24268:function(e,t,i){"use strict";var o=i(29434),n=i(5266),s=i(49989),r=i.n(s);n.Config.prototype.spellcheck=!1,o.Icon.set("spellcheck",r()),n.Config.prototype.controls.spellcheck={isActive:e=>e.o.spellcheck,icon:r(),name:"spellcheck",command:"toggleSpellcheck",tooltip:"Spellcheck"}},33494:function(e,t,i){"use strict";i.r(t),i.d(t,{ar:function(){return o},cs_cz:function(){return o},de:function(){return o},es:function(){return o},fa:function(){return o},fi:function(){return o},fr:function(){return o},he:function(){return o},hu:function(){return o},id:function(){return o},it:function(){return o},ja:function(){return o},ko:function(){return o},mn:function(){return o},nl:function(){return o},no:function(){return o},pl:function(){return o},pt_br:function(){return o},ru:function(){return o},sk:function(){return o},tr:function(){return o},ua:function(){return o},zh_cn:function(){return o},zh_tw:function(){return o}});var o=i(41324)},90204:function(e,t,i){"use strict";var o=i(25045),n=i(31635),s=i(84839),r=i(28077),a=i(7909),l=i(91206);i(24268);var c=i(33494);class u extends l.Plugin{afterInit(e){e.e.on("afterInit afterAddPlace prepareWYSIWYGEditor",this.toggleSpellcheck),this.toggleSpellcheck(),e.registerCommand("toggleSpellcheck",()=>{this.jodit.o.spellcheck=!this.jodit.o.spellcheck,this.toggleSpellcheck(),this.j.e.fire("updateToolbar")})}toggleSpellcheck(){(0,a.attr)(this.jodit.editor,"spellcheck",this.jodit.o.spellcheck)}beforeDestruct(e){}constructor(e){super(e),(0,o._)(this,"buttons",[{group:"state",name:"spellcheck"}]),(0,r.extendLang)(c)}}(0,n.__decorate)([s.autobind],u.prototype,"toggleSpellcheck",null),r.pluginSystem.add("spellcheck",u)},88580:function(e,t,i){"use strict";var o=i(5266);o.Config.prototype.showCharsCounter=!0,o.Config.prototype.countHTMLChars=!1,o.Config.prototype.countTextSpaces=!1,o.Config.prototype.showWordsCounter=!0},86236:function(e,t,i){"use strict";var o=i(25045),n=i(81937),s=i(23211),r=i(28077),a=i(18855);i(88580);class l extends a.Plugin{afterInit(){this.charCounter=this.j.c.span(),this.wordCounter=this.j.c.span(),this.j.e.on("afterInit changePlace afterAddPlace",this.reInit),this.reInit()}beforeDestruct(){s.Dom.safeRemove(this.charCounter),s.Dom.safeRemove(this.wordCounter),this.j.e.off("afterInit changePlace afterAddPlace",this.reInit),this.charCounter=null,this.wordCounter=null}constructor(...e){super(...e),(0,o._)(this,"charCounter",null),(0,o._)(this,"wordCounter",null),(0,o._)(this,"reInit",()=>{this.j.o.showCharsCounter&&this.charCounter&&this.j.statusbar.append(this.charCounter,!0),this.j.o.showWordsCounter&&this.wordCounter&&this.j.statusbar.append(this.wordCounter,!0),this.j.e.off("change keyup",this.calc).on("change keyup",this.calc),this.calc()}),(0,o._)(this,"calc",this.j.async.throttle(()=>{let e=this.j.text;if(this.j.o.showCharsCounter&&this.charCounter){let t;t=this.j.o.countHTMLChars?this.j.value:this.j.o.countTextSpaces?e.replace((0,n.INVISIBLE_SPACE_REG_EXP)(),"").replace(/[\r\n]/g,""):e.replace((0,n.SPACE_REG_EXP)(),""),this.charCounter.textContent=this.j.i18n("Chars: %d",t.length)}this.j.o.showWordsCounter&&this.wordCounter&&(this.wordCounter.textContent=this.j.i18n("Words: %d",e.replace((0,n.INVISIBLE_SPACE_REG_EXP)(),"").split((0,n.SPACE_REG_EXP)()).filter(e=>e.length).length))},this.j.defaultTimeout))}}r.pluginSystem.add("stat",l)},79803:function(e,t,i){"use strict";var o=i(5266);o.Config.prototype.toolbarSticky=!0,o.Config.prototype.toolbarDisableStickyForMobile=!0,o.Config.prototype.toolbarStickyOffset=0},67582:function(e,t,i){"use strict";var o=i(25045),n=i(31635),s=i(81937),r=i(84839),a=i(23211),l=i(28077),c=i(65946),u=i(18855);i(79803);let h=!s.IS_ES_NEXT&&s.IS_IE;class d extends u.Plugin{afterInit(e){e.e.on(e.ow,"scroll.sticky wheel.sticky mousewheel.sticky resize.sticky",this.__onScroll).on("getStickyState.sticky",()=>this.__isToolbarStuck)}__onScroll(){let{jodit:e}=this;if(!e.o.toolbarSticky||!e.o.toolbar)return;let t=e.ow.pageYOffset||e.od.documentElement&&e.od.documentElement.scrollTop||0,i=(0,c.offset)(e.container,e,e.od,!0),o=e.getMode()===s.MODE_WYSIWYG&&t+e.o.toolbarStickyOffset>i.top&&t+e.o.toolbarStickyOffset<i.top+i.height&&!(e.o.toolbarDisableStickyForMobile&&this.__isMobile());if(this.__isToolbarStuck===o)return;let n=e.toolbarContainer;n&&(o?this.addSticky(n):this.removeSticky(n)),e.e.fire("toggleSticky",o)}__isMobile(){let{j:e}=this;return e&&e.options&&e.container&&e.options.sizeSM>=e.container.offsetWidth}beforeDestruct(e){a.Dom.safeRemove(this.__dummyBox),e.e.off(e.ow,"scroll.sticky wheel.sticky mousewheel.sticky resize.sticky",this.__onScroll).off(".sticky")}constructor(...e){super(...e),(0,o._)(this,"__isToolbarStuck",!1),(0,o._)(this,"__dummyBox",void 0),(0,o._)(this,"__createDummy",e=>{this.__dummyBox=this.j.c.div(),this.__dummyBox.classList.add("jodit_sticky-dummy_toolbar"),a.Dom.before(e,this.__dummyBox)}),(0,o._)(this,"addSticky",e=>{this.__isToolbarStuck||(h&&!this.__dummyBox&&this.__createDummy(e),this.j.container.classList.add("jodit_sticky"),this.__isToolbarStuck=!0),(0,c.css)(e,{top:this.j.o.toolbarStickyOffset||null,width:this.j.container.offsetWidth-2}),this.__dummyBox&&(0,c.css)(this.__dummyBox,{height:e.offsetHeight})}),(0,o._)(this,"removeSticky",e=>{this.__isToolbarStuck&&((0,c.css)(e,{width:"",top:""}),this.j.container.classList.remove("jodit_sticky"),this.__isToolbarStuck=!1)})}}(0,n.__decorate)([(0,r.throttle)()],d.prototype,"__onScroll",null),l.pluginSystem.add("sticky",d)},18993:function(e,t,i){"use strict";var o=i(23211),n=i(29434),s=i(5266),r=i(81875),a=i.n(r);s.Config.prototype.usePopupForSpecialCharacters=!1,s.Config.prototype.specialCharacters=["!","&quot;","#","$","%","&amp;","'","(",")","*","+","-",".","/","0","1","2","3","4","5","6","7","8","9",":",";","&lt;","=","&gt;","?","@","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","[","]","^","_","`","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","{","|","}","~","&euro;","&lsquo;","&rsquo;","&ldquo;","&rdquo;","&ndash;","&mdash;","&iexcl;","&cent;","&pound;","&curren;","&yen;","&brvbar;","&sect;","&uml;","&copy;","&ordf;","&laquo;","&raquo;","&not;","&reg;","&macr;","&deg;","&sup2;","&sup3;","&acute;","&micro;","&para;","&middot;","&cedil;","&sup1;","&ordm;","&frac14;","&frac12;","&frac34;","&iquest;","&Agrave;","&Aacute;","&Acirc;","&Atilde;","&Auml;","&Aring;","&AElig;","&Ccedil;","&Egrave;","&Eacute;","&Ecirc;","&Euml;","&Igrave;","&Iacute;","&Icirc;","&Iuml;","&ETH;","&Ntilde;","&Ograve;","&Oacute;","&Ocirc;","&Otilde;","&Ouml;","&times;","&Oslash;","&Ugrave;","&Uacute;","&Ucirc;","&Uuml;","&Yacute;","&THORN;","&szlig;","&agrave;","&aacute;","&acirc;","&atilde;","&auml;","&aring;","&aelig;","&ccedil;","&egrave;","&eacute;","&ecirc;","&euml;","&igrave;","&iacute;","&icirc;","&iuml;","&eth;","&ntilde;","&ograve;","&oacute;","&ocirc;","&otilde;","&ouml;","&divide;","&oslash;","&ugrave;","&uacute;","&ucirc;","&uuml;","&yacute;","&thorn;","&yuml;","&OElig;","&oelig;","&#372;","&#374","&#373","&#375;","&sbquo;","&#8219;","&bdquo;","&hellip;","&trade;","&#9658;","&bull;","&rarr;","&rArr;","&hArr;","&diams;","&asymp;"],n.Icon.set("symbols",a()),s.Config.prototype.controls.symbols={hotkeys:["ctrl+shift+i","cmd+shift+i"],tooltip:"Insert Special Character",popup(e,t,i){let n=e.e.fire("generateSpecialCharactersTable.symbols");if(n){if(e.o.usePopupForSpecialCharacters){let t=e.c.div();return t.classList.add("jodit-symbols"),o.Dom.append(t,n),e.e.on(n,"close_dialog",i),t}e.alert(n,"Select Special Character",void 0,"jodit-symbols").bindDestruct(e);let t=o.Dom.first(n,e=>o.Dom.isTag(e,"a"));t&&t.focus()}}}},91017:function(e,t,i){"use strict";i.r(t),i.d(t,{ar:function(){return o},cs_cz:function(){return o},de:function(){return o},es:function(){return o},fa:function(){return o},fi:function(){return o},fr:function(){return o},he:function(){return o},hu:function(){return o},id:function(){return o},it:function(){return o},ja:function(){return o},ko:function(){return o},mn:function(){return o},nl:function(){return o},pl:function(){return o},pt_br:function(){return o},ru:function(){return o},tr:function(){return o},ua:function(){return o},zh_cn:function(){return o},zh_tw:function(){return o}});var o=i(41324)},11774:function(e,t,i){"use strict";var o=i(25045),n=i(81937),s=i(23211),r=i(28077),a=i(93640),l=i(18855);i(18993);var c=i(91017);class u extends l.Plugin{afterInit(e){e.e.on("generateSpecialCharactersTable.symbols",()=>{let t=e.c.fromHTML(`<div class="jodit-symbols__container">
260
260
  <div class="jodit-symbols__container_table">
261
261
  <table class="jodit-symbols__table"><tbody></tbody></table>
262
262
  </div>
@@ -268,7 +268,7 @@
268
268
  data-index-j="${o}"
269
269
  role="option"
270
270
  tabindex="-1"
271
- >${e.o.specialCharacters[t]}</a>`);r.push(a),s.Dom.append(n,a),s.Dom.append(i,n)}s.Dom.append(o,i)}let l=this;return e.e.on(r,"focus",function(){i.innerHTML=this.innerHTML}).on(r,"mousedown",function(t){s.Dom.isTag(this,"a")&&(e.s.focus(),e.s.insertHTML(this.innerHTML),t?.shiftKey||e.e.fire(this,"close_dialog"),t&&t.preventDefault(),t&&t.stopImmediatePropagation())}).on(r,"mouseenter",function(){s.Dom.isTag(this,"a")&&this.focus()}).on(r,"keydown",t=>{let i=t.target;if(s.Dom.isTag(i,"a")){let o,s=parseInt((0,a.attr)(i,"-index")||"0",10),c=parseInt((0,a.attr)(i,"data-index-j")||"0",10);switch(t.key){case n.KEY_UP:case n.KEY_DOWN:void 0===r[o=t.key===n.KEY_UP?s-l.__countInRow:s+l.__countInRow]&&(o=t.key===n.KEY_UP?Math.floor(r.length/l.__countInRow)*l.__countInRow+c:c)>r.length-1&&(o-=l.__countInRow),r[o]&&r[o].focus();break;case n.KEY_RIGHT:case n.KEY_LEFT:void 0===r[o=t.key===n.KEY_LEFT?s-1:s+1]&&(o=t.key===n.KEY_LEFT?r.length-1:0),r[o]&&r[o].focus();break;case n.KEY_ENTER:e.e.fire(i,"mousedown"),t.stopImmediatePropagation(),t.preventDefault()}}}),t})}beforeDestruct(e){e.e.off("generateSpecialCharactersTable.symbols")}constructor(e){super(e),(0,o._)(this,"buttons",[{name:"symbols",group:"insert"}]),(0,o._)(this,"__countInRow",17),(0,r.extendLang)(c)}}r.pluginSystem.add("symbols",u)},2923:function(e,t,i){"use strict";i.d(t,{onTabInsideLi:function(){return o.onTabInsideLi}});var o=i(8837)},8837:function(e,t,i){"use strict";i.d(t,{onTabInsideLi:function(){return s}});var o=i(23211),n=i(28712);function s(e,t=!1){let i,r,a,l;if(!e.o.tab.tabInsideLiInsertNewList)return!1;let[c,u]=(i=e.createInside.fake(),r=e.createInside.fake(),(a=e.s.range.cloneRange()).collapse(!0),a.insertNode(i),(l=e.s.range.cloneRange()).collapse(!1),l.insertNode(r),[i,r]);try{let i,s,r,a,l,u=!!(i=o.Dom.closest(c,"li",e.editor))&&(!!t||!!o.Dom.isLeaf(i.previousElementSibling))&&(!t||!!o.Dom.closest(i,"li",e.editor))&&i;if(!u||!(s=o.Dom.closest(c,"li",e.editor))||s!==u&&!u.contains(s))return!1;let h=o.Dom.closest(u,["ol","ul"],e.editor);if(!h||t&&!o.Dom.closest(h,"li",e.editor))return!1;return t?function(e,t,i){let s=o.Dom.closest(t,"li",e.editor);(0,n.assert)(s,"tab parent li is null");let r=Array.from(t.children).filter(e=>o.Dom.isLeaf(e));o.Dom.after(s,i);let a=r.indexOf(i);if((0===a||1===r.length)&&o.Dom.safeRemove(t),a!==r.length-1){let e=t.cloneNode();o.Dom.append(i,e);for(let t=a+1;t<r.length;t+=1)o.Dom.append(e,r[t])}}(e,h,u):(r=u.previousElementSibling,(0,n.assert)(r,"tab previousElementSibling is null"),a=r.lastElementChild,l=o.Dom.isTag(a,h.tagName)?a:e.createInside.element(h.tagName,Array.from(h.attributes).reduce((e,t)=>(e[t.name]=t.value,e),{})),o.Dom.append(l,u),a!==l&&o.Dom.append(r,l)),!0}finally{let t=e.s.createRange();t.setStartAfter(c),t.setEndBefore(u),e.s.selectRange(t),o.Dom.safeRemove(c),o.Dom.safeRemove(u)}}},69023:function(e,t,i){"use strict";i(5266).Config.prototype.tab={tabInsideLiInsertNewList:!0}},81582:function(e,t,i){"use strict";var o=i(31635),n=i(81937),s=i(84839),r=i(28077),a=i(91206);i(69023);var l=i(2923);class c extends a.Plugin{afterInit(e){}__onTab(e){if(e.key===n.KEY_TAB&&this.__onShift(e.shiftKey))return!1}__onCommand(e){if(("indent"===e||"outdent"===e)&&this.__onShift("outdent"===e))return!1}__onShift(e){let t=(0,l.onTabInsideLi)(this.j,e);return t&&this.j.e.fire("afterTab",e),t}beforeDestruct(e){}}(0,o.__decorate)([(0,s.watch)(":keydown.tab")],c.prototype,"__onTab",null),(0,o.__decorate)([(0,s.watch)(":beforeCommand.tab")],c.prototype,"__onCommand",null),r.pluginSystem.add("tab",c)},30110:function(e,t,i){"use strict";var o=i(81937),n=i(23211),s=i(28077),r=i(65946),a=i(98803);let l=new Set([o.KEY_TAB,o.KEY_LEFT,o.KEY_RIGHT,o.KEY_UP,o.KEY_DOWN]);s.pluginSystem.add("tableKeyboardNavigation",function(e){e.e.off(".tableKeyboardNavigation").on("keydown.tableKeyboardNavigation",t=>{let{key:i}=t,s=function(e,t){if(!l.has(t))return;let i=e.s.current();if(!i)return;let s=n.Dom.up(i,n.Dom.isCell,e.editor);if(!s)return;let{range:a}=e.s;if(t!==o.KEY_TAB&&i!==s){let e=t===o.KEY_RIGHT||t===o.KEY_DOWN,l=(0,r.call)(e?n.Dom.next:n.Dom.prev,i,e=>t===o.KEY_UP||t===o.KEY_DOWN?n.Dom.isTag(e,"br"):!!e,s);if(!e&&(l||t!==o.KEY_UP&&n.Dom.isText(i)&&0!==a.startOffset)||e&&(l||t!==o.KEY_DOWN&&n.Dom.isText(i)&&i.nodeValue&&a.startOffset!==i.nodeValue.length))return}return s}(e,i);if(!s)return;let c=e.getInstance(a.Table,e.o),u=n.Dom.closest(s,"table",e.editor),h=null,d=i===o.KEY_LEFT||t.shiftKey,p=()=>(0,r.call)(d?n.Dom.prev:n.Dom.next,s,n.Dom.isCell,u);switch(i){case o.KEY_TAB:case o.KEY_LEFT:(h=p())||(c.appendRow(u,!!d&&n.Dom.first(u,e=>n.Dom.isTag(e,"tr")),!d),h=p());break;case o.KEY_UP:case o.KEY_DOWN:{let e=c.formalMatrix(u),[t,n]=c.formalCoordinate(u,s);i===o.KEY_UP?void 0!==e[t-1]&&(h=e[t-1][n]):void 0!==e[t+1]&&(h=e[t+1][n])}}if(h){if(e.e.fire("hidePopup hideResizer"),h.firstChild)i===o.KEY_TAB?e.s.select(h,!0):e.s.setCursorIn(h,i===o.KEY_RIGHT||i===o.KEY_DOWN);else{let t=e.createInside.element("br");n.Dom.append(h,t),e.s.setCursorBefore(t)}return e.synchronizeValues(),!1}})})},48290:function(e,t,i){"use strict";var o=i(81937),n=i(27795),s=i(65946),r=i(93640),a=i(29434),l=i(5266),c=i(67447),u=i.n(c);l.Config.prototype.table={splitBlockOnInsertTable:!0,selectionCellStyle:"border: 1px double #1e88e5 !important;",useExtraClassesOptions:!1},a.Icon.set("table",u()),l.Config.prototype.controls.table={data:{cols:10,rows:10,classList:{"table table-bordered":"Bootstrap Bordered","table table-striped":"Bootstrap Striped","table table-dark":"Bootstrap Dark"}},popup(e,t,i,a){let l;e.editor.normalize();let c=e.history.snapshot.make(),u=a.control,h=u.data&&u.data.rows?u.data.rows:10,d=u.data&&u.data.cols?u.data.cols:10,p=e.c.fromHTML('<form class="jodit-form jodit-form__inserter"><div class="jodit-form__table-creator-box"><div class="jodit-form__container"></div><div class="jodit-form__options">'+(()=>{if(!e.o.table.useExtraClassesOptions)return"";let t=[];if(u.data){let e=u.data.classList;Object.keys(e).forEach(i=>{t.push(`<label class="jodit_vertical_middle"><input class="jodit-checkbox" value="${i}" type="checkbox"/>${e[i]}</label>`)})}return t.join("")})()+'</div></div><label class="jodit-form__center"><span>1</span> &times; <span>1</span></label></form>'),[f,m]=(l=[],n.Dom.each(p,e=>{n.Dom.isTag(e,"span")&&l.push(e)}),l),g=n.Dom.first(p,e=>n.Dom.isHTMLElement(e)&&e.classList.contains("jodit-form__container")),_=n.Dom.first(p,e=>n.Dom.isHTMLElement(e)&&e.classList.contains("jodit-form__options")),v=[],b=h*d;(0,r.attr)(g,{role:"grid",ariaLabel:"Table size",ariaRowcount:h,ariaColcount:d});for(let t=0;t<b;t+=1)if(!v[t]){let i=Math.floor(t/d)+1,o=t%d+1;v.push(e.c.element("span",{dataIndex:t,role:"gridcell",tabindex:0===t?0:-1,ariaLabel:`${i} by ${o}`}))}let y=e=>{let t=parseInt((0,r.attr)(e,"-index")||"0",10),i=Math.ceil((t+1)/d),o=t%d+1;for(let e=0;e<v.length;e+=1)o>=e%d+1&&i>=Math.ceil((e+1)/d)?v[e].className="jodit_hovered":v[e].className="";m.textContent=o.toString(),f.textContent=i.toString()},w=t=>{let o=parseInt((0,r.attr)(t,"-index")||"0",10),a=Math.ceil((o+1)/d),l=o%d+1,u=e.createInside,h=u.element("tbody"),p=u.element("table");n.Dom.append(p,h);let f=null,m,g;for(let e=1;a>=e;e+=1){m=u.element("tr");for(let e=1;e<=l;e+=1)g=u.element("td"),f||(f=g),(0,s.css)(g,"width",(100/l).toFixed(4)+"%"),n.Dom.append(g,u.element("br")),n.Dom.append(m,u.text(`
271
+ >${e.o.specialCharacters[t]}</a>`);r.push(a),s.Dom.append(n,a),s.Dom.append(i,n)}s.Dom.append(o,i)}let l=this;return e.e.on(r,"focus",function(){i.innerHTML=this.innerHTML}).on(r,"mousedown",function(t){s.Dom.isTag(this,"a")&&(e.s.focus(),e.s.insertHTML(this.innerHTML),t?.shiftKey||e.e.fire(this,"close_dialog"),t&&t.preventDefault(),t&&t.stopImmediatePropagation())}).on(r,"mouseenter",function(){s.Dom.isTag(this,"a")&&this.focus()}).on(r,"keydown",t=>{let i=t.target;if(s.Dom.isTag(i,"a")){let o,s=parseInt((0,a.attr)(i,"-index")||"0",10),c=parseInt((0,a.attr)(i,"data-index-j")||"0",10);switch(t.key){case n.KEY_UP:case n.KEY_DOWN:void 0===r[o=t.key===n.KEY_UP?s-l.__countInRow:s+l.__countInRow]&&(o=t.key===n.KEY_UP?Math.floor(r.length/l.__countInRow)*l.__countInRow+c:c)>r.length-1&&(o-=l.__countInRow),r[o]&&r[o].focus();break;case n.KEY_RIGHT:case n.KEY_LEFT:void 0===r[o=t.key===n.KEY_LEFT?s-1:s+1]&&(o=t.key===n.KEY_LEFT?r.length-1:0),r[o]&&r[o].focus();break;case n.KEY_ENTER:e.e.fire(i,"mousedown"),t.stopImmediatePropagation(),t.preventDefault()}}}),t})}beforeDestruct(e){e.e.off("generateSpecialCharactersTable.symbols")}constructor(e){super(e),(0,o._)(this,"buttons",[{name:"symbols",group:"insert"}]),(0,o._)(this,"__countInRow",17),(0,r.extendLang)(c)}}r.pluginSystem.add("symbols",u)},2923:function(e,t,i){"use strict";i.d(t,{onTabInsideLi:function(){return o.onTabInsideLi}});var o=i(8837)},8837:function(e,t,i){"use strict";i.d(t,{onTabInsideLi:function(){return s}});var o=i(23211),n=i(28712);function s(e,t=!1){let i,r,a,l;if(!e.o.tab.tabInsideLiInsertNewList)return!1;let[c,u]=(i=e.createInside.fake(),r=e.createInside.fake(),(a=e.s.range.cloneRange()).collapse(!0),a.insertNode(i),(l=e.s.range.cloneRange()).collapse(!1),l.insertNode(r),[i,r]);try{let i,s,r,a,l,u=!!(i=o.Dom.closest(c,"li",e.editor))&&(!!t||!!o.Dom.isLeaf(i.previousElementSibling))&&(!t||!!o.Dom.closest(i,"li",e.editor))&&i;if(!u||!(s=o.Dom.closest(c,"li",e.editor))||s!==u&&!u.contains(s))return!1;let h=o.Dom.closest(u,["ol","ul"],e.editor);if(!h||t&&!o.Dom.closest(h,"li",e.editor))return!1;return t?function(e,t,i){let s=o.Dom.closest(t,"li",e.editor);(0,n.assert)(s,"tab parent li is null");let r=Array.from(t.children).filter(e=>o.Dom.isLeaf(e));o.Dom.after(s,i);let a=r.indexOf(i);if((0===a||1===r.length)&&o.Dom.safeRemove(t),a!==r.length-1){let e=t.cloneNode();o.Dom.append(i,e);for(let t=a+1;t<r.length;t+=1)o.Dom.append(e,r[t])}}(e,h,u):(r=u.previousElementSibling,(0,n.assert)(r,"tab previousElementSibling is null"),a=r.lastElementChild,l=o.Dom.isTag(a,h.tagName)?a:e.createInside.element(h.tagName,Array.from(h.attributes).reduce((e,t)=>(e[t.name]=t.value,e),{})),o.Dom.append(l,u),a!==l&&o.Dom.append(r,l)),!0}finally{let t=e.s.createRange();t.setStartAfter(c),t.setEndBefore(u),e.s.selectRange(t),o.Dom.safeRemove(c),o.Dom.safeRemove(u)}}},69023:function(e,t,i){"use strict";i(5266).Config.prototype.tab={tabInsideLiInsertNewList:!0}},81582:function(e,t,i){"use strict";var o=i(31635),n=i(81937),s=i(84839),r=i(28077),a=i(91206);i(69023);var l=i(2923);class c extends a.Plugin{afterInit(e){}__onTab(e){if(e.key===n.KEY_TAB&&this.__onShift(e.shiftKey))return!1}__onCommand(e){if(("indent"===e||"outdent"===e)&&this.__onShift("outdent"===e))return!1}__onShift(e){let t=(0,l.onTabInsideLi)(this.j,e);return t&&this.j.e.fire("afterTab",e),t}beforeDestruct(e){}}(0,o.__decorate)([(0,s.watch)(":keydown.tab")],c.prototype,"__onTab",null),(0,o.__decorate)([(0,s.watch)(":beforeCommand.tab")],c.prototype,"__onCommand",null),r.pluginSystem.add("tab",c)},30110:function(e,t,i){"use strict";var o=i(81937),n=i(23211),s=i(28077),r=i(65946),a=i(98803);let l=new Set([o.KEY_TAB,o.KEY_LEFT,o.KEY_RIGHT,o.KEY_UP,o.KEY_DOWN]);s.pluginSystem.add("tableKeyboardNavigation",function(e){e.e.off(".tableKeyboardNavigation").on("keydown.tableKeyboardNavigation",t=>{let{key:i}=t,s=function(e,t){if(!l.has(t))return;let i=e.s.current();if(!i)return;let s=n.Dom.up(i,n.Dom.isCell,e.editor);if(!s)return;let{range:a}=e.s;if(t!==o.KEY_TAB&&i!==s){let e=t===o.KEY_RIGHT||t===o.KEY_DOWN,l=(0,r.call)(e?n.Dom.next:n.Dom.prev,i,e=>t===o.KEY_UP||t===o.KEY_DOWN?n.Dom.isTag(e,"br"):!!e,s);if(!e&&(l||t!==o.KEY_UP&&n.Dom.isText(i)&&0!==a.startOffset)||e&&(l||t!==o.KEY_DOWN&&n.Dom.isText(i)&&i.nodeValue&&a.startOffset!==i.nodeValue.length))return}return s}(e,i);if(!s)return;let c=e.getInstance(a.Table,e.o),u=n.Dom.closest(s,"table",e.editor),h=null,d=i===o.KEY_LEFT||t.shiftKey,f=()=>(0,r.call)(d?n.Dom.prev:n.Dom.next,s,n.Dom.isCell,u);switch(i){case o.KEY_TAB:case o.KEY_LEFT:(h=f())||(c.appendRow(u,!!d&&n.Dom.first(u,e=>n.Dom.isTag(e,"tr")),!d),h=f());break;case o.KEY_UP:case o.KEY_DOWN:{let e=c.formalMatrix(u),[t,n]=c.formalCoordinate(u,s);i===o.KEY_UP?void 0!==e[t-1]&&(h=e[t-1][n]):void 0!==e[t+1]&&(h=e[t+1][n])}}if(h){if(e.e.fire("hidePopup hideResizer"),h.firstChild)i===o.KEY_TAB?e.s.select(h,!0):e.s.setCursorIn(h,i===o.KEY_RIGHT||i===o.KEY_DOWN);else{let t=e.createInside.element("br");n.Dom.append(h,t),e.s.setCursorBefore(t)}return e.synchronizeValues(),!1}})})},48290:function(e,t,i){"use strict";var o=i(81937),n=i(27795),s=i(65946),r=i(93640),a=i(29434),l=i(5266),c=i(67447),u=i.n(c);l.Config.prototype.table={splitBlockOnInsertTable:!0,selectionCellStyle:"border: 1px double #1e88e5 !important;",useExtraClassesOptions:!1},a.Icon.set("table",u()),l.Config.prototype.controls.table={data:{cols:10,rows:10,classList:{"table table-bordered":"Bootstrap Bordered","table table-striped":"Bootstrap Striped","table table-dark":"Bootstrap Dark"}},popup(e,t,i,a){let l;e.editor.normalize();let c=e.history.snapshot.make(),u=a.control,h=u.data&&u.data.rows?u.data.rows:10,d=u.data&&u.data.cols?u.data.cols:10,f=e.c.fromHTML('<form class="jodit-form jodit-form__inserter"><div class="jodit-form__table-creator-box"><div class="jodit-form__container"></div><div class="jodit-form__options">'+(()=>{if(!e.o.table.useExtraClassesOptions)return"";let t=[];if(u.data){let e=u.data.classList;Object.keys(e).forEach(i=>{t.push(`<label class="jodit_vertical_middle"><input class="jodit-checkbox" value="${i}" type="checkbox"/>${e[i]}</label>`)})}return t.join("")})()+'</div></div><label class="jodit-form__center"><span>1</span> &times; <span>1</span></label></form>'),[p,m]=(l=[],n.Dom.each(f,e=>{n.Dom.isTag(e,"span")&&l.push(e)}),l),g=n.Dom.first(f,e=>n.Dom.isHTMLElement(e)&&e.classList.contains("jodit-form__container")),_=n.Dom.first(f,e=>n.Dom.isHTMLElement(e)&&e.classList.contains("jodit-form__options")),v=[],b=h*d;(0,r.attr)(g,{role:"grid",ariaLabel:"Table size",ariaRowcount:h,ariaColcount:d});for(let t=0;t<b;t+=1)if(!v[t]){let i=Math.floor(t/d)+1,o=t%d+1;v.push(e.c.element("span",{dataIndex:t,role:"gridcell",tabindex:0===t?0:-1,ariaLabel:`${i} by ${o}`}))}let y=e=>{let t=parseInt((0,r.attr)(e,"-index")||"0",10),i=Math.ceil((t+1)/d),o=t%d+1;for(let e=0;e<v.length;e+=1)o>=e%d+1&&i>=Math.ceil((e+1)/d)?v[e].className="jodit_hovered":v[e].className="";m.textContent=o.toString(),p.textContent=i.toString()},w=t=>{let o=parseInt((0,r.attr)(t,"-index")||"0",10),a=Math.ceil((o+1)/d),l=o%d+1,u=e.createInside,h=u.element("tbody"),f=u.element("table");n.Dom.append(f,h);let p=null,m,g;for(let e=1;a>=e;e+=1){m=u.element("tr");for(let e=1;e<=l;e+=1)g=u.element("td"),p||(p=g),(0,s.css)(g,"width",(100/l).toFixed(4)+"%"),n.Dom.append(g,u.element("br")),n.Dom.append(m,u.text(`
272
272
  `)),n.Dom.append(m,u.text(" ")),n.Dom.append(m,g);n.Dom.append(h,u.text(`
273
- `)),n.Dom.append(h,m)}(0,s.$$)("input[type=checkbox]:checked",_).forEach(e=>{e.value.split(/[\s]+/).forEach(e=>{p.classList.add(e)})}),e.s.restore(),e.s.removeMarkers(),e.editor.normalize(),e.history.snapshot.restore(c);let v=n.Dom.furthest(e.s.current(),n.Dom.isBlock,e.editor);if(v&&n.Dom.isEmpty(v))n.Dom.replace(v,p,void 0,!1,!0);else if(v){let t=u.text(`
274
- `);if(e.o.table.splitBlockOnInsertTable){let i=e.s.range;i.collapse(!1),i.insertNode(t),i.collapse(!1),e.s.selectRange(i);let o=e.s.splitSelection(v,t);o?n.Dom.after(o,p):n.Dom.after(v,p)}else n.Dom.after(v,t),n.Dom.after(t,p)}else e.s.insertNode(p,!1);f&&(e.s.setCursorIn(f),(0,s.scrollIntoViewIfNeeded)(f,e.editor,e.ed)),i()};if(e.e.on(g,"mousemove",e=>{n.Dom.isTag(e.target,"span")&&y(e.target)}).on(g,"touchstart mousedown",e=>{n.Dom.isTag(e.target,"span")&&(e.preventDefault(),e.stopImmediatePropagation(),w(e.target))}).on(g,"keydown",e=>{let t;if(!n.Dom.isTag(e.target,"span"))return;if(e.key===o.KEY_ENTER){e.preventDefault(),e.stopImmediatePropagation(),w(e.target);return}if(e.key===o.KEY_ESC){e.preventDefault(),e.stopImmediatePropagation(),i();return}let s=parseInt((0,r.attr)(e.target,"-index")||"0",10),a=Math.floor(s/d),l=s%d;switch(e.key){case o.KEY_LEFT:t=l>0?s-1:s;break;case o.KEY_RIGHT:t=l<d-1?s+1:s;break;case o.KEY_UP:t=a>0?s-d:s;break;case o.KEY_DOWN:t=a<h-1?s+d:s;break;default:return}e.preventDefault(),e.stopImmediatePropagation(),t!==s&&(v[s].tabIndex=-1,v[t].tabIndex=0,v[t].focus(),y(v[t]))}),a&&a.parentElement){for(let t=0;t<h;t+=1){let i=e.c.div();(0,r.attr)(i,"role","row");for(let e=0;e<d;e+=1)n.Dom.append(i,v[t*d+e]);n.Dom.append(g,i)}v[0]&&(v[0].className="hovered")}return p},tooltip:"Insert table"}},7994:function(e,t,i){"use strict";var o=i(28077);i(48290),o.pluginSystem.add("table",function(e){e.registerButton({name:"table",group:"insert"})})},74192:function(e,t,i){"use strict";var o=i(31635),n=i(81937),s=i(49574),r=i(68616),a=i(23211),l=i(28077),c=i(7909),u=i(91206);let h=new Set(["input","textarea","select"]);class d extends u.Plugin{afterInit(e){e.registerCommand("focusToolbar",{hotkeys:"alt+f10",exec:this.focusToolbar})}beforeDestruct(){}focusToolbar(){let[e]=this.__buttons();return e?.focus(),!1}onKeyDown(e){if(e.defaultPrevented||e.altKey||e.ctrlKey||e.metaKey)return;let t=e.target;if(a.Dom.isTag(t,h)||a.Dom.isHTMLElement(t)&&t.isContentEditable)return;let i=this.__buttons();if(i.length){switch(e.key){case n.KEY_ESC:this.j.s.focus();break;case n.KEY_HOME:i[0].focus();break;case n.KEY_END:i[i.length-1].focus();break;case n.KEY_LEFT:case n.KEY_RIGHT:{let o=i.findIndex(e=>e.container.contains(t));if(-1===o)return;i[(o+(e.key===n.KEY_RIGHT!==this.__isRtl()?1:-1)+i.length)%i.length].focus();break}default:return}return e.preventDefault(),e.stopPropagation(),!1}}__buttons(){return this.j.toolbar.buttons.filter(e=>!e.state.disabled&&e.container.isConnected)}__isRtl(){return"rtl"===(0,c.attr)(this.j.toolbar.container,"dir")}}(0,o.__decorate)([s.autobind],d.prototype,"focusToolbar",null),(0,o.__decorate)([(0,r.watch)("j.toolbar.container:keydown.toolbar-navigation")],d.prototype,"onKeyDown",null),l.pluginSystem.add("toolbarNavigation",d)},48899:function(e,t,i){"use strict";var o=i(65946),n=i(59400),s=i(5658),r=i(29434),a=i(5266),l=i(15753),c=i(36339),u=i.n(c);function h(e){e.files?.forEach(t=>{this.s.insertNode(this.createInside.element("video",{controls:"",src:e.baseurl+t}))})}a.Config.prototype.video={parseUrlToVideoEmbed:o.convertMediaUrlToVideoEmbed,defaultWidth:400,defaultHeight:345,defaultHandlerSuccess:h},r.Icon.set("video",u()),a.Config.prototype.controls.video={popup(e,t,i){let r=new s.UIForm(e,[new s.UIBlock(e,[new s.UIInput(e,{name:"url",required:!0,label:"URL",placeholder:"https://",validators:["url"]})]),new s.UIBlock(e,[(0,n.Button)(e,"","Insert","primary").onAction(()=>r.submit())])]),a=new s.UIForm(e,[new s.UIBlock(e,[new s.UITextArea(e,{name:"code",required:!0,label:"Embed code"})]),new s.UIBlock(e,[(0,n.Button)(e,"","Insert","primary").onAction(()=>a.submit())])]),c=[],u=t=>{e.s.restore(),e.s.insertHTML(t),i()};e.s.save();let{uploader:d}=e.o;return!1!==d.showTabInFileSelector&&(d.url||d.customUploadFunction)&&c.push((0,l.UploadTab)(e,t=>{e.s.restore(),(e.o.video?.defaultHandlerSuccess??h).call(e,t)},{label:"Drop file",accept:"video/*"})),c.push({icon:"link",name:"Link",content:r.container},{icon:"source",name:"Code",content:a.container}),r.onSubmit(t=>{u((0,o.call)(e.o.video?.parseUrlToVideoEmbed??o.convertMediaUrlToVideoEmbed,t.url,{width:e.o.video?.defaultWidth,height:e.o.video?.defaultHeight}))}),a.onSubmit(e=>{u(e.code)}),(0,l.TabsWidget)(e,c)},tags:["iframe"],tooltip:"Insert youtube/vimeo video"}},34142:function(e,t,i){"use strict";var o=i(28077);i(48899),o.pluginSystem.add("video",function(e){e.registerButton({name:"video",group:"media"})})},86038:function(e,t,i){"use strict";i(5266).Config.prototype.wrapNodes={exclude:new Set(["hr","style","br"]),emptyBlockAfterInit:!0}},22980:function(e,t,i){"use strict";var o=i(25045),n=i(31635),s=i(84839),r=i(27795),a=i(28077),l=i(85932),c=i(91206);i(86038);class u extends c.Plugin{afterInit(e){"br"!==e.o.enter.toLowerCase()&&e.e.on("drop.wtn focus.wtn keydown.wtn mousedown.wtn afterInit.wtn backSpaceAfterDelete.wtn",this.preprocessInput,{top:!0}).on("afterInit.wtn postProcessSetEditorValue.wtn afterCommitStyle.wtn backSpaceAfterDelete.wtn",this.postProcessSetEditorValue)}beforeDestruct(e){e.e.off(".wtn")}postProcessSetEditorValue(){let{jodit:e}=this;if(!e.isEditorMode())return;let t=e.editor.firstChild,i=!1;for(;t;){if(t=function(e,t){let i=e,o=e;do if(r.Dom.isElement(o)&&r.Dom.isLeaf(o)&&!r.Dom.isList(o.parentElement)){let e=r.Dom.findNotEmptySibling(o,!1);r.Dom.isTag(i,"ul")?r.Dom.append(i,o):i=r.Dom.wrap(o,"ul",t.createInside),o=e}else break;while(o)return i}(t,e),this.isSuitableStart(t)){i||e.s.save(),i=!0;let o=e.createInside.element(e.o.enter);for(r.Dom.before(t,o);t&&this.isSuitable(t);){let e=t.nextSibling;r.Dom.append(o,t),t=e}o.normalize(),t=o}t=t&&t.nextSibling}i&&(e.s.restore(),"afterInit"===e.e.current&&e.e.fire("internalChange"))}preprocessInput(){let{jodit:e}=this,t="afterInit"===e.e.current;if(!e.isEditorMode()||e.editor.firstChild||!e.o.wrapNodes.emptyBlockAfterInit&&t)return;let i=e.createInside.element(e.o.enter),o=e.createInside.element("br");r.Dom.append(i,o),r.Dom.append(e.editor,i),(e.s.isFocused()||"backSpaceAfterDelete"===e.e.current)&&e.s.setCursorBefore(o),e.e.fire("internalChange")}constructor(...e){super(...e),(0,o._)(this,"isSuitableStart",e=>r.Dom.isText(e)&&(0,l.isString)(e.nodeValue)&&(/[^\s]/.test(e.nodeValue)||e.parentNode?.firstChild===e&&this.isSuitable(e.nextSibling))||this.isNotWrapped(e)&&!r.Dom.isTemporary(e)),(0,o._)(this,"isSuitable",e=>r.Dom.isText(e)||this.isNotWrapped(e)),(0,o._)(this,"isNotWrapped",e=>r.Dom.isElement(e)&&!(r.Dom.isBlock(e)||r.Dom.isTag(e,this.j.o.wrapNodes.exclude)))}}(0,n.__decorate)([s.autobind],u.prototype,"postProcessSetEditorValue",null),(0,n.__decorate)([s.autobind],u.prototype,"preprocessInput",null),a.pluginSystem.add("wrapNodes",u)},92063:function(e,t,i){"use strict";i(5266).Config.prototype.showXPathInStatusbar=!0},52014:function(e,t,i){"use strict";var o=i(25045),n=i(81937),s=i(27795),r=i(28077),a=i(4040),l=i(7909),c=i(28723),u=i(91206),h=i(67399),d=i(4274);i(92063);class p extends u.Plugin{afterInit(){if(this.j.o.showXPathInStatusbar){this.container=this.j.c.div("jodit-xpath"),(0,l.attr)(this.container,"role","list");let e=()=>{this.j.o.showXPathInStatusbar&&this.container&&(this.j.statusbar.append(this.container),this.j.getRealMode()===n.MODE_WYSIWYG?this.calcPath():(this.container&&(this.container.innerHTML=n.INVISIBLE_SPACE),this.appendSelectAll()))};this.j.e.off(".xpath").on("pointerup.xpath change.xpath keydown.xpath changeSelection.xpath",this.calcPath).on("afterSetMode.xpath afterInit.xpath changePlace.xpath",e),e(),this.calcPath()}}beforeDestruct(){this.j&&this.j.events&&this.j.e.off(".xpath"),this.removeSelectAll(),this.menu&&this.menu.destruct(),s.Dom.safeRemove(this.container),delete this.menu,delete this.container}constructor(...e){super(...e),(0,o._)(this,"onContext",(e,t)=>(this.menu||(this.menu=new h.ContextMenu(this.j)),this.menu.show(t.clientX,t.clientY,[{icon:"bin",title:e===this.j.editor?"Clear":"Remove",exec:()=>{e!==this.j.editor?s.Dom.safeRemove(e):this.j.value="",this.j.synchronizeValues()}},{icon:"select-all",title:"Select",exec:()=>{this.j.s.select(e)}}]),!1)),(0,o._)(this,"onSelectPath",(e,t)=>{this.j.s.focus();let i=(0,l.attr)(t.target,"-path")||"/";if("/"===i)return this.j.execCommand("selectall"),!1;try{let e=this.j.ed.evaluate(i,this.j.editor,null,XPathResult.ANY_TYPE,null).iterateNext();if(e)return this.j.s.select(e),!1}catch{}return this.j.s.select(e),!1}),(0,o._)(this,"tpl",(e,t,i,o)=>{let n=this.j.c.fromHTML(`<span class="jodit-xpath__item"><a role="button" data-path="${t}" title="${o}" tabindex="-1"'>${(0,a.trim)(i)}</a></span>`),s=n.firstChild;return this.j.e.on(s,"click",this.onSelectPath.bind(this,e)).on(s,"contextmenu",this.onContext.bind(this,e)),n}),(0,o._)(this,"selectAllButton",void 0),(0,o._)(this,"removeSelectAll",()=>{this.selectAllButton&&(this.selectAllButton.destruct(),delete this.selectAllButton)}),(0,o._)(this,"appendSelectAll",()=>{this.removeSelectAll(),this.selectAllButton=(0,d.makeButton)(this.j,{name:"selectall",...this.j.o.controls.selectall}),this.selectAllButton.state.size="tiny",this.container&&s.Dom.prepend(this.container,this.selectAllButton.container)}),(0,o._)(this,"calcPathImd",()=>{if(this.isDestructed)return;let e=this.j.s.current();if(this.container&&(this.container.innerHTML=n.INVISIBLE_SPACE),e){let t,i,o;s.Dom.up(e,e=>{e&&this.j.editor!==e&&!s.Dom.isText(e)&&!s.Dom.isComment(e)&&(t=e.nodeName.toLowerCase(),i=(0,c.getXPathByElement)(e,this.j.editor).replace(/^\//,""),o=this.tpl(e,i,t,this.j.i18n("Select %s",t)),this.container&&s.Dom.prepend(this.container,o))},this.j.editor)}this.appendSelectAll()}),(0,o._)(this,"calcPath",this.j.async.debounce(this.calcPathImd,2*this.j.defaultTimeout,!0)),(0,o._)(this,"container",void 0),(0,o._)(this,"menu",void 0)}}r.pluginSystem.add("xpath",p)},13564:function(e,t,i){"use strict";i.r(t),i.d(t,{angle_down:function(){return n.a},angle_left:function(){return r.a},angle_right:function(){return l.a},angle_up:function(){return u.a},bin:function(){return d.a},cancel:function(){return f.a},center:function(){return g.a},check:function(){return v.a},chevron:function(){return y.a},dots:function(){return S.a},download:function(){return E.a},eraser:function(){return I.a},eye:function(){return T.a},file:function(){return j.a},folder:function(){return A.a},info_circle:function(){return M.a},left:function(){return N.a},lock:function(){return O.a},ok:function(){return F.a},pencil:function(){return U.a},plus:function(){return V.a},resize_handler:function(){return Y.a},right:function(){return K.a},save:function(){return q.a},settings:function(){return Z.a},unlock:function(){return ee.a},update:function(){return ei.a},upload:function(){return en.a},valign:function(){return er.a}});var o=i(88497),n=i.n(o),s=i(91882),r=i.n(s),a=i(14305),l=i.n(a),c=i(58446),u=i.n(c),h=i(39858),d=i.n(h),p=i(70881),f=i.n(p),m=i(60636),g=i.n(m),_=i(32013),v=i.n(_),b=i(45512),y=i.n(b),w=i(80347),S=i.n(w),C=i(91099),E=i.n(C),D=i(28967),I=i.n(D),k=i(95134),T=i.n(k),x=i(70697),j=i.n(x),P=i(49983),A=i.n(P),L=i(98964),M=i.n(L),R=i(8136),N=i.n(R),B=i(94806),O=i.n(B),z=i(31365),F=i.n(z),H=i(44636),U=i.n(H),W=i(36327),V=i.n(W),$=i(53328),Y=i.n($),G=i(98711),K=i.n(G),X=i(53808),q=i.n(X),J=i(20784),Z=i.n(J),Q=i(70999),ee=i.n(Q),et=i(45244),ei=i.n(et),eo=i(99876),en=i.n(eo),es=i(14006),er=i.n(es)},63837:function(e){e.exports.default={"Type something":"Start writing...",pencil:"Edit",Quadrate:"Square"}},53414:function(e){e.exports.default=[" URL","--Not Set--","About Jodit","Add column","Add folder","Add row","Advanced","Align","Align Center","Align Justify","Align Left","Align Right","All","Alternative","Alternative text","Anchor","Apply","Are you sure?","Background","Bold","Border","Border radius","Bottom","Break","Browse","Buy full version","Cancel","Center","Change mode","Chars: %d","Choose Content to Paste","Circle","Class name","Classes","Clean","Clear Formatting","Code","Copy selection","Copyright © XDSoft.net - Chupurnov Valeriy. All rights reserved.","Create directory","Crop","Cut selection","Decrease Indent","Default","Delete","Delete column","Delete row","Delete table","Dot","Drop file","Drop image","Edit","Edit image","Edit link","Embed code","Empty cell","Enter Directory name","Enter new name","Error on load folders","Error on load list","Eye","File Browser","Fill color or set the text color","Filter","Find","Find Next","Find Previous","Font family","Font size","For information about the license, please go to our website:","Free Non-commercial Version","Heading 1","Heading 2","Heading 3","Heading 4","Height","Horizontal align","Image","Image properties","Increase Indent","Insert","Insert Horizontal Line","Insert Image","Insert Ordered List","Insert Special Character","Insert Unordered List","Insert as Text","Insert className","Insert column after","Insert column before","Insert file","Insert format block","Insert link","Insert only Text","Insert row above","Insert row below","Insert table","Insert youtube/vimeo video","Interim Results","Italic","Jodit Editor","Jodit User's Guide","Keep","Keep Aspect Ratio","Left","License: %s","Line height","Link","List view","Lower Alpha","Lower Greek","Lower Roman","Margins","Merge","Middle","No","No follow","Normal","Ok","Open in fullsize","Open in new tab","Open link","Open link in new tab","Paint format","Paste","Paste as HTML","Paste from clipboard","Please enter a web address","Please fill out this field","Press Alt for custom resizing","Print","Quadrate","Quote","Redo","Remove","Remove file","Rename","Replace","Replace with","Reset","Resize","Right","Save","Save as ...","Search for","Select","Select %s","Select Special Character","Select all","Select file","Show all","Sort by changed","Sort by name","Sort by size","Sound","Speech Recognize","Spellcheck","Split","Split horizontal","Split vertical","Src","Strike through","Styles","Text","The image has been successfully uploaded to the host!","The pasted content is coming from a Microsoft Word/Excel document. Do you want to keep the format or clean it up?","There are no files","Tiles view","Title","Top","Type something","Underline","Undo","Unlink","Update","Update file list","Upload","Upload file","Upper Alpha","Upper Roman","Vertical align","Width","Word Paste Detected","Words: %d","Yes","You can only edit your own images. Download this image on the host?","Your browser doesn't support direct access to the clipboard.","Your code is similar to HTML. Keep as HTML?","about","apply","bold","bottom","brush","circle","contains detailed help for using","copy","cut","default","delete","dot","download","edit","eraser","file","font","fontsize","fullsize","hr","image","indent","italic","left","link","newline","ol","or click","outdent","palette","paragraph","pencil","preview","print","redo","right","selectall","shrink","sound","source","space","spellcheck","square","strikethrough","subscript","superscript","table","top","type dir name","type name","ul","underline","undo","video"]},928:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="M7 2v15h15M2 7h15v15"/> </g> </svg>'},31230:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <rect x="3" y="3" width="18" height="18" rx="2"/><path d="M8 16 16 8m-6 0h6v6"/> </g> </svg>'},54522:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="M12 3a9 9 0 1 0 0 18h1a2 2 0 0 0 1.5-3.3 1.7 1.7 0 0 1 1.3-2.8H18a3 3 0 0 0 3-3A9 9 0 0 0 12 3Z"/><circle cx="7" cy="10" r="0.7"/><circle cx="10" cy="6.5" r="0.7"/><circle cx="15" cy="7" r="0.7"/><circle cx="17.5" cy="11" r="0.7"/> </g> </svg>'},17995:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="M7.5 7a4.5 4.5 0 1 1 7.8 3c-2.1 1.3-3.3 2-3.3 5M12 20h0"/> </g> </svg>'},86634:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="M20 5v7a3 3 0 0 1-3 3H4m5-5-5 5 5 5"/> </g> </svg>'},91115:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="m3 17 11-11 4 4L7 21Zm8-8 4 4M5 3v4M3 5h4M19 2v4m-2-2h4m-1 12v4m-2-2h4"/> </g> </svg>'},1916:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <rect x="4" y="7" width="16" height="13" rx="4"/><path d="M12 3v4M4 11H2v5h2m16-5h2v5h-2M8.5 13.5h0m7 0h0" stroke-width="2.75"/> </g> </svg>'},52450:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.75" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="M6 4h7a4 4 0 0 1 0 8H6V4Zm0 8h8a4 4 0 0 1 0 8H6v-8Z"/> </g> </svg>'},41111:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="M10 4h9M5 20h9M15 4 9 20"/> </g> </svg>'},49972:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="M17 6c-1-1.5-2.5-2-5-2-3 0-5 1.5-5 4 0 1.8 1.5 3 5 4s5 2.2 5 4c0 2.5-2 4-5 4-2.5 0-4-.5-5-2M3 12h18"/> </g> </svg>'},45062:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="m3 4 9 12M12 4 3 16M16 16a2 2 0 0 1 4 0c0 1.5-4 3-4 5h4"/> </g> </svg>'},18605:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="m3 8 9 12M12 8 3 20M16 4a2 2 0 0 1 4 0c0 1.5-4 3-4 5h4"/> </g> </svg>'},83389:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="M6 3v8a6 6 0 0 0 12 0V3M4 21h16"/> </g> </svg>'},93267:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="M8 4H5v16h3m8-16h3v16h-3M9 15l3-7 3 7m-5-2h4"/> </g> </svg>'},51457:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <rect x="8" y="8" width="13" height="13" rx="2"/><path d="M16 8V5a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v9a2 2 0 0 0 2 2h3"/> </g> </svg>'},23602:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <circle cx="6" cy="6" r="3"/><circle cx="6" cy="18" r="3"/><path d="m8.2 8.2 12.3 12.3M8.2 15.8 20.5 3.5"/> </g> </svg>'},86899:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <rect x="4" y="5" width="16" height="16" rx="2"/><rect x="9" y="3" width="6" height="4" rx="1"/> </g> </svg>'},95320:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="M3 6V3h3m4 0h4m4 0h3v3m0 4v4m0 4v3h-3m-4 0h-4m-4 0H3v-3m0-4v-4"/><rect x="7" y="7" width="10" height="10" rx="1"/> </g> </svg>'},45674:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="M12 3c-2 3.2-5.5 7-5.5 10a5.5 5.5 0 0 0 11 0c0-3-3.5-6.8-5.5-10Z"/> </g> <rect x="5" y="21" width="14" height="2" rx="1" fill="inherit" stroke="none"/> </svg>'},3843:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <rect x="3" y="3" width="14" height="6" rx="1"/><path d="M17 6h4v7H11v3"/><rect x="9" y="16" width="4" height="6" rx="1"/> </g> </svg>'},48842:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="m5 17 7-14 7 14M8 12h8M3 21h18"/> </g> </svg>'},25501:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="M2 5h9M6.5 5v15M4 20h5M19 4v16m-3-13 3-3 3 3m-6 10 3 3 3-3"/> </g> </svg>'},29348:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="M20 4H9a5 5 0 0 0 0 10h3M12 4v17M18 4v17"/> </g> </svg>'},24772:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="M8 3H3v5m13-5h5v5M3 16v5h5m13-5v5h-5"/> </g> </svg>'},66547:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="M3 8h5V3M8 8 3 3m13 0v5h5m-5 0 5-5M3 16h5v5m0-5-5 5m13 0v-5h5m-5 0 5 5"/> </g> </svg>'},89097:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="M4 12h16"/> </g> </svg>'},64831:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <rect x="3" y="3" width="18" height="18" rx="2"/><circle cx="8" cy="8" r="1.5"/><path d="m3 17 5-5 4 4 4-6 5 7"/> </g> </svg>'},67176:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="M10.6667 5.3333h10.6666M10.6667 12h10.6666M10.6667 18.6667h10.6666" stroke-width="2.6667" stroke-linecap="butt"/><path d="M2 12h5m-3-3 3 3-3 3"/> </g> </svg>'},14017:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="M10.6667 5.3333h10.6666M10.6667 12h10.6666M10.6667 18.6667h10.6666" stroke-width="2.6667" stroke-linecap="butt"/><path d="M2 12h5m-2-3-3 3 3 3"/> </g> </svg>'},38681:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <rect x="3" y="3" width="7" height="18" rx="1"/><path d="M3 12h7M14 12h7m-3.5-3.5v7"/> </g> </svg>'},64637:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <rect x="3" y="3" width="18" height="7" rx="1"/><path d="M12 3v7M12 14v7m-3.5-3.5h7"/> </g> </svg>'},94190:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <rect x="2.5" y="4" width="19" height="16" rx="1.5"/><path d="M12 4v2m0 12v2M3 12h6m-2.5-2.5L9 12l-2.5 2.5M21 12h-6m2.5-2.5L15 12l2.5 2.5" stroke-width="2"/> </g> </svg>'},51957:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <rect x="3" y="3" width="18" height="18" rx="2"/><path d="M3 12h18"/> </g> </svg>'},71940:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <rect x="3" y="3" width="18" height="18" rx="2"/><path d="M12 3v18"/> </g> </svg>'},48007:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="M9.3333 5.3333h12M9.3333 12h12M9.3333 18.6667h12" stroke-width="2.6667" stroke-linecap="butt"/><path d="M4 5.3333h0M4 12h0M4 18.6667h0" stroke-width="3.2"/> </g> </svg>'},43218:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <rect x="3" y="3" width="7" height="7" rx="1"/><rect x="14" y="3" width="7" height="7" rx="1"/><rect x="3" y="14" width="7" height="7" rx="1"/><rect x="14" y="14" width="7" height="7" rx="1"/> </g> </svg>'},80515:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="M2.6667 5.3333h18.6666M2.6667 12h18.6666M2.6667 18.6667h18.6666" stroke-width="2.6667" stroke-linecap="butt"/> </g> </svg>'},223:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="M2.6667 5.3333h9.3333M2.6667 12H12M2.6667 18.6667h9.3333" stroke-width="2.6667" stroke-linecap="butt"/><path d="M18 4v16m-3-13 3-3 3 3m-6 10 3 3 3-3"/> </g> </svg>'},95032:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="m10 7 3-3a5 5 0 0 1 7 7l-3 3M14 17l-3 3a5 5 0 0 1-7-7l3-3m1 6 8-8"/> </g> </svg>'},73533:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="m14 5 1-1a3.5 3.5 0 0 1 5 5l-1 1M10 19l-1 1a3.5 3.5 0 0 1-5-5l1-1M4 10l6-6m4 16 6-6"/> </g> </svg>'},40037:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="M10.6667 6.6667h10.6666M10.6667 17.3333h10.6666" stroke-width="2.6667" stroke-linecap="butt"/><path d="m2.5 5 2.5-2v7M2.5 10h5M2.5 16a2.5 2.5 0 0 1 5 0c0 1.5-1.5 2.5-5 5h5" stroke-width="2" /> </g> </svg>'},83207:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="M9.3333 5.3333h12M9.3333 12h12M9.3333 18.6667h12" stroke-width="2.6667" stroke-linecap="butt"/><path d="M4 5.3333h0M4 12h0M4 18.6667h0" stroke-width="3.2"/> </g> </svg>'},59827:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="M7 8V3h10v5M7 17H5a2 2 0 0 1-2-2v-5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2v5a2 2 0 0 1-2 2h-2M17 12h.01"/><rect x="7" y="14" width="10" height="7" rx="1"/> </g> </svg>'},34045:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="m15 4 6 6-6 6m6-6H10a7 7 0 0 0-5 12"/> </g> </svg>'},39199:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="M9 4 3 10l6 6M3 10h11a7 7 0 0 1 5 12"/> </g> </svg>'},21917:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <circle cx="10.5" cy="10.5" r="7"/><path d="m16 16 5 5"/> </g> </svg>'},9103:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="m6.5 6-5 6 5 6m11-12 5 6-5 6M14 3l-4 18"/> </g> </svg>'},22227:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <rect x="9" y="2" width="6" height="13" rx="3"/><path d="M5 10v2a7 7 0 0 0 14 0v-2M12 19v3m-4 0h8"/> </g> </svg>'},49989:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="m3 14 5-11 5 11M5 10h6m0 8 3 3 7-8"/> </g> </svg>'},81875:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="M3 17v3h7v-3a7 7 0 1 1 4 0v3h7v-3"/> </g> </svg>'},67447:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <rect x="3" y="3" width="18" height="18" rx="2.5"/><path d="M3 9h18M3 15h18M9 3v18M15 3v18"/> </g> </svg>'},36339:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <rect x="2" y="5" width="13" height="14" rx="2"/><path d="m15 10 7-4v12l-7-4"/> </g> </svg>'},88497:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="m6 10 6 6 6-6"/> </g> </svg>'},91882:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="m14 6-6 6 6 6"/> </g> </svg>'},14305:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="m10 6 6 6-6 6"/> </g> </svg>'},58446:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="m6 14 6-6 6 6"/> </g> </svg>'},39858:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="M3 6h18M9 6V4h6v2M5 6l1 14h12l1-14M10 10v6m4-6v6"/> </g> </svg>'},70881:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="m6 6 12 12M18 6 6 18"/> </g> </svg>'},60636:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="M5.3333 5.3333h13.3334M2.6667 12h18.6666M5.3333 18.6667h13.3334" stroke-width="2.6667" stroke-linecap="butt"/> </g> </svg>'},32013:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="M20 12v7a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h9m-7 8 4 4L21 5"/> </g> </svg>'},45512:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="m4 8 8 8 8-8"/> </g> </svg>'},80347:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <circle cx="12" cy="5" r="1"/><circle cx="12" cy="12" r="1"/><circle cx="12" cy="19" r="1"/> </g> </svg>'},91099:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="M12 3v13m-5-5 5 5 5-5M4 15v4a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-4"/> </g> </svg>'},28967:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="m4 12 10-9 7 7-10 10H7l-4-4a3 3 0 0 1 1-4Zm3-3 8 7m-4 4h10"/> </g> </svg>'},95134:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="M2 12s3.5-7 10-7 10 7 10 7-3.5 7-10 7S2 12 2 12Z"/><circle cx="12" cy="12" r="3"/> </g> </svg>'},70697:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="M14 3H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V9l-6-6Zm0 0v6h6"/> </g> </svg>'},49983:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="M3 7V6a2 2 0 0 1 2-2h4l2 3h8a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V7Z"/> </g> </svg>'},98964:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <circle cx="12" cy="12" r="9"/><path d="M12 11v6M12 7h.01"/> </g> </svg>'},8136:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="M2.6667 5.3333h18.6666M2.6667 12H16M2.6667 18.6667h18.6666" stroke-width="2.6667" stroke-linecap="butt"/> </g> </svg>'},94806:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <rect x="4" y="10" width="16" height="11" rx="2"/><path d="M8 10V7a4 4 0 0 1 8 0v3M12 14v3"/> </g> </svg>'},31365:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="m4 12 5 5L20 6"/> </g> </svg>'},44636:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="m4 15 11-11a2.8 2.8 0 0 1 4 4L8 19l-5 2 1-6Zm9-9 4 4"/> </g> </svg>'},36327:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="M12 5v14M5 12h14"/> </g> </svg>'},53328:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="m7 20 13-13m-6 13 6-6"/> </g> </svg>'},98711:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="M2.6667 5.3333h18.6666M8 12h13.3333M2.6667 18.6667h18.6666" stroke-width="2.6667" stroke-linecap="butt"/> </g> </svg>'},53808:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="M5 3h12l4 4v12a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2ZM7 3v6h9V3M7 21v-7h10v7"/> </g> </svg>'},20784:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="m10 2-.5 2.5-2 1.2L5 5l-2 3.5 2 1.7v2.6l-2 1.7L5 18l2.5-.7 2 1.2L10 21h4l.5-2.5 2-1.2 2.5.7 2-3.5-2-1.7v-2.6l2-1.7L19 5l-2.5.7-2-1.2L14 2Z"/><circle cx="12" cy="11.5" r="3"/> </g> </svg>'},70999:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <rect x="4" y="10" width="16" height="11" rx="2"/><path d="M8 10V7a4 4 0 0 1 7.5-2M12 14v3"/> </g> </svg>'},45244:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="M20 9a8.5 8.5 0 1 0 .5 7M20 3v6h-6"/> </g> </svg>'},99876:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="M12 16V3m-5 5 5-5 5 5M4 15v4a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-4"/> </g> </svg>'},14006:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="M12 3v18M7 8l5-5 5 5M7 16l5 5 5-5"/> </g> </svg>'},28712:function(e){"use strict";e.exports={assert(){}}},41324:function(t){"use strict";t.exports=e},25045:function(e,t,i){"use strict";function o(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}i.d(t,{_:function(){return o}})},31635:function(e,t,i){"use strict";function o(e,t,i,o){var n,s=arguments.length,r=s<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(r=(s<3?n(r):s>3?n(t,i,r):n(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}i.d(t,{__decorate:function(){return o}})}},n={};function s(e){var t=n[e];if(void 0!==t)return t.exports;var i=n[e]={exports:{}};return o[e](i,i.exports,s),i.exports}s.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return s.d(t,{a:t}),t},i=Object.getPrototypeOf,s.t=function(e,o){if(1&o&&(e=this(e)),8&o||"object"==typeof e&&e&&(4&o&&e.__esModule||16&o&&"function"==typeof e.then))return e;var n=Object.create(null);s.r(n);var r={};t=t||[null,i({}),i([]),i(i)];for(var a=2&o&&e;("object"==typeof a||"function"==typeof a)&&!~t.indexOf(a);a=i(a))Object.getOwnPropertyNames(a).forEach(function(t){r[t]=function(){return e[t]}});return r.default=function(){return e},s.d(n,r),n},s.d=function(e,t){if(Array.isArray(t))for(var i=0;i<t.length;){var o=t[i++],n=t[i++],r=0===n?{enumerable:!0,value:t[i++]}:{enumerable:!0,get:n};s.o(e,o)||Object.defineProperty(e,o,r)}else for(var o in t)s.o(t,o)&&!s.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},s.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},s.r=function(e){"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};return!function(){"use strict";s.r(r),s.d(r,{CommitMode:function(){return u},Jodit:function(){return e.Jodit}});var e=s(73302),t=s(28686),i=s(81937),o=s(84839),n=s(60936),a=s(13564),l=s(89317);s(93637),Object.keys(i).forEach(t=>{e.Jodit[t]=i[t]});let c=e=>"__esModule"!==e;Object.keys(a).filter(c).forEach(e=>{n.Icon.set(e.replace("_","-"),a[e])}),Object.keys(n).filter(c).forEach(i=>{let o=n[i],s=(0,t.isFunction)(o.prototype?.className)?o.prototype.className():i;(0,t.isString)(s)&&(e.Jodit.modules[s]=o)}),Object.keys(o).filter(c).forEach(t=>{e.Jodit.decorators[t]=o[t]}),["Confirm","Alert","Prompt"].forEach(t=>{e.Jodit[t]=n[t]}),Object.keys(l.default).filter(c).forEach(t=>{e.Jodit.lang[t]=l.default[t]});class u{}}(),r}()});
273
+ `)),n.Dom.append(h,m)}(0,s.$$)("input[type=checkbox]:checked",_).forEach(e=>{e.value.split(/[\s]+/).forEach(e=>{f.classList.add(e)})}),e.s.restore(),e.s.removeMarkers(),e.editor.normalize(),e.history.snapshot.restore(c);let v=n.Dom.furthest(e.s.current(),n.Dom.isBlock,e.editor);if(v&&n.Dom.isEmpty(v))n.Dom.replace(v,f,void 0,!1,!0);else if(v){let t=u.text(`
274
+ `);if(e.o.table.splitBlockOnInsertTable){let i=e.s.range;i.collapse(!1),i.insertNode(t),i.collapse(!1),e.s.selectRange(i);let o=e.s.splitSelection(v,t);o?n.Dom.after(o,f):n.Dom.after(v,f)}else n.Dom.after(v,t),n.Dom.after(t,f)}else e.s.insertNode(f,!1);p&&(e.s.setCursorIn(p),(0,s.scrollIntoViewIfNeeded)(p,e.editor,e.ed)),i()};if(e.e.on(g,"mousemove",e=>{n.Dom.isTag(e.target,"span")&&y(e.target)}).on(g,"touchstart mousedown",e=>{n.Dom.isTag(e.target,"span")&&(e.preventDefault(),e.stopImmediatePropagation(),w(e.target))}).on(g,"keydown",e=>{let t;if(!n.Dom.isTag(e.target,"span"))return;if(e.key===o.KEY_ENTER){e.preventDefault(),e.stopImmediatePropagation(),w(e.target);return}if(e.key===o.KEY_ESC){e.preventDefault(),e.stopImmediatePropagation(),i();return}let s=parseInt((0,r.attr)(e.target,"-index")||"0",10),a=Math.floor(s/d),l=s%d;switch(e.key){case o.KEY_LEFT:t=l>0?s-1:s;break;case o.KEY_RIGHT:t=l<d-1?s+1:s;break;case o.KEY_UP:t=a>0?s-d:s;break;case o.KEY_DOWN:t=a<h-1?s+d:s;break;default:return}e.preventDefault(),e.stopImmediatePropagation(),t!==s&&(v[s].tabIndex=-1,v[t].tabIndex=0,v[t].focus(),y(v[t]))}),a&&a.parentElement){for(let t=0;t<h;t+=1){let i=e.c.div();(0,r.attr)(i,"role","row");for(let e=0;e<d;e+=1)n.Dom.append(i,v[t*d+e]);n.Dom.append(g,i)}v[0]&&(v[0].className="hovered")}return f},tooltip:"Insert table"}},7994:function(e,t,i){"use strict";var o=i(28077);i(48290),o.pluginSystem.add("table",function(e){e.registerButton({name:"table",group:"insert"})})},74192:function(e,t,i){"use strict";var o=i(31635),n=i(81937),s=i(49574),r=i(68616),a=i(23211),l=i(28077),c=i(7909),u=i(91206);let h=new Set(["input","textarea","select"]);class d extends u.Plugin{afterInit(e){e.registerCommand("focusToolbar",{hotkeys:"alt+f10",exec:this.focusToolbar})}beforeDestruct(){}focusToolbar(){let[e]=this.__buttons();return e?.focus(),!1}onKeyDown(e){if(e.defaultPrevented||e.altKey||e.ctrlKey||e.metaKey)return;let t=e.target;if(a.Dom.isTag(t,h)||a.Dom.isHTMLElement(t)&&t.isContentEditable)return;let i=this.__buttons();if(i.length){switch(e.key){case n.KEY_ESC:this.j.s.focus();break;case n.KEY_HOME:i[0].focus();break;case n.KEY_END:i[i.length-1].focus();break;case n.KEY_LEFT:case n.KEY_RIGHT:{let o=i.findIndex(e=>e.container.contains(t));if(-1===o)return;i[(o+(e.key===n.KEY_RIGHT!==this.__isRtl()?1:-1)+i.length)%i.length].focus();break}default:return}return e.preventDefault(),e.stopPropagation(),!1}}__buttons(){return this.j.toolbar.buttons.filter(e=>!e.state.disabled&&e.container.isConnected)}__isRtl(){return"rtl"===(0,c.attr)(this.j.toolbar.container,"dir")}}(0,o.__decorate)([s.autobind],d.prototype,"focusToolbar",null),(0,o.__decorate)([(0,r.watch)("j.toolbar.container:keydown.toolbar-navigation")],d.prototype,"onKeyDown",null),l.pluginSystem.add("toolbarNavigation",d)},48899:function(e,t,i){"use strict";var o=i(65946),n=i(59400),s=i(5658),r=i(29434),a=i(5266),l=i(15753),c=i(36339),u=i.n(c);function h(e){e.files?.forEach(t=>{this.s.insertNode(this.createInside.element("video",{controls:"",src:e.baseurl+t}))})}a.Config.prototype.video={parseUrlToVideoEmbed:o.convertMediaUrlToVideoEmbed,defaultWidth:400,defaultHeight:345,defaultHandlerSuccess:h},r.Icon.set("video",u()),a.Config.prototype.controls.video={popup(e,t,i){let r=new s.UIForm(e,[new s.UIBlock(e,[new s.UIInput(e,{name:"url",required:!0,label:"URL",placeholder:"https://",validators:["url"]})]),new s.UIBlock(e,[(0,n.Button)(e,"","Insert","primary").onAction(()=>r.submit())])]),a=new s.UIForm(e,[new s.UIBlock(e,[new s.UITextArea(e,{name:"code",required:!0,label:"Embed code"})]),new s.UIBlock(e,[(0,n.Button)(e,"","Insert","primary").onAction(()=>a.submit())])]),c=[],u=t=>{e.s.restore(),e.s.insertHTML(t),i()};e.s.save();let{uploader:d}=e.o;return!1!==d.showTabInFileSelector&&(d.url||d.customUploadFunction)&&c.push((0,l.UploadTab)(e,t=>{e.s.restore(),(e.o.video?.defaultHandlerSuccess??h).call(e,t)},{label:"Drop file",accept:"video/*"})),c.push({icon:"link",name:"Link",content:r.container},{icon:"source",name:"Code",content:a.container}),r.onSubmit(t=>{u((0,o.call)(e.o.video?.parseUrlToVideoEmbed??o.convertMediaUrlToVideoEmbed,t.url,{width:e.o.video?.defaultWidth,height:e.o.video?.defaultHeight}))}),a.onSubmit(e=>{u(e.code)}),(0,l.TabsWidget)(e,c)},tags:["iframe"],tooltip:"Insert youtube/vimeo video"}},34142:function(e,t,i){"use strict";var o=i(28077);i(48899),o.pluginSystem.add("video",function(e){e.registerButton({name:"video",group:"media"})})},86038:function(e,t,i){"use strict";i(5266).Config.prototype.wrapNodes={exclude:new Set(["hr","style","br"]),emptyBlockAfterInit:!0}},22980:function(e,t,i){"use strict";var o=i(25045),n=i(31635),s=i(84839),r=i(27795),a=i(28077),l=i(85932),c=i(91206);i(86038);class u extends c.Plugin{afterInit(e){"br"!==e.o.enter.toLowerCase()&&e.e.on("drop.wtn focus.wtn keydown.wtn mousedown.wtn afterInit.wtn backSpaceAfterDelete.wtn",this.preprocessInput,{top:!0}).on("afterInit.wtn postProcessSetEditorValue.wtn afterCommitStyle.wtn backSpaceAfterDelete.wtn",this.postProcessSetEditorValue)}beforeDestruct(e){e.e.off(".wtn")}postProcessSetEditorValue(){let{jodit:e}=this;if(!e.isEditorMode())return;let t=e.editor.firstChild,i=!1;for(;t;){if(t=function(e,t){let i=e,o=e;do if(r.Dom.isElement(o)&&r.Dom.isLeaf(o)&&!r.Dom.isList(o.parentElement)){let e=r.Dom.findNotEmptySibling(o,!1);r.Dom.isTag(i,"ul")?r.Dom.append(i,o):i=r.Dom.wrap(o,"ul",t.createInside),o=e}else break;while(o)return i}(t,e),this.isSuitableStart(t)){i||e.s.save(),i=!0;let o=e.createInside.element(e.o.enter);for(r.Dom.before(t,o);t&&this.isSuitable(t);){let e=t.nextSibling;r.Dom.append(o,t),t=e}o.normalize(),t=o}t=t&&t.nextSibling}i&&(e.s.restore(),"afterInit"===e.e.current&&e.e.fire("internalChange"))}preprocessInput(){let{jodit:e}=this,t="afterInit"===e.e.current;if(!e.isEditorMode()||e.editor.firstChild||!e.o.wrapNodes.emptyBlockAfterInit&&t)return;let i=e.createInside.element(e.o.enter),o=e.createInside.element("br");r.Dom.append(i,o),r.Dom.append(e.editor,i),(e.s.isFocused()||"backSpaceAfterDelete"===e.e.current)&&e.s.setCursorBefore(o),e.e.fire("internalChange")}constructor(...e){super(...e),(0,o._)(this,"isSuitableStart",e=>r.Dom.isText(e)&&(0,l.isString)(e.nodeValue)&&(/[^\s]/.test(e.nodeValue)||e.parentNode?.firstChild===e&&this.isSuitable(e.nextSibling))||this.isNotWrapped(e)&&!r.Dom.isTemporary(e)),(0,o._)(this,"isSuitable",e=>r.Dom.isText(e)||this.isNotWrapped(e)),(0,o._)(this,"isNotWrapped",e=>r.Dom.isElement(e)&&!(r.Dom.isBlock(e)||r.Dom.isTag(e,this.j.o.wrapNodes.exclude)))}}(0,n.__decorate)([s.autobind],u.prototype,"postProcessSetEditorValue",null),(0,n.__decorate)([s.autobind],u.prototype,"preprocessInput",null),a.pluginSystem.add("wrapNodes",u)},92063:function(e,t,i){"use strict";i(5266).Config.prototype.showXPathInStatusbar=!0},52014:function(e,t,i){"use strict";var o=i(25045),n=i(81937),s=i(27795),r=i(28077),a=i(4040),l=i(7909),c=i(28723),u=i(91206),h=i(67399),d=i(4274);i(92063);class f extends u.Plugin{afterInit(){if(this.j.o.showXPathInStatusbar){this.container=this.j.c.div("jodit-xpath"),(0,l.attr)(this.container,"role","list");let e=()=>{this.j.o.showXPathInStatusbar&&this.container&&(this.j.statusbar.append(this.container),this.j.getRealMode()===n.MODE_WYSIWYG?this.calcPath():(this.container&&(this.container.innerHTML=n.INVISIBLE_SPACE),this.appendSelectAll()))};this.j.e.off(".xpath").on("pointerup.xpath change.xpath keydown.xpath changeSelection.xpath",this.calcPath).on("afterSetMode.xpath afterInit.xpath changePlace.xpath",e),e(),this.calcPath()}}beforeDestruct(){this.j&&this.j.events&&this.j.e.off(".xpath"),this.removeSelectAll(),this.menu&&this.menu.destruct(),s.Dom.safeRemove(this.container),delete this.menu,delete this.container}constructor(...e){super(...e),(0,o._)(this,"onContext",(e,t)=>(this.menu||(this.menu=new h.ContextMenu(this.j)),this.menu.show(t.clientX,t.clientY,[{icon:"bin",title:e===this.j.editor?"Clear":"Remove",exec:()=>{e!==this.j.editor?s.Dom.safeRemove(e):this.j.value="",this.j.synchronizeValues()}},{icon:"select-all",title:"Select",exec:()=>{this.j.s.select(e)}}]),!1)),(0,o._)(this,"onSelectPath",(e,t)=>{this.j.s.focus();let i=(0,l.attr)(t.target,"-path")||"/";if("/"===i)return this.j.execCommand("selectall"),!1;try{let e=this.j.ed.evaluate(i,this.j.editor,null,XPathResult.ANY_TYPE,null).iterateNext();if(e)return this.j.s.select(e),!1}catch{}return this.j.s.select(e),!1}),(0,o._)(this,"tpl",(e,t,i,o)=>{let n=this.j.c.fromHTML(`<span class="jodit-xpath__item"><a role="button" data-path="${t}" title="${o}" tabindex="-1"'>${(0,a.trim)(i)}</a></span>`),s=n.firstChild;return this.j.e.on(s,"click",this.onSelectPath.bind(this,e)).on(s,"contextmenu",this.onContext.bind(this,e)),n}),(0,o._)(this,"selectAllButton",void 0),(0,o._)(this,"removeSelectAll",()=>{this.selectAllButton&&(this.selectAllButton.destruct(),delete this.selectAllButton)}),(0,o._)(this,"appendSelectAll",()=>{this.removeSelectAll(),this.selectAllButton=(0,d.makeButton)(this.j,{name:"selectall",...this.j.o.controls.selectall}),this.selectAllButton.state.size="tiny",this.container&&s.Dom.prepend(this.container,this.selectAllButton.container)}),(0,o._)(this,"calcPathImd",()=>{if(this.isDestructed)return;let e=this.j.s.current();if(this.container&&(this.container.innerHTML=n.INVISIBLE_SPACE),e){let t,i,o;s.Dom.up(e,e=>{e&&this.j.editor!==e&&!s.Dom.isText(e)&&!s.Dom.isComment(e)&&(t=e.nodeName.toLowerCase(),i=(0,c.getXPathByElement)(e,this.j.editor).replace(/^\//,""),o=this.tpl(e,i,t,this.j.i18n("Select %s",t)),this.container&&s.Dom.prepend(this.container,o))},this.j.editor)}this.appendSelectAll()}),(0,o._)(this,"calcPath",this.j.async.debounce(this.calcPathImd,2*this.j.defaultTimeout,!0)),(0,o._)(this,"container",void 0),(0,o._)(this,"menu",void 0)}}r.pluginSystem.add("xpath",f)},13564:function(e,t,i){"use strict";i.r(t),i.d(t,{angle_down:function(){return n.a},angle_left:function(){return r.a},angle_right:function(){return l.a},angle_up:function(){return u.a},bin:function(){return d.a},cancel:function(){return p.a},center:function(){return g.a},check:function(){return v.a},chevron:function(){return y.a},dots:function(){return S.a},download:function(){return E.a},eraser:function(){return I.a},eye:function(){return T.a},file:function(){return j.a},folder:function(){return A.a},info_circle:function(){return M.a},left:function(){return N.a},lock:function(){return O.a},ok:function(){return F.a},pencil:function(){return U.a},plus:function(){return V.a},resize_handler:function(){return Y.a},right:function(){return K.a},save:function(){return q.a},settings:function(){return Z.a},unlock:function(){return ee.a},update:function(){return ei.a},upload:function(){return en.a},valign:function(){return er.a}});var o=i(88497),n=i.n(o),s=i(91882),r=i.n(s),a=i(14305),l=i.n(a),c=i(58446),u=i.n(c),h=i(39858),d=i.n(h),f=i(70881),p=i.n(f),m=i(60636),g=i.n(m),_=i(32013),v=i.n(_),b=i(45512),y=i.n(b),w=i(80347),S=i.n(w),C=i(91099),E=i.n(C),D=i(28967),I=i.n(D),k=i(95134),T=i.n(k),x=i(70697),j=i.n(x),P=i(49983),A=i.n(P),L=i(98964),M=i.n(L),R=i(8136),N=i.n(R),B=i(94806),O=i.n(B),z=i(31365),F=i.n(z),H=i(44636),U=i.n(H),W=i(36327),V=i.n(W),$=i(53328),Y=i.n($),G=i(98711),K=i.n(G),X=i(53808),q=i.n(X),J=i(20784),Z=i.n(J),Q=i(70999),ee=i.n(Q),et=i(45244),ei=i.n(et),eo=i(99876),en=i.n(eo),es=i(14006),er=i.n(es)},63837:function(e){e.exports.default={"Type something":"Start writing...",pencil:"Edit",Quadrate:"Square"}},53414:function(e){e.exports.default=[" URL","--Not Set--","About Jodit","Add column","Add folder","Add row","Advanced","Align","Align Center","Align Justify","Align Left","Align Right","All","Alternative","Alternative text","Anchor","Apply","Are you sure?","Background","Bold","Border","Border radius","Bottom","Break","Browse","Buy full version","Cancel","Center","Change mode","Chars: %d","Choose Content to Paste","Circle","Class name","Classes","Clean","Clear Formatting","Code","Copy selection","Copyright © XDSoft.net - Chupurnov Valeriy. All rights reserved.","Create directory","Crop","Cut selection","Decrease Indent","Default","Delete","Delete column","Delete row","Delete table","Dot","Drop file","Drop image","Edit","Edit image","Edit link","Embed code","Empty cell","Enter Directory name","Enter new name","Error on load folders","Error on load list","Eye","File Browser","Fill color or set the text color","Filter","Find","Find Next","Find Previous","Font family","Font size","For information about the license, please go to our website:","Free Non-commercial Version","Heading 1","Heading 2","Heading 3","Heading 4","Height","Horizontal align","Image","Image properties","Increase Indent","Insert","Insert Horizontal Line","Insert Image","Insert Ordered List","Insert Special Character","Insert Unordered List","Insert as Text","Insert className","Insert column after","Insert column before","Insert file","Insert format block","Insert link","Insert only Text","Insert row above","Insert row below","Insert table","Insert youtube/vimeo video","Interim Results","Italic","Jodit Editor","Jodit User's Guide","Keep","Keep Aspect Ratio","Left","License: %s","Line height","Link","List view","Lower Alpha","Lower Greek","Lower Roman","Margins","Merge","Middle","No","No follow","Normal","Ok","Open in fullsize","Open in new tab","Open link","Open link in new tab","Paint format","Paste","Paste as HTML","Paste from clipboard","Please enter a web address","Please fill out this field","Press Alt for custom resizing","Print","Quadrate","Quote","Redo","Remove","Remove file","Rename","Replace","Replace with","Reset","Resize","Right","Save","Save as ...","Search for","Select","Select %s","Select Special Character","Select all","Select file","Show all","Sort by changed","Sort by name","Sort by size","Sound","Speech Recognize","Spellcheck","Split","Split horizontal","Split vertical","Src","Strike through","Styles","Text","The image has been successfully uploaded to the host!","The pasted content is coming from a Microsoft Word/Excel document. Do you want to keep the format or clean it up?","There are no files","Tiles view","Title","Top","Type something","Underline","Undo","Unlink","Update","Update file list","Upload","Upload file","Upper Alpha","Upper Roman","Vertical align","Width","Word Paste Detected","Words: %d","Yes","You can only edit your own images. Download this image on the host?","Your browser doesn't support direct access to the clipboard.","Your code is similar to HTML. Keep as HTML?","about","apply","bold","bottom","brush","circle","contains detailed help for using","copy","cut","default","delete","dot","download","edit","eraser","file","font","fontsize","fullsize","hr","image","indent","italic","left","link","newline","ol","or click","outdent","palette","paragraph","pencil","preview","print","redo","right","selectall","shrink","sound","source","space","spellcheck","square","strikethrough","subscript","superscript","table","top","type dir name","type name","ul","underline","undo","video"]},928:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="M7 2v15h15M2 7h15v15"/> </g> </svg>'},31230:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <rect x="3" y="3" width="18" height="18" rx="2"/><path d="M8 16 16 8m-6 0h6v6"/> </g> </svg>'},54522:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="M12 3a9 9 0 1 0 0 18h1a2 2 0 0 0 1.5-3.3 1.7 1.7 0 0 1 1.3-2.8H18a3 3 0 0 0 3-3A9 9 0 0 0 12 3Z"/><circle cx="7" cy="10" r="0.7"/><circle cx="10" cy="6.5" r="0.7"/><circle cx="15" cy="7" r="0.7"/><circle cx="17.5" cy="11" r="0.7"/> </g> </svg>'},17995:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="M7.5 7a4.5 4.5 0 1 1 7.8 3c-2.1 1.3-3.3 2-3.3 5M12 20h0"/> </g> </svg>'},86634:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="M20 5v7a3 3 0 0 1-3 3H4m5-5-5 5 5 5"/> </g> </svg>'},91115:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="m3 17 11-11 4 4L7 21Zm8-8 4 4M5 3v4M3 5h4M19 2v4m-2-2h4m-1 12v4m-2-2h4"/> </g> </svg>'},1916:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <rect x="4" y="7" width="16" height="13" rx="4"/><path d="M12 3v4M4 11H2v5h2m16-5h2v5h-2M8.5 13.5h0m7 0h0" stroke-width="2.75"/> </g> </svg>'},52450:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.75" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="M6 4h7a4 4 0 0 1 0 8H6V4Zm0 8h8a4 4 0 0 1 0 8H6v-8Z"/> </g> </svg>'},41111:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="M10 4h9M5 20h9M15 4 9 20"/> </g> </svg>'},49972:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="M17 6c-1-1.5-2.5-2-5-2-3 0-5 1.5-5 4 0 1.8 1.5 3 5 4s5 2.2 5 4c0 2.5-2 4-5 4-2.5 0-4-.5-5-2M3 12h18"/> </g> </svg>'},45062:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="m3 4 9 12M12 4 3 16M16 16a2 2 0 0 1 4 0c0 1.5-4 3-4 5h4"/> </g> </svg>'},18605:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="m3 8 9 12M12 8 3 20M16 4a2 2 0 0 1 4 0c0 1.5-4 3-4 5h4"/> </g> </svg>'},83389:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="M6 3v8a6 6 0 0 0 12 0V3M4 21h16"/> </g> </svg>'},93267:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="M8 4H5v16h3m8-16h3v16h-3M9 15l3-7 3 7m-5-2h4"/> </g> </svg>'},51457:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <rect x="8" y="8" width="13" height="13" rx="2"/><path d="M16 8V5a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v9a2 2 0 0 0 2 2h3"/> </g> </svg>'},23602:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <circle cx="6" cy="6" r="3"/><circle cx="6" cy="18" r="3"/><path d="m8.2 8.2 12.3 12.3M8.2 15.8 20.5 3.5"/> </g> </svg>'},86899:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <rect x="4" y="5" width="16" height="16" rx="2"/><rect x="9" y="3" width="6" height="4" rx="1"/> </g> </svg>'},95320:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="M3 6V3h3m4 0h4m4 0h3v3m0 4v4m0 4v3h-3m-4 0h-4m-4 0H3v-3m0-4v-4"/><rect x="7" y="7" width="10" height="10" rx="1"/> </g> </svg>'},45674:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="M12 3c-2 3.2-5.5 7-5.5 10a5.5 5.5 0 0 0 11 0c0-3-3.5-6.8-5.5-10Z"/> </g> <rect x="5" y="21" width="14" height="2" rx="1" fill="inherit" stroke="none"/> </svg>'},3843:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <rect x="3" y="3" width="14" height="6" rx="1"/><path d="M17 6h4v7H11v3"/><rect x="9" y="16" width="4" height="6" rx="1"/> </g> </svg>'},48842:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="m5 17 7-14 7 14M8 12h8M3 21h18"/> </g> </svg>'},25501:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="M2 5h9M6.5 5v15M4 20h5M19 4v16m-3-13 3-3 3 3m-6 10 3 3 3-3"/> </g> </svg>'},29348:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="M20 4H9a5 5 0 0 0 0 10h3M12 4v17M18 4v17"/> </g> </svg>'},24772:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="M8 3H3v5m13-5h5v5M3 16v5h5m13-5v5h-5"/> </g> </svg>'},66547:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="M3 8h5V3M8 8 3 3m13 0v5h5m-5 0 5-5M3 16h5v5m0-5-5 5m13 0v-5h5m-5 0 5 5"/> </g> </svg>'},89097:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="M4 12h16"/> </g> </svg>'},64831:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <rect x="3" y="3" width="18" height="18" rx="2"/><circle cx="8" cy="8" r="1.5"/><path d="m3 17 5-5 4 4 4-6 5 7"/> </g> </svg>'},67176:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="M10.6667 5.3333h10.6666M10.6667 12h10.6666M10.6667 18.6667h10.6666" stroke-width="2.6667" stroke-linecap="butt"/><path d="M2 12h5m-3-3 3 3-3 3"/> </g> </svg>'},14017:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="M10.6667 5.3333h10.6666M10.6667 12h10.6666M10.6667 18.6667h10.6666" stroke-width="2.6667" stroke-linecap="butt"/><path d="M2 12h5m-2-3-3 3 3 3"/> </g> </svg>'},38681:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <rect x="3" y="3" width="7" height="18" rx="1"/><path d="M3 12h7M14 12h7m-3.5-3.5v7"/> </g> </svg>'},64637:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <rect x="3" y="3" width="18" height="7" rx="1"/><path d="M12 3v7M12 14v7m-3.5-3.5h7"/> </g> </svg>'},94190:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <rect x="2.5" y="4" width="19" height="16" rx="1.5"/><path d="M12 4v2m0 12v2M3 12h6m-2.5-2.5L9 12l-2.5 2.5M21 12h-6m2.5-2.5L15 12l2.5 2.5" stroke-width="2"/> </g> </svg>'},51957:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <rect x="3" y="3" width="18" height="18" rx="2"/><path d="M3 12h18"/> </g> </svg>'},71940:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <rect x="3" y="3" width="18" height="18" rx="2"/><path d="M12 3v18"/> </g> </svg>'},48007:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="M9.3333 5.3333h12M9.3333 12h12M9.3333 18.6667h12" stroke-width="2.6667" stroke-linecap="butt"/><path d="M4 5.3333h0M4 12h0M4 18.6667h0" stroke-width="3.2"/> </g> </svg>'},43218:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <rect x="3" y="3" width="7" height="7" rx="1"/><rect x="14" y="3" width="7" height="7" rx="1"/><rect x="3" y="14" width="7" height="7" rx="1"/><rect x="14" y="14" width="7" height="7" rx="1"/> </g> </svg>'},80515:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="M2.6667 5.3333h18.6666M2.6667 12h18.6666M2.6667 18.6667h18.6666" stroke-width="2.6667" stroke-linecap="butt"/> </g> </svg>'},223:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="M2.6667 5.3333h9.3333M2.6667 12H12M2.6667 18.6667h9.3333" stroke-width="2.6667" stroke-linecap="butt"/><path d="M18 4v16m-3-13 3-3 3 3m-6 10 3 3 3-3"/> </g> </svg>'},95032:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="m10 7 3-3a5 5 0 0 1 7 7l-3 3M14 17l-3 3a5 5 0 0 1-7-7l3-3m1 6 8-8"/> </g> </svg>'},73533:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="m14 5 1-1a3.5 3.5 0 0 1 5 5l-1 1M10 19l-1 1a3.5 3.5 0 0 1-5-5l1-1M4 10l6-6m4 16 6-6"/> </g> </svg>'},40037:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="M10.6667 6.6667h10.6666M10.6667 17.3333h10.6666" stroke-width="2.6667" stroke-linecap="butt"/><path d="m2.5 5 2.5-2v7M2.5 10h5M2.5 16a2.5 2.5 0 0 1 5 0c0 1.5-1.5 2.5-5 5h5" stroke-width="2" /> </g> </svg>'},83207:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="M9.3333 5.3333h12M9.3333 12h12M9.3333 18.6667h12" stroke-width="2.6667" stroke-linecap="butt"/><path d="M4 5.3333h0M4 12h0M4 18.6667h0" stroke-width="3.2"/> </g> </svg>'},59827:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="M7 8V3h10v5M7 17H5a2 2 0 0 1-2-2v-5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2v5a2 2 0 0 1-2 2h-2M17 12h.01"/><rect x="7" y="14" width="10" height="7" rx="1"/> </g> </svg>'},34045:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="m15 4 6 6-6 6m6-6H10a7 7 0 0 0-5 12"/> </g> </svg>'},39199:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="M9 4 3 10l6 6M3 10h11a7 7 0 0 1 5 12"/> </g> </svg>'},21917:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <circle cx="10.5" cy="10.5" r="7"/><path d="m16 16 5 5"/> </g> </svg>'},9103:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="m6.5 6-5 6 5 6m11-12 5 6-5 6M14 3l-4 18"/> </g> </svg>'},22227:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <rect x="9" y="2" width="6" height="13" rx="3"/><path d="M5 10v2a7 7 0 0 0 14 0v-2M12 19v3m-4 0h8"/> </g> </svg>'},49989:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="m3 14 5-11 5 11M5 10h6m0 8 3 3 7-8"/> </g> </svg>'},81875:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="M3 17v3h7v-3a7 7 0 1 1 4 0v3h7v-3"/> </g> </svg>'},67447:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <rect x="3" y="3" width="18" height="18" rx="2.5"/><path d="M3 9h18M3 15h18M9 3v18M15 3v18"/> </g> </svg>'},36339:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <rect x="2" y="5" width="13" height="14" rx="2"/><path d="m15 10 7-4v12l-7-4"/> </g> </svg>'},88497:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="m6 10 6 6 6-6"/> </g> </svg>'},91882:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="m14 6-6 6 6 6"/> </g> </svg>'},14305:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="m10 6 6 6-6 6"/> </g> </svg>'},58446:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="m6 14 6-6 6 6"/> </g> </svg>'},39858:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="M3 6h18M9 6V4h6v2M5 6l1 14h12l1-14M10 10v6m4-6v6"/> </g> </svg>'},70881:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="m6 6 12 12M18 6 6 18"/> </g> </svg>'},60636:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="M5.3333 5.3333h13.3334M2.6667 12h18.6666M5.3333 18.6667h13.3334" stroke-width="2.6667" stroke-linecap="butt"/> </g> </svg>'},32013:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="M20 12v7a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h9m-7 8 4 4L21 5"/> </g> </svg>'},45512:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="m4 8 8 8 8-8"/> </g> </svg>'},80347:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <circle cx="12" cy="5" r="1"/><circle cx="12" cy="12" r="1"/><circle cx="12" cy="19" r="1"/> </g> </svg>'},91099:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="M12 3v13m-5-5 5 5 5-5M4 15v4a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-4"/> </g> </svg>'},28967:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="m4 12 10-9 7 7-10 10H7l-4-4a3 3 0 0 1 1-4Zm3-3 8 7m-4 4h10"/> </g> </svg>'},95134:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="M2 12s3.5-7 10-7 10 7 10 7-3.5 7-10 7S2 12 2 12Z"/><circle cx="12" cy="12" r="3"/> </g> </svg>'},70697:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="M14 3H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V9l-6-6Zm0 0v6h6"/> </g> </svg>'},49983:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="M3 7V6a2 2 0 0 1 2-2h4l2 3h8a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V7Z"/> </g> </svg>'},98964:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <circle cx="12" cy="12" r="9"/><path d="M12 11v6M12 7h.01"/> </g> </svg>'},8136:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="M2.6667 5.3333h18.6666M2.6667 12H16M2.6667 18.6667h18.6666" stroke-width="2.6667" stroke-linecap="butt"/> </g> </svg>'},94806:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <rect x="4" y="10" width="16" height="11" rx="2"/><path d="M8 10V7a4 4 0 0 1 8 0v3M12 14v3"/> </g> </svg>'},31365:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="m4 12 5 5L20 6"/> </g> </svg>'},44636:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="m4 15 11-11a2.8 2.8 0 0 1 4 4L8 19l-5 2 1-6Zm9-9 4 4"/> </g> </svg>'},36327:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="M12 5v14M5 12h14"/> </g> </svg>'},53328:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="m7 20 13-13m-6 13 6-6"/> </g> </svg>'},98711:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="M2.6667 5.3333h18.6666M8 12h13.3333M2.6667 18.6667h18.6666" stroke-width="2.6667" stroke-linecap="butt"/> </g> </svg>'},53808:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="M5 3h12l4 4v12a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2ZM7 3v6h9V3M7 21v-7h10v7"/> </g> </svg>'},20784:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="m10 2-.5 2.5-2 1.2L5 5l-2 3.5 2 1.7v2.6l-2 1.7L5 18l2.5-.7 2 1.2L10 21h4l.5-2.5 2-1.2 2.5.7 2-3.5-2-1.7v-2.6l2-1.7L19 5l-2.5.7-2-1.2L14 2Z"/><circle cx="12" cy="11.5" r="3"/> </g> </svg>'},70999:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <rect x="4" y="10" width="16" height="11" rx="2"/><path d="M8 10V7a4 4 0 0 1 7.5-2M12 14v3"/> </g> </svg>'},45244:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="M20 9a8.5 8.5 0 1 0 .5 7M20 3v6h-6"/> </g> </svg>'},99876:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="M12 16V3m-5 5 5-5 5 5M4 15v4a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-4"/> </g> </svg>'},14006:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="M12 3v18M7 8l5-5 5 5M7 16l5 5 5-5"/> </g> </svg>'},28712:function(e){"use strict";e.exports={assert(){}}},41324:function(t){"use strict";t.exports=e},25045:function(e,t,i){"use strict";function o(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}i.d(t,{_:function(){return o}})},31635:function(e,t,i){"use strict";function o(e,t,i,o){var n,s=arguments.length,r=s<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(r=(s<3?n(r):s>3?n(t,i,r):n(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}i.d(t,{__decorate:function(){return o}})}},n={};function s(e){var t=n[e];if(void 0!==t)return t.exports;var i=n[e]={exports:{}};return o[e](i,i.exports,s),i.exports}s.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return s.d(t,{a:t}),t},i=Object.getPrototypeOf,s.t=function(e,o){if(1&o&&(e=this(e)),8&o||"object"==typeof e&&e&&(4&o&&e.__esModule||16&o&&"function"==typeof e.then))return e;var n=Object.create(null);s.r(n);var r={};t=t||[null,i({}),i([]),i(i)];for(var a=2&o&&e;("object"==typeof a||"function"==typeof a)&&!~t.indexOf(a);a=i(a))Object.getOwnPropertyNames(a).forEach(function(t){r[t]=function(){return e[t]}});return r.default=function(){return e},s.d(n,r),n},s.d=function(e,t){if(Array.isArray(t))for(var i=0;i<t.length;){var o=t[i++],n=t[i++],r=0===n?{enumerable:!0,value:t[i++]}:{enumerable:!0,get:n};s.o(e,o)||Object.defineProperty(e,o,r)}else for(var o in t)s.o(t,o)&&!s.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},s.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},s.r=function(e){"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};return!function(){"use strict";s.r(r),s.d(r,{CommitMode:function(){return u},Jodit:function(){return e.Jodit}});var e=s(73302),t=s(28686),i=s(81937),o=s(84839),n=s(60936),a=s(13564),l=s(89317);s(93637),Object.keys(i).forEach(t=>{e.Jodit[t]=i[t]});let c=e=>"__esModule"!==e;Object.keys(a).filter(c).forEach(e=>{n.Icon.set(e.replace("_","-"),a[e])}),Object.keys(n).filter(c).forEach(i=>{let o=n[i],s=(0,t.isFunction)(o.prototype?.className)?o.prototype.className():i;(0,t.isString)(s)&&(e.Jodit.modules[s]=o)}),Object.keys(o).filter(c).forEach(t=>{e.Jodit.decorators[t]=o[t]}),["Confirm","Alert","Prompt"].forEach(t=>{e.Jodit[t]=n[t]}),Object.keys(l.default).filter(c).forEach(t=>{e.Jodit.lang[t]=l.default[t]});class u{}}(),r}()});