jodit 4.11.2 → 4.11.4
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.
- package/CHANGELOG.md +41 -0
- package/es2015/jodit.css +5 -2
- package/es2015/jodit.fat.min.css +1 -1
- package/es2015/jodit.fat.min.js +6 -6
- package/es2015/jodit.js +35 -18
- package/es2015/jodit.min.css +1 -1
- package/es2015/jodit.min.js +4 -4
- package/es2015/plugins/debug/debug.css +1 -1
- package/es2015/plugins/debug/debug.js +1 -1
- package/es2015/plugins/debug/debug.min.js +1 -1
- package/es2015/plugins/speech-recognize/speech-recognize.css +1 -1
- package/es2015/plugins/speech-recognize/speech-recognize.js +1 -1
- package/es2015/plugins/speech-recognize/speech-recognize.min.js +1 -1
- package/es2018/jodit.fat.min.css +1 -1
- package/es2018/jodit.fat.min.js +6 -6
- package/es2018/jodit.min.css +1 -1
- package/es2018/jodit.min.js +4 -4
- package/es2018/plugins/debug/debug.min.js +1 -1
- package/es2018/plugins/speech-recognize/speech-recognize.min.js +1 -1
- package/es2021/jodit.css +5 -2
- package/es2021/jodit.fat.min.css +1 -1
- package/es2021/jodit.fat.min.js +7 -7
- package/es2021/jodit.js +34 -17
- package/es2021/jodit.min.css +1 -1
- package/es2021/jodit.min.js +5 -5
- package/es2021/plugins/debug/debug.css +1 -1
- package/es2021/plugins/debug/debug.js +1 -1
- package/es2021/plugins/debug/debug.min.js +1 -1
- package/es2021/plugins/speech-recognize/speech-recognize.css +1 -1
- package/es2021/plugins/speech-recognize/speech-recognize.js +1 -1
- package/es2021/plugins/speech-recognize/speech-recognize.min.js +1 -1
- package/es2021.en/jodit.css +5 -2
- package/es2021.en/jodit.fat.min.css +1 -1
- package/es2021.en/jodit.fat.min.js +5 -5
- package/es2021.en/jodit.js +34 -17
- package/es2021.en/jodit.min.css +1 -1
- package/es2021.en/jodit.min.js +5 -5
- package/es2021.en/plugins/debug/debug.css +1 -1
- package/es2021.en/plugins/debug/debug.js +1 -1
- package/es2021.en/plugins/debug/debug.min.js +1 -1
- package/es2021.en/plugins/speech-recognize/speech-recognize.css +1 -1
- package/es2021.en/plugins/speech-recognize/speech-recognize.js +1 -1
- package/es2021.en/plugins/speech-recognize/speech-recognize.min.js +1 -1
- package/es5/jodit.css +8 -5
- package/es5/jodit.fat.min.css +1 -1
- package/es5/jodit.fat.min.js +2 -2
- package/es5/jodit.js +38 -18
- package/es5/jodit.min.css +3 -3
- package/es5/jodit.min.js +2 -2
- package/es5/plugins/debug/debug.css +1 -1
- package/es5/plugins/debug/debug.js +1 -1
- package/es5/plugins/debug/debug.min.js +1 -1
- package/es5/plugins/speech-recognize/speech-recognize.css +1 -1
- package/es5/plugins/speech-recognize/speech-recognize.js +1 -1
- package/es5/plugins/speech-recognize/speech-recognize.min.js +1 -1
- package/es5/polyfills.fat.min.js +1 -1
- package/es5/polyfills.js +1 -1
- package/es5/polyfills.min.js +1 -1
- package/esm/core/constants.js +1 -1
- package/esm/core/ui/button/button/button.js +2 -1
- package/esm/core/ui/icon.js +5 -2
- package/esm/modules/toolbar/button/button.d.ts +1 -0
- package/esm/modules/toolbar/button/button.js +29 -19
- package/esm/types/toolbar.d.ts +2 -2
- package/esm/types/ui.d.ts +1 -0
- package/package.json +1 -1
- package/types/modules/toolbar/button/button.d.ts +1 -0
- package/types/types/toolbar.d.ts +2 -2
- package/types/types/ui.d.ts +1 -0
package/es2021/jodit.min.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
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.11.
|
|
4
|
+
* Version: v4.11.4
|
|
5
5
|
* Url: https://xdsoft.net/jodit/
|
|
6
6
|
* License(s): MIT
|
|
7
7
|
*/
|
|
8
8
|
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var i=t();for(var n in i)("object"==typeof exports?exports:e)[n]=i[n]}}(self,function(){return function(){var e,t,i,n,o={5266:function(e,t,i){"use strict";i.d(t,{Config:function(){return s}});var n=i(25045),o=i(81937);let r={};class s{static get defaultOptions(){return s.__defaultOptions||(s.__defaultOptions=new s),s.__defaultOptions}constructor(){(0,n._)(this,"cache",!0),(0,n._)(this,"defaultTimeout",100),(0,n._)(this,"namespace",""),(0,n._)(this,"safeMode",!1),(0,n._)(this,"width","auto"),(0,n._)(this,"height","auto"),(0,n._)(this,"safePluginsList",["about","enter","backspace","size","bold","hotkeys"]),(0,n._)(this,"commandToHotkeys",void 0),(0,n._)(this,"license",""),(0,n._)(this,"preset","custom"),(0,n._)(this,"presets",{inline:{inline:!0,toolbar:!1,toolbarInline:!0,toolbarInlineForSelection:!0,showXPathInStatusbar:!1,showCharsCounter:!1,showWordsCounter:!1,showPlaceholder:!1}}),(0,n._)(this,"ownerDocument",o.globalDocument),(0,n._)(this,"ownerWindow",o.globalWindow),(0,n._)(this,"shadowRoot",null),(0,n._)(this,"zIndex",0),(0,n._)(this,"readonly",!1),(0,n._)(this,"disabled",!1),(0,n._)(this,"activeButtonsInReadOnly",["source","fullsize","print","about","dots","selectall"]),(0,n._)(this,"allowCommandsInReadOnly",["selectall","preview","print"]),(0,n._)(this,"toolbarButtonSize","middle"),(0,n._)(this,"allowTabNavigation",!1),(0,n._)(this,"inline",!1),(0,n._)(this,"theme","default"),(0,n._)(this,"saveModeInStorage",!1),(0,n._)(this,"editorClassName",!1),(0,n._)(this,"className",!1),(0,n._)(this,"style",!1),(0,n._)(this,"containerStyle",!1),(0,n._)(this,"styleValues",{}),(0,n._)(this,"triggerChangeEvent",!0),(0,n._)(this,"direction",""),(0,n._)(this,"language","auto"),(0,n._)(this,"debugLanguage",!1),(0,n._)(this,"i18n",!1),(0,n._)(this,"tabIndex",-1),(0,n._)(this,"toolbar",!0),(0,n._)(this,"statusbar",!0),(0,n._)(this,"showTooltip",!0),(0,n._)(this,"showTooltipDelay",200),(0,n._)(this,"useNativeTooltip",!1),(0,n._)(this,"defaultActionOnPaste",o.INSERT_AS_HTML),(0,n._)(this,"enter",o.PARAGRAPH),(0,n._)(this,"iframe",!1),(0,n._)(this,"editHTMLDocumentMode",!1),(0,n._)(this,"enterBlock","br"!==this.enter?this.enter:o.PARAGRAPH),(0,n._)(this,"defaultMode",o.MODE_WYSIWYG),(0,n._)(this,"useSplitMode",!1),(0,n._)(this,"colors",{greyscale:["#000000","#434343","#666666","#999999","#B7B7B7","#CCCCCC","#D9D9D9","#EFEFEF","#F3F3F3","#FFFFFF"],palette:["#980000","#FF0000","#FF9900","#FFFF00","#00F0F0","#00FFFF","#4A86E8","#0000FF","#9900FF","#FF00FF"],full:["#E6B8AF","#F4CCCC","#FCE5CD","#FFF2CC","#D9EAD3","#D0E0E3","#C9DAF8","#CFE2F3","#D9D2E9","#EAD1DC","#DD7E6B","#EA9999","#F9CB9C","#FFE599","#B6D7A8","#A2C4C9","#A4C2F4","#9FC5E8","#B4A7D6","#D5A6BD","#CC4125","#E06666","#F6B26B","#FFD966","#93C47D","#76A5AF","#6D9EEB","#6FA8DC","#8E7CC3","#C27BA0","#A61C00","#CC0000","#E69138","#F1C232","#6AA84F","#45818E","#3C78D8","#3D85C6","#674EA7","#A64D79","#85200C","#990000","#B45F06","#BF9000","#38761D","#134F5C","#1155CC","#0B5394","#351C75","#733554","#5B0F00","#660000","#783F04","#7F6000","#274E13","#0C343D","#1C4587","#073763","#20124D","#4C1130"]}),(0,n._)(this,"colorPickerDefaultTab","background"),(0,n._)(this,"imageDefaultWidth",300),(0,n._)(this,"removeButtons",[]),(0,n._)(this,"disablePlugins",[]),(0,n._)(this,"extraPlugins",[]),(0,n._)(this,"basePath",void 0),(0,n._)(this,"extraButtons",[]),(0,n._)(this,"extraIcons",{}),(0,n._)(this,"createAttributes",{table:{style:"border-collapse:collapse;width: 100%;"}}),(0,n._)(this,"sizeLG",900),(0,n._)(this,"sizeMD",700),(0,n._)(this,"sizeSM",400),(0,n._)(this,"buttons",[{group:"font-style",buttons:[]},{group:"list",buttons:[]},{group:"font",buttons:[]},"---",{group:"script",buttons:[]},{group:"media",buttons:[]},`
|
|
9
|
-
`,{group:"state",buttons:[]},{group:"clipboard",buttons:[]},{group:"insert",buttons:[]},{group:"indent",buttons:[]},{group:"color",buttons:[]},{group:"form",buttons:[]},"---",{group:"history",buttons:[]},{group:"search",buttons:[]},{group:"source",buttons:[]},{group:"other",buttons:[]},{group:"info",buttons:[]}]),(0,n._)(this,"controls",void 0),(0,n._)(this,"events",{}),(0,n._)(this,"textIcons",!1),(0,n._)(this,"popupRoot",null),(0,n._)(this,"showBrowserColorPicker",!0),Object.assign(this,r)}}(0,n._)(s,"__defaultOptions",void 0),r=s.prototype,s.prototype.controls={}},24735:function(e,t,i){"use strict";i.d(t,{Async:function(){return f}});var n=i(25045),o=i(81937),r=i(61077),s=i(72068),a=i(91565),l=i(72412),c=i(62101),u=i(52100),d=i(85932),h=i(18303),p=i(28712),m=i(14228);class f{delay(e){return this.promise(t=>this.setTimeout(t,e))}setTimeout(e,t,...i){if(this.isDestructed)return 0;let n={};(0,h.isVoid)(t)&&(t=0),(0,l.isNumber)(t)||(t=(n=t).timeout||0),n.label&&this.clearLabel(n.label);let o=(0,r.setTimeout)(e,t,...i),s=n.label||o;return this.timers.set(s,o),this.__callbacks.set(s,e),o}updateTimeout(e,t){if((0,p.assert)(e&&this.timers.has(e),"Label does not exist"),!e||!this.timers.has(e))return null;let i=this.__callbacks.get(e);return(0,p.assert)((0,a.isFunction)(i),"Callback is not a function"),this.setTimeout(i,{label:e,timeout:t})}clearLabel(e){e&&this.timers.has(e)&&((0,r.clearTimeout)(this.timers.get(e)),this.timers.delete(e),this.__callbacks.delete(e))}clearTimeout(e){if((0,d.isString)(e))return this.clearLabel(e);(0,r.clearTimeout)(e),this.timers.delete(e),this.__callbacks.delete(e)}debounce(e,t,i=!1){let n=0,o=!1,l=[],d=(...t)=>{if(!o){n=0;let i=e(...t);if(o=!0,l.length){let e=()=>{l.forEach(e=>e()),l.length=0};(0,u.isPromise)(i)?i.finally(e):e()}}},h=(...s)=>{o=!1,t?(!n&&i&&d(...s),(0,r.clearTimeout)(n),n=this.setTimeout(()=>d(...s),(0,a.isFunction)(t)?t():t),this.timers.set(e,n)):d(...s)};return(0,c.isPlainObject)(t)&&t.promisify?(...e)=>{let t=this.promise(e=>{l.push(e)}).catch(e=>{if((0,s.isAbortError)(e))return null;throw e});return h(...e),t}:h}microDebounce(e,t=!1){let i,n=!1,o=!0;return(...r)=>{if(i=r,n){o=!0;return}o=!0,t&&(o=!1,e(...i)),n=!0,this.__queueMicrotaskNative(()=>{n=!1,!this.isDestructed&&o&&e(...i)})}}throttle(e,t,i=!1){let n=null,o,r,s;return(...i)=>{(o=!0,s=i,t)?n||(r=()=>{o?(e(...s),o=!1,n=this.setTimeout(r,(0,a.isFunction)(t)?t():t),this.timers.set(r,n)):n=null})():e(...s)}}promise(e){let t=()=>{},i=new Promise((i,n)=>{t=()=>n((0,m.abort)("Abort async")),this.promisesRejections.add(t),e(i,n)});return!i.finally&&"u">typeof process&&!o.IS_ES_NEXT&&(i.finally=e=>(i.then(e).catch(e),i)),i.finally(()=>{this.promisesRejections.delete(t)}).catch(()=>null),i.rejectCallback=t,i}promiseState(e){if(e.status)return e.status;if(!Promise.race)return new Promise(t=>{e.then(e=>(t("fulfilled"),e),e=>{throw t("rejected"),e}),this.setTimeout(()=>{t("pending")},100)});let t={};return Promise.race([e,t]).then(e=>e===t?"pending":"fulfilled",()=>"rejected")}requestIdleCallback(e,t={timeout:100}){let i=this.__requestIdleCallbackNative(e,t);return this.__requestsIdle.add(i),i}requestIdlePromise(e){return this.promise(t=>{let i=this.requestIdleCallback(()=>t(i),e)})}schedulerPostTask(e,t={delay:0,priority:"user-visible"}){let i=new AbortController;if(t.signal&&t.signal.addEventListener("abort",()=>i.abort()),this.__controllers.add(i),void 0!==globalThis.scheduler){let n=globalThis.scheduler.postTask(e,{...t,signal:i.signal});return n.finally(()=>{this.__controllers.delete(i)}).catch(()=>null),n}return this.promise((n,o)=>{let r=this.setTimeout(()=>{try{n(e())}catch(e){o(e)}this.__controllers.delete(i)},t.delay||1);i.signal.addEventListener("abort",()=>{this.clearTimeout(r),this.__controllers.delete(i),o((0,m.abort)())})})}schedulerYield(){return this.schedulerPostTask(()=>{},{priority:"user-visible"})}cancelIdleCallback(e){return this.__requestsIdle.delete(e),this.__cancelIdleCallbackNative(e)}requestAnimationFrame(e){let t=requestAnimationFrame(e);return this.__requestsRaf.add(t),t}cancelAnimationFrame(e){this.__requestsRaf.delete(e),cancelAnimationFrame(e)}clear(){this.__requestsIdle.forEach(e=>this.cancelIdleCallback(e)),this.__requestsRaf.forEach(e=>this.cancelAnimationFrame(e)),this.__controllers.forEach(e=>e.abort()),this.timers.forEach(e=>(0,r.clearTimeout)(this.timers.get(e))),this.timers.clear(),this.promisesRejections.forEach(e=>e()),this.promisesRejections.clear()}destruct(){this.clear(),this.isDestructed=!0}constructor(){(0,n._)(this,"timers",new Map),(0,n._)(this,"__callbacks",new Map),(0,n._)(this,"__queueMicrotaskNative",queueMicrotask?.bind(window)??Promise.resolve().then.bind(Promise.resolve())),(0,n._)(this,"promisesRejections",new Set),(0,n._)(this,"__requestsIdle",new Set),(0,n._)(this,"__controllers",new Set),(0,n._)(this,"__requestsRaf",new Set),(0,n._)(this,"__requestIdleCallbackNative",window.requestIdleCallback?.bind(window)??((e,t)=>{let i=Date.now();return this.setTimeout(()=>{e({didTimeout:!1,timeRemaining:()=>Math.max(0,50-(Date.now()-i))})},t?.timeout??1)})),(0,n._)(this,"__cancelIdleCallbackNative",window.cancelIdleCallback?.bind(window)??(e=>{this.clearTimeout(e)})),(0,n._)(this,"isDestructed",!1)}}},91231:function(e,t,i){"use strict";i.d(t,{Async:function(){return n.Async}});var n=i(24735)},80251:function(e,t,i){"use strict";i.d(t,{Component:function(){return c}});var n=i(25045),o=i(91231),r=i(69364),s=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 n=[this.componentName];return e&&n.push("__"+(e=e.replace(/[^a-z0-9-]/gi,"-"))),t&&(n.push("_",t),n.push("_",(0,a.isVoid)(i)?"true":i.toString())),n.join("")}get ownerDocument(){return this.ow.document}get od(){return this.ownerDocument}get ow(){return this.ownerWindow}get(e,t){return(0,a.get)(e,t||this)}get isReady(){return this.componentStatus===r.STATUSES.ready}get isDestructed(){return this.componentStatus===r.STATUSES.destructed}get isInDestruct(){return r.STATUSES.beforeDestruct===this.componentStatus||r.STATUSES.destructed===this.componentStatus}bindDestruct(e){return e.hookStatus(r.STATUSES.beforeDestruct,()=>!this.isInDestruct&&this.destruct()),this}destruct(){this.setStatus(r.STATUSES.destructed),this.async&&(this.async.destruct(),this.async=void 0),l.get(this)&&l.delete(this),this.ownerWindow=void 0}get componentStatus(){return this.__componentStatus}set componentStatus(e){this.setStatus(e)}setStatus(e){return this.setStatusComponent(e,this)}setStatusComponent(e,t){if(e===this.__componentStatus)return;t===this&&(this.__componentStatus=e);let i=Object.getPrototypeOf(this);i&&(0,a.isFunction)(i.setStatusComponent)&&i.setStatusComponent(e,t);let n=l.get(this),o=n?.[e];o&&o.length&&o.forEach(e=>e(t))}hookStatus(e,t){let i=l.get(this);i||(i={},l.set(this,i)),i[e]||(i[e]=[]),i[e].push(t)}static isInstanceOf(e,t){return e instanceof t}constructor(){(0,n._)(this,"__componentName",void 0),(0,n._)(this,"async",new o.Async),(0,n._)(this,"uid",void 0),(0,n._)(this,"ownerWindow",window),(0,n._)(this,"__componentStatus",r.STATUSES.beforeInit),this.uid="jodit-uid-"+(0,s.uniqueUid)()}}(0,n._)(c,"STATUSES",r.STATUSES)},16964:function(e,t,i){"use strict";i.d(t,{Component:function(){return n.Component},STATUSES:function(){return o.STATUSES},ViewComponent:function(){return r.ViewComponent}});var n=i(80251),o=i(69364),r=i(59609)},69364:function(e,t,i){"use strict";i.d(t,{STATUSES:function(){return n}});let n={beforeInit:"beforeInit",ready:"ready",beforeDestruct:"beforeDestruct",destructed:"destructed"}},59609:function(e,t,i){"use strict";i.d(t,{ViewComponent:function(){return r}});var n=i(25045),o=i(80251);class r extends o.Component{get j(){return this.jodit}get defaultTimeout(){return this.j.defaultTimeout}i18n(e,...t){return this.j.i18n(e,...t)}setParentView(e){return this.jodit=e,e.components.add(this),this}destruct(){return this.j.components.delete(this),super.destruct()}constructor(e){super(),(0,n._)(this,"jodit",void 0),this.setParentView(e)}}},81937:function(e,t,i){"use strict";i.r(t),i.d(t,{ACCURACY:function(){return V},APP_VERSION:function(){return n},BASE_PATH:function(){return eh},BASE_PATH_IS_MIN:function(){return ep},BR:function(){return W},CLIPBOARD_ID:function(){return eg},COMMAND_KEYS:function(){return U},EMULATE_DBLCLICK_TIMEOUT:function(){return et},ES:function(){return o},FAT_MODE:function(){return c},HOMEPAGE:function(){return u},INSEPARABLE_TAGS:function(){return T},INSERT_AS_HTML:function(){return ei},INSERT_AS_TEXT:function(){return eo},INSERT_CLEAR_HTML:function(){return en},INSERT_ONLY_TEXT:function(){return er},INVISIBLE_SPACE:function(){return p},INVISIBLE_SPACE_REG_EXP:function(){return f},INVISIBLE_SPACE_REG_EXP_END:function(){return g},INVISIBLE_SPACE_REG_EXP_START:function(){return _},IS_BLOCK:function(){return C},IS_ES_MODERN:function(){return r},IS_ES_NEXT:function(){return s},IS_IE:function(){return X},IS_INLINE:function(){return k},IS_MAC:function(){return ea},IS_PROD:function(){return a},IS_TEST:function(){return l},KEY_ALIASES:function(){return el},KEY_ALT:function(){return P},KEY_BACKSPACE:function(){return j},KEY_DELETE:function(){return F},KEY_DOWN:function(){return B},KEY_ENTER:function(){return L},KEY_ESC:function(){return A},KEY_F3:function(){return q},KEY_LEFT:function(){return M},KEY_META:function(){return D},KEY_RIGHT:function(){return R},KEY_SPACE:function(){return O},KEY_TAB:function(){return z},KEY_UP:function(){return N},LIST_TAGS:function(){return E},MARKER_CLASS:function(){return ee},MODE_SOURCE:function(){return K},MODE_SPLIT:function(){return G},MODE_WYSIWYG:function(){return Y},NBSP_SPACE:function(){return m},NEARBY:function(){return H},NO_EMPTY_TAGS:function(){return x},PARAGRAPH:function(){return $},PASSIVE_EVENTS:function(){return ev},SAFE_COUNT_CHANGE_CALL:function(){return es},SET_TEST:function(){return d},SOURCE_CONSUMER:function(){return e_},SPACE_REG_EXP:function(){return v},SPACE_REG_EXP_END:function(){return y},SPACE_REG_EXP_START:function(){return b},TEMP_ATTR:function(){return em},TEXT_HTML:function(){return Z},TEXT_PLAIN:function(){return J},TEXT_RTF:function(){return Q},TOKENS:function(){return h},globalDocument:function(){return w},globalWindow:function(){return S},lang:function(){return ef}});let n="4.11.2",o="es2021",r=!0,s=!0,a=!0,l=!1,c=!1,u="https://xdsoft.net/jodit/",d=()=>l=!0,h={},p="\uFEFF",m=" ",f=()=>/[\uFEFF]/g,g=()=>/[\uFEFF]+$/g,_=()=>/^[\uFEFF]+/g,v=()=>/[\s\n\t\r\uFEFF\u200b]+/g,b=()=>/^[\s\n\t\r\uFEFF\u200b]+/g,y=()=>/[\s\n\t\r\uFEFF\u200b]+$/g,S="u">typeof window?window:void 0,w="u">typeof document?document:void 0,C=/^(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,k=/^(STRONG|SPAN|I|EM|B|SUP|SUB|A|U)$/i,E=new Set(["ul","ol"]),I=["img","video","svg","iframe","script","input","textarea","link","jodit","jodit-media"],T=new Set([...I,"br","hr"]),x=new Set(I),D="Meta",j="Backspace",z="Tab",L="Enter",A="Escape",P="Alt",M="ArrowLeft",N="ArrowUp",R="ArrowRight",B="ArrowDown",O="Space",F="Delete",q="F3",H=5,V=10,U=[D,j,F,N,B,R,M,L,A,q,z],W="br",$="p",Y=1,K=2,G=3,X="u">typeof navigator&&(-1!==navigator.userAgent.indexOf("MSIE")||/rv:11.0/i.test(navigator.userAgent)),J=X?"text":"text/plain",Z=X?"html":"text/html",Q=X?"rtf":"text/rtf",ee="jodit-selection_marker",et=300,ei="insert_as_html",en="insert_clear_html",eo="insert_as_text",er="insert_only_text",es=10,ea=void 0!==S&&/Mac|iPod|iPhone|iPad/.test(S.navigator.platform),el={add:"+",break:"pause",cmd:"meta",command:"meta",ctl:"control",ctrl:"control",del:"delete",down:"arrowdown",esc:"escape",ins:"insert",left:"arrowleft",mod:ea?"meta":"control",opt:"alt",option:"alt",return:"enter",right:"arrowright",space:"space",spacebar:"space",up:"arrowup",win:"meta",windows:"meta"},ec=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:eu,isMin:ed}=(()=>{if("u"<typeof document)return{basePath:"",isMin:!0};let e=w.currentScript;if(e)return ec(e.src);let t=w.querySelectorAll("script[src]");return t&&t.length?ec(t[t.length-1].src):ec(S.location.href)})(),eh=eu,ep=ed,em="data-jodit-temp",ef={},eg="clipboard",e_="source-consumer",ev=new Set(["touchstart","touchend","scroll","mousewheel","mousemove","touchmove"])},76517:function(e,t,i){"use strict";i.d(t,{Create:function(){return l}});var n=i(25045),o=i(81937),r=i(23211),s=i(65946),a=i(28712);class l{get doc(){return(0,s.isFunction)(this.document)?this.document():this.document}element(e,t,i){let n=this.doc.createElement(e.toLowerCase());return this.applyCreateAttributes(n),t&&((0,s.isPlainObject)(t)?(0,s.attr)(n,t):i=t),i&&(0,s.asArray)(i).forEach(e=>n.appendChild((0,s.isString)(e)?this.fromHTML(e):e)),n}div(e,t,i){let n=this.element("div",t,i);return e&&(n.className=e),n}sandbox(){let e=this.element("iframe",{sandbox:"allow-same-origin"});this.doc.body.appendChild(e);let t=e.contentWindow?.document;if((0,a.assert)(t,"iframe.contentWindow.document"),!t)throw Error("Iframe error");return t.open(),t.write("<!DOCTYPE html><html><head></head><body></body></html>"),t.close(),[t.body,e]}span(e,t,i){let n=this.element("span",t,i);return e&&(n.className=e),n}a(e,t,i){let n=this.element("a",t,i);return e&&(n.className=e),n}text(e){return this.doc.createTextNode(e)}fake(){return this.text(o.INVISIBLE_SPACE)}fragment(){return this.doc.createDocumentFragment()}fromHTML(e,t){let i=this.div();i.innerHTML=e.toString();let n=i.firstChild===i.lastChild&&i.firstChild?i.firstChild:i;if(r.Dom.safeRemove(n),t){let e=(0,s.refs)(n);Object.keys(t).forEach(i=>{let n=e[i];n&&!1===t[i]&&r.Dom.hide(n)})}return n}applyCreateAttributes(e){if(this.createAttributes){let t=this.createAttributes;if(t&&t[e.tagName.toLowerCase()]){let i=t[e.tagName.toLowerCase()];(0,s.isFunction)(i)?i(e):(0,s.isPlainObject)(i)&&(0,s.attr)(e,i)}}}constructor(e,t){(0,n._)(this,"document",void 0),(0,n._)(this,"createAttributes",void 0),this.document=e,this.createAttributes=t}}},79821:function(e,t,i){"use strict";i.d(t,{Create:function(){return n.Create}});var n=i(76517)},49574:function(e,t,i){"use strict";i.d(t,{autobind:function(){return o}});var n=i(91565);function o(e,t,i){if(!(0,n.isFunction)(i.value))throw TypeError(`@autobind can only be applied to methods, but "${t}" is not a function`);let o=i.value;return{configurable:!0,get(){let e=o.bind(this);return Object.defineProperty(this,t,{value:e,configurable:!0,writable:!0}),e}}}},51676:function(e,t,i){"use strict";i.d(t,{cache:function(){return l},cacheHTML:function(){return c},cached:function(){return a}});var n=i(69364),o=i(23211),r=i(28686),s=i(38027);function a(e,t){let i=Object.getOwnPropertyDescriptor(e,t);return!i||(0,r.isFunction)(i.get)?null:i.value}function l(e,t,i){let n=i.get;if(!n)throw(0,s.error)("Getter property descriptor expected");i.get=function(){let e=n.call(this);return e&&!0===e.noCache||Object.defineProperty(this,t,{configurable:i.configurable,enumerable:i.enumerable,writable:!1,value:e}),e}}function c(e,t,i){let a=i.value;if(!(0,r.isFunction)(a))throw(0,s.error)("Handler must be a Function");let l=!0,c=new WeakMap;i.value=function(...e){if(l&&c.has(this.constructor))return c.get(this.constructor)?.cloneNode(!0);let t=a.apply(this,e);return l&&o.Dom.isElement(t)&&c.set(this.constructor,t),l?t.cloneNode(!0):t},e.hookStatus(n.STATUSES.ready,e=>{l=!!((0,r.isViewObject)(e)?e:e.jodit).options.cache})}},91672:function(e,t,i){"use strict";i.d(t,{component:function(){return s},getComponentClass:function(){return a}});var n=i(81937),o=i(421);let r=new Map;function s(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,o.getClassName)(e.prototype);if(r.has(i)&&!n.IS_PROD)throw Error(`Component with name "${i}" is already registered`);return r.set(i,t),t}function a(e){return r.get(e)}},55184:function(e,t,i){"use strict";i.d(t,{debounce:function(){return a},throttle:function(){return l}});var n=i(16964),o=i(28686),r=i(28712),s=i(33201);function a(e,t=!1,i="debounce"){return(a,l)=>{let c=a[l];if(!(0,o.isFunction)(c))throw(0,s.error)("Handler must be a Function");return a.hookStatus(n.STATUSES.ready,n=>{let{async:s}=n;(0,r.assert)(null!=s,`Component ${n.componentName||n.constructor.name} should have "async:IAsync" field`);let a=(0,o.isFunction)(e)?e(n):e,c=(0,o.isNumber)(a)||(0,o.isPlainObject)(a)?a:n.defaultTimeout;Object.defineProperty(n,l,{configurable:!0,value:s[i](n[l].bind(n),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 o}});var n=i(91565);function o(...e){return t=>{let i=t.prototype;for(let t=0;t<e.length;t++){let o=e[t],r=Object.getOwnPropertyNames(o.prototype);for(let e=0;e<r.length;e++){let t=r[e],s=Object.getOwnPropertyDescriptor(o.prototype,t);null!=s&&(0,n.isFunction)(s.value)&&!(0,n.isFunction)(i[t])&&Object.defineProperty(i,t,{enumerable:!0,configurable:!0,writable:!0,value:function(...e){return s.value.call(this,...e)}})}}}}},29200:function(e,t,i){"use strict";i.d(t,{hook:function(){return r}});var n=i(91565),o=i(33201);function r(e){return(t,i)=>{if(!(0,n.isFunction)(t[i]))throw(0,o.error)("Handler must be a Function");t.hookStatus(e,e=>{e[i].call(e)})}}},35718:function(e,t,i){"use strict";i.d(t,{idle:function(){return s}});var n=i(16964),o=i(91565),r=i(33201);function s(){return(e,t)=>{if(!(0,o.isFunction)(e[t]))throw(0,r.error)("Handler must be a Function");e.hookStatus(n.STATUSES.ready,e=>{let{async:i}=e,n=e[t];e[t]=(...t)=>i.requestIdleCallback(n.bind(e,...t))})}}},84839:function(e,t,i){"use strict";i.r(t),i.d(t,{autobind:function(){return n.autobind},cache:function(){return o.cache},cacheHTML:function(){return o.cacheHTML},cached:function(){return o.cached},component:function(){return r.component},debounce:function(){return s.debounce},derive:function(){return a.derive},getComponentClass:function(){return r.getComponentClass},hook:function(){return l.hook},idle:function(){return c.idle},nonenumerable:function(){return u.nonenumerable},persistent:function(){return d.persistent},throttle:function(){return s.throttle},wait:function(){return h.wait},watch:function(){return p.watch}});var n=i(49574),o=i(51676),r=i(91672),s=i(55184),a=i(24968),l=i(29200),c=i(35718),u=i(41360),d=i(77036),h=i(80840),p=i(68616)},41360:function(e,t,i){"use strict";i.d(t,{nonenumerable:function(){return n}});let n=(e,t)=>{!1!==(Object.getOwnPropertyDescriptor(e,t)||{}).enumerable&&Object.defineProperty(e,t,{enumerable:!1,set(e){Object.defineProperty(this,t,{enumerable:!1,writable:!0,value:e})}})}},77036:function(e,t,i){"use strict";i.d(t,{persistent:function(){return r}});var n=i(69364),o=i(31534);function r(e,t){e.hookStatus(n.STATUSES.ready,e=>{let i=(0,o.isViewObject)(e)?e:e.jodit,n=`${i.options.namespace}${e.componentName}_prop_${t}`,r=e[t];Object.defineProperty(e,t,{get:()=>i.storage.get(n)??r,set(e){i.storage.set(n,e)}})})}},80840:function(e,t,i){"use strict";i.d(t,{wait:function(){return s}});var n=i(69364),o=i(91565),r=i(33201);function s(e){return(t,i)=>{let s=t[i];if(!(0,o.isFunction)(s))throw(0,r.error)("Handler must be a Function");t.hookStatus(n.STATUSES.ready,t=>{let{async:n}=t,o=t[i],r=0;Object.defineProperty(t,i,{configurable:!0,value:function i(...s){n.clearTimeout(r),e(t)?o.apply(t,s):r=n.setTimeout(()=>i(...s),10)}})})}}},68616:function(e,t,i){"use strict";i.d(t,{watch:function(){return d}});var n=i(69364),o=i(70535),r=i(32328),s=i(91565),a=i(62101),l=i(31534),c=i(33201),u=i(71125);function d(e,t){return(i,d)=>{if(!(0,s.isFunction)(i[d]))throw(0,c.error)("Handler must be a Function");let h=t?.immediately??!0,p=t?.context,m=t=>{let n=(0,l.isViewObject)(t)?t:t.jodit,c=(e,...i)=>{if(!t.isInDestruct)return t[d](e,...i)};h||(c=t.async.microDebounce(c,!0)),(0,r.splitArray)(e).forEach(e=>{if(/:/.test(e)){let[i,o]=e.split(":"),r=p;i.length&&(r=t.get(i)),(0,s.isFunction)(r)&&(r=r(t)),n.events.on(r||t,o,c),r||n.events.on(o,c),t.hookStatus("beforeDestruct",()=>{n.events.off(r||t,o,c).off(o,c)});return}let r=e.split("."),[l]=r,d=r.slice(1),h=t[l];(0,a.isPlainObject)(h)&&(0,o.observable)(h).on("change."+d.join("."),c);let m=(0,u.getPropertyDescriptor)(i,l);Object.defineProperty(t,l,{configurable:!0,set(e){let i=h;i!==e&&(h=e,m&&m.set&&m.set.call(t,e),(0,a.isPlainObject)(h)&&(h=(0,o.observable)(h)).on("change."+d.join("."),c),c(l,i,h))},get:()=>m&&m.get?m.get.call(t):h})})};(0,s.isFunction)(i.hookStatus)?i.hookStatus(n.STATUSES.ready,m):m(i)}}},23211:function(e,t,i){"use strict";i.d(t,{Dom:function(){return v}});var n=i(81937),o=i(88475),r=i(17312),s=i(91565),a=i(46248),l=i(3213),c=i(85932),u=i(18303),d=i(4040),h=i(28712),p=i(7909),m=i(80991),f=i(36400),g=i(33201),_=i(71125);class v{static detach(e){for(;e&&e.firstChild;)e.removeChild(e.firstChild)}static wrapNextInline(e,t,i){let n,o=e;i.s.save();let r=!1;do r=!1,(n=o.nextSibling)&&!v.isBlock(n)&&!v.isTag(n,"br")&&(r=!0,o=n);while(r)return v.__wrapElements(t,i,e,o)}static __wrapElements(e,t,i,n){let o=(0,c.isString)(e)?t.createInside.element(e):e;i.parentNode&&i.parentNode.insertBefore(o,i);let r=i;for(;r&&(r=i.nextSibling,o.appendChild(i),i!==n&&r);)i=r;return t.s.restore(),o}static wrapInline(e,t,i){let n,o=e,r=e;i.s.save();let s=!1;do s=!1,(n=o.previousSibling)&&!v.isBlock(n)&&(s=!0,o=n);while(s)do s=!1,(n=r.nextSibling)&&!v.isBlock(n)&&(s=!0,r=n);while(s)return v.__wrapElements(t,i,o,r)}static wrap(e,t,i){let n=(0,c.isString)(t)?i.element(t):t;if(v.isNode(e)){if(!e.parentNode)throw(0,g.error)("Element should be in DOM");e.parentNode.insertBefore(n,e),n.appendChild(e)}else{let t=e.extractContents();e.insertNode(n),n.appendChild(t)}return n}static unwrap(e){let t=e.parentNode;if(t){for(;e.firstChild;)t.insertBefore(e.firstChild,e);v.safeRemove(e)}}static between(e,t,i){let n=e;for(;n&&n!==t&&!(e!==n&&i(n));){let e=n.firstChild||n.nextSibling;if(!e){for(;n&&!n.nextSibling;)n=n.parentNode;e=n?.nextSibling}n=e}}static replace(e,t,i,n=!1,r=!1){let s;if((0,a.isHTML)(t)&&((0,h.assert)(i,"Need create instance for new tag"),t=i.fromHTML(t)),(0,c.isString)(t)?((0,h.assert)(i,"Need create instance for new tag"),s=i.element(t)):s=t,!r)for(;e.firstChild;)s.appendChild(e.firstChild);return n&&v.isElement(e)&&v.isElement(s)&&(0,o.toArray)(e.attributes).forEach(e=>{s.setAttribute(e.name,e.value)}),e.parentNode&&e.parentNode.replaceChild(s,e),s}static isEmptyTextNode(e){return v.isText(e)&&(!e.nodeValue||0===e.nodeValue.replace(n.INVISIBLE_SPACE_REG_EXP(),"").trim().length)}static isEmptyContent(e){return v.each(e,e=>v.isEmptyTextNode(e))}static isContentEditable(e,t){return v.isNode(e)&&!v.closest(e,e=>v.isElement(e)&&"false"===e.getAttribute("contenteditable"),t)}static isEmpty(e,t=n.NO_EMPTY_TAGS){let i;if(!e)return!0;i=(0,s.isFunction)(t)?t:e=>t.has(e.nodeName.toLowerCase());let o=e=>null==e.nodeValue||0===(0,d.trim)(e.nodeValue).length;return v.isText(e)?o(e):!(v.isElement(e)&&i(e))&&v.each(e,e=>{if(v.isText(e)&&!o(e)||v.isElement(e)&&i(e))return!1})}static isNode(e){return!!(e&&(0,c.isString)(e.nodeName)&&"number"==typeof e.nodeType&&e.childNodes&&(0,s.isFunction)(e.appendChild))}static isCell(e){return v.isNode(e)&&("TD"===e.nodeName||"TH"===e.nodeName)}static isList(e){return v.isTag(e,n.LIST_TAGS)}static isLeaf(e){return v.isTag(e,"li")}static isImage(e){return v.isNode(e)&&/^(img|svg|picture|canvas)$/i.test(e.nodeName)}static isBlock(e){return!(0,u.isVoid)(e)&&"object"==typeof e&&v.isNode(e)&&n.IS_BLOCK.test(e.nodeName)}static isText(e){return!!(e&&e.nodeType===Node.TEXT_NODE)}static isComment(e){return!!(e&&e.nodeType===Node.COMMENT_NODE)}static isElement(e){return!!v.isNode(e)&&!!(e.ownerDocument?.defaultView&&e.nodeType===Node.ELEMENT_NODE)}static isFragment(e){return!!v.isNode(e)&&!!(e.ownerDocument?.defaultView&&e.nodeType===Node.DOCUMENT_FRAGMENT_NODE)}static isHTMLElement(e){if(!v.isNode(e))return!1;let t=e.ownerDocument?.defaultView;return!!(t&&e instanceof t.HTMLElement)}static isInlineBlock(e){return v.isElement(e)&&!/^(BR|HR)$/i.test(e.tagName)&&-1!==["inline","inline-block"].indexOf((0,m.css)(e,"display").toString())}static canSplitBlock(e){return!(0,u.isVoid)(e)&&v.isHTMLElement(e)&&v.isBlock(e)&&!/^(TD|TH|CAPTION|FORM)$/.test(e.nodeName)&&void 0!==e.style&&!/^(fixed|absolute)/i.test(e.style.position)}static last(e,t){let i=e?.lastChild;if(!i)return null;do{if(t(i))return i;let n=i.lastChild;if(n||(n=i.previousSibling),!n&&i.parentNode!==e){do i=i.parentNode;while(i&&!i?.previousSibling&&i.parentNode!==e)n=i?.previousSibling}i=n}while(i)return null}static prev(e,t,i,n=!0){return v.find(e,t,i,!1,n)}static next(e,t,i,n=!0){return v.find(e,t,i,!0,n)}static prevWithClass(e,t){return v.prev(e,e=>v.isElement(e)&&e.classList.contains(t),e.parentNode)}static nextWithClass(e,t){return v.next(e,e=>v.isElement(e)&&e.classList.contains(t),e.parentNode)}static find(e,t,i,n=!0,o=!0){let r=this.nextGen(e,i,n,o),s=r.next();for(;!s.done;){if(t(s.value))return s.value;s=r.next()}return null}static*nextGen(e,t,i=!0,n=!0){let o=[],r=e;do{let t=i?r.nextSibling:r.previousSibling;for(;t;)o.unshift(t),t=i?t.nextSibling:t.previousSibling;yield*this.runInStack(e,o,i,n),r=r.parentNode}while(r&&r!==t)return null}static each(e,t,i=!0){let n=this.eachGen(e,i),o=n.next();for(;!o.done;){if(!1===t(o.value))return!1;o=n.next()}return!0}static eachGen(e,t=!0){return this.runInStack(e,[e],t)}static*runInStack(e,t,i,n=!0){for(;t.length;){let o=t.pop();if(n){let e=i?o.lastChild:o.firstChild;for(;e;)t.push(e),e=i?e.previousSibling:e.nextSibling}e!==o&&(yield o)}}static findWithCurrent(e,t,i,n="nextSibling",o="firstChild"){let r=e;do{if(t(r))return r||null;if(o&&r&&r[o]){let e=v.findWithCurrent(r[o],t,r,n,o);if(e)return e}for(;r&&!r[n]&&r!==i;)r=r.parentNode;r&&r[n]&&r!==i&&(r=r[n])}while(r&&r!==i)return null}static findSibling(e,t=!0,i=e=>!v.isEmptyTextNode(e)){let n=v.sibling(e,t);for(;n&&!i(n);)n=v.sibling(n,t);return n&&i(n)?n:null}static findNotEmptySibling(e,t){return v.findSibling(e,t,e=>!v.isEmptyTextNode(e)&&!!(!v.isText(e)||e.nodeValue?.length&&(0,d.trim)(e.nodeValue)))}static findNotEmptyNeighbor(e,t,i){return(0,_.call)(t?v.prev:v.next,e,e=>!!(e&&(!(v.isText(e)||v.isComment(e))||(0,d.trim)(e?.nodeValue||"").length)),i)}static sibling(e,t){return t?e.previousSibling:e.nextSibling}static up(e,t,i,n=!1){let o=e;if(!o)return null;do{if(t(o))return o;if(o===i||!o.parentNode)break;o=o.parentNode}while(o&&o!==i)return o===i&&n&&t(o)?o:null}static closest(e,t,i){let n,o=e=>e.toLowerCase();if((0,s.isFunction)(t))n=t;else if((0,r.isArray)(t)||(0,l.isSet)(t)){let e=(0,l.isSet)(t)?t:new Set(t.map(o));n=t=>!!(t&&e.has(o(t.nodeName)))}else n=e=>!!(e&&o(t)===o(e.nodeName));return v.up(e,n,i)}static furthest(e,t,i){let n=null,o=e?.parentElement;for(;o&&o!==i;)t(o)&&(n=o),o=o?.parentElement;return n}static appendChildFirst(e,t){let i=e.firstChild;i?i!==t&&e.insertBefore(t,i):e.appendChild(t)}static after(e,t){let{parentNode:i}=e;i&&(i.lastChild===e?i.appendChild(t):i.insertBefore(t,e.nextSibling))}static before(e,t){let{parentNode:i}=e;i&&i.insertBefore(t,e)}static prepend(e,t){e.insertBefore(t,e.firstChild)}static append(e,t){(0,r.isArray)(t)?t.forEach(t=>{this.append(e,t)}):e.appendChild(t)}static moveContent(e,t,i=!1,r=()=>!0){let s=(e.ownerDocument||n.globalDocument).createDocumentFragment();(0,o.toArray)(e.childNodes).filter(e=>!!r(e)||(v.safeRemove(e),!1)).forEach(e=>{s.appendChild(e)}),i&&t.firstChild?t.insertBefore(s,t.firstChild):t.appendChild(s)}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=>v.isNode(e)&&e.parentNode&&e.parentNode.removeChild(e))}static safeInsertNode(e,t){e.collapsed||e.deleteContents();let i=v.isFragment(t)?t.lastChild:t;e.startContainer===e.endContainer&&e.collapsed&&v.isTag(e.startContainer,n.INSEPARABLE_TAGS)?v.after(e.startContainer,t):(e.insertNode(t),i&&e.setStartBefore(i)),e.collapse(!0),[t.nextSibling,t.previousSibling].forEach(e=>v.isText(e)&&!e.nodeValue&&v.safeRemove(e))}static hide(e){e&&((0,f.dataBind)(e,"__old_display",e.style.display),e.style.display="none")}static show(e){if(!e)return;let t=(0,f.dataBind)(e,"__old_display");"none"===e.style.display&&(e.style.display=t||"")}static isTag(e,t){if(!this.isElement(e))return!1;let i=e.tagName.toLowerCase(),n=e.tagName.toUpperCase();if(t instanceof Set)return t.has(i)||t.has(n);if(Array.isArray(t))throw TypeError("Dom.isTag does not support array");return i===t||n===t}static markTemporary(e,t){return t&&(0,p.attr)(e,t),(0,p.attr)(e,n.TEMP_ATTR,!0),e}static isTemporary(e){return!!v.isElement(e)&&(v.isMarker(e)||"true"===(0,p.attr)(e,n.TEMP_ATTR))}static isMarker(e){return v.isNode(e)&&v.isTag(e,"span")&&e.hasAttribute("data-"+n.MARKER_CLASS)}static replaceTemporaryFromString(e){return e.replace(/<([a-z]+)[^>]+data-jodit-temp[^>]+>(.+?)<\/\1>/gi,"$2")}static temporaryList(e){return(0,o.toArray)(e.querySelectorAll(`[${n.TEMP_ATTR}]`))}constructor(){throw Error("Dom is static module")}}},27795:function(e,t,i){"use strict";i.d(t,{Dom:function(){return n.Dom},LazyWalker:function(){return o.LazyWalker}});var n=i(23211),o=i(1080)},1080:function(e,t,i){"use strict";i.d(t,{LazyWalker:function(){return l}});var n=i(25045),o=i(31635),r=i(49574),s=i(23211),a=i(60216);class l extends a.Eventify{setWork(e){return this.isWorked&&this.break(),this.workNodes=s.Dom.eachGen(e,!this.options.reverse),this.isFinished=!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.async.cancelIdleCallback(this.idleId)}destruct(){super.destruct(),this.stop()}__workPerform(){if(this.workNodes){this.isWorked=!0;let e=0,t=this.options.timeoutChunkSize??50;for(;!this.isFinished&&e<=t;){let t=this.workNodes.next();if(e+=1,this.visitNode(t.value)&&(this.hadAffect=!0),t.done)return void this.end()}}else this.end();this.isFinished||this._requestStarting()}visitNode(e){return!!e&&(void 0===this.options.whatToShow||e.nodeType===this.options.whatToShow)&&(this.emit("visit",e)??!1)}constructor(e,t={}){super(),(0,n._)(this,"async",void 0),(0,n._)(this,"options",void 0),(0,n._)(this,"workNodes",void 0),(0,n._)(this,"hadAffect",void 0),(0,n._)(this,"isWorked",void 0),(0,n._)(this,"isFinished",void 0),(0,n._)(this,"idleId",void 0),(0,n._)(this,"__schedulerController",void 0),this.async=e,this.options=t,this.workNodes=null,this.hadAffect=!1,this.isWorked=!1,this.isFinished=!1,this.idleId=0,this.__schedulerController=null}}(0,o.__decorate)([r.autobind],l.prototype,"__workPerform",null)},93747:function(e,t,i){"use strict";i.d(t,{EventEmitter:function(){return d}});var n=i(25045),o=i(81937),r=i(32328),s=i(17312),a=i(91565),l=i(85932),c=i(33201),u=i(18869);class d{mute(e){return this.__mutedEvents.add(e??"*"),this}isMuted(e){return!!(e&&this.__mutedEvents.has(e))||this.__mutedEvents.has("*")}unmute(e){return this.__mutedEvents.delete(e??"*"),this}__eachEvent(e,t){(0,r.splitArray)(e).map(e=>e.trim()).forEach(e=>{let i=e.split("."),n=i[1]||u.defaultNameSpace;t.call(this,i[0],n)})}__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]&&Object.defineProperty(e,this.__key,{enumerable:!1,configurable:!0,writable:!0,value:void 0})}__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,n){let r,u,d,p;if((0,l.isString)(e)||(0,l.isStringArray)(e)?(r=this,u=e,d=t,p=i):(r=e,u=t,d=i,p=n),!((0,l.isString)(u)||(0,l.isStringArray)(u))||0===u.length)throw(0,c.error)("Need events names");if(!(0,a.isFunction)(d))throw(0,c.error)("Need event handler");if((0,s.isArray)(r))return r.forEach(e=>{this.on(e,u,d,p)}),this;let m=r,f=this.__getStore(m),g=this,_=function(e,...t){if(!g.isMuted(e))return d&&d.call(this,...t)};return h(m)&&(_=function(e){if(!g.isMuted(e.type)&&(g.__prepareEvent(e),d&&!1===d.call(this,e)))return e.preventDefault(),e.stopImmediatePropagation(),!1}),this.__eachEvent(u,(e,t)=>{if(0===e.length)throw(0,c.error)("Need event name");if(!1===f.indexOf(e,t,d)){let i={event:e,originalCallback:d,syntheticCallback:_};if(f.set(e,t,i,p?.top),h(m)){let t=o.PASSIVE_EVENTS.has(e)?{passive:!0,capture:p?.capture??!1}:p?.capture??!1;_.options=t,m.addEventListener(e,_,t),this.__memoryDOMSubjectToHandler(m,_)}}}),this}__memoryDOMSubjectToHandler(e,t){let i=this.__domEventsMap.get(e)||new Set;i.add(t),this.__domEventsMap.set(e,i)}__unmemoryDOMSubjectToHandler(e,t){let i=this.__domEventsMap,n=i.get(e)||new Set;n.delete(t),n.size?i.set(e,n):i.delete(e)}one(e,t,i,n){let o,r,s,a;(0,l.isString)(e)||(0,l.isStringArray)(e)?(o=this,r=e,s=t,a=i):(o=e,r=t,s=i,a=n);let c=(...e)=>(this.off(o,r,c),s(...e));return this.on(o,r,c,a),this}off(e,t,i){let n,o,r;if((0,l.isString)(e)||(0,l.isStringArray)(e)?(n=this,o=e,r=t):(n=e,o=t,r=i),(0,s.isArray)(n))return n.forEach(e=>{this.off(e,o,r)}),this;let c=n,d=this.__getStore(c);if(!((0,l.isString)(o)||(0,l.isStringArray)(o))||0===o.length)return d.namespaces().forEach(e=>{this.off(c,"."+e)}),this.__removeStoreFromSubject(c),this;let p=e=>{h(c)&&(c.removeEventListener(e.event,e.syntheticCallback,e.syntheticCallback.options??!1),this.__unmemoryDOMSubjectToHandler(c,e.syntheticCallback))},m=(e,t)=>{if(""===e)return void d.events(t).forEach(e=>{""!==e&&m(e,t)});let i=d.get(e,t);if(i&&i.length)if((0,a.isFunction)(r)){let n=d.indexOf(e,t,r);!1!==n&&(p(i[n]),i.splice(n,1),i.length||d.clearEvents(t,e))}else i.forEach(p),i.length=0,d.clearEvents(t,e)};return this.__eachEvent(o,(e,t)=>{t===u.defaultNameSpace?d.namespaces().forEach(t=>{m(e,t)}):m(e,t)}),d.isEmpty()&&this.__removeStoreFromSubject(c),this}stopPropagation(e,t){let i=(0,l.isString)(e)?this:e,n=(0,l.isString)(e)?e:t;if("string"!=typeof n)throw(0,c.error)("Need event names");let o=this.__getStore(i);this.__eachEvent(n,(e,t)=>{let n=o.get(e,t);n&&this.__stopped.push(n),t===u.defaultNameSpace&&o.namespaces(!0).forEach(t=>this.stopPropagation(i,e+"."+t))})}__removeStop(e){if(e){let t=this.__stopped.indexOf(e);-1!==t&&this.__stopped.splice(0,t+1)}}__isStopped(e){return void 0!==e&&-1!==this.__stopped.indexOf(e)}fire(e,t,...i){let n,o,r=(0,l.isString)(e)?this:e,s=(0,l.isString)(e)?e:t,a=(0,l.isString)(e)?[t,...i]:i;if(!h(r)&&!(0,l.isString)(s))throw(0,c.error)("Need events names");let d=this.__getStore(r);return!(0,l.isString)(s)&&h(r)?this.__triggerNativeEvent(r,t):this.__eachEvent(s,(e,t)=>{if(h(r))this.__triggerNativeEvent(r,e);else{let i=d.get(e,t);if(i)try{[...i].every(t=>!this.__isStopped(i)&&(this.currents.push(e),o=t.syntheticCallback.call(r,e,...a),this.currents.pop(),void 0!==o&&(n=o),!0))}finally{this.__removeStop(i)}t!==u.defaultNameSpace||h(r)||d.namespaces().filter(e=>e!==t).forEach(t=>{let i=this.fire.apply(this,[r,e+"."+t,...a]);void 0!==i&&(n=i)})}}),n}destruct(){this.__isDestructed||(this.__isDestructed=!0,this.__domEventsMap.forEach((e,t)=>{this.off(t)}),this.__domEventsMap.clear(),this.__mutedEvents.clear(),this.currents.length=0,this.__stopped.length=0,this.off(this),this.__getStore(this).clear(),this.__removeStoreFromSubject(this))}constructor(e){(0,n._)(this,"__domEventsMap",new Map),(0,n._)(this,"__mutedEvents",new Set),(0,n._)(this,"__key","__JoditEventEmitterNamespaces"),(0,n._)(this,"__doc",o.globalDocument),(0,n._)(this,"__prepareEvent",e=>{!e.cancelBubble&&(e.composed&&(0,a.isFunction)(e.composedPath)&&e.composedPath()[0]&&Object.defineProperty(e,"target",{value:e.composedPath()[0],configurable:!0,enumerable:!0}),e.type.match(/^touch/)&&e.changedTouches&&e.changedTouches.length&&["clientX","clientY","pageX","pageY"].forEach(t=>{Object.defineProperty(e,t,{value:e.changedTouches[0][t],configurable:!0,enumerable:!0})}),e.originalEvent||(e.originalEvent=e),"paste"===e.type&&void 0===e.clipboardData&&this.__doc.defaultView.clipboardData&&Object.defineProperty(e,"clipboardData",{get:()=>this.__doc.defaultView.clipboardData,configurable:!0,enumerable:!0}))}),(0,n._)(this,"currents",[]),(0,n._)(this,"__stopped",[]),(0,n._)(this,"__isDestructed",!1),e&&(this.__doc=e),this.__key+=new Date().getTime()}}function h(e){return(0,a.isFunction)(e.addEventListener)}},60216:function(e,t,i){"use strict";i.d(t,{Eventify:function(){return o}});var n=i(25045);class o{on(e,t){return this.__map.has(e)||this.__map.set(e,new Set),this.__map.get(e)?.add(t),this}off(e,t){return this.__map.has(e)&&this.__map.get(e)?.delete(t),this}destruct(){this.__map.clear()}emit(e,...t){let i;return this.__map.has(e)&&this.__map.get(e)?.forEach(e=>{i=e(...t)}),i}constructor(){(0,n._)(this,"__map",new Map)}}},42689:function(e,t,i){"use strict";i.d(t,{eventEmitter:function(){return n}});let n=new(i(93747)).EventEmitter},1496:function(e,t,i){"use strict";i.d(t,{EventEmitter:function(){return n.EventEmitter},EventHandlersStore:function(){return s.EventHandlersStore},Eventify:function(){return o.Eventify},defaultNameSpace:function(){return s.defaultNameSpace},observable:function(){return r.observable}});var n=i(93747),o=i(60216),r=i(70535),s=i(18869)},70535:function(e,t,i){"use strict";i.d(t,{observable:function(){return c}});var n=i(17312),o=i(94013),r=i(62101),s=i(71125);let a=Symbol("observable-object");function l(e){return void 0!==e[a]}function c(e){if(l(e))return e;let t={},i={},c=(t,o)=>((0,n.isArray)(t)?t.map(e=>c(e,o)):(i[t]||(i[t]=[]),i[t].push(o)),e),u=(o,...r)=>{if((0,n.isArray)(o))return void o.map(e=>u(e,...r));try{!t[o]&&i[o]&&(t[o]=!0,i[o].forEach(t=>t.call(e,...r)))}finally{t[o]=!1}},d=(t,i=[])=>{let n={};l(t)||(Object.defineProperty(t,a,{enumerable:!1,value:!0}),Object.keys(t).forEach(a=>{let l=i.concat(a).filter(e=>e.length);n[a]=t[a];let c=(0,s.getPropertyDescriptor)(t,a);Object.defineProperty(t,a,{set(t){let i=n[a];if(!(0,o.isFastEqual)(n[a],t)){u(["beforeChange","beforeChange."+l.join(".")],a,t),(0,r.isPlainObject)(t)&&d(t,l),c&&c.set?c.set.call(e,t):n[a]=t;let o=[];u(["change",...l.reduce((e,t)=>(o.push(t),e.push("change."+o.join(".")),e),[])],l.join("."),i,t?.valueOf?t.valueOf():t)}},get:()=>c&&c.get?c.get.call(e):n[a],enumerable:!0,configurable:!0}),(0,r.isPlainObject)(n[a])&&d(n[a],l)}),Object.defineProperty(e,"on",{value:c}))};return d(e),e}},18869:function(e,t,i){"use strict";i.d(t,{EventHandlersStore:function(){return a},defaultNameSpace:function(){return s}});var n=i(25045),o=i(88475),r=i(28712);let s="JoditEventDefaultNamespace";class a{get(e,t){if(this.__store.has(t)){let i=this.__store.get(t);return(0,r.assert)(i,"-"),i[e]}}indexOf(e,t,i){let n=this.get(e,t);if(n){for(let e=0;e<n.length;e+=1)if(n[e].originalCallback===i)return e}return!1}namespaces(e=!1){let t=(0,o.toArray)(this.__store.keys());return e?t.filter(e=>e!==s):t}events(e){let t=this.__store.get(e);return t?Object.keys(t):[]}set(e,t,i,n=!1){let o=this.__store.get(t);o||(o={},this.__store.set(t,o)),void 0===o[e]&&(o[e]=[]),n?o[e].unshift(i):o[e].push(i)}clear(){this.__store.clear()}clearEvents(e,t){let i=this.__store.get(e);i&&i[t]&&(delete i[t],Object.keys(i).length||this.__store.delete(e))}isEmpty(){return 0===this.__store.size}constructor(){(0,n._)(this,"__store",new Map)}}},28077:function(e,t,i){"use strict";i.d(t,{eventEmitter:function(){return C},extendLang:function(){return b},getContainer:function(){return S},getPopupViewRoot:function(){return w},instances:function(){return p},modules:function(){return v},pluginSystem:function(){return _},uniqueUid:function(){return g}});var n=i(24497),o=i(85932),r=i(31534),s=i(74264),a=i(80991),l=i(421),c=i(85305),u=i(42689),d=i(81937),h=i(27795);let p={},m=1,f=new Set;function g(){function e(){return Math.round(m+=10*(Math.random()+1)).toString(16)}let t=e();for(;f.has(t);)t=e();return f.add(t),t}let _=new c.PluginSystem({getContainer:S}),v={},b=e=>{Object.keys(e).forEach(t=>{d.lang[t]?Object.assign(d.lang[t],e[t]):d.lang[t]=e[t]})},y=new WeakMap;function S(e,t,i="div",a=!1){let c=(0,o.isString)(t)?t:t?(0,l.getClassName)(t.prototype):"jodit-utils",u=y.get(e)||{},d=c+i,p=(0,r.isViewObject)(e)?e:e.j,m=null;if(!u[d]){let t=p.c;if(m=w(p.o,p.container,e.od.body),a&&(0,n.isJoditObject)(e)&&e.od!==e.ed){t=e.createInside;let o="style"===i?e.ed.head:e.ed.body;m=(0,n.isJoditObject)(e)&&e.o.shadowRoot?e.o.shadowRoot:o}let o=t.element(i,{className:`jodit jodit-${(0,s.kebabCase)(c)}-container jodit-box`});o.classList.add("jodit_theme_"+(p.o.theme||"default")),m.appendChild(o),u[d]=o,e.hookStatus("beforeDestruct",()=>{p.events.off(o),h.Dom.safeRemove(o),delete u[d],Object.keys(u).length&&y.delete(e)}),y.set(e,u),p.events.fire("getContainer",o)}return u[d].classList.remove("jodit_theme_default","jodit_theme_dark"),u[d].classList.add("jodit_theme_"+(p.o.theme||"default")),u[d]}function w(e,t,i){return e.popupRoot??e.shadowRoot??h.Dom.closest(t,e=>h.Dom.isHTMLElement(e)&&(h.Dom.isTag(e,"dialog")||["fixed","absolute"].includes((0,a.css)(e,"position"))),i)??i}let C=u.eventEmitter},78982:function(e,t,i){"use strict";i.d(t,{asArray:function(){return o}});var n=i(17312);let o=e=>(0,n.isArray)(e)?e:[e]},45664:function(e,t,i){"use strict";i.d(t,{asArray:function(){return n.asArray},splitArray:function(){return o.splitArray},toArray:function(){return r.toArray}});var n=i(78982),o=i(32328),r=i(88475)},32328:function(e,t,i){"use strict";function n(e){return Array.isArray(e)?e:e.split(/[,\s]+/)}i.d(t,{splitArray:function(){return n}})},88475:function(e,t,i){"use strict";i.d(t,{toArray:function(){return r}});var n=i(23283),o=i(43379);let r=function(...e){return((0,n.isNativeFunction)(Array.from)?Array.from:(0,o.reset)("Array.from")??Array.from).apply(Array,e)}},61077:function(e,t,i){"use strict";i.d(t,{clearTimeout:function(){return n.clearTimeout},setTimeout:function(){return n.setTimeout}});var n=i(79947)},79947:function(e,t,i){"use strict";i.d(t,{clearTimeout:function(){return r},setTimeout:function(){return o}});var n=i(81937);function o(e,t,...i){return t?n.globalWindow.setTimeout(e,t,...i):(e.call(null,...i),0)}function r(e){n.globalWindow.clearTimeout(e)}},98740:function(e,t,i){"use strict";i.d(t,{hasBrowserColorPicker:function(){return o}});var n=i(81937);function o(){let e=!0;try{let t=n.globalDocument.createElement("input");t.type="color",t.value="!",e="color"===t.type&&"!"!==t.value}catch(t){e=!1}return e}},28686:function(e,t,i){"use strict";i.d(t,{hasBrowserColorPicker:function(){return n.hasBrowserColorPicker},hasContainer:function(){return d.hasContainer},isAbortError:function(){return o.isAbortError},isArray:function(){return r.isArray},isBoolean:function(){return s.isBoolean},isDestructable:function(){return d.isDestructable},isEqual:function(){return a.isEqual},isFastEqual:function(){return a.isFastEqual},isFunction:function(){return l.isFunction},isHTML:function(){return c.isHTML},isHtmlFromWord:function(){return u.isHtmlFromWord},isInitable:function(){return d.isInitable},isInt:function(){return h.isInt},isJoditObject:function(){return p.isJoditObject},isLicense:function(){return m.isLicense},isMarker:function(){return f.isMarker},isNativeFunction:function(){return g.isNativeFunction},isNumber:function(){return _.isNumber},isNumeric:function(){return v.isNumeric},isPlainObject:function(){return b.isPlainObject},isPromise:function(){return y.isPromise},isSet:function(){return S.isSet},isString:function(){return w.isString},isStringArray:function(){return w.isStringArray},isURL:function(){return C.isURL},isValidName:function(){return k.isValidName},isViewObject:function(){return E.isViewObject},isVoid:function(){return I.isVoid},isWindow:function(){return T.isWindow}});var n=i(98740),o=i(72068),r=i(17312),s=i(22289),a=i(94013),l=i(91565),c=i(46248),u=i(82166),d=i(52433),h=i(99732),p=i(24497),m=i(44998),f=i(23175),g=i(23283),_=i(72412),v=i(70222),b=i(62101),y=i(52100),S=i(3213),w=i(85932),C=i(91764),k=i(50083),E=i(31534),I=i(18303),T=i(3513)},72068:function(e,t,i){"use strict";function n(e){return!!e&&e instanceof DOMException&&"AbortError"===e.name}i.d(t,{isAbortError:function(){return n}})},17312:function(e,t,i){"use strict";function n(e){return Array.isArray(e)}i.d(t,{isArray:function(){return n}})},22289:function(e,t,i){"use strict";function n(e){return"boolean"==typeof e}i.d(t,{isBoolean:function(){return n}})},94013:function(e,t,i){"use strict";i.d(t,{isEqual:function(){return o},isFastEqual:function(){return r}});var n=i(3347);function o(e,t){return e===t||(0,n.stringify)(e)===(0,n.stringify)(t)}function r(e,t){return e===t}},91565:function(e,t,i){"use strict";function n(e){return"function"==typeof e}i.d(t,{isFunction:function(){return n}})},82166:function(e,t,i){"use strict";function n(e){return -1!==e.search(/<meta.*?Microsoft Excel\s[\d].*?>/)||-1!==e.search(/<meta.*?Microsoft Word\s[\d].*?>/)||-1!==e.search(/style="[^"]*mso-/)&&-1!==e.search(/<font/)}i.d(t,{isHtmlFromWord:function(){return n}})},46248:function(e,t,i){"use strict";i.d(t,{isHTML:function(){return o}});var n=i(85932);let o=e=>(0,n.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 s}});var n=i(23211),o=i(91565),r=i(18303);function s(e){return!(0,r.isVoid)(e)&&(0,o.isFunction)(e.init)}function a(e){return!(0,r.isVoid)(e)&&(0,o.isFunction)(e.destruct)}function l(e){return!(0,r.isVoid)(e)&&n.Dom.isElement(e.container)}},99732:function(e,t,i){"use strict";i.d(t,{isInt:function(){return r}});var n=i(70222),o=i(85932);function r(e){return(0,o.isString)(e)&&(0,n.isNumeric)(e)&&(e=parseFloat(e)),"number"==typeof e&&Number.isFinite(e)&&!(e%1)}},24497:function(e,t,i){"use strict";i.d(t,{isJoditObject:function(){return o}});var n=i(91565);function o(e){return!!(e&&e instanceof Object&&(0,n.isFunction)(e.constructor)&&("u">typeof Jodit&&e instanceof Jodit||e.isJodit))}},44998:function(e,t,i){"use strict";i.d(t,{isLicense:function(){return o}});var n=i(85932);let o=e=>(0,n.isString)(e)&&23===e.length&&/^[a-z0-9]{5}-[a-z0-9]{5}-[a-z0-9]{5}-[a-z0-9]{5}$/i.test(e)},23175:function(e,t,i){"use strict";i.d(t,{isMarker:function(){return o}});var n=i(23211);function o(e){return n.Dom.isMarker(e)}},23283:function(e,t,i){"use strict";function n(e){return!!e&&"function"===(typeof e).toLowerCase()&&(e===Function.prototype||/^\s*function\s*(\b[a-z$_][a-z0-9$_]*\b)*\s*\((|([a-z$_][a-z0-9$_]*)(\s*,[a-z$_][a-z0-9$_]*)*)\)\s*{\s*\[native code]\s*}\s*$/i.test(e+""))}i.d(t,{isNativeFunction:function(){return n}})},72412:function(e,t,i){"use strict";function n(e){return"number"==typeof e&&!isNaN(e)&&isFinite(e)}i.d(t,{isNumber:function(){return n}})},70222:function(e,t,i){"use strict";i.d(t,{isNumeric:function(){return o}});var n=i(85932);function o(e){if((0,n.isString)(e)){if(!e.match(/^([+-])?[0-9]+(\.?)([0-9]+)?(e[0-9]+)?$/))return!1;e=parseFloat(e)}return"number"==typeof e&&!isNaN(e)&&isFinite(e)}},62101:function(e,t,i){"use strict";i.d(t,{isPlainObject:function(){return o}});var n=i(3513);function o(e){return!(!e||"object"!=typeof e||e.nodeType||(0,n.isWindow)(e))&&!(e.constructor&&!({}).hasOwnProperty.call(e.constructor.prototype,"isPrototypeOf"))}},52100:function(e,t,i){"use strict";function n(e){return e&&"function"==typeof e.then}i.d(t,{isPromise:function(){return n}})},3213:function(e,t,i){"use strict";i.d(t,{isSet:function(){return o}});var n=i(91565);function o(e){return!!e&&(0,n.isFunction)(e.has)&&(0,n.isFunction)(e.add)&&(0,n.isFunction)(e.delete)}},85932:function(e,t,i){"use strict";i.d(t,{isString:function(){return o},isStringArray:function(){return r}});var n=i(17312);function o(e){return"string"==typeof e}function r(e){return(0,n.isArray)(e)&&o(e[0])}},91764:function(e,t,i){"use strict";i.d(t,{isURL:function(){return o}});var n=i(81937);function o(e){if(e.includes(" "))return!1;if("u">typeof URL)try{let t=new URL(e);return["https:","http:","ftp:","file:","rtmp:"].includes(t.protocol)}catch(e){return!1}let t=n.globalDocument.createElement("a");return t.href=e,!!t.hostname}},50083:function(e,t,i){"use strict";function n(e){return!!e.length&&!/[^0-9A-Za-zа-яА-ЯЁё\w\-_. ]/.test(e)&&e.trim().length>0}i.d(t,{isValidName:function(){return n}})},31534:function(e,t,i){"use strict";i.d(t,{isViewObject:function(){return o}});var n=i(91565);function o(e){return!!(e&&e instanceof Object&&(0,n.isFunction)(e.constructor)&&e.isView)}},18303:function(e,t,i){"use strict";function n(e){return null==e}i.d(t,{isVoid:function(){return n}})},3513:function(e,t,i){"use strict";function n(e){return null!=e&&e===e.window}i.d(t,{isWindow:function(){return n}})},93387:function(e,t,i){"use strict";i.d(t,{colorToHex:function(){return n}});let n=e=>{if("rgba(0, 0, 0, 0)"===e||""===e)return!1;if(!e)return"#000000";if("#"===e.substr(0,1))return e;let t=/([\s\n\t\r]*?)rgb\((\d+), (\d+), (\d+)\)/.exec(e)||/([\s\n\t\r]*?)rgba\((\d+), (\d+), (\d+), ([\d.]+)\)/.exec(e);if(!t)return"#000000";let i=parseInt(t[2],10),n=parseInt(t[3],10),o=(parseInt(t[4],10)|n<<8|i<<16).toString(16).toUpperCase();for(;o.length<6;)o="0"+o;return t[1]+"#"+o}},7018:function(e,t,i){"use strict";i.d(t,{colorToHex:function(){return n.colorToHex}});var n=i(93387)},30893:function(e,t,i){"use strict";i.d(t,{applyStyles:function(){return l}});var n=i(81937),o=i(23211),r=i(4040),s=i(28723);function a(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 l(e){if(-1===e.indexOf("<html "))return e;e=(e=e.substring(e.indexOf("<html "),e.length)).substring(0,e.lastIndexOf("</html>")+7);let t=n.globalDocument.createElement("iframe");t.style.display="none",n.globalDocument.body.appendChild(t);let i="";try{let l=t.contentDocument||(t.contentWindow?t.contentWindow.document:null);if(l){l.open(),l.write(e),l.close();try{for(let e=0;e<l.styleSheets.length;e+=1){let t=l.styleSheets[e].cssRules;for(let e=0;e<t.length;e+=1)""!==t[e].selectorText&&(0,s.$$)(t[e].selectorText,l.body).forEach(i=>{i.style.cssText=a(t[e].style.cssText+";"+i.style.cssText)})}}catch(e){if(!n.IS_PROD)throw e}o.Dom.each(l.body,e=>{if(o.Dom.isElement(e)){let t=e.getAttribute("style");t&&(e.style.cssText=a(t)),e.hasAttribute("style")&&!e.getAttribute("style")&&e.removeAttribute("style")}}),i=l.firstChild?(0,r.trim)(l.body.innerHTML):""}}catch{}finally{o.Dom.safeRemove(t)}return i&&(e=i),(0,r.trim)(e.replace(/<(\/)?(html|colgroup|col|o:p)[^>]*>/g,"").replace(/<!--[^>]*>/g,""))}},1277:function(e,t,i){"use strict";i.d(t,{cleanFromWord:function(){return a}});var n=i(81937),o=i(23211),r=i(88475),s=i(4040);function a(e){-1!==e.indexOf("<html ")&&(e=(e=e.substring(e.indexOf("<html "),e.length)).substring(0,e.lastIndexOf("</html>")+7));let t="";try{let i=n.globalDocument.createElement("div");i.innerHTML=e;let s=[];i.firstChild&&o.Dom.each(i,e=>{if(e)switch(e.nodeType){case Node.ELEMENT_NODE:switch(e.nodeName){case"STYLE":case"LINK":case"META":s.push(e);break;case"W:SDT":case"W:SDTPR":case"FONT":o.Dom.unwrap(e);break;default:(0,r.toArray)(e.attributes).forEach(t=>{-1===["src","href","rel","content"].indexOf(t.name.toLowerCase())&&e.removeAttribute(t.name)})}break;case Node.TEXT_NODE:break;default:s.push(e)}}),o.Dom.safeRemove.apply(null,s),t=i.innerHTML}catch(e){}return t&&(e=t),(e=e.split(/(\n)/).filter(s.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 o}});var n=i(81937);function o(e){let t=n.globalDocument.createElement("div");return t.textContent=e,t.innerHTML}},82658:function(e,t,i){"use strict";i.d(t,{applyStyles:function(){return n.applyStyles},cleanFromWord:function(){return o.cleanFromWord},htmlspecialchars:function(){return r.htmlspecialchars},nl2br:function(){return s.nl2br},safeHTML:function(){return a.safeHTML},sanitizeHTMLElement:function(){return a.sanitizeHTMLElement},stripTags:function(){return l.stripTags}});var n=i(30893),o=i(1277),r=i(6609),s=i(48838),a=i(48155),l=i(22852)},48838:function(e,t,i){"use strict";function n(e){return e.replace(/\r\n|\r|\n/g,"<br/>")}i.d(t,{nl2br:function(){return n}})},48155:function(e,t,i){"use strict";i.d(t,{safeHTML:function(){return r},sanitizeHTMLElement:function(){return a}});var n=i(23211),o=i(93640);function r(e,t){(n.Dom.isElement(e)||n.Dom.isFragment(e))&&(t.removeEventAttributes??t.removeOnError?(s(e),(0,o.$$)("*",e).forEach(e=>s(e))):t.removeOnError&&(a(e,t),(0,o.$$)("[onerror]",e).forEach(e=>a(e,t))),t.safeJavaScriptLink&&(a(e,t),(0,o.$$)('a[href^="javascript"]',e).forEach(e=>a(e,t))),t.safeLinksTarget&&(0,o.$$)('a[target="_blank"]',e).forEach(e=>{let t=(e.getAttribute("rel")||"").split(/\s+/).filter(Boolean);t.includes("noopener")||t.push("noopener"),t.includes("noreferrer")||t.push("noreferrer"),(0,o.attr)(e,"rel",t.join(" "))}))}function s(e){if(!n.Dom.isElement(e))return!1;let t=!1,i=[];for(let t=0;t<e.attributes.length;t++)e.attributes[t].name.toLowerCase().startsWith("on")&&i.push(e.attributes[t].name);for(let n of i)e.removeAttribute(n),t=!0;return t}function a(e,{safeJavaScriptLink:t,removeOnError:i}={safeJavaScriptLink:!0,removeOnError:!0}){if(!n.Dom.isElement(e))return!1;let r=!1;i&&e.hasAttribute("onerror")&&((0,o.attr)(e,"onerror",null),r=!0);let s=e.getAttribute("href");return t&&s&&0===s.trim().indexOf("javascript")&&((0,o.attr)(e,"href",location.protocol+"//"+s),r=!0),r}},22852:function(e,t,i){"use strict";i.d(t,{stripTags:function(){return function e(t,i=document,u=null){let d=i.createElement("div");return(0,o.isString)(t)?d.innerHTML=t:d.appendChild(t),(0,s.$$)("*",d).forEach(t=>{let o=t.parentNode;if(!o)return;if(u&&n.Dom.isTag(t,u)){let o=t.nodeName.toLowerCase(),r=n.Dom.isTag(t,c)?`%%%jodit-single-${o}%%%`:`%%%jodit-${o}%%%${e(t.innerHTML,i,u)}%%%/jodit-${o}%%%`;n.Dom.before(t,i.createTextNode(r)),n.Dom.safeRemove(t);return}if(n.Dom.isTag(t,l))return void n.Dom.safeRemove(t);if(!n.Dom.isTag(t,a))return;let r=t.nextSibling;!(n.Dom.isText(r)&&/^\s/.test(r.nodeValue||""))&&r&&o.insertBefore(i.createTextNode(" "),r)}),(0,r.trim)(d.innerText).replace(/%%%(\/)?jodit(-single)?-([\w\n]+)%%%/g,(e,t,i,n)=>`<${t?"/":""}${n}>`)}}});var n=i(23211),o=i(85932),r=i(4040),s=i(93640);let a=new Set(["div","p","br","h1","h2","h3","h4","h5","h6","hr"]),l=new Set(["script","style"]),c=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 n.asArray},camelCase:function(){return u.camelCase},cleanFromWord:function(){return a.cleanFromWord},clearTimeout:function(){return o.clearTimeout},colorToHex:function(){return s.colorToHex},fuzzySearchIndex:function(){return u.fuzzySearchIndex},getContentWidth:function(){return c.getContentWidth},getScrollParent:function(){return c.getScrollParent},hasBrowserColorPicker:function(){return r.hasBrowserColorPicker},hasContainer:function(){return r.hasContainer},htmlspecialchars:function(){return a.htmlspecialchars},i18n:function(){return u.i18n},innerWidth:function(){return c.innerWidth},isAbortError:function(){return r.isAbortError},isArray:function(){return r.isArray},isBoolean:function(){return r.isBoolean},isDestructable:function(){return r.isDestructable},isEqual:function(){return r.isEqual},isFastEqual:function(){return r.isFastEqual},isFunction:function(){return r.isFunction},isHTML:function(){return r.isHTML},isHtmlFromWord:function(){return r.isHtmlFromWord},isInitable:function(){return r.isInitable},isInt:function(){return r.isInt},isJoditObject:function(){return r.isJoditObject},isLicense:function(){return r.isLicense},isMarker:function(){return r.isMarker},isNativeFunction:function(){return r.isNativeFunction},isNumber:function(){return r.isNumber},isNumeric:function(){return r.isNumeric},isPlainObject:function(){return r.isPlainObject},isPromise:function(){return r.isPromise},isSet:function(){return r.isSet},isString:function(){return r.isString},isStringArray:function(){return r.isStringArray},isURL:function(){return r.isURL},isValidName:function(){return r.isValidName},isViewObject:function(){return r.isViewObject},isVoid:function(){return r.isVoid},isWindow:function(){return r.isWindow},kebabCase:function(){return 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 o.setTimeout},size:function(){return c.size},splitArray:function(){return n.splitArray},sprintf:function(){return u.sprintf},stringify:function(){return u.stringify},stripTags:function(){return a.stripTags},toArray:function(){return n.toArray},trim:function(){return u.trim},trimChars:function(){return u.trimChars},trimInv:function(){return u.trimInv},ucfirst:function(){return u.ucfirst}});var n=i(45664),o=i(61077),r=i(28686),s=i(7018),a=i(82658),l=i(97022),c=i(86878),u=i(97642),d=i(93640),h={};for(var p in d)0>["default","asArray","splitArray","toArray","clearTimeout","setTimeout","hasBrowserColorPicker","hasContainer","isAbortError","isArray","isBoolean","isDestructable","isEqual","isFastEqual","isFunction","isHTML","isHtmlFromWord","isInitable","isInt","isJoditObject","isLicense","isMarker","isNativeFunction","isNumber","isNumeric","isPlainObject","isPromise","isSet","isString","isStringArray","isURL","isValidName","isViewObject","isVoid","isWindow","colorToHex","applyStyles","cleanFromWord","htmlspecialchars","nl2br","safeHTML","sanitizeHTMLElement","stripTags","NUMBER_FIELDS_REG","normalizeColor","normalizeCssNumericValue","normalizeCssValue","normalizeKeyAliases","normalizeLicense","normalizePath","normalizeRelativePath","normalizeSize","normalizeUrl","getContentWidth","getScrollParent","innerWidth","offset","position","size","CamelCaseToKebabCase","camelCase","fuzzySearchIndex","i18n","kebabCase","sprintf","stringify","trim","trimChars","trimInv","ucfirst"].indexOf(p)&&(h[p]=(function(e){return d[e]}).bind(0,p));i.d(t,h)},97022:function(e,t,i){"use strict";i.d(t,{NUMBER_FIELDS_REG:function(){return o.NUMBER_FIELDS_REG},normalizeColor:function(){return n.normalizeColor},normalizeCssNumericValue:function(){return o.normalizeCssNumericValue},normalizeCssValue:function(){return o.normalizeCssValue},normalizeKeyAliases:function(){return r.normalizeKeyAliases},normalizeLicense:function(){return s.normalizeLicense},normalizePath:function(){return a.normalizePath},normalizeRelativePath:function(){return l.normalizeRelativePath},normalizeSize:function(){return c.normalizeSize},normalizeUrl:function(){return u.normalizeUrl}});var n=i(77367),o=i(19147),r=i(27978),s=i(49663),a=i(18377),l=i(96340),c=i(98831),u=i(48009)},77367:function(e,t,i){"use strict";i.d(t,{normalizeColor:function(){return r}});var n=i(93387),o=i(4040);let r=e=>{let t=["#"],i=(0,n.colorToHex)(e);if(!i)return!1;if(3===(i=(i=(0,o.trim)(i.toUpperCase())).substring(1)).length){for(let e=0;e<3;e+=1)t.push(i[e]),t.push(i[e]);return t.join("")}return i.length>6&&(i=i.slice(0,6)),"#"+i}},19147:function(e,t,i){"use strict";i.d(t,{NUMBER_FIELDS_REG:function(){return a},normalizeCssNumericValue:function(){return l},normalizeCssValue:function(){return c}});var n=i(70222),o=i(18303),r=i(93387),s=i(74264);let a=/^(left|top|bottom|right|width|min|max|height|margin|padding|fontsize|font-size)/i;function l(e,t){return!(0,o.isVoid)(t)&&a.test(e)&&(0,n.isNumeric)(t.toString())?parseInt(t.toString(),10)+"px":t}function c(e,t){if("font-weight"===(0,s.kebabCase)(e)){switch(t.toString().toLowerCase()){case"700":case"bold":return 700;case"400":case"normal":return 400;case"900":case"heavy":return 900}return(0,n.isNumeric)(t)?Number(t):t}return/color/i.test(e)&&/^rgb/i.test(t.toString())&&(0,r.colorToHex)(t.toString())||t}},27978:function(e,t,i){"use strict";i.d(t,{normalizeKeyAliases:function(){return r}});var n=i(81937),o=i(4040);function r(e){let t={},i={meta:1,ctrl:2,control:2,alt:3,shift:4,space:5};return e.replace(/\+\+/g,"+add").split(/[\s]*\+[\s]*/).map(e=>(0,o.trim)(e.toLowerCase())).map(e=>n.KEY_ALIASES[e]||e).sort((e,t)=>i[e]&&!i[t]?-1:!i[e]&&i[t]?1:i[e]&&i[t]?i[e]-i[t]:e>t?1:-1).filter(e=>!t[e]&&""!==e&&(t[e]=!0)).join("+")}},49663:function(e,t,i){"use strict";i.d(t,{normalizeLicense:function(){return n}});let n=(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";i.d(t,{normalizePath:function(){return o}});var n=i(4040);let o=(...e)=>e.filter(e=>(0,n.trim)(e).length).map((t,i)=>(t=t.replace(/([^:])[\\/]+/g,"$1/"),i&&(t=t.replace(/^\//,"")),i!==e.length-1&&(t=t.replace(/\/$/,"")),t)).join("/")},96340:function(e,t,i){"use strict";i.d(t,{normalizeRelativePath:function(){return n}});let n=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:function(){return n}});let n=(e,t)=>/^[0-9]+$/.test(e.toString())?e+t:e.toString()},48009:function(e,t,i){"use strict";i.d(t,{normalizeUrl:function(){return n}});let n=(...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:function(){return n}});let n=(e,t)=>{let i=t.getComputedStyle(e);return e.offsetWidth-parseInt(i.getPropertyValue("padding-left")||"0",10)-parseInt(i.getPropertyValue("padding-right")||"0",10)}},34027:function(e,t,i){"use strict";i.d(t,{getScrollParent:function(){return function e(t){if(!t)return null;let i=o.Dom.isHTMLElement(t),s=i&&(0,r.css)(t,"overflowY");return i&&"visible"!==s&&"hidden"!==s&&t.scrollHeight>=t.clientHeight?t:e(t.parentNode)||n.globalDocument.scrollingElement||n.globalDocument.body}}});var n=i(81937),o=i(23211),r=i(93640)},86878:function(e,t,i){"use strict";i.d(t,{getContentWidth:function(){return n.getContentWidth},getScrollParent:function(){return o.getScrollParent},innerWidth:function(){return r.innerWidth},offset:function(){return a.offset},position:function(){return l.position},size:function(){return s.size}});var n=i(54447),o=i(34027),r=i(83215),s=i(18073),a=i(69143),l=i(23599)},83215:function(e,t,i){"use strict";i.d(t,{innerWidth:function(){return n}});let n=(e,t)=>{let i=t.getComputedStyle(e);return e.clientWidth-(parseFloat(i.paddingLeft||"0")+parseFloat(i.paddingRight||"0"))}},18073:function(e,t,i){"use strict";i.d(t,{size:function(){return o}});var n=i(28686);function o(e){return(0,n.isString)(e)||(0,n.isArray)(e)?e.length:(0,n.isPlainObject)(e)?Object.keys(e).length:0}},69143:function(e,t,i){"use strict";i.d(t,{offset:function(){return n}});let n=(e,t,i,o=!1)=>{let r,s,a;try{r=e.getBoundingClientRect()}catch(e){r={top:0,bottom:0,left:0,right:0,width:0,height:0}}let l=i.body,c=i.documentElement||{clientTop:0,clientLeft:0,scrollTop:0,scrollLeft:0},u=i.defaultView||i.parentWindow,d=u.pageYOffset||c.scrollTop||l.scrollTop,h=u.pageXOffset||c.scrollLeft||l.scrollLeft,p=c.clientTop||l.clientTop||0,m=c.clientLeft||l.clientLeft||0,f=t.iframe;if(!o&&t&&t.options&&t.o.iframe&&f){let{top:e,left:i}=n(f,t,t.od,!0);s=r.top+e,a=r.left+i}else s=r.top+d-p,a=r.left+h-m;return{top:Math.round(s),left:Math.round(a),width:r.width,height:r.height}}},23599:function(e,t,i){"use strict";i.d(t,{position:function(){return function e(t,i,o=!1){let r=t.getBoundingClientRect(),s=r.left,a=r.top;if((0,n.isJoditObject)(i)&&i.iframe&&i.ed.body.contains(t)&&!o){let{left:t,top:n}=e(i.iframe,i,!0);s+=t,a+=n}return{left:Math.round(s),top:Math.round(a),width:Math.round(t.offsetWidth??r.width),height:Math.round(t.offsetHeight??r.height)}}}});var n=i(24497)},57821:function(e,t,i){"use strict";i.d(t,{camelCase:function(){return n}});let n=e=>e.replace(/([-_])(.)/g,(e,t,i)=>i.toUpperCase())},57626:function(e,t,i){"use strict";i.d(t,{fuzzySearchIndex:function(){return o}});var n=i(81937);function o(e,t,i=0,r=1){let s=0,a=0,l=-1,c=0,u=0;for(a=i;s<e.length&&a<t.length;)e[s].toLowerCase()===t[a].toLowerCase()?(s++,c++,u=0,-1===l&&(l=a)):s>0&&(u>=r&&t[a]!==n.INVISIBLE_SPACE?(s=0,l=-1,c=0,u=0,a--):(u++,c++)),a++;return s===e.length?[l,c]:[-1,0]}},18080:function(e,t,i){"use strict";i.d(t,{i18n:function(){return c},sprintf:function(){return l}});var n=i(81937),o=i(85932),r=i(99436),s=i(93640),a=i(5266);let l=(e,t)=>{if(!t||!t.length)return e;let i=/%([sd])/g,n=i.exec(e),o=e,r=0;for(;n&&void 0!==t[r];)o=o.replace(n[0],t[r].toString()),r+=1,n=i.exec(e);return o};function c(e,t,i){if(!(0,o.isString)(e))throw(0,s.error)("i18n: Need string in first argument");if(!e.length)return e;let c=!!i?.debugLanguage,u={},d=e=>t&&t.length?l(e,t):e,h=(0,s.defaultLanguage)(a.Config.defaultOptions.language,a.Config.defaultOptions.language),p=(0,s.defaultLanguage)(i?.language,h),m=t=>{if(!t)return;if((0,o.isString)(t[e]))return d(t[e]);let i=e.toLowerCase();if((0,o.isString)(t[i]))return d(t[i]);let n=(0,r.ucfirst)(e);if((0,o.isString)(t[n]))return d(t[n])};void 0!==n.lang[p]?u=n.lang[p]:c||(u=void 0!==n.lang[h]?n.lang[h]:n.lang.en);let f=i?.i18n;if(f&&f[p]){let e=m(f[p]);if(e)return e}return m(u)||(!c&&n.lang.en&&(0,o.isString)(n.lang.en[e])&&n.lang.en[e]?d(n.lang.en[e]):c?"{"+e+"}":(n.IS_PROD,d(e)))}},97642:function(e,t,i){"use strict";i.d(t,{CamelCaseToKebabCase:function(){return s.CamelCaseToKebabCase},camelCase:function(){return n.camelCase},fuzzySearchIndex:function(){return o.fuzzySearchIndex},i18n:function(){return r.i18n},kebabCase:function(){return s.kebabCase},sprintf:function(){return r.sprintf},stringify:function(){return a.stringify},trim:function(){return l.trim},trimChars:function(){return l.trimChars},trimInv:function(){return l.trimInv},ucfirst:function(){return c.ucfirst}});var n=i(57821),o=i(57626),r=i(18080),s=i(74264),a=i(3347),l=i(4040),c=i(99436)},74264:function(e,t,i){"use strict";i.d(t,{CamelCaseToKebabCase:function(){return o},kebabCase:function(){return n}});let n=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(),o=e=>e.replace(/([A-Z])([A-Z])([a-z])/g,"$1-$2$3").replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()},3347:function(e,t,i){"use strict";function n(e,t={}){if("object"!=typeof e)return e+"";let i=new Set(t.excludeKeys),o=new WeakMap;return JSON.stringify(e,(e,t)=>{if(!i.has(e)){if("object"==typeof t&&null!=t){if(o.get(t))return"[refObject]";o.set(t,!0)}return t}},t.prettify)}i.d(t,{stringify:function(){return n}})},4040:function(e,t,i){"use strict";i.d(t,{trim:function(){return o},trimChars:function(){return r},trimInv:function(){return s}});var n=i(81937);function o(e){return e.replace((0,n.SPACE_REG_EXP_END)(),"").replace((0,n.SPACE_REG_EXP_START)(),"")}function r(e,t){return e.replace(RegExp(`[${t}]+$`),"").replace(RegExp(`^[${t}]+`),"")}function s(e){return e.replace((0,n.INVISIBLE_SPACE_REG_EXP_END)(),"").replace((0,n.INVISIBLE_SPACE_REG_EXP_START)(),"")}},99436:function(e,t,i){"use strict";function n(e){return e.length?e[0].toUpperCase()+e.substring(1):""}i.d(t,{ucfirst:function(){return n}})},16849:function(e,t,i){"use strict";i.d(t,{alignElement:function(){return a},clearAlign:function(){return s},hAlignElement:function(){return r}});var n=i(27795),o=i(80991);function r(e,t){t&&"normal"!==t?"center"!==t?((0,o.css)(e,"float",t),(0,o.clearCenterAlign)(e)):(0,o.css)(e,{float:"",display:"block",marginLeft:"auto",marginRight:"auto"}):((0,o.css)(e,"float")&&-1!==["right","left"].indexOf((0,o.css)(e,"float").toString().toLowerCase())&&(0,o.css)(e,"float",""),(0,o.clearCenterAlign)(e))}function s(e){n.Dom.each(e,e=>{n.Dom.isHTMLElement(e)&&e.style.textAlign&&(e.style.textAlign="",e.style.cssText.trim().length||e.removeAttribute("style"))})}function a(e,t){if(n.Dom.isNode(t)&&n.Dom.isElement(t))switch(s(t),e.toLowerCase()){case"justifyfull":t.style.textAlign="justify";break;case"justifyright":t.style.textAlign="right";break;case"justifyleft":t.style.textAlign="left";break;case"justifycenter":t.style.textAlign="center"}}},47760:function(e,t,i){"use strict";i.d(t,{alreadyLoadedList:function(){return r},appendScriptAsync:function(){return a},appendStyleAsync:function(){return l},loadNext:function(){return function e(t,i,o=0){return(0,n.isString)(i[o])?a(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])?l(t,i[o]).then(()=>e(t,i,o+1)):Promise.resolve()}}});var n=i(85932),o=i(91321);let r=new Map,s=e=>(t,i)=>{if(r.has(i))return r.get(i);let n=e(t,i);return r.set(i,n),n},a=s((e,t)=>e.async.promise((i,n)=>{if(e.isInDestruct)return n();let r=e.c.element("script",{type:"text/javascript",crossorigin:"anonymous",referrerpolicy:"no-referrer",async:!0,src:(0,o.completeUrl)(t)});e.e.one(r,"error",n).one(r,"load",i),e.od.body.appendChild(r)})),l=s((e,t)=>e.async.promise((i,n)=>{if(e.isInDestruct)return n();let r=e.c.element("link");r.rel="stylesheet",r.media="all",r.crossOrigin="anonymous",e.isInDestruct||e.e.on(r,"load",()=>i(r)).on(r,"error",n),r.href=(0,o.completeUrl)(t),e.o.shadowRoot?e.o.shadowRoot.appendChild(r):e.od.body.appendChild(r)}))},7909:function(e,t,i){"use strict";i.d(t,{attr:function(){return function e(t,i,l){if(!t||!(0,n.isFunction)(t.getAttribute))return null;if(!(0,r.isString)(i))return Object.keys(i).forEach(n=>{let r=i[n];(0,o.isPlainObject)(r)&&"style"===n?(0,a.css)(t,r):("className"===n&&(n="class"),e(t,n,r))}),null;let c=(0,s.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)}}});var n=i(91565),o=i(62101),r=i(85932),s=i(74264),a=i(80991)},26136:function(e,t,i){"use strict";i.d(t,{browser:function(){return n}});let n=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";i.d(t,{buildQuery:function(){return o}});var n=i(62101);let o=(e,t)=>{let i=[],r=encodeURIComponent;for(let s in e)if(Object.prototype.hasOwnProperty.call(e,s)){let a=t?t+"["+s+"]":s,l=e[s];i.push((0,n.isPlainObject)(l)?o(l,a):r(a)+"="+r(l))}return i.join("&")}},91321:function(e,t,i){"use strict";i.d(t,{completeUrl:function(){return o}});var n=i(81937);let o=e=>("file:"===n.globalWindow.location.protocol&&/^\/\//.test(e)&&(e="https:"+e),e)},77483:function(e,t,i){"use strict";i.d(t,{ConfigDeepFlatten:function(){return function e(t){return(0,c.keys)(t,!1).reduce((i,n)=>(i[n]=(0,o.isPlainObject)(t[n])?e(t[n]):t[n],i),{})}},ConfigFlatten:function(){return u},ConfigProto:function(){return function e(t,i,c=0){if(Object.getPrototypeOf(t)!==Object.prototype)return t;let u=a.Config.defaultOptions;if((0,r.isString)(t.preset)){if(void 0!==u.presets[t.preset]){let e=u.presets[t.preset];Object.keys(e).forEach(i=>{(0,s.isVoid)(t[i])&&(t[i]=e[i])})}delete t.preset}let d={};return Object.keys(t).forEach(r=>{let s=t[r],a=i?i[r]:null;if((0,o.isPlainObject)(s)&&(0,o.isPlainObject)(a)&&!(0,l.isAtom)(s)){d[r]=e(s,a,c+1);return}if(0!==c&&(0,n.isArray)(s)&&!(0,l.isAtom)(s)&&(0,n.isArray)(a)){d[r]=[...s,...a.slice(s.length)];return}d[r]=s}),Object.setPrototypeOf(d,i),d}}});var n=i(17312),o=i(62101),r=i(85932),s=i(18303),a=i(5266),l=i(54794),c=i(71125);function u(e){return(0,c.keys)(e,!1).reduce((t,i)=>(t[i]=e[i],t),{})}},3856:function(e,t,i){"use strict";i.d(t,{convertMediaUrlToVideoEmbed:function(){return s}});var n=i(81937),o=i(91764),r=i(36310);let s=(e,{width:t=400,height:i=345}={})=>{if(!(0,o.isURL)(e))return e;let s=n.globalDocument.createElement("a"),a=/(?:http?s?:\/\/)?(?:www\.)?(?:vimeo\.com)\/?(.+)/g;s.href=e,t||(t=400),i||(i=345);let l=s.protocol||"";switch(s.hostname){case"www.vimeo.com":case"vimeo.com":return a.test(e)?e.replace(a,'<iframe width="'+t+'" height="'+i+'" src="'+l+'//player.vimeo.com/video/$1" frameborder="0" allowfullscreen></iframe>'):e;case"youtube.com":case"www.youtube.com":case"youtu.be":case"www.youtu.be":{let n=s.search?(0,r.parseQuery)(s.search):{v:s.pathname.substring(1)};return/^embed\/.*/.test(n.v)&&(n.v=n.v.substring(6)),n.v?'<iframe width="'+t+'" height="'+i+'" src="'+l+"//www.youtube.com/embed/"+n.v+'" frameborder="0" allowfullscreen></iframe>':e}}return e}},80991:function(e,t,i){"use strict";i.d(t,{clearCenterAlign:function(){return c},css:function(){return l}});var n=i(22289),o=i(62101),r=i(19147),s=i(57821),a=i(74264);function l(e,t,i,c=!1){if((0,n.isBoolean)(i)&&(c=i,i=void 0),(0,o.isPlainObject)(t)||void 0!==i){let n=(e,t,i)=>{void 0!==(i=(0,r.normalizeCssNumericValue)(t,i))&&(null==i||l(e,t,!0)!==(0,r.normalizeCssValue)(t,i))&&(e.style[t]=i)};if((0,o.isPlainObject)(t)){let i=Object.keys(t);for(let o=0;o<i.length;o+=1)n(e,(0,s.camelCase)(i[o]),t[i[o]])}else n(e,(0,s.camelCase)(t),i);return""}let u=(0,a.kebabCase)(t),d=e.ownerDocument||document,h=!!d&&(d.defaultView||d.parentWindow),p=e.style[t],m="";return void 0!==p&&""!==p?m=p:h&&!c&&(m=h.getComputedStyle(e).getPropertyValue(u)),r.NUMBER_FIELDS_REG.test(t)&&/^[-+]?[0-9.]+px$/.test(m.toString())&&(m=parseInt(m.toString(),10)),(0,r.normalizeCssValue)(t,m)}let c=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:function(){return n}});let n=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";i.d(t,{dataBind:function(){return r}});var n=i(31534);let o=new WeakMap,r=(e,t,i)=>{let r=o.get(e);if(!r){r={},o.set(e,r);let t=null;(0,n.isViewObject)(e.j)&&(t=e.j.e),(0,n.isViewObject)(e)&&(t=e.e),t&&t.on("beforeDestruct",()=>{o.delete(e)})}return void 0===i?r[t]:(r[t]=i,i)}},97228:function(e,t,i){"use strict";i.d(t,{defaultLanguage:function(){return r}});var n=i(81937),o=i(85932);let r=(e,t="en")=>"auto"!==e&&(0,o.isString)(e)?e:n.globalDocument.documentElement&&n.globalDocument.documentElement.lang?n.globalDocument.documentElement.lang:navigator.language?navigator.language.substring(0,2):t},38027:function(e,t,i){"use strict";i.d(t,{connection:function(){return r},error:function(){return o},options:function(){return s}});var n=i(29953);function o(e){return TypeError(e)}function r(e){return new n.ConnectionError(e)}function s(e){return new n.OptionsError(e)}},14228:function(e,t,i){"use strict";function n(e="Aborted"){return new DOMException(e,"AbortError")}i.d(t,{abort:function(){return n}})},58250:function(e,t,i){"use strict";i.d(t,{ConnectionError:function(){return n}});class n extends Error{constructor(e){super(e),Object.setPrototypeOf(this,n.prototype)}}},29953:function(e,t,i){"use strict";i.d(t,{ConnectionError:function(){return o.ConnectionError},OptionsError:function(){return r.OptionsError},abort:function(){return n.abort}});var n=i(14228),o=i(58250),r=i(11080)},11080:function(e,t,i){"use strict";i.d(t,{OptionsError:function(){return n}});class n extends TypeError{constructor(e){super(e),Object.setPrototypeOf(this,n.prototype)}}},33201:function(e,t,i){"use strict";i.d(t,{ConnectionError:function(){return o.ConnectionError},OptionsError:function(){return o.OptionsError},abort:function(){return o.abort},connection:function(){return n.connection},error:function(){return n.error},options:function(){return n.options}});var n=i(38027),o=i(29953)},54794:function(e,t,i){"use strict";i.d(t,{fastClone:function(){return s},isAtom:function(){return o},markAsAtomic:function(){return r}});var n=i(3347);function o(e){return e&&e.isAtom}function r(e){return Object.defineProperty(e,"isAtom",{enumerable:!1,value:!0,configurable:!1}),e}function s(e){return JSON.parse((0,n.stringify)(e))}},421:function(e,t,i){"use strict";i.d(t,{getClassName:function(){return r},keepNames:function(){return o}});var n=i(91565);let o=new Map,r=e=>{if((0,n.isFunction)(e.className))return e.className();let t=e.constructor?.originalConstructor||e.constructor;if(o.has(t))return o.get(t);if(t.name)return t.name;let i=new RegExp(/^\s*function\s*(\S*)\s*\(/),r=t.toString().match(i);return r?r[1]:""}},89308:function(e,t,i){"use strict";i.d(t,{get:function(){return r}});var n=i(85932),o=i(18303);function r(e,t){if(!(0,n.isString)(e)||!e.length)return null;let i=e.split("."),r=t;try{for(let e of i){if((0,o.isVoid)(r[e]))return null;r=r[e]}}catch{return null}return(0,o.isVoid)(r)?null:r}},37427:function(e,t,i){"use strict";i.d(t,{humanSizeToBytes:function(){return n}});let n=e=>{if(/^[0-9.]+$/.test(e.toString()))return parseFloat(e);let t=e.substr(-2,2).toUpperCase(),i=["KB","MB","GB","TB"],n=parseFloat(e.substr(0,e.length-2));return -1!==i.indexOf(t)?n*Math.pow(1024,i.indexOf(t)+1):parseInt(e,10)}},93640:function(e,t,i){"use strict";i.r(t),i.d(t,{$$:function(){return x.$$},ConfigDeepFlatten:function(){return h.ConfigDeepFlatten},ConfigFlatten:function(){return h.ConfigFlatten},ConfigProto:function(){return h.ConfigProto},ConnectionError:function(){return v.ConnectionError},LimitedStack:function(){return j.LimitedStack},OptionsError:function(){return v.OptionsError},abort:function(){return v.abort},alignElement:function(){return n.alignElement},alreadyLoadedList:function(){return o.alreadyLoadedList},appendScriptAsync:function(){return o.appendScriptAsync},appendStyleAsync:function(){return o.appendStyleAsync},attr:function(){return l.attr},browser:function(){return c.browser},buildQuery:function(){return u.buildQuery},call:function(){return z.call},callPromise:function(){return z.callPromise},callThis:function(){return z.callThis},clearAlign:function(){return n.clearAlign},clearCenterAlign:function(){return m.clearCenterAlign},cns:function(){return C.cns},completeUrl:function(){return d.completeUrl},connection:function(){return v.connection},convertMediaUrlToVideoEmbed:function(){return p.convertMediaUrlToVideoEmbed},css:function(){return m.css},cssPath:function(){return x.cssPath},ctrlKey:function(){return f.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 S.getClassName},getDataTransfer:function(){return z.getDataTransfer},getPropertyDescriptor:function(){return z.getPropertyDescriptor},getXPathByElement:function(){return x.getXPathByElement},hAlignElement:function(){return n.hAlignElement},humanSizeToBytes:function(){return w.humanSizeToBytes},inView:function(){return T.inView},isAtom:function(){return b.isAtom},keepNames:function(){return S.keepNames},keys:function(){return z.keys},loadImage:function(){return z.loadImage},loadNext:function(){return o.loadNext},loadNextStyle:function(){return o.loadNextStyle},markAsAtomic:function(){return b.markAsAtomic},markDeprecated:function(){return C.markDeprecated},markOwner:function(){return z.markOwner},memorizeExec:function(){return z.memorizeExec},options:function(){return v.options},parseQuery:function(){return k.parseQuery},previewBox:function(){return E.previewBox},refs:function(){return x.refs},reset:function(){return I.reset},resolveElement:function(){return x.resolveElement},scrollIntoViewIfNeeded:function(){return T.scrollIntoViewIfNeeded},set:function(){return D.set}});var n=i(16849),o=i(47760),r=i(28712),s={};for(var a in r)0>["default","alignElement","clearAlign","hAlignElement","alreadyLoadedList","appendScriptAsync","appendStyleAsync","loadNext","loadNextStyle"].indexOf(a)&&(s[a]=(function(e){return r[e]}).bind(0,a));i.d(t,s);var l=i(7909),c=i(26136),u=i(36833),d=i(91321),h=i(77483),p=i(3856),m=i(80991),f=i(77213),g=i(36400),_=i(97228),v=i(33201),b=i(54794),y=i(89308),S=i(421),w=i(37427),C=i(49385),k=i(36310),E=i(57075),I=i(43379),T=i(60898),x=i(28723),D=i(52144),j=i(42820),z=i(71125)},49385:function(e,t,i){"use strict";i.d(t,{cns:function(){return n},markDeprecated:function(){return o}});let n=console;function o(e,t=[""],i=null){return(...o)=>(n.warn(`Method "${t[0]}" deprecated.`+(t[1]?` Use "${t[1]}" instead`:"")),e.call(i,...o))}},36310:function(e,t,i){"use strict";i.d(t,{parseQuery:function(){return n}});let n=e=>{let t={},i=e.substring(1).split("&");for(let e=0;e<i.length;e+=1){let n=i[e].split("=");t[decodeURIComponent(n[0])]=decodeURIComponent(n[1]||"")}return t}},57075:function(e,t,i){"use strict";i.d(t,{previewBox:function(){return l}});var n=i(23211),o=i(85932),r=i(7909),s=i(80991),a=i(28723);function l(e,t,i="px",c=null){let u=[],d=function(e,t){let i=[];try{(0,a.$$)("img",e.editor).forEach(o=>{let s=[(0,r.attr)(o,"width"),(0,r.attr)(o,"height"),o.src];(0,r.attr)(o,{width:o.offsetWidth+t,height:o.offsetHeight+t});let a=e.createInside.a();e.ed.body.appendChild(a),a.href=o.src,o.src=a.href,n.Dom.safeRemove(a),i.push(()=>{o.src=s[2]??"",(0,r.attr)(o,{width:s[0]||null,height:s[1]||null})})})}catch(e){throw i.forEach(e=>e()),i.length=0,e}return i}(e,i);try{let a=e.e.fire("beforePreviewBox",t,i);if(null!=a)return a;let l=e.c.div("jodit__preview-box jodit-context");c&&c.appendChild(l),(0,s.css)(l,{position:"relative",padding:16});let d=e.value||`<div style='position: absolute;left:50%;top:50%;transform: translateX(-50%) translateY(-50%);color:#ccc;'>${e.i18n("Empty")}</div>`;if(e.iframe){let t=e.create.element("iframe");(0,s.css)(t,{minWidth:800,minHeight:600,border:0}),l.appendChild(t);let i=t.contentWindow;if(i&&(e.e.fire("generateDocumentStructure.iframe",i.document,e),l=i.document.body,"function"==typeof ResizeObserver)){let n=!1,o=i.document.body,r=new ResizeObserver(e.async.debounce(()=>{r.unobserve(o),t.style.height=`${o.offsetHeight+20}px`,e.async.requestAnimationFrame(()=>{n||r.observe(o)})},100)),s=()=>{n=!0,r.unobserve(o),r.disconnect(),e.e.off("beforeDestruct",s)};u.push(s),e.e.on("beforeDestruct",s)}}else(0,s.css)(l,{minWidth:1024,minHeight:600,border:0});let h=(t,i)=>{let s=(0,o.isString)(i)?e.c.div():i;(0,o.isString)(i)&&(s.innerHTML=i);for(let e=0;e<s.childNodes.length;e+=1){let i=s.childNodes[e];if(n.Dom.isElement(i)){let e=t.ownerDocument.createElement(i.nodeName);for(let t=0;t<i.attributes.length;t+=1)(0,r.attr)(e,i.attributes[t].nodeName,i.attributes[t].nodeValue);0===i.childNodes.length||n.Dom.isTag(i,"table")?"SCRIPT"===i.nodeName?i.textContent&&(e.textContent=i.textContent):i.innerHTML&&(e.innerHTML=i.innerHTML):h(e,i);try{t.appendChild(e)}catch{}}else try{t.appendChild(i.cloneNode(!0))}catch{}}};return h(l,d),e.e.fire("afterPreviewBox",l),[l,()=>{u.forEach(e=>e())}]}finally{d.forEach(e=>e())}}},43379:function(e,t,i){"use strict";i.d(t,{reset:function(){return a}});var n=i(81937),o=i(91565),r=i(89308);let s={};function a(e){if(!(e in s)){let t=n.globalDocument.createElement("iframe");try{if(t.src="about:blank",n.globalDocument.body.appendChild(t),!t.contentWindow)return null;let i=(0,r.get)(e,t.contentWindow),a=(0,r.get)(e.split(".").slice(0,-1).join("."),t.contentWindow);(0,o.isFunction)(i)&&(s[e]=i.bind(a))}catch(e){if(!n.IS_PROD)throw e}finally{t.parentNode?.removeChild(t)}}return s[e]??null}},60898:function(e,t,i){"use strict";i.d(t,{inView:function(){return o},scrollIntoViewIfNeeded:function(){return r}});var n=i(23211);function o(e,t,i){let n=e.getBoundingClientRect(),o=e,r=n.top,s=n.height;for(;o&&o!==t&&o.parentNode;)if(!(r<=(n=(o=o.parentNode).getBoundingClientRect()).bottom)||r+s<=n.top)return!1;return r<=(i.documentElement&&i.documentElement.clientHeight||0)}function r(e,t,i){n.Dom.isHTMLElement(e)&&!o(e,t,i)&&(t.clientHeight!==t.scrollHeight&&(t.scrollTop=e.offsetTop),o(e,t,i)||e.scrollIntoView())}},28723:function(e,t,i){"use strict";i.d(t,{$$:function(){return d},cssPath:function(){return m},getXPathByElement:function(){return h},refs:function(){return p},resolveElement:function(){return f}});var n=i(81937),o=i(23211),r=i(88475),s=i(85932),a=i(57821),l=i(7909),c=i(33201);let u=1;function d(e,t){let i;if(!n.IS_ES_NEXT&&/:scope/.test(e)&&n.IS_IE&&!(t&&t.nodeType===Node.DOCUMENT_NODE)){let n=t.id,o=n||"_selector_id_"+(Math.random()+"").slice(2)+ ++u;e=e.replace(/:scope/g,"#"+o),n||t.setAttribute("id",o),i=t.parentNode.querySelectorAll(e),n||t.removeAttribute("id")}else i=t.querySelectorAll(e);return[].slice.call(i)}let h=(e,t)=>{if(!e||e.nodeType!==Node.ELEMENT_NODE||!e.parentNode||t===e)return"";if(e.id)return"//*[@id='"+e.id+"']";let i=[].filter.call(e.parentNode.childNodes,t=>t.nodeName===e.nodeName);return h(e.parentNode,t)+"/"+e.nodeName.toLowerCase()+(i.length>1?"["+((0,r.toArray)(i).indexOf(e)+1)+"]":"")},p=e=>("container"in e&&(e=e.container),d("[ref],[data-ref]",e).reduce((e,t)=>{let i=(0,l.attr)(t,"-ref");return i&&(0,s.isString)(i)&&(e[(0,a.camelCase)(i)]=t,e[i]=t),e},{})),m=e=>{if(!o.Dom.isElement(e))return null;let t=[],i=e;for(;i&&i.nodeType===Node.ELEMENT_NODE;){let e=i.nodeName.toLowerCase();if(i.id){e+="#"+i.id,t.unshift(e);break}{let t=i,n=1;do(t=t.previousElementSibling)&&t.nodeName.toLowerCase()===e&&n++;while(t)e+=":nth-of-type("+n+")"}t.unshift(e),i=i.parentNode}return t.join(" > ")};function f(e,t){let i=e;if((0,s.isString)(e))try{i=t.querySelector(e)}catch{throw(0,c.error)('String "'+e+'" should be valid HTML selector')}if(!i||"object"!=typeof i||!o.Dom.isElement(i)||!i.cloneNode)throw(0,c.error)('Element "'+e+'" should be string or HTMLElement instance');return i}},52144:function(e,t,i){"use strict";i.d(t,{set:function(){return a}});var n=i(17312),o=i(70222),r=i(62101),s=i(85932);function a(e,t,i){if(!(0,s.isString)(e)||!e.length)return;let a=e.split("."),l=i,c=a[0];for(let e=0;e<a.length-1;e+=1)c=a[e],(0,n.isArray)(l[c])||(0,r.isPlainObject)(l[c])||(l[c]=(0,o.isNumeric)(a[e+1])?[]:{}),l=l[c];l&&(l[a[a.length-1]]=t)}},42820:function(e,t,i){"use strict";i.d(t,{LimitedStack:function(){return o}});var n=i(25045);class o{push(e){return this.stack.push(e),this.stack.length>this.limit&&this.stack.shift(),this}pop(){return this.stack.pop()}find(e){return this.stack.find(e)}constructor(e){(0,n._)(this,"limit",void 0),(0,n._)(this,"stack",void 0),this.limit=e,this.stack=[]}}},71125:function(e,t,i){"use strict";i.d(t,{call:function(){return a},callPromise:function(){return u},callThis:function(){return l},getDataTransfer:function(){return m},getPropertyDescriptor:function(){return f},keys:function(){return h},loadImage:function(){return d},markOwner:function(){return c},memorizeExec:function(){return p}});var n=i(52100),o=i(18303),r=i(7909),s=i(36400);function a(e,...t){return e(...t)}function l(e,t,...i){return e.apply(t,i)}function c(e,t){(0,r.attr)(t,"data-editor_id",e.id),t.component||Object.defineProperty(t,"jodit",{value:e})}function u(e,t){return(0,n.isPromise)(e)?e.then(e=>e,()=>null).finally(t):t?.()}let d=(e,t)=>t.async.promise((i,n)=>{let o=new Image,r=()=>{t.e.off(o),n?.()},s=()=>{t.e.off(o),i(o)};t.e.one(o,"load",s).one(o,"error",r).one(o,"abort",r),o.src=e,o.complete&&s()}),h=(e,t=!0)=>{if(t)return Object.keys(e);let i=[];for(let t in e)i.push(t);return i},p=(e,t,{control:i},n)=>{let r="button"+i.command,a=(i.args&&i.args[0])??(0,s.dataBind)(e,r);if((0,o.isVoid)(a))return!1;(0,s.dataBind)(e,r,a),n&&(a=n(a)),e.execCommand(i.command,!1,a??void 0)},m=e=>{if(e.clipboardData)return e.clipboardData;try{return e.dataTransfer||new DataTransfer}catch{return null}};function f(e,t){let i;do i=Object.getOwnPropertyDescriptor(e,t),e=Object.getPrototypeOf(e);while(!i&&e)return i}},55810:function(e,t,i){"use strict";i.d(t,{init:function(){return s}});var n=i(81937),o=i(52433),r=i(3050);function s(e,t,i,s,a,l,c){if((0,o.isInitable)(s))try{s.init(e)}catch(e){if(!n.IS_PROD)throw e}a.set(t,s),l.delete(t),s.hasStyle&&(0,r.loadStyle)(e,t).catch(e=>{n.IS_PROD}),s.styles&&(c(e,t,"style").innerHTML=s.styles)}},3050:function(e,t,i){"use strict";i.d(t,{loadExtras:function(){return u},loadStyle:function(){return l}});var n=i(81937),o=i(74264),r=i(47760),s=i(86189);let a=new Set;async function l(e,t){let i=c(e,t,!1);if(!a.has(i))return a.add(i),(0,r.appendStyleAsync)(e,i)}function c(e,t,i){t=(0,o.kebabCase)(t);let n=e.minified?".min":"";return e.basePath+"plugins/"+t+"/"+t+n+"."+(i?"js":"css")}function u(e,t,i,o){try{let n=i.filter(t=>!e.has((0,s.normalizeName)(t.name)));n.length&&n.map(e=>{let i=e.url||c(t,e.name,!0);return(0,r.appendScriptAsync)(t,i).then(o).catch(()=>null)})}catch(e){if(!n.IS_PROD)throw e}}},25974:function(e,t,i){"use strict";i.d(t,{makeInstance:function(){return r}});var n=i(81937),o=i(91565);function r(e,t){try{try{return(0,o.isFunction)(t)?new t(e):t}catch(i){if((0,o.isFunction)(t)&&!t.prototype)return t(e)}}catch(e){if(!n.IS_PROD)throw e}return null}},86189:function(e,t,i){"use strict";i.d(t,{normalizeName:function(){return o}});var n=i(74264);function o(e){return(0,n.kebabCase)(e).toLowerCase()}},91206:function(e,t,i){"use strict";i.d(t,{Plugin:function(){return n.Plugin}});var n=i(18855);i(85305)},85305:function(e,t,i){"use strict";i.d(t,{PluginSystem:function(){return m}});var n=i(25045),o=i(81937),r=i(42689),s=i(32328),a=i(17312),l=i(52433),c=i(85932),u=i(55810),d=i(3050),h=i(25974),p=i(86189);class m{get size(){return this.__items.size}add(e,t){this.__items.set((0,p.normalizeName)(e),t),r.eventEmitter.fire(`plugin:${e}:ready`)}get(e){return this.__items.get((0,p.normalizeName)(e))}remove(e){this.__items.delete((0,p.normalizeName)(e))}__getFullPluginsList(e){let t=[];return this.__items.forEach((i,n)=>{(!e||e.has(n))&&t.push([n,i])}),t}__init(e){let{extraList:t,disableList:i,filter:n}={extraList:e.o.extraPlugins.map(e=>(0,c.isString)(e)?{name:e}:e),disableList:new Set((0,s.splitArray)(e.o.disablePlugins).map(p.normalizeName)),filter:e.o.safeMode?new Set(e.o.safePluginsList):null},r=new Map,m={},f=new Set;e.__plugins=m;let g=()=>{if(e.isInDestruct)return;let t=!1;this.__getFullPluginsList(n).forEach(([n,o])=>{if(i.has(n)||r.has(n))return;let s=o?.requires;if(s&&(0,a.isArray)(s)&&s.length){if(s.some(e=>i.has(e)))return;if(!s.every(e=>r.has(e)))return void f.add(n)}t=!0;let l=(0,h.makeInstance)(e,o);if(!l){r.set(n,null),f.delete(n);return}(0,u.init)(e,n,o,l,r,f,this.opts.getContainer),m[n]=l}),t&&(e.e.fire("updatePlugins"),g())};t&&t.length&&(0,d.loadExtras)(this.__items,e,t,g),g(),e.e.on("beforeDestruct",()=>{Object.keys(m).forEach(t=>{let i=m[t];(0,l.isDestructable)(i)&&i.destruct(e),delete m[t]}),delete e.__plugins}),o.IS_PROD||f.size}wait(e){return new Promise(t=>{if(this.get(e))return t();let i=()=>{t(),r.eventEmitter.off(`plugin:${e}:ready`,i)};r.eventEmitter.on(`plugin:${e}:ready`,i)})}constructor(e){(0,n._)(this,"opts",void 0),(0,n._)(this,"__items",void 0),this.opts=e,this.__items=new Map}}},18855:function(e,t,i){"use strict";i.d(t,{Plugin:function(){return l}});var n=i(25045),o=i(31635),r=i(16964),s=i(84839),a=i(24497);class l extends r.ViewComponent{className(){return"Plugin"}__afterPluginSystemInit(){let{j:e,buttons:t}=this;t&&(0,a.isJoditObject)(e)&&t.forEach(t=>{e.registerButton(t)})}__afterInit(){this.__inited=!0,this.setStatus(r.STATUSES.ready),this.afterInit(this.jodit)}init(e){this.jodit.isReady&&(this.afterInit(this.jodit),this.__afterPluginSystemInit(),this.jodit.e.fire("rebuildToolbar"))}__beforeDestruct(){if(this.isInDestruct)return;let{j:e}=this;if(e.e.off("afterPluginSystemInit",this.__afterPluginSystemInit).off("afterInit",this.__afterInit).off("beforeDestruct",this.destruct),this.setStatus(r.STATUSES.beforeDestruct),!this.__inited)return super.destruct();(0,a.isJoditObject)(e)&&this.buttons?.forEach(t=>{e?.unregisterButton(t)}),this.beforeDestruct(this.j),super.destruct()}constructor(e){super(e),(0,n._)(this,"buttons",[]),(0,n._)(this,"hasStyle",!1),(0,n._)(this,"styles",void 0),(0,n._)(this,"__inited",!1),e.e.on("afterPluginSystemInit",this.__afterPluginSystemInit).on("afterInit",this.__afterInit).on("beforeDestruct",this.__beforeDestruct)}}(0,n._)(l,"requires",[]),(0,o.__decorate)([s.autobind],l.prototype,"__afterPluginSystemInit",null),(0,o.__decorate)([s.autobind],l.prototype,"__afterInit",null),(0,o.__decorate)([s.autobind],l.prototype,"__beforeDestruct",null)},17338:function(e,t,i){"use strict";i.d(t,{Ajax:function(){return h}});var n=i(25045),o=i(31635),r=i(91231),s=i(81937),a=i(49574),l=i(65946),c=i(33201),u=i(5266);i(37102);var d=i(32855);class h{className(){return"Ajax"}__buildParams(e,t){return(0,l.isPlainObject)(e)&&this.options.contentType&&this.options.contentType.includes("application/json")?JSON.stringify(e):(0,l.isFunction)(this.o.queryBuild)?this.o.queryBuild.call(this,e,t):(0,l.isString)(e)||e instanceof s.globalWindow.FormData||"object"==typeof e&&null!=e&&(0,l.isFunction)(e.append)?e:(0,l.buildQuery)(e)}get o(){return this.options}abort(){if(this.__isFulfilled)return this;try{this.__isFulfilled=!0,this.xhr.abort()}catch{}return this}send(){this.__activated=!0;let{xhr:e,o:t}=this,i=this.prepareRequest();return this.__async.promise(async(n,o)=>{let r=()=>{this.__isFulfilled=!0,o(c.connection("Connection error"))},s=()=>{this.__isFulfilled=!0,n(new d.Response(i,e.status,e.statusText,!e.responseType?e.responseText:e.response))};e.onload=s,e.onabort=()=>{this.__isFulfilled=!0,o(c.abort("Abort connection"))},e.onerror=r,e.ontimeout=r,t.responseType&&(e.responseType=t.responseType),e.onprogress=e=>{let t=0;e.lengthComputable&&(t=e.loaded/e.total*100),this.options.onProgress?.(t)},e.onreadystatechange=()=>{this.options.onProgress?.(10),e.readyState===XMLHttpRequest.DONE&&(t.successStatuses.includes(e.status)?s():e.statusText&&(this.__isFulfilled=!0,o(c.connection(e.statusText))))},e.withCredentials=t.withCredentials??!1;let{url:a,data:u,method:h}=i;e.open(h,a,!0),t.contentType&&e.setRequestHeader&&e.setRequestHeader("Content-type",t.contentType);let{headers:p}=t;(0,l.isFunction)(p)&&(p=await p.call(this)),p&&e.setRequestHeader&&Object.keys(p).forEach(t=>{e.setRequestHeader(t,p[t])}),this.__async.setTimeout(()=>{e.send(u?this.__buildParams(u):void 0)},0)})}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 n=(0,l.parseQuery)(e);e=e.substring(0,i)+"?"+(0,l.buildQuery)({...n,...t})}else e+="?"+(0,l.buildQuery)(this.o.data)}let n={url:e,method:i,data:t};return h.log.splice(100),h.log.push(n),n}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,n._)(this,"__async",new r.Async),(0,n._)(this,"xhr",void 0),(0,n._)(this,"options",void 0),(0,n._)(this,"__isFulfilled",!1),(0,n._)(this,"__activated",!1),(0,n._)(this,"__isDestructed",!1),this.options=(0,l.ConfigProto)(e||{},t),this.xhr=this.o.xhr?this.o.xhr():new XMLHttpRequest}}(0,n._)(h,"log",[]),(0,o.__decorate)([a.autobind],h.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 n.Ajax},Response:function(){return o.Response}});var n=i(17338),o=i(32855)},32855:function(e,t,i){"use strict";i.d(t,{Response:function(){return o}});var n=i(25045);class o{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,o){(0,n._)(this,"status",void 0),(0,n._)(this,"statusText",void 0),(0,n._)(this,"request",void 0),(0,n._)(this,"body",void 0),this.request=e,this.status=t,this.statusText=i,this.body=o}}},42259:function(e,t,i){"use strict";i.d(t,{cursorInTheEdgeOfString:function(){return s},findCorrectCurrentNode:function(){return a},moveNodeInsideStart:function(){return r.moveNodeInsideStart}});var n=i(81937),o=i(23211),r=i(89817);function s(e,t,i,o){let r=e.nodeValue?.length?e.nodeValue:"";if(o&&r.replace((0,n.INVISIBLE_SPACE_REG_EXP_END)(),"").length>t)return!0;let s=(0,n.INVISIBLE_SPACE_REG_EXP_START)().exec(r);return i&&(s&&s[0].length<t||!s&&t>0)}function a(e,t,i,n,r,s){if((e=t.startContainer.childNodes[t.startOffset])||(e=t.startContainer.childNodes[t.startOffset-1],i=!0),e&&n&&!o.Dom.isText(e)){if(!i&&o.Dom.isText(e.previousSibling))e=e.previousSibling;else if(r){let t=s(e);for(;t;){if(t&&o.Dom.isText(t)){e=t;break}t=s(t)}}}if(e&&!n&&!o.Dom.isText(e)){let t=e,i=e;do t=t.firstChild,i=i.lastChild;while(t&&i&&!o.Dom.isText(t))t===i&&t&&o.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 r}});var n=i(81937),o=i(23211);function r(e,t,i){let r=o.Dom.findSibling(t,i),s=o.Dom.findSibling(t,!i);for(;o.Dom.isElement(r)&&!o.Dom.isTag(r,n.INSEPARABLE_TAGS)&&o.Dom.isContentEditable(r,e.editor)&&(!s||!o.Dom.closest(t,o.Dom.isElement,e.editor));)i||!r.firstChild?r.appendChild(t):o.Dom.before(r.firstChild,t),r=o.Dom.sibling(t,i),s=o.Dom.sibling(t,!i)}},7470:function(e,t,i){"use strict";i.d(t,{moveTheNodeAlongTheEdgeOutward:function(){return o}});var n=i(23211);function o(e,t,i){let o=e;for(;o&&o!==i&&!(n.Dom.findSibling(o,t)||n.Dom.isBlock(o.parentElement));)(o=o.parentElement)&&o!==i&&(t?n.Dom.before(o,e):n.Dom.after(o,e))}},59841:function(e,t,i){"use strict";i.d(t,{CommitStyle:function(){return o.CommitStyle},Selection:function(){return n.Selection}});var n=i(98595),o=i(84578)},98595:function(e,t,i){"use strict";i.d(t,{Selection:function(){return m}});var n=i(25045),o=i(31635),r=i(81937),s=i(84839),a=i(23211),l=i(65946),c=i(28686),u=i(28712),d=i(7470),h=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(){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,t=e?.rangeCount?e.getRangeAt(0):null;return!(!t||!a.Dom.isOrContains(this.area,t.startContainer))}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)e.getRangeAt(t).deleteContents(),e.getRangeAt(t).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){this.removeMarkers();try{let i=this.createRange();return(()=>{if(this.doc.caretPositionFromPoint){let n=this.doc.caretPositionFromPoint(e,t);if(n)return i.setStart(n.offsetNode,n.offset)}if(this.doc.caretRangeFromPoint){let n=this.doc.caretRangeFromPoint(e,t);(0,u.assert)(n,"Incorrect caretRangeFromPoint behaviour"),i.setStart(n.startContainer,n.startOffset)}})(),i.collapse(!0),this.selectRange(i),!0}catch{}return!1}get hasMarkers(){return!!this.markers.length}get markers(){return(0,l.$$)("span[data-"+r.MARKER_CLASS+"]",this.area)}removeMarkers(){a.Dom.safeRemove.apply(null,this.markers)}marker(e=!1,t){let i=null;t&&(i=t.cloneRange()).collapse(e);let n=this.j.createInside.span();return n.id=r.MARKER_CLASS+"_"+Number(new Date)+"_"+(Math.random()+"").slice(2),n.style.lineHeight="0",n.style.display="none",a.Dom.markTemporary(n),(0,l.attr)(n,"data-"+r.MARKER_CLASS,e?"start":"end"),n.appendChild(this.j.createInside.text(r.INVISIBLE_SPACE)),i&&a.Dom.isOrContains(this.area,e?i.startContainer:i.endContainer)&&i.insertNode(n),n}restore(){let e=!1,t=e=>`span[data-${r.MARKER_CLASS}=${e?"start":"end"}]`,i=this.area.querySelector(t(!0)),n=this.area.querySelector(t(!1));if(i){if(e=this.createRange(),n)e.setStartAfter(i),a.Dom.safeRemove(i),e.setEndBefore(n),a.Dom.safeRemove(n);else{let t=i.previousSibling;a.Dom.isText(t)?e.setStart(t,t.nodeValue?t.nodeValue.length:0):e.setStartBefore(i),a.Dom.safeRemove(i),e.collapse(!0)}e&&this.selectRange(e)}}fakes(){let e=this.sel;if(!e||!e.rangeCount)return[];let t=e.getRangeAt(0);(0,u.assert)(t,"Range is null");let i=t.cloneRange();i.collapse(!0);let n=this.j.createInside.fake();a.Dom.safeInsertNode(i,n),t.setStartBefore(n);let o=[n];if(!t.collapsed){let e=t.cloneRange();e.collapse(!1);let i=this.j.createInside.fake();a.Dom.safeInsertNode(e,i),t.setEndAfter(i),o.push(i)}return this.selectRange(t),o}restoreFakes(e){let t=e.filter(e=>e.isConnected);if(!t.length)return;let[i,n]=t,o=this.createRange();o.setStartAfter(i),n&&o.setEndBefore(n),this.selectRange(o),i.parentNode?.firstChild!==i.parentNode?.lastChild&&a.Dom.safeRemove(i),n?.parentNode?.firstChild!==n?.parentNode?.lastChild&&a.Dom.safeRemove(n)}save(e=!1){if(this.hasMarkers)return[];let t=this.sel;if(!t||!t.rangeCount)return[];let i=[],n=t.rangeCount,o=[];for(let e=0;n>e;e+=1)if(o[e]=t.getRangeAt(e),o[e].collapsed){let t=this.marker(!0,o[e]);i[e]={startId:t.id,collapsed:!0,startMarker:t.outerHTML}}else{let t=this.marker(!0,o[e]),n=this.marker(!1,o[e]);i[e]={startId:t.id,endId:n.id,collapsed:!1,startMarker:t.outerHTML,endMarker:n.outerHTML}}if(!e){t.removeAllRanges();for(let e=n-1;e>=0;--e){let n=this.doc.getElementById(i[e].startId);if(n){if(i[e].collapsed)o[e].setStartAfter(n),o[e].collapse(!0);else if(o[e].setStartBefore(n),i[e].endId){let t=this.doc.getElementById(i[e].endId);t&&o[e].setEndAfter(t)}try{t.addRange(o[e].cloneRange())}catch{}}}}return i}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 n=this.sel,o=n?.rangeCount?n?.getRangeAt(0):null;if(!o||!a.Dom.isOrContains(this.area,o.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()!==r.MODE_WYSIWYG)return null;let t=this.sel;if(!t||0===t.rangeCount)return null;let i=t.getRangeAt(0),n=i.startContainer,o=!1;if(a.Dom.isTag(n,"br")&&t.isCollapsed)return n;if(!a.Dom.isText(n)){let r=(0,p.findCorrectCurrentNode)(n,i,o,t.isCollapsed,e,e=>o?e.lastChild:e.firstChild);n=r.node,o=r.rightMode}return n&&a.Dom.isOrContains(this.area,n)?n:null}insertNode(e,t=!0,i=!0){this.errorNode(e);let n=a.Dom.isFragment(e)?e.lastChild:e;this.j.e.fire("safeHTML",e),!this.isFocused()&&this.j.isEditorMode()&&(this.focus(),this.restore());let o=this.sel;this.j.history.snapshot.transaction(()=>{if(this.isCollapsed()||this.j.execCommand("Delete"),this.j.e.fire("beforeInsertNode",e),o&&o.rangeCount){let t=o.getRangeAt(0),{firstChild:i}=e;a.Dom.isOrContains(this.area,t.commonAncestorContainer)?a.Dom.safeInsertNode(t,e):this.area.appendChild(e),[()=>i?.previousSibling,()=>i?.previousSibling,()=>i?.previousSibling?.lastChild].forEach(e=>{let t=e();t&&a.Dom.isEmptyTextNode(t)&&a.Dom.safeRemove(t)})}else this.area.appendChild(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)?n&&i(n):i(e)),this.j.o.scrollToPastedContent&&(0,l.scrollIntoViewIfNeeded)(n??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)?n:e)}insertHTML(e,t=!0){if(""===e)return;let i=this.j.createInside.div(),n=this.j.createInside.fragment();if(!this.isFocused()&&this.j.isEditorMode()&&(this.focus(),this.restore()),a.Dom.isNode(e)?i.appendChild(e):i.innerHTML=e.toString(),(this.j.isEditorMode()||!1!==this.j.e.fire("insertHTML",i.innerHTML))&&i.lastChild){for(;i.firstChild;)i.firstChild,n.appendChild(i.firstChild);this.insertNode(n,t,!1),this.j.__imdSynchronizeValues()}}insertImage(e,t=null,i=null){let n=(0,c.isString)(e)?this.j.createInside.element("img"):e;if((0,c.isString)(e)&&n.setAttribute("src",e),null!=i){let e=i.toString();e&&"auto"!==e&&0>(e+"").indexOf("px")&&0>(e+"").indexOf("%")&&(e+="px"),(0,l.attr)(n,"width",e)}t&&"object"==typeof t&&(0,l.css)(n,t);let o=()=>{(n.naturalHeight<n.offsetHeight||n.naturalWidth<n.offsetWidth)&&(n.style.width="",n.style.height=""),n.removeEventListener("load",o)};this.j.e.on(n,"load",o),n.complete&&o(),this.insertNode(n),this.j.e.fire("afterInsertImage",n)}eachSelection(e){let t=this.sel;if(!t||!t.rangeCount)return;let i=t.getRangeAt(0),n=i.commonAncestorContainer;a.Dom.isHTMLElement(n)||(n=n.parentElement);let o=[],s=i.startOffset,u=n.childNodes.length,d=i.startContainer===this.area?n.childNodes[s<u?s:u-1]:i.startContainer,h=i.endContainer===this.area?n.childNodes[i.endOffset-1]:i.endContainer;a.Dom.isText(d)&&d===i.startContainer&&i.startOffset===d.nodeValue?.length&&d.nextSibling&&(d=d.nextSibling),a.Dom.isText(h)&&h===i.endContainer&&0===i.endOffset&&h.previousSibling&&(h=h.previousSibling);let p=e=>{!e||e===n||a.Dom.isEmptyTextNode(e)||(0,c.isMarker)(e)||o.push(e)};p(d),d!==h&&a.Dom.isOrContains(n,d,!0)&&a.Dom.find(d,e=>(p(e),e===h||e&&e.contains&&e.contains(h)),n,!0,!1);let m=t=>{if(a.Dom.isOrContains(this.j.editor,t,!0)){if(t.nodeName.match(/^(UL|OL)$/))return(0,l.toArray)(t.childNodes).forEach(m);if(a.Dom.isTag(t,"li"))if(t.firstChild)t=t.firstChild;else{let e=this.j.createInside.text(r.INVISIBLE_SPACE);t.appendChild(e),t=e}e(t)}};0===o.length&&(a.Dom.isEmptyTextNode(d)&&o.push(d),d.firstChild&&o.push(d.firstChild)),o.forEach(m)}cursorInTheEdge(e,t,i=null){let n=!e,o=this.sel?.getRangeAt(0);if(i??=this.current(!1),!o||!i||!a.Dom.isOrContains(t,i,!0))return null;let r=e?o.startContainer:o.endContainer,s=e?o.startOffset:o.endOffset,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,s,e,n))return!1}else{let e=(0,l.toArray)(r.childNodes);if(n){if(e.slice(s).some(c))return!1}else if(e.slice(0,s).some(c))return!1}let u=i;for(;u&&u!==t;){let t=a.Dom.sibling(u,e);if(!t){u=u.parentNode;continue}if((u=t)&&c(u))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.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(),n=null;return a.Dom.isText(e)?t?i.setStart(e,0):i.setEnd(e,e.nodeValue?.length??0):(n=this.j.createInside.fake(),t?i.setStartBefore(e):i.setEndAfter(e),i.collapse(t),a.Dom.safeInsertNode(i,n),i.selectNode(n)),i.collapse(t),this.selectRange(i),n}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(),n=e,o=e;do{if(a.Dom.isText(n)||a.Dom.isTag(n,r.INSEPARABLE_TAGS))break;o=n,n=t?n.firstChild:n.lastChild}while(n)if(!n){let e=this.j.createInside.text(r.INVISIBLE_SPACE);a.Dom.isTag(o,r.INSEPARABLE_TAGS)?n=o:(o.appendChild(e),o=e)}let s=n||o;return a.Dom.isTag(s,r.INSEPARABLE_TAGS)?t||a.Dom.isTag(s,"br")?i.setStartBefore(s):i.setEndAfter(s):i.selectNodeContents(s),i.collapse(t),this.selectRange(i),o}selectRange(e,t=!0){let i=this.sel;return t&&!this.isFocused()&&this.focus(),i&&(i.removeAllRanges(),i.addRange(e)),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=this.createRange();return i[t?"selectNodeContents":"selectNode"](e),this.selectRange(i)}get html(){let e=this.sel;if(e&&e.rangeCount>0){let t=e.getRangeAt(0).cloneContents(),i=this.j.createInside.div();return i.appendChild(t),i.innerHTML}return""}*wrapInTagGen(e){if(this.isCollapsed()){let t=this.jodit.createInside.element("font",r.INVISIBLE_SPACE);this.insertNode(t,!1,!1),e&&e[0]&&t.appendChild(e[0]),yield t,a.Dom.unwrap(t);return}for(let e of((0,l.$$)("*[style*=font-size]",this.area).forEach(e=>{(0,l.attr)(e,"data-font-size",e.style.fontSize.toString()),e.style.removeProperty("font-size")}),this.j.nativeExecCommand("fontsize",!1,"7"),(0,l.$$)("*[data-font-size]",this.area).forEach(e=>{let t=(0,l.attr)(e,"data-font-size");t&&(e.style.fontSize=t,(0,l.attr)(e,"data-font-size",null))}),(0,l.$$)('font[size="7"]',this.area))){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)}}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,u.assert)((0,l.size)(e)>0,"Need to pass at least one option"),new h.CommitStyle(e).apply(this.j)}splitSelection(e,t){if(!this.isCollapsed())return null;let i=this.createRange(),n=this.range;i.setStartBefore(e);let o=this.cursorOnTheRight(e,t),s=this.cursorOnTheLeft(e,t),l=this.j.createInside.element("br"),c=this.j.createInside.fake(),d=c.cloneNode();try{if(o||s){t?a.Dom.before(t,l):a.Dom.safeInsertNode(n,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,d),a.Dom.before(l,c),o?(i.setEndBefore(l),n.setEndBefore(l)):(i.setEndAfter(l),n.setEndAfter(l))}else i.setEnd(n.startContainer,n.startOffset);let h=i.extractContents(),p=e=>a.Dom.each(e,e=>a.Dom.isEmptyTextNode(e)&&a.Dom.safeRemove(e));(0,u.assert)(e.parentNode,"Splitting fails");try{if(p(h),p(e),e.parentNode.insertBefore(h,e),!t&&o&&l?.parentNode){let e=this.createRange();e.setStartBefore(l),this.selectRange(e)}}catch(e){if(!r.IS_PROD)throw e}let m=e=>{e?.parentNode?.firstChild===e?.parentNode?.lastChild&&e?.parentNode?.appendChild(l.cloneNode())};m(c),m(d)}finally{a.Dom.safeRemove(c),a.Dom.safeRemove(d)}return e.previousElementSibling}expandSelection(){if(this.isCollapsed())return this;let{range:e}=this,t=e.cloneRange();if(!a.Dom.isOrContains(this.j.editor,e.commonAncestorContainer,!0))return this;let i=t=>{let i=this.j.createInside.fake(),n=e.cloneRange();return n.collapse(t),a.Dom.safeInsertNode(n,i),(0,d.moveTheNodeAlongTheEdgeOutward)(i,t,this.j.editor),i},n=i(!0),o=i(!1);t.setStartAfter(n),t.setEndBefore(o);let r=a.Dom.findSibling(n,!1),s=a.Dom.findSibling(o,!0);if(r!==s){let e=a.Dom.isElement(r)&&a.Dom.isOrContains(r,o),i=!e&&a.Dom.isElement(s)&&a.Dom.isOrContains(s,n);if(e||i){let i=e?r:s,l=i;for(;a.Dom.isElement(i);)(i=e?i.firstElementChild:i.lastElementChild)&&(e?a.Dom.isOrContains(i,o):a.Dom.isOrContains(i,n))&&(l=i);e?t.setStart(l,0):t.setEnd(l,l.childNodes.length)}}if(this.selectRange(t),a.Dom.safeRemove(n,o),this.isCollapsed())throw(0,l.error)("Selection is collapsed");return this}constructor(e){(0,n._)(this,"jodit",void 0),this.jodit=e,e.e.on("removeMarkers",()=>{this.removeMarkers()})}}(0,o.__decorate)([s.autobind],m.prototype,"createRange",null),(0,o.__decorate)([s.autobind],m.prototype,"focus",null),(0,o.__decorate)([s.autobind],m.prototype,"setCursorAfter",null),(0,o.__decorate)([s.autobind],m.prototype,"setCursorBefore",null),(0,o.__decorate)([s.autobind],m.prototype,"setCursorIn",null)},17481:function(e,t,i){"use strict";i.d(t,{extractSelectedPart:function(){return a}});var n=i(23211),o=i(23175),r=i(4040),s=i(71125);function a(e,t,i){let n=i.s.createRange(),r=(0,o.isMarker)(t.previousSibling)?t.previousSibling:t;n.setStartBefore(e),n.setEndBefore(r),l(e,n,!0);let s=(0,o.isMarker)(t.nextSibling)?t.nextSibling:t;n.setStartAfter(s),n.setEndAfter(e),l(e,n,!1)}function l(e,t,i){let o=t.extractContents();o.textContent&&(0,r.trim)(o.textContent).length||!o.firstChild||n.Dom.unwrap(o.firstChild),e.parentNode&&(0,s.call)(i?n.Dom.before:n.Dom.after,e,o)}},48729:function(e,t,i){"use strict";i.d(t,{FiniteStateMachine:function(){return a}});var n=i(25045),o=i(81937),r=i(85932),s=i(28712);class a{setState(e){(0,s.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,s.assert)(e&&e!==t,"Action should return new value"),(0,s.assert)((0,r.isString)(e.next),"Value should contain the next state"),(0,s.assert)(e.next!==this.getState(),"The new state should not be equal to the old one."),this.setState(e.next),o.IS_PROD||this.silent,e}throw Error(`invalid action: ${this.getState()}.${e.toString()}`)}constructor(e,t){(0,n._)(this,"transitions",void 0),(0,n._)(this,"__state",void 0),(0,n._)(this,"silent",void 0),(0,n._)(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 s}});var n=i(23211),o=i(83653),r=i(73019);function s(e,t){let{firstChild:i}=t;for(;i&&!(0,o.isNormalNode)(i);)if(!(i=i.nextSibling))return null;return i&&!n.Dom.next(i,o.isNormalNode,t)&&(0,r.isSuitElement)(e,i,!1)?i:null}},19549:function(e,t,i){"use strict";i.d(t,{getSuitParent:function(){return function e(t,i,s){let{parentNode:a}=i;return a===s||!n.Dom.isHTMLElement(a)||n.Dom.next(i,o.isNormalNode,a)||n.Dom.prev(i,o.isNormalNode,a)?null:t.isElementCommit&&t.elementIsBlock&&!n.Dom.isBlock(a)?e(t,a,s):(0,r.isSuitElement)(t,a,!1)&&(!n.Dom.isBlock(a)||t.elementIsBlock)?a:t.isElementCommit&&!n.Dom.isBlock(a)?e(t,a,s):null}}});var n=i(23211),o=i(83653),r=i(73019)},9703:function(e,t,i){"use strict";i.d(t,{hasSameStyle:function(){return c},hasSameStyleKeys:function(){return u}});var n=i(81937),o=i(23211),r=i(18303),s=i(19147),a=i(28712),l=i(80991);function c(e,t){return!!(!o.Dom.isTag(e,"font")&&o.Dom.isHTMLElement(e)&&Object.keys(t).every(i=>{let n=(0,l.css)(e,i,!0);return""===n&&(""===t[i]||null==t[i])||!(0,r.isVoid)(n)&&""!==n&&!(0,r.isVoid)(t[i])&&(0,s.normalizeCssValue)(i,t[i]).toString().toLowerCase()===n.toString().toLowerCase()}))}if(n.globalDocument){let e=n.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!!(!o.Dom.isTag(e,"font")&&o.Dom.isHTMLElement(e)&&Object.keys(t).every(t=>""!==(0,l.css)(e,t,!0)))}if(n.globalDocument){let e=n.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 o.FiniteStateMachine},extractSelectedPart:function(){return n.extractSelectedPart},getSuitChild:function(){return r.getSuitChild},getSuitParent:function(){return s.getSuitParent},isInsideInvisibleElement:function(){return a.isInsideInvisibleElement},suitableClosest:function(){return l.suitableClosest},toggleAttributes:function(){return u.toggleAttributes},toggleOrderedList:function(){return c.toggleOrderedList},unwrapChildren:function(){return d.unwrapChildren},wrap:function(){return h.wrap}});var n=i(17481),o=i(48729),r=i(10171),s=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),d=i(89081),h=i(73154);i(83335)},39608:function(e,t,i){"use strict";i.d(t,{isInsideInvisibleElement:function(){return o}});var n=i(23211);function o(e,t){return!!n.Dom.closest(e,["style","script"],t)}},83653:function(e,t,i){"use strict";i.d(t,{isNormalNode:function(){return r}});var n=i(23211),o=i(23175);function r(e){return!!(e&&!n.Dom.isEmptyTextNode(e)&&!n.Dom.isTemporary(e)&&!(0,o.isMarker)(e))}},95971:function(e,t,i){"use strict";i.d(t,{elementsEqualAttributes:function(){return l},isSameAttributes:function(){return a}});var n=i(18073),o=i(93640),r=i(28712),s=i(9703);function a(e,t){return!((e.attributes.length||(0,n.size)(t))&&(0,n.size)(t))||((0,r.assert)(t,"Attrs must be a non-empty object"),Object.keys(t).every(i=>"class"===i||"className"===i?e.classList.contains(t[i]):"style"===i?(0,s.hasSameStyle)(e,t[i]):(0,o.attr)(e,i)===t[i]))}function l(e,t){return e.attributes.length===t.attributes.length&&Array.from(e.attributes).every(e=>t.hasAttribute(e.name)&&t.getAttribute(e.name)===e.value)}},73019:function(e,t,i){"use strict";i.d(t,{isSameStyleChild:function(){return l},isSuitElement:function(){return s},suitableClosest:function(){return a}});var n=i(23211),o=i(9703),r=i(83653);function s(e,t,i,a=!0){if(!t||!(0,r.isNormalNode)(t))return!1;let{element:l,elementIsDefault:c,options:u}=e;if(n.Dom.isList(t)&&e.elementIsList)return!0;let d=n.Dom.isTag(t,l);return!!(d&&!(c&&i)||u.attributes?.style&&(a?(0,o.hasSameStyle)(t,u.attributes.style):(0,o.hasSameStyleKeys)(t,u.attributes.style))&&!e.elementIsList)||!d&&!i&&c&&n.Dom.isInlineBlock(t)}function a(e,t,i){return n.Dom.closest(t,t=>s(e,t,!0,!1),i)}function l(e,t){let{element:i,options:n}=e;if(!t||!(0,r.isNormalNode)(t))return!1;let s=t.nodeName.toLowerCase()===i,a=!!(n.attributes?.style&&(0,o.hasSameStyleKeys)(t,n.attributes?.style));return s&&a}},34582:function(e,t,i){"use strict";i.d(t,{toggleOrderedList:function(){return c}});var n=i(23211),o=i(28712),r=i(17481),s=i(82794),a=i(98394),l=i(97110);function c(e,t,i,n){if(!t)return n;let o=t.parentElement;if(!o)return n;let r=i.e.fire(`${a._PREFIX}BeforeToggleList`,n,e,o);if(void 0!==r)return r;let c=i.e.fire.bind(i.e,`${a._PREFIX}AfterToggleList`);if(n!==a.UNWRAP){let r=(0,s.toggleAttributes)(e,t.parentElement,i,a.INITIAL,!0)===a.CHANGE;if(n===a.REPLACE||r||o.tagName.toLowerCase()!==e.element){let n=u(a.REPLACE,o,t,i,e),r=(0,l.wrapList)(e,n,i);return c(a.REPLACE,r,e),a.REPLACE}}let d=u(a.UNWRAP,o,t,i,e);return c(a.UNWRAP,d,e),a.UNWRAP}function u(e,t,i,s,l){let c=s.e.fire(`${a._PREFIX}BeforeUnwrapList`,e,t,l);return c?((0,o.assert)(n.Dom.isHTMLElement(c),`${a._PREFIX}BeforeUnwrapList hook must return HTMLElement`),c):((0,r.extractSelectedPart)(t,i,s),(0,o.assert)(n.Dom.isHTMLElement(i.parentElement),"Element should be inside the list"),n.Dom.unwrap(i.parentElement),n.Dom.replace(i,"br"!==s.o.enter.toLowerCase()?s.o.enter:s.createInside.fragment(),s.createInside))}},97110:function(e,t,i){"use strict";i.d(t,{wrapList:function(){return a}});var n=i(23211),o=i(95971),r=i(82794),s=i(98394);function a(e,t,i){let a=i.e.fire(`${s._PREFIX}BeforeWrapList`,s.REPLACE,t,e)??n.Dom.replace(t,"li",i.createInside),l=a.previousElementSibling,c=a.nextElementSibling,u=n.Dom.isTag(l,e.element)?l:null;return u??=n.Dom.isTag(c,e.element)?c:null,n.Dom.isList(u)&&(0,o.isSameAttributes)(u,e.options.attributes)||(u=i.createInside.element(e.element),(0,r.toggleAttributes)(e,u,i,s.INITIAL),n.Dom.before(a,u)),l===u?n.Dom.append(u,a):n.Dom.prepend(u,a),n.Dom.isTag(u.nextElementSibling,e.element)&&(0,o.elementsEqualAttributes)(u,u.nextElementSibling)&&(n.Dom.append(u,Array.from(u.nextElementSibling.childNodes)),n.Dom.safeRemove(u.nextElementSibling)),i.e.fire(`${s._PREFIX}AfterWrapList`,s.WRAP,u,e),u}},82794:function(e,t,i){"use strict";i.d(t,{toggleAttributes:function(){return f}});var n=i(81937),o=i(23211),r=i(28077),s=i(28686),a=i(19147),l=i(18073),c=i(74264),u=i(93640),d=i(80991),h=i(36400),p=i(98394);let m="toggleAttributes";function f(e,t,i,_,v=!1){if(!v&&e.isApplied(t,m))return _;v||e.setApplied(t,m);let{attributes:b}=e.options;return b&&(0,l.size)(b)>0&&Object.keys(b).forEach(m=>{var f,y,S;let w=b[m];switch(m){case"style":f=_,(0,u.assert)((0,s.isPlainObject)(w)&&(0,l.size)(w),"Style must be an object"),Object.keys(w).forEach(s=>{let l=t.style.getPropertyValue((0,c.kebabCase)(s)),u=w[s];if(""!==l||null!=u){let c,m;if((c=i.create.element(t.tagName.toLowerCase())).style.cssText=t.style.cssText,(function(e){if(void 0!==(0,h.dataBind)(e,"shadowRoot"))return(0,h.dataBind)(e,"shadowRoot");let t=(0,r.getContainer)(e),i=n.globalDocument.createElement("iframe");(0,d.css)(i,{width:0,height:0,position:"absolute",border:0}),i.src="about:blank",t.appendChild(i);let o=i.contentWindow?.document,s=o?o.body:e.od.body;return(0,h.dataBind)(e,"shadowRoot",s),s})(i).appendChild(c),m=(0,d.css)(c,s),o.Dom.safeRemove(c),m===(0,a.normalizeCssValue)(s,u)){if(!l)return;v||(0,d.css)(t,s,null),f=g(e,t,f=p.UNSET);return}f=p.CHANGE,v||((0,d.css)(t,s,u),f=g(e,t,f))}}),_=f;break;case"className":case"class":let C;y=_,(0,u.assert)((0,s.isString)(w),"Class name must be a string"),C=i.e.fire.bind(i.e,`${p._PREFIX}AfterToggleAttribute`),t.classList.contains(w.toString())?(y=p.UNSET,v||(t.classList.remove(w),0===t.classList.length&&((0,u.attr)(t,"class",null),C(y,t,"class",null)))):(y=p.CHANGE,v||(t.classList.add(w),C(y,t,"class",w))),_=y;break;default:let k;S=_,(0,u.assert)((0,s.isString)(w)||(0,s.isNumber)(w)||(0,s.isBoolean)(w)||null==w,"Attribute value must be a string or number or boolean or null"),k=i.e.fire.bind(i.e,`${p._PREFIX}AfterToggleAttribute`),(0,u.attr)(t,m)===w?(v||(0,u.attr)(t,m,null),S=p.UNSET,v||k(S,t,m,w)):(S=p.CHANGE,v||((0,u.attr)(t,m,w),k(S,t,m,w))),_=S}}),_}function g(e,t,i){return(0,u.attr)(t,"style")||((0,u.attr)(t,"style",null),t.tagName.toLowerCase()===e.defaultTag&&(o.Dom.unwrap(t),i=p.UNWRAP)),i}},89081:function(e,t,i){"use strict";i.d(t,{unwrapChildren:function(){return a}});var n=i(23211),o=i(93640),r=i(9703),s=i(73019);function a(e,t){let i,a=[],l=[],c=e.options.attributes?.style;if(t.firstChild){let u=n.Dom.eachGen(t),d=u.next();for(;!d.done;){let t=d.value;(0,s.isSuitElement)(e,t,!0)&&(!c||(0,r.hasSameStyleKeys)(t,c))?(void 0===i&&(i=!0),a.push(t)):c&&(0,s.isSameStyleChild)(e,t)?(void 0===i&&(i=!1),l.push(()=>{(0,o.css)(t,Object.keys(c).reduce((e,t)=>(e[t]=null,e),{})),(0,o.attr)(t,"style")||(0,o.attr)(t,"style",null),(0,o.attr)(t,"style")||t.nodeName.toLowerCase()!==e.element||a.push(t)})):n.Dom.isEmptyTextNode(t)||void 0!==i||(i=!1),d=u.next()}}return l.forEach(e=>e()),a.forEach(n.Dom.unwrap),!!i}},83335:function(e,t,i){"use strict";i.d(t,{wrapUnwrappedText:function(){return r}});var n=i(23211),o=i(23175);function r(e,t,i){let r=i.editor,s=i.createInside,a=(e,t="previousSibling")=>{let s=e,a=e;for(;a&&!(0,o.isMarker)(a)&&!n.Dom.isTag(a,i.o.enter)&&(s=a,a=a[t]?a[t]:a.parentNode&&!n.Dom.isBlock(a.parentNode)&&a.parentNode!==r?a.parentNode:null,!n.Dom.isBlock(a)););return s},l=a(t),c=a(t,"nextSibling"),u=i.s.createRange();u.setStartBefore(l),u.setEndAfter(c);let d=u.extractContents(),h=s.element(e.element);return h.appendChild(d),n.Dom.safeInsertNode(u,h),e.elementIsBlock&&n.Dom.isEmpty(h)&&!n.Dom.isTag(h.firstElementChild,"br")&&h.appendChild(s.element("br")),h}},73154:function(e,t,i){"use strict";i.d(t,{wrap:function(){return a}});var n=i(27795),o=i(7909),r=i(97110),s=i(83335);function a(e,t,i){var a,c,u;let d=(a=e,c=t,u=i,a.elementIsBlock?n.Dom.up(c,e=>n.Dom.isBlock(e)&&!n.Dom.isTag(e,l),u.editor)||(0,s.wrapUnwrappedText)(a,c,u):((0,o.attr)(c,"size",null),c));return e.elementIsList?(0,r.wrapList)(e,d,i):n.Dom.replace(d,e.element,i.createInside,!0)}let l=new Set(["td","th","tr","tbody","table","li","ul","ol"])},96127:function(e,t,i){"use strict";i.d(t,{ApplyStyle:function(){return s}});var n=i(51640),o=i(98394),r=i(78462);function s(e,t){let{s:i,editor:s}=e;s.firstChild?.normalize();let a=i.fakes(),l=e.s.wrapInTagGen(a),c=l.next();if(c.done)return;let u={collapsed:i.isCollapsed(),mode:o.INITIAL,element:c.value,next:r.states.START,jodit:e,style:t};for(;c&&!c.done;){let e=new n.FiniteStateMachine(r.states.START,r.transactions);for(u.element=c.value;e.getState()!==r.states.END;)u=e.dispatch("exec",u);c=l.next()}i.restoreFakes(a)}},84578:function(e,t,i){"use strict";i.d(t,{CommitStyle:function(){return l}});var n=i(25045),o=i(81937),r=i(57821),s=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&&o.LIST_TAGS.has(this.options.element))}get element(){return this.options.element||this.defaultTag}get elementIsBlock(){return!!(this.options.element&&o.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,r.camelCase)(s._PREFIX+"_"+i),t[i])}),(0,a.ApplyStyle)(e,this)}finally{i.forEach(i=>{e.e.off((0,r.camelCase)(s._PREFIX+"_"+i),t[i])}),this.__applyMap=new WeakMap}e.synchronizeValues(),e.e.fire("afterCommitStyle",this)}constructor(e){(0,n._)(this,"options",void 0),(0,n._)(this,"__applyMap",void 0),this.options=e,this.__applyMap=new WeakMap}}},98394:function(e,t,i){"use strict";i.d(t,{CHANGE:function(){return r},INITIAL:function(){return a},REPLACE:function(){return l},UNSET:function(){return s},UNWRAP:function(){return o},WRAP:function(){return n},_PREFIX:function(){return c}});let n="wrap",o="unwrap",r="change",s="unset",a="initial",l="replace",c="commitStyle"},78462:function(e,t,i){"use strict";i.d(t,{states:function(){return l},transactions:function(){return c}});var n=i(81937),o=i(23211),r=i(28712),s=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:n,mode:r,collapsed:c}=e;if((0,s.isInsideInvisibleElement)(t,i.editor)||!c&&o.Dom.isEmptyContent(t))return{...e,next:l.END};let u=(0,s.getSuitParent)(n,t,i.editor)||(0,s.getSuitChild)(n,t);if(u)return{...e,next:l.ELEMENT,element:u};let d=(0,s.suitableClosest)(n,t,i.editor);return n.elementIsList&&o.Dom.isList(d)?{...e,next:l.LIST}:d?{...e,next:l.EXTRACT}:{...e,next:r!==a.UNWRAP?l.UNWRAP_CHILDREN:l.END}}},[l.LIST]:{exec(e){let{element:t,jodit:i,mode:r}=e;if(r!==a.INITIAL&&r!==a.UNWRAP&&r!==a.REPLACE)return{...e,next:l.END};let s=o.Dom.closest(t,"li",i.editor);return s&&o.Dom.closest(t,n.LIST_TAGS,i.editor)?{...e,element:s,next:l.TOGGLE_LIST}:{...e,next:l.END}}},[l.TOGGLE_LIST]:{exec:e=>({...e,mode:(0,s.toggleOrderedList)(e.style,e.element,e.jodit,e.mode),next:l.END})},[l.EXTRACT]:{exec(e){let{element:t,jodit:i,style:n}=e,a=(0,s.suitableClosest)(n,t,i.editor);return((0,r.assert)(a,"This place should have an element"),!n.elementIsBlock&&n.options.attributes?.style&&o.Dom.isBlock(a))?{...e,next:l.WRAP}:(n.elementIsBlock||(0,s.extractSelectedPart)(a,t,i),{...e,element:a,next:l.ELEMENT})}},[l.UNWRAP_CHILDREN]:{exec(e){let{element:t,style:i}=e;return(0,s.unwrapChildren)(i,t)?{...e,mode:a.UNWRAP,next:l.END}:{...e,next:l.WRAP}}},[l.WRAP]:{exec(e){let{element:t,jodit:i,style:n}=e,o=(0,s.wrap)(n,t,i);return{...e,next:n.elementIsList?l.END:l.CHANGE,mode:a.WRAP,element:o}}},[l.ELEMENT]:{exec(e){let{style:t,element:i,jodit:n}=e;return(0,s.toggleAttributes)(t,i,n,a.INITIAL,!0)!==a.INITIAL?{...e,next:l.CHANGE}:o.Dom.isTag(i,t.element)?{...e,next:l.UNWRAP}:{...e,next:l.END}}},[l.CHANGE]:{exec(e){let{style:t,element:i,jodit:n,mode:r}=e,c=(0,s.toggleAttributes)(t,i,n,e.mode);return r!==a.WRAP&&c===a.UNSET&&!i.attributes.length&&o.Dom.isTag(i,t.element)?{...e,next:l.UNWRAP}:{...e,mode:c,next:l.END}}},[l.UNWRAP]:{exec:e=>e.element.attributes.length&&o.Dom.isTag(e.element,e.style.element)?{...e,next:l.REPLACE_DEFAULT}:(o.Dom.unwrap(e.element),{...e,mode:a.UNWRAP,next:l.END})},[l.REPLACE_DEFAULT]:{exec:e=>(o.Dom.replace(e.element,e.style.defaultTag,e.jodit.createInside,!0),{...e,mode:a.REPLACE,next:l.END})},[l.END]:{exec:e=>e}}},8006:function(e,t,i){"use strict";i.d(t,{AsyncStorage:function(){return c}});var n=i(25045),o=i(57821),r=i(91162),s=i(59807),a=i(9505),l=i(24475);class c{async set(e,t){let i=await this.provider;return await i.set((0,o.camelCase)(this.prefix+e),t),this}async delete(e){let t=await this.provider;return await t.delete((0,o.camelCase)(this.prefix+e)),this}async get(e){return(await this.provider).get((0,o.camelCase)(this.prefix+e))}async exists(e){return(await this.provider).exists((0,o.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){let i;return"localStorage"===e||"sessionStorage"===e?(0,s.canUsePersistentStorage)(e)&&(i=new s.LocalStorageProvider(l.StorageKey+(t||""),e)):("indexedDB"===e||!0===e)&&(i=(0,r.canUseIndexedDB)().then(e=>e?new r.IndexedDBProvider(l.StorageKey+(t||""),"keyValueStore"):new a.MemoryStorageProvider)),i||(i=new a.MemoryStorageProvider),new c(Promise.resolve(i),t)}constructor(e,t){(0,n._)(this,"provider",void 0),(0,n._)(this,"prefix",void 0),this.provider=e,this.prefix=l.StorageKey,t&&(this.prefix+=t)}}},91162:function(e,t,i){"use strict";i.d(t,{IndexedDBProvider:function(){return r},canUseIndexedDB:function(){return l},clearUseIndexedDBCache:function(){return a}});var n=i(25045),o=i(81937);class r{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),n=t(i);return new Promise((e,t)=>{n.onsuccess=()=>{e(n.result)},n.onerror=()=>{t(n.error)}})}catch(e){return Promise.reject(e)}}async set(e,t){try{await this.performTransaction("readwrite",i=>i.put(t,e))}catch(e){o.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,n._)(this,"dbName",void 0),(0,n._)(this,"dbPromise",void 0),(0,n._)(this,"DB_VERSION",void 0),(0,n._)(this,"storeName",void 0),this.dbName=e,this.dbPromise=null,this.DB_VERSION=1,this.storeName=t}}let s=null;function a(){s=null}async function l(){if(null!=s)return s;try{if("u"<typeof indexedDB)return s=!1,!1;let e="___Jodit___"+Math.random().toString(),t=indexedDB.open(e);return s=await new Promise(i=>{t.onerror=()=>{i(!1)},t.onsuccess=()=>{indexedDB.deleteDatabase(e),i(!0)}})}catch{return s=!1,!1}}},59807:function(e,t,i){"use strict";i.d(t,{LocalStorageProvider:function(){return r},canUsePersistentStorage:function(){return o}});var n=i(25045);let o=(e="localStorage")=>{let t=new Map;if(t.has(e))return t.get(e);let i="___Jodit___"+Math.random().toString(),n="sessionStorage"===e?sessionStorage:localStorage;try{n.setItem(i,"1");let o="1"===n.getItem(i);return n.removeItem(i),t.set(e,o),o}catch{}return t.set(e,!1),!1};class r{get storage(){return"sessionStorage"===this.strategy?sessionStorage:localStorage}set(e,t){try{let i=this.storage.getItem(this.rootKey),n=i?JSON.parse(i):{};n[e]=t,this.storage.setItem(this.rootKey,JSON.stringify(n))}catch{}return this}delete(e){try{this.storage.removeItem(this.rootKey)}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,n._)(this,"rootKey",void 0),(0,n._)(this,"strategy",void 0),this.rootKey=e,this.strategy=t}}},9505:function(e,t,i){"use strict";i.d(t,{MemoryStorageProvider:function(){return o}});var n=i(25045);class o{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,n._)(this,"data",new Map)}}},25222:function(e,t,i){"use strict";i.d(t,{AsyncStorage:function(){return n.AsyncStorage},IndexedDBProvider:function(){return o.IndexedDBProvider},LocalStorageProvider:function(){return r.LocalStorageProvider},MemoryStorageProvider:function(){return s.MemoryStorageProvider},Storage:function(){return a.Storage},StorageKey:function(){return a.StorageKey},canUseIndexedDB:function(){return o.canUseIndexedDB},canUsePersistentStorage:function(){return r.canUsePersistentStorage},clearUseIndexedDBCache:function(){return o.clearUseIndexedDBCache}});var n=i(8006),o=i(91162),r=i(59807),s=i(9505),a=i(24475)},24475:function(e,t,i){"use strict";i.d(t,{Storage:function(){return l},StorageKey:function(){return a}});var n=i(25045),o=i(57821),r=i(59807),s=i(9505);let a="Jodit_";class l{set(e,t){return this.provider.set((0,o.camelCase)(this.prefix+e),t),this}delete(e){return this.provider.delete((0,o.camelCase)(this.prefix+e)),this}get(e){return this.provider.get((0,o.camelCase)(this.prefix+e))}exists(e){return this.provider.exists((0,o.camelCase)(this.prefix+e))}clear(){return this.provider.clear(),this}static makeStorage(e=!1,t){let i;return"localStorage"===e||"sessionStorage"===e?(0,r.canUsePersistentStorage)(e)&&(i=new r.LocalStorageProvider(a+(t||""),e)):!0===e&&(0,r.canUsePersistentStorage)("localStorage")&&(i=new r.LocalStorageProvider(a+(t||""))),i||(i=new s.MemoryStorageProvider),new l(i,t)}constructor(e,t){(0,n._)(this,"provider",void 0),(0,n._)(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 n=i(28077),o=i(28686),r=i(71125),s=i(37333);class a{dlg(e){let t=(0,n.getPopupViewRoot)(this.o,this.container,this.od.body),i=new s.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,r.markOwner)(this,i.container),i.parent=this,i.bindDestruct(this)}confirm(e,t,i){return e=l(e,this),t=l(t,this),s.Confirm.call(this.dlg({closeOnClickOverlay:!0}),e,t,i)}prompt(e,t,i,n,o){return e=l(e,this),t=l(t,this),n=l(n,this),s.Prompt.call(this.dlg({closeOnClickOverlay:!0}),e,t,i,n,o)}alert(e,t,i,n){return e=l(e,this),t=l(t,this),s.Alert.call(this.dlg({closeOnClickOverlay:!0}),e,t,i,n)}}function l(e,t){return(0,o.isString)(e)&&!(0,o.isHTML)(e)&&(e=t.i18n(e)),e}},23183:function(e,t,i){"use strict";i.d(t,{Elms:function(){return o}});var n=i(88475);class o{getElm(e){return this.container.querySelector("."+this.getFullElName(e))}getElms(e){return(0,n.toArray)(this.container.querySelectorAll("."+this.getFullElName(e)))}}},81987:function(e,t,i){"use strict";i.d(t,{Mods:function(){return o}});var n=i(18303);class o{afterSetMod(e,t){}setMod(e,t,i){e=e.toLowerCase();let o=this.mods[e];if(o===t)return this;let r=`${this.componentName}_${e}_`,s=(i||this.container).classList;return null!=o&&s.remove(`${r}${o.toString().toLowerCase()}`),(0,n.isVoid)(t)||""===t||s.add(`${r}${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 _},UIButtonState:function(){return g}});var n=i(25045),o=i(31635),r=i(69364),s=i(51676),a=i(91672),l=i(68616),c=i(23211),u=i(91565),d=i(85932),h=i(28712),p=i(7909),m=i(96007),f=i(29434);let g=()=>({size:"middle",type:"button",role:"button",name:"",value:"",variant:"initial",disabled:!1,activated:!1,icon:{name:"empty",fill:"",iconURL:""},tooltip:"",text:"",tabIndex:void 0});class _ extends m.UIElement{className(){return"UIButton"}setState(e){return Object.assign(this.state,e),this}get text(){let e=this.getElm("text");return(0,h.assert)(e,"Text element not found"),e}get icon(){let e=this.getElm("icon");return(0,h.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)}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):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=f.Icon.makeIcon(this.j,this.state.icon);t&&this.icon.appendChild(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"),n=this.j.c.span(e+"__text");return t.appendChild(i),t.appendChild(n),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,n._)(this,"isButton",!0),(0,n._)(this,"state",g()),(0,n._)(this,"button",void 0),(0,n._)(this,"actionHandlers",[]),this.button=this.container,this.updateSize(),this.onChangeSize(),this.onChangeStatus(),t&&this.hookStatus(r.STATUSES.ready,()=>{this.setState(t)})}}function v(e,t,i,n){let o=new _(e);return o.state.tabIndex=e.o.allowTabNavigation?0:-1,(0,d.isString)(t)?(o.state.icon.name=t,o.state.name=t,n&&(o.state.variant=n),i&&(o.state.text=i)):o.setState(t),o}(0,o.__decorate)([s.cache],_.prototype,"text",null),(0,o.__decorate)([s.cache],_.prototype,"icon",null),(0,o.__decorate)([(0,l.watch)("state.size",{immediately:!1})],_.prototype,"onChangeSize",null),(0,o.__decorate)([(0,l.watch)("state.type",{immediately:!1})],_.prototype,"onChangeType",null),(0,o.__decorate)([(0,l.watch)("state.role",{immediately:!1})],_.prototype,"onChangeRole",null),(0,o.__decorate)([(0,l.watch)("parentElement")],_.prototype,"updateSize",null),(0,o.__decorate)([(0,l.watch)("state.variant",{immediately:!1})],_.prototype,"onChangeStatus",null),(0,o.__decorate)([(0,l.watch)("state.text",{immediately:!1})],_.prototype,"onChangeText",null),(0,o.__decorate)([(0,l.watch)("state.text",{immediately:!1})],_.prototype,"onChangeTextSetMode",null),(0,o.__decorate)([(0,l.watch)("state.disabled")],_.prototype,"onChangeDisabled",null),(0,o.__decorate)([(0,l.watch)("state.activated")],_.prototype,"onChangeActivated",null),(0,o.__decorate)([(0,l.watch)("state.name",{immediately:!1})],_.prototype,"onChangeName",null),(0,o.__decorate)([(0,l.watch)("state.tooltip",{immediately:!1})],_.prototype,"onChangeTooltip",null),(0,o.__decorate)([(0,l.watch)("state.tabIndex",{immediately:!1})],_.prototype,"onChangeTabIndex",null),(0,o.__decorate)([(0,l.watch)("state.icon",{immediately:!1})],_.prototype,"onChangeIcon",null),(0,o.__decorate)([s.cacheHTML],_.prototype,"createContainer",null),(0,o.__decorate)([(0,l.watch)("button:click")],_.prototype,"__onActionFire",null),_=(0,o.__decorate)([a.component],_)},15367:function(e,t,i){"use strict";i.d(t,{UIButtonGroup:function(){return c}});var n=i(25045),o=i(31635),r=i(91672),s=i(28712),a=i(53681),l=i(63468);class c extends l.UIGroup{className(){return"UIButtonGroup"}render(e){return`<div>
|
|
9
|
+
`,{group:"state",buttons:[]},{group:"clipboard",buttons:[]},{group:"insert",buttons:[]},{group:"indent",buttons:[]},{group:"color",buttons:[]},{group:"form",buttons:[]},"---",{group:"history",buttons:[]},{group:"search",buttons:[]},{group:"source",buttons:[]},{group:"other",buttons:[]},{group:"info",buttons:[]}]),(0,n._)(this,"controls",void 0),(0,n._)(this,"events",{}),(0,n._)(this,"textIcons",!1),(0,n._)(this,"popupRoot",null),(0,n._)(this,"showBrowserColorPicker",!0),Object.assign(this,r)}}(0,n._)(s,"__defaultOptions",void 0),r=s.prototype,s.prototype.controls={}},24735:function(e,t,i){"use strict";i.d(t,{Async:function(){return f}});var n=i(25045),o=i(81937),r=i(61077),s=i(72068),a=i(91565),l=i(72412),c=i(62101),u=i(52100),d=i(85932),h=i(18303),p=i(28712),m=i(14228);class f{delay(e){return this.promise(t=>this.setTimeout(t,e))}setTimeout(e,t,...i){if(this.isDestructed)return 0;let n={};(0,h.isVoid)(t)&&(t=0),(0,l.isNumber)(t)||(t=(n=t).timeout||0),n.label&&this.clearLabel(n.label);let o=(0,r.setTimeout)(e,t,...i),s=n.label||o;return this.timers.set(s,o),this.__callbacks.set(s,e),o}updateTimeout(e,t){if((0,p.assert)(e&&this.timers.has(e),"Label does not exist"),!e||!this.timers.has(e))return null;let i=this.__callbacks.get(e);return(0,p.assert)((0,a.isFunction)(i),"Callback is not a function"),this.setTimeout(i,{label:e,timeout:t})}clearLabel(e){e&&this.timers.has(e)&&((0,r.clearTimeout)(this.timers.get(e)),this.timers.delete(e),this.__callbacks.delete(e))}clearTimeout(e){if((0,d.isString)(e))return this.clearLabel(e);(0,r.clearTimeout)(e),this.timers.delete(e),this.__callbacks.delete(e)}debounce(e,t,i=!1){let n=0,o=!1,l=[],d=(...t)=>{if(!o){n=0;let i=e(...t);if(o=!0,l.length){let e=()=>{l.forEach(e=>e()),l.length=0};(0,u.isPromise)(i)?i.finally(e):e()}}},h=(...s)=>{o=!1,t?(!n&&i&&d(...s),(0,r.clearTimeout)(n),n=this.setTimeout(()=>d(...s),(0,a.isFunction)(t)?t():t),this.timers.set(e,n)):d(...s)};return(0,c.isPlainObject)(t)&&t.promisify?(...e)=>{let t=this.promise(e=>{l.push(e)}).catch(e=>{if((0,s.isAbortError)(e))return null;throw e});return h(...e),t}:h}microDebounce(e,t=!1){let i,n=!1,o=!0;return(...r)=>{if(i=r,n){o=!0;return}o=!0,t&&(o=!1,e(...i)),n=!0,this.__queueMicrotaskNative(()=>{n=!1,!this.isDestructed&&o&&e(...i)})}}throttle(e,t,i=!1){let n=null,o,r,s;return(...i)=>{(o=!0,s=i,t)?n||(r=()=>{o?(e(...s),o=!1,n=this.setTimeout(r,(0,a.isFunction)(t)?t():t),this.timers.set(r,n)):n=null})():e(...s)}}promise(e){let t=()=>{},i=new Promise((i,n)=>{t=()=>n((0,m.abort)("Abort async")),this.promisesRejections.add(t),e(i,n)});return!i.finally&&"u">typeof process&&!o.IS_ES_NEXT&&(i.finally=e=>(i.then(e).catch(e),i)),i.finally(()=>{this.promisesRejections.delete(t)}).catch(()=>null),i.rejectCallback=t,i}promiseState(e){if(e.status)return e.status;if(!Promise.race)return new Promise(t=>{e.then(e=>(t("fulfilled"),e),e=>{throw t("rejected"),e}),this.setTimeout(()=>{t("pending")},100)});let t={};return Promise.race([e,t]).then(e=>e===t?"pending":"fulfilled",()=>"rejected")}requestIdleCallback(e,t={timeout:100}){let i=this.__requestIdleCallbackNative(e,t);return this.__requestsIdle.add(i),i}requestIdlePromise(e){return this.promise(t=>{let i=this.requestIdleCallback(()=>t(i),e)})}schedulerPostTask(e,t={delay:0,priority:"user-visible"}){let i=new AbortController;if(t.signal&&t.signal.addEventListener("abort",()=>i.abort()),this.__controllers.add(i),void 0!==globalThis.scheduler){let n=globalThis.scheduler.postTask(e,{...t,signal:i.signal});return n.finally(()=>{this.__controllers.delete(i)}).catch(()=>null),n}return this.promise((n,o)=>{let r=this.setTimeout(()=>{try{n(e())}catch(e){o(e)}this.__controllers.delete(i)},t.delay||1);i.signal.addEventListener("abort",()=>{this.clearTimeout(r),this.__controllers.delete(i),o((0,m.abort)())})})}schedulerYield(){return this.schedulerPostTask(()=>{},{priority:"user-visible"})}cancelIdleCallback(e){return this.__requestsIdle.delete(e),this.__cancelIdleCallbackNative(e)}requestAnimationFrame(e){let t=requestAnimationFrame(e);return this.__requestsRaf.add(t),t}cancelAnimationFrame(e){this.__requestsRaf.delete(e),cancelAnimationFrame(e)}clear(){this.__requestsIdle.forEach(e=>this.cancelIdleCallback(e)),this.__requestsRaf.forEach(e=>this.cancelAnimationFrame(e)),this.__controllers.forEach(e=>e.abort()),this.timers.forEach(e=>(0,r.clearTimeout)(this.timers.get(e))),this.timers.clear(),this.promisesRejections.forEach(e=>e()),this.promisesRejections.clear()}destruct(){this.clear(),this.isDestructed=!0}constructor(){(0,n._)(this,"timers",new Map),(0,n._)(this,"__callbacks",new Map),(0,n._)(this,"__queueMicrotaskNative",queueMicrotask?.bind(window)??Promise.resolve().then.bind(Promise.resolve())),(0,n._)(this,"promisesRejections",new Set),(0,n._)(this,"__requestsIdle",new Set),(0,n._)(this,"__controllers",new Set),(0,n._)(this,"__requestsRaf",new Set),(0,n._)(this,"__requestIdleCallbackNative",window.requestIdleCallback?.bind(window)??((e,t)=>{let i=Date.now();return this.setTimeout(()=>{e({didTimeout:!1,timeRemaining:()=>Math.max(0,50-(Date.now()-i))})},t?.timeout??1)})),(0,n._)(this,"__cancelIdleCallbackNative",window.cancelIdleCallback?.bind(window)??(e=>{this.clearTimeout(e)})),(0,n._)(this,"isDestructed",!1)}}},91231:function(e,t,i){"use strict";i.d(t,{Async:function(){return n.Async}});var n=i(24735)},80251:function(e,t,i){"use strict";i.d(t,{Component:function(){return c}});var n=i(25045),o=i(91231),r=i(69364),s=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 n=[this.componentName];return e&&n.push("__"+(e=e.replace(/[^a-z0-9-]/gi,"-"))),t&&(n.push("_",t),n.push("_",(0,a.isVoid)(i)?"true":i.toString())),n.join("")}get ownerDocument(){return this.ow.document}get od(){return this.ownerDocument}get ow(){return this.ownerWindow}get(e,t){return(0,a.get)(e,t||this)}get isReady(){return this.componentStatus===r.STATUSES.ready}get isDestructed(){return this.componentStatus===r.STATUSES.destructed}get isInDestruct(){return r.STATUSES.beforeDestruct===this.componentStatus||r.STATUSES.destructed===this.componentStatus}bindDestruct(e){return e.hookStatus(r.STATUSES.beforeDestruct,()=>!this.isInDestruct&&this.destruct()),this}destruct(){this.setStatus(r.STATUSES.destructed),this.async&&(this.async.destruct(),this.async=void 0),l.get(this)&&l.delete(this),this.ownerWindow=void 0}get componentStatus(){return this.__componentStatus}set componentStatus(e){this.setStatus(e)}setStatus(e){return this.setStatusComponent(e,this)}setStatusComponent(e,t){if(e===this.__componentStatus)return;t===this&&(this.__componentStatus=e);let i=Object.getPrototypeOf(this);i&&(0,a.isFunction)(i.setStatusComponent)&&i.setStatusComponent(e,t);let n=l.get(this),o=n?.[e];o&&o.length&&o.forEach(e=>e(t))}hookStatus(e,t){let i=l.get(this);i||(i={},l.set(this,i)),i[e]||(i[e]=[]),i[e].push(t)}static isInstanceOf(e,t){return e instanceof t}constructor(){(0,n._)(this,"__componentName",void 0),(0,n._)(this,"async",new o.Async),(0,n._)(this,"uid",void 0),(0,n._)(this,"ownerWindow",window),(0,n._)(this,"__componentStatus",r.STATUSES.beforeInit),this.uid="jodit-uid-"+(0,s.uniqueUid)()}}(0,n._)(c,"STATUSES",r.STATUSES)},16964:function(e,t,i){"use strict";i.d(t,{Component:function(){return n.Component},STATUSES:function(){return o.STATUSES},ViewComponent:function(){return r.ViewComponent}});var n=i(80251),o=i(69364),r=i(59609)},69364:function(e,t,i){"use strict";i.d(t,{STATUSES:function(){return n}});let n={beforeInit:"beforeInit",ready:"ready",beforeDestruct:"beforeDestruct",destructed:"destructed"}},59609:function(e,t,i){"use strict";i.d(t,{ViewComponent:function(){return r}});var n=i(25045),o=i(80251);class r extends o.Component{get j(){return this.jodit}get defaultTimeout(){return this.j.defaultTimeout}i18n(e,...t){return this.j.i18n(e,...t)}setParentView(e){return this.jodit=e,e.components.add(this),this}destruct(){return this.j.components.delete(this),super.destruct()}constructor(e){super(),(0,n._)(this,"jodit",void 0),this.setParentView(e)}}},81937:function(e,t,i){"use strict";i.r(t),i.d(t,{ACCURACY:function(){return V},APP_VERSION:function(){return n},BASE_PATH:function(){return eh},BASE_PATH_IS_MIN:function(){return ep},BR:function(){return W},CLIPBOARD_ID:function(){return eg},COMMAND_KEYS:function(){return U},EMULATE_DBLCLICK_TIMEOUT:function(){return et},ES:function(){return o},FAT_MODE:function(){return c},HOMEPAGE:function(){return u},INSEPARABLE_TAGS:function(){return T},INSERT_AS_HTML:function(){return ei},INSERT_AS_TEXT:function(){return eo},INSERT_CLEAR_HTML:function(){return en},INSERT_ONLY_TEXT:function(){return er},INVISIBLE_SPACE:function(){return p},INVISIBLE_SPACE_REG_EXP:function(){return f},INVISIBLE_SPACE_REG_EXP_END:function(){return g},INVISIBLE_SPACE_REG_EXP_START:function(){return _},IS_BLOCK:function(){return C},IS_ES_MODERN:function(){return r},IS_ES_NEXT:function(){return s},IS_IE:function(){return X},IS_INLINE:function(){return k},IS_MAC:function(){return ea},IS_PROD:function(){return a},IS_TEST:function(){return l},KEY_ALIASES:function(){return el},KEY_ALT:function(){return P},KEY_BACKSPACE:function(){return j},KEY_DELETE:function(){return F},KEY_DOWN:function(){return B},KEY_ENTER:function(){return L},KEY_ESC:function(){return A},KEY_F3:function(){return q},KEY_LEFT:function(){return M},KEY_META:function(){return D},KEY_RIGHT:function(){return R},KEY_SPACE:function(){return O},KEY_TAB:function(){return z},KEY_UP:function(){return N},LIST_TAGS:function(){return E},MARKER_CLASS:function(){return ee},MODE_SOURCE:function(){return K},MODE_SPLIT:function(){return G},MODE_WYSIWYG:function(){return Y},NBSP_SPACE:function(){return m},NEARBY:function(){return H},NO_EMPTY_TAGS:function(){return x},PARAGRAPH:function(){return $},PASSIVE_EVENTS:function(){return ev},SAFE_COUNT_CHANGE_CALL:function(){return es},SET_TEST:function(){return d},SOURCE_CONSUMER:function(){return e_},SPACE_REG_EXP:function(){return v},SPACE_REG_EXP_END:function(){return y},SPACE_REG_EXP_START:function(){return b},TEMP_ATTR:function(){return em},TEXT_HTML:function(){return Z},TEXT_PLAIN:function(){return J},TEXT_RTF:function(){return Q},TOKENS:function(){return h},globalDocument:function(){return w},globalWindow:function(){return S},lang:function(){return ef}});let n="4.11.4",o="es2021",r=!0,s=!0,a=!0,l=!1,c=!1,u="https://xdsoft.net/jodit/",d=()=>l=!0,h={},p="\uFEFF",m=" ",f=()=>/[\uFEFF]/g,g=()=>/[\uFEFF]+$/g,_=()=>/^[\uFEFF]+/g,v=()=>/[\s\n\t\r\uFEFF\u200b]+/g,b=()=>/^[\s\n\t\r\uFEFF\u200b]+/g,y=()=>/[\s\n\t\r\uFEFF\u200b]+$/g,S="u">typeof window?window:void 0,w="u">typeof document?document:void 0,C=/^(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,k=/^(STRONG|SPAN|I|EM|B|SUP|SUB|A|U)$/i,E=new Set(["ul","ol"]),I=["img","video","svg","iframe","script","input","textarea","link","jodit","jodit-media"],T=new Set([...I,"br","hr"]),x=new Set(I),D="Meta",j="Backspace",z="Tab",L="Enter",A="Escape",P="Alt",M="ArrowLeft",N="ArrowUp",R="ArrowRight",B="ArrowDown",O="Space",F="Delete",q="F3",H=5,V=10,U=[D,j,F,N,B,R,M,L,A,q,z],W="br",$="p",Y=1,K=2,G=3,X="u">typeof navigator&&(-1!==navigator.userAgent.indexOf("MSIE")||/rv:11.0/i.test(navigator.userAgent)),J=X?"text":"text/plain",Z=X?"html":"text/html",Q=X?"rtf":"text/rtf",ee="jodit-selection_marker",et=300,ei="insert_as_html",en="insert_clear_html",eo="insert_as_text",er="insert_only_text",es=10,ea=void 0!==S&&/Mac|iPod|iPhone|iPad/.test(S.navigator.platform),el={add:"+",break:"pause",cmd:"meta",command:"meta",ctl:"control",ctrl:"control",del:"delete",down:"arrowdown",esc:"escape",ins:"insert",left:"arrowleft",mod:ea?"meta":"control",opt:"alt",option:"alt",return:"enter",right:"arrowright",space:"space",spacebar:"space",up:"arrowup",win:"meta",windows:"meta"},ec=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:eu,isMin:ed}=(()=>{if("u"<typeof document)return{basePath:"",isMin:!0};let e=w.currentScript;if(e)return ec(e.src);let t=w.querySelectorAll("script[src]");return t&&t.length?ec(t[t.length-1].src):ec(S.location.href)})(),eh=eu,ep=ed,em="data-jodit-temp",ef={},eg="clipboard",e_="source-consumer",ev=new Set(["touchstart","touchend","scroll","mousewheel","mousemove","touchmove"])},76517:function(e,t,i){"use strict";i.d(t,{Create:function(){return l}});var n=i(25045),o=i(81937),r=i(23211),s=i(65946),a=i(28712);class l{get doc(){return(0,s.isFunction)(this.document)?this.document():this.document}element(e,t,i){let n=this.doc.createElement(e.toLowerCase());return this.applyCreateAttributes(n),t&&((0,s.isPlainObject)(t)?(0,s.attr)(n,t):i=t),i&&(0,s.asArray)(i).forEach(e=>n.appendChild((0,s.isString)(e)?this.fromHTML(e):e)),n}div(e,t,i){let n=this.element("div",t,i);return e&&(n.className=e),n}sandbox(){let e=this.element("iframe",{sandbox:"allow-same-origin"});this.doc.body.appendChild(e);let t=e.contentWindow?.document;if((0,a.assert)(t,"iframe.contentWindow.document"),!t)throw Error("Iframe error");return t.open(),t.write("<!DOCTYPE html><html><head></head><body></body></html>"),t.close(),[t.body,e]}span(e,t,i){let n=this.element("span",t,i);return e&&(n.className=e),n}a(e,t,i){let n=this.element("a",t,i);return e&&(n.className=e),n}text(e){return this.doc.createTextNode(e)}fake(){return this.text(o.INVISIBLE_SPACE)}fragment(){return this.doc.createDocumentFragment()}fromHTML(e,t){let i=this.div();i.innerHTML=e.toString();let n=i.firstChild===i.lastChild&&i.firstChild?i.firstChild:i;if(r.Dom.safeRemove(n),t){let e=(0,s.refs)(n);Object.keys(t).forEach(i=>{let n=e[i];n&&!1===t[i]&&r.Dom.hide(n)})}return n}applyCreateAttributes(e){if(this.createAttributes){let t=this.createAttributes;if(t&&t[e.tagName.toLowerCase()]){let i=t[e.tagName.toLowerCase()];(0,s.isFunction)(i)?i(e):(0,s.isPlainObject)(i)&&(0,s.attr)(e,i)}}}constructor(e,t){(0,n._)(this,"document",void 0),(0,n._)(this,"createAttributes",void 0),this.document=e,this.createAttributes=t}}},79821:function(e,t,i){"use strict";i.d(t,{Create:function(){return n.Create}});var n=i(76517)},49574:function(e,t,i){"use strict";i.d(t,{autobind:function(){return o}});var n=i(91565);function o(e,t,i){if(!(0,n.isFunction)(i.value))throw TypeError(`@autobind can only be applied to methods, but "${t}" is not a function`);let o=i.value;return{configurable:!0,get(){let e=o.bind(this);return Object.defineProperty(this,t,{value:e,configurable:!0,writable:!0}),e}}}},51676:function(e,t,i){"use strict";i.d(t,{cache:function(){return l},cacheHTML:function(){return c},cached:function(){return a}});var n=i(69364),o=i(23211),r=i(28686),s=i(38027);function a(e,t){let i=Object.getOwnPropertyDescriptor(e,t);return!i||(0,r.isFunction)(i.get)?null:i.value}function l(e,t,i){let n=i.get;if(!n)throw(0,s.error)("Getter property descriptor expected");i.get=function(){let e=n.call(this);return e&&!0===e.noCache||Object.defineProperty(this,t,{configurable:i.configurable,enumerable:i.enumerable,writable:!1,value:e}),e}}function c(e,t,i){let a=i.value;if(!(0,r.isFunction)(a))throw(0,s.error)("Handler must be a Function");let l=!0,c=new WeakMap;i.value=function(...e){if(l&&c.has(this.constructor))return c.get(this.constructor)?.cloneNode(!0);let t=a.apply(this,e);return l&&o.Dom.isElement(t)&&c.set(this.constructor,t),l?t.cloneNode(!0):t},e.hookStatus(n.STATUSES.ready,e=>{l=!!((0,r.isViewObject)(e)?e:e.jodit).options.cache})}},91672:function(e,t,i){"use strict";i.d(t,{component:function(){return s},getComponentClass:function(){return a}});var n=i(81937),o=i(421);let r=new Map;function s(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,o.getClassName)(e.prototype);if(r.has(i)&&!n.IS_PROD)throw Error(`Component with name "${i}" is already registered`);return r.set(i,t),t}function a(e){return r.get(e)}},55184:function(e,t,i){"use strict";i.d(t,{debounce:function(){return a},throttle:function(){return l}});var n=i(16964),o=i(28686),r=i(28712),s=i(33201);function a(e,t=!1,i="debounce"){return(a,l)=>{let c=a[l];if(!(0,o.isFunction)(c))throw(0,s.error)("Handler must be a Function");return a.hookStatus(n.STATUSES.ready,n=>{let{async:s}=n;(0,r.assert)(null!=s,`Component ${n.componentName||n.constructor.name} should have "async:IAsync" field`);let a=(0,o.isFunction)(e)?e(n):e,c=(0,o.isNumber)(a)||(0,o.isPlainObject)(a)?a:n.defaultTimeout;Object.defineProperty(n,l,{configurable:!0,value:s[i](n[l].bind(n),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 o}});var n=i(91565);function o(...e){return t=>{let i=t.prototype;for(let t=0;t<e.length;t++){let o=e[t],r=Object.getOwnPropertyNames(o.prototype);for(let e=0;e<r.length;e++){let t=r[e],s=Object.getOwnPropertyDescriptor(o.prototype,t);null!=s&&(0,n.isFunction)(s.value)&&!(0,n.isFunction)(i[t])&&Object.defineProperty(i,t,{enumerable:!0,configurable:!0,writable:!0,value:function(...e){return s.value.call(this,...e)}})}}}}},29200:function(e,t,i){"use strict";i.d(t,{hook:function(){return r}});var n=i(91565),o=i(33201);function r(e){return(t,i)=>{if(!(0,n.isFunction)(t[i]))throw(0,o.error)("Handler must be a Function");t.hookStatus(e,e=>{e[i].call(e)})}}},35718:function(e,t,i){"use strict";i.d(t,{idle:function(){return s}});var n=i(16964),o=i(91565),r=i(33201);function s(){return(e,t)=>{if(!(0,o.isFunction)(e[t]))throw(0,r.error)("Handler must be a Function");e.hookStatus(n.STATUSES.ready,e=>{let{async:i}=e,n=e[t];e[t]=(...t)=>i.requestIdleCallback(n.bind(e,...t))})}}},84839:function(e,t,i){"use strict";i.r(t),i.d(t,{autobind:function(){return n.autobind},cache:function(){return o.cache},cacheHTML:function(){return o.cacheHTML},cached:function(){return o.cached},component:function(){return r.component},debounce:function(){return s.debounce},derive:function(){return a.derive},getComponentClass:function(){return r.getComponentClass},hook:function(){return l.hook},idle:function(){return c.idle},nonenumerable:function(){return u.nonenumerable},persistent:function(){return d.persistent},throttle:function(){return s.throttle},wait:function(){return h.wait},watch:function(){return p.watch}});var n=i(49574),o=i(51676),r=i(91672),s=i(55184),a=i(24968),l=i(29200),c=i(35718),u=i(41360),d=i(77036),h=i(80840),p=i(68616)},41360:function(e,t,i){"use strict";i.d(t,{nonenumerable:function(){return n}});let n=(e,t)=>{!1!==(Object.getOwnPropertyDescriptor(e,t)||{}).enumerable&&Object.defineProperty(e,t,{enumerable:!1,set(e){Object.defineProperty(this,t,{enumerable:!1,writable:!0,value:e})}})}},77036:function(e,t,i){"use strict";i.d(t,{persistent:function(){return r}});var n=i(69364),o=i(31534);function r(e,t){e.hookStatus(n.STATUSES.ready,e=>{let i=(0,o.isViewObject)(e)?e:e.jodit,n=`${i.options.namespace}${e.componentName}_prop_${t}`,r=e[t];Object.defineProperty(e,t,{get:()=>i.storage.get(n)??r,set(e){i.storage.set(n,e)}})})}},80840:function(e,t,i){"use strict";i.d(t,{wait:function(){return s}});var n=i(69364),o=i(91565),r=i(33201);function s(e){return(t,i)=>{let s=t[i];if(!(0,o.isFunction)(s))throw(0,r.error)("Handler must be a Function");t.hookStatus(n.STATUSES.ready,t=>{let{async:n}=t,o=t[i],r=0;Object.defineProperty(t,i,{configurable:!0,value:function i(...s){n.clearTimeout(r),e(t)?o.apply(t,s):r=n.setTimeout(()=>i(...s),10)}})})}}},68616:function(e,t,i){"use strict";i.d(t,{watch:function(){return d}});var n=i(69364),o=i(70535),r=i(32328),s=i(91565),a=i(62101),l=i(31534),c=i(33201),u=i(71125);function d(e,t){return(i,d)=>{if(!(0,s.isFunction)(i[d]))throw(0,c.error)("Handler must be a Function");let h=t?.immediately??!0,p=t?.context,m=t=>{let n=(0,l.isViewObject)(t)?t:t.jodit,c=(e,...i)=>{if(!t.isInDestruct)return t[d](e,...i)};h||(c=t.async.microDebounce(c,!0)),(0,r.splitArray)(e).forEach(e=>{if(/:/.test(e)){let[i,o]=e.split(":"),r=p;i.length&&(r=t.get(i)),(0,s.isFunction)(r)&&(r=r(t)),n.events.on(r||t,o,c),r||n.events.on(o,c),t.hookStatus("beforeDestruct",()=>{n.events.off(r||t,o,c).off(o,c)});return}let r=e.split("."),[l]=r,d=r.slice(1),h=t[l];(0,a.isPlainObject)(h)&&(0,o.observable)(h).on("change."+d.join("."),c);let m=(0,u.getPropertyDescriptor)(i,l);Object.defineProperty(t,l,{configurable:!0,set(e){let i=h;i!==e&&(h=e,m&&m.set&&m.set.call(t,e),(0,a.isPlainObject)(h)&&(h=(0,o.observable)(h)).on("change."+d.join("."),c),c(l,i,h))},get:()=>m&&m.get?m.get.call(t):h})})};(0,s.isFunction)(i.hookStatus)?i.hookStatus(n.STATUSES.ready,m):m(i)}}},23211:function(e,t,i){"use strict";i.d(t,{Dom:function(){return v}});var n=i(81937),o=i(88475),r=i(17312),s=i(91565),a=i(46248),l=i(3213),c=i(85932),u=i(18303),d=i(4040),h=i(28712),p=i(7909),m=i(80991),f=i(36400),g=i(33201),_=i(71125);class v{static detach(e){for(;e&&e.firstChild;)e.removeChild(e.firstChild)}static wrapNextInline(e,t,i){let n,o=e;i.s.save();let r=!1;do r=!1,(n=o.nextSibling)&&!v.isBlock(n)&&!v.isTag(n,"br")&&(r=!0,o=n);while(r)return v.__wrapElements(t,i,e,o)}static __wrapElements(e,t,i,n){let o=(0,c.isString)(e)?t.createInside.element(e):e;i.parentNode&&i.parentNode.insertBefore(o,i);let r=i;for(;r&&(r=i.nextSibling,o.appendChild(i),i!==n&&r);)i=r;return t.s.restore(),o}static wrapInline(e,t,i){let n,o=e,r=e;i.s.save();let s=!1;do s=!1,(n=o.previousSibling)&&!v.isBlock(n)&&(s=!0,o=n);while(s)do s=!1,(n=r.nextSibling)&&!v.isBlock(n)&&(s=!0,r=n);while(s)return v.__wrapElements(t,i,o,r)}static wrap(e,t,i){let n=(0,c.isString)(t)?i.element(t):t;if(v.isNode(e)){if(!e.parentNode)throw(0,g.error)("Element should be in DOM");e.parentNode.insertBefore(n,e),n.appendChild(e)}else{let t=e.extractContents();e.insertNode(n),n.appendChild(t)}return n}static unwrap(e){let t=e.parentNode;if(t){for(;e.firstChild;)t.insertBefore(e.firstChild,e);v.safeRemove(e)}}static between(e,t,i){let n=e;for(;n&&n!==t&&!(e!==n&&i(n));){let e=n.firstChild||n.nextSibling;if(!e){for(;n&&!n.nextSibling;)n=n.parentNode;e=n?.nextSibling}n=e}}static replace(e,t,i,n=!1,r=!1){let s;if((0,a.isHTML)(t)&&((0,h.assert)(i,"Need create instance for new tag"),t=i.fromHTML(t)),(0,c.isString)(t)?((0,h.assert)(i,"Need create instance for new tag"),s=i.element(t)):s=t,!r)for(;e.firstChild;)s.appendChild(e.firstChild);return n&&v.isElement(e)&&v.isElement(s)&&(0,o.toArray)(e.attributes).forEach(e=>{s.setAttribute(e.name,e.value)}),e.parentNode&&e.parentNode.replaceChild(s,e),s}static isEmptyTextNode(e){return v.isText(e)&&(!e.nodeValue||0===e.nodeValue.replace(n.INVISIBLE_SPACE_REG_EXP(),"").trim().length)}static isEmptyContent(e){return v.each(e,e=>v.isEmptyTextNode(e))}static isContentEditable(e,t){return v.isNode(e)&&!v.closest(e,e=>v.isElement(e)&&"false"===e.getAttribute("contenteditable"),t)}static isEmpty(e,t=n.NO_EMPTY_TAGS){let i;if(!e)return!0;i=(0,s.isFunction)(t)?t:e=>t.has(e.nodeName.toLowerCase());let o=e=>null==e.nodeValue||0===(0,d.trim)(e.nodeValue).length;return v.isText(e)?o(e):!(v.isElement(e)&&i(e))&&v.each(e,e=>{if(v.isText(e)&&!o(e)||v.isElement(e)&&i(e))return!1})}static isNode(e){return!!(e&&(0,c.isString)(e.nodeName)&&"number"==typeof e.nodeType&&e.childNodes&&(0,s.isFunction)(e.appendChild))}static isCell(e){return v.isNode(e)&&("TD"===e.nodeName||"TH"===e.nodeName)}static isList(e){return v.isTag(e,n.LIST_TAGS)}static isLeaf(e){return v.isTag(e,"li")}static isImage(e){return v.isNode(e)&&/^(img|svg|picture|canvas)$/i.test(e.nodeName)}static isBlock(e){return!(0,u.isVoid)(e)&&"object"==typeof e&&v.isNode(e)&&n.IS_BLOCK.test(e.nodeName)}static isText(e){return!!(e&&e.nodeType===Node.TEXT_NODE)}static isComment(e){return!!(e&&e.nodeType===Node.COMMENT_NODE)}static isElement(e){return!!v.isNode(e)&&!!(e.ownerDocument?.defaultView&&e.nodeType===Node.ELEMENT_NODE)}static isFragment(e){return!!v.isNode(e)&&!!(e.ownerDocument?.defaultView&&e.nodeType===Node.DOCUMENT_FRAGMENT_NODE)}static isHTMLElement(e){if(!v.isNode(e))return!1;let t=e.ownerDocument?.defaultView;return!!(t&&e instanceof t.HTMLElement)}static isInlineBlock(e){return v.isElement(e)&&!/^(BR|HR)$/i.test(e.tagName)&&-1!==["inline","inline-block"].indexOf((0,m.css)(e,"display").toString())}static canSplitBlock(e){return!(0,u.isVoid)(e)&&v.isHTMLElement(e)&&v.isBlock(e)&&!/^(TD|TH|CAPTION|FORM)$/.test(e.nodeName)&&void 0!==e.style&&!/^(fixed|absolute)/i.test(e.style.position)}static last(e,t){let i=e?.lastChild;if(!i)return null;do{if(t(i))return i;let n=i.lastChild;if(n||(n=i.previousSibling),!n&&i.parentNode!==e){do i=i.parentNode;while(i&&!i?.previousSibling&&i.parentNode!==e)n=i?.previousSibling}i=n}while(i)return null}static prev(e,t,i,n=!0){return v.find(e,t,i,!1,n)}static next(e,t,i,n=!0){return v.find(e,t,i,!0,n)}static prevWithClass(e,t){return v.prev(e,e=>v.isElement(e)&&e.classList.contains(t),e.parentNode)}static nextWithClass(e,t){return v.next(e,e=>v.isElement(e)&&e.classList.contains(t),e.parentNode)}static find(e,t,i,n=!0,o=!0){let r=this.nextGen(e,i,n,o),s=r.next();for(;!s.done;){if(t(s.value))return s.value;s=r.next()}return null}static*nextGen(e,t,i=!0,n=!0){let o=[],r=e;do{let t=i?r.nextSibling:r.previousSibling;for(;t;)o.unshift(t),t=i?t.nextSibling:t.previousSibling;yield*this.runInStack(e,o,i,n),r=r.parentNode}while(r&&r!==t)return null}static each(e,t,i=!0){let n=this.eachGen(e,i),o=n.next();for(;!o.done;){if(!1===t(o.value))return!1;o=n.next()}return!0}static eachGen(e,t=!0){return this.runInStack(e,[e],t)}static*runInStack(e,t,i,n=!0){for(;t.length;){let o=t.pop();if(n){let e=i?o.lastChild:o.firstChild;for(;e;)t.push(e),e=i?e.previousSibling:e.nextSibling}e!==o&&(yield o)}}static findWithCurrent(e,t,i,n="nextSibling",o="firstChild"){let r=e;do{if(t(r))return r||null;if(o&&r&&r[o]){let e=v.findWithCurrent(r[o],t,r,n,o);if(e)return e}for(;r&&!r[n]&&r!==i;)r=r.parentNode;r&&r[n]&&r!==i&&(r=r[n])}while(r&&r!==i)return null}static findSibling(e,t=!0,i=e=>!v.isEmptyTextNode(e)){let n=v.sibling(e,t);for(;n&&!i(n);)n=v.sibling(n,t);return n&&i(n)?n:null}static findNotEmptySibling(e,t){return v.findSibling(e,t,e=>!v.isEmptyTextNode(e)&&!!(!v.isText(e)||e.nodeValue?.length&&(0,d.trim)(e.nodeValue)))}static findNotEmptyNeighbor(e,t,i){return(0,_.call)(t?v.prev:v.next,e,e=>!!(e&&(!(v.isText(e)||v.isComment(e))||(0,d.trim)(e?.nodeValue||"").length)),i)}static sibling(e,t){return t?e.previousSibling:e.nextSibling}static up(e,t,i,n=!1){let o=e;if(!o)return null;do{if(t(o))return o;if(o===i||!o.parentNode)break;o=o.parentNode}while(o&&o!==i)return o===i&&n&&t(o)?o:null}static closest(e,t,i){let n,o=e=>e.toLowerCase();if((0,s.isFunction)(t))n=t;else if((0,r.isArray)(t)||(0,l.isSet)(t)){let e=(0,l.isSet)(t)?t:new Set(t.map(o));n=t=>!!(t&&e.has(o(t.nodeName)))}else n=e=>!!(e&&o(t)===o(e.nodeName));return v.up(e,n,i)}static furthest(e,t,i){let n=null,o=e?.parentElement;for(;o&&o!==i;)t(o)&&(n=o),o=o?.parentElement;return n}static appendChildFirst(e,t){let i=e.firstChild;i?i!==t&&e.insertBefore(t,i):e.appendChild(t)}static after(e,t){let{parentNode:i}=e;i&&(i.lastChild===e?i.appendChild(t):i.insertBefore(t,e.nextSibling))}static before(e,t){let{parentNode:i}=e;i&&i.insertBefore(t,e)}static prepend(e,t){e.insertBefore(t,e.firstChild)}static append(e,t){(0,r.isArray)(t)?t.forEach(t=>{this.append(e,t)}):e.appendChild(t)}static moveContent(e,t,i=!1,r=()=>!0){let s=(e.ownerDocument||n.globalDocument).createDocumentFragment();(0,o.toArray)(e.childNodes).filter(e=>!!r(e)||(v.safeRemove(e),!1)).forEach(e=>{s.appendChild(e)}),i&&t.firstChild?t.insertBefore(s,t.firstChild):t.appendChild(s)}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=>v.isNode(e)&&e.parentNode&&e.parentNode.removeChild(e))}static safeInsertNode(e,t){e.collapsed||e.deleteContents();let i=v.isFragment(t)?t.lastChild:t;e.startContainer===e.endContainer&&e.collapsed&&v.isTag(e.startContainer,n.INSEPARABLE_TAGS)?v.after(e.startContainer,t):(e.insertNode(t),i&&e.setStartBefore(i)),e.collapse(!0),[t.nextSibling,t.previousSibling].forEach(e=>v.isText(e)&&!e.nodeValue&&v.safeRemove(e))}static hide(e){e&&((0,f.dataBind)(e,"__old_display",e.style.display),e.style.display="none")}static show(e){if(!e)return;let t=(0,f.dataBind)(e,"__old_display");"none"===e.style.display&&(e.style.display=t||"")}static isTag(e,t){if(!this.isElement(e))return!1;let i=e.tagName.toLowerCase(),n=e.tagName.toUpperCase();if(t instanceof Set)return t.has(i)||t.has(n);if(Array.isArray(t))throw TypeError("Dom.isTag does not support array");return i===t||n===t}static markTemporary(e,t){return t&&(0,p.attr)(e,t),(0,p.attr)(e,n.TEMP_ATTR,!0),e}static isTemporary(e){return!!v.isElement(e)&&(v.isMarker(e)||"true"===(0,p.attr)(e,n.TEMP_ATTR))}static isMarker(e){return v.isNode(e)&&v.isTag(e,"span")&&e.hasAttribute("data-"+n.MARKER_CLASS)}static replaceTemporaryFromString(e){return e.replace(/<([a-z]+)[^>]+data-jodit-temp[^>]+>(.+?)<\/\1>/gi,"$2")}static temporaryList(e){return(0,o.toArray)(e.querySelectorAll(`[${n.TEMP_ATTR}]`))}constructor(){throw Error("Dom is static module")}}},27795:function(e,t,i){"use strict";i.d(t,{Dom:function(){return n.Dom},LazyWalker:function(){return o.LazyWalker}});var n=i(23211),o=i(1080)},1080:function(e,t,i){"use strict";i.d(t,{LazyWalker:function(){return l}});var n=i(25045),o=i(31635),r=i(49574),s=i(23211),a=i(60216);class l extends a.Eventify{setWork(e){return this.isWorked&&this.break(),this.workNodes=s.Dom.eachGen(e,!this.options.reverse),this.isFinished=!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.async.cancelIdleCallback(this.idleId)}destruct(){super.destruct(),this.stop()}__workPerform(){if(this.workNodes){this.isWorked=!0;let e=0,t=this.options.timeoutChunkSize??50;for(;!this.isFinished&&e<=t;){let t=this.workNodes.next();if(e+=1,this.visitNode(t.value)&&(this.hadAffect=!0),t.done)return void this.end()}}else this.end();this.isFinished||this._requestStarting()}visitNode(e){return!!e&&(void 0===this.options.whatToShow||e.nodeType===this.options.whatToShow)&&(this.emit("visit",e)??!1)}constructor(e,t={}){super(),(0,n._)(this,"async",void 0),(0,n._)(this,"options",void 0),(0,n._)(this,"workNodes",void 0),(0,n._)(this,"hadAffect",void 0),(0,n._)(this,"isWorked",void 0),(0,n._)(this,"isFinished",void 0),(0,n._)(this,"idleId",void 0),(0,n._)(this,"__schedulerController",void 0),this.async=e,this.options=t,this.workNodes=null,this.hadAffect=!1,this.isWorked=!1,this.isFinished=!1,this.idleId=0,this.__schedulerController=null}}(0,o.__decorate)([r.autobind],l.prototype,"__workPerform",null)},93747:function(e,t,i){"use strict";i.d(t,{EventEmitter:function(){return d}});var n=i(25045),o=i(81937),r=i(32328),s=i(17312),a=i(91565),l=i(85932),c=i(33201),u=i(18869);class d{mute(e){return this.__mutedEvents.add(e??"*"),this}isMuted(e){return!!(e&&this.__mutedEvents.has(e))||this.__mutedEvents.has("*")}unmute(e){return this.__mutedEvents.delete(e??"*"),this}__eachEvent(e,t){(0,r.splitArray)(e).map(e=>e.trim()).forEach(e=>{let i=e.split("."),n=i[1]||u.defaultNameSpace;t.call(this,i[0],n)})}__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]&&Object.defineProperty(e,this.__key,{enumerable:!1,configurable:!0,writable:!0,value:void 0})}__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,n){let r,u,d,p;if((0,l.isString)(e)||(0,l.isStringArray)(e)?(r=this,u=e,d=t,p=i):(r=e,u=t,d=i,p=n),!((0,l.isString)(u)||(0,l.isStringArray)(u))||0===u.length)throw(0,c.error)("Need events names");if(!(0,a.isFunction)(d))throw(0,c.error)("Need event handler");if((0,s.isArray)(r))return r.forEach(e=>{this.on(e,u,d,p)}),this;let m=r,f=this.__getStore(m),g=this,_=function(e,...t){if(!g.isMuted(e))return d&&d.call(this,...t)};return h(m)&&(_=function(e){if(!g.isMuted(e.type)&&(g.__prepareEvent(e),d&&!1===d.call(this,e)))return e.preventDefault(),e.stopImmediatePropagation(),!1}),this.__eachEvent(u,(e,t)=>{if(0===e.length)throw(0,c.error)("Need event name");if(!1===f.indexOf(e,t,d)){let i={event:e,originalCallback:d,syntheticCallback:_};if(f.set(e,t,i,p?.top),h(m)){let t=o.PASSIVE_EVENTS.has(e)?{passive:!0,capture:p?.capture??!1}:p?.capture??!1;_.options=t,m.addEventListener(e,_,t),this.__memoryDOMSubjectToHandler(m,_)}}}),this}__memoryDOMSubjectToHandler(e,t){let i=this.__domEventsMap.get(e)||new Set;i.add(t),this.__domEventsMap.set(e,i)}__unmemoryDOMSubjectToHandler(e,t){let i=this.__domEventsMap,n=i.get(e)||new Set;n.delete(t),n.size?i.set(e,n):i.delete(e)}one(e,t,i,n){let o,r,s,a;(0,l.isString)(e)||(0,l.isStringArray)(e)?(o=this,r=e,s=t,a=i):(o=e,r=t,s=i,a=n);let c=(...e)=>(this.off(o,r,c),s(...e));return this.on(o,r,c,a),this}off(e,t,i){let n,o,r;if((0,l.isString)(e)||(0,l.isStringArray)(e)?(n=this,o=e,r=t):(n=e,o=t,r=i),(0,s.isArray)(n))return n.forEach(e=>{this.off(e,o,r)}),this;let c=n,d=this.__getStore(c);if(!((0,l.isString)(o)||(0,l.isStringArray)(o))||0===o.length)return d.namespaces().forEach(e=>{this.off(c,"."+e)}),this.__removeStoreFromSubject(c),this;let p=e=>{h(c)&&(c.removeEventListener(e.event,e.syntheticCallback,e.syntheticCallback.options??!1),this.__unmemoryDOMSubjectToHandler(c,e.syntheticCallback))},m=(e,t)=>{if(""===e)return void d.events(t).forEach(e=>{""!==e&&m(e,t)});let i=d.get(e,t);if(i&&i.length)if((0,a.isFunction)(r)){let n=d.indexOf(e,t,r);!1!==n&&(p(i[n]),i.splice(n,1),i.length||d.clearEvents(t,e))}else i.forEach(p),i.length=0,d.clearEvents(t,e)};return this.__eachEvent(o,(e,t)=>{t===u.defaultNameSpace?d.namespaces().forEach(t=>{m(e,t)}):m(e,t)}),d.isEmpty()&&this.__removeStoreFromSubject(c),this}stopPropagation(e,t){let i=(0,l.isString)(e)?this:e,n=(0,l.isString)(e)?e:t;if("string"!=typeof n)throw(0,c.error)("Need event names");let o=this.__getStore(i);this.__eachEvent(n,(e,t)=>{let n=o.get(e,t);n&&this.__stopped.push(n),t===u.defaultNameSpace&&o.namespaces(!0).forEach(t=>this.stopPropagation(i,e+"."+t))})}__removeStop(e){if(e){let t=this.__stopped.indexOf(e);-1!==t&&this.__stopped.splice(0,t+1)}}__isStopped(e){return void 0!==e&&-1!==this.__stopped.indexOf(e)}fire(e,t,...i){let n,o,r=(0,l.isString)(e)?this:e,s=(0,l.isString)(e)?e:t,a=(0,l.isString)(e)?[t,...i]:i;if(!h(r)&&!(0,l.isString)(s))throw(0,c.error)("Need events names");let d=this.__getStore(r);return!(0,l.isString)(s)&&h(r)?this.__triggerNativeEvent(r,t):this.__eachEvent(s,(e,t)=>{if(h(r))this.__triggerNativeEvent(r,e);else{let i=d.get(e,t);if(i)try{[...i].every(t=>!this.__isStopped(i)&&(this.currents.push(e),o=t.syntheticCallback.call(r,e,...a),this.currents.pop(),void 0!==o&&(n=o),!0))}finally{this.__removeStop(i)}t!==u.defaultNameSpace||h(r)||d.namespaces().filter(e=>e!==t).forEach(t=>{let i=this.fire.apply(this,[r,e+"."+t,...a]);void 0!==i&&(n=i)})}}),n}destruct(){this.__isDestructed||(this.__isDestructed=!0,this.__domEventsMap.forEach((e,t)=>{this.off(t)}),this.__domEventsMap.clear(),this.__mutedEvents.clear(),this.currents.length=0,this.__stopped.length=0,this.off(this),this.__getStore(this).clear(),this.__removeStoreFromSubject(this))}constructor(e){(0,n._)(this,"__domEventsMap",new Map),(0,n._)(this,"__mutedEvents",new Set),(0,n._)(this,"__key","__JoditEventEmitterNamespaces"),(0,n._)(this,"__doc",o.globalDocument),(0,n._)(this,"__prepareEvent",e=>{!e.cancelBubble&&(e.composed&&(0,a.isFunction)(e.composedPath)&&e.composedPath()[0]&&Object.defineProperty(e,"target",{value:e.composedPath()[0],configurable:!0,enumerable:!0}),e.type.match(/^touch/)&&e.changedTouches&&e.changedTouches.length&&["clientX","clientY","pageX","pageY"].forEach(t=>{Object.defineProperty(e,t,{value:e.changedTouches[0][t],configurable:!0,enumerable:!0})}),e.originalEvent||(e.originalEvent=e),"paste"===e.type&&void 0===e.clipboardData&&this.__doc.defaultView.clipboardData&&Object.defineProperty(e,"clipboardData",{get:()=>this.__doc.defaultView.clipboardData,configurable:!0,enumerable:!0}))}),(0,n._)(this,"currents",[]),(0,n._)(this,"__stopped",[]),(0,n._)(this,"__isDestructed",!1),e&&(this.__doc=e),this.__key+=new Date().getTime()}}function h(e){return(0,a.isFunction)(e.addEventListener)}},60216:function(e,t,i){"use strict";i.d(t,{Eventify:function(){return o}});var n=i(25045);class o{on(e,t){return this.__map.has(e)||this.__map.set(e,new Set),this.__map.get(e)?.add(t),this}off(e,t){return this.__map.has(e)&&this.__map.get(e)?.delete(t),this}destruct(){this.__map.clear()}emit(e,...t){let i;return this.__map.has(e)&&this.__map.get(e)?.forEach(e=>{i=e(...t)}),i}constructor(){(0,n._)(this,"__map",new Map)}}},42689:function(e,t,i){"use strict";i.d(t,{eventEmitter:function(){return n}});let n=new(i(93747)).EventEmitter},1496:function(e,t,i){"use strict";i.d(t,{EventEmitter:function(){return n.EventEmitter},EventHandlersStore:function(){return s.EventHandlersStore},Eventify:function(){return o.Eventify},defaultNameSpace:function(){return s.defaultNameSpace},observable:function(){return r.observable}});var n=i(93747),o=i(60216),r=i(70535),s=i(18869)},70535:function(e,t,i){"use strict";i.d(t,{observable:function(){return c}});var n=i(17312),o=i(94013),r=i(62101),s=i(71125);let a=Symbol("observable-object");function l(e){return void 0!==e[a]}function c(e){if(l(e))return e;let t={},i={},c=(t,o)=>((0,n.isArray)(t)?t.map(e=>c(e,o)):(i[t]||(i[t]=[]),i[t].push(o)),e),u=(o,...r)=>{if((0,n.isArray)(o))return void o.map(e=>u(e,...r));try{!t[o]&&i[o]&&(t[o]=!0,i[o].forEach(t=>t.call(e,...r)))}finally{t[o]=!1}},d=(t,i=[])=>{let n={};l(t)||(Object.defineProperty(t,a,{enumerable:!1,value:!0}),Object.keys(t).forEach(a=>{let l=i.concat(a).filter(e=>e.length);n[a]=t[a];let c=(0,s.getPropertyDescriptor)(t,a);Object.defineProperty(t,a,{set(t){let i=n[a];if(!(0,o.isFastEqual)(n[a],t)){u(["beforeChange","beforeChange."+l.join(".")],a,t),(0,r.isPlainObject)(t)&&d(t,l),c&&c.set?c.set.call(e,t):n[a]=t;let o=[];u(["change",...l.reduce((e,t)=>(o.push(t),e.push("change."+o.join(".")),e),[])],l.join("."),i,t?.valueOf?t.valueOf():t)}},get:()=>c&&c.get?c.get.call(e):n[a],enumerable:!0,configurable:!0}),(0,r.isPlainObject)(n[a])&&d(n[a],l)}),Object.defineProperty(e,"on",{value:c}))};return d(e),e}},18869:function(e,t,i){"use strict";i.d(t,{EventHandlersStore:function(){return a},defaultNameSpace:function(){return s}});var n=i(25045),o=i(88475),r=i(28712);let s="JoditEventDefaultNamespace";class a{get(e,t){if(this.__store.has(t)){let i=this.__store.get(t);return(0,r.assert)(i,"-"),i[e]}}indexOf(e,t,i){let n=this.get(e,t);if(n){for(let e=0;e<n.length;e+=1)if(n[e].originalCallback===i)return e}return!1}namespaces(e=!1){let t=(0,o.toArray)(this.__store.keys());return e?t.filter(e=>e!==s):t}events(e){let t=this.__store.get(e);return t?Object.keys(t):[]}set(e,t,i,n=!1){let o=this.__store.get(t);o||(o={},this.__store.set(t,o)),void 0===o[e]&&(o[e]=[]),n?o[e].unshift(i):o[e].push(i)}clear(){this.__store.clear()}clearEvents(e,t){let i=this.__store.get(e);i&&i[t]&&(delete i[t],Object.keys(i).length||this.__store.delete(e))}isEmpty(){return 0===this.__store.size}constructor(){(0,n._)(this,"__store",new Map)}}},28077:function(e,t,i){"use strict";i.d(t,{eventEmitter:function(){return C},extendLang:function(){return b},getContainer:function(){return S},getPopupViewRoot:function(){return w},instances:function(){return p},modules:function(){return v},pluginSystem:function(){return _},uniqueUid:function(){return g}});var n=i(24497),o=i(85932),r=i(31534),s=i(74264),a=i(80991),l=i(421),c=i(85305),u=i(42689),d=i(81937),h=i(27795);let p={},m=1,f=new Set;function g(){function e(){return Math.round(m+=10*(Math.random()+1)).toString(16)}let t=e();for(;f.has(t);)t=e();return f.add(t),t}let _=new c.PluginSystem({getContainer:S}),v={},b=e=>{Object.keys(e).forEach(t=>{d.lang[t]?Object.assign(d.lang[t],e[t]):d.lang[t]=e[t]})},y=new WeakMap;function S(e,t,i="div",a=!1){let c=(0,o.isString)(t)?t:t?(0,l.getClassName)(t.prototype):"jodit-utils",u=y.get(e)||{},d=c+i,p=(0,r.isViewObject)(e)?e:e.j,m=null;if(!u[d]){let t=p.c;if(m=w(p.o,p.container,e.od.body),a&&(0,n.isJoditObject)(e)&&e.od!==e.ed){t=e.createInside;let o="style"===i?e.ed.head:e.ed.body;m=(0,n.isJoditObject)(e)&&e.o.shadowRoot?e.o.shadowRoot:o}let o=t.element(i,{className:`jodit jodit-${(0,s.kebabCase)(c)}-container jodit-box`});o.classList.add("jodit_theme_"+(p.o.theme||"default")),m.appendChild(o),u[d]=o,e.hookStatus("beforeDestruct",()=>{p.events.off(o),h.Dom.safeRemove(o),delete u[d],Object.keys(u).length&&y.delete(e)}),y.set(e,u),p.events.fire("getContainer",o)}return u[d].classList.remove("jodit_theme_default","jodit_theme_dark"),u[d].classList.add("jodit_theme_"+(p.o.theme||"default")),u[d]}function w(e,t,i){return e.popupRoot??e.shadowRoot??h.Dom.closest(t,e=>h.Dom.isHTMLElement(e)&&(h.Dom.isTag(e,"dialog")||["fixed","absolute"].includes((0,a.css)(e,"position"))),i)??i}let C=u.eventEmitter},78982:function(e,t,i){"use strict";i.d(t,{asArray:function(){return o}});var n=i(17312);let o=e=>(0,n.isArray)(e)?e:[e]},45664:function(e,t,i){"use strict";i.d(t,{asArray:function(){return n.asArray},splitArray:function(){return o.splitArray},toArray:function(){return r.toArray}});var n=i(78982),o=i(32328),r=i(88475)},32328:function(e,t,i){"use strict";function n(e){return Array.isArray(e)?e:e.split(/[,\s]+/)}i.d(t,{splitArray:function(){return n}})},88475:function(e,t,i){"use strict";i.d(t,{toArray:function(){return r}});var n=i(23283),o=i(43379);let r=function(...e){return((0,n.isNativeFunction)(Array.from)?Array.from:(0,o.reset)("Array.from")??Array.from).apply(Array,e)}},61077:function(e,t,i){"use strict";i.d(t,{clearTimeout:function(){return n.clearTimeout},setTimeout:function(){return n.setTimeout}});var n=i(79947)},79947:function(e,t,i){"use strict";i.d(t,{clearTimeout:function(){return r},setTimeout:function(){return o}});var n=i(81937);function o(e,t,...i){return t?n.globalWindow.setTimeout(e,t,...i):(e.call(null,...i),0)}function r(e){n.globalWindow.clearTimeout(e)}},98740:function(e,t,i){"use strict";i.d(t,{hasBrowserColorPicker:function(){return o}});var n=i(81937);function o(){let e=!0;try{let t=n.globalDocument.createElement("input");t.type="color",t.value="!",e="color"===t.type&&"!"!==t.value}catch(t){e=!1}return e}},28686:function(e,t,i){"use strict";i.d(t,{hasBrowserColorPicker:function(){return n.hasBrowserColorPicker},hasContainer:function(){return d.hasContainer},isAbortError:function(){return o.isAbortError},isArray:function(){return r.isArray},isBoolean:function(){return s.isBoolean},isDestructable:function(){return d.isDestructable},isEqual:function(){return a.isEqual},isFastEqual:function(){return a.isFastEqual},isFunction:function(){return l.isFunction},isHTML:function(){return c.isHTML},isHtmlFromWord:function(){return u.isHtmlFromWord},isInitable:function(){return d.isInitable},isInt:function(){return h.isInt},isJoditObject:function(){return p.isJoditObject},isLicense:function(){return m.isLicense},isMarker:function(){return f.isMarker},isNativeFunction:function(){return g.isNativeFunction},isNumber:function(){return _.isNumber},isNumeric:function(){return v.isNumeric},isPlainObject:function(){return b.isPlainObject},isPromise:function(){return y.isPromise},isSet:function(){return S.isSet},isString:function(){return w.isString},isStringArray:function(){return w.isStringArray},isURL:function(){return C.isURL},isValidName:function(){return k.isValidName},isViewObject:function(){return E.isViewObject},isVoid:function(){return I.isVoid},isWindow:function(){return T.isWindow}});var n=i(98740),o=i(72068),r=i(17312),s=i(22289),a=i(94013),l=i(91565),c=i(46248),u=i(82166),d=i(52433),h=i(99732),p=i(24497),m=i(44998),f=i(23175),g=i(23283),_=i(72412),v=i(70222),b=i(62101),y=i(52100),S=i(3213),w=i(85932),C=i(91764),k=i(50083),E=i(31534),I=i(18303),T=i(3513)},72068:function(e,t,i){"use strict";function n(e){return!!e&&e instanceof DOMException&&"AbortError"===e.name}i.d(t,{isAbortError:function(){return n}})},17312:function(e,t,i){"use strict";function n(e){return Array.isArray(e)}i.d(t,{isArray:function(){return n}})},22289:function(e,t,i){"use strict";function n(e){return"boolean"==typeof e}i.d(t,{isBoolean:function(){return n}})},94013:function(e,t,i){"use strict";i.d(t,{isEqual:function(){return o},isFastEqual:function(){return r}});var n=i(3347);function o(e,t){return e===t||(0,n.stringify)(e)===(0,n.stringify)(t)}function r(e,t){return e===t}},91565:function(e,t,i){"use strict";function n(e){return"function"==typeof e}i.d(t,{isFunction:function(){return n}})},82166:function(e,t,i){"use strict";function n(e){return -1!==e.search(/<meta.*?Microsoft Excel\s[\d].*?>/)||-1!==e.search(/<meta.*?Microsoft Word\s[\d].*?>/)||-1!==e.search(/style="[^"]*mso-/)&&-1!==e.search(/<font/)}i.d(t,{isHtmlFromWord:function(){return n}})},46248:function(e,t,i){"use strict";i.d(t,{isHTML:function(){return o}});var n=i(85932);let o=e=>(0,n.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 s}});var n=i(23211),o=i(91565),r=i(18303);function s(e){return!(0,r.isVoid)(e)&&(0,o.isFunction)(e.init)}function a(e){return!(0,r.isVoid)(e)&&(0,o.isFunction)(e.destruct)}function l(e){return!(0,r.isVoid)(e)&&n.Dom.isElement(e.container)}},99732:function(e,t,i){"use strict";i.d(t,{isInt:function(){return r}});var n=i(70222),o=i(85932);function r(e){return(0,o.isString)(e)&&(0,n.isNumeric)(e)&&(e=parseFloat(e)),"number"==typeof e&&Number.isFinite(e)&&!(e%1)}},24497:function(e,t,i){"use strict";i.d(t,{isJoditObject:function(){return o}});var n=i(91565);function o(e){return!!(e&&e instanceof Object&&(0,n.isFunction)(e.constructor)&&("u">typeof Jodit&&e instanceof Jodit||e.isJodit))}},44998:function(e,t,i){"use strict";i.d(t,{isLicense:function(){return o}});var n=i(85932);let o=e=>(0,n.isString)(e)&&23===e.length&&/^[a-z0-9]{5}-[a-z0-9]{5}-[a-z0-9]{5}-[a-z0-9]{5}$/i.test(e)},23175:function(e,t,i){"use strict";i.d(t,{isMarker:function(){return o}});var n=i(23211);function o(e){return n.Dom.isMarker(e)}},23283:function(e,t,i){"use strict";function n(e){return!!e&&"function"===(typeof e).toLowerCase()&&(e===Function.prototype||/^\s*function\s*(\b[a-z$_][a-z0-9$_]*\b)*\s*\((|([a-z$_][a-z0-9$_]*)(\s*,[a-z$_][a-z0-9$_]*)*)\)\s*{\s*\[native code]\s*}\s*$/i.test(e+""))}i.d(t,{isNativeFunction:function(){return n}})},72412:function(e,t,i){"use strict";function n(e){return"number"==typeof e&&!isNaN(e)&&isFinite(e)}i.d(t,{isNumber:function(){return n}})},70222:function(e,t,i){"use strict";i.d(t,{isNumeric:function(){return o}});var n=i(85932);function o(e){if((0,n.isString)(e)){if(!e.match(/^([+-])?[0-9]+(\.?)([0-9]+)?(e[0-9]+)?$/))return!1;e=parseFloat(e)}return"number"==typeof e&&!isNaN(e)&&isFinite(e)}},62101:function(e,t,i){"use strict";i.d(t,{isPlainObject:function(){return o}});var n=i(3513);function o(e){return!(!e||"object"!=typeof e||e.nodeType||(0,n.isWindow)(e))&&!(e.constructor&&!({}).hasOwnProperty.call(e.constructor.prototype,"isPrototypeOf"))}},52100:function(e,t,i){"use strict";function n(e){return e&&"function"==typeof e.then}i.d(t,{isPromise:function(){return n}})},3213:function(e,t,i){"use strict";i.d(t,{isSet:function(){return o}});var n=i(91565);function o(e){return!!e&&(0,n.isFunction)(e.has)&&(0,n.isFunction)(e.add)&&(0,n.isFunction)(e.delete)}},85932:function(e,t,i){"use strict";i.d(t,{isString:function(){return o},isStringArray:function(){return r}});var n=i(17312);function o(e){return"string"==typeof e}function r(e){return(0,n.isArray)(e)&&o(e[0])}},91764:function(e,t,i){"use strict";i.d(t,{isURL:function(){return o}});var n=i(81937);function o(e){if(e.includes(" "))return!1;if("u">typeof URL)try{let t=new URL(e);return["https:","http:","ftp:","file:","rtmp:"].includes(t.protocol)}catch(e){return!1}let t=n.globalDocument.createElement("a");return t.href=e,!!t.hostname}},50083:function(e,t,i){"use strict";function n(e){return!!e.length&&!/[^0-9A-Za-zа-яА-ЯЁё\w\-_. ]/.test(e)&&e.trim().length>0}i.d(t,{isValidName:function(){return n}})},31534:function(e,t,i){"use strict";i.d(t,{isViewObject:function(){return o}});var n=i(91565);function o(e){return!!(e&&e instanceof Object&&(0,n.isFunction)(e.constructor)&&e.isView)}},18303:function(e,t,i){"use strict";function n(e){return null==e}i.d(t,{isVoid:function(){return n}})},3513:function(e,t,i){"use strict";function n(e){return null!=e&&e===e.window}i.d(t,{isWindow:function(){return n}})},93387:function(e,t,i){"use strict";i.d(t,{colorToHex:function(){return n}});let n=e=>{if("rgba(0, 0, 0, 0)"===e||""===e)return!1;if(!e)return"#000000";if("#"===e.substr(0,1))return e;let t=/([\s\n\t\r]*?)rgb\((\d+), (\d+), (\d+)\)/.exec(e)||/([\s\n\t\r]*?)rgba\((\d+), (\d+), (\d+), ([\d.]+)\)/.exec(e);if(!t)return"#000000";let i=parseInt(t[2],10),n=parseInt(t[3],10),o=(parseInt(t[4],10)|n<<8|i<<16).toString(16).toUpperCase();for(;o.length<6;)o="0"+o;return t[1]+"#"+o}},7018:function(e,t,i){"use strict";i.d(t,{colorToHex:function(){return n.colorToHex}});var n=i(93387)},30893:function(e,t,i){"use strict";i.d(t,{applyStyles:function(){return l}});var n=i(81937),o=i(23211),r=i(4040),s=i(28723);function a(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 l(e){if(-1===e.indexOf("<html "))return e;e=(e=e.substring(e.indexOf("<html "),e.length)).substring(0,e.lastIndexOf("</html>")+7);let t=n.globalDocument.createElement("iframe");t.style.display="none",n.globalDocument.body.appendChild(t);let i="";try{let l=t.contentDocument||(t.contentWindow?t.contentWindow.document:null);if(l){l.open(),l.write(e),l.close();try{for(let e=0;e<l.styleSheets.length;e+=1){let t=l.styleSheets[e].cssRules;for(let e=0;e<t.length;e+=1)""!==t[e].selectorText&&(0,s.$$)(t[e].selectorText,l.body).forEach(i=>{i.style.cssText=a(t[e].style.cssText+";"+i.style.cssText)})}}catch(e){if(!n.IS_PROD)throw e}o.Dom.each(l.body,e=>{if(o.Dom.isElement(e)){let t=e.getAttribute("style");t&&(e.style.cssText=a(t)),e.hasAttribute("style")&&!e.getAttribute("style")&&e.removeAttribute("style")}}),i=l.firstChild?(0,r.trim)(l.body.innerHTML):""}}catch{}finally{o.Dom.safeRemove(t)}return i&&(e=i),(0,r.trim)(e.replace(/<(\/)?(html|colgroup|col|o:p)[^>]*>/g,"").replace(/<!--[^>]*>/g,""))}},1277:function(e,t,i){"use strict";i.d(t,{cleanFromWord:function(){return a}});var n=i(81937),o=i(23211),r=i(88475),s=i(4040);function a(e){-1!==e.indexOf("<html ")&&(e=(e=e.substring(e.indexOf("<html "),e.length)).substring(0,e.lastIndexOf("</html>")+7));let t="";try{let i=n.globalDocument.createElement("div");i.innerHTML=e;let s=[];i.firstChild&&o.Dom.each(i,e=>{if(e)switch(e.nodeType){case Node.ELEMENT_NODE:switch(e.nodeName){case"STYLE":case"LINK":case"META":s.push(e);break;case"W:SDT":case"W:SDTPR":case"FONT":o.Dom.unwrap(e);break;default:(0,r.toArray)(e.attributes).forEach(t=>{-1===["src","href","rel","content"].indexOf(t.name.toLowerCase())&&e.removeAttribute(t.name)})}break;case Node.TEXT_NODE:break;default:s.push(e)}}),o.Dom.safeRemove.apply(null,s),t=i.innerHTML}catch(e){}return t&&(e=t),(e=e.split(/(\n)/).filter(s.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 o}});var n=i(81937);function o(e){let t=n.globalDocument.createElement("div");return t.textContent=e,t.innerHTML}},82658:function(e,t,i){"use strict";i.d(t,{applyStyles:function(){return n.applyStyles},cleanFromWord:function(){return o.cleanFromWord},htmlspecialchars:function(){return r.htmlspecialchars},nl2br:function(){return s.nl2br},safeHTML:function(){return a.safeHTML},sanitizeHTMLElement:function(){return a.sanitizeHTMLElement},stripTags:function(){return l.stripTags}});var n=i(30893),o=i(1277),r=i(6609),s=i(48838),a=i(48155),l=i(22852)},48838:function(e,t,i){"use strict";function n(e){return e.replace(/\r\n|\r|\n/g,"<br/>")}i.d(t,{nl2br:function(){return n}})},48155:function(e,t,i){"use strict";i.d(t,{safeHTML:function(){return r},sanitizeHTMLElement:function(){return a}});var n=i(23211),o=i(93640);function r(e,t){(n.Dom.isElement(e)||n.Dom.isFragment(e))&&(t.removeEventAttributes??t.removeOnError?(s(e),(0,o.$$)("*",e).forEach(e=>s(e))):t.removeOnError&&(a(e,t),(0,o.$$)("[onerror]",e).forEach(e=>a(e,t))),t.safeJavaScriptLink&&(a(e,t),(0,o.$$)('a[href^="javascript"]',e).forEach(e=>a(e,t))),t.safeLinksTarget&&(0,o.$$)('a[target="_blank"]',e).forEach(e=>{let t=(e.getAttribute("rel")||"").split(/\s+/).filter(Boolean);t.includes("noopener")||t.push("noopener"),t.includes("noreferrer")||t.push("noreferrer"),(0,o.attr)(e,"rel",t.join(" "))}))}function s(e){if(!n.Dom.isElement(e))return!1;let t=!1,i=[];for(let t=0;t<e.attributes.length;t++)e.attributes[t].name.toLowerCase().startsWith("on")&&i.push(e.attributes[t].name);for(let n of i)e.removeAttribute(n),t=!0;return t}function a(e,{safeJavaScriptLink:t,removeOnError:i}={safeJavaScriptLink:!0,removeOnError:!0}){if(!n.Dom.isElement(e))return!1;let r=!1;i&&e.hasAttribute("onerror")&&((0,o.attr)(e,"onerror",null),r=!0);let s=e.getAttribute("href");return t&&s&&0===s.trim().indexOf("javascript")&&((0,o.attr)(e,"href",location.protocol+"//"+s),r=!0),r}},22852:function(e,t,i){"use strict";i.d(t,{stripTags:function(){return function e(t,i=document,u=null){let d=i.createElement("div");return(0,o.isString)(t)?d.innerHTML=t:d.appendChild(t),(0,s.$$)("*",d).forEach(t=>{let o=t.parentNode;if(!o)return;if(u&&n.Dom.isTag(t,u)){let o=t.nodeName.toLowerCase(),r=n.Dom.isTag(t,c)?`%%%jodit-single-${o}%%%`:`%%%jodit-${o}%%%${e(t.innerHTML,i,u)}%%%/jodit-${o}%%%`;n.Dom.before(t,i.createTextNode(r)),n.Dom.safeRemove(t);return}if(n.Dom.isTag(t,l))return void n.Dom.safeRemove(t);if(!n.Dom.isTag(t,a))return;let r=t.nextSibling;!(n.Dom.isText(r)&&/^\s/.test(r.nodeValue||""))&&r&&o.insertBefore(i.createTextNode(" "),r)}),(0,r.trim)(d.innerText).replace(/%%%(\/)?jodit(-single)?-([\w\n]+)%%%/g,(e,t,i,n)=>`<${t?"/":""}${n}>`)}}});var n=i(23211),o=i(85932),r=i(4040),s=i(93640);let a=new Set(["div","p","br","h1","h2","h3","h4","h5","h6","hr"]),l=new Set(["script","style"]),c=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 n.asArray},camelCase:function(){return u.camelCase},cleanFromWord:function(){return a.cleanFromWord},clearTimeout:function(){return o.clearTimeout},colorToHex:function(){return s.colorToHex},fuzzySearchIndex:function(){return u.fuzzySearchIndex},getContentWidth:function(){return c.getContentWidth},getScrollParent:function(){return c.getScrollParent},hasBrowserColorPicker:function(){return r.hasBrowserColorPicker},hasContainer:function(){return r.hasContainer},htmlspecialchars:function(){return a.htmlspecialchars},i18n:function(){return u.i18n},innerWidth:function(){return c.innerWidth},isAbortError:function(){return r.isAbortError},isArray:function(){return r.isArray},isBoolean:function(){return r.isBoolean},isDestructable:function(){return r.isDestructable},isEqual:function(){return r.isEqual},isFastEqual:function(){return r.isFastEqual},isFunction:function(){return r.isFunction},isHTML:function(){return r.isHTML},isHtmlFromWord:function(){return r.isHtmlFromWord},isInitable:function(){return r.isInitable},isInt:function(){return r.isInt},isJoditObject:function(){return r.isJoditObject},isLicense:function(){return r.isLicense},isMarker:function(){return r.isMarker},isNativeFunction:function(){return r.isNativeFunction},isNumber:function(){return r.isNumber},isNumeric:function(){return r.isNumeric},isPlainObject:function(){return r.isPlainObject},isPromise:function(){return r.isPromise},isSet:function(){return r.isSet},isString:function(){return r.isString},isStringArray:function(){return r.isStringArray},isURL:function(){return r.isURL},isValidName:function(){return r.isValidName},isViewObject:function(){return r.isViewObject},isVoid:function(){return r.isVoid},isWindow:function(){return r.isWindow},kebabCase:function(){return 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 o.setTimeout},size:function(){return c.size},splitArray:function(){return n.splitArray},sprintf:function(){return u.sprintf},stringify:function(){return u.stringify},stripTags:function(){return a.stripTags},toArray:function(){return n.toArray},trim:function(){return u.trim},trimChars:function(){return u.trimChars},trimInv:function(){return u.trimInv},ucfirst:function(){return u.ucfirst}});var n=i(45664),o=i(61077),r=i(28686),s=i(7018),a=i(82658),l=i(97022),c=i(86878),u=i(97642),d=i(93640),h={};for(var p in d)0>["default","asArray","splitArray","toArray","clearTimeout","setTimeout","hasBrowserColorPicker","hasContainer","isAbortError","isArray","isBoolean","isDestructable","isEqual","isFastEqual","isFunction","isHTML","isHtmlFromWord","isInitable","isInt","isJoditObject","isLicense","isMarker","isNativeFunction","isNumber","isNumeric","isPlainObject","isPromise","isSet","isString","isStringArray","isURL","isValidName","isViewObject","isVoid","isWindow","colorToHex","applyStyles","cleanFromWord","htmlspecialchars","nl2br","safeHTML","sanitizeHTMLElement","stripTags","NUMBER_FIELDS_REG","normalizeColor","normalizeCssNumericValue","normalizeCssValue","normalizeKeyAliases","normalizeLicense","normalizePath","normalizeRelativePath","normalizeSize","normalizeUrl","getContentWidth","getScrollParent","innerWidth","offset","position","size","CamelCaseToKebabCase","camelCase","fuzzySearchIndex","i18n","kebabCase","sprintf","stringify","trim","trimChars","trimInv","ucfirst"].indexOf(p)&&(h[p]=(function(e){return d[e]}).bind(0,p));i.d(t,h)},97022:function(e,t,i){"use strict";i.d(t,{NUMBER_FIELDS_REG:function(){return o.NUMBER_FIELDS_REG},normalizeColor:function(){return n.normalizeColor},normalizeCssNumericValue:function(){return o.normalizeCssNumericValue},normalizeCssValue:function(){return o.normalizeCssValue},normalizeKeyAliases:function(){return r.normalizeKeyAliases},normalizeLicense:function(){return s.normalizeLicense},normalizePath:function(){return a.normalizePath},normalizeRelativePath:function(){return l.normalizeRelativePath},normalizeSize:function(){return c.normalizeSize},normalizeUrl:function(){return u.normalizeUrl}});var n=i(77367),o=i(19147),r=i(27978),s=i(49663),a=i(18377),l=i(96340),c=i(98831),u=i(48009)},77367:function(e,t,i){"use strict";i.d(t,{normalizeColor:function(){return r}});var n=i(93387),o=i(4040);let r=e=>{let t=["#"],i=(0,n.colorToHex)(e);if(!i)return!1;if(3===(i=(i=(0,o.trim)(i.toUpperCase())).substring(1)).length){for(let e=0;e<3;e+=1)t.push(i[e]),t.push(i[e]);return t.join("")}return i.length>6&&(i=i.slice(0,6)),"#"+i}},19147:function(e,t,i){"use strict";i.d(t,{NUMBER_FIELDS_REG:function(){return a},normalizeCssNumericValue:function(){return l},normalizeCssValue:function(){return c}});var n=i(70222),o=i(18303),r=i(93387),s=i(74264);let a=/^(left|top|bottom|right|width|min|max|height|margin|padding|fontsize|font-size)/i;function l(e,t){return!(0,o.isVoid)(t)&&a.test(e)&&(0,n.isNumeric)(t.toString())?parseInt(t.toString(),10)+"px":t}function c(e,t){if("font-weight"===(0,s.kebabCase)(e)){switch(t.toString().toLowerCase()){case"700":case"bold":return 700;case"400":case"normal":return 400;case"900":case"heavy":return 900}return(0,n.isNumeric)(t)?Number(t):t}return/color/i.test(e)&&/^rgb/i.test(t.toString())&&(0,r.colorToHex)(t.toString())||t}},27978:function(e,t,i){"use strict";i.d(t,{normalizeKeyAliases:function(){return r}});var n=i(81937),o=i(4040);function r(e){let t={},i={meta:1,ctrl:2,control:2,alt:3,shift:4,space:5};return e.replace(/\+\+/g,"+add").split(/[\s]*\+[\s]*/).map(e=>(0,o.trim)(e.toLowerCase())).map(e=>n.KEY_ALIASES[e]||e).sort((e,t)=>i[e]&&!i[t]?-1:!i[e]&&i[t]?1:i[e]&&i[t]?i[e]-i[t]:e>t?1:-1).filter(e=>!t[e]&&""!==e&&(t[e]=!0)).join("+")}},49663:function(e,t,i){"use strict";i.d(t,{normalizeLicense:function(){return n}});let n=(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";i.d(t,{normalizePath:function(){return o}});var n=i(4040);let o=(...e)=>e.filter(e=>(0,n.trim)(e).length).map((t,i)=>(t=t.replace(/([^:])[\\/]+/g,"$1/"),i&&(t=t.replace(/^\//,"")),i!==e.length-1&&(t=t.replace(/\/$/,"")),t)).join("/")},96340:function(e,t,i){"use strict";i.d(t,{normalizeRelativePath:function(){return n}});let n=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:function(){return n}});let n=(e,t)=>/^[0-9]+$/.test(e.toString())?e+t:e.toString()},48009:function(e,t,i){"use strict";i.d(t,{normalizeUrl:function(){return n}});let n=(...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:function(){return n}});let n=(e,t)=>{let i=t.getComputedStyle(e);return e.offsetWidth-parseInt(i.getPropertyValue("padding-left")||"0",10)-parseInt(i.getPropertyValue("padding-right")||"0",10)}},34027:function(e,t,i){"use strict";i.d(t,{getScrollParent:function(){return function e(t){if(!t)return null;let i=o.Dom.isHTMLElement(t),s=i&&(0,r.css)(t,"overflowY");return i&&"visible"!==s&&"hidden"!==s&&t.scrollHeight>=t.clientHeight?t:e(t.parentNode)||n.globalDocument.scrollingElement||n.globalDocument.body}}});var n=i(81937),o=i(23211),r=i(93640)},86878:function(e,t,i){"use strict";i.d(t,{getContentWidth:function(){return n.getContentWidth},getScrollParent:function(){return o.getScrollParent},innerWidth:function(){return r.innerWidth},offset:function(){return a.offset},position:function(){return l.position},size:function(){return s.size}});var n=i(54447),o=i(34027),r=i(83215),s=i(18073),a=i(69143),l=i(23599)},83215:function(e,t,i){"use strict";i.d(t,{innerWidth:function(){return n}});let n=(e,t)=>{let i=t.getComputedStyle(e);return e.clientWidth-(parseFloat(i.paddingLeft||"0")+parseFloat(i.paddingRight||"0"))}},18073:function(e,t,i){"use strict";i.d(t,{size:function(){return o}});var n=i(28686);function o(e){return(0,n.isString)(e)||(0,n.isArray)(e)?e.length:(0,n.isPlainObject)(e)?Object.keys(e).length:0}},69143:function(e,t,i){"use strict";i.d(t,{offset:function(){return n}});let n=(e,t,i,o=!1)=>{let r,s,a;try{r=e.getBoundingClientRect()}catch(e){r={top:0,bottom:0,left:0,right:0,width:0,height:0}}let l=i.body,c=i.documentElement||{clientTop:0,clientLeft:0,scrollTop:0,scrollLeft:0},u=i.defaultView||i.parentWindow,d=u.pageYOffset||c.scrollTop||l.scrollTop,h=u.pageXOffset||c.scrollLeft||l.scrollLeft,p=c.clientTop||l.clientTop||0,m=c.clientLeft||l.clientLeft||0,f=t.iframe;if(!o&&t&&t.options&&t.o.iframe&&f){let{top:e,left:i}=n(f,t,t.od,!0);s=r.top+e,a=r.left+i}else s=r.top+d-p,a=r.left+h-m;return{top:Math.round(s),left:Math.round(a),width:r.width,height:r.height}}},23599:function(e,t,i){"use strict";i.d(t,{position:function(){return function e(t,i,o=!1){let r=t.getBoundingClientRect(),s=r.left,a=r.top;if((0,n.isJoditObject)(i)&&i.iframe&&i.ed.body.contains(t)&&!o){let{left:t,top:n}=e(i.iframe,i,!0);s+=t,a+=n}return{left:Math.round(s),top:Math.round(a),width:Math.round(t.offsetWidth??r.width),height:Math.round(t.offsetHeight??r.height)}}}});var n=i(24497)},57821:function(e,t,i){"use strict";i.d(t,{camelCase:function(){return n}});let n=e=>e.replace(/([-_])(.)/g,(e,t,i)=>i.toUpperCase())},57626:function(e,t,i){"use strict";i.d(t,{fuzzySearchIndex:function(){return o}});var n=i(81937);function o(e,t,i=0,r=1){let s=0,a=0,l=-1,c=0,u=0;for(a=i;s<e.length&&a<t.length;)e[s].toLowerCase()===t[a].toLowerCase()?(s++,c++,u=0,-1===l&&(l=a)):s>0&&(u>=r&&t[a]!==n.INVISIBLE_SPACE?(s=0,l=-1,c=0,u=0,a--):(u++,c++)),a++;return s===e.length?[l,c]:[-1,0]}},18080:function(e,t,i){"use strict";i.d(t,{i18n:function(){return c},sprintf:function(){return l}});var n=i(81937),o=i(85932),r=i(99436),s=i(93640),a=i(5266);let l=(e,t)=>{if(!t||!t.length)return e;let i=/%([sd])/g,n=i.exec(e),o=e,r=0;for(;n&&void 0!==t[r];)o=o.replace(n[0],t[r].toString()),r+=1,n=i.exec(e);return o};function c(e,t,i){if(!(0,o.isString)(e))throw(0,s.error)("i18n: Need string in first argument");if(!e.length)return e;let c=!!i?.debugLanguage,u={},d=e=>t&&t.length?l(e,t):e,h=(0,s.defaultLanguage)(a.Config.defaultOptions.language,a.Config.defaultOptions.language),p=(0,s.defaultLanguage)(i?.language,h),m=t=>{if(!t)return;if((0,o.isString)(t[e]))return d(t[e]);let i=e.toLowerCase();if((0,o.isString)(t[i]))return d(t[i]);let n=(0,r.ucfirst)(e);if((0,o.isString)(t[n]))return d(t[n])};void 0!==n.lang[p]?u=n.lang[p]:c||(u=void 0!==n.lang[h]?n.lang[h]:n.lang.en);let f=i?.i18n;if(f&&f[p]){let e=m(f[p]);if(e)return e}return m(u)||(!c&&n.lang.en&&(0,o.isString)(n.lang.en[e])&&n.lang.en[e]?d(n.lang.en[e]):c?"{"+e+"}":(n.IS_PROD,d(e)))}},97642:function(e,t,i){"use strict";i.d(t,{CamelCaseToKebabCase:function(){return s.CamelCaseToKebabCase},camelCase:function(){return n.camelCase},fuzzySearchIndex:function(){return o.fuzzySearchIndex},i18n:function(){return r.i18n},kebabCase:function(){return s.kebabCase},sprintf:function(){return r.sprintf},stringify:function(){return a.stringify},trim:function(){return l.trim},trimChars:function(){return l.trimChars},trimInv:function(){return l.trimInv},ucfirst:function(){return c.ucfirst}});var n=i(57821),o=i(57626),r=i(18080),s=i(74264),a=i(3347),l=i(4040),c=i(99436)},74264:function(e,t,i){"use strict";i.d(t,{CamelCaseToKebabCase:function(){return o},kebabCase:function(){return n}});let n=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(),o=e=>e.replace(/([A-Z])([A-Z])([a-z])/g,"$1-$2$3").replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()},3347:function(e,t,i){"use strict";function n(e,t={}){if("object"!=typeof e)return e+"";let i=new Set(t.excludeKeys),o=new WeakMap;return JSON.stringify(e,(e,t)=>{if(!i.has(e)){if("object"==typeof t&&null!=t){if(o.get(t))return"[refObject]";o.set(t,!0)}return t}},t.prettify)}i.d(t,{stringify:function(){return n}})},4040:function(e,t,i){"use strict";i.d(t,{trim:function(){return o},trimChars:function(){return r},trimInv:function(){return s}});var n=i(81937);function o(e){return e.replace((0,n.SPACE_REG_EXP_END)(),"").replace((0,n.SPACE_REG_EXP_START)(),"")}function r(e,t){return e.replace(RegExp(`[${t}]+$`),"").replace(RegExp(`^[${t}]+`),"")}function s(e){return e.replace((0,n.INVISIBLE_SPACE_REG_EXP_END)(),"").replace((0,n.INVISIBLE_SPACE_REG_EXP_START)(),"")}},99436:function(e,t,i){"use strict";function n(e){return e.length?e[0].toUpperCase()+e.substring(1):""}i.d(t,{ucfirst:function(){return n}})},16849:function(e,t,i){"use strict";i.d(t,{alignElement:function(){return a},clearAlign:function(){return s},hAlignElement:function(){return r}});var n=i(27795),o=i(80991);function r(e,t){t&&"normal"!==t?"center"!==t?((0,o.css)(e,"float",t),(0,o.clearCenterAlign)(e)):(0,o.css)(e,{float:"",display:"block",marginLeft:"auto",marginRight:"auto"}):((0,o.css)(e,"float")&&-1!==["right","left"].indexOf((0,o.css)(e,"float").toString().toLowerCase())&&(0,o.css)(e,"float",""),(0,o.clearCenterAlign)(e))}function s(e){n.Dom.each(e,e=>{n.Dom.isHTMLElement(e)&&e.style.textAlign&&(e.style.textAlign="",e.style.cssText.trim().length||e.removeAttribute("style"))})}function a(e,t){if(n.Dom.isNode(t)&&n.Dom.isElement(t))switch(s(t),e.toLowerCase()){case"justifyfull":t.style.textAlign="justify";break;case"justifyright":t.style.textAlign="right";break;case"justifyleft":t.style.textAlign="left";break;case"justifycenter":t.style.textAlign="center"}}},47760:function(e,t,i){"use strict";i.d(t,{alreadyLoadedList:function(){return r},appendScriptAsync:function(){return a},appendStyleAsync:function(){return l},loadNext:function(){return function e(t,i,o=0){return(0,n.isString)(i[o])?a(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])?l(t,i[o]).then(()=>e(t,i,o+1)):Promise.resolve()}}});var n=i(85932),o=i(91321);let r=new Map,s=e=>(t,i)=>{if(r.has(i))return r.get(i);let n=e(t,i);return r.set(i,n),n},a=s((e,t)=>e.async.promise((i,n)=>{if(e.isInDestruct)return n();let r=e.c.element("script",{type:"text/javascript",crossorigin:"anonymous",referrerpolicy:"no-referrer",async:!0,src:(0,o.completeUrl)(t)});e.e.one(r,"error",n).one(r,"load",i),e.od.body.appendChild(r)})),l=s((e,t)=>e.async.promise((i,n)=>{if(e.isInDestruct)return n();let r=e.c.element("link");r.rel="stylesheet",r.media="all",r.crossOrigin="anonymous",e.isInDestruct||e.e.on(r,"load",()=>i(r)).on(r,"error",n),r.href=(0,o.completeUrl)(t),e.o.shadowRoot?e.o.shadowRoot.appendChild(r):e.od.body.appendChild(r)}))},7909:function(e,t,i){"use strict";i.d(t,{attr:function(){return function e(t,i,l){if(!t||!(0,n.isFunction)(t.getAttribute))return null;if(!(0,r.isString)(i))return Object.keys(i).forEach(n=>{let r=i[n];(0,o.isPlainObject)(r)&&"style"===n?(0,a.css)(t,r):("className"===n&&(n="class"),e(t,n,r))}),null;let c=(0,s.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)}}});var n=i(91565),o=i(62101),r=i(85932),s=i(74264),a=i(80991)},26136:function(e,t,i){"use strict";i.d(t,{browser:function(){return n}});let n=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";i.d(t,{buildQuery:function(){return o}});var n=i(62101);let o=(e,t)=>{let i=[],r=encodeURIComponent;for(let s in e)if(Object.prototype.hasOwnProperty.call(e,s)){let a=t?t+"["+s+"]":s,l=e[s];i.push((0,n.isPlainObject)(l)?o(l,a):r(a)+"="+r(l))}return i.join("&")}},91321:function(e,t,i){"use strict";i.d(t,{completeUrl:function(){return o}});var n=i(81937);let o=e=>("file:"===n.globalWindow.location.protocol&&/^\/\//.test(e)&&(e="https:"+e),e)},77483:function(e,t,i){"use strict";i.d(t,{ConfigDeepFlatten:function(){return function e(t){return(0,c.keys)(t,!1).reduce((i,n)=>(i[n]=(0,o.isPlainObject)(t[n])?e(t[n]):t[n],i),{})}},ConfigFlatten:function(){return u},ConfigProto:function(){return function e(t,i,c=0){if(Object.getPrototypeOf(t)!==Object.prototype)return t;let u=a.Config.defaultOptions;if((0,r.isString)(t.preset)){if(void 0!==u.presets[t.preset]){let e=u.presets[t.preset];Object.keys(e).forEach(i=>{(0,s.isVoid)(t[i])&&(t[i]=e[i])})}delete t.preset}let d={};return Object.keys(t).forEach(r=>{let s=t[r],a=i?i[r]:null;if((0,o.isPlainObject)(s)&&(0,o.isPlainObject)(a)&&!(0,l.isAtom)(s)){d[r]=e(s,a,c+1);return}if(0!==c&&(0,n.isArray)(s)&&!(0,l.isAtom)(s)&&(0,n.isArray)(a)){d[r]=[...s,...a.slice(s.length)];return}d[r]=s}),Object.setPrototypeOf(d,i),d}}});var n=i(17312),o=i(62101),r=i(85932),s=i(18303),a=i(5266),l=i(54794),c=i(71125);function u(e){return(0,c.keys)(e,!1).reduce((t,i)=>(t[i]=e[i],t),{})}},3856:function(e,t,i){"use strict";i.d(t,{convertMediaUrlToVideoEmbed:function(){return s}});var n=i(81937),o=i(91764),r=i(36310);let s=(e,{width:t=400,height:i=345}={})=>{if(!(0,o.isURL)(e))return e;let s=n.globalDocument.createElement("a"),a=/(?:http?s?:\/\/)?(?:www\.)?(?:vimeo\.com)\/?(.+)/g;s.href=e,t||(t=400),i||(i=345);let l=s.protocol||"";switch(s.hostname){case"www.vimeo.com":case"vimeo.com":return a.test(e)?e.replace(a,'<iframe width="'+t+'" height="'+i+'" src="'+l+'//player.vimeo.com/video/$1" frameborder="0" allowfullscreen></iframe>'):e;case"youtube.com":case"www.youtube.com":case"youtu.be":case"www.youtu.be":{let n=s.search?(0,r.parseQuery)(s.search):{v:s.pathname.substring(1)};return/^embed\/.*/.test(n.v)&&(n.v=n.v.substring(6)),n.v?'<iframe width="'+t+'" height="'+i+'" src="'+l+"//www.youtube.com/embed/"+n.v+'" frameborder="0" allowfullscreen></iframe>':e}}return e}},80991:function(e,t,i){"use strict";i.d(t,{clearCenterAlign:function(){return c},css:function(){return l}});var n=i(22289),o=i(62101),r=i(19147),s=i(57821),a=i(74264);function l(e,t,i,c=!1){if((0,n.isBoolean)(i)&&(c=i,i=void 0),(0,o.isPlainObject)(t)||void 0!==i){let n=(e,t,i)=>{void 0!==(i=(0,r.normalizeCssNumericValue)(t,i))&&(null==i||l(e,t,!0)!==(0,r.normalizeCssValue)(t,i))&&(e.style[t]=i)};if((0,o.isPlainObject)(t)){let i=Object.keys(t);for(let o=0;o<i.length;o+=1)n(e,(0,s.camelCase)(i[o]),t[i[o]])}else n(e,(0,s.camelCase)(t),i);return""}let u=(0,a.kebabCase)(t),d=e.ownerDocument||document,h=!!d&&(d.defaultView||d.parentWindow),p=e.style[t],m="";return void 0!==p&&""!==p?m=p:h&&!c&&(m=h.getComputedStyle(e).getPropertyValue(u)),r.NUMBER_FIELDS_REG.test(t)&&/^[-+]?[0-9.]+px$/.test(m.toString())&&(m=parseInt(m.toString(),10)),(0,r.normalizeCssValue)(t,m)}let c=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:function(){return n}});let n=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";i.d(t,{dataBind:function(){return r}});var n=i(31534);let o=new WeakMap,r=(e,t,i)=>{let r=o.get(e);if(!r){r={},o.set(e,r);let t=null;(0,n.isViewObject)(e.j)&&(t=e.j.e),(0,n.isViewObject)(e)&&(t=e.e),t&&t.on("beforeDestruct",()=>{o.delete(e)})}return void 0===i?r[t]:(r[t]=i,i)}},97228:function(e,t,i){"use strict";i.d(t,{defaultLanguage:function(){return r}});var n=i(81937),o=i(85932);let r=(e,t="en")=>"auto"!==e&&(0,o.isString)(e)?e:n.globalDocument.documentElement&&n.globalDocument.documentElement.lang?n.globalDocument.documentElement.lang:navigator.language?navigator.language.substring(0,2):t},38027:function(e,t,i){"use strict";i.d(t,{connection:function(){return r},error:function(){return o},options:function(){return s}});var n=i(29953);function o(e){return TypeError(e)}function r(e){return new n.ConnectionError(e)}function s(e){return new n.OptionsError(e)}},14228:function(e,t,i){"use strict";function n(e="Aborted"){return new DOMException(e,"AbortError")}i.d(t,{abort:function(){return n}})},58250:function(e,t,i){"use strict";i.d(t,{ConnectionError:function(){return n}});class n extends Error{constructor(e){super(e),Object.setPrototypeOf(this,n.prototype)}}},29953:function(e,t,i){"use strict";i.d(t,{ConnectionError:function(){return o.ConnectionError},OptionsError:function(){return r.OptionsError},abort:function(){return n.abort}});var n=i(14228),o=i(58250),r=i(11080)},11080:function(e,t,i){"use strict";i.d(t,{OptionsError:function(){return n}});class n extends TypeError{constructor(e){super(e),Object.setPrototypeOf(this,n.prototype)}}},33201:function(e,t,i){"use strict";i.d(t,{ConnectionError:function(){return o.ConnectionError},OptionsError:function(){return o.OptionsError},abort:function(){return o.abort},connection:function(){return n.connection},error:function(){return n.error},options:function(){return n.options}});var n=i(38027),o=i(29953)},54794:function(e,t,i){"use strict";i.d(t,{fastClone:function(){return s},isAtom:function(){return o},markAsAtomic:function(){return r}});var n=i(3347);function o(e){return e&&e.isAtom}function r(e){return Object.defineProperty(e,"isAtom",{enumerable:!1,value:!0,configurable:!1}),e}function s(e){return JSON.parse((0,n.stringify)(e))}},421:function(e,t,i){"use strict";i.d(t,{getClassName:function(){return r},keepNames:function(){return o}});var n=i(91565);let o=new Map,r=e=>{if((0,n.isFunction)(e.className))return e.className();let t=e.constructor?.originalConstructor||e.constructor;if(o.has(t))return o.get(t);if(t.name)return t.name;let i=new RegExp(/^\s*function\s*(\S*)\s*\(/),r=t.toString().match(i);return r?r[1]:""}},89308:function(e,t,i){"use strict";i.d(t,{get:function(){return r}});var n=i(85932),o=i(18303);function r(e,t){if(!(0,n.isString)(e)||!e.length)return null;let i=e.split("."),r=t;try{for(let e of i){if((0,o.isVoid)(r[e]))return null;r=r[e]}}catch{return null}return(0,o.isVoid)(r)?null:r}},37427:function(e,t,i){"use strict";i.d(t,{humanSizeToBytes:function(){return n}});let n=e=>{if(/^[0-9.]+$/.test(e.toString()))return parseFloat(e);let t=e.substr(-2,2).toUpperCase(),i=["KB","MB","GB","TB"],n=parseFloat(e.substr(0,e.length-2));return -1!==i.indexOf(t)?n*Math.pow(1024,i.indexOf(t)+1):parseInt(e,10)}},93640:function(e,t,i){"use strict";i.r(t),i.d(t,{$$:function(){return x.$$},ConfigDeepFlatten:function(){return h.ConfigDeepFlatten},ConfigFlatten:function(){return h.ConfigFlatten},ConfigProto:function(){return h.ConfigProto},ConnectionError:function(){return v.ConnectionError},LimitedStack:function(){return j.LimitedStack},OptionsError:function(){return v.OptionsError},abort:function(){return v.abort},alignElement:function(){return n.alignElement},alreadyLoadedList:function(){return o.alreadyLoadedList},appendScriptAsync:function(){return o.appendScriptAsync},appendStyleAsync:function(){return o.appendStyleAsync},attr:function(){return l.attr},browser:function(){return c.browser},buildQuery:function(){return u.buildQuery},call:function(){return z.call},callPromise:function(){return z.callPromise},callThis:function(){return z.callThis},clearAlign:function(){return n.clearAlign},clearCenterAlign:function(){return m.clearCenterAlign},cns:function(){return C.cns},completeUrl:function(){return d.completeUrl},connection:function(){return v.connection},convertMediaUrlToVideoEmbed:function(){return p.convertMediaUrlToVideoEmbed},css:function(){return m.css},cssPath:function(){return x.cssPath},ctrlKey:function(){return f.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 S.getClassName},getDataTransfer:function(){return z.getDataTransfer},getPropertyDescriptor:function(){return z.getPropertyDescriptor},getXPathByElement:function(){return x.getXPathByElement},hAlignElement:function(){return n.hAlignElement},humanSizeToBytes:function(){return w.humanSizeToBytes},inView:function(){return T.inView},isAtom:function(){return b.isAtom},keepNames:function(){return S.keepNames},keys:function(){return z.keys},loadImage:function(){return z.loadImage},loadNext:function(){return o.loadNext},loadNextStyle:function(){return o.loadNextStyle},markAsAtomic:function(){return b.markAsAtomic},markDeprecated:function(){return C.markDeprecated},markOwner:function(){return z.markOwner},memorizeExec:function(){return z.memorizeExec},options:function(){return v.options},parseQuery:function(){return k.parseQuery},previewBox:function(){return E.previewBox},refs:function(){return x.refs},reset:function(){return I.reset},resolveElement:function(){return x.resolveElement},scrollIntoViewIfNeeded:function(){return T.scrollIntoViewIfNeeded},set:function(){return D.set}});var n=i(16849),o=i(47760),r=i(28712),s={};for(var a in r)0>["default","alignElement","clearAlign","hAlignElement","alreadyLoadedList","appendScriptAsync","appendStyleAsync","loadNext","loadNextStyle"].indexOf(a)&&(s[a]=(function(e){return r[e]}).bind(0,a));i.d(t,s);var l=i(7909),c=i(26136),u=i(36833),d=i(91321),h=i(77483),p=i(3856),m=i(80991),f=i(77213),g=i(36400),_=i(97228),v=i(33201),b=i(54794),y=i(89308),S=i(421),w=i(37427),C=i(49385),k=i(36310),E=i(57075),I=i(43379),T=i(60898),x=i(28723),D=i(52144),j=i(42820),z=i(71125)},49385:function(e,t,i){"use strict";i.d(t,{cns:function(){return n},markDeprecated:function(){return o}});let n=console;function o(e,t=[""],i=null){return(...o)=>(n.warn(`Method "${t[0]}" deprecated.`+(t[1]?` Use "${t[1]}" instead`:"")),e.call(i,...o))}},36310:function(e,t,i){"use strict";i.d(t,{parseQuery:function(){return n}});let n=e=>{let t={},i=e.substring(1).split("&");for(let e=0;e<i.length;e+=1){let n=i[e].split("=");t[decodeURIComponent(n[0])]=decodeURIComponent(n[1]||"")}return t}},57075:function(e,t,i){"use strict";i.d(t,{previewBox:function(){return l}});var n=i(23211),o=i(85932),r=i(7909),s=i(80991),a=i(28723);function l(e,t,i="px",c=null){let u=[],d=function(e,t){let i=[];try{(0,a.$$)("img",e.editor).forEach(o=>{let s=[(0,r.attr)(o,"width"),(0,r.attr)(o,"height"),o.src];(0,r.attr)(o,{width:o.offsetWidth+t,height:o.offsetHeight+t});let a=e.createInside.a();e.ed.body.appendChild(a),a.href=o.src,o.src=a.href,n.Dom.safeRemove(a),i.push(()=>{o.src=s[2]??"",(0,r.attr)(o,{width:s[0]||null,height:s[1]||null})})})}catch(e){throw i.forEach(e=>e()),i.length=0,e}return i}(e,i);try{let a=e.e.fire("beforePreviewBox",t,i);if(null!=a)return a;let l=e.c.div("jodit__preview-box jodit-context");c&&c.appendChild(l),(0,s.css)(l,{position:"relative",padding:16});let d=e.value||`<div style='position: absolute;left:50%;top:50%;transform: translateX(-50%) translateY(-50%);color:#ccc;'>${e.i18n("Empty")}</div>`;if(e.iframe){let t=e.create.element("iframe");(0,s.css)(t,{minWidth:800,minHeight:600,border:0}),l.appendChild(t);let i=t.contentWindow;if(i&&(e.e.fire("generateDocumentStructure.iframe",i.document,e),l=i.document.body,"function"==typeof ResizeObserver)){let n=!1,o=i.document.body,r=new ResizeObserver(e.async.debounce(()=>{r.unobserve(o),t.style.height=`${o.offsetHeight+20}px`,e.async.requestAnimationFrame(()=>{n||r.observe(o)})},100)),s=()=>{n=!0,r.unobserve(o),r.disconnect(),e.e.off("beforeDestruct",s)};u.push(s),e.e.on("beforeDestruct",s)}}else(0,s.css)(l,{minWidth:1024,minHeight:600,border:0});let h=(t,i)=>{let s=(0,o.isString)(i)?e.c.div():i;(0,o.isString)(i)&&(s.innerHTML=i);for(let e=0;e<s.childNodes.length;e+=1){let i=s.childNodes[e];if(n.Dom.isElement(i)){let e=t.ownerDocument.createElement(i.nodeName);for(let t=0;t<i.attributes.length;t+=1)(0,r.attr)(e,i.attributes[t].nodeName,i.attributes[t].nodeValue);0===i.childNodes.length||n.Dom.isTag(i,"table")?"SCRIPT"===i.nodeName?i.textContent&&(e.textContent=i.textContent):i.innerHTML&&(e.innerHTML=i.innerHTML):h(e,i);try{t.appendChild(e)}catch{}}else try{t.appendChild(i.cloneNode(!0))}catch{}}};return h(l,d),e.e.fire("afterPreviewBox",l),[l,()=>{u.forEach(e=>e())}]}finally{d.forEach(e=>e())}}},43379:function(e,t,i){"use strict";i.d(t,{reset:function(){return a}});var n=i(81937),o=i(91565),r=i(89308);let s={};function a(e){if(!(e in s)){let t=n.globalDocument.createElement("iframe");try{if(t.src="about:blank",n.globalDocument.body.appendChild(t),!t.contentWindow)return null;let i=(0,r.get)(e,t.contentWindow),a=(0,r.get)(e.split(".").slice(0,-1).join("."),t.contentWindow);(0,o.isFunction)(i)&&(s[e]=i.bind(a))}catch(e){if(!n.IS_PROD)throw e}finally{t.parentNode?.removeChild(t)}}return s[e]??null}},60898:function(e,t,i){"use strict";i.d(t,{inView:function(){return o},scrollIntoViewIfNeeded:function(){return r}});var n=i(23211);function o(e,t,i){let n=e.getBoundingClientRect(),o=e,r=n.top,s=n.height;for(;o&&o!==t&&o.parentNode;)if(!(r<=(n=(o=o.parentNode).getBoundingClientRect()).bottom)||r+s<=n.top)return!1;return r<=(i.documentElement&&i.documentElement.clientHeight||0)}function r(e,t,i){n.Dom.isHTMLElement(e)&&!o(e,t,i)&&(t.clientHeight!==t.scrollHeight&&(t.scrollTop=e.offsetTop),o(e,t,i)||e.scrollIntoView())}},28723:function(e,t,i){"use strict";i.d(t,{$$:function(){return d},cssPath:function(){return m},getXPathByElement:function(){return h},refs:function(){return p},resolveElement:function(){return f}});var n=i(81937),o=i(23211),r=i(88475),s=i(85932),a=i(57821),l=i(7909),c=i(33201);let u=1;function d(e,t){let i;if(!n.IS_ES_NEXT&&/:scope/.test(e)&&n.IS_IE&&!(t&&t.nodeType===Node.DOCUMENT_NODE)){let n=t.id,o=n||"_selector_id_"+(Math.random()+"").slice(2)+ ++u;e=e.replace(/:scope/g,"#"+o),n||t.setAttribute("id",o),i=t.parentNode.querySelectorAll(e),n||t.removeAttribute("id")}else i=t.querySelectorAll(e);return[].slice.call(i)}let h=(e,t)=>{if(!e||e.nodeType!==Node.ELEMENT_NODE||!e.parentNode||t===e)return"";if(e.id)return"//*[@id='"+e.id+"']";let i=[].filter.call(e.parentNode.childNodes,t=>t.nodeName===e.nodeName);return h(e.parentNode,t)+"/"+e.nodeName.toLowerCase()+(i.length>1?"["+((0,r.toArray)(i).indexOf(e)+1)+"]":"")},p=e=>("container"in e&&(e=e.container),d("[ref],[data-ref]",e).reduce((e,t)=>{let i=(0,l.attr)(t,"-ref");return i&&(0,s.isString)(i)&&(e[(0,a.camelCase)(i)]=t,e[i]=t),e},{})),m=e=>{if(!o.Dom.isElement(e))return null;let t=[],i=e;for(;i&&i.nodeType===Node.ELEMENT_NODE;){let e=i.nodeName.toLowerCase();if(i.id){e+="#"+i.id,t.unshift(e);break}{let t=i,n=1;do(t=t.previousElementSibling)&&t.nodeName.toLowerCase()===e&&n++;while(t)e+=":nth-of-type("+n+")"}t.unshift(e),i=i.parentNode}return t.join(" > ")};function f(e,t){let i=e;if((0,s.isString)(e))try{i=t.querySelector(e)}catch{throw(0,c.error)('String "'+e+'" should be valid HTML selector')}if(!i||"object"!=typeof i||!o.Dom.isElement(i)||!i.cloneNode)throw(0,c.error)('Element "'+e+'" should be string or HTMLElement instance');return i}},52144:function(e,t,i){"use strict";i.d(t,{set:function(){return a}});var n=i(17312),o=i(70222),r=i(62101),s=i(85932);function a(e,t,i){if(!(0,s.isString)(e)||!e.length)return;let a=e.split("."),l=i,c=a[0];for(let e=0;e<a.length-1;e+=1)c=a[e],(0,n.isArray)(l[c])||(0,r.isPlainObject)(l[c])||(l[c]=(0,o.isNumeric)(a[e+1])?[]:{}),l=l[c];l&&(l[a[a.length-1]]=t)}},42820:function(e,t,i){"use strict";i.d(t,{LimitedStack:function(){return o}});var n=i(25045);class o{push(e){return this.stack.push(e),this.stack.length>this.limit&&this.stack.shift(),this}pop(){return this.stack.pop()}find(e){return this.stack.find(e)}constructor(e){(0,n._)(this,"limit",void 0),(0,n._)(this,"stack",void 0),this.limit=e,this.stack=[]}}},71125:function(e,t,i){"use strict";i.d(t,{call:function(){return a},callPromise:function(){return u},callThis:function(){return l},getDataTransfer:function(){return m},getPropertyDescriptor:function(){return f},keys:function(){return h},loadImage:function(){return d},markOwner:function(){return c},memorizeExec:function(){return p}});var n=i(52100),o=i(18303),r=i(7909),s=i(36400);function a(e,...t){return e(...t)}function l(e,t,...i){return e.apply(t,i)}function c(e,t){(0,r.attr)(t,"data-editor_id",e.id),t.component||Object.defineProperty(t,"jodit",{value:e})}function u(e,t){return(0,n.isPromise)(e)?e.then(e=>e,()=>null).finally(t):t?.()}let d=(e,t)=>t.async.promise((i,n)=>{let o=new Image,r=()=>{t.e.off(o),n?.()},s=()=>{t.e.off(o),i(o)};t.e.one(o,"load",s).one(o,"error",r).one(o,"abort",r),o.src=e,o.complete&&s()}),h=(e,t=!0)=>{if(t)return Object.keys(e);let i=[];for(let t in e)i.push(t);return i},p=(e,t,{control:i},n)=>{let r="button"+i.command,a=(i.args&&i.args[0])??(0,s.dataBind)(e,r);if((0,o.isVoid)(a))return!1;(0,s.dataBind)(e,r,a),n&&(a=n(a)),e.execCommand(i.command,!1,a??void 0)},m=e=>{if(e.clipboardData)return e.clipboardData;try{return e.dataTransfer||new DataTransfer}catch{return null}};function f(e,t){let i;do i=Object.getOwnPropertyDescriptor(e,t),e=Object.getPrototypeOf(e);while(!i&&e)return i}},55810:function(e,t,i){"use strict";i.d(t,{init:function(){return s}});var n=i(81937),o=i(52433),r=i(3050);function s(e,t,i,s,a,l,c){if((0,o.isInitable)(s))try{s.init(e)}catch(e){if(!n.IS_PROD)throw e}a.set(t,s),l.delete(t),s.hasStyle&&(0,r.loadStyle)(e,t).catch(e=>{n.IS_PROD}),s.styles&&(c(e,t,"style").innerHTML=s.styles)}},3050:function(e,t,i){"use strict";i.d(t,{loadExtras:function(){return u},loadStyle:function(){return l}});var n=i(81937),o=i(74264),r=i(47760),s=i(86189);let a=new Set;async function l(e,t){let i=c(e,t,!1);if(!a.has(i))return a.add(i),(0,r.appendStyleAsync)(e,i)}function c(e,t,i){t=(0,o.kebabCase)(t);let n=e.minified?".min":"";return e.basePath+"plugins/"+t+"/"+t+n+"."+(i?"js":"css")}function u(e,t,i,o){try{let n=i.filter(t=>!e.has((0,s.normalizeName)(t.name)));n.length&&n.map(e=>{let i=e.url||c(t,e.name,!0);return(0,r.appendScriptAsync)(t,i).then(o).catch(()=>null)})}catch(e){if(!n.IS_PROD)throw e}}},25974:function(e,t,i){"use strict";i.d(t,{makeInstance:function(){return r}});var n=i(81937),o=i(91565);function r(e,t){try{try{return(0,o.isFunction)(t)?new t(e):t}catch(i){if((0,o.isFunction)(t)&&!t.prototype)return t(e)}}catch(e){if(!n.IS_PROD)throw e}return null}},86189:function(e,t,i){"use strict";i.d(t,{normalizeName:function(){return o}});var n=i(74264);function o(e){return(0,n.kebabCase)(e).toLowerCase()}},91206:function(e,t,i){"use strict";i.d(t,{Plugin:function(){return n.Plugin}});var n=i(18855);i(85305)},85305:function(e,t,i){"use strict";i.d(t,{PluginSystem:function(){return m}});var n=i(25045),o=i(81937),r=i(42689),s=i(32328),a=i(17312),l=i(52433),c=i(85932),u=i(55810),d=i(3050),h=i(25974),p=i(86189);class m{get size(){return this.__items.size}add(e,t){this.__items.set((0,p.normalizeName)(e),t),r.eventEmitter.fire(`plugin:${e}:ready`)}get(e){return this.__items.get((0,p.normalizeName)(e))}remove(e){this.__items.delete((0,p.normalizeName)(e))}__getFullPluginsList(e){let t=[];return this.__items.forEach((i,n)=>{(!e||e.has(n))&&t.push([n,i])}),t}__init(e){let{extraList:t,disableList:i,filter:n}={extraList:e.o.extraPlugins.map(e=>(0,c.isString)(e)?{name:e}:e),disableList:new Set((0,s.splitArray)(e.o.disablePlugins).map(p.normalizeName)),filter:e.o.safeMode?new Set(e.o.safePluginsList):null},r=new Map,m={},f=new Set;e.__plugins=m;let g=()=>{if(e.isInDestruct)return;let t=!1;this.__getFullPluginsList(n).forEach(([n,o])=>{if(i.has(n)||r.has(n))return;let s=o?.requires;if(s&&(0,a.isArray)(s)&&s.length){if(s.some(e=>i.has(e)))return;if(!s.every(e=>r.has(e)))return void f.add(n)}t=!0;let l=(0,h.makeInstance)(e,o);if(!l){r.set(n,null),f.delete(n);return}(0,u.init)(e,n,o,l,r,f,this.opts.getContainer),m[n]=l}),t&&(e.e.fire("updatePlugins"),g())};t&&t.length&&(0,d.loadExtras)(this.__items,e,t,g),g(),e.e.on("beforeDestruct",()=>{Object.keys(m).forEach(t=>{let i=m[t];(0,l.isDestructable)(i)&&i.destruct(e),delete m[t]}),delete e.__plugins}),o.IS_PROD||f.size}wait(e){return new Promise(t=>{if(this.get(e))return t();let i=()=>{t(),r.eventEmitter.off(`plugin:${e}:ready`,i)};r.eventEmitter.on(`plugin:${e}:ready`,i)})}constructor(e){(0,n._)(this,"opts",void 0),(0,n._)(this,"__items",void 0),this.opts=e,this.__items=new Map}}},18855:function(e,t,i){"use strict";i.d(t,{Plugin:function(){return l}});var n=i(25045),o=i(31635),r=i(16964),s=i(84839),a=i(24497);class l extends r.ViewComponent{className(){return"Plugin"}__afterPluginSystemInit(){let{j:e,buttons:t}=this;t&&(0,a.isJoditObject)(e)&&t.forEach(t=>{e.registerButton(t)})}__afterInit(){this.__inited=!0,this.setStatus(r.STATUSES.ready),this.afterInit(this.jodit)}init(e){this.jodit.isReady&&(this.afterInit(this.jodit),this.__afterPluginSystemInit(),this.jodit.e.fire("rebuildToolbar"))}__beforeDestruct(){if(this.isInDestruct)return;let{j:e}=this;if(e.e.off("afterPluginSystemInit",this.__afterPluginSystemInit).off("afterInit",this.__afterInit).off("beforeDestruct",this.destruct),this.setStatus(r.STATUSES.beforeDestruct),!this.__inited)return super.destruct();(0,a.isJoditObject)(e)&&this.buttons?.forEach(t=>{e?.unregisterButton(t)}),this.beforeDestruct(this.j),super.destruct()}constructor(e){super(e),(0,n._)(this,"buttons",[]),(0,n._)(this,"hasStyle",!1),(0,n._)(this,"styles",void 0),(0,n._)(this,"__inited",!1),e.e.on("afterPluginSystemInit",this.__afterPluginSystemInit).on("afterInit",this.__afterInit).on("beforeDestruct",this.__beforeDestruct)}}(0,n._)(l,"requires",[]),(0,o.__decorate)([s.autobind],l.prototype,"__afterPluginSystemInit",null),(0,o.__decorate)([s.autobind],l.prototype,"__afterInit",null),(0,o.__decorate)([s.autobind],l.prototype,"__beforeDestruct",null)},17338:function(e,t,i){"use strict";i.d(t,{Ajax:function(){return h}});var n=i(25045),o=i(31635),r=i(91231),s=i(81937),a=i(49574),l=i(65946),c=i(33201),u=i(5266);i(37102);var d=i(32855);class h{className(){return"Ajax"}__buildParams(e,t){return(0,l.isPlainObject)(e)&&this.options.contentType&&this.options.contentType.includes("application/json")?JSON.stringify(e):(0,l.isFunction)(this.o.queryBuild)?this.o.queryBuild.call(this,e,t):(0,l.isString)(e)||e instanceof s.globalWindow.FormData||"object"==typeof e&&null!=e&&(0,l.isFunction)(e.append)?e:(0,l.buildQuery)(e)}get o(){return this.options}abort(){if(this.__isFulfilled)return this;try{this.__isFulfilled=!0,this.xhr.abort()}catch{}return this}send(){this.__activated=!0;let{xhr:e,o:t}=this,i=this.prepareRequest();return this.__async.promise(async(n,o)=>{let r=()=>{this.__isFulfilled=!0,o(c.connection("Connection error"))},s=()=>{this.__isFulfilled=!0,n(new d.Response(i,e.status,e.statusText,!e.responseType?e.responseText:e.response))};e.onload=s,e.onabort=()=>{this.__isFulfilled=!0,o(c.abort("Abort connection"))},e.onerror=r,e.ontimeout=r,t.responseType&&(e.responseType=t.responseType),e.onprogress=e=>{let t=0;e.lengthComputable&&(t=e.loaded/e.total*100),this.options.onProgress?.(t)},e.onreadystatechange=()=>{this.options.onProgress?.(10),e.readyState===XMLHttpRequest.DONE&&(t.successStatuses.includes(e.status)?s():e.statusText&&(this.__isFulfilled=!0,o(c.connection(e.statusText))))},e.withCredentials=t.withCredentials??!1;let{url:a,data:u,method:h}=i;e.open(h,a,!0),t.contentType&&e.setRequestHeader&&e.setRequestHeader("Content-type",t.contentType);let{headers:p}=t;(0,l.isFunction)(p)&&(p=await p.call(this)),p&&e.setRequestHeader&&Object.keys(p).forEach(t=>{e.setRequestHeader(t,p[t])}),this.__async.setTimeout(()=>{e.send(u?this.__buildParams(u):void 0)},0)})}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 n=(0,l.parseQuery)(e);e=e.substring(0,i)+"?"+(0,l.buildQuery)({...n,...t})}else e+="?"+(0,l.buildQuery)(this.o.data)}let n={url:e,method:i,data:t};return h.log.splice(100),h.log.push(n),n}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,n._)(this,"__async",new r.Async),(0,n._)(this,"xhr",void 0),(0,n._)(this,"options",void 0),(0,n._)(this,"__isFulfilled",!1),(0,n._)(this,"__activated",!1),(0,n._)(this,"__isDestructed",!1),this.options=(0,l.ConfigProto)(e||{},t),this.xhr=this.o.xhr?this.o.xhr():new XMLHttpRequest}}(0,n._)(h,"log",[]),(0,o.__decorate)([a.autobind],h.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 n.Ajax},Response:function(){return o.Response}});var n=i(17338),o=i(32855)},32855:function(e,t,i){"use strict";i.d(t,{Response:function(){return o}});var n=i(25045);class o{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,o){(0,n._)(this,"status",void 0),(0,n._)(this,"statusText",void 0),(0,n._)(this,"request",void 0),(0,n._)(this,"body",void 0),this.request=e,this.status=t,this.statusText=i,this.body=o}}},42259:function(e,t,i){"use strict";i.d(t,{cursorInTheEdgeOfString:function(){return s},findCorrectCurrentNode:function(){return a},moveNodeInsideStart:function(){return r.moveNodeInsideStart}});var n=i(81937),o=i(23211),r=i(89817);function s(e,t,i,o){let r=e.nodeValue?.length?e.nodeValue:"";if(o&&r.replace((0,n.INVISIBLE_SPACE_REG_EXP_END)(),"").length>t)return!0;let s=(0,n.INVISIBLE_SPACE_REG_EXP_START)().exec(r);return i&&(s&&s[0].length<t||!s&&t>0)}function a(e,t,i,n,r,s){if((e=t.startContainer.childNodes[t.startOffset])||(e=t.startContainer.childNodes[t.startOffset-1],i=!0),e&&n&&!o.Dom.isText(e)){if(!i&&o.Dom.isText(e.previousSibling))e=e.previousSibling;else if(r){let t=s(e);for(;t;){if(t&&o.Dom.isText(t)){e=t;break}t=s(t)}}}if(e&&!n&&!o.Dom.isText(e)){let t=e,i=e;do t=t.firstChild,i=i.lastChild;while(t&&i&&!o.Dom.isText(t))t===i&&t&&o.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 r}});var n=i(81937),o=i(23211);function r(e,t,i){let r=o.Dom.findSibling(t,i),s=o.Dom.findSibling(t,!i);for(;o.Dom.isElement(r)&&!o.Dom.isTag(r,n.INSEPARABLE_TAGS)&&o.Dom.isContentEditable(r,e.editor)&&(!s||!o.Dom.closest(t,o.Dom.isElement,e.editor));)i||!r.firstChild?r.appendChild(t):o.Dom.before(r.firstChild,t),r=o.Dom.sibling(t,i),s=o.Dom.sibling(t,!i)}},7470:function(e,t,i){"use strict";i.d(t,{moveTheNodeAlongTheEdgeOutward:function(){return o}});var n=i(23211);function o(e,t,i){let o=e;for(;o&&o!==i&&!(n.Dom.findSibling(o,t)||n.Dom.isBlock(o.parentElement));)(o=o.parentElement)&&o!==i&&(t?n.Dom.before(o,e):n.Dom.after(o,e))}},59841:function(e,t,i){"use strict";i.d(t,{CommitStyle:function(){return o.CommitStyle},Selection:function(){return n.Selection}});var n=i(98595),o=i(84578)},98595:function(e,t,i){"use strict";i.d(t,{Selection:function(){return m}});var n=i(25045),o=i(31635),r=i(81937),s=i(84839),a=i(23211),l=i(65946),c=i(28686),u=i(28712),d=i(7470),h=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(){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,t=e?.rangeCount?e.getRangeAt(0):null;return!(!t||!a.Dom.isOrContains(this.area,t.startContainer))}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)e.getRangeAt(t).deleteContents(),e.getRangeAt(t).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){this.removeMarkers();try{let i=this.createRange();return(()=>{if(this.doc.caretPositionFromPoint){let n=this.doc.caretPositionFromPoint(e,t);if(n)return i.setStart(n.offsetNode,n.offset)}if(this.doc.caretRangeFromPoint){let n=this.doc.caretRangeFromPoint(e,t);(0,u.assert)(n,"Incorrect caretRangeFromPoint behaviour"),i.setStart(n.startContainer,n.startOffset)}})(),i.collapse(!0),this.selectRange(i),!0}catch{}return!1}get hasMarkers(){return!!this.markers.length}get markers(){return(0,l.$$)("span[data-"+r.MARKER_CLASS+"]",this.area)}removeMarkers(){a.Dom.safeRemove.apply(null,this.markers)}marker(e=!1,t){let i=null;t&&(i=t.cloneRange()).collapse(e);let n=this.j.createInside.span();return n.id=r.MARKER_CLASS+"_"+Number(new Date)+"_"+(Math.random()+"").slice(2),n.style.lineHeight="0",n.style.display="none",a.Dom.markTemporary(n),(0,l.attr)(n,"data-"+r.MARKER_CLASS,e?"start":"end"),n.appendChild(this.j.createInside.text(r.INVISIBLE_SPACE)),i&&a.Dom.isOrContains(this.area,e?i.startContainer:i.endContainer)&&i.insertNode(n),n}restore(){let e=!1,t=e=>`span[data-${r.MARKER_CLASS}=${e?"start":"end"}]`,i=this.area.querySelector(t(!0)),n=this.area.querySelector(t(!1));if(i){if(e=this.createRange(),n)e.setStartAfter(i),a.Dom.safeRemove(i),e.setEndBefore(n),a.Dom.safeRemove(n);else{let t=i.previousSibling;a.Dom.isText(t)?e.setStart(t,t.nodeValue?t.nodeValue.length:0):e.setStartBefore(i),a.Dom.safeRemove(i),e.collapse(!0)}e&&this.selectRange(e)}}fakes(){let e=this.sel;if(!e||!e.rangeCount)return[];let t=e.getRangeAt(0);(0,u.assert)(t,"Range is null");let i=t.cloneRange();i.collapse(!0);let n=this.j.createInside.fake();a.Dom.safeInsertNode(i,n),t.setStartBefore(n);let o=[n];if(!t.collapsed){let e=t.cloneRange();e.collapse(!1);let i=this.j.createInside.fake();a.Dom.safeInsertNode(e,i),t.setEndAfter(i),o.push(i)}return this.selectRange(t),o}restoreFakes(e){let t=e.filter(e=>e.isConnected);if(!t.length)return;let[i,n]=t,o=this.createRange();o.setStartAfter(i),n&&o.setEndBefore(n),this.selectRange(o),i.parentNode?.firstChild!==i.parentNode?.lastChild&&a.Dom.safeRemove(i),n?.parentNode?.firstChild!==n?.parentNode?.lastChild&&a.Dom.safeRemove(n)}save(e=!1){if(this.hasMarkers)return[];let t=this.sel;if(!t||!t.rangeCount)return[];let i=[],n=t.rangeCount,o=[];for(let e=0;n>e;e+=1)if(o[e]=t.getRangeAt(e),o[e].collapsed){let t=this.marker(!0,o[e]);i[e]={startId:t.id,collapsed:!0,startMarker:t.outerHTML}}else{let t=this.marker(!0,o[e]),n=this.marker(!1,o[e]);i[e]={startId:t.id,endId:n.id,collapsed:!1,startMarker:t.outerHTML,endMarker:n.outerHTML}}if(!e){t.removeAllRanges();for(let e=n-1;e>=0;--e){let n=this.doc.getElementById(i[e].startId);if(n){if(i[e].collapsed)o[e].setStartAfter(n),o[e].collapse(!0);else if(o[e].setStartBefore(n),i[e].endId){let t=this.doc.getElementById(i[e].endId);t&&o[e].setEndAfter(t)}try{t.addRange(o[e].cloneRange())}catch{}}}}return i}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 n=this.sel,o=n?.rangeCount?n?.getRangeAt(0):null;if(!o||!a.Dom.isOrContains(this.area,o.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()!==r.MODE_WYSIWYG)return null;let t=this.sel;if(!t||0===t.rangeCount)return null;let i=t.getRangeAt(0),n=i.startContainer,o=!1;if(a.Dom.isTag(n,"br")&&t.isCollapsed)return n;if(!a.Dom.isText(n)){let r=(0,p.findCorrectCurrentNode)(n,i,o,t.isCollapsed,e,e=>o?e.lastChild:e.firstChild);n=r.node,o=r.rightMode}return n&&a.Dom.isOrContains(this.area,n)?n:null}insertNode(e,t=!0,i=!0){this.errorNode(e);let n=a.Dom.isFragment(e)?e.lastChild:e;this.j.e.fire("safeHTML",e),!this.isFocused()&&this.j.isEditorMode()&&(this.focus(),this.restore());let o=this.sel;this.j.history.snapshot.transaction(()=>{if(this.isCollapsed()||this.j.execCommand("Delete"),this.j.e.fire("beforeInsertNode",e),o&&o.rangeCount){let t=o.getRangeAt(0),{firstChild:i}=e;a.Dom.isOrContains(this.area,t.commonAncestorContainer)?a.Dom.safeInsertNode(t,e):this.area.appendChild(e),[()=>i?.previousSibling,()=>i?.previousSibling,()=>i?.previousSibling?.lastChild].forEach(e=>{let t=e();t&&a.Dom.isEmptyTextNode(t)&&a.Dom.safeRemove(t)})}else this.area.appendChild(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)?n&&i(n):i(e)),this.j.o.scrollToPastedContent&&(0,l.scrollIntoViewIfNeeded)(n??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)?n:e)}insertHTML(e,t=!0){if(""===e)return;let i=this.j.createInside.div(),n=this.j.createInside.fragment();if(!this.isFocused()&&this.j.isEditorMode()&&(this.focus(),this.restore()),a.Dom.isNode(e)?i.appendChild(e):i.innerHTML=e.toString(),(this.j.isEditorMode()||!1!==this.j.e.fire("insertHTML",i.innerHTML))&&i.lastChild){for(;i.firstChild;)i.firstChild,n.appendChild(i.firstChild);this.insertNode(n,t,!1),this.j.__imdSynchronizeValues()}}insertImage(e,t=null,i=null){let n=(0,c.isString)(e)?this.j.createInside.element("img"):e;if((0,c.isString)(e)&&n.setAttribute("src",e),null!=i){let e=i.toString();e&&"auto"!==e&&0>(e+"").indexOf("px")&&0>(e+"").indexOf("%")&&(e+="px"),(0,l.attr)(n,"width",e)}t&&"object"==typeof t&&(0,l.css)(n,t);let o=()=>{(n.naturalHeight<n.offsetHeight||n.naturalWidth<n.offsetWidth)&&(n.style.width="",n.style.height=""),n.removeEventListener("load",o)};this.j.e.on(n,"load",o),n.complete&&o(),this.insertNode(n),this.j.e.fire("afterInsertImage",n)}eachSelection(e){let t=this.sel;if(!t||!t.rangeCount)return;let i=t.getRangeAt(0),n=i.commonAncestorContainer;a.Dom.isHTMLElement(n)||(n=n.parentElement);let o=[],s=i.startOffset,u=n.childNodes.length,d=i.startContainer===this.area?n.childNodes[s<u?s:u-1]:i.startContainer,h=i.endContainer===this.area?n.childNodes[i.endOffset-1]:i.endContainer;a.Dom.isText(d)&&d===i.startContainer&&i.startOffset===d.nodeValue?.length&&d.nextSibling&&(d=d.nextSibling),a.Dom.isText(h)&&h===i.endContainer&&0===i.endOffset&&h.previousSibling&&(h=h.previousSibling);let p=e=>{!e||e===n||a.Dom.isEmptyTextNode(e)||(0,c.isMarker)(e)||o.push(e)};p(d),d!==h&&a.Dom.isOrContains(n,d,!0)&&a.Dom.find(d,e=>(p(e),e===h||e&&e.contains&&e.contains(h)),n,!0,!1);let m=t=>{if(a.Dom.isOrContains(this.j.editor,t,!0)){if(t.nodeName.match(/^(UL|OL)$/))return(0,l.toArray)(t.childNodes).forEach(m);if(a.Dom.isTag(t,"li"))if(t.firstChild)t=t.firstChild;else{let e=this.j.createInside.text(r.INVISIBLE_SPACE);t.appendChild(e),t=e}e(t)}};0===o.length&&(a.Dom.isEmptyTextNode(d)&&o.push(d),d.firstChild&&o.push(d.firstChild)),o.forEach(m)}cursorInTheEdge(e,t,i=null){let n=!e,o=this.sel?.getRangeAt(0);if(i??=this.current(!1),!o||!i||!a.Dom.isOrContains(t,i,!0))return null;let r=e?o.startContainer:o.endContainer,s=e?o.startOffset:o.endOffset,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,s,e,n))return!1}else{let e=(0,l.toArray)(r.childNodes);if(n){if(e.slice(s).some(c))return!1}else if(e.slice(0,s).some(c))return!1}let u=i;for(;u&&u!==t;){let t=a.Dom.sibling(u,e);if(!t){u=u.parentNode;continue}if((u=t)&&c(u))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.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(),n=null;return a.Dom.isText(e)?t?i.setStart(e,0):i.setEnd(e,e.nodeValue?.length??0):(n=this.j.createInside.fake(),t?i.setStartBefore(e):i.setEndAfter(e),i.collapse(t),a.Dom.safeInsertNode(i,n),i.selectNode(n)),i.collapse(t),this.selectRange(i),n}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(),n=e,o=e;do{if(a.Dom.isText(n)||a.Dom.isTag(n,r.INSEPARABLE_TAGS))break;o=n,n=t?n.firstChild:n.lastChild}while(n)if(!n){let e=this.j.createInside.text(r.INVISIBLE_SPACE);a.Dom.isTag(o,r.INSEPARABLE_TAGS)?n=o:(o.appendChild(e),o=e)}let s=n||o;return a.Dom.isTag(s,r.INSEPARABLE_TAGS)?t||a.Dom.isTag(s,"br")?i.setStartBefore(s):i.setEndAfter(s):i.selectNodeContents(s),i.collapse(t),this.selectRange(i),o}selectRange(e,t=!0){let i=this.sel;return t&&!this.isFocused()&&this.focus(),i&&(i.removeAllRanges(),i.addRange(e)),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=this.createRange();return i[t?"selectNodeContents":"selectNode"](e),this.selectRange(i)}get html(){let e=this.sel;if(e&&e.rangeCount>0){let t=e.getRangeAt(0).cloneContents(),i=this.j.createInside.div();return i.appendChild(t),i.innerHTML}return""}*wrapInTagGen(e){if(this.isCollapsed()){let t=this.jodit.createInside.element("font",r.INVISIBLE_SPACE);this.insertNode(t,!1,!1),e&&e[0]&&t.appendChild(e[0]),yield t,a.Dom.unwrap(t);return}for(let e of((0,l.$$)("*[style*=font-size]",this.area).forEach(e=>{(0,l.attr)(e,"data-font-size",e.style.fontSize.toString()),e.style.removeProperty("font-size")}),this.j.nativeExecCommand("fontsize",!1,"7"),(0,l.$$)("*[data-font-size]",this.area).forEach(e=>{let t=(0,l.attr)(e,"data-font-size");t&&(e.style.fontSize=t,(0,l.attr)(e,"data-font-size",null))}),(0,l.$$)('font[size="7"]',this.area))){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)}}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,u.assert)((0,l.size)(e)>0,"Need to pass at least one option"),new h.CommitStyle(e).apply(this.j)}splitSelection(e,t){if(!this.isCollapsed())return null;let i=this.createRange(),n=this.range;i.setStartBefore(e);let o=this.cursorOnTheRight(e,t),s=this.cursorOnTheLeft(e,t),l=this.j.createInside.element("br"),c=this.j.createInside.fake(),d=c.cloneNode();try{if(o||s){t?a.Dom.before(t,l):a.Dom.safeInsertNode(n,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,d),a.Dom.before(l,c),o?(i.setEndBefore(l),n.setEndBefore(l)):(i.setEndAfter(l),n.setEndAfter(l))}else i.setEnd(n.startContainer,n.startOffset);let h=i.extractContents(),p=e=>a.Dom.each(e,e=>a.Dom.isEmptyTextNode(e)&&a.Dom.safeRemove(e));(0,u.assert)(e.parentNode,"Splitting fails");try{if(p(h),p(e),e.parentNode.insertBefore(h,e),!t&&o&&l?.parentNode){let e=this.createRange();e.setStartBefore(l),this.selectRange(e)}}catch(e){if(!r.IS_PROD)throw e}let m=e=>{e?.parentNode?.firstChild===e?.parentNode?.lastChild&&e?.parentNode?.appendChild(l.cloneNode())};m(c),m(d)}finally{a.Dom.safeRemove(c),a.Dom.safeRemove(d)}return e.previousElementSibling}expandSelection(){if(this.isCollapsed())return this;let{range:e}=this,t=e.cloneRange();if(!a.Dom.isOrContains(this.j.editor,e.commonAncestorContainer,!0))return this;let i=t=>{let i=this.j.createInside.fake(),n=e.cloneRange();return n.collapse(t),a.Dom.safeInsertNode(n,i),(0,d.moveTheNodeAlongTheEdgeOutward)(i,t,this.j.editor),i},n=i(!0),o=i(!1);t.setStartAfter(n),t.setEndBefore(o);let r=a.Dom.findSibling(n,!1),s=a.Dom.findSibling(o,!0);if(r!==s){let e=a.Dom.isElement(r)&&a.Dom.isOrContains(r,o),i=!e&&a.Dom.isElement(s)&&a.Dom.isOrContains(s,n);if(e||i){let i=e?r:s,l=i;for(;a.Dom.isElement(i);)(i=e?i.firstElementChild:i.lastElementChild)&&(e?a.Dom.isOrContains(i,o):a.Dom.isOrContains(i,n))&&(l=i);e?t.setStart(l,0):t.setEnd(l,l.childNodes.length)}}if(this.selectRange(t),a.Dom.safeRemove(n,o),this.isCollapsed())throw(0,l.error)("Selection is collapsed");return this}constructor(e){(0,n._)(this,"jodit",void 0),this.jodit=e,e.e.on("removeMarkers",()=>{this.removeMarkers()})}}(0,o.__decorate)([s.autobind],m.prototype,"createRange",null),(0,o.__decorate)([s.autobind],m.prototype,"focus",null),(0,o.__decorate)([s.autobind],m.prototype,"setCursorAfter",null),(0,o.__decorate)([s.autobind],m.prototype,"setCursorBefore",null),(0,o.__decorate)([s.autobind],m.prototype,"setCursorIn",null)},17481:function(e,t,i){"use strict";i.d(t,{extractSelectedPart:function(){return a}});var n=i(23211),o=i(23175),r=i(4040),s=i(71125);function a(e,t,i){let n=i.s.createRange(),r=(0,o.isMarker)(t.previousSibling)?t.previousSibling:t;n.setStartBefore(e),n.setEndBefore(r),l(e,n,!0);let s=(0,o.isMarker)(t.nextSibling)?t.nextSibling:t;n.setStartAfter(s),n.setEndAfter(e),l(e,n,!1)}function l(e,t,i){let o=t.extractContents();o.textContent&&(0,r.trim)(o.textContent).length||!o.firstChild||n.Dom.unwrap(o.firstChild),e.parentNode&&(0,s.call)(i?n.Dom.before:n.Dom.after,e,o)}},48729:function(e,t,i){"use strict";i.d(t,{FiniteStateMachine:function(){return a}});var n=i(25045),o=i(81937),r=i(85932),s=i(28712);class a{setState(e){(0,s.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,s.assert)(e&&e!==t,"Action should return new value"),(0,s.assert)((0,r.isString)(e.next),"Value should contain the next state"),(0,s.assert)(e.next!==this.getState(),"The new state should not be equal to the old one."),this.setState(e.next),o.IS_PROD||this.silent,e}throw Error(`invalid action: ${this.getState()}.${e.toString()}`)}constructor(e,t){(0,n._)(this,"transitions",void 0),(0,n._)(this,"__state",void 0),(0,n._)(this,"silent",void 0),(0,n._)(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 s}});var n=i(23211),o=i(83653),r=i(73019);function s(e,t){let{firstChild:i}=t;for(;i&&!(0,o.isNormalNode)(i);)if(!(i=i.nextSibling))return null;return i&&!n.Dom.next(i,o.isNormalNode,t)&&(0,r.isSuitElement)(e,i,!1)?i:null}},19549:function(e,t,i){"use strict";i.d(t,{getSuitParent:function(){return function e(t,i,s){let{parentNode:a}=i;return a===s||!n.Dom.isHTMLElement(a)||n.Dom.next(i,o.isNormalNode,a)||n.Dom.prev(i,o.isNormalNode,a)?null:t.isElementCommit&&t.elementIsBlock&&!n.Dom.isBlock(a)?e(t,a,s):(0,r.isSuitElement)(t,a,!1)&&(!n.Dom.isBlock(a)||t.elementIsBlock)?a:t.isElementCommit&&!n.Dom.isBlock(a)?e(t,a,s):null}}});var n=i(23211),o=i(83653),r=i(73019)},9703:function(e,t,i){"use strict";i.d(t,{hasSameStyle:function(){return c},hasSameStyleKeys:function(){return u}});var n=i(81937),o=i(23211),r=i(18303),s=i(19147),a=i(28712),l=i(80991);function c(e,t){return!!(!o.Dom.isTag(e,"font")&&o.Dom.isHTMLElement(e)&&Object.keys(t).every(i=>{let n=(0,l.css)(e,i,!0);return""===n&&(""===t[i]||null==t[i])||!(0,r.isVoid)(n)&&""!==n&&!(0,r.isVoid)(t[i])&&(0,s.normalizeCssValue)(i,t[i]).toString().toLowerCase()===n.toString().toLowerCase()}))}if(n.globalDocument){let e=n.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!!(!o.Dom.isTag(e,"font")&&o.Dom.isHTMLElement(e)&&Object.keys(t).every(t=>""!==(0,l.css)(e,t,!0)))}if(n.globalDocument){let e=n.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 o.FiniteStateMachine},extractSelectedPart:function(){return n.extractSelectedPart},getSuitChild:function(){return r.getSuitChild},getSuitParent:function(){return s.getSuitParent},isInsideInvisibleElement:function(){return a.isInsideInvisibleElement},suitableClosest:function(){return l.suitableClosest},toggleAttributes:function(){return u.toggleAttributes},toggleOrderedList:function(){return c.toggleOrderedList},unwrapChildren:function(){return d.unwrapChildren},wrap:function(){return h.wrap}});var n=i(17481),o=i(48729),r=i(10171),s=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),d=i(89081),h=i(73154);i(83335)},39608:function(e,t,i){"use strict";i.d(t,{isInsideInvisibleElement:function(){return o}});var n=i(23211);function o(e,t){return!!n.Dom.closest(e,["style","script"],t)}},83653:function(e,t,i){"use strict";i.d(t,{isNormalNode:function(){return r}});var n=i(23211),o=i(23175);function r(e){return!!(e&&!n.Dom.isEmptyTextNode(e)&&!n.Dom.isTemporary(e)&&!(0,o.isMarker)(e))}},95971:function(e,t,i){"use strict";i.d(t,{elementsEqualAttributes:function(){return l},isSameAttributes:function(){return a}});var n=i(18073),o=i(93640),r=i(28712),s=i(9703);function a(e,t){return!((e.attributes.length||(0,n.size)(t))&&(0,n.size)(t))||((0,r.assert)(t,"Attrs must be a non-empty object"),Object.keys(t).every(i=>"class"===i||"className"===i?e.classList.contains(t[i]):"style"===i?(0,s.hasSameStyle)(e,t[i]):(0,o.attr)(e,i)===t[i]))}function l(e,t){return e.attributes.length===t.attributes.length&&Array.from(e.attributes).every(e=>t.hasAttribute(e.name)&&t.getAttribute(e.name)===e.value)}},73019:function(e,t,i){"use strict";i.d(t,{isSameStyleChild:function(){return l},isSuitElement:function(){return s},suitableClosest:function(){return a}});var n=i(23211),o=i(9703),r=i(83653);function s(e,t,i,a=!0){if(!t||!(0,r.isNormalNode)(t))return!1;let{element:l,elementIsDefault:c,options:u}=e;if(n.Dom.isList(t)&&e.elementIsList)return!0;let d=n.Dom.isTag(t,l);return!!(d&&!(c&&i)||u.attributes?.style&&(a?(0,o.hasSameStyle)(t,u.attributes.style):(0,o.hasSameStyleKeys)(t,u.attributes.style))&&!e.elementIsList)||!d&&!i&&c&&n.Dom.isInlineBlock(t)}function a(e,t,i){return n.Dom.closest(t,t=>s(e,t,!0,!1),i)}function l(e,t){let{element:i,options:n}=e;if(!t||!(0,r.isNormalNode)(t))return!1;let s=t.nodeName.toLowerCase()===i,a=!!(n.attributes?.style&&(0,o.hasSameStyleKeys)(t,n.attributes?.style));return s&&a}},34582:function(e,t,i){"use strict";i.d(t,{toggleOrderedList:function(){return c}});var n=i(23211),o=i(28712),r=i(17481),s=i(82794),a=i(98394),l=i(97110);function c(e,t,i,n){if(!t)return n;let o=t.parentElement;if(!o)return n;let r=i.e.fire(`${a._PREFIX}BeforeToggleList`,n,e,o);if(void 0!==r)return r;let c=i.e.fire.bind(i.e,`${a._PREFIX}AfterToggleList`);if(n!==a.UNWRAP){let r=(0,s.toggleAttributes)(e,t.parentElement,i,a.INITIAL,!0)===a.CHANGE;if(n===a.REPLACE||r||o.tagName.toLowerCase()!==e.element){let n=u(a.REPLACE,o,t,i,e),r=(0,l.wrapList)(e,n,i);return c(a.REPLACE,r,e),a.REPLACE}}let d=u(a.UNWRAP,o,t,i,e);return c(a.UNWRAP,d,e),a.UNWRAP}function u(e,t,i,s,l){let c=s.e.fire(`${a._PREFIX}BeforeUnwrapList`,e,t,l);return c?((0,o.assert)(n.Dom.isHTMLElement(c),`${a._PREFIX}BeforeUnwrapList hook must return HTMLElement`),c):((0,r.extractSelectedPart)(t,i,s),(0,o.assert)(n.Dom.isHTMLElement(i.parentElement),"Element should be inside the list"),n.Dom.unwrap(i.parentElement),n.Dom.replace(i,"br"!==s.o.enter.toLowerCase()?s.o.enter:s.createInside.fragment(),s.createInside))}},97110:function(e,t,i){"use strict";i.d(t,{wrapList:function(){return a}});var n=i(23211),o=i(95971),r=i(82794),s=i(98394);function a(e,t,i){let a=i.e.fire(`${s._PREFIX}BeforeWrapList`,s.REPLACE,t,e)??n.Dom.replace(t,"li",i.createInside),l=a.previousElementSibling,c=a.nextElementSibling,u=n.Dom.isTag(l,e.element)?l:null;return u??=n.Dom.isTag(c,e.element)?c:null,n.Dom.isList(u)&&(0,o.isSameAttributes)(u,e.options.attributes)||(u=i.createInside.element(e.element),(0,r.toggleAttributes)(e,u,i,s.INITIAL),n.Dom.before(a,u)),l===u?n.Dom.append(u,a):n.Dom.prepend(u,a),n.Dom.isTag(u.nextElementSibling,e.element)&&(0,o.elementsEqualAttributes)(u,u.nextElementSibling)&&(n.Dom.append(u,Array.from(u.nextElementSibling.childNodes)),n.Dom.safeRemove(u.nextElementSibling)),i.e.fire(`${s._PREFIX}AfterWrapList`,s.WRAP,u,e),u}},82794:function(e,t,i){"use strict";i.d(t,{toggleAttributes:function(){return f}});var n=i(81937),o=i(23211),r=i(28077),s=i(28686),a=i(19147),l=i(18073),c=i(74264),u=i(93640),d=i(80991),h=i(36400),p=i(98394);let m="toggleAttributes";function f(e,t,i,_,v=!1){if(!v&&e.isApplied(t,m))return _;v||e.setApplied(t,m);let{attributes:b}=e.options;return b&&(0,l.size)(b)>0&&Object.keys(b).forEach(m=>{var f,y,S;let w=b[m];switch(m){case"style":f=_,(0,u.assert)((0,s.isPlainObject)(w)&&(0,l.size)(w),"Style must be an object"),Object.keys(w).forEach(s=>{let l=t.style.getPropertyValue((0,c.kebabCase)(s)),u=w[s];if(""!==l||null!=u){let c,m;if((c=i.create.element(t.tagName.toLowerCase())).style.cssText=t.style.cssText,(function(e){if(void 0!==(0,h.dataBind)(e,"shadowRoot"))return(0,h.dataBind)(e,"shadowRoot");let t=(0,r.getContainer)(e),i=n.globalDocument.createElement("iframe");(0,d.css)(i,{width:0,height:0,position:"absolute",border:0}),i.src="about:blank",t.appendChild(i);let o=i.contentWindow?.document,s=o?o.body:e.od.body;return(0,h.dataBind)(e,"shadowRoot",s),s})(i).appendChild(c),m=(0,d.css)(c,s),o.Dom.safeRemove(c),m===(0,a.normalizeCssValue)(s,u)){if(!l)return;v||(0,d.css)(t,s,null),f=g(e,t,f=p.UNSET);return}f=p.CHANGE,v||((0,d.css)(t,s,u),f=g(e,t,f))}}),_=f;break;case"className":case"class":let C;y=_,(0,u.assert)((0,s.isString)(w),"Class name must be a string"),C=i.e.fire.bind(i.e,`${p._PREFIX}AfterToggleAttribute`),t.classList.contains(w.toString())?(y=p.UNSET,v||(t.classList.remove(w),0===t.classList.length&&((0,u.attr)(t,"class",null),C(y,t,"class",null)))):(y=p.CHANGE,v||(t.classList.add(w),C(y,t,"class",w))),_=y;break;default:let k;S=_,(0,u.assert)((0,s.isString)(w)||(0,s.isNumber)(w)||(0,s.isBoolean)(w)||null==w,"Attribute value must be a string or number or boolean or null"),k=i.e.fire.bind(i.e,`${p._PREFIX}AfterToggleAttribute`),(0,u.attr)(t,m)===w?(v||(0,u.attr)(t,m,null),S=p.UNSET,v||k(S,t,m,w)):(S=p.CHANGE,v||((0,u.attr)(t,m,w),k(S,t,m,w))),_=S}}),_}function g(e,t,i){return(0,u.attr)(t,"style")||((0,u.attr)(t,"style",null),t.tagName.toLowerCase()===e.defaultTag&&(o.Dom.unwrap(t),i=p.UNWRAP)),i}},89081:function(e,t,i){"use strict";i.d(t,{unwrapChildren:function(){return a}});var n=i(23211),o=i(93640),r=i(9703),s=i(73019);function a(e,t){let i,a=[],l=[],c=e.options.attributes?.style;if(t.firstChild){let u=n.Dom.eachGen(t),d=u.next();for(;!d.done;){let t=d.value;(0,s.isSuitElement)(e,t,!0)&&(!c||(0,r.hasSameStyleKeys)(t,c))?(void 0===i&&(i=!0),a.push(t)):c&&(0,s.isSameStyleChild)(e,t)?(void 0===i&&(i=!1),l.push(()=>{(0,o.css)(t,Object.keys(c).reduce((e,t)=>(e[t]=null,e),{})),(0,o.attr)(t,"style")||(0,o.attr)(t,"style",null),(0,o.attr)(t,"style")||t.nodeName.toLowerCase()!==e.element||a.push(t)})):n.Dom.isEmptyTextNode(t)||void 0!==i||(i=!1),d=u.next()}}return l.forEach(e=>e()),a.forEach(n.Dom.unwrap),!!i}},83335:function(e,t,i){"use strict";i.d(t,{wrapUnwrappedText:function(){return r}});var n=i(23211),o=i(23175);function r(e,t,i){let r=i.editor,s=i.createInside,a=(e,t="previousSibling")=>{let s=e,a=e;for(;a&&!(0,o.isMarker)(a)&&!n.Dom.isTag(a,i.o.enter)&&(s=a,a=a[t]?a[t]:a.parentNode&&!n.Dom.isBlock(a.parentNode)&&a.parentNode!==r?a.parentNode:null,!n.Dom.isBlock(a)););return s},l=a(t),c=a(t,"nextSibling"),u=i.s.createRange();u.setStartBefore(l),u.setEndAfter(c);let d=u.extractContents(),h=s.element(e.element);return h.appendChild(d),n.Dom.safeInsertNode(u,h),e.elementIsBlock&&n.Dom.isEmpty(h)&&!n.Dom.isTag(h.firstElementChild,"br")&&h.appendChild(s.element("br")),h}},73154:function(e,t,i){"use strict";i.d(t,{wrap:function(){return a}});var n=i(27795),o=i(7909),r=i(97110),s=i(83335);function a(e,t,i){var a,c,u;let d=(a=e,c=t,u=i,a.elementIsBlock?n.Dom.up(c,e=>n.Dom.isBlock(e)&&!n.Dom.isTag(e,l),u.editor)||(0,s.wrapUnwrappedText)(a,c,u):((0,o.attr)(c,"size",null),c));return e.elementIsList?(0,r.wrapList)(e,d,i):n.Dom.replace(d,e.element,i.createInside,!0)}let l=new Set(["td","th","tr","tbody","table","li","ul","ol"])},96127:function(e,t,i){"use strict";i.d(t,{ApplyStyle:function(){return s}});var n=i(51640),o=i(98394),r=i(78462);function s(e,t){let{s:i,editor:s}=e;s.firstChild?.normalize();let a=i.fakes(),l=e.s.wrapInTagGen(a),c=l.next();if(c.done)return;let u={collapsed:i.isCollapsed(),mode:o.INITIAL,element:c.value,next:r.states.START,jodit:e,style:t};for(;c&&!c.done;){let e=new n.FiniteStateMachine(r.states.START,r.transactions);for(u.element=c.value;e.getState()!==r.states.END;)u=e.dispatch("exec",u);c=l.next()}i.restoreFakes(a)}},84578:function(e,t,i){"use strict";i.d(t,{CommitStyle:function(){return l}});var n=i(25045),o=i(81937),r=i(57821),s=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&&o.LIST_TAGS.has(this.options.element))}get element(){return this.options.element||this.defaultTag}get elementIsBlock(){return!!(this.options.element&&o.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,r.camelCase)(s._PREFIX+"_"+i),t[i])}),(0,a.ApplyStyle)(e,this)}finally{i.forEach(i=>{e.e.off((0,r.camelCase)(s._PREFIX+"_"+i),t[i])}),this.__applyMap=new WeakMap}e.synchronizeValues(),e.e.fire("afterCommitStyle",this)}constructor(e){(0,n._)(this,"options",void 0),(0,n._)(this,"__applyMap",void 0),this.options=e,this.__applyMap=new WeakMap}}},98394:function(e,t,i){"use strict";i.d(t,{CHANGE:function(){return r},INITIAL:function(){return a},REPLACE:function(){return l},UNSET:function(){return s},UNWRAP:function(){return o},WRAP:function(){return n},_PREFIX:function(){return c}});let n="wrap",o="unwrap",r="change",s="unset",a="initial",l="replace",c="commitStyle"},78462:function(e,t,i){"use strict";i.d(t,{states:function(){return l},transactions:function(){return c}});var n=i(81937),o=i(23211),r=i(28712),s=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:n,mode:r,collapsed:c}=e;if((0,s.isInsideInvisibleElement)(t,i.editor)||!c&&o.Dom.isEmptyContent(t))return{...e,next:l.END};let u=(0,s.getSuitParent)(n,t,i.editor)||(0,s.getSuitChild)(n,t);if(u)return{...e,next:l.ELEMENT,element:u};let d=(0,s.suitableClosest)(n,t,i.editor);return n.elementIsList&&o.Dom.isList(d)?{...e,next:l.LIST}:d?{...e,next:l.EXTRACT}:{...e,next:r!==a.UNWRAP?l.UNWRAP_CHILDREN:l.END}}},[l.LIST]:{exec(e){let{element:t,jodit:i,mode:r}=e;if(r!==a.INITIAL&&r!==a.UNWRAP&&r!==a.REPLACE)return{...e,next:l.END};let s=o.Dom.closest(t,"li",i.editor);return s&&o.Dom.closest(t,n.LIST_TAGS,i.editor)?{...e,element:s,next:l.TOGGLE_LIST}:{...e,next:l.END}}},[l.TOGGLE_LIST]:{exec:e=>({...e,mode:(0,s.toggleOrderedList)(e.style,e.element,e.jodit,e.mode),next:l.END})},[l.EXTRACT]:{exec(e){let{element:t,jodit:i,style:n}=e,a=(0,s.suitableClosest)(n,t,i.editor);return((0,r.assert)(a,"This place should have an element"),!n.elementIsBlock&&n.options.attributes?.style&&o.Dom.isBlock(a))?{...e,next:l.WRAP}:(n.elementIsBlock||(0,s.extractSelectedPart)(a,t,i),{...e,element:a,next:l.ELEMENT})}},[l.UNWRAP_CHILDREN]:{exec(e){let{element:t,style:i}=e;return(0,s.unwrapChildren)(i,t)?{...e,mode:a.UNWRAP,next:l.END}:{...e,next:l.WRAP}}},[l.WRAP]:{exec(e){let{element:t,jodit:i,style:n}=e,o=(0,s.wrap)(n,t,i);return{...e,next:n.elementIsList?l.END:l.CHANGE,mode:a.WRAP,element:o}}},[l.ELEMENT]:{exec(e){let{style:t,element:i,jodit:n}=e;return(0,s.toggleAttributes)(t,i,n,a.INITIAL,!0)!==a.INITIAL?{...e,next:l.CHANGE}:o.Dom.isTag(i,t.element)?{...e,next:l.UNWRAP}:{...e,next:l.END}}},[l.CHANGE]:{exec(e){let{style:t,element:i,jodit:n,mode:r}=e,c=(0,s.toggleAttributes)(t,i,n,e.mode);return r!==a.WRAP&&c===a.UNSET&&!i.attributes.length&&o.Dom.isTag(i,t.element)?{...e,next:l.UNWRAP}:{...e,mode:c,next:l.END}}},[l.UNWRAP]:{exec:e=>e.element.attributes.length&&o.Dom.isTag(e.element,e.style.element)?{...e,next:l.REPLACE_DEFAULT}:(o.Dom.unwrap(e.element),{...e,mode:a.UNWRAP,next:l.END})},[l.REPLACE_DEFAULT]:{exec:e=>(o.Dom.replace(e.element,e.style.defaultTag,e.jodit.createInside,!0),{...e,mode:a.REPLACE,next:l.END})},[l.END]:{exec:e=>e}}},8006:function(e,t,i){"use strict";i.d(t,{AsyncStorage:function(){return c}});var n=i(25045),o=i(57821),r=i(91162),s=i(59807),a=i(9505),l=i(24475);class c{async set(e,t){let i=await this.provider;return await i.set((0,o.camelCase)(this.prefix+e),t),this}async delete(e){let t=await this.provider;return await t.delete((0,o.camelCase)(this.prefix+e)),this}async get(e){return(await this.provider).get((0,o.camelCase)(this.prefix+e))}async exists(e){return(await this.provider).exists((0,o.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){let i;return"localStorage"===e||"sessionStorage"===e?(0,s.canUsePersistentStorage)(e)&&(i=new s.LocalStorageProvider(l.StorageKey+(t||""),e)):("indexedDB"===e||!0===e)&&(i=(0,r.canUseIndexedDB)().then(e=>e?new r.IndexedDBProvider(l.StorageKey+(t||""),"keyValueStore"):new a.MemoryStorageProvider)),i||(i=new a.MemoryStorageProvider),new c(Promise.resolve(i),t)}constructor(e,t){(0,n._)(this,"provider",void 0),(0,n._)(this,"prefix",void 0),this.provider=e,this.prefix=l.StorageKey,t&&(this.prefix+=t)}}},91162:function(e,t,i){"use strict";i.d(t,{IndexedDBProvider:function(){return r},canUseIndexedDB:function(){return l},clearUseIndexedDBCache:function(){return a}});var n=i(25045),o=i(81937);class r{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),n=t(i);return new Promise((e,t)=>{n.onsuccess=()=>{e(n.result)},n.onerror=()=>{t(n.error)}})}catch(e){return Promise.reject(e)}}async set(e,t){try{await this.performTransaction("readwrite",i=>i.put(t,e))}catch(e){o.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,n._)(this,"dbName",void 0),(0,n._)(this,"dbPromise",void 0),(0,n._)(this,"DB_VERSION",void 0),(0,n._)(this,"storeName",void 0),this.dbName=e,this.dbPromise=null,this.DB_VERSION=1,this.storeName=t}}let s=null;function a(){s=null}async function l(){if(null!=s)return s;try{if("u"<typeof indexedDB)return s=!1,!1;let e="___Jodit___"+Math.random().toString(),t=indexedDB.open(e);return s=await new Promise(i=>{t.onerror=()=>{i(!1)},t.onsuccess=()=>{indexedDB.deleteDatabase(e),i(!0)}})}catch{return s=!1,!1}}},59807:function(e,t,i){"use strict";i.d(t,{LocalStorageProvider:function(){return r},canUsePersistentStorage:function(){return o}});var n=i(25045);let o=(e="localStorage")=>{let t=new Map;if(t.has(e))return t.get(e);let i="___Jodit___"+Math.random().toString(),n="sessionStorage"===e?sessionStorage:localStorage;try{n.setItem(i,"1");let o="1"===n.getItem(i);return n.removeItem(i),t.set(e,o),o}catch{}return t.set(e,!1),!1};class r{get storage(){return"sessionStorage"===this.strategy?sessionStorage:localStorage}set(e,t){try{let i=this.storage.getItem(this.rootKey),n=i?JSON.parse(i):{};n[e]=t,this.storage.setItem(this.rootKey,JSON.stringify(n))}catch{}return this}delete(e){try{this.storage.removeItem(this.rootKey)}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,n._)(this,"rootKey",void 0),(0,n._)(this,"strategy",void 0),this.rootKey=e,this.strategy=t}}},9505:function(e,t,i){"use strict";i.d(t,{MemoryStorageProvider:function(){return o}});var n=i(25045);class o{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,n._)(this,"data",new Map)}}},25222:function(e,t,i){"use strict";i.d(t,{AsyncStorage:function(){return n.AsyncStorage},IndexedDBProvider:function(){return o.IndexedDBProvider},LocalStorageProvider:function(){return r.LocalStorageProvider},MemoryStorageProvider:function(){return s.MemoryStorageProvider},Storage:function(){return a.Storage},StorageKey:function(){return a.StorageKey},canUseIndexedDB:function(){return o.canUseIndexedDB},canUsePersistentStorage:function(){return r.canUsePersistentStorage},clearUseIndexedDBCache:function(){return o.clearUseIndexedDBCache}});var n=i(8006),o=i(91162),r=i(59807),s=i(9505),a=i(24475)},24475:function(e,t,i){"use strict";i.d(t,{Storage:function(){return l},StorageKey:function(){return a}});var n=i(25045),o=i(57821),r=i(59807),s=i(9505);let a="Jodit_";class l{set(e,t){return this.provider.set((0,o.camelCase)(this.prefix+e),t),this}delete(e){return this.provider.delete((0,o.camelCase)(this.prefix+e)),this}get(e){return this.provider.get((0,o.camelCase)(this.prefix+e))}exists(e){return this.provider.exists((0,o.camelCase)(this.prefix+e))}clear(){return this.provider.clear(),this}static makeStorage(e=!1,t){let i;return"localStorage"===e||"sessionStorage"===e?(0,r.canUsePersistentStorage)(e)&&(i=new r.LocalStorageProvider(a+(t||""),e)):!0===e&&(0,r.canUsePersistentStorage)("localStorage")&&(i=new r.LocalStorageProvider(a+(t||""))),i||(i=new s.MemoryStorageProvider),new l(i,t)}constructor(e,t){(0,n._)(this,"provider",void 0),(0,n._)(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 n=i(28077),o=i(28686),r=i(71125),s=i(37333);class a{dlg(e){let t=(0,n.getPopupViewRoot)(this.o,this.container,this.od.body),i=new s.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,r.markOwner)(this,i.container),i.parent=this,i.bindDestruct(this)}confirm(e,t,i){return e=l(e,this),t=l(t,this),s.Confirm.call(this.dlg({closeOnClickOverlay:!0}),e,t,i)}prompt(e,t,i,n,o){return e=l(e,this),t=l(t,this),n=l(n,this),s.Prompt.call(this.dlg({closeOnClickOverlay:!0}),e,t,i,n,o)}alert(e,t,i,n){return e=l(e,this),t=l(t,this),s.Alert.call(this.dlg({closeOnClickOverlay:!0}),e,t,i,n)}}function l(e,t){return(0,o.isString)(e)&&!(0,o.isHTML)(e)&&(e=t.i18n(e)),e}},23183:function(e,t,i){"use strict";i.d(t,{Elms:function(){return o}});var n=i(88475);class o{getElm(e){return this.container.querySelector("."+this.getFullElName(e))}getElms(e){return(0,n.toArray)(this.container.querySelectorAll("."+this.getFullElName(e)))}}},81987:function(e,t,i){"use strict";i.d(t,{Mods:function(){return o}});var n=i(18303);class o{afterSetMod(e,t){}setMod(e,t,i){e=e.toLowerCase();let o=this.mods[e];if(o===t)return this;let r=`${this.componentName}_${e}_`,s=(i||this.container).classList;return null!=o&&s.remove(`${r}${o.toString().toLowerCase()}`),(0,n.isVoid)(t)||""===t||s.add(`${r}${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 _},UIButtonState:function(){return g}});var n=i(25045),o=i(31635),r=i(69364),s=i(51676),a=i(91672),l=i(68616),c=i(23211),u=i(91565),d=i(85932),h=i(28712),p=i(7909),m=i(96007),f=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 m.UIElement{className(){return"UIButton"}setState(e){return Object.assign(this.state,e),this}get text(){let e=this.getElm("text");return(0,h.assert)(e,"Text element not found"),e}get icon(){let e=this.getElm("icon");return(0,h.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)}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):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=f.Icon.makeIcon(this.j,this.state.icon);t&&this.icon.appendChild(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"),n=this.j.c.span(e+"__text");return t.appendChild(i),t.appendChild(n),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,n._)(this,"isButton",!0),(0,n._)(this,"state",g()),(0,n._)(this,"button",void 0),(0,n._)(this,"actionHandlers",[]),this.button=this.container,this.updateSize(),this.onChangeSize(),this.onChangeStatus(),t&&this.hookStatus(r.STATUSES.ready,()=>{this.setState(t)})}}function v(e,t,i,n){let o=new _(e);return o.state.tabIndex=e.o.allowTabNavigation?0:-1,(0,d.isString)(t)?(o.state.icon.name=t,o.state.name=t,n&&(o.state.variant=n),i&&(o.state.text=i)):o.setState(t),o}(0,o.__decorate)([s.cache],_.prototype,"text",null),(0,o.__decorate)([s.cache],_.prototype,"icon",null),(0,o.__decorate)([(0,l.watch)("state.size",{immediately:!1})],_.prototype,"onChangeSize",null),(0,o.__decorate)([(0,l.watch)("state.type",{immediately:!1})],_.prototype,"onChangeType",null),(0,o.__decorate)([(0,l.watch)("state.role",{immediately:!1})],_.prototype,"onChangeRole",null),(0,o.__decorate)([(0,l.watch)("parentElement")],_.prototype,"updateSize",null),(0,o.__decorate)([(0,l.watch)("state.variant",{immediately:!1})],_.prototype,"onChangeStatus",null),(0,o.__decorate)([(0,l.watch)("state.text",{immediately:!1})],_.prototype,"onChangeText",null),(0,o.__decorate)([(0,l.watch)("state.text",{immediately:!1})],_.prototype,"onChangeTextSetMode",null),(0,o.__decorate)([(0,l.watch)("state.disabled")],_.prototype,"onChangeDisabled",null),(0,o.__decorate)([(0,l.watch)("state.activated")],_.prototype,"onChangeActivated",null),(0,o.__decorate)([(0,l.watch)("state.name",{immediately:!1})],_.prototype,"onChangeName",null),(0,o.__decorate)([(0,l.watch)("state.tooltip",{immediately:!1})],_.prototype,"onChangeTooltip",null),(0,o.__decorate)([(0,l.watch)("state.tabIndex",{immediately:!1})],_.prototype,"onChangeTabIndex",null),(0,o.__decorate)([(0,l.watch)("state.icon",{immediately:!1})],_.prototype,"onChangeIcon",null),(0,o.__decorate)([s.cacheHTML],_.prototype,"createContainer",null),(0,o.__decorate)([(0,l.watch)("button:click")],_.prototype,"__onActionFire",null),_=(0,o.__decorate)([a.component],_)},15367:function(e,t,i){"use strict";i.d(t,{UIButtonGroup:function(){return c}});var n=i(25045),o=i(31635),r=i(91672),s=i(28712),a=i(53681),l=i(63468);class c extends l.UIGroup{className(){return"UIButtonGroup"}render(e){return`<div>
|
|
11
11
|
<div class="&__label">~${e.label}~</div>
|
|
12
12
|
<div class="&__options"></div>
|
|
13
13
|
</div>`}appendChildToContainer(e){let t=this.getElm("options");(0,s.assert)(null!=t,"Options does not exist"),t.appendChild(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 a.UIButton(e,{text:t.text,value:t.value,variant:"primary"});return i.onAction(()=>{this.select(t.value)}),i}),t),(0,n._)(this,"options",void 0),this.options=t,this.select(t.value??0)}}c=(0,o.__decorate)([r.component],c)},59400:function(e,t,i){"use strict";i.d(t,{Button:function(){return n.Button},UIButton:function(){return n.UIButton},UIButtonGroup:function(){return o.UIButtonGroup},UIButtonState:function(){return n.UIButtonState},UITooltip:function(){return r.UITooltip}});var n=i(53681),o=i(15367),r=i(95399)},95399:function(e,t,i){"use strict";i.d(t,{UITooltip:function(){return m}});var n=i(25045),o=i(31635),r=i(16964),s=i(84839),a=i(27795),l=i(28077),c=i(23599),u=i(93640),d=i(96007);let h=["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){(0,l.getContainer)(this.j,m).appendChild(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,h,this.__hide).on(p,this.__hide)}__removeListenersOnLeave(){if(!this.__listenClose)return;this.__listenClose=!1;let e=this.j;e.e.off(e.ow,h,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,u.attr)(e.target,"aria-label");if(!t||(0,u.attr)(e.target,"disabled")||!e.target.className.includes("jodit"))return;this.__currentTarget=e.target;let i=e.target;this.__open(()=>{let e=(0,c.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.getElm("content").innerHTML=t;let i=e();(0,u.css)(this.container,{left:i.x,top:i.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),this.getElm("content").innerHTML="",(0,u.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,n._)(this,"__isOpened",!1),(0,n._)(this,"__attachedContainers",new Set),(0,n._)(this,"__listenClose",!1),(0,n._)(this,"__currentTarget",null),(0,n._)(this,"__delayShowTimeout",0),(0,n._)(this,"__hideTimeout",0),e.o.textIcons||!e.o.showTooltip||e.o.useNativeTooltip||(this.j.e.on("getContainer",e=>{this.__onAttach(e)}),e.hookStatus(r.STATUSES.ready,()=>{this.__onAttach(this.j.container)}))}}(0,o.__decorate)([s.autobind],m.prototype,"__onMouseLeave",null),(0,o.__decorate)([s.autobind],m.prototype,"__onMouseEnter",null),(0,o.__decorate)([s.autobind],m.prototype,"__hide",null),(0,o.__decorate)([s.autobind],m.prototype,"__hideDelay",null),m=(0,o.__decorate)([s.component],m)},96007:function(e,t,i){"use strict";i.d(t,{UIElement:function(){return p}});var n=i(25045),o=i(31635),r=i(16964),s=i(24968),a=i(23211),l=i(85932),c=i(7909),u=i(23183),d=i(81987),h=i(29434);class p extends r.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=>r.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&&r.Component.isInstanceOf(i,t)}return!1});return i?i?.component:null}update(){}appendTo(e){return e.appendChild(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)=>h.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,n._)(this,"container",void 0),(0,n._)(this,"name",""),(0,n._)(this,"options",void 0),(0,n._)(this,"__parentElement",null),(0,n._)(this,"mods",{}),this.options=t,this.container=this.createContainer(t);const i=this.getRole();i&&(0,c.attr)(this.container,"role",i),Object.defineProperty(this.container,"component",{value:this,configurable:!0})}}p=(0,o.__decorate)([(0,s.derive)(d.Mods,u.Elms)],p)},4561:function(e,t,i){"use strict";i.d(t,{UIBlock:function(){return l}});var n=i(25045),o=i(31635),r=i(91672),s=i(93640),a=i(63468);class l extends a.UIGroup{className(){return"UIBlock"}constructor(e,t,i={align:"left"}){super(e,t),(0,n._)(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,s.attr)(this.container,"data-ref",i.ref),(0,s.attr)(this.container,"ref",i.ref)}}l=(0,o.__decorate)([r.component],l)},98838:function(e,t,i){"use strict";i.d(t,{UIForm:function(){return u}});var n=i(31635),o=i(80251),r=i(91672),s=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=>o.Component.isInstanceOf(e,a.UIInput)))if(!e.validate())return!1;for(let e of this.allChildren.filter(e=>o.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=>o.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,s.attr)(e,"dir",this.j.o.direction||"auto"),(0,s.attr)(e,"novalidate",""),e}constructor(...e){super(...e),this.options?.className&&this.container.classList.add(this.options?.className)}}u=(0,n.__decorate)([r.component],u)},5658:function(e,t,i){"use strict";i.d(t,{UIBlock:function(){return n.UIBlock},UICheckbox:function(){return r.UICheckbox},UIFileInput:function(){return r.UIFileInput},UIForm:function(){return o.UIForm},UIInput:function(){return r.UIInput},UISelect:function(){return r.UISelect},UITextArea:function(){return r.UITextArea}});var n=i(4561),o=i(98838),r=i(2602)},87329:function(e,t,i){"use strict";i.d(t,{UITextArea:function(){return l}});var n=i(25045),o=i(31635),r=i(84839),s=i(91672),a=i(65273);class l extends a.UIInput{className(){return"UITextArea"}createNativeInput(e){return this.j.create.element("textarea")}onChangeStateSize(){let{size:e,resizable:t}=this.state;this.nativeInput.style.resize=t?"auto":"none",this.nativeInput.rows=e??5}constructor(e,t){super(e,t),(0,n._)(this,"state",{...l.defaultState}),Object.assign(this.state,t),!1===this.state.resizable&&(this.nativeInput.style.resize="none")}}(0,n._)(l,"defaultState",{...a.UIInput.defaultState,size:5,resizable:!0}),(0,o.__decorate)([(0,r.watch)(["state.size","state.resizable"])],l.prototype,"onChangeStateSize",null),l=(0,o.__decorate)([s.component],l)},24641:function(e,t,i){"use strict";i.d(t,{UICheckbox:function(){return l}});var n=i(25045),o=i(31635),r=i(84839),s=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"))),s.Dom.after(this.nativeInput,e)):s.Dom.safeRemove(e)}constructor(e,t){super(e,{...t,type:"checkbox"}),(0,n._)(this,"state",{...l.defaultState}),Object.assign(this.state,t)}}(0,n._)(l,"defaultState",{...a.UIInput.defaultState,checked:!1,switch:!1}),(0,o.__decorate)([(0,r.watch)("state.checked"),(0,r.hook)("ready")],l.prototype,"onChangeChecked",null),(0,o.__decorate)([(0,r.watch)("nativeInput:change")],l.prototype,"onChangeNativeCheckBox",null),(0,o.__decorate)([(0,r.watch)("state.switch"),(0,r.hook)("ready")],l.prototype,"onChangeSwitch",null),l=(0,o.__decorate)([r.component],l)},75587:function(e,t,i){"use strict";i.d(t,{UIFileInput:function(){return l}});var n=i(25045),o=i(31635),r=i(91672),s=i(53681),a=i(65273);class l extends a.UIInput{className(){return"UIFileInput"}createContainer(e){this.button=new s.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),t.appendChild(i),t}createNativeInput(e){return this.j.create.fromHTML(`<input
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
dir="auto"
|
|
18
18
|
multiple=""
|
|
19
19
|
/>`)}constructor(e,t){super(e,{type:"file",...t}),(0,n._)(this,"state",{...a.UIInput.defaultState,type:"file",onlyImages:!0})}}l=(0,o.__decorate)([r.component],l)},2602:function(e,t,i){"use strict";i.d(t,{UICheckbox:function(){return o.UICheckbox},UIFileInput:function(){return r.UIFileInput},UIInput:function(){return s.UIInput},UISelect:function(){return a.UISelect},UITextArea:function(){return n.UITextArea}});var n=i(87329),o=i(24641),r=i(75587),s=i(65273),a=i(49999)},65273:function(e,t,i){"use strict";i.d(t,{UIInput:function(){return h}});var n=i(25045),o=i(31635),r=i(84839),s=i(23211),a=i(88475),l=i(93640),c=i(96007),u=i(81488),d=i(29434);class h extends c.UIElement{className(){return"UIInput"}onChangeClear(){this.state.clearButton?s.Dom.after(this.nativeInput,this.clearButton):s.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:n,ref:o,required:r,placeholder:a,autocomplete:c,label:u}=this.state;(0,l.attr)(e,"name",t),(0,l.attr)(e,"type",n),(0,l.attr)(e,"data-ref",o||t),(0,l.attr)(e,"ref",o||t),(0,l.attr)(e,"required",r||null),(0,l.attr)(e,"autocomplete",c?null:"off"),(0,l.attr)(e,"placeholder",a?this.j.i18n(a):""),i&&d.Icon.exists(i)?(s.Dom.before(e,this.icon),this.icon.innerHTML=d.Icon.get(i)):s.Dom.safeRemove(this.icon),u?(s.Dom.before(this.wrapper,this.label),this.label.innerText=this.j.i18n(u)):s.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||"")),this.container.appendChild(this.__errorBox)):s.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?(this.nativeInput.setAttribute("aria-invalid","true"),this.nativeInput.setCustomValidity?.(this.error)):(this.nativeInput.removeAttribute("aria-invalid"),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")),this.wrapper.appendChild(i),t.appendChild(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,n._)(this,"label",this.j.c.span(this.getFullElName("label"))),(0,n._)(this,"icon",this.j.c.span(this.getFullElName("icon"))),(0,n._)(this,"clearButton",this.j.c.span(this.getFullElName("clear"),d.Icon.get("cancel"))),(0,n._)(this,"state",{...h.defaultState}),(0,n._)(this,"__errorBox",this.j.c.span(this.getFullElName("error"))),(0,n._)(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,n._)(h,"defaultState",{className:"",autocomplete:!0,name:"",value:"",icon:"",label:"",ref:"",type:"text",placeholder:"",required:!1,validators:[]}),(0,o.__decorate)([(0,r.watch)("state.clearButton")],h.prototype,"onChangeClear",null),(0,o.__decorate)([(0,r.watch)("state.className")],h.prototype,"onChangeClassName",null),(0,o.__decorate)([(0,r.watch)(["state.name","state.type","state.label","state.placeholder","state.autocomplete","state.icon"],{immediately:!1}),(0,r.debounce)()],h.prototype,"onChangeState",null),(0,o.__decorate)([(0,r.watch)("state.value")],h.prototype,"onChangeStateValue",null),(0,o.__decorate)([r.autobind],h.prototype,"onChangeValue",null),h=(0,o.__decorate)([r.component],h)},49999:function(e,t,i){"use strict";i.d(t,{UISelect:function(){return c}});var n=i(25045),o=i(31635),r=i(91672),s=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:n}=this;if(void 0!==e.placeholder){let t=i.create.element("option");t.value="",t.text=i.i18n(e.placeholder),n.add(t)}return e.options?.forEach(e=>{let t=i.create.element("option");t.value=e.value.toString(),t.text=i.i18n(e.text),n.add(t)}),e.size&&e.size>0&&(0,s.attr)(n,"size",e.size),e.multiple&&(0,s.attr)(n,"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,n._)(this,"state",{...c.defaultState}),Object.assign(this.state,t)}}(0,n._)(c,"defaultState",{...a.UIInput.defaultState,options:[],size:1,multiple:!1}),c=(0,o.__decorate)([r.component],c)},81488:function(e,t,i){"use strict";i.d(t,{inputValidators:function(){return n},selectValidators:function(){return o}});var n=i(48776),o=i(6490)},48776:function(e,t,i){"use strict";i.r(t),i.d(t,{required:function(){return r},url:function(){return s}});var n=i(91764),o=i(4040);let r=function(e){return!!(0,o.trim)(e.value).length||(e.error="Please fill out this field",!1)},s=function(e){return!!(0,n.isURL)((0,o.trim)(e.value))||(e.error="Please enter a web address",!1)}},6490:function(e,t,i){"use strict";i.d(t,{required:function(){return o}});var n=i(4040);let o=function(e){return!!(0,n.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 n=i(25045),o=i(31635),r=i(80251),s=i(84839),a=i(23211),l=i(65946),c=i(96007);class u extends c.UIElement{className(){return"UIGroup"}getRole(){return this.options?.role||"list"}get allChildren(){let e=[],t=[...this.elements];for(;t.length;){let i=t.shift();(0,l.isArray)(i)?t.push(...i):r.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");i.appendChild(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){void 0===t||t<0||t>this.elements.length-1||null==this.container.children[t]?this.container.appendChild(e):this.container.insertBefore(e,this.container.children[t])}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,n._)(this,"options",void 0),(0,n._)(this,"syncMod",void 0),(0,n._)(this,"elements",void 0),(0,n._)(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,o.__decorate)([(0,s.watch)("buttonSize")],u.prototype,"update",null),u=(0,o.__decorate)([s.component],u)},64847:function(e,t,i){"use strict";i.d(t,{UIGroup:function(){return n.UIGroup},UIList:function(){return o.UIList},UISeparator:function(){return r.UISeparator},UISpacer:function(){return s.UISpacer}});var n=i(63468),o=i(97959),r=i(35676),s=i(27987)},97959:function(e,t,i){"use strict";i.d(t,{UIList:function(){return _}});var n=i(25045),o=i(31635),r=i(80251),s=i(91672),a=i(29200),l=i(68616),c=i(32328),u=i(53681),d=i(63468),h=i(35676),p=i(27987),m=i(2496),f=i(15982),g=i(40253);class _ extends d.UIGroup{className(){return"UIList"}getRole(){return"list"}__onChangeMode(){this.setMod("mode",this.mode)}makeGroup(e){return new d.UIGroup(this.jodit,[],e?{role:e}:void 0)}get buttons(){return this.allChildren.filter(e=>r.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 n=!1,o=this.makeGroup("group");this.append(o),o.setMod("line",!0);let r=e=>{let r=null;switch(e.name){case`
|
|
20
|
-
`:(o=this.makeGroup("group")).setMod("line",!0),i=this.makeGroup(),o.append(i),this.append(o);break;case"|":n||(n=!0,r=new h.UISeparator(this.j));break;case"---":{i.setMod("before-spacer",!0);let e=new p.UISpacer(this.j);o.append(e),i=this.makeGroup(),o.append(i),n=!1;break}default:n=!1,r="select"===e.component?this.makeSelect(e,t):this.makeButton(e,t)}r&&(i||(i=this.makeGroup(),o.append(i)),i.append(r))},s=e=>!this.removeButtons.includes(e.name)&&(!e.isVisible||e.isVisible?.(this.j,e));return e.forEach(e=>{if((0,m.isButtonGroup)(e)){let t=e.buttons.filter(e=>e);t.length&&((i=this.makeGroup()).setMod("separated",!0).setMod("group",e.group),o.append(i),(0,g.getStrongControlTypes)(t,this.j.o.controls).filter(s).forEach(r))}else{i||(i=this.makeGroup(),o.append(i));let t=(0,f.getControlType)(e,this.j.o.controls);s(t)&&r(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,n._)(this,"mode","horizontal"),(0,n._)(this,"removeButtons",[])}}(0,o.__decorate)([(0,l.watch)("mode"),(0,a.hook)("ready")],_.prototype,"__onChangeMode",null),_=(0,o.__decorate)([s.component],_)},35676:function(e,t,i){"use strict";i.d(t,{UISeparator:function(){return s}});var n=i(31635),o=i(91672),r=i(96007);class s extends r.UIElement{className(){return"UISeparator"}}s=(0,n.__decorate)([o.component],s)},27987:function(e,t,i){"use strict";i.d(t,{UISpacer:function(){return s}});var n=i(31635),o=i(91672),r=i(96007);class s extends r.UIElement{className(){return"UISpacer"}}s=(0,n.__decorate)([o.component],s)},2496:function(e,t,i){"use strict";i.d(t,{flatButtonsSet:function(){return r},isButtonGroup:function(){return o}});var n=i(17312);let o=e=>(0,n.isArray)(e.buttons);function r(e,t){let i=t.getRegisteredButtonGroups();return new Set(e.reduce((e,t)=>(o(t)?e=e.concat([...t.buttons,...i[t.group]??[]]):e.push(t),e),[]))}},15982:function(e,t,i){"use strict";i.d(t,{findControlType:function(){return s},getControlType:function(){return r}});var n=i(65946),o=i(5266);function r(e,t){let i;return t||(t=o.Config.defaultOptions.controls),(0,n.isString)(e)?i=s(e,t)||{name:e,command:e,tooltip:e}:void 0!==t[(i={name:"empty",...(0,n.ConfigFlatten)(e)}).name]&&(i={...(0,n.ConfigFlatten)(t[i.name]),...(0,n.ConfigFlatten)(i)}),i}function s(e,t){let[i,o]=e.split(/\./),r=t;return null!=o?void 0!==t[i]&&(r=t[i]):o=i,r[o]?{name:o,...(0,n.ConfigFlatten)(r[o])}:void 0}},40253:function(e,t,i){"use strict";i.d(t,{getStrongControlTypes:function(){return a}});var n=i(17312),o=i(93640),r=i(5266),s=i(15982);function a(e,t){return((0,n.isArray)(e)?e:(0,o.keys)(e,!1).map(t=>{let i=e[t]||{};return(0,o.ConfigProto)({name:t},i)})).map(e=>(0,s.getControlType)(e,t||r.Config.defaultOptions.controls))}},29434:function(e,t,i){"use strict";i.d(t,{Icon:function(){return a}});var n=i(25045),o=i(81937),r=i(65946),s=i(80991);class a{static getIcon(e){if(/<svg/i.test(e))return e;let t=a.icons[e]||a.icons[e.replace(/-/g,"_")]||a.icons[e.replace(/_/g,"-")]||a.icons[(0,r.camelCase)(e)]||a.icons[(0,r.kebabCase)(e)]||a.icons[e.toLowerCase()];return o.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,n;if(!t)return;let{name:o,iconURL:r,fill:l}=t,
|
|
20
|
+
`:(o=this.makeGroup("group")).setMod("line",!0),i=this.makeGroup(),o.append(i),this.append(o);break;case"|":n||(n=!0,r=new h.UISeparator(this.j));break;case"---":{i.setMod("before-spacer",!0);let e=new p.UISpacer(this.j);o.append(e),i=this.makeGroup(),o.append(i),n=!1;break}default:n=!1,r="select"===e.component?this.makeSelect(e,t):this.makeButton(e,t)}r&&(i||(i=this.makeGroup(),o.append(i)),i.append(r))},s=e=>!this.removeButtons.includes(e.name)&&(!e.isVisible||e.isVisible?.(this.j,e));return e.forEach(e=>{if((0,m.isButtonGroup)(e)){let t=e.buttons.filter(e=>e);t.length&&((i=this.makeGroup()).setMod("separated",!0).setMod("group",e.group),o.append(i),(0,g.getStrongControlTypes)(t,this.j.o.controls).filter(s).forEach(r))}else{i||(i=this.makeGroup(),o.append(i));let t=(0,f.getControlType)(e,this.j.o.controls);s(t)&&r(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,n._)(this,"mode","horizontal"),(0,n._)(this,"removeButtons",[])}}(0,o.__decorate)([(0,l.watch)("mode"),(0,a.hook)("ready")],_.prototype,"__onChangeMode",null),_=(0,o.__decorate)([s.component],_)},35676:function(e,t,i){"use strict";i.d(t,{UISeparator:function(){return s}});var n=i(31635),o=i(91672),r=i(96007);class s extends r.UIElement{className(){return"UISeparator"}}s=(0,n.__decorate)([o.component],s)},27987:function(e,t,i){"use strict";i.d(t,{UISpacer:function(){return s}});var n=i(31635),o=i(91672),r=i(96007);class s extends r.UIElement{className(){return"UISpacer"}}s=(0,n.__decorate)([o.component],s)},2496:function(e,t,i){"use strict";i.d(t,{flatButtonsSet:function(){return r},isButtonGroup:function(){return o}});var n=i(17312);let o=e=>(0,n.isArray)(e.buttons);function r(e,t){let i=t.getRegisteredButtonGroups();return new Set(e.reduce((e,t)=>(o(t)?e=e.concat([...t.buttons,...i[t.group]??[]]):e.push(t),e),[]))}},15982:function(e,t,i){"use strict";i.d(t,{findControlType:function(){return s},getControlType:function(){return r}});var n=i(65946),o=i(5266);function r(e,t){let i;return t||(t=o.Config.defaultOptions.controls),(0,n.isString)(e)?i=s(e,t)||{name:e,command:e,tooltip:e}:void 0!==t[(i={name:"empty",...(0,n.ConfigFlatten)(e)}).name]&&(i={...(0,n.ConfigFlatten)(t[i.name]),...(0,n.ConfigFlatten)(i)}),i}function s(e,t){let[i,o]=e.split(/\./),r=t;return null!=o?void 0!==t[i]&&(r=t[i]):o=i,r[o]?{name:o,...(0,n.ConfigFlatten)(r[o])}:void 0}},40253:function(e,t,i){"use strict";i.d(t,{getStrongControlTypes:function(){return a}});var n=i(17312),o=i(93640),r=i(5266),s=i(15982);function a(e,t){return((0,n.isArray)(e)?e:(0,o.keys)(e,!1).map(t=>{let i=e[t]||{};return(0,o.ConfigProto)({name:t},i)})).map(e=>(0,s.getControlType)(e,t||r.Config.defaultOptions.controls))}},29434:function(e,t,i){"use strict";i.d(t,{Icon:function(){return a}});var n=i(25045),o=i(81937),r=i(65946),s=i(80991);class a{static getIcon(e){if(/<svg/i.test(e))return e;let t=a.icons[e]||a.icons[e.replace(/-/g,"_")]||a.icons[e.replace(/_/g,"-")]||a.icons[(0,r.camelCase)(e)]||a.icons[(0,r.kebabCase)(e)]||a.icons[e.toLowerCase()];return o.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,n;if(!t)return;let{name:o,iconURL:r,fill:l,scale:c}=t,u=o.replace(/[^a-zA-Z0-9]/g,"_");/<svg/.test(o)||(n=e.o.getIcon?.(o,u));let d=`${o}${r}${l}${c??""}${n??""}`;if(e.o.cache&&this.__cache.has(d))return this.__cache.get(d)?.cloneNode(!0);if(r)i=e.c.span(),(0,s.css)(i,"backgroundImage","url("+r.replace("{basePath}",e?.basePath||"")+")");else{let t=n||a.get(o,"")||e.o.extraIcons?.[o];t&&(i=e.c.fromHTML(t.trim()),/^<svg/i.test(o)||i.classList.add("jodit-icon_"+u))}return i&&(i.classList.add("jodit-icon"),i.style.fill=l,null!=c&&(i.style.transform=`scale(${c})`),e.o.cache&&this.__cache.set(d,i.cloneNode(!0))),i}}(0,n._)(a,"icons",{}),(0,n._)(a,"__cache",new Map)},4099:function(e,t,i){"use strict";i.d(t,{Button:function(){return n.Button},Icon:function(){return a.Icon},Popup:function(){return l.Popup},ProgressBar:function(){return c.ProgressBar},UIBlock:function(){return r.UIBlock},UIButton:function(){return n.UIButton},UIButtonGroup:function(){return n.UIButtonGroup},UIButtonState:function(){return n.UIButtonState},UICheckbox:function(){return r.UICheckbox},UIElement:function(){return o.UIElement},UIFileInput:function(){return r.UIFileInput},UIForm:function(){return r.UIForm},UIGroup:function(){return s.UIGroup},UIInput:function(){return r.UIInput},UIList:function(){return s.UIList},UISelect:function(){return r.UISelect},UISeparator:function(){return s.UISeparator},UISpacer:function(){return s.UISpacer},UITextArea:function(){return r.UITextArea},UITooltip:function(){return n.UITooltip}});var n=i(59400),o=i(96007),r=i(5658),s=i(64847),a=i(29434),l=i(56490),c=i(34396)},56490:function(e,t,i){"use strict";i.d(t,{Popup:function(){return n.Popup}});var n=i(51116)},51116:function(e,t,i){"use strict";i.d(t,{Popup:function(){return m}});var n=i(25045),o=i(31635),r=i(80251),s=i(84839),a=i(23211),l=i(28077),c=i(65946),u=i(28712),d=i(96007),h=i(63468);let p=["escape","cut","delete","backSpaceAfterDelete","beforeCommandDelete"];class m extends h.UIGroup{className(){return"Popup"}appendChildToContainer(e){let t=this.getElm("content");(0,u.assert)(t,"Content element should exist"),t.appendChild(e)}updateParentElement(e){return e!==this&&r.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(r.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)i.appendChild(this.container);else{let e=(0,l.getContainer)(this.jodit,m);i!==this.container.parentElement&&e.appendChild(this.container)}return this.updatePosition(),this.j.e.fire(this,"afterOpen"),this.j.e.fire("afterOpenPopup",this),this}__calculateZIndex(){if(this.container.style.zIndex)return;let e=e=>{let t=e.container.style.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;if(i.container.style.zIndex)return void this.setZIndex(1+parseInt(i.container.style.zIndex.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.od.elementFromPoint(t.left,t.top);if(!i)return e;let n=a.Dom.isHTMLElement(i)?i:i.parentElement,o=(0,c.position)(n,this.j);return()=>{let t=e(),i=(0,c.position)(n,this.j);return{...t,top:t.top+(i.top-o.top),left:t.left+(i.left-o.left)}}}updatePosition(){if(!this.isOpened)return this;let[e,t]=this.__calculatePosition(this.__targetBound(),this.viewBound(),(0,c.position)(this.container,this.j));return this.setMod("strategy",t),(0,c.css)(this.container,{left:e.left,top:e.top}),this.__childrenPopups.forEach(e=>e.updatePosition()),this}__throttleUpdatePosition(){this.updatePosition()}__calculatePosition(e,t,i,n=this.strategy){let o={left:e.left,right:e.left-(i.width-e.width)},r={bottom:e.top+e.height,top:e.top-i.height},s=Object.keys(o).reduce((e,t)=>e.concat(Object.keys(r).map(e=>`${t}${(0,c.ucfirst)(e)}`)),[]),a=e=>{let[t,n]=(0,c.kebabCase)(e).split("-");return{left:o[t],top:r[n],width:i.width,height:i.height}},l=e=>m.boxInView(a(n),e)?n:s.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||n),[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(){return this.isOpened&&(this.isOpened=!1,this.__childrenPopups.forEach(e=>e.close()),this.j.e.fire(this,"beforeClose"),this.j.e.fire("beforePopupClose",this),this.__removeGlobalListeners(),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){this.container.style.zIndex=e.toString()}render(){return`<div>
|
|
21
21
|
<div class="&__content"></div>
|
|
22
22
|
</div>`}destruct(){return this.close(),super.destruct()}constructor(e,t=!0){super(e),(0,n._)(this,"smart",void 0),(0,n._)(this,"isOpened",void 0),(0,n._)(this,"strategy",void 0),(0,n._)(this,"viewBound",void 0),(0,n._)(this,"__targetBound",void 0),(0,n._)(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,o.__decorate)([s.autobind],m.prototype,"updatePosition",null),(0,o.__decorate)([(0,s.throttle)(10),s.autobind],m.prototype,"__throttleUpdatePosition",null),(0,o.__decorate)([s.autobind],m.prototype,"close",null),(0,o.__decorate)([s.autobind],m.prototype,"__closeOnOutsideClick",null)},34396:function(e,t,i){"use strict";i.d(t,{ProgressBar:function(){return r}});var n=i(23211),o=i(96007);class r extends o.UIElement{className(){return"ProgressBar"}render(){return"<div><div></div></div>"}show(){return(this.j.workplace||this.j.container).appendChild(this.container),this}hide(){return n.Dom.safeRemove(this.container),this}progress(e){return this.container.style.width=e.toFixed(2)+"%",this}destruct(){return this.hide(),super.destruct()}}},2222:function(e,t,i){"use strict";i.d(t,{ViewWithToolbar:function(){return g}});var n=i(25045),o=i(31635),r=i(69364),s=i(49574),a=i(68616),l=i(23211),c=i(45664),u=i(85932),d=i(28723),h=i(4099),p=i(2496),m=i(35099),f=i(4274);class g extends m.View{get toolbarContainer(){return!this.o.fullsize&&((0,u.isString)(this.o.toolbar)||l.Dom.isHTMLElement(this.o.toolbar))?(0,d.resolveElement)(this.o.toolbar,this.o.shadowRoot||this.od):(this.o.toolbar&&l.Dom.appendChildFirst(this.container,this.__defaultToolbarContainer),this.__defaultToolbarContainer)}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 n=i.indexOf(e.name);-1!==n&&i.splice(n,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(r.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,n._)(this,"toolbar",(0,f.makeCollection)(this)),(0,n._)(this,"__defaultToolbarContainer",this.c.div("jodit-toolbar__box")),(0,n._)(this,"registeredButtons",new Set),(0,n._)(this,"groupToButtons",{}),(0,n._)(this,"isJodit",!1),(0,n._)(this,"__tooltip",new h.UITooltip(this)),this.isJodit=t,this.e.on("beforeToolbarBuild",this.beforeToolbarBuild)}}(0,o.__decorate)([(0,a.watch)(":rebuildToolbar")],g.prototype,"buildToolbar",null),(0,o.__decorate)([s.autobind],g.prototype,"beforeToolbarBuild",null)},35099:function(e,t,i){"use strict";i.d(t,{View:function(){return C}});var n=i(25045),o=i(31635),r=i(16964),s=i(80251),a=i(69364),l=i(81937),c=i(76517),u=i(51676),d=i(24968),h=i(29200),p=i(27795),m=i(1496),f=i(28077),g=i(65946),_=i(8006),v=i(24475),b=i(23183),y=i(81987),S=i(34396),w=i(10081);class C extends s.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 w.UIMessages(this,e)}get storage(){return v.Storage.makeStorage(!0,this.id)}get asyncStorage(){return _.AsyncStorage.makeStorage(!0,this.id)}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 S.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,n=this.e.fire((0,g.camelCase)("getInstance_"+i),t);if(n)return n;let o=(0,g.isFunction)(e)?e:f.modules[i],s=this.__modulesInstances;if(!(0,g.isFunction)(o))throw(0,g.error)("Need real module name");if(!s.has(i)){let e=o.prototype instanceof r.ViewComponent?new o(this,t):new o(t);this.components.add(e),s.set(i,e)}return s.get(i)}addDisclaimer(e){this.container.appendChild(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,n._)(this,"isJodit",void 0),(0,n._)(this,"isView",void 0),(0,n._)(this,"parent",void 0),(0,n._)(this,"mods",void 0),(0,n._)(this,"id",void 0),(0,n._)(this,"components",void 0),(0,n._)(this,"events",void 0),(0,n._)(this,"create",void 0),(0,n._)(this,"__container",void 0),(0,n._)(this,"OPTIONS",void 0),(0,n._)(this,"__options",void 0),(0,n._)(this,"__isFullSize",void 0),(0,n._)(this,"__whoLocked",void 0),(0,n._)(this,"isLockedNotBy",void 0),(0,n._)(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 m.EventEmitter(this.od),this.create=new c.Create(this.od),this.__container=this.c.div("jodit "+this.componentName)}}(0,n._)(C,"ES",l.ES),(0,n._)(C,"version",l.APP_VERSION),(0,n._)(C,"esNext",l.IS_ES_NEXT),(0,n._)(C,"esModern",l.IS_ES_MODERN),(0,n._)(C,"defaultOptions",void 0),(0,o.__decorate)([u.cache],C.prototype,"buffer",null),(0,o.__decorate)([u.cache],C.prototype,"message",null),(0,o.__decorate)([u.cache],C.prototype,"storage",null),(0,o.__decorate)([u.cache],C.prototype,"asyncStorage",null),(0,o.__decorate)([u.cache],C.prototype,"c",null),(0,o.__decorate)([u.cache],C.prototype,"e",null),(0,o.__decorate)([u.cache],C.prototype,"progressbar",null),(0,o.__decorate)([(0,h.hook)(a.STATUSES.beforeDestruct)],C.prototype,"beforeDestruct",null),(C=(0,o.__decorate)([(0,d.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 n=i(25045),o=i(31635),r=i(81937),s=i(84839),a=i(28077),l=i(65946),c=i(73714),u=i(80512),d=i(5266),h=i(60936);let p="data-jodit-default-style-display",m="data-jodit-default-classes",f={contenteditable:!1};class Jodit extends h.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}get createInside(){return new h.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,n)=>{let o=t.baseurl+i;t.isImages&&t.isImages[n]?e.s.insertImage(o,null,e.o.imageDefaultWidth):e.s.insertNode(e.createInside.fromHTML(`<a href='${o}' title='${o}'>${o}</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(r.INVISIBLE_SPACE_REG_EXP(),""),e&&(i=i.replace(/<span[^>]+id="jodit-selection_marker_[^>]+><\/span>/g,"")),"<br>"===i&&(i="");let n={value:i};return this.e.fire("afterGetValueFromEditor",n,t),n.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(),n=this.getEditorValue();if(!this.__isSilentChange&&i!==n&&this.__callChangeCount<r.SAFE_COUNT_CHANGE_CALL){this.__setElementValue(n),this.__callChangeCount+=1,r.IS_PROD||this.__callChangeCount;try{this.history.__upTick(),this.e.fire("change",n,i),this.e.fire(this.history,"change",n,i)}finally{this.__callChangeCount=0}}}updateElementValue(){this.__setElementValue(this.getEditorValue())}getElementValue(){return 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&&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 n=e.toLowerCase(),o=this.commands.get(n);if(void 0===o&&(o=[],this.commands.set(n,o)),o.push(t),!(0,l.isFunction)(t)){let o=this.o.commandToHotkeys[n]||this.o.commandToHotkeys[e]||t.hotkeys;o&&this.registerHotkeyToCommand(o,n,i?.stopPropagation)}return this}registerHotkeyToCommand(e,t,i=!0){let n=(0,l.asArray)(e).map(l.normalizeKeyAliases).map(e=>e+".hotkey").join(" ");this.e.off(n).on(n,(e,n)=>(n&&(n.shouldStop=i??!0),this.execCommand(t)))}execCommand(e,t,i,...n){let o;if(this.s.isFocused()||this.s.focus(),!this.o.readonly||this.o.allowCommandsInReadOnly.includes(e)){if(e=e.toLowerCase(),!1!==(o=this.e.fire("beforeCommand"+(0,l.ucfirst)(e),t,i,...n))&&(o=this.e.fire("beforeCommand",e,t,i,...n)),!1!==o&&(o=this.__execCustomCommands(e,t,i,...n)),!1!==o){this.s.focus();try{o=this.nativeExecCommand(e,t,i)}catch(e){if(!r.IS_PROD)throw e}}return this.e.fire("afterCommand",e,t,i),this.__imdSynchronizeValues(),o}}nativeExecCommand(e,t,i){this.__isSilentChange=!0;try{return this.ed.execCommand(e,t,i)}finally{this.__isSilentChange=!1}}__execCustomCommands(e,t,i,...n){e=e.toLowerCase();let o=this.commands.get(e);if(void 0!==o){let r;return o.forEach(o=>{let s=((0,l.isFunction)(o)?o:o.exec).call(this,e,t,i,...n);void 0!==s&&(r=s)}),r}}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()===r.MODE_WYSIWYG}getRealMode(){if(this.getMode()!==r.MODE_SPLIT)return this.getMode();let e=this.od.activeElement;return e&&(e===this.iframe||h.Dom.isOrContains(this.editor,e)||h.Dom.isOrContains(this.toolbar.container,e))?r.MODE_WYSIWYG:r.MODE_SOURCE}setMode(e){let t=this.getMode(),i={mode:parseInt(e.toString(),10)},n=["jodit-wysiwyg_mode","jodit-source__mode","jodit_split_mode"];!1!==this.e.fire("beforeSetMode",i)&&(this.__mode=[r.MODE_SOURCE,r.MODE_WYSIWYG,r.MODE_SPLIT].includes(i.mode)?i.mode:r.MODE_WYSIWYG,this.o.saveModeInStorage&&this.storage.set("jodit_default_mode",this.mode),n.forEach(e=>{this.container.classList.remove(e)}),this.container.classList.add(n[this.mode-1]),t!==this.getMode()&&this.e.fire("afterSetMode"))}toggleMode(){let e=this.getMode();[r.MODE_SOURCE,r.MODE_WYSIWYG,this.o.useSplitMode?r.MODE_SPLIT:9].includes(e+1)?e+=1:e=r.MODE_WYSIWYG,this.setMode(e)}setDisabled(e){this.o.disabled=e;let t=this.__wasReadOnly;this.setReadOnly(e||t),this.__wasReadOnly=t,this.editor&&(this.editor.setAttribute("aria-disabled",e.toString()),this.container.classList.toggle("jodit_disabled",e),this.e.fire("disabled",e))}getDisabled(){return this.o.disabled}setReadOnly(e){this.__wasReadOnly!==e&&(this.__wasReadOnly=e,this.o.readonly=e,e?this.editor&&this.editor.removeAttribute("contenteditable"):this.editor&&this.editor.setAttribute("contenteditable","true"),this.e&&this.e.fire("readonly",e))}getReadOnly(){return this.o.readonly}focus(){this.getMode()!==r.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,n=e.value;void 0===d.Config.defaultOptions[i]||t&&void 0!==t[i]||(-1!==["readonly","disabled"].indexOf(i)&&(n=""===n||"true"===n),/^[0-9]+(\.)?([0-9]+)?$/.test(n.toString())&&(n=Number(n)),this.options[i]=n)});let n=this.c.div("jodit-container");n.classList.add("jodit"),n.classList.add("jodit-container"),n.classList.add("jodit_theme_"+(this.o.theme||"default")),g(this.o.className,n),this.o.containerStyle&&(0,l.css)(n,this.o.containerStyle);let{styleValues:o}=this.o;Object.keys(o).forEach(e=>{let t=(0,l.kebabCase)(e);n.style.setProperty("--jd-"+t,o[e])}),n.setAttribute("contenteditable","false");let r=null;this.o.inline&&(-1===["TEXTAREA","INPUT"].indexOf(i.nodeName)&&(n=i,i.setAttribute(m,i.className.toString()),r=n.innerHTML,n.innerHTML=""),n.classList.add("jodit_inline"),n.classList.add("jodit-container")),i!==n&&(i.style.display&&i.setAttribute(p,i.style.display),i.style.display="none");let s="workplace-slot",a=this.c.div(this.getFullElName(s,"top"),f);n.appendChild(a);let c=this.c.div(this.getFullElName(s,"center"),f),u=this.c.div("jodit-workplace",f),_=this.c.div(this.getFullElName(s,"left"),f),v=this.c.div(this.getFullElName(s,"right"),f);c.appendChild(_),c.appendChild(u),c.appendChild(v),n.appendChild(c);let b=this.c.div(this.getFullElName(s,"bottom"),f);n.appendChild(b),i.parentNode&&i!==n&&i.parentNode.insertBefore(n,i),Object.defineProperty(i,"component",{enumerable:!1,configurable:!0,value:this});let y=this.c.div("jodit-wysiwyg",{contenteditable:!0,"aria-disabled":!1,tabindex:this.o.tabIndex});u.appendChild(y);let S={editor:y,element:i,container:n,workplace:u,slots:{top:a,bottom:b,center:c,left:_,right:v},statusbar:new h.StatusBar(this,n),options:this.isReady?(0,l.ConfigProto)(t||{},d.Config.defaultOptions):this.options,history:new h.History(this),editorWindow:this.ow};this.__elementToPlace.set(y,S),this.setCurrentPlace(S),this.places.push(S),this.setNativeEditorValue(this.getElementValue());let w=this.__initEditor(r),C=this.options,k=()=>{C.enableDragAndDropFileToEditor&&C.uploader&&(C.uploader.url||C.uploader.insertImageAsBase64URI)&&this.uploader.bind(this.editor),this.__elementToPlace.get(this.editor)||this.__elementToPlace.set(this.editor,S),this.e.fire("afterAddPlace",S)};return(0,l.callPromise)(w,k)}addDisclaimer(e){this.workplace.appendChild(e)}setCurrentPlace(e){this.currentPlace!==e&&(this.isEditorMode()||this.setMode(r.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))&&h.Dom.safeRemove(e),g(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";this.editor.style.direction=e,this.editor.setAttribute("dir",e),this.container.style.direction=e,this.container.setAttribute("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()}})}fetch(e,t){let i=new c.Ajax({url:e,...t},this.o.defaultAjaxOptions),n=()=>{this.e.off("beforeDestruct",n),this.progressbar.progress(100).hide(),i.destruct()};this.e.one("beforeDestruct",n),this.progressbar.show().progress(30);let o=i.send();return o.finally(n).catch(()=>null),o}destruct(){if(this.isInDestruct)return;this.setStatus(h.STATUSES.beforeDestruct),this.__elementToPlace.clear(),(0,s.cached)(this,"storage")?.clear(),(0,s.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:n,element:o,iframe:r,editor:s,history:a})=>{if(o){if(o!==t)if(o.hasAttribute(p)){let e=(0,l.attr)(o,p);e&&(o.style.display=e,o.removeAttribute(p))}else o.style.display="";else o.hasAttribute(m)&&(o.className=(0,l.attr)(o,m)||"",o.removeAttribute(m));o.hasAttribute("style")&&!(0,l.attr)(o,"style")&&o.removeAttribute("style"),n.destruct(),this.e.off(t),this.e.off(o),this.e.off(s),h.Dom.safeRemove(i),h.Dom.safeRemove(s),t!==o&&h.Dom.safeRemove(t),Object.defineProperty(o,"component",{enumerable:!1,configurable:!0,value:null}),h.Dom.safeRemove(r),t===o&&(o.innerHTML=e),a.destruct()}}),this.places.length=0,this.currentPlace={},delete a.instances[this.id],super.destruct()}constructor(e,t){super(t,!0),(0,n._)(this,"isJodit",!0),(0,n._)(this,"commands",new Map),(0,n._)(this,"__selectionLocked",null),(0,n._)(this,"__wasReadOnly",!1),(0,n._)(this,"editorIsActive",!1),(0,n._)(this,"selection",void 0),(0,n._)(this,"__mode",r.MODE_WYSIWYG),(0,n._)(this,"__callChangeCount",0),(0,n._)(this,"__isSilentChange",!1),(0,n._)(this,"currentPlace",{options:this.__options,container:this.__container}),(0,n._)(this,"places",[]),(0,n._)(this,"__elementToPlace",new Map);try{const t=(0,l.resolveElement)(e,this.options.shadowRoot||this.od);if(Jodit.isJoditAssigned(t))return t.component}catch(e){if(!r.IS_PROD)throw e;throw this.destruct(),e}this.setStatus(h.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 h.Selection(this);const 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 n=()=>{this.isInDestruct||(this.e&&this.e.fire("afterInit",this),(0,l.callPromise)(this.afterInitHook()),this.setStatus(h.STATUSES.ready),this.e.fire("afterConstructor",this))};(0,l.callPromise)(i,n)})}}function g(e,t){e&&e.split(/\s+/).forEach(e=>t.classList.add(e))}(0,n._)(Jodit,"fatMode",r.FAT_MODE),(0,n._)(Jodit,"plugins",a.pluginSystem),(0,n._)(Jodit,"modules",a.modules),(0,n._)(Jodit,"ns",a.modules),(0,n._)(Jodit,"decorators",{}),(0,n._)(Jodit,"constants",r),(0,n._)(Jodit,"instances",a.instances),(0,n._)(Jodit,"lang",r.lang),(0,n._)(Jodit,"core",{Plugin:h.Plugin}),(0,o.__decorate)([s.cache],Jodit.prototype,"createInside",null),(0,o.__decorate)([s.cache],Jodit.prototype,"message",null),(0,o.__decorate)([s.cache],Jodit.prototype,"s",null),(0,o.__decorate)([s.cache],Jodit.prototype,"uploader",null),(0,o.__decorate)([s.cache],Jodit.prototype,"filebrowser",null),(0,o.__decorate)([(0,s.throttle)()],Jodit.prototype,"synchronizeValues",null),(0,o.__decorate)([(0,s.watch)(":internalChange")],Jodit.prototype,"updateElementValue",null),(0,o.__decorate)([s.autobind],Jodit.prototype,"__prepareWYSIWYGEditor",null),Jodit=(0,o.__decorate)([(0,s.derive)(u.Dlgs)],Jodit)},89317:function(e,t,i){"use strict";var n=i(17312),o=i(57741),r=i(56014),s=i(95461),a=i(63837),l=i(39386),c=i(62327),u=i(25090),d=i(53113),h=i(81321),p=i(4679),m=i(31927),f=i(21195),g=i(53414),_=i(11012),v=i(87061),b=i(3268),y=i(85325),S=i(97834),w=i(86433),C=i(28359),k=i(68368),E=i(57456),I=i(25182),T=i(44906);let x={};x={ar:o,cs_cz:r,de:s,en:a,es:l,fi:c,fr:u,he:d,hu:h,id:p,it:m,ja:f,ko:_,mn:v,nl:b,no:y,pl:S,pt_br:w,ru:C,tr:k,ua:E,zh_cn:I,zh_tw:T};let D=e=>e?e.default||e:{},j={};(0,n.isArray)(D(g))&&D(g).forEach((e,t)=>{j[t]=e}),Object.keys(x).forEach(e=>{let t=D(x[e]);(0,n.isArray)(t)?(x[e]={},t.forEach((t,i)=>{x[e][j[i]]=t})):x[e]=t}),t.default=x},67399:function(e,t,i){"use strict";i.d(t,{ContextMenu:function(){return l}});var n=i(31635),o=i(91672),r=i(17312),s=i(53681),a=i(51116);class l extends a.Popup{className(){return"ContextMenu"}show(e,t,i){let n=this;n.clear(),(0,r.isArray)(i)&&(i.forEach(e=>{if(!e)return;let t=(0,s.Button)(this.jodit,e.icon||"empty",e.title);this.jodit&&t.setParentView(this.jodit),t.setMod("context","menu"),t.onAction(t=>(e.exec?.call(n,t),n.clear(),n.close(),!1)),this.append(t)}),this.open(()=>({left:e,top:t,width:0,height:0}),!0))}}l=(0,n.__decorate)([o.component],l)},91535:function(e,t,i){"use strict";i.d(t,{Alert:function(){return l}});var n=i(23211),o=i(78982),r=i(91565),s=i(53681),a=i(76841);function l(e,t,i,c="jodit-dialog_alert"){(0,r.isFunction)(t)&&(i=t,t=void 0);let u=this instanceof a.Dialog?this:new a.Dialog({closeOnClickOverlay:!0}),d=u.c.div(c),h=(0,s.Button)(u,"ok","Ok");return(0,o.asArray)(e).forEach(e=>{d.appendChild(n.Dom.isNode(e)?e:u.c.fromHTML(e))}),h.onAction(()=>{i&&(0,r.isFunction)(i)&&!1===i(u)||u.close()}),u.setFooter([h]),u.open(d,t||" ",!0,!0),h.focus(),u}},88329:function(e,t,i){"use strict";i.d(t,{Confirm:function(){return s}});var n=i(91565),o=i(53681),r=i(76841);function s(e,t,i){let s=this instanceof r.Dialog?this:new r.Dialog({closeOnClickOverlay:!0}),a=s.c.fromHTML('<form class="jodit-dialog_prompt"></form>'),l=s.c.element("label");(0,n.isFunction)(t)&&(i=t,t=void 0),l.appendChild(s.c.fromHTML(e)),a.appendChild(l);let c=e=>()=>{i&&!1===i(e)||s.close()},u=(0,o.Button)(s,"cancel","Cancel"),d=(0,o.Button)(s,"ok","Yes");return u.onAction(c(!1)),d.onAction(c(!0)),s.e.on(a,"submit",()=>(c(!0)(),!1)),s.setFooter([d,u]),s.open(a,t||" ",!0,!0),d.focus(),s}},76841:function(e,t,i){"use strict";i.d(t,{Dialog:function(){return v}});var n=i(25045),o=i(31635),r=i(16964),s=i(81937),a=i(84839),l=i(23211),c=i(28077),u=i(45664),d=i(28686),h=i(93640),p=i(28712),m=i(4099),f=i(35099),g=i(2222),_=i(5266);_.Config.prototype.dialog={namespace:"",extraButtons:[],resizable:!0,draggable:!0,buttons:["dialog.close"],removeButtons:[],toolbarButtonSize:"middle",zIndex:"inherit"},_.Config.prototype.controls.dialog={close:{icon:"cancel",exec(e){e.close()}}};class v extends g.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 n;if((0,d.isArray)(t)){let n=this.c.div(this.getFullElName("column"));return i.push(n),e.appendChild(n),this.setElements(n,t)}n=(0,d.isString)(t)?this.c.fromHTML(t):(0,d.hasContainer)(t)?t.container:t,i.push(n),n.parentNode!==e&&e.appendChild(n)}),(0,u.toArray)(e.childNodes).forEach(t=>{-1===i.indexOf(t)&&e.removeChild(t)})}__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,h.css)(this.dialog,"left"),this.startPoint.y=(0,h.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(this.startPoint.w+e.clientX-this.startX,this.startPoint.h+e.clientY-this.startY),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===s.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,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,h.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,n=this.ow.innerHeight,o=i/2-this.dialog.offsetWidth/2,r=n/2-this.dialog.offsetHeight/2;return o<0&&(o=0),r<0&&(r=0),void 0!==e&&void 0!==t&&(this.offsetX=e,this.offsetY=t,this.moved=Math.abs(e-o)>100||Math.abs(t-r)>100),this.dialog.style.left=(e||o)+"px",this.dialog.style.top=(t||r)+"px",this}setHeader(e){return this.setElements(this.dialogbox_header,e),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}getZIndex(){return parseInt((0,h.css)(this.container,"zIndex"),10)||0}getMaxZIndexDialog(){let e=0,t,i,n=this;return(0,h.$$)(".jodit-dialog",this.destination).forEach(o=>{t=o.component,i=parseInt((0,h.css)(o,"zIndex"),10),t.isOpened&&!isNaN(i)&&i>e&&(n=t,e=i)}),n}setMaxZIndex(){if(this.getMod("static"))return;let e=0x1312d04,t=0;(0,h.$$)(".jodit-dialog",this.destination).forEach(i=>{e=Math.max(isNaN(t=parseInt((0,h.css)(i,"zIndex"),10))?0:t,e)}),this.container.style.zIndex=(e+1).toString()}toggleFullSize(e){(0,d.isVoid)(e)&&(e=!this.getMod("fullsize")),this.setMod("fullsize",e),super.toggleFullSize(e)}open(e,t,i,n){if(c.eventEmitter.fire("closeAllPopups hideHelpers"),!1===this.e.fire(this,"beforeOpen"))return this;(0,d.isBoolean)(e)&&(i=e),(0,d.isBoolean)(t)&&(n=t),this.destroyAfterClose=!0===i;let o=(0,d.isBoolean)(e)?void 0:e,r=(0,d.isBoolean)(t)?void 0:t;return void 0!==r&&this.setHeader(r),o&&this.setContent(o),this.setMod("active",!0),this.isOpened=!0,this.setModal(n),this.destination.appendChild(this.container),!0!==this.getMod("static")?(this.setPosition(this.offsetX,this.offsetY),this.setMaxZIndex()):this.container.style.removeProperty("z-index"),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,this.isFullSize&&this.toggleFullSize(!1),l.Dom.safeRemove(this.container),this.__removeGlobalResizeListeners(),e.fire(this,"afterClose"),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(r.STATUSES.beforeDestruct),this.isOpened&&this.close(),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,n._)(this,"resizer",void 0),(0,n._)(this,"offsetX",void 0),(0,n._)(this,"offsetY",void 0),(0,n._)(this,"destroyAfterClose",!1),(0,n._)(this,"moved",!1),(0,n._)(this,"resizable",!1),(0,n._)(this,"draggable",!1),(0,n._)(this,"startX",0),(0,n._)(this,"startY",0),(0,n._)(this,"startPoint",{x:0,y:0,w:0,h:0}),(0,n._)(this,"lockSelect",()=>{this.setMod("moved",!0)}),(0,n._)(this,"unlockSelect",()=>{this.setMod("moved",!1)}),(0,n._)(this,"__onResize",()=>{this.options&&this.o.resizable&&!this.moved&&this.isOpened&&!this.offsetX&&!this.offsetY&&this.setPosition()}),(0,n._)(this,"dialog",void 0),(0,n._)(this,"workplace",void 0),(0,n._)(this,"dialogbox_header",void 0),(0,n._)(this,"dialogbox_content",void 0),(0,n._)(this,"dialogbox_footer",void 0),(0,n._)(this,"dialogbox_toolbar",void 0),(0,n._)(this,"isModal",!1),(0,n._)(this,"isOpened",!1),this.options=(0,h.ConfigProto)(e,(0,h.ConfigProto)(_.Config.prototype.dialog,v.defaultOptions)),l.Dom.safeRemove(this.container);const t=this.getFullElName.bind(this);this.container=this.c.fromHTML(`<div class="jodit jodit-dialog ${this.componentName}">
|
|
23
23
|
<div class="${t("overlay")}"></div>
|
|
@@ -108,7 +108,7 @@
|
|
|
108
108
|
</div>`:""}
|
|
109
109
|
</div>
|
|
110
110
|
</div>
|
|
111
|
-
</form>`)}},60936:function(e,t,i){"use strict";i.r(t),i.d(t,{Ajax:function(){return p.Ajax},Alert:function(){return s.Alert},Async:function(){return l.Async},AsyncStorage:function(){return D.AsyncStorage},Button:function(){return m.Button},CommitStyle:function(){return x.CommitStyle},Component:function(){return n.Component},Confirm:function(){return s.Confirm},ContextMenu:function(){return r.ContextMenu},Create:function(){return c.Create},Dialog:function(){return s.Dialog},Dom:function(){return u.Dom},EventEmitter:function(){return d.EventEmitter},EventHandlersStore:function(){return d.EventHandlersStore},Eventify:function(){return d.Eventify},FileBrowser:function(){return a.FileBrowser},Helpers:function(){return o},History:function(){return _.History},Icon:function(){return m.Icon},ImageEditor:function(){return b.ImageEditor},IndexedDBProvider:function(){return D.IndexedDBProvider},LazyWalker:function(){return u.LazyWalker},LocalStorageProvider:function(){return D.LocalStorageProvider},MemoryStorageProvider:function(){return D.MemoryStorageProvider},Plugin:function(){return h.Plugin},PluginSystem:function(){return T.PluginSystem},Popup:function(){return m.Popup},ProgressBar:function(){return m.ProgressBar},Prompt:function(){return s.Prompt},Response:function(){return p.Response},STATUSES:function(){return n.STATUSES},Selection:function(){return x.Selection},Snapshot:function(){return v.Snapshot},StatusBar:function(){return S.StatusBar},Storage:function(){return D.Storage},StorageKey:function(){return D.StorageKey},Table:function(){return w.Table},ToolbarButton:function(){return C.ToolbarButton},ToolbarCollection:function(){return k.ToolbarCollection},ToolbarContent:function(){return C.ToolbarContent},ToolbarEditorCollection:function(){return E.ToolbarEditorCollection},ToolbarSelect:function(){return C.ToolbarSelect},UIBlock:function(){return m.UIBlock},UIButton:function(){return m.UIButton},UIButtonGroup:function(){return m.UIButtonGroup},UIButtonState:function(){return m.UIButtonState},UICheckbox:function(){return m.UICheckbox},UIElement:function(){return m.UIElement},UIFileInput:function(){return m.UIFileInput},UIForm:function(){return m.UIForm},UIGroup:function(){return m.UIGroup},UIInput:function(){return m.UIInput},UIList:function(){return m.UIList},UIMessages:function(){return y.UIMessages},UISelect:function(){return m.UISelect},UISeparator:function(){return m.UISeparator},UISpacer:function(){return m.UISpacer},UITextArea:function(){return m.UITextArea},UITooltip:function(){return m.UITooltip},Uploader:function(){return I.Uploader},View:function(){return f.View},ViewComponent:function(){return n.ViewComponent},ViewWithToolbar:function(){return g.ViewWithToolbar},canUseIndexedDB:function(){return D.canUseIndexedDB},canUsePersistentStorage:function(){return D.canUsePersistentStorage},clearUseIndexedDBCache:function(){return D.clearUseIndexedDBCache},defaultNameSpace:function(){return d.defaultNameSpace},observable:function(){return d.observable}});var n=i(16964),o=i(65946),r=i(67399),s=i(37333),a=i(17610),l=i(91231),c=i(79821),u=i(27795),d=i(1496),h=i(91206),p=i(73714),m=i(4099),f=i(35099),g=i(2222),_=i(53855),v=i(46363),b=i(43271),y=i(10081),S=i(29433),w=i(98803),C=i(39709),k=i(42573),E=i(6209),I=i(94925),T=i(85305),x=i(59841),D=i(25222)},61466:function(e,t,i){"use strict";i.d(t,{UIMessage:function(){return s}});var n=i(31635),o=i(91672),r=i(4099);class s extends r.UIElement{className(){return"UIMessage"}constructor(e,t){super(e),this.setMod("active",!0),this.setMod("variant",t.variant),this.container.textContent=t.text}}s=(0,n.__decorate)([o.component],s)},10081:function(e,t,i){"use strict";i.d(t,{UIMessages:function(){return c}});var n=i(25045),o=i(31635),r=i(91672),s=i(80991),a=i(63468),l=i(61466);class c extends a.UIGroup{className(){return"UIMessages"}info(e,t){this.__message(e,"info",t)}success(e,t){this.__message(e,"success",t)}error(e,t){this.__message(e,"error",t)}message(e,t,i){this.__message(e,t,i)}__message(e,t="info",i){let n=e+":"+t;if(this.__messages.has(n))return void this.async.updateTimeout(n,i||this.options.defaultTimeout);if(!this.__box)throw Error("Container is not defined: "+n);this.__box.appendChild(this.container);let o=new l.UIMessage(this.j,{text:e,variant:t});this.append(o),this.__calcOffsets(),this.__messages.add(n);let r=this.__getRemoveCallback(o,n);this.j.e.on(o.container,"pointerdown",r),this.async.setTimeout(r,{label:n,timeout:i||this.options.defaultTimeout})}__getRemoveCallback(e,t){let i=n=>{n&&n.preventDefault(),e.isInDestruct||(this.async.clearTimeout(t),this.j.e.off(e.container,"pointerdown",i),this.__messages.delete(t),e.setMod("active",!1),this.async.setTimeout(()=>{this.remove(e),e.destruct(),this.__calcOffsets()},300))};return i}__calcOffsets(){let e=5;this.elements.forEach(t=>{(0,s.css)(t.container,"bottom",e+"px"),e+=t.container.offsetHeight+this.options.defaultOffset})}constructor(e,t,i={defaultTimeout:3e3,defaultOffset:5}){super(e),(0,n._)(this,"__box",void 0),(0,n._)(this,"options",void 0),(0,n._)(this,"__messages",void 0),this.__box=t,this.options=i,this.__messages=new Set}}c=(0,o.__decorate)([r.component],c)},29433:function(e,t,i){"use strict";i.d(t,{StatusBar:function(){return u}});var n=i(25045),o=i(31635),r=i(16964),s=i(84839),a=i(23211),l=i(23183),c=i(81987);class u extends r.ViewComponent{className(){return"StatusBar"}hide(){this.container.classList.add("jodit_hidden")}show(){this.container.classList.remove("jodit_hidden")}get isShown(){return!this.container.classList.contains("jodit_hidden")}getHeight(){return this.container?.offsetHeight??0}findEmpty(e=!1){let t=this.getElms(e?"item-right":"item");for(let e=0;e<t.length;e+=1)if(!t[e].innerHTML.trim().length)return t[e]}append(e,t=!1){let i=this.findEmpty(t)||this.j.c.div(this.getFullElName("item"));t&&i.classList.add(this.getFullElName("item-right")),i.appendChild(e),this.container?.appendChild(i),this.j.o.statusbar&&this.show(),this.j.e.fire("resize")}destruct(){this.isInDestruct||(this.setStatus(r.STATUSES.beforeDestruct),a.Dom.safeRemove(this.container),super.destruct())}constructor(e,t){super(e),(0,n._)(this,"target",void 0),(0,n._)(this,"container",void 0),(0,n._)(this,"mods",void 0),this.target=t,this.mods={},this.container=e.c.div("jodit-status-bar"),t.appendChild(this.container),this.hide()}}u=(0,o.__decorate)([s.component,(0,s.derive)(c.Mods,l.Elms)],u)},98803:function(e,t,i){"use strict";i.d(t,{Table:function(){return h}});var n=i(25045),o=i(31635),r=i(16964),s=i(81937),a=i(84839),l=i(27795),c=i(28077),u=i(65946);let d=new WeakMap;class h extends r.ViewComponent{className(){return"Table"}__recalculateStyles(){let e=(0,c.getContainer)(this.j,h,"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=h.__selectedByTable.get(t)||new Set;i.add(e),h.__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=h.__selectedByTable.get(t);i&&(i.delete(e),i.size||h.__selectedByTable.delete(t))}}getAllSelectedCells(){return(0,u.toArray)(this.selected)}static __getSelectedCellsByTable(e){let t=h.__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 h.__getRowsCount(e)}static __getColumnsCount(e){return h.__formalMatrix(e).reduce((e,t)=>Math.max(e,t.length),0)}getColumnsCount(e){return h.__getColumnsCount(e)}static __formalMatrix(e,t){let i=[[]],n=(0,u.toArray)(e.rows),o=(e,n)=>{void 0===i[n]&&(i[n]=[]);let o=e.colSpan,r=e.rowSpan,s,a,l=0;for(;i[n][l];)l+=1;for(a=0;r>a;a+=1)for(s=0;s<o;s+=1){if(void 0===i[n+a]&&(i[n+a]=[]),t&&!1===t(e,n+a,l+s,o,r))return!1;i[n+a][l+s]=e}};for(let e=0;e<n.length;e+=1){let t=(0,u.toArray)(n[e].cells);for(let n=0;n<t.length;n+=1)if(!1===o(t[n],e))return i}return i}formalMatrix(e,t){return h.__formalMatrix(e,t)}static __formalCoordinate(e,t,i=!1){let n=0,o=0,r=1,s=1;return h.__formalMatrix(e,(e,a,l,c,u)=>{if(t===e)return n=a,o=l,r=c||1,s=u||1,i&&(o+=(c||1)-1,n+=(u||1)-1),!1}),[n,o,r,s]}formalCoordinate(e,t,i=!1){return h.__formalCoordinate(e,t,i)}static __appendRow(e,t,i,n){let o;if(t)o=t.cloneNode(!0),(0,u.$$)("td,th",t).forEach(e=>{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)}}),(0,u.$$)("td,th",o).forEach(e=>{e.innerHTML=""});else{let t=h.__getColumnsCount(e);o=n.element("tr");for(let e=0;e<t;e+=1)o.appendChild(n.element("td"))}i&&t&&t.nextSibling?t.parentNode&&t.parentNode.insertBefore(o,t.nextSibling):!i&&t?t.parentNode&&t.parentNode.insertBefore(o,t):(e.getElementsByTagName("tbody")?.[0]||e).appendChild(o)}appendRow(e,t,i){return h.__appendRow(e,t,i,this.j.createInside)}static __removeRow(e,t){let i,n=h.__formalMatrix(e),o=e.rows[t];n[t].forEach((r,s)=>{if(i=!1,t-1>=0&&n[t-1][s]===r)i=!0;else if(n[t+1]&&n[t+1][s]===r){if(r.parentNode===o&&r.parentNode.nextSibling){i=!0;let o=s+1;for(;n[t+1][o]===r;)o+=1;let a=l.Dom.next(r.parentNode,e=>l.Dom.isTag(e,"tr"),e);a&&(n[t+1][o]?a.insertBefore(r,n[t+1][o]):a.appendChild(r))}}else l.Dom.safeRemove(r);if(i&&(r.parentNode===o||r!==n[t][s-1])){let e=r.rowSpan;(0,u.attr)(r,"rowspan",e-1>1?e-1:null)}}),l.Dom.safeRemove(o)}removeRow(e,t){return h.__removeRow(e,t)}appendColumn(e,t,i=!0){let n=h.__formalMatrix(e);if(!i&&l.Dom.isCell(t.previousElementSibling))return this.appendColumn(e,t.previousElementSibling,!0);let[,o]=h.__formalCoordinate(e,t,i),r=i?o+1:o;for(let e=0;e<n.length;){let t=n[e];if(t[o]!==t[r]||o===r){let e=this.j.createInside.element("td");i?l.Dom.after(t[o],e):l.Dom.before(t[o],e),t[o].rowSpan>1&&(e.rowSpan=t[o].rowSpan)}else t[o].colSpan+=1;e+=t[o].rowSpan||1}}static __removeColumn(e,t){let i,n=h.__formalMatrix(e);n.forEach((e,o)=>{let r=e[t];if(i=!1,t-1>=0&&n[o][t-1]===r||t+1<e.length&&n[o][t+1]===r?i=!0:l.Dom.safeRemove(r),i&&(o-1<0||r!==n[o-1][t])){let e=r.colSpan;(0,u.attr)(r,"colspan",e-1>1?(e-1).toString():null)}})}removeColumn(e,t){return h.__removeColumn(e,t)}static __getSelectedBound(e,t){let i,n,o,r=[[1/0,1/0],[0,0]],s=h.__formalMatrix(e);for(i=0;i<s.length;i+=1)for(n=0;s[i]&&n<s[i].length;n+=1)t.includes(s[i][n])&&(r[0][0]=Math.min(i,r[0][0]),r[0][1]=Math.min(n,r[0][1]),r[1][0]=Math.max(i,r[1][0]),r[1][1]=Math.max(n,r[1][1]));for(i=r[0][0];i<=r[1][0];i+=1)for(o=1,n=r[0][1];n<=r[1][1];n+=1){for(;s[i]&&s[i][n-o]&&s[i][n]===s[i][n-o];)r[0][1]=Math.min(n-o,r[0][1]),r[1][1]=Math.max(n-o,r[1][1]),o+=1;for(o=1;s[i]&&s[i][n+o]&&s[i][n]===s[i][n+o];)r[0][1]=Math.min(n+o,r[0][1]),r[1][1]=Math.max(n+o,r[1][1]),o+=1;for(o=1;s[i-o]&&s[i][n]===s[i-o][n];)r[0][0]=Math.min(i-o,r[0][0]),r[1][0]=Math.max(i-o,r[1][0]),o+=1;for(o=1;s[i+o]&&s[i][n]===s[i+o][n];)r[0][0]=Math.min(i+o,r[0][0]),r[1][0]=Math.max(i+o,r[1][0]),o+=1}return r}getSelectedBound(e,t){return h.__getSelectedBound(e,t)}static __normalizeTable(e){let t=[],i=h.__formalMatrix(e);h.__removeExtraColspans(i,t),h.__removeExtraRowspans(i,t);for(let e=0;e<i.length;e+=1)for(let t=0;t<i[e].length;t+=1)void 0!==i[e][t]&&(i[e][t].hasAttribute("rowspan")&&1===i[e][t].rowSpan&&(0,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));h.__unmark(t)}static __removeExtraColspans(e,t){for(let i=0;i<e[0].length;i+=1){let n=1e6,o=!1;for(let t=0;t<e.length;t+=1)if(void 0!==e[t][i]){if(e[t][i].colSpan<2){o=!0;break}n=Math.min(n,e[t][i].colSpan)}if(!o)for(let o=0;o<e.length;o+=1)void 0!==e[o][i]&&h.__mark(e[o][i],"colspan",e[o][i].colSpan-n+1,t)}}static __removeExtraRowspans(e,t){let i=0,n=0;for(i=0;i<e.length;i+=1){let o=1e6,r=!1;for(n=0;n<e[i].length;n+=1)if(void 0!==e[i][n]){if(e[i][n].rowSpan<2){r=!0;break}o=Math.min(o,e[i][n].rowSpan)}if(!r)for(n=0;n<e[i].length;n+=1)void 0!==e[i][n]&&h.__mark(e[i][n],"rowspan",e[i][n].rowSpan-o+1,t)}}normalizeTable(e){return h.__normalizeTable(e)}static __mergeSelected(e,t){let i=[],n=h.__getSelectedBound(e,h.__getSelectedCellsByTable(e)),o=0,r=null,a=0,c=0,d=0,m=new Set,f=[];n&&(n[0][0]-n[1][0]||n[0][1]-n[1][1])&&(h.__formalMatrix(e,(e,s,l,g,_)=>{s>=n[0][0]&&s<=n[1][0]&&l>=n[0][1]&&l<=n[1][1]&&(m.has(e)||(m.add(e),s===n[0][0]&&e.style.width&&(o+=e.offsetWidth),""!==(0,u.trim)(e.innerHTML.replace(/<br(\/)?>/g,""))&&i.push(e.innerHTML),g>1&&(c+=g-1),_>1&&(d+=_-1),r?(h.__mark(e,"remove",1,f),p(t).removeSelection(e)):(r=e,a=l)))}),c=n[1][1]-n[0][1]+1,d=n[1][0]-n[0][0]+1,r&&(c>1&&h.__mark(r,"colspan",c,f),d>1&&h.__mark(r,"rowspan",d,f),o&&(h.__mark(r,"width",(o/e.offsetWidth*100).toFixed(s.ACCURACY)+"%",f),a&&h.__setColumnWidthByDelta(e,a,0,!0,f)),r.innerHTML=i.join("<br/>"),p(t).addSelection(r),m.delete(r),h.__unmark(f),h.__normalizeTable(e),(0,u.toArray)(e.rows).forEach(e=>{e.cells.length||l.Dom.safeRemove(e)})))}mergeSelected(e){return h.__mergeSelected(e,this.j)}static __splitHorizontal(e,t){let i,n,o,r,s,a=[];h.__getSelectedCellsByTable(e).forEach(c=>{(n=t.createInside.element("td")).appendChild(t.createInside.element("br")),o=t.createInside.element("tr"),i=h.__formalCoordinate(e,c),c.rowSpan<2?(h.__formalMatrix(e,(e,t,n)=>{i[0]===t&&i[1]!==n&&e!==c&&h.__mark(e,"rowspan",e.rowSpan+1,a)}),l.Dom.after(l.Dom.closest(c,"tr",e),o),o.appendChild(n)):(h.__mark(c,"rowspan",c.rowSpan-1,a),h.__formalMatrix(e,(t,n,o)=>{n>i[0]&&n<i[0]+c.rowSpan&&i[1]>o&&t.parentNode.rowIndex===n&&(s=t),i[0]<n&&t===c&&(r=e.rows[n])}),s?l.Dom.after(s,n):r.insertBefore(n,r.firstChild)),c.colSpan>1&&h.__mark(n,"colspan",c.colSpan,a),h.__unmark(a),p(t).removeSelection(c)}),this.__normalizeTable(e)}splitHorizontal(e){return h.__splitHorizontal(e,this.j)}static __splitVertical(e,t){let i,n,o,r=[];h.__getSelectedCellsByTable(e).forEach(a=>{i=h.__formalCoordinate(e,a),a.colSpan<2?h.__formalMatrix(e,(e,t,n)=>{i[1]===n&&i[0]!==t&&e!==a&&h.__mark(e,"colspan",e.colSpan+1,r)}):h.__mark(a,"colspan",a.colSpan-1,r),(n=t.createInside.element("td")).appendChild(t.createInside.element("br")),a.rowSpan>1&&h.__mark(n,"rowspan",a.rowSpan,r);let c=a.offsetWidth;l.Dom.after(a,n),o=c/e.offsetWidth/2,h.__mark(a,"width",(100*o).toFixed(s.ACCURACY)+"%",r),h.__mark(n,"width",(100*o).toFixed(s.ACCURACY)+"%",r),h.__unmark(r),p(t).removeSelection(a)}),h.__normalizeTable(e)}splitVertical(e){return h.__splitVertical(e,this.j)}static __setColumnWidthByDelta(e,t,i,n,o){let r=h.__formalMatrix(e),a=0;for(let n=0;n<r.length;n+=1){let l=r[n][t];if(l.colSpan>1&&r.length>1)continue;let c=(l.offsetWidth+i)/e.offsetWidth*100;h.__mark(l,"width",c.toFixed(s.ACCURACY)+"%",o),a=n;break}for(let e=a+1;e<r.length;e+=1){let i=r[e][t];h.__mark(i,"width",null,o)}n||h.__unmark(o)}setColumnWidthByDelta(e,t,i,n,o){return h.__setColumnWidthByDelta(e,t,i,n,o)}static __mark(e,t,i,n){n.push(e);let o=d.get(e)??{};o[t]=void 0===i?1:i,d.set(e,o)}static __unmark(e){e.forEach(e=>{let t=d.get(e);t&&(Object.keys(t).forEach(i=>{let n=t[i];switch(i){case"remove":l.Dom.safeRemove(e);break;case"rowspan":(0,u.attr)(e,"rowspan",(0,u.isNumber)(n)&&n>1?n:null);break;case"colspan":(0,u.attr)(e,"colspan",(0,u.isNumber)(n)&&n>1?n:null);break;case"width":null==n?(e.style.removeProperty("width"),(0,u.attr)(e,"style")||(0,u.attr)(e,"style",null)):e.style.width=n.toString()}delete t[i]}),d.delete(e))})}constructor(...e){super(...e),(0,n._)(this,"selected",new Set)}}(0,n._)(h,"__selectedByTable",new WeakMap),(0,o.__decorate)([(0,a.debounce)()],h.prototype,"__recalculateStyles",null);let p=e=>e.getInstance("Table",e.o)},22533:function(e,t,i){"use strict";i.d(t,{ToolbarButton:function(){return I}});var n=i(25045),o=i(31635),r=i(69364),s=i(49574),a=i(51676),l=i(91672),c=i(68616),u=i(23211),d=i(17312),h=i(91565),p=i(24497),m=i(62101),f=i(85932),g=i(86878),_=i(57821),v=i(28712),b=i(7909),y=i(71125),S=i(59400),w=i(15982),C=i(29434),k=i(51116),E=i(4274);class I 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,b.attr)(this.trigger,"aria-label",e)}}get toolbar(){let e=(0,l.getComponentClass)("ToolbarCollection");return this.closest(e)}update(){let{control:e,state:t}=this,i=this.toolbar;if(!i)return;let n=e.value?.(i.jodit,this);void 0!==n&&(t.value=n),t.disabled=this.__calculateDisabledStatus(i),t.activated=this.__calculateActivatedStatus(i),e.update?.(i.jodit,this)}__calculateActivatedStatus(e){return(!(0,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,b.attr)(this.button,"aria-pressed",this.state.activated),super.onChangeActivated()}onChangeText(){(0,h.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,b.attr)(this.button,"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}),t.appendChild(i);let n=this.j.c.fromHTML(`<span role="button" aria-haspopup="true" aria-expanded="false" class="${e}__trigger">${C.Icon.get("chevron")}</span>`);return i.appendChild(n),t}focus(){this.container.querySelector("button")?.focus()}onChangeHasTrigger(){this.state.hasTrigger?this.container.appendChild(this.trigger):u.Dom.safeRemove(this.trigger),this.setMod("with-trigger",this.state.hasTrigger||null)}onChangeDisabled(){let e=this.state.disabled?"disabled":null;(0,b.attr)(this.trigger,"disabled",e),(0,b.attr)(this.button,"disabled",e),(0,b.attr)(this.container,"disabled",e)}__initFromControl(){let{control:e,state:t}=this;this.updateSize(),t.name=e.name;let{textIcons:i}=this.j.o;if(!0===i||(0,h.isFunction)(i)&&i(e.name)||e.template)t.icon=(0,S.UIButtonState)().icon,t.text=e.text||e.name;else{if(e.iconURL)t.icon.iconURL=e.iconURL;else{let i=e.icon||e.name;t.icon.name=C.Icon.exists(i)||this.j.o.extraIcons?.[i]?i:""}e.iconURL||t.icon.name||(t.text=e.text||e.name)}e.tooltip&&(t.tooltip=(0,h.isFunction)(e.tooltip)?e.tooltip(this.j,e,this):e.tooltip),t.hasTrigger=!!(e.list||e.popup&&e.exec)}onTriggerClick(e){if(this.openedPopup)return void this.__closePopup();let{control:t}=this;if((0,b.attr)(this.trigger,"aria-expanded",!0),e.buffer={actionTrigger:this},t.list)return this.__openControlList(t);if((0,h.isFunction)(t.popup)){let e=this.openPopup();e.parentElement=this;try{if(!1!==this.j.e.fire((0,_.camelCase)(`before-${t.name}-open-popup`),this.target,t,e)){let i=this.toolbar?.getTarget(this)??this.target??null,n=t.popup(this.j,i,this.__closePopup,this);n?e.setContent((0,f.isString)(n)?this.j.c.fromHTML(n):n).open(()=>(0,g.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,_.camelCase)(`after-${t.name}-open-popup`),e.container)}}__openControlList(e){let t=this.jodit.options.controls??{},i=e=>(0,w.findControlType)(e,t),n=e.list,o=this.openPopup(),r=(0,E.makeCollection)(this.j);o.parentElement=this,r.parentElement=o,r.mode="vertical";let s=(t,n)=>{let o;if((0,f.isString)(n)&&i(n))return{name:n.toString(),...i(n)};if((0,f.isString)(t)&&i(t))return{name:t.toString(),...i(t),..."object"==typeof n?n:{}};o=t,(0,m.isPlainObject)(o)&&"title"in o&&"value"in o&&(n=t.value,t=t.title);let{childTemplate:r}=e,s={name:t.toString(),template:r&&((e,t,i)=>r(e,t,i,this)),exec:e.childExec?(t,i,n)=>e.childExec?.(t,i,{...n,parentControl:e}):e.exec,data:e.data,command:e.command,isActive:e.isChildActive,value:e.value,isDisabled:e.isChildDisabled,mode:e.mode,args:[...e.args?e.args:[],t,n]};return(0,f.isString)(n)&&(s.text=n),s};r.build((0,d.isArray)(n)?n.map(s):(0,y.keys)(n,!1).map(e=>s(e,n[e])),this.target),o.setContent(r).open(()=>(0,g.position)(this.container),!1,this.j.o.allowTabNavigation?this.container:void 0),this.state.activated=!0}onOutsideClick(e){this.openedPopup&&(e&&u.Dom.isNode(e.target)&&(u.Dom.isOrContains(this.container,e.target)||this.openedPopup.isOwnClick(e))||this.__closePopup())}openPopup(){return this.__closePopup(),this.openedPopup=new k.Popup(this.j,!1),this.j.e.on(this.ow,"mousedown touchstart",this.onOutsideClick).on("escape closeAllPopups",this.onOutsideClick),this.openedPopup}__closePopup(){this.openedPopup&&(this.j.e.off(this.ow,"mousedown touchstart",this.onOutsideClick).off("escape closeAllPopups",this.onOutsideClick),this.state.activated=!1,this.openedPopup.close(),this.openedPopup.destruct(),this.openedPopup=null,this.trigger&&(0,b.attr)(this.trigger,"aria-expanded",!1))}onClick(e){let{control:t}=this;if((0,h.isFunction)(t.exec)){let i=this.toolbar?.getTarget(this)??this.target??null,n=t.exec(this.j,i,{control:t,originalEvent:e,button:this});if(!1!==n&&!0!==n&&(this.j?.e?.fire("synchro"),this.parentElement&&this.parentElement.update(),this.j?.e?.fire("closeAllPopups afterExec")),!1!==n)return}return t.list?this.__openControlList(t):(0,h.isFunction)(t.popup)?this.onTriggerClick(e):void((t.command||t.name)&&((0,y.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,n._)(this,"control",void 0),(0,n._)(this,"target",void 0),(0,n._)(this,"state",void 0),(0,n._)(this,"trigger",void 0),(0,n._)(this,"openedPopup",void 0),this.control=t,this.target=i,this.state={...(0,S.UIButtonState)(),theme:"toolbar",currentValue:"",hasTrigger:!1},this.openedPopup=null;const o=this.getElm("button");(0,v.assert)(o,"Element button should exists"),this.button=o,Object.defineProperty(o,"component",{value:this,configurable:!0});const s=this.getElm("trigger");(0,v.assert)(s,"Element trigger should exists"),this.trigger=s,s.remove(),e.e.on([this.button,this.trigger],"mousedown",e=>e.preventDefault()),this.onAction(this.onClick),this.hookStatus(r.STATUSES.ready,()=>{this.__initFromControl(),this.update()}),t.mods&&Object.keys(t.mods).forEach(e=>{t.mods&&this.setMod(e,t.mods[e])})}}(0,o.__decorate)([a.cacheHTML],I.prototype,"createContainer",null),(0,o.__decorate)([(0,c.watch)("state.hasTrigger",{immediately:!1})],I.prototype,"onChangeHasTrigger",null),(0,o.__decorate)([(0,c.watch)("trigger:click")],I.prototype,"onTriggerClick",null),(0,o.__decorate)([s.autobind],I.prototype,"onOutsideClick",null),(0,o.__decorate)([s.autobind],I.prototype,"__closePopup",null),I=(0,o.__decorate)([l.component],I)},5772:function(e,t,i){"use strict";i.d(t,{ToolbarContent:function(){return c}});var n=i(25045),o=i(31635),r=i(84839),s=i(27795),a=i(65946),l=i(59400);class c extends l.UIButton{className(){return"ToolbarContent"}update(){let e=this.control.getContent(this.j,this);((0,a.isString)(e)||e.parentNode!==this.container)&&(s.Dom.detach(this.container),this.container.appendChild((0,a.isString)(e)?this.j.create.fromHTML(e):e)),super.update()}createContainer(){return this.j.c.span(this.componentName)}constructor(e,t,i=null){super(e),(0,n._)(this,"control",void 0),(0,n._)(this,"target",void 0),this.control=t,this.target=i,this.container.classList.add(`${this.componentName}_${this.clearName(t.name)}`),(0,a.attr)(this.container,"role","content")}}c=(0,o.__decorate)([r.component],c)},39709:function(e,t,i){"use strict";i.d(t,{ToolbarButton:function(){return n.ToolbarButton},ToolbarContent:function(){return o.ToolbarContent},ToolbarSelect:function(){return r.ToolbarSelect}});var n=i(22533),o=i(5772),r=i(61764)},61764:function(e,t,i){"use strict";i.d(t,{ToolbarSelect:function(){return l}});var n=i(31635),o=i(84839),r=i(62101),s=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,s.isString)(t.currentValue)?t.currentValue:void 0);i||(i=Object.keys(e)[0]);let n=((0,r.isPlainObject)(e)&&e[i.toString()]||i).toString();this.state.text=this.control.textTemplate?.(this.jodit,n)??n}}}l=(0,n.__decorate)([o.component],l)},42573:function(e,t,i){"use strict";i.d(t,{ToolbarCollection:function(){return p}});var n=i(25045),o=i(31635),r=i(84839),s=i(49574),a=i(91672),l=i(29200),c=i(68616),u=i(38027),d=i(97959),h=i(4274);class p extends d.UIList{className(){return"ToolbarCollection"}getRole(){return"toolbar"}get firstButton(){let[e]=this.buttons;return e||null}makeButton(e,t=null){return(0,h.makeButton)(this.j,e,t)}makeSelect(e,t=null){return(0,h.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){this.container.style.direction=e,this.container.setAttribute("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,u.error)("The method is not implemented for this class.")}build(e,t=null){let i=this.j.e.fire("beforeToolbarBuild",e);return i&&(e=i),super.build(e,t),this}destruct(){this.isDestructed||(this.j.e.off(this.__listenEvents,this.update).off("afterSetMode focus",this.__immediateUpdate),super.destruct())}constructor(e){super(e),(0,n._)(this,"__listenEvents","updatePlugins updateToolbar changeStack mousedown mouseup keydown change readonly afterResize selectionchange changeSelection focus afterSetMode touchstart focus blur")}}(0,o.__decorate)([(0,c.watch)(":afterInit"),s.autobind],p.prototype,"__immediateUpdate",null),(0,o.__decorate)([(0,r.debounce)(e=>e.j.defaultTimeout,!0)],p.prototype,"update",null),(0,o.__decorate)([(0,l.hook)("ready")],p.prototype,"__initEvents",null),p=(0,o.__decorate)([a.component],p)},6209:function(e,t,i){"use strict";i.d(t,{ToolbarEditorCollection:function(){return u}});var n=i(25045),o=i(31635),r=i(81937),s=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?r.MODE_WYSIWYG:e.control.mode;return i!==r.MODE_SPLIT&&i!==this.j.getRealMode()}shouldBeActive(e){let t,i=super.shouldBeActive(e);if(void 0!==i)return i;let n=this.j.selection?this.j.s.current():null;if(!n)return!1;if(e.control.tags){let i=e.control.tags;if(t=n,a.Dom.up(t,e=>{if(e&&-1!==i.indexOf(e.nodeName.toLowerCase()))return!0},this.j.editor))return!0}if(e.control.css){let i=e.control.css;if(t=n,a.Dom.up(t,e=>{if(e&&!a.Dom.isText(e)&&!a.Dom.isComment(e))return this.checkActiveStatus(i,e)},this.j.editor))return!0}return!1}getTarget(e){return e.target||this.j.s.current()||null}prependInvisibleInput(e){let t=this.j.create.element("input",{name:"jodit-toolbar-focus-helper_"+this.j.id,tabIndex:-1,disabled:!0,style:"width: 0; height:0; position: absolute; visibility: hidden;"});a.Dom.appendChildFirst(e,t)}showInline(e){this.jodit.e.fire("showInlineToolbar",e)}hide(){this.jodit.e.fire("hidePopup"),super.hide(),this.jodit.e.fire("toggleToolbar")}show(){super.show(),this.jodit.e.fire("toggleToolbar")}constructor(e){super(e),(0,n._)(this,"checkActiveStatus",(e,t)=>{let i=0,n=0;return Object.keys(e).forEach(o=>{let r=e[o];(0,l.isFunction)(r)?r(this.j,(0,l.css)(t,o).toString())&&(i+=1):-1!==r.indexOf((0,l.css)(t,o).toString())&&(i+=1),n+=1}),n===i}),this.prependInvisibleInput(this.container)}}u=(0,o.__decorate)([s.component],u)},4274:function(e,t,i){"use strict";i.d(t,{makeButton:function(){return a},makeCollection:function(){return s},makeSelect:function(){return l}});var n=i(91672),o=i(91565),r=i(24497);function s(e,t){let i=(0,n.getComponentClass)("ToolbarCollection"),o=(0,n.getComponentClass)("ToolbarEditorCollection"),s=(0,r.isJoditObject)(e)?new o(e):new i(e);return e.o.textIcons&&s.container.classList.add("jodit_text_icons"),t&&(s.parentElement=t),e.o.toolbarButtonSize&&(s.buttonSize=e.o.toolbarButtonSize),s}function a(e,t,i=null){if((0,o.isFunction)(t.getContent))return new((0,n.getComponentClass)("ToolbarContent"))(e,t,i);let r=new((0,n.getComponentClass)("ToolbarButton"))(e,t,i);return r.state.tabIndex=e.o.allowTabNavigation?0:-1,r}function l(e,t,i=null){return new((0,n.getComponentClass)("ToolbarSelect"))(e,t,i)}},40013:function(e,t,i){"use strict";var n=i(17312),o=i(24497),r=i(5266);r.Config.prototype.enableDragAndDropFileToEditor=!0,r.Config.prototype.uploader={url:"",insertImageAsBase64URI:!1,imagesExtensions:["jpg","png","jpeg","gif"],headers:null,data:null,filesVariableName:e=>`files[${e}]`,withCredentials:!1,pathVariableName:"path",format:"json",method:"POST",prepareData:e=>e,isSuccess:e=>e.success,getMessage:e=>void 0!==e.data.messages&&(0,n.isArray)(e.data.messages)?e.data.messages.join(" "):"",processFileName:(e,t,i)=>[e,t,i],process:e=>e.data,error(e){this.j.message.error(e.message,4e3)},getDisplayName:(e,t)=>e+t,defaultHandlerSuccess(e){let t=this.j||this;(0,o.isJoditObject)(t)&&e.files&&e.files.length&&e.files.forEach((i,n)=>{let[o,r]=e.isImages&&e.isImages[n]?["img","src"]:["a","href"],s=t.createInside.element(o);s.setAttribute(r,e.baseurl+i),"a"===o&&(s.textContent=t.o.uploader.getDisplayName.call(this,e.baseurl,i)),"img"===o?t.s.insertImage(s,null,t.o.imageDefaultWidth):t.s.insertNode(s)})},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 o}});var n=i(65946);function o(e,t){if((0,n.isFunction)(e.o.buildData))return e.o.buildData.call(e,t);let i=e.ow.FormData;if(void 0!==i){if(t instanceof i||(0,n.isString)(t))return t;let e=new i;return Object.keys(t).forEach(i=>{e.append(i,t[i])}),e}return t}},23112:function(e,t,i){"use strict";function n(e){let t=atob(e.split(",")[1]),i=e.split(",")[0].split(":")[1].split(";")[0],n=new Uint8Array(new ArrayBuffer(t.length));for(let e=0;e<t.length;e+=1)n[e]=t.charCodeAt(e);return new Blob([n.buffer],{type:i})}i.d(t,{dataURItoBlob:function(){return n}})},11981:function(e,t,i){"use strict";i.d(t,{ajaxInstances:function(){return o.ajaxInstances},hasFiles:function(){return s},hasItems:function(){return a},processOldBrowserDrag:function(){return n.processOldBrowserDrag},send:function(){return o.send},sendFiles:function(){return r.sendFiles}}),i(89446);var n=i(95436),o=i(77911),r=i(46533);function s(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 n=i(81937),o=i(27795),r=i(28077),s=i(65946),a=i(23112),l=i(46533);function c(e,t,i,c,u){if(t&&(!t.types.length||t.types[0]!==n.TEXT_PLAIN)){let t=e.j.c.div("",{tabindex:-1,style:"left: -9999px; top: 0; width: 0; height: 100%;line-height: 140%; overflow: hidden; position: fixed; z-index: 2147483647; word-break: break-all;",contenteditable:!0});(0,r.getContainer)(e.j,e.constructor).appendChild(t);let n=(0,s.isJoditObject)(e.j)?e.j.s.save():null;t.focus(),e.j.async.setTimeout(()=>{let r=t.firstChild;if(o.Dom.safeRemove(t),r&&r.hasAttribute("src")){let t=(0,s.attr)(r,"src")||"";n&&(0,s.isJoditObject)(e.j)&&e.j.s.restore(),(0,l.sendFiles)(e,[(0,a.dataURItoBlob)(t)],i,c).finally(u)}},e.j.defaultTimeout)}}},46533:function(e,t,i){"use strict";i.d(t,{sendFiles:function(){return r}});var n=i(65946),o=i(77911);function r(e,t,i,r,s){if(!t)return Promise.reject((0,n.error)("Need files"));let{o:a}=e,l=(0,n.toArray)(t);if(!l.length)return Promise.reject((0,n.error)("Need files"));let c=[];if(a.insertImageAsBase64URI&&function(e,t,i,o,r,s){let a,l;for(l=0;l<e.length;l+=1)if((a=e[l])&&a.type){let c=a.type.match(/\/([a-z0-9]+)/i),u=c[1]?c[1].toLowerCase():"";if(!t.includes(u))continue;let d=new FileReader;i.push(o.j.async.promise((e,t)=>{d.onerror=t,d.onloadend=()=>{let t={baseurl:"",files:[d.result],isImages:[!0]};((0,n.isFunction)(r)?r:s).call(o,t),e(t)},d.readAsDataURL(a)})),e[l]=null}}(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 n=/\.\w+$/.test(t.name),o=t.type.match(/\/([a-z0-9]+)/i),r=o&&o[1]?o[1].toLowerCase():"",s=l[i].name||Math.random().toString().replace(".","");if(!n&&r){let e=r;["jpeg","jpg"].includes(e)&&(e="jpeg|jpg"),RegExp(".("+e+")$","i").test(s)||(s+="."+r)}let[c,d,h]=a.processFileName.call(e,a.filesVariableName(i),l[i],s);u.append(c,d,h)}s&&s(u),a.data&&(0,n.isPlainObject)(a.data)&&Object.keys(a.data).forEach(e=>{u.append(e,a.data[e])}),a.prepareData.call(e,u),c.push((0,o.send)(e,u).then(t=>(a.isSuccess.call(e,t)?((0,n.isFunction)(i)?i:a.defaultHandlerSuccess).call(e,a.process.call(e,t)):((0,n.isFunction)(r)?r:a.defaultHandlerError).call(e,(0,n.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,{ajaxInstances:function(){return s},send:function(){return a}});var n=i(65946),o=i(73714),r=i(89446);let s=new WeakMap;function a(e,t){let i=(0,r.buildData)(e,t),a=t=>{e.j.progressbar.show().progress(t),t>=100&&e.j.progressbar.hide()},l=(t,i)=>{let r=new o.Ajax({xhr(){let t=new XMLHttpRequest;return void 0!==e.j.ow.FormData&&t.upload?(i(10),t.upload.addEventListener("progress",e=>{if(e.lengthComputable){let t=e.loaded/e.total;i(t*=100)}},!1)):i(100),t},method:e.o.method||"POST",data:t,url:(0,n.isFunction)(e.o.url)?e.o.url(t):e.o.url,headers:e.o.headers,queryBuild:e.o.queryBuild,contentType:e.o.contentType.call(e,t),withCredentials:e.o.withCredentials||!1}),a=s.get(e);return a||(a=new Set,s.set(e,a)),a.add(r),e.j.e.one("beforeDestruct",r.destruct),r.send().then(e=>e.json()).catch(e=>({success:!1,data:{messages:[e]}})).finally(()=>{r.destruct(),a?.delete(r)})};return((0,n.isFunction)(e.o.customUploadFunction)&&(l=e.o.customUploadFunction),(0,n.isPromise)(i))?i.then(e=>l(e,a)).catch(t=>{e.o.error.call(e,t)}):l(i,a)}},94925:function(e,t,i){"use strict";i.d(t,{Uploader:function(){return c}});var n=i(25045),o=i(16964),r=i(81937),s=i(65946),a=i(5266),l=i(11981);i(40013);class c extends o.ViewComponent{get j(){return this.jodit}className(){return"Uploader"}get o(){return this.options}setPath(e){return this.path=e,this}setSource(e){return this.source=e,this}bind(e,t,i){let n=()=>{e.classList.remove("jodit_drag_hover")},o=this,s=e=>{let s,a,c,u=e.clipboardData,d=e=>{a&&(e.append("extension",c),e.append("mimetype",a.type))};if(!r.IS_IE&&(0,l.hasFiles)(u))return(0,l.sendFiles)(o,u.files,t,i).finally(n),!1;if(r.IS_IE&&!r.IS_ES_NEXT)return(0,l.processOldBrowserDrag)(o,u,t,i,n);if((0,l.hasItems)(u)){let{items:r}=u;for(s=0;s<r.length;s+=1)if("file"===r[s].kind&&"image/png"===r[s].type){if(a=r[s].getAsFile()){let e=a.type.match(/\/([a-z0-9]+)/i);c=e[1]?e[1].toLowerCase():"",(0,l.sendFiles)(o,[a],t,i,d).finally(n)}e.preventDefault();break}}};o.j&&o.j.editor!==e?o.j.e.on(e,"paste",s):o.j.e.on("beforePaste",s),this.attachEvents(e,t,i,n)}attachEvents(e,t,i,n){let o=this;o.j.e.on(e,"dragend dragover dragenter dragleave drop",e=>{e.preventDefault()}).on(e,"dragover",t=>{((0,l.hasFiles)(t.dataTransfer)||(0,l.hasItems)(t.dataTransfer))&&(e.classList.add("jodit_drag_hover"),t.preventDefault())}).on(e,"dragend dragleave",t=>{e.classList.remove("jodit_drag_hover"),(0,l.hasFiles)(t.dataTransfer)&&t.preventDefault()}).on(e,"drop",r=>{e.classList.remove("jodit_drag_hover"),(0,l.hasFiles)(r.dataTransfer)&&(r.preventDefault(),r.stopImmediatePropagation(),(0,l.sendFiles)(o,r.dataTransfer.files,t,i).finally(n))});let r=e.querySelector("input[type=file]");r&&o.j.e.on(r,"change",()=>{(0,l.sendFiles)(o,r.files,t,i).then(()=>{r.value="",/safari/i.test(navigator.userAgent)||(r.type="",r.type="file")}).finally(n)})}uploadRemoteImage(e,t,i){let n=this,{o}=n,r=(0,s.isFunction)(i)?i:o.defaultHandlerError;(0,l.send)(n,{action:"fileUploadRemote",url:e}).then(e=>{o.isSuccess.call(n,e)?((0,s.isFunction)(t)?t:o.defaultHandlerSuccess).call(n,o.process.call(n,e)):r.call(n,(0,s.error)(o.getMessage.call(n,e)))}).catch(e=>r.call(n,e))}upload(e){return this.async.promise((t,i)=>{(0,l.sendFiles)(this,e,t,i)})}destruct(){this.setStatus(o.STATUSES.beforeDestruct);let e=l.ajaxInstances.get(this);e&&(e.forEach(e=>{try{e.destruct()}catch{}}),e.clear()),super.destruct()}constructor(e,t){super(e),(0,n._)(this,"path",""),(0,n._)(this,"source","default"),(0,n._)(this,"options",void 0),this.options=(0,s.ConfigProto)(t||{},(0,s.ConfigProto)(a.Config.defaultOptions.uploader,(0,s.isJoditObject)(e)?e.o.uploader:{}))}}},72348:function(e,t,i){"use strict";i.d(t,{ColorPickerWidget:function(){return l}});var n=i(27795),o=i(65946),r=i(4099),s=i(54522),a=i.n(s);r.Icon.set("palette",a());let l=(e,t,i)=>{let s="jodit-color-picker",a=(0,o.normalizeColor)(i),l=e.c.div(s),c=e.o.textIcons?`<span>${e.i18n("palette")}</span>`:r.Icon.get("palette"),u=e=>{let t=[];return(0,o.isPlainObject)(e)?Object.keys(e).forEach(i=>{t.push(`<div class="${s}__group ${s}__group-${i}">`),t.push(u(e[i])),t.push("</div>")}):(0,o.isArray)(e)&&e.forEach(e=>{t.push(`<span class='${s}__color-item ${a===e?s+"__color-item_active_true":""}' title="${e}" style="background-color:${e}" data-color="${e}"></span>`)}),t.join("")};l.appendChild(e.c.fromHTML(`<div class="${s}__groups">${u(e.o.colors)}</div>`)),l.appendChild(e.c.fromHTML(`<div data-ref="extra" class="${s}__extra"></div>`));let{extra:d}=(0,o.refs)(l);return e.o.showBrowserColorPicker&&(0,o.hasBrowserColorPicker)()&&(d.appendChild(e.c.fromHTML(`<div class="${s}__native">${c}<input type="color" value="#ffffff"/></div>`)),e.e.on(l,"change",e=>{e.stopPropagation();let i=e.target;if(!i||!i.tagName||!n.Dom.isTag(i,"input"))return;let r=i.value||"";(0,o.isFunction)(t)&&t(r),e.preventDefault()})),e.e.on(l,"mousedown touchend",i=>{i.stopPropagation(),i.preventDefault();let r=i.target;if((!r||!r.tagName||n.Dom.isTag(r,"svg")||n.Dom.isTag(r,"path"))&&r.parentNode&&(r=n.Dom.closest(r.parentNode,"span",e.editor)),!n.Dom.isTag(r,"span")||!r.classList.contains(s+"__color-item"))return;let a=(0,o.attr)(r,"-color")||"";t&&(0,o.isFunction)(t)&&t(a)}),e.e.fire("afterGenerateColorPicker",l,d,t,a),l}},18762:function(e,t,i){"use strict";i.d(t,{FileSelectorWidget:function(){return a}});var n=i(23211),o=i(65946),r=i(4099),s=i(89636);let a=(e,t,i,a,c=!0)=>{let u,d=[],h=e.o.uploader;if(t.upload&&(h.url||h.insertImageAsBase64URI||h.customUploadFunction)){let i=e.c.fromHTML(`<div class="jodit-drag-and-drop__file-box"><strong>${e.i18n(c?"Drop image":"Drop file")}</strong><span><br>${e.i18n("or click")}</span><input type="file" accept="${c?"image/*":"*"}" tabindex="-1" dir="auto" multiple=""/></div>`);e.uploader.bind(i,i=>{let n=(0,o.isFunction)(t.upload)?t.upload:h.defaultHandlerSuccess;(0,o.isFunction)(n)&&n.call(e,i),e.e.fire("closeAllPopups")},t=>{e.message.error(t.message),e.e.fire("closeAllPopups")}),d.push({icon:"upload",name:"Upload",content:i})}if(t.filebrowser&&(e.o.filebrowser.ajax.url||e.o.filebrowser.items.url)&&d.push({icon:"folder",name:"Browse",content(){a&&a(),t.filebrowser&&e.filebrowser.open(t.filebrowser,c)}}),t.url){let s=new r.UIButton(e,{type:"submit",variant:"primary",text:"Insert"}),a=new r.UIForm(e,[new r.UIInput(e,{required:!0,label:"URL",name:"url",type:"text",placeholder:"https://"}),new r.UIInput(e,{name:"text",label:"Alternative text"}),new r.UIBlock(e,[s])]);u=null,i&&!n.Dom.isText(i)&&!n.Dom.isComment(i)&&(n.Dom.isTag(i,"img")||(0,o.$$)("img",i).length)&&(u="IMG"===i.tagName?i:(0,o.$$)("img",i)[0],l(a.container,"input[name=url]",(0,o.attr)(u,"src")),l(a.container,"input[name=text]",(0,o.attr)(u,"alt")),s.state.text="Update"),i&&n.Dom.isTag(i,"a")&&(l(a.container,"input[name=url]",(0,o.attr)(i,"href")),l(a.container,"input[name=text]",(0,o.attr)(i,"title")),s.state.text="Update"),a.onSubmit(i=>{(0,o.isFunction)(t.url)&&t.url.call(e,i.url,i.text)}),d.push({icon:"link",name:"URL",content:a.container})}return(0,s.TabsWidget)(e,d)};function l(e,t,i){let n=e.querySelector(t);return n?(i&&(n.value=i),n.value):""}},15753:function(e,t,i){"use strict";i.d(t,{ColorPickerWidget:function(){return n.ColorPickerWidget},FileSelectorWidget:function(){return o.FileSelectorWidget},TabsWidget:function(){return r.TabsWidget}});var n=i(72348),o=i(18762),r=i(89636)},89636:function(e,t,i){"use strict";i.d(t,{TabsWidget:function(){return l}});var n=i(16964),o=i(23211),r=i(91565),s=i(7909),a=i(4099);let l=(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,s.attr)(u,{role:"tablist","aria-orientation":"horizontal"});let d={},h=[],p="";l.appendChild(u),l.appendChild(c);let m=e=>{d[e]&&(h.forEach(e=>{e.state.activated=!1}),Object.values(d).forEach(({tab:e})=>e.classList.remove("jodit-tab_active")),d[e].button.state.activated=!0,d[e].tab.classList.add("jodit-tab_active"))};if(t.forEach(({icon:l,name:f,content:g})=>{let _=e.c.div("jodit-tab");(0,s.attr)(_,{role:"tabpanel"});let v=(0,a.Button)(e,l||f,f);v.state.role="tab",e.e.on(v.container,"pointerdown",e=>e.preventDefault()),p||(p=f),u.appendChild(v.container),h.push(v),v.container.classList.add("jodit-tabs__button","jodit-tabs__button_columns_"+t.length),(0,r.isFunction)(g)?_.classList.add("jodit-tab_empty"):_.appendChild(n.Component.isInstanceOf(g,a.UIElement)?g.container:g),c.appendChild(_),v.onAction(()=>(m(f),(0,r.isFunction)(g)&&!o.Dom.isElement(g)&&g.call(e),i&&(i.activeTab=f),!1)),d[f]={button:v,tab:_}}),Object.values(d).forEach(({button:e})=>{e.container.style.width=(100/t.length).toFixed(10)+"%"}),m(i&&i.activeTab&&d[i.activeTab]?i.activeTab:p),i){let e=i.activeTab;Object.defineProperty(i,"activeTab",{configurable:!0,enumerable:!1,get:()=>e,set(t){e=t,m(t)}})}return l}},94358:function(e,t,i){"use strict";var n=i(81937),o=i(28077),r=i(65946),s=i(29434),a=i(5266),l=i(17995),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">
|
|
111
|
+
</form>`)}},60936:function(e,t,i){"use strict";i.r(t),i.d(t,{Ajax:function(){return p.Ajax},Alert:function(){return s.Alert},Async:function(){return l.Async},AsyncStorage:function(){return D.AsyncStorage},Button:function(){return m.Button},CommitStyle:function(){return x.CommitStyle},Component:function(){return n.Component},Confirm:function(){return s.Confirm},ContextMenu:function(){return r.ContextMenu},Create:function(){return c.Create},Dialog:function(){return s.Dialog},Dom:function(){return u.Dom},EventEmitter:function(){return d.EventEmitter},EventHandlersStore:function(){return d.EventHandlersStore},Eventify:function(){return d.Eventify},FileBrowser:function(){return a.FileBrowser},Helpers:function(){return o},History:function(){return _.History},Icon:function(){return m.Icon},ImageEditor:function(){return b.ImageEditor},IndexedDBProvider:function(){return D.IndexedDBProvider},LazyWalker:function(){return u.LazyWalker},LocalStorageProvider:function(){return D.LocalStorageProvider},MemoryStorageProvider:function(){return D.MemoryStorageProvider},Plugin:function(){return h.Plugin},PluginSystem:function(){return T.PluginSystem},Popup:function(){return m.Popup},ProgressBar:function(){return m.ProgressBar},Prompt:function(){return s.Prompt},Response:function(){return p.Response},STATUSES:function(){return n.STATUSES},Selection:function(){return x.Selection},Snapshot:function(){return v.Snapshot},StatusBar:function(){return S.StatusBar},Storage:function(){return D.Storage},StorageKey:function(){return D.StorageKey},Table:function(){return w.Table},ToolbarButton:function(){return C.ToolbarButton},ToolbarCollection:function(){return k.ToolbarCollection},ToolbarContent:function(){return C.ToolbarContent},ToolbarEditorCollection:function(){return E.ToolbarEditorCollection},ToolbarSelect:function(){return C.ToolbarSelect},UIBlock:function(){return m.UIBlock},UIButton:function(){return m.UIButton},UIButtonGroup:function(){return m.UIButtonGroup},UIButtonState:function(){return m.UIButtonState},UICheckbox:function(){return m.UICheckbox},UIElement:function(){return m.UIElement},UIFileInput:function(){return m.UIFileInput},UIForm:function(){return m.UIForm},UIGroup:function(){return m.UIGroup},UIInput:function(){return m.UIInput},UIList:function(){return m.UIList},UIMessages:function(){return y.UIMessages},UISelect:function(){return m.UISelect},UISeparator:function(){return m.UISeparator},UISpacer:function(){return m.UISpacer},UITextArea:function(){return m.UITextArea},UITooltip:function(){return m.UITooltip},Uploader:function(){return I.Uploader},View:function(){return f.View},ViewComponent:function(){return n.ViewComponent},ViewWithToolbar:function(){return g.ViewWithToolbar},canUseIndexedDB:function(){return D.canUseIndexedDB},canUsePersistentStorage:function(){return D.canUsePersistentStorage},clearUseIndexedDBCache:function(){return D.clearUseIndexedDBCache},defaultNameSpace:function(){return d.defaultNameSpace},observable:function(){return d.observable}});var n=i(16964),o=i(65946),r=i(67399),s=i(37333),a=i(17610),l=i(91231),c=i(79821),u=i(27795),d=i(1496),h=i(91206),p=i(73714),m=i(4099),f=i(35099),g=i(2222),_=i(53855),v=i(46363),b=i(43271),y=i(10081),S=i(29433),w=i(98803),C=i(39709),k=i(42573),E=i(6209),I=i(94925),T=i(85305),x=i(59841),D=i(25222)},61466:function(e,t,i){"use strict";i.d(t,{UIMessage:function(){return s}});var n=i(31635),o=i(91672),r=i(4099);class s extends r.UIElement{className(){return"UIMessage"}constructor(e,t){super(e),this.setMod("active",!0),this.setMod("variant",t.variant),this.container.textContent=t.text}}s=(0,n.__decorate)([o.component],s)},10081:function(e,t,i){"use strict";i.d(t,{UIMessages:function(){return c}});var n=i(25045),o=i(31635),r=i(91672),s=i(80991),a=i(63468),l=i(61466);class c extends a.UIGroup{className(){return"UIMessages"}info(e,t){this.__message(e,"info",t)}success(e,t){this.__message(e,"success",t)}error(e,t){this.__message(e,"error",t)}message(e,t,i){this.__message(e,t,i)}__message(e,t="info",i){let n=e+":"+t;if(this.__messages.has(n))return void this.async.updateTimeout(n,i||this.options.defaultTimeout);if(!this.__box)throw Error("Container is not defined: "+n);this.__box.appendChild(this.container);let o=new l.UIMessage(this.j,{text:e,variant:t});this.append(o),this.__calcOffsets(),this.__messages.add(n);let r=this.__getRemoveCallback(o,n);this.j.e.on(o.container,"pointerdown",r),this.async.setTimeout(r,{label:n,timeout:i||this.options.defaultTimeout})}__getRemoveCallback(e,t){let i=n=>{n&&n.preventDefault(),e.isInDestruct||(this.async.clearTimeout(t),this.j.e.off(e.container,"pointerdown",i),this.__messages.delete(t),e.setMod("active",!1),this.async.setTimeout(()=>{this.remove(e),e.destruct(),this.__calcOffsets()},300))};return i}__calcOffsets(){let e=5;this.elements.forEach(t=>{(0,s.css)(t.container,"bottom",e+"px"),e+=t.container.offsetHeight+this.options.defaultOffset})}constructor(e,t,i={defaultTimeout:3e3,defaultOffset:5}){super(e),(0,n._)(this,"__box",void 0),(0,n._)(this,"options",void 0),(0,n._)(this,"__messages",void 0),this.__box=t,this.options=i,this.__messages=new Set}}c=(0,o.__decorate)([r.component],c)},29433:function(e,t,i){"use strict";i.d(t,{StatusBar:function(){return u}});var n=i(25045),o=i(31635),r=i(16964),s=i(84839),a=i(23211),l=i(23183),c=i(81987);class u extends r.ViewComponent{className(){return"StatusBar"}hide(){this.container.classList.add("jodit_hidden")}show(){this.container.classList.remove("jodit_hidden")}get isShown(){return!this.container.classList.contains("jodit_hidden")}getHeight(){return this.container?.offsetHeight??0}findEmpty(e=!1){let t=this.getElms(e?"item-right":"item");for(let e=0;e<t.length;e+=1)if(!t[e].innerHTML.trim().length)return t[e]}append(e,t=!1){let i=this.findEmpty(t)||this.j.c.div(this.getFullElName("item"));t&&i.classList.add(this.getFullElName("item-right")),i.appendChild(e),this.container?.appendChild(i),this.j.o.statusbar&&this.show(),this.j.e.fire("resize")}destruct(){this.isInDestruct||(this.setStatus(r.STATUSES.beforeDestruct),a.Dom.safeRemove(this.container),super.destruct())}constructor(e,t){super(e),(0,n._)(this,"target",void 0),(0,n._)(this,"container",void 0),(0,n._)(this,"mods",void 0),this.target=t,this.mods={},this.container=e.c.div("jodit-status-bar"),t.appendChild(this.container),this.hide()}}u=(0,o.__decorate)([s.component,(0,s.derive)(c.Mods,l.Elms)],u)},98803:function(e,t,i){"use strict";i.d(t,{Table:function(){return h}});var n=i(25045),o=i(31635),r=i(16964),s=i(81937),a=i(84839),l=i(27795),c=i(28077),u=i(65946);let d=new WeakMap;class h extends r.ViewComponent{className(){return"Table"}__recalculateStyles(){let e=(0,c.getContainer)(this.j,h,"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=h.__selectedByTable.get(t)||new Set;i.add(e),h.__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=h.__selectedByTable.get(t);i&&(i.delete(e),i.size||h.__selectedByTable.delete(t))}}getAllSelectedCells(){return(0,u.toArray)(this.selected)}static __getSelectedCellsByTable(e){let t=h.__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 h.__getRowsCount(e)}static __getColumnsCount(e){return h.__formalMatrix(e).reduce((e,t)=>Math.max(e,t.length),0)}getColumnsCount(e){return h.__getColumnsCount(e)}static __formalMatrix(e,t){let i=[[]],n=(0,u.toArray)(e.rows),o=(e,n)=>{void 0===i[n]&&(i[n]=[]);let o=e.colSpan,r=e.rowSpan,s,a,l=0;for(;i[n][l];)l+=1;for(a=0;r>a;a+=1)for(s=0;s<o;s+=1){if(void 0===i[n+a]&&(i[n+a]=[]),t&&!1===t(e,n+a,l+s,o,r))return!1;i[n+a][l+s]=e}};for(let e=0;e<n.length;e+=1){let t=(0,u.toArray)(n[e].cells);for(let n=0;n<t.length;n+=1)if(!1===o(t[n],e))return i}return i}formalMatrix(e,t){return h.__formalMatrix(e,t)}static __formalCoordinate(e,t,i=!1){let n=0,o=0,r=1,s=1;return h.__formalMatrix(e,(e,a,l,c,u)=>{if(t===e)return n=a,o=l,r=c||1,s=u||1,i&&(o+=(c||1)-1,n+=(u||1)-1),!1}),[n,o,r,s]}formalCoordinate(e,t,i=!1){return h.__formalCoordinate(e,t,i)}static __appendRow(e,t,i,n){let o;if(t)o=t.cloneNode(!0),(0,u.$$)("td,th",t).forEach(e=>{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)}}),(0,u.$$)("td,th",o).forEach(e=>{e.innerHTML=""});else{let t=h.__getColumnsCount(e);o=n.element("tr");for(let e=0;e<t;e+=1)o.appendChild(n.element("td"))}i&&t&&t.nextSibling?t.parentNode&&t.parentNode.insertBefore(o,t.nextSibling):!i&&t?t.parentNode&&t.parentNode.insertBefore(o,t):(e.getElementsByTagName("tbody")?.[0]||e).appendChild(o)}appendRow(e,t,i){return h.__appendRow(e,t,i,this.j.createInside)}static __removeRow(e,t){let i,n=h.__formalMatrix(e),o=e.rows[t];n[t].forEach((r,s)=>{if(i=!1,t-1>=0&&n[t-1][s]===r)i=!0;else if(n[t+1]&&n[t+1][s]===r){if(r.parentNode===o&&r.parentNode.nextSibling){i=!0;let o=s+1;for(;n[t+1][o]===r;)o+=1;let a=l.Dom.next(r.parentNode,e=>l.Dom.isTag(e,"tr"),e);a&&(n[t+1][o]?a.insertBefore(r,n[t+1][o]):a.appendChild(r))}}else l.Dom.safeRemove(r);if(i&&(r.parentNode===o||r!==n[t][s-1])){let e=r.rowSpan;(0,u.attr)(r,"rowspan",e-1>1?e-1:null)}}),l.Dom.safeRemove(o)}removeRow(e,t){return h.__removeRow(e,t)}appendColumn(e,t,i=!0){let n=h.__formalMatrix(e);if(!i&&l.Dom.isCell(t.previousElementSibling))return this.appendColumn(e,t.previousElementSibling,!0);let[,o]=h.__formalCoordinate(e,t,i),r=i?o+1:o;for(let e=0;e<n.length;){let t=n[e];if(t[o]!==t[r]||o===r){let e=this.j.createInside.element("td");i?l.Dom.after(t[o],e):l.Dom.before(t[o],e),t[o].rowSpan>1&&(e.rowSpan=t[o].rowSpan)}else t[o].colSpan+=1;e+=t[o].rowSpan||1}}static __removeColumn(e,t){let i,n=h.__formalMatrix(e);n.forEach((e,o)=>{let r=e[t];if(i=!1,t-1>=0&&n[o][t-1]===r||t+1<e.length&&n[o][t+1]===r?i=!0:l.Dom.safeRemove(r),i&&(o-1<0||r!==n[o-1][t])){let e=r.colSpan;(0,u.attr)(r,"colspan",e-1>1?(e-1).toString():null)}})}removeColumn(e,t){return h.__removeColumn(e,t)}static __getSelectedBound(e,t){let i,n,o,r=[[1/0,1/0],[0,0]],s=h.__formalMatrix(e);for(i=0;i<s.length;i+=1)for(n=0;s[i]&&n<s[i].length;n+=1)t.includes(s[i][n])&&(r[0][0]=Math.min(i,r[0][0]),r[0][1]=Math.min(n,r[0][1]),r[1][0]=Math.max(i,r[1][0]),r[1][1]=Math.max(n,r[1][1]));for(i=r[0][0];i<=r[1][0];i+=1)for(o=1,n=r[0][1];n<=r[1][1];n+=1){for(;s[i]&&s[i][n-o]&&s[i][n]===s[i][n-o];)r[0][1]=Math.min(n-o,r[0][1]),r[1][1]=Math.max(n-o,r[1][1]),o+=1;for(o=1;s[i]&&s[i][n+o]&&s[i][n]===s[i][n+o];)r[0][1]=Math.min(n+o,r[0][1]),r[1][1]=Math.max(n+o,r[1][1]),o+=1;for(o=1;s[i-o]&&s[i][n]===s[i-o][n];)r[0][0]=Math.min(i-o,r[0][0]),r[1][0]=Math.max(i-o,r[1][0]),o+=1;for(o=1;s[i+o]&&s[i][n]===s[i+o][n];)r[0][0]=Math.min(i+o,r[0][0]),r[1][0]=Math.max(i+o,r[1][0]),o+=1}return r}getSelectedBound(e,t){return h.__getSelectedBound(e,t)}static __normalizeTable(e){let t=[],i=h.__formalMatrix(e);h.__removeExtraColspans(i,t),h.__removeExtraRowspans(i,t);for(let e=0;e<i.length;e+=1)for(let t=0;t<i[e].length;t+=1)void 0!==i[e][t]&&(i[e][t].hasAttribute("rowspan")&&1===i[e][t].rowSpan&&(0,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));h.__unmark(t)}static __removeExtraColspans(e,t){for(let i=0;i<e[0].length;i+=1){let n=1e6,o=!1;for(let t=0;t<e.length;t+=1)if(void 0!==e[t][i]){if(e[t][i].colSpan<2){o=!0;break}n=Math.min(n,e[t][i].colSpan)}if(!o)for(let o=0;o<e.length;o+=1)void 0!==e[o][i]&&h.__mark(e[o][i],"colspan",e[o][i].colSpan-n+1,t)}}static __removeExtraRowspans(e,t){let i=0,n=0;for(i=0;i<e.length;i+=1){let o=1e6,r=!1;for(n=0;n<e[i].length;n+=1)if(void 0!==e[i][n]){if(e[i][n].rowSpan<2){r=!0;break}o=Math.min(o,e[i][n].rowSpan)}if(!r)for(n=0;n<e[i].length;n+=1)void 0!==e[i][n]&&h.__mark(e[i][n],"rowspan",e[i][n].rowSpan-o+1,t)}}normalizeTable(e){return h.__normalizeTable(e)}static __mergeSelected(e,t){let i=[],n=h.__getSelectedBound(e,h.__getSelectedCellsByTable(e)),o=0,r=null,a=0,c=0,d=0,m=new Set,f=[];n&&(n[0][0]-n[1][0]||n[0][1]-n[1][1])&&(h.__formalMatrix(e,(e,s,l,g,_)=>{s>=n[0][0]&&s<=n[1][0]&&l>=n[0][1]&&l<=n[1][1]&&(m.has(e)||(m.add(e),s===n[0][0]&&e.style.width&&(o+=e.offsetWidth),""!==(0,u.trim)(e.innerHTML.replace(/<br(\/)?>/g,""))&&i.push(e.innerHTML),g>1&&(c+=g-1),_>1&&(d+=_-1),r?(h.__mark(e,"remove",1,f),p(t).removeSelection(e)):(r=e,a=l)))}),c=n[1][1]-n[0][1]+1,d=n[1][0]-n[0][0]+1,r&&(c>1&&h.__mark(r,"colspan",c,f),d>1&&h.__mark(r,"rowspan",d,f),o&&(h.__mark(r,"width",(o/e.offsetWidth*100).toFixed(s.ACCURACY)+"%",f),a&&h.__setColumnWidthByDelta(e,a,0,!0,f)),r.innerHTML=i.join("<br/>"),p(t).addSelection(r),m.delete(r),h.__unmark(f),h.__normalizeTable(e),(0,u.toArray)(e.rows).forEach(e=>{e.cells.length||l.Dom.safeRemove(e)})))}mergeSelected(e){return h.__mergeSelected(e,this.j)}static __splitHorizontal(e,t){let i,n,o,r,s,a=[];h.__getSelectedCellsByTable(e).forEach(c=>{(n=t.createInside.element("td")).appendChild(t.createInside.element("br")),o=t.createInside.element("tr"),i=h.__formalCoordinate(e,c),c.rowSpan<2?(h.__formalMatrix(e,(e,t,n)=>{i[0]===t&&i[1]!==n&&e!==c&&h.__mark(e,"rowspan",e.rowSpan+1,a)}),l.Dom.after(l.Dom.closest(c,"tr",e),o),o.appendChild(n)):(h.__mark(c,"rowspan",c.rowSpan-1,a),h.__formalMatrix(e,(t,n,o)=>{n>i[0]&&n<i[0]+c.rowSpan&&i[1]>o&&t.parentNode.rowIndex===n&&(s=t),i[0]<n&&t===c&&(r=e.rows[n])}),s?l.Dom.after(s,n):r.insertBefore(n,r.firstChild)),c.colSpan>1&&h.__mark(n,"colspan",c.colSpan,a),h.__unmark(a),p(t).removeSelection(c)}),this.__normalizeTable(e)}splitHorizontal(e){return h.__splitHorizontal(e,this.j)}static __splitVertical(e,t){let i,n,o,r=[];h.__getSelectedCellsByTable(e).forEach(a=>{i=h.__formalCoordinate(e,a),a.colSpan<2?h.__formalMatrix(e,(e,t,n)=>{i[1]===n&&i[0]!==t&&e!==a&&h.__mark(e,"colspan",e.colSpan+1,r)}):h.__mark(a,"colspan",a.colSpan-1,r),(n=t.createInside.element("td")).appendChild(t.createInside.element("br")),a.rowSpan>1&&h.__mark(n,"rowspan",a.rowSpan,r);let c=a.offsetWidth;l.Dom.after(a,n),o=c/e.offsetWidth/2,h.__mark(a,"width",(100*o).toFixed(s.ACCURACY)+"%",r),h.__mark(n,"width",(100*o).toFixed(s.ACCURACY)+"%",r),h.__unmark(r),p(t).removeSelection(a)}),h.__normalizeTable(e)}splitVertical(e){return h.__splitVertical(e,this.j)}static __setColumnWidthByDelta(e,t,i,n,o){let r=h.__formalMatrix(e),a=0;for(let n=0;n<r.length;n+=1){let l=r[n][t];if(l.colSpan>1&&r.length>1)continue;let c=(l.offsetWidth+i)/e.offsetWidth*100;h.__mark(l,"width",c.toFixed(s.ACCURACY)+"%",o),a=n;break}for(let e=a+1;e<r.length;e+=1){let i=r[e][t];h.__mark(i,"width",null,o)}n||h.__unmark(o)}setColumnWidthByDelta(e,t,i,n,o){return h.__setColumnWidthByDelta(e,t,i,n,o)}static __mark(e,t,i,n){n.push(e);let o=d.get(e)??{};o[t]=void 0===i?1:i,d.set(e,o)}static __unmark(e){e.forEach(e=>{let t=d.get(e);t&&(Object.keys(t).forEach(i=>{let n=t[i];switch(i){case"remove":l.Dom.safeRemove(e);break;case"rowspan":(0,u.attr)(e,"rowspan",(0,u.isNumber)(n)&&n>1?n:null);break;case"colspan":(0,u.attr)(e,"colspan",(0,u.isNumber)(n)&&n>1?n:null);break;case"width":null==n?(e.style.removeProperty("width"),(0,u.attr)(e,"style")||(0,u.attr)(e,"style",null)):e.style.width=n.toString()}delete t[i]}),d.delete(e))})}constructor(...e){super(...e),(0,n._)(this,"selected",new Set)}}(0,n._)(h,"__selectedByTable",new WeakMap),(0,o.__decorate)([(0,a.debounce)()],h.prototype,"__recalculateStyles",null);let p=e=>e.getInstance("Table",e.o)},22533:function(e,t,i){"use strict";i.d(t,{ToolbarButton:function(){return I}});var n=i(25045),o=i(31635),r=i(69364),s=i(49574),a=i(51676),l=i(91672),c=i(68616),u=i(23211),d=i(17312),h=i(91565),p=i(24497),m=i(62101),f=i(85932),g=i(86878),_=i(57821),v=i(28712),b=i(7909),y=i(71125),S=i(59400),w=i(15982),C=i(29434),k=i(51116),E=i(4274);class I 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,b.attr)(this.trigger,"aria-label",e)}}get toolbar(){let e=(0,l.getComponentClass)("ToolbarCollection");return this.closest(e)}update(){let{control:e,state:t}=this,i=this.toolbar;if(!i)return;let n=e.value?.(i.jodit,this);void 0!==n&&(t.value=n),t.disabled=this.__calculateDisabledStatus(i),t.activated=this.__calculateActivatedStatus(i),e.update?.(i.jodit,this)}__calculateActivatedStatus(e){return(!(0,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,b.attr)(this.button,"aria-pressed",this.state.activated),super.onChangeActivated()}onChangeText(){(0,h.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,b.attr)(this.button,"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}),t.appendChild(i);let n=this.j.c.fromHTML(`<span role="button" aria-haspopup="true" aria-expanded="false" class="${e}__trigger">${C.Icon.get("chevron")}</span>`);return i.appendChild(n),t}focus(){this.container.querySelector("button")?.focus()}onChangeHasTrigger(){this.state.hasTrigger?this.container.appendChild(this.trigger):u.Dom.safeRemove(this.trigger),this.setMod("with-trigger",this.state.hasTrigger||null)}onChangeDisabled(){let e=this.state.disabled?"disabled":null;(0,b.attr)(this.trigger,"disabled",e),(0,b.attr)(this.button,"disabled",e),(0,b.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,h.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,h.isFunction)(i)&&i(e.name)||e.template){t.icon=(0,S.UIButtonState)().icon,t.text=e.text||e.name;return}if(!(0,f.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=C.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,b.attr)(this.trigger,"aria-expanded",!0),e.buffer={actionTrigger:this},t.list)return this.__openControlList(t);if((0,h.isFunction)(t.popup)){let e=this.openPopup();e.parentElement=this;try{if(!1!==this.j.e.fire((0,_.camelCase)(`before-${t.name}-open-popup`),this.target,t,e)){let i=this.toolbar?.getTarget(this)??this.target??null,n=t.popup(this.j,i,this.__closePopup,this);n?e.setContent((0,f.isString)(n)?this.j.c.fromHTML(n):n).open(()=>(0,g.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,_.camelCase)(`after-${t.name}-open-popup`),e.container)}}__openControlList(e){let t=this.jodit.options.controls??{},i=e=>(0,w.findControlType)(e,t),n=e.list,o=this.openPopup(),r=(0,E.makeCollection)(this.j);o.parentElement=this,r.parentElement=o,r.mode="vertical";let s=(t,n)=>{let o;if((0,f.isString)(n)&&i(n))return{name:n.toString(),...i(n)};if((0,f.isString)(t)&&i(t))return{name:t.toString(),...i(t),..."object"==typeof n?n:{}};o=t,(0,m.isPlainObject)(o)&&"title"in o&&"value"in o&&(n=t.value,t=t.title);let{childTemplate:r}=e,s={name:t.toString(),template:r&&((e,t,i)=>r(e,t,i,this)),exec:e.childExec?(t,i,n)=>e.childExec?.(t,i,{...n,parentControl:e}):e.exec,data:e.data,command:e.command,isActive:e.isChildActive,value:e.value,isDisabled:e.isChildDisabled,mode:e.mode,args:[...e.args?e.args:[],t,n]};return(0,f.isString)(n)&&(s.text=n),s};r.build((0,d.isArray)(n)?n.map(s):(0,y.keys)(n,!1).map(e=>s(e,n[e])),this.target),o.setContent(r).open(()=>(0,g.position)(this.container),!1,this.j.o.allowTabNavigation?this.container:void 0),this.state.activated=!0}onOutsideClick(e){this.openedPopup&&(e&&u.Dom.isNode(e.target)&&(u.Dom.isOrContains(this.container,e.target)||this.openedPopup.isOwnClick(e))||this.__closePopup())}openPopup(){return this.__closePopup(),this.openedPopup=new k.Popup(this.j,!1),this.j.e.on(this.ow,"mousedown touchstart",this.onOutsideClick).on("escape closeAllPopups",this.onOutsideClick),this.openedPopup}__closePopup(){this.openedPopup&&(this.j.e.off(this.ow,"mousedown touchstart",this.onOutsideClick).off("escape closeAllPopups",this.onOutsideClick),this.state.activated=!1,this.openedPopup.close(),this.openedPopup.destruct(),this.openedPopup=null,this.trigger&&(0,b.attr)(this.trigger,"aria-expanded",!1))}onClick(e){let{control:t}=this;if((0,h.isFunction)(t.exec)){let i=this.toolbar?.getTarget(this)??this.target??null,n=t.exec(this.j,i,{control:t,originalEvent:e,button:this});if(!1!==n&&!0!==n&&(this.j?.e?.fire("synchro"),this.parentElement&&this.parentElement.update(),this.j?.e?.fire("closeAllPopups afterExec")),!1!==n)return}return t.list?this.__openControlList(t):(0,h.isFunction)(t.popup)?this.onTriggerClick(e):void((t.command||t.name)&&((0,y.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,n._)(this,"control",void 0),(0,n._)(this,"target",void 0),(0,n._)(this,"state",void 0),(0,n._)(this,"trigger",void 0),(0,n._)(this,"openedPopup",void 0),this.control=t,this.target=i,this.state={...(0,S.UIButtonState)(),theme:"toolbar",currentValue:"",hasTrigger:!1},this.openedPopup=null;const o=this.getElm("button");(0,v.assert)(o,"Element button should exists"),this.button=o,Object.defineProperty(o,"component",{value:this,configurable:!0});const s=this.getElm("trigger");(0,v.assert)(s,"Element trigger should exists"),this.trigger=s,s.remove(),e.e.on([this.button,this.trigger],"mousedown",e=>e.preventDefault()),this.onAction(this.onClick),this.hookStatus(r.STATUSES.ready,()=>{this.__initFromControl(),this.update()}),t.mods&&Object.keys(t.mods).forEach(e=>{t.mods&&this.setMod(e,t.mods[e])})}}(0,o.__decorate)([a.cacheHTML],I.prototype,"createContainer",null),(0,o.__decorate)([(0,c.watch)("state.hasTrigger",{immediately:!1})],I.prototype,"onChangeHasTrigger",null),(0,o.__decorate)([(0,c.watch)("trigger:click")],I.prototype,"onTriggerClick",null),(0,o.__decorate)([s.autobind],I.prototype,"onOutsideClick",null),(0,o.__decorate)([s.autobind],I.prototype,"__closePopup",null),I=(0,o.__decorate)([l.component],I)},5772:function(e,t,i){"use strict";i.d(t,{ToolbarContent:function(){return c}});var n=i(25045),o=i(31635),r=i(84839),s=i(27795),a=i(65946),l=i(59400);class c extends l.UIButton{className(){return"ToolbarContent"}update(){let e=this.control.getContent(this.j,this);((0,a.isString)(e)||e.parentNode!==this.container)&&(s.Dom.detach(this.container),this.container.appendChild((0,a.isString)(e)?this.j.create.fromHTML(e):e)),super.update()}createContainer(){return this.j.c.span(this.componentName)}constructor(e,t,i=null){super(e),(0,n._)(this,"control",void 0),(0,n._)(this,"target",void 0),this.control=t,this.target=i,this.container.classList.add(`${this.componentName}_${this.clearName(t.name)}`),(0,a.attr)(this.container,"role","content")}}c=(0,o.__decorate)([r.component],c)},39709:function(e,t,i){"use strict";i.d(t,{ToolbarButton:function(){return n.ToolbarButton},ToolbarContent:function(){return o.ToolbarContent},ToolbarSelect:function(){return r.ToolbarSelect}});var n=i(22533),o=i(5772),r=i(61764)},61764:function(e,t,i){"use strict";i.d(t,{ToolbarSelect:function(){return l}});var n=i(31635),o=i(84839),r=i(62101),s=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,s.isString)(t.currentValue)?t.currentValue:void 0);i||(i=Object.keys(e)[0]);let n=((0,r.isPlainObject)(e)&&e[i.toString()]||i).toString();this.state.text=this.control.textTemplate?.(this.jodit,n)??n}}}l=(0,n.__decorate)([o.component],l)},42573:function(e,t,i){"use strict";i.d(t,{ToolbarCollection:function(){return p}});var n=i(25045),o=i(31635),r=i(84839),s=i(49574),a=i(91672),l=i(29200),c=i(68616),u=i(38027),d=i(97959),h=i(4274);class p extends d.UIList{className(){return"ToolbarCollection"}getRole(){return"toolbar"}get firstButton(){let[e]=this.buttons;return e||null}makeButton(e,t=null){return(0,h.makeButton)(this.j,e,t)}makeSelect(e,t=null){return(0,h.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){this.container.style.direction=e,this.container.setAttribute("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,u.error)("The method is not implemented for this class.")}build(e,t=null){let i=this.j.e.fire("beforeToolbarBuild",e);return i&&(e=i),super.build(e,t),this}destruct(){this.isDestructed||(this.j.e.off(this.__listenEvents,this.update).off("afterSetMode focus",this.__immediateUpdate),super.destruct())}constructor(e){super(e),(0,n._)(this,"__listenEvents","updatePlugins updateToolbar changeStack mousedown mouseup keydown change readonly afterResize selectionchange changeSelection focus afterSetMode touchstart focus blur")}}(0,o.__decorate)([(0,c.watch)(":afterInit"),s.autobind],p.prototype,"__immediateUpdate",null),(0,o.__decorate)([(0,r.debounce)(e=>e.j.defaultTimeout,!0)],p.prototype,"update",null),(0,o.__decorate)([(0,l.hook)("ready")],p.prototype,"__initEvents",null),p=(0,o.__decorate)([a.component],p)},6209:function(e,t,i){"use strict";i.d(t,{ToolbarEditorCollection:function(){return u}});var n=i(25045),o=i(31635),r=i(81937),s=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?r.MODE_WYSIWYG:e.control.mode;return i!==r.MODE_SPLIT&&i!==this.j.getRealMode()}shouldBeActive(e){let t,i=super.shouldBeActive(e);if(void 0!==i)return i;let n=this.j.selection?this.j.s.current():null;if(!n)return!1;if(e.control.tags){let i=e.control.tags;if(t=n,a.Dom.up(t,e=>{if(e&&-1!==i.indexOf(e.nodeName.toLowerCase()))return!0},this.j.editor))return!0}if(e.control.css){let i=e.control.css;if(t=n,a.Dom.up(t,e=>{if(e&&!a.Dom.isText(e)&&!a.Dom.isComment(e))return this.checkActiveStatus(i,e)},this.j.editor))return!0}return!1}getTarget(e){return e.target||this.j.s.current()||null}prependInvisibleInput(e){let t=this.j.create.element("input",{name:"jodit-toolbar-focus-helper_"+this.j.id,tabIndex:-1,disabled:!0,style:"width: 0; height:0; position: absolute; visibility: hidden;"});a.Dom.appendChildFirst(e,t)}showInline(e){this.jodit.e.fire("showInlineToolbar",e)}hide(){this.jodit.e.fire("hidePopup"),super.hide(),this.jodit.e.fire("toggleToolbar")}show(){super.show(),this.jodit.e.fire("toggleToolbar")}constructor(e){super(e),(0,n._)(this,"checkActiveStatus",(e,t)=>{let i=0,n=0;return Object.keys(e).forEach(o=>{let r=e[o];(0,l.isFunction)(r)?r(this.j,(0,l.css)(t,o).toString())&&(i+=1):-1!==r.indexOf((0,l.css)(t,o).toString())&&(i+=1),n+=1}),n===i}),this.prependInvisibleInput(this.container)}}u=(0,o.__decorate)([s.component],u)},4274:function(e,t,i){"use strict";i.d(t,{makeButton:function(){return a},makeCollection:function(){return s},makeSelect:function(){return l}});var n=i(91672),o=i(91565),r=i(24497);function s(e,t){let i=(0,n.getComponentClass)("ToolbarCollection"),o=(0,n.getComponentClass)("ToolbarEditorCollection"),s=(0,r.isJoditObject)(e)?new o(e):new i(e);return e.o.textIcons&&s.container.classList.add("jodit_text_icons"),t&&(s.parentElement=t),e.o.toolbarButtonSize&&(s.buttonSize=e.o.toolbarButtonSize),s}function a(e,t,i=null){if((0,o.isFunction)(t.getContent))return new((0,n.getComponentClass)("ToolbarContent"))(e,t,i);let r=new((0,n.getComponentClass)("ToolbarButton"))(e,t,i);return r.state.tabIndex=e.o.allowTabNavigation?0:-1,r}function l(e,t,i=null){return new((0,n.getComponentClass)("ToolbarSelect"))(e,t,i)}},40013:function(e,t,i){"use strict";var n=i(17312),o=i(24497),r=i(5266);r.Config.prototype.enableDragAndDropFileToEditor=!0,r.Config.prototype.uploader={url:"",insertImageAsBase64URI:!1,imagesExtensions:["jpg","png","jpeg","gif"],headers:null,data:null,filesVariableName:e=>`files[${e}]`,withCredentials:!1,pathVariableName:"path",format:"json",method:"POST",prepareData:e=>e,isSuccess:e=>e.success,getMessage:e=>void 0!==e.data.messages&&(0,n.isArray)(e.data.messages)?e.data.messages.join(" "):"",processFileName:(e,t,i)=>[e,t,i],process:e=>e.data,error(e){this.j.message.error(e.message,4e3)},getDisplayName:(e,t)=>e+t,defaultHandlerSuccess(e){let t=this.j||this;(0,o.isJoditObject)(t)&&e.files&&e.files.length&&e.files.forEach((i,n)=>{let[o,r]=e.isImages&&e.isImages[n]?["img","src"]:["a","href"],s=t.createInside.element(o);s.setAttribute(r,e.baseurl+i),"a"===o&&(s.textContent=t.o.uploader.getDisplayName.call(this,e.baseurl,i)),"img"===o?t.s.insertImage(s,null,t.o.imageDefaultWidth):t.s.insertNode(s)})},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 o}});var n=i(65946);function o(e,t){if((0,n.isFunction)(e.o.buildData))return e.o.buildData.call(e,t);let i=e.ow.FormData;if(void 0!==i){if(t instanceof i||(0,n.isString)(t))return t;let e=new i;return Object.keys(t).forEach(i=>{e.append(i,t[i])}),e}return t}},23112:function(e,t,i){"use strict";function n(e){let t=atob(e.split(",")[1]),i=e.split(",")[0].split(":")[1].split(";")[0],n=new Uint8Array(new ArrayBuffer(t.length));for(let e=0;e<t.length;e+=1)n[e]=t.charCodeAt(e);return new Blob([n.buffer],{type:i})}i.d(t,{dataURItoBlob:function(){return n}})},11981:function(e,t,i){"use strict";i.d(t,{ajaxInstances:function(){return o.ajaxInstances},hasFiles:function(){return s},hasItems:function(){return a},processOldBrowserDrag:function(){return n.processOldBrowserDrag},send:function(){return o.send},sendFiles:function(){return r.sendFiles}}),i(89446);var n=i(95436),o=i(77911),r=i(46533);function s(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 n=i(81937),o=i(27795),r=i(28077),s=i(65946),a=i(23112),l=i(46533);function c(e,t,i,c,u){if(t&&(!t.types.length||t.types[0]!==n.TEXT_PLAIN)){let t=e.j.c.div("",{tabindex:-1,style:"left: -9999px; top: 0; width: 0; height: 100%;line-height: 140%; overflow: hidden; position: fixed; z-index: 2147483647; word-break: break-all;",contenteditable:!0});(0,r.getContainer)(e.j,e.constructor).appendChild(t);let n=(0,s.isJoditObject)(e.j)?e.j.s.save():null;t.focus(),e.j.async.setTimeout(()=>{let r=t.firstChild;if(o.Dom.safeRemove(t),r&&r.hasAttribute("src")){let t=(0,s.attr)(r,"src")||"";n&&(0,s.isJoditObject)(e.j)&&e.j.s.restore(),(0,l.sendFiles)(e,[(0,a.dataURItoBlob)(t)],i,c).finally(u)}},e.j.defaultTimeout)}}},46533:function(e,t,i){"use strict";i.d(t,{sendFiles:function(){return r}});var n=i(65946),o=i(77911);function r(e,t,i,r,s){if(!t)return Promise.reject((0,n.error)("Need files"));let{o:a}=e,l=(0,n.toArray)(t);if(!l.length)return Promise.reject((0,n.error)("Need files"));let c=[];if(a.insertImageAsBase64URI&&function(e,t,i,o,r,s){let a,l;for(l=0;l<e.length;l+=1)if((a=e[l])&&a.type){let c=a.type.match(/\/([a-z0-9]+)/i),u=c[1]?c[1].toLowerCase():"";if(!t.includes(u))continue;let d=new FileReader;i.push(o.j.async.promise((e,t)=>{d.onerror=t,d.onloadend=()=>{let t={baseurl:"",files:[d.result],isImages:[!0]};((0,n.isFunction)(r)?r:s).call(o,t),e(t)},d.readAsDataURL(a)})),e[l]=null}}(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 n=/\.\w+$/.test(t.name),o=t.type.match(/\/([a-z0-9]+)/i),r=o&&o[1]?o[1].toLowerCase():"",s=l[i].name||Math.random().toString().replace(".","");if(!n&&r){let e=r;["jpeg","jpg"].includes(e)&&(e="jpeg|jpg"),RegExp(".("+e+")$","i").test(s)||(s+="."+r)}let[c,d,h]=a.processFileName.call(e,a.filesVariableName(i),l[i],s);u.append(c,d,h)}s&&s(u),a.data&&(0,n.isPlainObject)(a.data)&&Object.keys(a.data).forEach(e=>{u.append(e,a.data[e])}),a.prepareData.call(e,u),c.push((0,o.send)(e,u).then(t=>(a.isSuccess.call(e,t)?((0,n.isFunction)(i)?i:a.defaultHandlerSuccess).call(e,a.process.call(e,t)):((0,n.isFunction)(r)?r:a.defaultHandlerError).call(e,(0,n.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,{ajaxInstances:function(){return s},send:function(){return a}});var n=i(65946),o=i(73714),r=i(89446);let s=new WeakMap;function a(e,t){let i=(0,r.buildData)(e,t),a=t=>{e.j.progressbar.show().progress(t),t>=100&&e.j.progressbar.hide()},l=(t,i)=>{let r=new o.Ajax({xhr(){let t=new XMLHttpRequest;return void 0!==e.j.ow.FormData&&t.upload?(i(10),t.upload.addEventListener("progress",e=>{if(e.lengthComputable){let t=e.loaded/e.total;i(t*=100)}},!1)):i(100),t},method:e.o.method||"POST",data:t,url:(0,n.isFunction)(e.o.url)?e.o.url(t):e.o.url,headers:e.o.headers,queryBuild:e.o.queryBuild,contentType:e.o.contentType.call(e,t),withCredentials:e.o.withCredentials||!1}),a=s.get(e);return a||(a=new Set,s.set(e,a)),a.add(r),e.j.e.one("beforeDestruct",r.destruct),r.send().then(e=>e.json()).catch(e=>({success:!1,data:{messages:[e]}})).finally(()=>{r.destruct(),a?.delete(r)})};return((0,n.isFunction)(e.o.customUploadFunction)&&(l=e.o.customUploadFunction),(0,n.isPromise)(i))?i.then(e=>l(e,a)).catch(t=>{e.o.error.call(e,t)}):l(i,a)}},94925:function(e,t,i){"use strict";i.d(t,{Uploader:function(){return c}});var n=i(25045),o=i(16964),r=i(81937),s=i(65946),a=i(5266),l=i(11981);i(40013);class c extends o.ViewComponent{get j(){return this.jodit}className(){return"Uploader"}get o(){return this.options}setPath(e){return this.path=e,this}setSource(e){return this.source=e,this}bind(e,t,i){let n=()=>{e.classList.remove("jodit_drag_hover")},o=this,s=e=>{let s,a,c,u=e.clipboardData,d=e=>{a&&(e.append("extension",c),e.append("mimetype",a.type))};if(!r.IS_IE&&(0,l.hasFiles)(u))return(0,l.sendFiles)(o,u.files,t,i).finally(n),!1;if(r.IS_IE&&!r.IS_ES_NEXT)return(0,l.processOldBrowserDrag)(o,u,t,i,n);if((0,l.hasItems)(u)){let{items:r}=u;for(s=0;s<r.length;s+=1)if("file"===r[s].kind&&"image/png"===r[s].type){if(a=r[s].getAsFile()){let e=a.type.match(/\/([a-z0-9]+)/i);c=e[1]?e[1].toLowerCase():"",(0,l.sendFiles)(o,[a],t,i,d).finally(n)}e.preventDefault();break}}};o.j&&o.j.editor!==e?o.j.e.on(e,"paste",s):o.j.e.on("beforePaste",s),this.attachEvents(e,t,i,n)}attachEvents(e,t,i,n){let o=this;o.j.e.on(e,"dragend dragover dragenter dragleave drop",e=>{e.preventDefault()}).on(e,"dragover",t=>{((0,l.hasFiles)(t.dataTransfer)||(0,l.hasItems)(t.dataTransfer))&&(e.classList.add("jodit_drag_hover"),t.preventDefault())}).on(e,"dragend dragleave",t=>{e.classList.remove("jodit_drag_hover"),(0,l.hasFiles)(t.dataTransfer)&&t.preventDefault()}).on(e,"drop",r=>{e.classList.remove("jodit_drag_hover"),(0,l.hasFiles)(r.dataTransfer)&&(r.preventDefault(),r.stopImmediatePropagation(),(0,l.sendFiles)(o,r.dataTransfer.files,t,i).finally(n))});let r=e.querySelector("input[type=file]");r&&o.j.e.on(r,"change",()=>{(0,l.sendFiles)(o,r.files,t,i).then(()=>{r.value="",/safari/i.test(navigator.userAgent)||(r.type="",r.type="file")}).finally(n)})}uploadRemoteImage(e,t,i){let n=this,{o}=n,r=(0,s.isFunction)(i)?i:o.defaultHandlerError;(0,l.send)(n,{action:"fileUploadRemote",url:e}).then(e=>{o.isSuccess.call(n,e)?((0,s.isFunction)(t)?t:o.defaultHandlerSuccess).call(n,o.process.call(n,e)):r.call(n,(0,s.error)(o.getMessage.call(n,e)))}).catch(e=>r.call(n,e))}upload(e){return this.async.promise((t,i)=>{(0,l.sendFiles)(this,e,t,i)})}destruct(){this.setStatus(o.STATUSES.beforeDestruct);let e=l.ajaxInstances.get(this);e&&(e.forEach(e=>{try{e.destruct()}catch{}}),e.clear()),super.destruct()}constructor(e,t){super(e),(0,n._)(this,"path",""),(0,n._)(this,"source","default"),(0,n._)(this,"options",void 0),this.options=(0,s.ConfigProto)(t||{},(0,s.ConfigProto)(a.Config.defaultOptions.uploader,(0,s.isJoditObject)(e)?e.o.uploader:{}))}}},72348:function(e,t,i){"use strict";i.d(t,{ColorPickerWidget:function(){return l}});var n=i(27795),o=i(65946),r=i(4099),s=i(54522),a=i.n(s);r.Icon.set("palette",a());let l=(e,t,i)=>{let s="jodit-color-picker",a=(0,o.normalizeColor)(i),l=e.c.div(s),c=e.o.textIcons?`<span>${e.i18n("palette")}</span>`:r.Icon.get("palette"),u=e=>{let t=[];return(0,o.isPlainObject)(e)?Object.keys(e).forEach(i=>{t.push(`<div class="${s}__group ${s}__group-${i}">`),t.push(u(e[i])),t.push("</div>")}):(0,o.isArray)(e)&&e.forEach(e=>{t.push(`<span class='${s}__color-item ${a===e?s+"__color-item_active_true":""}' title="${e}" style="background-color:${e}" data-color="${e}"></span>`)}),t.join("")};l.appendChild(e.c.fromHTML(`<div class="${s}__groups">${u(e.o.colors)}</div>`)),l.appendChild(e.c.fromHTML(`<div data-ref="extra" class="${s}__extra"></div>`));let{extra:d}=(0,o.refs)(l);return e.o.showBrowserColorPicker&&(0,o.hasBrowserColorPicker)()&&(d.appendChild(e.c.fromHTML(`<div class="${s}__native">${c}<input type="color" value="#ffffff"/></div>`)),e.e.on(l,"change",e=>{e.stopPropagation();let i=e.target;if(!i||!i.tagName||!n.Dom.isTag(i,"input"))return;let r=i.value||"";(0,o.isFunction)(t)&&t(r),e.preventDefault()})),e.e.on(l,"mousedown touchend",i=>{i.stopPropagation(),i.preventDefault();let r=i.target;if((!r||!r.tagName||n.Dom.isTag(r,"svg")||n.Dom.isTag(r,"path"))&&r.parentNode&&(r=n.Dom.closest(r.parentNode,"span",e.editor)),!n.Dom.isTag(r,"span")||!r.classList.contains(s+"__color-item"))return;let a=(0,o.attr)(r,"-color")||"";t&&(0,o.isFunction)(t)&&t(a)}),e.e.fire("afterGenerateColorPicker",l,d,t,a),l}},18762:function(e,t,i){"use strict";i.d(t,{FileSelectorWidget:function(){return a}});var n=i(23211),o=i(65946),r=i(4099),s=i(89636);let a=(e,t,i,a,c=!0)=>{let u,d=[],h=e.o.uploader;if(t.upload&&(h.url||h.insertImageAsBase64URI||h.customUploadFunction)){let i=e.c.fromHTML(`<div class="jodit-drag-and-drop__file-box"><strong>${e.i18n(c?"Drop image":"Drop file")}</strong><span><br>${e.i18n("or click")}</span><input type="file" accept="${c?"image/*":"*"}" tabindex="-1" dir="auto" multiple=""/></div>`);e.uploader.bind(i,i=>{let n=(0,o.isFunction)(t.upload)?t.upload:h.defaultHandlerSuccess;(0,o.isFunction)(n)&&n.call(e,i),e.e.fire("closeAllPopups")},t=>{e.message.error(t.message),e.e.fire("closeAllPopups")}),d.push({icon:"upload",name:"Upload",content:i})}if(t.filebrowser&&(e.o.filebrowser.ajax.url||e.o.filebrowser.items.url)&&d.push({icon:"folder",name:"Browse",content(){a&&a(),t.filebrowser&&e.filebrowser.open(t.filebrowser,c)}}),t.url){let s=new r.UIButton(e,{type:"submit",variant:"primary",text:"Insert"}),a=new r.UIForm(e,[new r.UIInput(e,{required:!0,label:"URL",name:"url",type:"text",placeholder:"https://"}),new r.UIInput(e,{name:"text",label:"Alternative text"}),new r.UIBlock(e,[s])]);u=null,i&&!n.Dom.isText(i)&&!n.Dom.isComment(i)&&(n.Dom.isTag(i,"img")||(0,o.$$)("img",i).length)&&(u="IMG"===i.tagName?i:(0,o.$$)("img",i)[0],l(a.container,"input[name=url]",(0,o.attr)(u,"src")),l(a.container,"input[name=text]",(0,o.attr)(u,"alt")),s.state.text="Update"),i&&n.Dom.isTag(i,"a")&&(l(a.container,"input[name=url]",(0,o.attr)(i,"href")),l(a.container,"input[name=text]",(0,o.attr)(i,"title")),s.state.text="Update"),a.onSubmit(i=>{(0,o.isFunction)(t.url)&&t.url.call(e,i.url,i.text)}),d.push({icon:"link",name:"URL",content:a.container})}return(0,s.TabsWidget)(e,d)};function l(e,t,i){let n=e.querySelector(t);return n?(i&&(n.value=i),n.value):""}},15753:function(e,t,i){"use strict";i.d(t,{ColorPickerWidget:function(){return n.ColorPickerWidget},FileSelectorWidget:function(){return o.FileSelectorWidget},TabsWidget:function(){return r.TabsWidget}});var n=i(72348),o=i(18762),r=i(89636)},89636:function(e,t,i){"use strict";i.d(t,{TabsWidget:function(){return l}});var n=i(16964),o=i(23211),r=i(91565),s=i(7909),a=i(4099);let l=(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,s.attr)(u,{role:"tablist","aria-orientation":"horizontal"});let d={},h=[],p="";l.appendChild(u),l.appendChild(c);let m=e=>{d[e]&&(h.forEach(e=>{e.state.activated=!1}),Object.values(d).forEach(({tab:e})=>e.classList.remove("jodit-tab_active")),d[e].button.state.activated=!0,d[e].tab.classList.add("jodit-tab_active"))};if(t.forEach(({icon:l,name:f,content:g})=>{let _=e.c.div("jodit-tab");(0,s.attr)(_,{role:"tabpanel"});let v=(0,a.Button)(e,l||f,f);v.state.role="tab",e.e.on(v.container,"pointerdown",e=>e.preventDefault()),p||(p=f),u.appendChild(v.container),h.push(v),v.container.classList.add("jodit-tabs__button","jodit-tabs__button_columns_"+t.length),(0,r.isFunction)(g)?_.classList.add("jodit-tab_empty"):_.appendChild(n.Component.isInstanceOf(g,a.UIElement)?g.container:g),c.appendChild(_),v.onAction(()=>(m(f),(0,r.isFunction)(g)&&!o.Dom.isElement(g)&&g.call(e),i&&(i.activeTab=f),!1)),d[f]={button:v,tab:_}}),Object.values(d).forEach(({button:e})=>{e.container.style.width=(100/t.length).toFixed(10)+"%"}),m(i&&i.activeTab&&d[i.activeTab]?i.activeTab:p),i){let e=i.activeTab;Object.defineProperty(i,"activeTab",{configurable:!0,enumerable:!1,get:()=>e,set(t){e=t,m(t)}})}return l}},94358:function(e,t,i){"use strict";var n=i(81937),o=i(28077),r=i(65946),s=i(29434),a=i(5266),l=i(17995),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">
|
|
112
112
|
<div>${i("Jodit Editor")} v.${e.getVersion()}</div>
|
|
113
113
|
<div>${i("License: %s",!(0,r.isLicense)(e.o.license)?e.o.license||"MIT":(0,r.normalizeLicense)(e.o.license))}</div>
|
|
114
114
|
<div>
|